agentfootprint 11.2.0 → 11.3.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.
Files changed (157) hide show
  1. package/AGENTS.md +1 -1
  2. package/CAPABILITIES.md +2 -0
  3. package/ai-instructions/claude-code/SKILL.md +1 -1
  4. package/dist/adapters/identity/verify/claims.js +3 -3
  5. package/dist/adapters/mcp/agentcoreRuntime/invoke.js +3 -2
  6. package/dist/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -1
  7. package/dist/adapters/mcp/agentcoreRuntime/sessionBusy.js +6 -5
  8. package/dist/adapters/mcp/agentcoreRuntime/sessionBusy.js.map +1 -1
  9. package/dist/adapters/mcp/agentcoreRuntime/transport.js +8 -6
  10. package/dist/adapters/mcp/agentcoreRuntime/transport.js.map +1 -1
  11. package/dist/core/agent/buildToolRegistry.js +1 -1
  12. package/dist/core/agent/buildToolRegistry.js.map +1 -1
  13. package/dist/core/agent/evidence/evidenceIndex.js +30 -2
  14. package/dist/core/agent/evidence/evidenceIndex.js.map +1 -1
  15. package/dist/core/agent/evidence/extract.js +34 -5
  16. package/dist/core/agent/evidence/extract.js.map +1 -1
  17. package/dist/core/agent/evidence/figures.js +31 -3
  18. package/dist/core/agent/evidence/figures.js.map +1 -1
  19. package/dist/core/agent/evidence/numberPrecision.js +58 -2
  20. package/dist/core/agent/evidence/numberPrecision.js.map +1 -1
  21. package/dist/core/agent/stages/route.js +2 -1
  22. package/dist/core/agent/stages/route.js.map +1 -1
  23. package/dist/core/agent/stages/toolCalls.js +14 -1
  24. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  25. package/dist/core/slots/buildToolsSlot.js +1 -1
  26. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  27. package/dist/esm/adapters/identity/jwks.d.ts +2 -2
  28. package/dist/esm/adapters/identity/verify/claims.d.ts +3 -3
  29. package/dist/esm/adapters/identity/verify/claims.js +3 -3
  30. package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.d.ts +3 -2
  31. package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js +3 -2
  32. package/dist/esm/adapters/mcp/agentcoreRuntime/invoke.js.map +1 -1
  33. package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts +6 -5
  34. package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.js +6 -5
  35. package/dist/esm/adapters/mcp/agentcoreRuntime/sessionBusy.js.map +1 -1
  36. package/dist/esm/adapters/mcp/agentcoreRuntime/transport.d.ts +3 -1
  37. package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js +9 -7
  38. package/dist/esm/adapters/mcp/agentcoreRuntime/transport.js.map +1 -1
  39. package/dist/esm/core/agent/buildToolRegistry.js +1 -1
  40. package/dist/esm/core/agent/buildToolRegistry.js.map +1 -1
  41. package/dist/esm/core/agent/evidence/evidenceIndex.d.ts +12 -2
  42. package/dist/esm/core/agent/evidence/evidenceIndex.js +30 -2
  43. package/dist/esm/core/agent/evidence/evidenceIndex.js.map +1 -1
  44. package/dist/esm/core/agent/evidence/extract.js +35 -6
  45. package/dist/esm/core/agent/evidence/extract.js.map +1 -1
  46. package/dist/esm/core/agent/evidence/figures.d.ts +6 -0
  47. package/dist/esm/core/agent/evidence/figures.js +32 -4
  48. package/dist/esm/core/agent/evidence/figures.js.map +1 -1
  49. package/dist/esm/core/agent/evidence/numberPrecision.d.ts +28 -1
  50. package/dist/esm/core/agent/evidence/numberPrecision.js +56 -1
  51. package/dist/esm/core/agent/evidence/numberPrecision.js.map +1 -1
  52. package/dist/esm/core/agent/stages/route.js +2 -1
  53. package/dist/esm/core/agent/stages/route.js.map +1 -1
  54. package/dist/esm/core/agent/stages/toolCalls.js +14 -1
  55. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  56. package/dist/esm/core/slots/buildToolsSlot.js +1 -1
  57. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  58. package/dist/esm/events/payloads.d.ts +185 -0
  59. package/dist/esm/events/registry.d.ts +3 -1
  60. package/dist/esm/events/registry.js +2 -0
  61. package/dist/esm/events/registry.js.map +1 -1
  62. package/dist/esm/hosting/doorGuard.d.ts +3 -3
  63. package/dist/esm/hosting/doorGuard.js +2 -2
  64. package/dist/esm/hosting/nodeHost.d.ts +1 -1
  65. package/dist/esm/mcp/callLifetime.d.ts +49 -0
  66. package/dist/esm/mcp/callLifetime.js +99 -0
  67. package/dist/esm/mcp/callLifetime.js.map +1 -0
  68. package/dist/esm/mcp/mcpClient.d.ts +4 -1
  69. package/dist/esm/mcp/mcpClient.js +70 -28
  70. package/dist/esm/mcp/mcpClient.js.map +1 -1
  71. package/dist/esm/mcp/requestLedger.d.ts +97 -0
  72. package/dist/esm/mcp/requestLedger.js +192 -0
  73. package/dist/esm/mcp/requestLedger.js.map +1 -0
  74. package/dist/esm/mcp/seriesEvidence.d.ts +102 -0
  75. package/dist/esm/mcp/seriesEvidence.js +246 -0
  76. package/dist/esm/mcp/seriesEvidence.js.map +1 -0
  77. package/dist/esm/mcp/throttleRetry.d.ts +70 -35
  78. package/dist/esm/mcp/throttleRetry.js +181 -54
  79. package/dist/esm/mcp/throttleRetry.js.map +1 -1
  80. package/dist/esm/mcp/types.d.ts +12 -7
  81. package/dist/esm/redaction/knownStrings.js +29 -0
  82. package/dist/esm/redaction/knownStrings.js.map +1 -1
  83. package/dist/esm/security/PermissionPolicy.d.ts +1 -1
  84. package/dist/esm/security/PermissionPolicy.js +1 -1
  85. package/dist/esm/strategies/defaults/chatBubbleLiveStatus.d.ts +1 -1
  86. package/dist/esm/strategies/defaults/chatBubbleLiveStatus.js +1 -1
  87. package/dist/esm/tool-lint/analyze.d.ts +1 -1
  88. package/dist/esm/tool-lint/analyze.js +1 -1
  89. package/dist/esm/tool-lint/rules.d.ts +3 -3
  90. package/dist/esm/tool-lint/rules.js +3 -3
  91. package/dist/esm/tools/requestEvidence.d.ts +78 -0
  92. package/dist/esm/tools/requestEvidence.js +331 -0
  93. package/dist/esm/tools/requestEvidence.js.map +1 -0
  94. package/dist/events/registry.js +2 -0
  95. package/dist/events/registry.js.map +1 -1
  96. package/dist/hosting/doorGuard.js +2 -2
  97. package/dist/mcp/callLifetime.js +103 -0
  98. package/dist/mcp/callLifetime.js.map +1 -0
  99. package/dist/mcp/mcpClient.js +69 -27
  100. package/dist/mcp/mcpClient.js.map +1 -1
  101. package/dist/mcp/requestLedger.js +196 -0
  102. package/dist/mcp/requestLedger.js.map +1 -0
  103. package/dist/mcp/seriesEvidence.js +251 -0
  104. package/dist/mcp/seriesEvidence.js.map +1 -0
  105. package/dist/mcp/throttleRetry.js +184 -55
  106. package/dist/mcp/throttleRetry.js.map +1 -1
  107. package/dist/redaction/knownStrings.js +29 -0
  108. package/dist/redaction/knownStrings.js.map +1 -1
  109. package/dist/security/PermissionPolicy.js +1 -1
  110. package/dist/strategies/defaults/chatBubbleLiveStatus.js +1 -1
  111. package/dist/tool-lint/analyze.js +1 -1
  112. package/dist/tool-lint/rules.js +3 -3
  113. package/dist/tools/requestEvidence.js +337 -0
  114. package/dist/tools/requestEvidence.js.map +1 -0
  115. package/dist/types/adapters/identity/jwks.d.ts +2 -2
  116. package/dist/types/adapters/identity/verify/claims.d.ts +3 -3
  117. package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts +3 -2
  118. package/dist/types/adapters/mcp/agentcoreRuntime/invoke.d.ts.map +1 -1
  119. package/dist/types/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts +6 -5
  120. package/dist/types/adapters/mcp/agentcoreRuntime/sessionBusy.d.ts.map +1 -1
  121. package/dist/types/adapters/mcp/agentcoreRuntime/transport.d.ts +3 -1
  122. package/dist/types/adapters/mcp/agentcoreRuntime/transport.d.ts.map +1 -1
  123. package/dist/types/core/agent/evidence/evidenceIndex.d.ts +12 -2
  124. package/dist/types/core/agent/evidence/evidenceIndex.d.ts.map +1 -1
  125. package/dist/types/core/agent/evidence/extract.d.ts.map +1 -1
  126. package/dist/types/core/agent/evidence/figures.d.ts +6 -0
  127. package/dist/types/core/agent/evidence/figures.d.ts.map +1 -1
  128. package/dist/types/core/agent/evidence/numberPrecision.d.ts +28 -1
  129. package/dist/types/core/agent/evidence/numberPrecision.d.ts.map +1 -1
  130. package/dist/types/core/agent/stages/route.d.ts.map +1 -1
  131. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  132. package/dist/types/events/payloads.d.ts +185 -0
  133. package/dist/types/events/payloads.d.ts.map +1 -1
  134. package/dist/types/events/registry.d.ts +3 -1
  135. package/dist/types/events/registry.d.ts.map +1 -1
  136. package/dist/types/hosting/doorGuard.d.ts +3 -3
  137. package/dist/types/hosting/nodeHost.d.ts +1 -1
  138. package/dist/types/mcp/callLifetime.d.ts +50 -0
  139. package/dist/types/mcp/callLifetime.d.ts.map +1 -0
  140. package/dist/types/mcp/mcpClient.d.ts +4 -1
  141. package/dist/types/mcp/mcpClient.d.ts.map +1 -1
  142. package/dist/types/mcp/requestLedger.d.ts +98 -0
  143. package/dist/types/mcp/requestLedger.d.ts.map +1 -0
  144. package/dist/types/mcp/seriesEvidence.d.ts +103 -0
  145. package/dist/types/mcp/seriesEvidence.d.ts.map +1 -0
  146. package/dist/types/mcp/throttleRetry.d.ts +70 -35
  147. package/dist/types/mcp/throttleRetry.d.ts.map +1 -1
  148. package/dist/types/mcp/types.d.ts +12 -7
  149. package/dist/types/mcp/types.d.ts.map +1 -1
  150. package/dist/types/redaction/knownStrings.d.ts.map +1 -1
  151. package/dist/types/security/PermissionPolicy.d.ts +1 -1
  152. package/dist/types/strategies/defaults/chatBubbleLiveStatus.d.ts +1 -1
  153. package/dist/types/tool-lint/analyze.d.ts +1 -1
  154. package/dist/types/tool-lint/rules.d.ts +3 -3
  155. package/dist/types/tools/requestEvidence.d.ts +79 -0
  156. package/dist/types/tools/requestEvidence.d.ts.map +1 -0
  157. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
