@songsid/agend 2.1.12 → 2.2.0-alpha.2
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 +4 -2
- package/README.zh-TW.md +4 -2
- package/dist/agent-cli.js +6 -1
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +68 -12
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-token-header.d.ts +13 -0
- package/dist/agent-token-header.js +16 -0
- package/dist/agent-token-header.js.map +1 -0
- package/dist/auth/one-time-code.d.ts +19 -0
- package/dist/auth/one-time-code.js +49 -0
- package/dist/auth/one-time-code.js.map +1 -0
- package/dist/auth-api.d.ts +52 -0
- package/dist/auth-api.js +346 -0
- package/dist/auth-api.js.map +1 -0
- package/dist/backend/antigravity.js +4 -3
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +4 -0
- package/dist/backend/claude-code.js +97 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.js +59 -30
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok.js +1 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro-agent.d.ts +66 -0
- package/dist/backend/kiro-agent.js +302 -0
- package/dist/backend/kiro-agent.js.map +1 -0
- package/dist/backend/kiro-identity.d.ts +80 -0
- package/dist/backend/kiro-identity.js +537 -0
- package/dist/backend/kiro-identity.js.map +1 -0
- package/dist/backend/kiro-v2-store-worker.d.ts +1 -0
- package/dist/backend/kiro-v2-store-worker.js +87 -0
- package/dist/backend/kiro-v2-store-worker.js.map +1 -0
- package/dist/backend/kiro-v2-store.d.ts +54 -0
- package/dist/backend/kiro-v2-store.js +131 -0
- package/dist/backend/kiro-v2-store.js.map +1 -0
- package/dist/backend/kiro-v3-identity.d.ts +5 -0
- package/dist/backend/kiro-v3-identity.js +22 -0
- package/dist/backend/kiro-v3-identity.js.map +1 -1
- package/dist/backend/kiro.d.ts +90 -7
- package/dist/backend/kiro.js +500 -124
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.js +1 -1
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +51 -3
- package/dist/backend/types.js.map +1 -1
- package/dist/cache-analysis.d.ts +92 -0
- package/dist/cache-analysis.js +147 -0
- package/dist/cache-analysis.js.map +1 -0
- package/dist/cache-ledger.d.ts +108 -0
- package/dist/cache-ledger.js +230 -0
- package/dist/cache-ledger.js.map +1 -0
- package/dist/cache-prices.d.ts +32 -0
- package/dist/cache-prices.js +73 -0
- package/dist/cache-prices.js.map +1 -0
- package/dist/cache-scan.d.ts +39 -0
- package/dist/cache-scan.js +115 -0
- package/dist/cache-scan.js.map +1 -0
- package/dist/cache-service.d.ts +115 -0
- package/dist/cache-service.js +417 -0
- package/dist/cache-service.js.map +1 -0
- package/dist/channel/adapters/discord.d.ts +1 -0
- package/dist/channel/adapters/discord.js +29 -10
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +1 -0
- package/dist/channel/adapters/telegram.js +13 -1
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/types.d.ts +9 -1
- package/dist/classic-channel-manager.d.ts +18 -10
- package/dist/classic-channel-manager.js +45 -18
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli-entry.d.ts +19 -0
- package/dist/cli-entry.js +36 -0
- package/dist/cli-entry.js.map +1 -0
- package/dist/cli.js +471 -146
- package/dist/cli.js.map +1 -1
- package/dist/command-table.d.ts +5 -3
- package/dist/command-table.js +29 -27
- package/dist/command-table.js.map +1 -1
- package/dist/config-validator.js +46 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/connection-secrets.d.ts +6 -0
- package/dist/connection-secrets.js +4 -0
- package/dist/connection-secrets.js.map +1 -1
- package/dist/daemon.d.ts +95 -4
- package/dist/daemon.js +748 -111
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.d.ts +6 -1
- package/dist/darwin-memory.js +17 -6
- package/dist/darwin-memory.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +85 -0
- package/dist/delivery-consumed-watch.js +244 -0
- package/dist/delivery-consumed-watch.js.map +1 -0
- package/dist/delivery-outbox.d.ts +61 -0
- package/dist/delivery-outbox.js +120 -2
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +14 -5
- package/dist/delivery-reconciliation.js +27 -4
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/delivery-reconciliation.test.js +35 -1
- package/dist/delivery-reconciliation.test.js.map +1 -1
- package/dist/event-log.d.ts +4 -1
- package/dist/event-log.js +6 -3
- package/dist/event-log.js.map +1 -1
- package/dist/event-loop-watch.d.ts +28 -0
- package/dist/event-loop-watch.js +75 -3
- package/dist/event-loop-watch.js.map +1 -1
- package/dist/fleet-context.d.ts +22 -2
- package/dist/fleet-control-audit.d.ts +5 -0
- package/dist/fleet-control-audit.js +7 -0
- package/dist/fleet-control-audit.js.map +1 -1
- package/dist/fleet-level-config.d.ts +2 -2
- package/dist/fleet-level-config.js +28 -1
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +339 -12
- package/dist/fleet-manager.js +2623 -461
- package/dist/fleet-manager.js.map +1 -1
- package/dist/full-restart.js +2 -3
- package/dist/full-restart.js.map +1 -1
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -1
- package/dist/host-memory.d.ts +4 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/install-lock.d.ts +49 -0
- package/dist/install-lock.js +200 -0
- package/dist/install-lock.js.map +1 -0
- package/dist/instance-config-impact.js +8 -2
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +10 -5
- package/dist/instance-lifecycle.js +162 -53
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +164 -16
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +2 -0
- package/dist/login-controller.js +17 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/memory-pressure.d.ts +7 -8
- package/dist/memory-pressure.js +76 -15
- package/dist/memory-pressure.js.map +1 -1
- package/dist/monotonic-budget.d.ts +2 -0
- package/dist/monotonic-budget.js +28 -0
- package/dist/monotonic-budget.js.map +1 -0
- package/dist/needs-you-hub.d.ts +114 -0
- package/dist/needs-you-hub.js +370 -0
- package/dist/needs-you-hub.js.map +1 -0
- package/dist/needs-you-live.d.ts +116 -0
- package/dist/needs-you-live.js +228 -0
- package/dist/needs-you-live.js.map +1 -0
- package/dist/needs-you.d.ts +132 -0
- package/dist/needs-you.js +164 -0
- package/dist/needs-you.js.map +1 -0
- package/dist/node-version-guard.d.ts +30 -0
- package/dist/node-version-guard.js +50 -0
- package/dist/node-version-guard.js.map +1 -0
- package/dist/operator-control-paths.d.ts +4 -0
- package/dist/operator-control-paths.js +24 -0
- package/dist/operator-control-paths.js.map +1 -0
- package/dist/outbound-handlers.d.ts +2 -0
- package/dist/outbound-handlers.js +9 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +5 -5
- package/dist/outbound-schemas.js +1 -1
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/package-preimage.d.ts +26 -0
- package/dist/package-preimage.js +96 -0
- package/dist/package-preimage.js.map +1 -0
- package/dist/profile-control.js +4 -20
- package/dist/profile-control.js.map +1 -1
- package/dist/public-web-gateway.d.ts +18 -0
- package/dist/public-web-gateway.js +141 -0
- package/dist/public-web-gateway.js.map +1 -0
- package/dist/public-web-link.d.ts +53 -0
- package/dist/public-web-link.js +175 -0
- package/dist/public-web-link.js.map +1 -0
- package/dist/quickstart-api.d.ts +8 -1
- package/dist/quickstart-api.js +86 -48
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +1 -0
- package/dist/quickstart.js +16 -6
- package/dist/quickstart.js.map +1 -1
- package/dist/restart-guard.d.ts +52 -0
- package/dist/restart-guard.js +109 -0
- package/dist/restart-guard.js.map +1 -0
- package/dist/scheduler/db.d.ts +7 -1
- package/dist/scheduler/db.js +44 -2
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/index.d.ts +1 -1
- package/dist/scheduler/retry-label.d.ts +11 -0
- package/dist/scheduler/retry-label.js +24 -0
- package/dist/scheduler/retry-label.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +55 -2
- package/dist/scheduler/scheduler.js +220 -8
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/scheduler/types.d.ts +22 -0
- package/dist/scheduler/types.js.map +1 -1
- package/dist/secret-store.d.ts +5 -0
- package/dist/secret-store.js +20 -0
- package/dist/secret-store.js.map +1 -1
- package/dist/service-activation.d.ts +152 -0
- package/dist/service-activation.js +407 -0
- package/dist/service-activation.js.map +1 -0
- package/dist/service-installer.d.ts +63 -1
- package/dist/service-installer.js +141 -16
- package/dist/service-installer.js.map +1 -1
- package/dist/service-plan.d.ts +65 -0
- package/dist/service-plan.js +108 -0
- package/dist/service-plan.js.map +1 -0
- package/dist/service-restart-selection.d.ts +6 -5
- package/dist/service-restart-selection.js +6 -5
- package/dist/service-restart-selection.js.map +1 -1
- package/dist/settings-api.d.ts +10 -2
- package/dist/settings-api.js +216 -72
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +20 -0
- package/dist/settings-baseline.js +104 -0
- package/dist/settings-baseline.js.map +1 -0
- package/dist/settings-change.d.ts +21 -0
- package/dist/settings-change.js +161 -0
- package/dist/settings-change.js.map +1 -0
- package/dist/settings-confirmation.d.ts +105 -0
- package/dist/settings-confirmation.js +232 -0
- package/dist/settings-confirmation.js.map +1 -0
- package/dist/settings-control.d.ts +41 -0
- package/dist/settings-control.js +294 -0
- package/dist/settings-control.js.map +1 -0
- package/dist/settings-effect.d.ts +24 -0
- package/dist/settings-effect.js +169 -0
- package/dist/settings-effect.js.map +1 -0
- package/dist/settings-http-confirmation.d.ts +29 -0
- package/dist/settings-http-confirmation.js +123 -0
- package/dist/settings-http-confirmation.js.map +1 -0
- package/dist/settings-instance-patch.d.ts +4 -0
- package/dist/settings-instance-patch.js +26 -0
- package/dist/settings-instance-patch.js.map +1 -0
- package/dist/settings-request-capability.d.ts +16 -0
- package/dist/settings-request-capability.js +32 -0
- package/dist/settings-request-capability.js.map +1 -0
- package/dist/settings-transaction.d.ts +65 -0
- package/dist/settings-transaction.js +223 -0
- package/dist/settings-transaction.js.map +1 -0
- package/dist/setup-auth.d.ts +10 -18
- package/dist/setup-auth.js +14 -38
- package/dist/setup-auth.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +75 -18
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-guide.d.ts +13 -0
- package/dist/setup-guide.js +25 -0
- package/dist/setup-guide.js.map +1 -0
- package/dist/setup-host.d.ts +16 -0
- package/dist/setup-host.js +199 -35
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-wizard.js +5 -1
- package/dist/setup-wizard.js.map +1 -1
- package/dist/slash-authz.d.ts +17 -3
- package/dist/slash-authz.js +5 -0
- package/dist/slash-authz.js.map +1 -1
- package/dist/spawn-gate.js +3 -3
- package/dist/spawn-gate.js.map +1 -1
- package/dist/sqlite-open-errors.d.ts +12 -0
- package/dist/sqlite-open-errors.js +13 -0
- package/dist/sqlite-open-errors.js.map +1 -0
- package/dist/statusline-watcher.d.ts +5 -0
- package/dist/statusline-watcher.js +2 -0
- package/dist/statusline-watcher.js.map +1 -1
- package/dist/steer-capability.d.ts +6 -0
- package/dist/steer-capability.js +8 -0
- package/dist/steer-capability.js.map +1 -1
- package/dist/sync-work-attribution.d.ts +14 -0
- package/dist/sync-work-attribution.js +43 -8
- package/dist/sync-work-attribution.js.map +1 -1
- package/dist/tips.js +10 -5
- package/dist/tips.js.map +1 -1
- package/dist/tmux-control.d.ts +57 -5
- package/dist/tmux-control.js +379 -61
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-manager.d.ts +20 -6
- package/dist/tmux-manager.js +90 -47
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-read.d.ts +59 -0
- package/dist/tmux-read.js +213 -0
- package/dist/tmux-read.js.map +1 -0
- package/dist/topic-commands.d.ts +21 -10
- package/dist/topic-commands.js +205 -63
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.js +2 -1
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/tunnel/cloudflared-install.d.ts +2 -0
- package/dist/tunnel/cloudflared-install.js +1 -1
- package/dist/tunnel/cloudflared-install.js.map +1 -1
- package/dist/tunnel/purpose-lane.d.ts +14 -0
- package/dist/tunnel/purpose-lane.js +43 -0
- package/dist/tunnel/purpose-lane.js.map +1 -0
- package/dist/turn-reply-guard.d.ts +2 -0
- package/dist/turn-reply-guard.js +10 -1
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +33 -0
- package/dist/ui/app.html +18 -0
- package/dist/ui/chat-commands.js +43 -0
- package/dist/ui/chat-render.js +478 -0
- package/dist/ui/chat-store.js +318 -0
- package/dist/ui/chat-strings.js +89 -0
- package/dist/ui/chat-thread.js +246 -0
- package/dist/ui/chat-tour.js +116 -0
- package/dist/ui/fleet-cache.js +168 -0
- package/dist/ui/fleet-org.js +142 -0
- package/dist/ui/panel-chat.js +504 -0
- package/dist/ui/panel-fleet.js +427 -0
- package/dist/ui/panel-needs.js +202 -0
- package/dist/ui/panel-settings.js +754 -0
- package/dist/ui/preview-panel.js +202 -0
- package/dist/ui/preview.js +270 -0
- package/dist/ui/settings-apply.js +239 -0
- package/dist/ui/settings-confirm.js +186 -0
- package/dist/ui/settings-dialogs.js +546 -0
- package/dist/ui/settings-model.js +277 -0
- package/dist/ui/settings-strings.js +654 -0
- package/dist/ui/settings-wizard.js +140 -0
- package/dist/ui/shared/agend-auth.js +93 -0
- package/dist/ui/shared/app-ctx.js +80 -0
- package/dist/ui/shared/app-html.js +9 -0
- package/dist/ui/shared/app-i18n.js +95 -0
- package/dist/ui/shared/app-nav.js +73 -0
- package/dist/ui/shared/app-needs.js +114 -0
- package/dist/ui/shared/app-route.js +73 -0
- package/dist/ui/shared/app-session.js +66 -0
- package/dist/ui/shared/app-shell.js +346 -0
- package/dist/ui/shared/app-store.js +51 -0
- package/dist/ui/shared/app-stream.js +201 -0
- package/dist/ui/shared/app.css +820 -0
- package/dist/ui/shared/app.js +88 -0
- package/dist/ui/shared/fonts/OFL.txt +92 -0
- package/dist/ui/shared/fonts/README.md +21 -0
- package/dist/ui/shared/fonts/inter.woff2 +0 -0
- package/dist/ui/shared/htm.module.js +1 -0
- package/dist/ui/shared/panel-view.js +655 -0
- package/dist/ui/shared/preact-hooks.module.js +2 -0
- package/dist/ui/shared/preact.module.js +2 -0
- package/dist/ui/shared/signin.js +142 -0
- package/dist/ui/shared/theme.js +29 -0
- package/dist/ui/shared/tokens.css +153 -0
- package/dist/ui/shared/ui-confirm.js +43 -0
- package/dist/ui/shared/ui-dialog.js +45 -0
- package/dist/ui/shared/ui-icons.js +63 -0
- package/dist/ui/shared/ui-menu.js +39 -0
- package/dist/ui/shared/ui-states.js +20 -0
- package/dist/ui/shared/ui-toast.js +18 -0
- package/dist/ui/shared/vendor/htm.LICENSE +202 -0
- package/dist/ui/shared/vendor/preact.LICENSE +21 -0
- package/dist/ui/shared/vendor/vendor.json +39 -0
- package/dist/ui/shared/view-strings.js +309 -0
- package/dist/ui/signin.html +52 -0
- package/dist/update-check.d.ts +6 -2
- package/dist/update-check.js +12 -3
- package/dist/update-check.js.map +1 -1
- package/dist/update-dispatch.d.ts +28 -0
- package/dist/update-dispatch.js +73 -0
- package/dist/update-dispatch.js.map +1 -0
- package/dist/update-install.d.ts +129 -0
- package/dist/update-install.js +262 -0
- package/dist/update-install.js.map +1 -0
- package/dist/upgrade-notices.d.ts +17 -0
- package/dist/upgrade-notices.js +93 -0
- package/dist/upgrade-notices.js.map +1 -0
- package/dist/usage/statusline-usage.d.ts +2 -0
- package/dist/usage/statusline-usage.js +14 -10
- package/dist/usage/statusline-usage.js.map +1 -1
- package/dist/view-api.d.ts +6 -1
- package/dist/view-api.js +62 -51
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +85 -14
- package/dist/web-api.js +557 -77
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.d.ts +71 -27
- package/dist/web-auth.js +169 -69
- package/dist/web-auth.js.map +1 -1
- package/dist/web-body.d.ts +3 -0
- package/dist/web-body.js +55 -0
- package/dist/web-body.js.map +1 -0
- package/dist/web-channel-echo.d.ts +9 -0
- package/dist/web-channel-echo.js +55 -0
- package/dist/web-channel-echo.js.map +1 -0
- package/dist/web-chat-history.d.ts +125 -0
- package/dist/web-chat-history.js +184 -0
- package/dist/web-chat-history.js.map +1 -0
- package/dist/web-commands.d.ts +77 -0
- package/dist/web-commands.js +81 -0
- package/dist/web-commands.js.map +1 -0
- package/dist/web-continuation.d.ts +7 -0
- package/dist/web-continuation.js +22 -0
- package/dist/web-continuation.js.map +1 -0
- package/dist/web-host-guard.d.ts +34 -0
- package/dist/web-host-guard.js +57 -1
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-login.d.ts +72 -0
- package/dist/web-login.js +132 -0
- package/dist/web-login.js.map +1 -0
- package/dist/web-org.d.ts +55 -0
- package/dist/web-org.js +67 -0
- package/dist/web-org.js.map +1 -0
- package/dist/web-preview.d.ts +77 -0
- package/dist/web-preview.js +240 -0
- package/dist/web-preview.js.map +1 -0
- package/dist/web-request-context.d.ts +10 -0
- package/dist/web-request-context.js +13 -0
- package/dist/web-request-context.js.map +1 -0
- package/dist/web-session.d.ts +167 -0
- package/dist/web-session.js +389 -0
- package/dist/web-session.js.map +1 -0
- package/dist/web-shell-routes.d.ts +59 -0
- package/dist/web-shell-routes.js +96 -0
- package/dist/web-shell-routes.js.map +1 -0
- package/dist/web-upload.d.ts +183 -0
- package/dist/web-upload.js +468 -0
- package/dist/web-upload.js.map +1 -0
- package/dist/website-tips-renderer.d.ts +2 -2
- package/dist/website-tips-renderer.js +3 -3
- package/dist/website-tips-renderer.js.map +1 -1
- package/launcher/agend +110 -0
- package/launcher/agend-agent +110 -0
- package/launcher/agend-agent.cjs +4 -0
- package/launcher/agend.cjs +4 -0
- package/launcher/install-admission.cjs +105 -0
- package/launcher/launch.cjs +64 -0
- package/launcher/postinstall.cjs +114 -0
- package/launcher/run-in-process.cjs +13 -0
- package/launcher/runtime-platform.cjs +86 -0
- package/launcher/runtime-select.cjs +217 -0
- package/package.json +18 -7
- package/scripts/preinstall-guard.cjs +55 -0
- package/templates/launchd.plist.ejs +2 -2
- package/templates/systemd.service.ejs +1 -1
- package/dist/ui/dashboard.html +0 -774
- package/dist/ui/settings.html +0 -2165
- package/dist/ui/view.html +0 -1139
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1408 §3: the one classifier for the web app's navigations. Every place that has to know "is this a page of the
|
|
3
|
+
* app?" asks it, and none keeps a list of its own:
|
|
4
|
+
* - web-api.ts serves the app shell for exactly these paths, never as a prefix fallback;
|
|
5
|
+
* - the gate's sign-in fallback answers a signed-out browser navigation with the sign-in page;
|
|
6
|
+
* - the public link's manifest (public-web-gateway.ts) admits these GETs.
|
|
7
|
+
*
|
|
8
|
+
* Client routes take only first segments the server's data routes never use (chat, fleet), so a page and a data
|
|
9
|
+
* read can never be confused (a test checks both directions). /view and /view/<name> are the View panel (step 2;
|
|
10
|
+
* view-api.ts serves them, open to anyone when `web.view_access` is open). /settings and /settings/<section> are the
|
|
11
|
+
* Settings panel (step 3; settings-api.ts serves them, signed in only).
|
|
12
|
+
*/
|
|
13
|
+
export const FLEET_TABS = ["tasks", "schedules", "teams", "org", "cache", "config"];
|
|
14
|
+
export const SETTINGS_SECTIONS = ["agents", "bots", "classic", "general", "advanced"];
|
|
15
|
+
const PATH_SEPARATOR_OR_CONTROL = /[/\\\u0000-\u001f\u007f]/;
|
|
16
|
+
/** Longest instance name a path may carry; real names are far shorter. */
|
|
17
|
+
export const MAX_INSTANCE_NAME = 128;
|
|
18
|
+
/**
|
|
19
|
+
* The same rule instance paths are held to (access-path.ts): not empty, no separator, no control character, no
|
|
20
|
+
* traversal. A name that passes may still be unknown; that is the panel's "not found" state, never an error page.
|
|
21
|
+
*/
|
|
22
|
+
export function isSafeInstanceName(name) {
|
|
23
|
+
return name.length > 0 && name.length <= MAX_INSTANCE_NAME && !PATH_SEPARATOR_OR_CONTROL.test(name)
|
|
24
|
+
&& name !== "." && !name.includes("..");
|
|
25
|
+
}
|
|
26
|
+
/** Decode one path segment; null when it is not valid percent-encoding. */
|
|
27
|
+
function decodeSegment(segment) {
|
|
28
|
+
try {
|
|
29
|
+
return decodeURIComponent(segment);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** The app shell's routes (#1408 §3). Only GET and HEAD are navigations. */
|
|
36
|
+
export function shellRoute(method, path) {
|
|
37
|
+
if (method !== "GET" && method !== "HEAD")
|
|
38
|
+
return null;
|
|
39
|
+
if (path === "/ui")
|
|
40
|
+
return { kind: "shell", route: { panel: "chat", instance: null } };
|
|
41
|
+
if (path === "/ui/fleet")
|
|
42
|
+
return { kind: "shell", route: { panel: "fleet", tab: "tasks" } };
|
|
43
|
+
// #1386 part (b): the Needs you list. A page, not a read of the list — that arrives only over SSE `needs` and
|
|
44
|
+
// /ui/poll (#1374: no new read for it).
|
|
45
|
+
if (path === "/ui/needs")
|
|
46
|
+
return { kind: "shell", route: { panel: "needs" } };
|
|
47
|
+
const fleet = /^\/ui\/fleet\/([^/]+)$/.exec(path);
|
|
48
|
+
if (fleet)
|
|
49
|
+
return FLEET_TABS.includes(fleet[1]) ? { kind: "shell", route: { panel: "fleet", tab: fleet[1] } } : null;
|
|
50
|
+
const chat = /^\/ui\/chat\/([^/]+)$/.exec(path);
|
|
51
|
+
if (chat) {
|
|
52
|
+
const name = decodeSegment(chat[1]);
|
|
53
|
+
return name !== null && isSafeInstanceName(name) ? { kind: "shell", route: { panel: "chat", instance: name } } : { kind: "malformed" };
|
|
54
|
+
}
|
|
55
|
+
if (path === "/view")
|
|
56
|
+
return { kind: "shell", route: { panel: "view", instance: null } };
|
|
57
|
+
const view = /^\/view\/([^/]+)$/.exec(path);
|
|
58
|
+
if (view) {
|
|
59
|
+
const name = decodeSegment(view[1]);
|
|
60
|
+
return name !== null && isSafeInstanceName(name) ? { kind: "shell", route: { panel: "view", instance: name } } : { kind: "malformed" };
|
|
61
|
+
}
|
|
62
|
+
if (path === "/settings")
|
|
63
|
+
return { kind: "shell", route: { panel: "settings", section: "agents" } };
|
|
64
|
+
const settings = /^\/settings\/([^/]+)$/.exec(path);
|
|
65
|
+
if (settings) {
|
|
66
|
+
return SETTINGS_SECTIONS.includes(settings[1])
|
|
67
|
+
? { kind: "shell", route: { panel: "settings", section: settings[1] } } : null;
|
|
68
|
+
}
|
|
69
|
+
// `/ui/chat` with nothing after it, or more than one segment: not a page (404 like any unknown path).
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/** The Settings panel's pages: what settings-api.ts serves (behind the session gate). */
|
|
73
|
+
export function isSettingsPage(path) {
|
|
74
|
+
const m = shellRoute("GET", path);
|
|
75
|
+
return m !== null && m.kind === "shell" && m.route.panel === "settings";
|
|
76
|
+
}
|
|
77
|
+
/** The View panel's pages: what view-api.ts serves, and what `web.view_access: open` lets anyone read. */
|
|
78
|
+
export function isViewPage(path) {
|
|
79
|
+
const m = shellRoute("GET", path);
|
|
80
|
+
return m !== null && (m.kind === "malformed" ? path.startsWith("/view/") : m.route.panel === "view");
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A browser navigation to a page of the web app: the shell's routes. The gate answers these, signed out, with the
|
|
84
|
+
* sign-in page instead of a JSON 401.
|
|
85
|
+
*/
|
|
86
|
+
export function isWebPageNavigation(path) {
|
|
87
|
+
return shellRoute("GET", path) !== null;
|
|
88
|
+
}
|
|
89
|
+
/** The app's client-side paths, for links the server builds (#1386 links, the tour). */
|
|
90
|
+
export function chatPath(instance) {
|
|
91
|
+
return `/ui/chat/${encodeURIComponent(instance)}`;
|
|
92
|
+
}
|
|
93
|
+
export function viewPath(instance) {
|
|
94
|
+
return `/view/${encodeURIComponent(instance)}`;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=web-shell-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-shell-routes.js","sourceRoot":"","sources":["../src/web-shell-routes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
export declare const UPLOAD_LIMITS: {
|
|
2
|
+
/** One file. */
|
|
3
|
+
readonly maxFileBytes: number;
|
|
4
|
+
/** Files on one message. */
|
|
5
|
+
readonly maxFiles: 5;
|
|
6
|
+
/** All files on one message together. */
|
|
7
|
+
readonly maxTotalBytes: number;
|
|
8
|
+
};
|
|
9
|
+
/** How long an uploaded file waits to be sent with a message before its id stops working. */
|
|
10
|
+
export declare const UPLOAD_TTL_MS: number;
|
|
11
|
+
/** An upload no message has taken yet is stored under this prefix; it drops the prefix when a message takes it. */
|
|
12
|
+
export declare const PENDING_PREFIX = "web-pending-";
|
|
13
|
+
/** The largest file the dashboard will serve back (a reply attachment can be anything the agent made). */
|
|
14
|
+
export declare const MAX_SERVED_BYTES: number;
|
|
15
|
+
export type UploadKind = "photo" | "document";
|
|
16
|
+
export interface SniffedType {
|
|
17
|
+
kind: UploadKind;
|
|
18
|
+
mime: string;
|
|
19
|
+
ext: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The type of an upload, from its bytes. Images by signature (PNG, JPEG, GIF, WebP), PDF by `%PDF-`,
|
|
23
|
+
* text when it is valid UTF-8 with no NUL byte. Everything else is refused — no executable, archive or
|
|
24
|
+
* office format is guessed at.
|
|
25
|
+
*/
|
|
26
|
+
export declare function sniffUpload(bytes: Uint8Array, name: string): SniffedType | null;
|
|
27
|
+
/** A file name as a label only: no directory, no control characters, no leading dots, bounded. */
|
|
28
|
+
export declare function displayName(raw: string | undefined | null, fallback: string): string;
|
|
29
|
+
/** Any lone surrogate replaced by U+FFFD, so the name always encodes. */
|
|
30
|
+
export declare function wellFormed(s: string): string;
|
|
31
|
+
export interface UploadEntry {
|
|
32
|
+
id: string;
|
|
33
|
+
instance: string;
|
|
34
|
+
path: string;
|
|
35
|
+
kind: UploadKind;
|
|
36
|
+
mime: string;
|
|
37
|
+
name: string;
|
|
38
|
+
size: number;
|
|
39
|
+
/** On the ledger's own elapsed clock (not the wall clock): when the upload window closes. */
|
|
40
|
+
expiresAt: number;
|
|
41
|
+
/**
|
|
42
|
+
* pending: uploaded, waiting for a message. reserved: a message has taken it and is being delivered (no other
|
|
43
|
+
* message can take it, and no sweep may remove it). sent: delivered — the agent has it.
|
|
44
|
+
*/
|
|
45
|
+
state: "pending" | "reserved" | "sent";
|
|
46
|
+
}
|
|
47
|
+
export interface ServedFile {
|
|
48
|
+
id: string;
|
|
49
|
+
/** realpath at registration: a later swap for a symlink does not change what is served. */
|
|
50
|
+
realPath: string;
|
|
51
|
+
name: string;
|
|
52
|
+
mime: string;
|
|
53
|
+
size: number;
|
|
54
|
+
/** The file registered (device + inode): a file put in its place later is not served under this id (#1304 review). */
|
|
55
|
+
dev: number;
|
|
56
|
+
ino: number;
|
|
57
|
+
/** The instance whose chat shows it. */
|
|
58
|
+
instance: string;
|
|
59
|
+
kind: UploadKind;
|
|
60
|
+
}
|
|
61
|
+
export declare const isFileId: (id: string) => boolean;
|
|
62
|
+
/** Images the browser may show inline; everything else is served as a download. */
|
|
63
|
+
export declare const INLINE_MIME: Set<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Uploads waiting for their message, and every file the dashboard may fetch back. In memory: ids from
|
|
66
|
+
* before a restart stop working (the files stay in the inbox, where the agent got them).
|
|
67
|
+
*/
|
|
68
|
+
export declare class WebFileLedger {
|
|
69
|
+
private readonly uploads;
|
|
70
|
+
/** The file each upload was written as (device + inode): a rename moves only that file (#1304 review). */
|
|
71
|
+
private readonly written;
|
|
72
|
+
private readonly served;
|
|
73
|
+
private readonly now;
|
|
74
|
+
private readonly maxServed;
|
|
75
|
+
constructor(opts?: {
|
|
76
|
+
now?: () => number;
|
|
77
|
+
maxServed?: number;
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* Store an upload in `inboxDir` under a name chosen here and register it. The directory is made
|
|
81
|
+
* private (0700), the file 0600, written exclusively (never over an existing file).
|
|
82
|
+
*/
|
|
83
|
+
storeUpload(input: {
|
|
84
|
+
instance: string;
|
|
85
|
+
inboxDir: string;
|
|
86
|
+
bytes: Uint8Array;
|
|
87
|
+
name: string;
|
|
88
|
+
type: SniffedType;
|
|
89
|
+
}): UploadEntry;
|
|
90
|
+
/**
|
|
91
|
+
* The uploads a message names, all or nothing: each must exist, belong to this instance, not be
|
|
92
|
+
* expired and be waiting for a message; together within the per-message limits. On success they are
|
|
93
|
+
* RESERVED for this message — no other message can take them, no sweep removes them — until the caller
|
|
94
|
+
* says how the delivery went: commit() when it was delivered, release() when it definitely was not.
|
|
95
|
+
*/
|
|
96
|
+
takeForMessage(instance: string, ids: readonly string[]): {
|
|
97
|
+
ok: true;
|
|
98
|
+
entries: UploadEntry[];
|
|
99
|
+
} | {
|
|
100
|
+
ok: false;
|
|
101
|
+
error: string;
|
|
102
|
+
};
|
|
103
|
+
/** Move an upload's file (same directory) and keep what is served for its id on the new path. */
|
|
104
|
+
private rename;
|
|
105
|
+
/** Is the file at `p` the one this ledger wrote for `e` (regular, same size, same device + inode)? */
|
|
106
|
+
private isWritten;
|
|
107
|
+
/** The files this process still owns — waiting for a message or on their way: a sweep must not touch them. */
|
|
108
|
+
ownedPaths(): Set<string>;
|
|
109
|
+
/** The reserved uploads were delivered: they are the agent's now. */
|
|
110
|
+
commit(entries: readonly UploadEntry[]): void;
|
|
111
|
+
/**
|
|
112
|
+
* The delivery definitely did not happen: the uploads wait for a message again, and the user can retry with the
|
|
113
|
+
* same ids. One whose window closed meanwhile is removed now (file and id) — its sweep has already run.
|
|
114
|
+
*/
|
|
115
|
+
release(entries: readonly UploadEntry[]): void;
|
|
116
|
+
/**
|
|
117
|
+
* Make a file fetchable by id (an upload, or a file an agent attached to its reply). The path is
|
|
118
|
+
* resolved now and must be a regular file within the size limit; null when it is not.
|
|
119
|
+
*/
|
|
120
|
+
registerServed(input: {
|
|
121
|
+
id?: string;
|
|
122
|
+
path: string;
|
|
123
|
+
name?: string;
|
|
124
|
+
mime?: string;
|
|
125
|
+
instance: string;
|
|
126
|
+
kind?: UploadKind;
|
|
127
|
+
}): ServedFile | null;
|
|
128
|
+
/**
|
|
129
|
+
* The bytes of a served file, re-checked at read time: opened without following a symlink, still a
|
|
130
|
+
* regular file, still the file (device + inode) and size it was registered with. Null when any of that fails.
|
|
131
|
+
*/
|
|
132
|
+
read(id: string): {
|
|
133
|
+
file: ServedFile;
|
|
134
|
+
bytes: Buffer;
|
|
135
|
+
} | null;
|
|
136
|
+
/** Forget an instance's files (it was deleted). The files themselves are its workspace's to remove. */
|
|
137
|
+
forget(instance: string): void;
|
|
138
|
+
/**
|
|
139
|
+
* Drop what is done with. A sent upload leaves the list (the agent has it; the file stays in the inbox, as one
|
|
140
|
+
* from Telegram does). One that expired before any message took it was never seen by anyone but this ledger:
|
|
141
|
+
* its file is deleted with its id, so abandoned uploads do not pile up in the workspace.
|
|
142
|
+
*/
|
|
143
|
+
prune(): void;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The text and meta an agent gets for a message with files — the same tags and keys a Telegram
|
|
147
|
+
* message produces (attachment-handler.ts), so agents need nothing new.
|
|
148
|
+
*/
|
|
149
|
+
export declare function attachmentDelivery(message: string, entries: readonly UploadEntry[]): {
|
|
150
|
+
text: string;
|
|
151
|
+
meta: Record<string, string>;
|
|
152
|
+
};
|
|
153
|
+
/** What the chat shows for a file: never the path. */
|
|
154
|
+
export declare function publicAttachment(f: {
|
|
155
|
+
id: string;
|
|
156
|
+
kind: UploadKind;
|
|
157
|
+
name: string;
|
|
158
|
+
size: number;
|
|
159
|
+
mime: string;
|
|
160
|
+
}): {
|
|
161
|
+
id: string;
|
|
162
|
+
kind: UploadKind;
|
|
163
|
+
name: string;
|
|
164
|
+
size: number;
|
|
165
|
+
mime: string;
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* At fleet startup (#1273): the ledger of uploads waiting for a message lives in memory, so after a restart an
|
|
169
|
+
* upload no message took is nobody's — its id is gone. Remove each such file (named web-pending-…) in every
|
|
170
|
+
* workspace inbox once it is older than the upload window. Files a message took (web-…, no "pending") are the
|
|
171
|
+
* agent's and follow the inbox's ordinary 7-day rotation, exactly like a file from Telegram; nothing else in an
|
|
172
|
+
* inbox is ever touched here.
|
|
173
|
+
*
|
|
174
|
+
* Age is the file's mtime against the wall clock — the only clock a file has. A future mtime (the clock was set
|
|
175
|
+
* back) counts as just written, never as a negative age, so it is kept and looked at again later; a clock set
|
|
176
|
+
* forward can only remove an upload early, and after a restart none of them can be sent anyway. The uploads this
|
|
177
|
+
* process holds (`owned`, by inbox path) are skipped: their window is the ledger's elapsed time, not a file's mtime.
|
|
178
|
+
* Returns how many were removed and, when younger ones remain, in how long the next one comes due.
|
|
179
|
+
*/
|
|
180
|
+
export declare function sweepOrphanedUploads(workspacesDir: string, nowMs?: number, ttlMs?: number, owned?: ReadonlySet<string>): {
|
|
181
|
+
deleted: number;
|
|
182
|
+
nextDueInMs: number | null;
|
|
183
|
+
};
|