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,378 @@
|
|
|
1
|
+
import { SkillError } from "../../kernel/errors/skill-error.js";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// SKILL.md format — parse and validate a skill package (Agent Skills spec,
|
|
4
|
+
// agentskills.io/specification). Frontmatter is read with a small YAML subset
|
|
5
|
+
// parser: scalars (plain, quoted, | and > blocks), [flow] and "- item" lists,
|
|
6
|
+
// nested maps. That covers what skills use without a YAML dependency; anything
|
|
7
|
+
// it cannot read is reported as an "invalid" error.
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
export const SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
10
|
+
export const SKILL_LIMITS = {
|
|
11
|
+
maxNameLength: 64,
|
|
12
|
+
maxDescriptionLength: 1024,
|
|
13
|
+
maxCompatibilityLength: 500,
|
|
14
|
+
/** SKILL.md itself. The spec recommends < 500 lines; move detail into references/. */
|
|
15
|
+
maxContentBytes: 100_000,
|
|
16
|
+
maxFiles: 50,
|
|
17
|
+
maxFileBytes: 200_000,
|
|
18
|
+
maxTotalBytes: 1_000_000,
|
|
19
|
+
maxPathLength: 200,
|
|
20
|
+
};
|
|
21
|
+
// Values that look like credentials must not be saved into a skill — skills are shared
|
|
22
|
+
// with other agents and shown in the UI. Checked on content and every file.
|
|
23
|
+
const SECRET_PATTERNS = [
|
|
24
|
+
{ label: "a private key", pattern: /-----BEGIN [A-Z ]*PRIVATE KEY-----/ },
|
|
25
|
+
{ label: "an AWS access key", pattern: /\bAKIA[0-9A-Z]{16}\b/ },
|
|
26
|
+
{ label: "an API key (sk-…)", pattern: /\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{20,}/ },
|
|
27
|
+
{ label: "a GitHub token", pattern: /\bgh[pousr]_[A-Za-z0-9]{30,}/ },
|
|
28
|
+
{ label: "a Slack token", pattern: /\bxox[abprs]-[A-Za-z0-9-]{10,}/ },
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Parse and validate a skill package. Throws SkillError("invalid") listing every problem,
|
|
32
|
+
* so a model (or a user) can fix them all in one go.
|
|
33
|
+
*/
|
|
34
|
+
export function parseSkillPackage(pkg) {
|
|
35
|
+
const problems = [];
|
|
36
|
+
const content = typeof pkg.content === "string" ? pkg.content.replace(/\r\n/g, "\n") : "";
|
|
37
|
+
let name = "";
|
|
38
|
+
const split = splitFrontmatter(content);
|
|
39
|
+
if (!split) {
|
|
40
|
+
throw invalid(name, [
|
|
41
|
+
'SKILL.md must start with YAML frontmatter between "---" lines, e.g.\n---\nname: my-skill\ndescription: What it does and when to use it.\n---',
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
let raw = {};
|
|
45
|
+
try {
|
|
46
|
+
raw = parseYamlSubset(split.frontmatter);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
throw invalid(name, [`frontmatter: ${error instanceof Error ? error.message : String(error)}`]);
|
|
50
|
+
}
|
|
51
|
+
name = asString(raw["name"])?.trim() ?? "";
|
|
52
|
+
const description = asString(raw["description"])?.trim() ?? "";
|
|
53
|
+
const license = asString(raw["license"])?.trim();
|
|
54
|
+
const compatibility = asString(raw["compatibility"])?.trim();
|
|
55
|
+
const allowedTools = asList(raw["allowed-tools"]);
|
|
56
|
+
const metadata = flattenMetadata(raw["metadata"]);
|
|
57
|
+
const body = split.body.trim();
|
|
58
|
+
if (!name)
|
|
59
|
+
problems.push('frontmatter "name" is required');
|
|
60
|
+
else {
|
|
61
|
+
if (name.length > SKILL_LIMITS.maxNameLength)
|
|
62
|
+
problems.push(`"name" is longer than ${SKILL_LIMITS.maxNameLength} characters`);
|
|
63
|
+
if (!SKILL_NAME_PATTERN.test(name))
|
|
64
|
+
problems.push(`"name" must be lowercase letters, digits and single hyphens (e.g. "quantity-takeoff"), got "${name}"`);
|
|
65
|
+
}
|
|
66
|
+
if (!description)
|
|
67
|
+
problems.push('frontmatter "description" is required — say what the skill does and when to use it');
|
|
68
|
+
else if (description.length > SKILL_LIMITS.maxDescriptionLength)
|
|
69
|
+
problems.push(`"description" is ${description.length} characters; the limit is ${SKILL_LIMITS.maxDescriptionLength}`);
|
|
70
|
+
if (compatibility && compatibility.length > SKILL_LIMITS.maxCompatibilityLength)
|
|
71
|
+
problems.push(`"compatibility" is longer than ${SKILL_LIMITS.maxCompatibilityLength} characters`);
|
|
72
|
+
if (raw["metadata"] !== undefined && (typeof raw["metadata"] !== "object" || Array.isArray(raw["metadata"])))
|
|
73
|
+
problems.push('"metadata" must be a map of keys to values');
|
|
74
|
+
if (!body)
|
|
75
|
+
problems.push("SKILL.md has no instructions after the frontmatter");
|
|
76
|
+
const contentBytes = Buffer.byteLength(content, "utf8");
|
|
77
|
+
if (contentBytes > SKILL_LIMITS.maxContentBytes)
|
|
78
|
+
problems.push(`SKILL.md is ${contentBytes} bytes; the limit is ${SKILL_LIMITS.maxContentBytes} — move detail into references/ files`);
|
|
79
|
+
const files = validateFiles(pkg.files ?? [], problems);
|
|
80
|
+
for (const [label, text] of [["SKILL.md", content], ...files.map((f) => [f.path, f.content])]) {
|
|
81
|
+
const secret = SECRET_PATTERNS.find((s) => s.pattern.test(text));
|
|
82
|
+
if (secret)
|
|
83
|
+
problems.push(`${label} appears to contain ${secret.label} — never put credentials in a skill`);
|
|
84
|
+
}
|
|
85
|
+
if (problems.length)
|
|
86
|
+
throw invalid(name, problems);
|
|
87
|
+
return {
|
|
88
|
+
frontmatter: {
|
|
89
|
+
name,
|
|
90
|
+
description,
|
|
91
|
+
...(license ? { license } : {}),
|
|
92
|
+
...(compatibility ? { compatibility } : {}),
|
|
93
|
+
...(allowedTools.length ? { allowedTools } : {}),
|
|
94
|
+
metadata,
|
|
95
|
+
},
|
|
96
|
+
body,
|
|
97
|
+
files,
|
|
98
|
+
requiresTools: requiredTools(metadata),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/** Normalise a skill file path ("./scripts/a.py" → "scripts/a.py"); null when it is not a safe relative path. */
|
|
102
|
+
export function normalizeSkillPath(path) {
|
|
103
|
+
if (typeof path !== "string")
|
|
104
|
+
return null;
|
|
105
|
+
const trimmed = path.trim().replace(/^\.\//, "");
|
|
106
|
+
if (!trimmed || trimmed.length > SKILL_LIMITS.maxPathLength)
|
|
107
|
+
return null;
|
|
108
|
+
if (trimmed.startsWith("/") || trimmed.includes("\\") || trimmed.includes("\0") || /^[a-zA-Z]:/.test(trimmed))
|
|
109
|
+
return null;
|
|
110
|
+
const segments = trimmed.split("/");
|
|
111
|
+
if (segments.some((s) => s === "" || s === "." || s === ".."))
|
|
112
|
+
return null;
|
|
113
|
+
return segments.join("/");
|
|
114
|
+
}
|
|
115
|
+
function validateFiles(files, problems) {
|
|
116
|
+
if (!Array.isArray(files)) {
|
|
117
|
+
problems.push('"files" must be a list of { path, content }');
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
if (files.length > SKILL_LIMITS.maxFiles)
|
|
121
|
+
problems.push(`a skill can have at most ${SKILL_LIMITS.maxFiles} files, got ${files.length}`);
|
|
122
|
+
const out = [];
|
|
123
|
+
const seen = new Set();
|
|
124
|
+
let total = 0;
|
|
125
|
+
for (const file of files) {
|
|
126
|
+
const path = normalizeSkillPath(file?.path);
|
|
127
|
+
if (!path) {
|
|
128
|
+
problems.push(`file path "${String(file?.path)}" must be a relative path inside the skill (e.g. "scripts/run.py"), without ".." or a leading "/"`);
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (path.toLowerCase() === "skill.md") {
|
|
132
|
+
problems.push('"SKILL.md" is the skill content itself — do not add it to files');
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (seen.has(path)) {
|
|
136
|
+
problems.push(`file "${path}" is listed twice`);
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (typeof file.content !== "string") {
|
|
140
|
+
problems.push(`file "${path}" must have text content`);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const bytes = Buffer.byteLength(file.content, "utf8");
|
|
144
|
+
if (bytes > SKILL_LIMITS.maxFileBytes)
|
|
145
|
+
problems.push(`file "${path}" is ${bytes} bytes; the limit is ${SKILL_LIMITS.maxFileBytes}`);
|
|
146
|
+
total += bytes;
|
|
147
|
+
seen.add(path);
|
|
148
|
+
out.push({ path, content: file.content });
|
|
149
|
+
}
|
|
150
|
+
if (total > SKILL_LIMITS.maxTotalBytes)
|
|
151
|
+
problems.push(`the skill's files total ${total} bytes; the limit is ${SKILL_LIMITS.maxTotalBytes}`);
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
154
|
+
function invalid(name, problems) {
|
|
155
|
+
return new SkillError(`Invalid skill${name ? ` "${name}"` : ""}:\n${problems.map((p) => `- ${p}`).join("\n")}`, "invalid", name);
|
|
156
|
+
}
|
|
157
|
+
/** `requires-tools` in metadata (also Hermes' `hermes.requires_tools`): space or comma separated tool names. */
|
|
158
|
+
function requiredTools(metadata) {
|
|
159
|
+
const raw = [metadata["requires-tools"], metadata["hermes.requires_tools"]].filter(Boolean).join(" ");
|
|
160
|
+
return [...new Set(raw.split(/[\s,]+/).map((t) => t.trim()).filter(Boolean))];
|
|
161
|
+
}
|
|
162
|
+
// ---------------------------------------------------------------------------
|
|
163
|
+
// Frontmatter
|
|
164
|
+
// ---------------------------------------------------------------------------
|
|
165
|
+
export function splitFrontmatter(content) {
|
|
166
|
+
const text = content.replace(/^/, "");
|
|
167
|
+
const match = /^---[ \t]*\n([\s\S]*?)\n---[ \t]*(?:\n|$)/.exec(text);
|
|
168
|
+
if (!match)
|
|
169
|
+
return null;
|
|
170
|
+
return { frontmatter: match[1] ?? "", body: text.slice(match[0].length) };
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Parse the YAML subset SKILL.md frontmatter uses. Throws on structures it cannot read.
|
|
174
|
+
* Scalars stay strings (no number/boolean coercion — every spec field is text).
|
|
175
|
+
*/
|
|
176
|
+
export function parseYamlSubset(source) {
|
|
177
|
+
const lines = source.split("\n").map((raw, i) => ({
|
|
178
|
+
indent: raw.length - raw.trimStart().length,
|
|
179
|
+
text: raw.trimEnd(),
|
|
180
|
+
no: i + 1,
|
|
181
|
+
}));
|
|
182
|
+
const state = { i: 0 };
|
|
183
|
+
const result = parseMap(lines, state, 0);
|
|
184
|
+
skipBlank(lines, state);
|
|
185
|
+
if (state.i < lines.length)
|
|
186
|
+
throw new Error(`line ${lines[state.i].no}: unexpected indentation`);
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
189
|
+
function isBlank(line) {
|
|
190
|
+
const t = line.text.trim();
|
|
191
|
+
return t === "" || t.startsWith("#");
|
|
192
|
+
}
|
|
193
|
+
function skipBlank(lines, state) {
|
|
194
|
+
while (state.i < lines.length && isBlank(lines[state.i]))
|
|
195
|
+
state.i++;
|
|
196
|
+
}
|
|
197
|
+
function parseMap(lines, state, indent) {
|
|
198
|
+
const out = {};
|
|
199
|
+
for (;;) {
|
|
200
|
+
skipBlank(lines, state);
|
|
201
|
+
const line = lines[state.i];
|
|
202
|
+
if (!line || line.indent < indent)
|
|
203
|
+
return out;
|
|
204
|
+
if (line.indent > indent)
|
|
205
|
+
throw new Error(`line ${line.no}: unexpected indentation`);
|
|
206
|
+
const match = /^([^\s:#][^:]*?):(?:\s+(.*))?$/.exec(line.text.trim());
|
|
207
|
+
if (!match)
|
|
208
|
+
throw new Error(`line ${line.no}: expected "key: value"`);
|
|
209
|
+
const key = match[1].trim();
|
|
210
|
+
const inline = (match[2] ?? "").trim();
|
|
211
|
+
state.i++;
|
|
212
|
+
out[unquote(key)] = parseValue(lines, state, indent, inline, line.no);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function parseValue(lines, state, indent, inline, lineNo) {
|
|
216
|
+
const block = /^([|>])([+-]?)(\d*)[+-]?(?:\s+#.*)?$/.exec(inline);
|
|
217
|
+
if (block)
|
|
218
|
+
return parseBlockScalar(lines, state, indent, block[1] === ">");
|
|
219
|
+
if (inline === "" || inline.startsWith("#")) {
|
|
220
|
+
skipBlank(lines, state);
|
|
221
|
+
const next = lines[state.i];
|
|
222
|
+
if (!next || next.indent <= indent)
|
|
223
|
+
return "";
|
|
224
|
+
if (next.text.trim().startsWith("- ") || next.text.trim() === "-")
|
|
225
|
+
return parseList(lines, state, next.indent);
|
|
226
|
+
return parseMap(lines, state, next.indent);
|
|
227
|
+
}
|
|
228
|
+
if (inline.startsWith("[")) {
|
|
229
|
+
if (!inline.endsWith("]"))
|
|
230
|
+
throw new Error(`line ${lineNo}: unterminated [list]`);
|
|
231
|
+
const inner = inline.slice(1, -1).trim();
|
|
232
|
+
return inner ? splitFlow(inner).map((item) => unquote(item.trim())) : [];
|
|
233
|
+
}
|
|
234
|
+
if (inline.startsWith("{"))
|
|
235
|
+
throw new Error(`line ${lineNo}: {inline maps} are not supported — use an indented map`);
|
|
236
|
+
if (inline.startsWith('"') || inline.startsWith("'"))
|
|
237
|
+
return unquote(stripComment(inline));
|
|
238
|
+
// Plain scalar, possibly continued on more-indented lines (folded with spaces).
|
|
239
|
+
const parts = [stripComment(inline)];
|
|
240
|
+
while (state.i < lines.length) {
|
|
241
|
+
const next = lines[state.i];
|
|
242
|
+
if (next.text.trim() === "")
|
|
243
|
+
break;
|
|
244
|
+
if (next.indent <= indent)
|
|
245
|
+
break;
|
|
246
|
+
parts.push(next.text.trim());
|
|
247
|
+
state.i++;
|
|
248
|
+
}
|
|
249
|
+
return parts.join(" ");
|
|
250
|
+
}
|
|
251
|
+
function parseBlockScalar(lines, state, indent, folded) {
|
|
252
|
+
const collected = [];
|
|
253
|
+
while (state.i < lines.length) {
|
|
254
|
+
const line = lines[state.i];
|
|
255
|
+
if (line.text.trim() !== "" && line.indent <= indent)
|
|
256
|
+
break;
|
|
257
|
+
collected.push(line);
|
|
258
|
+
state.i++;
|
|
259
|
+
}
|
|
260
|
+
while (collected.length && collected[collected.length - 1].text.trim() === "")
|
|
261
|
+
collected.pop();
|
|
262
|
+
const contentIndent = Math.min(...collected.filter((l) => l.text.trim() !== "").map((l) => l.indent));
|
|
263
|
+
const rows = collected.map((l) => (l.text.trim() === "" ? "" : l.text.slice(contentIndent)));
|
|
264
|
+
if (!folded)
|
|
265
|
+
return rows.join("\n");
|
|
266
|
+
// Folded: single newlines become spaces, blank lines become newlines.
|
|
267
|
+
let out = "";
|
|
268
|
+
for (const row of rows) {
|
|
269
|
+
if (row === "")
|
|
270
|
+
out += "\n";
|
|
271
|
+
else
|
|
272
|
+
out += out === "" || out.endsWith("\n") ? row : ` ${row}`;
|
|
273
|
+
}
|
|
274
|
+
return out;
|
|
275
|
+
}
|
|
276
|
+
function parseList(lines, state, indent) {
|
|
277
|
+
const out = [];
|
|
278
|
+
for (;;) {
|
|
279
|
+
skipBlank(lines, state);
|
|
280
|
+
const line = lines[state.i];
|
|
281
|
+
if (!line || line.indent < indent)
|
|
282
|
+
return out;
|
|
283
|
+
const text = line.text.trim();
|
|
284
|
+
if (line.indent > indent || !(text.startsWith("- ") || text === "-"))
|
|
285
|
+
throw new Error(`line ${line.no}: expected "- item"`);
|
|
286
|
+
const item = text.slice(1).trim();
|
|
287
|
+
if (/^[^\s"'][^:]*:(\s|$)/.test(item))
|
|
288
|
+
throw new Error(`line ${line.no}: lists of maps are not supported`);
|
|
289
|
+
state.i++;
|
|
290
|
+
out.push(item.startsWith("[") ? parseValue(lines, state, indent, item, line.no) : unquote(stripComment(item)));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function splitFlow(inner) {
|
|
294
|
+
const items = [];
|
|
295
|
+
let current = "";
|
|
296
|
+
let quote = null;
|
|
297
|
+
for (const ch of inner) {
|
|
298
|
+
if (quote) {
|
|
299
|
+
current += ch;
|
|
300
|
+
if (ch === quote)
|
|
301
|
+
quote = null;
|
|
302
|
+
}
|
|
303
|
+
else if (ch === '"' || ch === "'") {
|
|
304
|
+
quote = ch;
|
|
305
|
+
current += ch;
|
|
306
|
+
}
|
|
307
|
+
else if (ch === ",") {
|
|
308
|
+
items.push(current);
|
|
309
|
+
current = "";
|
|
310
|
+
}
|
|
311
|
+
else
|
|
312
|
+
current += ch;
|
|
313
|
+
}
|
|
314
|
+
if (current.trim())
|
|
315
|
+
items.push(current);
|
|
316
|
+
return items;
|
|
317
|
+
}
|
|
318
|
+
function stripComment(value) {
|
|
319
|
+
if (value.startsWith('"') || value.startsWith("'")) {
|
|
320
|
+
const quote = value[0];
|
|
321
|
+
let i = 1;
|
|
322
|
+
for (; i < value.length; i++) {
|
|
323
|
+
if (quote === '"' && value[i] === "\\")
|
|
324
|
+
i++;
|
|
325
|
+
else if (value[i] === quote) {
|
|
326
|
+
if (quote === "'" && value[i + 1] === "'")
|
|
327
|
+
i++;
|
|
328
|
+
else
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return value.slice(0, i + 1);
|
|
333
|
+
}
|
|
334
|
+
const hash = value.search(/\s#/);
|
|
335
|
+
return (hash === -1 ? value : value.slice(0, hash)).trim();
|
|
336
|
+
}
|
|
337
|
+
function unquote(value) {
|
|
338
|
+
const v = value.trim();
|
|
339
|
+
if (v.length >= 2 && v.startsWith("'") && v.endsWith("'"))
|
|
340
|
+
return v.slice(1, -1).replace(/''/g, "'");
|
|
341
|
+
if (v.length >= 2 && v.startsWith('"') && v.endsWith('"')) {
|
|
342
|
+
return v.slice(1, -1).replace(/\\(.)/g, (_m, c) => (c === "n" ? "\n" : c === "t" ? "\t" : c));
|
|
343
|
+
}
|
|
344
|
+
return v;
|
|
345
|
+
}
|
|
346
|
+
function asString(value) {
|
|
347
|
+
if (value === undefined)
|
|
348
|
+
return undefined;
|
|
349
|
+
if (typeof value === "string")
|
|
350
|
+
return value;
|
|
351
|
+
if (Array.isArray(value))
|
|
352
|
+
return value.map((v) => (typeof v === "string" ? v : JSON.stringify(v))).join(" ");
|
|
353
|
+
return undefined;
|
|
354
|
+
}
|
|
355
|
+
function asList(value) {
|
|
356
|
+
if (value === undefined)
|
|
357
|
+
return [];
|
|
358
|
+
if (Array.isArray(value))
|
|
359
|
+
return value.filter((v) => typeof v === "string" && v.trim() !== "").map((v) => v.trim());
|
|
360
|
+
if (typeof value === "string")
|
|
361
|
+
return value.split(/\s+/).filter(Boolean);
|
|
362
|
+
return [];
|
|
363
|
+
}
|
|
364
|
+
function flattenMetadata(value, prefix = "", out = {}) {
|
|
365
|
+
if (value === undefined || typeof value !== "object" || Array.isArray(value))
|
|
366
|
+
return out;
|
|
367
|
+
for (const [key, v] of Object.entries(value)) {
|
|
368
|
+
const full = prefix ? `${prefix}.${key}` : key;
|
|
369
|
+
if (typeof v === "string")
|
|
370
|
+
out[full] = v;
|
|
371
|
+
else if (Array.isArray(v))
|
|
372
|
+
out[full] = v.map((x) => (typeof x === "string" ? x : JSON.stringify(x))).join(", ");
|
|
373
|
+
else
|
|
374
|
+
flattenMetadata(v, full, out);
|
|
375
|
+
}
|
|
376
|
+
return out;
|
|
377
|
+
}
|
|
378
|
+
//# sourceMappingURL=skill-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-format.js","sourceRoot":"","sources":["../../../src/components/skill-hub/skill-format.ts"],"names":[],"mappings":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SkillStore } from "../persistence-hub/types/skill-store.js";
|
|
2
|
+
import type { Skill, SkillPackage, SkillSource } from "./types/skill.js";
|
|
3
|
+
/**
|
|
4
|
+
* Global hub for skills, for example this hub has 50 skills but user want Devops Agent so user only enable 10 devop skills from 50 skills.
|
|
5
|
+
*
|
|
6
|
+
* The skill library. Two kinds of entries:
|
|
7
|
+
* - registered (built-in essentials + app skills): in memory, read-only at runtime;
|
|
8
|
+
* - custom (created by agents through skill_manage, or by users): persisted in the
|
|
9
|
+
* SkillStore, loaded on first use and cached — write custom skills through this hub
|
|
10
|
+
* so the cache stays current.
|
|
11
|
+
* Registered names win: a stored custom skill with the same name is ignored (logged).
|
|
12
|
+
*/
|
|
13
|
+
export declare class SkillHub {
|
|
14
|
+
private getStore;
|
|
15
|
+
private registered;
|
|
16
|
+
private custom?;
|
|
17
|
+
private deletedListeners;
|
|
18
|
+
/** @param getStore resolved on every load, so `Kernel.usePersistence()` can swap the store. */
|
|
19
|
+
constructor(getStore: () => SkillStore);
|
|
20
|
+
/** Register a built-in or app skill. Throws SkillError when it is invalid or the name is taken. */
|
|
21
|
+
register(pkg: SkillPackage, source?: Exclude<SkillSource, "custom">): Skill;
|
|
22
|
+
get(name: string): Promise<Skill | undefined>;
|
|
23
|
+
getByNames(names: string[]): Promise<Skill[]>;
|
|
24
|
+
/** Every skill in the library, registered first, each group sorted by name. */
|
|
25
|
+
list(): Promise<Skill[]>;
|
|
26
|
+
/** Add a custom skill. Throws SkillError ("invalid", "already_exists"). */
|
|
27
|
+
create(pkg: SkillPackage, options?: {
|
|
28
|
+
createdBy?: string;
|
|
29
|
+
}): Promise<Skill>;
|
|
30
|
+
/** Replace a custom skill's SKILL.md and files. The name cannot change. */
|
|
31
|
+
update(name: string, pkg: SkillPackage): Promise<Skill>;
|
|
32
|
+
/** Delete a custom skill. Agents that had it enabled simply stop seeing it. */
|
|
33
|
+
delete(name: string): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Called after a custom skill is deleted, before delete() resolves — e.g. to disable it
|
|
36
|
+
* for every agent that had it enabled. Returns an unsubscribe function.
|
|
37
|
+
*/
|
|
38
|
+
onDeleted(listener: (name: string) => void): () => void;
|
|
39
|
+
/** Forget the cached custom skills; the next read loads them from the store again. */
|
|
40
|
+
reload(): void;
|
|
41
|
+
private requireCustom;
|
|
42
|
+
private loadCustom;
|
|
43
|
+
private readStore;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=skill-hub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-hub.d.ts","sourceRoot":"","sources":["../../../src/components/skill-hub/skill-hub.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAEvF,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzE;;;;;;;;;GASG;AACH,qBAAa,QAAQ;IAMP,OAAO,CAAC,QAAQ;IAL5B,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,MAAM,CAAC,CAA8B;IAC7C,OAAO,CAAC,gBAAgB,CAAqC;IAE7D,+FAA+F;IAC/F,YAAoB,QAAQ,EAAE,MAAM,UAAU,EAAI;IAElD,mGAAmG;IACnG,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,GAAE,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAS,GAAG,KAAK,CAOjF;IAEK,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAElD;IAEK,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAKlD;IAED,+EAA+E;IACzE,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAI7B;IAED,2EAA2E;IACrE,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAmBpF;IAED,2EAA2E;IACrE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAmB5D;IAED,+EAA+E;IACzE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKxC;IAED;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAGtD;IAED,sFAAsF;IACtF,MAAM,IAAI,IAAI,CAEb;YAEa,aAAa;IAa3B,OAAO,CAAC,UAAU;YAYJ,SAAS;CAgBxB"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { SkillError } from "../../kernel/errors/skill-error.js";
|
|
2
|
+
import { parseSkillPackage } from "./skill-format.js";
|
|
3
|
+
/**
|
|
4
|
+
* Global hub for skills, for example this hub has 50 skills but user want Devops Agent so user only enable 10 devop skills from 50 skills.
|
|
5
|
+
*
|
|
6
|
+
* The skill library. Two kinds of entries:
|
|
7
|
+
* - registered (built-in essentials + app skills): in memory, read-only at runtime;
|
|
8
|
+
* - custom (created by agents through skill_manage, or by users): persisted in the
|
|
9
|
+
* SkillStore, loaded on first use and cached — write custom skills through this hub
|
|
10
|
+
* so the cache stays current.
|
|
11
|
+
* Registered names win: a stored custom skill with the same name is ignored (logged).
|
|
12
|
+
*/
|
|
13
|
+
export class SkillHub {
|
|
14
|
+
getStore;
|
|
15
|
+
registered = new Map();
|
|
16
|
+
custom;
|
|
17
|
+
deletedListeners = new Set();
|
|
18
|
+
/** @param getStore resolved on every load, so `Kernel.usePersistence()` can swap the store. */
|
|
19
|
+
constructor(getStore) {
|
|
20
|
+
this.getStore = getStore;
|
|
21
|
+
}
|
|
22
|
+
/** Register a built-in or app skill. Throws SkillError when it is invalid or the name is taken. */
|
|
23
|
+
register(pkg, source = "app") {
|
|
24
|
+
const skill = toSkill(pkg, { source, version: 1 });
|
|
25
|
+
if (this.registered.has(skill.name)) {
|
|
26
|
+
throw new SkillError(`Skill "${skill.name}" already registered`, "already_exists", skill.name);
|
|
27
|
+
}
|
|
28
|
+
this.registered.set(skill.name, skill);
|
|
29
|
+
return skill;
|
|
30
|
+
}
|
|
31
|
+
async get(name) {
|
|
32
|
+
return this.registered.get(name) ?? (await this.loadCustom()).get(name);
|
|
33
|
+
}
|
|
34
|
+
async getByNames(names) {
|
|
35
|
+
const custom = await this.loadCustom();
|
|
36
|
+
return names
|
|
37
|
+
.map((n) => this.registered.get(n) ?? custom.get(n))
|
|
38
|
+
.filter((s) => s !== undefined);
|
|
39
|
+
}
|
|
40
|
+
/** Every skill in the library, registered first, each group sorted by name. */
|
|
41
|
+
async list() {
|
|
42
|
+
const custom = await this.loadCustom();
|
|
43
|
+
const byName = (a, b) => a.name.localeCompare(b.name);
|
|
44
|
+
return [...[...this.registered.values()].sort(byName), ...[...custom.values()].sort(byName)];
|
|
45
|
+
}
|
|
46
|
+
/** Add a custom skill. Throws SkillError ("invalid", "already_exists"). */
|
|
47
|
+
async create(pkg, options = {}) {
|
|
48
|
+
const now = new Date().toISOString();
|
|
49
|
+
const skill = toSkill(pkg, {
|
|
50
|
+
source: "custom",
|
|
51
|
+
version: 1,
|
|
52
|
+
createdAt: now,
|
|
53
|
+
updatedAt: now,
|
|
54
|
+
...(options.createdBy ? { createdBy: options.createdBy } : {}),
|
|
55
|
+
});
|
|
56
|
+
if (await this.get(skill.name)) {
|
|
57
|
+
throw new SkillError(`A skill named "${skill.name}" already exists — pick another name, or update the existing skill`, "already_exists", skill.name);
|
|
58
|
+
}
|
|
59
|
+
await this.getStore().save(toRecord(skill));
|
|
60
|
+
(await this.loadCustom()).set(skill.name, skill);
|
|
61
|
+
return skill;
|
|
62
|
+
}
|
|
63
|
+
/** Replace a custom skill's SKILL.md and files. The name cannot change. */
|
|
64
|
+
async update(name, pkg) {
|
|
65
|
+
const existing = await this.requireCustom(name);
|
|
66
|
+
const skill = toSkill(pkg, {
|
|
67
|
+
source: "custom",
|
|
68
|
+
version: existing.version + 1,
|
|
69
|
+
createdAt: existing.createdAt,
|
|
70
|
+
updatedAt: new Date().toISOString(),
|
|
71
|
+
...(existing.createdBy ? { createdBy: existing.createdBy } : {}),
|
|
72
|
+
});
|
|
73
|
+
if (skill.name !== name) {
|
|
74
|
+
throw new SkillError(`The frontmatter name "${skill.name}" does not match "${name}" — skills cannot be renamed; create a new skill and delete this one`, "invalid", name);
|
|
75
|
+
}
|
|
76
|
+
await this.getStore().save(toRecord(skill));
|
|
77
|
+
(await this.loadCustom()).set(name, skill);
|
|
78
|
+
return skill;
|
|
79
|
+
}
|
|
80
|
+
/** Delete a custom skill. Agents that had it enabled simply stop seeing it. */
|
|
81
|
+
async delete(name) {
|
|
82
|
+
await this.requireCustom(name);
|
|
83
|
+
await this.getStore().delete(name);
|
|
84
|
+
(await this.loadCustom()).delete(name);
|
|
85
|
+
for (const listener of this.deletedListeners)
|
|
86
|
+
listener(name);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Called after a custom skill is deleted, before delete() resolves — e.g. to disable it
|
|
90
|
+
* for every agent that had it enabled. Returns an unsubscribe function.
|
|
91
|
+
*/
|
|
92
|
+
onDeleted(listener) {
|
|
93
|
+
this.deletedListeners.add(listener);
|
|
94
|
+
return () => this.deletedListeners.delete(listener);
|
|
95
|
+
}
|
|
96
|
+
/** Forget the cached custom skills; the next read loads them from the store again. */
|
|
97
|
+
reload() {
|
|
98
|
+
this.custom = undefined;
|
|
99
|
+
}
|
|
100
|
+
async requireCustom(name) {
|
|
101
|
+
if (this.registered.has(name)) {
|
|
102
|
+
throw new SkillError(`"${name}" is a ${this.registered.get(name).source} skill and cannot be changed — create a new skill with a different name instead`, "read_only", name);
|
|
103
|
+
}
|
|
104
|
+
const skill = (await this.loadCustom()).get(name);
|
|
105
|
+
if (!skill)
|
|
106
|
+
throw new SkillError(`Skill "${name}" not found`, "not_found", name);
|
|
107
|
+
return skill;
|
|
108
|
+
}
|
|
109
|
+
loadCustom() {
|
|
110
|
+
if (!this.custom) {
|
|
111
|
+
const loading = this.readStore();
|
|
112
|
+
// A failed load is not cached — the next read retries.
|
|
113
|
+
loading.catch(() => {
|
|
114
|
+
if (this.custom === loading)
|
|
115
|
+
this.custom = undefined;
|
|
116
|
+
});
|
|
117
|
+
this.custom = loading;
|
|
118
|
+
}
|
|
119
|
+
return this.custom;
|
|
120
|
+
}
|
|
121
|
+
async readStore() {
|
|
122
|
+
const map = new Map();
|
|
123
|
+
for (const record of await this.getStore().list()) {
|
|
124
|
+
if (this.registered.has(record.name)) {
|
|
125
|
+
console.warn(`[skills] stored skill "${record.name}" is shadowed by a registered skill with the same name — ignored`);
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
try {
|
|
129
|
+
map.set(record.name, fromRecord(record));
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
// A record that no longer validates must not hide the rest of the library.
|
|
133
|
+
console.warn(`[skills] stored skill "${record.name}" is invalid — ignored:`, error instanceof Error ? error.message : error);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return map;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function toSkill(pkg, meta) {
|
|
140
|
+
const parsed = parseSkillPackage(pkg);
|
|
141
|
+
return {
|
|
142
|
+
...parsed.frontmatter,
|
|
143
|
+
body: parsed.body,
|
|
144
|
+
content: pkg.content.replace(/\r\n/g, "\n"),
|
|
145
|
+
files: parsed.files,
|
|
146
|
+
requiresTools: parsed.requiresTools,
|
|
147
|
+
...meta,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function toRecord(skill) {
|
|
151
|
+
return {
|
|
152
|
+
name: skill.name,
|
|
153
|
+
content: skill.content,
|
|
154
|
+
files: skill.files,
|
|
155
|
+
...(skill.createdBy ? { createdBy: skill.createdBy } : {}),
|
|
156
|
+
version: skill.version,
|
|
157
|
+
createdAt: skill.createdAt ?? new Date().toISOString(),
|
|
158
|
+
updatedAt: skill.updatedAt ?? new Date().toISOString(),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function fromRecord(record) {
|
|
162
|
+
const skill = toSkill({ content: record.content, files: record.files }, {
|
|
163
|
+
source: "custom",
|
|
164
|
+
version: record.version,
|
|
165
|
+
createdAt: record.createdAt,
|
|
166
|
+
updatedAt: record.updatedAt,
|
|
167
|
+
...(record.createdBy ? { createdBy: record.createdBy } : {}),
|
|
168
|
+
});
|
|
169
|
+
if (skill.name !== record.name)
|
|
170
|
+
throw new Error(`frontmatter name "${skill.name}" does not match the stored name`);
|
|
171
|
+
return skill;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=skill-hub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-hub.js","sourceRoot":"","sources":["../../../src/components/skill-hub/skill-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,OAAO,QAAQ;IAMC,QAAQ;IALpB,UAAU,GAAG,IAAI,GAAG,EAAiB,CAAC;IACtC,MAAM,CAA+B;IACrC,gBAAgB,GAAG,IAAI,GAAG,EAA0B,CAAC;IAE7D,+FAA+F;IAC/F,YAAoB,QAA0B;wBAA1B,QAAQ;IAAqB,CAAC;IAElD,mGAAmG;IACnG,QAAQ,CAAC,GAAiB,EAAE,MAAM,GAAmC,KAAK;QACxE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QACnD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,UAAU,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