@songsid/agend 2.4.0-alpha.2 → 2.4.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-isolation.d.ts +6 -0
- package/dist/account-isolation.js +40 -0
- package/dist/account-isolation.js.map +1 -0
- package/dist/accounts-signout.d.ts +15 -2
- package/dist/accounts-signout.js +52 -4
- package/dist/accounts-signout.js.map +1 -1
- package/dist/accounts-view.d.ts +114 -27
- package/dist/accounts-view.js +123 -60
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +9 -7
- package/dist/agent-cli.js +47 -20
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +23 -8
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-list-output.d.ts +23 -0
- package/dist/agent-list-output.js +53 -0
- package/dist/agent-list-output.js.map +1 -0
- package/dist/agent-runtime-change.js +4 -4
- package/dist/agent-runtime-change.js.map +1 -1
- package/dist/agent-whats-new.js +2 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/antigravity-first-run.d.ts +4 -0
- package/dist/antigravity-first-run.js +57 -0
- package/dist/antigravity-first-run.js.map +1 -0
- package/dist/antigravity-identity.d.ts +6 -0
- package/dist/antigravity-identity.js +27 -0
- package/dist/antigravity-identity.js.map +1 -0
- package/dist/antigravity-store.d.ts +22 -0
- package/dist/antigravity-store.js +79 -0
- package/dist/antigravity-store.js.map +1 -0
- package/dist/auth-api.js +4 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/agy-onboarding.d.ts +14 -0
- package/dist/backend/agy-onboarding.js +114 -0
- package/dist/backend/agy-onboarding.js.map +1 -0
- package/dist/backend/antigravity.d.ts +15 -0
- package/dist/backend/antigravity.js +44 -4
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +22 -3
- package/dist/backend/credential-profile.js +61 -9
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend-availability.d.ts +6 -0
- package/dist/backend-availability.js +11 -0
- package/dist/backend-availability.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +9 -1
- package/dist/browser-backend-signins.js +9 -5
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +9 -9
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/claude-auth-status.d.ts +1 -0
- package/dist/claude-auth-status.js +25 -0
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/cli-capability.d.ts +104 -19
- package/dist/cli-capability.js +3 -1
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +14 -0
- package/dist/cli-caps-module.js +8 -1
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +114 -18
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +116 -12
- package/dist/cli-registry.js +16 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +53 -11
- package/dist/cli-spec-antigravity.js +44 -13
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +14 -1
- package/dist/cli-spec-claude-code.js +5 -4
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +8 -0
- package/dist/cli-spec-codex.js +4 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +4 -0
- package/dist/cli-spec-grok.js +2 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -0
- package/dist/cli-spec-kiro-cli.js +3 -2
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +4 -0
- package/dist/cli-spec-muse.js +2 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +1 -0
- package/dist/cli-spec-opencode.js +1 -0
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/credential-store-proof.d.ts +6 -0
- package/dist/credential-store-proof.js +30 -0
- package/dist/credential-store-proof.js.map +1 -0
- package/dist/daemon.js +2 -2
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +5 -4
- package/dist/decision-list.js +22 -8
- package/dist/decision-list.js.map +1 -1
- package/dist/fleet-manager.d.ts +20 -1
- package/dist/fleet-manager.js +158 -54
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +6 -6
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +32 -4
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +14 -6
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +361 -0
- package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +184 -36
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +5 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/hub/buttons.d.ts +3 -0
- package/dist/hub/buttons.js +11 -11
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +13 -6
- package/dist/hub/catalog.js +106 -33
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +6 -0
- package/dist/hub/client.js +4 -1
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.js +15 -0
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +6 -0
- package/dist/hub/compose/server.js +9 -3
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +51 -0
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +14 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/enrolment-code.d.ts +1 -1
- package/dist/hub/enrolment-code.js +4 -4
- package/dist/hub/enrolment-code.js.map +1 -1
- package/dist/hub/grant-access.d.ts +11 -0
- package/dist/hub/grant-access.js +113 -0
- package/dist/hub/grant-access.js.map +1 -0
- package/dist/hub/grant-search.d.ts +9 -0
- package/dist/hub/grant-search.js +92 -0
- package/dist/hub/grant-search.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.d.ts +2 -0
- package/dist/hub/group-policy/admin-impact.js +10 -2
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.js +1 -1
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +5 -2
- package/dist/hub/group-policy/authorization.js +73 -32
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.js +20 -4
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +4 -5
- package/dist/hub/group-policy/resources.js +26 -19
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +18 -3
- package/dist/hub/group-policy/store.js +94 -80
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/welcome.js.map +1 -1
- package/dist/hub/http/compose.js +39 -11
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +18 -0
- package/dist/hub/http/core.js +108 -7
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +8 -0
- package/dist/hub/http/schema.js +11 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/join/local.d.ts +5 -0
- package/dist/hub/join/local.js +28 -5
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/service.d.ts +2 -0
- package/dist/hub/join/service.js +34 -35
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/member/pairing-api.js +4 -1
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/pairing.d.ts +3 -0
- package/dist/hub/pairing.js +37 -16
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/policy.d.ts +1 -1
- package/dist/hub/policy.js +19 -6
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +13 -0
- package/dist/hub/protocol.js +7 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/quota.d.ts +2 -1
- package/dist/hub/quota.js +2 -2
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/roles/authority.d.ts +45 -0
- package/dist/hub/roles/authority.js +199 -0
- package/dist/hub/roles/authority.js.map +1 -0
- package/dist/hub/roles/change.d.ts +18 -0
- package/dist/hub/roles/change.js +76 -0
- package/dist/hub/roles/change.js.map +1 -0
- package/dist/hub/roles/convert.d.ts +11 -0
- package/dist/hub/roles/convert.js +27 -0
- package/dist/hub/roles/convert.js.map +1 -0
- package/dist/hub/roles/cutover-inventory.d.ts +14 -0
- package/dist/hub/roles/cutover-inventory.js +42 -0
- package/dist/hub/roles/cutover-inventory.js.map +1 -0
- package/dist/hub/roles/cutover.d.ts +32 -0
- package/dist/hub/roles/cutover.js +184 -0
- package/dist/hub/roles/cutover.js.map +1 -0
- package/dist/hub/roles/delegation.d.ts +24 -0
- package/dist/hub/roles/delegation.js +111 -0
- package/dist/hub/roles/delegation.js.map +1 -0
- package/dist/hub/roles/evaluate.d.ts +50 -0
- package/dist/hub/roles/evaluate.js +96 -0
- package/dist/hub/roles/evaluate.js.map +1 -0
- package/dist/hub/roles/expiry.d.ts +46 -0
- package/dist/hub/roles/expiry.js +180 -0
- package/dist/hub/roles/expiry.js.map +1 -0
- package/dist/hub/roles/mode-effects.d.ts +5 -0
- package/dist/hub/roles/mode-effects.js +21 -0
- package/dist/hub/roles/mode-effects.js.map +1 -0
- package/dist/hub/roles/model.d.ts +171 -0
- package/dist/hub/roles/model.js +79 -0
- package/dist/hub/roles/model.js.map +1 -0
- package/dist/hub/roles/read.d.ts +29 -0
- package/dist/hub/roles/read.js +47 -0
- package/dist/hub/roles/read.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +80 -0
- package/dist/hub/roles/writer.js +427 -0
- package/dist/hub/roles/writer.js.map +1 -0
- package/dist/hub/rooms.d.ts +8 -0
- package/dist/hub/rooms.js +47 -27
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/server.d.ts +3 -0
- package/dist/hub/server.js +3 -1
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +5 -1
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-directory-decision.d.ts +2 -2
- package/dist/hub/settings-directory-decision.js +7 -5
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-directory-proof.js +3 -1
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.js +3 -3
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/sharing.d.ts +10 -0
- package/dist/hub/sharing.js +74 -0
- package/dist/hub/sharing.js.map +1 -0
- package/dist/hub/store.js +6 -2
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +17 -1
- package/dist/hub/web-origin.d.ts +80 -0
- package/dist/hub/web-origin.js +163 -0
- package/dist/hub/web-origin.js.map +1 -0
- package/dist/human-delivery-receipts.js +2 -2
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +32 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +8 -2
- package/dist/instructions.js +28 -6
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +6 -6
- package/dist/locale.js.map +1 -1
- package/dist/login-flows.d.ts +24 -2
- package/dist/login-flows.js +53 -22
- package/dist/login-flows.js.map +1 -1
- package/dist/login-url.js +3 -0
- package/dist/login-url.js.map +1 -1
- package/dist/machine-accounts.d.ts +42 -12
- package/dist/machine-accounts.js +144 -46
- package/dist/machine-accounts.js.map +1 -1
- package/dist/machine-signins.d.ts +35 -13
- package/dist/machine-signins.js +57 -27
- package/dist/machine-signins.js.map +1 -1
- package/dist/native-instance-input.js +4 -4
- package/dist/native-instance-input.js.map +1 -1
- package/dist/native-instance-registry.d.ts +3 -3
- package/dist/native-instance-registry.js +11 -10
- package/dist/native-instance-registry.js.map +1 -1
- package/dist/outbound-handlers.js +19 -19
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +18 -0
- package/dist/outbound-schemas.js +22 -4
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/profile-signins.d.ts +5 -0
- package/dist/profile-signins.js +1 -0
- package/dist/profile-signins.js.map +1 -1
- package/dist/runtime-build-info.js +6 -2
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli.js +33 -11
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client.d.ts +18 -2
- package/dist/runtime-client.js +84 -21
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +36 -4
- package/dist/runtime-credential-profiles.js +82 -16
- package/dist/runtime-credential-profiles.js.map +1 -1
- package/dist/runtime-profile-ownership.d.ts +2 -2
- package/dist/runtime-profile-ownership.js +3 -3
- package/dist/runtime-profile-ownership.js.map +1 -1
- package/dist/runtime-protocol.d.ts +5 -3
- package/dist/runtime-protocol.js +4 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +72 -5
- package/dist/runtime-remote-accounts.js +293 -52
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +2 -2
- package/dist/runtime-remote-setup.js +2 -2
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-signin-transport.d.ts +22 -4
- package/dist/runtime-signin-transport.js +50 -12
- package/dist/runtime-signin-transport.js.map +1 -1
- package/dist/runtime-signin.d.ts +42 -0
- package/dist/runtime-signin.js +105 -9
- package/dist/runtime-signin.js.map +1 -1
- package/dist/runtime-windows-bridge.js +6 -1
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +1 -0
- package/dist/scheduler/task-board.js +10 -1
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/signin-keepalive.d.ts +31 -2
- package/dist/signin-keepalive.js +123 -12
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +2 -2
- package/dist/structured-signin-transport.js +27 -6
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +16 -2
- package/dist/structured-signin.js +59 -4
- package/dist/structured-signin.js.map +1 -1
- package/dist/task-board-tool.d.ts +0 -13
- package/dist/task-board-tool.js +42 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +151 -0
- package/dist/tool-receipt-output.js +50 -0
- package/dist/tool-receipt-output.js.map +1 -0
- package/dist/ui/accounts-keepalive.js +15 -6
- package/dist/ui/accounts-manage.js +25 -5
- package/dist/ui/accounts-view.js +28 -24
- package/dist/ui/agent-proposals.js +22 -2
- package/dist/ui/agent-runtime-settings.js +3 -3
- package/dist/ui/backend-signin.js +4 -4
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +32 -19
- package/dist/ui/hub-chat-store.js +8 -4
- package/dist/ui/hub-client.js +54 -19
- package/dist/ui/hub-enrolment-code.js +1 -1
- package/dist/ui/hub-grant-picker.js +100 -0
- package/dist/ui/hub-group-search.js +2 -2
- package/dist/ui/hub-join-one-strings.js +2 -2
- package/dist/ui/hub-join-steps.js +5 -2
- package/dist/ui/machine-signin.js +47 -14
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-hub.js +55 -11
- package/dist/ui/panel-settings.js +2 -2
- package/dist/ui/settings-hub-company-join.js +1 -0
- package/dist/ui/settings-hub-section.js +2 -0
- package/dist/ui/settings-hub-web-address.js +233 -0
- package/dist/ui/settings-hub.js +6 -0
- package/dist/ui/shared/accounts-keepalive.css +8 -0
- package/dist/ui/shared/accounts-usage-pool.css +10 -0
- package/dist/ui/shared/accounts.css +9 -0
- package/dist/ui/shared/app.css +38 -5
- package/dist/ui/shared/hub-grant-picker.css +4 -0
- package/dist/ui/shared/hub-sharing.css +4 -0
- package/dist/ui/shared/view-strings.js +2 -2
- package/dist/ui/structured-signin.js +19 -6
- package/dist/ui/usage-pool.js +76 -0
- package/dist/usage/agent-output.d.ts +144 -0
- package/dist/usage/agent-output.js +75 -0
- package/dist/usage/agent-output.js.map +1 -0
- package/dist/usage/provider-alerts.d.ts +6 -0
- package/dist/usage/provider-alerts.js +6 -0
- package/dist/usage/provider-alerts.js.map +1 -1
- package/dist/usage/providers.d.ts +2 -2
- package/dist/usage/providers.js +60 -18
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +12 -0
- package/dist/usage/usage-api.js +39 -0
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +2 -0
- package/dist/web-api.js +27 -12
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +4 -1
- package/dist/web-backend-login.js.map +1 -1
- package/dist/windows-cli-providers.js +5 -1
- package/dist/windows-cli-providers.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +33 -1
- package/dist/windows-cli-worker.js +150 -10
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +7 -1
- package/dist/windows-cli.js +19 -2
- package/dist/windows-cli.js.map +1 -1
- package/dist/workflow-templates/default.md +2 -2
- package/package.json +1 -1
package/dist/ui/panel-hub.js
CHANGED
|
@@ -49,8 +49,20 @@ register("hubAccess", {
|
|
|
49
49
|
const ha = key => t(`hubAccess.${key}`);
|
|
50
50
|
// Kept with the fresh renderer: retained owner dictionaries do not know this label.
|
|
51
51
|
register("hubGrantStatus", {
|
|
52
|
-
en: { grantNeverSignedIn: "Hasn't signed in to Hub yet" },
|
|
53
|
-
"zh-TW": { grantNeverSignedIn: "還沒登入過 Hub" },
|
|
52
|
+
en: { grantNeverSignedIn: "Hasn't signed in to Hub yet", grantADGroup: "AD group", grantSubjects: "People and groups allowed: {0}" },
|
|
53
|
+
"zh-TW": { grantNeverSignedIn: "還沒登入過 Hub", grantADGroup: "AD 群組", grantSubjects: "已允許的個人與群組:{0}" },
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// These words travel with the renderer; retained dictionaries need no new exports.
|
|
57
|
+
register("hubSharing", {
|
|
58
|
+
en: { pause: "Pause sharing", resume: "Resume sharing", paused: "Sharing paused", title: "Pause and resume sharing",
|
|
59
|
+
lead: "Stop new questions and keep the people and AD groups allowed to ask. Their expiry dates keep running while sharing is paused. A question already being handed to the Fleet may still start within a few seconds; work already in progress may finish.",
|
|
60
|
+
waiting: "Saving…", pausedChat: "The owner paused sharing {0}. New questions are stopped; a question already being handed to the Fleet may still start within a few seconds. You can still read this chat while your permission lasts. Sharing can resume; expiry dates keep running.",
|
|
61
|
+
},
|
|
62
|
+
"zh-TW": { pause: "暫停分享", resume: "繼續分享", paused: "分享已暫停", title: "暫停與繼續分享",
|
|
63
|
+
lead: "停止接受新提問,保留允許提問的個人與 AD 群組。暫停期間,授權的到期時間照常計算。已在傳送給 Fleet 的提問,可能仍會在幾秒內開始處理;已在處理的工作可能會完成。",
|
|
64
|
+
waiting: "儲存中…", pausedChat: "擁有者已暫停分享 {0}。不再接受新提問;已在傳送給 Fleet 的提問,可能仍會在幾秒內開始處理。權限有效期間,你仍可閱讀這段對話。之後可以繼續分享;授權的到期時間照常計算。",
|
|
65
|
+
},
|
|
54
66
|
});
|
|
55
67
|
|
|
56
68
|
// #3298 S-89 (experimental): the group permissions editor and the signed-in welcome are their own LAZY modules, loaded only
|
|
@@ -594,7 +606,8 @@ function HubRoomView({ room: given }) {
|
|
|
594
606
|
useEffect(() => {
|
|
595
607
|
if (!denied) setMsg(current => current === errText({ code: "denied" }) ? null : current);
|
|
596
608
|
}, [denied]);
|
|
597
|
-
const
|
|
609
|
+
const paused = !closed && room.exposureState === "paused";
|
|
610
|
+
const frozen = !closed && (room.exposureState === "frozen" || paused);
|
|
598
611
|
const working = store.working();
|
|
599
612
|
const name = room.exposureName || "";
|
|
600
613
|
const client = hubClient();
|
|
@@ -611,7 +624,7 @@ function HubRoomView({ room: given }) {
|
|
|
611
624
|
setSending(true); setMsg(null);
|
|
612
625
|
const r = await store.send(q, chosen.length ? { files: chosen.map((f) => f.id) } : {});
|
|
613
626
|
setSending(false);
|
|
614
|
-
if (!r.ok) { setMsg(errText(r)); return; }
|
|
627
|
+
if (!r.ok) { setMsg(r.code === "sharing-paused" ? null : errText(r)); return; }
|
|
615
628
|
// Only the files this question carried; ones chosen while it was on its way stay for the next.
|
|
616
629
|
const sent = new Set(chosen.map((f) => f.key));
|
|
617
630
|
setDraft(""); setFiles(filesRef.current.filter((f) => !sent.has(f.key))); refreshRooms();
|
|
@@ -629,7 +642,7 @@ function HubRoomView({ room: given }) {
|
|
|
629
642
|
if (panelOpen) { closePanel(); setRail(true); setRailPref(true); return; }
|
|
630
643
|
setRail((v) => { setRailPref(!v); return !v; });
|
|
631
644
|
};
|
|
632
|
-
const tag = closed ? html`<span class="tag danger">${hc("tagClosed")}</span>` : frozen ? html`<span class="tag warn">${hc("tagFrozen")}</span>`
|
|
645
|
+
const tag = closed ? html`<span class="tag danger">${hc("tagClosed")}</span>` : frozen ? html`<span class="tag warn">${paused ? t("hubSharing.paused") : hc("tagFrozen")}</span>`
|
|
633
646
|
: denied ? html`<span class="tag warn">${ha("tag")}</span>` : html`<${QuotaChip} room=${room} fallback=${html`<span class="tag ok">${hc("tagCanAsk")}</span>`} />`;
|
|
634
647
|
const back = !wide ? html`<a class="icon-btn hub-back" href="/ui/hub" aria-label=${hc("back")} title=${hc("back")}><${Icon} name="back" /></a>` : null;
|
|
635
648
|
const info = html`<${HubRoomInfo} room=${room} closed=${closed} denied=${denied} />`;
|
|
@@ -645,7 +658,7 @@ function HubRoomView({ room: given }) {
|
|
|
645
658
|
<${HubThread} store=${store} name=${name} panelKey=${panelKey} threadRef=${threadRef} />
|
|
646
659
|
<div class="dock hub-dock" data-trust="composer"><div class="dock-col">
|
|
647
660
|
${closed ? html`<p class="hub-banner danger" role="status">${hc("closed")}</p>` : null}
|
|
648
|
-
${frozen ? html`<p class="hub-banner warn" role="status">${hc("frozen", name)}</p>` : null}
|
|
661
|
+
${frozen ? html`<p class="hub-banner warn" role="status">${paused ? t("hubSharing.pausedChat", name) : hc("frozen", name)}</p>` : null}
|
|
649
662
|
${!closed ? html`<${QuotaBanner} room=${room} />` : null}
|
|
650
663
|
${denied && !closed ? html`<div class="hub-banner warn" role="status">${ha("refused")}<div class="n-actions"><button type="button" class="btn btn-sm" onClick=${() => store.refresh()}>${ha("check")}</button></div></div>` : null}
|
|
651
664
|
${working ? html`<${HubWorkBar} name=${name} since=${working.since} />` : null}
|
|
@@ -754,8 +767,10 @@ function HubRoomInfo({ room, closed = false, denied = false }) {
|
|
|
754
767
|
// rows), a destructive step behind a row's menu and a confirmation ──
|
|
755
768
|
const DAYS_LEFT = (ms) => daysLeft(ms);
|
|
756
769
|
const stateTag = (state) => state === "published" ? html`<span class="tag ok">${ho("stateShared")}</span>`
|
|
770
|
+
: state === "paused" ? html`<span class="tag warn">${t("hubSharing.paused")}</span>`
|
|
757
771
|
: state === "frozen" ? html`<span class="tag warn">${ho("statePaused")}</span>` : html`<span class="tag">${ho("stateWithdrawn")}</span>`;
|
|
758
772
|
const mayAsk = (n) => (n === 0 ? ho("mayAskNone") : n === 1 ? ho("mayAskOne") : ho("mayAsk", n));
|
|
773
|
+
const grantSummary = (grants = []) => grants.some(g => g.subject?.kind === "group") ? t("hubGrantStatus.grantSubjects", grants.length) : mayAsk(grants.length);
|
|
759
774
|
const agentParam = () => { try { const v = new URLSearchParams(location.search).get("agent"); return v && /^[a-f0-9-]{36}$/.test(v) ? v : null; } catch { return null; } };
|
|
760
775
|
|
|
761
776
|
/**
|
|
@@ -774,7 +789,13 @@ function HubMine() {
|
|
|
774
789
|
const [cat, reload] = useRead(() => hubClient().catalog());
|
|
775
790
|
const [pairings, reloadPairings] = useRead(() => hubClient().pairings());
|
|
776
791
|
const [msg, setMsg] = useState(null);
|
|
777
|
-
useEffect(() => {
|
|
792
|
+
useEffect(() => {
|
|
793
|
+
linkHubChatCss(); linkHubOwnerCss();
|
|
794
|
+
if (!document.querySelector('link[data-hub-sharing-css="1"]')) {
|
|
795
|
+
const link = document.createElement("link"); link.rel = "stylesheet"; link.href = "/assets/hub-sharing.css";
|
|
796
|
+
link.setAttribute("data-hub-sharing-css", "1"); document.head.appendChild(link);
|
|
797
|
+
}
|
|
798
|
+
}, []);
|
|
778
799
|
const act = async (fn, after = reload, refused = (r) => setMsg(errText(r))) => {
|
|
779
800
|
setMsg(null);
|
|
780
801
|
const r = await fn();
|
|
@@ -806,13 +827,21 @@ function HubMine() {
|
|
|
806
827
|
${cat && !cat.error && !mine.length ? html`<div class="center hub-empty"><${Empty} icon="globe" title=${hw("exposuresEmpty")} hint=${hw("exposuresHint")} /></div>` : null}
|
|
807
828
|
${mine.length ? html`<section class="card hub-shared"><h3>${ho("sharedCount", mine.length)}</h3>
|
|
808
829
|
<div class="hub-rows">${mine.map((e) => html`<a key=${e.id} class="s-row hub-row hub-row-link" href=${`/ui/hub/exposures?agent=${encodeURIComponent(e.id)}`}>
|
|
809
|
-
<${Avatar} name=${e.displayName} /><span class="hub-row-text"><strong>${e.displayName}</strong><small class="note">${
|
|
830
|
+
<${Avatar} name=${e.displayName} /><span class="hub-row-text"><strong>${e.displayName}</strong><small class="note">${grantSummary(e.grants)}</small></span>
|
|
810
831
|
${stateTag(e.state)}<${Icon} name="next" size=${16} /></a>`)}</div></section>` : null}
|
|
811
832
|
</div></div>`;
|
|
812
833
|
}
|
|
813
834
|
|
|
814
835
|
/** One shared agent: who may ask (allow, revoke), whether askers see its quota (G), who asked lately, pause. */
|
|
815
836
|
function HubAgentPage({ x, act, msg }) {
|
|
837
|
+
const session = useSession(), client = hubClient();
|
|
838
|
+
const resumable = session?.features?.includes("sharing-pause-v1") && client?.sharingPauseV1 === true && typeof client.sharing === "function";
|
|
839
|
+
const [sharingBusy, setSharingBusy] = useState(false);
|
|
840
|
+
const sharing = async () => {
|
|
841
|
+
if (sharingBusy) return; setSharingBusy(true);
|
|
842
|
+
try { await act(() => client.sharing(x.id, x.revision, x.sharingEpoch ?? 0, x.state !== "paused")); }
|
|
843
|
+
finally { setSharingBusy(false); }
|
|
844
|
+
};
|
|
816
845
|
// #3338: this page is reached only through catalog.mine; the link opens a form, never a grant.
|
|
817
846
|
// Read the closed intent once on this keyed agent page, so cancel/save/reloads never reopen it.
|
|
818
847
|
const [allowing, setAllowing] = useState(() => x.state === "published" && new URLSearchParams(location.search).get("grant") === "1");
|
|
@@ -831,13 +860,13 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
831
860
|
const acts = activity && activity.activity ? activity.activity : [];
|
|
832
861
|
return html`<div class="col hub-owner">
|
|
833
862
|
<a class="hub-crumb" href="/ui/hub/exposures"><${Icon} name="back" size=${14} />${ho("backToMine")}</a>
|
|
834
|
-
<${PageHead} title=${x.displayName} scope=${stateTag(x.state)} lead=${
|
|
863
|
+
<${PageHead} title=${x.displayName} scope=${stateTag(x.state)} lead=${grantSummary(grants)} />
|
|
835
864
|
<div class="s-section-layout">
|
|
836
865
|
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
837
866
|
<section class="card"><div class="hub-card-head"><h3>${ho("whoMayAsk")}</h3>${shared ? html`<button type="button" class="btn btn-sm" onClick=${() => setAllowing(true)}><${Icon} name="plus" size=${14} />${ho("allow")}</button>` : null}</div>
|
|
838
867
|
${grants.length ? html`<div class="hub-rows">${grants.map((g) => html`<div key=${g.id} class="s-row hub-row">
|
|
839
868
|
<${Avatar} name=${g.subjectName || g.subjectLogin} size="sm" />
|
|
840
|
-
<span class="hub-row-text"><strong>${g.subjectName || g.subjectLogin}</strong><small class="note">${g.subjectLogin ? html`<code>${g.subjectLogin}</code> · ` : null}${ho("untilLeft", dateOnly(g.expiresAt), DAYS_LEFT(g.expiresAt))}</small>${g.subjectSignedIn === false ? html`<small class="tag warn">${t("hubGrantStatus.grantNeverSignedIn")}</small>` : null}</span>
|
|
869
|
+
<span class="hub-row-text"><strong>${g.subjectName || g.subjectLogin}</strong><small class="note">${g.subjectLogin ? html`<code>${g.subjectLogin}</code> · ` : null}${ho("untilLeft", dateOnly(g.expiresAt), DAYS_LEFT(g.expiresAt))}</small>${g.subject?.kind === "group" ? html`<small class="tag">${t("hubGrantStatus.grantADGroup")}</small>` : g.subjectSignedIn === false ? html`<small class="tag warn">${t("hubGrantStatus.grantNeverSignedIn")}</small>` : null}</span>
|
|
841
870
|
<${Menu} label=${ho("rowMenu", g.subjectName || g.subjectLogin)} items=${[{ key: "revoke", label: ho("revokeItem"), icon: "trash", danger: true, onSelect: () => revoke(g) }]} />
|
|
842
871
|
</div>`)}</div>` : html`<p class="note">${hw("noGrants")}</p>`}
|
|
843
872
|
</section>
|
|
@@ -850,7 +879,9 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
850
879
|
</div>`)}</div>` : null}
|
|
851
880
|
<div class="field-row"><button type="button" class="btn btn-sm btn-ghost" onClick=${reloadActivity}>${ho("refresh")}</button></div>
|
|
852
881
|
</section>
|
|
853
|
-
${shared ? html`<section class="card hub-
|
|
882
|
+
${resumable && (shared || x.state === "paused") ? html`<section class="card hub-sharing-control"><h3>${t("hubSharing.title")}</h3><p class="note">${t("hubSharing.lead")}</p>
|
|
883
|
+
<div class="field-row"><button type="button" class="btn btn-sm btn-primary" disabled=${sharingBusy} onClick=${sharing}>${t(sharingBusy ? "hubSharing.waiting" : x.state === "paused" ? "hubSharing.resume" : "hubSharing.pause")}</button></div></section>` : null}
|
|
884
|
+
${shared || x.state === "paused" ? html`<section class="card hub-danger"><h3>${ho("pauseTitle")}</h3><p class="note">${ho("pauseLead")}</p>
|
|
854
885
|
<div class="field-row"><button type="button" class="btn btn-sm btn-danger" onClick=${freeze}>${ho("pauseGo")}</button></div></section>` : null}
|
|
855
886
|
</div>
|
|
856
887
|
${allowing && shared ? html`<${AllowDialog} x=${x} act=${act} onClose=${() => setAllowing(false)} />` : null}
|
|
@@ -858,6 +889,19 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
858
889
|
}
|
|
859
890
|
|
|
860
891
|
function AllowDialog({ x, act, onClose }) {
|
|
892
|
+
const s = useSession(), client = hubClient(), marked = s?.features?.includes("grant-subjects-v1") && client?.grantSubjectsV1 === true && typeof client.searchGrantSubjects === "function";
|
|
893
|
+
const [Picker, setPicker] = useState(null), [failed, setFailed] = useState(false);
|
|
894
|
+
useEffect(() => {
|
|
895
|
+
if (!marked) return; let live = true;
|
|
896
|
+
import("./hub-grant-picker.js").then(m => { if (live) { if (typeof m.HubGrantPicker === "function") setPicker(() => m.HubGrantPicker); else setFailed(true); } })
|
|
897
|
+
.catch(() => { if (live) setFailed(true); });
|
|
898
|
+
return () => { live = false; };
|
|
899
|
+
}, [marked]);
|
|
900
|
+
if (!marked || failed) return html`<${LegacyAllowDialog} x=${x} act=${act} onClose=${onClose} />`;
|
|
901
|
+
if (Picker) return html`<${Picker} x=${x} client=${client} act=${act} onClose=${onClose} />`;
|
|
902
|
+
return html`<${Dialog} title=${ho("allowTitle", x.displayName)} onClose=${onClose}><${Skeleton} rows=${2} /></${Dialog}>`;
|
|
903
|
+
}
|
|
904
|
+
function LegacyAllowDialog({ x, act, onClose }) {
|
|
861
905
|
const [form, setForm] = useState({ login: "", days: 7 });
|
|
862
906
|
const [busy, setBusy] = useState(false);
|
|
863
907
|
const [error, setError] = useState(null);
|
|
@@ -954,8 +954,8 @@ function Bots({ ctx, search, openDialog }) {
|
|
|
954
954
|
<span class="s-actions">
|
|
955
955
|
<span class=${`tag${token ? "" : " warn"}`}>${token ? tn("tokenConfigured") : tn("tokenMissing")}</span>
|
|
956
956
|
<span class=${`s-state ${state.cls}`} title=${stateText}>${stateText}</span>
|
|
957
|
-
|
|
958
|
-
|
|
957
|
+
<span class="s-conn-buttons">${!overPublicLink && ctx.fleetUp && meta.status !== "connected" ? html`<${ConnectionRetry} id=${channelId(ch, i)} ctx=${ctx} />` : null}
|
|
958
|
+
<button type="button" class="btn btn-sm" onClick=${() => openDialog({ kind: "bot", id: channelId(ch, i) })}>${tn("settingsButton")}</button></span></span>
|
|
959
959
|
</div>`;
|
|
960
960
|
})}</div>`}</section>`;
|
|
961
961
|
}
|
|
@@ -275,6 +275,7 @@ export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded =
|
|
|
275
275
|
${view.issued && view.state !== "saved" ? html`<p class="note">${hj("issued")}</p>` : null}
|
|
276
276
|
<div class="field-row">${view.state === "awaiting-sign-in" && !view.foreign ? html`<a class="btn btn-sm" href=${root + "/bridge?operationId=" + encodeURIComponent(view.operationId)} target="_blank" rel="noopener">${j1("reopen")}</a>` : null}${view.state === "held" && !["authority", "expired", "denied", "code-denied"].includes(view.reason) ? html`<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => action("resume")}>${hj("resume")}</button>` : null}
|
|
277
277
|
${!["saved", "cancelled", "ended"].includes(view.state) && (!view.foreign || view.state === "held") ? html`<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => action("cancel")}>${view.state === "awaiting-sign-in" ? j1("cancel") : hj("stop")}</button>` : null}
|
|
278
|
+
${view.state === "held" && !view.foreign && ["unknown", "uncertain"].includes(view.reason) ? html`<button type="button" class="btn btn-sm hub-join-check" disabled=${busy} onClick=${read}>${hj("retry")}</button>` : null}
|
|
278
279
|
${view.hubOrigin ? html`<a class="btn btn-sm" href=${view.hubOrigin + "/ui/hub"} target="_blank" rel="noopener noreferrer">${hj("inspect")}</a>` : null}</div>
|
|
279
280
|
</div>` : null}
|
|
280
281
|
</${Frame}>`;
|
|
@@ -59,6 +59,8 @@ export function HubSection({ overPublicLink, hubHost, hubOrigin }) {
|
|
|
59
59
|
${hubHost && typeof document !== "undefined" && document.body?.dataset.hubDirectorySettings === "1"
|
|
60
60
|
? html`<${Lazy} load=${() => import("./settings-hub-directory.js")} pick=${m => m.HubDirectorySettings} />` : null}
|
|
61
61
|
${hubHost ? html`<${Lazy} load=${() => import("./settings-hub-run.js")} pick=${(m) => m.HubRunSettings} />
|
|
62
|
+
${typeof document !== "undefined" && document.body?.dataset.hubWebAddress === "1"
|
|
63
|
+
? html`<${Lazy} load=${() => import("./settings-hub-web-address.js")} pick=${(m) => m.HubWebAddressSettings} />` : null}
|
|
62
64
|
<${Lazy} load=${() => import("./settings-hub-retention.js")} pick=${(m) => m.HubRetentionSettings} />
|
|
63
65
|
<${Lazy} load=${() => import("./settings-hub-browser-certificate.js")} pick=${(m) => m.HubBrowserCertificateSettings} />
|
|
64
66
|
<${Lazy} load=${() => import("./settings-hub-preview.js")} pick=${(m) => m.HubPreviewSettings} />` : null}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// M-2901 / #3428: fleet Settings → Hub → "Hub address", for this computer's host owner (the page mark below; the server's D3
|
|
2
|
+
// proof decides). The address people enter in AgEnD Settings → Hub and open in their browser. One field; where the Hub
|
|
3
|
+
// listens and which certificate it uses follow from it, and can be set under Advanced. Check (prepare) shows what changes,
|
|
4
|
+
// then one Confirm: everyone signs in to the Hub's pages again, connected Fleets stay connected (their member address,
|
|
5
|
+
// pins and credentials are untouched — #3429 is the member address). Own lazy module with its own words, so an older tab
|
|
6
|
+
// or server simply leaves it out. Shared components: card, field, btn, note, err, s-web-ro, s-ui-disclosure, Skeleton.
|
|
7
|
+
import { html, useEffect, useState } from "/assets/app-html.js";
|
|
8
|
+
import { Skeleton } from "/assets/ui-states.js";
|
|
9
|
+
import { register, t, lang } from "/assets/app-i18n.js";
|
|
10
|
+
import { api } from "./settings-confirm.js";
|
|
11
|
+
|
|
12
|
+
register("hubWebAddress", {
|
|
13
|
+
en: {
|
|
14
|
+
title: "Hub address",
|
|
15
|
+
lead: "The address colleagues enter in AgEnD Settings → Hub and open in their browser.",
|
|
16
|
+
address: "Address", listens: "Listens on", certificate: "Certificate", expires: "expires {0}", selfSigned: "Self-signed",
|
|
17
|
+
change: "Change address", newAddress: "New address", newHint: "https:// is added for you. If the port isn't 443, add a colon and the port number, for example :8443.",
|
|
18
|
+
advanced: "Advanced", listenHost: "Listen on (interface)", listenPort: "Port",
|
|
19
|
+
listenHint: "Where the Hub listens on this computer. Usually the address's own port; change it only if a router or reverse proxy forwards another port.",
|
|
20
|
+
cert_keep: "Keep the current certificate", cert_generate: "Create a self-signed certificate for the new address",
|
|
21
|
+
cert_import: "Use my own certificate", certPem: "Certificate (PEM)", keyPem: "Private key (PEM)",
|
|
22
|
+
importHint: "Paste the PEM text. The certificate must cover the new address. The key is sent once to this computer and never shown again.",
|
|
23
|
+
check: "Check", checking: "Checking…", cancel: "Cancel", back: "Back",
|
|
24
|
+
confirmTitle: "Change the Hub's address?", from: "From", to: "To",
|
|
25
|
+
effect: "Everyone signs in to the Hub's pages again, you too. The old address stops working. Connected Fleets stay connected and don't need to connect again.",
|
|
26
|
+
selfSignedWarn: "Self-signed: browsers warn until it is trusted. Compare this fingerprint before trusting it.",
|
|
27
|
+
confirm: "Confirm change", saving: "Changing…",
|
|
28
|
+
ready: "Done. The Hub now answers at {0}. Sign in there again.", open: "Open the Hub",
|
|
29
|
+
off: "Saved. The Hub is stopped; it uses the new address when it runs again.",
|
|
30
|
+
saved_unavailable: "Saved, but the Hub doesn't answer at the new address yet. Check that nothing else uses port {0} on this computer, then turn Run this Hub off and on. The old address no longer works.",
|
|
31
|
+
err_invalid: "That isn't a usable address. Use an https address such as hub.example.com, and a port from 1 to 65535.",
|
|
32
|
+
err_port_conflict: "That address or port is the one Fleets connect to. Use a different port.",
|
|
33
|
+
err_port_in_use: "Another program on this computer is using that port. Choose another port under Advanced.",
|
|
34
|
+
err_certificate: "The certificate doesn't fit: it must cover the new address, match its private key and still be valid. Or create a new one under Advanced.",
|
|
35
|
+
err_unchanged: "That is already the Hub's address.",
|
|
36
|
+
err_stale: "The Hub's settings changed meanwhile. Check the address and try again.",
|
|
37
|
+
err_expired: "That took too long. Check again.",
|
|
38
|
+
err_busy: "Another change is still finishing, or a device is finishing its sign-in. Try again in a moment.",
|
|
39
|
+
err_denied: "Only this computer's own dashboard can change the Hub's address. Reload this page and try again.",
|
|
40
|
+
err_unavailable: "The Hub's address can't be changed right now. Reload this page and try again.",
|
|
41
|
+
err_recovery: "The change didn't finish. Reload this page to see the Hub's current address.",
|
|
42
|
+
err_failed: "The address wasn't changed. Try again.",
|
|
43
|
+
},
|
|
44
|
+
"zh-TW": {
|
|
45
|
+
title: "Hub 位址",
|
|
46
|
+
lead: "同仁在 AgEnD 設定 → Hub 輸入、並用瀏覽器開啟的位址。",
|
|
47
|
+
address: "位址", listens: "監聽於", certificate: "憑證", expires: "到期日 {0}", selfSigned: "自簽",
|
|
48
|
+
change: "變更位址", newAddress: "新位址", newHint: "會自動加上 https://。如果連接埠不是 443,請加上冒號和連接埠號碼,例如 :8443。",
|
|
49
|
+
advanced: "進階", listenHost: "監聽介面", listenPort: "連接埠",
|
|
50
|
+
listenHint: "Hub 在這台電腦上監聽的位置。通常就是位址本身的連接埠;只有路由器或反向代理轉送其他連接埠時才需要變更。",
|
|
51
|
+
cert_keep: "沿用目前的憑證", cert_generate: "為新位址建立自簽憑證",
|
|
52
|
+
cert_import: "使用我自己的憑證", certPem: "憑證(PEM)", keyPem: "私鑰(PEM)",
|
|
53
|
+
importHint: "貼上 PEM 文字。憑證必須涵蓋新位址。私鑰只會傳送到這台電腦一次,之後不會再顯示。",
|
|
54
|
+
check: "檢查", checking: "檢查中…", cancel: "取消", back: "返回",
|
|
55
|
+
confirmTitle: "要變更 Hub 的位址嗎?", from: "原位址", to: "新位址",
|
|
56
|
+
effect: "變更後,所有人(包括你)都要重新登入 Hub 網頁,舊位址也會停止運作。已連接的 Fleet 會保持連接,不需要重新連接。",
|
|
57
|
+
selfSignedWarn: "自簽憑證:在設定信任之前,瀏覽器會顯示警告。信任前請先核對這組指紋。",
|
|
58
|
+
confirm: "確認變更", saving: "變更中…",
|
|
59
|
+
ready: "完成。Hub 現在使用 {0},請在那裡重新登入。", open: "開啟 Hub",
|
|
60
|
+
off: "已儲存。Hub 目前已停止,再次執行時會使用新位址。",
|
|
61
|
+
saved_unavailable: "已儲存,但 Hub 還沒有在新位址回應。請確認這台電腦上沒有其他程式使用 {0} 埠,再將「執行這個 Hub」關閉後重新開啟。舊位址已停止運作。",
|
|
62
|
+
err_invalid: "這不是可用的位址。請使用像 hub.example.com 這樣的 https 位址,連接埠為 1 到 65535。",
|
|
63
|
+
err_port_conflict: "這個位址或連接埠是 Fleet 連接 Hub 用的,請改用其他連接埠。",
|
|
64
|
+
err_port_in_use: "這台電腦上有其他程式正在使用這個連接埠。請在「進階」選擇其他連接埠。",
|
|
65
|
+
err_certificate: "憑證不符:必須涵蓋新位址、與私鑰相符,而且尚未過期。也可以在「進階」建立新的憑證。",
|
|
66
|
+
err_unchanged: "這已經是 Hub 目前的位址。",
|
|
67
|
+
err_stale: "Hub 的設定剛剛有變更。請確認位址後再試一次。",
|
|
68
|
+
err_expired: "等候太久了,請再檢查一次。",
|
|
69
|
+
err_busy: "另一項變更還在完成中,或有裝置正在完成登入,請稍後再試。",
|
|
70
|
+
err_denied: "只有這台電腦自己的儀表板可以變更 Hub 的位址。請重新載入這個頁面後再試。",
|
|
71
|
+
err_unavailable: "目前無法變更 Hub 的位址。請重新載入這個頁面後再試。",
|
|
72
|
+
err_recovery: "變更沒有完成。請重新載入這個頁面查看 Hub 目前的位址。",
|
|
73
|
+
err_failed: "位址沒有變更,請再試一次。",
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
const copy = (key, ...a) => t(`hubWebAddress.${key}`, ...a);
|
|
77
|
+
const PREFIX = "/api/settings/hub/web-address";
|
|
78
|
+
const ERR = new Set(["invalid", "port_conflict", "port_in_use", "certificate", "unchanged", "stale", "expired", "busy", "denied", "unavailable", "recovery"]);
|
|
79
|
+
const errKey = (code) => `err_${ERR.has(code) ? code : "failed"}`;
|
|
80
|
+
|
|
81
|
+
/** What was typed, as the https origin the server is asked for ("hub.example.com" → "https://hub.example.com"); null if not one. */
|
|
82
|
+
export function typedOrigin(text) {
|
|
83
|
+
const v = String(text || "").trim();
|
|
84
|
+
if (!v) return null;
|
|
85
|
+
try {
|
|
86
|
+
const u = new URL(/^[a-z][a-z0-9+.-]*:\/\//i.test(v) ? v : `https://${v}`);
|
|
87
|
+
return u.protocol === "https:" && u.hostname ? u.origin : null;
|
|
88
|
+
} catch { return null; }
|
|
89
|
+
}
|
|
90
|
+
const portOf = (origin) => { try { const u = new URL(origin); return u.port ? Number(u.port) : 443; } catch { return null; } };
|
|
91
|
+
const hostOf = (origin) => { try { return new URL(origin).hostname; } catch { return ""; } };
|
|
92
|
+
/** The display form of an origin: no https://, no :443. */
|
|
93
|
+
export const shownAddress = (origin) => String(origin || "").replace(/^https:\/\//, "").replace(/:443$/, "");
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Where the Hub should listen for a new address. Today's interface stays; the port follows the address — unless today's port
|
|
97
|
+
* is not the address's own (a router or proxy forwards it), and then it stays as it is.
|
|
98
|
+
*/
|
|
99
|
+
export function defaultListen(current, origin) {
|
|
100
|
+
const forwarded = current?.listen && portOf(current.origin) !== current.listen.port;
|
|
101
|
+
return { host: current?.listen?.host || "0.0.0.0", port: forwarded ? current.listen.port : (portOf(origin) ?? current?.listen?.port ?? 443) };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function createWebAddressClient() {
|
|
105
|
+
const call = async (action, body) => {
|
|
106
|
+
try {
|
|
107
|
+
const r = await api(PREFIX + action, { credentials: "same-origin", cache: "no-store", ...(body === undefined ? {} : { method: "POST", body: JSON.stringify(body) }) });
|
|
108
|
+
return r.ok && r.body?.ok ? r.body : { ok: false, code: r.body?.code || "unavailable" };
|
|
109
|
+
} catch { return { ok: false, code: "unavailable" }; }
|
|
110
|
+
};
|
|
111
|
+
return { read: () => call(""), prepare: (candidate) => call("/prepare", candidate), commit: (ref) => call("/commit", { ref }) };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** A certificate's end date in the page's language ("Nov 13, 2027" / 「2027年11月13日」); the server's own text if it isn't a date. */
|
|
115
|
+
export function shownDate(validTo) {
|
|
116
|
+
const d = new Date(String(validTo || ""));
|
|
117
|
+
if (Number.isNaN(d.getTime())) return String(validTo || "");
|
|
118
|
+
try { return new Intl.DateTimeFormat(lang(), { dateStyle: "medium" }).format(d); } catch { return d.toISOString().slice(0, 10); }
|
|
119
|
+
}
|
|
120
|
+
function Fingerprint({ info }) {
|
|
121
|
+
if (!info?.fingerprint256) return null;
|
|
122
|
+
// People compare it byte by byte: a line may break only after a colon, never inside a byte.
|
|
123
|
+
const parts = String(info.fingerprint256).split(":");
|
|
124
|
+
return html`<code class="hub-addr-fp">${parts.map((p, i) => (i ? [":", html`<wbr />`, p] : p))}</code>${info.validTo ? html` <small class="note hub-addr-exp">${copy("expires", shownDate(info.validTo))}</small>` : null}${info.selfSigned ? html` <span class="tag">${copy("selfSigned")}</span>` : null}`;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function HubWebAddressSettings({ client: given = null } = {}) {
|
|
128
|
+
const [client] = useState(() => given || createWebAddressClient());
|
|
129
|
+
const [view, setView] = useState(undefined); // undefined: reading; null: not offered; else { origin, listen, certificate }
|
|
130
|
+
const [step, setStep] = useState("show"); // show | edit | confirm | done
|
|
131
|
+
const [typed, setTyped] = useState(""), [host, setHost] = useState(""), [port, setPort] = useState(""), [cert, setCert] = useState(null);
|
|
132
|
+
const [touched, setTouched] = useState(false); // Advanced was changed by hand: the address no longer re-derives it
|
|
133
|
+
const [certPem, setCertPem] = useState(""), [keyPem, setKeyPem] = useState("");
|
|
134
|
+
const [proposal, setProposal] = useState(null), [outcome, setOutcome] = useState(null), [busy, setBusy] = useState(false), [error, setError] = useState("");
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
let live = true;
|
|
137
|
+
client.read().then((r) => { if (live) setView(r.ok && typeof r.origin === "string" ? r : r.code === "denied" ? null : { failed: true }); });
|
|
138
|
+
return () => { live = false; };
|
|
139
|
+
}, []);
|
|
140
|
+
if (view === null) return null;
|
|
141
|
+
const head = html`<h3>${copy("title")}</h3><p class="note">${copy("lead")}</p>`;
|
|
142
|
+
if (view === undefined) return html`<section class="card hub-web-address" data-section="hub-address">${head}<${Skeleton} variant="rows" lines=${3} /></section>`;
|
|
143
|
+
if (view.failed) return html`<section class="card hub-web-address" data-section="hub-address">${head}<p class="err" role="alert">${copy("err_unavailable")}</p></section>`;
|
|
144
|
+
|
|
145
|
+
const origin = typedOrigin(typed);
|
|
146
|
+
const listen = touched ? { host: host.trim(), port: Number(port) } : defaultListen(view, origin || view.origin);
|
|
147
|
+
const sameHost = !!origin && hostOf(origin) === hostOf(view.origin);
|
|
148
|
+
// Today's certificate unless the address names another host (it only fits today's host name): then a new self-signed one,
|
|
149
|
+
// or the person's own under Advanced. A hand-picked "keep" falls back the same way.
|
|
150
|
+
const picked = touched && cert ? cert : "keep";
|
|
151
|
+
const mode = picked === "keep" && origin && !sameHost ? "generate" : picked;
|
|
152
|
+
const touch = () => { if (!touched) { setTouched(true); setHost(listen.host); setPort(String(listen.port)); setCert(mode); } };
|
|
153
|
+
const edit = () => { setStep("edit"); setTyped(""); setTouched(false); setCert(null); setCertPem(""); setKeyPem(""); setError(""); setOutcome(null); };
|
|
154
|
+
const check = async (e) => {
|
|
155
|
+
e?.preventDefault?.();
|
|
156
|
+
if (busy) return;
|
|
157
|
+
if (!origin || !Number.isInteger(listen.port) || listen.port < 1 || listen.port > 65535 || !listen.host) { setError(copy("err_invalid")); return; }
|
|
158
|
+
if (origin === view.origin && listen.host === view.listen?.host && listen.port === view.listen?.port && mode === "keep") { setError(copy("err_unchanged")); return; }
|
|
159
|
+
setBusy(true); setError("");
|
|
160
|
+
const certificate = mode === "import" ? { mode, certPem, keyPem } : { mode };
|
|
161
|
+
const r = await client.prepare({ origin, listen, certificate });
|
|
162
|
+
setBusy(false);
|
|
163
|
+
if (!r.ok) { setError(copy(errKey(r.code))); return; }
|
|
164
|
+
setKeyPem(""); // sent once; never kept in the page
|
|
165
|
+
setProposal(r); setStep("confirm");
|
|
166
|
+
};
|
|
167
|
+
const confirm = async () => {
|
|
168
|
+
if (busy || !proposal) return;
|
|
169
|
+
setBusy(true); setError("");
|
|
170
|
+
const r = await client.commit(proposal.ref);
|
|
171
|
+
setBusy(false);
|
|
172
|
+
if (!r.ok) { setError(copy(errKey(r.code))); if (r.code === "expired" || r.code === "stale") { setProposal(null); setStep("edit"); } return; }
|
|
173
|
+
setOutcome(r); setProposal(null); setStep("done");
|
|
174
|
+
setView((v) => ({ ...v, origin: r.origin || proposal.summary?.to, listen: proposal.summary?.listen || v.listen, certificate: proposal.certificate || v.certificate }));
|
|
175
|
+
};
|
|
176
|
+
const current = html`<dl class="s-web-ro hub-addr-now">
|
|
177
|
+
<dt>${copy("address")}</dt><dd><a href=${view.origin} target="_blank" rel="noopener noreferrer">${shownAddress(view.origin)}</a></dd>
|
|
178
|
+
${view.listen ? html`<dt>${copy("listens")}</dt><dd><code>${view.listen.host}:${view.listen.port}</code></dd>` : null}
|
|
179
|
+
${view.certificate ? html`<dt>${copy("certificate")}</dt><dd><${Fingerprint} info=${view.certificate} /></dd>` : null}
|
|
180
|
+
</dl>`;
|
|
181
|
+
const err = error ? html`<p class="err" role="alert">${error}</p>` : null;
|
|
182
|
+
|
|
183
|
+
if (step === "confirm" && proposal) {
|
|
184
|
+
const s = proposal.summary || {};
|
|
185
|
+
return html`<section class="card hub-web-address" data-section="hub-address">${head}
|
|
186
|
+
<div class="hub-addr-confirm" role="group" aria-label=${copy("confirmTitle")}><h4>${copy("confirmTitle")}</h4>
|
|
187
|
+
<dl class="s-web-ro">
|
|
188
|
+
<dt>${copy("from")}</dt><dd>${shownAddress(s.from)}</dd>
|
|
189
|
+
<dt>${copy("to")}</dt><dd><strong>${shownAddress(s.to)}</strong></dd>
|
|
190
|
+
${s.listen ? html`<dt>${copy("listens")}</dt><dd><code>${s.listen.host}:${s.listen.port}</code></dd>` : null}
|
|
191
|
+
${proposal.certificate ? html`<dt>${copy("certificate")}</dt><dd><${Fingerprint} info=${proposal.certificate} /></dd>` : null}
|
|
192
|
+
</dl>
|
|
193
|
+
${proposal.certificate?.selfSigned && mode !== "keep" ? html`<p class="note">${copy("selfSignedWarn")}</p>` : null}
|
|
194
|
+
<p class="note hub-addr-effect">${copy("effect")}</p>
|
|
195
|
+
<div class="s-row">
|
|
196
|
+
<button type="button" class="btn btn-primary" disabled=${busy} onClick=${confirm}>${busy ? copy("saving") : copy("confirm")}</button>
|
|
197
|
+
<button type="button" class="btn" disabled=${busy} onClick=${() => { setProposal(null); setStep("edit"); setError(""); }}>${copy("back")}</button>
|
|
198
|
+
</div>
|
|
199
|
+
</div>${err}</section>`;
|
|
200
|
+
}
|
|
201
|
+
if (step === "edit") {
|
|
202
|
+
return html`<section class="card hub-web-address" data-section="hub-address">${head}${current}
|
|
203
|
+
<form class="form hub-addr-form" onSubmit=${check}>
|
|
204
|
+
<label class="field"><span>${copy("newAddress")}</span><input id="hubAddrNew" autocomplete="off" inputmode="url" placeholder="hub.example.com" value=${typed} disabled=${busy}
|
|
205
|
+
onInput=${(e) => { setTyped(e.target.value); setError(""); }} /><small class="note">${copy("newHint")}</small></label>
|
|
206
|
+
<details class="s-ui-disclosure hub-addr-advanced"><summary>${copy("advanced")}</summary><div class="s-ui-disclosure-body">
|
|
207
|
+
<div class="grid2">
|
|
208
|
+
<label class="field"><span>${copy("listenHost")}</span><input id="hubAddrHost" autocomplete="off" value=${listen.host} disabled=${busy} onInput=${(e) => { touch(); setHost(e.target.value); setError(""); }} /></label>
|
|
209
|
+
<label class="field"><span>${copy("listenPort")}</span><input id="hubAddrPort" type="number" inputmode="numeric" min="1" max="65535" step="1" value=${String(listen.port)} disabled=${busy}
|
|
210
|
+
onInput=${(e) => { touch(); setPort(e.target.value); setError(""); }} /></label>
|
|
211
|
+
</div>
|
|
212
|
+
<small class="note">${copy("listenHint")}</small>
|
|
213
|
+
<fieldset class="field hub-addr-cert"><legend>${copy("certificate")}</legend>
|
|
214
|
+
${(sameHost || !origin ? ["keep", "generate", "import"] : ["generate", "import"]).map((m) => html`<label class="check"><input type="radio" name="hubAddrCert" value=${m} checked=${mode === m} disabled=${busy}
|
|
215
|
+
onChange=${() => { touch(); setCert(m); setError(""); }} /> ${copy(`cert_${m}`)}</label>`)}
|
|
216
|
+
${mode === "import" ? html`<label class="field"><span>${copy("certPem")}</span><textarea id="hubAddrCertPem" rows="4" spellcheck=${false} value=${certPem} disabled=${busy} onInput=${(e) => setCertPem(e.target.value)}></textarea></label>
|
|
217
|
+
<label class="field"><span>${copy("keyPem")}</span><textarea id="hubAddrKeyPem" rows="4" spellcheck=${false} autocomplete="off" value=${keyPem} disabled=${busy} onInput=${(e) => setKeyPem(e.target.value)}></textarea></label>
|
|
218
|
+
<small class="note">${copy("importHint")}</small>` : null}
|
|
219
|
+
</fieldset>
|
|
220
|
+
</div></details>
|
|
221
|
+
<div class="s-row">
|
|
222
|
+
<button type="submit" class="btn btn-primary" disabled=${busy || !typed.trim() || (mode === "import" && (!certPem.trim() || !keyPem.trim()))}>${busy ? copy("checking") : copy("check")}</button>
|
|
223
|
+
<button type="button" class="btn" disabled=${busy} onClick=${() => { setStep("show"); setError(""); }}>${copy("cancel")}</button>
|
|
224
|
+
</div>
|
|
225
|
+
</form>${err}</section>`;
|
|
226
|
+
}
|
|
227
|
+
const done = outcome ? html`<p role="status" class=${outcome.state === "saved_unavailable" ? "err" : "note"}>${outcome.state === "ready" ? copy("ready", shownAddress(outcome.origin))
|
|
228
|
+
: outcome.state === "off" ? copy("off") : copy("saved_unavailable", String(view.listen?.port ?? ""))}</p>
|
|
229
|
+
` : null;
|
|
230
|
+
// One row: Open the Hub (after a change that is ready) beside Change address.
|
|
231
|
+
return html`<section class="card hub-web-address" data-section="hub-address">${head}${current}${done}
|
|
232
|
+
<div class="s-row">${outcome?.state === "ready" ? html`<a class="btn btn-primary" href=${outcome.origin} target="_blank" rel="noopener noreferrer">${copy("open")}</a>` : null}<button type="button" class="btn" id="hubAddrChange" onClick=${edit}>${copy("change")}</button></div>${err}</section>`;
|
|
233
|
+
}
|
package/dist/ui/settings-hub.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// Hub key's fingerprint), the key changed (both keys, labelled; only pair again or disconnect), on hold (why) — then
|
|
5
5
|
// this fleet's own agents with a Share switch each, against the revision shown (a stale tab gets a conflict, never a
|
|
6
6
|
// silent widening). Everything goes through hubClient(); until slice 1 that is a stub, and the card says so.
|
|
7
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
7
8
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
8
9
|
import { Skeleton, ErrorState } from "/assets/ui-states.js";
|
|
9
10
|
import { Icon } from "/assets/ui-icons.js";
|
|
@@ -20,6 +21,10 @@ import { confirmPlace, pendingView } from "./hub-confirm-place.js";
|
|
|
20
21
|
import { hq } from "./hub-quick-strings.js";
|
|
21
22
|
import { hp } from "./hub-pairing-progress-strings.js";
|
|
22
23
|
|
|
24
|
+
register("hubSharingFleet", {
|
|
25
|
+
en: { hint: "To pause and resume without clearing the allow list, open this agent under My shared agents on the Hub. Turning Share off stops sharing." },
|
|
26
|
+
"zh-TW": { hint: "要保留允許名單並暫停或繼續分享,請在 Hub「我分享的 Agent」開啟這個 Agent。關閉「分享」會停止分享。" },
|
|
27
|
+
});
|
|
23
28
|
const CONNECT_ERRORS = { address: "errAddress", code: "errCode", busy: "errBusy", unreachable: "errUnreachable", refused: "errRefused" };
|
|
24
29
|
const HOLDS = new Set(["unknown_outcome", "expired", "unsaved", "refused", "revoked", "disconnected", "rejected"]);
|
|
25
30
|
const PUBLISH_ERRORS = { conflict: "errConflict", unsaved: "errUnsaved", not_paired: "errNotPaired", not_enforceable: "agentNotShareable",
|
|
@@ -273,6 +278,7 @@ function HubExposures({ client, pairing }) {
|
|
|
273
278
|
return html`<div class="hub-exposures">
|
|
274
279
|
<h4>${hw("sharedTitle")}</h4>
|
|
275
280
|
<p class="note">${hw("agentLead")}</p>
|
|
281
|
+
<p class="note hub-sharing-hint">${t("hubSharingFleet.hint")}</p>
|
|
276
282
|
${readError ? html`<${ErrorState} message=${hw("errFailed")} onRetry=${load} />` : !rows ? html`<${Skeleton} variant="rows" lines=${3} />` : null}
|
|
277
283
|
${rows && !rows.length ? html`<p class="note">${hw("noAgents")}</p>` : null}
|
|
278
284
|
${rows && rows.length ? html`<ul class="hub-exposure-list">${rows.map((row) => html`<li key=${row.agent} class=${`hub-exposure${row.state === "published" ? " is-shared" : ""}`}>
|
|
@@ -10,3 +10,11 @@
|
|
|
10
10
|
/* The ⓘ sits against the switch it explains; the backup-renewal switch is on the same line, with its own ⓘ. */
|
|
11
11
|
.s-account-keepalive > .s-tipwrap { margin-left: calc(-1 * var(--s-2)); }
|
|
12
12
|
.s-account-keepalive .s-keepalive-fallback { display: flex; align-items: center; gap: var(--s-2); }
|
|
13
|
+
|
|
14
|
+
/* AGEND-250 (UI gate, rule 7): on a phone the switch is tapped through its label, which is --tap high, and the ⓘ is a --tap box whose 18px circle is drawn inside it (the gate measures the element's own box, so the circle is a pseudo-element). */
|
|
15
|
+
@media (max-width: 899px) {
|
|
16
|
+
.s-account-keepalive .check { min-height: var(--tap); }
|
|
17
|
+
.s-account-keepalive .s-i .s-tipbtn { position: relative; width: var(--tap); height: var(--tap); border-color: transparent; }
|
|
18
|
+
.s-account-keepalive .s-i .s-tipbtn::before { content: ""; position: absolute; inset: calc((var(--tap) - 18px) / 2); border: 1px solid var(--border-strong); border-radius: var(--r-full); }
|
|
19
|
+
.s-account-keepalive .s-i .s-tipbtn:hover::before, .s-account-keepalive .s-i .s-tipbtn:focus-visible::before { border-color: var(--accent); }
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* AGEND-113: an account's usage block when it has pools (usage-pool.js): a block per pool, its name over its windows. The block itself is `.s-account-usage` (accounts.css), whose grid a pool spans. */
|
|
2
|
+
.s-account-usage.is-pooled { row-gap: var(--s-2); }
|
|
3
|
+
.s-usage-group { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-1) var(--s-4); min-width: 0; }
|
|
4
|
+
.s-usage-pool { grid-column: 1 / -1; min-width: 0; color: var(--text-3); font-size: var(--fs-xs); font-weight: var(--fw-medium); overflow-wrap: anywhere; }
|
|
5
|
+
/* A window that has reset since the read: its tag, and the full card's "reset since" words where the bar would be. */
|
|
6
|
+
.s-usage-reset { align-items: center; }
|
|
7
|
+
.s-usage-reset-note { grid-column: 2 / -1; min-width: 0; color: var(--text-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
|
|
8
|
+
/* AGEND-119: why the numbers are the last known ones (the cause and when they were read, then what the read said), under the windows and across the block. */
|
|
9
|
+
.s-usage-stale { min-width: 0; overflow-wrap: anywhere; }
|
|
10
|
+
.s-usage-stale-detail { display: block; }
|
|
@@ -60,6 +60,8 @@ button.s-account-used { display: inline-flex; align-items: center; gap: var(--s-
|
|
|
60
60
|
.s-account-usage.is-stale .u-cm-pct { color: var(--text-3); }
|
|
61
61
|
.s-account-usage.is-stale .u-cm-fill { background: var(--text-3); }
|
|
62
62
|
.s-usage-stale { grid-column: 1 / -1; color: var(--text-3); font-size: var(--fs-xs); }
|
|
63
|
+
/* AGEND-119: the reset cell is as wide as its words. The Usage panel's meter gives it a fixed 3.7em, which cuts a week's "↻ 47小時" in zh-TW (a CJK character is a full em); here the bar gives way instead. */
|
|
64
|
+
.s-account-usage .u-cm { grid-template-columns: 2.2em minmax(2em, 1fr) 2.9em minmax(3.7em, max-content); }
|
|
63
65
|
|
|
64
66
|
.s-account-default { margin: 0; }
|
|
65
67
|
.s-accounts .s-account-default { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--bg); }
|
|
@@ -86,3 +88,10 @@ button.s-account-used { display: inline-flex; align-items: center; gap: var(--s-
|
|
|
86
88
|
.s-account-install-run > .signin-warn { color: var(--warn); font-weight: var(--fw-semibold); }
|
|
87
89
|
.s-account-install-output { margin: 0; padding: var(--s-2) var(--s-3); max-height: 14em; overflow: auto; border-radius: var(--r-sm); background: var(--bg); color: var(--text-2); font-size: var(--fs-xs); line-height: 1.5; }
|
|
88
90
|
.s-account-install-run .s-actions { justify-content: flex-end; }
|
|
91
|
+
|
|
92
|
+
/* AGEND-250 (#3771 review; UI gate, style guide rule 7): on a phone every control of the account cards is a tap target (--tap high). Antigravity made a fourth card with an Add account button and a Fleet-default select; the
|
|
93
|
+
gate's ratchet lets no small control be added, so these are made tap-high for every card (the three listed allowances for them are gone from ui-gate-tap-allowlist.json). The buttons of one kind share one height, so all of them grow. */
|
|
94
|
+
@media (max-width: 899px) {
|
|
95
|
+
.s-account-head .s-account-add, .s-account-machine-head .s-account-add { min-height: var(--tap); min-width: var(--tap); }
|
|
96
|
+
.s-accounts .s-account-default select { min-height: var(--tap); }
|
|
97
|
+
}
|
package/dist/ui/shared/app.css
CHANGED
|
@@ -1816,6 +1816,8 @@ body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-s
|
|
|
1816
1816
|
.s-ident { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
|
|
1817
1817
|
.s-facts { min-width: 0; color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1818
1818
|
.s-conn .s-actions { margin-left: 0; flex-wrap: nowrap; }
|
|
1819
|
+
/* Retry and Settings stay together: in a wide list they are the last of the connection's three action columns. */
|
|
1820
|
+
.s-conn-buttons { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); }
|
|
1819
1821
|
@media (max-width: 899px) {
|
|
1820
1822
|
.s-row.s-conn { grid-template-columns: minmax(0, 1fr) auto; }
|
|
1821
1823
|
.s-conn .s-facts { grid-column: 1 / -1; grid-row: 2; }
|
|
@@ -3698,13 +3700,28 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
3698
3700
|
}
|
|
3699
3701
|
@container settings-page (min-width: 900px) {
|
|
3700
3702
|
.p-settings .s-agents-list > .s-group:nth-child(2) > .s-group-head { border-radius: 0; }
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
+
/* AGEND-256: the columns belong to the list, not to each row. Each row used to be its own grid, so its "auto"
|
|
3704
|
+
actions column took that row's buttons (Pause + Stop when running, only Wake when paused; a longer bot name) and
|
|
3705
|
+
the fr columns before it moved with it: a paused row sat 8–24px right of a running one. The list now holds the
|
|
3706
|
+
tracks; the header, each group and each row take them as a subgrid, so every row measures against the widest.
|
|
3707
|
+
A browser without subgrid keeps the per-row template (the second declaration is dropped). */
|
|
3708
|
+
.p-settings .s-agents-list { --s-cols: minmax(150px, 1.1fr) minmax(120px, .8fr) minmax(170px, 1.2fr) minmax(80px, .6fr) minmax(170px, auto); }
|
|
3709
|
+
.p-settings .s-classic-list { --s-cols: minmax(170px, 1fr) minmax(180px, 1.3fr) minmax(90px, .6fr) minmax(150px, auto); }
|
|
3710
|
+
/* A connection's actions are three columns of their own (token | state | Retry + Settings), so the token chip and the
|
|
3711
|
+
state start at one x in every row, whatever the bot's name and whether Retry is there. */
|
|
3712
|
+
.p-settings .s-connections-list { --s-cols: minmax(180px, .9fr) minmax(180px, 1.4fr) auto auto auto; }
|
|
3713
|
+
.p-settings :is(.s-agents-list, .s-classic-list, .s-connections-list) { display: grid; grid-template-columns: var(--s-cols); column-gap: 16px; row-gap: 0; }
|
|
3714
|
+
.p-settings :is(.s-agents-list, .s-classic-list, .s-connections-list) > *, .p-settings .s-agents-list > .s-group > * { grid-column: 1 / -1; }
|
|
3715
|
+
.p-settings .s-agents-list > .s-group { display: grid; grid-template-columns: var(--s-cols); grid-template-columns: subgrid; column-gap: 16px; }
|
|
3716
|
+
.p-settings :is(.s-agent-columns, .s-agent-row, .s-classic-columns, .s-classic-row, .s-connection-columns),
|
|
3717
|
+
.p-settings .s-connections-list > .s-conn { display: grid; grid-template-columns: var(--s-cols); grid-template-columns: subgrid; column-gap: 16px; align-items: center; }
|
|
3703
3718
|
.p-settings :is(.s-agent-row, .s-classic-row) > * { grid-column: auto; grid-row: auto; }
|
|
3704
3719
|
.p-settings :is(.s-agent-row, .s-classic-row) > .s-actions { grid-column: auto; grid-row: auto; }
|
|
3705
|
-
.p-settings .s-
|
|
3706
|
-
.p-settings .s-
|
|
3707
|
-
.p-settings .s-connections-list .s-actions {
|
|
3720
|
+
.p-settings .s-connections-list .s-facts { grid-column: auto; grid-row: auto; text-align: left; }
|
|
3721
|
+
.p-settings .s-connection-columns > span:last-child { grid-column: 3 / -1; }
|
|
3722
|
+
.p-settings .s-connections-list > .s-conn > .s-actions { grid-column: 3 / -1; grid-row: auto; display: grid; grid-template-columns: auto auto auto; grid-template-columns: subgrid; column-gap: 16px; justify-items: start; }
|
|
3723
|
+
.p-settings .s-connections-list .s-state { max-width: 22em; }
|
|
3724
|
+
.p-settings .s-connections-list .s-conn-buttons { justify-self: end; }
|
|
3708
3725
|
}
|
|
3709
3726
|
@container settings-page (max-width: 600px) {
|
|
3710
3727
|
.p-settings :is([data-section="agent-defaults"], [data-section="chat"]) .s-general .grid2 { grid-template-columns: minmax(0, 1fr); }
|
|
@@ -4423,7 +4440,23 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
4423
4440
|
.s-hub-section .hub-retention .grid2 { grid-template-columns: minmax(0, 1fr); }
|
|
4424
4441
|
.s-hub-section .hub-retention input { min-width: 0; max-width: 100%; min-height: var(--tap); font-size: var(--fs-md); }
|
|
4425
4442
|
.s-hub-section .hub-retention button { align-self: flex-start; max-width: 100%; min-height: var(--tap); white-space: normal; }
|
|
4443
|
+
/* M-2901: the Hub address card's fields, choices and buttons are phone tap targets (style guide rule 7). */
|
|
4444
|
+
.s-hub-section .hub-web-address :is(input:not([type="radio"]), .btn, label.check) { min-height: var(--tap); }
|
|
4445
|
+
.s-hub-section .hub-web-address input:not([type="radio"]) { font-size: var(--fs-md); }
|
|
4446
|
+
.s-hub-section .hub-web-address .grid2 { grid-template-columns: minmax(0, 1fr); }
|
|
4447
|
+
.s-hub-section .hub-web-address label.check { display: flex; align-items: center; gap: var(--s-2); }
|
|
4426
4448
|
}
|
|
4449
|
+
/* M-2901: Settings → Hub → Hub address. Fields fill the card; a fingerprint breaks only after a colon (<wbr>), never inside a
|
|
4450
|
+
byte; an end date stays on one line; notes avoid a one-character last line (the longhand: the text-wrap shorthand would
|
|
4451
|
+
reset the end date's nowrap). Chinese text keeps breaking between characters (keep-all left long clauses with a lone
|
|
4452
|
+
「。」 on a phone). The certificate choices sit in the Advanced box without a frame of their own. */
|
|
4453
|
+
.hub-web-address :is(input:not([type="radio"]), textarea) { display: block; width: 100%; max-width: 100%; min-width: 0; }
|
|
4454
|
+
.hub-web-address textarea { resize: vertical; font-family: var(--font-mono, monospace); }
|
|
4455
|
+
.hub-web-address .hub-addr-fp { overflow-wrap: normal; word-break: normal; }
|
|
4456
|
+
.hub-web-address .hub-addr-exp { white-space: nowrap; }
|
|
4457
|
+
.hub-web-address :is(.note, [role="status"], .err) { text-wrap-style: pretty; }
|
|
4458
|
+
.hub-web-address fieldset.hub-addr-cert { border: 0; padding: 0; margin: 0; min-width: 0; }
|
|
4459
|
+
.hub-web-address .hub-addr-confirm h4 { margin: 0 0 var(--s-2); }
|
|
4427
4460
|
|
|
4428
4461
|
/* S-119: the existing company, manual and sharing controls share one Settings card. */
|
|
4429
4462
|
.s-hub-connection { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
|