@songsid/agend 2.4.0-beta.17 → 2.4.0-beta.19
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 +13 -7
- package/dist/agent-cli.js +149 -49
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-export.d.ts +3 -1
- package/dist/agent-export.js +18 -1
- package/dist/agent-export.js.map +1 -1
- package/dist/agent-whats-new.js +9 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/apply-job.d.ts +2 -2
- package/dist/auth-api.js +1 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.d.ts +0 -6
- package/dist/backend/claude-code.js +29 -5
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-transcript-errors.d.ts +4 -0
- package/dist/backend/claude-transcript-errors.js +5 -1
- package/dist/backend/claude-transcript-errors.js.map +1 -1
- package/dist/backend/codex-precaution.js +3 -2
- package/dist/backend/codex-precaution.js.map +1 -1
- package/dist/backend/codex.js +1 -1
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-server.js +8 -2
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.d.ts +27 -1
- package/dist/channel/mcp-tools.js +77 -7
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/chat-task-refs.d.ts +61 -0
- package/dist/chat-task-refs.js +112 -0
- package/dist/chat-task-refs.js.map +1 -0
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +6 -2
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-credential-launch.d.ts +6 -0
- package/dist/claude-credential-launch.js +16 -3
- package/dist/claude-credential-launch.js.map +1 -1
- package/dist/claude-credential-runner.js +3 -1
- package/dist/claude-credential-runner.js.map +1 -1
- package/dist/claude-setup-token-transport.js +25 -3
- package/dist/claude-setup-token-transport.js.map +1 -1
- package/dist/cli-audited.js +9 -8
- package/dist/cli-audited.js.map +1 -1
- package/dist/composite-tools.d.ts +11 -0
- package/dist/composite-tools.js +29 -0
- package/dist/composite-tools.js.map +1 -0
- package/dist/config-validator.js +22 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -1
- package/dist/contact-auth-policy.d.ts +1 -0
- package/dist/contact-auth-policy.js +2 -1
- package/dist/contact-auth-policy.js.map +1 -1
- package/dist/contact-auth-service.js +2 -0
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.js +21 -6
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/contact-auth-types.d.ts +2 -0
- package/dist/contact-auth-types.js.map +1 -1
- package/dist/daemon.d.ts +8 -0
- package/dist/daemon.js +66 -13
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.js +2 -1
- package/dist/darwin-memory.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +1 -8
- package/dist/dashboard-permissions.js +8 -9
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-outbox.d.ts +0 -6
- package/dist/delivery-outbox.js +0 -25
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-outbox.test.js +132 -96
- package/dist/delivery-outbox.test.js.map +1 -1
- package/dist/fleet-context.d.ts +1 -0
- package/dist/fleet-manager.d.ts +60 -8
- package/dist/fleet-manager.js +404 -107
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +2 -2
- package/dist/fleet-windows-runtime.js +9 -2
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/fleet-yaml-stringify.d.ts +3 -0
- package/dist/fleet-yaml-stringify.js +132 -0
- package/dist/fleet-yaml-stringify.js.map +1 -0
- package/dist/general-knowledge/skills/concepts/SKILL.md +53 -4
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +4 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +21 -1
- package/dist/general-knowledge/skills/hub/SKILL.md +2 -0
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +5 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +3 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -0
- package/dist/general-knowledge/skills/task-board/SKILL.md +63 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +25 -2
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +48 -11
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +4 -0
- package/dist/general-knowledge/steering/core-rules.md +15 -78
- package/dist/general-role-block.d.ts +19 -0
- package/dist/general-role-block.js +56 -0
- package/dist/general-role-block.js.map +1 -0
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/host-memory.d.ts +3 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/host-monitoring/darwin/collector.d.ts +18 -0
- package/dist/host-monitoring/darwin/collector.js +65 -0
- package/dist/host-monitoring/darwin/collector.js.map +1 -0
- package/dist/host-monitoring/darwin/defaults.d.ts +2 -0
- package/dist/host-monitoring/darwin/defaults.js +9 -0
- package/dist/host-monitoring/darwin/defaults.js.map +1 -0
- package/dist/host-monitoring/darwin/interpretation.d.ts +20 -0
- package/dist/host-monitoring/darwin/interpretation.js +73 -0
- package/dist/host-monitoring/darwin/interpretation.js.map +1 -0
- package/dist/host-monitoring/linux/collector.d.ts +17 -0
- package/dist/host-monitoring/linux/collector.js +55 -0
- package/dist/host-monitoring/linux/collector.js.map +1 -0
- package/dist/host-monitoring/linux/defaults.d.ts +2 -0
- package/dist/host-monitoring/linux/defaults.js +9 -0
- package/dist/host-monitoring/linux/defaults.js.map +1 -0
- package/dist/host-monitoring/linux/interpretation.d.ts +22 -0
- package/dist/host-monitoring/linux/interpretation.js +76 -0
- package/dist/host-monitoring/linux/interpretation.js.map +1 -0
- package/dist/host-monitoring/transport.d.ts +42 -0
- package/dist/host-monitoring/transport.js +101 -0
- package/dist/host-monitoring/transport.js.map +1 -0
- package/dist/host-monitoring/wsl/collector.d.ts +19 -0
- package/dist/host-monitoring/wsl/collector.js +72 -0
- package/dist/host-monitoring/wsl/collector.js.map +1 -0
- package/dist/host-monitoring/wsl/defaults.d.ts +2 -0
- package/dist/host-monitoring/wsl/defaults.js +9 -0
- package/dist/host-monitoring/wsl/defaults.js.map +1 -0
- package/dist/host-monitoring/wsl/interpretation.d.ts +22 -0
- package/dist/host-monitoring/wsl/interpretation.js +77 -0
- package/dist/host-monitoring/wsl/interpretation.js.map +1 -0
- package/dist/host-monitoring-alert-policy.d.ts +73 -0
- package/dist/host-monitoring-alert-policy.js +152 -0
- package/dist/host-monitoring-alert-policy.js.map +1 -0
- package/dist/host-monitoring-alert-resources.d.ts +11 -0
- package/dist/host-monitoring-alert-resources.js +16 -0
- package/dist/host-monitoring-alert-resources.js.map +1 -0
- package/dist/host-monitoring-alert-settings.d.ts +16 -0
- package/dist/host-monitoring-alert-settings.js +68 -0
- package/dist/host-monitoring-alert-settings.js.map +1 -0
- package/dist/host-monitoring-alert-store.d.ts +49 -0
- package/dist/host-monitoring-alert-store.js +228 -0
- package/dist/host-monitoring-alert-store.js.map +1 -0
- package/dist/host-monitoring-alert-text.d.ts +7 -0
- package/dist/host-monitoring-alert-text.js +10 -0
- package/dist/host-monitoring-alert-text.js.map +1 -0
- package/dist/host-monitoring-alerts.d.ts +79 -0
- package/dist/host-monitoring-alerts.js +276 -0
- package/dist/host-monitoring-alerts.js.map +1 -0
- package/dist/host-monitoring-defaults.d.ts +19 -0
- package/dist/host-monitoring-defaults.js +10 -0
- package/dist/host-monitoring-defaults.js.map +1 -0
- package/dist/host-monitoring-footprint-policy.d.ts +45 -0
- package/dist/host-monitoring-footprint-policy.js +150 -0
- package/dist/host-monitoring-footprint-policy.js.map +1 -0
- package/dist/host-monitoring-footprint.d.ts +42 -0
- package/dist/host-monitoring-footprint.js +169 -0
- package/dist/host-monitoring-footprint.js.map +1 -0
- package/dist/host-monitoring-history-policy.d.ts +2 -0
- package/dist/host-monitoring-history-policy.js +16 -2
- package/dist/host-monitoring-history-policy.js.map +1 -1
- package/dist/host-monitoring-history-store.js +8 -6
- package/dist/host-monitoring-history-store.js.map +1 -1
- package/dist/host-monitoring-history-worker.js +19 -3
- package/dist/host-monitoring-history-worker.js.map +1 -1
- package/dist/host-monitoring-history.d.ts +9 -0
- package/dist/host-monitoring-history.js +45 -9
- package/dist/host-monitoring-history.js.map +1 -1
- package/dist/host-monitoring-platform.d.ts +18 -70
- package/dist/host-monitoring-platform.js +14 -269
- package/dist/host-monitoring-platform.js.map +1 -1
- package/dist/host-monitoring-process-identity.d.ts +8 -0
- package/dist/host-monitoring-process-identity.js +81 -0
- package/dist/host-monitoring-process-identity.js.map +1 -0
- package/dist/host-monitoring-runtime.d.ts +8 -0
- package/dist/host-monitoring-runtime.js +18 -3
- package/dist/host-monitoring-runtime.js.map +1 -1
- package/dist/host-monitoring.d.ts +15 -0
- package/dist/host-monitoring.js.map +1 -1
- package/dist/hub/agent-catalog-model.d.ts +21 -0
- package/dist/hub/agent-catalog-model.js +9 -1
- package/dist/hub/agent-catalog-model.js.map +1 -1
- package/dist/hub/agent-catalog.d.ts +4 -1
- package/dist/hub/agent-catalog.js +11 -0
- package/dist/hub/agent-catalog.js.map +1 -1
- package/dist/hub/catalog.js +12 -0
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.js +4 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +5 -0
- package/dist/hub/compose/member.js +25 -5
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +2 -0
- package/dist/hub/compose/server.js +4 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/http/compose.d.ts +5 -0
- package/dist/hub/http/compose.js +25 -2
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/deps.d.ts +2 -0
- package/dist/hub/http/schema.js +4 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/lapse-carry.d.ts +45 -0
- package/dist/hub/lapse-carry.js +62 -0
- package/dist/hub/lapse-carry.js.map +1 -0
- package/dist/hub/member/agent-catalog.d.ts +4 -1
- package/dist/hub/member/agent-catalog.js +15 -4
- package/dist/hub/member/agent-catalog.js.map +1 -1
- package/dist/hub/member/agent-intro.d.ts +4 -3
- package/dist/hub/member/agent-intro.js +7 -0
- package/dist/hub/member/agent-intro.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +8 -1
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +34 -6
- package/dist/hub/member/room-post.js +30 -0
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/member/sharing.d.ts +2 -0
- package/dist/hub/member/sharing.js +9 -2
- package/dist/hub/member/sharing.js.map +1 -1
- package/dist/hub/protocol.d.ts +2 -0
- package/dist/hub/room-brief-model.js +2 -1
- package/dist/hub/room-brief-model.js.map +1 -1
- package/dist/hub/rooms/agents.d.ts +2 -0
- package/dist/hub/rooms/agents.js +16 -2
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/office.d.ts +82 -0
- package/dist/hub/rooms/office.js +46 -0
- package/dist/hub/rooms/office.js.map +1 -0
- package/dist/hub/rooms/service.d.ts +66 -1
- package/dist/hub/rooms/service.js +67 -11
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +4 -0
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/server.js +9 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sharing-requests.d.ts +5 -2
- package/dist/hub/sharing-requests.js +19 -4
- package/dist/hub/sharing-requests.js.map +1 -1
- package/dist/instance-config-impact.js +1 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.js +8 -9
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instruction-file-sizes.d.ts +46 -0
- package/dist/instruction-file-sizes.js +115 -0
- package/dist/instruction-file-sizes.js.map +1 -0
- package/dist/instructions.d.ts +35 -1
- package/dist/instructions.js +59 -33
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +16 -4
- package/dist/locale.js.map +1 -1
- package/dist/log-steps.d.ts +5 -0
- package/dist/log-steps.js +6 -2
- package/dist/log-steps.js.map +1 -1
- package/dist/memory-guidance.d.ts +5 -0
- package/dist/memory-guidance.js +14 -0
- package/dist/memory-guidance.js.map +1 -0
- package/dist/model-defaults.d.ts +5 -0
- package/dist/model-defaults.js +6 -0
- package/dist/model-defaults.js.map +1 -0
- package/dist/native-mcp.d.ts +2 -0
- package/dist/native-mcp.js +16 -6
- package/dist/native-mcp.js.map +1 -1
- package/dist/needs-you-hub.d.ts +3 -0
- package/dist/needs-you-hub.js +7 -1
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +15 -2
- package/dist/needs-you.js +6 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +3 -3
- package/dist/outbound-schemas.d.ts +3 -0
- package/dist/outbound-schemas.js +27 -26
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +7 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/quickstart.d.ts +1 -1
- package/dist/quickstart.js +2 -3
- package/dist/quickstart.js.map +1 -1
- package/dist/remote-card-prompt.d.ts +1 -0
- package/dist/remote-card-prompt.js +1 -1
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/runtime-build-info.js +1 -1
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +9 -9
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-pane-mcp.js +7 -3
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-native.js +2 -1
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/scheduler/db.js +2 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-mentions.d.ts +32 -0
- package/dist/scheduler/task-board-mentions.js +97 -0
- package/dist/scheduler/task-board-mentions.js.map +1 -0
- package/dist/scheduler/task-board-text.js +3 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +199 -3
- package/dist/scheduler/task-board.js +492 -7
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +5 -1
- package/dist/settings-api.js +77 -2
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.js +5 -4
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +4 -2
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +20 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-instance-patch.js +3 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-host.d.ts +2 -3
- package/dist/setup-host.js +3 -5
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-wizard.js +0 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/shared-default-adoption.d.ts +24 -0
- package/dist/shared-default-adoption.js +73 -0
- package/dist/shared-default-adoption.js.map +1 -0
- package/dist/subagent-records.d.ts +2 -0
- package/dist/subagent-records.js +11 -1
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.d.ts +3 -0
- package/dist/subagent-service.js +24 -4
- package/dist/subagent-service.js.map +1 -1
- package/dist/task-board-tool.d.ts +31 -0
- package/dist/task-board-tool.js +31 -0
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +23 -30
- package/dist/task-board-waker.js +136 -97
- package/dist/task-board-waker.js.map +1 -1
- package/dist/topic-commands.js +4 -0
- package/dist/topic-commands.js.map +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/ui/agent-details-settings.js +2 -2
- package/dist/ui/agent-export-dialog.js +4 -3
- package/dist/ui/agent-export-strings.js +4 -4
- package/dist/ui/agent-page-strings.js +18 -0
- package/dist/ui/chat-activity-groups.js +1 -1
- package/dist/ui/chat-activity.js +17 -0
- package/dist/ui/chat-store.js +34 -8
- package/dist/ui/chat-task-ref-strings.js +24 -0
- package/dist/ui/chat-task-refs.js +129 -0
- package/dist/ui/claude-setup-token.js +3 -3
- package/dist/ui/contact-auth-strings.js +33 -3
- package/dist/ui/contact-authorizations.js +17 -24
- package/dist/ui/contact-grant-editor.js +50 -0
- package/dist/ui/contact-permissions.js +21 -8
- package/dist/ui/fleet-office-card.js +18 -14
- package/dist/ui/fleet-office.js +29 -17
- package/dist/ui/fleet-task-activity.js +362 -0
- package/dist/ui/fleet-task-card.js +317 -314
- package/dist/ui/fleet-task-common.js +99 -9
- package/dist/ui/fleet-task-create.js +67 -0
- package/dist/ui/fleet-task-edit.js +204 -0
- package/dist/ui/fleet-task-follow.js +123 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-owner.js +252 -0
- package/dist/ui/fleet-task-run.js +257 -0
- package/dist/ui/fleet-task-view.js +178 -39
- package/dist/ui/fleet-task-work.js +2 -2
- package/dist/ui/fleet-tasks.js +258 -130
- package/dist/ui/host-alerts.js +23 -0
- package/dist/ui/host-footprint.js +17 -0
- package/dist/ui/host-health.js +24 -16
- package/dist/ui/host-monitoring-darwin.js +6 -0
- package/dist/ui/host-monitoring-help.js +7 -0
- package/dist/ui/host-monitoring-linux.js +6 -0
- package/dist/ui/host-monitoring-wsl.js +6 -0
- package/dist/ui/host-time.js +5 -0
- package/dist/ui/hub-agent-copy.js +2 -0
- package/dist/ui/hub-client.js +4 -0
- package/dist/ui/hub-my-agents-strings.js +2 -0
- package/dist/ui/hub-my-agents.js +17 -1
- package/dist/ui/hub-room-composer.js +108 -5
- package/dist/ui/hub-room-members-strings.js +9 -2
- package/dist/ui/hub-room-members.js +72 -15
- package/dist/ui/hub-room-office.js +191 -0
- package/dist/ui/hub-room-purpose.js +18 -2
- package/dist/ui/hub-room-settings.js +8 -1
- package/dist/ui/hub-room-strings.js +15 -0
- package/dist/ui/hub-room-thread.js +51 -15
- package/dist/ui/hub-strings.js +1 -1
- package/dist/ui/log-row.js +7 -5
- package/dist/ui/native-instance-settings.js +4 -2
- package/dist/ui/panel-chat.js +98 -17
- package/dist/ui/panel-details.js +17 -0
- package/dist/ui/panel-fleet.js +1 -1
- package/dist/ui/panel-hub.js +4 -1
- package/dist/ui/panel-needs.js +38 -18
- package/dist/ui/panel-settings.js +58 -13
- package/dist/ui/settings-apply.js +8 -3
- package/dist/ui/settings-default-model-scope.js +40 -0
- package/dist/ui/settings-default-model-strings.js +43 -0
- package/dist/ui/settings-dialogs.js +9 -5
- package/dist/ui/settings-host-alerts.js +23 -0
- package/dist/ui/settings-host-monitoring.js +10 -8
- package/dist/ui/settings-hub.js +1 -1
- package/dist/ui/settings-layout.js +7 -2
- package/dist/ui/settings-model.js +9 -5
- package/dist/ui/settings-quota-notice.js +3 -3
- package/dist/ui/settings-registry.js +3 -0
- package/dist/ui/settings-shared-strings.js +22 -0
- package/dist/ui/settings-shared.js +59 -12
- package/dist/ui/settings-strings.js +2 -4
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app.css +169 -50
- package/dist/ui/shared/chat-composer.js +7 -6
- package/dist/ui/shared/chat-render.js +63 -10
- package/dist/ui/shared/chat-strings.js +2 -2
- package/dist/ui/shared/chat-thread.js +10 -3
- package/dist/ui/shared/composer-focus.js +21 -0
- package/dist/ui/shared/hub-chat.css +30 -2
- package/dist/ui/shared/hub-rooms-u2.css +17 -0
- package/dist/ui/shared/task-board.css +406 -8
- package/dist/ui/trigger-complete.js +71 -0
- package/dist/web-api.d.ts +11 -1
- package/dist/web-api.js +324 -18
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +40 -1
- package/dist/web-chat-history.js +131 -9
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-guest-access.js +4 -4
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-upload.d.ts +1 -1
- package/dist/web-upload.js.map +1 -1
- package/dist/windows-native-mcp.js +5 -2
- package/dist/windows-native-mcp.js.map +1 -1
- package/dist/workflow-templates/default.md +4 -6
- package/package.json +1 -1
package/dist/ui/log-row.js
CHANGED
|
@@ -12,7 +12,7 @@ register("log", {
|
|
|
12
12
|
en: {
|
|
13
13
|
user: "Asked", assistant: "Replied", error: "Error", errorCode: "Error {0}", turnEnd: "Turn ended", turnEndIn: "Turn ended · {0}",
|
|
14
14
|
compacted: "Conversation compacted", turn: "Turn",
|
|
15
|
-
running: "running", done: "done", failed: "failed", interrupted: "interrupted", exit: "exit {0}",
|
|
15
|
+
running: "running", done: "done", failed: "failed", interrupted: "interrupted", background: "started in the background", exit: "exit {0}",
|
|
16
16
|
showScreen: "Show what was on screen", hideScreen: "Hide what was on screen",
|
|
17
17
|
showOutput: "Show output", hideOutput: "Hide output", args: "Arguments", output: "Output", noOutput: "No output.",
|
|
18
18
|
showAll: "Show all", showLess: "Show less", cut: "… {0} more characters not shown.", tooLarge: "Output of {0}: only its start is shown.",
|
|
@@ -25,12 +25,12 @@ register("log", {
|
|
|
25
25
|
"zh-TW": {
|
|
26
26
|
user: "收到要求", assistant: "回覆", error: "錯誤", errorCode: "錯誤 {0}", turnEnd: "回合結束", turnEndIn: "回合結束 · {0}",
|
|
27
27
|
compacted: "對話已壓縮", turn: "回合",
|
|
28
|
-
running: "執行中", done: "完成", failed: "失敗", interrupted: "中斷", exit: "結束碼 {0}",
|
|
28
|
+
running: "執行中", done: "完成", failed: "失敗", interrupted: "中斷", background: "已在背景啟動", exit: "結束碼 {0}",
|
|
29
29
|
showScreen: "顯示當時的畫面", hideScreen: "隱藏當時的畫面",
|
|
30
30
|
showOutput: "顯示輸出", hideOutput: "隱藏輸出", args: "參數", output: "輸出", noOutput: "沒有輸出。",
|
|
31
31
|
showAll: "顯示全部", showLess: "收合", cut: "… 還有 {0} 個字元沒有顯示。", tooLarge: "輸出共 {0},只顯示開頭。",
|
|
32
32
|
times: "×{0}", newer: "{0} 則新的",
|
|
33
|
-
cat_read: "讀取", cat_edit: "編輯", cat_search: "搜尋", cat_run: "執行", cat_web: "網頁", cat_mcp: "MCP", cat_agent: "子
|
|
33
|
+
cat_read: "讀取", cat_edit: "編輯", cat_search: "搜尋", cat_run: "執行", cat_web: "網頁", cat_mcp: "MCP", cat_agent: "子 Agent",
|
|
34
34
|
cat_plan: "計畫", cat_message: "訊息", cat_other: "工具", plan_items: "{0} 項",
|
|
35
35
|
said: "說了", thinking: "思考", thinkingMore: "顯示完整思考", thinkingLess: "收合",
|
|
36
36
|
expand: "顯示細節", collapse: "隱藏細節", command: "指令", removed: "移除", added: "新增",
|
|
@@ -279,7 +279,9 @@ export function LogRow({ x, prev, paths, chat, compact, latest }) {
|
|
|
279
279
|
const failed = x.status === "failed" || x.status === "interrupted" || (typeof x.exitCode === "number" && x.exitCode !== 0);
|
|
280
280
|
const running = x.status === "running";
|
|
281
281
|
const mark = running ? html`<span class="log-status running"><span class="spinner" aria-hidden="true"></span>${tl("running")}</span>`
|
|
282
|
-
: failed ? html`<span class=${`log-status ${x.status === "interrupted" ? "interrupted" : "failed"}`}>${tl(x.status === "interrupted" ? "interrupted" : "failed")}${typeof x.exitCode === "number" && x.exitCode !== 0 ? ` · ${tl("exit", x.exitCode)}` : ""}${x.durationMs ? ` · ${duration(x.durationMs)}` : ""}</span>`
|
|
282
|
+
: failed ? html`<span class=${`log-status ${x.status === "interrupted" ? "interrupted" : "failed"}`}>${tl(x.status === "interrupted" ? "interrupted" : "failed")}${typeof x.exitCode === "number" && x.exitCode !== 0 ? ` · ${tl("exit", x.exitCode)}` : ""}${x.durationMs ? ` · ${duration(x.durationMs)}` : ""}</span>`
|
|
283
|
+
// M-3541: a subagent started in the background: the call is done, the subagent runs on (the Subagents row).
|
|
284
|
+
: x.background ? html`<span class="log-status background">${tl("background")}</span>` : null;
|
|
283
285
|
const view = inputView(x, cat);
|
|
284
286
|
const has = !!(x.body || x.bodyBytes || (view && (view.code || view.diff || view.raw)));
|
|
285
287
|
const middle = subject || x.tool || tl(`cat_${cat}`);
|
|
@@ -323,7 +325,7 @@ export function LogRow({ x, prev, paths, chat, compact, latest }) {
|
|
|
323
325
|
const cat = x.cat || "other";
|
|
324
326
|
const subject = cat === "plan" && x.subject ? tl("plan_items", x.subject) : short(x.subject || "");
|
|
325
327
|
const quiet = compact && (x.status || "done") === "done" && !(typeof x.exitCode === "number" && x.exitCode !== 0);
|
|
326
|
-
const status = quiet ? null : html`<span class=${`log-status ${x.status || "done"}`}>${x.status === "running" ? html`<span class="spinner" aria-hidden="true"></span>` : null}${tl(x.status || "done")}${typeof x.exitCode === "number" && x.exitCode !== 0 ? ` · ${tl("exit", x.exitCode)}` : ""}${x.durationMs ? ` · ${duration(x.durationMs)}` : ""}</span>`;
|
|
328
|
+
const status = quiet ? null : html`<span class=${`log-status ${x.background && x.status === "done" ? "background" : x.status || "done"}`}>${x.status === "running" ? html`<span class="spinner" aria-hidden="true"></span>` : null}${tl(x.background && x.status === "done" ? "background" : x.status || "done")}${typeof x.exitCode === "number" && x.exitCode !== 0 ? ` · ${tl("exit", x.exitCode)}` : ""}${x.durationMs ? ` · ${duration(x.durationMs)}` : ""}</span>`;
|
|
327
329
|
const label = html`<span class="log-cat">${tl(`cat_${cat}`)}</span>${subject ? html` <span class="log-subject mono" title=${x.subject && subject !== x.subject ? x.subject : null}>${subject}</span>` : null}${x.tool && !subject ? html` <span class="log-tool mono muted">${x.tool}</span>` : null}`;
|
|
328
330
|
const has = !!(x.body || x.input || x.bodyBytes);
|
|
329
331
|
row = html`${head(CAT_ICON[cat] || CAT_ICON.other, label, html`${x.repeat ? html`<span class="log-repeat">${tl("times", x.repeat)}</span>` : null}${status}`)}
|
|
@@ -25,7 +25,7 @@ export function useNativeForm({ name, inst, ctx }) {
|
|
|
25
25
|
const machine = machines.data?.machines?.find(item => item.id === machineId);
|
|
26
26
|
const native = (machineId ? machine?.inventory : catalog.data)?.clis?.find(cli => cli.id === inst.backend);
|
|
27
27
|
const state = (key, initial) => paneState.usePaneState ? paneState.usePaneState(ctx.formMemory, key, initial) : useState(initial);
|
|
28
|
-
const [form,setForm] = state("native", () => ({display_name:inst.display_name || name,description:inst.description || "",model:inst.model || "",systemPrompt:inst.systemPrompt || "",native_sandbox:inst.native_sandbox || "read-only",tags:Array.isArray(inst.tags) ? [...inst.tags] : []}));
|
|
28
|
+
const [form,setForm] = state("native", () => ({display_name:inst.display_name || name,description:inst.description || "",model:inst.model || "",systemPrompt:inst.systemPrompt || "",operations:inst.operations || "",native_sandbox:inst.native_sandbox || "read-only",tags:Array.isArray(inst.tags) ? [...inst.tags] : []}));
|
|
29
29
|
const set = key => value => setForm(current => ({...current,[key]:value}));
|
|
30
30
|
const dirty=Object.entries(form).some(([key,value])=>JSON.stringify(typeof value==="string"?value.trim():value)!==JSON.stringify(key==="display_name"?inst.display_name||name:key==="native_sandbox"?inst.native_sandbox||"read-only":key==="tags"?inst.tags||[]:inst[key]||""));
|
|
31
31
|
const ready = !!form.display_name.trim() && !(form.native_sandbox === "read-only" && native?.readOnlySupport === false);
|
|
@@ -67,7 +67,9 @@ export function NativeFields({ m, cat, idPrefix = "" }) {
|
|
|
67
67
|
<p class="s-info"><span aria-hidden="true">ⓘ</span><span>${pt("nativeLimits")}</span></p></${Card}></div>`;
|
|
68
68
|
return html`<div class="ap-grid"><${Card} title=${pt("cardSystemPrompt")} span=${true}>
|
|
69
69
|
<div class="field"><${Lab} id=${fieldId("ni-sys")} text=${tn("systemPrompt")} tip=${pt("tip_systemPromptNative")} /><textarea id=${fieldId("ni-sys")} rows="5" maxLength=${8000} value=${form.systemPrompt} onInput=${event => set("systemPrompt")(event.target.value)} /></div>
|
|
70
|
-
<p class="note">${pt("note_systemPrompt")}</p
|
|
70
|
+
<p class="note">${pt("note_systemPrompt")}</p>
|
|
71
|
+
<div class="field"><${Lab} id=${fieldId("ni-ops")} text=${pt("lbl_operations")} tip=${pt("tip_operations")} /><textarea id=${fieldId("ni-ops")} rows="4" maxLength=${2000} placeholder=${pt("ph_operations")} value=${form.operations} onInput=${event => set("operations")(event.target.value)} /></div>
|
|
72
|
+
<p class="note">${pt("note_operations")}</p></${Card}></div>`;
|
|
71
73
|
}
|
|
72
74
|
NativeFields.paneIds = true;
|
|
73
75
|
|
package/dist/ui/panel-chat.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { focusComposerStrip } from "/assets/composer-focus.js";
|
|
1
2
|
import { previewReplyFile, replyPreviewLabel } from "./reply-file-preview.js";
|
|
2
3
|
import { NativePaneRecovery } from "./native-pane-recovery.js";
|
|
3
4
|
import { GeneralLocation } from "./general-location.js";
|
|
@@ -214,6 +215,8 @@ import { contactBadgeHtml, installBadgeRefresh } from "./contact-ticket-badge.js
|
|
|
214
215
|
import { createEmojiIndex } from "./chat-emojis.js";
|
|
215
216
|
import { pollPublicPreview } from "./preview-status.js";
|
|
216
217
|
import { createMentionIndex } from "./chat-mentions.js";
|
|
218
|
+
import "./chat-task-ref-strings.js";
|
|
219
|
+
import { createTaskRefIndex, insertTaskRef, taskRefAt } from "./chat-task-refs.js";
|
|
217
220
|
import { setPanelFeedback } from "./preview-panel-actions.js";
|
|
218
221
|
import { PreviewPanel, claimPanel, openMarkdown, openPanel, openWorkspace, panelClaims, panelStore, panelVersion, shownKey } from "./preview-panel.js";
|
|
219
222
|
import { isUpdateLine, needsArgument, paletteFor, parseCommandLine, UPDATE_COMMAND } from "./chat-commands.js";
|
|
@@ -240,7 +243,7 @@ export function linkWorkBarCss(doc = typeof document !== "undefined" ? document
|
|
|
240
243
|
}
|
|
241
244
|
linkWorkBarCss();
|
|
242
245
|
|
|
243
|
-
import { activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
246
|
+
import { activityDrawCtx, activityInfo, activityInfoStore, activityOffered, activityPrefs, composeActivity, mountActivity, observeActivity, setActivityOn, setActivityThinking } from "./chat-activity.js";
|
|
244
247
|
/** The composer's textarea (#2342: text put back into it is a step Ctrl+Z goes back from). */
|
|
245
248
|
const composers = new Map(); // agent → current mounted refs, never a retained thread's stale closure
|
|
246
249
|
const composerField = (name) => composers.get(name)?.input.current || null;
|
|
@@ -364,10 +367,7 @@ const agentBusy = (name) => R().isBusy(store.state.exec[name]);
|
|
|
364
367
|
const agentSince = (name) => { const t = store.state.workingSince[name]; return t == null ? null : Date.now() - (performance.now() - t); };
|
|
365
368
|
const rowsOf = (name) => (activityShown() ? composeActivity(name, store.threadRows(name), Date.now(), { busy: agentBusy(name), since: agentSince(name) }) : store.threadRows(name));
|
|
366
369
|
/** What a chat's activity blocks need to draw: its paths to shorten, and whether thinking is shown. */
|
|
367
|
-
const activityCtx = (name) => () =>
|
|
368
|
-
const info = activityInfo(name);
|
|
369
|
-
return { paths: info ? { cwd: info.cwd, home: info.home } : null, thinking: activityPrefs.get().thinking && !!info && info.thinking === true };
|
|
370
|
-
};
|
|
370
|
+
const activityCtx = (name) => () => activityDrawCtx(name);
|
|
371
371
|
|
|
372
372
|
// ── Announcements: one polite, visually hidden line for the coarse events only (a reply arrived, the agent started,
|
|
373
373
|
// finished, or waits on you). Messages themselves are not read out as they arrive; the list is a log to browse.
|
|
@@ -375,6 +375,15 @@ let announceTimer = null;
|
|
|
375
375
|
/** #1630: which Discord server emoji this page may draw (created with the store, in boot). */
|
|
376
376
|
let emojiIndex = null;
|
|
377
377
|
let mentionIndex = null; // #1682: the names of the mentions shown
|
|
378
|
+
let taskRefIndex = null; // The task cards the person's messages name (chips) and the ones offered while `#` is typed
|
|
379
|
+
/** What a chip draws for a card the page knows — its words, its status in the page's language, and a tip with who has it. */
|
|
380
|
+
function taskChipInfo(code) {
|
|
381
|
+
const v = taskRefIndex ? taskRefIndex.get(code) : null;
|
|
382
|
+
if (!v) return null;
|
|
383
|
+
const status = t(`taskref.s.${v.status}`);
|
|
384
|
+
const tip = [`${v.code} · ${v.title}`, status, v.assignee ? `@${v.assignee}` : null].filter(Boolean).join(" · ");
|
|
385
|
+
return { title: v.title, status: v.status, statusLabel: status, tip };
|
|
386
|
+
}
|
|
378
387
|
function announce(text) {
|
|
379
388
|
let el = document.getElementById("announcer");
|
|
380
389
|
if (!el) { el = document.createElement("div"); el.id = "announcer"; el.className = "sr-only"; el.setAttribute("role", "status"); el.setAttribute("aria-live", "polite"); el.setAttribute("aria-atomic", "true"); document.body.appendChild(el); }
|
|
@@ -407,6 +416,8 @@ export function boot({ stream, boot: bootData, deps = {} }) {
|
|
|
407
416
|
});
|
|
408
417
|
emojiIndex = createEmojiIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
409
418
|
mentionIndex = createMentionIndex((url) => guestPage() ? null : (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
419
|
+
// A guest has no task board (the server refuses it too); everyone else reads the cards a message names.
|
|
420
|
+
taskRefIndex = guestPage() ? null : createTaskRefIndex((url) => (deps.fetch || fetch)(url, { credentials: "same-origin" }));
|
|
410
421
|
store.attach(stream);
|
|
411
422
|
// #1306: what the server said about previews for this load. The page-wide message and storage listeners this adds
|
|
412
423
|
// belong to the app, once (they are never per mount).
|
|
@@ -782,6 +793,8 @@ function threadEntry(name, doc) {
|
|
|
782
793
|
setPreviewOptIn, copyText, download: downloadHtml, toggleWrap,
|
|
783
794
|
clickReplyButton: (id, index) => store.clickReplyButton(name, id, index), // #1266
|
|
784
795
|
contactBadge: (x) => { installBadgeRefresh(); return contactBadgeHtml(x); }, // M-3339: 聯絡申請 #R… / 已准轉交 #R… (kept current)
|
|
796
|
+
canResend: (message) => store.canResend(name, message),
|
|
797
|
+
resendMessage: (key) => store.resendMessage(name, key),
|
|
785
798
|
retryOutgoing: (clientId) => store.retryOutgoing(name, clientId), // a failed send's Retry and Delete
|
|
786
799
|
deleteOutgoing: (clientId) => store.deleteOutgoing(name, clientId),
|
|
787
800
|
putBackOutgoing: (clientId) => { recordEdit(composerField(name)); store.putBackOutgoing(name, clientId); }, // undoable, as typing
|
|
@@ -803,6 +816,7 @@ function threadEntry(name, doc) {
|
|
|
803
816
|
openImage: (links, img) => openLightbox(links, img, annotateFor(name, img)), // an image, full size, in the page (#3727: with 標註)
|
|
804
817
|
emojis: (id) => !!emojiIndex && emojiIndex.known(id), // #1630: the fleet's server emoji
|
|
805
818
|
mentions: (kind, id) => (mentionIndex ? mentionIndex.name(kind, id) : null), // #1682: mention names
|
|
819
|
+
taskRefs: taskRefIndex ? taskChipInfo : undefined, // A person's task numbers as chips
|
|
806
820
|
activity: { mount: (node, group) => mountActivity(node, group, activityCtx(name)) }, // AGEND-181: the timeline's blocks
|
|
807
821
|
});
|
|
808
822
|
e.thread = thread;
|
|
@@ -812,10 +826,20 @@ function threadEntry(name, doc) {
|
|
|
812
826
|
function follow(name, thread) {
|
|
813
827
|
// #1630: the server-emoji list is read once a message shows a tag; when it arrives, those messages are drawn again.
|
|
814
828
|
// #1682: the same for mention names — asked for the ids the messages carry; when names arrive, drawn again.
|
|
815
|
-
const wantEmojis = (msgs) => { if (emojiIndex && emojiIndex.wants(msgs)) emojiIndex.ensure(); if (mentionIndex) mentionIndex.ensure(msgs); };
|
|
829
|
+
const wantEmojis = (msgs) => { if (emojiIndex && emojiIndex.wants(msgs)) emojiIndex.ensure(); if (mentionIndex) mentionIndex.ensure(msgs); if (taskRefIndex) taskRefIndex.ensure(msgs); };
|
|
816
830
|
const offs = [];
|
|
817
831
|
if (emojiIndex) offs.push(emojiIndex.subscribe(() => thread.render(rowsOf(name))));
|
|
818
832
|
if (mentionIndex) offs.push(mentionIndex.subscribe(() => thread.render(rowsOf(name))));
|
|
833
|
+
// The cards the messages name — drawn again when their answer arrives, and read again when the board changed.
|
|
834
|
+
if (taskRefIndex) {
|
|
835
|
+
offs.push(taskRefIndex.subscribe(() => thread.render(rowsOf(name))));
|
|
836
|
+
const sub = appStore.get().streamOn;
|
|
837
|
+
if (typeof sub === "function") {
|
|
838
|
+
let timer = null;
|
|
839
|
+
const off = sub("tasks", () => { if (timer) clearTimeout(timer); timer = setTimeout(() => { timer = null; taskRefIndex.refresh(); }, 400); });
|
|
840
|
+
offs.push(() => { if (timer) clearTimeout(timer); if (typeof off === "function") off(); });
|
|
841
|
+
}
|
|
842
|
+
}
|
|
819
843
|
wantEmojis(store.state.msgs[name]);
|
|
820
844
|
// AGEND-181/197: the activity feed — this instance's steps while the chat is shown (the Log's own read, live by steps_tick,
|
|
821
845
|
// or by a poll when the stream has fallen back to polling); switched by this browser's Show activity / Show thinking.
|
|
@@ -1005,15 +1029,16 @@ function Dock({ name, inst, lease, exec, awaiting, workingLabel, bindings, ids,
|
|
|
1005
1029
|
return html`<div data-trust="composer" class="dock"><div class="dock-col">
|
|
1006
1030
|
<${Prompts} name=${name} />
|
|
1007
1031
|
<${SubagentProgress} name=${name} />
|
|
1032
|
+
<div class="composer-hit" data-composer-focus onPointerDown=${focusComposerStrip} onClick=${focusComposerStrip}>
|
|
1008
1033
|
${metaLine ? html`<${ChatMetaLine} ids=${ids} name=${name} inst=${inst} lease=${lease} exec=${exec} awaiting=${awaiting} />`
|
|
1009
1034
|
: html`<${WorkBar} ids=${ids} name=${name} lease=${lease} exec=${exec} awaiting=${awaiting} workingLabel=${workingLabel} />`}
|
|
1010
1035
|
<${CommandCard} name=${name} lease=${lease} />
|
|
1011
1036
|
<${QuickActions} name=${name} inst=${inst} lease=${lease} />
|
|
1012
1037
|
${s.waking[name] ? html`<p class="send-waking" role="status">${t("chat.waking", name)}</p>` : null}
|
|
1013
1038
|
<${Composer} name=${name} inst=${inst} bindings=${bindings} ids=${ids} focused=${focused} label=${composerLabel(inst, name)} lease=${lease} busy=${R().isBusy(exec)} />
|
|
1014
|
-
${metaLine ? null : html`<div class="composer-row">${guestPage() ? html`<span class="guest-note" title=${t("chat.guestNote")}>${t("chat.guestNote")}</span>` : html`<${ComposerAuth} />`}<span
|
|
1015
|
-
class="hint" title=${t(guestPage() || !supportsInstanceFeature(inst,"commands") ? "chat.guestMore" : "chat.composerMore")}>${t(supportsInstanceFeature(inst,"commands") ? touchScreen() ? "chat.composerHintTouch" : "chat.composerHint" : touchScreen() ? "chat.nativeComposerHintTouch" : "chat.nativeComposerHint")}</span></div>`}
|
|
1016
|
-
</div></div>`;
|
|
1039
|
+
${metaLine ? null : html`<div class="composer-row" data-composer-focus>${guestPage() ? html`<span class="guest-note" data-composer-focus title=${t("chat.guestNote")}>${t("chat.guestNote")}</span>` : html`<${ComposerAuth} />`}<span
|
|
1040
|
+
class="hint" data-composer-focus title=${t(guestPage() || !supportsInstanceFeature(inst,"commands") ? "chat.guestMore" : "chat.composerMore")}>${t(supportsInstanceFeature(inst,"commands") ? touchScreen() ? "chat.composerHintTouch" : "chat.composerHint" : touchScreen() ? "chat.nativeComposerHintTouch" : "chat.nativeComposerHint")}</span></div>`}
|
|
1041
|
+
</div></div></div>`;
|
|
1017
1042
|
}
|
|
1018
1043
|
|
|
1019
1044
|
/** #2233: a backend's "not signed in" choice offers Sign in (the module behind the session gate, loaded when asked). */
|
|
@@ -1257,7 +1282,7 @@ function Prompts({ name }) {
|
|
|
1257
1282
|
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}>
|
|
1258
1283
|
<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>
|
|
1259
1284
|
${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>`)}
|
|
1260
|
-
${p.busy ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>`}
|
|
1285
|
+
${p.busy && !p.confirming ? html`<span class="wait">${t("chat.promptAnswering")}</span>` : null}</div>`}
|
|
1261
1286
|
${p.resolved ? null : p.actions.filter(a => a.input).map(a => html`<${PromptText} key=${a.id} p=${p} action=${a} />`)}</div>`)}</div>`;
|
|
1262
1287
|
}
|
|
1263
1288
|
|
|
@@ -1302,12 +1327,12 @@ function ChatMetaLine({ name, inst, lease, exec, awaiting, ids = {} }) {
|
|
|
1302
1327
|
kind !== "awaiting" && since != null ? ` ${R().formatElapsed(performance.now() - since)}` : ""}` : "";
|
|
1303
1328
|
const run = (command) => store.runCommand(name, command, "", { alive: () => lease.current() });
|
|
1304
1329
|
const label = `${model}${effort ? ` · ${effort}` : ""}`;
|
|
1305
|
-
return html`<div class=${`chat-meta${kind ? ` busy ${kind}` : ""}`} data-trust="status" role="status">
|
|
1306
|
-
${kind ? html`<span class="chat-meta-left"><span class="chat-meta-dot" aria-hidden="true"></span><span>${doing}${tail}</span></span>`
|
|
1330
|
+
return html`<div class=${`chat-meta${kind ? ` busy ${kind}` : ""}`} data-trust="status" role="status" data-composer-focus>
|
|
1331
|
+
${kind ? html`<span class="chat-meta-left" data-composer-focus><span class="chat-meta-dot" data-composer-focus aria-hidden="true"></span><span data-composer-focus>${doing}${tail}</span></span>`
|
|
1307
1332
|
: commands ? html`<button type="button" class="chat-meta-left chat-meta-model" title=${t("chat.chipModel", label)} aria-label=${t("chat.chipModel", label)}
|
|
1308
1333
|
onClick=${() => (inst?.runtime === "windows" ? navigate(sectionPath("agents")) : run("model"))}><span>${label}${tail}</span><span class="chev" aria-hidden="true">⌄</span></button>`
|
|
1309
|
-
: html`<span class="chat-meta-left"><span>${label}${tail}</span></span>`}
|
|
1310
|
-
<span class="chat-meta-right">${busy ? html`<button type="button" id=${ids.stopBtn || "stopBtn"} class="chat-meta-stop btn-stop" disabled=${!!s.cancelling[name]} title=${t("chat.stopReplyTitle")}
|
|
1334
|
+
: html`<span class="chat-meta-left" data-composer-focus><span data-composer-focus>${label}${tail}</span></span>`}
|
|
1335
|
+
<span class="chat-meta-right" data-composer-focus>${busy ? html`<button type="button" id=${ids.stopBtn || "stopBtn"} class="chat-meta-stop btn-stop" disabled=${!!s.cancelling[name]} title=${t("chat.stopReplyTitle")}
|
|
1311
1336
|
onClick=${() => store.cancelReply(name)}>${t("chat.stopReply")}</button>` : null}<${ComposerAuth} /></span>
|
|
1312
1337
|
</div>`;
|
|
1313
1338
|
}
|
|
@@ -1321,7 +1346,7 @@ function WorkBar({ name, lease, exec, awaiting, workingLabel, ids }) {
|
|
|
1321
1346
|
const h = lease.interval(() => tick(n => n + 1), 1000); // ticks only while it shows, cleared with the lease
|
|
1322
1347
|
return () => lease.clear(h);
|
|
1323
1348
|
}, [kind, lease]);
|
|
1324
|
-
if (!kind) return html`<div class="work-bar idle" aria-hidden="true"></div>`;
|
|
1349
|
+
if (!kind) return html`<div class="work-bar idle" data-composer-focus aria-hidden="true"></div>`;
|
|
1325
1350
|
// #1629: the agent's own working label (its theme), shown as text — only for "working", never for the other states.
|
|
1326
1351
|
const label = kind === "working" && workingLabel ? workingLabel
|
|
1327
1352
|
: t(kind === "stuck" ? "chat.stuck" : kind === "stopping" ? "chat.stopping" : kind === "awaiting" ? "chat.awaiting" : "chat.working", name);
|
|
@@ -1371,6 +1396,48 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1371
1396
|
useEffect(() => { if (focused && input.current) input.current.focus(); }, [name]);
|
|
1372
1397
|
useEffect(() => { refreshTourSpot(); });
|
|
1373
1398
|
const setValue = (v) => { store.setDraft(name, v); setSel(0); tick(n => n + 1); };
|
|
1399
|
+
// A `#` at the caret offers the task cards (what the board has: its number, title, status); Enter or Tab put the
|
|
1400
|
+
// number in, Esc closes the list, the arrow keys choose. The caret is read from the box as the page draws (a key that only
|
|
1401
|
+
// moves it redraws: the box's keyup and click, below). Not for a guest (no board), a command line, or an IME still composing.
|
|
1402
|
+
const [refSel, setRefSel] = useState(0);
|
|
1403
|
+
const [refItems, setRefItems] = useState([]);
|
|
1404
|
+
const [refClosed, setRefClosed] = useState(null); // the draft the list was closed on (Esc); it opens again on change
|
|
1405
|
+
const refCaret = useRef(null); // where the caret goes once a chosen number is in the box
|
|
1406
|
+
const box = input.current;
|
|
1407
|
+
// While a chosen number is on its way into the box the caret is where it will be (the box still has the old text's caret until the page has drawn it).
|
|
1408
|
+
const caret = refCaret.current !== null ? refCaret.current : box && typeof box.selectionStart === "number" ? box.selectionStart : value.length;
|
|
1409
|
+
const refAt = taskRefIndex && !guest && !bindings.composing ? taskRefAt(value, caret) : null;
|
|
1410
|
+
const refKey = refAt ? `${refAt.start}:${refAt.query}` : "";
|
|
1411
|
+
const refOpen = !!refAt && refClosed !== value && refItems.length > 0;
|
|
1412
|
+
const refPick = Math.min(refSel, Math.max(refItems.length - 1, 0));
|
|
1413
|
+
useEffect(() => {
|
|
1414
|
+
if (!refAt) { setRefItems((x) => (x.length ? [] : x)); return undefined; }
|
|
1415
|
+
let live = true;
|
|
1416
|
+
const timer = setTimeout(() => { taskRefIndex.suggest(refAt.query).then((items) => { if (live) { setRefItems(items); setRefSel(0); } }); }, refAt.query ? 120 : 0);
|
|
1417
|
+
return () => { live = false; clearTimeout(timer); };
|
|
1418
|
+
}, [refKey]);
|
|
1419
|
+
useEffect(() => {
|
|
1420
|
+
const el = input.current;
|
|
1421
|
+
if (!el || !taskRefIndex || guest || typeof el.addEventListener !== "function") return undefined;
|
|
1422
|
+
const moved = (e) => { if (e.type === "click" || /^(Arrow(Left|Right)|Home|End)$/.test(String(e.key || ""))) tick((n) => n + 1); };
|
|
1423
|
+
el.addEventListener("keyup", moved); el.addEventListener("click", moved);
|
|
1424
|
+
return () => { el.removeEventListener("keyup", moved); el.removeEventListener("click", moved); };
|
|
1425
|
+
}, [input.current]);
|
|
1426
|
+
useEffect(() => { // after a chosen number is in the box, the caret goes behind it
|
|
1427
|
+
const c = refCaret.current;
|
|
1428
|
+
if (c === null) return;
|
|
1429
|
+
refCaret.current = null;
|
|
1430
|
+
const el = input.current;
|
|
1431
|
+
if (el) try { el.focus(); el.setSelectionRange(c, c); } catch { /* no selection API */ }
|
|
1432
|
+
});
|
|
1433
|
+
// Task rows keep their own interaction; only exact marked background surfaces opt into strip focus.
|
|
1434
|
+
const chooseRef = (v) => {
|
|
1435
|
+
if (!v || !refAt) return;
|
|
1436
|
+
recordEdit(input.current); // #2342: a step Ctrl+Z goes back from
|
|
1437
|
+
const r = insertTaskRef(value, refAt, caret, v.code);
|
|
1438
|
+
refCaret.current = r.caret;
|
|
1439
|
+
setValue(r.text);
|
|
1440
|
+
};
|
|
1374
1441
|
// #1269: a command line runs the command (POST /ui/command); anything else — "/" included — is sent as before.
|
|
1375
1442
|
// The draft is consumed only by a command that starts: one still out keeps the new line in the composer (#1476 review).
|
|
1376
1443
|
const runLine = (cmd) => {
|
|
@@ -1402,6 +1469,12 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1402
1469
|
store.send(name);
|
|
1403
1470
|
};
|
|
1404
1471
|
const onKeyDown = (e) => {
|
|
1472
|
+
if (refOpen) {
|
|
1473
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") { e.preventDefault(); setRefSel((n) => (Math.min(n, refItems.length - 1) + (e.key === "ArrowDown" ? 1 : refItems.length - 1)) % refItems.length); return; }
|
|
1474
|
+
// On a touch screen Enter is a new line (the list is tapped); anywhere else it, and Tab, put the highlighted card in.
|
|
1475
|
+
if (((e.key === "Enter" && !touchScreen()) || e.key === "Tab") && !e.shiftKey && !e.ctrlKey && !e.metaKey && !e.isComposing) { e.preventDefault(); chooseRef(refItems[refPick]); return; }
|
|
1476
|
+
if (e.key === "Escape" && !e.isComposing) { e.preventDefault(); setRefClosed(value); return; }
|
|
1477
|
+
}
|
|
1405
1478
|
if (palette && palette.length && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
1406
1479
|
e.preventDefault();
|
|
1407
1480
|
setSel((n) => (Math.min(n, palette.length - 1) + (e.key === "ArrowDown" ? 1 : palette.length - 1)) % palette.length);
|
|
@@ -1421,7 +1494,8 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1421
1494
|
};
|
|
1422
1495
|
const paletteId = ids.cmdPalette || "cmdPalette";
|
|
1423
1496
|
const optId = (c) => ids.cmdPalette ? `${ids.cmdPalette}-${c.name}` : `cmd-${c.name}`;
|
|
1424
|
-
|
|
1497
|
+
const refListId = `${paletteId}-tasks`, refOptId = (v) => `${refListId}-${v.code}`;
|
|
1498
|
+
return html`<div class="composer-box" data-composer-focus ref=${bindings.box}>
|
|
1425
1499
|
${machineUnavailable ? html`<p class="note runtime-machine-unavailable" role="status">${t(inst.machine_status === "revoked" ? "chat.machineRevokedHint" : "chat.machineUnavailable",machineName(inst.machine_id,inst.machine_name))}</p>` : null}
|
|
1426
1500
|
${inst?.native_busy && !busy && !inst?.native_blocked ? html`<p class="note" role="status">${t("chat.nativeBusy")}</p>` : null}
|
|
1427
1501
|
${palette ? html`<ul data-trust="palette" class="cmd-palette" id=${paletteId} role="listbox" aria-label=${t("chat.cmdCommands")}>
|
|
@@ -1430,6 +1504,12 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1430
1504
|
<span class="cmd-name mono">/${c.name}${c.arg ? html` <span class="cmd-arg">${c.arg}</span>` : null}</span><span class="cmd-desc">${t(`chat.cmd_${c.name}`)}</span></li>`)
|
|
1431
1505
|
: html`<li class="cmd-none" role="option" aria-selected="false">${t(guest ? "chat.cmdNotGuests" : "chat.cmdNotCommand")}</li>`}
|
|
1432
1506
|
</ul>` : null}
|
|
1507
|
+
${refOpen ? html`<ul data-trust="palette" class="cmd-palette task-ref-list" id=${refListId} role="listbox" aria-label=${t("taskref.pickHint")}>
|
|
1508
|
+
${refItems.map((v, i) => html`<li key=${v.code} id=${refOptId(v)} role="option" tabindex="-1" aria-selected=${i === refPick ? "true" : "false"}
|
|
1509
|
+
class=${i === refPick ? "on" : ""} onMouseDown=${(e) => { e.preventDefault(); chooseRef(v); }}>
|
|
1510
|
+
<span class="cmd-name mono">${v.code}</span><span class="cmd-desc">${v.title}</span>
|
|
1511
|
+
<span class=${`tb-pill st-${v.status}`}>${t(`taskref.s.${v.status}`)}</span></li>`)}
|
|
1512
|
+
</ul>` : null}
|
|
1433
1513
|
${reply ? html`<div class="reply-bar" data-trust="composer" role="status">
|
|
1434
1514
|
<span class="reply-mark" aria-hidden="true"><svg class="icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11"/></svg></span><span class="reply-label">${t("chat.replyingTo", reply.sender)}</span>
|
|
1435
1515
|
<span class="reply-text">${replySnippet(reply)}</span>
|
|
@@ -1437,7 +1517,8 @@ function Composer({ name, inst, label = name, lease, busy, bindings, ids = {}, f
|
|
|
1437
1517
|
</div>` : null}
|
|
1438
1518
|
${files.length ? html`<div class="pending-files">${files.map((f, i) => html`<${FileChip} bindings=${bindings} key=${`${f.name}-${i}`} f=${f} i=${i} name=${name} />`)}</div>` : null}
|
|
1439
1519
|
<${ComposerInput} inputRef=${input} ids=${ids} value=${value} placeholder=${t("chat.composerPlaceholder", label)} onValue=${setValue}
|
|
1440
|
-
onKeyDown=${onKeyDown} onPaste=${onPaste} controls=${palette ? paletteId : undefined} expanded=${!!palette
|
|
1520
|
+
onKeyDown=${onKeyDown} onPaste=${onPaste} controls=${palette ? paletteId : refOpen ? refListId : undefined} expanded=${!!palette || refOpen}
|
|
1521
|
+
activeDescendant=${pick ? optId(pick) : refOpen ? refOptId(refItems[refPick]) : undefined}
|
|
1441
1522
|
attach=${attachmentsSupported ? { title: t("chat.attachTitle"), onFiles: (list) => store.addFiles(name, list) } : null}
|
|
1442
1523
|
stop=${HIDDEN_STOP}
|
|
1443
1524
|
tools=${toolsHere && !narrow && !guestPage() ? html`<${ComposerTools} name=${name} inst=${inst} lease=${lease} short=${true} />` : null}
|
package/dist/ui/panel-details.js
CHANGED
|
@@ -144,6 +144,22 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
|
|
|
144
144
|
const src = (s) => (s === "instance" ? ` ${t("chat.configured")}` : s === "fleet-default" ? ` ${t("chat.fleetDefault")}` : "");
|
|
145
145
|
const bar = (pct, level) => html`<span class="progress-bar"><span class=${`progress-fill${level ? ` ${level}` : ""}`} data-pct=${Math.max(0, Math.min(Number(pct) || 0, 100))}></span></span>`;
|
|
146
146
|
const row = (k, v) => html`<div class="kv"><span class="k">${k}</span><span class="v">${v}</span></div>`;
|
|
147
|
+
// M-3522: what the agent's CLI loads every session, with a warning per file over its limit (50 KB, or Codex's cut-off).
|
|
148
|
+
const kb = (n) => (n < 1024 ? `${n.toLocaleString()} B` : `${(n / 1024).toLocaleString(undefined, { maximumFractionDigits: 1 })} KB`);
|
|
149
|
+
const loaded = (f) => {
|
|
150
|
+
if (!f || !Array.isArray(f.files) || !f.files.length) return null;
|
|
151
|
+
const over = f.files.filter((x) => !x.includedIn && x.bytes > x.limit);
|
|
152
|
+
return html`<section class="card d-loaded" data-instruction-files>
|
|
153
|
+
<h3>${pt("loadedTitle")}</h3>
|
|
154
|
+
${f.files.map((x) => row(x.kind === "inline" ? html`${x.label}` : html`<span class="mono">${x.label}</span>`,
|
|
155
|
+
// Text the CLI's project file already holds (its fleet instructions block) is shown for reference, not counted again.
|
|
156
|
+
x.includedIn ? html`<span class="muted" data-included-in=${x.includedIn}>${pt("loadedIncluded", x.includedIn, kb(x.bytes))}</span>`
|
|
157
|
+
: html`<span class=${x.bytes > x.limit ? "warn" : ""} data-over=${x.bytes > x.limit ? "1" : undefined}>${kb(x.bytes)}</span>`))}
|
|
158
|
+
<div class="kv d-loaded-total"><span class="k">${pt("loadedTotal")}</span><span class="v">${kb(f.total)}</span></div>
|
|
159
|
+
${over.length ? html`<p class="note warn" role="status" data-instruction-warning>${over.some((x) => x.truncates) ? pt("loadedTruncates", kb(over.find((x) => x.truncates).limit)) : ""}${over.some((x) => !x.truncates) ? pt("loadedWarn", kb(f.warnBytes)) : ""}</p>`
|
|
160
|
+
: html`<p class="note">${pt("loadedNote")}</p>`}
|
|
161
|
+
</section>`;
|
|
162
|
+
};
|
|
147
163
|
let content;
|
|
148
164
|
if (failed) content = html`<${ErrorState} message=${t("chat.loadFailed")} onRetry=${load} />`;
|
|
149
165
|
else if (!d) content = html`<${Skeleton} lines=${6} />`;
|
|
@@ -176,6 +192,7 @@ function DetailsView({ name, inst, navKey, exec, awaiting }) {
|
|
|
176
192
|
${row(t("chat.dContext"), html`<span class="pct">${ctx != null ? `${Math.round(ctx)}%` : "--"}</span>${ctx != null ? bar(ctx, ctx > 80 ? "warn" : "") : null}`)}
|
|
177
193
|
${row(t("chat.dRate5"), html`<span class="pct">${Math.round(rl5)}%</span>${bar(rl5, rl5 > 90 ? "error" : rl5 > 70 ? "warn" : "")}`)}
|
|
178
194
|
${row(t("chat.dRate7"), html`<span class="pct">${Math.round(rl7)}%</span>${bar(rl7, rl7 > 90 ? "error" : rl7 > 70 ? "warn" : "")}`)}</section>
|
|
195
|
+
${loaded(d.instruction_files)}
|
|
179
196
|
<${InstanceBoardWork} name=${name} onOpen=${(id) => navigate(`/ui/fleet?card=${encodeURIComponent(id)}`)} />
|
|
180
197
|
<section class="card"><h3>${t("chat.dActivity")}</h3>${d.recent_activity?.length ? d.recent_activity.map((a, i) => html`<div key=${i} class="activity">
|
|
181
198
|
<span class="mono muted">${a.timestamp ? new Date(`${a.timestamp.replace(" ", "T")}Z`).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : ""}</span>
|
package/dist/ui/panel-fleet.js
CHANGED
|
@@ -75,7 +75,7 @@ register("fleet", {
|
|
|
75
75
|
hostMemory_elevated: "主機記憶體壓力偏高:新的 agent 一次啟動一個,至少間隔 5 秒",
|
|
76
76
|
hostMemory_critical: "主機記憶體壓力嚴重:新的 agent 會等記憶體恢復再啟動",
|
|
77
77
|
hostMemory_top: "最大:{0}", hostMemory_ownerFleet: "fleet 本身", hostMemory_ownerTmux: "tmux", hostMemory_ownerOther: "不屬於任何 Agent",
|
|
78
|
-
title: "Fleet", tasks: "
|
|
78
|
+
title: "Fleet", tasks: "任務", schedules: "排程", teams: "團隊", org: "組織圖", cache: "快取", usage: "用量", "host-health": "主機狀態",
|
|
79
79
|
docs: "文件", docsNewTab: "文件(在新分頁開啟)",
|
|
80
80
|
newSchedule: "新增排程", newTeam: "新增 team",
|
|
81
81
|
noSchedules: "還沒有排程", noSchedulesHint: "用 cron 自動執行例行工作。",
|
package/dist/ui/panel-hub.js
CHANGED
|
@@ -382,6 +382,8 @@ function useRooms() {
|
|
|
382
382
|
// and encoded into each call, never trusted as anything else.
|
|
383
383
|
const roomParam = () => { try { const v = new URLSearchParams(location.search).get("room"); return v && /^[A-Za-z0-9-]{1,64}$/.test(v) ? v : null; } catch { return null; } };
|
|
384
384
|
const roomPath = (id) => `/ui/hub?room=${encodeURIComponent(id)}`;
|
|
385
|
+
/** M-3533 R1: a group room's Chat or Office tab (design §2.1). */
|
|
386
|
+
const roomViewPath = (id, view) => (view === "office" ? `${roomPath(id)}&view=office` : roomPath(id));
|
|
385
387
|
/** cid-hub-shell-parity: the Notices page is /ui/hub?view=notices (the path every Hub listener and router already serves). */
|
|
386
388
|
const viewParam = () => { try { return new URLSearchParams(location.search).get("view"); } catch { return null; } };
|
|
387
389
|
export const NOTICES_PATH = "/ui/hub?view=notices";
|
|
@@ -591,7 +593,8 @@ function HubChats() {
|
|
|
591
593
|
// A room of a Hub with rooms: the shared thread with the room's store, composer and members panel (hub-room-thread.js).
|
|
592
594
|
if (id && listed && !listed.legacy) return html`<${HubRoomPage} key=${id} roomId=${id} listed=${listed} Thread=${HubThread} client=${hubClient()}
|
|
593
595
|
rooms=${rs.rooms} openRoom=${(rid) => navigate(roomPath(rid))} goList=${() => navigate("/ui/hub")}
|
|
594
|
-
onLeft=${() => { void refreshRooms(); navigate("/ui/hub"); }} onMe=${noteHubMeId} pinsOn=${roomPinsLive()}
|
|
596
|
+
onLeft=${() => { void refreshRooms(); navigate("/ui/hub"); }} onMe=${noteHubMeId} pinsOn=${roomPinsLive()}
|
|
597
|
+
view=${viewParam() === "office" ? "office" : "chat"} officeHref=${(v) => roomViewPath(id, v)} onView=${(v) => navigate(roomViewPath(id, v))} />`;
|
|
595
598
|
if (id && room) return html`<${HubRoomView} key=${id} room=${room} />`;
|
|
596
599
|
if (id) return html`<${HubRoomLoading} error=${rs.error} />`;
|
|
597
600
|
if (opening && (!rs.loaded || recentRoom(rs.rooms))) return html`<${PanelHeader} title=${hc("chats")} /><div class="hub-home"><div class="hub-home-pick center"><${Skeleton} variant="rows" lines=${4} /></div></div>`;
|
package/dist/ui/panel-needs.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {HostAlertActions,hostAlertText,hostAlertName,hostAlertDescription} from './host-alerts.js';
|
|
1
2
|
import { modelSwitchText } from "/assets/model-observation.js";
|
|
2
3
|
// #1408 step 4 = #1386 part (b): the "Needs you" panel (/ui/needs) — everything waiting on the person, from every
|
|
3
4
|
// world, in one list. Behind the session gate (/ui/js/), loaded the first time it is opened.
|
|
@@ -18,11 +19,12 @@ import { t, register } from "/assets/app-i18n.js";
|
|
|
18
19
|
import { appStore, createStore, useStore } from "/assets/app-store.js";
|
|
19
20
|
import { useLease } from "/assets/app-ctx.js";
|
|
20
21
|
import { PanelHeader, setTitle } from "/assets/app-shell.js";
|
|
21
|
-
import { chatPath } from "/assets/app-route.js";
|
|
22
|
+
import { fleetPath, chatPath } from "/assets/app-route.js";
|
|
22
23
|
import { namesOf, namesStore } from "/assets/instance-nav.js";
|
|
23
24
|
import { Empty, Skeleton } from "/assets/ui-states.js";
|
|
24
25
|
import { Icon } from "/assets/ui-icons.js";
|
|
25
26
|
import { toast } from "/assets/ui-toast.js";
|
|
27
|
+
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
26
28
|
import { notifyStore, notifySupport, configDetail, reasonText, refreshNotify, setNotify } from "/assets/app-needs.js";
|
|
27
29
|
import { openSignIn, signInOffered } from "./backend-signin.js";
|
|
28
30
|
import { decideProposal, installProposals } from "./agent-proposals.js";
|
|
@@ -33,8 +35,8 @@ import { HostDirectoryNotices, hostDirectoryNoticesOffered } from "./hub-host-se
|
|
|
33
35
|
|
|
34
36
|
// A pre-upgrade tab retains app-i18n.js. Register these reasons when the updated panel is loaded, too.
|
|
35
37
|
register("app", {
|
|
36
|
-
en: { 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" },
|
|
37
|
-
"zh-TW": { 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 伺服器或視窗" },
|
|
38
|
+
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" },
|
|
39
|
+
"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 伺服器或視窗" },
|
|
38
40
|
});
|
|
39
41
|
|
|
40
42
|
register("needs", {
|
|
@@ -42,8 +44,8 @@ register("needs", {
|
|
|
42
44
|
otherEmpty: "No other items are waiting for you.", title: "Needs you", empty: "Nothing needs you right now", emptyHint: "When an agent waits for you, it shows here — and in your chat app's General.", emptyHintWeb: "When an agent waits for you, it shows here.",
|
|
43
45
|
open: "Open chat", kiroOpen: "Open agent", kiroMigration: "Migration instructions", openCard: "Open the card", noAssignee: "Task board (nobody assigned)", fleetSignIns: "AI accounts", signIn: "Connect account",
|
|
44
46
|
gap: "not wrapped up: {0}", gapUnchecked: "{0} checklist item(s) unchecked", gapNoResult: "no result", gapJoin: ", ", acknowledge: "Acknowledge", acknowledging: "Acknowledging…", answering: "Answering…",
|
|
45
|
-
ageNow: "just now", ageMin: "{0} min", ageHour: "{0} h", ageDay: "{0} d",
|
|
46
|
-
notifyTitle: "Notify me on this device", notifyOn: "Notifications are on for this browser while a tab is open.",
|
|
47
|
+
ageNow: "just now", ageMin: "{0} min ago", ageHour: "{0} h ago", ageDay: "{0} d ago",
|
|
48
|
+
notifySection: "This device", notifyTitle: "Notify me on this device", notifyOn: "Notifications are on for this browser while a tab is open.",
|
|
47
49
|
notifyOff: "Get a desktop notification when something new needs you while this tab is in the background.",
|
|
48
50
|
notifyDenied: "This browser blocked notifications for AgEnD. Allow them in the site settings to turn this on.",
|
|
49
51
|
notifyMobile: "On a phone, rely on your chat app's notification: a new item is a new post in General.", notifyMobileWeb: "On a phone, open this page to see what needs you.",
|
|
@@ -67,8 +69,8 @@ register("needs", {
|
|
|
67
69
|
otherEmpty: "沒有其他待處理事項。", title: "等你處理", empty: "目前沒有需要你處理的事", emptyHint: "agent 在等你時,會出現在這裡——也會出現在聊天 app 的 General。", emptyHintWeb: "agent 在等你時,會出現在這裡。",
|
|
68
70
|
open: "開啟聊天", kiroOpen: "開啟 Agent", kiroMigration: "遷移說明", openCard: "打開卡片", noAssignee: "任務看板(沒有負責人)", fleetSignIns: "AI 帳號", signIn: "連接帳號",
|
|
69
71
|
gap: "還沒補齊:{0}", gapUnchecked: "還有 {0} 項沒勾", gapNoResult: "沒有產出總結", gapJoin: "、", acknowledge: "確認", acknowledging: "確認中…", answering: "回覆中…",
|
|
70
|
-
ageNow: "剛剛", ageMin: "{0}
|
|
71
|
-
notifyTitle: "在這台裝置通知我", notifyOn: "這個瀏覽器的通知已開啟(需要開著分頁)。",
|
|
72
|
+
ageNow: "剛剛", ageMin: "{0} 分鐘前", ageHour: "{0} 小時前", ageDay: "{0} 天前",
|
|
73
|
+
notifySection: "這台裝置", notifyTitle: "在這台裝置通知我", notifyOn: "這個瀏覽器的通知已開啟(需要開著分頁)。",
|
|
72
74
|
notifyOff: "分頁在背景時,有新的事等你處理就跳出桌面通知。",
|
|
73
75
|
notifyDenied: "這個瀏覽器封鎖了 AgEnD 的通知。請在網站設定中允許後再開啟。",
|
|
74
76
|
notifyMobile: "在手機上請以聊天 app 的通知為主:每個新項目都會在 General 發一則新訊息。", notifyMobileWeb: "在手機上請打開這個頁面查看等你處理的事。",
|
|
@@ -118,7 +120,7 @@ appStore.subscribe((st) => {
|
|
|
118
120
|
handedTo = st.chatOwner;
|
|
119
121
|
const items = Array.isArray(st.needs) ? st.needs : [];
|
|
120
122
|
for (const nonce of Object.keys(claims.get().prompts)) {
|
|
121
|
-
handedTo.holdPrompt(items.find((i) => i.nonce === nonce) || { nonce, instance: "" });
|
|
123
|
+
handedTo.holdPrompt(items.find((i) => i.nonce === nonce) || { nonce, instance: "" }, claims.get().prompts[nonce] === "confirming");
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
const items = Array.isArray(st.needs) ? st.needs : [];
|
|
@@ -165,7 +167,7 @@ export function groupNeeds(items) {
|
|
|
165
167
|
const groups = new Map();
|
|
166
168
|
for (const item of items) {
|
|
167
169
|
// Configuration issues belong to Settings, not the unassigned task/sign-in group.
|
|
168
|
-
const key = JSON.stringify([item.instance, !item.instance && item.type === "config"]);
|
|
170
|
+
const key = JSON.stringify([item.instance, !item.instance && item.type === "config",item.type==='host']);
|
|
169
171
|
const group = groups.get(key);
|
|
170
172
|
if (group) group.items.push(item);
|
|
171
173
|
else groups.set(key, { instance: item.instance, items: [item] });
|
|
@@ -217,8 +219,8 @@ export function NeedsPanel({ navKey }) {
|
|
|
217
219
|
</section>` : null}
|
|
218
220
|
${(!ready || needsLoaded === false) && !items.length && !asks.length ? html`<${Skeleton} variant="rows" lines=${3} />`
|
|
219
221
|
: !items.length && !asks.length && !decidedHere.length ? hostDirectoryNoticesOffered() ? html`<p class="muted">${tn("otherEmpty")}</p>` : html`<${Empty} icon="check" title=${tn("empty")} hint=${tn(chatApp ? "emptyHint" : "emptyHintWeb")} />`
|
|
220
|
-
: groups.map((g) => html`<section key=${JSON.stringify([g.instance, g.items[0]?.type === "config", !!g.items[0]?.runtimeUpdate])} class="n-group" aria-label=${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance}>
|
|
221
|
-
<h2 class="n-group-head">${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance ? html`<a href=${chatPath(g.instance)} title=${g.instance}>${nameFor(g.instance)}</a>` : g.items[0]?.type === "config" ? t("app.settings") : tn(g.items.some(i => i.type === "backend") ? "fleetSignIns" : "noAssignee")}</h2>
|
|
222
|
+
: groups.map((g) => html`<section key=${JSON.stringify([g.instance, g.items[0]?.type === "config",g.items[0]?.type === 'host', !!g.items[0]?.runtimeUpdate])} class="n-group" aria-label=${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance}>
|
|
223
|
+
<h2 class="n-group-head">${g.items[0]?.runtimeUpdate ? runtimeUpdateText("attention") : g.instance ? html`<a href=${chatPath(g.instance)} title=${g.instance}>${nameFor(g.instance)}</a>` : g.items[0]?.type==='host'?hostAlertText('title'):g.items[0]?.type === "config" ? t("app.settings") : tn(g.items.some(i => i.type === "backend") ? "fleetSignIns" : "noAssignee")}</h2>
|
|
222
224
|
${g.items.map((item) => item.type === "contact"
|
|
223
225
|
// M-3339: a contact request or the restricted-mode suggestion — its own card (contact-needs.js; references only).
|
|
224
226
|
? html`<${ContactNeedsItem} key=${item.id} item=${item} />`
|
|
@@ -242,6 +244,14 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
242
244
|
// Only before Chat has booted: the page's own claim on this nonce, taken now (synchronously), kept until the
|
|
243
245
|
// server's list drops the prompt (or the answer fails).
|
|
244
246
|
if (claims.get().prompts[item.nonce]) return;
|
|
247
|
+
const confirmation = item.actions?.find(a => a.id === action)?.confirmation;
|
|
248
|
+
setClaim("prompts", item.nonce, confirmation ? "confirming" : "busy");
|
|
249
|
+
if (confirmation && !await confirmDialog({ ...confirmation, danger: true })) {
|
|
250
|
+
setClaim("prompts", item.nonce, null);
|
|
251
|
+
// Chat may have adopted this confirmation while its dialog was open. Give its claim back too.
|
|
252
|
+
chatOwner()?.releasePrompt(item.nonce);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
245
255
|
setClaim("prompts", item.nonce, "busy");
|
|
246
256
|
let r = null;
|
|
247
257
|
try {
|
|
@@ -272,13 +282,14 @@ function NeedsItem({ item, nowMs, owner }) {
|
|
|
272
282
|
return html`<article data-trust="permission" class=${`n-item${BAD.has(item.reason) ? " bad" : ""}`}>
|
|
273
283
|
<span class="n-icon"><${Icon} name=${ICON[item.type] || "alert"} size=${18} /></span>
|
|
274
284
|
<div class="n-body">
|
|
275
|
-
<div class="n-title"><strong>${itemReason(item)}</strong><span class="n-age">${age(item.since, nowMs)}</span></div>
|
|
276
|
-
${
|
|
285
|
+
<div class="n-title"><strong>${item.type==='host'?hostAlertName(item.hostAlert):itemReason(item)}</strong><span class="n-age">${item.type==='host'?hostAlertText('started')+age(item.since, nowMs):age(item.since, nowMs)}</span></div>
|
|
286
|
+
${item.type==='host'&&item.hostAlert?html`<p class="n-detail">${hostAlertText(item.hostAlert.level)} · ${hostAlertDescription(item.hostAlert)}</p>`:item.type==='host'?html`<p class="n-detail">${hostAlertText('failed')}</p>`:detailOf(item)?html`<p class="n-detail">${detailOf(item)}</p>`:null}
|
|
277
287
|
${item.type === "hub" && item.hubProposal ? html`<p class="n-detail">${item.hubProposal.action}</p><pre>${item.hubProposal.arguments}</pre><p class="n-detail">${item.hubProposal.consequences}</p>` : null}
|
|
278
288
|
${item.generalLocation ? html`<${GeneralLocation} name=${item.instance} attentionOnly=${true} />` : null}
|
|
289
|
+
${item.type==='host'?(item.hostAlert?html`<${HostAlertActions} record=${item.hostAlert}/>`:html`<a class="btn btn-sm" href=${fleetPath('host-health')}>${hostAlertText('open')}</a>`):null}
|
|
279
290
|
<div class="n-actions">
|
|
280
291
|
${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"
|
|
281
|
-
disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy : fallback === "busy") ? tn("answering") : a.label}</button>`) : null}
|
|
292
|
+
disabled=${promptBusy} onClick=${() => answer(a.id)}>${(p ? p.busy && !p.confirming : fallback === "busy") ? tn("answering") : a.label}</button>`) : null}
|
|
282
293
|
${item.type === "delivery" || item.type === "missed" ? html`<button type="button" class="btn btn-sm" disabled=${!!ack} onClick=${acknowledge}>
|
|
283
294
|
<${Icon} name="check" size=${14} />${ack === "busy" ? tn("acknowledging") : tn("acknowledge")}</button>` : null}
|
|
284
295
|
${(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}
|
|
@@ -405,9 +416,18 @@ function NotifyToggle() {
|
|
|
405
416
|
const { connections } = useStore(appStore);
|
|
406
417
|
const note = support === "mobile" ? tn(connections > 0 ? "notifyMobile" : "notifyMobileWeb") : support === "insecure" ? tn("notifyInsecure")
|
|
407
418
|
: support !== "ok" ? tn("notifyUnsupported") : state === "denied" ? tn("notifyDenied") : on ? tn("notifyOn") : tn("notifyOff");
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
419
|
+
// M-3503 (the user): a setting of this device, not an item waiting — its own section under the list (a rule above it,
|
|
420
|
+
// its own heading), drawn as an item row (icon, then the words and the button) so every card's text and buttons share
|
|
421
|
+
// one edge. Its own class names (styled with the items' in app.css): nothing that counts the items counts it.
|
|
422
|
+
return html`<section class="n-settings" aria-labelledby="n-settings-head"><h2 class="n-settings-head" id="n-settings-head">${tn("notifySection")}</h2>
|
|
423
|
+
<article class="n-notify">
|
|
424
|
+
<span class="n-notify-icon"><${Icon} name="bell" size=${18} /></span>
|
|
425
|
+
<div class="n-notify-body">
|
|
426
|
+
<div class="n-notify-title"><strong>${tn("notifyTitle")}</strong></div>
|
|
427
|
+
<p class="n-notify-note note">${note}</p>
|
|
428
|
+
${support === "ok" ? html`<div class="n-notify-actions"><button type="button" class=${`btn btn-sm${on ? "" : " btn-primary"}`} aria-pressed=${on ? "true" : "false"} disabled=${asking} onClick=${toggle}>
|
|
429
|
+
<${Icon} name="bell" size=${14} />${on ? tn("turnOff") : tn("turnOn")}</button></div>` : null}
|
|
430
|
+
</div>
|
|
431
|
+
</article>
|
|
412
432
|
</section>`;
|
|
413
433
|
}
|