oauth2-mock-server AGENTS.md

oauth2-mock-server AGENTS.md is an instructions file for Codex, OpenCode from axa-group/oauth2-mock-server. It costs 2,175 tokens per session, scanned A, original, MIT.

Project instructions for oauth2-mock-server, a TypeScript library and command-line tool that imitates an OAuth2/OpenID Connect identity server for automated tests.

In plain words
What is it for?
Use them when modifying the mock HTTP server, signing keys, OAuth2 issuer, command-line interface, exports, or automated tests.
Why use it?
They map the main files and responsibilities and define the project's strict TypeScript, module, testing, linting, and formatting expectations. This helps changes remain compatible with the public library and command-line tool.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/axa-group/oauth2-mock-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/axa-group/oauth2-mock-server

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for oauth2-mock-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/axa-group/oauth2-mock-server/agents-md.svg)](https://agentmods.dev/instructions/axa-group/oauth2-mock-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/axa-group/oauth2-mock-server/agents-md"><img src="https://agentmods.dev/badge/instructions/axa-group/oauth2-mock-server/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,175 This file is loaded in full into every session.
When invoked 2,175 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02175 $0.02175
Opus 5 $0.01087 $0.01087
Sonnet 5 $0.00435 $0.00435
Haiku 4.5 $0.00217 $0.00217

Measured 6d ago against content hash 48ec1a653c63, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

oauth2-mock-server AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Guidelines

This file contains instructions for AI coding agents working in this repository.

Project overview

oauth2-mock-server is a TypeScript library and CLI tool that provides a configurable OAuth2/OpenID Connect mock server for automated testing.

Tech stack: TypeScript (ultra-strict) · Node.js · ESM-only · Vitest · ESLint + Prettier

Module map

File Role
src/index.ts Public barrel — all library exports originate here
src/oauth2-mock-server.ts Binary shim — calls cli() from src/cli.ts with process.argv.slice(2); contains no logic
src/cli.ts CLI logic — cli(args) parses argv and starts the server; also exports readJsonFromFile() and shift(); not part of the public API
src/lib/http-server.ts HttpServer — restartable wrapper around node:http/node:https
src/lib/jwk-store.ts JWKStore — manages JWK key pairs; uses jose for key generation/export
src/lib/jwk-store.keys.ts JWK algorithm registry: supportedAlgs list and privateToPublicKeyTransformer; used by JWKStore and test helpers — not exported publicly
src/lib/oauth2-issuer.ts OAuth2Issuer — holds the issuer URL + key store; signs JWTs with jose (SignJWT)
src/lib/oauth2-service.ts OAuth2Service — HTTP request handler; owns all OAuth2/OIDC endpoint logic; composes OAuth2Issuer
src/lib/oauth2-service.http.ts HTTP plumbing for OAuth2Service: body/query-param parsing, route matching — not exported publicly
src/lib/oauth2-service.pkce.ts PKCE utilities: isValidPkceCodeVerifier, createPKCEVerifier, createPKCECodeChallenge — not exported publicly
src/lib/oauth2-service.jwt-assertion.ts JWT Bearer assertion parsing: parseJwtBearerAssertionPayload — decodes the payload segment without verifying the signature; not exported publicly
src/lib/oauth2-server.ts OAuth2Server — convenience façade; combines HttpServer + OAuth2Service + OAuth2Issuer
src/lib/assertions.ts Internal assertion helpers: assertIsString, assertIsStringOrUndefined, assertIsAddressInfo, assertIsPlainObject — not exported publicly
src/lib/types.ts Public types and interfaces (exported via barrel)
src/lib/types-internals.ts Internal types (JWKWithKid, AugmentedRequest, RouteHandler, InternalEvents, supportedPkceAlgorithms) — not re-exported

Read the full file on GitHub · 136 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 136 lines · 2,175 tokens per session scan A 48ec1a653c63

Subscribe to this mod's changes

oauth2-mock-server AGENTS.md is an instructions file published in the GitHub repository axa-group/oauth2-mock-server (258 stars, last pushed yesterday), licensed MIT. It adds 2,175 tokens to every session, about $0.0109 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

platform AGENTS.md

AGENTS.md instructions for doka-guide/platform, covering agents.md — как работать с платформой доки, 1. правила работы, сначала подумай, потом пиши, минимум кода and правки хирургические.

doka-guide/platform · 2,985 tokens

codex-multi-auth AGENTS.md

AGENTS.md instructions for ndycode/codex-multi-auth, covering project knowledge base, structure, where to look, conventions and anti-patterns.

ndycode/codex-multi-auth · 2,767 tokens

maui uitests.instructions.md

Instructions for dotnet/maui, covering ui testing guidelines for .net maui, ui test structure, two-project requirement, base class and infrastructure and naming conventions.

dotnet/maui · 7,172 tokens

maui performance-hotpaths.instructions.md

Instructions for dotnet/maui, covering performance-critical path rules, hot paths in maui, allocation avoidance, caching and invalidation and collection iteration.

dotnet/maui · 441 tokens

maui collectionview-windows.instructions.md

Instructions for dotnet/maui, covering collectionview — windows (items/ handler), winui listview/itemsrepeater patterns, data source and change notifications, layout configuration and cross-platform consistency.

dotnet/maui · 333 tokens

mockserver-monorepo AGENTS.md

AGENTS.md instructions for mock-server/mockserver-monorepo, covering mockserver — agent instructions, instruction priority, project overview, local development environment and project documentation.

mock-server/mockserver-monorepo · 7,398 tokens