agentfootprint 6.20.0 → 6.22.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 (59) hide show
  1. package/dist/adapters/identity/agentcore.js +54 -8
  2. package/dist/adapters/identity/agentcore.js.map +1 -1
  3. package/dist/core/Agent.js +19 -0
  4. package/dist/core/Agent.js.map +1 -1
  5. package/dist/core/humanizeLLMError.js +7 -3
  6. package/dist/core/humanizeLLMError.js.map +1 -1
  7. package/dist/core/runCheckpoint.js +13 -3
  8. package/dist/core/runCheckpoint.js.map +1 -1
  9. package/dist/core-flow/Loop.js +4 -0
  10. package/dist/core-flow/Loop.js.map +1 -1
  11. package/dist/esm/adapters/identity/agentcore.js +54 -8
  12. package/dist/esm/adapters/identity/agentcore.js.map +1 -1
  13. package/dist/esm/core/Agent.js +19 -0
  14. package/dist/esm/core/Agent.js.map +1 -1
  15. package/dist/esm/core/humanizeLLMError.js +7 -3
  16. package/dist/esm/core/humanizeLLMError.js.map +1 -1
  17. package/dist/esm/core/runCheckpoint.js +13 -3
  18. package/dist/esm/core/runCheckpoint.js.map +1 -1
  19. package/dist/esm/core-flow/Loop.js +4 -0
  20. package/dist/esm/core-flow/Loop.js.map +1 -1
  21. package/dist/esm/identity/withCredentialRetry.js +98 -0
  22. package/dist/esm/identity/withCredentialRetry.js.map +1 -0
  23. package/dist/esm/identity.js +1 -0
  24. package/dist/esm/identity.js.map +1 -1
  25. package/dist/esm/lib/injection-engine/skillGraph.js +64 -0
  26. package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
  27. package/dist/esm/resilience/withCircuitBreaker.js +16 -0
  28. package/dist/esm/resilience/withCircuitBreaker.js.map +1 -1
  29. package/dist/esm/resilience/withRetry.js +6 -1
  30. package/dist/esm/resilience/withRetry.js.map +1 -1
  31. package/dist/identity/withCredentialRetry.js +102 -0
  32. package/dist/identity/withCredentialRetry.js.map +1 -0
  33. package/dist/identity.js +3 -1
  34. package/dist/identity.js.map +1 -1
  35. package/dist/lib/injection-engine/skillGraph.js +64 -0
  36. package/dist/lib/injection-engine/skillGraph.js.map +1 -1
  37. package/dist/resilience/withCircuitBreaker.js +16 -0
  38. package/dist/resilience/withCircuitBreaker.js.map +1 -1
  39. package/dist/resilience/withRetry.js +7 -1
  40. package/dist/resilience/withRetry.js.map +1 -1
  41. package/dist/types/adapters/identity/agentcore.d.ts +46 -2
  42. package/dist/types/adapters/identity/agentcore.d.ts.map +1 -1
  43. package/dist/types/core/Agent.d.ts +19 -0
  44. package/dist/types/core/Agent.d.ts.map +1 -1
  45. package/dist/types/core/humanizeLLMError.d.ts.map +1 -1
  46. package/dist/types/core/runCheckpoint.d.ts +21 -8
  47. package/dist/types/core/runCheckpoint.d.ts.map +1 -1
  48. package/dist/types/core-flow/Loop.d.ts +24 -1
  49. package/dist/types/core-flow/Loop.d.ts.map +1 -1
  50. package/dist/types/identity/withCredentialRetry.d.ts +65 -0
  51. package/dist/types/identity/withCredentialRetry.d.ts.map +1 -0
  52. package/dist/types/identity.d.ts +1 -0
  53. package/dist/types/identity.d.ts.map +1 -1
  54. package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
  55. package/dist/types/resilience/withCircuitBreaker.d.ts +16 -0
  56. package/dist/types/resilience/withCircuitBreaker.d.ts.map +1 -1
  57. package/dist/types/resilience/withRetry.d.ts +18 -3
  58. package/dist/types/resilience/withRetry.d.ts.map +1 -1
  59. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"withCircuitBreaker.d.ts","sourceRoot":"","sources":["../../../src/resilience/withCircuitBreaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,KAAK,EAAY,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAI3F,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,CAAC,EA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EAAE,MAAM,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAC3C;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACnD;6DACyD;IACzD,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAI3D;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,qBAA+B;IAC5C;+CAC2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAChB,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM;CAYrE;AAYD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,yBAA8B,GACtC,WAAW,CA0Hb"}
@@ -35,9 +35,11 @@ export interface WithRetryOptions {
35
35
  */
36
36
  readonly shouldRetry?: (error: unknown, attempt: number) => boolean;
37
37
  /**
38
- * Hook invoked before each retry. Useful for logging or
39
- * `agentfootprint.resilience.retry` emit. Receives the attempt
40
- * number that's about to start (so attempt 2 = first retry).
38
+ * Hook invoked before each retry. Useful for logging or an
39
+ * `agentfootprint.error.retried` emit (the event family reserved for
40
+ * the standalone provider decorators see events/payloads.ts).
41
+ * Receives the attempt number that's about to start (so attempt 2 =
42
+ * first retry).
41
43
  */
42
44
  readonly onRetry?: (error: unknown, attempt: number, delayMs: number) => void;
43
45
  }
@@ -54,4 +56,17 @@ export interface WithRetryOptions {
54
56
  * });
55
57
  */
56
58
  export declare function withRetry(provider: LLMProvider, options?: WithRetryOptions): LLMProvider;
59
+ /**
60
+ * Skip retry for AbortError + 4xx-class errors. Retry on everything
61
+ * else (network errors, 5xx, unknown shapes). Provider adapters that
62
+ * surface HTTP status should set `error.status` for this to work; the
63
+ * predicate falls back to retrying when status is unknown (better to
64
+ * retry once than to surface a flaky failure).
65
+ *
66
+ * Exported (module-level, NOT on the resilience barrel) as the single
67
+ * source of truth for the decorators' transience policy — shared by
68
+ * `withCredentialRetry` (identity) so "what counts as transient" never
69
+ * drifts between the LLM and credential retry wrappers.
70
+ */
71
+ export declare function defaultShouldRetry(err: unknown, _attempt: number): boolean;
57
72
  //# sourceMappingURL=withRetry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withRetry.d.ts","sourceRoot":"","sources":["../../../src/resilience/withRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAY,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAE3F,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACpE;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,GAAE,gBAAqB,GAAG,WAAW,CAuC5F"}
1
+ {"version":3,"file":"withRetry.d.ts","sourceRoot":"","sources":["../../../src/resilience/withRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAY,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAE3F,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACpE;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,GAAE,gBAAqB,GAAG,WAAW,CAuC5F;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAU1E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentfootprint",
3
- "version": "6.20.0",
3
+ "version": "6.22.0",
4
4
  "description": "The explainable agent framework — build AI agents you can explain, audit, and trust. Built on footprintjs.",
5
5
  "license": "MIT",
6
6
  "author": "Sanjay Krishna Anbalagan",