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,333 @@
|
|
|
1
|
+
import { createPublicKey, verify } from "node:crypto";
|
|
2
|
+
import { ADAPTER_REQUEST_TIMEOUT_MS, errorMessage, MAX_RETRY_AFTER_S, PlatformApiError, retryAfterHeader, sleep, } from "../adapter-kit.js";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Microsoft Teams channel (A-100 phase 3) over the Bot Framework — no dependency.
|
|
5
|
+
//
|
|
6
|
+
// Teams cannot be polled: the Bot Framework POSTs every activity to the bot's
|
|
7
|
+
// messaging endpoint, so the host must be reachable from the internet. In the
|
|
8
|
+
// Azure Bot resource set the messaging endpoint to
|
|
9
|
+
// https://<host>/webhooks/channels/<channel id>
|
|
10
|
+
// and add the Teams channel. Credentials: the bot's Microsoft App ID and a
|
|
11
|
+
// client secret, plus the tenant id for a single-tenant bot.
|
|
12
|
+
//
|
|
13
|
+
// Inbound: every request carries a JWT signed by the Bot Framework; it is
|
|
14
|
+
// checked (signature against the published keys, issuer, audience = app id,
|
|
15
|
+
// lifetime, serviceUrl) before anything is read. Outbound: replies go to the
|
|
16
|
+
// activity's serviceUrl with a token from Microsoft Entra (client credentials).
|
|
17
|
+
// A conversation's serviceUrl is only known once it has sent a message, so the
|
|
18
|
+
// bot cannot write first after a restart until then.
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
const DEFAULT_OPENID_METADATA_URL = "https://login.botframework.com/v1/.well-known/openidconfiguration";
|
|
21
|
+
const BOT_FRAMEWORK_ISSUER = "https://api.botframework.com";
|
|
22
|
+
const TOKEN_SCOPE = "https://api.botframework.com/.default";
|
|
23
|
+
const MAX_MESSAGE_LENGTH = 4000;
|
|
24
|
+
/** Clock skew allowed on token lifetimes. */
|
|
25
|
+
const CLOCK_SKEW_S = 300;
|
|
26
|
+
/** Signing keys are read again after this long, or sooner for an unknown key id. */
|
|
27
|
+
const KEYS_TTL_MS = 24 * 60 * 60 * 1000;
|
|
28
|
+
const KEYS_MIN_REFRESH_MS = 5 * 60 * 1000;
|
|
29
|
+
const MAX_CONVERSATIONS = 10_000;
|
|
30
|
+
/** The Microsoft Teams platform, for AgentCore.useChannelPlatform. Needs "appId" and "appPassword"; "tenantId" is optional. */
|
|
31
|
+
export function teamsPlatform(options = {}) {
|
|
32
|
+
return {
|
|
33
|
+
name: "teams",
|
|
34
|
+
displayName: "Microsoft Teams",
|
|
35
|
+
credentialKeys: ["appId", "appPassword"],
|
|
36
|
+
optionalCredentialKeys: ["tenantId"],
|
|
37
|
+
ingress: "webhook",
|
|
38
|
+
create: (channel) => new TeamsAdapter({
|
|
39
|
+
...options,
|
|
40
|
+
appId: channel.credentials["appId"] ?? "",
|
|
41
|
+
appPassword: channel.credentials["appPassword"] ?? "",
|
|
42
|
+
...(channel.credentials["tenantId"] ? { tenantId: channel.credentials["tenantId"] } : {}),
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export class TeamsAdapter {
|
|
47
|
+
options;
|
|
48
|
+
capabilities = { maxMessageLength: MAX_MESSAGE_LENGTH, markdown: true, buttons: true };
|
|
49
|
+
fetchFn;
|
|
50
|
+
now;
|
|
51
|
+
controller = new AbortController();
|
|
52
|
+
sink;
|
|
53
|
+
token;
|
|
54
|
+
keys;
|
|
55
|
+
/** conversation id -> the serviceUrl its activities came from (verified). */
|
|
56
|
+
serviceUrls = new Map();
|
|
57
|
+
constructor(options) {
|
|
58
|
+
this.options = options;
|
|
59
|
+
this.fetchFn = options.fetch ?? fetch;
|
|
60
|
+
this.now = options.now ?? Date.now;
|
|
61
|
+
}
|
|
62
|
+
async start(sink) {
|
|
63
|
+
if (!this.options.appId || !this.options.appPassword)
|
|
64
|
+
throw new Error("Microsoft Teams needs the bot's app id and a client secret");
|
|
65
|
+
try {
|
|
66
|
+
// Checks the credentials: a token is only issued for a valid app id and secret.
|
|
67
|
+
await this.accessToken();
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
if (err instanceof PlatformApiError && (err.status === 400 || err.status === 401)) {
|
|
71
|
+
throw new Error(`Microsoft rejected the app id or client secret${err.code ? ` (${err.code})` : ""}`);
|
|
72
|
+
}
|
|
73
|
+
throw err;
|
|
74
|
+
}
|
|
75
|
+
this.sink = sink;
|
|
76
|
+
return { id: this.options.appId, displayName: "Teams bot" };
|
|
77
|
+
}
|
|
78
|
+
async stop() {
|
|
79
|
+
this.controller.abort();
|
|
80
|
+
this.sink = undefined;
|
|
81
|
+
}
|
|
82
|
+
async handleWebhook(request) {
|
|
83
|
+
if (request.method.toUpperCase() !== "POST")
|
|
84
|
+
return { status: 405 };
|
|
85
|
+
let activity;
|
|
86
|
+
try {
|
|
87
|
+
activity = JSON.parse(request.body);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return { status: 400, body: { error: "The body is not JSON" } };
|
|
91
|
+
}
|
|
92
|
+
let claims;
|
|
93
|
+
try {
|
|
94
|
+
claims = await this.verifyToken(request.headers["authorization"] ?? "");
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
return { status: 401, body: { error: `Unauthorized: ${errorMessage(err)}` } };
|
|
98
|
+
}
|
|
99
|
+
if (claims.serviceurl && activity.serviceUrl && trimSlash(claims.serviceurl) !== trimSlash(activity.serviceUrl)) {
|
|
100
|
+
return { status: 401, body: { error: "Unauthorized: the serviceUrl does not match the token" } };
|
|
101
|
+
}
|
|
102
|
+
if (activity.conversation?.id && activity.serviceUrl)
|
|
103
|
+
this.rememberServiceUrl(activity.conversation.id, activity.serviceUrl);
|
|
104
|
+
if (activity.type === "message")
|
|
105
|
+
this.onMessage(activity);
|
|
106
|
+
return { status: 200, body: {} };
|
|
107
|
+
}
|
|
108
|
+
async send(target, message) {
|
|
109
|
+
const serviceUrl = this.serviceUrlFor(target.chatId);
|
|
110
|
+
const sent = await this.withRetry(() => this.connector("POST", serviceUrl, `/v3/conversations/${encodeURIComponent(target.chatId)}/activities`, {
|
|
111
|
+
...this.activity(message),
|
|
112
|
+
...(target.replyToMessageId ? { replyToId: target.replyToMessageId } : {}),
|
|
113
|
+
}));
|
|
114
|
+
return { chatId: target.chatId, messageId: sent?.id ?? "" };
|
|
115
|
+
}
|
|
116
|
+
async edit(ref, message) {
|
|
117
|
+
if (!ref.messageId)
|
|
118
|
+
return;
|
|
119
|
+
const serviceUrl = this.serviceUrlFor(ref.chatId);
|
|
120
|
+
await this.withRetry(() => this.connector("PUT", serviceUrl, `/v3/conversations/${encodeURIComponent(ref.chatId)}/activities/${encodeURIComponent(ref.messageId)}`, { ...this.activity(message), id: ref.messageId }));
|
|
121
|
+
}
|
|
122
|
+
async sendTyping(target) {
|
|
123
|
+
const serviceUrl = this.serviceUrlFor(target.chatId);
|
|
124
|
+
await this.connector("POST", serviceUrl, `/v3/conversations/${encodeURIComponent(target.chatId)}/activities`, { type: "typing" });
|
|
125
|
+
}
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
onMessage(activity) {
|
|
128
|
+
const sink = this.sink;
|
|
129
|
+
const conversation = activity.conversation;
|
|
130
|
+
const from = activity.from;
|
|
131
|
+
if (!sink || !conversation?.id || !from?.id || !activity.id)
|
|
132
|
+
return;
|
|
133
|
+
const chat = {
|
|
134
|
+
id: conversation.id,
|
|
135
|
+
type: conversation.conversationType === "personal" ? "dm" : "group",
|
|
136
|
+
...(conversation.name ? { title: conversation.name } : {}),
|
|
137
|
+
};
|
|
138
|
+
const sender = {
|
|
139
|
+
// The Entra object id is stable across chats and tenants' bots; the Teams id is the fallback.
|
|
140
|
+
id: from.aadObjectId ?? from.id,
|
|
141
|
+
...(from.name ? { name: from.name } : {}),
|
|
142
|
+
...(from.role === "bot" ? { isBot: true } : {}),
|
|
143
|
+
};
|
|
144
|
+
// An Adaptive Card button (Action.Submit) arrives as a message with a value.
|
|
145
|
+
const data = activity.value && typeof activity.value === "object" ? activity.value.aec : undefined;
|
|
146
|
+
if (typeof data === "string") {
|
|
147
|
+
sink.button({ chat, sender, messageId: activity.replyToId ?? activity.id, data });
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const botId = activity.recipient?.id;
|
|
151
|
+
let text = activity.text ?? "";
|
|
152
|
+
let mentionsBot = false;
|
|
153
|
+
for (const entity of activity.entities ?? []) {
|
|
154
|
+
if (entity.type === "mention" && botId && entity.mentioned?.id === botId) {
|
|
155
|
+
mentionsBot = true;
|
|
156
|
+
if (entity.text)
|
|
157
|
+
text = text.split(entity.text).join(" ");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
text = decodeEntities(text.replace(/<\/?at>/g, "").replace(/<[^>]+>/g, "")).replace(/[ \t]{2,}/g, " ").trim();
|
|
161
|
+
const message = {
|
|
162
|
+
messageId: activity.id,
|
|
163
|
+
chat,
|
|
164
|
+
sender,
|
|
165
|
+
text,
|
|
166
|
+
...(mentionsBot ? { mentionsBot: true } : {}),
|
|
167
|
+
};
|
|
168
|
+
sink.message(message);
|
|
169
|
+
}
|
|
170
|
+
/** A message activity: Markdown text, or an Adaptive Card when it has buttons. */
|
|
171
|
+
activity(message) {
|
|
172
|
+
const textFormat = message.format === "markdown" ? "markdown" : "plain";
|
|
173
|
+
if (!message.buttons?.length)
|
|
174
|
+
return { type: "message", text: message.text, textFormat, attachments: [] };
|
|
175
|
+
return {
|
|
176
|
+
type: "message",
|
|
177
|
+
attachments: [
|
|
178
|
+
{
|
|
179
|
+
contentType: "application/vnd.microsoft.card.adaptive",
|
|
180
|
+
content: {
|
|
181
|
+
type: "AdaptiveCard",
|
|
182
|
+
$schema: "http://adaptivecards.io/schemas/adaptive-card.json",
|
|
183
|
+
version: "1.4",
|
|
184
|
+
body: [{ type: "TextBlock", text: message.text, wrap: true }],
|
|
185
|
+
actions: message.buttons.flat().map(submitAction),
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
serviceUrlFor(conversationId) {
|
|
192
|
+
const url = this.serviceUrls.get(conversationId);
|
|
193
|
+
if (!url)
|
|
194
|
+
throw new Error("This Teams conversation has not sent the bot a message since the server started");
|
|
195
|
+
return url;
|
|
196
|
+
}
|
|
197
|
+
rememberServiceUrl(conversationId, serviceUrl) {
|
|
198
|
+
if (this.serviceUrls.size >= MAX_CONVERSATIONS && !this.serviceUrls.has(conversationId)) {
|
|
199
|
+
const oldest = this.serviceUrls.keys().next().value;
|
|
200
|
+
if (oldest !== undefined)
|
|
201
|
+
this.serviceUrls.delete(oldest);
|
|
202
|
+
}
|
|
203
|
+
this.serviceUrls.set(conversationId, serviceUrl);
|
|
204
|
+
}
|
|
205
|
+
// -- Outbound auth -----------------------------------------------------------
|
|
206
|
+
async accessToken() {
|
|
207
|
+
if (this.token && this.token.expiresAt - 5 * 60_000 > this.now())
|
|
208
|
+
return this.token.value;
|
|
209
|
+
const tenant = this.options.tenantId?.trim() || "botframework.com";
|
|
210
|
+
const url = this.options.tokenUrl ?? `https://login.microsoftonline.com/${encodeURIComponent(tenant)}/oauth2/v2.0/token`;
|
|
211
|
+
const res = await this.fetchFn(url, {
|
|
212
|
+
method: "POST",
|
|
213
|
+
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
214
|
+
body: new URLSearchParams({
|
|
215
|
+
grant_type: "client_credentials",
|
|
216
|
+
client_id: this.options.appId,
|
|
217
|
+
client_secret: this.options.appPassword,
|
|
218
|
+
scope: TOKEN_SCOPE,
|
|
219
|
+
}).toString(),
|
|
220
|
+
signal: AbortSignal.any([this.controller.signal, AbortSignal.timeout(ADAPTER_REQUEST_TIMEOUT_MS)]),
|
|
221
|
+
});
|
|
222
|
+
const data = (await res.json().catch(() => ({})));
|
|
223
|
+
if (!res.ok || !data.access_token) {
|
|
224
|
+
throw new PlatformApiError(res.status, `Microsoft token request failed: ${data.error ?? `HTTP ${res.status}`}`, undefined, data.error);
|
|
225
|
+
}
|
|
226
|
+
this.token = { value: data.access_token, expiresAt: this.now() + (data.expires_in ?? 3600) * 1000 };
|
|
227
|
+
return data.access_token;
|
|
228
|
+
}
|
|
229
|
+
async withRetry(call) {
|
|
230
|
+
try {
|
|
231
|
+
return await call();
|
|
232
|
+
}
|
|
233
|
+
catch (err) {
|
|
234
|
+
if (!(err instanceof PlatformApiError) || err.status !== 429 || !err.retryAfter || err.retryAfter > MAX_RETRY_AFTER_S)
|
|
235
|
+
throw err;
|
|
236
|
+
await sleep(err.retryAfter * 1000, this.controller.signal);
|
|
237
|
+
return call();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/** One Bot Connector call. Only made to a serviceUrl taken from a verified activity. */
|
|
241
|
+
async connector(method, serviceUrl, path, body) {
|
|
242
|
+
const token = await this.accessToken();
|
|
243
|
+
const res = await this.fetchFn(`${trimSlash(serviceUrl)}${path}`, {
|
|
244
|
+
method,
|
|
245
|
+
headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
|
|
246
|
+
body: JSON.stringify(body),
|
|
247
|
+
signal: AbortSignal.any([this.controller.signal, AbortSignal.timeout(ADAPTER_REQUEST_TIMEOUT_MS)]),
|
|
248
|
+
});
|
|
249
|
+
if (!res.ok) {
|
|
250
|
+
const data = (await res.json().catch(() => ({})));
|
|
251
|
+
throw new PlatformApiError(res.status, `Teams ${method} activity failed: ${data.error?.message ?? data.error?.code ?? `HTTP ${res.status}`}`, res.status === 429 ? (retryAfterHeader(res) ?? 1) : undefined, data.error?.code);
|
|
252
|
+
}
|
|
253
|
+
return (await res.json().catch(() => undefined));
|
|
254
|
+
}
|
|
255
|
+
// -- Inbound auth (Bot Framework JWT) ----------------------------------------
|
|
256
|
+
async verifyToken(authorization) {
|
|
257
|
+
const match = /^Bearer\s+(\S+)$/i.exec(authorization.trim());
|
|
258
|
+
if (!match)
|
|
259
|
+
throw new Error("no bearer token");
|
|
260
|
+
const parts = match[1].split(".");
|
|
261
|
+
if (parts.length !== 3)
|
|
262
|
+
throw new Error("malformed token");
|
|
263
|
+
const [rawHeader, rawPayload, rawSignature] = parts;
|
|
264
|
+
let header;
|
|
265
|
+
let claims;
|
|
266
|
+
try {
|
|
267
|
+
header = JSON.parse(Buffer.from(rawHeader, "base64url").toString("utf8"));
|
|
268
|
+
claims = JSON.parse(Buffer.from(rawPayload, "base64url").toString("utf8"));
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
throw new Error("malformed token");
|
|
272
|
+
}
|
|
273
|
+
if (header.alg !== "RS256" || !header.kid)
|
|
274
|
+
throw new Error("unsupported token algorithm");
|
|
275
|
+
const jwk = await this.signingKey(header.kid);
|
|
276
|
+
const key = createPublicKey({ key: { ...jwk }, format: "jwk" });
|
|
277
|
+
const signed = Buffer.from(`${rawHeader}.${rawPayload}`);
|
|
278
|
+
if (!verify("RSA-SHA256", signed, key, Buffer.from(rawSignature, "base64url")))
|
|
279
|
+
throw new Error("bad signature");
|
|
280
|
+
if (claims.iss !== BOT_FRAMEWORK_ISSUER)
|
|
281
|
+
throw new Error("wrong issuer");
|
|
282
|
+
const audiences = Array.isArray(claims.aud) ? claims.aud : [claims.aud];
|
|
283
|
+
if (!audiences.includes(this.options.appId))
|
|
284
|
+
throw new Error("wrong audience");
|
|
285
|
+
const nowS = this.now() / 1000;
|
|
286
|
+
if (typeof claims.exp !== "number" || claims.exp + CLOCK_SKEW_S < nowS)
|
|
287
|
+
throw new Error("token expired");
|
|
288
|
+
if (typeof claims.nbf === "number" && claims.nbf - CLOCK_SKEW_S > nowS)
|
|
289
|
+
throw new Error("token not valid yet");
|
|
290
|
+
return claims;
|
|
291
|
+
}
|
|
292
|
+
/** The Bot Framework's signing key with this id, from its OpenID metadata (cached). */
|
|
293
|
+
async signingKey(kid) {
|
|
294
|
+
const fresh = this.keys && this.now() - this.keys.loadedAt < KEYS_TTL_MS;
|
|
295
|
+
const known = this.keys?.byId.get(kid);
|
|
296
|
+
if (known && fresh)
|
|
297
|
+
return known;
|
|
298
|
+
// An unknown key id reloads the keys, at most every few minutes.
|
|
299
|
+
if (!this.keys || !fresh || this.now() - this.keys.loadedAt > KEYS_MIN_REFRESH_MS)
|
|
300
|
+
await this.loadKeys();
|
|
301
|
+
const key = this.keys?.byId.get(kid);
|
|
302
|
+
if (!key)
|
|
303
|
+
throw new Error("unknown signing key");
|
|
304
|
+
return key;
|
|
305
|
+
}
|
|
306
|
+
async loadKeys() {
|
|
307
|
+
const signal = AbortSignal.any([this.controller.signal, AbortSignal.timeout(ADAPTER_REQUEST_TIMEOUT_MS)]);
|
|
308
|
+
const meta = (await (await this.fetchFn(this.options.openIdMetadataUrl ?? DEFAULT_OPENID_METADATA_URL, { signal })).json());
|
|
309
|
+
if (!meta.jwks_uri)
|
|
310
|
+
throw new Error("the Bot Framework's OpenID metadata has no jwks_uri");
|
|
311
|
+
const jwks = (await (await this.fetchFn(meta.jwks_uri, { signal })).json());
|
|
312
|
+
const byId = new Map();
|
|
313
|
+
for (const key of jwks.keys ?? []) {
|
|
314
|
+
// Keys endorsed for other channels only are not used for Teams.
|
|
315
|
+
if (!key.kid || key.kty !== "RSA")
|
|
316
|
+
continue;
|
|
317
|
+
if (Array.isArray(key.endorsements) && key.endorsements.length && !key.endorsements.includes("msteams"))
|
|
318
|
+
continue;
|
|
319
|
+
byId.set(key.kid, { kty: key.kty, n: key.n, e: key.e });
|
|
320
|
+
}
|
|
321
|
+
this.keys = { byId, loadedAt: this.now() };
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
function submitAction(button) {
|
|
325
|
+
return { type: "Action.Submit", title: button.label, data: { aec: button.data } };
|
|
326
|
+
}
|
|
327
|
+
function trimSlash(url) {
|
|
328
|
+
return url.replace(/\/+$/, "");
|
|
329
|
+
}
|
|
330
|
+
function decodeEntities(text) {
|
|
331
|
+
return text.replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/&/g, "&");
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=teams-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams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EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;AACpF,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AACjI,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ChannelAccountInfo, ChannelAdapter, ChannelCapabilities, ChannelBotCommand, ChannelMessageRef, ChannelPlatform, ChannelSink, ChannelTarget, OutboundMessage } from "../types.js";
|
|
2
|
+
export interface TelegramAdapterOptions {
|
|
3
|
+
/** From @BotFather, e.g. "123456:ABC-DEF...". */
|
|
4
|
+
botToken: string;
|
|
5
|
+
/** Default https://api.telegram.org — for a local Bot API server or tests. */
|
|
6
|
+
apiBaseUrl?: string;
|
|
7
|
+
/** How long one getUpdates call waits for messages (default 30 s). */
|
|
8
|
+
pollTimeoutSeconds?: number;
|
|
9
|
+
/** Default: the global fetch. */
|
|
10
|
+
fetch?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
/** The Telegram platform, for AgentCore.useChannelPlatform. A channel needs the "botToken" credential. */
|
|
13
|
+
export declare function telegramPlatform(options?: Omit<TelegramAdapterOptions, "botToken">): ChannelPlatform;
|
|
14
|
+
export declare class TelegramAdapter implements ChannelAdapter {
|
|
15
|
+
private options;
|
|
16
|
+
readonly capabilities: ChannelCapabilities;
|
|
17
|
+
private readonly baseUrl;
|
|
18
|
+
private readonly pollTimeoutSeconds;
|
|
19
|
+
private readonly fetchFn;
|
|
20
|
+
private controller;
|
|
21
|
+
private loop?;
|
|
22
|
+
private offset;
|
|
23
|
+
private bot?;
|
|
24
|
+
constructor(options: TelegramAdapterOptions);
|
|
25
|
+
start(sink: ChannelSink): Promise<ChannelAccountInfo>;
|
|
26
|
+
stop(): Promise<void>;
|
|
27
|
+
send(target: ChannelTarget, message: OutboundMessage): Promise<ChannelMessageRef>;
|
|
28
|
+
edit(ref: ChannelMessageRef, message: OutboundMessage): Promise<void>;
|
|
29
|
+
/** The bot's command list (setMyCommands), which Telegram shows when the user types "/". */
|
|
30
|
+
setCommands(commands: ChannelBotCommand[]): Promise<void>;
|
|
31
|
+
sendTyping(target: ChannelTarget): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* sendMessage / editMessageText with the message's text: Markdown as HTML, and
|
|
34
|
+
* plain text again when Telegram cannot parse the HTML. A 429 asking for a short
|
|
35
|
+
* wait is retried once.
|
|
36
|
+
*/
|
|
37
|
+
private withFormat;
|
|
38
|
+
private callWithRetry;
|
|
39
|
+
/** A button press: acknowledged at once (stops the button's spinner), then handed to the sink. */
|
|
40
|
+
private onCallback;
|
|
41
|
+
private poll;
|
|
42
|
+
private toInbound;
|
|
43
|
+
/** One Bot API call. The token is only in the URL, never in an error message. */
|
|
44
|
+
private call;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=telegram-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram-adapter.d.ts","sourceRoot":"","sources":["../../../../src/components/channel-platform-hub/telegram/telegram-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EAEd,mBAAmB,EAEnB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,aAAa,EAEb,eAAe,EAChB,MAAM,aAAa,CAAC;AAyBrB,MAAM,WAAW,sBAAsB;IACrC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,UAAU,CAAC,E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