@songsid/agend 2.4.0-beta.26 → 2.4.0-beta.28
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/dist/agent-cli-instructions.md +2 -1
- package/dist/agent-cli.js +6 -0
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +1 -0
- package/dist/agent-endpoint.js +5 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.js +4 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/backend/kiro-auth-store.d.ts +15 -2
- package/dist/backend/kiro-auth-store.js +64 -0
- package/dist/backend/kiro-auth-store.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.js +4 -4
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.js +3 -3
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +7 -0
- package/dist/channel/ipc-bridge.js +45 -11
- package/dist/channel/ipc-bridge.js.map +1 -1
- package/dist/channel/mcp-server.js +3 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +6 -4
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/claude-turn-boundaries.d.ts +15 -0
- package/dist/claude-turn-boundaries.js +88 -0
- package/dist/claude-turn-boundaries.js.map +1 -0
- package/dist/cli.js +35 -2
- package/dist/cli.js.map +1 -1
- package/dist/contact-auth-service.js +3 -0
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.d.ts +16 -0
- package/dist/contact-auth-store.js +61 -1
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/daemon.d.ts +76 -4
- package/dist/daemon.js +621 -115
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +145 -7
- package/dist/delivery-outbox.js +373 -8
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/detached-fleet-stop.d.ts +40 -0
- package/dist/detached-fleet-stop.js +126 -0
- package/dist/detached-fleet-stop.js.map +1 -0
- package/dist/fleet-lock.d.ts +5 -0
- package/dist/fleet-lock.js +21 -2
- package/dist/fleet-lock.js.map +1 -1
- package/dist/fleet-manager.d.ts +499 -5
- package/dist/fleet-manager.js +2917 -217
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +39 -3
- package/dist/fleet-windows-runtime.js +208 -30
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +5 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +5 -1
- package/dist/general-knowledge/skills/task-board/SKILL.md +14 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +96 -26
- package/dist/hub/admin-dashboard.js +1 -1
- package/dist/hub/admin-dashboard.js.map +1 -1
- package/dist/hub/agent-catalog.d.ts +1 -1
- package/dist/hub/agent-catalog.js +4 -3
- package/dist/hub/agent-catalog.js.map +1 -1
- package/dist/hub/agent-intro.d.ts +1 -1
- package/dist/hub/agent-intro.js +1 -1
- package/dist/hub/agent-intro.js.map +1 -1
- package/dist/hub/agent-pictures.d.ts +1 -1
- package/dist/hub/agent-pictures.js +4 -3
- package/dist/hub/agent-pictures.js.map +1 -1
- package/dist/hub/catalog.d.ts +2 -2
- package/dist/hub/catalog.js +16 -13
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.js +9 -2
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.js +8 -1
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.js +4 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/fleet-updates.d.ts +2 -2
- package/dist/hub/fleet-updates.js +7 -5
- package/dist/hub/fleet-updates.js.map +1 -1
- package/dist/hub/fleet-versions.d.ts +1 -1
- package/dist/hub/fleet-versions.js +3 -2
- package/dist/hub/fleet-versions.js.map +1 -1
- package/dist/hub/http/compose.js +57 -30
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/schema.js +4 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/join/service.d.ts +6 -0
- package/dist/hub/join/service.js +10 -0
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/member/room-ask.js +2 -0
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +4 -0
- package/dist/hub/member/room-post.js +26 -1
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/protocol.d.ts +58 -0
- package/dist/hub/protocol.js +3 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/quota.d.ts +2 -2
- package/dist/hub/quota.js +6 -4
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/read-statement.d.ts +6 -0
- package/dist/hub/read-statement.js +33 -0
- package/dist/hub/read-statement.js.map +1 -0
- package/dist/hub/recommendations.d.ts +1 -1
- package/dist/hub/recommendations.js +3 -2
- package/dist/hub/recommendations.js.map +1 -1
- package/dist/hub/representative.d.ts +2 -0
- package/dist/hub/representative.js +8 -4
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/roles/clock.d.ts +1 -1
- package/dist/hub/roles/clock.js +9 -7
- package/dist/hub/roles/clock.js.map +1 -1
- package/dist/hub/roles/read.d.ts +4 -0
- package/dist/hub/roles/read.js +37 -7
- package/dist/hub/roles/read.js.map +1 -1
- package/dist/hub/room-history-model.d.ts +87 -0
- package/dist/hub/room-history-model.js +14 -0
- package/dist/hub/room-history-model.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +1 -1
- package/dist/hub/rooms/agents.js +3 -2
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/history.d.ts +8 -0
- package/dist/hub/rooms/history.js +31 -0
- package/dist/hub/rooms/history.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +2 -0
- package/dist/hub/rooms/schema.js +4 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +35 -19
- package/dist/hub/rooms/service.js +105 -26
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/server.js +10 -3
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-epoch.js +2 -1
- package/dist/hub/session-epoch.js.map +1 -1
- package/dist/hub/settings-directory-decision.js +14 -7
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-member-address-decision.js +3 -2
- package/dist/hub/settings-member-address-decision.js.map +1 -1
- package/dist/hub/settings-web-address-decision.js +2 -1
- package/dist/hub/settings-web-address-decision.js.map +1 -1
- package/dist/hub/store.d.ts +5 -0
- package/dist/hub/store.js +28 -5
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +2 -2
- package/dist/hub-agent-incarnation-record.d.ts +24 -0
- package/dist/hub-agent-incarnation-record.js +46 -0
- package/dist/hub-agent-incarnation-record.js.map +1 -0
- package/dist/human-delivery-receipts.d.ts +16 -4
- package/dist/human-delivery-receipts.js +26 -5
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +9 -3
- package/dist/instance-lifecycle.js +27 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/local-pane-endpoint.d.ts +14 -0
- package/dist/local-pane-endpoint.js +32 -0
- package/dist/local-pane-endpoint.js.map +1 -1
- package/dist/locale.js +68 -4
- package/dist/locale.js.map +1 -1
- package/dist/native-agent-admission.js +9 -0
- package/dist/native-agent-admission.js.map +1 -1
- package/dist/native-exec-context.d.ts +11 -0
- package/dist/native-exec-context.js +18 -0
- package/dist/native-exec-context.js.map +1 -0
- package/dist/native-exec-input.d.ts +56 -0
- package/dist/native-exec-input.js +89 -0
- package/dist/native-exec-input.js.map +1 -0
- package/dist/native-mcp.d.ts +9 -1
- package/dist/native-mcp.js +29 -7
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +3 -0
- package/dist/native-pane-lifecycle.js +2 -0
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.d.ts +18 -0
- package/dist/native-pane-manager.js +85 -8
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you.d.ts +2 -1
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +1 -0
- package/dist/outbound-handlers.js +9 -3
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +8 -0
- package/dist/outbound-schemas.js +6 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +3 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/recover.cjs +1 -0
- package/dist/reply-buttons-controller.d.ts +1 -0
- package/dist/reply-buttons-controller.js +1 -1
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/request-contact-gate.d.ts +2 -0
- package/dist/request-contact-gate.js +8 -3
- package/dist/request-contact-gate.js.map +1 -1
- package/dist/request-context-activation.d.ts +29 -0
- package/dist/request-context-activation.js +85 -0
- package/dist/request-context-activation.js.map +1 -0
- package/dist/request-context-admission.d.ts +22 -0
- package/dist/request-context-admission.js +12 -0
- package/dist/request-context-admission.js.map +1 -0
- package/dist/request-context-boot.d.ts +35 -0
- package/dist/request-context-boot.js +97 -0
- package/dist/request-context-boot.js.map +1 -0
- package/dist/request-context-call.d.ts +3 -0
- package/dist/request-context-call.js.map +1 -1
- package/dist/request-context-compatibility.js +10 -2
- package/dist/request-context-compatibility.js.map +1 -1
- package/dist/request-context-continuation.d.ts +6 -0
- package/dist/request-context-continuation.js +24 -0
- package/dist/request-context-continuation.js.map +1 -0
- package/dist/request-context-control-api.d.ts +119 -0
- package/dist/request-context-control-api.js +179 -0
- package/dist/request-context-control-api.js.map +1 -0
- package/dist/request-context-control-copy.d.ts +3 -0
- package/dist/request-context-control-copy.js +7 -0
- package/dist/request-context-control-copy.js.map +1 -0
- package/dist/request-context-controller.d.ts +44 -0
- package/dist/request-context-controller.js +129 -0
- package/dist/request-context-controller.js.map +1 -0
- package/dist/request-context-delivery-resolver.d.ts +13 -0
- package/dist/request-context-delivery-resolver.js +30 -0
- package/dist/request-context-delivery-resolver.js.map +1 -0
- package/dist/request-context-drain-projection.d.ts +8 -0
- package/dist/request-context-drain-projection.js +40 -0
- package/dist/request-context-drain-projection.js.map +1 -0
- package/dist/request-context-drain.d.ts +22 -0
- package/dist/request-context-drain.js +139 -7
- package/dist/request-context-drain.js.map +1 -1
- package/dist/request-context-enable-offer.d.ts +13 -0
- package/dist/request-context-enable-offer.js +31 -0
- package/dist/request-context-enable-offer.js.map +1 -0
- package/dist/request-context-exec-owner.d.ts +39 -0
- package/dist/request-context-exec-owner.js +128 -0
- package/dist/request-context-exec-owner.js.map +1 -0
- package/dist/request-context-go-back-view.d.ts +1 -0
- package/dist/request-context-go-back-view.js +17 -0
- package/dist/request-context-go-back-view.js.map +1 -0
- package/dist/request-context-helper-readiness.d.ts +14 -0
- package/dist/request-context-helper-readiness.js +23 -0
- package/dist/request-context-helper-readiness.js.map +1 -0
- package/dist/request-context-helper.d.ts +20 -0
- package/dist/request-context-helper.js +41 -0
- package/dist/request-context-helper.js.map +1 -0
- package/dist/request-context-hub-resolver.d.ts +29 -0
- package/dist/request-context-hub-resolver.js +90 -0
- package/dist/request-context-hub-resolver.js.map +1 -0
- package/dist/request-context-human-resolver.d.ts +20 -0
- package/dist/request-context-human-resolver.js +77 -0
- package/dist/request-context-human-resolver.js.map +1 -0
- package/dist/request-context-human.d.ts +112 -0
- package/dist/request-context-human.js +176 -0
- package/dist/request-context-human.js.map +1 -0
- package/dist/request-context-inputs.d.ts +21 -0
- package/dist/request-context-inputs.js +63 -0
- package/dist/request-context-inputs.js.map +1 -0
- package/dist/request-context-installation.d.ts +117 -0
- package/dist/request-context-installation.js +328 -0
- package/dist/request-context-installation.js.map +1 -0
- package/dist/request-context-knowledge.d.ts +5 -0
- package/dist/request-context-knowledge.js +32 -0
- package/dist/request-context-knowledge.js.map +1 -0
- package/dist/request-context-migration.d.ts +11 -0
- package/dist/request-context-migration.js +16 -3
- package/dist/request-context-migration.js.map +1 -1
- package/dist/request-context-native-human.d.ts +20 -0
- package/dist/request-context-native-human.js +91 -0
- package/dist/request-context-native-human.js.map +1 -0
- package/dist/request-context-native-output.d.ts +15 -0
- package/dist/request-context-native-output.js +46 -0
- package/dist/request-context-native-output.js.map +1 -0
- package/dist/request-context-native-result.d.ts +15 -0
- package/dist/request-context-native-result.js +46 -0
- package/dist/request-context-native-result.js.map +1 -0
- package/dist/request-context-off.d.ts +22 -0
- package/dist/request-context-off.js +77 -0
- package/dist/request-context-off.js.map +1 -0
- package/dist/request-context-outside-label.d.ts +5 -0
- package/dist/request-context-outside-label.js +28 -0
- package/dist/request-context-outside-label.js.map +1 -0
- package/dist/request-context-pane.d.ts +8 -0
- package/dist/request-context-pane.js +19 -0
- package/dist/request-context-pane.js.map +1 -1
- package/dist/request-context-pending-work.d.ts +11 -0
- package/dist/request-context-pending-work.js +43 -0
- package/dist/request-context-pending-work.js.map +1 -0
- package/dist/request-context-policy.d.ts +17 -1
- package/dist/request-context-policy.js +84 -6
- package/dist/request-context-policy.js.map +1 -1
- package/dist/request-context-readiness.d.ts +49 -0
- package/dist/request-context-readiness.js +64 -0
- package/dist/request-context-readiness.js.map +1 -0
- package/dist/request-context-recovery.d.ts +6 -2
- package/dist/request-context-recovery.js +25 -0
- package/dist/request-context-recovery.js.map +1 -1
- package/dist/request-context-relay.d.ts +2 -2
- package/dist/request-context-relay.js +10 -10
- package/dist/request-context-relay.js.map +1 -1
- package/dist/request-context-reply-pending.d.ts +16 -0
- package/dist/request-context-reply-pending.js +77 -0
- package/dist/request-context-reply-pending.js.map +1 -0
- package/dist/request-context-resolution.d.ts +35 -0
- package/dist/request-context-resolution.js +86 -0
- package/dist/request-context-resolution.js.map +1 -0
- package/dist/request-context-retirement.d.ts +21 -0
- package/dist/request-context-retirement.js +16 -0
- package/dist/request-context-retirement.js.map +1 -0
- package/dist/request-context-start.d.ts +15 -0
- package/dist/request-context-start.js +2 -0
- package/dist/request-context-start.js.map +1 -0
- package/dist/request-context-turns.d.ts +1 -1
- package/dist/request-context-turns.js +3 -2
- package/dist/request-context-turns.js.map +1 -1
- package/dist/request-context-unproved-label.d.ts +4 -0
- package/dist/request-context-unproved-label.js +25 -0
- package/dist/request-context-unproved-label.js.map +1 -0
- package/dist/request-context-update-guard.d.ts +15 -0
- package/dist/request-context-update-guard.js +54 -0
- package/dist/request-context-update-guard.js.map +1 -0
- package/dist/request-context-work.d.ts +50 -0
- package/dist/request-context-work.js +178 -0
- package/dist/request-context-work.js.map +1 -0
- package/dist/request-hub-context.d.ts +1 -0
- package/dist/request-hub-output.d.ts +2 -0
- package/dist/request-hub-output.js +12 -0
- package/dist/request-hub-output.js.map +1 -1
- package/dist/retained-human-control.d.ts +11 -0
- package/dist/retained-human-control.js +11 -0
- package/dist/retained-human-control.js.map +1 -0
- package/dist/runtime-build-info.js +1 -1
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli.js +1 -1
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.js +7 -1
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.js +15 -3
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +23 -0
- package/dist/runtime-coordinator.js +103 -4
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +9 -0
- package/dist/runtime-pane-mcp.js +22 -2
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-protocol.d.ts +2 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-update-controller.js +1 -1
- package/dist/runtime-update-controller.js.map +1 -1
- package/dist/runtime-windows-bridge.d.ts +8 -0
- package/dist/runtime-windows-bridge.js +50 -3
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/db.js +9 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +3 -6
- package/dist/scheduler/task-board-text.js +15 -10
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board-unread.d.ts +90 -0
- package/dist/scheduler/task-board-unread.js +192 -0
- package/dist/scheduler/task-board-unread.js.map +1 -0
- package/dist/scheduler/task-board.d.ts +324 -6
- package/dist/scheduler/task-board.js +786 -47
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/service-install-handover.d.ts +52 -0
- package/dist/service-install-handover.js +50 -0
- package/dist/service-install-handover.js.map +1 -0
- package/dist/service-installer.d.ts +12 -0
- package/dist/service-installer.js +24 -10
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +4 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +5 -4
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-confirmation.d.ts +2 -0
- package/dist/settings-confirmation.js +6 -0
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +59 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -0
- package/dist/settings-http-confirmation.js +29 -0
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-route-lifetime.d.ts +3 -1
- package/dist/settings-route-lifetime.js +15 -5
- package/dist/settings-route-lifetime.js.map +1 -1
- package/dist/settings-transaction.d.ts +3 -2
- package/dist/settings-transaction.js.map +1 -1
- package/dist/task-board-tool.js +24 -3
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +53 -2
- package/dist/task-board-waker.js +183 -12
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tips.js +1 -1
- package/dist/tips.js.map +1 -1
- package/dist/tool-permissions.js +3 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +6 -6
- package/dist/transcript-monitor.d.ts +6 -1
- package/dist/transcript-monitor.js +59 -4
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-turns.d.ts +3 -0
- package/dist/transcript-turns.js +5 -0
- package/dist/transcript-turns.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +16 -1
- package/dist/turn-reply-guard.js +20 -2
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/ui/app.html +2 -2
- package/dist/ui/contact-auth-strings.js +6 -6
- package/dist/ui/contact-authorizations.js +19 -1
- package/dist/ui/contact-grant-editor.js +71 -11
- package/dist/ui/contact-needs.js +27 -8
- package/dist/ui/contact-permissions.js +25 -8
- package/dist/ui/contact-tool-groups.js +1 -1
- package/dist/ui/fleet-task-activity.js +164 -24
- package/dist/ui/fleet-task-card.js +77 -13
- package/dist/ui/fleet-task-common.js +14 -0
- package/dist/ui/fleet-task-flow.js +353 -0
- package/dist/ui/fleet-task-md.js +1 -1
- package/dist/ui/fleet-task-run.js +98 -22
- package/dist/ui/fleet-task-thread.js +245 -0
- package/dist/ui/fleet-task-unread.js +100 -0
- package/dist/ui/fleet-task-view.js +6 -5
- package/dist/ui/fleet-task-wake.js +140 -0
- package/dist/ui/fleet-tasks.js +13 -6
- package/dist/ui/hub-client.js +3 -0
- package/dist/ui/hub-room-members.js +4 -2
- package/dist/ui/hub-room-settings-strings.js +8 -0
- package/dist/ui/hub-room-settings.js +32 -0
- package/dist/ui/hub-room-thread.js +7 -1
- package/dist/ui/icons/hub-apple-touch-icon.png +0 -0
- package/dist/ui/icons/hub-favicon.ico +0 -0
- package/dist/ui/icons/hub-favicon.svg +10 -0
- package/dist/ui/icons/hub-icon-192.png +0 -0
- package/dist/ui/icons/hub-icon-512.png +0 -0
- package/dist/ui/icons/hub-icon-maskable-192.png +0 -0
- package/dist/ui/icons/hub-icon-maskable-512.png +0 -0
- package/dist/ui/icons/hub-maskable.svg +12 -0
- package/dist/ui/panel-hub.js +14 -3
- package/dist/ui/panel-needs.js +2 -1
- package/dist/ui/panel-settings.js +2 -1
- package/dist/ui/panel-windows-cli.js +2 -2
- package/dist/ui/request-contact-card.js +287 -0
- package/dist/ui/request-contact-client.js +83 -0
- package/dist/ui/request-contact-page.js +78 -0
- package/dist/ui/request-context-control.js +209 -0
- package/dist/ui/settings-registry.js +2 -0
- package/dist/ui/settings-update.js +3 -2
- package/dist/ui/shared/access-overview.css +1 -1
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-install.js +2 -2
- package/dist/ui/shared/app-shell.js +17 -4
- package/dist/ui/shared/app-stream.js +4 -1
- package/dist/ui/shared/app-update.js +2 -1
- package/dist/ui/shared/app.css +101 -10
- package/dist/ui/shared/app.js +19 -2
- package/dist/ui/shared/task-board.css +164 -0
- package/dist/ui/shared/ui-icons.js +3 -0
- package/dist/ui/shared/ui-states.js +6 -0
- package/dist/ui/shared/update-card-ui.js +178 -11
- package/dist/ui/shared/view-strings.js +18 -0
- package/dist/ui/shared/web-authorize.js +1 -1
- package/dist/ui/task-unread.js +70 -0
- package/dist/ui/windows-cli-catalog.js +33 -6
- package/dist/update-card.d.ts +1 -1
- package/dist/update-card.js +7 -7
- package/dist/update-card.js.map +1 -1
- package/dist/update-fix.d.ts +66 -0
- package/dist/update-fix.js +67 -0
- package/dist/update-fix.js.map +1 -0
- package/dist/update-goback.js +15 -3
- package/dist/update-goback.js.map +1 -1
- package/dist/update-readiness.d.ts +2 -0
- package/dist/update-readiness.js +5 -1
- package/dist/update-readiness.js.map +1 -1
- package/dist/update-snapshot-scope.js +1 -0
- package/dist/update-snapshot-scope.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +9 -0
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +3 -11
- package/dist/usage/providers.js +93 -131
- package/dist/usage/providers.js.map +1 -1
- package/dist/web-api.d.ts +49 -1
- package/dist/web-api.js +234 -13
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +2 -0
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-icons.d.ts +9 -3
- package/dist/web-icons.js +62 -5
- package/dist/web-icons.js.map +1 -1
- package/dist/web-update.d.ts +9 -0
- package/dist/windows-agents.d.ts +24 -2
- package/dist/windows-agents.js +110 -4
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.js +4 -2
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.js +9 -1
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +55 -1
- package/dist/windows-cli.js +147 -17
- package/dist/windows-cli.js.map +1 -1
- package/dist/windows-shortcuts.d.ts +3 -22
- package/dist/windows-shortcuts.js +5 -45
- package/dist/windows-shortcuts.js.map +1 -1
- package/dist/workflow-templates/default.md +3 -2
- package/dist/wsl-host.d.ts +52 -0
- package/dist/wsl-host.js +97 -0
- package/dist/wsl-host.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { register, t } from "./app-i18n.js";
|
|
|
9
9
|
import { confirmDialog } from "./ui-confirm.js";
|
|
10
10
|
import { Dialog } from "./ui-dialog.js";
|
|
11
11
|
import { toast } from "./ui-toast.js";
|
|
12
|
+
import { Icon } from "./ui-icons.js";
|
|
12
13
|
import { dateTimeText } from "./clock-text.js";
|
|
13
14
|
|
|
14
15
|
register("updatecard", {
|
|
@@ -21,6 +22,7 @@ register("updatecard", {
|
|
|
21
22
|
whenIdle: "Update when idle", pickTime: "Pick a time", notNow: "Not now", updateNow: "Update now", cancel: "Cancel",
|
|
22
23
|
waiting: "Updating to {0} as soon as your agents are idle.", waitingFor: "Waiting for: {0}", waitingSince: "Waiting since {0}",
|
|
23
24
|
scheduled: "Updating to {0} at {1}, when your agents are idle.", notNowUntil: "You chose Not now. The card comes back on {0}.",
|
|
25
|
+
waitingShort: "AgEnD updates when idle", scheduledShort: "AgEnD updates {0}", foldOpen: "Change", foldClose: "Hide",
|
|
24
26
|
starting: "Starting the update to {0}…", cantTitle: "AgEnD can't update itself on this machine.",
|
|
25
27
|
nowTitle: "Update now?", nowBody: "{0} agents are working. They stop for a few minutes while AgEnD restarts, then pick up where they were.",
|
|
26
28
|
nowBodyIdle: "AgEnD restarts for a few minutes; your agents pick up where they were.", nowGo: "Update now",
|
|
@@ -46,10 +48,10 @@ register("updatecard", {
|
|
|
46
48
|
c_not_service: "AgEnD isn't running as a service, so it can't bring itself back after an update.",
|
|
47
49
|
c_service_unknown: "AgEnD can't confirm that its service will bring it back after an update.",
|
|
48
50
|
notAllChecked: "Some checks haven't run yet; they run when AgEnD starts and once a day.",
|
|
49
|
-
c_linger_off: "AgEnD stops when the
|
|
51
|
+
c_linger_off: "AgEnD stops when the {user} account signs out, so it can't restart itself. To fix it, run `sudo loginctl enable-linger {user}`.",
|
|
50
52
|
c_system_unit_not_root: "AgEnD runs as a system service; updating it needs root.",
|
|
51
53
|
c_unit_reload_pending: "The service definition changed and hasn't been reloaded. Run `systemctl --user daemon-reload`.",
|
|
52
|
-
c_no_write: "Updating needs write access to {path}. Run `sudo agend update` in a terminal on
|
|
54
|
+
c_no_write: "Updating needs write access to {path}. Run `sudo agend update` in a terminal on the computer AgEnD runs on, or reinstall with the one-line installer.",
|
|
53
55
|
c_linked: "This AgEnD is linked from a development folder ({path}); an update replaces the link.",
|
|
54
56
|
c_vendored: "This AgEnD sits inside another project ({path}).",
|
|
55
57
|
c_low_disk: "Updating needs about {need} free on {path}; there's {have}.",
|
|
@@ -60,6 +62,22 @@ register("updatecard", {
|
|
|
60
62
|
c_windows_runtime: "This computer's AgEnD Runtime updates itself.",
|
|
61
63
|
c_node_too_old: "AgEnD {0} needs Node {needs}; this machine has {node}.",
|
|
62
64
|
c_other: "A check didn't pass ({0}).",
|
|
65
|
+
fixIt: "Keep AgEnD running after sign-out", fixing: "Turning it on…", fixedLinger: "Done: AgEnD keeps running after the {0} account signs out.",
|
|
66
|
+
fixHint: "AgEnD turns it on for you; nothing restarts and your agents keep working. If this computer doesn't allow it, run the command yourself.",
|
|
67
|
+
fixFailed: "AgEnD couldn't turn it on by itself. Run the command above in a terminal on the computer AgEnD runs on.", fixNotNeeded: "That's already fixed.",
|
|
68
|
+
howToFix: "How to fix", serviceHow: "In a terminal on the computer AgEnD runs on, run `agend install` as the same user (no sudo). AgEnD restarts as a service: every agent stops briefly and comes back on its own.",
|
|
69
|
+
serviceIt: "Install as a service", serviceBusy: "Installing…", serviceTitle: "Install AgEnD as a service?",
|
|
70
|
+
serviceAsk: "AgEnD restarts as a service: every agent stops briefly, then picks up its conversations again, and this page reconnects by itself.\n\nAfter that, AgEnD can bring itself back after an update. To go back, run agend uninstall.",
|
|
71
|
+
serviceGo: "Install and restart", serviceRestarting: "AgEnD is installing the service and restarting. This page reconnects when it's back.",
|
|
72
|
+
serviceBack: "AgEnD is back, running as a service.",
|
|
73
|
+
"serviceFailed_user-manager": "AgEnD couldn't install the service: this computer's user service manager can't be reached. AgEnD keeps running as before.",
|
|
74
|
+
serviceFailed_other: "AgEnD couldn't install the service. AgEnD keeps running as before.",
|
|
75
|
+
serviceDetails: "Details: `{0}`",
|
|
76
|
+
"serviceNext_user-manager-wsl": "On WSL this is a known issue in WSL versions before 2.6.0: run `wsl --update` in Windows, then reopen WSL. Then press Check for updates; the Install as a service button comes back once the check finds the service manager.",
|
|
77
|
+
"serviceNext_user-manager": "Check that this user's service manager is running (`systemctl --user status`), then press Check for updates; the Install as a service button comes back once the check finds it.",
|
|
78
|
+
serviceNext_other: "What happened is in service-install.log in the AgEnD folder. Press Check for updates to try again.",
|
|
79
|
+
servicePending: "AgEnD is still setting up the service. Check again in a minute: once it has gone through, this line turns ✓.",
|
|
80
|
+
serviceStill: "AgEnD isn't running as a service yet. What happened is in service-install.log in the AgEnD folder.",
|
|
63
81
|
},
|
|
64
82
|
"zh-TW": {
|
|
65
83
|
ready: "AgEnD {0} 可以更新了。",
|
|
@@ -70,6 +88,7 @@ register("updatecard", {
|
|
|
70
88
|
whenIdle: "閒置時更新", pickTime: "選個時間", notNow: "先不要", updateNow: "立即更新", cancel: "取消",
|
|
71
89
|
waiting: "Agent 一閒置就更新到 {0}。", waitingFor: "正在等:{0}", waitingSince: "從 {0} 開始等",
|
|
72
90
|
scheduled: "排定在 {1},等 Agent 閒置後更新到 {0}。", notNowUntil: "你選了「先不要」,{0} 會再提醒。",
|
|
91
|
+
waitingShort: "AgEnD 閒置時更新", scheduledShort: "AgEnD {0} 更新", foldOpen: "變更", foldClose: "收起",
|
|
73
92
|
starting: "正在開始更新到 {0}…", cantTitle: "AgEnD 無法在這台機器上自行更新。",
|
|
74
93
|
nowTitle: "立即更新?", nowBody: "有 {0} 個 Agent 正在工作。AgEnD 重新啟動時會停下幾分鐘,之後從原處繼續。",
|
|
75
94
|
nowBodyIdle: "AgEnD 會重新啟動幾分鐘,Agent 之後從原處繼續。", nowGo: "立即更新",
|
|
@@ -95,10 +114,10 @@ register("updatecard", {
|
|
|
95
114
|
c_not_service: "AgEnD 不是以服務方式執行,更新後無法自己回來。",
|
|
96
115
|
c_service_unknown: "AgEnD 無法確認它的服務在更新後會讓它重新啟動。",
|
|
97
116
|
notAllChecked: "有些檢查還沒跑完;AgEnD 啟動時和每天會檢查一次。",
|
|
98
|
-
c_linger_off: "
|
|
117
|
+
c_linger_off: "{user} 這個帳號登出後 AgEnD 會停止,所以無法自行重新啟動。修正方式:執行 `sudo loginctl enable-linger {user}`。",
|
|
99
118
|
c_system_unit_not_root: "AgEnD 以系統服務執行,更新需要 root。",
|
|
100
119
|
c_unit_reload_pending: "服務定義已變更但尚未重新載入。請執行 `systemctl --user daemon-reload`。",
|
|
101
|
-
c_no_write: "更新需要 {path}
|
|
120
|
+
c_no_write: "更新需要 {path} 的寫入權限。請在執行 AgEnD 的那台電腦上,用終端機執行 `sudo agend update`,或用單行安裝指令重新安裝。",
|
|
102
121
|
c_linked: "這份 AgEnD 是從開發資料夾連結的({path}),更新會取代這個連結。",
|
|
103
122
|
c_vendored: "這份 AgEnD 位於另一個專案裡({path})。",
|
|
104
123
|
c_low_disk: "更新需要 {path} 約 {need} 的可用空間,目前只有 {have}。",
|
|
@@ -109,6 +128,22 @@ register("updatecard", {
|
|
|
109
128
|
c_windows_runtime: "這台電腦的 AgEnD Runtime 會自行更新。",
|
|
110
129
|
c_node_too_old: "AgEnD {0} 需要 Node {needs},這台機器是 {node}。",
|
|
111
130
|
c_other: "有一項檢查沒有通過({0})。",
|
|
131
|
+
fixIt: "登出後讓 AgEnD 繼續執行", fixing: "開啟中…", fixedLinger: "完成:{0} 這個帳號登出後,AgEnD 仍會繼續執行。",
|
|
132
|
+
fixHint: "AgEnD 會替你開啟;不會重新啟動,Agent 照常工作。若這台電腦不允許,請自己執行上面的指令。",
|
|
133
|
+
fixFailed: "AgEnD 無法自行開啟。請在執行 AgEnD 的那台電腦上,用終端機執行上面的指令。", fixNotNeeded: "這項已經修正了。",
|
|
134
|
+
howToFix: "修正方式", serviceHow: "在執行 AgEnD 的那台電腦上,用同一個使用者在終端機執行 `agend install`(不需要 sudo)。AgEnD 會改以服務方式重新啟動:每個 Agent 會短暫停止,之後自動回來。",
|
|
135
|
+
serviceIt: "安裝成服務", serviceBusy: "安裝中…", serviceTitle: "要把 AgEnD 安裝成服務嗎?",
|
|
136
|
+
serviceAsk: "AgEnD 會改以服務方式重新啟動:每個 Agent 會短暫停止,之後接著原本的對話繼續,這個頁面也會自動重新連線。\n\n之後每次更新完,AgEnD 都能自己重新啟動。要改回來,執行 agend uninstall。",
|
|
137
|
+
serviceGo: "安裝並重新啟動", serviceRestarting: "AgEnD 正在安裝服務並重新啟動,回來後這個頁面會自動重新連線。",
|
|
138
|
+
serviceBack: "AgEnD 回來了,現在以服務方式執行。",
|
|
139
|
+
"serviceFailed_user-manager": "AgEnD 無法安裝服務:這台電腦的使用者服務管理員無法連線。AgEnD 仍照原本的方式執行。",
|
|
140
|
+
serviceFailed_other: "AgEnD 無法安裝服務。AgEnD 仍照原本的方式執行。",
|
|
141
|
+
serviceDetails: "詳細訊息:`{0}`",
|
|
142
|
+
"serviceNext_user-manager-wsl": "在 WSL 上,這是 WSL 2.6.0 之前版本的已知問題:在 Windows 執行 `wsl --update`,再重新開啟 WSL。之後按「檢查更新」,找到服務管理員後,「安裝成服務」按鈕就會回來。",
|
|
143
|
+
"serviceNext_user-manager": "請確認這個使用者的服務管理員有在執行(`systemctl --user status`),再按「檢查更新」;找到服務管理員後,「安裝成服務」按鈕就會回來。",
|
|
144
|
+
serviceNext_other: "詳細情形記錄在 AgEnD 資料夾的 service-install.log。按「檢查更新」可以再試一次。",
|
|
145
|
+
servicePending: "AgEnD 還在設定服務。過一分鐘再檢查一次:完成後,這一行會變成 ✓。",
|
|
146
|
+
serviceStill: "AgEnD 還不是以服務方式執行。詳細情形記錄在 AgEnD 資料夾的 service-install.log。",
|
|
112
147
|
},
|
|
113
148
|
});
|
|
114
149
|
const tc = (key, ...a) => t(`updatecard.${key}`, ...a);
|
|
@@ -125,8 +160,122 @@ export function checkSentence(check, version = "") {
|
|
|
125
160
|
/** A check's sentence as plain text (a toast): the command marks dropped. */
|
|
126
161
|
export function checkText(check, version = "") { return checkSentence(check, version).replace(/`/g, ""); }
|
|
127
162
|
/** A check's sentence for the page: a `command` in it is shown as copyable code (#4487 UX look). */
|
|
128
|
-
export function checkRich(check, version = "") {
|
|
129
|
-
|
|
163
|
+
export function checkRich(check, version = "") { return richText(checkSentence(check, version)); }
|
|
164
|
+
const richText = (text) => String(text).split("`").map((part, i) => (i % 2 ? html`<code class="uc-cmd">${part}</code>` : part));
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* M-3770 1.6: the fix a failing check offers here (the server's update-fix.ts `fixFor`): lingering off → "linger";
|
|
168
|
+
* not a service → "service" (S-246: AgEnD restarts as a service, after the admin confirms).
|
|
169
|
+
*/
|
|
170
|
+
export function fixFor(check) {
|
|
171
|
+
if (!check || check.ok !== false || check.id !== "P3") return null;
|
|
172
|
+
return check.code === "linger-off" ? "linger" : check.code === "not-service" ? "service" : null;
|
|
173
|
+
}
|
|
174
|
+
/** The body's `confirm` for "service" (update-fix.ts SERVICE_FIX_CONFIRM). */
|
|
175
|
+
const SERVICE_CONFIRM = "restart-as-service";
|
|
176
|
+
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
177
|
+
const stillNotService = (info) => failedChecks(info && info.preflight).some((c) => c.code === "not-service");
|
|
178
|
+
/**
|
|
179
|
+
* S-246: the hand-over has begun. Wait for AgEnD to answer again after it was gone (every 3 s, up to 6 minutes), then
|
|
180
|
+
* have it look again and say whether it is a service now. A fleet that never went away is judged at the end.
|
|
181
|
+
*/
|
|
182
|
+
export async function waitForService(deps, { sleep = pause, tries = 120 } = {}) {
|
|
183
|
+
let gone = false;
|
|
184
|
+
for (let i = 0; i < tries; i++) {
|
|
185
|
+
await sleep(3000);
|
|
186
|
+
let r = null;
|
|
187
|
+
try { r = await fetch("/ui/update", { cache: "no-store" }); } catch { r = null; }
|
|
188
|
+
if (!r || !r.ok) { gone = true; continue; }
|
|
189
|
+
if (gone) break;
|
|
190
|
+
}
|
|
191
|
+
try { await fetch("/ui/update/check", { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" }); } catch { /* judged on what it has */ }
|
|
192
|
+
const info = (await deps.refresh()) || deps.getInfo();
|
|
193
|
+
const still = !info || stillNotService(info);
|
|
194
|
+
// Back as a service: the check's line is gone, so a toast says so. Still not one: the check's own block says where to look.
|
|
195
|
+
if (!still) toast(tc("serviceBack"), true, { detail: true });
|
|
196
|
+
return { service: !still };
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* POST /ui/update/fixes: the server runs its pre-flight again, makes the fix if it is still asked for, and answers with the
|
|
200
|
+
* fresh pre-flight (which replaces the store's, so the line and its button go once the check passes).
|
|
201
|
+
*/
|
|
202
|
+
export async function fixCheck(fix, check, deps, opts = {}) {
|
|
203
|
+
const { refresh, setInfo, getInfo } = deps;
|
|
204
|
+
const key = `fix-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
205
|
+
let res = null, out = null;
|
|
206
|
+
try {
|
|
207
|
+
const body = fix === "service" ? { fix, confirm: SERVICE_CONFIRM } : { fix };
|
|
208
|
+
res = await fetch("/ui/update/fixes", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": key }, body: JSON.stringify(body) });
|
|
209
|
+
try { out = await res.json(); } catch { out = null; }
|
|
210
|
+
} catch { res = null; }
|
|
211
|
+
const info = getInfo();
|
|
212
|
+
if (out && out.preflight && info) setInfo({ ...info, preflight: out.preflight });
|
|
213
|
+
if (fix === "service") {
|
|
214
|
+
// 202: the hand-over began. No answer at all: AgEnD stopped before it could answer — the same.
|
|
215
|
+
// Said in the check's own block, never a toast over the page (#4557 look): restarting, refused, or still not a service.
|
|
216
|
+
const say = typeof opts.onStatus === "function" ? opts.onStatus : () => {};
|
|
217
|
+
// Still running after the server's wait: nothing may have stopped yet, and it can still refuse (#4564 review).
|
|
218
|
+
if (res && res.status === 202 && out && out.pending) { say(tc("servicePending")); return { ok: false, refused: true }; }
|
|
219
|
+
if (!res || res.status === 202) {
|
|
220
|
+
say(tc("serviceRestarting"));
|
|
221
|
+
// The card's other buttons are off while AgEnD goes away and comes back (#4564 look); an older app-update.js has no setter.
|
|
222
|
+
const starting = typeof deps.setStarting === "function" ? deps.setStarting : () => {};
|
|
223
|
+
starting(true);
|
|
224
|
+
let service = false;
|
|
225
|
+
try { ({ service } = await waitForService(deps, opts)); } finally { starting(false); }
|
|
226
|
+
if (!service) say(tc("serviceStill"));
|
|
227
|
+
return { ok: service, refused: !service };
|
|
228
|
+
}
|
|
229
|
+
if (res.status === 422) {
|
|
230
|
+
// The cause in the product's words, the command's own words after it as a detail, then the next step (#4564 look).
|
|
231
|
+
const cause = out && out.cause === "user-manager" ? "user-manager" : "other";
|
|
232
|
+
const raw = String((out && out.reason) || "").replace(/`/g, "").trim();
|
|
233
|
+
const failed = tc(`serviceFailed_${cause}`), sep = /[。!?]$/.test(failed) ? "" : " "; // no space after a zh full stop
|
|
234
|
+
const next = cause === "user-manager" && out && out.where === "wsl" ? "user-manager-wsl" : cause;
|
|
235
|
+
say([`${failed}${raw ? `${sep}${tc("serviceDetails", raw)}` : ""}`, tc(`serviceNext_${next}`)]);
|
|
236
|
+
return { ok: false, refused: true };
|
|
237
|
+
}
|
|
238
|
+
if (res.ok) { const { service } = await waitForService(deps, { ...opts, tries: 0 }); if (!service) say(tc("serviceStill")); return { ok: service, refused: !service }; }
|
|
239
|
+
}
|
|
240
|
+
const user = check && check.detail && check.detail.user ? String(check.detail.user) : "";
|
|
241
|
+
// Shown in full (a phone's toast is otherwise one line, cut): it names the user, and the failure says what to do.
|
|
242
|
+
if (res && res.ok) toast(tc("fixedLinger", user), true, { detail: true });
|
|
243
|
+
else if (res && res.status === 409 && out && out.error === "not_needed") toast(tc("fixNotNeeded"));
|
|
244
|
+
else if (res && res.status === 422) { /* no toast: the check's own block says so and drops the button (#4557 UX look) */ }
|
|
245
|
+
else { toast(tc("failedAnswer", (out && out.error) || (res ? String(res.status) : "network")), false); await refresh(); }
|
|
246
|
+
return { ok: !!(res && res.ok), refused: !!(res && res.status === 422) };
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* One check that did not pass: its sentence, and its fix — a button where AgEnD can make it (lingering: with a line saying
|
|
250
|
+
* what it does; once the host refused it, the button goes and one line says to run the command), and for not a service
|
|
251
|
+
* also how by hand.
|
|
252
|
+
*/
|
|
253
|
+
function CheckItem({ check, version, deps, checkedAt = null }) {
|
|
254
|
+
const [busy, setBusy] = useState(false);
|
|
255
|
+
// What a press left behind (refused / still working), kept for the check it answered: a later check (Check for updates)
|
|
256
|
+
// has a newer `checkedAt`, so the button comes back then (#4564 look).
|
|
257
|
+
const [mark, setMark] = useState(null);
|
|
258
|
+
const [note, setNote] = useState([]);
|
|
259
|
+
const fix = deps ? fixFor(check) : null;
|
|
260
|
+
const press = async () => {
|
|
261
|
+
// S-246: every agent stops briefly — asked first; Cancel sends nothing.
|
|
262
|
+
if (fix === "service" && !(await confirmDialog({ title: tc("serviceTitle"), message: tc("serviceAsk"), confirmLabel: tc("serviceGo") }))) return;
|
|
263
|
+
setBusy(true); setNote([]); setMark(null);
|
|
264
|
+
try {
|
|
265
|
+
const r = await fixCheck(fix, check, deps, { onStatus: (t) => setNote(Array.isArray(t) ? t : [t]) });
|
|
266
|
+
const info = deps.getInfo && deps.getInfo();
|
|
267
|
+
if (r.refused) setMark({ at: info && info.preflight ? info.preflight.checkedAt : checkedAt });
|
|
268
|
+
} finally { setBusy(false); }
|
|
269
|
+
};
|
|
270
|
+
const refused = !!mark && mark.at === checkedAt;
|
|
271
|
+
const lines = busy ? note : refused ? (note.length ? note : fix === "linger" ? [tc("fixFailed")] : []) : [];
|
|
272
|
+
const label = fix === "service" ? tc(busy ? "serviceBusy" : "serviceIt") : tc(busy ? "fixing" : "fixIt");
|
|
273
|
+
return html`<li>${checkRich(check, version)}
|
|
274
|
+
${fix && lines.length ? lines.map((l, i) => html`<p class=${i ? "uc-fix-next" : "uc-fix-refused"} role=${i ? undefined : "status"}>${richText(l)}</p>`) : null}
|
|
275
|
+
${fix && !refused ? html`<div class="uc-fix"><button type="button" class="btn btn-sm" disabled=${busy} onClick=${press}>${label}</button>
|
|
276
|
+
${fix === "linger" ? html`<span class="uc-fix-hint muted">${tc("fixHint")}</span>` : null}</div>` : null}
|
|
277
|
+
${check.code === "not-service" && !(fix === "service" && (refused || busy)) ? html`<details class="uc-how"><summary>${tc("howToFix")}</summary><p>${richText(tc("serviceHow"))}</p></details>` : null}
|
|
278
|
+
</li>`;
|
|
130
279
|
}
|
|
131
280
|
/** The checks that did not pass, in P-order (absent checks are not failures: they were not run). */
|
|
132
281
|
export function failedChecks(preflight) {
|
|
@@ -155,6 +304,8 @@ export function namesShown(names, max = 2) {
|
|
|
155
304
|
|
|
156
305
|
// M-3730: through the shared clock helper (24-hour in zh-TW); English is 24-hour here too, as the leader asked for this card.
|
|
157
306
|
const fmtTime = (ms) => dateTimeText(ms, { weekday: "short", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", hourCycle: "h23" });
|
|
307
|
+
/** The phone's one-line time: weekday and 24-hour time ("Thu 02:00"); the full time is in the opened line. */
|
|
308
|
+
const fmtShort = (ms) => dateTimeText(ms, { weekday: "short", hour: "2-digit", minute: "2-digit", hourCycle: "h23" });
|
|
158
309
|
const fmtDay = (ms) => dateTimeText(ms, { weekday: "short", month: "short", day: "numeric" }).replace(/\s*\d{1,2}:\d{2}(:\d{2})?$/, "");
|
|
159
310
|
/** "HH:MM" every `step` minutes of a day: the 24-hour choices (never the browser's own time input, which shows AM/PM). */
|
|
160
311
|
export function dayTimes(step = 15) { const out = []; for (let m = 0; m < 24 * 60; m += step) out.push(`${String(Math.floor(m / 60)).padStart(2, "0")}:${String(m % 60).padStart(2, "0")}`); return out; }
|
|
@@ -282,19 +433,35 @@ export function cardLine(info, { Line, busy, deps }) {
|
|
|
282
433
|
}
|
|
283
434
|
if (c.state === "waiting-idle") {
|
|
284
435
|
const names = Array.isArray(c.waitingFor) && c.waitingFor.length ? tc("waitingFor", namesShown(c.waitingFor)) : null;
|
|
285
|
-
return html`<${Line} spinner title=${tc("waiting", c.version)} sub=${[names]}
|
|
436
|
+
return html`<${AnsweredLine} key="waiting-idle" Line=${Line} spinner title=${tc("waiting", c.version)} short=${tc("waitingShort")} sub=${[names]} buttons=${buttons} />`;
|
|
286
437
|
}
|
|
287
|
-
if (c.state === "scheduled") return html`<${Line} icon="clock" title=${tc("scheduled", c.version, fmtTime(c.scheduledAt))}
|
|
438
|
+
if (c.state === "scheduled") return html`<${AnsweredLine} key="scheduled" Line=${Line} icon="clock" title=${tc("scheduled", c.version, fmtTime(c.scheduledAt))}
|
|
439
|
+
short=${tc("scheduledShort", fmtShort(c.scheduledAt))} buttons=${buttons} />`;
|
|
288
440
|
if (c.state === "updating" && !(info.progress && info.progress.stage)) return html`<${Line} spinner title=${tc("starting", c.version)} />`;
|
|
289
441
|
return null;
|
|
290
442
|
}
|
|
291
443
|
|
|
444
|
+
/**
|
|
445
|
+
* S-241 (Lumen's point 8): once the admin has answered (waiting for idle, scheduled), a phone shows the banner as one line —
|
|
446
|
+
* the short words and Change, which opens the full line (its words, who it waits for, and the buttons). The desk is
|
|
447
|
+
* unchanged: the short words and Change are never shown there (app.css: the shell's own phone query, as app-shell.js
|
|
448
|
+
* narrow() asks it, which includes a landscape touch screen). A new state starts closed.
|
|
449
|
+
* The wrapper is `display: contents`, so the line lays out exactly as before.
|
|
450
|
+
*/
|
|
451
|
+
function AnsweredLine({ Line, spinner, icon, title, short, sub = [], buttons }) {
|
|
452
|
+
const [open, setOpen] = useState(false);
|
|
453
|
+
const words = html`<span class="uc-long">${title}</span><span class="uc-short">${short}</span>`;
|
|
454
|
+
const fold = html`<button type="button" key="fold" class="btn btn-sm uc-fold" aria-expanded=${open ? "true" : "false"}
|
|
455
|
+
onClick=${() => setOpen(!open)}>${tc(open ? "foldClose" : "foldOpen")}<${Icon} name="chevron" size=${14} /></button>`;
|
|
456
|
+
return html`<div class=${`uc-answered${open ? " open" : ""}`}><${Line} spinner=${spinner} icon=${icon} title=${words} sub=${sub}>${buttons}${fold}</${Line}></div>`;
|
|
457
|
+
}
|
|
458
|
+
|
|
292
459
|
/** Settings → Version and update: the card's state, the pre-flight result, and the controls (two + Advanced). */
|
|
293
460
|
export function UpdateCardSettings({ info, deps }) {
|
|
294
461
|
noteCurrentVersion(info && info.current);
|
|
295
462
|
return html`<div class="uc-settings">
|
|
296
463
|
<${CardStatus} info=${info} deps=${deps} />
|
|
297
|
-
<${MachineLine} info=${info} />
|
|
464
|
+
<${MachineLine} info=${info} deps=${deps} />
|
|
298
465
|
<${UpdatesControls} />
|
|
299
466
|
</div>`;
|
|
300
467
|
}
|
|
@@ -308,7 +475,7 @@ function CardStatus({ info }) {
|
|
|
308
475
|
return line ? html`<p class="uc-status" role="status">${line}</p>` : null;
|
|
309
476
|
}
|
|
310
477
|
/** "Updates on this machine": ✓ / ◐ / ✗, then each check that did not pass, worded, and the ones not run yet. */
|
|
311
|
-
export function MachineLine({ info }) {
|
|
478
|
+
export function MachineLine({ info, deps }) {
|
|
312
479
|
const pf = info && info.preflight;
|
|
313
480
|
if (!pf) return html`<div class="uc-machine"><strong>${tc("machine")}</strong> <span class="muted">${tc("checking")}</span></div>`;
|
|
314
481
|
const cls = pf.class === "self" ? "self" : pf.class === "admin-only" ? "admin-only" : "stop";
|
|
@@ -316,7 +483,7 @@ export function MachineLine({ info }) {
|
|
|
316
483
|
const fails = failedChecks(pf);
|
|
317
484
|
return html`<div class=${`uc-machine uc-${cls}`}>
|
|
318
485
|
<div><strong>${tc("machine")}</strong> <span class="uc-mark" aria-hidden="true">${mark}</span> <span>${tc(cls === "self" ? "self" : cls === "admin-only" ? "adminOnly" : "stop")}</span></div>
|
|
319
|
-
${fails.length ? html`<ul class="uc-checks">${fails.map((f) => html
|
|
486
|
+
${fails.length ? html`<ul class="uc-checks">${fails.map((f) => html`<${CheckItem} key=${f.id} check=${f} version=${info.card ? info.card.version : ""} deps=${deps} checkedAt=${pf.checkedAt} />`)}</ul>`
|
|
320
487
|
: cls !== "self" ? html`<p class="muted uc-checks">${tc("notAllChecked")}</p>` : null}
|
|
321
488
|
</div>`;
|
|
322
489
|
}
|
|
@@ -118,6 +118,15 @@ register("view", {
|
|
|
118
118
|
"usage.metric.credits": "Credits",
|
|
119
119
|
"usage.metric.weekly_limit": "Weekly limit",
|
|
120
120
|
"usage.metric.pay_as_you_go": "Pay as you go",
|
|
121
|
+
"usage.hint.kiro_account_unknown": "Not measurable — the selected account is unavailable or ambiguous.",
|
|
122
|
+
"usage.hint.kiro_profile_unknown": "Not measurable — the selected usage profile is unavailable or invalid.",
|
|
123
|
+
"usage.hint.kiro_region_unknown": "Not measurable — the selected usage region is not supported.",
|
|
124
|
+
"usage.hint.kiro_quota_unknown": "Not measurable — no valid positive quota was returned.",
|
|
125
|
+
"usage.hint.kiro_bonus_unknown": "Not measurable — included-plan usage cannot be separated from bonus credits.",
|
|
126
|
+
"usage.hint.kiro_unauthorized": "Not measurable — login was rejected (HTTP 401). Run `kiro-cli` to sign in again.",
|
|
127
|
+
"usage.hint.kiro_rejected": "Not measurable — usage access was rejected (HTTP {0}).",
|
|
128
|
+
"usage.metric.kiro_trial": "Trial credits",
|
|
129
|
+
"usage.metric.kiro_overage": "Overage credits",
|
|
121
130
|
"usage.metric.bonus_credits": "Bonus credits",
|
|
122
131
|
"usage.metric.overage_charges": "Overage charges",
|
|
123
132
|
"usage.metric.pay_per_use": "Pay-per-use",
|
|
@@ -406,6 +415,15 @@ register("view", {
|
|
|
406
415
|
"usage.metric.credits": "額度",
|
|
407
416
|
"usage.metric.weekly_limit": "每週上限",
|
|
408
417
|
"usage.metric.pay_as_you_go": "隨用隨付",
|
|
418
|
+
"usage.hint.kiro_account_unknown": "無法測量:目前選取的帳號無法辨識或不明確。",
|
|
419
|
+
"usage.hint.kiro_profile_unknown": "無法測量:目前選取的用量設定檔無法取得或格式無效。",
|
|
420
|
+
"usage.hint.kiro_region_unknown": "無法測量:不支援目前選取的用量區域。",
|
|
421
|
+
"usage.hint.kiro_quota_unknown": "無法測量:未取得有效的正數額度。",
|
|
422
|
+
"usage.hint.kiro_bonus_unknown": "無法測量:無法將方案內用量與贈送額度分開計算。",
|
|
423
|
+
"usage.hint.kiro_unauthorized": "無法測量:登入遭拒(HTTP 401)。請執行 `kiro-cli` 重新登入。",
|
|
424
|
+
"usage.hint.kiro_rejected": "無法測量:用量存取遭拒(HTTP {0})。",
|
|
425
|
+
"usage.metric.kiro_trial": "試用額度",
|
|
426
|
+
"usage.metric.kiro_overage": "超額額度",
|
|
409
427
|
"usage.metric.bonus_credits": "贈送額度",
|
|
410
428
|
"usage.metric.overage_charges": "超額費用",
|
|
411
429
|
"usage.metric.pay_per_use": "隨用隨付",
|
|
@@ -272,5 +272,5 @@ function body(a) {
|
|
|
272
272
|
return html`<span class="note">${tn("notVerified")} ·</span> <button type="button" class="btn btn-sm" onClick=${a.ask}>${tn("authorize")}</button>`;
|
|
273
273
|
const why = REASONS.includes(st.reason) ? tn(`reason_${st.reason}`) : tn("reason_other");
|
|
274
274
|
// The fix, where there is one the person can take here: the switch lives in Settings → Web.
|
|
275
|
-
return html`<span class="note">${tn("
|
|
275
|
+
return html`<span class="note">${tn("notVerifiedWhy", why)}</span>${fixable(st.reason) ? html` <a href="/settings/access#webAuthority">${tn("settings")}</a>` : null}${st.reason === "host_sign_in" ? html` <${Rebind} />` : null}`;
|
|
276
276
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// What is new on the task board for this person (docs/design/task-board.md, "Unread"): the cards someone answered, named them on or handed
|
|
2
|
+
// them to confirm or answer. The server works it out per person (GET /ui/tasks/unread — a session that can write; anyone else reads
|
|
3
|
+
// `enabled: false` and nothing is shown or marked), so this page only keeps the answer in the app store (`taskUnread`: { loaded, enabled,
|
|
4
|
+
// total, cards: { "M-12": { n, reasons, entries, at, by } } }) for the sidebar's number, the board's marks and the card's "new" tags.
|
|
5
|
+
// Installed once per admin page (app.js; the Tasks page also asks for it when it is shown, for a tab from before an upgrade). It reads
|
|
6
|
+
// again on the stream's `tasks` ping (a comment, a move), on a reconnect, when the tab is shown again, and once a minute while it is (a
|
|
7
|
+
// page that polls hears no pings). Not on `task_wakes`: how far a delivery got is never news to the person (the card page reads it). Opening a card marks it read (POST …/read) and the answer is
|
|
8
|
+
// the new state. No text of any comment is ever carried here: only numbers, reasons and who.
|
|
9
|
+
import { appStore } from "/assets/app-store.js";
|
|
10
|
+
|
|
11
|
+
let installed = false, reading = null, again = false, timer = null, poll = null;
|
|
12
|
+
const DEBOUNCE_MS = 400, POLL_MS = 60_000;
|
|
13
|
+
|
|
14
|
+
/** The page's unread (what the store holds), or the empty one. */
|
|
15
|
+
export const unreadState = () => appStore.get().taskUnread || { loaded: false, enabled: false, total: 0, cards: {} };
|
|
16
|
+
|
|
17
|
+
function keep(d) {
|
|
18
|
+
const cards = d && d.cards && typeof d.cards === "object" ? d.cards : {};
|
|
19
|
+
appStore.set({ taskUnread: { loaded: true, enabled: !!(d && d.enabled), total: Number.isSafeInteger(d && d.total) ? d.total : Object.keys(cards).length, cards } });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Read it again (one read at a time; a change meanwhile reads once more). Resolves true when it was read. */
|
|
23
|
+
export function refreshTaskUnread() {
|
|
24
|
+
if (reading) { again = true; return reading; }
|
|
25
|
+
// (Started inside the chain: a page being torn down — a late timer with no `fetch` left — is a failed read, not an exception in the timer.)
|
|
26
|
+
reading = Promise.resolve().then(() => fetch("/ui/tasks/unread", { headers: { Accept: "application/json" }, cache: "no-store" }))
|
|
27
|
+
.then((r) => { if (!r.ok) throw new Error(`task unread: ${r.status}`); return r.json(); })
|
|
28
|
+
.then((d) => { keep(d); return true; })
|
|
29
|
+
.catch(() => false)
|
|
30
|
+
.finally(() => { reading = null; if (again) { again = false; void refreshTaskUnread(); } });
|
|
31
|
+
return reading;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function soon() {
|
|
35
|
+
if (timer) return;
|
|
36
|
+
timer = setTimeout(() => { timer = null; void refreshTaskUnread(); }, DEBOUNCE_MS);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The person opened a card: what was new on it, then marked read. Resolves `{ entries, reasons }` — the comments that were new, to
|
|
41
|
+
* tag on the page — or null when nothing on it was (no mark is sent; a read-only session never has any). The store takes the
|
|
42
|
+
* server's answer, so the number everywhere falls at once.
|
|
43
|
+
*/
|
|
44
|
+
export async function openedCard(code) {
|
|
45
|
+
if (!unreadState().loaded) await refreshTaskUnread();
|
|
46
|
+
const mine = unreadState().cards[code];
|
|
47
|
+
if (!mine) return null;
|
|
48
|
+
try {
|
|
49
|
+
const r = await fetch(`/ui/tasks/cards/${encodeURIComponent(code)}/read`, { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
|
|
50
|
+
if (r.ok) keep({ enabled: true, ...(await r.json()) });
|
|
51
|
+
} catch { /* the number stays until the next read; the card is open all the same */ }
|
|
52
|
+
return { entries: Array.isArray(mine.entries) ? mine.entries : [], reasons: Array.isArray(mine.reasons) ? mine.reasons : [] };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Once per page: read now, and again as above. Safe to call twice. */
|
|
56
|
+
export function installTaskUnread() {
|
|
57
|
+
if (installed) return;
|
|
58
|
+
installed = true;
|
|
59
|
+
void refreshTaskUnread();
|
|
60
|
+
const sub = appStore.get().streamOn;
|
|
61
|
+
if (typeof sub === "function") {
|
|
62
|
+
sub("tasks", soon);
|
|
63
|
+
sub("connection", (c) => { if (c === "live" || c === "polling") soon(); });
|
|
64
|
+
}
|
|
65
|
+
if (typeof document !== "undefined") {
|
|
66
|
+
document.addEventListener("visibilitychange", () => { if (!document.hidden) soon(); });
|
|
67
|
+
poll = setInterval(() => { if (!document.hidden) soon(); }, POLL_MS);
|
|
68
|
+
if (poll && typeof poll.unref === "function") poll.unref();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -7,7 +7,9 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
7
7
|
import { Icon } from "/assets/ui-icons.js";
|
|
8
8
|
|
|
9
9
|
export const WINDOWS_CLI_CATALOG_TTL_MS = 60_000;
|
|
10
|
-
const initial = () => ({ data:null, loading:false, error:"", checkedAt:0, startedAt:0 });
|
|
10
|
+
const initial = () => ({ data:null, loading:false, error:"", errorCode:"", errorDetail:"", checkedAt:0, startedAt:0 });
|
|
11
|
+
/** A detection that ran and was recorded. The server answers a never-detected computer with a placeholder (`probedAt: null`, no CLIs): that is "no record", not an earlier result. */
|
|
12
|
+
export const hasDetectionRecord = data => typeof data?.probedAt === "number";
|
|
11
13
|
|
|
12
14
|
/** Successful inventory only, in memory. No polling, localStorage, credential data or model tasks. A plain load reads the
|
|
13
15
|
* server's last detection (which starts nothing, M-2239 P1-2); only `force` (Detect again) runs detection. */
|
|
@@ -22,7 +24,7 @@ export function createWindowsCliCatalog({ fetcher = (...args) => fetch(...args),
|
|
|
22
24
|
const abort = controller = new AbortController();
|
|
23
25
|
let timedOut = false;
|
|
24
26
|
const timer = setTimeout(() => { timedOut = true; abort.abort(); },timeoutMs);
|
|
25
|
-
store.set({loading:true,error:"",startedAt:now()});
|
|
27
|
+
store.set({loading:true,error:"",errorCode:"",errorDetail:"",startedAt:now()});
|
|
26
28
|
pending = Promise.resolve().then(async () => {
|
|
27
29
|
try {
|
|
28
30
|
if (mine !== generation) return null;
|
|
@@ -31,14 +33,14 @@ export function createWindowsCliCatalog({ fetcher = (...args) => fetch(...args),
|
|
|
31
33
|
const body = await response.json();
|
|
32
34
|
if (!response.ok) {
|
|
33
35
|
if (mine === generation && [401,403].includes(response.status)) store.set({data:null,checkedAt:0});
|
|
34
|
-
throw new Error(body?.error || `HTTP ${response.status}`);
|
|
36
|
+
throw Object.assign(new Error(body?.error || `HTTP ${response.status}`),{bridgeCode:typeof body?.code === "string" ? body.code : "",bridgeDetail:typeof body?.detail === "string" ? body.detail : ""});
|
|
35
37
|
}
|
|
36
38
|
const value = machineId ? body.inventory || { home:"", clis:[], probedAt:null } : body;
|
|
37
39
|
if (!value || !Array.isArray(value.clis) || typeof value.home !== "string") throw new Error("Invalid Windows CLI inventory response");
|
|
38
|
-
if (mine === generation) store.set({data:value,checkedAt:now(),error:""});
|
|
40
|
+
if (mine === generation) store.set({data:value,checkedAt:now(),error:"",errorCode:"",errorDetail:""});
|
|
39
41
|
return value;
|
|
40
42
|
} catch(error) {
|
|
41
|
-
if (mine === generation) store.set({error:timedOut ? "Windows CLI detection timed out" : error?.message || "Windows CLI detection failed"});
|
|
43
|
+
if (mine === generation) store.set({error:timedOut ? "Windows CLI detection timed out" : error?.message || "Windows CLI detection failed",errorCode:timedOut ? "" : error?.bridgeCode || "",errorDetail:timedOut ? "" : error?.bridgeDetail || ""});
|
|
42
44
|
return null;
|
|
43
45
|
} finally {
|
|
44
46
|
clearTimeout(timer);
|
|
@@ -76,6 +78,26 @@ register("windetect", {
|
|
|
76
78
|
"zh-TW": { loading:"正在偵測 Windows CLI…", refreshing:"正在更新 Windows CLI…", hint:"正在確認已安裝的 CLI、版本與登入狀態。完成後會重用結果,不必每次重新等待。", elapsed:"已等待 {0} 秒,仍在檢查中。", failed:"無法完成 Windows CLI 偵測", previous:"更新未完成,目前顯示上次成功偵測的結果。", retry:"重試偵測", refresh:"重新偵測", cached:"已載入最近的偵測結果", never:"尚未偵測 Windows CLI。偵測會逐一啟動已安裝的 CLI 一次,讀取版本與登入狀態;之後只在你按下「重新偵測」時再做。", detect:"偵測 Windows CLI" },
|
|
77
79
|
en: { loading:"Detecting Windows CLIs…", refreshing:"Updating Windows CLIs…", hint:"Checking installed CLIs, versions and sign-ins. Results are reused so reopening does not repeat the wait.", elapsed:"Still checking after {0} seconds.", failed:"Windows CLI detection failed", previous:"Refresh failed. Showing the last successful inventory.", retry:"Retry detection", refresh:"Detect again", cached:"Loaded the recent inventory", never:"Windows CLIs have not been detected yet. Detection starts each installed CLI once to read its version and sign-in; after that, only when you press Detect again.", detect:"Detect Windows CLIs" },
|
|
78
80
|
});
|
|
81
|
+
// Why this AgEnD cannot reach Windows (the server sends a code, see WINDOWS_BRIDGE_MESSAGES in src/windows-cli.ts), and what to do about it.
|
|
82
|
+
const BRIDGE_ERRORS = { "not-wsl":"errNotWsl", "interop-off":"errInteropOff", "powershell-missing":"errPowershellMissing", "powershell-failed":"errPowershellFailed", "node-missing":"errNodeMissing", "wslpath-failed":"errWslpathFailed" };
|
|
83
|
+
register("windetect", {
|
|
84
|
+
en: {
|
|
85
|
+
errNotWsl:"This AgEnD is not running on Windows or in WSL (for example in a container or on a plain Linux server), so it has no local Windows CLIs to detect. Run AgEnD on Windows or in WSL, or open Settings → Runtime → Connect a computer to pair a Windows computer.",
|
|
86
|
+
errInteropOff:"This WSL cannot start Windows programs because interop is off. Add [interop] enabled=true to /etc/wsl.conf, run wsl --shutdown in Windows, open WSL again, then detect again.",
|
|
87
|
+
errPowershellMissing:"Windows PowerShell (powershell.exe) was not found from this WSL. Check that the Windows drive is mounted at /mnt/c (ls /mnt/c/Windows) and that appendWindowsPath is not turned off in /etc/wsl.conf, then detect again.",
|
|
88
|
+
errPowershellFailed:"Windows PowerShell was found but could not be started. Run powershell.exe -NoProfile -Command echo ok in this WSL to see why, then detect again.",
|
|
89
|
+
errNodeMissing:"Windows Node.js was not found. Install Node.js for Windows and put node.exe on the Windows PATH, then detect again.",
|
|
90
|
+
errWslpathFailed:"WSL could not translate the path of Windows Node.js or of AgEnD's Windows worker (wslpath failed). Run wslpath -w ~ in this WSL to see why, then detect again.",
|
|
91
|
+
},
|
|
92
|
+
"zh-TW": {
|
|
93
|
+
errNotWsl:"這個 AgEnD 不是跑在 Windows 或 WSL 上(例如 Docker 容器或一般 Linux 主機),沒有本機 Windows CLI 可偵測。請改在 Windows 或 WSL 執行 AgEnD,或到「設定 → Runtime」按「連接電腦」配對一台 Windows 電腦。",
|
|
94
|
+
errInteropOff:"這個 WSL 沒有開啟 interop,無法啟動 Windows 程式。請在 /etc/wsl.conf 加入 [interop] enabled=true,在 Windows 執行 wsl --shutdown,重新開啟 WSL 後再偵測。",
|
|
95
|
+
errPowershellMissing:"在這個 WSL 找不到 Windows PowerShell(powershell.exe)。請確認 Windows 磁碟已掛載在 /mnt/c(執行 ls /mnt/c/Windows),且 /etc/wsl.conf 沒有關閉 appendWindowsPath,再重新偵測。",
|
|
96
|
+
errPowershellFailed:"找到 Windows PowerShell,但無法啟動。請在這個 WSL 執行 powershell.exe -NoProfile -Command echo ok 查看原因,再重新偵測。",
|
|
97
|
+
errNodeMissing:"找不到 Windows 的 Node.js。請安裝 Windows 版 Node.js,並把 node.exe 放進 Windows 的 PATH,再重新偵測。",
|
|
98
|
+
errWslpathFailed:"WSL 無法轉換 Windows Node.js 或 AgEnD Windows worker 的路徑(wslpath 失敗)。請在這個 WSL 執行 wslpath -w ~ 查看原因,再重新偵測。",
|
|
99
|
+
},
|
|
100
|
+
});
|
|
79
101
|
register("windetect", {
|
|
80
102
|
en: { computer:"Diagnostic computer", hostWindows:"Windows on the AgEnD host", hostHint:"Diagnostics and test tasks use this computer's CLIs and sign-ins.", hostUnknown:"Computer name not reported", hostRefresh:"Detect again to read the Windows computer name." },
|
|
81
103
|
"zh-TW": { computer:"診斷電腦", hostWindows:"AgEnD 主機的 Windows", hostHint:"診斷與測試任務使用這台電腦的 CLI 與登入。", hostUnknown:"電腦名稱尚未回報", hostRefresh:"重新偵測後可取得 Windows 電腦名稱。" },
|
|
@@ -100,7 +122,12 @@ export function WindowsCliDiscoveryStatus({ state, disabled = false }) {
|
|
|
100
122
|
tick(); const timer = lease.interval(tick,1000);
|
|
101
123
|
return () => lease.clear(timer);
|
|
102
124
|
},[lease,state.loading,state.startedAt]);
|
|
103
|
-
if (state.error)
|
|
125
|
+
if (state.error) {
|
|
126
|
+
// "Showing the last successful result" is only true when there is one; a never-detected computer has none.
|
|
127
|
+
const earlier = hasDetectionRecord(state.data), known = BRIDGE_ERRORS[state.errorCode];
|
|
128
|
+
const message = known ? html`<p>${detectionText(known)}</p>${state.errorDetail ? html`<small>${state.errorDetail}</small>` : null}` : earlier ? html`<small>${state.error}</small>` : html`<p>${state.error}</p>`;
|
|
129
|
+
return html`<div class="cli-discovery-status is-error" role="alert"><${Icon} name="alert" size=${18} /><div><strong>${detectionText("failed")}</strong>${earlier ? html`<p>${detectionText("previous")}</p>` : null}${message}<button type="button" class="btn btn-sm" disabled=${disabled} onClick=${state.refresh}>${detectionText("retry")}</button></div></div>`;
|
|
130
|
+
}
|
|
104
131
|
// M-2239 P1-2: nothing is detected on its own — the first detection is the administrator's press too.
|
|
105
132
|
if (!state.loading && state.data && state.data.probedAt === null) return html`<div class="cli-discovery-status" role="status"><${Icon} name="info" size=${18} /><div><p>${detectionText("never")}</p><button type="button" class="btn btn-sm" disabled=${disabled} onClick=${state.refresh}>${detectionText("detect")}</button></div></div>`;
|
|
106
133
|
if (!state.loading && state.data) return null;
|
package/dist/update-card.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export interface UpdateCardDeps {
|
|
|
119
119
|
/** A display label for lastAnswer.by. A bare id is never stored. */
|
|
120
120
|
export declare function updateAnswerLabel(label: string | undefined): string;
|
|
121
121
|
/** Which chat line `/update` (not `/update now`) replies with. */
|
|
122
|
-
export declare function updateOfferReply(card: UpdateCardView | null, current: string | null, pinned: boolean): {
|
|
122
|
+
export declare function updateOfferReply(card: UpdateCardView | null, current: string | null, pinned: boolean, tz?: string): {
|
|
123
123
|
key: string;
|
|
124
124
|
args: string[];
|
|
125
125
|
};
|
package/dist/update-card.js
CHANGED
|
@@ -12,6 +12,7 @@ import Database from "better-sqlite3";
|
|
|
12
12
|
import { atomicWriteFileSync } from "./atomic-write.js";
|
|
13
13
|
import { IdleUpdateQueue, IDLE_UPDATE_MIGRATION } from "./update-idle.js";
|
|
14
14
|
import { installedChannel } from "./update-check.js";
|
|
15
|
+
import { formatFleetTime } from "./tz-utils.js";
|
|
15
16
|
import { readUpdateProgress } from "./update-marker.js";
|
|
16
17
|
import { inUpdatePause, resolveUpdates } from "./update-settings.js";
|
|
17
18
|
export const NOT_NOW_MS = 7 * 24 * 60 * 60_000;
|
|
@@ -43,15 +44,14 @@ export function updateAnswerLabel(label) {
|
|
|
43
44
|
return "admin";
|
|
44
45
|
return text;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
/** M-3864 R2: in the fleet's zone, with its offset (formatFleetTime), never the machine's bare clock. */
|
|
48
|
+
function stamp(ms, tz) {
|
|
47
49
|
if (ms === undefined || !Number.isFinite(ms))
|
|
48
50
|
return "";
|
|
49
|
-
|
|
50
|
-
const p = (n) => String(n).padStart(2, "0");
|
|
51
|
-
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
|
|
51
|
+
return formatFleetTime(ms, tz);
|
|
52
52
|
}
|
|
53
53
|
/** Which chat line `/update` (not `/update now`) replies with. */
|
|
54
|
-
export function updateOfferReply(card, current, pinned) {
|
|
54
|
+
export function updateOfferReply(card, current, pinned, tz) {
|
|
55
55
|
if (pinned)
|
|
56
56
|
return { key: "update.offer.pinned", args: [] };
|
|
57
57
|
const have = current ? `v${current}` : "AgEnD";
|
|
@@ -61,9 +61,9 @@ export function updateOfferReply(card, current, pinned) {
|
|
|
61
61
|
if (!card.installable)
|
|
62
62
|
return { key: "update.offer.stable", args: [version, have] };
|
|
63
63
|
switch (card.state) {
|
|
64
|
-
case "not-now": return { key: "update.offer.not_now", args: [version, have, stamp(card.notNowUntil)] };
|
|
64
|
+
case "not-now": return { key: "update.offer.not_now", args: [version, have, stamp(card.notNowUntil, tz)] };
|
|
65
65
|
case "waiting-idle": return { key: "update.offer.waiting", args: [version] };
|
|
66
|
-
case "scheduled": return { key: "update.offer.scheduled", args: [version, stamp(card.scheduledAt)] };
|
|
66
|
+
case "scheduled": return { key: "update.offer.scheduled", args: [version, stamp(card.scheduledAt, tz)] };
|
|
67
67
|
case "updating": return { key: "update.offer.updating", args: [version] };
|
|
68
68
|
case "done": return { key: "update.offer.done", args: [version] };
|
|
69
69
|
case "failed": return { key: "update.offer.failed", args: [version] };
|