agentfootprint 8.20.0 → 9.0.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 (302) hide show
  1. package/README.md +2 -2
  2. package/dist/adapters/hosting/agentcore.js +1 -1
  3. package/dist/adapters/identity/agentcore.js +1 -1
  4. package/dist/adapters/llm/AnthropicProvider.js +1 -1
  5. package/dist/adapters/llm/BrowserOpenAIProvider.js +1 -1
  6. package/dist/adapters/llm/MockProvider.js +1 -1
  7. package/dist/adapters/llm/OpenAIProvider.js +2 -2
  8. package/dist/adapters/memory/agentcore.js +1 -1
  9. package/dist/adapters/memory/bedrockAgentMemory.js +1 -1
  10. package/dist/adapters/memory/redis.js +1 -1
  11. package/dist/adapters/observability/agentcore.js +2 -2
  12. package/dist/adapters/observability/audit.js +1 -1
  13. package/dist/adapters/observability/cloudwatch.js +2 -2
  14. package/dist/adapters/observability/otel.js +3 -3
  15. package/dist/adapters/observability/xray.js +2 -2
  16. package/dist/core/Agent.js +1 -1
  17. package/dist/core/agent/AgentBuilder.js +35 -23
  18. package/dist/core/agent/AgentBuilder.js.map +1 -1
  19. package/dist/core/agent/stages/window.js +11 -13
  20. package/dist/core/agent/stages/window.js.map +1 -1
  21. package/dist/core/agent/watch.js +1 -1
  22. package/dist/core/agent/window/index.js.map +1 -1
  23. package/dist/core/agent/window/strategies/summarizeOldest.js +0 -5
  24. package/dist/core/agent/window/strategies/summarizeOldest.js.map +1 -1
  25. package/dist/core/slots/helpers.js +4 -7
  26. package/dist/core/slots/helpers.js.map +1 -1
  27. package/dist/debug/finders.js +7 -10
  28. package/dist/debug/finders.js.map +1 -1
  29. package/dist/debug.js +4 -4
  30. package/dist/doors/context.js +3 -3
  31. package/dist/esm/adapters/hosting/agentcore.d.ts +1 -1
  32. package/dist/esm/adapters/hosting/agentcore.js +1 -1
  33. package/dist/esm/adapters/identity/agentcore.d.ts +1 -1
  34. package/dist/esm/adapters/identity/agentcore.js +1 -1
  35. package/dist/esm/adapters/llm/AnthropicProvider.d.ts +1 -1
  36. package/dist/esm/adapters/llm/AnthropicProvider.js +1 -1
  37. package/dist/esm/adapters/llm/BrowserOpenAIProvider.d.ts +1 -1
  38. package/dist/esm/adapters/llm/BrowserOpenAIProvider.js +1 -1
  39. package/dist/esm/adapters/llm/MockProvider.d.ts +1 -1
  40. package/dist/esm/adapters/llm/MockProvider.js +1 -1
  41. package/dist/esm/adapters/llm/OpenAIProvider.d.ts +2 -2
  42. package/dist/esm/adapters/llm/OpenAIProvider.js +2 -2
  43. package/dist/esm/adapters/memory/agentcore.d.ts +1 -1
  44. package/dist/esm/adapters/memory/agentcore.js +1 -1
  45. package/dist/esm/adapters/memory/bedrockAgentMemory.d.ts +1 -1
  46. package/dist/esm/adapters/memory/bedrockAgentMemory.js +1 -1
  47. package/dist/esm/adapters/memory/redis.d.ts +1 -1
  48. package/dist/esm/adapters/memory/redis.js +1 -1
  49. package/dist/esm/adapters/observability/agentcore.d.ts +2 -2
  50. package/dist/esm/adapters/observability/agentcore.js +2 -2
  51. package/dist/esm/adapters/observability/audit.d.ts +1 -1
  52. package/dist/esm/adapters/observability/audit.js +1 -1
  53. package/dist/esm/adapters/observability/cloudwatch.d.ts +2 -2
  54. package/dist/esm/adapters/observability/cloudwatch.js +2 -2
  55. package/dist/esm/adapters/observability/otel.d.ts +4 -4
  56. package/dist/esm/adapters/observability/otel.js +3 -3
  57. package/dist/esm/adapters/observability/xray.d.ts +2 -2
  58. package/dist/esm/adapters/observability/xray.js +2 -2
  59. package/dist/esm/core/Agent.js +1 -1
  60. package/dist/esm/core/agent/AgentBuilder.d.ts +17 -14
  61. package/dist/esm/core/agent/AgentBuilder.js +35 -23
  62. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  63. package/dist/esm/core/agent/stages/window.js +11 -13
  64. package/dist/esm/core/agent/stages/window.js.map +1 -1
  65. package/dist/esm/core/agent/types.d.ts +2 -2
  66. package/dist/esm/core/agent/watch.d.ts +1 -1
  67. package/dist/esm/core/agent/watch.js +1 -1
  68. package/dist/esm/core/agent/window/index.d.ts +1 -1
  69. package/dist/esm/core/agent/window/index.js.map +1 -1
  70. package/dist/esm/core/agent/window/strategies/summarizeOldest.js +0 -5
  71. package/dist/esm/core/agent/window/strategies/summarizeOldest.js.map +1 -1
  72. package/dist/esm/core/agent/window/types.d.ts +0 -30
  73. package/dist/esm/core/runner.d.ts +1 -1
  74. package/dist/esm/core/slots/helpers.d.ts +3 -4
  75. package/dist/esm/core/slots/helpers.js +4 -7
  76. package/dist/esm/core/slots/helpers.js.map +1 -1
  77. package/dist/esm/debug/finders.d.ts +7 -10
  78. package/dist/esm/debug/finders.js +7 -10
  79. package/dist/esm/debug/finders.js.map +1 -1
  80. package/dist/esm/debug.d.ts +4 -4
  81. package/dist/esm/debug.js +4 -4
  82. package/dist/esm/doors/context.d.ts +3 -3
  83. package/dist/esm/doors/context.js +3 -3
  84. package/dist/esm/embedders/index.d.ts +4 -4
  85. package/dist/esm/events/payloads.d.ts +10 -14
  86. package/dist/esm/hosting-providers.d.ts +16 -16
  87. package/dist/esm/hosting-providers.js +16 -16
  88. package/dist/esm/identity/types.d.ts +1 -1
  89. package/dist/esm/identity/types.js +1 -1
  90. package/dist/esm/identity/withCredentialRetry.d.ts +1 -1
  91. package/dist/esm/identity/withCredentialRetry.js +1 -1
  92. package/dist/esm/identity.d.ts +5 -5
  93. package/dist/esm/identity.js +5 -5
  94. package/dist/esm/index.d.ts +1 -1
  95. package/dist/esm/index.js +4 -4
  96. package/dist/esm/index.js.map +1 -1
  97. package/dist/esm/injection-engine.d.ts +4 -4
  98. package/dist/esm/injection-engine.js +4 -4
  99. package/dist/esm/lib/context-ledger/gates.d.ts +1 -1
  100. package/dist/esm/lib/context-ledger/gates.js +1 -1
  101. package/dist/esm/lib/injection-engine/SkillRegistry.d.ts +1 -1
  102. package/dist/esm/lib/injection-engine/SkillRegistry.js +1 -1
  103. package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +1 -16
  104. package/dist/esm/lib/injection-engine/factories/defineSkill.js +29 -1
  105. package/dist/esm/lib/injection-engine/factories/defineSkill.js.map +1 -1
  106. package/dist/esm/lib/injection-engine/skillsFromDir.d.ts +1 -11
  107. package/dist/esm/lib/injection-engine/skillsFromDir.js +22 -2
  108. package/dist/esm/lib/injection-engine/skillsFromDir.js.map +1 -1
  109. package/dist/esm/lib/injection-engine/types.d.ts +1 -1
  110. package/dist/esm/lib/mcp/gatewayTransport.d.ts +2 -2
  111. package/dist/esm/lib/mcp/gatewayTransport.js +2 -2
  112. package/dist/esm/lib/recorded-chat/index.d.ts +1 -1
  113. package/dist/esm/lib/recorded-chat/index.js +1 -1
  114. package/dist/esm/llm-providers.d.ts +5 -19
  115. package/dist/esm/llm-providers.js +5 -19
  116. package/dist/esm/llm-providers.js.map +1 -1
  117. package/dist/esm/locales/index.d.ts +7 -7
  118. package/dist/esm/locales/index.js +7 -7
  119. package/dist/esm/memory/causal/evidenceRecorder.d.ts +1 -1
  120. package/dist/esm/memory/causal/evidenceRecorder.js +1 -1
  121. package/dist/esm/memory/define.types.d.ts +3 -2
  122. package/dist/esm/memory/define.types.js.map +1 -1
  123. package/dist/esm/memory/index.d.ts +0 -10
  124. package/dist/esm/memory/index.js +6 -0
  125. package/dist/esm/memory/index.js.map +1 -1
  126. package/dist/esm/memory-providers.d.ts +8 -24
  127. package/dist/esm/memory-providers.js +8 -24
  128. package/dist/esm/memory-providers.js.map +1 -1
  129. package/dist/esm/observability/contextError/finders/index.d.ts +4 -4
  130. package/dist/esm/observability-providers.d.ts +5 -5
  131. package/dist/esm/observability-providers.js +5 -5
  132. package/dist/esm/observe.js +6 -6
  133. package/dist/esm/observe.js.map +1 -1
  134. package/dist/esm/providers.d.ts +2 -2
  135. package/dist/esm/providers.js +2 -2
  136. package/dist/esm/recorders/core/ContextRecorder.js +47 -11
  137. package/dist/esm/recorders/core/ContextRecorder.js.map +1 -1
  138. package/dist/esm/recorders/core/types.d.ts +16 -18
  139. package/dist/esm/recorders/core/types.js.map +1 -1
  140. package/dist/esm/recorders/observability/RouteRecorder.d.ts +1 -1
  141. package/dist/esm/recorders/observability/RouteRecorder.js +1 -1
  142. package/dist/esm/recorders/observability/ToolChoiceRecorder.d.ts +1 -1
  143. package/dist/esm/recorders/observability/ToolChoiceRecorder.js +1 -1
  144. package/dist/esm/reliability/index.d.ts +15 -3
  145. package/dist/esm/reliability/index.js +15 -3
  146. package/dist/esm/reliability/index.js.map +1 -1
  147. package/dist/esm/resilience/fallbackProvider.d.ts +1 -1
  148. package/dist/esm/resilience/fallbackProvider.js +1 -1
  149. package/dist/esm/resilience/withCircuitBreaker.d.ts +1 -1
  150. package/dist/esm/resilience/withCircuitBreaker.js +1 -1
  151. package/dist/esm/resilience/withRetry.d.ts +1 -1
  152. package/dist/esm/resilience/withRetry.js +1 -1
  153. package/dist/esm/security/PermissionPolicy.d.ts +2 -2
  154. package/dist/esm/security/PermissionPolicy.js +2 -2
  155. package/dist/esm/security/index.d.ts +3 -3
  156. package/dist/esm/security/index.js +3 -3
  157. package/dist/esm/status.d.ts +14 -24
  158. package/dist/esm/status.js +15 -25
  159. package/dist/esm/status.js.map +1 -1
  160. package/dist/esm/strategies/index.d.ts +9 -16
  161. package/dist/esm/strategies/index.js +9 -16
  162. package/dist/esm/strategies/index.js.map +1 -1
  163. package/dist/esm/strategies/registry.d.ts +1 -1
  164. package/dist/esm/strategies/registry.js +1 -1
  165. package/dist/esm/stream.d.ts +4 -4
  166. package/dist/esm/stream.js +4 -4
  167. package/dist/esm/thinking/index.d.ts +5 -5
  168. package/dist/esm/thinking/index.js +5 -5
  169. package/dist/esm/tool-providers/index.d.ts +4 -4
  170. package/dist/esm/tool-providers/index.js +4 -4
  171. package/dist/hosting-providers.js +16 -16
  172. package/dist/identity/types.js +1 -1
  173. package/dist/identity/withCredentialRetry.js +1 -1
  174. package/dist/identity.js +5 -5
  175. package/dist/index.js +4 -4
  176. package/dist/index.js.map +1 -1
  177. package/dist/injection-engine.js +4 -4
  178. package/dist/lib/context-ledger/gates.js +1 -1
  179. package/dist/lib/injection-engine/SkillRegistry.js +1 -1
  180. package/dist/lib/injection-engine/factories/defineSkill.js +29 -1
  181. package/dist/lib/injection-engine/factories/defineSkill.js.map +1 -1
  182. package/dist/lib/injection-engine/skillsFromDir.js +22 -2
  183. package/dist/lib/injection-engine/skillsFromDir.js.map +1 -1
  184. package/dist/lib/mcp/gatewayTransport.js +2 -2
  185. package/dist/lib/recorded-chat/index.js +1 -1
  186. package/dist/llm-providers.js +5 -19
  187. package/dist/llm-providers.js.map +1 -1
  188. package/dist/locales/index.js +6 -6
  189. package/dist/memory/causal/evidenceRecorder.js +1 -1
  190. package/dist/memory/define.types.js.map +1 -1
  191. package/dist/memory/index.js +6 -0
  192. package/dist/memory/index.js.map +1 -1
  193. package/dist/memory-providers.js +8 -24
  194. package/dist/memory-providers.js.map +1 -1
  195. package/dist/observability-providers.js +5 -5
  196. package/dist/observe.js +6 -6
  197. package/dist/observe.js.map +1 -1
  198. package/dist/providers.js +2 -2
  199. package/dist/recorders/core/ContextRecorder.js +47 -11
  200. package/dist/recorders/core/ContextRecorder.js.map +1 -1
  201. package/dist/recorders/core/types.js.map +1 -1
  202. package/dist/recorders/observability/RouteRecorder.js +1 -1
  203. package/dist/recorders/observability/ToolChoiceRecorder.js +1 -1
  204. package/dist/reliability/index.js +15 -3
  205. package/dist/reliability/index.js.map +1 -1
  206. package/dist/resilience/fallbackProvider.js +1 -1
  207. package/dist/resilience/withCircuitBreaker.js +1 -1
  208. package/dist/resilience/withRetry.js +1 -1
  209. package/dist/security/PermissionPolicy.js +2 -2
  210. package/dist/security/index.js +3 -3
  211. package/dist/status.js +14 -24
  212. package/dist/status.js.map +1 -1
  213. package/dist/strategies/index.js +9 -16
  214. package/dist/strategies/index.js.map +1 -1
  215. package/dist/strategies/registry.js +1 -1
  216. package/dist/stream.js +4 -4
  217. package/dist/thinking/index.js +5 -5
  218. package/dist/tool-providers/index.js +4 -4
  219. package/dist/types/adapters/hosting/agentcore.d.ts +1 -1
  220. package/dist/types/adapters/identity/agentcore.d.ts +1 -1
  221. package/dist/types/adapters/llm/AnthropicProvider.d.ts +1 -1
  222. package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts +1 -1
  223. package/dist/types/adapters/llm/MockProvider.d.ts +1 -1
  224. package/dist/types/adapters/llm/OpenAIProvider.d.ts +2 -2
  225. package/dist/types/adapters/memory/agentcore.d.ts +1 -1
  226. package/dist/types/adapters/memory/bedrockAgentMemory.d.ts +1 -1
  227. package/dist/types/adapters/memory/redis.d.ts +1 -1
  228. package/dist/types/adapters/observability/agentcore.d.ts +2 -2
  229. package/dist/types/adapters/observability/audit.d.ts +1 -1
  230. package/dist/types/adapters/observability/cloudwatch.d.ts +2 -2
  231. package/dist/types/adapters/observability/otel.d.ts +4 -4
  232. package/dist/types/adapters/observability/xray.d.ts +2 -2
  233. package/dist/types/core/agent/AgentBuilder.d.ts +17 -14
  234. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  235. package/dist/types/core/agent/stages/window.d.ts.map +1 -1
  236. package/dist/types/core/agent/types.d.ts +2 -2
  237. package/dist/types/core/agent/watch.d.ts +1 -1
  238. package/dist/types/core/agent/window/index.d.ts +1 -1
  239. package/dist/types/core/agent/window/index.d.ts.map +1 -1
  240. package/dist/types/core/agent/window/strategies/summarizeOldest.d.ts.map +1 -1
  241. package/dist/types/core/agent/window/types.d.ts +0 -30
  242. package/dist/types/core/agent/window/types.d.ts.map +1 -1
  243. package/dist/types/core/runner.d.ts +1 -1
  244. package/dist/types/core/slots/helpers.d.ts +3 -4
  245. package/dist/types/core/slots/helpers.d.ts.map +1 -1
  246. package/dist/types/debug/finders.d.ts +7 -10
  247. package/dist/types/debug/finders.d.ts.map +1 -1
  248. package/dist/types/debug.d.ts +4 -4
  249. package/dist/types/doors/context.d.ts +3 -3
  250. package/dist/types/embedders/index.d.ts +4 -4
  251. package/dist/types/events/payloads.d.ts +10 -14
  252. package/dist/types/events/payloads.d.ts.map +1 -1
  253. package/dist/types/hosting-providers.d.ts +16 -16
  254. package/dist/types/identity/types.d.ts +1 -1
  255. package/dist/types/identity/withCredentialRetry.d.ts +1 -1
  256. package/dist/types/identity.d.ts +5 -5
  257. package/dist/types/index.d.ts +1 -1
  258. package/dist/types/index.d.ts.map +1 -1
  259. package/dist/types/injection-engine.d.ts +4 -4
  260. package/dist/types/lib/context-ledger/gates.d.ts +1 -1
  261. package/dist/types/lib/injection-engine/SkillRegistry.d.ts +1 -1
  262. package/dist/types/lib/injection-engine/factories/defineSkill.d.ts +1 -16
  263. package/dist/types/lib/injection-engine/factories/defineSkill.d.ts.map +1 -1
  264. package/dist/types/lib/injection-engine/skillsFromDir.d.ts +1 -11
  265. package/dist/types/lib/injection-engine/skillsFromDir.d.ts.map +1 -1
  266. package/dist/types/lib/injection-engine/types.d.ts +1 -1
  267. package/dist/types/lib/mcp/gatewayTransport.d.ts +2 -2
  268. package/dist/types/lib/recorded-chat/index.d.ts +1 -1
  269. package/dist/types/llm-providers.d.ts +5 -19
  270. package/dist/types/llm-providers.d.ts.map +1 -1
  271. package/dist/types/locales/index.d.ts +7 -7
  272. package/dist/types/memory/causal/evidenceRecorder.d.ts +1 -1
  273. package/dist/types/memory/define.types.d.ts +3 -2
  274. package/dist/types/memory/define.types.d.ts.map +1 -1
  275. package/dist/types/memory/index.d.ts +0 -10
  276. package/dist/types/memory/index.d.ts.map +1 -1
  277. package/dist/types/memory-providers.d.ts +8 -24
  278. package/dist/types/memory-providers.d.ts.map +1 -1
  279. package/dist/types/observability/contextError/finders/index.d.ts +4 -4
  280. package/dist/types/observability-providers.d.ts +5 -5
  281. package/dist/types/providers.d.ts +2 -2
  282. package/dist/types/recorders/core/ContextRecorder.d.ts.map +1 -1
  283. package/dist/types/recorders/core/types.d.ts +16 -18
  284. package/dist/types/recorders/core/types.d.ts.map +1 -1
  285. package/dist/types/recorders/observability/RouteRecorder.d.ts +1 -1
  286. package/dist/types/recorders/observability/ToolChoiceRecorder.d.ts +1 -1
  287. package/dist/types/reliability/index.d.ts +15 -3
  288. package/dist/types/reliability/index.d.ts.map +1 -1
  289. package/dist/types/resilience/fallbackProvider.d.ts +1 -1
  290. package/dist/types/resilience/withCircuitBreaker.d.ts +1 -1
  291. package/dist/types/resilience/withRetry.d.ts +1 -1
  292. package/dist/types/security/PermissionPolicy.d.ts +2 -2
  293. package/dist/types/security/index.d.ts +3 -3
  294. package/dist/types/status.d.ts +14 -24
  295. package/dist/types/status.d.ts.map +1 -1
  296. package/dist/types/strategies/index.d.ts +9 -16
  297. package/dist/types/strategies/index.d.ts.map +1 -1
  298. package/dist/types/strategies/registry.d.ts +1 -1
  299. package/dist/types/stream.d.ts +4 -4
  300. package/dist/types/thinking/index.d.ts +5 -5
  301. package/dist/types/tool-providers/index.d.ts +4 -4
  302. package/package.json +1 -209
