botmux 3.15.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/types.d.ts +101 -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 +13 -3
- package/dist/adapters/cli/cursor.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 +6 -4
- package/dist/adapters/cli/pi.d.ts.map +1 -1
- package/dist/adapters/cli/pi.js +6 -4
- 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 +22 -6
- package/dist/adapters/cli/shared-hints.js.map +1 -1
- package/dist/adapters/cli/types.d.ts +29 -4
- package/dist/adapters/cli/types.d.ts.map +1 -1
- package/dist/bot-registry.d.ts +20 -0
- package/dist/bot-registry.d.ts.map +1 -1
- package/dist/bot-registry.js +30 -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 +933 -115
- 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-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 +373 -41
- 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/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 +2494 -209
- 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 +443 -106
- 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 +1 -0
- package/dist/dashboard/bot-payload.d.ts.map +1 -1
- package/dist/dashboard/bot-payload.js +3 -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 +11 -0
- package/dist/dashboard/web/bot-defaults-page.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.js +267 -36
- package/dist/dashboard/web/bot-defaults-page.js.map +1 -1
- package/dist/dashboard/web/bot-defaults.d.ts +6 -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 +132 -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/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-Z7B3E3US.js → chunk-2W6SCN3M.js} +1 -1
- package/dist/dashboard-web/chunks/chunk-4XNJX6B3.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-VMWNR3SV.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-Z7DO42GJ.js → chunk-NACP7BMR.js} +1 -1
- package/dist/dashboard-web/chunks/{connectors-page-CPH6VVFY.js → connectors-page-VOISXXII.js} +1 -1
- package/dist/dashboard-web/chunks/{feedback-page-J2FKQ3LK.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-A2LWTKJD.js → insights-page-HJFDYR5N.js} +3 -3
- package/dist/dashboard-web/chunks/{monitor-room-2YR752E3.js → monitor-room-V7PCP47V.js} +1 -1
- package/dist/dashboard-web/chunks/{monitoring-page-BGYSKZGM.js → monitoring-page-NKEKVQAP.js} +1 -1
- package/dist/dashboard-web/chunks/{office-page-ZZHTEAE4.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-YUC4YLJG.js → roles-page-WQIRSOLZ.js} +1 -1
- package/dist/dashboard-web/chunks/{schedules-page-2L2NKTDJ.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-DQPBBI3T.js → skills-page-HGIFR3IU.js} +1 -1
- package/dist/dashboard-web/chunks/{team-federation-page-LQKLDV4K.js → team-federation-page-MR5ZPL4B.js} +1 -1
- package/dist/dashboard-web/chunks/{v3-page-RVKQIMAP.js → v3-page-GBR5JWPE.js} +2 -2
- package/dist/dashboard-web/chunks/{whiteboards-page-S5K55HRZ.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 +1006 -263
- package/dist/dashboard.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 +31 -1
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +28 -1
- 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 +133 -22
- 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-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/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 +9 -5
- package/dist/services/structured-bridge-clis.d.ts.map +1 -1
- package/dist/services/structured-bridge-clis.js +9 -4
- 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 +221 -10
- package/dist/types.d.ts.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 +1284 -225
- 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 +3 -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-65SMZ4QY.js +0 -10
- package/dist/dashboard-web/chunks/chunk-G5XGBCM6.js +0 -1
- package/dist/dashboard-web/chunks/chunk-IKN6WURK.js +0 -1
- package/dist/dashboard-web/chunks/chunk-WLIVBPJC.js +0 -1
- package/dist/dashboard-web/chunks/groups-page-VDOOLS4M.js +0 -8
- package/dist/dashboard-web/chunks/overview-page-7NYPKQSB.js +0 -1
- package/dist/dashboard-web/chunks/sessions-page-DYZZMKFL.js +0 -8
- package/dist/dashboard-web/chunks/settings-page-LIULUSMH.js +0 -2
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* multi-bot cred file; each bot's lark-cli config holds its app secret in
|
|
20
20
|
* plaintext). See the design doc for the two-layer rationale.
|
|
21
21
|
*/
|
|
22
|
+
import type { SessionProbe } from '../backend/types.js';
|
|
22
23
|
/** Normalize a path for the deny/allow lists: require ABSOLUTE, strip trailing
|
|
23
24
|
* slashes, reject `..` traversal. Returns null for anything unusable so the
|
|
24
25
|
* caller drops it (a silently-ignored relative path is a fail-open trap).
|
|
@@ -153,7 +154,7 @@ export declare function buildSeatbeltProfile(denyPaths: string[], allowPaths?: s
|
|
|
153
154
|
denyWriteRegexes?: string[];
|
|
154
155
|
denyWriteLiterals?: string[];
|
|
155
156
|
}): string;
|
|
156
|
-
export declare const ISOLATION_PANE_MARKER_VERSION =
|
|
157
|
+
export declare const ISOLATION_PANE_MARKER_VERSION = 11;
|
|
157
158
|
export type IsolationCapability = 'credential' | 'read' | 'write';
|
|
158
159
|
export interface IsolationPanePolicyInput {
|
|
159
160
|
readIsolation: boolean;
|
|
@@ -182,6 +183,65 @@ export declare function isolationPaneMarkerContent(bootId: string, capabilities:
|
|
|
182
183
|
policyDigest: string;
|
|
183
184
|
}): string;
|
|
184
185
|
export declare function isolatedPaneOriginChannel(markerContent: string | null | undefined): string | undefined;
|
|
186
|
+
/** Directory holding per-session persistent-pane provenance files. */
|
|
187
|
+
export declare function persistentPaneProvenanceDir(runtimeDataDir: string): string;
|
|
188
|
+
/** ISOLATION marker path (`<sid>.boot`) — stamped for a policy-ON sandboxed pane. */
|
|
189
|
+
export declare function isolationPaneMarkerPath(runtimeDataDir: string, sessionId: string): string;
|
|
190
|
+
/** TOMBSTONE path (`<sid>.policy-off`) — positively proves a live pane was
|
|
191
|
+
* cold-spawned by the current NO-SANDBOX policy (see
|
|
192
|
+
* {@link evaluatePersistentPaneMigration}). Distinct filename so it survives /
|
|
193
|
+
* is cleared independently of the isolation marker. */
|
|
194
|
+
export declare function policyOffTombstonePath(runtimeDataDir: string, sessionId: string): string;
|
|
195
|
+
/** Tombstone body: a self-describing, version-stamped generation proof. Content
|
|
196
|
+
* is diagnostic-bearing but its PRESENCE-as-valid (not equality to any live boot
|
|
197
|
+
* id) is the reattach signal — a legitimate policy-off pane warm-reattaches
|
|
198
|
+
* across daemon restarts, so binding to the current boot id would cold-spawn it
|
|
199
|
+
* every restart. bootId is kept only for diagnostics.
|
|
200
|
+
*
|
|
201
|
+
* `state:'committed'` is REQUIRED for authorization: a proof is written first as
|
|
202
|
+
* PENDING (see {@link provenancePendingContent}) before the pane is created, and
|
|
203
|
+
* only rewritten to committed once the fresh generation is attributably
|
|
204
|
+
* established (see the generational-race guard in worker.ts). A pending record
|
|
205
|
+
* never authorizes a reattach — {@link policyOffTombstoneValid} rejects it. */
|
|
206
|
+
export declare function policyOffTombstoneContent(bootId: string): string;
|
|
207
|
+
/**
|
|
208
|
+
* PENDING provenance body: written to the FINAL proof path BEFORE `backend.spawn()`
|
|
209
|
+
* for a predicted-fresh persistent launch, then rewritten to the committed body
|
|
210
|
+
* only after the fresh generation is attributably established. It carries a random
|
|
211
|
+
* `nonce` (compare-before-replace at commit time, so a superseded generation's
|
|
212
|
+
* deferred callback can't overwrite a newer pending) and, deliberately, NEITHER a
|
|
213
|
+
* committed `state` NOR the structural fields the validators require — so both
|
|
214
|
+
* {@link policyOffTombstoneValid} and {@link isolatedPaneReattachSafe} reject it
|
|
215
|
+
* outright. Its on-disk PRESENCE still drives the conservative guard: a pending
|
|
216
|
+
* file means "this system KNOWS a generation's attribution is incomplete", which
|
|
217
|
+
* is STRONGER than legacy provenance and dominates the migration scope (a live
|
|
218
|
+
* pane with a pending proof is always killed + cold-spawned; see
|
|
219
|
+
* {@link evaluatePersistentPaneMigration}).
|
|
220
|
+
*/
|
|
221
|
+
export declare function provenancePendingContent(nonce: string): string;
|
|
222
|
+
/** Extract the pending nonce for the compare-before-replace at commit time.
|
|
223
|
+
* Returns the nonce string only for a well-formed pending record read from a
|
|
224
|
+
* secure 0600 file; null otherwise (so a garbage/committed/absent file never
|
|
225
|
+
* matches a live launch's nonce). */
|
|
226
|
+
export declare function provenancePendingNonce(content: string | null | undefined): string | null;
|
|
227
|
+
/**
|
|
228
|
+
* Validate a policy-off tombstone body (already securely read from a real 0600
|
|
229
|
+
* file by the caller — see readManagedOriginAuthorityFile). Returns true only for
|
|
230
|
+
* a well-formed CURRENT-version `policyOff:true` record with a non-empty string
|
|
231
|
+
* bootId. bootId is NOT compared to the live daemon boot id (a legit policy-off
|
|
232
|
+
* pane must reattach across restarts); it only has to be present + a string, so a
|
|
233
|
+
* blank/garbage/structurally-wrong tombstone cannot authorize a warm reattach.
|
|
234
|
+
* Mirror of {@link isolatedPaneReattachSafe}'s fail-closed parse discipline, but
|
|
235
|
+
* for the opposite polarity: here VALID authorizes reattach.
|
|
236
|
+
*
|
|
237
|
+
* A `state:'pending'` record is explicitly rejected (an incomplete generation
|
|
238
|
+
* proof must never authorize). `state` is now REQUIRED to equal 'committed': the
|
|
239
|
+
* v11 version bump means every legitimate proof carries it, so a missing/other
|
|
240
|
+
* state is refused (this is what forces a pre-v11 no-state marker — possibly
|
|
241
|
+
* washed onto a late-winner pane under the old pre-spawn-write path — to
|
|
242
|
+
* cold-spawn once instead of being trusted).
|
|
243
|
+
*/
|
|
244
|
+
export declare function policyOffTombstoneValid(content: string | null | undefined): boolean;
|
|
185
245
|
/**
|
|
186
246
|
* Decide whether a live persistent pane (tmux/zellij/herdr) may be reattached for
|
|
187
247
|
* an isolated bot. Isolation is injected at CLI *spawn* time (the Seatbelt
|
|
@@ -203,6 +263,196 @@ export declare function isolatedPaneReattachSafe(markerContent: string | null |
|
|
|
203
263
|
requireOriginChannel?: boolean;
|
|
204
264
|
policyDigest?: string;
|
|
205
265
|
}): boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Persistent-pane (tmux/zellij/herdr/zmx) reattach migration decision — the pure
|
|
268
|
+
* state machine behind the worker's stale-pane guard. Isolation is injected at
|
|
269
|
+
* CLI *spawn* time and lives on the RUNNING process, so a pane that survives a
|
|
270
|
+
* daemon restart keeps whatever confinement it was born with. This function
|
|
271
|
+
* decides, from persisted evidence + the current policy, whether the live pane
|
|
272
|
+
* may be warm-reattached or must be killed + cold-spawned under the new policy.
|
|
273
|
+
*
|
|
274
|
+
* Two provenance files live under `<runtimeDataDir>/read-isolation/`:
|
|
275
|
+
* · `<sid>.boot` — ISOLATION marker: written (best-effort) when a policy-ON
|
|
276
|
+
* (sandboxed) pane is spawned. Its capabilities/policy are
|
|
277
|
+
* version-checked by {@link isolatedPaneReattachSafe}.
|
|
278
|
+
* · `<sid>.policy-off` — TOMBSTONE: written when a policy-OFF (no-sandbox) pane
|
|
279
|
+
* is cold-spawned, positively proving "this generation was
|
|
280
|
+
* created by the current no-sandbox policy".
|
|
281
|
+
*
|
|
282
|
+
* Why a tombstone and not just "no isolation marker": the isolation stamp is
|
|
283
|
+
* BEST-EFFORT (its write is wrapped in try/catch and the spawn proceeds anyway),
|
|
284
|
+
* so "no marker" does NOT prove the live process was never isolated — a sandboxed
|
|
285
|
+
* pane whose stamp write lost a race/perm/disk error looks identical. Under
|
|
286
|
+
* policy-OFF we therefore require POSITIVE, VALIDATED proof (a tombstone that
|
|
287
|
+
* passes secure-read + schema check) to warm-reattach; any other shape (isolation
|
|
288
|
+
* marker present, tombstone missing/invalid, or NEITHER file) is treated as
|
|
289
|
+
* possibly-still-confined and killed. Absence is never trusted as safe.
|
|
290
|
+
*
|
|
291
|
+
* Scope is split by policy direction:
|
|
292
|
+
* · policy ON (file sandbox OR credential-only `credential` cap): the exact-
|
|
293
|
+
* capability/policy check runs on EVERY persistent backend — credential-only
|
|
294
|
+
* panes exist on zellij/herdr/zmx too, so this must NOT be tmux-scoped.
|
|
295
|
+
* · policy OFF migration arm: scoped to `noTransport && isolationCapableBackend`
|
|
296
|
+
* (only no-transport tmux was ever file-force-isolated by the removed rule).
|
|
297
|
+
* An ordinary transport chat / non-tmux backend is never subjected to the
|
|
298
|
+
* tombstone requirement — no false kills — though a DEAD pane's stale
|
|
299
|
+
* provenance is still cleared so it cannot mislead a later decision.
|
|
300
|
+
*
|
|
301
|
+
* Existence flags MUST come from no-follow existence probes (a planted/tampered
|
|
302
|
+
* leaf that fails to parse still counts as present, so it can never be used to
|
|
303
|
+
* force a silent reattach). `policyOffTombstoneValid` is the secure-read result.
|
|
304
|
+
*
|
|
305
|
+
* Pane liveness is TRI-STATE (`paneProbe`: exists | missing | unknown), NOT a
|
|
306
|
+
* boolean. `unknown` (the backend could not answer) is never collapsed into
|
|
307
|
+
* "dead": a still-alive, still-confined pane whose probe is momentarily `unknown`
|
|
308
|
+
* would otherwise have its provenance cleared and be cold-spawned around, silently
|
|
309
|
+
* downgrading confinement. On `unknown` the machine returns
|
|
310
|
+
* `refuse-inconclusive-probe` (fail-closed) whenever anything is at stake — policy
|
|
311
|
+
* ON, in the policy-off migration scope, or ANY provenance on disk — and only
|
|
312
|
+
* `skip`s when a wholly unconcerned session (policy OFF, out of scope, no
|
|
313
|
+
* provenance) sees probe flakiness, so an ordinary chat never fails to start.
|
|
314
|
+
* Only an authoritative `missing` clears stale provenance / cold-spawns.
|
|
315
|
+
*/
|
|
316
|
+
export type PersistentPaneMigrationInput = {
|
|
317
|
+
/** Current-spawn isolation capabilities (empty ⇒ policy OFF this spawn). May be
|
|
318
|
+
* non-empty on ANY persistent backend — `credential` is pushed for enrolled
|
|
319
|
+
* hosts independent of the file sandbox, and its wrapper applies to
|
|
320
|
+
* tmux/zellij/herdr/zmx alike. So the policy-ON capability check below is NOT
|
|
321
|
+
* scoped to tmux. */
|
|
322
|
+
appliedIsolationCapabilities: readonly IsolationCapability[];
|
|
323
|
+
/** Backend can carry a FILE sandbox (tmux). Scopes ONLY the policy-off
|
|
324
|
+
* no-transport migration arm (the removed force-isolation rule only ever
|
|
325
|
+
* file-sandboxed tmux); policy-ON capability checks run on every backend. */
|
|
326
|
+
isolationCapableBackend: boolean;
|
|
327
|
+
/** apiOnly bot OR HTTP-virtual chat — the sessions the old rule force-isolated. */
|
|
328
|
+
noTransport: boolean;
|
|
329
|
+
/** `<sid>.boot` exists on disk (no-follow existence — planted/garbage counts). */
|
|
330
|
+
isolationMarkerPresent: boolean;
|
|
331
|
+
/** `<sid>.policy-off` tombstone exists on disk (no-follow existence). Triggers
|
|
332
|
+
* CLEANUP / conservative decisions; does NOT by itself authorize a reattach. */
|
|
333
|
+
policyOffTombstonePresent: boolean;
|
|
334
|
+
/** The `<sid>.policy-off` tombstone passed secure-read + schema/version
|
|
335
|
+
* validation ({@link policyOffTombstoneValid}). ONLY this authorizes a
|
|
336
|
+
* policy-off warm reattach. */
|
|
337
|
+
policyOffTombstoneValid: boolean;
|
|
338
|
+
/** The persistent pane's liveness probe — TRI-STATE, NOT a boolean. `exists`
|
|
339
|
+
* and `missing` are authoritative; `unknown` means the probe could not answer
|
|
340
|
+
* (flaky/unavailable backend). Collapsing `unknown` into "dead" is the bug this
|
|
341
|
+
* field prevents: a still-alive, still-confined pane whose probe is momentarily
|
|
342
|
+
* `unknown` must never have its provenance cleared nor be cold-spawned around.
|
|
343
|
+
* Only an authoritative `missing` proves the pane is gone. */
|
|
344
|
+
paneProbe: SessionProbe;
|
|
345
|
+
/** A PENDING provenance file (marker OR tombstone whose secure-read body parses
|
|
346
|
+
* as `state:'pending'`) is present on disk. This is STRONGER than legacy
|
|
347
|
+
* provenance and DOMINATES everything below: it means the system explicitly
|
|
348
|
+
* knows a generation's fresh-attribution never completed (crash between
|
|
349
|
+
* pending-write and commit, or a late-flip/collision that was never committed).
|
|
350
|
+
* A pending file is evaluated FIRST, on ALL backends and BOTH policy directions,
|
|
351
|
+
* independent of the tmux migration scope — `exists`→kill, `unknown`→refuse,
|
|
352
|
+
* `missing`→clear. Its no-follow presence also keeps isolationMarkerPresent /
|
|
353
|
+
* policyOffTombstonePresent true (the file exists), but the pending branch runs
|
|
354
|
+
* before any of the committed-provenance logic. */
|
|
355
|
+
pendingProvenancePresent: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Result of {@link isolatedPaneReattachSafe}(marker, current policy) — only
|
|
358
|
+
* meaningful when policy is ON. The caller computes it (it needs the parsed
|
|
359
|
+
* marker + policy digest); passed in to keep this function pure.
|
|
360
|
+
*/
|
|
361
|
+
isolationMarkerReattachSafe: boolean;
|
|
362
|
+
};
|
|
363
|
+
export type PersistentPaneMigrationDecision =
|
|
364
|
+
/** Guard does not apply (nothing to evaluate). */
|
|
365
|
+
{
|
|
366
|
+
action: 'skip';
|
|
367
|
+
}
|
|
368
|
+
/** Live pane matches the current policy → keep the running process. */
|
|
369
|
+
| {
|
|
370
|
+
action: 'reattach';
|
|
371
|
+
}
|
|
372
|
+
/** Live pane's provenance is wrong/unknown → kill, then cold-spawn. Provenance
|
|
373
|
+
* files are cleared ONLY AFTER the kill is confirmed (clearAfterKill). */
|
|
374
|
+
| {
|
|
375
|
+
action: 'kill-then-cold-spawn';
|
|
376
|
+
clearAfterKill: boolean;
|
|
377
|
+
}
|
|
378
|
+
/** No live pane, but stale provenance files linger → clear them (verified) then
|
|
379
|
+
* cold-spawn fresh, so a later restart doesn't misjudge the new pane. */
|
|
380
|
+
| {
|
|
381
|
+
action: 'clear-stale-then-cold-spawn';
|
|
382
|
+
}
|
|
383
|
+
/** The liveness probe is INCONCLUSIVE (`unknown`) in a context where acting would
|
|
384
|
+
* be unsafe — clearing provenance the pane might still own, or cold-spawning
|
|
385
|
+
* around a pane a later `exists` probe would warm-reattach unvalidated. The
|
|
386
|
+
* caller MUST refuse to start rather than guess (fail-closed). Only reached when
|
|
387
|
+
* the guard is security-concerned; an ordinary transport chat with no provenance
|
|
388
|
+
* skips on `unknown` instead (no gratuitous start-failures on probe flakiness). */
|
|
389
|
+
| {
|
|
390
|
+
action: 'refuse-inconclusive-probe';
|
|
391
|
+
};
|
|
392
|
+
export declare function evaluatePersistentPaneMigration(input: PersistentPaneMigrationInput): PersistentPaneMigrationDecision;
|
|
393
|
+
/**
|
|
394
|
+
* Injectable side-effect seam for {@link executePersistentPaneMigration}. The
|
|
395
|
+
* worker supplies real implementations (backend kill, post-kill probe, verified
|
|
396
|
+
* provenance removal, backend re-selection); tests supply mocks to observe the
|
|
397
|
+
* ORDER of effects and the "not called" guarantees on each failure path — the
|
|
398
|
+
* part a pure truth-table cannot cover.
|
|
399
|
+
*/
|
|
400
|
+
export type PersistentPaneMigrationEffects = {
|
|
401
|
+
/** Kill the stale persistent pane. Throw on failure — caller must NOT proceed. */
|
|
402
|
+
killStalePane: () => void;
|
|
403
|
+
/** Probe AFTER the kill; throw (fail-closed) if termination cannot be confirmed. */
|
|
404
|
+
confirmPaneGone: () => void;
|
|
405
|
+
/** Remove BOTH provenance files, each verified-gone; throw if any cannot be
|
|
406
|
+
* removed (fail-closed — a surviving file would mis-drive the next restart). */
|
|
407
|
+
clearProvenanceVerified: () => void;
|
|
408
|
+
/** Re-select the backend so a stale isReattach=true does not target the pane we
|
|
409
|
+
* just destroyed. Only called after a confirmed kill + cleared provenance. */
|
|
410
|
+
reselectBackend: () => void;
|
|
411
|
+
/** Refuse to start the session because the liveness probe was inconclusive
|
|
412
|
+
* (`unknown`) where acting would be unsafe. MUST throw — there is no safe
|
|
413
|
+
* fall-through. */
|
|
414
|
+
refuseInconclusiveProbe: () => never;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Execute a {@link PersistentPaneMigrationDecision} with strict fail-closed
|
|
418
|
+
* ordering. Extracted from the worker so the ordering + "stop on failure"
|
|
419
|
+
* guarantees are unit-testable with injected effects:
|
|
420
|
+
*
|
|
421
|
+
* kill-then-cold-spawn : killStalePane → confirmPaneGone → (clearAfterKill?
|
|
422
|
+
* clearProvenanceVerified) → reselectBackend.
|
|
423
|
+
* Any throw from killStalePane or confirmPaneGone aborts BEFORE clearing
|
|
424
|
+
* provenance (evidence is preserved for the retry) and BEFORE reselect. A
|
|
425
|
+
* throw from clearProvenanceVerified aborts BEFORE reselect (never publish a
|
|
426
|
+
* new generation while a stale proof lingers).
|
|
427
|
+
* clear-stale-then-cold-spawn : clearProvenanceVerified only (no live pane to
|
|
428
|
+
* kill; a throw aborts the spawn).
|
|
429
|
+
* refuse-inconclusive-probe : refuseInconclusiveProbe (always throws — the probe
|
|
430
|
+
* was `unknown` where clearing/cold-spawning is unsafe).
|
|
431
|
+
* NO provenance is touched and NO reselect happens.
|
|
432
|
+
* reattach / skip : no effects.
|
|
433
|
+
*
|
|
434
|
+
* Returns the action taken so the caller can branch (e.g. set warm-reattach).
|
|
435
|
+
*/
|
|
436
|
+
export declare function executePersistentPaneMigration(decision: PersistentPaneMigrationDecision, effects: PersistentPaneMigrationEffects): PersistentPaneMigrationDecision['action'];
|
|
437
|
+
/**
|
|
438
|
+
* Which kill/probe primitive a persistent-pane teardown must use, so it targets
|
|
439
|
+
* the EXACT just-launched pane and never a shared host. Pure so the worker's
|
|
440
|
+
* inline teardown and the migration effects share one behaviorally-tested policy:
|
|
441
|
+
*
|
|
442
|
+
* · 'zmx' — identity-verified kill against the frozen managed PID + owned probe.
|
|
443
|
+
* · 'target' — the recorded PersistentBackendTarget (REQUIRED when one exists):
|
|
444
|
+
* a herdr isolated/MCP agent lives as `{sessionName:'botmux',
|
|
445
|
+
* agentName:<topic>}` on the SHARED host, so a name-only kill of
|
|
446
|
+
* 'botmux' would tear down every bot's agent. The target scopes the
|
|
447
|
+
* kill to this agent.
|
|
448
|
+
* · 'name' — last-resort name-only kill, ONLY when no target was recorded
|
|
449
|
+
* (legacy tmux/zellij that own their whole session by name).
|
|
450
|
+
*/
|
|
451
|
+
export type PersistentTeardownKillKind = 'zmx' | 'target' | 'name';
|
|
452
|
+
export declare function persistentTeardownKillKind(input: {
|
|
453
|
+
backendType: string;
|
|
454
|
+
hasBackendTarget: boolean;
|
|
455
|
+
}): PersistentTeardownKillKind;
|
|
206
456
|
/**
|
|
207
457
|
* True when this process is a CLI the worker spawned for a bot under READ
|
|
208
458
|
* ISOLATION (the sandbox), where `~/.botmux/bots.json` is denied ON PURPOSE (it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-isolation.d.ts","sourceRoot":"","sources":["../../../src/adapters/cli/read-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"read-isolation.d.ts","sourceRoot":"","sources":["../../../src/adapters/cli/read-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOxD;;;8EAG8E;AAC9E,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM/D;AAED;;;;;;;;;;;;;wBAawB;AACxB,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAG9E;AAOD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQrD;AAED;;+EAE+E;AAC/E,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,EAAE,CAOX;AAED;;2DAE2D;AAC3D,eAAO,MAAM,4BAA4B,yEAI/B,CAAC;AACX,eAAO,MAAM,2CAA2C,iCAAiC,CAAC;AAS1F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0B,CAAC,KAAK,EAAE;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,GAAG,0BAA0B,CAI7B;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C"}
|
|
@@ -255,10 +255,18 @@ export function buildSeatbeltProfile(denyPaths, allowPaths = [], finalDenyPaths
|
|
|
255
255
|
// · 9 → 10: credential-only Seatbelt/bwrap panes receive a private rotating
|
|
256
256
|
// managed-origin channel for capability-gated daemon IPC. A warm pane with
|
|
257
257
|
// the v9 marker lacks both the env and the private read carve-out.
|
|
258
|
+
// · 10 → 11: provenance proofs gain a two-phase `state:'pending'|'committed'`
|
|
259
|
+
// lifecycle (generational-race fix). A v10 marker was written UNCONDITIONALLY
|
|
260
|
+
// BEFORE spawn (the vulnerable path) and has NO `state` field, so a late-winner
|
|
261
|
+
// pane may already wear a "valid" v10 marker it never earned. Requiring v11 +
|
|
262
|
+
// strict `state:'committed'` forces every pre-existing no-state marker to
|
|
263
|
+
// cold-spawn ONCE under the new pending→commit contract — closing the INSTALLED
|
|
264
|
+
// BASE risk, not just new spawns. (A legacy no-state marker is now version-
|
|
265
|
+
// rejected, so validators no longer need to tolerate `state===undefined`.)
|
|
258
266
|
// #709 (→8) merged first; this PR (#714) rebased on top and takes 9. Numbers stay
|
|
259
267
|
// strictly monotonic — a pane at any intermediate version must be rejected so it
|
|
260
268
|
// cold-spawns under the current contract rather than bypassing a migration.
|
|
261
|
-
export const ISOLATION_PANE_MARKER_VERSION =
|
|
269
|
+
export const ISOLATION_PANE_MARKER_VERSION = 11;
|
|
262
270
|
const ALL_ISOLATION_CAPABILITIES = [
|
|
263
271
|
'credential',
|
|
264
272
|
'read',
|
|
@@ -316,6 +324,11 @@ export function isolationPaneMarkerContent(bootId, capabilities, policy) {
|
|
|
316
324
|
version: ISOLATION_PANE_MARKER_VERSION,
|
|
317
325
|
bootId,
|
|
318
326
|
capabilities: normalizeIsolationCapabilities(capabilities),
|
|
327
|
+
// Committed = an attributably-fresh generation was established (the proof is
|
|
328
|
+
// written PENDING before the pane exists, then rewritten committed only after
|
|
329
|
+
// spawn confirms a fresh, non-reattached generation). isolatedPaneReattachSafe
|
|
330
|
+
// refuses anything whose state is present-but-not-'committed'.
|
|
331
|
+
state: 'committed',
|
|
319
332
|
...(policy ?? {}),
|
|
320
333
|
});
|
|
321
334
|
}
|
|
@@ -331,6 +344,97 @@ export function isolatedPaneOriginChannel(markerContent) {
|
|
|
331
344
|
return undefined;
|
|
332
345
|
}
|
|
333
346
|
}
|
|
347
|
+
/** Directory holding per-session persistent-pane provenance files. */
|
|
348
|
+
export function persistentPaneProvenanceDir(runtimeDataDir) {
|
|
349
|
+
return `${runtimeDataDir.replace(/\/+$/, '')}/read-isolation`;
|
|
350
|
+
}
|
|
351
|
+
/** ISOLATION marker path (`<sid>.boot`) — stamped for a policy-ON sandboxed pane. */
|
|
352
|
+
export function isolationPaneMarkerPath(runtimeDataDir, sessionId) {
|
|
353
|
+
return `${persistentPaneProvenanceDir(runtimeDataDir)}/${assertSafeAppId(sessionId)}.boot`;
|
|
354
|
+
}
|
|
355
|
+
/** TOMBSTONE path (`<sid>.policy-off`) — positively proves a live pane was
|
|
356
|
+
* cold-spawned by the current NO-SANDBOX policy (see
|
|
357
|
+
* {@link evaluatePersistentPaneMigration}). Distinct filename so it survives /
|
|
358
|
+
* is cleared independently of the isolation marker. */
|
|
359
|
+
export function policyOffTombstonePath(runtimeDataDir, sessionId) {
|
|
360
|
+
return `${persistentPaneProvenanceDir(runtimeDataDir)}/${assertSafeAppId(sessionId)}.policy-off`;
|
|
361
|
+
}
|
|
362
|
+
/** Tombstone body: a self-describing, version-stamped generation proof. Content
|
|
363
|
+
* is diagnostic-bearing but its PRESENCE-as-valid (not equality to any live boot
|
|
364
|
+
* id) is the reattach signal — a legitimate policy-off pane warm-reattaches
|
|
365
|
+
* across daemon restarts, so binding to the current boot id would cold-spawn it
|
|
366
|
+
* every restart. bootId is kept only for diagnostics.
|
|
367
|
+
*
|
|
368
|
+
* `state:'committed'` is REQUIRED for authorization: a proof is written first as
|
|
369
|
+
* PENDING (see {@link provenancePendingContent}) before the pane is created, and
|
|
370
|
+
* only rewritten to committed once the fresh generation is attributably
|
|
371
|
+
* established (see the generational-race guard in worker.ts). A pending record
|
|
372
|
+
* never authorizes a reattach — {@link policyOffTombstoneValid} rejects it. */
|
|
373
|
+
export function policyOffTombstoneContent(bootId) {
|
|
374
|
+
return JSON.stringify({ version: ISOLATION_PANE_MARKER_VERSION, policyOff: true, bootId, state: 'committed' });
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* PENDING provenance body: written to the FINAL proof path BEFORE `backend.spawn()`
|
|
378
|
+
* for a predicted-fresh persistent launch, then rewritten to the committed body
|
|
379
|
+
* only after the fresh generation is attributably established. It carries a random
|
|
380
|
+
* `nonce` (compare-before-replace at commit time, so a superseded generation's
|
|
381
|
+
* deferred callback can't overwrite a newer pending) and, deliberately, NEITHER a
|
|
382
|
+
* committed `state` NOR the structural fields the validators require — so both
|
|
383
|
+
* {@link policyOffTombstoneValid} and {@link isolatedPaneReattachSafe} reject it
|
|
384
|
+
* outright. Its on-disk PRESENCE still drives the conservative guard: a pending
|
|
385
|
+
* file means "this system KNOWS a generation's attribution is incomplete", which
|
|
386
|
+
* is STRONGER than legacy provenance and dominates the migration scope (a live
|
|
387
|
+
* pane with a pending proof is always killed + cold-spawned; see
|
|
388
|
+
* {@link evaluatePersistentPaneMigration}).
|
|
389
|
+
*/
|
|
390
|
+
export function provenancePendingContent(nonce) {
|
|
391
|
+
return JSON.stringify({ version: ISOLATION_PANE_MARKER_VERSION, state: 'pending', nonce });
|
|
392
|
+
}
|
|
393
|
+
/** Extract the pending nonce for the compare-before-replace at commit time.
|
|
394
|
+
* Returns the nonce string only for a well-formed pending record read from a
|
|
395
|
+
* secure 0600 file; null otherwise (so a garbage/committed/absent file never
|
|
396
|
+
* matches a live launch's nonce). */
|
|
397
|
+
export function provenancePendingNonce(content) {
|
|
398
|
+
try {
|
|
399
|
+
const parsed = JSON.parse(content ?? '');
|
|
400
|
+
return parsed.state === 'pending' && typeof parsed.nonce === 'string' && parsed.nonce.length > 0
|
|
401
|
+
? parsed.nonce
|
|
402
|
+
: null;
|
|
403
|
+
}
|
|
404
|
+
catch {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Validate a policy-off tombstone body (already securely read from a real 0600
|
|
410
|
+
* file by the caller — see readManagedOriginAuthorityFile). Returns true only for
|
|
411
|
+
* a well-formed CURRENT-version `policyOff:true` record with a non-empty string
|
|
412
|
+
* bootId. bootId is NOT compared to the live daemon boot id (a legit policy-off
|
|
413
|
+
* pane must reattach across restarts); it only has to be present + a string, so a
|
|
414
|
+
* blank/garbage/structurally-wrong tombstone cannot authorize a warm reattach.
|
|
415
|
+
* Mirror of {@link isolatedPaneReattachSafe}'s fail-closed parse discipline, but
|
|
416
|
+
* for the opposite polarity: here VALID authorizes reattach.
|
|
417
|
+
*
|
|
418
|
+
* A `state:'pending'` record is explicitly rejected (an incomplete generation
|
|
419
|
+
* proof must never authorize). `state` is now REQUIRED to equal 'committed': the
|
|
420
|
+
* v11 version bump means every legitimate proof carries it, so a missing/other
|
|
421
|
+
* state is refused (this is what forces a pre-v11 no-state marker — possibly
|
|
422
|
+
* washed onto a late-winner pane under the old pre-spawn-write path — to
|
|
423
|
+
* cold-spawn once instead of being trusted).
|
|
424
|
+
*/
|
|
425
|
+
export function policyOffTombstoneValid(content) {
|
|
426
|
+
try {
|
|
427
|
+
const parsed = JSON.parse(content ?? '');
|
|
428
|
+
return parsed.version === ISOLATION_PANE_MARKER_VERSION
|
|
429
|
+
&& parsed.policyOff === true
|
|
430
|
+
&& typeof parsed.bootId === 'string'
|
|
431
|
+
&& parsed.bootId.trim().length > 0
|
|
432
|
+
&& parsed.state === 'committed';
|
|
433
|
+
}
|
|
434
|
+
catch {
|
|
435
|
+
return false;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
334
438
|
/**
|
|
335
439
|
* Decide whether a live persistent pane (tmux/zellij/herdr) may be reattached for
|
|
336
440
|
* an isolated bot. Isolation is injected at CLI *spawn* time (the Seatbelt
|
|
@@ -350,6 +454,13 @@ export function isolatedPaneReattachSafe(markerContent, expected = []) {
|
|
|
350
454
|
if (parsed.version !== ISOLATION_PANE_MARKER_VERSION
|
|
351
455
|
|| typeof parsed.bootId !== 'string'
|
|
352
456
|
|| parsed.bootId.trim().length === 0
|
|
457
|
+
// A committed generation proof is REQUIRED. A PENDING record (written before
|
|
458
|
+
// the pane is attributably established) must never authorize; and with the
|
|
459
|
+
// v11 bump every legitimate marker carries state:'committed', so a
|
|
460
|
+
// missing/other state (e.g. a washed pre-v11 no-state marker) is refused →
|
|
461
|
+
// cold-spawn once. (Version check above already rejects pre-v11; this keeps
|
|
462
|
+
// the contract explicit and rejects a same-version pending.)
|
|
463
|
+
|| parsed.state !== 'committed'
|
|
353
464
|
|| !Array.isArray(parsed.capabilities)
|
|
354
465
|
|| parsed.capabilities.some(capability => typeof capability !== 'string'
|
|
355
466
|
|| !ALL_ISOLATION_CAPABILITIES.includes(capability))) {
|
|
@@ -386,6 +497,148 @@ export function isolatedPaneReattachSafe(markerContent, expected = []) {
|
|
|
386
497
|
return false;
|
|
387
498
|
}
|
|
388
499
|
}
|
|
500
|
+
export function evaluatePersistentPaneMigration(input) {
|
|
501
|
+
const { appliedIsolationCapabilities, isolationCapableBackend, noTransport, isolationMarkerPresent, policyOffTombstonePresent, policyOffTombstoneValid: tombstoneValid, paneProbe, pendingProvenancePresent, isolationMarkerReattachSafe, } = input;
|
|
502
|
+
const policyOn = appliedIsolationCapabilities.length > 0;
|
|
503
|
+
const anyProvenance = isolationMarkerPresent || policyOffTombstonePresent;
|
|
504
|
+
const paneLive = paneProbe === 'exists';
|
|
505
|
+
// ── PENDING dominates everything (all backends, both policy directions, ANY
|
|
506
|
+
// scope). A pending provenance file means the system EXPLICITLY knows a
|
|
507
|
+
// generation's fresh-attribution never completed — a crash between the
|
|
508
|
+
// pre-spawn pending-write and the post-spawn commit, or a late-flip/collision
|
|
509
|
+
// that was never committed. This is STRONGER than legacy provenance, so it is
|
|
510
|
+
// judged BEFORE the migration-scope logic (which would otherwise `skip` a
|
|
511
|
+
// live pane out of the tmux scope and warm-reattach an undetermined
|
|
512
|
+
// generation — e.g. an enrolled zellij pane whose credential policy later
|
|
513
|
+
// flipped OFF). Only an authoritative `missing` clears it; `unknown` refuses
|
|
514
|
+
// (never erase evidence of a possibly-live pane); `exists` kills + cold-spawns.
|
|
515
|
+
if (pendingProvenancePresent) {
|
|
516
|
+
if (paneProbe === 'exists')
|
|
517
|
+
return { action: 'kill-then-cold-spawn', clearAfterKill: true };
|
|
518
|
+
if (paneProbe === 'unknown')
|
|
519
|
+
return { action: 'refuse-inconclusive-probe' };
|
|
520
|
+
return { action: 'clear-stale-then-cold-spawn' }; // authoritative missing
|
|
521
|
+
}
|
|
522
|
+
// TRI-STATE liveness. `unknown` is NOT "dead": the backend (tmux/zellij/herdr/
|
|
523
|
+
// zmx) could not answer, so the pane may still be alive AND still confined under
|
|
524
|
+
// its original (possibly obsolete) policy. Acting on `unknown` — clearing
|
|
525
|
+
// provenance the pane might still own, or cold-spawning around it so a later
|
|
526
|
+
// `exists` probe warm-reattaches an unvalidated generation — is exactly the
|
|
527
|
+
// silent-downgrade this guard exists to prevent. We fail closed on `unknown`
|
|
528
|
+
// whenever there is anything at stake (policy ON, in the policy-off migration
|
|
529
|
+
// scope, or ANY provenance on disk); only a truly unconcerned session (policy
|
|
530
|
+
// OFF, out of scope, no provenance) skips on `unknown` so probe flakiness on an
|
|
531
|
+
// ordinary chat never blocks startup. Only an authoritative `missing` is trusted
|
|
532
|
+
// as "the pane is gone".
|
|
533
|
+
const inMigrationScope = noTransport && isolationCapableBackend;
|
|
534
|
+
const guardConcerned = policyOn || inMigrationScope || anyProvenance;
|
|
535
|
+
if (policyOn) {
|
|
536
|
+
// Policy ON (file sandbox OR credential-only): runs on EVERY persistent
|
|
537
|
+
// backend — credential-only panes on zellij/herdr/zmx carry a marker too, so
|
|
538
|
+
// this check must not be scoped to tmux (that would skip their capability
|
|
539
|
+
// validation and warm-reattach a stale/mismatched credential pane).
|
|
540
|
+
if (paneLive) {
|
|
541
|
+
// Only a live pane stamped under the CURRENT policy may reattach; a
|
|
542
|
+
// legacy/mismatched one is killed. (isolationMarkerReattachSafe already
|
|
543
|
+
// fail-closes on a missing/garbage marker.)
|
|
544
|
+
if (isolationMarkerReattachSafe)
|
|
545
|
+
return { action: 'reattach' };
|
|
546
|
+
return { action: 'kill-then-cold-spawn', clearAfterKill: true };
|
|
547
|
+
}
|
|
548
|
+
// Not authoritatively alive. An `unknown` probe under policy ON must not clear
|
|
549
|
+
// a still-confined pane's marker nor cold-spawn around it — fail closed.
|
|
550
|
+
if (paneProbe === 'unknown')
|
|
551
|
+
return { action: 'refuse-inconclusive-probe' };
|
|
552
|
+
// Authoritative `missing`: nothing to reattach. A fresh policy-on spawn
|
|
553
|
+
// re-stamps its marker, but any stale tombstone from a prior policy-off
|
|
554
|
+
// generation must be cleared first, or a later flip back to policy-off could
|
|
555
|
+
// misread it.
|
|
556
|
+
if (anyProvenance)
|
|
557
|
+
return { action: 'clear-stale-then-cold-spawn' };
|
|
558
|
+
return { action: 'skip' };
|
|
559
|
+
}
|
|
560
|
+
// Policy OFF. The file-sandbox migration only ever confined no-transport tmux
|
|
561
|
+
// sessions, so the tombstone requirement is scoped to them; an ordinary chat
|
|
562
|
+
// (or a non-file-sandboxable backend) was never force-isolated and is left
|
|
563
|
+
// untouched — EXCEPT we still clear any stale provenance on a dead pane so a
|
|
564
|
+
// lingering file can't mislead a future decision.
|
|
565
|
+
if (paneLive) {
|
|
566
|
+
if (!inMigrationScope)
|
|
567
|
+
return { action: 'skip' };
|
|
568
|
+
// Warm reattach requires POSITIVE, VALIDATED proof the live generation is a
|
|
569
|
+
// known policy-off pane: a VALID tombstone AND no isolation marker. Any other
|
|
570
|
+
// shape — isolation marker present (dominates), tombstone missing/invalid, or
|
|
571
|
+
// NEITHER file (absence never proves "was never isolated", since the isolation
|
|
572
|
+
// stamp is best-effort) — is treated as possibly-still-confined and killed.
|
|
573
|
+
const provenPolicyOffGeneration = tombstoneValid && !isolationMarkerPresent;
|
|
574
|
+
if (provenPolicyOffGeneration)
|
|
575
|
+
return { action: 'reattach' };
|
|
576
|
+
return { action: 'kill-then-cold-spawn', clearAfterKill: true };
|
|
577
|
+
}
|
|
578
|
+
// Not authoritatively alive under policy OFF.
|
|
579
|
+
if (paneProbe === 'unknown') {
|
|
580
|
+
// Inconclusive. Clearing provenance now could delete the marker/tombstone of a
|
|
581
|
+
// pane that is actually still alive (and, if it predates the 放宽, still
|
|
582
|
+
// confined) — and cold-spawning would let a later `exists` probe warm-reattach
|
|
583
|
+
// that unvalidated pane. Fail closed whenever the guard is concerned; a wholly
|
|
584
|
+
// unconcerned session (out of scope, no provenance) just skips.
|
|
585
|
+
return guardConcerned ? { action: 'refuse-inconclusive-probe' } : { action: 'skip' };
|
|
586
|
+
}
|
|
587
|
+
// Authoritative `missing`. Clear any lingering provenance (verified) before the
|
|
588
|
+
// fresh cold-spawn regardless of scope — a stale file must never survive to
|
|
589
|
+
// mislead a later restart.
|
|
590
|
+
if (anyProvenance)
|
|
591
|
+
return { action: 'clear-stale-then-cold-spawn' };
|
|
592
|
+
return { action: 'skip' };
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Execute a {@link PersistentPaneMigrationDecision} with strict fail-closed
|
|
596
|
+
* ordering. Extracted from the worker so the ordering + "stop on failure"
|
|
597
|
+
* guarantees are unit-testable with injected effects:
|
|
598
|
+
*
|
|
599
|
+
* kill-then-cold-spawn : killStalePane → confirmPaneGone → (clearAfterKill?
|
|
600
|
+
* clearProvenanceVerified) → reselectBackend.
|
|
601
|
+
* Any throw from killStalePane or confirmPaneGone aborts BEFORE clearing
|
|
602
|
+
* provenance (evidence is preserved for the retry) and BEFORE reselect. A
|
|
603
|
+
* throw from clearProvenanceVerified aborts BEFORE reselect (never publish a
|
|
604
|
+
* new generation while a stale proof lingers).
|
|
605
|
+
* clear-stale-then-cold-spawn : clearProvenanceVerified only (no live pane to
|
|
606
|
+
* kill; a throw aborts the spawn).
|
|
607
|
+
* refuse-inconclusive-probe : refuseInconclusiveProbe (always throws — the probe
|
|
608
|
+
* was `unknown` where clearing/cold-spawning is unsafe).
|
|
609
|
+
* NO provenance is touched and NO reselect happens.
|
|
610
|
+
* reattach / skip : no effects.
|
|
611
|
+
*
|
|
612
|
+
* Returns the action taken so the caller can branch (e.g. set warm-reattach).
|
|
613
|
+
*/
|
|
614
|
+
export function executePersistentPaneMigration(decision, effects) {
|
|
615
|
+
switch (decision.action) {
|
|
616
|
+
case 'reattach':
|
|
617
|
+
case 'skip':
|
|
618
|
+
return decision.action;
|
|
619
|
+
case 'refuse-inconclusive-probe':
|
|
620
|
+
effects.refuseInconclusiveProbe(); // always throws — no safe fall-through
|
|
621
|
+
return decision.action;
|
|
622
|
+
case 'clear-stale-then-cold-spawn':
|
|
623
|
+
effects.clearProvenanceVerified();
|
|
624
|
+
return decision.action;
|
|
625
|
+
case 'kill-then-cold-spawn':
|
|
626
|
+
effects.killStalePane(); // throws → stop (evidence preserved)
|
|
627
|
+
effects.confirmPaneGone(); // throws → stop (evidence preserved)
|
|
628
|
+
if (decision.clearAfterKill) {
|
|
629
|
+
effects.clearProvenanceVerified(); // throws → stop before reselect
|
|
630
|
+
}
|
|
631
|
+
effects.reselectBackend();
|
|
632
|
+
return decision.action;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
export function persistentTeardownKillKind(input) {
|
|
636
|
+
if (input.backendType === 'zmx')
|
|
637
|
+
return 'zmx';
|
|
638
|
+
if (input.hasBackendTarget)
|
|
639
|
+
return 'target';
|
|
640
|
+
return 'name';
|
|
641
|
+
}
|
|
389
642
|
function dedupe(xs) {
|
|
390
643
|
return Array.from(new Set(xs));
|
|
391
644
|
}
|