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,495 @@
|
|
|
1
|
+
/** When a job runs on a clock (A-69). */
|
|
2
|
+
export type JobSchedule =
|
|
3
|
+
/** 5-field cron ("min hour dom month dow"): ranges, steps, lists and names; dom/dow combine with OR like classic cron. */
|
|
4
|
+
{
|
|
5
|
+
kind: "cron";
|
|
6
|
+
expr: string; /** IANA timezone, e.g. "Asia/Ho_Chi_Minh". Omitted = the server's timezone. */
|
|
7
|
+
tz?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Every `ms` milliseconds, counted from the previous scheduled time. */
|
|
10
|
+
| {
|
|
11
|
+
kind: "every";
|
|
12
|
+
ms: number;
|
|
13
|
+
}
|
|
14
|
+
/** Once, at an ISO 8601 time. The job disables itself after it has run. */
|
|
15
|
+
| {
|
|
16
|
+
kind: "at";
|
|
17
|
+
at: string;
|
|
18
|
+
};
|
|
19
|
+
export type JobSignatureScheme = "standard" | "github";
|
|
20
|
+
/**
|
|
21
|
+
* When a job runs: a schedule, or events from a source.
|
|
22
|
+
* "event" — the agent's own SDK events on the event bus (INTERNAL_JOB_EVENT_TYPES).
|
|
23
|
+
* In-process: an event emitted while the host is down is not seen.
|
|
24
|
+
* "webhook" — POSTs to the host's webhook route, signed with the job's secret:
|
|
25
|
+
* "standard" = Standard Webhooks (webhook-id / webhook-timestamp / webhook-signature),
|
|
26
|
+
* "github" = X-Hub-Signature-256 + X-GitHub-Delivery + X-GitHub-Event.
|
|
27
|
+
* subjectPath / revisionPath pick the subject and revision from the event
|
|
28
|
+
* ("data.pull_request.number"); a CloudEvents body sets its own subject.
|
|
29
|
+
*/
|
|
30
|
+
export type JobWhen = JobSchedule | {
|
|
31
|
+
kind: "event";
|
|
32
|
+
} | {
|
|
33
|
+
kind: "webhook";
|
|
34
|
+
signature: JobSignatureScheme;
|
|
35
|
+
subjectPath?: string;
|
|
36
|
+
revisionPath?: string;
|
|
37
|
+
};
|
|
38
|
+
export type JobKind = JobWhen["kind"];
|
|
39
|
+
/** True for a job that runs on a clock ("at" / "every" / "cron"). */
|
|
40
|
+
export declare function isScheduleWhen(when: JobWhen): when is JobSchedule;
|
|
41
|
+
/** One declarative condition — no scripts. `path` is "type", "subject", "source" or "data.<dot.path>". */
|
|
42
|
+
export interface JobCondition {
|
|
43
|
+
path: string;
|
|
44
|
+
op: "eq" | "neq" | "in" | "exists" | "contains";
|
|
45
|
+
/** eq/neq: the value; in: an array; exists: true (default) or false; contains: a string or array item. */
|
|
46
|
+
value?: unknown;
|
|
47
|
+
}
|
|
48
|
+
/** Which events an event or webhook job accepts. Every part that is set must match. A schedule job has none. */
|
|
49
|
+
export interface JobFilter {
|
|
50
|
+
/** Event types; "prefix.*" matches a prefix. Required for an "event" job. Absent = any type. */
|
|
51
|
+
types?: string[];
|
|
52
|
+
/** Only these subjects (e.g. one job's id). */
|
|
53
|
+
subjects?: string[];
|
|
54
|
+
where?: JobCondition[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Burst coalescing (event and webhook jobs): events for the same job + subject that
|
|
58
|
+
* arrive before their run starts are handled by one run. The run starts once no new
|
|
59
|
+
* event came for `quietMs`, at most `maxWaitMs` after the first one, with at most
|
|
60
|
+
* `maxBatch` events (more open the next run). A schedule job's ticks never coalesce.
|
|
61
|
+
*/
|
|
62
|
+
export interface JobCoalesce {
|
|
63
|
+
quietMs: number;
|
|
64
|
+
maxWaitMs: number;
|
|
65
|
+
maxBatch: number;
|
|
66
|
+
}
|
|
67
|
+
/** Bounds on unattended work. */
|
|
68
|
+
export interface JobLimits {
|
|
69
|
+
/**
|
|
70
|
+
* Runs started per rolling hour; more wait for the window. Absent = no limit
|
|
71
|
+
* (the default for a schedule job: its clock already bounds it).
|
|
72
|
+
*/
|
|
73
|
+
maxRunsPerHour?: number;
|
|
74
|
+
/** Runs of this job at once (this process). */
|
|
75
|
+
maxConcurrentRuns: number;
|
|
76
|
+
/** Attempts per run, the first included; transient failures retry with backoff. A schedule job defaults to 1. */
|
|
77
|
+
maxAttempts: number;
|
|
78
|
+
/** A run is not retried later than this after it was queued. */
|
|
79
|
+
runDeadlineMs: number;
|
|
80
|
+
/** Tokens per rolling day; once used up, runs end "blocked". Absent = no budget. */
|
|
81
|
+
maxTokensPerDay?: number;
|
|
82
|
+
/** After a run for a subject, the next run for it waits at least this long. */
|
|
83
|
+
cooldownMs: number;
|
|
84
|
+
/**
|
|
85
|
+
* How deep a chain of event jobs may go. An event caused by a run of an event or
|
|
86
|
+
* webhook job has depth = that run's depth + 1; 0 (default) ignores every event
|
|
87
|
+
* such a run caused. Events from a schedule job's runs have depth 0.
|
|
88
|
+
*/
|
|
89
|
+
maxDepth: number;
|
|
90
|
+
/**
|
|
91
|
+
* A-103: the longest one attempt may run, in ms (10 s – 24 h). When it passes the run is
|
|
92
|
+
* aborted and ends "failed" ("Timed out after …"), not retried. Absent (a job stored
|
|
93
|
+
* before A-103) = DEFAULT_MAX_RUN_MS.
|
|
94
|
+
*/
|
|
95
|
+
maxRunMs?: number;
|
|
96
|
+
/**
|
|
97
|
+
* A-103: after this many finished runs in a row ended "failed" or "blocked", the job
|
|
98
|
+
* disables itself (0 = never). Succeeded and silent runs reset the streak; suppressed and
|
|
99
|
+
* stopped runs don't count. Runs from before the job's last edit don't count either, so
|
|
100
|
+
* re-enabling it starts fresh. Absent (a job stored before A-103) = DEFAULT_PAUSE_AFTER_FAILURES.
|
|
101
|
+
*/
|
|
102
|
+
pauseAfterFailures?: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* "new" — every run gets a fresh session (default).
|
|
106
|
+
* "reuse" — every run appends to one session, created on the first run (a watcher
|
|
107
|
+
* that remembers what it already reported).
|
|
108
|
+
*/
|
|
109
|
+
export type JobSessionMode = "new" | "reuse";
|
|
110
|
+
/**
|
|
111
|
+
* When a job's result is sent to its delivery chat (A-100 phase 3).
|
|
112
|
+
* "always" — every finished run: the reply, a "no reply" notice, or the error.
|
|
113
|
+
* "on-output" — only a run that succeeded with a reply.
|
|
114
|
+
* "on-failure" — only a failed run.
|
|
115
|
+
* A stopped run is never delivered.
|
|
116
|
+
* Update (A-126): a silent run (reply [[SILENT]]) is never delivered either.
|
|
117
|
+
*/
|
|
118
|
+
export type JobDeliveryWhen = "always" | "on-output" | "on-failure";
|
|
119
|
+
/**
|
|
120
|
+
* Where a job's result goes (A-100 phase 3): a chat of one of the agent's channels.
|
|
121
|
+
* The agent's ChannelManager sends it when the run ends (it listens for the
|
|
122
|
+
* job events), so the job manager itself never talks to a channel.
|
|
123
|
+
*/
|
|
124
|
+
export interface JobDelivery {
|
|
125
|
+
/** One of the agent's channels. */
|
|
126
|
+
channelId: string;
|
|
127
|
+
/** A chat id on that channel, or "home" for the channel's home chat (/sethome). */
|
|
128
|
+
target: string;
|
|
129
|
+
/** With a chat id: the thread inside the chat. */
|
|
130
|
+
threadId?: string;
|
|
131
|
+
when: JobDeliveryWhen;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* A-127: where a job asked for in a turn can send its results — the chat app conversation
|
|
135
|
+
* the turn runs in (absent outside a chat app) and the agent's running channels that have
|
|
136
|
+
* a home chat.
|
|
137
|
+
*/
|
|
138
|
+
export interface JobDeliveryOptions {
|
|
139
|
+
/** The chat this turn came from, as "home" when it is its channel's home chat. */
|
|
140
|
+
here?: JobDelivery;
|
|
141
|
+
/** The channels with a home chat, by name. */
|
|
142
|
+
homes: JobHomeChat[];
|
|
143
|
+
}
|
|
144
|
+
/** One channel whose home chat can get job results (A-127). */
|
|
145
|
+
export interface JobHomeChat {
|
|
146
|
+
channelId: string;
|
|
147
|
+
/** The channel's name, and its platform ("telegram", "slack"...). */
|
|
148
|
+
name: string;
|
|
149
|
+
platform: string;
|
|
150
|
+
}
|
|
151
|
+
/** A delivery to the home chat of each of homes (A-127). */
|
|
152
|
+
export declare function homeJobDeliveries(homes: readonly JobHomeChat[]): JobDelivery[];
|
|
153
|
+
/**
|
|
154
|
+
* Where a job's results go when the turn names nothing (A-127): back to this chat in a
|
|
155
|
+
* chat app, else to every home chat. Empty when there is neither.
|
|
156
|
+
*/
|
|
157
|
+
export declare function defaultJobDeliveries(options: JobDeliveryOptions): JobDelivery[];
|
|
158
|
+
/**
|
|
159
|
+
* When a tool job also starts a model turn after its tool (A-103):
|
|
160
|
+
* "never" — the tool's output is the result (default);
|
|
161
|
+
* "on-failure" — only when the tool failed (e.g. "explain the error");
|
|
162
|
+
* "always" — after every tool run; the turn sees the tool's output in the session.
|
|
163
|
+
*/
|
|
164
|
+
export type JobFollowUp = "never" | "on-failure" | "always";
|
|
165
|
+
/**
|
|
166
|
+
* What a run does (A-103). Absent on a job = "prompt" (every job stored before A-103).
|
|
167
|
+
* "prompt" — a full agent turn with the job's prompt (as before).
|
|
168
|
+
* "tool" — one stored tool call, run without the model: the exact tool and arguments
|
|
169
|
+
* approved when the job was created. Schedule jobs only. The tool must be in
|
|
170
|
+
* the agent's tool list and marked ToolDefinition.schedulable.
|
|
171
|
+
*/
|
|
172
|
+
export type JobAction = {
|
|
173
|
+
kind: "prompt";
|
|
174
|
+
} | {
|
|
175
|
+
kind: "tool";
|
|
176
|
+
/** A schedulable tool in the agent's tool list. */
|
|
177
|
+
tool: string;
|
|
178
|
+
/** The exact arguments, approved when the job was created; never templated. */
|
|
179
|
+
args: Record<string, unknown>;
|
|
180
|
+
/** Default "never". Any other value needs the job's prompt (the follow-up turn's message). */
|
|
181
|
+
followUp?: JobFollowUp;
|
|
182
|
+
};
|
|
183
|
+
export interface Job {
|
|
184
|
+
id: string;
|
|
185
|
+
/** Owning agent. Every read path is filtered by it. */
|
|
186
|
+
agentId: string;
|
|
187
|
+
/** Short name, unique per agent. */
|
|
188
|
+
name: string;
|
|
189
|
+
description?: string;
|
|
190
|
+
enabled: boolean;
|
|
191
|
+
/** Bumped on every configuration change; a run records the version it was queued under. */
|
|
192
|
+
version: number;
|
|
193
|
+
when: JobWhen;
|
|
194
|
+
/** Event and webhook jobs: which events start a run. Empty for a schedule job. */
|
|
195
|
+
filter: JobFilter;
|
|
196
|
+
/**
|
|
197
|
+
* The message the agent receives on each run. It must stand on its own — runs see
|
|
198
|
+
* no chat history. Event and webhook jobs may use placeholders {{job.name}},
|
|
199
|
+
* {{event.type}}, {{event.subject}}, {{event.source}}, {{event.time}},
|
|
200
|
+
* {{events.count}}; event data is never inlined into it, it follows in a block
|
|
201
|
+
* marked as untrusted.
|
|
202
|
+
* Update (A-103): every job may also use {{now}}, {{job.lastRunAt}},
|
|
203
|
+
* {{job.lastSuccessAt}} and {{job.lastResult}} (the previous successful result, attached
|
|
204
|
+
* in its own block). A tool job's prompt is only the follow-up turn's message, so it may
|
|
205
|
+
* be empty when the follow-up is "never".
|
|
206
|
+
*/
|
|
207
|
+
prompt: string;
|
|
208
|
+
/** A-103: what a run does. Absent = a prompt run (a full agent turn). */
|
|
209
|
+
action?: JobAction;
|
|
210
|
+
coalesce: JobCoalesce;
|
|
211
|
+
limits: JobLimits;
|
|
212
|
+
sessionMode: JobSessionMode;
|
|
213
|
+
/** "reuse" mode: the session runs append to (set on the first run). */
|
|
214
|
+
sessionId?: string;
|
|
215
|
+
/** Schedule jobs: ISO time of the next run; null when disabled, not on a clock, or a one-off job has run. */
|
|
216
|
+
nextRunAt: string | null;
|
|
217
|
+
lastRunAt?: string;
|
|
218
|
+
lastStatus?: JobRunStatus;
|
|
219
|
+
lastError?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Webhook signing secret ("whsec_" + base64). Generated by the SDK; hosts must
|
|
222
|
+
* encrypt it at rest and show it only on create / rotate.
|
|
223
|
+
*/
|
|
224
|
+
secret?: string;
|
|
225
|
+
/** Who made it — a person (host API/UI) or the agent itself (manage_job tool). */
|
|
226
|
+
createdBy: "user" | "agent";
|
|
227
|
+
/** The session the agent was asked in, when createdBy is "agent". */
|
|
228
|
+
createdInSessionId?: string;
|
|
229
|
+
/** Send each run's result to a chat (A-100 phase 3). Absent = results stay in the run's session. */
|
|
230
|
+
/** Update (A-127): to every chat in the list (several channels' home chats, say). Absent or empty = results stay in the run's session. */
|
|
231
|
+
deliveries?: JobDelivery[];
|
|
232
|
+
/** ISO timestamps. */
|
|
233
|
+
createdAt: string;
|
|
234
|
+
updatedAt: string;
|
|
235
|
+
}
|
|
236
|
+
/** What happened to an incoming event. */
|
|
237
|
+
export type JobEventStatus =
|
|
238
|
+
/** Matched and queued in a run. */
|
|
239
|
+
"accepted"
|
|
240
|
+
/** Did not match the job's filter (kept so the history shows why). */
|
|
241
|
+
| "filtered"
|
|
242
|
+
/** Matched but dropped: a chain too deep, the previous run still going... (`reason`). */
|
|
243
|
+
| "suppressed";
|
|
244
|
+
/**
|
|
245
|
+
* One event in a job's durable inbox — a CloudEvents-style envelope plus where it
|
|
246
|
+
* came from. Unique per job + source + sourceEventId: the same source event
|
|
247
|
+
* delivered twice is one inbox entry, while different jobs each get their own.
|
|
248
|
+
* A clock tick is an event too (source "schedule", id = the scheduled time), so a
|
|
249
|
+
* scheduled time runs at most once.
|
|
250
|
+
*/
|
|
251
|
+
export interface JobEvent {
|
|
252
|
+
id: string;
|
|
253
|
+
jobId: string;
|
|
254
|
+
agentId: string;
|
|
255
|
+
/** "schedule", "aec:jobs", "aec:channels", "webhook", "manual", or a CloudEvents source. */
|
|
256
|
+
source: string;
|
|
257
|
+
/** The source's own id for the event (a scheduled time, webhook-id, X-GitHub-Delivery, a run id...). */
|
|
258
|
+
sourceEventId: string;
|
|
259
|
+
type: string;
|
|
260
|
+
/** The entity it is about; events are coalesced per subject. */
|
|
261
|
+
subject?: string;
|
|
262
|
+
/** Monotonic revision of the subject; a run for an older revision than one already handled is suppressed. */
|
|
263
|
+
revision?: number;
|
|
264
|
+
/** When it happened at the source (ISO). */
|
|
265
|
+
time: string;
|
|
266
|
+
/** When the inbox received it (ISO). */
|
|
267
|
+
receivedAt: string;
|
|
268
|
+
/** Bounded JSON data — untrusted. */
|
|
269
|
+
data: unknown;
|
|
270
|
+
/** Ties together everything this event led to. */
|
|
271
|
+
correlationId: string;
|
|
272
|
+
/** The event that caused this one, when known. */
|
|
273
|
+
causationId?: string;
|
|
274
|
+
/** The job run whose output caused this event, when it came from one. */
|
|
275
|
+
originRunId?: string;
|
|
276
|
+
/** 0 for an outside event, origin run depth + 1 for one caused by an event or webhook job's run. */
|
|
277
|
+
depth: number;
|
|
278
|
+
status: JobEventStatus;
|
|
279
|
+
/** Why it was filtered or suppressed. */
|
|
280
|
+
reason?: string;
|
|
281
|
+
/** The run it joined. */
|
|
282
|
+
runId?: string;
|
|
283
|
+
}
|
|
284
|
+
export type JobRunStatus =
|
|
285
|
+
/** Open: collecting events until notBefore, then claimable. */
|
|
286
|
+
"pending"
|
|
287
|
+
/** Closed and claimable from notBefore: a retry after a transient failure, or waiting for the rate window. */
|
|
288
|
+
| "waiting" | "running" | "succeeded" | "failed"
|
|
289
|
+
/** Ended without doing its work: an approval was needed, or the token budget is used up (`reason`). */
|
|
290
|
+
| "blocked"
|
|
291
|
+
/** Dropped before running: the job was disabled or changed, the revision was stale... (`reason`). */
|
|
292
|
+
| "suppressed"
|
|
293
|
+
/** Stopped by a person. */
|
|
294
|
+
| "stopped";
|
|
295
|
+
/**
|
|
296
|
+
* What started a run.
|
|
297
|
+
* "schedule" = the job's clock; "catch-up" = its time passed while the host was down;
|
|
298
|
+
* "manual" = run now; "event" / "webhook" = an event from that source; "test" = a test
|
|
299
|
+
* event; "replay" = a person replayed another run's events.
|
|
300
|
+
*/
|
|
301
|
+
export type JobRunCause = "schedule" | "catch-up" | "manual" | "event" | "webhook" | "test" | "replay";
|
|
302
|
+
/**
|
|
303
|
+
* One logical run — the unit of work, retries and history. Several coalesced
|
|
304
|
+
* events share one run. Retries re-run the same logical run (same id and
|
|
305
|
+
* session); a result checkpoint (resultAt) means the reasoning is done and a
|
|
306
|
+
* reclaim only finishes recording it.
|
|
307
|
+
*/
|
|
308
|
+
export interface JobRun {
|
|
309
|
+
id: string;
|
|
310
|
+
jobId: string;
|
|
311
|
+
agentId: string;
|
|
312
|
+
/** Job version when the run was queued. */
|
|
313
|
+
jobVersion: number;
|
|
314
|
+
cause: JobRunCause;
|
|
315
|
+
/** The coalescing bucket: the subject, or "" when events have none. */
|
|
316
|
+
bucketKey: string;
|
|
317
|
+
status: JobRunStatus;
|
|
318
|
+
/** The inbox events this run handles, oldest first. */
|
|
319
|
+
eventIds: string[];
|
|
320
|
+
/** Newest revision among the events. */
|
|
321
|
+
revision?: number;
|
|
322
|
+
correlationId: string;
|
|
323
|
+
/** Depth of the run's events (the deepest). */
|
|
324
|
+
depth: number;
|
|
325
|
+
/** Claimable from (ISO). */
|
|
326
|
+
notBefore: string;
|
|
327
|
+
/** Collecting ends (ISO): the quiet window never pushes notBefore past it. */
|
|
328
|
+
deadline: string;
|
|
329
|
+
/** No retry is scheduled after this (ISO). */
|
|
330
|
+
expiresAt: string;
|
|
331
|
+
attempts: number;
|
|
332
|
+
maxAttempts: number;
|
|
333
|
+
/** The worker holding the run, while it runs. */
|
|
334
|
+
leaseOwner?: string;
|
|
335
|
+
leaseUntil?: string;
|
|
336
|
+
/** The session the run writes into (created on the first attempt, kept for retries). */
|
|
337
|
+
sessionId?: string;
|
|
338
|
+
/** Result checkpoint: when the agent's turn finished (ISO). */
|
|
339
|
+
resultAt?: string;
|
|
340
|
+
/** The agent's reply. */
|
|
341
|
+
output?: string;
|
|
342
|
+
/** The reply was [[SILENT]]: nothing to report, so nothing is delivered. */
|
|
343
|
+
silent?: boolean;
|
|
344
|
+
/** A-103: what the run did ("tool": a tool job's stored call). Absent = a prompt run. */
|
|
345
|
+
action?: "prompt" | "tool";
|
|
346
|
+
usage?: {
|
|
347
|
+
inputTokens: number;
|
|
348
|
+
outputTokens: number;
|
|
349
|
+
};
|
|
350
|
+
/** A-88 stop reason of the turn ("max_tokens" / "error"), when it was not a normal finish. */
|
|
351
|
+
stopReason?: string;
|
|
352
|
+
error?: string;
|
|
353
|
+
/** Why it was blocked or suppressed. */
|
|
354
|
+
reason?: string;
|
|
355
|
+
/** In-app delivery: when the result was recorded where people read it (ISO). Separate from the run status. */
|
|
356
|
+
deliveredAt?: string;
|
|
357
|
+
/** Set on a run made by replaying another run's events. */
|
|
358
|
+
replayOf?: string;
|
|
359
|
+
/** ISO timestamps. */
|
|
360
|
+
createdAt: string;
|
|
361
|
+
startedAt?: string;
|
|
362
|
+
finishedAt?: string;
|
|
363
|
+
updatedAt: string;
|
|
364
|
+
}
|
|
365
|
+
/** Fields a caller may set when creating a job. Omitted coalescing / limits use the defaults for its kind. */
|
|
366
|
+
export interface CreateJobInput {
|
|
367
|
+
name: string;
|
|
368
|
+
description?: string;
|
|
369
|
+
when: JobWhen;
|
|
370
|
+
filter?: JobFilter;
|
|
371
|
+
prompt: string;
|
|
372
|
+
/** Default true. */
|
|
373
|
+
enabled?: boolean;
|
|
374
|
+
/** Default "new". */
|
|
375
|
+
sessionMode?: JobSessionMode;
|
|
376
|
+
coalesce?: Partial<JobCoalesce>;
|
|
377
|
+
limits?: Partial<JobLimits>;
|
|
378
|
+
/** Default "user". The manage_job tool sets "agent". */
|
|
379
|
+
createdBy?: "user" | "agent";
|
|
380
|
+
createdInSessionId?: string;
|
|
381
|
+
/** Default none. */
|
|
382
|
+
/** Update (A-127): a list. */
|
|
383
|
+
deliveries?: JobDelivery[];
|
|
384
|
+
/** A-103: default a prompt run. */
|
|
385
|
+
action?: JobAction;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Fields a caller may change. Any change bumps the version. A changed schedule or a
|
|
389
|
+
* re-enable recomputes nextRunAt (counted from now — no catch-up for the time it was off).
|
|
390
|
+
*/
|
|
391
|
+
export type UpdateJobInput = Partial<Pick<Job, "name" | "description" | "enabled" | "when" | "filter" | "prompt" | "sessionMode">> & {
|
|
392
|
+
coalesce?: Partial<JobCoalesce>;
|
|
393
|
+
limits?: Partial<JobLimits>;
|
|
394
|
+
/** `null` removes the delivery. */
|
|
395
|
+
/** Update (A-127): replaces the deliveries; `null` or `[]` removes them all. */
|
|
396
|
+
deliveries?: JobDelivery[] | null;
|
|
397
|
+
/** A-103: `null` (or { kind: "prompt" }) turns a tool job back into a prompt job. */
|
|
398
|
+
action?: JobAction | null;
|
|
399
|
+
};
|
|
400
|
+
/** A test event sent by hand (the Jobs page's "Send test event"). */
|
|
401
|
+
export interface JobTestEventInput {
|
|
402
|
+
type: string;
|
|
403
|
+
subject?: string;
|
|
404
|
+
revision?: number;
|
|
405
|
+
data?: unknown;
|
|
406
|
+
}
|
|
407
|
+
/** What accept() did with an incoming event. */
|
|
408
|
+
export interface JobAcceptResult {
|
|
409
|
+
/** The source event was already in the inbox; nothing changed. */
|
|
410
|
+
duplicate: boolean;
|
|
411
|
+
event: JobEvent;
|
|
412
|
+
/** The run the event joined, when it was accepted. */
|
|
413
|
+
run?: JobRun;
|
|
414
|
+
}
|
|
415
|
+
/** An inbound webhook request, passed through by the host. `body` is the raw bytes the signature covers. */
|
|
416
|
+
export interface JobWebhookRequest {
|
|
417
|
+
method: string;
|
|
418
|
+
/** Lower-case header names. */
|
|
419
|
+
headers: Record<string, string | undefined>;
|
|
420
|
+
body: string | Uint8Array;
|
|
421
|
+
}
|
|
422
|
+
export interface JobWebhookResponse {
|
|
423
|
+
status: number;
|
|
424
|
+
body?: unknown;
|
|
425
|
+
}
|
|
426
|
+
/** Handed to the runner for one attempt of a run. */
|
|
427
|
+
export interface JobRunContext {
|
|
428
|
+
agentId: string;
|
|
429
|
+
jobId: string;
|
|
430
|
+
jobName: string;
|
|
431
|
+
runId: string;
|
|
432
|
+
cause: JobRunCause;
|
|
433
|
+
attempt: number;
|
|
434
|
+
/** The session to run in — already created and owned by the agent. */
|
|
435
|
+
sessionId: string;
|
|
436
|
+
/**
|
|
437
|
+
* The message the agent receives: the job's prompt, plus (event and webhook jobs)
|
|
438
|
+
* the untrusted event block.
|
|
439
|
+
*/
|
|
440
|
+
prompt: string;
|
|
441
|
+
/** Aborted when the run is stopped, the agent is disposed, or the lease is lost. */
|
|
442
|
+
signal: AbortSignal;
|
|
443
|
+
}
|
|
444
|
+
export interface JobRunResult {
|
|
445
|
+
/** The agent's reply. */
|
|
446
|
+
output?: string;
|
|
447
|
+
usage?: {
|
|
448
|
+
inputTokens: number;
|
|
449
|
+
outputTokens: number;
|
|
450
|
+
};
|
|
451
|
+
/** True when the run was stopped before it finished. */
|
|
452
|
+
aborted?: boolean;
|
|
453
|
+
stopReason?: string;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Runs one agent turn for a job run: `context.prompt` as the user message in
|
|
457
|
+
* `context.sessionId`. Supplied by the host (AgentCore.useJobRunner) so the turn
|
|
458
|
+
* takes the host's per-session lock, stop registry, traces and usage. Throwing fails
|
|
459
|
+
* the attempt; an SDKError with retryable = false is not retried. The runner should
|
|
460
|
+
* pass `context.sessionId` as RunOptions.sessionId (A-97).
|
|
461
|
+
*/
|
|
462
|
+
export type JobRunner = (context: JobRunContext) => Promise<JobRunResult>;
|
|
463
|
+
/**
|
|
464
|
+
* An agent's jobs — the API the host routes and the job tools use. Every call is
|
|
465
|
+
* scoped to the owning agent; an id from another agent is "not found".
|
|
466
|
+
*/
|
|
467
|
+
export interface AgentJobs {
|
|
468
|
+
list(): Promise<Job[]>;
|
|
469
|
+
get(id: string): Promise<Job | null>;
|
|
470
|
+
/** Validates the configuration; throws JobError. A webhook job gets a fresh secret. */
|
|
471
|
+
create(input: CreateJobInput): Promise<Job>;
|
|
472
|
+
update(id: string, patch: UpdateJobInput): Promise<Job>;
|
|
473
|
+
/** Deletes the job, its inbox and run history; stops its runs in progress. */
|
|
474
|
+
delete(id: string): Promise<void>;
|
|
475
|
+
/** A new webhook secret; the old one stops working at once. */
|
|
476
|
+
rotateSecret(id: string): Promise<Job>;
|
|
477
|
+
/** Queue a run now, outside the schedule (schedule jobs; event and webhook jobs take a test event). */
|
|
478
|
+
runNow(id: string): Promise<JobRun>;
|
|
479
|
+
/** Accept a hand-made event (source "manual") through the same filter and inbox (event and webhook jobs). */
|
|
480
|
+
sendTestEvent(id: string, input: JobTestEventInput): Promise<JobAcceptResult>;
|
|
481
|
+
/** Verify, parse and accept a webhook delivery. Resolves only after the event is stored. */
|
|
482
|
+
handleWebhook(id: string, request: JobWebhookRequest): Promise<JobWebhookResponse>;
|
|
483
|
+
/** Newest received first. */
|
|
484
|
+
listEvents(id: string, limit?: number): Promise<JobEvent[]>;
|
|
485
|
+
/** Newest queued first. */
|
|
486
|
+
listRuns(id: string, limit?: number): Promise<JobRun[]>;
|
|
487
|
+
getRun(runId: string): Promise<JobRun | null>;
|
|
488
|
+
/** The inbox events a run handles. */
|
|
489
|
+
getRunEvents(runId: string): Promise<JobEvent[]>;
|
|
490
|
+
/** Stop a running or queued run. Returns false when it had already ended. */
|
|
491
|
+
stopRun(runId: string): Promise<boolean>;
|
|
492
|
+
/** Queue a new run over the same events (same event ids, replayOf = runId). */
|
|
493
|
+
replayRun(runId: string): Promise<JobRun>;
|
|
494
|
+
}
|
|
495
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/job-manager/types.ts"],"names":[],"mappings":"AAuCA,yCAAyC;AACzC,MAAM,MAAM,WAAW;AACrB,0HAA0H;AACxH;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,CAAC,+EAA+E;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE;AAC7H,yEAAyE;GACvE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAC/B,2EAA2E;GACzE;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/B,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,GACf,WAAW,GACX;IAAE,IAAI,EAAE,OA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CAAC;IAC5D,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9C,sCAAsC;IACtC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjD,6EAA6E;IAC7E,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,+EAA+E;IAC/E,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Jobs (A-126) — one concept for "when X happens, run this prompt, maybe tell me".
|
|
3
|
+
//
|
|
4
|
+
// A Job is a stored prompt plus WHEN it runs:
|
|
5
|
+
// - on a clock ("at" / "every" / "cron") — was a scheduled job (A-69)
|
|
6
|
+
// - on an event ("event") — the agent's own events, was an event trigger (A-70)
|
|
7
|
+
// - on a webhook ("webhook") — a signed POST from another system, was a webhook trigger (A-70)
|
|
8
|
+
//
|
|
9
|
+
// Every run, whatever started it, goes through one durable path:
|
|
10
|
+
//
|
|
11
|
+
// clock tick / bus event / webhook / run now / test event
|
|
12
|
+
// ─► filter ─► durable inbox (dedupe + coalesce) ─► claim/lease ─► agent turn ─► result
|
|
13
|
+
//
|
|
14
|
+
// The JobManager decides WHEN and WHAT; the host decides HOW through a JobRunner,
|
|
15
|
+
// so a run takes the host's per-session lock, stop registry, traces and usage.
|
|
16
|
+
//
|
|
17
|
+
// (from A-70) Durability comes from the store: JobStore.accept() records the event and
|
|
18
|
+
// queues its run in one atomic step, so a host that answers a webhook only after
|
|
19
|
+
// accept() resolves never acknowledges an event it could lose. The in-memory
|
|
20
|
+
// store keeps nothing across a restart.
|
|
21
|
+
//
|
|
22
|
+
// (from A-69) A prompt job is data, not code: it is created by a user (host API/UI)
|
|
23
|
+
// or by the agent itself (manage_job tool), kept in PersistenceHub.jobs and survives a
|
|
24
|
+
// restart. Each run is a real agent turn — model + tools + skills + memory — in a
|
|
25
|
+
// session the user can open later. Code registered by a plugin is a scheduled task
|
|
26
|
+
// (scheduled-task-manager/), not a job.
|
|
27
|
+
// Update (A-126): scheduled tasks (plugin code on a clock) were removed — nothing used
|
|
28
|
+
// them; every scheduled run is a job.
|
|
29
|
+
//
|
|
30
|
+
// Update (A-70 agent tools, kept): the agent may create and change jobs through the
|
|
31
|
+
// manage_job tool, which asks the user for approval on every call (so an unattended run
|
|
32
|
+
// never can). Such a job is marked createdBy "agent", and when it was asked for in a
|
|
33
|
+
// channel chat it delivers its results back there.
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
/** True for a job that runs on a clock ("at" / "every" / "cron"). */
|
|
36
|
+
export function isScheduleWhen(when) {
|
|
37
|
+
return when.kind === "cron" || when.kind === "every" || when.kind === "at";
|
|
38
|
+
}
|
|
39
|
+
/** A delivery to the home chat of each of homes (A-127). */
|
|
40
|
+
export function homeJobDeliveries(homes) {
|
|
41
|
+
return homes.map((h) => ({ channelId: h.channelId, target: "home", when: "always" }));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Where a job's results go when the turn names nothing (A-127): back to this chat in a
|
|
45
|
+
* chat app, else to every home chat. Empty when there is neither.
|
|
46
|
+
*/
|
|
47
|
+
export function defaultJobDeliveries(options) {
|
|
48
|
+
return options.here ? [options.here] : homeJobDeliveries(options.homes);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/job-manager/types.ts"],"names":[],"mappings":"AAAA,8EAA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hen = Extract<JobWhen, {
|
|
4
|
+
kind: "webhook";
|
|
5
|
+
}>;
|
|
6
|
+
/** A webhook signature older or newer than this is refused. */
|
|
7
|
+
export declare const WEBHOOK_TOLERANCE_MS: number;
|
|
8
|
+
/** A fresh signing secret: "whsec_" + 32 random bytes in base64. */
|
|
9
|
+
export declare function generateWebhookSecret(): string;
|
|
10
|
+
/** Sign a Standard Webhooks delivery — what a sender does (tests, the docs' example). */
|
|
11
|
+
export declare function signStandardWebhook(secret: string, id: string, timestamp: number, body: string | Uint8Array): string;
|
|
12
|
+
/** Sign a GitHub-style delivery: the X-Hub-Signature-256 value. */
|
|
13
|
+
export declare function signGithubWebhook(secret: string, body: string | Uint8Array): string;
|
|
14
|
+
/** Undefined when the signature is valid, otherwise why it is not. */
|
|
15
|
+
export declare function verifyWebhookSignature(scheme: WebhookWhen["signature"], secret: string, request: JobWebhookRequest, now: number): string | undefined;
|
|
16
|
+
/** What a delivery says about its event — before filtering. */
|
|
17
|
+
export interface WebhookEnvelope {
|
|
18
|
+
sourceEventId: string;
|
|
19
|
+
source: string;
|
|
20
|
+
type: string;
|
|
21
|
+
subject?: string;
|
|
22
|
+
revision?: number;
|
|
23
|
+
/** ISO, when the delivery says. */
|
|
24
|
+
time?: string;
|
|
25
|
+
data: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The event a verified delivery carries, or an error message. A CloudEvents body
|
|
29
|
+
* (with "specversion") supplies id, source, type, subject, time and data; a
|
|
30
|
+
* Standard Webhooks body supplies type, timestamp and data; a GitHub delivery
|
|
31
|
+
* is its whole body.
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseWebhookEvent(source: WebhookWhen, request: JobWebhookRequest): WebhookEnvelope | {
|
|
34
|
+
error: string;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=webhook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","s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