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
|
@@ -42,8 +42,8 @@ const DEFAULT_SERVICE = 'gateway';
|
|
|
42
42
|
* Describe an MCP connection whose auth headers are vended per request.
|
|
43
43
|
*
|
|
44
44
|
* @example A managed gateway with a token vault behind it
|
|
45
|
-
* import { agentCoreIdentity } from 'agentfootprint/
|
|
46
|
-
* import { gatewayTransport, mcpClient } from 'agentfootprint/
|
|
45
|
+
* import { agentCoreIdentity } from 'agentfootprint/security';
|
|
46
|
+
* import { gatewayTransport, mcpClient } from 'agentfootprint/providers';
|
|
47
47
|
*
|
|
48
48
|
* const gateway = await mcpClient({
|
|
49
49
|
* name: 'gateway',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (per-turn artifact freezing, byte-exact history threading, same-factory
|
|
6
6
|
* runner derivation) while COMPOSING with the 7.5 surface, not duplicating it.
|
|
7
7
|
*
|
|
8
|
-
* Exported from `agentfootprint/
|
|
8
|
+
* Exported from `agentfootprint/observe` (every symbol it composes with lives
|
|
9
9
|
* there). Named exports — `export *` is not the house style.
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/llm-providers.js
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* The Block B canonical name. Mirrors the parallel structure shipped in
|
|
6
|
-
* v2.5:
|
|
7
|
-
*
|
|
8
|
-
* agentfootprint/llm-providers ← LLM provider adapters (this file)
|
|
9
|
-
* agentfootprint/tool-providers ← tool dispatch + tool sources
|
|
10
|
-
* agentfootprint/memory-providers ← memory store adapters
|
|
11
|
-
* agentfootprint/security ← cross-cutting authorization
|
|
12
|
-
*
|
|
13
|
-
* The legacy `agentfootprint/providers` subpath stays available as an
|
|
14
|
-
* alias through the v2.x line — it points at the same exports. New
|
|
15
|
-
* code SHOULD import from `agentfootprint/llm-providers` for clarity:
|
|
16
|
-
* grep'ing for "llm-providers" finds every LLM-side import in one
|
|
17
|
-
* shot, parallel to "tool-providers" and "memory-providers".
|
|
3
|
+
* llm-providers — LLM provider adapters.
|
|
18
4
|
*
|
|
19
5
|
* Pattern: Adapter (GoF) — concrete `LLMProvider` implementations that
|
|
20
6
|
* translate the agentfootprint port to a specific vendor SDK.
|
|
@@ -22,11 +8,11 @@
|
|
|
22
8
|
* knows nothing about vendor specifics.
|
|
23
9
|
*
|
|
24
10
|
* @example
|
|
25
|
-
* import { mock, AnthropicProvider } from 'agentfootprint/
|
|
11
|
+
* import { mock, AnthropicProvider } from 'agentfootprint/providers';
|
|
26
12
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
13
|
+
* Not an import path of its own since 9.0.0. This is the implementation barrel
|
|
14
|
+
* behind `agentfootprint/providers`, which re-exports every name here — same
|
|
15
|
+
* symbols, one door. Import from the door.
|
|
30
16
|
*/
|
|
31
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
32
18
|
if (k2 === undefined) k2 = k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-providers.js","sourceRoot":"","sources":["../src/llm-providers.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"llm-providers.js","sourceRoot":"","sources":["../src/llm-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,iDAA+B"}
|
package/dist/locales/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* locales — Message Catalog Pattern.
|
|
4
4
|
*
|
|
5
5
|
* The Block D piece. agentfootprint emits user-facing prose at two
|
|
6
6
|
* audience levels:
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* The natural consumer pattern is to ship locale packs alongside the
|
|
34
34
|
* agent code:
|
|
35
35
|
*
|
|
36
|
-
* import { defaultCommentaryMessages, composeMessages } from 'agentfootprint/
|
|
36
|
+
* import { defaultCommentaryMessages, composeMessages } from 'agentfootprint/observe';
|
|
37
37
|
* import { esCommentaryMessages } from './locales/es.js';
|
|
38
38
|
*
|
|
39
39
|
* const merged = composeMessages(defaultCommentaryMessages, esCommentaryMessages);
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
* const agent = Agent.create({...}).thinkingTemplates(esThinking).build();
|
|
55
55
|
*
|
|
56
56
|
* @example Validate a locale pack against the framework's required keys
|
|
57
|
-
* import { defaultCommentaryMessages, composeMessages, validateMessages } from 'agentfootprint/
|
|
57
|
+
* import { defaultCommentaryMessages, composeMessages, validateMessages } from 'agentfootprint/observe';
|
|
58
58
|
*
|
|
59
59
|
* const myCatalog = composeMessages(defaultCommentaryMessages, customOverrides);
|
|
60
60
|
* validateMessages(myCatalog, Object.keys(defaultCommentaryMessages));
|
|
61
61
|
* // throws on first missing OR empty key — fail-fast at boot
|
|
62
62
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* Not an import path of its own since 9.0.0. This is the implementation barrel
|
|
64
|
+
* behind `agentfootprint/observe`, which re-exports every name here — same
|
|
65
|
+
* symbols, one door. Import from the door.
|
|
66
66
|
*/
|
|
67
67
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
68
68
|
exports.validateMessages = exports.composeMessages = exports.defaultStatusTemplates = exports.defaultThinkingMessages = exports.defaultCommentaryMessages = void 0;
|
|
@@ -59,7 +59,7 @@ function bounded(value, max) {
|
|
|
59
59
|
return { __truncated: String(value).slice(0, max) };
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
/** Build the evidence-harvesting recorder. Attach via `.
|
|
62
|
+
/** Build the evidence-harvesting recorder. Attach via `.watch(rec)` (the
|
|
63
63
|
* Agent does this automatically for CAUSAL memories). */
|
|
64
64
|
function causalEvidenceRecorder(options = {}) {
|
|
65
65
|
const maxPreview = options.maxPreviewChars ?? 200;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.types.js","sourceRoot":"","sources":["../../src/memory/define.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;;;AAQH,uEAAuE;AAEvE;;;;;;;;;GASG;AACU,QAAA,YAAY,GAAG;IAC1B,QA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SAAgB,sBAAsB,CAAC,GAAW;IAChD,OAAO,GAAG,CAAC,UAAU,CAAC,qCAA6B,CAAC,CAAC;AACvD,CAAC;AAFD,wDAEC"}
|
package/dist/memory/index.js
CHANGED
|
@@ -49,6 +49,12 @@ Object.defineProperty(exports, "memoryInjectionKey", { enumerable: true, get: fu
|
|
|
49
49
|
Object.defineProperty(exports, "isMemoryInjectionKey", { enumerable: true, get: function () { return define_types_js_1.isMemoryInjectionKey; } });
|
|
50
50
|
Object.defineProperty(exports, "retrievalEvidenceKey", { enumerable: true, get: function () { return define_types_js_1.retrievalEvidenceKey; } });
|
|
51
51
|
Object.defineProperty(exports, "isRetrievalEvidenceKey", { enumerable: true, get: function () { return define_types_js_1.isRetrievalEvidenceKey; } });
|
|
52
|
+
// `WindowStrategy` was this module's 7.27.0 name for `MemoryWindowStrategy`.
|
|
53
|
+
// It collided with the CONVERSATION-window seam of the same name on the
|
|
54
|
+
// package root (`{ name, plan(input) }`) — same name, two entry points,
|
|
55
|
+
// incompatible shapes — so the memory one was renamed in 7.27.1 and the old
|
|
56
|
+
// spelling kept as a deprecated alias. 9.0.0 removed the alias:
|
|
57
|
+
// `MemoryWindowStrategy` is the only name for `{ kind: 'window', size }`.
|
|
52
58
|
var define_js_1 = require("./define.js");
|
|
53
59
|
Object.defineProperty(exports, "defineMemory", { enumerable: true, get: function () { return define_js_1.defineMemory; } });
|
|
54
60
|
//# sourceMappingURL=index.js.map
|
package/dist/memory/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAEH,mDAAiC;AACjC,oDAAkC;AAClC,uDAAqC;AACrC,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,sDAAoC;AACpC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,uDAAqC;AAErC,oEAAoE;AACpE,qDAqC2B;AApCzB,+GAAA,YAAY,OAAA;AACZ,oHAAA,iBAAiB,OAAA;AACjB,gHAAA,aAAa,OAAA;AACb,uHAAA,oBAAoB,OAAA;AACpB,8HAAA,2BAA2B,OAAA;AAC3B,gIAAA,6BAA6B,OAAA;AAC7B,+GAAA,YAAY,OAAA;AACZ,uHAAA,oBAAoB,OAAA;AACpB,iHAAA,cAAc,OAAA;AACd,uHAAA,oBAAoB,OAAA;AACpB,qHAAA,kBAAkB,OAAA;AAClB,uHAAA,oBAAoB,OAAA;AACpB,uHAAA,oBAAoB,OAAA;AACpB,yHAAA,sBAAsB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAEH,mDAAiC;AACjC,oDAAkC;AAClC,uDAAqC;AACrC,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,sDAAoC;AACpC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,uDAAqC;AAErC,oEAAoE;AACpE,qDAqC2B;AApCzB,+GAAA,YAAY,OAAA;AACZ,oHAAA,iBAAiB,OAAA;AACjB,gHAAA,aAAa,OAAA;AACb,uHAAA,oBAAoB,OAAA;AACpB,8HAAA,2BAA2B,OAAA;AAC3B,gIAAA,6BAA6B,OAAA;AAC7B,+GAAA,YAAY,OAAA;AACZ,uHAAA,oBAAoB,OAAA;AACpB,iHAAA,cAAc,OAAA;AACd,uHAAA,oBAAoB,OAAA;AACpB,qHAAA,kBAAkB,OAAA;AAClB,uHAAA,oBAAoB,OAAA;AACpB,uHAAA,oBAAoB,OAAA;AACpB,yHAAA,sBAAsB,OAAA;AAwBxB,6EAA6E;AAC7E,wEAAwE;AACxE,wEAAwE;AACxE,4EAA4E;AAC5E,gEAAgE;AAChE,0EAA0E;AAE1E,yCAA2C;AAAlC,yGAAA,YAAY,OAAA"}
|
package/dist/memory-providers.js
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* memory-providers — memory store adapters.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* agentfootprint/llm-providers ← LLM provider adapters
|
|
9
|
-
* agentfootprint/tool-providers ← tool dispatch + tool sources
|
|
10
|
-
* agentfootprint/memory-providers ← memory store adapters (this file)
|
|
11
|
-
* agentfootprint/security ← cross-cutting authorization
|
|
12
|
-
*
|
|
13
|
-
* One subpath that grows — RedisStore, AgentCoreStore, and future
|
|
14
|
-
* stores (DynamoDB, Postgres, Pinecone, …) all live here. No more
|
|
15
|
-
* adding `agentfootprint/memory-<vendor>` per-adapter subpath each
|
|
16
|
-
* time a new store ships.
|
|
17
|
-
*
|
|
18
|
-
* Per-adapter aliases (`agentfootprint/memory-redis`,
|
|
19
|
-
* `agentfootprint/memory-agentcore`) stay available through the v2.x
|
|
20
|
-
* line — they point at the same files. New code SHOULD import from
|
|
21
|
-
* `agentfootprint/memory-providers`:
|
|
22
|
-
*
|
|
23
|
-
* import { RedisStore, AgentCoreStore } from 'agentfootprint/memory-providers';
|
|
5
|
+
* RedisStore, AgentCoreStore, and future stores (DynamoDB, Postgres,
|
|
6
|
+
* Pinecone, …) all live here — a new store adds an export, never a new
|
|
7
|
+
* import path.
|
|
24
8
|
*
|
|
25
9
|
* Pattern: Adapter (GoF) — each store translates the `MemoryStore`
|
|
26
10
|
* interface onto a specific backend (Redis, DynamoDB-style
|
|
@@ -31,11 +15,11 @@
|
|
|
31
15
|
* actually instantiate pull their SDK in.
|
|
32
16
|
*
|
|
33
17
|
* @example
|
|
34
|
-
* import { RedisStore, AgentCoreStore } from 'agentfootprint/memory
|
|
18
|
+
* import { RedisStore, AgentCoreStore } from 'agentfootprint/memory';
|
|
35
19
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
20
|
+
* Not an import path of its own since 9.0.0. This is the implementation barrel
|
|
21
|
+
* behind `agentfootprint/memory`, which re-exports every name here — same
|
|
22
|
+
* symbols, one door. Import from the door.
|
|
39
23
|
*/
|
|
40
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
25
|
exports.BedrockAgentMemory = exports.SqliteUnavailableError = exports.EmbedderMismatchError = exports.UnreadableIndexFileError = exports.sqliteVectorStore = exports.UnreadableMemoryEntryError = exports.AgentCoreStore = exports.RedisStore = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-providers.js","sourceRoot":"","sources":["../src/memory-providers.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"memory-providers.js","sourceRoot":"","sources":["../src/memory-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,sEAAsE;AACtE,sEAAsE;AACtE,wDAAwD;AACxD,uDAKoC;AAJlC,sGAAA,UAAU,OAAA;AAMZ,+DAOwC;AANtC,8GAAA,cAAc,OAAA;AACd,0HAAA,0BAA0B,OAAA;AAO5B,gFAAgF;AAChF,gFAAgF;AAChF,8EAA8E;AAC9E,mDAAmD;AACnD,qEAS2C;AARzC,oHAAA,iBAAiB,OAAA;AACjB,2HAAA,wBAAwB,OAAA;AACxB,wHAAA,qBAAqB,OAAA;AAQvB,6EAA6E;AAC7E,8EAA8E;AAC9E,mEAAoE;AAA3D,8HAAA,sBAAsB,OAAA;AAE/B,8EAA8E;AAC9E,yEAAyE;AACzE,iFAKiD;AAJ/C,2HAAA,kBAAkB,OAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* observability-providers — vendor observability strategies.
|
|
4
4
|
*
|
|
5
5
|
* Grouped subpath following the parallel-providers pattern v2.5
|
|
6
6
|
* established for `llm-providers` / `tool-providers` /
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
|
-
* import { agentcoreObservability } from 'agentfootprint/
|
|
17
|
+
* import { agentcoreObservability } from 'agentfootprint/observe';
|
|
18
18
|
* import { microtaskBatchDriver } from 'footprintjs/detach';
|
|
19
19
|
*
|
|
20
20
|
* agent.enable.observability({
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
* dedicated `dd-trace`-based adapter only if real-world feedback
|
|
40
40
|
* demands the native Datadog APM client.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
42
|
+
* Not an import path of its own since 9.0.0. This is the implementation barrel
|
|
43
|
+
* behind `agentfootprint/observe`, which re-exports every name here — same
|
|
44
|
+
* symbols, one door. Import from the door.
|
|
45
45
|
*/
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
47
|
exports.CANONICAL_JSON_VERSION = exports.canonicalJson = exports.AUDIT_ZERO_HASH = exports.AUDIT_GENESIS_EVENT_TYPE = exports.AUDIT_BUNDLE_FORMAT = exports.verifyAuditBundle = exports.auditExport = exports.otelObservability = exports.xrayObservability = exports.cloudwatchObservability = exports.agentcoreObservability = void 0;
|
package/dist/observe.js
CHANGED
|
@@ -139,12 +139,12 @@ Object.defineProperty(exports, "agentThinkingTrace", { enumerable: true, get: fu
|
|
|
139
139
|
// Emit primitive — used by every Tier-3 source-domain.
|
|
140
140
|
var typedEmit_js_1 = require("./recorders/core/typedEmit.js");
|
|
141
141
|
Object.defineProperty(exports, "typedEmit", { enumerable: true, get: function () { return typedEmit_js_1.typedEmit; } });
|
|
142
|
-
// ──
|
|
143
|
-
//
|
|
144
|
-
//
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
//
|
|
142
|
+
// ── Diagnosis tools ────────────────────────────────────────────
|
|
143
|
+
// influence-core, trace-toolpack, context-bisect and tool-lint live in
|
|
144
|
+
// `src/debug.ts`. 8.0.0 folded their import path INTO this one, and 9.0.0
|
|
145
|
+
// removed the separate `agentfootprint/debug` subpath, so this re-export is
|
|
146
|
+
// how they reach the door. Watching a healthy run and performing the autopsy
|
|
147
|
+
// on a broken one come through the same door on purpose.
|
|
148
148
|
__exportStar(require("./debug.js"), exports);
|
|
149
149
|
// Tool-choice margin recorder (RFC-002 tier 2, C4–C6) — per LLM call,
|
|
150
150
|
// ranks the OFFERED catalog against the choice context (user message +
|
package/dist/observe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;;;;;;;;;;;;;;;;AAEH,4BAA4B;AAC5B,0EAAmG;AAA1F,qHAAA,eAAe,OAAA;AACxB,wEAAgG;AAAvF,mHAAA,cAAc,OAAA;AAEvB,+BAA+B;AAC/B,kFAGiD;AAF/C,6HAAA,mBAAmB,OAAA;AAGrB,sEAA6F;AAApF,iHAAA,aAAa,OAAA;AACtB,qFAoBuD;AAnBrD,uHAAA,gBAAgB,OAAA;AAChB,uHAAA,gBAAgB,OAAA;AAmBlB,mFAWsD;AAVpD,mHAAA,aAAa,OAAA;AACb,qHAAA,eAAe,OAAA;AACf,qHAAA,eAAe,OAAA;AASjB,uFAWwD;AAVtD,uHAAA,eAAe,OAAA;AACf,sHAAA,cAAc,OAAA;AACd,gIAAA,wBAAwB,OAAA;AAU1B,yEAAyE;AACzE,6EAA6E;AAC7E,6EAA6E;AAC7E,8EAA8E;AAC9E,uEAKgD;AAJ9C,yGAAA,SAAS,OAAA;AAMX,gFAAgF;AAChF,6EAA6E;AAC7E,4EAA4E;AAC5E,iCAAiC;AACjC,qFAIuD;AAHrD,0HAAA,mBAAmB,OAAA;AACnB,sHAAA,eAAe,OAAA;AAIjB,8EAA8E;AAC9E,gFAAgF;AAChF,iEAAiE;AACjE,+DAQ4C;AAP1C,0GAAA,cAAc,OAAA;AACd,yGAAA,aAAa,OAAA;AACb,4GA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AAA;AACrB,wEAAgG;AAAvF,mHAAA,cAAc,OAAA;AACvB,8EAG+C;AAF7C,yHAAA,iBAAiB,OAAA;AAGnB,gFAGgD;AAF9C,2HAAA,kBAAkB,OAAA;AAGpB,sEAA6F;AAApF,iHAAA,aAAa,OAAA;AACtB,qEAAqE;AACrE,0EAA0E;AAC1E,wEAAwE;AACxE,oDAAoD;AACpD,gFAGgD;AAF9C,2HAAA,kBAAkB,OAAA;AAGpB,mFAMsD;AALpD,mHAAA,aAAa,OAAA;AACb,oHAAA,cAAc,OAAA;AAKhB,iFAIqD;AAHnD,iHAAA,YAAY,OAAA;AAId,4EAA4E;AAC5E,gFAAgF;AAChF,2FAO0D;AANxD,6HAAA,mBAAmB,OAAA;AAOrB,gFAAgF;AAChF,gFAAgF;AAChF,yGASiE;AAR/D,mIAAA,kBAAkB,OAAA;AAUpB,uDAAuD;AACvD,8DAA0D;AAAjD,yGAAA,SAAS,OAAA;AAElB,kEAAkE;AAClE,uEAAuE;AACvE,0EAA0E;AAC1E,4EAA4E;AAC5E,6EAA6E;AAC7E,yDAAyD;AACzD,6CAA2B;AAC3B,sEAAsE;AACtE,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AACpE,yFASyD;AARvD,2HAAA,kBAAkB,OAAA;AAClB,2HAAA,kBAAkB,OAAA;AASpB,+EASoD;AARlD,iHAAA,aAAa,OAAA;AACb,kHAAA,cAAc,OAAA;AAShB,sEAAsE;AACtE,4EAA4E;AAC5E,+CAA+C;AAC/C,0DAKuC;AAJrC,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,uGAAA,WAAW,OAAA"}
|
package/dist/providers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* LLM provider adapters — implementation behind the `agentfootprint/
|
|
3
|
+
* LLM provider adapters — implementation behind the `agentfootprint/providers`
|
|
4
4
|
* subpath (which re-exports this file).
|
|
5
5
|
*
|
|
6
6
|
* The standalone `agentfootprint/providers` subpath alias was removed in 4.0.0.
|
|
7
7
|
* Import from the canonical subpath:
|
|
8
8
|
*
|
|
9
|
-
* import { mock, anthropic, openai } from 'agentfootprint/
|
|
9
|
+
* import { mock, anthropic, openai } from 'agentfootprint/providers';
|
|
10
10
|
*
|
|
11
11
|
* Pattern: Adapter (GoF) — concrete `LLMProvider` implementations that
|
|
12
12
|
* translate the agentfootprint port to a specific vendor SDK.
|
|
@@ -124,18 +124,21 @@ class ContextRecorder {
|
|
|
124
124
|
if (!records)
|
|
125
125
|
return;
|
|
126
126
|
for (const rec of records) {
|
|
127
|
-
// The payload REQUIRES `unit
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
//
|
|
127
|
+
// The payload REQUIRES `unit`; the record does not, because slot
|
|
128
|
+
// builders — including any a consumer wrote — still typecheck without
|
|
129
|
+
// it. Filling `'chars'` here is not a guess: this handler only ever
|
|
130
|
+
// sees writes to `COMPOSITION_KEYS.BUDGET_PRESSURE`, which come off a
|
|
131
|
+
// slot composition, and a slot composition counts `String.length`. A
|
|
132
|
+
// window strategy never travels this path — it emits the event
|
|
133
|
+
// directly, with `unit: 'tokens'`.
|
|
134
|
+
const { cap, projected } = readPressureNumbers(rec);
|
|
134
135
|
this.dispatch('agentfootprint.context.budget_pressure', {
|
|
135
|
-
|
|
136
|
+
slot: rec.slot,
|
|
137
|
+
overflowBy: rec.overflowBy,
|
|
138
|
+
planAction: rec.planAction,
|
|
136
139
|
unit: rec.unit ?? 'chars',
|
|
137
|
-
cap
|
|
138
|
-
projected
|
|
140
|
+
cap,
|
|
141
|
+
projected,
|
|
139
142
|
}, event);
|
|
140
143
|
}
|
|
141
144
|
}
|
|
@@ -222,11 +225,44 @@ class ContextRecorder {
|
|
|
222
225
|
const rec = r;
|
|
223
226
|
if (typeof rec.slot !== 'string')
|
|
224
227
|
return undefined;
|
|
225
|
-
if (typeof rec.capTokens !== 'number')
|
|
228
|
+
if (typeof rec.cap !== 'number' && typeof rec.capTokens !== 'number')
|
|
226
229
|
return undefined;
|
|
227
230
|
}
|
|
228
231
|
return value;
|
|
229
232
|
}
|
|
230
233
|
}
|
|
231
234
|
exports.ContextRecorder = ContextRecorder;
|
|
235
|
+
let warnedLegacyPressureNames = false;
|
|
236
|
+
/**
|
|
237
|
+
* Read a pressure record's two numbers, accepting the 8.x spelling once more.
|
|
238
|
+
*
|
|
239
|
+
* 9.0.0 grace, not support: `cap` / `projected` win whenever they are present,
|
|
240
|
+
* and a record carrying only the old names is read AND reported — once per
|
|
241
|
+
* process, because a slot builder that writes them writes them on every
|
|
242
|
+
* composition and a warning per event is a warning nobody reads.
|
|
243
|
+
*
|
|
244
|
+
* A refusal would have been the wrong shape here. This is a recorder: a throw
|
|
245
|
+
* is isolated by footprintjs and swallowed, so refusing would delete the
|
|
246
|
+
* consumer's budget signal and say nothing about why. Reading the value and
|
|
247
|
+
* naming the new fields is the version of "teach" that survives the channel.
|
|
248
|
+
*
|
|
249
|
+
* The fallback is deleted in 10.0.0; then a legacy-only record fails
|
|
250
|
+
* `asPressureArray` and no event is emitted at all.
|
|
251
|
+
*/
|
|
252
|
+
function readPressureNumbers(rec) {
|
|
253
|
+
const legacy = rec;
|
|
254
|
+
const cap = legacy.cap ?? legacy.capTokens ?? 0;
|
|
255
|
+
const projected = legacy.projected ?? legacy.projectedTokens ?? 0;
|
|
256
|
+
if (legacy.cap === undefined && legacy.capTokens !== undefined && !warnedLegacyPressureNames) {
|
|
257
|
+
warnedLegacyPressureNames = true;
|
|
258
|
+
// eslint-disable-next-line no-console
|
|
259
|
+
console.warn(`[agentfootprint] a budget-pressure record for slot '${rec.slot}' carries the 8.x field ` +
|
|
260
|
+
`names \`capTokens\` / \`projectedTokens\`, which were removed in 9.0.0. They are read ` +
|
|
261
|
+
`this once so your budget signal still fires, and the fallback is deleted in 10.0.0. ` +
|
|
262
|
+
`Write \`cap\` / \`projected\` with \`unit\` instead — the old names asserted TOKENS on ` +
|
|
263
|
+
`a channel that counts CHARACTERS. Whichever slot builder produced this record needs ` +
|
|
264
|
+
`the three-field shape.`);
|
|
265
|
+
}
|
|
266
|
+
return { cap, projected };
|
|
267
|
+
}
|
|
232
268
|
//# sourceMappingURL=ContextRecorder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextRecorder.js","sourceRoot":"","sources":["../../../src/recorders/core/ContextRecorder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAMH,yDAAiG;AACjG,4DAA4E;AAO5E,yCAA8C;AAa9C,MAAa,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;IAEjE,YAAY,OAA+B;QACzC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,iCAAiC,CAAC;QAC1D,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;IAED,kEAAkE;IAElE,cAAc,CAAC,KAAuB;QACpC,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,kCAAiB,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9E,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,wEAAwE;QACxE,6DAA6D;QAC7D,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,aAAa,CAAC,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GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ;gBAAE,OAAO,SAAS,CAAC;QACzF,CAAC;QACD,OAAO,KAAwC,CAAC;IAClD,CAAC;CACF;AAvND,0CAuNC;AAcD,IAAI,yBAAyB,GAAG,KAAK,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AACH,SAAS,mBAAmB,CAAC,GAAyB;IACpD,MAAM,MAAM,GAAG,GAAiC,CAAC;IACjD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,eAAe,IAAI,CAAC,CAAC;IAClE,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAC7F,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"}
|
|
@@ -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;AACf,QAAA,gBAAgB,GAAG;IAC9B,aAAa,EAAE,kBAAkB;IACjC,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,qBAAqB;CAC9B,CAAC"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Pattern: CombinedRecorder (Convention 1 — single purpose: route evidence). Owns a
|
|
18
18
|
* `SequenceStore<RouteHop>`. Convention 4: resets on a new `runId`.
|
|
19
|
-
* Role: Tier-3 /observe recorder — `Agent.create(...).
|
|
19
|
+
* Role: Tier-3 /observe recorder — `Agent.create(...).watch(routeRecorder())`.
|
|
20
20
|
* Powers the lens, the "Why this skill?" panel, and paper route figures.
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* by the LLM call's `runtimeStageId`. Convention 4: resets on a
|
|
62
62
|
* new `runId` via `FlowRecorder.onRunStart`.
|
|
63
63
|
* Role: Tier-3 /observe recorder. Attach via `Agent.create(...)
|
|
64
|
-
* .
|
|
64
|
+
* .watch(handle)` or `executor.attachCombinedRecorder`.
|
|
65
65
|
*
|
|
66
66
|
* Honest claim (RFC-002 §2): margins are embedding geometry between the
|
|
67
67
|
* context and tool descriptions — a deterministic PROXY for the model's
|
|
@@ -33,9 +33,21 @@
|
|
|
33
33
|
* different class than the provider decorator does, so this path stays the
|
|
34
34
|
* only home for it. Everything else here is also on the new door.
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
36
|
+
* ## Why this path survived 9.0.0
|
|
37
|
+
*
|
|
38
|
+
* 9.0.0 removed the other sixteen 8.0.0 door aliases. This one stayed, and the
|
|
39
|
+
* reason is that ONE name: the gate's `CircuitOpenError` and the decorator's
|
|
40
|
+
* are two different classes with different constructors and different
|
|
41
|
+
* `instanceof` answers, `agentfootprint/resilience` carries the decorator's,
|
|
42
|
+
* and a name cannot be exported twice from one door. Removing this path would
|
|
43
|
+
* not have renamed the gate's error — it would have made it unreachable, so a
|
|
44
|
+
* consumer could no longer `instanceof`-check the error their own reliability
|
|
45
|
+
* gate throws. That is a capability, not a spelling, so the path stayed.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated Since 8.0.0 for every name EXCEPT `CircuitOpenError` — those all
|
|
48
|
+
* live on `agentfootprint/resilience`, which is the door to prefer. This path
|
|
49
|
+
* is NOT scheduled for removal: it is the only home of the reliability gate's
|
|
50
|
+
* `CircuitOpenError`, and the removal date announced in 8.0.0 is withdrawn.
|
|
39
51
|
*/
|
|
40
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
53
|
exports.defaultStuckLoopRule = exports.lastNValidationErrorsMatch = exports.ValidationFailure = exports.initialBreakerState = exports.CircuitOpenError = exports.ReliabilityFailFastError = void 0;
|
|
@@ -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,uCAAsD;AAA7C,oHAAA,wBAAwB,OAAA;AAEjC,uEAAuE;AACvE,qEAAqE;AACrE,+DAA+D;AAC/D,yDAK6B;AAJ3B,qHAAA,gBAAgB,OAAA;AAChB,wHAAA,mBAAmB,OAAA;AAKrB,wEAAwE;AACxE,mEAAmE;AACnE,+DAA+D;AAC/D,sEAAsE;AACtE,mEAAmE;AACnE,wFAIsD;AAHpD,4HAAA,iBAAiB,OAAA;AACjB,qIAAA,0BAA0B,OAAA;AAC1B,+HAAA,oBAAoB,OAAA"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* predicate. The first success wins; if all fail, the last error throws.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* import { anthropic, openai, mock } from 'agentfootprint/
|
|
14
|
+
* import { anthropic, openai, mock } from 'agentfootprint/providers';
|
|
15
15
|
* import { fallbackProvider } from 'agentfootprint/resilience';
|
|
16
16
|
*
|
|
17
17
|
* const provider = fallbackProvider(
|
|
@@ -110,7 +110,7 @@ exports.CircuitOpenError = CircuitOpenError;
|
|
|
110
110
|
*
|
|
111
111
|
* @example
|
|
112
112
|
* ```ts
|
|
113
|
-
* import { anthropic, openai } from 'agentfootprint/
|
|
113
|
+
* import { anthropic, openai } from 'agentfootprint/providers';
|
|
114
114
|
* import { withCircuitBreaker, withFallback } from 'agentfootprint/resilience';
|
|
115
115
|
*
|
|
116
116
|
* const provider = withFallback(
|
|
@@ -26,7 +26,7 @@ exports.defaultShouldRetry = exports.withRetry = void 0;
|
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* import { withRetry } from 'agentfootprint/resilience';
|
|
29
|
-
* import { anthropic } from 'agentfootprint/
|
|
29
|
+
* import { anthropic } from 'agentfootprint/providers';
|
|
30
30
|
*
|
|
31
31
|
* const robust = withRetry(anthropic({ apiKey }), {
|
|
32
32
|
* maxAttempts: 5,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - `PermissionChecker` interface (async check; consumed by Agent
|
|
16
16
|
* constructor's `permissionChecker` field)
|
|
17
17
|
* - sync `isAllowed(toolId)` method (consumed by `gatedTools(...)`
|
|
18
|
-
* from `agentfootprint/
|
|
18
|
+
* from `agentfootprint/providers`)
|
|
19
19
|
*
|
|
20
20
|
* Pattern: Strategy (GoF) for the role-allowlist policy + Adapter
|
|
21
21
|
* (matches `PermissionChecker` interface so it composes with
|
|
@@ -56,7 +56,7 @@ exports.PermissionPolicy = void 0;
|
|
|
56
56
|
/**
|
|
57
57
|
* Data-driven role-based permission policy. Satisfies the v2.4
|
|
58
58
|
* `PermissionChecker` interface AND exposes a sync `isAllowed` method
|
|
59
|
-
* for use with `gatedTools` from `agentfootprint/
|
|
59
|
+
* for use with `gatedTools` from `agentfootprint/providers`.
|
|
60
60
|
*/
|
|
61
61
|
class PermissionPolicy {
|
|
62
62
|
opts;
|
package/dist/security/index.js
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Permissions are NOT context engineering — they're a guard ON
|
|
6
6
|
* context-engineering operations (tool dispatch, skill activation,
|
|
7
7
|
* memory writes, output emission). That's why this lives in its own
|
|
8
|
-
* subpath, parallel to `agentfootprint/
|
|
8
|
+
* subpath, parallel to `agentfootprint/providers` and the
|
|
9
9
|
* `agentfootprint/memory-*` and `agentfootprint/providers` subpaths.
|
|
10
10
|
*
|
|
11
11
|
* Today's surface is small and data-driven on purpose: one role
|
|
12
12
|
* allowlist primitive that satisfies BOTH the v2.4 `PermissionChecker`
|
|
13
13
|
* interface AND a sync `isAllowed(toolId)` predicate for use with
|
|
14
|
-
* `gatedTools` from `agentfootprint/
|
|
14
|
+
* `gatedTools` from `agentfootprint/providers` — plus
|
|
15
15
|
* `agentCorePolicy()`, the same port answered by a remote policy store.
|
|
16
16
|
*
|
|
17
17
|
* A local allowlist and a remote policy engine differ in one way that
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* import { PermissionPolicy } from 'agentfootprint/security';
|
|
29
|
-
* import { gatedTools, staticTools } from 'agentfootprint/
|
|
29
|
+
* import { gatedTools, staticTools } from 'agentfootprint/providers';
|
|
30
30
|
*
|
|
31
31
|
* const policy = PermissionPolicy.fromRoles(
|
|
32
32
|
* {
|
package/dist/status.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* status — chat-bubble status surface.
|
|
4
4
|
*
|
|
5
5
|
* Pattern: pure projection. `selectStatus` walks the typed
|
|
6
6
|
* event log forward, tracking active pause / tool / LLM state,
|
|
@@ -11,26 +11,16 @@
|
|
|
11
11
|
* right now?" indicator. Output feeds `renderStatusLine`
|
|
12
12
|
* which resolves a template + variables to a final string.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - Self-documenting at the import line: `from 'agentfootprint/status'`
|
|
19
|
-
* vs an opaque main-export grab.
|
|
20
|
-
* - Future home for extended-thinking primitives (Anthropic
|
|
21
|
-
* `thinking_delta` / `redacted_thinking` blocks). Adding them here
|
|
22
|
-
* is non-breaking; consumers already importing from
|
|
23
|
-
* `agentfootprint/status` get the new state surface for free.
|
|
14
|
+
* Future home for extended-thinking primitives (Anthropic `thinking_delta` /
|
|
15
|
+
* `redacted_thinking` blocks). Adding them here is non-breaking; consumers
|
|
16
|
+
* already importing from `agentfootprint/observe` get the new state surface
|
|
17
|
+
* for free.
|
|
24
18
|
*
|
|
25
|
-
* Prose lives elsewhere: the `defaultStatusTemplates` catalog's canonical
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* As of v7 these are NOT on the main `agentfootprint` barrel — status is a
|
|
32
|
-
* named subpath like every other observability surface. Import the logic
|
|
33
|
-
* from `agentfootprint/status`, the words from `agentfootprint/locales`.
|
|
19
|
+
* Prose lives elsewhere: the `defaultStatusTemplates` catalog's canonical home
|
|
20
|
+
* is `src/locales/` (the single i18n home for all prose — commentary,
|
|
21
|
+
* thinking, status). It is re-exported here for convenience. Both come out of
|
|
22
|
+
* the `agentfootprint/observe` door; these are NOT on the main `agentfootprint`
|
|
23
|
+
* barrel.
|
|
34
24
|
*
|
|
35
25
|
* State machine (4 states + null):
|
|
36
26
|
*
|
|
@@ -52,14 +42,14 @@
|
|
|
52
42
|
*
|
|
53
43
|
* (null) run done / between calls → bubble hidden
|
|
54
44
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
45
|
+
* Not an import path of its own since 9.0.0. This is the implementation barrel
|
|
46
|
+
* behind `agentfootprint/observe`, which re-exports every name here — same
|
|
47
|
+
* symbols, one door. Import from the door.
|
|
58
48
|
*/
|
|
59
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
50
|
exports.renderStatusLine = exports.selectStatus = void 0;
|
|
61
51
|
// Logic only — the status state machine + renderer. The prose catalog
|
|
62
|
-
// (`defaultStatusTemplates`) lives on `agentfootprint/
|
|
52
|
+
// (`defaultStatusTemplates`) lives on `agentfootprint/observe`, the single
|
|
63
53
|
// home for all user-facing text; `renderStatusLine` consumes it.
|
|
64
54
|
var statusTemplates_js_1 = require("./recorders/observability/status/statusTemplates.js");
|
|
65
55
|
Object.defineProperty(exports, "selectStatus", { enumerable: true, get: function () { return statusTemplates_js_1.selectStatus; } });
|
package/dist/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,0FAO6D;AAN3D,kHAAA,YAAY,OAAA;AACZ,sHAAA,gBAAgB,OAAA"}
|