agentfootprint 7.20.0 → 7.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 (214) hide show
  1. package/AGENTS.md +10 -3
  2. package/README.md +1 -1
  3. package/ai-instructions/claude-code/SKILL.md +10 -3
  4. package/dist/adapters/hosting/agentcore.js +12 -2
  5. package/dist/adapters/hosting/agentcore.js.map +1 -1
  6. package/dist/adapters/llm/AnthropicProvider.js +12 -0
  7. package/dist/adapters/llm/AnthropicProvider.js.map +1 -1
  8. package/dist/adapters/llm/BedrockProvider.js +12 -0
  9. package/dist/adapters/llm/BedrockProvider.js.map +1 -1
  10. package/dist/adapters/llm/BrowserAnthropicProvider.js +45 -6
  11. package/dist/adapters/llm/BrowserAnthropicProvider.js.map +1 -1
  12. package/dist/adapters/llm/BrowserOpenAIProvider.js +13 -0
  13. package/dist/adapters/llm/BrowserOpenAIProvider.js.map +1 -1
  14. package/dist/adapters/llm/MockProvider.js +10 -0
  15. package/dist/adapters/llm/MockProvider.js.map +1 -1
  16. package/dist/adapters/llm/OpenAIProvider.js +15 -0
  17. package/dist/adapters/llm/OpenAIProvider.js.map +1 -1
  18. package/dist/adapters/types.js +10 -0
  19. package/dist/adapters/types.js.map +1 -1
  20. package/dist/cache/CacheDecisionSubflow.js +67 -3
  21. package/dist/cache/CacheDecisionSubflow.js.map +1 -1
  22. package/dist/conventions.js +8 -0
  23. package/dist/conventions.js.map +1 -1
  24. package/dist/core/Agent.js +47 -0
  25. package/dist/core/Agent.js.map +1 -1
  26. package/dist/core/agent/AgentBuilder.js +13 -6
  27. package/dist/core/agent/AgentBuilder.js.map +1 -1
  28. package/dist/core/agent/buildAgentChart.js +17 -1
  29. package/dist/core/agent/buildAgentChart.js.map +1 -1
  30. package/dist/core/agent/buildDynamicAgentChart.js +49 -4
  31. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  32. package/dist/core/agent/delivery/rules.js +121 -0
  33. package/dist/core/agent/delivery/rules.js.map +1 -0
  34. package/dist/core/agent/delivery/types.js +12 -0
  35. package/dist/core/agent/delivery/types.js.map +1 -0
  36. package/dist/core/agent/stages/callLLM.js +27 -1
  37. package/dist/core/agent/stages/callLLM.js.map +1 -1
  38. package/dist/core/agent/stages/deliver.js +155 -0
  39. package/dist/core/agent/stages/deliver.js.map +1 -0
  40. package/dist/core/agent/stages/seed.js +4 -0
  41. package/dist/core/agent/stages/seed.js.map +1 -1
  42. package/dist/core/slots/buildMessagesSlot.js +43 -48
  43. package/dist/core/slots/buildMessagesSlot.js.map +1 -1
  44. package/dist/esm/adapters/hosting/agentcore.d.ts +27 -0
  45. package/dist/esm/adapters/hosting/agentcore.js +12 -2
  46. package/dist/esm/adapters/hosting/agentcore.js.map +1 -1
  47. package/dist/esm/adapters/llm/AnthropicProvider.d.ts +2 -1
  48. package/dist/esm/adapters/llm/AnthropicProvider.js +12 -0
  49. package/dist/esm/adapters/llm/AnthropicProvider.js.map +1 -1
  50. package/dist/esm/adapters/llm/BedrockProvider.d.ts +2 -1
  51. package/dist/esm/adapters/llm/BedrockProvider.js +12 -0
  52. package/dist/esm/adapters/llm/BedrockProvider.js.map +1 -1
  53. package/dist/esm/adapters/llm/BrowserAnthropicProvider.d.ts +2 -1
  54. package/dist/esm/adapters/llm/BrowserAnthropicProvider.js +45 -6
  55. package/dist/esm/adapters/llm/BrowserAnthropicProvider.js.map +1 -1
  56. package/dist/esm/adapters/llm/BrowserOpenAIProvider.d.ts +3 -1
  57. package/dist/esm/adapters/llm/BrowserOpenAIProvider.js +13 -0
  58. package/dist/esm/adapters/llm/BrowserOpenAIProvider.js.map +1 -1
  59. package/dist/esm/adapters/llm/MockProvider.d.ts +2 -1
  60. package/dist/esm/adapters/llm/MockProvider.js +10 -0
  61. package/dist/esm/adapters/llm/MockProvider.js.map +1 -1
  62. package/dist/esm/adapters/llm/OpenAIProvider.d.ts +2 -1
  63. package/dist/esm/adapters/llm/OpenAIProvider.js +15 -0
  64. package/dist/esm/adapters/llm/OpenAIProvider.js.map +1 -1
  65. package/dist/esm/adapters/types.d.ts +69 -0
  66. package/dist/esm/adapters/types.js +9 -1
  67. package/dist/esm/adapters/types.js.map +1 -1
  68. package/dist/esm/cache/CacheDecisionSubflow.d.ts +11 -0
  69. package/dist/esm/cache/CacheDecisionSubflow.js +67 -3
  70. package/dist/esm/cache/CacheDecisionSubflow.js.map +1 -1
  71. package/dist/esm/conventions.d.ts +8 -0
  72. package/dist/esm/conventions.js +8 -0
  73. package/dist/esm/conventions.js.map +1 -1
  74. package/dist/esm/core/Agent.d.ts +16 -0
  75. package/dist/esm/core/Agent.js +47 -0
  76. package/dist/esm/core/Agent.js.map +1 -1
  77. package/dist/esm/core/agent/AgentBuilder.d.ts +9 -4
  78. package/dist/esm/core/agent/AgentBuilder.js +14 -7
  79. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  80. package/dist/esm/core/agent/buildAgentChart.d.ts +14 -0
  81. package/dist/esm/core/agent/buildAgentChart.js +17 -1
  82. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  83. package/dist/esm/core/agent/buildDynamicAgentChart.js +49 -4
  84. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  85. package/dist/esm/core/agent/delivery/rules.d.ts +79 -0
  86. package/dist/esm/core/agent/delivery/rules.js +113 -0
  87. package/dist/esm/core/agent/delivery/rules.js.map +1 -0
  88. package/dist/esm/core/agent/delivery/types.d.ts +51 -0
  89. package/dist/esm/core/agent/delivery/types.js +11 -0
  90. package/dist/esm/core/agent/delivery/types.js.map +1 -0
  91. package/dist/esm/core/agent/stages/callLLM.js +27 -1
  92. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  93. package/dist/esm/core/agent/stages/deliver.d.ts +59 -0
  94. package/dist/esm/core/agent/stages/deliver.js +150 -0
  95. package/dist/esm/core/agent/stages/deliver.js.map +1 -0
  96. package/dist/esm/core/agent/stages/seed.js +4 -0
  97. package/dist/esm/core/agent/stages/seed.js.map +1 -1
  98. package/dist/esm/core/agent/types.d.ts +14 -0
  99. package/dist/esm/core/slots/buildMessagesSlot.d.ts +23 -8
  100. package/dist/esm/core/slots/buildMessagesSlot.js +43 -48
  101. package/dist/esm/core/slots/buildMessagesSlot.js.map +1 -1
  102. package/dist/esm/hosting/httpHost.d.ts +62 -3
  103. package/dist/esm/hosting/httpHost.js +73 -9
  104. package/dist/esm/hosting/httpHost.js.map +1 -1
  105. package/dist/esm/hosting/index.d.ts +3 -1
  106. package/dist/esm/hosting/index.js +3 -1
  107. package/dist/esm/hosting/index.js.map +1 -1
  108. package/dist/esm/hosting/nodeHost.d.ts +21 -2
  109. package/dist/esm/hosting/nodeHost.js +10 -0
  110. package/dist/esm/hosting/nodeHost.js.map +1 -1
  111. package/dist/esm/hosting/types.d.ts +6 -0
  112. package/dist/esm/lib/injection-engine/factories/defineFact.d.ts +38 -10
  113. package/dist/esm/lib/injection-engine/factories/defineFact.js +20 -8
  114. package/dist/esm/lib/injection-engine/factories/defineFact.js.map +1 -1
  115. package/dist/esm/lib/injection-engine/factories/defineInstruction.d.ts +42 -15
  116. package/dist/esm/lib/injection-engine/factories/defineInstruction.js +17 -6
  117. package/dist/esm/lib/injection-engine/factories/defineInstruction.js.map +1 -1
  118. package/dist/esm/lib/injection-engine/messagesSlotRefusal.d.ts +70 -27
  119. package/dist/esm/lib/injection-engine/messagesSlotRefusal.js +91 -34
  120. package/dist/esm/lib/injection-engine/messagesSlotRefusal.js.map +1 -1
  121. package/dist/esm/lib/injection-engine/types.d.ts +35 -9
  122. package/dist/esm/lib/injection-engine/types.js +6 -0
  123. package/dist/esm/lib/injection-engine/types.js.map +1 -1
  124. package/dist/esm/memory/asRoleRefusal.d.ts +15 -11
  125. package/dist/esm/memory/asRoleRefusal.js +21 -15
  126. package/dist/esm/memory/asRoleRefusal.js.map +1 -1
  127. package/dist/esm/resilience/withCircuitBreaker.js +6 -0
  128. package/dist/esm/resilience/withCircuitBreaker.js.map +1 -1
  129. package/dist/esm/resilience/withFallback.js +18 -0
  130. package/dist/esm/resilience/withFallback.js.map +1 -1
  131. package/dist/esm/resilience/withRetry.js +8 -0
  132. package/dist/esm/resilience/withRetry.js.map +1 -1
  133. package/dist/hosting/httpHost.js +73 -9
  134. package/dist/hosting/httpHost.js.map +1 -1
  135. package/dist/hosting/index.js +3 -1
  136. package/dist/hosting/index.js.map +1 -1
  137. package/dist/hosting/nodeHost.js +10 -0
  138. package/dist/hosting/nodeHost.js.map +1 -1
  139. package/dist/lib/injection-engine/factories/defineFact.js +19 -7
  140. package/dist/lib/injection-engine/factories/defineFact.js.map +1 -1
  141. package/dist/lib/injection-engine/factories/defineInstruction.js +16 -5
  142. package/dist/lib/injection-engine/factories/defineInstruction.js.map +1 -1
  143. package/dist/lib/injection-engine/messagesSlotRefusal.js +95 -36
  144. package/dist/lib/injection-engine/messagesSlotRefusal.js.map +1 -1
  145. package/dist/lib/injection-engine/types.js +6 -0
  146. package/dist/lib/injection-engine/types.js.map +1 -1
  147. package/dist/memory/asRoleRefusal.js +21 -15
  148. package/dist/memory/asRoleRefusal.js.map +1 -1
  149. package/dist/resilience/withCircuitBreaker.js +6 -0
  150. package/dist/resilience/withCircuitBreaker.js.map +1 -1
  151. package/dist/resilience/withFallback.js +18 -0
  152. package/dist/resilience/withFallback.js.map +1 -1
  153. package/dist/resilience/withRetry.js +8 -0
  154. package/dist/resilience/withRetry.js.map +1 -1
  155. package/dist/types/adapters/hosting/agentcore.d.ts +27 -0
  156. package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -1
  157. package/dist/types/adapters/llm/AnthropicProvider.d.ts +2 -1
  158. package/dist/types/adapters/llm/AnthropicProvider.d.ts.map +1 -1
  159. package/dist/types/adapters/llm/BedrockProvider.d.ts +2 -1
  160. package/dist/types/adapters/llm/BedrockProvider.d.ts.map +1 -1
  161. package/dist/types/adapters/llm/BrowserAnthropicProvider.d.ts +2 -1
  162. package/dist/types/adapters/llm/BrowserAnthropicProvider.d.ts.map +1 -1
  163. package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts +3 -1
  164. package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts.map +1 -1
  165. package/dist/types/adapters/llm/MockProvider.d.ts +2 -1
  166. package/dist/types/adapters/llm/MockProvider.d.ts.map +1 -1
  167. package/dist/types/adapters/llm/OpenAIProvider.d.ts +2 -1
  168. package/dist/types/adapters/llm/OpenAIProvider.d.ts.map +1 -1
  169. package/dist/types/adapters/types.d.ts +69 -0
  170. package/dist/types/adapters/types.d.ts.map +1 -1
  171. package/dist/types/cache/CacheDecisionSubflow.d.ts +11 -0
  172. package/dist/types/cache/CacheDecisionSubflow.d.ts.map +1 -1
  173. package/dist/types/conventions.d.ts +8 -0
  174. package/dist/types/conventions.d.ts.map +1 -1
  175. package/dist/types/core/Agent.d.ts +16 -0
  176. package/dist/types/core/Agent.d.ts.map +1 -1
  177. package/dist/types/core/agent/AgentBuilder.d.ts +9 -4
  178. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  179. package/dist/types/core/agent/buildAgentChart.d.ts +14 -0
  180. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  181. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  182. package/dist/types/core/agent/delivery/rules.d.ts +80 -0
  183. package/dist/types/core/agent/delivery/rules.d.ts.map +1 -0
  184. package/dist/types/core/agent/delivery/types.d.ts +52 -0
  185. package/dist/types/core/agent/delivery/types.d.ts.map +1 -0
  186. package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
  187. package/dist/types/core/agent/stages/deliver.d.ts +60 -0
  188. package/dist/types/core/agent/stages/deliver.d.ts.map +1 -0
  189. package/dist/types/core/agent/types.d.ts +14 -0
  190. package/dist/types/core/agent/types.d.ts.map +1 -1
  191. package/dist/types/core/slots/buildMessagesSlot.d.ts +23 -8
  192. package/dist/types/core/slots/buildMessagesSlot.d.ts.map +1 -1
  193. package/dist/types/hosting/httpHost.d.ts +62 -3
  194. package/dist/types/hosting/httpHost.d.ts.map +1 -1
  195. package/dist/types/hosting/index.d.ts +3 -1
  196. package/dist/types/hosting/index.d.ts.map +1 -1
  197. package/dist/types/hosting/nodeHost.d.ts +21 -2
  198. package/dist/types/hosting/nodeHost.d.ts.map +1 -1
  199. package/dist/types/hosting/types.d.ts +6 -0
  200. package/dist/types/hosting/types.d.ts.map +1 -1
  201. package/dist/types/lib/injection-engine/factories/defineFact.d.ts +38 -10
  202. package/dist/types/lib/injection-engine/factories/defineFact.d.ts.map +1 -1
  203. package/dist/types/lib/injection-engine/factories/defineInstruction.d.ts +42 -15
  204. package/dist/types/lib/injection-engine/factories/defineInstruction.d.ts.map +1 -1
  205. package/dist/types/lib/injection-engine/messagesSlotRefusal.d.ts +70 -27
  206. package/dist/types/lib/injection-engine/messagesSlotRefusal.d.ts.map +1 -1
  207. package/dist/types/lib/injection-engine/types.d.ts +35 -9
  208. package/dist/types/lib/injection-engine/types.d.ts.map +1 -1
  209. package/dist/types/memory/asRoleRefusal.d.ts +15 -11
  210. package/dist/types/memory/asRoleRefusal.d.ts.map +1 -1
  211. package/dist/types/resilience/withCircuitBreaker.d.ts.map +1 -1
  212. package/dist/types/resilience/withFallback.d.ts.map +1 -1
  213. package/dist/types/resilience/withRetry.d.ts.map +1 -1
  214. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hosting/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE;;;;;;;;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AAS,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB,CAAC,EAAE,SAAS,UAAU,GAAG,UAAU;IACtE;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,gCAAgC;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG;QAAE,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,EAAE,CAAC,CAAA;KAAE,CAAC;IACxE,8DAA8D;IAC9D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IACrD;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;CACtC"}
