@songsid/agend 2.3.0-beta.2 → 2.3.0-beta.21
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 +7 -1
- package/README.zh-TW.md +7 -1
- package/dist/agent-cli-instructions.md +9 -2
- package/dist/agent-cli.js +63 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +4 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.d.ts +4 -1
- package/dist/agent-file-read.js +189 -16
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-whats-new.d.ts +11 -0
- package/dist/agent-whats-new.js +29 -5
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +30 -1
- package/dist/auth-api.js +45 -13
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/authority-state.d.ts +38 -0
- package/dist/authority/authority-state.js +114 -0
- package/dist/authority/authority-state.js.map +1 -0
- package/dist/authority/session-authorizations.d.ts +43 -0
- package/dist/authority/session-authorizations.js +102 -0
- package/dist/authority/session-authorizations.js.map +1 -0
- package/dist/authority/web-authority.d.ts +120 -0
- package/dist/authority/web-authority.js +157 -0
- package/dist/authority/web-authority.js.map +1 -0
- package/dist/backend/claude-code.d.ts +2 -2
- package/dist/backend/claude-code.js +18 -8
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-metadata.d.ts +8 -0
- package/dist/backend/codex-metadata.js +74 -17
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex.js +15 -2
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +2 -0
- package/dist/backend/credential-profile.js +2 -0
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js +15 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +120 -0
- package/dist/backend-availability.js +396 -0
- package/dist/backend-availability.js.map +1 -0
- package/dist/backend-command.d.ts +23 -3
- package/dist/backend-command.js +25 -4
- package/dist/backend-command.js.map +1 -1
- package/dist/bug-report-cli.d.ts +30 -0
- package/dist/bug-report-cli.js +138 -0
- package/dist/bug-report-cli.js.map +1 -0
- package/dist/bug-report.d.ts +47 -0
- package/dist/bug-report.js +136 -0
- package/dist/bug-report.js.map +1 -0
- package/dist/bundled-skills.d.ts +14 -0
- package/dist/bundled-skills.js +29 -0
- package/dist/bundled-skills.js.map +1 -0
- package/dist/cache-ledger.d.ts +16 -3
- package/dist/cache-ledger.js +33 -13
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-service.d.ts +55 -3
- package/dist/cache-service.js +152 -16
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord-client-retirement.d.ts +5 -0
- package/dist/channel/adapters/discord-client-retirement.js +57 -0
- package/dist/channel/adapters/discord-client-retirement.js.map +1 -0
- package/dist/channel/adapters/discord.d.ts +9 -0
- package/dist/channel/adapters/discord.js +49 -4
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/mcp-tools.js +22 -11
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +6 -0
- package/dist/classic-channel-manager.d.ts +10 -5
- package/dist/classic-channel-manager.js +12 -9
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +224 -111
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.d.ts +6 -0
- package/dist/config-validator.js +129 -3
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +13 -1
- package/dist/config.js +14 -5
- package/dist/config.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +7 -0
- package/dist/cross-instance-notice.js +10 -0
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +24 -1
- package/dist/daemon.js +151 -19
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +25 -0
- package/dist/decision-list.js +30 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/delivery-outbox.d.ts +10 -0
- package/dist/delivery-outbox.js +17 -1
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/diagnostic-redaction.d.ts +10 -0
- package/dist/diagnostic-redaction.js +167 -0
- package/dist/diagnostic-redaction.js.map +1 -0
- package/dist/fleet-context.d.ts +10 -0
- package/dist/fleet-manager.d.ts +505 -15
- package/dist/fleet-manager.js +1870 -204
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +18 -0
- package/dist/fleet-process-handlers.js +69 -0
- package/dist/fleet-process-handlers.js.map +1 -0
- package/dist/fleet-traffic.d.ts +74 -0
- package/dist/fleet-traffic.js +196 -0
- package/dist/fleet-traffic.js.map +1 -0
- package/dist/general-knowledge/skills/bug-report/SKILL.md +31 -0
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +17 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -1
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +2 -0
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +3 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +1 -1
- package/dist/general-knowledge/skills/scheduling/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +190 -47
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +545 -0
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/human-delivery-receipts.d.ts +24 -1
- package/dist/human-delivery-receipts.js +64 -11
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +7 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +10 -1
- package/dist/instance-lifecycle.js +79 -18
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instance-names.d.ts +4 -0
- package/dist/instance-names.js +12 -0
- package/dist/instance-names.js.map +1 -0
- package/dist/instructions.d.ts +12 -1
- package/dist/instructions.js +13 -2
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +173 -12
- package/dist/locale.js.map +1 -1
- package/dist/log-steps.d.ts +1 -0
- package/dist/log-steps.js +15 -0
- package/dist/log-steps.js.map +1 -1
- package/dist/login-controller.d.ts +45 -0
- package/dist/login-controller.js +101 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/ls-attach-resolve.d.ts +96 -0
- package/dist/ls-attach-resolve.js +180 -0
- package/dist/ls-attach-resolve.js.map +1 -0
- package/dist/ls-rows.d.ts +12 -0
- package/dist/ls-rows.js +82 -3
- package/dist/ls-rows.js.map +1 -1
- package/dist/memory-hogs.d.ts +27 -0
- package/dist/memory-hogs.js +124 -0
- package/dist/memory-hogs.js.map +1 -0
- package/dist/needs-you.d.ts +10 -0
- package/dist/needs-you.js +2 -1
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +11 -0
- package/dist/outbound-handlers.js +139 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +200 -4
- package/dist/outbound-schemas.js +124 -11
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +17 -4
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +9 -0
- package/dist/public-web-link.js +8 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.d.ts +19 -1
- package/dist/quickstart-api.js +94 -4
- package/dist/quickstart-api.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +4 -0
- package/dist/reply-buttons-controller.js +2 -2
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/restart-progress.d.ts +80 -1
- package/dist/restart-progress.js +306 -21
- package/dist/restart-progress.js.map +1 -1
- package/dist/rollout-index.d.ts +5 -0
- package/dist/rollout-index.js +26 -5
- package/dist/rollout-index.js.map +1 -1
- package/dist/scheduler/db.d.ts +40 -13
- package/dist/scheduler/db.js +123 -89
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +26 -0
- package/dist/scheduler/task-board-text.js +135 -0
- package/dist/scheduler/task-board-text.js.map +1 -0
- package/dist/scheduler/task-board.d.ts +650 -0
- package/dist/scheduler/task-board.js +1938 -0
- package/dist/scheduler/task-board.js.map +1 -0
- package/dist/scheduler/types.d.ts +6 -1
- package/dist/search/search-docs.d.ts +58 -0
- package/dist/search/search-docs.js +63 -0
- package/dist/search/search-docs.js.map +1 -0
- package/dist/search/search-index.d.ts +141 -0
- package/dist/search/search-index.js +440 -0
- package/dist/search/search-index.js.map +1 -0
- package/dist/search/search-store.d.ts +122 -0
- package/dist/search/search-store.js +236 -0
- package/dist/search/search-store.js.map +1 -0
- package/dist/search/search-worker.d.ts +1 -0
- package/dist/search/search-worker.js +163 -0
- package/dist/search/search-worker.js.map +1 -0
- package/dist/service-installer.js +12 -0
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +23 -0
- package/dist/settings-api.js +164 -3
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +104 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +3 -1
- package/dist/settings-confirmation.js +2 -0
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.js +34 -3
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +11 -0
- package/dist/settings-http-confirmation.js +10 -0
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +23 -7
- package/dist/setup-form.js.map +1 -1
- package/dist/spawn-gate.d.ts +1 -0
- package/dist/spawn-gate.js +13 -3
- package/dist/spawn-gate.js.map +1 -1
- package/dist/task-board-tool.d.ts +25 -0
- package/dist/task-board-tool.js +154 -0
- package/dist/task-board-tool.js.map +1 -0
- package/dist/task-board-waker.d.ts +44 -0
- package/dist/task-board-waker.js +128 -0
- package/dist/task-board-waker.js.map +1 -0
- package/dist/tmux-exec-helper.d.ts +94 -0
- package/dist/tmux-exec-helper.js +407 -0
- package/dist/tmux-exec-helper.js.map +1 -0
- package/dist/tmux-manager.d.ts +5 -0
- package/dist/tmux-manager.js +42 -11
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +0 -7
- package/dist/tool-permissions.js +44 -5
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.d.ts +17 -1
- package/dist/topic-commands.js +45 -19
- package/dist/topic-commands.js.map +1 -1
- package/dist/tunnel/cloudflared.js +37 -2
- package/dist/tunnel/cloudflared.js.map +1 -1
- package/dist/tunnel/types.d.ts +3 -1
- package/dist/tunnel/types.js.map +1 -1
- package/dist/types.d.ts +63 -1
- package/dist/ui/app-effects.js +90 -32
- package/dist/ui/backend-signin.js +297 -0
- package/dist/ui/chat-ambient.js +307 -0
- package/dist/ui/chat-effect-posters.js +8 -8
- package/dist/ui/chat-effects.js +110 -15
- package/dist/ui/chat-msg-actions.js +176 -0
- package/dist/ui/chat-render.js +21 -3
- package/dist/ui/chat-store.js +64 -12
- package/dist/ui/chat-strings.js +85 -8
- package/dist/ui/chat-thread.js +204 -21
- package/dist/ui/effect-trial-controller.js +13 -8
- package/dist/ui/effect-trial-panel.js +19 -16
- package/dist/ui/effects-waker.js +70 -0
- package/dist/ui/fleet-canvas-layout.js +117 -0
- package/dist/ui/fleet-canvas.js +555 -0
- package/dist/ui/fleet-org.js +27 -12
- package/dist/ui/fleet-route-scene.js +207 -0
- package/dist/ui/fleet-route-worker.js +21 -0
- package/dist/ui/fleet-route.js +88 -0
- package/dist/ui/fleet-task-card.js +436 -0
- package/dist/ui/fleet-task-common.js +448 -0
- package/dist/ui/fleet-tasks.js +535 -0
- package/dist/ui/fleet-traffic.js +359 -0
- package/dist/ui/fleet-usage.js +435 -0
- package/dist/ui/panel-chat.js +264 -66
- package/dist/ui/panel-details.js +2 -1
- package/dist/ui/panel-fleet.js +65 -83
- package/dist/ui/panel-needs.js +4 -2
- package/dist/ui/panel-settings.js +56 -11
- package/dist/ui/preview.js +3 -2
- package/dist/ui/search-dialog.js +349 -0
- package/dist/ui/settings-appearance.js +44 -19
- package/dist/ui/settings-apply.js +3 -3
- package/dist/ui/settings-catalog.js +92 -0
- package/dist/ui/settings-confirm.js +7 -2
- package/dist/ui/settings-dialogs.js +40 -12
- package/dist/ui/settings-effects.js +4 -3
- package/dist/ui/settings-guests.js +117 -0
- package/dist/ui/settings-learn.js +25 -0
- package/dist/ui/settings-model.js +15 -6
- package/dist/ui/settings-mods.js +23 -9
- package/dist/ui/settings-owner-effects.js +15 -13
- package/dist/ui/settings-strings.js +122 -42
- package/dist/ui/settings-web-authority.js +91 -0
- package/dist/ui/shared/agend-auth.js +1 -1
- package/dist/ui/shared/app-i18n.js +11 -2
- package/dist/ui/shared/app-prefs.js +17 -4
- package/dist/ui/shared/app-route.js +19 -1
- package/dist/ui/shared/app-session.js +2 -0
- package/dist/ui/shared/app-shell.js +174 -30
- package/dist/ui/shared/app-store.js +26 -1
- package/dist/ui/shared/app-stream.js +5 -1
- package/dist/ui/shared/app-themes.js +140 -7
- package/dist/ui/shared/app.css +705 -20
- package/dist/ui/shared/app.js +26 -15
- package/dist/ui/shared/card-strings.js +8 -0
- package/dist/ui/shared/effect-app-runtime.js +68 -19
- package/dist/ui/shared/effect-chat-runtime.js +16 -3
- package/dist/ui/shared/effect-frame.js +26 -7
- package/dist/ui/shared/effect-geometry.js +24 -9
- package/dist/ui/shared/effect-owner-source.js +8 -1
- package/dist/ui/shared/effect-policy.js +21 -7
- package/dist/ui/shared/effect-profiler.js +31 -9
- package/dist/ui/shared/effect-registry.js +97 -50
- package/dist/ui/shared/effect-stock-snapshot.js +9 -0
- package/dist/ui/shared/effect-stock-trust.js +62 -10
- package/dist/ui/shared/effect-trial-shadow.js +62 -0
- package/dist/ui/shared/effect-trial-source.js +1 -1
- package/dist/ui/shared/effect-trial-stage.js +54 -31
- package/dist/ui/shared/effect-trial.css +40 -0
- package/dist/ui/shared/fx-motion.js +67 -0
- package/dist/ui/shared/identity-card.js +100 -11
- package/dist/ui/shared/identity-color.js +14 -10
- package/dist/ui/shared/instance-nav.js +179 -23
- package/dist/ui/shared/owner-css.js +30 -1
- package/dist/ui/shared/panel-view.js +24 -4
- package/dist/ui/shared/tokens.css +9 -3
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-menu.js +20 -7
- package/dist/ui/shared/ui-toast.js +16 -3
- package/dist/ui/shared/usage-dialog.js +34 -3
- package/dist/ui/shared/view-strings.js +72 -0
- package/dist/ui/shared/web-authorize.js +198 -0
- package/dist/ui/web-terminal/terminal.css +4 -4
- package/dist/ui/web-terminal/terminal.html +1 -1
- package/dist/update-launch.d.ts +9 -0
- package/dist/update-launch.js +38 -12
- package/dist/update-launch.js.map +1 -1
- package/dist/usage/format-rich.js +6 -3
- package/dist/usage/format-rich.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +2 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/i18n.d.ts +13 -1
- package/dist/usage/i18n.js +29 -0
- package/dist/usage/i18n.js.map +1 -1
- package/dist/usage/providers.d.ts +81 -2
- package/dist/usage/providers.js +240 -38
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +5 -1
- package/dist/usage/usage-api.js +184 -58
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-report.d.ts +158 -0
- package/dist/usage-report.js +226 -0
- package/dist/usage-report.js.map +1 -0
- package/dist/usage-rollup.d.ts +51 -0
- package/dist/usage-rollup.js +168 -0
- package/dist/usage-rollup.js.map +1 -0
- package/dist/user-systemd.d.ts +24 -0
- package/dist/user-systemd.js +75 -0
- package/dist/user-systemd.js.map +1 -0
- package/dist/view-api.d.ts +39 -0
- package/dist/view-api.js +69 -6
- package/dist/view-api.js.map +1 -1
- package/dist/web-ambient.d.ts +72 -0
- package/dist/web-ambient.js +161 -0
- package/dist/web-ambient.js.map +1 -0
- package/dist/web-api.d.ts +98 -14
- package/dist/web-api.js +1027 -83
- package/dist/web-api.js.map +1 -1
- package/dist/web-appearance-policy.d.ts +4 -6
- package/dist/web-appearance-policy.js +5 -12
- package/dist/web-appearance-policy.js.map +1 -1
- package/dist/web-appearance-tools.d.ts +3 -0
- package/dist/web-appearance-tools.js +22 -3
- package/dist/web-appearance-tools.js.map +1 -1
- package/dist/web-appearance-view.d.ts +27 -2
- package/dist/web-appearance-view.js +129 -14
- package/dist/web-appearance-view.js.map +1 -1
- package/dist/web-appearance.d.ts +17 -3
- package/dist/web-appearance.js +85 -8
- package/dist/web-appearance.js.map +1 -1
- package/dist/web-asset-parts.d.ts +2 -2
- package/dist/web-asset-parts.js +3 -3
- package/dist/web-asset-parts.js.map +1 -1
- package/dist/web-auth.js +3 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-backend-login.d.ts +130 -0
- package/dist/web-backend-login.js +225 -0
- package/dist/web-backend-login.js.map +1 -0
- package/dist/web-card.d.ts +14 -0
- package/dist/web-card.js +40 -6
- package/dist/web-card.js.map +1 -1
- package/dist/web-channel-echo.d.ts +7 -1
- package/dist/web-channel-echo.js +6 -2
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-chat-history.d.ts +83 -0
- package/dist/web-chat-history.js +137 -5
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +6 -1
- package/dist/web-commands.js +1 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-effect-bootstrap.d.ts +12 -0
- package/dist/web-effect-bootstrap.js +49 -0
- package/dist/web-effect-bootstrap.js.map +1 -0
- package/dist/web-effect-bundle.js +46 -1
- package/dist/web-effect-bundle.js.map +1 -1
- package/dist/web-effect-playback.d.ts +30 -0
- package/dist/web-effect-playback.js +71 -0
- package/dist/web-effect-playback.js.map +1 -0
- package/dist/web-effect-profiles.d.ts +4 -4
- package/dist/web-effect-service.d.ts +11 -4
- package/dist/web-effect-service.js +25 -4
- package/dist/web-effect-service.js.map +1 -1
- package/dist/web-effect-tools.d.ts +1 -0
- package/dist/web-effect-tools.js +4 -4
- package/dist/web-effect-tools.js.map +1 -1
- package/dist/web-effect-trials.d.ts +2 -2
- package/dist/web-effect-trials.js +3 -3
- package/dist/web-effect-trials.js.map +1 -1
- package/dist/web-effect-upload.js +1 -1
- package/dist/web-effect-upload.js.map +1 -1
- package/dist/web-effect-worker.d.ts +1 -1
- package/dist/web-effect-worker.js +2 -2
- package/dist/web-effect-worker.js.map +1 -1
- package/dist/web-effect.d.ts +1 -1
- package/dist/web-guest-access.d.ts +126 -0
- package/dist/web-guest-access.js +238 -0
- package/dist/web-guest-access.js.map +1 -0
- package/dist/web-guest-rooms.d.ts +82 -0
- package/dist/web-guest-rooms.js +135 -0
- package/dist/web-guest-rooms.js.map +1 -0
- package/dist/web-host-guard.d.ts +11 -0
- package/dist/web-host-guard.js +11 -0
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-identity-color.d.ts +1 -1
- package/dist/web-identity-color.js +2 -2
- package/dist/web-identity-color.js.map +1 -1
- package/dist/web-identity-palette.d.ts +1 -1
- package/dist/web-identity-palette.js +2 -2
- package/dist/web-identity-palette.js.map +1 -1
- package/dist/web-image-meta.d.ts +13 -0
- package/dist/web-image-meta.js +62 -0
- package/dist/web-image-meta.js.map +1 -1
- package/dist/web-libavoid.d.ts +14 -0
- package/dist/web-libavoid.js +46 -0
- package/dist/web-libavoid.js.map +1 -0
- package/dist/web-login.d.ts +47 -0
- package/dist/web-login.js +115 -0
- package/dist/web-login.js.map +1 -1
- package/dist/web-mod-agent.d.ts +1 -1
- package/dist/web-mod-agent.js +7 -5
- package/dist/web-mod-agent.js.map +1 -1
- package/dist/web-mod-bundle.d.ts +9 -1
- package/dist/web-mod-bundle.js +62 -3
- package/dist/web-mod-bundle.js.map +1 -1
- package/dist/web-mod-export.d.ts +9 -0
- package/dist/web-mod-export.js +21 -0
- package/dist/web-mod-export.js.map +1 -1
- package/dist/web-mod-store.d.ts +7 -1
- package/dist/web-mod-store.js +19 -6
- package/dist/web-mod-store.js.map +1 -1
- package/dist/web-owner-css-store.d.ts +44 -1
- package/dist/web-owner-css-store.js +70 -9
- package/dist/web-owner-css-store.js.map +1 -1
- package/dist/web-prefs.d.ts +14 -0
- package/dist/web-prefs.js +37 -4
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-preview.d.ts +6 -2
- package/dist/web-preview.js +4 -2
- package/dist/web-preview.js.map +1 -1
- package/dist/web-returning-device.d.ts +41 -0
- package/dist/web-returning-device.js +57 -5
- package/dist/web-returning-device.js.map +1 -1
- package/dist/web-session-authorization.d.ts +132 -0
- package/dist/web-session-authorization.js +193 -0
- package/dist/web-session-authorization.js.map +1 -0
- package/dist/web-session.d.ts +70 -10
- package/dist/web-session.js +137 -22
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +49 -2
- package/dist/web-settings-patch.js +145 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-settings-tools.d.ts +94 -0
- package/dist/web-settings-tools.js +301 -0
- package/dist/web-settings-tools.js.map +1 -0
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal-http.js +15 -2
- package/dist/web-terminal-http.js.map +1 -1
- package/dist/web-theme-store.d.ts +39 -0
- package/dist/web-theme-store.js +122 -11
- package/dist/web-theme-store.js.map +1 -1
- package/dist/web-theme.d.ts +31 -0
- package/dist/web-theme.js +99 -2
- package/dist/web-theme.js.map +1 -1
- package/dist/web-upload.d.ts +13 -0
- package/dist/web-upload.js +39 -3
- package/dist/web-upload.js.map +1 -1
- package/dist/windows-shortcuts.d.ts +78 -0
- package/dist/windows-shortcuts.js +203 -0
- package/dist/windows-shortcuts.js.map +1 -0
- package/dist/workflow-templates/default.md +4 -1
- package/dist/yaml-shared-nodes.d.ts +25 -0
- package/dist/yaml-shared-nodes.js +185 -0
- package/dist/yaml-shared-nodes.js.map +1 -0
- package/launcher/agend-install.cjs +553 -0
- package/launcher/install-admission.cjs +4 -39
- package/launcher/postinstall.cjs +14 -12
- package/package.json +4 -2
- package/scripts/preinstall-guard.cjs +2 -5
- package/templates/windows-shortcuts.ps1 +181 -0
- package/launcher/old-updater-note.cjs +0 -48
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -6,10 +6,11 @@ import type { CpuProfile } from "./cpu-profile.js";
|
|
|
6
6
|
import { type FleetMemory } from "./process-memory.js";
|
|
7
7
|
import { MemoryPressure, type MemoryPressureSnapshot } from "./memory-pressure.js";
|
|
8
8
|
import { ReplyDeduper } from "./reply-dedup.js";
|
|
9
|
-
import type { FleetConfig, RawFleetConfig, InstanceConfig } from "./types.js";
|
|
9
|
+
import type { FleetConfig, RawFleetConfig, InstanceConfig, WebVerifiedAuthorityConfig } from "./types.js";
|
|
10
10
|
import { type DeliveryStatus, type GuildEmoji, type GuildEmojiGroup, type ResolvedStatusEmojis } from "./status-emojis.js";
|
|
11
11
|
import { type RouteTarget } from "./fleet-context.js";
|
|
12
12
|
import { EventLog } from "./event-log.js";
|
|
13
|
+
import { BackendAvailabilityStore, type AvailabilityProbes, type BackendAvailability } from "./backend-availability.js";
|
|
13
14
|
import { AdapterWorld } from "./adapter-world.js";
|
|
14
15
|
import { CostGuard } from "./cost-guard.js";
|
|
15
16
|
import { IpcClient } from "./channel/ipc-bridge.js";
|
|
@@ -37,6 +38,7 @@ export declare const TASK_LIST_CAP = 100;
|
|
|
37
38
|
* #1336: the non-terminal statuses a bare `list` returns by default. `done`
|
|
38
39
|
* and `cancelled` are excluded unless the caller passes `filter_status`.
|
|
39
40
|
*/
|
|
41
|
+
/** Not finished: `review` is done work waiting for the person (the task board), still live. */
|
|
40
42
|
export declare const LIVE_TASK_STATUSES: string[];
|
|
41
43
|
/**
|
|
42
44
|
* #1336 P2: shared normalization for filter_status across both task handlers
|
|
@@ -73,6 +75,11 @@ import { AppearanceTools } from "./web-appearance-tools.js";
|
|
|
73
75
|
import { ModStore } from "./web-mod-store.js";
|
|
74
76
|
import { AgentMods } from "./web-mod-agent.js";
|
|
75
77
|
import { type CachedImage } from "./web-images.js";
|
|
78
|
+
import { SearchIndex } from "./search/search-index.js";
|
|
79
|
+
import { type CrossInstanceRecord, type XmsgVisibility } from "./search/search-docs.js";
|
|
80
|
+
import { WebSettingsTools } from "./web-settings-tools.js";
|
|
81
|
+
import { type Delegation, type TrafficItem } from "./fleet-traffic.js";
|
|
82
|
+
import { WebBackendLogins, type SignInTarget } from "./web-backend-login.js";
|
|
76
83
|
import { type RawConfigPatch } from "./settings-api.js";
|
|
77
84
|
import { type AgentEndpointContext } from "./agent-endpoint.js";
|
|
78
85
|
import { ClassicChannelManager } from "./classic-channel-manager.js";
|
|
@@ -84,8 +91,14 @@ import { TargetQueueWorker } from "./target-queue-worker.js";
|
|
|
84
91
|
import { resolveDeliveryWorkerMode } from "./types.js";
|
|
85
92
|
import { type WebNeedsItem } from "./needs-you-hub.js";
|
|
86
93
|
import { type OrgChart } from "./web-org.js";
|
|
94
|
+
import { type MemoryHog } from "./memory-hogs.js";
|
|
87
95
|
import { type CacheReport } from "./cache-service.js";
|
|
88
96
|
import { type WebCommandResult } from "./web-commands.js";
|
|
97
|
+
import { type SessionRecord } from "./web-session.js";
|
|
98
|
+
import { VERIFIED_SESSION_HOURS, type HumanAuthority, type WebAuthorityRefusal, type WebAuthorityResult, type WebPeer } from "./authority/web-authority.js";
|
|
99
|
+
import { type AuthorityState } from "./authority/authority-state.js";
|
|
100
|
+
import { type SessionAuthorization } from "./authority/session-authorizations.js";
|
|
101
|
+
import { SessionAuthorizationRequests, type AuthorizationAskRefusal } from "./web-session-authorization.js";
|
|
89
102
|
import { type ReturningDevice } from "./web-returning-device.js";
|
|
90
103
|
import { type PreviewAvailability } from "./web-preview.js";
|
|
91
104
|
import { type ConnectionMetadata, type ConnectionBinding, type BindingProbe, type SecretApplyJob, type ProviderSecretApplyJob } from "./connection-secrets.js";
|
|
@@ -112,12 +125,10 @@ export declare function selectLruEvictions(warm: string[], cap: number, opts: {
|
|
|
112
125
|
lastInboundAt: (name: string) => number;
|
|
113
126
|
}): string[];
|
|
114
127
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* Startup cleanup reaps windows matching this that are no longer in
|
|
118
|
-
* fleet.yaml. Keep in sync with `uniqueInstanceName` — every name it emits
|
|
119
|
-
* must match here, or a deleted instance's CLI is left running (#1305 P2-3).
|
|
128
|
+
* #2163: whether `dir` is inside AgEnD's own workspaces (<AGEND_HOME>/workspaces/<name>/…), compared after resolving
|
|
129
|
+
* symlinks on both sides — including a missing folder's existing ancestors — so a link elsewhere is not inside, nor is a broken link.
|
|
120
130
|
*/
|
|
131
|
+
export declare function insideManagedWorkspaces(dir: string, agendHome?: string): boolean;
|
|
121
132
|
export declare function isOrphanInstanceWindowName(name: string): boolean;
|
|
122
133
|
/** restartSingleInstance's options. `carry` (#1753): a credential-profile switch; its outcome is written into `result`. */
|
|
123
134
|
export interface RestartOpts {
|
|
@@ -238,6 +249,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
238
249
|
fleetConfig: FleetConfig | null;
|
|
239
250
|
private rawFleetConfig;
|
|
240
251
|
private rawFleetDocument;
|
|
252
|
+
/** #2208: the paths a saveFleetConfig() wrote, for its check that nothing else changed. */
|
|
253
|
+
private fleetDocumentWrites;
|
|
241
254
|
private savedFleetConfigSnapshot;
|
|
242
255
|
adapter: ChannelAdapter | null;
|
|
243
256
|
readonly worlds: Map<string, AdapterWorld>;
|
|
@@ -283,6 +296,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
283
296
|
private statuslineWatcher;
|
|
284
297
|
private dailySummary;
|
|
285
298
|
private dailyTipScheduler;
|
|
299
|
+
/** The task board's wakes (step 2): an instance hears when someone else changes a card it owns or handed out. */
|
|
300
|
+
private taskBoardWaker;
|
|
286
301
|
private webhookEmitter;
|
|
287
302
|
private topicIcons;
|
|
288
303
|
private lastActivity;
|
|
@@ -401,7 +416,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
401
416
|
/** At most one reconnect/backoff loop may exist per instance. */
|
|
402
417
|
private ipcReconnectInFlight;
|
|
403
418
|
private adapterRestarting;
|
|
419
|
+
/** #2175: this boot's progress message, whose completion may still be owed by its background retry. */
|
|
420
|
+
private startupProgress;
|
|
404
421
|
private adapterState;
|
|
422
|
+
private adapterRetryInFlight;
|
|
405
423
|
/** Web Settings secret rotation is deliberately separate from reconnect
|
|
406
424
|
* recovery: a rotation must build a fresh provider client with the new token,
|
|
407
425
|
* and stale callbacks from the old client must not win. */
|
|
@@ -438,10 +456,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
438
456
|
private connectionBindingInFlight;
|
|
439
457
|
private collabInstances;
|
|
440
458
|
private healthServer;
|
|
459
|
+
/** #2118: independent of HTML preview availability/port; fixed bootstrap only, no effect resources. */
|
|
460
|
+
private readonly effectBootstrap;
|
|
461
|
+
/** Fixed trusted document coherence, independent of the HTML preview listener; never a resource grant. */
|
|
462
|
+
get effectBoot(): string;
|
|
441
463
|
private healthServerDrain;
|
|
442
464
|
/** #1306: the preview listener (health_port + 1 by default), and whether it is listening. */
|
|
443
465
|
private previewListener;
|
|
444
466
|
private previewListening;
|
|
467
|
+
/** The preview listener could not open its port: "<port>: <error code>", for the page (#2061 follow-up); null otherwise. */
|
|
468
|
+
private previewListenError;
|
|
445
469
|
/** The ports the preview listener was started for, and the inputs it was built from (a reload compares them). */
|
|
446
470
|
private previewPorts;
|
|
447
471
|
private previewInputs;
|
|
@@ -460,6 +484,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
460
484
|
/** Injectable only to keep the chat→CLI reload hand-off deterministic in tests. */
|
|
461
485
|
private fullRestartLauncher;
|
|
462
486
|
private eventLogPruneTimer;
|
|
487
|
+
/** #1920 §3.2: the background reads of guests' ClassicBot room membership (a minute's tick; reads only what is due). */
|
|
488
|
+
private guestRoomsTimer;
|
|
489
|
+
private guestRoomMembership;
|
|
463
490
|
private outboxPruneTimer;
|
|
464
491
|
private logRotateTimer;
|
|
465
492
|
private discordPresenceTimer;
|
|
@@ -474,6 +501,17 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
474
501
|
private startedAt;
|
|
475
502
|
private stormOpenNotifyTimer;
|
|
476
503
|
private memoryLogAt;
|
|
504
|
+
/**
|
|
505
|
+
* #2015: while host memory is elevated or critical, the processes holding the most in the fleet's service and whose
|
|
506
|
+
* they are (an instance, the fleet, tmux), for the pressure log, /health and the dashboard — never chat (#1712).
|
|
507
|
+
* Rescanned at most once a minute (async, one at a time); cleared when pressure ends.
|
|
508
|
+
*/
|
|
509
|
+
private memoryTop;
|
|
510
|
+
private memoryTopScan;
|
|
511
|
+
/** The scan (a seam for tests: they give it a fake /proc). */
|
|
512
|
+
private memoryHogScan;
|
|
513
|
+
/** The fleet's own tmux session exists (only then are its panes read: a fleet that never started has none). */
|
|
514
|
+
private tmuxSessionEnsured;
|
|
477
515
|
private memoryDebugAt;
|
|
478
516
|
private memoryLogLevel;
|
|
479
517
|
/** #1685: the host_memory value the last status frame carried, so a change re-sends the frame. */
|
|
@@ -485,6 +523,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
485
523
|
readonly webChatHistory: WebChatHistory;
|
|
486
524
|
/** #1565: the web chat history's files (set at fleet start, once the home and the instances are known). */
|
|
487
525
|
private webChatStore;
|
|
526
|
+
/** #2293: the dashboard's global search (null: web.search.enabled is false, or the fleet has not started). */
|
|
527
|
+
searchIndex: SearchIndex | null;
|
|
488
528
|
/** Uploaded files and the files the dashboard may fetch back (uploads, reply attachments). */
|
|
489
529
|
readonly webFiles: WebFileLedger;
|
|
490
530
|
/** #1770: per instance, its last web reply still copying its files — the next one is shown after it, in order. */
|
|
@@ -574,6 +614,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
574
614
|
private ownerCssStore?;
|
|
575
615
|
/** #1629 r4 §3: each person's own CSS; which version is in force is their `css.active` in the web preferences. */
|
|
576
616
|
get ownerCss(): OwnerCssStore;
|
|
617
|
+
private webSettingsToolsService?;
|
|
618
|
+
/**
|
|
619
|
+
* #2056: Settings → Web appearance for a tool (General, a coordinator, full) — the page's own stores and checks, and the
|
|
620
|
+
* page's announcement after a change (web-settings-tools.ts).
|
|
621
|
+
*/
|
|
622
|
+
get webSettings(): WebSettingsTools;
|
|
577
623
|
get webPrefs(): WebPrefsStore;
|
|
578
624
|
/**
|
|
579
625
|
* Read from disk on every access rather than cached at startup: `agend
|
|
@@ -588,6 +634,30 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
588
634
|
private classicSettingsOwners;
|
|
589
635
|
private queueSettingsOperation;
|
|
590
636
|
private settingsGate;
|
|
637
|
+
/**
|
|
638
|
+
* #2170: a held change confirmed by the request itself — only when ALL hold, else the chat card or the host CLI, as
|
|
639
|
+
* before:
|
|
640
|
+
* - the session is web-verified (#1939: its account confirmed this browser on Discord or Telegram), asked now;
|
|
641
|
+
* - the change's effect owners are known and on one platform (settingsChatAuthority — the chat card's own rule), the
|
|
642
|
+
* verified account is on that platform and an admin of every one of them;
|
|
643
|
+
* - a chat card could have been asked: a connected General on that platform the change does not affect (else the
|
|
644
|
+
* change goes to the host CLI, as before) — the General that then hears of it;
|
|
645
|
+
* - and, at execution (store.decide asks `current()` again): still web-verified under the same session and account
|
|
646
|
+
* (not expired, revoked, signed out or the switch turned off), still those owners' admin, still a General a card
|
|
647
|
+
* could go to, the fleet unchanged.
|
|
648
|
+
* What it rests on: the account's one confirmation of this browser (#1939), kept for the session until it is revoked,
|
|
649
|
+
* expires or signs out — not a fresh confirmation per Apply. Whoever uses that verified session (a browser left signed
|
|
650
|
+
* in, its cookie) confirms the same way. A public link never qualifies (evaluateWebAuthority refuses it). General
|
|
651
|
+
* still hears it: a notice, not a step.
|
|
652
|
+
*/
|
|
653
|
+
private settingsSelfConfirmation;
|
|
654
|
+
/** #2170: the Generals a chat card could be posted in (promptSettingsChange's rule): connected, on the platform, unaffected. */
|
|
655
|
+
private settingsNoticeGenerals;
|
|
656
|
+
/**
|
|
657
|
+
* #2170: General's notice of a change confirmed from the web — the first General a chat card could have been posted
|
|
658
|
+
* in, plain text, no mentions. Information only: nothing waits on it.
|
|
659
|
+
*/
|
|
660
|
+
private settingsWebConfirmedNotice;
|
|
591
661
|
/** Exact configured effect owners; this does not depend on prompt location. */
|
|
592
662
|
private settingsChatAuthority;
|
|
593
663
|
private promptSettingsChange;
|
|
@@ -603,9 +673,26 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
603
673
|
sseHeartbeatMs: number;
|
|
604
674
|
/** The dashboard's login codes. Memory only: a code that outlives the process is a code nobody can prove was not copied. */
|
|
605
675
|
private webLoginCodes;
|
|
676
|
+
/**
|
|
677
|
+
* #1920 step 4: guests' codes, apart from the admins' — one per account, so no guest's `/web` withdraws another's or
|
|
678
|
+
* an admin's code (#2093 review), at most 32 at once. Local sign-in only for now (audience "local").
|
|
679
|
+
*/
|
|
680
|
+
private webGuestLoginCodes;
|
|
681
|
+
/** #1920 step 4: when each account last got a guest code (monotonic) — one a minute, so `/web` is no DM flood. */
|
|
682
|
+
private readonly guestCodeAskedAt;
|
|
683
|
+
/** #2093 review: an account's guest /web in progress — one at a time, so two at once cannot both pass the minute. */
|
|
684
|
+
private readonly guestCodeInFlight;
|
|
685
|
+
/**
|
|
686
|
+
* #2093 review: revokes a guest /web in progress must see — every web session's (`/web revoke` from an admin) bumps
|
|
687
|
+
* the global count, an account's own bumps its entry — checked before the code is issued and while it is delivered.
|
|
688
|
+
*/
|
|
689
|
+
private guestRevokes;
|
|
690
|
+
private readonly guestAccountRevokes;
|
|
606
691
|
/** #1570: browsers that may ask the sign-in page for a fresh code, and how often they may. */
|
|
607
692
|
private returningDevices;
|
|
608
693
|
private readonly codeRequestLimiter;
|
|
694
|
+
/** #1920 step 4b: guests' device code requests, limited apart — guests never use up the admins' fleet-wide budget. */
|
|
695
|
+
private readonly guestCodeRequestLimiter;
|
|
609
696
|
/**
|
|
610
697
|
* Set while a Settings apply job is driving the reconcile. The reconcile
|
|
611
698
|
* stays the single doer; it just says out loud what it is doing to whom, so
|
|
@@ -651,6 +738,25 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
651
738
|
/** #1266: the choice, delivered as an ordinary inbound message from whoever made it, and shown in the web chat. */
|
|
652
739
|
private deliverReplyButtonChoice;
|
|
653
740
|
private ensureDeliveryOutbox;
|
|
741
|
+
/** #1918: cross-instance traffic, as the org canvas draws it (fleet-traffic.ts). */
|
|
742
|
+
private readonly trafficLog;
|
|
743
|
+
private readonly delegations;
|
|
744
|
+
private trafficMemo;
|
|
745
|
+
/**
|
|
746
|
+
* One delivery row's traffic item, kept for the snapshot and sent to the open pages when it is news; and the
|
|
747
|
+
* delegation it opens or closes (a task and its report), sent as "delegation".
|
|
748
|
+
*/
|
|
749
|
+
private publishTraffic;
|
|
750
|
+
/**
|
|
751
|
+
* GET /ui/traffic: what is in flight now (the outbox's pending rows) and what finished in the last two minutes, at
|
|
752
|
+
* most TRAFFIC_SNAPSHOT_MAX items. Worked out at most once every two seconds, so the public link's polling (or any
|
|
753
|
+
* number of pages) costs one indexed read per two seconds. Visibility is applied as of now.
|
|
754
|
+
*/
|
|
755
|
+
trafficSnapshot(): {
|
|
756
|
+
now: string;
|
|
757
|
+
items: TrafficItem[];
|
|
758
|
+
delegations: Delegation[];
|
|
759
|
+
};
|
|
654
760
|
/** Synchronous SQLite admission; the caller may acknowledge only after this returns. */
|
|
655
761
|
admitDurableDelivery(input: {
|
|
656
762
|
operationId: string;
|
|
@@ -704,6 +810,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
704
810
|
private hostMemoryIndicator;
|
|
705
811
|
/** Separate cooldown: changing measurements must not create new text-throttle keys. */
|
|
706
812
|
private reportMemoryPressure;
|
|
813
|
+
/**
|
|
814
|
+
* #2015: rescan the largest processes (at most once a minute, one at a time). The first result of an episode, and
|
|
815
|
+
* then at most every 10 minutes, is logged with the pressure; /health and the dashboard read the latest. Never chat.
|
|
816
|
+
*/
|
|
817
|
+
private refreshMemoryTop;
|
|
707
818
|
/** Wire the one fleet-wide storm into notification and recovery surfaces. */
|
|
708
819
|
private bindStormWindowEvents;
|
|
709
820
|
/** What the gate allows while any storm window is open (see SpawnGate.pump). */
|
|
@@ -993,7 +1104,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
993
1104
|
* for `instance` (#1320 part B). Per entry: the channel's own adapter, no
|
|
994
1105
|
* thread, mention suppression on. Returns the number of channels posted
|
|
995
1106
|
* to. Failures are per-entry warn-and-continue — a failed echo never fails
|
|
996
|
-
* the web send.
|
|
1107
|
+
* the web send. Only entries classicWebEchoOn admits are touched (#2054: unset follows web.echo_to_channel; an explicit
|
|
1108
|
+
* `web_echo: false` never echoes).
|
|
997
1109
|
*
|
|
998
1110
|
* Every copy is fenced at start time: an entry whose explicit world is
|
|
999
1111
|
* gone is skipped (only legacy adapterId-less entries fall back to the
|
|
@@ -1004,6 +1116,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1004
1116
|
* already in flight may still land late — the contract permits that.
|
|
1005
1117
|
*/
|
|
1006
1118
|
/** `sender` (#1827): the web person's name, as the room log records them ("web-user" when none). */
|
|
1119
|
+
/**
|
|
1120
|
+
* #1920 §5.2: a web message's channel copy was sent — it is now what the channel saw. Kept so (and on disk), and sent
|
|
1121
|
+
* to the guests' streams only: an admin's page already has it, and nothing about it changed for them.
|
|
1122
|
+
*/
|
|
1123
|
+
webMessageInChannel(instance: string, messageId: string): void;
|
|
1007
1124
|
sendClassicWebEcho(instance: string, text: string, sender?: string): Promise<number>;
|
|
1008
1125
|
/**
|
|
1009
1126
|
* #1666: a delivered web chat message starts the same cancel/progress lifecycle in the instance's topic as a platform
|
|
@@ -1155,8 +1272,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1155
1272
|
startPersistedPausedInstance(name: string, transition?: TransitionHandle): Promise<void>;
|
|
1156
1273
|
/**
|
|
1157
1274
|
* Start instances with configurable concurrency and stagger delay.
|
|
1158
|
-
* Instances sharing the same working_directory are serialized
|
|
1159
|
-
*
|
|
1275
|
+
* Instances sharing the same working_directory are serialized to avoid
|
|
1276
|
+
* config file races. Stagger applies between outer lifecycle admissions.
|
|
1160
1277
|
* TODO: per-instance startup timeout (existing issue, not introduced here)
|
|
1161
1278
|
*/
|
|
1162
1279
|
private startInstancesWithConcurrency;
|
|
@@ -1275,7 +1392,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1275
1392
|
* snapshot use the fleet startup/retry state. */
|
|
1276
1393
|
private readyProgressAdapter;
|
|
1277
1394
|
/** Last-resort completion after RestartProgress could not deliver to its
|
|
1278
|
-
* adopted target
|
|
1395
|
+
* adopted target (or had no message: a small fleet, a failed first post). It
|
|
1396
|
+
* never wakes a not-ready gateway. #2213: an outage at fleet start no longer
|
|
1397
|
+
* loses it — bounded at startup, then retried in the background once the
|
|
1398
|
+
* adapter is ready again, never posted twice after an uncertain attempt. */
|
|
1279
1399
|
private sendFleetStartCompletionFallback;
|
|
1280
1400
|
stopInstance(name: string, transition?: TransitionHandle): Promise<{
|
|
1281
1401
|
backgroundWorkEnded: boolean;
|
|
@@ -1359,6 +1479,20 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1359
1479
|
handle: string;
|
|
1360
1480
|
owner: LoginCodeOwner;
|
|
1361
1481
|
}, current: () => boolean): Promise<void>;
|
|
1482
|
+
/**
|
|
1483
|
+
* #1920 §5.5 (step 4b): a guest signing in through the public link — said in the General of the admin who opened it
|
|
1484
|
+
* (who, how many agents), awaited as an admin's public sign-in is, while that link is the open one, its opener still
|
|
1485
|
+
* current, and the account still an admitted guest. A failure refuses the sign-in.
|
|
1486
|
+
*/
|
|
1487
|
+
confirmGuestPublicWebLogin(info: {
|
|
1488
|
+
label: string;
|
|
1489
|
+
handle: string;
|
|
1490
|
+
account: {
|
|
1491
|
+
adapterId: string;
|
|
1492
|
+
userId: string;
|
|
1493
|
+
};
|
|
1494
|
+
exposureId: string;
|
|
1495
|
+
}, current: () => boolean): Promise<void>;
|
|
1362
1496
|
/** Telegram's typed command enters through the same strict owner and nonce path as Discord. */
|
|
1363
1497
|
dashboardMenu(msg: InboundMessage): Promise<void>;
|
|
1364
1498
|
/**
|
|
@@ -1396,6 +1530,77 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1396
1530
|
count: number;
|
|
1397
1531
|
durable: boolean;
|
|
1398
1532
|
};
|
|
1533
|
+
/**
|
|
1534
|
+
* #1920 phase 3: Settings → Web sign-ins → Guests — the switches, each connection's access mode and the agents named for
|
|
1535
|
+
* an open one, and every guest account (signed in, with a returning device, or narrowed): who, its platform, what it
|
|
1536
|
+
* reaches now, its sessions and devices, and its narrowing. Ids are the accounts' own (an admin's page).
|
|
1537
|
+
*/
|
|
1538
|
+
guestOverview(): {
|
|
1539
|
+
enabled: boolean;
|
|
1540
|
+
chat: boolean;
|
|
1541
|
+
instances: string[];
|
|
1542
|
+
connections: Array<{
|
|
1543
|
+
id: string;
|
|
1544
|
+
type: string;
|
|
1545
|
+
mode: "open" | "allowlist";
|
|
1546
|
+
named: string[];
|
|
1547
|
+
}>;
|
|
1548
|
+
guests: Array<{
|
|
1549
|
+
adapterId: string;
|
|
1550
|
+
userId: string;
|
|
1551
|
+
name: string;
|
|
1552
|
+
platform: string;
|
|
1553
|
+
scope: string[];
|
|
1554
|
+
reach: string[];
|
|
1555
|
+
sessions: number;
|
|
1556
|
+
lastSeen: number | null;
|
|
1557
|
+
devices: number;
|
|
1558
|
+
narrow: string[] | null;
|
|
1559
|
+
}>;
|
|
1560
|
+
};
|
|
1561
|
+
/** #1920 phase 3 (the app shell): a guest's chip — its web name, and its connection's platform (discord, telegram). */
|
|
1562
|
+
guestBadge(owner: {
|
|
1563
|
+
adapterId: string;
|
|
1564
|
+
userId: string;
|
|
1565
|
+
}): {
|
|
1566
|
+
name: string;
|
|
1567
|
+
platform: string;
|
|
1568
|
+
};
|
|
1569
|
+
/** #1920 step 4: whether a `/web` is a guest's — guest sign-in on, and not from a fleet admin (theirs runs as before). */
|
|
1570
|
+
isGuestWebAsk(adapterId: string | undefined, userId: string): boolean;
|
|
1571
|
+
/** #1920 step 4 (auth-api): a guest code's account may still sign in — guests on, and something in its scope now. */
|
|
1572
|
+
guestSignInAllowed(account: {
|
|
1573
|
+
adapterId: string;
|
|
1574
|
+
userId: string;
|
|
1575
|
+
}): boolean;
|
|
1576
|
+
/**
|
|
1577
|
+
* #1920 §5.4: a guest's own `/web revoke` — its sessions and its outstanding code; nobody else's (an admin's revokes
|
|
1578
|
+
* everyone's, as before).
|
|
1579
|
+
*/
|
|
1580
|
+
revokeGuestWebSessions(owner: {
|
|
1581
|
+
adapterId: string;
|
|
1582
|
+
userId: string;
|
|
1583
|
+
}): {
|
|
1584
|
+
count: number;
|
|
1585
|
+
durable: boolean;
|
|
1586
|
+
};
|
|
1587
|
+
/**
|
|
1588
|
+
* #1920 §2.3 (step 4): `/web` from someone who is not a fleet admin, while guest sign-in is on. `revoke` ends their
|
|
1589
|
+
* own guest sessions. Otherwise a guest code (tier guest, bound to this account) goes privately — a DM, else the
|
|
1590
|
+
* slash command's ephemeral answer (`replyPrivately`) — once a minute at most, and only when their scope (from what
|
|
1591
|
+
* they may already use in chat, rooms read at sign-in) holds something. The code itself is never posted where asked.
|
|
1592
|
+
* Callers ask isGuestWebAsk first (synchronously); false here too when it is not a guest's.
|
|
1593
|
+
*/
|
|
1594
|
+
guestWebCommand(ask: {
|
|
1595
|
+
adapterId: string;
|
|
1596
|
+
userId: string;
|
|
1597
|
+
username?: string;
|
|
1598
|
+
arg: string;
|
|
1599
|
+
replyHere: (text: string) => Promise<unknown>;
|
|
1600
|
+
replyPrivately?: (text: string) => Promise<unknown>;
|
|
1601
|
+
}): Promise<boolean>;
|
|
1602
|
+
/** guestWebCommand's issuance, one per account at a time; a revoke made meanwhile (either kind) ends it unissued. */
|
|
1603
|
+
private issueGuestCode;
|
|
1399
1604
|
/** #1570 (auth-api): this browser becomes a returning device of the code's owner. The cookie value, or null. */
|
|
1400
1605
|
rememberReturningDevice(owner: LoginCodeOwner, input: {
|
|
1401
1606
|
surface: "local" | "gateway";
|
|
@@ -1421,12 +1626,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1421
1626
|
} | {
|
|
1422
1627
|
kind: "refused";
|
|
1423
1628
|
}>;
|
|
1629
|
+
/**
|
|
1630
|
+
* #1920 step 4b: a guest's returning device asks for a code — a guest code for that account, by DM only, under the
|
|
1631
|
+
* same rules as its /web (guests on, not an admin, something in scope now; one per account and the cap; one flow per
|
|
1632
|
+
* account at a time; a revoke meanwhile ends it), its own limiter, and the guests' breaker. Asked through the public
|
|
1633
|
+
* link: only while that exposure is the open one (its code then works through it alone), as an admin's device.
|
|
1634
|
+
*/
|
|
1635
|
+
private requestGuestDeviceCode;
|
|
1636
|
+
/** #1920 step 4b (auth-api): this browser becomes a guest's returning device. The cookie value, or null. */
|
|
1637
|
+
rememberGuestDevice(account: {
|
|
1638
|
+
adapterId: string;
|
|
1639
|
+
userId: string;
|
|
1640
|
+
}, input: {
|
|
1641
|
+
surface: "local" | "gateway";
|
|
1642
|
+
label: string;
|
|
1643
|
+
}): string | null;
|
|
1424
1644
|
/** Called by the sign-in endpoint: a login the operator did not make should be visible to them. */
|
|
1425
1645
|
onWebLogin(info: {
|
|
1426
1646
|
label: string;
|
|
1427
1647
|
surface: "local" | "gateway";
|
|
1428
1648
|
tier: string;
|
|
1429
1649
|
handle: string;
|
|
1650
|
+
owner?: {
|
|
1651
|
+
adapterId: string;
|
|
1652
|
+
userId: string;
|
|
1653
|
+
};
|
|
1430
1654
|
}): void;
|
|
1431
1655
|
getDashboardAccess(): {
|
|
1432
1656
|
ready: boolean;
|
|
@@ -1497,8 +1721,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1497
1721
|
private sweepOrphanedWebUploads;
|
|
1498
1722
|
/** Start the shared channel adapter(s) for topic mode */
|
|
1499
1723
|
private startSharedAdapter;
|
|
1500
|
-
/**
|
|
1724
|
+
/** Keep trying while the fleet runs, with a five-minute cap even after a long outage. */
|
|
1501
1725
|
private scheduleAdapterRetry;
|
|
1726
|
+
/** One login per connection, shared by the background timer and the operator's Retry now. */
|
|
1727
|
+
private attemptAdapterRetry;
|
|
1728
|
+
retryAdapterNow(adapterId: string): {
|
|
1729
|
+
queued: boolean;
|
|
1730
|
+
already_running?: boolean;
|
|
1731
|
+
};
|
|
1502
1732
|
/** Notify admin about adapter failure (uses any available adapter). */
|
|
1503
1733
|
private notifyAdapterFailure;
|
|
1504
1734
|
/** Notify admin that a retried adapter reconnected. */
|
|
@@ -1545,7 +1775,10 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1545
1775
|
* reported separately because they differ by ~60x and only one of them can
|
|
1546
1776
|
* show a fleet-manager leak. */
|
|
1547
1777
|
memory: FleetMemory;
|
|
1548
|
-
hostMemory: MemoryPressureSnapshot
|
|
1778
|
+
hostMemory: MemoryPressureSnapshot & {
|
|
1779
|
+
topProcesses?: MemoryHog[];
|
|
1780
|
+
topProcessesAt?: string;
|
|
1781
|
+
};
|
|
1549
1782
|
problems: string[];
|
|
1550
1783
|
};
|
|
1551
1784
|
/** Start the primary adapter (backward-compatible, sets this.adapter) */
|
|
@@ -1697,6 +1930,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1697
1930
|
*/
|
|
1698
1931
|
private inboundNoticeAdapter;
|
|
1699
1932
|
private handleInboundMessageCore;
|
|
1933
|
+
/**
|
|
1934
|
+
* A person's platform message as the web chat shows it — the user's own words, as a user (#1306), in the instance's
|
|
1935
|
+
* history (#1565). #1920 §5.2: said in the instance's topic, General or room, so it is that channel's, by that account.
|
|
1936
|
+
*/
|
|
1937
|
+
private emitPlatformInbound;
|
|
1700
1938
|
/** Handle outbound tool calls from a daemon instance */
|
|
1701
1939
|
/** Warn (but don't block) when rate limits are high. 30-min debounce per instance. */
|
|
1702
1940
|
private rateLimitWarnedAt;
|
|
@@ -1739,6 +1977,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1739
1977
|
/** On a fleet with no chat platform, the dashboard is where an instance-health prompt is posted (#1307 item 6). */
|
|
1740
1978
|
private webOnlyPromptPlace;
|
|
1741
1979
|
/** Resolves when the reply is in the web chat (#1770: after its files are copied); the caller need not wait. */
|
|
1980
|
+
/**
|
|
1981
|
+
* #1920 §5.2: whether a platform send landed in the instance's own place — its ClassicBot room, or its topic in its
|
|
1982
|
+
* connection's group — so its channel's members saw it. Anything else (another chat, a DM, a context left from General,
|
|
1983
|
+
* an answer without the chat it went to) is not the channel's.
|
|
1984
|
+
*/
|
|
1985
|
+
private landedInOwnChannel;
|
|
1986
|
+
/** #1920 §5.2 (#2085 review): a platform click's buttons are in the instance's own place — else not its channel's. */
|
|
1987
|
+
private clickInOwnChannel;
|
|
1742
1988
|
private afterReplyRouted;
|
|
1743
1989
|
/**
|
|
1744
1990
|
* #1770: a reply's files as the web chat shows them. Each is copied into the instance's web-files/ and served from
|
|
@@ -1924,6 +2170,12 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
1924
2170
|
private slimFleetConfigAtStartup;
|
|
1925
2171
|
private writeFleetConfigBackup;
|
|
1926
2172
|
private patchFleetDocument;
|
|
2173
|
+
/**
|
|
2174
|
+
* #2208: before every write to the raw document — the place is unshared first (an alias on the way becomes its own
|
|
2175
|
+
* copy; an anchor's other aliases get theirs), so the write changes that place only; and it is recorded for the
|
|
2176
|
+
* save's check that nothing else changed.
|
|
2177
|
+
*/
|
|
2178
|
+
private writingFleetDocument;
|
|
1927
2179
|
getSettingsConfigPath(): string;
|
|
1928
2180
|
removeInstance(name: string, authorization: ExplicitInstanceRemoval, execution?: SettingsExecution): Promise<void>;
|
|
1929
2181
|
private removeInstanceOwned;
|
|
@@ -2001,6 +2253,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2001
2253
|
private guildEmojiCache;
|
|
2002
2254
|
private guildEmojiFetches;
|
|
2003
2255
|
private webImageCaches;
|
|
2256
|
+
/** Server emoji whose picture fetch failure was already logged at warn (once each; bounded). */
|
|
2257
|
+
private readonly webEmojiFailures;
|
|
2004
2258
|
private webImageCache;
|
|
2005
2259
|
/**
|
|
2006
2260
|
* The bots instances and ClassicBot rooms speak through, by connections configured now (a connection removed from
|
|
@@ -2371,6 +2625,22 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2371
2625
|
* (cache-service.ts) — never a vendor call, never a synchronous transcript read.
|
|
2372
2626
|
*/
|
|
2373
2627
|
cacheReport(window: string): Promise<CacheReport>;
|
|
2628
|
+
/**
|
|
2629
|
+
* #2122 §5.1: the profile the usage read now is tagged with — the claude profile whose config dir is read ("default"
|
|
2630
|
+
* without one); codex "unrecorded" (its rollouts don't say which login wrote them).
|
|
2631
|
+
*/
|
|
2632
|
+
private usageProfileOf;
|
|
2633
|
+
/** #2122: the fleet's day boundary zone — defaults.scheduler.default_timezone, else this host's. */
|
|
2634
|
+
usageZone(): string;
|
|
2635
|
+
/**
|
|
2636
|
+
* #2122: the usage report (usage-report.ts) — from the ledgers and rollups as they are now and the delivered-message
|
|
2637
|
+
* counts; never a transcript read. `only`: just that instance (an ordinary agent's own row).
|
|
2638
|
+
*/
|
|
2639
|
+
usageReport(params: {
|
|
2640
|
+
range: import("./usage-report.js").UsageRange;
|
|
2641
|
+
group: import("./usage-report.js").UsageGroup;
|
|
2642
|
+
only?: string;
|
|
2643
|
+
}): Promise<import("./usage-report.js").UsageReport>;
|
|
2374
2644
|
/** #2001: get_cache_report's — the same report, as last worked out (reused for a minute, until the next pass). */
|
|
2375
2645
|
cacheReportPublished(window: string): Promise<CacheReport>;
|
|
2376
2646
|
private cacheServiceFor;
|
|
@@ -2424,6 +2694,8 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2424
2694
|
key: string;
|
|
2425
2695
|
userId: string;
|
|
2426
2696
|
name: string;
|
|
2697
|
+
guest?: true;
|
|
2698
|
+
authority?: HumanAuthority;
|
|
2427
2699
|
}): Promise<{
|
|
2428
2700
|
status: 200 | 400 | 403 | 409;
|
|
2429
2701
|
error?: string;
|
|
@@ -2461,6 +2733,100 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2461
2733
|
private readonly webBackendTokens;
|
|
2462
2734
|
/** #1269: the web's /clear confirmations — one token per question, used once, for the instance as it was asked about. */
|
|
2463
2735
|
private readonly webClearTokens;
|
|
2736
|
+
/**
|
|
2737
|
+
* #1939 S1: the design's §3 for one web request (authority/web-authority.ts), with this fleet's admins, policy and
|
|
2738
|
+
* token; `instance` once the body has named it. Observe only: receipts record it, no agent acts on it yet.
|
|
2739
|
+
*/
|
|
2740
|
+
webAuthority(input: {
|
|
2741
|
+
session: SessionRecord | null;
|
|
2742
|
+
gateway: boolean;
|
|
2743
|
+
peer: WebPeer;
|
|
2744
|
+
instance?: string;
|
|
2745
|
+
}): WebAuthorityResult;
|
|
2746
|
+
private sessionAuthorizations;
|
|
2747
|
+
private sessionAuthorizationStore;
|
|
2748
|
+
/**
|
|
2749
|
+
* #1939 §0: record that a session's account has authorized it — called only once that account has confirmed on Discord
|
|
2750
|
+
* or Telegram (S2b). The session must qualify now (§3, as a message from it would be judged); then every message,
|
|
2751
|
+
* click, /steer and /btw from it is web-verified until max_session_hours after now, the session ends, or a revocation.
|
|
2752
|
+
* Ones no longer worth keeping (their session gone, an old epoch, run out) are dropped on the way.
|
|
2753
|
+
*/
|
|
2754
|
+
authorizeWebSession(session: SessionRecord, peer: WebPeer, gateway: boolean): {
|
|
2755
|
+
ok: true;
|
|
2756
|
+
authorization: SessionAuthorization;
|
|
2757
|
+
durable: boolean;
|
|
2758
|
+
} | {
|
|
2759
|
+
ok: false;
|
|
2760
|
+
refusal: WebAuthorityRefusal;
|
|
2761
|
+
};
|
|
2762
|
+
private authorityStateStore;
|
|
2763
|
+
/**
|
|
2764
|
+
* #1939 §10: the switch, "Only this computer can authorize" and the revocation epoch in force for the configuration as
|
|
2765
|
+
* it is now (a change since last seen moves the epoch first; authority-state.ts). No data directory: off.
|
|
2766
|
+
*/
|
|
2767
|
+
webAuthorityState(): AuthorityState;
|
|
2768
|
+
/**
|
|
2769
|
+
* #1939 S2a: Settings → Web → Web authority — the state in force (the switch counts as off while its state cannot be
|
|
2770
|
+
* written), what fleet.yaml says, the hosts that make the dashboard reachable from elsewhere (the warning while
|
|
2771
|
+
* loopback_only is off), and the sessions authorized now (§0): each one's device, account, and when it runs out.
|
|
2772
|
+
*/
|
|
2773
|
+
webAuthorityOverview(): {
|
|
2774
|
+
state: AuthorityState;
|
|
2775
|
+
configured: WebVerifiedAuthorityConfig;
|
|
2776
|
+
hours: typeof VERIFIED_SESSION_HOURS;
|
|
2777
|
+
lanHosts: string[];
|
|
2778
|
+
authorized: Array<{
|
|
2779
|
+
handle: string;
|
|
2780
|
+
label: string;
|
|
2781
|
+
account: string;
|
|
2782
|
+
authorizedAt: number;
|
|
2783
|
+
until: number;
|
|
2784
|
+
}>;
|
|
2785
|
+
};
|
|
2786
|
+
private authorizationRequests;
|
|
2787
|
+
/**
|
|
2788
|
+
* #1939 S2b (§0.1): "Authorize this browser" — the Confirm card in the account's DM. Confirm runs §3 again at the tap
|
|
2789
|
+
* (authorizeWebSession on the session read again by its handle); Not me signs the session out.
|
|
2790
|
+
*/
|
|
2791
|
+
sessionAuthorizationRequests(): SessionAuthorizationRequests;
|
|
2792
|
+
/** #1939 S2b: the web session asks to be authorized (the request judged by §3 first — as it will be again at the tap). */
|
|
2793
|
+
requestSessionAuthorization(input: {
|
|
2794
|
+
session: SessionRecord | null;
|
|
2795
|
+
gateway: boolean;
|
|
2796
|
+
peer: WebPeer;
|
|
2797
|
+
}): Promise<{
|
|
2798
|
+
ok: true;
|
|
2799
|
+
expiresInMs: number;
|
|
2800
|
+
} | {
|
|
2801
|
+
ok: false;
|
|
2802
|
+
refusal: AuthorizationAskRefusal;
|
|
2803
|
+
retryAfterMs?: number;
|
|
2804
|
+
}>;
|
|
2805
|
+
/**
|
|
2806
|
+
* #1939 §3 without the authorization: would this request's session qualify to be authorized? null: yes; otherwise the
|
|
2807
|
+
* first check it fails (for the app to say why it can't be authorized here).
|
|
2808
|
+
*/
|
|
2809
|
+
private webAuthorityQualifies;
|
|
2810
|
+
/** #1939 S2b: what the app shows for this browser — verified (until when), a card pending, or why not. */
|
|
2811
|
+
webSessionAuthorization(input: {
|
|
2812
|
+
session: SessionRecord | null;
|
|
2813
|
+
gateway: boolean;
|
|
2814
|
+
peer: WebPeer;
|
|
2815
|
+
}): {
|
|
2816
|
+
state: "verified";
|
|
2817
|
+
until: number;
|
|
2818
|
+
} | {
|
|
2819
|
+
state: "pending";
|
|
2820
|
+
expiresInMs: number;
|
|
2821
|
+
} | {
|
|
2822
|
+
state: "none";
|
|
2823
|
+
reason: WebAuthorityRefusal;
|
|
2824
|
+
};
|
|
2825
|
+
/** #1939 §10: revoke every web authority given so far (receipts read as none), without signing anyone out. */
|
|
2826
|
+
revokeWebAuthority(): {
|
|
2827
|
+
epoch: number;
|
|
2828
|
+
durable: boolean;
|
|
2829
|
+
};
|
|
2464
2830
|
/** #1269: an instance's chat command from the web chat (web-commands.ts); `publicLink`: a gateway request. */
|
|
2465
2831
|
webCommand(input: {
|
|
2466
2832
|
instance: string;
|
|
@@ -2470,6 +2836,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2470
2836
|
}, opts: {
|
|
2471
2837
|
publicLink: boolean;
|
|
2472
2838
|
person?: Pick<WebPersonView, "userId" | "name">;
|
|
2839
|
+
authority?: HumanAuthority;
|
|
2473
2840
|
}): Promise<WebCommandResult>;
|
|
2474
2841
|
/** Consume `/clear` Confirm/Cancel exactly once; only Confirm reaches IPC. */
|
|
2475
2842
|
private handleClearConfirmation;
|
|
@@ -2698,6 +3065,23 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2698
3065
|
*/
|
|
2699
3066
|
private readonly loginWindow;
|
|
2700
3067
|
private get webLogin();
|
|
3068
|
+
/** #2233: sign-ins started from the web dashboard (local admin sessions), on the same controller as chat's. */
|
|
3069
|
+
private webBackendLoginsInstance;
|
|
3070
|
+
get webBackendLogins(): WebBackendLogins;
|
|
3071
|
+
/** #2233: the login a paused-for-sign-in instance needs, when the dashboard can sign it in. */
|
|
3072
|
+
private signInFor;
|
|
3073
|
+
/**
|
|
3074
|
+
* #2233: Settings → Agents' sign-in list — every backend's default login as the availability snapshot has it, then
|
|
3075
|
+
* each credential profile an agent uses (its own login state, read offline).
|
|
3076
|
+
*/
|
|
3077
|
+
backendSignInTargets(): SignInTarget[];
|
|
3078
|
+
/** #2233: the session with this handle is live, admin, local and of the current dashboard token. */
|
|
3079
|
+
private isLocalAdminSession;
|
|
3080
|
+
/**
|
|
3081
|
+
* #2233: `/login` for a dashboard requester. The same controller and checks; a CLI that is not installed is refused
|
|
3082
|
+
* with its install command (chat's install-first runs a terminal of its own, which the dashboard does not offer).
|
|
3083
|
+
*/
|
|
3084
|
+
private startWebDashboardLogin;
|
|
2701
3085
|
/**
|
|
2702
3086
|
* Post the backend chooser for a bare `/login`. Caller enforces admin.
|
|
2703
3087
|
* Returns why the chooser could not be posted, for the caller to tell the
|
|
@@ -2826,6 +3210,15 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2826
3210
|
private adoptBinaryDirectory;
|
|
2827
3211
|
/** Discord native `/login` slash — shared by every adapter dispatch block. */
|
|
2828
3212
|
private handleLoginSlash;
|
|
3213
|
+
/** #2293: whose cross-instance messages search leaves out now (web-api /ui/search). */
|
|
3214
|
+
searchVisibility(): XmsgVisibility;
|
|
3215
|
+
/** #2293: a cross-instance message for the search index (outbound-handlers, after it was admitted). */
|
|
3216
|
+
indexCrossInstance(record: CrossInstanceRecord): void;
|
|
3217
|
+
/**
|
|
3218
|
+
* #2293: the global search index, at fleet start — after the web chat is restored (the backfill reads it). Its worker
|
|
3219
|
+
* owns search.db; see search-index.ts. Off with web.search.enabled: false.
|
|
3220
|
+
*/
|
|
3221
|
+
private startSearchIndex;
|
|
2829
3222
|
queueMirrorMessage(text: string): void;
|
|
2830
3223
|
/**
|
|
2831
3224
|
* #1565: restore the web chat history of the configured instances from disk and keep writing it back. A file that
|
|
@@ -2838,6 +3231,16 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2838
3231
|
private publishEffectTrial;
|
|
2839
3232
|
/** Push an SSE event to all connected Web UI clients. */
|
|
2840
3233
|
emitSseEvent(event: string, data: unknown): void;
|
|
3234
|
+
/**
|
|
3235
|
+
* The task board's live side: every committed change goes to the open pages (never to a guest) — the board's new
|
|
3236
|
+
* revision and the card numbers it touched; not who touched them (the page does not need it, and a public-link page
|
|
3237
|
+
* must not learn a hidden instance's name from it). Its news goes to the instances whose cards someone else changed:
|
|
3238
|
+
* one "[Task board]" notice per instance, gathered for 10 s, held by the delivery outbox until it is taken
|
|
3239
|
+
* (task-board-waker.ts).
|
|
3240
|
+
*/
|
|
3241
|
+
private attachTaskBoard;
|
|
3242
|
+
/** A task board notice, as AgEnD's own (not a person's words): through the delivery outbox, held until delivered. */
|
|
3243
|
+
private admitTaskBoardNotice;
|
|
2841
3244
|
listClaimedTasks(assignee: string): Array<{
|
|
2842
3245
|
id: string;
|
|
2843
3246
|
title: string;
|
|
@@ -2937,8 +3340,14 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2937
3340
|
private pasteRawToClassicInstance;
|
|
2938
3341
|
/** Resolve the backend name configured for an instance (fleet or classic). */
|
|
2939
3342
|
private backendNameForInstance;
|
|
3343
|
+
/**
|
|
3344
|
+
* #2072: a catalog is the account's, so a credential profile has its own. Only claude-code's probe reads an account
|
|
3345
|
+
* catalog through a profile's login (its `GET /v1/models` with the profile's token); other backends' probes read the
|
|
3346
|
+
* process environment, so their catalog stays the backend's own.
|
|
3347
|
+
*/
|
|
3348
|
+
private catalogProfile;
|
|
2940
3349
|
private cliEnvPath;
|
|
2941
|
-
/** Read the cached CLI env for a backend, or null if missing/stale/unparseable. */
|
|
3350
|
+
/** Read the cached CLI env for a backend (a credential profile's own, when given), or null if missing/stale/unparseable. */
|
|
2942
3351
|
private readCliEnv;
|
|
2943
3352
|
/** Return cached CLI versions immediately. Refresh is started after /sysinfo is sent. */
|
|
2944
3353
|
getBackendCliVersionSnapshot(): BackendCliVersionSnapshot;
|
|
@@ -2969,6 +3378,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
2969
3378
|
};
|
|
2970
3379
|
/** Human-readable effective model, e.g. `auto (default)`. Used by /ctx. */
|
|
2971
3380
|
modelDisplayForInstance(instanceName: string): string;
|
|
3381
|
+
/**
|
|
3382
|
+
* #2072: the model an instance runs is always among its choices — one its CLI's catalog does not list (an older
|
|
3383
|
+
* name, a custom provider's, a typed one) is shown first, marked, so the menu never hides what is running.
|
|
3384
|
+
*/
|
|
3385
|
+
private withCurrentModel;
|
|
2972
3386
|
private modelChoiceLabel;
|
|
2973
3387
|
/** Preserve the existing cache merge rules for worker probes. */
|
|
2974
3388
|
private persistCliEnvProbeResult;
|
|
@@ -3142,8 +3556,31 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3142
3556
|
private prospectiveCodexModel;
|
|
3143
3557
|
/** #1811: whether a launch of `backend` here would pass a level: the same gate its builder applies. */
|
|
3144
3558
|
private launchEffortGate;
|
|
3145
|
-
/**
|
|
3146
|
-
|
|
3559
|
+
/**
|
|
3560
|
+
* #2072: what this host can run, from the published availability snapshot (backend-availability.ts). Read only: a
|
|
3561
|
+
* handler never starts a probe, not even in the background — launch, the timer, and /login install or sign-in do.
|
|
3562
|
+
*/
|
|
3563
|
+
backendAvailabilityRows(): BackendAvailability[];
|
|
3564
|
+
/**
|
|
3565
|
+
* #2072 part 3: the models a Settings field offers for `backend` — the cached catalog (an instance's own credential
|
|
3566
|
+
* profile's, when it is named and has one), claude's account catalog included. Read only: never a probe.
|
|
3567
|
+
*/
|
|
3568
|
+
modelCatalogFor(backend: string, instance: string | null): import("./backend/types.js").ModelOption[];
|
|
3569
|
+
/**
|
|
3570
|
+
* #2072 (#2078 review): the snapshot as THIS instance would see it. Its sign-in on a backend is its own credential
|
|
3571
|
+
* profile's when it has one there — the host's default login says nothing about it. A profile's login is a file check
|
|
3572
|
+
* (credentialProfileLogin), no process.
|
|
3573
|
+
*/
|
|
3574
|
+
backendAvailabilityFor(instanceName: string): BackendAvailability[];
|
|
3575
|
+
/** The probes the snapshot runs (tests replace them: no CLI, no account, no network). */
|
|
3576
|
+
availabilityProbes: AvailabilityProbes;
|
|
3577
|
+
private availabilityStore;
|
|
3578
|
+
private availabilityTimer;
|
|
3579
|
+
get backendAvailability(): BackendAvailabilityStore;
|
|
3580
|
+
/** A launch need not look the binary up again (a synchronous `which` on the loop) when the snapshot found it. */
|
|
3581
|
+
private noteAvailabilityPaths;
|
|
3582
|
+
/** Probe now and then every AVAILABILITY_STALE_MS; a pass that finds nothing changed starts no CLI. */
|
|
3583
|
+
private startAvailabilityRefresh;
|
|
3147
3584
|
/** The models `/model` would offer on a backend: the cached CLI env, else (live) a bounded probe. Never throws. */
|
|
3148
3585
|
private backendModelOptions;
|
|
3149
3586
|
/**
|
|
@@ -3188,6 +3625,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3188
3625
|
private findClassicApprovalGeneral;
|
|
3189
3626
|
/** Return a user-facing blocker without mutating ClassicBot state. */
|
|
3190
3627
|
private validateClassicStart;
|
|
3628
|
+
/** #2072: from the published snapshot (no `which` on the loop); not checked yet counts as installed (no false alarm). */
|
|
3191
3629
|
private isBackendInstalled;
|
|
3192
3630
|
private getMissingBackendWarning;
|
|
3193
3631
|
/** Handle Discord's required static slash choice, warning before a likely startup failure. */
|
|
@@ -3214,6 +3652,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3214
3652
|
* settles, so a later genuine stop (after a restart) still does the work.
|
|
3215
3653
|
*/
|
|
3216
3654
|
stopAll(): Promise<void>;
|
|
3655
|
+
private tmuxExecHelperTimer;
|
|
3217
3656
|
private stopAllInFlight;
|
|
3218
3657
|
private doStopAll;
|
|
3219
3658
|
/**
|
|
@@ -3483,6 +3922,56 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3483
3922
|
* Only the parsed host name is logged, never the raw header.
|
|
3484
3923
|
*/
|
|
3485
3924
|
private noteRejectedHost;
|
|
3925
|
+
/**
|
|
3926
|
+
* #1920 §3: the instances a guest session may see — derived on every request from the account's chat access, never
|
|
3927
|
+
* stored; nothing while `web.guests.enabled` is not true.
|
|
3928
|
+
* - Its connection's fleet topics and General (what it may talk to in chat): when that connection's access lets the
|
|
3929
|
+
* account in (AccessManager.isAllowed — allowed_users or paired). An `open` connection lets everyone in, so it gives
|
|
3930
|
+
* only the instances an admin named for its guests (`web.guests.open_instances`; the user's decision: least
|
|
3931
|
+
* privilege, as an open group has no list of people).
|
|
3932
|
+
* - A Telegram private ClassicBot room that is the account's own (its chat id is the user id).
|
|
3933
|
+
* - A ClassicBot group or guild room on its connection: only while its membership is verified (§3.2 — a "member"
|
|
3934
|
+
* answer read in the background, at most 15 minutes old; unknown, failed or stale hides it).
|
|
3935
|
+
* - Then an admin's narrowing (`web.guests.narrow`), which only takes away.
|
|
3936
|
+
* A fleet admin is not a guest: an admin outside the connection's access gets nothing here (admins sign in as admins).
|
|
3937
|
+
*/
|
|
3938
|
+
guestScope(owner: {
|
|
3939
|
+
readonly adapterId: string;
|
|
3940
|
+
readonly userId: string;
|
|
3941
|
+
} | undefined): ReadonlySet<string>;
|
|
3942
|
+
/**
|
|
3943
|
+
* #1920 (#2104 review): what an account reaches before an admin's narrowing — its connection's topics (an open one's
|
|
3944
|
+
* named agents), its own Telegram private room, its verified group rooms. Narrowing can only take from this set, so it
|
|
3945
|
+
* is what Settings offers to narrow to. Empty while guest sign-in is off.
|
|
3946
|
+
*/
|
|
3947
|
+
private guestReach;
|
|
3948
|
+
/**
|
|
3949
|
+
* #1920 §3.5: a guest session still admitted — current, with something in scope. A scope that became empty (guest
|
|
3950
|
+
* sign-in off, the account removed from the connection's access, everything narrowed away) ends the session here,
|
|
3951
|
+
* so the next request and the open stream find it gone.
|
|
3952
|
+
*/
|
|
3953
|
+
private guestStillAdmitted;
|
|
3954
|
+
/**
|
|
3955
|
+
* The same, with a third answer (§3.2): "pending" — nothing in scope now, but a room's membership is not read yet
|
|
3956
|
+
* (a restart, a room just created). The request is refused and the session kept; its read starts in the background.
|
|
3957
|
+
*/
|
|
3958
|
+
private guestAdmission;
|
|
3959
|
+
/** #1920 §3.2: the membership answers; the read goes to the room's own connection, never waits past its deadline. */
|
|
3960
|
+
private guestRooms;
|
|
3961
|
+
/** #1920 §3.2: read this guest's rooms that are due (GuestRoomMembership.refresh says when each mode reads). */
|
|
3962
|
+
private refreshGuestRooms;
|
|
3963
|
+
/** Every account with a live guest session, one after another (the guest caps bound them); one pass at a time. */
|
|
3964
|
+
private refreshAllGuestRooms;
|
|
3965
|
+
private guestRoomsPass;
|
|
3966
|
+
/**
|
|
3967
|
+
* #1920 §3.5: guest sign-in turned off ends every guest session — checked when the configuration is read or saved
|
|
3968
|
+
* and when the sessions are opened, so turning it back on never revives one.
|
|
3969
|
+
*/
|
|
3970
|
+
private enforceGuestSwitch;
|
|
3971
|
+
/** #1920 §5.2: whether this instance is the account's own Telegram private ClassicBot room (its chat id is the user id). */
|
|
3972
|
+
private guestOwnRoom;
|
|
3973
|
+
/** A private room's chat id is its one user's id (a group's is negative, so never equal); Telegram only. */
|
|
3974
|
+
private isOwnPrivateRoom;
|
|
3486
3975
|
/** Shared handler dispatcher; gateway admission is enforced by its separate listener. */
|
|
3487
3976
|
private dispatchWebHttp;
|
|
3488
3977
|
private startHealthServer;
|
|
@@ -3504,6 +3993,7 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
3504
3993
|
previewForUi(hostHeader: string | undefined, secure: boolean): PreviewAvailability & {
|
|
3505
3994
|
boot: string | null;
|
|
3506
3995
|
};
|
|
3996
|
+
private previewNotListening;
|
|
3507
3997
|
/**
|
|
3508
3998
|
* #1723: for one page of the public link (exposure `exposureId`, at `dashboardOrigin`): its own preview tunnel's
|
|
3509
3999
|
* origin once up, "starting" until then, why it failed if it did — or a configured web.preview_origin, used instead.
|