@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,8 @@
|
|
|
9
9
|
// from the same hand is one line "×3"); and a day change is a thin separator.
|
|
10
10
|
// The comment box completes `@` with the fleet's instance names: it only types `@<instance name>` into the text; what an
|
|
11
11
|
// @ does to that instance is the board's business (it reads the same plain text), not this box's.
|
|
12
|
+
// A comment written for an instance carries its status under it (fleet-task-wake.js: sent, read, working, replied — or why not), and a
|
|
13
|
+
// comment that is new for this person is tagged "New" until they leave the card (task-unread.js).
|
|
12
14
|
// No style attribute anywhere (the CSP).
|
|
13
15
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
14
16
|
import { lang, t } from "/assets/app-i18n.js";
|
|
@@ -16,18 +18,24 @@ import "/assets/chat-render.js";
|
|
|
16
18
|
import "/assets/chat-strings.js";
|
|
17
19
|
import { Icon } from "/assets/ui-icons.js";
|
|
18
20
|
import { BoardOffNote, boardOffTargets, relTime } from "./fleet-task-common.js";
|
|
19
|
-
import { AgentTag } from "./fleet-task-run.js";
|
|
21
|
+
import { AgentTag, inProgressBy, instanceStates, readyOpenBy } from "./fleet-task-run.js";
|
|
22
|
+
import { WakeStatus, wakeNames } from "./fleet-task-wake.js";
|
|
23
|
+
import { BatonEntry, batonRun, handoffNames, startedAfter } from "./fleet-task-flow.js";
|
|
24
|
+
import { appStore } from "/assets/app-store.js";
|
|
20
25
|
import { WhoCard } from "./fleet-task-owner.js";
|
|
21
26
|
import { insertAtTrigger, triggerAt, withoutCode } from "./trigger-complete.js";
|
|
22
27
|
import { dateTimeText } from "/assets/clock-text.js";
|
|
23
28
|
import { FileList } from "./fleet-task-files.js";
|
|
24
|
-
import { MdBody, commentHtml, decorateCode, storedWrap } from "./fleet-task-md.js";
|
|
29
|
+
import { MdBody, commentHtml, copyText, decorateCode, storedWrap } from "./fleet-task-md.js";
|
|
30
|
+
import { CommentTools, EditBox, ReactionBar, ReactionPicker, RecipientChip, commentInHash, commentUrl, defaultRecipient, recipientGroups, rootOf, threadize } from "./fleet-task-thread.js";
|
|
31
|
+
import { toast } from "/assets/ui-toast.js";
|
|
32
|
+
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
25
33
|
|
|
26
34
|
// The Markdown pieces moved to fleet-task-md.js (the card's fields draw them too); these stay importable from here.
|
|
27
35
|
export { MdBody, commentHtml, decorateCode };
|
|
28
36
|
|
|
29
37
|
export const TIMELINE_FILTERS = ["all", "comments", "log", "history"];
|
|
30
|
-
const RANK = { event: 0, log: 1, comment: 2 }; // at one instant: the move first, then the words that came with it
|
|
38
|
+
const RANK = { event: 0, baton: 0, log: 1, comment: 2 }; // at one instant: the move first, then the words that came with it
|
|
31
39
|
|
|
32
40
|
const when = (iso) => { const n = Date.parse(iso); return Number.isFinite(n) ? n : 0; };
|
|
33
41
|
|
|
@@ -40,19 +48,27 @@ const when = (iso) => { const n = Date.parse(iso); return Number.isFinite(n) ? n
|
|
|
40
48
|
export function timelineOf(detail) {
|
|
41
49
|
const out = [];
|
|
42
50
|
const files = (detail && detail.attachments) || [];
|
|
43
|
-
|
|
51
|
+
// A comment also carries what the threads add (docs/design/task-board.md, "Comment threads"): its number, the comment it answers,
|
|
52
|
+
// an edit, a deletion, a resolved thread and its reactions — each only when the board sent it (an older host sends none).
|
|
53
|
+
for (const e of (detail && detail.comments) || []) out.push({ key: `c${e.id}`, type: "comment", id: e.id, at: e.at, who: e.author, by: e.authorKind || "", text: e.text, kind: e.kind, authorKind: e.authorKind, files: files.filter((f) => f.entryId === e.id),
|
|
54
|
+
...(e.parentId !== undefined ? { parentId: e.parentId } : {}), ...(e.editedAt ? { editedAt: e.editedAt } : {}), ...(e.deleted ? { deleted: e.deleted } : {}), ...(e.resolved ? { resolved: e.resolved } : {}), ...(e.reactions ? { reactions: e.reactions } : {}), ...(typeof e.mine === "boolean" ? { mine: e.mine } : {}), ...(e.wakes ? { wakes: e.wakes } : {}) });
|
|
44
55
|
for (const e of (detail && detail.logs) || []) out.push({ key: `l${e.id}`, type: "log", at: e.at, who: e.author, by: e.authorKind || "", text: e.text });
|
|
45
56
|
for (const ev of (detail && detail.history) || []) {
|
|
46
57
|
if (ev.type === "commented" || ev.type === "reordered") continue;
|
|
47
58
|
if (ev.type === "logged" && !(ev.data && ev.data.watchers)) continue; // a log entry is shown as itself; a watcher change has none (the board writes the event only)
|
|
48
59
|
out.push({ key: `h${ev.id}`, type: "event", at: ev.at, who: ev.actor, by: ev.actorKind || "", ev });
|
|
49
60
|
}
|
|
61
|
+
// A main task's activity also holds what happened to its sub tasks: each move of one (a history line with the sub task's number) and
|
|
62
|
+
// each handoff — "S-1 done → handed to dev to start S-2" and how far it got (fleet-task-flow.js; the handoffs only for a session that can write).
|
|
63
|
+
for (const e of (detail && detail.subEvents) || []) out.push({ key: `s${e.id}`, type: "event", at: e.at, who: e.actor, by: e.actorKind || "", ev: { type: "moved", data: e.data || {}, sub: { id: e.card, title: e.title } } });
|
|
64
|
+
for (const h of (detail && detail.handoffs) || []) out.push({ key: `b${h.id !== undefined ? h.id : `${h.card}-${h.to}-${h.at}`}`, type: "baton", at: h.at, who: h.to, by: "", h, started: startedAfter(h, detail) });
|
|
50
65
|
return out.map((e, i) => ({ e, i })).sort((a, b) => when(a.e.at) - when(b.e.at) || RANK[a.e.type] - RANK[b.e.type] || a.i - b.i).map((x) => x.e);
|
|
51
66
|
}
|
|
52
67
|
|
|
53
68
|
/** The entries a filter shows: everything, or one kind of them. */
|
|
54
69
|
export function timelineShown(entries, filter) {
|
|
55
|
-
|
|
70
|
+
if (filter === "history") return entries.filter((e) => e.type === "event" || e.type === "baton");
|
|
71
|
+
const type = { comments: "comment", log: "log" }[filter];
|
|
56
72
|
return type ? entries.filter((e) => e.type === type) : entries;
|
|
57
73
|
}
|
|
58
74
|
|
|
@@ -149,21 +165,35 @@ const timeOf = (entry) => html`<time class="muted tl-time" dateTime=${entry.at}
|
|
|
149
165
|
* with an icon (a status change's is the status's), the sentence and the time, no box. `who`: the board's cards and the project's
|
|
150
166
|
* lead, for the avatar's info card.
|
|
151
167
|
*/
|
|
152
|
-
function Entry({ entry, describe, who }) {
|
|
168
|
+
function Entry({ entry, describe, who, ctx = null, reply = false, root = false, resolved = false }) {
|
|
153
169
|
const time = timeOf(entry);
|
|
154
170
|
const agent = entry.by === "instance";
|
|
155
171
|
const mark = agent ? " by-agent" : "";
|
|
156
172
|
const kind = entry.by === "person" ? "person" : entry.by === "instance" ? "instance" : entry.by ? "none" : "";
|
|
157
173
|
const author = html`<${WhoCard} name=${entry.who} kind=${kind} presence=${agent} cards=${who && who.cards} lead=${who && who.lead} />`;
|
|
158
174
|
if (entry.type === "comment") {
|
|
175
|
+
const here = ctx ? { ...ctx, root, resolved } : { writable: false, viewer: null, root: false };
|
|
176
|
+
const lit = (here.flash === entry.id ? " tl-flash" : "") + (here.fresh && here.fresh.has(entry.id) ? " tl-unread" : "");
|
|
177
|
+
// A deleted comment stays as a line where it was, so the replies under it still hang from something.
|
|
178
|
+
if (entry.deleted) {
|
|
179
|
+
return html`<li id=${`c${entry.id}`} data-comment=${entry.id} class=${`tl-item tl-card tl-comment tl-deleted${reply ? " tl-reply" : ""}${lit}`}>
|
|
180
|
+
<p class="tl-gone muted"><${Icon} name="trash" size=${14} /><span>${t("taskthread.deleted")}</span>${time}</p></li>`;
|
|
181
|
+
}
|
|
159
182
|
const body = commentHtml(entry.text);
|
|
160
|
-
|
|
183
|
+
const editing = here.editing === entry.id && ctx;
|
|
184
|
+
return html`<li id=${entry.id !== undefined ? `c${entry.id}` : undefined} data-comment=${entry.id} class=${`tl-item tl-card tl-comment${entry.authorKind === "person" ? " person" : ""}${mark}${reply ? " tl-reply" : ""}${lit}`}>
|
|
161
185
|
<div class="tl-head">${author}${agent ? html`<${AgentTag} />` : null}
|
|
162
186
|
${entry.kind === "reject" ? html`<span class="tb-tag st-blocked">${t("taskcard.rejectTag")}</span>` : null}
|
|
163
187
|
${entry.kind === "approve" ? html`<span class="tb-tag st-done">${t("taskcard.approveTag")}</span>` : null}
|
|
164
|
-
${
|
|
165
|
-
|
|
166
|
-
|
|
188
|
+
${here.fresh && here.fresh.has(entry.id) ? html`<span class="tb-tag tl-new" title=${t("taskwake.newTip")}>${t("taskwake.newMark")}</span>` : null}
|
|
189
|
+
${time}${entry.editedAt ? html`<span class="muted tl-edited" title=${t("taskthread.editedTip", fullTime(entry.editedAt))}>${t("taskthread.edited")}</span>` : null}
|
|
190
|
+
${entry.id !== undefined && ctx ? html`<${CommentTools} entry=${entry} ctx=${here} act=${(name) => ctx.act(entry, name)} />` : null}</div>
|
|
191
|
+
${editing ? html`<${EditBox} entry=${entry} onSave=${(text) => ctx.edit(entry, text)} onCancel=${() => ctx.stop("editing")} />`
|
|
192
|
+
: body ? html`<${MdBody} body=${body} />` : html`<div class="tl-body">${entry.text}</div>`}
|
|
193
|
+
${entry.files && entry.files.length ? html`<${FileList} files=${entry.files} cls="tl-files" />` : null}
|
|
194
|
+
${ctx && here.wake && entry.wakes ? html`<${WakeStatus} entry=${entry} comments=${here.wake.comments} states=${here.wake.states} onOpen=${here.wake.open} />` : null}
|
|
195
|
+
${ctx && entry.id !== undefined ? html`<${ReactionBar} entry=${entry} ctx=${here} onReact=${(emoji, on) => ctx.react(entry, emoji, on)} />` : null}
|
|
196
|
+
${ctx && here.picking === entry.id ? html`<${ReactionPicker} onPick=${(emoji) => ctx.react(entry, emoji, true)} onClose=${() => ctx.stop("picking")} />` : null}</li>`;
|
|
167
197
|
}
|
|
168
198
|
if (entry.type === "log") {
|
|
169
199
|
return html`<li class=${`tl-item tl-card tl-log${mark}`}>
|
|
@@ -185,14 +215,27 @@ function Run({ run, describe, open, onToggle }) {
|
|
|
185
215
|
</li>`;
|
|
186
216
|
}
|
|
187
217
|
|
|
188
|
-
|
|
189
|
-
|
|
218
|
+
const brief = (text, max = 80) => { const chars = [...String(text || "").replace(/\s+/g, " ").trim()]; return chars.length > max ? `${chars.slice(0, max).join("")}…` : chars.join(""); };
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The activity stream with its filter (all, comments, progress log, history). `describe(ev)` words a history event.
|
|
222
|
+
* Comment threads (docs/design/task-board.md, "Comment threads"): `thread` — { writable, viewer, send, edit, react, resolve,
|
|
223
|
+
* remove } — makes each comment's ⋯ menu and reactions live; without it (an older host) comments read as they always did. A reply
|
|
224
|
+
* is drawn under its thread's first comment, indented; a resolved thread folds into one line that opens again. `names`: the fleet's
|
|
225
|
+
* instances [{ name, off }] for the recipient chip of an inline reply. `fresh`: the numbers of the comments that are new for this person (tagged).
|
|
226
|
+
*/
|
|
227
|
+
export function Timeline({ detail, describe, cards = [], lead = null, thread = null, names = [], fresh = [] }) {
|
|
190
228
|
const [filter, setFilter] = useState("all");
|
|
191
229
|
const [toggled, setToggled] = useState({});
|
|
230
|
+
const [ui, setUi] = useState({ replying: null, editing: null, picking: null });
|
|
231
|
+
const [flash, setFlash] = useState(null);
|
|
192
232
|
const all = timelineOf(detail);
|
|
193
|
-
|
|
233
|
+
const comments = all.filter((e) => e.type === "comment");
|
|
234
|
+
const byId = new Map(comments.filter((e) => e.id !== undefined).map((e) => [e.id, e]));
|
|
235
|
+
const card = detail && detail.card;
|
|
236
|
+
// The number of entries on a filter button is the number of lines the list shows for it: a run of equal history lines is one.
|
|
194
237
|
const count = (f) => collapseEvents(timelineShown(all, f), describe).length;
|
|
195
|
-
const shown = collapseEvents(timelineShown(all, filter), describe);
|
|
238
|
+
const shown = threadize(collapseEvents(timelineShown(all, filter), describe), comments);
|
|
196
239
|
// A day change is a separator — only when the stream spans more than one day (one day needs no heading); a run never crosses it.
|
|
197
240
|
const days = new Set(shown.map((e) => dayKey(e.at)).filter(Boolean));
|
|
198
241
|
const parts = [];
|
|
@@ -204,11 +247,93 @@ export function Timeline({ detail, describe, cards = [], lead = null }) {
|
|
|
204
247
|
parts[parts.length - 1].entries.push(e);
|
|
205
248
|
}
|
|
206
249
|
const who = { cards, lead };
|
|
250
|
+
|
|
251
|
+
// A link to a comment (`#c42`) opens the card, scrolls to that comment and lights it for a moment (a resolved thread opens first).
|
|
252
|
+
const target = commentInHash(globalThis.location && globalThis.location.hash);
|
|
253
|
+
const landed = useRef(null);
|
|
254
|
+
useEffect(() => {
|
|
255
|
+
if (target === null || !card || landed.current === `${card.id}${target}`) return undefined;
|
|
256
|
+
const hit = byId.get(target);
|
|
257
|
+
if (!hit) return undefined;
|
|
258
|
+
landed.current = `${card.id}${target}`;
|
|
259
|
+
const top = rootOf(hit, byId);
|
|
260
|
+
if (top.resolved) setToggled((cur) => ({ ...cur, [`t${top.id}`]: true }));
|
|
261
|
+
setFlash(target);
|
|
262
|
+
const timer = setTimeout(() => setFlash(null), 2400);
|
|
263
|
+
return () => clearTimeout(timer);
|
|
264
|
+
}, [target, card && card.id, comments.length]);
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
if (flash === null) return;
|
|
267
|
+
const el = document.getElementById(`c${flash}`);
|
|
268
|
+
if (el && typeof el.scrollIntoView === "function") el.scrollIntoView({ block: "center" });
|
|
269
|
+
}, [flash]);
|
|
270
|
+
|
|
271
|
+
const viewer = thread ? thread.viewer || null : null;
|
|
272
|
+
const copy = async (text, doneKey) => toast(await copyText(text) ? t(doneKey) : t("taskthread.copyFailed"), true);
|
|
273
|
+
// Where each comment written for an instance stands (fleet-task-wake.js): the instance's state is the page's own (the card's "Running" inference);
|
|
274
|
+
// read at each draw — the card page draws again with the store.
|
|
275
|
+
const wakeStates = thread && card ? instanceStates(appStore.get(), wakeNames(detail)) : null;
|
|
276
|
+
// …and where a handoff stands: the same, for the instances it was made to (the page's own inference: offline, paused, working).
|
|
277
|
+
const flowStates = card ? instanceStates(appStore.get(), handoffNames(detail)) : null;
|
|
278
|
+
// …and, for a hand-over whose card is still open but whose agent is running on it, the running line the sub task's row says (not claimed).
|
|
279
|
+
const board = { doing: inProgressBy(cards), ready: readyOpenBy(cards) };
|
|
280
|
+
const batonRunOf = (entry) => (entry.started || !card ? null : batonRun(entry.h, detail, board.doing, board.ready));
|
|
281
|
+
const jump = (id) => { setFlash(id); setTimeout(() => setFlash((cur) => (cur === id ? null : cur)), 2400); };
|
|
282
|
+
const ctx = thread && card ? {
|
|
283
|
+
writable: !!thread.writable, viewer, picking: ui.picking, editing: ui.editing, flash, fresh: fresh.length ? new Set(fresh) : null,
|
|
284
|
+
wake: { comments, states: wakeStates, open: jump },
|
|
285
|
+
stop: (key) => setUi((u) => ({ ...u, [key]: null })),
|
|
286
|
+
edit: (entry, text) => thread.edit(entry, text),
|
|
287
|
+
react: (entry, emoji, on) => { setUi((u) => ({ ...u, picking: null })); return thread.react(entry, emoji, on); },
|
|
288
|
+
act: (entry, name) => {
|
|
289
|
+
if (name === "reply") setUi((u) => ({ ...u, replying: entry.id, editing: null, picking: null }));
|
|
290
|
+
else if (name === "react") setUi((u) => ({ ...u, picking: u.picking === entry.id ? null : entry.id, editing: null }));
|
|
291
|
+
else if (name === "edit") setUi((u) => ({ ...u, editing: entry.id, picking: null }));
|
|
292
|
+
else if (name === "resolve") { const now = !entry.resolved; setToggled((cur) => ({ ...cur, [`t${entry.id}`]: !now })); void thread.resolve(entry, now); }
|
|
293
|
+
else if (name === "copy") void copy(entry.text, "taskthread.copied");
|
|
294
|
+
else if (name === "link") void copy(commentUrl(globalThis.location.href, card.id, entry.id), "taskthread.linkCopied");
|
|
295
|
+
else if (name === "delete") {
|
|
296
|
+
void confirmDialog({ title: t("taskthread.deleteTitle"), message: t("taskthread.deleteMsg"), confirmLabel: t("taskthread.delete"), danger: true }).then((yes) => { if (yes) void thread.remove(entry); });
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
} : null;
|
|
300
|
+
|
|
301
|
+
/** A comment, with the replies under it (and the box that answers one); a resolved thread is one line until it is opened. */
|
|
302
|
+
function commentRow(entry) {
|
|
303
|
+
if (!ctx) return html`<${Entry} key=${entry.key} entry=${entry} describe=${describe} who=${who} />`;
|
|
304
|
+
const replies = entry.replies || [];
|
|
305
|
+
const first = entry.parentId === undefined;
|
|
306
|
+
const open = toggled[`t${entry.id}`] === true;
|
|
307
|
+
if (entry.resolved && !entry.deleted && !open) {
|
|
308
|
+
const n = replies.length;
|
|
309
|
+
return html`<li key=${entry.key} class="tl-item tl-resolved"><button type="button" class="tl-more tl-resolved-btn" aria-expanded="false" title=${t("taskthread.showThread")}
|
|
310
|
+
onClick=${() => setToggled((cur) => ({ ...cur, [`t${entry.id}`]: true }))}>
|
|
311
|
+
<span class="tl-mark" aria-hidden="true"><${Icon} name="check" size=${14} /></span>
|
|
312
|
+
<span class="tl-resolved-text"><b>${t("taskthread.resolved")}</b> · ${entry.resolved.by ? t("taskthread.resolvedBy", entry.resolved.by) : ""} · ${entry.who}: ${brief(entry.text)}${n ? ` · ${n === 1 ? t("taskthread.replyOne") : t("taskthread.replyCount", n)}` : ""}</span></button></li>`;
|
|
313
|
+
}
|
|
314
|
+
const replyingHere = ui.replying !== null && (ui.replying === entry.id || replies.some((r) => r.id === ui.replying));
|
|
315
|
+
if (!replies.length && !replyingHere && !entry.resolved) return html`<${Entry} key=${entry.key} entry=${entry} describe=${describe} who=${who} ctx=${ctx} root=${first} />`;
|
|
316
|
+
const target = replyingHere ? byId.get(ui.replying) : null;
|
|
317
|
+
const groups = replyingHere ? recipientGroups({ card, detail, fleet: names }) : [];
|
|
318
|
+
return html`<li key=${entry.key} class="tl-item tl-thread">
|
|
319
|
+
${entry.resolved ? html`<div class="tl-resolved-note muted"><${Icon} name="check" size=${14} /><span>${entry.resolved.by ? t("taskthread.resolvedBy", entry.resolved.by) : t("taskthread.resolved")}</span>
|
|
320
|
+
<button type="button" class="tb-link" onClick=${() => setToggled((cur) => ({ ...cur, [`t${entry.id}`]: false }))}>${t("taskthread.hideThread")}</button></div>` : null}
|
|
321
|
+
<ol class="tl-thread-list">
|
|
322
|
+
<${Entry} entry=${entry} describe=${describe} who=${who} ctx=${ctx} root=${first} resolved=${!!entry.resolved} />
|
|
323
|
+
${replies.map((r) => html`<${Entry} key=${r.key} entry=${r} describe=${describe} who=${who} ctx=${ctx} reply />`)}
|
|
324
|
+
${target ? html`<li class="tl-reply-box" key="reply-box">
|
|
325
|
+
<${Composer} variant="reply" autoFocus names=${names} placeholder=${t("taskthread.replyTo", target.who)} recipients=${{ groups, initial: defaultRecipient({ card, reply: target, fleet: names }) }}
|
|
326
|
+
onCancel=${() => ctx.stop("replying")} onSend=${async (text, to) => { const r = await thread.send(text, { replyTo: target.id, to: to ? [to] : [] }); if (r === "ok") ctx.stop("replying"); return r; }} /></li>` : null}
|
|
327
|
+
</ol></li>`;
|
|
328
|
+
}
|
|
329
|
+
|
|
207
330
|
const rows = [];
|
|
208
331
|
for (const part of parts) {
|
|
209
332
|
if (part.day) rows.push(html`<li key=${`d${dayKey(part.day)}`} class="tl-day" role="presentation"><span>${dayLabel(part.day)}</span></li>`);
|
|
210
333
|
for (const item of streamOf(part.entries, filter === "all")) {
|
|
211
|
-
if (item.kind === "card") rows.push(
|
|
334
|
+
if (item.kind === "card") rows.push(item.entry.type === "comment" ? commentRow(item.entry)
|
|
335
|
+
: item.entry.type === "baton" ? html`<${BatonEntry} key=${item.entry.key} entry=${item.entry} states=${flowStates} runFor=${batonRunOf} />`
|
|
336
|
+
: html`<${Entry} key=${item.entry.key} entry=${item.entry} describe=${describe} who=${who} />`);
|
|
212
337
|
else {
|
|
213
338
|
const open = item.fold ? toggled[item.key] === true : true;
|
|
214
339
|
rows.push(html`<${Run} key=${item.key} run=${item} describe=${describe} open=${open} onToggle=${() => setToggled((cur) => ({ ...cur, [item.key]: !open }))} />`);
|
|
@@ -229,18 +354,25 @@ export function Timeline({ detail, describe, cards = [], lead = null }) {
|
|
|
229
354
|
/**
|
|
230
355
|
* The comment box: Ctrl+Enter or Send posts it; typing `@` offers the instance names (arrows and Enter or Tab choose, Esc
|
|
231
356
|
* closes the list, not the box). `names`: [{ name, off }] — an instance with the task board off is listed, not choosable; one the
|
|
232
|
-
* comment would reach (the
|
|
233
|
-
* `
|
|
357
|
+
* comment would reach (the chosen recipient, an @name in the text) with the board off is named under the box, with where to turn it on.
|
|
358
|
+
* `recipients` { groups, initial, held }: the chip under the box says whom the comment is for ("dev · starts when sent", or "No agent
|
|
359
|
+
* notified") and lists the others; it starts as `initial` and follows it until the person chooses. `held`: `initial` is the assignee of a
|
|
360
|
+
* card that still waits on another card, so the chip says it is not woken until the card is ready, and nothing is sent about recipients
|
|
361
|
+
* until the person chooses. `onSend(text, to, held)` resolves "ok" for the text to clear; `to` is the chosen instance's name or null,
|
|
362
|
+
* `held` true when the person did not choose and the chip is held (send no recipient list). `variant: "reply"`: the box under a thread (Cancel, focused).
|
|
234
363
|
*/
|
|
235
|
-
export function Composer({ placeholder, names, assignee, onSend }) {
|
|
364
|
+
export function Composer({ placeholder, names, assignee, onSend, recipients = null, variant = "", autoFocus = false, onCancel = null }) {
|
|
236
365
|
const [text, setText] = useState("");
|
|
237
366
|
const [caret, setCaret] = useState(0);
|
|
238
367
|
const [hidden, setHidden] = useState(false);
|
|
239
368
|
const [active, setActive] = useState(0);
|
|
240
369
|
const [sending, setSending] = useState(false);
|
|
370
|
+
const [chosen, setChosen] = useState(null); // null: the person has not chosen — the chip follows the card's default
|
|
241
371
|
const busy = useRef(false);
|
|
242
372
|
const box = useRef(null);
|
|
243
373
|
const pending = useRef(null); // where the caret goes once the inserted name is in the box
|
|
374
|
+
const to = recipients ? (chosen ? chosen.name : recipients.initial) : undefined;
|
|
375
|
+
const held = !!recipients && !chosen && !!recipients.held;
|
|
244
376
|
const m = hidden ? null : mentionAt(text, caret);
|
|
245
377
|
const found = m ? mentionMatches(names.map((n) => n.name), m.query).map((n) => names.find((x) => x.name === n)) : [];
|
|
246
378
|
const open = found.length > 0;
|
|
@@ -251,6 +383,7 @@ export function Composer({ placeholder, names, assignee, onSend }) {
|
|
|
251
383
|
pending.current = null;
|
|
252
384
|
try { box.current.focus(); box.current.setSelectionRange(c, c); } catch { /* no selection API */ }
|
|
253
385
|
});
|
|
386
|
+
useEffect(() => { if (autoFocus && box.current) { try { box.current.focus({ preventScroll: false }); } catch { /* no focus API */ } } }, []);
|
|
254
387
|
const note = (e) => setCaret(e.target.selectionStart ?? e.target.value.length);
|
|
255
388
|
function choose(item) {
|
|
256
389
|
if (!item || item.off || !m) return;
|
|
@@ -263,28 +396,35 @@ export function Composer({ placeholder, names, assignee, onSend }) {
|
|
|
263
396
|
if (!text.trim() || busy.current) return;
|
|
264
397
|
busy.current = true;
|
|
265
398
|
setSending(true);
|
|
266
|
-
try { if ((await onSend(text.trim())) === "ok") { setText(""); setCaret(0); } } finally { setSending(false); busy.current = false; }
|
|
399
|
+
try { if ((await onSend(text.trim(), to === undefined ? undefined : to, held)) === "ok") { setText(""); setCaret(0); } } finally { setSending(false); busy.current = false; }
|
|
267
400
|
}
|
|
268
401
|
function onKey(e) {
|
|
269
402
|
if (open && (e.key === "ArrowDown" || e.key === "ArrowUp")) { e.preventDefault(); setActive((i) => (i + (e.key === "ArrowDown" ? 1 : found.length - 1)) % found.length); return; }
|
|
270
403
|
if (open && (e.key === "Enter" || e.key === "Tab") && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.isComposing) {
|
|
271
404
|
if (found[active] && !found[active].off) { e.preventDefault(); choose(found[active]); return; }
|
|
272
405
|
}
|
|
273
|
-
if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); if (open) setHidden(true); else e.currentTarget.blur(); return; }
|
|
406
|
+
if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); if (open) setHidden(true); else if (onCancel) onCancel(); else e.currentTarget.blur(); return; }
|
|
274
407
|
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); void send(); }
|
|
275
408
|
}
|
|
276
|
-
|
|
277
|
-
|
|
409
|
+
// The card's assignee with the board off is named before anything is typed (that is why the chip starts at nobody) — until the person
|
|
410
|
+
// chooses someone else, or nobody; an @name in the words with the board off is named as it is typed.
|
|
411
|
+
return html`<${BoardOffNote} names=${boardOffTargets(names, chosen ? chosen.name : assignee, text)} textKey="tasks.boardOffCommentNote" />
|
|
412
|
+
<div class=${`tc-composer${variant ? ` tc-${variant}` : ""}`}>
|
|
278
413
|
<div class="tc-compose-box">
|
|
279
414
|
${open ? html`<ul class="tc-mentions" role="listbox" aria-label=${t("taskcard.mentionList")}>${found.map((n, i) => html`<li key=${n.name} role="option" aria-selected=${i === active ? "true" : "false"} class=${i === active ? "active" : ""}>
|
|
280
415
|
<button type="button" tabindex="-1" disabled=${!!n.off} title=${n.off ? t("tasks.boardOffHint") : undefined}
|
|
281
416
|
onPointerDown=${(e) => e.preventDefault()} onClick=${() => choose(n)}>
|
|
282
417
|
<span class="tc-mention-name">@${n.name}</span>${n.off ? html`<span class="muted">${t("taskcard.boardOffShort")}</span>` : null}</button></li>`)}</ul>` : null}
|
|
283
|
-
<textarea ref=${box} rows
|
|
418
|
+
<textarea ref=${box} rows=${variant === "reply" ? 2 : 3} value=${text} placeholder=${placeholder} aria-label=${t("taskcard.commentHint")}
|
|
284
419
|
aria-autocomplete="list" aria-expanded=${open ? "true" : "false"}
|
|
285
420
|
onInput=${(e) => { setText(e.target.value); setHidden(false); note(e); }} onClick=${note} onKeyUp=${(e) => { if (/^(Arrow|Home$|End$)/.test(String(e.key || ""))) note(e); }}
|
|
286
421
|
onKeyDown=${onKey}></textarea>
|
|
287
422
|
</div>
|
|
288
|
-
<
|
|
423
|
+
<div class="tc-compose-foot">
|
|
424
|
+
${recipients ? html`<${RecipientChip} groups=${recipients.groups} value=${to} held=${held} onChange=${(name) => setChosen({ name })} />` : null}
|
|
425
|
+
<span class="tc-compose-actions">
|
|
426
|
+
${onCancel ? html`<button type="button" class="btn btn-sm" onClick=${onCancel}>${t("taskthread.cancel")}</button>` : null}
|
|
427
|
+
<button type="button" class="btn btn-primary btn-sm" disabled=${sending || !text.trim()} onClick=${send}>${t("taskcard.send")}</button></span>
|
|
428
|
+
</div>
|
|
289
429
|
</div>`;
|
|
290
430
|
}
|
|
@@ -19,8 +19,12 @@ import { ProgressBar, StatusPill, Who, answerBlocked, askText, boardApi, errorTe
|
|
|
19
19
|
import { StepButtons, movesFor } from "./fleet-task-menu.js";
|
|
20
20
|
import { Checklist, EditableText, InlineTitle, PropChip, QuickAdd } from "./fleet-task-edit.js";
|
|
21
21
|
import { Composer, Timeline } from "./fleet-task-activity.js";
|
|
22
|
+
import { defaultRecipient, holdsRecipient, recipientGroups } from "./fleet-task-thread.js";
|
|
22
23
|
import { FilesField } from "./fleet-task-files.js";
|
|
23
|
-
import { AgentRun } from "./fleet-task-run.js";
|
|
24
|
+
import { AgentRun, RunMark, instanceStates, runOf } from "./fleet-task-run.js";
|
|
25
|
+
import { FlowLines, SubRows, flowContext, handoffsMoving, hasFlow, subLine } from "./fleet-task-flow.js";
|
|
26
|
+
import { wakesMoving } from "./fleet-task-wake.js";
|
|
27
|
+
import { openedCard } from "./task-unread.js";
|
|
24
28
|
import { LeaderRow, WatchersRow } from "./fleet-task-follow.js";
|
|
25
29
|
|
|
26
30
|
register("taskcard", {
|
|
@@ -83,7 +87,7 @@ register("taskcard", {
|
|
|
83
87
|
mentionList: "可提及的 Agent", boardOffShort: "任務板已關閉",
|
|
84
88
|
rowMoved: "把狀態從 {0} 改成 {1}", rowAssigned: "把負責人從 {0} 改成 {1}", activities: "{0} 項動態", activity1: "1 項動態",
|
|
85
89
|
logTip: "agent 或成員記下的一行工作紀錄,不是留言",
|
|
86
|
-
evCreated: "
|
|
90
|
+
evCreated: "建立卡片", evMoved: "{0}→{1}", evAuto: "(自動)", evAssigned: "負責人 {0}→{1}", evUpdated: "修改{0}", evCommented: "留言", evLogged: "紀錄:{0}", evWatchers: "修改關注者:{0}",
|
|
87
91
|
fTitle: "標題", fGoal: "目標", fScope: "範圍", fContext: "背景", fState: "目前狀態", fResult: "產出", fBlockedReason: "卡住原因", fSize: "大小",
|
|
88
92
|
fPriority: "優先級", fNeedsReview: "需要確認", fDependsOn: "相依", fAcceptance: "驗收條件", fProjectId: "專案",
|
|
89
93
|
position: "位置", moveUp: "往上移", moveDown: "往下移", properties: "屬性", crumbs: "這張卡的位置", backBoard: "回到看板", backList: "回到清單",
|
|
@@ -96,6 +100,8 @@ register("taskcard", {
|
|
|
96
100
|
},
|
|
97
101
|
});
|
|
98
102
|
|
|
103
|
+
/** While a comment's notice is on its way the page reads the card again this often (the stream's ping is the first way); a card is read this long after it is shown. */
|
|
104
|
+
const WAKE_POLL_MS = 5000, READ_AFTER_MS = 1200;
|
|
99
105
|
const LIMIT = { title: 100, goal: 300, scope: 600, context: 1000, state: 500, result: 1000, blockedReason: 400, acceptanceItems: 10 };
|
|
100
106
|
const PRIORITY_CHOICES = ["urgent", "high", "normal", "low"];
|
|
101
107
|
|
|
@@ -104,7 +110,7 @@ export function describeEvent(ev) {
|
|
|
104
110
|
const d = ev.data || {};
|
|
105
111
|
switch (ev.type) {
|
|
106
112
|
case "created": return t("taskcard.evCreated");
|
|
107
|
-
case "moved": return `${t("taskcard.evMoved", t(`tasks.${d.from}`), t(`tasks.${d.to}`))}${d.auto ? t("taskcard.evAuto") : ""}${d.reason ? `: ${d.reason}` : ""}`;
|
|
113
|
+
case "moved": return `${ev.sub ? `${ev.sub.id} · ` : ""}${t("taskcard.evMoved", t(`tasks.${d.from}`), t(`tasks.${d.to}`))}${d.auto ? t("taskcard.evAuto") : ""}${d.reason ? `: ${d.reason}` : ""}`;
|
|
108
114
|
case "assigned": return t("taskcard.evAssigned", d.from || "—", d.to || "—");
|
|
109
115
|
case "updated": return t("taskcard.evUpdated", Object.keys(d.changes || {}).map((k) => fieldName(k)).join(", "));
|
|
110
116
|
case "commented": return t("taskcard.evCommented");
|
|
@@ -118,7 +124,8 @@ export function describeEvent(ev) {
|
|
|
118
124
|
*/
|
|
119
125
|
export function describeRow(ev) {
|
|
120
126
|
const d = ev.data || {};
|
|
121
|
-
|
|
127
|
+
// A move of one of a main task's sub tasks (`ev.sub`, from the card read's `subEvents`) names it: "S-2 · changed status from To do to In progress".
|
|
128
|
+
if (ev.type === "moved") return `${ev.sub ? `${ev.sub.id} · ` : ""}${t("taskcard.rowMoved", t(`tasks.${d.from}`), t(`tasks.${d.to}`))}${d.auto ? t("taskcard.evAuto") : ""}${d.reason ? `: ${d.reason}` : ""}`;
|
|
122
129
|
if (ev.type === "assigned") return t("taskcard.rowAssigned", d.from || "—", d.to || "—");
|
|
123
130
|
return describeEvent(ev);
|
|
124
131
|
}
|
|
@@ -176,6 +183,11 @@ export function dispatcherItems(card, names, act) {
|
|
|
176
183
|
/** The value the page sends for a dispatcher choice. */
|
|
177
184
|
export const dispatcherValue = (v) => (v === "\u0000none" ? null : v === "\u0000me" ? { kind: "person" } : { kind: "instance", name: v });
|
|
178
185
|
|
|
186
|
+
/** The comment box's recipient chip for a card: the groups to list, the name it starts with, and whether that name is held back (the card still waits on another card). */
|
|
187
|
+
const recipientsOf = (card, detail, fleet) => {
|
|
188
|
+
const initial = defaultRecipient({ card, fleet });
|
|
189
|
+
return { groups: recipientGroups({ card, detail, fleet }), initial, held: holdsRecipient({ card, initial }) };
|
|
190
|
+
};
|
|
179
191
|
const radioItems = (list, current, label, act) => list.map((v) => ({ key: String(v), label: label(v), checked: current === v, onSelect: () => act(v) }));
|
|
180
192
|
|
|
181
193
|
// ── The page ──────────────────────────────────────────────
|
|
@@ -184,10 +196,10 @@ const radioItems = (list, current, label, act) => list.map((v) => ({ key: String
|
|
|
184
196
|
* `writable`: false over a read-only link (the card is shown, nothing on it changes). `place`: up and down in its column,
|
|
185
197
|
* for touch and keyboard (null when it cannot move). `steps`: the previous and next card the page showed, and where this
|
|
186
198
|
* one is among them (null: nowhere to step). `where`: the project's name for the breadcrumb (null: none). `back`: what
|
|
187
|
-
* Back says. `onBack` returns to the board or list. `doing`: how many cards each instance has in progress (fleet-task-run.js).
|
|
199
|
+
* Back says. `onBack` returns to the board or list. `doing`: how many cards each instance has in progress, `ready`: the open cards it could start (fleet-task-run.js).
|
|
188
200
|
*/
|
|
189
|
-
export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing = new Map(), writable = true, place = null, steps = null, where = null, back, onBack, onOpen, onStep, reloadBoard }) {
|
|
190
|
-
const { instances } = useStore(appStore);
|
|
201
|
+
export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing = new Map(), ready = new Map(), writable = true, place = null, steps = null, where = null, back, onBack, onOpen, onStep, reloadBoard }) {
|
|
202
|
+
const { instances, taskUnread } = useStore(appStore);
|
|
191
203
|
const [detail, setDetail] = useState(null);
|
|
192
204
|
const [missing, setMissing] = useState(false);
|
|
193
205
|
const seq = useRef(0);
|
|
@@ -211,6 +223,40 @@ export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing
|
|
|
211
223
|
}
|
|
212
224
|
}
|
|
213
225
|
useEffect(() => { void load(); }, [id, tick]);
|
|
226
|
+
// Where a comment stands moved (a notice was handed to delivery, delivered, read): the stream's `task_wakes` names the card, and the
|
|
227
|
+
// page reads it again (docs/design/task-board.md, "Comment status").
|
|
228
|
+
useEffect(() => {
|
|
229
|
+
const sub = appStore.get().streamOn;
|
|
230
|
+
if (typeof sub !== "function") return undefined;
|
|
231
|
+
let timer = null;
|
|
232
|
+
const off = sub("task_wakes", (d) => {
|
|
233
|
+
if (!d || !Array.isArray(d.ids) || !d.ids.includes(id)) return;
|
|
234
|
+
if (timer) clearTimeout(timer);
|
|
235
|
+
timer = setTimeout(() => { timer = null; void load(); }, 150);
|
|
236
|
+
});
|
|
237
|
+
return () => { off(); if (timer) clearTimeout(timer); };
|
|
238
|
+
}, [id]);
|
|
239
|
+
// …and, while a notice is still on its way, now and then on its own: a page that polls, or one that missed the ping, still moves.
|
|
240
|
+
const onTheWay = detail ? wakesMoving(detail) || handoffsMoving(detail) : false;
|
|
241
|
+
useEffect(() => {
|
|
242
|
+
if (!onTheWay) return undefined;
|
|
243
|
+
const timer = setInterval(() => { if (!document.hidden) void load(); }, WAKE_POLL_MS);
|
|
244
|
+
return () => clearInterval(timer);
|
|
245
|
+
}, [onTheWay, id]);
|
|
246
|
+
// What is new for this person on this card (task-unread.js): its comments are tagged "New" for as long as the card is open, and the
|
|
247
|
+
// card is read a moment after it is shown — at once if it was hidden when it came, as the tab is shown (a mark moves only forward).
|
|
248
|
+
const mine = taskUnread && taskUnread.enabled && taskUnread.cards ? taskUnread.cards[id] : null;
|
|
249
|
+
const [fresh, setFresh] = useState({ id, entries: [] });
|
|
250
|
+
const freshEntries = fresh.id === id ? fresh.entries : [];
|
|
251
|
+
useEffect(() => {
|
|
252
|
+
if (!mine) return undefined;
|
|
253
|
+
setFresh((f) => ({ id, entries: [...new Set([...(f.id === id ? f.entries : []), ...(Array.isArray(mine.entries) ? mine.entries : [])])] }));
|
|
254
|
+
const mark = () => { if (!document.hidden) void openedCard(id); };
|
|
255
|
+
const timer = setTimeout(mark, READ_AFTER_MS);
|
|
256
|
+
const onShown = () => mark();
|
|
257
|
+
document.addEventListener("visibilitychange", onShown);
|
|
258
|
+
return () => { clearTimeout(timer); document.removeEventListener("visibilitychange", onShown); };
|
|
259
|
+
}, [id, mine ? mine.n : 0, mine ? mine.at : ""]);
|
|
214
260
|
// The page takes the keyboard's place from the tile or row that opened it (once per card: later reads leave the focus be).
|
|
215
261
|
const head = useRef(null);
|
|
216
262
|
const focused = useRef(null);
|
|
@@ -296,6 +342,17 @@ export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing
|
|
|
296
342
|
const fleet = instances.map((i) => i.name);
|
|
297
343
|
const mentionNames = [...(fleet.includes(card.assignee) ? [card.assignee] : []), ...fleet.filter((n) => n !== card.assignee)].map((name) => ({ name, off: boardOff.includes(name) }));
|
|
298
344
|
|
|
345
|
+
// Comment threads: each is one write on one comment (the board's rules say who may), then the card and the board read again; a
|
|
346
|
+
// refusal is said in the page's words. `viewer` (the card read): who this page writes as — their own comments are theirs to edit.
|
|
347
|
+
const thread = {
|
|
348
|
+
writable, viewer: detail.viewer || null,
|
|
349
|
+
send: (text, extra) => run(() => boardApi.update(card.id, { comment: text, ...extra })),
|
|
350
|
+
edit: (entry, text) => run(() => boardApi.commentEdit(card.id, entry.id, text)),
|
|
351
|
+
react: (entry, emoji, on) => run(() => boardApi.commentReact(card.id, entry.id, emoji, on)),
|
|
352
|
+
resolve: (entry, resolved) => run(() => boardApi.commentResolve(card.id, entry.id, resolved)),
|
|
353
|
+
remove: (entry) => run(() => boardApi.commentDelete(card.id, entry.id)),
|
|
354
|
+
};
|
|
355
|
+
|
|
299
356
|
/** Who watches the card: no version (a watch is not an edit of the card), the card and the board read again after. */
|
|
300
357
|
const follow = (change) => run(() => boardApi.watchers(card.id, change));
|
|
301
358
|
|
|
@@ -365,17 +422,23 @@ export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing
|
|
|
365
422
|
<h3>${t("taskcard.subs")}</h3>
|
|
366
423
|
<div class="tc-field-body">
|
|
367
424
|
${prog ? html`<div class="tp-subs-head"><span class="tp-subs-count" title=${t("taskcard.subsDone", prog.done, prog.total)}>${prog.done} / ${prog.total}</span><${ProgressBar} progress=${prog} wide /></div>` : null}
|
|
368
|
-
${children.length ? html
|
|
369
|
-
<${StatusPill} status=${c.status} card=${c} /><span class="tb-code">${c.id}</span><span class="tc-child-title">${c.title}</span><span class="tb-who">${c.assignee || ""}</span></button></li>`)}</ul>` : null}
|
|
425
|
+
${children.length ? html`<${SubRows} children=${children} handoffs=${detail.handoffs} doing=${doing} ready=${ready} onOpen=${onOpen} />` : null}
|
|
370
426
|
${finished || !can ? null : html`<${QuickAdd} placeholder=${t("taskcard.quickAdd")} limit=${LIMIT.title} onAdd=${(title) => run(() => boardApi.create({ parent: card.id, title }))} />`}
|
|
371
427
|
</div>
|
|
372
428
|
</section>` : null;
|
|
373
429
|
|
|
430
|
+
// What the agents are doing on this card (fleet-task-flow.js): a card in progress whose assignee is working — or, for a main task, whose sub
|
|
431
|
+
// task's is — is "Running" beside its status; a main task's "Agent activity" lists what each sub task is doing, and a sub task waiting to
|
|
432
|
+
// start says where its hand-over stands.
|
|
433
|
+
const runNow = runOf(card, { states: instanceStates(appStore.get(), [card.assignee, ...children.map((c) => c.assignee)].filter(Boolean)), doing, ready }, children);
|
|
434
|
+
const flowOn = derived && !finished && hasFlow(children, detail.handoffs, doing, ready);
|
|
435
|
+
const flow = flowOn ? html`<${FlowLines} subs=${children} handoffs=${detail.handoffs} doing=${doing} ready=${ready} onOpen=${onOpen} />` : null;
|
|
436
|
+
const batonLine = !isMain && card.status === "open" ? subLine(card, flowContext([card], detail.handoffs, doing, ready)) : null;
|
|
374
437
|
return html`<div class="tp" ref=${root} data-card=${card.id}>
|
|
375
438
|
${bar({ parent, actions: html`${copyBtn}${blockBtn}${more}` })}
|
|
376
439
|
<div class="tp-grid">
|
|
377
440
|
<div class="tp-head">
|
|
378
|
-
<div class="tp-idrow"><span class="tb-code tp-code">${card.id}</span><${StatusPill} status=${card.status} card=${card} />${detail.archived ? html`<span class="tb-tag" title=${t("tasksArchive.tagTip", detail.archiveAfterDays ?? "")}>${t("tasksArchive.tag")}</span>` : null}
|
|
441
|
+
<div class="tp-idrow"><span class="tb-code tp-code">${card.id}</span><${StatusPill} status=${card.status} card=${card} /><${RunMark} run=${runNow} />${detail.archived ? html`<span class="tb-tag" title=${t("tasksArchive.tagTip", detail.archiveAfterDays ?? "")}>${t("tasksArchive.tag")}</span>` : null}
|
|
379
442
|
${derived && !finished ? html`<span class="tp-derived">${t("taskcard.followsSubs")}</span>` : null}</div>
|
|
380
443
|
<div class="tc-head" ref=${head} tabindex="-1" role="heading" aria-level="2">
|
|
381
444
|
${can ? html`<${InlineTitle} value=${card.title} version=${card.version} limit=${LIMIT.title} onSave=${(title, base) => save({ title }, base)} />` : html`<h2 class="tc-title">${card.title}</h2>`}
|
|
@@ -395,7 +458,7 @@ export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing
|
|
|
395
458
|
<${EditableText} readOnly=${!can} value=${card.blockedReason} limit=${LIMIT.blockedReason} version=${card.version} onSave=${(v, base) => save({ blockedReason: v }, base)} /></${Field}>` : null}
|
|
396
459
|
${spec.shown.length ? html`<div class="tp-spec">${spec.shown}</div>` : null}
|
|
397
460
|
${spec.adders.length ? html`<div class="tp-adders">${spec.adders}</div>` : null}
|
|
398
|
-
<${AgentRun} card=${card} detail=${detail} doing=${doing} derived=${derived} shown=${handoff.shown} adders=${handoff.adders} />
|
|
461
|
+
<${AgentRun} card=${card} detail=${detail} doing=${doing} ready=${ready} derived=${derived} shown=${handoff.shown} adders=${handoff.adders} flow=${flow} flowOn=${flowOn} baton=${batonLine ? batonLine.text : ""} />
|
|
399
462
|
<${FilesField} files=${(detail && detail.attachments) || []} />
|
|
400
463
|
${subs}
|
|
401
464
|
</div>
|
|
@@ -431,9 +494,10 @@ export function CardPage({ id, tick, projects, cards = [], boardOff = [], doing
|
|
|
431
494
|
</aside>
|
|
432
495
|
|
|
433
496
|
<div class="tp-activity">
|
|
434
|
-
<${Timeline} detail=${detail} describe=${describeRow} cards=${cards} lead=${((projects || []).find((x) => x.id === card.projectId) || {}).leadInstance || null} />
|
|
497
|
+
<${Timeline} detail=${detail} describe=${describeRow} cards=${cards} lead=${((projects || []).find((x) => x.id === card.projectId) || {}).leadInstance || null} names=${mentionNames} thread=${thread} fresh=${freshEntries} />
|
|
435
498
|
${can ? html`<${Composer} names=${mentionNames} assignee=${card.assignee} placeholder=${card.assignee ? t("taskcard.commentTo", card.assignee) : t("taskcard.commentHint")}
|
|
436
|
-
|
|
499
|
+
recipients=${recipientsOf(card, detail, mentionNames)}
|
|
500
|
+
onSend=${(text, to, held) => run(() => boardApi.update(card.id, { comment: text, ...(held ? {} : { to: to ? [to] : [] }) }))} />` : null}
|
|
437
501
|
</div>
|
|
438
502
|
</div>
|
|
439
503
|
</div>`;
|
|
@@ -82,6 +82,11 @@ register("tasks", {
|
|
|
82
82
|
// The watchers a card's page sets (fleet-task-follow.js)
|
|
83
83
|
"err.watcher_unknown": "“{0}” is not one of the fleet's instances", "err.watcher_board_off": "{0} has the task board switched off: it cannot read or move cards, so a notice would reach nothing it can act on",
|
|
84
84
|
"err.watchers_max": "{0} can have at most {1} watchers", "err.watch_not_board": "{0} is not a card on the board: only cards can be watched",
|
|
85
|
+
// Comment threads (fleet-task-thread.js)
|
|
86
|
+
"err.comment_not_found": "{0} has no comment {1}", "err.comment_deleted": "Comment {0} was deleted", "err.comment_not_yours": "Only its author can edit comment {0}",
|
|
87
|
+
"err.comment_empty": "A comment cannot be empty", "err.comment_delete_forbidden": "Only its author or a person can delete comment {0}",
|
|
88
|
+
"err.resolve_root_only": "{0} is a reply: resolve the thread by its first comment", "err.reaction_invalid": "A reaction is one emoji",
|
|
89
|
+
"err.reaction_limit": "Comment {0} already has {1} different reactions", "err.reply_needs_comment": "A reply or a recipient goes with a comment",
|
|
85
90
|
"note.review_waiting": "{0} “{1}”: every sub task is done — it waits for your confirmation",
|
|
86
91
|
"note.back_to": "{0} has unfinished sub tasks again: it is back to {1}", "note.deps_done": "{0}'s dependencies are all done: it can start",
|
|
87
92
|
"note.deps_unmet": "Note: {0} not done yet",
|
|
@@ -164,6 +169,10 @@ register("tasks", {
|
|
|
164
169
|
"err.assignee_board_off": "{0} 關閉了任務看板,讀不到也動不了卡片。請先替 {0} 開啟(設定 → 該 Agent → 網頁儀表板權限),或改在聊天中交辦",
|
|
165
170
|
"err.watcher_unknown": "「{0}」不是 fleet 裡的 Agent", "err.watcher_board_off": "{0} 關閉了任務看板,讀不到也動不了卡片,通知送過去它也沒辦法處理",
|
|
166
171
|
"err.watchers_max": "{0} 最多只能有 {1} 個關注者", "err.watch_not_board": "{0} 不是任務板上的卡片,只有任務板上的卡片可以關注",
|
|
172
|
+
"err.comment_not_found": "{0} 沒有留言 {1}", "err.comment_deleted": "留言 {0} 已刪除", "err.comment_not_yours": "留言 {0} 只有作者能編輯",
|
|
173
|
+
"err.comment_empty": "留言不能是空的", "err.comment_delete_forbidden": "留言 {0} 只有作者或人能刪除",
|
|
174
|
+
"err.resolve_root_only": "{0} 是回覆:請對討論串的第一則留言解決", "err.reaction_invalid": "反應只能是一個 emoji",
|
|
175
|
+
"err.reaction_limit": "留言 {0} 已經有 {1} 種不同的反應", "err.reply_needs_comment": "回覆或收件對象要和留言一起送",
|
|
167
176
|
"note.review_waiting": "{0}「{1}」的子任務都完成了,等你確認",
|
|
168
177
|
"note.back_to": "{0} 又有沒完成的子任務,已回到{1}", "note.deps_done": "{0} 的相依都完成了,可以開始",
|
|
169
178
|
"note.deps_unmet": "提醒:{0} 還沒完成",
|
|
@@ -419,6 +428,11 @@ export const boardApi = {
|
|
|
419
428
|
/** Starts and stops instances watching a card (`add`, `remove`: names); a watch is not an edit, so it carries no version. */
|
|
420
429
|
watchers: (id, change) => boardCall("POST", `/ui/tasks/cards/${enc(id)}/watchers`, change),
|
|
421
430
|
reorder: (id, after, before) => boardCall("POST", `/ui/tasks/cards/${enc(id)}/reorder`, { after, before }),
|
|
431
|
+
/** Comment threads: one comment of a card — its author's edit, a reaction (`on: false` takes it back), a thread resolved or opened, a deletion. */
|
|
432
|
+
commentEdit: (id, no, text) => boardCall("POST", `/ui/tasks/cards/${enc(id)}/comments/${no}/edit`, { text }),
|
|
433
|
+
commentReact: (id, no, emoji, on) => boardCall("POST", `/ui/tasks/cards/${enc(id)}/comments/${no}/react`, { emoji, on }),
|
|
434
|
+
commentResolve: (id, no, resolved) => boardCall("POST", `/ui/tasks/cards/${enc(id)}/comments/${no}/resolve`, { resolved }),
|
|
435
|
+
commentDelete: (id, no) => boardCall("POST", `/ui/tasks/cards/${enc(id)}/comments/${no}/delete`, {}),
|
|
422
436
|
search: (q) => boardCall("GET", `/ui/tasks/search?q=${enc(q)}`),
|
|
423
437
|
/** #2246 step 3: each instance's work (its `task mine`), or one instance's. */
|
|
424
438
|
work: (instance) => boardCall("GET", `/ui/tasks/work${instance ? `?instance=${enc(instance)}` : ""}`),
|