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.
- package/dist/adapters/identity/agentcore.js +54 -8
- package/dist/adapters/identity/agentcore.js.map +1 -1
- package/dist/core/Agent.js +19 -0
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/humanizeLLMError.js +7 -3
- package/dist/core/humanizeLLMError.js.map +1 -1
- package/dist/core/runCheckpoint.js +13 -3
- package/dist/core/runCheckpoint.js.map +1 -1
- package/dist/core-flow/Loop.js +4 -0
- package/dist/core-flow/Loop.js.map +1 -1
- package/dist/esm/adapters/identity/agentcore.js +54 -8
- package/dist/esm/adapters/identity/agentcore.js.map +1 -1
- package/dist/esm/core/Agent.js +19 -0
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/humanizeLLMError.js +7 -3
- package/dist/esm/core/humanizeLLMError.js.map +1 -1
- package/dist/esm/core/runCheckpoint.js +13 -3
- package/dist/esm/core/runCheckpoint.js.map +1 -1
- package/dist/esm/core-flow/Loop.js +4 -0
- package/dist/esm/core-flow/Loop.js.map +1 -1
- package/dist/esm/identity/withCredentialRetry.js +98 -0
- package/dist/esm/identity/withCredentialRetry.js.map +1 -0
- package/dist/esm/identity.js +1 -0
- package/dist/esm/identity.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillGraph.js +64 -0
- package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/esm/resilience/withCircuitBreaker.js +16 -0
- package/dist/esm/resilience/withCircuitBreaker.js.map +1 -1
- package/dist/esm/resilience/withRetry.js +6 -1
- package/dist/esm/resilience/withRetry.js.map +1 -1
- package/dist/identity/withCredentialRetry.js +102 -0
- package/dist/identity/withCredentialRetry.js.map +1 -0
- package/dist/identity.js +3 -1
- package/dist/identity.js.map +1 -1
- package/dist/lib/injection-engine/skillGraph.js +64 -0
- package/dist/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/resilience/withCircuitBreaker.js +16 -0
- package/dist/resilience/withCircuitBreaker.js.map +1 -1
- package/dist/resilience/withRetry.js +7 -1
- package/dist/resilience/withRetry.js.map +1 -1
- package/dist/types/adapters/identity/agentcore.d.ts +46 -2
- package/dist/types/adapters/identity/agentcore.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +19 -0
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/humanizeLLMError.d.ts.map +1 -1
- package/dist/types/core/runCheckpoint.d.ts +21 -8
- package/dist/types/core/runCheckpoint.d.ts.map +1 -1
- package/dist/types/core-flow/Loop.d.ts +24 -1
- package/dist/types/core-flow/Loop.d.ts.map +1 -1
- package/dist/types/identity/withCredentialRetry.d.ts +65 -0
- package/dist/types/identity/withCredentialRetry.d.ts.map +1 -0
- package/dist/types/identity.d.ts +1 -0
- package/dist/types/identity.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
- package/dist/types/resilience/withCircuitBreaker.d.ts +16 -0
- package/dist/types/resilience/withCircuitBreaker.d.ts.map +1 -1
- package/dist/types/resilience/withRetry.d.ts +18 -3
- package/dist/types/resilience/withRetry.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withCircuitBreaker.d.ts","sourceRoot":"","sources":["../../../src/resilience/withCircuitBreaker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"withCircuitBreaker.d.ts","sourceRoot":"","sources":["../../../src/resilience/withCircuitBreaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AAEH,OAAO,KAAK,EAAY,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAI3F,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,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.
|
|
40
|
-
*
|
|
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,E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