@songsid/agend 2.3.5-alpha.4 → 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-change.d.ts +3 -1
- package/dist/agent-runtime-change.js +15 -3
- package/dist/agent-runtime-change.js.map +1 -1
- 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 +164 -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 +3 -0
- package/dist/backend/codex-footer-hints.js +14 -0
- package/dist/backend/codex-footer-hints.js.map +1 -1
- 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 +78 -15
- 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 +359 -7
- package/dist/fleet-manager.js +1365 -90
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +2 -1
- package/dist/fleet-windows-runtime.js +25 -7
- 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 +2 -2
- 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/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 +25 -7
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +5 -3
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-bundle.d.ts +3 -0
- package/dist/runtime-bundle.js +3 -1
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-cli.d.ts +8 -1
- package/dist/runtime-cli.js +127 -8
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +7 -0
- package/dist/runtime-client-store.js +30 -2
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +63 -1
- package/dist/runtime-client.js +295 -21
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +7 -0
- package/dist/runtime-coordinator.js +213 -35
- 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-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 +17 -2
- package/dist/runtime-protocol.js +12 -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 +97 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +13 -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 +9 -8
- package/dist/ui/backend-signin.js +4 -1
- 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-pane-recovery.js +1 -1
- package/dist/ui/office-share-page.js +4 -2
- package/dist/ui/panel-chat.js +34 -48
- package/dist/ui/panel-details.js +1 -1
- package/dist/ui/panel-fleet.js +78 -10
- 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 +114 -23
- package/dist/ui/panel-settings.js +69 -80
- package/dist/ui/panel-windows-cli.js +12 -2
- 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-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 +28 -7
- 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 +8 -11
- package/dist/ui/settings-model.js +16 -2
- package/dist/ui/settings-outside.js +104 -38
- package/dist/ui/settings-registry.js +4 -1
- package/dist/ui/settings-shared-strings.js +143 -0
- package/dist/ui/settings-shared.js +345 -0
- package/dist/ui/settings-strings.js +10 -46
- package/dist/ui/settings-web-authority.js +5 -2
- 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 +64 -8
- package/dist/ui/shared/app.css +121 -30
- 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/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/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/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/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 +48 -2
- package/dist/web-api.js +276 -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 +1 -0
- package/dist/windows-agents.js +1 -0
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.d.ts +12 -1
- package/dist/windows-cli-api.js +27 -1
- 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 +24 -0
- package/dist/windows-cli-worker.js +96 -5
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +10 -0
- package/dist/windows-cli.js +10 -1
- 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,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
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// Shared presentation for Settings. Tab panels stay mounted so switching views never drops a form's draft.
|
|
2
2
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
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)
|
|
4
7
|
|
|
5
8
|
register("settingsLayout", {
|
|
6
9
|
en: {
|
|
@@ -8,7 +11,7 @@ register("settingsLayout", {
|
|
|
8
11
|
lead_preferences: "Your identity, language and content preferences.",
|
|
9
12
|
lead_look: "Choose how AgEnD looks and keep your workspace comfortable.",
|
|
10
13
|
lead_agents: "Manage agents across runtimes, with their CLI, model and status in one place.",
|
|
11
|
-
"lead_agent-defaults": "
|
|
14
|
+
"lead_agent-defaults": "Changes here apply to every agent that has no setting of its own — including agents you create later.",
|
|
12
15
|
lead_chat: "Connect chat services and choose how messages are received and delivered.",
|
|
13
16
|
"lead_web-dashboard": "Manage fleet-wide dashboard features, branding and resource limits.",
|
|
14
17
|
lead_access: "Manage sign-in, web authority, guests and sharing.",
|
|
@@ -22,7 +25,7 @@ register("settingsLayout", {
|
|
|
22
25
|
lead_preferences: "你的身分、語言與內容偏好。",
|
|
23
26
|
lead_look: "調整顯示方式,保留你的工作習慣。",
|
|
24
27
|
lead_agents: "集中管理各個 Runtime 的 Agent、CLI、模型與狀態。",
|
|
25
|
-
"lead_agent-defaults": "
|
|
28
|
+
"lead_agent-defaults": "改了會套用到所有沒有自己設定的 Agent,包括之後新建立的。",
|
|
26
29
|
lead_chat: "連接聊天服務,設定訊息如何進入與送出。",
|
|
27
30
|
"lead_web-dashboard": "管理整個 Fleet 的網頁功能、品牌與資源限制。",
|
|
28
31
|
lead_access: "管理登入、網頁授權、訪客與對外分享。",
|
|
@@ -87,7 +90,7 @@ register("settingsLayout", {
|
|
|
87
90
|
|
|
88
91
|
export function SettingsPageHead({ section, children }) {
|
|
89
92
|
const scope = section === "preferences" ? "account" : section === "look" ? "personal" : "fleet";
|
|
90
|
-
return html
|
|
93
|
+
return html`<${PageHead} title=${t(`settings.sec_${section}`)} scope=${layoutText(scope)} lead=${layoutText(`lead_${section}`)}>${children}</${PageHead}>`;
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
// Settings search, validation links and legacy anchors reveal their owning tab before focusing a control.
|
|
@@ -146,20 +149,14 @@ register("settingsLayout", {
|
|
|
146
149
|
"previewsPersonalHint": "Only affects your preview preference.",
|
|
147
150
|
"chatConnections": "Chat connections",
|
|
148
151
|
"messageBehavior": "Message behavior",
|
|
149
|
-
"pageContents": "On this page"
|
|
150
|
-
"defaultsAccessWorkspace": "Permissions and workspace",
|
|
151
|
-
"replyRulesHelp": "Reply rules",
|
|
152
|
-
"replySupportHelp": "CLI support"
|
|
152
|
+
"pageContents": "On this page"
|
|
153
153
|
},
|
|
154
154
|
"zh-TW": {
|
|
155
155
|
"profileIdentityDetails": "Agent 如何辨識你的身分",
|
|
156
156
|
"previewsPersonalHint": "只影響你的預覽偏好。",
|
|
157
157
|
"chatConnections": "聊天連線",
|
|
158
158
|
"messageBehavior": "訊息行為",
|
|
159
|
-
"pageContents": "本頁內容"
|
|
160
|
-
"defaultsAccessWorkspace": "權限與工作區",
|
|
161
|
-
"replyRulesHelp": "回覆規則說明",
|
|
162
|
-
"replySupportHelp": "CLI 支援情況"
|
|
159
|
+
"pageContents": "本頁內容"
|
|
163
160
|
}
|
|
164
161
|
});
|
|
165
162
|
|
|
@@ -176,6 +176,11 @@ export function groupAgents(instances, live, filter, groupFor = (n) => groupOf(i
|
|
|
176
176
|
* (the key is removed); the visibility baseline is what the picker showed, so a value it cannot show (a typo, read as
|
|
177
177
|
* unset) is never rewritten by an unrelated edit (#1302).
|
|
178
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
|
+
}
|
|
179
184
|
export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmojisBaseline) {
|
|
180
185
|
const hang = inst.hang_detector || {};
|
|
181
186
|
const next = {
|
|
@@ -199,7 +204,7 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
199
204
|
office_access: separateChoice(form.dashboard.office),
|
|
200
205
|
office_pack_access: separateChoice(form.dashboard.office_packs),
|
|
201
206
|
};
|
|
202
|
-
return changedFields(next, {
|
|
207
|
+
return Object.assign(changedFields(next, {
|
|
203
208
|
backend: inst.backend || defaults.backend || "claude-code",
|
|
204
209
|
model: (inst.model && inst.model.trim()) || null,
|
|
205
210
|
working_directory: inst.working_directory || "",
|
|
@@ -223,7 +228,15 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
223
228
|
dashboard: dashboardPatchValue(dashboardForm(inst)),
|
|
224
229
|
office_access: separateChoice(dashboardForm(inst).office),
|
|
225
230
|
office_pack_access: separateChoice(dashboardForm(inst).office_packs),
|
|
226
|
-
});
|
|
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 } } };
|
|
227
240
|
}
|
|
228
241
|
|
|
229
242
|
/** The agent form's starting values (an override shows the inherited value while "inherit" is on). */
|
|
@@ -254,6 +267,7 @@ export function agentForm(inst, defaults, name = "") {
|
|
|
254
267
|
display_name: inst.display_name ?? defaults.display_name ?? "",
|
|
255
268
|
status_emojis: inst.status_emojis || null,
|
|
256
269
|
dashboard: dashboardForm(inst),
|
|
270
|
+
codex_speed: codexSpeedOf(inst),
|
|
257
271
|
inherit: {
|
|
258
272
|
auto_pause_after: inherit("auto_pause_after"), hang: !hasOwn(hang, "timeout_minutes"), agent_mode: inherit("agent_mode"),
|
|
259
273
|
tool_set: inherit("tool_set"), tool_progress: inherit("tool_progress"), cross_instance_visibility: inherit("cross_instance_visibility"),
|
|
@@ -5,15 +5,20 @@
|
|
|
5
5
|
// Every change applies at once (an action, not a staged setting) and is this computer's only: elsewhere the card shows
|
|
6
6
|
// the state, read-only. The server decides who may (GET /ui/outside's `here`) and refuses everything else regardless.
|
|
7
7
|
// The words are the leader's (cid-alpha3-design, strings 1–13 and 17).
|
|
8
|
+
// Refs #3061: "Set up authenticator app" / "Set up again" open the reference page's dialog (the app's own Dialog: the
|
|
9
|
+
// browser traps focus and closes it on Esc; focus goes back to the button that opened it) — the QR code and the key (step 1),
|
|
10
|
+
// the code field (step 2), Cancel and "Verify and turn on". A wrong code is answered inside the dialog.
|
|
8
11
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
9
12
|
import { t, register } from "/assets/app-i18n.js";
|
|
10
13
|
import { toast } from "/assets/ui-toast.js";
|
|
11
14
|
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
15
|
+
import { Dialog } from "/assets/ui-dialog.js";
|
|
12
16
|
import { api } from "./settings-confirm.js";
|
|
13
17
|
|
|
14
18
|
register("outside", {
|
|
15
19
|
en: {
|
|
16
|
-
title: "
|
|
20
|
+
title: "Owner verification", lead: "Use your authenticator app's 6-digit code to prove, from outside, that you own this fleet.",
|
|
21
|
+
stateOn: "Authenticator set up", stateOff: "Not set up", switch: "Allow connections from outside",
|
|
17
22
|
needApp: "Set up an authenticator app first. Signing in from outside will ask for its code.",
|
|
18
23
|
setUp: "Set up authenticator app",
|
|
19
24
|
scan: "Scan this with Authy, Google Authenticator or Microsoft Authenticator, or type the key. Then enter the 6-digit code it shows.",
|
|
@@ -21,21 +26,32 @@ register("outside", {
|
|
|
21
26
|
againConfirm: "Codes from the old app stop working, and everyone signed in from outside is signed out.",
|
|
22
27
|
remove: "Remove", removeConfirm: "Connections from outside are turned off, and everyone signed in from outside is signed out.",
|
|
23
28
|
openAt: "Open at {0}.", quick: "A quick link gets a new address each time it opens.",
|
|
24
|
-
hereOnly: "Only on the AgEnD computer.
|
|
29
|
+
hereOnly: "Only on the AgEnD computer. Go back to that computer to set up, set up again or remove the app.",
|
|
30
|
+
lostPhone: "Lost your phone? On the AgEnD computer, choose “Set up again”. There is no email or backup-code recovery.",
|
|
31
|
+
noRecovery: "If you lose the authenticator, set it up again on the AgEnD computer. There is no email or backup-code recovery.",
|
|
32
|
+
appsLabel: "Works with these authenticator apps", appOther: "Other TOTP authenticators",
|
|
33
|
+
step1: "1. Add AgEnD to your authenticator", step2: "2. Enter the authenticator code to finish",
|
|
34
|
+
activate: "Verify and turn on", removeTitle: "Remove the authenticator app?",
|
|
25
35
|
wrong: "That code didn't work. Check that your phone's clock is right and try the newest code.",
|
|
26
36
|
paused: "Too many wrong codes. Try again in {0}.", code: "Authenticator code", key: "Key",
|
|
27
37
|
minutes: "{0} minutes", minute: "1 minute", hours: "{0} hours", hour: "1 hour",
|
|
28
38
|
},
|
|
29
39
|
"zh-TW": {
|
|
30
|
-
title: "
|
|
40
|
+
title: "擁有者驗證", lead: "使用驗證器 App 的 6 位數代碼,從外面證明你是這個 fleet 的擁有者。",
|
|
41
|
+
stateOn: "驗證器已設定", stateOff: "尚未設定", switch: "允許從外面連線",
|
|
31
42
|
needApp: "請先設定驗證器 App。從外面登入時會要求輸入它的代碼。",
|
|
32
|
-
setUp: "設定驗證器
|
|
43
|
+
setUp: "設定驗證器",
|
|
33
44
|
scan: "用 Authy、Google Authenticator 或 Microsoft Authenticator 掃描,或手動輸入金鑰,再輸入 App 顯示的 6 位數代碼。",
|
|
34
|
-
setUpOn: "驗證器 App 已於 {0} 設定。", again: "
|
|
45
|
+
setUpOn: "驗證器 App 已於 {0} 設定。", again: "重新綁定驗證器",
|
|
35
46
|
againConfirm: "舊 App 的代碼會失效,所有從外面登入的人都會被登出。",
|
|
36
|
-
remove: "
|
|
47
|
+
remove: "停用", removeConfirm: "從外面連線會關閉,所有從外面登入的人都會被登出。",
|
|
37
48
|
openAt: "已開啟:{0}。", quick: "快速連結每次開啟網址都不同。",
|
|
38
|
-
hereOnly: "只能在 AgEnD
|
|
49
|
+
hereOnly: "只能在 AgEnD 電腦上變更。設定、重新綁定或停用驗證器,請回到那台電腦操作。",
|
|
50
|
+
lostPhone: "手機遺失?請在 AgEnD 電腦上選「重新綁定驗證器」。沒有電子郵件或備援碼復原。",
|
|
51
|
+
noRecovery: "遺失驗證器時,請回 AgEnD 主機重新綁定。沒有電子郵件或備援碼復原。",
|
|
52
|
+
appsLabel: "可使用的驗證器 App", appOther: "其他 TOTP 驗證器",
|
|
53
|
+
step1: "1. 在驗證器中新增 AgEnD", step2: "2. 輸入驗證器代碼以完成綁定",
|
|
54
|
+
activate: "驗證並啟用", removeTitle: "停用驗證器?",
|
|
39
55
|
wrong: "代碼不對。請確認手機時間正確,並輸入最新的代碼。",
|
|
40
56
|
paused: "錯誤次數太多,請 {0} 後再試。", code: "驗證器代碼", key: "金鑰",
|
|
41
57
|
minutes: "{0} 分鐘", minute: "1 分鐘", hours: "{0} 小時", hour: "1 小時",
|
|
@@ -82,6 +98,25 @@ function Qr({ uri }) {
|
|
|
82
98
|
<rect width=${shape.size} height=${shape.size} fill="#fff" /><path d=${shape.d} fill="#000" /></svg>`;
|
|
83
99
|
}
|
|
84
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Refs #3061 review (P2 2): ONE enrolment request at a time, however often the dialog is closed and opened again. The server
|
|
103
|
+
* keeps a single pending secret: every POST /ui/outside/enroll replaces it. With the dialog able to close while a request
|
|
104
|
+
* is still out, "close, open again" used to send a second one; whichever reached the server last then decided which secret
|
|
105
|
+
* would confirm, and when that was the first (closed) one, the secret on the screen — the second's — was already replaced:
|
|
106
|
+
* its valid code failed. Dropping the first answer in the page cannot undo what the server did. So while a request is out
|
|
107
|
+
* the next dialog waits for that same answer and shows it (it is the only secret there is); a new one is asked for only
|
|
108
|
+
* when none is. Held outside the card: a card that is unmounted and mounted again (the person went to another section and
|
|
109
|
+
* back) meets the same request.
|
|
110
|
+
*/
|
|
111
|
+
let enrolling = null;
|
|
112
|
+
function askEnrollment() {
|
|
113
|
+
if (!enrolling) {
|
|
114
|
+
const asked = (async () => { try { return await api("/ui/outside/enroll", { method: "POST", body: "{}" }); } catch { return null; } })();
|
|
115
|
+
enrolling = asked.finally(() => { enrolling = null; });
|
|
116
|
+
}
|
|
117
|
+
return enrolling;
|
|
118
|
+
}
|
|
119
|
+
|
|
85
120
|
/**
|
|
86
121
|
* #3035 review: how often the card reads the state again while it is shown — quickly while the link is opening (the
|
|
87
122
|
* switch answers before the link is up), slowly otherwise (its lifetime ending, a wait starting or ending elsewhere).
|
|
@@ -89,10 +124,12 @@ function Qr({ uri }) {
|
|
|
89
124
|
export const outsidePoll = { quickMs: 2000, slowMs: 15000 };
|
|
90
125
|
|
|
91
126
|
export function OutsideCard() {
|
|
92
|
-
|
|
127
|
+
// `dlg`: the set-up dialog while it is open — { kind: "setup" | "again", enroll: null (asking the server) | { secret, uri } }.
|
|
128
|
+
const [s, setS] = useState(null), [dlg, setDlg] = useState(null), [code, setCode] = useState(""), [msg, setMsg] = useState(""), [busy, setBusy] = useState(false);
|
|
93
129
|
// Fences: an answer that arrives after the card is gone, or after a newer read began, is dropped; nor does a read
|
|
94
|
-
// land while an action is under way (the box shows the click until the action's own read).
|
|
95
|
-
|
|
130
|
+
// land while an action is under way (the box shows the click until the action's own read). `dlg`: the same for the
|
|
131
|
+
// dialog's enrolment (closed meanwhile: its answer is dropped); `refocus`: the dialog just closed, focus goes back.
|
|
132
|
+
const live = useRef({ mounted: true, seq: 0, busy: false, dlg: 0, dlgOpen: false, refocus: false }), card = useRef(null);
|
|
96
133
|
// Every read that ends (answered or not) moves `rev`: the next one is scheduled from there, so a failed read (the
|
|
97
134
|
// network, a 5xx, an unreadable answer) never stops the card reading again (#3035 review r2) — and keeps what it
|
|
98
135
|
// showed meanwhile.
|
|
@@ -116,29 +153,50 @@ export function OutsideCard() {
|
|
|
116
153
|
const timer = setTimeout(() => { if (!live.current.busy) load(); else setRev((n) => n + 1); }, delay);
|
|
117
154
|
return () => clearTimeout(timer);
|
|
118
155
|
}, [rev]);
|
|
156
|
+
// The dialog closed (Cancel, Esc, ×, or done): focus goes back to the button that opened it — or to the one that took its
|
|
157
|
+
// place when the set-up finished ("Set up authenticator app" turned into "Set up again"). The Dialog itself returns focus to
|
|
158
|
+
// whatever was focused when it opened; a browser that does not focus a button on click leaves that as the page, so the card says it.
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
if (dlg || busy || !live.current.refocus) return;
|
|
161
|
+
live.current.refocus = false;
|
|
162
|
+
const el = card.current && card.current.querySelector(s && s.enrolled ? "#outAgain" : "#outSetUp");
|
|
163
|
+
if (el && !el.disabled && typeof el.focus === "function") el.focus();
|
|
164
|
+
}, [dlg, busy]);
|
|
119
165
|
if (!s || !s.webOnly) return null;
|
|
120
166
|
const here = s.here === true;
|
|
121
167
|
const act = async (fn) => {
|
|
122
168
|
setBusy(true); setMsg(""); live.current.busy = true; live.current.seq++; // a read under way is outdated now
|
|
123
169
|
try { await fn(); } finally { live.current.busy = false; if (live.current.mounted) { setBusy(false); load(); } }
|
|
124
170
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
171
|
+
// Open the dialog at once (the button that opened it still has focus) and ask the server for the secret meanwhile; if it
|
|
172
|
+
// will not give one, the dialog closes with the page's usual "failed". Nothing is changed until the right code is confirmed.
|
|
173
|
+
const begin = async (kind) => {
|
|
174
|
+
if (!here || live.current.dlgOpen) return; // not here, or one is open already
|
|
175
|
+
const id = ++live.current.dlg;
|
|
176
|
+
live.current.dlgOpen = true;
|
|
177
|
+
setDlg({ kind, enroll: null }); setCode(""); setMsg("");
|
|
178
|
+
const r = await askEnrollment(); // one at a time: a request still out is this dialog's too
|
|
179
|
+
if (!live.current.mounted || id !== live.current.dlg) return; // closed (or gone) while it was asked
|
|
180
|
+
if (r && r.ok && r.body && r.body.secret) setDlg({ kind, enroll: r.body });
|
|
181
|
+
else { closeDlg(); toast(t("app.failed"), false); }
|
|
182
|
+
};
|
|
183
|
+
function closeDlg() {
|
|
184
|
+
live.current.dlg++; // a late answer to the enrolment is dropped
|
|
185
|
+
live.current.dlgOpen = false;
|
|
186
|
+
live.current.refocus = true;
|
|
187
|
+
setDlg(null); setCode(""); setMsg("");
|
|
188
|
+
}
|
|
189
|
+
const submitBind = () => act(async () => {
|
|
190
|
+
let r;
|
|
191
|
+
try { r = await api("/ui/outside/enroll/confirm", { method: "POST", body: JSON.stringify({ code }) }); } catch { r = null; }
|
|
192
|
+
if (r && r.ok) { await load(); closeDlg(); return; } // read first: the card behind is the new state when it closes
|
|
193
|
+
const why = r && r.body && r.body.error;
|
|
194
|
+
if (why === "expired") { closeDlg(); return; }
|
|
134
195
|
setMsg(why === "wrong" ? to("wrong") : t("app.failed"));
|
|
135
196
|
});
|
|
136
|
-
const
|
|
137
|
-
if (!(await confirmDialog({ title: to("again"), message: to("againConfirm"), confirmLabel: to("again"), danger: true }))) return;
|
|
138
|
-
begin();
|
|
139
|
-
};
|
|
197
|
+
const canConfirm = !!(dlg && dlg.enroll) && /^\s*\d{3}\s?\d{3}\s*$/.test(code);
|
|
140
198
|
const remove = async () => {
|
|
141
|
-
if (!(await confirmDialog({ title: to("
|
|
199
|
+
if (!(await confirmDialog({ title: to("removeTitle"), message: to("removeConfirm"), confirmLabel: to("remove"), danger: true }))) return;
|
|
142
200
|
act(async () => { const r = await api("/ui/outside/remove", { method: "POST", body: "{}" }); if (!r.ok) toast(t("app.failed"), false); });
|
|
143
201
|
};
|
|
144
202
|
// The box follows the click at once (smoke-web-outside-3008: a controlled box that waits for the server reads as a
|
|
@@ -148,7 +206,8 @@ export function OutsideCard() {
|
|
|
148
206
|
if (!r.ok) toast(t("app.failed"), false);
|
|
149
207
|
}); };
|
|
150
208
|
const link = s.link, open = link && link.state === "open";
|
|
151
|
-
return html`<section class="card s-outside" id="outsideCard"><h3>${to("title")}</h3>
|
|
209
|
+
return html`<section class="card s-outside" id="outsideCard" ref=${card}><header class="s-auth-section-head"><div><h3>${to("title")}</h3><p id="outLead">${to("lead")}</p></div><span class=${`s-auth-state${s.enrolled ? " is-usable" : ""}`} id="outState">${to(s.enrolled ? "stateOn" : "stateOff")}</span></header>
|
|
210
|
+
<div class="chips s-out-apps" id="outApps" role="list" aria-label=${to("appsLabel")}><span class="tag" role="listitem">Google Authenticator</span><span class="tag" role="listitem">Microsoft Authenticator</span><span class="tag" role="listitem">${to("appOther")}</span></div>
|
|
152
211
|
${!here ? html`<p class="note" id="outHereOnly">${to("hereOnly")}</p>` : null}
|
|
153
212
|
<label class="check"><input id="outSwitch" type="checkbox" checked=${s.outside} disabled=${!here || busy || (!s.enrolled && !s.outside)}
|
|
154
213
|
onChange=${(e) => flip(e.target.checked)} /><span>${to("switch")}</span></label>
|
|
@@ -156,21 +215,28 @@ export function OutsideCard() {
|
|
|
156
215
|
${s.outside && open && link.url ? html`<p class="note" id="outOpenAt">${to("openAt", link.url)}${link.quick ? ` ${to("quick")}` : ""}</p>` : null}
|
|
157
216
|
${s.outside && link && !open ? html`<p class="note" id="outStarting">${t("app.loading")}</p>` : null}
|
|
158
217
|
${s.pausedForMs > 0 ? html`<p class="note s-va-warn" role="status" id="outPaused">${to("paused", waitWords(s.pausedForMs))}</p>` : null}
|
|
159
|
-
${
|
|
218
|
+
${s.enrolled ? html`<p class="note" id="outSetUpOn">${to("setUpOn", new Date(s.enrolledAt).toLocaleDateString())}</p>
|
|
219
|
+
<p class="note">${to("lostPhone")}</p>
|
|
220
|
+
${here ? html`<div class="save-row"><button type="button" class="btn" id="outAgain" disabled=${busy} onClick=${() => begin("again")}>${to("again")}</button>
|
|
221
|
+
<button type="button" class="btn btn-danger" id="outRemove" disabled=${busy} onClick=${remove}>${to("remove")}</button></div>` : null}`
|
|
222
|
+
: html`<p class="note" id="outNoRecovery">${to("noRecovery")}</p>${here ? html`<div class="save-row"><button type="button" class="btn btn-primary" id="outSetUp" disabled=${busy} onClick=${() => begin("setup")}>${to("setUp")}</button></div>` : null}`}
|
|
223
|
+
${dlg ? html`<${Dialog} title=${to(dlg.kind === "again" ? "again" : "setUp")} onClose=${closeDlg} busy=${busy} actions=${html`
|
|
224
|
+
<button type="button" class="btn" id="outCancel" disabled=${busy} onClick=${closeDlg}>${t("app.cancel")}</button>
|
|
225
|
+
<button type="button" class="btn btn-primary" id="outConfirm" disabled=${busy || !canConfirm} onClick=${submitBind}>${to("activate")}</button>`}>
|
|
226
|
+
<div class="s-out-enroll" id="outEnroll">${dlg.enroll ? html`
|
|
227
|
+
<p class="s-out-step" id="outStep1"><strong>${to("step1")}</strong></p>
|
|
160
228
|
<p class="note">${to("scan")}</p>
|
|
161
|
-
<${Qr} uri=${enroll.uri} />
|
|
162
|
-
<p class="note">${to("key")}: <code id="outKey">${keyGroups(enroll.secret)}</code></p>
|
|
229
|
+
<${Qr} uri=${dlg.enroll.uri} />
|
|
230
|
+
<p class="note">${to("key")}: <code id="outKey">${keyGroups(dlg.enroll.secret)}</code></p>
|
|
231
|
+
<p class="s-out-step" id="outStep2"><strong>${to("step2")}</strong></p>
|
|
163
232
|
<div class="field"><label for="outCode">${to("code")}</label>
|
|
164
233
|
<input id="outCode" type="text" inputmode="numeric" autocomplete="one-time-code" maxlength="7" placeholder="123456" value=${code}
|
|
165
|
-
onInput=${(e) => setCode(e.target.value)}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
${here ? html`<div class="save-row"><button type="button" class="btn" id="outAgain" disabled=${busy} onClick=${again}>${to("again")}</button>
|
|
173
|
-
<button type="button" class="btn btn-danger" id="outRemove" disabled=${busy} onClick=${remove}>${to("remove")}</button></div>` : null}`
|
|
174
|
-
: here ? html`<div class="save-row"><button type="button" class="btn btn-primary" id="outSetUp" disabled=${busy} onClick=${begin}>${to("setUp")}</button></div>` : null}
|
|
234
|
+
onInput=${(e) => setCode(e.target.value)}
|
|
235
|
+
onKeyDown=${(e) => { if (e.key === "Enter" && canConfirm && !busy) { e.preventDefault(); submitBind(); } }} /></div>
|
|
236
|
+
${dlg.kind === "again" ? html`<p class="note" id="outAgainNote">${to("againConfirm")}</p>` : null}
|
|
237
|
+
<p class="note" id="outEnrollNoRecovery">${to("noRecovery")}</p>
|
|
238
|
+
${msg ? html`<p class="feedback error" role="alert" id="outMsg">${msg}</p>` : null}`
|
|
239
|
+
: html`<p class="note" id="outEnrollLoading">${t("app.loading")}</p>`}</div>
|
|
240
|
+
</${Dialog}>` : null}
|
|
175
241
|
</section>`;
|
|
176
242
|
}
|
|
@@ -6,7 +6,9 @@ import { lang, tIn } from "/assets/app-i18n.js";
|
|
|
6
6
|
import { sectionPath } from "/assets/app-route.js";
|
|
7
7
|
import { navigate } from "/assets/app-nav.js";
|
|
8
8
|
import "./settings-strings.js";
|
|
9
|
-
import "./
|
|
9
|
+
import "./settings-shared-strings.js"; // search shows these labels from outside Settings (dailyTips, hangEnabled, crossInstanceVisibility)
|
|
10
|
+
import "./settings-access-strings.js"; // …and this one (webLoginQr), added by Access & security (#3061)
|
|
11
|
+
import "/assets/chat-strings.js";
|
|
10
12
|
import { GUESTS_SETTINGS } from "./settings-guests.js";
|
|
11
13
|
|
|
12
14
|
const L = (en, zh) => ({ en, "zh-TW": zh });
|
|
@@ -42,6 +44,7 @@ const ROWS = [
|
|
|
42
44
|
["runtimes.machines", "runtimes", ".runtime-settings", "settings.sec_runtimes", null, ["runtime", "computer", "machine", "pair", "connect", "windows", "linux", "CLI"], ["執行環境", "電腦", "機器", "配對", "連接", "Windows", "CLI"]],
|
|
43
45
|
["defaults.tips", "agent-defaults", "#g-tips", "settings.dailyTips", "defaults.tips", ["daily tips", "notices"], ["每日提示"]],
|
|
44
46
|
["web.notify-login", "access", "#webNotifyLogin", "settings.webNotifyLogin", "web.notify_login", ["sign in", "login", "notices"], ["登入通知"]],
|
|
47
|
+
["web.login-qr", "access", "#webLoginQr", "settings.webLoginQr", "web.login_qr", ["qr", "qr code", "sign in", "another device", "scan", "device"], ["QR", "QR Code", "登入", "其他裝置", "掃描"]],
|
|
45
48
|
// Fleet · Agent defaults
|
|
46
49
|
["defaults.locale", "agent-defaults", "#g-locale", "settings.language", "defaults.locale", ["language", "bot language", "reply language", "locale"], ["語言", "回覆語言", "bot 語言"]],
|
|
47
50
|
["defaults.backend", "agent-defaults", "#g-be", "settings.defaultBackend", "defaults.backend", ["backend", "cli", "claude", "codex", "kiro"], ["後端", "CLI"]],
|