- * throttleRetry — when an MCP server refuses a request before running it, wait
4
- * and ask again.
3
+ * throttleRetry — when an MCP server refuses a request with a response the
4
+ * retry policy recognises (HTTP 429), wait and ask again.
5
5
  *
6
6
  * ── Why this exists ──────────────────────────────────────────────────────────
7
7
  * Managed MCP gateways enforce per-principal rate limits. A throttled
@@ -11,20 +11,24 @@
11
11
  * tool, or invents an answer. A designed, transient, self-clearing condition
12
12
  * was being turned into a wrong answer.
13
13
  *
14
- * ── Why retrying a 429 is safe, and why the policy is 429-ONLY ───────────────
15
- * **A 429 is a pre-execution rejection.** The rate limiter refused the request
16
- * at the edge; the server never ran the tool. Retrying therefore cannot
17
- * double-execute anything — which is exactly what is NOT true of a 500 or a
14
+ * ── What retrying a 429 assumes, and why the policy is 429-ONLY ─────────────
15
+ * **Automatic 429 retries assume the server rejected the request before
16
+ * executing it.** A rate limiter that refuses at the edge has not run the tool —
17
+ * but HTTP 429 says only that the request was rate-limited (RFC 6585 §4), so the
18
+ * saved response records the assumption's basis (the server's 429), not proof
19
+ * that nothing ran. There is no side-effect guard here: a tool with side
20
+ * effects is retried on 429 like any other today, and `retryOnThrottle: false`
21
+ * turns that off per server. What is certain is the contrast with a 500 or a
18
22
  * timeout, where the call may have half-run and a retry could charge a card
