@schlenkr/ragents 0.1.9 → 0.1.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/apps/server/package.json +1 -1
- package/apps/server/src/access-projection.ts +9 -39
- package/apps/server/src/access-service.ts +3 -3
- package/apps/server/src/access-session.ts +19 -19
- package/apps/server/src/api/contracts.ts +32 -29
- package/apps/server/src/api/core-methods.ts +21 -19
- package/apps/server/src/api/delivery.ts +2 -2
- package/apps/server/src/api/reference.ts +27 -27
- package/apps/server/src/api/rights.ts +18 -18
- package/apps/server/src/chat-handler.ts +5 -5
- package/apps/server/src/config-definition.ts +37 -10
- package/apps/server/src/config-file.ts +49 -49
- package/apps/server/src/config.ts +2 -0
- package/apps/server/src/data-directory.ts +2 -2
- package/apps/server/src/external-access.ts +1 -1
- package/apps/server/src/folder-install.ts +1 -1
- package/apps/server/src/help-files.ts +1 -1
- package/apps/server/src/host-api.json +8 -1
- package/apps/server/src/host-api.ts +3 -2
- package/apps/server/src/host-record.ts +3 -3
- package/apps/server/src/host-resolution-hooks.mjs +4 -4
- package/apps/server/src/host-version.ts +17 -17
- package/apps/server/src/host-web.ts +5 -5
- package/apps/server/src/main.ts +6 -6
- package/apps/server/src/missing-environment.ts +6 -6
- package/apps/server/src/parent-watch.ts +4 -4
- package/apps/server/src/plugin-build/build.ts +31 -31
- package/apps/server/src/plugin-build/host-api-names.ts +7 -7
- package/apps/server/src/plugin-build/plugin-description.ts +15 -15
- package/apps/server/src/plugin-build/typecheck.ts +1 -1
- package/apps/server/src/plugin-support/actor-programs/app-project.ts +19 -19
- package/apps/server/src/plugin-support/actor-programs/client-compiler.ts +4 -4
- package/apps/server/src/plugin-support/actor-programs/client-contracts.ts +11 -11
- package/apps/server/src/plugin-support/actor-programs/contract.ts +17 -17
- package/apps/server/src/plugin-support/actor-programs/runtime-libraries.ts +1 -1
- package/apps/server/src/plugin-support/actor-programs/workflow/index.ts +5 -5
- package/apps/server/src/plugin-support/actor-programs/workflow/prompt-reader.ts +2 -2
- package/apps/server/src/plugin-support/chat-display-policy.ts +2 -2
- package/apps/server/src/plugin-support/front-matter.ts +6 -6
- package/apps/server/src/plugin-support/http.ts +2 -2
- package/apps/server/src/plugin-support/language-server/contract.ts +8 -8
- package/apps/server/src/plugin-support/language-server/plugin.ts +2 -2
- package/apps/server/src/plugin-support/language-server/snapshot-method.ts +1 -1
- package/apps/server/src/plugin-support/language-server/tools.ts +11 -11
- package/apps/server/src/plugin-support/model-aliases.ts +30 -20
- package/apps/server/src/plugin-support/model-choice.ts +15 -15
- package/apps/server/src/plugin-support/model-completion.ts +44 -23
- package/apps/server/src/plugin-support/model-providers.ts +170 -0
- package/apps/server/src/plugin-support/model-upstreams.ts +1 -1
- package/apps/server/src/plugin-support/native-typescript-child.ts +4 -4
- package/apps/server/src/plugin-support/native-typescript-executor.ts +12 -12
- package/apps/server/src/plugin-support/plugin-config.ts +3 -3
- package/apps/server/src/plugin-support/plugin-folder.ts +2 -2
- package/apps/server/src/plugin-support/plugins-root.ts +2 -2
- package/apps/server/src/plugin-support/process-sandbox.ts +48 -47
- package/apps/server/src/plugin-support/product-model-settings-contract.ts +3 -3
- package/apps/server/src/plugin-support/product-model-settings.ts +10 -10
- package/apps/server/src/plugin-support/product-relay.ts +9 -9
- package/apps/server/src/plugin-support/product-start-options.ts +4 -4
- package/apps/server/src/plugin-support/prompt.ts +1 -1
- package/apps/server/src/plugin-support/provision.ts +8 -8
- package/apps/server/src/plugin-support/run-scripts.ts +17 -17
- package/apps/server/src/plugin-support/skills.ts +18 -18
- package/apps/server/src/plugin-support/start-entries-contract.ts +17 -17
- package/apps/server/src/plugin-support/start-options-contract.ts +5 -5
- package/apps/server/src/plugin-support/system-prompts.ts +11 -11
- package/apps/server/src/plugin-support/thinking-level.ts +2 -2
- package/apps/server/src/plugin-support/tool-availability.ts +2 -2
- package/apps/server/src/plugin-support/workspace-ownership.ts +5 -5
- package/apps/server/src/plugin-support/workspace-sandbox-host.ts +37 -37
- package/apps/server/src/plugin-support/zip.ts +7 -7
- package/apps/server/src/profile/bundle-manifest.ts +17 -17
- package/apps/server/src/profile/compose.ts +12 -7
- package/apps/server/src/profile/plugin-discovery.ts +12 -12
- package/apps/server/src/profile/provisioning.ts +5 -5
- package/apps/server/src/profile-target.ts +10 -10
- package/apps/server/src/protocol.ts +2 -2
- package/apps/server/src/provider.ts +63 -58
- package/apps/server/src/ragents/actor-chat-history.ts +8 -8
- package/apps/server/src/ragents/chat-text-positions.ts +2 -2
- package/apps/server/src/ragents/coordinator.ts +2 -2
- package/apps/server/src/ragents/engine.ts +25 -24
- package/apps/server/src/ragents/global-chat.ts +14 -8
- package/apps/server/src/ragents/host-services.ts +6 -3
- package/apps/server/src/ragents/journal-chat-events.ts +1 -1
- package/apps/server/src/ragents/run-owner.ts +2 -2
- package/apps/server/src/ragents/session.ts +49 -49
- package/apps/server/src/ragents/typescript-tools.ts +12 -12
- package/apps/server/src/ragents/workspace-runtime.ts +28 -28
- package/apps/server/src/rpc/dispatcher.ts +19 -19
- package/apps/server/src/rpc/http-transport.ts +11 -11
- package/apps/server/src/rpc/stdio-transport.ts +3 -3
- package/apps/server/src/run-preparation-input.ts +5 -5
- package/apps/server/src/run-preparation.ts +24 -24
- package/apps/server/src/run-transfer.ts +39 -39
- package/apps/server/src/server.ts +51 -49
- package/apps/server/src/settings.ts +1 -1
- package/apps/server/src/startup.ts +3 -3
- package/apps/server/src/title-compactor.ts +9 -9
- package/apps/server/src/title-settings.ts +3 -3
- package/apps/server/src/web-bundles.ts +2 -2
- package/apps/server/src/web-stylesheet.ts +2 -2
- package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-xXXhTDbh.js → highlighted-body-KPVGNVTW-BfNSGxjB.js} +1 -1
- package/apps/web/dist/assets/main-D6bsKcIK.js +11 -0
- package/apps/web/dist/assets/mermaid-HWGCJPDP-DROEqEeg.js +608 -0
- package/apps/web/dist/assets/runPanel-Dumuuqry.js +21 -0
- package/apps/web/dist/help/guide-access.html +5 -5
- package/apps/web/dist/help/guide-access.md +2 -2
- package/apps/web/dist/help/guide-clients.html +64 -55
- package/apps/web/dist/help/guide-clients.md +62 -52
- package/apps/web/dist/help/guide-distributed.html +12 -7
- package/apps/web/dist/help/guide-distributed.md +9 -4
- package/apps/web/dist/help/guide-functions.html +3 -3
- package/apps/web/dist/help/guide-getting-started.html +24 -15
- package/apps/web/dist/help/guide-getting-started.md +22 -12
- package/apps/web/dist/help/guide-ideas.html +3 -3
- package/apps/web/dist/help/guide-plugins.html +5 -4
- package/apps/web/dist/help/guide-plugins.md +2 -1
- package/apps/web/dist/help/guide-programs.html +3 -3
- package/apps/web/dist/help/guide-runtime.html +6 -6
- package/apps/web/dist/help/guide-runtime.md +3 -3
- package/apps/web/dist/help/guide.html +3 -3
- package/apps/web/dist/help/index.html +1997 -942
- package/apps/web/dist/help/mini-app.css +30 -0
- package/apps/web/dist/help/mini-app.js +14 -14
- package/apps/web/dist/host-web.json +90 -90
- package/apps/web/dist/index.html +3 -3
- package/apps/web/dist/run-panel.html +3 -3
- package/apps/web/package.json +1 -1
- package/apps/web/src/AccessContext.tsx +15 -15
- package/apps/web/src/App.tsx +13 -13
- package/apps/web/src/DiffCode.tsx +2 -2
- package/apps/web/src/HelpDialog.tsx +3 -3
- package/apps/web/src/Overview.tsx +13 -13
- package/apps/web/src/PluginActivation.ts +1 -1
- package/apps/web/src/PluginChat.tsx +15 -15
- package/apps/web/src/PluginFailureNotice.tsx +1 -1
- package/apps/web/src/PluginRegistry.tsx +44 -44
- package/apps/web/src/RunPreparationChat.tsx +11 -11
- package/apps/web/src/RunStore.ts +1 -1
- package/apps/web/src/SessionList.tsx +14 -14
- package/apps/web/src/SettingsModal.tsx +112 -112
- package/apps/web/src/StartOptions.tsx +11 -11
- package/apps/web/src/StartSelection.tsx +11 -11
- package/apps/web/src/StartTiles.tsx +8 -8
- package/apps/web/src/SurfaceShortcuts.tsx +3 -3
- package/apps/web/src/ThemeSettings.tsx +8 -8
- package/apps/web/src/TitleModelSettings.tsx +13 -13
- package/apps/web/src/WorkspacePanel.tsx +9 -9
- package/apps/web/src/access-session.ts +4 -4
- package/apps/web/src/access-token.ts +5 -5
- package/apps/web/src/actor-conversation.ts +3 -3
- package/apps/web/src/actor-programs/client-ui/DataTable.tsx +8 -8
- package/apps/web/src/actor-programs/client-ui/FilePicker.tsx +4 -4
- package/apps/web/src/actor-programs/client-ui/FlowDiagram.tsx +13 -13
- package/apps/web/src/actor-programs/client-ui/Viewers.tsx +4 -4
- package/apps/web/src/actor-programs/client-ui/WorkflowDiagram.tsx +1 -1
- package/apps/web/src/actor-programs/client-ui/file-contracts.d.ts +4 -4
- package/apps/web/src/actor-programs/client-ui/file-selection.ts +1 -1
- package/apps/web/src/actor-programs/client-ui/viewer-contracts.d.ts +3 -3
- package/apps/web/src/api.ts +7 -7
- package/apps/web/src/chat/StoppedActorNotice.tsx +5 -5
- package/apps/web/src/chat/chat-target.ts +3 -3
- package/apps/web/src/chat/requests.ts +2 -2
- package/apps/web/src/chat/useAttachmentCapabilities.ts +2 -2
- package/apps/web/src/chat-view-settings.tsx +5 -6
- package/apps/web/src/diff-view.css +1 -1
- package/apps/web/src/highlighting.css +1 -1
- package/apps/web/src/language-server/language-server-plugin.tsx +30 -30
- package/apps/web/src/lib/labels.ts +6 -6
- package/apps/web/src/main.tsx +4 -4
- package/apps/web/src/offered-machines.ts +2 -2
- package/apps/web/src/page-opener.tsx +1 -1
- package/apps/web/src/panel/ConnectionsPage.tsx +26 -23
- package/apps/web/src/panel/LoginForm.tsx +6 -6
- package/apps/web/src/panel/PanelDialogs.tsx +22 -22
- package/apps/web/src/panel/PanelHeader.tsx +2 -2
- package/apps/web/src/panel/PanelPage.tsx +1 -1
- package/apps/web/src/panel/RunLine.tsx +4 -4
- package/apps/web/src/panel/RunsPage.tsx +15 -15
- package/apps/web/src/panel/StartPage.tsx +29 -26
- package/apps/web/src/panel/connection-state.ts +9 -9
- package/apps/web/src/panel/contract.ts +34 -27
- package/apps/web/src/panel.tsx +1 -1
- package/apps/web/src/plugin-bootstrap.ts +5 -5
- package/apps/web/src/product/ModelControl.tsx +3 -3
- package/apps/web/src/product/ProductModelSettings.tsx +16 -16
- package/apps/web/src/product/SystemPromptControl.tsx +11 -11
- package/apps/web/src/product/model-settings.ts +2 -2
- package/apps/web/src/rpc/client.ts +16 -16
- package/apps/web/src/rpc.ts +1 -1
- package/apps/web/src/run-overview.ts +1 -1
- package/apps/web/src/run-panel/RunPanelApp.tsx +39 -39
- package/apps/web/src/run-panel/RunPanelHeader.tsx +6 -6
- package/apps/web/src/run-panel/RunPanelMenu.tsx +6 -6
- package/apps/web/src/run-panel/RunPanelRail.tsx +4 -4
- package/apps/web/src/run-panel/RunPanelWorkspace.tsx +3 -3
- package/apps/web/src/run-panel/clipboard.ts +3 -3
- package/apps/web/src/run-panel/host-contract.ts +5 -5
- package/apps/web/src/run-panel/host.ts +15 -15
- package/apps/web/src/run-panel/input-bridge.ts +1 -1
- package/apps/web/src/run-panel/run-panel-location.ts +5 -5
- package/apps/web/src/run-panel/use-session-list.ts +1 -1
- package/apps/web/src/run-panel/workspace-state.ts +3 -3
- package/apps/web/src/run-panel.tsx +4 -4
- package/apps/web/src/run-preparation.ts +2 -2
- package/apps/web/src/run-view.ts +3 -3
- package/apps/web/src/settings-contributions.ts +32 -32
- package/apps/web/src/theme.ts +9 -9
- package/apps/web/src/title-model-settings.ts +6 -6
- package/apps/web/src/ui/ListDetail.tsx +9 -9
- package/apps/web/src/ui/dialog.tsx +2 -2
- package/apps/web/src/ui/modal-controller.ts +3 -3
- package/apps/web/src/ui/modal.tsx +2 -2
- package/apps/web/src/ui/popover.tsx +1 -1
- package/apps/web/src/ui/relative-time.ts +8 -8
- package/apps/web/src/ui/startup-notice.tsx +2 -2
- package/apps/web/src/ui/state-icon.tsx +1 -1
- package/apps/web/src/ui/state-vocabulary.ts +16 -16
- package/apps/web/src/ui/stop-button.tsx +2 -2
- package/bundles/ragents.activity/ragents-bundle.json +2 -2
- package/bundles/ragents.activity/web/classes.json +1 -1
- package/bundles/ragents.activity/web/index.js +1 -1
- package/bundles/ragents.activity/web/index.js.map +2 -2
- package/bundles/ragents.actor-programs/ragents-bundle.json +2 -2
- package/bundles/ragents.actor-programs/server/index.js +256 -228
- package/bundles/ragents.actor-programs/server/index.js.map +4 -4
- package/bundles/ragents.actor-programs/web/classes.json +1 -1
- package/bundles/ragents.actor-programs/web/index.js +1 -1
- package/bundles/ragents.actor-programs/web/index.js.map +3 -3
- package/bundles/ragents.ask/ragents-bundle.json +2 -4
- package/bundles/ragents.ask/server/chunks/{chunk-PDJO75SQ.js → chunk-YOV27MAR.js} +2 -2
- package/bundles/ragents.ask/server/chunks/chunk-YOV27MAR.js.map +7 -0
- package/bundles/ragents.ask/server/exports/server/contract.js +1 -1
- package/bundles/ragents.ask/server/index.js +23 -23
- package/bundles/ragents.ask/server/index.js.map +2 -2
- package/bundles/ragents.ask/web/chunks/{chunk-WFN4374U.js → chunk-D6NNB5DS.js} +1 -1
- package/bundles/ragents.ask/web/chunks/chunk-D6NNB5DS.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/{chunk-V7W3QDVS.js → chunk-IQBHK7MV.js} +2 -2
- package/bundles/ragents.ask/web/chunks/{chunk-V7W3QDVS.js.map → chunk-IQBHK7MV.js.map} +4 -4
- package/bundles/ragents.ask/web/chunks/chunk-PWFIAMX4.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-PWFIAMX4.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/chunk-QHGKEESD.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-QHGKEESD.js.map +7 -0
- package/bundles/ragents.ask/web/classes.json +1 -1
- package/bundles/ragents.ask/web/exports/ask-payload.js +1 -1
- package/bundles/ragents.ask/web/exports/web/QuestionCard.js +1 -1
- package/bundles/ragents.ask/web/exports/web/api.js +1 -1
- package/bundles/ragents.ask/web/index.js +1 -1
- package/bundles/ragents.ask/web/index.js.map +4 -4
- package/bundles/ragents.browser/executor/index.mjs +35 -35
- package/bundles/ragents.browser/executor/index.mjs.map +2 -2
- package/bundles/ragents.browser/ragents-bundle.json +2 -2
- package/bundles/ragents.browser/server/chunks/{chunk-CWLX4VA5.js → chunk-PYEISBNE.js} +1 -1
- package/bundles/ragents.browser/server/chunks/{chunk-CWLX4VA5.js.map → chunk-PYEISBNE.js.map} +1 -1
- package/bundles/ragents.browser/server/exports/server/contract.js +1 -1
- package/bundles/ragents.browser/server/index.js +31 -31
- package/bundles/ragents.browser/server/index.js.map +2 -2
- package/bundles/ragents.browser/skills/browser-testing/SKILL.md +30 -30
- package/bundles/ragents.documents/prompt.hbs +1 -1
- package/bundles/ragents.documents/ragents-bundle.json +2 -2
- package/bundles/ragents.documents/server/chunks/{chunk-QIECRZ7C.js → chunk-KMZWOVTI.js} +3 -3
- package/bundles/ragents.documents/server/chunks/{chunk-QIECRZ7C.js.map → chunk-KMZWOVTI.js.map} +2 -2
- package/bundles/ragents.documents/server/exports/contract.js +1 -1
- package/bundles/ragents.documents/server/index.js +26 -26
- package/bundles/ragents.documents/server/index.js.map +2 -2
- package/bundles/ragents.documents/web/classes.json +1 -1
- package/bundles/ragents.documents/web/index.js +1 -1
- package/bundles/ragents.documents/web/index.js.map +3 -3
- package/bundles/ragents.lsp-fsharp/executor/index.mjs +4 -4
- package/bundles/ragents.lsp-fsharp/executor/index.mjs.map +2 -2
- package/bundles/ragents.lsp-fsharp/ragents-bundle.json +2 -2
- package/bundles/ragents.lsp-fsharp/server/index.js +5 -5
- package/bundles/ragents.lsp-fsharp/server/index.js.map +2 -2
- package/bundles/ragents.lsp-fsharp/web/index.js +1 -1
- package/bundles/ragents.lsp-fsharp/web/index.js.map +2 -2
- package/bundles/ragents.lsp-roslyn/executor/index.mjs +3 -3
- package/bundles/ragents.lsp-roslyn/executor/index.mjs.map +2 -2
- package/bundles/ragents.lsp-roslyn/ragents-bundle.json +2 -2
- package/bundles/ragents.lsp-roslyn/server/index.js +17 -17
- package/bundles/ragents.lsp-roslyn/server/index.js.map +2 -2
- package/bundles/ragents.lsp-roslyn/web/index.js +1 -1
- package/bundles/ragents.lsp-roslyn/web/index.js.map +2 -2
- package/bundles/ragents.lsp-typescript/executor/index.mjs +2 -2
- package/bundles/ragents.lsp-typescript/executor/index.mjs.map +2 -2
- package/bundles/ragents.lsp-typescript/ragents-bundle.json +2 -2
- package/bundles/ragents.lsp-typescript/server/index.js.map +1 -1
- package/bundles/ragents.lsp-typescript/web/index.js +1 -1
- package/bundles/ragents.lsp-typescript/web/index.js.map +2 -2
- package/bundles/ragents.model-relay/ragents-bundle.json +7 -3
- package/bundles/ragents.model-relay/server/index.js +25 -21
- package/bundles/ragents.model-relay/server/index.js.map +2 -2
- package/bundles/ragents.orchestration/ragents-bundle.json +2 -2
- package/bundles/ragents.orchestration/server/index.js +28 -28
- package/bundles/ragents.orchestration/server/index.js.map +2 -2
- package/bundles/ragents.orchestration/web/chunks/{chunk-OSKPH6SZ.js → chunk-CFMJD5ZI.js} +2 -2
- package/bundles/ragents.orchestration/web/chunks/chunk-HOBLI364.js +2 -0
- package/bundles/ragents.orchestration/web/chunks/{chunk-OQYCNYXN.js.map → chunk-HOBLI364.js.map} +2 -2
- package/bundles/ragents.orchestration/web/chunks/{chunk-ODMMQGX2.js → chunk-UCIMT2R4.js} +2 -2
- package/bundles/ragents.orchestration/web/classes.json +1 -1
- package/bundles/ragents.orchestration/web/exports/web/program-slot.js +1 -1
- package/bundles/ragents.orchestration/web/exports/web/surface-entities.js +1 -1
- package/bundles/ragents.orchestration/web/index.js +8 -8
- package/bundles/ragents.orchestration/web/index.js.map +3 -3
- package/bundles/ragents.overseer/ragents-bundle.json +2 -2
- package/bundles/ragents.overseer/server/index.js +99 -99
- package/bundles/ragents.overseer/server/index.js.map +2 -2
- package/bundles/ragents.overseer/web/classes.json +1 -1
- package/bundles/ragents.overseer/web/index.js +1 -1
- package/bundles/ragents.overseer/web/index.js.map +2 -2
- package/bundles/ragents.processes/ragents-bundle.json +2 -2
- package/bundles/ragents.processes/server/index.js +11 -11
- package/bundles/ragents.processes/server/index.js.map +2 -2
- package/bundles/ragents.processes/web/classes.json +1 -1
- package/bundles/ragents.processes/web/index.js +3 -3
- package/bundles/ragents.processes/web/index.js.map +2 -2
- package/bundles/ragents.product/ragents-bundle.json +2 -2
- package/bundles/ragents.product/server/index.js +12 -13
- package/bundles/ragents.product/server/index.js.map +2 -2
- package/bundles/ragents.product/web/classes.json +1 -1
- package/bundles/ragents.product/web/index.js +1 -1
- package/bundles/ragents.product/web/index.js.map +2 -2
- package/bundles/ragents.profile-distribution/ragents-bundle.json +2 -2
- package/bundles/ragents.profile-distribution/server/index.js +31 -31
- package/bundles/ragents.profile-distribution/server/index.js.map +2 -2
- package/bundles/ragents.reference/ragents-bundle.json +2 -2
- package/bundles/ragents.reference/run-scripts/balcony-wizard/RUN.md +19 -19
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +2 -2
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/client.tsx +14 -14
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/conversation.ts +2 -2
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/tests/conversation.test.ts +49 -49
- package/bundles/ragents.reference/run-scripts/balcony-wizard/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/balcony-wizard/src/server.ts +9 -9
- package/bundles/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +9 -9
- package/bundles/ragents.reference/run-scripts/conversation-circle/RUN.md +7 -7
- package/bundles/ragents.reference/run-scripts/conversation-circle/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/conversation-circle/src/server.ts +13 -13
- package/bundles/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
- package/bundles/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +8 -8
- package/bundles/ragents.reference/run-scripts/learning-afternoon/RUN.md +16 -16
- package/bundles/ragents.reference/run-scripts/learning-afternoon/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/experiment.md +1 -1
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/helper.md +3 -3
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/quiz.md +1 -1
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/server.ts +9 -9
- package/bundles/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +39 -39
- package/bundles/ragents.reference/run-scripts/moderated-round/RUN.md +7 -7
- package/bundles/ragents.reference/run-scripts/moderated-round/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/moderated-round/src/server.ts +9 -9
- package/bundles/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +1 -1
- package/bundles/ragents.reference/run-scripts/moderated-round/tests/program.test.ts +6 -6
- package/bundles/ragents.reference/run-scripts/shared-actor-list/RUN.md +12 -12
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/package.json +2 -2
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/contract.ts +3 -3
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/tests/program.test.ts +4 -4
- package/bundles/ragents.reference/run-scripts/shared-actor-list/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/shared-actor-list/src/server.ts +11 -11
- package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
- package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/program.test.ts +13 -13
- package/bundles/ragents.reference/run-scripts/word-game/RUN.md +18 -18
- package/bundles/ragents.reference/run-scripts/word-game/package.json +2 -2
- package/bundles/ragents.reference/run-scripts/word-game/src/client.tsx +1 -1
- package/bundles/ragents.reference/run-scripts/word-game/src/contract.ts +2 -2
- package/bundles/ragents.reference/run-scripts/word-game/src/server.ts +16 -16
- package/bundles/ragents.reference/run-scripts/word-game/tests/program.test.ts +39 -39
- package/bundles/ragents.reference/skills/100-shared-actor-list/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/110-all-card-slots/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/150-editorial-workbench/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/160-learning-companion/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/170-photo-collection/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/180-decision-workbench/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/190-review-queue/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/20-circle-of-four/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/200-typescript-diagnostics/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/210-moderator-handover/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/220-actor-approval-list/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/230-shared-state-views/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/240-live-result-list/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/250-balcony-wizard/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/30-llm-without-runtime-knowledge/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/35-actor-input-fifo/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/40-subscription-matrix/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/50-subscription-removal/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/60-stop-in-the-circle/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/65-artifact-least-privilege/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/70-headless-counter/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/75-lsp-demo/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/80-actor-text-analysis/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/90-actor-notes/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/95-hello-world/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/decision-brief/SKILL.md +24 -24
- package/bundles/ragents.reference/skills/learning-sprint/SKILL.md +24 -24
- package/bundles/ragents.reference/web/classes.json +1 -1
- package/bundles/ragents.reference/web/index.js +1 -1
- package/bundles/ragents.reference/web/index.js.map +2 -2
- package/bundles/ragents.todo/ragents-bundle.json +2 -2
- package/bundles/ragents.todo/server/index.js +5 -5
- package/bundles/ragents.todo/server/index.js.map +2 -2
- package/bundles/ragents.todo/web/classes.json +1 -1
- package/bundles/ragents.todo/web/index.js +1 -1
- package/bundles/ragents.todo/web/index.js.map +2 -2
- package/bundles/ragents.transcript/ragents-bundle.json +2 -2
- package/bundles/ragents.transcript/server/index.js +11 -11
- package/bundles/ragents.transcript/server/index.js.map +2 -2
- package/bundles/ragents.watch/ragents-bundle.json +2 -2
- package/bundles/ragents.watch/server/index.js +48 -48
- package/bundles/ragents.watch/server/index.js.map +2 -2
- package/bundles/ragents.workspace/ragents-bundle.json +2 -2
- package/bundles/ragents.workspace/server/index.js +83 -81
- package/bundles/ragents.workspace/server/index.js.map +2 -2
- package/bundles/ragents.workspace/web/classes.json +1 -1
- package/bundles/ragents.workspace/web/index.js +1 -1
- package/bundles/ragents.workspace/web/index.js.map +2 -2
- package/package.json +4 -4
- package/packages/agent/dist/core/model-runtime.d.ts +7 -2
- package/packages/agent/dist/core/tools/bash.d.ts +1 -1
- package/packages/agent/dist/index.d.ts +1 -1
- package/packages/agent/dist/loop/agent-loop.d.ts +2 -2
- package/packages/agent/src/core/compaction/utils.ts +1 -1
- package/packages/agent/src/core/model-runtime.ts +45 -5
- package/packages/agent/src/core/tools/bash.ts +1 -1
- package/packages/agent/src/index.ts +1 -1
- package/packages/agent/src/loop/agent-loop.ts +2 -2
- package/packages/ai/dist/models.d.ts +1 -0
- package/packages/ai/dist/models.generated.d.ts +4544 -983
- package/packages/ai/dist/providers/openrouter.models.d.ts +4544 -983
- package/packages/ai/src/api/ai-sdk.ts +33 -7
- package/packages/ai/src/api-registry.ts +1 -1
- package/packages/ai/src/index.ts +2 -2
- package/packages/ai/src/models.generated.ts +1 -1
- package/packages/ai/src/models.ts +1 -1
- package/packages/ai/src/providers/openrouter.models.ts +3723 -550
- package/packages/ragents/src/access.ts +12 -12
- package/packages/ragents/src/agents/actor-input.ts +33 -33
- package/packages/ragents/src/agents/catalog.ts +1 -1
- package/packages/ragents/src/agents/delivery.ts +17 -17
- package/packages/ragents/src/agents/plugins.ts +1 -1
- package/packages/ragents/src/agents/scheduler.ts +7 -7
- package/packages/ragents/src/agents/schemas.ts +1 -1
- package/packages/ragents/src/agents/tool-orientation.ts +4 -4
- package/packages/ragents/src/agents/tools.ts +20 -20
- package/packages/ragents/src/agents/toolset.ts +5 -5
- package/packages/ragents/src/agents/workspaces.ts +1 -1
- package/packages/ragents/src/domain/events.ts +1 -1
- package/packages/ragents/src/domain/model.ts +5 -5
- package/packages/ragents/src/drivers/agent-runtime.ts +1 -1
- package/packages/ragents/src/drivers/agent-turn.ts +4 -4
- package/packages/ragents/src/drivers/agent.ts +2 -2
- package/packages/ragents/src/drivers/attachments.ts +4 -4
- package/packages/ragents/src/http/contracts.ts +14 -14
- package/packages/ragents/src/http/methods.ts +6 -6
- package/packages/ragents/src/index.ts +1 -0
- package/packages/ragents/src/plugin-host.ts +162 -116
- package/packages/ragents/src/plugin-types.ts +29 -10
- package/packages/ragents/src/rpc/contract.ts +5 -5
- package/packages/ragents/src/rpc/contribution.ts +2 -2
- package/packages/ragents/src/rpc/peer.ts +11 -11
- package/packages/ragents/src/rpc/protocol.ts +2 -2
- package/packages/ragents/src/runtime/decisions/turns.ts +1 -1
- package/packages/ragents/src/runtime/journal.ts +10 -10
- package/packages/ragents/src/runtime/orchestration.ts +8 -8
- package/packages/ragents/src/runtime/stop.ts +2 -2
- package/packages/ragents/src/script/mediators.ts +35 -35
- package/packages/ragents/src/typescript/async-compiler.ts +14 -14
- package/packages/ragents/src/typescript/compiler-worker.ts +2 -2
- package/packages/ragents/src/typescript/compiler.ts +7 -7
- package/packages/ragents/src/typescript/snippet.ts +5 -5
- package/packages/workspace-executor/src/bash-launch.ts +13 -13
- package/packages/workspace-executor/src/commands.ts +18 -18
- package/packages/workspace-executor/src/context.ts +15 -15
- package/packages/workspace-executor/src/contributions.ts +35 -35
- package/packages/workspace-executor/src/errors.ts +1 -1
- package/packages/workspace-executor/src/executor.ts +15 -15
- package/packages/workspace-executor/src/files.ts +30 -30
- package/packages/workspace-executor/src/language-server/contract.ts +2 -2
- package/packages/workspace-executor/src/language-server/diagnostics.ts +4 -4
- package/packages/workspace-executor/src/language-server/host.ts +35 -35
- package/packages/workspace-executor/src/language-server/json-rpc.ts +4 -4
- package/packages/workspace-executor/src/language-server/module.ts +11 -11
- package/packages/workspace-executor/src/language-server/roots.ts +3 -3
- package/packages/workspace-executor/src/language-server/session.ts +15 -15
- package/packages/workspace-executor/src/language-server/workspace-solutions.ts +2 -2
- package/packages/workspace-executor/src/managed-process.ts +35 -7
- package/packages/workspace-executor/src/module.ts +8 -8
- package/packages/workspace-executor/src/modules.ts +3 -3
- package/packages/workspace-executor/src/paths.ts +11 -11
- package/packages/workspace-executor/src/process-sandbox.ts +3 -3
- package/packages/workspace-executor/src/processes/module.ts +3 -3
- package/packages/workspace-executor/src/processes/process-table.ts +20 -20
- package/packages/workspace-executor/src/processes/scanner.ts +3 -3
- package/packages/workspace-executor/src/processes/snapshot.ts +2 -2
- package/packages/workspace-executor/src/processes/terminator.ts +13 -13
- package/packages/workspace-executor/src/run-folders.ts +3 -3
- package/packages/workspace-executor/src/safe-environment.ts +4 -4
- package/packages/workspace-executor/src/sandbox-tools.ts +37 -31
- package/packages/workspace-executor/src/session-ident.ts +2 -2
- package/packages/workspace-executor/src/shell-platform.ts +2 -2
- package/packages/workspace-executor/src/tools.ts +5 -5
- package/plugins/ragents.activity/web/ActivityHeader.tsx +3 -3
- package/plugins/ragents.activity/web/activity.ts +2 -2
- package/plugins/ragents.actor-programs/server/access-projections.ts +31 -0
- package/plugins/ragents.actor-programs/server/agent-tools.ts +2 -2
- package/plugins/ragents.actor-programs/server/capability-resolver.ts +3 -3
- package/plugins/ragents.actor-programs/server/controls-template.ts +46 -46
- package/plugins/ragents.actor-programs/server/controls-tool.ts +4 -4
- package/plugins/ragents.actor-programs/server/index.ts +2 -0
- package/plugins/ragents.actor-programs/server/limits.ts +3 -3
- package/plugins/ragents.actor-programs/server/methods.ts +1 -1
- package/plugins/ragents.actor-programs/server/project-diagnostics.ts +8 -8
- package/plugins/ragents.actor-programs/server/routes.ts +8 -8
- package/plugins/ragents.actor-programs/server/runtime.ts +90 -90
- package/plugins/ragents.actor-programs/server/templates.ts +59 -59
- package/plugins/ragents.actor-programs/server/test-report.ts +5 -5
- package/plugins/ragents.actor-programs/server/tool-contributor.ts +1 -1
- package/plugins/ragents.actor-programs/web/ActorViewFrame.tsx +17 -17
- package/plugins/ragents.actor-programs/web/AppsPanel.tsx +26 -26
- package/plugins/ragents.actor-programs/web/EmbeddedApps.tsx +3 -3
- package/plugins/ragents.actor-programs/web/FullscreenHost.tsx +2 -2
- package/plugins/ragents.actor-programs/web/FunctionForm.tsx +16 -16
- package/plugins/ragents.actor-programs/web/ProgramSource.tsx +5 -5
- package/plugins/ragents.actor-programs/web/api.ts +36 -36
- package/plugins/ragents.actor-programs/web/bridge.ts +8 -8
- package/plugins/ragents.actor-programs/web/chat-state.ts +4 -4
- package/plugins/ragents.actor-programs/web/context.ts +1 -1
- package/plugins/ragents.actor-programs/web/function-input.ts +6 -6
- package/plugins/ragents.actor-programs/web/index.tsx +1 -1
- package/plugins/ragents.actor-programs/web/program-state.ts +4 -4
- package/plugins/ragents.ask/ask-payload.ts +1 -1
- package/plugins/ragents.ask/contract.ts +5 -5
- package/plugins/ragents.ask/server/answer-method.ts +1 -1
- package/plugins/ragents.ask/server/ask-service.ts +9 -9
- package/plugins/ragents.ask/server/ask-tool.ts +10 -10
- package/plugins/ragents.ask/server/contract.ts +5 -5
- package/plugins/ragents.ask/web/AskActionView.tsx +1 -1
- package/plugins/ragents.ask/web/QuestionCard.tsx +22 -22
- package/plugins/ragents.ask/web/index.tsx +2 -8
- package/plugins/ragents.browser/executor/contract.ts +6 -6
- package/plugins/ragents.browser/executor/index.ts +1 -1
- package/plugins/ragents.browser/executor/module.ts +6 -6
- package/plugins/ragents.browser/executor/pages.ts +32 -32
- package/plugins/ragents.browser/executor/playwright.ts +8 -8
- package/plugins/ragents.browser/provision.ts +7 -7
- package/plugins/ragents.browser/server/browser.ts +14 -14
- package/plugins/ragents.browser/server/contract.ts +1 -1
- package/plugins/ragents.browser/server/index.ts +1 -1
- package/plugins/ragents.browser/server/tools.ts +14 -14
- package/plugins/ragents.browser/skills/browser-testing/SKILL.md +30 -30
- package/plugins/ragents.documents/contract.ts +2 -2
- package/plugins/ragents.documents/prompt.hbs +1 -1
- package/plugins/ragents.documents/server/document-write-tool.ts +12 -12
- package/plugins/ragents.documents/server/files-route.ts +6 -6
- package/plugins/ragents.documents/server/show-document-tool.ts +26 -26
- package/plugins/ragents.documents/server/store.ts +1 -1
- package/plugins/ragents.documents/web/DocumentViewer.tsx +37 -37
- package/plugins/ragents.documents/web/index.tsx +11 -11
- package/plugins/ragents.lsp-fsharp/executor.ts +7 -7
- package/plugins/ragents.lsp-fsharp/provision.ts +7 -7
- package/plugins/ragents.lsp-roslyn/executor.ts +5 -5
- package/plugins/ragents.lsp-roslyn/provision.ts +4 -4
- package/plugins/ragents.lsp-roslyn/server/index.ts +5 -5
- package/plugins/ragents.lsp-roslyn/server/solution-on-start.ts +13 -13
- package/plugins/ragents.lsp-typescript/executor.ts +3 -3
- package/plugins/ragents.model-relay/server/config.ts +6 -2
- package/plugins/ragents.model-relay/server/index.ts +2 -2
- package/plugins/ragents.model-relay/server/relay.ts +23 -22
- package/plugins/ragents.orchestration/contract.ts +8 -8
- package/plugins/ragents.orchestration/server/index.ts +4 -4
- package/plugins/ragents.orchestration/server/run-stop-tool.ts +3 -3
- package/plugins/ragents.orchestration/server/surface-tool.ts +5 -5
- package/plugins/ragents.orchestration/tiled-layout.ts +11 -11
- package/plugins/ragents.orchestration/web/ActorChat.tsx +2 -2
- package/plugins/ragents.orchestration/web/ActorChatControls.tsx +4 -4
- package/plugins/ragents.orchestration/web/ActorChatPreview.tsx +1 -1
- package/plugins/ragents.orchestration/web/ActorPopout.tsx +1 -1
- package/plugins/ragents.orchestration/web/ActorShortcut.tsx +6 -6
- package/plugins/ragents.orchestration/web/ActorSurfaceControls.tsx +15 -15
- package/plugins/ragents.orchestration/web/ActorTile.tsx +1 -1
- package/plugins/ragents.orchestration/web/Center.tsx +5 -5
- package/plugins/ragents.orchestration/web/DocumentsSection.tsx +2 -2
- package/plugins/ragents.orchestration/web/ExecutionsPanel.tsx +15 -15
- package/plugins/ragents.orchestration/web/FlowInspector.tsx +103 -103
- package/plugins/ragents.orchestration/web/JournalStatus.tsx +11 -11
- package/plugins/ragents.orchestration/web/MaterialBody.tsx +2 -2
- package/plugins/ragents.orchestration/web/StopRunButton.tsx +6 -6
- package/plugins/ragents.orchestration/web/TiledSurface.tsx +9 -9
- package/plugins/ragents.orchestration/web/actor-header-settings.ts +5 -5
- package/plugins/ragents.orchestration/web/constants.ts +2 -2
- package/plugins/ragents.orchestration/web/executions.ts +6 -6
- package/plugins/ragents.orchestration/web/format.ts +1 -1
- package/plugins/ragents.orchestration/web/index.tsx +2 -2
- package/plugins/ragents.orchestration/web/run-panel/AddresseeControl.tsx +7 -7
- package/plugins/ragents.orchestration/web/run-panel/AddresseeTree.tsx +8 -8
- package/plugins/ragents.orchestration/web/run-panel/RunPanel.tsx +29 -28
- package/plugins/ragents.orchestration/web/run-panel/RunPanelSettings.tsx +7 -7
- package/plugins/ragents.orchestration/web/run-panel/addressee-tree.ts +13 -13
- package/plugins/ragents.orchestration/web/run-panel/run-panel-actors.ts +3 -3
- package/plugins/ragents.orchestration/web/run-panel/run-panel-settings.ts +2 -2
- package/plugins/ragents.orchestration/web/run-panel/run-panel-startup.ts +3 -3
- package/plugins/ragents.orchestration/web/run-panel/run-panel-state.ts +7 -7
- package/plugins/ragents.orchestration/web/run-panel/sheet-status.ts +10 -10
- package/plugins/ragents.orchestration/web/surface-startup.ts +8 -8
- package/plugins/ragents.orchestration/web/surface-view-settings.ts +1 -1
- package/plugins/ragents.orchestration/web/tiled-view-settings.ts +1 -1
- package/plugins/ragents.overseer/contract.ts +20 -20
- package/plugins/ragents.overseer/server/api.ts +8 -8
- package/plugins/ragents.overseer/server/coordinator-prompt.ts +10 -10
- package/plugins/ragents.overseer/server/coordinator.ts +4 -4
- package/plugins/ragents.overseer/server/index.ts +24 -24
- package/plugins/ragents.overseer/server/orientation.ts +8 -8
- package/plugins/ragents.overseer/server/quick-answer.ts +9 -9
- package/plugins/ragents.overseer/server/run-directory.ts +5 -5
- package/plugins/ragents.overseer/server/settings.ts +6 -6
- package/plugins/ragents.overseer/server/user-location.ts +16 -16
- package/plugins/ragents.overseer/web/ModelSettings.tsx +9 -9
- package/plugins/ragents.overseer/web/index.tsx +20 -20
- package/plugins/ragents.overseer/web/model-settings.ts +1 -1
- package/plugins/ragents.overseer/web/quick-answers.ts +2 -2
- package/plugins/ragents.processes/contract.ts +5 -5
- package/plugins/ragents.processes/server/methods.ts +4 -4
- package/plugins/ragents.processes/server/observer.ts +8 -8
- package/plugins/ragents.processes/server/run-processes.ts +2 -2
- package/plugins/ragents.processes/web/ProcessHeader.tsx +10 -10
- package/plugins/ragents.processes/web/processes.ts +10 -10
- package/plugins/ragents.product/server/config.ts +1 -1
- package/plugins/ragents.product/server/index.ts +4 -4
- package/plugins/ragents.product/server/runtime.ts +9 -10
- package/plugins/ragents.product/web/index.tsx +1 -1
- package/plugins/ragents.profile-distribution/contract.ts +10 -10
- package/plugins/ragents.profile-distribution/server/archive.ts +20 -20
- package/plugins/ragents.profile-distribution/server/config.ts +2 -2
- package/plugins/ragents.profile-distribution/server/index.ts +4 -4
- package/plugins/ragents.reference/examples.ts +27 -27
- package/plugins/ragents.reference/run-scripts/balcony-wizard/RUN.md +19 -19
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +2 -2
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/client.tsx +14 -14
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/conversation.ts +2 -2
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/tests/conversation.test.ts +49 -49
- package/plugins/ragents.reference/run-scripts/balcony-wizard/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/src/server.ts +9 -9
- package/plugins/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +9 -9
- package/plugins/ragents.reference/run-scripts/conversation-circle/RUN.md +7 -7
- package/plugins/ragents.reference/run-scripts/conversation-circle/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/conversation-circle/src/server.ts +13 -13
- package/plugins/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +8 -8
- package/plugins/ragents.reference/run-scripts/learning-afternoon/RUN.md +16 -16
- package/plugins/ragents.reference/run-scripts/learning-afternoon/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/prompts/experiment.md +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/prompts/helper.md +3 -3
- package/plugins/ragents.reference/run-scripts/learning-afternoon/prompts/quiz.md +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/server.ts +9 -9
- package/plugins/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +39 -39
- package/plugins/ragents.reference/run-scripts/moderated-round/RUN.md +7 -7
- package/plugins/ragents.reference/run-scripts/moderated-round/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/moderated-round/src/server.ts +9 -9
- package/plugins/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/moderated-round/tests/program.test.ts +6 -6
- package/plugins/ragents.reference/run-scripts/shared-actor-list/RUN.md +12 -12
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/package.json +2 -2
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/contract.ts +3 -3
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/tests/program.test.ts +4 -4
- package/plugins/ragents.reference/run-scripts/shared-actor-list/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/shared-actor-list/src/server.ts +11 -11
- package/plugins/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/shared-actor-list/tests/program.test.ts +13 -13
- package/plugins/ragents.reference/run-scripts/word-game/RUN.md +18 -18
- package/plugins/ragents.reference/run-scripts/word-game/package.json +2 -2
- package/plugins/ragents.reference/run-scripts/word-game/src/client.tsx +1 -1
- package/plugins/ragents.reference/run-scripts/word-game/src/contract.ts +2 -2
- package/plugins/ragents.reference/run-scripts/word-game/src/server.ts +16 -16
- package/plugins/ragents.reference/run-scripts/word-game/tests/program.test.ts +39 -39
- package/plugins/ragents.reference/skills/100-shared-actor-list/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/110-all-card-slots/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/150-editorial-workbench/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/160-learning-companion/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/170-photo-collection/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/180-decision-workbench/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/190-review-queue/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/20-circle-of-four/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/200-typescript-diagnostics/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/210-moderator-handover/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/220-actor-approval-list/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/230-shared-state-views/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/240-live-result-list/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/250-balcony-wizard/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/30-llm-without-runtime-knowledge/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/35-actor-input-fifo/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/40-subscription-matrix/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/50-subscription-removal/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/60-stop-in-the-circle/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/65-artifact-least-privilege/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/70-headless-counter/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/75-lsp-demo/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/80-actor-text-analysis/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/90-actor-notes/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/95-hello-world/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/decision-brief/SKILL.md +24 -24
- package/plugins/ragents.reference/skills/learning-sprint/SKILL.md +24 -24
- package/plugins/ragents.reference/walkthroughs.ts +128 -128
- package/plugins/ragents.reference/web/StartGuides.tsx +23 -23
- package/plugins/ragents.todo/server/todo-tool.ts +6 -6
- package/plugins/ragents.todo/web/TodoSection.tsx +1 -1
- package/plugins/ragents.transcript/server/transcript.ts +11 -11
- package/plugins/ragents.watch/server/condition.ts +4 -4
- package/plugins/ragents.watch/server/functions.ts +27 -27
- package/plugins/ragents.watch/server/observation.ts +2 -2
- package/plugins/ragents.watch/server/service.ts +14 -14
- package/plugins/ragents.workspace/client/transport.ts +1 -1
- package/plugins/ragents.workspace/client/workspace-client.ts +62 -49
- package/plugins/ragents.workspace/contract.ts +46 -46
- package/plugins/ragents.workspace/server/binding.ts +20 -20
- package/plugins/ragents.workspace/server/browse-route.ts +8 -8
- package/plugins/ragents.workspace/server/clients.ts +42 -42
- package/plugins/ragents.workspace/server/config.ts +8 -5
- package/plugins/ragents.workspace/server/index.ts +5 -4
- package/plugins/ragents.workspace/server/runtime.ts +26 -26
- package/plugins/ragents.workspace/server/shell-platform.ts +1 -1
- package/plugins/ragents.workspace/web/FileBrowser.tsx +10 -10
- package/plugins/ragents.workspace/web/WorkspaceBinding.tsx +24 -24
- package/plugins/ragents.workspace/web/index.tsx +1 -1
- package/ragents.config.core.ts +1 -1
- package/ragents.config.developer.ts +3 -3
- package/ragents.config.showcase.ts +2 -2
- package/scripts/agent/agent-cli.ts +96 -96
- package/scripts/agent/journal.ts +5 -5
- package/scripts/agent/turn-control.ts +4 -4
- package/scripts/package/build-package.ts +29 -29
- package/scripts/package/host-links.mjs +3 -3
- package/scripts/package/publish-package.ts +29 -29
- package/scripts/package/ragents.mjs +19 -19
- package/scripts/plugin/build-builtin-plugins.ts +5 -5
- package/scripts/plugin/plugin-cli.ts +14 -14
- package/scripts/provision/run-provision.ts +14 -15
- package/scripts/remote/connect.ts +46 -46
- package/scripts/remote/start.ts +18 -18
- package/scripts/workspace-client/run-workspace-client.ts +23 -23
- package/apps/web/dist/assets/main-C7JeZFjs.js +0 -6
- package/apps/web/dist/assets/mermaid-HWGCJPDP-DfsU5ofC.js +0 -478
- package/apps/web/dist/assets/runPanel-ZT6TPDLM.js +0 -21
- package/bundles/ragents.ask/server/chunks/chunk-PDJO75SQ.js.map +0 -7
- package/bundles/ragents.ask/web/chunks/chunk-4VXWWEG7.js +0 -2
- package/bundles/ragents.ask/web/chunks/chunk-4VXWWEG7.js.map +0 -7
- package/bundles/ragents.ask/web/chunks/chunk-VUBJDIKQ.js +0 -2
- package/bundles/ragents.ask/web/chunks/chunk-VUBJDIKQ.js.map +0 -7
- package/bundles/ragents.ask/web/chunks/chunk-WFN4374U.js.map +0 -7
- package/bundles/ragents.orchestration/web/chunks/chunk-OQYCNYXN.js +0 -2
- package/plugins/ragents.ask/web/QuestionSection.tsx +0 -48
- /package/bundles/ragents.orchestration/web/chunks/{chunk-OSKPH6SZ.js.map → chunk-CFMJD5ZI.js.map} +0 -0
- /package/bundles/ragents.orchestration/web/chunks/{chunk-ODMMQGX2.js.map → chunk-UCIMT2R4.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ragents-host-read:read", "ragents-host-value:@ragents/web/AccessContext#useAccess", "ragents-host-value:@ragents/web/ui#Button", "ragents-host-value:@ragents/web/ui#Dialog", "ragents-host-value:@ragents/web/ui#DialogContent", "ragents-host-value:@ragents/web/ui#DialogDescription", "ragents-host-value:@ragents/web/ui#DialogFooter", "ragents-host-value:@ragents/web/ui#DialogHeader", "ragents-host-value:@ragents/web/ui#DialogTitle", "ragents-host-value:@ragents/web/ui#Popover", "ragents-host-value:@ragents/web/ui#PopoverContent", "ragents-host-value:@ragents/web/ui#Select", "ragents-host-value:@ragents/web/ui#SelectContent", "ragents-host-value:@ragents/web/ui#SelectItem", "ragents-host-value:@ragents/web/ui#SelectTrigger", "ragents-host-value:@ragents/web/ui#SelectValue", "ragents-host-value:@ragents/web/ui/dialog#RunModalContext", "ragents-host-value:react#createContext", "ragents-host-value:react#createElement", "ragents-host-value:react#forwardRef", "ragents-host-value:react#useCallback", "ragents-host-value:react#useContext", "ragents-host-value:react#useEffect", "ragents-host-value:react#useMemo", "ragents-host-value:react#useRef", "ragents-host-value:react#useState", "ragents-host-value:react#useSyncExternalStore", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toKebabCase.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toLucideIconData.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toCamelCase.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toPascalCase.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/mergeClasses.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/build/defaultAttributes.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/build/buildLucideIconNode.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/build/buildLucideIconForReact.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/hasA11yProp.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/context.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/Icon.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/createLucideIcon.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/x.ts", "ragents-host-value:quassel#ChatInputToolbar", "ragents-host-value:quassel#ChatMessages", "ragents-host-value:@ragents/web/chat/useChat#useChat", "ragents-host-value:@ragents/web/chat/useAttachmentCapabilities#useAttachmentCapabilities", "ragents-host-value:@ragents/web/PluginRegistry#ChatStepsProvider", "ragents-host-value:@ragents/web/chat-view-settings#ChatViewSwitches", "ragents-host-value:@ragents/web/chat-view-settings#useChatViewSettings", "ragents-host-value:@ragents/web/toolLine#withToolSummaries", "ragents-host-value:@ragents/web/rpc#rpc", "ragents-host-value:@ragents/web/api#interruptActorTurn", "ragents-host-value:@ragents/engine/src/http/contracts#runContracts", "ragents-host-value:@ragents/web/run-view#runViewFrom", "ragents-host-value:typebox#Type", "ragents-host-value:@ragents/engine/src/rpc/contract#defineOperation", "ragents-host-value:@ragents/engine/src/domain/events#eventTypeMap", "../../../plugins/ragents.overseer/contract.ts", "ragents-host-value:@ragents/web/lib/labels#thinkingLabel", "../../../plugins/ragents.overseer/web/model-settings.ts", "ragents-host-value:react/jsx-runtime#Fragment", "ragents-host-value:react/jsx-runtime#jsx", "ragents-host-value:react/jsx-runtime#jsxs", "../../../plugins/ragents.overseer/web/ModelSettings.tsx", "../../../plugins/ragents.overseer/web/chat-display.ts", "../../../plugins/ragents.overseer/web/quick-answers.ts", "../../../plugins/ragents.overseer/web/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export const read = (specifier, name) => {\n const module = globalThis[\"__ragentsHostModules\"]?.[specifier];\n if (module === undefined) throw new Error(`Der Host stellt ${specifier} nicht bereit`);\n if (!(name in module)) throw new Error(`Der Host stellt ${name} aus ${specifier} nicht bereit; das Bundle ist gegen einen neueren Host gebaut`);\n return module[name];\n};", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/AccessContext\", \"useAccess\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Button\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Dialog\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogDescription\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogFooter\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogHeader\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogTitle\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Popover\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"PopoverContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Select\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectTrigger\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectValue\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui/dialog\", \"RunModalContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createElement\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"forwardRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useCallback\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useEffect\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useMemo\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useState\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useSyncExternalStore\");\n", "/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string?.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n", "import { toKebabCase } from './toKebabCase';\nimport type { LucideIconData, LucideIconNode } from '../build/types';\n\n/**\n * Converts legacy `(name, iconNode, aliases?)` icon arguments into icon data object format.\n */\nexport function toLucideIconData(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases: string[] = [],\n): LucideIconData {\n if (iconNode == null) {\n throw new Error('[lucide]: iconNode is required when icon name is used');\n }\n\n return {\n name: toKebabCase(iconName),\n size: 24,\n node: iconNode,\n ...(aliases.length > 0 ? { aliases } : {}),\n };\n}\n", "/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) => {\n let out = '';\n let upperNext = false;\n\n for (const ch of string) {\n if (ch === '-' || ch === '_' || ch <= ' ') {\n upperNext = out.length > 0;\n continue;\n }\n\n if (out.length === 0) {\n out += ch.toLowerCase();\n } else {\n out += upperNext ? ch.toUpperCase() : ch;\n }\n\n upperNext = false;\n }\n\n return out as string;\n};\n", "import { CamelToPascal } from '../utility-types';\nimport { toCamelCase } from './toCamelCase';\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n", "/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n", "const defaultAttributes = {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n} as const;\n\nexport default defaultAttributes;\n", "import type { LucideBuildParams, LucideIconData, LucideIconNode, SVGProps } from './types';\nimport defaultAttributes from './defaultAttributes';\nimport { mergeClasses } from '../utils/mergeClasses';\n\nfunction isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Creates a Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconNode(icon: LucideIconData, params: LucideBuildParams = {}): LucideIconNode {\n const attributeNames = params.attributeNames ?? {};\n const getAttributeName = (attributeName: string) =>\n attributeNames[attributeName] ?? attributeName;\n\n const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes['width'];\n const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes['height'];\n const aliasClassNames =\n icon.aliases\n ?.filter((alias: string): alias is string => typeof alias === 'string' && alias.trim() !== '')\n .map((alias: string) => `lucide-${alias}`) ?? [];\n const iconClassNames = [...(icon.name ? [`lucide-${icon.name}`] : []), ...aliasClassNames];\n const classNamesFromClassName = params.className?.split(' ').filter(Boolean) ?? [];\n const className =\n params.includeDefaultClasses === false\n ? mergeClasses(...classNamesFromClassName)\n : mergeClasses('lucide', ...iconClassNames, ...classNamesFromClassName);\n\n const calculatedStrokeWidth = params.absoluteStrokeWidth\n ? (Number(params.strokeWidth ?? defaultAttributes['stroke-width']) *\n Number(icon.size ?? icon.width ?? defaultAttributes['width'])) /\n Number(params.size ?? params.width ?? defaultAttributes['width'])\n : (params.strokeWidth ?? defaultAttributes['stroke-width']);\n\n const attributes = {\n ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {\n attrs[getAttributeName(attrName)] = value;\n return attrs;\n }, {} as SVGProps),\n ...('color' in params &&\n params.color && {\n [getAttributeName('stroke')]: params.color,\n }),\n ...('size' in params &&\n isDefined(params.size) && {\n [getAttributeName('width')]: params.size,\n [getAttributeName('height')]: params.size,\n }),\n ...('width' in params &&\n isDefined(params.width) && {\n [getAttributeName('width')]: params.width,\n }),\n ...('height' in params &&\n isDefined(params.height) && {\n [getAttributeName('height')]: params.height,\n }),\n [getAttributeName('stroke-width')]: calculatedStrokeWidth,\n ...(className && {\n [getAttributeName('class')]: className,\n }),\n [getAttributeName('viewBox')]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,\n ...(params.hasA11yProp === false\n ? {\n [getAttributeName('aria-hidden')]: 'true',\n }\n : {}),\n ...('attributes' in params && params.attributes),\n };\n\n return [\n 'svg',\n attributes,\n icon.node.map((child): LucideIconNode => {\n const [name, attrs, children] = child;\n const nextAttrs = params.nonScalingStroke\n ? { [getAttributeName('vector-effect')]: 'non-scaling-stroke', ...attrs }\n : attrs;\n\n return children ? [name, nextAttrs, children] : [name, nextAttrs];\n }),\n ];\n}\n\nexport default buildLucideIconNode;\n", "import buildLucideIconNode from './buildLucideIconNode';\nimport type { LucideBuildParams, LucideIconData, LucideIconNode } from './types';\n\n/**\n * Creates a React-compatible Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconForReact(\n icon: LucideIconData,\n params: LucideBuildParams = {},\n): LucideIconNode {\n return buildLucideIconNode(icon, {\n ...params,\n attributeNames: {\n ...params.attributeNames,\n class: 'className',\n 'stroke-width': 'strokeWidth',\n 'stroke-linecap': 'strokeLinecap',\n 'stroke-linejoin': 'strokeLinejoin',\n 'vector-effect': 'vectorEffect',\n },\n });\n}\n\nexport default buildLucideIconForReact;\n", "/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: object) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n\n return false;\n};\n", "'use client';\n\nimport { createContext, createElement, type ReactNode, useContext, useMemo } from 'react';\nimport { LucideProps } from './types';\n\ntype LucideConfig = {\n size: number;\n color: string;\n strokeWidth: number;\n /**\n * @deprecated Use `nonScalingStroke` instead.\n */\n absoluteStrokeWidth: boolean;\n nonScalingStroke: boolean;\n className: string;\n};\n\nconst LucideContext = createContext<LucideProps>({});\n\ntype LucideProviderProps = {\n children: ReactNode;\n} & Partial<LucideConfig>;\n\nexport function LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n}: LucideProviderProps) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className],\n );\n\n return createElement(LucideContext.Provider, { value }, children);\n}\n\nexport const useLucideContext = () => useContext(LucideContext);\n", "'use client';\n\nimport { createElement, forwardRef } from 'react';\nimport { buildLucideIconForReact, hasA11yProp, mergeClasses } from '@lucide/shared';\nimport { LucideIconData, LucideIconNode, LucideProps } from './types';\nimport { useLucideContext } from './context';\n\ntype IconComponentProps = LucideProps &\n (\n | {\n iconNode: LucideIconNode[];\n icon?: never;\n }\n | {\n icon: LucideIconData;\n iconNode?: never;\n }\n );\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {boolean} props.nonScalingStroke - Whether to use non scaling strokes\n * @param {string} props.className - The class name of the icon\n * @param {LucideIconNode[]} props.children - The children of the icon\n * @param {LucideIconNode[]} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color,\n size,\n width,\n height,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className = '',\n children,\n iconNode = [],\n icon = {\n node: iconNode,\n aliases: [],\n size: 24,\n },\n ...rest\n },\n ref,\n ) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n nonScalingStroke: contextNonScalingStroke = false,\n color: contextColor = 'currentColor',\n className: contextClass = '',\n } = useLucideContext() ?? {};\n\n const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);\n\n const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {\n color: color ?? contextColor,\n width: width ?? size ?? contextSize,\n height: height ?? size ?? contextSize,\n strokeWidth: strokeWidth ?? contextStrokeWidth,\n absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,\n nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,\n className: mergeClasses(contextClass, className),\n hasA11yProp: hasAccessibleProp,\n attributes: rest,\n });\n\n return createElement(\n name,\n {\n ref,\n ...svgAttributes,\n },\n [\n ...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n", "import { createElement, forwardRef } from 'react';\nimport { toLucideIconData, toPascalCase } from '@lucide/shared';\nimport { LucideIcon, LucideIconData, LucideIconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Creates a Lucide icon component from icon data.\n *\n * @param icon Icon data object.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(icon: LucideIconData): LucideIcon;\n\n/**\n * Creates a Lucide icon component from the legacy icon arguments.\n *\n * @param iconName Icon name.\n * @param iconNode Icon node.\n * @param aliases Optional icon aliases.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases?: string[],\n): LucideIcon;\n\nfunction createLucideIcon(\n iconDataOrName: LucideIconData | string,\n iconNode: LucideIconNode[] = [],\n aliases: string[] = [],\n): LucideIcon {\n const iconData =\n typeof iconDataOrName === 'string'\n ? toLucideIconData(iconDataOrName, iconNode, aliases)\n : iconDataOrName;\n\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n icon: iconData,\n className,\n ...props,\n }),\n );\n\n if (iconData.name) {\n Component.displayName = toPascalCase(iconData.name);\n }\n\n return Component;\n}\n\nexport default createLucideIcon;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'x',\n size: 24,\n node: [\n ['path', { d: 'M18 6 6 18', key: '1bl5f8' }],\n ['path', { d: 'm6 6 12 12', key: 'd8bk6v' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst X = createLucideIcon(__iconData);\n\nexport default X;\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"quassel\", \"ChatInputToolbar\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"quassel\", \"ChatMessages\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat/useChat\", \"useChat\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat/useAttachmentCapabilities\", \"useAttachmentCapabilities\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/PluginRegistry\", \"ChatStepsProvider\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat-view-settings\", \"ChatViewSwitches\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat-view-settings\", \"useChatViewSettings\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/toolLine\", \"withToolSummaries\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/rpc\", \"rpc\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/api\", \"interruptActorTurn\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/http/contracts\", \"runContracts\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"runViewFrom\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"typebox\", \"Type\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineOperation\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/domain/events\", \"eventTypeMap\");\n", "import { Type, type TSchema } from \"typebox\";\nimport { defineOperation } from \"@ragents/engine/src/rpc/contract\";\nimport { eventTypeMap, type EventType } from \"@ragents/engine/src/domain/events\";\n\nexport const OVERSEER_PLUGIN_ID = \"ragents.overseer\";\nexport const QUICK_ANSWER_MAX_LENGTH = 240;\n\nexport interface QuickAnswerState {\n kind: \"quick-answer\";\n question: string;\n text: string;\n}\n\nexport const overseerPermissions = [\n { id: \"ragents.overseer.read\", description: \"Den globalen Koordinator und seine Modellauswahl ansehen.\" },\n { id: \"ragents.overseer.write\", description: \"Dem globalen Koordinator Auftr\u00E4ge geben und sein Gespr\u00E4ch zur\u00FCcksetzen.\" },\n] as const;\n\nexport interface OverseerModelSelection {\n provider: string;\n model: string;\n thinking: string;\n}\n\nexport interface OverseerSettings extends OverseerModelSelection {\n models: Array<{ id: string; provider: string; label: string; thinking: string[] }>;\n}\n\nconst object = <P extends Record<string, TSchema>>(properties: P) => Type.Object(properties, { additionalProperties: false });\nconst text = () => Type.String({ minLength: 1, pattern: \"\\\\S\" });\nconst empty = object({});\nconst jsonObject = Type.Record(Type.String(), Type.Any());\nconst eventType = Type.Unsafe<EventType>(Type.Union(Object.keys(eventTypeMap).map((name) => Type.Literal(name))));\nconst run = Type.String({ minLength: 1, maxLength: 512, description: \"Run-ID, eindeutiger Titel oder stabile Referenz wie Run 1.\" });\nconst identityFields = { runId: Type.String(), title: Type.String(), reference: Type.String() };\nconst runSummary = object({ ...identityFields, createdAt: Type.Optional(Type.Number()), updatedAt: Type.Number(), running: Type.Optional(Type.Boolean()), metadata: Type.Optional(jsonObject) });\nconst accepted = object({ ...identityFields, accepted: Type.Literal(true) });\nconst commonStart = { title: text(), options: Type.Optional(jsonObject) };\nconst createInput = Type.Union([\n object({ ...commonStart, message: text() }),\n object({ ...commonStart, script: text(), input: Type.Optional(Type.Any()) }),\n object({ ...commonStart, packageDirectory: Type.String({ minLength: 1, description: \"Absoluter Pfad eines RUN.md/setup.ts/tests.json-Pakets auf dem Server. Ein lokaler Shellclient setzt seinen tats\u00E4chlich vorhandenen Paketpfad ein; dies ist kein Upload.\" }), input: Type.Optional(Type.Any()) }),\n]);\nconst domainObject = (name: string, source = \"packages/ragents/src/domain/model.ts\") => Type.Object({}, {\n additionalProperties: true, \"x-typescript-type\": name, \"x-source\": source,\n description: `Ungek\u00FCrzter Dom\u00E4nenwert ${name}; verschachtelte Felder sind hier bewusst ein offenes JSON-Schema.`,\n});\nconst eventSchema = object({\n eventId: Type.String(), runId: Type.String(), sequence: Type.Integer({ minimum: 1 }), schemaVersion: Type.Literal(3),\n occurredAt: Type.String(), actorId: Type.String(), commandId: Type.String(),\n correlationId: Type.Union([Type.String(), Type.Null()]), causationId: Type.Union([Type.String(), Type.Null()]),\n type: eventType, payload: domainObject(\"EventPayloads[EventType]\", \"packages/ragents/src/domain/events.ts\"),\n});\nconst viewSchema = object({\n id: Type.String(), revision: Type.Integer(), title: Type.String(), ownerId: Type.String(),\n primaryActorId: Type.Union([Type.String(), Type.Null()]), createdAt: Type.String(),\n forkedFrom: Type.Union([object({ runId: Type.String(), sequence: Type.Integer() }), Type.Null()]),\n actors: Type.Array(domainObject(\"Actor\")), inputs: Type.Array(domainObject(\"ActorInput\")), turns: Type.Array(domainObject(\"Turn\")),\n subscriptions: Type.Array(domainObject(\"EventSubscription\")), pluginStates: Type.Array(domainObject(\"PluginState\")),\n actions: Type.Array(domainObject(\"Action\")), artifacts: Type.Array(domainObject(\"Artifact\")),\n});\nconst modelSelection = object({ provider: text(), model: text(), thinking: text() });\nconst settingsResult = object({\n provider: Type.String(), model: Type.String(), thinking: Type.String(),\n models: Type.Array(object({ id: Type.String(), provider: Type.String(), label: Type.String(), thinking: Type.Array(Type.String()) })),\n});\n\n/** Die Verwaltung der Runs, die Modellauswahl und der Gespr\u00E4chsreset des globalen Koordinators. */\nexport const overseerContracts = {\n listRuns: defineOperation({\n id: \"ragents.overseer.listRuns\",\n description: \"Die Runs, die der Aufrufer sieht, mit stabilen Referenzen auflisten; die globalen Koordinatoren geh\u00F6ren nicht zu dieser Liste.\",\n rights: [\"runs.read\"],\n input: empty,\n result: Type.Array(runSummary),\n }),\n createRun: defineOperation({\n id: \"ragents.overseer.createRun\",\n description: \"Einen Run mit serverseitiger ID und Titel anlegen. Genau eine Startform: message, installiertes script (Kennung oder eindeutiger Titel), oder packageDirectory (vorhandenes lokales Run-Script-Paket). input ist nur bei script/packageDirectory erlaubt. options w\u00E4hlt Startoptionen wie ragents.startOptions.select, jede nur mit ihren eigenen Rechten. Das Ergebnis wartet auf Vorbereitung, Check, Test und Installation; accepted best\u00E4tigt noch kein fertiges Modellergebnis.\",\n rights: [\"runs.read\", \"runs.write\", \"runs.create\"],\n input: createInput,\n result: accepted,\n }),\n readRun: defineOperation({\n id: \"ragents.overseer.readRun\",\n description: \"Die aktuelle ungek\u00FCrzte RunView lesen; verschachtelte Dom\u00E4nenwerte sind als offene JSON-Objekte dokumentiert.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: object({ run }),\n result: viewSchema,\n }),\n readEvents: defineOperation({\n id: \"ragents.overseer.readEvents\",\n description: \"Das vollst\u00E4ndige Journal seitenweise in Sequenzreihenfolge lesen. Solange hasMore wahr ist, nextAfter als after der n\u00E4chsten Anfrage verwenden. type filtert einen exakten Ereignistyp.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: object({\n run,\n after: Type.Optional(Type.Integer({ minimum: 0, default: 0 })),\n limit: Type.Optional(Type.Integer({ minimum: 1, maximum: 200, default: 50 })),\n type: Type.Optional(eventType),\n }),\n result: object({ ...identityFields, events: Type.Array(eventSchema), nextAfter: Type.Integer({ minimum: 0 }), hasMore: Type.Boolean() }),\n }),\n sendMessage: defineOperation({\n id: \"ragents.overseer.sendMessage\",\n description: \"Eine Chatnachricht an den prim\u00E4ren LLM-Actor einreihen; TypeScript als Primary wird mit actor-chat-unsupported abgewiesen. Das Ergebnis best\u00E4tigt nur das Einreihen, weder Verarbeitung noch Abschluss. Ein laufender Turn wird dadurch nicht ersetzt.\",\n rights: [\"runs.read\", \"runs.write\"],\n input: object({ run, message: text() }),\n result: accepted,\n }),\n stopRun: defineOperation({\n id: \"ragents.overseer.stopRun\",\n description: \"Den Run \u00FCber seine normale Stoppgrenze stoppen und die Bereinigung abwarten; das Gespr\u00E4ch bleibt erhalten.\",\n rights: [\"runs.read\", \"runs.write\"],\n input: object({ run }),\n result: object({ ...identityFields, stopped: Type.Literal(true) }),\n }),\n readCatalog: defineOperation({\n id: \"ragents.overseer.readCatalog\",\n description: \"Installierte Vorlagen und Startoptionen mit Eingabeschemata, Standardwerten und W\u00E4hlbarkeit lesen. createRun startet Nachrichten, installierte Scripts oder lokale Pakete via packageDirectory. Skills liefern bearbeitbare Auftr\u00E4ge f\u00FCr message; dabei den Skillnamen als Arbeitsanleitung nennen.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: empty,\n result: object({\n entries: Type.Array(Type.Object({ id: Type.String(), title: Type.String(), description: Type.String(), action: Type.Union([Type.Literal(\"skill\"), Type.Literal(\"script\")]) }, { additionalProperties: true, \"x-typescript-type\": \"PublicStartEntry\" })),\n options: Type.Array(object({ id: Type.String(), schema: jsonObject, value: Type.Any(), selectable: Type.Boolean(), presentation: Type.Any() })),\n }),\n }),\n readReference: defineOperation({\n id: \"ragents.overseer.readReference\",\n description: \"Lesbare Referenz aller registrierten Methoden und Kan\u00E4le direkt aus ihren Vertr\u00E4gen lesen.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: empty,\n result: Type.String(),\n }),\n readOpenRpc: defineOperation({\n id: \"ragents.overseer.readOpenRpc\",\n description: \"OpenRPC 1.3 direkt aus denselben Vertr\u00E4gen lesen.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: empty,\n result: jsonObject,\n }),\n settings: {\n read: defineOperation({\n id: \"ragents.overseer.settings.read\",\n description: \"Die Modellauswahl des globalen Koordinators mit dem verf\u00FCgbaren Modellkatalog lesen.\",\n rights: [\"ragents.overseer.read\"],\n input: empty,\n result: settingsResult,\n }),\n save: defineOperation({\n id: \"ragents.overseer.settings.save\",\n description: \"Die Modellauswahl des globalen Koordinators setzen; sie gilt ab der n\u00E4chsten Antwort.\",\n rights: [\"ragents.overseer.read\", \"ragents.overseer.write\", \"settings.write\"],\n input: modelSelection,\n result: settingsResult,\n }),\n },\n coordinator: defineOperation({\n id: \"ragents.overseer.coordinator\",\n description: \"Die Run-ID des eigenen globalen Koordinators lesen: je angemeldetem Benutzer einer, ohne Anmeldung genau einer.\",\n rights: [\"ragents.overseer.read\"],\n input: empty,\n result: object({ runId: Type.String() }),\n }),\n reset: defineOperation({\n id: \"ragents.overseer.reset\",\n description: \"Das Gespr\u00E4ch des eigenen globalen Koordinators samt Modellkontext zur\u00FCcksetzen; die Modellauswahl, die Koordinatoren anderer Benutzer und alle Runs bleiben erhalten.\",\n rights: [\"ragents.overseer.read\", \"ragents.overseer.write\"],\n input: object({ confirm: Type.Literal(true, { description: \"Der Gespr\u00E4chsreset muss ausdr\u00FCcklich best\u00E4tigt werden.\" }) }),\n result: Type.Null(),\n }),\n} as const;\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/lib/labels\", \"thinkingLabel\");\n", "import { rpc } from \"@ragents/web/rpc\";\nimport { overseerContracts, type OverseerModelSelection, type OverseerSettings } from \"../contract\";\n\ntype SettingsState =\n | { status: \"loading\"; settings?: undefined; error?: undefined }\n | { status: \"failed\"; settings?: undefined; error: string }\n | { status: \"ready\" | \"saving\"; settings: OverseerSettings; error?: string };\n\nexport interface ModelSettingsApi {\n read: () => Promise<OverseerSettings>;\n save: (selection: OverseerModelSelection) => Promise<OverseerSettings>;\n}\n\nconst rpcApi: ModelSettingsApi = {\n read: () => rpc.call(overseerContracts.settings.read, {}),\n save: (selection) => rpc.call(overseerContracts.settings.save, selection),\n};\n\nexport function createModelSettingsStore(api: ModelSettingsApi = rpcApi) {\n let state: SettingsState = { status: \"loading\" };\n let revision = 0;\n let loading: Promise<void> | undefined;\n const listeners = new Set<() => void>();\n const publish = (next: SettingsState) => {\n state = next;\n for (const listener of listeners) listener();\n };\n const failure = (cause: unknown) => {\n const error = cause instanceof Error ? cause.message : String(cause);\n publish(state.settings ? { status: \"ready\", settings: state.settings, error } : { status: \"failed\", error });\n };\n const load = (): Promise<void> => {\n if (loading) return loading;\n if (state.status === \"saving\") return Promise.resolve();\n const started = revision;\n if (!state.settings) publish({ status: \"loading\" });\n loading = api.read().then((settings) => {\n if (revision === started) publish({ status: \"ready\", settings });\n }).catch((cause: unknown) => {\n if (revision === started) failure(cause);\n }).finally(() => { loading = undefined; });\n return loading;\n };\n const save = async (selection: OverseerModelSelection): Promise<void> => {\n if (!state.settings || state.status === \"saving\") throw new Error(\"Warte, bis die Einstellungen bereit sind\");\n revision += 1;\n publish({ status: \"saving\", settings: state.settings });\n try {\n publish({ status: \"ready\", settings: await api.save(selection) });\n } catch (cause) {\n failure(cause);\n throw cause;\n }\n };\n return { read: () => state, load, save, subscribe: (listener: () => void) => {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n } };\n}\n\nexport const modelSettingsStore = createModelSettingsStore();\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"Fragment\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsx\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsxs\");\n", "import { useAccess } from \"@ragents/web/AccessContext\";\nimport { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@ragents/web/ui\";\nimport { useEffect, useSyncExternalStore, type ReactNode } from \"react\";\nimport { thinkingLabel } from \"@ragents/web/lib/labels\";\nimport { modelSettingsStore } from \"./model-settings\";\nimport type { OverseerModelSelection } from \"../contract\";\n\nexport function useModelSettings(active = true) {\n const state = useSyncExternalStore(modelSettingsStore.subscribe, modelSettingsStore.read);\n useEffect(() => { if (active) void modelSettingsStore.load(); }, [active]);\n return state;\n}\n\nconst selectionKey = (provider: string, model: string) => JSON.stringify([provider, model]);\n\nconst noteClass = \"mt-2 text-[0.73rem] text-muted-foreground\";\nconst errorClass = \"mt-2 flex flex-wrap items-center gap-2 text-[0.8rem] text-destructive\";\nconst triggerClass = \"min-w-0 max-w-[min(320px,100%)]\";\n\nexport function ModelSettings({ active = true, compact = false, disabled = false, actions }: { active?: boolean; compact?: boolean; disabled?: boolean; actions?: ReactNode }) {\n const access = useAccess();\n const readable = access.can(\"ragents.overseer.read\");\n const writable = access.can(\"ragents.overseer.write\") && access.can(\"settings.write\");\n const state = useModelSettings(active && readable);\n const settings = state.settings;\n const model = settings?.models.find((entry) => entry.id === settings.model && entry.provider === settings.provider);\n const save = (selection: OverseerModelSelection) => { void modelSettingsStore.save(selection).catch(() => {}); };\n const modelOptions = settings?.models.map((entry) => ({ value: selectionKey(entry.provider, entry.id), label: entry.label })) ?? [];\n const thinkingOptions = model?.thinking.map((level) => ({ value: level, label: thinkingLabel(level) })) ?? [];\n if (!readable) return null;\n return (\n <section aria-label=\"Modell des globalen Koordinators\" className={compact ? \"min-w-0 flex-1\" : \"min-w-0\"}>\n <div className={compact ? \"flex flex-nowrap items-center gap-2 max-md:gap-1\" : \"flex flex-wrap items-center gap-2.5\"}>\n {settings && model ? <>\n <Select\n disabled={!writable || disabled || state.status === \"saving\"}\n items={modelOptions}\n value={selectionKey(settings.provider, settings.model)}\n onValueChange={(key) => {\n const next = settings.models.find((entry) => selectionKey(entry.provider, entry.id) === key);\n if (!next) throw new Error(\"Das ausgew\u00E4hlte Modell ist nicht mehr verf\u00FCgbar\");\n const thinking = next.thinking.includes(settings.thinking) ? settings.thinking : next.thinking[0];\n if (!thinking) throw new Error(\"F\u00FCr das Modell ist keine Reasoning-Stufe konfiguriert\");\n save({ provider: next.provider, model: next.id, thinking });\n }}\n >\n <SelectTrigger aria-label=\"Modell\" className={`${triggerClass} ${compact ? \"flex-1\" : \"flex-[0_1_auto]\"}`} size={compact ? \"sm\" : \"default\"}><SelectValue /></SelectTrigger>\n <SelectContent>{modelOptions.map((option) => <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>)}</SelectContent>\n </Select>\n <Select\n disabled={!writable || disabled || state.status === \"saving\" || model.thinking.length < 2}\n items={thinkingOptions}\n value={settings.thinking}\n onValueChange={(thinking) => { if (thinking !== null) save({ provider: settings.provider, model: settings.model, thinking }); }}\n >\n <SelectTrigger aria-label={compact ? \"Reasoning\" : \"Reasoning-Tiefe\"} className={`${triggerClass} flex-none`} size={compact ? \"sm\" : \"default\"}><SelectValue /></SelectTrigger>\n <SelectContent>{thinkingOptions.map((option) => <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>)}</SelectContent>\n </Select>\n </> : state.status === \"loading\" ? <p className={`${noteClass} min-w-0 flex-[0_1_auto]`} role=\"status\">Modelle werden geladen ...</p>\n : !state.error && <p className={`${errorClass} min-w-0 flex-[0_1_auto]`} role=\"alert\">Das gespeicherte Modell fehlt im Modellkatalog.</p>}\n {actions && <div className=\"ml-auto flex-none\">{actions}</div>}\n </div>\n {settings && model && (!compact || state.status === \"saving\") && <p className={noteClass} role=\"status\">{state.status === \"saving\" ? \"Wird gespeichert ...\" : \"Gilt ab der n\u00E4chsten Antwort. Der Gespr\u00E4chsverlauf bleibt erhalten.\"}</p>}\n {state.error && <div className={errorClass} role=\"alert\">\n <span>{state.error}</span>\n <Button onClick={() => { void modelSettingsStore.load(); }} variant=\"outline\">Erneut laden</Button>\n </div>}\n </section>\n );\n}\n", "import type { ChatDisplayPolicy } from \"@ragents/web/PluginRegistry\";\n\nexport const overseerChatStorageKeyPrefix = \"ragents.overseer.chat-steps\";\n\nexport const overseerChatDisplayPolicy: ChatDisplayPolicy = {\n modes: { coordinator: \"grouped\", agents: \"grouped\" },\n stepsVisible: true,\n stepsExpandable: true,\n selectable: true,\n};\n", "import type { ChatEvent } from \"quassel/events\";\nimport { OVERSEER_PLUGIN_ID, QUICK_ANSWER_MAX_LENGTH } from \"../contract\";\n\nexport interface QuickAnswerNotice {\n id: string;\n question: string;\n text: string;\n}\n\nconst validText = (value: unknown): value is string => typeof value === \"string\" && !!value.trim()\n && value.length <= QUICK_ANSWER_MAX_LENGTH && !/[\\r\\n]/.test(value);\n\nexport function createQuickAnswers() {\n let conversationId: string | null | undefined;\n let initialized = false;\n let replaying = true;\n let seenSequence = 0;\n let replaySequence = 0;\n let pending: QuickAnswerNotice | undefined;\n return {\n event(event: ChatEvent): QuickAnswerNotice | undefined {\n if (event.kind === \"reset\") {\n if (event.reason === \"conversation-reset\" || (conversationId != null && conversationId !== event.conversationId)) {\n seenSequence = 0;\n initialized = true;\n }\n conversationId = event.conversationId;\n replaying = true;\n replaySequence = seenSequence;\n pending = undefined;\n }\n if (event.kind === \"replay-end\") {\n conversationId = event.conversationId;\n replaying = false;\n seenSequence = replaySequence;\n const notice = initialized ? pending : undefined;\n initialized = true;\n pending = undefined;\n return notice;\n }\n if (event.kind !== \"plugin\" || event.pluginId !== OVERSEER_PLUGIN_ID || event.type !== \"state-replaced\") return;\n const payload = event.payload;\n if (!payload || typeof payload !== \"object\" || !(\"state\" in payload)) return;\n if (!(\"scope\" in payload) || !payload.scope || typeof payload.scope !== \"object\"\n || !(\"kind\" in payload.scope) || payload.scope.kind !== \"run\") return;\n const state = payload.state;\n if (!state || typeof state !== \"object\" || !(\"kind\" in state) || state.kind !== \"quick-answer\") return;\n if (!event.journal || !event.journal.eventId?.trim() || !event.journal.conversationId?.trim()\n || !Number.isSafeInteger(event.journal.sequence) || event.journal.sequence <= 0) {\n throw new Error(\"Die Journalposition der Kurzantwort ist ung\u00FCltig.\");\n }\n if (conversationId != null && conversationId !== event.journal.conversationId) return;\n conversationId = event.journal.conversationId;\n if (event.journal.sequence <= (replaying ? replaySequence : seenSequence)) return;\n if (replaying && !initialized) { replaySequence = event.journal.sequence; return; }\n const question = \"question\" in state ? state.question : undefined;\n const text = \"text\" in state ? state.text : undefined;\n if (!validText(question) || !validText(text)) throw new Error(\"Die Kurzfrage oder Kurzantwort ist ung\u00FCltig.\");\n const notice = { id: event.journal.eventId, question, text };\n if (replaying) { replaySequence = event.journal.sequence; pending = notice; }\n else { seenSequence = event.journal.sequence; return notice; }\n },\n };\n}\n", "import { useAccess } from \"@ragents/web/AccessContext\";\nimport { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Popover, PopoverContent } from \"@ragents/web/ui\";\nimport { RunModalContext } from \"@ragents/web/ui/dialog\";\nimport { XIcon } from \"lucide-react\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { ChatMessages, ChatInputToolbar, type ChatInputHandle, type ChatEvent } from \"quassel\";\nimport { useChat } from \"@ragents/web/chat/useChat\";\nimport { useAttachmentCapabilities } from \"@ragents/web/chat/useAttachmentCapabilities\";\nimport { ChatStepsProvider, type OverviewPanelContext, type WebPlugin } from \"@ragents/web/PluginRegistry\";\nimport { ChatViewSwitches, useChatViewSettings } from \"@ragents/web/chat-view-settings\";\nimport { withToolSummaries } from \"@ragents/web/toolLine\";\nimport { rpc } from \"@ragents/web/rpc\";\nimport { interruptActorTurn } from \"@ragents/web/api\";\nimport { runContracts } from \"@ragents/engine/src/http/contracts\";\nimport { runViewFrom } from \"@ragents/web/run-view\";\nimport { OVERSEER_PLUGIN_ID, overseerContracts } from \"../contract\";\nimport { ModelSettings, useModelSettings } from \"./ModelSettings\";\nimport { overseerChatDisplayPolicy, overseerChatStorageKeyPrefix } from \"./chat-display\";\nimport { createQuickAnswers, type QuickAnswerNotice } from \"./quick-answers\";\n\nconst toolbarClass = \"flex h-header max-w-[720px] min-w-[190px] flex-[0_1_570px] items-center gap-1 border-r border-border bg-[color-mix(in_srgb,var(--primary)_4%,var(--card))] px-2 py-1 data-open:bg-accent max-md:min-w-[130px] max-md:flex-[0_1_210px] max-md:px-1 max-md:data-open:grow\";\nconst noteClass = \"mx-4 my-2 flex-none text-[0.8rem] text-muted-foreground\";\n\n/** Unterbricht nur den laufenden Turn des Koordinators; der Run und seine \u00FCbrigen Actors laufen weiter. */\nconst interruptCoordinator = async (runId: string) => {\n const coordinator = runViewFrom(await rpc.call(runContracts.view, { runId }))?.primaryActorId;\n if (!coordinator) throw new Error(\"Der globale Koordinator ist nicht verf\u00FCgbar\");\n await interruptActorTurn(runId, coordinator);\n};\nconst errorClass = \"mx-4 my-2 flex-none text-[0.8rem] text-destructive\";\n\n/** Jeder Benutzer hat seinen eigenen Koordinator; seine Kennung kennt nur der Server. */\nfunction OverseerToolbar(context: OverviewPanelContext) {\n const user = useAccess().user?.id;\n const [coordinator, setCoordinator] = useState<{ runId?: string; error?: string }>({});\n useEffect(() => {\n let current = true;\n setCoordinator({});\n rpc.call(overseerContracts.coordinator, {}).then(\n ({ runId }) => { if (current) setCoordinator({ runId }); },\n (cause: unknown) => { if (current) setCoordinator({ error: cause instanceof Error ? cause.message : String(cause) }); },\n );\n return () => { current = false; };\n }, [user]);\n if (!coordinator.runId) {\n return <div className={toolbarClass} data-slot=\"overseer-toolbar\" role=\"status\">\n {coordinator.error && <span className=\"text-[0.7rem] font-bold text-destructive\" title={coordinator.error} aria-label={coordinator.error}>!</span>}\n </div>;\n }\n return <ChatStepsProvider policy={overseerChatDisplayPolicy} storageKeyPrefix={overseerChatStorageKeyPrefix}>\n <OverseerConversation key={coordinator.runId} {...context} runId={coordinator.runId} />\n </ChatStepsProvider>;\n}\n\nfunction OverseerConversation({ open, onOpen, onClose, onBusy, userLocation, runId }: OverviewPanelContext & { runId: string }) {\n const writable = useAccess().can(\"ragents.overseer.write\");\n const [activated, setActivated] = useState(false);\n const [confirmReset, setConfirmReset] = useState(false);\n const [resetting, setResetting] = useState(false);\n const resetPending = useRef(false);\n const resetObserved = useRef(false);\n const composer = useRef<ChatInputHandle>(null);\n const anchor = useRef<HTMLDivElement>(null);\n const dropdown = useRef<HTMLElement>(null);\n const suppressFocus = useRef(false);\n const [detailsContainer, setDetailsContainer] = useState<HTMLDivElement | null>(null);\n const [scroller, setScroller] = useState<HTMLDivElement | null>(null);\n const conversationId = useRef<string | null | undefined>(undefined);\n const [dialogContainer, setDialogContainer] = useState<HTMLElement | null>(null);\n const cancelReset = useRef<HTMLButtonElement>(null);\n const setDropdown = useCallback((element: HTMLElement | null) => { dropdown.current = element; setDialogContainer(element); }, []);\n const [quickAnswers] = useState(createQuickAnswers);\n const [quickAnswer, setQuickAnswer] = useState<QuickAnswerNotice>();\n const panelOpen = useRef(open);\n panelOpen.current = open;\n const [error, setError] = useState<string>();\n const [composerError, setComposerError] = useState<string>();\n const clearConversation = useCallback(() => {\n composer.current?.reset();\n setConfirmReset(false);\n setError(undefined);\n setQuickAnswer(undefined);\n }, []);\n const onEvent = useCallback((event: ChatEvent) => {\n const notice = quickAnswers.event(event);\n if (event.kind === \"reset\") {\n if (event.reason === \"conversation-reset\" || (conversationId.current != null && conversationId.current !== event.conversationId)) {\n if (resetPending.current) resetObserved.current = true;\n clearConversation();\n }\n conversationId.current = event.conversationId;\n }\n if (event.kind === \"replay-end\") conversationId.current = event.conversationId;\n if (notice && !panelOpen.current) setQuickAnswer(notice);\n }, [clearConversation, quickAnswers]);\n const chat = useChat(runId, onEvent, activated);\n const chatView = useChatViewSettings(runId, \"primary\", \"coordinator\");\n const modelState = useModelSettings(open);\n const attachments = useAttachmentCapabilities(runId, \"primary\", JSON.stringify(modelState.settings && [modelState.settings.provider, modelState.settings.model]));\n const messages = useMemo(() => withToolSummaries(chat.messages), [chat.messages]);\n const requestOpen = () => { suppressFocus.current = false; setQuickAnswer(undefined); onOpen(); };\n useEffect(() => { if (open) { setActivated(true); setQuickAnswer(undefined); } }, [open]);\n useEffect(() => onBusy(chat.running), [chat.running, onBusy]);\n const belowHeader = useCallback(() => {\n const element = anchor.current;\n if (!element) return null;\n const boundary = element.closest(\"header\") ?? element;\n return { contextElement: element, getBoundingClientRect: () => {\n const bounds = element.getBoundingClientRect();\n return new DOMRect(bounds.left, boundary.getBoundingClientRect().bottom, bounds.width, 0);\n } };\n }, []);\n const dismiss = (reason: string, event: Event) => {\n if (confirmReset) return;\n if (reason === \"outside-press\") {\n if (event.target instanceof Node && anchor.current?.contains(event.target)) return;\n onClose();\n return;\n }\n if (reason !== \"escape-key\") return;\n suppressFocus.current = !(document.activeElement instanceof HTMLTextAreaElement && anchor.current?.contains(document.activeElement));\n onClose();\n composer.current?.focus();\n };\n\n const perform = (work: () => Promise<void>) => {\n setError(undefined);\n void work().catch((cause: unknown) => setError(cause instanceof Error ? cause.message : String(cause)));\n };\n const reset = async () => {\n if (resetPending.current) return;\n resetPending.current = true;\n resetObserved.current = false;\n setResetting(true);\n setError(undefined);\n try {\n await rpc.call(overseerContracts.reset, { confirm: true });\n clearConversation();\n } catch (cause) {\n if (!resetObserved.current) setError(cause instanceof Error ? cause.message : String(cause));\n } finally {\n resetPending.current = false;\n setResetting(false);\n }\n };\n const connectionNote = activated && !chat.connected ? \"Keine Verbindung. Dein Entwurf bleibt erhalten; Senden ist gesperrt.\" : undefined;\n const problem = error ?? composerError ?? modelState.error ?? connectionNote;\n return <div className={toolbarClass} data-open={open} data-slot=\"overseer-toolbar\" ref={anchor}\n onFocus={(event) => {\n if (!(event.target instanceof HTMLTextAreaElement)) return;\n if (suppressFocus.current) suppressFocus.current = false;\n else onOpen();\n }}\n onKeyDown={(event) => {\n if (event.defaultPrevented) return;\n if (!open && event.target instanceof HTMLTextAreaElement && (event.key.length === 1 || event.key === \"Enter\")) requestOpen();\n }}>\n <div className=\"min-w-0 flex-1\" onClick={(event) => { if (event.target instanceof HTMLTextAreaElement) requestOpen(); }}>\n <ChatInputToolbar {...attachments} detailsContainer={detailsContainer} layout=\"toolbar\" handleRef={composer}\n inputAriaControls=\"overseer-dropdown\"\n disabled={!writable || resetting || confirmReset} sendDisabled={!chat.connected || modelState.status === \"saving\" || resetting}\n maxRows={2} rows={1} onErrorChange={setComposerError} onSend={(text, attachments) => chat.send(text, attachments, userLocation)}\n onStop={writable && chat.running ? () => { if (!resetPending.current) perform(() => interruptCoordinator(runId)); } : undefined}\n running={chat.running}\n texts={{ placeholder: \"Globaler Koordinator\", steeringPlaceholder: \"Globaler Koordinator\" }}\n toolbarRight={<ModelSettings active={open} compact disabled={resetting} actions={\n <Button aria-label=\"Gespr\u00E4ch zur\u00FCcksetzen\" aria-busy={resetting} disabled={!writable || resetting || !chat.connected} onClick={() => setConfirmReset(true)} size=\"sm\" variant=\"outline\">\n {resetting ? \"Wird zur\u00FCckgesetzt ...\" : \"Zur\u00FCcksetzen\"}\n </Button>\n } />}\n toolbarLeft={<ChatViewSwitches className=\"max-md:[&>span]:hidden\" collapsible={false} settings={chatView} />}\n />\n </div>\n <span className=\"flex min-w-0 flex-none items-center justify-end gap-1.5 empty:hidden\" role=\"status\" aria-live=\"polite\">\n {chat.running && <span className=\"sr-only\">Bearbeitet</span>}\n {problem && <span className=\"text-[0.7rem] font-bold text-destructive\" title={problem} aria-label={problem}>!</span>}\n </span>\n <Popover modal={false} open={quickAnswer !== undefined}>\n <PopoverContent align=\"start\" anchor={belowHeader} aria-atomic=\"true\" aria-live=\"polite\" className=\"flex max-w-[calc(100vw-16px)] flex-row items-start gap-1 p-1.5 text-[0.76rem]\" collisionPadding={8}\n finalFocus={false} initialFocus={false} role=\"status\" side=\"bottom\"\n style={{ width: \"min(max(calc(var(--anchor-width) * 2), 480px), var(--available-width))\" }}>\n {quickAnswer && <>\n <Button className=\"h-auto min-w-0 flex-1 justify-start rounded-lg px-2.5 py-2 text-left text-[0.76rem] leading-[1.45] font-normal whitespace-normal [overflow-wrap:anywhere]\" variant=\"ghost\" aria-label={`Verlauf \u00F6ffnen: ${quickAnswer.question} ${quickAnswer.text}`}\n onClick={() => {\n requestOpen();\n if (writable) composer.current?.focus();\n else requestAnimationFrame(() => scroller?.focus());\n }}><span className=\"grid min-w-0 gap-1\"><span className=\"text-muted-foreground\">{quickAnswer.question}</span><strong className=\"font-semibold\">{quickAnswer.text}</strong></span></Button>\n <Button aria-label=\"Kurzantwort schlie\u00DFen\" className=\"mt-1 flex-none rounded-full\" onClick={() => setQuickAnswer(undefined)} size=\"icon-sm\" title=\"Kurzantwort schlie\u00DFen\" variant=\"ghost\"><XIcon /></Button>\n </>}\n </PopoverContent>\n </Popover>\n <Popover modal={false} open={open} onOpenChange={(next, details) => { if (!next) dismiss(details.reason, details.event); }}>\n <PopoverContent align=\"start\" anchor={belowHeader} aria-label=\"Globaler Koordinator\" className=\"flex min-h-0 flex-col gap-0 overflow-hidden rounded-t-none rounded-b-panel border-t-2 border-t-primary p-0\" collisionPadding={8}\n finalFocus={false} id=\"overseer-dropdown\" initialFocus={false} keepMounted ref={setDropdown} role=\"region\" side=\"bottom\"\n style={{ width: \"min(760px, var(--available-width))\", height: \"min(650px, var(--available-height))\" }}>\n <div className=\"flex-none border-b border-border-soft\" data-tone=\"overseer-details\" ref={setDetailsContainer} />\n {confirmReset && dialogContainer && <RunModalContext.Provider value={dialogContainer}>\n <Dialog open onOpenChange={(next) => { if (!next && !resetting) setConfirmReset(false); }} modal=\"trap-focus\" disablePointerDismissal>\n <DialogContent initialFocus={cancelReset} onBackdropClick={() => { if (!resetting) setConfirmReset(false); }} scope=\"run\" showCloseButton={false} size=\"small\">\n <DialogHeader>\n <DialogTitle>Gespr\u00E4ch zur\u00FCcksetzen?</DialogTitle>\n <DialogDescription>Verlauf und Modellkontext werden gel\u00F6scht. Laufende Antworten werden gestoppt.</DialogDescription>\n </DialogHeader>\n <p>Deine Runs und die Modellwahl bleiben erhalten.</p>\n {error && <p className=\"text-[0.8rem] text-destructive\" role=\"alert\">{error}</p>}\n <DialogFooter>\n <Button ref={cancelReset} disabled={resetting} onClick={() => setConfirmReset(false)} variant=\"outline\">Abbrechen</Button>\n <Button disabled={resetting} onClick={() => { void reset(); }} variant=\"destructive\">\n {resetting ? \"Wird zur\u00FCckgesetzt ...\" : \"Gespr\u00E4ch zur\u00FCcksetzen\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </RunModalContext.Provider>}\n {!writable && <p className={noteClass}>Du hast Lesezugriff auf dieses Gespr\u00E4ch.</p>}\n {connectionNote && <p className={noteClass} role=\"status\">{connectionNote}</p>}\n {error && <p className={errorClass} role=\"alert\">{error}</p>}\n <ChatMessages announce={false} className=\"min-h-16! flex-1\" scrollerRef={setScroller}\n detailMode={chatView.detailMode}\n emptyState={<div className=\"m-auto max-w-[480px] p-8 text-[0.9rem] leading-[1.6] text-muted-foreground max-md:p-5\"><strong className=\"text-foreground\">Ein Chat f\u00FCr die gesamte Werkstatt</strong><p>Schreibe deinen Auftrag oben in die Titelleiste. Hier erscheinen Antworten zu deinen Runs und laufenden Arbeiten.</p></div>}\n messages={messages} running={chat.running} showTimestamps={chatView.showTimestamps} stepsExpandable={chatView.stepsExpandable}\n />\n </PopoverContent>\n </Popover>\n </div>;\n}\n\nexport const webPlugin: WebPlugin = {\n id: OVERSEER_PLUGIN_ID,\n settings: [{ category: \"models\", order: 10, readRight: \"ragents.overseer.read\", id: `${OVERSEER_PLUGIN_ID}.model`, label: \"Globaler Koordinator\", Settings: ModelSettings }],\n overviewPanels: [{ id: `${OVERSEER_PLUGIN_ID}.chat`, placement: \"toolbar\", order: 100, readRight: \"ragents.overseer.read\", Panel: OverseerToolbar }],\n};\n"],
|
|
5
|
-
"mappings": "AAAO,IAAMA,EAAO,CAACC,EAAWC,IAAS,CACvC,IAAMC,EAAS,WAAW,uBAA0BF,CAAS,EAC7D,GAAIE,IAAW,OAAW,MAAM,IAAI,MAAM,mBAAmBF,CAAS,eAAe,EACrF,GAAI,EAAEC,KAAQC,GAAS,MAAM,IAAI,MAAM,mBAAmBD,CAAI,QAAQD,CAAS,+DAA+D,EAC9I,OAAOE,EAAOD,CAAI,CACpB,ECJA,IAAOE,EAAQC,EAAK,6BAA8B,WAAW,ECA7D,IAAOC,EAAQC,EAAK,kBAAmB,QAAQ,ECA/C,IAAOC,GAAQC,EAAK,kBAAmB,QAAQ,ECA/C,IAAOC,GAAQC,EAAK,kBAAmB,eAAe,ECAtD,IAAOC,GAAQC,EAAK,kBAAmB,mBAAmB,ECA1D,IAAOC,GAAQC,EAAK,kBAAmB,cAAc,ECArD,IAAOC,GAAQC,EAAK,kBAAmB,cAAc,ECArD,IAAOC,GAAQC,EAAK,kBAAmB,aAAa,ECApD,IAAOC,GAAQC,EAAK,kBAAmB,SAAS,ECAhD,IAAOC,GAAQC,EAAK,kBAAmB,gBAAgB,ECAvD,IAAOC,GAAQC,EAAK,kBAA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U,wFAAwF,UAAAtE,EAAC,UAAO,UAAU,kBAAkB,iDAAkC,EAASA,EAAC,KAAE,6HAAiH,GAAI,EAC1T,SAAUwD,GAAU,QAASR,EAAK,QAAS,eAAgBE,EAAS,eAAgB,gBAAiBA,EAAS,gBAChH,GACF,EACA,GACF,CACF,CAEO,IAAMwC,GAAuB,CAClC,GAAIC,EACJ,SAAU,CAAC,CAAE,SAAU,SAAU,MAAO,GAAI,UAAW,wBAAyB,GAAI,GAAGA,CAAkB,SAAU,MAAO,uBAAwB,SAAUlB,EAAc,CAAC,EAC3K,eAAgB,CAAC,CAAE,GAAI,GAAGkB,CAAkB,QAAS,UAAW,UAAW,MAAO,IAAK,UAAW,wBAAyB,MAAOrG,EAAgB,CAAC,CACrJ",
|
|
4
|
+
"sourcesContent": ["export const read = (specifier, name) => {\n const module = globalThis[\"__ragentsHostModules\"]?.[specifier];\n if (module === undefined) throw new Error(`The host does not provide ${specifier}`);\n if (!(name in module)) throw new Error(`The host does not provide ${name} from ${specifier}; the bundle was built against a newer host`);\n return module[name];\n};", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/AccessContext\", \"useAccess\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Button\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Dialog\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogDescription\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogFooter\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogHeader\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"DialogTitle\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Popover\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"PopoverContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Select\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectTrigger\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectValue\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui/dialog\", \"RunModalContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createElement\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"forwardRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useCallback\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useEffect\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useMemo\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useState\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useSyncExternalStore\");\n", "/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string?.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n", "import { toKebabCase } from './toKebabCase';\nimport type { LucideIconData, LucideIconNode } from '../build/types';\n\n/**\n * Converts legacy `(name, iconNode, aliases?)` icon arguments into icon data object format.\n */\nexport function toLucideIconData(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases: string[] = [],\n): LucideIconData {\n if (iconNode == null) {\n throw new Error('[lucide]: iconNode is required when icon name is used');\n }\n\n return {\n name: toKebabCase(iconName),\n size: 24,\n node: iconNode,\n ...(aliases.length > 0 ? { aliases } : {}),\n };\n}\n", "/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) => {\n let out = '';\n let upperNext = false;\n\n for (const ch of string) {\n if (ch === '-' || ch === '_' || ch <= ' ') {\n upperNext = out.length > 0;\n continue;\n }\n\n if (out.length === 0) {\n out += ch.toLowerCase();\n } else {\n out += upperNext ? ch.toUpperCase() : ch;\n }\n\n upperNext = false;\n }\n\n return out as string;\n};\n", "import { CamelToPascal } from '../utility-types';\nimport { toCamelCase } from './toCamelCase';\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n", "/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n", "const defaultAttributes = {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n} as const;\n\nexport default defaultAttributes;\n", "import type { LucideBuildParams, LucideIconData, LucideIconNode, SVGProps } from './types';\nimport defaultAttributes from './defaultAttributes';\nimport { mergeClasses } from '../utils/mergeClasses';\n\nfunction isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Creates a Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconNode(icon: LucideIconData, params: LucideBuildParams = {}): LucideIconNode {\n const attributeNames = params.attributeNames ?? {};\n const getAttributeName = (attributeName: string) =>\n attributeNames[attributeName] ?? attributeName;\n\n const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes['width'];\n const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes['height'];\n const aliasClassNames =\n icon.aliases\n ?.filter((alias: string): alias is string => typeof alias === 'string' && alias.trim() !== '')\n .map((alias: string) => `lucide-${alias}`) ?? [];\n const iconClassNames = [...(icon.name ? [`lucide-${icon.name}`] : []), ...aliasClassNames];\n const classNamesFromClassName = params.className?.split(' ').filter(Boolean) ?? [];\n const className =\n params.includeDefaultClasses === false\n ? mergeClasses(...classNamesFromClassName)\n : mergeClasses('lucide', ...iconClassNames, ...classNamesFromClassName);\n\n const calculatedStrokeWidth = params.absoluteStrokeWidth\n ? (Number(params.strokeWidth ?? defaultAttributes['stroke-width']) *\n Number(icon.size ?? icon.width ?? defaultAttributes['width'])) /\n Number(params.size ?? params.width ?? defaultAttributes['width'])\n : (params.strokeWidth ?? defaultAttributes['stroke-width']);\n\n const attributes = {\n ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {\n attrs[getAttributeName(attrName)] = value;\n return attrs;\n }, {} as SVGProps),\n ...('color' in params &&\n params.color && {\n [getAttributeName('stroke')]: params.color,\n }),\n ...('size' in params &&\n isDefined(params.size) && {\n [getAttributeName('width')]: params.size,\n [getAttributeName('height')]: params.size,\n }),\n ...('width' in params &&\n isDefined(params.width) && {\n [getAttributeName('width')]: params.width,\n }),\n ...('height' in params &&\n isDefined(params.height) && {\n [getAttributeName('height')]: params.height,\n }),\n [getAttributeName('stroke-width')]: calculatedStrokeWidth,\n ...(className && {\n [getAttributeName('class')]: className,\n }),\n [getAttributeName('viewBox')]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,\n ...(params.hasA11yProp === false\n ? {\n [getAttributeName('aria-hidden')]: 'true',\n }\n : {}),\n ...('attributes' in params && params.attributes),\n };\n\n return [\n 'svg',\n attributes,\n icon.node.map((child): LucideIconNode => {\n const [name, attrs, children] = child;\n const nextAttrs = params.nonScalingStroke\n ? { [getAttributeName('vector-effect')]: 'non-scaling-stroke', ...attrs }\n : attrs;\n\n return children ? [name, nextAttrs, children] : [name, nextAttrs];\n }),\n ];\n}\n\nexport default buildLucideIconNode;\n", "import buildLucideIconNode from './buildLucideIconNode';\nimport type { LucideBuildParams, LucideIconData, LucideIconNode } from './types';\n\n/**\n * Creates a React-compatible Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconForReact(\n icon: LucideIconData,\n params: LucideBuildParams = {},\n): LucideIconNode {\n return buildLucideIconNode(icon, {\n ...params,\n attributeNames: {\n ...params.attributeNames,\n class: 'className',\n 'stroke-width': 'strokeWidth',\n 'stroke-linecap': 'strokeLinecap',\n 'stroke-linejoin': 'strokeLinejoin',\n 'vector-effect': 'vectorEffect',\n },\n });\n}\n\nexport default buildLucideIconForReact;\n", "/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: object) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n\n return false;\n};\n", "'use client';\n\nimport { createContext, createElement, type ReactNode, useContext, useMemo } from 'react';\nimport { LucideProps } from './types';\n\ntype LucideConfig = {\n size: number;\n color: string;\n strokeWidth: number;\n /**\n * @deprecated Use `nonScalingStroke` instead.\n */\n absoluteStrokeWidth: boolean;\n nonScalingStroke: boolean;\n className: string;\n};\n\nconst LucideContext = createContext<LucideProps>({});\n\ntype LucideProviderProps = {\n children: ReactNode;\n} & Partial<LucideConfig>;\n\nexport function LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n}: LucideProviderProps) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className],\n );\n\n return createElement(LucideContext.Provider, { value }, children);\n}\n\nexport const useLucideContext = () => useContext(LucideContext);\n", "'use client';\n\nimport { createElement, forwardRef } from 'react';\nimport { buildLucideIconForReact, hasA11yProp, mergeClasses } from '@lucide/shared';\nimport { LucideIconData, LucideIconNode, LucideProps } from './types';\nimport { useLucideContext } from './context';\n\ntype IconComponentProps = LucideProps &\n (\n | {\n iconNode: LucideIconNode[];\n icon?: never;\n }\n | {\n icon: LucideIconData;\n iconNode?: never;\n }\n );\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {boolean} props.nonScalingStroke - Whether to use non scaling strokes\n * @param {string} props.className - The class name of the icon\n * @param {LucideIconNode[]} props.children - The children of the icon\n * @param {LucideIconNode[]} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color,\n size,\n width,\n height,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className = '',\n children,\n iconNode = [],\n icon = {\n node: iconNode,\n aliases: [],\n size: 24,\n },\n ...rest\n },\n ref,\n ) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n nonScalingStroke: contextNonScalingStroke = false,\n color: contextColor = 'currentColor',\n className: contextClass = '',\n } = useLucideContext() ?? {};\n\n const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);\n\n const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {\n color: color ?? contextColor,\n width: width ?? size ?? contextSize,\n height: height ?? size ?? contextSize,\n strokeWidth: strokeWidth ?? contextStrokeWidth,\n absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,\n nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,\n className: mergeClasses(contextClass, className),\n hasA11yProp: hasAccessibleProp,\n attributes: rest,\n });\n\n return createElement(\n name,\n {\n ref,\n ...svgAttributes,\n },\n [\n ...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n", "import { createElement, forwardRef } from 'react';\nimport { toLucideIconData, toPascalCase } from '@lucide/shared';\nimport { LucideIcon, LucideIconData, LucideIconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Creates a Lucide icon component from icon data.\n *\n * @param icon Icon data object.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(icon: LucideIconData): LucideIcon;\n\n/**\n * Creates a Lucide icon component from the legacy icon arguments.\n *\n * @param iconName Icon name.\n * @param iconNode Icon node.\n * @param aliases Optional icon aliases.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases?: string[],\n): LucideIcon;\n\nfunction createLucideIcon(\n iconDataOrName: LucideIconData | string,\n iconNode: LucideIconNode[] = [],\n aliases: string[] = [],\n): LucideIcon {\n const iconData =\n typeof iconDataOrName === 'string'\n ? toLucideIconData(iconDataOrName, iconNode, aliases)\n : iconDataOrName;\n\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n icon: iconData,\n className,\n ...props,\n }),\n );\n\n if (iconData.name) {\n Component.displayName = toPascalCase(iconData.name);\n }\n\n return Component;\n}\n\nexport default createLucideIcon;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'x',\n size: 24,\n node: [\n ['path', { d: 'M18 6 6 18', key: '1bl5f8' }],\n ['path', { d: 'm6 6 12 12', key: 'd8bk6v' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst X = createLucideIcon(__iconData);\n\nexport default X;\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"quassel\", \"ChatInputToolbar\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"quassel\", \"ChatMessages\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat/useChat\", \"useChat\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat/useAttachmentCapabilities\", \"useAttachmentCapabilities\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/PluginRegistry\", \"ChatStepsProvider\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat-view-settings\", \"ChatViewSwitches\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/chat-view-settings\", \"useChatViewSettings\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/toolLine\", \"withToolSummaries\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/rpc\", \"rpc\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/api\", \"interruptActorTurn\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/http/contracts\", \"runContracts\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"runViewFrom\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"typebox\", \"Type\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineOperation\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/domain/events\", \"eventTypeMap\");\n", "import { Type, type TSchema } from \"typebox\";\nimport { defineOperation } from \"@ragents/engine/src/rpc/contract\";\nimport { eventTypeMap, type EventType } from \"@ragents/engine/src/domain/events\";\n\nexport const OVERSEER_PLUGIN_ID = \"ragents.overseer\";\nexport const QUICK_ANSWER_MAX_LENGTH = 240;\n\nexport interface QuickAnswerState {\n kind: \"quick-answer\";\n question: string;\n text: string;\n}\n\nexport const overseerPermissions = [\n { id: \"ragents.overseer.read\", description: \"View the global coordinator and its model selection.\" },\n { id: \"ragents.overseer.write\", description: \"Give tasks to the global coordinator and reset its conversation.\" },\n] as const;\n\nexport interface OverseerModelSelection {\n provider: string;\n model: string;\n thinking: string;\n}\n\nexport interface OverseerSettings extends OverseerModelSelection {\n models: Array<{ id: string; provider: string; label: string; thinking: string[] }>;\n}\n\nconst object = <P extends Record<string, TSchema>>(properties: P) => Type.Object(properties, { additionalProperties: false });\nconst text = () => Type.String({ minLength: 1, pattern: \"\\\\S\" });\nconst empty = object({});\nconst jsonObject = Type.Record(Type.String(), Type.Any());\nconst eventType = Type.Unsafe<EventType>(Type.Union(Object.keys(eventTypeMap).map((name) => Type.Literal(name))));\nconst run = Type.String({ minLength: 1, maxLength: 512, description: \"Run ID, unique title or stable reference such as Run 1.\" });\nconst identityFields = { runId: Type.String(), title: Type.String(), reference: Type.String() };\nconst runSummary = object({ ...identityFields, createdAt: Type.Optional(Type.Number()), updatedAt: Type.Number(), running: Type.Optional(Type.Boolean()), metadata: Type.Optional(jsonObject) });\nconst accepted = object({ ...identityFields, accepted: Type.Literal(true) });\nconst commonStart = { title: text(), options: Type.Optional(jsonObject) };\nconst createInput = Type.Union([\n object({ ...commonStart, message: text() }),\n object({ ...commonStart, script: text(), input: Type.Optional(Type.Any()) }),\n object({ ...commonStart, packageDirectory: Type.String({ minLength: 1, description: \"Absolute path of a RUN.md/setup.ts/tests.json package on the server. A local shell client inserts its actually existing package path; this is not an upload.\" }), input: Type.Optional(Type.Any()) }),\n]);\nconst domainObject = (name: string, source = \"packages/ragents/src/domain/model.ts\") => Type.Object({}, {\n additionalProperties: true, \"x-typescript-type\": name, \"x-source\": source,\n description: `Unabridged domain value ${name}; nested fields are deliberately an open JSON schema here.`,\n});\nconst eventSchema = object({\n eventId: Type.String(), runId: Type.String(), sequence: Type.Integer({ minimum: 1 }), schemaVersion: Type.Literal(3),\n occurredAt: Type.String(), actorId: Type.String(), commandId: Type.String(),\n correlationId: Type.Union([Type.String(), Type.Null()]), causationId: Type.Union([Type.String(), Type.Null()]),\n type: eventType, payload: domainObject(\"EventPayloads[EventType]\", \"packages/ragents/src/domain/events.ts\"),\n});\nconst viewSchema = object({\n id: Type.String(), revision: Type.Integer(), title: Type.String(), ownerId: Type.String(),\n primaryActorId: Type.Union([Type.String(), Type.Null()]), createdAt: Type.String(),\n forkedFrom: Type.Union([object({ runId: Type.String(), sequence: Type.Integer() }), Type.Null()]),\n actors: Type.Array(domainObject(\"Actor\")), inputs: Type.Array(domainObject(\"ActorInput\")), turns: Type.Array(domainObject(\"Turn\")),\n subscriptions: Type.Array(domainObject(\"EventSubscription\")), pluginStates: Type.Array(domainObject(\"PluginState\")),\n actions: Type.Array(domainObject(\"Action\")), artifacts: Type.Array(domainObject(\"Artifact\")),\n});\nconst modelSelection = object({ provider: text(), model: text(), thinking: text() });\nconst settingsResult = object({\n provider: Type.String(), model: Type.String(), thinking: Type.String(),\n models: Type.Array(object({ id: Type.String(), provider: Type.String(), label: Type.String(), thinking: Type.Array(Type.String()) })),\n});\n\n/** Run management, model selection and conversation reset of the global coordinator. */\nexport const overseerContracts = {\n listRuns: defineOperation({\n id: \"ragents.overseer.listRuns\",\n description: \"List the runs the caller sees, with stable references; the global coordinators are not part of this list.\",\n rights: [\"runs.read\"],\n input: empty,\n result: Type.Array(runSummary),\n }),\n createRun: defineOperation({\n id: \"ragents.overseer.createRun\",\n description: \"Create a run with a server-side ID and title. Exactly one start form: message, installed script (id or unique title), or packageDirectory (existing local run script package). input is only allowed with script/packageDirectory. options selects start options such as ragents.startOptions.select, each only with its own rights. The result waits for preparation, check, test and installation; accepted does not yet confirm a finished model result.\",\n rights: [\"runs.read\", \"runs.write\", \"runs.create\"],\n input: createInput,\n result: accepted,\n }),\n readRun: defineOperation({\n id: \"ragents.overseer.readRun\",\n description: \"Read the current unabridged RunView; nested domain values are documented as open JSON objects.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: object({ run }),\n result: viewSchema,\n }),\n readEvents: defineOperation({\n id: \"ragents.overseer.readEvents\",\n description: \"Read the complete journal page by page in sequence order. As long as hasMore is true, use nextAfter as after of the next request. type filters an exact event type.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: object({\n run,\n after: Type.Optional(Type.Integer({ minimum: 0, default: 0 })),\n limit: Type.Optional(Type.Integer({ minimum: 1, maximum: 200, default: 50 })),\n type: Type.Optional(eventType),\n }),\n result: object({ ...identityFields, events: Type.Array(eventSchema), nextAfter: Type.Integer({ minimum: 0 }), hasMore: Type.Boolean() }),\n }),\n sendMessage: defineOperation({\n id: \"ragents.overseer.sendMessage\",\n description: \"Enqueue a chat message for the primary LLM actor; TypeScript as primary is rejected with actor-chat-unsupported. The result only confirms the enqueueing, neither processing nor completion. A running turn is not replaced by it.\",\n rights: [\"runs.read\", \"runs.write\"],\n input: object({ run, message: text() }),\n result: accepted,\n }),\n stopRun: defineOperation({\n id: \"ragents.overseer.stopRun\",\n description: \"Stop the run through its normal stop boundary and wait for the cleanup; the conversation is kept.\",\n rights: [\"runs.read\", \"runs.write\"],\n input: object({ run }),\n result: object({ ...identityFields, stopped: Type.Literal(true) }),\n }),\n readCatalog: defineOperation({\n id: \"ragents.overseer.readCatalog\",\n description: \"Read installed templates and start options with input schemas, default values and selectability. createRun starts messages, installed scripts or local packages via packageDirectory. Skills provide editable tasks for message; name the skill as the work instruction.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: empty,\n result: object({\n entries: Type.Array(Type.Object({ id: Type.String(), title: Type.String(), description: Type.String(), action: Type.Union([Type.Literal(\"skill\"), Type.Literal(\"script\")]) }, { additionalProperties: true, \"x-typescript-type\": \"PublicStartEntry\" })),\n options: Type.Array(object({ id: Type.String(), schema: jsonObject, value: Type.Any(), selectable: Type.Boolean(), presentation: Type.Any() })),\n }),\n }),\n readReference: defineOperation({\n id: \"ragents.overseer.readReference\",\n description: \"Read a readable reference of all registered methods and channels directly from their contracts.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: empty,\n result: Type.String(),\n }),\n readOpenRpc: defineOperation({\n id: \"ragents.overseer.readOpenRpc\",\n description: \"Read OpenRPC 1.3 directly from the same contracts.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: empty,\n result: jsonObject,\n }),\n settings: {\n read: defineOperation({\n id: \"ragents.overseer.settings.read\",\n description: \"Read the global coordinator's model selection with the available model catalog.\",\n rights: [\"ragents.overseer.read\"],\n input: empty,\n result: settingsResult,\n }),\n save: defineOperation({\n id: \"ragents.overseer.settings.save\",\n description: \"Set the global coordinator's model selection; it applies from the next answer on.\",\n rights: [\"ragents.overseer.read\", \"ragents.overseer.write\", \"settings.write\"],\n input: modelSelection,\n result: settingsResult,\n }),\n },\n coordinator: defineOperation({\n id: \"ragents.overseer.coordinator\",\n description: \"Read the run ID of your own global coordinator: one per signed-in user, exactly one without sign-in.\",\n rights: [\"ragents.overseer.read\"],\n input: empty,\n result: object({ runId: Type.String() }),\n }),\n reset: defineOperation({\n id: \"ragents.overseer.reset\",\n description: \"Reset the conversation of your own global coordinator including its model context; the model selection, other users' coordinators and all runs are kept.\",\n rights: [\"ragents.overseer.read\", \"ragents.overseer.write\"],\n input: object({ confirm: Type.Literal(true, { description: \"The conversation reset must be confirmed explicitly.\" }) }),\n result: Type.Null(),\n }),\n} as const;\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/lib/labels\", \"thinkingLabel\");\n", "import { rpc } from \"@ragents/web/rpc\";\nimport { overseerContracts, type OverseerModelSelection, type OverseerSettings } from \"../contract\";\n\ntype SettingsState =\n | { status: \"loading\"; settings?: undefined; error?: undefined }\n | { status: \"failed\"; settings?: undefined; error: string }\n | { status: \"ready\" | \"saving\"; settings: OverseerSettings; error?: string };\n\nexport interface ModelSettingsApi {\n read: () => Promise<OverseerSettings>;\n save: (selection: OverseerModelSelection) => Promise<OverseerSettings>;\n}\n\nconst rpcApi: ModelSettingsApi = {\n read: () => rpc.call(overseerContracts.settings.read, {}),\n save: (selection) => rpc.call(overseerContracts.settings.save, selection),\n};\n\nexport function createModelSettingsStore(api: ModelSettingsApi = rpcApi) {\n let state: SettingsState = { status: \"loading\" };\n let revision = 0;\n let loading: Promise<void> | undefined;\n const listeners = new Set<() => void>();\n const publish = (next: SettingsState) => {\n state = next;\n for (const listener of listeners) listener();\n };\n const failure = (cause: unknown) => {\n const error = cause instanceof Error ? cause.message : String(cause);\n publish(state.settings ? { status: \"ready\", settings: state.settings, error } : { status: \"failed\", error });\n };\n const load = (): Promise<void> => {\n if (loading) return loading;\n if (state.status === \"saving\") return Promise.resolve();\n const started = revision;\n if (!state.settings) publish({ status: \"loading\" });\n loading = api.read().then((settings) => {\n if (revision === started) publish({ status: \"ready\", settings });\n }).catch((cause: unknown) => {\n if (revision === started) failure(cause);\n }).finally(() => { loading = undefined; });\n return loading;\n };\n const save = async (selection: OverseerModelSelection): Promise<void> => {\n if (!state.settings || state.status === \"saving\") throw new Error(\"Wait until the settings are ready\");\n revision += 1;\n publish({ status: \"saving\", settings: state.settings });\n try {\n publish({ status: \"ready\", settings: await api.save(selection) });\n } catch (cause) {\n failure(cause);\n throw cause;\n }\n };\n return { read: () => state, load, save, subscribe: (listener: () => void) => {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n } };\n}\n\nexport const modelSettingsStore = createModelSettingsStore();\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"Fragment\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsx\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsxs\");\n", "import { useAccess } from \"@ragents/web/AccessContext\";\nimport { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@ragents/web/ui\";\nimport { useEffect, useSyncExternalStore, type ReactNode } from \"react\";\nimport { thinkingLabel } from \"@ragents/web/lib/labels\";\nimport { modelSettingsStore } from \"./model-settings\";\nimport type { OverseerModelSelection } from \"../contract\";\n\nexport function useModelSettings(active = true) {\n const state = useSyncExternalStore(modelSettingsStore.subscribe, modelSettingsStore.read);\n useEffect(() => { if (active) void modelSettingsStore.load(); }, [active]);\n return state;\n}\n\nconst selectionKey = (provider: string, model: string) => JSON.stringify([provider, model]);\n\nconst noteClass = \"mt-2 text-[0.73rem] text-muted-foreground\";\nconst errorClass = \"mt-2 flex flex-wrap items-center gap-2 text-[0.8rem] text-destructive\";\nconst triggerClass = \"min-w-0 max-w-[min(320px,100%)]\";\n\nexport function ModelSettings({ active = true, compact = false, disabled = false, actions }: { active?: boolean; compact?: boolean; disabled?: boolean; actions?: ReactNode }) {\n const access = useAccess();\n const readable = access.can(\"ragents.overseer.read\");\n const writable = access.can(\"ragents.overseer.write\") && access.can(\"settings.write\");\n const state = useModelSettings(active && readable);\n const settings = state.settings;\n const model = settings?.models.find((entry) => entry.id === settings.model && entry.provider === settings.provider);\n const save = (selection: OverseerModelSelection) => { void modelSettingsStore.save(selection).catch(() => {}); };\n const modelOptions = settings?.models.map((entry) => ({ value: selectionKey(entry.provider, entry.id), label: entry.label })) ?? [];\n const thinkingOptions = model?.thinking.map((level) => ({ value: level, label: thinkingLabel(level) })) ?? [];\n if (!readable) return null;\n return (\n <section aria-label=\"Model of the global coordinator\" className={compact ? \"min-w-0 flex-1\" : \"min-w-0\"}>\n <div className={compact ? \"flex flex-nowrap items-center gap-2 max-md:gap-1\" : \"flex flex-wrap items-center gap-2.5\"}>\n {settings && model ? <>\n <Select\n disabled={!writable || disabled || state.status === \"saving\"}\n items={modelOptions}\n value={selectionKey(settings.provider, settings.model)}\n onValueChange={(key) => {\n const next = settings.models.find((entry) => selectionKey(entry.provider, entry.id) === key);\n if (!next) throw new Error(\"The selected model is no longer available\");\n const thinking = next.thinking.includes(settings.thinking) ? settings.thinking : next.thinking[0];\n if (!thinking) throw new Error(\"No reasoning level is configured for the model\");\n save({ provider: next.provider, model: next.id, thinking });\n }}\n >\n <SelectTrigger aria-label=\"Model\" className={`${triggerClass} ${compact ? \"flex-1\" : \"flex-[0_1_auto]\"}`} size={compact ? \"sm\" : \"default\"}><SelectValue /></SelectTrigger>\n <SelectContent>{modelOptions.map((option) => <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>)}</SelectContent>\n </Select>\n <Select\n disabled={!writable || disabled || state.status === \"saving\" || model.thinking.length < 2}\n items={thinkingOptions}\n value={settings.thinking}\n onValueChange={(thinking) => { if (thinking !== null) save({ provider: settings.provider, model: settings.model, thinking }); }}\n >\n <SelectTrigger aria-label={compact ? \"Reasoning\" : \"Reasoning level\"} className={`${triggerClass} flex-none`} size={compact ? \"sm\" : \"default\"}><SelectValue /></SelectTrigger>\n <SelectContent>{thinkingOptions.map((option) => <SelectItem key={option.value} value={option.value}>{option.label}</SelectItem>)}</SelectContent>\n </Select>\n </> : state.status === \"loading\" ? <p className={`${noteClass} min-w-0 flex-[0_1_auto]`} role=\"status\">Loading models ...</p>\n : !state.error && <p className={`${errorClass} min-w-0 flex-[0_1_auto]`} role=\"alert\">The stored model is missing from the model catalog.</p>}\n {actions && <div className=\"ml-auto flex-none\">{actions}</div>}\n </div>\n {settings && model && (!compact || state.status === \"saving\") && <p className={noteClass} role=\"status\">{state.status === \"saving\" ? \"Saving ...\" : \"Applies from the next answer on. The conversation history is kept.\"}</p>}\n {state.error && <div className={errorClass} role=\"alert\">\n <span>{state.error}</span>\n <Button onClick={() => { void modelSettingsStore.load(); }} variant=\"outline\">Reload</Button>\n </div>}\n </section>\n );\n}\n", "import type { ChatDisplayPolicy } from \"@ragents/web/PluginRegistry\";\n\nexport const overseerChatStorageKeyPrefix = \"ragents.overseer.chat-steps\";\n\nexport const overseerChatDisplayPolicy: ChatDisplayPolicy = {\n modes: { coordinator: \"grouped\", agents: \"grouped\" },\n stepsVisible: true,\n stepsExpandable: true,\n selectable: true,\n};\n", "import type { ChatEvent } from \"quassel/events\";\nimport { OVERSEER_PLUGIN_ID, QUICK_ANSWER_MAX_LENGTH } from \"../contract\";\n\nexport interface QuickAnswerNotice {\n id: string;\n question: string;\n text: string;\n}\n\nconst validText = (value: unknown): value is string => typeof value === \"string\" && !!value.trim()\n && value.length <= QUICK_ANSWER_MAX_LENGTH && !/[\\r\\n]/.test(value);\n\nexport function createQuickAnswers() {\n let conversationId: string | null | undefined;\n let initialized = false;\n let replaying = true;\n let seenSequence = 0;\n let replaySequence = 0;\n let pending: QuickAnswerNotice | undefined;\n return {\n event(event: ChatEvent): QuickAnswerNotice | undefined {\n if (event.kind === \"reset\") {\n if (event.reason === \"conversation-reset\" || (conversationId != null && conversationId !== event.conversationId)) {\n seenSequence = 0;\n initialized = true;\n }\n conversationId = event.conversationId;\n replaying = true;\n replaySequence = seenSequence;\n pending = undefined;\n }\n if (event.kind === \"replay-end\") {\n conversationId = event.conversationId;\n replaying = false;\n seenSequence = replaySequence;\n const notice = initialized ? pending : undefined;\n initialized = true;\n pending = undefined;\n return notice;\n }\n if (event.kind !== \"plugin\" || event.pluginId !== OVERSEER_PLUGIN_ID || event.type !== \"state-replaced\") return;\n const payload = event.payload;\n if (!payload || typeof payload !== \"object\" || !(\"state\" in payload)) return;\n if (!(\"scope\" in payload) || !payload.scope || typeof payload.scope !== \"object\"\n || !(\"kind\" in payload.scope) || payload.scope.kind !== \"run\") return;\n const state = payload.state;\n if (!state || typeof state !== \"object\" || !(\"kind\" in state) || state.kind !== \"quick-answer\") return;\n if (!event.journal || !event.journal.eventId?.trim() || !event.journal.conversationId?.trim()\n || !Number.isSafeInteger(event.journal.sequence) || event.journal.sequence <= 0) {\n throw new Error(\"The journal position of the quick answer is invalid.\");\n }\n if (conversationId != null && conversationId !== event.journal.conversationId) return;\n conversationId = event.journal.conversationId;\n if (event.journal.sequence <= (replaying ? replaySequence : seenSequence)) return;\n if (replaying && !initialized) { replaySequence = event.journal.sequence; return; }\n const question = \"question\" in state ? state.question : undefined;\n const text = \"text\" in state ? state.text : undefined;\n if (!validText(question) || !validText(text)) throw new Error(\"The quick question or quick answer is invalid.\");\n const notice = { id: event.journal.eventId, question, text };\n if (replaying) { replaySequence = event.journal.sequence; pending = notice; }\n else { seenSequence = event.journal.sequence; return notice; }\n },\n };\n}\n", "import { useAccess } from \"@ragents/web/AccessContext\";\nimport { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Popover, PopoverContent } from \"@ragents/web/ui\";\nimport { RunModalContext } from \"@ragents/web/ui/dialog\";\nimport { XIcon } from \"lucide-react\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { ChatMessages, ChatInputToolbar, type ChatInputHandle, type ChatEvent } from \"quassel\";\nimport { useChat } from \"@ragents/web/chat/useChat\";\nimport { useAttachmentCapabilities } from \"@ragents/web/chat/useAttachmentCapabilities\";\nimport { ChatStepsProvider, type OverviewPanelContext, type WebPlugin } from \"@ragents/web/PluginRegistry\";\nimport { ChatViewSwitches, useChatViewSettings } from \"@ragents/web/chat-view-settings\";\nimport { withToolSummaries } from \"@ragents/web/toolLine\";\nimport { rpc } from \"@ragents/web/rpc\";\nimport { interruptActorTurn } from \"@ragents/web/api\";\nimport { runContracts } from \"@ragents/engine/src/http/contracts\";\nimport { runViewFrom } from \"@ragents/web/run-view\";\nimport { OVERSEER_PLUGIN_ID, overseerContracts } from \"../contract\";\nimport { ModelSettings, useModelSettings } from \"./ModelSettings\";\nimport { overseerChatDisplayPolicy, overseerChatStorageKeyPrefix } from \"./chat-display\";\nimport { createQuickAnswers, type QuickAnswerNotice } from \"./quick-answers\";\n\nconst toolbarClass = \"flex h-header max-w-[720px] min-w-[190px] flex-[0_1_570px] items-center gap-1 border-r border-border bg-[color-mix(in_srgb,var(--primary)_4%,var(--card))] px-2 py-1 data-open:bg-accent max-md:min-w-[130px] max-md:flex-[0_1_210px] max-md:px-1 max-md:data-open:grow\";\nconst noteClass = \"mx-4 my-2 flex-none text-[0.8rem] text-muted-foreground\";\n\n/** Interrupts only the coordinator's running turn; the run and its other actors keep running. */\nconst interruptCoordinator = async (runId: string) => {\n const coordinator = runViewFrom(await rpc.call(runContracts.view, { runId }))?.primaryActorId;\n if (!coordinator) throw new Error(\"The global coordinator is not available\");\n await interruptActorTurn(runId, coordinator);\n};\nconst errorClass = \"mx-4 my-2 flex-none text-[0.8rem] text-destructive\";\n\n/** Every user has their own coordinator; only the server knows its id. */\nfunction OverseerToolbar(context: OverviewPanelContext) {\n const user = useAccess().user?.id;\n const [coordinator, setCoordinator] = useState<{ runId?: string; error?: string }>({});\n useEffect(() => {\n let current = true;\n setCoordinator({});\n rpc.call(overseerContracts.coordinator, {}).then(\n ({ runId }) => { if (current) setCoordinator({ runId }); },\n (cause: unknown) => { if (current) setCoordinator({ error: cause instanceof Error ? cause.message : String(cause) }); },\n );\n return () => { current = false; };\n }, [user]);\n if (!coordinator.runId) {\n return <div className={toolbarClass} data-slot=\"overseer-toolbar\" role=\"status\">\n {coordinator.error && <span className=\"text-[0.7rem] font-bold text-destructive\" title={coordinator.error} aria-label={coordinator.error}>!</span>}\n </div>;\n }\n return <ChatStepsProvider policy={overseerChatDisplayPolicy} storageKeyPrefix={overseerChatStorageKeyPrefix}>\n <OverseerConversation key={coordinator.runId} {...context} runId={coordinator.runId} />\n </ChatStepsProvider>;\n}\n\nfunction OverseerConversation({ open, onOpen, onClose, onBusy, userLocation, runId }: OverviewPanelContext & { runId: string }) {\n const writable = useAccess().can(\"ragents.overseer.write\");\n const [activated, setActivated] = useState(false);\n const [confirmReset, setConfirmReset] = useState(false);\n const [resetting, setResetting] = useState(false);\n const resetPending = useRef(false);\n const resetObserved = useRef(false);\n const composer = useRef<ChatInputHandle>(null);\n const anchor = useRef<HTMLDivElement>(null);\n const dropdown = useRef<HTMLElement>(null);\n const suppressFocus = useRef(false);\n const [detailsContainer, setDetailsContainer] = useState<HTMLDivElement | null>(null);\n const [scroller, setScroller] = useState<HTMLDivElement | null>(null);\n const conversationId = useRef<string | null | undefined>(undefined);\n const [dialogContainer, setDialogContainer] = useState<HTMLElement | null>(null);\n const cancelReset = useRef<HTMLButtonElement>(null);\n const setDropdown = useCallback((element: HTMLElement | null) => { dropdown.current = element; setDialogContainer(element); }, []);\n const [quickAnswers] = useState(createQuickAnswers);\n const [quickAnswer, setQuickAnswer] = useState<QuickAnswerNotice>();\n const panelOpen = useRef(open);\n panelOpen.current = open;\n const [error, setError] = useState<string>();\n const [composerError, setComposerError] = useState<string>();\n const clearConversation = useCallback(() => {\n composer.current?.reset();\n setConfirmReset(false);\n setError(undefined);\n setQuickAnswer(undefined);\n }, []);\n const onEvent = useCallback((event: ChatEvent) => {\n const notice = quickAnswers.event(event);\n if (event.kind === \"reset\") {\n if (event.reason === \"conversation-reset\" || (conversationId.current != null && conversationId.current !== event.conversationId)) {\n if (resetPending.current) resetObserved.current = true;\n clearConversation();\n }\n conversationId.current = event.conversationId;\n }\n if (event.kind === \"replay-end\") conversationId.current = event.conversationId;\n if (notice && !panelOpen.current) setQuickAnswer(notice);\n }, [clearConversation, quickAnswers]);\n const chat = useChat(runId, onEvent, activated);\n const chatView = useChatViewSettings(runId, \"primary\", \"coordinator\");\n const modelState = useModelSettings(open);\n const attachments = useAttachmentCapabilities(runId, \"primary\", JSON.stringify(modelState.settings && [modelState.settings.provider, modelState.settings.model]));\n const messages = useMemo(() => withToolSummaries(chat.messages), [chat.messages]);\n const requestOpen = () => { suppressFocus.current = false; setQuickAnswer(undefined); onOpen(); };\n useEffect(() => { if (open) { setActivated(true); setQuickAnswer(undefined); } }, [open]);\n useEffect(() => onBusy(chat.running), [chat.running, onBusy]);\n const belowHeader = useCallback(() => {\n const element = anchor.current;\n if (!element) return null;\n const boundary = element.closest(\"header\") ?? element;\n return { contextElement: element, getBoundingClientRect: () => {\n const bounds = element.getBoundingClientRect();\n return new DOMRect(bounds.left, boundary.getBoundingClientRect().bottom, bounds.width, 0);\n } };\n }, []);\n const dismiss = (reason: string, event: Event) => {\n if (confirmReset) return;\n if (reason === \"outside-press\") {\n if (event.target instanceof Node && anchor.current?.contains(event.target)) return;\n onClose();\n return;\n }\n if (reason !== \"escape-key\") return;\n suppressFocus.current = !(document.activeElement instanceof HTMLTextAreaElement && anchor.current?.contains(document.activeElement));\n onClose();\n composer.current?.focus();\n };\n\n const perform = (work: () => Promise<void>) => {\n setError(undefined);\n void work().catch((cause: unknown) => setError(cause instanceof Error ? cause.message : String(cause)));\n };\n const reset = async () => {\n if (resetPending.current) return;\n resetPending.current = true;\n resetObserved.current = false;\n setResetting(true);\n setError(undefined);\n try {\n await rpc.call(overseerContracts.reset, { confirm: true });\n clearConversation();\n } catch (cause) {\n if (!resetObserved.current) setError(cause instanceof Error ? cause.message : String(cause));\n } finally {\n resetPending.current = false;\n setResetting(false);\n }\n };\n const connectionNote = activated && !chat.connected ? \"No connection. Your draft is kept; sending is disabled.\" : undefined;\n const problem = error ?? composerError ?? modelState.error ?? connectionNote;\n return <div className={toolbarClass} data-open={open} data-slot=\"overseer-toolbar\" ref={anchor}\n onFocus={(event) => {\n if (!(event.target instanceof HTMLTextAreaElement)) return;\n if (suppressFocus.current) suppressFocus.current = false;\n else onOpen();\n }}\n onKeyDown={(event) => {\n if (event.defaultPrevented) return;\n if (!open && event.target instanceof HTMLTextAreaElement && (event.key.length === 1 || event.key === \"Enter\")) requestOpen();\n }}>\n <div className=\"min-w-0 flex-1\" onClick={(event) => { if (event.target instanceof HTMLTextAreaElement) requestOpen(); }}>\n <ChatInputToolbar {...attachments} detailsContainer={detailsContainer} layout=\"toolbar\" handleRef={composer}\n inputAriaControls=\"overseer-dropdown\"\n disabled={!writable || resetting || confirmReset} sendDisabled={!chat.connected || modelState.status === \"saving\" || resetting}\n maxRows={2} rows={1} onErrorChange={setComposerError} onSend={(text, attachments) => chat.send(text, attachments, userLocation)}\n onStop={writable && chat.running ? () => { if (!resetPending.current) perform(() => interruptCoordinator(runId)); } : undefined}\n running={chat.running}\n texts={{ placeholder: \"Global coordinator\", steeringPlaceholder: \"Global coordinator\" }}\n toolbarRight={<ModelSettings active={open} compact disabled={resetting} actions={\n <Button aria-label=\"Reset conversation\" aria-busy={resetting} disabled={!writable || resetting || !chat.connected} onClick={() => setConfirmReset(true)} size=\"sm\" variant=\"outline\">\n {resetting ? \"Resetting ...\" : \"Reset\"}\n </Button>\n } />}\n toolbarLeft={<ChatViewSwitches className=\"max-md:[&>span]:hidden\" settings={chatView} />}\n />\n </div>\n <span className=\"flex min-w-0 flex-none items-center justify-end gap-1.5 empty:hidden\" role=\"status\" aria-live=\"polite\">\n {chat.running && <span className=\"sr-only\">Working</span>}\n {problem && <span className=\"text-[0.7rem] font-bold text-destructive\" title={problem} aria-label={problem}>!</span>}\n </span>\n <Popover modal={false} open={quickAnswer !== undefined}>\n <PopoverContent align=\"start\" anchor={belowHeader} aria-atomic=\"true\" aria-live=\"polite\" className=\"flex max-w-[calc(100vw-16px)] flex-row items-start gap-1 p-1.5 text-[0.76rem]\" collisionPadding={8}\n finalFocus={false} initialFocus={false} role=\"status\" side=\"bottom\"\n style={{ width: \"min(max(calc(var(--anchor-width) * 2), 480px), var(--available-width))\" }}>\n {quickAnswer && <>\n <Button className=\"h-auto min-w-0 flex-1 justify-start rounded-lg px-2.5 py-2 text-left text-[0.76rem] leading-[1.45] font-normal whitespace-normal [overflow-wrap:anywhere]\" variant=\"ghost\" aria-label={`Open history: ${quickAnswer.question} ${quickAnswer.text}`}\n onClick={() => {\n requestOpen();\n if (writable) composer.current?.focus();\n else requestAnimationFrame(() => scroller?.focus());\n }}><span className=\"grid min-w-0 gap-1\"><span className=\"text-muted-foreground\">{quickAnswer.question}</span><strong className=\"font-semibold\">{quickAnswer.text}</strong></span></Button>\n <Button aria-label=\"Close quick answer\" className=\"mt-1 flex-none rounded-full\" onClick={() => setQuickAnswer(undefined)} size=\"icon-sm\" title=\"Close quick answer\" variant=\"ghost\"><XIcon /></Button>\n </>}\n </PopoverContent>\n </Popover>\n <Popover modal={false} open={open} onOpenChange={(next, details) => { if (!next) dismiss(details.reason, details.event); }}>\n <PopoverContent align=\"start\" anchor={belowHeader} aria-label=\"Global coordinator\" className=\"flex min-h-0 flex-col gap-0 overflow-hidden rounded-t-none rounded-b-panel border-t-2 border-t-primary p-0\" collisionPadding={8}\n finalFocus={false} id=\"overseer-dropdown\" initialFocus={false} keepMounted ref={setDropdown} role=\"region\" side=\"bottom\"\n style={{ width: \"min(760px, var(--available-width))\", height: \"min(650px, var(--available-height))\" }}>\n <div className=\"flex-none border-b border-border-soft\" data-tone=\"overseer-details\" ref={setDetailsContainer} />\n {confirmReset && dialogContainer && <RunModalContext.Provider value={dialogContainer}>\n <Dialog open onOpenChange={(next) => { if (!next && !resetting) setConfirmReset(false); }} modal=\"trap-focus\" disablePointerDismissal>\n <DialogContent initialFocus={cancelReset} onBackdropClick={() => { if (!resetting) setConfirmReset(false); }} scope=\"run\" showCloseButton={false} size=\"small\">\n <DialogHeader>\n <DialogTitle>Reset conversation?</DialogTitle>\n <DialogDescription>History and model context are deleted. Running answers are stopped.</DialogDescription>\n </DialogHeader>\n <p>Your runs and the model choice are kept.</p>\n {error && <p className=\"text-[0.8rem] text-destructive\" role=\"alert\">{error}</p>}\n <DialogFooter>\n <Button ref={cancelReset} disabled={resetting} onClick={() => setConfirmReset(false)} variant=\"outline\">Cancel</Button>\n <Button disabled={resetting} onClick={() => { void reset(); }} variant=\"destructive\">\n {resetting ? \"Resetting ...\" : \"Reset conversation\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </RunModalContext.Provider>}\n {!writable && <p className={noteClass}>You have read access to this conversation.</p>}\n {connectionNote && <p className={noteClass} role=\"status\">{connectionNote}</p>}\n {error && <p className={errorClass} role=\"alert\">{error}</p>}\n <ChatMessages announce={false} className=\"min-h-16! flex-1\" scrollerRef={setScroller}\n detailMode={chatView.detailMode}\n emptyState={<div className=\"m-auto max-w-[480px] p-8 text-[0.9rem] leading-[1.6] text-muted-foreground max-md:p-5\"><strong className=\"text-foreground\">One chat for the whole workshop</strong><p>Write your task in the title bar above. Answers about your runs and ongoing work appear here.</p></div>}\n messages={messages} running={chat.running} showTimestamps={chatView.showTimestamps} stepsExpandable={chatView.stepsExpandable}\n />\n </PopoverContent>\n </Popover>\n </div>;\n}\n\nexport const webPlugin: WebPlugin = {\n id: OVERSEER_PLUGIN_ID,\n settings: [{ category: \"models\", order: 10, readRight: \"ragents.overseer.read\", id: `${OVERSEER_PLUGIN_ID}.model`, label: \"Global coordinator\", Settings: ModelSettings }],\n overviewPanels: [{ id: `${OVERSEER_PLUGIN_ID}.chat`, placement: \"toolbar\", order: 100, readRight: \"ragents.overseer.read\", Panel: OverseerToolbar }],\n};\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EAAO,CAACC,EAAWC,IAAS,CACvC,IAAMC,EAAS,WAAW,uBAA0BF,CAAS,EAC7D,GAAIE,IAAW,OAAW,MAAM,IAAI,MAAM,6BAA6BF,CAAS,EAAE,EAClF,GAAI,EAAEC,KAAQC,GAAS,MAAM,IAAI,MAAM,6BAA6BD,CAAI,SAASD,CAAS,6CAA6C,EACvI,OAAOE,EAAOD,CAAI,CACpB,ECJA,IAAOE,EAAQC,EAAK,6BAA8B,WAAW,ECA7D,IAAOC,EAAQC,EAAK,kBAAmB,QAAQ,ECA/C,IAAOC,GAAQC,EAAK,kBAAmB,QAAQ,ECA/C,IAAOC,GAAQC,EAAK,kBAAmB,eAAe,ECAtD,IAAOC,GAAQ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ChFuF,IAAkBpE,EAAC,KAAE,UAAWnB,GAAW,KAAK,SAAU,SAAAuF,GAAe,EACzE5B,GAASxC,EAAC,KAAE,UAAWX,GAAY,KAAK,QAAS,SAAAmD,EAAM,EACxDxC,EAACyF,GAAA,CAAa,SAAU,GAAO,UAAU,mBAAmB,YAAa9D,GACvE,WAAYuB,EAAS,WACrB,WAAYoB,EAAC,OAAI,UAAU,wFAAwF,UAAAtE,EAAC,UAAO,UAAU,kBAAkB,2CAA+B,EAASA,EAAC,KAAE,yGAA6F,GAAI,EACnS,SAAUwD,GAAU,QAASR,EAAK,QAAS,eAAgBE,EAAS,eAAgB,gBAAiBA,EAAS,gBAChH,GACF,EACA,GACF,CACF,CAEO,IAAMwC,GAAuB,CAClC,GAAIC,EACJ,SAAU,CAAC,CAAE,SAAU,SAAU,MAAO,GAAI,UAAW,wBAAyB,GAAI,GAAGA,CAAkB,SAAU,MAAO,qBAAsB,SAAUlB,EAAc,CAAC,EACzK,eAAgB,CAAC,CAAE,GAAI,GAAGkB,CAAkB,QAAS,UAAW,UAAW,MAAO,IAAK,UAAW,wBAAyB,MAAOrG,EAAgB,CAAC,CACrJ",
|
|
6
6
|
"names": ["read", "specifier", "name", "module", "AccessContext_useAccess_default", "read", "ui_Button_default", "read", "ui_Dialog_default", "read", "ui_DialogContent_default", "read", "ui_DialogDescription_default", "read", "ui_DialogFooter_default", "read", "ui_DialogHeader_default", "read", "ui_DialogTitle_default", "read", "ui_Popover_default", "read", "ui_PopoverContent_default", "read", "ui_Select_default", "read", "ui_SelectContent_default", "read", "ui_SelectItem_default", "read", "ui_SelectTrigger_default", "read", "ui_SelectValue_default", "read", "dialog_RunModalContext_default", "read", "react_createContext_default", "read", "react_createElement_default", "read", "react_forwardRef_default", "read", "react_useCallback_default", "read", "react_useContext_default", "read", "react_useEffect_default", "read", "react_useMemo_default", "read", "react_useRef_default", "read", "react_useState_default", "read", "react_useSyncExternalStore_default", "read", "toKebabCase", "string", "toLucideIconData", "iconName", "iconNode", "aliases", "toKebabCase", "toCamelCase", "string", "out", "upperNext", "ch", "toPascalCase", "string", "camelCase", "toCamelCase", "mergeClasses", "classes", "className", "index", "array", "defaultAttributes", "isDefined", "value", "buildLucideIconNode", "icon", "params", "attributeNames", "getAttributeName", "attributeName", "viewBoxWidth", "defaultAttributes", "viewBoxHeight", "aliasClassNames", "alias", "iconClassNames", "classNamesFromClassName", "className", "mergeClasses", "calculatedStrokeWidth", "attrs", "attrName", "child", "name", "children", "nextAttrs", "buildLucideIconForReact", "icon", "params", "buildLucideIconNode", "hasA11yProp", "props", "prop", "LucideContext", "react_createContext_default", "useLucideContext", "react_useContext_default", "LucideContext", "Icon", "react_forwardRef_default", "color", "size", "width", "height", "strokeWidth", "absoluteStrokeWidth", "nonScalingStroke", "className", "children", "iconNode", "icon", "rest", "ref", "contextSize", "contextStrokeWidth", "contextAbsoluteStrokeWidth", "contextNonScalingStroke", "contextColor", "contextClass", "useLucideContext", "hasAccessibleProp", "hasA11yProp", "name", "svgAttributes", "builtIconNode", "buildLucideIconForReact", "mergeClasses", "react_createElement_default", "tag", "attrs", "createLucideIcon", "iconDataOrName", "iconNode", "aliases", "iconData", "toLucideIconData", "Component", "react_forwardRef_default", "className", "props", "ref", "react_createElement_default", "Icon", "toPascalCase", "__iconData", "X", "createLucideIcon", "quassel_ChatInputToolbar_default", "read", "quassel_ChatMessages_default", "read", "useChat_useChat_default", "read", "useAttachmentCapabilities_useAttachmentCapabilities_default", "read", "PluginRegistry_ChatStepsProvider_default", "read", "chat_view_settings_ChatViewSwitches_default", "read", "chat_view_settings_useChatViewSettings_default", "read", "toolLine_withToolSummaries_default", "read", "rpc_rpc_default", "read", "api_interruptActorTurn_default", "read", "contracts_runContracts_default", "read", "run_view_runViewFrom_default", "read", "typebox_Type_default", "read", "contract_defineOperation_default", "read", "events_eventTypeMap_default", "read", "OVERSEER_PLUGIN_ID", "QUICK_ANSWER_MAX_LENGTH", "object", "properties", "typebox_Type_default", "text", "empty", "jsonObject", "eventType", "events_eventTypeMap_default", "name", "run", "identityFields", "runSummary", "accepted", "commonStart", "createInput", "domainObject", "source", "eventSchema", "viewSchema", "modelSelection", "settingsResult", "overseerContracts", "contract_defineOperation_default", "labels_thinkingLabel_default", "read", "rpcApi", "rpc_rpc_default", "overseerContracts", "selection", "createModelSettingsStore", "api", "state", "revision", "loading", "listeners", "publish", "next", "listener", "failure", "cause", "error", "started", "settings", "modelSettingsStore", "jsx_runtime_Fragment_default", "read", "jsx_runtime_jsx_default", "read", "jsx_runtime_jsxs_default", "read", "useModelSettings", "active", "state", "react_useSyncExternalStore_default", "modelSettingsStore", "react_useEffect_default", "selectionKey", "provider", "model", "noteClass", "errorClass", "triggerClass", "ModelSettings", "compact", "disabled", "actions", "access", "AccessContext_useAccess_default", "readable", "writable", "settings", "entry", "save", "selection", "modelOptions", "thinkingOptions", "level", "labels_thinkingLabel_default", "jsx_runtime_jsxs_default", "jsx_runtime_Fragment_default", "ui_Select_default", "key", "next", "thinking", "jsx_runtime_jsx_default", "ui_SelectTrigger_default", "ui_SelectValue_default", "ui_SelectContent_default", "option", "ui_SelectItem_default", "ui_Button_default", "overseerChatStorageKeyPrefix", "overseerChatDisplayPolicy", "validText", "value", "QUICK_ANSWER_MAX_LENGTH", "createQuickAnswers", "conversationId", "initialized", "replaying", "seenSequence", "replaySequence", "pending", "event", "notice", "OVERSEER_PLUGIN_ID", "payload", "state", "question", "text", "toolbarClass", "noteClass", "interruptCoordinator", "runId", "coordinator", "run_view_runViewFrom_default", "rpc_rpc_default", "contracts_runContracts_default", "api_interruptActorTurn_default", "errorClass", "OverseerToolbar", "context", "user", "AccessContext_useAccess_default", "setCoordinator", "react_useState_default", "react_useEffect_default", "current", "overseerContracts", "cause", "jsx_runtime_jsx_default", "PluginRegistry_ChatStepsProvider_default", "overseerChatDisplayPolicy", "overseerChatStorageKeyPrefix", "OverseerConversation", "open", "onOpen", "onClose", "onBusy", "userLocation", "writable", "activated", "setActivated", "confirmReset", "setConfirmReset", "resetting", "setResetting", "resetPending", "react_useRef_default", "resetObserved", "composer", "anchor", "dropdown", "suppressFocus", "detailsContainer", "setDetailsContainer", "scroller", "setScroller", "conversationId", "dialogContainer", "setDialogContainer", "cancelReset", "setDropdown", "react_useCallback_default", "element", "quickAnswers", "createQuickAnswers", "quickAnswer", "setQuickAnswer", "panelOpen", "error", "setError", "composerError", "setComposerError", "clearConversation", "onEvent", "event", "notice", "chat", "useChat_useChat_default", "chatView", "chat_view_settings_useChatViewSettings_default", "modelState", "useModelSettings", "attachments", "useAttachmentCapabilities_useAttachmentCapabilities_default", "messages", "react_useMemo_default", "toolLine_withToolSummaries_default", "requestOpen", "belowHeader", "boundary", "bounds", "dismiss", "reason", "perform", "work", "reset", "connectionNote", "problem", "jsx_runtime_jsxs_default", "quassel_ChatInputToolbar_default", "text", "ModelSettings", "ui_Button_default", "chat_view_settings_ChatViewSwitches_default", "ui_Popover_default", "ui_PopoverContent_default", "jsx_runtime_Fragment_default", "X", "next", "details", "dialog_RunModalContext_default", "ui_Dialog_default", "ui_DialogContent_default", "ui_DialogHeader_default", "ui_DialogTitle_default", "ui_DialogDescription_default", "ui_DialogFooter_default", "quassel_ChatMessages_default", "webPlugin", "OVERSEER_PLUGIN_ID"]
|
|
7
7
|
}
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
"stand": "
|
|
81
|
-
"sourceStand": "
|
|
80
|
+
"stand": "20b117e1256a01bb0a9d5308095b133cfa1eaabeb3b1038664119c59772c4f5e",
|
|
81
|
+
"sourceStand": "8ce7b38cc9b9c511e7d75ea11c49ef8a9876b03af6b47d1373e3f16d95a39da3",
|
|
82
82
|
"server": "server/index.js",
|
|
83
83
|
"web": {
|
|
84
84
|
"entry": "web/index.js",
|
|
@@ -10,28 +10,28 @@ import { Type } from "typebox";
|
|
|
10
10
|
import { defineChannel, defineOperation } from "@ragents/engine/src/rpc/contract";
|
|
11
11
|
import { openJson } from "@ragents/engine/src/http/contracts";
|
|
12
12
|
var PROCESSES_PLUGIN_ID = "ragents.processes";
|
|
13
|
-
var runId = Type.String({ minLength: 1, maxLength: 64, description: "
|
|
13
|
+
var runId = Type.String({ minLength: 1, maxLength: 64, description: "Run id" });
|
|
14
14
|
var processesContracts = {
|
|
15
15
|
snapshot: defineOperation({
|
|
16
16
|
id: "ragents.processes.snapshot",
|
|
17
|
-
description: "
|
|
17
|
+
description: "The observed processes of a run with their open ports. Rights: runs.read and ragents.processes.read.",
|
|
18
18
|
rights: ["runs.read", "ragents.processes.read"],
|
|
19
19
|
input: Type.Object({ runId }, { additionalProperties: false }),
|
|
20
20
|
result: openJson("RunProcessSnapshot")
|
|
21
21
|
}),
|
|
22
22
|
stop: defineOperation({
|
|
23
23
|
id: "ragents.processes.stop",
|
|
24
|
-
description: "
|
|
24
|
+
description: "End a process of the run. Rights: runs.read, runs.write and runs.inspect.",
|
|
25
25
|
rights: ["runs.read", "runs.write", "runs.inspect"],
|
|
26
26
|
input: Type.Object({
|
|
27
27
|
runId,
|
|
28
|
-
processId: Type.String({ pattern: "^[1-9][0-9]*-[a-f0-9]{64}$", description: "
|
|
28
|
+
processId: Type.String({ pattern: "^[1-9][0-9]*-[a-f0-9]{64}$", description: "Process id from the snapshot" })
|
|
29
29
|
}, { additionalProperties: false }),
|
|
30
30
|
result: Type.Null()
|
|
31
31
|
}),
|
|
32
32
|
live: defineChannel({
|
|
33
33
|
id: "ragents.processes",
|
|
34
|
-
description: "
|
|
34
|
+
description: "The live state of a run's process monitoring. Rights: runs.read and ragents.processes.read.",
|
|
35
35
|
rights: ["runs.read", "ragents.processes.read"],
|
|
36
36
|
params: Type.Object({ runId }, { additionalProperties: false }),
|
|
37
37
|
message: openJson("RunProcessMessage")
|
|
@@ -53,7 +53,7 @@ var RunProcessObserver = class {
|
|
|
53
53
|
return this.#bounded(runId2, signal);
|
|
54
54
|
}
|
|
55
55
|
watch(runId2, listener) {
|
|
56
|
-
if (this.#stopped) throw new Error("
|
|
56
|
+
if (this.#stopped) throw new Error("The process monitoring has ended");
|
|
57
57
|
let watch = this.#watches.get(runId2);
|
|
58
58
|
if (!watch) {
|
|
59
59
|
watch = { listeners: /* @__PURE__ */ new Set(), fresh: /* @__PURE__ */ new Set(), last: void 0, polling: void 0, controller: void 0 };
|
|
@@ -110,7 +110,7 @@ var RunProcessObserver = class {
|
|
|
110
110
|
});
|
|
111
111
|
return watch.polling;
|
|
112
112
|
}
|
|
113
|
-
/**
|
|
113
|
+
/** A query ends at the latest after its time limit; the cancellation also reaches the executor. */
|
|
114
114
|
#bounded(runId2, signal) {
|
|
115
115
|
const timeoutMs = this.#options.pollIntervalMs * SNAPSHOT_TIMEOUT_TICKS;
|
|
116
116
|
const controller = new AbortController();
|
|
@@ -119,7 +119,7 @@ var RunProcessObserver = class {
|
|
|
119
119
|
let timer;
|
|
120
120
|
const deadline = new Promise((_settle, fail) => {
|
|
121
121
|
timer = setTimeout(() => {
|
|
122
|
-
const error = new Error(`
|
|
122
|
+
const error = new Error(`The executor of run ${runId2} did not answer the process query within ${timeoutMs / 1e3} s`);
|
|
123
123
|
fail(error);
|
|
124
124
|
controller.abort(error);
|
|
125
125
|
}, timeoutMs);
|
|
@@ -133,7 +133,7 @@ var RunProcessObserver = class {
|
|
|
133
133
|
const serialized = JSON.stringify(message.kind === "snapshot" ? { kind: message.kind, processes: message.snapshot.processes } : message);
|
|
134
134
|
const changed = serialized !== watch.last;
|
|
135
135
|
watch.last = serialized;
|
|
136
|
-
if (changed && message.kind === "error") console.error(`
|
|
136
|
+
if (changed && message.kind === "error") console.error(`Process monitoring for ${runId2}: ${message.error}`);
|
|
137
137
|
for (const listener of watch.listeners) {
|
|
138
138
|
if (changed || watch.fresh.has(listener)) listener(message);
|
|
139
139
|
}
|
|
@@ -150,9 +150,9 @@ var createProcessMethods = (options) => [
|
|
|
150
150
|
}),
|
|
151
151
|
implement(processesContracts.stop, async ({ runId: runId2, processId }, { access, signal }) => {
|
|
152
152
|
for (const right of processesContracts.stop.rights) {
|
|
153
|
-
if (!access.can(right)) throw new DomainError("forbidden", "
|
|
153
|
+
if (!access.can(right)) throw new DomainError("forbidden", "Ending processes is not allowed", 403);
|
|
154
154
|
}
|
|
155
|
-
if (signal.aborted) throw new Error("
|
|
155
|
+
if (signal.aborted) throw new Error("The process stop request was cancelled");
|
|
156
156
|
options.ensureWorkspaceAccess(access, runId2);
|
|
157
157
|
await options.terminate(runId2, processId, signal);
|
|
158
158
|
return null;
|