@songsid/agend 2.4.0-beta.1 → 2.4.0-beta.11
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/agent-cli-instructions.md +4 -1
- package/dist/agent-cli.js +14 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +3 -1
- package/dist/agent-endpoint.js +15 -3
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-token-header.d.ts +1 -1
- package/dist/agent-token-header.js +1 -1
- package/dist/app-message-origin.d.ts +2 -0
- package/dist/app-message-origin.js +3 -0
- package/dist/app-message-origin.js.map +1 -0
- package/dist/auth-api.d.ts +8 -0
- package/dist/auth-api.js +40 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/authority-state.d.ts +7 -0
- package/dist/authority/authority-state.js +17 -2
- package/dist/authority/authority-state.js.map +1 -1
- package/dist/authority/web-authority.d.ts +11 -1
- package/dist/authority/web-authority.js +11 -1
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/agy-model-switch.d.ts +22 -0
- package/dist/backend/agy-model-switch.js +62 -0
- package/dist/backend/agy-model-switch.js.map +1 -0
- package/dist/backend/antigravity.d.ts +9 -2
- package/dist/backend/antigravity.js +84 -9
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.js +55 -14
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +1 -1
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/cli-runtime-switch.d.ts +90 -0
- package/dist/backend/cli-runtime-switch.js +273 -0
- package/dist/backend/cli-runtime-switch.js.map +1 -0
- package/dist/backend/codex-footer-hints.d.ts +1 -0
- package/dist/backend/codex-footer-hints.js +15 -0
- package/dist/backend/codex-footer-hints.js.map +1 -1
- package/dist/backend/codex-model-switch.d.ts +41 -0
- package/dist/backend/codex-model-switch.js +170 -0
- package/dist/backend/codex-model-switch.js.map +1 -0
- package/dist/backend/codex-precaution.d.ts +7 -0
- package/dist/backend/codex-precaution.js +102 -0
- package/dist/backend/codex-precaution.js.map +1 -0
- package/dist/backend/codex.d.ts +7 -4
- package/dist/backend/codex.js +44 -9
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.js +1 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/grok-model-switch.d.ts +16 -0
- package/dist/backend/grok-model-switch.js +45 -0
- package/dist/backend/grok-model-switch.js.map +1 -0
- package/dist/backend/grok.js +22 -7
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +4 -4
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +2 -0
- package/dist/backend/muse.js +7 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/native-pane.js +1 -1
- package/dist/backend/native-pane.js.map +1 -1
- package/dist/backend/types.d.ts +11 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +22 -0
- package/dist/backend-availability.js +71 -2
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-signin-guide.js +1 -1
- package/dist/backend-signin-guide.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.d.ts +10 -0
- package/dist/channel/adapters/discord.js +35 -0
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +2 -0
- package/dist/channel/adapters/telegram.js +3 -0
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +10 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +9 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +9 -2
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +10 -0
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +1 -1
- package/dist/cli-audited.js +16 -15
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli-capability.d.ts +3 -0
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-registry-check.js +1 -1
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +1 -0
- package/dist/cli-spec-antigravity.d.ts +1 -0
- package/dist/cli-spec-antigravity.js +3 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +18 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/connect/control.d.ts +20 -0
- package/dist/connect/control.js +236 -0
- package/dist/connect/control.js.map +1 -0
- package/dist/connect/install.d.ts +13 -0
- package/dist/connect/install.js +12 -0
- package/dist/connect/install.js.map +1 -0
- package/dist/connect/mcp.d.ts +9 -0
- package/dist/connect/mcp.js +10 -0
- package/dist/connect/mcp.js.map +1 -0
- package/dist/connect/protocol.d.ts +38 -0
- package/dist/connect/protocol.js +36 -0
- package/dist/connect/protocol.js.map +1 -0
- package/dist/connect/service.d.ts +19 -0
- package/dist/connect/service.js +79 -0
- package/dist/connect/service.js.map +1 -0
- package/dist/connect/stdio-entry.d.ts +1 -0
- package/dist/connect/stdio-entry.js +6 -0
- package/dist/connect/stdio-entry.js.map +1 -0
- package/dist/connect/stdio.d.ts +5 -0
- package/dist/connect/stdio.js +33 -0
- package/dist/connect/stdio.js.map +1 -0
- package/dist/daemon.d.ts +64 -2
- package/dist/daemon.js +399 -33
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +2 -0
- package/dist/delivery-consumed-watch.js +4 -1
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/dispatcher-liveness.d.ts +51 -1
- package/dist/dispatcher-liveness.js +92 -2
- package/dist/dispatcher-liveness.js.map +1 -1
- package/dist/event-log.d.ts +13 -1
- package/dist/event-log.js +41 -1
- package/dist/event-log.js.map +1 -1
- package/dist/fleet-manager.d.ts +239 -7
- package/dist/fleet-manager.js +1387 -103
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +4 -2
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +11 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +10 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +302 -29
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +127 -26
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +2 -0
- package/dist/hub/admin-dashboard.d.ts +85 -0
- package/dist/hub/admin-dashboard.js +177 -0
- package/dist/hub/admin-dashboard.js.map +1 -0
- package/dist/hub/agent-catalog-model.d.ts +276 -0
- package/dist/hub/agent-catalog-model.js +49 -0
- package/dist/hub/agent-catalog-model.js.map +1 -0
- package/dist/hub/agent-catalog.d.ts +137 -0
- package/dist/hub/agent-catalog.js +118 -0
- package/dist/hub/agent-catalog.js.map +1 -0
- package/dist/hub/agent-intro.d.ts +31 -0
- package/dist/hub/agent-intro.js +51 -0
- package/dist/hub/agent-intro.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +2 -0
- package/dist/hub/attachments/store.js +6 -0
- package/dist/hub/attachments/store.js.map +1 -1
- package/dist/hub/audit/index.d.ts +2 -0
- package/dist/hub/audit/index.js +8 -0
- package/dist/hub/audit/index.js.map +1 -1
- package/dist/hub/buttons.js +3 -1
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +11 -6
- package/dist/hub/catalog.js +38 -13
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +15 -0
- package/dist/hub/client.js +106 -12
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +28 -0
- package/dist/hub/compose/member.js +300 -27
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +17 -0
- package/dist/hub/compose/server.js +108 -14
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/display-name.d.ts +10 -0
- package/dist/hub/display-name.js +35 -0
- package/dist/hub/display-name.js.map +1 -0
- package/dist/hub/execution/service.d.ts +2 -1
- package/dist/hub/execution/service.js +2 -1
- package/dist/hub/execution/service.js.map +1 -1
- package/dist/hub/fleet-info.d.ts +12 -0
- package/dist/hub/fleet-info.js +14 -0
- package/dist/hub/fleet-info.js.map +1 -0
- package/dist/hub/fleet-update-model.d.ts +100 -0
- package/dist/hub/fleet-update-model.js +15 -0
- package/dist/hub/fleet-update-model.js.map +1 -0
- package/dist/hub/fleet-updates.d.ts +46 -0
- package/dist/hub/fleet-updates.js +282 -0
- package/dist/hub/fleet-updates.js.map +1 -0
- package/dist/hub/fleet-versions.d.ts +28 -0
- package/dist/hub/fleet-versions.js +80 -0
- package/dist/hub/fleet-versions.js.map +1 -0
- package/dist/hub/group-policy/admin-api.d.ts +1 -0
- package/dist/hub/group-policy/admin-api.js +10 -1
- package/dist/hub/group-policy/admin-api.js.map +1 -1
- package/dist/hub/group-policy/admin-control.d.ts +1 -0
- package/dist/hub/group-policy/admin-control.js +13 -4
- package/dist/hub/group-policy/admin-control.js.map +1 -1
- package/dist/hub/group-policy/admin-dto.d.ts +39 -1
- package/dist/hub/group-policy/admin-dto.js.map +1 -1
- package/dist/hub/group-policy/admin-facts.d.ts +4 -2
- package/dist/hub/group-policy/admin-facts.js +17 -2
- package/dist/hub/group-policy/admin-facts.js.map +1 -1
- package/dist/hub/group-policy/admin-impact.d.ts +36 -6
- package/dist/hub/group-policy/admin-impact.js +21 -7
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.d.ts +2 -0
- package/dist/hub/group-policy/admin-inventory.js +13 -4
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/admin-search.d.ts +2 -1
- package/dist/hub/group-policy/admin-search.js +56 -7
- package/dist/hub/group-policy/admin-search.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +2 -0
- package/dist/hub/group-policy/authorization.js +7 -2
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.d.ts +4 -1
- package/dist/hub/group-policy/impact-inventory.js +23 -2
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/model.d.ts +52 -1
- package/dist/hub/group-policy/model.js +20 -7
- package/dist/hub/group-policy/model.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +2 -0
- package/dist/hub/group-policy/resources.js +12 -1
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.js +22 -3
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/team-subjects.d.ts +16 -0
- package/dist/hub/group-policy/team-subjects.js +32 -0
- package/dist/hub/group-policy/team-subjects.js.map +1 -0
- package/dist/hub/http/compose.d.ts +4 -0
- package/dist/hub/http/compose.js +477 -40
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.js +27 -0
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +13 -0
- package/dist/hub/http/schema.js +30 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/join/client.js +75 -42
- package/dist/hub/join/client.js.map +1 -1
- package/dist/hub/join/service.d.ts +1 -1
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/mcp/auth-schema.d.ts +7 -0
- package/dist/hub/mcp/auth-schema.js +31 -0
- package/dist/hub/mcp/auth-schema.js.map +1 -0
- package/dist/hub/mcp/auth.d.ts +89 -0
- package/dist/hub/mcp/auth.js +374 -0
- package/dist/hub/mcp/auth.js.map +1 -0
- package/dist/hub/mcp/catalog.d.ts +44 -0
- package/dist/hub/mcp/catalog.js +31 -0
- package/dist/hub/mcp/catalog.js.map +1 -0
- package/dist/hub/mcp/door-schema.d.ts +7 -0
- package/dist/hub/mcp/door-schema.js +20 -0
- package/dist/hub/mcp/door-schema.js.map +1 -0
- package/dist/hub/mcp/http.d.ts +25 -0
- package/dist/hub/mcp/http.js +259 -0
- package/dist/hub/mcp/http.js.map +1 -0
- package/dist/hub/mcp/policy.d.ts +65 -0
- package/dist/hub/mcp/policy.js +153 -0
- package/dist/hub/mcp/policy.js.map +1 -0
- package/dist/hub/mcp/server.d.ts +3 -0
- package/dist/hub/mcp/server.js +32 -0
- package/dist/hub/mcp/server.js.map +1 -0
- package/dist/hub/mcp/tools.d.ts +31 -0
- package/dist/hub/mcp/tools.js +177 -0
- package/dist/hub/mcp/tools.js.map +1 -0
- package/dist/hub/member/agent-catalog.d.ts +28 -0
- package/dist/hub/member/agent-catalog.js +80 -0
- package/dist/hub/member/agent-catalog.js.map +1 -0
- package/dist/hub/member/display-name.d.ts +9 -0
- package/dist/hub/member/display-name.js +71 -0
- package/dist/hub/member/display-name.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +9 -3
- package/dist/hub/member/exposure-api.js +16 -9
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +16 -4
- package/dist/hub/member/exposures.js +47 -13
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-api.js +3 -2
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/recommendations.d.ts +37 -0
- package/dist/hub/member/recommendations.js +129 -0
- package/dist/hub/member/recommendations.js.map +1 -0
- package/dist/hub/member/room-ask.d.ts +68 -5
- package/dist/hub/member/room-ask.js +273 -25
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-context-budget.d.ts +5 -0
- package/dist/hub/member/room-context-budget.js +34 -0
- package/dist/hub/member/room-context-budget.js.map +1 -0
- package/dist/hub/member/room-mention-feedback.d.ts +44 -0
- package/dist/hub/member/room-mention-feedback.js +121 -0
- package/dist/hub/member/room-mention-feedback.js.map +1 -0
- package/dist/hub/member/room-notification.d.ts +9 -0
- package/dist/hub/member/room-notification.js +2 -0
- package/dist/hub/member/room-notification.js.map +1 -0
- package/dist/hub/member/room-post-answers.d.ts +46 -0
- package/dist/hub/member/room-post-answers.js +152 -0
- package/dist/hub/member/room-post-answers.js.map +1 -0
- package/dist/hub/member/room-post-receipt.d.ts +21 -0
- package/dist/hub/member/room-post-receipt.js +49 -0
- package/dist/hub/member/room-post-receipt.js.map +1 -0
- package/dist/hub/member/room-post.d.ts +103 -0
- package/dist/hub/member/room-post.js +231 -0
- package/dist/hub/member/room-post.js.map +1 -0
- package/dist/hub/member/sharing-journal.d.ts +252 -0
- package/dist/hub/member/sharing-journal.js +212 -0
- package/dist/hub/member/sharing-journal.js.map +1 -0
- package/dist/hub/member/sharing-link.d.ts +25 -0
- package/dist/hub/member/sharing-link.js +68 -0
- package/dist/hub/member/sharing-link.js.map +1 -0
- package/dist/hub/member/sharing-result.d.ts +6 -0
- package/dist/hub/member/sharing-result.js +46 -0
- package/dist/hub/member/sharing-result.js.map +1 -0
- package/dist/hub/member/sharing.d.ts +37 -0
- package/dist/hub/member/sharing.js +181 -0
- package/dist/hub/member/sharing.js.map +1 -0
- package/dist/hub/member/updates.d.ts +92 -0
- package/dist/hub/member/updates.js +316 -0
- package/dist/hub/member/updates.js.map +1 -0
- package/dist/hub/pairing.d.ts +15 -1
- package/dist/hub/pairing.js +33 -2
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/person-prefs.d.ts +22 -0
- package/dist/hub/person-prefs.js +34 -0
- package/dist/hub/person-prefs.js.map +1 -0
- package/dist/hub/personal/owner-host.d.ts +146 -0
- package/dist/hub/personal/owner-host.js +289 -0
- package/dist/hub/personal/owner-host.js.map +1 -0
- package/dist/hub/personal/refusals.d.ts +11 -0
- package/dist/hub/personal/refusals.js +33 -0
- package/dist/hub/personal/refusals.js.map +1 -0
- package/dist/hub/personal/runtime-host.d.ts +26 -0
- package/dist/hub/personal/runtime-host.js +51 -0
- package/dist/hub/personal/runtime-host.js.map +1 -0
- package/dist/hub/personal/schema.d.ts +4 -0
- package/dist/hub/personal/schema.js +54 -0
- package/dist/hub/personal/schema.js.map +1 -0
- package/dist/hub/personal/turns.d.ts +39 -0
- package/dist/hub/personal/turns.js +221 -0
- package/dist/hub/personal/turns.js.map +1 -0
- package/dist/hub/personal/types.d.ts +42 -0
- package/dist/hub/personal/types.js +2 -0
- package/dist/hub/personal/types.js.map +1 -0
- package/dist/hub/policy.d.ts +1 -1
- package/dist/hub/policy.js +2 -0
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +927 -1
- package/dist/hub/protocol.js +106 -14
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/published-version.d.ts +3 -0
- package/dist/hub/published-version.js +35 -0
- package/dist/hub/published-version.js.map +1 -0
- package/dist/hub/quota.js +3 -1
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/recommendation-model.d.ts +36 -0
- package/dist/hub/recommendation-model.js +9 -0
- package/dist/hub/recommendation-model.js.map +1 -0
- package/dist/hub/recommendations.d.ts +58 -0
- package/dist/hub/recommendations.js +211 -0
- package/dist/hub/recommendations.js.map +1 -0
- package/dist/hub/representative.d.ts +5 -0
- package/dist/hub/representative.js +6 -1
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/roles/admin-control.d.ts +29 -0
- package/dist/hub/roles/admin-control.js +187 -0
- package/dist/hub/roles/admin-control.js.map +1 -0
- package/dist/hub/roles/admin-types.d.ts +72 -0
- package/dist/hub/roles/admin-types.js +2 -0
- package/dist/hub/roles/admin-types.js.map +1 -0
- package/dist/hub/roles/allowed-list-control.d.ts +34 -0
- package/dist/hub/roles/allowed-list-control.js +179 -0
- package/dist/hub/roles/allowed-list-control.js.map +1 -0
- package/dist/hub/roles/allowed-list.d.ts +8 -0
- package/dist/hub/roles/allowed-list.js +49 -0
- package/dist/hub/roles/allowed-list.js.map +1 -0
- package/dist/hub/roles/audit-details.d.ts +144 -0
- package/dist/hub/roles/audit-details.js +26 -0
- package/dist/hub/roles/audit-details.js.map +1 -0
- package/dist/hub/roles/authority.d.ts +12 -0
- package/dist/hub/roles/authority.js +39 -3
- package/dist/hub/roles/authority.js.map +1 -1
- package/dist/hub/roles/change.d.ts +3 -1
- package/dist/hub/roles/change.js +7 -2
- package/dist/hub/roles/change.js.map +1 -1
- package/dist/hub/roles/clock.d.ts +3 -0
- package/dist/hub/roles/clock.js +1 -1
- package/dist/hub/roles/clock.js.map +1 -1
- package/dist/hub/roles/convert.js +1 -1
- package/dist/hub/roles/convert.js.map +1 -1
- package/dist/hub/roles/cutover-inventory.d.ts +2 -0
- package/dist/hub/roles/cutover-inventory.js +8 -1
- package/dist/hub/roles/cutover-inventory.js.map +1 -1
- package/dist/hub/roles/cutover.d.ts +2 -2
- package/dist/hub/roles/cutover.js +3 -4
- package/dist/hub/roles/cutover.js.map +1 -1
- package/dist/hub/roles/delegation.d.ts +4 -1
- package/dist/hub/roles/delegation.js +7 -2
- package/dist/hub/roles/delegation.js.map +1 -1
- package/dist/hub/roles/evaluate.d.ts +2 -1
- package/dist/hub/roles/evaluate.js +14 -0
- package/dist/hub/roles/evaluate.js.map +1 -1
- package/dist/hub/roles/expiry-effects.d.ts +8 -0
- package/dist/hub/roles/expiry-effects.js +50 -0
- package/dist/hub/roles/expiry-effects.js.map +1 -0
- package/dist/hub/roles/migrations.d.ts +7 -0
- package/dist/hub/roles/migrations.js +44 -0
- package/dist/hub/roles/migrations.js.map +1 -0
- package/dist/hub/roles/model.d.ts +25 -0
- package/dist/hub/roles/model.js +9 -3
- package/dist/hub/roles/model.js.map +1 -1
- package/dist/hub/roles/overview.d.ts +8 -0
- package/dist/hub/roles/overview.js +15 -0
- package/dist/hub/roles/overview.js.map +1 -0
- package/dist/hub/roles/resource-effects.d.ts +17 -0
- package/dist/hub/roles/resource-effects.js +62 -0
- package/dist/hub/roles/resource-effects.js.map +1 -0
- package/dist/hub/roles/review.d.ts +16 -0
- package/dist/hub/roles/review.js +42 -0
- package/dist/hub/roles/review.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +14 -3
- package/dist/hub/roles/writer.js +64 -16
- package/dist/hub/roles/writer.js.map +1 -1
- package/dist/hub/room-context-model.d.ts +43 -0
- package/dist/hub/room-context-model.js +12 -0
- package/dist/hub/room-context-model.js.map +1 -0
- package/dist/hub/room-mention-feedback-model.d.ts +12 -0
- package/dist/hub/room-mention-feedback-model.js +12 -0
- package/dist/hub/room-mention-feedback-model.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +45 -10
- package/dist/hub/rooms/agents.js +289 -31
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/assistant.d.ts +1 -6
- package/dist/hub/rooms/assistant.js +7 -2
- package/dist/hub/rooms/assistant.js.map +1 -1
- package/dist/hub/rooms/automation.d.ts +24 -0
- package/dist/hub/rooms/automation.js +66 -0
- package/dist/hub/rooms/automation.js.map +1 -0
- package/dist/hub/rooms/buttons.d.ts +85 -0
- package/dist/hub/rooms/buttons.js +62 -0
- package/dist/hub/rooms/buttons.js.map +1 -0
- package/dist/hub/rooms/context-cursor.d.ts +18 -0
- package/dist/hub/rooms/context-cursor.js +61 -0
- package/dist/hub/rooms/context-cursor.js.map +1 -0
- package/dist/hub/rooms/context.d.ts +1 -1
- package/dist/hub/rooms/context.js +4 -4
- package/dist/hub/rooms/context.js.map +1 -1
- package/dist/hub/rooms/direct-view.d.ts +10 -2
- package/dist/hub/rooms/direct-view.js +4 -4
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/mentions.d.ts +15 -0
- package/dist/hub/rooms/mentions.js +43 -0
- package/dist/hub/rooms/mentions.js.map +1 -0
- package/dist/hub/rooms/post-replies.d.ts +23 -0
- package/dist/hub/rooms/post-replies.js +114 -0
- package/dist/hub/rooms/post-replies.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +9 -0
- package/dist/hub/rooms/schema.js +43 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +195 -4
- package/dist/hub/rooms/service.js +812 -28
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +30 -3
- package/dist/hub/rooms.d.ts +13 -2
- package/dist/hub/rooms.js +97 -22
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/runtime.js +17 -4
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +8 -1
- package/dist/hub/server.js +115 -7
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-directory-transition.d.ts +2 -1
- package/dist/hub/session-directory-transition.js +10 -3
- package/dist/hub/session-directory-transition.js.map +1 -1
- package/dist/hub/sessions.d.ts +1 -1
- package/dist/hub/sessions.js +26 -4
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-commit.d.ts +32 -1
- package/dist/hub/settings-commit.js +11 -4
- package/dist/hub/settings-commit.js.map +1 -1
- package/dist/hub/settings-directory-ca.js +1 -1
- package/dist/hub/settings-directory-ca.js.map +1 -1
- package/dist/hub/settings-directory-control.js +7 -7
- package/dist/hub/settings-directory-control.js.map +1 -1
- package/dist/hub/settings-directory-http.d.ts +2 -0
- package/dist/hub/settings-directory-http.js +21 -6
- package/dist/hub/settings-directory-http.js.map +1 -1
- package/dist/hub/settings-directory-proof.d.ts +5 -1
- package/dist/hub/settings-directory-proof.js +49 -10
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.js +2 -1
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/settings-directory-save.d.ts +2 -0
- package/dist/hub/settings-directory-save.js +9 -6
- package/dist/hub/settings-directory-save.js.map +1 -1
- package/dist/hub/sharing-previous-access.d.ts +22 -0
- package/dist/hub/sharing-previous-access.js +93 -0
- package/dist/hub/sharing-previous-access.js.map +1 -0
- package/dist/hub/sharing-requests.d.ts +171 -0
- package/dist/hub/sharing-requests.js +311 -0
- package/dist/hub/sharing-requests.js.map +1 -0
- package/dist/hub/sharing-retention.d.ts +47 -0
- package/dist/hub/sharing-retention.js +83 -0
- package/dist/hub/sharing-retention.js.map +1 -0
- package/dist/hub/sharing-withdrawal.d.ts +14 -0
- package/dist/hub/sharing-withdrawal.js +28 -0
- package/dist/hub/sharing-withdrawal.js.map +1 -0
- package/dist/hub/sharing.js +2 -2
- package/dist/hub/sharing.js.map +1 -1
- package/dist/hub/socket.d.ts +1 -0
- package/dist/hub/socket.js +39 -2
- package/dist/hub/socket.js.map +1 -1
- package/dist/hub/teams/index.d.ts +8 -3
- package/dist/hub/teams/index.js +106 -31
- package/dist/hub/teams/index.js.map +1 -1
- package/dist/hub/teams/store.d.ts +5 -1
- package/dist/hub/teams/store.js +25 -2
- package/dist/hub/teams/store.js.map +1 -1
- package/dist/hub/teams/types.d.ts +19 -2
- package/dist/hub/types.d.ts +163 -5
- package/dist/hub-classic-private.d.ts +19 -0
- package/dist/hub-classic-private.js +64 -0
- package/dist/hub-classic-private.js.map +1 -0
- package/dist/hub-contact-windows.d.ts +11 -0
- package/dist/hub-contact-windows.js +56 -0
- package/dist/hub-contact-windows.js.map +1 -0
- package/dist/hub-page-sharing-settings.d.ts +6 -0
- package/dist/hub-page-sharing-settings.js +19 -0
- package/dist/hub-page-sharing-settings.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +1 -1
- package/dist/hub-room-conversation.d.ts +14 -0
- package/dist/hub-room-conversation.js +60 -0
- package/dist/hub-room-conversation.js.map +1 -0
- package/dist/hub-sharing-notice.d.ts +43 -0
- package/dist/hub-sharing-notice.js +34 -0
- package/dist/hub-sharing-notice.js.map +1 -0
- package/dist/hub-update-notice.d.ts +12 -0
- package/dist/hub-update-notice.js +35 -0
- package/dist/hub-update-notice.js.map +1 -0
- package/dist/human-delivery-receipts.js +8 -0
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +3 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +3 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +195 -24
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +19 -2
- package/dist/login-controller.js +26 -8
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.js +1 -1
- package/dist/login-flows.js.map +1 -1
- package/dist/native-mcp.js +7 -5
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-model-catalog.d.ts +15 -0
- package/dist/native-model-catalog.js +43 -3
- package/dist/native-model-catalog.js.map +1 -1
- package/dist/native-pane-lifecycle.js +3 -2
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-tools.js +3 -0
- package/dist/native-pane-tools.js.map +1 -1
- package/dist/needs-you.js +1 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +2 -2
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -4
- package/dist/outbound-handlers.js +54 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +17 -0
- package/dist/outbound-schemas.js +14 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +2 -0
- package/dist/public-web-gateway.js +155 -5
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/queued-handoffs.d.ts +16 -4
- package/dist/queued-handoffs.js +18 -1
- package/dist/queued-handoffs.js.map +1 -1
- package/dist/quickstart-api.d.ts +0 -1
- package/dist/quickstart-api.js +8 -1
- package/dist/quickstart-api.js.map +1 -1
- package/dist/remote-card-answer.d.ts +1 -1
- package/dist/remote-card-answer.js +8 -1
- package/dist/remote-card-answer.js.map +1 -1
- package/dist/remote-card-prompt.js +1 -1
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/reply-dedup.js +3 -1
- package/dist/reply-dedup.js.map +1 -1
- package/dist/reply-preview-files.d.ts +38 -0
- package/dist/reply-preview-files.js +142 -0
- package/dist/reply-preview-files.js.map +1 -0
- package/dist/reply-preview-spec.d.ts +18 -0
- package/dist/reply-preview-spec.js +27 -0
- package/dist/reply-preview-spec.js.map +1 -0
- package/dist/runtime-api.js +10 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +1 -0
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +13 -10
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-cli.js +31 -5
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +5 -0
- package/dist/runtime-client-store.js +28 -0
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +4 -0
- package/dist/runtime-client.js +33 -10
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +4 -2
- package/dist/runtime-coordinator.js +33 -6
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-install.d.ts +6 -1
- package/dist/runtime-install.js +12 -4
- package/dist/runtime-install.js.map +1 -1
- package/dist/runtime-pane-native.js +3 -1
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-personal-answer-only-probe.d.ts +3 -0
- package/dist/runtime-personal-answer-only-probe.js +134 -0
- package/dist/runtime-personal-answer-only-probe.js.map +1 -0
- package/dist/runtime-personal-answer-only.d.ts +16 -0
- package/dist/runtime-personal-answer-only.js +54 -0
- package/dist/runtime-personal-answer-only.js.map +1 -0
- package/dist/runtime-personal-answer.d.ts +30 -0
- package/dist/runtime-personal-answer.js +124 -0
- package/dist/runtime-personal-answer.js.map +1 -0
- package/dist/runtime-personal-preflight.d.ts +8 -0
- package/dist/runtime-personal-preflight.js +103 -0
- package/dist/runtime-personal-preflight.js.map +1 -0
- package/dist/runtime-personal-profile.d.ts +40 -0
- package/dist/runtime-personal-profile.js +81 -0
- package/dist/runtime-personal-profile.js.map +1 -0
- package/dist/runtime-personal-protocol.d.ts +10 -0
- package/dist/runtime-personal-protocol.js +15 -0
- package/dist/runtime-personal-protocol.js.map +1 -0
- package/dist/runtime-personal-stage.d.ts +37 -0
- package/dist/runtime-personal-stage.js +167 -0
- package/dist/runtime-personal-stage.js.map +1 -0
- package/dist/runtime-protocol.d.ts +2 -0
- package/dist/settings-api.d.ts +16 -0
- package/dist/settings-api.js +294 -86
- 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-change.js +33 -5
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +3 -0
- package/dist/settings-effect.js +29 -3
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +18 -44
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/setup-form.js +10 -0
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.js +2 -2
- package/dist/setup-i18n.js.map +1 -1
- package/dist/subagent-records.js +53 -11
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.js +3 -1
- package/dist/subagent-service.js.map +1 -1
- package/dist/tmux-manager.d.ts +2 -0
- package/dist/tmux-manager.js +2 -0
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.js +3 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +9 -0
- package/dist/tool-progress.js +141 -32
- package/dist/tool-progress.js.map +1 -1
- package/dist/transcript-needles.d.ts +4 -2
- package/dist/transcript-needles.js +35 -4
- package/dist/transcript-needles.js.map +1 -1
- package/dist/tunnel/lease.d.ts +14 -0
- package/dist/tunnel/lease.js +23 -0
- package/dist/tunnel/lease.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +2 -2
- package/dist/turn-reply-guard.js +3 -3
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +12 -2
- package/dist/ui/backend-signin.js +91 -22
- package/dist/ui/chat-activity-groups.js +41 -8
- package/dist/ui/chat-activity.js +5 -3
- package/dist/ui/chat-mentions.js +13 -0
- package/dist/ui/chat-msg-actions.js +3 -222
- package/dist/ui/chat-pins.js +106 -0
- package/dist/ui/chat-popout-header.js +2 -2
- package/dist/ui/chat-store.js +143 -7
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/chat-workspace.js +3 -3
- package/dist/ui/fleet-canvas.js +14 -5
- package/dist/ui/fleet-office-card.js +8 -4
- package/dist/ui/fleet-office-carousel.d.ts +14 -0
- package/dist/ui/fleet-office-carousel.js +95 -0
- package/dist/ui/fleet-office-editor.js +6 -1
- package/dist/ui/fleet-office-model.js +2 -1
- package/dist/ui/fleet-office-pack.d.ts +1 -0
- package/dist/ui/fleet-office-pack.js +6 -2
- package/dist/ui/fleet-office-play.js +84 -0
- package/dist/ui/fleet-office-skin.js +1 -1
- package/dist/ui/fleet-office-store.js +37 -2
- package/dist/ui/fleet-office-zones.js +55 -10
- package/dist/ui/fleet-office.js +281 -32
- package/dist/ui/fleet-tasks.js +1 -1
- package/dist/ui/host-install.js +5 -2
- package/dist/ui/hub-admin-overview.js +189 -0
- package/dist/ui/hub-admin-rooms.js +1 -1
- package/dist/ui/hub-agent-copy.js +6 -2
- package/dist/ui/hub-agent-intro.js +26 -0
- package/dist/ui/hub-ai-apps-strings.js +6 -0
- package/dist/ui/hub-ai-apps.js +83 -0
- package/dist/ui/hub-chat-strings.js +9 -2
- package/dist/ui/hub-client.js +87 -5
- package/dist/ui/hub-directory-editor-strings.js +2 -2
- package/dist/ui/hub-directory-editor.js +1 -0
- package/dist/ui/hub-fleet-versions.js +393 -0
- package/dist/ui/hub-grant-picker.js +26 -46
- package/dist/ui/hub-group-policy.js +26 -13
- package/dist/ui/hub-group-strings.js +26 -17
- package/dist/ui/hub-join-steps.js +27 -15
- package/dist/ui/hub-my-agents-model.js +42 -0
- package/dist/ui/hub-my-agents-strings.js +18 -0
- package/dist/ui/hub-my-agents.js +141 -0
- package/dist/ui/hub-owner-strings.js +7 -7
- package/dist/ui/hub-personal-agent-strings.js +246 -0
- package/dist/ui/hub-personal-agent.js +118 -0
- package/dist/ui/hub-policy-subjects.js +35 -0
- package/dist/ui/hub-quick-pairing.js +7 -2
- package/dist/ui/hub-role-audit.js +39 -0
- package/dist/ui/hub-role-forms.js +99 -0
- package/dist/ui/hub-role-notices.js +11 -0
- package/dist/ui/hub-role-view.js +86 -0
- package/dist/ui/hub-roles-strings.js +439 -0
- package/dist/ui/hub-roles.js +83 -0
- package/dist/ui/hub-room-agent-strings.js +28 -0
- package/dist/ui/hub-room-composer.js +45 -13
- package/dist/ui/hub-room-favorites.js +63 -5
- package/dist/ui/hub-room-list.js +5 -3
- package/dist/ui/hub-room-members-strings.js +2 -2
- package/dist/ui/hub-room-members.js +9 -5
- package/dist/ui/hub-room-new.js +1 -1
- package/dist/ui/hub-room-notify.js +161 -0
- package/dist/ui/hub-room-search.js +126 -0
- package/dist/ui/hub-room-settings.js +6 -0
- package/dist/ui/hub-room-source-strings.js +17 -0
- package/dist/ui/hub-room-source.js +34 -0
- package/dist/ui/hub-room-strings.js +49 -3
- package/dist/ui/hub-room-thread.js +269 -42
- package/dist/ui/hub-room-unread.js +2 -1
- package/dist/ui/hub-strings.js +13 -5
- package/dist/ui/hub-subject-picker.js +58 -0
- package/dist/ui/hub-switcher.js +2 -2
- package/dist/ui/hub-teams-strings.js +10 -6
- package/dist/ui/hub-teams.js +56 -28
- package/dist/ui/hub-this-hub.js +2 -2
- package/dist/ui/hub-welcome.js +122 -75
- package/dist/ui/image-annotate.js +2 -283
- package/dist/ui/image-lightbox.js +2 -176
- package/dist/ui/image-zoom.js +2 -242
- package/dist/ui/model-picker.js +4 -1
- package/dist/ui/notice-hub-sharing.js +81 -0
- package/dist/ui/notice-hub-update.js +94 -0
- package/dist/ui/office-share-dialog.js +2 -2
- package/dist/ui/panel-chat.js +327 -28
- package/dist/ui/panel-details.js +3 -1
- package/dist/ui/panel-fleet.js +28 -7
- package/dist/ui/panel-hub.js +303 -103
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-notices.js +4 -1
- package/dist/ui/panel-settings.js +45 -34
- package/dist/ui/preview-panel.js +3 -1
- package/dist/ui/reply-file-preview.js +64 -0
- package/dist/ui/runtime-commands.d.ts +2 -2
- package/dist/ui/runtime-commands.js +7 -4
- package/dist/ui/settings-access-overview.js +3 -3
- package/dist/ui/settings-appearance.js +7 -10
- package/dist/ui/settings-archive-files.js +109 -0
- package/dist/ui/settings-build-version.js +2 -2
- package/dist/ui/settings-catalog.js +22 -0
- package/dist/ui/settings-connector-strings.js +23 -0
- package/dist/ui/settings-connector.js +39 -0
- package/dist/ui/settings-guests-entries.js +16 -0
- package/dist/ui/settings-guests.js +57 -15
- package/dist/ui/settings-hub-connection.js +6 -7
- package/dist/ui/settings-hub-membership.js +6 -7
- package/dist/ui/settings-hub-page-sharing.js +52 -0
- package/dist/ui/settings-hub-section.js +2 -4
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-updates.js +67 -0
- package/dist/ui/settings-hub.js +34 -6
- package/dist/ui/settings-layout.js +10 -12
- package/dist/ui/settings-registry.js +19 -3
- package/dist/ui/settings-shared-strings.js +2 -0
- package/dist/ui/settings-strings.js +13 -2
- package/dist/ui/settings-update.js +11 -5
- package/dist/ui/settings-web-authority.js +7 -5
- package/dist/ui/shared/access-overview.css +1 -1
- package/dist/ui/shared/accounts-keepalive.css +1 -1
- package/dist/ui/shared/accounts.css +1 -1
- package/dist/ui/shared/agent-sheet.js +116 -0
- package/dist/ui/shared/agent-widget.js +1 -2
- package/dist/ui/shared/app-i18n.js +4 -0
- package/dist/ui/shared/app-nav.js +9 -5
- package/dist/ui/shared/app-prefs.js +9 -3
- package/dist/ui/shared/app-route.js +4 -2
- package/dist/ui/shared/app-shell.js +184 -23
- package/dist/ui/shared/app-store.js +7 -3
- package/dist/ui/shared/app-stream.js +6 -2
- package/dist/ui/shared/app-swipe.js +3 -1
- package/dist/ui/shared/app-themes.js +3 -5
- package/dist/ui/shared/app-update.js +90 -8
- package/dist/ui/shared/app.css +469 -203
- package/dist/ui/shared/app.js +1 -1
- package/dist/ui/shared/chat-composer.js +29 -5
- package/dist/ui/shared/chat-msg-actions.js +231 -0
- package/dist/ui/shared/chat-strings.js +19 -4
- package/dist/ui/shared/chat-thread.js +120 -17
- package/dist/ui/shared/chat-work-bar.css +118 -0
- package/dist/ui/shared/connector-prompt.d.ts +3 -0
- package/dist/ui/shared/connector-prompt.js +20 -0
- package/dist/ui/shared/hub-ai-apps.css +12 -0
- package/dist/ui/shared/hub-chat.css +61 -4
- package/dist/ui/shared/hub-groups.css +19 -15
- package/dist/ui/shared/hub-my-agents.css +35 -0
- package/dist/ui/shared/hub-owner.css +118 -3
- package/dist/ui/shared/hub-roles.css +99 -0
- package/dist/ui/shared/hub-rooms-u2.css +34 -0
- package/dist/ui/shared/hub.css +23 -5
- package/dist/ui/shared/image-annotate.css +22 -3
- package/dist/ui/shared/image-annotate.js +415 -0
- package/dist/ui/shared/image-lightbox.js +218 -0
- package/dist/ui/shared/image-zoom.js +316 -0
- package/dist/ui/shared/instance-nav.js +120 -15
- package/dist/ui/shared/loading.css +1 -1
- package/dist/ui/shared/model-picker.css +32 -4
- package/dist/ui/shared/owner-css.js +1 -1
- package/dist/ui/shared/panel-view.js +7 -1
- package/dist/ui/shared/preview-panel-actions.js +1 -1
- package/dist/ui/shared/preview-panel.js +6 -2
- package/dist/ui/shared/reply-previews.css +4 -0
- package/dist/ui/shared/runtime-install.css +5 -0
- package/dist/ui/shared/settings-connector.css +7 -0
- package/dist/ui/shared/signin.js +27 -12
- package/dist/ui/shared/task-board.css +2 -2
- package/dist/ui/shared/theme.js +52 -0
- package/dist/ui/shared/tokens.css +27 -10
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-toast.js +4 -4
- package/dist/ui/shared/usage-dialog.js +113 -17
- package/dist/ui/shared/view-strings.js +26 -4
- package/dist/ui/shared/web-authorize.js +3 -3
- package/dist/ui/signin.html +4 -2
- package/dist/ui/structured-signin.js +64 -12
- package/dist/ui/web-terminal/terminal.css +1 -1
- package/dist/ui/workspace-panel.js +4 -3
- package/dist/update-dispatch.d.ts +8 -1
- package/dist/update-dispatch.js +16 -1
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-idle.d.ts +65 -0
- package/dist/update-idle.js +190 -0
- package/dist/update-idle.js.map +1 -0
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +9 -2
- package/dist/update-launch.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +1 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +2 -0
- package/dist/usage/profile-timeline.js +4 -0
- package/dist/usage/profile-timeline.js.map +1 -1
- package/dist/usage/providers.js +6 -6
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +1 -1
- package/dist/view-api.js +1 -1
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +13 -1
- package/dist/web-api.js +489 -189
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +5 -1
- package/dist/web-backend-login.js +8 -2
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-archive.d.ts +147 -0
- package/dist/web-chat-archive.js +530 -0
- package/dist/web-chat-archive.js.map +1 -0
- package/dist/web-chat-history.d.ts +76 -0
- package/dist/web-chat-history.js +145 -1
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +4 -3
- package/dist/web-commands.js +3 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-guest-access.d.ts +3 -0
- package/dist/web-guest-access.js +6 -2
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-icons.js +3 -3
- package/dist/web-icons.js.map +1 -1
- package/dist/web-login.d.ts +7 -0
- package/dist/web-login.js +8 -1
- package/dist/web-login.js.map +1 -1
- package/dist/web-mentions.d.ts +2 -0
- package/dist/web-mentions.js +20 -0
- package/dist/web-mentions.js.map +1 -1
- package/dist/web-notices.d.ts +20 -0
- package/dist/web-notices.js +64 -8
- package/dist/web-notices.js.map +1 -1
- package/dist/web-office-store.d.ts +2 -0
- package/dist/web-office-store.js +15 -3
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-pin-store.d.ts +58 -0
- package/dist/web-pin-store.js +170 -0
- package/dist/web-pin-store.js.map +1 -0
- package/dist/web-prefs.js +5 -1
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-session-authorization.d.ts +24 -0
- package/dist/web-session-authorization.js +32 -0
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +6 -4
- package/dist/web-session.js +5 -3
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +24 -3
- package/dist/web-settings-patch.js +57 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-theme.js +2 -2
- package/dist/web-update.d.ts +15 -1
- package/dist/web-upload.d.ts +36 -0
- package/dist/web-upload.js +105 -5
- package/dist/web-upload.js.map +1 -1
- package/dist/windows-cli-api.d.ts +10 -7
- package/dist/windows-cli-api.js +13 -12
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +10 -0
- package/dist/windows-cli-worker.js +109 -14
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +10 -1
- package/dist/windows-cli.js +47 -13
- package/dist/windows-cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/runtime-install/install.ps1 +24 -4
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// M-3162 (Lumen's approved mockup, docs/evidence/hub-admin-dashboard on docs/hub-ux-review-m2902; API M-3161,
|
|
2
|
+
// docs/design/hub-admin-dashboard-api.md): Administration → Overview — how the Hub is being used, in counts only.
|
|
3
|
+
// People, Questions (per day, answer time, not answered, the most-asked agents), Fleets and Rooms, for Today or 7 days in
|
|
4
|
+
// this browser's own time zone, read again every minute. Never what anyone asked or answered, never counted by person;
|
|
5
|
+
// the line under the range says so. No token or cost figures. A Hub nobody has joined yet shows one line and "Let
|
|
6
|
+
// colleagues join" instead of a page of zeros (the Fleets still show: a Fleet may be paired before anyone uses the Hub).
|
|
7
|
+
// A module of its own with its own words (upgrade skew: a tab holding an older dictionary still has every word).
|
|
8
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
9
|
+
import { register, t, lang } from "/assets/app-i18n.js";
|
|
10
|
+
import { ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
11
|
+
|
|
12
|
+
register("hubOverview", {
|
|
13
|
+
en: {
|
|
14
|
+
today: "Today", week: "7 days", rangeLabel: "Period",
|
|
15
|
+
updated: "Updated {0} · refreshes every minute",
|
|
16
|
+
privacy: "Counts only. This page never shows what anyone asked or what an agent answered, and never counts by person.",
|
|
17
|
+
hPeople: "People", hAsk: "Questions", hFleet: "Fleets", hRoom: "Rooms",
|
|
18
|
+
pToday: "Active today", pTodaySub: "of {0} people who have joined", pWeek: "Active in 7 days", pWeekSub: "{0} have not signed in this week",
|
|
19
|
+
pWeekAll: "everyone who has joined", pJoin: "Joined this week", pJoinSub: "{0} in total", pNow: "Signed in now", pNowSub: "active in the last 5 minutes",
|
|
20
|
+
qPerDay: "Questions per day", qRange_today: "today", qRange_7d: "7 days", qHint: "Each agent asked counts once.", qToday: "Today",
|
|
21
|
+
aTime: "Answer time", aMed: "Typical (median)", aSlow: "Slowest 1 in 10", aWait: "Waiting now", aWaitOld: "Longest wait now",
|
|
22
|
+
notEnough: "Not enough answers yet", none: "—",
|
|
23
|
+
fTitle: "Not answered", fRate: "{0}% of questions", fOff: "The agent's Fleet was offline", fTime: "No answer in time",
|
|
24
|
+
fPerm: "Permission ended first", fBusy: "Agent stopped or refused", fUnknown: "Other or unknown",
|
|
25
|
+
topTitle: "Most-asked agents", topAgent: "Agent", topAsk: "Questions", topMed: "Typical answer", topFail: "Not answered",
|
|
26
|
+
topNone: "No agent has been asked anything in this period.", topShared: "{0} shared agents in all.",
|
|
27
|
+
flOn: "Connected now", flOnSub: "of {0} Fleets", flBehind: "Need an update", flBehindSub: "below the recommended v{0}",
|
|
28
|
+
flBehindNoRec: "no recommended version set", flOld: "Too old for rooms", flOldSub: "their agents cannot answer in rooms",
|
|
29
|
+
flUnk: "Version unknown", flUnkSub: "too old to report a version", flLink: "See Connected Fleets",
|
|
30
|
+
rmPosts: "Messages", rmP: "People", rmA: "Agents", rmH: "Room assistant", rmActive: "Active rooms", rmActiveSub: "of {0} rooms · {1} created this week",
|
|
31
|
+
rmAsk: "Agent questions in rooms", rmAskSub: "@mentions that asked an agent", rmAuto: "Agent-to-agent chains stopped", rmAutoSub: "hit the depth or rate limit",
|
|
32
|
+
rmNote: "Counts across all rooms. Room names and members are not listed here: an administrator is not a member of every room.",
|
|
33
|
+
emptyLine: "Nobody has joined yet. Let colleagues join to see activity here.", emptyButton: "Let colleagues join",
|
|
34
|
+
sec: "{0} s", min: "{0} min", hour: "{0} h",
|
|
35
|
+
},
|
|
36
|
+
"zh-TW": {
|
|
37
|
+
today: "今天", week: "7 天", rangeLabel: "期間",
|
|
38
|
+
updated: "更新於 {0} · 每分鐘更新一次",
|
|
39
|
+
privacy: "這裡只有數字。不會顯示任何人問了什麼、Agent 答了什麼,也不會按人統計。",
|
|
40
|
+
hPeople: "使用的人", hAsk: "提問", hFleet: "Fleet", hRoom: "房間",
|
|
41
|
+
pToday: "今天使用", pTodaySub: "已加入的 {0} 人當中", pWeek: "7 天內使用", pWeekSub: "有 {0} 人這週沒有登入",
|
|
42
|
+
pWeekAll: "已加入的人都有使用", pJoin: "這週加入", pJoinSub: "總共 {0} 人", pNow: "目前登入中", pNowSub: "最近 5 分鐘內有操作",
|
|
43
|
+
qPerDay: "每天的提問數", qRange_today: "今天", qRange_7d: "7 天", qHint: "每問一個 Agent 算一次。", qToday: "今天",
|
|
44
|
+
aTime: "回答時間", aMed: "一般(中位數)", aSlow: "最慢的十分之一", aWait: "正在等回答", aWaitOld: "目前等最久",
|
|
45
|
+
notEnough: "回答數還不夠", none: "—",
|
|
46
|
+
fTitle: "沒有得到回答", fRate: "占全部提問的 {0}%", fOff: "Agent 的 Fleet 沒有連接", fTime: "逾時沒有回答",
|
|
47
|
+
fPerm: "權限先到期", fBusy: "Agent 停止或拒絕", fUnknown: "其他或原因不明",
|
|
48
|
+
topTitle: "最常被問的 Agent", topAgent: "Agent", topAsk: "提問數", topMed: "一般回答時間", topFail: "沒有回答",
|
|
49
|
+
topNone: "這段期間還沒有人問過 Agent。", topShared: "總共分享了 {0} 個 Agent。",
|
|
50
|
+
flOn: "目前已連接", flOnSub: "共 {0} 個 Fleet", flBehind: "需要更新", flBehindSub: "低於建議版本 v{0}",
|
|
51
|
+
flBehindNoRec: "還沒有設定建議版本", flOld: "版本太舊,無法使用房間", flOldSub: "它們的 Agent 無法在房間裡回答",
|
|
52
|
+
flUnk: "版本不明", flUnkSub: "版本太舊,無法回報版本", flLink: "查看已連接的 Fleet",
|
|
53
|
+
rmPosts: "訊息數", rmP: "人", rmA: "Agent", rmH: "房間助理", rmActive: "有活動的房間", rmActiveSub: "共 {0} 個房間 · 這週新增 {1} 個",
|
|
54
|
+
rmAsk: "在房間裡問 Agent", rmAskSub: "用 @ 提及來問 Agent 的次數", rmAuto: "Agent 互問被停止", rmAutoSub: "達到層數或頻率上限",
|
|
55
|
+
rmNote: "所有房間的合計。這裡不列出房間名稱與成員:管理員不一定是每個房間的成員。",
|
|
56
|
+
emptyLine: "還沒有人加入。開放同仁加入之後,這裡會顯示使用情形。", emptyButton: "讓同仁加入",
|
|
57
|
+
sec: "{0} 秒", min: "{0} 分鐘", hour: "{0} 小時",
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
export const ho = (key, ...args) => t(`hubOverview.${key}`, ...args);
|
|
61
|
+
|
|
62
|
+
const RANGE_KEY = "agend_hub_overview_range";
|
|
63
|
+
const REFRESH_MS = 60_000;
|
|
64
|
+
const num = (n) => (typeof n === "number" && Number.isFinite(n) ? n.toLocaleString(lang() === "zh-TW" ? "zh-TW" : "en") : "0");
|
|
65
|
+
/** A duration in plain words: seconds under a minute, minutes (one decimal under ten) under an hour, hours beyond. */
|
|
66
|
+
export function durationText(ms) {
|
|
67
|
+
if (typeof ms !== "number" || !Number.isFinite(ms) || ms < 0) return null;
|
|
68
|
+
const s = ms / 1000;
|
|
69
|
+
if (s < 60) return ho("sec", String(Math.max(1, Math.round(s))));
|
|
70
|
+
const m = s / 60;
|
|
71
|
+
if (m < 60) return ho("min", m < 10 ? String(Math.round(m * 10) / 10) : String(Math.round(m)));
|
|
72
|
+
return ho("hour", String(Math.round((m / 60) * 10) / 10));
|
|
73
|
+
}
|
|
74
|
+
/** The day label under a bar: the last bar is Today; the others are their weekday, in this page's language. */
|
|
75
|
+
export function dayLabel(date, last) {
|
|
76
|
+
if (last) return ho("qToday");
|
|
77
|
+
const d = new Date(`${date}T12:00:00Z`);
|
|
78
|
+
if (Number.isNaN(d.getTime())) return date;
|
|
79
|
+
return new Intl.DateTimeFormat(lang() === "zh-TW" ? "zh-TW" : "en", { weekday: lang() === "zh-TW" ? "narrow" : "short", timeZone: "UTC" }).format(d);
|
|
80
|
+
}
|
|
81
|
+
const zone = () => { try { return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"; } catch { return "UTC"; } };
|
|
82
|
+
const readRange = () => { try { return sessionStorage.getItem(RANGE_KEY) === "today" ? "today" : "7d"; } catch { return "7d"; } };
|
|
83
|
+
|
|
84
|
+
function Card({ title, big, sub, cls = "" }) {
|
|
85
|
+
return html`<div class=${`hub-ov-card${cls ? ` ${cls}` : ""}`}><div class="hub-ov-card-title">${title}</div>
|
|
86
|
+
<div class="hub-ov-big">${big}</div>${sub ? html`<div class="hub-ov-sub">${sub}</div>` : null}</div>`;
|
|
87
|
+
}
|
|
88
|
+
function Rows({ rows }) {
|
|
89
|
+
return html`<dl class="hub-ov-kv">${rows.map(([k, v]) => html`<div key=${k}><dt>${k}</dt><dd>${v}</dd></div>`)}</dl>`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The Overview. `client.adminDashboard({ range, timeZone })` → the M-3161 response (or { ok: false, status }). `onOpen(view,
|
|
94
|
+
* anchor)` opens another Administration tab (Manage at a card: "join", "fleets"); `onGone()` when the route is not there.
|
|
95
|
+
*/
|
|
96
|
+
export function HubAdminOverview({ client, onOpen = () => {}, onGone = () => {} }) {
|
|
97
|
+
const [range, setRange] = useState(readRange), [data, setData] = useState(null), [error, setError] = useState(false), [at, setAt] = useState(0);
|
|
98
|
+
const live = useRef(true), asked = useRef(0);
|
|
99
|
+
const load = async (r = range) => {
|
|
100
|
+
const mine = ++asked.current;
|
|
101
|
+
const res = await client.adminDashboard({ range: r, timeZone: zone() }).catch(() => null);
|
|
102
|
+
if (!live.current || mine !== asked.current) return;
|
|
103
|
+
if (res && res.ok !== false && res.people) { setData(res); setError(false); setAt(Date.now()); }
|
|
104
|
+
else if (res && res.status === 404) onGone(); // an older Hub after all: the page shows Manage instead
|
|
105
|
+
else setError(true);
|
|
106
|
+
};
|
|
107
|
+
useEffect(() => { live.current = true; void load(range); const id = setInterval(() => { void load(range); }, REFRESH_MS); return () => { live.current = false; clearInterval(id); }; }, [range]);
|
|
108
|
+
const pick = (r) => { if (r === range) return; try { sessionStorage.setItem(RANGE_KEY, r); } catch { /* private mode */ } setRange(r); };
|
|
109
|
+
const head = html`<div class="hub-ov-bar">
|
|
110
|
+
<div class="hub-ov-range" role="group" aria-label=${ho("rangeLabel")}>
|
|
111
|
+
${["today", "7d"].map((r) => html`<button key=${r} type="button" class=${`hub-ov-range-item${range === r ? " is-current" : ""}`} aria-pressed=${range === r ? "true" : "false"} onClick=${() => pick(r)}>${ho(r === "today" ? "today" : "week")}</button>`)}
|
|
112
|
+
</div>
|
|
113
|
+
${at ? html`<span class="note hub-ov-updated">${ho("updated", new Date(at).toLocaleTimeString(lang() === "zh-TW" ? "zh-TW" : "en", { hour: "2-digit", minute: "2-digit" }))}</span>` : null}
|
|
114
|
+
</div>
|
|
115
|
+
<p class="note hub-ov-privacy">${ho("privacy")}</p>`;
|
|
116
|
+
if (!data) return html`<div class="hub-ov">${head}${error ? html`<${ErrorState} onRetry=${() => load(range)} />` : html`<${Skeleton} variant="rows" lines=${6} />`}</div>`;
|
|
117
|
+
const { people, questions: q, topAgents = [], fleets: f, rooms: rm } = data;
|
|
118
|
+
const fleetsSection = html`<section class="hub-ov-section"><h3>${ho("hFleet")}</h3>
|
|
119
|
+
<div class="hub-ov-grid4">
|
|
120
|
+
<${Card} title=${ho("flOn")} big=${num(f.connected)} sub=${ho("flOnSub", num(f.total))} />
|
|
121
|
+
<${Card} title=${ho("flBehind")} big=${num(f.needsUpdate)} sub=${f.recommendedVersion ? ho("flBehindSub", f.recommendedVersion) : ho("flBehindNoRec")} cls=${f.needsUpdate ? "warn" : ""} />
|
|
122
|
+
<${Card} title=${ho("flOld")} big=${num(f.tooOldRooms)} sub=${ho("flOldSub")} cls=${f.tooOldRooms ? "warn" : ""} />
|
|
123
|
+
<${Card} title=${ho("flUnk")} big=${num(f.unknownVersion)} sub=${ho("flUnkSub")} cls=${f.unknownVersion ? "warn" : ""} />
|
|
124
|
+
</div>
|
|
125
|
+
<a class="hub-ov-link" href="/ui/hub/admin?view=manage#fleets" onClick=${(e) => { if (e.metaKey || e.ctrlKey) return; e.preventDefault(); onOpen("manage", "fleets"); }}>${ho("flLink")} ›</a></section>`;
|
|
126
|
+
// A Hub nobody has joined yet: one line and the way to change that, instead of a page of zeros (Lumen, M-3162).
|
|
127
|
+
if (!people.total) return html`<div class="hub-ov">${head}
|
|
128
|
+
<section class="hub-ov-empty card"><p>${ho("emptyLine")}</p><button type="button" class="btn btn-primary" onClick=${() => onOpen("manage", "join")}>${ho("emptyButton")}</button></section>
|
|
129
|
+
${fleetsSection}</div>`;
|
|
130
|
+
const perDay = Array.isArray(q.perDay) ? q.perDay : [];
|
|
131
|
+
const peak = Math.max(1, ...perDay.map((d) => d.count || 0));
|
|
132
|
+
const reasons = q.notAnswered?.reasons || {};
|
|
133
|
+
const failRows = [["fOff", reasons.offline], ["fTime", reasons.timedOut], ["fPerm", reasons.permissionEnded], ["fBusy", reasons.stoppedOrRefused],
|
|
134
|
+
...(reasons.unknown ? [["fUnknown", reasons.unknown]] : [])].map(([k, v]) => [ho(k), num(v || 0)]);
|
|
135
|
+
const topPeak = Math.max(1, ...topAgents.map((a) => a.questions || 0));
|
|
136
|
+
const by = rm.byAuthor || {}, posts = Math.max(1, (by.people || 0) + (by.agents || 0) + (by.assistant || 0));
|
|
137
|
+
const share = (n) => `${Math.round(((n || 0) / posts) * 1000) / 10}%`;
|
|
138
|
+
return html`<div class="hub-ov">${head}
|
|
139
|
+
<section class="hub-ov-section"><h3>${ho("hPeople")}</h3>
|
|
140
|
+
<div class="hub-ov-grid4">
|
|
141
|
+
<${Card} title=${ho("pToday")} big=${num(people.activeToday)} sub=${ho("pTodaySub", num(people.total))} />
|
|
142
|
+
<${Card} title=${ho("pWeek")} big=${num(people.active7d)} sub=${people.total > people.active7d ? ho("pWeekSub", num(people.total - people.active7d)) : ho("pWeekAll")} />
|
|
143
|
+
<${Card} title=${ho("pJoin")} big=${num(people.joined7d)} sub=${ho("pJoinSub", num(people.total))} />
|
|
144
|
+
<${Card} title=${ho("pNow")} big=${num(people.signedInNow)} sub=${ho("pNowSub")} />
|
|
145
|
+
</div></section>
|
|
146
|
+
<section class="hub-ov-section"><h3>${ho("hAsk")}</h3>
|
|
147
|
+
<div class="hub-ov-split">
|
|
148
|
+
<div class="hub-ov-card hub-ov-perday"><div class="hub-ov-card-title">${ho("qPerDay")}</div>
|
|
149
|
+
<div class="hub-ov-big">${num(q.asked)} <small>${ho(`qRange_${data.range === "today" ? "today" : "7d"}`)}</small></div>
|
|
150
|
+
<div class="hub-ov-bars" role="img" aria-label=${perDay.map((d, i) => `${dayLabel(d.date, i === perDay.length - 1)} ${d.count}`).join(", ")}>
|
|
151
|
+
${perDay.map((d, i) => html`<div key=${d.date} class=${i === perDay.length - 1 ? "today" : ""}><b>${num(d.count)}</b>
|
|
152
|
+
<i ref=${(el) => el?.style?.setProperty("height", `${Math.round(((d.count || 0) / peak) * 100)}%`)}></i><span>${dayLabel(d.date, i === perDay.length - 1)}</span></div>`)}
|
|
153
|
+
</div>
|
|
154
|
+
<p class="note">${ho("qHint")}</p></div>
|
|
155
|
+
<div class="hub-ov-stack">
|
|
156
|
+
<div class="hub-ov-card"><div class="hub-ov-card-title">${ho("aTime")}</div>
|
|
157
|
+
<${Rows} rows=${[[ho("aMed"), durationText(q.answerTime?.medianMs) ?? ho("notEnough")], [ho("aSlow"), durationText(q.answerTime?.p90Ms) ?? ho("notEnough")]]} />
|
|
158
|
+
<${Rows} rows=${[[ho("aWait"), num(q.waiting)], [ho("aWaitOld"), durationText(q.longestWaitMs) ?? ho("none")]]} /></div>
|
|
159
|
+
<div class="hub-ov-card"><div class="hub-ov-card-title">${ho("fTitle")}</div>
|
|
160
|
+
<div class="hub-ov-big">${num(q.notAnswered?.total)}${q.asked ? html` <small>${ho("fRate", String(Math.round(((q.notAnswered?.total || 0) / q.asked) * 1000) / 10))}</small>` : null}</div>
|
|
161
|
+
<${Rows} rows=${failRows} /></div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="hub-ov-card hub-ov-top"><div class="hub-ov-card-title">${ho("topTitle")}</div>
|
|
165
|
+
${topAgents.length ? html`<table><thead><tr><th class="rank"></th><th>${ho("topAgent")}</th><th class="n">${ho("topAsk")}</th><th class="n">${ho("topMed")}</th><th class="n">${ho("topFail")}</th></tr></thead>
|
|
166
|
+
<tbody>${topAgents.map((a, i) => html`<tr key=${a.id}><td class="rank">${i + 1}</td>
|
|
167
|
+
<td><div class="hub-ov-agent">${a.name}</div>${a.ownerName ? html`<div class="note">${a.ownerName}</div>` : null}<div class="hub-ov-meter"><i ref=${(el) => el?.style?.setProperty("width", `${Math.round(((a.questions || 0) / topPeak) * 100)}%`)}></i></div></td>
|
|
168
|
+
<td class="n">${num(a.questions)}</td><td class="n">${durationText(a.medianMs) ?? html`<span class="note">${ho("notEnough")}</span>`}</td>
|
|
169
|
+
<td class="n">${a.notAnswered ? html`<span class="tag warn">${num(a.notAnswered)}</span>` : "0"}</td></tr>`)}</tbody></table>`
|
|
170
|
+
: html`<p class="note">${ho("topNone")}</p>`}
|
|
171
|
+
<p class="note">${ho("topShared", num(data.sharedAgents))}</p></div>
|
|
172
|
+
</section>
|
|
173
|
+
${fleetsSection}
|
|
174
|
+
<section class="hub-ov-section"><h3>${ho("hRoom")}</h3>
|
|
175
|
+
<div class="hub-ov-split">
|
|
176
|
+
<div class="hub-ov-card"><div class="hub-ov-card-title">${ho("rmPosts")}</div>
|
|
177
|
+
<div class="hub-ov-big">${num(rm.messages)} <small>${ho(`qRange_${data.range === "today" ? "today" : "7d"}`)}</small></div>
|
|
178
|
+
<div class="hub-ov-split-bar" role="img" aria-label=${`${ho("rmP")} ${by.people || 0}, ${ho("rmA")} ${by.agents || 0}, ${ho("rmH")} ${by.assistant || 0}`}>
|
|
179
|
+
<i class="p" ref=${(el) => el?.style?.setProperty("flex-basis", share(by.people))}></i><i class="a" ref=${(el) => el?.style?.setProperty("flex-basis", share(by.agents))}></i><i class="h" ref=${(el) => el?.style?.setProperty("flex-basis", share(by.assistant))}></i></div>
|
|
180
|
+
<dl class="hub-ov-kv hub-ov-legend"><div><dt><i class="p"></i>${ho("rmP")}</dt><dd>${num(by.people)}</dd></div><div><dt><i class="a"></i>${ho("rmA")}</dt><dd>${num(by.agents)}</dd></div><div><dt><i class="h"></i>${ho("rmH")}</dt><dd>${num(by.assistant)}</dd></div></dl>
|
|
181
|
+
<p class="note">${ho("rmNote")}</p></div>
|
|
182
|
+
<div class="hub-ov-stack">
|
|
183
|
+
<${Card} title=${ho("rmActive")} big=${num(rm.active)} sub=${ho("rmActiveSub", num(rm.total), num(rm.created7d))} />
|
|
184
|
+
<${Card} title=${ho("rmAsk")} big=${num(rm.agentQuestions)} sub=${ho("rmAskSub")} />
|
|
185
|
+
<${Card} title=${ho("rmAuto")} big=${num(rm.chainsStopped)} sub=${ho("rmAutoSub")} />
|
|
186
|
+
</div>
|
|
187
|
+
</div></section>
|
|
188
|
+
</div>`;
|
|
189
|
+
}
|
|
@@ -67,7 +67,7 @@ export function AdminRooms({ client = hubClient() } = {}) {
|
|
|
67
67
|
<td>${Array.isArray(room.managers) ? room.managers.join("、") : ""}</td>
|
|
68
68
|
<td>${room.lastAt ? chatTime(room.lastAt) : ""}</td>
|
|
69
69
|
<td>${room.archived ? hroom("archived") : hroom("active")}</td>
|
|
70
|
-
<td><${Menu} label=${ha("rowMenu", room.name)} disabled=${busy} items=${[
|
|
70
|
+
<td><${Menu} cls="hub-admin-row-menu" fit=${true} topLayer=${true} label=${ha("rowMenu", room.name)} disabled=${busy} items=${[
|
|
71
71
|
{ key: "join", label: hroom("joinAsManager"), onSelect: () => { void act(() => client.joinRoomAsAdmin(room.id), () => setNote(ha("joined", room.name))); } },
|
|
72
72
|
room.archived ? null : { key: "archive", label: hroom("archive"), danger: true, onSelect: () => { void archive(room); } },
|
|
73
73
|
]} /></td></tr>`)}</tbody></table>` : html`<p class="note">${ha("none")}</p>`}
|
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
import { register } from "/assets/app-i18n.js";
|
|
4
4
|
register("hub", {
|
|
5
5
|
en: {
|
|
6
|
-
agentLead: "Every agent is private unless you share it. A shared agent answers Hub questions in its own conversation, with its own folder and the tools its Settings allow. Actions that need approval still come to you.
|
|
6
|
+
agentLead: "Every agent is private unless you share it. A shared agent answers Hub questions in its own conversation, with its own folder and the tools its Settings allow. Actions that need approval still come to you.",
|
|
7
|
+
classicRoomLead: "You can also share the agent of a ClassicBot room. Hub questions and answers are not posted in its Discord or Telegram room, and the room's chat is not copied to the Hub. It is one agent with one memory, though: it may use what it learned in the room when it answers on the Hub, and the other way round.",
|
|
7
8
|
agentShared: "Shared: Hub questions go to this agent's own conversation.",
|
|
8
9
|
republishRequired: "Shared under the older restricted mode. Hub questions are refused until you share this agent again.",
|
|
9
10
|
shareAgain: "Share again",
|
|
11
|
+
classicRoomTag: "ClassicBot room",
|
|
10
12
|
agentNotShareable: "This agent can't be shared right now. Reload the page and try again.",
|
|
11
13
|
agentDeliveryUnavailable: "Sharing isn't available on this fleet yet: Hub questions can't reach an agent here.",
|
|
12
14
|
},
|
|
13
15
|
"zh-TW": {
|
|
14
|
-
agentLead: "每個 Agent 預設都不分享。分享後,Agent 會在自己的對話中回答 Hub
|
|
16
|
+
agentLead: "每個 Agent 預設都不分享。分享後,Agent 會在自己的對話中回答 Hub 的提問,使用它自己的資料夾和設定允許的工具。需要核准的動作仍會交給你。",
|
|
17
|
+
classicRoomLead: "也可以分享 ClassicBot 房間的 Agent。Hub 的提問與回答不會貼到它的 Discord 或 Telegram 房間,房間的聊天也不會複製到 Hub。但它是同一個 Agent、同一份記憶:回答 Hub 的提問時,可能用到它在房間裡得知的內容,反過來也一樣。",
|
|
15
18
|
agentShared: "已分享:Hub 的提問會送到這個 Agent 自己的對話。",
|
|
16
19
|
republishRequired: "這是舊的受限模式分享。重新分享這個 Agent 之前,Hub 的提問都會被拒絕。",
|
|
17
20
|
shareAgain: "重新分享",
|
|
21
|
+
classicRoomTag: "ClassicBot 房間",
|
|
18
22
|
agentNotShareable: "目前無法分享這個 Agent。請重新整理頁面後再試一次。",
|
|
19
23
|
agentDeliveryUnavailable: "這個 Fleet 還不能分享:Hub 的提問目前無法送到這裡的 Agent。",
|
|
20
24
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
2
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
3
|
+
register("hubIntro", {
|
|
4
|
+
en: {title:"Introduction",hint:"One line about what this agent handles. Colleagues can see it. Up to 50 characters.",placeholder:"I handle…",save:"Save introduction",failed:"Could not save the introduction. Try again.",saved:"Introduction saved.",owner:"Last changed by the owner",agent:"Last changed by the agent",default:"From the Fleet description",review:"Colleagues will see this line. Check it and save.",cut:"Your earlier description was longer; only the first 50 characters are shown here.",assistant:"Hub assistant. Answers from this room's chat."},
|
|
5
|
+
"zh-TW": {title:"自我介紹",hint:"用一句話說明這個 Agent 負責什麼,同仁會看到。最多 50 個字。",placeholder:"我負責…",save:"儲存自我介紹",failed:"無法儲存自我介紹,請再試一次。",saved:"自我介紹已儲存。",owner:"最後由擁有者修改",agent:"最後由 Agent 修改",default:"來自 Fleet 說明",review:"同仁會看到這一行,請確認後儲存。",cut:"你之前的說明比較長,這裡只顯示前 50 個字。",assistant:"Hub 提供的助理,根據這個房間的對話回答。"}
|
|
6
|
+
});
|
|
7
|
+
export const hi=(key,...args)=>t(`hubIntro.${key}`,...args);
|
|
8
|
+
const split=value=>[...new Intl.Segmenter(undefined,{granularity:"grapheme"}).segment(String(value??""))].map(v=>v.segment);
|
|
9
|
+
export const introCount=value=>split(value).length;
|
|
10
|
+
export const introPreview=value=>split(value).slice(0,50).join("");
|
|
11
|
+
export function AgentIntroEditor({exposure,client,onSaved=()=>{}}){
|
|
12
|
+
const [text,setText]=useState(exposure.intro??""),[busy,setBusy]=useState(false),[message,setMessage]=useState("");
|
|
13
|
+
const generation=useRef(0),pending=useRef(false);
|
|
14
|
+
useEffect(()=>{generation.current++;setText(exposure.intro??"");setMessage("");return()=>{generation.current++;};},[exposure.id,exposure.intro,exposure.introAt]);
|
|
15
|
+
const count=introCount(text);
|
|
16
|
+
const save=async event=>{event.preventDefault();if(pending.current||count>50)return;const mine=generation.current;pending.current=true;setBusy(true);setMessage("");let result;
|
|
17
|
+
try{result=await client.saveAgentIntro(exposure.id,exposure.revision,text);}catch{result={ok:false};}
|
|
18
|
+
pending.current=false;if(mine!==generation.current)return;setBusy(false);setMessage(hi(result?.ok?"saved":"failed"));if(result?.ok)onSaved(result);
|
|
19
|
+
};
|
|
20
|
+
return html`<section class="card hub-agent-intro"><h3>${hi("title")}</h3><form class="form" onSubmit=${save}>
|
|
21
|
+
<label class="field"><span>${hi("title")}</span><input value=${text} placeholder=${hi("placeholder")} disabled=${busy} onInput=${e=>setText(e.target.value)} aria-invalid=${count>50?"true":null} /><small class="note">${`${hi("hint")} ${count}/50`}</small></label>
|
|
22
|
+
${exposure.introBy?html`<p class="note">${hi(exposure.introBy)}${exposure.introAt?html` · <time datetime=${new Date(exposure.introAt).toISOString()}>${new Date(exposure.introAt).toLocaleString()}</time>`:null}</p>`:null}
|
|
23
|
+
<div class="field-row"><button class="btn btn-sm btn-primary" disabled=${busy||count>50||text===(exposure.intro??"")}>${hi("save")}</button></div>
|
|
24
|
+
${message?html`<p role="status">${message}</p>`:null}
|
|
25
|
+
</form></section>`;
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import {register,t} from "/assets/app-i18n.js";
|
|
2
|
+
register("hubApps",{
|
|
3
|
+
en:{returnLabel:"After you allow, you go back to",localReturn:"This app is running on this computer.",returnWarning:"Only allow if you started from that app or site.",manual:"Set it up by hand",promptHint:"Paste this into {0} and it adds the address for you.",genericHint:"Add the address above as a remote MCP server in your app.",may:"May: {0}",justNow:"just now",title:"My AI apps",consentHeading:"Connect an AI app",consentTitle:"Let {0} use this Hub as you?",consentLead:"{0} will be able to do the things ticked below. People will see “{1} via {0}” on what it posts.",read:"Read the rooms you are in",post:"Post in those rooms",ask:"Ask the agents you may ask",inbox:"Answer questions sent to it",later:"Later",privacy:"What it reads goes to your AI app and its provider.",noAdmin:"It cannot change rooms, teams or settings, and it cannot do anything an administrator does.",unverified:"The app gave this name itself. The Hub can't check who made it.",allow:"Allow",cancel:"Cancel",denied:"Your administrator has not enabled AI app access for your account on this Hub.",failed:"That did not finish. Try again, or start connecting again in your app.",expired:"This connection request has expired. Start connecting again in your app.",retry:"Try again",loading:"Loading…",empty:"No AI apps are connected.",disconnect:"Disconnect",disconnected:"App disconnected.",idle:"A connection ends after 30 days without use. Disconnect takes effect at once.",connectTitle:"Connect your app",connectLead:"Add this remote MCP address in your app. Sign in with the account you use for this Hub and choose what the app may do. Nothing else needs to be installed.",address:"Hub MCP address",copyAddress:"Copy address",copied:"Copied.",copyFailed:"Copy failed. Select and copy the text below.",appChoice:"Your app",claude:"Claude Code",codex:"Codex",generic:"Another MCP app",copyPrompt:"Copy setup prompt",prompt:"Configure {app} to connect to my Hub using the remote HTTP MCP server below. Use the browser sign-in and consent flow. Install no AgEnD package or proxy. Never bypass certificate verification. Do not copy credentials or other personal configuration into this setup.",config:"Remote MCP configuration",adminTitle:"AI apps",adminSwitch:"Let people connect their own AI apps",everyone:"Everyone who can use this Hub",selected:"Only these groups, teams or people",save:"Save",saved:"Saved.",narrowWarning:"Narrowing this ends every existing app connection. People who are still allowed connect again in their app.",remove:"Remove",removeLabel:"Remove {0}",roomSwitch:"Allow AI apps to read and post",rateLimited:"{0}'s AI app was slowed down.",chooseScope:"Choose at least one permission.",dates:"Connected {0} · last used {1}",unknown:"Not yet",invalidReturn:"The app's return address could not be opened. Start connecting again in your app.",signInAgain:"Sign in again to see your apps.",styleFailed:"The page style could not load. Try again."},
|
|
4
|
+
"zh-TW":{returnLabel:"允許之後會回到",localReturn:"這個 App 在這台電腦上執行。",returnWarning:"只有在你是從這個 App 或網站開始時才允許。",manual:"手動設定",promptHint:"貼到 {0},它會幫你加入這個位址。",genericHint:"在你的 App 裡,把上面的位址新增為遠端 MCP 伺服器。",may:"可以:{0}",justNow:"剛剛",title:"我的 AI App",consentHeading:"連接 AI App",consentTitle:"要讓 {0} 以你的身分使用這個 Hub 嗎?",consentLead:"{0} 可以做下面勾選的事。它發的訊息會顯示「{1} 透過 {0}」。",read:"讀你所在的房間",post:"在這些房間發言",ask:"問你可以問的 Agent",inbox:"回答別人問它的問題",later:"之後開放",privacy:"它讀到的內容會交給你的 AI App 與它的服務商。",noAdmin:"它不能更改房間、團隊或設定,也不能做管理員的動作。",unverified:"這個名稱是 App 自己提供的,Hub 無法確認它的來源。",allow:"允許",cancel:"取消",denied:"管理員沒有開放讓你的帳號在這個 Hub 連接 AI App。",failed:"剛才沒有完成。請再試一次,或回到 App 重新開始連接。",expired:"這次連接要求已過期,請回到 App 重新開始連接。",retry:"重試",loading:"載入中…",empty:"尚未連接任何 AI App。",disconnect:"中斷連接",disconnected:"已中斷 App 連接。",idle:"30 天沒有使用,連接就會自動結束。中斷連接會立即生效。",connectTitle:"連接你的 App",connectLead:"在 App 加入這個遠端 MCP 位址,用你登入這個 Hub 的帳號登入,再選擇 App 可以做的事。不用另外安裝程式。",address:"Hub MCP 位址",copyAddress:"複製位址",copied:"已複製。",copyFailed:"複製失敗,請選取下方文字自行複製。",appChoice:"你的 App",claude:"Claude Code",codex:"Codex",generic:"其他 MCP App",copyPrompt:"複製設定提示",prompt:"請把 {app} 設定為透過下方遠端 HTTP MCP 伺服器連接我的 Hub,使用瀏覽器登入與同意流程。不要安裝 AgEnD 套件或其他程式,也不能略過憑證驗證。不要把憑證或其他個人設定複製到這份設定。",config:"遠端 MCP 設定",adminTitle:"AI App",adminSwitch:"允許同仁連接自己的 AI App",everyone:"所有可以使用這個 Hub 的人",selected:"只有這些群組、團隊或人員",save:"儲存",saved:"已儲存。",narrowWarning:"縮小這個範圍會結束所有現有 App 連接。仍可使用的人需要回到 App 重新連接。",remove:"移除",removeLabel:"移除 {0}",roomSwitch:"允許 AI App 讀取及發言",rateLimited:"{0} 的 AI App 被放慢了。",chooseScope:"請至少選一項權限。",dates:"連接於 {0} · 上次使用 {1}",unknown:"尚無",invalidReturn:"無法開啟 App 的返回位址,請回到 App 重新開始連接。",signInAgain:"請重新登入後查看你的 App。",styleFailed:"頁面樣式載入失敗,請再試一次。"}
|
|
5
|
+
});
|
|
6
|
+
export const ha=(key,...args)=>t(`hubApps.${key}`,...args);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** Person-owned app connections. All authority remains in the Hub; names are display data. */
|
|
2
|
+
import {html,useEffect,useMemo,useRef,useState} from "/assets/app-html.js";
|
|
3
|
+
import {lang} from "/assets/app-i18n.js";
|
|
4
|
+
import {hubConnectorPrompt} from "/assets/connector-prompt.js";
|
|
5
|
+
import {SubjectPicker,subjectText} from "./hub-subject-picker.js";
|
|
6
|
+
import {ha} from "./hub-ai-apps-strings.js";
|
|
7
|
+
|
|
8
|
+
export const APP_SCOPES=Object.freeze(["rooms:read","rooms:post","agents:ask"]);
|
|
9
|
+
const keys={"rooms:read":"read","rooms:post":"post","agents:ask":"ask"};
|
|
10
|
+
const styles=new WeakMap();
|
|
11
|
+
export function linkHubAppsCss(doc=typeof document==="undefined"?null:document){
|
|
12
|
+
if(!doc?.head)return Promise.resolve(false);if(styles.has(doc))return styles.get(doc);
|
|
13
|
+
const loaded=new Promise(resolve=>{const link=doc.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("href","/assets/hub-ai-apps.css");link.setAttribute("data-hub-apps-css","1");
|
|
14
|
+
link.addEventListener("load",()=>resolve(true),{once:true});link.addEventListener("error",()=>{link.remove();styles.delete(doc);resolve(false);},{once:true});doc.head.appendChild(link);});styles.set(doc,loaded);return loaded;
|
|
15
|
+
}
|
|
16
|
+
function useStyle(){const[ready,setReady]=useState(null),[retry,setRetry]=useState(0);useEffect(()=>{let live=true;linkHubAppsCss().then(r=>{if(live)setReady(r);});return()=>{live=false;};},[retry]);return[ready,()=>setRetry(n=>n+1)];}
|
|
17
|
+
function StyleWait({ready,retry}){return html`<p role="status">${ha(ready===false?"styleFailed":"loading")}</p>${ready===false?html`<button class="btn hub-app-button" type="button" onClick=${retry}>${ha("retry")}</button>`:null}`;}
|
|
18
|
+
function useLife(client,key){const epoch=useRef(0),identity=useRef({client,key});if(identity.current.client!==client||identity.current.key!==key){epoch.current++;identity.current={client,key};}
|
|
19
|
+
useEffect(()=>{const off=client.onSignedOut?.(()=>{epoch.current++;});return()=>{epoch.current++;off?.();};},[client,key]);return epoch;}
|
|
20
|
+
function useRead(client,method,arg,scope){
|
|
21
|
+
const[slot,setSlot]=useState(null),[revision,setRevision]=useState(0),epoch=useRef(0),identity=useMemo(()=>({}),[client,method,arg,scope]);
|
|
22
|
+
useEffect(()=>{let live=true;const mine=++epoch.current;setSlot({identity,value:null});Promise.resolve().then(()=>client[method](scope,arg)).then(out=>{if(live&&mine===epoch.current)setSlot({identity,value:out});},()=>{if(live&&mine===epoch.current)setSlot({identity,value:{ok:false}});});
|
|
23
|
+
const off=client.onSignedOut?.(()=>{epoch.current++;setSlot({identity,value:{ok:false,status:401}});});return()=>{live=false;epoch.current++;off?.();};},[identity,revision]);
|
|
24
|
+
return[slot?.identity===identity?slot.value:null,()=>setRevision(n=>n+1)];
|
|
25
|
+
}
|
|
26
|
+
const errorText=r=>ha(r?.status===401?"signInAgain":r?.status===403?"denied":r?.status===400?"expired":"failed");
|
|
27
|
+
function ReadError({value,retry}){return html`<p class="err" role="alert">${errorText(value)}</p><button class="btn hub-app-button" type="button" onClick=${retry}>${ha("retry")}</button>`;}
|
|
28
|
+
export function appReturnUrl(value){try{const u=new URL(value);return !u.username&&!u.password&&!u.hash&&(u.protocol==="https:"||u.protocol==="http:"&&["127.0.0.1","[::1]","localhost"].includes(u.hostname))?u.href:null;}catch{return null;}}
|
|
29
|
+
export function appDestination(origin){try{const u=new URL(origin);if(u.origin!==origin||!appReturnUrl(origin))return null;return u.origin;}catch{return null;}}
|
|
30
|
+
export function AppConsentPage({client,request,person,returnTo=url=>location.assign(url)}){
|
|
31
|
+
const scope=useMemo(()=>client.aiAppsScope?.(),[client]),[view,reload]=useRead(client,"appConsent",request,scope),[scopes,setScopes]=useState([]),[busy,setBusy]=useState(false),[error,setError]=useState(""),life=useLife(client,request),[ready,retry]=useStyle();
|
|
32
|
+
const destination=appDestination(view?.redirectOrigin);
|
|
33
|
+
const offered=JSON.stringify(view?.scopes||[]);useEffect(()=>{setScopes(APP_SCOPES.filter(scope=>view?.scopes?.includes(scope)));setError("");},[request,offered]);
|
|
34
|
+
useEffect(()=>{setBusy(false);setError("");},[request]);
|
|
35
|
+
const finish=async cancel=>{if(busy||!cancel&&(!scopes.length||!destination))return;const mine=life.current;setBusy(true);setError("");let out;try{out=await client.saveAppConsent(scope,request,cancel?{cancel:true}:{scopes});}catch{out={ok:false};}
|
|
36
|
+
if(mine!==life.current)return;setBusy(false);const target=out.ok&&appReturnUrl(out.location);if(target)returnTo(target);else setError(out.ok?ha("invalidReturn"):errorText(out));};
|
|
37
|
+
return html`<div class="s-section-layout hub-ai-apps"><section class="card"><h2>${view?.ok?ha("consentTitle",view.name):ha("consentHeading")}</h2>
|
|
38
|
+
${!ready?html`<${StyleWait} ready=${ready} retry=${retry}/>`:view===null?html`<p role="status">${ha("loading")}</p>`:!view.ok?html`<${ReadError} value=${view} retry=${reload}/>`:html`
|
|
39
|
+
<p>${ha("consentLead",view.name,person||"")}</p><p class="note">${ha("unverified")}</p>
|
|
40
|
+
<div class="hub-app-destination"><strong>${ha(destination?.startsWith("http:")?"localReturn":"returnLabel")}</strong><p>${destination||ha("invalidReturn")}</p><p class="note">${ha("returnWarning")}</p></div>
|
|
41
|
+
${APP_SCOPES.filter(scope=>view.scopes.includes(scope)).map(scope=>html`<label class="check" key=${scope}><input type="checkbox" data-app-scope=${scope} checked=${scopes.includes(scope)} disabled=${busy} onChange=${e=>setScopes(old=>e.target.checked?[...old,scope]:old.filter(x=>x!==scope))}/><span>${ha(keys[scope])}</span></label>`)}
|
|
42
|
+
<label class="check"><input type="checkbox" disabled=${true} checked=${false}/><span>${ha("inbox")} · ${ha("later")}</span></label>
|
|
43
|
+
<p class="note">${ha("noAdmin")}</p><p class="note">${ha("privacy")}</p>${!scopes.length?html`<p class="note">${ha("chooseScope")}</p>`:null}
|
|
44
|
+
<div class="hub-app-actions"><button type="button" class="btn btn-primary hub-app-button" disabled=${busy||!scopes.length||!destination} onClick=${()=>finish(false)}>${ha("allow")}</button><button type="button" class="btn hub-app-button" disabled=${busy} onClick=${()=>finish(true)}>${ha("cancel")}</button></div>`}
|
|
45
|
+
${error?html`<p class="err" role="alert">${error}</p>`:null}</section></div>`;
|
|
46
|
+
}
|
|
47
|
+
function SetupCard({address}){
|
|
48
|
+
const[app,setApp]=useState("claude"),[note,setNote]=useState("");const prompt=hubConnectorPrompt(address,app,ha);
|
|
49
|
+
const copy=async text=>{try{await navigator.clipboard.writeText(text);setNote(ha("copied"));}catch{setNote(ha("copyFailed"));}};
|
|
50
|
+
return html`<section class="card"><h3>${ha("connectTitle")}</h3><p class="note">${ha("connectLead")}</p>
|
|
51
|
+
<label class="field"><span>${ha("address")}</span><input type="url" readonly=${true} value=${address||""}/></label><div class="hub-app-actions"><button type="button" class="btn btn-primary hub-app-button" disabled=${!prompt} onClick=${()=>copy(address)}>${ha("copyAddress")}</button></div>
|
|
52
|
+
<label class="field"><span>${ha("appChoice")}</span><select value=${app} onChange=${e=>setApp(e.target.value)}>${["claude","codex","generic"].map(key=>html`<option value=${key}>${ha(key)}</option>`)}</select></label>
|
|
53
|
+
<p class="note">${app==="generic"?ha("genericHint"):ha("promptHint",ha(app))}</p>
|
|
54
|
+
${app!=="generic"?html`<div class="hub-app-actions"><button type="button" class="btn hub-app-button" disabled=${!prompt} onClick=${()=>copy(prompt)}>${ha("copyPrompt")}</button></div>`:null}<p class="note" role="status">${note}</p>
|
|
55
|
+
<details class="s-ui-disclosure" open=${note===ha("copyFailed")?true:undefined}><summary>${ha("manual")}</summary><div class="s-disclosure-body"><textarea readonly=${true} rows="7" aria-label=${ha("config")} value=${prompt}/></div></details></section>`;
|
|
56
|
+
}
|
|
57
|
+
export function appConnectionDates(connected,lastUsed,now=Date.now()){
|
|
58
|
+
const locale=lang()==="zh-TW"?"zh-TW":"en-GB",at=Number(connected),last=Number(lastUsed);
|
|
59
|
+
const date=Number.isFinite(at)?new Intl.DateTimeFormat(locale,{day:"numeric",month:"short"}).format(at):ha("unknown");
|
|
60
|
+
const seconds=Math.max(0,(now-last)/1000),rtf=new Intl.RelativeTimeFormat(lang()==="zh-TW"?"zh-TW":"en",{numeric:"always"});
|
|
61
|
+
const relative=!Number.isFinite(last)?ha("unknown"):seconds<60?ha("justNow"):seconds<3600?rtf.format(-Math.floor(seconds/60),"minute"):seconds<86400?rtf.format(-Math.floor(seconds/3600),"hour"):rtf.format(-Math.floor(seconds/86400),"day");
|
|
62
|
+
return ha("dates",date,relative);
|
|
63
|
+
}
|
|
64
|
+
export function MyAiAppsPage({client}){
|
|
65
|
+
const scope=useMemo(()=>client.aiAppsScope?.(),[client]),[view,reload]=useRead(client,"aiApps",undefined,scope),[busy,setBusy]=useState(null),[note,setNote]=useState(""),life=useLife(client),[ready,retry]=useStyle();
|
|
66
|
+
const disconnect=async id=>{if(busy)return;const mine=life.current;setBusy(id);let out;try{out=await client.disconnectAiApp(scope,id);}catch{out={ok:false};}if(mine!==life.current)return;setBusy(null);setNote(out.ok?ha("disconnected"):errorText(out));if(out.ok)reload();};
|
|
67
|
+
return html`<div class="s-section-layout hub-ai-apps">${!ready?html`<section class="card"><${StyleWait} ready=${ready} retry=${retry}/></section>`:view===null?html`<section class="card"><p role="status">${ha("loading")}</p></section>`:!view.ok?html`<section class="card"><${ReadError} value=${view} retry=${reload}/></section>`:html`
|
|
68
|
+
${view.available===false?html`<section class="card"><p role="status">${ha("denied")}</p></section>`:null}<${SetupCard} address=${view.address}/>
|
|
69
|
+
<section class="card"><h3>${ha("title")}</h3><p class="note">${ha("idle")}</p>${view.apps?.length?html`<ul class="hub-app-list">${view.apps.map(app=>html`<li class="s-row hub-app-entry" key=${app.id}><div class="hub-app-row"><strong>${app.name}</strong><small class="note">${appConnectionDates(app.connectedAt,app.lastUsedAt)}</small><small>${ha("may",APP_SCOPES.filter(scope=>app.scopes?.includes(scope)).map(scope=>ha(keys[scope])).join(" · "))}</small></div><button type="button" class="btn hub-app-button hub-app-disconnect" disabled=${busy!==null} onClick=${()=>disconnect(app.id)}>${ha("disconnect")}</button></li>`)}</ul>`:html`<p>${ha("empty")}</p>`}<p role="status" class="note">${note}</p></section>`}</div>`;
|
|
70
|
+
}
|
|
71
|
+
export function AiAppsAdminCard({client}){
|
|
72
|
+
const scope=useMemo(()=>client.aiAppsScope?.(),[client]),[view,reload]=useRead(client,"aiAppsSettings",undefined,scope),[draft,setDraft]=useState(null),[busy,setBusy]=useState(false),[note,setNote]=useState(""),life=useLife(client),[ready,retry]=useStyle();
|
|
73
|
+
useEffect(()=>{if(view?.ok)setDraft({revision:view.revision,enabled:view.enabled,everyone:view.everyone,subjects:view.subjects||[]});},[view]);
|
|
74
|
+
const search=useMemo(()=>(kind,q)=>client.searchAiAppSubjects(scope,kind,q),[client,scope]);
|
|
75
|
+
const pick=(kind,row)=>{const id=kind==="person"?`${row.person?.realm}/${row.person?.objectId}`:kind==="team"?row.id:row.objectId,name=row.name||row.displayName||row.cn||row.login;
|
|
76
|
+
setDraft(old=>old.subjects.some(s=>s.kind===kind&&s.id===id)?old:{...old,subjects:[...old.subjects,{kind,id,name}]});};
|
|
77
|
+
const save=async()=>{if(busy||!draft)return;const mine=life.current;setBusy(true);let out;try{out=await client.saveAiAppsSettings(scope,draft);}catch{out={ok:false};}if(mine!==life.current)return;setBusy(false);setNote(out.ok?ha("saved"):errorText(out));if(out.ok)reload();};
|
|
78
|
+
return html`<section class="card hub-ai-apps"><h3>${ha("adminTitle")}</h3>${!ready?html`<${StyleWait} ready=${ready} retry=${retry}/>`:view===null?html`<p role="status">${ha("loading")}</p>`:!view.ok?html`<${ReadError} value=${view} retry=${reload}/>`:draft?html`
|
|
79
|
+
<label class="check"><input class="s-ui-toggle" type="checkbox" role="switch" checked=${draft.enabled} disabled=${busy} onChange=${e=>{const value=e.target.checked;setDraft(old=>({...old,enabled:value}));}}/><span>${ha("adminSwitch")}</span></label>
|
|
80
|
+
${[true,false].map(everyone=>html`<label class="check"><input type="radio" name="hubAppAllowed" checked=${draft.everyone===everyone} disabled=${busy||!draft.enabled} onChange=${()=>setDraft(old=>({...old,everyone}))}/><span>${ha(everyone?"everyone":"selected")}</span></label>`)}
|
|
81
|
+
${!draft.everyone?html`<ul class="hub-app-list">${draft.subjects.map(row=>html`<li class="s-row" key=${`${row.kind}:${row.id}`}><span class="grow">${row.name} · ${subjectText(row.kind)}</span><button type="button" class="btn hub-app-button" disabled=${busy||!draft.enabled} aria-label=${ha("removeLabel",row.name)} onClick=${()=>setDraft({...draft,subjects:draft.subjects.filter(x=>x!==row)})}>${ha("remove")}</button></li>`)}</ul><${SubjectPicker} client=${client} search=${search} disabled=${busy||!draft.enabled} onPick=${pick}/>`:null}
|
|
82
|
+
<p class="note">${ha("narrowWarning")}</p><div class="hub-app-actions"><button type="button" class="btn btn-primary hub-app-button" disabled=${busy} onClick=${save}>${ha("save")}</button></div><p class="note" role="status">${note}</p>`:null}</section>`;
|
|
83
|
+
}
|
|
@@ -6,6 +6,10 @@ import { register, t } from "/assets/app-i18n.js";
|
|
|
6
6
|
register("hubChat", {
|
|
7
7
|
en: {
|
|
8
8
|
navSearch: "Search", notices: "Notices", noticesTitle: "Notices", noNotices: "No security notices", noticesLead: "When a new fleet connects to this Hub, you're told here. If you don't recognize it, revoke it.", settings: "Settings", signedIn: "Signed in", signOut: "Sign out",
|
|
9
|
+
// M-3190: the chat launcher (新對話, or 對話 with nothing to open)
|
|
10
|
+
launchTitle: "Who do you want to talk to today?", launchOwner: "Owner: {0}", launchInRoom: "In #{0}", launchGo: "Chat →", launchFilter: "Filter agents",
|
|
11
|
+
launchNone: "No agent has been shared with you directly yet", launchNoneHint: "Ask a colleague to share one with you in My agents, or go into a room on the left and work with its agents.",
|
|
12
|
+
launchNewRoom: "New room", launchShare: "Share my agent", launchNoMatch: "No agent matches.",
|
|
9
13
|
chats: "Chats", newChat: "New chat", search: "Search chats", noChats: "No chats yet", noChatsHint: "Start one with New chat: it lists the agents someone allowed you to ask.",
|
|
10
14
|
noMatch: "No chat matches.", waiting: "Waiting for an answer", represents: "Answers for {0}",
|
|
11
15
|
pickTitle: "New chat", pickSearch: "Search agents or owners", pickHint: "Only the agents someone allowed you to ask are listed.",
|
|
@@ -31,11 +35,14 @@ register("hubChat", {
|
|
|
31
35
|
adminTitle: "Hub administrator", adminSees: "Can't see the content.",
|
|
32
36
|
notHere: "Not here", notHereText: "{0}'s files and changes, its terminal (View) and its tool progress: only {1} sees them, in their own fleet.",
|
|
33
37
|
oneToOne: "A chat has only you and this agent.",
|
|
34
|
-
menu: "Menu", mine: "My
|
|
38
|
+
menu: "Menu", mine: "My agents", mineHint: "Who may ask them, until when", admin: "Administration", adminHint: "Connect fleets",
|
|
35
39
|
back: "Chats",
|
|
36
40
|
},
|
|
37
41
|
"zh-TW": {
|
|
38
42
|
navSearch: "搜尋", notices: "通知", noticesTitle: "通知", noNotices: "沒有安全通知", noticesLead: "有新的 Fleet 連接到這個 Hub 時,會在這裡通知你。如果你不認得它,請撤銷。", settings: "設定", signedIn: "已登入", signOut: "登出",
|
|
43
|
+
launchTitle: "今天想找哪位 Agent?", launchOwner: "擁有者:{0}", launchInRoom: "位於 #{0}", launchGo: "對話 →", launchFilter: "篩選 Agent",
|
|
44
|
+
launchNone: "還沒有人直接分享 Agent 給你", launchNoneHint: "請同事在「我的 Agent」授權給你,或直接進入左側的房間與 Agent 協作。",
|
|
45
|
+
launchNewRoom: "開新房間", launchShare: "分享我的 Agent", launchNoMatch: "沒有符合的 Agent。",
|
|
39
46
|
chats: "對話", newChat: "新對話", search: "搜尋對話", noChats: "還沒有對話", noChatsHint: "用「新對話」開始:會列出有人允許你提問的 Agent。",
|
|
40
47
|
noMatch: "沒有符合的對話。", waiting: "等待回答", represents: "代表 {0} 回答",
|
|
41
48
|
pickTitle: "新對話", pickSearch: "搜尋 Agent 或擁有者", pickHint: "只列出有人允許你提問的 Agent。",
|
|
@@ -61,7 +68,7 @@ register("hubChat", {
|
|
|
61
68
|
adminTitle: "Hub 管理員", adminSees: "看不到內容。",
|
|
62
69
|
notHere: "這裡沒有", notHereText: "{0} 的檔案與變更、終端機畫面(View)、工具進度:只有 {1} 在自己的 fleet 看得到。",
|
|
63
70
|
oneToOne: "一個聊天室只有你和這個 Agent。",
|
|
64
|
-
menu: "選單", mine: "
|
|
71
|
+
menu: "選單", mine: "我的 Agent", mineHint: "誰可以提問、到什麼時候", admin: "管理", adminHint: "連接 Fleet",
|
|
65
72
|
back: "對話",
|
|
66
73
|
},
|
|
67
74
|
});
|