19
23
  * twice.
20
24
  *
21
- * That asymmetry is the whole license for this module, so the policy must never
22
- * widen. Only HTTP 429 retries here. Not 5xx, not network errors, not timeouts
25
+ * That assumption is the whole license for this module, so the policy must
26
+ * never widen. Only HTTP 429 retries here. Not 5xx, not network errors, not timeouts
23
27
  * — those belong to a caller who knows whether the specific tool is idempotent,
24
28
  * and this seam does not. A property test pins the boundary.
25
29
  *
26
30
  * The loop takes its question as a {@link RetryDecision}, so the one other
27
- * refusal a service DOCUMENTS as pre-execution — AgentCore Runtime's "session
31
+ * refusal a service documents as one to retry — AgentCore Runtime's "session
28
32
  * operation in progress" — reuses this loop rather than growing a second one.
29
33
  * That decision is applied only by that vendor's own transport; what
30
34
  * `mcpClient` and `retryingFetch` retry is still a 429 and nothing else.
@@ -47,10 +51,13 @@
47
51
  *
48
52
  * ── The loop is footprintjs's attempt runner, one series per call ────────────
49
53
  * Each call runs ONE `attempt()` series (footprintjs, used as it ships). Its
50
- * runner makes an attempt record per try; they stay inside this module for
51
- * now — only `onRetry`, before each wait, reaches a caller. An attempt sends
52
- * the request once, and an attempt that got a RESPONSE is not an operation
53
- * that succeeded: a 503 is delivered as the answer it was, never retried.
54
+ * runner makes an attempt record per try. `onRetry`, before each wait, is what
55
+ * reaches a caller; the RUN gets the records: for a call the agent dispatched,
56
+ * the series files every attempt and how the request ended into that call's
57
+ * run (`seriesEvidence.ts`, through the connection's `requestLedger.ts`). An
58
+ * attempt sends the request once, and an attempt that got a RESPONSE is not an
59
+ * operation that succeeded: a 503 is delivered as the answer it was, never
60
+ * retried — and written down as `answered` with its status, never success.
54
61
  * A response a rule's decision recognises is thrown as a refusal that names
55
62
  * its kind, and the policy's `retryOn` accepts those refusals and nothing
56
63
  * else — so a 5xx, a dropped connection or a timeout ends the series on the
@@ -85,10 +92,11 @@
85
92
  * Pattern: Decorator over `fetch`. Role: Layer-3 tool transport.
86
93
  */
87
94
  Object.defineProperty(exports, "__esModule", { value: true });
88
- exports.parseRetryAfter = exports.retryingFetchFor = exports.joinableRetry = exports.retryingFetch = exports.retryRule = exports.THROTTLE_RETRY_DEFAULTS = exports.throttled = void 0;
95
+ exports.parseRetryAfter = exports.retryingFetchFor = exports.ledgeredFetch = exports.joinableRetry = exports.joinedSpec = exports.retryingFetch = exports.retryRule = exports.THROTTLE_RETRY_DEFAULTS = exports.throttled = void 0;
89
96
  const footprintjs_1 = require("footprintjs");
90
97
  const abort_js_1 = require("../lib/abort.js");
91
98
  const backoff_js_1 = require("./backoff.js");
99
+ const seriesEvidence_js_1 = require("./seriesEvidence.js");
92
100
  /** HTTP 429, with the server's own `Retry-After` when it sent one. */
93
101
  function throttled(response) {
94
102
  if (response.status !== 429)
@@ -182,39 +190,58 @@ function retryingFetch(inner, config) {
182
190
  const rule = retryRule('throttle', throttled, config, exports.THROTTLE_RETRY_DEFAULTS, 'retryOnThrottle');
183
191
  if (rule === undefined)
184
192
  return inner;
185
- const join = inner === undefined ? undefined : JOINS.get(inner);
186
- return join !== undefined ? join(rule) : retryingFetchFor(inner ?? platformFetch, [rule]);
193
+ const rebuild = inner === undefined ? undefined : JOINS.get(inner);
194
+ return rebuild !== undefined
195
+ ? rebuild({ rule })
196
+ : retryingFetchFor(inner ?? platformFetch, { rules: [rule] });
187
197
  }
188
198
  exports.retryingFetch = retryingFetch;
199
+ /** @internal `spec` with `join` in it. */
200
+ function joinedSpec(spec, join) {
201
+ return 'rule' in join
202
+ ? { ...spec, rules: [...spec.rules, join.rule] }
203
+ : { ...spec, ledger: join.ledger };
204
+ }
205
+ exports.joinedSpec = joinedSpec;
189
206
  /**
190
207
  * Fetches that run their retries in one series, each with the way to rebuild
191
- * it with one more rule. Module-private: only `joinableRetry` adds to it, so a
192
- * caller cannot make a fetch claim a series it does not run.
208
+ * it with one more rule or a ledger. Module-private: only `joinableRetry` adds
209
+ * to it, so a caller cannot make a fetch claim a series it does not run.
193
210
  */
194
211
  const JOINS = new WeakMap();
195
212
  /**
196
213
  * @internal Declare that `fetch` runs its retries in ONE series, and how to
197
- * rebuild it with one more rule in that same series. `retryingFetch` joins such
198
- * a fetch instead of wrapping it. A transport whose public fetch wraps its
199
- * series (a session applied around it, its answers rewritten after it) uses
200
- * this so the rule lands INSIDE that wrapping.
214
+ * rebuild it with one more rule — or with a ledger — in that same series.
215
+ * `retryingFetch` joins such a fetch instead of wrapping it. A transport whose
216
+ * public fetch wraps its series (a session applied around it, its answers
217
+ * rewritten after it) uses this so the rule lands INSIDE that wrapping.
201
218
  */
202
- function joinableRetry(fetch, join) {
203
- JOINS.set(fetch, join);
219
+ function joinableRetry(fetch, rebuild) {
220
+ JOINS.set(fetch, rebuild);
204
221
  return fetch;
205
222
  }
206
223
  exports.joinableRetry = joinableRetry;
207
224
  /**
208
- * @internal The one series per call over `inner`, asking `rules` in order —
225
+ * @internal `fetch` rebuilt so its series files each request's attempts through
226
+ * `ledger` — or `undefined` when `fetch` runs no series (retry off), so there
227
+ * is nothing to file and the caller keeps `fetch` as it is.
228
+ */
229
+ function ledgeredFetch(fetch, ledger) {
230
+ return JOINS.get(fetch)?.({ ledger });
231
+ }
232
+ exports.ledgeredFetch = ledgeredFetch;
233
+ /**
234
+ * @internal The one series per call over `inner`, asking `spec.rules` in order —
209
235
  * `inner` itself when there are none. The first rule holds the call's budget;
210
236
  * see the module note. The result is joinable.
211
237
  */
212
- function retryingFetchFor(inner, rules) {
238
+ function retryingFetchFor(inner, spec) {
239
+ const { rules, ledger } = spec;
213
240
  const [owner] = rules;
214
241
  if (owner === undefined)
215
242
  return inner;
216
243
  const bound = rules.map((rule) => boundRule(rule, owner));
217
- return joinableRetry((input, init) => new Series(bound, input, init).run(inner), (rule) => retryingFetchFor(inner, [...rules, rule]));
244
+ return joinableRetry((input, init) => new Series(bound, input, init, ledger).run(inner), (join) => retryingFetchFor(inner, joinedSpec(spec, join)));
218
245
  }
219
246
  exports.retryingFetchFor = retryingFetchFor;
220
247
  /** The platform's fetch, looked up at call time so a later polyfill still wins. */
@@ -245,7 +272,8 @@ function retryAfterOf(error) {
245
272
  const SERIES_TARGET = 'mcp-request';
246
273
  /**
247
274
  * One call: one `attempt()` series, and what its policy's functions share while
248
- * it runs — the waiting so far, and the latest refusal.
275
+ * it runs — the waiting so far, the latest refusal, and, for a call the agent
276
+ * dispatched, where its attempts are filed.
249
277
  */
250
278
  class Series {
251
279
  rules;
@@ -254,13 +282,31 @@ class Series {
254
282
  owner;
255
283
  startedAt = Date.now();
256
284
  deadline;
285
+ /** The transport's own signal — what the request carried before this series existed. */
257
286
  signal;
287
+ /**
288
+ * What ends the series as a CANCELLATION: the transport's signal; the MCP
289
+ * SDK cancelling this request (`notifications/cancelled`, seen by the ledger,
290
+ * whether or not the request was matched to a call); and, for a call the
291
+ * agent dispatched, the call's own — its signal, the client's, its settling.
292
+ */
293
+ cancel;
294
+ /** Whether a request in flight is cut by more than the transport's own signal. */
295
+ cutsInFlight;
296
+ /** Where this request's attempts are filed — a call the agent dispatched. */
297
+ evidence;
258
298
  replayable;
259
299
  attemptNo = 0;
260
300
  waitedMs = 0;
261
301
  plannedWaitMs = 0;
262
302
  latest;
263
- constructor(rules, input, init) {
303
+ /** The current attempt's response status, before the runner records it. */
304
+ seen;
305
+ /** Why `retryOn` last said no. */
306
+ declined;
307
+ /** The attempt sent and not yet recorded — what a cancellation cuts in flight. */
308
+ inFlight;
309
+ constructor(rules, input, init, ledger) {
264
310
  this.rules = rules;
265
311
  this.input = input;
266
312
  this.init = init;
@@ -269,14 +315,50 @@ class Series {
269
315
  this.replayable = isReplayable(input, init);
270
316
  const { maxElapsedMs } = this.owner;
271
317
  this.deadline = Number.isFinite(maxElapsedMs) ? this.startedAt + maxElapsedMs : undefined;
318
+ const claimed = ledger?.claim(init?.body);
319
+ const ticket = claimed?.ticket;
320
+ this.cancel = (0, abort_js_1.eitherSignal)(this.signal, ticket?.signal, claimed?.cancelled);
321
+ this.cutsInFlight = this.deadline !== undefined || claimed !== undefined;
322
+ this.evidence =
323
+ ticket === undefined ? undefined : new seriesEvidence_js_1.SeriesEvidence(ticket.sink, whereOf(rules, input));
272
324
  }
273
325
  async run(inner) {
326
+ const unwatch = this.watchCancel();
274
327
  try {
275
- return await (0, footprintjs_1.attempt)((t) => this.send(inner, t), this.policy(), this.options());
328
+ const response = await (0, footprintjs_1.attempt)((t) => this.send(inner, t), this.policy(), this.options());
329
+ this.evidence?.delivered();
330
+ return response;
276
331
  }
277
332
  catch (error) {
278
333
  return this.settle(error);
279
334
  }
335
+ finally {
336
+ unwatch();
337
+ }
338
+ }
339
+ /**
340
+ * File a cancellation the MOMENT it lands. A cancelled run stops waiting for
341
+ * its stage at once; a record filed when this series later unwinds would land
342
+ * after the run was saved. The runner records nothing for the attempt it
343
+ * abandons then, or for a wait it was cut out of, so this is also the only
344
+ * place those are written down.
345
+ */
346
+ watchCancel() {
347
+ const { cancel } = this;
348
+ if (cancel === undefined || this.evidence === undefined || cancel.aborted) {
349
+ return () => undefined;
350
+ }
351
+ const onAbort = () => this.fileCancellation();
352
+ cancel.addEventListener('abort', onAbort, { once: true });
353
+ return () => cancel.removeEventListener('abort', onAbort);
354
+ }
355
+ /** A cancellation, written down: the attempt it cut in flight, or the wait. */
356
+ fileCancellation() {
357
+ const { evidence, inFlight } = this;
358
+ if (inFlight !== undefined)
359
+ evidence?.cutInFlight(inFlight);
360
+ else
361
+ evidence?.cancelled();
280
362
  }
281
363
  /**
282
364
  * The owner's budget as footprintjs reads it; the rest is this series'
@@ -296,7 +378,7 @@ class Series {
296
378
  options() {
297
379
  return {
298
380
  target: SERIES_TARGET,
299
- ...(this.signal !== undefined && { signal: this.signal }),
381
+ ...(this.cancel !== undefined && { signal: this.cancel }),
300
382
  ...(this.deadline !== undefined && { deadline: this.deadline }),
301
383
  onAttempt: (record) => this.report(record),
302
384
  };
@@ -305,25 +387,30 @@ class Series {
305
387
  * One attempt: the request, sent once, and its answer classified. A refusal
306
388
  * a rule recognises is thrown for the runner to decide on.
307
389
  *
308
- * With no deadline of ours the request carries the caller's own `init`,
309
- * exactly as before this series existed. Under a deadline the runner can cut
310
- * the attempt before it is ANSWERED — and an answer is not in until it has
311
- * been classified, which can mean reading its body (a session-busy reply is
312
- * JSON in a 200). So the cut stays connected through the classification: a
313
- * stall in the request or in that body stops the request and releases the
314
- * body. Only then does it let go: an answer handed back to the caller keeps
390
+ * With no deadline of ours and no call to answer to, the request carries the
391
+ * caller's own `init`, exactly as before this series existed. Otherwise the
392
+ * runner can cut the attempt before it is ANSWERED — the deadline, or the
393
+ * dispatched call's cancellation — and an answer is not in until it has been
394
+ * classified, which can mean reading its body (a session-busy reply is JSON
395
+ * in a 200). So the cut stays connected through the classification: a stall
396
+ * in the request or in that body stops the request and releases the body.
397
+ * Only then does it let go: an answer handed back to the caller keeps
315
398
  * streaming for as long as the caller's own signal allows.
316
399
  */
317
400
  async send(inner, t) {
318
401
  this.attemptNo = t.attempt;
402
+ // From here the request is SENT — counted, as a row, however the attempt ends.
403
+ this.inFlight = t.attempt;
404
+ this.seen = undefined;
319
405
  // The previous attempt's refusal will not be delivered: release its body, so
320
406
  // a keep-alive connection is not pinned by an unread stream.
321
407
  this.supersede();
322
- const cut = this.deadline === undefined ? undefined : (0, abort_js_1.linkedController)(t.signal);
408
+ const cut = this.cutsInFlight ? (0, abort_js_1.linkedController)(t.signal) : undefined;
323
409
  const signal = (0, abort_js_1.eitherSignal)(this.signal, cut?.controller.signal);
324
410
  try {
325
411
  const init = cut === undefined ? this.init : { ...this.init, ...(signal && { signal }) };
326
412
  const response = await inner(this.input, init);
413
+ this.seen = { attempt: t.attempt, status: response.status };
327
414
  const refused = await this.recognise(response, signal);
328
415
  if (refused === undefined)
329
416
  return response;
@@ -356,44 +443,59 @@ class Series {
356
443
  }
357
444
  /**
358
445
  * The runner's `retryOn`: is this attempt's error a refusal worth another
359
- * attempt? Plans the wait as it answers, because the ceilings need its length.
446
+ * attempt? Plans the wait as it answers, because the ceilings need its length,
447
+ * and keeps why it said no, for the record.
360
448
  */
361
449
  retryOn(error) {
362
450
  this.plannedWaitMs = 0;
363
451
  const refused = this.latest;
364
- // The license: only a refusal made before the server ran anything. A 5xx, a
365
- // dropped connection or a timeout may be the record of work that ran.
452
+ // The license: only a response a rule recognises as a refusal (the 429
453
+ // assumption — see the module note). A 5xx, a dropped connection or a
454
+ // timeout may be the record of work that ran.
366
455
  if (refused === undefined || error !== refused.refusal)
367
- return false;
456
+ return this.decline('not-retryable');
368
457
  // A body we cannot send twice makes a retry a different request. Rare for
369
458
  // MCP (JSON strings), but silently replaying half a stream would be worse
370
459
  // than surfacing the refusal.
371
460
  if (!this.replayable)
372
- return false;
461
+ return this.decline('not-replayable');
373
462
  const { rule } = refused;
374
463
  if (this.attemptNo >= rule.maxAttempts)
375
- return false;
464
+ return this.decline('exhausted');
376
465
  // The stated wait whole, else the schedule under `maxDelayMs`.
377
466
  const waitMs = rule.backoffMs(this.attemptNo, error);
378
467
  // The rail on Retry-After: never let a server talk us into a wait that
379
468
  // breaks the caller's budget. It stops the series; it never shortens the
380
469
  // wait. Past the deadline, the runner stops it the same way (`no-time-left`).
381
470
  if (this.waitedMs + waitMs > rule.maxWaitMs)
382
- return false;
471
+ return this.decline('wait-limit');
383
472
  // A joined rule's own, sooner deadline. The owner's is the runner's to hold.
384
473
  if (rule.maxElapsedMs < this.owner.maxElapsedMs &&
385
474
  this.elapsedAfter(waitMs) > rule.maxElapsedMs) {
386
- return false;
475
+ return this.decline('no-time-left');
387
476
  }
477
+ this.declined = undefined;
388
478
  this.plannedWaitMs = waitMs;
389
479
  return true;
390
480
  }
481
+ decline(reason) {
482
+ this.declined = reason;
483
+ return false;
484
+ }
391
485
  elapsedAfter(waitMs) {
392
486
  return Date.now() - this.startedAt + waitMs;
393
487
  }
394
- /** Each record as the runner ends an attempt: a retry is counted and reported to its rule. */
488
+ /**
489
+ * Each record as the runner ends an attempt: written down for the call's run
490
+ * first, then — for a retry — counted and reported to its rule. The record
491
+ * goes first because `onRetry` is the caller's, and a throw from it must not
492
+ * cost the run its evidence.
493
+ */
395
494
  report(record) {
396
495
  const refused = this.latest;
496
+ if (this.inFlight === record.attempt)
497
+ this.inFlight = undefined;
498
+ this.evidence?.attempt(record, this.seenOf(record, refused), this.declined);
397
499
  if (record.next !== 'retry' || refused === undefined)
398
500
  return;
399
501
  const waitMs = record.delayMs ?? 0;
@@ -409,18 +511,37 @@ class Series {
409
511
  ...(rule.endpointLabel !== undefined && { endpoint: rule.endpointLabel }),
410
512
  });
411
513
  }
514
+ /** What this series saw of the attempt `record` ends: its status, and the refusal it threw. */
515
+ seenOf(record, refused) {
516
+ const seen = this.seen;
517
+ if (seen === undefined || seen.attempt !== record.attempt)
518
+ return undefined;
519
+ // `latest` is cleared as each attempt starts, so a refusal here is this attempt's.
520
+ const { kind } = refused?.rule ?? {};
521
+ const retryAfterMs = refused?.verdict.retryAfterMs;
522
+ return {
523
+ status: seen.status,
524
+ ...(kind !== undefined && {
525
+ refusal: { kind, ...(retryAfterMs !== undefined && { retryAfterMs }) },
526
+ }),
527
+ };
528
+ }
412
529
  /** How the call ends when the series did not answer. */
413
530
  settle(error) {
414
531
  // The caller's cancellation wins: the call ends with their reason, and the
415
532
  // refusal nobody is waiting for any more is released.
416
- if (this.signal?.aborted) {
533
+ if (this.cancel?.aborted) {
534
+ this.fileCancellation();
417
535
  this.supersede();
418
- throw (0, abort_js_1.abortErrorOf)(this.signal);
536
+ throw (0, abort_js_1.abortErrorOf)(this.cancel);
419
537
  }
420
538
  // The series ended on a refusal — attempts spent, a ceiling reached, no
421
539
  // time left. The server's answer is delivered as it sent it.
422
- if (this.latest !== undefined && error === this.latest.refusal)
540
+ if (this.latest !== undefined && error === this.latest.refusal) {
541
+ this.evidence?.delivered();
423
542
  return this.latest.response;
543
+ }
544
+ this.evidence?.threw(this.deadline !== undefined && Date.now() >= this.deadline);
424
545
  throw error;
425
546
  }
426
547
  supersede() {
@@ -429,9 +550,17 @@ class Series {
429
550
  this.latest = undefined;
430
551
  }
431
552
  }
553
+ /** Where a series' requests go, as its evidence may say it: a label the app declared, or the origin. */
554
+ function whereOf(rules, input) {
555
+ const label = rules.find((rule) => rule.endpointLabel !== undefined)?.endpointLabel;
556
+ if (label !== undefined)
557
+ return { endpoint: label };
558
+ const origin = originOf(input);
559
+ return origin === '' ? {} : { origin };
560
+ }
432
561
  /**
433
- * A response a rule recognised as a refusal made before anything ran, thrown so
434
- * the attempt runner decides on it. It carries only what an attempt record may
562
+ * A response a rule recognised as a refusal (a 429, a session-busy reply), thrown
563
+ * so the attempt runner decides on it. It carries only what an attempt record may
435
564
  * keep: a fixed sentence, its kind as `code`, a 429's status and the wait the
436
565
  * server stated. Never the server's text, the request or the response — the
437
566
  * series holds the response, not the error.
@@ -450,8 +579,8 @@ class RetryableRefusal extends Error {
450
579
  }
451
580
  }
452
581
  const REFUSAL_SENTENCES = {
453
- throttle: 'The server refused the request with HTTP 429 before running it.',
454
- 'session-busy': 'AgentCore Runtime refused the request while its session was starting or stopping, before running it.',
582
+ throttle: 'The server answered with HTTP 429, a response the retry policy recognises as a refusal. It is recorded as sent, which is not proof that nothing ran.',
583
+ 'session-busy': 'AgentCore Runtime answered that its session was starting or stopping, a response the retry policy recognises as a refusal. It is recorded as sent, which is not proof that nothing ran.',
455
584
  };
456
585
  // ─── Helpers ─────────────────────────────────────────────────────────
457
586
  /** Reads one rule's numeric options, refusing by name what the schedule cannot mean. */
@@ -1 +1 @@
1
- {"version":3,"file":"throttleRetry.js","sourceRoot":"","sources":["../../src/mcp/throttleRetry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;;;AAEH,6CAMqB;AAErB,8CAA+E;AAC/E,6CAAyF;AAkLzF,sEAAsE;AACtE,SAAgB,SAAS,CAAC,QAAkB;IAC1C,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG;QAAE,OAAO,SAAS,CAAC;IAC9C,MAAM,YAAY,GAAG,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;IAC1E,OAAO,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC;AAC5D,CAAC;AAJD,8BAIC;AAkBD;;;;GAIG;AACU,QAAA,uBAAuB,GAAkB,MAAM,CAAC,MAAM,CAAC;IAClE,WAAW,EAAE,CAAC;IACd,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AAsBH;;;;;;;;GAQG;AACH,SAAgB,SAAS,CACvB,IAAe,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