@songsid/agend 2.4.0-alpha.2 → 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/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 +2 -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 +4 -0
- 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/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-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 +9 -9
- 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/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.js +2 -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 +20 -1
- package/dist/fleet-manager.js +158 -54
- 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 +23 -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/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 +106 -33
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +6 -0
- package/dist/hub/client.js +4 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.js +15 -0
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +6 -0
- package/dist/hub/compose/server.js +9 -3
- 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 +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-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/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/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 +18 -3
- package/dist/hub/group-policy/store.js +94 -80
- 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 +39 -11
- 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/join/local.d.ts +5 -0
- package/dist/hub/join/local.js +28 -5
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/service.d.ts +2 -0
- package/dist/hub/join/service.js +34 -35
- package/dist/hub/join/service.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/pairing.d.ts +3 -0
- 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 +13 -0
- package/dist/hub/protocol.js +7 -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 +3 -1
- 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 +17 -1
- 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/human-delivery-receipts.js +2 -2
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +32 -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 +6 -6
- package/dist/locale.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/outbound-handlers.js +19 -19
- 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 +5 -0
- package/dist/profile-signins.js +1 -0
- 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/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/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-proposals.js +22 -2
- package/dist/ui/agent-runtime-settings.js +3 -3
- package/dist/ui/backend-signin.js +4 -4
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +32 -19
- package/dist/ui/hub-chat-store.js +8 -4
- package/dist/ui/hub-client.js +54 -19
- 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-join-one-strings.js +2 -2
- package/dist/ui/hub-join-steps.js +5 -2
- package/dist/ui/machine-signin.js +47 -14
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-hub.js +55 -11
- package/dist/ui/panel-settings.js +2 -2
- package/dist/ui/settings-hub-company-join.js +1 -0
- package/dist/ui/settings-hub-section.js +2 -0
- package/dist/ui/settings-hub-web-address.js +233 -0
- package/dist/ui/settings-hub.js +6 -0
- 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.css +38 -5
- package/dist/ui/shared/hub-grant-picker.css +4 -0
- package/dist/ui/shared/hub-sharing.css +4 -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 +2 -0
- package/dist/web-api.js +27 -12
- 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
package/dist/decision-list.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* #2152: what `list_decisions` answers. The fleet's decisions are long (82 of them were 126 KB, ≈31k–42k tokens in one
|
|
3
3
|
* call) and every instance lists them after a restart, so by default it answers titles — id, title, scope, date, tags —
|
|
4
|
-
* and
|
|
4
|
+
* and full text is asked for with `detail:true` (one id or all records). One function for both entry
|
|
5
5
|
* paths (the MCP tool through the daemon, and the agent endpoint's `decision-*` ops).
|
|
6
6
|
*/
|
|
7
|
+
import { type ListOptions } from "./agent-list-output.js";
|
|
7
8
|
import type { Decision } from "./scheduler/types.js";
|
|
8
9
|
export interface DecisionTitle {
|
|
9
10
|
id: string;
|
|
@@ -16,12 +17,12 @@ export interface DecisionTitle {
|
|
|
16
17
|
tags?: string[];
|
|
17
18
|
status?: Decision["status"];
|
|
18
19
|
}
|
|
19
|
-
export declare const DECISION_TITLES_HINT = "Titles only.
|
|
20
|
+
export declare const DECISION_TITLES_HINT = "Titles only. Follow next_cursor with the same filters for all pages. Use { id, detail: true } for the full rule; detail: true lists all full records (legacy full: true also works).";
|
|
20
21
|
/**
|
|
21
|
-
* The answer: `{ decision }` for an id,
|
|
22
|
+
* The answer: compact `{ decision }` for an id, full records for detail/full, else paged titles. `all` is the list as the store
|
|
22
23
|
* returns it (already filtered by scope, archive and tags).
|
|
23
24
|
*/
|
|
24
|
-
export declare function decisionListAnswer(all: readonly Decision[], opts?: {
|
|
25
|
+
export declare function decisionListAnswer(all: readonly Decision[], opts?: ListOptions & {
|
|
25
26
|
id?: unknown;
|
|
26
27
|
full?: unknown;
|
|
27
28
|
}): unknown;
|
package/dist/decision-list.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* #2152: what `list_decisions` answers. The fleet's decisions are long (82 of them were 126 KB, ≈31k–42k tokens in one
|
|
3
|
+
* call) and every instance lists them after a restart, so by default it answers titles — id, title, scope, date, tags —
|
|
4
|
+
* and full text is asked for with `detail:true` (one id or all records). One function for both entry
|
|
5
|
+
* paths (the MCP tool through the daemon, and the agent endpoint's `decision-*` ops).
|
|
6
|
+
*/
|
|
7
|
+
import { listOptions, pageRows } from "./agent-list-output.js";
|
|
8
|
+
export const DECISION_TITLES_HINT = "Titles only. Follow next_cursor with the same filters for all pages. Use { id, detail: true } for the full rule; detail: true lists all full records (legacy full: true also works).";
|
|
2
9
|
/** One decision by id (exact, or a unique prefix of at least 6 characters); null when none or more than one match. */
|
|
3
10
|
function byId(all, id) {
|
|
4
11
|
const exact = all.find(d => d.id === id);
|
|
@@ -10,21 +17,28 @@ function byId(all, id) {
|
|
|
10
17
|
return hits.length === 1 ? hits[0] : null;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
|
-
* The answer: `{ decision }` for an id,
|
|
20
|
+
* The answer: compact `{ decision }` for an id, full records for detail/full, else paged titles. `all` is the list as the store
|
|
14
21
|
* returns it (already filtered by scope, archive and tags).
|
|
15
22
|
*/
|
|
16
23
|
export function decisionListAnswer(all, opts = {}) {
|
|
24
|
+
listOptions(opts);
|
|
17
25
|
if (typeof opts.id === "string" && opts.id.trim()) {
|
|
26
|
+
if (opts.limit !== undefined || opts.cursor !== undefined)
|
|
27
|
+
throw new Error("A single decision does not take limit or cursor");
|
|
18
28
|
const d = byId(all, opts.id.trim());
|
|
19
|
-
return d ? { decision: d } : { error: `No decision '${opts.id.trim()}' among these (an id, or a unique prefix of 6 or more characters).` };
|
|
29
|
+
return d ? { decision: opts.detail === true || opts.full === true ? d : title(d) } : { error: `No decision '${opts.id.trim()}' among these (an id, or a unique prefix of 6 or more characters).` };
|
|
20
30
|
}
|
|
21
|
-
if (opts.full === true)
|
|
31
|
+
if (opts.full === true || opts.detail === true)
|
|
22
32
|
return all;
|
|
23
|
-
const
|
|
24
|
-
|
|
33
|
+
const { rows, ...more } = pageRows(all, opts);
|
|
34
|
+
return { decisions: rows.map(title), ...more, hint: DECISION_TITLES_HINT };
|
|
35
|
+
}
|
|
36
|
+
function title(d) {
|
|
37
|
+
return {
|
|
38
|
+
id: d.id, title: d.title, scope: d.scope, ...(d.team ? { team: d.team } : {}),
|
|
39
|
+
date: (d.updated_at || d.created_at || "").slice(0, 10),
|
|
25
40
|
...(d.tags?.length ? { tags: d.tags } : {}),
|
|
26
41
|
...(d.status && d.status !== "active" ? { status: d.status } : {}),
|
|
27
|
-
}
|
|
28
|
-
return { decisions: titles, hint: DECISION_TITLES_HINT };
|
|
42
|
+
};
|
|
29
43
|
}
|
|
30
44
|
//# sourceMappingURL=decision-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-list.js","sourceRoot":"","sources":["../src/decision-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decision-list.js","sourceRoot":"","sources":["../src/decision-list.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAoB,MAAM,wBAAwB,CAAC;AAejF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sLAAsL,CAAC;AAE3N,sHAAsH;AACtH,SAAS,IAAI,CAAC,GAAwB,EAAE,EAAU;IAChD,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACzC,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IACxB,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/B,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAClD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAwB,EAAE,IAAI,GAAmD,EAAE;IACpH,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAClD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC9H,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QACpC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,oEAAoE,EAAE,CAAC;IACrM,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,GAAG,CAAC;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9C,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;AAC7E,CAAC;AACD,SAAS,KAAK,CAAC,CAAW;IACxB,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;QACvD,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnE,CAAC;AACJ,CAAC"}
|
package/dist/fleet-manager.d.ts
CHANGED
|
@@ -4612,6 +4612,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4612
4612
|
private withSignInIdentitySlot;
|
|
4613
4613
|
/** One `claude auth status` for a sign-in (the default one, or a credential profile's folder). */
|
|
4614
4614
|
private readSignInIdentity;
|
|
4615
|
+
/**
|
|
4616
|
+
* 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
|
|
4617
|
+
* 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.
|
|
4618
|
+
*/
|
|
4619
|
+
private identityTargets;
|
|
4615
4620
|
/**
|
|
4616
4621
|
* 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
|
|
4617
4622
|
* not read in the last five minutes. It never waits and never blocks a request: the list shows what is already known, and the pages are told to
|
|
@@ -4625,6 +4630,11 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4625
4630
|
* usage is the usage panel's cached read (never forced), given at most `usageWaitMs` before the view is sent without it.
|
|
4626
4631
|
*/
|
|
4627
4632
|
accountsView(usageWaitMs?: number): Promise<AccountsView>;
|
|
4633
|
+
/**
|
|
4634
|
+
* 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
|
|
4635
|
+
* 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.
|
|
4636
|
+
*/
|
|
4637
|
+
private usageAfterSignIn;
|
|
4628
4638
|
/**
|
|
4629
4639
|
* 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
|
|
4630
4640
|
* "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.
|
|
@@ -4711,7 +4721,9 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4711
4721
|
* log records who signed out which backend's account; then every page reads the sign-ins again.
|
|
4712
4722
|
*/
|
|
4713
4723
|
/** How a CLI's logout is run and the Keychain asked (a test's stand-in; the platform with it). */
|
|
4714
|
-
accountSignOutDeps: Pick<import("./accounts-signout.js").SignOutDeps, "keychainHas" | "platform" | "run"
|
|
4724
|
+
accountSignOutDeps: Pick<import("./accounts-signout.js").SignOutDeps, "keychainHas" | "platform" | "run"> & {
|
|
4725
|
+
verify?: import("./accounts-signout.js").SignOutDeps["verify"];
|
|
4726
|
+
};
|
|
4715
4727
|
/** #3305 review: every account logout's whole life — its CLI children until positively gone (shutdown drains them). */
|
|
4716
4728
|
private readonly accountWriters;
|
|
4717
4729
|
/**
|
|
@@ -4725,6 +4737,13 @@ export declare class FleetManager implements FleetContext, LifecycleContext, Arc
|
|
|
4725
4737
|
signOutAccount(backend: string, profile: unknown, confirm: unknown, by: string, machine?: MachineActor): Promise<SignOutResult | MachineAccountResult>;
|
|
4726
4738
|
/** M-2825: a host Claude sign-in whose own file says it is over (credential-profile.ts claudeStoreEnded); false for other CLIs. */
|
|
4727
4739
|
private claudeSignInEnded;
|
|
4740
|
+
/** 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`). */
|
|
4741
|
+
private signInFromDashboard;
|
|
4742
|
+
/**
|
|
4743
|
+
* 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
|
|
4744
|
+
* 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.
|
|
4745
|
+
*/
|
|
4746
|
+
private profileSignInSupported;
|
|
4728
4747
|
backendSignInTargets(): SignInTarget[];
|
|
4729
4748
|
/** #2233: the session with this handle is live, admin, local and of the current dashboard token. */
|
|
4730
4749
|
private isLocalAdminSession;
|
package/dist/fleet-manager.js
CHANGED
|
@@ -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";
|
|
@@ -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,8 +295,8 @@ 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 {
|
|
298
|
+
import { ONBOARDING_BACKENDS, ONBOARDING_BROWSER_BACKENDS, readPendingBackendSignIns } from "./backend-signin-pending.js";
|
|
299
|
+
import { hostFacts, runtimeAccountsCapability, runtimeFacts } from "./cli-registry.js";
|
|
297
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";
|
|
@@ -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";
|
|
@@ -1065,13 +1069,17 @@ export class FleetManager {
|
|
|
1065
1069
|
throw new Error("This runtime CLI cannot enforce read-only execution");
|
|
1066
1070
|
if (credentialProfile !== undefined) {
|
|
1067
1071
|
// Fail closed at selection time, not at the first message: an old Runtime would ignore the name and run another account.
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
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.";
|
|
1071
1079
|
if (!row)
|
|
1072
|
-
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}`);
|
|
1073
1081
|
if (row.loggedIn === false)
|
|
1074
|
-
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."}`);
|
|
1075
1083
|
}
|
|
1076
1084
|
},
|
|
1077
1085
|
emit: (event, data) => {
|
|
@@ -15284,7 +15292,7 @@ export class FleetManager {
|
|
|
15284
15292
|
includeArchived: payload.include_archived,
|
|
15285
15293
|
tags: payload.tags,
|
|
15286
15294
|
teams: instanceTeams(this.fleetConfig?.teams, instanceName),
|
|
15287
|
-
}), { id: payload.id, full: payload.full });
|
|
15295
|
+
}), { id: payload.id, full: payload.full, detail: payload.detail, limit: payload.limit, cursor: payload.cursor });
|
|
15288
15296
|
break;
|
|
15289
15297
|
case "fleet_decision_update": {
|
|
15290
15298
|
const id = payload.id;
|
|
@@ -15448,7 +15456,7 @@ export class FleetManager {
|
|
|
15448
15456
|
...(reply.silent !== undefined ? { silent: reply.silent } : {}),
|
|
15449
15457
|
});
|
|
15450
15458
|
case "list":
|
|
15451
|
-
return scheduler.list(requestedTarget);
|
|
15459
|
+
return scheduleListAnswer(scheduler.list(requestedTarget), args);
|
|
15452
15460
|
case "update":
|
|
15453
15461
|
return scheduler.update(args.id, args);
|
|
15454
15462
|
case "delete":
|
|
@@ -15584,7 +15592,7 @@ export class FleetManager {
|
|
|
15584
15592
|
includeArchived: args.includeArchived === true || args.include_archived === true,
|
|
15585
15593
|
tags: asStrArr(args.tags),
|
|
15586
15594
|
teams: instanceTeams(this.fleetConfig?.teams, instance),
|
|
15587
|
-
}), { 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 });
|
|
15588
15596
|
case "update": {
|
|
15589
15597
|
const id = asStr(args.id);
|
|
15590
15598
|
if (!id)
|
|
@@ -15648,19 +15656,22 @@ export class FleetManager {
|
|
|
15648
15656
|
// #1336 item 1: default to live-only (no done/cancelled) unless the
|
|
15649
15657
|
// caller explicitly asked for a status.
|
|
15650
15658
|
const effectiveStatus = explicitStatus ?? LIVE_TASK_STATUSES;
|
|
15651
|
-
|
|
15659
|
+
listOptions(args);
|
|
15660
|
+
const verbose = args.verbose === true || args.detail === true;
|
|
15652
15661
|
const tasks = verbose
|
|
15653
15662
|
? db.listTasks({ assignee: filterAssignee, status: effectiveStatus, verbose: true })
|
|
15654
15663
|
: db.listTasks({ assignee: filterAssignee, status: effectiveStatus });
|
|
15655
15664
|
// #1335: cap unfiltered list. The default live-only filter does not
|
|
15656
15665
|
// count as an explicit filter for the cap decision.
|
|
15657
|
-
return applyTaskListCap(tasks, filterAssignee, explicitStatus);
|
|
15666
|
+
return args.detail === true || args.verbose === true ? applyTaskListCap(tasks, filterAssignee, explicitStatus) : taskListAnswer(tasks, args);
|
|
15658
15667
|
}
|
|
15659
15668
|
case "get": {
|
|
15660
15669
|
const id = asStr(args.id);
|
|
15661
15670
|
if (!id)
|
|
15662
15671
|
return { error: "id is required" };
|
|
15663
|
-
|
|
15672
|
+
listOptions(args);
|
|
15673
|
+
const row = db.getTaskByPrefix(id);
|
|
15674
|
+
return args.detail === true ? row : taskTitle(row);
|
|
15664
15675
|
}
|
|
15665
15676
|
case "claim": {
|
|
15666
15677
|
const id = asStr(args.id);
|
|
@@ -15810,17 +15821,19 @@ export class FleetManager {
|
|
|
15810
15821
|
const explicitStatus = asStatusFilter(payload.filter_status);
|
|
15811
15822
|
// #1336 item 1: default to live-only (no done/cancelled).
|
|
15812
15823
|
const effectiveStatus = explicitStatus ?? LIVE_TASK_STATUSES;
|
|
15813
|
-
|
|
15824
|
+
listOptions(payload);
|
|
15825
|
+
const verbose = payload.verbose === true || payload.detail === true;
|
|
15814
15826
|
const tasks = verbose
|
|
15815
15827
|
? db.listTasks({ assignee: filterAssignee, status: effectiveStatus, verbose: true })
|
|
15816
15828
|
: db.listTasks({ assignee: filterAssignee, status: effectiveStatus });
|
|
15817
15829
|
// #1335: cap unfiltered list — the default live-only filter does not
|
|
15818
15830
|
// count as an explicit filter.
|
|
15819
|
-
result = applyTaskListCap(tasks, filterAssignee, explicitStatus);
|
|
15831
|
+
result = payload.detail === true || payload.verbose === true ? applyTaskListCap(tasks, filterAssignee, explicitStatus) : taskListAnswer(tasks, payload);
|
|
15820
15832
|
break;
|
|
15821
15833
|
}
|
|
15822
15834
|
case "get":
|
|
15823
|
-
|
|
15835
|
+
listOptions(payload);
|
|
15836
|
+
result = payload.detail === true ? db.getTaskByPrefix(payload.id) : taskTitle(db.getTaskByPrefix(payload.id));
|
|
15824
15837
|
break;
|
|
15825
15838
|
case "claim":
|
|
15826
15839
|
logTask = db.claimTask(db.getTaskByPrefix(payload.id).id, meta.instance_name || instanceName, { kind: "instance", name: meta.instance_name || instanceName });
|
|
@@ -22021,12 +22034,17 @@ export class FleetManager {
|
|
|
22021
22034
|
return this.machineSignInsInstance ??= new MachineSignIns({
|
|
22022
22035
|
call: (id, operation, payload, timeoutMs) => this.runtimeCoordinator().callAccount(id, operation, payload, timeoutMs),
|
|
22023
22036
|
current: owner => this.browserSignInOwnerCurrent(owner),
|
|
22024
|
-
reported: (id, profile) => this.machineAccounts.profileState(id, profile),
|
|
22025
|
-
|
|
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),
|
|
22026
22040
|
actor: owner => { const handle = owner.handle; return typeof handle === "string" && /^[a-f0-9]{16}$/.test(handle) ? `admin:${handle}` : null; },
|
|
22027
22041
|
changed: (event, owner) => {
|
|
22028
|
-
// 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.
|
|
22029
|
-
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);
|
|
22030
22048
|
broadcastSseEvent(this.sseClients, "backend_login", {}, err => this.logger.debug({ err }, "backend_login event failed"));
|
|
22031
22049
|
this.needsYou?.poke();
|
|
22032
22050
|
},
|
|
@@ -22039,13 +22057,15 @@ export class FleetManager {
|
|
|
22039
22057
|
call: (id, operation, payload, timeoutMs) => this.runtimeCoordinator().callAccount(id, operation, payload, timeoutMs),
|
|
22040
22058
|
machine: id => remoteRuntimeEnabled() ? this.runtimeCoordinator().machine(id) ?? undefined : undefined,
|
|
22041
22059
|
machines: () => remoteRuntimeEnabled() ? this.runtimeCoordinator().listMachines() : [],
|
|
22042
|
-
agents: id => machineAgents(this.fleetConfig?.instances, id, name => { try {
|
|
22060
|
+
agents: (id, backend = "claude-code") => machineAgents(this.fleetConfig?.instances, id, name => { try {
|
|
22043
22061
|
return nativeCredentialProfile(this.fleetConfig?.instances[name]) ?? null;
|
|
22044
22062
|
}
|
|
22045
22063
|
catch {
|
|
22046
22064
|
return null;
|
|
22047
|
-
} }, this.fleetConfig?.defaults?.backend ?? "claude-code"),
|
|
22048
|
-
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),
|
|
22049
22069
|
log: entry => this.logger.info(entry, entry.outcome === "ok" ? "Computer account changed from Settings → Accounts" : "Computer account change refused"),
|
|
22050
22070
|
});
|
|
22051
22071
|
}
|
|
@@ -22068,6 +22088,7 @@ export class FleetManager {
|
|
|
22068
22088
|
},
|
|
22069
22089
|
checkAuth: backend => checkAuthStatus(LOGIN_FLOWS[backend].authCheck),
|
|
22070
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
|
|
22071
22092
|
transport: () => createStructuredSignInTransport(),
|
|
22072
22093
|
changed: (event, owner, launched) => {
|
|
22073
22094
|
try {
|
|
@@ -22078,6 +22099,7 @@ export class FleetManager {
|
|
|
22078
22099
|
if (event.phase === "done") {
|
|
22079
22100
|
this.forgetSignInIdentities(); // a sign-in may be a different account now
|
|
22080
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
|
|
22081
22103
|
}
|
|
22082
22104
|
this.needsYou?.poke();
|
|
22083
22105
|
if (!this.browserSignInOwnerCurrent(owner))
|
|
@@ -22112,8 +22134,15 @@ export class FleetManager {
|
|
|
22112
22134
|
return result.ok;
|
|
22113
22135
|
},
|
|
22114
22136
|
checkAuth: (backend, profile) => {
|
|
22115
|
-
const
|
|
22116
|
-
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));
|
|
22117
22146
|
},
|
|
22118
22147
|
transport: target => createStructuredSignInTransport({ backend: target.backend, dataDir: this.dataDir }),
|
|
22119
22148
|
changed: (event, owner, launched) => {
|
|
@@ -22125,6 +22154,7 @@ export class FleetManager {
|
|
|
22125
22154
|
if (event.phase === "done") {
|
|
22126
22155
|
this.forgetSignInIdentities(); // a sign-in may be a different account now
|
|
22127
22156
|
this.keepAliveAfterSignIn(event.backend, event.profile);
|
|
22157
|
+
this.usageAfterSignIn();
|
|
22128
22158
|
}
|
|
22129
22159
|
this.needsYou?.poke();
|
|
22130
22160
|
if (!this.browserSignInOwnerCurrent(owner))
|
|
@@ -22147,7 +22177,7 @@ export class FleetManager {
|
|
|
22147
22177
|
return pending.map(backend => {
|
|
22148
22178
|
if (!this.pendingBackendSince.has(backend))
|
|
22149
22179
|
this.pendingBackendSince.set(backend, Date.now());
|
|
22150
|
-
return { backend, since: this.pendingBackendSince.get(backend), browser:
|
|
22180
|
+
return { backend, since: this.pendingBackendSince.get(backend), browser: ONBOARDING_BROWSER_BACKENDS.includes(backend) };
|
|
22151
22181
|
});
|
|
22152
22182
|
}
|
|
22153
22183
|
/** #2233: sign-ins started from the web dashboard (local admin sessions), on the same controller as chat's. */
|
|
@@ -22205,10 +22235,36 @@ export class FleetManager {
|
|
|
22205
22235
|
}
|
|
22206
22236
|
/** One `claude auth status` for a sign-in (the default one, or a credential profile's folder). */
|
|
22207
22237
|
async readSignInIdentity(target) {
|
|
22208
|
-
let env;
|
|
22209
|
-
if (target.profile)
|
|
22210
|
-
|
|
22211
|
-
|
|
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;
|
|
22212
22268
|
}
|
|
22213
22269
|
/**
|
|
22214
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
|
|
@@ -22219,7 +22275,7 @@ export class FleetManager {
|
|
|
22219
22275
|
refreshSignInIdentities() {
|
|
22220
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; };
|
|
22221
22277
|
const started = [];
|
|
22222
|
-
for (const target of this.
|
|
22278
|
+
for (const target of this.identityTargets()) {
|
|
22223
22279
|
const key = `${target.backend}\0${target.profile ?? ""}`;
|
|
22224
22280
|
if (target.state !== "usable" || !authIdentitySupported(target.backend) || fresh(target) || this.signInIdentityReads.has(key))
|
|
22225
22281
|
continue;
|
|
@@ -22262,7 +22318,7 @@ export class FleetManager {
|
|
|
22262
22318
|
login = credentialProfileLogin(this.dataDir, backend, profile).state;
|
|
22263
22319
|
}
|
|
22264
22320
|
catch { /* unknown */ }
|
|
22265
|
-
const signIn =
|
|
22321
|
+
const signIn = this.profileSignInSupported(backend, profile);
|
|
22266
22322
|
const hostCommand = signIn ? null : credentialProfileLoginCommand(this.dataDir, backend, profile);
|
|
22267
22323
|
const identity = this.signInIdentity(backend, profile);
|
|
22268
22324
|
rows.push({ profile, state: (login === "logged-in" ? "usable" : login === "signed-out" ? "not_signed_in" : "unknown"), signIn,
|
|
@@ -22271,9 +22327,8 @@ export class FleetManager {
|
|
|
22271
22327
|
diskProfiles.set(backend, rows);
|
|
22272
22328
|
}
|
|
22273
22329
|
const { agents, classic, fleetDefaults } = this.accountUses();
|
|
22274
|
-
//
|
|
22330
|
+
// Every pool's and every window's usage, from the usage panel's own (cached, never forced) read.
|
|
22275
22331
|
const usage = new Map();
|
|
22276
|
-
const shortWindow = new Map();
|
|
22277
22332
|
const ids = new Map(); // provider id → backend\0profile
|
|
22278
22333
|
for (const backend of ACCOUNT_CLIS) {
|
|
22279
22334
|
const pid = usageProviderIdForBackend(backend);
|
|
@@ -22289,12 +22344,9 @@ export class FleetManager {
|
|
|
22289
22344
|
const at = ids.get(provider.id);
|
|
22290
22345
|
if (!at)
|
|
22291
22346
|
continue;
|
|
22292
|
-
const
|
|
22293
|
-
if (
|
|
22294
|
-
usage.set(at,
|
|
22295
|
-
const sh = shortUsage(provider);
|
|
22296
|
-
if (sh)
|
|
22297
|
-
shortWindow.set(at, sh);
|
|
22347
|
+
const u = accountUsage(at.split("\0")[0], provider);
|
|
22348
|
+
if (u)
|
|
22349
|
+
usage.set(at, u);
|
|
22298
22350
|
}
|
|
22299
22351
|
}
|
|
22300
22352
|
catch { /* the view without usage */ }
|
|
@@ -22321,9 +22373,19 @@ export class FleetManager {
|
|
|
22321
22373
|
this.logger.debug({ err: err.message }, "Computer accounts not read");
|
|
22322
22374
|
}
|
|
22323
22375
|
}
|
|
22324
|
-
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,
|
|
22325
22377
|
versions: new Map(this.backendAvailabilityRows().map(row => [row.backend, row.version ?? null])) });
|
|
22326
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
|
+
}
|
|
22327
22389
|
/**
|
|
22328
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
|
|
22329
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.
|
|
@@ -22534,7 +22596,7 @@ export class FleetManager {
|
|
|
22534
22596
|
const owner = this.worlds.keys().next().value;
|
|
22535
22597
|
// M-2932: only what a refresh showed (needs_sign_in, not_renewed, transient) — never a stored end date.
|
|
22536
22598
|
return ka.attention().map(a => ({
|
|
22537
|
-
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),
|
|
22538
22600
|
...(owner ? { owner } : {}),
|
|
22539
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)),
|
|
22540
22602
|
}));
|
|
@@ -22726,6 +22788,16 @@ export class FleetManager {
|
|
|
22726
22788
|
run: async (b, a, e) => watch(await base.run(b, a, e)),
|
|
22727
22789
|
keychainHas: base.keychainHas,
|
|
22728
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
|
+
}),
|
|
22729
22801
|
};
|
|
22730
22802
|
let finished;
|
|
22731
22803
|
const life = new Promise(r => { finished = r; });
|
|
@@ -22760,8 +22832,13 @@ export class FleetManager {
|
|
|
22760
22832
|
result = { ok: false, error: "signing_in" };
|
|
22761
22833
|
else
|
|
22762
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 */ }
|
|
22763
22840
|
if (result.ok) {
|
|
22764
|
-
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");
|
|
22765
22842
|
this.forgetSignInIdentities();
|
|
22766
22843
|
void this.backendAvailability.refresh([backend], { force: true }).catch(() => { });
|
|
22767
22844
|
broadcastSseEvent(this.sseClients, "backend_login", {}, err => this.logger.debug({ err }, "backend_login event failed"));
|
|
@@ -22782,6 +22859,24 @@ export class FleetManager {
|
|
|
22782
22859
|
return false;
|
|
22783
22860
|
}
|
|
22784
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
|
+
}
|
|
22785
22880
|
backendSignInTargets() {
|
|
22786
22881
|
const out = [];
|
|
22787
22882
|
for (const row of this.backendAvailabilityRows()) {
|
|
@@ -22790,13 +22885,20 @@ export class FleetManager {
|
|
|
22790
22885
|
// M-2825: `claude auth status` says loggedIn after a refused refresh and past the sign-in's end date — the file says
|
|
22791
22886
|
// whether it is over, and then it is not signed in (never the other way: the file can't vouch for a login).
|
|
22792
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);
|
|
22793
22895
|
out.push({
|
|
22794
22896
|
// Not installed or too old: signing in would not help — the row says how to install (or update) it instead.
|
|
22795
22897
|
backend: row.backend, state: ended ? "not_signed_in" : row.state, ...(ended ? { reconnect: true } : {}),
|
|
22796
|
-
signIn: row.state !== "not_installed" && row.state !== "too_old" && dashboardSignInSupported(row.backend),
|
|
22797
|
-
...(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 } : {}),
|
|
22798
22900
|
...(row.state === "not_installed" && install ? { install } : {}),
|
|
22799
|
-
...(row.state === "too_old" && install ? { update: install } : {}),
|
|
22901
|
+
...((row.state === "too_old" || structuredUpdate) && install ? { update: install } : {}),
|
|
22800
22902
|
...(this.signInIdentity(row.backend) ? { identity: this.signInIdentity(row.backend) } : {}),
|
|
22801
22903
|
});
|
|
22802
22904
|
}
|
|
@@ -22812,7 +22914,7 @@ export class FleetManager {
|
|
|
22812
22914
|
login = credentialProfileLogin(this.dataDir, backend, profile).state;
|
|
22813
22915
|
}
|
|
22814
22916
|
catch { /* unknown */ }
|
|
22815
|
-
const signIn =
|
|
22917
|
+
const signIn = this.profileSignInSupported(backend, profile);
|
|
22816
22918
|
const hostCommand = signIn ? null : credentialProfileLoginCommand(this.dataDir, backend, profile);
|
|
22817
22919
|
out.push({ backend, profile, state: login === "logged-in" ? "usable" : login === "signed-out" ? "not_signed_in" : "unknown", signIn,
|
|
22818
22920
|
...(hostCommand ? { hostCommand } : {}), ...(this.signInIdentity(backend, profile) ? { identity: this.signInIdentity(backend, profile) } : {}),
|
|
@@ -25219,8 +25321,10 @@ export class FleetManager {
|
|
|
25219
25321
|
const backend = this.backendNameForInstance(name);
|
|
25220
25322
|
const binding = this.webModelBinding(backend, name);
|
|
25221
25323
|
// A named agy account has no verified relocation/discovery contract. In particular,
|
|
25222
|
-
// never publish the ambient account's models under that profile (#3526 / D7).
|
|
25223
|
-
|
|
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")))
|
|
25224
25328
|
continue;
|
|
25225
25329
|
// A description/defaults save can retire a scoped answer's full binding even
|
|
25226
25330
|
// though its account signature is unchanged. Keep the conservative fence and
|