aec-agent 1.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 +1 -0
- package/dist/agent-core.d.ts +81 -0
- package/dist/agent-core.d.ts.map +1 -0
- package/dist/agent-core.js +168 -0
- package/dist/agent-core.js.map +1 -0
- package/dist/components/artifact-hub/agent-artifact-view.d.ts +31 -0
- package/dist/components/artifact-hub/agent-artifact-view.d.ts.map +1 -0
- package/dist/components/artifact-hub/agent-artifact-view.js +264 -0
- package/dist/components/artifact-hub/agent-artifact-view.js.map +1 -0
- package/dist/components/artifact-hub/artifact-hub.d.ts +25 -0
- package/dist/components/artifact-hub/artifact-hub.d.ts.map +1 -0
- package/dist/components/artifact-hub/artifact-hub.js +39 -0
- package/dist/components/artifact-hub/artifact-hub.js.map +1 -0
- package/dist/components/artifact-hub/types/artifact.d.ts +158 -0
- package/dist/components/artifact-hub/types/artifact.d.ts.map +1 -0
- package/dist/components/artifact-hub/types/artifact.js +14 -0
- package/dist/components/artifact-hub/types/artifact.js.map +1 -0
- package/dist/components/event-handler/event-dispatcher.d.ts +17 -0
- package/dist/components/event-handler/event-dispatcher.d.ts.map +1 -0
- package/dist/components/event-handler/event-dispatcher.js +47 -0
- package/dist/components/event-handler/event-dispatcher.js.map +1 -0
- package/dist/components/event-handler/events.d.ts +154 -0
- package/dist/components/event-handler/events.d.ts.map +1 -0
- package/dist/components/event-handler/events.js +28 -0
- package/dist/components/event-handler/events.js.map +1 -0
- package/dist/components/event-handler/types.d.ts +10 -0
- package/dist/components/event-handler/types.d.ts.map +1 -0
- package/dist/components/event-handler/types.js +2 -0
- package/dist/components/event-handler/types.js.map +1 -0
- package/dist/components/llm-provider-hub/llm-provider-hub.d.ts +14 -0
- package/dist/components/llm-provider-hub/llm-provider-hub.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/llm-provider-hub.js +34 -0
- package/dist/components/llm-provider-hub/llm-provider-hub.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/anthropic-provider.d.ts +22 -0
- package/dist/components/llm-provider-hub/providers/anthropic-provider.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/anthropic-provider.js +249 -0
- package/dist/components/llm-provider-hub/providers/anthropic-provider.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/bedrock-provider.d.ts +28 -0
- package/dist/components/llm-provider-hub/providers/bedrock-provider.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/bedrock-provider.js +345 -0
- package/dist/components/llm-provider-hub/providers/bedrock-provider.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/model-info-mappers.d.ts +6 -0
- package/dist/components/llm-provider-hub/providers/model-info-mappers.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/model-info-mappers.js +267 -0
- package/dist/components/llm-provider-hub/providers/model-info-mappers.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.d.ts +24 -0
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js +243 -0
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts +29 -0
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js +299 -0
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/registry.d.ts +6 -0
- package/dist/components/llm-provider-hub/providers/registry.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/registry.js +33 -0
- package/dist/components/llm-provider-hub/providers/registry.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/types.d.ts +29 -0
- package/dist/components/llm-provider-hub/providers/types.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/providers/types.js +2 -0
- package/dist/components/llm-provider-hub/providers/types.js.map +1 -0
- package/dist/components/llm-provider-hub/types.d.ts +84 -0
- package/dist/components/llm-provider-hub/types.d.ts.map +1 -0
- package/dist/components/llm-provider-hub/types.js +6 -0
- package/dist/components/llm-provider-hub/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts +85 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js +500 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.d.ts +29 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.js +98 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/abort.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts +16 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js +116 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.d.ts +41 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts +69 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js +147 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts +55 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js +406 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts +19 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js +28 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts +17 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js +55 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts +3 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.d.ts +20 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.js +56 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.d.ts +23 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.js +127 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts +9 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js +40 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts +135 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js +31 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent.d.ts +93 -0
- package/dist/components/multi-agent-orchestration/agent/agent.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent.js +223 -0
- package/dist/components/multi-agent-orchestration/agent/agent.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.d.ts +18 -0
- package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.js +20 -0
- package/dist/components/multi-agent-orchestration/agent/artifact-manager/artifact-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts +6 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js +6 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts +22 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js +52 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/types.d.ts +13 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/types.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts +25 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js +74 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.d.ts +57 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.js +185 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/consolidation-scheduler.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.d.ts +38 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.js +89 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.d.ts +30 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.js +91 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/indexing.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.d.ts +3 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.js +3 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/learning.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts +22 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js +196 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.d.ts +17 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.js +114 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/retrieval.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts +89 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js +178 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.d.ts +29 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/config.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.d.ts +33 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/pipeline.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.d.ts +27 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.js +5 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/types/record.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts +39 -0
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js +70 -0
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.d.ts +43 -0
- package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.js +126 -0
- package/dist/components/multi-agent-orchestration/agent/sandbox-manager/sandbox-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts +38 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js +155 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts +27 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.d.ts +6 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.js +43 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-index.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts +56 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js +107 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts +20 -0
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js +28 -0
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/types.d.ts +44 -0
- package/dist/components/multi-agent-orchestration/agent/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/types.js +2 -0
- package/dist/components/multi-agent-orchestration/agent/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts +23 -0
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js +42 -0
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-agent-store.d.ts +10 -0
- package/dist/components/persistence-hub/default-stores/memory-agent-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-agent-store.js +16 -0
- package/dist/components/persistence-hub/default-stores/memory-agent-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-artifact-store.d.ts +16 -0
- package/dist/components/persistence-hub/default-stores/memory-artifact-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-artifact-store.js +70 -0
- package/dist/components/persistence-hub/default-stores/memory-artifact-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-memory-store.d.ts +12 -0
- package/dist/components/persistence-hub/default-stores/memory-memory-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-memory-store.js +51 -0
- package/dist/components/persistence-hub/default-stores/memory-memory-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-message-store.d.ts +12 -0
- package/dist/components/persistence-hub/default-stores/memory-message-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-message-store.js +33 -0
- package/dist/components/persistence-hub/default-stores/memory-message-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-provider-store.d.ts +9 -0
- package/dist/components/persistence-hub/default-stores/memory-provider-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-provider-store.js +16 -0
- package/dist/components/persistence-hub/default-stores/memory-provider-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts +12 -0
- package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-session-store.js +42 -0
- package/dist/components/persistence-hub/default-stores/memory-session-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-skill-store.d.ts +9 -0
- package/dist/components/persistence-hub/default-stores/memory-skill-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-skill-store.js +20 -0
- package/dist/components/persistence-hub/default-stores/memory-skill-store.js.map +1 -0
- package/dist/components/persistence-hub/persistence-hub.d.ts +34 -0
- package/dist/components/persistence-hub/persistence-hub.d.ts.map +1 -0
- package/dist/components/persistence-hub/persistence-hub.js +37 -0
- package/dist/components/persistence-hub/persistence-hub.js.map +1 -0
- package/dist/components/persistence-hub/types/agent-store.d.ts +8 -0
- package/dist/components/persistence-hub/types/agent-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/agent-store.js +2 -0
- package/dist/components/persistence-hub/types/agent-store.js.map +1 -0
- package/dist/components/persistence-hub/types/artifact-store.d.ts +33 -0
- package/dist/components/persistence-hub/types/artifact-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/artifact-store.js +2 -0
- package/dist/components/persistence-hub/types/artifact-store.js.map +1 -0
- package/dist/components/persistence-hub/types/memory-store.d.ts +23 -0
- package/dist/components/persistence-hub/types/memory-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/memory-store.js +2 -0
- package/dist/components/persistence-hub/types/memory-store.js.map +1 -0
- package/dist/components/persistence-hub/types/message-store.d.ts +27 -0
- package/dist/components/persistence-hub/types/message-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/message-store.js +2 -0
- package/dist/components/persistence-hub/types/message-store.js.map +1 -0
- package/dist/components/persistence-hub/types/provider-store.d.ts +28 -0
- package/dist/components/persistence-hub/types/provider-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/provider-store.js +5 -0
- package/dist/components/persistence-hub/types/provider-store.js.map +1 -0
- package/dist/components/persistence-hub/types/session-store.d.ts +15 -0
- package/dist/components/persistence-hub/types/session-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/session-store.js +2 -0
- package/dist/components/persistence-hub/types/session-store.js.map +1 -0
- package/dist/components/persistence-hub/types/skill-store.d.ts +22 -0
- package/dist/components/persistence-hub/types/skill-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/skill-store.js +2 -0
- package/dist/components/persistence-hub/types/skill-store.js.map +1 -0
- package/dist/components/sandbox-hub/approval-policy.d.ts +12 -0
- package/dist/components/sandbox-hub/approval-policy.d.ts.map +1 -0
- package/dist/components/sandbox-hub/approval-policy.js +11 -0
- package/dist/components/sandbox-hub/approval-policy.js.map +1 -0
- package/dist/components/sandbox-hub/docker/aec-sandbox-image.d.ts +3 -0
- package/dist/components/sandbox-hub/docker/aec-sandbox-image.d.ts.map +1 -0
- package/dist/components/sandbox-hub/docker/aec-sandbox-image.js +31 -0
- package/dist/components/sandbox-hub/docker/aec-sandbox-image.js.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-cli.d.ts +32 -0
- package/dist/components/sandbox-hub/docker/docker-cli.d.ts.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-cli.js +83 -0
- package/dist/components/sandbox-hub/docker/docker-cli.js.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox-provider.d.ts +70 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox-provider.d.ts.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox-provider.js +166 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox-provider.js.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts +51 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox.js +584 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox.js.map +1 -0
- package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts +4 -0
- package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts.map +1 -0
- package/dist/components/sandbox-hub/docker/sandbox-helper.js +442 -0
- package/dist/components/sandbox-hub/docker/sandbox-helper.js.map +1 -0
- package/dist/components/sandbox-hub/docker/types.d.ts +26 -0
- package/dist/components/sandbox-hub/docker/types.d.ts.map +1 -0
- package/dist/components/sandbox-hub/docker/types.js +2 -0
- package/dist/components/sandbox-hub/docker/types.js.map +1 -0
- package/dist/components/sandbox-hub/host/host-sandbox-provider.d.ts +34 -0
- package/dist/components/sandbox-hub/host/host-sandbox-provider.d.ts.map +1 -0
- package/dist/components/sandbox-hub/host/host-sandbox-provider.js +81 -0
- package/dist/components/sandbox-hub/host/host-sandbox-provider.js.map +1 -0
- package/dist/components/sandbox-hub/host/host-sandbox.d.ts +22 -0
- package/dist/components/sandbox-hub/host/host-sandbox.d.ts.map +1 -0
- package/dist/components/sandbox-hub/host/host-sandbox.js +508 -0
- package/dist/components/sandbox-hub/host/host-sandbox.js.map +1 -0
- package/dist/components/sandbox-hub/logical-path.d.ts +28 -0
- package/dist/components/sandbox-hub/logical-path.d.ts.map +1 -0
- package/dist/components/sandbox-hub/logical-path.js +73 -0
- package/dist/components/sandbox-hub/logical-path.js.map +1 -0
- package/dist/components/sandbox-hub/sandbox-hub.d.ts +69 -0
- package/dist/components/sandbox-hub/sandbox-hub.d.ts.map +1 -0
- package/dist/components/sandbox-hub/sandbox-hub.js +216 -0
- package/dist/components/sandbox-hub/sandbox-hub.js.map +1 -0
- package/dist/components/sandbox-hub/traced-sandbox.d.ts +15 -0
- package/dist/components/sandbox-hub/traced-sandbox.d.ts.map +1 -0
- package/dist/components/sandbox-hub/traced-sandbox.js +69 -0
- package/dist/components/sandbox-hub/traced-sandbox.js.map +1 -0
- package/dist/components/sandbox-hub/types/policy.d.ts +40 -0
- package/dist/components/sandbox-hub/types/policy.d.ts.map +1 -0
- package/dist/components/sandbox-hub/types/policy.js +2 -0
- package/dist/components/sandbox-hub/types/policy.js.map +1 -0
- package/dist/components/sandbox-hub/types/provider.d.ts +40 -0
- package/dist/components/sandbox-hub/types/provider.d.ts.map +1 -0
- package/dist/components/sandbox-hub/types/provider.js +2 -0
- package/dist/components/sandbox-hub/types/provider.js.map +1 -0
- package/dist/components/sandbox-hub/types/sandbox.d.ts +185 -0
- package/dist/components/sandbox-hub/types/sandbox.d.ts.map +1 -0
- package/dist/components/sandbox-hub/types/sandbox.js +15 -0
- package/dist/components/sandbox-hub/types/sandbox.js.map +1 -0
- package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts +5 -0
- package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts.map +1 -0
- package/dist/components/skill-hub/built-in-skills/essential-skills.js +10 -0
- package/dist/components/skill-hub/built-in-skills/essential-skills.js.map +1 -0
- package/dist/components/skill-hub/built-in-skills/plan.d.ts +3 -0
- package/dist/components/skill-hub/built-in-skills/plan.d.ts.map +1 -0
- package/dist/components/skill-hub/built-in-skills/plan.js +33 -0
- package/dist/components/skill-hub/built-in-skills/plan.js.map +1 -0
- package/dist/components/skill-hub/built-in-skills/skill-creator.d.ts +3 -0
- package/dist/components/skill-hub/built-in-skills/skill-creator.d.ts.map +1 -0
- package/dist/components/skill-hub/built-in-skills/skill-creator.js +186 -0
- package/dist/components/skill-hub/built-in-skills/skill-creator.js.map +1 -0
- package/dist/components/skill-hub/built-in-skills/web-research.d.ts +3 -0
- package/dist/components/skill-hub/built-in-skills/web-research.d.ts.map +1 -0
- package/dist/components/skill-hub/built-in-skills/web-research.js +35 -0
- package/dist/components/skill-hub/built-in-skills/web-research.js.map +1 -0
- package/dist/components/skill-hub/skill-format.d.ts +40 -0
- package/dist/components/skill-hub/skill-format.d.ts.map +1 -0
- package/dist/components/skill-hub/skill-format.js +378 -0
- package/dist/components/skill-hub/skill-format.js.map +1 -0
- package/dist/components/skill-hub/skill-hub.d.ts +45 -0
- package/dist/components/skill-hub/skill-hub.d.ts.map +1 -0
- package/dist/components/skill-hub/skill-hub.js +173 -0
- package/dist/components/skill-hub/skill-hub.js.map +1 -0
- package/dist/components/skill-hub/types/agent-skills.d.ts +20 -0
- package/dist/components/skill-hub/types/agent-skills.d.ts.map +1 -0
- package/dist/components/skill-hub/types/agent-skills.js +2 -0
- package/dist/components/skill-hub/types/agent-skills.js.map +1 -0
- package/dist/components/skill-hub/types/skill.d.ts +55 -0
- package/dist/components/skill-hub/types/skill.d.ts.map +1 -0
- package/dist/components/skill-hub/types/skill.js +11 -0
- package/dist/components/skill-hub/types/skill.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts +52 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js +143 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.d.ts +7 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.js +18 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/create-artifact-tools.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.d.ts +16 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.js +69 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/list-artifacts-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.d.ts +16 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.js +79 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/read-artifact-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts +16 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js +105 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/types.d.ts +11 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/types.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/types.js +8 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/types.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts +17 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js +100 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.d.ts +16 -0
- package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.js +94 -0
- package/dist/components/tool-hub/built-in-tools/interaction/clarify-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.d.ts +22 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.js +226 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-manage-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.d.ts +18 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.js +86 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-view-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.d.ts +26 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.js +93 -0
- package/dist/components/tool-hub/built-in-tools/skills/skill-workspace.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.d.ts +28 -0
- package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.js +116 -0
- package/dist/components/tool-hub/built-in-tools/web/duckduckgo-search-provider.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/html-to-text.d.ts +14 -0
- package/dist/components/tool-hub/built-in-tools/web/html-to-text.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/html-to-text.js +158 -0
- package/dist/components/tool-hub/built-in-tools/web/html-to-text.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/network-guard.d.ts +21 -0
- package/dist/components/tool-hub/built-in-tools/web/network-guard.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/network-guard.js +106 -0
- package/dist/components/tool-hub/built-in-tools/web/network-guard.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/types.d.ts +23 -0
- package/dist/components/tool-hub/built-in-tools/web/types.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/types.js +5 -0
- package/dist/components/tool-hub/built-in-tools/web/types.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts +37 -0
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js +206 -0
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts +25 -0
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js +82 -0
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.d.ts +7 -0
- package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.js +24 -0
- package/dist/components/tool-hub/built-in-tools/workspace/create-workspace-tools.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.d.ts +15 -0
- package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.js +103 -0
- package/dist/components/tool-hub/built-in-tools/workspace/edit-file-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.d.ts +12 -0
- package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.js +53 -0
- package/dist/components/tool-hub/built-in-tools/workspace/list-files-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.d.ts +15 -0
- package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.js +71 -0
- package/dist/components/tool-hub/built-in-tools/workspace/read-file-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts +16 -0
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js +72 -0
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.d.ts +12 -0
- package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.js +64 -0
- package/dist/components/tool-hub/built-in-tools/workspace/search-files-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts +19 -0
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js +111 -0
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/types.d.ts +16 -0
- package/dist/components/tool-hub/built-in-tools/workspace/types.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/types.js +8 -0
- package/dist/components/tool-hub/built-in-tools/workspace/types.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts +29 -0
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js +128 -0
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.d.ts +17 -0
- package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.js +61 -0
- package/dist/components/tool-hub/built-in-tools/workspace/write-file-tool.js.map +1 -0
- package/dist/components/tool-hub/policies/default-tool-policy.d.ts +17 -0
- package/dist/components/tool-hub/policies/default-tool-policy.d.ts.map +1 -0
- package/dist/components/tool-hub/policies/default-tool-policy.js +99 -0
- package/dist/components/tool-hub/policies/default-tool-policy.js.map +1 -0
- package/dist/components/tool-hub/tool-hub.d.ts +28 -0
- package/dist/components/tool-hub/tool-hub.d.ts.map +1 -0
- package/dist/components/tool-hub/tool-hub.js +49 -0
- package/dist/components/tool-hub/tool-hub.js.map +1 -0
- package/dist/components/tool-hub/types.d.ts +138 -0
- package/dist/components/tool-hub/types.d.ts.map +1 -0
- package/dist/components/tool-hub/types.js +2 -0
- package/dist/components/tool-hub/types.js.map +1 -0
- package/dist/components/trace-service/console-trace-sink.d.ts +9 -0
- package/dist/components/trace-service/console-trace-sink.d.ts.map +1 -0
- package/dist/components/trace-service/console-trace-sink.js +35 -0
- package/dist/components/trace-service/console-trace-sink.js.map +1 -0
- package/dist/components/trace-service/trace-service.d.ts +25 -0
- package/dist/components/trace-service/trace-service.d.ts.map +1 -0
- package/dist/components/trace-service/trace-service.js +288 -0
- package/dist/components/trace-service/trace-service.js.map +1 -0
- package/dist/components/trace-service/types/sink.d.ts +7 -0
- package/dist/components/trace-service/types/sink.d.ts.map +1 -0
- package/dist/components/trace-service/types/sink.js +5 -0
- package/dist/components/trace-service/types/sink.js.map +1 -0
- package/dist/components/trace-service/types/span.d.ts +31 -0
- package/dist/components/trace-service/types/span.d.ts.map +1 -0
- package/dist/components/trace-service/types/span.js +5 -0
- package/dist/components/trace-service/types/span.js.map +1 -0
- package/dist/create-agent.d.ts +5 -0
- package/dist/create-agent.d.ts.map +1 -0
- package/dist/create-agent.js +57 -0
- package/dist/create-agent.js.map +1 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/kernel/errors/artifact-error.d.ts +23 -0
- package/dist/kernel/errors/artifact-error.d.ts.map +1 -0
- package/dist/kernel/errors/artifact-error.js +22 -0
- package/dist/kernel/errors/artifact-error.js.map +1 -0
- package/dist/kernel/errors/model-error.d.ts +7 -0
- package/dist/kernel/errors/model-error.d.ts.map +1 -0
- package/dist/kernel/errors/model-error.js +10 -0
- package/dist/kernel/errors/model-error.js.map +1 -0
- package/dist/kernel/errors/policy-error.d.ts +8 -0
- package/dist/kernel/errors/policy-error.d.ts.map +1 -0
- package/dist/kernel/errors/policy-error.js +12 -0
- package/dist/kernel/errors/policy-error.js.map +1 -0
- package/dist/kernel/errors/sandbox-error.d.ts +35 -0
- package/dist/kernel/errors/sandbox-error.d.ts.map +1 -0
- package/dist/kernel/errors/sandbox-error.js +26 -0
- package/dist/kernel/errors/sandbox-error.js.map +1 -0
- package/dist/kernel/errors/sdk-error.d.ts +9 -0
- package/dist/kernel/errors/sdk-error.d.ts.map +1 -0
- package/dist/kernel/errors/sdk-error.js +13 -0
- package/dist/kernel/errors/sdk-error.js.map +1 -0
- package/dist/kernel/errors/session-error.d.ts +7 -0
- package/dist/kernel/errors/session-error.d.ts.map +1 -0
- package/dist/kernel/errors/session-error.js +10 -0
- package/dist/kernel/errors/session-error.js.map +1 -0
- package/dist/kernel/errors/skill-error.d.ts +14 -0
- package/dist/kernel/errors/skill-error.d.ts.map +1 -0
- package/dist/kernel/errors/skill-error.js +12 -0
- package/dist/kernel/errors/skill-error.js.map +1 -0
- package/dist/kernel/errors/tool-error.d.ts +8 -0
- package/dist/kernel/errors/tool-error.d.ts.map +1 -0
- package/dist/kernel/errors/tool-error.js +12 -0
- package/dist/kernel/errors/tool-error.js.map +1 -0
- package/dist/kernel/interfaces/kernel.d.ts +23 -0
- package/dist/kernel/interfaces/kernel.d.ts.map +1 -0
- package/dist/kernel/interfaces/kernel.js +2 -0
- package/dist/kernel/interfaces/kernel.js.map +1 -0
- package/dist/kernel/interfaces/plugin.d.ts +7 -0
- package/dist/kernel/interfaces/plugin.d.ts.map +1 -0
- package/dist/kernel/interfaces/plugin.js +5 -0
- package/dist/kernel/interfaces/plugin.js.map +1 -0
- package/dist/kernel/types.d.ts +103 -0
- package/dist/kernel/types.d.ts.map +1 -0
- package/dist/kernel/types.js +2 -0
- package/dist/kernel/types.js.map +1 -0
- package/dist/testing/in-memory-sandbox.d.ts +66 -0
- package/dist/testing/in-memory-sandbox.d.ts.map +1 -0
- package/dist/testing/in-memory-sandbox.js +507 -0
- package/dist/testing/in-memory-sandbox.js.map +1 -0
- package/dist/testing/mock-llm-model-provider.d.ts +14 -0
- package/dist/testing/mock-llm-model-provider.d.ts.map +1 -0
- package/dist/testing/mock-llm-model-provider.js +30 -0
- package/dist/testing/mock-llm-model-provider.js.map +1 -0
- package/dist/testing/mock-session-store.d.ts +17 -0
- package/dist/testing/mock-session-store.d.ts.map +1 -0
- package/dist/testing/mock-session-store.js +49 -0
- package/dist/testing/mock-session-store.js.map +1 -0
- package/dist/testing/mock-tools.d.ts +38 -0
- package/dist/testing/mock-tools.d.ts.map +1 -0
- package/dist/testing/mock-tools.js +130 -0
- package/dist/testing/mock-tools.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abort.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/abort.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,qEAAqE;AACrE,EAAE;AACF,4EAA4E;AAC5E,8DAA8D;AAC9D,8EAA8E;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CACvB,MAAwB,EACxB,MAAoB;IAEpB,IAAI,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC;IAE3B,KAAK,SAAS,CAAC,CAAC,SAAS;QACvB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QAEhD,OAAO,IAAI,EAAE,CAAC;YACZ,IAAI,MAAO,CAAC,OAAO,EAAE,CAAC;gBACpB,KAAK,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;gBAC1C,OAAO;YACT,CAAC;YAED,IAAI,aAAuC,CAAC;YAC5C,MAAM,YAAY,GAAG,IAAI,O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QACZ,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CompactorConfig, CompactorResult } from "./compactor.types.js";
|
|
2
|
+
import type { Summarize } from "./summarizer.types.js";
|
|
3
|
+
import type { Message, TokenUsage } from "../../../../../kernel/types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Compact when conversation going too far
|
|
6
|
+
*/
|
|
7
|
+
export declare class Compactor {
|
|
8
|
+
private config;
|
|
9
|
+
constructor(config: CompactorConfig);
|
|
10
|
+
compactIfNeeded(messages: Message[], tokenUsage: TokenUsage, countTokens: (message: Message) => number, summarize: Summarize): Promise<CompactorResult>;
|
|
11
|
+
private splitMiddleAndTail;
|
|
12
|
+
private tailBudget;
|
|
13
|
+
private pruneOldToolResults;
|
|
14
|
+
private sumTokens;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=compactor.d.ts.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compactor.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/compactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI1E;;GAEG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAkB;IAChC,YAAY,MAAM,EAAE,eAAe,EAElC;IACK,eAAe,CACnB,QAAQ,EAAE,OAAO,EAAE,EACnB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,EACzC,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,eAAe,CAAC,CA+C1B;IAED,OAAO,CAAC,kBAAkB;IAsC1B,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,mBAAmB;IA8B3B,OAAO,CAAC,SAAS;CAMlB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { carriesToolResults } from "./tool-pairing.js";
|
|
2
|
+
const CLEARED_TOOL_OUTPUT = "[Old tool output cleared to save context space]";
|
|
3
|
+
/**
|
|
4
|
+
* Compact when conversation going too far
|
|
5
|
+
*/
|
|
6
|
+
export class Compactor {
|
|
7
|
+
config;
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.config = config;
|
|
10
|
+
}
|
|
11
|
+
async compactIfNeeded(messages, tokenUsage, countTokens, summarize) {
|
|
12
|
+
if (tokenUsage.inputTokens + tokenUsage.outputTokens <
|
|
13
|
+
this.config.contextWindowTokens * this.config.threshold) {
|
|
14
|
+
return { compacted: false, messages, summarySource: "", tailTokens: 0 };
|
|
15
|
+
}
|
|
16
|
+
const protectedHead = messages.slice(0, this.config.protectFirstN);
|
|
17
|
+
const remaining = messages.slice(this.config.protectFirstN);
|
|
18
|
+
const { middle, tail } = this.splitMiddleAndTail(remaining, countTokens);
|
|
19
|
+
// Nothing left to summarise once the tail was widened to keep tool pairs.
|
|
20
|
+
if (middle.length === 0) {
|
|
21
|
+
return { compacted: false, messages, summarySource: "", tailTokens: 0 };
|
|
22
|
+
}
|
|
23
|
+
const prunedMiddle = this.pruneOldToolResults(middle, countTokens);
|
|
24
|
+
const summarySource = prunedMiddle
|
|
25
|
+
.map((message) => message.content)
|
|
26
|
+
.join("\n");
|
|
27
|
+
let summary;
|
|
28
|
+
try {
|
|
29
|
+
summary = await summarize(prunedMiddle, this.config.summarizeMaxOutputTokens, this.config.summarizationModel);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
// Summarization failed (model unavailable, timeout, etc.) —
|
|
33
|
+
// fall back to uncompacted messages so the agent loop continues
|
|
34
|
+
console.warn("[compactor] summarization failed, skipping compaction:", err);
|
|
35
|
+
return { compacted: false, messages, summarySource: "", tailTokens: 0 };
|
|
36
|
+
}
|
|
37
|
+
const summaryMessage = {
|
|
38
|
+
role: "assistant",
|
|
39
|
+
content: summary,
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
compacted: true,
|
|
43
|
+
messages: [...protectedHead, summaryMessage, ...tail],
|
|
44
|
+
summarySource,
|
|
45
|
+
tailTokens: this.sumTokens(tail, countTokens),
|
|
46
|
+
// The summary message is inserted right after the protected head.
|
|
47
|
+
summaryIndex: protectedHead.length,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
splitMiddleAndTail(messages, countTokens) {
|
|
51
|
+
const tailBudget = this.tailBudget();
|
|
52
|
+
const tail = [];
|
|
53
|
+
let tailTokens = 0;
|
|
54
|
+
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
55
|
+
const message = messages[index];
|
|
56
|
+
if (!message)
|
|
57
|
+
continue;
|
|
58
|
+
const mustKeep = tail.length < this.config.protectLastN;
|
|
59
|
+
const fitsBudget = tailTokens + countTokens(message) <= tailBudget;
|
|
60
|
+
if (!mustKeep && !fitsBudget)
|
|
61
|
+
break;
|
|
62
|
+
tail.unshift(message);
|
|
63
|
+
tailTokens += countTokens(message);
|
|
64
|
+
}
|
|
65
|
+
// Never cut between a tool call and its result: a tail that opens with
|
|
66
|
+
// results would reach the model without the calls they answer (the calls
|
|
67
|
+
// are summarised away), which providers reject. Pull the earlier messages
|
|
68
|
+
// in until the tail starts clean, even if that goes over budget.
|
|
69
|
+
let start = messages.length - tail.length;
|
|
70
|
+
while (start > 0 && tail[0] && carriesToolResults(tail[0])) {
|
|
71
|
+
start -= 1;
|
|
72
|
+
const message = messages[start];
|
|
73
|
+
tail.unshift(message);
|
|
74
|
+
tailTokens += countTokens(message);
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
middle: messages.slice(0, messages.length - tail.length),
|
|
78
|
+
tail,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
tailBudget() {
|
|
82
|
+
if (this.config.leanTailTokenBudget) {
|
|
83
|
+
return this.config.leanTailTokenBudget;
|
|
84
|
+
}
|
|
85
|
+
return (this.config.contextWindowTokens *
|
|
86
|
+
this.config.threshold *
|
|
87
|
+
this.config.tailTargetRatio);
|
|
88
|
+
}
|
|
89
|
+
pruneOldToolResults(messages, countTokens) {
|
|
90
|
+
const minimum = this.config.oldToolResultMinTokens ?? 2_000;
|
|
91
|
+
return messages.map((message) => {
|
|
92
|
+
if (!carriesToolResults(message) || countTokens(message) < minimum)
|
|
93
|
+
return message;
|
|
94
|
+
// The agent loop records results on `toolResults`; legacy tool messages
|
|
95
|
+
// keep theirs in `content`.
|
|
96
|
+
if (message.toolResults?.length) {
|
|
97
|
+
return {
|
|
98
|
+
...message,
|
|
99
|
+
toolResults: message.toolResults.map((result) => ({
|
|
100
|
+
...result,
|
|
101
|
+
content: CLEARED_TOOL_OUTPUT,
|
|
102
|
+
})),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
...message,
|
|
107
|
+
content: CLEARED_TOOL_OUTPUT,
|
|
108
|
+
tokens: 2,
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
sumTokens(messages, countTokens) {
|
|
113
|
+
return messages.reduce((total, message) => total + countTokens(message), 0);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=compactor.js.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compactor.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/compactor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,MAAM,mBAAmB,GAAG,iDAAiD,CAAC;AAE9E;;GAEG;AACH,MAAM,OAAO,SAAS;IACZ,MAAM,CAAkB;IAChC,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,eAAe,CACnB,QAAmB,EACnB,UAAsB,EACtB,WAAyC,EACzC,SAAoB;QAEpB,IACE,UAAU,CAAC,WAAW,GAAG,UAAU,CAAC,YAAY;YAChD,IAAI,CAAC,MAAM,CAAC,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EACvD,CAAC;YACD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;QAC1E,CAAC;QAED,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACnE,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC5D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACzE,0EAA0E;QAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;QAC1E,CAAC;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,CAAC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,CAAC,MAAM,CAAC,eAAe,CAC5B,CAAC;IACJ,CAAC;IAEO,mBAAmB,CACzB,QAAmB,EACnB,WAAyC;QAEzC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,sBAAsB,IAAI,KAAK,CAAC;QAE5D,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9B,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;gBAChE,OAAO,OAAO,CAAC;YAEjB,wEAAwE;YACxE,4BAA4B;YAC5B,IAAI,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAChC,OAAO;oBACL,GAAG,OAAO;oBACV,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;wBAChD,GAAG,MAAM;wBACT,OAAO,EAAE,mBAAmB;qBAC7B,CAAC,CAAC;iBACJ,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,GAAG,OAAO;gBACV,OAAO,EAAE,mBAAmB;gBAC5B,MAAM,EAAE,CAAC;aACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,SAAS,CACf,QAAmB,EACnB,WAAyC;QAEzC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Message } from "../../../../../kernel/types.js";
|
|
2
|
+
export interface CompactorConfig {
|
|
3
|
+
contextWindowTokens: number;
|
|
4
|
+
threshold: number;
|
|
5
|
+
minTailUserMessages: number;
|
|
6
|
+
protectFirstN: number;
|
|
7
|
+
/**
|
|
8
|
+
* proactive prune tool result, in some case tool result is too large
|
|
9
|
+
* so we can proactive prune early before hit threshold.
|
|
10
|
+
*/
|
|
11
|
+
proactivePruneTokens: number;
|
|
12
|
+
/**
|
|
13
|
+
* how many tokens we will keep for tool result
|
|
14
|
+
*/
|
|
15
|
+
oldToolResultMinTokens: number;
|
|
16
|
+
/**
|
|
17
|
+
* the ratio of tail we will keep for current conversation, for example current conversation took 500k tokens,
|
|
18
|
+
* let say this value is 0.2 (20%) with this ratio it will took 500k * 0.2 = 100k tokens.
|
|
19
|
+
* protectLastN and tailTargetRatio is 2 stradegy to calculate how many tail conversation should we keep.
|
|
20
|
+
* In case, let say protectLastN we set 20, if those 20 messages larger than ratio it will take ratio, if more less
|
|
21
|
+
* it will add more than 20 messages.
|
|
22
|
+
*/
|
|
23
|
+
tailTargetRatio: number;
|
|
24
|
+
/**
|
|
25
|
+
* this value has the same role with tailTargetRatio, if we want exact number just set this
|
|
26
|
+
*/
|
|
27
|
+
leanTailTokenBudget?: number;
|
|
28
|
+
protectLastN: number;
|
|
29
|
+
summarizeMaxOutputTokens: number;
|
|
30
|
+
/** Optional model override for summarization (e.g. a cheaper/faster model). Falls back to the agent's default model when unset. */
|
|
31
|
+
summarizationModel?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CompactorResult {
|
|
34
|
+
compacted: boolean;
|
|
35
|
+
messages: Message[];
|
|
36
|
+
summarySource: string;
|
|
37
|
+
tailTokens: number;
|
|
38
|
+
/** index of the summary message in `messages`; set only when compacted */
|
|
39
|
+
summaryIndex?: number;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=compactor.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compactor.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,MAAM,WAAW,eAAe;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IAErB,wBAAwB,EAAE,MAAM,CAAC;IACjC,mIAAmI;IACnI,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compactor.types.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/compactor.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { Message, TokenUsage } from "../../../../../kernel/types.js";
|
|
2
|
+
import type { ModelManager } from "../../model-manager/model-manager.js";
|
|
3
|
+
/**
|
|
4
|
+
* Token counter with three accuracy layers:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Cache hit** — previously counted messages return instantly (WeakMap,
|
|
7
|
+
* identity-based, no memory leak when messages are GC'd).
|
|
8
|
+
*
|
|
9
|
+
* 2. **Calibrated estimate** — after each model response we feed actual
|
|
10
|
+
* inputTokens back via `calibrate()`. An exponential moving average
|
|
11
|
+
* tunes the chars-per-token ratio so future estimates converge to the
|
|
12
|
+
* provider's real tokenizer.
|
|
13
|
+
*
|
|
14
|
+
* 3. **Char-ratio fallback** — `ceil(charLength / charsPerToken)`.
|
|
15
|
+
* Matches the existing provider implementations and is safe when
|
|
16
|
+
* no calibration data exists yet.
|
|
17
|
+
*
|
|
18
|
+
* The Compactor needs a **sync** `(message: Message) => number` function.
|
|
19
|
+
* This class exposes `countTokens` as that sync callback. Call `warmup()`
|
|
20
|
+
* before compaction to pre-populate the cache via the provider API, and
|
|
21
|
+
* `calibrate()` after each model response to improve accuracy over time.
|
|
22
|
+
*/
|
|
23
|
+
export declare class Counter {
|
|
24
|
+
private modelManager;
|
|
25
|
+
private cache;
|
|
26
|
+
private charsPerToken;
|
|
27
|
+
private calibrationSamples;
|
|
28
|
+
constructor(modelManager: ModelManager);
|
|
29
|
+
/**
|
|
30
|
+
* Restore a previously saved calibration so the counter doesn't start cold.
|
|
31
|
+
* Call once at the start of run()/stream() when the session carries saved data.
|
|
32
|
+
*/
|
|
33
|
+
seed(charsPerToken: number, samples: number): void;
|
|
34
|
+
/**
|
|
35
|
+
* Return current calibration state for persistence on the session.
|
|
36
|
+
*/
|
|
37
|
+
getCalibration(): {
|
|
38
|
+
charsPerToken: number;
|
|
39
|
+
samples: number;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Pre-populate the cache by querying the provider for each uncached message.
|
|
43
|
+
* Current providers compute locally (no network); future providers that use
|
|
44
|
+
* a real tokenizer (tiktoken, Anthropic token-counting API) automatically
|
|
45
|
+
* give more accurate counts through the same path.
|
|
46
|
+
*/
|
|
47
|
+
warmup(messages: Message[]): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Refine the chars-per-token ratio using actual token usage from a model
|
|
50
|
+
* response. Call after each `modelManager.chat()` / `stream()` with the
|
|
51
|
+
* messages that were sent and the returned usage.
|
|
52
|
+
*
|
|
53
|
+
* Uses an exponential moving average so the ratio stabilizes after
|
|
54
|
+
* MAX_CALIBRATION_SAMPLES updates, while still adapting to model/provider
|
|
55
|
+
* switches mid-session.
|
|
56
|
+
*/
|
|
57
|
+
calibrate(messages: Message[], usage: TokenUsage): void;
|
|
58
|
+
/**
|
|
59
|
+
* Sync per-message token counter. Returns a cached count when available,
|
|
60
|
+
* otherwise produces a calibrated estimate and caches it.
|
|
61
|
+
*
|
|
62
|
+
* Matches the signature `(message: Message) => number` that
|
|
63
|
+
* `Compactor.compactIfNeeded` expects.
|
|
64
|
+
*/
|
|
65
|
+
countTokens: (message: Message) => number;
|
|
66
|
+
private estimate;
|
|
67
|
+
private charLength;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=counter.d.ts.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AASzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,OAAO;IAKN,OAAO,CAAC,YAAY;IAJhC,OAAO,CAAC,KAAK,CAAkC;IAC/C,OAAO,CAAC,aAAa,CAA2B;IAChD,OAAO,CAAC,kBAAkB,CAAK;IAE/B,YAAoB,YAAY,EAAE,YAAY,EAAI;IAMlD;;;OAGG;IACH,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAMjD;IAED;;OAEG;IACH,cAAc,IAAI;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAE3D;IAMD;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB/C;IAMD;;;;;;;;OAQG;IACH,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CA8BtD;IAMD;;;;;;OAMG;IACH,WAAW,YAAa,OAAO,KAAG,MAAM,CAWtC;IAMF,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,UAAU;CAMnB"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// Chars-per-token defaults tuned for mixed English / code / JSON content.
|
|
2
|
+
// The calibrate() method refines this at runtime from real provider usage.
|
|
3
|
+
const DEFAULT_CHARS_PER_TOKEN = 4;
|
|
4
|
+
const MIN_CHARS_PER_TOKEN = 2;
|
|
5
|
+
const MAX_CHARS_PER_TOKEN = 8;
|
|
6
|
+
const MAX_CALIBRATION_SAMPLES = 20;
|
|
7
|
+
/**
|
|
8
|
+
* Token counter with three accuracy layers:
|
|
9
|
+
*
|
|
10
|
+
* 1. **Cache hit** — previously counted messages return instantly (WeakMap,
|
|
11
|
+
* identity-based, no memory leak when messages are GC'd).
|
|
12
|
+
*
|
|
13
|
+
* 2. **Calibrated estimate** — after each model response we feed actual
|
|
14
|
+
* inputTokens back via `calibrate()`. An exponential moving average
|
|
15
|
+
* tunes the chars-per-token ratio so future estimates converge to the
|
|
16
|
+
* provider's real tokenizer.
|
|
17
|
+
*
|
|
18
|
+
* 3. **Char-ratio fallback** — `ceil(charLength / charsPerToken)`.
|
|
19
|
+
* Matches the existing provider implementations and is safe when
|
|
20
|
+
* no calibration data exists yet.
|
|
21
|
+
*
|
|
22
|
+
* The Compactor needs a **sync** `(message: Message) => number` function.
|
|
23
|
+
* This class exposes `countTokens` as that sync callback. Call `warmup()`
|
|
24
|
+
* before compaction to pre-populate the cache via the provider API, and
|
|
25
|
+
* `calibrate()` after each model response to improve accuracy over time.
|
|
26
|
+
*/
|
|
27
|
+
export class Counter {
|
|
28
|
+
modelManager;
|
|
29
|
+
cache = new WeakMap();
|
|
30
|
+
charsPerToken = DEFAULT_CHARS_PER_TOKEN;
|
|
31
|
+
calibrationSamples = 0;
|
|
32
|
+
constructor(modelManager) {
|
|
33
|
+
this.modelManager = modelManager;
|
|
34
|
+
}
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// seed / getCalibration — restore and persist learned ratio across sessions
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
/**
|
|
39
|
+
* Restore a previously saved calibration so the counter doesn't start cold.
|
|
40
|
+
* Call once at the start of run()/stream() when the session carries saved data.
|
|
41
|
+
*/
|
|
42
|
+
seed(charsPerToken, samples) {
|
|
43
|
+
this.charsPerToken = Math.max(MIN_CHARS_PER_TOKEN, Math.min(MAX_CHARS_PER_TOKEN, charsPerToken));
|
|
44
|
+
this.calibrationSamples = Math.max(0, Math.min(MAX_CALIBRATION_SAMPLES, samples));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Return current calibration state for persistence on the session.
|
|
48
|
+
*/
|
|
49
|
+
getCalibration() {
|
|
50
|
+
return { charsPerToken: this.charsPerToken, samples: this.calibrationSamples };
|
|
51
|
+
}
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// warmup — async pre-computation via the provider's countTokens API
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
/**
|
|
56
|
+
* Pre-populate the cache by querying the provider for each uncached message.
|
|
57
|
+
* Current providers compute locally (no network); future providers that use
|
|
58
|
+
* a real tokenizer (tiktoken, Anthropic token-counting API) automatically
|
|
59
|
+
* give more accurate counts through the same path.
|
|
60
|
+
*/
|
|
61
|
+
async warmup(messages) {
|
|
62
|
+
const uncached = messages.filter((m) => !this.cache.has(m));
|
|
63
|
+
if (uncached.length === 0)
|
|
64
|
+
return;
|
|
65
|
+
const settled = await Promise.allSettled(uncached.map(async (msg) => {
|
|
66
|
+
const count = await this.modelManager.countTokens([msg]);
|
|
67
|
+
this.cache.set(msg, count);
|
|
68
|
+
}));
|
|
69
|
+
// Fall back to estimation for any provider failures
|
|
70
|
+
for (let i = 0; i < settled.length; i++) {
|
|
71
|
+
if (settled[i].status === "rejected") {
|
|
72
|
+
this.cache.set(uncached[i], this.estimate(uncached[i]));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
// calibrate — learn from real usage data returned by the model
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
/**
|
|
80
|
+
* Refine the chars-per-token ratio using actual token usage from a model
|
|
81
|
+
* response. Call after each `modelManager.chat()` / `stream()` with the
|
|
82
|
+
* messages that were sent and the returned usage.
|
|
83
|
+
*
|
|
84
|
+
* Uses an exponential moving average so the ratio stabilizes after
|
|
85
|
+
* MAX_CALIBRATION_SAMPLES updates, while still adapting to model/provider
|
|
86
|
+
* switches mid-session.
|
|
87
|
+
*/
|
|
88
|
+
calibrate(messages, usage) {
|
|
89
|
+
const actualTokens = usage.inputTokens;
|
|
90
|
+
if (actualTokens <= 0 || messages.length === 0)
|
|
91
|
+
return;
|
|
92
|
+
const totalChars = messages.reduce((sum, m) => sum + this.charLength(m), 0);
|
|
93
|
+
if (totalChars === 0)
|
|
94
|
+
return;
|
|
95
|
+
const observedRatio = totalChars / actualTokens;
|
|
96
|
+
// Exponential moving average — early samples have more weight
|
|
97
|
+
if (this.calibrationSamples < MAX_CALIBRATION_SAMPLES) {
|
|
98
|
+
this.calibrationSamples++;
|
|
99
|
+
}
|
|
100
|
+
const weight = 1 / this.calibrationSamples;
|
|
101
|
+
this.charsPerToken =
|
|
102
|
+
this.charsPerToken * (1 - weight) + observedRatio * weight;
|
|
103
|
+
// Clamp to sane bounds
|
|
104
|
+
this.charsPerToken = Math.max(MIN_CHARS_PER_TOKEN, Math.min(MAX_CHARS_PER_TOKEN, this.charsPerToken));
|
|
105
|
+
// Invalidate cached estimates so the next count uses the refined ratio.
|
|
106
|
+
// Only invalidate messages whose cached value came from estimation, not
|
|
107
|
+
// from the provider API. Since we can't distinguish, invalidate all and
|
|
108
|
+
// let them be re-estimated lazily — the WeakMap makes this cheap.
|
|
109
|
+
}
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
// countTokens — sync per-message counter (Compactor interface)
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
/**
|
|
114
|
+
* Sync per-message token counter. Returns a cached count when available,
|
|
115
|
+
* otherwise produces a calibrated estimate and caches it.
|
|
116
|
+
*
|
|
117
|
+
* Matches the signature `(message: Message) => number` that
|
|
118
|
+
* `Compactor.compactIfNeeded` expects.
|
|
119
|
+
*/
|
|
120
|
+
countTokens = (message) => {
|
|
121
|
+
const cached = this.cache.get(message);
|
|
122
|
+
if (cached !== undefined)
|
|
123
|
+
return cached;
|
|
124
|
+
// Pruned tool results carry a pre-set token count
|
|
125
|
+
const explicit = message.tokens;
|
|
126
|
+
if (typeof explicit === "number")
|
|
127
|
+
return explicit;
|
|
128
|
+
const estimated = this.estimate(message);
|
|
129
|
+
this.cache.set(message, estimated);
|
|
130
|
+
return estimated;
|
|
131
|
+
};
|
|
132
|
+
// ---------------------------------------------------------------------------
|
|
133
|
+
// Internal helpers
|
|
134
|
+
// ---------------------------------------------------------------------------
|
|
135
|
+
estimate(message) {
|
|
136
|
+
return Math.max(1, Math.ceil(this.charLength(message) / this.charsPerToken));
|
|
137
|
+
}
|
|
138
|
+
charLength(message) {
|
|
139
|
+
let len = message.content.length;
|
|
140
|
+
if (message.toolCalls)
|
|
141
|
+
len += JSON.stringify(message.toolCalls).length;
|
|
142
|
+
if (message.toolResults)
|
|
143
|
+
len += JSON.stringify(message.toolResults).length;
|
|
144
|
+
return len;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=counter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counter.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/counter.ts"],"names":[],"mappings":"AAGA,0EAA0E;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O,UAAU,CAAC,OAAgB;QACjC,IAAI,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;QACjC,IAAI,OAAO,CAAC,SAAS;YAAE,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QACvE,IAAI,OAAO,CAAC,WAAW;YAAE,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;QAC3E,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ToolCall, ToolResult, TokenUsage } from "../../../../../kernel/types.js";
|
|
2
|
+
import type { EventBus } from "../../../../event-handler/types.js";
|
|
3
|
+
import type { TraceContext } from "../../../../trace-service/types/span.js";
|
|
4
|
+
import type { ToolContext } from "../../../../tool-hub/types.js";
|
|
5
|
+
import type { AgentLoopDeps, EmitFn } from "../types.js";
|
|
6
|
+
import type { TraceService } from "../../../../trace-service/trace-service.js";
|
|
7
|
+
/**
|
|
8
|
+
* HarnessExecutor — unified dispatch engine for the agent loop
|
|
9
|
+
*
|
|
10
|
+
* Owns all execution logic: policy enforcement, retries, parallel dispatch,
|
|
11
|
+
* and routing between tools and skills.
|
|
12
|
+
*
|
|
13
|
+
* AgentLoop
|
|
14
|
+
* │
|
|
15
|
+
* ▼
|
|
16
|
+
* HarnessExecutor
|
|
17
|
+
* ├── ToolPolicy ──→ allowlist / schema / auth hook
|
|
18
|
+
* ├── Approval gate ──→ InteractionHandler.requestApproval() for "consequential" tools
|
|
19
|
+
* │ and sandbox operations the sandbox requires it for (host writes/exec)
|
|
20
|
+
* ├── ToolManager ──→ get() ──→ ToolHandler.execute()
|
|
21
|
+
* ├── SkillManager ──→ getTool() ──→ skill_view (loads a skill's instructions)
|
|
22
|
+
* └── EventBus ──→ emit lifecycle events
|
|
23
|
+
*
|
|
24
|
+
* ToolManager and SkillManager are registries (get/list only).
|
|
25
|
+
* HarnessExecutor is the single owner of dispatch and error recovery.
|
|
26
|
+
*
|
|
27
|
+
* Skills are not dispatched by name: a skill is instructions, loaded with skill_view.
|
|
28
|
+
* skill_view calls are the "skill" kind — skill events and "skill-dispatch" spans named
|
|
29
|
+
* after the skill — and skip the tool policy and approval gate (they only read).
|
|
30
|
+
*/
|
|
31
|
+
export declare class HarnessExecutor {
|
|
32
|
+
private deps;
|
|
33
|
+
constructor(deps: AgentLoopDeps);
|
|
34
|
+
executeAll(toolCalls: ToolCall[], toolCtx: ToolContext, emit: EmitFn, traceService?: TraceService, traceCtx?: TraceContext): Promise<ToolResult[]>;
|
|
35
|
+
private executeOne;
|
|
36
|
+
/** Result for a tool call the harness stopped waiting on because the run was aborted (A-65). */
|
|
37
|
+
private cancelled;
|
|
38
|
+
private checkPolicy;
|
|
39
|
+
private withTracedSandbox;
|
|
40
|
+
/**
|
|
41
|
+
* Does this call need the user's approval? Returns why (or null). Sandbox tools resolve
|
|
42
|
+
* the agent's sandbox here — that is the "sandbox selection before dispatch" step;
|
|
43
|
+
* when there is no usable sandbox the tool itself reports why, so no approval is asked.
|
|
44
|
+
*/
|
|
45
|
+
private approvalGate;
|
|
46
|
+
private requestApproval;
|
|
47
|
+
private executeWithRetries;
|
|
48
|
+
private runTool;
|
|
49
|
+
private runSkill;
|
|
50
|
+
private backoff;
|
|
51
|
+
buildToolContext(sessionId: string, emit: EmitFn, signal?: AbortSignal): ToolContext;
|
|
52
|
+
createEmitter(eventBus: EventBus, sessionId: string): EmitFn;
|
|
53
|
+
accumulateUsage(total: TokenUsage, step: TokenUsage): void;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=harness-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-executor.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/harness-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