@songsid/agend 2.3.5-alpha.3 → 2.3.5-alpha.5
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/THIRD_PARTY_NOTICES.md +52 -0
- package/dist/accounts-view.d.ts +97 -0
- package/dist/accounts-view.js +116 -0
- package/dist/accounts-view.js.map +1 -0
- package/dist/agent-cli-instructions.md +1 -1
- package/dist/agent-credentials.d.ts +24 -0
- package/dist/agent-credentials.js +66 -0
- package/dist/agent-credentials.js.map +1 -0
- package/dist/agent-endpoint.d.ts +3 -1
- package/dist/agent-endpoint.js +13 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.js +1 -1
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-runtime-api.d.ts +4 -0
- package/dist/agent-runtime-api.js +59 -0
- package/dist/agent-runtime-api.js.map +1 -0
- package/dist/agent-runtime-change.d.ts +76 -0
- package/dist/agent-runtime-change.js +114 -0
- package/dist/agent-runtime-change.js.map +1 -0
- package/dist/agent-workspace.d.ts +93 -0
- package/dist/agent-workspace.js +353 -0
- package/dist/agent-workspace.js.map +1 -0
- package/dist/auth-api.d.ts +27 -0
- package/dist/auth-api.js +168 -3
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/session-authorizations.d.ts +28 -4
- package/dist/authority/session-authorizations.js +63 -17
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/backend/antigravity.js +3 -1
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/codex-footer-hints.d.ts +7 -0
- package/dist/backend/codex-footer-hints.js +41 -0
- package/dist/backend/codex-footer-hints.js.map +1 -0
- package/dist/backend/codex-metadata.d.ts +14 -0
- package/dist/backend/codex-metadata.js +45 -0
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex-quota-history.d.ts +7 -0
- package/dist/backend/codex-quota-history.js +57 -0
- package/dist/backend/codex-quota-history.js.map +1 -0
- package/dist/backend/codex-session-lookup.d.ts +6 -0
- package/dist/backend/codex-session-lookup.js +1 -1
- package/dist/backend/codex-session-lookup.js.map +1 -1
- package/dist/backend/codex-speed.d.ts +14 -0
- package/dist/backend/codex-speed.js +35 -0
- package/dist/backend/codex-speed.js.map +1 -0
- package/dist/backend/codex.d.ts +7 -0
- package/dist/backend/codex.js +85 -24
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok-weekly-reset.d.ts +24 -0
- package/dist/backend/grok-weekly-reset.js +95 -0
- package/dist/backend/grok-weekly-reset.js.map +1 -0
- package/dist/backend/grok.d.ts +30 -1
- package/dist/backend/grok.js +301 -54
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +3 -0
- package/dist/backend/kiro.js +50 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.js +5 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/native-pane.d.ts +3 -1
- package/dist/backend/native-pane.js +2 -2
- package/dist/backend/native-pane.js.map +1 -1
- package/dist/backend/types.d.ts +13 -1
- package/dist/backend/types.js +3 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance-cli.d.ts +3 -0
- package/dist/build-provenance-cli.js +11 -0
- package/dist/build-provenance-cli.js.map +1 -0
- package/dist/build-provenance.d.ts +20 -0
- package/dist/build-provenance.js +67 -0
- package/dist/build-provenance.js.map +1 -0
- package/dist/build-provenance.json +1 -0
- package/dist/cache-ledger.d.ts +95 -0
- package/dist/cache-ledger.js +276 -4
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-service.d.ts +5 -0
- package/dist/cache-service.js +16 -4
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.js +11 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +51 -0
- package/dist/channel/adapters/telegram.js +235 -17
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +3 -3
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +2 -0
- package/dist/claude-auth-status.d.ts +48 -0
- package/dist/claude-auth-status.js +149 -0
- package/dist/claude-auth-status.js.map +1 -0
- package/dist/cli.js +138 -37
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +21 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +10 -0
- package/dist/cross-instance-notice.js +67 -5
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +70 -1
- package/dist/daemon.js +547 -25
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +16 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +23 -1
- package/dist/delivery-consumed-watch.js +30 -3
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +1 -1
- package/dist/delivery-reconciliation.js +1 -1
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/doctor.js +20 -9
- package/dist/doctor.js.map +1 -1
- package/dist/export-import.d.ts +7 -0
- package/dist/export-import.js +44 -10
- package/dist/export-import.js.map +1 -1
- package/dist/fleet-context.d.ts +2 -0
- package/dist/fleet-manager.d.ts +362 -7
- package/dist/fleet-manager.js +1522 -91
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +8 -2
- package/dist/fleet-windows-runtime.js +93 -6
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +425 -0
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +5 -2
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +1 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +2 -2
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +41 -4
- package/dist/general-knowledge/skills/session-management/SKILL.md +1 -1
- package/dist/general-knowledge/skills/tui-effort/SKILL.md +10 -10
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +31 -15
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- 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/hub/admission.d.ts +28 -0
- package/dist/hub/admission.js +62 -0
- package/dist/hub/admission.js.map +1 -0
- package/dist/hub/attachments/limits.d.ts +20 -0
- package/dist/hub/attachments/limits.js +48 -0
- package/dist/hub/attachments/limits.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +116 -0
- package/dist/hub/attachments/store.js +246 -0
- package/dist/hub/attachments/store.js.map +1 -0
- package/dist/hub/audit/index.d.ts +62 -0
- package/dist/hub/audit/index.js +344 -0
- package/dist/hub/audit/index.js.map +1 -0
- package/dist/hub/browser-certificate.d.ts +38 -0
- package/dist/hub/browser-certificate.js +247 -0
- package/dist/hub/browser-certificate.js.map +1 -0
- package/dist/hub/buttons-model.d.ts +9 -0
- package/dist/hub/buttons-model.js +42 -0
- package/dist/hub/buttons-model.js.map +1 -0
- package/dist/hub/buttons.d.ts +54 -0
- package/dist/hub/buttons.js +346 -0
- package/dist/hub/buttons.js.map +1 -0
- package/dist/hub/catalog.d.ts +74 -0
- package/dist/hub/catalog.js +195 -0
- package/dist/hub/catalog.js.map +1 -0
- package/dist/hub/client.d.ts +69 -0
- package/dist/hub/client.js +300 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/hub/compose/member.d.ts +139 -0
- package/dist/hub/compose/member.js +450 -0
- package/dist/hub/compose/member.js.map +1 -0
- package/dist/hub/compose/server.d.ts +77 -0
- package/dist/hub/compose/server.js +349 -0
- package/dist/hub/compose/server.js.map +1 -0
- package/dist/hub/compose/views.d.ts +12 -0
- package/dist/hub/compose/views.js +4 -0
- package/dist/hub/compose/views.js.map +1 -0
- package/dist/hub/db.d.ts +56 -0
- package/dist/hub/db.js +188 -0
- package/dist/hub/db.js.map +1 -0
- package/dist/hub/directory/config.d.ts +39 -0
- package/dist/hub/directory/config.js +108 -0
- package/dist/hub/directory/config.js.map +1 -0
- package/dist/hub/directory/directory.d.ts +18 -0
- package/dist/hub/directory/directory.js +320 -0
- package/dist/hub/directory/directory.js.map +1 -0
- package/dist/hub/directory/index.d.ts +7 -0
- package/dist/hub/directory/index.js +4 -0
- package/dist/hub/directory/index.js.map +1 -0
- package/dist/hub/directory/profiles.d.ts +41 -0
- package/dist/hub/directory/profiles.js +90 -0
- package/dist/hub/directory/profiles.js.map +1 -0
- package/dist/hub/directory/types.d.ts +71 -0
- package/dist/hub/directory/types.js +14 -0
- package/dist/hub/directory/types.js.map +1 -0
- package/dist/hub/execution/cli-provider.d.ts +23 -0
- package/dist/hub/execution/cli-provider.js +341 -0
- package/dist/hub/execution/cli-provider.js.map +1 -0
- package/dist/hub/execution/index.d.ts +13 -0
- package/dist/hub/execution/index.js +8 -0
- package/dist/hub/execution/index.js.map +1 -0
- package/dist/hub/execution/model-broker.d.ts +24 -0
- package/dist/hub/execution/model-broker.js +208 -0
- package/dist/hub/execution/model-broker.js.map +1 -0
- package/dist/hub/execution/provider-setup.d.ts +11 -0
- package/dist/hub/execution/provider-setup.js +21 -0
- package/dist/hub/execution/provider-setup.js.map +1 -0
- package/dist/hub/execution/sandbox-runner.d.ts +1 -0
- package/dist/hub/execution/sandbox-runner.js +221 -0
- package/dist/hub/execution/sandbox-runner.js.map +1 -0
- package/dist/hub/execution/service.d.ts +136 -0
- package/dist/hub/execution/service.js +459 -0
- package/dist/hub/execution/service.js.map +1 -0
- package/dist/hub/execution/store.d.ts +61 -0
- package/dist/hub/execution/store.js +182 -0
- package/dist/hub/execution/store.js.map +1 -0
- package/dist/hub/execution/views.d.ts +20 -0
- package/dist/hub/execution/views.js +48 -0
- package/dist/hub/execution/views.js.map +1 -0
- package/dist/hub/http/compose.d.ts +20 -0
- package/dist/hub/http/compose.js +518 -0
- package/dist/hub/http/compose.js.map +1 -0
- package/dist/hub/http/core.d.ts +49 -0
- package/dist/hub/http/core.js +124 -0
- package/dist/hub/http/core.js.map +1 -0
- package/dist/hub/http/deps.d.ts +61 -0
- package/dist/hub/http/deps.js +2 -0
- package/dist/hub/http/deps.js.map +1 -0
- package/dist/hub/http/schema.d.ts +14 -0
- package/dist/hub/http/schema.js +80 -0
- package/dist/hub/http/schema.js.map +1 -0
- package/dist/hub/identity.d.ts +32 -0
- package/dist/hub/identity.js +80 -0
- package/dist/hub/identity.js.map +1 -0
- package/dist/hub/init/browser-certificate.d.ts +9 -0
- package/dist/hub/init/browser-certificate.js +78 -0
- package/dist/hub/init/browser-certificate.js.map +1 -0
- package/dist/hub/init/browser-tls.d.ts +18 -0
- package/dist/hub/init/browser-tls.js +62 -0
- package/dist/hub/init/browser-tls.js.map +1 -0
- package/dist/hub/init/cli.d.ts +3 -0
- package/dist/hub/init/cli.js +83 -0
- package/dist/hub/init/cli.js.map +1 -0
- package/dist/hub/init/directory-certificate.d.ts +24 -0
- package/dist/hub/init/directory-certificate.js +222 -0
- package/dist/hub/init/directory-certificate.js.map +1 -0
- package/dist/hub/init/existing-fleet.d.ts +6 -0
- package/dist/hub/init/existing-fleet.js +58 -0
- package/dist/hub/init/existing-fleet.js.map +1 -0
- package/dist/hub/init/handoff.d.ts +8 -0
- package/dist/hub/init/handoff.js +36 -0
- package/dist/hub/init/handoff.js.map +1 -0
- package/dist/hub/init/identity.d.ts +5 -0
- package/dist/hub/init/identity.js +24 -0
- package/dist/hub/init/identity.js.map +1 -0
- package/dist/hub/init/initializer.d.ts +24 -0
- package/dist/hub/init/initializer.js +385 -0
- package/dist/hub/init/initializer.js.map +1 -0
- package/dist/hub/init/inventory.d.ts +17 -0
- package/dist/hub/init/inventory.js +33 -0
- package/dist/hub/init/inventory.js.map +1 -0
- package/dist/hub/init/layout.d.ts +32 -0
- package/dist/hub/init/layout.js +53 -0
- package/dist/hub/init/layout.js.map +1 -0
- package/dist/hub/init/network.d.ts +18 -0
- package/dist/hub/init/network.js +104 -0
- package/dist/hub/init/network.js.map +1 -0
- package/dist/hub/init/plan-digest.d.ts +5 -0
- package/dist/hub/init/plan-digest.js +47 -0
- package/dist/hub/init/plan-digest.js.map +1 -0
- package/dist/hub/init/prompt.d.ts +26 -0
- package/dist/hub/init/prompt.js +110 -0
- package/dist/hub/init/prompt.js.map +1 -0
- package/dist/hub/init/secret-file.d.ts +1 -0
- package/dist/hub/init/secret-file.js +59 -0
- package/dist/hub/init/secret-file.js.map +1 -0
- package/dist/hub/init/text.d.ts +127 -0
- package/dist/hub/init/text.js +247 -0
- package/dist/hub/init/text.js.map +1 -0
- package/dist/hub/init/types.d.ts +114 -0
- package/dist/hub/init/types.js +9 -0
- package/dist/hub/init/types.js.map +1 -0
- package/dist/hub/init/wizard.d.ts +34 -0
- package/dist/hub/init/wizard.js +554 -0
- package/dist/hub/init/wizard.js.map +1 -0
- package/dist/hub/initialization.d.ts +23 -0
- package/dist/hub/initialization.js +28 -0
- package/dist/hub/initialization.js.map +1 -0
- package/dist/hub/member/agent-mode.d.ts +6 -0
- package/dist/hub/member/agent-mode.js +23 -0
- package/dist/hub/member/agent-mode.js.map +1 -0
- package/dist/hub/member/attachments.d.ts +29 -0
- package/dist/hub/member/attachments.js +107 -0
- package/dist/hub/member/attachments.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +87 -0
- package/dist/hub/member/exposure-api.js +64 -0
- package/dist/hub/member/exposure-api.js.map +1 -0
- package/dist/hub/member/exposures.d.ts +123 -0
- package/dist/hub/member/exposures.js +282 -0
- package/dist/hub/member/exposures.js.map +1 -0
- package/dist/hub/member/pairing-api.d.ts +85 -0
- package/dist/hub/member/pairing-api.js +385 -0
- package/dist/hub/member/pairing-api.js.map +1 -0
- package/dist/hub/member/quota.d.ts +20 -0
- package/dist/hub/member/quota.js +98 -0
- package/dist/hub/member/quota.js.map +1 -0
- package/dist/hub/member-journal.d.ts +104 -0
- package/dist/hub/member-journal.js +336 -0
- package/dist/hub/member-journal.js.map +1 -0
- package/dist/hub/member-reconciliation.d.ts +14 -0
- package/dist/hub/member-reconciliation.js +97 -0
- package/dist/hub/member-reconciliation.js.map +1 -0
- package/dist/hub/mount.d.ts +39 -0
- package/dist/hub/mount.js +123 -0
- package/dist/hub/mount.js.map +1 -0
- package/dist/hub/pairing-client.d.ts +17 -0
- package/dist/hub/pairing-client.js +108 -0
- package/dist/hub/pairing-client.js.map +1 -0
- package/dist/hub/pairing.d.ts +65 -0
- package/dist/hub/pairing.js +211 -0
- package/dist/hub/pairing.js.map +1 -0
- package/dist/hub/policy.d.ts +63 -0
- package/dist/hub/policy.js +147 -0
- package/dist/hub/policy.js.map +1 -0
- package/dist/hub/preview.d.ts +32 -0
- package/dist/hub/preview.js +64 -0
- package/dist/hub/preview.js.map +1 -0
- package/dist/hub/private-files.d.ts +5 -0
- package/dist/hub/private-files.js +44 -0
- package/dist/hub/private-files.js.map +1 -0
- package/dist/hub/profile.d.ts +59 -0
- package/dist/hub/profile.js +73 -0
- package/dist/hub/profile.js.map +1 -0
- package/dist/hub/protocol.d.ts +779 -0
- package/dist/hub/protocol.js +93 -0
- package/dist/hub/protocol.js.map +1 -0
- package/dist/hub/quota.d.ts +24 -0
- package/dist/hub/quota.js +112 -0
- package/dist/hub/quota.js.map +1 -0
- package/dist/hub/representative.d.ts +141 -0
- package/dist/hub/representative.js +528 -0
- package/dist/hub/representative.js.map +1 -0
- package/dist/hub/retention.d.ts +17 -0
- package/dist/hub/retention.js +45 -0
- package/dist/hub/retention.js.map +1 -0
- package/dist/hub/rooms.d.ts +120 -0
- package/dist/hub/rooms.js +535 -0
- package/dist/hub/rooms.js.map +1 -0
- package/dist/hub/runtime.d.ts +106 -0
- package/dist/hub/runtime.js +298 -0
- package/dist/hub/runtime.js.map +1 -0
- package/dist/hub/server.d.ts +56 -0
- package/dist/hub/server.js +202 -0
- package/dist/hub/server.js.map +1 -0
- package/dist/hub/service-start.d.ts +17 -0
- package/dist/hub/service-start.js +109 -0
- package/dist/hub/service-start.js.map +1 -0
- package/dist/hub/sessions.d.ts +53 -0
- package/dist/hub/sessions.js +196 -0
- package/dist/hub/sessions.js.map +1 -0
- package/dist/hub/socket.d.ts +24 -0
- package/dist/hub/socket.js +79 -0
- package/dist/hub/socket.js.map +1 -0
- package/dist/hub/store.d.ts +77 -0
- package/dist/hub/store.js +88 -0
- package/dist/hub/store.js.map +1 -0
- package/dist/hub/tls.d.ts +31 -0
- package/dist/hub/tls.js +135 -0
- package/dist/hub/tls.js.map +1 -0
- package/dist/hub/types.d.ts +401 -0
- package/dist/hub/types.js +2 -0
- package/dist/hub/types.js.map +1 -0
- package/dist/hub/validation.d.ts +33 -0
- package/dist/hub/validation.js +136 -0
- package/dist/hub/validation.js.map +1 -0
- package/dist/hub/version-floor.d.ts +10 -0
- package/dist/hub/version-floor.js +45 -0
- package/dist/hub/version-floor.js.map +1 -0
- package/dist/hub-browser-certificate-policy.d.ts +31 -0
- package/dist/hub-browser-certificate-policy.js +25 -0
- package/dist/hub-browser-certificate-policy.js.map +1 -0
- package/dist/hub-membership-settings.d.ts +6 -0
- package/dist/hub-membership-settings.js +21 -0
- package/dist/hub-membership-settings.js.map +1 -0
- package/dist/hub-mode.d.ts +15 -0
- package/dist/hub-mode.js +17 -0
- package/dist/hub-mode.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +48 -0
- package/dist/hub-pairing-summary.js +36 -0
- package/dist/hub-pairing-summary.js.map +1 -0
- package/dist/hub-report-target.d.ts +32 -0
- package/dist/hub-report-target.js +33 -0
- package/dist/hub-report-target.js.map +1 -0
- package/dist/hub-retention-policy.d.ts +14 -0
- package/dist/hub-retention-policy.js +15 -0
- package/dist/hub-retention-policy.js.map +1 -0
- package/dist/instance-config-impact.js +3 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +17 -2
- package/dist/instance-lifecycle.js +58 -8
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instance-topic-delete.d.ts +77 -0
- package/dist/instance-topic-delete.js +123 -0
- package/dist/instance-topic-delete.js.map +1 -0
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-engine-status.d.ts +11 -0
- package/dist/kiro-engine-status.js +6 -0
- package/dist/kiro-engine-status.js.map +1 -1
- package/dist/launchd-service-domain.d.ts +5 -0
- package/dist/launchd-service-domain.js +21 -0
- package/dist/launchd-service-domain.js.map +1 -0
- package/dist/locale.js +125 -3
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +28 -0
- package/dist/log-service.js +29 -0
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps.d.ts +4 -3
- package/dist/log-steps.js +32 -7
- package/dist/log-steps.js.map +1 -1
- package/dist/logger.d.ts +16 -2
- package/dist/logger.js +346 -66
- package/dist/logger.js.map +1 -1
- package/dist/login-flows.d.ts +15 -7
- package/dist/login-flows.js +29 -3
- package/dist/login-flows.js.map +1 -1
- package/dist/login-manager.js +25 -4
- package/dist/login-manager.js.map +1 -1
- package/dist/ls-rows.js +3 -4
- package/dist/ls-rows.js.map +1 -1
- package/dist/missed-offline.d.ts +25 -0
- package/dist/missed-offline.js +79 -0
- package/dist/missed-offline.js.map +1 -0
- package/dist/native-instance-api.d.ts +0 -1
- package/dist/native-instance-api.js +15 -3
- package/dist/native-instance-api.js.map +1 -1
- package/dist/native-instance-input.d.ts +3 -0
- package/dist/native-instance-input.js +6 -1
- package/dist/native-instance-input.js.map +1 -1
- package/dist/native-instance-registry.d.ts +6 -0
- package/dist/native-instance-registry.js +24 -0
- package/dist/native-instance-registry.js.map +1 -1
- package/dist/native-mcp.d.ts +3 -0
- package/dist/native-mcp.js +15 -2
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +8 -0
- package/dist/native-pane-lifecycle.js +13 -4
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.js +17 -9
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you-hub.d.ts +9 -1
- package/dist/needs-you-hub.js +46 -8
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +47 -2
- package/dist/needs-you.js +31 -3
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +3 -3
- package/dist/office-share-page.js.map +1 -1
- package/dist/office-share.d.ts +11 -0
- package/dist/office-share.js +14 -0
- package/dist/office-share.js.map +1 -1
- package/dist/office-talk.d.ts +26 -0
- package/dist/office-talk.js +50 -0
- package/dist/office-talk.js.map +1 -0
- package/dist/outbound-handlers.d.ts +14 -0
- package/dist/outbound-handlers.js +49 -6
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +33 -1
- package/dist/outbound-schemas.js +29 -16
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-quota-history.d.ts +9 -0
- package/dist/pane-quota-history.js +67 -0
- package/dist/pane-quota-history.js.map +1 -0
- package/dist/pause-marker.d.ts +1 -1
- package/dist/pause-marker.js +1 -1
- package/dist/pause-marker.js.map +1 -1
- package/dist/platform-general.d.ts +46 -0
- package/dist/platform-general.js +91 -0
- package/dist/platform-general.js.map +1 -0
- package/dist/public-web-gateway.js +7 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +6 -0
- package/dist/public-web-link.js +9 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/queued-handoffs.d.ts +33 -0
- package/dist/queued-handoffs.js +75 -0
- package/dist/queued-handoffs.js.map +1 -0
- package/dist/quickstart.d.ts +13 -0
- package/dist/quickstart.js +81 -5
- package/dist/quickstart.js.map +1 -1
- package/dist/quota-notice.d.ts +7 -0
- package/dist/quota-notice.js +40 -0
- package/dist/quota-notice.js.map +1 -1
- package/dist/reply-buttons-controller.js +10 -6
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-polls.d.ts +2 -2
- package/dist/reply-polls.js +3 -3
- package/dist/reply-polls.js.map +1 -1
- package/dist/runtime-api.d.ts +2 -0
- package/dist/runtime-api.js +106 -13
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.d.ts +9 -0
- package/dist/runtime-build-info.js +59 -0
- package/dist/runtime-build-info.js.map +1 -0
- package/dist/runtime-bundle.d.ts +6 -1
- package/dist/runtime-bundle.js +17 -9
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-cli.d.ts +13 -1
- package/dist/runtime-cli.js +173 -19
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +27 -1
- package/dist/runtime-client-store.js +86 -6
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +74 -0
- package/dist/runtime-client.js +336 -26
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-connection.d.ts +22 -0
- package/dist/runtime-connection.js +93 -0
- package/dist/runtime-connection.js.map +1 -0
- package/dist/runtime-coordinator.d.ts +16 -0
- package/dist/runtime-coordinator.js +287 -62
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +78 -0
- package/dist/runtime-credential-profiles.js +280 -0
- package/dist/runtime-credential-profiles.js.map +1 -0
- package/dist/runtime-install.d.ts +50 -0
- package/dist/runtime-install.js +186 -0
- package/dist/runtime-install.js.map +1 -0
- package/dist/runtime-pane-assets.d.ts +1 -1
- package/dist/runtime-pane-assets.js +1 -1
- package/dist/runtime-pane-assets.js.map +1 -1
- package/dist/runtime-pane-boot.d.ts +7 -0
- package/dist/runtime-pane-boot.js +23 -0
- package/dist/runtime-pane-boot.js.map +1 -1
- package/dist/runtime-pane-codex-index.d.ts +10 -1
- package/dist/runtime-pane-codex-index.js +131 -27
- package/dist/runtime-pane-codex-index.js.map +1 -1
- package/dist/runtime-pane-host.d.ts +19 -0
- package/dist/runtime-pane-host.js +50 -7
- package/dist/runtime-pane-host.js.map +1 -1
- package/dist/runtime-pane-link.d.ts +7 -0
- package/dist/runtime-pane-link.js +93 -2
- package/dist/runtime-pane-link.js.map +1 -1
- package/dist/runtime-pane-mcp-relay.d.ts +1 -0
- package/dist/runtime-pane-mcp-relay.js +10 -0
- package/dist/runtime-pane-mcp-relay.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +4 -0
- package/dist/runtime-pane-mcp.js +6 -3
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-native.d.ts +32 -2
- package/dist/runtime-pane-native.js +55 -6
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-pane-port.d.ts +5 -0
- package/dist/runtime-pane-port.js +17 -1
- package/dist/runtime-pane-port.js.map +1 -1
- package/dist/runtime-pane-process.d.ts +1 -1
- package/dist/runtime-pane-process.js +11 -2
- package/dist/runtime-pane-process.js.map +1 -1
- package/dist/runtime-pane-protocol.d.ts +11 -1
- package/dist/runtime-pane-protocol.js +27 -5
- package/dist/runtime-pane-protocol.js.map +1 -1
- package/dist/runtime-pane-quota-history.d.ts +6 -0
- package/dist/runtime-pane-quota-history.js +44 -0
- package/dist/runtime-pane-quota-history.js.map +1 -0
- package/dist/runtime-pane-service.d.ts +5 -0
- package/dist/runtime-pane-service.js +47 -12
- package/dist/runtime-pane-service.js.map +1 -1
- package/dist/runtime-pane-transcript.d.ts +5 -0
- package/dist/runtime-pane-transcript.js +66 -5
- package/dist/runtime-pane-transcript.js.map +1 -1
- package/dist/runtime-pane-worker.js +19 -6
- package/dist/runtime-pane-worker.js.map +1 -1
- package/dist/runtime-protocol.d.ts +30 -2
- package/dist/runtime-protocol.js +30 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-update-activity.d.ts +21 -0
- package/dist/runtime-update-activity.js +51 -0
- package/dist/runtime-update-activity.js.map +1 -0
- package/dist/runtime-update-artifact.d.ts +31 -0
- package/dist/runtime-update-artifact.js +252 -0
- package/dist/runtime-update-artifact.js.map +1 -0
- package/dist/runtime-update-install.d.ts +31 -0
- package/dist/runtime-update-install.js +205 -0
- package/dist/runtime-update-install.js.map +1 -0
- package/dist/runtime-update-journal.d.ts +44 -0
- package/dist/runtime-update-journal.js +121 -0
- package/dist/runtime-update-journal.js.map +1 -0
- package/dist/runtime-update-lock.d.ts +48 -0
- package/dist/runtime-update-lock.js +217 -0
- package/dist/runtime-update-lock.js.map +1 -0
- package/dist/runtime-update-owners.d.ts +29 -0
- package/dist/runtime-update-owners.js +240 -0
- package/dist/runtime-update-owners.js.map +1 -0
- package/dist/runtime-update-protocol.d.ts +15 -0
- package/dist/runtime-update-protocol.js +13 -0
- package/dist/runtime-update-protocol.js.map +1 -0
- package/dist/runtime-windows-bridge.d.ts +2 -1
- package/dist/runtime-windows-bridge.js +11 -1
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/db.d.ts +2 -1
- package/dist/scheduler/db.js +23 -9
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.js +1 -1
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +13 -0
- package/dist/scheduler/task-board.js +28 -3
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/service-drain.d.ts +19 -0
- package/dist/service-drain.js +64 -0
- package/dist/service-drain.js.map +1 -0
- package/dist/service-installer.d.ts +7 -2
- package/dist/service-installer.js +13 -10
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +20 -0
- package/dist/settings-api.js +414 -4
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +6 -0
- package/dist/settings-baseline.js +3 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +29 -6
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +13 -0
- package/dist/settings-effect.js +98 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -0
- package/dist/settings-http-confirmation.js +28 -1
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +27 -0
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-wizard.js +6 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/task-board-tool.d.ts +13 -1
- package/dist/task-board-tool.js +104 -4
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +6 -0
- package/dist/task-board-waker.js +4 -0
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tmux-binary.d.ts +59 -0
- package/dist/tmux-binary.js +200 -0
- package/dist/tmux-binary.js.map +1 -0
- package/dist/tmux-control.js +4 -4
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-exec-helper.js +32 -1
- package/dist/tmux-exec-helper.js.map +1 -1
- package/dist/tmux-manager.d.ts +1 -1
- package/dist/tmux-manager.js +45 -36
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-read.js +4 -3
- package/dist/tmux-read.js.map +1 -1
- package/dist/tool-permissions.d.ts +5 -2
- package/dist/tool-permissions.js +6 -5
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +2 -0
- package/dist/tool-progress.js +19 -3
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.js +10 -5
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +20 -0
- package/dist/transcript-monitor.js +47 -3
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-needles.d.ts +7 -0
- package/dist/transcript-needles.js +9 -1
- package/dist/transcript-needles.js.map +1 -1
- package/dist/transcript-records.d.ts +1 -1
- package/dist/transcript-records.js +2 -1
- package/dist/transcript-records.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/ui/account-identity.js +27 -0
- package/dist/ui/accounts-view.js +214 -0
- package/dist/ui/agent-runtime-settings.js +68 -0
- package/dist/ui/agent-runtime.js +20 -2
- package/dist/ui/backend-signin.js +39 -21
- package/dist/ui/chat-ambient.js +1 -1
- package/dist/ui/chat-md-strings.js +3 -0
- package/dist/ui/chat-render.js +3 -670
- package/dist/ui/chat-store.js +1 -1
- package/dist/ui/chat-strings.js +3 -333
- package/dist/ui/chat-thread.js +3 -919
- package/dist/ui/chat-time.js +3 -80
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/credential-profile-select.js +54 -0
- package/dist/ui/fleet-office-dialogue.d.ts +30 -0
- package/dist/ui/fleet-office-dialogue.js +382 -0
- package/dist/ui/fleet-office-pack.d.ts +9 -0
- package/dist/ui/fleet-office-pack.js +76 -4
- package/dist/ui/fleet-office-skin.js +23 -5
- package/dist/ui/fleet-office-store.js +5 -0
- package/dist/ui/fleet-office.js +173 -6
- package/dist/ui/fleet-task-card.js +10 -6
- package/dist/ui/fleet-task-common.js +12 -2
- package/dist/ui/fleet-task-menu.js +188 -0
- package/dist/ui/fleet-task-stats.js +124 -0
- package/dist/ui/fleet-task-view.js +340 -0
- package/dist/ui/fleet-tasks.js +131 -43
- package/dist/ui/fleet-usage.js +90 -27
- package/dist/ui/html-attachment.js +3 -40
- package/dist/ui/hub-agent-copy.js +23 -0
- package/dist/ui/hub-button-actions.js +65 -0
- package/dist/ui/hub-chat-store.js +158 -0
- package/dist/ui/hub-chat-strings.js +77 -0
- package/dist/ui/hub-client.js +329 -0
- package/dist/ui/hub-owner-strings.js +51 -0
- package/dist/ui/hub-provider-guidance.js +31 -0
- package/dist/ui/hub-quota.js +85 -0
- package/dist/ui/hub-strings.js +162 -0
- package/dist/ui/hub-switcher.js +27 -0
- package/dist/ui/native-instance-settings.js +5 -8
- package/dist/ui/native-pane-recovery.js +1 -1
- package/dist/ui/office-share-page.js +4 -2
- package/dist/ui/panel-chat.js +36 -49
- package/dist/ui/panel-details.js +1 -1
- package/dist/ui/panel-fleet.js +82 -12
- package/dist/ui/panel-hub.js +619 -0
- package/dist/ui/panel-log.js +2 -2
- package/dist/ui/panel-needs.js +24 -8
- package/dist/ui/panel-runtimes.js +239 -45
- package/dist/ui/panel-settings.js +266 -192
- package/dist/ui/panel-windows-cli.js +88 -42
- package/dist/ui/preview-pages.js +1 -1
- package/dist/ui/preview-panel.js +92 -6
- package/dist/ui/preview-versions.js +1 -1
- package/dist/ui/preview.js +3 -476
- package/dist/ui/runtime-commands.d.ts +4 -0
- package/dist/ui/runtime-commands.js +59 -0
- package/dist/ui/search-dialog.js +2 -0
- package/dist/ui/settings-access-strings.js +42 -0
- package/dist/ui/settings-agent-filters.js +94 -0
- package/dist/ui/settings-appearance.js +122 -23
- package/dist/ui/settings-build-version.js +35 -0
- package/dist/ui/settings-codex-copy.js +19 -0
- package/dist/ui/settings-devices.js +253 -0
- package/dist/ui/settings-dialogs.js +33 -12
- package/dist/ui/settings-guests.js +25 -11
- package/dist/ui/settings-hub-browser-certificate.js +74 -0
- package/dist/ui/settings-hub-membership.js +72 -0
- package/dist/ui/settings-hub-retention.js +52 -0
- package/dist/ui/settings-hub.js +196 -0
- package/dist/ui/settings-layout.js +242 -0
- package/dist/ui/settings-model.js +24 -2
- package/dist/ui/settings-outside.js +104 -38
- package/dist/ui/settings-registry.js +9 -4
- package/dist/ui/settings-shared-strings.js +143 -0
- package/dist/ui/settings-shared.js +345 -0
- package/dist/ui/settings-shortcuts.js +65 -0
- package/dist/ui/settings-strings.js +89 -32
- package/dist/ui/settings-web-authority.js +17 -11
- package/dist/ui/shared/accounts.css +15 -0
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +1 -1
- package/dist/ui/shared/app-route.js +6 -1
- package/dist/ui/shared/app-session.js +6 -2
- package/dist/ui/shared/app-shell.js +81 -15
- package/dist/ui/shared/app.css +1114 -13
- package/dist/ui/shared/app.js +12 -3
- package/dist/ui/shared/chat-composer.js +68 -0
- package/dist/ui/shared/chat-md-strings.js +9 -0
- package/dist/ui/shared/chat-render.js +682 -0
- package/dist/ui/shared/chat-strings.js +333 -0
- package/dist/ui/shared/chat-thread.js +969 -0
- package/dist/ui/shared/chat-time.js +80 -0
- package/dist/ui/shared/header-tools.js +3 -5
- package/dist/ui/shared/html-attachment.js +42 -0
- package/dist/ui/shared/hub-chat.css +85 -0
- package/dist/ui/shared/hub-owner.css +33 -0
- package/dist/ui/shared/hub-quota.css +8 -0
- package/dist/ui/shared/hub.css +71 -0
- package/dist/ui/shared/instance-nav.js +3 -2
- package/dist/ui/shared/machine-name.js +13 -0
- package/dist/ui/shared/page-head.js +8 -0
- package/dist/ui/shared/panel-view.js +77 -4
- package/dist/ui/shared/preview.js +476 -0
- package/dist/ui/shared/runtime-install.css +26 -0
- package/dist/ui/shared/settings-width.js +31 -0
- package/dist/ui/shared/side-rail.js +15 -0
- package/dist/ui/shared/signin.js +172 -0
- package/dist/ui/shared/task-board.css +95 -0
- package/dist/ui/shared/tokens.css +1 -0
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +3 -3
- package/dist/ui/shared/usage-dialog.js +18 -1
- package/dist/ui/shared/view-history.css +17 -0
- package/dist/ui/shared/view-history.js +438 -0
- package/dist/ui/shared/view-strings.js +16 -0
- package/dist/ui/shared/workspace.css +20 -0
- package/dist/ui/signin.html +21 -0
- package/dist/ui/windows-cli-catalog.js +41 -12
- package/dist/ui/workspace-panel.js +189 -0
- package/dist/ui/workspace-strings.js +35 -0
- package/dist/unattended-install.d.ts +11 -2
- package/dist/unattended-install.js +41 -6
- package/dist/unattended-install.js.map +1 -1
- package/dist/usage/capacity.d.ts +69 -0
- package/dist/usage/capacity.js +119 -0
- package/dist/usage/capacity.js.map +1 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +3 -0
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +16 -0
- package/dist/usage/profile-timeline.js +58 -0
- package/dist/usage/profile-timeline.js.map +1 -0
- package/dist/usage/providers.js +2 -1
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +43 -0
- package/dist/usage/quota-history.js +168 -0
- package/dist/usage/quota-history.js.map +1 -0
- package/dist/usage/usage-api.d.ts +31 -0
- package/dist/usage/usage-api.js +80 -1
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-report.d.ts +25 -1
- package/dist/usage-report.js +55 -4
- package/dist/usage-report.js.map +1 -1
- package/dist/usage-rollup.d.ts +6 -1
- package/dist/usage-rollup.js +16 -4
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +16 -0
- package/dist/view-api.js +105 -23
- package/dist/view-api.js.map +1 -1
- package/dist/view-history.d.ts +84 -0
- package/dist/view-history.js +116 -0
- package/dist/view-history.js.map +1 -0
- package/dist/web-api.d.ts +49 -2
- package/dist/web-api.js +279 -8
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +23 -1
- package/dist/web-backend-login.js +11 -17
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-device-login.d.ts +153 -0
- package/dist/web-device-login.js +278 -0
- package/dist/web-device-login.js.map +1 -0
- package/dist/web-office-skins.d.ts +9 -0
- package/dist/web-office-skins.js +16 -1
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-session-authorization.d.ts +13 -2
- package/dist/web-session-authorization.js +10 -3
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +35 -0
- package/dist/web-session.js +7 -0
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +3 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +6 -0
- package/dist/web-shell-routes.js +7 -0
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +4 -30
- package/dist/web-terminal.js +9 -6
- package/dist/web-terminal.js.map +1 -1
- package/dist/windows-agents.d.ts +4 -1
- package/dist/windows-agents.js +14 -10
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.d.ts +12 -1
- package/dist/windows-cli-api.js +29 -2
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-providers.d.ts +0 -9
- package/dist/windows-cli-providers.js +4 -9
- package/dist/windows-cli-providers.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +25 -0
- package/dist/windows-cli-worker.js +98 -7
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +11 -0
- package/dist/windows-cli.js +17 -3
- package/dist/windows-cli.js.map +1 -1
- package/dist/yaml-shared-nodes.js +8 -3
- package/dist/yaml-shared-nodes.js.map +1 -1
- package/launcher/agend-install.cjs +8 -1
- package/launcher/launchd-session-type.cjs +14 -0
- package/launcher/postinstall.cjs +27 -2
- package/launcher/private-home.cjs +1 -1
- package/launcher/tmux-bundle.cjs +247 -0
- package/package.json +3 -2
- package/templates/launchd.plist.ejs +3 -1
- package/templates/runtime-install/install.ps1 +270 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Pure lazy owner Settings while off. Hub clients/pairing UI load only after a saved on state and a member page mark.
|
|
2
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
4
|
+
import { api, confirmedWrite } from "./settings-confirm.js";
|
|
5
|
+
register("hubMembership", {
|
|
6
|
+
en: {
|
|
7
|
+
title: "Hub membership", enabled: "Allow this fleet to connect to a Hub",
|
|
8
|
+
hint: "Off by default. Enabling does not pair a Hub or share an agent; choose those separately below.",
|
|
9
|
+
off: "Turning this off stops new Hub work and answer disclosure. Existing agent conversations remain.",
|
|
10
|
+
loading: "Reading membership settings…", pending: "Waiting for owner confirmation…",
|
|
11
|
+
failed: "The membership change could not be verified. Check again before trying another change.",
|
|
12
|
+
unavailable: "Membership settings are unavailable. Open this fleet's own owner Settings and check again.",
|
|
13
|
+
retry: "Check again", reload: "Reload page", reloadHint: "Reload the page to refresh the Hub controls.",
|
|
14
|
+
},
|
|
15
|
+
"zh-TW": {
|
|
16
|
+
title: "Hub 成員功能", enabled: "允許這個艦隊連線至 Hub",
|
|
17
|
+
hint: "預設關閉。啟用不會自動配對 Hub 或分享代理;請在下方另外選擇。",
|
|
18
|
+
off: "關閉後會停止新的 Hub 工作與回答傳送,既有代理對話會保留。",
|
|
19
|
+
loading: "正在讀取成員設定…", pending: "等待擁有者確認…",
|
|
20
|
+
failed: "無法確認成員設定是否已變更。請再次檢查,再嘗試其他變更。",
|
|
21
|
+
unavailable: "目前無法使用成員設定。請開啟這個艦隊自己的擁有者設定頁面,再次檢查。",
|
|
22
|
+
retry: "再次檢查", reload: "重新整理頁面", reloadHint: "請重新整理頁面以更新 Hub 控制項。",
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
const copy = key => t(`hubMembership.${key}`);
|
|
26
|
+
const path = "/api/settings/hub/membership";
|
|
27
|
+
const markedMember = () => String(globalThis.document?.body?.dataset?.hub || "").split(/\s+/).includes("member");
|
|
28
|
+
export function HubMembershipSettings() {
|
|
29
|
+
const publicPage = globalThis.document?.body?.dataset?.publicLink === "1";
|
|
30
|
+
const [view, setView] = useState(null), [busy, setBusy] = useState(false), [messageKey, setMessageKey] = useState("loading");
|
|
31
|
+
const [Connect, setConnect] = useState(null);
|
|
32
|
+
const owner = useRef({ mounted: true, seq: 0, busy: false });
|
|
33
|
+
const read = async () => {
|
|
34
|
+
const seq = ++owner.current.seq;
|
|
35
|
+
let result; try { result = await api(path); } catch { result = null; }
|
|
36
|
+
if (!owner.current.mounted || owner.current.seq !== seq) return;
|
|
37
|
+
if (result?.ok && typeof result.body?.enabled === "boolean") { setView({ enabled: result.body.enabled }); setMessageKey(""); }
|
|
38
|
+
else { setView(null); setMessageKey("unavailable"); }
|
|
39
|
+
};
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
owner.current.mounted = true;
|
|
42
|
+
if (!publicPage) read();
|
|
43
|
+
return () => { owner.current.mounted = false; owner.current.seq++; };
|
|
44
|
+
}, [publicPage]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
let live = true;
|
|
47
|
+
if (!publicPage && view?.enabled && markedMember()) import("./settings-hub.js").then(m => { if (live) setConnect(() => m.HubConnectCard); }, () => {});
|
|
48
|
+
return () => { live = false; };
|
|
49
|
+
}, [publicPage, view?.enabled]);
|
|
50
|
+
const change = async enabled => {
|
|
51
|
+
if (publicPage || !view || owner.current.busy) return;
|
|
52
|
+
owner.current.busy = true; owner.current.seq++; setBusy(true); setMessageKey("");
|
|
53
|
+
try {
|
|
54
|
+
const result = await confirmedWrite(path, { method: "PUT", body: { enabled }, label: copy("title"),
|
|
55
|
+
onPending: () => { if (owner.current.mounted) setMessageKey("pending"); } });
|
|
56
|
+
if (!owner.current.mounted) return;
|
|
57
|
+
if (result.ok) await read();
|
|
58
|
+
else { setView(null); setMessageKey("failed"); }
|
|
59
|
+
} catch { if (owner.current.mounted) { setView(null); setMessageKey("failed"); } }
|
|
60
|
+
finally { owner.current.busy = false; if (owner.current.mounted) setBusy(false); }
|
|
61
|
+
};
|
|
62
|
+
if (publicPage) return null;
|
|
63
|
+
return html`<div class="form hub-membership-settings"><section class="card">
|
|
64
|
+
<h3>${copy("title")}</h3><p class="note">${copy("hint")}</p>
|
|
65
|
+
<label class="check"><input class="s-ui-toggle" type="checkbox" role="switch" checked=${view?.enabled === true}
|
|
66
|
+
disabled=${!view || busy} onChange=${e => change(e.target.checked)} /><span>${copy("enabled")}</span></label>
|
|
67
|
+
<p class="note">${copy("off")}</p>
|
|
68
|
+
${messageKey ? html`<p role="status">${copy(messageKey)}</p>` : null}
|
|
69
|
+
${!view && !busy && messageKey !== "loading" ? html`<button class="btn btn-sm" type="button" onClick=${read}>${copy("retry")}</button>` : null}
|
|
70
|
+
${view && view.enabled !== markedMember() ? html`<p class="note">${copy("reloadHint")} <button class="btn btn-sm" type="button" disabled=${busy} onClick=${() => location.reload()}>${copy("reload")}</button></p>` : null}
|
|
71
|
+
</section>${view?.enabled && markedMember() && Connect ? html`<${Connect} />` : null}</div>`;
|
|
72
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Host-owner Settings only. Own the copy here so an open tab's older Settings strings still work.
|
|
2
|
+
import { html, useEffect, useState } from "/assets/app-html.js";
|
|
3
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
4
|
+
import { api, confirmedWrite } from "./settings-confirm.js";
|
|
5
|
+
register("hubRetention", {
|
|
6
|
+
en: {
|
|
7
|
+
title: "Hub record retention", content: "Question and answer content (days)", events: "Event records (days)",
|
|
8
|
+
hint: "Choose 1–3650 days. Shorter periods can permanently remove older records at the next daily cleanup. Increasing a period does not restore deleted records.",
|
|
9
|
+
save: "Save retention", saved: "Retention saved.", failed: "Retention could not be saved. Reload and try again.",
|
|
10
|
+
conflict: "Retention changed while this page was open. Reload before saving.", unavailable: "Start the initialized Hub to view or change retention.",
|
|
11
|
+
},
|
|
12
|
+
"zh-TW": {
|
|
13
|
+
title: "Hub 紀錄保留期間", content: "提問與回答內容(天)", events: "事件紀錄(天)",
|
|
14
|
+
hint: "請選擇 1 到 3650 天。縮短天數後,下次每日清理可能永久刪除較早的紀錄;延長天數無法還原已刪除的紀錄。",
|
|
15
|
+
save: "儲存保留期間", saved: "已儲存保留期間。", failed: "無法儲存保留期間。請重新整理後再試。",
|
|
16
|
+
conflict: "這個頁面開啟期間,保留設定已變更。請重新整理後再儲存。", unavailable: "請先啟動已初始化的 Hub,再查看或修改保留期間。",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const copy = key => t(`hubRetention.${key}`);
|
|
20
|
+
export function HubRetentionSettings() {
|
|
21
|
+
const [policy, setPolicy] = useState(null), [content, setContent] = useState(""), [events, setEvents] = useState("");
|
|
22
|
+
const [busy, setBusy] = useState(false), [messageKey, setMessageKey] = useState("");
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
let live = true;
|
|
25
|
+
api("/api/settings/hub/retention").then(r => {
|
|
26
|
+
if (!live) return;
|
|
27
|
+
if (r.ok && r.body?.policy) { setPolicy(r.body.policy); setContent(String(r.body.policy.contentDays)); setEvents(String(r.body.policy.eventDays)); }
|
|
28
|
+
else setMessageKey("unavailable");
|
|
29
|
+
}, () => { if (live) setMessageKey("unavailable"); });
|
|
30
|
+
return () => { live = false; };
|
|
31
|
+
}, []);
|
|
32
|
+
const valid = value => /^\d{1,4}$/.test(value) && Number(value) >= 1 && Number(value) <= 3650;
|
|
33
|
+
const save = async e => {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
if (!policy || busy || !valid(content) || !valid(events)) return;
|
|
36
|
+
setBusy(true); setMessageKey("");
|
|
37
|
+
try {
|
|
38
|
+
const r = await confirmedWrite("/api/settings/hub/retention", { method: "PUT", label: copy("title"),
|
|
39
|
+
body: { contentDays: Number(content), eventDays: Number(events), revision: policy.revision } });
|
|
40
|
+
if (r.ok && r.body?.policy) { setPolicy(r.body.policy); setMessageKey("saved"); }
|
|
41
|
+
else setMessageKey(r.body?.error === "conflict" ? "conflict" : "failed");
|
|
42
|
+
} catch { setMessageKey("failed"); } finally { setBusy(false); }
|
|
43
|
+
};
|
|
44
|
+
return html`<section class="card hub-retention"><h3>${copy("title")}</h3>
|
|
45
|
+
<p class="note">${copy("hint")}</p>
|
|
46
|
+
${policy ? html`<form class="form" onSubmit=${save}><div class="grid2">
|
|
47
|
+
<label class="field">${copy("content")}<input type="number" min="1" max="3650" step="1" value=${content} disabled=${busy} onInput=${e => setContent(e.target.value)} /></label>
|
|
48
|
+
<label class="field">${copy("events")}<input type="number" min="1" max="3650" step="1" value=${events} disabled=${busy} onInput=${e => setEvents(e.target.value)} /></label>
|
|
49
|
+
</div><button class="btn" type="submit" disabled=${busy || !valid(content) || !valid(events)}>${copy("save")}</button></form>` : null}
|
|
50
|
+
${messageKey ? html`<p role="status">${copy(messageKey)}</p>` : null}
|
|
51
|
+
</section>`;
|
|
52
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// AgEnD Hub P1, slice 3 (docs/design/hub-ui-client.md): Settings → Access & security → "Connect to a Hub", on a member
|
|
2
|
+
// fleet (the page's mark; never drawn or loaded while hub_member is off). The address and one-time code, then each
|
|
3
|
+
// pairing state as it is — waiting (the pairing fingerprint to compare, both confirmations), connected (the approved
|
|
4
|
+
// Hub key's fingerprint), the key changed (both keys, labelled; only pair again or disconnect), on hold (why) — then
|
|
5
|
+
// this fleet's own agents with a Share switch each, against the revision shown (a stale tab gets a conflict, never a
|
|
6
|
+
// silent widening). Everything goes through hubClient(); until slice 1 that is a stub, and the card says so.
|
|
7
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
8
|
+
import { Icon } from "/assets/ui-icons.js";
|
|
9
|
+
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
10
|
+
import { compareGroups, hubClient, safeWebOrigin, ADDRESS_HINT, CODE_HINT } from "./hub-client.js";
|
|
11
|
+
import { hw, linkHubCss } from "./hub-strings.js";
|
|
12
|
+
import { guidanceFor } from "./hub-provider-guidance.js";
|
|
13
|
+
import { AGENT_CHOICE } from "./hub-agent-copy.js";
|
|
14
|
+
|
|
15
|
+
const CONNECT_ERRORS = { address: "errAddress", code: "errCode", busy: "errBusy", unreachable: "errUnreachable", refused: "errRefused" };
|
|
16
|
+
const HOLDS = new Set(["unknown_outcome", "expired", "unsaved", "refused", "revoked", "disconnected"]);
|
|
17
|
+
const PUBLISH_ERRORS = { conflict: "errConflict", unsaved: "errUnsaved", not_paired: "errNotPaired", not_enforceable: "agentNotShareable",
|
|
18
|
+
unknown_view: "agentNotShareable", limit: "errLimit", unavailable: "notAvailable" };
|
|
19
|
+
|
|
20
|
+
/** A fingerprint: its first 128 bits in groups people compare, the whole digest on request. */
|
|
21
|
+
function Fingerprint({ label, fp }) {
|
|
22
|
+
const [full, setFull] = useState(false);
|
|
23
|
+
const digest = fp && fp.digest ? String(fp.digest).toLowerCase() : "";
|
|
24
|
+
return html`<div class="hub-fp">
|
|
25
|
+
<span class="hub-fp-label">${label}</span>
|
|
26
|
+
<code class="hub-fp-groups">${compareGroups(digest)}</code>
|
|
27
|
+
${digest.length > 32 ? html`<button type="button" class="btn btn-sm btn-link" aria-expanded=${full ? "true" : "false"} onClick=${() => setFull(!full)}>${hw(full ? "hideFull" : "showFull")}</button>` : null}
|
|
28
|
+
${full ? html`<code class="hub-fp-full">${digest}</code>` : null}
|
|
29
|
+
</div>`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function HubConnectCard() {
|
|
33
|
+
const client = hubClient();
|
|
34
|
+
const [pairing, setPairing] = useState(null);
|
|
35
|
+
const [form, setForm] = useState({ address: "", code: "" });
|
|
36
|
+
const [busy, setBusy] = useState(false);
|
|
37
|
+
const [msg, setMsg] = useState(null);
|
|
38
|
+
const live = useRef(true);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
linkHubCss();
|
|
41
|
+
live.current = true;
|
|
42
|
+
client.pairing().then((p) => { if (live.current) setPairing(p); }, () => {});
|
|
43
|
+
const off = client.subscribe((p) => { if (live.current) setPairing(p); });
|
|
44
|
+
return () => { live.current = false; off(); };
|
|
45
|
+
}, []);
|
|
46
|
+
const act = async (fn) => {
|
|
47
|
+
if (busy) return;
|
|
48
|
+
setBusy(true); setMsg(null);
|
|
49
|
+
try { await fn(); } catch { if (live.current) setMsg({ error: true, text: hw("errFailed") }); }
|
|
50
|
+
finally { if (live.current) setBusy(false); }
|
|
51
|
+
};
|
|
52
|
+
const connect = () => act(async () => {
|
|
53
|
+
const r = await client.connect({ address: form.address.trim(), code: form.code.trim() });
|
|
54
|
+
if (!live.current) return;
|
|
55
|
+
if (r.ok) { setPairing(r.pairing); setForm({ address: "", code: "" }); if (r.pendingConfirmation) setMsg({ error: false, text: hw("pendingSent") }); }
|
|
56
|
+
else setMsg({ error: true, text: hw(CONNECT_ERRORS[r.error] || "errFailed") });
|
|
57
|
+
});
|
|
58
|
+
const disconnect = (name) => act(async () => {
|
|
59
|
+
const shown = pairing; // #3115 r2: the pairing on screen now, before the dialog
|
|
60
|
+
if (!(await confirmDialog({ message: hw("disconnectAsk", name), confirmLabel: hw("disconnect"), danger: true }))) return;
|
|
61
|
+
const r = await client.disconnect(shown);
|
|
62
|
+
if (!live.current) return;
|
|
63
|
+
if (!r.ok) { setMsg({ error: true, text: hw("errUnsaved") }); return; }
|
|
64
|
+
setPairing(await client.pairing());
|
|
65
|
+
if (r.pendingConfirmation) { setMsg({ error: false, text: hw("pendingSent") }); return; }
|
|
66
|
+
if (r.remote === "pending") setMsg({ error: false, text: hw("disconnectPending") });
|
|
67
|
+
});
|
|
68
|
+
const cancel = () => act(async () => { const p = await client.cancel(); if (live.current) setPairing(p); });
|
|
69
|
+
|
|
70
|
+
const p = pairing;
|
|
71
|
+
let body = null;
|
|
72
|
+
if (!p) body = null;
|
|
73
|
+
else if (p.state === "unpaired") {
|
|
74
|
+
const addressOk = ADDRESS_HINT.test(form.address.trim()), codeOk = CODE_HINT.test(form.code.trim());
|
|
75
|
+
body = html`<form class="form hub-connect" onSubmit=${(e) => { e.preventDefault(); connect(); }}>
|
|
76
|
+
<label class="field"><span>${hw("address")}</span><input id="hubAddress" type="url" inputmode="url" autocomplete="off" spellcheck=${false}
|
|
77
|
+
placeholder=${hw("addressPh")} value=${form.address} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, address: v })); }} /><small class="note">${hw("addressHint")}</small></label>
|
|
78
|
+
<label class="field"><span>${hw("code")}</span><input id="hubCode" autocomplete="one-time-code" spellcheck=${false} autocapitalize="characters"
|
|
79
|
+
value=${form.code} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, code: v })); }} /></label>
|
|
80
|
+
<div class="field-row"><button type="submit" class="btn btn-primary" disabled=${busy || !addressOk || !codeOk}>${hw("connect")}</button></div>
|
|
81
|
+
</form>`;
|
|
82
|
+
} else if (p.state === "pending") {
|
|
83
|
+
const step = (ok, key) => html`<li class=${ok ? "is-done" : ""}><${Icon} name=${ok ? "check" : "clock"} size=${14} /><span>${hw(key)}</span><small>${hw(ok ? "done" : "waiting")}</small></li>`;
|
|
84
|
+
body = html`<div class="hub-state hub-pending" role="status">
|
|
85
|
+
<h4>${hw("pendingTitle")}</h4>
|
|
86
|
+
<p class="hub-origin"><code>${p.memberOrigin}</code></p>
|
|
87
|
+
<${Fingerprint} label=${hw("pairingFp")} fp=${p.fingerprint} />
|
|
88
|
+
<p class="note">${hw("pendingCompare")}</p>
|
|
89
|
+
${p.localConfirmed === false && client.confirmFingerprint ? html`<div class="field-row"><button type="button" class="btn btn-primary hub-local-confirm" disabled=${busy}
|
|
90
|
+
onClick=${() => act(async () => { const r = await client.confirmFingerprint(p.fingerprint.digest); if (!live.current) return;
|
|
91
|
+
if (r.ok) { setPairing(r.pairing); if (r.pendingConfirmation) setMsg({ error: false, text: hw("pendingSent") }); }
|
|
92
|
+
else setMsg({ error: true, text: hw(r.error === "expired" ? "hold_expired" : r.error === "conflict" ? "errConflict" : "errUnsaved") }); })}>${hw("localMatch")}</button></div>`
|
|
93
|
+
: p.localConfirmed === true ? html`<p class="note hub-local-confirmed">${hw("localConfirmed")}</p>` : null}
|
|
94
|
+
${p.ownerConfirmed === null && p.adminApproved === null
|
|
95
|
+
// S3c: the member cannot see the Hub's progress — the two steps as instructions, no marks.
|
|
96
|
+
? html`<p class="hub-steps-lead">${hw("hubStillNeeded")}</p>
|
|
97
|
+
<ul class="hub-steps hub-steps-unknown"><li><span>${hw("ownerStepHub")}</span></li><li><span>${hw("adminStepHub")}</span></li></ul>
|
|
98
|
+
<p class="note">${hw("hubProgressHidden")}</p>`
|
|
99
|
+
: html`<p class="hub-steps-lead">${hw("pendingSteps")}</p>
|
|
100
|
+
<ul class="hub-steps">${step(p.ownerConfirmed, "ownerStep")}${step(p.adminApproved, "adminStep")}</ul>`}
|
|
101
|
+
${Number.isFinite(p.expiresAt) ? html`<p class="note">${hw("expires", new Date(p.expiresAt).toLocaleTimeString())}</p>` : null}
|
|
102
|
+
<div class="field-row"><button type="button" class="btn" disabled=${busy} onClick=${cancel}>${hw("cancel")}</button></div>
|
|
103
|
+
</div>`;
|
|
104
|
+
} else if (p.state === "paired") {
|
|
105
|
+
const origin = safeWebOrigin(p), name = p.hub.name || p.hub.memberOrigin;
|
|
106
|
+
body = html`<div class="hub-state hub-paired">
|
|
107
|
+
<h4>${hw("pairedTitle", name)} <span class=${`hub-link ${p.link === "online" ? "is-online" : "is-offline"}`}>${hw(p.link === "online" ? "online" : "offline")}</span></h4>
|
|
108
|
+
<p class="hub-origin"><code>${p.hub.memberOrigin}</code></p>
|
|
109
|
+
<${Fingerprint} label=${hw("hubKeyFp")} fp=${p.hub.fingerprint} />
|
|
110
|
+
<div class="field-row">
|
|
111
|
+
${origin ? html`<a class="btn" href=${origin} target="_blank" rel="noopener noreferrer">${hw("openHub")}<${Icon} name="external" size=${14} /></a>` : null}
|
|
112
|
+
<button type="button" class="btn btn-danger" disabled=${busy} onClick=${() => disconnect(name)}>${hw("disconnect")}</button>
|
|
113
|
+
</div>
|
|
114
|
+
</div>`;
|
|
115
|
+
} else if (p.state === "key_changed") {
|
|
116
|
+
const name = p.hub.name || p.hub.memberOrigin;
|
|
117
|
+
body = html`<div class="hub-state hub-key-changed" role="alert">
|
|
118
|
+
<h4><${Icon} name="alert" size=${16} /> ${hw("keyTitle")}</h4>
|
|
119
|
+
<p>${hw("keyLead")}</p>
|
|
120
|
+
<${Fingerprint} label=${hw("keyApproved")} fp=${p.hub.fingerprint} />
|
|
121
|
+
<${Fingerprint} label=${hw("keyOffered")} fp=${p.offered} />
|
|
122
|
+
<div class="field-row">
|
|
123
|
+
<button type="button" class="btn" disabled=${busy} onClick=${() => act(async () => { const shown = pairing; await client.disconnect(shown); if (live.current) setPairing(await client.pairing()); })}>${hw("repair")}</button>
|
|
124
|
+
<button type="button" class="btn btn-danger" disabled=${busy} onClick=${() => disconnect(name)}>${hw("disconnect")}</button>
|
|
125
|
+
</div>
|
|
126
|
+
</div>`;
|
|
127
|
+
} else if (p.state === "held" && p.hold === "unavailable") {
|
|
128
|
+
// An older host (404): one line, no form and no fake hold.
|
|
129
|
+
body = html`<p class="note hub-unavailable">${hw("notAvailable")}</p>`;
|
|
130
|
+
} else if (p.state === "held") {
|
|
131
|
+
body = html`<div class="hub-state hub-held" role="alert">
|
|
132
|
+
<h4><${Icon} name="pause" size=${16} /> ${hw("heldTitle")}</h4>
|
|
133
|
+
<p>${hw(HOLDS.has(p.hold) ? `hold_${p.hold}` : "hold_other")}</p>
|
|
134
|
+
${p.memberOrigin ? html`<p class="hub-origin"><code>${p.memberOrigin}</code></p>` : null}
|
|
135
|
+
<div class="field-row"><button type="button" class="btn" disabled=${busy} onClick=${cancel}>${hw(p.hold === "disconnected" ? "startOver" : "holdClear")}</button></div>
|
|
136
|
+
</div>`;
|
|
137
|
+
}
|
|
138
|
+
return html`<section class="card s-hub-connect" id="hub-connect">
|
|
139
|
+
<h3>${hw("title")}</h3>
|
|
140
|
+
<p class="note">${hw("lead")}</p>
|
|
141
|
+
${client.stub ? html`<p class="note hub-preview" role="note">${hw("preview")}</p>` : null}
|
|
142
|
+
${body}
|
|
143
|
+
${msg ? html`<p class=${msg.error ? "err" : "note"} role=${msg.error ? "alert" : "status"}>${msg.text}</p>` : null}
|
|
144
|
+
${p && p.state === "paired" ? html`<${HubExposures} client=${client} />` : null}
|
|
145
|
+
</section>`;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* This fleet's own agents, each private unless shared — against the revision the page shows. P1 shares the agent
|
|
150
|
+
* itself (docs/design/hub-representative-agent.md): switching on sends AGENT_CHOICE for the owner's confirmation; a row
|
|
151
|
+
* shared under the older restricted mode says so and offers "Share again" (a new, confirmed revision).
|
|
152
|
+
*/
|
|
153
|
+
function HubExposures({ client }) {
|
|
154
|
+
const [rows, setRows] = useState(null);
|
|
155
|
+
const [busy, setBusy] = useState(null);
|
|
156
|
+
const [msg, setMsg] = useState(null);
|
|
157
|
+
const live = useRef(true);
|
|
158
|
+
const load = () => client.exposures().then((r) => { if (live.current) setRows(r); }, () => { if (live.current) setRows([]); });
|
|
159
|
+
useEffect(() => { live.current = true; load(); return () => { live.current = false; }; }, []);
|
|
160
|
+
const toggle = async (row, on) => {
|
|
161
|
+
if (busy) return;
|
|
162
|
+
setBusy(row.agent); setMsg(null);
|
|
163
|
+
try {
|
|
164
|
+
const r = await client.setExposed(row.agent, on, row.revision, on ? AGENT_CHOICE : null);
|
|
165
|
+
if (!live.current) return;
|
|
166
|
+
if (!r.ok) { setMsg({ error: true, text: hw(PUBLISH_ERRORS[r.error] || "errUnsaved") }); if (r.error === "conflict") await load(); return; }
|
|
167
|
+
if (!on && r.remote === "pending") setMsg({ error: false, text: hw("withdrawPending") });
|
|
168
|
+
if (r.pending) { setMsg({ error: false, text: hw("pendingSent") }); if (r.settled && r.settled.then) r.settled.then(() => { if (live.current) load(); }, () => { if (live.current) load(); }); }
|
|
169
|
+
await load();
|
|
170
|
+
} catch { if (live.current) setMsg({ error: true, text: hw("errUnsaved") }); }
|
|
171
|
+
finally { if (live.current) setBusy(null); }
|
|
172
|
+
};
|
|
173
|
+
return html`<div class="hub-exposures">
|
|
174
|
+
<h4>${hw("sharedTitle")}</h4>
|
|
175
|
+
<p class="note">${hw("agentLead")}</p>
|
|
176
|
+
${rows && !rows.length ? html`<p class="note">${hw("noAgents")}</p>` : null}
|
|
177
|
+
${rows && rows.length ? html`<ul class="hub-exposure-list">${rows.map((row) => html`<li key=${row.agent} class=${`hub-exposure${row.state === "published" ? " is-shared" : ""}`}>
|
|
178
|
+
<label class="hub-exposure-main">
|
|
179
|
+
<input class="s-ui-toggle" type="checkbox" role="switch" checked=${row.state === "published"} aria-label=${hw("share", row.display)}
|
|
180
|
+
disabled=${busy !== null || !!row.pending || row.state === "frozen" || (row.state !== "published" && !row.enforceable)}
|
|
181
|
+
onChange=${(e) => toggle(row, e.target.checked)} />
|
|
182
|
+
<span class="hub-exposure-name">${row.display}${row.display !== row.agent ? html` <small><code>${row.agent}</code></small>` : null}</span>
|
|
183
|
+
</label>
|
|
184
|
+
${row.pending ? html`<small class="hub-exposure-why hub-exposure-pending">${hw("waitingConfirm")}</small>`
|
|
185
|
+
: row.state === "frozen" ? html`<small class="hub-exposure-why">${hw("frozen")}</small>`
|
|
186
|
+
: !row.enforceable && row.state !== "published" ? html`<small class="hub-exposure-why">${hw(row.reason === "delivery_unavailable" ? "agentDeliveryUnavailable" : "agentNotShareable")}</small>`
|
|
187
|
+
: row.reason === "republish_required" ? html`<small class="hub-exposure-why hub-exposure-republish">${hw("republishRequired")}
|
|
188
|
+
<button type="button" class="btn btn-sm" disabled=${busy !== null} onClick=${() => toggle(row, true)}>${hw("shareAgain")}</button></small>`
|
|
189
|
+
: row.policy && row.policy.dataView === AGENT_CHOICE.dataViewId ? html`<small class="hub-exposure-why">${hw("agentShared")}</small>`
|
|
190
|
+
: row.policy ? html`<small class="hub-exposure-why">${hw("policy", row.policy.dataView, row.policy.tools.join(", ") || "—")}</small>` : null}
|
|
191
|
+
${!row.enforceable && row.state !== "frozen" && guidanceFor(row.reason)
|
|
192
|
+
? html`<small class="hub-exposure-why hub-provider-guidance">${hw(guidanceFor(row.reason))}</small>` : null}
|
|
193
|
+
</li>`)}</ul>` : null}
|
|
194
|
+
${msg ? html`<p class=${msg.error ? "err" : "note"} role=${msg.error ? "alert" : "status"}>${msg.text}</p>` : null}
|
|
195
|
+
</div>`;
|
|
196
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// Shared presentation for Settings. Tab panels stay mounted so switching views never drops a form's draft.
|
|
2
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
4
|
+
import { PageHead } from "/assets/page-head.js";
|
|
5
|
+
import "./settings-strings.js";
|
|
6
|
+
import "./settings-shared-strings.js"; // SettingsPageHead prints settings.sec_<section>; sec_agent-defaults is one of these words (#3087)
|
|
7
|
+
|
|
8
|
+
register("settingsLayout", {
|
|
9
|
+
en: {
|
|
10
|
+
account: "Your account", personal: "Your preferences", fleet: "Whole fleet",
|
|
11
|
+
lead_preferences: "Your identity, language and content preferences.",
|
|
12
|
+
lead_look: "Choose how AgEnD looks and keep your workspace comfortable.",
|
|
13
|
+
lead_agents: "Manage agents across runtimes, with their CLI, model and status in one place.",
|
|
14
|
+
"lead_agent-defaults": "Changes here apply to every agent that has no setting of its own — including agents you create later.",
|
|
15
|
+
lead_chat: "Connect chat services and choose how messages are received and delivered.",
|
|
16
|
+
"lead_web-dashboard": "Manage fleet-wide dashboard features, branding and resource limits.",
|
|
17
|
+
lead_access: "Manage sign-in, web authority, guests and sharing.",
|
|
18
|
+
lead_advanced: "Inspect and edit fleet configuration, with effective values kept separate.",
|
|
19
|
+
editor: "Configuration editor", effective: "Effective settings (read only)",
|
|
20
|
+
aiAccounts: "AI accounts and keys", aiAccountsHint: "Sign-ins and supported provider keys on the AgEnD host. Windows CLI status is shown under Runtime.",
|
|
21
|
+
classicDefaults: "ClassicBot defaults and access",
|
|
22
|
+
},
|
|
23
|
+
"zh-TW": {
|
|
24
|
+
account: "你的帳號", personal: "你的偏好", fleet: "整個 Fleet",
|
|
25
|
+
lead_preferences: "你的身分、語言與內容偏好。",
|
|
26
|
+
lead_look: "調整顯示方式,保留你的工作習慣。",
|
|
27
|
+
lead_agents: "集中管理各個 Runtime 的 Agent、CLI、模型與狀態。",
|
|
28
|
+
"lead_agent-defaults": "改了會套用到所有沒有自己設定的 Agent,包括之後新建立的。",
|
|
29
|
+
lead_chat: "連接聊天服務,設定訊息如何進入與送出。",
|
|
30
|
+
"lead_web-dashboard": "管理整個 Fleet 的網頁功能、品牌與資源限制。",
|
|
31
|
+
lead_access: "管理登入、網頁授權、訪客與對外分享。",
|
|
32
|
+
lead_advanced: "檢視與編輯 Fleet 設定,並區分目前生效的唯讀內容。",
|
|
33
|
+
editor: "設定編輯器", effective: "生效設定(唯讀)",
|
|
34
|
+
aiAccounts: "AI 帳號與金鑰", aiAccountsHint: "管理 AgEnD 主機的登入與支援的供應商金鑰;Windows CLI 狀態請到 Runtime 查看。",
|
|
35
|
+
classicDefaults: "ClassicBot 預設行為與存取",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
register("settingsLayout", {
|
|
40
|
+
en: {
|
|
41
|
+
aiAccounts: "AI sign-ins and API keys", aiAccountsSummary: "Host CLI sign-ins and provider API keys, managed separately.",
|
|
42
|
+
aiHostScope: "Credentials on the AgEnD host", aiAccountsHint: "These sign-ins and keys belong to the host running AgEnD.", aiWindowsLink: "Manage Windows computers and their CLIs in Runtime",
|
|
43
|
+
apiKeysTitle: "Provider API keys", apiKeysHint: "API credentials for supported provider integrations.", apiKeysUnavailableState: "Not offered", apiKeysUnavailable: "Provider API key management is not offered in this session.",
|
|
44
|
+
apiNewPlaceholder: "Enter an API key to verify", apiReplacePlaceholder: "Enter a replacement API key",
|
|
45
|
+
},
|
|
46
|
+
"zh-TW": {
|
|
47
|
+
aiAccounts: "AI 登入與 API 金鑰", aiAccountsSummary: "分開管理主機 CLI 登入與供應商 API 金鑰。",
|
|
48
|
+
aiHostScope: "AgEnD 主機上的憑證", aiAccountsHint: "這裡的登入與金鑰屬於執行 AgEnD 的主機。", aiWindowsLink: "前往 Runtime 管理 Windows 電腦與 CLI",
|
|
49
|
+
apiKeysTitle: "供應商 API 金鑰", apiKeysHint: "供支援的供應商整合功能使用的 API 憑證。", apiKeysUnavailableState: "目前未提供", apiKeysUnavailable: "此工作階段未提供供應商 API 金鑰管理。",
|
|
50
|
+
apiNewPlaceholder: "輸入要驗證的 API 金鑰", apiReplacePlaceholder: "輸入替換用的 API 金鑰",
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const layoutText = (key, ...values) => t(`settingsLayout.${key}`, ...values);
|
|
55
|
+
|
|
56
|
+
register("settingsLayout", {
|
|
57
|
+
"en": {
|
|
58
|
+
"accessLogin": "Sign-in & authority",
|
|
59
|
+
"accessGuests": "Guests",
|
|
60
|
+
"accessSharing": "Public & sharing",
|
|
61
|
+
"accessSharingList": "Shared links",
|
|
62
|
+
"accessPublicCredentials": "Cloudflare connector credentials",
|
|
63
|
+
"accessPolicyHint": "How access changes take effect",
|
|
64
|
+
"dashboardFeatures": "Features",
|
|
65
|
+
"developerReadOnly": "Read-only mode",
|
|
66
|
+
"developerEditing": "Editing draft",
|
|
67
|
+
"effectiveKey": "Setting key",
|
|
68
|
+
"effectiveValue": "Value in effect",
|
|
69
|
+
"effectiveSource": "Source",
|
|
70
|
+
"effectiveSourceConfig": "fleet.yaml",
|
|
71
|
+
"effectiveSourceDefault": "Default"
|
|
72
|
+
},
|
|
73
|
+
"zh-TW": {
|
|
74
|
+
"accessLogin": "登入與授權",
|
|
75
|
+
"accessGuests": "訪客",
|
|
76
|
+
"accessSharing": "公開與分享",
|
|
77
|
+
"accessSharingList": "分享連結",
|
|
78
|
+
"accessPublicCredentials": "Cloudflare 連接器憑證",
|
|
79
|
+
"accessPolicyHint": "存取變更如何生效",
|
|
80
|
+
"dashboardFeatures": "功能",
|
|
81
|
+
"developerReadOnly": "唯讀模式",
|
|
82
|
+
"developerEditing": "編輯草稿中",
|
|
83
|
+
"effectiveKey": "設定鍵",
|
|
84
|
+
"effectiveValue": "目前生效值",
|
|
85
|
+
"effectiveSource": "來源",
|
|
86
|
+
"effectiveSourceConfig": "fleet.yaml",
|
|
87
|
+
"effectiveSourceDefault": "預設"
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export function SettingsPageHead({ section, children }) {
|
|
92
|
+
const scope = section === "preferences" ? "account" : section === "look" ? "personal" : "fleet";
|
|
93
|
+
return html`<${PageHead} title=${t(`settings.sec_${section}`)} scope=${layoutText(scope)} lead=${layoutText(`lead_${section}`)}>${children}</${PageHead}>`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Settings search, validation links and legacy anchors reveal their owning tab before focusing a control.
|
|
97
|
+
const revealers = new Set();
|
|
98
|
+
export function useSettingsTabs(group, initial) {
|
|
99
|
+
const [value, setValue] = useState(initial);
|
|
100
|
+
const current = useRef(value);
|
|
101
|
+
current.current = value;
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
const reveal = target => {
|
|
104
|
+
const panel = target?.closest?.("[data-settings-tabs]");
|
|
105
|
+
if (!panel || panel.getAttribute("data-settings-tabs") !== group) return false;
|
|
106
|
+
const next = panel.getAttribute("data-settings-tab");
|
|
107
|
+
if (!next || next === current.current) return false;
|
|
108
|
+
current.current = next;
|
|
109
|
+
setValue(next);
|
|
110
|
+
return true;
|
|
111
|
+
};
|
|
112
|
+
revealers.add(reveal);
|
|
113
|
+
return () => revealers.delete(reveal);
|
|
114
|
+
}, [group]);
|
|
115
|
+
return [value, setValue];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function revealSettingsTarget(target) {
|
|
119
|
+
let changed = false;
|
|
120
|
+
for (const reveal of revealers) changed = reveal(target) || changed;
|
|
121
|
+
return changed;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function SettingsTabs({ id, value, onChange, items }) {
|
|
125
|
+
const choose = (key, focus = false) => {
|
|
126
|
+
onChange(key);
|
|
127
|
+
if (focus) document.getElementById(`${id}-tab-${key}`)?.focus();
|
|
128
|
+
};
|
|
129
|
+
const keydown = (event, index) => {
|
|
130
|
+
let next;
|
|
131
|
+
if (event.key === "ArrowRight") next = (index + 1) % items.length;
|
|
132
|
+
else if (event.key === "ArrowLeft") next = (index - 1 + items.length) % items.length;
|
|
133
|
+
else if (event.key === "Home") next = 0;
|
|
134
|
+
else if (event.key === "End") next = items.length - 1;
|
|
135
|
+
else return;
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
choose(items[next].id, true);
|
|
138
|
+
};
|
|
139
|
+
return html`<div class="s-page-tabs" role="tablist" aria-label=${t("settings.title")}>${items.map((item, index) => html`<button key=${item.id} id=${`${id}-tab-${item.id}`} type="button" role="tab" class=${value === item.id ? "on" : ""} aria-selected=${value === item.id ? "true" : "false"} aria-controls=${`${id}-panel-${item.id}`} tabindex=${value === item.id ? 0 : -1} onClick=${() => choose(item.id)} onKeyDown=${event => keydown(event, index)}>${item.label}</button>`)}</div>`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function SettingsTabPanel({ group, id, active, children }) {
|
|
143
|
+
return html`<div id=${`${group}-panel-${id}`} class="s-tab-panel" role="tabpanel" aria-labelledby=${`${group}-tab-${id}`} data-settings-tabs=${group} data-settings-tab=${id} hidden=${!active}>${children}</div>`;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
register("settingsLayout", {
|
|
147
|
+
"en": {
|
|
148
|
+
"profileIdentityDetails": "How agents recognise you",
|
|
149
|
+
"previewsPersonalHint": "Only affects your preview preference.",
|
|
150
|
+
"chatConnections": "Chat connections",
|
|
151
|
+
"messageBehavior": "Message behavior",
|
|
152
|
+
"pageContents": "On this page"
|
|
153
|
+
},
|
|
154
|
+
"zh-TW": {
|
|
155
|
+
"profileIdentityDetails": "Agent 如何辨識你的身分",
|
|
156
|
+
"previewsPersonalHint": "只影響你的預覽偏好。",
|
|
157
|
+
"chatConnections": "聊天連線",
|
|
158
|
+
"messageBehavior": "訊息行為",
|
|
159
|
+
"pageContents": "本頁內容"
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
register("settingsLayout", {
|
|
164
|
+
"en": {
|
|
165
|
+
"revDashboard_log": "Agent log tab",
|
|
166
|
+
"revDashboardHint_log": "Show prompts, replies, tool steps and fleet events. Secrets are masked; public links can also see it. Enabling needs confirmation.",
|
|
167
|
+
"revDashboard_usagePub": "Usage over the public link",
|
|
168
|
+
"revDashboardHint_usagePub": "Offer the fleet usage report over the temporary public link. Guests never see it.",
|
|
169
|
+
"revDashboard_levels": "Office levels",
|
|
170
|
+
"revDashboardHint_levels": "Show each agent's lifetime work level on its Office name tag and profile.",
|
|
171
|
+
"revDashboard_cdn": "CDN libraries in HTML previews",
|
|
172
|
+
"revDashboardHint_cdn": "Allow cdnjs and jsDelivr. Requests leave this computer, are visible to the CDN and could send page data out.",
|
|
173
|
+
"revDetails": "Details",
|
|
174
|
+
"revAccessPolicy": "Loosening access needs fleet administrator confirmation. Tightening applies at once.",
|
|
175
|
+
"revLoginSessions": "Sign-in sessions",
|
|
176
|
+
"revPublicSessionLimit": "Public-link sessions are capped at 8 hours, end after 30 minutes idle and never outlive the link.",
|
|
177
|
+
"revSessionDetails": "Session rules and notifications",
|
|
178
|
+
"revRelatedAccess": "Other access settings",
|
|
179
|
+
"revRelatedGuests": "Choose who can sign in and which agents they see.",
|
|
180
|
+
"revRelatedSharing": "Manage the public entry and read-only shared links.",
|
|
181
|
+
"revPublicEntry": "Fleet public entry",
|
|
182
|
+
"revReadOnlySharing": "Time-limited read-only sharing",
|
|
183
|
+
"revSharingOrigin": "Create new shares from the Office or an HTML preview. Manage existing links below.",
|
|
184
|
+
"revEffectiveHint": "These are the values in effect. This view is read only; edit supported values in the configuration editor.",
|
|
185
|
+
"revGoEditor": "Open configuration editor",
|
|
186
|
+
"revEditorContext": "Fleet configuration · use the form pages for individual settings",
|
|
187
|
+
"revUpdateCredential": "Update connector credential",
|
|
188
|
+
"revSetCredential": "Set connector credential",
|
|
189
|
+
"revAuthorityBrief": "Only signed-in fleet administrators can confirm their account's authority in Discord or Telegram. Guests cannot. Publishing, destructive actions, spending, secrets and passing authority require it.",
|
|
190
|
+
"revAuthorityDetails": "Authority rules",
|
|
191
|
+
"revAuthorityEnabled": "Allow web authority",
|
|
192
|
+
"revAuthorityEnabledHint": "Turning this off invalidates existing authority at once. Turning it back on does not restore it.",
|
|
193
|
+
"revAuthorityLocal": "Only this computer",
|
|
194
|
+
"revAuthorityLocalHint": "Allow only this computer's browser. Authority already given over a LAN or tailnet becomes invalid and is not restored by switching this off.",
|
|
195
|
+
"revAuthorityPublicWarning": "Public links are reached from the internet and Cloudflare sees their traffic. Enabling their authority needs confirmation; re-enabling temporary-link authority ends all earlier authorizations.",
|
|
196
|
+
"revAuthorityLinks": "Authority over public links",
|
|
197
|
+
"revGuestManagement": "Guest management",
|
|
198
|
+
"revVisibleAgents": "Visible agents",
|
|
199
|
+
"revGuestLevel": "Level",
|
|
200
|
+
"revGuestDetail": "Selected guest",
|
|
201
|
+
"revSelectGuest": "Add or choose a guest to manage their access."
|
|
202
|
+
},
|
|
203
|
+
"zh-TW": {
|
|
204
|
+
"revDashboard_log": "Agent 紀錄分頁",
|
|
205
|
+
"revDashboardHint_log": "顯示提示、回覆、工具步驟與 Fleet 事件;機密值會遮蔽,公開連結也看得到。開啟需確認。",
|
|
206
|
+
"revDashboard_usagePub": "公開連結提供用量報告",
|
|
207
|
+
"revDashboardHint_usagePub": "透過臨時公開連結提供 Fleet 用量報告;訪客一律看不到。",
|
|
208
|
+
"revDashboard_levels": "辦公室等級",
|
|
209
|
+
"revDashboardHint_levels": "在辦公室名牌與名片上顯示 Agent 依終身工作量得到的等級。",
|
|
210
|
+
"revDashboard_cdn": "HTML 預覽載入 CDN 函式庫",
|
|
211
|
+
"revDashboardHint_cdn": "允許 cdnjs 與 jsDelivr。請求會離開本機,CDN 能看到,也可能被頁面用來傳出資料。",
|
|
212
|
+
"revDetails": "詳細說明",
|
|
213
|
+
"revAccessPolicy": "放寬存取需要 Fleet 管理員確認;收緊的變更立即生效。",
|
|
214
|
+
"revLoginSessions": "登入工作階段",
|
|
215
|
+
"revPublicSessionLimit": "公開連結的工作階段最長 8 小時、閒置 30 分鐘登出,也不會超過連結期限。",
|
|
216
|
+
"revSessionDetails": "工作階段與通知規則",
|
|
217
|
+
"revRelatedAccess": "其他存取設定",
|
|
218
|
+
"revRelatedGuests": "管理可登入的訪客與可見 Agent。",
|
|
219
|
+
"revRelatedSharing": "管理公開入口與唯讀分享連結。",
|
|
220
|
+
"revPublicEntry": "Fleet 公開入口",
|
|
221
|
+
"revReadOnlySharing": "限時唯讀分享",
|
|
222
|
+
"revSharingOrigin": "新分享請從辦公室或 HTML 預覽建立;在下方管理既有連結。",
|
|
223
|
+
"revEffectiveHint": "下方為目前生效的設定,僅供檢視;需要修改時,請切換至設定編輯器。",
|
|
224
|
+
"revGoEditor": "前往設定編輯器",
|
|
225
|
+
"revEditorContext": "Fleet 設定檔・個別設定可使用對應表單調整",
|
|
226
|
+
"revUpdateCredential": "更新連接器憑證",
|
|
227
|
+
"revSetCredential": "設定連接器憑證",
|
|
228
|
+
"revAuthorityBrief": "僅限已登入的 Fleet 管理者,並須在 Discord 或 Telegram 確認本人帳號授權;訪客不適用。發布、破壞性操作、花費、密鑰與轉交授權都需要它。",
|
|
229
|
+
"revAuthorityDetails": "授權規則說明",
|
|
230
|
+
"revAuthorityEnabled": "允許網頁授權",
|
|
231
|
+
"revAuthorityEnabledHint": "關閉會立即使現有授權失效;重新開啟不會恢復。",
|
|
232
|
+
"revAuthorityLocal": "僅限本機",
|
|
233
|
+
"revAuthorityLocalHint": "只接受本機瀏覽器;區域網路與 tailnet 上已給出的授權會失效,關掉此限制也不會恢復。",
|
|
234
|
+
"revAuthorityPublicWarning": "公開連結可從網際網路存取,Cloudflare 看得到流量。開啟其授權須經確認;重新開啟臨時連結授權會結束之前給出的全部授權。",
|
|
235
|
+
"revAuthorityLinks": "公開連結的授權範圍",
|
|
236
|
+
"revGuestManagement": "訪客管理",
|
|
237
|
+
"revVisibleAgents": "可見 Agent",
|
|
238
|
+
"revGuestLevel": "等級",
|
|
239
|
+
"revGuestDetail": "選取的訪客",
|
|
240
|
+
"revSelectGuest": "新增或選擇訪客後,管理其存取權限。"
|
|
241
|
+
}
|
|
242
|
+
});
|
|
@@ -75,6 +75,14 @@ export const visibilityDefault = (defaults) => (VISIBILITY_MODES.includes(defaul
|
|
|
75
75
|
export const replyGuardSupported = (backend, mode, kiroUi = "legacy") =>
|
|
76
76
|
mode === "mcp" && (["claude-code", "codex", "muse"].includes(backend) || (backend === "kiro-cli" && ["legacy", "tui"].includes(kiroUi || "legacy")));
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Backends AgEnD no longer runs, with the one to use instead (#1280). The browser cannot import src/backend/removed.ts;
|
|
80
|
+
* tests/settings-removed-backend-1280.test.ts keeps this list equal to it.
|
|
81
|
+
*/
|
|
82
|
+
export const REMOVED_BACKEND_REPLACEMENTS = Object.freeze({ "gemini-cli": "antigravity" });
|
|
83
|
+
export const removedBackendReplacement = (backend) =>
|
|
84
|
+
typeof backend === "string" && Object.prototype.hasOwnProperty.call(REMOVED_BACKEND_REPLACEMENTS, backend) ? REMOVED_BACKEND_REPLACEMENTS[backend] : null;
|
|
85
|
+
|
|
78
86
|
/**
|
|
79
87
|
* The backend picker's options. A current value it does not offer (the removed gemini-cli, #1280 review) stays first
|
|
80
88
|
* and selected: otherwise the select falls to its first option and an unrelated edit switches the CLI and account.
|
|
@@ -168,6 +176,11 @@ export function groupAgents(instances, live, filter, groupFor = (n) => groupOf(i
|
|
|
168
176
|
* (the key is removed); the visibility baseline is what the picker showed, so a value it cannot show (a typo, read as
|
|
169
177
|
* unset) is never rewritten by an unrelated edit (#1302).
|
|
170
178
|
*/
|
|
179
|
+
/** The agent's own Codex speed, as the picker shows it ("" when unset or not one AgEnD knows). */
|
|
180
|
+
export function codexSpeedOf(inst) {
|
|
181
|
+
const v = inst && inst.backend_options && inst.backend_options.codex && inst.backend_options.codex.speed;
|
|
182
|
+
return v === "fast" || v === "standard" ? v : "";
|
|
183
|
+
}
|
|
171
184
|
export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmojisBaseline) {
|
|
172
185
|
const hang = inst.hang_detector || {};
|
|
173
186
|
const next = {
|
|
@@ -191,7 +204,7 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
191
204
|
office_access: separateChoice(form.dashboard.office),
|
|
192
205
|
office_pack_access: separateChoice(form.dashboard.office_packs),
|
|
193
206
|
};
|
|
194
|
-
return changedFields(next, {
|
|
207
|
+
return Object.assign(changedFields(next, {
|
|
195
208
|
backend: inst.backend || defaults.backend || "claude-code",
|
|
196
209
|
model: (inst.model && inst.model.trim()) || null,
|
|
197
210
|
working_directory: inst.working_directory || "",
|
|
@@ -215,7 +228,15 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
215
228
|
dashboard: dashboardPatchValue(dashboardForm(inst)),
|
|
216
229
|
office_access: separateChoice(dashboardForm(inst).office),
|
|
217
230
|
office_pack_access: separateChoice(dashboardForm(inst).office_packs),
|
|
218
|
-
});
|
|
231
|
+
}), codexSpeedPatch(form, inst));
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* M-2446: only the Codex speed key, merged per backend by the server (settings-instance-patch.ts), so the agent's other
|
|
235
|
+
* backend options are kept; back to "" removes it (null). Nothing when it did not change.
|
|
236
|
+
*/
|
|
237
|
+
function codexSpeedPatch(form, inst) {
|
|
238
|
+
const next = form.codex_speed || "";
|
|
239
|
+
return next === codexSpeedOf(inst) ? {} : { backend_options: { codex: { speed: next || null } } };
|
|
219
240
|
}
|
|
220
241
|
|
|
221
242
|
/** The agent form's starting values (an override shows the inherited value while "inherit" is on). */
|
|
@@ -246,6 +267,7 @@ export function agentForm(inst, defaults, name = "") {
|
|
|
246
267
|
display_name: inst.display_name ?? defaults.display_name ?? "",
|
|
247
268
|
status_emojis: inst.status_emojis || null,
|
|
248
269
|
dashboard: dashboardForm(inst),
|
|
270
|
+
codex_speed: codexSpeedOf(inst),
|
|
249
271
|
inherit: {
|
|
250
272
|
auto_pause_after: inherit("auto_pause_after"), hang: !hasOwn(hang, "timeout_minutes"), agent_mode: inherit("agent_mode"),
|
|
251
273
|
tool_set: inherit("tool_set"), tool_progress: inherit("tool_progress"), cross_instance_visibility: inherit("cross_instance_visibility"),
|