@songsid/agend 2.4.0-alpha.1 → 2.4.0-alpha.3
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/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/account-isolation.d.ts +6 -0
- package/dist/account-isolation.js +40 -0
- package/dist/account-isolation.js.map +1 -0
- package/dist/accounts-signout.d.ts +15 -2
- package/dist/accounts-signout.js +52 -4
- package/dist/accounts-signout.js.map +1 -1
- package/dist/accounts-view.d.ts +114 -27
- package/dist/accounts-view.js +123 -60
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +9 -7
- package/dist/agent-cli.js +47 -20
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +23 -8
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-list-output.d.ts +23 -0
- package/dist/agent-list-output.js +53 -0
- package/dist/agent-list-output.js.map +1 -0
- package/dist/agent-runtime-change.js +4 -4
- package/dist/agent-runtime-change.js.map +1 -1
- package/dist/agent-whats-new.js +4 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/antigravity-first-run.d.ts +4 -0
- package/dist/antigravity-first-run.js +57 -0
- package/dist/antigravity-first-run.js.map +1 -0
- package/dist/antigravity-identity.d.ts +6 -0
- package/dist/antigravity-identity.js +27 -0
- package/dist/antigravity-identity.js.map +1 -0
- package/dist/antigravity-store.d.ts +22 -0
- package/dist/antigravity-store.js +79 -0
- package/dist/antigravity-store.js.map +1 -0
- package/dist/auth-api.js +7 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/agy-onboarding.d.ts +14 -0
- package/dist/backend/agy-onboarding.js +114 -0
- package/dist/backend/agy-onboarding.js.map +1 -0
- package/dist/backend/antigravity.d.ts +15 -0
- package/dist/backend/antigravity.js +44 -4
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.js +4 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +22 -3
- package/dist/backend/credential-profile.js +61 -9
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +7 -1
- package/dist/backend-availability.js +39 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +16 -2
- package/dist/browser-backend-signins.js +17 -9
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +10 -10
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/claude-auth-status.d.ts +1 -0
- package/dist/claude-auth-status.js +25 -0
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/cli-capability.d.ts +104 -19
- package/dist/cli-capability.js +3 -1
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +14 -0
- package/dist/cli-caps-module.js +8 -1
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +114 -18
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +116 -12
- package/dist/cli-registry.js +16 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +53 -11
- package/dist/cli-spec-antigravity.js +44 -13
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +14 -1
- package/dist/cli-spec-claude-code.js +5 -4
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +8 -0
- package/dist/cli-spec-codex.js +4 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +4 -0
- package/dist/cli-spec-grok.js +2 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -0
- package/dist/cli-spec-kiro-cli.js +3 -2
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +4 -0
- package/dist/cli-spec-muse.js +2 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +1 -0
- package/dist/cli-spec-opencode.js +1 -0
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/config-validator.js +47 -7
- package/dist/config-validator.js.map +1 -1
- package/dist/credential-store-proof.d.ts +6 -0
- package/dist/credential-store-proof.js +30 -0
- package/dist/credential-store-proof.js.map +1 -0
- package/dist/daemon.d.ts +3 -0
- package/dist/daemon.js +6 -2
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +5 -4
- package/dist/decision-list.js +22 -8
- package/dist/decision-list.js.map +1 -1
- package/dist/fleet-manager.d.ts +53 -5
- package/dist/fleet-manager.js +301 -115
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +6 -6
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +32 -4
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +42 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +14 -6
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +361 -0
- package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +184 -36
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +5 -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/audit/index.js +12 -5
- package/dist/hub/audit/index.js.map +1 -1
- package/dist/hub/buttons.d.ts +3 -0
- package/dist/hub/buttons.js +11 -11
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +18 -5
- package/dist/hub/catalog.js +119 -36
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +6 -0
- package/dist/hub/client.js +6 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -0
- package/dist/hub/compose/member.js +26 -2
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +6 -0
- package/dist/hub/compose/server.js +11 -4
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +51 -0
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +14 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/enrolment-code.d.ts +126 -0
- package/dist/hub/enrolment-code.js +266 -0
- package/dist/hub/enrolment-code.js.map +1 -0
- package/dist/hub/grant-access.d.ts +11 -0
- package/dist/hub/grant-access.js +113 -0
- package/dist/hub/grant-access.js.map +1 -0
- package/dist/hub/grant-search.d.ts +9 -0
- package/dist/hub/grant-search.js +92 -0
- package/dist/hub/grant-search.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.d.ts +2 -0
- package/dist/hub/group-policy/admin-impact.js +14 -4
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.js +7 -7
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +20 -3
- package/dist/hub/group-policy/authorization.js +132 -27
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.js +23 -7
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +44 -6
- package/dist/hub/group-policy/resources.js +75 -30
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +24 -3
- package/dist/hub/group-policy/store.js +136 -77
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/welcome.js.map +1 -1
- package/dist/hub/http/compose.js +68 -16
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +18 -0
- package/dist/hub/http/core.js +108 -7
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +8 -0
- package/dist/hub/http/schema.js +11 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/init/text.js +2 -2
- package/dist/hub/init/text.js.map +1 -1
- package/dist/hub/init/web.d.ts +7 -0
- package/dist/hub/init/web.js +6 -1
- package/dist/hub/init/web.js.map +1 -1
- package/dist/hub/join/local.d.ts +32 -0
- package/dist/hub/join/local.js +98 -10
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/receipt.d.ts +1 -0
- package/dist/hub/join/receipt.js +1 -1
- package/dist/hub/join/receipt.js.map +1 -1
- package/dist/hub/join/service.d.ts +94 -6
- package/dist/hub/join/service.js +214 -44
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/join/store.d.ts +2 -1
- package/dist/hub/join/store.js +7 -7
- package/dist/hub/join/store.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +3 -2
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +4 -0
- package/dist/hub/member/exposures.js +12 -2
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-api.js +4 -1
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/pairing-notices.js +8 -6
- package/dist/hub/member/pairing-notices.js.map +1 -1
- package/dist/hub/pairing-notices.d.ts +5 -2
- package/dist/hub/pairing-notices.js +38 -13
- package/dist/hub/pairing-notices.js.map +1 -1
- package/dist/hub/pairing.d.ts +10 -2
- package/dist/hub/pairing.js +37 -16
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/policy.d.ts +1 -1
- package/dist/hub/policy.js +19 -6
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +60 -0
- package/dist/hub/protocol.js +9 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/quota.d.ts +2 -1
- package/dist/hub/quota.js +2 -2
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/roles/authority.d.ts +45 -0
- package/dist/hub/roles/authority.js +199 -0
- package/dist/hub/roles/authority.js.map +1 -0
- package/dist/hub/roles/change.d.ts +18 -0
- package/dist/hub/roles/change.js +76 -0
- package/dist/hub/roles/change.js.map +1 -0
- package/dist/hub/roles/convert.d.ts +11 -0
- package/dist/hub/roles/convert.js +27 -0
- package/dist/hub/roles/convert.js.map +1 -0
- package/dist/hub/roles/cutover-inventory.d.ts +14 -0
- package/dist/hub/roles/cutover-inventory.js +42 -0
- package/dist/hub/roles/cutover-inventory.js.map +1 -0
- package/dist/hub/roles/cutover.d.ts +32 -0
- package/dist/hub/roles/cutover.js +184 -0
- package/dist/hub/roles/cutover.js.map +1 -0
- package/dist/hub/roles/delegation.d.ts +24 -0
- package/dist/hub/roles/delegation.js +111 -0
- package/dist/hub/roles/delegation.js.map +1 -0
- package/dist/hub/roles/evaluate.d.ts +50 -0
- package/dist/hub/roles/evaluate.js +96 -0
- package/dist/hub/roles/evaluate.js.map +1 -0
- package/dist/hub/roles/expiry.d.ts +46 -0
- package/dist/hub/roles/expiry.js +180 -0
- package/dist/hub/roles/expiry.js.map +1 -0
- package/dist/hub/roles/mode-effects.d.ts +5 -0
- package/dist/hub/roles/mode-effects.js +21 -0
- package/dist/hub/roles/mode-effects.js.map +1 -0
- package/dist/hub/roles/model.d.ts +171 -0
- package/dist/hub/roles/model.js +79 -0
- package/dist/hub/roles/model.js.map +1 -0
- package/dist/hub/roles/read.d.ts +29 -0
- package/dist/hub/roles/read.js +47 -0
- package/dist/hub/roles/read.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +80 -0
- package/dist/hub/roles/writer.js +427 -0
- package/dist/hub/roles/writer.js.map +1 -0
- package/dist/hub/rooms.d.ts +8 -0
- package/dist/hub/rooms.js +47 -27
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.d.ts +3 -0
- package/dist/hub/server.js +18 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +5 -1
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-directory-decision.d.ts +2 -2
- package/dist/hub/settings-directory-decision.js +7 -5
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-directory-proof.js +3 -1
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.js +3 -3
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/sharing.d.ts +10 -0
- package/dist/hub/sharing.js +74 -0
- package/dist/hub/sharing.js.map +1 -0
- package/dist/hub/store.js +6 -2
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +29 -5
- package/dist/hub/web-origin.d.ts +80 -0
- package/dist/hub/web-origin.js +163 -0
- package/dist/hub/web-origin.js.map +1 -0
- package/dist/hub-pairing-summary.js +1 -1
- package/dist/hub-pairing-summary.js.map +1 -1
- package/dist/human-delivery-receipts.js +2 -2
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +4 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +36 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +8 -2
- package/dist/instructions.js +28 -6
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +12 -8
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +62 -6
- package/dist/log-service.js +135 -28
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps-agy-grok.d.ts +74 -0
- package/dist/log-steps-agy-grok.js +440 -0
- package/dist/log-steps-agy-grok.js.map +1 -0
- package/dist/log-steps.d.ts +62 -3
- package/dist/log-steps.js +188 -22
- package/dist/log-steps.js.map +1 -1
- package/dist/log-transcript-paths.d.ts +29 -0
- package/dist/log-transcript-paths.js +109 -0
- package/dist/log-transcript-paths.js.map +1 -0
- package/dist/login-controller.d.ts +17 -3
- package/dist/login-controller.js +57 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.d.ts +24 -2
- package/dist/login-flows.js +53 -22
- package/dist/login-flows.js.map +1 -1
- package/dist/login-url.js +3 -0
- package/dist/login-url.js.map +1 -1
- package/dist/login-window-lock.d.ts +20 -8
- package/dist/login-window-lock.js +35 -16
- package/dist/login-window-lock.js.map +1 -1
- package/dist/machine-accounts.d.ts +42 -12
- package/dist/machine-accounts.js +144 -46
- package/dist/machine-accounts.js.map +1 -1
- package/dist/machine-signins.d.ts +35 -13
- package/dist/machine-signins.js +57 -27
- package/dist/machine-signins.js.map +1 -1
- package/dist/native-instance-input.js +4 -4
- package/dist/native-instance-input.js.map +1 -1
- package/dist/native-instance-registry.d.ts +3 -3
- package/dist/native-instance-registry.js +11 -10
- package/dist/native-instance-registry.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -0
- package/dist/outbound-handlers.js +68 -20
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +18 -0
- package/dist/outbound-schemas.js +22 -4
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/profile-signins.d.ts +7 -0
- package/dist/profile-signins.js +2 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/runtime-build-info.js +6 -2
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli.js +33 -11
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client.d.ts +18 -2
- package/dist/runtime-client.js +84 -21
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +36 -4
- package/dist/runtime-credential-profiles.js +82 -16
- package/dist/runtime-credential-profiles.js.map +1 -1
- package/dist/runtime-profile-ownership.d.ts +2 -2
- package/dist/runtime-profile-ownership.js +3 -3
- package/dist/runtime-profile-ownership.js.map +1 -1
- package/dist/runtime-protocol.d.ts +5 -3
- package/dist/runtime-protocol.js +4 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +72 -5
- package/dist/runtime-remote-accounts.js +293 -52
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +2 -2
- package/dist/runtime-remote-setup.js +2 -2
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-signin-transport.d.ts +22 -4
- package/dist/runtime-signin-transport.js +50 -12
- package/dist/runtime-signin-transport.js.map +1 -1
- package/dist/runtime-signin.d.ts +42 -0
- package/dist/runtime-signin.js +105 -9
- package/dist/runtime-signin.js.map +1 -1
- package/dist/runtime-windows-bridge.js +6 -1
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +1 -0
- package/dist/scheduler/task-board.js +10 -1
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +34 -0
- package/dist/settings-api.js +184 -6
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +38 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +14 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/signin-keepalive.d.ts +31 -2
- package/dist/signin-keepalive.js +123 -12
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +2 -2
- package/dist/structured-signin-transport.js +27 -6
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +16 -2
- package/dist/structured-signin.js +59 -4
- package/dist/structured-signin.js.map +1 -1
- package/dist/task-board-tool.d.ts +0 -13
- package/dist/task-board-tool.js +42 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/tool-progress.d.ts +7 -0
- package/dist/tool-progress.js +21 -9
- package/dist/tool-progress.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +151 -0
- package/dist/tool-receipt-output.js +50 -0
- package/dist/tool-receipt-output.js.map +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/ui/accounts-keepalive.js +15 -6
- package/dist/ui/accounts-manage.js +25 -5
- package/dist/ui/accounts-view.js +40 -26
- package/dist/ui/agent-details-settings.js +2 -2
- package/dist/ui/agent-page-strings.js +2 -2
- package/dist/ui/agent-proposals.js +22 -2
- package/dist/ui/agent-runtime-settings.js +3 -3
- package/dist/ui/backend-signin.js +49 -16
- package/dist/ui/chat-activity-groups.js +225 -0
- package/dist/ui/chat-activity.js +355 -0
- package/dist/ui/chat-popout-header.js +35 -0
- package/dist/ui/chat-popout-transport.js +80 -0
- package/dist/ui/chat-popout.js +63 -0
- package/dist/ui/chat-quote.js +3 -1
- package/dist/ui/chat-store.js +45 -4
- package/dist/ui/chat-workspace-gestures.js +177 -0
- package/dist/ui/chat-workspace-navigation.js +34 -10
- package/dist/ui/chat-workspace.js +96 -32
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +32 -19
- package/dist/ui/host-install.js +2 -2
- package/dist/ui/hub-agent-copy.js +7 -7
- package/dist/ui/hub-chat-store.js +8 -4
- package/dist/ui/hub-chat-strings.js +3 -3
- package/dist/ui/hub-client.js +113 -18
- package/dist/ui/hub-company-join-strings.js +12 -10
- package/dist/ui/hub-company-join.js +52 -39
- package/dist/ui/hub-confirm-place.js +44 -0
- package/dist/ui/hub-directory-editor-strings.js +3 -3
- package/dist/ui/hub-directory-notice-strings.js +1 -1
- package/dist/ui/hub-enrolment-code-strings.js +44 -0
- package/dist/ui/hub-enrolment-code.js +159 -0
- package/dist/ui/hub-grant-picker.js +100 -0
- package/dist/ui/hub-group-search.js +82 -0
- package/dist/ui/hub-group-strings.js +8 -8
- package/dist/ui/hub-join-approval.js +31 -0
- package/dist/ui/hub-join-code-input.js +66 -0
- package/dist/ui/hub-join-one-strings.js +2 -2
- package/dist/ui/hub-join-queue.js +62 -0
- package/dist/ui/hub-join-steps.js +234 -0
- package/dist/ui/hub-joincode-flow-strings.js +22 -0
- package/dist/ui/hub-owner-strings.js +9 -9
- package/dist/ui/hub-pairing-progress-strings.js +1 -1
- package/dist/ui/hub-quick-pairing.js +8 -4
- package/dist/ui/hub-quick-strings.js +11 -11
- package/dist/ui/hub-share-refused.js +17 -0
- package/dist/ui/hub-strings.js +61 -61
- package/dist/ui/hub-this-hub.js +2 -2
- package/dist/ui/hub-welcome.js +26 -5
- package/dist/ui/image-annotate.js +283 -0
- package/dist/ui/image-lightbox.js +26 -6
- package/dist/ui/log-row.js +327 -0
- package/dist/ui/machine-signin.js +47 -14
- package/dist/ui/panel-chat.js +151 -12
- package/dist/ui/panel-details.js +14 -6
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-hub.js +94 -21
- package/dist/ui/panel-log.js +9 -154
- package/dist/ui/panel-settings.js +50 -13
- package/dist/ui/search-dialog.js +1 -0
- package/dist/ui/settings-access-overview.js +1 -1
- package/dist/ui/settings-hub-browser-certificate.js +3 -3
- package/dist/ui/settings-hub-company-join.js +42 -30
- package/dist/ui/settings-hub-connection.js +8 -5
- package/dist/ui/settings-hub-membership.js +3 -3
- package/dist/ui/settings-hub-section.js +3 -1
- package/dist/ui/settings-hub-setup-strings.js +6 -6
- package/dist/ui/settings-hub-setup.js +44 -6
- package/dist/ui/settings-hub-web-address.js +233 -0
- package/dist/ui/settings-hub.js +41 -10
- package/dist/ui/settings-layout.js +6 -4
- package/dist/ui/settings-public-session-strings.js +37 -0
- package/dist/ui/settings-registry.js +4 -0
- package/dist/ui/settings-strings.js +2 -2
- package/dist/ui/shared/accounts-keepalive.css +8 -0
- package/dist/ui/shared/accounts-usage-pool.css +10 -0
- package/dist/ui/shared/accounts.css +9 -0
- package/dist/ui/shared/app-shell.js +16 -10
- package/dist/ui/shared/app.css +233 -35
- package/dist/ui/shared/app.js +8 -1
- package/dist/ui/shared/chat-render.js +11 -2
- package/dist/ui/shared/chat-thread.js +20 -3
- package/dist/ui/shared/chat-work-bar.css +7 -0
- package/dist/ui/shared/chat-workspace-model.js +39 -9
- package/dist/ui/shared/hub-grant-picker.css +4 -0
- package/dist/ui/shared/hub-owner.css +8 -0
- package/dist/ui/shared/hub-sharing.css +4 -0
- package/dist/ui/shared/identity-color.js +9 -3
- package/dist/ui/shared/image-annotate.css +45 -0
- package/dist/ui/shared/instance-nav.js +59 -22
- package/dist/ui/shared/pane-geometry.js +29 -0
- package/dist/ui/shared/signin.js +2 -2
- package/dist/ui/shared/tokens.css +14 -0
- package/dist/ui/shared/ui-menu.js +22 -7
- package/dist/ui/shared/view-strings.js +2 -2
- package/dist/ui/signin.html +1 -1
- package/dist/ui/structured-signin.js +29 -9
- package/dist/ui/usage-pool.js +76 -0
- package/dist/usage/agent-output.d.ts +144 -0
- package/dist/usage/agent-output.js +75 -0
- package/dist/usage/agent-output.js.map +1 -0
- package/dist/usage/provider-alerts.d.ts +6 -0
- package/dist/usage/provider-alerts.js +6 -0
- package/dist/usage/provider-alerts.js.map +1 -1
- package/dist/usage/providers.d.ts +2 -2
- package/dist/usage/providers.js +60 -18
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +12 -0
- package/dist/usage/usage-api.js +39 -0
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +3 -0
- package/dist/web-api.js +61 -16
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +13 -4
- package/dist/web-backend-login.js +7 -4
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-history.d.ts +11 -0
- package/dist/web-chat-history.js +9 -1
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-guest-access.js +2 -2
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-session.d.ts +31 -3
- package/dist/web-session.js +25 -4
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +8 -2
- package/dist/web-settings-patch.js +22 -10
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/windows-cli-providers.js +5 -1
- package/dist/windows-cli-providers.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +33 -1
- package/dist/windows-cli-worker.js +150 -10
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +7 -1
- package/dist/windows-cli.js +19 -2
- package/dist/windows-cli.js.map +1 -1
- package/dist/workflow-templates/default.md +2 -2
- package/package.json +1 -1
package/dist/fleet-manager.js
CHANGED
|
@@ -32,7 +32,7 @@ import { SettingsRouteLifetime } from "./settings-route-lifetime.js";
|
|
|
32
32
|
import { GeneralManagedFileError } from "./runtime-general-protocol.js";
|
|
33
33
|
import { GeneralBindings, generalBindingRevision, parseGeneralSwitchInput, switchGeneralLocation } from "./general-binding.js";
|
|
34
34
|
import { confirmGeneralHostExit } from "./general-host-owner.js";
|
|
35
|
-
import { settingsFingerprint, SettingsExecution, settingsRevision, noteSettingsWrite, settingsFileResource, assertSettingsLease, trySettingsLease, waitSettingsLease, settingsUndo, undoSettingsPaths } from "./settings-transaction.js";
|
|
35
|
+
import { settingsFingerprint, SettingsExecution, SettingsExecutionError, settingsRevision, noteSettingsWrite, settingsFileResource, assertSettingsLease, trySettingsLease, waitSettingsLease, settingsUndo, undoSettingsPaths } from "./settings-transaction.js";
|
|
36
36
|
import { performance } from "node:perf_hooks";
|
|
37
37
|
import { withSpawnHoldReply } from "./spawn-hold-reply.js";
|
|
38
38
|
import { gatewayRequestContext } from "./web-request-context.js";
|
|
@@ -104,7 +104,7 @@ import { getEffectiveInstanceDefaults, loadFleetConfig, loadRawFleetConfig, load
|
|
|
104
104
|
import { EventLog } from "./event-log.js";
|
|
105
105
|
import { binaryProbe } from "./binary-probe.js";
|
|
106
106
|
import { deletePlannedTopic, planInstanceTopicDelete, topicDestination, topicMustStay } from "./instance-topic-delete.js";
|
|
107
|
-
import { AVAILABILITY_STALE_MS, BackendAvailabilityStore, hostAvailabilityProbes, findExecutableIn, resolveBackendBinary } from "./backend-availability.js";
|
|
107
|
+
import { AVAILABILITY_STALE_MS, BackendAvailabilityStore, versionAtLeast, hostAvailabilityProbes, findExecutableIn, resolveBackendBinary } from "./backend-availability.js";
|
|
108
108
|
import { classifySqliteOpenError } from "./sqlite-open-errors.js";
|
|
109
109
|
import { OutboxOpenError } from "./outbox-open-error.js";
|
|
110
110
|
import { AdapterWorld } from "./adapter-world.js";
|
|
@@ -232,7 +232,7 @@ import { shapeWebModelCatalog } from "./web-model-groups.js";
|
|
|
232
232
|
import { isWindowsInstance, isNativePaneInstance, isNativeExecInstance, WINDOWS_CONFIG_REFUSED, nativeCredentialProfile } from "./native-instance-registry.js";
|
|
233
233
|
import { createNativeWindowsInstance, updateNativeWindowsInstance } from "./native-instance-api.js";
|
|
234
234
|
import { NativeInstanceConfigEdit, parseNativeInstanceCreate } from "./native-instance-input.js";
|
|
235
|
-
import { LogService } from "./log-service.js";
|
|
235
|
+
import { LogService, thinkingOn } from "./log-service.js";
|
|
236
236
|
import { viewHistory } from "./view-history.js";
|
|
237
237
|
import { WebChatHistory, WEB_CHAT_TEXT_MAX, isWebMessageId, newWebMessageId, webChatFrom } from "./web-chat-history.js";
|
|
238
238
|
import { WEB_ECHO_COPIES_MAX, WEB_MIRROR_TIMEOUT_MS, webReactionEmoji, webReactionProblem } from "./web-reactions.js";
|
|
@@ -266,8 +266,11 @@ import { envFileKeys } from "./token-env-name.js";
|
|
|
266
266
|
import { discordGeneralChannelId } from "./discord-general.js";
|
|
267
267
|
import { parseEnvText } from "./env-file.js";
|
|
268
268
|
import { isDisallowedIntentsError, isRejectedTokenError } from "./discord-permissions.js";
|
|
269
|
-
import { filterUsageProviders, formatDiscordUsageActivity, getUsageSnapshot, handleUsageRequest, isUsagePath, setCapacityLookup, usageProviderIdForBackend } from "./usage/usage-api.js";
|
|
270
|
-
import { LOGIN_FLOWS, checkAuthStatus, checkAuthIdentity, authIdentitySupported, LOGIN_BACKEND_ALIASES } from "./login-flows.js";
|
|
269
|
+
import { filterUsageProviders, formatDiscordUsageActivity, getUsageSnapshot, handleUsageRequest, isUsagePath, refreshUsageAfterSignIn, setCapacityLookup, usageProviderIdForBackend } from "./usage/usage-api.js";
|
|
270
|
+
import { LOGIN_FLOWS, checkAuthStatus, checkAuthSignedOut, checkAuthIdentity, authIdentitySupported, LOGIN_BACKEND_ALIASES } from "./login-flows.js";
|
|
271
|
+
import { structuredSignInSupported } from "./structured-signin.js";
|
|
272
|
+
import { proveFolderIsolation } from "./account-isolation.js";
|
|
273
|
+
import { STRUCTURED_PROFILE_BACKENDS } from "./structured-signin-transport.js";
|
|
271
274
|
import { LoginSession } from "./login-manager.js";
|
|
272
275
|
import { runOnLoginShell } from "./login-shell.js";
|
|
273
276
|
import { tightenInstanceDirs } from "./private-dir.js";
|
|
@@ -292,9 +295,9 @@ import { runBeforeDeadline } from "./deadline.js";
|
|
|
292
295
|
import { LoginWindowLock } from "./login-window-lock.js";
|
|
293
296
|
import { BrowserBackendSignIns } from "./browser-backend-signins.js";
|
|
294
297
|
import { createStructuredSignInTransport } from "./structured-signin-transport.js";
|
|
295
|
-
import { ONBOARDING_BACKENDS, readPendingBackendSignIns } from "./backend-signin-pending.js";
|
|
296
|
-
import {
|
|
297
|
-
import { handleSettingsRequest } from "./settings-api.js";
|
|
298
|
+
import { ONBOARDING_BACKENDS, ONBOARDING_BROWSER_BACKENDS, readPendingBackendSignIns } from "./backend-signin-pending.js";
|
|
299
|
+
import { hostFacts, runtimeAccountsCapability, runtimeFacts } from "./cli-registry.js";
|
|
300
|
+
import { handleSettingsRequest, switchClassicRoomProfile } from "./settings-api.js";
|
|
298
301
|
import { setLocale, detectLocale, getLocale, t } from "./locale.js";
|
|
299
302
|
import { remoteCardAction, remoteCardChoiceLabel, remoteCardOutcomeText, remoteCardPrompt, REMOTE_CARD_TEXT_MAX } from "./remote-card-prompt.js";
|
|
300
303
|
import { recentChatContext } from "./log-tail.js";
|
|
@@ -340,7 +343,7 @@ import { mayUseTool, resolveToolSet, scheduleOpRefusal, toolForIpcType, toolRefu
|
|
|
340
343
|
import { authorizeSession, decideWebGate, loadOrCreateWebToken, readSessionCookies, readWebToken, sessionCookieUpgrade } from "./web-auth.js";
|
|
341
344
|
import { bypassesWebGate, handleAuthRequest, serveGuestRefusedPage, serveSigninPage } from "./auth-api.js";
|
|
342
345
|
import { isWebPageNavigation } from "./web-shell-routes.js";
|
|
343
|
-
import { guestSessionPolicy, localSessionPolicy, sessionVia, tokenEpoch, WebSessionStore } from "./web-session.js";
|
|
346
|
+
import { guestSessionPolicy, localSessionPolicy, publicLinkSessionPolicy, sessionVia, tokenEpoch, WebSessionStore } from "./web-session.js";
|
|
344
347
|
import { WebNotices, WEB_NOTICES_FILE } from "./web-notices.js";
|
|
345
348
|
import { enrolledRuntimeNotice } from "./runtime-enroll-notice.js";
|
|
346
349
|
import { DeviceLoginRequests } from "./web-device-login.js";
|
|
@@ -352,6 +355,7 @@ import { AuthorityStateStore } from "./authority/authority-state.js";
|
|
|
352
355
|
import { SessionAuthorizations } from "./authority/session-authorizations.js";
|
|
353
356
|
import { SessionAuthorizationRequests } from "./web-session-authorization.js";
|
|
354
357
|
import { GuestLoginCodes, WebLoginCodes, LOGIN_CODE_TTL_MS } from "./web-login.js";
|
|
358
|
+
import { listOptions, scheduleListAnswer, taskListAnswer, taskTitle } from "./agent-list-output.js";
|
|
355
359
|
import { decisionListAnswer } from "./decision-list.js";
|
|
356
360
|
import { CodeRequestLimiter, ReturningDevices } from "./web-returning-device.js";
|
|
357
361
|
import { hubInitializationSession } from "./authority/hub-initialization.js";
|
|
@@ -370,10 +374,10 @@ import { PROVIDER_SECRET_SPECS, PUBLIC_TUNNEL_SECRET_SPEC, providerSecretSpec, p
|
|
|
370
374
|
const SELF_RESTART_DEADLINE_MS = 300_000;
|
|
371
375
|
import { APPLY_FLEET_TARGET, ApplyJobStore, viewOf, } from "./apply-job.js";
|
|
372
376
|
import { kiroHome } from "./backend/kiro-kas-store.js";
|
|
373
|
-
import { CHAT_PROFILE_LOGIN_BACKENDS, claudeStoreEnded, credentialHomeSpec, credentialProfileHome,
|
|
377
|
+
import { CHAT_PROFILE_LOGIN_BACKENDS, claudeStoreEnded, credentialHomeSpec, credentialProfileHome, credentialProfileLaunch, credentialProfileLogin, credentialProfileLoginCommand, credentialProfileStoreHome, credentialSwitchCarriesConversation, credentialSwitchStartsFresh, instanceCredentialProfile, listConfiguredProfiles, resolveCredentialProfile } from "./backend/credential-profile.js";
|
|
374
378
|
import { carryClaudeConversation } from "./backend/claude-carry.js";
|
|
375
379
|
import { classicProfile, mergeBackendOptions, profileKey, profileName, profileOf, readClassicBindings, readClassicBindingsStrict } from "./classic-bindings.js";
|
|
376
|
-
import { ACCOUNT_CLIS, PROFILE_CLIS, buildAccountsView, profilesOnDisk
|
|
380
|
+
import { ACCOUNT_CLIS, PROFILE_CLIS, accountUsage, buildAccountsView, profilesOnDisk } from "./accounts-view.js";
|
|
377
381
|
import { accountFolderExists, addAccountProfile, removeAccountProfile } from "./accounts-profiles.js";
|
|
378
382
|
import { signOutAccount } from "./accounts-signout.js";
|
|
379
383
|
import { MachineAccounts, machineAgents } from "./machine-accounts.js";
|
|
@@ -406,6 +410,7 @@ import { estimateCapacity } from "./usage/capacity.js";
|
|
|
406
410
|
import { covered, hourSources } from "./usage-rollup.js";
|
|
407
411
|
import { KEEP_DAYS } from "./cache-ledger.js";
|
|
408
412
|
import { ratesFor } from "./cache-prices.js";
|
|
413
|
+
import { ownTranscript } from "./log-transcript-paths.js";
|
|
409
414
|
// Closed migration cohort: these 11 names existed immediately before the first
|
|
410
415
|
// managed-skill publisher (a1ac499f; parent e267e684). Never grow this set when
|
|
411
416
|
// adding a bundled skill: its new name is not proof of old AgEnD ownership.
|
|
@@ -1064,13 +1069,17 @@ export class FleetManager {
|
|
|
1064
1069
|
throw new Error("This runtime CLI cannot enforce read-only execution");
|
|
1065
1070
|
if (credentialProfile !== undefined) {
|
|
1066
1071
|
// Fail closed at selection time, not at the first message: an old Runtime would ignore the name and run another account.
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1072
|
+
const product = cli === "claude-code" ? "Claude" : (runtimeFacts(cli, "provider")?.name ?? cli);
|
|
1073
|
+
if (!machine.runtimeInfo?.capabilities.includes(RUNTIME_CREDENTIAL_CAPABILITY) || (cli !== "claude-code" && !machine.runtimeInfo.capabilities.includes(runtimeAccountsCapability(cli))))
|
|
1074
|
+
throw new Error(`This computer's Runtime is too old to choose a ${product} account. Update the Runtime on that computer, then try again.`);
|
|
1075
|
+
// Claude Code's profiles are the report's `profiles`; another CLI's (Antigravity) are its `byCli`.
|
|
1076
|
+
const reported = cli === "claude-code" ? machine.inventory?.credentialProfiles?.profiles : machine.inventory?.credentialProfiles?.byCli?.[cli];
|
|
1077
|
+
const row = reported?.find(profile => profile.name === credentialProfile);
|
|
1078
|
+
const hint = cli === "claude-code" ? `On that computer run: agend-runtime login claude-code ${credentialProfile}, then choose Detect again in that computer's CLI diagnostics (Settings → Runtime).` : "Add it in Settings → Agent → Accounts, under that computer's name.";
|
|
1070
1079
|
if (!row)
|
|
1071
|
-
throw new Error(`This computer has not reported a credential profile named "${credentialProfile}".
|
|
1080
|
+
throw new Error(`This computer has not reported a credential profile named "${credentialProfile}". ${hint}`);
|
|
1072
1081
|
if (row.loggedIn === false)
|
|
1073
|
-
throw new Error(`Credential profile "${credentialProfile}" is not signed in on that computer. Sign in there: agend-runtime login claude-code ${credentialProfile}`);
|
|
1082
|
+
throw new Error(`Credential profile "${credentialProfile}" is not signed in on that computer. ${cli === "claude-code" ? `Sign in there: agend-runtime login claude-code ${credentialProfile}` : "Sign it in from Settings → Agent → Accounts."}`);
|
|
1074
1083
|
}
|
|
1075
1084
|
},
|
|
1076
1085
|
emit: (event, data) => {
|
|
@@ -1558,7 +1567,8 @@ export class FleetManager {
|
|
|
1558
1567
|
if (this.shuttingDown)
|
|
1559
1568
|
throw Error("Fleet is stopping");
|
|
1560
1569
|
const controller = createHubWebInitializer({ home: this.dataDir, readConfig: () => this.getRawFleetConfig(),
|
|
1561
|
-
writeFleet: patches => this.saveFleetConfig(patches), committed: () => this.applyHubSwitches()
|
|
1570
|
+
writeFleet: patches => this.saveFleetConfig(patches), committed: () => this.applyHubSwitches(),
|
|
1571
|
+
serverHealth: hub => this.shuttingDown ? "stopped" : this.hubRuntime?.serverHealth(hub) ?? "unavailable" });
|
|
1562
1572
|
this.hubSetupController = controller;
|
|
1563
1573
|
return controller;
|
|
1564
1574
|
})();
|
|
@@ -5305,7 +5315,9 @@ export class FleetManager {
|
|
|
5305
5315
|
claimedCards: () => this.livenessCards(),
|
|
5306
5316
|
facts: (name) => this.livenessFacts(name),
|
|
5307
5317
|
backgroundBusy: (name) => this.livenessBackgroundBusy(name),
|
|
5308
|
-
|
|
5318
|
+
// #3720: a ClassicBot room's agent is an agent too (「ClassicBot 派工作也是 agent 派的」): a card it handed out is told
|
|
5319
|
+
// to it like any instance's. A room that is gone falls to Needs you (not an agent here); one not running is away.
|
|
5320
|
+
isInstance: (name) => this.fleetConfig?.instances?.[name] != null || this.isClassicInstance(name),
|
|
5309
5321
|
// Not running now: stopped, crashed, paused, or no daemon at all.
|
|
5310
5322
|
dispatcherAway: (name) => this.instanceProcessStatus.has(name) || this.lifecycle.isPaused(name) || !this.daemons.has(name),
|
|
5311
5323
|
boardOff: (name) => taskBoardOffIn(this.fleetConfig, name),
|
|
@@ -6913,17 +6925,30 @@ export class FleetManager {
|
|
|
6913
6925
|
get log() {
|
|
6914
6926
|
return this.logService ??= new LogService({
|
|
6915
6927
|
enabled: () => this.fleetConfig?.web?.log_tab === true,
|
|
6928
|
+
cwd: (name) => { const dir = this.fleetConfig?.instances?.[name]?.working_directory; return typeof dir === "string" && dir ? dir : undefined; },
|
|
6929
|
+
thinking: () => thinkingOn(this.fleetConfig?.web), // AGEND-181/197: off unless turned on
|
|
6930
|
+
toolProgress: (name) => this.chatToolProgress(name),
|
|
6916
6931
|
known: (name) => Object.prototype.hasOwnProperty.call(this.fleetConfig?.instances ?? {}, name) || this.classicRoomFor(name) !== null,
|
|
6917
6932
|
source: (name) => this.logSource(name),
|
|
6918
6933
|
events: (name, limit) => (this.eventLog?.query({ instance: name, limit }) ?? []),
|
|
6919
6934
|
emit: (event, data) => this.emitSseEvent(event, data),
|
|
6920
6935
|
});
|
|
6921
6936
|
}
|
|
6937
|
+
/**
|
|
6938
|
+
* AGEND-197: an instance's effective `tool_progress` — what its chat's activity block is gated by: its own setting, else
|
|
6939
|
+
* the fleet default, else off (a ClassicBot room: its channel's, as the daemon reads it). Junk values are off.
|
|
6940
|
+
*/
|
|
6941
|
+
chatToolProgress(name) {
|
|
6942
|
+
const defaults = this.fleetConfig?.defaults?.tool_progress;
|
|
6943
|
+
const own = Object.prototype.hasOwnProperty.call(this.fleetConfig?.instances ?? {}, name) ? this.fleetConfig?.instances?.[name]?.tool_progress : undefined;
|
|
6944
|
+
const level = own ?? (this.classicRoomFor(name) ? this.classicChannels?.getToolProgressByInstance(name, defaults) : undefined) ?? defaults;
|
|
6945
|
+
return level === "standard" || level === "verbose" ? level : "off";
|
|
6946
|
+
}
|
|
6922
6947
|
/** Board 003648ac: a web /compact followed to its end, from the transcript the Log reads (none: nothing to follow). */
|
|
6923
6948
|
compactWatchService = null;
|
|
6924
6949
|
get compactWatch() {
|
|
6925
6950
|
return this.compactWatchService ??= new CompactWatch({
|
|
6926
|
-
source: (name) => { const src = this.logSource(name); return { path: src.path, format: src.format }; },
|
|
6951
|
+
source: (name) => { const src = this.logSource(name); return { path: src.path, format: src.format === "claude" || src.format === "codex" ? src.format : null }; },
|
|
6927
6952
|
// The launch that runs it now (the same value the daemon sends with raw_paste_written).
|
|
6928
6953
|
owner: (name) => {
|
|
6929
6954
|
const daemon = this.lifecycle.daemons.get(name);
|
|
@@ -6983,6 +7008,11 @@ export class FleetManager {
|
|
|
6983
7008
|
}
|
|
6984
7009
|
if (backend === "codex")
|
|
6985
7010
|
return { backend, path: live, format: "codex", ...(live ? {} : { reason: "not_running" }) };
|
|
7011
|
+
// AGEND-181 PR2: agy and grok keep their records per working directory (log-transcript-paths.ts); a stopped instance's last
|
|
7012
|
+
// work is still there. Classic rooms have no working directory of their own: nothing to read.
|
|
7013
|
+
const own = ownTranscript(backend, config ? (config.working_directory || this.getInstanceDir(name)) : null);
|
|
7014
|
+
if (own)
|
|
7015
|
+
return { backend, ...own, ...(own.path ? {} : { reason: "no_transcript" }) };
|
|
6986
7016
|
if (backend === "kiro-cli") {
|
|
6987
7017
|
// #1218 PR4: events only until the launch's root and the current conversation are both proven (kiro-log-gate.ts);
|
|
6988
7018
|
// the reason names which proof is missing. With today's proofs the gate never opens, and nothing is read for kiro:
|
|
@@ -8424,29 +8454,63 @@ export class FleetManager {
|
|
|
8424
8454
|
};
|
|
8425
8455
|
}
|
|
8426
8456
|
/** Compensation retains this transaction's exact instance owner across its own transitions. */
|
|
8457
|
+
/** A Settings compensation for a ClassicBot room (#1423): throws stale when its receipt no longer owns the room. */
|
|
8427
8458
|
captureClassicSettingsRestoration(instanceName, changedFields, execution) {
|
|
8459
|
+
const op = this.beginClassicSettingsRestart(instanceName, changedFields, execution);
|
|
8460
|
+
return async () => { if (await op.restore() === "superseded")
|
|
8461
|
+
throw new SettingsExecutionError("settings_execution_stale"); };
|
|
8462
|
+
}
|
|
8463
|
+
/** Apply a Settings edit to a ClassicBot channel without waiting for the poller. */
|
|
8464
|
+
async restartClassicInstanceFromSettings(instanceName, changedFields = [], execution, opts) {
|
|
8465
|
+
return this.lifecycle.runTransition(instanceName, transition => this.restartClassicSettingsOwned(instanceName, changedFields, execution, transition, opts));
|
|
8466
|
+
}
|
|
8467
|
+
/** #3715: update_instance_config's room account switch — an owned restart with no request execution of its own. */
|
|
8468
|
+
beginClassicProfileSwitch(instanceName, changedFields) {
|
|
8469
|
+
return this.beginClassicSettingsRestart(instanceName, changedFields);
|
|
8470
|
+
}
|
|
8471
|
+
/**
|
|
8472
|
+
* One owned ClassicBot room restart and its compensation (#1423; #3715, Prism on #3719; M-2966). Both are bound to one
|
|
8473
|
+
* receipt — the room's epoch and daemon as this operation last left them — so a Stop or another start queued meanwhile
|
|
8474
|
+
* supersedes both: the forward work never launches after it, and the compensation never stops or replaces a newer
|
|
8475
|
+
* runtime. A request's own execution (a confirmed continuation) is used for the forward work when there is one; a plain
|
|
8476
|
+
* Save gets an owned one here, so its receipt follows its own stop and start instead of going stale at the first stop.
|
|
8477
|
+
* `restore` brings a room that was running before back up — also when the failed start took its daemon away — and says
|
|
8478
|
+
* what it did.
|
|
8479
|
+
*/
|
|
8480
|
+
beginClassicSettingsRestart(instanceName, changedFields, execution) {
|
|
8428
8481
|
const generation = this.settingsGeneration;
|
|
8429
8482
|
const receipt = { instanceName, epoch: this.lifecycle.epochOf(instanceName), daemon: this.daemons.get(instanceName) };
|
|
8483
|
+
const wasRunning = receipt.daemon !== undefined;
|
|
8484
|
+
const owned = () => !this.shuttingDown && this.settingsGeneration === generation
|
|
8485
|
+
&& this.lifecycle.epochOf(instanceName) === receipt.epoch && this.daemons.get(instanceName) === receipt.daemon;
|
|
8430
8486
|
if (execution)
|
|
8431
8487
|
this.classicSettingsOwners.set(execution, receipt);
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8488
|
+
let forward = execution, ownForward;
|
|
8489
|
+
return {
|
|
8490
|
+
restart: () => {
|
|
8491
|
+
if (!forward) {
|
|
8492
|
+
forward = ownForward = new SettingsExecution({ current: owned, snapshot: () => null });
|
|
8493
|
+
this.classicSettingsOwners.set(forward, receipt);
|
|
8494
|
+
}
|
|
8495
|
+
return this.restartClassicInstanceFromSettings(instanceName, changedFields, forward);
|
|
8496
|
+
},
|
|
8497
|
+
restore: async () => {
|
|
8498
|
+
if (!owned())
|
|
8499
|
+
return "superseded";
|
|
8500
|
+
const cleanup = new SettingsExecution({ current: owned, snapshot: () => null });
|
|
8501
|
+
this.classicSettingsOwners.set(cleanup, receipt);
|
|
8502
|
+
try {
|
|
8503
|
+
await this.restartClassicInstanceFromSettings(instanceName, changedFields, cleanup, { startIfStopped: wasRunning });
|
|
8504
|
+
}
|
|
8505
|
+
finally {
|
|
8506
|
+
cleanup.close();
|
|
8507
|
+
}
|
|
8508
|
+
return wasRunning ? "restarted" : "not-running";
|
|
8509
|
+
},
|
|
8510
|
+
close: () => ownForward?.close(),
|
|
8443
8511
|
};
|
|
8444
8512
|
}
|
|
8445
|
-
|
|
8446
|
-
async restartClassicInstanceFromSettings(instanceName, changedFields = [], execution) {
|
|
8447
|
-
return this.lifecycle.runTransition(instanceName, transition => this.restartClassicSettingsOwned(instanceName, changedFields, execution, transition));
|
|
8448
|
-
}
|
|
8449
|
-
async restartClassicSettingsOwned(instanceName, changedFields, execution, transition) {
|
|
8513
|
+
async restartClassicSettingsOwned(instanceName, changedFields, execution, transition, opts) {
|
|
8450
8514
|
const generation = this.settingsGeneration;
|
|
8451
8515
|
const receipt = execution ? this.classicSettingsOwners.get(execution) : undefined;
|
|
8452
8516
|
const check = () => {
|
|
@@ -8458,7 +8522,9 @@ export class FleetManager {
|
|
|
8458
8522
|
check();
|
|
8459
8523
|
if (!this.classicChannels)
|
|
8460
8524
|
throw new Error("Classic channel manager not initialized");
|
|
8461
|
-
|
|
8525
|
+
// #3715: a compensation brings back a room its own failed start took down (startIfStopped, owned by its receipt).
|
|
8526
|
+
const hasDaemon = this.daemons.has(instanceName);
|
|
8527
|
+
const wasRunning = hasDaemon || opts?.startIfStopped === true;
|
|
8462
8528
|
this.classicChannels.reloadFromDisk();
|
|
8463
8529
|
this.reportClassicUnrecoverableIds();
|
|
8464
8530
|
this.reregisterClassicChannels();
|
|
@@ -8476,25 +8542,28 @@ export class FleetManager {
|
|
|
8476
8542
|
}
|
|
8477
8543
|
// M-2909 (Prism on #3691): an account saved from Settings hands the conversation over like a classicBot.yaml edit
|
|
8478
8544
|
// (#1753) — read against what it was launched on, before the stop takes that away.
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
if (profileSwitch.carry) {
|
|
8493
|
-
await this.switchConversation(instanceName, { ...profileSwitch.carry, workingDirectory: launchedIn });
|
|
8545
|
+
// #3715: with no daemon (a compensation after its own failed start) there is nothing to stop or hand over.
|
|
8546
|
+
if (hasDaemon) {
|
|
8547
|
+
const launchedSnapshot = this.daemons.get(instanceName)?.getConfigSnapshot?.();
|
|
8548
|
+
const launchedBackend = launchedSnapshot?.backend ?? this.fleetConfig?.defaults?.backend ?? "claude-code";
|
|
8549
|
+
const profileSwitch = this.classicProfileChange(instanceName, launchedBackend !== this.classicChannels.getBackendByInstance(instanceName, this.fleetConfig?.defaults?.backend));
|
|
8550
|
+
const launchedIn = launchedSnapshot?.working_directory;
|
|
8551
|
+
const stopping = this.stopInstance(instanceName, transition);
|
|
8552
|
+
// stop() invalidates synchronously in our transition. Keep only that exact acquisition.
|
|
8553
|
+
if (receipt && this.lifecycle.epochOf(instanceName) === receipt.epoch + 1 && this.daemons.get(instanceName) === receipt.daemon)
|
|
8554
|
+
receipt.epoch++;
|
|
8555
|
+
await stopping;
|
|
8556
|
+
if (receipt && this.lifecycle.epochOf(instanceName) === receipt.epoch && !this.daemons.has(instanceName))
|
|
8557
|
+
receipt.daemon = undefined;
|
|
8494
8558
|
check();
|
|
8559
|
+
// #1753: the conversation goes along where it can; otherwise a switch that loses it starts fresh.
|
|
8560
|
+
if (profileSwitch.carry) {
|
|
8561
|
+
await this.switchConversation(instanceName, { ...profileSwitch.carry, workingDirectory: launchedIn });
|
|
8562
|
+
check();
|
|
8563
|
+
}
|
|
8564
|
+
else if (profileSwitch.startsFresh)
|
|
8565
|
+
this.writeFreshStartMarker(instanceName);
|
|
8495
8566
|
}
|
|
8496
|
-
else if (profileSwitch.startsFresh)
|
|
8497
|
-
this.writeFreshStartMarker(instanceName);
|
|
8498
8567
|
const stoppedEpoch = this.lifecycle.epochOf(instanceName);
|
|
8499
8568
|
await new Promise(resolve => setTimeout(resolve, 250));
|
|
8500
8569
|
check();
|
|
@@ -9648,6 +9717,8 @@ export class FleetManager {
|
|
|
9648
9717
|
localPolicy: () => localSessionPolicy(this.fleetConfig?.web?.session?.local),
|
|
9649
9718
|
// #1920 §5.4: a guest's, from web.guests.session (never longer than the surface's own).
|
|
9650
9719
|
guestPolicy: () => guestSessionPolicy(this.fleetConfig?.web?.guests?.session),
|
|
9720
|
+
// #3708: web.session.public_link — longer than 30 min / 8 h only with a fixed hostname (a named tunnel).
|
|
9721
|
+
gatewayPolicy: () => publicLinkSessionPolicy(this.fleetConfig?.web?.session?.public_link, publicLinkNamedHostname(this.fleetConfig?.web)),
|
|
9651
9722
|
// A session over the temporary link ends with the link (its TTL, at most 8 h on a quick tunnel).
|
|
9652
9723
|
exposureEnd: id => this.publicWebLink?.endOf(id) ?? null,
|
|
9653
9724
|
});
|
|
@@ -14232,6 +14303,7 @@ export class FleetManager {
|
|
|
14232
14303
|
this.emitSseEvent("message", {
|
|
14233
14304
|
instance, sender: msg.username, role: "user", text: text.slice(0, WEB_CHAT_TEXT_MAX), ts: new Date().toISOString(),
|
|
14234
14305
|
channel: true, from: webChatFrom(msg.adapterId, msg.userId), ...(posts ? { posts } : {}),
|
|
14306
|
+
...(msg.messageId ? { anchor: msg.messageId } : {}), // AGEND-181: the transcript names it `(message_id: <platform id>)`
|
|
14235
14307
|
});
|
|
14236
14308
|
}
|
|
14237
14309
|
/** Handle outbound tool calls from a daemon instance */
|
|
@@ -14550,7 +14622,7 @@ export class FleetManager {
|
|
|
14550
14622
|
&& this.landedInOwnChannel(instanceName, replyAdapterId, result);
|
|
14551
14623
|
}
|
|
14552
14624
|
catch { /* not known: not the channel's (fail closed), and the bookkeeping below still runs */ }
|
|
14553
|
-
void this.afterReplyRouted(instanceName, args, senderSessionName, buttonsView, inChannel, replyAdapterId ? { adapterId: replyAdapterId, result } : undefined, replyIdentity);
|
|
14625
|
+
void this.afterReplyRouted(instanceName, args, senderSessionName, buttonsView, inChannel, replyAdapterId ? { adapterId: replyAdapterId, result } : undefined, replyIdentity, result);
|
|
14554
14626
|
}
|
|
14555
14627
|
catch (err) {
|
|
14556
14628
|
this.logger.warn({ err, instanceName }, "Reply delivered but post-delivery bookkeeping failed");
|
|
@@ -14634,7 +14706,9 @@ export class FleetManager {
|
|
|
14634
14706
|
return false;
|
|
14635
14707
|
}
|
|
14636
14708
|
}
|
|
14637
|
-
afterReplyRouted(instanceName, args, senderSessionName, buttons = null, inChannel = false, sentAs, identity = this.webChatIdentity(instanceName)) {
|
|
14709
|
+
afterReplyRouted(instanceName, args, senderSessionName, buttons = null, inChannel = false, sentAs, identity = this.webChatIdentity(instanceName), replyResult = sentAs?.result) {
|
|
14710
|
+
// AGEND-181: the id the reply call returned (also on a fleet with no adapter: web-only), the row's anchor.
|
|
14711
|
+
const returned = replyResult && typeof replyResult === "object" ? replyResult.messageId : undefined;
|
|
14638
14712
|
// #2281: where the reply is, when it landed in the instance's own place — a web reply to it is then a native reply
|
|
14639
14713
|
// there. A reply elsewhere (another chat, the web-only sink) records none.
|
|
14640
14714
|
const sent = (sentAs?.result && typeof sentAs.result === "object" ? sentAs.result : {});
|
|
@@ -14686,6 +14760,7 @@ export class FleetManager {
|
|
|
14686
14760
|
...(buttons ? { buttons } : {}), // #1266
|
|
14687
14761
|
...(inChannel ? { channel: true } : {}), // #1920 §5.2
|
|
14688
14762
|
...(post ? { posts: [post] } : {}), // #2281
|
|
14763
|
+
...(typeof returned === "string" && returned ? { anchor: returned } : {}), // AGEND-181: what the reply call returned
|
|
14689
14764
|
...(reserved !== undefined ? { reserved } : {}), // #1774
|
|
14690
14765
|
});
|
|
14691
14766
|
};
|
|
@@ -15217,7 +15292,7 @@ export class FleetManager {
|
|
|
15217
15292
|
includeArchived: payload.include_archived,
|
|
15218
15293
|
tags: payload.tags,
|
|
15219
15294
|
teams: instanceTeams(this.fleetConfig?.teams, instanceName),
|
|
15220
|
-
}), { id: payload.id, full: payload.full });
|
|
15295
|
+
}), { id: payload.id, full: payload.full, detail: payload.detail, limit: payload.limit, cursor: payload.cursor });
|
|
15221
15296
|
break;
|
|
15222
15297
|
case "fleet_decision_update": {
|
|
15223
15298
|
const id = payload.id;
|
|
@@ -15381,7 +15456,7 @@ export class FleetManager {
|
|
|
15381
15456
|
...(reply.silent !== undefined ? { silent: reply.silent } : {}),
|
|
15382
15457
|
});
|
|
15383
15458
|
case "list":
|
|
15384
|
-
return scheduler.list(requestedTarget);
|
|
15459
|
+
return scheduleListAnswer(scheduler.list(requestedTarget), args);
|
|
15385
15460
|
case "update":
|
|
15386
15461
|
return scheduler.update(args.id, args);
|
|
15387
15462
|
case "delete":
|
|
@@ -15517,7 +15592,7 @@ export class FleetManager {
|
|
|
15517
15592
|
includeArchived: args.includeArchived === true || args.include_archived === true,
|
|
15518
15593
|
tags: asStrArr(args.tags),
|
|
15519
15594
|
teams: instanceTeams(this.fleetConfig?.teams, instance),
|
|
15520
|
-
}), { id: op === "get" ? asStr(args.id) ?? "" : args.id, full: args.full });
|
|
15595
|
+
}), { id: op === "get" ? asStr(args.id) ?? "" : args.id, full: args.full, detail: args.detail, limit: args.limit, cursor: args.cursor });
|
|
15521
15596
|
case "update": {
|
|
15522
15597
|
const id = asStr(args.id);
|
|
15523
15598
|
if (!id)
|
|
@@ -15581,19 +15656,22 @@ export class FleetManager {
|
|
|
15581
15656
|
// #1336 item 1: default to live-only (no done/cancelled) unless the
|
|
15582
15657
|
// caller explicitly asked for a status.
|
|
15583
15658
|
const effectiveStatus = explicitStatus ?? LIVE_TASK_STATUSES;
|
|
15584
|
-
|
|
15659
|
+
listOptions(args);
|
|
15660
|
+
const verbose = args.verbose === true || args.detail === true;
|
|
15585
15661
|
const tasks = verbose
|
|
15586
15662
|
? db.listTasks({ assignee: filterAssignee, status: effectiveStatus, verbose: true })
|
|
15587
15663
|
: db.listTasks({ assignee: filterAssignee, status: effectiveStatus });
|
|
15588
15664
|
// #1335: cap unfiltered list. The default live-only filter does not
|
|
15589
15665
|
// count as an explicit filter for the cap decision.
|
|
15590
|
-
return applyTaskListCap(tasks, filterAssignee, explicitStatus);
|
|
15666
|
+
return args.detail === true || args.verbose === true ? applyTaskListCap(tasks, filterAssignee, explicitStatus) : taskListAnswer(tasks, args);
|
|
15591
15667
|
}
|
|
15592
15668
|
case "get": {
|
|
15593
15669
|
const id = asStr(args.id);
|
|
15594
15670
|
if (!id)
|
|
15595
15671
|
return { error: "id is required" };
|
|
15596
|
-
|
|
15672
|
+
listOptions(args);
|
|
15673
|
+
const row = db.getTaskByPrefix(id);
|
|
15674
|
+
return args.detail === true ? row : taskTitle(row);
|
|
15597
15675
|
}
|
|
15598
15676
|
case "claim": {
|
|
15599
15677
|
const id = asStr(args.id);
|
|
@@ -15743,17 +15821,19 @@ export class FleetManager {
|
|
|
15743
15821
|
const explicitStatus = asStatusFilter(payload.filter_status);
|
|
15744
15822
|
// #1336 item 1: default to live-only (no done/cancelled).
|
|
15745
15823
|
const effectiveStatus = explicitStatus ?? LIVE_TASK_STATUSES;
|
|
15746
|
-
|
|
15824
|
+
listOptions(payload);
|
|
15825
|
+
const verbose = payload.verbose === true || payload.detail === true;
|
|
15747
15826
|
const tasks = verbose
|
|
15748
15827
|
? db.listTasks({ assignee: filterAssignee, status: effectiveStatus, verbose: true })
|
|
15749
15828
|
: db.listTasks({ assignee: filterAssignee, status: effectiveStatus });
|
|
15750
15829
|
// #1335: cap unfiltered list — the default live-only filter does not
|
|
15751
15830
|
// count as an explicit filter.
|
|
15752
|
-
result = applyTaskListCap(tasks, filterAssignee, explicitStatus);
|
|
15831
|
+
result = payload.detail === true || payload.verbose === true ? applyTaskListCap(tasks, filterAssignee, explicitStatus) : taskListAnswer(tasks, payload);
|
|
15753
15832
|
break;
|
|
15754
15833
|
}
|
|
15755
15834
|
case "get":
|
|
15756
|
-
|
|
15835
|
+
listOptions(payload);
|
|
15836
|
+
result = payload.detail === true ? db.getTaskByPrefix(payload.id) : taskTitle(db.getTaskByPrefix(payload.id));
|
|
15757
15837
|
break;
|
|
15758
15838
|
case "claim":
|
|
15759
15839
|
logTask = db.claimTask(db.getTaskByPrefix(payload.id).id, meta.instance_name || instanceName, { kind: "instance", name: meta.instance_name || instanceName });
|
|
@@ -18745,6 +18825,10 @@ export class FleetManager {
|
|
|
18745
18825
|
* ClassicBot room's launched or would-be login when the room runs that backend. Null: the backend's default login
|
|
18746
18826
|
* (also for a backend that has no profiles, where the option is ignored).
|
|
18747
18827
|
*/
|
|
18828
|
+
/** #3715: update_instance_config's ClassicBot room account switch — the room's Settings save (#3691), from a tool. */
|
|
18829
|
+
switchClassicRoomProfile(name, backendOptions) {
|
|
18830
|
+
return switchClassicRoomProfile(this, name, backendOptions);
|
|
18831
|
+
}
|
|
18748
18832
|
credentialProfileOf(name, backend) {
|
|
18749
18833
|
if (isWindowsInstance(this.fleetConfig?.instances[name]))
|
|
18750
18834
|
return null;
|
|
@@ -21923,7 +22007,8 @@ export class FleetManager {
|
|
|
21923
22007
|
claimWindow: backend => this.loginWindow.tryClaim("web", backend),
|
|
21924
22008
|
releaseWindow: claim => { this.loginWindow.release(claim); },
|
|
21925
22009
|
isClaimCurrent: claim => this.loginWindow.isCurrent(claim),
|
|
21926
|
-
windowBusyMessage:
|
|
22010
|
+
windowBusyMessage: backend => this.loginWindow.busyMessage(backend),
|
|
22011
|
+
windowHolder: backend => this.loginWindow.holderFor(backend),
|
|
21927
22012
|
tunnelDataDir: () => this.dataDir,
|
|
21928
22013
|
reserveTunnel: owner => this.getTunnelLane().reserve("login", owner),
|
|
21929
22014
|
// Throws when the prompt cannot be posted: the controller tells the
|
|
@@ -21949,12 +22034,17 @@ export class FleetManager {
|
|
|
21949
22034
|
return this.machineSignInsInstance ??= new MachineSignIns({
|
|
21950
22035
|
call: (id, operation, payload, timeoutMs) => this.runtimeCoordinator().callAccount(id, operation, payload, timeoutMs),
|
|
21951
22036
|
current: owner => this.browserSignInOwnerCurrent(owner),
|
|
21952
|
-
reported: (id, profile) => this.machineAccounts.profileState(id, profile),
|
|
21953
|
-
|
|
22037
|
+
reported: (id, profile, backend) => this.machineAccounts.profileState(id, profile, backend),
|
|
22038
|
+
reportedDefault: (id, backend) => this.machineAccounts.reportedDefault(id, backend),
|
|
22039
|
+
readiness: (id, backend, named) => this.machineAccounts.readiness(id, backend, named),
|
|
21954
22040
|
actor: owner => { const handle = owner.handle; return typeof handle === "string" && /^[a-f0-9]{16}$/.test(handle) ? `admin:${handle}` : null; },
|
|
21955
22041
|
changed: (event, owner) => {
|
|
21956
|
-
// Safe fields only: the computer, the profile name, a phase and a fixed reason. Never a URL, a code, output or an e-mail address.
|
|
21957
|
-
this.logger.info({ machine: event.machine, profile: event.profile, phase: event.phase, ...(event.reason ? { reason: event.reason } : {}), by: owner.label }, "Computer account sign-in from Settings → Accounts");
|
|
22042
|
+
// Safe fields only: the computer, the CLI, the profile name (none for Antigravity's default login), a phase and a fixed reason. Never a URL, a code, output or an e-mail address.
|
|
22043
|
+
this.logger.info({ machine: event.machine, backend: event.backend, ...(event.profile ? { profile: event.profile } : {}), phase: event.phase, ...(event.reason ? { reason: event.reason } : {}), by: owner.label }, "Computer account sign-in from Settings → Accounts");
|
|
22044
|
+
// The page reads the computer's last detection (agy is never run for a read): a login made just now is remembered until the next one.
|
|
22045
|
+
// Only the computer's OWN login (no profile) is remembered here: a named account's sign-in is reported by its Runtime's inventory, which it sends before the sign-in ends.
|
|
22046
|
+
if (event.phase === "done" && event.profile === undefined)
|
|
22047
|
+
this.machineAccounts.noteDefaultLogin(event.machine, event.backend, true);
|
|
21958
22048
|
broadcastSseEvent(this.sseClients, "backend_login", {}, err => this.logger.debug({ err }, "backend_login event failed"));
|
|
21959
22049
|
this.needsYou?.poke();
|
|
21960
22050
|
},
|
|
@@ -21967,13 +22057,15 @@ export class FleetManager {
|
|
|
21967
22057
|
call: (id, operation, payload, timeoutMs) => this.runtimeCoordinator().callAccount(id, operation, payload, timeoutMs),
|
|
21968
22058
|
machine: id => remoteRuntimeEnabled() ? this.runtimeCoordinator().machine(id) ?? undefined : undefined,
|
|
21969
22059
|
machines: () => remoteRuntimeEnabled() ? this.runtimeCoordinator().listMachines() : [],
|
|
21970
|
-
agents: id => machineAgents(this.fleetConfig?.instances, id, name => { try {
|
|
22060
|
+
agents: (id, backend = "claude-code") => machineAgents(this.fleetConfig?.instances, id, name => { try {
|
|
21971
22061
|
return nativeCredentialProfile(this.fleetConfig?.instances[name]) ?? null;
|
|
21972
22062
|
}
|
|
21973
22063
|
catch {
|
|
21974
22064
|
return null;
|
|
21975
|
-
} }, this.fleetConfig?.defaults?.backend ?? "claude-code"),
|
|
21976
|
-
signingIn: (id, profile) => this.machineSignInsInstance?.signingIn(id, profile) ?? false,
|
|
22065
|
+
} }, this.fleetConfig?.defaults?.backend ?? "claude-code", backend),
|
|
22066
|
+
signingIn: (id, profile, backend) => this.machineSignInsInstance?.signingIn(id, profile, backend) ?? false,
|
|
22067
|
+
signingInDefault: (id, backend) => this.machineSignInsInstance?.signingInDefault(id, backend) ?? false,
|
|
22068
|
+
cliAgents: (id, backend) => machineAgents(this.fleetConfig?.instances, id, () => null, this.fleetConfig?.defaults?.backend ?? "claude-code", backend).map(agent => agent.name),
|
|
21977
22069
|
log: entry => this.logger.info(entry, entry.outcome === "ok" ? "Computer account changed from Settings → Accounts" : "Computer account change refused"),
|
|
21978
22070
|
});
|
|
21979
22071
|
}
|
|
@@ -21996,6 +22088,7 @@ export class FleetManager {
|
|
|
21996
22088
|
},
|
|
21997
22089
|
checkAuth: backend => checkAuthStatus(LOGIN_FLOWS[backend].authCheck),
|
|
21998
22090
|
checkConsoleAuth: backend => checkAuthStatus(LOGIN_FLOWS[backend].authCheck),
|
|
22091
|
+
accountsPage: true, // Settings → Accounts starts what the registry says can be driven (Antigravity: `agy acp --login`); the first-run page's own instance does not
|
|
21999
22092
|
transport: () => createStructuredSignInTransport(),
|
|
22000
22093
|
changed: (event, owner, launched) => {
|
|
22001
22094
|
try {
|
|
@@ -22006,6 +22099,7 @@ export class FleetManager {
|
|
|
22006
22099
|
if (event.phase === "done") {
|
|
22007
22100
|
this.forgetSignInIdentities(); // a sign-in may be a different account now
|
|
22008
22101
|
this.keepAliveAfterSignIn(event.backend, null); // its file changed, whoever is watching: a "needs sign-in" left from before is no longer the answer
|
|
22102
|
+
this.usageAfterSignIn(); // the usage read before this sign-in is not this account's
|
|
22009
22103
|
}
|
|
22010
22104
|
this.needsYou?.poke();
|
|
22011
22105
|
if (!this.browserSignInOwnerCurrent(owner))
|
|
@@ -22040,8 +22134,15 @@ export class FleetManager {
|
|
|
22040
22134
|
return result.ok;
|
|
22041
22135
|
},
|
|
22042
22136
|
checkAuth: (backend, profile) => {
|
|
22043
|
-
const
|
|
22044
|
-
return
|
|
22137
|
+
const launch = credentialProfileLaunch(this.dataDir, backend, profile);
|
|
22138
|
+
return launch ? checkAuthStatus(LOGIN_FLOWS[backend].authCheck, launch.env, launch.args) : Promise.resolve("unknown");
|
|
22139
|
+
},
|
|
22140
|
+
// AGEND-119: a CLI told its account by an argument (Antigravity) first proves the pin keeps a folder's sign-in in that folder (account-isolation.ts): asked about an empty scratch folder, never the account's own
|
|
22141
|
+
// (one that already has a token file proves nothing once the CLI stops honouring the pin).
|
|
22142
|
+
isolated: async (backend) => {
|
|
22143
|
+
if (hostFacts(backend, "namedAccounts")?.home !== "launch-argument")
|
|
22144
|
+
return true;
|
|
22145
|
+
return proveFolderIsolation(backend, launch => checkAuthSignedOut(LOGIN_FLOWS[backend].authCheck, launch.env, launch.args));
|
|
22045
22146
|
},
|
|
22046
22147
|
transport: target => createStructuredSignInTransport({ backend: target.backend, dataDir: this.dataDir }),
|
|
22047
22148
|
changed: (event, owner, launched) => {
|
|
@@ -22053,6 +22154,7 @@ export class FleetManager {
|
|
|
22053
22154
|
if (event.phase === "done") {
|
|
22054
22155
|
this.forgetSignInIdentities(); // a sign-in may be a different account now
|
|
22055
22156
|
this.keepAliveAfterSignIn(event.backend, event.profile);
|
|
22157
|
+
this.usageAfterSignIn();
|
|
22056
22158
|
}
|
|
22057
22159
|
this.needsYou?.poke();
|
|
22058
22160
|
if (!this.browserSignInOwnerCurrent(owner))
|
|
@@ -22075,7 +22177,7 @@ export class FleetManager {
|
|
|
22075
22177
|
return pending.map(backend => {
|
|
22076
22178
|
if (!this.pendingBackendSince.has(backend))
|
|
22077
22179
|
this.pendingBackendSince.set(backend, Date.now());
|
|
22078
|
-
return { backend, since: this.pendingBackendSince.get(backend), browser:
|
|
22180
|
+
return { backend, since: this.pendingBackendSince.get(backend), browser: ONBOARDING_BROWSER_BACKENDS.includes(backend) };
|
|
22079
22181
|
});
|
|
22080
22182
|
}
|
|
22081
22183
|
/** #2233: sign-ins started from the web dashboard (local admin sessions), on the same controller as chat's. */
|
|
@@ -22087,7 +22189,7 @@ export class FleetManager {
|
|
|
22087
22189
|
accessToken: sink => this.loginController?.webAccessToken(sink) ?? null,
|
|
22088
22190
|
isActiveFor: sink => this.loginController?.isActiveFor(sink) ?? false,
|
|
22089
22191
|
cancelFor: (sink, opts) => this.loginController?.cancelFor(sink, opts) ?? Promise.resolve(false),
|
|
22090
|
-
cancel:
|
|
22192
|
+
cancel: backend => this.cancelLoginSession(backend),
|
|
22091
22193
|
notice: ({ shown, label, handle }) => this.notifyFleetError(t("login.web_dashboard_notice", shown, label, handle.slice(0, 8))),
|
|
22092
22194
|
// No details in the event: each page reads its own view (GET /ui/backend-login), as its session may see it.
|
|
22093
22195
|
// The accounts are forgotten when ANY sign-in ends, even one a later one replaced (it may be a different account now), and not at every step of a
|
|
@@ -22133,10 +22235,36 @@ export class FleetManager {
|
|
|
22133
22235
|
}
|
|
22134
22236
|
/** One `claude auth status` for a sign-in (the default one, or a credential profile's folder). */
|
|
22135
22237
|
async readSignInIdentity(target) {
|
|
22136
|
-
let env;
|
|
22137
|
-
if (target.profile)
|
|
22138
|
-
|
|
22139
|
-
|
|
22238
|
+
let env, launch;
|
|
22239
|
+
if (target.profile) {
|
|
22240
|
+
const l = credentialProfileLaunch(this.dataDir, target.backend, target.profile);
|
|
22241
|
+
env = l?.env;
|
|
22242
|
+
// AGEND-119: a named account's folder (where a token-file CLI's sign-in is read) and the arguments a probe of it is given.
|
|
22243
|
+
if (l)
|
|
22244
|
+
launch = { args: l.args, folder: credentialProfileHome(this.dataDir, target.backend, target.profile) };
|
|
22245
|
+
}
|
|
22246
|
+
return checkAuthIdentity(target.backend, env, launch);
|
|
22247
|
+
}
|
|
22248
|
+
/**
|
|
22249
|
+
* The sign-ins whose account is read: every sign-in the Accounts list knows (`backendSignInTargets`: each CLI's default and the profiles an agent uses) AND each named account on disk that is signed in, used by an
|
|
22250
|
+
* agent or not — an account that was just signed in and has no agent yet has an account too, and the page shows it as it shows the default's.
|
|
22251
|
+
*/
|
|
22252
|
+
identityTargets() {
|
|
22253
|
+
const out = this.backendSignInTargets(), seen = new Set(out.map(t => `${t.backend}\0${t.profile ?? ""}`));
|
|
22254
|
+
for (const backend of PROFILE_CLIS) {
|
|
22255
|
+
for (const profile of profilesOnDisk(this.dataDir, backend)) {
|
|
22256
|
+
if (seen.has(`${backend}\0${profile}`))
|
|
22257
|
+
continue;
|
|
22258
|
+
let login = "unknown";
|
|
22259
|
+
try {
|
|
22260
|
+
login = credentialProfileLogin(this.dataDir, backend, profile).state;
|
|
22261
|
+
}
|
|
22262
|
+
catch { /* unknown */ }
|
|
22263
|
+
if (login === "logged-in")
|
|
22264
|
+
out.push({ backend, profile, state: "usable", signIn: false });
|
|
22265
|
+
}
|
|
22266
|
+
}
|
|
22267
|
+
return out;
|
|
22140
22268
|
}
|
|
22141
22269
|
/**
|
|
22142
22270
|
* Start reading, in the background, the account of each Claude Code sign-in that is signed in (the default and every profile an agent uses) and
|
|
@@ -22147,7 +22275,7 @@ export class FleetManager {
|
|
|
22147
22275
|
refreshSignInIdentities() {
|
|
22148
22276
|
const now = Date.now(), fresh = (target) => { const entry = this.signInIdentities.get(`${target.backend}\0${target.profile ?? ""}`); return !!entry && now - entry.at < 5 * 60_000; };
|
|
22149
22277
|
const started = [];
|
|
22150
|
-
for (const target of this.
|
|
22278
|
+
for (const target of this.identityTargets()) {
|
|
22151
22279
|
const key = `${target.backend}\0${target.profile ?? ""}`;
|
|
22152
22280
|
if (target.state !== "usable" || !authIdentitySupported(target.backend) || fresh(target) || this.signInIdentityReads.has(key))
|
|
22153
22281
|
continue;
|
|
@@ -22190,7 +22318,7 @@ export class FleetManager {
|
|
|
22190
22318
|
login = credentialProfileLogin(this.dataDir, backend, profile).state;
|
|
22191
22319
|
}
|
|
22192
22320
|
catch { /* unknown */ }
|
|
22193
|
-
const signIn =
|
|
22321
|
+
const signIn = this.profileSignInSupported(backend, profile);
|
|
22194
22322
|
const hostCommand = signIn ? null : credentialProfileLoginCommand(this.dataDir, backend, profile);
|
|
22195
22323
|
const identity = this.signInIdentity(backend, profile);
|
|
22196
22324
|
rows.push({ profile, state: (login === "logged-in" ? "usable" : login === "signed-out" ? "not_signed_in" : "unknown"), signIn,
|
|
@@ -22199,9 +22327,8 @@ export class FleetManager {
|
|
|
22199
22327
|
diskProfiles.set(backend, rows);
|
|
22200
22328
|
}
|
|
22201
22329
|
const { agents, classic, fleetDefaults } = this.accountUses();
|
|
22202
|
-
//
|
|
22330
|
+
// Every pool's and every window's usage, from the usage panel's own (cached, never forced) read.
|
|
22203
22331
|
const usage = new Map();
|
|
22204
|
-
const shortWindow = new Map();
|
|
22205
22332
|
const ids = new Map(); // provider id → backend\0profile
|
|
22206
22333
|
for (const backend of ACCOUNT_CLIS) {
|
|
22207
22334
|
const pid = usageProviderIdForBackend(backend);
|
|
@@ -22217,12 +22344,9 @@ export class FleetManager {
|
|
|
22217
22344
|
const at = ids.get(provider.id);
|
|
22218
22345
|
if (!at)
|
|
22219
22346
|
continue;
|
|
22220
|
-
const
|
|
22221
|
-
if (
|
|
22222
|
-
usage.set(at,
|
|
22223
|
-
const sh = shortUsage(provider);
|
|
22224
|
-
if (sh)
|
|
22225
|
-
shortWindow.set(at, sh);
|
|
22347
|
+
const u = accountUsage(at.split("\0")[0], provider);
|
|
22348
|
+
if (u)
|
|
22349
|
+
usage.set(at, u);
|
|
22226
22350
|
}
|
|
22227
22351
|
}
|
|
22228
22352
|
catch { /* the view without usage */ }
|
|
@@ -22249,9 +22373,19 @@ export class FleetManager {
|
|
|
22249
22373
|
this.logger.debug({ err: err.message }, "Computer accounts not read");
|
|
22250
22374
|
}
|
|
22251
22375
|
}
|
|
22252
|
-
return buildAccountsView({ targets, diskProfiles, agents, classic, fleetDefaults, usage,
|
|
22376
|
+
return buildAccountsView({ targets, diskProfiles, agents, classic, fleetDefaults, usage, keepAlive, machines, installShown: this.webHostInstalls.view()?.backend ?? null,
|
|
22253
22377
|
versions: new Map(this.backendAvailabilityRows().map(row => [row.backend, row.version ?? null])) });
|
|
22254
22378
|
}
|
|
22379
|
+
/**
|
|
22380
|
+
* AGEND-113: a dashboard sign-in just finished: read the usage once more now (the panel's own forced read, so its 30-second floor and Retry-After hold), instead of showing what was read
|
|
22381
|
+
* before it for up to five minutes, and tell the pages to read their view again when something really was fetched. Never awaited, never allowed to fail the sign-in's follow-up.
|
|
22382
|
+
*/
|
|
22383
|
+
usageAfterSignIn() {
|
|
22384
|
+
try {
|
|
22385
|
+
void refreshUsageAfterSignIn(() => broadcastSseEvent(this.sseClients, "backend_login", {}, err => this.logger.debug({ err }, "backend_login event failed"))).catch(() => { });
|
|
22386
|
+
}
|
|
22387
|
+
catch { /* the usage shows itself within its own cache time */ }
|
|
22388
|
+
}
|
|
22255
22389
|
/**
|
|
22256
22390
|
* A sign-in just finished for this account: look at its Keep sign-in alive setting once now (when it is on), so what the Accounts row says about
|
|
22257
22391
|
* "the last check" is not the one from before the sign-in. Never awaited, and never allowed to fail the sign-in's own follow-up.
|
|
@@ -22462,7 +22596,7 @@ export class FleetManager {
|
|
|
22462
22596
|
const owner = this.worlds.keys().next().value;
|
|
22463
22597
|
// M-2932: only what a refresh showed (needs_sign_in, not_renewed, transient) — never a stored end date.
|
|
22464
22598
|
return ka.attention().map(a => ({
|
|
22465
|
-
backend: a.backend, profile: a.profile, kind: a.kind, since: a.since, signIn:
|
|
22599
|
+
backend: a.backend, profile: a.profile, kind: a.kind, since: a.since, signIn: this.signInFromDashboard(a.backend, a.profile),
|
|
22466
22600
|
...(owner ? { owner } : {}),
|
|
22467
22601
|
detail: t(`keepalive.${a.kind}`, BACKEND_LABELS[a.backend] ?? a.backend, a.profile ?? t("keepalive.default_name"), day(a.kind === "transient" ? a.failedSince ?? a.since : a.since)),
|
|
22468
22602
|
}));
|
|
@@ -22549,7 +22683,7 @@ export class FleetManager {
|
|
|
22549
22683
|
const dry = removeAccountProfile(this.dataDir, this.removalRequest(backend, name, confirm, null), undefined, { dryRun: true });
|
|
22550
22684
|
if (!dry.ok)
|
|
22551
22685
|
return refused(dry);
|
|
22552
|
-
const claim = this.loginWindow.tryClaim("
|
|
22686
|
+
const claim = this.loginWindow.tryClaim("account", backend);
|
|
22553
22687
|
if (!claim)
|
|
22554
22688
|
return refused({ ok: false, error: "signing_in" });
|
|
22555
22689
|
const step = await this.withAccountWriter(claim, async (deps) => {
|
|
@@ -22621,9 +22755,11 @@ export class FleetManager {
|
|
|
22621
22755
|
classic: classic.filter(c => c.backend === backend && same(c.profile)).map(c => c.key),
|
|
22622
22756
|
fleetDefault: same(fleetDefaults.get(backend)),
|
|
22623
22757
|
};
|
|
22624
|
-
|
|
22758
|
+
// The window held on THIS backend, and only a sign-in of THIS backend explains it by account (the precise checks below). Another backend's running sign-in (a Grok terminal beside a
|
|
22759
|
+
// Claude Code logout) says nothing about who holds this one: the held window itself then refuses Remove (a logout's child may still be running).
|
|
22760
|
+
const held = this.loginWindow.heldFor(backend);
|
|
22625
22761
|
const signingIn = (this.loginController?.signingIn(backend, profile) ?? false) || (this.profileSignInsInstance?.signingIn(backend, profile) ?? false)
|
|
22626
|
-
|| (!!held && held !== ownClaim &&
|
|
22762
|
+
|| (!!held && held !== ownClaim && this.loginController?.activeBackend !== backend && this.profileSignInsInstance?.active?.backend !== backend); // a named account's sign-in holds the window too, and says WHICH account (above)
|
|
22627
22763
|
return { backend, name, confirm, users, signingIn, usersUnknown: rooms.kind === "unknown" };
|
|
22628
22764
|
}
|
|
22629
22765
|
/**
|
|
@@ -22652,6 +22788,16 @@ export class FleetManager {
|
|
|
22652
22788
|
run: async (b, a, e) => watch(await base.run(b, a, e)),
|
|
22653
22789
|
keychainHas: base.keychainHas,
|
|
22654
22790
|
stillOwner: () => this.loginWindow.isCurrent(claim),
|
|
22791
|
+
// AGEND-119: a CLI with no logout command (Antigravity) is signed out by removing its sign-in file, and the CLI's own status probe then says whether it took effect — for this very account, launched as the agent is.
|
|
22792
|
+
verify: base.verify ?? (async (backend, profile) => {
|
|
22793
|
+
const check = LOGIN_FLOWS[backend]?.authCheck;
|
|
22794
|
+
if (!check)
|
|
22795
|
+
return "unknown";
|
|
22796
|
+
const launch = profile ? credentialProfileLaunch(this.dataDir, backend, profile) : null;
|
|
22797
|
+
// AGEND-250 (#3771 review P2-3): the strict reading. "Signed out" (`invalid`) only when the CLI exited non-zero AND said it is signed out ("Please sign in"); a DNS failure, a timeout or any other
|
|
22798
|
+
// nonzero exit is `unknown`, which the sign-out reports as unverified. The permissive `checkAuthStatus` took every nonzero exit as proof, so an offline machine "proved" a sign-out that had not happened.
|
|
22799
|
+
return checkAuthSignedOut(check, launch?.env, launch?.args);
|
|
22800
|
+
}),
|
|
22655
22801
|
};
|
|
22656
22802
|
let finished;
|
|
22657
22803
|
const life = new Promise(r => { finished = r; });
|
|
@@ -22680,14 +22826,19 @@ export class FleetManager {
|
|
|
22680
22826
|
// #3305 review P2-3: the logout holds the shared login window from before it runs until its cleanup is done — no
|
|
22681
22827
|
// sign-in (chat, dashboard, install) and no other logout starts meanwhile; one already running refuses this.
|
|
22682
22828
|
const signingIn = (this.loginController?.signingIn(backend, named) ?? false) || (named !== null && (this.profileSignInsInstance?.signingIn(backend, named) ?? false));
|
|
22683
|
-
const claim = signingIn ? null : this.loginWindow.tryClaim("
|
|
22829
|
+
const claim = signingIn ? null : this.loginWindow.tryClaim("account", backend);
|
|
22684
22830
|
let result;
|
|
22685
22831
|
if (!claim)
|
|
22686
22832
|
result = { ok: false, error: "signing_in" };
|
|
22687
22833
|
else
|
|
22688
22834
|
result = await this.withAccountWriter(claim, deps => signOutAccount(this.dataDir, { backend, profile: profile ?? null, confirm, signingIn: false }, deps));
|
|
22835
|
+
// AGEND-119: the audit record of a sign-out — who, which backend's account (a name, never a path or an e-mail) and how it ended.
|
|
22836
|
+
try {
|
|
22837
|
+
this.eventLog?.insert("login", "account_signout", { backend, profile: shown, by, ok: result.ok, ...(result.ok ? (result.unverified ? { unverified: true } : {}) : { refused: result.error }) });
|
|
22838
|
+
}
|
|
22839
|
+
catch { /* safe metadata only */ }
|
|
22689
22840
|
if (result.ok) {
|
|
22690
|
-
this.logger.info({ backend, profile: shown, by, ...(result.keychainLeft ? { keychainLeft: true } : {}) }, "Account signed out from Settings → Accounts");
|
|
22841
|
+
this.logger.info({ backend, profile: shown, by, ...(result.keychainLeft ? { keychainLeft: true } : {}), ...(result.unverified ? { unverified: true } : {}) }, "Account signed out from Settings → Accounts");
|
|
22691
22842
|
this.forgetSignInIdentities();
|
|
22692
22843
|
void this.backendAvailability.refresh([backend], { force: true }).catch(() => { });
|
|
22693
22844
|
broadcastSseEvent(this.sseClients, "backend_login", {}, err => this.logger.debug({ err }, "backend_login event failed"));
|
|
@@ -22708,6 +22859,24 @@ export class FleetManager {
|
|
|
22708
22859
|
return false;
|
|
22709
22860
|
}
|
|
22710
22861
|
}
|
|
22862
|
+
/** Whether the dashboard can sign this account in — a named one (profileSignInSupported), or a CLI's default sign-in as the Accounts list says it (`backendSignInTargets`). */
|
|
22863
|
+
signInFromDashboard(backend, profile) {
|
|
22864
|
+
if (profile)
|
|
22865
|
+
return this.profileSignInSupported(backend, profile);
|
|
22866
|
+
return this.backendSignInTargets().find(t => t.backend === backend && !t.profile)?.signIn ?? dashboardSignInSupported(backend, null);
|
|
22867
|
+
}
|
|
22868
|
+
/**
|
|
22869
|
+
* Whether the dashboard can sign this NAMED account in: the browser-terminal flow of a CLI that supports it for profiles (`dashboardSignInSupported`), or — AGEND-119, Antigravity — the structured
|
|
22870
|
+
* controls (`agy --app_data_dir <folder> acp --login`) once the CLI is installed and new enough to have the command. A CLI that is older, or whose version is not read yet, is signed in on the host.
|
|
22871
|
+
*/
|
|
22872
|
+
profileSignInSupported(backend, profile) {
|
|
22873
|
+
if (dashboardSignInSupported(backend, profile))
|
|
22874
|
+
return true;
|
|
22875
|
+
if (!structuredSignInSupported(backend) || !STRUCTURED_PROFILE_BACKENDS.has(backend))
|
|
22876
|
+
return false;
|
|
22877
|
+
const row = this.backendAvailabilityRows().find(r => r.backend === backend);
|
|
22878
|
+
return !!row && row.state !== "not_installed" && row.state !== "too_old" && versionAtLeast(row.version, hostFacts(backend, "structuredSignIn")?.minVersion);
|
|
22879
|
+
}
|
|
22711
22880
|
backendSignInTargets() {
|
|
22712
22881
|
const out = [];
|
|
22713
22882
|
for (const row of this.backendAvailabilityRows()) {
|
|
@@ -22716,13 +22885,20 @@ export class FleetManager {
|
|
|
22716
22885
|
// M-2825: `claude auth status` says loggedIn after a refused refresh and past the sign-in's end date — the file says
|
|
22717
22886
|
// whether it is over, and then it is not signed in (never the other way: the file can't vouch for a login).
|
|
22718
22887
|
const ended = row.state === "usable" && this.claudeSignInEnded(row.backend, null);
|
|
22888
|
+
// A CLI the dashboard drives with the structured sign-in (registry: `host.structuredSignIn`) although chat's /login and the browser terminal decline it (Antigravity: `agy acp --login`, agy
|
|
22889
|
+
// >= its `minVersion`) is signed in from Settings → Accounts. A CLI that is older, or whose version is not known, keeps "Sign in on the host" and is told to update.
|
|
22890
|
+
const structured = hostFacts(row.backend, "structuredSignIn");
|
|
22891
|
+
const viaStructured = !!structured && flow?.remoteLogin === "unsupported" && row.state !== "not_installed";
|
|
22892
|
+
const structuredSignIn = viaStructured && versionAtLeast(row.version, structured.minVersion);
|
|
22893
|
+
// Told to update only when the version is KNOWN to be older: a version that was not read yet is not "too old".
|
|
22894
|
+
const structuredUpdate = viaStructured && !structuredSignIn && typeof row.version === "string" && /\d/.test(row.version);
|
|
22719
22895
|
out.push({
|
|
22720
22896
|
// Not installed or too old: signing in would not help — the row says how to install (or update) it instead.
|
|
22721
22897
|
backend: row.backend, state: ended ? "not_signed_in" : row.state, ...(ended ? { reconnect: true } : {}),
|
|
22722
|
-
signIn: row.state !== "not_installed" && row.state !== "too_old" && dashboardSignInSupported(row.backend),
|
|
22723
|
-
...(flow?.remoteLogin === "unsupported" ? { hostCommand: flow.command } : {}),
|
|
22898
|
+
signIn: row.state !== "not_installed" && row.state !== "too_old" && (viaStructured ? structuredSignIn : dashboardSignInSupported(row.backend)),
|
|
22899
|
+
...(flow?.remoteLogin === "unsupported" && !structuredSignIn ? { hostCommand: flow.command } : {}),
|
|
22724
22900
|
...(row.state === "not_installed" && install ? { install } : {}),
|
|
22725
|
-
...(row.state === "too_old" && install ? { update: install } : {}),
|
|
22901
|
+
...((row.state === "too_old" || structuredUpdate) && install ? { update: install } : {}),
|
|
22726
22902
|
...(this.signInIdentity(row.backend) ? { identity: this.signInIdentity(row.backend) } : {}),
|
|
22727
22903
|
});
|
|
22728
22904
|
}
|
|
@@ -22738,7 +22914,7 @@ export class FleetManager {
|
|
|
22738
22914
|
login = credentialProfileLogin(this.dataDir, backend, profile).state;
|
|
22739
22915
|
}
|
|
22740
22916
|
catch { /* unknown */ }
|
|
22741
|
-
const signIn =
|
|
22917
|
+
const signIn = this.profileSignInSupported(backend, profile);
|
|
22742
22918
|
const hostCommand = signIn ? null : credentialProfileLoginCommand(this.dataDir, backend, profile);
|
|
22743
22919
|
out.push({ backend, profile, state: login === "logged-in" ? "usable" : login === "signed-out" ? "not_signed_in" : "unknown", signIn,
|
|
22744
22920
|
...(hostCommand ? { hostCommand } : {}), ...(this.signInIdentity(backend, profile) ? { identity: this.signInIdentity(backend, profile) } : {}),
|
|
@@ -23101,30 +23277,37 @@ export class FleetManager {
|
|
|
23101
23277
|
bounded(this.accountWriters.size ? Promise.all([...this.accountWriters]).then(() => undefined) : undefined, "account-logout"),
|
|
23102
23278
|
]);
|
|
23103
23279
|
}
|
|
23104
|
-
/**
|
|
23105
|
-
|
|
23280
|
+
/**
|
|
23281
|
+
* `/login cancel` — abort the active session and remove its window. `backend` (AGEND-203, the dashboard's "Cancel the running sign-in" on a refused start): only the
|
|
23282
|
+
* sign-in or install running on that backend; nothing else is touched, and the answer says none ran when there is none.
|
|
23283
|
+
*/
|
|
23284
|
+
async cancelLoginSession(backend) {
|
|
23285
|
+
const mine = (b) => backend === undefined || b === backend;
|
|
23106
23286
|
// `/login cancel` also stops an install that `/login` started — and the
|
|
23107
23287
|
// sign-in an install that just succeeded is about to hand over to.
|
|
23108
|
-
if (this.activeInstall)
|
|
23288
|
+
if (this.activeInstall && mine(this.activeInstall.backend))
|
|
23109
23289
|
return this.cancelInstallSession();
|
|
23110
|
-
if (this.installHandoff) {
|
|
23111
|
-
const { backend } = this.installHandoff;
|
|
23290
|
+
if (this.installHandoff && mine(this.installHandoff.backend)) {
|
|
23291
|
+
const { backend: handedOff } = this.installHandoff;
|
|
23112
23292
|
this.installHandoff.cancelled = true;
|
|
23113
23293
|
this.installHandoff = null;
|
|
23114
|
-
return t("login.cancelled",
|
|
23294
|
+
return t("login.cancelled", handedOff);
|
|
23115
23295
|
}
|
|
23116
23296
|
const browserLogin = this.browserBackendSignInsInstance, browserBackend = browserLogin?.activeBackend;
|
|
23117
|
-
if (browserLogin && browserBackend) {
|
|
23297
|
+
if (browserLogin && browserBackend && mine(browserBackend)) {
|
|
23118
23298
|
const confirmed = await browserLogin.close();
|
|
23119
23299
|
if (confirmed)
|
|
23120
23300
|
this.browserBackendSignInsInstance = null;
|
|
23121
23301
|
return confirmed ? t("login.cancelled", browserBackend) : t("login.browser_cleanup_failed");
|
|
23122
23302
|
}
|
|
23123
23303
|
// #3212: a named account's sign-in on this host ("Cancel sign-in and remove" and `/login cancel` end it as they end the others).
|
|
23124
|
-
const
|
|
23125
|
-
if (
|
|
23126
|
-
|
|
23127
|
-
|
|
23304
|
+
const target = this.profileSignInsInstance?.active ?? null;
|
|
23305
|
+
if (!target || mine(target.backend)) {
|
|
23306
|
+
const ended = await this.profileSignInsInstance?.cancelActive();
|
|
23307
|
+
if (ended)
|
|
23308
|
+
return ended.confirmed ? t("login.cancelled", t("login.profile_label", ended.target.backend, ended.target.profile)) : t("login.browser_cleanup_failed");
|
|
23309
|
+
}
|
|
23310
|
+
if (this.loginController?.isActive() && mine(this.loginController.pendingBackend))
|
|
23128
23311
|
return this.loginController.cancel();
|
|
23129
23312
|
return t("login.no_session");
|
|
23130
23313
|
}
|
|
@@ -23280,7 +23463,7 @@ export class FleetManager {
|
|
|
23280
23463
|
return t("install.already", backend, info.binary);
|
|
23281
23464
|
}
|
|
23282
23465
|
if (!claim)
|
|
23283
|
-
return this.loginWindow.busyMessage();
|
|
23466
|
+
return this.loginWindow.busyMessage(backend);
|
|
23284
23467
|
// M-2281: the installer's output, live, in the chat that asked — no page shows this window.
|
|
23285
23468
|
// Telegram gets its own <pre> (its markdown conversion keeps a fence as literal backticks); others a fenced block.
|
|
23286
23469
|
const frameStyle = chat.adapter.type === "telegram" ? "html" : "markdown";
|
|
@@ -23774,6 +23957,7 @@ export class FleetManager {
|
|
|
23774
23957
|
instance: String(m.instance ?? ""), sender: String(m.sender ?? ""), text: String(m.text ?? ""), ts: String(m.ts ?? new Date().toISOString()),
|
|
23775
23958
|
attachments: Array.isArray(m.attachments) ? m.attachments : undefined,
|
|
23776
23959
|
messageId: typeof m.messageId === "string" ? m.messageId : undefined,
|
|
23960
|
+
anchor: typeof m.anchor === "string" ? m.anchor : undefined,
|
|
23777
23961
|
role: typeof m.role === "string" ? m.role : undefined,
|
|
23778
23962
|
buttons: m.buttons,
|
|
23779
23963
|
click: m.click,
|
|
@@ -25137,8 +25321,10 @@ export class FleetManager {
|
|
|
25137
25321
|
const backend = this.backendNameForInstance(name);
|
|
25138
25322
|
const binding = this.webModelBinding(backend, name);
|
|
25139
25323
|
// A named agy account has no verified relocation/discovery contract. In particular,
|
|
25140
|
-
// never publish the ambient account's models under that profile (#3526 / D7).
|
|
25141
|
-
|
|
25324
|
+
// never publish the ambient account's models under that profile (#3526 / D7). (AGEND-119: agy now HAS
|
|
25325
|
+
// named accounts, but `agy models` is not run with the account's folder, so its answer would still be the
|
|
25326
|
+
// default account's: only a CLI whose profile is a variable the probe inherits is discovered under one.)
|
|
25327
|
+
if (!binding || (binding.profile && (!credentialHomeSpec(backend) || credentialHomeSpec(backend).kind === "launch-argument")))
|
|
25142
25328
|
continue;
|
|
25143
25329
|
// A description/defaults save can retire a scoped answer's full binding even
|
|
25144
25330
|
// though its account signature is unchanged. Keep the conservative fence and
|