MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / versionUnsupported

Function versionUnsupported

server/src/training-agent/framework-server.ts:198–211  ·  view source on GitHub ↗
(requested: unknown, callerContext: unknown)

Source from the content-addressed store, hash-verified

196}
197
198function versionUnsupported(requested: unknown, callerContext: unknown): AdaptedResponse {
199 const errorObj: Record<string, unknown> = {
200 code: 'VERSION_UNSUPPORTED',
201 message: `AdCP major version ${String(requested)} is not supported`,
202 details: { supported_major_versions: SUPPORTED_MAJOR_VERSIONS },
203 field: 'adcp_major_version',
204 };
205 const body = wrapEnvelope({ adcp_error: errorObj }, { context: callerContext });
206 return {
207 isError: true,
208 content: [{ type: 'text', text: JSON.stringify(body) }],
209 structuredContent: body,
210 };
211}
212
213// ── Handler adapter ──────────────────────────────────────────────
214

Callers 1

adaptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected