@songsid/agend 2.3.5 → 2.4.0-alpha.2
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 +3 -1
- package/README.zh-TW.md +3 -1
- package/THIRD_PARTY_NOTICES.md +71 -0
- package/dist/accounts-profiles.d.ts +102 -0
- package/dist/accounts-profiles.js +194 -0
- package/dist/accounts-profiles.js.map +1 -0
- package/dist/accounts-signout.d.ts +59 -0
- package/dist/accounts-signout.js +181 -0
- package/dist/accounts-signout.js.map +1 -0
- package/dist/accounts-view.d.ts +189 -0
- package/dist/accounts-view.js +204 -0
- package/dist/accounts-view.js.map +1 -0
- package/dist/agent-endpoint.d.ts +5 -1
- package/dist/agent-endpoint.js +12 -2
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-export.d.ts +74 -0
- package/dist/agent-export.js +362 -0
- package/dist/agent-export.js.map +1 -0
- package/dist/agent-file-read.js +1 -1
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-runtime-api.d.ts +4 -0
- package/dist/agent-runtime-api.js +59 -0
- package/dist/agent-runtime-api.js.map +1 -0
- package/dist/agent-runtime-change.d.ts +76 -0
- package/dist/agent-runtime-change.js +114 -0
- package/dist/agent-runtime-change.js.map +1 -0
- package/dist/agent-whats-new.js +12 -3
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/agent-workspace.d.ts +103 -0
- package/dist/agent-workspace.js +360 -0
- package/dist/agent-workspace.js.map +1 -0
- package/dist/apply-job.d.ts +5 -0
- package/dist/apply-job.js +10 -3
- package/dist/apply-job.js.map +1 -1
- package/dist/auth-api.d.ts +78 -0
- package/dist/auth-api.js +352 -16
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/company-join.d.ts +16 -0
- package/dist/authority/company-join.js +37 -0
- package/dist/authority/company-join.js.map +1 -0
- package/dist/authority/hub-initialization.d.ts +13 -0
- package/dist/authority/hub-initialization.js +30 -0
- package/dist/authority/hub-initialization.js.map +1 -0
- package/dist/authority/settings-role.d.ts +56 -0
- package/dist/authority/settings-role.js +48 -0
- package/dist/authority/settings-role.js.map +1 -0
- package/dist/authority/web-authority.d.ts +25 -2
- package/dist/authority/web-authority.js +37 -4
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.d.ts +19 -16
- package/dist/backend/claude-code.js +183 -144
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-context.d.ts +17 -0
- package/dist/backend/claude-context.js +30 -0
- package/dist/backend/claude-context.js.map +1 -0
- package/dist/backend/codex-footer-hints.d.ts +3 -0
- package/dist/backend/codex-footer-hints.js +14 -0
- package/dist/backend/codex-footer-hints.js.map +1 -1
- package/dist/backend/codex-package.d.ts +5 -2
- package/dist/backend/codex-package.js +1 -5
- package/dist/backend/codex-package.js.map +1 -1
- package/dist/backend/codex-quota-history.js +4 -19
- package/dist/backend/codex-quota-history.js.map +1 -1
- package/dist/backend/codex.d.ts +149 -129
- package/dist/backend/codex.js +1323 -1233
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +21 -0
- package/dist/backend/credential-profile.js +48 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/effort-metadata.d.ts +38 -2
- package/dist/backend/effort-metadata.js +145 -8
- package/dist/backend/effort-metadata.js.map +1 -1
- package/dist/backend/grok-mcp.d.ts +5 -0
- package/dist/backend/grok-mcp.js +221 -0
- package/dist/backend/grok-mcp.js.map +1 -0
- package/dist/backend/grok-model-cache.d.ts +7 -0
- package/dist/backend/grok-model-cache.js +65 -0
- package/dist/backend/grok-model-cache.js.map +1 -0
- package/dist/backend/grok.d.ts +7 -10
- package/dist/backend/grok.js +44 -88
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/launch-effort.d.ts +1 -1
- package/dist/backend/launch-effort.js +7 -3
- package/dist/backend/launch-effort.js.map +1 -1
- package/dist/backend/native-pane.d.ts +11 -0
- package/dist/backend/native-pane.js +59 -0
- package/dist/backend/native-pane.js.map +1 -0
- package/dist/backend/types.d.ts +26 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +16 -1
- package/dist/backend-availability.js +65 -2
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-signin-pending.d.ts +8 -2
- package/dist/backend-signin-pending.js +6 -2
- package/dist/backend-signin-pending.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +9 -2
- package/dist/browser-backend-signins.js +9 -5
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance-cli.d.ts +3 -0
- package/dist/build-provenance-cli.js +11 -0
- package/dist/build-provenance-cli.js.map +1 -0
- package/dist/build-provenance.d.ts +20 -0
- package/dist/build-provenance.js +67 -0
- package/dist/build-provenance.js.map +1 -0
- package/dist/build-provenance.json +1 -0
- package/dist/bundled-tmux-guard.d.ts +0 -2
- package/dist/bundled-tmux-guard.js +10 -23
- package/dist/bundled-tmux-guard.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +2 -0
- package/dist/channel/mcp-tools.js +4 -4
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/classic-bindings.d.ts +13 -0
- package/dist/classic-bindings.js +28 -2
- package/dist/classic-bindings.js.map +1 -1
- package/dist/claude-auth-status.d.ts +60 -0
- package/dist/claude-auth-status.js +165 -0
- package/dist/claude-auth-status.js.map +1 -0
- package/dist/cli-audited.d.ts +60 -0
- package/dist/cli-audited.js +84 -0
- package/dist/cli-audited.js.map +1 -0
- package/dist/cli-capability.d.ts +217 -0
- package/dist/cli-capability.js +55 -0
- package/dist/cli-capability.js.map +1 -0
- package/dist/cli-caps-module.d.ts +33 -0
- package/dist/cli-caps-module.js +45 -0
- package/dist/cli-caps-module.js.map +1 -0
- package/dist/cli-registry-check.d.ts +28 -0
- package/dist/cli-registry-check.js +237 -0
- package/dist/cli-registry-check.js.map +1 -0
- package/dist/cli-registry.d.ts +578 -0
- package/dist/cli-registry.js +83 -0
- package/dist/cli-registry.js.map +1 -0
- package/dist/cli-spec-antigravity.d.ts +71 -0
- package/dist/cli-spec-antigravity.js +47 -0
- package/dist/cli-spec-antigravity.js.map +1 -0
- package/dist/cli-spec-claude-code.d.ts +93 -0
- package/dist/cli-spec-claude-code.js +37 -0
- package/dist/cli-spec-claude-code.js.map +1 -0
- package/dist/cli-spec-codex.d.ts +87 -0
- package/dist/cli-spec-codex.js +40 -0
- package/dist/cli-spec-codex.js.map +1 -0
- package/dist/cli-spec-grok.d.ts +64 -0
- package/dist/cli-spec-grok.js +40 -0
- package/dist/cli-spec-grok.js.map +1 -0
- package/dist/cli-spec-kiro-cli.d.ts +79 -0
- package/dist/cli-spec-kiro-cli.js +40 -0
- package/dist/cli-spec-kiro-cli.js.map +1 -0
- package/dist/cli-spec-muse.d.ts +54 -0
- package/dist/cli-spec-muse.js +40 -0
- package/dist/cli-spec-muse.js.map +1 -0
- package/dist/cli-spec-opencode.d.ts +60 -0
- package/dist/cli-spec-opencode.js +42 -0
- package/dist/cli-spec-opencode.js.map +1 -0
- package/dist/cli.js +311 -54
- package/dist/cli.js.map +1 -1
- package/dist/codex-pane-ownership.d.ts +13 -0
- package/dist/codex-pane-ownership.js +192 -0
- package/dist/codex-pane-ownership.js.map +1 -0
- package/dist/config-validator.js +140 -9
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +16 -0
- package/dist/config.js.map +1 -1
- package/dist/create-host-account.d.ts +17 -0
- package/dist/create-host-account.js +47 -0
- package/dist/create-host-account.js.map +1 -0
- package/dist/daemon.d.ts +104 -7
- package/dist/daemon.js +1062 -282
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +15 -3
- package/dist/delivery-consumed-watch.js +23 -1
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +9 -0
- package/dist/delivery-outbox.js +43 -4
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +2 -42
- package/dist/delivery-reconciliation.js +2 -164
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/dispatcher-liveness.d.ts +172 -0
- package/dist/dispatcher-liveness.js +238 -0
- package/dist/dispatcher-liveness.js.map +1 -0
- package/dist/doctor.js +19 -9
- package/dist/doctor.js.map +1 -1
- package/dist/e2e-isolation.js +5 -2
- package/dist/e2e-isolation.js.map +1 -1
- package/dist/fleet-context.d.ts +7 -3
- package/dist/fleet-control-audit.d.ts +1 -1
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +2 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +1112 -33
- package/dist/fleet-manager.js +5754 -528
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +98 -0
- package/dist/fleet-windows-runtime.js +467 -0
- package/dist/fleet-windows-runtime.js.map +1 -0
- package/dist/general-binding.d.ts +85 -0
- package/dist/general-binding.js +298 -0
- package/dist/general-binding.js.map +1 -0
- package/dist/general-host-owner.d.ts +8 -0
- package/dist/general-host-owner.js +26 -0
- package/dist/general-host-owner.js.map +1 -0
- package/dist/general-instance.d.ts +7 -0
- package/dist/general-instance.js +20 -3
- package/dist/general-instance.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +75 -23
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +42 -9
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +1 -1
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +2 -2
- package/dist/general-knowledge/skills/fleet-restart/SKILL.md +1 -1
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +1 -1
- package/dist/general-knowledge/skills/session-management/SKILL.md +1 -1
- package/dist/general-knowledge/skills/tui-effort/SKILL.md +10 -10
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +48 -26
- package/dist/general-knowledge/steering/core-rules.md +2 -2
- package/dist/general-role.d.ts +5 -0
- package/dist/general-role.js +27 -0
- package/dist/general-role.js.map +1 -0
- package/dist/hub/admission.d.ts +28 -0
- package/dist/hub/admission.js +62 -0
- package/dist/hub/admission.js.map +1 -0
- package/dist/hub/attachments/limits.d.ts +20 -0
- package/dist/hub/attachments/limits.js +48 -0
- package/dist/hub/attachments/limits.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +116 -0
- package/dist/hub/attachments/store.js +246 -0
- package/dist/hub/attachments/store.js.map +1 -0
- package/dist/hub/audit/index.d.ts +62 -0
- package/dist/hub/audit/index.js +351 -0
- package/dist/hub/audit/index.js.map +1 -0
- package/dist/hub/browser-certificate.d.ts +38 -0
- package/dist/hub/browser-certificate.js +247 -0
- package/dist/hub/browser-certificate.js.map +1 -0
- package/dist/hub/buttons-model.d.ts +9 -0
- package/dist/hub/buttons-model.js +42 -0
- package/dist/hub/buttons-model.js.map +1 -0
- package/dist/hub/buttons.d.ts +54 -0
- package/dist/hub/buttons.js +348 -0
- package/dist/hub/buttons.js.map +1 -0
- package/dist/hub/catalog.d.ts +80 -0
- package/dist/hub/catalog.js +390 -0
- package/dist/hub/catalog.js.map +1 -0
- package/dist/hub/client.d.ts +71 -0
- package/dist/hub/client.js +335 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/hub/compose/member.d.ts +147 -0
- package/dist/hub/compose/member.js +476 -0
- package/dist/hub/compose/member.js.map +1 -0
- package/dist/hub/compose/server.d.ts +170 -0
- package/dist/hub/compose/server.js +495 -0
- package/dist/hub/compose/server.js.map +1 -0
- package/dist/hub/compose/storage.d.ts +5 -0
- package/dist/hub/compose/storage.js +28 -0
- package/dist/hub/compose/storage.js.map +1 -0
- package/dist/hub/compose/views.d.ts +12 -0
- package/dist/hub/compose/views.js +4 -0
- package/dist/hub/compose/views.js.map +1 -0
- package/dist/hub/db.d.ts +58 -0
- package/dist/hub/db.js +215 -0
- package/dist/hub/db.js.map +1 -0
- package/dist/hub/directory/config.d.ts +39 -0
- package/dist/hub/directory/config.js +108 -0
- package/dist/hub/directory/config.js.map +1 -0
- package/dist/hub/directory/directory.d.ts +25 -0
- package/dist/hub/directory/directory.js +588 -0
- package/dist/hub/directory/directory.js.map +1 -0
- package/dist/hub/directory/groups.d.ts +55 -0
- package/dist/hub/directory/groups.js +30 -0
- package/dist/hub/directory/groups.js.map +1 -0
- package/dist/hub/directory/index.d.ts +8 -0
- package/dist/hub/directory/index.js +4 -0
- package/dist/hub/directory/index.js.map +1 -0
- package/dist/hub/directory/profiles.d.ts +41 -0
- package/dist/hub/directory/profiles.js +90 -0
- package/dist/hub/directory/profiles.js.map +1 -0
- package/dist/hub/directory/types.d.ts +84 -0
- package/dist/hub/directory/types.js +14 -0
- package/dist/hub/directory/types.js.map +1 -0
- package/dist/hub/directory-response-owner.d.ts +38 -0
- package/dist/hub/directory-response-owner.js +191 -0
- package/dist/hub/directory-response-owner.js.map +1 -0
- package/dist/hub/enrollment-budget.d.ts +6 -0
- package/dist/hub/enrollment-budget.js +24 -0
- package/dist/hub/enrollment-budget.js.map +1 -0
- 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/execution/cli-provider.d.ts +23 -0
- package/dist/hub/execution/cli-provider.js +341 -0
- package/dist/hub/execution/cli-provider.js.map +1 -0
- package/dist/hub/execution/index.d.ts +13 -0
- package/dist/hub/execution/index.js +8 -0
- package/dist/hub/execution/index.js.map +1 -0
- package/dist/hub/execution/model-broker.d.ts +24 -0
- package/dist/hub/execution/model-broker.js +208 -0
- package/dist/hub/execution/model-broker.js.map +1 -0
- package/dist/hub/execution/provider-setup.d.ts +11 -0
- package/dist/hub/execution/provider-setup.js +21 -0
- package/dist/hub/execution/provider-setup.js.map +1 -0
- package/dist/hub/execution/sandbox-runner.d.ts +1 -0
- package/dist/hub/execution/sandbox-runner.js +221 -0
- package/dist/hub/execution/sandbox-runner.js.map +1 -0
- package/dist/hub/execution/service.d.ts +136 -0
- package/dist/hub/execution/service.js +459 -0
- package/dist/hub/execution/service.js.map +1 -0
- package/dist/hub/execution/store.d.ts +61 -0
- package/dist/hub/execution/store.js +182 -0
- package/dist/hub/execution/store.js.map +1 -0
- package/dist/hub/execution/views.d.ts +20 -0
- package/dist/hub/execution/views.js +48 -0
- package/dist/hub/execution/views.js.map +1 -0
- package/dist/hub/fleet-revocation.d.ts +3 -0
- package/dist/hub/fleet-revocation.js +7 -0
- package/dist/hub/fleet-revocation.js.map +1 -0
- package/dist/hub/group-policy/admin-api.d.ts +30 -0
- package/dist/hub/group-policy/admin-api.js +92 -0
- package/dist/hub/group-policy/admin-api.js.map +1 -0
- package/dist/hub/group-policy/admin-context.d.ts +23 -0
- package/dist/hub/group-policy/admin-context.js +52 -0
- package/dist/hub/group-policy/admin-context.js.map +1 -0
- package/dist/hub/group-policy/admin-control.d.ts +35 -0
- package/dist/hub/group-policy/admin-control.js +260 -0
- package/dist/hub/group-policy/admin-control.js.map +1 -0
- package/dist/hub/group-policy/admin-dto.d.ts +259 -0
- package/dist/hub/group-policy/admin-dto.js +57 -0
- package/dist/hub/group-policy/admin-dto.js.map +1 -0
- package/dist/hub/group-policy/admin-facts.d.ts +17 -0
- package/dist/hub/group-policy/admin-facts.js +33 -0
- package/dist/hub/group-policy/admin-facts.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.d.ts +51 -0
- package/dist/hub/group-policy/admin-impact.js +90 -0
- package/dist/hub/group-policy/admin-impact.js.map +1 -0
- package/dist/hub/group-policy/admin-inventory.d.ts +24 -0
- package/dist/hub/group-policy/admin-inventory.js +72 -0
- package/dist/hub/group-policy/admin-inventory.js.map +1 -0
- package/dist/hub/group-policy/admin-read.d.ts +21 -0
- package/dist/hub/group-policy/admin-read.js +95 -0
- package/dist/hub/group-policy/admin-read.js.map +1 -0
- package/dist/hub/group-policy/admin-search.d.ts +14 -0
- package/dist/hub/group-policy/admin-search.js +72 -0
- package/dist/hub/group-policy/admin-search.js.map +1 -0
- package/dist/hub/group-policy/authorization.d.ts +79 -0
- package/dist/hub/group-policy/authorization.js +379 -0
- package/dist/hub/group-policy/authorization.js.map +1 -0
- package/dist/hub/group-policy/impact-inventory.d.ts +21 -0
- package/dist/hub/group-policy/impact-inventory.js +75 -0
- package/dist/hub/group-policy/impact-inventory.js.map +1 -0
- package/dist/hub/group-policy/model.d.ts +56 -0
- package/dist/hub/group-policy/model.js +46 -0
- package/dist/hub/group-policy/model.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +111 -0
- package/dist/hub/group-policy/resources.js +298 -0
- package/dist/hub/group-policy/resources.js.map +1 -0
- package/dist/hub/group-policy/store.d.ts +75 -0
- package/dist/hub/group-policy/store.js +255 -0
- package/dist/hub/group-policy/store.js.map +1 -0
- package/dist/hub/group-policy/welcome.d.ts +36 -0
- package/dist/hub/group-policy/welcome.js +55 -0
- package/dist/hub/group-policy/welcome.js.map +1 -0
- package/dist/hub/http/compose.d.ts +24 -0
- package/dist/hub/http/compose.js +766 -0
- package/dist/hub/http/compose.js.map +1 -0
- package/dist/hub/http/core.d.ts +71 -0
- package/dist/hub/http/core.js +266 -0
- package/dist/hub/http/core.js.map +1 -0
- package/dist/hub/http/deps.d.ts +79 -0
- package/dist/hub/http/deps.js +2 -0
- package/dist/hub/http/deps.js.map +1 -0
- package/dist/hub/http/schema.d.ts +14 -0
- package/dist/hub/http/schema.js +84 -0
- package/dist/hub/http/schema.js.map +1 -0
- package/dist/hub/identity.d.ts +32 -0
- package/dist/hub/identity.js +80 -0
- package/dist/hub/identity.js.map +1 -0
- package/dist/hub/init/browser-certificate.d.ts +14 -0
- package/dist/hub/init/browser-certificate.js +99 -0
- package/dist/hub/init/browser-certificate.js.map +1 -0
- package/dist/hub/init/browser-tls.d.ts +18 -0
- package/dist/hub/init/browser-tls.js +62 -0
- package/dist/hub/init/browser-tls.js.map +1 -0
- package/dist/hub/init/cli.d.ts +3 -0
- package/dist/hub/init/cli.js +83 -0
- package/dist/hub/init/cli.js.map +1 -0
- package/dist/hub/init/directory-certificate.d.ts +24 -0
- package/dist/hub/init/directory-certificate.js +229 -0
- package/dist/hub/init/directory-certificate.js.map +1 -0
- package/dist/hub/init/existing-fleet.d.ts +6 -0
- package/dist/hub/init/existing-fleet.js +58 -0
- package/dist/hub/init/existing-fleet.js.map +1 -0
- package/dist/hub/init/handoff.d.ts +8 -0
- package/dist/hub/init/handoff.js +36 -0
- package/dist/hub/init/handoff.js.map +1 -0
- package/dist/hub/init/identity.d.ts +5 -0
- package/dist/hub/init/identity.js +24 -0
- package/dist/hub/init/identity.js.map +1 -0
- package/dist/hub/init/initializer.d.ts +34 -0
- package/dist/hub/init/initializer.js +504 -0
- package/dist/hub/init/initializer.js.map +1 -0
- package/dist/hub/init/inventory.d.ts +17 -0
- package/dist/hub/init/inventory.js +33 -0
- package/dist/hub/init/inventory.js.map +1 -0
- package/dist/hub/init/layout.d.ts +32 -0
- package/dist/hub/init/layout.js +53 -0
- package/dist/hub/init/layout.js.map +1 -0
- package/dist/hub/init/network.d.ts +20 -0
- package/dist/hub/init/network.js +108 -0
- package/dist/hub/init/network.js.map +1 -0
- package/dist/hub/init/plan-digest.d.ts +5 -0
- package/dist/hub/init/plan-digest.js +49 -0
- package/dist/hub/init/plan-digest.js.map +1 -0
- package/dist/hub/init/prompt.d.ts +26 -0
- package/dist/hub/init/prompt.js +111 -0
- package/dist/hub/init/prompt.js.map +1 -0
- package/dist/hub/init/secret-file.d.ts +1 -0
- package/dist/hub/init/secret-file.js +59 -0
- package/dist/hub/init/secret-file.js.map +1 -0
- package/dist/hub/init/text.d.ts +129 -0
- package/dist/hub/init/text.js +251 -0
- package/dist/hub/init/text.js.map +1 -0
- package/dist/hub/init/types.d.ts +142 -0
- package/dist/hub/init/types.js +9 -0
- package/dist/hub/init/types.js.map +1 -0
- package/dist/hub/init/web-audit-import.d.ts +12 -0
- package/dist/hub/init/web-audit-import.js +39 -0
- package/dist/hub/init/web-audit-import.js.map +1 -0
- package/dist/hub/init/web-audit.d.ts +30 -0
- package/dist/hub/init/web-audit.js +42 -0
- package/dist/hub/init/web-audit.js.map +1 -0
- package/dist/hub/init/web-error.d.ts +6 -0
- package/dist/hub/init/web-error.js +8 -0
- package/dist/hub/init/web-error.js.map +1 -0
- package/dist/hub/init/web-http.d.ts +9 -0
- package/dist/hub/init/web-http.js +103 -0
- package/dist/hub/init/web-http.js.map +1 -0
- package/dist/hub/init/web.d.ts +125 -0
- package/dist/hub/init/web.js +433 -0
- package/dist/hub/init/web.js.map +1 -0
- package/dist/hub/init/wizard.d.ts +34 -0
- package/dist/hub/init/wizard.js +580 -0
- package/dist/hub/init/wizard.js.map +1 -0
- package/dist/hub/initialization.d.ts +23 -0
- package/dist/hub/initialization.js +28 -0
- package/dist/hub/initialization.js.map +1 -0
- package/dist/hub/join/client.d.ts +52 -0
- package/dist/hub/join/client.js +136 -0
- package/dist/hub/join/client.js.map +1 -0
- package/dist/hub/join/descriptor.d.ts +52 -0
- package/dist/hub/join/descriptor.js +59 -0
- package/dist/hub/join/descriptor.js.map +1 -0
- package/dist/hub/join/display.d.ts +18 -0
- package/dist/hub/join/display.js +53 -0
- package/dist/hub/join/display.js.map +1 -0
- package/dist/hub/join/fleet-authority.d.ts +2 -0
- package/dist/hub/join/fleet-authority.js +3 -0
- package/dist/hub/join/fleet-authority.js.map +1 -0
- package/dist/hub/join/http.d.ts +8 -0
- package/dist/hub/join/http.js +122 -0
- package/dist/hub/join/http.js.map +1 -0
- package/dist/hub/join/invitation.d.ts +28 -0
- package/dist/hub/join/invitation.js +28 -0
- package/dist/hub/join/invitation.js.map +1 -0
- package/dist/hub/join/local-journal.d.ts +84 -0
- package/dist/hub/join/local-journal.js +65 -0
- package/dist/hub/join/local-journal.js.map +1 -0
- package/dist/hub/join/local.d.ts +255 -0
- package/dist/hub/join/local.js +678 -0
- package/dist/hub/join/local.js.map +1 -0
- package/dist/hub/join/private.d.ts +3 -0
- package/dist/hub/join/private.js +46 -0
- package/dist/hub/join/private.js.map +1 -0
- package/dist/hub/join/protocol.d.ts +69 -0
- package/dist/hub/join/protocol.js +96 -0
- package/dist/hub/join/protocol.js.map +1 -0
- package/dist/hub/join/receipt.d.ts +43 -0
- package/dist/hub/join/receipt.js +75 -0
- package/dist/hub/join/receipt.js.map +1 -0
- package/dist/hub/join/service.d.ts +280 -0
- package/dist/hub/join/service.js +802 -0
- package/dist/hub/join/service.js.map +1 -0
- package/dist/hub/join/store.d.ts +135 -0
- package/dist/hub/join/store.js +136 -0
- package/dist/hub/join/store.js.map +1 -0
- package/dist/hub/join/trust.d.ts +19 -0
- package/dist/hub/join/trust.js +94 -0
- package/dist/hub/join/trust.js.map +1 -0
- package/dist/hub/member/agent-mode.d.ts +6 -0
- package/dist/hub/member/agent-mode.js +23 -0
- package/dist/hub/member/agent-mode.js.map +1 -0
- package/dist/hub/member/attachments.d.ts +29 -0
- package/dist/hub/member/attachments.js +107 -0
- package/dist/hub/member/attachments.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +91 -0
- package/dist/hub/member/exposure-api.js +67 -0
- package/dist/hub/member/exposure-api.js.map +1 -0
- package/dist/hub/member/exposures.d.ts +127 -0
- package/dist/hub/member/exposures.js +292 -0
- package/dist/hub/member/exposures.js.map +1 -0
- package/dist/hub/member/pairing-api.d.ts +101 -0
- package/dist/hub/member/pairing-api.js +429 -0
- package/dist/hub/member/pairing-api.js.map +1 -0
- package/dist/hub/member/pairing-notices.d.ts +18 -0
- package/dist/hub/member/pairing-notices.js +62 -0
- package/dist/hub/member/pairing-notices.js.map +1 -0
- package/dist/hub/member/quota.d.ts +20 -0
- package/dist/hub/member/quota.js +98 -0
- package/dist/hub/member/quota.js.map +1 -0
- package/dist/hub/member-journal.d.ts +104 -0
- package/dist/hub/member-journal.js +336 -0
- package/dist/hub/member-journal.js.map +1 -0
- package/dist/hub/member-reconciliation.d.ts +14 -0
- package/dist/hub/member-reconciliation.js +97 -0
- package/dist/hub/member-reconciliation.js.map +1 -0
- package/dist/hub/mount.d.ts +50 -0
- package/dist/hub/mount.js +157 -0
- package/dist/hub/mount.js.map +1 -0
- package/dist/hub/pairing-client.d.ts +17 -0
- package/dist/hub/pairing-client.js +108 -0
- package/dist/hub/pairing-client.js.map +1 -0
- package/dist/hub/pairing-notices.d.ts +50 -0
- package/dist/hub/pairing-notices.js +271 -0
- package/dist/hub/pairing-notices.js.map +1 -0
- package/dist/hub/pairing.d.ts +116 -0
- package/dist/hub/pairing.js +526 -0
- package/dist/hub/pairing.js.map +1 -0
- package/dist/hub/policy.d.ts +65 -0
- package/dist/hub/policy.js +154 -0
- package/dist/hub/policy.js.map +1 -0
- package/dist/hub/preview.d.ts +32 -0
- package/dist/hub/preview.js +64 -0
- package/dist/hub/preview.js.map +1 -0
- package/dist/hub/private-files.d.ts +5 -0
- package/dist/hub/private-files.js +44 -0
- package/dist/hub/private-files.js.map +1 -0
- package/dist/hub/profile.d.ts +59 -0
- package/dist/hub/profile.js +73 -0
- package/dist/hub/profile.js.map +1 -0
- package/dist/hub/protocol.d.ts +895 -0
- package/dist/hub/protocol.js +105 -0
- package/dist/hub/protocol.js.map +1 -0
- package/dist/hub/quota.d.ts +24 -0
- package/dist/hub/quota.js +112 -0
- package/dist/hub/quota.js.map +1 -0
- package/dist/hub/representative.d.ts +141 -0
- package/dist/hub/representative.js +528 -0
- package/dist/hub/representative.js.map +1 -0
- package/dist/hub/retention.d.ts +17 -0
- package/dist/hub/retention.js +45 -0
- package/dist/hub/retention.js.map +1 -0
- package/dist/hub/room-read-pacer.d.ts +14 -0
- package/dist/hub/room-read-pacer.js +51 -0
- package/dist/hub/room-read-pacer.js.map +1 -0
- package/dist/hub/rooms.d.ts +127 -0
- package/dist/hub/rooms.js +597 -0
- package/dist/hub/rooms.js.map +1 -0
- package/dist/hub/runtime.d.ts +163 -0
- package/dist/hub/runtime.js +708 -0
- package/dist/hub/runtime.js.map +1 -0
- package/dist/hub/server.d.ts +61 -0
- package/dist/hub/server.js +263 -0
- package/dist/hub/server.js.map +1 -0
- package/dist/hub/service-start.d.ts +17 -0
- package/dist/hub/service-start.js +109 -0
- package/dist/hub/service-start.js.map +1 -0
- package/dist/hub/session-directory-transition.d.ts +48 -0
- package/dist/hub/session-directory-transition.js +118 -0
- package/dist/hub/session-directory-transition.js.map +1 -0
- package/dist/hub/session-epoch.d.ts +16 -0
- package/dist/hub/session-epoch.js +50 -0
- package/dist/hub/session-epoch.js.map +1 -0
- package/dist/hub/sessions.d.ts +66 -0
- package/dist/hub/sessions.js +217 -0
- package/dist/hub/sessions.js.map +1 -0
- package/dist/hub/settings-api.d.ts +50 -0
- package/dist/hub/settings-api.js +92 -0
- package/dist/hub/settings-api.js.map +1 -0
- package/dist/hub/settings-commit.d.ts +108 -0
- package/dist/hub/settings-commit.js +537 -0
- package/dist/hub/settings-commit.js.map +1 -0
- package/dist/hub/settings-directory-ca.d.ts +31 -0
- package/dist/hub/settings-directory-ca.js +115 -0
- package/dist/hub/settings-directory-ca.js.map +1 -0
- package/dist/hub/settings-directory-control.d.ts +58 -0
- package/dist/hub/settings-directory-control.js +117 -0
- package/dist/hub/settings-directory-control.js.map +1 -0
- package/dist/hub/settings-directory-decision.d.ts +465 -0
- package/dist/hub/settings-directory-decision.js +322 -0
- package/dist/hub/settings-directory-decision.js.map +1 -0
- package/dist/hub/settings-directory-host-http.d.ts +9 -0
- package/dist/hub/settings-directory-host-http.js +75 -0
- package/dist/hub/settings-directory-host-http.js.map +1 -0
- package/dist/hub/settings-directory-host-notice-http.d.ts +9 -0
- package/dist/hub/settings-directory-host-notice-http.js +78 -0
- package/dist/hub/settings-directory-host-notice-http.js.map +1 -0
- package/dist/hub/settings-directory-host-notices.d.ts +11 -0
- package/dist/hub/settings-directory-host-notices.js +39 -0
- package/dist/hub/settings-directory-host-notices.js.map +1 -0
- package/dist/hub/settings-directory-http.d.ts +33 -0
- package/dist/hub/settings-directory-http.js +109 -0
- package/dist/hub/settings-directory-http.js.map +1 -0
- package/dist/hub/settings-directory-mount.d.ts +24 -0
- package/dist/hub/settings-directory-mount.js +77 -0
- package/dist/hub/settings-directory-mount.js.map +1 -0
- package/dist/hub/settings-directory-notices.d.ts +61 -0
- package/dist/hub/settings-directory-notices.js +132 -0
- package/dist/hub/settings-directory-notices.js.map +1 -0
- package/dist/hub/settings-directory-proof.d.ts +77 -0
- package/dist/hub/settings-directory-proof.js +313 -0
- package/dist/hub/settings-directory-proof.js.map +1 -0
- package/dist/hub/settings-directory-recovery-intent.d.ts +13 -0
- package/dist/hub/settings-directory-recovery-intent.js +29 -0
- package/dist/hub/settings-directory-recovery-intent.js.map +1 -0
- package/dist/hub/settings-directory-recovery.d.ts +45 -0
- package/dist/hub/settings-directory-recovery.js +178 -0
- package/dist/hub/settings-directory-recovery.js.map +1 -0
- package/dist/hub/settings-directory-runtime.d.ts +17 -0
- package/dist/hub/settings-directory-runtime.js +2 -0
- package/dist/hub/settings-directory-runtime.js.map +1 -0
- package/dist/hub/settings-directory-save.d.ts +37 -0
- package/dist/hub/settings-directory-save.js +175 -0
- package/dist/hub/settings-directory-save.js.map +1 -0
- package/dist/hub/settings-web-address-control.d.ts +49 -0
- package/dist/hub/settings-web-address-control.js +99 -0
- package/dist/hub/settings-web-address-control.js.map +1 -0
- package/dist/hub/settings-web-address-decision.d.ts +91 -0
- package/dist/hub/settings-web-address-decision.js +163 -0
- package/dist/hub/settings-web-address-decision.js.map +1 -0
- package/dist/hub/settings-web-address-http.d.ts +9 -0
- package/dist/hub/settings-web-address-http.js +74 -0
- package/dist/hub/settings-web-address-http.js.map +1 -0
- package/dist/hub/settings-web-address-network.d.ts +2 -0
- package/dist/hub/settings-web-address-network.js +25 -0
- package/dist/hub/settings-web-address-network.js.map +1 -0
- package/dist/hub/settings-web-address-policy.d.ts +27 -0
- package/dist/hub/settings-web-address-policy.js +47 -0
- package/dist/hub/settings-web-address-policy.js.map +1 -0
- package/dist/hub/settings-web-address.d.ts +64 -0
- package/dist/hub/settings-web-address.js +226 -0
- package/dist/hub/settings-web-address.js.map +1 -0
- package/dist/hub/socket.d.ts +24 -0
- package/dist/hub/socket.js +79 -0
- package/dist/hub/socket.js.map +1 -0
- package/dist/hub/store.d.ts +87 -0
- package/dist/hub/store.js +108 -0
- package/dist/hub/store.js.map +1 -0
- package/dist/hub/tls.d.ts +31 -0
- package/dist/hub/tls.js +135 -0
- package/dist/hub/tls.js.map +1 -0
- package/dist/hub/types.d.ts +429 -0
- package/dist/hub/types.js +2 -0
- package/dist/hub/types.js.map +1 -0
- package/dist/hub/validation.d.ts +33 -0
- package/dist/hub/validation.js +136 -0
- package/dist/hub/validation.js.map +1 -0
- package/dist/hub/version-floor.d.ts +10 -0
- package/dist/hub/version-floor.js +45 -0
- package/dist/hub/version-floor.js.map +1 -0
- package/dist/hub-browser-certificate-policy.d.ts +31 -0
- package/dist/hub-browser-certificate-policy.js +25 -0
- package/dist/hub-browser-certificate-policy.js.map +1 -0
- package/dist/hub-host-settings.d.ts +48 -0
- package/dist/hub-host-settings.js +85 -0
- package/dist/hub-host-settings.js.map +1 -0
- package/dist/hub-membership-settings.d.ts +6 -0
- package/dist/hub-membership-settings.js +21 -0
- package/dist/hub-membership-settings.js.map +1 -0
- package/dist/hub-mode.d.ts +15 -0
- package/dist/hub-mode.js +17 -0
- package/dist/hub-mode.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +50 -0
- package/dist/hub-pairing-summary.js +39 -0
- package/dist/hub-pairing-summary.js.map +1 -0
- package/dist/hub-report-target.d.ts +32 -0
- package/dist/hub-report-target.js +33 -0
- package/dist/hub-report-target.js.map +1 -0
- package/dist/hub-retention-policy.d.ts +14 -0
- package/dist/hub-retention-policy.js +15 -0
- package/dist/hub-retention-policy.js.map +1 -0
- package/dist/install-user-systemd.d.ts +20 -0
- package/dist/install-user-systemd.js +55 -0
- package/dist/install-user-systemd.js.map +1 -0
- package/dist/instance-config-impact.js +13 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +42 -4
- package/dist/instance-lifecycle.js +464 -202
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +2 -0
- package/dist/instructions.js +6 -0
- package/dist/instructions.js.map +1 -1
- package/dist/launchd-service-domain.d.ts +5 -0
- package/dist/launchd-service-domain.js +21 -0
- package/dist/launchd-service-domain.js.map +1 -0
- package/dist/linux-launchers.d.ts +88 -0
- package/dist/linux-launchers.js +296 -0
- package/dist/linux-launchers.js.map +1 -0
- package/dist/local-pane-endpoint.d.ts +46 -0
- package/dist/local-pane-endpoint.js +189 -0
- package/dist/local-pane-endpoint.js.map +1 -0
- package/dist/local-pane-launcher.d.ts +2 -0
- package/dist/local-pane-launcher.js +38 -0
- package/dist/local-pane-launcher.js.map +1 -0
- package/dist/local-pane-stage.ps1 +101 -0
- package/dist/locale.js +406 -14
- 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 +31 -4
- package/dist/login-controller.js +88 -6
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.d.ts +12 -8
- package/dist/login-flows.js +34 -16
- package/dist/login-flows.js.map +1 -1
- package/dist/login-manager.d.ts +2 -2
- package/dist/login-manager.js +3 -2
- package/dist/login-manager.js.map +1 -1
- package/dist/login-window-lock.d.ts +20 -7
- package/dist/login-window-lock.js +35 -16
- package/dist/login-window-lock.js.map +1 -1
- package/dist/ls-rows.d.ts +1 -1
- package/dist/ls-rows.js +3 -4
- package/dist/ls-rows.js.map +1 -1
- package/dist/machine-accounts.d.ts +110 -0
- package/dist/machine-accounts.js +229 -0
- package/dist/machine-accounts.js.map +1 -0
- package/dist/machine-signins.d.ts +89 -0
- package/dist/machine-signins.js +182 -0
- package/dist/machine-signins.js.map +1 -0
- package/dist/model-catalog-defaults.d.ts +14 -0
- package/dist/model-catalog-defaults.js +20 -0
- package/dist/model-catalog-defaults.js.map +1 -0
- package/dist/native-agent-admission.d.ts +7 -0
- package/dist/native-agent-admission.js +26 -0
- package/dist/native-agent-admission.js.map +1 -0
- package/dist/native-daemon-client.d.ts +13 -0
- package/dist/native-daemon-client.js +28 -0
- package/dist/native-daemon-client.js.map +1 -0
- package/dist/native-instance-api.d.ts +13 -0
- package/dist/native-instance-api.js +217 -0
- package/dist/native-instance-api.js.map +1 -0
- package/dist/native-instance-input.d.ts +87 -0
- package/dist/native-instance-input.js +59 -0
- package/dist/native-instance-input.js.map +1 -0
- package/dist/native-instance-registry.d.ts +38 -0
- package/dist/native-instance-registry.js +129 -0
- package/dist/native-instance-registry.js.map +1 -0
- package/dist/native-mcp.d.ts +43 -0
- package/dist/native-mcp.js +291 -0
- package/dist/native-mcp.js.map +1 -0
- package/dist/native-model-catalog.d.ts +25 -0
- package/dist/native-model-catalog.js +181 -0
- package/dist/native-model-catalog.js.map +1 -0
- package/dist/native-pane-crash-budget.d.ts +20 -0
- package/dist/native-pane-crash-budget.js +60 -0
- package/dist/native-pane-crash-budget.js.map +1 -0
- package/dist/native-pane-create.d.ts +26 -0
- package/dist/native-pane-create.js +53 -0
- package/dist/native-pane-create.js.map +1 -0
- package/dist/native-pane-lifecycle.d.ts +73 -0
- package/dist/native-pane-lifecycle.js +239 -0
- package/dist/native-pane-lifecycle.js.map +1 -0
- package/dist/native-pane-manager.d.ts +59 -0
- package/dist/native-pane-manager.js +592 -0
- package/dist/native-pane-manager.js.map +1 -0
- package/dist/native-pane-output-log.d.ts +15 -0
- package/dist/native-pane-output-log.js +108 -0
- package/dist/native-pane-output-log.js.map +1 -0
- package/dist/native-pane-reconciliation.d.ts +4 -0
- package/dist/native-pane-reconciliation.js +40 -0
- package/dist/native-pane-reconciliation.js.map +1 -0
- package/dist/native-pane-recovery.d.ts +12 -0
- package/dist/native-pane-recovery.js +10 -0
- package/dist/native-pane-recovery.js.map +1 -0
- package/dist/native-pane-tools.d.ts +2 -0
- package/dist/native-pane-tools.js +14 -0
- package/dist/native-pane-tools.js.map +1 -0
- package/dist/needs-you-hub.d.ts +8 -0
- package/dist/needs-you-hub.js +31 -5
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +80 -3
- package/dist/needs-you.js +46 -3
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +3 -3
- package/dist/office-share-page.js.map +1 -1
- package/dist/office-share.d.ts +28 -2
- package/dist/office-share.js +32 -3
- package/dist/office-share.js.map +1 -1
- package/dist/office-talk.d.ts +26 -0
- package/dist/office-talk.js +50 -0
- package/dist/office-talk.js.map +1 -0
- package/dist/outbound-handlers.d.ts +44 -2
- package/dist/outbound-handlers.js +169 -5
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +79 -1
- package/dist/outbound-schemas.js +37 -14
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +118 -0
- package/dist/pane-port.js +2 -0
- package/dist/pane-port.js.map +1 -0
- package/dist/pane-quota-history.d.ts +2 -0
- package/dist/pane-quota-history.js +20 -0
- package/dist/pane-quota-history.js.map +1 -1
- package/dist/pause-marker.d.ts +1 -1
- package/dist/pause-marker.js +1 -1
- package/dist/pause-marker.js.map +1 -1
- package/dist/profile-signins.d.ts +109 -0
- package/dist/profile-signins.js +249 -0
- package/dist/profile-signins.js.map +1 -0
- package/dist/public-web-gateway.js +17 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +16 -0
- package/dist/public-web-link.js +21 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.js +9 -5
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +6 -0
- package/dist/quickstart.js +31 -4
- package/dist/quickstart.js.map +1 -1
- package/dist/quiet-run.d.ts +31 -0
- package/dist/quiet-run.js +50 -0
- package/dist/quiet-run.js.map +1 -0
- package/dist/runtime-api.d.ts +23 -0
- package/dist/runtime-api.js +413 -0
- package/dist/runtime-api.js.map +1 -0
- package/dist/runtime-assets/@xterm/addon-serialize/LICENSE +21 -0
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.js +2 -0
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.mjs +19 -0
- package/dist/runtime-assets/@xterm/addon-serialize/package.json +29 -0
- package/dist/runtime-assets/@xterm/headless/LICENSE +21 -0
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.js +2 -0
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.mjs +46 -0
- package/dist/runtime-assets/@xterm/headless/package.json +29 -0
- package/dist/runtime-assets/node-pty/CONPTY-LICENSE +21 -0
- package/dist/runtime-assets/node-pty/CONPTY-NOTICE.md +503 -0
- package/dist/runtime-assets/node-pty/LICENSE +69 -0
- package/dist/runtime-assets/node-pty/lib/conpty_console_list_agent.js +16 -0
- package/dist/runtime-assets/node-pty/lib/eventEmitter2.js +47 -0
- package/dist/runtime-assets/node-pty/lib/index.js +52 -0
- package/dist/runtime-assets/node-pty/lib/interfaces.js +7 -0
- package/dist/runtime-assets/node-pty/lib/shared/conout.js +11 -0
- package/dist/runtime-assets/node-pty/lib/terminal.js +190 -0
- package/dist/runtime-assets/node-pty/lib/types.js +7 -0
- package/dist/runtime-assets/node-pty/lib/unixTerminal.js +346 -0
- package/dist/runtime-assets/node-pty/lib/utils.js +39 -0
- package/dist/runtime-assets/node-pty/lib/windowsConoutConnection.js +125 -0
- package/dist/runtime-assets/node-pty/lib/windowsPtyAgent.js +320 -0
- package/dist/runtime-assets/node-pty/lib/windowsTerminal.js +199 -0
- package/dist/runtime-assets/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/dist/runtime-assets/node-pty/package.json +64 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/dist/runtime-autostart.d.ts +61 -0
- package/dist/runtime-autostart.js +161 -0
- package/dist/runtime-autostart.js.map +1 -0
- package/dist/runtime-background.d.ts +200 -0
- package/dist/runtime-background.js +480 -0
- package/dist/runtime-background.js.map +1 -0
- package/dist/runtime-build-info.d.ts +10 -0
- package/dist/runtime-build-info.js +64 -0
- package/dist/runtime-build-info.js.map +1 -0
- package/dist/runtime-bundle.d.ts +22 -0
- package/dist/runtime-bundle.js +158 -0
- package/dist/runtime-bundle.js.map +1 -0
- package/dist/runtime-cli-background.d.ts +92 -0
- package/dist/runtime-cli-background.js +336 -0
- package/dist/runtime-cli-background.js.map +1 -0
- package/dist/runtime-cli-install.d.ts +295 -0
- package/dist/runtime-cli-install.js +869 -0
- package/dist/runtime-cli-install.js.map +1 -0
- package/dist/runtime-cli.d.ts +21 -0
- package/dist/runtime-cli.js +578 -0
- package/dist/runtime-cli.js.map +1 -0
- package/dist/runtime-client-store.d.ts +86 -0
- package/dist/runtime-client-store.js +392 -0
- package/dist/runtime-client-store.js.map +1 -0
- package/dist/runtime-client.d.ts +258 -0
- package/dist/runtime-client.js +1353 -0
- package/dist/runtime-client.js.map +1 -0
- package/dist/runtime-connection.d.ts +22 -0
- package/dist/runtime-connection.js +93 -0
- package/dist/runtime-connection.js.map +1 -0
- package/dist/runtime-coordinator.d.ts +201 -0
- package/dist/runtime-coordinator.js +1514 -0
- package/dist/runtime-coordinator.js.map +1 -0
- package/dist/runtime-credential-profiles.d.ts +89 -0
- package/dist/runtime-credential-profiles.js +304 -0
- package/dist/runtime-credential-profiles.js.map +1 -0
- package/dist/runtime-enroll-notice.d.ts +4 -0
- package/dist/runtime-enroll-notice.js +21 -0
- package/dist/runtime-enroll-notice.js.map +1 -0
- package/dist/runtime-enrollment.d.ts +21 -0
- package/dist/runtime-enrollment.js +52 -0
- package/dist/runtime-enrollment.js.map +1 -0
- package/dist/runtime-general-protocol.d.ts +22 -0
- package/dist/runtime-general-protocol.js +57 -0
- package/dist/runtime-general-protocol.js.map +1 -0
- package/dist/runtime-general-workspace.d.ts +17 -0
- package/dist/runtime-general-workspace.js +213 -0
- package/dist/runtime-general-workspace.js.map +1 -0
- package/dist/runtime-install.d.ts +50 -0
- package/dist/runtime-install.js +189 -0
- package/dist/runtime-install.js.map +1 -0
- package/dist/runtime-pane-assets.d.ts +17 -0
- package/dist/runtime-pane-assets.js +23 -0
- package/dist/runtime-pane-assets.js.map +1 -0
- package/dist/runtime-pane-boot.d.ts +9 -0
- package/dist/runtime-pane-boot.js +47 -0
- package/dist/runtime-pane-boot.js.map +1 -0
- package/dist/runtime-pane-codex-index.d.ts +10 -0
- package/dist/runtime-pane-codex-index.js +151 -0
- package/dist/runtime-pane-codex-index.js.map +1 -0
- package/dist/runtime-pane-config.d.ts +16 -0
- package/dist/runtime-pane-config.js +54 -0
- package/dist/runtime-pane-config.js.map +1 -0
- package/dist/runtime-pane-host.d.ts +63 -0
- package/dist/runtime-pane-host.js +467 -0
- package/dist/runtime-pane-host.js.map +1 -0
- package/dist/runtime-pane-job-owner.d.ts +1 -0
- package/dist/runtime-pane-job-owner.js +29 -0
- package/dist/runtime-pane-job-owner.js.map +1 -0
- package/dist/runtime-pane-job.ps1 +116 -0
- package/dist/runtime-pane-link.d.ts +47 -0
- package/dist/runtime-pane-link.js +338 -0
- package/dist/runtime-pane-link.js.map +1 -0
- package/dist/runtime-pane-mcp-protocol.d.ts +32 -0
- package/dist/runtime-pane-mcp-protocol.js +39 -0
- package/dist/runtime-pane-mcp-protocol.js.map +1 -0
- package/dist/runtime-pane-mcp-relay.d.ts +18 -0
- package/dist/runtime-pane-mcp-relay.js +80 -0
- package/dist/runtime-pane-mcp-relay.js.map +1 -0
- package/dist/runtime-pane-mcp.d.ts +55 -0
- package/dist/runtime-pane-mcp.js +153 -0
- package/dist/runtime-pane-mcp.js.map +1 -0
- package/dist/runtime-pane-native.d.ts +75 -0
- package/dist/runtime-pane-native.js +114 -0
- package/dist/runtime-pane-native.js.map +1 -0
- package/dist/runtime-pane-output.d.ts +19 -0
- package/dist/runtime-pane-output.js +53 -0
- package/dist/runtime-pane-output.js.map +1 -0
- package/dist/runtime-pane-port.d.ts +144 -0
- package/dist/runtime-pane-port.js +574 -0
- package/dist/runtime-pane-port.js.map +1 -0
- package/dist/runtime-pane-private.d.ts +16 -0
- package/dist/runtime-pane-private.js +76 -0
- package/dist/runtime-pane-private.js.map +1 -0
- package/dist/runtime-pane-private.ps1 +81 -0
- package/dist/runtime-pane-process.d.ts +4 -0
- package/dist/runtime-pane-process.js +117 -0
- package/dist/runtime-pane-process.js.map +1 -0
- package/dist/runtime-pane-protocol.d.ts +182 -0
- package/dist/runtime-pane-protocol.js +217 -0
- package/dist/runtime-pane-protocol.js.map +1 -0
- package/dist/runtime-pane-quota-history.d.ts +6 -0
- package/dist/runtime-pane-quota-history.js +44 -0
- package/dist/runtime-pane-quota-history.js.map +1 -0
- package/dist/runtime-pane-screen.d.ts +19 -0
- package/dist/runtime-pane-screen.js +76 -0
- package/dist/runtime-pane-screen.js.map +1 -0
- package/dist/runtime-pane-service.d.ts +16 -0
- package/dist/runtime-pane-service.js +256 -0
- package/dist/runtime-pane-service.js.map +1 -0
- package/dist/runtime-pane-stdio-protocol.d.ts +54 -0
- package/dist/runtime-pane-stdio-protocol.js +94 -0
- package/dist/runtime-pane-stdio-protocol.js.map +1 -0
- package/dist/runtime-pane-stdio.d.ts +3 -0
- package/dist/runtime-pane-stdio.js +123 -0
- package/dist/runtime-pane-stdio.js.map +1 -0
- package/dist/runtime-pane-store.d.ts +43 -0
- package/dist/runtime-pane-store.js +176 -0
- package/dist/runtime-pane-store.js.map +1 -0
- package/dist/runtime-pane-transcript-protocol.d.ts +43 -0
- package/dist/runtime-pane-transcript-protocol.js +58 -0
- package/dist/runtime-pane-transcript-protocol.js.map +1 -0
- package/dist/runtime-pane-transcript.d.ts +50 -0
- package/dist/runtime-pane-transcript.js +666 -0
- package/dist/runtime-pane-transcript.js.map +1 -0
- package/dist/runtime-pane-worker.d.ts +1 -0
- package/dist/runtime-pane-worker.js +167 -0
- package/dist/runtime-pane-worker.js.map +1 -0
- package/dist/runtime-profile-ownership.d.ts +66 -0
- package/dist/runtime-profile-ownership.js +391 -0
- package/dist/runtime-profile-ownership.js.map +1 -0
- package/dist/runtime-protocol.d.ts +340 -0
- package/dist/runtime-protocol.js +179 -0
- package/dist/runtime-protocol.js.map +1 -0
- package/dist/runtime-remote-accounts.d.ts +209 -0
- package/dist/runtime-remote-accounts.js +714 -0
- package/dist/runtime-remote-accounts.js.map +1 -0
- package/dist/runtime-remote-setup.d.ts +108 -0
- package/dist/runtime-remote-setup.js +532 -0
- package/dist/runtime-remote-setup.js.map +1 -0
- package/dist/runtime-signin-transport.d.ts +39 -0
- package/dist/runtime-signin-transport.js +111 -0
- package/dist/runtime-signin-transport.js.map +1 -0
- package/dist/runtime-signin.d.ts +132 -0
- package/dist/runtime-signin.js +290 -0
- package/dist/runtime-signin.js.map +1 -0
- package/dist/runtime-switches.d.ts +79 -0
- package/dist/runtime-switches.js +90 -0
- package/dist/runtime-switches.js.map +1 -0
- package/dist/runtime-transcript-delta-reader.d.ts +23 -0
- package/dist/runtime-transcript-delta-reader.js +74 -0
- package/dist/runtime-transcript-delta-reader.js.map +1 -0
- package/dist/runtime-transcript-source.d.ts +36 -0
- package/dist/runtime-transcript-source.js +189 -0
- package/dist/runtime-transcript-source.js.map +1 -0
- package/dist/runtime-update-activity.d.ts +21 -0
- package/dist/runtime-update-activity.js +51 -0
- package/dist/runtime-update-activity.js.map +1 -0
- package/dist/runtime-update-artifact.d.ts +31 -0
- package/dist/runtime-update-artifact.js +252 -0
- package/dist/runtime-update-artifact.js.map +1 -0
- package/dist/runtime-update-attention.d.ts +4 -0
- package/dist/runtime-update-attention.js +11 -0
- package/dist/runtime-update-attention.js.map +1 -0
- package/dist/runtime-update-controller.d.ts +86 -0
- package/dist/runtime-update-controller.js +743 -0
- package/dist/runtime-update-controller.js.map +1 -0
- package/dist/runtime-update-install.d.ts +31 -0
- package/dist/runtime-update-install.js +205 -0
- package/dist/runtime-update-install.js.map +1 -0
- package/dist/runtime-update-ipc.d.ts +42 -0
- package/dist/runtime-update-ipc.js +144 -0
- package/dist/runtime-update-ipc.js.map +1 -0
- package/dist/runtime-update-journal.d.ts +49 -0
- package/dist/runtime-update-journal.js +128 -0
- package/dist/runtime-update-journal.js.map +1 -0
- package/dist/runtime-update-lock.d.ts +48 -0
- package/dist/runtime-update-lock.js +232 -0
- package/dist/runtime-update-lock.js.map +1 -0
- package/dist/runtime-update-owners.d.ts +29 -0
- package/dist/runtime-update-owners.js +240 -0
- package/dist/runtime-update-owners.js.map +1 -0
- package/dist/runtime-update-protocol.d.ts +15 -0
- package/dist/runtime-update-protocol.js +13 -0
- package/dist/runtime-update-protocol.js.map +1 -0
- package/dist/runtime-update-status.d.ts +30 -0
- package/dist/runtime-update-status.js +31 -0
- package/dist/runtime-update-status.js.map +1 -0
- package/dist/runtime-windows-bridge.d.ts +42 -0
- package/dist/runtime-windows-bridge.js +167 -0
- package/dist/runtime-windows-bridge.js.map +1 -0
- package/dist/scheduler/db.d.ts +3 -0
- package/dist/scheduler/db.js +4 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.js +1 -1
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +4 -0
- package/dist/scheduler/task-board.js +9 -3
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/task-liveness.d.ts +34 -0
- package/dist/scheduler/task-liveness.js +49 -0
- package/dist/scheduler/task-liveness.js.map +1 -0
- package/dist/selection-card.d.ts +4 -3
- package/dist/selection-card.js +2 -1
- package/dist/selection-card.js.map +1 -1
- package/dist/service-drain.d.ts +19 -0
- package/dist/service-drain.js +64 -0
- package/dist/service-drain.js.map +1 -0
- package/dist/service-installer.d.ts +7 -2
- package/dist/service-installer.js +24 -12
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +71 -2
- package/dist/settings-api.js +1048 -16
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +7 -0
- package/dist/settings-baseline.js +3 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.d.ts +7 -3
- package/dist/settings-change.js +166 -31
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +67 -7
- package/dist/settings-confirmation.js +68 -15
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +26 -0
- package/dist/settings-effect.js +331 -5
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +37 -0
- package/dist/settings-http-confirmation.js +162 -15
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-request-capability.d.ts +14 -0
- package/dist/settings-request-capability.js +12 -1
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/settings-route-lifetime.d.ts +14 -0
- package/dist/settings-route-lifetime.js +48 -0
- package/dist/settings-route-lifetime.js.map +1 -0
- package/dist/settings-summary.d.ts +24 -0
- package/dist/settings-summary.js +42 -0
- package/dist/settings-summary.js.map +1 -0
- package/dist/settings-transaction.d.ts +4 -0
- package/dist/settings-transaction.js +9 -0
- package/dist/settings-transaction.js.map +1 -1
- package/dist/setup-form.js +6 -3
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.js +1 -1
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-i18n.js +3 -0
- package/dist/setup-i18n.js.map +1 -1
- package/dist/setup-wizard.js +4 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/signin-keepalive.d.ts +206 -0
- package/dist/signin-keepalive.js +681 -0
- package/dist/signin-keepalive.js.map +1 -0
- package/dist/structured-signin-transport.d.ts +20 -2
- package/dist/structured-signin-transport.js +57 -2
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +11 -2
- package/dist/structured-signin.js +5 -7
- package/dist/structured-signin.js.map +1 -1
- package/dist/task-board-tool.d.ts +2 -1
- package/dist/task-board-tool.js +76 -7
- package/dist/task-board-tool.js.map +1 -1
- package/dist/tmux-binary.d.ts +59 -0
- package/dist/tmux-binary.js +189 -0
- package/dist/tmux-binary.js.map +1 -0
- package/dist/tmux-control.d.ts +2 -1
- package/dist/tmux-control.js +4 -4
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-exec-helper.js +32 -1
- package/dist/tmux-exec-helper.js.map +1 -1
- package/dist/tmux-legacy.d.ts +94 -0
- package/dist/tmux-legacy.js +309 -0
- package/dist/tmux-legacy.js.map +1 -0
- package/dist/tmux-manager.d.ts +11 -4
- package/dist/tmux-manager.js +61 -40
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-pane-host.d.ts +26 -0
- package/dist/tmux-pane-host.js +25 -0
- package/dist/tmux-pane-host.js.map +1 -0
- package/dist/tmux-read.js +4 -3
- package/dist/tmux-read.js.map +1 -1
- package/dist/tmux-rollback.d.ts +42 -0
- package/dist/tmux-rollback.js +78 -0
- package/dist/tmux-rollback.js.map +1 -0
- package/dist/tmux-server.d.ts +102 -0
- package/dist/tmux-server.js +248 -0
- package/dist/tmux-server.js.map +1 -0
- package/dist/tool-permissions.js +2 -1
- package/dist/tool-permissions.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/topic-commands.js +9 -5
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.d.ts +10 -2
- package/dist/transcript-delta-reader.js +38 -9
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/transcript-monitor.d.ts +3 -0
- package/dist/transcript-monitor.js +68 -54
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-needles.d.ts +42 -0
- package/dist/transcript-needles.js +166 -0
- package/dist/transcript-needles.js.map +1 -0
- package/dist/transcript-records.d.ts +22 -0
- package/dist/transcript-records.js +144 -0
- package/dist/transcript-records.js.map +1 -0
- package/dist/transcript-sources.d.ts +5 -0
- package/dist/transcript-sources.js +11 -79
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +52 -0
- package/dist/ui/account-identity.js +29 -0
- package/dist/ui/accounts-keepalive.js +111 -0
- package/dist/ui/accounts-manage.js +256 -0
- package/dist/ui/accounts-view.js +491 -0
- package/dist/ui/agent-details-settings.js +326 -0
- package/dist/ui/agent-export-dialog.js +170 -0
- package/dist/ui/agent-export-strings.js +81 -0
- package/dist/ui/agent-instructions-field.js +69 -0
- package/dist/ui/agent-page-strings.js +148 -0
- package/dist/ui/agent-proposals.js +90 -0
- package/dist/ui/agent-runtime-settings.js +70 -0
- package/dist/ui/agent-runtime.js +124 -0
- package/dist/ui/backend-signin.js +153 -48
- package/dist/ui/chat-activity-groups.js +225 -0
- package/dist/ui/chat-activity.js +355 -0
- package/dist/ui/chat-ambient.js +1 -1
- package/dist/ui/chat-md-strings.js +3 -9
- 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 +22 -17
- package/dist/ui/chat-render.js +3 -682
- package/dist/ui/chat-store.js +84 -11
- package/dist/ui/chat-strings.js +3 -285
- package/dist/ui/chat-thread.js +3 -969
- package/dist/ui/chat-time.js +3 -80
- package/dist/ui/chat-tour.js +2 -2
- package/dist/ui/chat-workspace-gestures.js +177 -0
- package/dist/ui/chat-workspace-navigation.js +149 -0
- package/dist/ui/chat-workspace.js +319 -0
- package/dist/ui/cli-caps.js +15 -0
- package/dist/ui/cli-picker.js +42 -0
- package/dist/ui/credential-profile-select.js +54 -0
- package/dist/ui/effort-field-strings.js +18 -0
- package/dist/ui/fleet-office-dialogue.d.ts +30 -0
- package/dist/ui/fleet-office-dialogue.js +382 -0
- package/dist/ui/fleet-office-levels.js +17 -1
- package/dist/ui/fleet-office-pack.d.ts +19 -1
- package/dist/ui/fleet-office-pack.js +177 -24
- package/dist/ui/fleet-office-skin.js +23 -5
- package/dist/ui/fleet-office-store.js +13 -3
- package/dist/ui/fleet-office-zones.js +124 -9
- package/dist/ui/fleet-office.js +203 -19
- package/dist/ui/fleet-task-card.js +8 -4
- package/dist/ui/fleet-task-common.js +2 -2
- package/dist/ui/fleet-task-menu.js +188 -0
- package/dist/ui/fleet-task-stats.js +124 -0
- package/dist/ui/fleet-task-view.js +340 -0
- package/dist/ui/fleet-tasks.js +125 -39
- package/dist/ui/general-location.js +85 -0
- package/dist/ui/host-install.js +290 -0
- package/dist/ui/html-attachment.js +3 -40
- package/dist/ui/hub-agent-copy.js +23 -0
- package/dist/ui/hub-attachments.js +90 -0
- package/dist/ui/hub-button-actions.js +65 -0
- package/dist/ui/hub-chat-store.js +168 -0
- package/dist/ui/hub-chat-strings.js +79 -0
- package/dist/ui/hub-client.js +470 -0
- package/dist/ui/hub-company-join-strings.js +79 -0
- package/dist/ui/hub-company-join.js +178 -0
- package/dist/ui/hub-confirm-place.js +44 -0
- package/dist/ui/hub-directory-editor-strings.js +56 -0
- package/dist/ui/hub-directory-editor.js +163 -0
- package/dist/ui/hub-directory-notice-strings.js +28 -0
- package/dist/ui/hub-directory-notices.js +66 -0
- package/dist/ui/hub-enrolment-code-strings.js +44 -0
- package/dist/ui/hub-enrolment-code.js +159 -0
- package/dist/ui/hub-grant-strings.js +13 -0
- package/dist/ui/hub-group-policy.js +183 -0
- package/dist/ui/hub-group-search.js +82 -0
- package/dist/ui/hub-group-strings.js +110 -0
- package/dist/ui/hub-host-security-notices.js +28 -0
- 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 +131 -0
- package/dist/ui/hub-join-queue.js +62 -0
- package/dist/ui/hub-join-steps.js +231 -0
- package/dist/ui/hub-joincode-flow-strings.js +22 -0
- package/dist/ui/hub-owner-strings.js +56 -0
- package/dist/ui/hub-pairing-progress-strings.js +15 -0
- package/dist/ui/hub-preview.js +101 -0
- package/dist/ui/hub-provider-guidance.js +31 -0
- package/dist/ui/hub-quick-pairing.js +213 -0
- package/dist/ui/hub-quick-strings.js +43 -0
- package/dist/ui/hub-quota.js +85 -0
- package/dist/ui/hub-read-strings.js +7 -0
- package/dist/ui/hub-share-refused.js +17 -0
- package/dist/ui/hub-strings.js +168 -0
- package/dist/ui/hub-switcher.js +27 -0
- package/dist/ui/hub-this-hub.js +113 -0
- package/dist/ui/hub-welcome.js +123 -0
- package/dist/ui/image-annotate.js +283 -0
- package/dist/ui/image-lightbox.js +36 -8
- package/dist/ui/log-row.js +327 -0
- package/dist/ui/machine-signin.js +56 -0
- package/dist/ui/model-picker.js +18 -14
- package/dist/ui/native-instance-settings.js +81 -0
- package/dist/ui/native-pane-recovery.js +45 -0
- package/dist/ui/office-share-page.js +4 -2
- package/dist/ui/panel-chat.js +391 -123
- package/dist/ui/panel-details.js +55 -18
- package/dist/ui/panel-fleet.js +113 -20
- package/dist/ui/panel-hub.js +1003 -0
- package/dist/ui/panel-log.js +16 -158
- package/dist/ui/panel-needs.js +175 -9
- package/dist/ui/panel-runtimes.js +645 -0
- package/dist/ui/panel-settings.js +366 -217
- package/dist/ui/panel-windows-agent.js +87 -0
- package/dist/ui/panel-windows-cli.js +189 -0
- package/dist/ui/preview-pages.js +3 -41
- package/dist/ui/preview-panel-actions.js +3 -161
- package/dist/ui/preview-panel.js +11 -550
- package/dist/ui/preview-versions.js +3 -155
- package/dist/ui/preview.js +3 -476
- package/dist/ui/provider-marks.js +83 -0
- package/dist/ui/runtime-catalog.js +55 -0
- package/dist/ui/runtime-cli-install.js +214 -0
- package/dist/ui/runtime-commands.d.ts +6 -0
- package/dist/ui/runtime-commands.js +92 -0
- package/dist/ui/runtime-update-commands.d.ts +2 -0
- package/dist/ui/runtime-update-commands.js +11 -0
- package/dist/ui/runtime-update-status.js +53 -0
- package/dist/ui/search-dialog.js +4 -0
- package/dist/ui/settings-access-overview.js +188 -0
- package/dist/ui/settings-access-strings.js +42 -0
- package/dist/ui/settings-agent-filters.js +94 -0
- package/dist/ui/settings-appearance.js +122 -23
- package/dist/ui/settings-apply.js +12 -5
- package/dist/ui/settings-build-version.js +35 -0
- package/dist/ui/settings-catalog.js +68 -16
- package/dist/ui/settings-confirm.js +112 -14
- package/dist/ui/settings-devices.js +283 -0
- package/dist/ui/settings-dialogs.js +360 -140
- package/dist/ui/settings-guests.js +25 -11
- package/dist/ui/settings-hub-browser-certificate.js +76 -0
- package/dist/ui/settings-hub-company-join.js +281 -0
- package/dist/ui/settings-hub-connection.js +175 -0
- package/dist/ui/settings-hub-directory.js +29 -0
- package/dist/ui/settings-hub-membership.js +93 -0
- package/dist/ui/settings-hub-preview.js +74 -0
- package/dist/ui/settings-hub-retention.js +54 -0
- package/dist/ui/settings-hub-run.js +61 -0
- package/dist/ui/settings-hub-section.js +67 -0
- package/dist/ui/settings-hub-setup-strings.js +70 -0
- package/dist/ui/settings-hub-setup.js +233 -0
- package/dist/ui/settings-hub.js +301 -0
- package/dist/ui/settings-layout.js +248 -0
- package/dist/ui/settings-level-titles.js +73 -0
- package/dist/ui/settings-model.js +26 -2
- package/dist/ui/settings-named-test.js +2 -2
- package/dist/ui/settings-outside.js +310 -0
- package/dist/ui/settings-public-session-strings.js +37 -0
- package/dist/ui/settings-quota-notice.js +3 -3
- package/dist/ui/settings-registry.js +30 -5
- package/dist/ui/settings-restart-strings.js +17 -0
- package/dist/ui/settings-revoke-strings.js +28 -0
- package/dist/ui/settings-shared-strings.js +161 -0
- package/dist/ui/settings-shared.js +354 -0
- package/dist/ui/settings-shortcuts.js +65 -0
- package/dist/ui/settings-strings.js +129 -48
- package/dist/ui/settings-web-authority.js +27 -14
- package/dist/ui/shared/access-overview.css +48 -0
- package/dist/ui/shared/accounts-keepalive.css +12 -0
- package/dist/ui/shared/accounts.css +88 -0
- package/dist/ui/shared/agend-auth.js +8 -1
- package/dist/ui/shared/app-ctx.js +22 -1
- package/dist/ui/shared/app-i18n.js +17 -16
- package/dist/ui/shared/app-nav.js +34 -11
- package/dist/ui/shared/app-route.js +12 -3
- package/dist/ui/shared/app-session.js +17 -12
- package/dist/ui/shared/app-shell.js +462 -57
- package/dist/ui/shared/app-store.js +3 -0
- package/dist/ui/shared/app-stream.js +3 -1
- package/dist/ui/shared/app.css +1780 -39
- package/dist/ui/shared/app.js +35 -3
- package/dist/ui/shared/chat-composer.js +74 -0
- package/dist/ui/shared/chat-md-strings.js +9 -0
- package/dist/ui/shared/chat-render.js +703 -0
- package/dist/ui/shared/chat-strings.js +333 -0
- package/dist/ui/shared/chat-thread.js +986 -0
- package/dist/ui/shared/chat-time.js +80 -0
- package/dist/ui/shared/chat-work-bar.css +12 -0
- package/dist/ui/shared/chat-workspace-memory.js +14 -0
- package/dist/ui/shared/chat-workspace-model.js +106 -0
- package/dist/ui/shared/device-roles.js +27 -0
- package/dist/ui/shared/header-tools.js +9 -9
- package/dist/ui/shared/host-install.css +10 -0
- package/dist/ui/shared/html-attachment.js +42 -0
- package/dist/ui/shared/hub-chat.css +98 -0
- package/dist/ui/shared/hub-groups.css +28 -0
- package/dist/ui/shared/hub-owner.css +65 -0
- package/dist/ui/shared/hub-quota.css +8 -0
- package/dist/ui/shared/hub-signin.css +24 -0
- package/dist/ui/shared/hub.css +78 -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 +94 -21
- package/dist/ui/shared/instance-switch.js +12 -4
- package/dist/ui/shared/machine-name.js +13 -0
- package/dist/ui/shared/model-picker.css +13 -1
- package/dist/ui/shared/page-head.js +8 -0
- package/dist/ui/shared/pane-geometry.js +29 -0
- package/dist/ui/shared/panel-view.js +39 -26
- package/dist/ui/shared/preview-pages.js +41 -0
- package/dist/ui/shared/preview-panel-actions.js +168 -0
- package/dist/ui/shared/preview-panel.js +576 -0
- package/dist/ui/shared/preview-versions.js +155 -0
- package/dist/ui/shared/preview.js +476 -0
- package/dist/ui/shared/qrcode.module.js +2237 -0
- package/dist/ui/shared/runtime-install.css +55 -0
- package/dist/ui/shared/settings-width.js +31 -0
- package/dist/ui/shared/side-rail.js +15 -0
- package/dist/ui/shared/signin.js +392 -34
- package/dist/ui/shared/task-board.css +95 -0
- package/dist/ui/shared/tokens.css +15 -0
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +54 -13
- package/dist/ui/shared/usage-dialog.js +3 -72
- package/dist/ui/shared/usage-meter.js +84 -0
- package/dist/ui/shared/vendor/qrcode-generator.LICENSE +27 -0
- package/dist/ui/shared/vendor/vendor.json +19 -2
- package/dist/ui/shared/view-roster-store.js +8 -0
- package/dist/ui/shared/view-strings.js +14 -4
- package/dist/ui/shared/web-authorize.js +53 -3
- package/dist/ui/shared/workspace-follow.css +19 -0
- package/dist/ui/shared/workspace.css +20 -0
- package/dist/ui/signin.html +41 -8
- package/dist/ui/structured-signin.js +74 -17
- package/dist/ui/windows-agents-nav.js +2 -0
- package/dist/ui/windows-cli-catalog.js +108 -0
- package/dist/ui/workspace-follow-strings.js +28 -0
- package/dist/ui/workspace-panel.js +378 -0
- package/dist/ui/workspace-strings.js +35 -0
- package/dist/unattended-install.js +2 -1
- package/dist/unattended-install.js.map +1 -1
- package/dist/update-dispatch.d.ts +62 -0
- package/dist/update-dispatch.js +69 -2
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-install.d.ts +7 -0
- package/dist/update-install.js +23 -0
- package/dist/update-install.js.map +1 -1
- package/dist/update-marker.d.ts +2 -0
- package/dist/update-marker.js.map +1 -1
- package/dist/usage/providers.d.ts +2 -0
- package/dist/usage/providers.js +20 -19
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +1 -1
- package/dist/usage/usage-api.js +3 -10
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/view-api.js +5 -7
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +168 -4
- package/dist/web-api.js +1611 -268
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +50 -6
- package/dist/web-backend-login.js +32 -21
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-history.d.ts +30 -2
- package/dist/web-chat-history.js +81 -4
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +10 -1
- package/dist/web-commands.js +1 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-device-login.d.ts +153 -0
- package/dist/web-device-login.js +278 -0
- package/dist/web-device-login.js.map +1 -0
- package/dist/web-guest-access.js +2 -2
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-host-install.d.ts +127 -0
- package/dist/web-host-install.js +165 -0
- package/dist/web-host-install.js.map +1 -0
- package/dist/web-login.d.ts +35 -1
- package/dist/web-login.js +51 -5
- package/dist/web-login.js.map +1 -1
- package/dist/web-model-groups.d.ts +40 -0
- package/dist/web-model-groups.js +70 -0
- package/dist/web-model-groups.js.map +1 -0
- package/dist/web-notices.d.ts +9 -0
- package/dist/web-notices.js +19 -0
- package/dist/web-notices.js.map +1 -1
- package/dist/web-office-skins.d.ts +9 -0
- package/dist/web-office-skins.js +16 -1
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.d.ts +35 -2
- package/dist/web-office-store.js +64 -15
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-only-fleet.d.ts +20 -0
- package/dist/web-only-fleet.js +21 -0
- package/dist/web-only-fleet.js.map +1 -1
- package/dist/web-remote-access.d.ts +341 -0
- package/dist/web-remote-access.js +801 -0
- package/dist/web-remote-access.js.map +1 -0
- package/dist/web-session.d.ts +94 -3
- package/dist/web-session.js +75 -5
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +10 -2
- package/dist/web-settings-patch.js +25 -10
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +10 -1
- package/dist/web-shell-routes.js +14 -2
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-signin-device.d.ts +16 -0
- package/dist/web-signin-device.js +81 -0
- package/dist/web-signin-device.js.map +1 -0
- package/dist/web-signin-link.d.ts +42 -0
- package/dist/web-signin-link.js +110 -0
- package/dist/web-signin-link.js.map +1 -0
- package/dist/web-terminal.d.ts +11 -30
- package/dist/web-terminal.js +23 -8
- package/dist/web-terminal.js.map +1 -1
- package/dist/web-update.d.ts +1 -0
- package/dist/web-update.js +4 -2
- package/dist/web-update.js.map +1 -1
- package/dist/windows-agents.d.ts +127 -0
- package/dist/windows-agents.js +491 -0
- package/dist/windows-agents.js.map +1 -0
- package/dist/windows-cli-api.d.ts +48 -0
- package/dist/windows-cli-api.js +207 -0
- package/dist/windows-cli-api.js.map +1 -0
- package/dist/windows-cli-providers.d.ts +109 -0
- package/dist/windows-cli-providers.js +396 -0
- package/dist/windows-cli-providers.js.map +1 -0
- package/dist/windows-cli-worker.d.ts +99 -0
- package/dist/windows-cli-worker.js +729 -0
- package/dist/windows-cli-worker.js.map +1 -0
- package/dist/windows-cli.d.ts +130 -0
- package/dist/windows-cli.js +424 -0
- package/dist/windows-cli.js.map +1 -0
- package/dist/windows-native-mcp.d.ts +19 -0
- package/dist/windows-native-mcp.js +143 -0
- package/dist/windows-native-mcp.js.map +1 -0
- package/dist/windows-pane-mcp.d.ts +26 -0
- package/dist/windows-pane-mcp.js +187 -0
- package/dist/windows-pane-mcp.js.map +1 -0
- package/dist/windows-shortcuts.d.ts +29 -5
- package/dist/windows-shortcuts.js +52 -9
- package/dist/windows-shortcuts.js.map +1 -1
- package/dist/workspace-file-policy.d.ts +2 -0
- package/dist/workspace-file-policy.js +31 -0
- package/dist/workspace-file-policy.js.map +1 -0
- package/dist/workspace-follow-parse.d.ts +36 -0
- package/dist/workspace-follow-parse.js +208 -0
- package/dist/workspace-follow-parse.js.map +1 -0
- package/dist/workspace-follow-records.d.ts +17 -0
- package/dist/workspace-follow-records.js +88 -0
- package/dist/workspace-follow-records.js.map +1 -0
- package/dist/workspace-follow.d.ts +41 -0
- package/dist/workspace-follow.js +144 -0
- package/dist/workspace-follow.js.map +1 -0
- package/dist/wsl-detect.d.ts +1 -0
- package/dist/wsl-detect.js +20 -0
- package/dist/wsl-detect.js.map +1 -0
- package/dist/yaml-shared-nodes.js +8 -3
- package/dist/yaml-shared-nodes.js.map +1 -1
- package/launcher/agend-install.cjs +15 -2
- package/launcher/launchd-session-type.cjs +14 -0
- package/launcher/postinstall.cjs +27 -2
- package/launcher/tmux-bundle.cjs +263 -0
- package/package.json +16 -5
- package/templates/icons/agend-restart.ico +0 -0
- package/templates/icons/agend.ico +0 -0
- package/templates/launchd.plist.ejs +3 -1
- package/templates/runtime-assets/conpty-LICENSE +21 -0
- package/templates/runtime-assets/conpty-NOTICE.md +503 -0
- package/templates/runtime-assets/local-pane-stage.ps1 +101 -0
- package/templates/runtime-assets/runtime-pane-job.ps1 +116 -0
- package/templates/runtime-assets/runtime-pane-private.ps1 +81 -0
- package/templates/runtime-assets/xterm-LICENSE +21 -0
- package/templates/runtime-install/install.ps1 +618 -0
- package/templates/windows-shortcuts.ps1 +45 -12
|
@@ -0,0 +1,1003 @@
|
|
|
1
|
+
import * as ownerEntryWords from "./hub-owner-strings.js";
|
|
2
|
+
import * as companyViews from "./hub-company-join.js";
|
|
3
|
+
import { hj, joinError } from "./hub-company-join-strings.js";
|
|
4
|
+
import { useJoinApproval } from "./hub-join-approval.js";
|
|
5
|
+
import { queueMessage } from "./hub-joincode-flow-strings.js";
|
|
6
|
+
import { joinRequest, companyInfoRequest, CompanyJoinInfoPage, useCompanyJoinContext, CompanyJoinLead, approveCompanyJoin, HubCompanyJoinPage, CompanyJoinAdminCard } from "./hub-company-join.js";
|
|
7
|
+
// AgEnD Hub P1, slice 3: the Hub workspace's pages — the chats (/ui/hub, a room at /ui/hub?room=<id>; #3226 B), My
|
|
8
|
+
// exposures and Administration (/ui/hub/exposures, /ui/hub/admin; reached from the session row's menu) — and its session row. Served only by a Hub's own listener at its own origin, over the Hub's /hub/v1/*
|
|
9
|
+
// API (hub-client.js createHubWebClient); nothing here reads or reaches a fleet. A lazy module: it imports only names
|
|
10
|
+
// every shell has had since #1408, so a tab opened before an upgrade loads it as fresh as the rest.
|
|
11
|
+
//
|
|
12
|
+
// What people see is what the server says now: every list is read fresh, every change is checked again by the server
|
|
13
|
+
// (who, the revision shown, the directory), and a conflict reloads the list instead of guessing.
|
|
14
|
+
import { html, useEffect, useLayoutEffect, useMemo, useRef, useState } from "/assets/app-html.js";
|
|
15
|
+
import { DevicePrefs, PanelHeader, closeDrawer, isMacLike, searchShortcut, setTitle } from "/assets/app-shell.js";
|
|
16
|
+
import { lang, register, t } from "/assets/app-i18n.js";
|
|
17
|
+
import { createStore, useStore } from "/assets/app-store.js";
|
|
18
|
+
import { navigate, navStore } from "/assets/app-nav.js";
|
|
19
|
+
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
20
|
+
import { Icon } from "/assets/ui-icons.js";
|
|
21
|
+
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
22
|
+
import { Dialog } from "/assets/ui-dialog.js";
|
|
23
|
+
import { PairingNotices } from "./hub-quick-pairing.js";
|
|
24
|
+
import { dn } from "./hub-directory-notice-strings.js";
|
|
25
|
+
import { DirectoryNotices, directoryNoticesOffered } from "./hub-directory-notices.js";
|
|
26
|
+
import { Menu } from "/assets/ui-menu.js";
|
|
27
|
+
import { toast } from "/assets/ui-toast.js";
|
|
28
|
+
// #3226 B: the chat is the fleet chat's own drawing (PR A's shared modules), in the fleet chat's words.
|
|
29
|
+
import { createThread, msgKey } from "/assets/chat-thread.js";
|
|
30
|
+
import { PreviewPanel, closePanel, panelStore } from "/assets/preview-panel.js";
|
|
31
|
+
import { ComposerInput, WorkBarView, touchScreen } from "/assets/chat-composer.js";
|
|
32
|
+
import { RailFrame } from "/assets/side-rail.js";
|
|
33
|
+
import "/assets/chat-strings.js";
|
|
34
|
+
import { compareGroups, hubClient } from "./hub-client.js";
|
|
35
|
+
import { hw, linkHubCss } from "./hub-strings.js";
|
|
36
|
+
import { hc, linkHubChatCss } from "./hub-chat-strings.js";
|
|
37
|
+
import { hr } from "./hub-read-strings.js";
|
|
38
|
+
import { ho, linkHubOwnerCss } from "./hub-owner-strings.js";
|
|
39
|
+
import { hg } from "./hub-grant-strings.js";
|
|
40
|
+
import { createHubChatStore } from "./hub-chat-store.js";
|
|
41
|
+
import { QuotaBanner, QuotaCard, QuotaChip, QuotaVisibilityRow } from "./hub-quota.js";
|
|
42
|
+
import { PageHead } from "/assets/page-head.js";
|
|
43
|
+
import { bindRoomFeedback, bootHubPreview, downloadHtml, draftWithLine, panelOpenFor, roomPanelKey, roomPanelOpts, setHubPreviewOptIn } from "./hub-preview.js";
|
|
44
|
+
import { PendingFiles, hf, pageCarriesFiles, roomTakesFiles, uploadChosen } from "./hub-attachments.js";
|
|
45
|
+
register("hubAccess", {
|
|
46
|
+
en: { tag: "Access needs checking", refused: "Asking was refused. Check your access before trying again.", check: "Check access", limited: "Asking was refused; the previous access information needs checking." },
|
|
47
|
+
"zh-TW": { tag: "需要確認權限", refused: "提問遭到拒絕。請先重新檢查權限,再試一次。", check: "重新檢查權限", limited: "提問遭到拒絕,先前的權限資訊需要重新確認。" },
|
|
48
|
+
});
|
|
49
|
+
const ha = key => t(`hubAccess.${key}`);
|
|
50
|
+
// Kept with the fresh renderer: retained owner dictionaries do not know this label.
|
|
51
|
+
register("hubGrantStatus", {
|
|
52
|
+
en: { grantNeverSignedIn: "Hasn't signed in to Hub yet" },
|
|
53
|
+
"zh-TW": { grantNeverSignedIn: "還沒登入過 Hub" },
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// #3298 S-89 (experimental): the group permissions editor and the signed-in welcome are their own LAZY modules, loaded only
|
|
57
|
+
// when the Hub's session says "group-policy-v1" and this tab's client has the calls — a Hub without them never serves or loads them.
|
|
58
|
+
// The one group-permissions sentence this module draws itself (shown when the lazy modules are NOT loaded: this Hub lacks them).
|
|
59
|
+
// Hub UX U2 (spec 1.2): the fleet list's own words (an older cached owner dictionary has none of them).
|
|
60
|
+
register("hubFleetList", { en: { revoked: "Revoked ({0})" }, "zh-TW": { revoked: "已撤銷({0})" } });
|
|
61
|
+
register("hubGroupsNote", {
|
|
62
|
+
en: { unavailable: "Group permissions aren't available on this Hub yet. Update the Hub, then try again." },
|
|
63
|
+
"zh-TW": { unavailable: "這個 Hub 還沒有群組權限。請更新 Hub 後再試。" },
|
|
64
|
+
});
|
|
65
|
+
const groupPolicyOn = (session, client) => !!session && Array.isArray(session.features) && session.features.includes("group-policy-v1")
|
|
66
|
+
&& !!client && client.groupPolicyV1 === true;
|
|
67
|
+
function LazyGroups({ pick, props }) {
|
|
68
|
+
const [C, setC] = useState(null), [failed, setFailed] = useState(false);
|
|
69
|
+
useEffect(() => { let live = true; Promise.all([import("./hub-welcome.js"), import("./hub-group-policy.js"), import("./hub-group-strings.js")])
|
|
70
|
+
.then(([w, p, g]) => { if (live) setC(() => pick({ ...w, ...p, ...g })); }, () => { if (live) setFailed(true); }); return () => { live = false; }; }, []);
|
|
71
|
+
return failed ? null : C ? html`<${C} ...${props} />` : html`<${Skeleton} variant="rows" lines=${3} />`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const TITLES = { ask: "askTitle", exposures: "exposuresTitle", admin: "adminTitle" };
|
|
75
|
+
/** P1 room polling: at most once per ten seconds, one request at a time, paused while the page is hidden (hub.md §5). */
|
|
76
|
+
export const POLL_MS = 10_000;
|
|
77
|
+
const DAYS = [1, 7, 30, 90];
|
|
78
|
+
|
|
79
|
+
/** #3226 B: the person's open rooms, as the conversation list shows them: { loaded, rooms, error }. */
|
|
80
|
+
const roomsStore = createStore({ loaded: false, rooms: [], error: null });
|
|
81
|
+
let roomsReading = null;
|
|
82
|
+
// The page's one view of the Hub session, shared by the panel and the sidebar's session row.
|
|
83
|
+
let session; // undefined: not read yet; null: signed out; else the session
|
|
84
|
+
const sessionSubs = new Set();
|
|
85
|
+
function setSession(next) {
|
|
86
|
+
const was = session;
|
|
87
|
+
session = next;
|
|
88
|
+
// #3226 B: the conversation list is this person's: cleared when no one is signed in, read again when someone is.
|
|
89
|
+
if (!next) roomsStore.set({ loaded: false, rooms: [], error: null });
|
|
90
|
+
else if (!was || was.login !== next.login) void refreshRooms();
|
|
91
|
+
for (const fn of sessionSubs) { try { fn(next); } catch { /* a subscriber's own failure */ } }
|
|
92
|
+
}
|
|
93
|
+
let reading = null;
|
|
94
|
+
function readSession() {
|
|
95
|
+
const c = hubClient();
|
|
96
|
+
if (typeof c.session !== "function") { setSession(null); return Promise.resolve(null); }
|
|
97
|
+
return reading ??= c.session().then((r) => { setSession(r.ok && r.signedIn ? r : null); return session; }, () => { setSession(null); return null; })
|
|
98
|
+
.finally(() => { reading = null; });
|
|
99
|
+
}
|
|
100
|
+
let watchingEnd = false;
|
|
101
|
+
function useSession() {
|
|
102
|
+
const [s, set] = useState(session);
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
sessionSubs.add(set);
|
|
105
|
+
const c = hubClient();
|
|
106
|
+
if (!watchingEnd && c.onSignedOut) { watchingEnd = true; c.onSignedOut(() => setSession(null)); }
|
|
107
|
+
if (session === undefined) readSession();
|
|
108
|
+
return () => sessionSubs.delete(set);
|
|
109
|
+
}, []);
|
|
110
|
+
return s;
|
|
111
|
+
}
|
|
112
|
+
const when = (ms) => new Date(ms).toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short" });
|
|
113
|
+
// M-2988: words added after a release; a tab holding the older hub-strings dictionary falls back to the older sentence.
|
|
114
|
+
const newer = (key, args, older) => { const s = hw(key, ...args); return s === `hub.${key}` ? older() : s; };
|
|
115
|
+
const errText = (r) => hw(r.code === "conflict" || r.code === "stale" ? "errConflictHub" : r.code === "not-found" ? "errNotFound"
|
|
116
|
+
: r.code === "backpressure" ? "errBusyHub" : r.code === "revoked" || r.code === "denied" ? "errDenied" : r.code === "unreachable" ? "errUnreachableHub" : "errFailed");
|
|
117
|
+
|
|
118
|
+
export function HubPanel({ route }) {
|
|
119
|
+
const tab = TITLES[route && route.tab] ? route.tab : "ask";
|
|
120
|
+
const companyPage = tab === "ask" && (companyInfoRequest() || !!joinRequest());
|
|
121
|
+
const s = useSession();
|
|
122
|
+
useStore(navStore); // ?view= changes without a new route
|
|
123
|
+
const view = viewParam();
|
|
124
|
+
// The owner stylesheet holds the page column (.hub-owner, 860 px) every page with a column uses — Notices too (Argon #12).
|
|
125
|
+
useEffect(() => { linkHubCss(); linkHubOwnerCss(); if (tab === "ask") linkHubChatCss(); }, [tab]);
|
|
126
|
+
// Join takes precedence over other query views. Rooms and Group permissions otherwise name their own pages.
|
|
127
|
+
const pageName = companyPage ? hj("title") : tab === "exposures" ? hc("mine") : tab === "admin" ? hc("admin") : view === "notices" ? hc("noticesTitle") : hc("chats");
|
|
128
|
+
useEffect(() => { if (companyPage || !(tab === "ask" && roomParam()) && !(tab === "admin" && view === "groups")) setTitle(pageName); }, [tab, view, pageName, roomParam(), companyPage]);
|
|
129
|
+
let body = tab === "ask" ? roomParam() ? html`<${HubRoomLoading} />`
|
|
130
|
+
: html`<${PanelHeader} title=${hc("chats")} /><div class="hub-home"><${Skeleton} variant="rows" lines=${4} /></div>`
|
|
131
|
+
: html`<${Skeleton} variant="rows" lines=${4} />`;
|
|
132
|
+
// Signed out: the sign-in page alone (no panel header, no chat chrome).
|
|
133
|
+
if (companyInfoRequest()) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-info"><${PanelHeader} title=${hj("title")} /><div data-trust="panel-content" class="panel-body hub-page-body"><${CompanyJoinInfoPage} /></div></div>`;
|
|
134
|
+
if (s === null) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-signin"><${HubSignIn} /></div>`;
|
|
135
|
+
if (s) body = tab === "ask" ? html`<${HubChats} />` : tab === "exposures" ? html`<${HubMine} />` : html`<${HubAdmin} admin=${!!s.admin} />`;
|
|
136
|
+
if (s && tab === "ask" && joinRequest()) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-join">
|
|
137
|
+
<${PanelHeader} title=${hj("title")} /><div data-trust="panel-content" class="panel-body hub-page-body"><${HubCompanyJoinPage} session=${s} /></div></div>`;
|
|
138
|
+
// Security notices stay on their own page. The bound join branch above never renders the chat or notices page.
|
|
139
|
+
if (s && tab === "ask" && view === "notices" && noticesOffered(s)) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-notices">
|
|
140
|
+
<${PanelHeader} title=${hc("noticesTitle")} /><div data-trust="panel-content" class="panel-body hub-page-body">
|
|
141
|
+
<div class="col hub-owner hub-notices-col"><p class="s-page-lead hub-page-lead">${directoryNoticesOffered(s, hubClient()) ? dn("pageLead") : hc("noticesLead")}</p>
|
|
142
|
+
${pairingNoticesOffered(s) ? html`<${PairingNotices} admin=${!!s.admin} empty=${directoryNoticesOffered(s, hubClient()) ? null : html`<${Empty} icon="bell" title=${hc("noNotices")} />`} />` : null}
|
|
143
|
+
${directoryNoticesOffered(s, hubClient()) ? html`<${DirectoryNotices} client=${hubClient()} />` : null}</div></div></div>`;
|
|
144
|
+
// The chats draw their own header (the room's); the other pages keep the panel's.
|
|
145
|
+
if (s !== null && tab === "ask") return html`<div data-effect-panel="hub" class="panel p-hub p-hub-ask"><div data-trust="panel-content" class="panel-body hub-chat-body">${body}</div></div>`;
|
|
146
|
+
// #3226 C: My shared agents and Administration are Settings-like pages. The panel's header names the page once, its scope
|
|
147
|
+
// beside it ("Yours" / "This Hub"); the page itself opens with its lead — no second title repeating the first (Argon #7).
|
|
148
|
+
const scope = s && tab === "exposures" && !agentParam() ? ho("scopeYou") : s && tab === "admin" && s.admin && view !== "groups" ? ho("scopeHub") : null;
|
|
149
|
+
return html`<div data-effect-panel="hub" class=${`panel p-hub p-hub-${tab}`}>
|
|
150
|
+
<${PanelHeader} title=${pageName} sub=${scope ? html`<span class="s-scope">${scope}</span>` : null} />
|
|
151
|
+
<div data-trust="panel-content" class=${`panel-body ${s ? "hub-page-body" : "hub-body"}`}>${body}</div>
|
|
152
|
+
</div>`;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** The sidebar's session row: who is signed in to this Hub, and Sign out. */
|
|
156
|
+
export function HubSessionMenu() {
|
|
157
|
+
const s = useSession();
|
|
158
|
+
const [busy, setBusy] = useState(false);
|
|
159
|
+
if (s === undefined) return html`<div class="session hub-session"><${Skeleton} variant="inline" lines=${1} /></div>`;
|
|
160
|
+
if (!s) return html`<div class="session hub-session"><span class="side-row"><span class="dot" aria-hidden="true"></span><span class="grow">${hw("signedOutHub")}</span></span></div>`;
|
|
161
|
+
const out = async () => { setBusy(true); await hubClient().signOut(); setBusy(false); setSession(null); };
|
|
162
|
+
// #3226 B: My shared agents and Administration are secondary — in this menu, not the main surface.
|
|
163
|
+
const items = [
|
|
164
|
+
{ key: "mine", label: hc("mine"), icon: "globe", onSelect: () => navigate("/ui/hub/exposures") },
|
|
165
|
+
{ key: "admin", label: hc("admin"), icon: "key", onSelect: () => navigate("/ui/hub/admin") },
|
|
166
|
+
{ key: "out", label: hw("signOut"), icon: "user", onSelect: out, disabled: busy },
|
|
167
|
+
];
|
|
168
|
+
return html`<div class="session hub-session">
|
|
169
|
+
<span class="side-row"><span class="dot ok" aria-hidden="true"></span><span class="grow">${s.displayName}</span></span>
|
|
170
|
+
<${Menu} items=${items} label=${hc("menu")} icon="settings" cls="hub-menu" />
|
|
171
|
+
</div>`;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* alpha.6 feedback: the signed-out Hub is a sign-in page, in AgEnD's own sign-in style (signin.html: one centred card
|
|
176
|
+
* on the page's background, the brand, the fields, a primary button) — none of the chat app around it: while it is on
|
|
177
|
+
* screen the shell's sidebar and tabs are hidden (not just covered, so focus and screen readers skip them too).
|
|
178
|
+
* Its stylesheet is its own (/assets/hub-signin.css): a tab holding an older hub.css still draws it.
|
|
179
|
+
*/
|
|
180
|
+
function linkHubSigninCss(doc = typeof document !== "undefined" ? document : null) {
|
|
181
|
+
try {
|
|
182
|
+
if (!doc || !doc.head || doc.querySelector('link[data-hub-signin-css="1"]')) return;
|
|
183
|
+
const link = doc.createElement("link");
|
|
184
|
+
link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/hub-signin.css"); link.setAttribute("data-hub-signin-css", "1");
|
|
185
|
+
doc.head.appendChild(link);
|
|
186
|
+
} catch { /* the page still works without it */ }
|
|
187
|
+
}
|
|
188
|
+
function HubSignIn() {
|
|
189
|
+
const company = useCompanyJoinContext();
|
|
190
|
+
const generation = useRef(0);
|
|
191
|
+
const approval = useJoinApproval({ requestId: company.requestId, deadline: company.view?.outerDeadline, approve: approveCompanyJoin, current: () => joinRequest() === company.requestId });
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
linkHubSigninCss();
|
|
194
|
+
// #3318 review F1: signed out from the phone drawer's session menu (or a session that ended while it was open), the
|
|
195
|
+
// drawer would stay open with <main> inert under it — and this page, inside <main>, would take no input while the
|
|
196
|
+
// sidebar and scrim that used to close it are hidden or covered. The sign-in page closes it.
|
|
197
|
+
closeDrawer();
|
|
198
|
+
const body = typeof document !== "undefined" ? document.body : null;
|
|
199
|
+
if (body) body.classList.add("hub-signed-out");
|
|
200
|
+
return () => { if (body) body.classList.remove("hub-signed-out"); };
|
|
201
|
+
}, []);
|
|
202
|
+
const name = typeof document !== "undefined" ? (document.body.dataset.hubName || "") : "";
|
|
203
|
+
const [form, setForm] = useState({ login: "", password: "" });
|
|
204
|
+
const [busy, setBusy] = useState(false);
|
|
205
|
+
const [msg, setMsg] = useState(null);
|
|
206
|
+
useEffect(() => { setBusy(false); setMsg(null); return () => { generation.current++; }; }, [company.requestId]);
|
|
207
|
+
const submit = async (e) => {
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
if (busy) return;
|
|
210
|
+
// The button is always ready (a disabled one reads as grey, "broken"): an empty field just takes the focus.
|
|
211
|
+
if (!form.login.trim() || !form.password) {
|
|
212
|
+
const doc = typeof document !== "undefined" ? document : null;
|
|
213
|
+
doc?.getElementById(!form.login.trim() ? "hubLogin" : "hubPassword")?.focus();
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const mine = ++generation.current, requestId = company.requestId;
|
|
217
|
+
setBusy(true); setMsg(null);
|
|
218
|
+
const r = await hubClient().signIn(form.login.trim(), form.password);
|
|
219
|
+
if (mine !== generation.current || joinRequest() !== requestId) return;
|
|
220
|
+
if (r.ok) {
|
|
221
|
+
setForm({ login: "", password: "" });
|
|
222
|
+
if (company.requestId) {
|
|
223
|
+
const joined = await approval.run(r.csrf);
|
|
224
|
+
if (mine !== generation.current || joined.code === "retired") return;
|
|
225
|
+
if (!joined.ok) { setBusy(false); setSession({ ...r, companyJoinFailure: { requestId: company.requestId, code: joined.code, reason: joined.reason } }); return; }
|
|
226
|
+
}
|
|
227
|
+
setBusy(false); setSession(r); return;
|
|
228
|
+
}
|
|
229
|
+
setBusy(false);
|
|
230
|
+
setForm((f) => ({ ...f, password: "" }));
|
|
231
|
+
setMsg(r.code === "backpressure" ? hw("errBusyHub") : r.code === "unavailable" ? hw("errDirectory") : hw("errSignIn"));
|
|
232
|
+
};
|
|
233
|
+
return html`<main class="hub-signin-page"><section class="hub-signin hub-signin-card" aria-labelledby="hubSignInTitle">
|
|
234
|
+
<div class="hub-signin-brand"><strong>${t("hubShell.brand")}</strong>${name ? html`<span>${name}</span>` : null}</div>
|
|
235
|
+
<h1 id="hubSignInTitle">${hw("signInTitle")}</h1>
|
|
236
|
+
${company.requestId ? html`<${CompanyJoinLead} context=${company.view?.ok ? company.view : null} />` : html`<p class="hub-signin-lead">${hw("signInLead")}</p>`}
|
|
237
|
+
${company.requestId && company.view === undefined ? html`<${Skeleton} variant="form" lines=${2} label=${hj("loading")} />` : company.requestId && company.view && !company.view.ok ? html`<${ErrorState} message=${joinError(company.view.code)} onRetry=${company.retry} />` : null}
|
|
238
|
+
${!company.requestId || company.view?.ok && company.view.state === "pending" ? html`<form class="hub-signin-form" onSubmit=${submit}>
|
|
239
|
+
<label for="hubLogin">${hw("login")}</label>
|
|
240
|
+
<input id="hubLogin" autocomplete="username" spellcheck=${false} autocapitalize="none"
|
|
241
|
+
value=${form.login} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, login: v })); }} />
|
|
242
|
+
<label for="hubPassword">${hw("password")}</label>
|
|
243
|
+
<input id="hubPassword" type="password" autocomplete="current-password"
|
|
244
|
+
value=${form.password} onInput=${(e) => { const v = e.target.value; setForm((f) => ({ ...f, password: v })); }} />
|
|
245
|
+
<button type="submit" class="hub-signin-go" disabled=${busy || company.requestId && !company.view?.ok}>${company.requestId ? hj("signInConnect") : hw("signIn")}</button>
|
|
246
|
+
</form>` : company.view?.ok ? html`<p role="status">${joinError(company.view.reason || company.view.state)}</p>` : null}
|
|
247
|
+
${approval.queued ? html`<p class="note" role="status">${queueMessage(approval.retryAttempt)}</p>` : null}
|
|
248
|
+
<p class="hub-signin-msg" role=${msg ? "alert" : undefined}>${msg || ""}</p>
|
|
249
|
+
${company.requestId && (msg || company.view?.state !== "pending") && company.view?.returnPath ? html`<a class="btn btn-sm" href=${company.view.returnPath} rel="noreferrer">${hj("return")}</a>` : null}
|
|
250
|
+
</section></main>`;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** Load a list from the client; `reload` reads it again. null while loading, { error } on failure. */
|
|
254
|
+
function useRead(read) {
|
|
255
|
+
const [data, setData] = useState(null);
|
|
256
|
+
const live = useRef(true);
|
|
257
|
+
const failed = (error) => { if (live.current) setData((old) => ({ ...old, error })); };
|
|
258
|
+
const reload = () => read().then((r) => { if (live.current) { if (r.ok) setData(r); else failed(errText(r)); } }, () => failed(hw("errFailed")));
|
|
259
|
+
useEffect(() => { live.current = true; reload(); return () => { live.current = false; }; }, []);
|
|
260
|
+
return [data, reload];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// ── Chats (#3226 B): the conversation list, one room's chat, and the right-hand panel ──
|
|
264
|
+
// The list is the shell's sidebar (HubNav, below) on a wide screen and the page itself on a phone; a room is
|
|
265
|
+
// /ui/hub?room=<id>. The thread, the composer row, the WorkBar and the rail frame are the fleet chat's own modules
|
|
266
|
+
// (/assets/chat-thread.js, chat-composer.js, side-rail.js); the room's data is hub-chat-store.js's.
|
|
267
|
+
|
|
268
|
+
/** The person's open rooms, as the list shows them: { loaded, rooms, error }; read on demand and every ROOMS_MS. */
|
|
269
|
+
export const ROOMS_MS = 30_000;
|
|
270
|
+
export function refreshRooms() {
|
|
271
|
+
return roomsReading ??= hubClient().rooms().then((r) => {
|
|
272
|
+
// With group permissions on, a person whose groups don't include chatting is refused the list: that is their access, shown
|
|
273
|
+
// by the welcome, not a failure (Cairn #3372) — the list stays empty and quiet. Every chat action still asks the server.
|
|
274
|
+
if (!r.ok && (r.code === "denied" || r.code === "revoked") && groupPolicyOn(session, hubClient())) roomsStore.set({ loaded: true, rooms: [], error: null, denied: true });
|
|
275
|
+
else roomsStore.set(r.ok ? { loaded: true, rooms: r.rooms || [], error: null } : { ...roomsStore.get(), loaded: true, error: errText(r) });
|
|
276
|
+
}, () => roomsStore.set({ ...roomsStore.get(), loaded: true, error: hw("errFailed") })).finally(() => { roomsReading = null; });
|
|
277
|
+
}
|
|
278
|
+
/** Keeps the list fresh while something shows it (every ROOMS_MS, paused while the page is hidden). */
|
|
279
|
+
function useRooms() {
|
|
280
|
+
const rs = useStore(roomsStore);
|
|
281
|
+
useEffect(() => {
|
|
282
|
+
if (!roomsStore.get().loaded && session) refreshRooms();
|
|
283
|
+
const tick = setInterval(() => { if (session && (typeof document === "undefined" || !document.hidden)) refreshRooms(); }, ROOMS_MS);
|
|
284
|
+
return () => clearInterval(tick);
|
|
285
|
+
}, []);
|
|
286
|
+
return rs;
|
|
287
|
+
}
|
|
288
|
+
const roomParam = () => { try { const v = new URLSearchParams(location.search).get("room"); return v && /^[a-f0-9-]{36}$/.test(v) ? v : null; } catch { return null; } };
|
|
289
|
+
const roomPath = (id) => `/ui/hub?room=${encodeURIComponent(id)}`;
|
|
290
|
+
/** cid-hub-shell-parity: the Notices page is /ui/hub?view=notices (the path every Hub listener and router already serves). */
|
|
291
|
+
const viewParam = () => { try { return new URLSearchParams(location.search).get("view"); } catch { return null; } };
|
|
292
|
+
export const NOTICES_PATH = "/ui/hub?view=notices";
|
|
293
|
+
const pairingNoticesOffered = (s) => !!s && Array.isArray(s.features) && s.features.includes("quick-pairing-v1") && !!hubClient().quickPairingV1;
|
|
294
|
+
const noticesOffered = s => pairingNoticesOffered(s) || directoryNoticesOffered(s, hubClient());
|
|
295
|
+
const initial = (name) => (String(name || "?").trim()[0] || "?").toUpperCase();
|
|
296
|
+
const AV_TONES = 6;
|
|
297
|
+
const tone = (name) => { let h = 0; for (const c of String(name || "")) h = (h * 31 + c.codePointAt(0)) >>> 0; return h % AV_TONES; };
|
|
298
|
+
function Avatar({ name, size = "" }) { return html`<span class=${`hub-av t${tone(name)} ${size}`} aria-hidden="true">${initial(name)}</span>`; }
|
|
299
|
+
const listTime = (ms) => {
|
|
300
|
+
if (!ms) return "";
|
|
301
|
+
const d = new Date(ms), now = new Date();
|
|
302
|
+
return d.toDateString() === now.toDateString() ? d.toLocaleTimeString(undefined, { hour: "2-digit", minute: "2-digit" }) : d.toLocaleDateString(undefined, { month: "numeric", day: "numeric" });
|
|
303
|
+
};
|
|
304
|
+
const dateOnly = (ms) => new Date(ms).toLocaleDateString(undefined, { year: "numeric", month: "long", day: "numeric" });
|
|
305
|
+
function daysLeft(ms) {
|
|
306
|
+
const d = Math.ceil((ms - Date.now()) / 86_400_000);
|
|
307
|
+
return d <= 0 ? hc("endsToday") : d === 1 ? hc("dayLeft") : hc("daysLeft", d);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** The conversation list: New chat, a filter, and one row per open room (the most recently active first). */
|
|
311
|
+
export function HubNav({ onPick } = {}) {
|
|
312
|
+
const s = useSession();
|
|
313
|
+
const rs = useRooms();
|
|
314
|
+
const [q, setQ] = useState("");
|
|
315
|
+
const [picking, setPicking] = useState(false);
|
|
316
|
+
useEffect(() => { linkHubChatCss(); }, []);
|
|
317
|
+
if (!s) return null;
|
|
318
|
+
const current = roomParam();
|
|
319
|
+
const shown = rs.rooms.filter((r) => !q.trim() || `${r.exposureName} ${r.ownerName}`.toLowerCase().includes(q.trim().toLowerCase()));
|
|
320
|
+
const pick = (e, r) => { if (onPick) onPick(); if (e && (e.metaKey || e.ctrlKey)) return; e && e.preventDefault(); navigate(roomPath(r.id)); };
|
|
321
|
+
return html`<div class="hub-nav">
|
|
322
|
+
<button type="button" class="btn hub-new" onClick=${() => setPicking(true)}><${Icon} name="plus" size=${16} />${hc("newChat")}</button>
|
|
323
|
+
<label class="hub-search"><${Icon} name="search" size=${14} /><input type="search" placeholder=${hc("search")} aria-label=${hc("search")} value=${q}
|
|
324
|
+
onInput=${(e) => setQ(e.target.value)} /></label>
|
|
325
|
+
<div class="hub-sec">${hc("chats")}</div>
|
|
326
|
+
${rs.error ? html`<${ErrorState} message=${rs.error} onRetry=${refreshRooms} />` : null}
|
|
327
|
+
${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : null}
|
|
328
|
+
${rs.loaded && !rs.error && !rs.denied && !rs.rooms.length ? html`<p class="note hub-list-empty">${hc("noChats")}</p>` : null}
|
|
329
|
+
${rs.rooms.length && !shown.length ? html`<p class="note hub-list-empty">${hc("noMatch")}</p>` : null}
|
|
330
|
+
<ul class="hub-rooms" role="list">${shown.map((r) => html`<li key=${r.id}>
|
|
331
|
+
<a class=${`hub-room-row${current === r.id ? " active" : ""}${r.state === "closed" ? " closed" : ""}`} href=${roomPath(r.id)} aria-current=${current === r.id ? "page" : undefined} onClick=${(e) => pick(e, r)}>
|
|
332
|
+
<${Avatar} name=${r.exposureName} />
|
|
333
|
+
<span class="hub-room-text"><span class="t">${r.exposureName}</span><span class="s">${r.state === "closed" ? hc("tagClosed") : r.waiting ? hc("waiting") : r.ownerName ? hc("represents", r.ownerName) : ""}</span></span>
|
|
334
|
+
<span class="hub-room-side"><span class="time">${listTime(r.lastAt)}</span>${r.waiting ? html`<span class="pulse" title=${hc("waiting")}></span>` : null}</span>
|
|
335
|
+
</a></li>`)}</ul>
|
|
336
|
+
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}
|
|
337
|
+
</div>`;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* cid-hub-shell-parity (the user: 「agend 排得很好看, agend hub 醜到不行」; approved mockup): the Hub's sidebar is the fleet
|
|
342
|
+
* dashboard's own — style guide rule 1, its shell components, not Hub-only ones. Icon rows (`side-row`): Conversations, My
|
|
343
|
+
* shared agents, Administration (the administrator only), Notices (only where the Hub offers its security notices), Search
|
|
344
|
+
* (Ctrl K: the conversation filter) and New conversation (`side-new`); then the conversation list under a `side-label`
|
|
345
|
+
* section, with a one-line empty state. The app shell mounts it (HubSidebar); an older shell keeps HubNav.
|
|
346
|
+
* Notices has no count: the Hub exposes the retained notices, not which of them this person has read.
|
|
347
|
+
*/
|
|
348
|
+
export function HubSide({ onPick } = {}) {
|
|
349
|
+
const s = useSession();
|
|
350
|
+
const rs = useRooms();
|
|
351
|
+
const { route } = useStore(navStore);
|
|
352
|
+
const [q, setQ] = useState("");
|
|
353
|
+
const [filtering, setFiltering] = useState(false);
|
|
354
|
+
const [picking, setPicking] = useState(false);
|
|
355
|
+
const filter = useRef(null);
|
|
356
|
+
useEffect(() => { linkHubChatCss(); }, []);
|
|
357
|
+
const openFilter = () => { setFiltering(true); setTimeout(() => filter.current?.focus(), 0); };
|
|
358
|
+
// Ctrl K (⌘K): the conversation filter — the dashboard's search shortcut, on the Hub's own search (no fleet search here).
|
|
359
|
+
useEffect(() => {
|
|
360
|
+
const onKey = (e) => {
|
|
361
|
+
if (e.isComposing || e.altKey || e.shiftKey || !(isMacLike() ? e.metaKey : e.ctrlKey) || (e.key || "").toLowerCase() !== "k") return;
|
|
362
|
+
if (typeof document !== "undefined" && document.querySelector("dialog[open]:not(.side-panel)")) return;
|
|
363
|
+
e.preventDefault(); openFilter();
|
|
364
|
+
};
|
|
365
|
+
document.addEventListener("keydown", onKey);
|
|
366
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
367
|
+
}, []);
|
|
368
|
+
if (!s) return null;
|
|
369
|
+
const tab = route && route.panel === "hub" ? route.tab : "ask";
|
|
370
|
+
const view = viewParam();
|
|
371
|
+
const here = (key) => key === "notices" ? tab === "ask" && view === "notices" : key === "ask" ? tab === "ask" && view !== "notices" : tab === key;
|
|
372
|
+
const go = (e, href) => { if (onPick) onPick(); if (e && (e.metaKey || e.ctrlKey)) return; e && e.preventDefault(); navigate(href); };
|
|
373
|
+
const row = (key, href, icon, label) => html`<a class=${`side-row${here(key) ? " active" : ""}`} href=${href} aria-current=${here(key) ? "page" : undefined}
|
|
374
|
+
onClick=${(e) => go(e, href)}><${Icon} name=${icon} /><span class="grow">${label}</span></a>`;
|
|
375
|
+
// On the chats' own home (no room open, no filter) the page already says "No chats yet": the list doesn't say it twice (Argon #19).
|
|
376
|
+
const home = tab === "ask" && view !== "notices" && !roomParam();
|
|
377
|
+
return html`<nav data-trust="navigation" class="side-nav" aria-label=${t("app.menu")}>
|
|
378
|
+
${row("ask", "/ui/hub", "chat", hc("chats"))}
|
|
379
|
+
${row("exposures", "/ui/hub/exposures", "globe", hc("mine"))}
|
|
380
|
+
${s.admin ? row("admin", "/ui/hub/admin", "key", hc("admin")) : null}
|
|
381
|
+
${noticesOffered(s) ? row("notices", NOTICES_PATH, "bell", hc("notices")) : null}
|
|
382
|
+
<button type="button" class="side-row side-search" onClick=${openFilter} title=${`${hc("search")} (${searchShortcut()})`}
|
|
383
|
+
aria-keyshortcuts=${isMacLike() ? "Meta+K" : "Control+K"}><${Icon} name="search" /><span class="grow">${hc("navSearch")}</span><kbd class="kbd-hint" aria-hidden="true">${searchShortcut()}</kbd></button>
|
|
384
|
+
<button type="button" class="side-row side-new" onClick=${() => setPicking(true)}><${Icon} name="plus" /><span class="grow">${hc("newChat")}</span></button>
|
|
385
|
+
</nav>
|
|
386
|
+
<${HubRoomList} rs=${rs} q=${q} setQ=${setQ} filtering=${filtering} setFiltering=${setFiltering} filterRef=${filter} onPick=${onPick} quietEmpty=${home} />
|
|
387
|
+
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}`;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* The conversation list, as the dashboard draws its roster (`view-roster inst-nav > side-section`, the section's label and
|
|
392
|
+
* count, one-line empty states) — the sidebar's (HubSide) and, on a phone, the chats' home page's (with its own New chat
|
|
393
|
+
* row and the filter always shown): one drawing, not two (Argon #9). `quietEmpty`: the page beside it already says "No chats yet".
|
|
394
|
+
*/
|
|
395
|
+
function HubRoomList({ rs, q, setQ, filtering, setFiltering, filterRef, onPick, quietEmpty = false, onNew = null }) {
|
|
396
|
+
const current = roomParam();
|
|
397
|
+
const go = (e, href) => { if (onPick) onPick(); if (e && (e.metaKey || e.ctrlKey)) return; e && e.preventDefault(); navigate(href); };
|
|
398
|
+
const shown = rs.rooms.filter((r) => !q.trim() || `${r.exposureName} ${r.ownerName}`.toLowerCase().includes(q.trim().toLowerCase()));
|
|
399
|
+
const always = !!onNew; // the home page's list: its filter is always there (when there's a list to filter)
|
|
400
|
+
return html`<div class="view-roster inst-nav hub-side-rooms"><div data-trust="navigation" class="side-section">
|
|
401
|
+
${onNew ? html`<button type="button" class="side-row side-new" onClick=${onNew}><${Icon} name="plus" /><span class="grow">${hc("newChat")}</span></button>` : null}
|
|
402
|
+
<div class="inst-head"><h2 class="side-label">${hc("chats")}</h2>${rs.rooms.length ? html`<span class="count">${rs.rooms.length}</span>` : null}</div>
|
|
403
|
+
${filtering || q || (always && rs.rooms.length) ? html`<label class="hub-side-filter"><${Icon} name="search" size=${14} /><input ref=${filterRef} type="search" placeholder=${hc("search")} aria-label=${hc("search")} value=${q}
|
|
404
|
+
onInput=${(e) => setQ(e.target.value)} onKeyDown=${(e) => { if (e.key === "Escape") { setQ(""); setFiltering(false); } }} /></label>` : null}
|
|
405
|
+
${rs.error ? html`<${ErrorState} message=${rs.error} onRetry=${refreshRooms} />` : null}
|
|
406
|
+
${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : null}
|
|
407
|
+
${rs.loaded && !rs.error && !rs.denied && !rs.rooms.length && !quietEmpty ? html`<p class="side-empty muted">${hc("noChats")}</p>` : null}
|
|
408
|
+
${rs.rooms.length && !shown.length ? html`<p class="side-empty muted">${hc("noMatch")}</p>` : null}
|
|
409
|
+
<ul class="hub-rooms" role="list">${shown.map((r) => html`<li key=${r.id}>
|
|
410
|
+
<a class=${`hub-room-row${current === r.id ? " active" : ""}${r.state === "closed" ? " closed" : ""}`} href=${roomPath(r.id)} aria-current=${current === r.id ? "page" : undefined} onClick=${(e) => go(e, roomPath(r.id))}>
|
|
411
|
+
<${Avatar} name=${r.exposureName} />
|
|
412
|
+
<span class="hub-room-text"><span class="t">${r.exposureName}</span><span class="s">${r.state === "closed" ? hc("tagClosed") : r.waiting ? hc("waiting") : r.ownerName ? hc("represents", r.ownerName) : ""}</span></span>
|
|
413
|
+
<span class="hub-room-side"><span class="time">${listTime(r.lastAt)}</span>${r.waiting ? html`<span class="pulse" title=${hc("waiting")}></span>` : null}</span>
|
|
414
|
+
</a></li>`)}</ul>
|
|
415
|
+
</div></div>`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/** The phone's chats home: the same roster, with New chat at its head and the filter in place. */
|
|
419
|
+
function HubHomeList() {
|
|
420
|
+
const rs = useRooms();
|
|
421
|
+
const [q, setQ] = useState(""), [filtering, setFiltering] = useState(false), [picking, setPicking] = useState(false);
|
|
422
|
+
const filter = useRef(null);
|
|
423
|
+
return html`<${HubRoomList} rs=${rs} q=${q} setQ=${setQ} filtering=${filtering} setFiltering=${setFiltering} filterRef=${filter} onNew=${() => setPicking(true)} />
|
|
424
|
+
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}`;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* cid-hub-shell-parity: the sidebar's foot, as the dashboard's — Settings (this device's theme and language: the shell's own
|
|
429
|
+
* DevicePrefs) and the session row ("Signed in", the person's name beside it), whose menu holds Sign out.
|
|
430
|
+
*/
|
|
431
|
+
export function HubFoot() {
|
|
432
|
+
const s = useSession();
|
|
433
|
+
const [busy, setBusy] = useState(false);
|
|
434
|
+
const prefs = html`<details class="prefs-pop hub-prefs"><summary class="side-row"><${Icon} name="settings" /><span class="grow">${hc("settings")}</span></summary>
|
|
435
|
+
<div data-trust="popover" class="pop" role="group" aria-label=${t("app.devicePrefs")}><${DevicePrefs} labels=${true} fields=${["theme", "language"]} /></div></details>`;
|
|
436
|
+
if (s === undefined) return html`${prefs}<div class="session"><${Skeleton} variant="inline" lines=${1} /></div>`;
|
|
437
|
+
if (!s) return prefs;
|
|
438
|
+
const out = async () => { setBusy(true); await hubClient().signOut(); setBusy(false); setSession(null); };
|
|
439
|
+
// Who is signed in heads the menu — their name and sign-in name (the foot's row says "Signed in", as the dashboard's) — then
|
|
440
|
+
// Sign out. My shared agents and Administration are the sidebar's own rows, not repeated here (Argon #10).
|
|
441
|
+
const items = [
|
|
442
|
+
{ key: "who", label: s.login && s.login !== s.displayName ? `${s.displayName} (${s.login})` : s.displayName, icon: "user", disabled: true },
|
|
443
|
+
{ key: "out", label: hc("signOut"), icon: "back", onSelect: out, disabled: busy },
|
|
444
|
+
];
|
|
445
|
+
return html`${prefs}<div class="session hub-session-row"><${Menu} items=${items} label=${hc("signedIn")} cls="hub-session-menu" triggerClass="side-row"
|
|
446
|
+
trigger=${html`<span class="dot ok" aria-hidden="true"></span><span class="grow">${hc("signedIn")}</span><span class="meta" title=${s.displayName}>${s.displayName}</span>`} /></div>`;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** New chat: the agents someone allowed this person to ask; Ask opens (or reopens) its room. */
|
|
450
|
+
function NewChatDialog({ onClose }) {
|
|
451
|
+
const [cat, reload] = useRead(() => hubClient().catalog());
|
|
452
|
+
const rs = useStore(roomsStore);
|
|
453
|
+
const [q, setQ] = useState("");
|
|
454
|
+
const [msg, setMsg] = useState(null);
|
|
455
|
+
const [busy, setBusy] = useState(false);
|
|
456
|
+
const open = async (it) => {
|
|
457
|
+
if (busy) return;
|
|
458
|
+
setBusy(true); setMsg(null);
|
|
459
|
+
const r = await hubClient().openRoom(it.exposure.id, it.grant.id);
|
|
460
|
+
setBusy(false);
|
|
461
|
+
if (!r.ok) { setMsg(errText(r)); return; }
|
|
462
|
+
onClose(); await refreshRooms(); navigate(roomPath(r.room.id));
|
|
463
|
+
};
|
|
464
|
+
const all = cat && cat.askable ? cat.askable : [];
|
|
465
|
+
const shown = all.filter((it) => !q.trim() || `${it.exposure.displayName} ${it.ownerName}`.toLowerCase().includes(q.trim().toLowerCase()));
|
|
466
|
+
const hasRoom = (it) => rs.rooms.some((r) => r.exposureId === it.exposure.id && r.grantId === it.grant.id);
|
|
467
|
+
return html`<${Dialog} title=${hc("pickTitle")} onClose=${onClose}>
|
|
468
|
+
<div class="hub-pick">
|
|
469
|
+
<label class="field"><span class="sr-only">${hc("pickSearch")}</span><input type="search" placeholder=${hc("pickSearch")} value=${q} onInput=${(e) => setQ(e.target.value)} /></label>
|
|
470
|
+
${!cat ? html`<${Skeleton} variant="rows" lines=${4} />` : cat.error ? html`<${ErrorState} message=${cat.error} onRetry=${reload} />` : null}
|
|
471
|
+
${cat && !cat.error && !all.length ? html`<${Empty} icon="chat" title=${hc("pickEmpty")} hint=${hw("askHint")} />` : null}
|
|
472
|
+
${all.length && !shown.length ? html`<p class="note">${hc("pickNone")}</p>` : null}
|
|
473
|
+
<ul class="hub-pick-list" role="list">${shown.map((it) => html`<li key=${it.grant.id} class="hub-pick-row">
|
|
474
|
+
<${Avatar} name=${it.exposure.displayName} />
|
|
475
|
+
<span class="hub-room-text"><span class="t">${it.exposure.displayName}</span><span class="s">${hc("pickUntil", it.ownerName || "—", dateOnly(it.grant.expiresAt))}</span></span>
|
|
476
|
+
<button type="button" class=${`btn btn-sm${hasRoom(it) ? "" : " btn-primary"}`} disabled=${busy} onClick=${() => open(it)}>${hasRoom(it) ? hc("pickOpen") : hc("pickAsk")}</button>
|
|
477
|
+
</li>`)}</ul>
|
|
478
|
+
<p class="note">${hc("pickHint")}</p>
|
|
479
|
+
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
480
|
+
</div>
|
|
481
|
+
</${Dialog}>`;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** The Ask tab: the chosen room, or (none chosen) the list on a phone and a "pick a chat" note beside it on a wide screen. */
|
|
485
|
+
function HubChats() {
|
|
486
|
+
useStore(navStore); // ?room= changes without a new route
|
|
487
|
+
const rs = useRooms();
|
|
488
|
+
const s = useSession();
|
|
489
|
+
const [picking, setPicking] = useState(false);
|
|
490
|
+
useEffect(() => { linkHubChatCss(); }, []);
|
|
491
|
+
const id = roomParam();
|
|
492
|
+
const room = id ? rs.rooms.find((r) => r.id === id) || (rs.loaded ? { id, exposureName: "", ownerName: "", features: [] } : null) : null;
|
|
493
|
+
if (id && room) return html`<${HubRoomView} key=${id} room=${room} />`;
|
|
494
|
+
if (id) return html`<${HubRoomLoading} error=${rs.error} />`;
|
|
495
|
+
return html`<${PanelHeader} title=${hc("chats")} />
|
|
496
|
+
<div class=${`hub-home${groupPolicyOn(s, hubClient()) ? " has-welcome" : ""}`}>
|
|
497
|
+
<div class="hub-home-list"><${HubHomeList} /></div>
|
|
498
|
+
${groupPolicyOn(s, hubClient()) ? html`<div class="hub-home-pick hub-home-welcome"><${LazyGroups} pick=${(m) => m.HubWelcome} props=${{ name: s.displayName, quick: s.features.includes("quick-pairing-v1"), onChats: () => setPicking(true), admin: s.admin === true, features: s.features }} /></div>`
|
|
499
|
+
: html`<div class="hub-home-pick center">${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : rs.error && !rs.rooms.length ? html`<${ErrorState} message=${rs.error} onRetry=${refreshRooms} />` : !rs.rooms.length
|
|
500
|
+
? html`<${Empty} icon="chat" title=${hc("noChats")} />`
|
|
501
|
+
: html`<${Empty} icon="chat" title=${hc("choose")} hint=${hc("chooseHint")} />`}</div>`}
|
|
502
|
+
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}
|
|
503
|
+
</div>`;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
const RAIL_KEY = "agend_hub_context";
|
|
507
|
+
const railOpen = () => { try { return localStorage.getItem(RAIL_KEY) !== "0"; } catch { return true; } };
|
|
508
|
+
const setRailPref = (open) => { try { localStorage.setItem(RAIL_KEY, open ? "1" : "0"); } catch { /* not remembered */ } };
|
|
509
|
+
const wideQuery = () => (typeof matchMedia === "function" ? matchMedia("(min-width: 1100px)") : null);
|
|
510
|
+
function useWide() {
|
|
511
|
+
const [wide, setWide] = useState(() => !!wideQuery()?.matches);
|
|
512
|
+
useEffect(() => { const q = wideQuery(); if (!q) return undefined; const on = () => setWide(!!q.matches); q.addEventListener?.("change", on); return () => q.removeEventListener?.("change", on); }, []);
|
|
513
|
+
return wide;
|
|
514
|
+
}
|
|
515
|
+
/** The same room frame while its metadata is unknown: reserve the saved context rail and header width. */
|
|
516
|
+
function HubRoomLoading({ error } = {}) {
|
|
517
|
+
const wide = useWide(), [rail, setRail] = useState(railOpen);
|
|
518
|
+
const showRail = wide && rail;
|
|
519
|
+
return html`<div class=${`hub-chat${showRail ? " with-rail" : ""}`}>
|
|
520
|
+
<section class="hub-chat-main"><header class="hub-chat-head"><${Skeleton} variant="inline" lines=${1} /></header>
|
|
521
|
+
<div class="scroller hub-scroller hub-room-loading">${error ? html`<${ErrorState} message=${error} onRetry=${refreshRooms} />` : html`<${Skeleton} variant="rows" lines=${6} />`}</div>
|
|
522
|
+
</section>
|
|
523
|
+
${showRail ? html`<${RailFrame} trust="hub-context" label=${hc("infoLabel")} title=${hc("info")} closeLabel=${hc("hideInfo")}
|
|
524
|
+
onClose=${() => { setRail(false); setRailPref(false); }}><${Skeleton} variant="rows" lines=${4} /></${RailFrame}>` : null}
|
|
525
|
+
</div>`;
|
|
526
|
+
}
|
|
527
|
+
/** The thread's words are the fleet chat's; its delivery marks say the Hub's stages. */
|
|
528
|
+
const threadT = (key, ...a) => (key.startsWith("chat.tick_") ? hc(key.slice(5), ...a) : t(key, ...a));
|
|
529
|
+
const REASONS = { expired: "reason_expired", revoked: "reason_revoked", frozen: "reason_frozen", withdrawn: "reason_withdrawn" };
|
|
530
|
+
const reasonText = (code, stage) => (stage === "uncertain" ? hc("uncertain") : hc("notAnswered", hc(REASONS[code] || "reason_unknown")));
|
|
531
|
+
async function copyText(text) { try { await navigator.clipboard.writeText(text); return true; } catch { return false; } }
|
|
532
|
+
|
|
533
|
+
/** One room: its header, the thread, what blocks asking, the working line and the composer; the panel beside it. */
|
|
534
|
+
function HubRoomView({ room: given }) {
|
|
535
|
+
const s = useSession();
|
|
536
|
+
const wide = useWide();
|
|
537
|
+
const store = useMemo(() => createHubChatStore(given, { me: (s && s.displayName) || "", reason: reasonText }), [given.id]);
|
|
538
|
+
useEffect(() => () => store.stop(), [store]);
|
|
539
|
+
const [, tick] = useState(0);
|
|
540
|
+
useEffect(() => {
|
|
541
|
+
// The list's "waiting" follows this room: read again when a question starts or stops waiting here.
|
|
542
|
+
let was = null;
|
|
543
|
+
const update = () => {
|
|
544
|
+
tick((n) => n + 1);
|
|
545
|
+
const waiting = store.entries().some((e) => ["queued", "delivered", "consumed"].includes(e.receipt && e.receipt.stage));
|
|
546
|
+
if (was !== null && waiting !== was) {
|
|
547
|
+
// The row says so at once; the list is read again behind it.
|
|
548
|
+
roomsStore.set((rs) => ({ ...rs, rooms: rs.rooms.map((r) => (r.id === given.id ? { ...r, waiting } : r)) }));
|
|
549
|
+
void refreshRooms();
|
|
550
|
+
}
|
|
551
|
+
was = waiting;
|
|
552
|
+
};
|
|
553
|
+
const off = store.subscribe(update); update();
|
|
554
|
+
return off;
|
|
555
|
+
}, [store]);
|
|
556
|
+
// The store's room starts as the list's and is the server's latest after each read (its quota included or withdrawn).
|
|
557
|
+
const room = store.room();
|
|
558
|
+
const [rail, setRail] = useState(railOpen);
|
|
559
|
+
const [sheet, setSheet] = useState(false);
|
|
560
|
+
const [draft, setDraft] = useState("");
|
|
561
|
+
const [sending, setSending] = useState(false);
|
|
562
|
+
const [msg, setMsg] = useState(null);
|
|
563
|
+
// #3226 D: files chosen for the next question (uploaded at once; Send names the uploaded ids).
|
|
564
|
+
const [files, setFilesState] = useState([]);
|
|
565
|
+
const filesRef = useRef([]);
|
|
566
|
+
const setFiles = (next) => { filesRef.current = next; setFilesState(next); };
|
|
567
|
+
// Uploads still queued when the room is left are not started.
|
|
568
|
+
const alive = useRef(true);
|
|
569
|
+
useEffect(() => () => { alive.current = false; }, []);
|
|
570
|
+
const input = useRef(null);
|
|
571
|
+
useEffect(() => { setTitle(room.exposureName || hw("askTitle")); }, [room.exposureName]);
|
|
572
|
+
// #3226 E: the side panel for this room's HTML pages (the fleet's panel). Its "Reply about this page" / Point at it
|
|
573
|
+
// lines go into this composer; leaving the room closes it.
|
|
574
|
+
const split = useRef(null), threadRef = useRef(null);
|
|
575
|
+
const panelKey = roomPanelKey(given.id);
|
|
576
|
+
const [panelOpen, setPanelOpen] = useState(() => panelOpenFor(panelKey));
|
|
577
|
+
useEffect(() => { bootHubPreview(); }, []);
|
|
578
|
+
useEffect(() => {
|
|
579
|
+
setPanelOpen(panelOpenFor(panelKey));
|
|
580
|
+
const off = panelStore.subscribe(() => setPanelOpen(panelOpenFor(panelKey)));
|
|
581
|
+
const release = bindRoomFeedback({
|
|
582
|
+
findMsg: (key) => store.messages().find((x) => msgKey(x) === key) || null,
|
|
583
|
+
addLine: (line) => setDraft((d) => draftWithLine(d, line)),
|
|
584
|
+
focus: () => {
|
|
585
|
+
const el = input.current; if (!el) return;
|
|
586
|
+
el.focus();
|
|
587
|
+
setTimeout(() => { try { const n = el.value.length; el.setSelectionRange(n, n); } catch { /* not a text field */ } }, 0);
|
|
588
|
+
},
|
|
589
|
+
});
|
|
590
|
+
return () => { off(); release(); };
|
|
591
|
+
}, [store]);
|
|
592
|
+
const closed = store.closed() || room.state === "closed";
|
|
593
|
+
const denied = store.accessDenied?.() === true;
|
|
594
|
+
useEffect(() => {
|
|
595
|
+
if (!denied) setMsg(current => current === errText({ code: "denied" }) ? null : current);
|
|
596
|
+
}, [denied]);
|
|
597
|
+
const frozen = !closed && room.exposureState === "frozen";
|
|
598
|
+
const working = store.working();
|
|
599
|
+
const name = room.exposureName || "";
|
|
600
|
+
const client = hubClient();
|
|
601
|
+
const pageFiles = pageCarriesFiles(client, store);
|
|
602
|
+
const takesFiles = pageFiles && roomTakesFiles(room) && !closed && !frozen && !denied;
|
|
603
|
+
const uploading = files.some((f) => f.state === "uploading");
|
|
604
|
+
const send = async () => {
|
|
605
|
+
const q = draft.trim();
|
|
606
|
+
if (!q || sending || closed || frozen || denied) return;
|
|
607
|
+
if (uploading) { setMsg(hf("waitUpload")); return; }
|
|
608
|
+
// Chosen files are never dropped quietly: while the room can't take them, the question waits (or they are removed).
|
|
609
|
+
const chosen = filesRef.current.filter((f) => f.state === "ready");
|
|
610
|
+
if (chosen.length && !takesFiles) { setMsg(hf("held")); return; }
|
|
611
|
+
setSending(true); setMsg(null);
|
|
612
|
+
const r = await store.send(q, chosen.length ? { files: chosen.map((f) => f.id) } : {});
|
|
613
|
+
setSending(false);
|
|
614
|
+
if (!r.ok) { setMsg(errText(r)); return; }
|
|
615
|
+
// Only the files this question carried; ones chosen while it was on its way stay for the next.
|
|
616
|
+
const sent = new Set(chosen.map((f) => f.key));
|
|
617
|
+
setDraft(""); setFiles(filesRef.current.filter((f) => !sent.has(f.key))); refreshRooms();
|
|
618
|
+
};
|
|
619
|
+
const attach = takesFiles ? { title: hf("attach"), onFiles: async (list) => {
|
|
620
|
+
setMsg(null);
|
|
621
|
+
const refused = await uploadChosen(client, room.id, list, { current: () => filesRef.current, set: setFiles, alive: () => alive.current });
|
|
622
|
+
if (!alive.current) return;
|
|
623
|
+
if (refused.length) setMsg(refused.join(" "));
|
|
624
|
+
} } : null;
|
|
625
|
+
const onKeyDown = (e) => { if (globalThis.AgendChatRender?.composerKey(e, { touch: touchScreen() }) === "send") { e.preventDefault(); send(); } };
|
|
626
|
+
const toggleInfo = () => {
|
|
627
|
+
if (!wide) { setSheet(true); return; }
|
|
628
|
+
// The panel is where the rail was: the info button puts the rail back (and closes the page).
|
|
629
|
+
if (panelOpen) { closePanel(); setRail(true); setRailPref(true); return; }
|
|
630
|
+
setRail((v) => { setRailPref(!v); return !v; });
|
|
631
|
+
};
|
|
632
|
+
const tag = closed ? html`<span class="tag danger">${hc("tagClosed")}</span>` : frozen ? html`<span class="tag warn">${hc("tagFrozen")}</span>`
|
|
633
|
+
: denied ? html`<span class="tag warn">${ha("tag")}</span>` : html`<${QuotaChip} room=${room} fallback=${html`<span class="tag ok">${hc("tagCanAsk")}</span>`} />`;
|
|
634
|
+
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
|
+
const info = html`<${HubRoomInfo} room=${room} closed=${closed} denied=${denied} />`;
|
|
636
|
+
// The panel takes the info rail's place while it shows a page (the rail's button brings the rail back).
|
|
637
|
+
const showRail = wide && rail && !panelOpen;
|
|
638
|
+
return html`<div class=${`hub-chat${showRail ? " with-rail" : ""}`} ref=${split}>
|
|
639
|
+
<section class="hub-chat-main" aria-label=${name}>
|
|
640
|
+
<header class="hub-chat-head" data-trust="panel-content">${back}<${Avatar} name=${name} size="sm" />
|
|
641
|
+
<span class="hub-chat-title"><strong>${name}</strong><span class="s">${room.ownerName ? hc("answersFor", room.ownerName) : ""}</span></span>
|
|
642
|
+
${tag}
|
|
643
|
+
<button type="button" class="icon-btn" aria-pressed=${wide ? String(showRail) : undefined} aria-label=${hc("showInfo")} title=${hc("showInfo")} onClick=${toggleInfo}><${Icon} name="info" /></button>
|
|
644
|
+
</header>
|
|
645
|
+
<${HubThread} store=${store} name=${name} panelKey=${panelKey} threadRef=${threadRef} />
|
|
646
|
+
<div class="dock hub-dock" data-trust="composer"><div class="dock-col">
|
|
647
|
+
${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}
|
|
649
|
+
${!closed ? html`<${QuotaBanner} room=${room} />` : null}
|
|
650
|
+
${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
|
+
${working ? html`<${HubWorkBar} name=${name} since=${working.since} />` : null}
|
|
652
|
+
${!closed && !frozen && !denied && !takesFiles ? html`<p class="note hub-files-off" role="status">${hf(pageFiles ? "off" : "reload")}</p>` : null}
|
|
653
|
+
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
654
|
+
${closed ? null : html`<div class="composer-box"><${PendingFiles} files=${files} onRemove=${(key) => setFiles(filesRef.current.filter((f) => f.key !== key))}
|
|
655
|
+
formatSize=${(n) => (globalThis.AgendChatRender?.formatSize ? globalThis.AgendChatRender.formatSize(n) : `${n} B`)} />
|
|
656
|
+
<${ComposerInput} inputRef=${input} value=${draft} placeholder=${hc("composer", name)} onValue=${setDraft}
|
|
657
|
+
onKeyDown=${onKeyDown} onPaste=${() => {}} attach=${attach}
|
|
658
|
+
stop=${{ hidden: true, disabled: true, title: hc("stop"), label: hc("stop"), onClick: () => {} }}
|
|
659
|
+
send=${{ hidden: false, disabled: !draft.trim() || sending || frozen || denied || uploading, label: hc("send"), onClick: send }} /></div>`}
|
|
660
|
+
${closed ? null : html`<div class="composer-row"><span class="hint hub-identity">${hw("roomNote")}</span></div>`}
|
|
661
|
+
</div></div>
|
|
662
|
+
</section>
|
|
663
|
+
<${PreviewPanel} name=${panelKey} split=${split} msgs=${() => store.messages()} subscribe=${(fn) => store.subscribe(() => fn(panelKey, "msgs"))}
|
|
664
|
+
keyOf=${msgKey} reveal=${(k) => threadRef.current && threadRef.current.reveal(k)} download=${downloadHtml} allow=${(commit) => setHubPreviewOptIn(true, commit)} />
|
|
665
|
+
${showRail ? html`<${RailFrame} trust="hub-context" label=${hc("infoLabel")} title=${hc("info")} closeLabel=${hc("hideInfo")}
|
|
666
|
+
onClose=${() => { setRail(false); setRailPref(false); }}>${info}</${RailFrame}>` : null}
|
|
667
|
+
${!wide && sheet ? html`<${Dialog} title=${hc("info")} label=${hc("infoLabel")} onClose=${() => setSheet(false)}><div class="hub-rail-sheet">${info}</div></${Dialog}>` : null}
|
|
668
|
+
</div>`;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
function HubWorkBar({ name, since }) {
|
|
672
|
+
const [, tick] = useState(0);
|
|
673
|
+
useEffect(() => { const h = setInterval(() => tick((n) => n + 1), 1000); return () => clearInterval(h); }, []);
|
|
674
|
+
const R = globalThis.AgendChatRender;
|
|
675
|
+
return html`<${WorkBarView} kind="working" label=${hc("working", name)} elapsed=${R && since ? R.formatElapsed(Math.max(0, Date.now() - since)) : ""} elapsedTitle=${hc("elapsed")} />`;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/** The thread: the fleet chat's own (createThread), fed by the room's store. */
|
|
679
|
+
function HubThread({ store, name, panelKey, threadRef }) {
|
|
680
|
+
const scroller = useRef(null), host = useRef(null);
|
|
681
|
+
const [jump, setJump] = useState({ show: false, unseen: 0 });
|
|
682
|
+
const [empty, setEmpty] = useState(false);
|
|
683
|
+
const th = useRef(null);
|
|
684
|
+
const loaded = typeof store.loaded === "function" ? store.loaded() : true;
|
|
685
|
+
useLayoutEffect(() => {
|
|
686
|
+
const doc = host.current.ownerDocument;
|
|
687
|
+
const list = doc.createElement("div");
|
|
688
|
+
list.className = "thread"; list.setAttribute("role", "log"); list.setAttribute("aria-live", "off"); list.setAttribute("aria-label", name);
|
|
689
|
+
const thread = createThread(list, doc.createElement("div"), {
|
|
690
|
+
t: threadT, tf: threadT, isUser: (x) => x.role === "user", onJump: setJump, onEmpty: setEmpty, canReply: () => false,
|
|
691
|
+
// #3226 E: an HTML page opens in the room's side panel, at the Hub's own preview address (hub-preview.js).
|
|
692
|
+
setPreviewOptIn: setHubPreviewOptIn, copyText, download: downloadHtml, toggleWrap: () => {}, notice: (text) => toast(text, false),
|
|
693
|
+
panel: roomPanelOpts(panelKey),
|
|
694
|
+
clickReplyButton: (id, index) => { void store.clickButton(id, index).then((r) => {
|
|
695
|
+
if (!r.ok && r.code !== "busy" && r.code !== "stopped") { toast(errText(r), false); store.refresh(); }
|
|
696
|
+
}); },
|
|
697
|
+
replyButtonBusy: (id) => store.busy(id), pollMine: (id) => store.mine(id), serverNow: () => Date.now(),
|
|
698
|
+
retryOutgoing: () => {}, deleteOutgoing: () => {}, putBackOutgoing: () => {}, startReply: () => {}, findQuoted: () => null,
|
|
699
|
+
emojis: () => false, mentions: () => null,
|
|
700
|
+
});
|
|
701
|
+
th.current = thread;
|
|
702
|
+
if (threadRef) threadRef.current = thread;
|
|
703
|
+
host.current.append(list);
|
|
704
|
+
thread.attach(scroller.current);
|
|
705
|
+
thread.render(store.messages());
|
|
706
|
+
const off = store.subscribe(() => thread.render(store.messages()));
|
|
707
|
+
// A card shows whether this browser allows previews and whether the panel has its page.
|
|
708
|
+
const P = globalThis.AgendPreview;
|
|
709
|
+
const offOpt = P && typeof P.onChange === "function" ? P.onChange(() => thread.refreshCards()) : () => {};
|
|
710
|
+
const offPanel = panelStore.subscribe(() => thread.refreshCards());
|
|
711
|
+
const sc = scroller.current;
|
|
712
|
+
const onScroll = () => thread.onScroll();
|
|
713
|
+
sc.addEventListener("scroll", onScroll, { passive: true });
|
|
714
|
+
list.addEventListener("click", thread.onClick);
|
|
715
|
+
return () => {
|
|
716
|
+
off(); offOpt(); offPanel(); sc.removeEventListener("scroll", onScroll); list.removeEventListener("click", thread.onClick);
|
|
717
|
+
thread.dispose(true); list.remove(); th.current = null; if (threadRef && threadRef.current === thread) threadRef.current = null;
|
|
718
|
+
};
|
|
719
|
+
}, [store]);
|
|
720
|
+
return html`<div class="scroller hub-scroller" ref=${scroller}>
|
|
721
|
+
<div class="thread-host" ref=${host}></div>
|
|
722
|
+
${/* #3145: that every asker shares the agent's one conversation is said before anyone types. */ ""}
|
|
723
|
+
${!loaded && !store.error() && !store.closed() ? html`<${Skeleton} variant="rows" lines=${5} />` : null}
|
|
724
|
+
${store.error() === "backpressure" ? html`<p class="hub-banner warn" role="status">${hr("busy")}</p>`
|
|
725
|
+
: !loaded && store.error() ? html`<${ErrorState} message=${errText({ code: store.error() })} onRetry=${() => store.refresh()} />` : null}
|
|
726
|
+
${empty && loaded && !store.closed() ? html`<div class="center hub-room-empty"><${Empty} icon="chat" title=${hc("emptyRoom", name)} hint=${`${hc("emptyRoomHint", store.room().ownerName || name)}${lang() === "zh-TW" ? "" : " "}${hw("roomShared")}`} /></div>` : null}
|
|
727
|
+
<div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" class="jump-latest" onClick=${() => th.current && th.current.jumpLatest()}>
|
|
728
|
+
<${Icon} name="down" size=${16} />${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}</button>` : null}</div>
|
|
729
|
+
</div>`;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/** The right-hand panel's cards (the usage rail's look): the agent, its quota (G), your access, who sees it, what is not here. */
|
|
733
|
+
function HubRoomInfo({ room, closed = false, denied = false }) {
|
|
734
|
+
const name = room.exposureName || "", owner = room.ownerName || "";
|
|
735
|
+
return html`<section class="u-provider hub-card hub-agent-card"><${Avatar} name=${name} size="lg" /><strong>${name}</strong>
|
|
736
|
+
${owner ? html`<span class="note">${hc("answersFor", owner)}</span>` : null}</section>
|
|
737
|
+
<${QuotaCard} room=${room} />
|
|
738
|
+
${room.grantExpiresAt && !closed ? html`<section class="u-provider hub-card"><div class="u-head"><strong>${hc("yourAccess")}</strong></div>
|
|
739
|
+
<dl class="hub-kv"><dt>${hc("canDo")}</dt><dd>${denied ? ha("limited") : hc("canDoValue")}</dd><dt>${hc("until")}</dt><dd>${dateOnly(room.grantExpiresAt)} <span class="tag">${daysLeft(room.grantExpiresAt)}</span></dd></dl>
|
|
740
|
+
</section>` : null}
|
|
741
|
+
<section class="u-provider hub-card"><div class="u-head"><strong>${hc("whoSees")}</strong></div>
|
|
742
|
+
<ul class="hub-aud" role="list">
|
|
743
|
+
<li><${Icon} name="user" size=${16} /><span><b>${hc("you")}</b><br />${hc("youSee")}</span></li>
|
|
744
|
+
${owner ? html`<li><${Icon} name="eye" size=${16} /><span><b>${owner}</b><br />${hc("ownerSees", owner)}</span></li>` : null}
|
|
745
|
+
<li><${Icon} name="chat" size=${16} /><span><b>${name}</b><br />${hc("agentShares")}</span></li>
|
|
746
|
+
<li><${Icon} name="key" size=${16} /><span><b>${hc("adminTitle")}</b><br />${hc("adminSees")}</span></li>
|
|
747
|
+
</ul></section>
|
|
748
|
+
<section class="u-provider hub-card"><div class="u-head"><strong>${hc("notHere")}</strong></div>
|
|
749
|
+
<p class="note">${hc("notHereText", name, owner || name)}</p></section>
|
|
750
|
+
<p class="note hub-p1">${hc("oneToOne")}</p>`;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
// ── My shared agents and Administration (#3226 C): Settings' page layout (PageHead, .s-section-layout cards, .s-row
|
|
754
|
+
// rows), a destructive step behind a row's menu and a confirmation ──
|
|
755
|
+
const DAYS_LEFT = (ms) => daysLeft(ms);
|
|
756
|
+
const stateTag = (state) => state === "published" ? html`<span class="tag ok">${ho("stateShared")}</span>`
|
|
757
|
+
: state === "frozen" ? html`<span class="tag warn">${ho("statePaused")}</span>` : html`<span class="tag">${ho("stateWithdrawn")}</span>`;
|
|
758
|
+
const mayAsk = (n) => (n === 0 ? ho("mayAskNone") : n === 1 ? ho("mayAskOne") : ho("mayAsk", n));
|
|
759
|
+
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
|
+
|
|
761
|
+
/**
|
|
762
|
+
* The owner's recent questions for one agent. Through the client's own method when it has one; a tab that loaded B's
|
|
763
|
+
* hub-client.js before C has none, so the same GET is made here (same origin, the Hub's cookie; #3261 review).
|
|
764
|
+
*/
|
|
765
|
+
function readActivity(exposureId) {
|
|
766
|
+
const c = hubClient();
|
|
767
|
+
if (typeof c.activity === "function") return c.activity(exposureId);
|
|
768
|
+
return fetch(`/hub/v1/exposures/${encodeURIComponent(exposureId)}/activity`, { credentials: "same-origin", cache: "no-store", headers: { Accept: "application/json" } })
|
|
769
|
+
.then(async (r) => { let j = null; try { j = await r.json(); } catch { /* not JSON */ } return r.ok && j ? { ok: true, ...j } : { ok: false, status: r.status, code: (j && j.code) || "failed" }; },
|
|
770
|
+
() => ({ ok: false, code: "unreachable" }));
|
|
771
|
+
}
|
|
772
|
+
function HubMine() {
|
|
773
|
+
useStore(navStore); // ?agent= changes without a new route
|
|
774
|
+
const [cat, reload] = useRead(() => hubClient().catalog());
|
|
775
|
+
const [pairings, reloadPairings] = useRead(() => hubClient().pairings());
|
|
776
|
+
const [msg, setMsg] = useState(null);
|
|
777
|
+
useEffect(() => { linkHubChatCss(); linkHubOwnerCss(); }, []);
|
|
778
|
+
const act = async (fn, after = reload, refused = (r) => setMsg(errText(r))) => {
|
|
779
|
+
setMsg(null);
|
|
780
|
+
const r = await fn();
|
|
781
|
+
if (!r.ok) refused(r);
|
|
782
|
+
await after();
|
|
783
|
+
return r;
|
|
784
|
+
};
|
|
785
|
+
const confirmPairing = async (p) => {
|
|
786
|
+
if (!(await confirmDialog({ message: hw("confirmPairingAsk", compareGroups(p.fingerprint)), confirmLabel: hw("confirmPairing") }))) return;
|
|
787
|
+
await act(() => hubClient().confirmPairing(p.id, p.fingerprint), reloadPairings);
|
|
788
|
+
};
|
|
789
|
+
const pend = pairings && pairings.pairings ? pairings.pairings : [];
|
|
790
|
+
const mine = cat && cat.mine ? cat.mine : [];
|
|
791
|
+
const id = agentParam(), x = id ? mine.find((e) => e.id === id) : null;
|
|
792
|
+
// Keyed by the agent: another ?agent= is another page (its reads, its dialog), and a late answer for the previous one
|
|
793
|
+
// lands nowhere (useRead's own liveness ends with that page).
|
|
794
|
+
if (x) return html`<${HubAgentPage} key=${x.id} x=${x} act=${act} msg=${msg} />`;
|
|
795
|
+
// Nothing shared yet: the empty state below says where to share from, so the lead doesn't say it too (Argon #20).
|
|
796
|
+
return html`<div class="col hub-owner"><p class="s-page-lead hub-page-lead">${ho(cat && !cat.error && !mine.length ? "mineLeadShort" : "mineLead")}</p>
|
|
797
|
+
<div class="s-section-layout">
|
|
798
|
+
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
799
|
+
${!pairings ? html`<${Skeleton} lines=${2} />` : pairings.error ? html`<${ErrorState} message=${pairings.error} onRetry=${reloadPairings} />` : null}
|
|
800
|
+
${pend.length ? html`<section class="card hub-pairings"><h3>${ho("pendingPairings")}</h3><p class="note">${ho("pendingLead")}</p>
|
|
801
|
+
<div class="hub-rows">${pend.map((p) => html`<div key=${p.id} class="s-row hub-row">
|
|
802
|
+
<span class="hub-row-text"><code class="hub-fp-groups">${compareGroups(p.fingerprint)}</code><small class="note">${hw("expires", when(p.expiresAt))}</small></span>
|
|
803
|
+
${p.ownerConfirmed ? html`<span class="tag ok">${hw("confirmed")}</span>` : html`<button type="button" class="btn btn-sm btn-primary" onClick=${() => confirmPairing(p)}>${hw("confirmPairing")}</button>`}
|
|
804
|
+
</div>`)}</div></section>` : null}
|
|
805
|
+
${!cat ? html`<${Skeleton} variant="rows" lines=${4} />` : cat.error ? html`<${ErrorState} message=${cat.error} onRetry=${reload} />` : null}
|
|
806
|
+
${cat && !cat.error && !mine.length ? html`<div class="center hub-empty"><${Empty} icon="globe" title=${hw("exposuresEmpty")} hint=${hw("exposuresHint")} /></div>` : null}
|
|
807
|
+
${mine.length ? html`<section class="card hub-shared"><h3>${ho("sharedCount", mine.length)}</h3>
|
|
808
|
+
<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">${mayAsk((e.grants || []).length)}</small></span>
|
|
810
|
+
${stateTag(e.state)}<${Icon} name="next" size=${16} /></a>`)}</div></section>` : null}
|
|
811
|
+
</div></div>`;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/** One shared agent: who may ask (allow, revoke), whether askers see its quota (G), who asked lately, pause. */
|
|
815
|
+
function HubAgentPage({ x, act, msg }) {
|
|
816
|
+
// #3338: this page is reached only through catalog.mine; the link opens a form, never a grant.
|
|
817
|
+
// Read the closed intent once on this keyed agent page, so cancel/save/reloads never reopen it.
|
|
818
|
+
const [allowing, setAllowing] = useState(() => x.state === "published" && new URLSearchParams(location.search).get("grant") === "1");
|
|
819
|
+
const [activity, reloadActivity] = useRead(() => readActivity(x.id));
|
|
820
|
+
const revoke = async (g) => {
|
|
821
|
+
if (!(await confirmDialog({ message: hw("revokeAsk", g.subjectName || g.subjectLogin), confirmLabel: hw("revoke"), danger: true }))) return;
|
|
822
|
+
await act(() => hubClient().revokeGrant(g.id, g.revision));
|
|
823
|
+
};
|
|
824
|
+
const freeze = async () => {
|
|
825
|
+
if (!(await confirmDialog({ message: hw("freezeAsk", x.displayName), confirmLabel: hw("freeze"), danger: true }))) return;
|
|
826
|
+
await act(() => hubClient().freeze(x.id, x.revision));
|
|
827
|
+
};
|
|
828
|
+
const grants = x.grants || [], shared = x.state === "published";
|
|
829
|
+
const stageWord = (s) => (s === "answered" ? html`<span class="tag ok">${ho("stageAnswered")}</span>`
|
|
830
|
+
: ["queued", "delivered", "consumed"].includes(s) ? html`<span class="tag warn">${ho("stageWaiting")}</span>` : html`<span class="tag danger">${ho("stageNot")}</span>`);
|
|
831
|
+
const acts = activity && activity.activity ? activity.activity : [];
|
|
832
|
+
return html`<div class="col hub-owner">
|
|
833
|
+
<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=${mayAsk(grants.length)} />
|
|
835
|
+
<div class="s-section-layout">
|
|
836
|
+
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
837
|
+
<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
|
+
${grants.length ? html`<div class="hub-rows">${grants.map((g) => html`<div key=${g.id} class="s-row hub-row">
|
|
839
|
+
<${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>
|
|
841
|
+
<${Menu} label=${ho("rowMenu", g.subjectName || g.subjectLogin)} items=${[{ key: "revoke", label: ho("revokeItem"), icon: "trash", danger: true, onSelect: () => revoke(g) }]} />
|
|
842
|
+
</div>`)}</div>` : html`<p class="note">${hw("noGrants")}</p>`}
|
|
843
|
+
</section>
|
|
844
|
+
<${QuotaVisibilityRow} exposure=${x} onSaved=${() => act(async () => ({ ok: true }))} />
|
|
845
|
+
<section class="card"><h3>${ho("recent")}</h3><p class="note">${ho("recentLead")}</p>
|
|
846
|
+
${!activity ? html`<${Skeleton} variant="rows" lines=${3} />` : activity.error ? html`<${ErrorState} message=${activity.error} onRetry=${reloadActivity} />` : null}
|
|
847
|
+
${activity && !activity.error && !acts.length ? html`<p class="note">${ho("recentNone")}</p>` : null}
|
|
848
|
+
${acts.length ? html`<div class="hub-rows">${acts.map((a, i) => html`<div key=${i} class="s-row hub-row">
|
|
849
|
+
<${Avatar} name=${a.askerName || "?"} size="sm" /><span class="hub-row-text"><strong>${a.askerName || "—"}</strong><small class="note">${when(a.askedAt)}</small></span>${stageWord(a.stage)}
|
|
850
|
+
</div>`)}</div>` : null}
|
|
851
|
+
<div class="field-row"><button type="button" class="btn btn-sm btn-ghost" onClick=${reloadActivity}>${ho("refresh")}</button></div>
|
|
852
|
+
</section>
|
|
853
|
+
${shared ? html`<section class="card hub-danger"><h3>${ho("pauseTitle")}</h3><p class="note">${ho("pauseLead")}</p>
|
|
854
|
+
<div class="field-row"><button type="button" class="btn btn-sm btn-danger" onClick=${freeze}>${ho("pauseGo")}</button></div></section>` : null}
|
|
855
|
+
</div>
|
|
856
|
+
${allowing && shared ? html`<${AllowDialog} x=${x} act=${act} onClose=${() => setAllowing(false)} />` : null}
|
|
857
|
+
</div>`;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
function AllowDialog({ x, act, onClose }) {
|
|
861
|
+
const [form, setForm] = useState({ login: "", days: 7 });
|
|
862
|
+
const [busy, setBusy] = useState(false);
|
|
863
|
+
const [error, setError] = useState(null);
|
|
864
|
+
const submit = async (e) => {
|
|
865
|
+
e && e.preventDefault && e.preventDefault();
|
|
866
|
+
if (busy || !form.login.trim()) return;
|
|
867
|
+
setError(null);
|
|
868
|
+
setBusy(true);
|
|
869
|
+
const r = await act(() => hubClient().grant({ exposureId: x.id, exposureRevision: x.revision, login: form.login.trim(), days: form.days }), undefined,
|
|
870
|
+
(r) => setError(r.code === "not-found" ? hg("recipientRefused") : r.code === "unavailable" ? hg("directoryUnavailable") : errText(r)));
|
|
871
|
+
setBusy(false);
|
|
872
|
+
if (r && r.ok) onClose();
|
|
873
|
+
};
|
|
874
|
+
return html`<${Dialog} title=${ho("allowTitle", x.displayName)} onClose=${onClose}
|
|
875
|
+
actions=${html`<button type="button" class="btn" onClick=${onClose}>${hw("pickCancel")}</button><button type="button" class="btn btn-primary" disabled=${busy || !form.login.trim()} onClick=${submit}>${ho("allowGo")}</button>`}>
|
|
876
|
+
<form class="form hub-grant" onSubmit=${submit}>
|
|
877
|
+
${error ? html`<p class="err" role="alert">${error}</p>` : null}
|
|
878
|
+
<label class="field"><span>${ho("allowLogin")}</span><input autocomplete="off" spellcheck=${false} autocapitalize="none" value=${form.login}
|
|
879
|
+
onInput=${(e) => { const v = e.target.value; setError(null); setForm((f) => ({ ...f, login: v })); }} /><small class="note">${ho("allowLoginHint")}</small></label>
|
|
880
|
+
<label class="field"><span>${ho("allowDays")}</span><select value=${String(form.days)} onChange=${(e) => { const v = Number(e.target.value); setForm((f) => ({ ...f, days: v })); }}>
|
|
881
|
+
${DAYS.map((d) => html`<option value=${String(d)}>${hw("days", d)}</option>`)}</select></label>
|
|
882
|
+
</form>
|
|
883
|
+
</${Dialog}>`;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// ── Administration ──
|
|
887
|
+
function HubAdmin({ admin }) {
|
|
888
|
+
useStore(navStore); // ?view= changes without a new route
|
|
889
|
+
const s = useSession();
|
|
890
|
+
if (!admin) return html`<div class="center hub-empty"><${Empty} icon="key" title=${hw("adminOnly")} hint=${hw("adminOnlyHint")} /></div>`;
|
|
891
|
+
const directory = s?.features?.includes("directory-editor-v1") && hubClient()?.directoryEditorV1 === true;
|
|
892
|
+
if (directory && adminView() === "directory") return html`<${LazyDirectory} session=${s} />`;
|
|
893
|
+
if (groupPolicyOn(s, hubClient()) && adminView() === "groups") return html`<${LazyGroups} pick=${(m) => m.HubGroupPolicyPage} props=${{}} />`;
|
|
894
|
+
// Reached from a fleet's Settings link on a Hub (or a tab) without group permissions: say so instead of a silent admin page.
|
|
895
|
+
const unavailable = adminView() === "groups" && !groupPolicyOn(s, hubClient());
|
|
896
|
+
return html`${unavailable ? html`<p class="note" role="status" data-groups="unavailable">${t("hubGroupsNote.unavailable")}</p>` : null}
|
|
897
|
+
<${HubAdminPage} groups=${groupPolicyOn(s, hubClient())} companyJoin=${s?.features?.includes("company-join-v1")} directory=${directory} />`;
|
|
898
|
+
}
|
|
899
|
+
function LazyDirectory({ session }) {
|
|
900
|
+
const [Page, setPage] = useState(null);
|
|
901
|
+
useEffect(() => { let live = true; import("./hub-directory-editor.js").then(m => { if (live) setPage(() => m.HubDirectoryPage); }, () => {}); return () => { live = false; }; }, []);
|
|
902
|
+
return Page ? html`<${Page} client=${hubClient()} offered=${true} login=${session.login} afterSave=${async () => !!(await readSession())} />` : null;
|
|
903
|
+
}
|
|
904
|
+
/** M-2682: Administration → This Hub, its own lazy module (an older server doesn't serve it: then it's left out). */
|
|
905
|
+
function LazyThisHub({ directory }) {
|
|
906
|
+
const [C, setC] = useState(null);
|
|
907
|
+
useEffect(() => { let live = true; import("./hub-this-hub.js").then((m) => { if (live) setC(() => m.ThisHubCard); }, () => {}); return () => { live = false; }; }, []);
|
|
908
|
+
return C ? html`<${C} directory=${directory} />` : null;
|
|
909
|
+
}
|
|
910
|
+
/** #3298 S-89: Administration's sub-page (?view=groups: Group permissions), from the page's own address. */
|
|
911
|
+
function adminView() { try { return new URLSearchParams(location.search).get("view") || ""; } catch { return ""; } }
|
|
912
|
+
/** #3298 S-89: the prominent entry to Group permissions at the top of Administration (discovery without docs). */
|
|
913
|
+
function GroupPermissionsEntry() {
|
|
914
|
+
return html`<${LazyGroups} pick=${(m) => m.GroupPermissionsCard} props=${{}} />`;
|
|
915
|
+
}
|
|
916
|
+
function HubAdminPage({ groups = false, companyJoin = false, directory = false } = {}) {
|
|
917
|
+
const [view, reload] = useRead(() => hubClient().adminOverview());
|
|
918
|
+
const [login, setLogin] = useState("");
|
|
919
|
+
const [offer, setOffer] = useState(null);
|
|
920
|
+
const [msg, setMsg] = useState(null);
|
|
921
|
+
useEffect(() => { linkHubChatCss(); linkHubOwnerCss(); }, []);
|
|
922
|
+
const create = async (e) => {
|
|
923
|
+
e.preventDefault();
|
|
924
|
+
// The button is always ready (a disabled one reads as grey, "broken" — Argon #16): an empty field just takes the focus.
|
|
925
|
+
if (!login.trim()) { (typeof document !== "undefined" ? document.getElementById("hubOwnerLogin") : null)?.focus(); return; }
|
|
926
|
+
setMsg(null);
|
|
927
|
+
const r = await hubClient().createPairing(login.trim());
|
|
928
|
+
if (!r.ok) { setMsg(errText(r)); return; }
|
|
929
|
+
setOffer({ code: r.code, expiresAt: r.expiresAt, memberOrigin: r.memberOrigin, login: login.trim() }); setLogin(""); reload();
|
|
930
|
+
};
|
|
931
|
+
const approve = async (p) => {
|
|
932
|
+
if (!(await confirmDialog({ message: hw("approveAsk", compareGroups(p.fingerprint)), confirmLabel: hw("approve") }))) return;
|
|
933
|
+
setMsg(null);
|
|
934
|
+
const r = await hubClient().approvePairing(p.id, p.fingerprint);
|
|
935
|
+
// M-2988 #12: "denied" here is the owner — no longer eligible in the directory, or blocked from connecting a Fleet — not you.
|
|
936
|
+
if (!r.ok) setMsg(r.code === "denied" && p.owner && p.owner.name ? newer("approveOwnerDenied", [p.owner.name], () => errText(r)) : errText(r));
|
|
937
|
+
reload();
|
|
938
|
+
};
|
|
939
|
+
const revoke = async (f) => {
|
|
940
|
+
// M-2988 #16: name the Fleet as the list does, so one owner's two Fleets can be told apart.
|
|
941
|
+
const who = f.owner ? f.owner.name : f.id;
|
|
942
|
+
const message = typeof f.label === "string" && f.label ? newer("revokeFleetNamedAsk", [f.label, who], () => hw("revokeFleetAsk", who)) : hw("revokeFleetAsk", who);
|
|
943
|
+
if (!(await confirmDialog({ message, confirmLabel: hw("revoke"), danger: true }))) return;
|
|
944
|
+
setMsg(null);
|
|
945
|
+
const r = await hubClient().revokeFleet(f.id);
|
|
946
|
+
if (!r.ok) setMsg(errText(r));
|
|
947
|
+
reload();
|
|
948
|
+
};
|
|
949
|
+
const lead = html`<p class="s-page-lead hub-page-lead">${ho("adminLead")}</p>`;
|
|
950
|
+
if (!view || (view.error && !view.fleets)) return html`<div class="col hub-owner hub-admin">${lead}
|
|
951
|
+
<div class="s-section-layout">${view?.error ? html`<${ErrorState} message=${view.error} onRetry=${reload} />`
|
|
952
|
+
: html`<section class="card"><h3>${ho("pairSteps")}</h3><${Skeleton} variant="rows" lines=${3} /></section><section class="card"><${Skeleton} variant="rows" lines=${3} /></section>`}</div></div>`;
|
|
953
|
+
const fleets = view.fleets || [], pairings = view.pairings || [];
|
|
954
|
+
const accessEntry = companyJoin && companyViews.companyJoinAdminEntryV1 === true && ownerEntryWords.ownerAdminEntryV1 === true;
|
|
955
|
+
const ManualFrame = accessEntry ? "details" : "div";
|
|
956
|
+
return html`<div class="col hub-owner hub-admin">${lead}
|
|
957
|
+
<div class="s-section-layout">
|
|
958
|
+
${groups && !accessEntry ? html`<${GroupPermissionsEntry} />` : null}
|
|
959
|
+
${companyJoin ? html`<${CompanyJoinAdminCard} entry=${accessEntry} groups=${groups} />` : null}
|
|
960
|
+
${view.error ? html`<${ErrorState} message=${view.error} onRetry=${reload} />` : null}
|
|
961
|
+
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
962
|
+
<${ManualFrame} class=${accessEntry ? "s-ui-disclosure hub-admin-manual" : ""} open=${accessEntry && (!!offer || pairings.some(p => p.ownerConfirmed && !p.adminApproved))}>${accessEntry ? html`<summary>${ho("manualAdvanced")}</summary>` : null}<section class="card"><h3>${ho("pairSteps")}</h3>
|
|
963
|
+
<ol class="hub-steps">
|
|
964
|
+
<li class=${offer || pairings.length ? "done" : "now"}><div class="hub-step-body"><span><b>${ho("stepCode")}</b><small class="note">${ho("stepCodeHint")}</small></span>
|
|
965
|
+
<form class="hub-step-form" onSubmit=${create}><label class="field"><span class="sr-only">${ho("ownerLogin")}</span><input id="hubOwnerLogin" placeholder=${ho("ownerLogin")} autocomplete="off" spellcheck=${false} autocapitalize="none" value=${login} onInput=${(e) => setLogin(e.target.value)} /></label>
|
|
966
|
+
<button type="submit" class="btn btn-sm btn-primary">${ho("makeCode")}</button></form>
|
|
967
|
+
${offer ? html`<div class="hub-offer" role="status"><small class="note">${ho("codeFor", offer.login)}</small><code class="hub-code">${offer.code}</code><small class="note">${hw("expires", when(offer.expiresAt))}</small>
|
|
968
|
+
${offer.memberOrigin ? html`<div class="field"><span>${ho("memberAddress")}</span><span class="hub-origin"><code>${offer.memberOrigin}</code></span><small class="note">${ho("memberAddressHint")}</small></div>
|
|
969
|
+
<button type="button" class="btn btn-sm" onClick=${async () => { const ok = await copyText(`${ho("memberAddress")}: ${offer.memberOrigin}\n${ho("codeFor", offer.login)}: ${offer.code}\n${hw("expires", when(offer.expiresAt))}`); toast(ho(ok ? "handoffCopied" : "handoffCopyFailed"), !ok); }}><${Icon} name="copy" size=${14} />${ho("copyHandoff")}</button>`
|
|
970
|
+
: html`<small class="note">${ho("memberAddressMissing")}</small>`}</div>` : null}</div></li>
|
|
971
|
+
<li class=${pairings.some((p) => p.ownerConfirmed) ? "done" : pairings.length ? "now" : ""}><div class="hub-step-body"><span><b>${ho("stepOwner")}</b><small class="note">${ho("stepOwnerHint")}</small></span></div></li>
|
|
972
|
+
<li class=${pairings.some((p) => p.ownerConfirmed && !p.adminApproved) ? "now" : ""}><div class="hub-step-body"><span><b>${ho("stepApprove")}</b><small class="note">${ho("stepApproveHint")}</small></span></div></li>
|
|
973
|
+
</ol>
|
|
974
|
+
${pairings.length ? html`<div class="hub-rows">${pairings.map((p) => html`<div key=${p.id} class="s-row hub-row">
|
|
975
|
+
<${Avatar} name=${p.owner ? p.owner.name : "?"} size="sm" />
|
|
976
|
+
<span class="hub-row-text"><strong>${p.owner ? p.owner.name : "—"}</strong>
|
|
977
|
+
${p.fingerprint ? html`<code class="hub-fp-groups">${compareGroups(p.fingerprint)}</code>` : html`<small class="note">${ho("codeUnusedYet")}</small>`}</span>
|
|
978
|
+
${p.adminApproved ? html`<span class="tag ok">${ho("approvedTag")}</span>`
|
|
979
|
+
: p.ownerConfirmed ? html`<button type="button" class="btn btn-sm btn-primary" disabled=${!p.fingerprint} onClick=${() => approve(p)}>${ho("approveGo")}</button>`
|
|
980
|
+
: html`<span class="tag warn">${ho("waitingOwner")}</span>`}
|
|
981
|
+
</div>`)}</div>` : null}
|
|
982
|
+
</section></${ManualFrame}>
|
|
983
|
+
<section class="card hub-fleet-list"><h3>${ho("pairedFleets", fleets.filter((f) => f.status !== "revoked").length)}</h3>
|
|
984
|
+
${fleets.length ? (() => {
|
|
985
|
+
// Spec 1.2: the row's title is the Fleet's label (S1 overview), its subtitle the owner; active first, revoked folded.
|
|
986
|
+
const row = (f) => html`<div key=${f.id} class="s-row hub-row" data-fleet=${f.id}>
|
|
987
|
+
<${Avatar} name=${f.owner ? f.owner.name : "?"} size="sm" />
|
|
988
|
+
<span class="hub-row-text"><strong>${typeof f.label === "string" && f.label ? f.label : ho("fleetOf", f.owner ? f.owner.name : "—")}</strong>${f.owner ? html`<small class="note">${f.owner.name}${f.owner.login ? html` · <code>${f.owner.login}</code>` : null}</small>` : null}</span>
|
|
989
|
+
${f.status === "active" ? html`<span class="tag ok">${ho("active")}</span><${Menu} label=${ho("rowMenu", f.label || (f.owner ? f.owner.name : f.id))} items=${[{ key: "revoke", label: ho("revokeItem"), icon: "trash", danger: true, onSelect: () => revoke(f) }]} />`
|
|
990
|
+
: html`<span class="tag">${ho("revokedTag")}</span>`}
|
|
991
|
+
</div>`;
|
|
992
|
+
const current = fleets.filter((f) => f.status !== "revoked").sort((a, b) => (a.status === "active" ? 0 : 1) - (b.status === "active" ? 0 : 1));
|
|
993
|
+
const revoked = fleets.filter((f) => f.status === "revoked");
|
|
994
|
+
return html`${current.length ? html`<div class="hub-rows">${current.map(row)}</div>` : html`<p class="note">${ho("noFleets")}</p>`}
|
|
995
|
+
${revoked.length ? html`<details class="s-ui-disclosure hub-fleets-revoked"><summary>${t("hubFleetList.revoked", revoked.length)}</summary><div class="hub-rows">${revoked.map(row)}</div></details>` : null}`;
|
|
996
|
+
})() : html`<p class="note">${ho("noFleets")}</p>`}
|
|
997
|
+
</section>
|
|
998
|
+
<${LazyThisHub} directory=${directory} />
|
|
999
|
+
</div></div>`;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/** Tests only: forget the page's session view. */
|
|
1003
|
+
export function resetHubSession() { session = undefined; reading = null; watchingEnd = false; sessionSubs.clear(); roomsStore.set({ loaded: false, rooms: [], error: null }); roomsReading = null; }
|