@@ -1,11 +1,11 @@
1
1
  /**
2
- * LLM provider adapters — implementation behind the `agentfootprint/llm-providers`
2
+ * LLM provider adapters — implementation behind the `agentfootprint/providers`
3
3
  * subpath (which re-exports this file).
4
4
  *
5
5
  * The standalone `agentfootprint/providers` subpath alias was removed in 4.0.0.
6
6
  * Import from the canonical subpath:
7
7
  *
8
- * import { mock, anthropic, openai } from 'agentfootprint/llm-providers';
8
+ * import { mock, anthropic, openai } from 'agentfootprint/providers';
9
9
  *
10
10
  * Pattern: Adapter (GoF) — concrete `LLMProvider` implementations that
11
11
  * translate the agentfootprint port to a specific vendor SDK.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * LLM provider adapters — implementation behind the `agentfootprint/llm-providers`
2
+ * LLM provider adapters — implementation behind the `agentfootprint/providers`
3
3
  * subpath (which re-exports this file).
4
4
  *
5
5
  * The standalone `agentfootprint/providers` subpath alias was removed in 4.0.0.
6
6
  * Import from the canonical subpath:
7
7
  *
8
- * import { mock, anthropic, openai } from 'agentfootprint/llm-providers';
8
+ * import { mock, anthropic, openai } from 'agentfootprint/providers';
9
9
  *
10
10
  * Pattern: Adapter (GoF) — concrete `LLMProvider` implementations that
11
11
  * translate the agentfootprint port to a specific vendor SDK.
@@ -121,18 +121,21 @@ export class ContextRecorder {
121
121
  if (!records)
122
122
  return;
123
123
  for (const rec of records) {
124
- // The payload REQUIRES `unit` / `cap` / `projected` (8.14.0); the record
125
- // does not, because slot builders — including any a consumer wrote —
126
- // still typecheck without them. Filling `'chars'` here is not a guess:
127
- // this handler only ever sees writes to `COMPOSITION_KEYS.BUDGET_PRESSURE`,
128
- // which come off a slot composition, and a slot composition counts
129
- // `String.length`. A window strategy never travels this path — it emits
130
- // the event directly, with `unit: 'tokens'`.
124
+ // The payload REQUIRES `unit`; the record does not, because slot
125
+ // builders — including any a consumer wrote — still typecheck without
126
+ // it. Filling `'chars'` here is not a guess: this handler only ever
127
+ // sees writes to `COMPOSITION_KEYS.BUDGET_PRESSURE`, which come off a
128
+ // slot composition, and a slot composition counts `String.length`. A
129
+ // window strategy never travels this path — it emits the event
130
+ // directly, with `unit: 'tokens'`.
131
+ const { cap, projected } = readPressureNumbers(rec);
131
132
  this.dispatch('agentfootprint.context.budget_pressure', {
132
- ...rec,
133
+ slot: rec.slot,
134
+ overflowBy: rec.overflowBy,
135
+ planAction: rec.planAction,
133
136
  unit: rec.unit ?? 'chars',
134
- cap: rec.cap ?? rec.capTokens,
135
- projected: rec.projected ?? rec.projectedTokens,
137
+ cap,
138
+ projected,
136
139
  }, event);
137
140
  }
138
141
  }
@@ -219,10 +222,43 @@ export class ContextRecorder {
219
222
  const rec = r;
220
223
  if (typeof rec.slot !== 'string')
221
224
  return undefined;
222
- if (typeof rec.capTokens !== 'number')
225
+ if (typeof rec.cap !== 'number' && typeof rec.capTokens !== 'number')
223
226
  return undefined;
224
227
  }
225
228
  return value;
226
229
  }
227
230
  }
231
+ let warnedLegacyPressureNames = false;
232
+ /**
233
+ * Read a pressure record's two numbers, accepting the 8.x spelling once more.
234
+ *
235
+ * 9.0.0 grace, not support: `cap` / `projected` win whenever they are present,
236
+ * and a record carrying only the old names is read AND reported — once per
237
+ * process, because a slot builder that writes them writes them on every
238
+ * composition and a warning per event is a warning nobody reads.
239
+ *
240
+ * A refusal would have been the wrong shape here. This is a recorder: a throw
241
+ * is isolated by footprintjs and swallowed, so refusing would delete the
242
+ * consumer's budget signal and say nothing about why. Reading the value and
243
+ * naming the new fields is the version of "teach" that survives the channel.
244
+ *
245
+ * The fallback is deleted in 10.0.0; then a legacy-only record fails
246
+ * `asPressureArray` and no event is emitted at all.
247
+ */
248
+ function readPressureNumbers(rec) {
249
+ const legacy = rec;
250
+ const cap = legacy.cap ?? legacy.capTokens ?? 0;
251
+ const projected = legacy.projected ?? legacy.projectedTokens ?? 0;
252
+ if (legacy.cap === undefined && legacy.capTokens !== undefined && !warnedLegacyPressureNames) {
253
+ warnedLegacyPressureNames = true;
254
+ // eslint-disable-next-line no-console
255
+ console.warn(`[agentfootprint] a budget-pressure record for slot '${rec.slot}' carries the 8.x field ` +
256
+ `names \`capTokens\` / \`projectedTokens\`, which were removed in 9.0.0. They are read ` +
257
+ `this once so your budget signal still fires, and the fallback is deleted in 10.0.0. ` +
258
+ `Write \`cap\` / \`projected\` with \`unit\` instead — the old names asserted TOKENS on ` +
259
+ `a channel that counts CHARACTERS. Whichever slot builder produced this record needs ` +
260
+ `the three-field shape.`);
261
+ }
262
+ return { cap, projected };
263
+ }
228
264
  //# sourceMappingURL=ContextRecorder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextRecorder.js","sourceRoot":"","sources":["../../../../src/recorders/core/ContextRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,cAAc,EAAmB,MAAM,2BAA2B,CAAC;AAO5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAa9C,MAAM,OAAO,eAAe;IACjB,EAAE,CAAS;IACH,UAA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;YACxF,sFAAsF;YACtF,yFAAyF;YACzF,sFAAsF;YACtF,wBAAwB,CAC3B,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAC5B,CAAC"}
