@songsid/agend 2.4.0-alpha.1 → 2.4.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/account-isolation.d.ts +6 -0
- package/dist/account-isolation.js +40 -0
- package/dist/account-isolation.js.map +1 -0
- package/dist/accounts-signout.d.ts +15 -2
- package/dist/accounts-signout.js +52 -4
- package/dist/accounts-signout.js.map +1 -1
- package/dist/accounts-view.d.ts +114 -27
- package/dist/accounts-view.js +123 -60
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +9 -7
- package/dist/agent-cli.js +47 -20
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +23 -8
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-list-output.d.ts +23 -0
- package/dist/agent-list-output.js +53 -0
- package/dist/agent-list-output.js.map +1 -0
- package/dist/agent-runtime-change.js +4 -4
- package/dist/agent-runtime-change.js.map +1 -1
- package/dist/agent-whats-new.js +4 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/antigravity-first-run.d.ts +4 -0
- package/dist/antigravity-first-run.js +57 -0
- package/dist/antigravity-first-run.js.map +1 -0
- package/dist/antigravity-identity.d.ts +6 -0
- package/dist/antigravity-identity.js +27 -0
- package/dist/antigravity-identity.js.map +1 -0
- package/dist/antigravity-store.d.ts +22 -0
- package/dist/antigravity-store.js +79 -0
- package/dist/antigravity-store.js.map +1 -0
- package/dist/auth-api.js +7 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/agy-onboarding.d.ts +14 -0
- package/dist/backend/agy-onboarding.js +114 -0
- package/dist/backend/agy-onboarding.js.map +1 -0
- package/dist/backend/antigravity.d.ts +15 -0
- package/dist/backend/antigravity.js +44 -4
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.js +4 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +22 -3
- package/dist/backend/credential-profile.js +61 -9
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +7 -1
- package/dist/backend-availability.js +39 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +16 -2
- package/dist/browser-backend-signins.js +17 -9
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +10 -10
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/claude-auth-status.d.ts +1 -0
- package/dist/claude-auth-status.js +25 -0
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/cli-capability.d.ts +104 -19
- package/dist/cli-capability.js +3 -1
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +14 -0
- package/dist/cli-caps-module.js +8 -1
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +114 -18
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +116 -12
- package/dist/cli-registry.js +16 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +53 -11
- package/dist/cli-spec-antigravity.js +44 -13
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +14 -1
- package/dist/cli-spec-claude-code.js +5 -4
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +8 -0
- package/dist/cli-spec-codex.js +4 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +4 -0
- package/dist/cli-spec-grok.js +2 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -0
- package/dist/cli-spec-kiro-cli.js +3 -2
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +4 -0
- package/dist/cli-spec-muse.js +2 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +1 -0
- package/dist/cli-spec-opencode.js +1 -0
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/config-validator.js +47 -7
- package/dist/config-validator.js.map +1 -1
- package/dist/credential-store-proof.d.ts +6 -0
- package/dist/credential-store-proof.js +30 -0
- package/dist/credential-store-proof.js.map +1 -0
- package/dist/daemon.d.ts +3 -0
- package/dist/daemon.js +6 -2
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +5 -4
- package/dist/decision-list.js +22 -8
- package/dist/decision-list.js.map +1 -1
- package/dist/fleet-manager.d.ts +53 -5
- package/dist/fleet-manager.js +301 -115
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +6 -6
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +32 -4
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +42 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +14 -6
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +361 -0
- package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +184 -36
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +5 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/hub/audit/index.js +12 -5
- package/dist/hub/audit/index.js.map +1 -1
- package/dist/hub/buttons.d.ts +3 -0
- package/dist/hub/buttons.js +11 -11
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +18 -5
- package/dist/hub/catalog.js +119 -36
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +6 -0
- package/dist/hub/client.js +6 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -0
- package/dist/hub/compose/member.js +26 -2
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +6 -0
- package/dist/hub/compose/server.js +11 -4
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +51 -0
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +14 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/enrolment-code.d.ts +126 -0
- package/dist/hub/enrolment-code.js +266 -0
- package/dist/hub/enrolment-code.js.map +1 -0
- package/dist/hub/grant-access.d.ts +11 -0
- package/dist/hub/grant-access.js +113 -0
- package/dist/hub/grant-access.js.map +1 -0
- package/dist/hub/grant-search.d.ts +9 -0
- package/dist/hub/grant-search.js +92 -0
- package/dist/hub/grant-search.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.d.ts +2 -0
- package/dist/hub/group-policy/admin-impact.js +14 -4
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.js +7 -7
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +20 -3
- package/dist/hub/group-policy/authorization.js +132 -27
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.js +23 -7
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +44 -6
- package/dist/hub/group-policy/resources.js +75 -30
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +24 -3
- package/dist/hub/group-policy/store.js +136 -77
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/welcome.js.map +1 -1
- package/dist/hub/http/compose.js +68 -16
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +18 -0
- package/dist/hub/http/core.js +108 -7
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +8 -0
- package/dist/hub/http/schema.js +11 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/init/text.js +2 -2
- package/dist/hub/init/text.js.map +1 -1
- package/dist/hub/init/web.d.ts +7 -0
- package/dist/hub/init/web.js +6 -1
- package/dist/hub/init/web.js.map +1 -1
- package/dist/hub/join/local.d.ts +32 -0
- package/dist/hub/join/local.js +98 -10
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/receipt.d.ts +1 -0
- package/dist/hub/join/receipt.js +1 -1
- package/dist/hub/join/receipt.js.map +1 -1
- package/dist/hub/join/service.d.ts +94 -6
- package/dist/hub/join/service.js +214 -44
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/join/store.d.ts +2 -1
- package/dist/hub/join/store.js +7 -7
- package/dist/hub/join/store.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +3 -2
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +4 -0
- package/dist/hub/member/exposures.js +12 -2
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-api.js +4 -1
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/pairing-notices.js +8 -6
- package/dist/hub/member/pairing-notices.js.map +1 -1
- package/dist/hub/pairing-notices.d.ts +5 -2
- package/dist/hub/pairing-notices.js +38 -13
- package/dist/hub/pairing-notices.js.map +1 -1
- package/dist/hub/pairing.d.ts +10 -2
- package/dist/hub/pairing.js +37 -16
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/policy.d.ts +1 -1
- package/dist/hub/policy.js +19 -6
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +60 -0
- package/dist/hub/protocol.js +9 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/quota.d.ts +2 -1
- package/dist/hub/quota.js +2 -2
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/roles/authority.d.ts +45 -0
- package/dist/hub/roles/authority.js +199 -0
- package/dist/hub/roles/authority.js.map +1 -0
- package/dist/hub/roles/change.d.ts +18 -0
- package/dist/hub/roles/change.js +76 -0
- package/dist/hub/roles/change.js.map +1 -0
- package/dist/hub/roles/convert.d.ts +11 -0
- package/dist/hub/roles/convert.js +27 -0
- package/dist/hub/roles/convert.js.map +1 -0
- package/dist/hub/roles/cutover-inventory.d.ts +14 -0
- package/dist/hub/roles/cutover-inventory.js +42 -0
- package/dist/hub/roles/cutover-inventory.js.map +1 -0
- package/dist/hub/roles/cutover.d.ts +32 -0
- package/dist/hub/roles/cutover.js +184 -0
- package/dist/hub/roles/cutover.js.map +1 -0
- package/dist/hub/roles/delegation.d.ts +24 -0
- package/dist/hub/roles/delegation.js +111 -0
- package/dist/hub/roles/delegation.js.map +1 -0
- package/dist/hub/roles/evaluate.d.ts +50 -0
- package/dist/hub/roles/evaluate.js +96 -0
- package/dist/hub/roles/evaluate.js.map +1 -0
- package/dist/hub/roles/expiry.d.ts +46 -0
- package/dist/hub/roles/expiry.js +180 -0
- package/dist/hub/roles/expiry.js.map +1 -0
- package/dist/hub/roles/mode-effects.d.ts +5 -0
- package/dist/hub/roles/mode-effects.js +21 -0
- package/dist/hub/roles/mode-effects.js.map +1 -0
- package/dist/hub/roles/model.d.ts +171 -0
- package/dist/hub/roles/model.js +79 -0
- package/dist/hub/roles/model.js.map +1 -0
- package/dist/hub/roles/read.d.ts +29 -0
- package/dist/hub/roles/read.js +47 -0
- package/dist/hub/roles/read.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +80 -0
- package/dist/hub/roles/writer.js +427 -0
- package/dist/hub/roles/writer.js.map +1 -0
- package/dist/hub/rooms.d.ts +8 -0
- package/dist/hub/rooms.js +47 -27
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.d.ts +3 -0
- package/dist/hub/server.js +18 -2
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +5 -1
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-directory-decision.d.ts +2 -2
- package/dist/hub/settings-directory-decision.js +7 -5
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-directory-proof.js +3 -1
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.js +3 -3
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/sharing.d.ts +10 -0
- package/dist/hub/sharing.js +74 -0
- package/dist/hub/sharing.js.map +1 -0
- package/dist/hub/store.js +6 -2
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +29 -5
- package/dist/hub/web-origin.d.ts +80 -0
- package/dist/hub/web-origin.js +163 -0
- package/dist/hub/web-origin.js.map +1 -0
- package/dist/hub-pairing-summary.js +1 -1
- package/dist/hub-pairing-summary.js.map +1 -1
- package/dist/human-delivery-receipts.js +2 -2
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +4 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +36 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +8 -2
- package/dist/instructions.js +28 -6
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +12 -8
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +62 -6
- package/dist/log-service.js +135 -28
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps-agy-grok.d.ts +74 -0
- package/dist/log-steps-agy-grok.js +440 -0
- package/dist/log-steps-agy-grok.js.map +1 -0
- package/dist/log-steps.d.ts +62 -3
- package/dist/log-steps.js +188 -22
- package/dist/log-steps.js.map +1 -1
- package/dist/log-transcript-paths.d.ts +29 -0
- package/dist/log-transcript-paths.js +109 -0
- package/dist/log-transcript-paths.js.map +1 -0
- package/dist/login-controller.d.ts +17 -3
- package/dist/login-controller.js +57 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.d.ts +24 -2
- package/dist/login-flows.js +53 -22
- package/dist/login-flows.js.map +1 -1
- package/dist/login-url.js +3 -0
- package/dist/login-url.js.map +1 -1
- package/dist/login-window-lock.d.ts +20 -8
- package/dist/login-window-lock.js +35 -16
- package/dist/login-window-lock.js.map +1 -1
- package/dist/machine-accounts.d.ts +42 -12
- package/dist/machine-accounts.js +144 -46
- package/dist/machine-accounts.js.map +1 -1
- package/dist/machine-signins.d.ts +35 -13
- package/dist/machine-signins.js +57 -27
- package/dist/machine-signins.js.map +1 -1
- package/dist/native-instance-input.js +4 -4
- package/dist/native-instance-input.js.map +1 -1
- package/dist/native-instance-registry.d.ts +3 -3
- package/dist/native-instance-registry.js +11 -10
- package/dist/native-instance-registry.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -0
- package/dist/outbound-handlers.js +68 -20
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +18 -0
- package/dist/outbound-schemas.js +22 -4
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/profile-signins.d.ts +7 -0
- package/dist/profile-signins.js +2 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/runtime-build-info.js +6 -2
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli.js +33 -11
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client.d.ts +18 -2
- package/dist/runtime-client.js +84 -21
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +36 -4
- package/dist/runtime-credential-profiles.js +82 -16
- package/dist/runtime-credential-profiles.js.map +1 -1
- package/dist/runtime-profile-ownership.d.ts +2 -2
- package/dist/runtime-profile-ownership.js +3 -3
- package/dist/runtime-profile-ownership.js.map +1 -1
- package/dist/runtime-protocol.d.ts +5 -3
- package/dist/runtime-protocol.js +4 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +72 -5
- package/dist/runtime-remote-accounts.js +293 -52
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +2 -2
- package/dist/runtime-remote-setup.js +2 -2
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-signin-transport.d.ts +22 -4
- package/dist/runtime-signin-transport.js +50 -12
- package/dist/runtime-signin-transport.js.map +1 -1
- package/dist/runtime-signin.d.ts +42 -0
- package/dist/runtime-signin.js +105 -9
- package/dist/runtime-signin.js.map +1 -1
- package/dist/runtime-windows-bridge.js +6 -1
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +1 -0
- package/dist/scheduler/task-board.js +10 -1
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +34 -0
- package/dist/settings-api.js +184 -6
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +38 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +14 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/signin-keepalive.d.ts +31 -2
- package/dist/signin-keepalive.js +123 -12
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +2 -2
- package/dist/structured-signin-transport.js +27 -6
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +16 -2
- package/dist/structured-signin.js +59 -4
- package/dist/structured-signin.js.map +1 -1
- package/dist/task-board-tool.d.ts +0 -13
- package/dist/task-board-tool.js +42 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/tool-progress.d.ts +7 -0
- package/dist/tool-progress.js +21 -9
- package/dist/tool-progress.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +151 -0
- package/dist/tool-receipt-output.js +50 -0
- package/dist/tool-receipt-output.js.map +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/ui/accounts-keepalive.js +15 -6
- package/dist/ui/accounts-manage.js +25 -5
- package/dist/ui/accounts-view.js +40 -26
- package/dist/ui/agent-details-settings.js +2 -2
- package/dist/ui/agent-page-strings.js +2 -2
- package/dist/ui/agent-proposals.js +22 -2
- package/dist/ui/agent-runtime-settings.js +3 -3
- package/dist/ui/backend-signin.js +49 -16
- package/dist/ui/chat-activity-groups.js +225 -0
- package/dist/ui/chat-activity.js +355 -0
- package/dist/ui/chat-popout-header.js +35 -0
- package/dist/ui/chat-popout-transport.js +80 -0
- package/dist/ui/chat-popout.js +63 -0
- package/dist/ui/chat-quote.js +3 -1
- package/dist/ui/chat-store.js +45 -4
- package/dist/ui/chat-workspace-gestures.js +177 -0
- package/dist/ui/chat-workspace-navigation.js +34 -10
- package/dist/ui/chat-workspace.js +96 -32
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +32 -19
- package/dist/ui/host-install.js +2 -2
- package/dist/ui/hub-agent-copy.js +7 -7
- package/dist/ui/hub-chat-store.js +8 -4
- package/dist/ui/hub-chat-strings.js +3 -3
- package/dist/ui/hub-client.js +113 -18
- package/dist/ui/hub-company-join-strings.js +12 -10
- package/dist/ui/hub-company-join.js +52 -39
- package/dist/ui/hub-confirm-place.js +44 -0
- package/dist/ui/hub-directory-editor-strings.js +3 -3
- package/dist/ui/hub-directory-notice-strings.js +1 -1
- package/dist/ui/hub-enrolment-code-strings.js +44 -0
- package/dist/ui/hub-enrolment-code.js +159 -0
- package/dist/ui/hub-grant-picker.js +100 -0
- package/dist/ui/hub-group-search.js +82 -0
- package/dist/ui/hub-group-strings.js +8 -8
- package/dist/ui/hub-join-approval.js +31 -0
- package/dist/ui/hub-join-code-input.js +66 -0
- package/dist/ui/hub-join-one-strings.js +2 -2
- package/dist/ui/hub-join-queue.js +62 -0
- package/dist/ui/hub-join-steps.js +234 -0
- package/dist/ui/hub-joincode-flow-strings.js +22 -0
- package/dist/ui/hub-owner-strings.js +9 -9
- package/dist/ui/hub-pairing-progress-strings.js +1 -1
- package/dist/ui/hub-quick-pairing.js +8 -4
- package/dist/ui/hub-quick-strings.js +11 -11
- package/dist/ui/hub-share-refused.js +17 -0
- package/dist/ui/hub-strings.js +61 -61
- package/dist/ui/hub-this-hub.js +2 -2
- package/dist/ui/hub-welcome.js +26 -5
- package/dist/ui/image-annotate.js +283 -0
- package/dist/ui/image-lightbox.js +26 -6
- package/dist/ui/log-row.js +327 -0
- package/dist/ui/machine-signin.js +47 -14
- package/dist/ui/panel-chat.js +151 -12
- package/dist/ui/panel-details.js +14 -6
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-hub.js +94 -21
- package/dist/ui/panel-log.js +9 -154
- package/dist/ui/panel-settings.js +50 -13
- package/dist/ui/search-dialog.js +1 -0
- package/dist/ui/settings-access-overview.js +1 -1
- package/dist/ui/settings-hub-browser-certificate.js +3 -3
- package/dist/ui/settings-hub-company-join.js +42 -30
- package/dist/ui/settings-hub-connection.js +8 -5
- package/dist/ui/settings-hub-membership.js +3 -3
- package/dist/ui/settings-hub-section.js +3 -1
- package/dist/ui/settings-hub-setup-strings.js +6 -6
- package/dist/ui/settings-hub-setup.js +44 -6
- package/dist/ui/settings-hub-web-address.js +233 -0
- package/dist/ui/settings-hub.js +41 -10
- package/dist/ui/settings-layout.js +6 -4
- package/dist/ui/settings-public-session-strings.js +37 -0
- package/dist/ui/settings-registry.js +4 -0
- package/dist/ui/settings-strings.js +2 -2
- package/dist/ui/shared/accounts-keepalive.css +8 -0
- package/dist/ui/shared/accounts-usage-pool.css +10 -0
- package/dist/ui/shared/accounts.css +9 -0
- package/dist/ui/shared/app-shell.js +16 -10
- package/dist/ui/shared/app.css +233 -35
- package/dist/ui/shared/app.js +8 -1
- package/dist/ui/shared/chat-render.js +11 -2
- package/dist/ui/shared/chat-thread.js +20 -3
- package/dist/ui/shared/chat-work-bar.css +7 -0
- package/dist/ui/shared/chat-workspace-model.js +39 -9
- package/dist/ui/shared/hub-grant-picker.css +4 -0
- package/dist/ui/shared/hub-owner.css +8 -0
- package/dist/ui/shared/hub-sharing.css +4 -0
- package/dist/ui/shared/identity-color.js +9 -3
- package/dist/ui/shared/image-annotate.css +45 -0
- package/dist/ui/shared/instance-nav.js +59 -22
- package/dist/ui/shared/pane-geometry.js +29 -0
- package/dist/ui/shared/signin.js +2 -2
- package/dist/ui/shared/tokens.css +14 -0
- package/dist/ui/shared/ui-menu.js +22 -7
- package/dist/ui/shared/view-strings.js +2 -2
- package/dist/ui/signin.html +1 -1
- package/dist/ui/structured-signin.js +29 -9
- package/dist/ui/usage-pool.js +76 -0
- package/dist/usage/agent-output.d.ts +144 -0
- package/dist/usage/agent-output.js +75 -0
- package/dist/usage/agent-output.js.map +1 -0
- package/dist/usage/provider-alerts.d.ts +6 -0
- package/dist/usage/provider-alerts.js +6 -0
- package/dist/usage/provider-alerts.js.map +1 -1
- package/dist/usage/providers.d.ts +2 -2
- package/dist/usage/providers.js +60 -18
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +12 -0
- package/dist/usage/usage-api.js +39 -0
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +3 -0
- package/dist/web-api.js +61 -16
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +13 -4
- package/dist/web-backend-login.js +7 -4
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-history.d.ts +11 -0
- package/dist/web-chat-history.js +9 -1
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-guest-access.js +2 -2
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-session.d.ts +31 -3
- package/dist/web-session.js +25 -4
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +8 -2
- package/dist/web-settings-patch.js +22 -10
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/windows-cli-providers.js +5 -1
- package/dist/windows-cli-providers.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +33 -1
- package/dist/windows-cli-worker.js +150 -10
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +7 -1
- package/dist/windows-cli.js +19 -2
- package/dist/windows-cli.js.map +1 -1
- package/dist/workflow-templates/default.md +2 -2
- package/package.json +1 -1
|
@@ -12,12 +12,14 @@ export const SIGNIN_STRINGS = {
|
|
|
12
12
|
field_code: "Paste the authorization code", field_start_url: "Organization Start URL", field_region: "AWS region",
|
|
13
13
|
phase_method: "method", phase_code: "authorization code", phase_start_url: "start URL", phase_region: "region", phase_authorization: "authorization",
|
|
14
14
|
choice_organization: "Your organization", choice_subscription: "Claude subscription",
|
|
15
|
-
|
|
15
|
+
consoleName: "{0} (console fallback)",
|
|
16
16
|
error: "Could not connect the account. Check status, retry, or connect later.",
|
|
17
17
|
error_unsupported_prompt: "This CLI screen is not supported. Cancel and use the console fallback.",
|
|
18
18
|
error_cleanup_failed: "The login process could not be confirmed closed. Close it on the host and restart setup before retrying.",
|
|
19
19
|
error_signin_cleanup_failed: "The login process could not be confirmed closed. Close it on the host and restart setup before retrying.",
|
|
20
20
|
error_signin_action_stale: "That prompt changed or was already answered. Refresh its status; do not submit it again.",
|
|
21
|
+
error_signin_action_invalid: "That is not a valid entry. Check it and try again.",
|
|
22
|
+
codeOnly: "Paste only the code the page shows, not the page's address.",
|
|
21
23
|
error_signin_console_only: "This backend uses the explicit console fallback.",
|
|
22
24
|
error_backend_signin_local_only: "AI accounts can be connected only on this computer. Use the local setup page, or connect later.",
|
|
23
25
|
error_signin_session_expired: "This setup session has ended. Reopen setup on the host.",
|
|
@@ -27,6 +29,7 @@ export const SIGNIN_STRINGS = {
|
|
|
27
29
|
error_signin_profile_unknown: "This account is not in the list. Add it with + Add account in Settings → Accounts, then connect it.",
|
|
28
30
|
error_auth_unconfirmed: "The CLI exited, but credentials could not be verified. Retry or connect later.",
|
|
29
31
|
error_provider_rejected: "The provider rejected this authorization. Retry or connect later.",
|
|
32
|
+
error_not_isolated: "This CLI keeps one connection for every account on this computer (the system's keyring), so this account cannot have its own. Nothing was started and no connection was changed.",
|
|
30
33
|
// #3190 Part 3c: a profile on a paired computer (the dashboard's Accounts view).
|
|
31
34
|
error_machine_unknown: "That computer is not paired any more.",
|
|
32
35
|
error_machine_offline: "That computer is offline. Start its Runtime, then try again.",
|
|
@@ -49,12 +52,14 @@ export const SIGNIN_STRINGS = {
|
|
|
49
52
|
field_code: "貼上取得的授權碼", field_start_url: "組織的 Start URL", field_region: "AWS 區域",
|
|
50
53
|
phase_method: "選擇方式", phase_code: "授權碼", phase_start_url: "Start URL", phase_region: "區域", phase_authorization: "授權",
|
|
51
54
|
choice_organization: "你的組織", choice_subscription: "Claude 訂閱",
|
|
52
|
-
|
|
55
|
+
consoleName: "{0}(主控台備援)",
|
|
53
56
|
error: "無法連接帳號。請檢查狀態、重試,或稍後連接。",
|
|
54
57
|
error_unsupported_prompt: "不支援這個 CLI 畫面。請取消並改用主控台備援。",
|
|
55
58
|
error_cleanup_failed: "無法確認登入程序已關閉。請在主機上關閉它,並重新開始設定後再試。",
|
|
56
59
|
error_signin_cleanup_failed: "無法確認登入程序已關閉。請在主機上關閉它,並重新開始設定後再試。",
|
|
57
60
|
error_signin_action_stale: "這個畫面已改變或已回答過。請重新整理狀態,不要再送一次。",
|
|
61
|
+
error_signin_action_invalid: "這不是有效的輸入。請檢查後再試一次。",
|
|
62
|
+
codeOnly: "只貼上頁面顯示的授權碼,不要貼網址。",
|
|
58
63
|
error_signin_console_only: "這個後端使用主控台備援。",
|
|
59
64
|
error_backend_signin_local_only: "AI 帳號只能在這台電腦上連接。請使用本機的設定頁,或稍後連接。",
|
|
60
65
|
error_signin_session_expired: "這個設定工作階段已結束。請在主機上重新開啟設定。",
|
|
@@ -64,6 +69,7 @@ export const SIGNIN_STRINGS = {
|
|
|
64
69
|
error_signin_profile_unknown: "清單裡沒有這個帳號。請先在 設定 → 帳號 用 + 新增帳號 加入,再連接。",
|
|
65
70
|
error_auth_unconfirmed: "CLI 已結束,但無法確認憑證。請重試或稍後連接。",
|
|
66
71
|
error_provider_rejected: "平台拒絕了這次授權。請重試或稍後連接。",
|
|
72
|
+
error_not_isolated: "這個 CLI 在這台電腦上只保留一份連接(系統鑰匙圈),所以這個帳號無法有自己的連接。沒有啟動任何東西,也沒有改到現有的連接。",
|
|
67
73
|
// #3190 Part 3c:配對電腦上的憑證設定檔(儀表板的「帳號」頁)。
|
|
68
74
|
error_machine_unknown: "那台電腦已不再配對。",
|
|
69
75
|
error_machine_offline: "那台電腦離線了。請先啟動它的 Runtime,再試一次。",
|
|
@@ -94,10 +100,12 @@ const pageLang = doc => /^zh/i.test(doc?.documentElement?.lang || "") ? "zh-TW"
|
|
|
94
100
|
* themselves every second) and no "Sign in later" (nothing would remember it). `focus` (a backend id) then shows only that backend's card: the default account's checklist may
|
|
95
101
|
* hold others. The setup page and the installer's `?backend_signins=` list do not pass `dialog`, and look as they did.
|
|
96
102
|
*
|
|
97
|
-
* `started` (run id → void): called with the id of the run a press of Sign in in THESE cards started
|
|
98
|
-
* keeps it, to end exactly that run when it closes.
|
|
103
|
+
* `started` (run id → void): called with the id of the run a press of Sign in in THESE cards started — the id the server names as created by that very request (`started` in its
|
|
104
|
+
* answer), never one it joined that was already running (another tab's, another backend's, a double click). The account dialog keeps it, to end exactly that run when it closes.
|
|
105
|
+
* `abandoned` (run id → void): the same id, when the cards were disposed (the dialog closed) while that request was still in flight: nobody is left to show or keep the run, so
|
|
106
|
+
* whoever mounted the cards ends it by this id. Nothing is drawn, and no other run is touched.
|
|
99
107
|
*/
|
|
100
|
-
export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false, dialog = false, focus, started = () => {} } = {}) {
|
|
108
|
+
export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false, dialog = false, focus, started = () => {}, abandoned = () => {}, codeHint = () => false } = {}) {
|
|
101
109
|
const doc = root.ownerDocument;
|
|
102
110
|
let view = null, busy = false, disposed = false, timer = null, generation = 0, message = "", rendered = "";
|
|
103
111
|
const language = () => (lang ? lang() : pageLang(doc)) === "zh-TW" ? "zh-TW" : "en";
|
|
@@ -105,7 +113,10 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
105
113
|
const el = (tag, text, parent = root) => { const node = doc.createElement(tag); if (text) node.textContent = text; parent.append(node); return node; };
|
|
106
114
|
// An error is kept as its code, so it is said again in the other language when that changes.
|
|
107
115
|
const errorText = code => machine && SIGNIN_STRINGS.en["error_machine_" + code] ? tr("error_machine_" + code) : SIGNIN_STRINGS.en["error_" + code] ? tr("error_" + code) : tr("error");
|
|
108
|
-
|
|
116
|
+
// `view.console`: the CLIs the first-run list only names the console command for (cli-registry.ts `host.firstRunSignIn.mode`). Such a CLI is "(console fallback)" on that list only; in Settings
|
|
117
|
+
// → Accounts (a dialog, or a computer's own sign-in) it signs in here, so it is just its name.
|
|
118
|
+
const consoleOnly = backend => !!view && Array.isArray(view.console) && view.console.includes(backend);
|
|
119
|
+
const name = backend => !(dialog || machine) && consoleOnly(backend) ? tr("consoleName", NAMES[backend] || backend) : NAMES[backend] || backend;
|
|
109
120
|
const choiceName = choice => CHOICES[choice] ?? tr("choice_" + choice);
|
|
110
121
|
const phaseName = phase => SIGNIN_STRINGS.en["phase_" + phase] ? tr("phase_" + phase) : phase.replaceAll("_", " ");
|
|
111
122
|
const button = (parent, label, action) => { const b = el("button", label, parent); b.type = "button"; b.disabled = busy; b.onclick = action; return b; };
|
|
@@ -119,7 +130,12 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
119
130
|
async function perform(data) {
|
|
120
131
|
if (busy || disposed) return;
|
|
121
132
|
busy = true; generation++; message = ""; render();
|
|
122
|
-
try {
|
|
133
|
+
try {
|
|
134
|
+
const next = await request(data);
|
|
135
|
+
const created = data?.operation === "start" && typeof next?.started === "string" ? next.started : null; // a start that joined a run already there names none
|
|
136
|
+
if (disposed) { if (created) abandoned(created); }
|
|
137
|
+
else { if (created) started(created); accept(next); }
|
|
138
|
+
}
|
|
123
139
|
catch (error) { if (!disposed) message = String(error?.message || "error"); }
|
|
124
140
|
finally { busy = false; if (!disposed) render(); }
|
|
125
141
|
}
|
|
@@ -137,7 +153,8 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
137
153
|
const card = el("section"); card.dataset.backend = backend;
|
|
138
154
|
el("h3", name(backend), card);
|
|
139
155
|
const state = view.states[backend], pending = view.pending.includes(backend), skipped = view.skipped.includes(backend);
|
|
140
|
-
|
|
156
|
+
// "Console only" is the first-run list's word for a CLI it does not sign in; Settings → Accounts (`dialog`, or a computer's own sign-in) does, so there it is a sign-in that is needed.
|
|
157
|
+
el("p", tr(skipped ? "skipped" : state === "valid" ? "valid" : state === "not_installed" ? "notInstalled" : state === "console_only" && !(dialog || machine) ? "consoleOnly" : "needed"), card);
|
|
141
158
|
const login = view.login?.backend === backend ? view.login : null;
|
|
142
159
|
const active = login && login.phase !== "done" && !(login.phase === "failed" && login.reason);
|
|
143
160
|
if (active) {
|
|
@@ -157,13 +174,16 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
|
|
|
157
174
|
const label = el("label", tr("field_" + login.phase), card);
|
|
158
175
|
const input = el("input", null, label); input.type = login.phase === "code" ? "password" : "text"; input.autocomplete = "off"; input.spellcheck = false;
|
|
159
176
|
input.setAttribute("aria-label", label.textContent); input.disabled = busy;
|
|
177
|
+
if (login.phase === "code" && codeHint(backend)) el("small", tr("codeOnly"), card); // the CLI's own prompt also accepts the page's address; ours takes the code only (the driver and the Runtime both check)
|
|
160
178
|
button(card, tr("submit", phaseName(login.phase)), () => { const value = input.value; input.value = ""; void perform({ operation: "input", id: login.id, revision: login.revision, action: { kind: login.phase, value } }); });
|
|
161
179
|
}
|
|
162
180
|
if (["method", "code", "start_url", "region"].includes(login.phase) && !login.canAct) el("p", tr("answerSent"), card);
|
|
163
181
|
button(card, tr("cancel"), () => perform({ operation: "cancel" }));
|
|
164
182
|
} else {
|
|
165
183
|
if (login?.reason && login.reason !== "cancelled") el("p", errorText(login.reason), card);
|
|
166
|
-
|
|
184
|
+
// A CLI the first-run list only names the console command for (`view.console`, from the registry's `host.firstRunSignIn`) has no button there; in Settings → Accounts (a dialog, or a
|
|
185
|
+
// computer's own sign-in) the caller has already chosen a CLI the registry says can be signed in, so it does.
|
|
186
|
+
const usable = (dialog || machine || !consoleOnly(backend)) && state !== "not_installed";
|
|
167
187
|
// Ridge #3321 S01: the question names THIS card's CLI, and says what a sign-in again does to it — only Kiro signs out
|
|
168
188
|
// first (logoutArgv); Claude Code and Codex sign in again over the account they have. The dashboard passes its own
|
|
169
189
|
// in-app confirmation (`ask`); the setup page, which loads nothing else, keeps the browser's.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// AGEND-113: an account's usage block on Settings → Accounts: EVERY pool and EVERY window the account reports, as the server sends them (accounts-view.ts `accountUsage`), never one picked from
|
|
2
|
+
// several. A provider with one set of limits (Claude, Codex) draws its windows side by side, as it always did; a provider with pools (Antigravity: Gemini, Claude & others, Gemini 4 Argon) draws a
|
|
3
|
+
// block per pool, named, with that pool's windows in it. The meter is the Usage panel's own (`CompactMeter`); the order is the full card's. A module of its own, its stylesheet linked from here:
|
|
4
|
+
// a tab that loaded an older accounts-view.js keeps working, and nothing of the Accounts view's own strings or meter markup is touched.
|
|
5
|
+
import { html } from "/assets/app-html.js";
|
|
6
|
+
import { t } from "/assets/app-i18n.js";
|
|
7
|
+
import "/assets/view-strings.js"; // the usage panel's own words (`view.usage.metric.*`)
|
|
8
|
+
import { CompactMeter, usageClock, usageText } from "/assets/usage-meter.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The pool's name in the page's language from the usage panel's own reference (`labelI18n`), else the label the server sent. Text only; a reference that does not name a
|
|
12
|
+
* `usage.metric.*` word is not looked up.
|
|
13
|
+
*/
|
|
14
|
+
export function poolName(pool) {
|
|
15
|
+
if (!pool || typeof pool.label !== "string") return "";
|
|
16
|
+
const ref = pool.labelI18n;
|
|
17
|
+
if (ref && typeof ref.key === "string" && /^usage\.metric\.[a-z_]+$/.test(ref.key)) {
|
|
18
|
+
const key = `view.${ref.key}`, word = t(key);
|
|
19
|
+
if (word && word !== key) return (Array.isArray(ref.args) ? ref.args : []).reduce((text, value, i) => text.split(`{${i}}`).join(String(value)), word);
|
|
20
|
+
}
|
|
21
|
+
return pool.label;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** This module's stylesheet, linked once (an older accounts.css has no rules for it). */
|
|
25
|
+
function linkPoolCss(doc = typeof document !== "undefined" ? document : null) {
|
|
26
|
+
try {
|
|
27
|
+
if (!doc || !doc.head || doc.querySelector('link[data-accounts-usage-pool-css="1"]')) return;
|
|
28
|
+
const link = doc.createElement("link");
|
|
29
|
+
link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/accounts-usage-pool.css"); link.setAttribute("data-accounts-usage-pool-css", "1");
|
|
30
|
+
doc.head.appendChild(link);
|
|
31
|
+
} catch { /* the block still reads without it */ }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* One window: the Usage panel's meter with its tag ("5h", "7d"). A window that has reset since the numbers were read has no number to trust, so it says so, in the full card's own words,
|
|
36
|
+
* instead of the old percent.
|
|
37
|
+
*/
|
|
38
|
+
function UsageWindow({ w, tag }) {
|
|
39
|
+
if (w.resetPassed) {
|
|
40
|
+
const note = usageText("", { key: "usage.metric.reset_since", args: [usageClock(w.resetsAt)] });
|
|
41
|
+
return html`<span class="u-cm s-usage-reset" title=${note}><span class="u-cm-tag">${tag}</span><span class="s-usage-reset-note">${note}</span></span>`;
|
|
42
|
+
}
|
|
43
|
+
return html`<${CompactMeter} m=${{ used: Number(w.percent) || 0, windowMs: w.windowMs, resetsAt: w.resetsAt, label: tag }} tag=${tag} />`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* AGEND-119: what a row of last-known numbers says about why they are: the usage panel's own words for the cause ("expired · cached at 14:05") and, for anything but a transient failure, what the read
|
|
48
|
+
* said ("Access token expired …"). `info` is the server's `usageStaleInfo` (`{ cause, cachedAt, hint?, hintI18n? }`); a row from an older server has none, and then there is only the page's own mark.
|
|
49
|
+
*/
|
|
50
|
+
export function staleParts(info) {
|
|
51
|
+
if (!info || !["expired", "transient", "error"].includes(info.cause) || !info.cachedAt) return { cause: "", detail: "" };
|
|
52
|
+
const cause = usageText("", { key: `usage.stale.${info.cause}`, args: [usageClock(info.cachedAt)] });
|
|
53
|
+
const detail = info.cause !== "transient" && (info.hint || info.hintI18n) ? usageText(info.hint || "", info.hintI18n) : "";
|
|
54
|
+
return { cause, detail };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The usage block. `groups`: the server's `usageGroups` (each `{ pool?, windows: [{ kind, percent, windowMs?, resetsAt?, resetPassed? }] }`); `tagOf(window)`: the window's short name in the
|
|
59
|
+
* page's language (the Accounts view's own words); `stale`/`staleText`: the numbers are the last known ones, `staleInfo` (AGEND-119): why, and when they were read.
|
|
60
|
+
*/
|
|
61
|
+
export function UsageBlock({ groups, stale, tagOf, label, staleText, staleInfo }) {
|
|
62
|
+
const pooled = groups.length > 1 || groups.some((g) => g.pool);
|
|
63
|
+
if (pooled) linkPoolCss();
|
|
64
|
+
const cls = `s-account-usage${stale ? " is-stale" : ""}${pooled ? " is-pooled" : ""}`;
|
|
65
|
+
return html`<div class=${cls} role="group" aria-label=${label}>
|
|
66
|
+
${pooled ? groups.map((g, i) => {
|
|
67
|
+
const name = poolName(g.pool);
|
|
68
|
+
return html`<div key=${i} class="s-usage-group" role="group" aria-label=${name || label}>
|
|
69
|
+
${name ? html`<small class="s-usage-pool">${name}</small>` : null}
|
|
70
|
+
${g.windows.map((w, j) => html`<${UsageWindow} key=${j} w=${w} tag=${tagOf(w)} />`)}
|
|
71
|
+
</div>`;
|
|
72
|
+
}) : groups[0].windows.map((w, j) => html`<${UsageWindow} key=${j} w=${w} tag=${tagOf(w)} />`)}
|
|
73
|
+
${stale ? (() => { const why = staleParts(staleInfo);
|
|
74
|
+
return html`<small class="s-usage-stale" title=${why.detail || undefined}>${staleText}${why.cause ? html` <span class="s-usage-stale-cause">${why.cause}</span>` : null}${why.detail ? html`<span class="s-usage-stale-detail">${why.detail}</span>` : null}</small>`; })() : null}
|
|
75
|
+
</div>`;
|
|
76
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/** Agent-only projections. Never change the shared web/slash snapshots or their caches. */
|
|
2
|
+
import type { UsagePayload } from "./usage-api.js";
|
|
3
|
+
import type { UsageReport } from "../usage-report.js";
|
|
4
|
+
export declare function agentUsage(payload: UsagePayload, detail?: boolean, now?: number): UsagePayload | {
|
|
5
|
+
fetchedAt: string;
|
|
6
|
+
refreshing?: boolean | undefined;
|
|
7
|
+
providers: {
|
|
8
|
+
name: string;
|
|
9
|
+
profile?: string | undefined;
|
|
10
|
+
plan?: string | undefined;
|
|
11
|
+
unlimited?: boolean | undefined;
|
|
12
|
+
windows: string[];
|
|
13
|
+
binding?: string[] | undefined;
|
|
14
|
+
status?: string | undefined;
|
|
15
|
+
}[];
|
|
16
|
+
note?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
/** The report has already been scoped to the caller before it reaches this projection. */
|
|
19
|
+
export declare function agentUsageReport(r: UsageReport, top?: number, detail?: boolean): {
|
|
20
|
+
basis: string;
|
|
21
|
+
range: {
|
|
22
|
+
kind: import("../usage-report.js").UsageRange["kind"];
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
};
|
|
26
|
+
zone: string;
|
|
27
|
+
granularity: "hour";
|
|
28
|
+
group: "backend" | "instance" | "model" | "profile" | "team";
|
|
29
|
+
rows: ({
|
|
30
|
+
input: number;
|
|
31
|
+
output: number;
|
|
32
|
+
reasoning: number;
|
|
33
|
+
cacheRead: number;
|
|
34
|
+
cacheWrite5m: number;
|
|
35
|
+
cacheWrite1h: number;
|
|
36
|
+
cacheWrite: number;
|
|
37
|
+
requests: number;
|
|
38
|
+
key: string;
|
|
39
|
+
reasoningReported: boolean;
|
|
40
|
+
estimated: boolean;
|
|
41
|
+
amountEstimated: number | null;
|
|
42
|
+
total: number;
|
|
43
|
+
messages: number | null;
|
|
44
|
+
amount: number | null;
|
|
45
|
+
priced: "all" | "partial" | "none";
|
|
46
|
+
flags: string[];
|
|
47
|
+
unpriced: string[];
|
|
48
|
+
instances: string[];
|
|
49
|
+
backends: string[];
|
|
50
|
+
models: string[];
|
|
51
|
+
profiles: string[];
|
|
52
|
+
speed: import("../usage-report.js").UsageSpeed | null;
|
|
53
|
+
basis: string;
|
|
54
|
+
} | {
|
|
55
|
+
input: number;
|
|
56
|
+
output: number;
|
|
57
|
+
reasoning: number;
|
|
58
|
+
cacheRead: number;
|
|
59
|
+
cacheWrite5m: number;
|
|
60
|
+
cacheWrite1h: number;
|
|
61
|
+
cacheWrite: number;
|
|
62
|
+
requests: number;
|
|
63
|
+
key: string;
|
|
64
|
+
reasoningReported: boolean;
|
|
65
|
+
estimated: boolean;
|
|
66
|
+
amountEstimated: number | null;
|
|
67
|
+
total: number;
|
|
68
|
+
messages: number | null;
|
|
69
|
+
amount: number | null;
|
|
70
|
+
priced: "all" | "partial" | "none";
|
|
71
|
+
flags: string[];
|
|
72
|
+
unpriced: string[];
|
|
73
|
+
instances: string[];
|
|
74
|
+
backends: string[];
|
|
75
|
+
models: string[];
|
|
76
|
+
profiles: string[];
|
|
77
|
+
})[];
|
|
78
|
+
more: number;
|
|
79
|
+
totals: {
|
|
80
|
+
input: number;
|
|
81
|
+
output: number;
|
|
82
|
+
reasoning: number;
|
|
83
|
+
cacheRead: number;
|
|
84
|
+
cacheWrite5m: number;
|
|
85
|
+
cacheWrite1h: number;
|
|
86
|
+
cacheWrite: number;
|
|
87
|
+
requests: number;
|
|
88
|
+
key: string;
|
|
89
|
+
reasoningReported: boolean;
|
|
90
|
+
estimated: boolean;
|
|
91
|
+
amountEstimated: number | null;
|
|
92
|
+
total: number;
|
|
93
|
+
messages: number | null;
|
|
94
|
+
amount: number | null;
|
|
95
|
+
priced: "all" | "partial" | "none";
|
|
96
|
+
flags: string[];
|
|
97
|
+
unpriced: string[];
|
|
98
|
+
instances: string[];
|
|
99
|
+
backends: string[];
|
|
100
|
+
models: string[];
|
|
101
|
+
profiles: string[];
|
|
102
|
+
speed: import("../usage-report.js").UsageSpeed | null;
|
|
103
|
+
basis: string;
|
|
104
|
+
} | {
|
|
105
|
+
input: number;
|
|
106
|
+
output: number;
|
|
107
|
+
reasoning: number;
|
|
108
|
+
cacheRead: number;
|
|
109
|
+
cacheWrite5m: number;
|
|
110
|
+
cacheWrite1h: number;
|
|
111
|
+
cacheWrite: number;
|
|
112
|
+
requests: number;
|
|
113
|
+
key: string;
|
|
114
|
+
reasoningReported: boolean;
|
|
115
|
+
estimated: boolean;
|
|
116
|
+
amountEstimated: number | null;
|
|
117
|
+
total: number;
|
|
118
|
+
messages: number | null;
|
|
119
|
+
amount: number | null;
|
|
120
|
+
priced: "all" | "partial" | "none";
|
|
121
|
+
flags: string[];
|
|
122
|
+
unpriced: string[];
|
|
123
|
+
instances: string[];
|
|
124
|
+
backends: string[];
|
|
125
|
+
models: string[];
|
|
126
|
+
profiles: string[];
|
|
127
|
+
};
|
|
128
|
+
notMeasured: {
|
|
129
|
+
name: string;
|
|
130
|
+
backend: string;
|
|
131
|
+
reason: "credit_billed" | "unsupported" | "no_data";
|
|
132
|
+
}[];
|
|
133
|
+
shared: {
|
|
134
|
+
name: string;
|
|
135
|
+
backend: string;
|
|
136
|
+
with: string[];
|
|
137
|
+
}[];
|
|
138
|
+
scanning: {
|
|
139
|
+
active: boolean;
|
|
140
|
+
caughtUp: boolean;
|
|
141
|
+
pendingBytes: number;
|
|
142
|
+
pendingFiles: number;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const number = (n) => Number.isFinite(n) ? String(Math.round(n * 10) / 10) : "unknown";
|
|
2
|
+
const label = (m) => m.pool ? `${m.pool.label} / ${m.label}` : m.label;
|
|
3
|
+
function time(iso, now, kind) {
|
|
4
|
+
if (!iso)
|
|
5
|
+
return "";
|
|
6
|
+
const ms = Date.parse(iso) - now;
|
|
7
|
+
if (!Number.isFinite(ms))
|
|
8
|
+
return ` (${kind} unknown)`;
|
|
9
|
+
if (ms <= 0)
|
|
10
|
+
return ` (${kind === "reset" ? "reset due" : "expired"})`;
|
|
11
|
+
const minutes = Math.ceil(ms / 60_000);
|
|
12
|
+
const days = Math.floor(minutes / 1440), hours = Math.floor(minutes % 1440 / 60), mins = minutes % 60;
|
|
13
|
+
const duration = days ? `${days}d${hours ? `${hours}h` : ""}` : hours ? `${hours}h${mins ? `${mins}m` : ""}` : `${mins}m`;
|
|
14
|
+
return ` (${kind} ${duration})`;
|
|
15
|
+
}
|
|
16
|
+
function metric(m, now) {
|
|
17
|
+
let value;
|
|
18
|
+
if (m.resetPassed)
|
|
19
|
+
value = "unknown (previous window reset)";
|
|
20
|
+
else if (m.type === "percent")
|
|
21
|
+
value = m.used === undefined ? "unknown" : `${number(m.used)}%`;
|
|
22
|
+
else if (m.type === "dollars")
|
|
23
|
+
value = m.used === undefined ? "unknown" : `$${m.used.toFixed(2)}${m.limit === undefined ? "" : `/$${m.limit.toFixed(2)}`}`;
|
|
24
|
+
else
|
|
25
|
+
value = `${m.value ?? "unknown"}${m.unit ? ` ${m.unit}` : ""}`;
|
|
26
|
+
// An expiring allowance (bonus credits) is not a refilling quota.
|
|
27
|
+
const reset = time(m.resetsAt, now, m.resetKind === "expiry" ? "expires" : "reset");
|
|
28
|
+
const expiry = time(m.expiresAt, now, "expires");
|
|
29
|
+
return `${label(m)} ${value}${reset}${expiry}${m.note && !/^binding\b/.test(m.note) ? ` · ${m.note}` : ""}`;
|
|
30
|
+
}
|
|
31
|
+
function account(p, now) {
|
|
32
|
+
const binding = p.metrics.filter(m => /^binding\b/.test(m.note ?? "")).map(label);
|
|
33
|
+
const status = [
|
|
34
|
+
p.status !== "ok" ? p.status : "",
|
|
35
|
+
p.stale ? `stale${p.staleCause ? ` (${p.staleCause})` : ""}` : p.transient ? "temporarily unavailable" : "",
|
|
36
|
+
p.cachedAt ? `cached ${p.cachedAt}` : "",
|
|
37
|
+
...new Set([p.error, p.hint].filter(Boolean)),
|
|
38
|
+
].filter(Boolean).join("; ");
|
|
39
|
+
return {
|
|
40
|
+
name: p.name,
|
|
41
|
+
...(p.profile ? { profile: p.profile } : {}),
|
|
42
|
+
...(p.plan ? { plan: p.plan } : {}),
|
|
43
|
+
...(p.unlimited ? { unlimited: true } : {}),
|
|
44
|
+
windows: p.metrics.map(m => metric(m, now)),
|
|
45
|
+
// Only vendor-reported binding evidence; highest percentage alone is not proof.
|
|
46
|
+
...(binding.length ? { binding } : {}),
|
|
47
|
+
...(status ? { status } : {}),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function agentUsage(payload, detail = false, now = Date.now()) {
|
|
51
|
+
if (detail)
|
|
52
|
+
return payload;
|
|
53
|
+
const hasCapacity = payload.providers.some(p => p.metrics.some(m => !!m.capacity));
|
|
54
|
+
return {
|
|
55
|
+
fetchedAt: payload.fetchedAt,
|
|
56
|
+
...(payload.refreshing ? { refreshing: true } : {}),
|
|
57
|
+
providers: payload.providers.map(p => account(p, now)),
|
|
58
|
+
...(hasCapacity ? { note: "Counts only this fleet's agents; use of the same account elsewhere makes capacity estimates low. detail:true includes capacity." } : {}),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** The report has already been scoped to the caller before it reaches this projection. */
|
|
62
|
+
export function agentUsageReport(r, top = 10, detail = false) {
|
|
63
|
+
const row = (value) => {
|
|
64
|
+
if (detail)
|
|
65
|
+
return { ...value, basis: r.basis };
|
|
66
|
+
const { speed: _speed, ...compact } = value;
|
|
67
|
+
return compact;
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
basis: r.basis, range: r.range, zone: r.zone, granularity: r.granularity, group: r.group,
|
|
71
|
+
rows: r.rows.slice(0, top).map(row), more: Math.max(0, r.rows.length - top),
|
|
72
|
+
totals: row(r.totals), notMeasured: r.notMeasured, shared: r.shared, scanning: r.sc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,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ;KAC1F,CAAC;AACJ,CAAC"}
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
* usage provider, and a restart just means the alert reappears the next time an
|
|
15
15
|
* instance hits the cap.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* AGEND-250 (#3771 review P2-6): the key an Antigravity individual-cap alert is kept under, per account: `antigravity` for the default sign-in, `antigravity:<profile>` for a named account (the
|
|
19
|
+
* profile an agent was LAUNCHED with, its binding, not whatever the configuration says now). The cap belongs to the Google account the agent's own login is, so a cap seen by one account's agent
|
|
20
|
+
* is never shown on another's row.
|
|
21
|
+
*/
|
|
22
|
+
export declare function antigravityCapKey(profile: string | null | undefined): string;
|
|
17
23
|
/**
|
|
18
24
|
* `Resets in 139h12m12s` → milliseconds. Null when the text carries no such
|
|
19
25
|
* phrase — the caller falls back to a default TTL rather than guessing.
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* instance hits the cap.
|
|
16
16
|
*/
|
|
17
17
|
const alerts = new Map();
|
|
18
|
+
/**
|
|
19
|
+
* AGEND-250 (#3771 review P2-6): the key an Antigravity individual-cap alert is kept under, per account: `antigravity` for the default sign-in, `antigravity:<profile>` for a named account (the
|
|
20
|
+
* profile an agent was LAUNCHED with, its binding, not whatever the configuration says now). The cap belongs to the Google account the agent's own login is, so a cap seen by one account's agent
|
|
21
|
+
* is never shown on another's row.
|
|
22
|
+
*/
|
|
23
|
+
export function antigravityCapKey(profile) { return profile ? `antigravity:${profile.toLowerCase()}` : "antigravity"; }
|
|
18
24
|
/**
|
|
19
25
|
* `Resets in 139h12m12s` → milliseconds. Null when the text carries no such
|
|
20
26
|
* phrase — the caller falls back to a default TTL rather than guessing.
|
|
@@ -1 +1 @@
|
|
|
1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,CAAC,GAAG,IAAI,CAAC;AACxF,CAAC;AAED,oEAAoE;AACpE,MAAM,oBAAoB,GAAG,EAAE,GAAG,MAAM,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB,EAAE,OAAe,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IAC3F,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE;QACrB,OAAO;QACP,UAAU,EAAE,GAAG,GAAG,CAAC,SAAS,IAAI,oBAAoB,CAAC;QACrD,YAAY,EAAE,GAAG;KAClB,CAAC,CAAC;AACL,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,oBAAoB,CAAC,UAAkB,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IAEvE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QAC5B,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC"}
|
|
@@ -288,7 +288,7 @@ interface AgyCodeAssist {
|
|
|
288
288
|
/** The plan's name from loadCodeAssist: the paid tier's, else the current tier's (its name, else its id), else null; at most
|
|
289
289
|
* AGY_PLAN_MAX characters (it is a badge on one line, and the text comes from the server). */
|
|
290
290
|
export declare function agyPlan(body: AgyCodeAssist | null): string | null;
|
|
291
|
-
export declare function fetchAntigravityUsage(): Promise<Omit<ProviderUsage, "id" | "name">>;
|
|
291
|
+
export declare function fetchAntigravityUsage(storeHome?: string, scope?: ClaudeUsageScope): Promise<Omit<ProviderUsage, "id" | "name">>;
|
|
292
292
|
/**
|
|
293
293
|
* When the soonest of the still-available reset tickets expires (#1244): min(expires_at) over the tickets whose status
|
|
294
294
|
* is "available", skipping ones with no expiry or one already past. null when there is none — or when the list cannot
|
|
@@ -333,7 +333,7 @@ export declare function fetchMuseUsage(): Promise<Omit<ProviderUsage, "id" | "na
|
|
|
333
333
|
* auth files point at these same logical sources.
|
|
334
334
|
*/
|
|
335
335
|
export declare function providersForConfig(config: UsageFleetConfig, base?: UsageProvider[]): UsageProvider[];
|
|
336
|
-
/** #2236: a Claude login's row — kept on screen whether or not a running instance uses it. */
|
|
336
|
+
/** #2236: a Claude login's row — kept on screen whether or not a running instance uses it. (Antigravity's accounts are read for Settings → Accounts without that filter; the usage panel still shows only the ones an agent uses.) */
|
|
337
337
|
export declare function isHostLoginUsageProvider(id: string): boolean;
|
|
338
338
|
/**
|
|
339
339
|
* ClassicBot channels are bindings too (#1220): a channel on a credential
|