@songsid/agend 2.3.5-alpha.4 → 2.3.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/README.zh-TW.md +0 -2
- package/THIRD_PARTY_NOTICES.md +12 -28
- package/dist/agent-cli-instructions.md +1 -1
- package/dist/agent-credentials.d.ts +24 -0
- package/dist/agent-credentials.js +66 -0
- package/dist/agent-credentials.js.map +1 -0
- package/dist/agent-endpoint.d.ts +4 -6
- package/dist/agent-endpoint.js +15 -12
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/auth-api.d.ts +0 -21
- package/dist/auth-api.js +8 -93
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/session-authorizations.d.ts +30 -4
- package/dist/authority/session-authorizations.js +69 -17
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/authority/web-authority.d.ts +2 -12
- package/dist/authority/web-authority.js +4 -25
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/antigravity.js +3 -1
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +12 -15
- package/dist/backend/claude-code.js +133 -152
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-metadata.d.ts +14 -0
- package/dist/backend/codex-metadata.js +45 -0
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex-package.d.ts +2 -5
- package/dist/backend/codex-package.js +5 -1
- package/dist/backend/codex-package.js.map +1 -1
- package/dist/backend/codex-quota-history.d.ts +7 -0
- package/dist/backend/codex-quota-history.js +72 -0
- package/dist/backend/codex-quota-history.js.map +1 -0
- package/dist/backend/codex-session-lookup.d.ts +6 -0
- package/dist/backend/codex-session-lookup.js +1 -1
- package/dist/backend/codex-session-lookup.js.map +1 -1
- package/dist/backend/codex-speed.d.ts +14 -0
- package/dist/backend/codex-speed.js +35 -0
- package/dist/backend/codex-speed.js.map +1 -0
- package/dist/backend/codex.d.ts +116 -136
- package/dist/backend/codex.js +912 -942
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok-weekly-reset.d.ts +24 -0
- package/dist/backend/grok-weekly-reset.js +95 -0
- package/dist/backend/grok-weekly-reset.js.map +1 -0
- package/dist/backend/grok.d.ts +30 -3
- package/dist/backend/grok.js +301 -76
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +3 -0
- package/dist/backend/kiro.js +50 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.js +5 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +15 -8
- package/dist/backend/types.js +3 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/bundled-tmux-guard.d.ts +21 -0
- package/dist/bundled-tmux-guard.js +96 -0
- package/dist/bundled-tmux-guard.js.map +1 -0
- package/dist/cache-ledger.d.ts +95 -0
- package/dist/cache-ledger.js +276 -4
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-service.d.ts +5 -0
- package/dist/cache-service.js +16 -4
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.js +11 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +51 -0
- package/dist/channel/adapters/telegram.js +235 -17
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +0 -2
- package/dist/channel/mcp-tools.js +3 -3
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +2 -0
- package/dist/classic-channel-manager.d.ts +2 -0
- package/dist/classic-channel-manager.js +5 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +14 -10
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +30 -71
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +3 -17
- package/dist/config.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +10 -0
- package/dist/cross-instance-notice.js +67 -5
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +70 -68
- package/dist/daemon.js +774 -846
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +16 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +26 -16
- package/dist/delivery-consumed-watch.js +31 -26
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +0 -5
- package/dist/delivery-outbox.js +4 -32
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +42 -2
- package/dist/delivery-reconciliation.js +164 -2
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/export-import.d.ts +7 -0
- package/dist/export-import.js +44 -10
- package/dist/export-import.js.map +1 -1
- package/dist/fleet-context.d.ts +4 -2
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +0 -2
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +108 -245
- package/dist/fleet-manager.js +656 -2028
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-instance.d.ts +0 -7
- package/dist/general-instance.js +3 -20
- package/dist/general-instance.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +393 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +1 -0
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +41 -4
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +9 -3
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/instance-config-impact.js +6 -7
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +19 -23
- package/dist/instance-lifecycle.js +216 -383
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instance-topic-delete.d.ts +77 -0
- package/dist/instance-topic-delete.js +123 -0
- package/dist/instance-topic-delete.js.map +1 -0
- package/dist/instructions.d.ts +1 -3
- package/dist/instructions.js +1 -7
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-engine-status.d.ts +11 -0
- package/dist/kiro-engine-status.js +6 -0
- package/dist/kiro-engine-status.js.map +1 -1
- package/dist/locale.js +63 -86
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +28 -0
- package/dist/log-service.js +29 -0
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps.d.ts +4 -3
- package/dist/log-steps.js +32 -7
- package/dist/log-steps.js.map +1 -1
- package/dist/logger.d.ts +16 -2
- package/dist/logger.js +346 -66
- package/dist/logger.js.map +1 -1
- package/dist/login-flows.d.ts +7 -0
- package/dist/login-flows.js +5 -2
- package/dist/login-flows.js.map +1 -1
- package/dist/login-manager.js +25 -4
- package/dist/login-manager.js.map +1 -1
- package/dist/missed-offline.d.ts +25 -0
- package/dist/missed-offline.js +79 -0
- package/dist/missed-offline.js.map +1 -0
- package/dist/muse-usage-relay.d.ts +2 -0
- package/dist/muse-usage-relay.js +5 -3
- package/dist/muse-usage-relay.js.map +1 -1
- package/dist/needs-you-hub.d.ts +6 -3
- package/dist/needs-you-hub.js +31 -9
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +20 -18
- package/dist/needs-you.js +18 -14
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +2 -16
- package/dist/outbound-handlers.js +10 -72
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +0 -38
- package/dist/outbound-schemas.js +5 -14
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-quota-history.d.ts +7 -0
- package/dist/pane-quota-history.js +47 -0
- package/dist/pane-quota-history.js.map +1 -0
- package/dist/platform-general.d.ts +46 -0
- package/dist/platform-general.js +91 -0
- package/dist/platform-general.js.map +1 -0
- package/dist/public-web-gateway.js +0 -9
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +0 -11
- package/dist/public-web-link.js +0 -13
- package/dist/public-web-link.js.map +1 -1
- package/dist/queued-handoffs.d.ts +33 -0
- package/dist/queued-handoffs.js +75 -0
- package/dist/queued-handoffs.js.map +1 -0
- package/dist/quickstart-api.js +5 -9
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +8 -1
- package/dist/quickstart.js +42 -4
- package/dist/quickstart.js.map +1 -1
- package/dist/quota-notice-config.d.ts +22 -0
- package/dist/quota-notice-config.js +41 -0
- package/dist/quota-notice-config.js.map +1 -0
- package/dist/quota-notice.d.ts +7 -0
- package/dist/quota-notice.js +40 -0
- package/dist/quota-notice.js.map +1 -1
- package/dist/reply-buttons-controller.js +10 -6
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-polls.d.ts +2 -2
- package/dist/reply-polls.js +3 -3
- package/dist/reply-polls.js.map +1 -1
- package/dist/scheduler/db.d.ts +2 -1
- package/dist/scheduler/db.js +23 -9
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +9 -0
- package/dist/scheduler/task-board.js +19 -0
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +13 -5
- package/dist/settings-api.js +26 -96
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +0 -1
- package/dist/settings-baseline.js +1 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +23 -28
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +1 -16
- package/dist/settings-confirmation.js +9 -47
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +0 -4
- package/dist/settings-effect.js +1 -58
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +0 -4
- package/dist/settings-http-confirmation.js +3 -31
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +28 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/settings-request-capability.d.ts +0 -2
- package/dist/settings-request-capability.js +0 -4
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/settings-transaction.d.ts +0 -4
- package/dist/settings-transaction.js +0 -9
- package/dist/settings-transaction.js.map +1 -1
- package/dist/setup-form.js +3 -6
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.js +0 -3
- package/dist/setup-i18n.js.map +1 -1
- package/dist/task-board-tool.d.ts +11 -0
- package/dist/task-board-tool.js +44 -0
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +6 -0
- package/dist/task-board-waker.js +4 -0
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tmux-control.d.ts +1 -2
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-manager.d.ts +1 -2
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +5 -2
- package/dist/tool-permissions.js +7 -7
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +2 -0
- package/dist/tool-progress.js +19 -3
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.js +4 -3
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.d.ts +1 -1
- package/dist/transcript-delta-reader.js +1 -1
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/transcript-monitor.d.ts +20 -3
- package/dist/transcript-monitor.js +92 -24
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-sources.d.ts +0 -5
- package/dist/transcript-sources.js +79 -8
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +3 -23
- package/dist/ui/app.html +8 -1
- package/dist/ui/backend-signin.js +21 -36
- package/dist/ui/chat-md-strings.js +9 -0
- package/dist/ui/chat-store.js +2 -13
- package/dist/ui/chat-strings.js +2 -50
- package/dist/ui/chat-thread.js +53 -3
- package/dist/ui/fleet-task-card.js +3 -3
- package/dist/ui/fleet-task-common.js +10 -0
- package/dist/ui/fleet-tasks.js +7 -5
- package/dist/ui/fleet-usage.js +90 -27
- package/dist/ui/panel-chat.js +37 -66
- package/dist/ui/panel-details.js +1 -2
- package/dist/ui/panel-fleet.js +88 -107
- package/dist/ui/panel-needs.js +21 -163
- package/dist/ui/panel-notices.js +4 -3
- package/dist/ui/panel-settings.js +149 -239
- package/dist/ui/preview-panel.js +84 -6
- package/dist/ui/search-dialog.js +3 -2
- package/dist/ui/settings-appearance.js +23 -122
- package/dist/ui/settings-catalog.js +10 -37
- package/dist/ui/settings-codex-copy.js +19 -0
- package/dist/ui/settings-confirm.js +1 -3
- package/dist/ui/settings-dialogs.js +20 -27
- package/dist/ui/settings-guests.js +14 -27
- package/dist/ui/settings-model.js +17 -12
- package/dist/ui/settings-quota-notice.js +100 -0
- package/dist/ui/settings-registry.js +4 -11
- package/dist/ui/settings-strings.js +4 -113
- package/dist/ui/settings-web-authority.js +13 -15
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +1 -1
- package/dist/ui/shared/app-route.js +2 -6
- package/dist/ui/shared/app-shell.js +18 -23
- package/dist/ui/shared/app-store.js +2 -3
- package/dist/ui/shared/app-stream.js +1 -3
- package/dist/ui/shared/app.css +40 -1312
- package/dist/ui/shared/app.js +2 -5
- package/dist/ui/shared/header-tools.js +4 -6
- package/dist/ui/shared/instance-nav.js +7 -34
- package/dist/ui/shared/instance-switch.js +3 -4
- package/dist/ui/shared/loading.css +37 -0
- package/dist/ui/shared/panel-view.js +77 -4
- package/dist/ui/shared/signin.js +6 -39
- package/dist/ui/shared/tokens.css +0 -1
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +10 -30
- package/dist/ui/shared/ui-states.js +14 -3
- package/dist/ui/shared/usage-dialog.js +18 -1
- package/dist/ui/shared/vendor/vendor.json +2 -19
- package/dist/ui/shared/view-history.css +17 -0
- package/dist/ui/shared/view-history.js +438 -0
- package/dist/ui/shared/view-strings.js +16 -8
- package/dist/ui/signin.html +5 -2
- package/dist/unattended-install.d.ts +11 -2
- package/dist/unattended-install.js +39 -5
- package/dist/unattended-install.js.map +1 -1
- package/dist/usage/capacity.d.ts +69 -0
- package/dist/usage/capacity.js +119 -0
- package/dist/usage/capacity.js.map +1 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +3 -0
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +16 -0
- package/dist/usage/profile-timeline.js +58 -0
- package/dist/usage/profile-timeline.js.map +1 -0
- package/dist/usage/providers.d.ts +5 -0
- package/dist/usage/providers.js +5 -0
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +43 -0
- package/dist/usage/quota-history.js +168 -0
- package/dist/usage/quota-history.js.map +1 -0
- package/dist/usage/quota-notices.d.ts +38 -0
- package/dist/usage/quota-notices.js +160 -0
- package/dist/usage/quota-notices.js.map +1 -0
- package/dist/usage/usage-api.d.ts +32 -0
- package/dist/usage/usage-api.js +96 -1
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-report.d.ts +25 -1
- package/dist/usage-report.js +55 -4
- package/dist/usage-report.js.map +1 -1
- package/dist/usage-rollup.d.ts +6 -1
- package/dist/usage-rollup.js +16 -4
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +16 -0
- package/dist/view-api.js +100 -16
- package/dist/view-api.js.map +1 -1
- package/dist/view-history.d.ts +84 -0
- package/dist/view-history.js +116 -0
- package/dist/view-history.js.map +1 -0
- package/dist/web-api.d.ts +6 -38
- package/dist/web-api.js +20 -255
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +2 -19
- package/dist/web-chat-history.js +3 -72
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-only-fleet.d.ts +0 -20
- package/dist/web-only-fleet.js +0 -21
- package/dist/web-only-fleet.js.map +1 -1
- package/dist/web-session-authorization.d.ts +13 -2
- package/dist/web-session-authorization.js +10 -3
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +0 -7
- package/dist/web-session.js +0 -2
- package/dist/web-session.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -4
- package/dist/web-shell-routes.js +2 -7
- package/dist/web-shell-routes.js.map +1 -1
- package/launcher/private-home.cjs +1 -1
- package/package.json +3 -9
- package/dist/agent-runtime-api.d.ts +0 -4
- package/dist/agent-runtime-api.js +0 -59
- package/dist/agent-runtime-api.js.map +0 -1
- package/dist/agent-runtime-change.d.ts +0 -74
- package/dist/agent-runtime-change.js +0 -102
- package/dist/agent-runtime-change.js.map +0 -1
- package/dist/backend/grok-model-cache.d.ts +0 -7
- package/dist/backend/grok-model-cache.js +0 -65
- package/dist/backend/grok-model-cache.js.map +0 -1
- package/dist/backend/native-pane.d.ts +0 -9
- package/dist/backend/native-pane.js +0 -59
- package/dist/backend/native-pane.js.map +0 -1
- package/dist/fleet-windows-runtime.d.ts +0 -97
- package/dist/fleet-windows-runtime.js +0 -449
- package/dist/fleet-windows-runtime.js.map +0 -1
- package/dist/general-binding.d.ts +0 -85
- package/dist/general-binding.js +0 -298
- package/dist/general-binding.js.map +0 -1
- package/dist/general-host-owner.d.ts +0 -8
- package/dist/general-host-owner.js +0 -26
- package/dist/general-host-owner.js.map +0 -1
- package/dist/general-role.d.ts +0 -5
- package/dist/general-role.js +0 -26
- package/dist/general-role.js.map +0 -1
- package/dist/local-pane-endpoint.d.ts +0 -46
- package/dist/local-pane-endpoint.js +0 -189
- package/dist/local-pane-endpoint.js.map +0 -1
- package/dist/local-pane-launcher.d.ts +0 -2
- package/dist/local-pane-launcher.js +0 -38
- package/dist/local-pane-launcher.js.map +0 -1
- package/dist/local-pane-stage.ps1 +0 -101
- package/dist/model-catalog-defaults.d.ts +0 -14
- package/dist/model-catalog-defaults.js +0 -20
- package/dist/model-catalog-defaults.js.map +0 -1
- package/dist/native-agent-admission.d.ts +0 -7
- package/dist/native-agent-admission.js +0 -26
- package/dist/native-agent-admission.js.map +0 -1
- package/dist/native-daemon-client.d.ts +0 -13
- package/dist/native-daemon-client.js +0 -28
- package/dist/native-daemon-client.js.map +0 -1
- package/dist/native-instance-api.d.ts +0 -14
- package/dist/native-instance-api.js +0 -205
- package/dist/native-instance-api.js.map +0 -1
- package/dist/native-instance-input.d.ts +0 -84
- package/dist/native-instance-input.js +0 -54
- package/dist/native-instance-input.js.map +0 -1
- package/dist/native-instance-registry.d.ts +0 -32
- package/dist/native-instance-registry.js +0 -105
- package/dist/native-instance-registry.js.map +0 -1
- package/dist/native-mcp.d.ts +0 -40
- package/dist/native-mcp.js +0 -278
- package/dist/native-mcp.js.map +0 -1
- package/dist/native-model-catalog.d.ts +0 -5
- package/dist/native-model-catalog.js +0 -76
- package/dist/native-model-catalog.js.map +0 -1
- package/dist/native-pane-crash-budget.d.ts +0 -20
- package/dist/native-pane-crash-budget.js +0 -60
- package/dist/native-pane-crash-budget.js.map +0 -1
- package/dist/native-pane-create.d.ts +0 -26
- package/dist/native-pane-create.js +0 -53
- package/dist/native-pane-create.js.map +0 -1
- package/dist/native-pane-lifecycle.d.ts +0 -65
- package/dist/native-pane-lifecycle.js +0 -230
- package/dist/native-pane-lifecycle.js.map +0 -1
- package/dist/native-pane-manager.d.ts +0 -59
- package/dist/native-pane-manager.js +0 -584
- package/dist/native-pane-manager.js.map +0 -1
- package/dist/native-pane-output-log.d.ts +0 -15
- package/dist/native-pane-output-log.js +0 -108
- package/dist/native-pane-output-log.js.map +0 -1
- package/dist/native-pane-reconciliation.d.ts +0 -4
- package/dist/native-pane-reconciliation.js +0 -40
- package/dist/native-pane-reconciliation.js.map +0 -1
- package/dist/native-pane-recovery.d.ts +0 -12
- package/dist/native-pane-recovery.js +0 -10
- package/dist/native-pane-recovery.js.map +0 -1
- package/dist/native-pane-tools.d.ts +0 -2
- package/dist/native-pane-tools.js +0 -14
- package/dist/native-pane-tools.js.map +0 -1
- package/dist/pane-port.d.ts +0 -118
- package/dist/pane-port.js +0 -2
- package/dist/pane-port.js.map +0 -1
- package/dist/runtime-api.d.ts +0 -8
- package/dist/runtime-api.js +0 -171
- package/dist/runtime-api.js.map +0 -1
- package/dist/runtime-assets/@xterm/addon-serialize/LICENSE +0 -21
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.js +0 -2
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.mjs +0 -19
- package/dist/runtime-assets/@xterm/addon-serialize/package.json +0 -29
- package/dist/runtime-assets/@xterm/headless/LICENSE +0 -21
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.js +0 -2
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.mjs +0 -46
- package/dist/runtime-assets/@xterm/headless/package.json +0 -29
- package/dist/runtime-assets/node-pty/CONPTY-LICENSE +0 -21
- package/dist/runtime-assets/node-pty/CONPTY-NOTICE.md +0 -503
- package/dist/runtime-assets/node-pty/LICENSE +0 -69
- package/dist/runtime-assets/node-pty/lib/conpty_console_list_agent.js +0 -16
- package/dist/runtime-assets/node-pty/lib/eventEmitter2.js +0 -47
- package/dist/runtime-assets/node-pty/lib/index.js +0 -52
- package/dist/runtime-assets/node-pty/lib/interfaces.js +0 -7
- package/dist/runtime-assets/node-pty/lib/shared/conout.js +0 -11
- package/dist/runtime-assets/node-pty/lib/terminal.js +0 -190
- package/dist/runtime-assets/node-pty/lib/types.js +0 -7
- package/dist/runtime-assets/node-pty/lib/unixTerminal.js +0 -346
- package/dist/runtime-assets/node-pty/lib/utils.js +0 -39
- package/dist/runtime-assets/node-pty/lib/windowsConoutConnection.js +0 -125
- package/dist/runtime-assets/node-pty/lib/windowsPtyAgent.js +0 -320
- package/dist/runtime-assets/node-pty/lib/windowsTerminal.js +0 -199
- package/dist/runtime-assets/node-pty/lib/worker/conoutSocketWorker.js +0 -22
- package/dist/runtime-assets/node-pty/package.json +0 -64
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/dist/runtime-build-info.d.ts +0 -9
- package/dist/runtime-build-info.js +0 -57
- package/dist/runtime-build-info.js.map +0 -1
- package/dist/runtime-bundle.d.ts +0 -19
- package/dist/runtime-bundle.js +0 -156
- package/dist/runtime-bundle.js.map +0 -1
- package/dist/runtime-cli.d.ts +0 -7
- package/dist/runtime-cli.js +0 -152
- package/dist/runtime-cli.js.map +0 -1
- package/dist/runtime-client-store.d.ts +0 -68
- package/dist/runtime-client-store.js +0 -344
- package/dist/runtime-client-store.js.map +0 -1
- package/dist/runtime-client.d.ts +0 -112
- package/dist/runtime-client.js +0 -736
- package/dist/runtime-client.js.map +0 -1
- package/dist/runtime-connection.d.ts +0 -22
- package/dist/runtime-connection.js +0 -93
- package/dist/runtime-connection.js.map +0 -1
- package/dist/runtime-coordinator.d.ts +0 -91
- package/dist/runtime-coordinator.js +0 -911
- package/dist/runtime-coordinator.js.map +0 -1
- package/dist/runtime-general-protocol.d.ts +0 -22
- package/dist/runtime-general-protocol.js +0 -57
- package/dist/runtime-general-protocol.js.map +0 -1
- package/dist/runtime-general-workspace.d.ts +0 -17
- package/dist/runtime-general-workspace.js +0 -213
- package/dist/runtime-general-workspace.js.map +0 -1
- package/dist/runtime-pane-assets.d.ts +0 -17
- package/dist/runtime-pane-assets.js +0 -23
- package/dist/runtime-pane-assets.js.map +0 -1
- package/dist/runtime-pane-boot.d.ts +0 -9
- package/dist/runtime-pane-boot.js +0 -47
- package/dist/runtime-pane-boot.js.map +0 -1
- package/dist/runtime-pane-codex-index.d.ts +0 -1
- package/dist/runtime-pane-codex-index.js +0 -47
- package/dist/runtime-pane-codex-index.js.map +0 -1
- package/dist/runtime-pane-config.d.ts +0 -16
- package/dist/runtime-pane-config.js +0 -54
- package/dist/runtime-pane-config.js.map +0 -1
- package/dist/runtime-pane-host.d.ts +0 -44
- package/dist/runtime-pane-host.js +0 -424
- package/dist/runtime-pane-host.js.map +0 -1
- package/dist/runtime-pane-job-owner.d.ts +0 -1
- package/dist/runtime-pane-job-owner.js +0 -29
- package/dist/runtime-pane-job-owner.js.map +0 -1
- package/dist/runtime-pane-job.ps1 +0 -116
- package/dist/runtime-pane-link.d.ts +0 -40
- package/dist/runtime-pane-link.js +0 -246
- package/dist/runtime-pane-link.js.map +0 -1
- package/dist/runtime-pane-mcp-protocol.d.ts +0 -32
- package/dist/runtime-pane-mcp-protocol.js +0 -39
- package/dist/runtime-pane-mcp-protocol.js.map +0 -1
- package/dist/runtime-pane-mcp-relay.d.ts +0 -17
- package/dist/runtime-pane-mcp-relay.js +0 -70
- package/dist/runtime-pane-mcp-relay.js.map +0 -1
- package/dist/runtime-pane-mcp.d.ts +0 -51
- package/dist/runtime-pane-mcp.js +0 -150
- package/dist/runtime-pane-mcp.js.map +0 -1
- package/dist/runtime-pane-native.d.ts +0 -45
- package/dist/runtime-pane-native.js +0 -65
- package/dist/runtime-pane-native.js.map +0 -1
- package/dist/runtime-pane-output.d.ts +0 -19
- package/dist/runtime-pane-output.js +0 -53
- package/dist/runtime-pane-output.js.map +0 -1
- package/dist/runtime-pane-port.d.ts +0 -139
- package/dist/runtime-pane-port.js +0 -558
- package/dist/runtime-pane-port.js.map +0 -1
- package/dist/runtime-pane-private.d.ts +0 -14
- package/dist/runtime-pane-private.js +0 -51
- package/dist/runtime-pane-private.js.map +0 -1
- package/dist/runtime-pane-private.ps1 +0 -14
- package/dist/runtime-pane-process.d.ts +0 -4
- package/dist/runtime-pane-process.js +0 -108
- package/dist/runtime-pane-process.js.map +0 -1
- package/dist/runtime-pane-protocol.d.ts +0 -172
- package/dist/runtime-pane-protocol.js +0 -195
- package/dist/runtime-pane-protocol.js.map +0 -1
- package/dist/runtime-pane-screen.d.ts +0 -19
- package/dist/runtime-pane-screen.js +0 -76
- package/dist/runtime-pane-screen.js.map +0 -1
- package/dist/runtime-pane-service.d.ts +0 -11
- package/dist/runtime-pane-service.js +0 -221
- package/dist/runtime-pane-service.js.map +0 -1
- package/dist/runtime-pane-stdio-protocol.d.ts +0 -54
- package/dist/runtime-pane-stdio-protocol.js +0 -94
- package/dist/runtime-pane-stdio-protocol.js.map +0 -1
- package/dist/runtime-pane-stdio.d.ts +0 -3
- package/dist/runtime-pane-stdio.js +0 -123
- package/dist/runtime-pane-stdio.js.map +0 -1
- package/dist/runtime-pane-store.d.ts +0 -33
- package/dist/runtime-pane-store.js +0 -164
- package/dist/runtime-pane-store.js.map +0 -1
- package/dist/runtime-pane-transcript-protocol.d.ts +0 -43
- package/dist/runtime-pane-transcript-protocol.js +0 -58
- package/dist/runtime-pane-transcript-protocol.js.map +0 -1
- package/dist/runtime-pane-transcript.d.ts +0 -45
- package/dist/runtime-pane-transcript.js +0 -605
- package/dist/runtime-pane-transcript.js.map +0 -1
- package/dist/runtime-pane-worker.d.ts +0 -1
- package/dist/runtime-pane-worker.js +0 -154
- package/dist/runtime-pane-worker.js.map +0 -1
- package/dist/runtime-protocol.d.ts +0 -162
- package/dist/runtime-protocol.js +0 -37
- package/dist/runtime-protocol.js.map +0 -1
- package/dist/runtime-switches.d.ts +0 -79
- package/dist/runtime-switches.js +0 -90
- package/dist/runtime-switches.js.map +0 -1
- package/dist/runtime-transcript-delta-reader.d.ts +0 -23
- package/dist/runtime-transcript-delta-reader.js +0 -74
- package/dist/runtime-transcript-delta-reader.js.map +0 -1
- package/dist/runtime-transcript-source.d.ts +0 -36
- package/dist/runtime-transcript-source.js +0 -189
- package/dist/runtime-transcript-source.js.map +0 -1
- package/dist/runtime-windows-bridge.d.ts +0 -41
- package/dist/runtime-windows-bridge.js +0 -157
- package/dist/runtime-windows-bridge.js.map +0 -1
- package/dist/settings-route-lifetime.d.ts +0 -14
- package/dist/settings-route-lifetime.js +0 -48
- package/dist/settings-route-lifetime.js.map +0 -1
- package/dist/tmux-pane-host.d.ts +0 -26
- package/dist/tmux-pane-host.js +0 -25
- package/dist/tmux-pane-host.js.map +0 -1
- package/dist/transcript-needles.d.ts +0 -35
- package/dist/transcript-needles.js +0 -158
- package/dist/transcript-needles.js.map +0 -1
- package/dist/transcript-records.d.ts +0 -21
- package/dist/transcript-records.js +0 -140
- package/dist/transcript-records.js.map +0 -1
- package/dist/ui/agent-proposals.js +0 -90
- package/dist/ui/agent-runtime-settings.js +0 -67
- package/dist/ui/agent-runtime.js +0 -124
- package/dist/ui/cli-picker.js +0 -42
- package/dist/ui/general-location.js +0 -71
- package/dist/ui/native-instance-settings.js +0 -44
- package/dist/ui/native-pane-recovery.js +0 -45
- package/dist/ui/panel-runtimes.js +0 -334
- package/dist/ui/panel-windows-agent.js +0 -86
- package/dist/ui/panel-windows-cli.js +0 -179
- package/dist/ui/provider-marks.js +0 -83
- package/dist/ui/runtime-catalog.js +0 -55
- package/dist/ui/settings-agent-filters.js +0 -94
- package/dist/ui/settings-layout.js +0 -245
- package/dist/ui/settings-outside.js +0 -176
- package/dist/ui/settings-shortcuts.js +0 -65
- package/dist/ui/shared/machine-name.js +0 -13
- package/dist/ui/shared/qrcode.module.js +0 -2237
- package/dist/ui/shared/settings-width.js +0 -31
- package/dist/ui/shared/vendor/qrcode-generator.LICENSE +0 -27
- package/dist/ui/windows-agents-nav.js +0 -2
- package/dist/ui/windows-cli-catalog.js +0 -108
- package/dist/web-remote-access.d.ts +0 -152
- package/dist/web-remote-access.js +0 -368
- package/dist/web-remote-access.js.map +0 -1
- package/dist/windows-agents.d.ts +0 -126
- package/dist/windows-agents.js +0 -490
- package/dist/windows-agents.js.map +0 -1
- package/dist/windows-cli-api.d.ts +0 -23
- package/dist/windows-cli-api.js +0 -159
- package/dist/windows-cli-api.js.map +0 -1
- package/dist/windows-cli-providers.d.ts +0 -115
- package/dist/windows-cli-providers.js +0 -429
- package/dist/windows-cli-providers.js.map +0 -1
- package/dist/windows-cli-worker.d.ts +0 -59
- package/dist/windows-cli-worker.js +0 -479
- package/dist/windows-cli-worker.js.map +0 -1
- package/dist/windows-cli.d.ts +0 -116
- package/dist/windows-cli.js +0 -407
- package/dist/windows-cli.js.map +0 -1
- package/dist/windows-native-mcp.d.ts +0 -19
- package/dist/windows-native-mcp.js +0 -143
- package/dist/windows-native-mcp.js.map +0 -1
- package/dist/windows-pane-mcp.d.ts +0 -26
- package/dist/windows-pane-mcp.js +0 -187
- package/dist/windows-pane-mcp.js.map +0 -1
- package/templates/runtime-assets/conpty-LICENSE +0 -21
- package/templates/runtime-assets/conpty-NOTICE.md +0 -503
- package/templates/runtime-assets/local-pane-stage.ps1 +0 -101
- package/templates/runtime-assets/runtime-pane-job.ps1 +0 -116
- package/templates/runtime-assets/runtime-pane-private.ps1 +0 -14
- package/templates/runtime-assets/xterm-LICENSE +0 -21
|
@@ -64,6 +64,22 @@ function expiryText(iso) {
|
|
|
64
64
|
if (!(ms > 0)) return "";
|
|
65
65
|
return usageText("", { key: "usage.ticket_expiry", args: [`${at.getMonth() + 1}/${at.getDate()}`, usageDuration(ms)] });
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* #3066 §1: a server line ({ text, i18n }) in this page's language — or, when this tab's strings predate the key (a
|
|
69
|
+
* stale tab), the server's own English text, never the bare key.
|
|
70
|
+
*/
|
|
71
|
+
export function capacityLine(x) {
|
|
72
|
+
if (!x || typeof x.text !== "string") return "";
|
|
73
|
+
const key = x.i18n && typeof x.i18n.key === "string" ? `view.${x.i18n.key}` : null;
|
|
74
|
+
return key && t(key) !== key ? usageText(x.text, x.i18n) : x.text;
|
|
75
|
+
}
|
|
76
|
+
/** #3066 §1: a weekly quota's measured 100% (or why not yet), and the limit it always carries: only this fleet counts. */
|
|
77
|
+
function UsageCapacity({ c }) {
|
|
78
|
+
const notes = Array.isArray(c.notes) ? c.notes : [];
|
|
79
|
+
return html`<div class=${`u-cap${c.status === "ok" ? "" : " u-cap-wait"}`}>
|
|
80
|
+
<div class="u-cap-line">${capacityLine(c.line)}</div>
|
|
81
|
+
${notes.map((n, i) => html`<div key=${i} class="u-cap-note">${capacityLine(n)}</div>`)}</div>`;
|
|
82
|
+
}
|
|
67
83
|
export function UsageMetric({ m }) {
|
|
68
84
|
const bar = useRef(null);
|
|
69
85
|
const label = usageText(m.label, m.labelI18n);
|
|
@@ -78,7 +94,8 @@ export function UsageMetric({ m }) {
|
|
|
78
94
|
const sub = [note, resetText(m.resetsAt)].filter(Boolean).join(" · ");
|
|
79
95
|
return html`<div class="u-metric"><div class="u-row"><span class="u-label">${label}</span>${word ? html`<span class=${`u-status ${cls}`}>${word}</span>` : null}
|
|
80
96
|
<span class=${`u-pct ${cls}`}>${pct.toFixed(0)}<span class="u-unit">%</span></span></div>
|
|
81
|
-
<div class="u-meter"><div ref=${bar} class=${`u-fill ${cls}`}></div></div>${sub ? html`<div class="u-sub">${sub}</div>` : null}
|
|
97
|
+
<div class="u-meter"><div ref=${bar} class=${`u-fill ${cls}`}></div></div>${sub ? html`<div class="u-sub">${sub}</div>` : null}
|
|
98
|
+
${m.capacity ? html`<${UsageCapacity} c=${m.capacity} />` : null}</div>`;
|
|
82
99
|
}
|
|
83
100
|
if (m.type === "dollars") {
|
|
84
101
|
const val = m.limit ? `$${(m.used ?? 0).toFixed(2)} / $${m.limit.toFixed(2)}` : `$${(m.used ?? 0).toFixed(2)}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"note": "Vendored for #1408 (Preact + htm, no build)
|
|
2
|
+
"note": "Vendored for #1408 (Preact + htm, no build). Every file below is byte-checked by tests/web-vendor-1408.test.ts.",
|
|
3
3
|
"packages": {
|
|
4
4
|
"preact": {
|
|
5
5
|
"version": "10.29.8",
|
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
"upstream": "package/hooks/dist/hooks.module.js",
|
|
18
18
|
"sha256": "f3555e7a8dba84175c94f17148ba6670e4b3716888fe06b3330a485637296a38",
|
|
19
19
|
"upstreamSha256": "a6ee626f2d01570592dd569a792e3f050154aa02890eead8c223fa3ed5aa3d5a",
|
|
20
|
-
"rewrite": {
|
|
21
|
-
"from": "from\"preact\"",
|
|
22
|
-
"to": "from\"./preact.module.js\""
|
|
23
|
-
}
|
|
20
|
+
"rewrite": { "from": "from\"preact\"", "to": "from\"./preact.module.js\"" }
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
23
|
},
|
|
@@ -37,20 +34,6 @@
|
|
|
37
34
|
"upstreamSha256": "ab33dd3f38059b9be4d5f5350128eefb2356639c4e0bbe9d9e8b3ba75847e9e4"
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
|
-
},
|
|
41
|
-
"qrcode-generator": {
|
|
42
|
-
"version": "2.0.4",
|
|
43
|
-
"tarball": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-2.0.4.tgz",
|
|
44
|
-
"integrity": "sha512-mZSiP6RnbHl4xL2Ap5HfkjLnmxfKcPWpWe/c+5XxCuetEenqmNFf1FH/ftXPCtFG5/TDobjsjz6sSNL0Sr8Z9g==",
|
|
45
|
-
"license": "MIT",
|
|
46
|
-
"licenseFile": "vendor/qrcode-generator.LICENSE",
|
|
47
|
-
"files": {
|
|
48
|
-
"qrcode.module.js": {
|
|
49
|
-
"upstream": "package/dist/qrcode.mjs",
|
|
50
|
-
"sha256": "ea91d7118a5395289170da848b7c6758b996163bfbccf312591ab65a4911b7c0",
|
|
51
|
-
"upstreamSha256": "ea91d7118a5395289170da848b7c6758b996163bfbccf312591ab65a4911b7c0"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
37
|
}
|
|
55
38
|
}
|
|
56
39
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* Claude history in the View (view-history.js): its own stylesheet, linked by the module itself, so a tab opened before
|
|
2
|
+
an upgrade (an app.css without these rules) draws it the same. Colours come from the live screen, set per element. */
|
|
3
|
+
.v-pre .vh { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
4
|
+
.vh-line { padding-left: 2ch; text-indent: -2ch; min-height: 1.2em; }
|
|
5
|
+
.vh-line.vh-res { padding-left: 5ch; text-indent: -5ch; }
|
|
6
|
+
.vh-step + .vh-step { margin-top: 1.2em; }
|
|
7
|
+
.vh-b { font-weight: 700; }
|
|
8
|
+
.vh-diff { display: inline-block; width: 100%; vertical-align: top; text-indent: 0; }
|
|
9
|
+
.vh-dim { opacity: .6; }
|
|
10
|
+
.vh-more { background: none; border: 0; padding: 0; margin: 0; font: inherit; text-indent: 0; cursor: pointer;
|
|
11
|
+
text-decoration: underline dotted; text-underline-offset: 2px; }
|
|
12
|
+
.vh-more:disabled { cursor: progress; opacity: .7; }
|
|
13
|
+
.vh-more:focus-visible { outline: 1px solid currentColor; outline-offset: 1px; }
|
|
14
|
+
.vh-divider, .vh-cap { font-family: var(--font-ui, sans-serif); font-size: .85em; color: #8a8a8a; }
|
|
15
|
+
.vh-divider { display: flex; align-items: center; gap: 1ch; margin: .8em 0 .6em; white-space: nowrap; }
|
|
16
|
+
.vh-divider::before, .vh-divider::after { content: ""; flex: 1; border-top: 1px dashed #3c3c3c; }
|
|
17
|
+
.vh-cap { white-space: normal; padding-bottom: .8em; }
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
// Claude history in the View (the user, hmsg-a8947a2c / hmsg-b4c7ccdf; leader cid-claude-history-build). Claude Code
|
|
2
|
+
// draws on the alternate screen, so tmux keeps nothing above it: scrolling up in its View shows the conversation's
|
|
3
|
+
// earlier part from its transcript (GET /api/pane/<name>?transcript=1, view-history.ts), drawn like Claude's own
|
|
4
|
+
// Ctrl+O view — "❯" prompts on their band, "●" replies and tool calls, "⎿" results, diffs, long output folded — directly
|
|
5
|
+
// above the live screen, under a faint divider.
|
|
6
|
+
//
|
|
7
|
+
// The look is sampled from the live screen the View already shows (samplePalette): the prompt band, the bullet and
|
|
8
|
+
// result glyphs, the tool and diff colours, as this Claude version draws them; Claude 2.1.318's own values when the
|
|
9
|
+
// screen has none of them. A glyph the page's fonts lack falls back (⏺ → ●, ⎿ → └, ❯ → >).
|
|
10
|
+
//
|
|
11
|
+
// Loaded on first use by panel-view.js (a lazy module of its own). A tab opened before an upgrade runs it with the old
|
|
12
|
+
// shell, so it imports nothing but app-i18n.js's register/t (in every shell since #1408), registers its own words and
|
|
13
|
+
// links its own stylesheet (/assets/view-history.css): nothing it needs lives in a long-lived module. A server without
|
|
14
|
+
// the history (an older one answers the pane's text) makes `first()` say `unsupported`: the View stays as it was.
|
|
15
|
+
import { register, t } from "./app-i18n.js";
|
|
16
|
+
|
|
17
|
+
register("viewHistory", {
|
|
18
|
+
en: {
|
|
19
|
+
divider: "History above",
|
|
20
|
+
more: "… +{0} lines (click to expand)",
|
|
21
|
+
moreFailed: "Could not load the full text.",
|
|
22
|
+
cut: "… {0} more characters not shown",
|
|
23
|
+
capped: "Only the latest {0} steps are shown here.",
|
|
24
|
+
},
|
|
25
|
+
"zh-TW": {
|
|
26
|
+
divider: "以上是對話紀錄",
|
|
27
|
+
more: "… 還有 {0} 行(點一下展開)",
|
|
28
|
+
moreFailed: "無法載入完整內容。",
|
|
29
|
+
cut: "… 還有 {0} 個字元未顯示",
|
|
30
|
+
capped: "這裡只顯示最近 {0} 則紀錄。",
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const w = (key, ...values) => t(`viewHistory.${key}`, ...values);
|
|
34
|
+
|
|
35
|
+
/** About this many steps are kept on the page; older pages are not read past it. */
|
|
36
|
+
export const HISTORY_STEP_CAP = 1000;
|
|
37
|
+
|
|
38
|
+
// ── The palette, sampled from the live screen ──
|
|
39
|
+
const BASE = ["#000000", "#cd3131", "#0dbc79", "#e5e510", "#2472c8", "#bc3fbc", "#11a8cd", "#e5e5e5"];
|
|
40
|
+
const BRIGHT = ["#666666", "#f14c4c", "#23d18b", "#f5f543", "#3b8eea", "#d670d6", "#29b8db", "#ffffff"];
|
|
41
|
+
function xterm256(n) {
|
|
42
|
+
if (n < 8) return BASE[n];
|
|
43
|
+
if (n < 16) return BRIGHT[n - 8];
|
|
44
|
+
if (n < 232) { n -= 16; const r = Math.floor(n / 36), g = Math.floor((n % 36) / 6), b = n % 6; const v = (x) => (x ? x * 40 + 55 : 0); return `rgb(${v(r)},${v(g)},${v(b)})`; }
|
|
45
|
+
const l = (n - 232) * 10 + 8; return `rgb(${l},${l},${l})`;
|
|
46
|
+
}
|
|
47
|
+
/** Claude Code 2.1.318's own look (captured from a real pane, dark theme): what is used when the screen shows none. */
|
|
48
|
+
export const DEFAULT_PALETTE = Object.freeze({
|
|
49
|
+
promptGlyph: "❯", promptBand: xterm256(237), promptFg: xterm256(246), promptText: xterm256(231),
|
|
50
|
+
bullet: "●", replyFg: xterm256(231), toolFg: xterm256(114), failedFg: xterm256(203), runningFg: xterm256(246),
|
|
51
|
+
resultGlyph: "⎿", resultFg: xterm256(246),
|
|
52
|
+
delFg: xterm256(167), delBg: xterm256(52), addFg: xterm256(77), addBg: xterm256(22), errorFg: xterm256(203),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/** The screen's text as lines of runs: { text, fg, bg, bold } (colours as CSS, null when unset). */
|
|
56
|
+
export function ansiRuns(text) {
|
|
57
|
+
const lines = [[]];
|
|
58
|
+
let fg = null, bg = null, bold = false, reverse = false;
|
|
59
|
+
const push = (chunk) => {
|
|
60
|
+
const parts = chunk.split("\n");
|
|
61
|
+
parts.forEach((part, i) => {
|
|
62
|
+
if (i > 0) lines.push([]);
|
|
63
|
+
if (!part) return;
|
|
64
|
+
let f = typeof fg === "number" ? (bold && fg < 8 ? BRIGHT[fg] : BASE[fg]) : fg;
|
|
65
|
+
let b = typeof bg === "number" ? BASE[bg] : bg;
|
|
66
|
+
if (reverse) [f, b] = [b, f];
|
|
67
|
+
lines[lines.length - 1].push({ text: part, fg: f, bg: b, bold });
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const re = /\x1b\[([0-9;]*)m/g;
|
|
71
|
+
let last = 0, m;
|
|
72
|
+
while ((m = re.exec(text)) !== null) {
|
|
73
|
+
push(text.slice(last, m.index));
|
|
74
|
+
last = re.lastIndex;
|
|
75
|
+
const codes = m[1].split(";").filter((x) => x !== "").map(Number);
|
|
76
|
+
if (codes.length === 0) codes.push(0);
|
|
77
|
+
for (let i = 0; i < codes.length; i++) {
|
|
78
|
+
const c = codes[i];
|
|
79
|
+
if (c === 0) { fg = bg = null; bold = reverse = false; }
|
|
80
|
+
else if (c === 1) bold = true;
|
|
81
|
+
else if (c === 22) bold = false;
|
|
82
|
+
else if (c === 7) reverse = true;
|
|
83
|
+
else if (c === 27) reverse = false;
|
|
84
|
+
else if (c === 39) fg = null;
|
|
85
|
+
else if (c === 49) bg = null;
|
|
86
|
+
else if (c >= 30 && c <= 37) fg = c - 30;
|
|
87
|
+
else if (c >= 90 && c <= 97) fg = BRIGHT[c - 90];
|
|
88
|
+
else if (c >= 40 && c <= 47) bg = c - 40;
|
|
89
|
+
else if (c >= 100 && c <= 107) bg = BRIGHT[c - 100];
|
|
90
|
+
else if (c === 38 || c === 48) {
|
|
91
|
+
let col = null;
|
|
92
|
+
if (codes[i + 1] === 5) { col = xterm256(codes[i + 2]); i += 2; }
|
|
93
|
+
else if (codes[i + 1] === 2) { col = `rgb(${codes[i + 2] || 0},${codes[i + 3] || 0},${codes[i + 4] || 0})`; i += 4; }
|
|
94
|
+
if (c === 38) fg = col; else bg = col;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
push(text.slice(last));
|
|
99
|
+
return lines;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const PROMPT_GLYPHS = "❯>›";
|
|
103
|
+
const BULLETS = "●⏺";
|
|
104
|
+
const RESULT_GLYPHS = "⎿└";
|
|
105
|
+
/**
|
|
106
|
+
* How this Claude draws its conversation, read off the live screen (ANSI, as the View fetched it): each value found
|
|
107
|
+
* replaces the default; the most frequent wins where a screen shows several (a failed tool's red bullet among green).
|
|
108
|
+
*/
|
|
109
|
+
export function samplePalette(screen) { return sampleScreen(screen).palette; }
|
|
110
|
+
/** samplePalette, and which of its values the screen gave (the rest are the defaults) — for the version audit. */
|
|
111
|
+
export function sampleScreen(screen) {
|
|
112
|
+
const p = { ...DEFAULT_PALETTE };
|
|
113
|
+
const found = new Set();
|
|
114
|
+
const set = (k, v) => { if (v) { p[k] = v; found.add(k); } };
|
|
115
|
+
if (typeof screen !== "string" || !screen) return { palette: p, found: [] };
|
|
116
|
+
const tally = { toolFg: new Map(), replyFg: new Map() };
|
|
117
|
+
const count = (map, v) => { if (v) map.set(v, (map.get(v) || 0) + 1); };
|
|
118
|
+
let banded = false, glyphSeen = false;
|
|
119
|
+
for (const runs of ansiRuns(screen)) {
|
|
120
|
+
const textOf = runs.map((r) => r.text).join("");
|
|
121
|
+
const lead = textOf.length - textOf.trimStart().length;
|
|
122
|
+
// Find the run holding column `col` (and the offset in it).
|
|
123
|
+
const at = (col) => { let n = 0; for (const r of runs) { if (col < n + r.text.length) return r; n += r.text.length; } return null; };
|
|
124
|
+
const first = textOf.charAt(lead);
|
|
125
|
+
// A prompt: its glyph then a space, on a band (a past prompt) — or bare (the composer: the glyph only).
|
|
126
|
+
if (PROMPT_GLYPHS.includes(first) && textOf.charAt(lead + 1) === " " && !banded) {
|
|
127
|
+
const g = at(lead);
|
|
128
|
+
if (g && g.bg) {
|
|
129
|
+
banded = true; glyphSeen = true;
|
|
130
|
+
set("promptGlyph", first); set("promptBand", g.bg); set("promptFg", g.fg);
|
|
131
|
+
const rest = runs.slice(runs.indexOf(g) + 1).find((r) => r.text.trim());
|
|
132
|
+
if (rest) set("promptText", rest.fg);
|
|
133
|
+
} else if (!glyphSeen) { glyphSeen = true; set("promptGlyph", first); }
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
// A bullet at the line's start: a tool call ("● Name(" with the name bold) or a reply.
|
|
137
|
+
if (lead === 0 && BULLETS.includes(first) && textOf.charAt(1) === " ") {
|
|
138
|
+
set("bullet", first);
|
|
139
|
+
const g = at(0), next = at(2);
|
|
140
|
+
const tool = !!(next && next.bold) && /^. [^(]+\(/.test(textOf);
|
|
141
|
+
count(tool ? tally.toolFg : tally.replyFg, g && g.fg);
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
// A result: two spaces, its glyph.
|
|
145
|
+
if (lead === 2 && RESULT_GLYPHS.includes(first)) {
|
|
146
|
+
set("resultGlyph", first);
|
|
147
|
+
const g = at(2); if (g) set("resultFg", g.fg);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
// A diff row: a line number then - or +, on a coloured background.
|
|
151
|
+
const row = /^\s+\d+\s?([-+])/.exec(textOf);
|
|
152
|
+
if (row) {
|
|
153
|
+
const g = at(textOf.indexOf(row[1], lead));
|
|
154
|
+
if (g && g.bg) { if (row[1] === "-") { set("delBg", g.bg); set("delFg", g.fg); } else { set("addBg", g.bg); set("addFg", g.fg); } }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const top = (map) => { let best = null, n = 0; for (const [k, v] of map) if (v > n) { best = k; n = v; } return best; };
|
|
158
|
+
set("toolFg", top(tally.toolFg));
|
|
159
|
+
set("replyFg", top(tally.replyFg));
|
|
160
|
+
return { palette: p, found: [...found] };
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// ── Glyphs the page's fonts lack ──
|
|
164
|
+
const FALLBACK = { "⏺": "●", "●": "*", "⎿": "└", "└": "|", "❯": ">", "›": ">" };
|
|
165
|
+
const glyphCache = new Map();
|
|
166
|
+
/**
|
|
167
|
+
* Whether `ch` draws as itself in `font` (a CSS font-family list): drawn next to a code point no font has, the two must
|
|
168
|
+
* differ. No canvas (a test page): assumed drawn.
|
|
169
|
+
*/
|
|
170
|
+
export function hasGlyph(ch, font, doc = typeof document !== "undefined" ? document : null) {
|
|
171
|
+
const key = `${ch}\u0000${font}`;
|
|
172
|
+
if (glyphCache.has(key)) return glyphCache.get(key);
|
|
173
|
+
let ok = true;
|
|
174
|
+
try {
|
|
175
|
+
const canvas = doc && doc.createElement ? doc.createElement("canvas") : null;
|
|
176
|
+
const ctx = canvas && typeof canvas.getContext === "function" ? canvas.getContext("2d") : null;
|
|
177
|
+
if (ctx && typeof ctx.getImageData === "function") {
|
|
178
|
+
canvas.width = 40; canvas.height = 40;
|
|
179
|
+
const draw = (c) => { ctx.clearRect(0, 0, 40, 40); ctx.font = `32px ${font}`; ctx.fillStyle = "#000"; ctx.textBaseline = "top"; ctx.fillText(c, 2, 2); return ctx.getImageData(0, 0, 40, 40).data; };
|
|
180
|
+
const a = draw(ch), none = draw("\u{10FFFD}");
|
|
181
|
+
ok = false;
|
|
182
|
+
for (let i = 3; i < a.length; i += 4) if (a[i] !== none[i]) { ok = true; break; }
|
|
183
|
+
}
|
|
184
|
+
} catch { ok = true; }
|
|
185
|
+
glyphCache.set(key, ok);
|
|
186
|
+
return ok;
|
|
187
|
+
}
|
|
188
|
+
/** The glyph as drawn on this page: itself, or its fallback when the fonts lack it. */
|
|
189
|
+
export function drawable(ch, font, doc) {
|
|
190
|
+
let g = ch;
|
|
191
|
+
for (let i = 0; i < 3 && g && !hasGlyph(g, font, doc); i++) g = FALLBACK[g] || g;
|
|
192
|
+
return g;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ── Which steps the live screen already shows ──
|
|
196
|
+
// Text a needle is compared by: no whitespace (a wrap moves it) and no markdown marks (Claude draws them away).
|
|
197
|
+
const squash = (s) => String(s).replace(/\x1b\[[0-9;]*m/g, "").replace(/[\s*_`#>│]/g, "");
|
|
198
|
+
/**
|
|
199
|
+
* What of a prompt or a reply is looked for on the screen: its WHOLE text, normalised (#3069 review r3, Prism P2-2 — a
|
|
200
|
+
* fixed prefix, however long, is no proof: it can occur inside another message). None for a tool: Claude may draw it
|
|
201
|
+
* summarised.
|
|
202
|
+
*/
|
|
203
|
+
function needle(step) {
|
|
204
|
+
if (step.kind !== "user" && step.kind !== "assistant") return null;
|
|
205
|
+
const s = squash(step.body || "");
|
|
206
|
+
return s.length >= 4 ? s : null;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The steps before the live screen, matched conservatively (#3069 review, Prism P2-2): walking back from the newest,
|
|
210
|
+
* each prompt and reply must be found WHOLE on the screen, BEFORE the place the newer one was found — one occurrence
|
|
211
|
+
* never proves two messages, and a shared opening is never taken for the same message. The first one not found that
|
|
212
|
+
* way (a message only partly shown included), and everything older, is history. Tool calls go with their neighbours. Unsure means shown again: a
|
|
213
|
+
* step the screen shows may come twice — never one it does not show not at all.
|
|
214
|
+
*/
|
|
215
|
+
export function beforeScreen(steps, screen) {
|
|
216
|
+
const text = squash(screen || "");
|
|
217
|
+
let cut = steps.length, limit = text.length;
|
|
218
|
+
for (let i = steps.length - 1; i >= 0; i--) {
|
|
219
|
+
const n = needle(steps[i]);
|
|
220
|
+
if (n === null) continue;
|
|
221
|
+
const at = limit - n.length >= 0 ? text.lastIndexOf(n, limit - n.length) : -1;
|
|
222
|
+
if (at < 0) break;
|
|
223
|
+
limit = at;
|
|
224
|
+
cut = i;
|
|
225
|
+
}
|
|
226
|
+
return steps.slice(0, cut);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// ── Drawing ──
|
|
230
|
+
const TOOL_WORDS = { Edit: "Update", MultiEdit: "Update", Grep: "Search", Glob: "Search", WebFetch: "Fetch", WebSearch: "Web Search", TodoWrite: "Update Todos", Agent: "Task", NotebookEdit: "Edit Notebook" };
|
|
231
|
+
/** Claude's word for a tool, as its screen shows it ("Update" for Edit; "server - tool (MCP)" for an MCP tool). */
|
|
232
|
+
export function toolWord(tool) {
|
|
233
|
+
const mcp = /^mcp__(.+?)__(.+)$/.exec(tool || "");
|
|
234
|
+
if (mcp) return `${mcp[1]} - ${mcp[2]} (MCP)`;
|
|
235
|
+
return TOOL_WORDS[tool] || tool || "?";
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function el(doc, tag, cls, text) {
|
|
239
|
+
const e = doc.createElement(tag);
|
|
240
|
+
if (cls) e.className = cls;
|
|
241
|
+
if (text != null) e.textContent = text;
|
|
242
|
+
return e;
|
|
243
|
+
}
|
|
244
|
+
function span(doc, text, color, extra) {
|
|
245
|
+
const s = el(doc, "span", extra || null, text);
|
|
246
|
+
if (color) s.style.color = color; // CSSOM, never a style attribute (#1300)
|
|
247
|
+
return s;
|
|
248
|
+
}
|
|
249
|
+
/** A Read result's "12\tcode" lines as the terminal shows them (" 12 code"). */
|
|
250
|
+
const unTab = (text, tool) => (tool === "Read" ? text.replace(/^(\d+)\t/gm, (_, n) => `${n.padStart(4)} `) : text.replace(/\t/g, " "));
|
|
251
|
+
|
|
252
|
+
/** One step's block. `onMore`: the folded step, clicked. */
|
|
253
|
+
export function drawStep(doc, step, pal, glyphs, onMore) {
|
|
254
|
+
const box = el(doc, "div", "vh-step");
|
|
255
|
+
box.dataset.step = step.id;
|
|
256
|
+
const line = (cls) => box.appendChild(el(doc, "div", `vh-line${cls ? ` ${cls}` : ""}`));
|
|
257
|
+
if (step.kind === "user") {
|
|
258
|
+
(step.body || "").split("\n").forEach((text, i) => {
|
|
259
|
+
const l = line("vh-prompt");
|
|
260
|
+
l.style.background = pal.promptBand;
|
|
261
|
+
l.appendChild(span(doc, i === 0 ? `${glyphs.prompt} ` : " ", pal.promptFg));
|
|
262
|
+
l.appendChild(span(doc, text || " ", pal.promptText));
|
|
263
|
+
});
|
|
264
|
+
if (step.cut) line("vh-dim").textContent = ` ${w("cut", step.cut)}`;
|
|
265
|
+
return box;
|
|
266
|
+
}
|
|
267
|
+
if (step.kind === "assistant") {
|
|
268
|
+
(step.body || "").split("\n").forEach((text, i) => {
|
|
269
|
+
const l = line();
|
|
270
|
+
l.appendChild(i === 0 ? span(doc, `${glyphs.bullet} `, pal.replyFg) : span(doc, " "));
|
|
271
|
+
l.appendChild(span(doc, text || " "));
|
|
272
|
+
});
|
|
273
|
+
if (step.cut) line("vh-dim").textContent = ` ${w("cut", step.cut)}`;
|
|
274
|
+
return box;
|
|
275
|
+
}
|
|
276
|
+
if (step.kind === "tool") {
|
|
277
|
+
const head = line();
|
|
278
|
+
const fg = step.status === "failed" ? pal.failedFg : step.status === "running" || step.status === "interrupted" ? pal.runningFg : pal.toolFg;
|
|
279
|
+
head.appendChild(span(doc, `${glyphs.bullet} `, fg));
|
|
280
|
+
head.appendChild(span(doc, toolWord(step.tool), null, "vh-b"));
|
|
281
|
+
head.appendChild(span(doc, step.subject ? `(${step.subject})` : ""));
|
|
282
|
+
}
|
|
283
|
+
// The result: " ⎿ " then its first line; the rest under it — or the edit's diff rows.
|
|
284
|
+
const resultColor = step.kind === "error" || step.status === "failed" ? pal.errorFg : null;
|
|
285
|
+
let firstRow = true;
|
|
286
|
+
const mark = () => { const s = firstRow ? span(doc, ` ${glyphs.result} `, pal.resultFg) : span(doc, " "); firstRow = false; return s; };
|
|
287
|
+
if (step.diff) {
|
|
288
|
+
for (const h of step.diff) {
|
|
289
|
+
for (const [rows, sign, bg, fg] of [[h.del, "-", pal.delBg, pal.delFg], [h.add, "+", pal.addBg, pal.addFg]]) {
|
|
290
|
+
for (const text of rows) {
|
|
291
|
+
const l = line("vh-res");
|
|
292
|
+
l.appendChild(mark());
|
|
293
|
+
const row = span(doc, `${sign} ${text}`, fg, "vh-diff");
|
|
294
|
+
row.style.background = bg;
|
|
295
|
+
l.appendChild(row);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
} else if (step.body != null && step.body !== "") {
|
|
300
|
+
for (const text of unTab(step.body, step.tool).split("\n")) {
|
|
301
|
+
const l = line("vh-res");
|
|
302
|
+
l.appendChild(mark());
|
|
303
|
+
l.appendChild(span(doc, text || " ", resultColor));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
if (step.more) {
|
|
307
|
+
const l = line("vh-res");
|
|
308
|
+
l.appendChild(span(doc, " "));
|
|
309
|
+
const b = el(doc, "button", "vh-more", w("more", step.more));
|
|
310
|
+
b.type = "button";
|
|
311
|
+
b.style.color = pal.resultFg;
|
|
312
|
+
b.addEventListener("click", () => onMore && onMore(step, box, b));
|
|
313
|
+
l.appendChild(b);
|
|
314
|
+
} else if (step.cut) line("vh-res vh-dim").textContent = ` ${w("cut", step.cut)}`;
|
|
315
|
+
return box;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The history above one agent's live screen. `fetch(url)` reads under the View's lease; `alive()` is false once the
|
|
320
|
+
* View moved on (nothing is drawn then). `root` is the block panel-view.js puts above the screen it shows.
|
|
321
|
+
*/
|
|
322
|
+
export function createHistory({ name, fetch, alive = () => true, doc = document, font = "monospace", cols = 0 }) {
|
|
323
|
+
ensureStylesheet(doc);
|
|
324
|
+
const root = el(doc, "div", "vh");
|
|
325
|
+
root.setAttribute("data-trust", "panel-content");
|
|
326
|
+
if (cols > 0) root.style.width = `${cols}ch`;
|
|
327
|
+
const pages = el(doc, "div", "vh-pages");
|
|
328
|
+
const capNote = el(doc, "div", "vh-cap");
|
|
329
|
+
const divider = el(doc, "div", "vh-divider", w("divider"));
|
|
330
|
+
divider.setAttribute("role", "separator");
|
|
331
|
+
root.append(pages, divider);
|
|
332
|
+
let pal = DEFAULT_PALETTE, glyphs = null;
|
|
333
|
+
let key = null, before = null, shown = 0, busy = false;
|
|
334
|
+
const base = `/api/pane/${encodeURIComponent(name)}?transcript=1`;
|
|
335
|
+
const read = async (query) => {
|
|
336
|
+
const r = await fetch(`${base}${query}`);
|
|
337
|
+
// An older server answers the pane's text here: not this history.
|
|
338
|
+
const type = r.headers && typeof r.headers.get === "function" ? String(r.headers.get("Content-Type") || "") : "";
|
|
339
|
+
if (!r.ok) return { failed: true, status: r.status };
|
|
340
|
+
if (!type.includes("application/json")) return { unsupported: true };
|
|
341
|
+
const body = await r.json();
|
|
342
|
+
if (!body || body.view_history !== 1) return { unsupported: true };
|
|
343
|
+
return body;
|
|
344
|
+
};
|
|
345
|
+
const block = (steps, end) => {
|
|
346
|
+
const frag = doc.createDocumentFragment();
|
|
347
|
+
for (const s of steps) {
|
|
348
|
+
const b = drawStep(doc, s, pal, glyphs, more);
|
|
349
|
+
b.dataset.end = String(end);
|
|
350
|
+
frag.appendChild(b);
|
|
351
|
+
}
|
|
352
|
+
return frag;
|
|
353
|
+
};
|
|
354
|
+
async function more(step, box, button) {
|
|
355
|
+
if (button.disabled) return;
|
|
356
|
+
button.disabled = true;
|
|
357
|
+
try {
|
|
358
|
+
const body = await read(`&step=${encodeURIComponent(step.id)}&end=${encodeURIComponent(box.dataset.end)}&key=${encodeURIComponent(key || "")}`);
|
|
359
|
+
if (!alive()) return;
|
|
360
|
+
if (!body.supported || !body.step) throw new Error("gone");
|
|
361
|
+
const whole = drawStep(doc, body.step, pal, glyphs, more);
|
|
362
|
+
whole.dataset.end = box.dataset.end;
|
|
363
|
+
box.replaceWith(whole);
|
|
364
|
+
} catch {
|
|
365
|
+
if (!alive()) return;
|
|
366
|
+
button.disabled = false;
|
|
367
|
+
if (!box.querySelector(".vh-more-failed")) button.parentNode.insertBefore(span(doc, ` ${w("moreFailed")}`, pal.errorFg, "vh-more-failed"), button.nextSibling);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
root,
|
|
372
|
+
/** Older steps exist and the cap is not reached. */
|
|
373
|
+
hasOlder: () => before !== null && shown < HISTORY_STEP_CAP,
|
|
374
|
+
/**
|
|
375
|
+
* The newest page, minus what the live `screen` (ANSI) shows. "ok" | "empty" (nothing before the screen) |
|
|
376
|
+
* "unsupported" (no history here) | "failed" (with `status`).
|
|
377
|
+
*/
|
|
378
|
+
async first(screen) {
|
|
379
|
+
pal = samplePalette(screen);
|
|
380
|
+
glyphs = { prompt: drawable(pal.promptGlyph, font, doc), bullet: drawable(pal.bullet, font, doc), result: drawable(pal.resultGlyph, font, doc) };
|
|
381
|
+
let body;
|
|
382
|
+
try { body = await read(""); } catch { return { kind: "failed", status: 0 }; }
|
|
383
|
+
if (body.failed) return { kind: "failed", status: body.status };
|
|
384
|
+
if (body.unsupported) return { kind: "unsupported" };
|
|
385
|
+
// No history here at all (not Claude, or no reader) — or none YET (a session that has written nothing so far):
|
|
386
|
+
// that one is only nothing earlier, asked again next time.
|
|
387
|
+
if (!body.supported) return { kind: body.reason === "unsupported" || body.reason === "unavailable" ? "unsupported" : "empty" };
|
|
388
|
+
key = body.key; before = body.before;
|
|
389
|
+
let steps = beforeScreen(body.steps || [], screen);
|
|
390
|
+
let end = body.end;
|
|
391
|
+
// Everything in the newest page is on the screen: the page before it is the history.
|
|
392
|
+
if (!steps.length && before !== null) {
|
|
393
|
+
let older;
|
|
394
|
+
try { older = await read(`&before=${before}&key=${encodeURIComponent(key)}`); } catch { older = { failed: true, status: 0 }; }
|
|
395
|
+
if (!older.failed && older.supported && !older.reset) { steps = older.steps || []; before = older.before; end = older.end; }
|
|
396
|
+
}
|
|
397
|
+
if (!alive()) return { kind: "failed", status: 0 };
|
|
398
|
+
if (!steps.length) return { kind: "empty" };
|
|
399
|
+
pages.replaceChildren(block(steps, end));
|
|
400
|
+
shown = steps.length;
|
|
401
|
+
return { kind: "ok" };
|
|
402
|
+
},
|
|
403
|
+
/** The page before what is shown, drawn above it. "ok" | "none" | "capped" | "failed". */
|
|
404
|
+
async older() {
|
|
405
|
+
if (busy) return { kind: "none" };
|
|
406
|
+
if (before === null) return { kind: "none" };
|
|
407
|
+
if (shown >= HISTORY_STEP_CAP) {
|
|
408
|
+
if (!capNote.isConnected) { capNote.textContent = w("capped", HISTORY_STEP_CAP); root.prepend(capNote); }
|
|
409
|
+
return { kind: "capped" };
|
|
410
|
+
}
|
|
411
|
+
busy = true;
|
|
412
|
+
try {
|
|
413
|
+
const body = await read(`&before=${before}&key=${encodeURIComponent(key || "")}`);
|
|
414
|
+
if (!alive()) return { kind: "failed" };
|
|
415
|
+
if (body.failed || body.unsupported || !body.supported) return { kind: "failed" };
|
|
416
|
+
// Another transcript now (a new session): what is shown stays; nothing older of it.
|
|
417
|
+
if (body.reset) { before = null; return { kind: "none" }; }
|
|
418
|
+
before = body.before;
|
|
419
|
+
const steps = body.steps || [];
|
|
420
|
+
if (steps.length) { pages.prepend(block(steps, body.end)); shown += steps.length; }
|
|
421
|
+
return { kind: "ok" };
|
|
422
|
+
} catch { return { kind: "failed" }; }
|
|
423
|
+
finally { busy = false; }
|
|
424
|
+
},
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** This module's own stylesheet, linked once (a tab opened before an upgrade has an app.css without these rules). */
|
|
429
|
+
function ensureStylesheet(doc) {
|
|
430
|
+
try {
|
|
431
|
+
if (!doc.head || doc.querySelector('link[data-vh="1"]')) return;
|
|
432
|
+
const link = doc.createElement("link");
|
|
433
|
+
link.setAttribute("rel", "stylesheet");
|
|
434
|
+
link.setAttribute("href", "/assets/view-history.css");
|
|
435
|
+
link.setAttribute("data-vh", "1");
|
|
436
|
+
doc.head.appendChild(link);
|
|
437
|
+
} catch { /* the history still reads without it */ }
|
|
438
|
+
}
|
|
@@ -9,9 +9,6 @@ register("view", {
|
|
|
9
9
|
"save": "Save",
|
|
10
10
|
"cancel": "Cancel",
|
|
11
11
|
"filterPh": "Filter: name, model, backend",
|
|
12
|
-
"tooltipMachine": "Computer: {value}",
|
|
13
|
-
"machineOffline": "Computer offline",
|
|
14
|
-
"machineRevoked": "Connection revoked",
|
|
15
12
|
"filterClear": "Clear filter",
|
|
16
13
|
"filterNone": "No instance matches",
|
|
17
14
|
"filterShown": "shown",
|
|
@@ -157,6 +154,14 @@ register("view", {
|
|
|
157
154
|
"usage.stale.transient": "not updated · cached at {0}",
|
|
158
155
|
"usage.stale.error": "couldn't read · cached at {0}",
|
|
159
156
|
"usage.metric.reset_since": "reset since {0}",
|
|
157
|
+
"usage.capacity.line": "100% ≈ {0} ({1}–{2}) · ≈ {3} tokens · from {4} weeks",
|
|
158
|
+
"usage.capacity.line_tokens": "100% ≈ {0} tokens ({1}–{2}) · from {3} weeks",
|
|
159
|
+
"usage.capacity.not_enough": "Not enough usage yet to measure 100% (Δ {0}% of 10%)",
|
|
160
|
+
"usage.capacity.only_agend": "Counts only this fleet's agents; use of the same account elsewhere makes this low.",
|
|
161
|
+
"usage.capacity.mixed": "Bases disagree — possibly used outside this fleet",
|
|
162
|
+
"usage.capacity.best_fit_api": "API-equivalent fits best: ±{0}% across {1} weeks",
|
|
163
|
+
"usage.capacity.best_fit_output": "Output tokens fit best: ±{0}% across {1} weeks",
|
|
164
|
+
"usage.capacity.best_fit_all": "All tokens fit best: ±{0}% across {1} weeks",
|
|
160
165
|
"usage.error.http": "Usage request failed (HTTP {0}).",
|
|
161
166
|
"usage.error.billing_http": "Billing request failed (HTTP {0}).",
|
|
162
167
|
"usage.error.invalid_response": "Invalid response from usage endpoint.",
|
|
@@ -240,7 +245,6 @@ register("view", {
|
|
|
240
245
|
"avatar": "Avatar",
|
|
241
246
|
"instancesLabel": "Instances",
|
|
242
247
|
"favorites": "Favorites",
|
|
243
|
-
"generalGroup": "General",
|
|
244
248
|
"favAdd": "Add {name} to favorites",
|
|
245
249
|
"favRemove": "Remove {name} from favorites",
|
|
246
250
|
"favEdit": "Edit",
|
|
@@ -273,9 +277,6 @@ register("view", {
|
|
|
273
277
|
"save": "儲存",
|
|
274
278
|
"cancel": "取消",
|
|
275
279
|
"filterPh": "篩選:名稱、模型、後端",
|
|
276
|
-
"tooltipMachine": "電腦:{value}",
|
|
277
|
-
"machineOffline": "電腦離線",
|
|
278
|
-
"machineRevoked": "連線已撤銷",
|
|
279
280
|
"filterClear": "清除篩選",
|
|
280
281
|
"filterNone": "沒有符合的 instance",
|
|
281
282
|
"filterShown": "顯示中",
|
|
@@ -421,6 +422,14 @@ register("view", {
|
|
|
421
422
|
"usage.stale.transient": "暫時無法更新 · 快取於 {0}",
|
|
422
423
|
"usage.stale.error": "讀取失敗 · 快取於 {0}",
|
|
423
424
|
"usage.metric.reset_since": "已於 {0} 重置",
|
|
425
|
+
"usage.capacity.line": "100% ≈ {0}({1}–{2})· 約 {3} token · 依 {4} 週",
|
|
426
|
+
"usage.capacity.line_tokens": "100% ≈ {0} token({1}–{2})· 依 {3} 週",
|
|
427
|
+
"usage.capacity.not_enough": "用量還不夠估算 100%(已用 Δ {0}%,需 10%)",
|
|
428
|
+
"usage.capacity.only_agend": "只計算這個 fleet 的 agent;同一帳號在別處的使用會讓這個值偏低。",
|
|
429
|
+
"usage.capacity.mixed": "各換算方式不一致——可能有 fleet 以外的使用",
|
|
430
|
+
"usage.capacity.best_fit_api": "「API 等值」最吻合:{1} 週內 ±{0}%",
|
|
431
|
+
"usage.capacity.best_fit_output": "「輸出 token」最吻合:{1} 週內 ±{0}%",
|
|
432
|
+
"usage.capacity.best_fit_all": "「全部 token」最吻合:{1} 週內 ±{0}%",
|
|
424
433
|
"usage.error.http": "用量請求失敗(HTTP {0})。",
|
|
425
434
|
"usage.error.billing_http": "計費請求失敗(HTTP {0})。",
|
|
426
435
|
"usage.error.invalid_response": "用量端點回傳了無效資料。",
|
|
@@ -502,7 +511,6 @@ register("view", {
|
|
|
502
511
|
"avatar": "頭像",
|
|
503
512
|
"instancesLabel": "Instances",
|
|
504
513
|
"favorites": "最愛",
|
|
505
|
-
"generalGroup": "General",
|
|
506
514
|
"favAdd": "把 {name} 加入最愛",
|
|
507
515
|
"favRemove": "把 {name} 從最愛移除",
|
|
508
516
|
"favEdit": "編輯",
|
package/dist/ui/signin.html
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<!--/app-icon-->
|
|
14
14
|
<script src="/assets/theme.js"></script>
|
|
15
15
|
<link rel="stylesheet" href="/assets/tokens.css">
|
|
16
|
+
<link rel="stylesheet" href="/assets/loading.css">
|
|
16
17
|
<style>
|
|
17
18
|
/* #1408 step 5: the app's tokens (tokens.css), light and dark like every page (theme.js before paint). */
|
|
18
19
|
* { box-sizing: border-box; }
|
|
@@ -43,9 +44,11 @@
|
|
|
43
44
|
</style>
|
|
44
45
|
</head>
|
|
45
46
|
<body>
|
|
46
|
-
<main>
|
|
47
|
+
<main class="signin-card">
|
|
47
48
|
<div class="brand">AgEnD</div>
|
|
48
|
-
<div id="checking"
|
|
49
|
+
<div id="checking" class="skeleton sk-signin" role="status" aria-busy="true" aria-label="Checking your session…">
|
|
50
|
+
<div aria-hidden="true"><div class="sk-line"></div><div class="sk-line"></div><div class="sk-line"></div><div class="sk-line"></div><div class="sk-line"></div></div>
|
|
51
|
+
</div>
|
|
49
52
|
<form id="form" hidden autocomplete="off">
|
|
50
53
|
<h1 data-i18n="title">Sign in to AgEnD</h1>
|
|
51
54
|
<p data-i18n="lead">Enter your sign-in code.</p>
|
|
@@ -2,5 +2,14 @@
|
|
|
2
2
|
export declare const UNATTENDED_INSTALL_SCRIPT: string;
|
|
3
3
|
/** The account's login shell, when it is an absolute path to an executable; else undefined (keep the inherited one). */
|
|
4
4
|
export declare function loginShell(read?: () => string | null | undefined): Promise<string | undefined>;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The window's command for an install command. `shell`: the $SHELL to give it; null keeps the inherited one.
|
|
7
|
+
* `exitMarker` (installExitMarker()): the wrapper prints `<marker><exit code>` as its last line, for the session.
|
|
8
|
+
*/
|
|
9
|
+
export declare function unattendedInstallCommand(command: string, shell?: string | null, exitMarker?: string): string;
|
|
10
|
+
/** A marker for one install: random per run, so nothing the installer prints can pass for the wrapper's verdict. */
|
|
11
|
+
export declare function installExitMarker(): string;
|
|
12
|
+
/** The exit code the wrapper printed after `marker` (its last such line), or undefined when there is none. */
|
|
13
|
+
export declare function exitCodeFromMarker(pane: string, marker: string): number | undefined;
|
|
14
|
+
/** The pane without the wrapper's verdict line (what a person is shown). */
|
|
15
|
+
export declare function withoutExitMarker(pane: string, marker: string): string;
|