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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traced-sandbox.js","sourceRoot":"","sources":["../../../src/components/sandbox-hub/traced-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAOpE;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,GAAgB,EAChB,SAA6B,EAC7B,OAAO,GAA6C,EAAE;IAEtD,MAAM,IAAI,GAAG;QACX,SAAS,EAAE,GAAG,CAAC,EAAE;QACjB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI;QACrB,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO;QAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;IAEF,KAAK,UAAU,MAAM,CACnB,SAAiB,EACjB,UAAmC,EACnC,GAAqB,EACrB,SAAiD;QAEjD,MAAM,IAAI,GAAG,SAAS,CAAC,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5B,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CAAC;gBACP,KAAK,EAAE,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;gBAC3D,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAChE,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;QACd,CAAC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,EAAE,EAAE,CAC3F,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,WAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;aAC1H;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3D,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
import type { Duplex } from "node:stream";
|
|
1
2
|
export type SandboxKind = "docker" | "host" | "remote";
|
|
2
3
|
export type SandboxCapability = "fs.read" | "fs.write" | "fs.search" | "exec"
|
|
3
4
|
/** exec with `shell: true` (sh -c / cmd /c) — separate so sandboxes can offer argv-only exec. */
|
|
4
|
-
| "exec.shell"
|
|
5
|
+
| "exec.shell"
|
|
6
|
+
/**
|
|
7
|
+
* A-124: readStream / writeStream — raw bytes (images, fonts, wasm, models), byte
|
|
8
|
+
* ranges and files bigger than maxReadBytes / maxWriteBytes. Sandboxes without it
|
|
9
|
+
* leave both methods out.
|
|
10
|
+
*/
|
|
11
|
+
| "fs.stream"
|
|
12
|
+
/**
|
|
13
|
+
* A-124 phase 2: long-running services (dev servers) — startService / stopService /
|
|
14
|
+
* listServices / serviceLogs, and connect() to a port inside the sandbox. Sandboxes
|
|
15
|
+
* without it leave those methods out.
|
|
16
|
+
*/
|
|
17
|
+
| "services";
|
|
5
18
|
/** What kind of place this is — policy (e.g. approvals) decides from traits, not from the kind name. */
|
|
6
19
|
export interface SandboxTraits {
|
|
7
20
|
kind: SandboxKind;
|
|
@@ -105,6 +118,69 @@ export interface SearchResult {
|
|
|
105
118
|
matches: SearchMatch[];
|
|
106
119
|
truncated: boolean;
|
|
107
120
|
}
|
|
121
|
+
export interface ReadStreamOptions extends OpOptions {
|
|
122
|
+
/** First byte to read. Default 0. */
|
|
123
|
+
offset?: number;
|
|
124
|
+
/** Bytes to read at most. Default: to the end of the file. */
|
|
125
|
+
length?: number;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* An open file read as raw bytes. Consume `body` to the end, or stop early by breaking
|
|
129
|
+
* out of the loop (or aborting the signal) — either releases the file / process.
|
|
130
|
+
*/
|
|
131
|
+
export interface ByteStream {
|
|
132
|
+
/** Canonical logical path. */
|
|
133
|
+
path: string;
|
|
134
|
+
/** Size of the whole file in bytes. */
|
|
135
|
+
size: number;
|
|
136
|
+
/** Epoch milliseconds. */
|
|
137
|
+
modifiedAt: number;
|
|
138
|
+
/** The first byte `body` yields, and how many it yields (the range actually read). */
|
|
139
|
+
offset: number;
|
|
140
|
+
length: number;
|
|
141
|
+
body: AsyncIterable<Uint8Array>;
|
|
142
|
+
}
|
|
143
|
+
export interface WriteStreamOptions extends OpOptions {
|
|
144
|
+
/** Required: more bytes than this fail with "too_large" and nothing is written. */
|
|
145
|
+
maxBytes: number;
|
|
146
|
+
/** Create missing parent directories. Default true. */
|
|
147
|
+
createDirs?: boolean;
|
|
148
|
+
/** Fail with "conflict" when the file already exists. Default false (replace it). */
|
|
149
|
+
exclusive?: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface ServiceSpec {
|
|
152
|
+
/** Unique per agent: lower-case letters, digits and dashes, at most 40. */
|
|
153
|
+
name: string;
|
|
154
|
+
/** Run through the sandbox's shell, e.g. "npm run dev -- --host 127.0.0.1 --port $PORT". */
|
|
155
|
+
command: string;
|
|
156
|
+
/** Logical directory. Default: workingDir. */
|
|
157
|
+
cwd?: string;
|
|
158
|
+
/** The port the service listens on inside the sandbox. Omitted = a free port is picked. Either way it is passed as PORT. */
|
|
159
|
+
port?: number;
|
|
160
|
+
/** Explicit variables only, like exec. */
|
|
161
|
+
env?: Record<string, string>;
|
|
162
|
+
}
|
|
163
|
+
export type ServiceStatus = "starting" | "listening" | "exited";
|
|
164
|
+
export interface ServiceInfo {
|
|
165
|
+
name: string;
|
|
166
|
+
command: string;
|
|
167
|
+
/** Canonical logical path. */
|
|
168
|
+
cwd: string;
|
|
169
|
+
port: number;
|
|
170
|
+
/** "starting" until the port accepts connections; "exited" once the process ended. */
|
|
171
|
+
status: ServiceStatus;
|
|
172
|
+
/** The exit code once exited (null when unknown, e.g. killed). */
|
|
173
|
+
exitCode?: number | null;
|
|
174
|
+
/** Epoch milliseconds. */
|
|
175
|
+
startedAt: number;
|
|
176
|
+
}
|
|
177
|
+
export interface ServiceLogs {
|
|
178
|
+
name: string;
|
|
179
|
+
/** The end of the service's combined stdout + stderr. */
|
|
180
|
+
text: string;
|
|
181
|
+
/** true when older output was left out. */
|
|
182
|
+
truncated: boolean;
|
|
183
|
+
}
|
|
108
184
|
export interface ExecRequest {
|
|
109
185
|
/** argv — no shell parsing unless `shell` is true. */
|
|
110
186
|
command: string[];
|
|
@@ -163,6 +239,35 @@ export interface SandboxView {
|
|
|
163
239
|
/** Runs where the files live (no bulk transfer for remote runners). */
|
|
164
240
|
search(query: SearchQuery, opts?: OpOptions): Promise<SearchResult>;
|
|
165
241
|
exec(request: ExecRequest, opts?: ExecOptions): Promise<ExecResult>;
|
|
242
|
+
/**
|
|
243
|
+
* A-124 ("fs.stream"): read a file as raw bytes, optionally one byte range — what an
|
|
244
|
+
* HTTP preview needs for binary assets and Range requests. Absent without the capability.
|
|
245
|
+
*/
|
|
246
|
+
readStream?(path: string, opts?: ReadStreamOptions): Promise<ByteStream>;
|
|
247
|
+
/**
|
|
248
|
+
* A-124 ("fs.stream"): write raw bytes from a stream (an upload). The file is written
|
|
249
|
+
* to a temporary name and renamed, so readers never see a partial file; on any error
|
|
250
|
+
* (including too_large) nothing is left behind. Absent without the capability.
|
|
251
|
+
*/
|
|
252
|
+
writeStream?(path: string, body: AsyncIterable<Uint8Array>, opts: WriteStreamOptions): Promise<WriteResult>;
|
|
253
|
+
/**
|
|
254
|
+
* A-124 phase 2 ("services"): start a long-running process (a dev server) that outlives
|
|
255
|
+
* the call. Fails with "conflict" when a service of that name runs or the port is taken,
|
|
256
|
+
* "policy_denied" past the sandbox's limit of services per agent.
|
|
257
|
+
*/
|
|
258
|
+
startService?(spec: ServiceSpec, opts?: OpOptions): Promise<ServiceInfo>;
|
|
259
|
+
/** Stop a service (its whole process group). null when there is none of that name. */
|
|
260
|
+
stopService?(name: string, opts?: OpOptions): Promise<ServiceInfo | null>;
|
|
261
|
+
/** This agent's services, the exited ones too (until restarted or the sandbox restarts). */
|
|
262
|
+
listServices?(opts?: OpOptions): Promise<ServiceInfo[]>;
|
|
263
|
+
serviceLogs?(name: string, opts?: OpOptions & {
|
|
264
|
+
maxBytes?: number;
|
|
265
|
+
}): Promise<ServiceLogs>;
|
|
266
|
+
/**
|
|
267
|
+
* A TCP connection to 127.0.0.1:<port> inside the sandbox, as a byte stream — how a
|
|
268
|
+
* host proxies a preview to a service, also when the sandbox has no network.
|
|
269
|
+
*/
|
|
270
|
+
connect?(port: number, opts?: OpOptions): Promise<Duplex>;
|
|
166
271
|
}
|
|
167
272
|
/** One running (or reconnectable) sandbox, shared by the agents bound to it. */
|
|
168
273
|
export interface Sandbox {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAgB1C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,WAAW,GACX,MAAM;AACR,iGAAiG;GAC/F,YAAY;AACd;;;;GAIG;GACD,WAAW;AACb;;;;GAIG;GACD,UAAU,CAAC;AAEf,wGAAwG;AACxG,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,6FAA6F;IAC7F,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACvC,0DAA0D;IAC1D,UAAU,EAAE,OAAO,CAAC;IACpB,gEAAgE;IAChE,OAAO,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC1B,kEAAkE;IAClE,EAAE,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;CACpC;AAED,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAID,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CA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IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAChD,MAAM,IAAI,OAAO,CAAC,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,CAAC;IACxD,qEAAqE;IACrE,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,oEAAoE;IACpE,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"}
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// SandboxView — the only thing file/terminal tools ever see (A-59).
|
|
3
|
-
//
|
|
4
|
-
// One contract for every place an agent can work:
|
|
5
|
-
// docker — the shared sandbox or an agent's own container (A-60)
|
|
6
|
-
// host — an allowlisted folder on the server machine, Claude Code-style (later)
|
|
7
|
-
// remote — a runner on another machine: Windows/Revit box, CI (later)
|
|
8
|
-
//
|
|
9
|
-
// Tools never import node:fs or child_process. Paths are logical POSIX paths
|
|
10
|
-
// ("src/app.ts", "/workspace/shared/x.csv"); each sandbox maps them to its
|
|
11
|
-
// real storage, so tools behave the same on Windows hosts, Linux containers
|
|
12
|
-
// and remote runners. Every method fails closed with a SandboxError.
|
|
13
|
-
// ---------------------------------------------------------------------------
|
|
14
1
|
export {};
|
|
15
2
|
//# sourceMappingURL=sandbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../../src/components/sandbox-hub/types/sandbox.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type SecretHubProvider } from "./secret-hub-provider.js";
|
|
2
|
+
export type SealedFormat = {
|
|
3
|
+
format: "v2";
|
|
4
|
+
keyId: string;
|
|
5
|
+
} | {
|
|
6
|
+
format: "v1";
|
|
7
|
+
} | {
|
|
8
|
+
format: "plain";
|
|
9
|
+
};
|
|
10
|
+
export interface SecretSealerOptions {
|
|
11
|
+
/** Extra keys for the enc:v1 format, beyond the provider's legacyKeys(). */
|
|
12
|
+
legacyKeys?: () => Uint8Array[];
|
|
13
|
+
/** How long an unwrapped data key is kept in memory (default 5 min; 0 = no cache). */
|
|
14
|
+
cacheTtlMs?: number;
|
|
15
|
+
/** Most data keys kept at once (default 1000). */
|
|
16
|
+
cacheMax?: number;
|
|
17
|
+
}
|
|
18
|
+
/** What a sealed value's prefix says about it. */
|
|
19
|
+
export declare function sealedFormat(stored: string): SealedFormat;
|
|
20
|
+
/**
|
|
21
|
+
* Seals and opens values with the current SecretHubProvider (resolved on every call, so
|
|
22
|
+
* AgentCore.useSecretHubProvider applies at once). Without a provider values are stored as
|
|
23
|
+
* plain text and a warning is logged once — hosts that must not do that refuse to start
|
|
24
|
+
* without one (see the servers' AEC_REQUIRE_ENCRYPTION).
|
|
25
|
+
*/
|
|
26
|
+
export declare class SecretSealer {
|
|
27
|
+
private readonly getProvider;
|
|
28
|
+
private readonly options;
|
|
29
|
+
private cache;
|
|
30
|
+
private warned;
|
|
31
|
+
private readonly ttl;
|
|
32
|
+
private readonly max;
|
|
33
|
+
constructor(getProvider: () => SecretHubProvider | undefined, options?: SecretSealerOptions);
|
|
34
|
+
/** The provider in use, if any. */
|
|
35
|
+
get provider(): SecretHubProvider | undefined;
|
|
36
|
+
/** Seal `plain` under the current master key. `aad` binds the value to where it is stored. */
|
|
37
|
+
seal(plain: string, aad?: string): Promise<string>;
|
|
38
|
+
/** Open a value written by seal (or the enc:v1 format, or plain text). Throws SecretError. */
|
|
39
|
+
open(stored: string, aad?: string): Promise<string>;
|
|
40
|
+
/** True when the value is not sealed with the current master key (rotation re-seals it). */
|
|
41
|
+
needsReseal(stored: string): boolean;
|
|
42
|
+
/** Forget unwrapped data keys (after a rotation, or to drop them from memory). */
|
|
43
|
+
clearCache(): void;
|
|
44
|
+
private openV2;
|
|
45
|
+
private unwrap;
|
|
46
|
+
private openV1;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../src/components/secret-hub/envelope.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAoBpF,MAAM,MAAM,YAAY,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpG,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,UAAU,EAAE,CAAC;IAChC,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kDAAkD;AAClD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAOzD;AAED;;;;;GAKG;AACH,qBAAa,YAAY;IAOrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAP1B,OAAO,CAAC,KAAK,CAA2D;IACxE,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B,YACmB,WAAW,EAAE,MAAM,iBAAiB,GAAG,SAAS,EAChD,OAAO,GAAE,mBAAwB,EAInD;IAED,mCAAmC;IACnC,IAAI,QAAQ,IAAI,iBAAiB,GAAG,SAAS,CAE5C;IAED,8FAA8F;IACxF,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBnD;IAED,8FAA8F;IACxF,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAIpD;IAED,4FAA4F;IAC5F,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAKnC;IAED,kFAAkF;IAClF,UAAU,IAAI,IAAI,CAEjB;YAEa,MAAM;YAaN,MAAM;IAmBpB,OAAO,CAAC,MAAM;CAaf"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
import { SecretError } from "../../kernel/errors/secret-error.js";
|
|
3
|
+
import { gcmOpen, gcmSeal } from "./secret-hub-provider.js";
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Envelope encryption (A-101). A sealed value is
|
|
6
|
+
//
|
|
7
|
+
// "enc:v2:" + base64url(keyId) + ":" + base64(wrapped data key) + ":" + base64(iv | ciphertext | tag)
|
|
8
|
+
//
|
|
9
|
+
// The value is encrypted with a fresh 32-byte data key (AES-256-GCM, the caller's AAD
|
|
10
|
+
// bound in, so a value can't be moved to another secret); the data key is wrapped by the
|
|
11
|
+
// provider's current master key. server/go and core/go read and write the same format.
|
|
12
|
+
//
|
|
13
|
+
// Also read: "enc:v1:" + base64(iv | ciphertext | tag) — the A-100 single-key format
|
|
14
|
+
// (key = SHA-256(AEC_SECRET_KEY), no AAD) — and plain text (no "enc:" prefix), so values
|
|
15
|
+
// written before A-101 open until a rotation re-seals them.
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
const V2 = "enc:v2:";
|
|
18
|
+
const V1 = "enc:v1:";
|
|
19
|
+
const DATA_KEY_BYTES = 32;
|
|
20
|
+
/** What a sealed value's prefix says about it. */
|
|
21
|
+
export function sealedFormat(stored) {
|
|
22
|
+
if (stored.startsWith(V2)) {
|
|
23
|
+
const keyPart = stored.slice(V2.length).split(":", 1)[0] ?? "";
|
|
24
|
+
return { format: "v2", keyId: Buffer.from(keyPart, "base64url").toString("utf8") };
|
|
25
|
+
}
|
|
26
|
+
if (stored.startsWith(V1))
|
|
27
|
+
return { format: "v1" };
|
|
28
|
+
return { format: "plain" };
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Seals and opens values with the current SecretHubProvider (resolved on every call, so
|
|
32
|
+
* AgentCore.useSecretHubProvider applies at once). Without a provider values are stored as
|
|
33
|
+
* plain text and a warning is logged once — hosts that must not do that refuse to start
|
|
34
|
+
* without one (see the servers' AEC_REQUIRE_ENCRYPTION).
|
|
35
|
+
*/
|
|
36
|
+
export class SecretSealer {
|
|
37
|
+
getProvider;
|
|
38
|
+
options;
|
|
39
|
+
cache = new Map();
|
|
40
|
+
warned = false;
|
|
41
|
+
ttl;
|
|
42
|
+
max;
|
|
43
|
+
constructor(getProvider, options = {}) {
|
|
44
|
+
this.getProvider = getProvider;
|
|
45
|
+
this.options = options;
|
|
46
|
+
this.ttl = options.cacheTtlMs ?? 5 * 60_000;
|
|
47
|
+
this.max = options.cacheMax ?? 1000;
|
|
48
|
+
}
|
|
49
|
+
/** The provider in use, if any. */
|
|
50
|
+
get provider() {
|
|
51
|
+
return this.getProvider();
|
|
52
|
+
}
|
|
53
|
+
/** Seal `plain` under the current master key. `aad` binds the value to where it is stored. */
|
|
54
|
+
async seal(plain, aad = "") {
|
|
55
|
+
const provider = this.getProvider();
|
|
56
|
+
if (!provider) {
|
|
57
|
+
if (!this.warned) {
|
|
58
|
+
this.warned = true;
|
|
59
|
+
console.warn("[secrets] no SecretHub provider is set — secrets are stored unencrypted");
|
|
60
|
+
}
|
|
61
|
+
return plain;
|
|
62
|
+
}
|
|
63
|
+
const dataKey = randomBytes(DATA_KEY_BYTES);
|
|
64
|
+
let wrapped;
|
|
65
|
+
try {
|
|
66
|
+
wrapped = await provider.wrapKey(dataKey);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
throw new SecretError(`the SecretHub provider "${provider.id}" could not wrap a key: ${message(err)}`, "unavailable");
|
|
70
|
+
}
|
|
71
|
+
const body = gcmSeal(dataKey, Buffer.from(plain, "utf8"), aadBytes(aad));
|
|
72
|
+
return (V2 +
|
|
73
|
+
Buffer.from(wrapped.keyId, "utf8").toString("base64url") +
|
|
74
|
+
":" +
|
|
75
|
+
Buffer.from(wrapped.wrapped).toString("base64") +
|
|
76
|
+
":" +
|
|
77
|
+
body.toString("base64"));
|
|
78
|
+
}
|
|
79
|
+
/** Open a value written by seal (or the enc:v1 format, or plain text). Throws SecretError. */
|
|
80
|
+
async open(stored, aad = "") {
|
|
81
|
+
if (stored.startsWith(V2))
|
|
82
|
+
return this.openV2(stored, aad);
|
|
83
|
+
if (stored.startsWith(V1))
|
|
84
|
+
return this.openV1(stored);
|
|
85
|
+
return stored;
|
|
86
|
+
}
|
|
87
|
+
/** True when the value is not sealed with the current master key (rotation re-seals it). */
|
|
88
|
+
needsReseal(stored) {
|
|
89
|
+
const provider = this.getProvider();
|
|
90
|
+
if (!provider)
|
|
91
|
+
return false;
|
|
92
|
+
const f = sealedFormat(stored);
|
|
93
|
+
return f.format !== "v2" || f.keyId !== provider.currentKeyId();
|
|
94
|
+
}
|
|
95
|
+
/** Forget unwrapped data keys (after a rotation, or to drop them from memory). */
|
|
96
|
+
clearCache() {
|
|
97
|
+
this.cache.clear();
|
|
98
|
+
}
|
|
99
|
+
async openV2(stored, aad) {
|
|
100
|
+
const parts = stored.slice(V2.length).split(":");
|
|
101
|
+
if (parts.length !== 3)
|
|
102
|
+
throw new SecretError("a stored secret is malformed", "decrypt_failed");
|
|
103
|
+
const [keyPart, wrappedPart, bodyPart] = parts;
|
|
104
|
+
const keyId = Buffer.from(keyPart, "base64url").toString("utf8");
|
|
105
|
+
const dataKey = await this.unwrap(keyId, wrappedPart);
|
|
106
|
+
try {
|
|
107
|
+
return gcmOpen(dataKey, Buffer.from(bodyPart, "base64"), aadBytes(aad)).toString("utf8");
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
throw new SecretError("a stored secret could not be decrypted (it was moved, or the data is damaged)", "decrypt_failed");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async unwrap(keyId, wrappedPart) {
|
|
114
|
+
const cacheKey = keyId + ":" + wrappedPart;
|
|
115
|
+
const hit = this.cache.get(cacheKey);
|
|
116
|
+
if (hit && hit.expires > Date.now())
|
|
117
|
+
return hit.key;
|
|
118
|
+
const provider = this.getProvider();
|
|
119
|
+
if (!provider)
|
|
120
|
+
throw new SecretError(`a SecretHub provider holding master key "${keyId}" is needed to read this secret`, "decrypt_failed");
|
|
121
|
+
let key;
|
|
122
|
+
try {
|
|
123
|
+
key = await provider.unwrapKey(Buffer.from(wrappedPart, "base64"), keyId);
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
throw new SecretError(`master key "${keyId}" could not unwrap this secret's key: ${message(err)}`, "decrypt_failed");
|
|
127
|
+
}
|
|
128
|
+
if (this.ttl > 0) {
|
|
129
|
+
if (this.cache.size >= this.max)
|
|
130
|
+
this.cache.delete(this.cache.keys().next().value);
|
|
131
|
+
this.cache.set(cacheKey, { key, expires: Date.now() + this.ttl });
|
|
132
|
+
}
|
|
133
|
+
return key;
|
|
134
|
+
}
|
|
135
|
+
openV1(stored) {
|
|
136
|
+
const keys = [...(this.getProvider()?.legacyKeys?.() ?? []), ...(this.options.legacyKeys?.() ?? [])];
|
|
137
|
+
if (!keys.length)
|
|
138
|
+
throw new SecretError("AEC_SECRET_KEY is needed to read a secret stored before A-101 (enc:v1)", "decrypt_failed");
|
|
139
|
+
const raw = Buffer.from(stored.slice(V1.length), "base64");
|
|
140
|
+
for (const key of keys) {
|
|
141
|
+
try {
|
|
142
|
+
return gcmOpen(key, raw).toString("utf8");
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
// try the next key
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
throw new SecretError("a stored secret (enc:v1) could not be decrypted — AEC_SECRET_KEY differs from the one that wrote it", "decrypt_failed");
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function aadBytes(aad) {
|
|
152
|
+
return aad ? Buffer.from(aad, "utf8") : undefined;
|
|
153
|
+
}
|
|
154
|
+
function message(err) {
|
|
155
|
+
return err instanceof Error ? err.message : String(err);
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../../src/components/secret-hub/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAA0B,MAAM,0BAA0B,CAAC;AAEpF,8EAA8E;AAC9E,iDAAiD;AACjD,EAAE;AACF,wGAAwG;AACxG,EAAE;AACF,sFAAsF;AACtF,yFAAyF;AACzF,uFAAuF;AACvF,EAAE;AACF,qFAAqF;AACrF,yFAAyF;AACzF,4DAA4D;AAC5D,8EAA8E;AAE9E,MAAM,EAAE,GAAG,SAAS,CAAC;AACrB,MAAM,EAAE,GAAG,SAAS,CAAC;AACrB,MAAM,cAAc,GAAG,EAAE,CAAC;AAa1B,kDAAkD;AAClD,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,IAAI,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;QAC1B,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CA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AU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACrG,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,WAAW,CAAC,wEAAwE,EAAE,gBAAgB,CAAC,CAAC;QACpI,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;QAC3D,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC;gBACH,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC5C,CAAC;YAAC,MAAM,CAAC;gBACP,mBAAmB;YACrB,CAAC;QACH,CAAC;QACD,MAAM,IAAI,WAAW,CAAC,qGAAqG,EAAE,gBAAgB,CAAC,CAAC;IACjJ,CAAC;CACF;AAED,SAAS,QAAQ,CAAC,GAAW;IAC3B,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACpD,CAAC;AAED,SAAS,OAAO,CAAC,GAAY;IAC3B,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type SecretDefinition, type SecretInfo, type SecretUse } from "./types.js";
|
|
2
|
+
/** {{secret:NAME}} — what the model writes where a tool should put a secret's value. */
|
|
3
|
+
export declare const SECRET_PLACEHOLDER: RegExp;
|
|
4
|
+
/** The names a text refers to with {{secret:NAME}}, without duplicates. */
|
|
5
|
+
export declare function placeholderNames(text: string): string[];
|
|
6
|
+
/** Replace each {{secret:NAME}} with its value; a name missing from `values` is left as it is. */
|
|
7
|
+
export declare function fillPlaceholders(text: string, values: Record<string, string>): string;
|
|
8
|
+
/** Throws SecretError("invalid_argument") unless `name` is a valid secret name. */
|
|
9
|
+
export declare function checkSecretName(name: unknown): string;
|
|
10
|
+
/** Throws SecretError("invalid_argument") unless `value` can be stored. */
|
|
11
|
+
export declare function checkSecretValue(value: unknown): string;
|
|
12
|
+
/** A definition's metadata checked and normalised (defaults filled in for a new secret). */
|
|
13
|
+
export declare function normalizeDefinition(definition: Partial<SecretDefinition>, base?: Pick<SecretInfo, "description" | "allowedHosts" | "allowedTools">): Pick<SecretInfo, "description" | "allowedHosts" | "allowedTools">;
|
|
14
|
+
/** Does `host` match one of the patterns? "*.example.com" matches subdomains, not example.com. */
|
|
15
|
+
export declare function hostAllowed(host: string, patterns: readonly string[]): boolean;
|
|
16
|
+
/** Throws SecretError("not_allowed") unless the secret may be used this way. */
|
|
17
|
+
export declare function checkUse(secret: Pick<SecretInfo, "name" | "allowedHosts" | "allowedTools">, use: SecretUse): void;
|
|
18
|
+
/**
|
|
19
|
+
* Remembers the secret values used in this process and removes them from text — tool
|
|
20
|
+
* output, errors — before it reaches the model, a store, a trace or the UI. A value is
|
|
21
|
+
* also caught URL-encoded and base64-encoded (e.g. in a Basic auth header echoed back).
|
|
22
|
+
*/
|
|
23
|
+
export declare class SecretRedactor {
|
|
24
|
+
private values;
|
|
25
|
+
/** Remember a value (and its encodings) under its secret's name. */
|
|
26
|
+
add(name: string, value: string): void;
|
|
27
|
+
/** Forget the values of a secret (deleted, or given a new value). */
|
|
28
|
+
forget(name: string): void;
|
|
29
|
+
get size(): number;
|
|
30
|
+
/** `text` with every known value replaced by [secret:NAME]. */
|
|
31
|
+
redact(text: string): string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/components/secret-hub/rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAuC,KAAK,gBAAgB,EAAE,KAA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AI,IAAI,IAAI,MAAM,CAEjB;IAED,+DAA+D;IAC/D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ3B;CACF"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { SecretError } from "../../kernel/errors/secret-error.js";
|
|
2
|
+
import { DEFAULT_SECRET_TOOLS, SECRET_LIMITS } from "./types.js";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// A-101: secret names, allowed uses, placeholders and redaction — shared by the
|
|
5
|
+
// SecretHub, each agent's SecretManager and the tools.
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
const NAME = /^[A-Z][A-Z0-9_]*$/;
|
|
8
|
+
const HOST = /^(\*\.)?([a-z0-9]([a-z0-9-]*[a-z0-9])?)(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/;
|
|
9
|
+
const TOOL = /^[a-z][a-z0-9_]*$/;
|
|
10
|
+
/** {{secret:NAME}} — what the model writes where a tool should put a secret's value. */
|
|
11
|
+
export const SECRET_PLACEHOLDER = /\{\{\s*secret:([A-Z][A-Z0-9_]*)\s*\}\}/g;
|
|
12
|
+
/** The names a text refers to with {{secret:NAME}}, without duplicates. */
|
|
13
|
+
export function placeholderNames(text) {
|
|
14
|
+
return [...new Set([...text.matchAll(SECRET_PLACEHOLDER)].map((m) => m[1]))];
|
|
15
|
+
}
|
|
16
|
+
/** Replace each {{secret:NAME}} with its value; a name missing from `values` is left as it is. */
|
|
17
|
+
export function fillPlaceholders(text, values) {
|
|
18
|
+
return text.replace(SECRET_PLACEHOLDER, (whole, name) => values[name] ?? whole);
|
|
19
|
+
}
|
|
20
|
+
/** Throws SecretError("invalid_argument") unless `name` is a valid secret name. */
|
|
21
|
+
export function checkSecretName(name) {
|
|
22
|
+
const n = typeof name === "string" ? name.trim() : "";
|
|
23
|
+
if (!NAME.test(n) || n.length > SECRET_LIMITS.name) {
|
|
24
|
+
throw new SecretError(`secret name "${n}" must be upper-case letters, digits and underscores, starting with a letter (max ${SECRET_LIMITS.name})`, "invalid_argument");
|
|
25
|
+
}
|
|
26
|
+
return n;
|
|
27
|
+
}
|
|
28
|
+
/** Throws SecretError("invalid_argument") unless `value` can be stored. */
|
|
29
|
+
export function checkSecretValue(value) {
|
|
30
|
+
if (typeof value !== "string" || !value.length)
|
|
31
|
+
throw new SecretError("a secret needs a value", "invalid_argument");
|
|
32
|
+
if (Buffer.byteLength(value, "utf8") > SECRET_LIMITS.value) {
|
|
33
|
+
throw new SecretError(`a secret's value is larger than ${SECRET_LIMITS.value} bytes`, "invalid_argument");
|
|
34
|
+
}
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
/** A definition's metadata checked and normalised (defaults filled in for a new secret). */
|
|
38
|
+
export function normalizeDefinition(definition, base) {
|
|
39
|
+
const fail = (m) => {
|
|
40
|
+
throw new SecretError(m, "invalid_argument");
|
|
41
|
+
};
|
|
42
|
+
let description = base?.description;
|
|
43
|
+
if (definition.description !== undefined) {
|
|
44
|
+
if (definition.description !== null && typeof definition.description !== "string")
|
|
45
|
+
fail("description must be text");
|
|
46
|
+
description = definition.description?.trim() || undefined;
|
|
47
|
+
if (description && description.length > SECRET_LIMITS.description)
|
|
48
|
+
fail(`description is longer than ${SECRET_LIMITS.description} characters`);
|
|
49
|
+
}
|
|
50
|
+
let allowedHosts = base?.allowedHosts ?? [];
|
|
51
|
+
if (definition.allowedHosts !== undefined && definition.allowedHosts !== null) {
|
|
52
|
+
if (!Array.isArray(definition.allowedHosts))
|
|
53
|
+
fail("allowedHosts must be a list of host names");
|
|
54
|
+
allowedHosts = [...new Set(definition.allowedHosts.map((h) => normalizeHost(h, fail)))];
|
|
55
|
+
if (allowedHosts.length > SECRET_LIMITS.hosts)
|
|
56
|
+
fail(`at most ${SECRET_LIMITS.hosts} hosts`);
|
|
57
|
+
}
|
|
58
|
+
let allowedTools = base?.allowedTools ?? [...DEFAULT_SECRET_TOOLS];
|
|
59
|
+
if (definition.allowedTools !== undefined && definition.allowedTools !== null) {
|
|
60
|
+
if (!Array.isArray(definition.allowedTools))
|
|
61
|
+
fail("allowedTools must be a list of tool names");
|
|
62
|
+
allowedTools = [...new Set(definition.allowedTools.map((t) => (typeof t === "string" ? t.trim() : "")))];
|
|
63
|
+
if (allowedTools.some((t) => !TOOL.test(t)))
|
|
64
|
+
fail("allowedTools must be tool names (lower-case letters, digits, underscores)");
|
|
65
|
+
if (allowedTools.length > SECRET_LIMITS.tools)
|
|
66
|
+
fail(`at most ${SECRET_LIMITS.tools} tools`);
|
|
67
|
+
}
|
|
68
|
+
return { ...(description ? { description } : {}), allowedHosts, allowedTools };
|
|
69
|
+
}
|
|
70
|
+
function normalizeHost(host, fail) {
|
|
71
|
+
let h = typeof host === "string" ? host.trim().toLowerCase() : "";
|
|
72
|
+
// Accept a pasted URL ("https://api.example.com/v1") — keep the host.
|
|
73
|
+
if (/^[a-z]+:\/\//.test(h)) {
|
|
74
|
+
try {
|
|
75
|
+
h = new URL(h).hostname;
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
fail(`"${String(host)}" is not a host name`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
h = h.replace(/\.$/, "");
|
|
82
|
+
if (!HOST.test(h) || h.length > 253)
|
|
83
|
+
fail(`"${String(host)}" is not a host name (e.g. api.example.com or *.example.com)`);
|
|
84
|
+
return h;
|
|
85
|
+
}
|
|
86
|
+
/** Does `host` match one of the patterns? "*.example.com" matches subdomains, not example.com. */
|
|
87
|
+
export function hostAllowed(host, patterns) {
|
|
88
|
+
const h = host.toLowerCase().replace(/\.$/, "");
|
|
89
|
+
return patterns.some((p) => (p.startsWith("*.") ? h.endsWith(p.slice(1)) && h.length > p.length - 1 : h === p));
|
|
90
|
+
}
|
|
91
|
+
/** Throws SecretError("not_allowed") unless the secret may be used this way. */
|
|
92
|
+
export function checkUse(secret, use) {
|
|
93
|
+
if (!secret.allowedTools.includes(use.tool)) {
|
|
94
|
+
throw new SecretError(`secret ${secret.name} may not be used by ${use.tool} (allowed: ${secret.allowedTools.join(", ") || "no tool"})`, "not_allowed");
|
|
95
|
+
}
|
|
96
|
+
if (use.host !== undefined && !hostAllowed(use.host, secret.allowedHosts)) {
|
|
97
|
+
throw new SecretError(secret.allowedHosts.length
|
|
98
|
+
? `secret ${secret.name} may not be sent to ${use.host} (allowed hosts: ${secret.allowedHosts.join(", ")})`
|
|
99
|
+
: `secret ${secret.name} has no allowed hosts yet — the user has to set them before it can be sent anywhere`, "not_allowed");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Values shorter than this are not redacted (they would mangle ordinary text). */
|
|
103
|
+
const MIN_REDACT_LENGTH = 6;
|
|
104
|
+
/**
|
|
105
|
+
* Remembers the secret values used in this process and removes them from text — tool
|
|
106
|
+
* output, errors — before it reaches the model, a store, a trace or the UI. A value is
|
|
107
|
+
* also caught URL-encoded and base64-encoded (e.g. in a Basic auth header echoed back).
|
|
108
|
+
*/
|
|
109
|
+
export class SecretRedactor {
|
|
110
|
+
values = new Map();
|
|
111
|
+
/** Remember a value (and its encodings) under its secret's name. */
|
|
112
|
+
add(name, value) {
|
|
113
|
+
if (value.length < MIN_REDACT_LENGTH)
|
|
114
|
+
return;
|
|
115
|
+
for (const v of new Set([value, encodeURIComponent(value), Buffer.from(value, "utf8").toString("base64")])) {
|
|
116
|
+
if (v.length >= MIN_REDACT_LENGTH)
|
|
117
|
+
this.values.set(v, name);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/** Forget the values of a secret (deleted, or given a new value). */
|
|
121
|
+
forget(name) {
|
|
122
|
+
for (const [v, n] of this.values)
|
|
123
|
+
if (n === name)
|
|
124
|
+
this.values.delete(v);
|
|
125
|
+
}
|
|
126
|
+
get size() {
|
|
127
|
+
return this.values.size;
|
|
128
|
+
}
|
|
129
|
+
/** `text` with every known value replaced by [secret:NAME]. */
|
|
130
|
+
redact(text) {
|
|
131
|
+
if (!text || !this.values.size)
|
|
132
|
+
return text;
|
|
133
|
+
let out = text;
|
|
134
|
+
// Longest first, so a value that contains another is replaced whole.
|
|
135
|
+
for (const [value, name] of [...this.values].sort((a, b) => b[0].length - a[0].length)) {
|
|
136
|
+
if (out.includes(value))
|
|
137
|
+
out = out.split(value).join(`[secret:${name}]`);
|
|
138
|
+
}
|
|
139
|
+
return out;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../src/components/secret-hub/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAA0D,MAAM,YAAY,CAAC;AAEzH,8EAA8E;AAC9E,gFAAgF;AAChF,uDAAuD;AACvD,8EAA8E;AAE9E,MAAM,IAAI,GAAG,mBAAmB,CAAC;AACjC,MAAM,IAAI,GAAG,4EAA4E,CAAC;AAC1F,MAAM,IAAI,GAAG,mBAAmB,CAAC;AAEjC,wFAAwF;AACxF,MAAM,CAAC,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAE5E,2EAA2E;AAC3E,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,MAA8B;IAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC;AAC1F,CAAC;AA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