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.
- package/README.md +2 -2
- package/dist/adapters/hosting/agentcore.js +1 -1
- package/dist/adapters/identity/agentcore.js +1 -1
- package/dist/adapters/llm/AnthropicProvider.js +1 -1
- package/dist/adapters/llm/BrowserOpenAIProvider.js +1 -1
- package/dist/adapters/llm/MockProvider.js +1 -1
- package/dist/adapters/llm/OpenAIProvider.js +2 -2
- package/dist/adapters/memory/agentcore.js +1 -1
- package/dist/adapters/memory/bedrockAgentMemory.js +1 -1
- package/dist/adapters/memory/redis.js +1 -1
- package/dist/adapters/observability/agentcore.js +2 -2
- package/dist/adapters/observability/audit.js +1 -1
- package/dist/adapters/observability/cloudwatch.js +2 -2
- package/dist/adapters/observability/otel.js +3 -3
- package/dist/adapters/observability/xray.js +2 -2
- package/dist/core/Agent.js +1 -1
- package/dist/core/agent/AgentBuilder.js +35 -23
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/stages/window.js +11 -13
- package/dist/core/agent/stages/window.js.map +1 -1
- package/dist/core/agent/watch.js +1 -1
- package/dist/core/agent/window/index.js.map +1 -1
- package/dist/core/agent/window/strategies/summarizeOldest.js +0 -5
- package/dist/core/agent/window/strategies/summarizeOldest.js.map +1 -1
- package/dist/core/slots/helpers.js +4 -7
- package/dist/core/slots/helpers.js.map +1 -1
- package/dist/debug/finders.js +7 -10
- package/dist/debug/finders.js.map +1 -1
- package/dist/debug.js +4 -4
- package/dist/doors/context.js +3 -3
- package/dist/esm/adapters/hosting/agentcore.d.ts +1 -1
- package/dist/esm/adapters/hosting/agentcore.js +1 -1
- package/dist/esm/adapters/identity/agentcore.d.ts +1 -1
- package/dist/esm/adapters/identity/agentcore.js +1 -1
- package/dist/esm/adapters/llm/AnthropicProvider.d.ts +1 -1
- package/dist/esm/adapters/llm/AnthropicProvider.js +1 -1
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.d.ts +1 -1
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.js +1 -1
- package/dist/esm/adapters/llm/MockProvider.d.ts +1 -1
- package/dist/esm/adapters/llm/MockProvider.js +1 -1
- package/dist/esm/adapters/llm/OpenAIProvider.d.ts +2 -2
- package/dist/esm/adapters/llm/OpenAIProvider.js +2 -2
- package/dist/esm/adapters/memory/agentcore.d.ts +1 -1
- package/dist/esm/adapters/memory/agentcore.js +1 -1
- package/dist/esm/adapters/memory/bedrockAgentMemory.d.ts +1 -1
- package/dist/esm/adapters/memory/bedrockAgentMemory.js +1 -1
- package/dist/esm/adapters/memory/redis.d.ts +1 -1
- package/dist/esm/adapters/memory/redis.js +1 -1
- package/dist/esm/adapters/observability/agentcore.d.ts +2 -2
- package/dist/esm/adapters/observability/agentcore.js +2 -2
- package/dist/esm/adapters/observability/audit.d.ts +1 -1
- package/dist/esm/adapters/observability/audit.js +1 -1
- package/dist/esm/adapters/observability/cloudwatch.d.ts +2 -2
- package/dist/esm/adapters/observability/cloudwatch.js +2 -2
- package/dist/esm/adapters/observability/otel.d.ts +4 -4
- package/dist/esm/adapters/observability/otel.js +3 -3
- package/dist/esm/adapters/observability/xray.d.ts +2 -2
- package/dist/esm/adapters/observability/xray.js +2 -2
- package/dist/esm/core/Agent.js +1 -1
- package/dist/esm/core/agent/AgentBuilder.d.ts +17 -14
- package/dist/esm/core/agent/AgentBuilder.js +35 -23
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/stages/window.js +11 -13
- package/dist/esm/core/agent/stages/window.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +2 -2
- package/dist/esm/core/agent/watch.d.ts +1 -1
- package/dist/esm/core/agent/watch.js +1 -1
- package/dist/esm/core/agent/window/index.d.ts +1 -1
- package/dist/esm/core/agent/window/index.js.map +1 -1
- package/dist/esm/core/agent/window/strategies/summarizeOldest.js +0 -5
- package/dist/esm/core/agent/window/strategies/summarizeOldest.js.map +1 -1
- package/dist/esm/core/agent/window/types.d.ts +0 -30
- package/dist/esm/core/runner.d.ts +1 -1
- package/dist/esm/core/slots/helpers.d.ts +3 -4
- package/dist/esm/core/slots/helpers.js +4 -7
- package/dist/esm/core/slots/helpers.js.map +1 -1
- package/dist/esm/debug/finders.d.ts +7 -10
- package/dist/esm/debug/finders.js +7 -10
- package/dist/esm/debug/finders.js.map +1 -1
- package/dist/esm/debug.d.ts +4 -4
- package/dist/esm/debug.js +4 -4
- package/dist/esm/doors/context.d.ts +3 -3
- package/dist/esm/doors/context.js +3 -3
- package/dist/esm/embedders/index.d.ts +4 -4
- package/dist/esm/events/payloads.d.ts +10 -14
- package/dist/esm/hosting-providers.d.ts +16 -16
- package/dist/esm/hosting-providers.js +16 -16
- package/dist/esm/identity/types.d.ts +1 -1
- package/dist/esm/identity/types.js +1 -1
- package/dist/esm/identity/withCredentialRetry.d.ts +1 -1
- package/dist/esm/identity/withCredentialRetry.js +1 -1
- package/dist/esm/identity.d.ts +5 -5
- package/dist/esm/identity.js +5 -5
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/injection-engine.d.ts +4 -4
- package/dist/esm/injection-engine.js +4 -4
- package/dist/esm/lib/context-ledger/gates.d.ts +1 -1
- package/dist/esm/lib/context-ledger/gates.js +1 -1
- package/dist/esm/lib/injection-engine/SkillRegistry.d.ts +1 -1
- package/dist/esm/lib/injection-engine/SkillRegistry.js +1 -1
- package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +1 -16
- package/dist/esm/lib/injection-engine/factories/defineSkill.js +29 -1
- package/dist/esm/lib/injection-engine/factories/defineSkill.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillsFromDir.d.ts +1 -11
- package/dist/esm/lib/injection-engine/skillsFromDir.js +22 -2
- package/dist/esm/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/esm/lib/injection-engine/types.d.ts +1 -1
- package/dist/esm/lib/mcp/gatewayTransport.d.ts +2 -2
- package/dist/esm/lib/mcp/gatewayTransport.js +2 -2
- package/dist/esm/lib/recorded-chat/index.d.ts +1 -1
- package/dist/esm/lib/recorded-chat/index.js +1 -1
- package/dist/esm/llm-providers.d.ts +5 -19
- package/dist/esm/llm-providers.js +5 -19
- package/dist/esm/llm-providers.js.map +1 -1
- package/dist/esm/locales/index.d.ts +7 -7
- package/dist/esm/locales/index.js +7 -7
- package/dist/esm/memory/causal/evidenceRecorder.d.ts +1 -1
- package/dist/esm/memory/causal/evidenceRecorder.js +1 -1
- package/dist/esm/memory/define.types.d.ts +3 -2
- package/dist/esm/memory/define.types.js.map +1 -1
- package/dist/esm/memory/index.d.ts +0 -10
- package/dist/esm/memory/index.js +6 -0
- package/dist/esm/memory/index.js.map +1 -1
- package/dist/esm/memory-providers.d.ts +8 -24
- package/dist/esm/memory-providers.js +8 -24
- package/dist/esm/memory-providers.js.map +1 -1
- package/dist/esm/observability/contextError/finders/index.d.ts +4 -4
- package/dist/esm/observability-providers.d.ts +5 -5
- package/dist/esm/observability-providers.js +5 -5
- package/dist/esm/observe.js +6 -6
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/providers.d.ts +2 -2
- package/dist/esm/providers.js +2 -2
- package/dist/esm/recorders/core/ContextRecorder.js +47 -11
- package/dist/esm/recorders/core/ContextRecorder.js.map +1 -1
- package/dist/esm/recorders/core/types.d.ts +16 -18
- package/dist/esm/recorders/core/types.js.map +1 -1
- package/dist/esm/recorders/observability/RouteRecorder.d.ts +1 -1
- package/dist/esm/recorders/observability/RouteRecorder.js +1 -1
- package/dist/esm/recorders/observability/ToolChoiceRecorder.d.ts +1 -1
- package/dist/esm/recorders/observability/ToolChoiceRecorder.js +1 -1
- package/dist/esm/reliability/index.d.ts +15 -3
- package/dist/esm/reliability/index.js +15 -3
- package/dist/esm/reliability/index.js.map +1 -1
- package/dist/esm/resilience/fallbackProvider.d.ts +1 -1
- package/dist/esm/resilience/fallbackProvider.js +1 -1
- package/dist/esm/resilience/withCircuitBreaker.d.ts +1 -1
- package/dist/esm/resilience/withCircuitBreaker.js +1 -1
- package/dist/esm/resilience/withRetry.d.ts +1 -1
- package/dist/esm/resilience/withRetry.js +1 -1
- package/dist/esm/security/PermissionPolicy.d.ts +2 -2
- package/dist/esm/security/PermissionPolicy.js +2 -2
- package/dist/esm/security/index.d.ts +3 -3
- package/dist/esm/security/index.js +3 -3
- package/dist/esm/status.d.ts +14 -24
- package/dist/esm/status.js +15 -25
- package/dist/esm/status.js.map +1 -1
- package/dist/esm/strategies/index.d.ts +9 -16
- package/dist/esm/strategies/index.js +9 -16
- package/dist/esm/strategies/index.js.map +1 -1
- package/dist/esm/strategies/registry.d.ts +1 -1
- package/dist/esm/strategies/registry.js +1 -1
- package/dist/esm/stream.d.ts +4 -4
- package/dist/esm/stream.js +4 -4
- package/dist/esm/thinking/index.d.ts +5 -5
- package/dist/esm/thinking/index.js +5 -5
- package/dist/esm/tool-providers/index.d.ts +4 -4
- package/dist/esm/tool-providers/index.js +4 -4
- package/dist/hosting-providers.js +16 -16
- package/dist/identity/types.js +1 -1
- package/dist/identity/withCredentialRetry.js +1 -1
- package/dist/identity.js +5 -5
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/injection-engine.js +4 -4
- package/dist/lib/context-ledger/gates.js +1 -1
- package/dist/lib/injection-engine/SkillRegistry.js +1 -1
- package/dist/lib/injection-engine/factories/defineSkill.js +29 -1
- package/dist/lib/injection-engine/factories/defineSkill.js.map +1 -1
- package/dist/lib/injection-engine/skillsFromDir.js +22 -2
- package/dist/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/lib/mcp/gatewayTransport.js +2 -2
- package/dist/lib/recorded-chat/index.js +1 -1
- package/dist/llm-providers.js +5 -19
- package/dist/llm-providers.js.map +1 -1
- package/dist/locales/index.js +6 -6
- package/dist/memory/causal/evidenceRecorder.js +1 -1
- package/dist/memory/define.types.js.map +1 -1
- package/dist/memory/index.js +6 -0
- package/dist/memory/index.js.map +1 -1
- package/dist/memory-providers.js +8 -24
- package/dist/memory-providers.js.map +1 -1
- package/dist/observability-providers.js +5 -5
- package/dist/observe.js +6 -6
- package/dist/observe.js.map +1 -1
- package/dist/providers.js +2 -2
- package/dist/recorders/core/ContextRecorder.js +47 -11
- package/dist/recorders/core/ContextRecorder.js.map +1 -1
- package/dist/recorders/core/types.js.map +1 -1
- package/dist/recorders/observability/RouteRecorder.js +1 -1
- package/dist/recorders/observability/ToolChoiceRecorder.js +1 -1
- package/dist/reliability/index.js +15 -3
- package/dist/reliability/index.js.map +1 -1
- package/dist/resilience/fallbackProvider.js +1 -1
- package/dist/resilience/withCircuitBreaker.js +1 -1
- package/dist/resilience/withRetry.js +1 -1
- package/dist/security/PermissionPolicy.js +2 -2
- package/dist/security/index.js +3 -3
- package/dist/status.js +14 -24
- package/dist/status.js.map +1 -1
- package/dist/strategies/index.js +9 -16
- package/dist/strategies/index.js.map +1 -1
- package/dist/strategies/registry.js +1 -1
- package/dist/stream.js +4 -4
- package/dist/thinking/index.js +5 -5
- package/dist/tool-providers/index.js +4 -4
- package/dist/types/adapters/hosting/agentcore.d.ts +1 -1
- package/dist/types/adapters/identity/agentcore.d.ts +1 -1
- package/dist/types/adapters/llm/AnthropicProvider.d.ts +1 -1
- package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts +1 -1
- package/dist/types/adapters/llm/MockProvider.d.ts +1 -1
- package/dist/types/adapters/llm/OpenAIProvider.d.ts +2 -2
- package/dist/types/adapters/memory/agentcore.d.ts +1 -1
- package/dist/types/adapters/memory/bedrockAgentMemory.d.ts +1 -1
- package/dist/types/adapters/memory/redis.d.ts +1 -1
- package/dist/types/adapters/observability/agentcore.d.ts +2 -2
- package/dist/types/adapters/observability/audit.d.ts +1 -1
- package/dist/types/adapters/observability/cloudwatch.d.ts +2 -2
- package/dist/types/adapters/observability/otel.d.ts +4 -4
- package/dist/types/adapters/observability/xray.d.ts +2 -2
- package/dist/types/core/agent/AgentBuilder.d.ts +17 -14
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/stages/window.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +2 -2
- package/dist/types/core/agent/watch.d.ts +1 -1
- package/dist/types/core/agent/window/index.d.ts +1 -1
- package/dist/types/core/agent/window/index.d.ts.map +1 -1
- package/dist/types/core/agent/window/strategies/summarizeOldest.d.ts.map +1 -1
- package/dist/types/core/agent/window/types.d.ts +0 -30
- package/dist/types/core/agent/window/types.d.ts.map +1 -1
- package/dist/types/core/runner.d.ts +1 -1
- package/dist/types/core/slots/helpers.d.ts +3 -4
- package/dist/types/core/slots/helpers.d.ts.map +1 -1
- package/dist/types/debug/finders.d.ts +7 -10
- package/dist/types/debug/finders.d.ts.map +1 -1
- package/dist/types/debug.d.ts +4 -4
- package/dist/types/doors/context.d.ts +3 -3
- package/dist/types/embedders/index.d.ts +4 -4
- package/dist/types/events/payloads.d.ts +10 -14
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/hosting-providers.d.ts +16 -16
- package/dist/types/identity/types.d.ts +1 -1
- package/dist/types/identity/withCredentialRetry.d.ts +1 -1
- package/dist/types/identity.d.ts +5 -5
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/injection-engine.d.ts +4 -4
- package/dist/types/lib/context-ledger/gates.d.ts +1 -1
- package/dist/types/lib/injection-engine/SkillRegistry.d.ts +1 -1
- package/dist/types/lib/injection-engine/factories/defineSkill.d.ts +1 -16
- package/dist/types/lib/injection-engine/factories/defineSkill.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts +1 -11
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/types.d.ts +1 -1
- package/dist/types/lib/mcp/gatewayTransport.d.ts +2 -2
- package/dist/types/lib/recorded-chat/index.d.ts +1 -1
- package/dist/types/llm-providers.d.ts +5 -19
- package/dist/types/llm-providers.d.ts.map +1 -1
- package/dist/types/locales/index.d.ts +7 -7
- package/dist/types/memory/causal/evidenceRecorder.d.ts +1 -1
- package/dist/types/memory/define.types.d.ts +3 -2
- package/dist/types/memory/define.types.d.ts.map +1 -1
- package/dist/types/memory/index.d.ts +0 -10
- package/dist/types/memory/index.d.ts.map +1 -1
- package/dist/types/memory-providers.d.ts +8 -24
- package/dist/types/memory-providers.d.ts.map +1 -1
- package/dist/types/observability/contextError/finders/index.d.ts +4 -4
- package/dist/types/observability-providers.d.ts +5 -5
- package/dist/types/providers.d.ts +2 -2
- package/dist/types/recorders/core/ContextRecorder.d.ts.map +1 -1
- package/dist/types/recorders/core/types.d.ts +16 -18
- package/dist/types/recorders/core/types.d.ts.map +1 -1
- package/dist/types/recorders/observability/RouteRecorder.d.ts +1 -1
- package/dist/types/recorders/observability/ToolChoiceRecorder.d.ts +1 -1
- package/dist/types/reliability/index.d.ts +15 -3
- package/dist/types/reliability/index.d.ts.map +1 -1
- package/dist/types/resilience/fallbackProvider.d.ts +1 -1
- package/dist/types/resilience/withCircuitBreaker.d.ts +1 -1
- package/dist/types/resilience/withRetry.d.ts +1 -1
- package/dist/types/security/PermissionPolicy.d.ts +2 -2
- package/dist/types/security/index.d.ts +3 -3
- package/dist/types/status.d.ts +14 -24
- package/dist/types/status.d.ts.map +1 -1
- package/dist/types/strategies/index.d.ts +9 -16
- package/dist/types/strategies/index.d.ts.map +1 -1
- package/dist/types/strategies/registry.d.ts +1 -1
- package/dist/types/stream.d.ts +4 -4
- package/dist/types/thinking/index.d.ts +5 -5
- package/dist/types/tool-providers/index.d.ts +4 -4
- package/package.json +1 -209
package/dist/esm/providers.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LLM provider adapters — implementation behind the `agentfootprint/
|
|
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/
|
|
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.
|
package/dist/esm/providers.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LLM provider adapters — implementation behind the `agentfootprint/
|
|
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/
|
|
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
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
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
|
-
|
|
133
|
+
slot: rec.slot,
|
|
134
|
+
overflowBy: rec.overflowBy,
|
|
135
|
+
planAction: rec.planAction,
|
|
133
136
|
unit: rec.unit ?? 'chars',
|
|
134
|
-
cap
|
|
135
|
-
projected
|
|
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,UAAU,CAAkB;IAC5B,aAAa,CAAmB;IAEjD,+DAA+D;IAC/D,oEAAoE;IACpE,mEAAmE;IACnE,qEAAqE;IACrE,+DAA+D;IAC/D,4BAA4B;IAC5B,wEAAwE;IACxE,sEAAsE;IACtE,sEAAsE;IACrD,cAAc,GAAG,IAAI,GAAG,EAAuB,CAAC;IA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F,yBAAyB,GAAG,IAAI,CAAC;QACjC,sCAAsC;QACtC,OAAO,CAAC,IAAI,CACV,uDAAuD,GAAG,CAAC,IAAI,0BAA0B;YACvF,wFAAwF;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
|
-
* `
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
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
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
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
|
|
110
|
-
*
|
|
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
|
-
/**
|
|
113
|
-
readonly cap
|
|
114
|
-
/**
|
|
115
|
-
readonly projected
|
|
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;
|
|
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(...).
|
|
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(...).
|
|
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
|
-
* .
|
|
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
|
-
* .
|
|
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
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
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
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
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
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
28
|
+
* import { gatedTools, staticTools } from 'agentfootprint/providers';
|
|
29
29
|
*
|
|
30
30
|
* const policy = PermissionPolicy.fromRoles(
|
|
31
31
|
* {
|
package/dist/esm/status.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
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';
|
package/dist/esm/status.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
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/
|
|
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
|
package/dist/esm/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/status.ts"],"names":[],"mappings":"AAAA
|
|
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"}
|