@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
|
@@ -25,8 +25,9 @@ import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
|
25
25
|
import { Icon } from "/assets/ui-icons.js";
|
|
26
26
|
import { Menu } from "/assets/ui-menu.js";
|
|
27
27
|
import { toast } from "/assets/ui-toast.js";
|
|
28
|
-
import { GroupMark, groupLabel, groupOf as navGroupOf, modelText } from "/assets/instance-nav.js";
|
|
28
|
+
import { GroupMark, groupLabel, groupOf as navGroupOf, modelText, labelOf } from "/assets/instance-nav.js";
|
|
29
29
|
import "./settings-strings.js";
|
|
30
|
+
import "./settings-default-model-strings.js";
|
|
30
31
|
import "./settings-shared-strings.js"; // see settings-shared.js: the words Shared agent settings added, which an older settings-strings.js in an open tab lacks
|
|
31
32
|
import "./agent-page-strings.js"; // the confirmation text of the MCP proxy reply
|
|
32
33
|
import "./settings-restart-strings.js"; // S-92: the restart words for a fleet with no chat connection (a file of its own: an open tab may hold an old settings-strings.js)
|
|
@@ -46,6 +47,7 @@ import {
|
|
|
46
47
|
AgentDialog, BackendSelect, BotDialog, ChipList, ClassicDialog, DefaultMark, Feedback, Impact, InEffect, Inherited, Label,
|
|
47
48
|
NewBotDialog, Override, Select, ask, impactText, inAgentDefaults, valueText,
|
|
48
49
|
} from "./settings-dialogs.js";
|
|
50
|
+
import { defaultIdentityRecord, runningDefaultIdentityTargets } from "./settings-default-model-scope.js";
|
|
49
51
|
import { InfoTip, SharedAgentSettings, sharedNotes } from "./settings-shared.js";
|
|
50
52
|
import { QuotaNoticeSettings, quotaNoticeText } from "./settings-quota-notice.js";
|
|
51
53
|
import { SetupWizard } from "./settings-wizard.js";
|
|
@@ -119,6 +121,7 @@ export async function loadAll(lease) {
|
|
|
119
121
|
if (!lease.current()) return null;
|
|
120
122
|
if (!fleet.ok) return { error: true };
|
|
121
123
|
out.fleet = fleet.body || {};
|
|
124
|
+
if(out.schema?.host_alert_defaults){const alerts=await read(lease,'/api/settings/fleet/host-alerts');if(!lease.current())return null;out.hostAlerts=alerts.ok?alerts.body:null;}
|
|
122
125
|
const classic = await read(lease, "/api/settings/classic");
|
|
123
126
|
if (!lease.current()) return null;
|
|
124
127
|
out.classic = classic.body || {};
|
|
@@ -139,7 +142,7 @@ async function loadLive(lease) {
|
|
|
139
142
|
if (!lease.current()) return null;
|
|
140
143
|
const live = {}, classicLive = {};
|
|
141
144
|
if (f.ok && f.body && Array.isArray(f.body.instances)) for (const i of f.body.instances) {
|
|
142
|
-
live[i.name] = { status: i.status, state: i.state, backend: i.backend, model: i.model, model_display: modelText(i, i.model_display), effort: i.effort, effort_supported: i.effort_supported, runtime:i.runtime, capabilities:i.capabilities, machine_id:i.machine_id, machine_name:i.machine_name, machine_status:i.machine_status };
|
|
145
|
+
live[i.name] = { display_name: i.display_name || i.classicName, status: i.status, state: i.state, backend: i.backend, model: i.model, model_display: modelText(i, i.model_display), effort: i.effort, effort_supported: i.effort_supported, runtime:i.runtime, capabilities:i.capabilities, machine_id:i.machine_id, machine_name:i.machine_name, machine_status:i.machine_status };
|
|
143
146
|
if (i.classic) classicLive[i.name] = { status: i.status, state: i.state };
|
|
144
147
|
}
|
|
145
148
|
// /api/fleet carries live state for ClassicBot rooms; the profiles are the fallback for one not listed there yet.
|
|
@@ -348,7 +351,19 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
348
351
|
// Every confirmation before the first write: a cancelled one must not leave earlier changes applied and later
|
|
349
352
|
// ones pending (a surprising partial apply).
|
|
350
353
|
applying.current = true;
|
|
354
|
+
let confirmedRestartTargets = [];
|
|
355
|
+
const confirmedDefaultRequests = new Map();
|
|
351
356
|
try {
|
|
357
|
+
if ([...stagedRef.current.values()].some(c => c.sharedDefaults === "restart")) {
|
|
358
|
+
const shown = new Map([...stagedRef.current.values()].filter(c => c.sharedDefaults === "restart")
|
|
359
|
+
.flatMap(c => c.sharedDefaultsTargets || []).map(target => [target.name, target]));
|
|
360
|
+
confirmedRestartTargets = [...shown.values()];
|
|
361
|
+
for (const c of stagedRef.current.values()) if (c.sharedDefaults === "restart") confirmedDefaultRequests.set(c.stageKey, structuredClone(c.request));
|
|
362
|
+
const names = confirmedRestartTargets.map(({ name, label }) => name === label ? label : tn("defaultIdentityNamedTarget", label, name)).join("\n");
|
|
363
|
+
if (!(await ask(tn(confirmedRestartTargets.length === 1 ? "defaultIdentityRestartConfirmOne" : "defaultIdentityRestartConfirm", confirmedRestartTargets.length, names),
|
|
364
|
+
{ title: tn("defaultIdentityWhen"), confirmLabel: tn("defaultIdentityRestartButton"), danger: true }))) return;
|
|
365
|
+
if (!mount.current()) return;
|
|
366
|
+
}
|
|
352
367
|
// A panel that went while a question was open asks nothing more, and says nothing.
|
|
353
368
|
for (const c of [...stagedRef.current.values()]) {
|
|
354
369
|
for (const k of c.confirms || []) {
|
|
@@ -371,7 +386,9 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
371
386
|
if (failed) toast(tn("youSaveFailed"), false);
|
|
372
387
|
if (!stagedRef.current.size) { if (!failed) toast(tn("youSaved")); setDraftEpoch((n) => n + 1); return; }
|
|
373
388
|
}
|
|
374
|
-
const list = [...stagedRef.current.values()].map(({ label, impact, request, connectionSecret, stageKey, key }) => ({ label, impact, request, connectionSecret, stageKey, key
|
|
389
|
+
const list = [...stagedRef.current.values()].map(({ label, impact, request, connectionSecret, stageKey, key, sharedDefaults, notes }) => ({ label, impact, request, connectionSecret, stageKey, key, sharedDefaults, notes,
|
|
390
|
+
sharedDefaultsTargets: sharedDefaults === "restart" ? confirmedRestartTargets : [],
|
|
391
|
+
...(sharedDefaults === "restart" && confirmedDefaultRequests.has(stageKey) ? { request: confirmedDefaultRequests.get(stageKey) } : {}) }));
|
|
375
392
|
const handlers = new Map([...stagedRef.current.values()].filter((c) => typeof c.onResult === "function").map((c) => [c.stageKey, c.onResult]));
|
|
376
393
|
if (startOperation(list)) {
|
|
377
394
|
results.current = handlers; submitted.current = new Map(drafts.current); submittedStaged.current = new Map(stagedRef.current);
|
|
@@ -536,7 +553,7 @@ export function SettingsPanel({ route, navKey }) {
|
|
|
536
553
|
${section !== "runtimes" ? html`<${SettingsPageHead} section=${section}>${section === "agents" && ctx ? html`<button type="button" id="newAgentBtn" class="btn btn-primary" disabled=${yamlStaged(staged)} onClick=${() => toDialog({ kind: "create" })}><${Icon} name="plus" size=${16} />${tn("newAgent")}</button>` : null}</${SettingsPageHead}>` : null}
|
|
537
554
|
${searchable ? html`<div class="s-toolbar"><label class="s-search"><${Icon} name="search" size=${14} /><span class="sr-only">${tn("searchAll")}</span>
|
|
538
555
|
<input type="search" value=${search} placeholder=${tn("searchAll")} onInput=${(e) => setSearch(e.target.value)} /></label></div>` : null}
|
|
539
|
-
${op ? html`<${OperationCard} op=${op} schema=${data && data.schema} />` : null}
|
|
556
|
+
${op ? html`<${OperationCard} op=${op} schema=${data && data.schema} fleet=${data && data.fleet} classic=${data && data.classic} live=${data && data.live} />` : null}
|
|
540
557
|
<${PendingChanges} inline=${true} />
|
|
541
558
|
${ctx && (section === "agents" || section === "chat") ? html`<${FirstRunCard} onConnect=${openWizard} />` : null}
|
|
542
559
|
<div class="s-section-layout" data-section=${section}>${sectionBody}</div>
|
|
@@ -1071,8 +1088,25 @@ function livenessForm(d) {
|
|
|
1071
1088
|
/** `defaults.task_board` as saved, with the liveness part from the form (the defaults merge replaces `task_board` whole). */
|
|
1072
1089
|
function taskBoardDefaults(d, f) {
|
|
1073
1090
|
const n = (v) => Number(v);
|
|
1074
|
-
|
|
1091
|
+
const tb = d.task_board || {}, saved = wakesForm(d), w = f || saved;
|
|
1092
|
+
const out = { ...tb, liveness: f ? { enabled: f.liveOn, quiet_minutes: n(f.liveQuiet), prompt_minutes: n(f.livePrompt), crash_grace_minutes: n(f.liveCrash) }
|
|
1075
1093
|
: { enabled: ((d.task_board && d.task_board.liveness) || {}).enabled !== false, ...Object.fromEntries(["quiet_minutes", "prompt_minutes", "crash_grace_minutes"].map((k) => [k, ((d.task_board && d.task_board.liveness) || {})[k] ?? LIVENESS_DEFAULTS[k]])) } };
|
|
1094
|
+
// A wake switch the form leaves as saved stays as saved (absent stays absent: the file is not filled with defaults). One that was
|
|
1095
|
+
// changed is written — off, or on where the file already had the key — and put back to its default on, the key goes.
|
|
1096
|
+
for (const [key, field] of [["comment_wakes", "wakeComment"], ["progress_wakes", "wakeProgress"]]) {
|
|
1097
|
+
if (w[field] === saved[field]) continue;
|
|
1098
|
+
if (w[field] === false || hasOwn(tb, key)) out[key] = w[field]; else delete out[key];
|
|
1099
|
+
}
|
|
1100
|
+
if (w.wakeLeader !== saved.wakeLeader) { if (w.wakeLeader) out.leader = w.wakeLeader; else delete out.leader; }
|
|
1101
|
+
return out;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* The task board's wake switches (`defaults.task_board.comment_wakes`, `progress_wakes`, `leader`), as the form holds
|
|
1105
|
+
* them. Nothing written is the default: comments and progress wake, and the board has no leader.
|
|
1106
|
+
*/
|
|
1107
|
+
function wakesForm(d) {
|
|
1108
|
+
const tb = d.task_board || {};
|
|
1109
|
+
return { wakeComment: tb.comment_wakes !== false, wakeProgress: tb.progress_wakes !== false, wakeLeader: typeof tb.leader === "string" ? tb.leader.trim() : "" };
|
|
1076
1110
|
}
|
|
1077
1111
|
const minutesInRange = (v) => { const n = Number(v); return String(v).trim() !== "" && Number.isFinite(n) && n >= 1 && n <= 1440 ? "" : "livenessRange"; };
|
|
1078
1112
|
|
|
@@ -1089,6 +1123,8 @@ function generalForm(d, c, fleet = {}, schema = {}) {
|
|
|
1089
1123
|
hangOn: hang.enabled !== false, hang: String(hang.timeout_minutes ?? HANG_TIMEOUT_DEFAULT_MINUTES),
|
|
1090
1124
|
// #3647: telling a card's dispatcher when its assignee stops.
|
|
1091
1125
|
...livenessForm(d),
|
|
1126
|
+
// Which task board news wakes an agent.
|
|
1127
|
+
...wakesForm(d),
|
|
1092
1128
|
// #2347 §10 review: unset startup concurrency is automatic (deriveSpawnConcurrency: 2–10 by free memory and cores),
|
|
1093
1129
|
// not 10 — an empty field, and a save that leaves it unset (the defaults merge replaces `startup` whole).
|
|
1094
1130
|
concurrency: startup.concurrency == null ? "" : String(startup.concurrency), stagger: String(startup.stagger_delay_ms ?? 500),
|
|
@@ -1115,6 +1151,9 @@ function General({ ctx, part = "all" }) {
|
|
|
1115
1151
|
const original = useMemo(() => ({ c: structuredClone(c) }), []);
|
|
1116
1152
|
const base = useMemo(() => generalForm(d, c, ctx.fleet, schema), []);
|
|
1117
1153
|
const [f, setF] = useDraft(ctx, "general", () => base);
|
|
1154
|
+
const restartTargets = runningDefaultIdentityTargets(ctx.fleet, ctx.classic, ctx.live, { ...d, backend: f.backend, model: f.model });
|
|
1155
|
+
const restartTargetSignature = JSON.stringify(restartTargets);
|
|
1156
|
+
const sharedDefaultMode = f.defaultAdoption === "restart" && restartTargets.length ? "restart" : "next-start";
|
|
1118
1157
|
const set = (k) => (v) => setF((x) => ({ ...x, [k]: v }));
|
|
1119
1158
|
/** The class of a field's row: `field`, and `s-dirty` while one of its keys differs from what is saved. */
|
|
1120
1159
|
const fc = (cls, ...keys) => `${cls}${keys.some((k) => !sameValue(f[k], base[k])) ? " s-dirty" : ""}`;
|
|
@@ -1141,7 +1180,7 @@ function General({ ctx, part = "all" }) {
|
|
|
1141
1180
|
}
|
|
1142
1181
|
ctx.unstage("defaults:invalid");
|
|
1143
1182
|
const defaultsPatch = changedFields({
|
|
1144
|
-
backend: f.backend, model: f.model ||
|
|
1183
|
+
backend: f.backend, model: f.model || null, locale: f.locale || null, auto_pause_after: num(f.auto),
|
|
1145
1184
|
agent_mode: f.agent_mode, tool_set: f.tool_set || null, tool_progress: f.tool_progress, cross_instance_visibility: f.visibility,
|
|
1146
1185
|
tips: noticeMode(f.tips), reply_triggers: f.replyTriggers, reply_completion_guard: f.reply, log_level: f.log_level,
|
|
1147
1186
|
// The dashboard features every agent may use unless its own setting says otherwise. All of them go, because the write
|
|
@@ -1152,7 +1191,7 @@ function General({ ctx, part = "all" }) {
|
|
|
1152
1191
|
task_board: taskBoardDefaults(d, f),
|
|
1153
1192
|
startup: { ...(f.concurrency.trim() === "" ? {} : { concurrency: num(f.concurrency) }), stagger_delay_ms: num(f.stagger) },
|
|
1154
1193
|
}, {
|
|
1155
|
-
backend: d.backend || "claude-code", model: d.model ||
|
|
1194
|
+
backend: d.backend || "claude-code", model: d.model || null, locale: d.locale || null, auto_pause_after: d.auto_pause_after ?? 0,
|
|
1156
1195
|
agent_mode: d.agent_mode || "mcp", tool_set: TOOL_SETS.includes(d.tool_set) ? d.tool_set : null, tool_progress: d.tool_progress ?? "off",
|
|
1157
1196
|
tips: d.tips ?? true, cross_instance_visibility: visibilityDefault(d), reply_triggers: Boolean(d.reply_triggers ?? schema.reply_triggers_default), reply_completion_guard: d.reply_completion_guard ?? true, log_level: d.log_level || "info",
|
|
1158
1197
|
dashboard: Object.fromEntries(DASHBOARD_FEATURES.filter((k) => !Object.hasOwn(SEPARATE_FEATURE_KEYS, k)).map((k) => [k, dashboardDefault(d, k)])),
|
|
@@ -1184,12 +1223,15 @@ function General({ ctx, part = "all" }) {
|
|
|
1184
1223
|
const dKeys = Object.keys(defaultsPatch), cKeys = Object.keys(classicPatch);
|
|
1185
1224
|
// The bar says what this Save costs in the page's own words (how many agents restart), not a bare impact label.
|
|
1186
1225
|
syncStage(ctx, "defaults:fleet", dKeys.length ? { label: tn("updateDefaults"), count: dKeys.length,
|
|
1226
|
+
sharedDefaults: dKeys.some(k => k === "backend" || k === "model") ? sharedDefaultMode : undefined,
|
|
1227
|
+
sharedDefaultsTargets: restartTargets,
|
|
1187
1228
|
impact: batchImpact(schema, dKeys, (k) => defaultsImpact(schema, k)), notes: notes.bar.defaults,
|
|
1188
|
-
request: { method: "PUT", url: "/api/settings/fleet/defaults", body:
|
|
1229
|
+
request: { method: "PUT", url: "/api/settings/fleet/defaults", body: sharedDefaultMode === "restart" && dKeys.some(k => k === "backend" || k === "model")
|
|
1230
|
+
? { ...defaultsPatch, backend: f.backend, model: f.model || null } : defaultsPatch } } : null);
|
|
1189
1231
|
syncStage(ctx, "defaults:classic", cKeys.length ? { label: tn("updateClassicDefaults"), count: cKeys.length,
|
|
1190
1232
|
impact: cKeys.every((k) => impactOf(schema, `classic_defaults.${k}`) === "now") ? "now" : "fleet",
|
|
1191
1233
|
request: { method: "PUT", url: "/api/settings/classic/defaults", body: classicPatch } } : null);
|
|
1192
|
-
}, [f, ready]);
|
|
1234
|
+
}, [f, ready, restartTargetSignature]);
|
|
1193
1235
|
// #2347 §10: a default nobody set in fleet.yaml shows the built-in value it holds, marked "default" until it is edited;
|
|
1194
1236
|
// ClassicBot's inherited ones say what they inherit from Agent defaults.
|
|
1195
1237
|
const unset = {
|
|
@@ -1200,6 +1242,8 @@ function General({ ctx, part = "all" }) {
|
|
|
1200
1242
|
// #3647: each threshold nobody set is the built-in default.
|
|
1201
1243
|
...(() => { const lv = (d.task_board && d.task_board.liveness) || {};
|
|
1202
1244
|
return { liveOn: !hasOwn(lv, "enabled"), liveQuiet: !hasOwn(lv, "quiet_minutes"), livePrompt: !hasOwn(lv, "prompt_minutes"), liveCrash: !hasOwn(lv, "crash_grace_minutes") }; })(),
|
|
1245
|
+
// Each wake switch nobody set is the built-in default (on; no leader).
|
|
1246
|
+
wakeComment: !hasOwn(d.task_board || {}, "comment_wakes"), wakeProgress: !hasOwn(d.task_board || {}, "progress_wakes"), wakeLeader: !hasOwn(d.task_board || {}, "leader"),
|
|
1203
1247
|
};
|
|
1204
1248
|
const fromDefaults = (k, value, target) => ({ text: valueText(value, k), builtin: !hasOwn(d, k), from: inAgentDefaults(target) });
|
|
1205
1249
|
const L = (text, field, id) => html`<${Label} text=${text} schema=${schema} field=${field} htmlFor=${id} />`;
|
|
@@ -1662,7 +1706,7 @@ export function PendingBar({ staged, busy, onApply, onDiscard, section }) {
|
|
|
1662
1706
|
}
|
|
1663
1707
|
|
|
1664
1708
|
/** The Apply in hand (the app's, settings-apply.js): its writes, its job, and a restart when one is needed. */
|
|
1665
|
-
export function OperationCard({ op, schema }) {
|
|
1709
|
+
export function OperationCard({ op, schema, fleet, classic, live }) {
|
|
1666
1710
|
const [restarting, setRestarting] = useState(false);
|
|
1667
1711
|
const busy = opBusy(op); // nothing to dismiss while it, or its restart, runs
|
|
1668
1712
|
const phaseBusy = ["writing", "posting", "watching"].includes(op.phase);
|
|
@@ -1704,11 +1748,12 @@ export function OperationCard({ op, schema }) {
|
|
|
1704
1748
|
${op.steps.length ? html`<ul class="s-op-steps">${op.steps.map((s, i) => html`<li key=${i} class=${`s-step ${s.status}`}>
|
|
1705
1749
|
<span class="s-step-icon" aria-hidden="true">${icon(s.status) ? html`<${Icon} name=${icon(s.status)} size=${14} />` : "·"}</span>
|
|
1706
1750
|
<span class="grow">${s.label}</span>
|
|
1707
|
-
<span class="note">${s.status === "waiting" ? tn("stepWaiting") : s.status === "skipped" ? tn("stepSkipped") : s.status === "failed" ? (s.error ? applyErrorText(s.error) : tn("applyFailed")) : s.note || impactText(s.impact)}</span></li>`)}</ul>` : null}
|
|
1751
|
+
<span class="note">${s.status === "waiting" ? tn("stepWaiting") : s.status === "skipped" ? tn("stepSkipped") : s.status === "failed" ? (s.error ? applyErrorText(s.error) : tn("applyFailed")) : s.note || (s.notes?.length ? s.notes.join(" · ") : s.sharedDefaults ? tn(s.sharedDefaults === "restart" ? "defaultIdentityRestart" : "defaultIdentityNext") : impactText(s.impact))}</span></li>`)}</ul>` : null}
|
|
1708
1752
|
${rows.length ? html`<ul class="s-op-steps">${rows.map((r) => html`<li key=${r.target} class=${`s-step ${r.status}`}>
|
|
1709
1753
|
<span class="s-step-icon" aria-hidden="true">${r.status === "done" ? html`<${Icon} name="check" size=${14} />` : r.status === "failed" ? html`<${Icon} name="alert" size=${14} />` : r.status === "restart-required" ? html`<${Icon} name="restart" size=${14} />` : "·"}</span>
|
|
1710
|
-
<span class="grow">${r.target === "fleet" ? "AgEnD" :
|
|
1711
|
-
|
|
1754
|
+
<span class="grow"><span class="s-op-name">${r.target === "fleet" ? "AgEnD" : labelOf(defaultIdentityRecord(r.target, fleet, classic, live))}</span>
|
|
1755
|
+
${r.target !== "fleet" && labelOf(defaultIdentityRecord(r.target, fleet, classic, live)) !== r.target ? html`<small class="note s-op-slug">${r.target}</small>` : null}</span>
|
|
1756
|
+
<span class="note">${r.target === "fleet" && r.status === "running" ? tn(r.kind === "hot" ? "connStartingNow" : "restartFleetTitle") : r.status === "restart-required" ? tn("applyRestartNeeded") : r.status === "next-start" || r.kind === "next-start" ? tn("defaultIdentityPending")
|
|
1712
1757
|
: r.settled_by === "no-change" ? tn("applyNoChange") : r.settled_by === "fleet-restart" ? tn("viaRestart") : r.kind === "hot" ? tn("impactNow") : tn("impactAgent")}</span>
|
|
1713
1758
|
${r.error ? html`<span class="feedback error">${r.error}</span>` : null}</li>`)}</ul>` : null}
|
|
1714
1759
|
${job && job.error ? html`<p class="feedback error">${job.error}</p>` : null}
|
|
@@ -11,6 +11,7 @@ import { appStore } from "/assets/app-store.js";
|
|
|
11
11
|
import { t } from "/assets/app-i18n.js";
|
|
12
12
|
import { toast } from "/assets/ui-toast.js";
|
|
13
13
|
import "./settings-strings.js";
|
|
14
|
+
import "./settings-default-model-strings.js";
|
|
14
15
|
import { api, confirmedWrite, newKey, selfConfirmed } from "./settings-confirm.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -33,7 +34,7 @@ function view() {
|
|
|
33
34
|
return {
|
|
34
35
|
id: op.id, phase: op.phase, error: op.error, job: op.job, lostJob: op.lostJob, restart: op.restart,
|
|
35
36
|
// stageKey: which staged change a step is (#2367 review: the panel tells that change's section how it went).
|
|
36
|
-
steps: op.steps.map(({ label, impact, status, error, pendingId, note, stageKey }) => ({ label, impact, status, error: error || null, pendingId: pendingId || null, ...(note ? { note } : {}), ...(stageKey ? { stageKey } : {}) })),
|
|
37
|
+
steps: op.steps.map(({ label, impact, status, error, pendingId, note, stageKey, sharedDefaults, notes }) => ({ label, impact, status, error: error || null, pendingId: pendingId || null, ...(note ? { note } : {}), ...(sharedDefaults ? { sharedDefaults } : {}), ...(notes?.length ? { notes } : {}), ...(stageKey ? { stageKey } : {}) })),
|
|
37
38
|
leftover: op.leftover,
|
|
38
39
|
};
|
|
39
40
|
}
|
|
@@ -105,6 +106,7 @@ async function run(o) {
|
|
|
105
106
|
stop(o, step);
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
109
|
+
if (step.sharedDefaults === "restart") step.sharedDefaultsConsent = res.body?.shared_defaults_consent;
|
|
108
110
|
step.status = "done"; publish();
|
|
109
111
|
}
|
|
110
112
|
if (!mine(o)) return;
|
|
@@ -162,7 +164,7 @@ function stop(o, failed) {
|
|
|
162
164
|
// What did not land can be staged again, except a secret, which has to be entered again. A write whose outcome is
|
|
163
165
|
// unknown goes back with its key; one the server refused, or that never ran, gets a new key when it is applied.
|
|
164
166
|
o.leftover = o.steps.filter((s) => (s.status === "failed" || s.status === "skipped") && s.request && !s.request.sensitive)
|
|
165
|
-
.map(({ label, impact, request, stageKey, key, ambiguous }) => ({ label, impact, request, stageKey, ...(ambiguous ? { key } : {}) }));
|
|
167
|
+
.map(({ label, impact, request, stageKey, key, ambiguous, sharedDefaults }) => ({ label, impact, request, stageKey, sharedDefaults, ...(ambiguous ? { key } : {}) }));
|
|
166
168
|
publish();
|
|
167
169
|
}
|
|
168
170
|
|
|
@@ -171,7 +173,10 @@ async function postApply(o) {
|
|
|
171
173
|
let res;
|
|
172
174
|
try {
|
|
173
175
|
res = await api("/api/settings/apply", { method: "POST", headers: { "Idempotency-Key": o.applyKey },
|
|
174
|
-
body: JSON.stringify({ idempotency_key: o.applyKey
|
|
176
|
+
body: JSON.stringify({ idempotency_key: o.applyKey,
|
|
177
|
+
...(o.steps.some(s => s.sharedDefaults) ? { shared_defaults: o.steps.some(s => s.sharedDefaults === "restart") ? "restart" : "next-start",
|
|
178
|
+
shared_defaults_consent: o.steps.find(s => s.sharedDefaults === "restart")?.sharedDefaultsConsent,
|
|
179
|
+
shared_defaults_targets: [...new Set(o.steps.filter(s => s.sharedDefaults === "restart").flatMap(s => s.sharedDefaultsTargets || []).map(t => t.name))] } : {}) }) });
|
|
175
180
|
} catch {
|
|
176
181
|
// The answer was lost (a phone between networks): the same key rejoins the same job, never a second one.
|
|
177
182
|
if (!mine(o)) return null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Shared Settings preview: use raw ownership, never expanded live config.
|
|
2
|
+
const effectiveIdentity = (inst, defaults) => {
|
|
3
|
+
const backend = inst.backend || defaults.backend || "claude-code";
|
|
4
|
+
const model = inst.model?.trim() || (inst.runtime !== "windows" && backend === (defaults.backend || "claude-code") ? defaults.model?.trim() : "") || "";
|
|
5
|
+
return [backend, model];
|
|
6
|
+
};
|
|
7
|
+
export const defaultIdentityTargets = (fleet, next) => Object.entries(fleet?.instances || {}).filter(([, inst]) => {
|
|
8
|
+
const before = effectiveIdentity(inst, fleet?.defaults || {}), after = effectiveIdentity(inst, next);
|
|
9
|
+
return before.some((v, i) => v !== after[i]);
|
|
10
|
+
}).map(([name]) => name);
|
|
11
|
+
|
|
12
|
+
export const defaultClassicTargets = (classic, before, after) => {
|
|
13
|
+
const d = classic?.defaults || {};
|
|
14
|
+
const values = (room, fleet) => {
|
|
15
|
+
const backend = room.backend || d.backend || fleet.backend || "claude-code";
|
|
16
|
+
const classicBackend = d.backend || fleet.backend || "claude-code";
|
|
17
|
+
return [backend, room.model || (backend === classicBackend && d.model)
|
|
18
|
+
|| (backend === (fleet.backend || "claude-code") && fleet.model) || ""];
|
|
19
|
+
};
|
|
20
|
+
return Object.entries(classic?.channels || {}).filter(([, room]) => room && typeof room === "object").filter(([, room]) => {
|
|
21
|
+
const a = values(room, before), b = values(room, after);
|
|
22
|
+
return a.some((v, i) => v !== b[i]);
|
|
23
|
+
}).map(([key, room]) => ({ key, instanceName: room.instanceName }));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** One identity form for preview, confirmation and result rows. */
|
|
27
|
+
export const defaultIdentityRecord = (name, fleet, classic, live = {}) => {
|
|
28
|
+
const room = Object.values(classic?.channels || {}).find(room => room?.instanceName === name);
|
|
29
|
+
const display = live?.[name]?.display_name || fleet?.instances?.[name]?.display_name || room?.display_name || room?.name;
|
|
30
|
+
return { name, ...(typeof display === "string" && display.trim() ? { display_name: display.trim() } : {}) };
|
|
31
|
+
};
|
|
32
|
+
/** Unknown/paused/stopped owners are deferred. The confirm never guesses they run. */
|
|
33
|
+
export const runningDefaultIdentityTargets = (fleet, classic, live = {}, next) => {
|
|
34
|
+
const names = new Set([...defaultIdentityTargets(fleet, next),
|
|
35
|
+
...defaultClassicTargets(classic, fleet?.defaults || {}, next).map(room => room.instanceName).filter(Boolean)]);
|
|
36
|
+
return [...names].filter(name => live?.[name]?.status === "running").map(name => {
|
|
37
|
+
const row = defaultIdentityRecord(name, fleet, classic, live);
|
|
38
|
+
return { name, label: row.display_name || name };
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { register } from "/assets/app-i18n.js";
|
|
2
|
+
register("settings", {
|
|
3
|
+
en: {
|
|
4
|
+
defaultIdentityRestartConfirmOne: "Restart 1 running agent now?\n\n{1}\n\nThis interrupts their current sessions. Stopped and paused agents stay stopped.",
|
|
5
|
+
defaultIdentityRestartButton: "Restart now",
|
|
6
|
+
defaultIdentityNamedTarget: "{0} ({1})",
|
|
7
|
+
defaultLabelWithUnit: "{0} ({1})",
|
|
8
|
+
changesApplied: "Changes applied. AgEnD is reconciling affected Agents.",
|
|
9
|
+
modelCatalogCached: "Source: AgEnD's cached CLI/account model list.",
|
|
10
|
+
|
|
11
|
+
defaultIdentityAffected: "Changes backend or model for {0} agents. Other backends keep their own model defaults.",
|
|
12
|
+
defaultIdentityNames: "Affected: {0}",
|
|
13
|
+
defaultIdentityRooms: "Also changes {0} ClassicBot room(s), with the same timing choice.",
|
|
14
|
+
defaultModelCount: "{0}/{1} agents on this backend inherit its shared model.",
|
|
15
|
+
defaultIdentityOtherEdits: "Other changes: {0}",
|
|
16
|
+
defaultIdentityWhen: "When to use the new backend or model",
|
|
17
|
+
defaultIdentityNext: "Next restart · no restart now",
|
|
18
|
+
defaultIdentityRestart: "Restart running agents now",
|
|
19
|
+
defaultIdentityChoiceHint: "Saved defaults wait for the next restart unless you choose to restart running agents now. Stopped and paused agents stay stopped. Other edited settings keep their own apply rules.",
|
|
20
|
+
defaultIdentityRestartConfirm: "Restart {0} running agents now?\n\n{1}\n\nThis interrupts their current sessions. Stopped and paused agents stay stopped.",
|
|
21
|
+
defaultIdentityPending: "Saved · applies on next restart",
|
|
22
|
+
},
|
|
23
|
+
"zh-TW": {
|
|
24
|
+
defaultIdentityRestartConfirmOne: "要立即重啟這 {0} 個執行中的 Agent 嗎?\n\n{1}\n\n這會中斷其目前的工作階段。已停止或暫停者不會啟動。",
|
|
25
|
+
defaultIdentityRestartButton: "立即重啟",
|
|
26
|
+
defaultIdentityNamedTarget: "{0}({1})",
|
|
27
|
+
defaultLabelWithUnit: "{0}({1})",
|
|
28
|
+
changesApplied: "變更已儲存,正在套用到受影響的 Agent。",
|
|
29
|
+
modelCatalogCached: "來源:AgEnD 已取得的 CLI/帳號模型清單。",
|
|
30
|
+
|
|
31
|
+
defaultIdentityAffected: "{0} 個 Agent 的後端或模型會改變;其他後端保留各自的預設模型。",
|
|
32
|
+
defaultIdentityNames: "受影響:{0}",
|
|
33
|
+
defaultIdentityRooms: "另有 {0} 個 ClassicBot 房間受影響,沿用相同的套用時間選擇。",
|
|
34
|
+
defaultModelCount: "此後端有 {0}/{1} 個 Agent 沿用共用模型。",
|
|
35
|
+
defaultIdentityOtherEdits: "其他修改:{0}",
|
|
36
|
+
defaultIdentityWhen: "何時使用新的後端或模型",
|
|
37
|
+
defaultIdentityNext: "下次重啟時(現在不重啟)",
|
|
38
|
+
defaultIdentityRestart: "立即重啟執行中的 Agent",
|
|
39
|
+
defaultIdentityChoiceHint: "儲存的預設值會等到下次重啟才套用,除非你選擇立即重啟。已停止或暫停的 Agent 不會啟動;其他修改仍依各自的套用方式處理。",
|
|
40
|
+
defaultIdentityRestartConfirm: "要立即重啟這 {0} 個執行中的 Agent 嗎?\n\n{1}\n\n這會中斷其目前的工作階段。已停止或暫停者不會啟動。",
|
|
41
|
+
defaultIdentityPending: "已儲存 · 下次重啟時套用",
|
|
42
|
+
},
|
|
43
|
+
});
|
|
@@ -19,7 +19,8 @@ import { goToTarget } from "./settings-registry.js";
|
|
|
19
19
|
import { sectionPath } from "/assets/app-route.js";
|
|
20
20
|
import { backendLabel } from "/assets/instance-nav.js";
|
|
21
21
|
import {AgentRuntimeSettings} from "./agent-runtime-settings.js";
|
|
22
|
-
import "./settings-strings.js";
|
|
22
|
+
import "./settings-strings.js";
|
|
23
|
+
import "./settings-default-model-strings.js"; // its words, wherever a picker of this file is used (#2072: Fleet's create dialog too)
|
|
23
24
|
import "./settings-shared-strings.js";
|
|
24
25
|
import { pt } from "./agent-page-strings.js";
|
|
25
26
|
import { ew } from "./effort-field-strings.js"; // the effort field's words: lazy and fixed (a retained old agent-page-strings lacks them)
|
|
@@ -68,7 +69,7 @@ export const choiceOptions = (field, values) => values.map((v) => ({ value: v, l
|
|
|
68
69
|
export function Select({ value, options, onChange, disabled, id, label }) {
|
|
69
70
|
const opts = options.map((o) => (typeof o === "string" ? { value: o, label: o } : o));
|
|
70
71
|
return html`<select id=${id} value=${value} disabled=${disabled} aria-label=${label} onChange=${(e) => onChange(e.target.value)}>
|
|
71
|
-
${opts.map((o) => html`<option key=${o.value} value=${o.value}>${o.label}</option>`)}</select>`;
|
|
72
|
+
${opts.map((o) => html`<option key=${o.value} value=${o.value} disabled=${o.disabled}>${o.label}</option>`)}</select>`;
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
74
75
|
* #2072: a backend field shows every backend with what this host says about it — one it cannot run is disabled with
|
|
@@ -439,6 +440,8 @@ export function AgentFields({ m, cat, onDelete, idPrefix = "" }) {
|
|
|
439
440
|
${windows ? null : html`<${Card} title=${pt("cardInstructions")} span=${true}>
|
|
440
441
|
<div class="field">${L(pt("lbl_instructions"), "instance.systemPrompt", "ag-sys", pt("tip_instructions"))}<${InstructionsField} id=${fieldId("ag-sys")} value=${f.systemPrompt} saved=${inst.systemPrompt || ""} onChange=${set("systemPrompt")} />
|
|
441
442
|
<p class="note">${pt("note_instructions")}</p></div>
|
|
443
|
+
<div class="field">${L(pt("lbl_operations"), "instance.operations", "ag-ops", pt("tip_operations"))}<textarea id=${fieldId("ag-ops")} rows="4" maxLength=${2000} placeholder=${pt("ph_operations")} value=${f.operations} onInput=${(e) => set("operations")(e.target.value)} />
|
|
444
|
+
<p class="note">${pt("note_operations")}</p></div>
|
|
442
445
|
<${AgentTemplateTools} idPrefix=${idPrefix} name=${name} m=${m} /></${Card}>`}</div>`;
|
|
443
446
|
if (cat === "runtime") return html`<div class="ap-grid">
|
|
444
447
|
<${Card} title=${pt("cardRuntime")}>
|
|
@@ -447,7 +450,7 @@ export function AgentFields({ m, cat, onDelete, idPrefix = "" }) {
|
|
|
447
450
|
</${Card}>
|
|
448
451
|
<${Card} title=${pt("cardModel")}>
|
|
449
452
|
<div class="field">${L(tn("model"), "instance.model", "ag-model", pt("tip_model"))}<${ModelSelect} id=${fieldId("ag-model")} value=${f.model} onChange=${set("model")}
|
|
450
|
-
backend=${acctBackend} instance=${name} profile=${windows ? undefined : acct} inherit=${tn("inheritValue", defaults.model || tn("modelCliDefault"))} /></div>
|
|
453
|
+
backend=${acctBackend} instance=${name} profile=${windows ? undefined : acct} inherit=${tn("inheritValue", (!windows && acctBackend === (defaults.backend || "claude-code") && defaults.model) || tn("modelCliDefault"))} /></div>
|
|
451
454
|
<${EffortField} m=${m} id=${fieldId("ag-effort")} />
|
|
452
455
|
${acctBackend === "codex" && !windows ? html`<div class="field codex-speed">${L(tn("codexSpeed"), "instance.backend_options", "ag-speed", pt("tip_codexSpeed"))}
|
|
453
456
|
<${Select} id=${fieldId("ag-speed")} value=${f.codex_speed} onChange=${set("codex_speed")}
|
|
@@ -844,7 +847,7 @@ export function useClassicForm({ room, ctx }) {
|
|
|
844
847
|
const { fleet, classic, schema } = ctx;
|
|
845
848
|
const cd = (classic && classic.defaults) || {}, fd = fleet.defaults || {};
|
|
846
849
|
const inherited = {
|
|
847
|
-
backend: cd.backend || fd.backend || "claude-code",
|
|
850
|
+
backend: cd.backend || fd.backend || "claude-code",
|
|
848
851
|
auto_pause_after: cd.auto_pause_after ?? fd.auto_pause_after ?? 0, tool_progress: cd.tool_progress ?? fd.tool_progress ?? "off",
|
|
849
852
|
reply_triggers: Boolean(cd.reply_triggers ?? fd.reply_triggers ?? schema.reply_triggers_default),
|
|
850
853
|
reply_completion_guard: cd.reply_completion_guard ?? fd.reply_completion_guard ?? true,
|
|
@@ -921,6 +924,7 @@ export function useClassicForm({ room, ctx }) {
|
|
|
921
924
|
|
|
922
925
|
/** The fields of one category of a ClassicBot room: the dialog's fields, grouped, each with its ⓘ. */
|
|
923
926
|
export function ClassicFields({ m, cat, idPrefix = "" }) {
|
|
927
|
+
const cd = m.ctx.classic?.defaults || {};
|
|
924
928
|
const { c, f, set, setInherit, errors, classicMode, fd, inherited, roomInh, schema, L: originalLabel, acct, setAcct, acctBackend } = m;
|
|
925
929
|
const fieldId = key => key == null ? key : `${idPrefix}${key}`;
|
|
926
930
|
const L = (text, field, key, tip) => originalLabel(text, field, fieldId(key), tip);
|
|
@@ -929,7 +933,7 @@ export function ClassicFields({ m, cat, idPrefix = "" }) {
|
|
|
929
933
|
${!c.backend && f.backend === inherited.backend ? html`<${Inherited} ...${roomInh("backend", "backend", "#g-cbe", "#g-be")} />` : null}
|
|
930
934
|
${capsOf(acctBackend)?.namedAccounts ? html`<${AccountSelect} id=${fieldId("cl-account")} backend=${acctBackend} value=${acct} onChange=${setAcct} />` : null}</div>
|
|
931
935
|
<div class="field">${L(tn("model"), "classic.model", "cl-model", pt("tip_classicModel"))}<${ModelSelect} id=${fieldId("cl-model")} value=${f.model} onChange=${set("model")}
|
|
932
|
-
backend=${f.backend} instance=${c.instanceName} profile=${acct} inherit=${tn("inheritValue",
|
|
936
|
+
backend=${f.backend} instance=${c.instanceName} profile=${acct} inherit=${tn("inheritValue", ((f.backend === (cd.backend || fd.backend || "claude-code") && cd.model?.trim()) || (f.backend === (fd.backend || "claude-code") && fd.model?.trim())) || tn("modelCliDefault"))} /></div>
|
|
933
937
|
<div class="field">${L(`${tn("autoPause")} (${tn("minutes")})`, "classic.auto_pause_after", "cl-auto", pt("tip_classicAutoPause"))}
|
|
934
938
|
<${Override} inherit=${f.inherit.auto_pause_after} onInherit=${setInherit("auto_pause_after")} inherited=${roomInh("auto_pause_after", "minutes", "#classicbot", "#g-auto")}>
|
|
935
939
|
<input id=${fieldId("cl-auto")} type="number" min="0" step="1" class=${errors.auto ? "invalid" : ""} disabled=${f.inherit.auto_pause_after}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {monitoringHelp} from './host-monitoring-help.js';
|
|
2
|
+
import {html,useEffect} from '/assets/app-html.js';
|
|
3
|
+
import {register,t} from '/assets/app-i18n.js';
|
|
4
|
+
import {useDraft,syncStage} from './settings-draft.js';
|
|
5
|
+
import {hostAlertText,hostAlertDrive,hostAlertName} from './host-alerts.js';
|
|
6
|
+
register('hostAlertSettings',{
|
|
7
|
+
en:{title:'Host alert settings',needs:'Show in Needs you',general:'Send summaries to General',handoff:'General is off initially. The existing disk-watch script keeps sending its own alerts, so turning General on may send duplicate alerts.',resource:'Resource',warning:'Warning',urgent:'Urgent',clear:'Recovery',percent:'Percent used',gib:'GiB available',criticalOnly:'Alert only at critical',criticalHint:'Elevated pressure will not open a warning. Turning this on clears existing elevated warnings; critical alerts and recovery are unchanged.',fixed:'Memory thresholds use the existing Normal / Elevated / Critical pressure states.',defaults:'Restore defaults',holds:'Threshold holds and recovery delays keep brief spikes from becoming alerts. Acknowledgment does not hide a problem; snooze it from Host health.',off:'Rules are saved while monitoring is off. No alert checks, notification retries or incident files run while off.'},
|
|
8
|
+
'zh-TW':{title:'主機警示設定',needs:'顯示在「等你處理」',general:'傳送摘要至 General',handoff:'General 通知預設關閉。現有 disk-watch 腳本仍會傳送自己的警示,開啟 General 通知可能會收到重複提醒。',resource:'監測項目',warning:'注意',urgent:'緊急',clear:'恢復',percent:'使用率(%)',gib:'可用 GiB',criticalOnly:'只在嚴重時警示',criticalHint:'壓力偏高時不發出注意警示。開啟後會清除現有的偏高警示;嚴重警示與恢復條件不變。',fixed:'記憶體門檻沿用正常/偏高/嚴重的壓力狀態。',defaults:'還原預設值',holds:'門檻持續時間與恢復延遲可避免短暫尖峰觸發警示。標記已看過不會隱藏問題;可在主機狀態暫停提醒。',off:'監測關閉時仍可儲存規則,但不會執行警示檢查、通知重試或建立問題檔案。'}
|
|
9
|
+
});
|
|
10
|
+
const text=k=>t('hostAlertSettings.'+k);
|
|
11
|
+
export function HostAlertSettings({ctx,health}){
|
|
12
|
+
const defaults=ctx.schema?.host_alert_defaults,base=ctx.hostAlerts;
|
|
13
|
+
const [form,setForm]=useDraft(ctx,'host-alerts',()=>base||{version:1,needsYou:true,general:false,rules:{}});
|
|
14
|
+
useEffect(()=>{syncStage(ctx,'host-alerts',base&&defaults&&JSON.stringify(form)!==JSON.stringify(base)?{label:text('title'),impact:'now',request:{method:'PUT',url:'/api/settings/fleet/host-alerts',body:form}}:null);},[form,base,defaults]);
|
|
15
|
+
if(!base||!defaults)return null;
|
|
16
|
+
const disks=(health?.disks?.value?.volumes||[]).slice(0,62),resources=[{key:'cpu',kind:'cpu',name:hostAlertText('cpu')},{key:'memory',kind:'memory',name:hostAlertText('memory')},...disks.map(v=>({key:'disk:'+v.id,kind:v.roles.includes('wsl-backing')?'backing-drive':'filesystem',name:hostAlertName({key:'disk:'+v.id,kind:v.roles.includes('wsl-backing')?'backing-drive':'filesystem'})+hostAlertDrive(v.drive)}))];
|
|
17
|
+
for(const [key,rule] of Object.entries(form.rules))if(!resources.some(r=>r.key===key))resources.push({key,kind:rule.kind,name:hostAlertText(rule.kind==='backing-drive'?'backing':'filesystem')+' · '+key.slice(-6)});
|
|
18
|
+
const update=(key,kind,field,value)=>setForm(f=>({...f,rules:{...f.rules,[key]:{...defaults[kind],...f.rules[key],[field]:value}}}));
|
|
19
|
+
const reset=()=>setForm(f=>({...f,rules:{}}));
|
|
20
|
+
const choice=(key,label)=>html`<div class="s-setting-row"><div class="s-setting-copy"><label for=${'hostAlert-'+key}>${text(label)}</label></div><input id=${'hostAlert-'+key} class="s-ui-toggle" type="checkbox" role="switch" checked=${form[key]} onChange=${e=>setForm(f=>({...f,[key]:e.target.checked}))}/></div>`;
|
|
21
|
+
return html`<div class="host-alert-settings"><h4>${text('title')}</h4>${choice('needsYou','needs')}${choice('general','general')}<p class="note">${text('handoff')}</p>
|
|
22
|
+
<details><summary>${text('resource')}</summary>${resources.map(resource=>{const rule=form.rules[resource.key]||defaults[resource.kind],factor=resource.kind==='backing-drive'?1024**3:1;return html`<fieldset class="field" key=${resource.key}><legend>${resource.name}</legend>${resource.kind==='memory'?html`<p class="note">${text('fixed')}</p><p class="note" data-memory-default-help>${monitoringHelp(ctx.schema?.host_monitoring_platform??health?.platform,'alertHint')}</p><div class="s-setting-row"><div class="s-setting-copy"><label for="alert-memory-criticalOnly">${text('criticalOnly')}</label></div><input id="alert-memory-criticalOnly" class="s-ui-toggle" type="checkbox" role="switch" checked=${rule.criticalOnly===true} aria-describedby="alert-memory-critical-hint" onChange=${e=>update(resource.key,resource.kind,'criticalOnly',e.target.checked)}/></div><p class="note" id="alert-memory-critical-hint">${text('criticalHint')}</p>`:html`<p class="note">${text(resource.kind==='backing-drive'?'gib':'percent')}</p><div class="grid2">${['warning','urgent','clear'].map(field=>html`<div class="field"><label for=${'alert-'+resource.key+'-'+field}>${text(field)}</label><input id=${'alert-'+resource.key+'-'+field} type="number" min="0" step=${resource.kind==='backing-drive'?'1':'0.1'} value=${rule[field]/factor} onInput=${e=>update(resource.key,resource.kind,field,Number(e.target.value)*factor)}/></div>`)}</div>`}</fieldset>`;})}<button class="btn btn-sm" type="button" onClick=${reset}>${text('defaults')}</button></details><p class="note">${text('holds')}</p><p class="note">${text('off')}</p></div>`;
|
|
23
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {monitoringHelp} from './host-monitoring-help.js';
|
|
2
|
+
import {HostAlertSettings} from './settings-host-alerts.js';
|
|
1
3
|
import { html, useEffect, useRef, useState } from '/assets/app-html.js';
|
|
2
4
|
import { register, t } from '/assets/app-i18n.js';
|
|
3
5
|
import { confirmDialog } from '/assets/ui-confirm.js';
|
|
@@ -6,16 +8,16 @@ import { fleetPath } from '/assets/app-route.js';
|
|
|
6
8
|
import { hostMonitoringVisible } from './settings-capabilities.js';
|
|
7
9
|
register('hostMonitoring', {
|
|
8
10
|
en: { open:'View host health',title:'Host monitoring', enabled:'Monitor this computer', agents:'Include agent footprint',
|
|
9
|
-
hint:'Samples every 30–60 seconds; keeps up to 64 MiB locally. Memory and
|
|
10
|
-
agentHint:'Optional
|
|
11
|
+
hint:'Samples every 30–60 seconds with a background history worker; keeps up to 64 MiB locally. Memory and writes vary by computer.',
|
|
12
|
+
agentHint:'Optional: samples agent CPU and memory every minute, up to 128 agents and 4096 processes on this computer. Above either limit, the sample is unavailable. Cost grows with agent and process counts; reads known file metadata without scanning workspaces.',
|
|
11
13
|
off:'Off by default. While off, there is no monitoring collector, timer or history file.',
|
|
12
14
|
agentUnavailable:'Agent footprint is not available in this version of AgEnD.',
|
|
13
15
|
stopTitle:'Turn off host monitoring?', stopBody:'This stops monitoring and its alerts, and removes the recorded host history. Turning it on again starts a new history.', stop:'Turn off',
|
|
14
16
|
drive:'Windows drive holding this WSL distribution', auto:'Identify automatically', refresh:'Refresh drive list', driveHint:'If automatic identification is unavailable, choose the drive that holds this distribution’s virtual disk. Mounted local drives are listed from the latest sample while monitoring is on; Refresh reads that sample without starting a probe.', },
|
|
15
17
|
'zh-TW': { open:'查看主機狀態',title:'主機監測', enabled:'監測這台電腦', agents:'包含 Agent 資源用量',
|
|
16
|
-
hint:'每 30–60
|
|
17
|
-
agentHint:'
|
|
18
|
-
off:'
|
|
18
|
+
hint:'每 30–60 秒取樣並在背景保存歷史,本機資料最多 64 MiB。記憶體與寫入量依電腦而異。',
|
|
19
|
+
agentHint:'選用:每分鐘讀取 Agent 的 CPU 和記憶體用量,每次最多 128 個 Agent、全機 4096 個行程。超過任一上限時,該次讀數會顯示無法取得。Agent 與行程越多,耗用的資源越多;只讀已知檔案的資訊,不掃描工作區。',
|
|
20
|
+
off:'預設關閉。關閉時不會取樣、啟動監測計時器或建立歷史檔案。',
|
|
19
21
|
agentUnavailable:'這個 AgEnD 版本尚未提供 Agent 資源用量。',
|
|
20
22
|
stopTitle:'關閉主機監測?', stopBody:'這會停止監測與通知,並移除已記錄的主機歷史。重新開啟時會建立新的歷史。', stop:'關閉',
|
|
21
23
|
drive:'這個 WSL 發行版本的 Windows 磁碟', auto:'自動辨識', refresh:'重新整理磁碟清單', driveHint:'無法自動辨識時,請選擇存放這個發行版本虛擬磁碟的磁碟。監測開啟後會依最新取樣列出已掛載的本機磁碟;重新整理只讀取該取樣,不會啟動探測。', },
|
|
@@ -23,7 +25,7 @@ register('hostMonitoring', {
|
|
|
23
25
|
const copy = k => t(`hostMonitoring.${k}`);
|
|
24
26
|
export function HostMonitoringSettings({ ctx }) {
|
|
25
27
|
const available = hostMonitoringVisible(ctx.schema);
|
|
26
|
-
useEffect(() => { if (!available) syncStage(ctx, 'host-monitoring', null); }, [available]);
|
|
28
|
+
useEffect(() => { if (!available) {syncStage(ctx, 'host-monitoring', null);syncStage(ctx,'host-alerts',null);} }, [available]);
|
|
27
29
|
// A collector alone is not a visible feature: S-207 must provide its page too.
|
|
28
30
|
// A separate child keeps hook order stable across capability transitions.
|
|
29
31
|
return available ? html`<${AvailableHostMonitoringSettings} ctx=${ctx} />` : null;
|
|
@@ -57,7 +59,7 @@ function AvailableHostMonitoringSettings({ ctx }) {
|
|
|
57
59
|
};
|
|
58
60
|
const row = (id,key,hint,disabled,change) => html`<div class="s-setting-row"><div class="s-setting-copy"><label for=${id}>${copy(key)}</label><p class="note" id=${`${id}-hint`}>${copy(hint)}</p></div>
|
|
59
61
|
<input class="s-ui-toggle" type="checkbox" role="switch" id=${id} checked=${form[key === 'agents' ? 'agent_footprint':'enabled']} disabled=${disabled} aria-describedby=${`${id}-hint`} onChange=${e=>change(e.target.checked, e.target)} /></div>`;
|
|
60
|
-
return html`<section class="card s-group" id="host-monitoring"><div class="s-group-head"><h3>${copy('title')}</h3><a class="btn btn-sm" href=${fleetPath('host-health')}>${copy('open')}</a></div>
|
|
62
|
+
return html`<section class="card s-group" id="host-monitoring"><div class="s-group-head"><h3>${copy('title')}</h3><a class="btn btn-sm" href=${fleetPath('host-health')}>${copy('open')}</a></div><p class="note" data-monitoring-platform-help>${monitoringHelp(ctx.schema?.host_monitoring_platform??health?.platform,'settings')}</p>
|
|
61
63
|
${row('hostMonitoringEnabled','enabled','hint',false,setEnabled)}
|
|
62
64
|
${row('hostMonitoringAgents','agents','agentHint',!agentsAvailable || !form.enabled,checked=>setForm(f=>({...f,agent_footprint:checked})))}
|
|
63
65
|
${health?.platform === 'wsl' || base.wsl_drive ? html`<div class="field"><label for="hostMonitoringDrive">${copy('drive')}</label>
|
|
@@ -65,5 +67,5 @@ function AvailableHostMonitoringSettings({ ctx }) {
|
|
|
65
67
|
<option value="">${copy('auto')}</option>${[...new Set([...(health?.disks?.value?.availableDrives ?? []),form.wsl_drive])].filter(v=>typeof v==='string'&&/^[A-Z]$/.test(v)).slice(0,26).map(d=>html`<option value=${d}>${d}:</option>`)}</select>
|
|
66
68
|
<p class="note">${copy('driveHint')}</p><button type="button" class="btn btn-sm" disabled=${reading} onClick=${refresh}>${copy('refresh')}</button></div>` : null}
|
|
67
69
|
${!agentsAvailable ? html`<p class="note">${copy('agentUnavailable')}</p>` : null}
|
|
68
|
-
<p class="note">${copy('off')}</p
|
|
70
|
+
<p class="note">${copy('off')}</p><${HostAlertSettings} ctx=${ctx} health=${health}/></section>`;
|
|
69
71
|
}
|
package/dist/ui/settings-hub.js
CHANGED
|
@@ -327,7 +327,7 @@ function HubExposures({ client, pairing }) {
|
|
|
327
327
|
: !row.enforceable && row.state !== "published" ? html`<small class="hub-exposure-why">${hw(row.reason === "delivery_unavailable" ? "agentDeliveryUnavailable" : "agentNotShareable")}</small>`
|
|
328
328
|
: row.reason === "hub_refused" ? html`<small class="hub-exposure-why hub-exposure-refused">${hr("note")}
|
|
329
329
|
<button type="button" class="btn btn-sm" disabled=${busy !== null} onClick=${() => toggle(row, false)}>${hr("withdraw")}</button></small>`
|
|
330
|
-
: row.reason === "republish_required" ? html`<small class="hub-exposure-why hub-exposure-republish">${hw("republishRequired")}
|
|
330
|
+
: row.reason === "republish_required" || row.reason === "share_lapsed" ? html`<small class="hub-exposure-why hub-exposure-republish">${hw(row.reason === "share_lapsed" ? "shareLapsed" : "republishRequired")}
|
|
331
331
|
<button type="button" class="btn btn-sm" disabled=${busy !== null} onClick=${() => toggle(row, true)}>${hw("shareAgain")}</button></small>`
|
|
332
332
|
: row.policy && row.policy.dataView === AGENT_CHOICE.dataViewId ? html`<small class="hub-exposure-why">${hw("agentShared")}</small>`
|
|
333
333
|
: row.policy ? html`<small class="hub-exposure-why">${hw("policy", row.policy.dataView, row.policy.tools.join(", ") || "—")}</small>` : null}
|
|
@@ -11,6 +11,7 @@ register("settingsLayout", {
|
|
|
11
11
|
lead_preferences: "Your identity, language and content preferences.",
|
|
12
12
|
lead_look: "Choose how AgEnD looks and keep your workspace comfortable.",
|
|
13
13
|
lead_agents: "Manage agents across runtimes, with their CLI, model and status in one place.",
|
|
14
|
+
"lead_agent-defaults-tail": "including agents you create later.",
|
|
14
15
|
"lead_agent-defaults": "Changes here apply to every agent that has no setting of its own — including agents you create later.",
|
|
15
16
|
lead_chat: "Connect chat services and choose how messages are received and delivered.",
|
|
16
17
|
"lead_web-dashboard": "Manage fleet-wide dashboard features, branding and resource limits.",
|
|
@@ -28,7 +29,8 @@ register("settingsLayout", {
|
|
|
28
29
|
lead_preferences: "你的身分、語言與內容偏好。",
|
|
29
30
|
lead_look: "調整顯示方式,保留你的工作習慣。",
|
|
30
31
|
lead_agents: "集中管理各個 Runtime 的 Agent、CLI、模型與狀態。",
|
|
31
|
-
"lead_agent-defaults": "
|
|
32
|
+
"lead_agent-defaults-tail": "包括之後新增的。",
|
|
33
|
+
"lead_agent-defaults": "設定會套用到所有未自行設定的 Agent,包括之後新增的。",
|
|
32
34
|
lead_chat: "連接聊天服務,設定訊息如何進入與送出。",
|
|
33
35
|
"lead_web-dashboard": "管理整個 Fleet 的網頁功能、品牌與資源限制。",
|
|
34
36
|
lead_access: "管理登入、網頁授權、訪客與對外分享。",
|
|
@@ -100,8 +102,11 @@ register("settingsLayout", {
|
|
|
100
102
|
|
|
101
103
|
export function SettingsPageHead({ section, children }) {
|
|
102
104
|
const scope = section === "preferences" ? "account" : section === "look" ? "personal" : "fleet";
|
|
105
|
+
const lead = layoutText(`lead_${section}`);
|
|
106
|
+
const tail = section === "agent-defaults" ? layoutText("lead_agent-defaults-tail") : "";
|
|
107
|
+
const leadContent = tail && lead.endsWith(tail) ? html`${lead.slice(0, -tail.length)}<span class="s-default-lead-tail">${tail}</span>` : lead;
|
|
103
108
|
const hub = section === "hub"; // M-3108: the Hub is a preview in 2.4.0-beta.1
|
|
104
|
-
return html`<${PageHead} title=${t(`settings.sec_${section}`)} scope=${layoutText(scope)} lead=${
|
|
109
|
+
return html`<${PageHead} title=${t(`settings.sec_${section}`)} scope=${layoutText(scope)} lead=${leadContent}
|
|
105
110
|
tag=${hub ? layoutText("preview") : null} note=${hub ? layoutText("previewHub") : null}>${children}</${PageHead}>`;
|
|
106
111
|
}
|
|
107
112
|
|
|
@@ -41,12 +41,12 @@ export function changedFields(next, baseline) {
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* The dashboard features an agent may use (dashboard-permissions.ts): each "inherit" (the fleet default: `defaults.dashboard`,
|
|
44
|
-
* else allowed — off for OFF_UNLESS_ON, `office` and `office_packs`), "on" or "off". The patch names only the features that changed: null
|
|
44
|
+
* else allowed — off for OFF_UNLESS_ON, `appearance`, `office` and `office_packs`), "on" or "off". The patch names only the features that changed: null
|
|
45
45
|
* follows the default again.
|
|
46
46
|
*/
|
|
47
47
|
export const DASHBOARD_FEATURES = ["appearance", "task_board", "web_settings", "office", "office_packs"];
|
|
48
|
-
/** #2578, #2692: the features a person switches on — unset is off (dashboard-permissions.ts OFF_UNLESS_ON). */
|
|
49
|
-
export const OFF_UNLESS_ON = ["office", "office_packs"];
|
|
48
|
+
/** #2578, #2692, M-2133: the features a person switches on — unset is off (dashboard-permissions.ts OFF_UNLESS_ON). */
|
|
49
|
+
export const OFF_UNLESS_ON = ["appearance", "office", "office_packs"];
|
|
50
50
|
/** #2601, #2692: the features kept beside `dashboard` under their own key (dashboard-permissions.ts SEPARATE_FEATURE_KEYS). */
|
|
51
51
|
export const SEPARATE_FEATURE_KEYS = { office: "office_access", office_packs: "office_pack_access" };
|
|
52
52
|
export const DASHBOARD_CHOICES = ["inherit", "on", "off"];
|
|
@@ -148,7 +148,8 @@ export const groupOf = (inst) => (inst && inst.tags && inst.tags[0]) || "Other";
|
|
|
148
148
|
export function effectiveSummary(live, config, fleetDefaults, classicDefaults) {
|
|
149
149
|
const defaults = classicDefaults || fleetDefaults || {};
|
|
150
150
|
const backend = live.backend || config.backend || defaults.backend || (fleetDefaults && fleetDefaults.backend) || "claude-code";
|
|
151
|
-
const
|
|
151
|
+
const scoped = (d, fallbackBackend) => backend === (d?.backend || fallbackBackend || "claude-code") ? d?.model : undefined;
|
|
152
|
+
const model = live.model_display || config.model || scoped(defaults, fleetDefaults?.backend) || scoped(fleetDefaults) || "default";
|
|
152
153
|
const effortSupported = live.effort_supported ?? EFFORT_BACKENDS.has(backend);
|
|
153
154
|
const effort = effortSupported ? (live.effort || config.effort || (fleetDefaults && fleetDefaults.effort) || "auto") : "—";
|
|
154
155
|
return { backend, model, effort };
|
|
@@ -191,6 +192,8 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
191
192
|
backend: form.backend, model: form.model.trim() || null,
|
|
192
193
|
working_directory: form.working_directory, channel_id: form.channel_id || undefined,
|
|
193
194
|
description: form.description || undefined, systemPrompt: form.systemPrompt || undefined,
|
|
195
|
+
// M-3522: null clears it (settings-instance-patch.ts removes the key); undefined would be dropped from the JSON body.
|
|
196
|
+
operations: form.operations.trim() || null,
|
|
194
197
|
tags: form.tags.length ? form.tags : undefined, general_topic: form.general_topic,
|
|
195
198
|
auto_pause_after: form.inherit.auto_pause_after ? null : Number(form.auto_pause_after),
|
|
196
199
|
hang_detector: { timeout_minutes: form.inherit.hang ? null : Number(form.hang) },
|
|
@@ -220,6 +223,7 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
220
223
|
channel_id: inst.channel_id || undefined,
|
|
221
224
|
description: inst.description || undefined,
|
|
222
225
|
systemPrompt: inst.systemPrompt || undefined,
|
|
226
|
+
operations: (typeof inst.operations === "string" && inst.operations.trim()) || null,
|
|
223
227
|
tags: inst.tags && inst.tags.length ? inst.tags : undefined,
|
|
224
228
|
general_topic: !!inst.general_topic,
|
|
225
229
|
auto_pause_after: hasOwn(inst, "auto_pause_after") ? inst.auto_pause_after : null,
|
|
@@ -258,7 +262,7 @@ export function agentForm(inst, defaults, name = "") {
|
|
|
258
262
|
return {
|
|
259
263
|
backend: inst.backend || defaults.backend || "claude-code",
|
|
260
264
|
model: inst.model || "", working_directory: inst.working_directory || "", channel_id: inst.channel_id || "",
|
|
261
|
-
description: inst.description || "", systemPrompt: inst.systemPrompt || "", tags: [...(inst.tags || [])],
|
|
265
|
+
description: inst.description || "", systemPrompt: inst.systemPrompt || "", operations: inst.operations || "", tags: [...(inst.tags || [])],
|
|
262
266
|
general_topic: !!inst.general_topic,
|
|
263
267
|
auto_pause_after: String(inst.auto_pause_after ?? defaults.auto_pause_after ?? 0),
|
|
264
268
|
hang: String(hang.timeout_minutes ?? (defaults.hang_detector && defaults.hang_detector.timeout_minutes) ?? HANG_TIMEOUT_DEFAULT_MINUTES),
|