botmux 3.14.0 → 3.16.0
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/README.en.md +2 -2
- package/README.md +2 -2
- package/dist/.runtime-build-id +1 -1
- package/dist/adapters/backend/destroy-result.d.ts +159 -0
- package/dist/adapters/backend/destroy-result.d.ts.map +1 -0
- package/dist/adapters/backend/destroy-result.js +223 -0
- package/dist/adapters/backend/destroy-result.js.map +1 -0
- package/dist/adapters/backend/herdr-backend.d.ts +4 -0
- package/dist/adapters/backend/herdr-backend.d.ts.map +1 -1
- package/dist/adapters/backend/herdr-backend.js +23 -1
- package/dist/adapters/backend/herdr-backend.js.map +1 -1
- package/dist/adapters/backend/mojo-backend.d.ts +577 -0
- package/dist/adapters/backend/mojo-backend.d.ts.map +1 -0
- package/dist/adapters/backend/mojo-backend.js +2471 -0
- package/dist/adapters/backend/mojo-backend.js.map +1 -0
- package/dist/adapters/backend/mojo-budgets.d.ts +21 -0
- package/dist/adapters/backend/mojo-budgets.d.ts.map +1 -0
- package/dist/adapters/backend/mojo-budgets.js +22 -0
- package/dist/adapters/backend/mojo-budgets.js.map +1 -0
- package/dist/adapters/backend/mojo-isolated-workspace.d.ts +69 -0
- package/dist/adapters/backend/mojo-isolated-workspace.d.ts.map +1 -0
- package/dist/adapters/backend/mojo-isolated-workspace.js +213 -0
- package/dist/adapters/backend/mojo-isolated-workspace.js.map +1 -0
- package/dist/adapters/backend/mojo-process-tree.d.ts +292 -0
- package/dist/adapters/backend/mojo-process-tree.d.ts.map +1 -0
- package/dist/adapters/backend/mojo-process-tree.js +486 -0
- package/dist/adapters/backend/mojo-process-tree.js.map +1 -0
- package/dist/adapters/backend/mojo-types.d.ts +542 -0
- package/dist/adapters/backend/mojo-types.d.ts.map +1 -0
- package/dist/adapters/backend/mojo-types.js +682 -0
- package/dist/adapters/backend/mojo-types.js.map +1 -0
- package/dist/adapters/backend/reproduce-command.js +3 -3
- package/dist/adapters/backend/reproduce-command.js.map +1 -1
- package/dist/adapters/backend/riff-backend.js +1 -1
- package/dist/adapters/backend/riff-backend.js.map +1 -1
- package/dist/adapters/backend/sandbox.d.ts +44 -7
- package/dist/adapters/backend/sandbox.d.ts.map +1 -1
- package/dist/adapters/backend/sandbox.js +30 -7
- package/dist/adapters/backend/sandbox.js.map +1 -1
- package/dist/adapters/backend/session-backend-selector.d.ts +14 -1
- package/dist/adapters/backend/session-backend-selector.d.ts.map +1 -1
- package/dist/adapters/backend/session-backend-selector.js +82 -10
- package/dist/adapters/backend/session-backend-selector.js.map +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.d.ts +30 -0
- package/dist/adapters/backend/tmux-pipe-backend.d.ts.map +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.js +60 -0
- package/dist/adapters/backend/tmux-pipe-backend.js.map +1 -1
- package/dist/adapters/backend/types.d.ts +108 -6
- package/dist/adapters/backend/types.d.ts.map +1 -1
- package/dist/adapters/backend/types.js.map +1 -1
- package/dist/adapters/backend/zmx-backend.d.ts +11 -0
- package/dist/adapters/backend/zmx-backend.d.ts.map +1 -1
- package/dist/adapters/backend/zmx-backend.js +16 -1
- package/dist/adapters/backend/zmx-backend.js.map +1 -1
- package/dist/adapters/cli/codex-app.d.ts.map +1 -1
- package/dist/adapters/cli/codex-app.js +2 -2
- package/dist/adapters/cli/codex-app.js.map +1 -1
- package/dist/adapters/cli/codex.d.ts.map +1 -1
- package/dist/adapters/cli/codex.js +7 -0
- package/dist/adapters/cli/codex.js.map +1 -1
- package/dist/adapters/cli/copilot.d.ts +3 -1
- package/dist/adapters/cli/copilot.d.ts.map +1 -1
- package/dist/adapters/cli/copilot.js +23 -5
- package/dist/adapters/cli/copilot.js.map +1 -1
- package/dist/adapters/cli/cursor.d.ts.map +1 -1
- package/dist/adapters/cli/cursor.js +26 -4
- package/dist/adapters/cli/cursor.js.map +1 -1
- package/dist/adapters/cli/dsh.d.ts.map +1 -1
- package/dist/adapters/cli/dsh.js +5 -1
- package/dist/adapters/cli/dsh.js.map +1 -1
- package/dist/adapters/cli/grok.d.ts.map +1 -1
- package/dist/adapters/cli/grok.js +24 -5
- package/dist/adapters/cli/grok.js.map +1 -1
- package/dist/adapters/cli/kimi.d.ts.map +1 -1
- package/dist/adapters/cli/kimi.js +19 -1
- package/dist/adapters/cli/kimi.js.map +1 -1
- package/dist/adapters/cli/mojo.d.ts +28 -0
- package/dist/adapters/cli/mojo.d.ts.map +1 -0
- package/dist/adapters/cli/mojo.js +58 -0
- package/dist/adapters/cli/mojo.js.map +1 -0
- package/dist/adapters/cli/pi.d.ts +20 -5
- package/dist/adapters/cli/pi.d.ts.map +1 -1
- package/dist/adapters/cli/pi.js +27 -5
- package/dist/adapters/cli/pi.js.map +1 -1
- package/dist/adapters/cli/read-isolation.d.ts +251 -1
- package/dist/adapters/cli/read-isolation.d.ts.map +1 -1
- package/dist/adapters/cli/read-isolation.js +254 -1
- package/dist/adapters/cli/read-isolation.js.map +1 -1
- package/dist/adapters/cli/registry.d.ts +13 -1
- package/dist/adapters/cli/registry.d.ts.map +1 -1
- package/dist/adapters/cli/registry.js +19 -1
- package/dist/adapters/cli/registry.js.map +1 -1
- package/dist/adapters/cli/runner-input.d.ts +3 -3
- package/dist/adapters/cli/runner-input.d.ts.map +1 -1
- package/dist/adapters/cli/runner-input.js +4 -3
- package/dist/adapters/cli/runner-input.js.map +1 -1
- package/dist/adapters/cli/shared-hints.d.ts +3 -1
- package/dist/adapters/cli/shared-hints.d.ts.map +1 -1
- package/dist/adapters/cli/shared-hints.js +51 -30
- package/dist/adapters/cli/shared-hints.js.map +1 -1
- package/dist/adapters/cli/types.d.ts +33 -4
- package/dist/adapters/cli/types.d.ts.map +1 -1
- package/dist/bot-registry.d.ts +42 -0
- package/dist/bot-registry.d.ts.map +1 -1
- package/dist/bot-registry.js +54 -4
- package/dist/bot-registry.js.map +1 -1
- package/dist/cli/arg-utils.d.ts +5 -0
- package/dist/cli/arg-utils.d.ts.map +1 -1
- package/dist/cli/arg-utils.js +7 -0
- package/dist/cli/arg-utils.js.map +1 -1
- package/dist/cli/bots-list-output.d.ts +130 -2
- package/dist/cli/bots-list-output.d.ts.map +1 -1
- package/dist/cli/bots-list-output.js +173 -27
- package/dist/cli/bots-list-output.js.map +1 -1
- package/dist/cli/daemon-lifecycle-env.d.ts +10 -3
- package/dist/cli/daemon-lifecycle-env.d.ts.map +1 -1
- package/dist/cli/daemon-lifecycle-env.js +38 -11
- package/dist/cli/daemon-lifecycle-env.js.map +1 -1
- package/dist/cli/dashboard-command.d.ts +15 -0
- package/dist/cli/dashboard-command.d.ts.map +1 -1
- package/dist/cli/dashboard-command.js +22 -0
- package/dist/cli/dashboard-command.js.map +1 -1
- package/dist/cli/log-tail.d.ts +54 -0
- package/dist/cli/log-tail.d.ts.map +1 -0
- package/dist/cli/log-tail.js +167 -0
- package/dist/cli/log-tail.js.map +1 -0
- package/dist/cli/pm2-env.d.ts +16 -0
- package/dist/cli/pm2-env.d.ts.map +1 -0
- package/dist/cli/pm2-env.js +63 -0
- package/dist/cli/pm2-env.js.map +1 -0
- package/dist/cli/pm2-fleet-lock.d.ts +26 -0
- package/dist/cli/pm2-fleet-lock.d.ts.map +1 -0
- package/dist/cli/pm2-fleet-lock.js +50 -0
- package/dist/cli/pm2-fleet-lock.js.map +1 -0
- package/dist/cli/pm2-god-retirement.d.ts +59 -0
- package/dist/cli/pm2-god-retirement.d.ts.map +1 -0
- package/dist/cli/pm2-god-retirement.js +95 -0
- package/dist/cli/pm2-god-retirement.js.map +1 -0
- package/dist/cli/session-list-wake.d.ts +41 -0
- package/dist/cli/session-list-wake.d.ts.map +1 -0
- package/dist/cli/session-list-wake.js +102 -0
- package/dist/cli/session-list-wake.js.map +1 -0
- package/dist/cli/workflow.d.ts.map +1 -1
- package/dist/cli/workflow.js +26 -0
- package/dist/cli/workflow.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +941 -118
- package/dist/cli.js.map +1 -1
- package/dist/codex-app-runner.js +261 -49
- package/dist/codex-app-runner.js.map +1 -1
- package/dist/core/cli-runtime-update.d.ts +8 -0
- package/dist/core/cli-runtime-update.d.ts.map +1 -1
- package/dist/core/cli-runtime-update.js +127 -8
- package/dist/core/cli-runtime-update.js.map +1 -1
- package/dist/core/close-residual.d.ts +64 -0
- package/dist/core/close-residual.d.ts.map +1 -0
- package/dist/core/close-residual.js +93 -0
- package/dist/core/close-residual.js.map +1 -0
- package/dist/core/closed-session-card.d.ts.map +1 -1
- package/dist/core/closed-session-card.js +11 -3
- package/dist/core/closed-session-card.js.map +1 -1
- package/dist/core/command-discovery.d.ts.map +1 -1
- package/dist/core/command-discovery.js +4 -1
- package/dist/core/command-discovery.js.map +1 -1
- package/dist/core/command-handler.d.ts.map +1 -1
- package/dist/core/command-handler.js +129 -27
- package/dist/core/command-handler.js.map +1 -1
- package/dist/core/cost-calculator.d.ts +3 -1
- package/dist/core/cost-calculator.d.ts.map +1 -1
- package/dist/core/cost-calculator.js +230 -1
- package/dist/core/cost-calculator.js.map +1 -1
- package/dist/core/daemon-background-close.d.ts +19 -0
- package/dist/core/daemon-background-close.d.ts.map +1 -0
- package/dist/core/daemon-background-close.js +39 -0
- package/dist/core/daemon-background-close.js.map +1 -0
- package/dist/core/dashboard-command/overview.d.ts +4 -0
- package/dist/core/dashboard-command/overview.d.ts.map +1 -1
- package/dist/core/dashboard-command/overview.js +8 -1
- package/dist/core/dashboard-command/overview.js.map +1 -1
- package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
- package/dist/core/dashboard-ipc-server.js +415 -42
- package/dist/core/dashboard-ipc-server.js.map +1 -1
- package/dist/core/dashboard-rows.d.ts +4 -0
- package/dist/core/dashboard-rows.d.ts.map +1 -1
- package/dist/core/dashboard-rows.js +3 -0
- package/dist/core/dashboard-rows.js.map +1 -1
- package/dist/core/dashboard-url.d.ts +37 -0
- package/dist/core/dashboard-url.d.ts.map +1 -1
- package/dist/core/dashboard-url.js +71 -0
- package/dist/core/dashboard-url.js.map +1 -1
- package/dist/core/deferred-schedule-settlement.d.ts +15 -1
- package/dist/core/deferred-schedule-settlement.d.ts.map +1 -1
- package/dist/core/deferred-schedule-settlement.js +4 -1
- package/dist/core/deferred-schedule-settlement.js.map +1 -1
- package/dist/core/device-isolation-daemon.d.ts +91 -1
- package/dist/core/device-isolation-daemon.d.ts.map +1 -1
- package/dist/core/device-isolation-daemon.js +346 -2
- package/dist/core/device-isolation-daemon.js.map +1 -1
- package/dist/core/local-terminal-opener.d.ts.map +1 -1
- package/dist/core/local-terminal-opener.js +5 -1
- package/dist/core/local-terminal-opener.js.map +1 -1
- package/dist/core/loopback-target.d.ts +14 -0
- package/dist/core/loopback-target.d.ts.map +1 -0
- package/dist/core/loopback-target.js +20 -0
- package/dist/core/loopback-target.js.map +1 -0
- package/dist/core/maintenance.d.ts.map +1 -1
- package/dist/core/maintenance.js +16 -2
- package/dist/core/maintenance.js.map +1 -1
- package/dist/core/mojo-containment-command.d.ts +20 -0
- package/dist/core/mojo-containment-command.d.ts.map +1 -0
- package/dist/core/mojo-containment-command.js +266 -0
- package/dist/core/mojo-containment-command.js.map +1 -0
- package/dist/core/mojo-containment.d.ts +575 -0
- package/dist/core/mojo-containment.d.ts.map +1 -0
- package/dist/core/mojo-containment.js +1158 -0
- package/dist/core/mojo-containment.js.map +1 -0
- package/dist/core/mojo-launcher-env-quarantine.d.ts +30 -0
- package/dist/core/mojo-launcher-env-quarantine.d.ts.map +1 -0
- package/dist/core/mojo-launcher-env-quarantine.js +175 -0
- package/dist/core/mojo-launcher-env-quarantine.js.map +1 -0
- package/dist/core/mojo-session-identity.d.ts +3 -0
- package/dist/core/mojo-session-identity.d.ts.map +1 -0
- package/dist/core/mojo-session-identity.js +126 -0
- package/dist/core/mojo-session-identity.js.map +1 -0
- package/dist/core/persistent-backend.d.ts +32 -8
- package/dist/core/persistent-backend.d.ts.map +1 -1
- package/dist/core/persistent-backend.js +55 -17
- package/dist/core/persistent-backend.js.map +1 -1
- package/dist/core/plugins/mcp/gateway.d.ts +14 -1
- package/dist/core/plugins/mcp/gateway.d.ts.map +1 -1
- package/dist/core/plugins/mcp/gateway.js +70 -3
- package/dist/core/plugins/mcp/gateway.js.map +1 -1
- package/dist/core/plugins/mcp/host.d.ts +2 -0
- package/dist/core/plugins/mcp/host.d.ts.map +1 -1
- package/dist/core/plugins/mcp/host.js +2 -0
- package/dist/core/plugins/mcp/host.js.map +1 -1
- package/dist/core/plugins/pm2.d.ts.map +1 -1
- package/dist/core/plugins/pm2.js +16 -3
- package/dist/core/plugins/pm2.js.map +1 -1
- package/dist/core/plugins/service-manager.d.ts +9 -0
- package/dist/core/plugins/service-manager.d.ts.map +1 -1
- package/dist/core/plugins/service-manager.js +33 -16
- package/dist/core/plugins/service-manager.js.map +1 -1
- package/dist/core/preview-port-owner.d.ts +109 -0
- package/dist/core/preview-port-owner.d.ts.map +1 -0
- package/dist/core/preview-port-owner.js +320 -0
- package/dist/core/preview-port-owner.js.map +1 -0
- package/dist/core/remote-cli-ids.d.ts +5 -0
- package/dist/core/remote-cli-ids.d.ts.map +1 -0
- package/dist/core/remote-cli-ids.js +24 -0
- package/dist/core/remote-cli-ids.js.map +1 -0
- package/dist/core/{riff-shutdown-detach.d.ts → remote-shutdown-detach.d.ts} +40 -39
- package/dist/core/remote-shutdown-detach.d.ts.map +1 -0
- package/dist/core/{riff-shutdown-detach.js → remote-shutdown-detach.js} +85 -83
- package/dist/core/remote-shutdown-detach.js.map +1 -0
- package/dist/core/{riff-worker-shutdown-readiness.d.ts → remote-worker-shutdown-readiness.d.ts} +5 -4
- package/dist/core/remote-worker-shutdown-readiness.d.ts.map +1 -0
- package/dist/core/{riff-worker-shutdown-readiness.js → remote-worker-shutdown-readiness.js} +4 -3
- package/dist/core/remote-worker-shutdown-readiness.js.map +1 -0
- package/dist/core/reply-target.d.ts +16 -1
- package/dist/core/reply-target.d.ts.map +1 -1
- package/dist/core/reply-target.js +61 -0
- package/dist/core/reply-target.js.map +1 -1
- package/dist/core/session-group-birth.d.ts +26 -0
- package/dist/core/session-group-birth.d.ts.map +1 -1
- package/dist/core/session-group-birth.js +81 -4
- package/dist/core/session-group-birth.js.map +1 -1
- package/dist/core/session-manager.d.ts +15 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +259 -5
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-model.d.ts +46 -0
- package/dist/core/session-model.d.ts.map +1 -0
- package/dist/core/session-model.js +42 -0
- package/dist/core/session-model.js.map +1 -0
- package/dist/core/session-owner-reminder.d.ts +63 -0
- package/dist/core/session-owner-reminder.d.ts.map +1 -0
- package/dist/core/session-owner-reminder.js +196 -0
- package/dist/core/session-owner-reminder.js.map +1 -0
- package/dist/core/session-preview-registry.d.ts +53 -0
- package/dist/core/session-preview-registry.d.ts.map +1 -0
- package/dist/core/session-preview-registry.js +82 -0
- package/dist/core/session-preview-registry.js.map +1 -0
- package/dist/core/session-preview.d.ts +114 -0
- package/dist/core/session-preview.d.ts.map +1 -0
- package/dist/core/session-preview.js +184 -0
- package/dist/core/session-preview.js.map +1 -0
- package/dist/core/session-rename.d.ts.map +1 -1
- package/dist/core/session-rename.js +5 -3
- package/dist/core/session-rename.js.map +1 -1
- package/dist/core/session-wake-deadline.d.ts +5 -0
- package/dist/core/session-wake-deadline.d.ts.map +1 -0
- package/dist/core/session-wake-deadline.js +13 -0
- package/dist/core/session-wake-deadline.js.map +1 -0
- package/dist/core/shutdown-budgets.d.ts +7 -6
- package/dist/core/shutdown-budgets.d.ts.map +1 -1
- package/dist/core/shutdown-budgets.js +11 -10
- package/dist/core/shutdown-budgets.js.map +1 -1
- package/dist/core/skills/frontmatter.d.ts.map +1 -1
- package/dist/core/skills/frontmatter.js +6 -1
- package/dist/core/skills/frontmatter.js.map +1 -1
- package/dist/core/terminal-control-grant.d.ts +74 -0
- package/dist/core/terminal-control-grant.d.ts.map +1 -0
- package/dist/core/terminal-control-grant.js +183 -0
- package/dist/core/terminal-control-grant.js.map +1 -0
- package/dist/core/terminal-proxy.d.ts.map +1 -1
- package/dist/core/terminal-proxy.js +4 -5
- package/dist/core/terminal-proxy.js.map +1 -1
- package/dist/core/terminal-write-auth.d.ts +4 -11
- package/dist/core/terminal-write-auth.d.ts.map +1 -1
- package/dist/core/terminal-write-auth.js +19 -16
- package/dist/core/terminal-write-auth.js.map +1 -1
- package/dist/core/trigger-session.d.ts.map +1 -1
- package/dist/core/trigger-session.js +36 -29
- package/dist/core/trigger-session.js.map +1 -1
- package/dist/core/types.d.ts +88 -10
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +9 -7
- package/dist/core/types.js.map +1 -1
- package/dist/core/workbench-link.d.ts +81 -0
- package/dist/core/workbench-link.d.ts.map +1 -0
- package/dist/core/workbench-link.js +109 -0
- package/dist/core/workbench-link.js.map +1 -0
- package/dist/core/worker-pool.d.ts +312 -11
- package/dist/core/worker-pool.d.ts.map +1 -1
- package/dist/core/worker-pool.js +2515 -217
- package/dist/core/worker-pool.js.map +1 -1
- package/dist/daemon.d.ts +6 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +447 -116
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/aggregator.d.ts +33 -3
- package/dist/dashboard/aggregator.d.ts.map +1 -1
- package/dist/dashboard/aggregator.js +93 -17
- package/dist/dashboard/aggregator.js.map +1 -1
- package/dist/dashboard/auth-session-connections.d.ts +59 -0
- package/dist/dashboard/auth-session-connections.d.ts.map +1 -0
- package/dist/dashboard/auth-session-connections.js +109 -0
- package/dist/dashboard/auth-session-connections.js.map +1 -0
- package/dist/dashboard/auth.d.ts +99 -1
- package/dist/dashboard/auth.d.ts.map +1 -1
- package/dist/dashboard/auth.js +176 -64
- package/dist/dashboard/auth.js.map +1 -1
- package/dist/dashboard/bot-payload.d.ts +5 -0
- package/dist/dashboard/bot-payload.d.ts.map +1 -1
- package/dist/dashboard/bot-payload.js +4 -0
- package/dist/dashboard/bot-payload.js.map +1 -1
- package/dist/dashboard/control-audit.d.ts +112 -0
- package/dist/dashboard/control-audit.d.ts.map +1 -0
- package/dist/dashboard/control-audit.js +195 -0
- package/dist/dashboard/control-audit.js.map +1 -0
- package/dist/dashboard/control-csrf.d.ts +123 -0
- package/dist/dashboard/control-csrf.d.ts.map +1 -0
- package/dist/dashboard/control-csrf.js +392 -0
- package/dist/dashboard/control-csrf.js.map +1 -0
- package/dist/dashboard/daemon-reconcile.d.ts +26 -0
- package/dist/dashboard/daemon-reconcile.d.ts.map +1 -0
- package/dist/dashboard/daemon-reconcile.js +46 -0
- package/dist/dashboard/daemon-reconcile.js.map +1 -0
- package/dist/dashboard/debug-terminal.d.ts.map +1 -1
- package/dist/dashboard/debug-terminal.js +18 -4
- package/dist/dashboard/debug-terminal.js.map +1 -1
- package/dist/dashboard/events-sse.d.ts +60 -0
- package/dist/dashboard/events-sse.d.ts.map +1 -0
- package/dist/dashboard/events-sse.js +63 -0
- package/dist/dashboard/events-sse.js.map +1 -0
- package/dist/dashboard/h5-auth.d.ts +256 -0
- package/dist/dashboard/h5-auth.d.ts.map +1 -0
- package/dist/dashboard/h5-auth.js +825 -0
- package/dist/dashboard/h5-auth.js.map +1 -0
- package/dist/dashboard/managed-spawn.d.ts +36 -0
- package/dist/dashboard/managed-spawn.d.ts.map +1 -0
- package/dist/dashboard/managed-spawn.js +169 -0
- package/dist/dashboard/managed-spawn.js.map +1 -0
- package/dist/dashboard/preview-content-capability.d.ts +41 -0
- package/dist/dashboard/preview-content-capability.d.ts.map +1 -0
- package/dist/dashboard/preview-content-capability.js +127 -0
- package/dist/dashboard/preview-content-capability.js.map +1 -0
- package/dist/dashboard/preview-contract.d.ts +85 -0
- package/dist/dashboard/preview-contract.d.ts.map +1 -0
- package/dist/dashboard/preview-contract.js +198 -0
- package/dist/dashboard/preview-contract.js.map +1 -0
- package/dist/dashboard/preview-guard-page.d.ts +52 -0
- package/dist/dashboard/preview-guard-page.d.ts.map +1 -0
- package/dist/dashboard/preview-guard-page.js +162 -0
- package/dist/dashboard/preview-guard-page.js.map +1 -0
- package/dist/dashboard/preview-interaction.d.ts +57 -0
- package/dist/dashboard/preview-interaction.d.ts.map +1 -0
- package/dist/dashboard/preview-interaction.js +198 -0
- package/dist/dashboard/preview-interaction.js.map +1 -0
- package/dist/dashboard/preview-proxy.d.ts +113 -0
- package/dist/dashboard/preview-proxy.d.ts.map +1 -0
- package/dist/dashboard/preview-proxy.js +543 -0
- package/dist/dashboard/preview-proxy.js.map +1 -0
- package/dist/dashboard/public-redact.d.ts +23 -0
- package/dist/dashboard/public-redact.d.ts.map +1 -1
- package/dist/dashboard/public-redact.js +90 -21
- package/dist/dashboard/public-redact.js.map +1 -1
- package/dist/dashboard/request-identity.d.ts +77 -0
- package/dist/dashboard/request-identity.d.ts.map +1 -0
- package/dist/dashboard/request-identity.js +72 -0
- package/dist/dashboard/request-identity.js.map +1 -0
- package/dist/dashboard/session-cleanup.d.ts +5 -0
- package/dist/dashboard/session-cleanup.d.ts.map +1 -1
- package/dist/dashboard/session-cleanup.js +4 -0
- package/dist/dashboard/session-cleanup.js.map +1 -1
- package/dist/dashboard/settings-write-applier.d.ts +5 -1
- package/dist/dashboard/settings-write-applier.d.ts.map +1 -1
- package/dist/dashboard/settings-write-applier.js +14 -0
- package/dist/dashboard/settings-write-applier.js.map +1 -1
- package/dist/dashboard/standing-link.d.ts +76 -0
- package/dist/dashboard/standing-link.d.ts.map +1 -0
- package/dist/dashboard/standing-link.js +111 -0
- package/dist/dashboard/standing-link.js.map +1 -0
- package/dist/dashboard/terminal-control.d.ts +105 -0
- package/dist/dashboard/terminal-control.d.ts.map +1 -0
- package/dist/dashboard/terminal-control.js +296 -0
- package/dist/dashboard/terminal-control.js.map +1 -0
- package/dist/dashboard/terminal-front-proxy.d.ts +55 -0
- package/dist/dashboard/terminal-front-proxy.d.ts.map +1 -0
- package/dist/dashboard/terminal-front-proxy.js +397 -0
- package/dist/dashboard/terminal-front-proxy.js.map +1 -0
- package/dist/dashboard/terminal-view-capability.d.ts +97 -0
- package/dist/dashboard/terminal-view-capability.d.ts.map +1 -0
- package/dist/dashboard/terminal-view-capability.js +145 -0
- package/dist/dashboard/terminal-view-capability.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-api.d.ts +59 -0
- package/dist/dashboard/web/agent-workbench-api.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-api.js +227 -0
- package/dist/dashboard/web/agent-workbench-api.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-appearance-menu.d.ts +59 -0
- package/dist/dashboard/web/agent-workbench-appearance-menu.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-appearance-menu.js +195 -0
- package/dist/dashboard/web/agent-workbench-appearance-menu.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-appearance.d.ts +222 -0
- package/dist/dashboard/web/agent-workbench-appearance.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-appearance.js +499 -0
- package/dist/dashboard/web/agent-workbench-appearance.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-capabilities.d.ts +13 -0
- package/dist/dashboard/web/agent-workbench-capabilities.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-capabilities.js +24 -0
- package/dist/dashboard/web/agent-workbench-capabilities.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-chat.d.ts +90 -0
- package/dist/dashboard/web/agent-workbench-chat.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-chat.js +168 -0
- package/dist/dashboard/web/agent-workbench-chat.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-dock-page.d.ts +3 -0
- package/dist/dashboard/web/agent-workbench-dock-page.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-dock-page.js +23 -0
- package/dist/dashboard/web/agent-workbench-dock-page.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-dock-view.d.ts +22 -0
- package/dist/dashboard/web/agent-workbench-dock-view.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-dock-view.js +76 -0
- package/dist/dashboard/web/agent-workbench-dock-view.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-model.d.ts +196 -0
- package/dist/dashboard/web/agent-workbench-model.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-model.js +529 -0
- package/dist/dashboard/web/agent-workbench-model.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-page.d.ts +3 -0
- package/dist/dashboard/web/agent-workbench-page.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-page.js +27 -0
- package/dist/dashboard/web/agent-workbench-page.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-panes.d.ts +49 -0
- package/dist/dashboard/web/agent-workbench-panes.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-panes.js +468 -0
- package/dist/dashboard/web/agent-workbench-panes.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-session-list.d.ts +42 -0
- package/dist/dashboard/web/agent-workbench-session-list.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-session-list.js +353 -0
- package/dist/dashboard/web/agent-workbench-session-list.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-storage.d.ts +49 -0
- package/dist/dashboard/web/agent-workbench-storage.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-storage.js +197 -0
- package/dist/dashboard/web/agent-workbench-storage.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-touch.d.ts +46 -0
- package/dist/dashboard/web/agent-workbench-touch.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-touch.js +96 -0
- package/dist/dashboard/web/agent-workbench-touch.js.map +1 -0
- package/dist/dashboard/web/agent-workbench-view.d.ts +34 -0
- package/dist/dashboard/web/agent-workbench-view.d.ts.map +1 -0
- package/dist/dashboard/web/agent-workbench-view.js +439 -0
- package/dist/dashboard/web/agent-workbench-view.js.map +1 -0
- package/dist/dashboard/web/app.d.ts.map +1 -1
- package/dist/dashboard/web/app.js +63 -2
- package/dist/dashboard/web/app.js.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.d.ts +18 -0
- package/dist/dashboard/web/bot-defaults-page.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.js +362 -36
- package/dist/dashboard/web/bot-defaults-page.js.map +1 -1
- package/dist/dashboard/web/bot-defaults.d.ts +8 -0
- package/dist/dashboard/web/bot-defaults.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults.js.map +1 -1
- package/dist/dashboard/web/control-csrf.d.ts +4 -0
- package/dist/dashboard/web/control-csrf.d.ts.map +1 -0
- package/dist/dashboard/web/control-csrf.js +26 -0
- package/dist/dashboard/web/control-csrf.js.map +1 -0
- package/dist/dashboard/web/dashboard-routes.d.ts.map +1 -1
- package/dist/dashboard/web/dashboard-routes.js +2 -0
- package/dist/dashboard/web/dashboard-routes.js.map +1 -1
- package/dist/dashboard/web/groups-page.d.ts.map +1 -1
- package/dist/dashboard/web/groups-page.js +11 -2
- package/dist/dashboard/web/groups-page.js.map +1 -1
- package/dist/dashboard/web/i18n.d.ts.map +1 -1
- package/dist/dashboard/web/i18n.js +140 -6
- package/dist/dashboard/web/i18n.js.map +1 -1
- package/dist/dashboard/web/overview-page.d.ts.map +1 -1
- package/dist/dashboard/web/overview-page.js +3 -2
- package/dist/dashboard/web/overview-page.js.map +1 -1
- package/dist/dashboard/web/sessions-page.d.ts.map +1 -1
- package/dist/dashboard/web/sessions-page.js +41 -1
- package/dist/dashboard/web/sessions-page.js.map +1 -1
- package/dist/dashboard/web/sessions.d.ts.map +1 -1
- package/dist/dashboard/web/sessions.js +5 -1
- package/dist/dashboard/web/sessions.js.map +1 -1
- package/dist/dashboard/web/settings-page.d.ts +3 -0
- package/dist/dashboard/web/settings-page.d.ts.map +1 -1
- package/dist/dashboard/web/settings-page.js +56 -10
- package/dist/dashboard/web/settings-page.js.map +1 -1
- package/dist/dashboard/web/skills-page.d.ts.map +1 -1
- package/dist/dashboard/web/skills-page.js +4 -2
- package/dist/dashboard/web/skills-page.js.map +1 -1
- package/dist/dashboard/web/store.d.ts +27 -2
- package/dist/dashboard/web/store.d.ts.map +1 -1
- package/dist/dashboard/web/store.js +43 -4
- package/dist/dashboard/web/store.js.map +1 -1
- package/dist/dashboard/web/ui.d.ts +3 -0
- package/dist/dashboard/web/ui.d.ts.map +1 -1
- package/dist/dashboard/web/ui.js +11 -0
- package/dist/dashboard/web/ui.js.map +1 -1
- package/dist/dashboard/web/update-action.d.ts +12 -0
- package/dist/dashboard/web/update-action.d.ts.map +1 -1
- package/dist/dashboard/web/update-action.js +11 -0
- package/dist/dashboard/web/update-action.js.map +1 -1
- package/dist/dashboard/workbench-doctor.d.ts +114 -0
- package/dist/dashboard/workbench-doctor.d.ts.map +1 -0
- package/dist/dashboard/workbench-doctor.js +620 -0
- package/dist/dashboard/workbench-doctor.js.map +1 -0
- package/dist/dashboard/workbench-ticket.d.ts +165 -0
- package/dist/dashboard/workbench-ticket.d.ts.map +1 -0
- package/dist/dashboard/workbench-ticket.js +495 -0
- package/dist/dashboard/workbench-ticket.js.map +1 -0
- package/dist/dashboard-web/app.js +1 -1
- package/dist/dashboard-web/chunks/agent-workbench-dock-page-IKAC5CFL.js +1 -0
- package/dist/dashboard-web/chunks/agent-workbench-page-M53UN5EB.js +1 -0
- package/dist/dashboard-web/chunks/bot-defaults-page-YKE5SDZF.js +10 -0
- package/dist/dashboard-web/chunks/chunk-22WIADUT.js +2 -0
- package/dist/dashboard-web/chunks/chunk-24ONYQMR.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-6O7KXFD2.js → chunk-2W6SCN3M.js} +1 -1
- package/dist/dashboard-web/chunks/chunk-4XNJX6B3.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-Q2MT4VWH.js → chunk-F6KNPF4R.js} +11 -9
- package/dist/dashboard-web/chunks/chunk-FXW3V4JR.js +1 -0
- package/dist/dashboard-web/chunks/chunk-G5ZS2YUS.js +1 -0
- package/dist/dashboard-web/chunks/chunk-KTQ7B6ZR.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-U3ZFSO7E.js → chunk-NACP7BMR.js} +1 -1
- package/dist/dashboard-web/chunks/{connectors-page-2KZO5KSJ.js → connectors-page-VOISXXII.js} +1 -1
- package/dist/dashboard-web/chunks/{feedback-page-CLVTOLLO.js → feedback-page-RN6HRZMS.js} +1 -1
- package/dist/dashboard-web/chunks/groups-page-UQT6DCB7.js +8 -0
- package/dist/dashboard-web/chunks/{insights-page-4RPU2CRU.js → insights-page-HJFDYR5N.js} +3 -3
- package/dist/dashboard-web/chunks/{monitor-room-OTKQ2CXK.js → monitor-room-V7PCP47V.js} +1 -1
- package/dist/dashboard-web/chunks/{monitoring-page-IJPUB6JT.js → monitoring-page-NKEKVQAP.js} +1 -1
- package/dist/dashboard-web/chunks/{office-page-QSR3J44Y.js → office-page-GVJF73XW.js} +1 -1
- package/dist/dashboard-web/chunks/overview-page-KHLV6VTI.js +1 -0
- package/dist/dashboard-web/chunks/{plugin-page-VEGTCEAS.js → plugin-page-J3OF5IY4.js} +1 -1
- package/dist/dashboard-web/chunks/{roles-page-6NWJMOB5.js → roles-page-WQIRSOLZ.js} +1 -1
- package/dist/dashboard-web/chunks/{schedules-page-6I3LNXD4.js → schedules-page-J2DEY2X6.js} +1 -1
- package/dist/dashboard-web/chunks/sessions-page-7BQFEA5P.js +8 -0
- package/dist/dashboard-web/chunks/settings-page-BJEIOFJH.js +2 -0
- package/dist/dashboard-web/chunks/{skills-page-M2Q6L5CB.js → skills-page-HGIFR3IU.js} +2 -2
- package/dist/dashboard-web/chunks/{team-federation-page-7I7FDE3B.js → team-federation-page-MR5ZPL4B.js} +1 -1
- package/dist/dashboard-web/chunks/{v3-page-HQXRL65L.js → v3-page-GBR5JWPE.js} +2 -2
- package/dist/dashboard-web/chunks/{whiteboards-page-LQKC4TAZ.js → whiteboards-page-QAZM4BN3.js} +1 -1
- package/dist/dashboard-web/index.html +8 -1
- package/dist/dashboard-web/style.css +2006 -10
- package/dist/dashboard.js +1017 -264
- package/dist/dashboard.js.map +1 -1
- package/dist/dsh-runner.js +8 -1
- package/dist/dsh-runner.js.map +1 -1
- package/dist/global-config.d.ts +30 -0
- package/dist/global-config.d.ts.map +1 -1
- package/dist/global-config.js +33 -0
- package/dist/global-config.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +46 -27
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +43 -27
- package/dist/i18n/zh.js.map +1 -1
- package/dist/im/lark/card-builder.d.ts +1 -1
- package/dist/im/lark/card-builder.d.ts.map +1 -1
- package/dist/im/lark/card-builder.js +22 -6
- package/dist/im/lark/card-builder.js.map +1 -1
- package/dist/im/lark/card-handler.d.ts.map +1 -1
- package/dist/im/lark/card-handler.js +118 -24
- package/dist/im/lark/card-handler.js.map +1 -1
- package/dist/im/lark/client.d.ts +15 -0
- package/dist/im/lark/client.d.ts.map +1 -1
- package/dist/im/lark/client.js +30 -0
- package/dist/im/lark/client.js.map +1 -1
- package/dist/im/lark/event-dispatcher.d.ts +48 -0
- package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
- package/dist/im/lark/event-dispatcher.js +138 -41
- package/dist/im/lark/event-dispatcher.js.map +1 -1
- package/dist/im/lark/identity-cache.d.ts +14 -6
- package/dist/im/lark/identity-cache.d.ts.map +1 -1
- package/dist/im/lark/identity-cache.js +69 -26
- package/dist/im/lark/identity-cache.js.map +1 -1
- package/dist/im/lark/lark-hosts.d.ts +13 -0
- package/dist/im/lark/lark-hosts.d.ts.map +1 -1
- package/dist/im/lark/lark-hosts.js +16 -0
- package/dist/im/lark/lark-hosts.js.map +1 -1
- package/dist/im/lark/overview-card.d.ts +22 -0
- package/dist/im/lark/overview-card.d.ts.map +1 -1
- package/dist/im/lark/overview-card.js +53 -3
- package/dist/im/lark/overview-card.js.map +1 -1
- package/dist/im/lark/sessions-card.d.ts.map +1 -1
- package/dist/im/lark/sessions-card.js +26 -3
- package/dist/im/lark/sessions-card.js.map +1 -1
- package/dist/im/lark/workflow-slash-command.d.ts +6 -0
- package/dist/im/lark/workflow-slash-command.d.ts.map +1 -1
- package/dist/im/lark/workflow-slash-command.js +7 -0
- package/dist/im/lark/workflow-slash-command.js.map +1 -1
- package/dist/index-daemon.js +27 -4
- package/dist/index-daemon.js.map +1 -1
- package/dist/index-dashboard.d.ts +3 -0
- package/dist/index-dashboard.d.ts.map +1 -0
- package/dist/index-dashboard.js +94 -0
- package/dist/index-dashboard.js.map +1 -0
- package/dist/platform/team-agents-client.d.ts +199 -0
- package/dist/platform/team-agents-client.d.ts.map +1 -0
- package/dist/platform/team-agents-client.js +263 -0
- package/dist/platform/team-agents-client.js.map +1 -0
- package/dist/platform/tunnel-client.d.ts +6 -0
- package/dist/platform/tunnel-client.d.ts.map +1 -1
- package/dist/platform/tunnel-client.js.map +1 -1
- package/dist/services/async-trigger-state.d.ts +7 -3
- package/dist/services/async-trigger-state.d.ts.map +1 -1
- package/dist/services/async-trigger-state.js +28 -0
- package/dist/services/async-trigger-state.js.map +1 -1
- package/dist/services/async-trigger-store.d.ts +13 -4
- package/dist/services/async-trigger-store.d.ts.map +1 -1
- package/dist/services/async-trigger-store.js +55 -8
- package/dist/services/async-trigger-store.js.map +1 -1
- package/dist/services/bot-config-store.d.ts +1 -11
- package/dist/services/bot-config-store.d.ts.map +1 -1
- package/dist/services/bot-config-store.js +27 -3
- package/dist/services/bot-config-store.js.map +1 -1
- package/dist/services/bot-profile-store.d.ts +17 -2
- package/dist/services/bot-profile-store.d.ts.map +1 -1
- package/dist/services/bot-profile-store.js +93 -12
- package/dist/services/bot-profile-store.js.map +1 -1
- package/dist/services/bridge-fallback-gate.d.ts +15 -7
- package/dist/services/bridge-fallback-gate.d.ts.map +1 -1
- package/dist/services/bridge-fallback-gate.js +43 -16
- package/dist/services/bridge-fallback-gate.js.map +1 -1
- package/dist/services/bridge-turn-queue.d.ts +10 -1
- package/dist/services/bridge-turn-queue.d.ts.map +1 -1
- package/dist/services/bridge-turn-queue.js +29 -9
- package/dist/services/bridge-turn-queue.js.map +1 -1
- package/dist/services/claude-transcript.d.ts +19 -0
- package/dist/services/claude-transcript.d.ts.map +1 -1
- package/dist/services/claude-transcript.js +57 -5
- package/dist/services/claude-transcript.js.map +1 -1
- package/dist/services/codex-app-threads.d.ts +2 -0
- package/dist/services/codex-app-threads.d.ts.map +1 -1
- package/dist/services/codex-app-threads.js +1 -1
- package/dist/services/codex-app-threads.js.map +1 -1
- package/dist/services/codex-reasoning-effort.d.ts +8 -0
- package/dist/services/codex-reasoning-effort.d.ts.map +1 -1
- package/dist/services/codex-reasoning-effort.js +24 -0
- package/dist/services/codex-reasoning-effort.js.map +1 -1
- package/dist/services/cursor-resume-policy.d.ts.map +1 -1
- package/dist/services/cursor-resume-policy.js +15 -3
- package/dist/services/cursor-resume-policy.js.map +1 -1
- package/dist/services/open-platform-rename.d.ts.map +1 -1
- package/dist/services/open-platform-rename.js +3 -2
- package/dist/services/open-platform-rename.js.map +1 -1
- package/dist/services/ordinary-turn-recovery.d.ts +76 -0
- package/dist/services/ordinary-turn-recovery.d.ts.map +1 -0
- package/dist/services/ordinary-turn-recovery.js +349 -0
- package/dist/services/ordinary-turn-recovery.js.map +1 -0
- package/dist/services/peer-cross-ref-store.d.ts +8 -0
- package/dist/services/peer-cross-ref-store.d.ts.map +1 -0
- package/dist/services/peer-cross-ref-store.js +95 -0
- package/dist/services/peer-cross-ref-store.js.map +1 -0
- package/dist/services/pi-transcript.d.ts.map +1 -1
- package/dist/services/pi-transcript.js +10 -6
- package/dist/services/pi-transcript.js.map +1 -1
- package/dist/services/resume-fresh-policy.d.ts +17 -0
- package/dist/services/resume-fresh-policy.d.ts.map +1 -0
- package/dist/services/resume-fresh-policy.js +24 -0
- package/dist/services/resume-fresh-policy.js.map +1 -0
- package/dist/services/session-group-title.d.ts +1 -0
- package/dist/services/session-group-title.d.ts.map +1 -1
- package/dist/services/session-group-title.js +16 -1
- package/dist/services/session-group-title.js.map +1 -1
- package/dist/services/session-groups-store.d.ts +30 -0
- package/dist/services/session-groups-store.d.ts.map +1 -1
- package/dist/services/session-groups-store.js +26 -4
- package/dist/services/session-groups-store.js.map +1 -1
- package/dist/services/session-owner-notification.d.ts +9 -0
- package/dist/services/session-owner-notification.d.ts.map +1 -0
- package/dist/services/session-owner-notification.js +10 -0
- package/dist/services/session-owner-notification.js.map +1 -0
- package/dist/services/session-owner-reminder-config-store.d.ts +9 -0
- package/dist/services/session-owner-reminder-config-store.d.ts.map +1 -0
- package/dist/services/session-owner-reminder-config-store.js +24 -0
- package/dist/services/session-owner-reminder-config-store.js.map +1 -0
- package/dist/services/session-owner-reminder-store.d.ts +5 -0
- package/dist/services/session-owner-reminder-store.d.ts.map +1 -0
- package/dist/services/session-owner-reminder-store.js +54 -0
- package/dist/services/session-owner-reminder-store.js.map +1 -0
- package/dist/services/session-store.d.ts +98 -21
- package/dist/services/session-store.d.ts.map +1 -1
- package/dist/services/session-store.js +406 -48
- package/dist/services/session-store.js.map +1 -1
- package/dist/services/structured-bridge-clis.d.ts +15 -2
- package/dist/services/structured-bridge-clis.d.ts.map +1 -1
- package/dist/services/structured-bridge-clis.js +16 -1
- package/dist/services/structured-bridge-clis.js.map +1 -1
- package/dist/services/transcript-resolver.d.ts +1 -1
- package/dist/services/transcript-resolver.d.ts.map +1 -1
- package/dist/services/transcript-resolver.js +6 -1
- package/dist/services/transcript-resolver.js.map +1 -1
- package/dist/setup/bot-config-editor.d.ts.map +1 -1
- package/dist/setup/bot-config-editor.js +7 -2
- package/dist/setup/bot-config-editor.js.map +1 -1
- package/dist/setup/ensure-herdr-integrations.d.ts +13 -0
- package/dist/setup/ensure-herdr-integrations.d.ts.map +1 -1
- package/dist/setup/ensure-herdr-integrations.js +21 -3
- package/dist/setup/ensure-herdr-integrations.js.map +1 -1
- package/dist/setup/open-platform-automation.d.ts +1 -0
- package/dist/setup/open-platform-automation.d.ts.map +1 -1
- package/dist/setup/open-platform-automation.js +107 -7
- package/dist/setup/open-platform-automation.js.map +1 -1
- package/dist/skills/definitions.d.ts +17 -0
- package/dist/skills/definitions.d.ts.map +1 -1
- package/dist/skills/definitions.js +78 -8
- package/dist/skills/definitions.js.map +1 -1
- package/dist/skills/injection-mode.d.ts +24 -3
- package/dist/skills/injection-mode.d.ts.map +1 -1
- package/dist/skills/injection-mode.js +64 -15
- package/dist/skills/injection-mode.js.map +1 -1
- package/dist/skills/installer.d.ts +18 -0
- package/dist/skills/installer.d.ts.map +1 -1
- package/dist/skills/installer.js +45 -1
- package/dist/skills/installer.js.map +1 -1
- package/dist/types.d.ts +222 -10
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/bot-routing.d.ts +1 -1
- package/dist/utils/bot-routing.d.ts.map +1 -1
- package/dist/utils/bot-routing.js.map +1 -1
- package/dist/utils/child-env.d.ts +92 -2
- package/dist/utils/child-env.d.ts.map +1 -1
- package/dist/utils/child-env.js +195 -1
- package/dist/utils/child-env.js.map +1 -1
- package/dist/utils/cli-usage-limit.d.ts +25 -14
- package/dist/utils/cli-usage-limit.d.ts.map +1 -1
- package/dist/utils/cli-usage-limit.js +25 -15
- package/dist/utils/cli-usage-limit.js.map +1 -1
- package/dist/utils/daemon-rejection-guard.d.ts +35 -0
- package/dist/utils/daemon-rejection-guard.d.ts.map +1 -0
- package/dist/utils/daemon-rejection-guard.js +101 -0
- package/dist/utils/daemon-rejection-guard.js.map +1 -0
- package/dist/utils/dashboard-env.d.ts +53 -0
- package/dist/utils/dashboard-env.d.ts.map +1 -0
- package/dist/utils/dashboard-env.js +116 -0
- package/dist/utils/dashboard-env.js.map +1 -0
- package/dist/utils/global-install.d.ts.map +1 -1
- package/dist/utils/global-install.js +61 -5
- package/dist/utils/global-install.js.map +1 -1
- package/dist/utils/install-diagnostics.d.ts +14 -7
- package/dist/utils/install-diagnostics.d.ts.map +1 -1
- package/dist/utils/install-diagnostics.js +20 -11
- package/dist/utils/install-diagnostics.js.map +1 -1
- package/dist/utils/local-dev-update.d.ts +132 -0
- package/dist/utils/local-dev-update.d.ts.map +1 -0
- package/dist/utils/local-dev-update.js +176 -0
- package/dist/utils/local-dev-update.js.map +1 -0
- package/dist/utils/pending-input-queue.d.ts +12 -1
- package/dist/utils/pending-input-queue.d.ts.map +1 -1
- package/dist/utils/pending-input-queue.js.map +1 -1
- package/dist/worker.js +1517 -236
- package/dist/worker.js.map +1 -1
- package/dist/workflows/definition.d.ts +68 -68
- package/dist/workflows/events/payloads.d.ts +14 -14
- package/dist/workflows/events/schema.d.ts +312 -312
- package/dist/workflows/migration/v2-run-archive-schema.d.ts +40 -40
- package/dist/workflows/v3/cli-run.d.ts.map +1 -1
- package/dist/workflows/v3/cli-run.js +7 -0
- package/dist/workflows/v3/cli-run.js.map +1 -1
- package/dist/workflows/v3/goal-cli.d.ts +3 -0
- package/dist/workflows/v3/goal-cli.d.ts.map +1 -1
- package/dist/workflows/v3/goal-cli.js +11 -0
- package/dist/workflows/v3/goal-cli.js.map +1 -1
- package/dist/workflows/v3/run-envelope.d.ts +144 -144
- package/package.json +7 -2
- package/dist/cli/pm2-god-admission.d.ts +0 -8
- package/dist/cli/pm2-god-admission.d.ts.map +0 -1
- package/dist/cli/pm2-god-admission.js +0 -25
- package/dist/cli/pm2-god-admission.js.map +0 -1
- package/dist/core/riff-shutdown-detach.d.ts.map +0 -1
- package/dist/core/riff-shutdown-detach.js.map +0 -1
- package/dist/core/riff-worker-shutdown-readiness.d.ts.map +0 -1
- package/dist/core/riff-worker-shutdown-readiness.js.map +0 -1
- package/dist/dashboard-web/chunks/bot-defaults-page-4RENHE7J.js +0 -10
- package/dist/dashboard-web/chunks/chunk-2WQDS65D.js +0 -1
- package/dist/dashboard-web/chunks/chunk-G5XGBCM6.js +0 -1
- package/dist/dashboard-web/chunks/chunk-WLIVBPJC.js +0 -1
- package/dist/dashboard-web/chunks/groups-page-HLASRTSY.js +0 -8
- package/dist/dashboard-web/chunks/overview-page-6OK63V4V.js +0 -1
- package/dist/dashboard-web/chunks/sessions-page-B2TXGJDO.js +0 -8
- package/dist/dashboard-web/chunks/settings-page-6KJADSC6.js +0 -2
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the mojo (@byted/mojo) backend.
|
|
3
|
+
*
|
|
4
|
+
* Kept in a separate module so `mojo.ts` (the CLI adapter) and
|
|
5
|
+
* `mojo-backend.ts` can share them without a cycle, and so the event shapes —
|
|
6
|
+
* which were established empirically against @byted/mojo 1.0.10 — are
|
|
7
|
+
* documented in one place.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Keys that are INTERNAL plumbing and must never be accepted from user config.
|
|
11
|
+
*
|
|
12
|
+
* Each has a platform-wide source of truth that is frozen onto the session at
|
|
13
|
+
* creation (`Session.agentFrozen`), so a second entry point inside the `mojo`
|
|
14
|
+
* block would let live edits override a frozen identity — e.g. cancelling an
|
|
15
|
+
* orphaned remote session through a binary or wrapper the bot only gained
|
|
16
|
+
* afterwards, reaching the wrong gateway or tenant.
|
|
17
|
+
*
|
|
18
|
+
* bots.json parsing and `/config set mojo` both reject these outright rather
|
|
19
|
+
* than dropping them silently, because a silent drop reads as "applied".
|
|
20
|
+
*/
|
|
21
|
+
export const MOJO_INTERNAL_CONFIG_KEYS = [
|
|
22
|
+
'bin',
|
|
23
|
+
'cwd',
|
|
24
|
+
'model',
|
|
25
|
+
'disableCliBypass',
|
|
26
|
+
'wrapperCli',
|
|
27
|
+
'resumeCliSessionId',
|
|
28
|
+
'extraCliArgs',
|
|
29
|
+
'builtinSkillBlock',
|
|
30
|
+
];
|
|
31
|
+
/** The top-level bot field that owns each internal key, for error messages. */
|
|
32
|
+
export const MOJO_INTERNAL_KEY_OWNER = {
|
|
33
|
+
bin: 'cliPathOverride',
|
|
34
|
+
cwd: 'workingDir',
|
|
35
|
+
model: 'model',
|
|
36
|
+
disableCliBypass: 'disableCliBypass',
|
|
37
|
+
wrapperCli: 'wrapperCli',
|
|
38
|
+
resumeCliSessionId: '(managed by botmux)',
|
|
39
|
+
extraCliArgs: 'CLI_EXTRA_ARGS',
|
|
40
|
+
builtinSkillBlock: 'skillInjection',
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Control-plane fields that decide WHERE and AS WHOM a session executes:
|
|
44
|
+
* cloud-vs-host execution, the API endpoint, the PPE profile, and the
|
|
45
|
+
* workspace/agent it is routed to.
|
|
46
|
+
*
|
|
47
|
+
* These are frozen onto the session at creation (see MojoSessionIdentity). A live
|
|
48
|
+
* bot edit must never retroactively move an existing session between execution
|
|
49
|
+
* modes or tenants — a cold resume would otherwise resume, or a `/close` cancel,
|
|
50
|
+
* against a different endpoint than the one that created the remote session.
|
|
51
|
+
*
|
|
52
|
+
* Credentials (`jwt` / `jwtEnv` / `env`) are deliberately NOT here: they must
|
|
53
|
+
* stay live so a rotated token takes effect, and a plaintext JWT must not be
|
|
54
|
+
* persisted into session state.
|
|
55
|
+
*/
|
|
56
|
+
export const MOJO_IDENTITY_KEYS = [
|
|
57
|
+
'cloud',
|
|
58
|
+
'localDaemon',
|
|
59
|
+
'baseUrl',
|
|
60
|
+
'ppeEnv',
|
|
61
|
+
'workspaceId',
|
|
62
|
+
'agentId',
|
|
63
|
+
];
|
|
64
|
+
/**
|
|
65
|
+
* The child's effective environment, layered lowest → highest precedence:
|
|
66
|
+
*
|
|
67
|
+
* base (worker-supplied session env / process env)
|
|
68
|
+
* → bot `env` (bots.json top-level, already sanitized)
|
|
69
|
+
* → `mojo.env` (bots.json mojo block — highest)
|
|
70
|
+
*
|
|
71
|
+
* This exists so the launcher and the backend cannot disagree. They previously
|
|
72
|
+
* layered independently and the launcher omitted `mojo.env` entirely, so a
|
|
73
|
+
* wrapper binary was resolved against a PATH the child never actually ran with:
|
|
74
|
+
* a same-named program earlier on the bot-level PATH shadowed the one the
|
|
75
|
+
* operator pinned in `mojo.env.PATH`. For a wrapper that carries auth or acts
|
|
76
|
+
* as a gateway, that means executing under the wrong identity.
|
|
77
|
+
*
|
|
78
|
+
* Callers that need control-plane hygiene must still strip
|
|
79
|
+
* MOJO_CONTROL_ENV_KEYS afterwards; this helper only fixes the layering.
|
|
80
|
+
*/
|
|
81
|
+
export function buildEffectiveChildEnv(layers) {
|
|
82
|
+
return {
|
|
83
|
+
...(layers.base ?? {}),
|
|
84
|
+
...(layers.botEnv ?? {}),
|
|
85
|
+
...(layers.mojoEnv ?? {}),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Environment variables that carry the SAME control-plane decisions as the frozen
|
|
90
|
+
* identity keys. They exist because the mojo CLI reads its endpoint/profile from
|
|
91
|
+
* env, which makes `env` a back door around the freeze: a live
|
|
92
|
+
* `env: { AGENT_BASE_URL: ... }` would move an existing session to another tenant
|
|
93
|
+
* even though `baseUrl` itself is frozen.
|
|
94
|
+
*
|
|
95
|
+
* buildEnv() therefore DELETES all of these after merging and re-derives them
|
|
96
|
+
* from the (frozen) config alone. `X_JWT_TOKEN` is deliberately absent: a rotated
|
|
97
|
+
* credential must keep taking effect.
|
|
98
|
+
*/
|
|
99
|
+
export const MOJO_CONTROL_ENV_KEYS = [
|
|
100
|
+
'AGENT_BASE_URL',
|
|
101
|
+
'MOJO_PPE_ENV',
|
|
102
|
+
'AGENT_LOCAL_DAEMON',
|
|
103
|
+
];
|
|
104
|
+
/**
|
|
105
|
+
* The one env var name the mojo CLI actually reads its credential from.
|
|
106
|
+
*
|
|
107
|
+
* `jwtEnv` only tells the DAEMON where to look up the value; buildEnv() always
|
|
108
|
+
* hands the resolved token to the child as this name. That asymmetry is why the
|
|
109
|
+
* remote-execution proof exempts this fixed name and never `jwtEnv` — see
|
|
110
|
+
* mojoUnprovableEnvKeys.
|
|
111
|
+
*/
|
|
112
|
+
export const MOJO_CANONICAL_JWT_ENV_KEY = 'X_JWT_TOKEN';
|
|
113
|
+
/** True only when the remote session is provably gone (cancelled or finished). */
|
|
114
|
+
export function isMojoRemoteGone(outcome) {
|
|
115
|
+
return outcome.kind === 'cancelled' || outcome.kind === 'already_terminal';
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Pick just the control-plane identity out of a (already normalized) config.
|
|
119
|
+
* Absent keys are omitted rather than stored as undefined, so the frozen record
|
|
120
|
+
* stays a faithful snapshot of what was actually configured.
|
|
121
|
+
*/
|
|
122
|
+
export function pickMojoSessionIdentity(cfg) {
|
|
123
|
+
const out = {};
|
|
124
|
+
if (!cfg)
|
|
125
|
+
return out;
|
|
126
|
+
for (const key of MOJO_IDENTITY_KEYS) {
|
|
127
|
+
const value = cfg[key];
|
|
128
|
+
if (value !== undefined)
|
|
129
|
+
out[key] = value;
|
|
130
|
+
}
|
|
131
|
+
return out;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Which control-plane keys differ between the frozen snapshot and live config,
|
|
135
|
+
* for the log line explaining why a session kept its original control plane.
|
|
136
|
+
* Empty array = identical.
|
|
137
|
+
*
|
|
138
|
+
* Returns KEY NAMES ONLY, never values. `baseUrl` is a URL that may legitimately
|
|
139
|
+
* carry userinfo (`https://user:pass@host`) or a signed query
|
|
140
|
+
* (`?sig=<token>`) — the URL validator allows both, because they are valid
|
|
141
|
+
* endpoints — so logging old/new values verbatim would write credentials into the
|
|
142
|
+
* daemon log. The key name is all an operator needs to know what changed; the
|
|
143
|
+
* value is already in their own config.
|
|
144
|
+
*/
|
|
145
|
+
export function diffMojoSessionIdentity(frozen, live) {
|
|
146
|
+
const changes = [];
|
|
147
|
+
for (const key of MOJO_IDENTITY_KEYS) {
|
|
148
|
+
const a = frozen[key];
|
|
149
|
+
const b = live[key];
|
|
150
|
+
if (a === b)
|
|
151
|
+
continue;
|
|
152
|
+
// Booleans are not secrets and the transition is the whole point
|
|
153
|
+
// (cloud→host execution is the dangerous one), so those are shown.
|
|
154
|
+
changes.push(typeof a === 'boolean' || typeof b === 'boolean'
|
|
155
|
+
? `${key}: ${String(a)} → ${String(b)}`
|
|
156
|
+
: key);
|
|
157
|
+
}
|
|
158
|
+
return changes;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Combine the user's `mojo` block with the platform-owned launch identity into
|
|
162
|
+
* the ONE config both the worker (live session) and the daemon (workerless
|
|
163
|
+
* `/close`) run on.
|
|
164
|
+
*
|
|
165
|
+
* Sharing this matters: the daemon cancels an orphaned session WITHOUT a worker,
|
|
166
|
+
* so it never calls spawn() and cannot pick these up from SpawnOpts. Building
|
|
167
|
+
* the config only in the worker meant a bot running fine on a custom binary /
|
|
168
|
+
* per-bot JWT could not be cancelled once its worker died — leaving the remote
|
|
169
|
+
* session burning cloud sandbox time while still holding injected credentials.
|
|
170
|
+
*
|
|
171
|
+
* There is no precedence question to answer here: the launch identity has EXACTLY
|
|
172
|
+
* one source (`generic`, which callers populate from the session's frozen
|
|
173
|
+
* values). Anything the user put under those keys in the `mojo` block is stripped
|
|
174
|
+
* — both config entry points reject them, so reaching this function with one set
|
|
175
|
+
* means a hand-edited file, and honouring it would let a live edit override a
|
|
176
|
+
* frozen session identity.
|
|
177
|
+
*/
|
|
178
|
+
export function buildEffectiveMojoConfig(mojoBlock, generic) {
|
|
179
|
+
const block = { ...(mojoBlock ?? {}) };
|
|
180
|
+
for (const key of MOJO_INTERNAL_CONFIG_KEYS)
|
|
181
|
+
delete block[key];
|
|
182
|
+
const merged = block;
|
|
183
|
+
const bin = emptyToUndefined(generic.cliPathOverride);
|
|
184
|
+
if (bin !== undefined)
|
|
185
|
+
merged.bin = bin;
|
|
186
|
+
if (generic.workingDir !== undefined)
|
|
187
|
+
merged.cwd = generic.workingDir;
|
|
188
|
+
const model = emptyToUndefined(generic.model);
|
|
189
|
+
if (model !== undefined)
|
|
190
|
+
merged.model = model;
|
|
191
|
+
if (generic.disableCliBypass !== undefined) {
|
|
192
|
+
merged.disableCliBypass = generic.disableCliBypass;
|
|
193
|
+
}
|
|
194
|
+
// Per-bot env is the LOWER layer: an explicit `mojo.env` entry wins. This one
|
|
195
|
+
// IS a genuine two-source merge — `mojo.env` has no top-level equivalent.
|
|
196
|
+
if (generic.env || merged.env) {
|
|
197
|
+
merged.env = { ...(generic.env ?? {}), ...(merged.env ?? {}) };
|
|
198
|
+
}
|
|
199
|
+
if (generic.resumeCliSessionId !== undefined) {
|
|
200
|
+
merged.resumeCliSessionId = generic.resumeCliSessionId;
|
|
201
|
+
}
|
|
202
|
+
const wrapperCli = emptyToUndefined(generic.wrapperCli);
|
|
203
|
+
if (wrapperCli !== undefined)
|
|
204
|
+
merged.wrapperCli = wrapperCli;
|
|
205
|
+
if (generic.extraCliArgs && generic.extraCliArgs.length > 0) {
|
|
206
|
+
merged.extraCliArgs = [...generic.extraCliArgs];
|
|
207
|
+
}
|
|
208
|
+
const builtinSkillBlock = emptyToUndefined(generic.builtinSkillBlock);
|
|
209
|
+
if (builtinSkillBlock !== undefined)
|
|
210
|
+
merged.builtinSkillBlock = builtinSkillBlock;
|
|
211
|
+
return merged;
|
|
212
|
+
}
|
|
213
|
+
/** Treat a blank/whitespace-only override as unset. */
|
|
214
|
+
function emptyToUndefined(value) {
|
|
215
|
+
const trimmed = value?.trim();
|
|
216
|
+
return trimmed ? trimmed : undefined;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* CLI flags that carry platform-owned decisions: the control plane, the execution
|
|
220
|
+
* mode, the approval bypass, the model, and the resume lineage.
|
|
221
|
+
*
|
|
222
|
+
* `CLI_EXTRA_ARGS` is appended AFTER the backend's own flags so an operator can
|
|
223
|
+
* override behaviour knobs (that is the documented contract), but with
|
|
224
|
+
* last-value-wins parsing that also let it override these — making env a second
|
|
225
|
+
* entry point for the very identity that is frozen per session. They are rejected
|
|
226
|
+
* instead.
|
|
227
|
+
*
|
|
228
|
+
* Long forms only: the mojo CLI has no short aliases for any of these, and
|
|
229
|
+
* `-r` is covered separately because it is the resume lineage.
|
|
230
|
+
*/
|
|
231
|
+
const MOJO_RESERVED_CLI_FLAGS = new Set([
|
|
232
|
+
'--workspace-id',
|
|
233
|
+
'--agent-id',
|
|
234
|
+
'--cloud',
|
|
235
|
+
'--no-cloud',
|
|
236
|
+
'--model',
|
|
237
|
+
'--yolo',
|
|
238
|
+
'--no-yolo',
|
|
239
|
+
'--resume',
|
|
240
|
+
'-r',
|
|
241
|
+
'--continue',
|
|
242
|
+
'-c',
|
|
243
|
+
'--background',
|
|
244
|
+
'--output-format',
|
|
245
|
+
'--include-partial',
|
|
246
|
+
]);
|
|
247
|
+
/**
|
|
248
|
+
* Reject platform-owned flags in operator-supplied extra args.
|
|
249
|
+
*
|
|
250
|
+
* Handles `--flag value`, `--flag=value` and the bare boolean form, since all
|
|
251
|
+
* three reach the CLI identically. Returns the offending flags, empty when clean.
|
|
252
|
+
*/
|
|
253
|
+
export function findReservedMojoCliFlags(args) {
|
|
254
|
+
const offending = [];
|
|
255
|
+
for (const arg of args) {
|
|
256
|
+
if (!arg.startsWith('-'))
|
|
257
|
+
continue;
|
|
258
|
+
// `--flag=value` and `--flag value` are the same flag to the CLI.
|
|
259
|
+
const flag = arg.includes('=') ? arg.slice(0, arg.indexOf('=')) : arg;
|
|
260
|
+
if (MOJO_RESERVED_CLI_FLAGS.has(flag) && !offending.includes(flag)) {
|
|
261
|
+
offending.push(flag);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return offending;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Can this mojo session prove it executes nothing locally?
|
|
268
|
+
*
|
|
269
|
+
* A launch prefix (wrapperCli) breaks the proof: it runs BEFORE the binary and
|
|
270
|
+
* can rewrite the very environment the decision depends on — `env
|
|
271
|
+
* AGENT_LOCAL_DAEMON=1 mojo` re-enables host execution after buildEnv() set it to
|
|
272
|
+
* 0, and buildEnv cannot defend against it because the prefix is applied later.
|
|
273
|
+
* Inspecting the wrapper string is not enough either: a wrapper may be a script
|
|
274
|
+
* that sets the variable internally.
|
|
275
|
+
*
|
|
276
|
+
* So a wrapper makes the session unprovable, and the local sandbox stays engaged.
|
|
277
|
+
* The launcher's ENV is treated exactly the same way, and for the same reason —
|
|
278
|
+
* see mojoUnprovableEnvKeys.
|
|
279
|
+
*/
|
|
280
|
+
export function mojoUnprovableEnvKeys(
|
|
281
|
+
// `jwtEnv` is accepted (callers spread a whole config in) but deliberately
|
|
282
|
+
// IGNORED — see the exemption note below. Keep it in the signature so those
|
|
283
|
+
// spreads keep type-checking; do NOT read it.
|
|
284
|
+
cfg) {
|
|
285
|
+
const keys = Object.keys(cfg?.env ?? {});
|
|
286
|
+
if (keys.length === 0)
|
|
287
|
+
return [];
|
|
288
|
+
// ALLOWLIST, deliberately: the set of variables that can redirect execution
|
|
289
|
+
// (PATH, NODE_OPTIONS, LD_PRELOAD, LD_LIBRARY_PATH, DYLD_*, …) cannot be
|
|
290
|
+
// enumerated completely — the same reason `env` is not live-patchable, see
|
|
291
|
+
// MOJO_LIVE_PATCH_KEYS below. So anything NOT known-harmless voids the proof.
|
|
292
|
+
//
|
|
293
|
+
// The exemption is the FIXED canonical name and nothing else. It must never be
|
|
294
|
+
// derived from `jwtEnv`, because that made the allowlist operator-extensible:
|
|
295
|
+
// `jwtEnv: 'PATH'` + `env: { PATH: <dir with a fake mojo> }` passed validation
|
|
296
|
+
// (PATH is not a reserved key) and then reported ZERO unprovable keys, so
|
|
297
|
+
// isMojoFullyRemote() returned true — the local sandbox was skipped and device
|
|
298
|
+
// isolation classified the session safe_remote, while resolveBin() picked the
|
|
299
|
+
// binary off that very PATH. Same trick with NODE_OPTIONS / LD_PRELOAD / DYLD_*.
|
|
300
|
+
//
|
|
301
|
+
// Ignoring `jwtEnv` here is not a compatibility break in the child: buildEnv()
|
|
302
|
+
// resolves whatever `jwtEnv` names and hands the VALUE to the CLI as
|
|
303
|
+
// X_JWT_TOKEN regardless (see MojoBackend.buildEnv). `jwtEnv` is a "where to
|
|
304
|
+
// read it from" pointer, never a name the child reads — so it has no business
|
|
305
|
+
// widening a proof about which binary executes.
|
|
306
|
+
return keys.filter(k => k !== MOJO_CANONICAL_JWT_ENV_KEY).sort();
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Single source of truth for the execution mode a mojo config asks for.
|
|
310
|
+
*
|
|
311
|
+
* buildArgs (`--cloud`), buildEnv (`AGENT_LOCAL_DAEMON`) and the spawn audit
|
|
312
|
+
* log MUST all derive from this one function — they were previously three
|
|
313
|
+
* hand-kept copies and drifted twice (review F2: the audit label disagreed
|
|
314
|
+
* with the env for cloud+localDaemon both set, and for non-boolean values
|
|
315
|
+
* smuggled past strictBoolean by an old frozen snapshot).
|
|
316
|
+
*
|
|
317
|
+
* Precedence (review F3): an explicit `localDaemon: true` WINS over
|
|
318
|
+
* `cloud: true` and suppresses the `--cloud` flag entirely — previously both
|
|
319
|
+
* were emitted and the CLI received contradictory instructions. This stays
|
|
320
|
+
* consistent with isMojoFullyRemote(), which already returns false whenever
|
|
321
|
+
* `localDaemon === true`.
|
|
322
|
+
*
|
|
323
|
+
* Strict comparisons on purpose: a non-boolean survivor (e.g. the string
|
|
324
|
+
* "false" in a frozen snapshot written before strictBoolean existed) fails
|
|
325
|
+
* closed into the sandbox fallback rather than enabling host execution.
|
|
326
|
+
*/
|
|
327
|
+
export function deriveMojoExecutionMode(cfg) {
|
|
328
|
+
const cloud = cfg?.cloud;
|
|
329
|
+
const local = cfg?.localDaemon;
|
|
330
|
+
if (local === true) {
|
|
331
|
+
return {
|
|
332
|
+
agentLocalDaemon: '1',
|
|
333
|
+
passCloudFlag: false,
|
|
334
|
+
label: cloud === true
|
|
335
|
+
? 'host (explicit localDaemon; cloud flag suppressed)'
|
|
336
|
+
: 'host (explicit localDaemon)',
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
if (cloud === true) {
|
|
340
|
+
return { agentLocalDaemon: '0', passCloudFlag: true, label: 'cloud-sandbox (--cloud)' };
|
|
341
|
+
}
|
|
342
|
+
if (local === undefined) {
|
|
343
|
+
return { agentLocalDaemon: '1', passCloudFlag: false, label: 'host (default)' };
|
|
344
|
+
}
|
|
345
|
+
return {
|
|
346
|
+
agentLocalDaemon: '0',
|
|
347
|
+
passCloudFlag: false,
|
|
348
|
+
label: local === false
|
|
349
|
+
? 'sandbox-fallback (localDaemon=false, cloud off)'
|
|
350
|
+
: 'sandbox-fallback (invalid localDaemon value)',
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
export function isMojoFullyRemote(cfg) {
|
|
354
|
+
if (cfg?.cloud !== true)
|
|
355
|
+
return false;
|
|
356
|
+
if (cfg.localDaemon === true)
|
|
357
|
+
return false;
|
|
358
|
+
if (cfg.wrapperCli?.trim())
|
|
359
|
+
return false;
|
|
360
|
+
// The launcher ENV is part of the proof, not just the wrapper. resolveBin()
|
|
361
|
+
// picks the binary off the effective child PATH, so `env: { PATH: <dir with a
|
|
362
|
+
// fake mojo> }` runs different code while cloud/localDaemon/wrapperCli all
|
|
363
|
+
// still look clean — and loader hooks (LD_PRELOAD / NODE_OPTIONS / DYLD_*) do
|
|
364
|
+
// the same to the real binary.
|
|
365
|
+
//
|
|
366
|
+
// This is not hypothetical drift: `env` is NOT part of the frozen identity, so
|
|
367
|
+
// sessionMojoConfig() re-merges it from LIVE bot config on every cold refork.
|
|
368
|
+
// A session created as cloud-only could therefore be switched to a local fake
|
|
369
|
+
// after a daemon restart while this function kept returning true — bypassing
|
|
370
|
+
// the local sandbox AND getting classified safe_remote by device isolation.
|
|
371
|
+
if (mojoUnprovableEnvKeys(cfg).length > 0)
|
|
372
|
+
return false;
|
|
373
|
+
return true;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* WHY this config cannot prove it runs nothing locally — one actionable
|
|
377
|
+
* explanation, or `undefined` when the proof holds.
|
|
378
|
+
*
|
|
379
|
+
* Shared deliberately. There are two independent places that refuse a
|
|
380
|
+
* not-provably-remote mojo session — the OPTIONAL sandbox gate
|
|
381
|
+
* (backendSandboxCompatibilityError) and the MANDATORY device-credential
|
|
382
|
+
* isolation path (which rewrites spawnBin, so MojoBackend.spawn refuses the
|
|
383
|
+
* wrapper it never asked for) — and they used to explain it differently. The
|
|
384
|
+
* device path told operators to "run fully remote (cloud on, localDaemon off)"
|
|
385
|
+
* even when cloud was already on and the real blocker was an env key, which is
|
|
386
|
+
* advice that cannot be acted on. Both now read from this one function.
|
|
387
|
+
*
|
|
388
|
+
* Returns key NAMES only, never values: these strings reach logs and chat, and
|
|
389
|
+
* one of the keys is by definition the operator's credential variable.
|
|
390
|
+
*
|
|
391
|
+
* Ordering mirrors isMojoFullyRemote so the two can never disagree about whether
|
|
392
|
+
* there is a problem — only about how much detail to print.
|
|
393
|
+
*/
|
|
394
|
+
export function mojoRemoteProofFailureReason(cfg) {
|
|
395
|
+
if (cfg?.cloud !== true) {
|
|
396
|
+
return 'mojo.cloud is not enabled, so tools run on this host — '
|
|
397
|
+
+ 'set mojo.cloud=true (and leave mojo.localDaemon off).';
|
|
398
|
+
}
|
|
399
|
+
if (cfg.localDaemon === true) {
|
|
400
|
+
return 'mojo.localDaemon is on, which deliberately runs tools on this host — '
|
|
401
|
+
+ 'turn it off to keep execution remote.';
|
|
402
|
+
}
|
|
403
|
+
const wrapper = cfg.wrapperCli?.trim();
|
|
404
|
+
if (wrapper) {
|
|
405
|
+
return 'a launch prefix (wrapperCli) runs before the binary and can rewrite the '
|
|
406
|
+
+ 'environment the decision depends on, so it voids the proof.';
|
|
407
|
+
}
|
|
408
|
+
const unprovable = mojoUnprovableEnvKeys(cfg);
|
|
409
|
+
if (unprovable.length === 0)
|
|
410
|
+
return undefined;
|
|
411
|
+
const listed = unprovable.join(', ');
|
|
412
|
+
const dangerous = 'they can change which binary is executed (PATH) or inject into it '
|
|
413
|
+
+ '(LD_PRELOAD / NODE_OPTIONS / DYLD_*)';
|
|
414
|
+
// A custom `jwtEnv` key is not dangerous in itself, so the generic wording reads
|
|
415
|
+
// as a false accusation against a JWT variable. Explain the real rule and give
|
|
416
|
+
// the two migrations that keep the credential working AND the session provable.
|
|
417
|
+
const credentialKey = cfg.jwtEnv?.trim();
|
|
418
|
+
const hitsCredential = !!credentialKey
|
|
419
|
+
&& credentialKey !== MOJO_CANONICAL_JWT_ENV_KEY
|
|
420
|
+
&& unprovable.includes(credentialKey);
|
|
421
|
+
if (!hitsCredential) {
|
|
422
|
+
return `the bot's \`env\` / \`mojo.env\` sets ${listed} — ${dangerous}.`;
|
|
423
|
+
}
|
|
424
|
+
const rest = unprovable.filter(k => k !== credentialKey);
|
|
425
|
+
const credentialAdvice = `\`${credentialKey}\` holds this bot's credential, but the proof exempts only `
|
|
426
|
+
+ `\`${MOJO_CANONICAL_JWT_ENV_KEY}\` — a config-supplied name cannot be told apart `
|
|
427
|
+
+ 'from one that redirects execution. Set `mojo.jwt` instead, or move that '
|
|
428
|
+
+ "variable to the daemon's own environment (neither is a proof input).";
|
|
429
|
+
if (rest.length === 0) {
|
|
430
|
+
return `the bot's \`env\` / \`mojo.env\` sets ${listed}. ${credentialAdvice}`;
|
|
431
|
+
}
|
|
432
|
+
// Mixed case: migrating the credential alone would NOT make this provable, and a
|
|
433
|
+
// message that implies otherwise sends the operator round the loop a second time.
|
|
434
|
+
return `the bot's \`env\` / \`mojo.env\` sets ${listed}. ${credentialAdvice} `
|
|
435
|
+
+ `Migrating the credential is not sufficient on its own: ${rest.join(', ')} `
|
|
436
|
+
+ `must be removed as well — ${dangerous}.`;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* The ONLY setting that may change on a live session: the JWT.
|
|
440
|
+
*
|
|
441
|
+
* Deliberately this narrow. The previous version allowed an arbitrary `env` patch,
|
|
442
|
+
* which review showed is equivalent to replacing the launcher: with no
|
|
443
|
+
* `cliPathOverride` the backend spawns the bare name `mojo`, so a live
|
|
444
|
+
* `env: { PATH: <dir with a fake mojo> }` executes a different binary on the next
|
|
445
|
+
* turn — and `NODE_OPTIONS` / `LD_PRELOAD` / `DYLD_*` are comparable. Enumerating
|
|
446
|
+
* dangerous variables cannot be made complete, so `env` is not patchable at all.
|
|
447
|
+
*
|
|
448
|
+
* Note this is not about a compromised daemon (which already has more authority
|
|
449
|
+
* than this); the problem was that a completely legitimate, validated patch could
|
|
450
|
+
* change what gets executed.
|
|
451
|
+
*
|
|
452
|
+
* Everything else in `mojo` (env / stream / systemPrompt / idleTimeoutSec) now
|
|
453
|
+
* requires a new session, matching how the control plane already behaves.
|
|
454
|
+
*/
|
|
455
|
+
export const MOJO_LIVE_PATCH_KEYS = ['jwt'];
|
|
456
|
+
/**
|
|
457
|
+
* Build the complete live snapshot for a session.
|
|
458
|
+
*
|
|
459
|
+
* Resolves `jwtEnv` here rather than shipping the env map, so credential rotation
|
|
460
|
+
* works without giving a patch the power to change PATH / loader variables.
|
|
461
|
+
* Always returns an explicit value (`null` when there is no credential), because
|
|
462
|
+
* an omitted field cannot express "cleared".
|
|
463
|
+
*/
|
|
464
|
+
export function pickMojoLivePatch(cfg, sources = {}) {
|
|
465
|
+
const literal = cfg?.jwt?.trim();
|
|
466
|
+
if (literal)
|
|
467
|
+
return { jwt: literal };
|
|
468
|
+
// Resolve the configured key across the same layers buildEnv() would, reading
|
|
469
|
+
// only the VALUE — the map itself is never shipped, which is what stops a
|
|
470
|
+
// patch from rewriting PATH / loader variables.
|
|
471
|
+
const key = cfg?.jwtEnv?.trim() || MOJO_CANONICAL_JWT_ENV_KEY;
|
|
472
|
+
const fromMojoEnv = cfg?.env?.[key]?.trim();
|
|
473
|
+
if (fromMojoEnv)
|
|
474
|
+
return { jwt: fromMojoEnv };
|
|
475
|
+
const fromGeneric = sources.genericEnv?.[key]?.trim();
|
|
476
|
+
if (fromGeneric)
|
|
477
|
+
return { jwt: fromGeneric };
|
|
478
|
+
const fromAmbient = (sources.ambientEnv ?? process.env)[key]?.trim();
|
|
479
|
+
// Always explicit: `null` is the tombstone that lets a deleted credential
|
|
480
|
+
// actually be cleared on the backend.
|
|
481
|
+
return { jwt: fromAmbient ? fromAmbient : null };
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Validate a live patch arriving over IPC.
|
|
485
|
+
*
|
|
486
|
+
* Separate from normalizeMojoConfig on purpose: that one validates the USER's
|
|
487
|
+
* config block, where `jwt` must be a non-empty string. A live patch is a
|
|
488
|
+
* different shape — `null` is a meaningful tombstone — so reusing the config
|
|
489
|
+
* validator rejected every clear request and the backend never saw it.
|
|
490
|
+
*/
|
|
491
|
+
export function normalizeMojoLivePatch(raw) {
|
|
492
|
+
if (raw === undefined || raw === null)
|
|
493
|
+
return { ok: true, value: {} };
|
|
494
|
+
if (typeof raw !== 'object' || Array.isArray(raw)) {
|
|
495
|
+
return { ok: false, errors: ['mojo live patch must be a JSON object'] };
|
|
496
|
+
}
|
|
497
|
+
const errors = [];
|
|
498
|
+
const value = {};
|
|
499
|
+
for (const [key, val] of Object.entries(raw)) {
|
|
500
|
+
if (key !== 'jwt') {
|
|
501
|
+
// Deliberately strict: an `env` patch would be equivalent to replacing
|
|
502
|
+
// the launcher (see MOJO_LIVE_PATCH_KEYS), so anything beyond `jwt` is
|
|
503
|
+
// a bug or a stale payload, not something to accept quietly.
|
|
504
|
+
errors.push(`mojo live patch does not accept "${key}"`);
|
|
505
|
+
continue;
|
|
506
|
+
}
|
|
507
|
+
if (val === undefined)
|
|
508
|
+
continue;
|
|
509
|
+
if (val === null) {
|
|
510
|
+
value.jwt = null;
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
if (typeof val !== 'string' || !val.trim()) {
|
|
514
|
+
errors.push('mojo live patch jwt must be a non-empty string or null');
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
value.jwt = val;
|
|
518
|
+
}
|
|
519
|
+
return errors.length > 0 ? { ok: false, errors } : { ok: true, value };
|
|
520
|
+
}
|
|
521
|
+
/** Field-name → validator, so unknown keys are rejected rather than passed through. */
|
|
522
|
+
const MOJO_FIELD_VALIDATORS = {
|
|
523
|
+
workspaceId: nonEmptyString,
|
|
524
|
+
agentId: nonEmptyString,
|
|
525
|
+
cloud: strictBoolean,
|
|
526
|
+
idleTimeoutSec: positiveInteger,
|
|
527
|
+
stream: strictBoolean,
|
|
528
|
+
systemPrompt: plainString,
|
|
529
|
+
jwt: nonEmptyString,
|
|
530
|
+
jwtEnv: jwtEnvVarName,
|
|
531
|
+
baseUrl: httpUrl,
|
|
532
|
+
localDaemon: strictBoolean,
|
|
533
|
+
ppeEnv: nonEmptyString,
|
|
534
|
+
env: stringMap,
|
|
535
|
+
};
|
|
536
|
+
function strictBoolean(v) {
|
|
537
|
+
// The reason this is strict rather than coerced: `localDaemon: "false"` used
|
|
538
|
+
// to satisfy `!== true` in the sandbox check (bypassing the local sandbox)
|
|
539
|
+
// while being truthy in buildEnv (setting AGENT_LOCAL_DAEMON=1). That
|
|
540
|
+
// combination skips isolation AND enables host execution.
|
|
541
|
+
return typeof v === 'boolean' ? undefined : 'must be a boolean (true/false, not a string)';
|
|
542
|
+
}
|
|
543
|
+
function positiveInteger(v) {
|
|
544
|
+
return typeof v === 'number' && Number.isInteger(v) && v > 0
|
|
545
|
+
? undefined
|
|
546
|
+
: 'must be a positive integer';
|
|
547
|
+
}
|
|
548
|
+
function plainString(v) {
|
|
549
|
+
return typeof v === 'string' ? undefined : 'must be a string';
|
|
550
|
+
}
|
|
551
|
+
function nonEmptyString(v) {
|
|
552
|
+
if (typeof v !== 'string')
|
|
553
|
+
return 'must be a string';
|
|
554
|
+
return v.trim() ? undefined : 'must not be empty';
|
|
555
|
+
}
|
|
556
|
+
function envVarName(v) {
|
|
557
|
+
if (typeof v !== 'string')
|
|
558
|
+
return 'must be a string';
|
|
559
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(v)
|
|
560
|
+
? undefined
|
|
561
|
+
: 'must be a valid environment variable name';
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* `jwtEnv` is not just a name lookup: buildEnv() DELETES `env[jwtEnv]` before
|
|
565
|
+
* re-deriving the credential, so the name doubles as a deletion primitive. A
|
|
566
|
+
* shape-only check let `jwtEnv: "BOTMUX_MOJO_TREE_NONCE"` erase the containment
|
|
567
|
+
* tree nonce — the only signal that survives setsid + reparent — turning the
|
|
568
|
+
* termination proof blind while every gate still reported success. Reserved
|
|
569
|
+
* botmux keys and control-plane keys are therefore rejected by NAME, with the
|
|
570
|
+
* same delegation (not a copied list) the env-map validator uses.
|
|
571
|
+
*/
|
|
572
|
+
function jwtEnvVarName(v) {
|
|
573
|
+
const shape = envVarName(v);
|
|
574
|
+
if (shape)
|
|
575
|
+
return shape;
|
|
576
|
+
const key = v;
|
|
577
|
+
if (isReservedPerBotEnvKey(key)) {
|
|
578
|
+
return `must not name ${key} — botmux owns this variable (session identity, `
|
|
579
|
+
+ 'CLI data root, or bot credential), and buildEnv() would delete it';
|
|
580
|
+
}
|
|
581
|
+
if (MOJO_CONTROL_ENV_KEYS.includes(key)) {
|
|
582
|
+
return `must not name ${key} — it is control-plane state frozen per session`;
|
|
583
|
+
}
|
|
584
|
+
return undefined;
|
|
585
|
+
}
|
|
586
|
+
function httpUrl(v) {
|
|
587
|
+
if (typeof v !== 'string' || !v.trim())
|
|
588
|
+
return 'must be a non-empty string';
|
|
589
|
+
let parsed;
|
|
590
|
+
try {
|
|
591
|
+
parsed = new URL(v);
|
|
592
|
+
}
|
|
593
|
+
catch {
|
|
594
|
+
return 'must be a valid URL';
|
|
595
|
+
}
|
|
596
|
+
return parsed.protocol === 'http:' || parsed.protocol === 'https:'
|
|
597
|
+
? undefined
|
|
598
|
+
: 'must be an http(s) URL';
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Same reserved-key rule the top-level `env` uses. Imported rather than
|
|
602
|
+
* duplicated: per-bot-env.ts is itself a dependency-free leaf, so this keeps
|
|
603
|
+
* mojo-types cheap for the many tests that pull it in.
|
|
604
|
+
*/
|
|
605
|
+
import { isReservedPerBotEnvKey } from '../../core/per-bot-env.js';
|
|
606
|
+
/** Same rule the top-level `env` uses — see per-bot-env.ts. */
|
|
607
|
+
const ENV_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
608
|
+
function stringMap(v) {
|
|
609
|
+
if (!v || typeof v !== 'object' || Array.isArray(v))
|
|
610
|
+
return 'must be a JSON object';
|
|
611
|
+
const control = new Set(MOJO_CONTROL_ENV_KEYS);
|
|
612
|
+
for (const [k, val] of Object.entries(v)) {
|
|
613
|
+
if (typeof val !== 'string')
|
|
614
|
+
return `value for "${k}" must be a string`;
|
|
615
|
+
if (!ENV_KEY_RE.test(k))
|
|
616
|
+
return `"${k}" is not a valid environment variable name`;
|
|
617
|
+
// `mojo.env` is the HIGHEST-precedence layer of the child env, so it must
|
|
618
|
+
// honour the SAME reserved list as the top-level `env`. Otherwise the block
|
|
619
|
+
// botmux already enforces there (session routing, CLI data roots, bot
|
|
620
|
+
// credentials) is bypassed just by moving the key in here — and it then
|
|
621
|
+
// WINS the merge. Delegated to isReservedPerBotEnvKey rather than
|
|
622
|
+
// re-listed, because a second copy of that set would drift.
|
|
623
|
+
if (isReservedPerBotEnvKey(k)) {
|
|
624
|
+
return `must not set ${k} — botmux owns this variable (session identity, `
|
|
625
|
+
+ 'CLI data root, or bot credential); per-bot `env` rejects it too';
|
|
626
|
+
}
|
|
627
|
+
// Reject rather than silently strip: buildEnv() removes these anyway, and
|
|
628
|
+
// an operator who sets AGENT_BASE_URL here would otherwise believe their
|
|
629
|
+
// endpoint took effect while the session kept its frozen one.
|
|
630
|
+
if (control.has(k)) {
|
|
631
|
+
const owner = k === 'AGENT_BASE_URL' ? 'baseUrl'
|
|
632
|
+
: k === 'MOJO_PPE_ENV' ? 'ppeEnv'
|
|
633
|
+
: 'localDaemon';
|
|
634
|
+
return `must not set ${k} — it is control-plane state frozen per session; `
|
|
635
|
+
+ `use the \`${owner}\` setting instead`;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return undefined;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Validate a raw `mojo` block from ANY entry point (bots.json, `/config set
|
|
642
|
+
* mojo`, dashboard, or a defensive check before it reaches the worker).
|
|
643
|
+
*
|
|
644
|
+
* Fails closed on: unknown keys (typos like `cluod` would silently disable the
|
|
645
|
+
* cloud sandbox), internal launch-identity keys (they have top-level owners and
|
|
646
|
+
* are frozen on the session), and wrong types.
|
|
647
|
+
*
|
|
648
|
+
* Type strictness is a SECURITY requirement here, not tidiness — see
|
|
649
|
+
* strictBoolean for the concrete fail-open it prevents.
|
|
650
|
+
*/
|
|
651
|
+
export function normalizeMojoConfig(raw) {
|
|
652
|
+
if (raw === undefined || raw === null)
|
|
653
|
+
return { ok: true, value: {} };
|
|
654
|
+
if (typeof raw !== 'object' || Array.isArray(raw)) {
|
|
655
|
+
return { ok: false, errors: ['mojo must be a JSON object'] };
|
|
656
|
+
}
|
|
657
|
+
const errors = [];
|
|
658
|
+
const value = {};
|
|
659
|
+
const internal = new Set(MOJO_INTERNAL_CONFIG_KEYS);
|
|
660
|
+
for (const [key, val] of Object.entries(raw)) {
|
|
661
|
+
if (internal.has(key)) {
|
|
662
|
+
errors.push(`mojo.${key} is not configurable inside the mojo block — `
|
|
663
|
+
+ `use the top-level \`${MOJO_INTERNAL_KEY_OWNER[key] ?? key}\` instead`);
|
|
664
|
+
continue;
|
|
665
|
+
}
|
|
666
|
+
const validate = MOJO_FIELD_VALIDATORS[key];
|
|
667
|
+
if (!validate) {
|
|
668
|
+
errors.push(`mojo.${key} is not a recognized setting`);
|
|
669
|
+
continue;
|
|
670
|
+
}
|
|
671
|
+
// An explicit `undefined` (from JSON round-trips) means "unset", not invalid.
|
|
672
|
+
if (val === undefined)
|
|
673
|
+
continue;
|
|
674
|
+
const problem = validate(val);
|
|
675
|
+
if (problem)
|
|
676
|
+
errors.push(`mojo.${key} ${problem}`);
|
|
677
|
+
else
|
|
678
|
+
value[key] = val;
|
|
679
|
+
}
|
|
680
|
+
return errors.length > 0 ? { ok: false, errors } : { ok: true, value: value };
|
|
681
|
+
}
|
|
682
|
+
//# sourceMappingURL=mojo-types.js.map
|