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":"logical-path.js","sourceRoot":"","sources":["../../../src/components/sandbox-hub/logical-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAGpE,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,gBAAgB;AAChB,qFAAqF;AACrF,mEAAmE;AACnE,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,iEAAiE;AACjE,8EAA8E;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAC3C,8DAA8D;AAC9D,wDAAwD;AACxD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,cAAc,SAAS,CAAC;AAErD,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAE3D,2EAA2E;AAC3E,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAA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AAK,EAAE,GAAG,CAAC,CAAC;IACjD,IAAI,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACjE,MAAM,IAAI,YAAY,CACpB,IAAI,KAAK,iEAAiE,cAAc,eAAe,EACvG,aAAa,EACb,SAAS,CACV,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,KAAK,EAAE,IAAI,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpI,IAAI,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE5F,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,YAAY,CACpB,IAAI,KAAK,kDAAkD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAC9E,aAAa,EACb,SAAS,CACV,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { SandboxKind, SandboxTraits, SandboxView } from "./types/sandbox.js";
|
|
2
|
+
import type { SandboxSpec, SandboxProvider } from "./types/provider.js";
|
|
3
|
+
import type { OwnSandboxConfig, SandboxApprovalPolicy, SandboxHubPolicy, SandboxOperation, SandboxSelection } from "./types/policy.js";
|
|
4
|
+
/**
|
|
5
|
+
* Global hub for sandboxes — like LLMProviderHub / ToolHub, AgentCore owns one.
|
|
6
|
+
*
|
|
7
|
+
* SandboxHub (shared / general concerns)
|
|
8
|
+
* ├─ sandboxProviders one factory per kind (docker now; host, remote later)
|
|
9
|
+
* └─ shared sandbox the one sandbox every agent uses by default
|
|
10
|
+
*
|
|
11
|
+
* Own sandboxes (one per agent) are managed by each agent's SandboxManager.
|
|
12
|
+
* Sandboxes that several agents share but that are NOT the shared one (a host folder,
|
|
13
|
+
* a user's own machine over a remote runner) are deferred: they need an instance
|
|
14
|
+
* registry keyed by target — see the note on SandboxSelection in types/policy.ts.
|
|
15
|
+
* The hub provides buildOwnSandboxSpec() to validate own configs against policy,
|
|
16
|
+
* and releaseAgentData() to clean up an agent's data in the shared sandbox when it is deleted
|
|
17
|
+
* (its own sandbox's data is deleted by SandboxManager.release({ removeData: true })).
|
|
18
|
+
*
|
|
19
|
+
* The shared sandbox is created lazily on the first tool call and cached;
|
|
20
|
+
* a failed creation is not cached, so the next call retries.
|
|
21
|
+
*/
|
|
22
|
+
export declare class SandboxHub {
|
|
23
|
+
private sandboxProviders;
|
|
24
|
+
private sharedSandboxSpec?;
|
|
25
|
+
private policy;
|
|
26
|
+
/** The running shared sandbox, created on first use. A failed creation is cleared, so the next call retries. */
|
|
27
|
+
private sharedSandbox?;
|
|
28
|
+
/**
|
|
29
|
+
* policy for actions need approval (like write action on host sandbox)
|
|
30
|
+
*/
|
|
31
|
+
private approvalPolicy;
|
|
32
|
+
register(provider: SandboxProvider): void;
|
|
33
|
+
getSandboxProvider(kind: SandboxKind): SandboxProvider | undefined;
|
|
34
|
+
/** The sandbox every agent uses by default. Must be set before it is first used. */
|
|
35
|
+
configureShared(spec: SandboxSpec): void;
|
|
36
|
+
get sharedConfigured(): boolean;
|
|
37
|
+
setPolicy(policy: Partial<SandboxHubPolicy>): void;
|
|
38
|
+
getPolicy(): Readonly<SandboxHubPolicy>;
|
|
39
|
+
/** Kinds an own sandbox may use here: the default first, then the others the policy allows. */
|
|
40
|
+
allowedOwnKinds(): SandboxKind[];
|
|
41
|
+
/** Which sandbox operations need user approval in which sandboxes. Default: defaultSandboxApprovalPolicy. */
|
|
42
|
+
setApprovalPolicy(policy: SandboxApprovalPolicy): void;
|
|
43
|
+
/** Does `operation` in a sandbox with these traits need explicit user approval? */
|
|
44
|
+
requiresApproval(traits: SandboxTraits, operation: SandboxOperation): boolean;
|
|
45
|
+
/** Validate a profile-supplied own-sandbox config against the hub policy and return the spec. */
|
|
46
|
+
buildOwnSandboxSpec(own: OwnSandboxConfig): SandboxSpec;
|
|
47
|
+
/**
|
|
48
|
+
* Check a profile's selection without creating anything — lets the server reject a
|
|
49
|
+
* bad agent config at save time. Throws SandboxError ("policy_denied", "not_configured",
|
|
50
|
+
* "disabled", "provider_unavailable").
|
|
51
|
+
*/
|
|
52
|
+
validateSelection(agentId: string, selection: SandboxSelection | undefined): void;
|
|
53
|
+
/** The shared sandbox an agent works in, created on first use. Own sandboxes go through SandboxManager. */
|
|
54
|
+
resolve(agentId: string, selection: SandboxSelection | undefined): Promise<SandboxView>;
|
|
55
|
+
/**
|
|
56
|
+
* Clean up an agent's data when it is deleted. Removes:
|
|
57
|
+
* - The agent's folder inside the shared sandbox
|
|
58
|
+
*
|
|
59
|
+
* Own-sandbox data (running or cold) is removed by SandboxManager.release({ removeData: true }).
|
|
60
|
+
*/
|
|
61
|
+
releaseAgentData(agentId: string): Promise<void>;
|
|
62
|
+
/** Stop the shared sandbox. Files are kept (volumes / folders) for the next start. */
|
|
63
|
+
dispose(): Promise<void>;
|
|
64
|
+
private sharedSandboxId;
|
|
65
|
+
/** The spec a selection asks for. Own specs are checked against the policy; "none" throws. */
|
|
66
|
+
private specFor;
|
|
67
|
+
private getOrCreateShared;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=sandbox-hub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-hub.d.ts","sourceRoot":"","sources":["../../../src/components/sandbox-hub/sandbox-hub.ts"],"names":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AAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI,CAQhF;IAED,2GAA2G;IACrG,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAa5F;IAID;;;;;OAKG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBrD;IAED,sFAAsF;IAChF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAK7B;IAID,OAAO,CAAC,eAAe;IAIvB,8FAA8F;IAC9F,OAAO,CAAC,OAAO;YAkBD,iBAAiB;CAoBhC"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { SandboxError, asSandboxError } from "../../kernel/errors/sandbox-error.js";
|
|
2
|
+
import { assertSafeAgentId } from "./logical-path.js";
|
|
3
|
+
import { defaultSandboxApprovalPolicy } from "./approval-policy.js";
|
|
4
|
+
const DEFAULT_POLICY = {
|
|
5
|
+
allowedImages: [],
|
|
6
|
+
maxLimits: { cpus: 2, memoryMb: 2048, pids: 256 },
|
|
7
|
+
allowedNetwork: ["none"],
|
|
8
|
+
ownKinds: ["docker"],
|
|
9
|
+
defaultOwnKind: "docker",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Global hub for sandboxes — like LLMProviderHub / ToolHub, AgentCore owns one.
|
|
13
|
+
*
|
|
14
|
+
* SandboxHub (shared / general concerns)
|
|
15
|
+
* ├─ sandboxProviders one factory per kind (docker now; host, remote later)
|
|
16
|
+
* └─ shared sandbox the one sandbox every agent uses by default
|
|
17
|
+
*
|
|
18
|
+
* Own sandboxes (one per agent) are managed by each agent's SandboxManager.
|
|
19
|
+
* Sandboxes that several agents share but that are NOT the shared one (a host folder,
|
|
20
|
+
* a user's own machine over a remote runner) are deferred: they need an instance
|
|
21
|
+
* registry keyed by target — see the note on SandboxSelection in types/policy.ts.
|
|
22
|
+
* The hub provides buildOwnSandboxSpec() to validate own configs against policy,
|
|
23
|
+
* and releaseAgentData() to clean up an agent's data in the shared sandbox when it is deleted
|
|
24
|
+
* (its own sandbox's data is deleted by SandboxManager.release({ removeData: true })).
|
|
25
|
+
*
|
|
26
|
+
* The shared sandbox is created lazily on the first tool call and cached;
|
|
27
|
+
* a failed creation is not cached, so the next call retries.
|
|
28
|
+
*/
|
|
29
|
+
export class SandboxHub {
|
|
30
|
+
sandboxProviders = new Map();
|
|
31
|
+
sharedSandboxSpec;
|
|
32
|
+
policy = { ...DEFAULT_POLICY, maxLimits: { ...DEFAULT_POLICY.maxLimits }, ownKinds: [...DEFAULT_POLICY.ownKinds] };
|
|
33
|
+
/** The running shared sandbox, created on first use. A failed creation is cleared, so the next call retries. */
|
|
34
|
+
sharedSandbox;
|
|
35
|
+
/**
|
|
36
|
+
* policy for actions need approval (like write action on host sandbox)
|
|
37
|
+
*/
|
|
38
|
+
approvalPolicy = defaultSandboxApprovalPolicy;
|
|
39
|
+
// ── Registration (host code only) ──
|
|
40
|
+
register(provider) {
|
|
41
|
+
if (this.sandboxProviders.has(provider.kind)) {
|
|
42
|
+
throw new Error(`A sandbox provider for "${provider.kind}" is already registered`);
|
|
43
|
+
}
|
|
44
|
+
this.sandboxProviders.set(provider.kind, provider);
|
|
45
|
+
}
|
|
46
|
+
getSandboxProvider(kind) {
|
|
47
|
+
return this.sandboxProviders.get(kind);
|
|
48
|
+
}
|
|
49
|
+
/** The sandbox every agent uses by default. Must be set before it is first used. */
|
|
50
|
+
configureShared(spec) {
|
|
51
|
+
if (this.sharedSandbox) {
|
|
52
|
+
throw new Error("The shared sandbox is already running — configure it before the first agent uses it");
|
|
53
|
+
}
|
|
54
|
+
this.sharedSandboxSpec = { ...spec };
|
|
55
|
+
}
|
|
56
|
+
get sharedConfigured() {
|
|
57
|
+
return this.sharedSandboxSpec !== undefined;
|
|
58
|
+
}
|
|
59
|
+
setPolicy(policy) {
|
|
60
|
+
this.policy = {
|
|
61
|
+
...this.policy,
|
|
62
|
+
...policy,
|
|
63
|
+
maxLimits: { ...this.policy.maxLimits, ...policy.maxLimits },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
getPolicy() {
|
|
67
|
+
return this.policy;
|
|
68
|
+
}
|
|
69
|
+
/** Kinds an own sandbox may use here: the default first, then the others the policy allows. */
|
|
70
|
+
allowedOwnKinds() {
|
|
71
|
+
return [...new Set([this.policy.defaultOwnKind, ...this.policy.ownKinds])];
|
|
72
|
+
}
|
|
73
|
+
/** Which sandbox operations need user approval in which sandboxes. Default: defaultSandboxApprovalPolicy. */
|
|
74
|
+
setApprovalPolicy(policy) {
|
|
75
|
+
this.approvalPolicy = policy;
|
|
76
|
+
}
|
|
77
|
+
/** Does `operation` in a sandbox with these traits need explicit user approval? */
|
|
78
|
+
requiresApproval(traits, operation) {
|
|
79
|
+
return this.approvalPolicy(traits, operation);
|
|
80
|
+
}
|
|
81
|
+
// ── Own sandbox spec (validation for SandboxManager) ──
|
|
82
|
+
/** Validate a profile-supplied own-sandbox config against the hub policy and return the spec. */
|
|
83
|
+
buildOwnSandboxSpec(own) {
|
|
84
|
+
const { policy } = this;
|
|
85
|
+
const kind = own.kind ?? policy.defaultOwnKind;
|
|
86
|
+
if (!this.allowedOwnKinds().includes(kind)) {
|
|
87
|
+
throw new SandboxError(`Own sandboxes of kind "${kind}" are not allowed on this server`, "policy_denied");
|
|
88
|
+
}
|
|
89
|
+
// A host folder runs on the machine itself — no image, network or resource settings.
|
|
90
|
+
if (kind === "host")
|
|
91
|
+
return { kind };
|
|
92
|
+
const image = own.image ?? this.sharedSandboxSpec?.image;
|
|
93
|
+
if (own.image !== undefined && own.image !== this.sharedSandboxSpec?.image && !policy.allowedImages.includes(own.image)) {
|
|
94
|
+
throw new SandboxError(`Image "${own.image}" is not in the allowed image list`, "policy_denied");
|
|
95
|
+
}
|
|
96
|
+
const network = own.network ?? "none";
|
|
97
|
+
if (!policy.allowedNetwork.includes(network)) {
|
|
98
|
+
throw new SandboxError(`Network mode "${network}" is not allowed for agent sandboxes`, "policy_denied");
|
|
99
|
+
}
|
|
100
|
+
const limits = {};
|
|
101
|
+
for (const key of ["cpus", "memoryMb", "pids"]) {
|
|
102
|
+
const value = own.limits?.[key];
|
|
103
|
+
if (typeof value === "number" && Number.isFinite(value) && value > 0) {
|
|
104
|
+
limits[key] = Math.min(value, policy.maxLimits[key]);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
kind,
|
|
109
|
+
...(image ? { image } : {}),
|
|
110
|
+
network,
|
|
111
|
+
limits: { ...policy.maxLimits, ...limits },
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
// ── Selection ──
|
|
115
|
+
/**
|
|
116
|
+
* Check a profile's selection without creating anything — lets the server reject a
|
|
117
|
+
* bad agent config at save time. Throws SandboxError ("policy_denied", "not_configured",
|
|
118
|
+
* "disabled", "provider_unavailable").
|
|
119
|
+
*/
|
|
120
|
+
validateSelection(agentId, selection) {
|
|
121
|
+
// "none" is always a valid choice — it only fails when a tool asks for a sandbox.
|
|
122
|
+
assertSafeAgentId(agentId);
|
|
123
|
+
if (selection === "none")
|
|
124
|
+
return;
|
|
125
|
+
const spec = this.specFor(selection);
|
|
126
|
+
if (!this.sandboxProviders.has(spec.kind)) {
|
|
127
|
+
throw new SandboxError(`No sandbox provider is registered for "${spec.kind}"`, "provider_unavailable");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** The shared sandbox an agent works in, created on first use. Own sandboxes go through SandboxManager. */
|
|
131
|
+
async resolve(agentId, selection) {
|
|
132
|
+
const choice = selection ?? "shared";
|
|
133
|
+
if (typeof choice === "object" && "own" in choice) {
|
|
134
|
+
throw new Error("Own sandboxes are managed by the agent's SandboxManager, not SandboxHub.resolve()");
|
|
135
|
+
}
|
|
136
|
+
assertSafeAgentId(agentId);
|
|
137
|
+
const spec = this.specFor(selection);
|
|
138
|
+
const managed = await this.getOrCreateShared(spec);
|
|
139
|
+
try {
|
|
140
|
+
return await managed.forAgent(agentId);
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
throw asSandboxError(error, this.sharedSandboxId(spec));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// ── Lifecycle ──
|
|
147
|
+
/**
|
|
148
|
+
* Clean up an agent's data when it is deleted. Removes:
|
|
149
|
+
* - The agent's folder inside the shared sandbox
|
|
150
|
+
*
|
|
151
|
+
* Own-sandbox data (running or cold) is removed by SandboxManager.release({ removeData: true }).
|
|
152
|
+
*/
|
|
153
|
+
async releaseAgentData(agentId) {
|
|
154
|
+
assertSafeAgentId(agentId);
|
|
155
|
+
// Remove agent's folder from the shared sandbox
|
|
156
|
+
if (this.sharedSandboxSpec) {
|
|
157
|
+
const sharedId = this.sharedSandboxId(this.sharedSandboxSpec);
|
|
158
|
+
const shared = await this.sharedSandbox?.catch(() => null);
|
|
159
|
+
if (shared) {
|
|
160
|
+
await shared.removeAgentData?.(agentId);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
await this.sandboxProviders.get(this.sharedSandboxSpec.kind)?.removeData?.(this.sharedSandboxSpec, { id: sharedId, tenancy: "shared" }, { agentId });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/** Stop the shared sandbox. Files are kept (volumes / folders) for the next start. */
|
|
168
|
+
async dispose() {
|
|
169
|
+
const pending = this.sharedSandbox;
|
|
170
|
+
this.sharedSandbox = undefined;
|
|
171
|
+
const env = await pending?.catch(() => null);
|
|
172
|
+
await env?.dispose({ removeData: false }).catch(() => { });
|
|
173
|
+
}
|
|
174
|
+
// ── Internals ──
|
|
175
|
+
sharedSandboxId(spec) {
|
|
176
|
+
return `${spec.kind}:shared`;
|
|
177
|
+
}
|
|
178
|
+
/** The spec a selection asks for. Own specs are checked against the policy; "none" throws. */
|
|
179
|
+
specFor(selection) {
|
|
180
|
+
const choice = selection ?? "shared";
|
|
181
|
+
if (choice === "none") {
|
|
182
|
+
throw new SandboxError("This agent has no sandbox (sandbox: \"none\")", "disabled");
|
|
183
|
+
}
|
|
184
|
+
if (choice === "shared") {
|
|
185
|
+
if (!this.sharedSandboxSpec) {
|
|
186
|
+
throw new SandboxError("No shared sandbox is configured on this server", "not_configured");
|
|
187
|
+
}
|
|
188
|
+
return this.sharedSandboxSpec;
|
|
189
|
+
}
|
|
190
|
+
if (typeof choice === "object" && choice !== null && "own" in choice) {
|
|
191
|
+
return this.buildOwnSandboxSpec(choice.own ?? {});
|
|
192
|
+
}
|
|
193
|
+
throw new SandboxError("Unrecognised sandbox selection", "policy_denied");
|
|
194
|
+
}
|
|
195
|
+
async getOrCreateShared(spec) {
|
|
196
|
+
const cached = this.sharedSandbox;
|
|
197
|
+
if (cached)
|
|
198
|
+
return cached;
|
|
199
|
+
const id = this.sharedSandboxId(spec);
|
|
200
|
+
const provider = this.sandboxProviders.get(spec.kind);
|
|
201
|
+
if (!provider) {
|
|
202
|
+
throw new SandboxError(`No sandbox provider is registered for "${spec.kind}"`, "provider_unavailable", id);
|
|
203
|
+
}
|
|
204
|
+
const creating = provider
|
|
205
|
+
.create(spec, { id, tenancy: "shared" })
|
|
206
|
+
.catch((error) => {
|
|
207
|
+
// Not cached — the next call retries (e.g. Docker Desktop was still starting).
|
|
208
|
+
if (this.sharedSandbox === creating)
|
|
209
|
+
this.sharedSandbox = undefined;
|
|
210
|
+
throw asSandboxError(error, id);
|
|
211
|
+
});
|
|
212
|
+
this.sharedSandbox = creating;
|
|
213
|
+
return creating;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=sandbox-hub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-hub.js","sourceRoot":"","sources":["../../../src/components/sandbox-hub/sandbox-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,iBAA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C,CAAC,KAAc,EAAE,EAAE;YACxB,+EAA+E;YAC/E,IAAI,IAAI,CAAC,aAAa,KAAK,QAAQ;gBAAE,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;YACpE,MAAM,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACL,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SpanHandle } from "../trace-service/types/span.js";
|
|
2
|
+
import type { SandboxView } from "./types/sandbox.js";
|
|
3
|
+
/** Starts a "sandbox-op" span — bound by the caller to a trace context. */
|
|
4
|
+
export type SandboxSpanStarter = (operation: string, attributes: Record<string, unknown>) => SpanHandle;
|
|
5
|
+
/**
|
|
6
|
+
* Wrap a sandbox so every operation is recorded as a "sandbox-op" span.
|
|
7
|
+
* Spans carry the path or a command SUMMARY (program + argument count) and result
|
|
8
|
+
* metadata — never file contents, command arguments or command output, which may
|
|
9
|
+
* hold secrets (A-60 requirement).
|
|
10
|
+
*/
|
|
11
|
+
export declare function withTracing(env: SandboxView, startSpan: SandboxSpanStarter, context?: {
|
|
12
|
+
agentId?: string;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
}): SandboxView;
|
|
15
|
+
//# sourceMappingURL=traced-sandbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traced-sandbox.d.ts","sourceRoot":"","sources":["../../../src/components/sandbox-hub/traced-sandbox.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,UAAU,CAAC;AAExG;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACrD,WAAW,CA6Eb"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { SandboxError } from "../../kernel/errors/sandbox-error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Wrap a sandbox so every operation is recorded as a "sandbox-op" span.
|
|
4
|
+
* Spans carry the path or a command SUMMARY (program + argument count) and result
|
|
5
|
+
* metadata — never file contents, command arguments or command output, which may
|
|
6
|
+
* hold secrets (A-60 requirement).
|
|
7
|
+
*/
|
|
8
|
+
export function withTracing(env, startSpan, context = {}) {
|
|
9
|
+
const base = {
|
|
10
|
+
sandboxId: env.id,
|
|
11
|
+
kind: env.traits.kind,
|
|
12
|
+
tenancy: env.traits.tenancy,
|
|
13
|
+
agentId: context.agentId,
|
|
14
|
+
sessionId: context.sessionId,
|
|
15
|
+
};
|
|
16
|
+
async function traced(operation, attributes, run, summarize) {
|
|
17
|
+
const span = startSpan(operation, { ...base, operation, ...attributes });
|
|
18
|
+
try {
|
|
19
|
+
const result = await run();
|
|
20
|
+
span.end(summarize(result));
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
span.end({
|
|
25
|
+
error: error instanceof SandboxError ? error.code : "error",
|
|
26
|
+
message: error instanceof Error ? error.message : String(error),
|
|
27
|
+
});
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
id: env.id,
|
|
33
|
+
traits: env.traits,
|
|
34
|
+
capabilities: env.capabilities,
|
|
35
|
+
limits: env.limits,
|
|
36
|
+
workingDir: env.workingDir,
|
|
37
|
+
roots: env.roots,
|
|
38
|
+
readFile: (path, opts) => traced("fs.read", { path }, () => env.readFile(path, opts), (r) => ({
|
|
39
|
+
path: r.path, bytes: r.size, truncated: r.truncated,
|
|
40
|
+
})),
|
|
41
|
+
writeFile: (path, content, opts) => traced("fs.write", { path, bytes: content.length }, () => env.writeFile(path, content, opts), (r) => ({
|
|
42
|
+
path: r.path, bytes: r.bytes, created: r.created,
|
|
43
|
+
})),
|
|
44
|
+
stat: (path, opts) => traced("fs.stat", { path }, () => env.stat(path, opts), (r) => ({ exists: r !== null, type: r?.type })),
|
|
45
|
+
list: (path, opts) => traced("fs.list", { path, recursive: opts?.recursive ?? false }, () => env.list(path, opts), (r) => ({
|
|
46
|
+
entries: r.entries.length, truncated: r.truncated,
|
|
47
|
+
})),
|
|
48
|
+
search: (query, opts) => traced("fs.search", { path: query.path, literal: query.literal ?? true }, () => env.search(query, opts), (r) => ({
|
|
49
|
+
matches: r.matches.length, truncated: r.truncated,
|
|
50
|
+
})),
|
|
51
|
+
exec: (request, opts) => traced("exec", {
|
|
52
|
+
command: request.shell ? "shell" : request.command[0],
|
|
53
|
+
argCount: Math.max(0, request.command.length - 1),
|
|
54
|
+
cwd: request.cwd,
|
|
55
|
+
timeoutMs: request.timeoutMs,
|
|
56
|
+
}, () => env.exec(request, opts), (r) => ({
|
|
57
|
+
exitCode: r.exitCode,
|
|
58
|
+
timedOut: r.timedOut,
|
|
59
|
+
cancelled: r.cancelled,
|
|
60
|
+
truncated: r.truncated,
|
|
61
|
+
stdoutBytes: r.stdout.length,
|
|
62
|
+
stderrBytes: r.stderr.length,
|
|
63
|
+
durationMs: r.durationMs,
|
|
64
|
+
// A failed command is still a successful sandbox operation — flag, don't mark the span as error.
|
|
65
|
+
failed: r.exitCode !== 0,
|
|
66
|
+
})),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=traced-sandbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traced-sandbox.js","sourceRoot":"","sources":["../../../src/components/s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AQ,EAAE,CAAC,CAAC,QAAQ;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM;YAC5B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM;YAC5B,UAAU,EAAE,CAAC,CAAC,UAAU;YACxB,iGAAiG;YACjG,MAAM,EAAE,CAAC,CAAC,QAAQ,KAAK,CAAC;SACzB,CAAC,CACH;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SandboxCapability, SandboxKind, SandboxTraits } from "./sandbox.js";
|
|
2
|
+
import type { ResourceLimits } from "./provider.js";
|
|
3
|
+
export interface OwnSandboxConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Which provider runs it — must be one of SandboxHubPolicy.ownKinds (the server decides
|
|
6
|
+
* where each kind lives; a profile only picks the kind). Default: defaultOwnKind.
|
|
7
|
+
* image / network / limits below are container settings and are ignored for "host".
|
|
8
|
+
*/
|
|
9
|
+
kind?: SandboxKind;
|
|
10
|
+
/** Must be in SandboxHubPolicy.allowedImages (or equal the shared image). */
|
|
11
|
+
image?: string;
|
|
12
|
+
/** Must be in SandboxHubPolicy.allowedNetwork — "full" only when the host opted in. Default "none". */
|
|
13
|
+
network?: "none" | "allowlist" | "full";
|
|
14
|
+
/** Clamped to SandboxHubPolicy.maxLimits. */
|
|
15
|
+
limits?: Partial<ResourceLimits>;
|
|
16
|
+
}
|
|
17
|
+
export type SandboxSelection = "shared" | "none" | {
|
|
18
|
+
own: OwnSandboxConfig;
|
|
19
|
+
};
|
|
20
|
+
/** Host-controlled rules applied to profile-supplied selections. */
|
|
21
|
+
export interface SandboxHubPolicy {
|
|
22
|
+
/** Images an agent may request for its own sandbox, besides the shared image. */
|
|
23
|
+
allowedImages: string[];
|
|
24
|
+
/** Ceiling for own-sandbox resources; requested values above are clamped. */
|
|
25
|
+
maxLimits: ResourceLimits;
|
|
26
|
+
/** Network modes an own sandbox may request. Add "full" only as a deliberate host opt-in (unrestricted internet). */
|
|
27
|
+
allowedNetwork: Array<"none" | "allowlist" | "full">;
|
|
28
|
+
/** Provider kinds a profile may pick for its own sandbox. Default ["docker"]. */
|
|
29
|
+
ownKinds: SandboxKind[];
|
|
30
|
+
/** Provider kind used for own sandboxes when the profile names none. Default "docker". */
|
|
31
|
+
defaultOwnKind: SandboxKind;
|
|
32
|
+
}
|
|
33
|
+
/** Operation classes the approval policy reasons about. */
|
|
34
|
+
export type SandboxOperation = Extract<SandboxCapability, "fs.read" | "fs.write" | "fs.search" | "exec">;
|
|
35
|
+
/**
|
|
36
|
+
* Decides whether an operation needs explicit user approval in a given sandbox.
|
|
37
|
+
* Wired into the A-58 approval gate by A-61.
|
|
38
|
+
*/
|
|
39
|
+
export type SandboxApprovalPolicy = (traits: SandboxTraits, operation: SandboxOperation) => boolean;
|
|
40
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAwBpD,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACxC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,MAAM,GACN;IAAE,GAAG,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE9B,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,6EAA6E;IAC7E,SAAS,EAAE,cAAc,CAAC;IAC1B,qHAAqH;IACrH,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC;IACrD,iFAAiF;IACjF,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,0FAA0F;IAC1F,cAAc,EAAE,WAAW,CAAC;CAC7B;AAED,2DAA2D;AAC3D,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC;AAEzG;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/policy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Plugin } from "../../../kernel/interfaces/plugin.js";
|
|
2
|
+
import type { SandboxKind, SandboxTraits, Sandbox } from "./sandbox.js";
|
|
3
|
+
export interface ResourceLimits {
|
|
4
|
+
cpus: number;
|
|
5
|
+
memoryMb: number;
|
|
6
|
+
/** Max processes inside the sandbox. */
|
|
7
|
+
pids: number;
|
|
8
|
+
}
|
|
9
|
+
/** Everything a provider needs to create one sandbox. */
|
|
10
|
+
export interface SandboxSpec {
|
|
11
|
+
kind: SandboxKind;
|
|
12
|
+
/** Container image (docker). */
|
|
13
|
+
image?: string;
|
|
14
|
+
network?: SandboxTraits["network"];
|
|
15
|
+
limits?: Partial<ResourceLimits>;
|
|
16
|
+
/** Provider-specific settings (e.g. a host folder, a runner address). Never taken from agent profiles. */
|
|
17
|
+
options?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateSandboxContext {
|
|
20
|
+
/** Stable id the hub assigned, e.g. "docker:shared", "docker:own:<agentId>". */
|
|
21
|
+
id: string;
|
|
22
|
+
tenancy: SandboxTraits["tenancy"];
|
|
23
|
+
/** Owning agent for "own" tenancy. */
|
|
24
|
+
agentId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface SandboxProvider extends Plugin {
|
|
27
|
+
readonly kind: SandboxKind;
|
|
28
|
+
/** Create or reconnect to a sandbox. Called lazily on first use, never at agent spawn. */
|
|
29
|
+
create(spec: SandboxSpec, context: CreateSandboxContext): Promise<Sandbox>;
|
|
30
|
+
/**
|
|
31
|
+
* Delete the stored data of a sandbox that is NOT running in this process —
|
|
32
|
+
* the whole sandbox (own tenancy), or with `agentId` one agent's folder in a
|
|
33
|
+
* shared one. Used when an agent is deleted; running sandboxes are cleaned
|
|
34
|
+
* through Sandbox instead.
|
|
35
|
+
*/
|
|
36
|
+
removeData?(spec: SandboxSpec, context: CreateSandboxContext, opts?: {
|
|
37
|
+
agentId?: string;
|
|
38
|
+
}): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQxE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yDAAyD;AACzD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,gC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