@songsid/agend 2.3.5-alpha.4 → 2.3.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/README.zh-TW.md +0 -2
- package/THIRD_PARTY_NOTICES.md +12 -28
- package/dist/agent-cli-instructions.md +1 -1
- package/dist/agent-credentials.d.ts +24 -0
- package/dist/agent-credentials.js +66 -0
- package/dist/agent-credentials.js.map +1 -0
- package/dist/agent-endpoint.d.ts +4 -6
- package/dist/agent-endpoint.js +15 -12
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/auth-api.d.ts +0 -21
- package/dist/auth-api.js +8 -93
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/session-authorizations.d.ts +30 -4
- package/dist/authority/session-authorizations.js +69 -17
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/authority/web-authority.d.ts +2 -12
- package/dist/authority/web-authority.js +4 -25
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/antigravity.js +3 -1
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +12 -15
- package/dist/backend/claude-code.js +133 -152
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-metadata.d.ts +14 -0
- package/dist/backend/codex-metadata.js +45 -0
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex-package.d.ts +2 -5
- package/dist/backend/codex-package.js +5 -1
- package/dist/backend/codex-package.js.map +1 -1
- package/dist/backend/codex-quota-history.d.ts +7 -0
- package/dist/backend/codex-quota-history.js +72 -0
- package/dist/backend/codex-quota-history.js.map +1 -0
- package/dist/backend/codex-session-lookup.d.ts +6 -0
- package/dist/backend/codex-session-lookup.js +1 -1
- package/dist/backend/codex-session-lookup.js.map +1 -1
- package/dist/backend/codex-speed.d.ts +14 -0
- package/dist/backend/codex-speed.js +35 -0
- package/dist/backend/codex-speed.js.map +1 -0
- package/dist/backend/codex.d.ts +116 -136
- package/dist/backend/codex.js +912 -942
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok-weekly-reset.d.ts +24 -0
- package/dist/backend/grok-weekly-reset.js +95 -0
- package/dist/backend/grok-weekly-reset.js.map +1 -0
- package/dist/backend/grok.d.ts +30 -3
- package/dist/backend/grok.js +301 -76
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +3 -0
- package/dist/backend/kiro.js +50 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.js +5 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +15 -8
- package/dist/backend/types.js +3 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/bundled-tmux-guard.d.ts +21 -0
- package/dist/bundled-tmux-guard.js +96 -0
- package/dist/bundled-tmux-guard.js.map +1 -0
- package/dist/cache-ledger.d.ts +95 -0
- package/dist/cache-ledger.js +276 -4
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-service.d.ts +5 -0
- package/dist/cache-service.js +16 -4
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.js +11 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +51 -0
- package/dist/channel/adapters/telegram.js +235 -17
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +0 -2
- package/dist/channel/mcp-tools.js +3 -3
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +2 -0
- package/dist/classic-channel-manager.d.ts +2 -0
- package/dist/classic-channel-manager.js +5 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +14 -10
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +30 -71
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +3 -17
- package/dist/config.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +10 -0
- package/dist/cross-instance-notice.js +67 -5
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +70 -68
- package/dist/daemon.js +774 -846
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +16 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +26 -16
- package/dist/delivery-consumed-watch.js +31 -26
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +0 -5
- package/dist/delivery-outbox.js +4 -32
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +42 -2
- package/dist/delivery-reconciliation.js +164 -2
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/export-import.d.ts +7 -0
- package/dist/export-import.js +44 -10
- package/dist/export-import.js.map +1 -1
- package/dist/fleet-context.d.ts +4 -2
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +0 -2
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +108 -245
- package/dist/fleet-manager.js +656 -2028
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-instance.d.ts +0 -7
- package/dist/general-instance.js +3 -20
- package/dist/general-instance.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +393 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +1 -0
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +41 -4
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +9 -3
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/instance-config-impact.js +6 -7
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +19 -23
- package/dist/instance-lifecycle.js +216 -383
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instance-topic-delete.d.ts +77 -0
- package/dist/instance-topic-delete.js +123 -0
- package/dist/instance-topic-delete.js.map +1 -0
- package/dist/instructions.d.ts +1 -3
- package/dist/instructions.js +1 -7
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-engine-status.d.ts +11 -0
- package/dist/kiro-engine-status.js +6 -0
- package/dist/kiro-engine-status.js.map +1 -1
- package/dist/locale.js +63 -86
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +28 -0
- package/dist/log-service.js +29 -0
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps.d.ts +4 -3
- package/dist/log-steps.js +32 -7
- package/dist/log-steps.js.map +1 -1
- package/dist/logger.d.ts +16 -2
- package/dist/logger.js +346 -66
- package/dist/logger.js.map +1 -1
- package/dist/login-flows.d.ts +7 -0
- package/dist/login-flows.js +5 -2
- package/dist/login-flows.js.map +1 -1
- package/dist/login-manager.js +25 -4
- package/dist/login-manager.js.map +1 -1
- package/dist/missed-offline.d.ts +25 -0
- package/dist/missed-offline.js +79 -0
- package/dist/missed-offline.js.map +1 -0
- package/dist/muse-usage-relay.d.ts +2 -0
- package/dist/muse-usage-relay.js +5 -3
- package/dist/muse-usage-relay.js.map +1 -1
- package/dist/needs-you-hub.d.ts +6 -3
- package/dist/needs-you-hub.js +31 -9
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +20 -18
- package/dist/needs-you.js +18 -14
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +2 -16
- package/dist/outbound-handlers.js +10 -72
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +0 -38
- package/dist/outbound-schemas.js +5 -14
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-quota-history.d.ts +7 -0
- package/dist/pane-quota-history.js +47 -0
- package/dist/pane-quota-history.js.map +1 -0
- package/dist/platform-general.d.ts +46 -0
- package/dist/platform-general.js +91 -0
- package/dist/platform-general.js.map +1 -0
- package/dist/public-web-gateway.js +0 -9
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +0 -11
- package/dist/public-web-link.js +0 -13
- package/dist/public-web-link.js.map +1 -1
- package/dist/queued-handoffs.d.ts +33 -0
- package/dist/queued-handoffs.js +75 -0
- package/dist/queued-handoffs.js.map +1 -0
- package/dist/quickstart-api.js +5 -9
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +8 -1
- package/dist/quickstart.js +42 -4
- package/dist/quickstart.js.map +1 -1
- package/dist/quota-notice-config.d.ts +22 -0
- package/dist/quota-notice-config.js +41 -0
- package/dist/quota-notice-config.js.map +1 -0
- package/dist/quota-notice.d.ts +7 -0
- package/dist/quota-notice.js +40 -0
- package/dist/quota-notice.js.map +1 -1
- package/dist/reply-buttons-controller.js +10 -6
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-polls.d.ts +2 -2
- package/dist/reply-polls.js +3 -3
- package/dist/reply-polls.js.map +1 -1
- package/dist/scheduler/db.d.ts +2 -1
- package/dist/scheduler/db.js +23 -9
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +9 -0
- package/dist/scheduler/task-board.js +19 -0
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +13 -5
- package/dist/settings-api.js +26 -96
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +0 -1
- package/dist/settings-baseline.js +1 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +23 -28
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +1 -16
- package/dist/settings-confirmation.js +9 -47
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +0 -4
- package/dist/settings-effect.js +1 -58
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +0 -4
- package/dist/settings-http-confirmation.js +3 -31
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +28 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/settings-request-capability.d.ts +0 -2
- package/dist/settings-request-capability.js +0 -4
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/settings-transaction.d.ts +0 -4
- package/dist/settings-transaction.js +0 -9
- package/dist/settings-transaction.js.map +1 -1
- package/dist/setup-form.js +3 -6
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.js +0 -3
- package/dist/setup-i18n.js.map +1 -1
- package/dist/task-board-tool.d.ts +11 -0
- package/dist/task-board-tool.js +44 -0
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +6 -0
- package/dist/task-board-waker.js +4 -0
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tmux-control.d.ts +1 -2
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-manager.d.ts +1 -2
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +5 -2
- package/dist/tool-permissions.js +7 -7
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +2 -0
- package/dist/tool-progress.js +19 -3
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.js +4 -3
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.d.ts +1 -1
- package/dist/transcript-delta-reader.js +1 -1
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/transcript-monitor.d.ts +20 -3
- package/dist/transcript-monitor.js +92 -24
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-sources.d.ts +0 -5
- package/dist/transcript-sources.js +79 -8
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +3 -23
- package/dist/ui/app.html +8 -1
- package/dist/ui/backend-signin.js +21 -36
- package/dist/ui/chat-md-strings.js +9 -0
- package/dist/ui/chat-store.js +2 -13
- package/dist/ui/chat-strings.js +2 -50
- package/dist/ui/chat-thread.js +53 -3
- package/dist/ui/fleet-task-card.js +3 -3
- package/dist/ui/fleet-task-common.js +10 -0
- package/dist/ui/fleet-tasks.js +7 -5
- package/dist/ui/fleet-usage.js +90 -27
- package/dist/ui/panel-chat.js +37 -66
- package/dist/ui/panel-details.js +1 -2
- package/dist/ui/panel-fleet.js +88 -107
- package/dist/ui/panel-needs.js +21 -163
- package/dist/ui/panel-notices.js +4 -3
- package/dist/ui/panel-settings.js +149 -239
- package/dist/ui/preview-panel.js +84 -6
- package/dist/ui/search-dialog.js +3 -2
- package/dist/ui/settings-appearance.js +23 -122
- package/dist/ui/settings-catalog.js +10 -37
- package/dist/ui/settings-codex-copy.js +19 -0
- package/dist/ui/settings-confirm.js +1 -3
- package/dist/ui/settings-dialogs.js +20 -27
- package/dist/ui/settings-guests.js +14 -27
- package/dist/ui/settings-model.js +17 -12
- package/dist/ui/settings-quota-notice.js +100 -0
- package/dist/ui/settings-registry.js +4 -11
- package/dist/ui/settings-strings.js +4 -113
- package/dist/ui/settings-web-authority.js +13 -15
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +1 -1
- package/dist/ui/shared/app-route.js +2 -6
- package/dist/ui/shared/app-shell.js +18 -23
- package/dist/ui/shared/app-store.js +2 -3
- package/dist/ui/shared/app-stream.js +1 -3
- package/dist/ui/shared/app.css +40 -1312
- package/dist/ui/shared/app.js +2 -5
- package/dist/ui/shared/header-tools.js +4 -6
- package/dist/ui/shared/instance-nav.js +7 -34
- package/dist/ui/shared/instance-switch.js +3 -4
- package/dist/ui/shared/loading.css +37 -0
- package/dist/ui/shared/panel-view.js +77 -4
- package/dist/ui/shared/signin.js +6 -39
- package/dist/ui/shared/tokens.css +0 -1
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +10 -30
- package/dist/ui/shared/ui-states.js +14 -3
- package/dist/ui/shared/usage-dialog.js +18 -1
- package/dist/ui/shared/vendor/vendor.json +2 -19
- package/dist/ui/shared/view-history.css +17 -0
- package/dist/ui/shared/view-history.js +438 -0
- package/dist/ui/shared/view-strings.js +16 -8
- package/dist/ui/signin.html +5 -2
- package/dist/unattended-install.d.ts +11 -2
- package/dist/unattended-install.js +39 -5
- package/dist/unattended-install.js.map +1 -1
- package/dist/usage/capacity.d.ts +69 -0
- package/dist/usage/capacity.js +119 -0
- package/dist/usage/capacity.js.map +1 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +3 -0
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +16 -0
- package/dist/usage/profile-timeline.js +58 -0
- package/dist/usage/profile-timeline.js.map +1 -0
- package/dist/usage/providers.d.ts +5 -0
- package/dist/usage/providers.js +5 -0
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +43 -0
- package/dist/usage/quota-history.js +168 -0
- package/dist/usage/quota-history.js.map +1 -0
- package/dist/usage/quota-notices.d.ts +38 -0
- package/dist/usage/quota-notices.js +160 -0
- package/dist/usage/quota-notices.js.map +1 -0
- package/dist/usage/usage-api.d.ts +32 -0
- package/dist/usage/usage-api.js +96 -1
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-report.d.ts +25 -1
- package/dist/usage-report.js +55 -4
- package/dist/usage-report.js.map +1 -1
- package/dist/usage-rollup.d.ts +6 -1
- package/dist/usage-rollup.js +16 -4
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +16 -0
- package/dist/view-api.js +100 -16
- package/dist/view-api.js.map +1 -1
- package/dist/view-history.d.ts +84 -0
- package/dist/view-history.js +116 -0
- package/dist/view-history.js.map +1 -0
- package/dist/web-api.d.ts +6 -38
- package/dist/web-api.js +20 -255
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +2 -19
- package/dist/web-chat-history.js +3 -72
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-only-fleet.d.ts +0 -20
- package/dist/web-only-fleet.js +0 -21
- package/dist/web-only-fleet.js.map +1 -1
- package/dist/web-session-authorization.d.ts +13 -2
- package/dist/web-session-authorization.js +10 -3
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +0 -7
- package/dist/web-session.js +0 -2
- package/dist/web-session.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -4
- package/dist/web-shell-routes.js +2 -7
- package/dist/web-shell-routes.js.map +1 -1
- package/launcher/private-home.cjs +1 -1
- package/package.json +3 -9
- package/dist/agent-runtime-api.d.ts +0 -4
- package/dist/agent-runtime-api.js +0 -59
- package/dist/agent-runtime-api.js.map +0 -1
- package/dist/agent-runtime-change.d.ts +0 -74
- package/dist/agent-runtime-change.js +0 -102
- package/dist/agent-runtime-change.js.map +0 -1
- package/dist/backend/grok-model-cache.d.ts +0 -7
- package/dist/backend/grok-model-cache.js +0 -65
- package/dist/backend/grok-model-cache.js.map +0 -1
- package/dist/backend/native-pane.d.ts +0 -9
- package/dist/backend/native-pane.js +0 -59
- package/dist/backend/native-pane.js.map +0 -1
- package/dist/fleet-windows-runtime.d.ts +0 -97
- package/dist/fleet-windows-runtime.js +0 -449
- package/dist/fleet-windows-runtime.js.map +0 -1
- package/dist/general-binding.d.ts +0 -85
- package/dist/general-binding.js +0 -298
- package/dist/general-binding.js.map +0 -1
- package/dist/general-host-owner.d.ts +0 -8
- package/dist/general-host-owner.js +0 -26
- package/dist/general-host-owner.js.map +0 -1
- package/dist/general-role.d.ts +0 -5
- package/dist/general-role.js +0 -26
- package/dist/general-role.js.map +0 -1
- package/dist/local-pane-endpoint.d.ts +0 -46
- package/dist/local-pane-endpoint.js +0 -189
- package/dist/local-pane-endpoint.js.map +0 -1
- package/dist/local-pane-launcher.d.ts +0 -2
- package/dist/local-pane-launcher.js +0 -38
- package/dist/local-pane-launcher.js.map +0 -1
- package/dist/local-pane-stage.ps1 +0 -101
- package/dist/model-catalog-defaults.d.ts +0 -14
- package/dist/model-catalog-defaults.js +0 -20
- package/dist/model-catalog-defaults.js.map +0 -1
- package/dist/native-agent-admission.d.ts +0 -7
- package/dist/native-agent-admission.js +0 -26
- package/dist/native-agent-admission.js.map +0 -1
- package/dist/native-daemon-client.d.ts +0 -13
- package/dist/native-daemon-client.js +0 -28
- package/dist/native-daemon-client.js.map +0 -1
- package/dist/native-instance-api.d.ts +0 -14
- package/dist/native-instance-api.js +0 -205
- package/dist/native-instance-api.js.map +0 -1
- package/dist/native-instance-input.d.ts +0 -84
- package/dist/native-instance-input.js +0 -54
- package/dist/native-instance-input.js.map +0 -1
- package/dist/native-instance-registry.d.ts +0 -32
- package/dist/native-instance-registry.js +0 -105
- package/dist/native-instance-registry.js.map +0 -1
- package/dist/native-mcp.d.ts +0 -40
- package/dist/native-mcp.js +0 -278
- package/dist/native-mcp.js.map +0 -1
- package/dist/native-model-catalog.d.ts +0 -5
- package/dist/native-model-catalog.js +0 -76
- package/dist/native-model-catalog.js.map +0 -1
- package/dist/native-pane-crash-budget.d.ts +0 -20
- package/dist/native-pane-crash-budget.js +0 -60
- package/dist/native-pane-crash-budget.js.map +0 -1
- package/dist/native-pane-create.d.ts +0 -26
- package/dist/native-pane-create.js +0 -53
- package/dist/native-pane-create.js.map +0 -1
- package/dist/native-pane-lifecycle.d.ts +0 -65
- package/dist/native-pane-lifecycle.js +0 -230
- package/dist/native-pane-lifecycle.js.map +0 -1
- package/dist/native-pane-manager.d.ts +0 -59
- package/dist/native-pane-manager.js +0 -584
- package/dist/native-pane-manager.js.map +0 -1
- package/dist/native-pane-output-log.d.ts +0 -15
- package/dist/native-pane-output-log.js +0 -108
- package/dist/native-pane-output-log.js.map +0 -1
- package/dist/native-pane-reconciliation.d.ts +0 -4
- package/dist/native-pane-reconciliation.js +0 -40
- package/dist/native-pane-reconciliation.js.map +0 -1
- package/dist/native-pane-recovery.d.ts +0 -12
- package/dist/native-pane-recovery.js +0 -10
- package/dist/native-pane-recovery.js.map +0 -1
- package/dist/native-pane-tools.d.ts +0 -2
- package/dist/native-pane-tools.js +0 -14
- package/dist/native-pane-tools.js.map +0 -1
- package/dist/pane-port.d.ts +0 -118
- package/dist/pane-port.js +0 -2
- package/dist/pane-port.js.map +0 -1
- package/dist/runtime-api.d.ts +0 -8
- package/dist/runtime-api.js +0 -171
- package/dist/runtime-api.js.map +0 -1
- package/dist/runtime-assets/@xterm/addon-serialize/LICENSE +0 -21
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.js +0 -2
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.mjs +0 -19
- package/dist/runtime-assets/@xterm/addon-serialize/package.json +0 -29
- package/dist/runtime-assets/@xterm/headless/LICENSE +0 -21
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.js +0 -2
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.mjs +0 -46
- package/dist/runtime-assets/@xterm/headless/package.json +0 -29
- package/dist/runtime-assets/node-pty/CONPTY-LICENSE +0 -21
- package/dist/runtime-assets/node-pty/CONPTY-NOTICE.md +0 -503
- package/dist/runtime-assets/node-pty/LICENSE +0 -69
- package/dist/runtime-assets/node-pty/lib/conpty_console_list_agent.js +0 -16
- package/dist/runtime-assets/node-pty/lib/eventEmitter2.js +0 -47
- package/dist/runtime-assets/node-pty/lib/index.js +0 -52
- package/dist/runtime-assets/node-pty/lib/interfaces.js +0 -7
- package/dist/runtime-assets/node-pty/lib/shared/conout.js +0 -11
- package/dist/runtime-assets/node-pty/lib/terminal.js +0 -190
- package/dist/runtime-assets/node-pty/lib/types.js +0 -7
- package/dist/runtime-assets/node-pty/lib/unixTerminal.js +0 -346
- package/dist/runtime-assets/node-pty/lib/utils.js +0 -39
- package/dist/runtime-assets/node-pty/lib/windowsConoutConnection.js +0 -125
- package/dist/runtime-assets/node-pty/lib/windowsPtyAgent.js +0 -320
- package/dist/runtime-assets/node-pty/lib/windowsTerminal.js +0 -199
- package/dist/runtime-assets/node-pty/lib/worker/conoutSocketWorker.js +0 -22
- package/dist/runtime-assets/node-pty/package.json +0 -64
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/dist/runtime-build-info.d.ts +0 -9
- package/dist/runtime-build-info.js +0 -57
- package/dist/runtime-build-info.js.map +0 -1
- package/dist/runtime-bundle.d.ts +0 -19
- package/dist/runtime-bundle.js +0 -156
- package/dist/runtime-bundle.js.map +0 -1
- package/dist/runtime-cli.d.ts +0 -7
- package/dist/runtime-cli.js +0 -152
- package/dist/runtime-cli.js.map +0 -1
- package/dist/runtime-client-store.d.ts +0 -68
- package/dist/runtime-client-store.js +0 -344
- package/dist/runtime-client-store.js.map +0 -1
- package/dist/runtime-client.d.ts +0 -112
- package/dist/runtime-client.js +0 -736
- package/dist/runtime-client.js.map +0 -1
- package/dist/runtime-connection.d.ts +0 -22
- package/dist/runtime-connection.js +0 -93
- package/dist/runtime-connection.js.map +0 -1
- package/dist/runtime-coordinator.d.ts +0 -91
- package/dist/runtime-coordinator.js +0 -911
- package/dist/runtime-coordinator.js.map +0 -1
- package/dist/runtime-general-protocol.d.ts +0 -22
- package/dist/runtime-general-protocol.js +0 -57
- package/dist/runtime-general-protocol.js.map +0 -1
- package/dist/runtime-general-workspace.d.ts +0 -17
- package/dist/runtime-general-workspace.js +0 -213
- package/dist/runtime-general-workspace.js.map +0 -1
- package/dist/runtime-pane-assets.d.ts +0 -17
- package/dist/runtime-pane-assets.js +0 -23
- package/dist/runtime-pane-assets.js.map +0 -1
- package/dist/runtime-pane-boot.d.ts +0 -9
- package/dist/runtime-pane-boot.js +0 -47
- package/dist/runtime-pane-boot.js.map +0 -1
- package/dist/runtime-pane-codex-index.d.ts +0 -1
- package/dist/runtime-pane-codex-index.js +0 -47
- package/dist/runtime-pane-codex-index.js.map +0 -1
- package/dist/runtime-pane-config.d.ts +0 -16
- package/dist/runtime-pane-config.js +0 -54
- package/dist/runtime-pane-config.js.map +0 -1
- package/dist/runtime-pane-host.d.ts +0 -44
- package/dist/runtime-pane-host.js +0 -424
- package/dist/runtime-pane-host.js.map +0 -1
- package/dist/runtime-pane-job-owner.d.ts +0 -1
- package/dist/runtime-pane-job-owner.js +0 -29
- package/dist/runtime-pane-job-owner.js.map +0 -1
- package/dist/runtime-pane-job.ps1 +0 -116
- package/dist/runtime-pane-link.d.ts +0 -40
- package/dist/runtime-pane-link.js +0 -246
- package/dist/runtime-pane-link.js.map +0 -1
- package/dist/runtime-pane-mcp-protocol.d.ts +0 -32
- package/dist/runtime-pane-mcp-protocol.js +0 -39
- package/dist/runtime-pane-mcp-protocol.js.map +0 -1
- package/dist/runtime-pane-mcp-relay.d.ts +0 -17
- package/dist/runtime-pane-mcp-relay.js +0 -70
- package/dist/runtime-pane-mcp-relay.js.map +0 -1
- package/dist/runtime-pane-mcp.d.ts +0 -51
- package/dist/runtime-pane-mcp.js +0 -150
- package/dist/runtime-pane-mcp.js.map +0 -1
- package/dist/runtime-pane-native.d.ts +0 -45
- package/dist/runtime-pane-native.js +0 -65
- package/dist/runtime-pane-native.js.map +0 -1
- package/dist/runtime-pane-output.d.ts +0 -19
- package/dist/runtime-pane-output.js +0 -53
- package/dist/runtime-pane-output.js.map +0 -1
- package/dist/runtime-pane-port.d.ts +0 -139
- package/dist/runtime-pane-port.js +0 -558
- package/dist/runtime-pane-port.js.map +0 -1
- package/dist/runtime-pane-private.d.ts +0 -14
- package/dist/runtime-pane-private.js +0 -51
- package/dist/runtime-pane-private.js.map +0 -1
- package/dist/runtime-pane-private.ps1 +0 -14
- package/dist/runtime-pane-process.d.ts +0 -4
- package/dist/runtime-pane-process.js +0 -108
- package/dist/runtime-pane-process.js.map +0 -1
- package/dist/runtime-pane-protocol.d.ts +0 -172
- package/dist/runtime-pane-protocol.js +0 -195
- package/dist/runtime-pane-protocol.js.map +0 -1
- package/dist/runtime-pane-screen.d.ts +0 -19
- package/dist/runtime-pane-screen.js +0 -76
- package/dist/runtime-pane-screen.js.map +0 -1
- package/dist/runtime-pane-service.d.ts +0 -11
- package/dist/runtime-pane-service.js +0 -221
- package/dist/runtime-pane-service.js.map +0 -1
- package/dist/runtime-pane-stdio-protocol.d.ts +0 -54
- package/dist/runtime-pane-stdio-protocol.js +0 -94
- package/dist/runtime-pane-stdio-protocol.js.map +0 -1
- package/dist/runtime-pane-stdio.d.ts +0 -3
- package/dist/runtime-pane-stdio.js +0 -123
- package/dist/runtime-pane-stdio.js.map +0 -1
- package/dist/runtime-pane-store.d.ts +0 -33
- package/dist/runtime-pane-store.js +0 -164
- package/dist/runtime-pane-store.js.map +0 -1
- package/dist/runtime-pane-transcript-protocol.d.ts +0 -43
- package/dist/runtime-pane-transcript-protocol.js +0 -58
- package/dist/runtime-pane-transcript-protocol.js.map +0 -1
- package/dist/runtime-pane-transcript.d.ts +0 -45
- package/dist/runtime-pane-transcript.js +0 -605
- package/dist/runtime-pane-transcript.js.map +0 -1
- package/dist/runtime-pane-worker.d.ts +0 -1
- package/dist/runtime-pane-worker.js +0 -154
- package/dist/runtime-pane-worker.js.map +0 -1
- package/dist/runtime-protocol.d.ts +0 -162
- package/dist/runtime-protocol.js +0 -37
- package/dist/runtime-protocol.js.map +0 -1
- package/dist/runtime-switches.d.ts +0 -79
- package/dist/runtime-switches.js +0 -90
- package/dist/runtime-switches.js.map +0 -1
- package/dist/runtime-transcript-delta-reader.d.ts +0 -23
- package/dist/runtime-transcript-delta-reader.js +0 -74
- package/dist/runtime-transcript-delta-reader.js.map +0 -1
- package/dist/runtime-transcript-source.d.ts +0 -36
- package/dist/runtime-transcript-source.js +0 -189
- package/dist/runtime-transcript-source.js.map +0 -1
- package/dist/runtime-windows-bridge.d.ts +0 -41
- package/dist/runtime-windows-bridge.js +0 -157
- package/dist/runtime-windows-bridge.js.map +0 -1
- package/dist/settings-route-lifetime.d.ts +0 -14
- package/dist/settings-route-lifetime.js +0 -48
- package/dist/settings-route-lifetime.js.map +0 -1
- package/dist/tmux-pane-host.d.ts +0 -26
- package/dist/tmux-pane-host.js +0 -25
- package/dist/tmux-pane-host.js.map +0 -1
- package/dist/transcript-needles.d.ts +0 -35
- package/dist/transcript-needles.js +0 -158
- package/dist/transcript-needles.js.map +0 -1
- package/dist/transcript-records.d.ts +0 -21
- package/dist/transcript-records.js +0 -140
- package/dist/transcript-records.js.map +0 -1
- package/dist/ui/agent-proposals.js +0 -90
- package/dist/ui/agent-runtime-settings.js +0 -67
- package/dist/ui/agent-runtime.js +0 -124
- package/dist/ui/cli-picker.js +0 -42
- package/dist/ui/general-location.js +0 -71
- package/dist/ui/native-instance-settings.js +0 -44
- package/dist/ui/native-pane-recovery.js +0 -45
- package/dist/ui/panel-runtimes.js +0 -334
- package/dist/ui/panel-windows-agent.js +0 -86
- package/dist/ui/panel-windows-cli.js +0 -179
- package/dist/ui/provider-marks.js +0 -83
- package/dist/ui/runtime-catalog.js +0 -55
- package/dist/ui/settings-agent-filters.js +0 -94
- package/dist/ui/settings-layout.js +0 -245
- package/dist/ui/settings-outside.js +0 -176
- package/dist/ui/settings-shortcuts.js +0 -65
- package/dist/ui/shared/machine-name.js +0 -13
- package/dist/ui/shared/qrcode.module.js +0 -2237
- package/dist/ui/shared/settings-width.js +0 -31
- package/dist/ui/shared/vendor/qrcode-generator.LICENSE +0 -27
- package/dist/ui/windows-agents-nav.js +0 -2
- package/dist/ui/windows-cli-catalog.js +0 -108
- package/dist/web-remote-access.d.ts +0 -152
- package/dist/web-remote-access.js +0 -368
- package/dist/web-remote-access.js.map +0 -1
- package/dist/windows-agents.d.ts +0 -126
- package/dist/windows-agents.js +0 -490
- package/dist/windows-agents.js.map +0 -1
- package/dist/windows-cli-api.d.ts +0 -23
- package/dist/windows-cli-api.js +0 -159
- package/dist/windows-cli-api.js.map +0 -1
- package/dist/windows-cli-providers.d.ts +0 -115
- package/dist/windows-cli-providers.js +0 -429
- package/dist/windows-cli-providers.js.map +0 -1
- package/dist/windows-cli-worker.d.ts +0 -59
- package/dist/windows-cli-worker.js +0 -479
- package/dist/windows-cli-worker.js.map +0 -1
- package/dist/windows-cli.d.ts +0 -116
- package/dist/windows-cli.js +0 -407
- package/dist/windows-cli.js.map +0 -1
- package/dist/windows-native-mcp.d.ts +0 -19
- package/dist/windows-native-mcp.js +0 -143
- package/dist/windows-native-mcp.js.map +0 -1
- package/dist/windows-pane-mcp.d.ts +0 -26
- package/dist/windows-pane-mcp.js +0 -187
- package/dist/windows-pane-mcp.js.map +0 -1
- package/templates/runtime-assets/conpty-LICENSE +0 -21
- package/templates/runtime-assets/conpty-NOTICE.md +0 -503
- package/templates/runtime-assets/local-pane-stage.ps1 +0 -101
- package/templates/runtime-assets/runtime-pane-job.ps1 +0 -116
- package/templates/runtime-assets/runtime-pane-private.ps1 +0 -14
- package/templates/runtime-assets/xterm-LICENSE +0 -21
package/dist/web-api.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CANVAS_WORKER_EXPERIMENTAL_MESSAGE } from "./web-experimental.js";
|
|
2
|
-
import { MachineSlotLimitError } from "./windows-agents.js";
|
|
3
2
|
import { daemonTopicMode } from "./web-only-fleet.js";
|
|
4
3
|
import { webHumanOrigin } from "./human-delivery-receipts.js";
|
|
5
4
|
import { classifyWebPeer, confirmAfterBody, noAuthority } from "./authority/web-authority.js";
|
|
@@ -33,7 +32,6 @@ import { shellRoute } from "./web-shell-routes.js";
|
|
|
33
32
|
import { createReadStream, createWriteStream, readFileSync } from "node:fs";
|
|
34
33
|
import { join, dirname } from "node:path";
|
|
35
34
|
import { fileURLToPath } from "node:url";
|
|
36
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
37
35
|
import { CreateInstanceArgs, CreateScheduleArgs, UpdateScheduleArgs, validateArgs } from "./outbound-schemas.js";
|
|
38
36
|
import { scheduleView } from "./web-schedules.js";
|
|
39
37
|
import { DEFAULT_SCHEDULER_CONFIG } from "./scheduler/index.js";
|
|
@@ -56,13 +54,8 @@ import { resolveTz } from "./tz-utils.js";
|
|
|
56
54
|
import { QUERY_MAX_CHARS, RESULT_MAX, SEARCH_SOURCES } from "./search/search-store.js";
|
|
57
55
|
import { xmsgShown } from "./search/search-docs.js";
|
|
58
56
|
import { WebSendDedupe } from "./web-send-dedupe.js";
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import { handleAgentRuntimeChange } from "./agent-runtime-api.js";
|
|
62
|
-
import { isWindowsInstance, isNativePaneInstance, isNativeExecInstance } from "./native-instance-registry.js";
|
|
63
|
-
import { handleNativeModelCatalog } from "./native-model-catalog.js";
|
|
64
|
-
import { claudeDocumentedModels } from "./model-catalog-defaults.js";
|
|
65
|
-
import { handleRuntimeRequest } from "./runtime-api.js";
|
|
57
|
+
import { taskBoardOffNames } from "./dashboard-permissions.js";
|
|
58
|
+
import { topicFields } from "./instance-topic-delete.js";
|
|
66
59
|
// ── Strict public-facing schemas ────────────────────────────────────────────
|
|
67
60
|
// web-api endpoints must reject unknown fields so the dashboard cannot inject
|
|
68
61
|
// internal-only flags that would reach handleCreate/scheduler/config writers.
|
|
@@ -1880,29 +1873,6 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
1880
1873
|
return false;
|
|
1881
1874
|
}
|
|
1882
1875
|
// ── Static files ───────────────────────────────────────
|
|
1883
|
-
// Native local tools retain their administrator boundary on the shared chat/read/action routes.
|
|
1884
|
-
const nativePath = /^\/ui\/(?:chat|instance|cancel|stop|start|restart)\/([^/]+)$/.exec(path);
|
|
1885
|
-
let nativeTarget = url.searchParams.get("instance") ?? "";
|
|
1886
|
-
if (nativePath) {
|
|
1887
|
-
try {
|
|
1888
|
-
nativeTarget = decodeURIComponent(nativePath[1]);
|
|
1889
|
-
}
|
|
1890
|
-
catch {
|
|
1891
|
-
nativeTarget = "";
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
if (isWindowsInstance(ctx.fleetConfig?.instances?.[nativeTarget]) && !nativeCliAuthorization(req, url, ctx)) {
|
|
1895
|
-
json(res, 403, { error: "Windows runtime requires an administrator on the local dashboard" });
|
|
1896
|
-
return true;
|
|
1897
|
-
}
|
|
1898
|
-
if (handleAgentRuntimeChange(req, res, url, ctx))
|
|
1899
|
-
return true;
|
|
1900
|
-
if (handleNativeInstanceRequest(req, res, url, ctx))
|
|
1901
|
-
return true;
|
|
1902
|
-
if (handleWindowsCliRequest(req, res, url, ctx))
|
|
1903
|
-
return true;
|
|
1904
|
-
if (handleRuntimeRequest(req, res, url, ctx))
|
|
1905
|
-
return true;
|
|
1906
1876
|
// #1408: the app shell, for exactly the paths the classifier names (src/web-shell-routes.ts). One page for every
|
|
1907
1877
|
// route; the client router mounts the panel. A malformed instance name is a 400, an unknown one is the shell (the
|
|
1908
1878
|
// panel says "not found"), so the response never tells which names exist.
|
|
@@ -1958,45 +1928,7 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
1958
1928
|
json(res, 400, { error: "backend (and optional instance) required" });
|
|
1959
1929
|
return true;
|
|
1960
1930
|
}
|
|
1961
|
-
|
|
1962
|
-
const machineId = url.searchParams.get("machineId");
|
|
1963
|
-
if (machineId !== null && (!/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(machineId) || runtime === "wsl")) {
|
|
1964
|
-
json(res, 400, { error: "Invalid model runtime machine" });
|
|
1965
|
-
return true;
|
|
1966
|
-
}
|
|
1967
|
-
if ((runtime !== null && runtime !== "wsl" && runtime !== "windows") || (refresh !== null && refresh !== "1")) {
|
|
1968
|
-
json(res, 400, { error: "Invalid model catalog options" });
|
|
1969
|
-
return true;
|
|
1970
|
-
}
|
|
1971
|
-
if (handleNativeModelCatalog(req, res, url, ctx))
|
|
1972
|
-
return true;
|
|
1973
|
-
const models = ctx.modelCatalogFor?.(backend, instance) ?? [];
|
|
1974
|
-
const answerCatalog = () => {
|
|
1975
|
-
if (backend === "claude-code" && !models.length) {
|
|
1976
|
-
const version = ctx.backendAvailabilityRows?.().find(row => row.backend === backend)?.version;
|
|
1977
|
-
json(res, 200, { backend, models: claudeDocumentedModels(version), source: "official-catalog" });
|
|
1978
|
-
}
|
|
1979
|
-
else
|
|
1980
|
-
json(res, 200, { backend, models });
|
|
1981
|
-
};
|
|
1982
|
-
// The existing catalog belongs to this instance/account and always wins.
|
|
1983
|
-
if (models.length || !ctx.cliModelCatalogFor) {
|
|
1984
|
-
answerCatalog();
|
|
1985
|
-
return true;
|
|
1986
|
-
}
|
|
1987
|
-
const canAnswer = () => !res.headersSent && !res.destroyed && !res.writableEnded && stillAuthorized(req, res, url, ctx);
|
|
1988
|
-
void (async () => {
|
|
1989
|
-
const cliModels = await ctx.cliModelCatalogFor?.(backend, instance) ?? [];
|
|
1990
|
-
if (!canAnswer())
|
|
1991
|
-
return;
|
|
1992
|
-
if (cliModels.length)
|
|
1993
|
-
json(res, 200, { backend, models: cliModels, source: "cli-cache" });
|
|
1994
|
-
else
|
|
1995
|
-
answerCatalog();
|
|
1996
|
-
})().catch(() => {
|
|
1997
|
-
if (canAnswer())
|
|
1998
|
-
json(res, 503, { error: "CLI model cache unavailable" });
|
|
1999
|
-
});
|
|
1931
|
+
json(res, 200, { backend, models: ctx.modelCatalogFor?.(backend, instance) ?? [] });
|
|
2000
1932
|
return true;
|
|
2001
1933
|
}
|
|
2002
1934
|
if (method === "GET" && path === "/ui/backends") {
|
|
@@ -2995,116 +2927,6 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
2995
2927
|
});
|
|
2996
2928
|
return true;
|
|
2997
2929
|
}
|
|
2998
|
-
// ── #3008: connections from outside (a web-only fleet) ──
|
|
2999
|
-
// GET /ui/outside: the state (any admin; over the outside link too, read-only). Everything that changes it is this
|
|
3000
|
-
// computer's admin's, on this computer (the fleet asks the live session each time; the public link refuses these
|
|
3001
|
-
// routes outright): POST /ui/outside/enroll (a new secret, shown once), POST /ui/outside/enroll/confirm {code},
|
|
3002
|
-
// POST /ui/outside/remove, POST /ui/outside/switch {on}. Never a guest (not in GUEST_ROUTES).
|
|
3003
|
-
if (method === "GET" && path === "/ui/outside") {
|
|
3004
|
-
res.setHeader("Cache-Control", "no-store");
|
|
3005
|
-
json(res, 200, ctx.webOutsideStatus?.(req) ?? { webOnly: false, here: false, enrolled: false, enrolledAt: null, outside: false, pausedForMs: 0, link: null });
|
|
3006
|
-
return true;
|
|
3007
|
-
}
|
|
3008
|
-
if (method === "POST" && (path === "/ui/outside/enroll" || path === "/ui/outside/enroll/confirm" || path === "/ui/outside/remove" || path === "/ui/outside/switch")) {
|
|
3009
|
-
if (gatewayRequestContext(req)) {
|
|
3010
|
-
json(res, 403, { error: "outside_not_here" });
|
|
3011
|
-
return true;
|
|
3012
|
-
}
|
|
3013
|
-
(async () => {
|
|
3014
|
-
let body;
|
|
3015
|
-
try {
|
|
3016
|
-
body = await parseBody(req);
|
|
3017
|
-
}
|
|
3018
|
-
catch {
|
|
3019
|
-
json(res, 400, { error: "Invalid JSON" });
|
|
3020
|
-
return;
|
|
3021
|
-
}
|
|
3022
|
-
if (!permitWebContinuation(req, res, ctx))
|
|
3023
|
-
return;
|
|
3024
|
-
res.setHeader("Cache-Control", "no-store");
|
|
3025
|
-
if (path === "/ui/outside/enroll") {
|
|
3026
|
-
const r = ctx.webOutsideBeginEnrollment?.(req) ?? null;
|
|
3027
|
-
if (!r) {
|
|
3028
|
-
json(res, 403, { error: "outside_not_here" });
|
|
3029
|
-
return;
|
|
3030
|
-
}
|
|
3031
|
-
json(res, 200, r);
|
|
3032
|
-
return;
|
|
3033
|
-
}
|
|
3034
|
-
if (path === "/ui/outside/enroll/confirm") {
|
|
3035
|
-
const code = body && typeof body === "object" ? body.code : undefined;
|
|
3036
|
-
if (typeof code !== "string" || code.length > 32) {
|
|
3037
|
-
json(res, 400, { error: "code required" });
|
|
3038
|
-
return;
|
|
3039
|
-
}
|
|
3040
|
-
const r = ctx.webOutsideConfirmEnrollment?.(req, code) ?? "not_here";
|
|
3041
|
-
json(res, r === "ok" ? 200 : r === "not_here" ? 403 : r === "unsaved" ? 503 : 400, r === "ok" ? { ok: true } : { error: r === "not_here" ? "outside_not_here" : r });
|
|
3042
|
-
return;
|
|
3043
|
-
}
|
|
3044
|
-
if (path === "/ui/outside/remove") {
|
|
3045
|
-
const r = ctx.webOutsideRemove?.(req) ?? "not_here";
|
|
3046
|
-
json(res, r === "ok" ? 200 : r === "unsaved" ? 503 : 403, r === "ok" ? { ok: true } : { error: r === "unsaved" ? "unsaved" : "outside_not_here" });
|
|
3047
|
-
return;
|
|
3048
|
-
}
|
|
3049
|
-
const on = body && typeof body === "object" ? body.on : undefined;
|
|
3050
|
-
if (typeof on !== "boolean") {
|
|
3051
|
-
json(res, 400, { error: "on must be true or false" });
|
|
3052
|
-
return;
|
|
3053
|
-
}
|
|
3054
|
-
const r = ctx.webOutsideSwitch?.(req, on) ?? "not_here";
|
|
3055
|
-
json(res, r === "ok" ? 200 : r === "not_here" ? 403 : r === "unsaved" ? 503 : 409, r === "ok" ? { ok: true } : { error: r === "not_here" ? "outside_not_here" : r });
|
|
3056
|
-
})().catch(err => {
|
|
3057
|
-
ctx.logger.error({ err: err.message }, "Outside connections change failed");
|
|
3058
|
-
try {
|
|
3059
|
-
json(res, 500, { error: "outside_failed" });
|
|
3060
|
-
}
|
|
3061
|
-
catch { /* already answered */ }
|
|
3062
|
-
});
|
|
3063
|
-
return true;
|
|
3064
|
-
}
|
|
3065
|
-
// ── alpha.2 (M-2300): an agent's Windows request, decided by a web-only fleet's owner in Needs you ──
|
|
3066
|
-
// The list is the owner's only: anyone else (a guest, a LAN or public-link session, a chat fleet's admin) reads an
|
|
3067
|
-
// empty one, so nothing actionable ever reaches them. The stream's `agent_proposals` event carries nothing.
|
|
3068
|
-
if (method === "GET" && path === "/ui/agent-proposals") {
|
|
3069
|
-
const list = ctx.webAgentProposals?.(req) ?? null;
|
|
3070
|
-
json(res, 200, { owner: list !== null, proposals: list ?? [] });
|
|
3071
|
-
return true;
|
|
3072
|
-
}
|
|
3073
|
-
const proposalMatch = method === "POST" ? /^\/ui\/agent-proposals\/([0-9a-f]{32})$/.exec(path) : null;
|
|
3074
|
-
if (proposalMatch) {
|
|
3075
|
-
if (!ctx.webDecideAgentProposal) {
|
|
3076
|
-
json(res, 404, { error: "not_found" });
|
|
3077
|
-
return true;
|
|
3078
|
-
}
|
|
3079
|
-
const decide = ctx.webDecideAgentProposal.bind(ctx), id = proposalMatch[1];
|
|
3080
|
-
(async () => {
|
|
3081
|
-
let body;
|
|
3082
|
-
try {
|
|
3083
|
-
body = await parseBody(req);
|
|
3084
|
-
}
|
|
3085
|
-
catch {
|
|
3086
|
-
json(res, 400, { error: "Invalid JSON" });
|
|
3087
|
-
return;
|
|
3088
|
-
}
|
|
3089
|
-
if (!permitWebContinuation(req, res, ctx))
|
|
3090
|
-
return;
|
|
3091
|
-
const decision = body && typeof body === "object" ? body.decision : undefined;
|
|
3092
|
-
if (decision !== "confirm" && decision !== "reject") {
|
|
3093
|
-
json(res, 400, { error: "decision must be confirm or reject" });
|
|
3094
|
-
return;
|
|
3095
|
-
}
|
|
3096
|
-
const r = await decide(req, id, decision);
|
|
3097
|
-
if (!res.headersSent && !res.destroyed)
|
|
3098
|
-
json(res, r.status, r.body);
|
|
3099
|
-
})().catch(err => {
|
|
3100
|
-
ctx.logger.error({ err: err.message }, "Agent request decision failed");
|
|
3101
|
-
try {
|
|
3102
|
-
json(res, 500, { error: "decide_failed" });
|
|
3103
|
-
}
|
|
3104
|
-
catch { /* already answered */ }
|
|
3105
|
-
});
|
|
3106
|
-
return true;
|
|
3107
|
-
}
|
|
3108
2930
|
if (method === "POST" && path === "/ui/needs/ack") {
|
|
3109
2931
|
if (!ctx.acknowledgeNeedsItem) {
|
|
3110
2932
|
json(res, 404, { error: "Nothing to acknowledge here" });
|
|
@@ -3230,20 +3052,6 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
3230
3052
|
json(res, 400, { error: "instance and command required" });
|
|
3231
3053
|
return;
|
|
3232
3054
|
}
|
|
3233
|
-
if (isNativeExecInstance(ctx.fleetConfig?.instances[instance])) {
|
|
3234
|
-
json(res, 400, { error: "This runtime does not support CLI control commands; use Agent settings or Cancel" });
|
|
3235
|
-
return;
|
|
3236
|
-
}
|
|
3237
|
-
if (isNativePaneInstance(ctx.fleetConfig?.instances[instance])) {
|
|
3238
|
-
if (!nativeCliAuthorization(req, url, ctx)) {
|
|
3239
|
-
json(res, 403, { error: "Windows runtime requires an administrator on the local dashboard" });
|
|
3240
|
-
return;
|
|
3241
|
-
}
|
|
3242
|
-
if (command !== "model") {
|
|
3243
|
-
json(res, 400, { error: "This persistent Windows runtime supports the model command; use its shared controls for other actions" });
|
|
3244
|
-
return;
|
|
3245
|
-
}
|
|
3246
|
-
}
|
|
3247
3055
|
if (body.args !== undefined && str(body.args, MAX_COMMAND_ARGS) === undefined) {
|
|
3248
3056
|
json(res, 400, { error: "args too long" });
|
|
3249
3057
|
return;
|
|
@@ -3392,12 +3200,17 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
3392
3200
|
return;
|
|
3393
3201
|
}
|
|
3394
3202
|
const execution = settingsRequestExecution(req);
|
|
3395
|
-
|
|
3203
|
+
// The same removal as delete_instance: the agent, then its own topic (the user's default), said truthfully.
|
|
3204
|
+
let topic = null;
|
|
3205
|
+
if (ctx.removeInstanceAndTopic) {
|
|
3206
|
+
topic = await ctx.removeInstanceAndTopic(name, authorizeExplicitInstanceRemoval("dashboard-confirmed"), { deleteTopic: true, ...(execution ? { execution } : {}) });
|
|
3207
|
+
}
|
|
3208
|
+
else if (execution)
|
|
3396
3209
|
await ctx.removeInstance(name, authorizeExplicitInstanceRemoval("dashboard-confirmed"), execution);
|
|
3397
3210
|
else
|
|
3398
3211
|
await ctx.removeInstance(name, authorizeExplicitInstanceRemoval("dashboard-confirmed"));
|
|
3399
3212
|
ctx.emitSseEvent("status", ctx.getUiStatus());
|
|
3400
|
-
json(res, 200, { deleted: name });
|
|
3213
|
+
json(res, 200, { deleted: name, ...topicFields(name, topic) });
|
|
3401
3214
|
}
|
|
3402
3215
|
catch (err) {
|
|
3403
3216
|
json(res, 500, { error: err.message });
|
|
@@ -3507,10 +3320,6 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
3507
3320
|
const body = await parseBody(req);
|
|
3508
3321
|
if (!permitWebContinuation(req, res, ctx))
|
|
3509
3322
|
return;
|
|
3510
|
-
if (body?.runtime === "windows") {
|
|
3511
|
-
await createNativeInstance(req, res, url, ctx, body);
|
|
3512
|
-
return;
|
|
3513
|
-
}
|
|
3514
3323
|
const v = validateArgs(CreateInstanceArgs, body, "create_instance");
|
|
3515
3324
|
if (!v.ok) {
|
|
3516
3325
|
json(res, 400, { error: v.error });
|
|
@@ -3631,7 +3440,10 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
3631
3440
|
// board for a revision, so it is built once per (revision, done=all, minute) — the minute for the 14-day
|
|
3632
3441
|
// window. The public link's reads are filtered per request (hidden instances) and are built each time.
|
|
3633
3442
|
// #2757 review: and by the dispatchers gone (a deleted one makes its cards the person's, the revision unchanged).
|
|
3634
|
-
|
|
3443
|
+
// The instances with the task board switched off: no card is handed to them (the pickers mark them), and a
|
|
3444
|
+
// fleet.yaml edit changes them with the revision unchanged.
|
|
3445
|
+
const boardOff = taskBoardOffNames(ctx.fleetConfig).filter((n) => !hiddenName(n));
|
|
3446
|
+
const key = gateway ? null : `${rev}:${allDone ? 1 : 0}:${Math.floor(Date.now() / 60_000)}:${board.goneDispatchers(ctx.dispatcherGone)}:${boardOff.join("\u0000")}`;
|
|
3635
3447
|
const kept = key ? boardBodies.get(board) : undefined;
|
|
3636
3448
|
if (kept && kept.key === key) {
|
|
3637
3449
|
jsonText(res, 200, kept.body);
|
|
@@ -3643,7 +3455,7 @@ export function handleWebRequest(req, res, url, ctx) {
|
|
|
3643
3455
|
// #2355 review: the names a project's lead may be — the fleet's instances (a Classic-only room is not one); over the
|
|
3644
3456
|
// public link, not a hidden one.
|
|
3645
3457
|
const leads = Object.keys(ctx.fleetConfig?.instances ?? {}).filter((n) => !hiddenName(n)).sort();
|
|
3646
|
-
const body = JSON.stringify({ rev, cards: board.views(cards, scope, ctx.dispatcherGone), projects, leads, stats: board.projectStats(ctx.dispatcherGone) });
|
|
3458
|
+
const body = JSON.stringify({ rev, cards: board.views(cards, scope, ctx.dispatcherGone), projects, leads, boardOff, stats: board.projectStats(ctx.dispatcherGone) });
|
|
3647
3459
|
if (key)
|
|
3648
3460
|
boardBodies.set(board, { key, body });
|
|
3649
3461
|
jsonText(res, 200, body);
|
|
@@ -4272,9 +4084,6 @@ function uploadRecipient(ctx, name) {
|
|
|
4272
4084
|
/** Closed, path-free explanations; arbitrary launch errors stay in the host log. */
|
|
4273
4085
|
function webDeliveryFailure(err) {
|
|
4274
4086
|
const message = err instanceof Error ? err.message : "";
|
|
4275
|
-
// M-2297: the per-PC agent limit — say so, with the agents holding its slots (names only: no path, no id).
|
|
4276
|
-
if (err instanceof MachineSlotLimitError)
|
|
4277
|
-
return { reason: "machine_limit", error: message, limit: err.limit, holders: err.holders.map(h => ({ name: h.name, unknown: h.unknown })) };
|
|
4278
4087
|
if (/No warm slot is free/.test(message))
|
|
4279
4088
|
return { reason: "wake_capacity", error: "No slot is free to wake this instance. Retry when another instance is idle." };
|
|
4280
4089
|
if (/login|log in|sign in|\bauth(?:entication|orization)?\b|credential|api.?key/i.test(message))
|
|
@@ -4322,15 +4131,6 @@ function handleSendMessage(req, res, ctx) {
|
|
|
4322
4131
|
return;
|
|
4323
4132
|
}
|
|
4324
4133
|
const { instance, message: typed, attachments = [], replyTo, clientId } = parsed.data;
|
|
4325
|
-
const native = isWindowsInstance(ctx.fleetConfig?.instances[instance]);
|
|
4326
|
-
if (native && !nativeCliAuthorization(req, new URL(req.url ?? "/", "http://localhost"), ctx)) {
|
|
4327
|
-
json(res, 403, { error: "Windows runtime requires an administrator on the local dashboard" });
|
|
4328
|
-
return;
|
|
4329
|
-
}
|
|
4330
|
-
if (native && attachments.length) {
|
|
4331
|
-
json(res, 400, { error: "Attachments are not supported by this runtime yet" });
|
|
4332
|
-
return;
|
|
4333
|
-
}
|
|
4334
4134
|
// #1920 step 2b: a guest writes only to an in-scope instance, while guests may chat, and never a command.
|
|
4335
4135
|
const guest = guestRequestOf(req);
|
|
4336
4136
|
const refused = guestChatRefusal(guest, instance);
|
|
@@ -4384,16 +4184,6 @@ function handleSendMessage(req, res, ctx) {
|
|
|
4384
4184
|
break;
|
|
4385
4185
|
}
|
|
4386
4186
|
}
|
|
4387
|
-
const locationHold = ctx.generalLocationDeliveryHold?.(instance);
|
|
4388
|
-
if (locationHold) {
|
|
4389
|
-
const messageId = newWebMessageId(), ts = new Date().toISOString();
|
|
4390
|
-
// Settle this client ID as answered. A Retry after reconnect must never queue its old input.
|
|
4391
|
-
acceptedId = messageId;
|
|
4392
|
-
ctx.emitSseEvent("message", { instance, sender: person.name, role: "user", text: typed, ts, messageId, ...(person.bound ? { from: person.voterKey } : {}), ...(clientId ? { clientId } : {}) });
|
|
4393
|
-
ctx.emitSseEvent("message", { instance, role: "status", sender: "AgEnD", text: locationHold, ts, messageId: newWebMessageId() });
|
|
4394
|
-
json(res, 200, { sent: true, messageId, serviceResponse: true });
|
|
4395
|
-
return;
|
|
4396
|
-
}
|
|
4397
4187
|
let files = [];
|
|
4398
4188
|
if (attachments.length > 0) {
|
|
4399
4189
|
const taken = ctx.webFiles?.takeForMessage(instance, attachments);
|
|
@@ -4416,39 +4206,15 @@ function handleSendMessage(req, res, ctx) {
|
|
|
4416
4206
|
// Recheck the same admission all the way through a wake, before the facade's actual IPC handoff.
|
|
4417
4207
|
const requestUrl = new URL(req.url ?? "/", "http://localhost");
|
|
4418
4208
|
const admission = admissionOf(req, requestUrl, ctx);
|
|
4419
|
-
|
|
4420
|
-
// instance still registered (a Windows one still Windows). A Windows turn is journaled before /ui/send answers and its
|
|
4421
|
-
// process starts after, so the bridge rechecks this one (a revoke in between still stops it); never res, which a
|
|
4422
|
-
// finished response marks destroyed (S-30: every web-chat turn to a Windows agent was refused).
|
|
4423
|
-
const authorityCurrent = () => admission !== null && admissionOf(req, requestUrl, ctx) === admission
|
|
4209
|
+
const stillCurrent = () => !res.destroyed && admission !== null && admissionOf(req, requestUrl, ctx) === admission
|
|
4424
4210
|
&& (!guest || (guest.current() && !guestChatRefusal(guest, instance)))
|
|
4425
|
-
&& (
|
|
4426
|
-
: registered ? registeredChatInstance(ctx, instance) : ctx.instanceIpcClients.has(instance));
|
|
4427
|
-
const stillCurrent = () => !res.destroyed && authorityCurrent();
|
|
4211
|
+
&& (registered ? registeredChatInstance(ctx, instance) : ctx.instanceIpcClients.has(instance));
|
|
4428
4212
|
const message = typed;
|
|
4429
4213
|
// #1939 S1: what the receipt records about who authorized it (observe only: agents still read web as recognition).
|
|
4430
4214
|
const { authority } = confirmAfterBody(arrival, webAuthorityOf(req, new URL(req.url ?? "/", "http://localhost"), ctx, instance));
|
|
4431
4215
|
const ts = new Date().toISOString();
|
|
4432
4216
|
// The id the agent is given, and the one its delivery reports come back under: the page's ticks.
|
|
4433
|
-
const
|
|
4434
|
-
if (!clientId)
|
|
4435
|
-
return randomUUID();
|
|
4436
|
-
const hash = createHash("sha256").update(`agend-native-web\0${WebSendDedupe.key(person.key, instance, clientId)}`).digest("hex");
|
|
4437
|
-
return `${hash.slice(0, 8)}-${hash.slice(8, 12)}-4${hash.slice(13, 16)}-8${hash.slice(17, 20)}-${hash.slice(20, 32)}`;
|
|
4438
|
-
})() : undefined;
|
|
4439
|
-
const messageId = nativeRequestId ? `native:${nativeRequestId}:user` : newWebMessageId();
|
|
4440
|
-
if (nativeRequestId && ctx.nativeInstanceRuntime) {
|
|
4441
|
-
const previous = ctx.nativeInstanceRuntime().get(instance)?.turns.find(turn => turn.id === nativeRequestId);
|
|
4442
|
-
if (previous) {
|
|
4443
|
-
if (previous.prompt !== delivery.text) {
|
|
4444
|
-
json(res, 409, { error: "clientId belongs to a different message" });
|
|
4445
|
-
return;
|
|
4446
|
-
}
|
|
4447
|
-
acceptedId = messageId;
|
|
4448
|
-
json(res, 200, { sent: true, messageId, repeated: true });
|
|
4449
|
-
return;
|
|
4450
|
-
}
|
|
4451
|
-
}
|
|
4217
|
+
const messageId = newWebMessageId();
|
|
4452
4218
|
// Use real Telegram context so daemon's lastChatId/lastThreadId are set,
|
|
4453
4219
|
// enabling reply tool even when first message comes from Web UI.
|
|
4454
4220
|
// Pure Web UI mode (no channel config) leaves these empty; the agent's reply then comes back to the
|
|
@@ -4494,12 +4260,11 @@ function handleSendMessage(req, res, ctx) {
|
|
|
4494
4260
|
let delivered;
|
|
4495
4261
|
try {
|
|
4496
4262
|
const deliver = (name, payload) => ctx.deliverHumanToInstance
|
|
4497
|
-
? ctx.deliverHumanToInstance(name, payload, webHumanOrigin(false, authority), typed, { stillCurrent
|
|
4498
|
-
: ctx.deliverToInstance(name, payload, { stillCurrent
|
|
4263
|
+
? ctx.deliverHumanToInstance(name, payload, webHumanOrigin(false, authority), typed, { stillCurrent })
|
|
4264
|
+
: ctx.deliverToInstance(name, payload, { stillCurrent });
|
|
4499
4265
|
delivered = await deliver(instance, {
|
|
4500
4266
|
type: "fleet_inbound",
|
|
4501
4267
|
content: delivery.text,
|
|
4502
|
-
...(nativeRequestId ? { requestId: nativeRequestId } : {}),
|
|
4503
4268
|
targetSession: instance,
|
|
4504
4269
|
meta: {
|
|
4505
4270
|
chat_id: groupId ? String(groupId) : "",
|