aec-agent 1.0.3 → 1.0.4
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/dist/agent-core.d.ts +123 -3
- package/dist/agent-core.d.ts.map +1 -1
- package/dist/agent-core.js +219 -23
- package/dist/agent-core.js.map +1 -1
- package/dist/components/artifact-hub/artifact-hub.d.ts +11 -1
- package/dist/components/artifact-hub/artifact-hub.d.ts.map +1 -1
- package/dist/components/artifact-hub/artifact-hub.js +21 -1
- package/dist/components/artifact-hub/artifact-hub.js.map +1 -1
- package/dist/components/channel-platform-hub/adapter-kit.d.ts +51 -0
- package/dist/components/channel-platform-hub/adapter-kit.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/adapter-kit.js +153 -0
- package/dist/components/channel-platform-hub/adapter-kit.js.map +1 -0
- package/dist/components/channel-platform-hub/channel-platform-hub.d.ts +34 -0
- package/dist/components/channel-platform-hub/channel-platform-hub.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/channel-platform-hub.js +52 -0
- package/dist/components/channel-platform-hub/channel-platform-hub.js.map +1 -0
- package/dist/components/channel-platform-hub/discord/discord-adapter.d.ts +57 -0
- package/dist/components/channel-platform-hub/discord/discord-adapter.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/discord/discord-adapter.js +412 -0
- package/dist/components/channel-platform-hub/discord/discord-adapter.js.map +1 -0
- package/dist/components/channel-platform-hub/slack/slack-adapter.d.ts +56 -0
- package/dist/components/channel-platform-hub/slack/slack-adapter.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/slack/slack-adapter.js +349 -0
- package/dist/components/channel-platform-hub/slack/slack-adapter.js.map +1 -0
- package/dist/components/channel-platform-hub/slack/slack-mrkdwn.d.ts +3 -0
- package/dist/components/channel-platform-hub/slack/slack-mrkdwn.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/slack/slack-mrkdwn.js +70 -0
- package/dist/components/channel-platform-hub/slack/slack-mrkdwn.js.map +1 -0
- package/dist/components/channel-platform-hub/teams/teams-adapter.d.ts +51 -0
- package/dist/components/channel-platform-hub/teams/teams-adapter.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/teams/teams-adapter.js +333 -0
- package/dist/components/channel-platform-hub/teams/teams-adapter.js.map +1 -0
- package/dist/components/channel-platform-hub/telegram/telegram-adapter.d.ts +46 -0
- package/dist/components/channel-platform-hub/telegram/telegram-adapter.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/telegram/telegram-adapter.js +304 -0
- package/dist/components/channel-platform-hub/telegram/telegram-adapter.js.map +1 -0
- package/dist/components/channel-platform-hub/telegram/telegram-markdown.d.ts +3 -0
- package/dist/components/channel-platform-hub/telegram/telegram-markdown.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/telegram/telegram-markdown.js +87 -0
- package/dist/components/channel-platform-hub/telegram/telegram-markdown.js.map +1 -0
- package/dist/components/channel-platform-hub/types.d.ts +290 -0
- package/dist/components/channel-platform-hub/types.d.ts.map +1 -0
- package/dist/components/channel-platform-hub/types.js +23 -0
- package/dist/components/channel-platform-hub/types.js.map +1 -0
- package/dist/components/event-handler/event-dispatcher.d.ts +28 -3
- package/dist/components/event-handler/event-dispatcher.d.ts.map +1 -1
- package/dist/components/event-handler/event-dispatcher.js +77 -13
- package/dist/components/event-handler/event-dispatcher.js.map +1 -1
- package/dist/components/event-handler/events.d.ts +316 -15
- package/dist/components/event-handler/events.d.ts.map +1 -1
- package/dist/components/event-handler/events.js +94 -2
- package/dist/components/event-handler/events.js.map +1 -1
- package/dist/components/event-handler/types.d.ts +26 -0
- package/dist/components/event-handler/types.d.ts.map +1 -1
- package/dist/components/group-hub/group-hub.d.ts +117 -0
- package/dist/components/group-hub/group-hub.d.ts.map +1 -0
- package/dist/components/group-hub/group-hub.js +334 -0
- package/dist/components/group-hub/group-hub.js.map +1 -0
- package/dist/components/group-hub/group-turns.d.ts +109 -0
- package/dist/components/group-hub/group-turns.d.ts.map +1 -0
- package/dist/components/group-hub/group-turns.js +834 -0
- package/dist/components/group-hub/group-turns.js.map +1 -0
- package/dist/components/group-hub/member-prompt.d.ts +28 -0
- package/dist/components/group-hub/member-prompt.d.ts.map +1 -0
- package/dist/components/group-hub/member-prompt.js +111 -0
- package/dist/components/group-hub/member-prompt.js.map +1 -0
- package/dist/components/group-hub/recipients.d.ts +10 -0
- package/dist/components/group-hub/recipients.d.ts.map +1 -0
- package/dist/components/group-hub/recipients.js +83 -0
- package/dist/components/group-hub/recipients.js.map +1 -0
- package/dist/components/group-hub/thread.d.ts +57 -0
- package/dist/components/group-hub/thread.d.ts.map +1 -0
- package/dist/components/group-hub/thread.js +126 -0
- package/dist/components/group-hub/thread.js.map +1 -0
- package/dist/components/group-hub/types.d.ts +277 -0
- package/dist/components/group-hub/types.d.ts.map +1 -0
- package/dist/components/group-hub/types.js +51 -0
- package/dist/components/group-hub/types.js.map +1 -0
- package/dist/components/llm-provider-hub/providers/anthropic-provider.d.ts.map +1 -1
- package/dist/components/llm-provider-hub/providers/anthropic-provider.js +22 -2
- package/dist/components/llm-provider-hub/providers/anthropic-provider.js.map +1 -1
- package/dist/components/llm-provider-hub/providers/bedrock-provider.d.ts.map +1 -1
- package/dist/components/llm-provider-hub/providers/bedrock-provider.js +15 -3
- package/dist/components/llm-provider-hub/providers/bedrock-provider.js.map +1 -1
- package/dist/components/llm-provider-hub/providers/model-info-mappers.d.ts.map +1 -1
- package/dist/components/llm-provider-hub/providers/model-info-mappers.js +27 -0
- package/dist/components/llm-provider-hub/providers/model-info-mappers.js.map +1 -1
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.d.ts.map +1 -1
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js +10 -3
- package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js.map +1 -1
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts +1 -0
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts.map +1 -1
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js +35 -3
- package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js.map +1 -1
- package/dist/components/llm-provider-hub/types.d.ts +20 -0
- package/dist/components/llm-provider-hub/types.d.ts.map +1 -1
- package/dist/components/llm-provider-hub/types.js +5 -0
- package/dist/components/llm-provider-hub/types.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts +87 -8
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js +465 -62
- package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts +14 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js +25 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts +14 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js +14 -22
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts +41 -3
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js +152 -44
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts +15 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js +35 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts +10 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js +39 -6
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts +2 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.d.ts +47 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.js +61 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts +131 -8
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js +17 -1
- package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent.d.ts +101 -15
- package/dist/components/multi-agent-orchestration/agent/agent.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/agent.js +415 -44
- package/dist/components/multi-agent-orchestration/agent/agent.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts +245 -1
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js +1583 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.d.ts +76 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.js +236 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/text.d.ts +15 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/text.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/text.js +80 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/text.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.d.ts +13 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.js +41 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.d.ts +69 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.js +210 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/types.d.ts +76 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/types.js +7 -0
- package/dist/components/multi-agent-orchestration/agent/channel-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.d.ts +37 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.js +544 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.d.ts +75 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.js +299 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/parse.d.ts +17 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/parse.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/parse.js +19 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/parse.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/types.d.ts +197 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/types.js +3 -0
- package/dist/components/multi-agent-orchestration/agent/command-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts +37 -1
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js +54 -2
- package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts +118 -14
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js +239 -50
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.d.ts +34 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.js +74 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.d.ts +49 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.js +171 -0
- package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/clock.d.ts +43 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/clock.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/clock.js +116 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/clock.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.d.ts +17 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.js +93 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.d.ts +208 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.js +1207 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/rules.d.ts +129 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/rules.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/rules.js +598 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/rules.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.d.ts +15 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.js +113 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/timers.d.ts +8 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/timers.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/timers.js +33 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/timers.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/types.d.ts +495 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/types.js +50 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.d.ts +37 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.js +157 -0
- package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts +7 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js +189 -30
- package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts +17 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js +51 -0
- package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts +5 -0
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js +16 -0
- package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.d.ts +41 -0
- package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.js +98 -0
- package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/secret-manager/types.d.ts +37 -0
- package/dist/components/multi-agent-orchestration/agent/secret-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/secret-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js +1 -0
- package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.d.ts +21 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.js +113 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.d.ts +52 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.js +63 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.d.ts +18 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.js +56 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.d.ts +128 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.js +661 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.d.ts +307 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.d.ts.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.js +60 -0
- package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.js.map +1 -0
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts +14 -3
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js +18 -5
- package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js.map +1 -1
- package/dist/components/multi-agent-orchestration/agent/types.d.ts +84 -1
- package/dist/components/multi-agent-orchestration/agent/types.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts +11 -4
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts.map +1 -1
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js +72 -4
- package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js.map +1 -1
- package/dist/components/persistence-hub/default-stores/memory-channel-store.d.ts +11 -0
- package/dist/components/persistence-hub/default-stores/memory-channel-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-channel-store.js +33 -0
- package/dist/components/persistence-hub/default-stores/memory-channel-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-group-store.d.ts +21 -0
- package/dist/components/persistence-hub/default-stores/memory-group-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-group-store.js +62 -0
- package/dist/components/persistence-hub/default-stores/memory-group-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-job-store.d.ts +31 -0
- package/dist/components/persistence-hub/default-stores/memory-job-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-job-store.js +234 -0
- package/dist/components/persistence-hub/default-stores/memory-job-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-secret-store.d.ts +12 -0
- package/dist/components/persistence-hub/default-stores/memory-secret-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-secret-store.js +38 -0
- package/dist/components/persistence-hub/default-stores/memory-secret-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts.map +1 -1
- package/dist/components/persistence-hub/default-stores/memory-session-store.js +7 -0
- package/dist/components/persistence-hub/default-stores/memory-session-store.js.map +1 -1
- package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.d.ts +10 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.js +30 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.js.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.d.ts +9 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.js +17 -0
- package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.js.map +1 -0
- package/dist/components/persistence-hub/persistence-hub.d.ts +41 -0
- package/dist/components/persistence-hub/persistence-hub.d.ts.map +1 -1
- package/dist/components/persistence-hub/persistence-hub.js +41 -0
- package/dist/components/persistence-hub/persistence-hub.js.map +1 -1
- package/dist/components/persistence-hub/types/channel-store.d.ts +12 -0
- package/dist/components/persistence-hub/types/channel-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/channel-store.js +2 -0
- package/dist/components/persistence-hub/types/channel-store.js.map +1 -0
- package/dist/components/persistence-hub/types/group-store.d.ts +27 -0
- package/dist/components/persistence-hub/types/group-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/group-store.js +2 -0
- package/dist/components/persistence-hub/types/group-store.js.map +1 -0
- package/dist/components/persistence-hub/types/job-store.d.ts +112 -0
- package/dist/components/persistence-hub/types/job-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/job-store.js +2 -0
- package/dist/components/persistence-hub/types/job-store.js.map +1 -0
- package/dist/components/persistence-hub/types/secret-store.d.ts +18 -0
- package/dist/components/persistence-hub/types/secret-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/secret-store.js +2 -0
- package/dist/components/persistence-hub/types/secret-store.js.map +1 -0
- package/dist/components/persistence-hub/types/session-store.d.ts +5 -0
- package/dist/components/persistence-hub/types/session-store.d.ts.map +1 -1
- package/dist/components/persistence-hub/types/subagent-run-store.d.ts +11 -0
- package/dist/components/persistence-hub/types/subagent-run-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/subagent-run-store.js +2 -0
- package/dist/components/persistence-hub/types/subagent-run-store.js.map +1 -0
- package/dist/components/persistence-hub/types/subagent-type-store.d.ts +9 -0
- package/dist/components/persistence-hub/types/subagent-type-store.d.ts.map +1 -0
- package/dist/components/persistence-hub/types/subagent-type-store.js +2 -0
- package/dist/components/persistence-hub/types/subagent-type-store.js.map +1 -0
- package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts +4 -1
- package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts.map +1 -1
- package/dist/components/sandbox-hub/docker/docker-sandbox.js +398 -1
- package/dist/components/sandbox-hub/docker/docker-sandbox.js.map +1 -1
- package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts.map +1 -1
- package/dist/components/sandbox-hub/docker/sandbox-helper.js +386 -5
- package/dist/components/sandbox-hub/docker/sandbox-helper.js.map +1 -1
- package/dist/components/sandbox-hub/host/host-sandbox.d.ts +16 -0
- package/dist/components/sandbox-hub/host/host-sandbox.d.ts.map +1 -1
- package/dist/components/sandbox-hub/host/host-sandbox.js +283 -2
- package/dist/components/sandbox-hub/host/host-sandbox.js.map +1 -1
- package/dist/components/sandbox-hub/sandbox-hub.d.ts +9 -0
- package/dist/components/sandbox-hub/sandbox-hub.d.ts.map +1 -1
- package/dist/components/sandbox-hub/sandbox-hub.js +18 -0
- package/dist/components/sandbox-hub/sandbox-hub.js.map +1 -1
- package/dist/components/sandbox-hub/traced-sandbox.d.ts.map +1 -1
- package/dist/components/sandbox-hub/traced-sandbox.js +32 -0
- package/dist/components/sandbox-hub/traced-sandbox.js.map +1 -1
- package/dist/components/sandbox-hub/types/sandbox.d.ts +106 -1
- package/dist/components/sandbox-hub/types/sandbox.d.ts.map +1 -1
- package/dist/components/sandbox-hub/types/sandbox.js +0 -13
- package/dist/components/sandbox-hub/types/sandbox.js.map +1 -1
- package/dist/components/secret-hub/envelope.d.ts +48 -0
- package/dist/components/secret-hub/envelope.d.ts.map +1 -0
- package/dist/components/secret-hub/envelope.js +157 -0
- package/dist/components/secret-hub/envelope.js.map +1 -0
- package/dist/components/secret-hub/rules.d.ts +33 -0
- package/dist/components/secret-hub/rules.d.ts.map +1 -0
- package/dist/components/secret-hub/rules.js +142 -0
- package/dist/components/secret-hub/rules.js.map +1 -0
- package/dist/components/secret-hub/secret-hub-provider.d.ts +61 -0
- package/dist/components/secret-hub/secret-hub-provider.d.ts.map +1 -0
- package/dist/components/secret-hub/secret-hub-provider.js +73 -0
- package/dist/components/secret-hub/secret-hub-provider.js.map +1 -0
- package/dist/components/secret-hub/secret-hub.d.ts +102 -0
- package/dist/components/secret-hub/secret-hub.d.ts.map +1 -0
- package/dist/components/secret-hub/secret-hub.js +267 -0
- package/dist/components/secret-hub/secret-hub.js.map +1 -0
- package/dist/components/secret-hub/types.d.ts +77 -0
- package/dist/components/secret-hub/types.d.ts.map +1 -0
- package/dist/components/secret-hub/types.js +23 -0
- package/dist/components/secret-hub/types.js.map +1 -0
- package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts +1 -1
- package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts.map +1 -1
- package/dist/components/skill-hub/built-in-skills/essential-skills.js +7 -2
- package/dist/components/skill-hub/built-in-skills/essential-skills.js.map +1 -1
- package/dist/components/skill-hub/built-in-skills/watch-and-notify.d.ts +3 -0
- package/dist/components/skill-hub/built-in-skills/watch-and-notify.d.ts.map +1 -0
- package/dist/components/skill-hub/built-in-skills/watch-and-notify.js +94 -0
- package/dist/components/skill-hub/built-in-skills/watch-and-notify.js.map +1 -0
- package/dist/components/skill-hub/skill-hub.d.ts +9 -1
- package/dist/components/skill-hub/skill-hub.d.ts.map +1 -1
- package/dist/components/skill-hub/skill-hub.js +11 -1
- package/dist/components/skill-hub/skill-hub.js.map +1 -1
- package/dist/components/subagent-hub/built-in-types.d.ts +3 -0
- package/dist/components/subagent-hub/built-in-types.d.ts.map +1 -0
- package/dist/components/subagent-hub/built-in-types.js +24 -0
- package/dist/components/subagent-hub/built-in-types.js.map +1 -0
- package/dist/components/subagent-hub/subagent-hub.d.ts +41 -0
- package/dist/components/subagent-hub/subagent-hub.d.ts.map +1 -0
- package/dist/components/subagent-hub/subagent-hub.js +158 -0
- package/dist/components/subagent-hub/subagent-hub.js.map +1 -0
- package/dist/components/subagent-hub/types.d.ts +40 -0
- package/dist/components/subagent-hub/types.d.ts.map +1 -0
- package/dist/components/subagent-hub/types.js +8 -0
- package/dist/components/subagent-hub/types.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts +4 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js +4 -0
- package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js +4 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js +4 -1
- package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.d.ts +10 -0
- package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.js +13 -0
- package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.d.ts +60 -0
- package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.js +240 -0
- package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.d.ts +14 -0
- package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.js +36 -0
- package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.d.ts +32 -0
- package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.js +458 -0
- package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.d.ts +9 -0
- package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.js +20 -0
- package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.d.ts +12 -0
- package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.js +57 -0
- package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.d.ts +15 -0
- package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.js +80 -0
- package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.d.ts +53 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.js +100 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-tool.d.ts +14 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-tool.js +63 -0
- package/dist/components/tool-hub/built-in-tools/preview/preview-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/service-tools.d.ts +33 -0
- package/dist/components/tool-hub/built-in-tools/preview/service-tools.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/preview/service-tools.js +180 -0
- package/dist/components/tool-hub/built-in-tools/preview/service-tools.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.d.ts +6 -0
- package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.js +9 -0
- package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.d.ts +12 -0
- package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.js +30 -0
- package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.d.ts +22 -0
- package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.js +113 -0
- package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.d.ts +9 -0
- package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.js +29 -0
- package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.d.ts +27 -0
- package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.js +112 -0
- package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/http-request-tool.d.ts +43 -0
- package/dist/components/tool-hub/built-in-tools/web/http-request-tool.d.ts.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/http-request-tool.js +234 -0
- package/dist/components/tool-hub/built-in-tools/web/http-request-tool.js.map +1 -0
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js +2 -0
- package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js +2 -0
- package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js +9 -1
- package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js +9 -2
- package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js.map +1 -1
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts +17 -0
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts.map +1 -1
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js +29 -0
- package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js.map +1 -1
- package/dist/components/tool-hub/tool-links.d.ts +9 -0
- package/dist/components/tool-hub/tool-links.d.ts.map +1 -0
- package/dist/components/tool-hub/tool-links.js +11 -0
- package/dist/components/tool-hub/tool-links.js.map +1 -0
- package/dist/components/tool-hub/types.d.ts +101 -1
- package/dist/components/tool-hub/types.d.ts.map +1 -1
- package/dist/index.d.ts +109 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel/errors/channel-error.d.ts +24 -0
- package/dist/kernel/errors/channel-error.d.ts.map +1 -0
- package/dist/kernel/errors/channel-error.js +15 -0
- package/dist/kernel/errors/channel-error.js.map +1 -0
- package/dist/kernel/errors/command-error.d.ts +12 -0
- package/dist/kernel/errors/command-error.d.ts.map +1 -0
- package/dist/kernel/errors/command-error.js +11 -0
- package/dist/kernel/errors/command-error.js.map +1 -0
- package/dist/kernel/errors/group-error.d.ts +15 -0
- package/dist/kernel/errors/group-error.d.ts.map +1 -0
- package/dist/kernel/errors/group-error.js +10 -0
- package/dist/kernel/errors/group-error.js.map +1 -0
- package/dist/kernel/errors/job-error.d.ts +23 -0
- package/dist/kernel/errors/job-error.d.ts.map +1 -0
- package/dist/kernel/errors/job-error.js +15 -0
- package/dist/kernel/errors/job-error.js.map +1 -0
- package/dist/kernel/errors/secret-error.d.ts +19 -0
- package/dist/kernel/errors/secret-error.d.ts.map +1 -0
- package/dist/kernel/errors/secret-error.js +10 -0
- package/dist/kernel/errors/secret-error.js.map +1 -0
- package/dist/kernel/errors/session-error.d.ts +5 -1
- package/dist/kernel/errors/session-error.d.ts.map +1 -1
- package/dist/kernel/errors/session-error.js.map +1 -1
- package/dist/kernel/errors/subagent-error.d.ts +19 -0
- package/dist/kernel/errors/subagent-error.d.ts.map +1 -0
- package/dist/kernel/errors/subagent-error.js +10 -0
- package/dist/kernel/errors/subagent-error.js.map +1 -0
- package/dist/kernel/interfaces/kernel.d.ts +15 -0
- package/dist/kernel/interfaces/kernel.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +80 -1
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/testing/fake-channel.d.ts +60 -0
- package/dist/testing/fake-channel.d.ts.map +1 -0
- package/dist/testing/fake-channel.js +135 -0
- package/dist/testing/fake-channel.js.map +1 -0
- package/dist/testing/in-memory-sandbox.d.ts +4 -1
- package/dist/testing/in-memory-sandbox.d.ts.map +1 -1
- package/dist/testing/in-memory-sandbox.js +63 -3
- package/dist/testing/in-memory-sandbox.js.map +1 -1
- package/dist/testing/mock-session-store.d.ts.map +1 -1
- package/dist/testing/mock-session-store.js +7 -0
- package/dist/testing/mock-session-store.js.map +1 -1
- package/package.json +2 -1
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts +0 -38
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts.map +0 -1
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js +0 -155
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js.map +0 -1
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts +0 -27
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts.map +0 -1
- package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js.map +0 -1
- /package/dist/components/multi-agent-orchestration/agent/{scheduled-job-manager → secret-manager}/types.js +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** A wrapped data key and the master key that wrapped it. */
|
|
2
|
+
export interface WrappedKey {
|
|
3
|
+
keyId: string;
|
|
4
|
+
/** Opaque bytes only the provider can unwrap. */
|
|
5
|
+
wrapped: Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The port a host implements for its key management: the SDK ships LocalSecretHubProvider;
|
|
9
|
+
* hosts plug in AWS KMS, GCP KMS, Azure Key Vault or Vault Transit through
|
|
10
|
+
* AgentCore.useSecretHubProvider.
|
|
11
|
+
*/
|
|
12
|
+
export interface SecretHubProvider {
|
|
13
|
+
/** Names the provider in status reports ("local", "aws-kms"…). */
|
|
14
|
+
readonly id: string;
|
|
15
|
+
/** The master key new data keys are wrapped with. */
|
|
16
|
+
currentKeyId(): string;
|
|
17
|
+
/** Wrap a data key with the current master key. */
|
|
18
|
+
wrapKey(dataKey: Uint8Array): Promise<WrappedKey>;
|
|
19
|
+
/**
|
|
20
|
+
* Unwrap a data key wrapped by `keyId` — the current key or an older one the provider
|
|
21
|
+
* still holds (rotation). Rejects when it doesn't hold that key or the bytes are bad.
|
|
22
|
+
*/
|
|
23
|
+
unwrapKey(wrapped: Uint8Array, keyId: string): Promise<Uint8Array>;
|
|
24
|
+
/**
|
|
25
|
+
* Keys that opened the A-100 single-key format (enc:v1: AES-256-GCM, key =
|
|
26
|
+
* SHA-256(secret)), so values written before A-101 stay readable. Optional.
|
|
27
|
+
*/
|
|
28
|
+
legacyKeys?(): Uint8Array[];
|
|
29
|
+
}
|
|
30
|
+
/** AES-256-GCM: iv[12] | ciphertext | tag[16] — the layout every format here uses. */
|
|
31
|
+
export declare function gcmSeal(key: Uint8Array, plain: Uint8Array, aad?: Uint8Array): Buffer;
|
|
32
|
+
/** Opens gcmSeal's output; throws when the key, AAD or bytes don't match. */
|
|
33
|
+
export declare function gcmOpen(key: Uint8Array, sealed: Uint8Array, aad?: Uint8Array): Buffer;
|
|
34
|
+
/** SHA-256 of a master secret — the AES key LocalSecretHubProvider (and the enc:v1 format) uses. */
|
|
35
|
+
export declare function deriveKey(secret: string): Buffer;
|
|
36
|
+
/** The id of a local master secret: "local:" + 12 hex chars of a hash that reveals nothing about it. */
|
|
37
|
+
export declare function localKeyId(secret: string): string;
|
|
38
|
+
export interface LocalSecretHubProviderOptions {
|
|
39
|
+
/** The master secret new data keys are wrapped with (e.g. AEC_SECRET_KEY). */
|
|
40
|
+
current: string;
|
|
41
|
+
/** Older master secrets, still accepted for reading until a rotation re-seals their values. */
|
|
42
|
+
previous?: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Master keys held by the host process — derived from secrets it is given (environment
|
|
46
|
+
* variables). Each secret's id is derived from it, so rotating is: make the new secret
|
|
47
|
+
* `current`, move the old one to `previous`, run the rotation, then drop the old one.
|
|
48
|
+
*/
|
|
49
|
+
export declare class LocalSecretHubProvider implements SecretHubProvider {
|
|
50
|
+
readonly id = "local";
|
|
51
|
+
private readonly current;
|
|
52
|
+
private readonly keys;
|
|
53
|
+
constructor(options: LocalSecretHubProviderOptions);
|
|
54
|
+
/** A provider with a random master key that lives as long as the process (tests, in-memory stores). */
|
|
55
|
+
static ephemeral(): LocalSecretHubProvider;
|
|
56
|
+
currentKeyId(): string;
|
|
57
|
+
wrapKey(dataKey: Uint8Array): Promise<WrappedKey>;
|
|
58
|
+
unwrapKey(wrapped: Uint8Array, keyId: string): Promise<Uint8Array>;
|
|
59
|
+
legacyKeys(): Uint8Array[];
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=secret-hub-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-hub-provider.d.ts","sourceRoot":"","sources":["../../../src/components/secret-hub/secret-hub-provider.ts"],"names":[],"mappings":"AAQA,6DAA6D;AAC7D,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;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G,MAAM,CAAC,SAAS,IAAI,sBAAsB,CAEzC;IAED,YAAY,IAAI,MAAM,CAErB;IAEK,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAEtD;IAEK,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAIvE;IAED,UAAU,IAAI,UAAU,EAAE,CAEzB;CACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
2
|
+
const IV_BYTES = 12;
|
|
3
|
+
const TAG_BYTES = 16;
|
|
4
|
+
/** AES-256-GCM: iv[12] | ciphertext | tag[16] — the layout every format here uses. */
|
|
5
|
+
export function gcmSeal(key, plain, aad) {
|
|
6
|
+
const iv = randomBytes(IV_BYTES);
|
|
7
|
+
const cipher = createCipheriv("aes-256-gcm", key, iv);
|
|
8
|
+
if (aad && aad.length)
|
|
9
|
+
cipher.setAAD(aad);
|
|
10
|
+
const body = Buffer.concat([cipher.update(plain), cipher.final()]);
|
|
11
|
+
return Buffer.concat([iv, body, cipher.getAuthTag()]);
|
|
12
|
+
}
|
|
13
|
+
/** Opens gcmSeal's output; throws when the key, AAD or bytes don't match. */
|
|
14
|
+
export function gcmOpen(key, sealed, aad) {
|
|
15
|
+
if (sealed.length < IV_BYTES + TAG_BYTES)
|
|
16
|
+
throw new Error("sealed data is too short");
|
|
17
|
+
const buf = Buffer.from(sealed);
|
|
18
|
+
const decipher = createDecipheriv("aes-256-gcm", key, buf.subarray(0, IV_BYTES));
|
|
19
|
+
if (aad && aad.length)
|
|
20
|
+
decipher.setAAD(aad);
|
|
21
|
+
decipher.setAuthTag(buf.subarray(buf.length - TAG_BYTES));
|
|
22
|
+
return Buffer.concat([decipher.update(buf.subarray(IV_BYTES, buf.length - TAG_BYTES)), decipher.final()]);
|
|
23
|
+
}
|
|
24
|
+
/** SHA-256 of a master secret — the AES key LocalSecretHubProvider (and the enc:v1 format) uses. */
|
|
25
|
+
export function deriveKey(secret) {
|
|
26
|
+
return createHash("sha256").update(secret, "utf8").digest();
|
|
27
|
+
}
|
|
28
|
+
/** The id of a local master secret: "local:" + 12 hex chars of a hash that reveals nothing about it. */
|
|
29
|
+
export function localKeyId(secret) {
|
|
30
|
+
return "local:" + createHash("sha256").update("aec-key-id:" + secret, "utf8").digest("hex").slice(0, 12);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Master keys held by the host process — derived from secrets it is given (environment
|
|
34
|
+
* variables). Each secret's id is derived from it, so rotating is: make the new secret
|
|
35
|
+
* `current`, move the old one to `previous`, run the rotation, then drop the old one.
|
|
36
|
+
*/
|
|
37
|
+
export class LocalSecretHubProvider {
|
|
38
|
+
id = "local";
|
|
39
|
+
current;
|
|
40
|
+
keys = new Map();
|
|
41
|
+
constructor(options) {
|
|
42
|
+
const current = options.current?.trim();
|
|
43
|
+
if (!current)
|
|
44
|
+
throw new Error("LocalSecretHubProvider needs a master secret");
|
|
45
|
+
this.current = { id: localKeyId(current), key: deriveKey(current) };
|
|
46
|
+
this.keys.set(this.current.id, this.current.key);
|
|
47
|
+
for (const secret of options.previous ?? []) {
|
|
48
|
+
const s = secret.trim();
|
|
49
|
+
if (s && !this.keys.has(localKeyId(s)))
|
|
50
|
+
this.keys.set(localKeyId(s), deriveKey(s));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** A provider with a random master key that lives as long as the process (tests, in-memory stores). */
|
|
54
|
+
static ephemeral() {
|
|
55
|
+
return new LocalSecretHubProvider({ current: randomBytes(32).toString("base64") });
|
|
56
|
+
}
|
|
57
|
+
currentKeyId() {
|
|
58
|
+
return this.current.id;
|
|
59
|
+
}
|
|
60
|
+
async wrapKey(dataKey) {
|
|
61
|
+
return { keyId: this.current.id, wrapped: gcmSeal(this.current.key, dataKey) };
|
|
62
|
+
}
|
|
63
|
+
async unwrapKey(wrapped, keyId) {
|
|
64
|
+
const key = this.keys.get(keyId);
|
|
65
|
+
if (!key)
|
|
66
|
+
throw new Error(`master key "${keyId}" is not configured`);
|
|
67
|
+
return gcmOpen(key, wrapped);
|
|
68
|
+
}
|
|
69
|
+
legacyKeys() {
|
|
70
|
+
return [...this.keys.values()];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=secret-hub-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-hub-provider.js","sourceRoot":"","sources":["../../../src/components/secret-hub/secret-hub-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuCxF,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,sFAAsF;AACtF,MAAM,UAAU,OAAO,CAAC,GAAe,EAAE,KAAiB,EAAE,GAAgB;IAC1E,MAAM,EAAE,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,cAAc,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACtD,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM;QAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,OAAO,CAAC,GAAe,EAAE,MAAkB,EAAE,GAAgB;IAC3E,IAAI,MAAM,CAAC,MAAM,GAAG,QAAQ,GAAG,SA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M,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,KAAK,qBAAqB,CAAC,CAAC;QACrE,OAAO,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { EventBus } from "../event-handler/types.js";
|
|
2
|
+
import type { SecretStore } from "../persistence-hub/types/secret-store.js";
|
|
3
|
+
import { SecretSealer, type SecretSealerOptions } from "./envelope.js";
|
|
4
|
+
import type { SecretHubProvider } from "./secret-hub-provider.js";
|
|
5
|
+
import { SecretRedactor } from "./rules.js";
|
|
6
|
+
import { type SecretCreator, type SecretDefinition, type SecretInfo, type SecretStatus, type SecretUse } from "./types.js";
|
|
7
|
+
/** What creating a secret takes: its definition, its value and who owns it. */
|
|
8
|
+
export interface CreateSecretInput extends SecretDefinition {
|
|
9
|
+
value: string;
|
|
10
|
+
/** The owning agent; absent = a global secret. */
|
|
11
|
+
ownerAgentId?: string;
|
|
12
|
+
createdBy?: SecretCreator;
|
|
13
|
+
}
|
|
14
|
+
/** The outcome of a rotation: secrets re-sealed under the current master key, and those that failed. */
|
|
15
|
+
export interface RotationResult {
|
|
16
|
+
resealed: number;
|
|
17
|
+
unchanged: number;
|
|
18
|
+
failed: Array<{
|
|
19
|
+
ownerAgentId?: string;
|
|
20
|
+
name: string;
|
|
21
|
+
error: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Global hub for secrets (A-101) — like the SkillHub, one per AgentCore.
|
|
26
|
+
* - Seals values with envelope encryption under the current SecretHubProvider (`useSecretHubProvider`);
|
|
27
|
+
* hosts also use `seal` / `open` for their own credential columns, so every secret at
|
|
28
|
+
* rest goes through one place and one rotation.
|
|
29
|
+
* - Keeps the owner rules: a global secret ("" owner) or an agent's own secret.
|
|
30
|
+
* - `reveal` hands a value to a tool after checking the use (allowed tool and host); only
|
|
31
|
+
* the SDK calls it — the model never gets a value.
|
|
32
|
+
* Publishes secret:created / updated / deleted (awaited) and emits secret:used — names only.
|
|
33
|
+
*/
|
|
34
|
+
export declare class SecretHub {
|
|
35
|
+
private getStore;
|
|
36
|
+
readonly sealer: SecretSealer;
|
|
37
|
+
/**
|
|
38
|
+
* Every value revealed in this process, so tool output that echoes one (an API that
|
|
39
|
+
* returns the key, `echo $KEY`) is redacted before the model, a store or the UI sees it.
|
|
40
|
+
* Process-wide: a value one agent used is redacted in every agent's output.
|
|
41
|
+
*/
|
|
42
|
+
readonly redactor: SecretRedactor;
|
|
43
|
+
private secretHubProvider?;
|
|
44
|
+
private readonly eventBus;
|
|
45
|
+
/** @param getStore resolved on every call, so `AgentCore.usePersistence()` can swap the store. */
|
|
46
|
+
constructor(getStore: () => SecretStore, options?: {
|
|
47
|
+
eventBus?: EventBus;
|
|
48
|
+
secretHubProvider?: SecretHubProvider;
|
|
49
|
+
sealer?: SecretSealerOptions;
|
|
50
|
+
});
|
|
51
|
+
/** Set the SecretHub provider new values are sealed with (and stored ones opened with). */
|
|
52
|
+
useSecretHubProvider(provider: SecretHubProvider | undefined): void;
|
|
53
|
+
/** The SecretHub provider in use, if any. */
|
|
54
|
+
get provider(): SecretHubProvider | undefined;
|
|
55
|
+
/** Seal a value under the current master key; `aad` binds it to where it is stored. */
|
|
56
|
+
seal(plain: string, aad?: string): Promise<string>;
|
|
57
|
+
/** Open a value sealed by `seal` (or enc:v1, or plain text). Throws SecretError("decrypt_failed"). */
|
|
58
|
+
open(stored: string, aad?: string): Promise<string>;
|
|
59
|
+
/** One secret's metadata, or undefined. */
|
|
60
|
+
get(ownerAgentId: string | undefined, name: string): Promise<SecretInfo | undefined>;
|
|
61
|
+
/** Secrets of one owner (undefined = global), sorted by name. */
|
|
62
|
+
list(ownerAgentId?: string): Promise<SecretInfo[]>;
|
|
63
|
+
/** Every secret, globals first (for status and rotation views). */
|
|
64
|
+
listAll(): Promise<SecretInfo[]>;
|
|
65
|
+
/** Store a new secret. Throws SecretError ("invalid_argument", "already_exists"). */
|
|
66
|
+
create(input: CreateSecretInput): Promise<SecretInfo>;
|
|
67
|
+
/** Change a secret's description, hosts or tools (its value stays). */
|
|
68
|
+
update(ownerAgentId: string | undefined, name: string, patch: Omit<SecretDefinition, "name">): Promise<SecretInfo>;
|
|
69
|
+
/** Give a secret a new value (the key was rotated at its issuer). */
|
|
70
|
+
setValue(ownerAgentId: string | undefined, name: string, value: string): Promise<SecretInfo>;
|
|
71
|
+
/** Delete a secret; publishes secret:deleted (a global one is dropped from every agent that used it). */
|
|
72
|
+
delete(ownerAgentId: string | undefined, name: string): Promise<void>;
|
|
73
|
+
/** Delete every secret an agent owns (the agent is being deleted). */
|
|
74
|
+
deleteByOwner(agentId: string): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* A secret's value for a tool — after checking that `use.tool` may use it and (when
|
|
77
|
+
* set) that `use.host` is allowed. Records the use and emits secret:used.
|
|
78
|
+
* For the SDK's own use (tool execution); never hand the result to a model.
|
|
79
|
+
*/
|
|
80
|
+
reveal(ownerAgentId: string | undefined, name: string, use: SecretUse, context?: {
|
|
81
|
+
agentId?: string;
|
|
82
|
+
sessionId?: string;
|
|
83
|
+
}): Promise<string>;
|
|
84
|
+
/** How stored secrets are sealed: per master key, legacy enc:v1, plain. */
|
|
85
|
+
status(): Promise<SecretStatus>;
|
|
86
|
+
/**
|
|
87
|
+
* Re-seal every secret that isn't sealed with the current master key (an older key,
|
|
88
|
+
* enc:v1 or plain text). Safe to run while serving and to run again; a secret that
|
|
89
|
+
* can't be opened is reported and left as it is. Hosts re-seal their own columns too.
|
|
90
|
+
*/
|
|
91
|
+
rotate(): Promise<RotationResult>;
|
|
92
|
+
/**
|
|
93
|
+
* Startup check: a seal/open round trip with the current key, and one unwrap per master
|
|
94
|
+
* key the stored secrets use. Returns the problems found (empty = all good).
|
|
95
|
+
*/
|
|
96
|
+
selfCheck(): Promise<string[]>;
|
|
97
|
+
private require;
|
|
98
|
+
private publish;
|
|
99
|
+
}
|
|
100
|
+
/** The AAD a secret's value is sealed with — binds it to its owner and name. */
|
|
101
|
+
export declare function aadFor(owner: string, name: string): string;
|
|
102
|
+
//# sourceMappingURL=secret-hub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-hub.d.ts","sourceRoot":"","sources":["../../../src/components/secret-hub/secret-hub.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAgB,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAoE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9G,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EAEf,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,wGAAwG;AACxG,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EA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
|
3
|
+
import { SecretSealer, sealedFormat } from "./envelope.js";
|
|
4
|
+
import { checkSecretName, checkSecretValue, checkUse, normalizeDefinition, SecretRedactor } from "./rules.js";
|
|
5
|
+
import { SECRET_LIMITS, } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Global hub for secrets (A-101) — like the SkillHub, one per AgentCore.
|
|
8
|
+
* - Seals values with envelope encryption under the current SecretHubProvider (`useSecretHubProvider`);
|
|
9
|
+
* hosts also use `seal` / `open` for their own credential columns, so every secret at
|
|
10
|
+
* rest goes through one place and one rotation.
|
|
11
|
+
* - Keeps the owner rules: a global secret ("" owner) or an agent's own secret.
|
|
12
|
+
* - `reveal` hands a value to a tool after checking the use (allowed tool and host); only
|
|
13
|
+
* the SDK calls it — the model never gets a value.
|
|
14
|
+
* Publishes secret:created / updated / deleted (awaited) and emits secret:used — names only.
|
|
15
|
+
*/
|
|
16
|
+
export class SecretHub {
|
|
17
|
+
getStore;
|
|
18
|
+
sealer;
|
|
19
|
+
/**
|
|
20
|
+
* Every value revealed in this process, so tool output that echoes one (an API that
|
|
21
|
+
* returns the key, `echo $KEY`) is redacted before the model, a store or the UI sees it.
|
|
22
|
+
* Process-wide: a value one agent used is redacted in every agent's output.
|
|
23
|
+
*/
|
|
24
|
+
redactor = new SecretRedactor();
|
|
25
|
+
secretHubProvider;
|
|
26
|
+
eventBus;
|
|
27
|
+
/** @param getStore resolved on every call, so `AgentCore.usePersistence()` can swap the store. */
|
|
28
|
+
constructor(getStore, options = {}) {
|
|
29
|
+
this.getStore = getStore;
|
|
30
|
+
this.eventBus = options.eventBus;
|
|
31
|
+
this.secretHubProvider = options.secretHubProvider;
|
|
32
|
+
this.sealer = new SecretSealer(() => this.secretHubProvider, options.sealer);
|
|
33
|
+
}
|
|
34
|
+
/** Set the SecretHub provider new values are sealed with (and stored ones opened with). */
|
|
35
|
+
useSecretHubProvider(provider) {
|
|
36
|
+
this.secretHubProvider = provider;
|
|
37
|
+
this.sealer.clearCache();
|
|
38
|
+
}
|
|
39
|
+
/** The SecretHub provider in use, if any. */
|
|
40
|
+
get provider() {
|
|
41
|
+
return this.secretHubProvider;
|
|
42
|
+
}
|
|
43
|
+
// ── Sealing (also for hosts' own columns) ──
|
|
44
|
+
/** Seal a value under the current master key; `aad` binds it to where it is stored. */
|
|
45
|
+
seal(plain, aad = "") {
|
|
46
|
+
return this.sealer.seal(plain, aad);
|
|
47
|
+
}
|
|
48
|
+
/** Open a value sealed by `seal` (or enc:v1, or plain text). Throws SecretError("decrypt_failed"). */
|
|
49
|
+
open(stored, aad = "") {
|
|
50
|
+
return this.sealer.open(stored, aad);
|
|
51
|
+
}
|
|
52
|
+
// ── Secrets ──
|
|
53
|
+
/** One secret's metadata, or undefined. */
|
|
54
|
+
async get(ownerAgentId, name) {
|
|
55
|
+
const s = await this.getStore().get(ownerAgentId ?? "", name);
|
|
56
|
+
return s ? info(s) : undefined;
|
|
57
|
+
}
|
|
58
|
+
/** Secrets of one owner (undefined = global), sorted by name. */
|
|
59
|
+
async list(ownerAgentId) {
|
|
60
|
+
return (await this.getStore().list(ownerAgentId ?? "")).map(info);
|
|
61
|
+
}
|
|
62
|
+
/** Every secret, globals first (for status and rotation views). */
|
|
63
|
+
async listAll() {
|
|
64
|
+
return (await this.getStore().list()).map(info);
|
|
65
|
+
}
|
|
66
|
+
/** Store a new secret. Throws SecretError ("invalid_argument", "already_exists"). */
|
|
67
|
+
async create(input) {
|
|
68
|
+
const name = checkSecretName(input.name);
|
|
69
|
+
const value = checkSecretValue(input.value);
|
|
70
|
+
const owner = input.ownerAgentId ?? "";
|
|
71
|
+
const meta = normalizeDefinition(input);
|
|
72
|
+
const store = this.getStore();
|
|
73
|
+
if (await store.get(owner, name)) {
|
|
74
|
+
throw new SecretError(`a secret named ${name} already exists${owner ? " for this agent" : ""}`, "already_exists");
|
|
75
|
+
}
|
|
76
|
+
if ((await store.list(owner)).length >= SECRET_LIMITS.perOwner) {
|
|
77
|
+
throw new SecretError(`at most ${SECRET_LIMITS.perOwner} secrets${owner ? " per agent" : ""}`, "invalid_argument");
|
|
78
|
+
}
|
|
79
|
+
const now = new Date().toISOString();
|
|
80
|
+
const sealed = await this.seal(value, aadFor(owner, name));
|
|
81
|
+
const secret = {
|
|
82
|
+
name,
|
|
83
|
+
...(owner ? { ownerAgentId: owner } : {}),
|
|
84
|
+
...meta,
|
|
85
|
+
keyId: keyIdOf(sealed),
|
|
86
|
+
createdBy: input.createdBy ?? "user",
|
|
87
|
+
createdAt: now,
|
|
88
|
+
updatedAt: now,
|
|
89
|
+
value: sealed,
|
|
90
|
+
};
|
|
91
|
+
await store.save(secret);
|
|
92
|
+
await this.publish(SDKEventType.SecretCreated, secret);
|
|
93
|
+
return info(secret);
|
|
94
|
+
}
|
|
95
|
+
/** Change a secret's description, hosts or tools (its value stays). */
|
|
96
|
+
async update(ownerAgentId, name, patch) {
|
|
97
|
+
const existing = await this.require(ownerAgentId, name);
|
|
98
|
+
const secret = { ...existing, ...normalizeDefinition(patch, existing), updatedAt: new Date().toISOString() };
|
|
99
|
+
if (patch.description !== undefined && !secret.description)
|
|
100
|
+
delete secret.description;
|
|
101
|
+
await this.getStore().save(secret);
|
|
102
|
+
await this.publish(SDKEventType.SecretUpdated, secret, { valueChanged: false });
|
|
103
|
+
return info(secret);
|
|
104
|
+
}
|
|
105
|
+
/** Give a secret a new value (the key was rotated at its issuer). */
|
|
106
|
+
async setValue(ownerAgentId, name, value) {
|
|
107
|
+
const existing = await this.require(ownerAgentId, name);
|
|
108
|
+
const sealed = await this.seal(checkSecretValue(value), aadFor(existing.ownerAgentId ?? "", name));
|
|
109
|
+
const secret = { ...existing, value: sealed, keyId: keyIdOf(sealed), updatedAt: new Date().toISOString() };
|
|
110
|
+
await this.getStore().save(secret);
|
|
111
|
+
await this.publish(SDKEventType.SecretUpdated, secret, { valueChanged: true });
|
|
112
|
+
return info(secret);
|
|
113
|
+
}
|
|
114
|
+
/** Delete a secret; publishes secret:deleted (a global one is dropped from every agent that used it). */
|
|
115
|
+
async delete(ownerAgentId, name) {
|
|
116
|
+
const existing = await this.require(ownerAgentId, name);
|
|
117
|
+
await this.getStore().delete(existing.ownerAgentId ?? "", name);
|
|
118
|
+
await this.publish(SDKEventType.SecretDeleted, existing);
|
|
119
|
+
}
|
|
120
|
+
/** Delete every secret an agent owns (the agent is being deleted). */
|
|
121
|
+
async deleteByOwner(agentId) {
|
|
122
|
+
if (agentId)
|
|
123
|
+
await this.getStore().deleteByOwner(agentId);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A secret's value for a tool — after checking that `use.tool` may use it and (when
|
|
127
|
+
* set) that `use.host` is allowed. Records the use and emits secret:used.
|
|
128
|
+
* For the SDK's own use (tool execution); never hand the result to a model.
|
|
129
|
+
*/
|
|
130
|
+
async reveal(ownerAgentId, name, use, context = {}) {
|
|
131
|
+
const secret = await this.require(ownerAgentId, name);
|
|
132
|
+
checkUse(secret, use);
|
|
133
|
+
const value = await this.open(secret.value, aadFor(secret.ownerAgentId ?? "", name));
|
|
134
|
+
this.redactor.add(name, value);
|
|
135
|
+
const at = new Date().toISOString();
|
|
136
|
+
await this.getStore()
|
|
137
|
+
.markUsed(secret.ownerAgentId ?? "", name, at)
|
|
138
|
+
.catch((err) => console.warn(`[secrets] could not record a use of ${name}:`, err));
|
|
139
|
+
this.eventBus?.emit({
|
|
140
|
+
type: SDKEventType.SecretUsed,
|
|
141
|
+
sessionId: context.sessionId ?? "",
|
|
142
|
+
payload: {
|
|
143
|
+
name,
|
|
144
|
+
...(secret.ownerAgentId ? { ownerAgentId: secret.ownerAgentId } : {}),
|
|
145
|
+
...(context.agentId ? { agentId: context.agentId } : {}),
|
|
146
|
+
tool: use.tool,
|
|
147
|
+
...(use.host ? { host: use.host } : {}),
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
return value;
|
|
151
|
+
}
|
|
152
|
+
// ── Keys ──
|
|
153
|
+
/** How stored secrets are sealed: per master key, legacy enc:v1, plain. */
|
|
154
|
+
async status() {
|
|
155
|
+
const status = {
|
|
156
|
+
provider: this.secretHubProvider?.id ?? "none",
|
|
157
|
+
currentKeyId: this.secretHubProvider?.currentKeyId() ?? "",
|
|
158
|
+
byKeyId: {},
|
|
159
|
+
legacy: 0,
|
|
160
|
+
plain: 0,
|
|
161
|
+
};
|
|
162
|
+
for (const s of await this.getStore().list()) {
|
|
163
|
+
const f = sealedFormat(s.value);
|
|
164
|
+
if (f.format === "v2")
|
|
165
|
+
status.byKeyId[f.keyId] = (status.byKeyId[f.keyId] ?? 0) + 1;
|
|
166
|
+
else if (f.format === "v1")
|
|
167
|
+
status.legacy++;
|
|
168
|
+
else
|
|
169
|
+
status.plain++;
|
|
170
|
+
}
|
|
171
|
+
return status;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Re-seal every secret that isn't sealed with the current master key (an older key,
|
|
175
|
+
* enc:v1 or plain text). Safe to run while serving and to run again; a secret that
|
|
176
|
+
* can't be opened is reported and left as it is. Hosts re-seal their own columns too.
|
|
177
|
+
*/
|
|
178
|
+
async rotate() {
|
|
179
|
+
const result = { resealed: 0, unchanged: 0, failed: [] };
|
|
180
|
+
if (!this.secretHubProvider)
|
|
181
|
+
throw new SecretError("no SecretHub provider is set — there is no key to rotate to", "unavailable");
|
|
182
|
+
const store = this.getStore();
|
|
183
|
+
for (const s of await store.list()) {
|
|
184
|
+
if (!this.sealer.needsReseal(s.value)) {
|
|
185
|
+
result.unchanged++;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const aad = aadFor(s.ownerAgentId ?? "", s.name);
|
|
189
|
+
try {
|
|
190
|
+
// enc:v1 and plain values were stored without the AAD.
|
|
191
|
+
const plain = await this.open(s.value, sealedFormat(s.value).format === "v2" ? aad : "");
|
|
192
|
+
const sealed = await this.seal(plain, aad);
|
|
193
|
+
// Re-read so a value changed meanwhile is not overwritten with the old one.
|
|
194
|
+
const current = await store.get(s.ownerAgentId ?? "", s.name);
|
|
195
|
+
if (!current || current.value !== s.value) {
|
|
196
|
+
result.unchanged++;
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
await store.save({ ...current, value: sealed, keyId: keyIdOf(sealed) });
|
|
200
|
+
result.resealed++;
|
|
201
|
+
}
|
|
202
|
+
catch (err) {
|
|
203
|
+
result.failed.push({ ...(s.ownerAgentId ? { ownerAgentId: s.ownerAgentId } : {}), name: s.name, error: err instanceof Error ? err.message : String(err) });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Startup check: a seal/open round trip with the current key, and one unwrap per master
|
|
210
|
+
* key the stored secrets use. Returns the problems found (empty = all good).
|
|
211
|
+
*/
|
|
212
|
+
async selfCheck() {
|
|
213
|
+
const problems = [];
|
|
214
|
+
if (!this.secretHubProvider)
|
|
215
|
+
return problems;
|
|
216
|
+
try {
|
|
217
|
+
const probe = "aec-key-check";
|
|
218
|
+
if ((await this.open(await this.seal(probe, "check"), "check")) !== probe)
|
|
219
|
+
problems.push("the SecretHub provider round trip returned a different value");
|
|
220
|
+
}
|
|
221
|
+
catch (err) {
|
|
222
|
+
problems.push(err instanceof Error ? err.message : String(err));
|
|
223
|
+
}
|
|
224
|
+
const seen = new Set();
|
|
225
|
+
for (const s of await this.getStore().list()) {
|
|
226
|
+
const f = sealedFormat(s.value);
|
|
227
|
+
const id = f.format === "v2" ? f.keyId : f.format === "v1" ? "enc:v1" : undefined;
|
|
228
|
+
if (!id || seen.has(id))
|
|
229
|
+
continue;
|
|
230
|
+
seen.add(id);
|
|
231
|
+
try {
|
|
232
|
+
await this.open(s.value, f.format === "v2" ? aadFor(s.ownerAgentId ?? "", s.name) : "");
|
|
233
|
+
}
|
|
234
|
+
catch (err) {
|
|
235
|
+
problems.push(`secrets sealed with ${id} can't be opened: ${err instanceof Error ? err.message : String(err)}`);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return problems;
|
|
239
|
+
}
|
|
240
|
+
async require(ownerAgentId, name) {
|
|
241
|
+
const found = await this.getStore().get(ownerAgentId ?? "", name);
|
|
242
|
+
if (!found)
|
|
243
|
+
throw new SecretError(`no secret named ${name}${ownerAgentId ? " for this agent" : ""}`, "not_found");
|
|
244
|
+
return found;
|
|
245
|
+
}
|
|
246
|
+
async publish(type, secret, extra = {}) {
|
|
247
|
+
await this.eventBus?.publish({
|
|
248
|
+
type,
|
|
249
|
+
sessionId: "",
|
|
250
|
+
payload: { name: secret.name, ...(secret.ownerAgentId ? { ownerAgentId: secret.ownerAgentId } : {}), ...extra },
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** The AAD a secret's value is sealed with — binds it to its owner and name. */
|
|
255
|
+
export function aadFor(owner, name) {
|
|
256
|
+
return `secret:${owner || "global"}:${name}`;
|
|
257
|
+
}
|
|
258
|
+
function keyIdOf(sealed) {
|
|
259
|
+
const f = sealedFormat(sealed);
|
|
260
|
+
return f.format === "v2" ? f.keyId : "";
|
|
261
|
+
}
|
|
262
|
+
/** A stored secret without its value. */
|
|
263
|
+
function info(s) {
|
|
264
|
+
const { value: _value, ...rest } = s;
|
|
265
|
+
return { ...rest, allowedHosts: [...s.allowedHosts], allowedTools: [...s.allowedTools] };
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=secret-hub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-hub.js","sourceRoot":"","sources":["../../../src/components/secret-hub/secret-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAA4B,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9G,OAA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 @@
|
|
|
1
|
+
/** Who created the secret: a person (through the host's UI/API) or an agent (manage_secret). */
|
|
2
|
+
export type SecretCreator = "user" | "agent";
|
|
3
|
+
/** What a secret is created or updated from — never the value itself. */
|
|
4
|
+
export interface SecretDefinition {
|
|
5
|
+
/**
|
|
6
|
+
* Upper-case letters, digits and underscores, starting with a letter (max 64) — the
|
|
7
|
+
* name the model writes in {{secret:NAME}} and the environment variable a sandbox
|
|
8
|
+
* command sees.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/** What the key is for — shown to the model in <available_secrets>. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Hosts http_request may send it to: "api.example.com", or "*.example.com" for its
|
|
15
|
+
* subdomains. Empty = no host (the secret can't be sent anywhere until hosts are set).
|
|
16
|
+
*/
|
|
17
|
+
allowedHosts?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Tools that may use it ("http_request", "terminal", "run_code"). Default: ["http_request"].
|
|
20
|
+
* A sandbox tool gets the value as an environment variable, so a host can't be enforced there.
|
|
21
|
+
*/
|
|
22
|
+
allowedTools?: string[];
|
|
23
|
+
}
|
|
24
|
+
/** A secret's metadata — what lists, tools and APIs show. Never carries the value. */
|
|
25
|
+
export interface SecretInfo {
|
|
26
|
+
name: string;
|
|
27
|
+
/** The agent that owns it; absent = a global secret, usable by the agents that enable it. */
|
|
28
|
+
ownerAgentId?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
allowedHosts: string[];
|
|
31
|
+
allowedTools: string[];
|
|
32
|
+
/** The master key that wraps its data key ("" = stored without encryption: no SecretHub provider). */
|
|
33
|
+
keyId: string;
|
|
34
|
+
createdBy: SecretCreator;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
lastUsedAt?: string;
|
|
38
|
+
}
|
|
39
|
+
/** A secret as a SecretStore keeps it: the metadata plus the sealed value. */
|
|
40
|
+
export interface StoredSecret extends SecretInfo {
|
|
41
|
+
/** The value as sealSecret wrote it ("enc:v2:…"; plain text only when no SecretHub provider is set). */
|
|
42
|
+
value: string;
|
|
43
|
+
}
|
|
44
|
+
/** How a tool wants to use a secret — checked against allowedTools / allowedHosts. */
|
|
45
|
+
export interface SecretUse {
|
|
46
|
+
tool: string;
|
|
47
|
+
/** The host the value is sent to (http_request); absent for sandbox tools. */
|
|
48
|
+
host?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Counts of stored values by how they are sealed (A-101 status / rotation). */
|
|
51
|
+
export interface SecretStatus {
|
|
52
|
+
/** The SecretHub provider's id ("none" when values are stored without encryption). */
|
|
53
|
+
provider: string;
|
|
54
|
+
/** The master key new values are sealed with ("" without a provider). */
|
|
55
|
+
currentKeyId: string;
|
|
56
|
+
/** Secrets per master key id (envelope-encrypted, enc:v2). */
|
|
57
|
+
byKeyId: Record<string, number>;
|
|
58
|
+
/** Secrets still in the A-100 single-key format (enc:v1). */
|
|
59
|
+
legacy: number;
|
|
60
|
+
/** Secrets stored as plain text. */
|
|
61
|
+
plain: number;
|
|
62
|
+
}
|
|
63
|
+
export declare const SECRET_LIMITS: {
|
|
64
|
+
readonly name: 64;
|
|
65
|
+
readonly description: 500;
|
|
66
|
+
/** Bytes of a value. */
|
|
67
|
+
readonly value: 16384;
|
|
68
|
+
readonly hosts: 32;
|
|
69
|
+
readonly tools: 16;
|
|
70
|
+
/** Secrets per owner (an agent, or the global library). */
|
|
71
|
+
readonly perOwner: 200;
|
|
72
|
+
};
|
|
73
|
+
/** Tools that use secrets in the SDK; allowedTools may name others (an app's own tools). */
|
|
74
|
+
export declare const SECRET_TOOLS: readonly ["http_request", "terminal", "run_code"];
|
|
75
|
+
/** Default allowedTools of a new secret. */
|
|
76
|
+
export declare const DEFAULT_SECRET_TOOLS: readonly string[];
|
|
77
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/secret-hub/types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