@adcp/sdk 12.0.1 → 12.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/lib/index.d.mts +2 -2
  2. package/dist/lib/index.d.ts +2 -2
  3. package/dist/lib/index.d.ts.map +1 -1
  4. package/dist/lib/index.js +2 -0
  5. package/dist/lib/index.js.map +1 -1
  6. package/dist/lib/index.mjs +3 -1
  7. package/dist/lib/index.mjs.map +1 -1
  8. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  9. package/dist/lib/server/adcp-server.d.ts.map +1 -1
  10. package/dist/lib/server/adcp-server.js +18 -0
  11. package/dist/lib/server/adcp-server.js.map +1 -1
  12. package/dist/lib/server/adcp-server.mjs +15 -0
  13. package/dist/lib/server/adcp-server.mjs.map +1 -1
  14. package/dist/lib/server/create-adcp-server.d.mts +24 -0
  15. package/dist/lib/server/create-adcp-server.d.ts +24 -0
  16. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  17. package/dist/lib/server/create-adcp-server.js +24 -2
  18. package/dist/lib/server/create-adcp-server.js.map +1 -1
  19. package/dist/lib/server/create-adcp-server.mjs +29 -2
  20. package/dist/lib/server/create-adcp-server.mjs.map +1 -1
  21. package/dist/lib/server/index.d.mts +3 -1
  22. package/dist/lib/server/index.d.ts +3 -1
  23. package/dist/lib/server/index.d.ts.map +1 -1
  24. package/dist/lib/server/index.js +3 -0
  25. package/dist/lib/server/index.js.map +1 -1
  26. package/dist/lib/server/index.mjs +2 -0
  27. package/dist/lib/server/index.mjs.map +1 -1
  28. package/dist/lib/server/legacy/v5/index.d.mts +1 -1
  29. package/dist/lib/server/legacy/v5/index.d.ts +1 -1
  30. package/dist/lib/server/legacy/v5/index.d.ts.map +1 -1
  31. package/dist/lib/server/legacy/v5/index.js.map +1 -1
  32. package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
  33. package/dist/lib/server/mcp-app.d.mts +57 -0
  34. package/dist/lib/server/mcp-app.d.ts +58 -0
  35. package/dist/lib/server/mcp-app.d.ts.map +1 -0
  36. package/dist/lib/server/mcp-app.js +110 -0
  37. package/dist/lib/server/mcp-app.js.map +1 -0
  38. package/dist/lib/server/mcp-app.mjs +83 -0
  39. package/dist/lib/server/mcp-app.mjs.map +1 -0
  40. package/dist/lib/server/mcp-modern-server.d.ts.map +1 -1
  41. package/dist/lib/server/mcp-modern-server.js +23 -1
  42. package/dist/lib/server/mcp-modern-server.js.map +1 -1
  43. package/dist/lib/server/mcp-modern-server.mjs +24 -1
  44. package/dist/lib/server/mcp-modern-server.mjs.map +1 -1
  45. package/dist/lib/version.d.mts +3 -3
  46. package/dist/lib/version.d.ts +3 -3
  47. package/dist/lib/version.js +3 -3
  48. package/dist/lib/version.js.map +1 -1
  49. package/dist/lib/version.mjs +3 -3
  50. package/dist/lib/version.mjs.map +1 -1
  51. package/docs/guides/BUILD-AN-AGENT.md +70 -0
  52. package/package.json +1 -1
@@ -4,6 +4,7 @@ const ADCP_SDK_SERVER = /* @__PURE__ */ Symbol.for("@adcp/client.sdkServer");
4
4
  const ADCP_STATE_STORE = /* @__PURE__ */ Symbol.for("@adcp/client.stateStore");
5
5
  const ADCP_CAPABILITIES = /* @__PURE__ */ Symbol.for("@adcp/client.capabilities");
6
6
  const ADCP_TOOL_VISIBILITY = /* @__PURE__ */ Symbol.for("@adcp/client.toolVisibility");