@@ -82,15 +82,17 @@ export interface EvictionRecord {
82
82
  /**
83
83
  * Budget-pressure warning — emitted before evictions fire.
84
84
  *
85
- * `capTokens` / `projectedTokens` are historical names: on THIS channel the
86
- * numbers are CHARS (`composeSlot` measures `String.length`). Renaming them
87
- * would be breaking, so they stay and {@link unit} / {@link cap} /
88
- * {@link projected} were added beside them in 8.14.0.
85
+ * `cap` and `projected` are counted in {@link unit}. They were added in 8.14.0
86
+ * beside `capTokens` / `projectedTokens`, which asserted a unit this channel
87
+ * does not use: on THIS channel the numbers are CHARS (`composeSlot` measures
88
+ * `String.length`), while a window strategy fills the same event with tokens.
89
+ * 9.0.0 removed the two misnamed fields, and `cap` / `projected` are required
90
+ * in their place — a record that carried neither pair would be a record with
91
+ * no numbers on it.
89
92
  *
90
- * The three new fields are OPTIONAL here, unlike on the event payload, because
91
- * this record is written by slot builders — including any a consumer wrote —
92
- * and a record from one of those still typechecks. `ContextRecorder` fills a
93
- * missing `unit` with `'chars'`, which is not a guess: every write to
93
+ * {@link unit} stays OPTIONAL, unlike on the event payload, because this
94
+ * record is written by slot builders — including any a consumer wrote. A
95
+ * missing `unit` reads as `'chars'`, which is not a guess: every write to
94
96
  * `COMPOSITION_KEYS.BUDGET_PRESSURE` comes off a slot composition, and a slot
95
97
  * composition is counted in characters by construction.
96
98
  *
@@ -100,19 +102,15 @@ export interface EvictionRecord {
100
102
  */
101
103
  export interface BudgetPressureRecord {
102
104
  readonly slot: ContextSlot;
103
- /** @deprecated Read {@link cap} with {@link unit}. Still written. */
104
- readonly capTokens: number;
105
- /** @deprecated Read {@link projected} with {@link unit}. Still written. */
106
- readonly projectedTokens: number;
107
105
  readonly overflowBy: number;
108
106
  readonly planAction: 'evict' | 'summarize' | 'abort' | 'none';
109
- /** What the numbers count. Absent on a record written before 8.14.0 (or by
110
- * a third-party slot builder) — the slot channel is `'chars'`. */
107
+ /** What the numbers count. Absent on a record written by a third-party slot
108
+ * builder — the slot channel is `'chars'`. */
111
109
  readonly unit?: 'chars' | 'tokens';
112
- /** Same value as {@link capTokens}, under a name that asserts no unit. */
113
- readonly cap?: number;
114
- /** Same value as {@link projectedTokens}, under a name that asserts no unit. */
115
- readonly projected?: number;
110
+ /** The budget, in {@link unit}. */
111
+ readonly cap: number;
112
+ /** What was measured against it, in {@link unit}. */
113
+ readonly projected: number;
116
114
  }
117
115
  export declare const COMPOSITION_KEYS: {
118
116
  readonly SLOT_COMPOSED: "slotCompositions";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/recorders/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAsHH,uEAAuE;AACvE,0EAA0E;AAC1E,4BAA4B;AAC5B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa,EAAE,kBAAkB;IACjC,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,qBAAqB;CAC9B,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/recorders/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoHH,uEAAuE;AACvE,0EAA0E;AAC1E,4BAA4B;AAC5B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa,EAAE,kBAAkB;IACjC,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,qBAAqB;CAC9B,CAAC"}
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * Pattern: CombinedRecorder (Convention 1 — single purpose: route evidence). Owns a
17
17
  * `SequenceStore<RouteHop>`. Convention 4: resets on a new `runId`.
18
- * Role: Tier-3 /observe recorder — `Agent.create(...).recorder(routeRecorder())`.
18
+ * Role: Tier-3 /observe recorder — `Agent.create(...).watch(routeRecorder())`.
19
19
  * Powers the lens, the "Why this skill?" panel, and paper route figures.
20
20
  */
21
21
  import type { EmitEvent } from 'footprintjs';
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * Pattern: CombinedRecorder (Convention 1 — single purpose: route evidence). Owns a
17
17
  * `SequenceStore<RouteHop>`. Convention 4: resets on a new `runId`.
18
- * Role: Tier-3 /observe recorder — `Agent.create(...).recorder(routeRecorder())`.
18
+ * Role: Tier-3 /observe recorder — `Agent.create(...).watch(routeRecorder())`.
19
19
  * Powers the lens, the "Why this skill?" panel, and paper route figures.
20
20
  */
21
21
  import { SequenceStore } from 'footprintjs/trace';
@@ -60,7 +60,7 @@
60
60
  * by the LLM call's `runtimeStageId`. Convention 4: resets on a
61
61
  * new `runId` via `FlowRecorder.onRunStart`.
62
62
  * Role: Tier-3 /observe recorder. Attach via `Agent.create(...)
63
- * .recorder(handle)` or `executor.attachCombinedRecorder`.
63
+ * .watch(handle)` or `executor.attachCombinedRecorder`.
64
64
  *
65
65
  * Honest claim (RFC-002 §2): margins are embedding geometry between the
66
66
  * context and tool descriptions — a deterministic PROXY for the model's
@@ -60,7 +60,7 @@
60
60
  * by the LLM call's `runtimeStageId`. Convention 4: resets on a
61
61
  * new `runId` via `FlowRecorder.onRunStart`.
62
62
  * Role: Tier-3 /observe recorder. Attach via `Agent.create(...)
63
- * .recorder(handle)` or `executor.attachCombinedRecorder`.
63
+ * .watch(handle)` or `executor.attachCombinedRecorder`.
64
64
  *
65
65
  * Honest claim (RFC-002 §2): margins are embedding geometry between the
66
66
  * context and tool descriptions — a deterministic PROXY for the model's
@@ -32,9 +32,21 @@
32
32
  * different class than the provider decorator does, so this path stays the
33
33
  * only home for it. Everything else here is also on the new door.
34
34
  *
35
- * @deprecated Since 8.0.0 — import from `agentfootprint/resilience` instead.
36
- * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
37
- * here is the same symbol on the new door, not a copy.
35
+ * ## Why this path survived 9.0.0
36
+ *
37
+ * 9.0.0 removed the other sixteen 8.0.0 door aliases. This one stayed, and the
38
+ * reason is that ONE name: the gate's `CircuitOpenError` and the decorator's
39
+ * are two different classes with different constructors and different
40
+ * `instanceof` answers, `agentfootprint/resilience` carries the decorator's,
41
+ * and a name cannot be exported twice from one door. Removing this path would
42
+ * not have renamed the gate's error — it would have made it unreachable, so a
43
+ * consumer could no longer `instanceof`-check the error their own reliability
44
+ * gate throws. That is a capability, not a spelling, so the path stayed.
45
+ *
46
+ * @deprecated Since 8.0.0 for every name EXCEPT `CircuitOpenError` — those all
47
+ * live on `agentfootprint/resilience`, which is the door to prefer. This path
48
+ * is NOT scheduled for removal: it is the only home of the reliability gate's
49
+ * `CircuitOpenError`, and the removal date announced in 8.0.0 is withdrawn.
38
50
  */
39
51
  export type { CircuitBreakerConfig, ReliabilityConfig, ReliabilityDecision, ReliabilityFallbackFn, ReliabilityProvider, ReliabilityRule, ReliabilityScope, } from './types.js';
40
52
  export { ReliabilityFailFastError } from './types.js';
@@ -32,9 +32,21 @@
32
32
  * different class than the provider decorator does, so this path stays the
33
33
  * only home for it. Everything else here is also on the new door.
34
34
  *
35
- * @deprecated Since 8.0.0 — import from `agentfootprint/resilience` instead.
36
- * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
37
- * here is the same symbol on the new door, not a copy.
35
+ * ## Why this path survived 9.0.0
36
+ *
37
+ * 9.0.0 removed the other sixteen 8.0.0 door aliases. This one stayed, and the
38
+ * reason is that ONE name: the gate's `CircuitOpenError` and the decorator's
39
+ * are two different classes with different constructors and different
40
+ * `instanceof` answers, `agentfootprint/resilience` carries the decorator's,
41
+ * and a name cannot be exported twice from one door. Removing this path would
42
+ * not have renamed the gate's error — it would have made it unreachable, so a
43
+ * consumer could no longer `instanceof`-check the error their own reliability
44
+ * gate throws. That is a capability, not a spelling, so the path stayed.
45
+ *
46
+ * @deprecated Since 8.0.0 for every name EXCEPT `CircuitOpenError` — those all
47
+ * live on `agentfootprint/resilience`, which is the door to prefer. This path
48
+ * is NOT scheduled for removal: it is the only home of the reliability gate's
49
+ * `CircuitOpenError`, and the removal date announced in 8.0.0 is withdrawn.
38
50
  */
39
51
  export { ReliabilityFailFastError } from './types.js';
40
52
  // CircuitBreaker pure-state-machine surface — exposed so consumers can
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/reliability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAYH,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,uEAAuE;AACvE,qEAAqE;AACrE,+DAA+D;AAC/D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GAGpB,MAAM,qBAAqB,CAAC;AAE7B,wEAAwE;AACxE,mEAAmE;AACnE,+DAA+D;AAC/D,sEAAsE;AACtE,mEAAmE;AACnE,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8CAA8C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/reliability/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAYH,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,uEAAuE;AACvE,qEAAqE;AACrE,+DAA+D;AAC/D,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GAGpB,MAAM,qBAAqB,CAAC;AAE7B,wEAAwE;AACxE,mEAAmE;AACnE,+DAA+D;AAC/D,sEAAsE;AACtE,mEAAmE;AACnE,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8CAA8C,CAAC"}
@@ -10,7 +10,7 @@
10
10
  * predicate. The first success wins; if all fail, the last error throws.
11
11
  *
12
12
  * @example
13
- * import { anthropic, openai, mock } from 'agentfootprint/llm-providers';
13
+ * import { anthropic, openai, mock } from 'agentfootprint/providers';
14
14
  * import { fallbackProvider } from 'agentfootprint/resilience';
15
15
  *
16
16
  * const provider = fallbackProvider(
@@ -10,7 +10,7 @@
10
10
  * predicate. The first success wins; if all fail, the last error throws.
11
11
  *
12
12
  * @example
13
- * import { anthropic, openai, mock } from 'agentfootprint/llm-providers';
13
+ * import { anthropic, openai, mock } from 'agentfootprint/providers';
14
14
  * import { fallbackProvider } from 'agentfootprint/resilience';
15
15
  *
16
16
  * const provider = fallbackProvider(
@@ -127,7 +127,7 @@ export declare class CircuitOpenError extends Error {
127
127
  *
128
128
  * @example
129
129
  * ```ts
130
- * import { anthropic, openai } from 'agentfootprint/llm-providers';
130
+ * import { anthropic, openai } from 'agentfootprint/providers';
131
131
  * import { withCircuitBreaker, withFallback } from 'agentfootprint/resilience';
132
132
  *
133
133
  * const provider = withFallback(
@@ -106,7 +106,7 @@ export class CircuitOpenError extends Error {
106
106
  *
107
107
  * @example
108
108
  * ```ts
109
- * import { anthropic, openai } from 'agentfootprint/llm-providers';
109
+ * import { anthropic, openai } from 'agentfootprint/providers';
110
110
  * import { withCircuitBreaker, withFallback } from 'agentfootprint/resilience';
111
111
  *
112
112
  * const provider = withFallback(
@@ -53,7 +53,7 @@ export interface WithRetryOptions {
53
53
  *
54
54
  * @example
55
55
  * import { withRetry } from 'agentfootprint/resilience';
56
- * import { anthropic } from 'agentfootprint/llm-providers';
56
+ * import { anthropic } from 'agentfootprint/providers';
57
57
  *
58
58
  * const robust = withRetry(anthropic({ apiKey }), {
59
59
  * maxAttempts: 5,
@@ -23,7 +23,7 @@
23
23
  *
24
24
  * @example
25
25
  * import { withRetry } from 'agentfootprint/resilience';
26
- * import { anthropic } from 'agentfootprint/llm-providers';
26
+ * import { anthropic } from 'agentfootprint/providers';
27
27
  *
28
28
  * const robust = withRetry(anthropic({ apiKey }), {
29
29
  * maxAttempts: 5,
@@ -14,7 +14,7 @@
14
14
  * - `PermissionChecker` interface (async check; consumed by Agent
15
15
  * constructor's `permissionChecker` field)
16
16
  * - sync `isAllowed(toolId)` method (consumed by `gatedTools(...)`
17
- * from `agentfootprint/tool-providers`)
17
+ * from `agentfootprint/providers`)
18
18
  *
19
19
  * Pattern: Strategy (GoF) for the role-allowlist policy + Adapter
20
20
  * (matches `PermissionChecker` interface so it composes with
@@ -73,7 +73,7 @@ export interface PermissionPolicyOptions {
73
73
  /**
74
74
  * Data-driven role-based permission policy. Satisfies the v2.4
75
75
  * `PermissionChecker` interface AND exposes a sync `isAllowed` method
76
- * for use with `gatedTools` from `agentfootprint/tool-providers`.
76
+ * for use with `gatedTools` from `agentfootprint/providers`.
77
77
  */
78
78
  export declare class PermissionPolicy implements PermissionChecker {
79
79
  private readonly opts;
@@ -14,7 +14,7 @@
14
14
  * - `PermissionChecker` interface (async check; consumed by Agent
15
15
  * constructor's `permissionChecker` field)
16
16
  * - sync `isAllowed(toolId)` method (consumed by `gatedTools(...)`
17
- * from `agentfootprint/tool-providers`)
17
+ * from `agentfootprint/providers`)
18
18
  *
19
19
  * Pattern: Strategy (GoF) for the role-allowlist policy + Adapter
20
20
  * (matches `PermissionChecker` interface so it composes with
@@ -53,7 +53,7 @@
53
53
  /**
54
54
  * Data-driven role-based permission policy. Satisfies the v2.4
55
55
  * `PermissionChecker` interface AND exposes a sync `isAllowed` method
56
- * for use with `gatedTools` from `agentfootprint/tool-providers`.
56
+ * for use with `gatedTools` from `agentfootprint/providers`.
57
57
  */
58
58
  export class PermissionPolicy {
59
59
  opts;
@@ -4,13 +4,13 @@
4
4
  * Permissions are NOT context engineering — they're a guard ON
5
5
  * context-engineering operations (tool dispatch, skill activation,
6
6
  * memory writes, output emission). That's why this lives in its own
7
- * subpath, parallel to `agentfootprint/tool-providers` and the
7
+ * subpath, parallel to `agentfootprint/providers` and the
8
8
  * `agentfootprint/memory-*` and `agentfootprint/providers` subpaths.
9
9
  *
10
10
  * Today's surface is small and data-driven on purpose: one role
11
11
  * allowlist primitive that satisfies BOTH the v2.4 `PermissionChecker`
12
12
  * interface AND a sync `isAllowed(toolId)` predicate for use with
13
- * `gatedTools` from `agentfootprint/tool-providers` — plus
13
+ * `gatedTools` from `agentfootprint/providers` — plus
14
14
  * `agentCorePolicy()`, the same port answered by a remote policy store.
15
15
  *
16
16
  * A local allowlist and a remote policy engine differ in one way that
@@ -25,7 +25,7 @@
25
25
  *
26
26
  * @example
27
27
  * import { PermissionPolicy } from 'agentfootprint/security';
28
- * import { gatedTools, staticTools } from 'agentfootprint/tool-providers';
28
+ * import { gatedTools, staticTools } from 'agentfootprint/providers';
29
29
  *
30
30
  * const policy = PermissionPolicy.fromRoles(
31
31
  * {
@@ -4,13 +4,13 @@
4
4
  * Permissions are NOT context engineering — they're a guard ON
5
5
  * context-engineering operations (tool dispatch, skill activation,
6
6
  * memory writes, output emission). That's why this lives in its own
7
- * subpath, parallel to `agentfootprint/tool-providers` and the
7
+ * subpath, parallel to `agentfootprint/providers` and the
8
8
  * `agentfootprint/memory-*` and `agentfootprint/providers` subpaths.
9
9
  *
10
10
  * Today's surface is small and data-driven on purpose: one role
11
11
  * allowlist primitive that satisfies BOTH the v2.4 `PermissionChecker`
12
12
  * interface AND a sync `isAllowed(toolId)` predicate for use with
13
- * `gatedTools` from `agentfootprint/tool-providers` — plus
13
+ * `gatedTools` from `agentfootprint/providers` — plus
14
14
  * `agentCorePolicy()`, the same port answered by a remote policy store.
15
15
  *
16
16
  * A local allowlist and a remote policy engine differ in one way that
@@ -25,7 +25,7 @@
25
25
  *
26
26
  * @example
27
27
  * import { PermissionPolicy } from 'agentfootprint/security';
28
- * import { gatedTools, staticTools } from 'agentfootprint/tool-providers';
28
+ * import { gatedTools, staticTools } from 'agentfootprint/providers';
29
29
  *
30
30
  * const policy = PermissionPolicy.fromRoles(
31
31
  * {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * agentfootprint/status — chat-bubble status surface.
2
+ * status — chat-bubble status surface.
3
3
  *
4
4
  * Pattern: pure projection. `selectStatus` walks the typed
5
5
  * event log forward, tracking active pause / tool / LLM state,
@@ -10,26 +10,16 @@
10
10
  * right now?" indicator. Output feeds `renderStatusLine`
11
11
  * which resolves a template + variables to a final string.
12
12
  *
13
- * Why a subpath:
14
- * - Consistent with `agentfootprint/observe` and
15
- * `agentfootprint/locales` — every observability surface gets its
16
- * own entry point.
17
- * - Self-documenting at the import line: `from 'agentfootprint/status'`
18
- * vs an opaque main-export grab.
19
- * - Future home for extended-thinking primitives (Anthropic
20
- * `thinking_delta` / `redacted_thinking` blocks). Adding them here
21
- * is non-breaking; consumers already importing from
22
- * `agentfootprint/status` get the new state surface for free.
23
- *
24
- * Prose lives elsewhere: the `defaultStatusTemplates` catalog's canonical
25
- * home is `agentfootprint/locales` (the single i18n home for all prose —
26
- * commentary, thinking, status). It is re-exported here for convenience, but
27
- * new code should import the words from `/locales` and the LOGIC
28
- * (`selectStatus` / `renderStatusLine`) from here.
29
- *
30
- * As of v7 these are NOT on the main `agentfootprint` barrel — status is a
31
- * named subpath like every other observability surface. Import the logic
32
- * from `agentfootprint/status`, the words from `agentfootprint/locales`.
13
+ * Future home for extended-thinking primitives (Anthropic `thinking_delta` /
14
+ * `redacted_thinking` blocks). Adding them here is non-breaking; consumers
15
+ * already importing from `agentfootprint/observe` get the new state surface
16
+ * for free.
17
+ *
18
+ * Prose lives elsewhere: the `defaultStatusTemplates` catalog's canonical home
19
+ * is `src/locales/` (the single i18n home for all prose — commentary,
20
+ * thinking, status). It is re-exported here for convenience. Both come out of
21
+ * the `agentfootprint/observe` door; these are NOT on the main `agentfootprint`
22
+ * barrel.
33
23
  *
34
24
  * State machine (4 states + null):
35
25
  *
@@ -51,8 +41,8 @@
51
41
  *
52
42
  * (null) run done / between calls → bubble hidden
53
43
  *
54
- * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
55
- * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
56
- * here is the same symbol on the new door, not a copy.
44
+ * Not an import path of its own since 9.0.0. This is the implementation barrel
45
+ * behind `agentfootprint/observe`, which re-exports every name here — same
46
+ * symbols, one door. Import from the door.
57
47
  */
58
48
  export { selectStatus, renderStatusLine, type StatusState, type StatusKind, type StatusTemplates, type StatusContext, } from './recorders/observability/status/statusTemplates.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * agentfootprint/status — chat-bubble status surface.
2
+ * status — chat-bubble status surface.
3
3
  *
4
4
  * Pattern: pure projection. `selectStatus` walks the typed
5
5
  * event log forward, tracking active pause / tool / LLM state,
@@ -10,26 +10,16 @@
10
10
  * right now?" indicator. Output feeds `renderStatusLine`
11
11
  * which resolves a template + variables to a final string.
12
12
  *
13
- * Why a subpath:
14
- * - Consistent with `agentfootprint/observe` and
15
- * `agentfootprint/locales` — every observability surface gets its
16
- * own entry point.
17
- * - Self-documenting at the import line: `from 'agentfootprint/status'`
18
- * vs an opaque main-export grab.
19
- * - Future home for extended-thinking primitives (Anthropic
20
- * `thinking_delta` / `redacted_thinking` blocks). Adding them here
21
- * is non-breaking; consumers already importing from
22
- * `agentfootprint/status` get the new state surface for free.
23
- *
24
- * Prose lives elsewhere: the `defaultStatusTemplates` catalog's canonical
25
- * home is `agentfootprint/locales` (the single i18n home for all prose —
26
- * commentary, thinking, status). It is re-exported here for convenience, but
27
- * new code should import the words from `/locales` and the LOGIC
28
- * (`selectStatus` / `renderStatusLine`) from here.
29
- *
30
- * As of v7 these are NOT on the main `agentfootprint` barrel — status is a
31
- * named subpath like every other observability surface. Import the logic
32
- * from `agentfootprint/status`, the words from `agentfootprint/locales`.
13
+ * Future home for extended-thinking primitives (Anthropic `thinking_delta` /
14
+ * `redacted_thinking` blocks). Adding them here is non-breaking; consumers
15
+ * already importing from `agentfootprint/observe` get the new state surface
16
+ * for free.
17
+ *
18
+ * Prose lives elsewhere: the `defaultStatusTemplates` catalog's canonical home
19
+ * is `src/locales/` (the single i18n home for all prose — commentary,
20
+ * thinking, status). It is re-exported here for convenience. Both come out of
21
+ * the `agentfootprint/observe` door; these are NOT on the main `agentfootprint`
22
+ * barrel.
33
23
  *
34
24
  * State machine (4 states + null):
35
25
  *
@@ -51,12 +41,12 @@
51
41
  *
52
42
  * (null) run done / between calls → bubble hidden
53
43
  *
54
- * @deprecated Since 8.0.0 — import from `agentfootprint/observe` instead.
55
- * This path keeps working for all of 8.x and is removed in 9.0.0. Every name
56
- * here is the same symbol on the new door, not a copy.
44
+ * Not an import path of its own since 9.0.0. This is the implementation barrel
45
+ * behind `agentfootprint/observe`, which re-exports every name here — same
46
+ * symbols, one door. Import from the door.
57
47
  */
58
48
  // Logic only — the status state machine + renderer. The prose catalog
59
- // (`defaultStatusTemplates`) lives on `agentfootprint/locales`, the single
49
+ // (`defaultStatusTemplates`) lives on `agentfootprint/observe`, the single
60
50
  // home for all user-facing text; `renderStatusLine` consumes it.
61
51
  export { selectStatus, renderStatusLine, } from './recorders/observability/status/statusTemplates.js';
62
52
  //# sourceMappingURL=status.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,sEAAsE;AACtE,2EAA2E;AAC3E,iEAAiE;AACjE,OAAO,EACL,YAAY,EACZ,gBAAgB,GAKjB,MAAM,qDAAqD,CAAC"}
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,sEAAsE;AACtE,2EAA2E;AAC3E,iEAAiE;AACjE,OAAO,EACL,YAAY,EACZ,gBAAgB,GAKjB,MAAM,qDAAqD,CAAC"}