@songsid/agend 2.4.0-alpha.2 → 2.4.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +15 -9
- 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 +9 -7
- 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 +11 -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.d.ts +8 -0
- package/dist/backend/claude-code.js +11 -4
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.js +7 -3
- package/dist/backend/codex.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/grok.d.ts +19 -0
- package/dist/backend/grok.js +112 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/types.d.ts +10 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +6 -0
- package/dist/backend-availability.js +11 -0
- package/dist/backend-availability.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +9 -1
- package/dist/browser-backend-signins.js +9 -5
- 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/child-process.d.ts +1 -0
- package/dist/child-process.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/claude-model-observation.d.ts +71 -0
- package/dist/claude-model-observation.js +169 -0
- package/dist/claude-model-observation.js.map +1 -0
- 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/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/cross-instance-envelope.d.ts +4 -1
- package/dist/cross-instance-envelope.js +12 -7
- package/dist/cross-instance-envelope.js.map +1 -1
- package/dist/daemon.d.ts +24 -2
- package/dist/daemon.js +265 -37
- 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/delivery-consumed-watch.d.ts +24 -0
- package/dist/delivery-consumed-watch.js +21 -10
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +5 -1
- package/dist/delivery-outbox.js +5 -0
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-manager.d.ts +31 -2
- package/dist/fleet-manager.js +238 -56
- 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 +48 -7
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +18 -8
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +518 -0
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -1
- package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +199 -40
- 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/grok-delivery-proof.d.ts +24 -0
- package/dist/grok-delivery-proof.js +124 -0
- package/dist/grok-delivery-proof.js.map +1 -0
- package/dist/hub/assistant/admin-types.d.ts +43 -0
- package/dist/hub/assistant/admin-types.js +2 -0
- package/dist/hub/assistant/admin-types.js.map +1 -0
- package/dist/hub/assistant/claude-host.d.ts +17 -0
- package/dist/hub/assistant/claude-host.js +300 -0
- package/dist/hub/assistant/claude-host.js.map +1 -0
- package/dist/hub/assistant/context.d.ts +3 -0
- package/dist/hub/assistant/context.js +7 -0
- package/dist/hub/assistant/context.js.map +1 -0
- package/dist/hub/assistant/fleet-host.d.ts +19 -0
- package/dist/hub/assistant/fleet-host.js +28 -0
- package/dist/hub/assistant/fleet-host.js.map +1 -0
- package/dist/hub/assistant/runner.d.ts +64 -0
- package/dist/hub/assistant/runner.js +239 -0
- package/dist/hub/assistant/runner.js.map +1 -0
- package/dist/hub/assistant/service.d.ts +51 -0
- package/dist/hub/assistant/service.js +143 -0
- package/dist/hub/assistant/service.js.map +1 -0
- package/dist/hub/assistant/store.d.ts +3 -0
- package/dist/hub/assistant/store.js +65 -0
- package/dist/hub/assistant/store.js.map +1 -0
- package/dist/hub/assistant/types.d.ts +60 -0
- package/dist/hub/assistant/types.js +2 -0
- package/dist/hub/assistant/types.js.map +1 -0
- 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 +13 -6
- package/dist/hub/catalog.js +127 -35
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +16 -0
- package/dist/hub/client.js +52 -9
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +8 -1
- package/dist/hub/compose/member.js +238 -57
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +17 -1
- package/dist/hub/compose/server.js +76 -13
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/admission.d.ts +15 -0
- package/dist/hub/directory/admission.js +56 -0
- package/dist/hub/directory/admission.js.map +1 -0
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +114 -0
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +27 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/enrolment-code.d.ts +1 -1
- package/dist/hub/enrolment-code.js +4 -4
- package/dist/hub/enrolment-code.js.map +1 -1
- 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-control.d.ts +1 -0
- package/dist/hub/group-policy/admin-control.js +4 -2
- package/dist/hub/group-policy/admin-control.js.map +1 -1
- package/dist/hub/group-policy/admin-facts.d.ts +1 -0
- package/dist/hub/group-policy/admin-facts.js +2 -1
- package/dist/hub/group-policy/admin-facts.js.map +1 -1
- package/dist/hub/group-policy/admin-impact.d.ts +2 -0
- package/dist/hub/group-policy/admin-impact.js +10 -2
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.js +1 -1
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/admin-read.d.ts +1 -0
- package/dist/hub/group-policy/admin-read.js +3 -2
- package/dist/hub/group-policy/admin-read.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +5 -2
- package/dist/hub/group-policy/authorization.js +73 -32
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/errors.d.ts +9 -0
- package/dist/hub/group-policy/errors.js +13 -0
- package/dist/hub/group-policy/errors.js.map +1 -0
- package/dist/hub/group-policy/impact-inventory.js +20 -4
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +4 -5
- package/dist/hub/group-policy/resources.js +26 -19
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +21 -12
- package/dist/hub/group-policy/store.js +99 -109
- 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.d.ts +1 -0
- package/dist/hub/http/compose.js +463 -20
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +24 -5
- package/dist/hub/http/core.js +181 -54
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +26 -0
- package/dist/hub/http/schema.js +19 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/init/member-certificate.d.ts +1 -0
- package/dist/hub/init/member-certificate.js +39 -0
- package/dist/hub/init/member-certificate.js.map +1 -0
- package/dist/hub/init/plan-digest.js +1 -0
- package/dist/hub/init/plan-digest.js.map +1 -1
- package/dist/hub/invitations.d.ts +96 -0
- package/dist/hub/invitations.js +292 -0
- package/dist/hub/invitations.js.map +1 -0
- package/dist/hub/join/certificate-trust.d.ts +13 -0
- package/dist/hub/join/certificate-trust.js +41 -0
- package/dist/hub/join/certificate-trust.js.map +1 -0
- package/dist/hub/join/certificate.d.ts +11 -0
- package/dist/hub/join/certificate.js +67 -0
- package/dist/hub/join/certificate.js.map +1 -0
- package/dist/hub/join/client.d.ts +5 -0
- package/dist/hub/join/client.js +30 -3
- package/dist/hub/join/client.js.map +1 -1
- package/dist/hub/join/http.js +5 -3
- package/dist/hub/join/http.js.map +1 -1
- package/dist/hub/join/local.d.ts +37 -1
- package/dist/hub/join/local.js +142 -14
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/service.d.ts +19 -0
- package/dist/hub/join/service.js +46 -35
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/join/trust.d.ts +9 -0
- package/dist/hub/join/trust.js +35 -0
- package/dist/hub/join/trust.js.map +1 -1
- package/dist/hub/member/pairing-api.js +12 -1
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/room-ask.d.ts +137 -0
- package/dist/hub/member/room-ask.js +358 -0
- package/dist/hub/member/room-ask.js.map +1 -0
- package/dist/hub/member-journal.d.ts +18 -1
- package/dist/hub/member-journal.js +76 -3
- package/dist/hub/member-journal.js.map +1 -1
- package/dist/hub/member-origin.d.ts +177 -0
- package/dist/hub/member-origin.js +314 -0
- package/dist/hub/member-origin.js.map +1 -0
- package/dist/hub/pairing-notices.d.ts +1 -0
- package/dist/hub/pairing-notices.js +2 -1
- package/dist/hub/pairing-notices.js.map +1 -1
- package/dist/hub/pairing.d.ts +11 -0
- package/dist/hub/pairing.js +69 -21
- 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 +172 -0
- package/dist/hub/protocol.js +25 -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/clock.d.ts +18 -0
- package/dist/hub/roles/clock.js +58 -0
- package/dist/hub/roles/clock.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-marker.d.ts +57 -0
- package/dist/hub/roles/cutover-marker.js +26 -0
- package/dist/hub/roles/cutover-marker.js.map +1 -0
- package/dist/hub/roles/cutover.d.ts +32 -0
- package/dist/hub/roles/cutover.js +170 -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 +33 -0
- package/dist/hub/roles/read.js +55 -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/admin.d.ts +45 -0
- package/dist/hub/rooms/admin.js +105 -0
- package/dist/hub/rooms/admin.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +74 -0
- package/dist/hub/rooms/agents.js +333 -0
- package/dist/hub/rooms/agents.js.map +1 -0
- package/dist/hub/rooms/assistant.d.ts +44 -0
- package/dist/hub/rooms/assistant.js +179 -0
- package/dist/hub/rooms/assistant.js.map +1 -0
- package/dist/hub/rooms/context.d.ts +10 -0
- package/dist/hub/rooms/context.js +24 -0
- package/dist/hub/rooms/context.js.map +1 -0
- package/dist/hub/rooms/direct-view.d.ts +39 -0
- package/dist/hub/rooms/direct-view.js +38 -0
- package/dist/hub/rooms/direct-view.js.map +1 -0
- package/dist/hub/rooms/directory.d.ts +35 -0
- package/dist/hub/rooms/directory.js +98 -0
- package/dist/hub/rooms/directory.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +11 -0
- package/dist/hub/rooms/schema.js +73 -0
- package/dist/hub/rooms/schema.js.map +1 -0
- package/dist/hub/rooms/service.d.ts +449 -0
- package/dist/hub/rooms/service.js +581 -0
- package/dist/hub/rooms/service.js.map +1 -0
- package/dist/hub/rooms/types.d.ts +79 -0
- package/dist/hub/rooms/types.js +2 -0
- package/dist/hub/rooms/types.js.map +1 -0
- package/dist/hub/rooms.d.ts +15 -1
- package/dist/hub/rooms.js +76 -31
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +8 -0
- package/dist/hub/runtime.js +57 -3
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +28 -0
- package/dist/hub/server.js +66 -6
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +6 -2
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-commit.d.ts +6 -1
- package/dist/hub/settings-commit.js +15 -0
- package/dist/hub/settings-commit.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.d.ts +5 -0
- package/dist/hub/settings-directory-recovery.js +14 -4
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/settings-member-address-control.d.ts +84 -0
- package/dist/hub/settings-member-address-control.js +150 -0
- package/dist/hub/settings-member-address-control.js.map +1 -0
- package/dist/hub/settings-member-address-decision.d.ts +229 -0
- package/dist/hub/settings-member-address-decision.js +318 -0
- package/dist/hub/settings-member-address-decision.js.map +1 -0
- package/dist/hub/settings-member-address-http.d.ts +9 -0
- package/dist/hub/settings-member-address-http.js +78 -0
- package/dist/hub/settings-member-address-http.js.map +1 -0
- package/dist/hub/settings-member-address-network.d.ts +2 -0
- package/dist/hub/settings-member-address-network.js +22 -0
- package/dist/hub/settings-member-address-network.js.map +1 -0
- package/dist/hub/settings-member-address-notices.d.ts +22 -0
- package/dist/hub/settings-member-address-notices.js +21 -0
- package/dist/hub/settings-member-address-notices.js.map +1 -0
- package/dist/hub/settings-member-address-policy.d.ts +21 -0
- package/dist/hub/settings-member-address-policy.js +34 -0
- package/dist/hub/settings-member-address-policy.js.map +1 -0
- package/dist/hub/settings-member-address.d.ts +64 -0
- package/dist/hub/settings-member-address.js +239 -0
- package/dist/hub/settings-member-address.js.map +1 -0
- 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/socket.d.ts +2 -0
- package/dist/hub/socket.js +2 -0
- package/dist/hub/socket.js.map +1 -1
- package/dist/hub/store.js +6 -2
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/teams/types.d.ts +41 -0
- package/dist/hub/teams/types.js +2 -0
- package/dist/hub/teams/types.js.map +1 -0
- package/dist/hub/tls.d.ts +47 -0
- package/dist/hub/tls.js +23 -6
- package/dist/hub/tls.js.map +1 -1
- package/dist/hub/types.d.ts +68 -4
- package/dist/hub/validation.d.ts +1 -1
- package/dist/hub/validation.js +2 -2
- package/dist/hub/validation.js.map +1 -1
- package/dist/hub/web-origin.d.ts +93 -0
- package/dist/hub/web-origin.js +174 -0
- package/dist/hub/web-origin.js.map +1 -0
- package/dist/hub-pilot-trust-settings.d.ts +4 -0
- package/dist/hub-pilot-trust-settings.js +13 -0
- package/dist/hub-pilot-trust-settings.js.map +1 -0
- package/dist/human-delivery-receipts.d.ts +4 -2
- package/dist/human-delivery-receipts.js +20 -13
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/inbound-presentation.d.ts +28 -0
- package/dist/inbound-presentation.js +48 -0
- package/dist/inbound-presentation.js.map +1 -0
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +33 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +10 -2
- package/dist/instructions.js +32 -7
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +20 -6
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +3 -0
- package/dist/log-service.js +39 -22
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps.d.ts +56 -1
- package/dist/log-steps.js +318 -56
- package/dist/log-steps.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/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/needs-you-hub.js +6 -2
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +5 -1
- package/dist/needs-you.js +4 -8
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +1 -0
- package/dist/outbound-handlers.js +25 -19
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +19 -0
- package/dist/outbound-schemas.js +23 -4
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/profile-signins.d.ts +5 -0
- package/dist/profile-signins.js +1 -0
- package/dist/profile-signins.js.map +1 -1
- package/dist/queued-handoffs.d.ts +3 -1
- package/dist/queued-handoffs.js +1 -1
- package/dist/queued-handoffs.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-transcript-source.d.ts +2 -0
- package/dist/runtime-transcript-source.js +23 -1
- package/dist/runtime-transcript-source.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 +1 -0
- package/dist/settings-api.js +15 -8
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +3 -0
- package/dist/settings-baseline.js +2 -2
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-effect.d.ts +3 -0
- package/dist/settings-effect.js +12 -2
- 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-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/topic-commands.js +2 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-jsonl.d.ts +24 -0
- package/dist/transcript-jsonl.js +72 -22
- package/dist/transcript-jsonl.js.map +1 -1
- package/dist/transcript-monitor.d.ts +5 -1
- package/dist/transcript-monitor.js +65 -3
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-needles.d.ts +1 -1
- package/dist/transcript-needles.js +1 -1
- package/dist/transcript-records.d.ts +2 -1
- package/dist/transcript-records.js.map +1 -1
- package/dist/transcript-sources.d.ts +4 -0
- package/dist/transcript-sources.js +2 -0
- package/dist/transcript-sources.js.map +1 -1
- package/dist/ui/accounts-keepalive.js +15 -6
- package/dist/ui/accounts-manage.js +25 -5
- package/dist/ui/accounts-view.js +28 -24
- package/dist/ui/agent-details-settings.js +10 -1
- package/dist/ui/agent-proposals.js +22 -2
- package/dist/ui/agent-runtime-settings.js +3 -3
- package/dist/ui/backend-signin.js +4 -4
- package/dist/ui/chat-activity.js +2 -2
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +32 -19
- package/dist/ui/fleet-canvas.js +5 -2
- package/dist/ui/fleet-office-card.js +4 -2
- package/dist/ui/fleet-org.js +2 -0
- package/dist/ui/hub-admin-rooms-strings.js +28 -0
- package/dist/ui/hub-admin-rooms.js +77 -0
- package/dist/ui/hub-assistant-admin-strings.js +26 -0
- package/dist/ui/hub-assistant-admin.js +85 -0
- package/dist/ui/hub-chat-store.js +8 -4
- package/dist/ui/hub-client.js +224 -33
- package/dist/ui/hub-enrolment-code.js +1 -1
- package/dist/ui/hub-grant-picker.js +100 -0
- package/dist/ui/hub-group-search.js +2 -2
- package/dist/ui/hub-invitations-strings.js +30 -0
- package/dist/ui/hub-invitations.js +108 -0
- package/dist/ui/hub-join-one-strings.js +4 -2
- package/dist/ui/hub-join-steps.js +5 -2
- package/dist/ui/hub-pairing-form-strings.js +48 -0
- package/dist/ui/hub-pilot-trust-strings.js +27 -0
- package/dist/ui/hub-pilot-trust.js +41 -0
- package/dist/ui/hub-room-composer.js +113 -0
- package/dist/ui/hub-room-favorites.js +90 -0
- package/dist/ui/hub-room-list.js +152 -0
- package/dist/ui/hub-room-members-strings.js +12 -0
- package/dist/ui/hub-room-members.js +104 -0
- package/dist/ui/hub-room-new-strings.js +46 -0
- package/dist/ui/hub-room-new.js +135 -0
- package/dist/ui/hub-room-presence.js +123 -0
- package/dist/ui/hub-room-settings-strings.js +26 -0
- package/dist/ui/hub-room-settings.js +134 -0
- package/dist/ui/hub-room-strings.js +222 -0
- package/dist/ui/hub-room-thread.js +262 -0
- package/dist/ui/hub-room-unread.js +51 -0
- package/dist/ui/hub-room-working.js +29 -0
- package/dist/ui/log-row.js +14 -5
- package/dist/ui/machine-signin.js +47 -14
- package/dist/ui/panel-details.js +6 -1
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-hub.js +145 -59
- package/dist/ui/panel-needs.js +2 -0
- package/dist/ui/panel-settings.js +2 -2
- package/dist/ui/settings-hub-company-join.js +32 -11
- package/dist/ui/settings-hub-connection.js +9 -3
- package/dist/ui/settings-hub-member-address.js +205 -0
- package/dist/ui/settings-hub-section.js +4 -0
- package/dist/ui/settings-hub-web-address.js +233 -0
- package/dist/ui/settings-hub.js +16 -4
- 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-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +3 -0
- package/dist/ui/shared/app-shell.js +4 -1
- package/dist/ui/shared/app.css +43 -5
- package/dist/ui/shared/chat-render.js +10 -0
- package/dist/ui/shared/chat-thread.js +14 -5
- package/dist/ui/shared/hub-chat.css +17 -0
- package/dist/ui/shared/hub-grant-picker.css +4 -0
- package/dist/ui/shared/hub-rooms-u2.css +42 -0
- package/dist/ui/shared/hub-sharing.css +4 -0
- package/dist/ui/shared/model-observation.js +16 -0
- package/dist/ui/shared/stale-tab.css +6 -0
- package/dist/ui/shared/stale-tab.js +50 -0
- package/dist/ui/shared/view-strings.js +2 -2
- package/dist/ui/structured-signin.js +19 -6
- 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 +4 -0
- package/dist/web-api.js +32 -13
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +4 -1
- package/dist/web-backend-login.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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AuthCheckResult } from "./login-flows.js";
|
|
2
|
+
/** True only when the CLI answered "signed out" for an empty scratch folder under the launch of an account. A probe that could not answer is asked once more; still no answer: not proven. */
|
|
3
|
+
export declare function proveFolderIsolation(backend: string, check: (launch: {
|
|
4
|
+
env: Record<string, string>;
|
|
5
|
+
args: string[];
|
|
6
|
+
}) => Promise<AuthCheckResult>, scratchRoot?: string): Promise<boolean>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AGEND-119: the proof that a CLI told its account by an argument really keeps each folder's sign-in in that folder. Antigravity keeps its sign-in in the system's keyring unless the registry's `pin` makes it use
|
|
3
|
+
* the account's file, and the keyring is one for every folder: a sign-in run where the pin does not hold REPLACES another account's login. So before a login command runs, the CLI is asked (`agy <folder argument> models`,
|
|
4
|
+
* with the pin) about a SCRATCH folder that is empty by construction: only "signed out" proves the pin holds. Never the account's own folder: one that already has a token file (a re-login) proves nothing about a
|
|
5
|
+
* CLI that has stopped honouring the pin since, and the folder is deleted when the probe is over.
|
|
6
|
+
*/
|
|
7
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
8
|
+
import { tmpdir } from "node:os";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { credentialProfileLaunchAt } from "./backend/credential-profile.js";
|
|
11
|
+
/** True only when the CLI answered "signed out" for an empty scratch folder under the launch of an account. A probe that could not answer is asked once more; still no answer: not proven. */
|
|
12
|
+
export async function proveFolderIsolation(backend, check, scratchRoot = tmpdir()) {
|
|
13
|
+
let scratch = null;
|
|
14
|
+
try {
|
|
15
|
+
scratch = mkdtempSync(join(scratchRoot, "agend-isolation-"));
|
|
16
|
+
const launch = credentialProfileLaunchAt(backend, scratch);
|
|
17
|
+
if (!launch)
|
|
18
|
+
return false;
|
|
19
|
+
let answer = await check(launch);
|
|
20
|
+
if (answer === "unknown")
|
|
21
|
+
answer = await check(launch);
|
|
22
|
+
return answer === "invalid";
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
if (scratch) {
|
|
29
|
+
// The CLI's background updater can write into its folder a moment after the probe has answered (measured: an `updater` folder appeared after the first removal), so it is removed again shortly after.
|
|
30
|
+
const remove = () => { try {
|
|
31
|
+
rmSync(scratch, { recursive: true, force: true });
|
|
32
|
+
}
|
|
33
|
+
catch { /* a temp folder */ } };
|
|
34
|
+
remove();
|
|
35
|
+
const again = setTimeout(remove, 3_000);
|
|
36
|
+
again.unref?.();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=account-isolation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-isolation.js","sourceRoot":"","sources":["../src/account-isolation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAG5E,8LAA8L;AAC9L,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAe,EACf,KAA4F,EAC5F,WAAW,GAAW,MAAM,EAAE;IAE9B,IAAI,OAAO,GAAkB,IAAI,CAAC;IAClC,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAC1B,IAAI,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,MAAM,KAAK,SAAS;YAAE,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;QACvD,OAAO,MAAM,KAAK,SAAS,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,KAAK,CAAC;IAAC,CAAC;YACjB,CAAC;QACP,IAAI,OAAO,EAAE,CAAC;YACZ,uMAAuM;YACvM,MAAM,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC;gBAAC,MAAM,CAAC,OAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;YACnH,MAAM,EAAE,CAAC;YACT,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAC3D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { type ProfileFs } from "./accounts-profiles.js";
|
|
2
|
-
/** The CLIs that can sign out from the dashboard
|
|
2
|
+
/** The CLIs that can sign out from the dashboard with their own logout command (checked offline per CLI). cli-registry.ts: `host.signOut` with a `binary` and `args`. */
|
|
3
3
|
export declare const SIGN_OUT: Readonly<Record<string, {
|
|
4
4
|
binary: string;
|
|
5
5
|
args: readonly string[];
|
|
6
6
|
}>>;
|
|
7
|
+
/**
|
|
8
|
+
* AGEND-119: the CLIs that have no logout command and are signed out by AgEnD removing the account's sign-in file(s) from its folder (Antigravity: `antigravity-oauth-token`; the TUI's `/logout` is
|
|
9
|
+
* interactive only). cli-registry.ts: `host.signOut` with `remove`. What is removed is those names in the account's folder and nothing else: no folder, no conversation, no setting.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SIGN_OUT_REMOVES: Readonly<Record<string, readonly string[]>>;
|
|
7
12
|
/** Claude Code's unsuffixed Keychain item: the default sign-in's (macOS). */
|
|
8
13
|
export declare const CLAUDE_DEFAULT_KEYCHAIN_SERVICE = "Claude Code-credentials";
|
|
9
|
-
|
|
14
|
+
/** `still_signed_in` (AGEND-119): the sign-in file was removed and the CLI's own probe still says it is signed in — its sign-in is kept somewhere AgEnD does not remove (the system's keyring), and it is told so. */
|
|
15
|
+
export type SignOutRefusal = "unsupported" | "confirm" | "name" | "signing_in" | "missing" | "unsafe" | "default_home" | "failed" | "still_signed_in";
|
|
16
|
+
/** `unverified` (AGEND-119): the files were removed and the CLI's probe could not answer (a timeout, a missing binary), so signed out is not proven. */
|
|
10
17
|
export type SignOutResult = {
|
|
11
18
|
ok: true;
|
|
12
19
|
keychainLeft?: true;
|
|
20
|
+
unverified?: true;
|
|
13
21
|
} | {
|
|
14
22
|
ok: false;
|
|
15
23
|
error: SignOutRefusal;
|
|
@@ -36,6 +44,11 @@ export interface SignOutDeps {
|
|
|
36
44
|
stillOwner?(): boolean;
|
|
37
45
|
/** macOS: whether a Keychain item with this service name is reachable. */
|
|
38
46
|
keychainHas(service: string): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* AGEND-119: after the sign-in files of a CLI with no logout command are removed, the CLI's own status probe for this account (the default sign-in, or the named one with its launch). "invalid": signed
|
|
49
|
+
* out, as asked. "valid": still signed in (kept elsewhere). "unknown": it could not say. Absent: not asked (a test's stand-in), and then the answer is "unknown".
|
|
50
|
+
*/
|
|
51
|
+
verify?(backend: string, profile: string | null): Promise<"valid" | "invalid" | "unknown">;
|
|
39
52
|
platform: NodeJS.Platform;
|
|
40
53
|
env: NodeJS.ProcessEnv;
|
|
41
54
|
fs: ProfileFs;
|
package/dist/accounts-signout.js
CHANGED
|
@@ -17,13 +17,18 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { lstatSync, readdirSync, realpathSync, rmSync } from "node:fs";
|
|
19
19
|
import { join } from "node:path";
|
|
20
|
-
import { credentialProfileEnv, credentialProfileHome } from "./backend/credential-profile.js";
|
|
20
|
+
import { credentialHomeSpec, credentialProfileEnv, credentialProfileHome } from "./backend/credential-profile.js";
|
|
21
21
|
import { claudeConfigDirFor, claudeKeychainService } from "./backend/claude-code.js";
|
|
22
22
|
import { validCredentialProfileName } from "./runtime-credential-profiles.js";
|
|
23
23
|
import { ownProfileFolder, realFs } from "./accounts-profiles.js";
|
|
24
24
|
import { hostFacts, hostIds } from "./cli-registry.js";
|
|
25
|
-
/** The CLIs that can sign out from the dashboard
|
|
26
|
-
export const SIGN_OUT = Object.freeze(Object.fromEntries(hostIds("signOut").
|
|
25
|
+
/** The CLIs that can sign out from the dashboard with their own logout command (checked offline per CLI). cli-registry.ts: `host.signOut` with a `binary` and `args`. */
|
|
26
|
+
export const SIGN_OUT = Object.freeze(Object.fromEntries(hostIds("signOut").flatMap(id => { const facts = hostFacts(id, "signOut"); return "binary" in facts ? [[id, { binary: facts.binary, args: [...facts.args] }]] : []; })));
|
|
27
|
+
/**
|
|
28
|
+
* AGEND-119: the CLIs that have no logout command and are signed out by AgEnD removing the account's sign-in file(s) from its folder (Antigravity: `antigravity-oauth-token`; the TUI's `/logout` is
|
|
29
|
+
* interactive only). cli-registry.ts: `host.signOut` with `remove`. What is removed is those names in the account's folder and nothing else: no folder, no conversation, no setting.
|
|
30
|
+
*/
|
|
31
|
+
export const SIGN_OUT_REMOVES = Object.freeze(Object.fromEntries(hostIds("signOut").flatMap(id => { const facts = hostFacts(id, "signOut"); return "remove" in facts ? [[id, [...facts.remove]]] : []; })));
|
|
27
32
|
/** Claude Code's unsuffixed Keychain item: the default sign-in's (macOS). */
|
|
28
33
|
export const CLAUDE_DEFAULT_KEYCHAIN_SERVICE = "Claude Code-credentials";
|
|
29
34
|
/**
|
|
@@ -107,10 +112,28 @@ function dirIdentity(path) {
|
|
|
107
112
|
return null;
|
|
108
113
|
}
|
|
109
114
|
}
|
|
115
|
+
/** Removes the sign-in files of an account that has no logout command, only from its own folder: a regular file (or a link, which is only unlinked: what it points at is never touched), never a folder. */
|
|
116
|
+
function removeSignInFiles(folder, names) {
|
|
117
|
+
for (const name of names) {
|
|
118
|
+
const path = join(folder, name);
|
|
119
|
+
try {
|
|
120
|
+
const st = lstatSync(path);
|
|
121
|
+
if (!st.isFile() && !st.isSymbolicLink())
|
|
122
|
+
continue;
|
|
123
|
+
rmSync(path);
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
if (err.code !== "ENOENT")
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
110
132
|
export async function signOutAccount(dataDir, req, deps) {
|
|
111
133
|
const d = { platform: process.platform, env: process.env, fs: realFs(), ...deps };
|
|
134
|
+
const files = Object.hasOwn(SIGN_OUT_REMOVES, req.backend) ? SIGN_OUT_REMOVES[req.backend] : null;
|
|
112
135
|
const how = Object.hasOwn(SIGN_OUT, req.backend) ? SIGN_OUT[req.backend] : null;
|
|
113
|
-
if (!how)
|
|
136
|
+
if (!how && !files)
|
|
114
137
|
return { ok: false, error: "unsupported" };
|
|
115
138
|
if (req.confirm !== true)
|
|
116
139
|
return { ok: false, error: "confirm" };
|
|
@@ -126,6 +149,31 @@ export async function signOutAccount(dataDir, req, deps) {
|
|
|
126
149
|
}
|
|
127
150
|
if (req.signingIn)
|
|
128
151
|
return { ok: false, error: "signing_in" };
|
|
152
|
+
if (files) {
|
|
153
|
+
// No logout command: the account's sign-in file goes, from the account's own folder (the default's: the CLI's home) and nowhere else, then the CLI's own probe says whether it is signed out.
|
|
154
|
+
const folder = profile !== null ? credentialProfileHome(dataDir, req.backend, profile) : credentialHomeSpec(req.backend)?.sharedRoot() ?? null;
|
|
155
|
+
if (!folder)
|
|
156
|
+
return { ok: false, error: "failed" };
|
|
157
|
+
// The folder checked above is the one the files are removed from: its identity is compared again right before the first removal (not after: a folder swapped for a link to another
|
|
158
|
+
// account's would otherwise lose that account's token before anyone noticed).
|
|
159
|
+
if (profile !== null) {
|
|
160
|
+
const again = ownProfileFolder(dataDir, req.backend, profile, d.fs);
|
|
161
|
+
if (!again.ok || again.st.dev !== identity.dev || again.st.ino !== identity.ino)
|
|
162
|
+
return { ok: false, error: "unsafe" };
|
|
163
|
+
}
|
|
164
|
+
if (d.stillOwner && !d.stillOwner())
|
|
165
|
+
return { ok: false, error: "failed" };
|
|
166
|
+
if (!removeSignInFiles(folder, files))
|
|
167
|
+
return { ok: false, error: "failed" };
|
|
168
|
+
let state = "unknown";
|
|
169
|
+
try {
|
|
170
|
+
state = await d.verify?.(req.backend, profile) ?? "unknown";
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
state = "unknown";
|
|
174
|
+
}
|
|
175
|
+
return state === "valid" ? { ok: false, error: "still_signed_in" } : state === "invalid" ? { ok: true } : { ok: true, unverified: true };
|
|
176
|
+
}
|
|
129
177
|
const env = { ...d.env, ...(profile !== null ? credentialProfileEnv(dataDir, req.backend, profile) ?? {} : {}) };
|
|
130
178
|
const configDir = profile !== null ? credentialProfileHome(dataDir, "claude-code", profile) : claudeConfigDirFor(null);
|
|
131
179
|
// #3305 review P1 (default folder): the folder is the one seen before the logout — its real path and identity — and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts-signout.js","sourceRoot":"","sources":["../src/accounts-signout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts-signout.js","sourceRoot":"","sources":["../src/accounts-signout.ts"],"names":[],"mappings":"AAA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AC,GAAG,KAAK,IAAI,CAAC,GAAG;gBAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;YAC1H,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IACD,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,+BAA+B,CAAC;QACtG,IAAI,IAAI,GAAG,KAAK,CAAC;QACjB,IAAI,CAAC;YAAC,IAAI,GAAG,MAAM,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,IAAI,GAAG,KAAK,CAAC;QAAC,CAAC;QACpE,IAAI,IAAI;YAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
|
package/dist/accounts-view.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UsageWindowKind } from "./cli-capability.js";
|
|
1
2
|
import type { AccountIdentity } from "./claude-auth-status.js";
|
|
2
3
|
import { type CliUpdateView } from "./cli-audited.js";
|
|
3
4
|
import type { SignInTarget } from "./web-backend-login.js";
|
|
@@ -5,6 +6,10 @@ import type { SignInTarget } from "./web-backend-login.js";
|
|
|
5
6
|
export declare const ACCOUNT_CLIS: readonly ("antigravity" | "claude-code" | "codex" | "grok" | "kiro-cli" | "muse" | "opencode")[];
|
|
6
7
|
/** The CLIs that can have named credential profiles (src/backend/credential-profile.ts; cli-registry.ts: `host.namedAccounts`). */
|
|
7
8
|
export declare const PROFILE_CLIS: ReadonlySet<string>;
|
|
9
|
+
/**
|
|
10
|
+
* `namedAccounts` (AGEND-124): on a computer's row of a CLI that has named accounts there besides Claude Code (Antigravity), whether that computer's Runtime takes a new one (an older one, or a CLI that is
|
|
11
|
+
* missing or too old, does not): the "+ Add account" under that computer's name follows it. Absent on every other row, and on a Claude Code row (as before).
|
|
12
|
+
*/
|
|
8
13
|
export type AccountScope = {
|
|
9
14
|
kind: "host";
|
|
10
15
|
} | {
|
|
@@ -13,23 +18,75 @@ export type AccountScope = {
|
|
|
13
18
|
name: string;
|
|
14
19
|
online: boolean;
|
|
15
20
|
readOnlyReason?: string;
|
|
21
|
+
namedAccounts?: boolean;
|
|
16
22
|
};
|
|
17
23
|
/**
|
|
18
24
|
* Why a computer's row cannot be changed from the dashboard. The first five are about the whole computer (every row carries one of them); the last two are about
|
|
19
25
|
* one row. Codes, not sentences: the page words them in its own language, and shows the command to run on that computer.
|
|
20
26
|
*/
|
|
21
|
-
export declare const MACHINE_READ_ONLY_REASONS: readonly ["offline", "runtime_old", "accounts_off", "switch_unreadable", "not_installed", "not_created", "default_login"];
|
|
27
|
+
export declare const MACHINE_READ_ONLY_REASONS: readonly ["offline", "runtime_old", "accounts_off", "switch_unreadable", "not_installed", "not_created", "default_login", "cli_old", "cli_missing"];
|
|
22
28
|
export type MachineReadOnlyReason = typeof MACHINE_READ_ONLY_REASONS[number];
|
|
23
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The CLIs whose NAMED accounts a paired computer shows (and adds, signs out and removes): `runtime.accountRows` that also has `runtime.namedAccounts` (cli-registry.ts; Claude Code;
|
|
31
|
+
* Codex waits for #3212 PR 4).
|
|
32
|
+
*/
|
|
24
33
|
export declare const MACHINE_ACCOUNT_CLIS: ReadonlySet<string>;
|
|
25
|
-
|
|
34
|
+
/**
|
|
35
|
+
* AGEND-113: the CLIs whose DEFAULT login on a paired computer is signed in from the dashboard (cli-registry.ts: `runtime.accountRows.defaultRow === "sign-in"`). Antigravity keeps its Windows
|
|
36
|
+
* login in the Credential Manager under one fixed name, so there is one per Windows user and no named profiles (no + Add account, no Sign out, no Remove): the card has one row per
|
|
37
|
+
* computer, and signing it in changes that computer's own login.
|
|
38
|
+
*/
|
|
39
|
+
export declare const MACHINE_DEFAULT_LOGIN_CLIS: ReadonlySet<string>;
|
|
40
|
+
/**
|
|
41
|
+
* AGEND-113: the quota pool a group of windows belongs to, when a provider has several (Antigravity: "Gemini", "Claude & others", "Gemini 4 Argon", each with limits of its own). `labelI18n` is the usage
|
|
42
|
+
* panel's own reference (its words are the panel's, in both languages); `label` is the fallback. Only the shape and bounds below are passed on: whatever else a vendor's text carries is dropped.
|
|
43
|
+
*/
|
|
44
|
+
export interface AccountUsagePool {
|
|
45
|
+
label: string;
|
|
46
|
+
labelI18n?: {
|
|
47
|
+
key: string;
|
|
48
|
+
args?: string[];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One window of an account's usage as the usage panel reports it: its kind (cli-capability.ts `UsageWindowKind`: the 5h is `session`; `unwindowed` is one number with no window of its own), the
|
|
53
|
+
* percent used and, when the CLI says so, the window's length and when it resets. `resetPassed`: it has reset since the numbers were read, so its percent is the old window's and is not shown as current.
|
|
54
|
+
*/
|
|
55
|
+
export interface AccountUsageWindow {
|
|
56
|
+
kind: UsageWindowKind;
|
|
26
57
|
percent: number;
|
|
27
|
-
resetsAt?: string;
|
|
28
58
|
windowMs?: number;
|
|
29
|
-
|
|
59
|
+
resetsAt?: string;
|
|
60
|
+
resetPassed?: true;
|
|
61
|
+
}
|
|
62
|
+
/** The windows of one pool, in the usage panel's own order; a provider with one set of limits has one group and no `pool`. */
|
|
63
|
+
export interface AccountUsageGroup {
|
|
64
|
+
pool?: AccountUsagePool;
|
|
65
|
+
windows: AccountUsageWindow[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Why the numbers are the last known ones (AGEND-119): the usage panel's own `staleCause` (an expiry, a transient failure, another error), when they were read, and what the read said
|
|
69
|
+
* (`hint`, with its reference into the panel's words). Only those four are passed on; no token, path or output of a CLI is in it.
|
|
70
|
+
*/
|
|
71
|
+
export interface AccountUsageStale {
|
|
72
|
+
cause: "expired" | "transient" | "error";
|
|
73
|
+
cachedAt: string;
|
|
74
|
+
hint?: string;
|
|
75
|
+
hintI18n?: {
|
|
76
|
+
key: string;
|
|
77
|
+
args?: string[];
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** Everything an account reports about its limits: every pool and every window, none picked over another. `stale`: the last known numbers, the live read failed (`staleInfo`: why, and when they were read). */
|
|
81
|
+
export interface AccountUsage {
|
|
82
|
+
groups: AccountUsageGroup[];
|
|
83
|
+
stale?: true;
|
|
84
|
+
staleInfo?: AccountUsageStale;
|
|
30
85
|
}
|
|
31
86
|
export interface AccountRow {
|
|
32
87
|
scope: AccountScope;
|
|
88
|
+
/** AGEND-124: the computer's OWN login row of a CLI whose Runtime signs it out (Antigravity): the Sign out button is offered on it (never on Claude Code's, #3212 Q3). Only on such a row. */
|
|
89
|
+
signOutOwn?: true;
|
|
33
90
|
backend: string;
|
|
34
91
|
/** null: the CLI's default sign-in. */
|
|
35
92
|
profile: string | null;
|
|
@@ -49,10 +106,15 @@ export interface AccountRow {
|
|
|
49
106
|
classic: string[];
|
|
50
107
|
fleetDefault: boolean;
|
|
51
108
|
};
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Every pool and every window the account reports (see `accountUsage`), as the page draws them: it is the page's to lay out, not the server's to pick from. A page that predates this field
|
|
111
|
+
* ignores it (it used to be two fixed windows, `usage` and `shortUsage`, which hid every pool but one).
|
|
112
|
+
*/
|
|
113
|
+
usageGroups?: AccountUsageGroup[];
|
|
114
|
+
/** The numbers are the last known ones (the live read failed). */
|
|
115
|
+
usageStale?: true;
|
|
116
|
+
/** AGEND-119: why they are, and when they were read (the usage panel's `staleCause`/`cachedAt`/`hint`); absent from an older server's row, whose page then says only that they are old. */
|
|
117
|
+
usageStaleInfo?: AccountUsageStale;
|
|
56
118
|
/** #3292: "Keep sign-in alive" (Claude Code and Codex host rows): the setting, its last run, the dates the sign-in's file says. */
|
|
57
119
|
keepAlive?: AccountKeepAlive;
|
|
58
120
|
/** M-2825: not signed in because the sign-in is over (its file says so): the badge says to reconnect. */
|
|
@@ -71,8 +133,10 @@ export interface CliUpdateInfo extends CliUpdateView {
|
|
|
71
133
|
via: "dashboard" | "self";
|
|
72
134
|
}
|
|
73
135
|
export interface AccountsCli {
|
|
136
|
+
/** `profiles`: this host can have named accounts of the CLI (+ Add account on the card); `machineProfiles` (AGEND-119): a paired computer can too (+ Add account under its name) — a CLI whose named accounts exist only on the host has `profiles` and not this. */
|
|
74
137
|
backend: string;
|
|
75
138
|
profiles: boolean;
|
|
139
|
+
machineProfiles?: boolean;
|
|
76
140
|
installed: boolean;
|
|
77
141
|
/** AGEND-133: a CLI with no account card of its own (OpenCode) is listed only to be installed (or while its install is shown); it has no sign-in rows. */
|
|
78
142
|
installOnly?: boolean;
|
|
@@ -91,6 +155,13 @@ export interface AccountsCli {
|
|
|
91
155
|
export interface AccountsView {
|
|
92
156
|
clis: AccountsCli[];
|
|
93
157
|
}
|
|
158
|
+
/** AGEND-113: a computer's own login of a CLI without profiles (see `MachineAccountsInput.defaultLogins`). */
|
|
159
|
+
export interface MachineDefaultLogin {
|
|
160
|
+
loggedIn: boolean | null;
|
|
161
|
+
readOnlyReason?: Exclude<MachineReadOnlyReason, "not_created" | "default_login">;
|
|
162
|
+
agents: string[]; /** The Runtime also signs it out and manages named accounts of the CLI (its `accounts-<id>` capability, AGEND-124). */
|
|
163
|
+
accounts?: true;
|
|
164
|
+
}
|
|
94
165
|
/** One paired computer's accounts for the view, as its Runtime reported them (names, signed in or not, a masked identity) and what its owner allows. */
|
|
95
166
|
export interface MachineAccountsInput {
|
|
96
167
|
id: string;
|
|
@@ -105,6 +176,18 @@ export interface MachineAccountsInput {
|
|
|
105
176
|
identity?: AccountIdentity;
|
|
106
177
|
created?: boolean;
|
|
107
178
|
}>;
|
|
179
|
+
/** AGEND-124: the named accounts of the CLIs other than Claude Code (Antigravity), by CLI id, the agents that run there on each CLI, and the reason (if any) that CLI's named accounts cannot be changed from the dashboard. */
|
|
180
|
+
profilesByCli?: Readonly<Record<string, ReadonlyArray<{
|
|
181
|
+
name: string;
|
|
182
|
+
loggedIn: boolean | null;
|
|
183
|
+
identity?: AccountIdentity;
|
|
184
|
+
created?: boolean;
|
|
185
|
+
}>>>;
|
|
186
|
+
agentsByCli?: Readonly<Record<string, ReadonlyArray<{
|
|
187
|
+
name: string;
|
|
188
|
+
profile: string | null;
|
|
189
|
+
}>>>;
|
|
190
|
+
cliReasons?: Readonly<Record<string, Exclude<MachineReadOnlyReason, "not_created" | "default_login">>>;
|
|
108
191
|
/** The pairing's default profile, when one is set; else agents without a profile use the Windows user's own sign-in. */
|
|
109
192
|
defaultProfile?: string;
|
|
110
193
|
/** The Windows user's own Claude Code sign-in on that computer (`claude auth status`), as the Runtime reported it with its CLIs. */
|
|
@@ -112,6 +195,11 @@ export interface MachineAccountsInput {
|
|
|
112
195
|
loggedIn: boolean | null;
|
|
113
196
|
identity?: AccountIdentity;
|
|
114
197
|
};
|
|
198
|
+
/**
|
|
199
|
+
* AGEND-113: a computer's own login of a CLI that has no profiles (Antigravity), when the computer has that CLI (or an agent there uses it). `readOnlyReason`: why it cannot be signed in from the
|
|
200
|
+
* dashboard (the whole-computer reasons, an older Runtime that cannot do it, or a CLI too old for `acp --login`); absent means it can. No identity: nothing is shown about which account it is.
|
|
201
|
+
*/
|
|
202
|
+
defaultLogins?: Partial<Record<string, MachineDefaultLogin>>;
|
|
115
203
|
/** Agents that run on this computer, and the profile each names (null: none, so the computer's default). */
|
|
116
204
|
agents: ReadonlyArray<{
|
|
117
205
|
name: string;
|
|
@@ -144,10 +232,8 @@ export interface AccountsInput {
|
|
|
144
232
|
}>;
|
|
145
233
|
/** The fleet default's profile per backend (defaults.backend_options.<backend>.credential_profile). */
|
|
146
234
|
fleetDefaults: ReadonlyMap<string, string>;
|
|
147
|
-
/**
|
|
235
|
+
/** Each row's usage, by `backend\0profile` ("" for the default). */
|
|
148
236
|
usage?: ReadonlyMap<string, AccountUsage>;
|
|
149
|
-
/** #3212: the short window's usage per row, by the same `backend\0profile` key. */
|
|
150
|
-
shortUsage?: ReadonlyMap<string, AccountUsage>;
|
|
151
237
|
/** #3190 Part 3c: paired computers' accounts, as rows under their own scope. Absent: no computer. */
|
|
152
238
|
machines?: readonly MachineAccountsInput[];
|
|
153
239
|
/**
|
|
@@ -167,23 +253,24 @@ export declare function buildAccountsView(input: AccountsInput): AccountsView;
|
|
|
167
253
|
* profile name. Anything else there is ignored. Never throws.
|
|
168
254
|
*/
|
|
169
255
|
export declare function profilesOnDisk(dataDir: string, backend: string): string[];
|
|
256
|
+
/** A usage metric's window kind (cli-capability.ts `UsageWindowKind`): by its length when the CLI gives one, else by the period the CLI names; a number with neither is `unwindowed`. */
|
|
257
|
+
export declare function usageWindowKind(m: Record<string, unknown>): UsageWindowKind;
|
|
170
258
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
*
|
|
180
|
-
* there are several — as the usage panel's compact line picks it (`compactSlots`). Never a per-model quota, and never a
|
|
181
|
-
* window that has reset since the read (its percent would be the old window's): one already marked `resetPassed`, and one whose
|
|
182
|
-
* `resetsAt` is not ahead of `now`. The usage snapshot is served unchanged inside its TTL and while it is revalidated, so a
|
|
183
|
-
* window read just before it reset must not be projected after it. An expiry (`resetKind: "expiry"`) is not a reset and a
|
|
184
|
-
* time that cannot be read says nothing, as `ageMetric` (usage-api.ts) has it. Same shape as `weeklyUsage`.
|
|
259
|
+
* An account's limits for its row: EVERY pool and EVERY window a usage payload (ProviderUsage) reports for it, in the order the usage panel's full card draws them (the payload's own order),
|
|
260
|
+
* grouped by pool. Nothing is picked: a row that showed one window per kind hid Gemini's week behind Claude's and the other way round, and a pool is counted on its own.
|
|
261
|
+
* - The windows are the percent metrics with a number, never a per-model quota (`scope: "model"`) and never a count or an amount (the full card has those lines; a row draws meters).
|
|
262
|
+
* - A pool is named only for a CLI whose spec says it has several (cli-registry.ts `host.usage.pools`); for any other the payload's pool tags are ignored, so a vendor adding one to another
|
|
263
|
+
* CLI's payload changes nothing until its spec says so. A window that has no pool in such a payload sits in a group of its own with no name.
|
|
264
|
+
* - A window that has reset since the read (marked `resetPassed`, or its reset time is behind `now`: a snapshot is served unchanged inside its TTL) is kept, flagged, with no number to trust: the pool
|
|
265
|
+
* and the window are still there.
|
|
266
|
+
* - `kind` is `usageWindowKind`: what cli-capability.ts calls the kinds of window, which `host.usage.windows` lists for the CLI. tests/cli-registry-usage-shape.test.ts holds real payloads to it.
|
|
267
|
+
* The percent is rounded and kept within 0–100. Undefined when the payload has no such window.
|
|
185
268
|
*/
|
|
186
|
-
export declare function
|
|
269
|
+
export declare function accountUsage(backend: string, provider: {
|
|
187
270
|
metrics?: ReadonlyArray<Record<string, unknown>>;
|
|
188
271
|
stale?: boolean;
|
|
272
|
+
staleCause?: unknown;
|
|
273
|
+
cachedAt?: unknown;
|
|
274
|
+
hint?: unknown;
|
|
275
|
+
hintI18n?: unknown;
|
|
189
276
|
} | undefined, now?: number): AccountUsage | undefined;
|