@agenticprimitives/a2a 0.0.0-alpha.5 → 0.0.0-alpha.50

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 (145) hide show
  1. package/CLAUDE.md +39 -55
  2. package/README.md +44 -1
  3. package/bin/a2a-conform.mjs +17 -0
  4. package/dist/agent.d.ts +203 -7
  5. package/dist/agent.d.ts.map +1 -1
  6. package/dist/agent.js +586 -76
  7. package/dist/agent.js.map +1 -1
  8. package/dist/auth.d.ts +84 -11
  9. package/dist/auth.d.ts.map +1 -1
  10. package/dist/auth.js +94 -20
  11. package/dist/auth.js.map +1 -1
  12. package/dist/authority-extension.d.ts +58 -0
  13. package/dist/authority-extension.d.ts.map +1 -0
  14. package/dist/authority-extension.js +70 -0
  15. package/dist/authority-extension.js.map +1 -0
  16. package/dist/card-audience.d.ts +87 -0
  17. package/dist/card-audience.d.ts.map +1 -0
  18. package/dist/card-audience.js +135 -0
  19. package/dist/card-audience.js.map +1 -0
  20. package/dist/client.d.ts +23 -8
  21. package/dist/client.d.ts.map +1 -1
  22. package/dist/client.js +76 -13
  23. package/dist/client.js.map +1 -1
  24. package/dist/cloudflare/index.d.ts.map +1 -1
  25. package/dist/cloudflare/index.js +10 -2
  26. package/dist/cloudflare/index.js.map +1 -1
  27. package/dist/conform/index.d.ts +36 -0
  28. package/dist/conform/index.d.ts.map +1 -0
  29. package/dist/conform/index.js +247 -0
  30. package/dist/conform/index.js.map +1 -0
  31. package/dist/discovery.d.ts +4 -0
  32. package/dist/discovery.d.ts.map +1 -1
  33. package/dist/discovery.js +6 -2
  34. package/dist/discovery.js.map +1 -1
  35. package/dist/engagement.d.ts +37 -0
  36. package/dist/engagement.d.ts.map +1 -0
  37. package/dist/engagement.js +83 -0
  38. package/dist/engagement.js.map +1 -0
  39. package/dist/grant.d.ts +4 -2
  40. package/dist/grant.d.ts.map +1 -1
  41. package/dist/grant.js +21 -13
  42. package/dist/grant.js.map +1 -1
  43. package/dist/handoff.d.ts +42 -0
  44. package/dist/handoff.d.ts.map +1 -0
  45. package/dist/handoff.js +28 -0
  46. package/dist/handoff.js.map +1 -0
  47. package/dist/index.d.ts +30 -10
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +29 -5
  50. package/dist/index.js.map +1 -1
  51. package/dist/payment-gate.d.ts +69 -3
  52. package/dist/payment-gate.d.ts.map +1 -1
  53. package/dist/payment-gate.js +36 -5
  54. package/dist/payment-gate.js.map +1 -1
  55. package/dist/placeholder.d.ts +5 -0
  56. package/dist/placeholder.d.ts.map +1 -0
  57. package/dist/placeholder.js +10 -0
  58. package/dist/placeholder.js.map +1 -0
  59. package/dist/run-provenance-extension.d.ts +22 -0
  60. package/dist/run-provenance-extension.d.ts.map +1 -0
  61. package/dist/run-provenance-extension.js +23 -0
  62. package/dist/run-provenance-extension.js.map +1 -0
  63. package/dist/runtime.d.ts +13 -1
  64. package/dist/runtime.d.ts.map +1 -1
  65. package/dist/runtime.js +62 -16
  66. package/dist/runtime.js.map +1 -1
  67. package/dist/session-wire.d.ts +114 -0
  68. package/dist/session-wire.d.ts.map +1 -0
  69. package/dist/session-wire.js +292 -0
  70. package/dist/session-wire.js.map +1 -0
  71. package/dist/skill-handler.d.ts +21 -1
  72. package/dist/skill-handler.d.ts.map +1 -1
  73. package/dist/skill-handler.js.map +1 -1
  74. package/dist/standard/app-delegation.d.ts +60 -0
  75. package/dist/standard/app-delegation.d.ts.map +1 -0
  76. package/dist/standard/app-delegation.js +43 -0
  77. package/dist/standard/app-delegation.js.map +1 -0
  78. package/dist/standard/caller.d.ts +115 -0
  79. package/dist/standard/caller.d.ts.map +1 -0
  80. package/dist/standard/caller.js +186 -0
  81. package/dist/standard/caller.js.map +1 -0
  82. package/dist/standard/client.d.ts +64 -0
  83. package/dist/standard/client.d.ts.map +1 -0
  84. package/dist/standard/client.js +109 -0
  85. package/dist/standard/client.js.map +1 -0
  86. package/dist/standard/delegated.d.ts +127 -0
  87. package/dist/standard/delegated.d.ts.map +1 -0
  88. package/dist/standard/delegated.js +179 -0
  89. package/dist/standard/delegated.js.map +1 -0
  90. package/dist/standard/errors.d.ts +31 -0
  91. package/dist/standard/errors.d.ts.map +1 -0
  92. package/dist/standard/errors.js +75 -0
  93. package/dist/standard/errors.js.map +1 -0
  94. package/dist/standard/from-agent.d.ts +43 -0
  95. package/dist/standard/from-agent.d.ts.map +1 -0
  96. package/dist/standard/from-agent.js +149 -0
  97. package/dist/standard/from-agent.js.map +1 -0
  98. package/dist/standard/index.d.ts +12 -0
  99. package/dist/standard/index.d.ts.map +1 -0
  100. package/dist/standard/index.js +18 -0
  101. package/dist/standard/index.js.map +1 -0
  102. package/dist/standard/mount.d.ts +101 -0
  103. package/dist/standard/mount.d.ts.map +1 -0
  104. package/dist/standard/mount.js +186 -0
  105. package/dist/standard/mount.js.map +1 -0
  106. package/dist/standard/outbound-fetch.d.ts +51 -0
  107. package/dist/standard/outbound-fetch.d.ts.map +1 -0
  108. package/dist/standard/outbound-fetch.js +152 -0
  109. package/dist/standard/outbound-fetch.js.map +1 -0
  110. package/dist/standard/push-url-policy.d.ts +34 -0
  111. package/dist/standard/push-url-policy.d.ts.map +1 -0
  112. package/dist/standard/push-url-policy.js +218 -0
  113. package/dist/standard/push-url-policy.js.map +1 -0
  114. package/dist/standard/server.d.ts +150 -0
  115. package/dist/standard/server.d.ts.map +1 -0
  116. package/dist/standard/server.js +575 -0
  117. package/dist/standard/server.js.map +1 -0
  118. package/dist/standard/types.d.ts +186 -0
  119. package/dist/standard/types.d.ts.map +1 -0
  120. package/dist/standard/types.js +14 -0
  121. package/dist/standard/types.js.map +1 -0
  122. package/dist/subject-ask.d.ts +142 -0
  123. package/dist/subject-ask.d.ts.map +1 -0
  124. package/dist/subject-ask.js +137 -0
  125. package/dist/subject-ask.js.map +1 -0
  126. package/dist/subject-hop.d.ts +156 -0
  127. package/dist/subject-hop.d.ts.map +1 -0
  128. package/dist/subject-hop.js +276 -0
  129. package/dist/subject-hop.js.map +1 -0
  130. package/dist/task-store.d.ts +9 -3
  131. package/dist/task-store.d.ts.map +1 -1
  132. package/dist/task-store.js +12 -6
  133. package/dist/task-store.js.map +1 -1
  134. package/dist/types.d.ts +27 -2
  135. package/dist/types.d.ts.map +1 -1
  136. package/dist/types.js.map +1 -1
  137. package/dist/wire-verify.d.ts +35 -0
  138. package/dist/wire-verify.d.ts.map +1 -0
  139. package/dist/wire-verify.js +55 -0
  140. package/dist/wire-verify.js.map +1 -0
  141. package/package.json +35 -12
  142. package/dist/jsonrpc.d.ts +0 -25
  143. package/dist/jsonrpc.d.ts.map +0 -1
  144. package/dist/jsonrpc.js +0 -52
  145. package/dist/jsonrpc.js.map +0 -1
