@songsid/agend 2.4.0-alpha.2 → 2.4.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-isolation.d.ts +6 -0
- package/dist/account-isolation.js +40 -0
- package/dist/account-isolation.js.map +1 -0
- package/dist/accounts-signout.d.ts +15 -2
- package/dist/accounts-signout.js +52 -4
- package/dist/accounts-signout.js.map +1 -1
- package/dist/accounts-view.d.ts +114 -27
- package/dist/accounts-view.js +123 -60
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +15 -9
- package/dist/agent-cli.js +47 -20
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +23 -8
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-list-output.d.ts +23 -0
- package/dist/agent-list-output.js +53 -0
- package/dist/agent-list-output.js.map +1 -0
- package/dist/agent-runtime-change.js +4 -4
- package/dist/agent-runtime-change.js.map +1 -1
- package/dist/agent-whats-new.js +9 -7
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/antigravity-first-run.d.ts +4 -0
- package/dist/antigravity-first-run.js +57 -0
- package/dist/antigravity-first-run.js.map +1 -0
- package/dist/antigravity-identity.d.ts +6 -0
- package/dist/antigravity-identity.js +27 -0
- package/dist/antigravity-identity.js.map +1 -0
- package/dist/antigravity-store.d.ts +22 -0
- package/dist/antigravity-store.js +79 -0
- package/dist/antigravity-store.js.map +1 -0
- package/dist/auth-api.js +11 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/agy-onboarding.d.ts +14 -0
- package/dist/backend/agy-onboarding.js +114 -0
- package/dist/backend/agy-onboarding.js.map +1 -0
- package/dist/backend/antigravity.d.ts +15 -0
- package/dist/backend/antigravity.js +44 -4
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +8 -0
- package/dist/backend/claude-code.js +11 -4
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.js +7 -3
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +22 -3
- package/dist/backend/credential-profile.js +61 -9
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/grok.d.ts +19 -0
- package/dist/backend/grok.js +112 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/types.d.ts +10 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +6 -0
- package/dist/backend-availability.js +11 -0
- package/dist/backend-availability.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +9 -1
- package/dist/browser-backend-signins.js +9 -5
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +10 -10
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/child-process.d.ts +1 -0
- package/dist/child-process.js.map +1 -1
- package/dist/claude-auth-status.d.ts +1 -0
- package/dist/claude-auth-status.js +25 -0
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/claude-model-observation.d.ts +71 -0
- package/dist/claude-model-observation.js +169 -0
- package/dist/claude-model-observation.js.map +1 -0
- package/dist/cli-capability.d.ts +104 -19
- package/dist/cli-capability.js +3 -1
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +14 -0
- package/dist/cli-caps-module.js +8 -1
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +114 -18
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +116 -12
- package/dist/cli-registry.js +16 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +53 -11
- package/dist/cli-spec-antigravity.js +44 -13
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +14 -1
- package/dist/cli-spec-claude-code.js +5 -4
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +8 -0
- package/dist/cli-spec-codex.js +4 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +4 -0
- package/dist/cli-spec-grok.js +2 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -0
- package/dist/cli-spec-kiro-cli.js +3 -2
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +4 -0
- package/dist/cli-spec-muse.js +2 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +1 -0
- package/dist/cli-spec-opencode.js +1 -0
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/credential-store-proof.d.ts +6 -0
- package/dist/credential-store-proof.js +30 -0
- package/dist/credential-store-proof.js.map +1 -0
- package/dist/cross-instance-envelope.d.ts +4 -1
- package/dist/cross-instance-envelope.js +12 -7
- package/dist/cross-instance-envelope.js.map +1 -1
- package/dist/daemon.d.ts +24 -2
- package/dist/daemon.js +265 -37
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +5 -4
- package/dist/decision-list.js +22 -8
- package/dist/decision-list.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +24 -0
- package/dist/delivery-consumed-watch.js +21 -10
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +5 -1
- package/dist/delivery-outbox.js +5 -0
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-manager.d.ts +31 -2
- package/dist/fleet-manager.js +238 -56
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +6 -6
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +48 -7
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +18 -8
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +518 -0
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -1
- package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +199 -40
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +5 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- package/dist/grok-delivery-proof.d.ts +24 -0
- package/dist/grok-delivery-proof.js +124 -0
- package/dist/grok-delivery-proof.js.map +1 -0
- package/dist/hub/assistant/admin-types.d.ts +43 -0
- package/dist/hub/assistant/admin-types.js +2 -0
- package/dist/hub/assistant/admin-types.js.map +1 -0
- package/dist/hub/assistant/claude-host.d.ts +17 -0
- package/dist/hub/assistant/claude-host.js +300 -0
- package/dist/hub/assistant/claude-host.js.map +1 -0
- package/dist/hub/assistant/context.d.ts +3 -0
- package/dist/hub/assistant/context.js +7 -0
- package/dist/hub/assistant/context.js.map +1 -0
- package/dist/hub/assistant/fleet-host.d.ts +19 -0
- package/dist/hub/assistant/fleet-host.js +28 -0
- package/dist/hub/assistant/fleet-host.js.map +1 -0
- package/dist/hub/assistant/runner.d.ts +64 -0
- package/dist/hub/assistant/runner.js +239 -0
- package/dist/hub/assistant/runner.js.map +1 -0
- package/dist/hub/assistant/service.d.ts +51 -0
- package/dist/hub/assistant/service.js +143 -0
- package/dist/hub/assistant/service.js.map +1 -0
- package/dist/hub/assistant/store.d.ts +3 -0
- package/dist/hub/assistant/store.js +65 -0
- package/dist/hub/assistant/store.js.map +1 -0
- package/dist/hub/assistant/types.d.ts +60 -0
- package/dist/hub/assistant/types.js +2 -0
- package/dist/hub/assistant/types.js.map +1 -0
- package/dist/hub/buttons.d.ts +3 -0
- package/dist/hub/buttons.js +11 -11
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +13 -6
- package/dist/hub/catalog.js +127 -35
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +16 -0
- package/dist/hub/client.js +52 -9
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +8 -1
- package/dist/hub/compose/member.js +238 -57
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +17 -1
- package/dist/hub/compose/server.js +76 -13
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/admission.d.ts +15 -0
- package/dist/hub/directory/admission.js +56 -0
- package/dist/hub/directory/admission.js.map +1 -0
- package/dist/hub/directory/directory.d.ts +1 -1
- package/dist/hub/directory/directory.js +114 -0
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +27 -0
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/enrolment-code.d.ts +1 -1
- package/dist/hub/enrolment-code.js +4 -4
- package/dist/hub/enrolment-code.js.map +1 -1
- package/dist/hub/grant-access.d.ts +11 -0
- package/dist/hub/grant-access.js +113 -0
- package/dist/hub/grant-access.js.map +1 -0
- package/dist/hub/grant-search.d.ts +9 -0
- package/dist/hub/grant-search.js +92 -0
- package/dist/hub/grant-search.js.map +1 -0
- package/dist/hub/group-policy/admin-control.d.ts +1 -0
- package/dist/hub/group-policy/admin-control.js +4 -2
- package/dist/hub/group-policy/admin-control.js.map +1 -1
- package/dist/hub/group-policy/admin-facts.d.ts +1 -0
- package/dist/hub/group-policy/admin-facts.js +2 -1
- package/dist/hub/group-policy/admin-facts.js.map +1 -1
- package/dist/hub/group-policy/admin-impact.d.ts +2 -0
- package/dist/hub/group-policy/admin-impact.js +10 -2
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.js +1 -1
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/admin-read.d.ts +1 -0
- package/dist/hub/group-policy/admin-read.js +3 -2
- package/dist/hub/group-policy/admin-read.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +5 -2
- package/dist/hub/group-policy/authorization.js +73 -32
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/errors.d.ts +9 -0
- package/dist/hub/group-policy/errors.js +13 -0
- package/dist/hub/group-policy/errors.js.map +1 -0
- package/dist/hub/group-policy/impact-inventory.js +20 -4
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +4 -5
- package/dist/hub/group-policy/resources.js +26 -19
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +21 -12
- package/dist/hub/group-policy/store.js +99 -109
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/welcome.js.map +1 -1
- package/dist/hub/http/compose.d.ts +1 -0
- package/dist/hub/http/compose.js +463 -20
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.d.ts +24 -5
- package/dist/hub/http/core.js +181 -54
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +26 -0
- package/dist/hub/http/schema.js +19 -0
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/init/member-certificate.d.ts +1 -0
- package/dist/hub/init/member-certificate.js +39 -0
- package/dist/hub/init/member-certificate.js.map +1 -0
- package/dist/hub/init/plan-digest.js +1 -0
- package/dist/hub/init/plan-digest.js.map +1 -1
- package/dist/hub/invitations.d.ts +96 -0
- package/dist/hub/invitations.js +292 -0
- package/dist/hub/invitations.js.map +1 -0
- package/dist/hub/join/certificate-trust.d.ts +13 -0
- package/dist/hub/join/certificate-trust.js +41 -0
- package/dist/hub/join/certificate-trust.js.map +1 -0
- package/dist/hub/join/certificate.d.ts +11 -0
- package/dist/hub/join/certificate.js +67 -0
- package/dist/hub/join/certificate.js.map +1 -0
- package/dist/hub/join/client.d.ts +5 -0
- package/dist/hub/join/client.js +30 -3
- package/dist/hub/join/client.js.map +1 -1
- package/dist/hub/join/http.js +5 -3
- package/dist/hub/join/http.js.map +1 -1
- package/dist/hub/join/local.d.ts +37 -1
- package/dist/hub/join/local.js +142 -14
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/service.d.ts +19 -0
- package/dist/hub/join/service.js +46 -35
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/join/trust.d.ts +9 -0
- package/dist/hub/join/trust.js +35 -0
- package/dist/hub/join/trust.js.map +1 -1
- package/dist/hub/member/pairing-api.js +12 -1
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/room-ask.d.ts +137 -0
- package/dist/hub/member/room-ask.js +358 -0
- package/dist/hub/member/room-ask.js.map +1 -0
- package/dist/hub/member-journal.d.ts +18 -1
- package/dist/hub/member-journal.js +76 -3
- package/dist/hub/member-journal.js.map +1 -1
- package/dist/hub/member-origin.d.ts +177 -0
- package/dist/hub/member-origin.js +314 -0
- package/dist/hub/member-origin.js.map +1 -0
- package/dist/hub/pairing-notices.d.ts +1 -0
- package/dist/hub/pairing-notices.js +2 -1
- package/dist/hub/pairing-notices.js.map +1 -1
- package/dist/hub/pairing.d.ts +11 -0
- package/dist/hub/pairing.js +69 -21
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/policy.d.ts +1 -1
- package/dist/hub/policy.js +19 -6
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +172 -0
- package/dist/hub/protocol.js +25 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/quota.d.ts +2 -1
- package/dist/hub/quota.js +2 -2
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/roles/authority.d.ts +45 -0
- package/dist/hub/roles/authority.js +199 -0
- package/dist/hub/roles/authority.js.map +1 -0
- package/dist/hub/roles/change.d.ts +18 -0
- package/dist/hub/roles/change.js +76 -0
- package/dist/hub/roles/change.js.map +1 -0
- package/dist/hub/roles/clock.d.ts +18 -0
- package/dist/hub/roles/clock.js +58 -0
- package/dist/hub/roles/clock.js.map +1 -0
- package/dist/hub/roles/convert.d.ts +11 -0
- package/dist/hub/roles/convert.js +27 -0
- package/dist/hub/roles/convert.js.map +1 -0
- package/dist/hub/roles/cutover-inventory.d.ts +14 -0
- package/dist/hub/roles/cutover-inventory.js +42 -0
- package/dist/hub/roles/cutover-inventory.js.map +1 -0
- package/dist/hub/roles/cutover-marker.d.ts +57 -0
- package/dist/hub/roles/cutover-marker.js +26 -0
- package/dist/hub/roles/cutover-marker.js.map +1 -0
- package/dist/hub/roles/cutover.d.ts +32 -0
- package/dist/hub/roles/cutover.js +170 -0
- package/dist/hub/roles/cutover.js.map +1 -0
- package/dist/hub/roles/delegation.d.ts +24 -0
- package/dist/hub/roles/delegation.js +111 -0
- package/dist/hub/roles/delegation.js.map +1 -0
- package/dist/hub/roles/evaluate.d.ts +50 -0
- package/dist/hub/roles/evaluate.js +96 -0
- package/dist/hub/roles/evaluate.js.map +1 -0
- package/dist/hub/roles/expiry.d.ts +46 -0
- package/dist/hub/roles/expiry.js +180 -0
- package/dist/hub/roles/expiry.js.map +1 -0
- package/dist/hub/roles/mode-effects.d.ts +5 -0
- package/dist/hub/roles/mode-effects.js +21 -0
- package/dist/hub/roles/mode-effects.js.map +1 -0
- package/dist/hub/roles/model.d.ts +171 -0
- package/dist/hub/roles/model.js +79 -0
- package/dist/hub/roles/model.js.map +1 -0
- package/dist/hub/roles/read.d.ts +33 -0
- package/dist/hub/roles/read.js +55 -0
- package/dist/hub/roles/read.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +80 -0
- package/dist/hub/roles/writer.js +427 -0
- package/dist/hub/roles/writer.js.map +1 -0
- package/dist/hub/rooms/admin.d.ts +45 -0
- package/dist/hub/rooms/admin.js +105 -0
- package/dist/hub/rooms/admin.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +74 -0
- package/dist/hub/rooms/agents.js +333 -0
- package/dist/hub/rooms/agents.js.map +1 -0
- package/dist/hub/rooms/assistant.d.ts +44 -0
- package/dist/hub/rooms/assistant.js +179 -0
- package/dist/hub/rooms/assistant.js.map +1 -0
- package/dist/hub/rooms/context.d.ts +10 -0
- package/dist/hub/rooms/context.js +24 -0
- package/dist/hub/rooms/context.js.map +1 -0
- package/dist/hub/rooms/direct-view.d.ts +39 -0
- package/dist/hub/rooms/direct-view.js +38 -0
- package/dist/hub/rooms/direct-view.js.map +1 -0
- package/dist/hub/rooms/directory.d.ts +35 -0
- package/dist/hub/rooms/directory.js +98 -0
- package/dist/hub/rooms/directory.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +11 -0
- package/dist/hub/rooms/schema.js +73 -0
- package/dist/hub/rooms/schema.js.map +1 -0
- package/dist/hub/rooms/service.d.ts +449 -0
- package/dist/hub/rooms/service.js +581 -0
- package/dist/hub/rooms/service.js.map +1 -0
- package/dist/hub/rooms/types.d.ts +79 -0
- package/dist/hub/rooms/types.js +2 -0
- package/dist/hub/rooms/types.js.map +1 -0
- package/dist/hub/rooms.d.ts +15 -1
- package/dist/hub/rooms.js +76 -31
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +8 -0
- package/dist/hub/runtime.js +57 -3
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +28 -0
- package/dist/hub/server.js +66 -6
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/sessions.js +6 -2
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-commit.d.ts +6 -1
- package/dist/hub/settings-commit.js +15 -0
- package/dist/hub/settings-commit.js.map +1 -1
- package/dist/hub/settings-directory-decision.d.ts +2 -2
- package/dist/hub/settings-directory-decision.js +7 -5
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-directory-proof.js +3 -1
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.d.ts +5 -0
- package/dist/hub/settings-directory-recovery.js +14 -4
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/settings-member-address-control.d.ts +84 -0
- package/dist/hub/settings-member-address-control.js +150 -0
- package/dist/hub/settings-member-address-control.js.map +1 -0
- package/dist/hub/settings-member-address-decision.d.ts +229 -0
- package/dist/hub/settings-member-address-decision.js +318 -0
- package/dist/hub/settings-member-address-decision.js.map +1 -0
- package/dist/hub/settings-member-address-http.d.ts +9 -0
- package/dist/hub/settings-member-address-http.js +78 -0
- package/dist/hub/settings-member-address-http.js.map +1 -0
- package/dist/hub/settings-member-address-network.d.ts +2 -0
- package/dist/hub/settings-member-address-network.js +22 -0
- package/dist/hub/settings-member-address-network.js.map +1 -0
- package/dist/hub/settings-member-address-notices.d.ts +22 -0
- package/dist/hub/settings-member-address-notices.js +21 -0
- package/dist/hub/settings-member-address-notices.js.map +1 -0
- package/dist/hub/settings-member-address-policy.d.ts +21 -0
- package/dist/hub/settings-member-address-policy.js +34 -0
- package/dist/hub/settings-member-address-policy.js.map +1 -0
- package/dist/hub/settings-member-address.d.ts +64 -0
- package/dist/hub/settings-member-address.js +239 -0
- package/dist/hub/settings-member-address.js.map +1 -0
- package/dist/hub/sharing.d.ts +10 -0
- package/dist/hub/sharing.js +74 -0
- package/dist/hub/sharing.js.map +1 -0
- package/dist/hub/socket.d.ts +2 -0
- package/dist/hub/socket.js +2 -0
- package/dist/hub/socket.js.map +1 -1
- package/dist/hub/store.js +6 -2
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/teams/types.d.ts +41 -0
- package/dist/hub/teams/types.js +2 -0
- package/dist/hub/teams/types.js.map +1 -0
- package/dist/hub/tls.d.ts +47 -0
- package/dist/hub/tls.js +23 -6
- package/dist/hub/tls.js.map +1 -1
- package/dist/hub/types.d.ts +68 -4
- package/dist/hub/validation.d.ts +1 -1
- package/dist/hub/validation.js +2 -2
- package/dist/hub/validation.js.map +1 -1
- package/dist/hub/web-origin.d.ts +93 -0
- package/dist/hub/web-origin.js +174 -0
- package/dist/hub/web-origin.js.map +1 -0
- package/dist/hub-pilot-trust-settings.d.ts +4 -0
- package/dist/hub-pilot-trust-settings.js +13 -0
- package/dist/hub-pilot-trust-settings.js.map +1 -0
- package/dist/human-delivery-receipts.d.ts +4 -2
- package/dist/human-delivery-receipts.js +20 -13
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/inbound-presentation.d.ts +28 -0
- package/dist/inbound-presentation.js +48 -0
- package/dist/inbound-presentation.js.map +1 -0
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +33 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +10 -2
- package/dist/instructions.js +32 -7
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +20 -6
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +3 -0
- package/dist/log-service.js +39 -22
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps.d.ts +56 -1
- package/dist/log-steps.js +318 -56
- package/dist/log-steps.js.map +1 -1
- package/dist/login-flows.d.ts +24 -2
- package/dist/login-flows.js +53 -22
- package/dist/login-flows.js.map +1 -1
- package/dist/login-url.js +3 -0
- package/dist/login-url.js.map +1 -1
- package/dist/machine-accounts.d.ts +42 -12
- package/dist/machine-accounts.js +144 -46
- package/dist/machine-accounts.js.map +1 -1
- package/dist/machine-signins.d.ts +35 -13
- package/dist/machine-signins.js +57 -27
- package/dist/machine-signins.js.map +1 -1
- package/dist/native-instance-input.js +4 -4
- package/dist/native-instance-input.js.map +1 -1
- package/dist/native-instance-registry.d.ts +3 -3
- package/dist/native-instance-registry.js +11 -10
- package/dist/native-instance-registry.js.map +1 -1
- package/dist/needs-you-hub.js +6 -2
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +5 -1
- package/dist/needs-you.js +4 -8
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +1 -0
- package/dist/outbound-handlers.js +25 -19
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +19 -0
- package/dist/outbound-schemas.js +23 -4
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/profile-signins.d.ts +5 -0
- package/dist/profile-signins.js +1 -0
- package/dist/profile-signins.js.map +1 -1
- package/dist/queued-handoffs.d.ts +3 -1
- package/dist/queued-handoffs.js +1 -1
- package/dist/queued-handoffs.js.map +1 -1
- package/dist/runtime-build-info.js +6 -2
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli.js +33 -11
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client.d.ts +18 -2
- package/dist/runtime-client.js +84 -21
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +36 -4
- package/dist/runtime-credential-profiles.js +82 -16
- package/dist/runtime-credential-profiles.js.map +1 -1
- package/dist/runtime-profile-ownership.d.ts +2 -2
- package/dist/runtime-profile-ownership.js +3 -3
- package/dist/runtime-profile-ownership.js.map +1 -1
- package/dist/runtime-protocol.d.ts +5 -3
- package/dist/runtime-protocol.js +4 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +72 -5
- package/dist/runtime-remote-accounts.js +293 -52
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +2 -2
- package/dist/runtime-remote-setup.js +2 -2
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-signin-transport.d.ts +22 -4
- package/dist/runtime-signin-transport.js +50 -12
- package/dist/runtime-signin-transport.js.map +1 -1
- package/dist/runtime-signin.d.ts +42 -0
- package/dist/runtime-signin.js +105 -9
- package/dist/runtime-signin.js.map +1 -1
- package/dist/runtime-transcript-source.d.ts +2 -0
- package/dist/runtime-transcript-source.js +23 -1
- package/dist/runtime-transcript-source.js.map +1 -1
- package/dist/runtime-windows-bridge.js +6 -1
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +1 -0
- package/dist/scheduler/task-board.js +10 -1
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +1 -0
- package/dist/settings-api.js +15 -8
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +3 -0
- package/dist/settings-baseline.js +2 -2
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-effect.d.ts +3 -0
- package/dist/settings-effect.js +12 -2
- package/dist/settings-effect.js.map +1 -1
- package/dist/signin-keepalive.d.ts +31 -2
- package/dist/signin-keepalive.js +123 -12
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +2 -2
- package/dist/structured-signin-transport.js +27 -6
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +16 -2
- package/dist/structured-signin.js +59 -4
- package/dist/structured-signin.js.map +1 -1
- package/dist/task-board-tool.d.ts +0 -13
- package/dist/task-board-tool.js +42 -6
- package/dist/task-board-tool.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +151 -0
- package/dist/tool-receipt-output.js +50 -0
- package/dist/tool-receipt-output.js.map +1 -0
- package/dist/topic-commands.js +2 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-jsonl.d.ts +24 -0
- package/dist/transcript-jsonl.js +72 -22
- package/dist/transcript-jsonl.js.map +1 -1
- package/dist/transcript-monitor.d.ts +5 -1
- package/dist/transcript-monitor.js +65 -3
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-needles.d.ts +1 -1
- package/dist/transcript-needles.js +1 -1
- package/dist/transcript-records.d.ts +2 -1
- package/dist/transcript-records.js.map +1 -1
- package/dist/transcript-sources.d.ts +4 -0
- package/dist/transcript-sources.js +2 -0
- package/dist/transcript-sources.js.map +1 -1
- package/dist/ui/accounts-keepalive.js +15 -6
- package/dist/ui/accounts-manage.js +25 -5
- package/dist/ui/accounts-view.js +28 -24
- package/dist/ui/agent-details-settings.js +10 -1
- package/dist/ui/agent-proposals.js +22 -2
- package/dist/ui/agent-runtime-settings.js +3 -3
- package/dist/ui/backend-signin.js +4 -4
- package/dist/ui/chat-activity.js +2 -2
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +32 -19
- package/dist/ui/fleet-canvas.js +5 -2
- package/dist/ui/fleet-office-card.js +4 -2
- package/dist/ui/fleet-org.js +2 -0
- package/dist/ui/hub-admin-rooms-strings.js +28 -0
- package/dist/ui/hub-admin-rooms.js +77 -0
- package/dist/ui/hub-assistant-admin-strings.js +26 -0
- package/dist/ui/hub-assistant-admin.js +85 -0
- package/dist/ui/hub-chat-store.js +8 -4
- package/dist/ui/hub-client.js +224 -33
- package/dist/ui/hub-enrolment-code.js +1 -1
- package/dist/ui/hub-grant-picker.js +100 -0
- package/dist/ui/hub-group-search.js +2 -2
- package/dist/ui/hub-invitations-strings.js +30 -0
- package/dist/ui/hub-invitations.js +108 -0
- package/dist/ui/hub-join-one-strings.js +4 -2
- package/dist/ui/hub-join-steps.js +5 -2
- package/dist/ui/hub-pairing-form-strings.js +48 -0
- package/dist/ui/hub-pilot-trust-strings.js +27 -0
- package/dist/ui/hub-pilot-trust.js +41 -0
- package/dist/ui/hub-room-composer.js +113 -0
- package/dist/ui/hub-room-favorites.js +90 -0
- package/dist/ui/hub-room-list.js +152 -0
- package/dist/ui/hub-room-members-strings.js +12 -0
- package/dist/ui/hub-room-members.js +104 -0
- package/dist/ui/hub-room-new-strings.js +46 -0
- package/dist/ui/hub-room-new.js +135 -0
- package/dist/ui/hub-room-presence.js +123 -0
- package/dist/ui/hub-room-settings-strings.js +26 -0
- package/dist/ui/hub-room-settings.js +134 -0
- package/dist/ui/hub-room-strings.js +222 -0
- package/dist/ui/hub-room-thread.js +262 -0
- package/dist/ui/hub-room-unread.js +51 -0
- package/dist/ui/hub-room-working.js +29 -0
- package/dist/ui/log-row.js +14 -5
- package/dist/ui/machine-signin.js +47 -14
- package/dist/ui/panel-details.js +6 -1
- package/dist/ui/panel-fleet.js +2 -2
- package/dist/ui/panel-hub.js +145 -59
- package/dist/ui/panel-needs.js +2 -0
- package/dist/ui/panel-settings.js +2 -2
- package/dist/ui/settings-hub-company-join.js +32 -11
- package/dist/ui/settings-hub-connection.js +9 -3
- package/dist/ui/settings-hub-member-address.js +205 -0
- package/dist/ui/settings-hub-section.js +4 -0
- package/dist/ui/settings-hub-web-address.js +233 -0
- package/dist/ui/settings-hub.js +16 -4
- package/dist/ui/shared/accounts-keepalive.css +8 -0
- package/dist/ui/shared/accounts-usage-pool.css +10 -0
- package/dist/ui/shared/accounts.css +9 -0
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +3 -0
- package/dist/ui/shared/app-shell.js +4 -1
- package/dist/ui/shared/app.css +43 -5
- package/dist/ui/shared/chat-render.js +10 -0
- package/dist/ui/shared/chat-thread.js +14 -5
- package/dist/ui/shared/hub-chat.css +17 -0
- package/dist/ui/shared/hub-grant-picker.css +4 -0
- package/dist/ui/shared/hub-rooms-u2.css +42 -0
- package/dist/ui/shared/hub-sharing.css +4 -0
- package/dist/ui/shared/model-observation.js +16 -0
- package/dist/ui/shared/stale-tab.css +6 -0
- package/dist/ui/shared/stale-tab.js +50 -0
- package/dist/ui/shared/view-strings.js +2 -2
- package/dist/ui/structured-signin.js +19 -6
- package/dist/ui/usage-pool.js +76 -0
- package/dist/usage/agent-output.d.ts +144 -0
- package/dist/usage/agent-output.js +75 -0
- package/dist/usage/agent-output.js.map +1 -0
- package/dist/usage/provider-alerts.d.ts +6 -0
- package/dist/usage/provider-alerts.js +6 -0
- package/dist/usage/provider-alerts.js.map +1 -1
- package/dist/usage/providers.d.ts +2 -2
- package/dist/usage/providers.js +60 -18
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +12 -0
- package/dist/usage/usage-api.js +39 -0
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +4 -0
- package/dist/web-api.js +32 -13
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +4 -1
- package/dist/web-backend-login.js.map +1 -1
- package/dist/windows-cli-providers.js +5 -1
- package/dist/windows-cli-providers.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +33 -1
- package/dist/windows-cli-worker.js +150 -10
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +7 -1
- package/dist/windows-cli.js +19 -2
- package/dist/windows-cli.js.map +1 -1
- package/dist/workflow-templates/default.md +2 -2
- package/package.json +1 -1
package/dist/ui/panel-hub.js
CHANGED
|
@@ -34,6 +34,10 @@ import "/assets/chat-strings.js";
|
|
|
34
34
|
import { compareGroups, hubClient } from "./hub-client.js";
|
|
35
35
|
import { hw, linkHubCss } from "./hub-strings.js";
|
|
36
36
|
import { hc, linkHubChatCss } from "./hub-chat-strings.js";
|
|
37
|
+
import { HubRoomRows, readRoomList } from "./hub-room-list.js";
|
|
38
|
+
import { useRoomStar } from "./hub-room-favorites.js";
|
|
39
|
+
import { HubRoomPage } from "./hub-room-thread.js";
|
|
40
|
+
import { hroom } from "./hub-room-strings.js";
|
|
37
41
|
import { hr } from "./hub-read-strings.js";
|
|
38
42
|
import { ho, linkHubOwnerCss } from "./hub-owner-strings.js";
|
|
39
43
|
import { hg } from "./hub-grant-strings.js";
|
|
@@ -49,8 +53,20 @@ register("hubAccess", {
|
|
|
49
53
|
const ha = key => t(`hubAccess.${key}`);
|
|
50
54
|
// Kept with the fresh renderer: retained owner dictionaries do not know this label.
|
|
51
55
|
register("hubGrantStatus", {
|
|
52
|
-
en: { grantNeverSignedIn: "Hasn't signed in to Hub yet" },
|
|
53
|
-
"zh-TW": { grantNeverSignedIn: "還沒登入過 Hub" },
|
|
56
|
+
en: { grantNeverSignedIn: "Hasn't signed in to Hub yet", grantADGroup: "AD group", grantSubjects: "People and groups allowed: {0}" },
|
|
57
|
+
"zh-TW": { grantNeverSignedIn: "還沒登入過 Hub", grantADGroup: "AD 群組", grantSubjects: "已允許的個人與群組:{0}" },
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// These words travel with the renderer; retained dictionaries need no new exports.
|
|
61
|
+
register("hubSharing", {
|
|
62
|
+
en: { pause: "Pause sharing", resume: "Resume sharing", paused: "Sharing paused", title: "Pause and resume sharing",
|
|
63
|
+
lead: "Stop new questions and keep the people and AD groups allowed to ask. Their expiry dates keep running while sharing is paused. A question already being handed to the Fleet may still start within a few seconds; work already in progress may finish.",
|
|
64
|
+
waiting: "Saving…", pausedChat: "The owner paused sharing {0}. New questions are stopped; a question already being handed to the Fleet may still start within a few seconds. You can still read this chat while your permission lasts. Sharing can resume; expiry dates keep running.",
|
|
65
|
+
},
|
|
66
|
+
"zh-TW": { pause: "暫停分享", resume: "繼續分享", paused: "分享已暫停", title: "暫停與繼續分享",
|
|
67
|
+
lead: "停止接受新提問,保留允許提問的個人與 AD 群組。暫停期間,授權的到期時間照常計算。已在傳送給 Fleet 的提問,可能仍會在幾秒內開始處理;已在處理的工作可能會完成。",
|
|
68
|
+
waiting: "儲存中…", pausedChat: "擁有者已暫停分享 {0}。不再接受新提問;已在傳送給 Fleet 的提問,可能仍會在幾秒內開始處理。權限有效期間,你仍可閱讀這段對話。之後可以繼續分享;授權的到期時間照常計算。",
|
|
69
|
+
},
|
|
54
70
|
});
|
|
55
71
|
|
|
56
72
|
// #3298 S-89 (experimental): the group permissions editor and the signed-in welcome are their own LAZY modules, loaded only
|
|
@@ -124,7 +140,8 @@ export function HubPanel({ route }) {
|
|
|
124
140
|
// The owner stylesheet holds the page column (.hub-owner, 860 px) every page with a column uses — Notices too (Argon #12).
|
|
125
141
|
useEffect(() => { linkHubCss(); linkHubOwnerCss(); if (tab === "ask") linkHubChatCss(); }, [tab]);
|
|
126
142
|
// 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")
|
|
143
|
+
const pageName = companyPage ? hj("title") : tab === "exposures" ? hc("mine") : tab === "admin" ? hc("admin") : view === "notices" ? hc("noticesTitle")
|
|
144
|
+
: view === "invitations" ? hroom("invitationsTitle") : hc("chats");
|
|
128
145
|
useEffect(() => { if (companyPage || !(tab === "ask" && roomParam()) && !(tab === "admin" && view === "groups")) setTitle(pageName); }, [tab, view, pageName, roomParam(), companyPage]);
|
|
129
146
|
let body = tab === "ask" ? roomParam() ? html`<${HubRoomLoading} />`
|
|
130
147
|
: html`<${PanelHeader} title=${hc("chats")} /><div class="hub-home"><${Skeleton} variant="rows" lines=${4} /></div>`
|
|
@@ -141,6 +158,10 @@ export function HubPanel({ route }) {
|
|
|
141
158
|
<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
159
|
${pairingNoticesOffered(s) ? html`<${PairingNotices} admin=${!!s.admin} empty=${directoryNoticesOffered(s, hubClient()) ? null : html`<${Empty} icon="bell" title=${hc("noNotices")} />`} />` : null}
|
|
143
160
|
${directoryNoticesOffered(s, hubClient()) ? html`<${DirectoryNotices} client=${hubClient()} />` : null}</div></div></div>`;
|
|
161
|
+
// M-3092: the owner's invitations (spec §8), a page of the chats like Notices.
|
|
162
|
+
if (s && tab === "ask" && view === "invitations" && roomsLive()) return html`<div data-effect-panel="hub" class="panel p-hub p-hub-invitations">
|
|
163
|
+
<${PanelHeader} title=${hroom("invitationsTitle")} /><div data-trust="panel-content" class="panel-body hub-page-body"><div class="col hub-owner">
|
|
164
|
+
<${LazyRoomPart} load=${() => import("./hub-invitations.js")} name="InvitationsList" props=${{ client: hubClient(), heading: false }} /></div></div></div>`;
|
|
144
165
|
// The chats draw their own header (the room's); the other pages keep the panel's.
|
|
145
166
|
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
167
|
// #3226 C: My shared agents and Administration are Settings-like pages. The panel's header names the page once, its scope
|
|
@@ -268,11 +289,13 @@ function useRead(read) {
|
|
|
268
289
|
/** The person's open rooms, as the list shows them: { loaded, rooms, error }; read on demand and every ROOMS_MS. */
|
|
269
290
|
export const ROOMS_MS = 30_000;
|
|
270
291
|
export function refreshRooms() {
|
|
271
|
-
|
|
292
|
+
// M-3092: the rooms list (docs/design/hub-rooms-split.md seam 1). A Hub without rooms yet answers today's chats in the
|
|
293
|
+
// same shape (kind "direct", `limited`, the old item under `legacy`: hub-client.js legacyRoom()).
|
|
294
|
+
return roomsReading ??= readRoomList(hubClient()).then((r) => {
|
|
272
295
|
// With group permissions on, a person whose groups don't include chatting is refused the list: that is their access, shown
|
|
273
296
|
// by the welcome, not a failure (Cairn #3372) — the list stays empty and quiet. Every chat action still asks the server.
|
|
274
297
|
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) });
|
|
298
|
+
else roomsStore.set(r.ok ? { loaded: true, rooms: r.rooms || [], me: r.me || null, invitations: Number(r.invitations) || 0, error: null } : { ...roomsStore.get(), loaded: true, error: errText(r) });
|
|
276
299
|
}, () => roomsStore.set({ ...roomsStore.get(), loaded: true, error: hw("errFailed") })).finally(() => { roomsReading = null; });
|
|
277
300
|
}
|
|
278
301
|
/** Keeps the list fresh while something shows it (every ROOMS_MS, paused while the page is hidden). */
|
|
@@ -285,22 +308,21 @@ function useRooms() {
|
|
|
285
308
|
}, []);
|
|
286
309
|
return rs;
|
|
287
310
|
}
|
|
288
|
-
|
|
311
|
+
// A room's id as the list gives it (today's are UUIDs; a Hub with rooms may name them otherwise): matched against the list
|
|
312
|
+
// and encoded into each call, never trusted as anything else.
|
|
313
|
+
const roomParam = () => { try { const v = new URLSearchParams(location.search).get("room"); return v && /^[A-Za-z0-9-]{1,64}$/.test(v) ? v : null; } catch { return null; } };
|
|
289
314
|
const roomPath = (id) => `/ui/hub?room=${encodeURIComponent(id)}`;
|
|
290
315
|
/** cid-hub-shell-parity: the Notices page is /ui/hub?view=notices (the path every Hub listener and router already serves). */
|
|
291
316
|
const viewParam = () => { try { return new URLSearchParams(location.search).get("view"); } catch { return null; } };
|
|
292
317
|
export const NOTICES_PATH = "/ui/hub?view=notices";
|
|
318
|
+
/** M-3092: the owner's invitations (spec §8). */
|
|
319
|
+
export const INVITATIONS_PATH = "/ui/hub?view=invitations";
|
|
293
320
|
const pairingNoticesOffered = (s) => !!s && Array.isArray(s.features) && s.features.includes("quick-pairing-v1") && !!hubClient().quickPairingV1;
|
|
294
321
|
const noticesOffered = s => pairingNoticesOffered(s) || directoryNoticesOffered(s, hubClient());
|
|
295
322
|
const initial = (name) => (String(name || "?").trim()[0] || "?").toUpperCase();
|
|
296
323
|
const AV_TONES = 6;
|
|
297
324
|
const tone = (name) => { let h = 0; for (const c of String(name || "")) h = (h * 31 + c.codePointAt(0)) >>> 0; return h % AV_TONES; };
|
|
298
325
|
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
326
|
const dateOnly = (ms) => new Date(ms).toLocaleDateString(undefined, { year: "numeric", month: "long", day: "numeric" });
|
|
305
327
|
function daysLeft(ms) {
|
|
306
328
|
const d = Math.ceil((ms - Date.now()) / 86_400_000);
|
|
@@ -313,10 +335,11 @@ export function HubNav({ onPick } = {}) {
|
|
|
313
335
|
const rs = useRooms();
|
|
314
336
|
const [q, setQ] = useState("");
|
|
315
337
|
const [picking, setPicking] = useState(false);
|
|
338
|
+
const star = useRoomStar(rs.rooms, s?.login);
|
|
316
339
|
useEffect(() => { linkHubChatCss(); }, []);
|
|
317
340
|
if (!s) return null;
|
|
318
341
|
const current = roomParam();
|
|
319
|
-
const shown = rs.rooms.filter((r) => !q.trim() ||
|
|
342
|
+
const shown = rs.rooms.filter((r) => !q.trim() || [r.name, r.agent?.owner?.name, r.lastText].some((v) => String(v || "").toLowerCase().includes(q.trim().toLowerCase())));
|
|
320
343
|
const pick = (e, r) => { if (onPick) onPick(); if (e && (e.metaKey || e.ctrlKey)) return; e && e.preventDefault(); navigate(roomPath(r.id)); };
|
|
321
344
|
return html`<div class="hub-nav">
|
|
322
345
|
<button type="button" class="btn hub-new" onClick=${() => setPicking(true)}><${Icon} name="plus" size=${16} />${hc("newChat")}</button>
|
|
@@ -327,12 +350,7 @@ export function HubNav({ onPick } = {}) {
|
|
|
327
350
|
${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : null}
|
|
328
351
|
${rs.loaded && !rs.error && !rs.denied && !rs.rooms.length ? html`<p class="note hub-list-empty">${hc("noChats")}</p>` : null}
|
|
329
352
|
${rs.rooms.length && !shown.length ? html`<p class="note hub-list-empty">${hc("noMatch")}</p>` : null}
|
|
330
|
-
<
|
|
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>
|
|
353
|
+
<div class="view-roster inst-nav hub-side-rooms"><${HubRoomRows} rooms=${rs.rooms} q=${q} current=${current} href=${(r) => roomPath(r.id)} onGo=${pick} star=${star} /></div>
|
|
336
354
|
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}
|
|
337
355
|
</div>`;
|
|
338
356
|
}
|
|
@@ -351,7 +369,7 @@ export function HubSide({ onPick } = {}) {
|
|
|
351
369
|
const { route } = useStore(navStore);
|
|
352
370
|
const [q, setQ] = useState("");
|
|
353
371
|
const [filtering, setFiltering] = useState(false);
|
|
354
|
-
const [picking, setPicking] = useState(false);
|
|
372
|
+
const [picking, setPicking] = useState(false), [newRoom, setNewRoom] = useState(false);
|
|
355
373
|
const filter = useRef(null);
|
|
356
374
|
useEffect(() => { linkHubChatCss(); }, []);
|
|
357
375
|
const openFilter = () => { setFiltering(true); setTimeout(() => filter.current?.focus(), 0); };
|
|
@@ -368,7 +386,7 @@ export function HubSide({ onPick } = {}) {
|
|
|
368
386
|
if (!s) return null;
|
|
369
387
|
const tab = route && route.panel === "hub" ? route.tab : "ask";
|
|
370
388
|
const view = viewParam();
|
|
371
|
-
const here = (key) => key === "notices" ? tab === "ask" && view ===
|
|
389
|
+
const here = (key) => key === "notices" || key === "invitations" ? tab === "ask" && view === key : key === "ask" ? tab === "ask" && view !== "notices" && view !== "invitations" : tab === key;
|
|
372
390
|
const go = (e, href) => { if (onPick) onPick(); if (e && (e.metaKey || e.ctrlKey)) return; e && e.preventDefault(); navigate(href); };
|
|
373
391
|
const row = (key, href, icon, label) => html`<a class=${`side-row${here(key) ? " active" : ""}`} href=${href} aria-current=${here(key) ? "page" : undefined}
|
|
374
392
|
onClick=${(e) => go(e, href)}><${Icon} name=${icon} /><span class="grow">${label}</span></a>`;
|
|
@@ -379,12 +397,18 @@ export function HubSide({ onPick } = {}) {
|
|
|
379
397
|
${row("exposures", "/ui/hub/exposures", "globe", hc("mine"))}
|
|
380
398
|
${s.admin ? row("admin", "/ui/hub/admin", "key", hc("admin")) : null}
|
|
381
399
|
${noticesOffered(s) ? row("notices", NOTICES_PATH, "bell", hc("notices")) : null}
|
|
400
|
+
${roomsLive() && rs.invitations > 0 ? html`<a class=${`side-row${here("invitations") ? " active" : ""}`} href=${INVITATIONS_PATH} aria-current=${here("invitations") ? "page" : undefined}
|
|
401
|
+
onClick=${(e) => go(e, INVITATIONS_PATH)}><${Icon} name="inbox" /><span class="grow">${hroom("invitationsTitle")}</span><span class="nav-count" title=${hroom("invitationsN", String(rs.invitations))}>${rs.invitations}</span></a>` : null}
|
|
382
402
|
<button type="button" class="side-row side-search" onClick=${openFilter} title=${`${hc("search")} (${searchShortcut()})`}
|
|
383
403
|
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
404
|
<button type="button" class="side-row side-new" onClick=${() => setPicking(true)}><${Icon} name="plus" /><span class="grow">${hc("newChat")}</span></button>
|
|
405
|
+
${roomsLive() && rs.me?.canCreateRooms ? html`<button type="button" class="side-row side-new hub-new-room" onClick=${() => setNewRoom(true)}><${Icon} name="room" /><span class="grow">${hroom("newRoomTitle")}</span></button>` : null}
|
|
385
406
|
</nav>
|
|
407
|
+
|
|
386
408
|
<${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}
|
|
409
|
+
${picking ? html`<${NewChatDialog} onClose=${() => setPicking(false)} />` : null}
|
|
410
|
+
${newRoom ? html`<${LazyRoomPart} load=${() => import("./hub-room-new.js")} name="NewRoomDialog" props=${{ client: hubClient(), assistant: !!rs.me?.assistant,
|
|
411
|
+
onClose: () => setNewRoom(false), onOpenRoom: (id) => { setNewRoom(false); void refreshRooms(); navigate(roomPath(id)); } }} />` : null}`;
|
|
388
412
|
}
|
|
389
413
|
|
|
390
414
|
/**
|
|
@@ -394,24 +418,20 @@ export function HubSide({ onPick } = {}) {
|
|
|
394
418
|
*/
|
|
395
419
|
function HubRoomList({ rs, q, setQ, filtering, setFiltering, filterRef, onPick, quietEmpty = false, onNew = null }) {
|
|
396
420
|
const current = roomParam();
|
|
421
|
+
const star = useRoomStar(rs.rooms, useSession()?.login); // S-145: favourites, as the Fleet sidebar's
|
|
397
422
|
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() ||
|
|
423
|
+
const shown = rs.rooms.filter((r) => !q.trim() || [r.name, r.agent?.owner?.name, r.lastText].some((v) => String(v || "").toLowerCase().includes(q.trim().toLowerCase())));
|
|
399
424
|
const always = !!onNew; // the home page's list: its filter is always there (when there's a list to filter)
|
|
400
425
|
return html`<div class="view-roster inst-nav hub-side-rooms"><div data-trust="navigation" class="side-section">
|
|
401
426
|
${onNew ? html`<button type="button" class="side-row side-new" onClick=${onNew}><${Icon} name="plus" /><span class="grow">${hc("newChat")}</span></button>` : null}
|
|
402
|
-
|
|
427
|
+
${!rs.rooms.length ? html`<div class="inst-head"><h2 class="side-label">${hc("chats")}</h2></div>` : null}
|
|
403
428
|
${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
429
|
onInput=${(e) => setQ(e.target.value)} onKeyDown=${(e) => { if (e.key === "Escape") { setQ(""); setFiltering(false); } }} /></label>` : null}
|
|
405
430
|
${rs.error ? html`<${ErrorState} message=${rs.error} onRetry=${refreshRooms} />` : null}
|
|
406
431
|
${!rs.loaded ? html`<${Skeleton} variant="rows" lines=${4} />` : null}
|
|
407
432
|
${rs.loaded && !rs.error && !rs.denied && !rs.rooms.length && !quietEmpty ? html`<p class="side-empty muted">${hc("noChats")}</p>` : null}
|
|
408
433
|
${rs.rooms.length && !shown.length ? html`<p class="side-empty muted">${hc("noMatch")}</p>` : null}
|
|
409
|
-
|
|
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>
|
|
434
|
+
<${HubRoomRows} rooms=${rs.rooms} q=${q} current=${current} href=${(r) => roomPath(r.id)} onGo=${(e, r) => go(e, roomPath(r.id))} star=${star} />
|
|
415
435
|
</div></div>`;
|
|
416
436
|
}
|
|
417
437
|
|
|
@@ -463,7 +483,7 @@ function NewChatDialog({ onClose }) {
|
|
|
463
483
|
};
|
|
464
484
|
const all = cat && cat.askable ? cat.askable : [];
|
|
465
485
|
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 &&
|
|
486
|
+
const hasRoom = (it) => rs.rooms.some((r) => { const o = r.legacy || r; return o.exposureId === it.exposure.id && o.grantId === it.grant.id; });
|
|
467
487
|
return html`<${Dialog} title=${hc("pickTitle")} onClose=${onClose}>
|
|
468
488
|
<div class="hub-pick">
|
|
469
489
|
<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>
|
|
@@ -489,7 +509,13 @@ function HubChats() {
|
|
|
489
509
|
const [picking, setPicking] = useState(false);
|
|
490
510
|
useEffect(() => { linkHubChatCss(); }, []);
|
|
491
511
|
const id = roomParam();
|
|
492
|
-
|
|
512
|
+
// Today's chats (the list's `legacy` item) open the room view they always had; a room of a Hub with rooms opens the
|
|
513
|
+
// shared thread (M-3092 PR 2).
|
|
514
|
+
const listed = id ? rs.rooms.find((r) => r.id === id) : null;
|
|
515
|
+
const room = id ? (listed ? listed.legacy || listed : rs.loaded ? { id, exposureName: "", ownerName: "", features: [] } : null) : null;
|
|
516
|
+
// A room of a Hub with rooms: the shared thread with the room's store, composer and members panel (hub-room-thread.js).
|
|
517
|
+
if (id && listed && !listed.legacy) return html`<${HubRoomPage} key=${id} roomId=${id} listed=${listed} Thread=${HubThread} client=${hubClient()}
|
|
518
|
+
rooms=${rs.rooms} openRoom=${(rid) => navigate(roomPath(rid))} />`;
|
|
493
519
|
if (id && room) return html`<${HubRoomView} key=${id} room=${room} />`;
|
|
494
520
|
if (id) return html`<${HubRoomLoading} error=${rs.error} />`;
|
|
495
521
|
return html`<${PanelHeader} title=${hc("chats")} />
|
|
@@ -545,7 +571,7 @@ function HubRoomView({ room: given }) {
|
|
|
545
571
|
const waiting = store.entries().some((e) => ["queued", "delivered", "consumed"].includes(e.receipt && e.receipt.stage));
|
|
546
572
|
if (was !== null && waiting !== was) {
|
|
547
573
|
// 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)) }));
|
|
574
|
+
roomsStore.set((rs) => ({ ...rs, rooms: rs.rooms.map((r) => (r.id === given.id ? (r.legacy ? { ...r, legacy: { ...r.legacy, waiting } } : { ...r, waiting }) : r)) }));
|
|
549
575
|
void refreshRooms();
|
|
550
576
|
}
|
|
551
577
|
was = waiting;
|
|
@@ -594,7 +620,8 @@ function HubRoomView({ room: given }) {
|
|
|
594
620
|
useEffect(() => {
|
|
595
621
|
if (!denied) setMsg(current => current === errText({ code: "denied" }) ? null : current);
|
|
596
622
|
}, [denied]);
|
|
597
|
-
const
|
|
623
|
+
const paused = !closed && room.exposureState === "paused";
|
|
624
|
+
const frozen = !closed && (room.exposureState === "frozen" || paused);
|
|
598
625
|
const working = store.working();
|
|
599
626
|
const name = room.exposureName || "";
|
|
600
627
|
const client = hubClient();
|
|
@@ -611,7 +638,7 @@ function HubRoomView({ room: given }) {
|
|
|
611
638
|
setSending(true); setMsg(null);
|
|
612
639
|
const r = await store.send(q, chosen.length ? { files: chosen.map((f) => f.id) } : {});
|
|
613
640
|
setSending(false);
|
|
614
|
-
if (!r.ok) { setMsg(errText(r)); return; }
|
|
641
|
+
if (!r.ok) { setMsg(r.code === "sharing-paused" ? null : errText(r)); return; }
|
|
615
642
|
// Only the files this question carried; ones chosen while it was on its way stay for the next.
|
|
616
643
|
const sent = new Set(chosen.map((f) => f.key));
|
|
617
644
|
setDraft(""); setFiles(filesRef.current.filter((f) => !sent.has(f.key))); refreshRooms();
|
|
@@ -629,7 +656,7 @@ function HubRoomView({ room: given }) {
|
|
|
629
656
|
if (panelOpen) { closePanel(); setRail(true); setRailPref(true); return; }
|
|
630
657
|
setRail((v) => { setRailPref(!v); return !v; });
|
|
631
658
|
};
|
|
632
|
-
const tag = closed ? html`<span class="tag danger">${hc("tagClosed")}</span>` : frozen ? html`<span class="tag warn">${hc("tagFrozen")}</span>`
|
|
659
|
+
const tag = closed ? html`<span class="tag danger">${hc("tagClosed")}</span>` : frozen ? html`<span class="tag warn">${paused ? t("hubSharing.paused") : hc("tagFrozen")}</span>`
|
|
633
660
|
: denied ? html`<span class="tag warn">${ha("tag")}</span>` : html`<${QuotaChip} room=${room} fallback=${html`<span class="tag ok">${hc("tagCanAsk")}</span>`} />`;
|
|
634
661
|
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
662
|
const info = html`<${HubRoomInfo} room=${room} closed=${closed} denied=${denied} />`;
|
|
@@ -645,7 +672,7 @@ function HubRoomView({ room: given }) {
|
|
|
645
672
|
<${HubThread} store=${store} name=${name} panelKey=${panelKey} threadRef=${threadRef} />
|
|
646
673
|
<div class="dock hub-dock" data-trust="composer"><div class="dock-col">
|
|
647
674
|
${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}
|
|
675
|
+
${frozen ? html`<p class="hub-banner warn" role="status">${paused ? t("hubSharing.pausedChat", name) : hc("frozen", name)}</p>` : null}
|
|
649
676
|
${!closed ? html`<${QuotaBanner} room=${room} />` : null}
|
|
650
677
|
${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
678
|
${working ? html`<${HubWorkBar} name=${name} since=${working.since} />` : null}
|
|
@@ -676,7 +703,7 @@ function HubWorkBar({ name, since }) {
|
|
|
676
703
|
}
|
|
677
704
|
|
|
678
705
|
/** The thread: the fleet chat's own (createThread), fed by the room's store. */
|
|
679
|
-
function HubThread({ store, name, panelKey, threadRef }) {
|
|
706
|
+
function HubThread({ store, name, panelKey, threadRef, extra = null, emptyView = null }) {
|
|
680
707
|
const scroller = useRef(null), host = useRef(null);
|
|
681
708
|
const [jump, setJump] = useState({ show: false, unseen: 0 });
|
|
682
709
|
const [empty, setEmpty] = useState(false);
|
|
@@ -697,6 +724,8 @@ function HubThread({ store, name, panelKey, threadRef }) {
|
|
|
697
724
|
replyButtonBusy: (id) => store.busy(id), pollMine: (id) => store.mine(id), serverNow: () => Date.now(),
|
|
698
725
|
retryOutgoing: () => {}, deleteOutgoing: () => {}, putBackOutgoing: () => {}, startReply: () => {}, findQuoted: () => null,
|
|
699
726
|
emojis: () => false, mentions: () => null,
|
|
727
|
+
// M-3092: a room of a Hub with rooms (hub-room-thread.js) says whose messages are mine, and replies and quotes.
|
|
728
|
+
...(extra || {}),
|
|
700
729
|
});
|
|
701
730
|
th.current = thread;
|
|
702
731
|
if (threadRef) threadRef.current = thread;
|
|
@@ -723,7 +752,8 @@ function HubThread({ store, name, panelKey, threadRef }) {
|
|
|
723
752
|
${!loaded && !store.error() && !store.closed() ? html`<${Skeleton} variant="rows" lines=${5} />` : null}
|
|
724
753
|
${store.error() === "backpressure" ? html`<p class="hub-banner warn" role="status">${hr("busy")}</p>`
|
|
725
754
|
: !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"
|
|
755
|
+
${empty && loaded && !store.closed() && emptyView ? html`<div class="center hub-room-empty">${emptyView}</div>` : null}
|
|
756
|
+
${empty && loaded && !store.closed() && !emptyView ? 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
757
|
<div class="jump-dock">${jump.show ? html`<button data-trust="thread-control" type="button" class="jump-latest" onClick=${() => th.current && th.current.jumpLatest()}>
|
|
728
758
|
<${Icon} name="down" size=${16} />${jump.unseen > 0 ? t("chat.newBelow", jump.unseen) : t("chat.jumpLatest")}</button>` : null}</div>
|
|
729
759
|
</div>`;
|
|
@@ -754,8 +784,10 @@ function HubRoomInfo({ room, closed = false, denied = false }) {
|
|
|
754
784
|
// rows), a destructive step behind a row's menu and a confirmation ──
|
|
755
785
|
const DAYS_LEFT = (ms) => daysLeft(ms);
|
|
756
786
|
const stateTag = (state) => state === "published" ? html`<span class="tag ok">${ho("stateShared")}</span>`
|
|
787
|
+
: state === "paused" ? html`<span class="tag warn">${t("hubSharing.paused")}</span>`
|
|
757
788
|
: state === "frozen" ? html`<span class="tag warn">${ho("statePaused")}</span>` : html`<span class="tag">${ho("stateWithdrawn")}</span>`;
|
|
758
789
|
const mayAsk = (n) => (n === 0 ? ho("mayAskNone") : n === 1 ? ho("mayAskOne") : ho("mayAsk", n));
|
|
790
|
+
const grantSummary = (grants = []) => grants.some(g => g.subject?.kind === "group") ? t("hubGrantStatus.grantSubjects", grants.length) : mayAsk(grants.length);
|
|
759
791
|
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
792
|
|
|
761
793
|
/**
|
|
@@ -774,7 +806,13 @@ function HubMine() {
|
|
|
774
806
|
const [cat, reload] = useRead(() => hubClient().catalog());
|
|
775
807
|
const [pairings, reloadPairings] = useRead(() => hubClient().pairings());
|
|
776
808
|
const [msg, setMsg] = useState(null);
|
|
777
|
-
useEffect(() => {
|
|
809
|
+
useEffect(() => {
|
|
810
|
+
linkHubChatCss(); linkHubOwnerCss();
|
|
811
|
+
if (!document.querySelector('link[data-hub-sharing-css="1"]')) {
|
|
812
|
+
const link = document.createElement("link"); link.rel = "stylesheet"; link.href = "/assets/hub-sharing.css";
|
|
813
|
+
link.setAttribute("data-hub-sharing-css", "1"); document.head.appendChild(link);
|
|
814
|
+
}
|
|
815
|
+
}, []);
|
|
778
816
|
const act = async (fn, after = reload, refused = (r) => setMsg(errText(r))) => {
|
|
779
817
|
setMsg(null);
|
|
780
818
|
const r = await fn();
|
|
@@ -795,6 +833,7 @@ function HubMine() {
|
|
|
795
833
|
// Nothing shared yet: the empty state below says where to share from, so the lead doesn't say it too (Argon #20).
|
|
796
834
|
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
835
|
<div class="s-section-layout">
|
|
836
|
+
${roomsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-invitations.js")} name="InvitationsList" props=${{ client: hubClient(), heading: true }} />` : null}
|
|
798
837
|
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
799
838
|
${!pairings ? html`<${Skeleton} lines=${2} />` : pairings.error ? html`<${ErrorState} message=${pairings.error} onRetry=${reloadPairings} />` : null}
|
|
800
839
|
${pend.length ? html`<section class="card hub-pairings"><h3>${ho("pendingPairings")}</h3><p class="note">${ho("pendingLead")}</p>
|
|
@@ -806,13 +845,23 @@ function HubMine() {
|
|
|
806
845
|
${cat && !cat.error && !mine.length ? html`<div class="center hub-empty"><${Empty} icon="globe" title=${hw("exposuresEmpty")} hint=${hw("exposuresHint")} /></div>` : null}
|
|
807
846
|
${mine.length ? html`<section class="card hub-shared"><h3>${ho("sharedCount", mine.length)}</h3>
|
|
808
847
|
<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">${
|
|
848
|
+
<${Avatar} name=${e.displayName} /><span class="hub-row-text"><strong>${e.displayName}</strong><small class="note">${grantSummary(e.grants)}</small></span>
|
|
810
849
|
${stateTag(e.state)}<${Icon} name="next" size=${16} /></a>`)}</div></section>` : null}
|
|
811
850
|
</div></div>`;
|
|
812
851
|
}
|
|
813
852
|
|
|
814
853
|
/** One shared agent: who may ask (allow, revoke), whether askers see its quota (G), who asked lately, pause. */
|
|
815
854
|
function HubAgentPage({ x, act, msg }) {
|
|
855
|
+
const session = useSession(), client = hubClient();
|
|
856
|
+
const resumable = session?.features?.includes("sharing-pause-v1") && client?.sharingPauseV1 === true && typeof client.sharing === "function";
|
|
857
|
+
const [sharingBusy, setSharingBusy] = useState(false);
|
|
858
|
+
// M-3092: how many rooms this agent is in — reported by its 「在這些房間裡」 section's own read (one read, no second count).
|
|
859
|
+
const [roomCount, setRoomCount] = useState(null);
|
|
860
|
+
const sharing = async () => {
|
|
861
|
+
if (sharingBusy) return; setSharingBusy(true);
|
|
862
|
+
try { await act(() => client.sharing(x.id, x.revision, x.sharingEpoch ?? 0, x.state !== "paused")); }
|
|
863
|
+
finally { setSharingBusy(false); }
|
|
864
|
+
};
|
|
816
865
|
// #3338: this page is reached only through catalog.mine; the link opens a form, never a grant.
|
|
817
866
|
// Read the closed intent once on this keyed agent page, so cancel/save/reloads never reopen it.
|
|
818
867
|
const [allowing, setAllowing] = useState(() => x.state === "published" && new URLSearchParams(location.search).get("grant") === "1");
|
|
@@ -831,16 +880,19 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
831
880
|
const acts = activity && activity.activity ? activity.activity : [];
|
|
832
881
|
return html`<div class="col hub-owner">
|
|
833
882
|
<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=${
|
|
883
|
+
<${PageHead} title=${x.displayName} scope=${stateTag(x.state)} lead=${!grants.length && roomCount > 0
|
|
884
|
+
? `${hroom("agentNoOneToOne")} · ${roomCount === 1 ? hroom("inRoomsOne") : hroom("inRoomsMany", String(roomCount))}` : grantSummary(grants)} />
|
|
835
885
|
<div class="s-section-layout">
|
|
836
886
|
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
837
887
|
<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
888
|
${grants.length ? html`<div class="hub-rows">${grants.map((g) => html`<div key=${g.id} class="s-row hub-row">
|
|
839
889
|
<${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>
|
|
890
|
+
<span class="hub-row-text"><strong>${g.subjectName || g.subjectLogin}</strong><small class="note">${g.subjectLogin ? html`<code>${g.subjectLogin}</code> · ` : null}${ho("untilLeft", dateOnly(g.expiresAt), DAYS_LEFT(g.expiresAt))}</small>${g.subject?.kind === "group" ? html`<small class="tag">${t("hubGrantStatus.grantADGroup")}</small>` : g.subjectSignedIn === false ? html`<small class="tag warn">${t("hubGrantStatus.grantNeverSignedIn")}</small>` : null}</span>
|
|
841
891
|
<${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>`}
|
|
892
|
+
</div>`)}</div>` : html`<p class="note">${roomCount > 0 ? hroom("agentNoOneToOne") : hw("noGrants")}</p>`}
|
|
893
|
+
${roomCount > 0 ? html`<p class="note hub-rooms-can-ask">${hroom("roomsCanAskIt")}</p>` : null}
|
|
843
894
|
</section>
|
|
895
|
+
${roomsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-invitations.js")} name="AgentRoomsSection" props=${{ client: hubClient(), exposureId: x.id, onRooms: setRoomCount }} />` : null}
|
|
844
896
|
<${QuotaVisibilityRow} exposure=${x} onSaved=${() => act(async () => ({ ok: true }))} />
|
|
845
897
|
<section class="card"><h3>${ho("recent")}</h3><p class="note">${ho("recentLead")}</p>
|
|
846
898
|
${!activity ? html`<${Skeleton} variant="rows" lines=${3} />` : activity.error ? html`<${ErrorState} message=${activity.error} onRetry=${reloadActivity} />` : null}
|
|
@@ -850,7 +902,9 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
850
902
|
</div>`)}</div>` : null}
|
|
851
903
|
<div class="field-row"><button type="button" class="btn btn-sm btn-ghost" onClick=${reloadActivity}>${ho("refresh")}</button></div>
|
|
852
904
|
</section>
|
|
853
|
-
${shared ? html`<section class="card hub-
|
|
905
|
+
${resumable && (shared || x.state === "paused") ? html`<section class="card hub-sharing-control"><h3>${t("hubSharing.title")}</h3><p class="note">${t("hubSharing.lead")}</p>
|
|
906
|
+
<div class="field-row"><button type="button" class="btn btn-sm btn-primary" disabled=${sharingBusy} onClick=${sharing}>${t(sharingBusy ? "hubSharing.waiting" : x.state === "paused" ? "hubSharing.resume" : "hubSharing.pause")}</button></div></section>` : null}
|
|
907
|
+
${shared || x.state === "paused" ? html`<section class="card hub-danger"><h3>${ho("pauseTitle")}</h3><p class="note">${ho("pauseLead")}</p>
|
|
854
908
|
<div class="field-row"><button type="button" class="btn btn-sm btn-danger" onClick=${freeze}>${ho("pauseGo")}</button></div></section>` : null}
|
|
855
909
|
</div>
|
|
856
910
|
${allowing && shared ? html`<${AllowDialog} x=${x} act=${act} onClose=${() => setAllowing(false)} />` : null}
|
|
@@ -858,6 +912,19 @@ function HubAgentPage({ x, act, msg }) {
|
|
|
858
912
|
}
|
|
859
913
|
|
|
860
914
|
function AllowDialog({ x, act, onClose }) {
|
|
915
|
+
const s = useSession(), client = hubClient(), marked = s?.features?.includes("grant-subjects-v1") && client?.grantSubjectsV1 === true && typeof client.searchGrantSubjects === "function";
|
|
916
|
+
const [Picker, setPicker] = useState(null), [failed, setFailed] = useState(false);
|
|
917
|
+
useEffect(() => {
|
|
918
|
+
if (!marked) return; let live = true;
|
|
919
|
+
import("./hub-grant-picker.js").then(m => { if (live) { if (typeof m.HubGrantPicker === "function") setPicker(() => m.HubGrantPicker); else setFailed(true); } })
|
|
920
|
+
.catch(() => { if (live) setFailed(true); });
|
|
921
|
+
return () => { live = false; };
|
|
922
|
+
}, [marked]);
|
|
923
|
+
if (!marked || failed) return html`<${LegacyAllowDialog} x=${x} act=${act} onClose=${onClose} />`;
|
|
924
|
+
if (Picker) return html`<${Picker} x=${x} client=${client} act=${act} onClose=${onClose} />`;
|
|
925
|
+
return html`<${Dialog} title=${ho("allowTitle", x.displayName)} onClose=${onClose}><${Skeleton} rows=${2} /></${Dialog}>`;
|
|
926
|
+
}
|
|
927
|
+
function LegacyAllowDialog({ x, act, onClose }) {
|
|
861
928
|
const [form, setForm] = useState({ login: "", days: 7 });
|
|
862
929
|
const [busy, setBusy] = useState(false);
|
|
863
930
|
const [error, setError] = useState(null);
|
|
@@ -902,11 +969,26 @@ function LazyDirectory({ session }) {
|
|
|
902
969
|
return Page ? html`<${Page} client=${hubClient()} offered=${true} login=${session.login} afterSave=${async () => !!(await readSession())} />` : null;
|
|
903
970
|
}
|
|
904
971
|
/** M-2682: Administration → This Hub, its own lazy module (an older server doesn't serve it: then it's left out). */
|
|
972
|
+
/**
|
|
973
|
+
* M-3092: one of the Hub rooms' own screens (dev-claude2's modules: new room, invitations, administration → rooms), loaded
|
|
974
|
+
* when first shown; nothing while it loads or if this Hub does not serve it.
|
|
975
|
+
*/
|
|
976
|
+
function LazyRoomPart({ load, name, props = {} }) {
|
|
977
|
+
const [C, setC] = useState(null);
|
|
978
|
+
useEffect(() => { let live = true; load().then((m) => { if (live && typeof m[name] === "function") setC(() => m[name]); }, () => {}); return () => { live = false; }; }, []);
|
|
979
|
+
return C ? html`<${C} ...${props} />` : null;
|
|
980
|
+
}
|
|
981
|
+
const roomsLive = () => { const c = hubClient(); return typeof c.roomsLive === "function" && c.roomsLive() === true; };
|
|
905
982
|
function LazyThisHub({ directory }) {
|
|
906
983
|
const [C, setC] = useState(null);
|
|
907
984
|
useEffect(() => { let live = true; import("./hub-this-hub.js").then((m) => { if (live) setC(() => m.ThisHubCard); }, () => {}); return () => { live = false; }; }, []);
|
|
908
985
|
return C ? html`<${C} directory=${directory} />` : null;
|
|
909
986
|
}
|
|
987
|
+
function LazyAssistantAdmin() {
|
|
988
|
+
const [C, setC] = useState(null);
|
|
989
|
+
useEffect(() => { let live = true; import("./hub-assistant-admin.js").then(m => { if (live) setC(() => m.HubAssistantAdmin); }, () => {}); return () => { live = false; }; }, []);
|
|
990
|
+
return C ? html`<${C} client=${hubClient()} />` : null;
|
|
991
|
+
}
|
|
910
992
|
/** #3298 S-89: Administration's sub-page (?view=groups: Group permissions), from the page's own address. */
|
|
911
993
|
function adminView() { try { return new URLSearchParams(location.search).get("view") || ""; } catch { return ""; } }
|
|
912
994
|
/** #3298 S-89: the prominent entry to Group permissions at the top of Administration (discovery without docs). */
|
|
@@ -914,6 +996,7 @@ function GroupPermissionsEntry() {
|
|
|
914
996
|
return html`<${LazyGroups} pick=${(m) => m.GroupPermissionsCard} props=${{}} />`;
|
|
915
997
|
}
|
|
916
998
|
function HubAdminPage({ groups = false, companyJoin = false, directory = false } = {}) {
|
|
999
|
+
const assistantSession = useSession();
|
|
917
1000
|
const [view, reload] = useRead(() => hubClient().adminOverview());
|
|
918
1001
|
const [login, setLogin] = useState("");
|
|
919
1002
|
const [offer, setOffer] = useState(null);
|
|
@@ -957,8 +1040,26 @@ function HubAdminPage({ groups = false, companyJoin = false, directory = false }
|
|
|
957
1040
|
<div class="s-section-layout">
|
|
958
1041
|
${groups && !accessEntry ? html`<${GroupPermissionsEntry} />` : null}
|
|
959
1042
|
${companyJoin ? html`<${CompanyJoinAdminCard} entry=${accessEntry} groups=${groups} />` : null}
|
|
1043
|
+
${/* Lumen's order: Let colleagues join → Rooms → Room assistant → Connected fleets → pairing. */ ""}
|
|
1044
|
+
${roomsLive() ? html`<${LazyRoomPart} load=${() => import("./hub-admin-rooms.js")} name="AdminRooms" props=${{ client: hubClient() }} />` : null}
|
|
1045
|
+
${assistantSession?.features?.includes("room-assistant-v1") && hubClient().assistantAdminV1 === true ? html`<${LazyAssistantAdmin} />` : null}
|
|
960
1046
|
${view.error ? html`<${ErrorState} message=${view.error} onRetry=${reload} />` : null}
|
|
961
1047
|
${msg ? html`<p class="err" role="alert">${msg}</p>` : null}
|
|
1048
|
+
<section class="card hub-fleet-list"><h3>${ho("pairedFleets", fleets.filter((f) => f.status !== "revoked").length)}</h3>
|
|
1049
|
+
${fleets.length ? (() => {
|
|
1050
|
+
// Spec 1.2: the row's title is the Fleet's label (S1 overview), its subtitle the owner; active first, revoked folded.
|
|
1051
|
+
const row = (f) => html`<div key=${f.id} class="s-row hub-row" data-fleet=${f.id}>
|
|
1052
|
+
<${Avatar} name=${f.owner ? f.owner.name : "?"} size="sm" />
|
|
1053
|
+
<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>
|
|
1054
|
+
${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) }]} />`
|
|
1055
|
+
: html`<span class="tag">${ho("revokedTag")}</span>`}
|
|
1056
|
+
</div>`;
|
|
1057
|
+
const current = fleets.filter((f) => f.status !== "revoked").sort((a, b) => (a.status === "active" ? 0 : 1) - (b.status === "active" ? 0 : 1));
|
|
1058
|
+
const revoked = fleets.filter((f) => f.status === "revoked");
|
|
1059
|
+
return html`${current.length ? html`<div class="hub-rows">${current.map(row)}</div>` : html`<p class="note">${ho("noFleets")}</p>`}
|
|
1060
|
+
${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}`;
|
|
1061
|
+
})() : html`<p class="note">${ho("noFleets")}</p>`}
|
|
1062
|
+
</section>
|
|
962
1063
|
<${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
1064
|
<ol class="hub-steps">
|
|
964
1065
|
<li class=${offer || pairings.length ? "done" : "now"}><div class="hub-step-body"><span><b>${ho("stepCode")}</b><small class="note">${ho("stepCodeHint")}</small></span>
|
|
@@ -980,21 +1081,6 @@ function HubAdminPage({ groups = false, companyJoin = false, directory = false }
|
|
|
980
1081
|
: html`<span class="tag warn">${ho("waitingOwner")}</span>`}
|
|
981
1082
|
</div>`)}</div>` : null}
|
|
982
1083
|
</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
1084
|
<${LazyThisHub} directory=${directory} />
|
|
999
1085
|
</div></div>`;
|
|
1000
1086
|
}
|
package/dist/ui/panel-needs.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { modelSwitchText } from "/assets/model-observation.js";
|
|
1
2
|
// #1408 step 4 = #1386 part (b): the "Needs you" panel (/ui/needs) — everything waiting on the person, from every
|
|
2
3
|
// world, in one list. Behind the session gate (/ui/js/), loaded the first time it is opened.
|
|
3
4
|
//
|
|
@@ -140,6 +141,7 @@ const BAD = new Set(["crashed", "delivery_failed", "hang", "exited"]);
|
|
|
140
141
|
* its question or what it lacks; anything else is the server's own words.
|
|
141
142
|
*/
|
|
142
143
|
function detailOf(item) {
|
|
144
|
+
if (item.modelSwitch) return modelSwitchText(item.modelSwitch);
|
|
143
145
|
const c = item.type === "task" ? item.card : null;
|
|
144
146
|
if (!c || !c.title) return configDetail(item);
|
|
145
147
|
const lacks = c.gap ? [c.gap.unchecked ? tn("gapUnchecked", c.gap.unchecked) : "", c.gap.noResult ? tn("gapNoResult") : ""].filter(Boolean).join(tn("gapJoin")) : "";
|
|
@@ -954,8 +954,8 @@ function Bots({ ctx, search, openDialog }) {
|
|
|
954
954
|
<span class="s-actions">
|
|
955
955
|
<span class=${`tag${token ? "" : " warn"}`}>${token ? tn("tokenConfigured") : tn("tokenMissing")}</span>
|
|
956
956
|
<span class=${`s-state ${state.cls}`} title=${stateText}>${stateText}</span>
|
|
957
|
-
|
|
958
|
-
|
|
957
|
+
<span class="s-conn-buttons">${!overPublicLink && ctx.fleetUp && meta.status !== "connected" ? html`<${ConnectionRetry} id=${channelId(ch, i)} ctx=${ctx} />` : null}
|
|
958
|
+
<button type="button" class="btn btn-sm" onClick=${() => openDialog({ kind: "bot", id: channelId(ch, i) })}>${tn("settingsButton")}</button></span></span>
|
|
959
959
|
</div>`;
|
|
960
960
|
})}</div>`}</section>`;
|
|
961
961
|
}
|