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,57 @@
|
|
|
1
|
+
import { withSandbox } from "../workspace/workspace-helpers.js";
|
|
2
|
+
import { APP_MANIFEST, APPS_DIR, readManifest, validAppName } from "./preview-helpers.js";
|
|
3
|
+
/**
|
|
4
|
+
* list_apps (A-124) — the apps installed in the agent's workspace: every apps/<app>/
|
|
5
|
+
* folder with an app.json, with what it opens. The model checks it before open_in_app.
|
|
6
|
+
*/
|
|
7
|
+
export class ListAppsTool {
|
|
8
|
+
name = "tool:list-apps";
|
|
9
|
+
version = "1.0.0";
|
|
10
|
+
definition = {
|
|
11
|
+
name: "list_apps",
|
|
12
|
+
description: `List the apps installed in your workspace — each is a folder ${APPS_DIR}/<app>/ with an ${APP_MANIFEST} ` +
|
|
13
|
+
'({ "name", "description", "entry": "index.html", "opens": [".ifc"], "openUrl": "index.html?file={path}" }). ' +
|
|
14
|
+
"Use it to find an app that opens a file the user gave you, then call open_in_app.",
|
|
15
|
+
parameters: { type: "object", properties: {}, required: [] },
|
|
16
|
+
risk: "read-only",
|
|
17
|
+
sandboxOperation: "fs.read",
|
|
18
|
+
};
|
|
19
|
+
async execute(_args, context) {
|
|
20
|
+
return withSandbox("list_apps", context, async (env) => {
|
|
21
|
+
const dir = await env.stat(APPS_DIR);
|
|
22
|
+
if (!dir || dir.type !== "directory") {
|
|
23
|
+
return {
|
|
24
|
+
content: `No apps installed — there is no ${APPS_DIR}/ folder. To install one, put a static web app in ` +
|
|
25
|
+
`${APPS_DIR}/<app>/ with an ${APP_MANIFEST} that says which files it opens.`,
|
|
26
|
+
metadata: { count: 0 },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const listing = await env.list(APPS_DIR);
|
|
30
|
+
const apps = [];
|
|
31
|
+
const lines = [];
|
|
32
|
+
for (const entry of listing.entries) {
|
|
33
|
+
if (entry.type !== "directory" || !validAppName(entry.name))
|
|
34
|
+
continue;
|
|
35
|
+
const manifest = await readManifest(env, entry.name);
|
|
36
|
+
if (manifest === null)
|
|
37
|
+
continue;
|
|
38
|
+
if (typeof manifest === "string") {
|
|
39
|
+
lines.push(`${entry.name} · broken manifest: ${manifest}`);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
apps.push({ app: entry.name, ...manifest });
|
|
43
|
+
lines.push([
|
|
44
|
+
`${entry.name}${manifest.name !== entry.name ? ` (${manifest.name})` : ""}`,
|
|
45
|
+
manifest.opens.length ? `opens ${manifest.opens.join(", ")}` : "opens no files",
|
|
46
|
+
`entry ${manifest.entry}`,
|
|
47
|
+
...(manifest.description ? [manifest.description] : []),
|
|
48
|
+
].join(" · "));
|
|
49
|
+
}
|
|
50
|
+
if (lines.length === 0) {
|
|
51
|
+
return { content: `No apps installed — no folder in ${APPS_DIR}/ has an ${APP_MANIFEST}.`, metadata: { count: 0 } };
|
|
52
|
+
}
|
|
53
|
+
return { content: `${apps.length} app${apps.length === 1 ? "" : "s"}:\n${lines.join("\n")}`, metadata: { count: apps.length, apps } };
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=list-apps-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-apps-tool.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/list-apps-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE1F;;;GAGG;AACH,MAAM,OAAO,YAAY;IACd,IAAI,GAAG,gBAAgB,CAAC;IACxB,OAAO,GAAG,OAAO,CAAC;IAClB,UAAU,GAAmB;QACpC,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,gEAAgE,QAAQ,mBAAmB,YAAY,GAAG;YAC1G,8GAA8G;YAC9G,mFAAmF;QACrF,UAA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
|
2
|
+
/**
|
|
3
|
+
* open_in_app (A-124) — open a workspace file (e.g. a model the user uploaded) in an app
|
|
4
|
+
* installed in apps/<app>/, or just start the app. Checks that the app and the file
|
|
5
|
+
* exist and that the app opens that kind of file, then returns a preview link to the
|
|
6
|
+
* app's page with the file's URL filled into its openUrl — the app fetches the file
|
|
7
|
+
* from the same preview origin.
|
|
8
|
+
*/
|
|
9
|
+
export declare class OpenInAppTool implements ToolHandler {
|
|
10
|
+
readonly name = "tool:open-in-app";
|
|
11
|
+
readonly version = "1.0.0";
|
|
12
|
+
readonly definition: ToolDefinition;
|
|
13
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=open-in-app-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app-tool.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/open-in-app-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAc3F;;;;;;GAMG;AACH,qBAAa,aAAc,YAAW,WAAW;IAC/C,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAejC;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA6CtF;CACF"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { posix } from "node:path";
|
|
2
|
+
import { citeLinkNote } from "../../tool-links.js";
|
|
3
|
+
import { argError, stringArg, withSandbox } from "../workspace/workspace-helpers.js";
|
|
4
|
+
import { APP_MANIFEST, APPS_DIR, extensionOf, previewLink, readManifest, relativeUrl, validAppName, workspaceRelative, } from "./preview-helpers.js";
|
|
5
|
+
/**
|
|
6
|
+
* open_in_app (A-124) — open a workspace file (e.g. a model the user uploaded) in an app
|
|
7
|
+
* installed in apps/<app>/, or just start the app. Checks that the app and the file
|
|
8
|
+
* exist and that the app opens that kind of file, then returns a preview link to the
|
|
9
|
+
* app's page with the file's URL filled into its openUrl — the app fetches the file
|
|
10
|
+
* from the same preview origin.
|
|
11
|
+
*/
|
|
12
|
+
export class OpenInAppTool {
|
|
13
|
+
name = "tool:open-in-app";
|
|
14
|
+
version = "1.0.0";
|
|
15
|
+
definition = {
|
|
16
|
+
name: "open_in_app",
|
|
17
|
+
description: "Open a file from your workspace in one of your installed apps (see list_apps), shown live next to the chat — " +
|
|
18
|
+
'e.g. an IFC model the user uploaded (in "files/") in an IFC viewer. Leave out "file" to just start the app.',
|
|
19
|
+
parameters: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
app: { type: "string", description: `The app's folder name in ${APPS_DIR}/` },
|
|
23
|
+
file: { type: "string", description: 'The workspace file to open, e.g. "files/tower-a.ifc"' },
|
|
24
|
+
},
|
|
25
|
+
required: ["app"],
|
|
26
|
+
},
|
|
27
|
+
risk: "read-only",
|
|
28
|
+
sandboxOperation: "fs.read",
|
|
29
|
+
};
|
|
30
|
+
async execute(args, context) {
|
|
31
|
+
const app = stringArg(args, "app")?.trim().replace(/^apps\//, "").replace(/\/+$/, "");
|
|
32
|
+
const file = stringArg(args, "file")?.trim();
|
|
33
|
+
if (!app)
|
|
34
|
+
return argError("open_in_app", '"app" is required — see list_apps');
|
|
35
|
+
if (!validAppName(app))
|
|
36
|
+
return argError("open_in_app", `"${app}" is not an app folder name`);
|
|
37
|
+
return withSandbox("open_in_app", context, async (env) => {
|
|
38
|
+
const manifest = await readManifest(env, app);
|
|
39
|
+
if (manifest === null) {
|
|
40
|
+
return argError("open_in_app", `No app "${app}" — there is no ${APPS_DIR}/${app}/${APP_MANIFEST}. Check list_apps.`);
|
|
41
|
+
}
|
|
42
|
+
if (typeof manifest === "string")
|
|
43
|
+
return argError("open_in_app", `The app "${app}" is broken: ${manifest}`);
|
|
44
|
+
const appDir = `${APPS_DIR}/${app}`;
|
|
45
|
+
const entry = await env.stat(posix.join(appDir, manifest.entry));
|
|
46
|
+
if (!entry || entry.type !== "file") {
|
|
47
|
+
return argError("open_in_app", `The app "${app}" has no ${manifest.entry} (its entry page)`);
|
|
48
|
+
}
|
|
49
|
+
if (!file) {
|
|
50
|
+
const link = previewLink(`${appDir}/${manifest.entry}`, manifest.name);
|
|
51
|
+
return {
|
|
52
|
+
content: `${manifest.name} is open — the user sees it live next to the chat.${citeLinkNote(link)}`,
|
|
53
|
+
link,
|
|
54
|
+
metadata: { app, uri: link.uri },
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const stat = await env.stat(file);
|
|
58
|
+
if (!stat)
|
|
59
|
+
return argError("open_in_app", `"${file}" does not exist`);
|
|
60
|
+
if (stat.type !== "file")
|
|
61
|
+
return argError("open_in_app", `"${file}" is a ${stat.type}, not a file`);
|
|
62
|
+
const ext = extensionOf(stat.path);
|
|
63
|
+
if (manifest.opens.length === 0)
|
|
64
|
+
return argError("open_in_app", `${manifest.name} does not open files — leave out "file" to just start it`);
|
|
65
|
+
if (!manifest.opens.includes(ext)) {
|
|
66
|
+
return argError("open_in_app", `${manifest.name} opens ${manifest.opens.join(", ")} files, not "${ext || "(no extension)"}"`);
|
|
67
|
+
}
|
|
68
|
+
const fileRel = workspaceRelative(env, stat.path);
|
|
69
|
+
const [page, query = ""] = manifest.openUrl.split(/\?(.*)/s, 2);
|
|
70
|
+
const filled = query.replaceAll("{path}", encodeURIComponent(relativeUrl(appDir, fileRel)));
|
|
71
|
+
const link = previewLink(`${appDir}/${page}`, `${posix.basename(fileRel)} in ${manifest.name}`, filled);
|
|
72
|
+
return {
|
|
73
|
+
content: `${posix.basename(fileRel)} is open in ${manifest.name} — the user sees it live next to the chat.${citeLinkNote(link)}`,
|
|
74
|
+
link,
|
|
75
|
+
metadata: { app, file: stat.path, uri: link.uri },
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=open-in-app-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app-tool.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/open-in-app-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;GAMG;AACH,MAAM,OAAO,aAAa;IACf,IAAI,GAAG,kBAAkB,CAAC;IAC1B,OAAO,GAAG,OAAO,CAAC;IAClB,UAAU,GAAmB;QACpC,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,+GAA+G;YAC/G,6GAA6G;QAC/G,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,QAAQ,GAAG,EAAE;gBAC7E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sDAAsD,EAAE;aAC9F;YACD,QAAQ,EAAE,CAAC,KAAK,CAAC;SAClB;QACD,IAAI,EAAE,WAAW;QACjB,gBAAgB,EAAE,SAAS;KAC5B,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,IAA6B,EAAE,OAAoB;QAC/D,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,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AQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAsB,CAAC;YACrF,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,kBAAkB,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YAC5F,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;YACxG,OAAO;gBACL,OAAO,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,QAAQ,CAAC,IAAI,6CAA6C,YAAY,CAAC,IAAI,CAAC,EAAE;gBAChI,IAAI;gBACJ,QAAQ,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;aAClD,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ToolResultLink } from "../../../../kernel/types.js";
|
|
2
|
+
import type { SandboxView } from "../../../sandbox-hub/types/sandbox.js";
|
|
3
|
+
/** Folder of the agent's workspace that holds apps, one per sub-folder. */
|
|
4
|
+
export declare const APPS_DIR = "apps";
|
|
5
|
+
/** The manifest file of an app: apps/<app>/app.json. */
|
|
6
|
+
export declare const APP_MANIFEST = "app.json";
|
|
7
|
+
/** What a folder preview opens. */
|
|
8
|
+
export declare const INDEX_FILE = "index.html";
|
|
9
|
+
/** apps/<app>/app.json — what list_apps shows and open_in_app follows. */
|
|
10
|
+
export interface AppManifest {
|
|
11
|
+
/** Display name (default: the folder name). */
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
/** The page that starts the app, relative to its folder (default index.html). */
|
|
15
|
+
entry: string;
|
|
16
|
+
/** File extensions the app opens, e.g. [".ifc"]; empty = it opens no files. */
|
|
17
|
+
opens: string[];
|
|
18
|
+
/**
|
|
19
|
+
* How to open a file: a URL relative to the app folder with {path} in its query where
|
|
20
|
+
* the file goes, e.g. "index.html?file={path}". Default: "<entry>?file={path}". {path}
|
|
21
|
+
* becomes the file's URL relative to the app folder, so the app can fetch() it as is
|
|
22
|
+
* after reading the parameter (URLSearchParams decodes it once).
|
|
23
|
+
*/
|
|
24
|
+
openUrl: string;
|
|
25
|
+
}
|
|
26
|
+
/** The workspace path of `logical` relative to the working directory ("" = the working directory). */
|
|
27
|
+
export declare function workspaceRelative(env: SandboxView, logical: string): string;
|
|
28
|
+
/** Percent-encode each segment of a relative path (keeps the slashes). */
|
|
29
|
+
export declare function encodePath(rel: string): string;
|
|
30
|
+
/** A-133: whether a workspace path is an image the chat can show inside a reply. */
|
|
31
|
+
export declare function isImageFile(rel: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A-133: appended to the preview of an image instead of citeLinkNote — asks the model to
|
|
34
|
+
* show the image inside its reply as markdown (), which the chat
|
|
35
|
+
* renders as the image itself; a click still opens it in the Preview panel.
|
|
36
|
+
*/
|
|
37
|
+
export declare function embedImageNote(link: ToolResultLink): string;
|
|
38
|
+
/** The preview link of a workspace-relative path, with an optional query ("file=..."). */
|
|
39
|
+
export declare function previewLink(rel: string, name: string, query?: string): ToolResultLink;
|
|
40
|
+
/** An app folder name: one path segment, no dot-files. */
|
|
41
|
+
export declare function validAppName(app: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Read and check apps/<app>/app.json. A missing manifest is null; a broken one is an
|
|
44
|
+
* error message (string) the tools report back.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readManifest(env: SandboxView, app: string): Promise<AppManifest | string | null>;
|
|
47
|
+
/** ".IFC" / "ifc" -> ".ifc". */
|
|
48
|
+
export declare function normalizeExtension(ext: string): string;
|
|
49
|
+
/** The extension of a file name, lower-case with its dot ("" when it has none). */
|
|
50
|
+
export declare function extensionOf(name: string): string;
|
|
51
|
+
/** The URL of `fileRel` relative to the app folder `appRel` (both workspace-relative), percent-encoded. */
|
|
52
|
+
export declare function relativeUrl(fromDir: string, fileRel: string): string;
|
|
53
|
+
//# sourceMappingURL=preview-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/preview-helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAOzE,2EAA2E;AAC3E,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,wDAAwD;AACxD,eAAO,MAAM,YAAY,aAAa,CAAC;AACvC,mCAAmC;AACnC,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG3E;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAKD,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE3D;AAED,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAErF;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC,CA+BtG;AAED,gCAAgC;AAChC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,2GAA2G;AAC3G,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpE"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { posix } from "node:path";
|
|
2
|
+
// A-124: shared plumbing of the preview tools. A preview link is a ToolResult.link (A-132)
|
|
3
|
+
// with a "preview://<workspace path>[?query]" URI: the path is relative to the agent's
|
|
4
|
+
// working directory, and the host turns it into a signed URL on its preview origin when
|
|
5
|
+
// the user opens it — so the link in a saved conversation never expires.
|
|
6
|
+
/** Folder of the agent's workspace that holds apps, one per sub-folder. */
|
|
7
|
+
export const APPS_DIR = "apps";
|
|
8
|
+
/** The manifest file of an app: apps/<app>/app.json. */
|
|
9
|
+
export const APP_MANIFEST = "app.json";
|
|
10
|
+
/** What a folder preview opens. */
|
|
11
|
+
export const INDEX_FILE = "index.html";
|
|
12
|
+
/** The workspace path of `logical` relative to the working directory ("" = the working directory). */
|
|
13
|
+
export function workspaceRelative(env, logical) {
|
|
14
|
+
const rel = posix.relative(env.workingDir, logical);
|
|
15
|
+
return rel.startsWith("..") ? logical.replace(/^\/+/, "") : rel;
|
|
16
|
+
}
|
|
17
|
+
/** Percent-encode each segment of a relative path (keeps the slashes). */
|
|
18
|
+
export function encodePath(rel) {
|
|
19
|
+
return rel.split("/").map((part) => encodeURIComponent(part)).join("/");
|
|
20
|
+
}
|
|
21
|
+
/** A-133: files the chat shows inline in a reply as an image, by extension. */
|
|
22
|
+
const IMAGE_FILE = /\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i;
|
|
23
|
+
/** A-133: whether a workspace path is an image the chat can show inside a reply. */
|
|
24
|
+
export function isImageFile(rel) {
|
|
25
|
+
return IMAGE_FILE.test(rel);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A-133: appended to the preview of an image instead of citeLinkNote — asks the model to
|
|
29
|
+
* show the image inside its reply as markdown (), which the chat
|
|
30
|
+
* renders as the image itself; a click still opens it in the Preview panel.
|
|
31
|
+
*/
|
|
32
|
+
export function embedImageNote(link) {
|
|
33
|
+
return `\nIt is an image: to show it inside your reply, write  on its own line.`;
|
|
34
|
+
}
|
|
35
|
+
/** The preview link of a workspace-relative path, with an optional query ("file=..."). */
|
|
36
|
+
export function previewLink(rel, name, query) {
|
|
37
|
+
return { uri: `preview://${encodePath(rel)}${query ? `?${query}` : ""}`, name, type: "preview" };
|
|
38
|
+
}
|
|
39
|
+
/** An app folder name: one path segment, no dot-files. */
|
|
40
|
+
export function validAppName(app) {
|
|
41
|
+
return /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(app) && !app.includes("..");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Read and check apps/<app>/app.json. A missing manifest is null; a broken one is an
|
|
45
|
+
* error message (string) the tools report back.
|
|
46
|
+
*/
|
|
47
|
+
export async function readManifest(env, app) {
|
|
48
|
+
const path = `${APPS_DIR}/${app}/${APP_MANIFEST}`;
|
|
49
|
+
const stat = await env.stat(path);
|
|
50
|
+
if (!stat)
|
|
51
|
+
return null;
|
|
52
|
+
if (stat.type !== "file")
|
|
53
|
+
return `${path} is not a file`;
|
|
54
|
+
const file = await env.readFile(path, { maxBytes: 64 * 1024 });
|
|
55
|
+
let raw;
|
|
56
|
+
try {
|
|
57
|
+
raw = JSON.parse(file.content);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return `${path} is not valid JSON: ${error instanceof Error ? error.message : String(error)}`;
|
|
61
|
+
}
|
|
62
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
63
|
+
return `${path} must be a JSON object`;
|
|
64
|
+
const m = raw;
|
|
65
|
+
const entry = typeof m["entry"] === "string" && m["entry"].trim() ? m["entry"].trim().replace(/^\.?\/+/, "") : INDEX_FILE;
|
|
66
|
+
if (entry.split("/").includes(".."))
|
|
67
|
+
return `${path}: "entry" must stay inside the app folder`;
|
|
68
|
+
const opens = Array.isArray(m["opens"])
|
|
69
|
+
? m["opens"].filter((x) => typeof x === "string" && x.trim() !== "").map((x) => normalizeExtension(x))
|
|
70
|
+
: [];
|
|
71
|
+
// {path} goes in the query ("viewer.html?model={path}"); anything else falls back to the default.
|
|
72
|
+
const given = typeof m["openUrl"] === "string" ? m["openUrl"].trim().replace(/^\.?\/+/, "") : "";
|
|
73
|
+
const queryAt = given.indexOf("?");
|
|
74
|
+
const openUrl = queryAt > 0 && given.indexOf("{path}") > queryAt ? given : `${entry}?file={path}`;
|
|
75
|
+
if (openUrl.split("?")[0].split("/").includes(".."))
|
|
76
|
+
return `${path}: "openUrl" must stay inside the app folder`;
|
|
77
|
+
return {
|
|
78
|
+
name: typeof m["name"] === "string" && m["name"].trim() ? m["name"].trim() : app,
|
|
79
|
+
...(typeof m["description"] === "string" && m["description"].trim() ? { description: m["description"].trim() } : {}),
|
|
80
|
+
entry,
|
|
81
|
+
opens,
|
|
82
|
+
openUrl,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/** ".IFC" / "ifc" -> ".ifc". */
|
|
86
|
+
export function normalizeExtension(ext) {
|
|
87
|
+
const e = ext.trim().toLowerCase();
|
|
88
|
+
return e.startsWith(".") ? e : `.${e}`;
|
|
89
|
+
}
|
|
90
|
+
/** The extension of a file name, lower-case with its dot ("" when it has none). */
|
|
91
|
+
export function extensionOf(name) {
|
|
92
|
+
const base = posix.basename(name);
|
|
93
|
+
const dot = base.lastIndexOf(".");
|
|
94
|
+
return dot > 0 ? base.slice(dot).toLowerCase() : "";
|
|
95
|
+
}
|
|
96
|
+
/** The URL of `fileRel` relative to the app folder `appRel` (both workspace-relative), percent-encoded. */
|
|
97
|
+
export function relativeUrl(fromDir, fileRel) {
|
|
98
|
+
return encodePath(posix.relative(fromDir, fileRel));
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=preview-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-helpers.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/preview-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlC,2FAA2F;AAC3F,uFAAuF;AACvF,wFAAwF;AACxF,yEAAyE;AAEzE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC/B,wDAAwD;AACxD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AACvC,mCAAmC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAoBvC,sGAAsG;AACtG,MAAM,UAAU,iBAAiB,CAAC,GAAgB,EAAE,OAAe;IACjE,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAClE,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,KAAK,CAAC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kBAAkB,CAAC,GAAW;IAC5C,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnC,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AACzC,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,OAAe;IAC1D,OAAO,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToolContext, ToolDefinition, ToolHandler, ToolOutput } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* preview (A-124) — show the user a web page from the workspace, live: an HTML file, or a
|
|
4
|
+
* folder with an index.html (a site or browser game with its CSS, scripts, images and
|
|
5
|
+
* other assets). Returns a preview link (ToolResult.link) the chat opens next to the
|
|
6
|
+
* conversation, served from the agent's sandbox on a separate origin.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PreviewTool implements ToolHandler {
|
|
9
|
+
readonly name = "tool:preview";
|
|
10
|
+
readonly version = "1.0.0";
|
|
11
|
+
readonly definition: ToolDefinition;
|
|
12
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=preview-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-tool.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/preview-tool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK3F;;;;;GAKG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAiBjC;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA2BtF;CACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { posix } from "node:path";
|
|
2
|
+
import { citeLinkNote } from "../../tool-links.js";
|
|
3
|
+
import { argError, stringArg, withSandbox } from "../workspace/workspace-helpers.js";
|
|
4
|
+
import { INDEX_FILE, embedImageNote, isImageFile, previewLink, workspaceRelative } from "./preview-helpers.js";
|
|
5
|
+
/**
|
|
6
|
+
* preview (A-124) — show the user a web page from the workspace, live: an HTML file, or a
|
|
7
|
+
* folder with an index.html (a site or browser game with its CSS, scripts, images and
|
|
8
|
+
* other assets). Returns a preview link (ToolResult.link) the chat opens next to the
|
|
9
|
+
* conversation, served from the agent's sandbox on a separate origin.
|
|
10
|
+
*/
|
|
11
|
+
export class PreviewTool {
|
|
12
|
+
name = "tool:preview";
|
|
13
|
+
version = "1.0.0";
|
|
14
|
+
definition = {
|
|
15
|
+
name: "preview",
|
|
16
|
+
description: "Show the user a web page from your workspace in a live preview next to the chat: an HTML file, " +
|
|
17
|
+
"or a folder that has an index.html (a website or browser game with its CSS, scripts, images and other " +
|
|
18
|
+
"files — keep them in the same folder and use relative links). Use it after you build or change a page. " +
|
|
19
|
+
"Images, PDFs and other files the browser can show work too. For an image, the result also tells you how " +
|
|
20
|
+
"to show it inside your reply.",
|
|
21
|
+
parameters: {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
path: { type: "string", description: 'The HTML file or folder to preview, e.g. "sites/landing" or "game/index.html"' },
|
|
25
|
+
},
|
|
26
|
+
required: ["path"],
|
|
27
|
+
},
|
|
28
|
+
risk: "read-only",
|
|
29
|
+
sandboxOperation: "fs.read",
|
|
30
|
+
};
|
|
31
|
+
async execute(args, context) {
|
|
32
|
+
const path = stringArg(args, "path")?.trim();
|
|
33
|
+
if (!path)
|
|
34
|
+
return argError("preview", '"path" is required — the HTML file or folder to show');
|
|
35
|
+
return withSandbox("preview", context, async (env) => {
|
|
36
|
+
const stat = await env.stat(path);
|
|
37
|
+
if (!stat)
|
|
38
|
+
return argError("preview", `"${path}" does not exist — write the page first`);
|
|
39
|
+
let target = stat.path;
|
|
40
|
+
if (stat.type === "directory") {
|
|
41
|
+
const index = await env.stat(posix.join(stat.path, INDEX_FILE));
|
|
42
|
+
if (!index || index.type !== "file") {
|
|
43
|
+
return argError("preview", `"${path}" is a folder without an ${INDEX_FILE} — pass the HTML file to show`);
|
|
44
|
+
}
|
|
45
|
+
target = index.path;
|
|
46
|
+
}
|
|
47
|
+
else if (stat.type !== "file") {
|
|
48
|
+
return argError("preview", `"${path}" is a ${stat.type}, not a file or folder`);
|
|
49
|
+
}
|
|
50
|
+
const rel = workspaceRelative(env, target);
|
|
51
|
+
const shown = stat.type === "directory" ? workspaceRelative(env, stat.path) || "workspace" : rel;
|
|
52
|
+
const link = previewLink(rel, posix.basename(shown));
|
|
53
|
+
// A-133: an image can be shown inside the reply itself.
|
|
54
|
+
const note = isImageFile(rel) ? embedImageNote(link) : citeLinkNote(link);
|
|
55
|
+
return {
|
|
56
|
+
content: `The preview of ${shown} is ready — the user sees it live next to the chat.${note}`,
|
|
57
|
+
link,
|
|
58
|
+
metadata: { path: target, uri: link.uri },
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=preview-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-tool.js","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/preview-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE/G;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IACb,IAAI,GAAG,cAAc,CAAC;IACtB,OAAO,GAAG,OAAO,CAAC;IAClB,UAAU,GAAmB;QACpC,IAAI,EAAE,SAAS;QACf,WAAW,EACT,iGAAiG;YACjG,wGAAwG;YACxG,yGAAyG;YACzG,0GAA0G;YAC1G,+BAA+B;QACjC,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+EAA+E,EAAE;aACvH;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,IAAI,EAAE,WAAW;QACjB,gBAAgB,EAAE,SAAS;KAC5B,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,IAA6B,EAAE,OAAoB;QAC/D,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI;YAAE,OAAO,QAAQ,CAAC,SAAS,EAAE,sDAAsD,CAAC,CAAC;QAC9F,OAAO,WAAW,CAAC,SAAS,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AC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC1E,OAAO;gBACL,OAAO,EAAE,kBAAkB,KAAK,sDAAsD,IAAI,EAAE;gBAC5F,IAAI;gBACJ,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;aAC1C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ToolResultLink } from "../../../../kernel/types.js";
|
|
2
|
+
import type { ToolContext, ToolDefinition, ToolHandler, ToolOutput } from "../../types.js";
|
|
3
|
+
/** The link of a service (its root page). */
|
|
4
|
+
export declare function serviceLink(name: string): ToolResultLink;
|
|
5
|
+
/** start_service — start a dev server and show it live. */
|
|
6
|
+
export declare class StartServiceTool implements ToolHandler {
|
|
7
|
+
readonly name = "tool:start-service";
|
|
8
|
+
readonly version = "1.0.0";
|
|
9
|
+
readonly definition: ToolDefinition;
|
|
10
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
|
|
11
|
+
}
|
|
12
|
+
/** stop_service — stop a running service. */
|
|
13
|
+
export declare class StopServiceTool implements ToolHandler {
|
|
14
|
+
readonly name = "tool:stop-service";
|
|
15
|
+
readonly version = "1.0.0";
|
|
16
|
+
readonly definition: ToolDefinition;
|
|
17
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
|
|
18
|
+
}
|
|
19
|
+
/** list_services — the agent's services and their state. */
|
|
20
|
+
export declare class ListServicesTool implements ToolHandler {
|
|
21
|
+
readonly name = "tool:list-services";
|
|
22
|
+
readonly version = "1.0.0";
|
|
23
|
+
readonly definition: ToolDefinition;
|
|
24
|
+
execute(_args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
|
|
25
|
+
}
|
|
26
|
+
/** service_logs — the end of a service's output. */
|
|
27
|
+
export declare class ServiceLogsTool implements ToolHandler {
|
|
28
|
+
readonly name = "tool:service-logs";
|
|
29
|
+
readonly version = "1.0.0";
|
|
30
|
+
readonly definition: ToolDefinition;
|
|
31
|
+
execute(args: Record<string, unknown>, context: ToolContext): Promise<ToolOutput>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=service-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-tools.d.ts","sourceRoot":"","sources":["../../../../../src/components/tool-hub/built-in-tools/preview/service-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAa3F,6CAA6C;AAC7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAExD;AAuBD,2DAA2D;AAC3D,qBAAa,gBAAiB,YAAW,WAAW;IAClD,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAoBjC;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAmCtF;CACF;AAED,6CAA6C;AAC7C,qBAAa,eAAgB,YAAW,WAAW;IACjD,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAUjC;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAStF;CACF;AAED,4DAA4D;AAC5D,qBAAa,gBAAiB,YAAW,WAAW;IAClD,QAAQ,C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