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,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when a message carries tool results — either on `toolResults` (how the
|
|
3
|
+
* agent loop records them) or as a legacy `role: "tool"` message.
|
|
4
|
+
*/
|
|
5
|
+
export function carriesToolResults(message) {
|
|
6
|
+
return message.role === "tool" || (message.toolResults?.length ?? 0) > 0;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Make the model input well-formed with respect to tool calls: every tool
|
|
10
|
+
* result must follow the tool call it answers, and every tool call must get a
|
|
11
|
+
* result. Providers reject anything else (OpenAI: "No tool call found for
|
|
12
|
+
* function call output", Anthropic: "tool_use ids were found without
|
|
13
|
+
* tool_result blocks").
|
|
14
|
+
*
|
|
15
|
+
* The history can break this when compaction summarises a tool call but keeps
|
|
16
|
+
* its result, or when a run stops between a call and its result. Orphaned
|
|
17
|
+
* calls/results are dropped, and a message left with nothing is dropped too.
|
|
18
|
+
* Returns the input array unchanged when nothing needs repairing.
|
|
19
|
+
*/
|
|
20
|
+
export function repairToolPairs(messages) {
|
|
21
|
+
const answered = new Set();
|
|
22
|
+
for (const message of messages) {
|
|
23
|
+
for (const result of message.toolResults ?? [])
|
|
24
|
+
answered.add(result.toolCallId);
|
|
25
|
+
}
|
|
26
|
+
const called = new Set();
|
|
27
|
+
let changed = false;
|
|
28
|
+
const repaired = [];
|
|
29
|
+
for (const message of messages) {
|
|
30
|
+
const toolCalls = message.toolCalls?.filter((call) => answered.has(call.id));
|
|
31
|
+
// Results only count when their call came earlier in the input.
|
|
32
|
+
const toolResults = message.toolResults?.filter((result) => called.has(result.toolCallId));
|
|
33
|
+
for (const call of toolCalls ?? [])
|
|
34
|
+
called.add(call.id);
|
|
35
|
+
const droppedCalls = (message.toolCalls?.length ?? 0) !== (toolCalls?.length ?? 0);
|
|
36
|
+
const droppedResults = (message.toolResults?.length ?? 0) !== (toolResults?.length ?? 0);
|
|
37
|
+
if (!droppedCalls && !droppedResults) {
|
|
38
|
+
repaired.push(message);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
changed = true;
|
|
42
|
+
const next = { ...message };
|
|
43
|
+
if (toolCalls?.length)
|
|
44
|
+
next.toolCalls = toolCalls;
|
|
45
|
+
else
|
|
46
|
+
delete next.toolCalls;
|
|
47
|
+
if (toolResults?.length)
|
|
48
|
+
next.toolResults = toolResults;
|
|
49
|
+
else
|
|
50
|
+
delete next.toolResults;
|
|
51
|
+
if (next.content || next.toolCalls || next.toolResults)
|
|
52
|
+
repaired.push(next);
|
|
53
|
+
}
|
|
54
|
+
return changed ? repaired : messages;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=tool-pairing.js.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-pairing.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/components/tool-pairing.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,OAAO,OAAO,CAAC,IAAI,KAAK,MAAM,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AC,CAAC,CAAC;QACzF,IAAI,CAAC,YAAY,IAAI,CAAC,cAAc,EAAE,CAAC;YACrC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,SAAS;QACX,CAAC;QAED,OAAO,GAAG,IAAI,CAAC;QACf,MAAM,IAAI,GAAY,EAAE,GAAG,OAAO,EAAE,CAAC;QACrC,IAAI,SAAS,EAAE,MAAM;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;YAC7C,OAAO,IAAI,CAAC,SAAS,CAAC;QAC3B,IAAI,WAAW,EAAE,MAAM;YAAE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;;YACnD,OAAO,IAAI,CAAC,WAAW,CAAC;QAE7B,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW;YAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9E,CAAC;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Message } from "../../../../../kernel/types.js";
|
|
2
|
+
import type { ModelOptions } from "../../../../llm-provider-hub/types.js";
|
|
3
|
+
import type { RecalledMemories } from "../../memory-system/memory-system.js";
|
|
4
|
+
import type { ModelManager } from "../../model-manager/model-manager.js";
|
|
5
|
+
import type { ContextAssemblyTraceAttributes } from "../types.js";
|
|
6
|
+
import type { CompactorResult } from "../components/compactor.types.js";
|
|
7
|
+
import type { Counter } from "../components/counter.js";
|
|
8
|
+
/**
|
|
9
|
+
* Append recalled memories to the last system message.
|
|
10
|
+
*/
|
|
11
|
+
export declare function withRecalledMemories(messages: Message[], recalled: RecalledMemories | null): Message[];
|
|
12
|
+
export declare function describeLlmInput(params: {
|
|
13
|
+
iteration: number;
|
|
14
|
+
prepared: Message[];
|
|
15
|
+
compactResult: CompactorResult;
|
|
16
|
+
llmMessages: Message[];
|
|
17
|
+
recalled: RecalledMemories | null;
|
|
18
|
+
options: ModelOptions;
|
|
19
|
+
}, deps: {
|
|
20
|
+
modelManager: ModelManager;
|
|
21
|
+
counter: Counter;
|
|
22
|
+
}): ContextAssemblyTraceAttributes;
|
|
23
|
+
//# sourceMappingURL=llm-input.d.ts.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-input.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAuB,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAChC,OAAO,EAAE,CAgBX;AAMD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,aAAa,EAAE,eAAe,CAAC;IAC/B,WAAW,EAAE,OAAO,EAAE,CAAC;IACvB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,CAAC;CACvB,EACD,IAAI,EAAE;IAAE,YAAY,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACrD,8BAA8B,CAoHhC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Append recalled memories to the last system message.
|
|
3
|
+
*/
|
|
4
|
+
export function withRecalledMemories(messages, recalled) {
|
|
5
|
+
if (!recalled?.content)
|
|
6
|
+
return messages;
|
|
7
|
+
let idx = -1;
|
|
8
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
9
|
+
if (messages[i].role === "system") {
|
|
10
|
+
idx = i;
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if (idx === -1) {
|
|
15
|
+
return [{ role: "system", content: recalled.content }, ...messages];
|
|
16
|
+
}
|
|
17
|
+
const out = [...messages];
|
|
18
|
+
const system = out[idx];
|
|
19
|
+
out[idx] = { ...system, content: `${system.content}\n\n${recalled.content}` };
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
// Build the full breakdown of the exact LLM input for one iteration, for
|
|
23
|
+
// the "context-assembly" trace span. Never throws — tracing must never
|
|
24
|
+
// break the loop (e.g. hub.getPrimary() throws when no provider is
|
|
25
|
+
// registered, so provider resolution is wrapped in try/catch).
|
|
26
|
+
export function describeLlmInput(params, deps) {
|
|
27
|
+
const { iteration, prepared, compactResult, llmMessages, recalled, options } = params;
|
|
28
|
+
const { modelManager, counter } = deps;
|
|
29
|
+
const resolved = modelManager.resolveOptions(options) ?? {};
|
|
30
|
+
const { tools: resolvedTools, ...effectiveOptions } = resolved;
|
|
31
|
+
const tools = (resolvedTools ?? options.tools ?? []).map((t) => ({
|
|
32
|
+
name: t.name,
|
|
33
|
+
description: t.description,
|
|
34
|
+
parameters: t.parameters,
|
|
35
|
+
}));
|
|
36
|
+
let provider;
|
|
37
|
+
try {
|
|
38
|
+
provider = modelManager.resolveProviderName(options.provider);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
provider = undefined;
|
|
42
|
+
}
|
|
43
|
+
// Memory injection mode — mirrors withRecalledMemories's own targeting logic.
|
|
44
|
+
const hasSystemInCompacted = compactResult.messages.some((m) => m.role === "system");
|
|
45
|
+
const memoryInjection = !recalled?.content
|
|
46
|
+
? "none"
|
|
47
|
+
: hasSystemInCompacted
|
|
48
|
+
? "appended-to-system"
|
|
49
|
+
: "new-system-message";
|
|
50
|
+
const memoryBlock = recalled?.content ?? undefined;
|
|
51
|
+
// Index of the LAST system message in the actual model input.
|
|
52
|
+
let systemMessageIndex;
|
|
53
|
+
for (let i = llmMessages.length - 1; i >= 0; i--) {
|
|
54
|
+
if (llmMessages[i].role === "system") {
|
|
55
|
+
systemMessageIndex = i;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// Base system prompt: last system message BEFORE memory injection.
|
|
60
|
+
let baseSystemPrompt;
|
|
61
|
+
for (let i = compactResult.messages.length - 1; i >= 0; i--) {
|
|
62
|
+
if (compactResult.messages[i].role === "system") {
|
|
63
|
+
baseSystemPrompt = compactResult.messages[i].content;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// The summary's index shifts by +1 when a brand-new system message was
|
|
68
|
+
// prepended by memory injection.
|
|
69
|
+
let summaryIndex;
|
|
70
|
+
if (compactResult.compacted && compactResult.summaryIndex !== undefined) {
|
|
71
|
+
summaryIndex =
|
|
72
|
+
compactResult.summaryIndex +
|
|
73
|
+
(memoryInjection === "new-system-message" ? 1 : 0);
|
|
74
|
+
}
|
|
75
|
+
const messages = llmMessages.map((m) => ({
|
|
76
|
+
role: m.role,
|
|
77
|
+
content: m.content,
|
|
78
|
+
timestamp: m.timestamp,
|
|
79
|
+
toolCalls: m.toolCalls?.map((tc) => ({
|
|
80
|
+
id: tc.id,
|
|
81
|
+
name: tc.name,
|
|
82
|
+
arguments: tc.arguments,
|
|
83
|
+
})),
|
|
84
|
+
toolResults: m.toolResults?.map((tr) => ({
|
|
85
|
+
toolCallId: tr.toolCallId,
|
|
86
|
+
content: tr.content,
|
|
87
|
+
isError: tr.isError,
|
|
88
|
+
})),
|
|
89
|
+
estimatedTokens: counter.countTokens(m),
|
|
90
|
+
}));
|
|
91
|
+
const memoryTokens = memoryBlock
|
|
92
|
+
? counter.countTokens({ role: "system", content: memoryBlock })
|
|
93
|
+
: 0;
|
|
94
|
+
const toolTokens = tools.length
|
|
95
|
+
? counter.countTokens({
|
|
96
|
+
role: "system",
|
|
97
|
+
content: JSON.stringify(tools),
|
|
98
|
+
})
|
|
99
|
+
: 0;
|
|
100
|
+
const messagesTokens = messages.reduce((sum, m) => sum + m.estimatedTokens, 0);
|
|
101
|
+
return {
|
|
102
|
+
iteration,
|
|
103
|
+
messageCount: llmMessages.length,
|
|
104
|
+
preparedMessageCount: prepared.length,
|
|
105
|
+
compacted: compactResult.compacted,
|
|
106
|
+
summaryIndex,
|
|
107
|
+
recalledMemories: recalled?.recordIds.length ?? 0,
|
|
108
|
+
memoryRecordIds: recalled?.recordIds ?? [],
|
|
109
|
+
memoryBlock,
|
|
110
|
+
memoryInjection,
|
|
111
|
+
memoryTokens,
|
|
112
|
+
systemMessageIndex,
|
|
113
|
+
baseSystemPrompt,
|
|
114
|
+
messages,
|
|
115
|
+
tools,
|
|
116
|
+
toolNames: tools.map((t) => t.name),
|
|
117
|
+
provider,
|
|
118
|
+
options: effectiveOptions,
|
|
119
|
+
estimatedTokens: {
|
|
120
|
+
messages: messagesTokens,
|
|
121
|
+
memory: memoryTokens,
|
|
122
|
+
tools: toolTokens,
|
|
123
|
+
total: messagesTokens + toolTokens,
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=llm-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-input.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/llm-input.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,UAAU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package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MemorySystem, RecalledMemories } from "../../memory-system/memory-system.js";
|
|
2
|
+
import type { Counter } from "../components/counter.js";
|
|
3
|
+
import type { RunTrace } from "../components/run-trace.js";
|
|
4
|
+
export declare function recallMemories(deps: {
|
|
5
|
+
memorySystem: MemorySystem;
|
|
6
|
+
counter: Counter;
|
|
7
|
+
agentId: string;
|
|
8
|
+
}, userMessage: string, sessionId: string, trace: RunTrace): Promise<RecalledMemories | null>;
|
|
9
|
+
//# sourceMappingURL=memory-recall.d.ts.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-recall.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAK3D,wBAAsB,cAAc,CAClC,IAAI,EAAE;IAAE,YAAY,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACvE,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,GACd,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAoClC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Recall failures must never block the turn — log and continue without memories.
|
|
2
|
+
// Traced as a "memory-recall" span (child of the run span) so recall latency,
|
|
3
|
+
// hit rate, scores and injected size can be measured per turn.
|
|
4
|
+
export async function recallMemories(deps, userMessage, sessionId, trace) {
|
|
5
|
+
if (!deps.memorySystem.recallForTurn)
|
|
6
|
+
return null;
|
|
7
|
+
const recallSpan = trace.span("memory-recall", "memory-recall", {
|
|
8
|
+
queryLength: userMessage.length,
|
|
9
|
+
queryPreview: userMessage,
|
|
10
|
+
});
|
|
11
|
+
try {
|
|
12
|
+
const recalled = await deps.memorySystem.recallForTurn(userMessage, sessionId);
|
|
13
|
+
recallSpan?.end({
|
|
14
|
+
recalledCount: recalled.recordIds.length,
|
|
15
|
+
maxResults: recalled.maxResults,
|
|
16
|
+
hit: recalled.recordIds.length > 0,
|
|
17
|
+
skipped: recalled.skipped,
|
|
18
|
+
indexRebuilt: recalled.indexRebuilt,
|
|
19
|
+
indexRebuildMs: recalled.indexRebuildMs,
|
|
20
|
+
indexedCount: recalled.indexedCount,
|
|
21
|
+
injectedChars: recalled.content?.length ?? 0,
|
|
22
|
+
injectedTokens: recalled.content
|
|
23
|
+
? deps.counter.countTokens({
|
|
24
|
+
role: "system",
|
|
25
|
+
content: recalled.content,
|
|
26
|
+
})
|
|
27
|
+
: 0,
|
|
28
|
+
topScore: recalled.memories[0]?.combinedScore,
|
|
29
|
+
memories: recalled.memories,
|
|
30
|
+
});
|
|
31
|
+
return recalled;
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
35
|
+
recallSpan?.end({ error: message });
|
|
36
|
+
console.warn(`[memory] recall failed for agent ${deps.agentId} session ${sessionId}:`, message);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=memory-recall.js.map
|
package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-recall.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF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AAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,UAAU,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CACV,oCAAoC,IAAI,CAAC,OAAO,YAAY,SAAS,GAAG,EACxE,OAAO,CACR,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { AgentProfile } from "../types.js";
|
|
2
|
+
import type { EventBus } from "../../../event-handler/types.js";
|
|
3
|
+
import type { Message, TokenUsage } from "../../../../kernel/types.js";
|
|
4
|
+
import type { ModelOptions } from "../../../llm-provider-hub/types.js";
|
|
5
|
+
import type { InteractionHandler, ToolPolicy } from "../../../tool-hub/types.js";
|
|
6
|
+
import { SDKEventType } from "../../../event-handler/events.js";
|
|
7
|
+
import type { TraceService } from "../../../trace-service/trace-service.js";
|
|
8
|
+
import type { ContextManager } from "../context-manager/context-manager.js";
|
|
9
|
+
import type { MemorySystem } from "../memory-system/memory-system.js";
|
|
10
|
+
import type { ConversationManager } from "../conversation-manager/conversation-manager.js";
|
|
11
|
+
import type { ModelManager } from "../model-manager/model-manager.js";
|
|
12
|
+
import type { SkillManager } from "../skill-manager/skill-manager.js";
|
|
13
|
+
import type { ToolManager } from "../tool-manager/tool-manager.js";
|
|
14
|
+
import type { SandboxManager } from "../sandbox-manager/sandbox-manager.js";
|
|
15
|
+
import type { ArtifactManager } from "../artifact-manager/artifact-manager.js";
|
|
16
|
+
export declare const MAX_ITERATIONS = 10;
|
|
17
|
+
export declare const MAX_TOOL_RETRIES = 2;
|
|
18
|
+
export declare const RETRY_BACKOFF_MS = 500;
|
|
19
|
+
/** Agent-loop limits fully resolved for a single run/dispatch — no optional fields. */
|
|
20
|
+
export interface ResolvedLoopConfig {
|
|
21
|
+
maxIterations: number;
|
|
22
|
+
maxToolRetries: number;
|
|
23
|
+
retryBackoffMs: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolve an agent's optional loopConfig into concrete limits, falling back
|
|
27
|
+
* to the SDK defaults per-field when a value is missing, non-finite, or
|
|
28
|
+
* below the field's minimum. One invalid field does not reset the others.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveLoopConfig(config: AgentProfile["loopConfig"] | undefined): ResolvedLoopConfig;
|
|
31
|
+
export { SDKEventType };
|
|
32
|
+
export interface AgentLoopDeps {
|
|
33
|
+
modelManager: ModelManager;
|
|
34
|
+
toolManager: ToolManager;
|
|
35
|
+
skillManager: SkillManager;
|
|
36
|
+
contextManager: ContextManager;
|
|
37
|
+
conversationManager: ConversationManager;
|
|
38
|
+
eventBus: EventBus;
|
|
39
|
+
profile: AgentProfile;
|
|
40
|
+
/** Tool policy for authorization checks before dispatch (optional — no policy = allow all) */
|
|
41
|
+
toolPolicy?: ToolPolicy;
|
|
42
|
+
/** Resolved on every dispatch (wins over `toolPolicy`) so ToolHub.setPolicy() applies to running agents. */
|
|
43
|
+
getToolPolicy?: () => ToolPolicy | undefined;
|
|
44
|
+
/** Tools allowed for this agent (from AgentProfile.tools). Empty = no restriction. */
|
|
45
|
+
allowedTools?: string[];
|
|
46
|
+
/** Centralized trace service for span-tree observability (optional — no tracing when absent) */
|
|
47
|
+
traceService?: TraceService;
|
|
48
|
+
memorySystem: MemorySystem;
|
|
49
|
+
/**
|
|
50
|
+
* Host channel to the human user (clarify / approval), resolved lazily on every tool
|
|
51
|
+
* dispatch so a handler registered after the agent was spawned is still picked up.
|
|
52
|
+
* Absent = no interactive user: clarify reports an error and consequential tools are denied.
|
|
53
|
+
*/
|
|
54
|
+
getInteractionHandler?: () => InteractionHandler | undefined;
|
|
55
|
+
/** Resolves the agent's sandbox for file/terminal tools (absent = none). */
|
|
56
|
+
sandboxManager?: SandboxManager;
|
|
57
|
+
/** Scopes the artifact store to this agent for the artifact tools (absent = no artifacts). */
|
|
58
|
+
artifactManager?: ArtifactManager;
|
|
59
|
+
}
|
|
60
|
+
export interface RunResult {
|
|
61
|
+
message: Message;
|
|
62
|
+
usage: TokenUsage;
|
|
63
|
+
iterations: number;
|
|
64
|
+
/** True when the run was stopped through RunOptions.signal instead of ending naturally (A-65). */
|
|
65
|
+
aborted?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export type EmitFn = (type: string, payload: unknown) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Per-run control for Agent.chat/chatStream. Aborting `signal` stops the run
|
|
70
|
+
* at the next safe point, saves what it has so far, and ends a stream with a
|
|
71
|
+
* done chunk marked `aborted: true` (a blocking chat() call resolves with
|
|
72
|
+
* `aborted: true` instead).
|
|
73
|
+
*/
|
|
74
|
+
export interface RunOptions {
|
|
75
|
+
signal?: AbortSignal;
|
|
76
|
+
}
|
|
77
|
+
/** A single message as it appears in the exact array sent to the model. */
|
|
78
|
+
export interface ContextTraceMessage {
|
|
79
|
+
role: Message["role"];
|
|
80
|
+
content: string;
|
|
81
|
+
timestamp?: string;
|
|
82
|
+
toolCalls?: Array<{
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
arguments: Record<string, unknown>;
|
|
86
|
+
}>;
|
|
87
|
+
toolResults?: Array<{
|
|
88
|
+
toolCallId: string;
|
|
89
|
+
content: string;
|
|
90
|
+
isError?: boolean;
|
|
91
|
+
}>;
|
|
92
|
+
estimatedTokens: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Full breakdown of the exact input handed to ModelManager.chat()/stream()
|
|
96
|
+
* for one iteration. Recorded on the "context-assembly" span so the trace
|
|
97
|
+
* equals the model input, not a stale pre-compaction/pre-memory snapshot.
|
|
98
|
+
*/
|
|
99
|
+
export interface ContextAssemblyTraceAttributes {
|
|
100
|
+
iteration: number;
|
|
101
|
+
/** length of `messages` — the array sent to the model */
|
|
102
|
+
messageCount: number;
|
|
103
|
+
/** length after context middleware, before compaction */
|
|
104
|
+
preparedMessageCount: number;
|
|
105
|
+
compacted: boolean;
|
|
106
|
+
/** index of the summary message in `messages`, set only when compacted */
|
|
107
|
+
summaryIndex?: number;
|
|
108
|
+
recalledMemories: number;
|
|
109
|
+
memoryRecordIds: string[];
|
|
110
|
+
memoryBlock?: string;
|
|
111
|
+
memoryInjection: "appended-to-system" | "new-system-message" | "none";
|
|
112
|
+
memoryTokens: number;
|
|
113
|
+
/** index of the LAST system message in `messages` — the one withRecalledMemories targets or creates */
|
|
114
|
+
systemMessageIndex?: number;
|
|
115
|
+
/** content of the last system message in the post-compaction array, BEFORE memory injection */
|
|
116
|
+
baseSystemPrompt?: string;
|
|
117
|
+
messages: ContextTraceMessage[];
|
|
118
|
+
tools: Array<{
|
|
119
|
+
name: string;
|
|
120
|
+
description: string;
|
|
121
|
+
parameters: unknown;
|
|
122
|
+
}>;
|
|
123
|
+
toolNames: string[];
|
|
124
|
+
provider?: string;
|
|
125
|
+
/** effective ModelOptions after ModelManager's defaults merge, without `tools` */
|
|
126
|
+
options: Omit<ModelOptions, "tools">;
|
|
127
|
+
estimatedTokens: {
|
|
128
|
+
messages: number;
|
|
129
|
+
memory: number;
|
|
130
|
+
tools: number;
|
|
131
|
+
/** messages + tools — memory is already counted inside messages */
|
|
132
|
+
total: number;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/agent-loop/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EACV,OAAO,EAIP,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EA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@@
|
|
|
1
|
+
import { SDKEventType } from "../../../event-handler/events.js";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Configuration
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Defaults — overridable per agent via AgentProfile.loopConfig (see resolveLoopConfig below).
|
|
6
|
+
export const MAX_ITERATIONS = 10;
|
|
7
|
+
export const MAX_TOOL_RETRIES = 2;
|
|
8
|
+
export const RETRY_BACKOFF_MS = 500;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve an agent's optional loopConfig into concrete limits, falling back
|
|
11
|
+
* to the SDK defaults per-field when a value is missing, non-finite, or
|
|
12
|
+
* below the field's minimum. One invalid field does not reset the others.
|
|
13
|
+
*/
|
|
14
|
+
export function resolveLoopConfig(config) {
|
|
15
|
+
const resolveField = (value, min, fallback) => {
|
|
16
|
+
if (typeof value !== "number" || !Number.isFinite(value))
|
|
17
|
+
return fallback;
|
|
18
|
+
const floored = Math.floor(value);
|
|
19
|
+
return floored >= min ? floored : fallback;
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
maxIterations: resolveField(config?.maxIterations, 1, MAX_ITERATIONS),
|
|
23
|
+
maxToolRetries: resolveField(config?.maxToolRetries, 0, MAX_TOOL_RETRIES),
|
|
24
|
+
retryBackoffMs: resolveField(config?.retryBackoffMs, 0, RETRY_BACKOFF_MS),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// SDKEventType re-exported for convenience within agent-loop
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
export { SDKEventType };
|
|
31
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/agent-loop/types.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAehE,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,8FAA8F;AAC9F,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AASpC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAA8C;IAE9C,MAAM,YAAY,GAAG,CACnB,KAAyB,EACzB,GAAW,EACX,QAAgB,EACR,EAAE;QACV,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;QAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7C,CAAC,CAAC;IAEF,OAAO;QACL,aAAa,EAAE,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,CAAC;QACrE,cAAc,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACzE,cAAc,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,gBAAgB,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,6DAA6D;AAC7D,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { AgentProfile } from "./types.js";
|
|
2
|
+
import type { ModelOptions } from "../../llm-provider-hub/types.js";
|
|
3
|
+
import type { ScheduledJobHandler } from "./scheduled-job-manager/types.js";
|
|
4
|
+
import type { Message, ModelResponse, Session, SessionFilter, StreamChunk } from "../../../kernel/types.js";
|
|
5
|
+
import type { AgentCore } from "../../../agent-core.js";
|
|
6
|
+
import type { RunOptions, RunResult } from "./agent-loop/types.js";
|
|
7
|
+
import type { SandboxSelection } from "../../sandbox-hub/types/policy.js";
|
|
8
|
+
import type { SandboxView } from "../../sandbox-hub/types/sandbox.js";
|
|
9
|
+
import type { ArtifactView } from "../../artifact-hub/types/artifact.js";
|
|
10
|
+
/**
|
|
11
|
+
* The minimum unit and the most important concept here, this Agent will get everything done here.
|
|
12
|
+
* This is the harness layer wrap around LLM
|
|
13
|
+
*/
|
|
14
|
+
export declare class Agent {
|
|
15
|
+
readonly profile: AgentProfile;
|
|
16
|
+
private agentLoop;
|
|
17
|
+
private contextManager;
|
|
18
|
+
private conversationManager;
|
|
19
|
+
private modelManager;
|
|
20
|
+
private scheduledJobManager;
|
|
21
|
+
private skillManager;
|
|
22
|
+
private toolManager;
|
|
23
|
+
private sandboxManager;
|
|
24
|
+
private artifactManager;
|
|
25
|
+
private memorySystem;
|
|
26
|
+
constructor(agentCore: AgentCore, profile: AgentProfile);
|
|
27
|
+
startSession(metadata?: Record<string, unknown>, llmModel?: string): Promise<Session>;
|
|
28
|
+
loadSession(sessionId: string): Promise<Session | null>;
|
|
29
|
+
listSessions(filter?: SessionFilter): Promise<Session[]>;
|
|
30
|
+
listProviders(): string[];
|
|
31
|
+
/**
|
|
32
|
+
* `runOptions` (A-65) is a per-call control, separate from `options`
|
|
33
|
+
* (model/inference overrides) — aborting `runOptions.signal` stops this
|
|
34
|
+
* run at the next safe point instead of letting it run to completion.
|
|
35
|
+
*/
|
|
36
|
+
chat(message: string, options?: ModelOptions, runOptions?: RunOptions): Promise<RunResult>;
|
|
37
|
+
/** `runOptions` (A-65): see chat()'s doc comment above. */
|
|
38
|
+
chatStream(message: string, options?: ModelOptions, runOptions?: RunOptions): AsyncIterable<StreamChunk>;
|
|
39
|
+
/**
|
|
40
|
+
* One model call with this agent's provider, model and inference defaults —
|
|
41
|
+
* the same resolution chat()/chatStream() use — but outside the agent loop:
|
|
42
|
+
* no system prompt, tools, skills, memory, conversation history or trace
|
|
43
|
+
* spans, and nothing is added to any session.
|
|
44
|
+
* For side tasks such as writing a session title or a summary.
|
|
45
|
+
*
|
|
46
|
+
* `session` applies that session's model override, as chat() does for the
|
|
47
|
+
* active session; it does not have to be the active one.
|
|
48
|
+
*/
|
|
49
|
+
complete(messages: Message[], options?: ModelOptions, session?: Session): Promise<ModelResponse>;
|
|
50
|
+
private mergeSessionModel;
|
|
51
|
+
/** Replace the agent's tool allowlist and propagate to the internal ToolManager. */
|
|
52
|
+
updateTools(toolNames: string[]): void;
|
|
53
|
+
/** Update the agent's default provider at runtime. */
|
|
54
|
+
updateProvider(provider: string | undefined): void;
|
|
55
|
+
/** Update the agent's default LLM model at runtime. */
|
|
56
|
+
updateModel(model: string | undefined): void;
|
|
57
|
+
/** Update the agent's default inference config (maxTokens/temperature/topP/stopSequences) at runtime. */
|
|
58
|
+
updateInferenceConfig(config: AgentProfile["inferenceConfig"]): void;
|
|
59
|
+
/** Update the agent's loop limits (maxIterations/maxToolRetries/retryBackoffMs) at runtime. */
|
|
60
|
+
updateLoopConfig(config: AgentProfile["loopConfig"]): void;
|
|
61
|
+
/** Update the agent's memory config and propagate to the live MemorySystem. */
|
|
62
|
+
updateMemoryConfig(config: AgentProfile["memory"]): void;
|
|
63
|
+
/** Replace the agent's skill allowlist and propagate to the internal SkillManager. */
|
|
64
|
+
updateSkills(skillNames: string[]): void;
|
|
65
|
+
/**
|
|
66
|
+
* Get existed or create new
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
getSandbox(): Promise<SandboxView>;
|
|
70
|
+
/**
|
|
71
|
+
* Change where the agent's file/terminal tools run. Validated against the hub policy
|
|
72
|
+
* first (throws SandboxError); applies to the next tool call. An own sandbox whose
|
|
73
|
+
* config changed is recreated on next use, keeping its files.
|
|
74
|
+
*/
|
|
75
|
+
updateSandbox(selection: SandboxSelection | undefined): void;
|
|
76
|
+
/**
|
|
77
|
+
* This agent's artifacts. Pass the session doing the writing to stamp it on new
|
|
78
|
+
* versions; reads never depend on it (artifacts outlive the session that made them).
|
|
79
|
+
*/
|
|
80
|
+
artifacts(sessionId?: string): ArtifactView;
|
|
81
|
+
useScheduledJob(job: ScheduledJobHandler): void;
|
|
82
|
+
getScheduledJob(name: string): ScheduledJobHandler | undefined;
|
|
83
|
+
getScheduledJobs(): ScheduledJobHandler[];
|
|
84
|
+
startScheduledJob(name: string): void;
|
|
85
|
+
stopScheduledJob(name: string): void;
|
|
86
|
+
startAllScheduledJobs(): void;
|
|
87
|
+
stopAllScheduledJobs(): void;
|
|
88
|
+
/** Stop the agent. `removeData` (the agent is being deleted) also deletes its own sandbox's files. */
|
|
89
|
+
dispose(opts?: {
|
|
90
|
+
removeData?: boolean;
|
|
91
|
+
}): Promise<void>;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-agent-orchestration/agent/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AASnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE;;;GAGG;AACH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