@@ -10,7 +10,7 @@
10
10
  * Produces an `Injection` with:
11
11
  * - flavor: `'fact'`
12
12
  * - trigger: configurable (default `'always'`)
13
- * - inject: `systemPrompt` — the slot that reaches the model
13
+ * - inject: `systemPrompt` (default), or `messages` with a declared role
14
14
  *
15
15
  * @example
16
16
  * const userProfile = defineFact({
@@ -23,21 +23,14 @@
23
23
  * data: `Current time: ${new Date().toISOString()}`,
24
24
  * });
25
25
  */
26
+ import type { WireRole } from '../../../adapters/types.js';
26
27
  import type { Injection, InjectionContext } from '../types.js';
27
28
  import type { CachePolicy } from '../../../cache/types.js';
28
- export interface DefineFactOptions {
29
+ interface DefineFactBase {
29
30
  readonly id: string;
30
31
  readonly description?: string;
31
32
  /** The fact (data string) to inject. */
32
33
  readonly data: string;
33
- /**
34
- * Which slot to land in. `'system-prompt'` (the default) is the only
35
- * slot a fact can land in: it is the one every provider delivers.
36
- *
37
- * `'messages'` is REFUSED — see {@link messagesSlotRefusal}. It was
38
- * accepted before 7.19.1, recorded as injected, and never sent.
39
- */
40
- readonly slot?: 'system-prompt';
41
34
  /**
42
35
  * Trigger control. Defaults to always-on. For conditional facts
43
36
  * (e.g., "only show user profile after iteration 3"), pass a
@@ -53,5 +46,40 @@ export interface DefineFactOptions {
53
46
  */
54
47
  readonly cache?: CachePolicy;
55
48
  }
49
+ /**
50
+ * `slot` and `role` are ONE decision, so the type makes them one choice.
51
+ *
52
+ * `slot: 'messages'` requires a `role` and there is deliberately no default:
53
+ * who appears to speak is a meaning the app owns. (Before 7.19.1 the option
54
+ * existed with `role` defaulting to `'system'` — a default that reached the
55
+ * model on OpenAI-family providers and vanished on Anthropic-family ones.
56
+ * Now the role is stated, and a provider that cannot carry it refuses at run
57
+ * start by name.) `slot: 'system-prompt'` forbids `role`, because there is no
58
+ * role in a system prompt to choose.
59
+ */
60
+ export type DefineFactOptions = DefineFactBase & ({
61
+ /** The default. The one placement every provider delivers. */
62
+ readonly slot?: 'system-prompt';
63
+ readonly role?: never;
64
+ } | {
65
+ /**
66
+ * Deliver the fact into the conversation itself — it enters
67
+ * `scope.history` at the injection-engine boundary, so the window
68
+ * strategies, the slots and the wire all see the same past.
69
+ * Placed at the END of the window; if its role would collide with
70
+ * the turn already there, delivery defers to the next boundary and
71
+ * says so on `messagesDelivery.deferred`.
72
+ */
73
+ readonly slot: 'messages';
74
+ /**
75
+ * Who appears to say it. Required — no default. Refused at run start
76
+ * when the attached provider does not carry it inside `messages`
77
+ * (the Anthropic family drops `'system'` there; the OpenAI family
78
+ * carries it). `'tool'` is refused outright: a tool message answers a
79
+ * specific call, and an injection has no call to answer.
80
+ */
81
+ readonly role: WireRole;
82
+ });
56
83
  export declare function defineFact(opts: DefineFactOptions): Injection;
84
+ export {};
57
85
  //# sourceMappingURL=defineFact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineFact.d.ts","sourceRoot":"","sources":["../../../../../src/lib/injection-engine/factories/defineFact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjF,OAAO,KAAK,EAAE,WA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GAC5C,CACI;IACE,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACE;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB,CACJ,CAAC;AAEJ,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS,CA6C7D"}
@@ -11,7 +11,8 @@
11
11
  * Produces an `Injection` with:
12
12
  * - flavor: `'instructions'`
13
13
  * - trigger: `{ kind: 'rule', activeWhen }` (or `'always'` if omitted)
14
- * - inject: `{ systemPrompt: prompt }`
14
+ * - inject: `{ systemPrompt: prompt }`, or `{ messages: [{ role, content }] }`
15
+ * when `slot: 'messages'` names the role it speaks as
15
16
  *
16
17
  * @example
17
18
  * const calmTone = defineInstruction({
@@ -27,9 +28,10 @@
27
28
  * prompt: 'PII has been redacted. Do not include emails or phone numbers.',
28
29
  * });
29
30
  */
31
+ import type { WireRole } from '../../../adapters/types.js';
30
32
  import type { Injection, InjectionContext } from '../types.js';
31
33
  import type { CachePolicy } from '../../../cache/types.js';
32
- export interface DefineInstructionOptions {
34
+ interface DefineInstructionBase {
33
35
  readonly id: string;
34
36
  readonly description?: string;
35
37
  /**
@@ -41,20 +43,8 @@ export interface DefineInstructionOptions {
41
43
  * `agentfootprint.context.evaluated`.
42
44
  */
43
45
  readonly activeWhen?: (ctx: InjectionContext) => boolean;
44
- /** Instruction text. Lands in the system-prompt slot. */
46
+ /** Instruction text. */
45
47
  readonly prompt: string;
46
- /**
47
- * Where the instruction lands. `'system-prompt'` (the default) is the
48
- * only slot an instruction can land in: it is the one every provider
49
- * delivers.
50
- *
51
- * `'messages'` is REFUSED — see {@link messagesSlotRefusal}. It was
52
- * accepted before 7.19.1 and documented as the recency-first
53
- * placement; it was recorded as injected and never sent. To make a
54
- * rule salient at the moment it matters, return it from the tool whose
55
- * result it is about — a tool result IS a recent message.
56
- */
57
- readonly slot?: 'system-prompt';
58
48
  /**
59
49
  * Cache policy for this instruction. Defaults to `'never'` —
60
50
  * instructions are typically rule-based (volatile per-iter
@@ -66,5 +56,42 @@ export interface DefineInstructionOptions {
66
56
  */
67
57
  readonly cache?: CachePolicy;
68
58
  }
59
+ /**
60
+ * `slot` and `role` are ONE decision, so the type makes them one choice —
61
+ * see {@link DefineFactOptions} for the full reasoning. In short:
62
+ * `slot: 'messages'` requires a `role` with no default (who appears to speak
63
+ * is the app's meaning to set), and `slot: 'system-prompt'` forbids one.
64
+ */
65
+ export type DefineInstructionOptions = DefineInstructionBase & ({
66
+ /**
67
+ * The default. Appended to the system prompt — the one placement
68
+ * every provider delivers. An `on-tool-return` instruction already
69
+ * lands on exactly the turn it matters; this is a system prompt that
70
+ * says it on that one turn, rather than on every turn.
71
+ */
72
+ readonly slot?: 'system-prompt';
73
+ readonly role?: never;
74
+ } | {
75
+ /**
76
+ * Deliver the instruction into the conversation itself — it enters
77
+ * `scope.history` at the injection-engine boundary, at the END of the
78
+ * window, so the model reads it at the recency this option is
79
+ * reaching for. If its role would collide with the turn already at
80
+ * the end, delivery defers to the next boundary and says so on
81
+ * `messagesDelivery.deferred` rather than reordering anything.
82
+ *
83
+ * In a tool-using loop the window ends on the user's turn or on tool
84
+ * results, so a `'user'` role typically never gets a slot. Use
85
+ * `'assistant'`, use `'system'` on a provider that carries it, or
86
+ * return the words from the tool whose result they are about.
87
+ */
88
+ readonly slot: 'messages';
89
+ /**
90
+ * Who appears to say it. Required — no default. Refused at run start
91
+ * when the attached provider does not carry it inside `messages`.
92
+ */
93
+ readonly role: WireRole;
94
+ });
69
95
  export declare function defineInstruction(opts: DefineInstructionOptions): Injection;
96
+ export {};
70
97
  //# sourceMappingURL=defineInstruction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineInstruction.d.ts","sourceRoot":"","sources":["../../../../../src/lib/injection-engine/factories/defineInstruction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC;IACzD,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,SAAS,CAwB3E"}
1
+ {"version":3,"file":"defineInstruction.d.ts","sourceRoot":"","sources":["../../../../../src/lib/injection-engine/factories/defineInstruction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC;IACzD,wBAAwB;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,GAC1D,CACI;IACE;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACE;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB,CACJ,CAAC;AAEJ,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,SAAS,CAoC3E"}
@@ -1,32 +1,75 @@
1
1
  /**
2
- * The messages-slot refusal — one sentence, said in every place the
3
- * declaration can be made.
4
- *
5
- * WHY this exists at all: an Injection targeting the messages slot was
6
- * RECORDED as injected — `context.injected` fired with its content, the
7
- * slot composition counted it, the engine routed it — while the request
8
- * assembled its message list from the conversation itself, so the model
9
- * never saw it. The recording said one thing and the wire said another.
10
- *
11
- * Delivering it instead is not a one-line change, and doing it badly
12
- * would be worse than the gap: the wire has no system role INSIDE the
13
- * message list (the Anthropic and Bedrock adapters drop such a message —
14
- * system is a separate top-level field — while the OpenAI adapters carry
15
- * it), and `'system'` was the default role here. Wiring the slot up
16
- * without a per-provider notion of what a provider can carry would
17
- * replace one uniform gap with a provider-dependent one, and nothing in
18
- * the recording would tell the two apart. Honest delivery needs a
19
- * wire-carrying key out of the slot, that provider capability, and a
20
- * message-sequence rule — a designed feature, not a patch.
21
- *
22
- * So until that exists, the declaration is refused where it is written.
23
- * Absence beats a lie: nothing that worked stops working, and something
24
- * that never worked stops pretending.
2
+ * The messages-slot refusals — said in the same words wherever they are said.
3
+ *
4
+ * ── The arc this module records ──────────────────────────────────────
5
+ * 7.19.1 refused `slot: 'messages'` BY NAME. An Injection targeting the
6
+ * messages slot was RECORDED as injected — `context.injected` fired with
7
+ * its content, the slot composition counted it, the engine routed it —
8
+ * while the request assembled its message list from the conversation
9
+ * itself, so the model never saw it. The recording said one thing and the
10
+ * wire said another, and absence beat that lie.
11
+ *
12
+ * 7.21.0 delivers it, so the refusal moves: from "this placement never
13
+ * reaches the model" to "this placement reaches the model, but not with
14
+ * THAT role on THIS provider, and not at THAT position this iteration."
15
+ * The two facts the old sentence bundled together are now separate, and
16
+ * each is decided against something real:
17
+ *
18
+ * • ROLE — the wire has no system role inside the message list on the
19
+ * Anthropic family (system is a separate top-level field) while the
20
+ * OpenAI family carries it. A provider declares what it carries
21
+ * (`LLMProvider.carriesInMessages`); a role it does not carry is
22
+ * REFUSED at run start, naming the provider and the roles it does
23
+ * carry. Never silently re-roled: changing who appears to speak is a
24
+ * meaning change the app must make, not the library.
25
+ *
26
+ * • POSITION — a delivered injection goes at the END of the history the
27
+ * iteration assembled. If its role would collide with the turn already
28
+ * there, or the tail is waiting on a tool result, delivery is DEFERRED
29
+ * to the next boundary and the deferral is recorded on
30
+ * `messagesDelivery.deferred`. Never a silent drop, never a reorder,
31
+ * never a split `tool_use` / `tool_result` pair.
32
+ *
33
+ * Both refusals are stated in full sentences that name the fix, because a
34
+ * refusal that does not teach just moves the puzzle.
35
+ */
36
+ import type { WireRole } from '../../adapters/types.js';
37
+ /**
38
+ * The role refusal (D2), addressed from `site` (e.g.
39
+ * `defineFact('turn-time')` or the run-start check).
40
+ *
41
+ * Thrown when a `slot: 'messages'` injection declares a role the attached
42
+ * provider drops on the wire. The alternative — quietly rewriting the role
43
+ * to one that fits — would make the recording true and the meaning false.
44
+ */
45
+ export declare function messagesRoleRefusal(args: {
46
+ readonly site: string;
47
+ readonly role: string;
48
+ readonly providerName: string;
49
+ readonly carries: readonly WireRole[];
50
+ }): string;
51
+ /**
52
+ * The role refusal for a role no wire can carry (`'tool'`).
53
+ *
54
+ * A tool message answers one specific `tool_use` id. An injection has no
55
+ * call to answer, so the message it would produce is malformed on every
56
+ * provider — this one is refused by shape, not by capability.
25
57
  */
58
+ export declare function messagesToolRoleRefusal(site: string): string;
59
+ /** Why a delivery was held back this iteration. Recorded, never thrown. */
60
+ export type DeferralReason = 'role-collision' | 'unanswered-tool-call';
26
61
  /**
27
- * The refusal text, addressed from `site` (e.g. `defineFact('turn-time')`).
28
- * Names the limitation and the three placements that DO reach the model,
29
- * because a refusal that does not teach just moves the puzzle.
62
+ * The deferral note (D3) — a sentence on `messagesDelivery.deferred`, which
63
+ * is the committed answer to "why is my declaration not on the wire yet?".
64
+ *
65
+ * Not an error: the next boundary retries it unchanged. The note names what
66
+ * blocked it so the reader does not have to reconstruct the window to find out.
30
67
  */
31
- export declare function messagesSlotRefusal(site: string): string;
68
+ export declare function messagesDeferralNote(args: {
69
+ readonly injectionId: string;
70
+ readonly role: string;
71
+ readonly reason: DeferralReason;
72
+ /** The effective wire role of the turn currently at the end of the window. */
73
+ readonly tailRole?: string;
74
+ }): string;
32
75
  //# sourceMappingURL=messagesSlotRefusal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messagesSlotRefusal.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/messagesSlotRefusal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxD"}
1
+ {"version":3,"file":"messagesSlotRefusal.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/messagesSlotRefusal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAUxD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,QAAQ,EAAE,CAAC;CACvC,GAAG,MAAM,CAWT;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,sBAAsB,CAAC;AAEvE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,MAAM,CAiBT"}
@@ -57,16 +57,26 @@ export interface InjectionContent {
57
57
  /** Text appended to the system-prompt slot when active. */
58
58
  readonly systemPrompt?: string;
59
59
  /**
60
- * Messages appended to the messages slot when active.
60
+ * Messages DELIVERED into the conversation when active (7.21.0).
61
61
  *
62
- * **Not delivered to the model, and refused where it can be declared**
63
- * (`defineFact` / `defineInstruction` / `Agent.injection()`) since
64
- * 7.19.1: the request's message list is assembled from the
65
- * conversation, so content placed here was recorded as injected and
66
- * never sent. The field stays on the type for the engine's internal
67
- * memory-recall bridge and for the delivery feature that will make it
68
- * true; nothing a consumer can declare reaches it. See
69
- * `messagesSlotRefusal.ts` for the full reasoning.
62
+ * Delivery means what it says: the agent's `Deliver` stage appends these
63
+ * to `scope.history` itself at the injection-engine boundary — never a
64
+ * parallel array spliced in at send time — so the window strategies, the
65
+ * three slots, the commit log and the wire all see one past. Two rules
66
+ * govern it, and both can say no:
67
+ *
68
+ * • a role the attached provider does not carry inside `messages` is
69
+ * REFUSED at run start, naming the provider (the Anthropic family
70
+ * drops `role: 'system'` there; the OpenAI family carries it);
71
+ * • a message whose role would collide with the turn at the end of the
72
+ * window, or that would split a `tool_use`/`tool_result` pair, is
73
+ * DEFERRED to the next boundary and recorded on
74
+ * `messagesDelivery.deferred`.
75
+ *
76
+ * Between 7.19.1 and 7.21.0 this field was unreachable by declaration:
77
+ * content placed here was recorded as injected and never sent, so the
78
+ * declaration was refused rather than believed. See
79
+ * `messagesSlotRefusal.ts` for the whole arc.
70
80
  */
71
81
  readonly messages?: ReadonlyArray<{
72
82
  readonly role: ContextRole;
@@ -223,6 +233,22 @@ export interface ActiveInjection {
223
233
  * consumers wire this manually via `agentfootprint/tool-providers`.
224
234
  */
225
235
  readonly autoActivate?: 'currentSkill';
236
+ /**
237
+ * The injection's cache directive, carried across the projection.
238
+ *
239
+ * It has to be here explicitly. `Injection.metadata` is a free-form bag
240
+ * that this projection deliberately does NOT copy wholesale, and the cache
241
+ * decision (`computeCacheMarkers`) reads exactly one key out of it — so
242
+ * before 7.21.0 every injection arrived at that decision with no policy
243
+ * and resolved to `'never'`, which meant no `tools` or `messages` cache
244
+ * marker could ever fire in a real run no matter what the consumer
245
+ * declared. Projecting the one key the decision reads makes the declared
246
+ * policy the policy that is applied.
247
+ *
248
+ * Absent when the injection declared none (hand-built Injections); the
249
+ * decision's own `?? 'never'` default then applies, as it always did.
250
+ */
251
+ readonly cache?: import('../../cache/types.js').CachePolicy;
226
252
  readonly inject: {
227
253
  readonly systemPrompt?: string;
228
254
  readonly messages?: ReadonlyArray<{
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,aA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AC;CACH;AAED,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAiCtE"}
@@ -12,18 +12,22 @@
12
12
  * the lie legible: a reader could pick a role, read it back off the
13
13
  * definition, and be told a role the run would never use.
14
14
  *
15
- * Delivering it instead is not a one-line change. Role-differentiated
16
- * recall means putting non-system content into the message list, and the
17
- * messages slot does not reach the model today (see
18
- * `lib/injection-engine/messagesSlotRefusal.ts`): it is the observability
19
- * projection of the conversation, not a wire. Honouring `asRole: 'user'`
20
- * would have to route through that slot, which would trade a dead option
21
- * for a recorded-and-dropped one — strictly worse, because the recording
22
- * would then claim delivery.
15
+ * When this was written the messages slot did not reach the model at all,
16
+ * so honouring `asRole` would have traded a dead option for a
17
+ * recorded-and-dropped one. Since 7.21.0 it DOES reach the model: a
18
+ * `slot: 'messages'` injection is delivered into `scope.history`, subject to
19
+ * what the provider carries and to the sequence rule
20
+ * (`lib/injection-engine/messagesSlotRefusal.ts`). The mechanism a
21
+ * role-differentiated recall would ride now exists.
23
22
  *
24
- * So the option is refused where it is written, and the refusal points at
25
- * the feature that would make it real: role-differentiated recall arrives
26
- * with messages delivery, if field evidence asks for it.
23
+ * The refusal still stands, and the reason it stands is now the only reason
24
+ * it ever really had: **nobody has asked for it.** A recall formatter that
25
+ * emits a non-system role can be written today — it becomes a messages-slot
26
+ * injection with a declared role, checked like any other. What is missing is
27
+ * evidence that role-differentiated recall answers a real question better
28
+ * than the system prompt does. Building it because the machinery exists is
29
+ * how a library grows options nobody reads — which is exactly the thing this
30
+ * refusal is here to undo. Field evidence decides, not availability.
27
31
  *
28
32
  * A throw where there was a silent lie is a fix, not a break: nothing that
29
33
  * worked stops working, and something that never worked stops pretending.
@@ -1 +1 @@
1
- {"version":3,"file":"asRoleRefusal.d.ts","sourceRoot":"","sources":["../../../src/memory/asRoleRefusal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEhE"}
1
+ {"version":3,"file":"asRoleRefusal.d.ts","sourceRoot":"","sources":["../../../src/memory/asRoleRefusal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYlD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"withCircuitBreaker.d.ts","sourceRoot":"","sources":["../../../src/resilience/withCircuitBreaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAEH,OAAO,KAAK,EAGV,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAI9B,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;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AAED,MAAM,MA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;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,CAoIb"}
@@ -1 +1 @@
1
- {"version":3,"file":"withFallback.d.ts","sourceRoot":"","sources":["../../../src/resilience/withFallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtD;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,mBAAwB,GAChC,WAAW,CAoEb"}
1
+ {"version":3,"file":"withFallback.d.ts","sourceRoot":"","sources":["../../../src/resilience/withFallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAc9B,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAA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CAU1E"}
1
+ {"version":3,"file":"withRetry.d.ts","sourceRoot":"","sources":["../../../src/resilience/withRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,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;;;;;;;;;;;OAWG;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,CA0E5F;AAyBD;;;;;;;;;;;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": "7.20.0",
3
+ "version": "7.22.0",
4
4
  "description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
5
5
  "license": "MIT",
6
6
  "author": "Sanjay Krishna Anbalagan",