chatroom-cli 1.31.1 → 1.32.1
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/api.d.ts +61 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +10 -0
- package/dist/api.js.map +1 -0
- package/dist/commands/artifact/deps.d.ts +6 -0
- package/dist/commands/artifact/deps.d.ts.map +1 -0
- package/dist/commands/artifact/deps.js +2 -0
- package/dist/commands/artifact/deps.js.map +1 -0
- package/dist/commands/artifact/index.d.ts +43 -0
- package/dist/commands/artifact/index.d.ts.map +1 -0
- package/dist/commands/artifact/index.js +205 -0
- package/dist/commands/artifact/index.js.map +1 -0
- package/dist/commands/artifact/index.test.d.ts +8 -0
- package/dist/commands/artifact/index.test.d.ts.map +1 -0
- package/dist/commands/artifact/index.test.js +188 -0
- package/dist/commands/artifact/index.test.js.map +1 -0
- package/dist/commands/auth-login/deps.d.ts +50 -0
- package/dist/commands/auth-login/deps.d.ts.map +1 -0
- package/dist/commands/auth-login/deps.js +9 -0
- package/dist/commands/auth-login/deps.js.map +1 -0
- package/dist/commands/auth-login/index.d.ts +22 -0
- package/dist/commands/auth-login/index.d.ts.map +1 -0
- package/dist/commands/auth-login/index.js +246 -0
- package/dist/commands/auth-login/index.js.map +1 -0
- package/dist/commands/auth-login/index.test.d.ts +9 -0
- package/dist/commands/auth-login/index.test.d.ts.map +1 -0
- package/dist/commands/auth-login/index.test.js +297 -0
- package/dist/commands/auth-login/index.test.js.map +1 -0
- package/dist/commands/auth-logout/deps.d.ts +20 -0
- package/dist/commands/auth-logout/deps.d.ts.map +1 -0
- package/dist/commands/auth-logout/deps.js +7 -0
- package/dist/commands/auth-logout/deps.js.map +1 -0
- package/dist/commands/auth-logout/index.d.ts +8 -0
- package/dist/commands/auth-logout/index.d.ts.map +1 -0
- package/dist/commands/auth-logout/index.js +34 -0
- package/dist/commands/auth-logout/index.js.map +1 -0
- package/dist/commands/auth-logout/index.test.d.ts +8 -0
- package/dist/commands/auth-logout/index.test.d.ts.map +1 -0
- package/dist/commands/auth-logout/index.test.js +85 -0
- package/dist/commands/auth-logout/index.test.js.map +1 -0
- package/dist/commands/auth-status/deps.d.ts +35 -0
- package/dist/commands/auth-status/deps.d.ts.map +1 -0
- package/dist/commands/auth-status/deps.js +7 -0
- package/dist/commands/auth-status/deps.js.map +1 -0
- package/dist/commands/auth-status/index.d.ts +8 -0
- package/dist/commands/auth-status/index.d.ts.map +1 -0
- package/dist/commands/auth-status/index.js +80 -0
- package/dist/commands/auth-status/index.js.map +1 -0
- package/dist/commands/auth-status/index.test.d.ts +8 -0
- package/dist/commands/auth-status/index.test.d.ts.map +1 -0
- package/dist/commands/auth-status/index.test.js +116 -0
- package/dist/commands/auth-status/index.test.js.map +1 -0
- package/dist/commands/backlog/deps.d.ts +21 -0
- package/dist/commands/backlog/deps.d.ts.map +1 -0
- package/dist/commands/backlog/deps.js +5 -0
- package/dist/commands/backlog/deps.js.map +1 -0
- package/dist/commands/backlog/index.d.ts +129 -0
- package/dist/commands/backlog/index.d.ts.map +1 -0
- package/dist/commands/backlog/index.js +694 -0
- package/dist/commands/backlog/index.js.map +1 -0
- package/dist/commands/backlog/index.test.d.ts +7 -0
- package/dist/commands/backlog/index.test.d.ts.map +1 -0
- package/dist/commands/backlog/index.test.js +395 -0
- package/dist/commands/backlog/index.test.js.map +1 -0
- package/dist/commands/classify/deps.d.ts +18 -0
- package/dist/commands/classify/deps.d.ts.map +1 -0
- package/dist/commands/classify/deps.js +8 -0
- package/dist/commands/classify/deps.js.map +1 -0
- package/dist/commands/classify/index.d.ts +19 -0
- package/dist/commands/classify/index.d.ts.map +1 -0
- package/dist/commands/classify/index.js +162 -0
- package/dist/commands/classify/index.js.map +1 -0
- package/dist/commands/classify/index.test.d.ts +9 -0
- package/dist/commands/classify/index.test.d.ts.map +1 -0
- package/dist/commands/classify/index.test.js +263 -0
- package/dist/commands/classify/index.test.js.map +1 -0
- package/dist/commands/context/deps.d.ts +6 -0
- package/dist/commands/context/deps.d.ts.map +1 -0
- package/dist/commands/context/deps.js +2 -0
- package/dist/commands/context/deps.js.map +1 -0
- package/dist/commands/context/index.d.ts +42 -0
- package/dist/commands/context/index.d.ts.map +1 -0
- package/dist/commands/context/index.js +324 -0
- package/dist/commands/context/index.js.map +1 -0
- package/dist/commands/context/index.test.d.ts +9 -0
- package/dist/commands/context/index.test.d.ts.map +1 -0
- package/dist/commands/context/index.test.js +272 -0
- package/dist/commands/context/index.test.js.map +1 -0
- package/dist/commands/get-next-task/index.d.ts +20 -0
- package/dist/commands/get-next-task/index.d.ts.map +1 -0
- package/dist/commands/get-next-task/index.js +156 -0
- package/dist/commands/get-next-task/index.js.map +1 -0
- package/dist/commands/get-next-task/index.test.d.ts +9 -0
- package/dist/commands/get-next-task/index.test.d.ts.map +1 -0
- package/dist/commands/get-next-task/index.test.js +125 -0
- package/dist/commands/get-next-task/index.test.js.map +1 -0
- package/dist/commands/get-next-task/session.d.ts +127 -0
- package/dist/commands/get-next-task/session.d.ts.map +1 -0
- package/dist/commands/get-next-task/session.js +335 -0
- package/dist/commands/get-next-task/session.js.map +1 -0
- package/dist/commands/get-next-task/session.test.d.ts +11 -0
- package/dist/commands/get-next-task/session.test.d.ts.map +1 -0
- package/dist/commands/get-next-task/session.test.js +367 -0
- package/dist/commands/get-next-task/session.test.js.map +1 -0
- package/dist/commands/get-system-prompt/deps.d.ts +14 -0
- package/dist/commands/get-system-prompt/deps.d.ts.map +1 -0
- package/dist/commands/get-system-prompt/deps.js +7 -0
- package/dist/commands/get-system-prompt/deps.js.map +1 -0
- package/dist/commands/get-system-prompt/index.d.ts +16 -0
- package/dist/commands/get-system-prompt/index.d.ts.map +1 -0
- package/dist/commands/get-system-prompt/index.js +70 -0
- package/dist/commands/get-system-prompt/index.js.map +1 -0
- package/dist/commands/guidelines/deps.d.ts +14 -0
- package/dist/commands/guidelines/deps.d.ts.map +1 -0
- package/dist/commands/guidelines/deps.js +7 -0
- package/dist/commands/guidelines/deps.js.map +1 -0
- package/dist/commands/guidelines/index.d.ts +19 -0
- package/dist/commands/guidelines/index.d.ts.map +1 -0
- package/dist/commands/guidelines/index.js +92 -0
- package/dist/commands/guidelines/index.js.map +1 -0
- package/dist/commands/guidelines/index.test.d.ts +8 -0
- package/dist/commands/guidelines/index.test.d.ts.map +1 -0
- package/dist/commands/guidelines/index.test.js +140 -0
- package/dist/commands/guidelines/index.test.js.map +1 -0
- package/dist/commands/handoff/deps.d.ts +9 -0
- package/dist/commands/handoff/deps.d.ts.map +1 -0
- package/dist/commands/handoff/deps.js +5 -0
- package/dist/commands/handoff/deps.js.map +1 -0
- package/dist/commands/handoff/index.d.ts +23 -0
- package/dist/commands/handoff/index.d.ts.map +1 -0
- package/dist/commands/handoff/index.js +226 -0
- package/dist/commands/handoff/index.js.map +1 -0
- package/dist/commands/handoff/index.test.d.ts +9 -0
- package/dist/commands/handoff/index.test.d.ts.map +1 -0
- package/dist/commands/handoff/index.test.js +189 -0
- package/dist/commands/handoff/index.test.js.map +1 -0
- package/dist/commands/init/deps.d.ts +21 -0
- package/dist/commands/init/deps.d.ts.map +1 -0
- package/dist/commands/init/deps.js +8 -0
- package/dist/commands/init/deps.js.map +1 -0
- package/dist/commands/init/index.d.ts +22 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/init/index.js +181 -0
- package/dist/commands/init/index.js.map +1 -0
- package/dist/commands/init/index.test.d.ts +8 -0
- package/dist/commands/init/index.test.d.ts.map +1 -0
- package/dist/commands/init/index.test.js +170 -0
- package/dist/commands/init/index.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/command-loop.d.ts +15 -0
- package/dist/commands/machine/daemon-start/command-loop.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/command-loop.js +295 -0
- package/dist/commands/machine/daemon-start/command-loop.js.map +1 -0
- package/dist/commands/machine/daemon-start/command-loop.test.d.ts +13 -0
- package/dist/commands/machine/daemon-start/command-loop.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/command-loop.test.js +156 -0
- package/dist/commands/machine/daemon-start/command-loop.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/command-sync-heartbeat.d.ts +12 -0
- package/dist/commands/machine/daemon-start/command-sync-heartbeat.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/command-sync-heartbeat.js +58 -0
- package/dist/commands/machine/daemon-start/command-sync-heartbeat.js.map +1 -0
- package/dist/commands/machine/daemon-start/deps.d.ts +85 -0
- package/dist/commands/machine/daemon-start/deps.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/deps.js +14 -0
- package/dist/commands/machine/daemon-start/deps.js.map +1 -0
- package/dist/commands/machine/daemon-start/event-bus.test.d.ts +2 -0
- package/dist/commands/machine/daemon-start/event-bus.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/event-bus.test.js +100 -0
- package/dist/commands/machine/daemon-start/event-bus.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/event-listeners.test.d.ts +2 -0
- package/dist/commands/machine/daemon-start/event-listeners.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/event-listeners.test.js +155 -0
- package/dist/commands/machine/daemon-start/event-listeners.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/file-content-fulfillment.d.ts +12 -0
- package/dist/commands/machine/daemon-start/file-content-fulfillment.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/file-content-fulfillment.js +120 -0
- package/dist/commands/machine/daemon-start/file-content-fulfillment.js.map +1 -0
- package/dist/commands/machine/daemon-start/file-content-subscription.d.ts +29 -0
- package/dist/commands/machine/daemon-start/file-content-subscription.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/file-content-subscription.js +55 -0
- package/dist/commands/machine/daemon-start/file-content-subscription.js.map +1 -0
- package/dist/commands/machine/daemon-start/file-tree-subscription.d.ts +22 -0
- package/dist/commands/machine/daemon-start/file-tree-subscription.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/file-tree-subscription.js +83 -0
- package/dist/commands/machine/daemon-start/file-tree-subscription.js.map +1 -0
- package/dist/commands/machine/daemon-start/git-heartbeat.d.ts +18 -0
- package/dist/commands/machine/daemon-start/git-heartbeat.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/git-heartbeat.js +218 -0
- package/dist/commands/machine/daemon-start/git-heartbeat.js.map +1 -0
- package/dist/commands/machine/daemon-start/git-subscription.d.ts +60 -0
- package/dist/commands/machine/daemon-start/git-subscription.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/git-subscription.js +389 -0
- package/dist/commands/machine/daemon-start/git-subscription.js.map +1 -0
- package/dist/commands/machine/daemon-start/git-subscription.test.d.ts +2 -0
- package/dist/commands/machine/daemon-start/git-subscription.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/git-subscription.test.js +103 -0
- package/dist/commands/machine/daemon-start/git-subscription.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/command-runner.d.ts +23 -0
- package/dist/commands/machine/daemon-start/handlers/command-runner.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/command-runner.js +236 -0
- package/dist/commands/machine/daemon-start/handlers/command-runner.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/ping.d.ts +6 -0
- package/dist/commands/machine/daemon-start/handlers/ping.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/ping.js +8 -0
- package/dist/commands/machine/daemon-start/handlers/ping.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/ping.test.d.ts +5 -0
- package/dist/commands/machine/daemon-start/handlers/ping.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/ping.test.js +23 -0
- package/dist/commands/machine/daemon-start/handlers/ping.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/shared.d.ts +11 -0
- package/dist/commands/machine/daemon-start/handlers/shared.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/shared.js +25 -0
- package/dist/commands/machine/daemon-start/handlers/shared.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.d.ts +19 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.js +61 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.test.d.ts +8 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.test.js +98 -0
- package/dist/commands/machine/daemon-start/handlers/state-recovery.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/status.d.ts +6 -0
- package/dist/commands/machine/daemon-start/handlers/status.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/status.js +13 -0
- package/dist/commands/machine/daemon-start/handlers/status.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/status.test.d.ts +5 -0
- package/dist/commands/machine/daemon-start/handlers/status.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/status.test.js +51 -0
- package/dist/commands/machine/daemon-start/handlers/status.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.d.ts +21 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.js +36 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.js.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.test.d.ts +7 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.test.js +135 -0
- package/dist/commands/machine/daemon-start/handlers/stop-agent.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/index.d.ts +16 -0
- package/dist/commands/machine/daemon-start/index.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/index.js +21 -0
- package/dist/commands/machine/daemon-start/index.js.map +1 -0
- package/dist/commands/machine/daemon-start/init.d.ts +23 -0
- package/dist/commands/machine/daemon-start/init.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/init.js +338 -0
- package/dist/commands/machine/daemon-start/init.js.map +1 -0
- package/dist/commands/machine/daemon-start/init.test.d.ts +8 -0
- package/dist/commands/machine/daemon-start/init.test.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/init.test.js +385 -0
- package/dist/commands/machine/daemon-start/init.test.js.map +1 -0
- package/dist/commands/machine/daemon-start/testing/index.d.ts +5 -0
- package/dist/commands/machine/daemon-start/testing/index.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/testing/index.js +5 -0
- package/dist/commands/machine/daemon-start/testing/index.js.map +1 -0
- package/dist/commands/machine/daemon-start/testing/mock-daemon-deps.d.ts +26 -0
- package/dist/commands/machine/daemon-start/testing/mock-daemon-deps.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/testing/mock-daemon-deps.js +68 -0
- package/dist/commands/machine/daemon-start/testing/mock-daemon-deps.js.map +1 -0
- package/dist/commands/machine/daemon-start/types.d.ts +89 -0
- package/dist/commands/machine/daemon-start/types.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/types.js +5 -0
- package/dist/commands/machine/daemon-start/types.js.map +1 -0
- package/dist/commands/machine/daemon-start/utils.d.ts +8 -0
- package/dist/commands/machine/daemon-start/utils.d.ts.map +1 -0
- package/dist/commands/machine/daemon-start/utils.js +10 -0
- package/dist/commands/machine/daemon-start/utils.js.map +1 -0
- package/dist/commands/machine/daemon-status.d.ts +10 -0
- package/dist/commands/machine/daemon-status.d.ts.map +1 -0
- package/dist/commands/machine/daemon-status.js +23 -0
- package/dist/commands/machine/daemon-status.js.map +1 -0
- package/dist/commands/machine/daemon-stop.d.ts +10 -0
- package/dist/commands/machine/daemon-stop.d.ts.map +1 -0
- package/dist/commands/machine/daemon-stop.js +44 -0
- package/dist/commands/machine/daemon-stop.js.map +1 -0
- package/dist/commands/machine/index.d.ts +9 -0
- package/dist/commands/machine/index.d.ts.map +1 -0
- package/dist/commands/machine/index.js +9 -0
- package/dist/commands/machine/index.js.map +1 -0
- package/dist/commands/machine/pid.d.ts +48 -0
- package/dist/commands/machine/pid.d.ts.map +1 -0
- package/dist/commands/machine/pid.js +141 -0
- package/dist/commands/machine/pid.js.map +1 -0
- package/dist/commands/messages/deps.d.ts +6 -0
- package/dist/commands/messages/deps.d.ts.map +1 -0
- package/dist/commands/messages/deps.js +2 -0
- package/dist/commands/messages/deps.js.map +1 -0
- package/dist/commands/messages/index.d.ts +28 -0
- package/dist/commands/messages/index.d.ts.map +1 -0
- package/dist/commands/messages/index.js +166 -0
- package/dist/commands/messages/index.js.map +1 -0
- package/dist/commands/messages/index.test.d.ts +8 -0
- package/dist/commands/messages/index.test.d.ts.map +1 -0
- package/dist/commands/messages/index.test.js +159 -0
- package/dist/commands/messages/index.test.js.map +1 -0
- package/dist/commands/opencode-install/deps.d.ts +32 -0
- package/dist/commands/opencode-install/deps.d.ts.map +1 -0
- package/dist/commands/opencode-install/deps.js +8 -0
- package/dist/commands/opencode-install/deps.js.map +1 -0
- package/dist/commands/opencode-install/index.d.ts +31 -0
- package/dist/commands/opencode-install/index.d.ts.map +1 -0
- package/dist/commands/opencode-install/index.js +440 -0
- package/dist/commands/opencode-install/index.js.map +1 -0
- package/dist/commands/opencode-install/index.test.d.ts +8 -0
- package/dist/commands/opencode-install/index.test.d.ts.map +1 -0
- package/dist/commands/opencode-install/index.test.js +123 -0
- package/dist/commands/opencode-install/index.test.js.map +1 -0
- package/dist/commands/register-agent/deps.d.ts +12 -0
- package/dist/commands/register-agent/deps.d.ts.map +1 -0
- package/dist/commands/register-agent/deps.js +8 -0
- package/dist/commands/register-agent/deps.js.map +1 -0
- package/dist/commands/register-agent/index.d.ts +15 -0
- package/dist/commands/register-agent/index.d.ts.map +1 -0
- package/dist/commands/register-agent/index.js +118 -0
- package/dist/commands/register-agent/index.js.map +1 -0
- package/dist/commands/register-agent/index.test.d.ts +9 -0
- package/dist/commands/register-agent/index.test.d.ts.map +1 -0
- package/dist/commands/register-agent/index.test.js +204 -0
- package/dist/commands/register-agent/index.test.js.map +1 -0
- package/dist/commands/report-progress/deps.d.ts +9 -0
- package/dist/commands/report-progress/deps.d.ts.map +1 -0
- package/dist/commands/report-progress/deps.js +5 -0
- package/dist/commands/report-progress/deps.js.map +1 -0
- package/dist/commands/report-progress/index.d.ts +14 -0
- package/dist/commands/report-progress/index.d.ts.map +1 -0
- package/dist/commands/report-progress/index.js +110 -0
- package/dist/commands/report-progress/index.js.map +1 -0
- package/dist/commands/report-progress/index.test.d.ts +8 -0
- package/dist/commands/report-progress/index.test.d.ts.map +1 -0
- package/dist/commands/report-progress/index.test.js +114 -0
- package/dist/commands/report-progress/index.test.js.map +1 -0
- package/dist/commands/skill/deps.d.ts +9 -0
- package/dist/commands/skill/deps.d.ts.map +1 -0
- package/dist/commands/skill/deps.js +5 -0
- package/dist/commands/skill/deps.js.map +1 -0
- package/dist/commands/skill/index.d.ts +20 -0
- package/dist/commands/skill/index.d.ts.map +1 -0
- package/dist/commands/skill/index.js +86 -0
- package/dist/commands/skill/index.js.map +1 -0
- package/dist/commands/skill/index.test.d.ts +8 -0
- package/dist/commands/skill/index.test.d.ts.map +1 -0
- package/dist/commands/skill/index.test.js +166 -0
- package/dist/commands/skill/index.test.js.map +1 -0
- package/dist/commands/task/read/deps.d.ts +18 -0
- package/dist/commands/task/read/deps.d.ts.map +1 -0
- package/dist/commands/task/read/deps.js +8 -0
- package/dist/commands/task/read/deps.js.map +1 -0
- package/dist/commands/task/read/index.d.ts +17 -0
- package/dist/commands/task/read/index.d.ts.map +1 -0
- package/dist/commands/task/read/index.js +144 -0
- package/dist/commands/task/read/index.js.map +1 -0
- package/dist/commands/telegram/deps.d.ts +13 -0
- package/dist/commands/telegram/deps.d.ts.map +1 -0
- package/dist/commands/telegram/deps.js +5 -0
- package/dist/commands/telegram/deps.js.map +1 -0
- package/dist/commands/telegram/index.d.ts +18 -0
- package/dist/commands/telegram/index.d.ts.map +1 -0
- package/dist/commands/telegram/index.js +94 -0
- package/dist/commands/telegram/index.js.map +1 -0
- package/dist/commands/update/deps.d.ts +21 -0
- package/dist/commands/update/deps.d.ts.map +1 -0
- package/dist/commands/update/deps.js +8 -0
- package/dist/commands/update/deps.js.map +1 -0
- package/dist/commands/update/index.d.ts +8 -0
- package/dist/commands/update/index.d.ts.map +1 -0
- package/dist/commands/update/index.js +70 -0
- package/dist/commands/update/index.js.map +1 -0
- package/dist/commands/update/index.test.d.ts +8 -0
- package/dist/commands/update/index.test.d.ts.map +1 -0
- package/dist/commands/update/index.test.js +108 -0
- package/dist/commands/update/index.test.js.map +1 -0
- package/dist/commands/workflow/deps.d.ts +9 -0
- package/dist/commands/workflow/deps.d.ts.map +1 -0
- package/dist/commands/workflow/deps.js +5 -0
- package/dist/commands/workflow/deps.js.map +1 -0
- package/dist/commands/workflow/index.d.ts +73 -0
- package/dist/commands/workflow/index.d.ts.map +1 -0
- package/dist/commands/workflow/index.js +545 -0
- package/dist/commands/workflow/index.js.map +1 -0
- package/dist/commands/workflow/index.test.d.ts +7 -0
- package/dist/commands/workflow/index.test.d.ts.map +1 -0
- package/dist/commands/workflow/index.test.js +315 -0
- package/dist/commands/workflow/index.test.js.map +1 -0
- package/dist/config/defaults.d.ts +10 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +79 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/loader.d.ts +52 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +202 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/schema.d.ts +50 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +99 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -0
- package/dist/events/daemon/agent/on-agent-exited.d.ts +26 -0
- package/dist/events/daemon/agent/on-agent-exited.d.ts.map +1 -0
- package/dist/events/daemon/agent/on-agent-exited.js +20 -0
- package/dist/events/daemon/agent/on-agent-exited.js.map +1 -0
- package/dist/events/daemon/agent/on-agent-started.d.ts +16 -0
- package/dist/events/daemon/agent/on-agent-started.d.ts.map +1 -0
- package/dist/events/daemon/agent/on-agent-started.js +11 -0
- package/dist/events/daemon/agent/on-agent-started.js.map +1 -0
- package/dist/events/daemon/agent/on-agent-stopped.d.ts +14 -0
- package/dist/events/daemon/agent/on-agent-stopped.d.ts.map +1 -0
- package/dist/events/daemon/agent/on-agent-stopped.js +11 -0
- package/dist/events/daemon/agent/on-agent-stopped.js.map +1 -0
- package/dist/events/daemon/agent/on-request-start-agent.d.ts +19 -0
- package/dist/events/daemon/agent/on-request-start-agent.d.ts.map +1 -0
- package/dist/events/daemon/agent/on-request-start-agent.js +55 -0
- package/dist/events/daemon/agent/on-request-start-agent.js.map +1 -0
- package/dist/events/daemon/agent/on-request-start-agent.test.d.ts +2 -0
- package/dist/events/daemon/agent/on-request-start-agent.test.d.ts.map +1 -0
- package/dist/events/daemon/agent/on-request-start-agent.test.js +96 -0
- package/dist/events/daemon/agent/on-request-start-agent.test.js.map +1 -0
- package/dist/events/daemon/agent/on-request-stop-agent.d.ts +16 -0
- package/dist/events/daemon/agent/on-request-stop-agent.d.ts.map +1 -0
- package/dist/events/daemon/agent/on-request-stop-agent.js +19 -0
- package/dist/events/daemon/agent/on-request-stop-agent.js.map +1 -0
- package/dist/events/daemon/event-bus.d.ts +87 -0
- package/dist/events/daemon/event-bus.d.ts.map +1 -0
- package/dist/events/daemon/event-bus.js +50 -0
- package/dist/events/daemon/event-bus.js.map +1 -0
- package/dist/events/daemon/register-listeners.d.ts +9 -0
- package/dist/events/daemon/register-listeners.d.ts.map +1 -0
- package/dist/events/daemon/register-listeners.js +21 -0
- package/dist/events/daemon/register-listeners.js.map +1 -0
- package/dist/events/lifecycle/on-daemon-shutdown.d.ts +9 -0
- package/dist/events/lifecycle/on-daemon-shutdown.d.ts.map +1 -0
- package/dist/events/lifecycle/on-daemon-shutdown.js +43 -0
- package/dist/events/lifecycle/on-daemon-shutdown.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +210 -25
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/auth/middleware.d.ts +21 -0
- package/dist/infrastructure/auth/middleware.d.ts.map +1 -0
- package/dist/infrastructure/auth/middleware.js +106 -0
- package/dist/infrastructure/auth/middleware.js.map +1 -0
- package/dist/infrastructure/auth/storage.d.ts +59 -0
- package/dist/infrastructure/auth/storage.d.ts.map +1 -0
- package/dist/infrastructure/auth/storage.js +242 -0
- package/dist/infrastructure/auth/storage.js.map +1 -0
- package/dist/infrastructure/convex/client.d.ts +28 -0
- package/dist/infrastructure/convex/client.d.ts.map +1 -0
- package/dist/infrastructure/convex/client.js +77 -0
- package/dist/infrastructure/convex/client.js.map +1 -0
- package/dist/infrastructure/deps/backend.d.ts +13 -0
- package/dist/infrastructure/deps/backend.d.ts.map +1 -0
- package/dist/infrastructure/deps/backend.js +8 -0
- package/dist/infrastructure/deps/backend.js.map +1 -0
- package/dist/infrastructure/deps/clock.d.ts +13 -0
- package/dist/infrastructure/deps/clock.d.ts.map +1 -0
- package/dist/infrastructure/deps/clock.js +8 -0
- package/dist/infrastructure/deps/clock.js.map +1 -0
- package/dist/infrastructure/deps/fs.d.ts +12 -0
- package/dist/infrastructure/deps/fs.d.ts.map +1 -0
- package/dist/infrastructure/deps/fs.js +8 -0
- package/dist/infrastructure/deps/fs.js.map +1 -0
- package/dist/infrastructure/deps/index.d.ts +12 -0
- package/dist/infrastructure/deps/index.d.ts.map +1 -0
- package/dist/infrastructure/deps/index.js +8 -0
- package/dist/infrastructure/deps/index.js.map +1 -0
- package/dist/infrastructure/deps/process.d.ts +11 -0
- package/dist/infrastructure/deps/process.d.ts.map +1 -0
- package/dist/infrastructure/deps/process.js +8 -0
- package/dist/infrastructure/deps/process.js.map +1 -0
- package/dist/infrastructure/deps/session.d.ts +16 -0
- package/dist/infrastructure/deps/session.d.ts.map +1 -0
- package/dist/infrastructure/deps/session.js +8 -0
- package/dist/infrastructure/deps/session.js.map +1 -0
- package/dist/infrastructure/git/git-reader.d.ts +206 -0
- package/dist/infrastructure/git/git-reader.d.ts.map +1 -0
- package/dist/infrastructure/git/git-reader.js +711 -0
- package/dist/infrastructure/git/git-reader.js.map +1 -0
- package/dist/infrastructure/git/git-reader.test.d.ts +8 -0
- package/dist/infrastructure/git/git-reader.test.d.ts.map +1 -0
- package/dist/infrastructure/git/git-reader.test.js +598 -0
- package/dist/infrastructure/git/git-reader.test.js.map +1 -0
- package/dist/infrastructure/git/index.d.ts +9 -0
- package/dist/infrastructure/git/index.d.ts.map +1 -0
- package/dist/infrastructure/git/index.js +8 -0
- package/dist/infrastructure/git/index.js.map +1 -0
- package/dist/infrastructure/git/types.d.ts +102 -0
- package/dist/infrastructure/git/types.d.ts.map +1 -0
- package/dist/infrastructure/git/types.js +20 -0
- package/dist/infrastructure/git/types.js.map +1 -0
- package/dist/infrastructure/history/storage.d.ts +21 -0
- package/dist/infrastructure/history/storage.d.ts.map +1 -0
- package/dist/infrastructure/history/storage.js +56 -0
- package/dist/infrastructure/history/storage.js.map +1 -0
- package/dist/infrastructure/lifecycle-heartbeat.d.ts +18 -0
- package/dist/infrastructure/lifecycle-heartbeat.d.ts.map +1 -0
- package/dist/infrastructure/lifecycle-heartbeat.js +21 -0
- package/dist/infrastructure/lifecycle-heartbeat.js.map +1 -0
- package/dist/infrastructure/local-actions/execute-local-action.d.ts +30 -0
- package/dist/infrastructure/local-actions/execute-local-action.d.ts.map +1 -0
- package/dist/infrastructure/local-actions/execute-local-action.js +76 -0
- package/dist/infrastructure/local-actions/execute-local-action.js.map +1 -0
- package/dist/infrastructure/local-actions/index.d.ts +9 -0
- package/dist/infrastructure/local-actions/index.d.ts.map +1 -0
- package/dist/infrastructure/local-actions/index.js +8 -0
- package/dist/infrastructure/local-actions/index.js.map +1 -0
- package/dist/infrastructure/local-api/cors.d.ts +19 -0
- package/dist/infrastructure/local-api/cors.d.ts.map +1 -0
- package/dist/infrastructure/local-api/cors.js +50 -0
- package/dist/infrastructure/local-api/cors.js.map +1 -0
- package/dist/infrastructure/local-api/identity.test.d.ts +8 -0
- package/dist/infrastructure/local-api/identity.test.d.ts.map +1 -0
- package/dist/infrastructure/local-api/identity.test.js +71 -0
- package/dist/infrastructure/local-api/identity.test.js.map +1 -0
- package/dist/infrastructure/local-api/index.d.ts +10 -0
- package/dist/infrastructure/local-api/index.d.ts.map +1 -0
- package/dist/infrastructure/local-api/index.js +8 -0
- package/dist/infrastructure/local-api/index.js.map +1 -0
- package/dist/infrastructure/local-api/open-finder.test.d.ts +13 -0
- package/dist/infrastructure/local-api/open-finder.test.d.ts.map +1 -0
- package/dist/infrastructure/local-api/open-finder.test.js +112 -0
- package/dist/infrastructure/local-api/open-finder.test.js.map +1 -0
- package/dist/infrastructure/local-api/open-github-desktop.test.d.ts +12 -0
- package/dist/infrastructure/local-api/open-github-desktop.test.d.ts.map +1 -0
- package/dist/infrastructure/local-api/open-github-desktop.test.js +129 -0
- package/dist/infrastructure/local-api/open-github-desktop.test.js.map +1 -0
- package/dist/infrastructure/local-api/open-vscode.test.d.ts +12 -0
- package/dist/infrastructure/local-api/open-vscode.test.d.ts.map +1 -0
- package/dist/infrastructure/local-api/open-vscode.test.js +130 -0
- package/dist/infrastructure/local-api/open-vscode.test.js.map +1 -0
- package/dist/infrastructure/local-api/router.d.ts +28 -0
- package/dist/infrastructure/local-api/router.d.ts.map +1 -0
- package/dist/infrastructure/local-api/router.js +60 -0
- package/dist/infrastructure/local-api/router.js.map +1 -0
- package/dist/infrastructure/local-api/router.test.d.ts +8 -0
- package/dist/infrastructure/local-api/router.test.d.ts.map +1 -0
- package/dist/infrastructure/local-api/router.test.js +142 -0
- package/dist/infrastructure/local-api/router.test.js.map +1 -0
- package/dist/infrastructure/local-api/routes/identity.d.ts +28 -0
- package/dist/infrastructure/local-api/routes/identity.d.ts.map +1 -0
- package/dist/infrastructure/local-api/routes/identity.js +42 -0
- package/dist/infrastructure/local-api/routes/identity.js.map +1 -0
- package/dist/infrastructure/local-api/routes/open-finder.d.ts +25 -0
- package/dist/infrastructure/local-api/routes/open-finder.d.ts.map +1 -0
- package/dist/infrastructure/local-api/routes/open-finder.js +58 -0
- package/dist/infrastructure/local-api/routes/open-finder.js.map +1 -0
- package/dist/infrastructure/local-api/routes/open-github-desktop.d.ts +21 -0
- package/dist/infrastructure/local-api/routes/open-github-desktop.d.ts.map +1 -0
- package/dist/infrastructure/local-api/routes/open-github-desktop.js +43 -0
- package/dist/infrastructure/local-api/routes/open-github-desktop.js.map +1 -0
- package/dist/infrastructure/local-api/routes/open-vscode.d.ts +23 -0
- package/dist/infrastructure/local-api/routes/open-vscode.d.ts.map +1 -0
- package/dist/infrastructure/local-api/routes/open-vscode.js +51 -0
- package/dist/infrastructure/local-api/routes/open-vscode.js.map +1 -0
- package/dist/infrastructure/local-api/routes/shared-utils.d.ts +51 -0
- package/dist/infrastructure/local-api/routes/shared-utils.d.ts.map +1 -0
- package/dist/infrastructure/local-api/routes/shared-utils.js +96 -0
- package/dist/infrastructure/local-api/routes/shared-utils.js.map +1 -0
- package/dist/infrastructure/local-api/server.d.ts +40 -0
- package/dist/infrastructure/local-api/server.d.ts.map +1 -0
- package/dist/infrastructure/local-api/server.js +153 -0
- package/dist/infrastructure/local-api/server.js.map +1 -0
- package/dist/infrastructure/local-api/types.d.ts +48 -0
- package/dist/infrastructure/local-api/types.d.ts.map +1 -0
- package/dist/infrastructure/local-api/types.js +8 -0
- package/dist/infrastructure/local-api/types.js.map +1 -0
- package/dist/infrastructure/machine/crash-loop-tracker.d.ts +69 -0
- package/dist/infrastructure/machine/crash-loop-tracker.d.ts.map +1 -0
- package/dist/infrastructure/machine/crash-loop-tracker.js +116 -0
- package/dist/infrastructure/machine/crash-loop-tracker.js.map +1 -0
- package/dist/infrastructure/machine/crash-loop-tracker.test.d.ts +8 -0
- package/dist/infrastructure/machine/crash-loop-tracker.test.d.ts.map +1 -0
- package/dist/infrastructure/machine/crash-loop-tracker.test.js +210 -0
- package/dist/infrastructure/machine/crash-loop-tracker.test.js.map +1 -0
- package/dist/infrastructure/machine/daemon-state.d.ts +96 -0
- package/dist/infrastructure/machine/daemon-state.d.ts.map +1 -0
- package/dist/infrastructure/machine/daemon-state.js +183 -0
- package/dist/infrastructure/machine/daemon-state.js.map +1 -0
- package/dist/infrastructure/machine/daemon-state.test.d.ts +10 -0
- package/dist/infrastructure/machine/daemon-state.test.d.ts.map +1 -0
- package/dist/infrastructure/machine/daemon-state.test.js +128 -0
- package/dist/infrastructure/machine/daemon-state.test.js.map +1 -0
- package/dist/infrastructure/machine/detection.d.ts +27 -0
- package/dist/infrastructure/machine/detection.d.ts.map +1 -0
- package/dist/infrastructure/machine/detection.js +47 -0
- package/dist/infrastructure/machine/detection.js.map +1 -0
- package/dist/infrastructure/machine/index.d.ts +10 -0
- package/dist/infrastructure/machine/index.d.ts.map +1 -0
- package/dist/infrastructure/machine/index.js +11 -0
- package/dist/infrastructure/machine/index.js.map +1 -0
- package/dist/infrastructure/machine/stop-reason.d.ts +26 -0
- package/dist/infrastructure/machine/stop-reason.d.ts.map +1 -0
- package/dist/infrastructure/machine/stop-reason.js +22 -0
- package/dist/infrastructure/machine/stop-reason.js.map +1 -0
- package/dist/infrastructure/machine/stop-reason.test.d.ts +2 -0
- package/dist/infrastructure/machine/stop-reason.test.d.ts.map +1 -0
- package/dist/infrastructure/machine/stop-reason.test.js +32 -0
- package/dist/infrastructure/machine/stop-reason.test.js.map +1 -0
- package/dist/infrastructure/machine/storage.d.ts +42 -0
- package/dist/infrastructure/machine/storage.d.ts.map +1 -0
- package/dist/infrastructure/machine/storage.js +156 -0
- package/dist/infrastructure/machine/storage.js.map +1 -0
- package/dist/infrastructure/machine/types.d.ts +58 -0
- package/dist/infrastructure/machine/types.d.ts.map +1 -0
- package/dist/infrastructure/machine/types.js +11 -0
- package/dist/infrastructure/machine/types.js.map +1 -0
- package/dist/infrastructure/retry-queue.d.ts +17 -0
- package/dist/infrastructure/retry-queue.d.ts.map +1 -0
- package/dist/infrastructure/retry-queue.js +33 -0
- package/dist/infrastructure/retry-queue.js.map +1 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.d.ts +142 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.d.ts.map +1 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.js +567 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.js.map +1 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.test.d.ts +2 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.test.d.ts.map +1 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.test.js +692 -0
- package/dist/infrastructure/services/agent-process-manager/agent-process-manager.test.js.map +1 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.d.ts +47 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.d.ts.map +1 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.js +68 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.js.map +1 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.test.d.ts +2 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.test.d.ts.map +1 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.test.js +149 -0
- package/dist/infrastructure/services/harness-spawning/harness-spawning-service.test.js.map +1 -0
- package/dist/infrastructure/services/harness-spawning/index.d.ts +5 -0
- package/dist/infrastructure/services/harness-spawning/index.d.ts.map +1 -0
- package/dist/infrastructure/services/harness-spawning/index.js +3 -0
- package/dist/infrastructure/services/harness-spawning/index.js.map +1 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.d.ts +45 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.d.ts.map +1 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.js +84 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.js.map +1 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.test.d.ts +2 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.test.d.ts.map +1 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.test.js +179 -0
- package/dist/infrastructure/services/harness-spawning/rate-limiter.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.d.ts +77 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.js +149 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.test.js +273 -0
- package/dist/infrastructure/services/remote-agents/base-cli-agent-service.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-code-agent-service.d.ts +30 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-code-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-code-agent-service.js +186 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-code-agent-service.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-stream-reader.d.ts +42 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-stream-reader.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-stream-reader.js +92 -0
- package/dist/infrastructure/services/remote-agents/claude/claude-stream-reader.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/claude/index.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/claude/index.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/claude/index.js +2 -0
- package/dist/infrastructure/services/remote-agents/claude/index.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-agent-service.d.ts +44 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-agent-service.js +160 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-agent-service.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.d.ts +59 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.js +100 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.test.js +105 -0
- package/dist/infrastructure/services/remote-agents/copilot/copilot-stream-reader.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/index.d.ts +3 -0
- package/dist/infrastructure/services/remote-agents/copilot/index.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/copilot/index.js +3 -0
- package/dist/infrastructure/services/remote-agents/copilot/index.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.d.ts +29 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.js +219 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.test.js +223 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-agent-service.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.d.ts +41 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.js +95 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.test.js +334 -0
- package/dist/infrastructure/services/remote-agents/cursor/cursor-stream-reader.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/index.d.ts +3 -0
- package/dist/infrastructure/services/remote-agents/cursor/index.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/cursor/index.js +2 -0
- package/dist/infrastructure/services/remote-agents/cursor/index.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/index.d.ts +8 -0
- package/dist/infrastructure/services/remote-agents/index.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/index.js +7 -0
- package/dist/infrastructure/services/remote-agents/index.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/init-registry.d.ts +3 -0
- package/dist/infrastructure/services/remote-agents/init-registry.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/init-registry.js +19 -0
- package/dist/infrastructure/services/remote-agents/init-registry.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/index.d.ts +4 -0
- package/dist/infrastructure/services/remote-agents/opencode/index.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/index.js +3 -0
- package/dist/infrastructure/services/remote-agents/opencode/index.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.d.ts +32 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.js +225 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.test.js +226 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-agent-service.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.d.ts +46 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.js +104 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.test.js +268 -0
- package/dist/infrastructure/services/remote-agents/opencode/opencode-json-reader.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/index.d.ts +3 -0
- package/dist/infrastructure/services/remote-agents/pi/index.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/index.js +2 -0
- package/dist/infrastructure/services/remote-agents/pi/index.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.d.ts +35 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.js +253 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.test.js +348 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-agent-service.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.d.ts +50 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.js +120 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.test.d.ts +2 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.test.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.test.js +288 -0
- package/dist/infrastructure/services/remote-agents/pi/pi-rpc-reader.test.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/registry.d.ts +8 -0
- package/dist/infrastructure/services/remote-agents/registry.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/registry.js +14 -0
- package/dist/infrastructure/services/remote-agents/registry.js.map +1 -0
- package/dist/infrastructure/services/remote-agents/remote-agent-service.d.ts +79 -0
- package/dist/infrastructure/services/remote-agents/remote-agent-service.d.ts.map +1 -0
- package/dist/infrastructure/services/remote-agents/remote-agent-service.js +9 -0
- package/dist/infrastructure/services/remote-agents/remote-agent-service.js.map +1 -0
- package/dist/infrastructure/services/workspace/command-discovery.d.ts +65 -0
- package/dist/infrastructure/services/workspace/command-discovery.d.ts.map +1 -0
- package/dist/infrastructure/services/workspace/command-discovery.js +193 -0
- package/dist/infrastructure/services/workspace/command-discovery.js.map +1 -0
- package/dist/infrastructure/services/workspace/command-discovery.test.d.ts +7 -0
- package/dist/infrastructure/services/workspace/command-discovery.test.d.ts.map +1 -0
- package/dist/infrastructure/services/workspace/command-discovery.test.js +182 -0
- package/dist/infrastructure/services/workspace/command-discovery.test.js.map +1 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.d.ts +47 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.d.ts.map +1 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.js +159 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.js.map +1 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.test.d.ts +2 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.test.d.ts.map +1 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.test.js +132 -0
- package/dist/infrastructure/services/workspace/file-tree-scanner.test.js.map +1 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.d.ts +34 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.d.ts.map +1 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.js +187 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.js.map +1 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.test.d.ts +5 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.test.d.ts.map +1 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.test.js +152 -0
- package/dist/infrastructure/services/workspace/workspace-resolver.test.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +5 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/output.d.ts +50 -0
- package/dist/tools/output.d.ts.map +1 -0
- package/dist/tools/output.js +78 -0
- package/dist/tools/output.js.map +1 -0
- package/dist/tools/output.test.d.ts +8 -0
- package/dist/tools/output.test.d.ts.map +1 -0
- package/dist/tools/output.test.js +120 -0
- package/dist/tools/output.test.js.map +1 -0
- package/dist/tools/parse-pdf/deps.d.ts +42 -0
- package/dist/tools/parse-pdf/deps.d.ts.map +1 -0
- package/dist/tools/parse-pdf/deps.js +8 -0
- package/dist/tools/parse-pdf/deps.js.map +1 -0
- package/dist/tools/parse-pdf/index.d.ts +18 -0
- package/dist/tools/parse-pdf/index.d.ts.map +1 -0
- package/dist/tools/parse-pdf/index.js +160 -0
- package/dist/tools/parse-pdf/index.js.map +1 -0
- package/dist/tools/parse-pdf/index.test.d.ts +8 -0
- package/dist/tools/parse-pdf/index.test.d.ts.map +1 -0
- package/dist/tools/parse-pdf/index.test.js +183 -0
- package/dist/tools/parse-pdf/index.test.js.map +1 -0
- package/dist/tools/types.d.ts +12 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +5 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/utils/convex-error.d.ts +19 -0
- package/dist/utils/convex-error.d.ts.map +1 -0
- package/dist/utils/convex-error.js +38 -0
- package/dist/utils/convex-error.js.map +1 -0
- package/dist/utils/convex-error.test.d.ts +7 -0
- package/dist/utils/convex-error.test.d.ts.map +1 -0
- package/dist/utils/convex-error.test.js +71 -0
- package/dist/utils/convex-error.test.js.map +1 -0
- package/dist/utils/error-formatting.d.ts +33 -0
- package/dist/utils/error-formatting.d.ts.map +1 -0
- package/dist/utils/error-formatting.js +96 -0
- package/dist/utils/error-formatting.js.map +1 -0
- package/dist/utils/file-content.d.ts +24 -0
- package/dist/utils/file-content.d.ts.map +1 -0
- package/dist/utils/file-content.js +35 -0
- package/dist/utils/file-content.js.map +1 -0
- package/dist/utils/serialization/decode/index.d.ts +71 -0
- package/dist/utils/serialization/decode/index.d.ts.map +1 -0
- package/dist/utils/serialization/decode/index.js +167 -0
- package/dist/utils/serialization/decode/index.js.map +1 -0
- package/dist/utils/serialization/decode/index.test.d.ts +5 -0
- package/dist/utils/serialization/decode/index.test.d.ts.map +1 -0
- package/dist/utils/serialization/decode/index.test.js +226 -0
- package/dist/utils/serialization/decode/index.test.js.map +1 -0
- package/dist/utils/stdin.d.ts +6 -0
- package/dist/utils/stdin.d.ts.map +1 -0
- package/dist/utils/stdin.js +19 -0
- package/dist/utils/stdin.js.map +1 -0
- package/dist/utils/terminal-safety.d.ts +7 -0
- package/dist/utils/terminal-safety.d.ts.map +1 -0
- package/dist/utils/terminal-safety.js +17 -0
- package/dist/utils/terminal-safety.js.map +1 -0
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +43 -0
- package/dist/version.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context commands for understanding chatroom state
|
|
3
|
+
*
|
|
4
|
+
* Includes:
|
|
5
|
+
* - readContext: Read conversation history and task status
|
|
6
|
+
* - newContext: Create a new explicit context (replaces pinned message)
|
|
7
|
+
* - listContexts: List recent contexts for a chatroom
|
|
8
|
+
* - inspectContext: View a specific context with details
|
|
9
|
+
*/
|
|
10
|
+
import { api } from '../../api.js';
|
|
11
|
+
import { getSessionId, getOtherSessionUrls } from '../../infrastructure/auth/storage.js';
|
|
12
|
+
import { getConvexClient, getConvexUrl } from '../../infrastructure/convex/client.js';
|
|
13
|
+
import { sanitizeForTerminal, sanitizeUnknownForTerminal } from '../../utils/terminal-safety.js';
|
|
14
|
+
import { getErrorMessage } from '../../utils/convex-error.js';
|
|
15
|
+
// ─── Default Deps Factory ──────────────────────────────────────────────────
|
|
16
|
+
async function createDefaultDeps() {
|
|
17
|
+
const client = await getConvexClient();
|
|
18
|
+
return {
|
|
19
|
+
backend: {
|
|
20
|
+
mutation: (endpoint, args) => client.mutation(endpoint, args),
|
|
21
|
+
query: (endpoint, args) => client.query(endpoint, args),
|
|
22
|
+
},
|
|
23
|
+
session: {
|
|
24
|
+
getSessionId,
|
|
25
|
+
getConvexUrl,
|
|
26
|
+
getOtherSessionUrls,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// ─── Commands ─────────────────────────────────────────────────────────────
|
|
31
|
+
/**
|
|
32
|
+
* Read context for a specific role.
|
|
33
|
+
* Shows recent conversation history with task information.
|
|
34
|
+
*/
|
|
35
|
+
export async function readContext(chatroomId, options, deps) {
|
|
36
|
+
const d = deps ?? (await createDefaultDeps());
|
|
37
|
+
// Get session ID for authentication
|
|
38
|
+
const sessionId = d.session.getSessionId();
|
|
39
|
+
if (!sessionId) {
|
|
40
|
+
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
// Validate chatroom ID format
|
|
44
|
+
if (!chatroomId ||
|
|
45
|
+
typeof chatroomId !== 'string' ||
|
|
46
|
+
chatroomId.length < 20 ||
|
|
47
|
+
chatroomId.length > 40) {
|
|
48
|
+
console.error(`❌ Invalid chatroom ID format: ID must be 20-40 characters (got ${chatroomId?.length || 0})`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
const context = await d.backend.query(api.messages.getContextForRole, {
|
|
53
|
+
sessionId,
|
|
54
|
+
chatroomId: chatroomId,
|
|
55
|
+
role: options.role,
|
|
56
|
+
});
|
|
57
|
+
if (context.messages.length === 0 && !context.currentContext) {
|
|
58
|
+
console.log(`<context role="${options.role}">`);
|
|
59
|
+
console.log(`\n📭 No context available`);
|
|
60
|
+
console.log('</context>');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
console.log(`<context role="${options.role}">`);
|
|
64
|
+
console.log(`\n📚 CONTEXT FOR ${options.role.toUpperCase()}`);
|
|
65
|
+
console.log('═'.repeat(60));
|
|
66
|
+
// Display the pinned context if available
|
|
67
|
+
if (context.currentContext) {
|
|
68
|
+
console.log(`\n📌 Current Context:`);
|
|
69
|
+
console.log(` Created by: ${context.currentContext.createdBy}`);
|
|
70
|
+
console.log(` Created at: ${new Date(context.currentContext.createdAt).toLocaleString()}`);
|
|
71
|
+
console.log(` Content:`);
|
|
72
|
+
const safeContextContent = sanitizeForTerminal(context.currentContext.content);
|
|
73
|
+
console.log(safeContextContent
|
|
74
|
+
.split('\n')
|
|
75
|
+
.map((l) => ` ${l}`)
|
|
76
|
+
.join('\n'));
|
|
77
|
+
console.log('─'.repeat(60));
|
|
78
|
+
}
|
|
79
|
+
if (context.originMessage) {
|
|
80
|
+
console.log(`\n🎯 Origin Message:`);
|
|
81
|
+
console.log(` ID: ${context.originMessage._id}`);
|
|
82
|
+
console.log(` Time: ${new Date(context.originMessage._creationTime).toLocaleString()}`);
|
|
83
|
+
if (context.classification) {
|
|
84
|
+
console.log(` Classification: ${context.classification.toUpperCase()}`);
|
|
85
|
+
}
|
|
86
|
+
if (context.originMessage.featureTitle) {
|
|
87
|
+
console.log(` Feature: ${context.originMessage.featureTitle}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
console.log(`\n📊 Status:`);
|
|
91
|
+
console.log(` Messages in context: ${context.messages.length}`);
|
|
92
|
+
console.log(` Pending tasks for ${options.role}: ${context.pendingTasksForRole}`);
|
|
93
|
+
console.log(`\n💬 Chat History:`);
|
|
94
|
+
console.log('─'.repeat(60));
|
|
95
|
+
for (const message of context.messages) {
|
|
96
|
+
// Build the opening <message> tag with attributes
|
|
97
|
+
const toAttr = message.targetRole ? ` to="${message.targetRole}"` : '';
|
|
98
|
+
const classAttr = message.classification ? ` classification="${message.classification}"` : '';
|
|
99
|
+
console.log(`<message id="${message._id}" from="${message.senderRole}"${toAttr} type="${message.type}"${classAttr}>`);
|
|
100
|
+
if (message.featureTitle) {
|
|
101
|
+
console.log(` Feature: ${sanitizeForTerminal(message.featureTitle)}`);
|
|
102
|
+
}
|
|
103
|
+
// Show task info if available
|
|
104
|
+
if (message.taskId) {
|
|
105
|
+
console.log(` Task:`);
|
|
106
|
+
console.log(` ID: ${message.taskId}`);
|
|
107
|
+
if (message.taskStatus) {
|
|
108
|
+
console.log(` Status: ${message.taskStatus}`);
|
|
109
|
+
}
|
|
110
|
+
if (message.taskContent) {
|
|
111
|
+
const safeTaskContent = sanitizeForTerminal(message.taskContent);
|
|
112
|
+
console.log(` Content:`);
|
|
113
|
+
console.log(` <task-content>`);
|
|
114
|
+
console.log(safeTaskContent
|
|
115
|
+
.split('\n')
|
|
116
|
+
.map((l) => ` ${l}`)
|
|
117
|
+
.join('\n'));
|
|
118
|
+
console.log(` </task-content>`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// Show attached tasks if available
|
|
122
|
+
if (message.attachedTasks && message.attachedTasks.length > 0) {
|
|
123
|
+
console.log(` Attachments:`);
|
|
124
|
+
for (const task of message.attachedTasks) {
|
|
125
|
+
console.log(` 🔹 Task ID: ${task._id}`);
|
|
126
|
+
console.log(` Type: Task`);
|
|
127
|
+
const contentLines = sanitizeForTerminal(task.content).split('\n');
|
|
128
|
+
console.log(` Content:`);
|
|
129
|
+
console.log(` <task-content>`);
|
|
130
|
+
for (const line of contentLines) {
|
|
131
|
+
console.log(` ${line}`);
|
|
132
|
+
}
|
|
133
|
+
console.log(` </task-content>`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// Show full message content
|
|
137
|
+
console.log(` Content:`);
|
|
138
|
+
console.log(` <message-content>`);
|
|
139
|
+
const safeMessageContent = sanitizeForTerminal(message.content);
|
|
140
|
+
console.log(safeMessageContent
|
|
141
|
+
.split('\n')
|
|
142
|
+
.map((l) => ` ${l}`)
|
|
143
|
+
.join('\n'));
|
|
144
|
+
console.log(` </message-content>`);
|
|
145
|
+
console.log(`</message>`);
|
|
146
|
+
}
|
|
147
|
+
console.log('\n' + '═'.repeat(60));
|
|
148
|
+
console.log('</context>');
|
|
149
|
+
}
|
|
150
|
+
catch (err) {
|
|
151
|
+
console.error(`❌ Failed to read context: ${sanitizeUnknownForTerminal(getErrorMessage(err))}`);
|
|
152
|
+
process.exit(1);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Create a new explicit context for a chatroom.
|
|
158
|
+
* This replaces the pinned message system with explicit context management.
|
|
159
|
+
*/
|
|
160
|
+
export async function newContext(chatroomId, options, deps) {
|
|
161
|
+
const d = deps ?? (await createDefaultDeps());
|
|
162
|
+
// Get session ID for authentication
|
|
163
|
+
const sessionId = d.session.getSessionId();
|
|
164
|
+
if (!sessionId) {
|
|
165
|
+
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
// Validate chatroom ID format
|
|
169
|
+
if (!chatroomId ||
|
|
170
|
+
typeof chatroomId !== 'string' ||
|
|
171
|
+
chatroomId.length < 20 ||
|
|
172
|
+
chatroomId.length > 40) {
|
|
173
|
+
console.error(`❌ Invalid chatroom ID format: ID must be 20-40 characters (got ${chatroomId?.length || 0})`);
|
|
174
|
+
process.exit(1);
|
|
175
|
+
}
|
|
176
|
+
// Validate content is not empty
|
|
177
|
+
if (!options.content || options.content.trim().length === 0) {
|
|
178
|
+
console.error(`❌ Context content cannot be empty`);
|
|
179
|
+
process.exit(1);
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
const contextId = await d.backend.mutation(api.contexts.createContext, {
|
|
183
|
+
sessionId,
|
|
184
|
+
chatroomId: chatroomId,
|
|
185
|
+
content: options.content,
|
|
186
|
+
role: options.role,
|
|
187
|
+
triggerMessageId: options.triggerMessageId,
|
|
188
|
+
});
|
|
189
|
+
console.log(`✅ Context created successfully`);
|
|
190
|
+
console.log(` Context ID: ${contextId}`);
|
|
191
|
+
console.log(` Created by: ${options.role}`);
|
|
192
|
+
console.log(`\n📌 This context is now pinned for all agents in this chatroom.`);
|
|
193
|
+
}
|
|
194
|
+
catch (err) {
|
|
195
|
+
// Check for structured ConvexError with a known code
|
|
196
|
+
const errData = err.data;
|
|
197
|
+
if (errData?.code === 'CONTEXT_NO_HANDOFF_SINCE_LAST_CONTEXT' && errData.existingContext) {
|
|
198
|
+
const { content, createdAt, createdBy } = errData.existingContext;
|
|
199
|
+
console.error(`❌ Cannot create new context: no handoff sent since last context was created.`);
|
|
200
|
+
console.error(`\n📌 Current Context (resume from here):`);
|
|
201
|
+
console.error(` Created by: ${sanitizeForTerminal(createdBy)}`);
|
|
202
|
+
console.error(` Created at: ${new Date(createdAt).toLocaleString()}`);
|
|
203
|
+
console.error(` Content:`);
|
|
204
|
+
const safeContent = sanitizeForTerminal(content);
|
|
205
|
+
console.error(safeContent
|
|
206
|
+
.split('\n')
|
|
207
|
+
.map((l) => ` ${l}`)
|
|
208
|
+
.join('\n'));
|
|
209
|
+
console.error(`\n💡 Send a handoff first, then create a new context.`);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
console.error(`❌ Failed to create context: ${getErrorMessage(err)}`);
|
|
214
|
+
process.exit(1);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* List recent contexts for a chatroom.
|
|
220
|
+
*/
|
|
221
|
+
export async function listContexts(chatroomId, options, deps) {
|
|
222
|
+
const d = deps ?? (await createDefaultDeps());
|
|
223
|
+
// Get session ID for authentication
|
|
224
|
+
const sessionId = d.session.getSessionId();
|
|
225
|
+
if (!sessionId) {
|
|
226
|
+
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
227
|
+
process.exit(1);
|
|
228
|
+
}
|
|
229
|
+
// Validate chatroom ID format
|
|
230
|
+
if (!chatroomId ||
|
|
231
|
+
typeof chatroomId !== 'string' ||
|
|
232
|
+
chatroomId.length < 20 ||
|
|
233
|
+
chatroomId.length > 40) {
|
|
234
|
+
console.error(`❌ Invalid chatroom ID format: ID must be 20-40 characters (got ${chatroomId?.length || 0})`);
|
|
235
|
+
process.exit(1);
|
|
236
|
+
}
|
|
237
|
+
try {
|
|
238
|
+
const contexts = await d.backend.query(api.contexts.listContexts, {
|
|
239
|
+
sessionId,
|
|
240
|
+
chatroomId: chatroomId,
|
|
241
|
+
limit: options.limit ?? 10,
|
|
242
|
+
});
|
|
243
|
+
if (contexts.length === 0) {
|
|
244
|
+
console.log(`\n📭 No contexts found for this chatroom`);
|
|
245
|
+
console.log(`\n💡 Create a context with:`);
|
|
246
|
+
console.log(` chatroom context new --chatroom-id=${chatroomId} --role=${options.role} --content="Your context summary"`);
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
console.log(`\n📚 CONTEXTS (${contexts.length} found)`);
|
|
250
|
+
console.log('═'.repeat(60));
|
|
251
|
+
for (const context of contexts) {
|
|
252
|
+
const timestamp = new Date(context.createdAt).toLocaleString();
|
|
253
|
+
console.log(`\n🔹 Context ID: ${context._id}`);
|
|
254
|
+
console.log(` Created by: ${context.createdBy}`);
|
|
255
|
+
console.log(` Created at: ${timestamp}`);
|
|
256
|
+
if (context.messageCountAtCreation !== undefined) {
|
|
257
|
+
console.log(` Messages at creation: ${context.messageCountAtCreation}`);
|
|
258
|
+
}
|
|
259
|
+
console.log(` Content:`);
|
|
260
|
+
// Truncate to first 200 chars for list view
|
|
261
|
+
const safeContent = sanitizeForTerminal(context.content);
|
|
262
|
+
const truncatedContent = safeContent.length > 200 ? safeContent.slice(0, 200) + '...' : safeContent;
|
|
263
|
+
console.log(truncatedContent
|
|
264
|
+
.split('\n')
|
|
265
|
+
.map((l) => ` ${l}`)
|
|
266
|
+
.join('\n'));
|
|
267
|
+
}
|
|
268
|
+
console.log('\n' + '═'.repeat(60));
|
|
269
|
+
}
|
|
270
|
+
catch (err) {
|
|
271
|
+
console.error(`❌ Failed to list contexts: ${sanitizeUnknownForTerminal(getErrorMessage(err))}`);
|
|
272
|
+
process.exit(1);
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Inspect a specific context with staleness information.
|
|
278
|
+
*/
|
|
279
|
+
export async function inspectContext(chatroomId, options, deps) {
|
|
280
|
+
const d = deps ?? (await createDefaultDeps());
|
|
281
|
+
// Get session ID for authentication
|
|
282
|
+
const sessionId = d.session.getSessionId();
|
|
283
|
+
if (!sessionId) {
|
|
284
|
+
console.error(`❌ Not authenticated. Please run: chatroom auth login`);
|
|
285
|
+
process.exit(1);
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
const context = await d.backend.query(api.contexts.getContext, {
|
|
289
|
+
sessionId,
|
|
290
|
+
contextId: options.contextId,
|
|
291
|
+
});
|
|
292
|
+
console.log(`\n📋 CONTEXT DETAILS`);
|
|
293
|
+
console.log('═'.repeat(60));
|
|
294
|
+
console.log(`\n🔹 Context ID: ${context._id}`);
|
|
295
|
+
console.log(` Created by: ${context.createdBy}`);
|
|
296
|
+
console.log(` Created at: ${new Date(context.createdAt).toLocaleString()}`);
|
|
297
|
+
// Staleness information
|
|
298
|
+
console.log(`\n📊 Staleness:`);
|
|
299
|
+
console.log(` Messages since context: ${context.messagesSinceContext}`);
|
|
300
|
+
console.log(` Time elapsed: ${context.elapsedHours.toFixed(1)} hours`);
|
|
301
|
+
// Staleness warnings
|
|
302
|
+
if (context.messagesSinceContext >= 10) {
|
|
303
|
+
console.log(`\n⚠️ Many messages since this context was created.`);
|
|
304
|
+
console.log(` Consider creating a new context with an updated summary.`);
|
|
305
|
+
}
|
|
306
|
+
if (context.elapsedHours >= 24) {
|
|
307
|
+
console.log(`\n⚠️ This context is over 24 hours old.`);
|
|
308
|
+
console.log(` Consider creating a new context with an updated summary.`);
|
|
309
|
+
}
|
|
310
|
+
console.log(`\n📝 Content:`);
|
|
311
|
+
console.log('─'.repeat(60));
|
|
312
|
+
console.log(sanitizeForTerminal(context.content));
|
|
313
|
+
console.log('─'.repeat(60));
|
|
314
|
+
console.log(`\n💡 To create a new context:`);
|
|
315
|
+
console.log(` chatroom context new --chatroom-id=${chatroomId} --role=${options.role} --content="Your updated summary"`);
|
|
316
|
+
console.log('\n' + '═'.repeat(60));
|
|
317
|
+
}
|
|
318
|
+
catch (err) {
|
|
319
|
+
console.error(`❌ Failed to inspect context: ${sanitizeUnknownForTerminal(getErrorMessage(err))}`);
|
|
320
|
+
process.exit(1);
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,GAAG,EAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,e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AAC;QAED,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAE5B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CACT,yCAAyC,UAAU,WAAW,OAAO,CAAC,IAAI,mCAAmC,CAC9G,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CACX,gCAAgC,0BAA0B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,CACnF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO;IACT,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Unit Tests
|
|
3
|
+
*
|
|
4
|
+
* Tests the context commands using injected dependencies.
|
|
5
|
+
* Covers: auth validation, readContext success, listContexts success,
|
|
6
|
+
* error handling for readContext and listContexts.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/commands/context/index.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Unit Tests
|
|
3
|
+
*
|
|
4
|
+
* Tests the context commands using injected dependencies.
|
|
5
|
+
* Covers: auth validation, readContext success, listContexts success,
|
|
6
|
+
* error handling for readContext and listContexts.
|
|
7
|
+
*/
|
|
8
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
9
|
+
import { readContext, listContexts, newContext } from './index.js';
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Helpers
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
const TEST_CHATROOM_ID = 'test_chatroom_id_12345678';
|
|
14
|
+
const TEST_SESSION_ID = 'test-session-id';
|
|
15
|
+
function createMockDeps(overrides) {
|
|
16
|
+
return {
|
|
17
|
+
backend: {
|
|
18
|
+
mutation: vi.fn().mockResolvedValue('ctx_new_id'),
|
|
19
|
+
query: vi.fn().mockResolvedValue(null),
|
|
20
|
+
},
|
|
21
|
+
session: {
|
|
22
|
+
getSessionId: vi.fn().mockReturnValue(TEST_SESSION_ID),
|
|
23
|
+
getConvexUrl: vi.fn().mockReturnValue('http://test:3210'),
|
|
24
|
+
getOtherSessionUrls: vi.fn().mockReturnValue([]),
|
|
25
|
+
},
|
|
26
|
+
...overrides,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Setup / Teardown
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
let exitSpy;
|
|
33
|
+
let logSpy;
|
|
34
|
+
let errorSpy;
|
|
35
|
+
beforeEach(() => {
|
|
36
|
+
exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => { }));
|
|
37
|
+
logSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
|
|
38
|
+
errorSpy = vi.spyOn(console, 'error').mockImplementation(() => { });
|
|
39
|
+
});
|
|
40
|
+
afterEach(() => {
|
|
41
|
+
vi.restoreAllMocks();
|
|
42
|
+
});
|
|
43
|
+
function getAllLogOutput() {
|
|
44
|
+
return logSpy.mock.calls.map((c) => c.join(' ')).join('\n');
|
|
45
|
+
}
|
|
46
|
+
function getAllErrorOutput() {
|
|
47
|
+
return errorSpy.mock.calls.map((c) => c.join(' ')).join('\n');
|
|
48
|
+
}
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
// Tests
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
describe('readContext', () => {
|
|
53
|
+
describe('authentication', () => {
|
|
54
|
+
it('exits with code 1 when not authenticated', async () => {
|
|
55
|
+
const deps = createMockDeps({
|
|
56
|
+
session: {
|
|
57
|
+
getSessionId: vi.fn().mockReturnValue(null),
|
|
58
|
+
getConvexUrl: vi.fn().mockReturnValue('http://test:3210'),
|
|
59
|
+
getOtherSessionUrls: vi.fn().mockReturnValue([]),
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
await readContext(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
63
|
+
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
64
|
+
expect(getAllErrorOutput()).toContain('Not authenticated');
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
describe('success', () => {
|
|
68
|
+
it('reads and displays context when backend returns messages', async () => {
|
|
69
|
+
const deps = createMockDeps();
|
|
70
|
+
deps.backend.query.mockResolvedValue({
|
|
71
|
+
messages: [
|
|
72
|
+
{
|
|
73
|
+
_id: 'msg_1',
|
|
74
|
+
_creationTime: 1000000000000,
|
|
75
|
+
senderRole: 'planner',
|
|
76
|
+
type: 'text',
|
|
77
|
+
content: 'Hello',
|
|
78
|
+
classification: 'question',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
pendingTasksForRole: 0,
|
|
82
|
+
originMessage: null,
|
|
83
|
+
classification: null,
|
|
84
|
+
});
|
|
85
|
+
await readContext(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
86
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
87
|
+
expect(deps.backend.query).toHaveBeenCalledTimes(1);
|
|
88
|
+
const output = getAllLogOutput();
|
|
89
|
+
expect(output).toContain('CONTEXT FOR PLANNER');
|
|
90
|
+
expect(output).toContain('Hello');
|
|
91
|
+
expect(output).toContain('<context role="planner">');
|
|
92
|
+
expect(output).toContain('</context>');
|
|
93
|
+
expect(output).toContain('<message id="msg_1"');
|
|
94
|
+
expect(output).toContain('from="planner"');
|
|
95
|
+
expect(output).toContain('type="text"');
|
|
96
|
+
expect(output).toContain('classification="question"');
|
|
97
|
+
expect(output).toContain('</message>');
|
|
98
|
+
expect(output).toContain('<message-content>');
|
|
99
|
+
expect(output).toContain('</message-content>');
|
|
100
|
+
});
|
|
101
|
+
it('wraps message in XML tag with correct attributes including to and classification', async () => {
|
|
102
|
+
const deps = createMockDeps();
|
|
103
|
+
deps.backend.query.mockResolvedValue({
|
|
104
|
+
messages: [
|
|
105
|
+
{
|
|
106
|
+
_id: 'msg_handoff',
|
|
107
|
+
_creationTime: Date.now(),
|
|
108
|
+
senderRole: 'planner',
|
|
109
|
+
targetRole: 'builder',
|
|
110
|
+
type: 'handoff',
|
|
111
|
+
classification: 'new_feature',
|
|
112
|
+
content: 'Handing off to builder',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
pendingTasksForRole: 0,
|
|
116
|
+
originMessage: null,
|
|
117
|
+
classification: null,
|
|
118
|
+
});
|
|
119
|
+
await readContext(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
120
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
121
|
+
const output = getAllLogOutput();
|
|
122
|
+
expect(output).toContain('<message id="msg_handoff"');
|
|
123
|
+
expect(output).toContain('from="planner"');
|
|
124
|
+
expect(output).toContain('to="builder"');
|
|
125
|
+
expect(output).toContain('type="handoff"');
|
|
126
|
+
expect(output).toContain('classification="new_feature"');
|
|
127
|
+
expect(output).toContain('</message>');
|
|
128
|
+
});
|
|
129
|
+
it('shows "to" attribute when message has targetRole', async () => {
|
|
130
|
+
const deps = createMockDeps();
|
|
131
|
+
deps.backend.query.mockResolvedValue({
|
|
132
|
+
messages: [
|
|
133
|
+
{
|
|
134
|
+
_id: 'msg_handoff',
|
|
135
|
+
_creationTime: Date.now(),
|
|
136
|
+
senderRole: 'planner',
|
|
137
|
+
targetRole: 'builder',
|
|
138
|
+
type: 'handoff',
|
|
139
|
+
content: 'Handing off to builder',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
pendingTasksForRole: 0,
|
|
143
|
+
originMessage: null,
|
|
144
|
+
classification: null,
|
|
145
|
+
});
|
|
146
|
+
await readContext(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
147
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
148
|
+
const output = getAllLogOutput();
|
|
149
|
+
expect(output).toContain('from="planner"');
|
|
150
|
+
expect(output).toContain('to="builder"');
|
|
151
|
+
});
|
|
152
|
+
it('does not include "to" attribute when message has no targetRole', async () => {
|
|
153
|
+
const deps = createMockDeps();
|
|
154
|
+
deps.backend.query.mockResolvedValue({
|
|
155
|
+
messages: [
|
|
156
|
+
{
|
|
157
|
+
_id: 'msg_1',
|
|
158
|
+
_creationTime: Date.now(),
|
|
159
|
+
senderRole: 'planner',
|
|
160
|
+
type: 'text',
|
|
161
|
+
content: 'Hello',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
pendingTasksForRole: 0,
|
|
165
|
+
originMessage: null,
|
|
166
|
+
classification: null,
|
|
167
|
+
});
|
|
168
|
+
await readContext(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
169
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
170
|
+
const output = getAllLogOutput();
|
|
171
|
+
expect(output).toContain('from="planner"');
|
|
172
|
+
expect(output).not.toContain('to="');
|
|
173
|
+
});
|
|
174
|
+
it('shows no context available when messages array is empty', async () => {
|
|
175
|
+
const deps = createMockDeps();
|
|
176
|
+
deps.backend.query.mockResolvedValue({
|
|
177
|
+
messages: [],
|
|
178
|
+
pendingTasksForRole: 0,
|
|
179
|
+
originMessage: null,
|
|
180
|
+
classification: null,
|
|
181
|
+
});
|
|
182
|
+
await readContext(TEST_CHATROOM_ID, { role: 'builder' }, deps);
|
|
183
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
184
|
+
const output = getAllLogOutput();
|
|
185
|
+
expect(output).toContain('No context available');
|
|
186
|
+
expect(output).toContain('<context role="builder">');
|
|
187
|
+
expect(output).toContain('</context>');
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
describe('error handling', () => {
|
|
191
|
+
it('exits with code 1 when backend query fails', async () => {
|
|
192
|
+
const deps = createMockDeps();
|
|
193
|
+
deps.backend.query.mockRejectedValue(new Error('Convex connection failed'));
|
|
194
|
+
await readContext(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
195
|
+
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
196
|
+
expect(getAllErrorOutput()).toContain('Failed to read context');
|
|
197
|
+
expect(getAllErrorOutput()).toContain('Convex connection failed');
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
describe('listContexts', () => {
|
|
202
|
+
describe('success', () => {
|
|
203
|
+
it('lists contexts when backend returns data', async () => {
|
|
204
|
+
const deps = createMockDeps();
|
|
205
|
+
deps.backend.query.mockResolvedValue([
|
|
206
|
+
{
|
|
207
|
+
_id: 'ctx_1',
|
|
208
|
+
createdBy: 'planner',
|
|
209
|
+
createdAt: Date.now(),
|
|
210
|
+
content: 'Summary of the feature',
|
|
211
|
+
messageCountAtCreation: 5,
|
|
212
|
+
},
|
|
213
|
+
]);
|
|
214
|
+
await listContexts(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
215
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
216
|
+
expect(deps.backend.query).toHaveBeenCalledTimes(1);
|
|
217
|
+
const output = getAllLogOutput();
|
|
218
|
+
expect(output).toContain('CONTEXTS');
|
|
219
|
+
expect(output).toContain('Summary of the feature');
|
|
220
|
+
});
|
|
221
|
+
it('shows empty state when no contexts found', async () => {
|
|
222
|
+
const deps = createMockDeps();
|
|
223
|
+
deps.backend.query.mockResolvedValue([]);
|
|
224
|
+
await listContexts(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
225
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
226
|
+
const output = getAllLogOutput();
|
|
227
|
+
expect(output).toContain('No contexts found');
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
describe('error handling', () => {
|
|
231
|
+
it('exits with code 1 when backend query fails', async () => {
|
|
232
|
+
const deps = createMockDeps();
|
|
233
|
+
deps.backend.query.mockRejectedValue(new Error('Permission denied'));
|
|
234
|
+
await listContexts(TEST_CHATROOM_ID, { role: 'planner' }, deps);
|
|
235
|
+
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
236
|
+
expect(getAllErrorOutput()).toContain('Failed to list contexts');
|
|
237
|
+
expect(getAllErrorOutput()).toContain('Permission denied');
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
describe('newContext', () => {
|
|
242
|
+
describe('triggerMessageId', () => {
|
|
243
|
+
it('passes triggerMessageId to the createContext mutation when provided', async () => {
|
|
244
|
+
const deps = createMockDeps();
|
|
245
|
+
deps.backend.mutation.mockResolvedValue('ctx_new_id');
|
|
246
|
+
await newContext(TEST_CHATROOM_ID, {
|
|
247
|
+
role: 'planner',
|
|
248
|
+
content: 'Working on feature X',
|
|
249
|
+
triggerMessageId: 'msg_abc123',
|
|
250
|
+
}, deps);
|
|
251
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
252
|
+
expect(deps.backend.mutation).toHaveBeenCalledTimes(1);
|
|
253
|
+
const mutationCall = deps.backend.mutation.mock.calls[0];
|
|
254
|
+
const mutationArgs = mutationCall[1];
|
|
255
|
+
expect(mutationArgs.triggerMessageId).toBe('msg_abc123');
|
|
256
|
+
});
|
|
257
|
+
it('passes undefined triggerMessageId when not provided', async () => {
|
|
258
|
+
const deps = createMockDeps();
|
|
259
|
+
deps.backend.mutation.mockResolvedValue('ctx_new_id');
|
|
260
|
+
await newContext(TEST_CHATROOM_ID, {
|
|
261
|
+
role: 'planner',
|
|
262
|
+
content: 'Working on feature X',
|
|
263
|
+
}, deps);
|
|
264
|
+
expect(exitSpy).not.toHaveBeenCalled();
|
|
265
|
+
expect(deps.backend.mutation).toHaveBeenCalledTimes(1);
|
|
266
|
+
const mutationCall = deps.backend.mutation.mock.calls[0];
|
|
267
|
+
const mutationArgs = mutationCall[1];
|
|
268
|
+
expect(mutationArgs.triggerMessageId).toBeUndefined();
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/commands/context/index.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAGzE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnE,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AACrD,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C,SAAS,cAAc,CAAC,SAAgC;IACtD,OAAO;QACL,OAAO,EAAE;YACP,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC;YACjD,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC;SACvC;QACD,OAAO,EAAE;YACP,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC;YACtD,YAAY,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC;YACzD,mBAAmB,EAA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