7
+ const ADCP_MCP_APP_RESOURCES = /* @__PURE__ */ Symbol.for("@adcp/client.mcpAppResources");
7
8
  function getSdkServer(server) {
8
9
  const candidate = server[ADCP_SDK_SERVER];
9
10
  return candidate;
@@ -11,6 +12,17 @@ function getSdkServer(server) {
11
12
  function setToolVisibilityResolver(server, resolver) {
12
13
  server[ADCP_TOOL_VISIBILITY] = resolver;
13
14
  }
15
+ function setMcpAppResources(server, resources) {
16
+ Object.defineProperty(server, ADCP_MCP_APP_RESOURCES, {
17
+ value: resources,
18
+ enumerable: false,
19
+ configurable: false,
20
+ writable: false
21
+ });
22
+ }
23
+ function listMcpAppResources(server) {
24
+ return server[ADCP_MCP_APP_RESOURCES] ?? [];
25
+ }
14
26
  async function isRegisteredToolVisible(server, options) {
15
27
  const resolver = server[ADCP_TOOL_VISIBILITY];
16
28
  return resolver ? resolver(options) : true;
@@ -145,6 +157,7 @@ function wrapMcpServer(inner, compliance, adcpVersion = ADCP_VERSION) {
145
157
  }
146
158
  export {
147
159
  ADCP_CAPABILITIES,
160
+ ADCP_MCP_APP_RESOURCES,
148
161
  ADCP_SDK_SERVER,
149
162
  ADCP_SERVER_BRAND,
150
163
  ADCP_STATE_STORE,
@@ -154,8 +167,10 @@ export {
154
167
  getSdkServerInstructions,
155
168
  isAdcpServer,
156
169
  isRegisteredToolVisible,
170
+ listMcpAppResources,
157
171
  listRegisteredToolDefinitions,
158
172
  listRegisteredToolNames,
173
+ setMcpAppResources,
159
174
  setSdkServerInstructions,
160
175
  setToolVisibilityResolver,
161
176
  wrapInitializeHandler,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/server/adcp-server.ts"],"sourcesContent":["/**\n * Opaque AdCP server handle.\n *\n * `createAdcpServer()` returns a value typed as `AdcpServer` rather than the\n * underlying `@modelcontextprotocol/sdk` `McpServer`. Two reasons:\n *\n * 1. **Dual-package hazard.** Re-exporting the SDK's `McpServer` type from\n * our public API forces downstream consumers through a specific SDK\n * resolution path (ESM or CJS). When a TypeScript ESM consumer\n * imports `@adcp/sdk` (CJS) and separately imports the SDK (ESM),\n * the two `McpServer` types are structurally identical but distinct\n * — the SDK's private `_serverInfo` field breaks assignment\n * compatibility between them. Owning the type on our side\n * eliminates the hazard: `AdcpServer` resolves the same way for\n * every consumer because it comes from a single package.\n *\n * 2. **Test ergonomics.** Downstream test harnesses have been reaching\n * into `(server as any)._requestHandlers` and\n * `server.server._requestHandlers` to dispatch tool calls in-process.\n * `dispatchTestRequest()` moves that private-field access into a\n * single encapsulated helper so consumers don't have to repeat it.\n *\n * To register additional tools or resources, configure them through\n * `createAdcpServer()`'s domain-grouped handler config. The opaque\n * surface intentionally doesn't expose `registerTool()` — keeping it off the\n * public API lets the framework own tool registration conventions\n * (idempotency, governance, validation, response shape).\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport type { McpToolResponse } from './responses';\nimport { ADCP_VERSION } from '../version';\n\n/**\n * Structural shape of an MCP transport the server can connect to.\n *\n * Matches `@modelcontextprotocol/sdk/shared/transport.js` Transport without\n * importing it — keeping the SDK type off our public API surface.\n * `StreamableHTTPServerTransport`, `StdioServerTransport`, and\n * `InMemoryTransport` from the SDK all satisfy this shape.\n *\n * `message` / callback parameters are typed with `any` (not `unknown`) so\n * SDK-specific transports with narrower message types (JSONRPCMessage) are\n * assignable bi-directionally without forcing downstream consumers to\n * widen their own transport types.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface AdcpServerTransport {\n start(): Promise<void>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n send(message: any, options?: any): Promise<void>;\n close(): Promise<void>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onmessage?: (message: any, extra?: any) => void;\n onclose?: () => void;\n onerror?: (error: Error) => void;\n sessionId?: string;\n setProtocolVersion?: (version: string) => void;\n}\n\n/**\n * Request envelope accepted by `AdcpServer.dispatchTestRequest()`.\n *\n * Mirrors the JSON-RPC method/params shape so tests can target the same\n * methods the transport would — `tools/call`, `tools/list`, etc.\n */\nexport interface AdcpTestRequest {\n method: string;\n params?: Record<string, unknown>;\n}\n\n/**\n * Typed variant of {@link AdcpTestRequest} for `tools/call`. Used by the\n * `dispatchTestRequest` overload that returns a typed `CallToolResult`.\n */\nexport interface AdcpTestToolsCallRequest {\n method: 'tools/call';\n params: { name: string; arguments?: Record<string, unknown> };\n}\n\n/**\n * Response returned by `AdcpServer.dispatchTestRequest()`.\n *\n * The shape depends on the `method` — for `tools/call` this is the\n * `CallToolResult` (content + structuredContent + optional isError);\n * for other methods it's the method-specific result. Left as `unknown`\n * so callers narrow with type guards or schema validation relevant to\n * the specific method they're dispatching.\n */\nexport type AdcpTestResponse = unknown;\n\n/**\n * Auth principal visible to handlers and `resolveAccount`. Mirrors the\n * shape `serve()` produces from its `authenticate` hook, and what the\n * A2A adapter's `authenticate` callback should return.\n */\nexport interface AdcpAuthInfo {\n token: string;\n clientId: string;\n scopes: string[];\n expiresAt?: number;\n extra?: Record<string, unknown>;\n}\n\n/**\n * Optional per-call overrides for `dispatchTestRequest()`. Lets tests\n * simulate transport-level state — most importantly the `authInfo` that\n * `serve()` populates from its `authenticate` hook — without spinning up\n * a real HTTP transport.\n */\nexport interface AdcpTestRequestExtras {\n authInfo?: AdcpAuthInfo;\n sessionId?: string;\n}\n\n/**\n * Arguments accepted by `AdcpServer.invoke()`. A transport adapter (MCP\n * `serve()`, `createA2AAdapter()`, etc.) authenticates the incoming\n * request, maps it to one of the registered AdCP tool names, then calls\n * this surface to run the framework pipeline (idempotency, account\n * resolution, validation, governance, response-union narrowing).\n */\nexport interface AdcpInvokeOptions {\n /** AdCP tool name (`get_products`, `create_media_buy`, ...). */\n toolName: string;\n /** Tool arguments as received from the transport, pre-schema-validation. */\n args: Record<string, unknown>;\n /**\n * Auth principal the transport produced from its `authenticate` hook.\n * Handlers and `resolveAccount` see it as `ctx.authInfo`. Transports\n * MUST verify the principal before calling `invoke()` — `invoke()`\n * does NOT re-check the token.\n */\n authInfo?: AdcpAuthInfo;\n /** Abort signal for cancellation; defaults to a fresh controller. */\n signal?: AbortSignal;\n}\n\n/**\n * Test-harness hooks attached to every `AdcpServer`. Namespaced under\n * `compliance` so production code paths don't accidentally reach for\n * them — `reset()` drops cached state and is intended for storyboard\n * runners that exercise many scenarios in one process.\n */\nexport interface AdcpServerComplianceApi {\n /**\n * Drop session state and the idempotency cache so subsequent\n * storyboards don't inherit plans, media buys, or cached replies from\n * earlier runs. Conformance storyboards share brand domains across\n * test kits — without this hook, a $10K governance plan seeded by\n * `media_buy_seller/governance_denied` would intercept a $50K buy in\n * `sales_guaranteed`.\n *\n * Refuses to run by default unless BOTH guardrails hold:\n * - `NODE_ENV !== 'production'` (opt out with `allowProduction: true`)\n * - The configured stores are the in-memory SDK defaults\n * (`InMemoryStateStore` + memory idempotency backend). Opt out\n * with `force: true` when you've wired a disposable test\n * Postgres cluster and know the flush is safe.\n *\n * The two flags are independent on purpose: `force` lets you flush\n * a non-memory store you've verified is a test DB, WITHOUT also\n * opening the door to running against a production `NODE_ENV`.\n * Same the other way: `allowProduction` lets you run in a prod-\n * labeled CI environment against memory stores, without bypassing\n * the store-shape safety check.\n */\n reset(options?: { force?: boolean; allowProduction?: boolean }): Promise<void>;\n}\n\n/**\n * Phantom brand for {@link AdcpServer}. Makes the type nominal — a plain\n * object that has the same methods structurally cannot be assigned to\n * `AdcpServer` because it lacks this symbol-keyed property. Closes the\n * door on `(plainObject as AdcpServer).registerTool(...)` patterns that\n * tried to reach for an MCP-SDK method the framework intentionally\n * doesn't expose.\n *\n * The brand is `never`-typed and never set on the runtime object, so\n * `Object.getOwnPropertySymbols(server)` won't expose it — only the\n * wrapper produced by `createAdcpServer()` carries the type-level\n * signature, via the `as AdcpServerInternal` cast in `wrapMcpServer()`.\n *\n * Must be a real (non-`declare`) const so the d.ts emit retains it. An\n * `export declare const X: unique symbol` in a `.ts` source file does\n * not survive emit — the binding gets dropped from the published d.ts\n * while consumers (the public `AdcpServer` interface) keep referencing\n * it, which produces `TS2304: Cannot find name 'ADCP_SERVER_BRAND'` on\n * any adopter `tsc --noEmit` against `@adcp/sdk/server` (issue #1236).\n */\nexport const ADCP_SERVER_BRAND: unique symbol = Symbol('ADCP_SERVER_BRAND');\n\n/**\n * Opaque handle returned by `createAdcpServer()`.\n *\n * Pass to `serve()` to mount on an HTTP transport, or use\n * `dispatchTestRequest()` from a test harness to exercise handlers\n * in-process without opening a socket.\n */\nexport interface AdcpServer {\n /**\n * Phantom brand — type-level only, never present at runtime. See\n * {@link ADCP_SERVER_BRAND}. Tagged `never` so `(x as AdcpServer)`\n * casts from structurally-similar objects fail; a real `AdcpServer`\n * is only obtainable via `createAdcpServer()`.\n */\n readonly [ADCP_SERVER_BRAND]?: never;\n\n /**\n * Connect the server to an MCP transport.\n *\n * Takes ownership of the transport — any callbacks previously\n * registered on it are replaced. Matches the semantics of the SDK's\n * `McpServer.connect()`.\n */\n connect(transport: AdcpServerTransport): Promise<void>;\n\n /** Close the server and release resources. */\n close(): Promise<void>;\n\n /**\n * Test-harness hooks — see {@link AdcpServerComplianceApi}. Not\n * intended for production call sites; production code paths should\n * use `close()` to release resources.\n */\n readonly compliance: AdcpServerComplianceApi;\n\n /**\n * Invoke a registered handler in-process and return its response.\n *\n * Bypasses the transport layer — no sockets, no JSON-RPC framing.\n * Intended for test harnesses only; production callers should go\n * through a transport so protocol invariants (request ID linking,\n * task progress, notifications) are enforced.\n *\n * Throws when no handler is registered for the requested method,\n * or when a `tools/call` request targets an unknown tool. Arguments\n * default to `{}` when `params.arguments` is omitted — a validation\n * error from the tool's input schema (not from dispatch) is the\n * expected failure mode for a missing required field.\n *\n * **Never mount this behind an HTTP route.** `extras.authInfo` is\n * written directly onto the MCP handler's `extra` without any check\n * against `serve({ authenticate })` — exposing it externally lets a\n * caller impersonate any principal. This API is for in-process test\n * harnesses and storyboard runners only.\n *\n * @example\n * ```typescript\n * const result = await server.dispatchTestRequest({\n * method: 'tools/call',\n * params: {\n * name: 'get_products',\n * arguments: { brief: 'premium sports inventory' },\n * },\n * });\n * ```\n */\n dispatchTestRequest(request: AdcpTestToolsCallRequest, extras?: AdcpTestRequestExtras): Promise<CallToolResult>;\n dispatchTestRequest(request: AdcpTestRequest, extras?: AdcpTestRequestExtras): Promise<AdcpTestResponse>;\n\n /**\n * Production-safe tool invocation surface for transport adapters.\n *\n * Runs the full framework pipeline against a registered tool:\n * request schema validation → account resolution → idempotency →\n * handler dispatch → response narrowing → response validation.\n * Returns the same `McpToolResponse` envelope the MCP transport\n * observes — a transport adapter layers its own protocol framing on\n * top (JSON-RPC result for MCP, A2A `Task` artifact for A2A, etc.).\n *\n * **Auth is the caller's responsibility.** `invoke()` forwards the\n * provided `authInfo` verbatim to handlers and `resolveAccount`\n * without re-verifying. Mount it only behind a transport that has\n * already authenticated the principal (e.g. `serve({ authenticate })`\n * for MCP, `createA2AAdapter({ authenticate })` for A2A). Do not call\n * it directly from an HTTP handler — that path skips auth.\n *\n * For in-process tests that want to synthesize an `authInfo` without\n * running a transport, reach for {@link dispatchTestRequest} instead\n * — it takes the same principal shape but is explicitly marked\n * test-only in its docstring.\n *\n * Throws when `toolName` is not registered; schema errors round-trip\n * as structured `VALIDATION_ERROR` envelopes inside the return value.\n */\n invoke(options: AdcpInvokeOptions): Promise<McpToolResponse>;\n\n /**\n * Returns the AdCP protocol version this server is configured to speak.\n *\n * Defaults to {@link ADCP_VERSION} (the GA version the SDK ships against)\n * unless overridden via `createAdcpServer({ adcpVersion })`. This is the\n * protocol version, **not** the publisher's app version (`config.version`).\n *\n * Plumbing surface — Stage 2 of the multi-version refactor exposes the\n * configured value but does not yet vary validator/schema selection by\n * version. Wire-shape adapters key off this getter in subsequent stages.\n */\n getAdcpVersion(): string;\n}\n\n/**\n * Symbol-keyed accessor for the underlying SDK `McpServer`. Used by\n * `serve()` to reach through the opaque wrapper when SDK-specific\n * operations are needed. Not part of the public API — typed on a\n * separate internal interface so downstream consumers can't discover\n * it through the `AdcpServer` type.\n *\n * @internal\n */\nexport const ADCP_SDK_SERVER: unique symbol = Symbol.for('@adcp/client.sdkServer');\n\n/**\n * Symbol-keyed accessor for the state store backing an `AdcpServer`.\n * Test harnesses and helpers like\n * `@adcp/sdk/compliance-fixtures`'s `seedComplianceFixtures` need\n * to reach the store without widening the public `AdcpServer`\n * interface (handlers already get `ctx.store`; production code paths\n * don't need a second accessor).\n *\n * @internal\n */\nexport const ADCP_STATE_STORE: unique symbol = Symbol.for('@adcp/client.stateStore');\n\n/**\n * Symbol-keyed accessor for the capabilities object `createAdcpServer`\n * assembles and the auto-wired `get_adcp_capabilities` handler reads from.\n * Mutating this object mutates what subsequent capability-discovery calls\n * return — `registerTestController` uses this to add a\n * `compliance_testing` capability block after registration so the server\n * advertises its controller scenarios even though `registerTestController`\n * runs after `createAdcpServer`.\n *\n * @internal\n */\nexport const ADCP_CAPABILITIES: unique symbol = Symbol.for('@adcp/client.capabilities');\n\n/** Per-request tool visibility policy consumed by transport adapters. @internal */\nexport const ADCP_TOOL_VISIBILITY: unique symbol = Symbol.for('@adcp/client.toolVisibility');\n\n/** @internal */\nexport type AdcpToolVisibilityResolver = (options: {\n toolName: string;\n authInfo?: AdcpAuthInfo;\n input?: Readonly<Record<string, unknown>>;\n}) => boolean | Promise<boolean>;\n\n/** @internal */\nexport interface AdcpServerInternal extends AdcpServer {\n readonly [ADCP_SDK_SERVER]: McpServer;\n [ADCP_TOOL_VISIBILITY]?: AdcpToolVisibilityResolver;\n}\n\n/**\n * Return the underlying `McpServer` for a wrapped `AdcpServer`, or\n * `undefined` if the value is not an `AdcpServer` produced by\n * `createAdcpServer()`.\n *\n * @internal\n */\nexport function getSdkServer(server: AdcpServer | McpServer): McpServer | undefined {\n const candidate = (server as unknown as Partial<AdcpServerInternal>)[ADCP_SDK_SERVER];\n return candidate;\n}\n\n/** Attach a transport-independent per-request tool visibility policy. @internal */\nexport function setToolVisibilityResolver(server: AdcpServer, resolver: AdcpToolVisibilityResolver): void {\n (server as AdcpServerInternal)[ADCP_TOOL_VISIBILITY] = resolver;\n}\n\n/** Resolve whether a registered tool may be exposed to this request. @internal */\nexport async function isRegisteredToolVisible(\n server: AdcpServer,\n options: Parameters<AdcpToolVisibilityResolver>[0]\n): Promise<boolean> {\n const resolver = (server as AdcpServerInternal)[ADCP_TOOL_VISIBILITY];\n return resolver ? resolver(options) : true;\n}\n\n/**\n * True when `value` is an `AdcpServer` produced by `createAdcpServer()`.\n *\n * @internal\n */\nexport function isAdcpServer(value: unknown): value is AdcpServerInternal {\n return (\n value != null &&\n typeof value === 'object' &&\n ADCP_SDK_SERVER in (value as Record<PropertyKey, unknown>) &&\n typeof (value as AdcpServer).dispatchTestRequest === 'function'\n );\n}\n\n// ---------------------------------------------------------------------------\n// Private-field access — centralized\n// ---------------------------------------------------------------------------\n//\n// The MCP SDK marks `_requestHandlers` and `_registeredTools` as private.\n// Dispatching a request in-process from a test needs them. Doing it once\n// here means downstream harnesses don't each repeat the (server as any)\n// dance, which is the whole point of exposing `dispatchTestRequest()`.\n//\n// If/when the SDK ships a public in-process dispatch API, swap these two\n// helpers for that API. The AdcpServer surface stays the same.\n\ninterface RegisteredTool {\n title?: string;\n description?: string;\n inputSchema?: unknown;\n outputSchema?: unknown;\n annotations?: unknown;\n _meta?: Record<string, unknown>;\n enabled?: boolean;\n handler: (args: unknown, extra: unknown) => unknown | Promise<unknown>;\n}\n\ninterface McpServerPrivates {\n _registeredTools?: Record<string, RegisteredTool | undefined>;\n server?: {\n _requestHandlers?: Map<\n string,\n (request: { method: string; params?: unknown }, extra: unknown) => unknown | Promise<unknown>\n >;\n _serverInfo?: { name: string; version: string; [key: string]: unknown };\n _instructions?: string;\n };\n}\n\n/** Tool metadata needed to mirror the registered AdCP surface into another official MCP transport. @internal */\nexport interface RegisteredToolDefinition {\n name: string;\n title?: string;\n description?: string;\n inputSchema?: unknown;\n outputSchema?: unknown;\n annotations?: unknown;\n _meta?: Record<string, unknown>;\n}\n\n/** @internal */\ntype McpRequestHandler = (request: { method: string; params?: unknown }, extra: unknown) => unknown | Promise<unknown>;\n\n/**\n * Write the instructions string onto the low-level SDK server backing\n * `mcpServer`. Called by the async-function-form instructions hook to\n * inject the resolved string just before the MCP `initialize` response.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function setSdkServerInstructions(mcpServer: McpServer, value: string | undefined): void {\n const priv = mcpServer as unknown as McpServerPrivates;\n if (priv.server) {\n priv.server._instructions = value;\n }\n}\n\n/**\n * Wrap the `initialize` request handler on `mcpServer` so that `wrapper`\n * runs (and can await async work) before the original handler responds.\n * The wrapper receives the original handler as its first argument and must\n * call it to complete the handshake.\n *\n * The wrapper is invoked once per MCP `initialize` call on this server\n * instance. Under `serve({ reuseAgent: false })` the server is created\n * fresh per request, so the wrapper fires once per session. Under\n * `reuseAgent: true` the `ADCP_INSTRUCTIONS_FN` check in `serve.ts`\n * blocks the combination before the wrapper can be called a second time.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function wrapInitializeHandler(\n mcpServer: McpServer,\n wrapper: (\n origHandler: McpRequestHandler,\n req: { method: string; params?: unknown },\n extra: unknown\n ) => unknown | Promise<unknown>\n): void {\n const priv = mcpServer as unknown as McpServerPrivates;\n const handlers = priv.server?._requestHandlers;\n if (!handlers) return;\n const orig = handlers.get('initialize');\n if (!orig) return;\n handlers.set('initialize', (req, extra) => wrapper(orig, req, extra));\n}\n\nfunction getRegisteredTool(server: McpServer, name: string): RegisteredTool | undefined {\n return (server as unknown as McpServerPrivates)._registeredTools?.[name];\n}\n\n/**\n * Wrap a registered MCP tool handler without changing the tool definition\n * advertised by the SDK server.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function wrapRegisteredToolHandler(\n server: McpServer,\n name: string,\n wrapper: (orig: RegisteredTool['handler'], args: unknown, extra: unknown) => unknown | Promise<unknown>\n): boolean {\n const tool = getRegisteredTool(server, name);\n if (!tool) return false;\n const orig = tool.handler;\n tool.handler = (args, extra) => wrapper(orig, args, extra);\n return true;\n}\n\n/**\n * Enumerate the tool names registered on the underlying SDK server.\n * Used by transport adapters that need to derive discovery metadata\n * (agent cards, capability listings) from the registered surface\n * without reaching into private SDK fields at every call site.\n *\n * @internal\n */\nexport function listRegisteredToolNames(server: McpServer): string[] {\n const registered = (server as unknown as McpServerPrivates)._registeredTools ?? {};\n return Object.keys(registered);\n}\n\n/**\n * Return enabled registered-tool metadata for the modern MCP server adapter.\n * Handler functions stay private; the adapter dispatches through\n * {@link AdcpServer.invoke} so the framework pipeline remains authoritative.\n *\n * @internal\n */\nexport function listRegisteredToolDefinitions(server: McpServer): RegisteredToolDefinition[] {\n const registered = (server as unknown as McpServerPrivates)._registeredTools ?? {};\n return Object.entries(registered).flatMap(([name, tool]) => {\n if (!tool || tool.enabled === false) return [];\n return [\n {\n name,\n ...(tool.title !== undefined && { title: tool.title }),\n ...(tool.description !== undefined && { description: tool.description }),\n ...(tool.inputSchema !== undefined && { inputSchema: tool.inputSchema }),\n ...(tool.outputSchema !== undefined && { outputSchema: tool.outputSchema }),\n ...(tool.annotations !== undefined && { annotations: tool.annotations }),\n ...(tool._meta !== undefined && { _meta: tool._meta }),\n },\n ];\n });\n}\n\n/** Return the SDK server identity advertised during MCP discovery. @internal */\nexport function getSdkServerInfo(server: McpServer): { name: string; version: string; [key: string]: unknown } {\n return (\n (server as unknown as McpServerPrivates).server?._serverInfo ?? {\n name: 'AdCP Server',\n version: 'unknown',\n }\n );\n}\n\n/** Return static or already-resolved server instructions. @internal */\nexport function getSdkServerInstructions(server: McpServer): string | undefined {\n return (server as unknown as McpServerPrivates).server?._instructions;\n}\n\nfunction getRequestHandler(\n server: McpServer,\n method: string\n): ((request: { method: string; params?: unknown }, extra: unknown) => unknown | Promise<unknown>) | undefined {\n return (server as unknown as McpServerPrivates).server?._requestHandlers?.get(method);\n}\n\n/**\n * Wrap an SDK request handler such as `tools/list` while preserving the\n * original handler's request/extra contract.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function wrapSdkRequestHandler(\n server: McpServer,\n method: string,\n wrapper: (\n orig: McpRequestHandler,\n req: { method: string; params?: unknown },\n extra: unknown\n ) => unknown | Promise<unknown>\n): boolean {\n const handlers = (server as unknown as McpServerPrivates).server?._requestHandlers;\n const orig = handlers?.get(method);\n if (!handlers || !orig) return false;\n handlers.set(method, (req, extra) => wrapper(orig, req, extra));\n return true;\n}\n\n/**\n * Wrap an SDK `McpServer` into the opaque `AdcpServer` handle returned by\n * `createAdcpServer()`. Consumers should prefer `createAdcpServer()` and\n * treat this as an internal utility; it's exported for framework code\n * that needs to produce an `AdcpServer` around a hand-built server.\n *\n * Idempotent — passing an already-wrapped `AdcpServer` returns it\n * unchanged rather than nesting wrappers (which would leave\n * `ADCP_SDK_SERVER` pointing at the outer wrapper instead of the SDK\n * handle and break `getSdkServer()` round-trips).\n *\n * @internal\n */\nexport function wrapMcpServer(\n inner: McpServer | AdcpServerInternal,\n compliance?: AdcpServerComplianceApi,\n adcpVersion: string = ADCP_VERSION\n): AdcpServerInternal {\n if (isAdcpServer(inner)) return inner;\n const mcp = inner as McpServer;\n const resolvedCompliance: AdcpServerComplianceApi = compliance ?? {\n async reset() {\n throw new Error(\n 'AdcpServer.compliance.reset: no-op handle returned by `wrapMcpServer` without a compliance implementation. ' +\n 'Use `createAdcpServer()` to get a server whose `compliance.reset()` flushes the state and idempotency stores.'\n );\n },\n };\n const dispatch = async (request: AdcpTestRequest, extras?: AdcpTestRequestExtras): Promise<AdcpTestResponse> => {\n const extra: { signal: AbortSignal; authInfo?: AdcpTestRequestExtras['authInfo']; sessionId?: string } = {\n signal: new AbortController().signal,\n };\n if (extras?.authInfo) extra.authInfo = extras.authInfo;\n if (extras?.sessionId) extra.sessionId = extras.sessionId;\n\n if (request.method === 'tools/call') {\n const params = (request.params ?? {}) as { name?: string; arguments?: Record<string, unknown> };\n if (typeof params.name !== 'string') {\n throw new Error(\"dispatchTestRequest: 'tools/call' requires params.name (string)\");\n }\n const tool = getRegisteredTool(mcp, params.name);\n if (!tool) {\n throw new Error(`dispatchTestRequest: tool \"${params.name}\" is not registered`);\n }\n return tool.handler(params.arguments ?? {}, extra);\n }\n\n const handler = getRequestHandler(mcp, request.method);\n if (!handler) {\n throw new Error(`dispatchTestRequest: no handler registered for method \"${request.method}\"`);\n }\n return handler({ method: request.method, params: request.params ?? {} }, extra);\n };\n const invoke = async (options: AdcpInvokeOptions): Promise<McpToolResponse> => {\n const tool = getRegisteredTool(mcp, options.toolName);\n if (!tool) {\n throw new Error(`AdcpServer.invoke: tool \"${options.toolName}\" is not registered`);\n }\n const extra: { signal: AbortSignal; authInfo?: AdcpAuthInfo } = {\n signal: options.signal ?? new AbortController().signal,\n };\n if (options.authInfo) extra.authInfo = options.authInfo;\n return (await tool.handler(options.args, extra)) as McpToolResponse;\n };\n const wrapper: AdcpServerInternal = {\n [ADCP_SDK_SERVER]: mcp,\n connect(transport) {\n // The SDK's Transport interface is structurally compatible with\n // AdcpServerTransport — the cast is boundary-crossing, not lossy.\n return mcp.connect(transport as unknown as Parameters<McpServer['connect']>[0]);\n },\n close() {\n return mcp.close();\n },\n compliance: resolvedCompliance,\n // Satisfies both overloads (typed tools/call + generic fallback) — the\n // runtime dispatcher is a single function that narrows by method.\n dispatchTestRequest: dispatch as AdcpServerInternal['dispatchTestRequest'],\n invoke,\n getAdcpVersion: () => adcpVersion,\n };\n return wrapper;\n}\n"],"mappings":"AAgCA,SAAS,oBAAoB;AA+JtB,MAAM,oBAAmC,uBAAO,mBAAmB;AAyHnE,MAAM,kBAAiC,uBAAO,IAAI,wBAAwB;AAY1E,MAAM,mBAAkC,uBAAO,IAAI,yBAAyB;AAa5E,MAAM,oBAAmC,uBAAO,IAAI,2BAA2B;AAG/E,MAAM,uBAAsC,uBAAO,IAAI,6BAA6B;AAsBpF,SAAS,aAAa,QAAuD;AAClF,QAAM,YAAa,OAAkD,eAAe;AACpF,SAAO;AACT;AAGO,SAAS,0BAA0B,QAAoB,UAA4C;AACxG,EAAC,OAA8B,oBAAoB,IAAI;AACzD;AAGA,eAAsB,wBACpB,QACA,SACkB;AAClB,QAAM,WAAY,OAA8B,oBAAoB;AACpE,SAAO,WAAW,SAAS,OAAO,IAAI;AACxC;AAOO,SAAS,aAAa,OAA6C;AACxE,SACE,SAAS,QACT,OAAO,UAAU,YACjB,mBAAoB,SACpB,OAAQ,MAAqB,wBAAwB;AAEzD;AA2DO,SAAS,yBAAyB,WA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;AAC/C,UAAI,CAAC,MAAM;AACT,cAAM,IAAI,MAAM,8BAA8B,OAAO,IAAI,qBAAqB;AAAA,MAChF;AACA,aAAO,KAAK,QAAQ,OAAO,aAAa,CAAC,GAAG,KAAK;AAAA,IACnD;AAEA,UAAM,UAAU,kBAAkB,KAAK,QAAQ,MAAM;AACrD,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,MAAM,0DAA0D,QAAQ,MAAM,GAAG;AAAA,IAC7F;AACA,WAAO,QAAQ,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,QAAQ,UAAU,CAAC,EAAE,GAAG,KAAK;AAAA,EAChF;AACA,QAAM,SAAS,OAAO,YAAyD;AAC7E,UAAM,OAAO,kBAAkB,KAAK,QAAQ,QAAQ;AACpD,QAAI,CAAC,MAAM;AACT,YAAM,IAAI,MAAM,4BAA4B,QAAQ,QAAQ,qBAAqB;AAAA,IACnF;AACA,UAAM,QAA0D;AAAA,MAC9D,QAAQ,QAAQ,UAAU,IAAI,gBAAgB,EAAE;AAAA,IAClD;AACA,QAAI,QAAQ,SAAU,OAAM,WAAW,QAAQ;AAC/C,WAAQ,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;AAAA,EAChD;AACA,QAAM,UAA8B;AAAA,IAClC,CAAC,eAAe,GAAG;AAAA,IACnB,QAAQ,WAAW;AAGjB,aAAO,IAAI,QAAQ,SAA2D;AAAA,IAChF;AAAA,IACA,QAAQ;AACN,aAAO,IAAI,MAAM;AAAA,IACnB;AAAA,IACA,YAAY;AAAA;AAAA;AAAA,IAGZ,qBAAqB;AAAA,IACrB;AAAA,IACA,gBAAgB,MAAM;AAAA,EACxB;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/server/adcp-server.ts"],"sourcesContent":["/**\n * Opaque AdCP server handle.\n *\n * `createAdcpServer()` returns a value typed as `AdcpServer` rather than the\n * underlying `@modelcontextprotocol/sdk` `McpServer`. Two reasons:\n *\n * 1. **Dual-package hazard.** Re-exporting the SDK's `McpServer` type from\n * our public API forces downstream consumers through a specific SDK\n * resolution path (ESM or CJS). When a TypeScript ESM consumer\n * imports `@adcp/sdk` (CJS) and separately imports the SDK (ESM),\n * the two `McpServer` types are structurally identical but distinct\n * — the SDK's private `_serverInfo` field breaks assignment\n * compatibility between them. Owning the type on our side\n * eliminates the hazard: `AdcpServer` resolves the same way for\n * every consumer because it comes from a single package.\n *\n * 2. **Test ergonomics.** Downstream test harnesses have been reaching\n * into `(server as any)._requestHandlers` and\n * `server.server._requestHandlers` to dispatch tool calls in-process.\n * `dispatchTestRequest()` moves that private-field access into a\n * single encapsulated helper so consumers don't have to repeat it.\n *\n * To register additional tools or resources, configure them through\n * `createAdcpServer()`'s domain-grouped handler config. The opaque\n * surface intentionally doesn't expose `registerTool()` — keeping it off the\n * public API lets the framework own tool registration conventions\n * (idempotency, governance, validation, response shape).\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport type { McpToolResponse } from './responses';\nimport type { AdcpMcpResourceDefinition } from './mcp-app';\nimport { ADCP_VERSION } from '../version';\n\n/**\n * Structural shape of an MCP transport the server can connect to.\n *\n * Matches `@modelcontextprotocol/sdk/shared/transport.js` Transport without\n * importing it — keeping the SDK type off our public API surface.\n * `StreamableHTTPServerTransport`, `StdioServerTransport`, and\n * `InMemoryTransport` from the SDK all satisfy this shape.\n *\n * `message` / callback parameters are typed with `any` (not `unknown`) so\n * SDK-specific transports with narrower message types (JSONRPCMessage) are\n * assignable bi-directionally without forcing downstream consumers to\n * widen their own transport types.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface AdcpServerTransport {\n start(): Promise<void>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n send(message: any, options?: any): Promise<void>;\n close(): Promise<void>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onmessage?: (message: any, extra?: any) => void;\n onclose?: () => void;\n onerror?: (error: Error) => void;\n sessionId?: string;\n setProtocolVersion?: (version: string) => void;\n}\n\n/**\n * Request envelope accepted by `AdcpServer.dispatchTestRequest()`.\n *\n * Mirrors the JSON-RPC method/params shape so tests can target the same\n * methods the transport would — `tools/call`, `tools/list`, etc.\n */\nexport interface AdcpTestRequest {\n method: string;\n params?: Record<string, unknown>;\n}\n\n/**\n * Typed variant of {@link AdcpTestRequest} for `tools/call`. Used by the\n * `dispatchTestRequest` overload that returns a typed `CallToolResult`.\n */\nexport interface AdcpTestToolsCallRequest {\n method: 'tools/call';\n params: { name: string; arguments?: Record<string, unknown> };\n}\n\n/**\n * Response returned by `AdcpServer.dispatchTestRequest()`.\n *\n * The shape depends on the `method` — for `tools/call` this is the\n * `CallToolResult` (content + structuredContent + optional isError);\n * for other methods it's the method-specific result. Left as `unknown`\n * so callers narrow with type guards or schema validation relevant to\n * the specific method they're dispatching.\n */\nexport type AdcpTestResponse = unknown;\n\n/**\n * Auth principal visible to handlers and `resolveAccount`. Mirrors the\n * shape `serve()` produces from its `authenticate` hook, and what the\n * A2A adapter's `authenticate` callback should return.\n */\nexport interface AdcpAuthInfo {\n token: string;\n clientId: string;\n scopes: string[];\n expiresAt?: number;\n extra?: Record<string, unknown>;\n}\n\n/**\n * Optional per-call overrides for `dispatchTestRequest()`. Lets tests\n * simulate transport-level state — most importantly the `authInfo` that\n * `serve()` populates from its `authenticate` hook — without spinning up\n * a real HTTP transport.\n */\nexport interface AdcpTestRequestExtras {\n authInfo?: AdcpAuthInfo;\n sessionId?: string;\n}\n\n/**\n * Arguments accepted by `AdcpServer.invoke()`. A transport adapter (MCP\n * `serve()`, `createA2AAdapter()`, etc.) authenticates the incoming\n * request, maps it to one of the registered AdCP tool names, then calls\n * this surface to run the framework pipeline (idempotency, account\n * resolution, validation, governance, response-union narrowing).\n */\nexport interface AdcpInvokeOptions {\n /** AdCP tool name (`get_products`, `create_media_buy`, ...). */\n toolName: string;\n /** Tool arguments as received from the transport, pre-schema-validation. */\n args: Record<string, unknown>;\n /**\n * Auth principal the transport produced from its `authenticate` hook.\n * Handlers and `resolveAccount` see it as `ctx.authInfo`. Transports\n * MUST verify the principal before calling `invoke()` — `invoke()`\n * does NOT re-check the token.\n */\n authInfo?: AdcpAuthInfo;\n /** Abort signal for cancellation; defaults to a fresh controller. */\n signal?: AbortSignal;\n}\n\n/**\n * Test-harness hooks attached to every `AdcpServer`. Namespaced under\n * `compliance` so production code paths don't accidentally reach for\n * them — `reset()` drops cached state and is intended for storyboard\n * runners that exercise many scenarios in one process.\n */\nexport interface AdcpServerComplianceApi {\n /**\n * Drop session state and the idempotency cache so subsequent\n * storyboards don't inherit plans, media buys, or cached replies from\n * earlier runs. Conformance storyboards share brand domains across\n * test kits — without this hook, a $10K governance plan seeded by\n * `media_buy_seller/governance_denied` would intercept a $50K buy in\n * `sales_guaranteed`.\n *\n * Refuses to run by default unless BOTH guardrails hold:\n * - `NODE_ENV !== 'production'` (opt out with `allowProduction: true`)\n * - The configured stores are the in-memory SDK defaults\n * (`InMemoryStateStore` + memory idempotency backend). Opt out\n * with `force: true` when you've wired a disposable test\n * Postgres cluster and know the flush is safe.\n *\n * The two flags are independent on purpose: `force` lets you flush\n * a non-memory store you've verified is a test DB, WITHOUT also\n * opening the door to running against a production `NODE_ENV`.\n * Same the other way: `allowProduction` lets you run in a prod-\n * labeled CI environment against memory stores, without bypassing\n * the store-shape safety check.\n */\n reset(options?: { force?: boolean; allowProduction?: boolean }): Promise<void>;\n}\n\n/**\n * Phantom brand for {@link AdcpServer}. Makes the type nominal — a plain\n * object that has the same methods structurally cannot be assigned to\n * `AdcpServer` because it lacks this symbol-keyed property. Closes the\n * door on `(plainObject as AdcpServer).registerTool(...)` patterns that\n * tried to reach for an MCP-SDK method the framework intentionally\n * doesn't expose.\n *\n * The brand is `never`-typed and never set on the runtime object, so\n * `Object.getOwnPropertySymbols(server)` won't expose it — only the\n * wrapper produced by `createAdcpServer()` carries the type-level\n * signature, via the `as AdcpServerInternal` cast in `wrapMcpServer()`.\n *\n * Must be a real (non-`declare`) const so the d.ts emit retains it. An\n * `export declare const X: unique symbol` in a `.ts` source file does\n * not survive emit — the binding gets dropped from the published d.ts\n * while consumers (the public `AdcpServer` interface) keep referencing\n * it, which produces `TS2304: Cannot find name 'ADCP_SERVER_BRAND'` on\n * any adopter `tsc --noEmit` against `@adcp/sdk/server` (issue #1236).\n */\nexport const ADCP_SERVER_BRAND: unique symbol = Symbol('ADCP_SERVER_BRAND');\n\n/**\n * Opaque handle returned by `createAdcpServer()`.\n *\n * Pass to `serve()` to mount on an HTTP transport, or use\n * `dispatchTestRequest()` from a test harness to exercise handlers\n * in-process without opening a socket.\n */\nexport interface AdcpServer {\n /**\n * Phantom brand — type-level only, never present at runtime. See\n * {@link ADCP_SERVER_BRAND}. Tagged `never` so `(x as AdcpServer)`\n * casts from structurally-similar objects fail; a real `AdcpServer`\n * is only obtainable via `createAdcpServer()`.\n */\n readonly [ADCP_SERVER_BRAND]?: never;\n\n /**\n * Connect the server to an MCP transport.\n *\n * Takes ownership of the transport — any callbacks previously\n * registered on it are replaced. Matches the semantics of the SDK's\n * `McpServer.connect()`.\n */\n connect(transport: AdcpServerTransport): Promise<void>;\n\n /** Close the server and release resources. */\n close(): Promise<void>;\n\n /**\n * Test-harness hooks — see {@link AdcpServerComplianceApi}. Not\n * intended for production call sites; production code paths should\n * use `close()` to release resources.\n */\n readonly compliance: AdcpServerComplianceApi;\n\n /**\n * Invoke a registered handler in-process and return its response.\n *\n * Bypasses the transport layer — no sockets, no JSON-RPC framing.\n * Intended for test harnesses only; production callers should go\n * through a transport so protocol invariants (request ID linking,\n * task progress, notifications) are enforced.\n *\n * Throws when no handler is registered for the requested method,\n * or when a `tools/call` request targets an unknown tool. Arguments\n * default to `{}` when `params.arguments` is omitted — a validation\n * error from the tool's input schema (not from dispatch) is the\n * expected failure mode for a missing required field.\n *\n * **Never mount this behind an HTTP route.** `extras.authInfo` is\n * written directly onto the MCP handler's `extra` without any check\n * against `serve({ authenticate })` — exposing it externally lets a\n * caller impersonate any principal. This API is for in-process test\n * harnesses and storyboard runners only.\n *\n * @example\n * ```typescript\n * const result = await server.dispatchTestRequest({\n * method: 'tools/call',\n * params: {\n * name: 'get_products',\n * arguments: { brief: 'premium sports inventory' },\n * },\n * });\n * ```\n */\n dispatchTestRequest(request: AdcpTestToolsCallRequest, extras?: AdcpTestRequestExtras): Promise<CallToolResult>;\n dispatchTestRequest(request: AdcpTestRequest, extras?: AdcpTestRequestExtras): Promise<AdcpTestResponse>;\n\n /**\n * Production-safe tool invocation surface for transport adapters.\n *\n * Runs the full framework pipeline against a registered tool:\n * request schema validation → account resolution → idempotency →\n * handler dispatch → response narrowing → response validation.\n * Returns the same `McpToolResponse` envelope the MCP transport\n * observes — a transport adapter layers its own protocol framing on\n * top (JSON-RPC result for MCP, A2A `Task` artifact for A2A, etc.).\n *\n * **Auth is the caller's responsibility.** `invoke()` forwards the\n * provided `authInfo` verbatim to handlers and `resolveAccount`\n * without re-verifying. Mount it only behind a transport that has\n * already authenticated the principal (e.g. `serve({ authenticate })`\n * for MCP, `createA2AAdapter({ authenticate })` for A2A). Do not call\n * it directly from an HTTP handler — that path skips auth.\n *\n * For in-process tests that want to synthesize an `authInfo` without\n * running a transport, reach for {@link dispatchTestRequest} instead\n * — it takes the same principal shape but is explicitly marked\n * test-only in its docstring.\n *\n * Throws when `toolName` is not registered; schema errors round-trip\n * as structured `VALIDATION_ERROR` envelopes inside the return value.\n */\n invoke(options: AdcpInvokeOptions): Promise<McpToolResponse>;\n\n /**\n * Returns the AdCP protocol version this server is configured to speak.\n *\n * Defaults to {@link ADCP_VERSION} (the GA version the SDK ships against)\n * unless overridden via `createAdcpServer({ adcpVersion })`. This is the\n * protocol version, **not** the publisher's app version (`config.version`).\n *\n * Plumbing surface — Stage 2 of the multi-version refactor exposes the\n * configured value but does not yet vary validator/schema selection by\n * version. Wire-shape adapters key off this getter in subsequent stages.\n */\n getAdcpVersion(): string;\n}\n\n/**\n * Symbol-keyed accessor for the underlying SDK `McpServer`. Used by\n * `serve()` to reach through the opaque wrapper when SDK-specific\n * operations are needed. Not part of the public API — typed on a\n * separate internal interface so downstream consumers can't discover\n * it through the `AdcpServer` type.\n *\n * @internal\n */\nexport const ADCP_SDK_SERVER: unique symbol = Symbol.for('@adcp/client.sdkServer');\n\n/**\n * Symbol-keyed accessor for the state store backing an `AdcpServer`.\n * Test harnesses and helpers like\n * `@adcp/sdk/compliance-fixtures`'s `seedComplianceFixtures` need\n * to reach the store without widening the public `AdcpServer`\n * interface (handlers already get `ctx.store`; production code paths\n * don't need a second accessor).\n *\n * @internal\n */\nexport const ADCP_STATE_STORE: unique symbol = Symbol.for('@adcp/client.stateStore');\n\n/**\n * Symbol-keyed accessor for the capabilities object `createAdcpServer`\n * assembles and the auto-wired `get_adcp_capabilities` handler reads from.\n * Mutating this object mutates what subsequent capability-discovery calls\n * return — `registerTestController` uses this to add a\n * `compliance_testing` capability block after registration so the server\n * advertises its controller scenarios even though `registerTestController`\n * runs after `createAdcpServer`.\n *\n * @internal\n */\nexport const ADCP_CAPABILITIES: unique symbol = Symbol.for('@adcp/client.capabilities');\n\n/** Per-request tool visibility policy consumed by transport adapters. @internal */\nexport const ADCP_TOOL_VISIBILITY: unique symbol = Symbol.for('@adcp/client.toolVisibility');\n\n/** Configured MCP App resources mirrored into modern per-request servers. @internal */\nexport const ADCP_MCP_APP_RESOURCES: unique symbol = Symbol.for('@adcp/client.mcpAppResources');\n\n/** @internal */\nexport type AdcpToolVisibilityResolver = (options: {\n toolName: string;\n authInfo?: AdcpAuthInfo;\n input?: Readonly<Record<string, unknown>>;\n}) => boolean | Promise<boolean>;\n\n/** @internal */\nexport interface AdcpServerInternal extends AdcpServer {\n readonly [ADCP_SDK_SERVER]: McpServer;\n [ADCP_TOOL_VISIBILITY]?: AdcpToolVisibilityResolver;\n [ADCP_MCP_APP_RESOURCES]?: readonly AdcpMcpResourceDefinition[];\n}\n\n/**\n * Return the underlying `McpServer` for a wrapped `AdcpServer`, or\n * `undefined` if the value is not an `AdcpServer` produced by\n * `createAdcpServer()`.\n *\n * @internal\n */\nexport function getSdkServer(server: AdcpServer | McpServer): McpServer | undefined {\n const candidate = (server as unknown as Partial<AdcpServerInternal>)[ADCP_SDK_SERVER];\n return candidate;\n}\n\n/** Attach a transport-independent per-request tool visibility policy. @internal */\nexport function setToolVisibilityResolver(server: AdcpServer, resolver: AdcpToolVisibilityResolver): void {\n (server as AdcpServerInternal)[ADCP_TOOL_VISIBILITY] = resolver;\n}\n\n/** Attach validated resource definitions for transport adapters. @internal */\nexport function setMcpAppResources(server: AdcpServer, resources: readonly AdcpMcpResourceDefinition[]): void {\n Object.defineProperty(server, ADCP_MCP_APP_RESOURCES, {\n value: resources,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n}\n\n/** Read validated resource definitions for transport adapters. @internal */\nexport function listMcpAppResources(server: AdcpServer): readonly AdcpMcpResourceDefinition[] {\n return (server as AdcpServerInternal)[ADCP_MCP_APP_RESOURCES] ?? [];\n}\n\n/** Resolve whether a registered tool may be exposed to this request. @internal */\nexport async function isRegisteredToolVisible(\n server: AdcpServer,\n options: Parameters<AdcpToolVisibilityResolver>[0]\n): Promise<boolean> {\n const resolver = (server as AdcpServerInternal)[ADCP_TOOL_VISIBILITY];\n return resolver ? resolver(options) : true;\n}\n\n/**\n * True when `value` is an `AdcpServer` produced by `createAdcpServer()`.\n *\n * @internal\n */\nexport function isAdcpServer(value: unknown): value is AdcpServerInternal {\n return (\n value != null &&\n typeof value === 'object' &&\n ADCP_SDK_SERVER in (value as Record<PropertyKey, unknown>) &&\n typeof (value as AdcpServer).dispatchTestRequest === 'function'\n );\n}\n\n// ---------------------------------------------------------------------------\n// Private-field access — centralized\n// ---------------------------------------------------------------------------\n//\n// The MCP SDK marks `_requestHandlers` and `_registeredTools` as private.\n// Dispatching a request in-process from a test needs them. Doing it once\n// here means downstream harnesses don't each repeat the (server as any)\n// dance, which is the whole point of exposing `dispatchTestRequest()`.\n//\n// If/when the SDK ships a public in-process dispatch API, swap these two\n// helpers for that API. The AdcpServer surface stays the same.\n\ninterface RegisteredTool {\n title?: string;\n description?: string;\n inputSchema?: unknown;\n outputSchema?: unknown;\n annotations?: unknown;\n _meta?: Record<string, unknown>;\n enabled?: boolean;\n handler: (args: unknown, extra: unknown) => unknown | Promise<unknown>;\n}\n\ninterface McpServerPrivates {\n _registeredTools?: Record<string, RegisteredTool | undefined>;\n server?: {\n _requestHandlers?: Map<\n string,\n (request: { method: string; params?: unknown }, extra: unknown) => unknown | Promise<unknown>\n >;\n _serverInfo?: { name: string; version: string; [key: string]: unknown };\n _instructions?: string;\n };\n}\n\n/** Tool metadata needed to mirror the registered AdCP surface into another official MCP transport. @internal */\nexport interface RegisteredToolDefinition {\n name: string;\n title?: string;\n description?: string;\n inputSchema?: unknown;\n outputSchema?: unknown;\n annotations?: unknown;\n _meta?: Record<string, unknown>;\n}\n\n/** @internal */\ntype McpRequestHandler = (request: { method: string; params?: unknown }, extra: unknown) => unknown | Promise<unknown>;\n\n/**\n * Write the instructions string onto the low-level SDK server backing\n * `mcpServer`. Called by the async-function-form instructions hook to\n * inject the resolved string just before the MCP `initialize` response.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function setSdkServerInstructions(mcpServer: McpServer, value: string | undefined): void {\n const priv = mcpServer as unknown as McpServerPrivates;\n if (priv.server) {\n priv.server._instructions = value;\n }\n}\n\n/**\n * Wrap the `initialize` request handler on `mcpServer` so that `wrapper`\n * runs (and can await async work) before the original handler responds.\n * The wrapper receives the original handler as its first argument and must\n * call it to complete the handshake.\n *\n * The wrapper is invoked once per MCP `initialize` call on this server\n * instance. Under `serve({ reuseAgent: false })` the server is created\n * fresh per request, so the wrapper fires once per session. Under\n * `reuseAgent: true` the `ADCP_INSTRUCTIONS_FN` check in `serve.ts`\n * blocks the combination before the wrapper can be called a second time.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function wrapInitializeHandler(\n mcpServer: McpServer,\n wrapper: (\n origHandler: McpRequestHandler,\n req: { method: string; params?: unknown },\n extra: unknown\n ) => unknown | Promise<unknown>\n): void {\n const priv = mcpServer as unknown as McpServerPrivates;\n const handlers = priv.server?._requestHandlers;\n if (!handlers) return;\n const orig = handlers.get('initialize');\n if (!orig) return;\n handlers.set('initialize', (req, extra) => wrapper(orig, req, extra));\n}\n\nfunction getRegisteredTool(server: McpServer, name: string): RegisteredTool | undefined {\n return (server as unknown as McpServerPrivates)._registeredTools?.[name];\n}\n\n/**\n * Wrap a registered MCP tool handler without changing the tool definition\n * advertised by the SDK server.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function wrapRegisteredToolHandler(\n server: McpServer,\n name: string,\n wrapper: (orig: RegisteredTool['handler'], args: unknown, extra: unknown) => unknown | Promise<unknown>\n): boolean {\n const tool = getRegisteredTool(server, name);\n if (!tool) return false;\n const orig = tool.handler;\n tool.handler = (args, extra) => wrapper(orig, args, extra);\n return true;\n}\n\n/**\n * Enumerate the tool names registered on the underlying SDK server.\n * Used by transport adapters that need to derive discovery metadata\n * (agent cards, capability listings) from the registered surface\n * without reaching into private SDK fields at every call site.\n *\n * @internal\n */\nexport function listRegisteredToolNames(server: McpServer): string[] {\n const registered = (server as unknown as McpServerPrivates)._registeredTools ?? {};\n return Object.keys(registered);\n}\n\n/**\n * Return enabled registered-tool metadata for the modern MCP server adapter.\n * Handler functions stay private; the adapter dispatches through\n * {@link AdcpServer.invoke} so the framework pipeline remains authoritative.\n *\n * @internal\n */\nexport function listRegisteredToolDefinitions(server: McpServer): RegisteredToolDefinition[] {\n const registered = (server as unknown as McpServerPrivates)._registeredTools ?? {};\n return Object.entries(registered).flatMap(([name, tool]) => {\n if (!tool || tool.enabled === false) return [];\n return [\n {\n name,\n ...(tool.title !== undefined && { title: tool.title }),\n ...(tool.description !== undefined && { description: tool.description }),\n ...(tool.inputSchema !== undefined && { inputSchema: tool.inputSchema }),\n ...(tool.outputSchema !== undefined && { outputSchema: tool.outputSchema }),\n ...(tool.annotations !== undefined && { annotations: tool.annotations }),\n ...(tool._meta !== undefined && { _meta: tool._meta }),\n },\n ];\n });\n}\n\n/** Return the SDK server identity advertised during MCP discovery. @internal */\nexport function getSdkServerInfo(server: McpServer): { name: string; version: string; [key: string]: unknown } {\n return (\n (server as unknown as McpServerPrivates).server?._serverInfo ?? {\n name: 'AdCP Server',\n version: 'unknown',\n }\n );\n}\n\n/** Return static or already-resolved server instructions. @internal */\nexport function getSdkServerInstructions(server: McpServer): string | undefined {\n return (server as unknown as McpServerPrivates).server?._instructions;\n}\n\nfunction getRequestHandler(\n server: McpServer,\n method: string\n): ((request: { method: string; params?: unknown }, extra: unknown) => unknown | Promise<unknown>) | undefined {\n return (server as unknown as McpServerPrivates).server?._requestHandlers?.get(method);\n}\n\n/**\n * Wrap an SDK request handler such as `tools/list` while preserving the\n * original handler's request/extra contract.\n *\n * @internal\n * @remarks Pokes an SDK private field — see the \"Private-field access\" note above.\n */\nexport function wrapSdkRequestHandler(\n server: McpServer,\n method: string,\n wrapper: (\n orig: McpRequestHandler,\n req: { method: string; params?: unknown },\n extra: unknown\n ) => unknown | Promise<unknown>\n): boolean {\n const handlers = (server as unknown as McpServerPrivates).server?._requestHandlers;\n const orig = handlers?.get(method);\n if (!handlers || !orig) return false;\n handlers.set(method, (req, extra) => wrapper(orig, req, extra));\n return true;\n}\n\n/**\n * Wrap an SDK `McpServer` into the opaque `AdcpServer` handle returned by\n * `createAdcpServer()`. Consumers should prefer `createAdcpServer()` and\n * treat this as an internal utility; it's exported for framework code\n * that needs to produce an `AdcpServer` around a hand-built server.\n *\n * Idempotent — passing an already-wrapped `AdcpServer` returns it\n * unchanged rather than nesting wrappers (which would leave\n * `ADCP_SDK_SERVER` pointing at the outer wrapper instead of the SDK\n * handle and break `getSdkServer()` round-trips).\n *\n * @internal\n */\nexport function wrapMcpServer(\n inner: McpServer | AdcpServerInternal,\n compliance?: AdcpServerComplianceApi,\n adcpVersion: string = ADCP_VERSION\n): AdcpServerInternal {\n if (isAdcpServer(inner)) return inner;\n const mcp = inner as McpServer;\n const resolvedCompliance: AdcpServerComplianceApi = compliance ?? {\n async reset() {\n throw new Error(\n 'AdcpServer.compliance.reset: no-op handle returned by `wrapMcpServer` without a compliance implementation. ' +\n 'Use `createAdcpServer()` to get a server whose `compliance.reset()` flushes the state and idempotency stores.'\n );\n },\n };\n const dispatch = async (request: AdcpTestRequest, extras?: AdcpTestRequestExtras): Promise<AdcpTestResponse> => {\n const extra: { signal: AbortSignal; authInfo?: AdcpTestRequestExtras['authInfo']; sessionId?: string } = {\n signal: new AbortController().signal,\n };\n if (extras?.authInfo) extra.authInfo = extras.authInfo;\n if (extras?.sessionId) extra.sessionId = extras.sessionId;\n\n if (request.method === 'tools/call') {\n const params = (request.params ?? {}) as { name?: string; arguments?: Record<string, unknown> };\n if (typeof params.name !== 'string') {\n throw new Error(\"dispatchTestRequest: 'tools/call' requires params.name (string)\");\n }\n const tool = getRegisteredTool(mcp, params.name);\n if (!tool) {\n throw new Error(`dispatchTestRequest: tool \"${params.name}\" is not registered`);\n }\n return tool.handler(params.arguments ?? {}, extra);\n }\n\n const handler = getRequestHandler(mcp, request.method);\n if (!handler) {\n throw new Error(`dispatchTestRequest: no handler registered for method \"${request.method}\"`);\n }\n return handler({ method: request.method, params: request.params ?? {} }, extra);\n };\n const invoke = async (options: AdcpInvokeOptions): Promise<McpToolResponse> => {\n const tool = getRegisteredTool(mcp, options.toolName);\n if (!tool) {\n throw new Error(`AdcpServer.invoke: tool \"${options.toolName}\" is not registered`);\n }\n const extra: { signal: AbortSignal; authInfo?: AdcpAuthInfo } = {\n signal: options.signal ?? new AbortController().signal,\n };\n if (options.authInfo) extra.authInfo = options.authInfo;\n return (await tool.handler(options.args, extra)) as McpToolResponse;\n };\n const wrapper: AdcpServerInternal = {\n [ADCP_SDK_SERVER]: mcp,\n connect(transport) {\n // The SDK's Transport interface is structurally compatible with\n // AdcpServerTransport — the cast is boundary-crossing, not lossy.\n return mcp.connect(transport as unknown as Parameters<McpServer['connect']>[0]);\n },\n close() {\n return mcp.close();\n },\n compliance: resolvedCompliance,\n // Satisfies both overloads (typed tools/call + generic fallback) — the\n // runtime dispatcher is a single function that narrows by method.\n dispatchTestRequest: dispatch as AdcpServerInternal['dispatchTestRequest'],\n invoke,\n getAdcpVersion: () => adcpVersion,\n };\n return wrapper;\n}\n"],"mappings":"AAiCA,SAAS,oBAAoB;AA+JtB,MAAM,oBAAmC,uBAAO,mBAAmB;AAyHnE,MAAM,kBAAiC,uBAAO,IAAI,wBAAwB;AAY1E,MAAM,mBAAkC,uBAAO,IAAI,yBAAyB;AAa5E,MAAM,oBAAmC,uBAAO,IAAI,2BAA2B;AAG/E,MAAM,uBAAsC,uBAAO,IAAI,6BAA6B;AAGpF,MAAM,yBAAwC,uBAAO,IAAI,8BAA8B;AAuBvF,SAAS,aAAa,QAAuD;AAClF,QAAM,YAAa,OAAkD,eAAe;AACpF,SAAO;AACT;AAGO,SAAS,0BAA0B,QAAoB,UAA4C;AACxG,EAAC,OAA8B,oBAAoB,IAAI;AACzD;AAGO,SAAS,mBAAmB,QAAoB,WAAuD;AAC5G,SAAO,eAAe,QAAQ,wBAAwB;AAAA,IACpD,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EACZ,CAAC;AACH;AAGO,SAAS,oBAAoB,QAA0D;AAC5F,SAAQ,OAA8B,sBAAsB,KAAK,CAAC;AACpE;AAGA,eAAsB,wBACpB,QACA,SACkB;AAClB,QAAM,WAAY,OAA8B,oBAAoB;AACpE,SAAO,WAAW,SAAS,OAAO,IAAI;AACxC;AAOO,SAAS,aAAa,OAA6C;AACxE,SACE,SAAS,QACT,OAAO,UAAU,YACjB,mBAAoB,SACpB,OAAQ,MAAqB,wBAAwB;AAEzD;AA2DO,SAAS,yBAAyB,WAAsB,OAAiC;AAC9F,QAA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AM;AACT,cAAM,IAAI,MAAM,8BAA8B,OAAO,IAAI,qBAAqB;AAAA,MAChF;AACA,aAAO,KAAK,QAAQ,OAAO,aAAa,CAAC,GAAG,KAAK;AAAA,IACnD;AAEA,UAAM,UAAU,kBAAkB,KAAK,QAAQ,MAAM;AACrD,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,MAAM,0DAA0D,QAAQ,MAAM,GAAG;AAAA,IAC7F;AACA,WAAO,QAAQ,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,QAAQ,UAAU,CAAC,EAAE,GAAG,KAAK;AAAA,EAChF;AACA,QAAM,SAAS,OAAO,YAAyD;AAC7E,UAAM,OAAO,kBAAkB,KAAK,QAAQ,QAAQ;AACpD,QAAI,CAAC,MAAM;AACT,YAAM,IAAI,MAAM,4BAA4B,QAAQ,QAAQ,qBAAqB;AAAA,IACnF;AACA,UAAM,QAA0D;AAAA,MAC9D,QAAQ,QAAQ,UAAU,IAAI,gBAAgB,EAAE;AAAA,IAClD;AACA,QAAI,QAAQ,SAAU,OAAM,WAAW,QAAQ;AAC/C,WAAQ,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;AAAA,EAChD;AACA,QAAM,UAA8B;AAAA,IAClC,CAAC,eAAe,GAAG;AAAA,IACnB,QAAQ,WAAW;AAGjB,aAAO,IAAI,QAAQ,SAA2D;AAAA,IAChF;AAAA,IACA,QAAQ;AACN,aAAO,IAAI,MAAM;AAAA,IACnB;AAAA,IACA,YAAY;AAAA;AAAA;AAAA,IAGZ,qBAAqB;AAAA,IACrB;AAAA,IACA,gBAAgB,MAAM;AAAA,EACxB;AACA,SAAO;AACT;","names":[]}
@@ -40,6 +40,7 @@ import type { ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js';
40
40
  import type { ZodRawShapeCompat, AnySchema } from '@modelcontextprotocol/sdk/server/zod-compat.js';
41
41
  import type { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
42
42
  import { type AdcpServer } from './adcp-server.mjs';
43
+ import { type AdcpMcpResourceDefinition } from './mcp-app.mjs';
43
44
  import type { TaskStore, TaskMessageQueue } from './tasks.mjs';
44
45
  import type { BuyerAgent, BuyerAgentRegistry } from './decisioning/buyer-agent.mjs';
45
46
  import type { ResolvedAuthInfo } from './decisioning/account.mjs';
@@ -889,6 +890,17 @@ export type MaybePromise<T> = T | Promise<T>;
889
890
  export type AdcpPreTransport = (req: import('http').IncomingMessage & {
890
891
  rawBody?: string;
891
892
  }, res: import('http').ServerResponse) => Promise<boolean>;
893
+ /** UI hints for a custom tool backed by an MCP App. */
894
+ export interface McpAppUiMeta {
895
+ /** URI of the MCP App resource rendered when the tool is invoked. */
896
+ resourceUri?: string;
897
+ /** Audiences a compliant host exposes the tool to. Routing metadata, not authorization. */
898
+ visibility?: Array<'model' | 'app'>;
899
+ }
900
+ /** Typed MCP App metadata forwarded unchanged in `tools/list`. */
901
+ export interface McpAppMeta {
902
+ ui?: McpAppUiMeta;
903
+ }
892
904
  /**
893
905
  * Declarative registration for a tool outside {@link AdcpToolMap} — seller
894
906
  * extensions (e.g. collection-list helpers), test-harness endpoints
@@ -932,6 +944,8 @@ export interface AdcpCustomToolConfig<InputArgs extends undefined | ZodRawShapeC
932
944
  outputSchema?: OutputArgs;
933
945
  /** Tool annotations (readOnlyHint / destructiveHint / idempotentHint / openWorldHint). */
934
946
  annotations?: ToolAnnotations;
947
+ /** Portable MCP App metadata surfaced unchanged in `tools/list`. */
948
+ _meta?: McpAppMeta;
935
949
  /**
936
950
  * Tool handler. Gets SDK-validated `args` based on `inputSchema` and
937
951
  * must return a `CallToolResult`. Use `capabilitiesResponse`,
@@ -1339,6 +1353,16 @@ export interface AdcpServerConfig<TAccount = unknown> {
1339
1353
  * construction time — the spec handler wins by convention.
1340
1354
  */
1341
1355
  customTools?: Record<string, AdcpCustomToolConfig<any, any>>;
1356
+ /**
1357
+ * Portable HTML MCP Apps served through standard MCP resources.
1358
+ *
1359
+ * Each definition is registered on both the legacy MCP server and every
1360
+ * modern per-request server reconstruction. A custom tool links to a
1361
+ * resource with `_meta.ui.resourceUri`; a startup warning identifies any
1362
+ * link whose URI is absent here. Hosts without MCP Apps support can ignore
1363
+ * the metadata and consume the tool's normal text result.
1364
+ */
1365
+ resources?: readonly AdcpMcpResourceDefinition[];
1342
1366
  /**
1343
1367
  * Opt-in bridge between the `comply_test_controller` seed store and the
1344
1368
  * spec-tool pipeline. When `getSeededProducts` is provided, seeded
@@ -40,6 +40,7 @@ import type { ToolCallback } from '@modelcontextprotocol/sdk/server/mcp.js';
40
40
  import type { ZodRawShapeCompat, AnySchema } from '@modelcontextprotocol/sdk/server/zod-compat.js';
41
41
  import type { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
42
42
  import { type AdcpServer } from './adcp-server';
43
+ import { type AdcpMcpResourceDefinition } from './mcp-app';
43
44
  import type { TaskStore, TaskMessageQueue } from './tasks';
44
45
  import type { BuyerAgent, BuyerAgentRegistry } from './decisioning/buyer-agent';
45
46
  import type { ResolvedAuthInfo } from './decisioning/account';
@@ -889,6 +890,17 @@ export type MaybePromise<T> = T | Promise<T>;
889
890
  export type AdcpPreTransport = (req: import('http').IncomingMessage & {
890
891
  rawBody?: string;
891
892
  }, res: import('http').ServerResponse) => Promise<boolean>;
893
+ /** UI hints for a custom tool backed by an MCP App. */
894
+ export interface McpAppUiMeta {
895
+ /** URI of the MCP App resource rendered when the tool is invoked. */
896
+ resourceUri?: string;
897
+ /** Audiences a compliant host exposes the tool to. Routing metadata, not authorization. */
898
+ visibility?: Array<'model' | 'app'>;
899
+ }
900
+ /** Typed MCP App metadata forwarded unchanged in `tools/list`. */
901
+ export interface McpAppMeta {
902
+ ui?: McpAppUiMeta;
903
+ }
892
904
  /**
893
905
  * Declarative registration for a tool outside {@link AdcpToolMap} — seller
894
906
  * extensions (e.g. collection-list helpers), test-harness endpoints
@@ -932,6 +944,8 @@ export interface AdcpCustomToolConfig<InputArgs extends undefined | ZodRawShapeC
932
944
  outputSchema?: OutputArgs;
933
945
  /** Tool annotations (readOnlyHint / destructiveHint / idempotentHint / openWorldHint). */
934
946
  annotations?: ToolAnnotations;
947
+ /** Portable MCP App metadata surfaced unchanged in `tools/list`. */
948
+ _meta?: McpAppMeta;
935
949
  /**
936
950
  * Tool handler. Gets SDK-validated `args` based on `inputSchema` and
937
951
  * must return a `CallToolResult`. Use `capabilitiesResponse`,
@@ -1339,6 +1353,16 @@ export interface AdcpServerConfig<TAccount = unknown> {
1339
1353
  * construction time — the spec handler wins by convention.
1340
1354
  */
1341
1355
  customTools?: Record<string, AdcpCustomToolConfig<any, any>>;
1356
+ /**
1357
+ * Portable HTML MCP Apps served through standard MCP resources.
1358
+ *
1359
+ * Each definition is registered on both the legacy MCP server and every
1360
+ * modern per-request server reconstruction. A custom tool links to a
1361
+ * resource with `_meta.ui.resourceUri`; a startup warning identifies any
1362
+ * link whose URI is absent here. Hosts without MCP Apps support can ignore
1363
+ * the metadata and consume the tool's normal text result.
1364
+ */
1365
+ resources?: readonly AdcpMcpResourceDefinition[];
1342
1366
  /**
1343
1367
  * Opt-in bridge between the `comply_test_controller` seed store and the
1344
1368
  * spec-tool pipeline. When `getSeededProducts` is provided, seeded
@@ -1 +1 @@
1
- {"version":3,"file":"create-adcp-server.d.ts","sourceRoot":"","sources":["../../../src/lib/server/create-adcp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAoD,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAMhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAML,KAAK,UAAU,EAEhB,MAAM,eAAe,CAA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AgB,gBAAgB,CAAC,QAAQ,GAAG,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,UAAU,CAk9FnG"}
@@ -34,6 +34,7 @@ var import_schemas = require('../schemas/index.js');
34
34
  var import_protocols = require('../protocols/index.js');
35
35
  var import_error_arm_tools = require('./error-arm-tools.js');
36
36
  var import_adcp_server = require('./adcp-server.js');
37
+ var import_mcp_app = require('./mcp-app.js');
37
38
  var import_tasks = require('./tasks.js');
38
39
  var import_errors = require('./errors.js');
39
40
  var import_async_outcome = require('./decisioning/async-outcome.js');
@@ -1105,6 +1106,15 @@ function createAdcpServer(config) {
1105
1106
  responseEnhancer
1106
1107
  } = config;
1107
1108
  const frameworkInputSchemaFor = (toolName) => config.exposeToolSchemas === true ? shallowToolInputHintSchema(toolName) ?? PASSTHROUGH_INPUT_SCHEMA : PASSTHROUGH_INPUT_SCHEMA;
1109
+ const mcpAppResources = (0, import_mcp_app.normalizeMcpAppResources)(config.resources);
1110
+ const mcpAppResourceUris = new Set(mcpAppResources.map((resource) => resource.uri));
1111
+ for (const [toolName, tool] of Object.entries(config.customTools ?? {})) {
1112
+ const resourceUri = tool?._meta?.ui?.resourceUri;
1113
+ if (resourceUri === void 0 || mcpAppResourceUris.has(resourceUri)) continue;
1114
+ const message = `[adcp/createAdcpServer] customTools["${toolName}"]._meta.ui.resourceUri references "${resourceUri}", but no matching MCP App resource is configured in resources[].`;
1115
+ process.emitWarning(message, { type: "AdcpServerConfigWarning", code: "ADCP_MCP_APP_RESOURCE_MISSING" });
1116
+ logger.warn(message);
1117
+ }
1108
1118
  if (testControllerBridge != null && resolveAccount === void 0 && resolveAccountFromAuth === void 0) {
1109
1119
  const message = "[adcp/createAdcpServer] testController is wired but no account resolver \u2014 configure resolveAccount (or resolveAccountFromAuth) for production. Storyboard runners without account scoping can ignore. Details: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/VALIDATE-YOUR-AGENT.md";
1110
1120
  process.emitWarning(message, { type: "AdcpServerConfigWarning", code: "ADCP_BRIDGE_NO_RESOLVER" });
@@ -1249,6 +1259,16 @@ function createAdcpServer(config) {
1249
1259
  taskMessageQueue,
1250
1260
  instructions: resolvedInstructions
1251
1261
  });
1262
+ for (const resource of mcpAppResources) {
1263
+ server.registerResource(
1264
+ resource.name,
1265
+ resource.uri,
1266
+ (0, import_mcp_app.mcpAppResourceMetadata)(resource),
1267
+ async (uri, extra) => (0, import_mcp_app.readMcpAppResource)(resource, uri, {
1268
+ signal: extra.signal
1269
+ })
1270
+ );
1271
+ }
1252
1272
  if (pendingInstructions !== void 0) {
1253
1273
  const pending = pendingInstructions;
1254
1274
  let resolvedOnce;
@@ -2681,7 +2701,7 @@ function createAdcpServer(config) {
2681
2701
  }
2682
2702
  const custom = config.customTools[customName];
2683
2703
  if (!custom) continue;
2684
- const { description, title, inputSchema, outputSchema, annotations, handler } = custom;
2704
+ const { description, title, inputSchema, outputSchema, annotations, _meta, handler } = custom;
2685
2705
  const rawHandler = handler;
2686
2706
  const wrappedHandler = (async (...args) => {
2687
2707
  try {
@@ -2699,7 +2719,8 @@ function createAdcpServer(config) {
2699
2719
  ...title != null && { title },
2700
2720
  ...inputSchema != null && { inputSchema },
2701
2721
  ...outputSchema != null && { outputSchema },
2702
- ...annotations != null && { annotations }
2722
+ ...annotations != null && { annotations },
2723
+ ..._meta != null && { _meta }
2703
2724
  },
2704
2725
  wrappedHandler
2705
2726
  );
@@ -2861,6 +2882,7 @@ function createAdcpServer(config) {
2861
2882
  }
2862
2883
  };
2863
2884
  const wrapped = (0, import_adcp_server.wrapMcpServer)(server, compliance, adcpVersion);
2885
+ (0, import_adcp_server.setMcpAppResources)(wrapped, mcpAppResources);
2864
2886
  if (signedRequests) {
2865
2887
  const preTransport = buildSignedRequestsPreTransport(signedRequests, capConfig?.request_signing);
2866
2888
  Object.defineProperty(wrapped, ADCP_PRE_TRANSPORT, {