@@ -0,0 +1,156 @@
1
+ import { type SubjectAskV1, type SubjectAnswerV1, type PairwiseSubjectAskV1 } from './subject-ask.js';
2
+ import { type HandoffV1 } from './handoff.js';
3
+ import type { AgentCardV1, MessageV1, TaskV1 } from './standard/types.js';
4
+ import { type OutboundFetchLimits, type CardTrustOptions } from './standard/outbound-fetch.js';
5
+ /** The A2A 1.0 JSON-RPC endpoint a card publishes, or null when it publishes none. */
6
+ export declare function a2aEndpointOf(card: (Pick<AgentCardV1, 'supportedInterfaces'> & {
7
+ protocolVersion?: string;
8
+ }) | null | undefined): string | null;
9
+ /** The message that carries a subject-ask over the wire: the goal as text, the profile as metadata. */
10
+ export declare function subjectAskMessage(profile: SubjectAskV1 | PairwiseSubjectAskV1): MessageV1;
11
+ /** The subject-ask a received message carries, validated; null when it carries none. */
12
+ export declare function subjectAskOf(message: Pick<MessageV1, 'metadata'>): {
13
+ ask: SubjectAskV1;
14
+ } | {
15
+ errors: string[];
16
+ } | null;
17
+ /** Spec 442 §4.1 — the routed ask a received message carries, in EITHER form, validated: the credentialed profile
18
+ * (`ask`) or the pairwise one (`pairwise`). A receiver that admits pairwise askers reads with this; one that does not
19
+ * keeps `subjectAskOf`, which refuses a pairwise asker as malformed (fail closed). */
20
+ export declare function routedAskOf(message: Pick<MessageV1, 'metadata'>): {
21
+ ask: SubjectAskV1;
22
+ } | {
23
+ pairwise: PairwiseSubjectAskV1;
24
+ } | {
25
+ errors: string[];
26
+ } | null;
27
+ export declare const SUBJECT_ANSWER_ARTIFACT = "subject-answer";
28
+ /**
29
+ * Appendix M8 — THE RECEIVER'S RUN, NAMED BY THE SENDER. A routed step's run at the subject's agent is
30
+ * addressable before it answers, so the sender can read its progress while it runs and its record can
31
+ * cite it by reference. Derived from the correlation the sender minted; the receiver adopts it for a
32
+ * fresh ask (a resume names the run it continues instead).
33
+ */
34
+ export declare function routedRunRefFor(correlation: {
35
+ runRef: string;
36
+ stepRef: string;
37
+ }): string;
38
+ /** The receiver's `/harness/ask` envelope, as the task's `subject-answer` artifact carries it. */
39
+ export declare function subjectEnvelopeOf(task: Pick<TaskV1, 'artifacts'> | null | undefined): Record<string, unknown> | null;
40
+ export interface SubjectHopInput {
41
+ /** Spec 390 W2 — W3C Trace Context for the hop: the sender's trace, the routed step as the parent span. */
42
+ traceparent?: string;
43
+ tracestate?: string;
44
+ /** Where the subject's card is served (`https://<host>/.well-known/agent-card.json`). */
45
+ cardUrl: string;
46
+ profile: SubjectAskV1;
47
+ /** `atl:cardDigest` from the subject's name records — the sha256 of the released card's bytes. When the
48
+ * name pins one, a served card that differs is refused: the pin is the name's word about its card. */
49
+ pinnedDigest?: string;
50
+ /** The asker's Home session — the `Authorization` bearer, which is also the credential the profile names. */
51
+ /** The asker's Home session as the bearer; absent when the profile carries the forwarded app credential (spec 397 W4). */
52
+ session?: string;
53
+ /** Spec 442 §4.1 — the pairwise subject for an audience (`derivePairwiseSubject` over the person's vault secret). When
54
+ * the target's CARD declares the pairwise-asker extension, the hop sends the pairwise profile with this subject and NO
55
+ * bearer and NO credential — never `session`, never the profile's credential. A declaring card and no port here ⇒ the
56
+ * hop is refused (ADR-0013: no fallback to the credentialed form). A card that declares nothing ⇒ unchanged. */
57
+ pairwiseSubjectFor?: (audience: string) => Promise<string> | string;
58
+ fetch: (input: string, init: RequestInit) => Promise<Response>;
59
+ /** RUN-16 — deadline, size caps and URL policy of the two calls (defaults: 15 s; 256 KiB card, 4 MiB reply;
60
+ * public https only, no redirects). */
61
+ limits?: OutboundFetchLimits;
62
+ /** RUN-16 residual — a hop that carries a credential relies on the card for routing: set `relyOnCard` and bind
63
+ * `verifyCardSignature` to the agent's on-chain key, or pin the card (`pinnedDigest`). */
64
+ cardTrust?: CardTrustOptions;
65
+ }
66
+ /** `correlation` is what the RECEIVER was sent — on a pairwise hop a per-hop opaque one (RUNB-5), never the caller's.
67
+ * The caller keeps the mapping to its own run; it is present once a message was built. */
68
+ export type SubjectHopOutcome = {
69
+ ok: true;
70
+ endpoint: string;
71
+ task: TaskV1;
72
+ envelope: Record<string, unknown>;
73
+ correlation: SubjectAskV1['correlation'];
74
+ } | {
75
+ ok: false;
76
+ endpoint?: string;
77
+ refused: string;
78
+ status?: number;
79
+ task?: TaskV1;
80
+ correlation?: SubjectAskV1['correlation'];
81
+ };
82
+ /**
83
+ * RUNB-5 (spec 445 W0) — A PER-HOP, OPAQUE CORRELATION. What a routed step tells the other party about the run it
84
+ * belongs to is: nothing. `operationId` and `runRef` are one fresh random hop id; `stepRef` is constant; the
85
+ * `intentDigest` slot carries a salted commitment `sha256(salt ‖ intentDigest)` — different at every hop, and
86
+ * openable later by the sender (who keeps `salt`) to whoever it chooses to prove the intent to. Two receivers of
87
+ * hops from one run can no longer join them, and a receiver cannot join its record to the sender's.
88
+ * The sender keeps `{ sent, local, salt }` on ITS side — that is the only place the mapping exists.
89
+ */
90
+ export declare function perHopCorrelation(local: SubjectAskV1['correlation']): Promise<{
91
+ sent: SubjectAskV1['correlation'];
92
+ local: SubjectAskV1['correlation'];
93
+ salt: string;
94
+ }>;
95
+ /**
96
+ * The hop: fetch the card, take its 1.0 endpoint, send ONE message, read the artifact. A task that ended
97
+ * without the artifact is relayed in the receiver's status words (a rejection, a need), never retried.
98
+ */
99
+ export declare function sendSubjectAskOverWire(input: SubjectHopInput): Promise<SubjectHopOutcome>;
100
+ /** The message that delivers a finished routed act's outcome to the creditor's agent. */
101
+ export declare function subjectAnswerMessage(answer: SubjectAnswerV1): MessageV1;
102
+ /** The delivered answer a received message carries, structurally checked; null when it carries none. */
103
+ export declare function subjectAnswerOf(message: Pick<MessageV1, 'metadata'>): {
104
+ answer: SubjectAnswerV1;
105
+ } | {
106
+ errors: string[];
107
+ } | null;
108
+ export declare function handoffMessage(h: HandoffV1): MessageV1;
109
+ export declare function handoffOf(message: Pick<MessageV1, 'metadata'>): {
110
+ handoff: HandoffV1;
111
+ } | {
112
+ errors: string[];
113
+ } | null;
114
+ /** The `/harness/ask`-shaped envelope a receiver's `subject-answer` artifact carries. */
115
+ export type SubjectAnswerEnvelopeV1 = {
116
+ ok: true;
117
+ runRef: string;
118
+ reply: {
119
+ kind: 'answer';
120
+ runRef: string;
121
+ text: string;
122
+ results: Array<{
123
+ toolId: string;
124
+ result: unknown;
125
+ }>;
126
+ };
127
+ } | {
128
+ ok: false;
129
+ runRef: string;
130
+ error: string;
131
+ };
132
+ /**
133
+ * Shape a skill's result as the envelope the asker's runtime reads. The `toolId` is the capability the ask named (the
134
+ * asker finds its result by it), else the standard surface's own; the `runRef` is the receiver's run — the one the
135
+ * sender named (`routedRunRefFor`) unless the receiver had its own.
136
+ */
137
+ export declare function subjectAnswerEnvelope(ask: Pick<SubjectAskV1, 'correlation' | 'request'>, outcome: {
138
+ ok: true;
139
+ text: string;
140
+ result: unknown;
141
+ } | {
142
+ ok: false;
143
+ error: string;
144
+ }, opts?: {
145
+ runRef?: string;
146
+ toolId?: string;
147
+ }): SubjectAnswerEnvelopeV1;
148
+ /** The artifact a receiver attaches: `subjectEnvelopeOf(task)` on the asker's side reads exactly this back. */
149
+ /** Any `/harness/ask`-shaped envelope rides here unchanged — a harness's own reply (the runtime) or `subjectAnswerEnvelope`'s. */
150
+ export declare function subjectAnswerArtifact<E extends Record<string, unknown>>(envelope: E): {
151
+ name: typeof SUBJECT_ANSWER_ARTIFACT;
152
+ parts: Array<{
153
+ data: E;
154
+ }>;
155
+ };
156
+ //# sourceMappingURL=subject-hop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subject-hop.d.ts","sourceRoot":"","sources":["../src/subject-hop.ts"],"names":[],"mappings":"AAcA,OAAO,EAAuK,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC3Q,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAmJ,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChP,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,qBAAqB,CAAC,GAAG;IAAE,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAM/I;AAID,uGAAuG;AACvG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,oBAAoB,GAAG,SAAS,CAQzF;AAED,wFAAwF;AACxF,wBAAgB,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAAE,GAAG,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAKtH;AAED;;uFAEuF;AACvF,wBAAgB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAAE,GAAG,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,oBAAoB,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG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EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,KAAK,CAAC;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE,CAAA;CAAE,GAC1I;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,SAAS,CAAC,EAClD,OAAO,EAAE;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACnF,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,uBAAuB,CAKzB;AAED,+GAA+G;AAC/G,kIAAkI;AAClI,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,uBAAuB,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAA;CAAE,CAEzJ"}
@@ -0,0 +1,276 @@
1
+ // A ROUTED ASK ACROSS DEPLOYMENTS — spec 366 R4 / 374 §4 / 376. Promoted from the runtime app in spec 399 W0
2
+ // (§4): the HOP is protocol, every A2A service that routes a step to another agent makes it the same way.
3
+ //
4
+ // Inside one deployment a routed step (spec 366 R1) is made in-process. To an agent served ELSEWHERE the hop
5
+ // is a network call, and it rides the one wire there is (spec 372 S4): an A2A 1.0 `SendMessage` whose
6
+ // `message.metadata` carries the SUBJECT-ASK PROFILE (`SubjectAskV1`), and whose reply comes back as the
7
+ // task's `subject-answer` artifact — the receiver's own ask envelope, verbatim.
8
+ //
9
+ // Resolved through the card, not assumed: the caller says where the card is served, and the CARD says where
10
+ // the agent takes A2A 1.0 requests. A card that publishes no such interface is an agent that cannot be asked
11
+ // this way, and the sender says so — it never reads the subject's records locally instead (R3), and it never
12
+ // guesses a path (ADR-0013).
13
+ //
14
+ // Everything here is pure: the caller supplies `fetch`; nothing reads a store or a chain.
15
+ import { AP_SUBJECT_ASK_EXTENSION_URI, validateSubjectAsk, validatePairwiseSubjectAsk, isPairwiseSubjectAsk, pairwiseSubjectAsk, pairwiseAskerDeclaration, PAIRWISE_ASKER_RE } from './subject-ask.js';
16
+ import { AP_HANDOFF_EXTENSION_URI, validateHandoff } from './handoff.js';
17
+ import { fetchTextBounded, credentialDestinationRefusal, outboundUrlRefusalResolved, cardTrustRefusal, OUTBOUND_CARD_MAX_BYTES, OUTBOUND_REPLY_MAX_BYTES } from './standard/outbound-fetch.js';
18
+ /** The A2A 1.0 JSON-RPC endpoint a card publishes, or null when it publishes none. */
19
+ export function a2aEndpointOf(card) {
20
+ // A RELEASED card (the Studio's, signed) states the protocol version ONCE at the top; the live card
21
+ // states it per interface. Either says 1.x or the interface is not one this hop can use.
22
+ const top = /^1\./.test(String(card?.protocolVersion ?? ''));
23
+ const hit = (card?.supportedInterfaces ?? []).find((i) => i.protocolBinding === 'JSONRPC' && (/^1\./.test(String(i.protocolVersion ?? '')) || (i.protocolVersion === undefined && top)) && typeof i.url === 'string' && /^https:\/\//.test(i.url));
24
+ return hit?.url ?? null;
25
+ }
26
+ const hex32 = () => `0x${[...crypto.getRandomValues(new Uint8Array(32))].map((b) => b.toString(16).padStart(2, '0')).join('')}`;
27
+ /** The message that carries a subject-ask over the wire: the goal as text, the profile as metadata. */
28
+ export function subjectAskMessage(profile) {
29
+ return {
30
+ messageId: hex32(),
31
+ role: 'ROLE_USER',
32
+ parts: [{ text: profile.request.goal }],
33
+ extensions: [AP_SUBJECT_ASK_EXTENSION_URI],
34
+ metadata: { [AP_SUBJECT_ASK_EXTENSION_URI]: profile },
35
+ };
36
+ }
37
+ /** The subject-ask a received message carries, validated; null when it carries none. */
38
+ export function subjectAskOf(message) {
39
+ const raw = message.metadata?.[AP_SUBJECT_ASK_EXTENSION_URI];
40
+ if (raw === undefined)
41
+ return null;
42
+ const v = validateSubjectAsk(raw);
43
+ return v.ok ? { ask: v.ask } : { errors: v.errors };
44
+ }
45
+ /** Spec 442 §4.1 — the routed ask a received message carries, in EITHER form, validated: the credentialed profile
46
+ * (`ask`) or the pairwise one (`pairwise`). A receiver that admits pairwise askers reads with this; one that does not
47
+ * keeps `subjectAskOf`, which refuses a pairwise asker as malformed (fail closed). */
48
+ export function routedAskOf(message) {
49
+ const raw = message.metadata?.[AP_SUBJECT_ASK_EXTENSION_URI];
50
+ if (raw === undefined)
51
+ return null;
52
+ if (isPairwiseSubjectAsk(raw)) {
53
+ const v = validatePairwiseSubjectAsk(raw);
54
+ return v.ok ? { pairwise: v.ask } : { errors: v.errors };
55
+ }
56
+ const v = validateSubjectAsk(raw);
57
+ return v.ok ? { ask: v.ask } : { errors: v.errors };
58
+ }
59
+ export const SUBJECT_ANSWER_ARTIFACT = 'subject-answer';
60
+ /**
61
+ * Appendix M8 — THE RECEIVER'S RUN, NAMED BY THE SENDER. A routed step's run at the subject's agent is
62
+ * addressable before it answers, so the sender can read its progress while it runs and its record can
63
+ * cite it by reference. Derived from the correlation the sender minted; the receiver adopts it for a
64
+ * fresh ask (a resume names the run it continues instead).
65
+ */
66
+ export function routedRunRefFor(correlation) {
67
+ return `routed-${correlation.runRef}-${correlation.stepRef}`.replace(/[^A-Za-z0-9._:-]/g, '_');
68
+ }
69
+ /** The receiver's `/harness/ask` envelope, as the task's `subject-answer` artifact carries it. */
70
+ export function subjectEnvelopeOf(task) {
71
+ const art = (task?.artifacts ?? []).find((a) => a.name === SUBJECT_ANSWER_ARTIFACT);
72
+ const part = art?.parts.find((p) => p.data && typeof p.data === 'object' && !Array.isArray(p.data));
73
+ return part ? part.data : null;
74
+ }
75
+ const hex = (bytes) => [...bytes].map((b) => b.toString(16).padStart(2, '0')).join('');
76
+ /**
77
+ * RUNB-5 (spec 445 W0) — A PER-HOP, OPAQUE CORRELATION. What a routed step tells the other party about the run it
78
+ * belongs to is: nothing. `operationId` and `runRef` are one fresh random hop id; `stepRef` is constant; the
79
+ * `intentDigest` slot carries a salted commitment `sha256(salt ‖ intentDigest)` — different at every hop, and
80
+ * openable later by the sender (who keeps `salt`) to whoever it chooses to prove the intent to. Two receivers of
81
+ * hops from one run can no longer join them, and a receiver cannot join its record to the sender's.
82
+ * The sender keeps `{ sent, local, salt }` on ITS side — that is the only place the mapping exists.
83
+ */
84
+ export async function perHopCorrelation(local) {
85
+ const hopId = `hop_${hex(crypto.getRandomValues(new Uint8Array(16)))}`;
86
+ const salt = `0x${hex(crypto.getRandomValues(new Uint8Array(32)))}`;
87
+ const commitment = `0x${hex(new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(`${salt}:${local.intentDigest}`))))}`;
88
+ return { sent: { operationId: hopId, runRef: hopId, stepRef: 'hop', intentDigest: commitment }, local, salt };
89
+ }
90
+ /**
91
+ * The hop: fetch the card, take its 1.0 endpoint, send ONE message, read the artifact. A task that ended
92
+ * without the artifact is relayed in the receiver's status words (a rejection, a need), never retried.
93
+ */
94
+ export async function sendSubjectAskOverWire(input) {
95
+ let card = null;
96
+ try {
97
+ const { res, text } = await fetchTextBounded(input.fetch, input.cardUrl, { method: 'GET', headers: { accept: 'application/json' } }, { ...(input.limits ?? {}), maxBytes: OUTBOUND_CARD_MAX_BYTES });
98
+ if (!res.ok)
99
+ return { ok: false, refused: `its card at ${input.cardUrl} answered ${res.status}`, status: res.status };
100
+ if (input.pinnedDigest) {
101
+ const served = `0x${[...new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(text)))].map((b) => b.toString(16).padStart(2, '0')).join('')}`;
102
+ if (served !== input.pinnedDigest.toLowerCase())
103
+ return { ok: false, refused: `the card served at ${input.cardUrl} is not the one its name pins (atl:cardDigest ${input.pinnedDigest.slice(0, 12)}…, served ${served.slice(0, 12)}…)` };
104
+ }
105
+ card = JSON.parse(text);
106
+ const untrusted = await cardTrustRefusal(card, text, !!input.pinnedDigest, input.cardTrust);
107
+ if (untrusted)
108
+ return { ok: false, refused: untrusted };
109
+ }
110
+ catch (e) {
111
+ return { ok: false, refused: `its card at ${input.cardUrl} could not be read: ${e instanceof Error ? e.message : String(e)}` };
112
+ }
113
+ const endpoint = a2aEndpointOf(card);
114
+ if (!endpoint)
115
+ return { ok: false, refused: 'its card publishes no A2A 1.0 endpoint this agent can ask' };
116
+ const notCalled = await outboundUrlRefusalResolved(endpoint, input.limits);
117
+ if (notCalled)
118
+ return { ok: false, refused: `its card names an endpoint that is not called: ${notCalled}` };
119
+ // THE CARD DECIDES THE ASKER'S FORM (spec 442 §4.1). Declared ⇒ pairwise, always, or refused.
120
+ const declared = pairwiseAskerDeclaration(card);
121
+ let profile = input.profile;
122
+ let session = input.session;
123
+ if (declared) {
124
+ let cardOrigin = '';
125
+ try {
126
+ cardOrigin = new URL(input.cardUrl).origin;
127
+ }
128
+ catch { /* refused below */ }
129
+ if (new URL(declared.audience).origin !== cardOrigin)
130
+ return { ok: false, refused: `its card declares a pairwise audience (${declared.audience}) that is not on the card's own origin — refused, so no other service's pseudonym is handed out` };
131
+ if (!input.pairwiseSubjectFor)
132
+ return { ok: false, refused: 'its card asks for a pairwise asker and this sender has no pairwise subject to give — the credentialed form is never sent instead' };
133
+ let subject;
134
+ try {
135
+ subject = await input.pairwiseSubjectFor(declared.audience);
136
+ }
137
+ catch (e) {
138
+ return { ok: false, refused: `no pairwise subject could be derived for ${declared.audience}: ${e instanceof Error ? e.message : String(e)}` };
139
+ }
140
+ if (!PAIRWISE_ASKER_RE.test(subject))
141
+ return { ok: false, refused: 'the pairwise subject is not a usr_ subject — refused' };
142
+ // RUNB-5 — the pseudonym is per audience; the correlation must be per HOP, or two services (and the sender's own
143
+ // logs) join the pseudonyms of one run by `runRef` / `intentDigest` — the link the dropped trace context withholds.
144
+ const hop = await perHopCorrelation(input.profile.correlation);
145
+ profile = pairwiseSubjectAsk({ request: input.profile.request, asker: { pairwise: subject, audience: declared.audience }, correlation: hop.sent });
146
+ session = undefined;
147
+ }
148
+ const correlation = profile.correlation;
149
+ // RUNB-9 — A CREDENTIAL GOES ONLY WHERE THE CARD LIVES. The bearer, and a profile that carries the asker's credential,
150
+ // are sent to an endpoint on the card's own origin — or to the endpoint of a card the name PINS by digest (then the
151
+ // endpoint is the name's word). An unpinned card naming another origin is a redirect of the credential; refused here,
152
+ // in the package, not in each consumer.
153
+ const carriesCredential = ['home-session', 'app-delegation'].includes(String(input.profile.asker?.credential?.kind));
154
+ // Spec 445 §9 decision 8 — a credentialed card is asked WITH a credential or not at all: a profile with none (the old
155
+ // `{ kind: 'none' }`) is one no receiver accepts; refused here, before any byte is sent, saying why.
156
+ if (!declared && !session && !carriesCredential)
157
+ return { ok: false, endpoint, refused: 'its card takes a credentialed asker and this ask carries no credential — nothing was sent' };
158
+ const credentialed = !!session || (!declared && carriesCredential);
159
+ if (credentialed) {
160
+ const refused = credentialDestinationRefusal(input.cardUrl, endpoint, !!input.pinnedDigest);
161
+ if (refused)
162
+ return { ok: false, endpoint, refused };
163
+ }
164
+ // A pairwise hop carries no trace context: a `traceparent` is an id the sender's own runtime also logs, so it would
165
+ // join the service's record of this ask to hers — the one link the pseudonym exists to withhold.
166
+ const trace = declared ? {} : { ...(input.traceparent ? { traceparent: input.traceparent } : {}), ...(input.tracestate ? { tracestate: input.tracestate } : {}) };
167
+ const rpc = { jsonrpc: '2.0', id: 1, method: 'SendMessage', params: { message: subjectAskMessage(profile) } };
168
+ let res;
169
+ let text;
170
+ try {
171
+ ({ res, text } = await fetchTextBounded(input.fetch, endpoint, {
172
+ method: 'POST',
173
+ headers: { 'content-type': 'application/json', accept: 'application/json', 'a2a-version': '1.0', ...(session ? { authorization: `Bearer ${session}` } : {}), ...trace },
174
+ body: JSON.stringify(rpc),
175
+ }, { ...(input.limits ?? {}), maxBytes: input.limits?.maxBytes ?? OUTBOUND_REPLY_MAX_BYTES }));
176
+ }
177
+ catch (e) {
178
+ return { ok: false, endpoint, correlation, refused: `could not reach ${endpoint}: ${e instanceof Error ? e.message : String(e)}` };
179
+ }
180
+ const body = (() => { try {
181
+ return JSON.parse(text);
182
+ }
183
+ catch {
184
+ return null;
185
+ } })();
186
+ if (!body)
187
+ return { ok: false, endpoint, correlation, refused: `${endpoint} answered ${res.status} with no JSON-RPC body`, status: res.status };
188
+ if (body.error)
189
+ return { ok: false, endpoint, correlation, refused: `${endpoint} answered ${body.error.code}: ${body.error.message}`, status: res.status };
190
+ const task = body.result?.task;
191
+ if (!task)
192
+ return { ok: false, endpoint, correlation, refused: `${endpoint} answered with a message, not a task`, status: res.status };
193
+ const envelope = subjectEnvelopeOf(task);
194
+ if (envelope)
195
+ return { ok: true, endpoint, task, envelope, correlation };
196
+ const said = (task.status?.message?.parts ?? []).map((p) => (typeof p.text === 'string' ? p.text : '')).filter(Boolean).join(' ');
197
+ return { ok: false, endpoint, task, correlation, refused: `${task.status?.state ?? 'unknown state'}${said ? `: ${said}` : ''}`, status: res.status };
198
+ }
199
+ // ── The answer, delivered (spec 374 §4) ──────────────────────────────────────────────────────────────
200
+ //
201
+ // When a routed ACT finishes at the subject's agent — its steward signed, or refused — the outcome is
202
+ // DELIVERED to the creditor's agent as a message under the same extension URI: a `SubjectAnswerV1` whose
203
+ // `inResponseTo` names the creditor's own correlation. The two payloads share a URI and are told apart
204
+ // by shape (an ask has `request`; an answer has `inResponseTo`), so one metadata key carries both halves
205
+ // of one conversation.
206
+ const isAddr = (v) => typeof v === 'string' && /^0x[0-9a-fA-F]{40}$/.test(v);
207
+ /** The message that delivers a finished routed act's outcome to the creditor's agent. */
208
+ export function subjectAnswerMessage(answer) {
209
+ return {
210
+ messageId: hex32(),
211
+ role: 'ROLE_AGENT',
212
+ parts: [{ text: answer.said ?? (answer.outcome === 'answer' ? 'Done.' : answer.outcome) }],
213
+ extensions: [AP_SUBJECT_ASK_EXTENSION_URI],
214
+ metadata: { [AP_SUBJECT_ASK_EXTENSION_URI]: answer },
215
+ };
216
+ }
217
+ /** The delivered answer a received message carries, structurally checked; null when it carries none. */
218
+ export function subjectAnswerOf(message) {
219
+ const raw = message.metadata?.[AP_SUBJECT_ASK_EXTENSION_URI];
220
+ if (raw === undefined || raw === null || typeof raw !== 'object' || !('inResponseTo' in raw))
221
+ return null;
222
+ const errors = [];
223
+ if (raw.extension !== AP_SUBJECT_ASK_EXTENSION_URI)
224
+ errors.push(`extension: expected ${AP_SUBJECT_ASK_EXTENSION_URI}`);
225
+ if (raw.version !== 1)
226
+ errors.push('version: expected 1');
227
+ if (!isAddr(raw.agent))
228
+ errors.push('agent: an address');
229
+ const r = raw.inResponseTo;
230
+ if (!r || !['operationId', 'runRef', 'stepRef'].every((k) => typeof r[k] === 'string' && r[k]))
231
+ errors.push('inResponseTo: { operationId, runRef, stepRef }');
232
+ if (!['answer', 'refused', 'needs', 'error'].includes(String(raw.outcome)))
233
+ errors.push('outcome: answer | refused | needs | error');
234
+ if (!raw.run || typeof raw.run.runRef !== 'string')
235
+ errors.push('run.runRef: required');
236
+ return errors.length ? { errors } : { answer: raw };
237
+ }
238
+ // ── The hand-off (spec 376) ───────────────────────────────────────────────────────────────────────────
239
+ //
240
+ // One step, run elsewhere under a child mandate. Rides the one wire as a `SendMessage` whose metadata
241
+ // carries the hand-off profile; the specialist answers with the same `subject-answer` artifact a routed
242
+ // ask does, so the parent reads it with the same reader.
243
+ export function handoffMessage(h) {
244
+ return {
245
+ messageId: hex32(),
246
+ role: 'ROLE_USER',
247
+ parts: [{ text: h.intent.goal }],
248
+ extensions: [AP_HANDOFF_EXTENSION_URI],
249
+ metadata: { [AP_HANDOFF_EXTENSION_URI]: h },
250
+ };
251
+ }
252
+ export function handoffOf(message) {
253
+ const raw = message.metadata?.[AP_HANDOFF_EXTENSION_URI];
254
+ if (raw === undefined)
255
+ return null;
256
+ const v = validateHandoff(raw);
257
+ return v.ok ? { handoff: v.handoff } : { errors: v.errors };
258
+ }
259
+ /**
260
+ * Shape a skill's result as the envelope the asker's runtime reads. The `toolId` is the capability the ask named (the
261
+ * asker finds its result by it), else the standard surface's own; the `runRef` is the receiver's run — the one the
262
+ * sender named (`routedRunRefFor`) unless the receiver had its own.
263
+ */
264
+ export function subjectAnswerEnvelope(ask, outcome, opts = {}) {
265
+ const runRef = opts.runRef ?? routedRunRefFor(ask.correlation);
266
+ if (!outcome.ok)
267
+ return { ok: false, runRef, error: outcome.error };
268
+ const toolId = opts.toolId ?? ask.request.capability ?? 'harness.ask';
269
+ return { ok: true, runRef, reply: { kind: 'answer', runRef, text: outcome.text, results: [{ toolId, result: outcome.result }] } };
270
+ }
271
+ /** The artifact a receiver attaches: `subjectEnvelopeOf(task)` on the asker's side reads exactly this back. */
272
+ /** Any `/harness/ask`-shaped envelope rides here unchanged — a harness's own reply (the runtime) or `subjectAnswerEnvelope`'s. */
273
+ export function subjectAnswerArtifact(envelope) {
274
+ return { name: SUBJECT_ANSWER_ARTIFACT, parts: [{ data: envelope }] };
275
+ }
276
+ //# sourceMappingURL=subject-hop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subject-hop.js","sourceRoot":"","sources":["../src/subject-hop.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,0GAA0G;AAC1G,EAAE;AACF,6GAA6G;AAC7G,sGAAsG;AACtG,yGAAyG;AACzG,gFAAgF;AAChF,EAAE;AACF,4GAA4G;AAC5G,6GAA6G;AAC7G,6GAA6G;AAC7G,6BAA6B;AAC7B,EAAE;AACF,0FAA0F;AAC1F,OAAO,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AC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAC9D,CAAC;AAcD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,GAAkD,EAClD,OAAmF,EACnF,OAA6C,EAAE;IAE/C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/D,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACpE,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,aAAa,CAAC;IACtE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;AACpI,CAAC;AAED,+GAA+G;AAC/G,kIAAkI;AAClI,MAAM,UAAU,qBAAqB,CAAoC,QAAW;IAClF,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AACxE,CAAC"}
@@ -1,14 +1,20 @@
1
1
  import type { Hex } from '@agenticprimitives/types';
2
2
  import type { TaskRecord } from './types.js';
3
- export interface TaskStore {
3
+ import type { MessageIdReservation, MessageIdReserver } from './auth.js';
4
+ export interface TaskStore extends MessageIdReserver {
4
5
  /** Persist (insert or replace) a task record. */
5
6
  put(record: TaskRecord): Promise<void>;
6
7
  /** Load a task record, or null if unknown. */
7
8
  get(taskId: Hex): Promise<TaskRecord | null>;
8
9
  /** Task ids in a non-terminal state that are due for processing (drives the alarm loop). */
9
10
  listDue(now: number): Promise<Hex[]>;
10
- /** Single-use message-id reservation (FR-4.3 inbound replay guard). Returns false if already seen. */
11
- reserveMessageId(messageId: Hex, ttlSec: number): Promise<boolean>;
11
+ /** Every record this store holds, newest first, for enumerating tasks (spec 372 S4 — A2A 1.0's
12
+ * `ListTasks`). Optional: a store that cannot enumerate says so by omitting it, and a caller that
13
+ * needs a list must not pretend an empty one is an answer. */
14
+ list?(limit?: number): Promise<TaskRecord[]>;
15
+ /** Single-use message-id reservation (FR-4.3 inbound replay guard); two-phase per spec 290 §3.
16
+ * Returns `null` if already in-flight/consumed, else a reservation to commit (durable) / release. */
17
+ reserveMessageId(messageId: Hex, ttlSec: number): Promise<MessageIdReservation | null>;
12
18
  }
13
19
  /** Reference in-memory TaskStore — used by the test harness + non-Worker consumers. NOT for production
14
20
  * (no cross-isolate durability); the Cloudflare DO adapter is the durable implementation. */
@@ -1 +1 @@
1
- {"version":3,"file":"task-store.d.ts","sourceRoot":"","sources":["../src/task-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,SAAS;IACxB,iDAAiD;IACjD,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,8CAA8C;IAC9C,GAAG,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC,sGAAsG;IACtG,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED;8FAC8F;AAC9F,wBAAgB,uBAAuB,IAAI,SAAS,CA2BnD"}
1
+ {"version":3,"file":"task-store.d.ts","sourceRoot":"","sources":["../src/task-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,WAAW,SAAU,SAAQ,iBAAiB;IAClD,iDAAiD;IACjD,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,8CAA8C;IAC9C,GAAG,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC;;mEAE+D;IAC/D,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC7C;0GACsG;IACtG,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;CACxF;AAED;8FAC8F;AAC9F,wBAAgB,uBAAuB,IAAI,SAAS,CAiCnD"}
@@ -19,15 +19,21 @@ export function createInMemoryTaskStore() {
19
19
  async listDue() {
20
20
  return [...due];
21
21
  },
22
+ async list(limit) {
23
+ const all = [...tasks.values()].sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
24
+ return limit ? all.slice(0, limit) : all;
25
+ },
22
26
  async reserveMessageId(messageId, ttlSec) {
23
27
  const key = messageId.toLowerCase();
24
- const exp = seen.get(key);
25
- // `now` is injected by callers in tests; here we approximate with a monotonic-free check: a present
26
- // entry means used. (The durable adapter uses KV TTL.)
27
- if (exp !== undefined)
28
- return false;
28
+ // A present entry means in-flight OR consumed — either way a replay (deny). Otherwise mark in-flight.
29
+ // (`now`/TTL is approximate in-memory; the durable adapter uses real storage. Two-phase per §290.3:)
30
+ if (seen.has(key))
31
+ return null;
29
32
  seen.set(key, ttlSec);
30
- return true;
33
+ return {
34
+ async commit() { seen.set(key, ttlSec); }, // stays present → permanently consumed
35
+ async release() { seen.delete(key); }, // free the in-flight slot so a legit retry can re-reserve
36
+ };
31
37
  },
32
38
  };
33
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"task-store.js","sourceRoot":"","sources":["../src/task-store.ts"],"names":[],"mappings":"AAiBA;8FAC8F;AAC9F,MAAM,UAAU,uBAAuB;IACrC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC5C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkB,CAAC,CAAC,4BAA4B;IACpE,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,OAAO;QACL,KAAK,CAAC,GAAG,CAAC,MAAM;YACd,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,CAAC;YACpD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAC7C,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS;gBAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;;gBAClF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,MAAM;YACd,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2
  import type { Delegation } from '@agenticprimitives/delegation';
3
3
  import type { Task, TaskState, Artifact } from '@agenticprimitives/fulfillment';
4
4
  import type { HandoffRequest } from './skill-handler.js';
5
+ import type { AwaitedPaymentV1 } from './payment-gate.js';
5
6
  export type { Task, TaskState, Artifact };
6
7
  /** A2A-INV-04 — message/artifact bodies are vault records, never inline. A ref names where to read the
7
8
  * body (the assignee's per-agent demo-mcp vault namespace). The hash binds the content. */
8
9
  export interface VaultRef {
9
10
  /** SA whose vault namespace holds the record (the assignee). */
10
11
  owner: Address;
11
- /** demo-mcp record type, e.g. `a2a:msg:<taskId>` / `a2a:artifact:<artifactId>`. */
12
+ /** demo-mcp record type, e.g. `a2a:msg:<taskId>` / `a2a:artifact:<taskId>:<artifactId>` (an artifact's record is
13
+ * scoped to the task that emitted it — RUNB-2). */
12
14
  recordType: string;
13
15
  }
14
16
  /** An inbound A2A message (the request that creates a task, or a follow-up on a thread). Signed by the
@@ -25,7 +27,13 @@ export interface A2aMessage {
25
27
  bodyHash: Hex;
26
28
  /** Sender signature over the canonical message (A2A-INV-01). */
27
29
  signature: Hex;
30
+ /** Seconds since the epoch, signed. The receiving agent accepts it only inside a freshness window (RUNB-4). */
28
31
  createdAt: number;
32
+ /** RUNB-4 (spec 445 W0; MANDATORY since spec 445 §9 decision 8) — THE AGENT THIS MESSAGE IS FOR and the chain it
33
+ * speaks on, signed with the rest (`hashA2aMessage`, `a2a:message:v2`). Every message carries both: the receiver
34
+ * refuses a message that names no recipient or chain, and one that names another agent or another chain. */
35
+ recipient: Address;
36
+ chainId: number;
29
37
  }
30
38
  /** An A2A artifact = a fulfillment Artifact plus the vault ref to its body. */
31
39
  export interface A2aArtifact extends Artifact {
@@ -39,7 +47,8 @@ export interface TaskRecord {
39
47
  /** The SA that submitted the task (the delegate). */
40
48
  sender: Address;
41
49
  skill: string;
42
- /** The verified, captured grant — handed to the skill handler + re-checked on revocation (FR-3.3/FR-4.6). */
50
+ /** The verified, captured grant — handed to the skill handler, and RE-CHECKED (revocation + window) when the
51
+ * task is actually dispatched (FR-3.3/FR-4.6, RUNB-7): a grant revoked after acceptance does not run. */
43
52
  delegation: Delegation;
44
53
  inbound: A2aMessage[];
45
54
  artifacts: A2aArtifact[];
@@ -50,6 +59,22 @@ export interface TaskRecord {
50
59
  handoff?: HandoffRequest;
51
60
  /** Number of hand-offs this task has been through — checked against `HandoffPolicy.maxHopCount`. */
52
61
  hopCount?: number;
62
+ /** RUNB-6 — why a priced task is parked `input-required`: the `x402.payment.*` metadata the gate returned
63
+ * (what to pay), kept so the client can read it. Absent on a task that was never parked for payment. */
64
+ payment?: Record<string, unknown>;
65
+ /** Spec 445 §9 decision 8 — exactly what a payment-parked task waits for (set when it parks for payment). */
66
+ awaitingPayment?: AwaitedPaymentV1;
67
+ /** Spec 445 §9 decision 8 — the settlement that resumed this task: verified by the gate, matching `awaitingPayment`
68
+ * (same reference), consumed once. While it matches the skill's price the task runs without being gated again. */
69
+ paymentSettlement?: {
70
+ reference: Hex;
71
+ settlementId: string;
72
+ receiptRef?: unknown;
73
+ settledAt: number;
74
+ };
75
+ /** RUNB-8 — how many dispatch passes failed BEFORE the handler ran (an unreadable input, a gate or chain
76
+ * read that threw). Bounded: at the limit the task is rejected instead of being retried forever. */
77
+ dispatchAttempts?: number;
53
78
  /** Last error on a `failed` transition, surfaced to tasks/get. */
54
79
  error?: string;
55
80
  /** Monotonic version, bumped on every mutation — drives stream/idempotency. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,C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A;KAAE,CAAC;IACtG;yGACqG;IACrG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oCAAoC;AACpC,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,uDAAuD;AACvD,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACnF;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,GAAG,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,4EAA4E;AAC5E,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,SAAS,CAKjD,CAAC;AAEH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAEpD"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA8EA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,eAAe,GAA2B,IAAI,GAAG,CAAY;IACxE,WAAW;IACX,QAAQ;IACR,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,UAAU,UAAU,CAAC,KAAgB;IACzC,OAAO,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAkGA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,eAAe,GAA2B,IAAI,GAAG,CAAY;IACxE,WAAW;IACX,QAAQ;IACR,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,UAAU,UAAU,CAAC,KAAgB;IACzC,OAAO,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC"}