@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
|
@@ -11,18 +11,24 @@ import { Dialog } from "/assets/ui-dialog.js";
|
|
|
11
11
|
import { register, t } from "/assets/app-i18n.js";
|
|
12
12
|
import { toast } from "/assets/ui-toast.js";
|
|
13
13
|
import { routePath, detailsPath } from "/assets/app-route.js";
|
|
14
|
-
import { supportsInstanceFeature } from "/assets/instance-nav.js";
|
|
14
|
+
import { labelOf, modelText, supportsInstanceFeature } from "/assets/instance-nav.js";
|
|
15
|
+
import { modelLabel } from "./model-picker.js";
|
|
15
16
|
import { agentRoute, PANE_VIEWS, twoPaneFits } from "/assets/chat-workspace-model.js";
|
|
16
17
|
import { workspaceMemory } from "/assets/chat-workspace-memory.js";
|
|
17
|
-
import
|
|
18
|
+
import * as workspaceNavigation from "./chat-workspace-navigation.js";
|
|
19
|
+
import { floatBox, splitSize } from "/assets/pane-geometry.js";
|
|
20
|
+
import { createWorkspaceGestures, geometryText } from "./chat-workspace-gestures.js";
|
|
21
|
+
import { createPanePopout, popoutText } from "./chat-popout.js";
|
|
18
22
|
|
|
19
23
|
register("chatWorkspace", {
|
|
20
24
|
en: { beside: "Open beside", replace: "Replace: {0}", split: "Split chat", choose: "Choose a second agent", current: "Focused pane", currentShort: "Active",
|
|
21
25
|
right: "Side by side", stack: "Top and bottom", swap: "Swap positions", close: "Close this pane", other: "Focus the other pane",
|
|
22
|
-
|
|
26
|
+
paneGroup: "Pane", agentGroup: "Agent", appearanceGroup: "Appearance", deleteGroup: "Delete", modelEffort: "Model and effort…",
|
|
27
|
+
unavailable: "Split chat could not load. Your current chat is unchanged. Reload this page to try again.", pane: "{0} · {1}", quote: "Quote into the other pane ({0})", quoteAgain: "Finish or discard the other pane's settings, then quote again." },
|
|
23
28
|
"zh-TW": { beside: "在旁邊開啟", replace: "取代:{0}", split: "分割對話", choose: "選擇第二個 Agent", current: "目前窗格", currentShort: "目前",
|
|
24
29
|
right: "左右排列", stack: "上下排列", swap: "交換位置", close: "收起此格", other: "切換到另一窗格",
|
|
25
|
-
|
|
30
|
+
paneGroup: "窗格", agentGroup: "Agent", appearanceGroup: "外觀", deleteGroup: "刪除", modelEffort: "模型與強度…",
|
|
31
|
+
unavailable: "未能載入分割對話。目前對話不變;請重新整理頁面再試。", pane: "{0}・{1}", quote: "引用到另一格({0})", quoteAgain: "請先完成或放棄另一窗格的設定變更,再次引用。" },
|
|
26
32
|
});
|
|
27
33
|
export const tw = (key, ...values) => t(`chatWorkspace.${key}`, ...values);
|
|
28
34
|
const viewLabel = view => t(`app.${view === "details" ? "details" : view}`);
|
|
@@ -34,7 +40,8 @@ export async function verifyWorkspaceDependencies({ chat, details, log, view })
|
|
|
34
40
|
import("/assets/instance-switch.js"), import("/assets/ui-menu.js"), import("/assets/view-roster-store.js"),
|
|
35
41
|
import("/assets/chat-composer.js"), import("./image-lightbox.js"), import("/assets/preview-panel.js"),
|
|
36
42
|
import("./agent-runtime-settings.js"), import("./agent-export-dialog.js"), import("/assets/app-session.js")]);
|
|
37
|
-
if (
|
|
43
|
+
if (getComputedStyle(document.documentElement).getPropertyValue("--chat-workspace-geometry-version").trim() !== "1"
|
|
44
|
+
|| !workspaceNavigation.workspaceGeometryVersion || !paneState.usePaneState || !chat.ChatPanel.workspaceVersion || !details.DetailsPanel.workspaceVersion || !log.LogPanel.workspaceVersion || !view.ViewPanel.workspaceVersion
|
|
38
45
|
|| !fields.AgentFields.paneIds || !fields.ClassicFields.paneIds || !native.NativeFields.paneIds
|
|
39
46
|
|| !quote.installQuoteSelection.workspaceVersion || !tabs.InstanceSwitch.workspaceVersion || !menu.Menu.workspaceVersion || !roster.followRoster
|
|
40
47
|
|| !composer.ComposerInput.paneIds || !composer.WorkBarView.paneIds || !image.LightboxHost.paneOwner
|
|
@@ -89,17 +96,36 @@ export function PaneHeader({ title, sub, headingRef, nav, notice, pageControls,
|
|
|
89
96
|
}, [pane.focused, pageControls, foldTools]);
|
|
90
97
|
useLayoutEffect(() => () => pane.controls.release(token.current), []);
|
|
91
98
|
const tabs = pane.tabs.filter(tab => !pane.visibleTabs.includes(tab));
|
|
99
|
+
const app = useStore(appStore), inst = app.instances.find(it => it.name === pane.name);
|
|
100
|
+
const inherited = (pane.focused ? pageActions || [] : []).filter(item => item && !item.heading
|
|
101
|
+
&& !["splitChat", "split", "pane-backend", "pane-model", "pane-effort"].includes(item.key) && item.label !== tw("split"));
|
|
102
|
+
const appearance = item => /^(identity-color|theme-|page-|widget-|ambient-|fullWidth)/.test(item.key || "");
|
|
103
|
+
const group = (key, actions) => actions.length ? [{ key: `${key}-heading`, heading: true, label: tw(`${key}Group`) }, ...actions.map(item => ({ ...item, icon: item.icon || "settings" }))] : [];
|
|
104
|
+
const value = inst && [modelLabel(inst.model || modelText(inst) || ""), inst.effort || (inst.effort_supported ? "auto" : "")].filter(Boolean).join(" · ");
|
|
92
105
|
const items = [
|
|
93
|
-
...
|
|
94
|
-
{ key:
|
|
95
|
-
{ key: "
|
|
96
|
-
{ key: "
|
|
97
|
-
{ key: "
|
|
106
|
+
...group("pane", [
|
|
107
|
+
...tabs.map(view => ({ key: `tab-${view}`, label: viewLabel(view), icon: view === "details" ? "settings" : view === "log" ? "file" : view, onSelect: () => pane.navigate(routePath({ panel: view, instance: pane.name })) })),
|
|
108
|
+
{ key: "right", label: tw("right"), icon: "sidebar", checked: pane.layout === "right", onSelect: () => pane.controller.layout("right") },
|
|
109
|
+
{ key: "stack", label: tw("stack"), icon: "down", checked: pane.layout === "stack", onSelect: () => pane.controller.layout("stack") },
|
|
110
|
+
{ key: "float", label: geometryText("float"), icon: "external", checked: pane.floating, onSelect: () => pane.controller.layout("float", pane.id) },
|
|
111
|
+
...(pane.floating ? [{ key: "move-float", label: geometryText("move"), icon: "fullscreen", onSelect: () => pane.gestures.keyboard("move", pane.id) },
|
|
112
|
+
{ key: "resize-float", label: geometryText("resize"), icon: "fitwidth", onSelect: () => pane.gestures.keyboard("resize", pane.id) }] : []),
|
|
113
|
+
...(pane.layout !== "float" ? [{ key: "halves", label: geometryText("reset"), icon: "restart", onSelect: () => pane.controller.geometry({ ratio: .5 }) }] : []),
|
|
114
|
+
{ key: "swap", label: tw("swap"), icon: "restart", onSelect: () => pane.controller.swap() },
|
|
115
|
+
{ key: "other", label: tw("other"), icon: "sidebar", onSelect: () => pane.controller.focus(pane.id === "a" ? "b" : "a", { moveFocus: true }) },
|
|
98
116
|
{ key: "split", label: tw("split"), icon: "sidebar", onSelect: () => choose(pane.controller, undefined, pane.id) },
|
|
99
|
-
{ key: "
|
|
100
|
-
|
|
117
|
+
...(pane.popout ? [{ key: "popout", label: popoutText("open"), icon: "external", onSelect: () => pane.popout.open(pane.controller, pane.id) }] : []),
|
|
118
|
+
{ key: "close", label: tw("close"), icon: "close", onSelect: () => pane.controller.closePane(pane.id) }]),
|
|
119
|
+
...group("agent", [
|
|
120
|
+
...(pane.focused && inst && supportsInstanceFeature(inst, "details") ? [{ key: "model-effort", icon: "settings", label: html`<span class="menu-label-value"><span>${tw("modelEffort")}</span><span class="menu-value" title=${value}>${value}</span></span>`, onSelect: () => pane.navigate(`${detailsPath(pane.name)}?cat=runtime`) }] : []),
|
|
121
|
+
...inherited.filter(item => !appearance(item) && item.key !== "delete")]),
|
|
122
|
+
...group("appearance", inherited.filter(appearance)),
|
|
123
|
+
...group("delete", inherited.filter(item => item.key === "delete")),
|
|
101
124
|
];
|
|
102
|
-
|
|
125
|
+
const interactive = event => event.target.closest("a,button,input,textarea,select,[contenteditable],.ws-page-tools");
|
|
126
|
+
return html`<header data-trust="header" class="panel-head ws-pane-head" draggable=${!pane.floating}
|
|
127
|
+
onDragStart=${event => { if (interactive(event) || !pane.gestures.dragStart(pane.name, event, pane.id)) event.preventDefault(); }} onDragEnd=${pane.gestures.dragEnd}
|
|
128
|
+
onPointerDown=${event => { if (pane.floating && !interactive(event)) pane.gestures.floatDown("move", pane.id, event); }}>
|
|
103
129
|
${shell.collapsed && pane.focused ? html`<button type="button" id="sbOpen" class="icon-btn sb-open" aria-label=${t("app.expand")}
|
|
104
130
|
title=${t("app.expand")} aria-controls="sidebar" onClick=${toggleSidebar}><${Icon} name="menu" /></button>` : null}
|
|
105
131
|
<div class="panel-title">${pane.focused ? html`<span class="tag ws-focus-label">${tw("currentShort")}</span>` : null}<h1 ref=${headingRef} tabindex="-1" title=${typeof title === "string" ? title : pane.name}>${title}</h1>
|
|
@@ -107,15 +133,16 @@ export function PaneHeader({ title, sub, headingRef, nav, notice, pageControls,
|
|
|
107
133
|
${nav}
|
|
108
134
|
<div class="panel-actions"><span class=${`ws-tools-slot${foldTools ? " ws-tools-folded" : ""}`} ref=${slot}></span>
|
|
109
135
|
<button type="button" class="icon-btn ws-pane-split" title=${tw("split")} aria-label=${tw("split")} onClick=${event => choose(pane.controller, event, pane.id)}><${Icon} name="sidebar" /></button>
|
|
110
|
-
<${Menu} ownerKey=${`${pane.name}:${pane.route.panel}`} inactive=${!pane.focused} onOpen=${() => pane.controller.focus(pane.id)} items=${items} label=${t("app.more")}
|
|
136
|
+
<${Menu} cls="agent-menu" fit=${true} ownerKey=${`${pane.name}:${pane.route.panel}`} inactive=${!pane.focused} onOpen=${() => pane.controller.focus(pane.id)} items=${items} label=${t("app.more")}
|
|
111
137
|
leading=${foldTools && pane.focused ? html`<div class="ws-menu-tools" role="presentation" ref=${el => { menuSlot.current = el; pane.controls.move(token.current, el || slot.current, !!el); }}></div>` : null} />
|
|
112
138
|
<button type="button" class="icon-btn ws-pane-close" title=${tw("close")} aria-label=${tw("close")} onClick=${() => pane.controller.closePane(pane.id)}><${Icon} name="close" /></button>
|
|
113
139
|
</div>${notice || null}
|
|
114
140
|
</header>`;
|
|
115
141
|
}
|
|
116
142
|
|
|
117
|
-
function Pane({ id, w, focused, compact, width, controller, controls, panels }) {
|
|
118
|
-
const pointer = useRef(false);
|
|
143
|
+
function Pane({ id, w, focused, compact, width, height, controller, controls, panels, gestures, popout }) {
|
|
144
|
+
const pointer = useRef(false), ref = useRef(null);
|
|
145
|
+
useLayoutEffect(() => { ref.current?.style.setProperty("--ws-pane-height", `${height}px`); }, [height]);
|
|
119
146
|
useEffect(() => {
|
|
120
147
|
const reset = () => { pointer.current = false; };
|
|
121
148
|
window.addEventListener("pointerup", reset); window.addEventListener("pointercancel", reset); window.addEventListener("blur", reset);
|
|
@@ -128,8 +155,8 @@ function Pane({ id, w, focused, compact, width, controller, controls, panels })
|
|
|
128
155
|
const visibleTabs = tabs.slice();
|
|
129
156
|
for (let n = visibleTabs.length - 1; visibleTabs.length > keep && n >= 0; n--) if (visibleTabs[n] !== p.route.panel) visibleTabs.splice(n, 1);
|
|
130
157
|
const value = { ...controller.pane(id), id, name: p.route.instance, route: p.route, search: p.search, hash: p.hash, focused,
|
|
131
|
-
tabs, visibleTabs: compact ? tabs : visibleTabs, width, controller, controls, layout: w.layout, Header: compact ? null : PaneHeader };
|
|
132
|
-
return html`<section class=${`ws-pane${focused ? " ws-focused" : ""}`} data-pane=${id} role="region"
|
|
158
|
+
tabs, visibleTabs: compact ? tabs : visibleTabs, width, controller, controls, gestures, popout, floating: !compact && w.layout === "float" && w.floating === id, layout: w.layout, Header: compact ? null : PaneHeader };
|
|
159
|
+
return html`<section ref=${ref} id=${`ws-pane-${id}`} class=${`ws-pane${focused ? " ws-focused" : ""}${value.floating ? " ws-floating" : ""}`} data-pane=${id} role="region"
|
|
133
160
|
aria-label=${tw("pane", p.route.instance, viewLabel(p.route.panel))} aria-current=${focused ? "true" : undefined}
|
|
134
161
|
onPointerDown=${event => {
|
|
135
162
|
pointer.current = true;
|
|
@@ -140,16 +167,28 @@ function Pane({ id, w, focused, compact, width, controller, controls, panels })
|
|
|
140
167
|
onClick=${event => { pointer.current = false; if (!event.defaultPrevented && !event.target.closest(".menu, .ws-page-tools") && !event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey && event.button === 0) controller.focus(id); }}
|
|
141
168
|
onFocusIn=${() => { if (!pointer.current) controller.focus(id); }}>
|
|
142
169
|
<${PaneScope} value=${value}><${Outlet} route=${p.route} seq=${p.seq} panels=${panels} /></${PaneScope}>
|
|
170
|
+
${value.floating ? html`<button type="button" class="ws-float-resize" aria-label=${geometryText("resize")} title=${geometryText("resize")}
|
|
171
|
+
onPointerDown=${event => gestures.floatDown("resize", id, event)} onKeyDown=${event => { if (event.key === "Enter" || event.key === " ") { event.preventDefault(); gestures.keyboard("resize", id); } }}></button>` : null}
|
|
143
172
|
${focused && !compact ? html`<span class="sr-only">${tw("current")}</span>` : null}
|
|
144
173
|
</section>`;
|
|
145
174
|
}
|
|
146
175
|
|
|
147
|
-
export function createWorkspaceHost(controller) {
|
|
176
|
+
export function createWorkspaceHost(controller, pageGestures, popout) {
|
|
148
177
|
return function WorkspaceHost({ nav, panels }) {
|
|
149
178
|
const ref = useRef(null), [size, setSize] = useState({ width: 0, height: 0, viewport: 0 });
|
|
150
179
|
const controls = useMemo(() => createPageControls(), []);
|
|
180
|
+
const gestures = useMemo(() => pageGestures || createWorkspaceGestures({ controller, getRoot: () => ref.current }), []);
|
|
181
|
+
const movement = useStore(gestures.store);
|
|
182
|
+
useLayoutEffect(() => () => { if (!pageGestures) gestures.close(); }, []);
|
|
151
183
|
const w = nav.workspace;
|
|
152
184
|
const compact = !w || !twoPaneFits(size.viewport, size.width, size.height, w.layout);
|
|
185
|
+
const chosen = { ...w, ...movement.transient };
|
|
186
|
+
const split = splitSize(size.width, size.height, w?.layout, chosen.ratio), box = floatBox(size.width, size.height, chosen.rect);
|
|
187
|
+
useLayoutEffect(() => {
|
|
188
|
+
const el = ref.current; if (!el || compact) return;
|
|
189
|
+
el.style.setProperty("--ws-first", `${split.first}px`);
|
|
190
|
+
for (const [key, value] of Object.entries(box)) el.style.setProperty(`--ws-float-${key}`, `${value}px`);
|
|
191
|
+
}, [compact, split.first, box.x, box.y, box.width, box.height]);
|
|
153
192
|
useLayoutEffect(() => {
|
|
154
193
|
if (!ref.current) return;
|
|
155
194
|
const update = () => { const r = ref.current?.getBoundingClientRect(); if (r) setSize({ width: r.width, height: r.height, viewport: window.innerWidth }); };
|
|
@@ -161,15 +200,23 @@ export function createWorkspaceHost(controller) {
|
|
|
161
200
|
useLayoutEffect(() => { if (compact) controls.close(); }, [compact]);
|
|
162
201
|
useLayoutEffect(() => () => controls.close(), []);
|
|
163
202
|
if (!w) return html`<${Outlet} route=${nav.route} seq=${nav.seq} panels=${panels} />`;
|
|
164
|
-
const ids = compact ? [w.focus] : w.flipped ? ["b", "a"] : ["a", "b"];
|
|
165
|
-
|
|
203
|
+
const ids = compact ? [w.focus] : w.layout === "float" ? [w.floating === "a" ? "b" : "a", w.floating] : w.flipped ? ["b", "a"] : ["a", "b"];
|
|
204
|
+
const paneWidth = id => compact || w.layout === "stack" ? size.width : w.layout === "float" ? id === w.floating ? box.width : size.width : id === ids[0] ? split.first : split.second;
|
|
205
|
+
const paneHeight = id => compact || w.layout === "right" ? size.height : w.layout === "float" ? id === w.floating ? box.height : size.height : id === ids[0] ? split.first : split.second;
|
|
206
|
+
return html`<div ref=${ref} class=${`chat-workspace ws-geometry ws-${compact ? "compact" : w.layout}${movement.transient || movement.keyboard ? " ws-resizing" : ""}`} data-layout=${compact ? "single" : w.layout}>
|
|
166
207
|
${compact ? html`<nav class="ws-agent-tabs seg" aria-label=${tw("choose")}>${["a", "b"].map(id => html`<span class="ws-agent-tab">
|
|
167
208
|
<button type="button" class=${`seg-item${w.focus === id ? " active" : ""}`} aria-current=${w.focus === id ? "page" : undefined}
|
|
168
209
|
title=${w[id].route.instance} onClick=${() => controller.focus(id)}><span class="ws-agent-name">${w[id].route.instance}</span></button>
|
|
169
210
|
<button type="button" class="icon-btn ws-agent-close" aria-label=${`${tw("close")}: ${w[id].route.instance}`}
|
|
170
211
|
title=${tw("close")} onClick=${() => controller.closePane(id)}><${Icon} name="close" /></button></span>`)}</nav>` : null}
|
|
171
|
-
${ids.
|
|
172
|
-
|
|
212
|
+
${ids.flatMap((id, n) => [n === 1 && !compact && w.layout !== "float" ? html`<div key="sash" class="ws-sash-slot"><div class="ws-sash" role="separator" tabindex="0"
|
|
213
|
+
aria-controls="ws-pane-a ws-pane-b" aria-label=${geometryText("sash")} title=${geometryText("reset")}
|
|
214
|
+
aria-orientation=${w.layout === "stack" ? "horizontal" : "vertical"} aria-valuemin=${Math.round(split.min)} aria-valuemax=${Math.round(split.max)} aria-valuenow=${Math.round(split.first)}
|
|
215
|
+
onKeyDown=${gestures.sashKey} onPointerDown=${gestures.sashDown} ondblclick=${() => controller.geometry({ ratio: .5 })}></div></div>` : null,
|
|
216
|
+
html`<${Pane} key=${id} id=${id} w=${w} focused=${w.focus === id} compact=${compact}
|
|
217
|
+
width=${paneWidth(id)} height=${paneHeight(id)} controller=${controller} controls=${controls} panels=${panels} gestures=${gestures} popout=${popout} />`])}
|
|
218
|
+
<span class="sr-only" role="status" aria-live="polite">${movement.announcement}</span>
|
|
219
|
+
${movement.keyboard ? html`<p class="ws-geometry-hint" role="status">${geometryText("help")}</p>` : null}
|
|
173
220
|
</div>`;
|
|
174
221
|
};
|
|
175
222
|
}
|
|
@@ -181,13 +228,20 @@ export function installWorkspaceEntry({ nav, ready, landing = false, scope = "",
|
|
|
181
228
|
let storage = null;
|
|
182
229
|
try { storage = localStorage; } catch { /* memory-only */ }
|
|
183
230
|
const memory = workspaceMemory(storage, scope);
|
|
231
|
+
const popout = createPanePopout({ scope, chat });
|
|
232
|
+
const gestures = createWorkspaceGestures({ getRoot: () => document.querySelector(".chat-workspace") || document.getElementById("main"),
|
|
233
|
+
controller: { current: () => controller?.current(), stamp: () => nav.navStore.get(), subscribe: fn => nav.navStore.subscribe(fn),
|
|
234
|
+
focus: id => controller?.focus(id), geometry: change => controller?.geometry(change) },
|
|
235
|
+
onDrop: (name, target, zone) => { if (agentRoute(nav.navStore.get().route)) void open(name, undefined, { target, zone }); } });
|
|
184
236
|
const retire = () => {
|
|
185
237
|
if (!alive) return; alive = false; memory.clear();
|
|
238
|
+
popout?.close();
|
|
186
239
|
controller?.close();
|
|
240
|
+
gestures.close();
|
|
187
241
|
window.removeEventListener("resize", refresh); document.removeEventListener("keydown", key);
|
|
188
242
|
appStore.set({ chatWorkspace: null, chatWorkspaceSessionEnd: null });
|
|
189
243
|
};
|
|
190
|
-
async function open(name, layout = "right") {
|
|
244
|
+
async function open(name, layout = "right", drop) {
|
|
191
245
|
if (!alive) return;
|
|
192
246
|
const attempt = nav.navStore.get();
|
|
193
247
|
try {
|
|
@@ -196,8 +250,8 @@ export function installWorkspaceEntry({ nav, ready, landing = false, scope = "",
|
|
|
196
250
|
if (!alive || nav.navStore.get() !== attempt) return; // a later navigation retires this loading intent
|
|
197
251
|
if (!controller) {
|
|
198
252
|
if (!nav.installNavigation || !PanelHeader.workspaceVersion) throw new Error("old shell");
|
|
199
|
-
controller = installWorkspaceNavigation(nav, { beforeLayout: services?.stopPreview,
|
|
200
|
-
onWorkspace: () => { if (!shellStore.get().workspaceHost) shellStore.set({ workspaceHost: createWorkspaceHost(controller) }); } });
|
|
253
|
+
controller = workspaceNavigation.installWorkspaceNavigation(nav, { geometry: true, beforeLayout: services?.stopPreview,
|
|
254
|
+
onWorkspace: () => { if (!shellStore.get().workspaceHost) shellStore.set({ workspaceHost: createWorkspaceHost(controller, gestures, popout) }); } });
|
|
201
255
|
let previous = null;
|
|
202
256
|
nav.navStore.subscribe(next => {
|
|
203
257
|
if (!alive) return;
|
|
@@ -210,26 +264,36 @@ export function installWorkspaceEntry({ nav, ready, landing = false, scope = "",
|
|
|
210
264
|
if (controller.current()) memory.write(controller.current());
|
|
211
265
|
}
|
|
212
266
|
}
|
|
213
|
-
if (name) controller.open(name, layout);
|
|
267
|
+
if (name) { if (drop) controller.dock(name, drop.target, drop.zone); else controller.open(name, layout); }
|
|
214
268
|
} catch { toast(tw("unavailable"), false); }
|
|
215
269
|
}
|
|
216
270
|
const entry = { open, pick: event => showDialog(AgentPicker, { controller: { current: () => controller?.current(), open }, currentName: nav.navStore.get().route?.instance, layout: event?.altKey ? "stack" : "right" }),
|
|
271
|
+
dragStart: (name, event) => agentRoute(nav.navStore.get().route) && gestures.dragStart(name, event), dragEnd: gestures.dragEnd,
|
|
217
272
|
settings: name => nav.navigate(`${detailsPath(name)}?cat=basic`),
|
|
218
273
|
quoteTargets(source) {
|
|
219
274
|
const w = controller?.current(); if (!w) return [];
|
|
220
275
|
const from = ["a", "b"].find(id => w[id].route.instance === source); if (!from) return [];
|
|
221
276
|
const id = from === "a" ? "b" : "a", name = w[id].route.instance, sourcePane = w[from];
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
277
|
+
const targetName = labelOf(appStore.get().instances.find(it => it.name === name) || { name });
|
|
278
|
+
// #3727: `commit` (optional) runs right after the quote went in, in the same turn and under the same fence — the
|
|
279
|
+
// annotated picture's attachment — so both land in this exact pane or neither does. True when they did. `live`
|
|
280
|
+
// (optional): the caller's own validity (the annotation editor still open), part of the same fence throughout the
|
|
281
|
+
// wait for the Chat mount and at the commit.
|
|
282
|
+
return [{ name, label: tw("quote", targetName), async insert(text, commit, live) {
|
|
283
|
+
const callerLive = () => typeof live !== "function" || live() === true;
|
|
284
|
+
const current = () => { const now = controller.current(); return alive && callerLive() && !!now && now[from] === sourcePane && now[id].route.instance === name; };
|
|
285
|
+
if (!current()) return false;
|
|
225
286
|
if (controller.current()[id].route.panel !== "chat") controller.pane(id).navigate(routePath({ panel: "chat", instance: name }));
|
|
226
|
-
if (!current() || controller.current()[id].route.panel !== "chat") { toast(tw("quoteAgain"), false); return; }
|
|
287
|
+
if (!current() || controller.current()[id].route.panel !== "chat") { toast(tw("quoteAgain"), false); return false; }
|
|
227
288
|
const target = controller.current()[id];
|
|
228
289
|
const valid = () => current() && controller.current()[id] === target;
|
|
229
290
|
// B may have been on Log. Wait only for that exact Chat mount; a changed destination permanently cancels.
|
|
230
291
|
const start = performance.now();
|
|
231
292
|
while (valid() && !chat.paneComposerReady(name) && performance.now() - start < 2000) await new Promise(resolve => setTimeout(resolve, 16));
|
|
232
|
-
if (valid() && performance.now() - start < 2000 && chat.insertPaneQuote(name, source, text, valid))
|
|
293
|
+
if (!(valid() && performance.now() - start < 2000 && chat.insertPaneQuote(name, source, text, valid))) return false;
|
|
294
|
+
if (typeof commit === "function") commit();
|
|
295
|
+
controller.focus(id);
|
|
296
|
+
return true;
|
|
233
297
|
} }];
|
|
234
298
|
},
|
|
235
299
|
label(name) { const w = controller?.current(); return w && ![w.a.route.instance, w.b.route.instance].includes(name)
|
package/dist/ui/cli-caps.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// GENERATED by `npx tsx scripts/gen-cli-caps.mts` from src/cli-registry.ts. Do not edit it: tests/cli-registry-ui-caps.test.ts fails while it differs from the registry.
|
|
2
2
|
// What the dashboard's scripts may ask about a CLI (see src/cli-caps-module.ts). Booleans and words only; nothing here runs anything.
|
|
3
3
|
export const CLI_CAPS = Object.freeze({
|
|
4
|
-
"claude-code": Object.freeze({ signOut: true, namedAccounts: true, carry: "carries", structuredSignIn: true, structuredNamedSignIn: true, firstRunSignIn: "browser", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "Claude Code" }),
|
|
5
|
-
"codex": Object.freeze({ signOut: true, namedAccounts: true, carry: "keeps", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "Codex" }),
|
|
6
|
-
"kiro-cli": Object.freeze({ signOut: true, namedAccounts: true, carry: "handover", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null }),
|
|
7
|
-
"antigravity": Object.freeze({ signOut:
|
|
8
|
-
"grok": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null }),
|
|
9
|
-
"muse": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null }),
|
|
10
|
-
"opencode": Object.freeze({ signOut: false, namedAccounts: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "OpenCode" }),
|
|
4
|
+
"claude-code": Object.freeze({ signOut: true, signOutFiles: false, namedAccounts: true, accountIsFolder: false, carry: "carries", structuredSignIn: true, structuredNamedSignIn: true, firstRunSignIn: "browser", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "Claude Code", runtimeDefaultLogin: false, runtimeNamedAccounts: true, codeHint: false, structuredMinVersion: null, chatSignIn: true }),
|
|
5
|
+
"codex": Object.freeze({ signOut: true, signOutFiles: false, namedAccounts: true, accountIsFolder: false, carry: "keeps", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "Codex", runtimeDefaultLogin: false, runtimeNamedAccounts: false, codeHint: false, structuredMinVersion: null, chatSignIn: true }),
|
|
6
|
+
"kiro-cli": Object.freeze({ signOut: true, signOutFiles: false, namedAccounts: true, accountIsFolder: false, carry: "handover", structuredSignIn: true, structuredNamedSignIn: false, firstRunSignIn: "browser", runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null, runtimeDefaultLogin: false, runtimeNamedAccounts: false, codeHint: false, structuredMinVersion: null, chatSignIn: true }),
|
|
7
|
+
"antigravity": Object.freeze({ signOut: true, signOutFiles: true, namedAccounts: true, accountIsFolder: true, carry: "handover", structuredSignIn: true, structuredNamedSignIn: true, firstRunSignIn: "console", runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: true, runtimeName: "Antigravity", runtimeDefaultLogin: true, runtimeNamedAccounts: true, codeHint: true, structuredMinVersion: "1.5.0", chatSignIn: false }),
|
|
8
|
+
"grok": Object.freeze({ signOut: false, signOutFiles: false, namedAccounts: false, accountIsFolder: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null, runtimeDefaultLogin: false, runtimeNamedAccounts: false, codeHint: false, structuredMinVersion: null, chatSignIn: true }),
|
|
9
|
+
"muse": Object.freeze({ signOut: false, signOutFiles: false, namedAccounts: false, accountIsFolder: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: false, runtimeUpdate: false, runtimeUpdateLatest: false, runtimeName: null, runtimeDefaultLogin: false, runtimeNamedAccounts: false, codeHint: false, structuredMinVersion: null, chatSignIn: false }),
|
|
10
|
+
"opencode": Object.freeze({ signOut: false, signOutFiles: false, namedAccounts: false, accountIsFolder: false, carry: null, structuredSignIn: false, structuredNamedSignIn: false, firstRunSignIn: null, runtimeInstall: true, runtimeUpdate: true, runtimeUpdateLatest: false, runtimeName: "OpenCode", runtimeDefaultLogin: false, runtimeNamedAccounts: false, codeHint: false, structuredMinVersion: null, chatSignIn: false }),
|
|
11
11
|
});
|
|
12
12
|
/** The CLIs the first-run page offers a sign-in for, in its order. */
|
|
13
13
|
export const FIRST_RUN_BACKENDS = Object.freeze(["kiro-cli", "claude-code", "codex", "antigravity"]);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { html } from "/assets/app-html.js";
|
|
2
2
|
import { register, t } from "/assets/app-i18n.js";
|
|
3
3
|
import { identityText } from "./account-identity.js";
|
|
4
|
+
import { capsOf } from "./cli-caps.js";
|
|
5
|
+
import { cliLabel } from "./cli-picker.js";
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
|
-
* Claude accounts on a paired Windows computer ("credential profiles"). AgEnD only ever shows and sends a profile NAME; the sign-in itself
|
|
8
|
+
* Claude (and, AGEND-124, Antigravity) accounts on a paired Windows computer ("credential profiles"). AgEnD only ever shows and sends a profile NAME; the sign-in itself
|
|
7
9
|
* stays on that computer, and a Runtime reports nothing but each name and whether it is signed in. No path, e-mail or token is read here.
|
|
8
10
|
*/
|
|
9
11
|
register("claudeAccount", {
|
|
@@ -11,28 +13,39 @@ register("claudeAccount", {
|
|
|
11
13
|
old:"Update the Runtime on that computer to choose a Claude account for this agent.",
|
|
12
14
|
empty:"No Claude accounts reported yet. On that computer run agend-runtime login claude-code NAME, then choose Detect again in that computer's CLI diagnostics (Settings → Runtime).",
|
|
13
15
|
hint:"The account is chosen by name; its connection stays on that computer. A name that does not exist or is not connected there is refused, never replaced by another account.",
|
|
14
|
-
changeNote:"Changing the account starts a new conversation."
|
|
16
|
+
changeNote:"Changing the account starts a new conversation.",
|
|
17
|
+
labelOther:"{0} account", noneOther:"This computer's own {0} connection", oldOther:"Update the Runtime on that computer to choose a {0} account for this agent.",
|
|
18
|
+
emptyOther:"No {0} accounts reported yet. Add one in Settings → Agent → Accounts, under that computer's name." },
|
|
15
19
|
"zh-TW": { label:"Claude 帳號", none:"這台電腦的預設連接", default:"預設", signedOut:"尚未連接", unchecked:"未確認", notReported:"未回報",
|
|
16
20
|
old:"請更新那台電腦上的 Runtime,才能為這個 Agent 選擇 Claude 帳號。",
|
|
17
21
|
empty:"尚未回報任何 Claude 帳號。請在那台電腦執行 agend-runtime login claude-code 名稱,再到設定 → Runtime,在該電腦的「CLI 診斷」按「重新偵測」。",
|
|
18
22
|
hint:"帳號以名稱選擇,連接資料只保留在那台電腦。不存在或尚未連接的名稱會被拒絕,不會改用其他帳號。",
|
|
19
|
-
changeNote:"更換帳號會開始新的對話。"
|
|
23
|
+
changeNote:"更換帳號會開始新的對話。",
|
|
24
|
+
labelOther:"{0} 帳號", noneOther:"這台電腦自己的 {0} 連接", oldOther:"請更新那台電腦上的 Runtime,才能為這個 Agent 選擇 {0} 帳號。",
|
|
25
|
+
emptyOther:"尚未回報任何 {0} 帳號。請到設定 → Agent → 帳號,在該電腦的名稱下新增。" },
|
|
20
26
|
});
|
|
21
27
|
export const accountText = (key, ...values) => t(`claudeAccount.${key}`, ...values);
|
|
22
28
|
|
|
23
|
-
/**
|
|
24
|
-
export
|
|
25
|
-
|
|
29
|
+
/** The CLIs whose accounts an agent on a computer can choose (the registry's `runtime.namedAccounts`, as cli-caps.js renders it), and what each is called here. */
|
|
30
|
+
export const accountCli = backend => !!(capsOf(backend) && capsOf(backend).runtimeNamedAccounts);
|
|
31
|
+
const productOf = backend => backend === "claude-code" ? "Claude" : cliLabel(backend);
|
|
32
|
+
/** What a computer reports: whether its Runtime can choose an account (`backend`: of this CLI, default Claude Code), each account's name and signed-in yes/no, and its default name. */
|
|
33
|
+
export function credentialProfileView(machine, backend = "claude-code") {
|
|
34
|
+
const caps = machine?.runtimeInfo?.capabilities;
|
|
35
|
+
// Claude Code's come with `credential-profiles`; any other CLI's also need the capability of its own (`accounts-<id>`): an older Runtime would run the agent on the Windows user's own login.
|
|
36
|
+
const capable = caps?.includes("credential-profiles") === true && (backend === "claude-code" || caps.includes(`accounts-${backend}`));
|
|
26
37
|
const report = machine?.inventory?.credentialProfiles;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
const own = backend === "claude-code" ? report?.profiles : report?.byCli?.[backend];
|
|
39
|
+
const profiles = Array.isArray(own) ? own.filter(row => row && typeof row.name === "string") : [];
|
|
40
|
+
// The default sign-in's own account, for the "default sign-in" choice: the identity of the REQUESTED CLI on that computer, as its last detection saw it (AGEND-250, #3771 review P2-7: the computer's
|
|
41
|
+
// Claude identity must never label an Antigravity choice; a CLI that reports no identity shows none).
|
|
42
|
+
const ownCli = Array.isArray(machine?.inventory?.clis) ? machine.inventory.clis.find(cli => cli?.id === backend) : undefined;
|
|
43
|
+
const defaultName = backend === "claude-code" && typeof report?.default === "string" ? report.default : "";
|
|
44
|
+
return { capable, profiles, defaultName, machineIdentity: identityText(profiles.find(row => row.name === defaultName)?.identity ?? ownCli?.identity) };
|
|
32
45
|
}
|
|
33
46
|
export const credentialProfileState = loggedIn => loggedIn === true ? "signedIn" : loggedIn === false ? "signedOut" : "unchecked";
|
|
34
|
-
/** The choice exists
|
|
35
|
-
export const offersClaudeAccount = (machine, backend) => !!machine && backend
|
|
47
|
+
/** The choice exists for Claude Code and Antigravity (a CLI with named accounts on a computer) on a paired computer. */
|
|
48
|
+
export const offersClaudeAccount = (machine, backend) => !!machine && accountCli(backend);
|
|
36
49
|
|
|
37
50
|
/**
|
|
38
51
|
* `value` is the chosen name ("" = the computer's own sign-in). A signed-out account is listed but cannot be chosen; one that is
|
|
@@ -40,15 +53,15 @@ export const offersClaudeAccount = (machine, backend) => !!machine && backend ==
|
|
|
40
53
|
*/
|
|
41
54
|
export function ClaudeAccountSelect({ machine, backend, value, onChange, id, disabled = false, changeNote = false }) {
|
|
42
55
|
if (!offersClaudeAccount(machine, backend)) return null;
|
|
43
|
-
const view = credentialProfileView(machine), known = view.profiles.some(row => row.name === value);
|
|
44
|
-
const locked = disabled || !view.capable;
|
|
45
|
-
return html`<div class="claude-account-field"><label class="field"><span>${accountText("label")}</span>
|
|
56
|
+
const view = credentialProfileView(machine, backend), known = view.profiles.some(row => row.name === value);
|
|
57
|
+
const locked = disabled || !view.capable, claude = backend === "claude-code", product = productOf(backend);
|
|
58
|
+
return html`<div class="claude-account-field"><label class="field"><span>${claude ? accountText("label") : accountText("labelOther", product)}</span>
|
|
46
59
|
<select id=${id} value=${value || ""} disabled=${locked} onChange=${event => onChange(event.target.value)}>
|
|
47
|
-
<option value="">${accountText("none")}${view.machineIdentity ? ` · ${view.machineIdentity}` : ""}</option>
|
|
60
|
+
<option value="">${claude ? accountText("none") : accountText("noneOther", product)}${view.machineIdentity ? ` · ${view.machineIdentity}` : ""}</option>
|
|
48
61
|
${view.profiles.map(row => html`<option key=${row.name} value=${row.name} disabled=${row.loggedIn === false}>${row.name}${row.identity ? ` · ${identityText(row.identity)}` : ""}${row.loggedIn === false ? ` · ${accountText("signedOut")}` : row.loggedIn === null ? ` · ${accountText("unchecked")}` : ""}${row.name === view.defaultName ? ` · ${accountText("default")}` : ""}</option>`)}
|
|
49
62
|
${value && !known ? html`<option key=${value} value=${value}>${value} · ${accountText("notReported")}</option>` : null}
|
|
50
63
|
</select></label>
|
|
51
|
-
${!view.capable ? html`<p class="note claude-account-old" role="status">${accountText("old")}</p>`
|
|
52
|
-
: !view.profiles.length ? html`<p class="note claude-account-empty">${accountText("empty")}</p>` : html`<p class="note">${accountText("hint")}</p>`}
|
|
64
|
+
${!view.capable ? html`<p class="note claude-account-old" role="status">${claude ? accountText("old") : accountText("oldOther", product)}</p>`
|
|
65
|
+
: !view.profiles.length ? html`<p class="note claude-account-empty">${claude ? accountText("empty") : accountText("emptyOther", product)}</p>` : html`<p class="note">${accountText("hint")}</p>`}
|
|
53
66
|
${changeNote ? html`<p class="note claude-account-change">${accountText("changeNote")}</p>` : null}</div>`;
|
|
54
67
|
}
|
package/dist/ui/host-install.js
CHANGED
|
@@ -225,10 +225,10 @@ export function VersionLine({ row, label, blocked = false }) {
|
|
|
225
225
|
const u = row.cliUpdate;
|
|
226
226
|
if (!u || !hostInstallOffered()) return null;
|
|
227
227
|
const installed = u.installed || row.version || "?";
|
|
228
|
-
|
|
228
|
+
// AGEND-223: a version that could not be read says so, for the vendor-latest CLIs too (it used to fall into the "{0} is installed" line with "?" as the version).
|
|
229
|
+
const text = u.state === "unknown" ? th("verUnknown", u.audited) : u.latest ? th(u.state === "current" ? "verLatestCurrent" : u.state === "newer" ? "verLatestNewer" : "verLatestBehind", installed, u.audited)
|
|
229
230
|
: u.state === "current" ? th("verCurrent", installed, u.audited)
|
|
230
231
|
: u.state === "newer" ? th("verNewer", installed, u.audited)
|
|
231
|
-
: u.state === "unknown" ? th("verUnknown", u.audited)
|
|
232
232
|
: u.via === "self" ? th("verSelf", installed, u.audited)
|
|
233
233
|
: th("verBehind", installed, u.audited);
|
|
234
234
|
const run = runFor(state, row.backend);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { register } from "/assets/app-i18n.js";
|
|
4
4
|
register("hub", {
|
|
5
5
|
en: {
|
|
6
|
-
agentLead: "Every agent is private unless you share it. A shared agent answers Hub questions in its own conversation, with its own folder and the tools its Settings allow. Actions that need approval still come to you.",
|
|
6
|
+
agentLead: "Every agent is private unless you share it. A shared agent answers Hub questions in its own conversation, with its own folder and the tools its Settings allow. Actions that need approval still come to you. Only fleet agents can be shared for now: ClassicBot rooms can't be shared yet.",
|
|
7
7
|
agentShared: "Shared: Hub questions go to this agent's own conversation.",
|
|
8
8
|
republishRequired: "Shared under the older restricted mode. Hub questions are refused until you share this agent again.",
|
|
9
9
|
shareAgain: "Share again",
|
|
@@ -11,12 +11,12 @@ register("hub", {
|
|
|
11
11
|
agentDeliveryUnavailable: "Sharing isn't available on this fleet yet: Hub questions can't reach an agent here.",
|
|
12
12
|
},
|
|
13
13
|
"zh-TW": {
|
|
14
|
-
agentLead: "每個 Agent
|
|
15
|
-
agentShared: "
|
|
16
|
-
republishRequired: "
|
|
17
|
-
shareAgain: "
|
|
18
|
-
agentNotShareable: "
|
|
19
|
-
agentDeliveryUnavailable: "這個 Fleet
|
|
14
|
+
agentLead: "每個 Agent 預設都不分享。分享後,Agent 會在自己的對話中回答 Hub 的提問,使用它自己的資料夾和設定允許的工具。需要核准的動作仍會交給你。目前只能分享 Fleet 的 Agent,ClassicBot 房間還不能分享。",
|
|
15
|
+
agentShared: "已分享:Hub 的提問會送到這個 Agent 自己的對話。",
|
|
16
|
+
republishRequired: "這是舊的受限模式分享。重新分享這個 Agent 之前,Hub 的提問都會被拒絕。",
|
|
17
|
+
shareAgain: "重新分享",
|
|
18
|
+
agentNotShareable: "目前無法分享這個 Agent。請重新整理頁面後再試一次。",
|
|
19
|
+
agentDeliveryUnavailable: "這個 Fleet 還不能分享:Hub 的提問目前無法送到這裡的 Agent。",
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
/** What a Share sends: the agent itself, no Hub tools (agent-mode.ts on the member). */
|
|
@@ -57,7 +57,7 @@ export function hubEntryToMessages(entry, room, { me = "", reason = (code) => co
|
|
|
57
57
|
*/
|
|
58
58
|
export function createHubChatStore(room, { client = hubClient(), me = "", reason, timers = globalThis, doc = typeof document !== "undefined" ? document : null } = {}) {
|
|
59
59
|
const subs = new Set();
|
|
60
|
-
const st = { live: true, timer: 0, inflight: false, entries: [], room: { ...room }, closed: false, loaded: false, error: null, accessDenied: false, accessEpoch: 0, pending: [], full: false, reads: 0, farTurn: 0 };
|
|
60
|
+
const st = { live: true, timer: 0, inflight: false, entries: [], room: { ...room }, closed: false, loaded: false, error: null, accessDenied: false, accessEpoch: 0, availabilityEpoch: 0, pending: [], full: false, reads: 0, farTurn: 0 };
|
|
61
61
|
const emit = () => { for (const fn of subs) { try { fn(); } catch { /* a subscriber's own failure */ } } };
|
|
62
62
|
const merge = (got) => {
|
|
63
63
|
const byId = new Map(st.entries.map((e) => [e.messageId, e]));
|
|
@@ -74,7 +74,7 @@ export function createHubChatStore(room, { client = hubClient(), me = "", reason
|
|
|
74
74
|
if (!st.live || st.inflight || st.closed) return;
|
|
75
75
|
if (doc && doc.hidden) { schedule(POLL_MS); return; }
|
|
76
76
|
st.inflight = true;
|
|
77
|
-
const accessEpoch = st.accessEpoch;
|
|
77
|
+
const accessEpoch = st.accessEpoch, availabilityEpoch = st.availabilityEpoch;
|
|
78
78
|
// Unsettled entries are read again (from just before the oldest one) — but a full page means there is more after
|
|
79
79
|
// it: read on from the last one first, so an old open entry can never pin the read to the same page (#3246 review).
|
|
80
80
|
const last = st.entries.length ? st.entries[st.entries.length - 1].sequence : 0;
|
|
@@ -101,10 +101,13 @@ export function createHubChatStore(room, { client = hubClient(), me = "", reason
|
|
|
101
101
|
// The room as the server says it now. Its quota is the server's to give: absent means withdrawn (the owner hid it,
|
|
102
102
|
// the grant is gone), never "unchanged" — a band once shown must not outlive that. An answer with no room at all
|
|
103
103
|
// (an older Hub) keeps what is known.
|
|
104
|
-
|
|
104
|
+
// A send can learn a pause while this older history read is held. Only a read begun after
|
|
105
|
+
// that refusal may restore availability; keep its history, but never undo the newer refusal.
|
|
106
|
+
const availabilityCurrent = availabilityEpoch === st.availabilityEpoch;
|
|
107
|
+
if (r.room && availabilityCurrent) { st.room = { ...st.room, ...r.room }; if (!Object.prototype.hasOwnProperty.call(r.room, "quota")) delete st.room.quota; }
|
|
105
108
|
st.pending = st.pending.filter((p) => !st.entries.some((e) => e.messageId === p.messageId));
|
|
106
109
|
if (r.room && accessEpoch === st.accessEpoch) st.accessDenied = false;
|
|
107
|
-
st.loaded = true; st.error = null; emit(); schedule(POLL_MS); return;
|
|
110
|
+
st.loaded = true; st.error = null; emit(); schedule(availabilityCurrent ? POLL_MS : 0); return;
|
|
108
111
|
}
|
|
109
112
|
if (r.code === "revoked" || r.code === "not-found") { st.closed = true; emit(); return; }
|
|
110
113
|
if (r.code === "denied") { st.accessDenied = true; st.accessEpoch++; }
|
|
@@ -151,6 +154,7 @@ export function createHubChatStore(room, { client = hubClient(), me = "", reason
|
|
|
151
154
|
if (!q || st.closed) return { ok: false, code: "invalid" };
|
|
152
155
|
let r;
|
|
153
156
|
try { r = await client.ask(st.room.id, newKey(), q, extras); } catch { r = { ok: false, code: "unreachable" }; }
|
|
157
|
+
if (!r.ok && r.code === "sharing-paused" && st.live) { st.availabilityEpoch++; st.room = { ...st.room, exposureState: "paused" }; emit(); schedule(0); return r; }
|
|
154
158
|
if (!r.ok) { if (r.code === "denied" && st.live) { st.accessDenied = true; st.accessEpoch++; emit(); } if (r.code === "revoked") { st.closed = true; emit(); } return r; }
|
|
155
159
|
st.pending.push({ messageId: r.receipt.messageId, text: q, at: r.receipt.at || Date.now() });
|
|
156
160
|
emit();
|
|
@@ -5,7 +5,7 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
5
5
|
|
|
6
6
|
register("hubChat", {
|
|
7
7
|
en: {
|
|
8
|
-
navSearch: "Search", notices: "Notices", noticesTitle: "Notices", noNotices: "No security notices", noticesLead: "When a new fleet connects to this Hub, you're told here. If you don't
|
|
8
|
+
navSearch: "Search", notices: "Notices", noticesTitle: "Notices", noNotices: "No security notices", noticesLead: "When a new fleet connects to this Hub, you're told here. If you don't recognize it, revoke it.", settings: "Settings", signedIn: "Signed in", signOut: "Sign out",
|
|
9
9
|
chats: "Chats", newChat: "New chat", search: "Search chats", noChats: "No chats yet", noChatsHint: "Start one with New chat: it lists the agents someone allowed you to ask.",
|
|
10
10
|
noMatch: "No chat matches.", waiting: "Waiting for an answer", represents: "Answers for {0}",
|
|
11
11
|
pickTitle: "New chat", pickSearch: "Search agents or owners", pickHint: "Only the agents someone allowed you to ask are listed.",
|
|
@@ -31,7 +31,7 @@ register("hubChat", {
|
|
|
31
31
|
adminTitle: "Hub administrator", adminSees: "Can't see the content.",
|
|
32
32
|
notHere: "Not here", notHereText: "{0}'s files and changes, its terminal (View) and its tool progress: only {1} sees them, in their own fleet.",
|
|
33
33
|
oneToOne: "A chat has only you and this agent.",
|
|
34
|
-
menu: "Menu", mine: "My shared agents", mineHint: "Who may ask them, until when", admin: "Administration", adminHint: "
|
|
34
|
+
menu: "Menu", mine: "My shared agents", mineHint: "Who may ask them, until when", admin: "Administration", adminHint: "Connect fleets",
|
|
35
35
|
back: "Chats",
|
|
36
36
|
},
|
|
37
37
|
"zh-TW": {
|
|
@@ -61,7 +61,7 @@ register("hubChat", {
|
|
|
61
61
|
adminTitle: "Hub 管理員", adminSees: "看不到內容。",
|
|
62
62
|
notHere: "這裡沒有", notHereText: "{0} 的檔案與變更、終端機畫面(View)、工具進度:只有 {1} 在自己的 fleet 看得到。",
|
|
63
63
|
oneToOne: "一個聊天室只有你和這個 Agent。",
|
|
64
|
-
menu: "選單", mine: "我分享的 Agent", mineHint: "誰可以提問、到什麼時候", admin: "管理", adminHint: "
|
|
64
|
+
menu: "選單", mine: "我分享的 Agent", mineHint: "誰可以提問、到什麼時候", admin: "管理", adminHint: "連接 Fleet",
|
|
65
65
|
back: "對話",
|
|
66
66
|
},
|
|
67
67
|
});
|