@adcp/sdk 14.4.0 → 15.2.0
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.
- package/bin/adcp-grade.js +46 -2
- package/bin/adcp.js +13 -3
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js +4 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs +4 -1
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.mts +19 -6
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.ts +19 -6
- package/dist/lib/auth/oauth/MCPOAuthProvider.js +95 -30
- package/dist/lib/auth/oauth/MCPOAuthProvider.mjs +96 -30
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.d.mts +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.d.ts +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.js +1 -1
- package/dist/lib/auth/oauth/NonInteractiveFlowHandler.mjs +1 -1
- package/dist/lib/auth/oauth/client-credentials-schema.d.mts +17 -0
- package/dist/lib/auth/oauth/client-credentials-schema.d.ts +17 -0
- package/dist/lib/auth/oauth/client-credentials-schema.js +37 -0
- package/dist/lib/auth/oauth/client-credentials-schema.mjs +13 -0
- package/dist/lib/auth/oauth/file-storage.d.mts +3 -3
- package/dist/lib/auth/oauth/file-storage.d.ts +3 -3
- package/dist/lib/auth/oauth/file-storage.js +12 -5
- package/dist/lib/auth/oauth/file-storage.mjs +12 -5
- package/dist/lib/auth/oauth/index.d.mts +10 -6
- package/dist/lib/auth/oauth/index.d.ts +10 -6
- package/dist/lib/auth/oauth/index.js +9 -3
- package/dist/lib/auth/oauth/index.mjs +8 -3
- package/dist/lib/auth/oauth/types.d.mts +9 -2
- package/dist/lib/auth/oauth/types.d.ts +9 -2
- package/dist/lib/auth/oauth/types.js +3 -2
- package/dist/lib/auth/oauth/types.mjs +3 -2
- package/dist/lib/auth/oauth/web-flow.d.mts +2 -0
- package/dist/lib/auth/oauth/web-flow.d.ts +2 -0
- package/dist/lib/auth/oauth/web-flow.js +42 -9
- package/dist/lib/auth/oauth/web-flow.mjs +42 -9
- package/dist/lib/canonical-references/index.d.mts +19 -1
- package/dist/lib/canonical-references/index.d.ts +19 -1
- package/dist/lib/canonical-references/index.js +81 -9
- package/dist/lib/canonical-references/index.mjs +80 -9
- package/dist/lib/client/core.d.mts +1 -0
- package/dist/lib/client/core.d.ts +1 -0
- package/dist/lib/core/AgentClient.d.mts +9 -1
- package/dist/lib/core/AgentClient.d.ts +9 -1
- package/dist/lib/core/AgentClient.js +10 -0
- package/dist/lib/core/AgentClient.mjs +10 -0
- package/dist/lib/core/SingleAgentClient.d.mts +13 -2
- package/dist/lib/core/SingleAgentClient.d.ts +13 -2
- package/dist/lib/core/SingleAgentClient.js +23 -5
- package/dist/lib/core/SingleAgentClient.mjs +23 -5
- package/dist/lib/index.d.mts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +3 -1
- package/dist/lib/reporting/gcs/adapter.d.mts +31 -0
- package/dist/lib/reporting/gcs/adapter.d.ts +31 -0
- package/dist/lib/reporting/gcs/adapter.js +342 -0
- package/dist/lib/reporting/gcs/adapter.mjs +325 -0
- package/dist/lib/reporting/gcs/bucket-policy.d.mts +3 -0
- package/dist/lib/reporting/gcs/bucket-policy.d.ts +3 -0
- package/dist/lib/reporting/gcs/bucket-policy.js +31 -0
- package/dist/lib/reporting/gcs/bucket-policy.mjs +7 -0
- package/dist/lib/reporting/gcs/errors.d.mts +5 -0
- package/dist/lib/reporting/gcs/errors.d.ts +5 -0
- package/dist/lib/reporting/gcs/errors.js +41 -0
- package/dist/lib/reporting/gcs/errors.mjs +16 -0
- package/dist/lib/reporting/gcs/fence.d.mts +36 -0
- package/dist/lib/reporting/gcs/fence.d.ts +36 -0
- package/dist/lib/reporting/gcs/fence.js +250 -0
- package/dist/lib/reporting/gcs/fence.mjs +230 -0
- package/dist/lib/reporting/gcs/index.d.mts +7 -0
- package/dist/lib/reporting/gcs/index.d.ts +7 -0
- package/dist/lib/reporting/gcs/index.js +41 -0
- package/dist/lib/reporting/gcs/index.mjs +12 -0
- package/dist/lib/reporting/gcs/io.d.mts +7 -0
- package/dist/lib/reporting/gcs/io.d.ts +7 -0
- package/dist/lib/reporting/gcs/io.js +95 -0
- package/dist/lib/reporting/gcs/io.mjs +69 -0
- package/dist/lib/reporting/gcs/reader.d.mts +43 -0
- package/dist/lib/reporting/gcs/reader.d.ts +43 -0
- package/dist/lib/reporting/gcs/reader.js +193 -0
- package/dist/lib/reporting/gcs/reader.mjs +169 -0
- package/dist/lib/reporting/gcs/validation.d.mts +5 -0
- package/dist/lib/reporting/gcs/validation.d.ts +5 -0
- package/dist/lib/reporting/gcs/validation.js +49 -0
- package/dist/lib/reporting/gcs/validation.mjs +25 -0
- package/dist/lib/reporting/ledger/handler.d.mts +1 -0
- package/dist/lib/reporting/ledger/handler.d.ts +1 -0
- package/dist/lib/reporting/ledger/index.d.mts +1 -0
- package/dist/lib/reporting/ledger/index.d.ts +1 -0
- package/dist/lib/reporting/ledger/index.js +2 -0
- package/dist/lib/reporting/ledger/index.mjs +1 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +16 -1
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +16 -1
- package/dist/lib/reporting/ledger/managed-postgres.js +243 -2
- package/dist/lib/reporting/ledger/managed-postgres.mjs +248 -2
- package/dist/lib/reporting/ledger/object-writes.d.mts +69 -0
- package/dist/lib/reporting/ledger/object-writes.d.ts +69 -0
- package/dist/lib/reporting/ledger/object-writes.js +147 -0
- package/dist/lib/reporting/ledger/object-writes.mjs +114 -0
- package/dist/lib/schemas/index.d.mts +2 -0
- package/dist/lib/schemas/index.d.ts +2 -0
- package/dist/lib/schemas/index.js +3 -0
- package/dist/lib/schemas/index.mjs +2 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/a2a-adapter.d.mts +50 -1
- package/dist/lib/server/a2a-adapter.d.ts +50 -1
- package/dist/lib/server/a2a-adapter.js +230 -7
- package/dist/lib/server/a2a-adapter.mjs +237 -7
- package/dist/lib/server/auth-signature.d.mts +84 -46
- package/dist/lib/server/auth-signature.d.ts +84 -46
- package/dist/lib/server/auth-signature.js +48 -14
- package/dist/lib/server/auth-signature.mjs +58 -15
- package/dist/lib/server/create-adcp-server.js +5 -16
- package/dist/lib/server/create-adcp-server.mjs +5 -16
- package/dist/lib/server/index.d.mts +1 -1
- package/dist/lib/server/index.d.ts +1 -1
- package/dist/lib/server/index.js +2 -0
- package/dist/lib/server/index.mjs +3 -1
- package/dist/lib/signing/agent-fetch.js +3 -33
- package/dist/lib/signing/agent-fetch.mjs +3 -33
- package/dist/lib/signing/middleware.d.mts +9 -1
- package/dist/lib/signing/middleware.d.ts +9 -1
- package/dist/lib/signing/operation-resolution.d.mts +37 -0
- package/dist/lib/signing/operation-resolution.d.ts +37 -0
- package/dist/lib/signing/operation-resolution.js +154 -0
- package/dist/lib/signing/operation-resolution.mjs +125 -0
- package/dist/lib/signing/postgres-replay-store.d.mts +1 -1
- package/dist/lib/signing/postgres-replay-store.d.ts +1 -1
- package/dist/lib/signing/redis-replay-store.d.mts +1 -1
- package/dist/lib/signing/redis-replay-store.d.ts +1 -1
- package/dist/lib/signing/server.d.mts +1 -0
- package/dist/lib/signing/server.d.ts +1 -0
- package/dist/lib/signing/server.js +7 -0
- package/dist/lib/signing/server.mjs +8 -0
- package/dist/lib/signing/verifier.d.mts +36 -1
- package/dist/lib/signing/verifier.d.ts +36 -1
- package/dist/lib/signing/verifier.js +66 -34
- package/dist/lib/signing/verifier.mjs +61 -34
- package/dist/lib/testing/client.js +8 -3
- package/dist/lib/testing/client.mjs +8 -3
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.d.mts +12 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.d.ts +12 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.js +29 -2
- package/dist/lib/testing/storyboard/request-signing/a2a-dispatch.mjs +27 -1
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.d.mts +61 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.d.ts +61 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.js +298 -0
- package/dist/lib/testing/storyboard/request-signing/a2a-operation-resolution.mjs +276 -0
- package/dist/lib/testing/storyboard/request-signing/grader.d.mts +31 -1
- package/dist/lib/testing/storyboard/request-signing/grader.d.ts +31 -1
- package/dist/lib/testing/storyboard/request-signing/grader.js +11 -0
- package/dist/lib/testing/storyboard/request-signing/grader.mjs +11 -0
- package/dist/lib/testing/storyboard/request-signing/index.d.mts +5 -4
- package/dist/lib/testing/storyboard/request-signing/index.d.ts +5 -4
- package/dist/lib/testing/storyboard/request-signing/index.js +13 -0
- package/dist/lib/testing/storyboard/request-signing/index.mjs +18 -2
- package/dist/lib/testing/storyboard/request-signing/types.d.mts +43 -0
- package/dist/lib/testing/storyboard/request-signing/types.d.ts +43 -0
- package/dist/lib/testing/storyboard/request-signing/types.js +3 -0
- package/dist/lib/testing/storyboard/request-signing/types.mjs +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +42 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +42 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.js +100 -1
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +104 -3
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/types.d.mts +10 -1
- package/dist/lib/testing/types.d.ts +10 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/ZOD-SCHEMAS.md +19 -0
- package/docs/guides/BUILD-AN-AGENT.md +9 -4
- package/docs/guides/CREATIVE-DELIVERY.md +34 -0
- package/docs/guides/OAUTH-ISSUER-BINDING.md +46 -0
- package/docs/guides/REPORTING-GCS-FENCE.md +52 -0
- package/docs/guides/REPORTING-GCS-MANAGED.md +56 -0
- package/docs/guides/REPORTING-OPERATIONS.md +4 -0
- package/docs/guides/SIGNING-GUIDE.md +20 -6
- package/docs/guides/VALIDATE-YOUR-AGENT.md +4 -0
- package/docs/guides/WEB-OAUTH.md +58 -163
- package/docs/guides/account-resolution.md +1 -1
- package/docs/llms.txt +2 -2
- package/docs/migration-14.0-to-14.1.md +1 -1
- package/docs/migration-14.x-rc-worksheet.md +8 -7
- package/docs/migration-buyer-agent-registry.md +1 -1
- package/docs/migration-oauth-issuer-bindings.md +14 -79
- package/package.json +19 -1
- package/skills/build-seller-agent/specialisms/signed-requests.md +2 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { buildPositiveRequest } from "./builder.mjs";
|
|
2
|
+
import { probeSignedRequest } from "./probe.mjs";
|
|
3
|
+
import { resolveA2aDispatchTarget, resolveA2aHttpJsonEndpoint } from "./a2a-dispatch.mjs";
|
|
4
|
+
import {
|
|
5
|
+
A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
6
|
+
loadA2aOperationResolutionVectors
|
|
7
|
+
} from "./vector-loader.mjs";
|
|
8
|
+
const A2A_UNAVAILABLE_ROW_ID = "a2a/operation-resolution-vectors";
|
|
9
|
+
const ALTERNATE_ACCEPTED_CODES = {
|
|
10
|
+
"a2a/negative/023-batch-body": ["request_signature_required"]
|
|
11
|
+
};
|
|
12
|
+
function emptyTiers() {
|
|
13
|
+
return {
|
|
14
|
+
"contradiction-resolution": { passed: 0, failed: 0, skipped: 0, failed_vectors: [] },
|
|
15
|
+
hardening: { passed: 0, failed: 0, skipped: 0, failed_vectors: [] }
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
async function gradeA2aOperationResolution(agentUrl, keys, contract, options) {
|
|
19
|
+
if (options.onlyVectors && !options.onlyVectors.some((id) => id.startsWith("a2a/"))) return void 0;
|
|
20
|
+
const loaded = loadA2aOperationResolutionVectors(options);
|
|
21
|
+
const tiers = emptyTiers();
|
|
22
|
+
if (loaded.source === "none") {
|
|
23
|
+
return {
|
|
24
|
+
positive: [],
|
|
25
|
+
negative: [
|
|
26
|
+
{
|
|
27
|
+
vector_id: A2A_UNAVAILABLE_ROW_ID,
|
|
28
|
+
kind: "negative",
|
|
29
|
+
passed: true,
|
|
30
|
+
skipped: true,
|
|
31
|
+
skip_reason: "a2a_vectors_unavailable",
|
|
32
|
+
diagnostic: A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
33
|
+
http_status: 0,
|
|
34
|
+
probe_duration_ms: 0
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
summary: {
|
|
38
|
+
vectors_available: false,
|
|
39
|
+
source: "none",
|
|
40
|
+
message: A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
41
|
+
tiers
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const dispatchOptions = {
|
|
46
|
+
allowPrivateIp: options.allowPrivateIp === true,
|
|
47
|
+
...options.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {},
|
|
48
|
+
...options.cardFetch ? { cardFetch: options.cardFetch } : {}
|
|
49
|
+
};
|
|
50
|
+
const probeOptions = {
|
|
51
|
+
allowPrivateIp: options.allowPrivateIp === true,
|
|
52
|
+
timeoutMs: options.timeoutMs
|
|
53
|
+
};
|
|
54
|
+
let jsonRpcEndpoint;
|
|
55
|
+
const jsonRpc = () => jsonRpcEndpoint ??= resolveA2aDispatchTarget(agentUrl, dispatchOptions).then((target) => target.endpoint);
|
|
56
|
+
let httpJsonEndpoint;
|
|
57
|
+
const httpJson = () => httpJsonEndpoint ??= resolveA2aHttpJsonEndpoint(agentUrl, dispatchOptions);
|
|
58
|
+
const requiredFor = options.agentCapability?.required_for ?? options.agentRequiredFor;
|
|
59
|
+
const protocolMethodsRequiredFor = options.agentCapability !== void 0 ? options.agentCapability.protocol_methods_required_for ?? [] : options.agentProtocolMethodsRequiredFor;
|
|
60
|
+
const contentDigestPolicy = options.agentCapability?.covers_content_digest ?? options.agentContentDigestPolicy;
|
|
61
|
+
const results = [];
|
|
62
|
+
const grade = async (vector) => {
|
|
63
|
+
const skip = preflightSkip(vector, {
|
|
64
|
+
options,
|
|
65
|
+
contract,
|
|
66
|
+
requiredFor,
|
|
67
|
+
protocolMethodsRequiredFor,
|
|
68
|
+
contentDigestPolicy
|
|
69
|
+
});
|
|
70
|
+
if (skip) return skip;
|
|
71
|
+
let url;
|
|
72
|
+
if (isHttpJsonBinding(vector)) {
|
|
73
|
+
const base = await httpJson();
|
|
74
|
+
if (!base) {
|
|
75
|
+
return skipped(
|
|
76
|
+
vector,
|
|
77
|
+
"transport_ungradable",
|
|
78
|
+
`Vector ${vector.id} grades the A2A HTTP+JSON binding (POST \u2026/message:send), but the agent card declares no HTTP+JSON interface. An agent that does not serve that binding cannot be bypassed through it.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
url = `${base.replace(/\/+$/, "")}/${lastPathSegment(vector.request.url)}`;
|
|
82
|
+
} else {
|
|
83
|
+
url = await jsonRpc();
|
|
84
|
+
}
|
|
85
|
+
const request = buildRequest(vector, url, keys);
|
|
86
|
+
const probe = await probeSignedRequest(request, probeOptions);
|
|
87
|
+
return vector.kind === "positive" ? gradePositive(vector, probe) : gradeNegative(vector, probe);
|
|
88
|
+
};
|
|
89
|
+
for (const vector of [...loaded.positive, ...loaded.negative]) {
|
|
90
|
+
const result = await grade(vector);
|
|
91
|
+
results.push(result);
|
|
92
|
+
const tier = tiers[vector.tier];
|
|
93
|
+
if (result.skipped) tier.skipped++;
|
|
94
|
+
else if (result.passed) tier.passed++;
|
|
95
|
+
else {
|
|
96
|
+
tier.failed++;
|
|
97
|
+
tier.failed_vectors.push(vector.id);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
positive: results.filter((r) => r.kind === "positive"),
|
|
102
|
+
negative: results.filter((r) => r.kind === "negative"),
|
|
103
|
+
summary: {
|
|
104
|
+
vectors_available: true,
|
|
105
|
+
source: loaded.source,
|
|
106
|
+
...loaded.sourceDir ? { source_dir: loaded.sourceDir } : {},
|
|
107
|
+
tiers
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function skipped(vector, skip_reason, diagnostic) {
|
|
112
|
+
return {
|
|
113
|
+
vector_id: vector.id,
|
|
114
|
+
kind: vector.kind,
|
|
115
|
+
tier: vector.tier,
|
|
116
|
+
passed: true,
|
|
117
|
+
// skipped is not failed; overall pass/fail excludes skipped
|
|
118
|
+
skipped: true,
|
|
119
|
+
skip_reason,
|
|
120
|
+
...vector.kind === "negative" && vector.expected_outcome.error_code ? { expected_error_code: vector.expected_outcome.error_code } : {},
|
|
121
|
+
...diagnostic ? { diagnostic } : {},
|
|
122
|
+
http_status: 0,
|
|
123
|
+
probe_duration_ms: 0
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function preflightSkip(vector, ctx) {
|
|
127
|
+
const { options } = ctx;
|
|
128
|
+
if (options.onlyVectors && !options.onlyVectors.includes(vector.id)) {
|
|
129
|
+
return skipped(vector, "not_in_only_vectors");
|
|
130
|
+
}
|
|
131
|
+
if (options.skipVectors?.includes(vector.id)) return skipped(vector, "operator_skip");
|
|
132
|
+
const mismatch = capabilityMismatch(vector, ctx.requiredFor, ctx.protocolMethodsRequiredFor);
|
|
133
|
+
if (mismatch) return skipped(vector, "capability_profile_mismatch", mismatch);
|
|
134
|
+
if (vector.kind === "positive" && isSigned(vector) && ctx.contentDigestPolicy === "forbidden") {
|
|
135
|
+
return skipped(
|
|
136
|
+
vector,
|
|
137
|
+
"capability_profile_mismatch",
|
|
138
|
+
`Vector ${vector.id} is signed with content-digest covered, but the agent declares covers_content_digest='forbidden'.`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
if (vector.kind === "positive" && vector.expected_outcome.status === "verified" && !options.allowLiveSideEffects && ctx.contract?.endpoint_scope !== "sandbox") {
|
|
142
|
+
return skipped(
|
|
143
|
+
vector,
|
|
144
|
+
"live_side_effect_opt_in_required",
|
|
145
|
+
`Vector ${vector.id} sends a validly signed ${vector.expected_outcome.resolved_operation ?? "operation"} request the agent will accept and run. Pass allowLiveSideEffects: true (or point the grader at an endpoint whose signed-requests-runner contract declares endpoint_scope: sandbox) to run it.`
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
return void 0;
|
|
149
|
+
}
|
|
150
|
+
function capabilityMismatch(vector, requiredFor, protocolMethodsRequiredFor) {
|
|
151
|
+
if (vector.kind === "negative") {
|
|
152
|
+
if (vector.expected_outcome.error_code !== "request_signature_required") return void 0;
|
|
153
|
+
const methods = vector.verifier_capability.protocol_methods_required_for ?? [];
|
|
154
|
+
if (methods.length > 0) {
|
|
155
|
+
if (!protocolMethodsRequiredFor) return void 0;
|
|
156
|
+
const missing = methods.filter((m) => !protocolMethodsRequiredFor.includes(m));
|
|
157
|
+
return missing.length === 0 ? void 0 : `Vector asserts protocol_methods_required_for includes [${missing.join(", ")}] but the agent declares [${protocolMethodsRequiredFor.join(", ")}]. Add the method to request_signing.protocol_methods_required_for to grade it.`;
|
|
158
|
+
}
|
|
159
|
+
const operation2 = vector.expected_outcome.resolved_operation;
|
|
160
|
+
if (!requiredFor || typeof operation2 !== "string" || requiredFor.includes(operation2)) return void 0;
|
|
161
|
+
return `Vector asserts ${operation2} is in required_for but the agent declares required_for [${requiredFor.join(", ")}]. The vector tests a rejection path the agent has not opted into; add the operation to request_signing.required_for to grade it.`;
|
|
162
|
+
}
|
|
163
|
+
if (vector.expected_outcome.status !== "unsigned") return void 0;
|
|
164
|
+
const operation = vector.expected_outcome.resolved_operation;
|
|
165
|
+
if (requiredFor && typeof operation === "string" && requiredFor.includes(operation)) {
|
|
166
|
+
return `Vector asserts ${operation} needs no signature, but the agent declares it in required_for.`;
|
|
167
|
+
}
|
|
168
|
+
const method = jsonRpcMethodOf(vector.request.body);
|
|
169
|
+
if (protocolMethodsRequiredFor && method !== void 0 && protocolMethodsRequiredFor.includes(method)) {
|
|
170
|
+
return `Vector asserts an unsigned ${method} is accepted, but the agent declares ${method} in protocol_methods_required_for.`;
|
|
171
|
+
}
|
|
172
|
+
return void 0;
|
|
173
|
+
}
|
|
174
|
+
function hasHeader(headers, name) {
|
|
175
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === name);
|
|
176
|
+
}
|
|
177
|
+
function isSigned(vector) {
|
|
178
|
+
return hasHeader(vector.request.headers, "signature-input");
|
|
179
|
+
}
|
|
180
|
+
function isHttpJsonBinding(vector) {
|
|
181
|
+
try {
|
|
182
|
+
return /(?:^|\/)message:(?:send|stream)$/.test(new URL(vector.request.url).pathname);
|
|
183
|
+
} catch {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function lastPathSegment(url) {
|
|
188
|
+
return new URL(url).pathname.split("/").filter(Boolean).pop() ?? "";
|
|
189
|
+
}
|
|
190
|
+
function jsonRpcMethodOf(body) {
|
|
191
|
+
if (!body) return void 0;
|
|
192
|
+
try {
|
|
193
|
+
const parsed = JSON.parse(body);
|
|
194
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
195
|
+
const method = parsed.method;
|
|
196
|
+
return typeof method === "string" ? method : void 0;
|
|
197
|
+
}
|
|
198
|
+
} catch {
|
|
199
|
+
}
|
|
200
|
+
return void 0;
|
|
201
|
+
}
|
|
202
|
+
function buildRequest(vector, url, keys) {
|
|
203
|
+
const request = { ...vector.request, url, headers: { ...vector.request.headers } };
|
|
204
|
+
if (!isSigned(vector)) return request;
|
|
205
|
+
const asPositive = {
|
|
206
|
+
kind: "positive",
|
|
207
|
+
id: vector.id,
|
|
208
|
+
name: vector.name,
|
|
209
|
+
signing_profile_version: vector.signing_profile_version,
|
|
210
|
+
reference_now: vector.reference_now,
|
|
211
|
+
request,
|
|
212
|
+
verifier_capability: vector.verifier_capability,
|
|
213
|
+
jwks_ref: vector.jwks_ref
|
|
214
|
+
};
|
|
215
|
+
return buildPositiveRequest(asPositive, keys, { transport: "raw" });
|
|
216
|
+
}
|
|
217
|
+
function isSignatureChallenge(probe) {
|
|
218
|
+
if (probe.status !== 401) return false;
|
|
219
|
+
if (probe.wwwAuthenticateErrorCode !== void 0) return true;
|
|
220
|
+
return /(?:^|,)\s*Signature\b/i.test(probe.headers["www-authenticate"] ?? "");
|
|
221
|
+
}
|
|
222
|
+
function gradePositive(vector, probe) {
|
|
223
|
+
const rejected = isSignatureChallenge(probe);
|
|
224
|
+
const passed = !probe.error && !rejected;
|
|
225
|
+
let diagnostic;
|
|
226
|
+
if (probe.error) diagnostic = `probe error: ${probe.error}`;
|
|
227
|
+
else if (rejected) {
|
|
228
|
+
const code = probe.wwwAuthenticateErrorCode ?? "(none)";
|
|
229
|
+
diagnostic = vector.expected_outcome.status === "verified" ? `expected the signed request to be accepted past the signature layer, got 401 with error="${code}". Check the grader test key is registered with the agent. Vector: ${vector.name}` : `expected no signature rejection (the resolved operation does not require one), got 401 with error="${code}". Vector: ${vector.name}`;
|
|
230
|
+
}
|
|
231
|
+
return {
|
|
232
|
+
vector_id: vector.id,
|
|
233
|
+
kind: "positive",
|
|
234
|
+
tier: vector.tier,
|
|
235
|
+
passed,
|
|
236
|
+
http_status: probe.status,
|
|
237
|
+
probe_url: probe.url,
|
|
238
|
+
...probe.wwwAuthenticateErrorCode ? { actual_error_code: probe.wwwAuthenticateErrorCode } : {},
|
|
239
|
+
...diagnostic ? { diagnostic } : {},
|
|
240
|
+
...probe.error !== void 0 && { transport_error: true },
|
|
241
|
+
probe_duration_ms: probe.duration_ms
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
function gradeNegative(vector, probe) {
|
|
245
|
+
const expected = vector.expected_error_code;
|
|
246
|
+
const accepted = [expected, ...ALTERNATE_ACCEPTED_CODES[vector.id] ?? []];
|
|
247
|
+
const actual = probe.wwwAuthenticateErrorCode;
|
|
248
|
+
const passed = !probe.error && probe.status === 401 && actual !== void 0 && accepted.includes(actual);
|
|
249
|
+
let diagnostic;
|
|
250
|
+
if (!passed) {
|
|
251
|
+
const wanted = accepted.map((code) => `"${code}"`).join(" or ");
|
|
252
|
+
if (probe.error) diagnostic = `probe error: ${probe.error}`;
|
|
253
|
+
else if (probe.status !== 401) {
|
|
254
|
+
diagnostic = `expected 401 with error=${wanted}, got ${probe.status}. The request reached the agent's dispatcher: the verifier did not resolve the operation from the A2A DataPart skill (GHSA-frxv-c96c-4vqw). Vector: ${vector.name}`;
|
|
255
|
+
} else {
|
|
256
|
+
diagnostic = `expected error=${wanted}, got error="${actual ?? "(none)"}". Vector: ${vector.name}`;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
vector_id: vector.id,
|
|
261
|
+
kind: "negative",
|
|
262
|
+
tier: vector.tier,
|
|
263
|
+
passed,
|
|
264
|
+
http_status: probe.status,
|
|
265
|
+
probe_url: probe.url,
|
|
266
|
+
expected_error_code: expected,
|
|
267
|
+
...actual ? { actual_error_code: actual } : {},
|
|
268
|
+
...diagnostic ? { diagnostic } : {},
|
|
269
|
+
...probe.error !== void 0 && { transport_error: true },
|
|
270
|
+
probe_duration_ms: probe.duration_ms
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export {
|
|
274
|
+
A2A_UNAVAILABLE_ROW_ID,
|
|
275
|
+
gradeA2aOperationResolution
|
|
276
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type LoadVectorsOptions } from './vector-loader.mjs';
|
|
2
|
-
import
|
|
2
|
+
import { type A2aOperationResolutionSummary } from './a2a-operation-resolution.mjs';
|
|
3
|
+
import type { A2aVectorTier, NegativeVector, PositiveVector, VerifierCapabilityFixture } from './types.mjs';
|
|
3
4
|
export interface GradeOptions extends LoadVectorsOptions {
|
|
4
5
|
/** Grade only authored 3.2 profile vectors. Omit for the legacy root corpus. */
|
|
5
6
|
signingProfileVersion?: '3.2';
|
|
@@ -94,6 +95,16 @@ export interface GradeOptions extends LoadVectorsOptions {
|
|
|
94
95
|
* shadow-posture agent). Has no effect when `agentCapability` is provided.
|
|
95
96
|
*/
|
|
96
97
|
agentRequiredFor?: readonly string[];
|
|
98
|
+
/**
|
|
99
|
+
* The agent's advertised `request_signing.protocol_methods_required_for`
|
|
100
|
+
* (JSON-RPC method names such as `SendMessage` or `tasks/cancel`). Only the
|
|
101
|
+
* A2A operation-resolution vectors consult it: negative/007 (an unsigned
|
|
102
|
+
* `SendMessage` rejected because the method itself is required) skips when
|
|
103
|
+
* the agent does not declare `SendMessage`, and unsigned positives skip when
|
|
104
|
+
* the agent requires their method. Has no effect when `agentCapability` is
|
|
105
|
+
* provided (its own `protocol_methods_required_for` governs).
|
|
106
|
+
*/
|
|
107
|
+
agentProtocolMethodsRequiredFor?: readonly string[];
|
|
97
108
|
/**
|
|
98
109
|
* Transport shape the agent speaks. `'mcp'` (default) wraps each
|
|
99
110
|
* vector body in a JSON-RPC `tools/call` envelope and POSTs to the MCP
|
|
@@ -101,6 +112,11 @@ export interface GradeOptions extends LoadVectorsOptions {
|
|
|
101
112
|
* sits as transport-layer middleware ahead of MCP dispatch.
|
|
102
113
|
*
|
|
103
114
|
* See adcontextprotocol/adcp-client#612 for the MCP-mode rationale.
|
|
115
|
+
*
|
|
116
|
+
* `'a2a'` additionally grades the A2A operation-resolution vectors
|
|
117
|
+
* (adcp#7945): `required_for` must be enforced against the operation named
|
|
118
|
+
* by the invocation DataPart's `skill`, not the JSON-RPC method. See
|
|
119
|
+
* `a2a-operation-resolution.ts`. Vector ids are prefixed `a2a/`.
|
|
104
120
|
*/
|
|
105
121
|
transport?: 'raw' | 'mcp' | 'a2a';
|
|
106
122
|
/** Trusted Agent Card fetch seam for A2A tests and custom runtimes. */
|
|
@@ -167,6 +183,12 @@ export interface VectorGradeResult {
|
|
|
167
183
|
/** For negatives: the error code the spec says we should see. */
|
|
168
184
|
expected_error_code?: string;
|
|
169
185
|
http_status: number;
|
|
186
|
+
/**
|
|
187
|
+
* A2A operation-resolution vectors only: `contradiction-resolution` is MUST
|
|
188
|
+
* for a 3.2 verifier; `hardening` is SHOULD in 3.2.x and MUST from 3.3.
|
|
189
|
+
* Hardening failures still count as failures; the tier tells you which kind.
|
|
190
|
+
*/
|
|
191
|
+
tier?: A2aVectorTier;
|
|
170
192
|
/** Actual endpoint probed when it differs from the configured agent URL (notably A2A card routing). */
|
|
171
193
|
probe_url?: string;
|
|
172
194
|
diagnostic?: string;
|
|
@@ -205,6 +227,14 @@ export interface GradeReport {
|
|
|
205
227
|
contract_loaded: boolean;
|
|
206
228
|
positive: VectorGradeResult[];
|
|
207
229
|
negative: VectorGradeResult[];
|
|
230
|
+
/**
|
|
231
|
+
* Present only on `transport: 'a2a'` runs. Per-tier tally of the A2A
|
|
232
|
+
* operation-resolution vectors, or `vectors_available: false` (with the
|
|
233
|
+
* reason) when the compliance bundle carries none, so an absent corpus is
|
|
234
|
+
* never mistaken for a clean pass. The vector rows themselves are in
|
|
235
|
+
* `positive` / `negative` under `a2a/` ids.
|
|
236
|
+
*/
|
|
237
|
+
a2a_operation_resolution?: A2aOperationResolutionSummary;
|
|
208
238
|
passed: boolean;
|
|
209
239
|
passed_count: number;
|
|
210
240
|
failed_count: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type LoadVectorsOptions } from './vector-loader';
|
|
2
|
-
import
|
|
2
|
+
import { type A2aOperationResolutionSummary } from './a2a-operation-resolution';
|
|
3
|
+
import type { A2aVectorTier, NegativeVector, PositiveVector, VerifierCapabilityFixture } from './types';
|
|
3
4
|
export interface GradeOptions extends LoadVectorsOptions {
|
|
4
5
|
/** Grade only authored 3.2 profile vectors. Omit for the legacy root corpus. */
|
|
5
6
|
signingProfileVersion?: '3.2';
|
|
@@ -94,6 +95,16 @@ export interface GradeOptions extends LoadVectorsOptions {
|
|
|
94
95
|
* shadow-posture agent). Has no effect when `agentCapability` is provided.
|
|
95
96
|
*/
|
|
96
97
|
agentRequiredFor?: readonly string[];
|
|
98
|
+
/**
|
|
99
|
+
* The agent's advertised `request_signing.protocol_methods_required_for`
|
|
100
|
+
* (JSON-RPC method names such as `SendMessage` or `tasks/cancel`). Only the
|
|
101
|
+
* A2A operation-resolution vectors consult it: negative/007 (an unsigned
|
|
102
|
+
* `SendMessage` rejected because the method itself is required) skips when
|
|
103
|
+
* the agent does not declare `SendMessage`, and unsigned positives skip when
|
|
104
|
+
* the agent requires their method. Has no effect when `agentCapability` is
|
|
105
|
+
* provided (its own `protocol_methods_required_for` governs).
|
|
106
|
+
*/
|
|
107
|
+
agentProtocolMethodsRequiredFor?: readonly string[];
|
|
97
108
|
/**
|
|
98
109
|
* Transport shape the agent speaks. `'mcp'` (default) wraps each
|
|
99
110
|
* vector body in a JSON-RPC `tools/call` envelope and POSTs to the MCP
|
|
@@ -101,6 +112,11 @@ export interface GradeOptions extends LoadVectorsOptions {
|
|
|
101
112
|
* sits as transport-layer middleware ahead of MCP dispatch.
|
|
102
113
|
*
|
|
103
114
|
* See adcontextprotocol/adcp-client#612 for the MCP-mode rationale.
|
|
115
|
+
*
|
|
116
|
+
* `'a2a'` additionally grades the A2A operation-resolution vectors
|
|
117
|
+
* (adcp#7945): `required_for` must be enforced against the operation named
|
|
118
|
+
* by the invocation DataPart's `skill`, not the JSON-RPC method. See
|
|
119
|
+
* `a2a-operation-resolution.ts`. Vector ids are prefixed `a2a/`.
|
|
104
120
|
*/
|
|
105
121
|
transport?: 'raw' | 'mcp' | 'a2a';
|
|
106
122
|
/** Trusted Agent Card fetch seam for A2A tests and custom runtimes. */
|
|
@@ -167,6 +183,12 @@ export interface VectorGradeResult {
|
|
|
167
183
|
/** For negatives: the error code the spec says we should see. */
|
|
168
184
|
expected_error_code?: string;
|
|
169
185
|
http_status: number;
|
|
186
|
+
/**
|
|
187
|
+
* A2A operation-resolution vectors only: `contradiction-resolution` is MUST
|
|
188
|
+
* for a 3.2 verifier; `hardening` is SHOULD in 3.2.x and MUST from 3.3.
|
|
189
|
+
* Hardening failures still count as failures; the tier tells you which kind.
|
|
190
|
+
*/
|
|
191
|
+
tier?: A2aVectorTier;
|
|
170
192
|
/** Actual endpoint probed when it differs from the configured agent URL (notably A2A card routing). */
|
|
171
193
|
probe_url?: string;
|
|
172
194
|
diagnostic?: string;
|
|
@@ -205,6 +227,14 @@ export interface GradeReport {
|
|
|
205
227
|
contract_loaded: boolean;
|
|
206
228
|
positive: VectorGradeResult[];
|
|
207
229
|
negative: VectorGradeResult[];
|
|
230
|
+
/**
|
|
231
|
+
* Present only on `transport: 'a2a'` runs. Per-tier tally of the A2A
|
|
232
|
+
* operation-resolution vectors, or `vectors_available: false` (with the
|
|
233
|
+
* reason) when the compliance bundle carries none, so an absent corpus is
|
|
234
|
+
* never mistaken for a clean pass. The vector rows themselves are in
|
|
235
|
+
* `positive` / `negative` under `a2a/` ids.
|
|
236
|
+
*/
|
|
237
|
+
a2a_operation_resolution?: A2aOperationResolutionSummary;
|
|
208
238
|
passed: boolean;
|
|
209
239
|
passed_count: number;
|
|
210
240
|
failed_count: number;
|
|
@@ -32,6 +32,7 @@ var import_probe = require('./probe.js');
|
|
|
32
32
|
var import_vector_loader = require('./vector-loader.js');
|
|
33
33
|
var import_a2a_dispatch = require('./a2a-dispatch.js');
|
|
34
34
|
var import_test_kit = require('./test-kit.js');
|
|
35
|
+
var import_a2a_operation_resolution = require('./a2a-operation-resolution.js');
|
|
35
36
|
var import_signing = require('../../../signing/index.js');
|
|
36
37
|
var import_parser = require('../../../signing/parser.js');
|
|
37
38
|
async function gradeRequestSigning(agentUrl, options = {}) {
|
|
@@ -88,6 +89,15 @@ async function gradeRequestSigning(agentUrl, options = {}) {
|
|
|
88
89
|
withA2aProbeUrl(await gradeNegative(vector, loaded, contract, probeOpts, buildOpts, options), buildOpts)
|
|
89
90
|
);
|
|
90
91
|
}
|
|
92
|
+
let a2aSummary;
|
|
93
|
+
if (transport === "a2a") {
|
|
94
|
+
const a2a = await (0, import_a2a_operation_resolution.gradeA2aOperationResolution)(agentUrl, loaded.keys, contract, options);
|
|
95
|
+
if (a2a) {
|
|
96
|
+
positive.push(...a2a.positive);
|
|
97
|
+
negative.push(...a2a.negative);
|
|
98
|
+
a2aSummary = a2a.summary;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
91
101
|
const all = [...positive, ...negative];
|
|
92
102
|
const passed_count = all.filter((r) => r.passed && !r.skipped).length;
|
|
93
103
|
const skipped_count = all.filter((r) => r.skipped).length;
|
|
@@ -103,6 +113,7 @@ async function gradeRequestSigning(agentUrl, options = {}) {
|
|
|
103
113
|
contract_loaded: Boolean(contract),
|
|
104
114
|
positive,
|
|
105
115
|
negative,
|
|
116
|
+
...a2aSummary ? { a2a_operation_resolution: a2aSummary } : {},
|
|
106
117
|
passed,
|
|
107
118
|
passed_count,
|
|
108
119
|
failed_count,
|
|
@@ -4,6 +4,7 @@ import { initializeMcpSession, probeSignedRequest } from "./probe.mjs";
|
|
|
4
4
|
import { loadRequestSigningVectors, selectRequestSigningVectors } from "./vector-loader.mjs";
|
|
5
5
|
import { captureA2aRequest, operationFromVectorUrl } from "./a2a-dispatch.mjs";
|
|
6
6
|
import { loadSignedRequestsRunnerContract } from "./test-kit.mjs";
|
|
7
|
+
import { gradeA2aOperationResolution } from "./a2a-operation-resolution.mjs";
|
|
7
8
|
import {
|
|
8
9
|
InMemoryReplayStore,
|
|
9
10
|
InMemoryRevocationStore,
|
|
@@ -67,6 +68,15 @@ async function gradeRequestSigning(agentUrl, options = {}) {
|
|
|
67
68
|
withA2aProbeUrl(await gradeNegative(vector, loaded, contract, probeOpts, buildOpts, options), buildOpts)
|
|
68
69
|
);
|
|
69
70
|
}
|
|
71
|
+
let a2aSummary;
|
|
72
|
+
if (transport === "a2a") {
|
|
73
|
+
const a2a = await gradeA2aOperationResolution(agentUrl, loaded.keys, contract, options);
|
|
74
|
+
if (a2a) {
|
|
75
|
+
positive.push(...a2a.positive);
|
|
76
|
+
negative.push(...a2a.negative);
|
|
77
|
+
a2aSummary = a2a.summary;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
70
80
|
const all = [...positive, ...negative];
|
|
71
81
|
const passed_count = all.filter((r) => r.passed && !r.skipped).length;
|
|
72
82
|
const skipped_count = all.filter((r) => r.skipped).length;
|
|
@@ -82,6 +92,7 @@ async function gradeRequestSigning(agentUrl, options = {}) {
|
|
|
82
92
|
contract_loaded: Boolean(contract),
|
|
83
93
|
positive,
|
|
84
94
|
negative,
|
|
95
|
+
...a2aSummary ? { a2a_operation_resolution: a2aSummary } : {},
|
|
85
96
|
passed,
|
|
86
97
|
passed_count,
|
|
87
98
|
failed_count,
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
* `StoryboardRunOptions.request_signing` on the runner options.
|
|
28
28
|
*/
|
|
29
29
|
export { gradeRequestSigning, gradeOneVector, type GradeOptions, type GradeReport, type VectorGradeResult, } from './grader.mjs';
|
|
30
|
+
export { A2A_UNAVAILABLE_ROW_ID, type A2aOperationResolutionSummary, type A2aTierSummary, } from './a2a-operation-resolution.mjs';
|
|
30
31
|
export { synthesizeRequestSigningSteps, parseRequestSigningStepId, REQUEST_SIGNING_PROBE_TASK, POSITIVE_STEP_PREFIX, NEGATIVE_STEP_PREFIX, type SynthesizeOptions, } from './synthesize.mjs';
|
|
31
32
|
export { probeRequestSigningVector } from './probe-dispatch.mjs';
|
|
32
|
-
export type { NegativeVector, PositiveVector, TestKeypair, TestKeyset, VectorRequest, VerifierCapabilityFixture, Vector, ContractId, } from './types.mjs';
|
|
33
|
-
export { CONTRACT_IDS } from './types.mjs';
|
|
34
|
-
export { loadRequestSigningVectors, findKey, type LoadVectorsOptions, type LoadedVectors } from './vector-loader.mjs';
|
|
33
|
+
export type { NegativeVector, PositiveVector, TestKeypair, TestKeyset, VectorRequest, VerifierCapabilityFixture, Vector, ContractId, A2aExpectedOutcome, A2aNegativeVector, A2aPositiveVector, A2aVector, A2aVectorTier, } from './types.mjs';
|
|
34
|
+
export { CONTRACT_IDS, A2A_VECTOR_TIERS } from './types.mjs';
|
|
35
|
+
export { loadRequestSigningVectors, loadA2aOperationResolutionVectors, findKey, A2A_VECTORS_UNAVAILABLE_MESSAGE, A2A_VECTORS_DIR_ENV, type A2aVectorSource, type LoadVectorsOptions, type LoadedA2aVectors, type LoadedVectors, } from './vector-loader.mjs';
|
|
35
36
|
export { buildPositiveRequest, buildNegativeRequest, listSupportedNegativeVectors, type BuildOptions, type SignedHttpRequest, } from './builder.mjs';
|
|
36
|
-
export { captureA2aRequest, resolveA2aDispatchTarget, operationFromVectorUrl, type A2aCall, type A2aDispatchOptions, type CapturedA2aRequest, } from './a2a-dispatch.mjs';
|
|
37
|
+
export { captureA2aRequest, resolveA2aDispatchTarget, resolveA2aHttpJsonEndpoint, operationFromVectorUrl, type A2aCall, type A2aDispatchOptions, type CapturedA2aRequest, } from './a2a-dispatch.mjs';
|
|
37
38
|
export { loadSignedRequestsRunnerContract, type LoadTestKitOptions, type RateAbuseContract, type ReplayWindowContract, type RevocationContract, type RunnerSigningKey, type SignedRequestsRunnerContract, } from './test-kit.mjs';
|
|
38
39
|
export { probeSignedRequest, initializeMcpSession, attachMcpSessionHeader, extractSignatureErrorCode, type ProbeOptions, type ProbeResult, } from './probe.mjs';
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
* `StoryboardRunOptions.request_signing` on the runner options.
|
|
28
28
|
*/
|
|
29
29
|
export { gradeRequestSigning, gradeOneVector, type GradeOptions, type GradeReport, type VectorGradeResult, } from './grader';
|
|
30
|
+
export { A2A_UNAVAILABLE_ROW_ID, type A2aOperationResolutionSummary, type A2aTierSummary, } from './a2a-operation-resolution';
|
|
30
31
|
export { synthesizeRequestSigningSteps, parseRequestSigningStepId, REQUEST_SIGNING_PROBE_TASK, POSITIVE_STEP_PREFIX, NEGATIVE_STEP_PREFIX, type SynthesizeOptions, } from './synthesize';
|
|
31
32
|
export { probeRequestSigningVector } from './probe-dispatch';
|
|
32
|
-
export type { NegativeVector, PositiveVector, TestKeypair, TestKeyset, VectorRequest, VerifierCapabilityFixture, Vector, ContractId, } from './types';
|
|
33
|
-
export { CONTRACT_IDS } from './types';
|
|
34
|
-
export { loadRequestSigningVectors, findKey, type LoadVectorsOptions, type LoadedVectors } from './vector-loader';
|
|
33
|
+
export type { NegativeVector, PositiveVector, TestKeypair, TestKeyset, VectorRequest, VerifierCapabilityFixture, Vector, ContractId, A2aExpectedOutcome, A2aNegativeVector, A2aPositiveVector, A2aVector, A2aVectorTier, } from './types';
|
|
34
|
+
export { CONTRACT_IDS, A2A_VECTOR_TIERS } from './types';
|
|
35
|
+
export { loadRequestSigningVectors, loadA2aOperationResolutionVectors, findKey, A2A_VECTORS_UNAVAILABLE_MESSAGE, A2A_VECTORS_DIR_ENV, type A2aVectorSource, type LoadVectorsOptions, type LoadedA2aVectors, type LoadedVectors, } from './vector-loader';
|
|
35
36
|
export { buildPositiveRequest, buildNegativeRequest, listSupportedNegativeVectors, type BuildOptions, type SignedHttpRequest, } from './builder';
|
|
36
|
-
export { captureA2aRequest, resolveA2aDispatchTarget, operationFromVectorUrl, type A2aCall, type A2aDispatchOptions, type CapturedA2aRequest, } from './a2a-dispatch';
|
|
37
|
+
export { captureA2aRequest, resolveA2aDispatchTarget, resolveA2aHttpJsonEndpoint, operationFromVectorUrl, type A2aCall, type A2aDispatchOptions, type CapturedA2aRequest, } from './a2a-dispatch';
|
|
37
38
|
export { loadSignedRequestsRunnerContract, type LoadTestKitOptions, type RateAbuseContract, type ReplayWindowContract, type RevocationContract, type RunnerSigningKey, type SignedRequestsRunnerContract, } from './test-kit';
|
|
38
39
|
export { probeSignedRequest, initializeMcpSession, attachMcpSessionHeader, extractSignatureErrorCode, type ProbeOptions, type ProbeResult, } from './probe';
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var request_signing_exports = {};
|
|
20
20
|
__export(request_signing_exports, {
|
|
21
|
+
A2A_UNAVAILABLE_ROW_ID: () => import_a2a_operation_resolution.A2A_UNAVAILABLE_ROW_ID,
|
|
22
|
+
A2A_VECTORS_DIR_ENV: () => import_vector_loader.A2A_VECTORS_DIR_ENV,
|
|
23
|
+
A2A_VECTORS_UNAVAILABLE_MESSAGE: () => import_vector_loader.A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
24
|
+
A2A_VECTOR_TIERS: () => import_types.A2A_VECTOR_TIERS,
|
|
21
25
|
CONTRACT_IDS: () => import_types.CONTRACT_IDS,
|
|
22
26
|
NEGATIVE_STEP_PREFIX: () => import_synthesize.NEGATIVE_STEP_PREFIX,
|
|
23
27
|
POSITIVE_STEP_PREFIX: () => import_synthesize.POSITIVE_STEP_PREFIX,
|
|
@@ -32,6 +36,7 @@ __export(request_signing_exports, {
|
|
|
32
36
|
gradeRequestSigning: () => import_grader.gradeRequestSigning,
|
|
33
37
|
initializeMcpSession: () => import_probe.initializeMcpSession,
|
|
34
38
|
listSupportedNegativeVectors: () => import_builder.listSupportedNegativeVectors,
|
|
39
|
+
loadA2aOperationResolutionVectors: () => import_vector_loader.loadA2aOperationResolutionVectors,
|
|
35
40
|
loadRequestSigningVectors: () => import_vector_loader.loadRequestSigningVectors,
|
|
36
41
|
loadSignedRequestsRunnerContract: () => import_test_kit.loadSignedRequestsRunnerContract,
|
|
37
42
|
operationFromVectorUrl: () => import_a2a_dispatch.operationFromVectorUrl,
|
|
@@ -39,10 +44,12 @@ __export(request_signing_exports, {
|
|
|
39
44
|
probeRequestSigningVector: () => import_probe_dispatch.probeRequestSigningVector,
|
|
40
45
|
probeSignedRequest: () => import_probe.probeSignedRequest,
|
|
41
46
|
resolveA2aDispatchTarget: () => import_a2a_dispatch.resolveA2aDispatchTarget,
|
|
47
|
+
resolveA2aHttpJsonEndpoint: () => import_a2a_dispatch.resolveA2aHttpJsonEndpoint,
|
|
42
48
|
synthesizeRequestSigningSteps: () => import_synthesize.synthesizeRequestSigningSteps
|
|
43
49
|
});
|
|
44
50
|
module.exports = __toCommonJS(request_signing_exports);
|
|
45
51
|
var import_grader = require('./grader.js');
|
|
52
|
+
var import_a2a_operation_resolution = require('./a2a-operation-resolution.js');
|
|
46
53
|
var import_synthesize = require('./synthesize.js');
|
|
47
54
|
var import_probe_dispatch = require('./probe-dispatch.js');
|
|
48
55
|
var import_types = require('./types.js');
|
|
@@ -53,6 +60,10 @@ var import_test_kit = require('./test-kit.js');
|
|
|
53
60
|
var import_probe = require('./probe.js');
|
|
54
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
55
62
|
0 && (module.exports = {
|
|
63
|
+
A2A_UNAVAILABLE_ROW_ID,
|
|
64
|
+
A2A_VECTORS_DIR_ENV,
|
|
65
|
+
A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
66
|
+
A2A_VECTOR_TIERS,
|
|
56
67
|
CONTRACT_IDS,
|
|
57
68
|
NEGATIVE_STEP_PREFIX,
|
|
58
69
|
POSITIVE_STEP_PREFIX,
|
|
@@ -67,6 +78,7 @@ var import_probe = require('./probe.js');
|
|
|
67
78
|
gradeRequestSigning,
|
|
68
79
|
initializeMcpSession,
|
|
69
80
|
listSupportedNegativeVectors,
|
|
81
|
+
loadA2aOperationResolutionVectors,
|
|
70
82
|
loadRequestSigningVectors,
|
|
71
83
|
loadSignedRequestsRunnerContract,
|
|
72
84
|
operationFromVectorUrl,
|
|
@@ -74,5 +86,6 @@ var import_probe = require('./probe.js');
|
|
|
74
86
|
probeRequestSigningVector,
|
|
75
87
|
probeSignedRequest,
|
|
76
88
|
resolveA2aDispatchTarget,
|
|
89
|
+
resolveA2aHttpJsonEndpoint,
|
|
77
90
|
synthesizeRequestSigningSteps
|
|
78
91
|
});
|
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
gradeRequestSigning,
|
|
3
3
|
gradeOneVector
|
|
4
4
|
} from "./grader.mjs";
|
|
5
|
+
import {
|
|
6
|
+
A2A_UNAVAILABLE_ROW_ID
|
|
7
|
+
} from "./a2a-operation-resolution.mjs";
|
|
5
8
|
import {
|
|
6
9
|
synthesizeRequestSigningSteps,
|
|
7
10
|
parseRequestSigningStepId,
|
|
@@ -10,8 +13,14 @@ import {
|
|
|
10
13
|
NEGATIVE_STEP_PREFIX
|
|
11
14
|
} from "./synthesize.mjs";
|
|
12
15
|
import { probeRequestSigningVector } from "./probe-dispatch.mjs";
|
|
13
|
-
import { CONTRACT_IDS } from "./types.mjs";
|
|
14
|
-
import {
|
|
16
|
+
import { CONTRACT_IDS, A2A_VECTOR_TIERS } from "./types.mjs";
|
|
17
|
+
import {
|
|
18
|
+
loadRequestSigningVectors,
|
|
19
|
+
loadA2aOperationResolutionVectors,
|
|
20
|
+
findKey,
|
|
21
|
+
A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
22
|
+
A2A_VECTORS_DIR_ENV
|
|
23
|
+
} from "./vector-loader.mjs";
|
|
15
24
|
import {
|
|
16
25
|
buildPositiveRequest,
|
|
17
26
|
buildNegativeRequest,
|
|
@@ -20,6 +29,7 @@ import {
|
|
|
20
29
|
import {
|
|
21
30
|
captureA2aRequest,
|
|
22
31
|
resolveA2aDispatchTarget,
|
|
32
|
+
resolveA2aHttpJsonEndpoint,
|
|
23
33
|
operationFromVectorUrl
|
|
24
34
|
} from "./a2a-dispatch.mjs";
|
|
25
35
|
import {
|
|
@@ -32,6 +42,10 @@ import {
|
|
|
32
42
|
extractSignatureErrorCode
|
|
33
43
|
} from "./probe.mjs";
|
|
34
44
|
export {
|
|
45
|
+
A2A_UNAVAILABLE_ROW_ID,
|
|
46
|
+
A2A_VECTORS_DIR_ENV,
|
|
47
|
+
A2A_VECTORS_UNAVAILABLE_MESSAGE,
|
|
48
|
+
A2A_VECTOR_TIERS,
|
|
35
49
|
CONTRACT_IDS,
|
|
36
50
|
NEGATIVE_STEP_PREFIX,
|
|
37
51
|
POSITIVE_STEP_PREFIX,
|
|
@@ -46,6 +60,7 @@ export {
|
|
|
46
60
|
gradeRequestSigning,
|
|
47
61
|
initializeMcpSession,
|
|
48
62
|
listSupportedNegativeVectors,
|
|
63
|
+
loadA2aOperationResolutionVectors,
|
|
49
64
|
loadRequestSigningVectors,
|
|
50
65
|
loadSignedRequestsRunnerContract,
|
|
51
66
|
operationFromVectorUrl,
|
|
@@ -53,5 +68,6 @@ export {
|
|
|
53
68
|
probeRequestSigningVector,
|
|
54
69
|
probeSignedRequest,
|
|
55
70
|
resolveA2aDispatchTarget,
|
|
71
|
+
resolveA2aHttpJsonEndpoint,
|
|
56
72
|
synthesizeRequestSigningSteps
|
|
57
73
|
};
|