@songsid/agend 2.4.0-beta.23 → 2.4.0-beta.25
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 +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/agend-home.js +5 -5
- package/dist/agend-home.js.map +1 -1
- package/dist/agent-cli-instructions.md +4 -3
- package/dist/agent-cli.js +32 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +10 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.js +2 -2
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-whats-new.js +11 -1
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/agent-workspace.d.ts +18 -2
- package/dist/agent-workspace.js +15 -4
- package/dist/agent-workspace.js.map +1 -1
- package/dist/backend/antigravity.js +8 -6
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +15 -0
- package/dist/backend/claude-code.js +25 -3
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-mcp-carry.d.ts +63 -0
- package/dist/backend/claude-mcp-carry.js +242 -0
- package/dist/backend/claude-mcp-carry.js.map +1 -0
- package/dist/backend/claude-usage-credits.d.ts +8 -0
- package/dist/backend/claude-usage-credits.js +121 -0
- package/dist/backend/claude-usage-credits.js.map +1 -0
- package/dist/backend/types.d.ts +30 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.js +7 -1
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/mcp-tools.js +7 -6
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +1 -0
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/cli-audited.js +9 -4
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli.js +184 -21
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +17 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/contact-auth-store.d.ts +18 -0
- package/dist/contact-auth-store.js +55 -8
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +3 -0
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/contact-change-proposals.d.ts +34 -0
- package/dist/contact-change-proposals.js +1 -1
- package/dist/contact-change-proposals.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +1 -0
- package/dist/cross-instance-notice.js +9 -8
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +46 -0
- package/dist/daemon.js +299 -33
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +8 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-outbox.d.ts +56 -1
- package/dist/delivery-outbox.js +254 -22
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-context.d.ts +8 -0
- package/dist/fleet-lock.d.ts +67 -2
- package/dist/fleet-lock.js +236 -2
- package/dist/fleet-lock.js.map +1 -1
- package/dist/fleet-manager.d.ts +177 -6
- package/dist/fleet-manager.js +1203 -75
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +20 -1
- package/dist/fleet-windows-runtime.js +98 -18
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +22 -9
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +6 -0
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +7 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +3 -3
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
- package/dist/general-knowledge/skills/task-board/SKILL.md +17 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +35 -7
- package/dist/home-update-lock.d.ts +35 -0
- package/dist/home-update-lock.js +81 -0
- package/dist/home-update-lock.js.map +1 -0
- package/dist/hub/compose/member.d.ts +5 -1
- package/dist/hub/compose/member.js +9 -5
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +1 -1
- package/dist/hub/member/room-ask.d.ts +5 -0
- package/dist/hub/member/room-ask.js +43 -16
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-mention-feedback.d.ts +2 -0
- package/dist/hub/member/room-mention-feedback.js +1 -1
- package/dist/hub/member/room-mention-feedback.js.map +1 -1
- package/dist/hub/member/room-post-answers.d.ts +2 -0
- package/dist/hub/member/room-post-answers.js +1 -1
- package/dist/hub/member/room-post-answers.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +5 -0
- package/dist/hub/member/room-post.js +4 -1
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/member/updates.d.ts +7 -1
- package/dist/hub/member/updates.js +7 -1
- package/dist/hub/member/updates.js.map +1 -1
- package/dist/hub/representative.d.ts +7 -0
- package/dist/hub/representative.js +38 -5
- package/dist/hub/representative.js.map +1 -1
- package/dist/install-lock.d.ts +15 -1
- package/dist/install-lock.js +16 -8
- package/dist/install-lock.js.map +1 -1
- package/dist/install-ownership.d.ts +165 -0
- package/dist/install-ownership.js +404 -0
- package/dist/install-ownership.js.map +1 -0
- package/dist/instance-config-impact.js +2 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +2 -0
- package/dist/instance-lifecycle.js +29 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +4 -0
- package/dist/instructions.js +4 -0
- package/dist/instructions.js.map +1 -1
- package/dist/local-pane-endpoint.d.ts +4 -1
- package/dist/local-pane-endpoint.js +12 -2
- package/dist/local-pane-endpoint.js.map +1 -1
- package/dist/locale.js +170 -4
- package/dist/locale.js.map +1 -1
- package/dist/native-agent-admission.d.ts +7 -0
- package/dist/native-agent-admission.js +46 -3
- package/dist/native-agent-admission.js.map +1 -1
- package/dist/native-mcp.d.ts +16 -1
- package/dist/native-mcp.js +38 -5
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +9 -0
- package/dist/native-pane-lifecycle.js +23 -0
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.d.ts +19 -6
- package/dist/native-pane-manager.js +79 -4
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you-hub.d.ts +3 -0
- package/dist/needs-you-hub.js +31 -5
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +22 -1
- package/dist/needs-you.js +6 -0
- 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/office-share.js +2 -1
- package/dist/office-share.js.map +1 -1
- package/dist/outbound-handlers.d.ts +12 -0
- package/dist/outbound-handlers.js +59 -8
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +3 -0
- package/dist/outbound-schemas.js +7 -5
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/package-preimage.js +4 -0
- package/dist/package-preimage.js.map +1 -1
- package/dist/pane-port.d.ts +1 -0
- package/dist/plist-args.d.ts +9 -0
- package/dist/plist-args.js +22 -0
- package/dist/plist-args.js.map +1 -0
- package/dist/public-preview.d.ts +4 -6
- package/dist/public-preview.js +5 -2
- package/dist/public-preview.js.map +1 -1
- package/dist/public-web-gateway.js +11 -3
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +13 -1
- package/dist/public-web-link.js +28 -1
- package/dist/public-web-link.js.map +1 -1
- package/dist/recover.cjs +2452 -0
- package/dist/remote-card-prompt.d.ts +6 -2
- package/dist/remote-card-prompt.js +12 -3
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/reply-draft.d.ts +12 -0
- package/dist/reply-draft.js +81 -0
- package/dist/reply-draft.js.map +1 -0
- package/dist/request-contact-api.d.ts +15 -0
- package/dist/request-contact-api.js +120 -0
- package/dist/request-contact-api.js.map +1 -0
- package/dist/request-contact-card.d.ts +36 -0
- package/dist/request-contact-card.js +206 -0
- package/dist/request-contact-card.js.map +1 -0
- package/dist/request-contact-gate.d.ts +79 -0
- package/dist/request-contact-gate.js +262 -0
- package/dist/request-contact-gate.js.map +1 -0
- package/dist/request-contact-native.d.ts +52 -0
- package/dist/request-contact-native.js +83 -0
- package/dist/request-contact-native.js.map +1 -0
- package/dist/request-contact-types.d.ts +86 -0
- package/dist/request-contact-types.js +7 -0
- package/dist/request-contact-types.js.map +1 -0
- package/dist/request-context-call-protocol.d.ts +12 -0
- package/dist/request-context-call-protocol.js +14 -0
- package/dist/request-context-call-protocol.js.map +1 -0
- package/dist/request-context-call.d.ts +22 -0
- package/dist/request-context-call.js +35 -0
- package/dist/request-context-call.js.map +1 -0
- package/dist/request-context-compatibility.d.ts +20 -0
- package/dist/request-context-compatibility.js +74 -0
- package/dist/request-context-compatibility.js.map +1 -0
- package/dist/request-context-drain.d.ts +39 -0
- package/dist/request-context-drain.js +159 -0
- package/dist/request-context-drain.js.map +1 -0
- package/dist/request-context-fence.d.ts +28 -0
- package/dist/request-context-fence.js +58 -0
- package/dist/request-context-fence.js.map +1 -0
- package/dist/request-context-migration.d.ts +64 -0
- package/dist/request-context-migration.js +158 -0
- package/dist/request-context-migration.js.map +1 -0
- package/dist/request-context-pane.d.ts +25 -0
- package/dist/request-context-pane.js +48 -0
- package/dist/request-context-pane.js.map +1 -0
- package/dist/request-context-policy.d.ts +74 -0
- package/dist/request-context-policy.js +116 -0
- package/dist/request-context-policy.js.map +1 -0
- package/dist/request-context-protocol.d.ts +137 -0
- package/dist/request-context-protocol.js +38 -0
- package/dist/request-context-protocol.js.map +1 -0
- package/dist/request-context-recovery.d.ts +14 -0
- package/dist/request-context-recovery.js +56 -0
- package/dist/request-context-recovery.js.map +1 -0
- package/dist/request-context-relay.d.ts +19 -0
- package/dist/request-context-relay.js +63 -0
- package/dist/request-context-relay.js.map +1 -0
- package/dist/request-context-returns.d.ts +67 -0
- package/dist/request-context-returns.js +211 -0
- package/dist/request-context-returns.js.map +1 -0
- package/dist/request-context-store.d.ts +26 -0
- package/dist/request-context-store.js +144 -0
- package/dist/request-context-store.js.map +1 -0
- package/dist/request-context-turns.d.ts +99 -0
- package/dist/request-context-turns.js +215 -0
- package/dist/request-context-turns.js.map +1 -0
- package/dist/request-context-view.d.ts +33 -0
- package/dist/request-context-view.js +36 -0
- package/dist/request-context-view.js.map +1 -0
- package/dist/request-hub-context.d.ts +130 -0
- package/dist/request-hub-context.js +89 -0
- package/dist/request-hub-context.js.map +1 -0
- package/dist/request-hub-output.d.ts +11 -0
- package/dist/request-hub-output.js +21 -0
- package/dist/request-hub-output.js.map +1 -0
- package/dist/runtime-cli-install.js +13 -11
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-client.d.ts +2 -0
- package/dist/runtime-client.js +17 -4
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +4 -1
- package/dist/runtime-coordinator.js +10 -3
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-pane-assets.d.ts +1 -1
- package/dist/runtime-pane-assets.js +1 -1
- package/dist/runtime-pane-assets.js.map +1 -1
- package/dist/runtime-pane-host.d.ts +3 -0
- package/dist/runtime-pane-host.js +39 -21
- package/dist/runtime-pane-host.js.map +1 -1
- package/dist/runtime-pane-link.d.ts +6 -2
- package/dist/runtime-pane-link.js +17 -4
- package/dist/runtime-pane-link.js.map +1 -1
- package/dist/runtime-pane-mcp-relay.d.ts +11 -1
- package/dist/runtime-pane-mcp-relay.js +69 -3
- package/dist/runtime-pane-mcp-relay.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +28 -1
- package/dist/runtime-pane-mcp.js +92 -15
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-port.d.ts +6 -0
- package/dist/runtime-pane-port.js +23 -4
- package/dist/runtime-pane-port.js.map +1 -1
- package/dist/runtime-pane-protocol.d.ts +4 -0
- package/dist/runtime-pane-protocol.js +11 -4
- package/dist/runtime-pane-protocol.js.map +1 -1
- package/dist/runtime-pane-service.d.ts +1 -0
- package/dist/runtime-pane-service.js +25 -9
- package/dist/runtime-pane-service.js.map +1 -1
- package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
- package/dist/runtime-pane-stdio-protocol.js +12 -5
- package/dist/runtime-pane-stdio-protocol.js.map +1 -1
- package/dist/runtime-pane-stdio.js +5 -5
- package/dist/runtime-pane-stdio.js.map +1 -1
- package/dist/runtime-protocol.d.ts +3 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/scheduler/db.js +26 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/scheduler.d.ts +6 -0
- package/dist/scheduler/scheduler.js +19 -1
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +2 -0
- package/dist/scheduler/task-board-text.js +12 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +106 -2
- package/dist/scheduler/task-board.js +248 -24
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/task-files.d.ts +80 -0
- package/dist/scheduler/task-files.js +357 -0
- package/dist/scheduler/task-files.js.map +1 -0
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/service-activation.js +3 -13
- package/dist/service-activation.js.map +1 -1
- package/dist/service-lock.d.ts +28 -0
- package/dist/service-lock.js +85 -0
- package/dist/service-lock.js.map +1 -0
- package/dist/settings-api.d.ts +8 -0
- package/dist/settings-api.js +41 -1
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +1 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +1 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +5 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/state-lease.d.ts +24 -0
- package/dist/state-lease.js +103 -0
- package/dist/state-lease.js.map +1 -0
- package/dist/task-attach-client.d.ts +43 -0
- package/dist/task-attach-client.js +125 -0
- package/dist/task-attach-client.js.map +1 -0
- package/dist/task-board-tool.d.ts +12 -0
- package/dist/task-board-tool.js +107 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-file-limits.d.ts +15 -0
- package/dist/task-file-limits.js +21 -0
- package/dist/task-file-limits.js.map +1 -0
- package/dist/tmux-binary.js +1 -1
- package/dist/tmux-binary.js.map +1 -1
- package/dist/tool-permissions.d.ts +32 -0
- package/dist/tool-permissions.js +63 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +2 -0
- package/dist/topic-commands.js +21 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.js +3 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/tunnel/named-link-test.d.ts +27 -0
- package/dist/tunnel/named-link-test.js +41 -0
- package/dist/tunnel/named-link-test.js.map +1 -1
- package/dist/types.d.ts +13 -0
- package/dist/ui/agent-details-settings.js +7 -5
- package/dist/ui/agent-who-can-use-strings.js +125 -0
- package/dist/ui/agent-who-can-use.js +238 -0
- package/dist/ui/chat-store.js +5 -4
- package/dist/ui/fleet-office-card.js +37 -6
- package/dist/ui/fleet-office-editor.js +5 -5
- package/dist/ui/fleet-office-pack.d.ts +10 -0
- package/dist/ui/fleet-office-pack.js +65 -2
- package/dist/ui/fleet-office-skin.js +75 -17
- package/dist/ui/fleet-office-store.js +33 -2
- package/dist/ui/fleet-office-vehicles.js +130 -0
- package/dist/ui/fleet-office-zones.js +13 -4
- package/dist/ui/fleet-office.js +245 -46
- package/dist/ui/fleet-task-activity.js +9 -82
- package/dist/ui/fleet-task-archive.js +111 -0
- package/dist/ui/fleet-task-card.js +6 -4
- package/dist/ui/fleet-task-common.js +2 -2
- package/dist/ui/fleet-task-edit.js +8 -1
- package/dist/ui/fleet-task-files.js +196 -0
- package/dist/ui/fleet-task-md.js +98 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-stats.js +2 -2
- package/dist/ui/fleet-task-view.js +12 -8
- package/dist/ui/fleet-tasks.js +42 -18
- package/dist/ui/panel-chat.js +15 -2
- package/dist/ui/panel-details.js +3 -1
- package/dist/ui/panel-needs.js +25 -5
- package/dist/ui/panel-settings.js +37 -9
- package/dist/ui/settings-preview-address.js +156 -0
- package/dist/ui/settings-registry.js +3 -0
- package/dist/ui/settings-shared-strings.js +9 -0
- package/dist/ui/settings-shared.js +6 -1
- package/dist/ui/settings-strings.js +6 -6
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +8 -1
- package/dist/ui/shared/app.css +131 -5
- package/dist/ui/shared/chat-strings.js +10 -6
- package/dist/ui/shared/chat-thread.js +7 -1
- package/dist/ui/shared/preview-panel.js +1 -1
- package/dist/ui/shared/preview.js +11 -2
- package/dist/ui/shared/task-board.css +64 -0
- package/dist/ui/shared/tokens.css +18 -3
- package/dist/ui/shared/ui-confirm.js +5 -4
- package/dist/ui/shared/workspace.css +7 -0
- package/dist/ui/usage-credits-card.js +84 -0
- package/dist/ui/workspace-ignored-strings.js +16 -0
- package/dist/ui/workspace-panel.js +15 -6
- package/dist/update-card.d.ts +193 -0
- package/dist/update-card.js +620 -0
- package/dist/update-card.js.map +1 -0
- package/dist/update-dispatch.d.ts +16 -1
- package/dist/update-dispatch.js +12 -4
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-forward.d.ts +73 -0
- package/dist/update-forward.js +283 -0
- package/dist/update-forward.js.map +1 -0
- package/dist/update-idle.d.ts +1 -0
- package/dist/update-idle.js +12 -3
- package/dist/update-idle.js.map +1 -1
- package/dist/update-install.d.ts +2 -1
- package/dist/update-install.js +18 -10
- package/dist/update-install.js.map +1 -1
- package/dist/update-journal.d.ts +351 -0
- package/dist/update-journal.js +717 -0
- package/dist/update-journal.js.map +1 -0
- package/dist/update-launch.js +1 -1
- package/dist/update-launch.js.map +1 -1
- package/dist/update-npm-env.d.ts +45 -12
- package/dist/update-npm-env.js +48 -0
- package/dist/update-npm-env.js.map +1 -1
- package/dist/update-package-restore.d.ts +75 -0
- package/dist/update-package-restore.js +318 -0
- package/dist/update-package-restore.js.map +1 -0
- package/dist/update-quiescence.d.ts +192 -0
- package/dist/update-quiescence.js +330 -0
- package/dist/update-quiescence.js.map +1 -0
- package/dist/update-readiness-host.d.ts +61 -0
- package/dist/update-readiness-host.js +297 -0
- package/dist/update-readiness-host.js.map +1 -0
- package/dist/update-readiness.d.ts +83 -0
- package/dist/update-readiness.js +459 -0
- package/dist/update-readiness.js.map +1 -0
- package/dist/update-recovery/kit.d.ts +35 -0
- package/dist/update-recovery/kit.js +99 -0
- package/dist/update-recovery/kit.js.map +1 -0
- package/dist/update-recovery/pre-start.d.ts +34 -0
- package/dist/update-recovery/pre-start.js +103 -0
- package/dist/update-recovery/pre-start.js.map +1 -0
- package/dist/update-recovery/recover-main.d.ts +1 -0
- package/dist/update-recovery/recover-main.js +4 -0
- package/dist/update-recovery/recover-main.js.map +1 -0
- package/dist/update-recovery/recover.d.ts +22 -0
- package/dist/update-recovery/recover.js +124 -0
- package/dist/update-recovery/recover.js.map +1 -0
- package/dist/update-recovery/route.d.ts +53 -0
- package/dist/update-recovery/route.js +262 -0
- package/dist/update-recovery/route.js.map +1 -0
- package/dist/update-recovery/runner.d.ts +58 -0
- package/dist/update-recovery/runner.js +196 -0
- package/dist/update-recovery/runner.js.map +1 -0
- package/dist/update-recovery/service-manager.d.ts +39 -0
- package/dist/update-recovery/service-manager.js +57 -0
- package/dist/update-recovery/service-manager.js.map +1 -0
- package/dist/update-restore.d.ts +44 -0
- package/dist/update-restore.js +355 -0
- package/dist/update-restore.js.map +1 -0
- package/dist/update-retained.d.ts +38 -0
- package/dist/update-retained.js +91 -0
- package/dist/update-retained.js.map +1 -0
- package/dist/update-rollback.d.ts +74 -0
- package/dist/update-rollback.js +221 -0
- package/dist/update-rollback.js.map +1 -0
- package/dist/update-settings.d.ts +36 -0
- package/dist/update-settings.js +122 -0
- package/dist/update-settings.js.map +1 -0
- package/dist/update-snapshot-manifest.d.ts +32 -0
- package/dist/update-snapshot-manifest.js +65 -0
- package/dist/update-snapshot-manifest.js.map +1 -0
- package/dist/update-snapshot-scope.d.ts +67 -0
- package/dist/update-snapshot-scope.js +172 -0
- package/dist/update-snapshot-scope.js.map +1 -0
- package/dist/update-snapshot.d.ts +34 -0
- package/dist/update-snapshot.js +246 -0
- package/dist/update-snapshot.js.map +1 -0
- package/dist/update-writers.d.ts +71 -0
- package/dist/update-writers.js +235 -0
- package/dist/update-writers.js.map +1 -0
- package/dist/web-api.d.ts +6 -0
- package/dist/web-api.js +140 -22
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +7 -0
- package/dist/web-chat-history.js +15 -0
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-office-acts.d.ts +16 -0
- package/dist/web-office-acts.js +27 -9
- package/dist/web-office-acts.js.map +1 -1
- package/dist/web-office-pack-read.js +1 -1
- package/dist/web-office-pack-read.js.map +1 -1
- package/dist/web-office-skins.d.ts +5 -3
- package/dist/web-office-skins.js +20 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-preview.d.ts +5 -0
- package/dist/web-preview.js +1 -1
- package/dist/web-preview.js.map +1 -1
- package/dist/web-settings-patch.d.ts +27 -0
- package/dist/web-settings-patch.js +67 -0
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-update.d.ts +6 -0
- package/dist/windows-agents.d.ts +12 -0
- package/dist/windows-agents.js +5 -0
- package/dist/windows-agents.js.map +1 -1
- package/dist/workflow-templates/default.md +1 -0
- package/launcher/agend +4 -1
- package/launcher/agend-agent +4 -1
- package/launcher/agend-install.cjs +16 -8
- package/launcher/install-admission.d.cts +8 -0
- package/launcher/npm-allow-scripts.cjs +72 -0
- package/launcher/npm-global-prefix.cjs +81 -0
- package/launcher/postinstall.cjs +9 -8
- package/launcher/runtime-select.cjs +8 -2
- package/package.json +3 -2
- package/scripts/preinstall-guard.cjs +1 -1
|
@@ -17,7 +17,7 @@ register("taskmenu", {
|
|
|
17
17
|
prev: "Previous card (K)", next: "Next card (J)", position: "{0} / {1}",
|
|
18
18
|
},
|
|
19
19
|
"zh-TW": {
|
|
20
|
-
label: "{0}:動作", open: "打開", moveTo: "移到", assignee: "負責人", priority: "
|
|
20
|
+
label: "{0}:動作", open: "打開", moveTo: "移到", assignee: "負責人", priority: "優先級",
|
|
21
21
|
copyLink: "複製連結", copyId: "複製卡號", copied: "已複製 {0}", cancel: "取消這張卡…",
|
|
22
22
|
prev: "上一張(K)", next: "下一張(J)", position: "{0} / {1}",
|
|
23
23
|
},
|
|
@@ -18,10 +18,10 @@ register("taskstats", {
|
|
|
18
18
|
note: "It counts the cards the board shows: with its filter, and finished cards as the Done column has them (the last 7 days, or all).",
|
|
19
19
|
},
|
|
20
20
|
"zh-TW": {
|
|
21
|
-
button: "統計", buttonTip: "
|
|
21
|
+
button: "統計", buttonTip: "統計這個專案的卡:依負責人、狀態、優先級或大小",
|
|
22
22
|
title: "統計:{0}", count: "計算", countAll: "所有卡", countMain: "只算主任務",
|
|
23
23
|
rows: "每一列", split: "細分", splitNone: "不細分",
|
|
24
|
-
"field.assignee": "負責人", "field.status": "狀態", "field.priority": "
|
|
24
|
+
"field.assignee": "負責人", "field.status": "狀態", "field.priority": "優先級", "field.size": "大小",
|
|
25
25
|
total: "合計", cards: "{0} 張卡", empty: "這裡沒有可以統計的卡", chart: "{0},依{1}",
|
|
26
26
|
note: "統計的是看板上顯示的卡:套用看板的篩選;已完成的卡照完成欄顯示的算(近 7 天或全部)。",
|
|
27
27
|
},
|
|
@@ -10,6 +10,7 @@ import { t, register, lang } from "/assets/app-i18n.js";
|
|
|
10
10
|
import { Icon } from "/assets/ui-icons.js";
|
|
11
11
|
import { Menu } from "/assets/ui-menu.js";
|
|
12
12
|
import { RunMark, runOf } from "./fleet-task-run.js";
|
|
13
|
+
import "./fleet-task-files.js";
|
|
13
14
|
import { OwnerChip } from "./fleet-task-owner.js";
|
|
14
15
|
import { COLUMNS, ProgressBar, UNASSIGNED, Who, readStored, recentlyDone, relTime, reviewLabel, waitsForYou, waitsList, waitsOn, wrapUpText, writeStored } from "./fleet-task-common.js";
|
|
15
16
|
import { assetUrl } from "/assets/asset-url.js";
|
|
@@ -54,15 +55,15 @@ register("taskview", {
|
|
|
54
55
|
"zh-TW": {
|
|
55
56
|
display: "顯示", displayTip: "看板或清單、分組、排序、已完成的卡", filter: "篩選", filterTip: "只看部分卡片",
|
|
56
57
|
view: "檢視", board: "看板", list: "清單", groupBy: "分組", orderBy: "排序", finished: "已完成的卡", doneHide: "隱藏",
|
|
57
|
-
"group.status": "狀態", "group.assignee": "負責人", "group.priority": "
|
|
58
|
-
"order.manual": "看板順序", "order.priority": "
|
|
58
|
+
"group.status": "狀態", "group.assignee": "負責人", "group.priority": "優先級", "group.none": "不分組",
|
|
59
|
+
"order.manual": "看板順序", "order.priority": "優先級", "order.updated": "最近變動", "order.created": "最新建立", "order.title": "標題",
|
|
59
60
|
subsRows: "子任務也各列一行",
|
|
60
|
-
fieldstatus: "狀態", fieldassignee: "負責人", fieldpriority: "
|
|
61
|
+
fieldstatus: "狀態", fieldassignee: "負責人", fieldpriority: "優先級", fieldsize: "大小",
|
|
61
62
|
filters: "篩選條件", is: "是", isNot: "不是", opTip: "切換「是」與「不是」", values: "{0}:選擇項目",
|
|
62
63
|
nValues: "{0} 項", remove: "移除這個條件", clear: "清除篩選", changed: "{0}變動", inMain: "{0} {1} 的子任務",
|
|
63
64
|
fieldwaits: "等我處理", waitsYou: "等我確認", viewLabel: "看板或清單", scrollColumns: "捲動欄位", columnsLeft: "左邊的欄位", columnsRight: "右邊的欄位", search: "搜尋", searchLabel: "搜尋這個專案的卡片(卡號、標題、欄位、完成定義)",
|
|
64
65
|
"order.assignee": "負責人", "order.code": "卡號", sortBy: "依{0}排序", sortedBy: "{0},{1}排序", asc: "由小到大", desc: "由大到小",
|
|
65
|
-
colId: "卡號", colTitle: "標題", colPriority: "
|
|
66
|
+
colId: "卡號", colTitle: "標題", colPriority: "優先級", colAssignee: "負責人", colUpdated: "更新",
|
|
66
67
|
collapse: "收合 {0}", expand: "展開 {0}", more: "卡片動作", statusTabs: "一次看一個狀態", noMatch: "沒有符合「{0}」的卡片", clearSearch: "清除搜尋",
|
|
67
68
|
},
|
|
68
69
|
});
|
|
@@ -262,7 +263,7 @@ export function FilterMenu({ cards, filters, onChange }) {
|
|
|
262
263
|
}
|
|
263
264
|
|
|
264
265
|
/** Display: the list's grouping, order and sub-task rows; which finished cards show (the board / list switch is the toolbar's). */
|
|
265
|
-
export function DisplayMenu({ display, onChange }) {
|
|
266
|
+
export function DisplayMenu({ display, onChange, archiving = false }) {
|
|
266
267
|
const d = display;
|
|
267
268
|
const list = d.view === "list";
|
|
268
269
|
const radio = (k, v, label) => ({ key: `${k}-${v}`, label, checked: d[k] === v, onSelect: () => onChange({ ...d, [k]: v }) });
|
|
@@ -273,7 +274,9 @@ export function DisplayMenu({ display, onChange }) {
|
|
|
273
274
|
...(list ? ORDERS.map((o) => ({ key: `order-${o}`, label: t(`taskview.order.${o}`), checked: d.order === o, onSelect: () => onChange({ ...d, order: o, dir: "asc" }) })) : []),
|
|
274
275
|
list && { key: "subs", checkbox: true, checked: d.subs, label: t("taskview.subsRows"), onSelect: () => onChange({ ...d, subs: !d.subs }) },
|
|
275
276
|
{ key: "h-done", heading: true, label: t("taskview.finished") },
|
|
276
|
-
|
|
277
|
+
// M-3668: with archiving on, finished cards show (their newest, the rest in the Archive) or hide — "All" is the Archive.
|
|
278
|
+
...(archiving ? [{ key: "done-show", label: t("tasksArchive.doneShow"), checked: d.done !== "hide", onSelect: () => onChange({ ...d, done: "recent" }) }, radio("done", "hide", t("taskview.doneHide"))]
|
|
279
|
+
: [radio("done", "recent", t("tasks.recent")), radio("done", "all", t("tasks.all")), radio("done", "hide", t("taskview.doneHide"))]),
|
|
277
280
|
];
|
|
278
281
|
// Pressed while it shows something other than the defaults (beyond board or list, which is plain to see).
|
|
279
282
|
const changed = ["group", "order", "dir", "done", "subs"].some((k) => d[k] !== DEFAULT_DISPLAY[k]);
|
|
@@ -332,7 +335,7 @@ export function SearchField({ value, onChange, closed = false, inputRef = null,
|
|
|
332
335
|
* the 🔍 (under the row); a search that holds words keeps its field open, and the 🔍 is marked. The 🔍 is not drawn on a desk,
|
|
333
336
|
* where the field is always there (the page's CSS decides: the same markup serves both).
|
|
334
337
|
*/
|
|
335
|
-
export function TaskToolbar({ cards, display, onDisplay, filters, onFilters, query, onQuery, scroller = null }) {
|
|
338
|
+
export function TaskToolbar({ cards, display, onDisplay, filters, onFilters, query, onQuery, scroller = null, archiving = false }) {
|
|
336
339
|
const [asked, setAsked] = useState(false);
|
|
337
340
|
const field = useRef(null);
|
|
338
341
|
const focusNext = useRef(false);
|
|
@@ -353,7 +356,7 @@ export function TaskToolbar({ cards, display, onDisplay, filters, onFilters, que
|
|
|
353
356
|
<${SearchField} value=${query} onChange=${onQuery} closed=${!open} inputRef=${field} onEmptyEscape=${() => setAsked(false)} />
|
|
354
357
|
<div class="tb-view-actions">
|
|
355
358
|
<${FilterMenu} cards=${cards} filters=${filters} onChange=${onFilters} />
|
|
356
|
-
<${DisplayMenu} display=${display} onChange=${onDisplay} />
|
|
359
|
+
<${DisplayMenu} display=${display} onChange=${onDisplay} archiving=${archiving} />
|
|
357
360
|
<button type="button" class=${`btn btn-sm tb-search-toggle${hasWords ? " active" : ""}`} aria-expanded=${open ? "true" : "false"} aria-controls="tb-find-input"
|
|
358
361
|
aria-label=${t("taskview.searchLabel")} title=${t("taskview.searchLabel")} onClick=${toggle}><${Icon} name="search" size=${16} /></button>
|
|
359
362
|
</div>
|
|
@@ -498,6 +501,7 @@ function Row({ card, subs, main, flash, now, runs, subsAsRows, who, expanded, on
|
|
|
498
501
|
${card.acceptance.length ? html`<span class=${accepted === card.acceptance.length ? "all" : ""} title=${t(card.kind === "main" ? "tasks.definition" : "tasks.acceptance")}><${Icon} name="check" size=${13} />${accepted}/${card.acceptance.length}</span>` : null}
|
|
499
502
|
${waitsOn(card) ? html`<span title=${t("tasks.waitsFor", waitsList(card, ", "))}><${Icon} name="clock" size=${13} /></span>` : null}
|
|
500
503
|
${card.commentCount ? html`<span class=${replied ? "reply" : ""} title=${replied ? t("tasks.agentReplied") : t("tasks.comments")}><${Icon} name="chat" size=${13} />${card.commentCount}</span>` : null}
|
|
504
|
+
${card.attachmentCount ? html`<span title=${t("taskfiles.title")}><${Icon} name="attach" size=${13} />${card.attachmentCount}</span>` : null}
|
|
501
505
|
</span>
|
|
502
506
|
<span class=${`tb-row-prio p-${card.priority}`}>${t(`tasks.${card.priority}`)}</span>
|
|
503
507
|
${who ? html`<span class="tb-row-who"><${OwnerChip} card=${card} cards=${cards} lead=${lead} canAssign=${writable && card.status !== "done" && card.status !== "cancelled"} onPick=${onOwner} /></span>` : null}
|
package/dist/ui/fleet-tasks.js
CHANGED
|
@@ -29,6 +29,7 @@ import { RunMark, inProgressBy, runOf, useRunContext } from "./fleet-task-run.js
|
|
|
29
29
|
import { OwnerChip, otherWorkers, quietInfo } from "./fleet-task-owner.js";
|
|
30
30
|
import { InsightsDialog } from "./fleet-task-stats.js";
|
|
31
31
|
import { ToSort, sortCount } from "./fleet-task-sort.js";
|
|
32
|
+
import { ArchiveDialog, ArchivedLink, ArchivedTag, DONE_PAGE, newestDone, weekLabel } from "./fleet-task-archive.js";
|
|
32
33
|
|
|
33
34
|
const PROJECT_KEY = "agend_tasks_project";
|
|
34
35
|
const QUERY_KEY = "agend_tasks_query";
|
|
@@ -80,7 +81,7 @@ export function TaskBoardTab({ lease }) {
|
|
|
80
81
|
const seq = useRef(0);
|
|
81
82
|
const setAt = (v) => { setAtRaw(v); setQuery(""); writeStored(PROJECT_KEY, v === null ? null : String(v)); };
|
|
82
83
|
const reload = (ifMoved = false) => setVersion((v) => ({ n: v.n + 1, ifMoved }));
|
|
83
|
-
const shown = useRef({ rev: null, allDone: false });
|
|
84
|
+
const shown = useRef({ rev: null, epoch: null, allDone: false });
|
|
84
85
|
|
|
85
86
|
useEffect(() => {
|
|
86
87
|
const mine = ++seq.current;
|
|
@@ -89,13 +90,17 @@ export function TaskBoardTab({ lease }) {
|
|
|
89
90
|
const q = new URLSearchParams();
|
|
90
91
|
if (allDone) q.set("done", "all");
|
|
91
92
|
// The same board at the same revision is not sent again.
|
|
92
|
-
if (version.ifMoved && shown.current.rev !== null && shown.current.allDone === allDone)
|
|
93
|
+
if (version.ifMoved && shown.current.rev !== null && shown.current.allDone === allDone) {
|
|
94
|
+
q.set("rev", String(shown.current.rev));
|
|
95
|
+
// #4428 review: and where time had left the board's lines (a card archived since is a new board).
|
|
96
|
+
if (shown.current.epoch !== null) q.set("epoch", shown.current.epoch);
|
|
97
|
+
}
|
|
93
98
|
const qs = q.toString();
|
|
94
99
|
const r = await lease.fetch(`/ui/tasks/board${qs ? `?${qs}` : ""}`, { method: "GET", headers: { "Content-Type": "application/json" } });
|
|
95
100
|
if (!r.ok) throw new Error(`HTTP ${r.status}`);
|
|
96
101
|
const d = await r.json();
|
|
97
102
|
if (!lease.current() || mine !== seq.current || d.unchanged) return;
|
|
98
|
-
shown.current = { rev: typeof d.rev === "number" ? d.rev : null, allDone };
|
|
103
|
+
shown.current = { rev: typeof d.rev === "number" ? d.rev : null, epoch: typeof d.epoch === "string" ? d.epoch : null, allDone };
|
|
99
104
|
setState({ data: d });
|
|
100
105
|
} catch { if (lease.current() && mine === seq.current) setState((s) => (s && s.data ? s : { error: true })); }
|
|
101
106
|
})();
|
|
@@ -200,9 +205,12 @@ export function TaskBoardTab({ lease }) {
|
|
|
200
205
|
// The server's numbers cover every card (finished ones are not all on the board); computed here only without them.
|
|
201
206
|
const stats = (key) => (state.data.stats && state.data.stats[String(key)]) || projectStats(key, cards);
|
|
202
207
|
const project = at === null ? null : at === NO_PROJECT ? NO_PROJECT : projects.find((p) => p.id === at) || null;
|
|
208
|
+
// M-3668: how many days after it finished a main task leaves the board (0: never; an older server says nothing).
|
|
209
|
+
const archiveDays = typeof state.data.archiveAfterDays === "number" ? state.data.archiveAfterDays : 0;
|
|
203
210
|
const body = project === null
|
|
204
|
-
? html`<${Home} cards=${cards} projects=${projects} stats=${stats} writable=${writable} onOpenProject=${setAt} onOpen=${openCard} onDialog=${setDialog} onInstances=${showInstances} reload=${reload} />`
|
|
211
|
+
? html`<${Home} cards=${cards} projects=${projects} stats=${stats} writable=${writable} onOpenProject=${setAt} onOpen=${openCard} onDialog=${setDialog} onInstances=${showInstances} reload=${reload} archiveDays=${archiveDays} />`
|
|
205
212
|
: html`<${ProjectBoard} project=${project} cards=${cards} stats=${stats} flashed=${flashed} display=${display} filters=${filters} query=${query} writable=${writable}
|
|
213
|
+
archiveDays=${archiveDays} onArchive=${() => setDialog({ kind: "archive", project })}
|
|
206
214
|
onDisplay=${setDisplay} onFilters=${setFilters} onQuery=${setQuery} onBack=${() => setAt(null)} onMore=${openMenuFor} onOwner=${openOwnerMenu}
|
|
207
215
|
notSorted=${sortCount(cards, projects)} onOpenNoProject=${() => setAt(NO_PROJECT)}
|
|
208
216
|
onOpen=${openCard} onCreate=${() => setDialog({ kind: "main", project: project === NO_PROJECT ? null : project.id })} onInstances=${showInstances} reload=${reload} />`;
|
|
@@ -302,6 +310,10 @@ export function TaskBoardTab({ lease }) {
|
|
|
302
310
|
${dialog && dialog.kind === "main" ? html`<${CreateMainDialog} projects=${projects} project=${dialog.project} boardOff=${boardOff} onClose=${() => setDialog(null)}
|
|
303
311
|
onCreated=${(id) => { if (!lease.current()) return; setDialog(null); reload(); openCard(id); }} />` : null}
|
|
304
312
|
${dialog && dialog.kind === "instances" ? html`<${InstancesDrawer} tick=${tick} onClose=${() => setDialog(null)} onOpen=${(id) => { setDialog(null); openCard(id); }} />` : null}
|
|
313
|
+
${dialog && dialog.kind === "archive" ? html`<${ArchiveDialog} project=${dialog.project === NO_PROJECT ? "none" : dialog.project.id}
|
|
314
|
+
name=${dialog.project === NO_PROJECT ? t("tasks.noProject") : dialog.project.name} days=${archiveDays} onClose=${() => setDialog(null)}
|
|
315
|
+
onOpen=${(c) => { setDialog(null); openCard(c.id); }}
|
|
316
|
+
fetchJson=${async (url) => { const r = await lease.fetch(url, { method: "GET" }); if (!r.ok) throw new Error(`HTTP ${r.status}`); return r.json(); }} />` : null}
|
|
305
317
|
${dialog && dialog.kind === "project" ? html`<${ProjectDialog} project=${dialog.project} leads=${leads} onClose=${() => setDialog(null)}
|
|
306
318
|
onSaved=${(p) => { if (!lease.current()) return; setDialog(null); reload(); if (!dialog.project) setAt(p.id); }} />` : null}
|
|
307
319
|
<${AskHost} />
|
|
@@ -316,7 +328,7 @@ function InstancesButton({ onClick }) {
|
|
|
316
328
|
return html`<button type="button" class="btn" title=${t("tasks.instancesTip")} onClick=${onClick}><${Icon} name="team" size=${16} /><span class="tb-btn-label">${t("tasks.instances")}</span></button>`;
|
|
317
329
|
}
|
|
318
330
|
|
|
319
|
-
function Home({ cards, projects, stats, writable, onOpenProject, onOpen, onDialog, onInstances, reload }) {
|
|
331
|
+
function Home({ cards, projects, stats, writable, onOpenProject, onOpen, onDialog, onInstances, reload, archiveDays = 0 }) {
|
|
320
332
|
const [showArchived, setShowArchived] = useState(false);
|
|
321
333
|
const active = projects.filter((p) => !p.archived);
|
|
322
334
|
const archived = projects.filter((p) => p.archived);
|
|
@@ -327,7 +339,7 @@ function Home({ cards, projects, stats, writable, onOpenProject, onOpen, onDialo
|
|
|
327
339
|
return html`<div class="tb-home">
|
|
328
340
|
<div class="list-head tb-head s-page-head"><div class="s-page-title"><h2>${t("tasks.projects")}</h2></div>
|
|
329
341
|
<div class="tb-head-actions">
|
|
330
|
-
<${SearchBox} onOpen=${onOpen} />
|
|
342
|
+
<${SearchBox} onOpen=${onOpen} archiveDays=${archiveDays} />
|
|
331
343
|
<${InstancesButton} onClick=${onInstances} />
|
|
332
344
|
${writable ? html`<button type="button" class="btn btn-primary" onClick=${() => onDialog({ kind: "project", project: null })}><${Icon} name="plus" size=${16} />${t("tasks.newProject")}</button>` : null}</div>
|
|
333
345
|
</div>
|
|
@@ -362,6 +374,7 @@ function ProjectTile({ project, stats, sorting = 0, onOpen, onDialog, reload })
|
|
|
362
374
|
${sorting ? html`<span class="tb-flag st-review tb-sort-flag">${t("tasksort.tileBadge", sorting)}</span>` : null}
|
|
363
375
|
${stats.waiting ? html`<span class="tb-flag st-review">${t("tasks.waiting", stats.waiting)}</span>` : null}
|
|
364
376
|
${stats.blocked ? html`<span class="tb-flag st-blocked">${t("tasks.blockedN", stats.blocked)}</span>` : null}
|
|
377
|
+
${stats.archived ? html`<span class="muted tb-project-archived">${t("tasksArchive.tile", stats.archived)}</span>` : null}
|
|
365
378
|
${stats.lastActivity ? html`<span class="muted">${t("tasks.lastActivity", relTime(stats.lastActivity))}</span>` : null}
|
|
366
379
|
${project && project.leadInstance ? html`<span class="muted tb-project-lead-chip">${t("tasks.projectLeadChip", project.leadInstance)}</span>` : null}
|
|
367
380
|
</span>
|
|
@@ -414,7 +427,7 @@ function Waiting({ cards, writable, onOpen, reload }) {
|
|
|
414
427
|
</section>`;
|
|
415
428
|
}
|
|
416
429
|
|
|
417
|
-
function SearchBox({ onOpen }) {
|
|
430
|
+
function SearchBox({ onOpen, archiveDays = 0 }) {
|
|
418
431
|
const [q, setQ] = useState("");
|
|
419
432
|
const [results, setResults] = useState(null);
|
|
420
433
|
const [active, setActive] = useState(0);
|
|
@@ -443,7 +456,7 @@ function SearchBox({ onOpen }) {
|
|
|
443
456
|
${results ? html`<ul class="tb-search-results" role="listbox">
|
|
444
457
|
${results.length ? results.map((r, i) => html`<li key=${r.card.id} role="option" aria-selected=${i === active ? "true" : "false"} class=${i === active ? "active" : ""}>
|
|
445
458
|
<button type="button" onClick=${() => pick(r.card.id)}>
|
|
446
|
-
<span class="tb-code">${r.card.id}</span><span class="tb-search-title">${r.card.title}</span><${StatusPill} status=${r.card.status} card=${r.card}
|
|
459
|
+
<span class="tb-code">${r.card.id}</span><span class="tb-search-title">${r.card.title}</span><${StatusPill} status=${r.card.status} card=${r.card} />${r.archived ? html`<${ArchivedTag} days=${archiveDays} />` : null}
|
|
447
460
|
<span class="tb-search-where muted">${[r.project, r.parentTitle].filter(Boolean).join(" › ")}${r.match ? ` · ${t("tasks.inField", t(`tasks.field${r.match.field}`))}: ${r.match.text}` : ""}</span>
|
|
448
461
|
</button></li>`) : html`<li class="muted tb-search-none">${t("tasks.searchEmpty")}</li>`}
|
|
449
462
|
</ul>` : null}
|
|
@@ -452,8 +465,10 @@ function SearchBox({ onOpen }) {
|
|
|
452
465
|
|
|
453
466
|
// ── A project's board ─────────────────────────────────────
|
|
454
467
|
|
|
455
|
-
function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filters, query, writable, notSorted = 0, onOpenNoProject, onDisplay, onFilters, onQuery, onBack, onOpen, onMore, onOwner, onCreate, onInstances, reload }) {
|
|
468
|
+
function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filters, query, writable, notSorted = 0, onOpenNoProject, onDisplay, onFilters, onQuery, onBack, onOpen, onMore, onOwner, onCreate, onInstances, reload, archiveDays = 0, onArchive = null }) {
|
|
456
469
|
const [expanded, setExpanded] = useState({});
|
|
470
|
+
// M-3668: the Done column (and the list's done rows) shows its newest DONE_PAGE, DONE_PAGE more at a time.
|
|
471
|
+
const [doneLimit, setDoneLimit] = useState(DONE_PAGE);
|
|
457
472
|
// A phone shows one status at a time: the one picked here, else the first that has cards (the person's own first).
|
|
458
473
|
const [phoneStatus, setPhoneStatus] = useState(null);
|
|
459
474
|
const [drag, setDrag] = useState(null);
|
|
@@ -478,7 +493,12 @@ function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filter
|
|
|
478
493
|
const live = cards.filter((c) => c.kind === "main" && projectKey(c) === key && c.status !== "cancelled");
|
|
479
494
|
// What the filters offer: this project's main tasks and their sub tasks.
|
|
480
495
|
const own = live.flatMap((c) => [c, ...(subsOf.get(c.id) || [])]);
|
|
481
|
-
const
|
|
496
|
+
const matched = live.filter((c) => doneShown(c, display.done, now) && mainMatches(c, subsOf.get(c.id), filters, query));
|
|
497
|
+
const doneAll = newestDone(matched.filter((c) => c.status === "done"));
|
|
498
|
+
const doneCut = new Set(doneAll.slice(doneLimit).map((c) => c.id));
|
|
499
|
+
// What the page draws: every unfinished main task, the newest finished ones; `matched` still counts them all.
|
|
500
|
+
const mains = matched.filter((c) => !doneCut.has(c.id));
|
|
501
|
+
const moreDone = doneCut.size ? html`<button type="button" class="btn btn-sm tb-done-more" onClick=${() => setDoneLimit((n) => n + DONE_PAGE)}>${t("tasksArchive.showMore", Math.min(DONE_PAGE, doneCut.size))}</button>` : null;
|
|
482
502
|
const searching = filters.length > 0 || query.trim() !== "";
|
|
483
503
|
// Finished cards hidden: no Done column (a card is still confirmed or finished from its dialog).
|
|
484
504
|
const columns = display.done === "hide" ? COLUMNS.filter((s) => s !== "done") : COLUMNS;
|
|
@@ -490,12 +510,12 @@ function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filter
|
|
|
490
510
|
// Insights counts what the page shows. A list with sub-task rows shows exactly its rows (each matched by the filter, a
|
|
491
511
|
// finished one as Done shows it); the board, or a list without them, shows a main task with all its sub tasks.
|
|
492
512
|
const insightCards = () => (display.view === "list" && display.subs
|
|
493
|
-
? listRows(
|
|
494
|
-
:
|
|
513
|
+
? listRows(matched, subsOf, display, filters, now, query)
|
|
514
|
+
: matched.flatMap((c) => [c, ...(subsOf.get(c.id) || [])]));
|
|
495
515
|
const listBody = () => {
|
|
496
516
|
const rows = listRows(mains, subsOf, display, filters, now, query);
|
|
497
517
|
return rows.length === 0 ? empty() : html`<${ListView} rows=${rows} display=${display} subsOf=${subsOf} byId=${byId} flashed=${flashed} now=${now} runs=${runs}
|
|
498
|
-
expanded=${expanded} onToggleSubs=${toggleSubs} onOpen=${onOpen} onMore=${onMore} onOwner=${onOwner} cards=${cards} lead=${lead} writable=${writable} onDisplay=${onDisplay} scope=${String(key)}
|
|
518
|
+
expanded=${expanded} onToggleSubs=${toggleSubs} onOpen=${onOpen} onMore=${onMore} onOwner=${onOwner} cards=${cards} lead=${lead} writable=${writable} onDisplay=${onDisplay} scope=${String(key)} />${moreDone}`;
|
|
499
519
|
};
|
|
500
520
|
|
|
501
521
|
const dropping = useRef(false);
|
|
@@ -620,6 +640,7 @@ function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filter
|
|
|
620
640
|
${stats.blocked ? html`<span class="tb-flag st-blocked">${t("tasks.blockedN", stats.blocked)}</span>` : null}
|
|
621
641
|
</div>
|
|
622
642
|
${project !== NO_PROJECT && notSorted ? html`<button type="button" class="tb-flag st-review tb-sort-link" title=${t("tasksort.headerLinkTip")} onClick=${onOpenNoProject}><${Icon} name="inbox" size=${16} /><span class="tb-sort-link-short">${t("tasksort.headerLink", notSorted)}</span><span class="tb-sort-link-long">${t("tasksort.title", notSorted)}</span><span class="tb-sort-link-go">${t("tasksort.go")}</span> →</button>` : null}
|
|
643
|
+
<${ArchivedLink} count=${stats.archived} days=${archiveDays} onOpen=${onArchive} />
|
|
623
644
|
<button type="button" class="btn btn-ghost btn-sm tb-insights" title=${t("taskstats.buttonTip")} onClick=${() => setInsights(true)}><${Icon} name="chart" size=${16} />${t("taskstats.button")}</button>
|
|
624
645
|
</div>
|
|
625
646
|
</div>
|
|
@@ -628,23 +649,24 @@ function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filter
|
|
|
628
649
|
${archived || !writable ? null : html`<button type="button" class="btn btn-primary" onClick=${onCreate}><${Icon} name="plus" size=${16} />${t("tasks.newMain")}</button>`}
|
|
629
650
|
</div>
|
|
630
651
|
</div>
|
|
631
|
-
<${TaskToolbar} cards=${own} display=${display} onDisplay=${onDisplay} filters=${filters} onFilters=${onFilters} query=${query} onQuery=${onQuery}
|
|
652
|
+
<${TaskToolbar} cards=${own} display=${display} onDisplay=${onDisplay} filters=${filters} onFilters=${onFilters} query=${query} onQuery=${onQuery} archiving=${archiveDays > 0}
|
|
632
653
|
scroller=${display.view === "list" ? null : { reach, by: scrollColumns }} />
|
|
633
654
|
${display.view === "list" ? listBody() : mains.length === 0 && !drag ? empty()
|
|
634
655
|
: html`${html`<div class="tb-seg tb-status-seg" role="group" aria-label=${t("taskview.statusTabs")} ref=${pillRow}>${columns.map((status) => {
|
|
635
|
-
const count = mains.filter((c) => c.status === status).length;
|
|
656
|
+
const count = (status === "done" ? doneAll : mains.filter((c) => c.status === status)).length;
|
|
636
657
|
return html`<button key=${status} type="button" aria-pressed=${current === status ? "true" : "false"} class=${`tb-seg-btn${current === status ? " active" : ""}${count === 0 ? " is-empty" : ""}`}
|
|
637
658
|
onClick=${() => setPhoneStatus(status)}><span class=${`tb-dot st-${status}`} aria-hidden="true"></span>${t(`tasks.${status}`)} <span class="tb-count">${count}</span></button>`;
|
|
638
659
|
})}</div>`}
|
|
639
660
|
<div class="tb-scroll" ref=${scrollEl}><div class="tb-columns">
|
|
640
661
|
${columns.map((status) => {
|
|
641
|
-
const list = mains.filter((c) => c.status === status);
|
|
662
|
+
const list = status === "done" ? doneAll.slice(0, doneLimit) : mains.filter((c) => c.status === status);
|
|
642
663
|
const line = spot && spot.status === status ? spot.index : -1;
|
|
643
664
|
return html`<section key=${status} class=${`tb-col st-${status}${status === current ? " is-current" : ""}${drag ? " can-drop" : ""}${line >= 0 ? " over" : ""}`} aria-label=${t(`tasks.${status}`)}
|
|
644
665
|
onDragOver=${(e) => over(e, status)} onDrop=${(e) => dropOn(e, status, list)}>
|
|
645
666
|
<h3 class="tb-col-head"><span class="tb-dot"></span>${t(`tasks.${status}`)}
|
|
646
|
-
${status === "done" ? html`<button type="button" class="tb-link" title=${t("tasks.toggleDone")} onClick=${() => onDisplay({ ...display, done: display.done === "all" ? "recent" : "all" })}>${display.done === "all" ? t("tasks.all") : t("tasks.recent")}</button>` : null}
|
|
647
|
-
<span class="tb-count">${list.length}</span></h3>
|
|
667
|
+
${status === "done" && archiveDays === 0 ? html`<button type="button" class="tb-link" title=${t("tasks.toggleDone")} onClick=${() => onDisplay({ ...display, done: display.done === "all" ? "recent" : "all" })}>${display.done === "all" ? t("tasks.all") : t("tasks.recent")}</button>` : null}
|
|
668
|
+
<span class="tb-count">${status === "done" ? doneAll.length : list.length}</span></h3>
|
|
669
|
+
${status === "done" && archiveDays > 0 ? html`<p class="muted tb-done-week tb-done-week-line" title=${t("tasksArchive.weekTip")}>${weekLabel(stats)}</p>` : null}
|
|
648
670
|
${cellItems(list, drag ? drag.id : null, line, (card, dragging) => {
|
|
649
671
|
const lit = Math.max(flashed.get(card.id) || 0, ...(subsOf.get(card.id) || []).map((s) => flashed.get(s.id) || 0));
|
|
650
672
|
return html`<${Tile} key=${card.id} card=${card} dragging=${dragging} flash=${now - lit < 4000} subs=${subsOf.get(card.id)} runs=${runs} writable=${writable} cards=${cards} lead=${lead}
|
|
@@ -652,6 +674,7 @@ function ProjectBoard({ project, cards, stats: statsOf, flashed, display, filter
|
|
|
652
674
|
onOpen=${onOpen} onMore=${onMore} onOwner=${onOwner} onKeyMove=${(e) => keyMove(card, e)}
|
|
653
675
|
onDragStart=${(e) => { e.dataTransfer.setData("text/plain", card.id); e.dataTransfer.effectAllowed = "move"; setDrag(card); }} onDragEnd=${end} />`;
|
|
654
676
|
})}
|
|
677
|
+
${status === "done" ? moreDone : null}
|
|
655
678
|
</section>`;
|
|
656
679
|
})}
|
|
657
680
|
</div></div>`}
|
|
@@ -751,6 +774,7 @@ function Tile({ card, dragging, flash, subs = [], runs, expanded, writable, card
|
|
|
751
774
|
${card.acceptance.length ? html`<span class=${accepted === card.acceptance.length ? "all" : ""} title=${t(card.kind === "main" ? "tasks.definition" : "tasks.acceptance")}><${Icon} name="check" size=${13} />${accepted}/${card.acceptance.length}</span>` : null}
|
|
752
775
|
${waitsOn(card) ? html`<span title=${t("tasks.waitsFor", waitsList(card, ", "))}><${Icon} name="clock" size=${13} /></span>` : null}
|
|
753
776
|
${card.commentCount ? html`<span class=${replied ? "reply" : ""} title=${replied ? t("tasks.agentReplied") : t("tasks.comments")}><${Icon} name="chat" size=${13} />${card.commentCount}</span>` : null}
|
|
777
|
+
${card.attachmentCount ? html`<span title=${t("taskfiles.title")}><${Icon} name="attach" size=${13} />${card.attachmentCount}</span>` : null}
|
|
754
778
|
</span>
|
|
755
779
|
</div>
|
|
756
780
|
</div>`;
|
package/dist/ui/panel-chat.js
CHANGED
|
@@ -245,6 +245,7 @@ linkWorkBarCss();
|
|
|
245
245
|
|
|
246
246
|
import { activityDrawCtx, activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
247
247
|
import { timeText } from "/assets/clock-text.js";
|
|
248
|
+
import { usageCreditsActions, usageCreditsTitle, usageCreditsDetail, kindClass, showRawLabel } from "./usage-credits-card.js";
|
|
248
249
|
/** The composer's textarea (#2342: text put back into it is a step Ctrl+Z goes back from). */
|
|
249
250
|
const composers = new Map(); // agent → current mounted refs, never a retained thread's stale closure
|
|
250
251
|
const composerField = (name) => composers.get(name)?.input.current || null;
|
|
@@ -1280,13 +1281,25 @@ function QuickActions({ name, inst, lease }) {
|
|
|
1280
1281
|
function Prompts({ name }) {
|
|
1281
1282
|
const list = store.promptsFor(name);
|
|
1282
1283
|
if (!list.length) return null;
|
|
1283
|
-
return html`<div data-trust="permission" class="prompts" aria-live="polite">${list.map(p => html`<div key=${p.nonce} class=${`prompt${p.resolved ? " done" : ""}`} role="group" aria-label=${p.text}>
|
|
1284
|
+
return html`<div data-trust="permission" class="prompts" aria-live="polite">${list.map(p => p.view && p.view.kind === "usage-credits" && !p.resolved ? html`<${UsageCreditsPrompt} key=${p.nonce} p=${p} />` : html`<div key=${p.nonce} class=${`prompt${p.resolved ? " done" : ""}`} role="group" aria-label=${p.text}>
|
|
1284
1285
|
<div class="txt">${p.resolved ? (p.outcome || t("chat.promptGone")) : textLinkSegments(p.text, p.links).map(sg => sg.href ? html`<a data-trust="link" class="st-link" href=${sg.href}>${sg.text}</a>` : sg.text)}</div>
|
|
1285
|
-
${p.resolved ? null : html`<div class="acts">${p.actions.filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class="btn" disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}</button>`)}
|
|
1286
|
+
${p.resolved ? null : html`<div class="acts">${p.actions.filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class="btn" disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}${a.hint ? html`<span class="btn-hint">${a.hint}</span>` : null}</button>`)}
|
|
1286
1287
|
${p.busy && !p.confirming ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>`}
|
|
1287
1288
|
${p.resolved ? null : p.actions.filter(a => a.input).map(a => html`<${PromptText} key=${a.id} p=${p} action=${a} />`)}</div>`)}</div>`;
|
|
1288
1289
|
}
|
|
1289
1290
|
|
|
1291
|
+
/** M-3757: Claude's usage-credits prompt, as in Needs you: the question naming the agent, one sentence on the bill, Claude's own words folded, its choices. */
|
|
1292
|
+
function UsageCreditsPrompt({ p }) {
|
|
1293
|
+
const title = usageCreditsTitle(p.view);
|
|
1294
|
+
return html`<div class="prompt prompt-usage-credits" role="group" aria-label=${title}>
|
|
1295
|
+
<div class="txt"><strong>${title}</strong></div>
|
|
1296
|
+
<div class="txt prompt-detail">${usageCreditsDetail(p.view)}</div>
|
|
1297
|
+
<details class="n-raw"><summary>${showRawLabel()}</summary><pre class="n-raw-text">${p.view.raw || p.text}</pre></details>
|
|
1298
|
+
<div class="acts">${usageCreditsActions(p.view, p.actions).filter(a => !a.input).map(a => html`<button key=${a.id} type="button" class=${`btn btn-sm${kindClass(a.kind)}`} disabled=${!!p.busy} onClick=${() => store.answerPrompt(p, a.id)}>${a.label}</button>`)}
|
|
1299
|
+
${p.busy && !p.confirming ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>
|
|
1300
|
+
</div>`;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1290
1303
|
/** #2675: a prompt's typed answer (a kiro question card's "answer in words"): a box and its send button. */
|
|
1291
1304
|
function PromptText({ p, action }) {
|
|
1292
1305
|
const [text, setText] = useState("");
|
package/dist/ui/panel-details.js
CHANGED
|
@@ -34,6 +34,7 @@ import { InstanceBoardWork } from "./fleet-task-work.js";
|
|
|
34
34
|
import { Icon } from "/assets/ui-icons.js";
|
|
35
35
|
import { AgentCategoryNav, AgentPageHead, AgentSettingsPanels, agentKind, categoryFromSearch, useAgentSettings } from "./agent-details-settings.js";
|
|
36
36
|
import { ContactPermissionsPanel } from "./contact-permissions.js";
|
|
37
|
+
import { WhoCanUsePanel } from "./agent-who-can-use.js";
|
|
37
38
|
import "./agent-page-strings.js";
|
|
38
39
|
import { pt } from "./agent-page-strings.js";
|
|
39
40
|
import { timeText } from "/assets/clock-text.js";
|
|
@@ -215,11 +216,12 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
|
|
|
215
216
|
<${PanelHeader} title=${name} sub=${sub} pageControls=${{ navKey }} pageActions=${items} nav=${html`<${InstanceSwitch} name=${name} current="details" />`}><${HeaderTools} navKey=${navKey} /><${Menu} items=${items} label=${t("app.more")} />${phone ? html`<${AgentSheetButton} name=${name} inst=${inst} current="details" items=${items} navKey=${navKey} />` : null}</${PanelHeader}>
|
|
216
217
|
<${AgentCategoryNav} name=${name} kind=${kind} cat=${shownCat} dirty=${dirty}>${!cat ? html`<div class="only-narrow"><div class="s-row agent-settings-index-return"><h2>${pt("title")}</h2>${backLink()}</div></div>` : null}</${AgentCategoryNav}>
|
|
217
218
|
<div data-trust="panel-content" class="panel-body"><div class="col" ref=${body}>
|
|
218
|
-
<div class="s-row agent-settings-heading"><a class="s-back" href=${detailsPath(name)}><${Icon} name="back" size=${16} /><span>${t("app.details")}</span></a><${AgentPageHead} name=${name} kind=${kind} cat=${shownCat} inst=${
|
|
219
|
+
<div class="s-row agent-settings-heading"><a class="s-back" href=${detailsPath(name)}><${Icon} name="back" size=${16} /><span>${t("app.details")}</span></a><${AgentPageHead} name=${name} kind=${kind} cat=${shownCat} inst=${inst} />${backLink()}</div>
|
|
219
220
|
${OpCard && sess.op ? html`<${OpCard} op=${sess.op} schema=${sess.data && sess.data.schema} />` : null}
|
|
220
221
|
<div class="s-section-layout" data-agent-category=${shownCat}>
|
|
221
222
|
<div class="ap-panel" id=${pane ? `pane-${pane.id}-ap-panel-overview` : "ap-panel-overview"} hidden=${shownCat !== "overview"}>${overview}</div>
|
|
222
223
|
${opened ? html`<${AgentSettingsPanels} name=${name} kind=${kind} cat=${shownCat} sess=${sess} onDirty=${onDirty} />` : null}
|
|
224
|
+
${shownCat === "access" ? html`<div class="ap-panel" id=${pane ? `pane-${pane.id}-ap-panel-access` : "ap-panel-access"}><${WhoCanUsePanel} key=${name} name=${name} display=${inst && inst.display_name} /></div>` : null}
|
|
223
225
|
${shownCat === "permissions" ? html`<div class="ap-panel" id=${pane ? `pane-${pane.id}-ap-panel-permissions` : "ap-panel-permissions"}><${ContactPermissionsPanel} key=${name} name=${name} /></div>` : null}
|
|
224
226
|
</div></div></div>
|
|
225
227
|
${sess.staged.size && Pending ? html`<${Pending} staged=${sess.staged} busy=${!!sess.op && ["writing", "posting", "watching"].includes(sess.op.phase)} onApply=${sess.apply} onDiscard=${sess.discard} section="agents" />` : null}
|
package/dist/ui/panel-needs.js
CHANGED
|
@@ -27,6 +27,7 @@ import { toast } from "/assets/ui-toast.js";
|
|
|
27
27
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
28
28
|
import { notifyStore, notifySupport, configDetail, reasonText, refreshNotify, setNotify } from "/assets/app-needs.js";
|
|
29
29
|
import { openSignIn, signInOffered } from "./backend-signin.js";
|
|
30
|
+
import { usageCreditsActions, usageCreditsTitle, usageCreditsDetail, kindClass, showRawLabel } from "./usage-credits-card.js";
|
|
30
31
|
import { decideProposal, installProposals } from "./agent-proposals.js";
|
|
31
32
|
import { GeneralLocation } from "./general-location.js";
|
|
32
33
|
import { runtimeUpdateText } from "./runtime-update-status.js";
|
|
@@ -36,8 +37,8 @@ import { HostDirectoryNotices, hostDirectoryNoticesOffered } from "./hub-host-se
|
|
|
36
37
|
|
|
37
38
|
// A pre-upgrade tab retains app-i18n.js. Register these reasons when the updated panel is loaded, too.
|
|
38
39
|
register("app", {
|
|
39
|
-
en: { needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_tmux_hold: "Held: an old tmux server or window" },
|
|
40
|
-
"zh-TW": { needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_tmux_hold: "已暫停:舊的 tmux 伺服器或視窗" },
|
|
40
|
+
en: { needs_reason_mcp_missing: "MCP servers missing after an AI account switch", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_tmux_hold: "Held: an old tmux server or window" },
|
|
41
|
+
"zh-TW": { needs_reason_mcp_missing: "切換 AI 帳號後缺少 MCP 伺服器", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_tmux_hold: "已暫停:舊的 tmux 伺服器或視窗" },
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
register("needs", {
|
|
@@ -254,13 +255,16 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
254
255
|
const p = item.type === "prompt" && item.nonce && owner ? owner.state.prompts[item.nonce] : null;
|
|
255
256
|
const fallback = item.nonce ? c.prompts[item.nonce] : undefined;
|
|
256
257
|
const promptBusy = p ? p.busy || p.resolved : !!fallback;
|
|
258
|
+
// M-3757: Claude's usage-credits prompt, compact: a one-line title, its options named by what they do, its own words folded.
|
|
259
|
+
const ucView = item.type === "prompt" && item.view && item.view.kind === "usage-credits" ? item.view : null;
|
|
260
|
+
const shownActions = ucView ? usageCreditsActions(ucView, item.actions) : item.actions;
|
|
257
261
|
const answer = async (action) => {
|
|
258
262
|
const store = chatOwner();
|
|
259
263
|
if (store) { store.answerByNonce(item, action); return; }
|
|
260
264
|
// Only before Chat has booted: the page's own claim on this nonce, taken now (synchronously), kept until the
|
|
261
265
|
// server's list drops the prompt (or the answer fails).
|
|
262
266
|
if (claims.get().prompts[item.nonce]) return;
|
|
263
|
-
const confirmation =
|
|
267
|
+
const confirmation = shownActions?.find(a => a.id === action)?.confirmation;
|
|
264
268
|
setClaim("prompts", item.nonce, confirmation ? "confirming" : "busy");
|
|
265
269
|
if (confirmation && !await confirmDialog({ ...confirmation, danger: true })) {
|
|
266
270
|
setClaim("prompts", item.nonce, null);
|
|
@@ -328,6 +332,22 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
328
332
|
setClaim("acks", hubKey, ok ? "done" : null);
|
|
329
333
|
toast(ok ? tn("hubRetryDone") : res && res.status === 404 ? tn("hubRetryGone") : res && res.status === 409 ? tn("hubRetryNot") : t("app.failed"), ok);
|
|
330
334
|
};
|
|
335
|
+
const answering = (p ? p.busy && !p.confirming : fallback === "busy");
|
|
336
|
+
// M-3757: Claude's usage-credits prompt in the standard layout: the question, one sentence on the bill, Claude's own
|
|
337
|
+
// words folded, then its choices (named by what they do) and Open chat.
|
|
338
|
+
if (ucView) return html`<article data-trust="permission" class="n-item n-usage-credits">
|
|
339
|
+
<span class="n-icon"><${Icon} name=${ICON[item.type] || "alert"} size=${18} /></span>
|
|
340
|
+
<div class="n-body">
|
|
341
|
+
<div class="n-title"><strong>${usageCreditsTitle(ucView, { named: false })}</strong><span class="n-age">${age(item.since, nowMs)}</span></div>
|
|
342
|
+
<p class="n-detail">${usageCreditsDetail(ucView)}</p>
|
|
343
|
+
<details class="n-raw"><summary>${showRawLabel()}</summary><pre class="n-raw-text">${ucView.raw}</pre></details>
|
|
344
|
+
<div class="n-actions">
|
|
345
|
+
${shownActions.filter((a) => !a.input).map((a) => html`<button key=${a.id} type="button" class=${`btn btn-sm${kindClass(a.kind)}`}
|
|
346
|
+
disabled=${promptBusy} onClick=${() => answer(a.id)}>${answering ? tn("answering") : a.label}</button>`)}
|
|
347
|
+
${item.instance ? html`<a class="btn btn-sm btn-ghost" href=${chatPath(item.instance)}>${tn("open")}</a>` : null}
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</article>`;
|
|
331
351
|
return html`<article data-trust="permission" class=${`n-item${BAD.has(item.reason) ? " bad" : ""}`}>
|
|
332
352
|
<span class="n-icon"><${Icon} name=${ICON[item.type] || "alert"} size=${18} /></span>
|
|
333
353
|
<div class="n-body">
|
|
@@ -340,11 +360,11 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
340
360
|
${item.type==='host'?(item.hostAlert?html`<${HostAlertActions} record=${item.hostAlert}/>`:html`<a class="btn btn-sm" href=${fleetPath('host-health')}>${hostAlertText('open')}</a>`):null}
|
|
341
361
|
<div class="n-actions">
|
|
342
362
|
${item.type === "prompt" && Array.isArray(item.actions) ? item.actions.filter((a) => !a.input).map((a) => html`<button key=${a.id} type="button" class="btn btn-sm"
|
|
343
|
-
disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy && !p.confirming : fallback === "busy") ? tn("answering") : a.label}</button>`) : null}
|
|
363
|
+
disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy && !p.confirming : fallback === "busy") ? tn("answering") : a.label}${a.hint ? html`<span class="btn-hint">${a.hint}</span>` : null}</button>`) : null}
|
|
344
364
|
${item.type === "hub" && item.hubRetry ? html`<button type="button" class="btn btn-sm btn-primary" disabled=${!!hubAck || !!closeAck} onClick=${retryHub}>
|
|
345
365
|
<${Icon} name="restart" size=${14} />${hubAck === "busy" ? tn("hubRetrying") : tn("hubRetry")}</button>` : null}
|
|
346
366
|
${item.type === "hub" && item.hubClose ? html`<button type="button" class="btn btn-sm hub-close" disabled=${!!closeAck || !!hubAck} onClick=${closeHub}>${tn(closeAck === "busy" ? "hubClosing" : "hubClose")}</button>` : null}
|
|
347
|
-
${item.type === "delivery" || item.type === "missed" ? html`<button type="button" class="btn btn-sm" disabled=${!!ack} onClick=${acknowledge}>
|
|
367
|
+
${item.type === "delivery" || item.type === "missed" || item.reason === "mcp_missing" ? html`<button type="button" class="btn btn-sm" disabled=${!!ack} onClick=${acknowledge}>
|
|
348
368
|
<${Icon} name="check" size=${14} />${ack === "busy" ? tn("acknowledging") : tn("acknowledge")}</button>` : null}
|
|
349
369
|
${(item.reason === "auth_paused" || item.reason === "backend_signin") && item.signIn && signInOffered() ? html`<button type="button" class="btn btn-sm btn-primary" onClick=${() => openSignIn(item.signIn)}>${tn("signIn")}</button>` : null}
|
|
350
370
|
${item.type === "task" && item.card ? html`<a class="btn btn-sm" href=${`/ui/fleet?card=${encodeURIComponent(item.card.code)}`}>${tn("openCard")}</a>` : null}
|