@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { modelSwitchText, modelName, observationLabel } from "/assets/model-observation.js";
|
|
1
2
|
// #2661: a person's profile card in the Office (fleet-office.js opens it): a popover beside them, not a modal — the Office
|
|
2
3
|
// keeps running and is not dimmed; on a phone, a bottom sheet swiped down to close. Fixed 320 px wide.
|
|
3
4
|
//
|
|
@@ -60,7 +61,7 @@ export function cardModel({ node, lv, levels, share = false, state, now, where }
|
|
|
60
61
|
const detail = !share && !!e && e.workTokens !== undefined;
|
|
61
62
|
const xp = showLevel && detail ? xpOf(e.level, e.workTokens, lv.unit) : null;
|
|
62
63
|
const rows = [[tc("office"), where]];
|
|
63
|
-
if (!share && it.model) rows.push([tc("model"), modelText(it)]);
|
|
64
|
+
if (!share && it.model) rows.push(it.model_observation ? [observationLabel("selection"), modelName(it.model_observation.session) || observationLabel("unresolved")] : [tc("model"), modelText(it)]);
|
|
64
65
|
if (!share && it.backend) rows.push([tc("backend"), backendLabel(it.backend)]);
|
|
65
66
|
if (detail) rows.push([tc("today"), tc("todayN", tokens(e.today.workTokens), e.today.requests)]);
|
|
66
67
|
if (detail && e.firstSeen) rows.push([tc("firstSeen"), tc("day", dayOf(e.firstSeen))]);
|
|
@@ -70,7 +71,7 @@ export function cardModel({ node, lv, levels, share = false, state, now, where }
|
|
|
70
71
|
badge: on && fx && fx.hideLevel ? { mark: true, tier: 0 } : e ? { text: badgeText(e.level), tier: tierOf(e.level) } : null,
|
|
71
72
|
level: showLevel ? { line1: detail ? `${tc("level", e.level)} · ${tc("work", tokens(e.workTokens))}` : tc("level", e.level), estimated: detail && e.estimated,
|
|
72
73
|
line2: xp ? tc("toNext", tokens(xp.toNext), xp.next) : null, pct: xp ? xp.pct : null, next: xp ? xp.next : null } : null,
|
|
73
|
-
rows, now,
|
|
74
|
+
rows, now, modelSwitch: !share ? modelSwitchText(it.model_observation?.active) : "",
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
|
|
@@ -89,6 +90,7 @@ export function OfficeCard({ model: m, avatar, sheet, place, onChat, onFind, onC
|
|
|
89
90
|
return html`<div ref=${box} class=${`oo-card${sheet ? " sheet" : ""}`} role="dialog" aria-modal="false" aria-label=${tc("card", m.name)}
|
|
90
91
|
onPointerDown=${down} onPointerUp=${up} onPointerCancel=${() => { swipe.current = null; }}>
|
|
91
92
|
${sheet ? html`<div class="oo-card-grip" aria-hidden="true"></div>` : null}
|
|
93
|
+
${m.modelSwitch ? html`<p class="oo-card-now model-switch" role="status"><strong>${m.modelSwitch}</strong></p>` : null}
|
|
92
94
|
<div class="oo-card-head">
|
|
93
95
|
<div class="oo-card-avatar"><canvas ref=${canvas} width="56" height="56" aria-hidden="true"></canvas>
|
|
94
96
|
${m.badge ? html`<span class=${`oo-badge tier-${m.badge.tier}${m.badge.mark ? " mark" : ""}`} aria-hidden="true">${m.badge.mark ? "" : m.badge.text}</span>` : null}</div>
|
package/dist/ui/fleet-org.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { modelSwitchText, modelName, observationLabel } from "/assets/model-observation.js";
|
|
1
2
|
// #1389: Fleet → Org chart (/ui/fleet/org) — General at the top, then the teams fleet.yaml defines, then their
|
|
2
3
|
// instances; each node names the instance, says what it does, which backend and model it runs, how it is doing now,
|
|
3
4
|
// and links to its thread. Behind the session gate (/ui/js/), imported by the Fleet panel.
|
|
@@ -129,6 +130,7 @@ function Node({ n, sending }) {
|
|
|
129
130
|
${n.i ? html`<div class="org-meta">${n.i.backend ? html`<span class="org-chip">${n.i.backend}</span>` : null}
|
|
130
131
|
${model ? html`<span class="org-model mono" title=${model}>${model}</span>` : null}
|
|
131
132
|
${n.info.classic ? html`<span class="org-chip">${to("classic")}</span>` : null}</div>` : null}
|
|
133
|
+
${n.i?.model_observation?.active ? html`<p class="note model-switch" role="status">${modelSwitchText(n.i.model_observation.active)}</p>` : null}
|
|
132
134
|
${n.i || thread ? html`<div class="org-links">
|
|
133
135
|
${thread ? html`<a class="org-link" href=${thread.url} target="_blank" rel="noopener noreferrer">
|
|
134
136
|
<${Icon} name="external" size=${14} />${to(`thread_${thread.platform}`)}<span class="sr-only"> ${to("newTab")}</span></a>` : null}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Hub rooms, Administration → Rooms (docs/design/hub-rooms-ux.md section 11): only the words the shared room vocabulary
|
|
2
|
+
// (hub-room-strings.js, namespace hubRoom) does not have. A module of its own, so a tab holding an older dictionary still
|
|
3
|
+
// has every word (upgrade skew).
|
|
4
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
5
|
+
|
|
6
|
+
register("hubAdminRooms", {
|
|
7
|
+
en: {
|
|
8
|
+
adminOnly: "Right now only Hub administrators can start rooms.",
|
|
9
|
+
colPeople: "People", colAgents: "Agents", colLast: "Last activity", colState: "Status",
|
|
10
|
+
none: "No rooms yet.",
|
|
11
|
+
rowMenu: "More for {0}",
|
|
12
|
+
saveFailed: "That was not saved. Try again.",
|
|
13
|
+
loadFailed: "Rooms could not be loaded.", retry: "Try again",
|
|
14
|
+
archiveAsk: "Archive “{0}”? The room becomes read-only; its members can still read it.",
|
|
15
|
+
joined: "You are a room manager of “{0}” now. A line in the room says so.",
|
|
16
|
+
},
|
|
17
|
+
"zh-TW": {
|
|
18
|
+
adminOnly: "目前只有 Hub 管理員可以開房間。",
|
|
19
|
+
colPeople: "人數", colAgents: "Agent 數", colLast: "最後活動", colState: "狀態",
|
|
20
|
+
none: "還沒有房間。",
|
|
21
|
+
rowMenu: "{0} 的更多動作",
|
|
22
|
+
saveFailed: "沒有儲存,請再試一次。",
|
|
23
|
+
loadFailed: "無法載入房間。", retry: "再試一次",
|
|
24
|
+
archiveAsk: "要封存「{0}」嗎?房間會變成唯讀,成員仍然看得到內容。",
|
|
25
|
+
joined: "你現在是「{0}」的房間管理,房間裡會出現一則說明。",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
export const ha = (key, ...args) => t(`hubAdminRooms.${key}`, ...args);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Hub rooms, Administration → Rooms (docs/design/hub-rooms-ux.md section 11), for the Hub administrator:
|
|
2
|
+
// - 「誰可以開房間」: people and teams who may start rooms besides the administrators (empty: administrators only);
|
|
3
|
+
// saved as soon as it changes; everyone can always start a one-to-one chat.
|
|
4
|
+
// - 「所有房間」: every group room's name, people, agents, managers, last activity and status, never its content. Each
|
|
5
|
+
// row's menu: 加入自己成為房間管理 (the room then shows a line saying so) and 封存 (after a confirmation).
|
|
6
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
7
|
+
import { Menu } from "/assets/ui-menu.js";
|
|
8
|
+
import { confirmDialog } from "/assets/ui-confirm.js";
|
|
9
|
+
import { chatTime } from "/assets/chat-time.js";
|
|
10
|
+
import { hubClient } from "./hub-client.js";
|
|
11
|
+
import { hroom } from "./hub-room-strings.js";
|
|
12
|
+
import { ha } from "./hub-admin-rooms-strings.js";
|
|
13
|
+
import { RoomPicker } from "./hub-room-new.js";
|
|
14
|
+
import { linkRoomsU2Css } from "./hub-room-new-strings.js";
|
|
15
|
+
|
|
16
|
+
linkRoomsU2Css();
|
|
17
|
+
|
|
18
|
+
export function AdminRooms({ client = hubClient() } = {}) {
|
|
19
|
+
const [creators, setCreators] = useState(null), [rooms, setRooms] = useState(null), [failed, setFailed] = useState(false);
|
|
20
|
+
const [error, setError] = useState(""), [note, setNote] = useState(""), [busy, setBusy] = useState(false);
|
|
21
|
+
const live = useRef(true);
|
|
22
|
+
const load = async () => {
|
|
23
|
+
const [c, r] = await Promise.all([client.roomCreators(), client.adminRooms()]);
|
|
24
|
+
if (!live.current) return;
|
|
25
|
+
if (!c?.ok || !r?.ok) { setFailed(true); return; }
|
|
26
|
+
setFailed(false);
|
|
27
|
+
setCreators([...(c.people ?? []).map(x => ({ kind: "person", ...named(x) })), ...(c.teams ?? []).map(x => ({ kind: "team", ...named(x) }))]);
|
|
28
|
+
setRooms(Array.isArray(r.rooms) ? r.rooms : []);
|
|
29
|
+
};
|
|
30
|
+
useEffect(() => { live.current = true; void load(); return () => { live.current = false; }; }, [client]);
|
|
31
|
+
if (failed && !rooms) return html`<section class="hub-admin-rooms"><p class="note" role="alert">${ha("loadFailed")} <button type="button" class="btn btn-link" onClick=${() => { void load(); }}>${ha("retry")}</button></p></section>`;
|
|
32
|
+
if (!rooms || !creators) return html`<section class="hub-admin-rooms" aria-busy="true"></section>`;
|
|
33
|
+
const saveCreators = async (next) => {
|
|
34
|
+
const before = creators;
|
|
35
|
+
setCreators(next); setBusy(true); setError(""); setNote("");
|
|
36
|
+
const r = await client.saveRoomCreators({ people: next.filter(x => x.kind === "person").map(x => x.id), teams: next.filter(x => x.kind === "team").map(x => x.id) });
|
|
37
|
+
if (!live.current) return;
|
|
38
|
+
setBusy(false);
|
|
39
|
+
if (!r?.ok) { setCreators(before); setError(ha("saveFailed")); }
|
|
40
|
+
};
|
|
41
|
+
const act = async (send, after) => {
|
|
42
|
+
setBusy(true); setError(""); setNote("");
|
|
43
|
+
const r = await send();
|
|
44
|
+
if (!live.current) return;
|
|
45
|
+
setBusy(false);
|
|
46
|
+
if (!r?.ok) { setError(ha("saveFailed")); return; }
|
|
47
|
+
after?.(); void load();
|
|
48
|
+
};
|
|
49
|
+
const archive = async (room) => {
|
|
50
|
+
if (!await confirmDialog({ title: hroom("archiveRoom"), message: ha("archiveAsk", room.name), confirmLabel: hroom("archive"), danger: true })) return;
|
|
51
|
+
await act(() => client.archiveRoomAsAdmin(room.id, true));
|
|
52
|
+
};
|
|
53
|
+
return html`<section class="hub-admin-rooms">
|
|
54
|
+
${error ? html`<p class="note" role="alert">${error}</p>` : null}
|
|
55
|
+
${note ? html`<p class="note" role="status">${note}</p>` : null}
|
|
56
|
+
<section class="form hub-admin-creators"><h3>${hroom("whoCanCreate")}</h3>
|
|
57
|
+
<${RoomPicker} client=${client} id="hubRoomCreators" kinds=${["person", "team"]} label=${hroom("addPeopleOrTeams")} placeholder=${hroom("addPeopleOrTeams")}
|
|
58
|
+
picked=${creators} onChange=${(next) => { if (!busy) void saveCreators(next); }} />
|
|
59
|
+
${creators.length ? null : html`<p class="note">${ha("adminOnly")}</p>`}
|
|
60
|
+
<p class="note">${hroom("everyoneDirect")}</p>
|
|
61
|
+
</section>
|
|
62
|
+
<section class="hub-admin-all-rooms"><h3>${hroom("allRooms")}</h3>
|
|
63
|
+
<p class="note">${hroom("noContent")}</p>
|
|
64
|
+
${rooms.length ? html`<table class="hub-admin-rooms-table"><thead><tr><th>${hroom("name")}</th><th>${ha("colPeople")}</th><th>${ha("colAgents")}</th><th>${hroom("roomManager")}</th><th>${ha("colLast")}</th><th>${ha("colState")}</th><th></th></tr></thead>
|
|
65
|
+
<tbody>${rooms.map(room => html`<tr key=${room.id} data-room=${room.id}>
|
|
66
|
+
<td>${room.name}</td><td>${Number(room.people) || 0}</td><td>${Number(room.agents) || 0}</td>
|
|
67
|
+
<td>${Array.isArray(room.managers) ? room.managers.join("、") : ""}</td>
|
|
68
|
+
<td>${room.lastAt ? chatTime(room.lastAt) : ""}</td>
|
|
69
|
+
<td>${room.archived ? hroom("archived") : hroom("active")}</td>
|
|
70
|
+
<td><${Menu} label=${ha("rowMenu", room.name)} disabled=${busy} items=${[
|
|
71
|
+
{ key: "join", label: hroom("joinAsManager"), onSelect: () => { void act(() => client.joinRoomAsAdmin(room.id), () => setNote(ha("joined", room.name))); } },
|
|
72
|
+
room.archived ? null : { key: "archive", label: hroom("archive"), danger: true, onSelect: () => { void archive(room); } },
|
|
73
|
+
]} /></td></tr>`)}</tbody></table>` : html`<p class="note">${ha("none")}</p>`}
|
|
74
|
+
</section>
|
|
75
|
+
</section>`;
|
|
76
|
+
}
|
|
77
|
+
const named = (x) => typeof x === "string" ? { id: x, name: x } : { id: String(x?.id ?? ""), name: String(x?.name ?? x?.id ?? ""), ...(Number.isFinite(x?.people) ? { people: x.people } : {}) };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
2
|
+
register("hubAssistantAdmin", {
|
|
3
|
+
en: {
|
|
4
|
+
accountSignedIn: "Signed in.", accountNeedsSignIn: "Sign-in needed. Sign in under AgEnD settings on this Hub computer.",
|
|
5
|
+
accountUnknown: "Sign-in status unknown. Sign in under AgEnD settings on this Hub computer.",
|
|
6
|
+
backend: "Backend", account: "Account", defaultAccount: "Default account", unknown: "Unknown",
|
|
7
|
+
save: "Save", saved: "Saved", refresh: "Refresh", noneRunning: "No room assistants are working or idle.",
|
|
8
|
+
loadFailed: "Could not read room assistant settings. Try again.", saveFailed: "Could not save. Your changes are still here; try again.",
|
|
9
|
+
stoppedRefreshFailed: "Stopped this room assistant. Could not refresh its status; use Refresh to try again.",
|
|
10
|
+
stopFailed: "Could not stop this room assistant. Try again.", usageFailed: "Could not read usage. Try again.",
|
|
11
|
+
usageNotSaved: "Some answer counts could not be saved. The answers were still sent.", quotaPending: "Quota status not available yet",
|
|
12
|
+
starting: "Starting", stopping: "Stopping", failed: "Needs attention", day: "Date (UTC)", answers: "Answers",
|
|
13
|
+
},
|
|
14
|
+
"zh-TW": {
|
|
15
|
+
accountSignedIn: "已登入", accountNeedsSignIn: "需要登入。請在 Hub 這台電腦的 AgEnD 設定裡登入。",
|
|
16
|
+
accountUnknown: "登入狀態未知。請在 Hub 這台電腦的 AgEnD 設定裡登入。",
|
|
17
|
+
backend: "後端", account: "帳號", defaultAccount: "預設帳號", unknown: "未知",
|
|
18
|
+
save: "儲存", saved: "已儲存", refresh: "重新整理", noneRunning: "目前沒有執行中或待命的房間助理。",
|
|
19
|
+
loadFailed: "未能讀取房間助理設定,請再試一次。", saveFailed: "未能儲存,修改仍保留在這裡,請再試一次。",
|
|
20
|
+
stoppedRefreshFailed: "已停止這個房間助理,但未能更新狀態,請按「重新整理」再試一次。",
|
|
21
|
+
stopFailed: "未能停止這個房間助理,請再試一次。", usageFailed: "未能讀取用量,請再試一次。",
|
|
22
|
+
usageNotSaved: "部分回答次數未能儲存,回答仍已送出。", quotaPending: "尚未取得額度狀態",
|
|
23
|
+
starting: "啟動中", stopping: "停止中", failed: "需要處理", day: "日期(UTC)", answers: "回答次數",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
export const ha = (key, ...args) => t(`hubAssistantAdmin.${key}`, ...args);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
2
|
+
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
3
|
+
import { hroom } from "./hub-room-strings.js";
|
|
4
|
+
import { ha } from "./hub-assistant-admin-strings.js";
|
|
5
|
+
|
|
6
|
+
const fields = value => ({ enabled: value.enabled === true, backend: value.backend, account: value.account ?? null, cap: Number(value.cap), idleMinutes: Number(value.idleMinutes) });
|
|
7
|
+
const validLimits = value => Number.isInteger(Number(value?.cap)) && Number(value.cap) >= 1 && Number(value.cap) <= 16 && Number.isInteger(Number(value?.idleMinutes)) && Number(value.idleMinutes) >= 1 && Number(value.idleMinutes) <= 240;
|
|
8
|
+
const accountWord = row => row.state === "signed-in" ? hroom("signedIn") : row.state === "needs-sign-in" ? hroom("needsSignIn") : ha("unknown");
|
|
9
|
+
const accountHelp = row => ha(row?.state === "signed-in" ? "accountSignedIn" : row?.state === "needs-sign-in" ? "accountNeedsSignIn" : "accountUnknown");
|
|
10
|
+
const stateWord = state => state === "idle" ? hroom("stIdle") : state === "working" ? hroom("stWorking") : ha(["starting", "stopping", "failed"].includes(state) ? state : "unknown");
|
|
11
|
+
const quotaWord = band => band === "available" ? hroom("quotaPlenty") : band === "near_limit" ? hroom("quotaLow") : band === "exhausted" ? hroom("quotaGone") : ha("quotaPending");
|
|
12
|
+
|
|
13
|
+
/** Hub-only admin cards; the existing client owns same-origin session/CSRF. No Fleet endpoint is called. */
|
|
14
|
+
export function HubAssistantAdmin({ client }) {
|
|
15
|
+
const [view, setView] = useState(null), [form, setForm] = useState(null), [usage, setUsage] = useState(null);
|
|
16
|
+
const [error, setError] = useState(null), [busy, setBusy] = useState(false), [saved, setSaved] = useState(false);
|
|
17
|
+
const generation = useRef(0);
|
|
18
|
+
const load = async (replaceForm = true) => {
|
|
19
|
+
const mine = ++generation.current;
|
|
20
|
+
const results = await Promise.allSettled([Promise.resolve().then(() => client.assistantSettings()), Promise.resolve().then(() => client.assistantUsage())]);
|
|
21
|
+
const settings = results[0].status === "fulfilled" ? results[0].value : { ok: false };
|
|
22
|
+
const counts = results[1].status === "fulfilled" ? results[1].value : { ok: false };
|
|
23
|
+
if (mine !== generation.current) return;
|
|
24
|
+
if (!settings?.ok) { setError(ha("loadFailed")); return; }
|
|
25
|
+
setView(settings); setForm(value => replaceForm || value === null ? fields(settings) : value); setUsage(counts?.ok ? counts : { ok: false }); setError(null);
|
|
26
|
+
};
|
|
27
|
+
useEffect(() => { setBusy(false); setView(null); setForm(null); void load(); return () => { generation.current++; }; }, [client]);
|
|
28
|
+
const edit = patch => { setSaved(false); setForm(value => ({ ...value, ...patch })); };
|
|
29
|
+
const save = async event => {
|
|
30
|
+
event.preventDefault(); if (busy || !validLimits(form)) return;
|
|
31
|
+
setBusy(true); setError(null); setSaved(false);
|
|
32
|
+
const mine = generation.current;
|
|
33
|
+
let result;
|
|
34
|
+
try { result = await client.saveAssistantSettings(fields(form)); } catch { result = { ok: false }; }
|
|
35
|
+
if (mine !== generation.current) return;
|
|
36
|
+
setBusy(false);
|
|
37
|
+
if (!result?.ok) { setError(ha("saveFailed")); return; }
|
|
38
|
+
setView(result); setForm(fields(result)); setSaved(true);
|
|
39
|
+
};
|
|
40
|
+
const stop = async roomId => {
|
|
41
|
+
if (busy) return; setBusy(true); setError(null);
|
|
42
|
+
const mine = generation.current;
|
|
43
|
+
let result, latest;
|
|
44
|
+
try { result = await client.stopRoomAssistant(roomId); } catch { result = { ok: false }; }
|
|
45
|
+
if (result?.ok) { try { latest = await client.assistantSettings(); } catch { latest = { ok: false }; } }
|
|
46
|
+
if (mine !== generation.current) return;
|
|
47
|
+
setBusy(false);
|
|
48
|
+
if (!result?.ok) { setError(ha("stopFailed")); return; }
|
|
49
|
+
if (!latest?.ok) {
|
|
50
|
+
setView(value => ({ ...value, running: value.running.filter(row => row.roomId !== roomId) }));
|
|
51
|
+
setError(ha("stoppedRefreshFailed")); return;
|
|
52
|
+
}
|
|
53
|
+
setView(latest); // a status refresh must not discard unsaved settings
|
|
54
|
+
};
|
|
55
|
+
if (!view) return html`<section class="card" aria-label=${hroom("roomAssistant")}><h3>${hroom("roomAssistant")}</h3>${error
|
|
56
|
+
? html`<${ErrorState} message=${error} onRetry=${() => load(false)} />` : html`<${Skeleton} variant="rows" lines=${3} />`}</section>`;
|
|
57
|
+
const backends = Array.isArray(view.backends) ? view.backends : [], backend = backends.find(row => row.id === form.backend);
|
|
58
|
+
const accounts = backend?.accounts || [], selected = accounts.find(row => row.id === form.account);
|
|
59
|
+
const canEnable = accounts.some(row => row.state !== "needs-sign-in"), running = Array.isArray(view.running) ? view.running : [];
|
|
60
|
+
return html`<section class="card" aria-label=${hroom("roomAssistant")}><h3>${hroom("roomAssistant")}</h3>
|
|
61
|
+
${!view.enabled ? html`<p class="note">${hroom("assistantNotEnabled")}</p>` : null}
|
|
62
|
+
${!backends.length ? html`<${Empty} title=${hroom("assistantNotEnabled")} hint=${hroom("assistantEnableHint")} />` : null}
|
|
63
|
+
<form class="form" onSubmit=${save}>
|
|
64
|
+
<label class="s-row"><span>${hroom("enableAssistant")}</span><input class="s-ui-toggle" type="checkbox" role="switch" aria-label=${hroom("enableAssistant")} checked=${form.enabled} disabled=${busy || !canEnable && !form.enabled} onChange=${e => edit({ enabled: e.target.checked })} /></label>
|
|
65
|
+
<div class="s-group"><h4>${hroom("aiAccount")}</h4><div class="grid2">
|
|
66
|
+
<label class="field"><span>${ha("backend")}</span><select aria-label=${ha("backend")} value=${form.backend} disabled=${busy || !backends.length} onChange=${e => edit({ backend: e.target.value, account: null })}>
|
|
67
|
+
${backends.map(row => html`<option key=${row.id} value=${row.id}>${row.name}</option>`)}</select></label>
|
|
68
|
+
<label class="field"><span>${ha("account")}</span><select aria-label=${ha("account")} value=${form.account ?? ""} disabled=${busy || !accounts.length} onChange=${e => edit({ account: e.target.value || null })}>
|
|
69
|
+
${accounts.map(row => html`<option key=${row.id ?? "default"} value=${row.id ?? ""} disabled=${row.state === "needs-sign-in"}>${row.id === null ? ha("defaultAccount") : row.name} · ${accountWord(row)}</option>`)}</select></label>
|
|
70
|
+
</div><p class="note">${accountHelp(selected)}</p><p class="note">${hroom("assistantQuota")}</p></div>
|
|
71
|
+
<div class="grid2"><label class="field"><span>${hroom("cap")}</span><input aria-label=${hroom("cap")} type="number" inputmode="numeric" min="1" max="16" step="1" required value=${form.cap} disabled=${busy} onInput=${e => edit({ cap: e.target.value })} /></label>
|
|
72
|
+
<label class="field"><span>${hroom("idleMinutes")}</span><input aria-label=${hroom("idleMinutes")} type="number" inputmode="numeric" min="1" max="240" step="1" required value=${form.idleMinutes} disabled=${busy} onInput=${e => edit({ idleMinutes: e.target.value })} /></label></div>
|
|
73
|
+
${error ? html`<p class="err" role="alert">${error}</p>` : null}${saved ? html`<p class="note" role="status">${ha("saved")}</p>` : null}
|
|
74
|
+
<div class="field-row"><button type="submit" class="btn btn-primary" disabled=${busy || !validLimits(form) || form.enabled && !selected}>${ha("save")}</button></div>
|
|
75
|
+
</form>
|
|
76
|
+
</section>
|
|
77
|
+
<section class="card" aria-label=${hroom("runningNow")}><div class="hub-card-head"><h3>${hroom("runningNow")}</h3><button type="button" class="btn btn-sm btn-ghost" disabled=${busy} onClick=${() => load(false)}>${ha("refresh")}</button></div>
|
|
78
|
+
${running.length ? html`<div class="hub-rows">${running.map(row => html`<div class="s-row hub-row" key=${row.roomId}><span class="hub-row-text"><strong title=${row.roomName}>${row.roomName}</strong><small class="note">${hroom("lastUsed")} · ${new Date(row.lastUsed).toLocaleString(undefined, { dateStyle: "short", timeStyle: "short", hour12: false })}</small></span>
|
|
79
|
+
<span class=${`tag ${row.state === "failed" ? "warn" : ""}`}>${stateWord(row.state)}</span><button type="button" class="btn btn-sm" disabled=${busy || row.state === "stopping"} onClick=${() => stop(row.roomId)}>${hroom("stop")}</button></div>`)}</div>` : html`<p class="note">${ha("noneRunning")}</p>`}
|
|
80
|
+
</section>
|
|
81
|
+
<section class="card" aria-label=${hroom("usage")}><h3>${hroom("usage")}</h3><p class="note">${hroom("usageLead")}</p>
|
|
82
|
+
${usage?.ok ? html`<div class="s-row note"><span>${ha("day")}</span><span>${ha("answers")}</span></div><div class="hub-rows">${usage.days.map(row => html`<div class="s-row" key=${row.day}><time datetime=${row.day}>${new Date(`${row.day}T00:00:00Z`).toLocaleDateString(undefined, { month: "numeric", day: "numeric", timeZone: "UTC" })}</time><strong>${row.count}</strong></div>`)}</div><p>${hroom("aiAccount")} · <span class="tag">${quotaWord(usage.quota?.band)}</span></p>
|
|
83
|
+
${usage.note === "usage-not-saved" ? html`<p class="note" role="status">${ha("usageNotSaved")}</p>` : null}` : html`<${ErrorState} message=${ha("usageFailed")} onRetry=${() => load(false)} />`}
|
|
84
|
+
</section>`;
|
|
85
|
+
}
|
|
@@ -57,7 +57,7 @@ export function hubEntryToMessages(entry, room, { me = "", reason = (code) => co
|
|
|
57
57
|
*/
|
|
58
58
|
export function createHubChatStore(room, { client = hubClient(), me = "", reason, timers = globalThis, doc = typeof document !== "undefined" ? document : null } = {}) {
|
|
59
59
|
const subs = new Set();
|
|
60
|
-
const st = { live: true, timer: 0, inflight: false, entries: [], room: { ...room }, closed: false, loaded: false, error: null, accessDenied: false, accessEpoch: 0, pending: [], full: false, reads: 0, farTurn: 0 };
|
|
60
|
+
const st = { live: true, timer: 0, inflight: false, entries: [], room: { ...room }, closed: false, loaded: false, error: null, accessDenied: false, accessEpoch: 0, availabilityEpoch: 0, pending: [], full: false, reads: 0, farTurn: 0 };
|
|
61
61
|
const emit = () => { for (const fn of subs) { try { fn(); } catch { /* a subscriber's own failure */ } } };
|
|
62
62
|
const merge = (got) => {
|
|
63
63
|
const byId = new Map(st.entries.map((e) => [e.messageId, e]));
|
|
@@ -74,7 +74,7 @@ export function createHubChatStore(room, { client = hubClient(), me = "", reason
|
|
|
74
74
|
if (!st.live || st.inflight || st.closed) return;
|
|
75
75
|
if (doc && doc.hidden) { schedule(POLL_MS); return; }
|
|
76
76
|
st.inflight = true;
|
|
77
|
-
const accessEpoch = st.accessEpoch;
|
|
77
|
+
const accessEpoch = st.accessEpoch, availabilityEpoch = st.availabilityEpoch;
|
|
78
78
|
// Unsettled entries are read again (from just before the oldest one) — but a full page means there is more after
|
|
79
79
|
// it: read on from the last one first, so an old open entry can never pin the read to the same page (#3246 review).
|
|
80
80
|
const last = st.entries.length ? st.entries[st.entries.length - 1].sequence : 0;
|
|
@@ -101,10 +101,13 @@ export function createHubChatStore(room, { client = hubClient(), me = "", reason
|
|
|
101
101
|
// The room as the server says it now. Its quota is the server's to give: absent means withdrawn (the owner hid it,
|
|
102
102
|
// the grant is gone), never "unchanged" — a band once shown must not outlive that. An answer with no room at all
|
|
103
103
|
// (an older Hub) keeps what is known.
|
|
104
|
-
|
|
104
|
+
// A send can learn a pause while this older history read is held. Only a read begun after
|
|
105
|
+
// that refusal may restore availability; keep its history, but never undo the newer refusal.
|
|
106
|
+
const availabilityCurrent = availabilityEpoch === st.availabilityEpoch;
|
|
107
|
+
if (r.room && availabilityCurrent) { st.room = { ...st.room, ...r.room }; if (!Object.prototype.hasOwnProperty.call(r.room, "quota")) delete st.room.quota; }
|
|
105
108
|
st.pending = st.pending.filter((p) => !st.entries.some((e) => e.messageId === p.messageId));
|
|
106
109
|
if (r.room && accessEpoch === st.accessEpoch) st.accessDenied = false;
|
|
107
|
-
st.loaded = true; st.error = null; emit(); schedule(POLL_MS); return;
|
|
110
|
+
st.loaded = true; st.error = null; emit(); schedule(availabilityCurrent ? POLL_MS : 0); return;
|
|
108
111
|
}
|
|
109
112
|
if (r.code === "revoked" || r.code === "not-found") { st.closed = true; emit(); return; }
|
|
110
113
|
if (r.code === "denied") { st.accessDenied = true; st.accessEpoch++; }
|
|
@@ -151,6 +154,7 @@ export function createHubChatStore(room, { client = hubClient(), me = "", reason
|
|
|
151
154
|
if (!q || st.closed) return { ok: false, code: "invalid" };
|
|
152
155
|
let r;
|
|
153
156
|
try { r = await client.ask(st.room.id, newKey(), q, extras); } catch { r = { ok: false, code: "unreachable" }; }
|
|
157
|
+
if (!r.ok && r.code === "sharing-paused" && st.live) { st.availabilityEpoch++; st.room = { ...st.room, exposureState: "paused" }; emit(); schedule(0); return r; }
|
|
154
158
|
if (!r.ok) { if (r.code === "denied" && st.live) { st.accessDenied = true; st.accessEpoch++; emit(); } if (r.code === "revoked") { st.closed = true; emit(); } return r; }
|
|
155
159
|
st.pending.push({ messageId: r.receipt.messageId, text: q, at: r.receipt.at || Date.now() });
|
|
156
160
|
emit();
|