@schlenkr/ragents 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -11
- package/apps/server/package.json +8 -6
- package/apps/server/src/access-projection.ts +3 -3
- package/apps/server/src/access-service.ts +19 -8
- package/apps/server/src/access-session.ts +6 -2
- package/apps/server/src/api/contracts.ts +19 -18
- package/apps/server/src/api/core-methods.ts +45 -26
- package/apps/server/src/api/delivery.ts +4 -4
- package/apps/server/src/api/reference.ts +1 -1
- package/apps/server/src/api/rights.ts +86 -7
- package/apps/server/src/chat-context.ts +1 -1
- package/apps/server/src/chat-handler.ts +14 -7
- package/apps/server/src/config-file.ts +25 -6
- package/apps/server/src/config.ts +4 -4
- package/apps/server/src/data-directory.ts +1 -1
- package/apps/server/src/folder-install.ts +115 -0
- package/apps/server/src/host-api.json +1256 -0
- package/apps/server/src/host-api.ts +190 -0
- package/apps/server/src/host-resolution-hooks.mjs +50 -1
- package/apps/server/src/host-resolution.ts +26 -1
- package/apps/server/src/host-version.ts +41 -0
- package/apps/server/src/host-web.ts +59 -0
- package/apps/server/src/layout.ts +1 -1
- package/apps/server/src/main.ts +3 -2
- package/apps/server/src/missing-environment.ts +47 -0
- package/apps/server/src/parent-watch.ts +37 -0
- package/apps/server/src/plugin-build/build.ts +650 -0
- package/apps/server/src/plugin-build/host-api-names.ts +185 -0
- package/apps/server/src/plugin-build/plugin-description.ts +118 -0
- package/apps/server/src/plugin-build/typecheck.ts +66 -0
- package/{plugins/ragents.actor-programs/server → apps/server/src/plugin-support/actor-programs}/app-project.ts +16 -15
- package/{plugins/ragents.actor-programs/server → apps/server/src/plugin-support/actor-programs}/client-compiler.ts +4 -4
- package/{plugins/ragents.actor-programs/server → apps/server/src/plugin-support/actor-programs}/client-contracts.ts +4 -4
- package/apps/server/src/plugin-support/actor-programs/client-runtime.ts +27 -0
- package/{plugins/ragents.actor-programs → apps/server/src/plugin-support/actor-programs}/contract.ts +3 -3
- package/apps/server/src/plugin-support/actor-programs/service.ts +1 -1
- package/{plugins/ragents.actor-programs/server → apps/server/src/plugin-support/actor-programs}/tailwind.ts +2 -3
- package/{plugins/ragents.actor-programs → apps/server/src/plugin-support/actor-programs}/workflow/index.ts +48 -48
- package/apps/server/src/plugin-support/agent-tool.ts +10 -5
- package/apps/server/src/plugin-support/http.ts +1 -1
- package/apps/server/src/plugin-support/language-server/contract.ts +37 -6
- package/apps/server/src/plugin-support/language-server/plugin.ts +18 -8
- package/apps/server/src/plugin-support/language-server/snapshot-method.ts +32 -7
- package/apps/server/src/plugin-support/language-server/tools.ts +59 -15
- package/apps/server/src/plugin-support/model-aliases.ts +77 -0
- package/apps/server/src/plugin-support/model-choice.ts +17 -7
- package/apps/server/src/plugin-support/model-completion.ts +58 -0
- package/apps/server/src/plugin-support/model-upstreams.ts +2 -2
- package/apps/server/src/plugin-support/native-typescript-executor.ts +10 -7
- package/apps/server/src/plugin-support/plugin-config.ts +1 -1
- package/apps/server/src/plugin-support/plugin-folder.ts +4 -1
- package/apps/server/src/plugin-support/plugin-module.ts +1 -1
- package/apps/server/src/plugin-support/plugins-root.ts +6 -10
- package/apps/server/src/plugin-support/process-sandbox.ts +312 -0
- package/apps/server/src/plugin-support/product-model-settings-contract.ts +14 -5
- package/apps/server/src/plugin-support/product-model-settings.ts +10 -9
- package/{plugins/ragents.product/server/relay.ts → apps/server/src/plugin-support/product-relay.ts} +2 -2
- package/apps/server/src/plugin-support/product-start-options.ts +8 -3
- package/apps/server/src/plugin-support/prompt.ts +1 -1
- package/apps/server/src/plugin-support/provision.ts +6 -0
- package/apps/server/src/plugin-support/run-scripts.ts +16 -2
- package/apps/server/src/plugin-support/skills.ts +32 -16
- package/apps/server/src/plugin-support/start-entries-contract.ts +12 -3
- package/apps/server/src/plugin-support/start-options-contract.ts +5 -1
- package/apps/server/src/plugin-support/thinking-level.ts +6 -1
- package/apps/server/src/plugin-support/tool-availability.ts +1 -7
- package/apps/server/src/plugin-support/workspace-ownership.ts +12 -6
- package/apps/server/src/plugin-support/workspace-sandbox-host.ts +184 -37
- package/apps/server/src/profile/bundle-manifest.ts +183 -0
- package/apps/server/src/profile/compose.ts +19 -10
- package/apps/server/src/profile/plugin-discovery.ts +98 -46
- package/apps/server/src/profile/provisioning.ts +30 -26
- package/apps/server/src/profile-target.ts +3 -0
- package/apps/server/src/provider.ts +182 -99
- package/apps/server/src/ragents/actor-chat-history.ts +23 -22
- package/apps/server/src/ragents/chat-projection.ts +25 -14
- package/apps/server/src/ragents/chat-text-positions.ts +4 -4
- package/apps/server/src/ragents/coordinator.ts +27 -1
- package/apps/server/src/ragents/document-store.ts +1 -1
- package/apps/server/src/ragents/engine.ts +69 -36
- package/apps/server/src/ragents/global-chat.ts +26 -13
- package/apps/server/src/ragents/host-services.ts +15 -6
- package/apps/server/src/ragents/journal-chat-events.ts +31 -15
- package/apps/server/src/ragents/product-runtime.ts +1 -1
- package/apps/server/src/ragents/run-owner.ts +17 -0
- package/apps/server/src/ragents/runtime-bridge.ts +1 -1
- package/apps/server/src/ragents/session.ts +181 -82
- package/apps/server/src/ragents/start-option-state.ts +1 -1
- package/apps/server/src/ragents/typescript-tools.ts +35 -27
- package/apps/server/src/ragents/workspace-runtime.ts +74 -8
- package/apps/server/src/rpc/dispatcher.ts +17 -8
- package/apps/server/src/rpc/http-transport.ts +1 -3
- package/apps/server/src/rpc/stdio-transport.ts +1 -1
- package/apps/server/src/run-preparation-contract.ts +1 -1
- package/apps/server/src/run-preparation-input.ts +1 -1
- package/apps/server/src/run-preparation.ts +13 -20
- package/apps/server/src/run-transfer.ts +2 -2
- package/apps/server/src/server.ts +112 -33
- package/apps/server/src/settings.ts +7 -8
- package/apps/server/src/title-compactor.ts +5 -8
- package/apps/server/src/title-settings.ts +3 -3
- package/apps/server/src/web-bundles.ts +79 -0
- package/apps/server/src/web-stylesheet.ts +85 -0
- package/apps/server/tsconfig.json +4 -4
- package/apps/server/tsconfig.plugin.json +58 -0
- package/apps/web/dist/assets/highlighted-body-KPVGNVTW-B9qYBARS.js +1 -0
- package/apps/web/dist/assets/main-BCjvD2Hh.js +6 -0
- package/apps/web/dist/assets/mermaid-HWGCJPDP-BPn4aV2r.css +1 -0
- package/apps/web/dist/assets/mermaid-HWGCJPDP-CvYYFK_n.js +478 -0
- package/apps/web/dist/assets/runPanel-CG7kRMJh.js +21 -0
- package/apps/web/dist/help/guide-access.html +199 -0
- package/apps/web/dist/help/guide-access.md +84 -0
- package/apps/web/dist/help/guide-clients.html +421 -0
- package/apps/web/dist/help/guide-clients.md +336 -0
- package/apps/web/dist/help/guide-distributed.html +320 -0
- package/apps/web/dist/help/guide-distributed.md +225 -0
- package/apps/web/dist/help/guide-functions.html +231 -0
- package/apps/web/dist/help/guide-functions.md +127 -0
- package/apps/web/dist/help/guide-getting-started.html +230 -0
- package/apps/web/dist/help/guide-getting-started.md +123 -0
- package/apps/web/dist/help/guide-ideas.html +183 -0
- package/apps/web/dist/help/guide-ideas.md +71 -0
- package/apps/web/dist/help/guide-plugins.html +450 -0
- package/apps/web/dist/help/guide-plugins.md +341 -0
- package/apps/web/dist/help/guide-programs.html +359 -0
- package/apps/web/dist/help/guide-programs.md +271 -0
- package/apps/web/dist/help/guide-runtime.html +338 -0
- package/apps/web/dist/help/guide-runtime.md +225 -0
- package/apps/web/dist/help/guide.html +133 -0
- package/apps/web/dist/help/guide.md +13 -0
- package/apps/web/dist/help/homepage-bullets.js +12 -0
- package/apps/web/dist/help/homepage-distributed.js +261 -0
- package/apps/web/dist/help/homepage-plugins.js +30 -0
- package/apps/web/dist/help/homepage-scenes.js +368 -0
- package/apps/web/dist/help/homepage-stickers.js +69 -0
- package/apps/web/dist/help/homepage-story-nav.js +11 -0
- package/apps/web/dist/help/homepage-subnav.js +61 -0
- package/apps/web/dist/help/homepage.css +833 -0
- package/apps/web/dist/help/index.html +1167 -0
- package/apps/web/dist/help/mini-app.css +7056 -0
- package/apps/web/dist/help/mini-app.html +15 -0
- package/apps/web/dist/help/mini-app.js +131 -0
- package/apps/web/dist/help/screenshots/release-checklist-vscode.png +0 -0
- package/apps/web/dist/help/screenshots/release-checklist-web.png +0 -0
- package/apps/web/dist/help/scroll-vendor.js +73 -0
- package/apps/web/dist/help/site.css +63 -0
- package/apps/web/dist/help/site.js +103 -0
- package/apps/web/dist/host-web.json +143 -0
- package/apps/web/dist/index.html +15 -0
- package/apps/web/dist/run-panel.html +15 -0
- package/apps/web/package.json +2 -2
- package/apps/web/src/App.tsx +8 -6
- package/apps/web/src/Overview.tsx +5 -5
- package/apps/web/src/PluginActivation.ts +25 -5
- package/apps/web/src/PluginChat.tsx +163 -129
- package/apps/web/src/PluginFailureNotice.tsx +15 -0
- package/apps/web/src/PluginRegistry.tsx +106 -68
- package/apps/web/src/RunPreparationChat.tsx +40 -28
- package/apps/web/src/RunStore.ts +2 -2
- package/apps/web/src/SettingsModal.tsx +37 -37
- package/apps/web/src/StartOptions.tsx +81 -26
- package/apps/web/src/StartSelection.tsx +111 -0
- package/apps/web/src/StartTiles.tsx +73 -0
- package/apps/web/src/{CanvasShortcuts.tsx → SurfaceShortcuts.tsx} +2 -2
- package/apps/web/src/ThemeSettings.tsx +1 -1
- package/apps/web/src/WorkspacePanel.tsx +4 -4
- package/apps/web/src/access-session.ts +4 -1
- package/{plugins/ragents.orchestration/web → apps/web/src}/actor-conversation.ts +3 -3
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/DataTable.tsx +9 -9
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/FilePicker.tsx +4 -4
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/FlowDiagram.tsx +16 -14
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/FlowDiagramRenderer.tsx +3 -3
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/Form.tsx +12 -12
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/Layout.tsx +1 -1
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/MessageList.tsx +5 -5
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/Viewers.tsx +8 -7
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/WorkflowDiagram.tsx +1 -1
- package/apps/web/src/actor-programs/client-ui/chat-contracts.d.ts +64 -0
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/contracts.d.ts +2 -2
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/file-selection.ts +5 -5
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/index.tsx +22 -16
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/layout-contracts.d.ts +1 -1
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/message-list-contracts.d.ts +2 -2
- package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/workflow-diagram-contracts.d.ts +1 -1
- package/apps/web/src/api.ts +43 -22
- package/apps/web/src/chat/QuasselHost.tsx +12 -0
- package/apps/web/src/chat/StoppedActorNotice.tsx +39 -0
- package/apps/web/src/chat/chat-target.ts +14 -5
- package/apps/web/src/chat/requests.ts +13 -5
- package/apps/web/src/chat/useAttachmentCapabilities.ts +2 -2
- package/apps/web/src/chat/useChat.ts +8 -7
- package/apps/web/src/chat/user-location.ts +1 -1
- package/apps/web/src/chat-view-settings.tsx +49 -0
- package/apps/web/src/host-modules.ts +90 -0
- package/apps/web/src/language-server/api.ts +24 -0
- package/{plugins/ragents.lsp-roslyn/web → apps/web/src/language-server}/language-server-plugin.tsx +133 -6
- package/apps/web/src/main.tsx +4 -2
- package/apps/web/src/offered-machines.ts +11 -0
- package/apps/web/src/panel/ConnectionsPage.tsx +117 -0
- package/apps/web/src/panel/LoginForm.tsx +9 -9
- package/apps/web/src/panel/PanelDialogs.tsx +44 -27
- package/apps/web/src/panel/PanelHeader.tsx +11 -0
- package/apps/web/src/panel/PanelPage.tsx +8 -5
- package/apps/web/src/panel/RunLine.tsx +48 -0
- package/apps/web/src/panel/RunsPage.tsx +84 -0
- package/apps/web/src/panel/StartPage.tsx +163 -0
- package/apps/web/src/panel/connection-state.ts +40 -0
- package/apps/web/src/panel/contract.ts +64 -21
- package/apps/web/src/panel/page-props.ts +6 -0
- package/apps/web/src/plugin-bootstrap.ts +60 -31
- package/{plugins/ragents.product/web → apps/web/src/product}/ModelControl.tsx +3 -3
- package/{plugins/ragents.product/web → apps/web/src/product}/ProductModelSettings.tsx +7 -7
- package/{plugins/ragents.product/web → apps/web/src/product}/SystemPromptControl.tsx +3 -3
- package/{plugins/ragents.product/web → apps/web/src/product}/model-settings.ts +3 -3
- package/{plugins/ragents.product/web → apps/web/src/product}/start-options.tsx +2 -2
- package/apps/web/src/rpc/client.ts +28 -6
- package/apps/web/src/run-panel/RunPanelApp.tsx +334 -0
- package/apps/web/src/{column/ColumnRunHeader.tsx → run-panel/RunPanelHeader.tsx} +2 -2
- package/apps/web/src/{column/ColumnMenu.tsx → run-panel/RunPanelMenu.tsx} +4 -4
- package/apps/web/src/run-panel/RunPanelRail.tsx +38 -0
- package/apps/web/src/run-panel/RunPanelWorkspace.tsx +55 -0
- package/apps/web/src/{column → run-panel}/clipboard.ts +21 -10
- package/apps/web/src/run-panel/host-contract.ts +123 -0
- package/apps/web/src/{column → run-panel}/host.ts +31 -23
- package/apps/web/src/run-panel/input-bridge.ts +75 -0
- package/apps/web/src/run-panel/keyboard.ts +53 -0
- package/apps/web/src/run-panel/run-panel-location.ts +35 -0
- package/apps/web/src/{column → run-panel}/use-session-list.ts +3 -3
- package/apps/web/src/run-panel/workspace-state.ts +43 -0
- package/apps/web/src/{column.tsx → run-panel.tsx} +20 -13
- package/apps/web/src/run-preparation.ts +1 -1
- package/{plugins/ragents.orchestration/web → apps/web/src}/run-view.ts +25 -7
- package/apps/web/src/settings-contributions.ts +16 -18
- package/apps/web/src/title-model-settings.ts +1 -1
- package/apps/web/src/toolLine.ts +1 -1
- package/apps/web/src/ui/ListDetail.tsx +1 -1
- package/apps/web/src/ui/dialog.tsx +5 -5
- package/apps/web/src/ui/frame.css +1 -0
- package/apps/web/src/ui/index.ts +5 -0
- package/apps/web/src/ui/popover.tsx +2 -2
- package/apps/web/src/ui/quassel.css +41 -0
- package/apps/web/src/ui/relative-time.ts +36 -0
- package/apps/web/src/ui/startup-notice.tsx +22 -0
- package/apps/web/src/ui/state-icon.tsx +60 -0
- package/apps/web/src/ui/state-vocabulary.ts +31 -0
- package/apps/web/src/ui/stop-button.tsx +22 -0
- package/apps/web/src/ui/tailwind.css +2 -3
- package/apps/web/src/ui/theme.css +19 -19
- package/apps/web/tsconfig.json +4 -5
- package/apps/web/tsconfig.plugin.json +44 -0
- package/bundles/ragents.activity/ragents-bundle.json +38 -0
- package/bundles/ragents.activity/server/index.js +14 -0
- package/bundles/ragents.activity/server/index.js.map +7 -0
- package/bundles/ragents.activity/web/classes.json +1 -0
- package/bundles/ragents.activity/web/index.js +2 -0
- package/bundles/ragents.activity/web/index.js.map +7 -0
- package/bundles/ragents.actor-programs/prompt.hbs +80 -0
- package/bundles/ragents.actor-programs/ragents-bundle.json +214 -0
- package/bundles/ragents.actor-programs/server/index.js +2071 -0
- package/bundles/ragents.actor-programs/server/index.js.map +7 -0
- package/bundles/ragents.actor-programs/summary.hbs +17 -0
- package/bundles/ragents.actor-programs/web/classes.json +1 -0
- package/bundles/ragents.actor-programs/web/index.js +27 -0
- package/bundles/ragents.actor-programs/web/index.js.map +7 -0
- package/bundles/ragents.ask/ask.hbs +4 -0
- package/bundles/ragents.ask/ragents-bundle.json +97 -0
- package/bundles/ragents.ask/server/chunks/chunk-PDJO75SQ.js +13 -0
- package/bundles/ragents.ask/server/chunks/chunk-PDJO75SQ.js.map +7 -0
- package/bundles/ragents.ask/server/exports/server/contract.js +11 -0
- package/bundles/ragents.ask/server/exports/server/contract.js.map +7 -0
- package/bundles/ragents.ask/server/index.js +279 -0
- package/bundles/ragents.ask/server/index.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/chunk-4VXWWEG7.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-4VXWWEG7.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/chunk-HGFDGTNC.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-HGFDGTNC.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/chunk-V7W3QDVS.js +25 -0
- package/bundles/ragents.ask/web/chunks/chunk-V7W3QDVS.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/chunk-VUBJDIKQ.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-VUBJDIKQ.js.map +7 -0
- package/bundles/ragents.ask/web/classes.json +1 -0
- package/bundles/ragents.ask/web/exports/ask-payload.js +2 -0
- package/bundles/ragents.ask/web/exports/ask-payload.js.map +7 -0
- package/bundles/ragents.ask/web/exports/web/QuestionCard.js +2 -0
- package/bundles/ragents.ask/web/exports/web/QuestionCard.js.map +7 -0
- package/bundles/ragents.ask/web/exports/web/api.js +2 -0
- package/bundles/ragents.ask/web/exports/web/api.js.map +7 -0
- package/bundles/ragents.ask/web/index.js +2 -0
- package/bundles/ragents.ask/web/index.js.map +7 -0
- package/bundles/ragents.browser/ragents-bundle.json +53 -0
- package/bundles/ragents.browser/server/chunks/chunk-2GKLLCBE.js +11 -0
- package/bundles/ragents.browser/server/chunks/chunk-2GKLLCBE.js.map +7 -0
- package/bundles/ragents.browser/server/exports/server/contract.js +9 -0
- package/bundles/ragents.browser/server/exports/server/contract.js.map +7 -0
- package/bundles/ragents.browser/server/index.js +479 -0
- package/bundles/ragents.browser/server/index.js.map +7 -0
- package/bundles/ragents.browser/skills/browser-testing/SKILL.md +38 -0
- package/bundles/ragents.documents/prompt.hbs +18 -0
- package/bundles/ragents.documents/ragents-bundle.json +120 -0
- package/bundles/ragents.documents/server/chunks/chunk-QIECRZ7C.js +37 -0
- package/bundles/ragents.documents/server/chunks/chunk-QIECRZ7C.js.map +7 -0
- package/bundles/ragents.documents/server/exports/contract.js +11 -0
- package/bundles/ragents.documents/server/exports/contract.js.map +7 -0
- package/bundles/ragents.documents/server/index.js +290 -0
- package/bundles/ragents.documents/server/index.js.map +7 -0
- package/bundles/ragents.documents/web/classes.json +1 -0
- package/bundles/ragents.documents/web/index.js +26 -0
- package/bundles/ragents.documents/web/index.js.map +7 -0
- package/bundles/ragents.lsp-fsharp/ragents-bundle.json +49 -0
- package/bundles/ragents.lsp-fsharp/server/index.js +82 -0
- package/bundles/ragents.lsp-fsharp/server/index.js.map +7 -0
- package/bundles/ragents.lsp-fsharp/web/classes.json +1 -0
- package/bundles/ragents.lsp-fsharp/web/index.js +2 -0
- package/bundles/ragents.lsp-fsharp/web/index.js.map +7 -0
- package/bundles/ragents.lsp-roslyn/ragents-bundle.json +61 -0
- package/bundles/ragents.lsp-roslyn/server/index.js +208 -0
- package/bundles/ragents.lsp-roslyn/server/index.js.map +7 -0
- package/bundles/ragents.lsp-roslyn/web/classes.json +1 -0
- package/bundles/ragents.lsp-roslyn/web/index.js +2 -0
- package/bundles/ragents.lsp-roslyn/web/index.js.map +7 -0
- package/bundles/ragents.lsp-typescript/ragents-bundle.json +36 -0
- package/bundles/ragents.lsp-typescript/server/index.js +13 -0
- package/bundles/ragents.lsp-typescript/server/index.js.map +7 -0
- package/bundles/ragents.lsp-typescript/web/classes.json +1 -0
- package/bundles/ragents.lsp-typescript/web/index.js +2 -0
- package/bundles/ragents.lsp-typescript/web/index.js.map +7 -0
- package/bundles/ragents.model-relay/ragents-bundle.json +33 -0
- package/bundles/ragents.model-relay/server/index.js +230 -0
- package/bundles/ragents.model-relay/server/index.js.map +7 -0
- package/bundles/ragents.orchestration/orchestration.hbs +106 -0
- package/bundles/ragents.orchestration/ragents-bundle.json +194 -0
- package/bundles/ragents.orchestration/server/index.js +277 -0
- package/bundles/ragents.orchestration/server/index.js.map +7 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-ODMMQGX2.js +2 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-ODMMQGX2.js.map +7 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-OQYCNYXN.js +2 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-OQYCNYXN.js.map +7 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-OSKPH6SZ.js +2 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-OSKPH6SZ.js.map +7 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-XGPPQCZR.js +2 -0
- package/bundles/ragents.orchestration/web/chunks/chunk-XGPPQCZR.js.map +7 -0
- package/bundles/ragents.orchestration/web/classes.json +1 -0
- package/bundles/ragents.orchestration/web/exports/web/program-slot.js +2 -0
- package/bundles/ragents.orchestration/web/exports/web/program-slot.js.map +7 -0
- package/bundles/ragents.orchestration/web/exports/web/surface-entities.js +2 -0
- package/bundles/ragents.orchestration/web/exports/web/surface-entities.js.map +7 -0
- package/bundles/ragents.orchestration/web/exports/web/tile-docking.js +2 -0
- package/bundles/ragents.orchestration/web/exports/web/tile-docking.js.map +7 -0
- package/bundles/ragents.orchestration/web/index.js +51 -0
- package/bundles/ragents.orchestration/web/index.js.map +7 -0
- package/bundles/ragents.overseer/ragents-bundle.json +144 -0
- package/bundles/ragents.overseer/server/index.js +652 -0
- package/bundles/ragents.overseer/server/index.js.map +7 -0
- package/bundles/ragents.overseer/web/classes.json +1 -0
- package/bundles/ragents.overseer/web/index.js +25 -0
- package/bundles/ragents.overseer/web/index.js.map +7 -0
- package/bundles/ragents.processes/ragents-bundle.json +93 -0
- package/bundles/ragents.processes/server/index.js +204 -0
- package/bundles/ragents.processes/server/index.js.map +7 -0
- package/bundles/ragents.processes/web/classes.json +1 -0
- package/bundles/ragents.processes/web/index.js +4 -0
- package/bundles/ragents.processes/web/index.js.map +7 -0
- package/bundles/ragents.product/preamble.hbs +9 -0
- package/bundles/ragents.product/ragents-bundle.json +93 -0
- package/bundles/ragents.product/server/index.js +208 -0
- package/bundles/ragents.product/server/index.js.map +7 -0
- package/bundles/ragents.product/web/classes.json +1 -0
- package/bundles/ragents.product/web/index.js +2 -0
- package/bundles/ragents.product/web/index.js.map +7 -0
- package/bundles/ragents.profile-distribution/ragents-bundle.json +64 -0
- package/bundles/ragents.profile-distribution/server/index.js +241 -0
- package/bundles/ragents.profile-distribution/server/index.js.map +7 -0
- package/bundles/ragents.reference/ragents-bundle.json +39 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/RUN.md +27 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +10 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/client.tsx +80 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/conversation.ts +82 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/tests/conversation.test.ts +154 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/package.json +9 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/src/server.ts +32 -0
- package/bundles/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +59 -0
- package/bundles/ragents.reference/run-scripts/conversation-circle/RUN.md +13 -0
- package/bundles/ragents.reference/run-scripts/conversation-circle/package.json +9 -0
- package/bundles/ragents.reference/run-scripts/conversation-circle/src/server.ts +81 -0
- package/bundles/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +26 -0
- package/bundles/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +34 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/RUN.md +24 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/package.json +10 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/experiment.md +1 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/helper.md +5 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/quiz.md +1 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/client.tsx +27 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/server.ts +137 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/state.ts +38 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/view.tsx +42 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/workflow.ts +38 -0
- package/bundles/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +218 -0
- package/bundles/ragents.reference/run-scripts/moderated-round/RUN.md +12 -0
- package/bundles/ragents.reference/run-scripts/moderated-round/package.json +9 -0
- package/bundles/ragents.reference/run-scripts/moderated-round/src/server.ts +60 -0
- package/bundles/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +26 -0
- package/bundles/ragents.reference/run-scripts/moderated-round/tests/program.test.ts +24 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/RUN.md +18 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/package.json +16 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/client.tsx +39 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/contract.ts +15 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/server.ts +14 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/tests/program.test.ts +13 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/package.json +9 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/src/server.ts +65 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +26 -0
- package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/program.test.ts +42 -0
- package/bundles/ragents.reference/run-scripts/word-game/RUN.md +25 -0
- package/bundles/ragents.reference/run-scripts/word-game/package.json +11 -0
- package/bundles/ragents.reference/run-scripts/word-game/src/client.tsx +27 -0
- package/bundles/ragents.reference/run-scripts/word-game/src/contract.ts +23 -0
- package/bundles/ragents.reference/run-scripts/word-game/src/server.ts +105 -0
- package/bundles/ragents.reference/run-scripts/word-game/src/state.ts +22 -0
- package/bundles/ragents.reference/run-scripts/word-game/src/view.tsx +54 -0
- package/bundles/ragents.reference/run-scripts/word-game/tests/program.test.ts +252 -0
- package/bundles/ragents.reference/server/index.js +16 -0
- package/bundles/ragents.reference/server/index.js.map +7 -0
- package/bundles/ragents.reference/skills/100-shared-actor-list/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/110-all-card-slots/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/150-editorial-workbench/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/160-learning-companion/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/170-photo-collection/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/180-decision-workbench/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/190-review-queue/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/20-circle-of-four/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/200-typescript-diagnostics/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/210-moderator-handover/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/220-actor-approval-list/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/230-shared-state-views/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/240-live-result-list/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/250-balcony-wizard/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/30-llm-without-runtime-knowledge/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/35-actor-input-fifo/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/40-subscription-matrix/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/50-subscription-removal/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/60-stop-in-the-circle/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/65-artifact-least-privilege/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/70-headless-counter/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/75-lsp-demo/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/80-actor-text-analysis/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/90-actor-notes/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/95-hello-world/SKILL.md +12 -0
- package/bundles/ragents.reference/skills/decision-brief/SKILL.md +33 -0
- package/bundles/ragents.reference/skills/learning-sprint/SKILL.md +33 -0
- package/bundles/ragents.reference/web/classes.json +1 -0
- package/bundles/ragents.reference/web/index.js +2 -0
- package/bundles/ragents.reference/web/index.js.map +7 -0
- package/bundles/ragents.todo/ragents-bundle.json +48 -0
- package/bundles/ragents.todo/server/index.js +108 -0
- package/bundles/ragents.todo/server/index.js.map +7 -0
- package/bundles/ragents.todo/web/classes.json +1 -0
- package/bundles/ragents.todo/web/index.js +2 -0
- package/bundles/ragents.todo/web/index.js.map +7 -0
- package/bundles/ragents.transcript/ragents-bundle.json +34 -0
- package/bundles/ragents.transcript/server/index.js +102 -0
- package/bundles/ragents.transcript/server/index.js.map +7 -0
- package/bundles/ragents.watch/ragents-bundle.json +39 -0
- package/bundles/ragents.watch/server/chunks/chunk-FHAM6OML.js +11 -0
- package/bundles/ragents.watch/server/chunks/chunk-FHAM6OML.js.map +7 -0
- package/bundles/ragents.watch/server/chunks/chunk-RPBX3J4P.js +10 -0
- package/bundles/ragents.watch/server/chunks/chunk-RPBX3J4P.js.map +7 -0
- package/bundles/ragents.watch/server/exports/contract.js +9 -0
- package/bundles/ragents.watch/server/exports/contract.js.map +7 -0
- package/bundles/ragents.watch/server/exports/server/contract.js +9 -0
- package/bundles/ragents.watch/server/exports/server/contract.js.map +7 -0
- package/bundles/ragents.watch/server/index.js +482 -0
- package/bundles/ragents.watch/server/index.js.map +7 -0
- package/bundles/ragents.workspace/prompt.hbs +7 -0
- package/bundles/ragents.workspace/ragents-bundle.json +148 -0
- package/bundles/ragents.workspace/server/index.js +1049 -0
- package/bundles/ragents.workspace/server/index.js.map +7 -0
- package/bundles/ragents.workspace/web/classes.json +1 -0
- package/bundles/ragents.workspace/web/index.js +39 -0
- package/bundles/ragents.workspace/web/index.js.map +7 -0
- package/package.json +5 -16
- package/packages/agent/dist/core/agent-session-runtime.d.ts +33 -0
- package/packages/agent/dist/core/agent-session-services.d.ts +35 -0
- package/packages/agent/dist/core/agent-session.d.ts +234 -0
- package/packages/agent/dist/core/agent-settings.d.ts +27 -0
- package/packages/agent/dist/core/auth-guidance.d.ts +4 -0
- package/packages/agent/dist/core/compaction/compaction.d.ts +116 -0
- package/packages/agent/dist/core/compaction/index.d.ts +6 -0
- package/packages/agent/dist/core/compaction/utils.d.ts +39 -0
- package/packages/agent/dist/core/defaults.d.ts +3 -0
- package/packages/agent/dist/core/extensions/index.d.ts +11 -0
- package/packages/agent/dist/core/extensions/loader.d.ts +12 -0
- package/packages/agent/dist/core/extensions/runner.d.ts +39 -0
- package/packages/agent/dist/core/extensions/types.d.ts +156 -0
- package/packages/agent/dist/core/extensions/wrapper.d.ts +12 -0
- package/packages/agent/dist/core/messages.d.ts +37 -0
- package/packages/agent/dist/core/model-runtime.d.ts +32 -0
- package/packages/agent/dist/core/provider-composer.d.ts +25 -0
- package/packages/agent/dist/core/resource-loader.d.ts +39 -0
- package/packages/agent/dist/core/sdk.d.ts +38 -0
- package/packages/agent/dist/core/session-manager.d.ts +189 -0
- package/packages/agent/dist/core/skills.d.ts +20 -0
- package/packages/agent/dist/core/source-info.d.ts +16 -0
- package/packages/agent/dist/core/system-prompt.d.ts +21 -0
- package/packages/agent/dist/core/tools/bash.d.ts +63 -0
- package/packages/agent/dist/core/tools/edit-diff.d.ts +98 -0
- package/packages/agent/dist/core/tools/edit.d.ts +41 -0
- package/packages/agent/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/packages/agent/dist/core/tools/index.d.ts +5 -0
- package/packages/agent/dist/core/tools/output-accumulator.d.ts +58 -0
- package/packages/agent/dist/core/tools/path-utils.d.ts +8 -0
- package/packages/agent/dist/core/tools/read.d.ts +33 -0
- package/packages/agent/dist/core/tools/truncate.d.ts +61 -0
- package/packages/agent/dist/core/tools/write.d.ts +23 -0
- package/packages/agent/dist/index.d.ts +13 -0
- package/packages/agent/dist/loop/agent-loop.d.ts +13 -0
- package/packages/agent/dist/loop/agent.d.ts +103 -0
- package/packages/agent/dist/loop/index.d.ts +5 -0
- package/packages/agent/dist/loop/types.d.ts +333 -0
- package/packages/agent/dist/loop/uuid.d.ts +2 -0
- package/packages/agent/dist/utils/child-process.d.ts +17 -0
- package/packages/agent/dist/utils/exif-orientation.d.ts +5 -0
- package/packages/agent/dist/utils/frontmatter.d.ts +8 -0
- package/packages/agent/dist/utils/image-convert.d.ts +2 -0
- package/packages/agent/dist/utils/image-process.d.ts +18 -0
- package/packages/agent/dist/utils/image-resize-core.d.ts +30 -0
- package/packages/agent/dist/utils/image-resize-worker.d.ts +2 -0
- package/packages/agent/dist/utils/image-resize.d.ts +16 -0
- package/packages/agent/dist/utils/mime.d.ts +3 -0
- package/packages/agent/dist/utils/paths.d.ts +15 -0
- package/packages/agent/dist/utils/photon.d.ts +21 -0
- package/packages/agent/dist/utils/shell.d.ts +17 -0
- package/packages/agent/dist/utils/sleep.d.ts +5 -0
- package/packages/agent/package.json +3 -32
- package/packages/agent/src/core/agent-session-runtime.ts +15 -469
- package/packages/agent/src/core/agent-session-services.ts +17 -167
- package/packages/agent/src/core/agent-session.ts +154 -2403
- package/packages/agent/src/core/agent-settings.ts +20 -0
- package/packages/agent/src/core/auth-guidance.ts +0 -4
- package/packages/agent/src/core/compaction/compaction.ts +4 -33
- package/packages/agent/src/core/compaction/index.ts +0 -1
- package/packages/agent/src/core/compaction/utils.ts +2 -2
- package/packages/agent/src/core/defaults.ts +1 -1
- package/packages/agent/src/core/extensions/index.ts +6 -117
- package/packages/agent/src/core/extensions/loader.ts +21 -605
- package/packages/agent/src/core/extensions/runner.ts +48 -969
- package/packages/agent/src/core/extensions/types.ts +35 -1298
- package/packages/agent/src/core/extensions/wrapper.ts +13 -34
- package/packages/agent/src/core/messages.ts +5 -109
- package/packages/agent/src/core/model-runtime.ts +109 -467
- package/packages/agent/src/core/provider-composer.ts +21 -451
- package/packages/agent/src/core/resource-loader.ts +18 -822
- package/packages/agent/src/core/sdk.ts +46 -281
- package/packages/agent/src/core/session-manager.ts +11 -891
- package/packages/agent/src/core/skills.ts +8 -440
- package/packages/agent/src/core/source-info.ts +0 -12
- package/packages/agent/src/core/system-prompt.ts +2 -41
- package/packages/agent/src/core/tools/bash.ts +20 -32
- package/packages/agent/src/core/tools/edit-diff.ts +0 -60
- package/packages/agent/src/core/tools/edit.ts +2 -18
- package/packages/agent/src/core/tools/index.ts +4 -130
- package/packages/agent/src/core/tools/output-accumulator.ts +33 -5
- package/packages/agent/src/core/tools/path-utils.ts +2 -49
- package/packages/agent/src/core/tools/read.ts +4 -12
- package/packages/agent/src/core/tools/truncate.ts +0 -15
- package/packages/agent/src/core/tools/write.ts +1 -8
- package/packages/agent/src/index.ts +11 -272
- package/packages/{agent-core/src → agent/src/loop}/agent-loop.ts +127 -273
- package/packages/{agent-core/src → agent/src/loop}/agent.ts +12 -164
- package/packages/{agent-core/src → agent/src/loop}/types.ts +6 -105
- package/packages/agent/src/utils/child-process.ts +0 -13
- package/packages/agent/src/utils/image-convert.ts +0 -25
- package/packages/agent/src/utils/paths.ts +1 -71
- package/packages/agent/src/utils/shell.ts +13 -156
- package/packages/ai/dist/api/ai-sdk-messages.d.ts +9 -0
- package/packages/ai/dist/api/ai-sdk-transport.d.ts +13 -0
- package/packages/ai/dist/api/ai-sdk.d.ts +13 -0
- package/packages/ai/dist/api/ai-sdk.lazy.d.ts +3 -0
- package/packages/ai/dist/api/lazy.d.ts +15 -0
- package/packages/ai/dist/api/simple-options.d.ts +4 -0
- package/packages/ai/dist/api/transform-messages.d.ts +8 -0
- package/packages/ai/dist/api-registry.d.ts +25 -0
- package/packages/ai/dist/auth/context.d.ts +4 -0
- package/packages/ai/dist/auth/helpers.d.ts +4 -0
- package/packages/ai/dist/auth/resolve.d.ts +19 -0
- package/packages/ai/dist/auth/types.d.ts +51 -0
- package/packages/ai/dist/env-api-keys.d.ts +8 -0
- package/packages/ai/dist/index.d.ts +19 -0
- package/packages/ai/dist/models.d.ts +71 -0
- package/packages/ai/dist/models.generated.d.ts +8021 -0
- package/packages/ai/dist/providers/all.d.ts +15 -0
- package/packages/ai/dist/providers/faux.d.ts +97 -0
- package/packages/ai/dist/providers/openrouter.d.ts +3 -0
- package/packages/ai/dist/providers/openrouter.models.d.ts +8019 -0
- package/packages/ai/dist/types.d.ts +541 -0
- package/packages/ai/dist/utils/diagnostics.d.ts +13 -0
- package/packages/ai/dist/utils/error-body.d.ts +25 -0
- package/packages/ai/dist/utils/estimate.d.ts +17 -0
- package/packages/ai/dist/utils/event-stream.d.ts +21 -0
- package/packages/ai/dist/utils/headers.d.ts +2 -0
- package/packages/ai/dist/utils/json-parse.d.ts +16 -0
- package/packages/ai/dist/utils/overflow.d.ts +54 -0
- package/packages/ai/dist/utils/provider-env.d.ts +7 -0
- package/packages/ai/dist/utils/retry.d.ts +12 -0
- package/packages/ai/dist/utils/sanitize-unicode.d.ts +22 -0
- package/packages/ai/dist/utils/typebox-helpers.d.ts +17 -0
- package/packages/ai/dist/utils/validation.d.ts +10 -0
- package/packages/ai/package.json +2 -6
- package/packages/ai/src/api/ai-sdk-transport.ts +2 -2
- package/packages/ai/src/api/simple-options.ts +0 -34
- package/packages/ai/src/api-registry.ts +1 -12
- package/packages/ai/src/auth/context.ts +1 -30
- package/packages/ai/src/auth/helpers.ts +3 -34
- package/packages/ai/src/auth/resolve.ts +10 -108
- package/packages/ai/src/auth/types.ts +9 -176
- package/packages/ai/src/index.ts +1 -13
- package/packages/ai/src/models.ts +41 -407
- package/packages/ai/src/providers/all.ts +3 -31
- package/packages/ai/src/providers/openrouter.models.ts +14 -0
- package/packages/ai/src/types.ts +0 -104
- package/packages/ai/src/utils/diagnostics.ts +0 -32
- package/packages/ai/src/utils/headers.ts +0 -11
- package/packages/ai/src/utils/overflow.ts +0 -7
- package/packages/ai/src/utils/validation.ts +0 -15
- package/packages/ragents/package.json +3 -6
- package/packages/ragents/src/access.ts +2 -1
- package/packages/ragents/src/agents/actor-input.ts +14 -18
- package/packages/ragents/src/agents/catalog.ts +3 -3
- package/packages/ragents/src/agents/plugins.ts +0 -4
- package/packages/ragents/src/agents/scheduler.ts +232 -78
- package/packages/ragents/src/agents/schemas.ts +1 -36
- package/packages/ragents/src/agents/tool-orientation.ts +1 -1
- package/packages/ragents/src/agents/tools.ts +72 -73
- package/packages/ragents/src/agents/toolset.ts +5 -5
- package/packages/ragents/src/agents/turn.ts +2 -14
- package/packages/ragents/src/agents/workspaces.ts +18 -0
- package/packages/ragents/src/domain/actor-reference.ts +22 -0
- package/packages/ragents/src/domain/driver.ts +0 -9
- package/packages/ragents/src/domain/event-semantics.ts +62 -74
- package/packages/ragents/src/domain/event-validation.ts +22 -21
- package/packages/ragents/src/domain/events.ts +19 -7
- package/packages/ragents/src/domain/json.ts +2 -0
- package/packages/ragents/src/domain/model.ts +40 -18
- package/packages/ragents/src/domain/projection.ts +43 -15
- package/packages/ragents/src/domain/schema-errors.ts +3 -3
- package/packages/ragents/src/drivers/agent-hooks.ts +40 -0
- package/packages/ragents/src/drivers/agent-runtime.ts +118 -186
- package/packages/ragents/src/drivers/agent.ts +5 -20
- package/packages/ragents/src/drivers/attachments.ts +4 -24
- package/packages/ragents/src/drivers/skill-preload.ts +4 -16
- package/packages/ragents/src/drivers/types.ts +20 -3
- package/packages/ragents/src/http/contracts.ts +16 -3
- package/packages/ragents/src/http/methods.ts +32 -33
- package/packages/ragents/src/index.ts +5 -15
- package/packages/ragents/src/plugin-host.ts +151 -105
- package/packages/ragents/src/plugin-types.ts +86 -23
- package/packages/ragents/src/rpc/peer.ts +6 -0
- package/packages/ragents/src/runtime/decisions/actions.ts +40 -37
- package/packages/ragents/src/runtime/decisions/actors.ts +90 -51
- package/packages/ragents/src/runtime/decisions/artifacts.ts +2 -2
- package/packages/ragents/src/runtime/decisions/inputs.ts +3 -3
- package/packages/ragents/src/runtime/decisions/subscriptions.ts +9 -7
- package/packages/ragents/src/runtime/decisions/turns.ts +37 -4
- package/packages/ragents/src/runtime/guards.ts +12 -21
- package/packages/ragents/src/runtime/journal-storage.ts +4 -2
- package/packages/ragents/src/runtime/journal.ts +1 -1
- package/packages/ragents/src/runtime/orchestration.ts +31 -14
- package/packages/ragents/src/runtime/serial-queue.ts +24 -0
- package/packages/ragents/src/runtime/stop.ts +19 -44
- package/packages/ragents/src/script/mediators.ts +4 -5
- package/packages/ragents/src/typescript/index.ts +2 -0
- package/packages/ragents/src/typescript/run-context.ts +10 -8
- package/packages/ragents/src/typescript/snippet.ts +7 -6
- package/packages/workspace-executor/package.json +2 -2
- package/packages/workspace-executor/src/bash-launch.ts +45 -0
- package/packages/workspace-executor/src/browser/contract.ts +71 -0
- package/packages/workspace-executor/src/browser/module.ts +74 -0
- package/packages/workspace-executor/src/browser/pages.ts +298 -0
- package/packages/workspace-executor/src/browser/playwright.ts +52 -0
- package/packages/workspace-executor/src/commands.ts +170 -0
- package/packages/workspace-executor/src/context.ts +34 -6
- package/packages/workspace-executor/src/errors.ts +12 -0
- package/packages/workspace-executor/src/executor.ts +62 -104
- package/packages/workspace-executor/src/files.ts +287 -0
- package/packages/workspace-executor/src/index.ts +82 -18
- package/packages/workspace-executor/src/language-server/adapters/roslyn.ts +1 -0
- package/packages/workspace-executor/src/language-server/contract.ts +14 -0
- package/packages/workspace-executor/src/language-server/host.ts +82 -26
- package/packages/workspace-executor/src/language-server/module.ts +107 -0
- package/packages/workspace-executor/src/language-server/workspace-solutions.ts +90 -0
- package/packages/workspace-executor/src/managed-process.ts +1 -1
- package/packages/workspace-executor/src/module.ts +35 -0
- package/packages/workspace-executor/src/modules.ts +25 -0
- package/packages/workspace-executor/src/paths.ts +57 -5
- package/packages/workspace-executor/src/process-sandbox.ts +16 -0
- package/packages/workspace-executor/src/processes/module.ts +48 -0
- package/{plugins/ragents.processes/server → packages/workspace-executor/src/processes}/process-table.ts +80 -57
- package/packages/workspace-executor/src/processes/scanner.ts +106 -0
- package/{plugins/ragents.processes/server → packages/workspace-executor/src/processes}/snapshot.ts +23 -11
- package/{plugins/ragents.processes/server → packages/workspace-executor/src/processes}/terminator.ts +19 -20
- package/packages/workspace-executor/src/run-folders.ts +33 -0
- package/packages/workspace-executor/src/safe-environment.ts +14 -0
- package/packages/workspace-executor/src/sandbox-tools.ts +206 -36
- package/packages/workspace-executor/src/shell-platform.ts +2 -2
- package/plugins/package.json +1 -1
- package/plugins/ragents.activity/ragents-plugin.json +3 -0
- package/plugins/ragents.activity/server/index.ts +2 -2
- package/plugins/ragents.activity/web/ActivityHeader.tsx +2 -2
- package/plugins/ragents.activity/web/activity.ts +1 -1
- package/plugins/ragents.activity/web/index.tsx +1 -1
- package/plugins/ragents.actor-programs/prompt.hbs +8 -7
- package/plugins/ragents.actor-programs/ragents-plugin.json +3 -0
- package/plugins/ragents.actor-programs/server/agent-tools.ts +3 -3
- package/{apps/server/src/plugin-support/actor-programs → plugins/ragents.actor-programs/server}/capability-resolver.ts +1 -16
- package/plugins/ragents.actor-programs/server/controls-template.ts +5 -18
- package/plugins/ragents.actor-programs/server/controls-tool.ts +8 -11
- package/plugins/ragents.actor-programs/server/index.ts +10 -10
- package/{apps/server/src/plugin-support/actor-programs → plugins/ragents.actor-programs/server}/limits.ts +4 -4
- package/plugins/ragents.actor-programs/server/methods.ts +2 -2
- package/{apps/server/src/plugin-support/actor-programs → plugins/ragents.actor-programs/server}/operations.ts +2 -4
- package/plugins/ragents.actor-programs/server/project-diagnostics.ts +65 -70
- package/plugins/ragents.actor-programs/server/prompts.ts +4 -4
- package/plugins/ragents.actor-programs/server/routes.ts +14 -8
- package/plugins/ragents.actor-programs/server/runtime.ts +132 -55
- package/plugins/ragents.actor-programs/server/templates.ts +35 -80
- package/plugins/ragents.actor-programs/server/test-report.ts +106 -0
- package/plugins/ragents.actor-programs/server/tool-contributor.ts +4 -4
- package/plugins/ragents.actor-programs/summary.hbs +1 -1
- package/plugins/ragents.actor-programs/web/ActorViewFrame.tsx +15 -10
- package/plugins/ragents.actor-programs/web/AppsPanel.tsx +47 -30
- package/plugins/ragents.actor-programs/web/EmbeddedApps.tsx +15 -17
- package/plugins/ragents.actor-programs/web/FullscreenHost.tsx +3 -3
- package/plugins/ragents.actor-programs/web/FunctionForm.tsx +3 -3
- package/plugins/ragents.actor-programs/web/ProgramSource.tsx +12 -3
- package/plugins/ragents.actor-programs/web/api.ts +5 -5
- package/plugins/ragents.actor-programs/web/bridge.ts +2 -3
- package/plugins/ragents.actor-programs/web/chat-state.ts +9 -8
- package/plugins/ragents.actor-programs/web/index.tsx +7 -17
- package/plugins/ragents.actor-programs/web/program-state.ts +3 -3
- package/plugins/ragents.actor-programs/web/state-revision.ts +2 -2
- package/plugins/ragents.ask/ask-payload.ts +25 -0
- package/plugins/ragents.ask/contract.ts +2 -2
- package/plugins/ragents.ask/ragents-plugin.json +7 -0
- package/plugins/ragents.ask/server/answer-method.ts +1 -1
- package/plugins/ragents.ask/server/ask-service.ts +43 -19
- package/plugins/ragents.ask/server/ask-tool.ts +2 -2
- package/plugins/ragents.ask/server/contract.ts +9 -1
- package/plugins/ragents.ask/server/index.ts +8 -10
- package/plugins/ragents.ask/server/tool-contributor.ts +3 -3
- package/plugins/ragents.ask/web/AskActionView.tsx +36 -0
- package/{apps/web/src/chat → plugins/ragents.ask/web}/QuestionCard.tsx +7 -5
- package/plugins/ragents.ask/web/QuestionSection.tsx +22 -21
- package/plugins/ragents.ask/web/api.ts +1 -1
- package/plugins/ragents.ask/web/index.tsx +11 -8
- package/plugins/ragents.browser/provision.ts +9 -8
- package/plugins/ragents.browser/ragents-plugin.json +6 -0
- package/plugins/ragents.browser/server/browser.ts +165 -286
- package/plugins/ragents.browser/server/contract.ts +8 -19
- package/plugins/ragents.browser/server/index.ts +8 -7
- package/plugins/ragents.browser/server/tools.ts +29 -37
- package/plugins/ragents.browser/skills/browser-testing/SKILL.md +3 -1
- package/plugins/ragents.documents/contract.ts +4 -2
- package/plugins/ragents.documents/ragents-plugin.json +6 -0
- package/plugins/ragents.documents/server/config.ts +1 -1
- package/plugins/ragents.documents/server/document-write-tool.ts +2 -2
- package/plugins/ragents.documents/server/files-route.ts +2 -3
- package/plugins/ragents.documents/server/index.ts +10 -11
- package/plugins/ragents.documents/server/show-document-tool.ts +2 -2
- package/plugins/ragents.documents/server/store.ts +3 -3
- package/plugins/ragents.documents/server/tool-contributor.ts +3 -3
- package/plugins/ragents.documents/web/DocumentViewer.tsx +5 -6
- package/plugins/ragents.documents/web/api.ts +1 -1
- package/plugins/ragents.documents/web/index.tsx +4 -4
- package/plugins/ragents.lsp-fsharp/provision.ts +2 -2
- package/plugins/ragents.lsp-fsharp/ragents-plugin.json +3 -0
- package/plugins/ragents.lsp-fsharp/server/index.ts +3 -3
- package/plugins/ragents.lsp-fsharp/web/index.tsx +1 -1
- package/plugins/ragents.lsp-roslyn/provision.ts +2 -2
- package/plugins/ragents.lsp-roslyn/ragents-plugin.json +3 -0
- package/plugins/ragents.lsp-roslyn/server/index.ts +47 -8
- package/plugins/ragents.lsp-roslyn/server/solution-on-start.ts +145 -0
- package/plugins/ragents.lsp-roslyn/web/index.tsx +1 -1
- package/plugins/ragents.lsp-typescript/ragents-plugin.json +3 -0
- package/plugins/ragents.lsp-typescript/server/index.ts +3 -3
- package/plugins/ragents.lsp-typescript/web/index.tsx +1 -1
- package/plugins/ragents.model-relay/ragents-plugin.json +3 -0
- package/plugins/ragents.model-relay/server/config.ts +5 -31
- package/plugins/ragents.model-relay/server/index.ts +5 -6
- package/plugins/ragents.model-relay/server/relay.ts +8 -9
- package/plugins/ragents.orchestration/contract.ts +13 -14
- package/plugins/ragents.orchestration/orchestration.hbs +4 -3
- package/plugins/ragents.orchestration/ragents-plugin.json +6 -0
- package/plugins/ragents.orchestration/server/index.ts +13 -16
- package/plugins/ragents.orchestration/server/run-stop-tool.ts +4 -4
- package/plugins/ragents.orchestration/server/{canvas-tool.ts → surface-tool.ts} +42 -43
- package/plugins/ragents.orchestration/surface.hbs +34 -0
- package/plugins/ragents.orchestration/tiled-layout.ts +16 -16
- package/plugins/ragents.orchestration/web/ActorChat.tsx +16 -14
- package/plugins/ragents.orchestration/web/ActorChatControls.tsx +23 -26
- package/plugins/ragents.orchestration/web/ActorChatPreview.tsx +5 -6
- package/plugins/ragents.orchestration/web/ActorPopout.tsx +7 -5
- package/plugins/ragents.orchestration/web/ActorShortcut.tsx +16 -16
- package/plugins/ragents.orchestration/web/{ActorCanvasControls.tsx → ActorSurfaceControls.tsx} +23 -28
- package/plugins/ragents.orchestration/web/ActorTile.tsx +2 -2
- package/plugins/ragents.orchestration/web/Center.tsx +47 -55
- package/plugins/ragents.orchestration/web/DocumentsSection.tsx +4 -4
- package/plugins/ragents.orchestration/web/ExecutionsPanel.tsx +7 -7
- package/plugins/ragents.orchestration/web/FlowInspector.tsx +24 -42
- package/plugins/ragents.orchestration/web/JournalStatus.tsx +8 -8
- package/plugins/ragents.orchestration/web/MaterialBody.tsx +5 -5
- package/plugins/ragents.orchestration/web/StopRunButton.tsx +6 -6
- package/plugins/ragents.orchestration/web/SurfaceStartup.tsx +8 -0
- package/plugins/ragents.orchestration/web/{CanvasTiles.tsx → SurfaceTiles.tsx} +18 -18
- package/plugins/ragents.orchestration/web/{TiledCanvas.tsx → TiledSurface.tsx} +22 -22
- package/plugins/ragents.orchestration/web/actor-header-settings.ts +2 -2
- package/plugins/ragents.orchestration/web/api.ts +4 -10
- package/plugins/ragents.orchestration/web/constants.ts +0 -1
- package/plugins/ragents.orchestration/web/executions.ts +3 -3
- package/plugins/ragents.orchestration/web/index.tsx +19 -124
- package/plugins/ragents.orchestration/web/program-slot.ts +14 -0
- package/plugins/ragents.orchestration/web/run-panel/AddresseeControl.tsx +95 -0
- package/plugins/ragents.orchestration/web/run-panel/AddresseeTree.tsx +109 -0
- package/plugins/ragents.orchestration/web/{column/RunColumn.tsx → run-panel/RunPanel.tsx} +211 -83
- package/plugins/ragents.orchestration/web/{column/ColumnSettings.tsx → run-panel/RunPanelSettings.tsx} +13 -13
- package/plugins/ragents.orchestration/web/run-panel/addressee-tree.ts +165 -0
- package/plugins/ragents.orchestration/web/{column/column-actors.ts → run-panel/run-panel-actors.ts} +14 -13
- package/plugins/ragents.orchestration/web/run-panel/run-panel-settings.ts +47 -0
- package/plugins/ragents.orchestration/web/run-panel/run-panel-startup.ts +30 -0
- package/plugins/ragents.orchestration/web/run-panel/run-panel-state.ts +71 -0
- package/plugins/ragents.orchestration/web/{column → run-panel}/sheet-status.ts +4 -4
- package/plugins/ragents.orchestration/web/{canvas-stage.ts → surface-entities.ts} +2 -2
- package/plugins/ragents.orchestration/web/{canvas-startup.ts → surface-startup.ts} +7 -10
- package/plugins/ragents.orchestration/web/surface-view-settings.ts +42 -0
- package/plugins/ragents.orchestration/web/tile-docking.ts +14 -14
- package/plugins/ragents.orchestration/web/tiled-view-settings.ts +26 -26
- package/plugins/ragents.overseer/contract.ts +20 -14
- package/plugins/ragents.overseer/ragents-plugin.json +3 -0
- package/plugins/ragents.overseer/server/api.ts +34 -23
- package/plugins/ragents.overseer/server/coordinator-prompt.ts +3 -3
- package/plugins/ragents.overseer/server/coordinator.ts +19 -0
- package/plugins/ragents.overseer/server/index.ts +39 -27
- package/plugins/ragents.overseer/server/orientation.ts +4 -5
- package/plugins/ragents.overseer/server/quick-answer.ts +5 -4
- package/plugins/ragents.overseer/server/reset-method.ts +4 -3
- package/plugins/ragents.overseer/server/run-directory.ts +5 -5
- package/plugins/ragents.overseer/server/settings-method.ts +1 -1
- package/plugins/ragents.overseer/server/settings.ts +6 -6
- package/plugins/ragents.overseer/server/user-location.ts +20 -19
- package/plugins/ragents.overseer/web/ModelSettings.tsx +4 -4
- package/plugins/ragents.overseer/web/chat-display.ts +1 -1
- package/plugins/ragents.overseer/web/index.tsx +51 -26
- 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/ragents-plugin.json +3 -0
- package/plugins/ragents.processes/server/index.ts +13 -19
- package/plugins/ragents.processes/server/methods.ts +18 -20
- package/plugins/ragents.processes/server/observer.ts +64 -104
- package/plugins/ragents.processes/server/run-processes.ts +24 -0
- package/plugins/ragents.processes/web/ProcessHeader.tsx +13 -16
- package/plugins/ragents.processes/web/index.tsx +2 -1
- package/plugins/ragents.processes/web/processes.ts +1 -1
- package/plugins/ragents.product/ragents-plugin.json +3 -0
- package/plugins/ragents.product/server/config.ts +12 -13
- package/plugins/ragents.product/server/index.ts +15 -16
- package/plugins/ragents.product/server/runtime.ts +2 -2
- package/plugins/ragents.product/web/index.tsx +3 -3
- package/plugins/ragents.profile-distribution/contract.ts +6 -9
- package/plugins/ragents.profile-distribution/ragents-plugin.json +3 -0
- package/plugins/ragents.profile-distribution/server/archive.ts +26 -51
- package/plugins/ragents.profile-distribution/server/config.ts +2 -2
- package/plugins/ragents.profile-distribution/server/index.ts +9 -16
- package/plugins/ragents.reference/examples.ts +1 -1
- package/plugins/ragents.reference/ragents-plugin.json +3 -0
- package/plugins/ragents.reference/run-scripts/balcony-wizard/RUN.md +2 -2
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/client.tsx +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/src/server.ts +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +4 -4
- package/plugins/ragents.reference/run-scripts/conversation-circle/RUN.md +1 -1
- package/plugins/ragents.reference/run-scripts/conversation-circle/src/server.ts +1 -1
- package/plugins/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/RUN.md +2 -2
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/client.tsx +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/server.ts +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/state.ts +2 -2
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/view.tsx +11 -11
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/workflow.ts +15 -15
- package/plugins/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +3 -8
- package/plugins/ragents.reference/run-scripts/moderated-round/src/server.ts +1 -1
- 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 +2 -2
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/client.tsx +6 -6
- package/plugins/ragents.reference/run-scripts/shared-actor-list/src/server.ts +3 -3
- package/plugins/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/word-game/RUN.md +1 -1
- package/plugins/ragents.reference/run-scripts/word-game/src/client.tsx +1 -1
- package/plugins/ragents.reference/run-scripts/word-game/src/server.ts +1 -2
- package/plugins/ragents.reference/run-scripts/word-game/src/state.ts +6 -6
- package/plugins/ragents.reference/run-scripts/word-game/src/view.tsx +14 -14
- package/plugins/ragents.reference/run-scripts/word-game/tests/program.test.ts +4 -5
- package/plugins/ragents.reference/server/index.ts +2 -2
- package/plugins/ragents.reference/skills/160-learning-companion/SKILL.md +1 -1
- package/plugins/ragents.reference/skills/240-live-result-list/SKILL.md +1 -1
- package/plugins/ragents.reference/skills/250-balcony-wizard/SKILL.md +1 -1
- package/plugins/ragents.reference/skills/90-actor-notes/SKILL.md +1 -1
- package/plugins/ragents.reference/skills/95-hello-world/SKILL.md +2 -2
- package/plugins/ragents.reference/skills/decision-brief/SKILL.md +2 -2
- package/plugins/ragents.reference/walkthroughs.ts +26 -26
- package/plugins/ragents.reference/web/StartGuides.tsx +2 -2
- package/plugins/ragents.reference/web/index.tsx +1 -1
- package/plugins/ragents.todo/ragents-plugin.json +3 -0
- package/plugins/ragents.todo/server/index.ts +2 -2
- package/plugins/ragents.todo/server/todo-tool.ts +4 -5
- package/plugins/ragents.todo/server/tool-contributor.ts +2 -2
- package/plugins/ragents.todo/web/TodoSection.tsx +3 -3
- package/plugins/ragents.todo/web/index.ts +1 -1
- package/plugins/ragents.transcript/ragents-plugin.json +3 -0
- package/plugins/ragents.transcript/server/index.ts +4 -4
- package/plugins/ragents.transcript/server/transcript.ts +2 -3
- package/plugins/ragents.watch/ragents-plugin.json +6 -0
- package/plugins/ragents.watch/server/condition.ts +2 -2
- package/plugins/ragents.watch/server/contract.ts +1 -1
- package/plugins/ragents.watch/server/functions.ts +3 -3
- package/plugins/ragents.watch/server/index.ts +3 -3
- package/plugins/ragents.watch/server/observation.ts +6 -6
- package/plugins/ragents.watch/server/service.ts +5 -5
- package/plugins/ragents.workspace/client/workspace-client.ts +129 -58
- package/plugins/ragents.workspace/contract.ts +98 -35
- package/plugins/ragents.workspace/prompt.hbs +1 -8
- package/plugins/ragents.workspace/ragents-plugin.json +3 -0
- package/plugins/ragents.workspace/server/binding.ts +122 -39
- package/plugins/ragents.workspace/server/browse-route.ts +96 -103
- package/plugins/ragents.workspace/server/clients.ts +236 -68
- package/plugins/ragents.workspace/server/config.ts +30 -0
- package/plugins/ragents.workspace/server/index.ts +61 -26
- package/plugins/ragents.workspace/server/runtime.ts +271 -46
- package/{apps/server/src/plugin-support → plugins/ragents.workspace/server}/shell-platform.ts +3 -5
- package/{apps/server/src/plugin-support → plugins/ragents.workspace/server}/workspace-tool-naming.ts +7 -1
- package/plugins/ragents.workspace/web/FileBrowser.tsx +11 -8
- package/plugins/ragents.workspace/web/WorkspaceBinding.tsx +115 -61
- package/plugins/ragents.workspace/web/api.ts +1 -1
- package/plugins/ragents.workspace/web/index.tsx +1 -1
- package/ragents.config.core.ts +2 -8
- package/ragents.config.showcase.ts +61 -0
- package/scripts/agent/agent-cli.ts +265 -107
- package/scripts/agent/journal.ts +3 -1
- package/scripts/agent/turn-control.ts +19 -0
- package/scripts/package/build-package.ts +70 -15
- package/scripts/package/ragents.mjs +4 -2
- package/scripts/plugin/build-builtin-plugins.ts +52 -0
- package/scripts/plugin/plugin-cli.ts +99 -0
- package/scripts/provision/run-provision.ts +20 -18
- package/scripts/remote/connect.ts +75 -53
- package/scripts/remote/start.ts +3 -4
- package/scripts/workspace-client/run-workspace-client.ts +15 -9
- package/apps/server/agent-home/settings.json +0 -3
- package/apps/server/src/chat-attachments.ts +0 -52
- package/apps/server/src/chat-events.ts +0 -185
- package/apps/server/src/plugin-support/asset-path.ts +0 -4
- package/apps/server/src/profile/plugin-list.ts +0 -19
- package/apps/server/src/web-build.ts +0 -82
- package/apps/web/column.html +0 -12
- package/apps/web/index.html +0 -12
- package/apps/web/src/StartSurface.tsx +0 -161
- package/apps/web/src/chat/ChatInputToolbar.tsx +0 -488
- package/apps/web/src/chat/ChatMessages.tsx +0 -666
- package/apps/web/src/chat/ChatPanel.tsx +0 -61
- package/apps/web/src/chat/DetailModeSwitch.tsx +0 -58
- package/apps/web/src/chat/Markdown.tsx +0 -104
- package/apps/web/src/chat/StepPopover.tsx +0 -82
- package/apps/web/src/chat/WorkingScenes.tsx +0 -235
- package/apps/web/src/chat/attachments.ts +0 -53
- package/apps/web/src/chat/chat-scroll.ts +0 -41
- package/apps/web/src/chat/texts.ts +0 -61
- package/apps/web/src/chat/types.ts +0 -26
- package/apps/web/src/column/ColumnApp.tsx +0 -234
- package/apps/web/src/column/column-location.ts +0 -30
- package/apps/web/src/column/host-contract.ts +0 -93
- package/apps/web/src/panel/OverviewPage.tsx +0 -215
- package/apps/web/src/panel/SettingsPage.tsx +0 -98
- package/apps/web/src/panel/target-state.ts +0 -78
- package/apps/web/src/plugin-discovery.ts +0 -5
- package/apps/web/src/virtual-plugins.d.ts +0 -3
- package/apps/web/vite.config.ts +0 -140
- package/packages/agent/src/config.ts +0 -161
- package/packages/agent/src/core/auth-storage.ts +0 -271
- package/packages/agent/src/core/bash-executor.ts +0 -156
- package/packages/agent/src/core/compaction/branch-summarization.ts +0 -372
- package/packages/agent/src/core/diagnostics.ts +0 -15
- package/packages/agent/src/core/event-bus.ts +0 -33
- package/packages/agent/src/core/exec.ts +0 -107
- package/packages/agent/src/core/experimental.ts +0 -3
- package/packages/agent/src/core/footer-data-provider.ts +0 -388
- package/packages/agent/src/core/http-dispatcher.ts +0 -106
- package/packages/agent/src/core/index.ts +0 -78
- package/packages/agent/src/core/model-config.ts +0 -287
- package/packages/agent/src/core/model-registry.ts +0 -126
- package/packages/agent/src/core/model-resolver.ts +0 -675
- package/packages/agent/src/core/output-guard.ts +0 -108
- package/packages/agent/src/core/package-manager.ts +0 -2441
- package/packages/agent/src/core/prompt-templates.ts +0 -284
- package/packages/agent/src/core/resolve-config-value.ts +0 -287
- package/packages/agent/src/core/runtime-credentials.ts +0 -48
- package/packages/agent/src/core/session-cwd.ts +0 -59
- package/packages/agent/src/core/settings-manager.ts +0 -1212
- package/packages/agent/src/core/slash-commands.ts +0 -41
- package/packages/agent/src/core/timings.ts +0 -50
- package/packages/agent/src/core/tools/tool-definition-wrapper.ts +0 -45
- package/packages/agent/src/core/trust-manager.ts +0 -244
- package/packages/agent/src/utils/ansi.ts +0 -60
- package/packages/agent/src/utils/fs-watch.ts +0 -30
- package/packages/agent/src/utils/git.ts +0 -226
- package/packages/agent/src/utils/json.ts +0 -6
- package/packages/agent/src/utils/tools-manager.ts +0 -63
- package/packages/agent-core/package.json +0 -32
- package/packages/ai/src/api/openrouter-images.lazy.ts +0 -10
- package/packages/ai/src/api/openrouter-images.ts +0 -98
- package/packages/ai/src/auth/credential-store.ts +0 -51
- package/packages/ai/src/compat/extension-oauth-types.ts +0 -45
- package/packages/ai/src/image-models.generated.ts +0 -533
- package/packages/ai/src/images-models.ts +0 -274
- package/packages/ai/src/models-store.ts +0 -38
- package/packages/ai/src/oauth.ts +0 -10
- package/packages/ai/src/providers/openrouter-images.ts +0 -14
- package/packages/ai/src/session-resources.ts +0 -24
- package/packages/ai/src/utils/abort-signals.ts +0 -41
- package/packages/ai/src/utils/deferred-tools.ts +0 -39
- package/packages/ai/src/utils/hash.ts +0 -13
- package/packages/ai/src/utils/node-http-proxy.ts +0 -112
- package/plugins/ragents.actor-programs/server/client-runtime.ts +0 -16
- package/plugins/ragents.ask/web/constants.ts +0 -1
- package/plugins/ragents.lsp-roslyn/web/api.ts +0 -10
- package/plugins/ragents.orchestration/web/CanvasStartup.tsx +0 -14
- package/plugins/ragents.orchestration/web/canvas-view-settings.ts +0 -42
- package/plugins/ragents.orchestration/web/column/AddresseeControl.tsx +0 -116
- package/plugins/ragents.orchestration/web/column/column-settings.ts +0 -47
- package/plugins/ragents.orchestration/web/column/column-state.ts +0 -68
- package/plugins/ragents.orchestration/web/contract.ts +0 -25
- package/plugins/ragents.product/model-settings-contract.ts +0 -10
- package/plugins/ragents.profile-distribution/server/web.ts +0 -24
- /package/{plugins/ragents.actor-programs/server → apps/server/src/plugin-support/actor-programs}/authoring-contracts.ts +0 -0
- /package/{plugins/ragents.actor-programs/server → apps/server/src/plugin-support/actor-programs}/runtime-libraries.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/server/src/plugin-support/actor-programs}/workflow/prompt-reader.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/file-contracts.d.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/flow-diagram-contracts.d.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/flow-diagram.css +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/form-contracts.d.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/frame-layout.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/table-contracts.d.ts +0 -0
- /package/{plugins/ragents.actor-programs → apps/web/src/actor-programs}/client-ui/viewer-contracts.d.ts +0 -0
- /package/{plugins/ragents.orchestration/canvas.hbs → bundles/ragents.orchestration/surface.hbs} +0 -0
- /package/packages/{agent-core/src → agent/src/loop}/index.ts +0 -0
- /package/packages/{agent-core/src → agent/src/loop}/uuid.ts +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": 3,
|
|
3
|
+
"id": "ragents.processes",
|
|
4
|
+
"api": 6,
|
|
5
|
+
"hostNames": {
|
|
6
|
+
"server": {
|
|
7
|
+
"@ragents/engine": [
|
|
8
|
+
"DomainError",
|
|
9
|
+
"implement",
|
|
10
|
+
"implementChannel"
|
|
11
|
+
],
|
|
12
|
+
"@ragents/engine/src/http/contracts": [
|
|
13
|
+
"openJson"
|
|
14
|
+
],
|
|
15
|
+
"@ragents/engine/src/rpc/contract": [
|
|
16
|
+
"defineChannel",
|
|
17
|
+
"defineOperation"
|
|
18
|
+
],
|
|
19
|
+
"@ragents/host/plugin-support/workspace-sandbox-host": [
|
|
20
|
+
"sandboxServicesToken"
|
|
21
|
+
],
|
|
22
|
+
"@ragents/host/ragents/host-services": [
|
|
23
|
+
"workspaceGuardToken"
|
|
24
|
+
],
|
|
25
|
+
"@ragents/workspace-executor": [
|
|
26
|
+
"PROCESS_OPERATIONS"
|
|
27
|
+
],
|
|
28
|
+
"typebox": [
|
|
29
|
+
"Type"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"web": {
|
|
33
|
+
"@ragents/engine/src/http/contracts": [
|
|
34
|
+
"openJson"
|
|
35
|
+
],
|
|
36
|
+
"@ragents/engine/src/rpc/contract": [
|
|
37
|
+
"defineChannel",
|
|
38
|
+
"defineOperation"
|
|
39
|
+
],
|
|
40
|
+
"@ragents/web/AccessContext": [
|
|
41
|
+
"useAccess"
|
|
42
|
+
],
|
|
43
|
+
"@ragents/web/lib/guards": [
|
|
44
|
+
"isRecord"
|
|
45
|
+
],
|
|
46
|
+
"@ragents/web/rpc": [
|
|
47
|
+
"rpc"
|
|
48
|
+
],
|
|
49
|
+
"@ragents/web/Toolbar": [
|
|
50
|
+
"ToolbarCopy",
|
|
51
|
+
"ToolbarItem",
|
|
52
|
+
"ToolbarLabel",
|
|
53
|
+
"ToolbarText"
|
|
54
|
+
],
|
|
55
|
+
"@ragents/web/ui": [
|
|
56
|
+
"Dialog",
|
|
57
|
+
"DialogBody",
|
|
58
|
+
"DialogContent",
|
|
59
|
+
"DialogHeader",
|
|
60
|
+
"DialogTitle",
|
|
61
|
+
"StopButton",
|
|
62
|
+
"cn"
|
|
63
|
+
],
|
|
64
|
+
"react": [
|
|
65
|
+
"useEffect",
|
|
66
|
+
"useLayoutEffect",
|
|
67
|
+
"useRef",
|
|
68
|
+
"useState"
|
|
69
|
+
],
|
|
70
|
+
"react/jsx-runtime": [
|
|
71
|
+
"Fragment",
|
|
72
|
+
"jsx",
|
|
73
|
+
"jsxs"
|
|
74
|
+
],
|
|
75
|
+
"typebox": [
|
|
76
|
+
"Type"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"stand": "987603befb33bb6cbdf130bf48c606f09549cfcce8811ffcef62a235640d79f5",
|
|
81
|
+
"sourceStand": "c53ca466e231c776b26f8a82620cbe18b992fc8698272bdc30468a7b2965454a",
|
|
82
|
+
"server": "server/index.js",
|
|
83
|
+
"web": {
|
|
84
|
+
"entry": "web/index.js",
|
|
85
|
+
"classes": "web/classes.json"
|
|
86
|
+
},
|
|
87
|
+
"exports": {
|
|
88
|
+
"server": {},
|
|
89
|
+
"web": {}
|
|
90
|
+
},
|
|
91
|
+
"uses": [],
|
|
92
|
+
"assets": []
|
|
93
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { createRequire as __ragentsCreateRequire } from "node:module";
|
|
2
|
+
const require = __ragentsCreateRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// server/index.ts
|
|
5
|
+
import { workspaceGuardToken } from "@ragents/host/ragents/host-services.js";
|
|
6
|
+
import { sandboxServicesToken } from "@ragents/host/plugin-support/workspace-sandbox-host.js";
|
|
7
|
+
|
|
8
|
+
// contract.ts
|
|
9
|
+
import { Type } from "typebox";
|
|
10
|
+
import { defineChannel, defineOperation } from "@ragents/engine/src/rpc/contract";
|
|
11
|
+
import { openJson } from "@ragents/engine/src/http/contracts";
|
|
12
|
+
var PROCESSES_PLUGIN_ID = "ragents.processes";
|
|
13
|
+
var runId = Type.String({ minLength: 1, maxLength: 64, description: "Kennung des Runs" });
|
|
14
|
+
var processesContracts = {
|
|
15
|
+
snapshot: defineOperation({
|
|
16
|
+
id: "ragents.processes.snapshot",
|
|
17
|
+
description: "Die beobachteten Prozesse eines Runs mit ihren offenen Ports. Rechte: runs.read und ragents.processes.read.",
|
|
18
|
+
rights: ["runs.read", "ragents.processes.read"],
|
|
19
|
+
input: Type.Object({ runId }, { additionalProperties: false }),
|
|
20
|
+
result: openJson("RunProcessSnapshot")
|
|
21
|
+
}),
|
|
22
|
+
stop: defineOperation({
|
|
23
|
+
id: "ragents.processes.stop",
|
|
24
|
+
description: "Einen Prozess des Runs beenden. Rechte: runs.read, runs.write und runs.inspect.",
|
|
25
|
+
rights: ["runs.read", "runs.write", "runs.inspect"],
|
|
26
|
+
input: Type.Object({
|
|
27
|
+
runId,
|
|
28
|
+
processId: Type.String({ pattern: "^[1-9][0-9]*-[a-f0-9]{64}$", description: "Kennung des Prozesses aus dem Stand" })
|
|
29
|
+
}, { additionalProperties: false }),
|
|
30
|
+
result: Type.Null()
|
|
31
|
+
}),
|
|
32
|
+
live: defineChannel({
|
|
33
|
+
id: "ragents.processes",
|
|
34
|
+
description: "Der laufende Stand der Prozess\xFCberwachung eines Runs. Rechte: runs.read und ragents.processes.read.",
|
|
35
|
+
rights: ["runs.read", "ragents.processes.read"],
|
|
36
|
+
params: Type.Object({ runId }, { additionalProperties: false }),
|
|
37
|
+
message: openJson("RunProcessMessage")
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// server/observer.ts
|
|
42
|
+
var SNAPSHOT_TIMEOUT_TICKS = 5;
|
|
43
|
+
var messageOf = (error) => error instanceof Error ? error.message : String(error);
|
|
44
|
+
var RunProcessObserver = class {
|
|
45
|
+
#options;
|
|
46
|
+
#watches = /* @__PURE__ */ new Map();
|
|
47
|
+
#timer;
|
|
48
|
+
#stopped = false;
|
|
49
|
+
constructor(options) {
|
|
50
|
+
this.#options = options;
|
|
51
|
+
}
|
|
52
|
+
observe(runId2, signal) {
|
|
53
|
+
return this.#bounded(runId2, signal);
|
|
54
|
+
}
|
|
55
|
+
watch(runId2, listener) {
|
|
56
|
+
if (this.#stopped) throw new Error("Die Prozess\xFCberwachung ist beendet");
|
|
57
|
+
let watch = this.#watches.get(runId2);
|
|
58
|
+
if (!watch) {
|
|
59
|
+
watch = { listeners: /* @__PURE__ */ new Set(), fresh: /* @__PURE__ */ new Set(), last: void 0, polling: void 0, controller: void 0 };
|
|
60
|
+
this.#watches.set(runId2, watch);
|
|
61
|
+
}
|
|
62
|
+
watch.listeners.add(listener);
|
|
63
|
+
watch.fresh.add(listener);
|
|
64
|
+
this.#ensureTimer();
|
|
65
|
+
void this.#poll(runId2, watch);
|
|
66
|
+
return () => {
|
|
67
|
+
const current = this.#watches.get(runId2);
|
|
68
|
+
if (!current) return;
|
|
69
|
+
current.listeners.delete(listener);
|
|
70
|
+
current.fresh.delete(listener);
|
|
71
|
+
if (current.listeners.size === 0) {
|
|
72
|
+
this.#watches.delete(runId2);
|
|
73
|
+
current.controller?.abort();
|
|
74
|
+
}
|
|
75
|
+
if (this.#watches.size === 0) this.#clearTimer();
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
watchedRuns() {
|
|
79
|
+
return [...this.#watches.keys()];
|
|
80
|
+
}
|
|
81
|
+
async shutdown() {
|
|
82
|
+
this.#stopped = true;
|
|
83
|
+
this.#clearTimer();
|
|
84
|
+
const watches = [...this.#watches.values()];
|
|
85
|
+
this.#watches.clear();
|
|
86
|
+
for (const watch of watches) watch.controller?.abort();
|
|
87
|
+
await Promise.allSettled(watches.map((watch) => watch.polling));
|
|
88
|
+
}
|
|
89
|
+
#ensureTimer() {
|
|
90
|
+
if (this.#timer || this.#watches.size === 0) return;
|
|
91
|
+
this.#timer = setInterval(() => {
|
|
92
|
+
for (const [runId2, watch] of this.#watches) void this.#poll(runId2, watch);
|
|
93
|
+
}, this.#options.pollIntervalMs);
|
|
94
|
+
this.#timer.unref();
|
|
95
|
+
}
|
|
96
|
+
#clearTimer() {
|
|
97
|
+
if (!this.#timer) return;
|
|
98
|
+
clearInterval(this.#timer);
|
|
99
|
+
this.#timer = void 0;
|
|
100
|
+
}
|
|
101
|
+
#poll(runId2, watch) {
|
|
102
|
+
if (watch.polling) return watch.polling;
|
|
103
|
+
const controller = new AbortController();
|
|
104
|
+
watch.controller = controller;
|
|
105
|
+
watch.polling = this.#bounded(runId2, controller.signal).then((snapshot) => ({ kind: "snapshot", snapshot }), (error) => ({ kind: "error", error: messageOf(error) })).then((message) => {
|
|
106
|
+
if (!controller.signal.aborted && this.#watches.get(runId2) === watch) this.#publish(watch, runId2, message);
|
|
107
|
+
}).finally(() => {
|
|
108
|
+
watch.polling = void 0;
|
|
109
|
+
watch.controller = void 0;
|
|
110
|
+
});
|
|
111
|
+
return watch.polling;
|
|
112
|
+
}
|
|
113
|
+
/** Eine Abfrage endet spätestens nach ihrer Zeitgrenze; der Abbruch erreicht dabei auch den Executor. */
|
|
114
|
+
#bounded(runId2, signal) {
|
|
115
|
+
const timeoutMs = this.#options.pollIntervalMs * SNAPSHOT_TIMEOUT_TICKS;
|
|
116
|
+
const controller = new AbortController();
|
|
117
|
+
const forward = () => controller.abort(signal?.reason);
|
|
118
|
+
signal?.addEventListener("abort", forward, { once: true });
|
|
119
|
+
let timer;
|
|
120
|
+
const deadline = new Promise((_settle, fail) => {
|
|
121
|
+
timer = setTimeout(() => {
|
|
122
|
+
const error = new Error(`Der Executor des Runs ${runId2} hat die Prozessabfrage nicht innerhalb von ${timeoutMs / 1e3} s beantwortet`);
|
|
123
|
+
fail(error);
|
|
124
|
+
controller.abort(error);
|
|
125
|
+
}, timeoutMs);
|
|
126
|
+
});
|
|
127
|
+
return Promise.race([this.#options.snapshot(runId2, controller.signal), deadline]).finally(() => {
|
|
128
|
+
clearTimeout(timer);
|
|
129
|
+
signal?.removeEventListener("abort", forward);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
#publish(watch, runId2, message) {
|
|
133
|
+
const serialized = JSON.stringify(message.kind === "snapshot" ? { kind: message.kind, processes: message.snapshot.processes } : message);
|
|
134
|
+
const changed = serialized !== watch.last;
|
|
135
|
+
watch.last = serialized;
|
|
136
|
+
if (changed && message.kind === "error") console.error(`Prozess\xFCberwachung f\xFCr ${runId2}: ${message.error}`);
|
|
137
|
+
for (const listener of watch.listeners) {
|
|
138
|
+
if (changed || watch.fresh.has(listener)) listener(message);
|
|
139
|
+
}
|
|
140
|
+
watch.fresh.clear();
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// server/methods.ts
|
|
145
|
+
import { DomainError, implement, implementChannel } from "@ragents/engine";
|
|
146
|
+
var createProcessMethods = (options) => [
|
|
147
|
+
implement(processesContracts.snapshot, ({ runId: runId2 }, { access, signal }) => {
|
|
148
|
+
options.ensureWorkspaceAccess(access, runId2);
|
|
149
|
+
return options.observer.observe(runId2, signal);
|
|
150
|
+
}),
|
|
151
|
+
implement(processesContracts.stop, async ({ runId: runId2, processId }, { access, signal }) => {
|
|
152
|
+
for (const right of processesContracts.stop.rights) {
|
|
153
|
+
if (!access.can(right)) throw new DomainError("forbidden", "Das Beenden von Prozessen ist nicht erlaubt", 403);
|
|
154
|
+
}
|
|
155
|
+
if (signal.aborted) throw new Error("Die Prozess-Stopp-Anfrage wurde abgebrochen");
|
|
156
|
+
options.ensureWorkspaceAccess(access, runId2);
|
|
157
|
+
await options.terminate(runId2, processId, signal);
|
|
158
|
+
return null;
|
|
159
|
+
})
|
|
160
|
+
];
|
|
161
|
+
var createProcessChannel = (options) => implementChannel(processesContracts.live, ({ runId: runId2 }, emit, { access }) => {
|
|
162
|
+
options.ensureWorkspaceAccess(access, runId2);
|
|
163
|
+
return options.observer.watch(runId2, emit);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// server/run-processes.ts
|
|
167
|
+
import { PROCESS_OPERATIONS } from "@ragents/workspace-executor";
|
|
168
|
+
var runProcessesOf = (sandbox) => ({
|
|
169
|
+
snapshot: async (runId2, signal) => {
|
|
170
|
+
const observed = await sandbox.execute(runId2, PROCESS_OPERATIONS.snapshot, {}, signal ? { signal } : {});
|
|
171
|
+
return { runId: runId2, ...observed };
|
|
172
|
+
},
|
|
173
|
+
terminate: async (runId2, processId, signal) => {
|
|
174
|
+
await sandbox.execute(runId2, PROCESS_OPERATIONS.stop, { processId }, { signal });
|
|
175
|
+
},
|
|
176
|
+
stopAll: async (runId2, signal) => {
|
|
177
|
+
await sandbox.execute(runId2, PROCESS_OPERATIONS.stopAll, {}, { whenReachable: true, ...signal ? { signal } : {} });
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// server/index.ts
|
|
182
|
+
var POLL_INTERVAL_MS = 2e3;
|
|
183
|
+
var processesPlugin = {
|
|
184
|
+
manifest: { id: PROCESSES_PLUGIN_ID },
|
|
185
|
+
register: (host) => {
|
|
186
|
+
const processes = runProcessesOf(host.service(sandboxServicesToken));
|
|
187
|
+
const observer = new RunProcessObserver({ snapshot: processes.snapshot, pollIntervalMs: POLL_INTERVAL_MS });
|
|
188
|
+
const ensureWorkspaceAccess = host.service(workspaceGuardToken);
|
|
189
|
+
host.methods(...createProcessMethods({ observer, ensureWorkspaceAccess, terminate: processes.terminate }));
|
|
190
|
+
host.channels(createProcessChannel({ observer, ensureWorkspaceAccess }));
|
|
191
|
+
host.lifecycle({
|
|
192
|
+
id: "ragents.processes.lifecycle",
|
|
193
|
+
stopSession: ({ runId: runId2, signal }) => processes.stopAll(runId2, signal),
|
|
194
|
+
afterStopSession: ({ runId: runId2, signal }) => processes.stopAll(runId2, signal),
|
|
195
|
+
deleteSession: ({ runId: runId2 }) => processes.stopAll(runId2),
|
|
196
|
+
shutdown: () => observer.shutdown()
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
var plugin = { create: () => processesPlugin };
|
|
201
|
+
export {
|
|
202
|
+
plugin
|
|
203
|
+
};
|
|
204
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../plugins/ragents.processes/server/index.ts", "../../../plugins/ragents.processes/contract.ts", "../../../plugins/ragents.processes/server/observer.ts", "../../../plugins/ragents.processes/server/methods.ts", "../../../plugins/ragents.processes/server/run-processes.ts"],
|
|
4
|
+
"sourcesContent": ["import type { RAgentsPlugin } from \"@ragents/engine\";\nimport { workspaceGuardToken } from \"@ragents/host/ragents/host-services.js\";\nimport type { PluginModule } from \"@ragents/host/plugin-support/plugin-module.js\";\nimport { sandboxServicesToken } from \"@ragents/host/plugin-support/workspace-sandbox-host.js\";\nimport { PROCESSES_PLUGIN_ID } from \"../contract.js\";\nimport { RunProcessObserver } from \"./observer.js\";\nimport { createProcessChannel, createProcessMethods } from \"./methods.js\";\nimport { runProcessesOf } from \"./run-processes.js\";\n\nconst POLL_INTERVAL_MS = 2_000;\n\nconst processesPlugin: RAgentsPlugin = {\n manifest: { id: PROCESSES_PLUGIN_ID },\n register: (host) => {\n const processes = runProcessesOf(host.service(sandboxServicesToken));\n const observer = new RunProcessObserver({ snapshot: processes.snapshot, pollIntervalMs: POLL_INTERVAL_MS });\n const ensureWorkspaceAccess = host.service(workspaceGuardToken);\n host.methods(...createProcessMethods({ observer, ensureWorkspaceAccess, terminate: processes.terminate }));\n host.channels(createProcessChannel({ observer, ensureWorkspaceAccess }));\n host.lifecycle({\n id: \"ragents.processes.lifecycle\",\n stopSession: ({ runId, signal }) => processes.stopAll(runId, signal),\n afterStopSession: ({ runId, signal }) => processes.stopAll(runId, signal),\n deleteSession: ({ runId }) => processes.stopAll(runId),\n shutdown: () => observer.shutdown(),\n });\n },\n};\n\nexport const plugin: PluginModule = { create: () => processesPlugin };\n", "import { Type } from \"typebox\";\nimport { defineChannel, defineOperation } from \"@ragents/engine/src/rpc/contract\";\nimport { openJson } from \"@ragents/engine/src/http/contracts\";\n\nexport const PROCESSES_PLUGIN_ID = \"ragents.processes\";\n\nexport interface RunProcessPort {\n port: number;\n address: string;\n}\n\nexport type RunProcessOrigin = \"tool-call\" | \"background\";\n\nexport interface RunProcess {\n id: string;\n pid: number;\n label: string;\n command: string;\n origin: RunProcessOrigin;\n ports: RunProcessPort[];\n seenSince: string;\n}\n\nexport interface RunProcessSnapshot {\n runId: string;\n observedAt: string;\n processes: RunProcess[];\n}\n\nexport type RunProcessMessage =\n | { kind: \"snapshot\"; snapshot: RunProcessSnapshot }\n | { kind: \"error\"; error: string };\n\nconst runId = Type.String({ minLength: 1, maxLength: 64, description: \"Kennung des Runs\" });\n\nexport const processesContracts = {\n snapshot: defineOperation({\n id: \"ragents.processes.snapshot\",\n description: \"Die beobachteten Prozesse eines Runs mit ihren offenen Ports. Rechte: runs.read und ragents.processes.read.\",\n rights: [\"runs.read\", \"ragents.processes.read\"],\n input: Type.Object({ runId }, { additionalProperties: false }),\n result: openJson<RunProcessSnapshot>(\"RunProcessSnapshot\"),\n }),\n stop: defineOperation({\n id: \"ragents.processes.stop\",\n description: \"Einen Prozess des Runs beenden. Rechte: runs.read, runs.write und runs.inspect.\",\n rights: [\"runs.read\", \"runs.write\", \"runs.inspect\"],\n input: Type.Object({\n runId,\n processId: Type.String({ pattern: \"^[1-9][0-9]*-[a-f0-9]{64}$\", description: \"Kennung des Prozesses aus dem Stand\" }),\n }, { additionalProperties: false }),\n result: Type.Null(),\n }),\n live: defineChannel({\n id: \"ragents.processes\",\n description: \"Der laufende Stand der Prozess\u00FCberwachung eines Runs. Rechte: runs.read und ragents.processes.read.\",\n rights: [\"runs.read\", \"ragents.processes.read\"],\n params: Type.Object({ runId }, { additionalProperties: false }),\n message: openJson<RunProcessMessage>(\"RunProcessMessage\"),\n }),\n};\n", "import type { RunProcessMessage, RunProcessSnapshot } from \"../contract.js\";\n\nexport interface RunProcessObserverOptions {\n /** Der Stand eines Runs beim Executor, der ihn ausf\u00FChrt; `signal` bricht die Abfrage dort ab. */\n snapshot: (runId: string, signal: AbortSignal) => Promise<RunProcessSnapshot>;\n pollIntervalMs: number;\n}\n\nexport type RunProcessListener = (message: RunProcessMessage) => void;\n\ninterface RunWatch {\n listeners: Set<RunProcessListener>;\n fresh: Set<RunProcessListener>;\n last: string | undefined;\n /** Die laufende Abfrage dieses Runs; ein h\u00E4ngender Executor h\u00E4lt nur sie auf. */\n polling: Promise<void> | undefined;\n controller: AbortController | undefined;\n}\n\n/** So viele Takte darf eine Abfrage dauern, bevor sie als gescheitert gilt. */\nconst SNAPSHOT_TIMEOUT_TICKS = 5;\n\nconst messageOf = (error: unknown): string => error instanceof Error ? error.message : String(error);\n\n/** Fragt je Takt den Stand jedes beobachteten Runs bei seinem Executor ab, jeden f\u00FCr sich und mit Zeitgrenze, und meldet nur \u00C4nderungen. */\nexport class RunProcessObserver {\n readonly #options: RunProcessObserverOptions;\n readonly #watches = new Map<string, RunWatch>();\n #timer: NodeJS.Timeout | undefined;\n #stopped = false;\n\n constructor(options: RunProcessObserverOptions) {\n this.#options = options;\n }\n\n observe(runId: string, signal?: AbortSignal): Promise<RunProcessSnapshot> {\n return this.#bounded(runId, signal);\n }\n\n watch(runId: string, listener: RunProcessListener): () => void {\n if (this.#stopped) throw new Error(\"Die Prozess\u00FCberwachung ist beendet\");\n let watch = this.#watches.get(runId);\n if (!watch) {\n watch = { listeners: new Set(), fresh: new Set(), last: undefined, polling: undefined, controller: undefined };\n this.#watches.set(runId, watch);\n }\n watch.listeners.add(listener);\n watch.fresh.add(listener);\n this.#ensureTimer();\n void this.#poll(runId, watch);\n return () => {\n const current = this.#watches.get(runId);\n if (!current) return;\n current.listeners.delete(listener);\n current.fresh.delete(listener);\n if (current.listeners.size === 0) {\n this.#watches.delete(runId);\n current.controller?.abort();\n }\n if (this.#watches.size === 0) this.#clearTimer();\n };\n }\n\n watchedRuns(): readonly string[] {\n return [...this.#watches.keys()];\n }\n\n async shutdown(): Promise<void> {\n this.#stopped = true;\n this.#clearTimer();\n const watches = [...this.#watches.values()];\n this.#watches.clear();\n for (const watch of watches) watch.controller?.abort();\n await Promise.allSettled(watches.map((watch) => watch.polling));\n }\n\n #ensureTimer(): void {\n if (this.#timer || this.#watches.size === 0) return;\n this.#timer = setInterval(() => {\n for (const [runId, watch] of this.#watches) void this.#poll(runId, watch);\n }, this.#options.pollIntervalMs);\n this.#timer.unref();\n }\n\n #clearTimer(): void {\n if (!this.#timer) return;\n clearInterval(this.#timer);\n this.#timer = undefined;\n }\n\n #poll(runId: string, watch: RunWatch): Promise<void> {\n if (watch.polling) return watch.polling;\n const controller = new AbortController();\n watch.controller = controller;\n watch.polling = this.#bounded(runId, controller.signal)\n .then((snapshot): RunProcessMessage => ({ kind: \"snapshot\", snapshot }), (error: unknown): RunProcessMessage => ({ kind: \"error\", error: messageOf(error) }))\n .then((message) => {\n if (!controller.signal.aborted && this.#watches.get(runId) === watch) this.#publish(watch, runId, message);\n })\n .finally(() => {\n watch.polling = undefined;\n watch.controller = undefined;\n });\n return watch.polling;\n }\n\n /** Eine Abfrage endet sp\u00E4testens nach ihrer Zeitgrenze; der Abbruch erreicht dabei auch den Executor. */\n #bounded(runId: string, signal: AbortSignal | undefined): Promise<RunProcessSnapshot> {\n const timeoutMs = this.#options.pollIntervalMs * SNAPSHOT_TIMEOUT_TICKS;\n const controller = new AbortController();\n const forward = (): void => controller.abort(signal?.reason);\n signal?.addEventListener(\"abort\", forward, { once: true });\n let timer: NodeJS.Timeout | undefined;\n const deadline = new Promise<never>((_settle, fail) => {\n timer = setTimeout(() => {\n const error = new Error(`Der Executor des Runs ${runId} hat die Prozessabfrage nicht innerhalb von ${timeoutMs / 1000} s beantwortet`);\n fail(error);\n controller.abort(error);\n }, timeoutMs);\n });\n return Promise.race([this.#options.snapshot(runId, controller.signal), deadline]).finally(() => {\n clearTimeout(timer);\n signal?.removeEventListener(\"abort\", forward);\n });\n }\n\n #publish(watch: RunWatch, runId: string, message: RunProcessMessage): void {\n const serialized = JSON.stringify(message.kind === \"snapshot\"\n ? { kind: message.kind, processes: message.snapshot.processes }\n : message);\n const changed = serialized !== watch.last;\n watch.last = serialized;\n if (changed && message.kind === \"error\") console.error(`Prozess\u00FCberwachung f\u00FCr ${runId}: ${message.error}`);\n for (const listener of watch.listeners) {\n if (changed || watch.fresh.has(listener)) listener(message);\n }\n watch.fresh.clear();\n }\n}\n", "import { DomainError, implement, implementChannel, type AccessContext, type ChannelContribution, type MethodContribution } from \"@ragents/engine\";\nimport { processesContracts, type RunProcessMessage, type RunProcessSnapshot } from \"../contract.js\";\n\nexport interface ProcessObservation {\n observe: (runId: string, signal?: AbortSignal) => Promise<RunProcessSnapshot>;\n watch: (runId: string, listener: (message: RunProcessMessage) => void) => () => void;\n}\n\nexport interface ProcessMethodOptions {\n observer: ProcessObservation;\n /** Die Prozesse liegen im Arbeitsbereich des Runs; wer ihn nicht sehen darf, sieht auch sie nicht. */\n ensureWorkspaceAccess: (access: AccessContext, runId: string) => void;\n /** Beendet beim Executor des Runs; der Abbruch der Anfrage erreicht ihn \u00FCber `signal`. */\n terminate: (runId: string, processId: string, signal: AbortSignal) => Promise<void>;\n}\n\nexport const createProcessMethods = (options: ProcessMethodOptions): MethodContribution[] => [\n implement(processesContracts.snapshot, ({ runId }, { access, signal }) => {\n options.ensureWorkspaceAccess(access, runId);\n return options.observer.observe(runId, signal);\n }),\n implement(processesContracts.stop, async ({ runId, processId }, { access, signal }) => {\n for (const right of processesContracts.stop.rights) {\n if (!access.can(right)) throw new DomainError(\"forbidden\", \"Das Beenden von Prozessen ist nicht erlaubt\", 403);\n }\n if (signal.aborted) throw new Error(\"Die Prozess-Stopp-Anfrage wurde abgebrochen\");\n options.ensureWorkspaceAccess(access, runId);\n await options.terminate(runId, processId, signal);\n return null;\n }),\n];\n\nexport const createProcessChannel = (options: Pick<ProcessMethodOptions, \"observer\" | \"ensureWorkspaceAccess\">): ChannelContribution =>\n implementChannel(processesContracts.live, ({ runId }, emit, { access }) => {\n options.ensureWorkspaceAccess(access, runId);\n return options.observer.watch(runId, emit);\n });\n", "import { PROCESS_OPERATIONS } from \"@ragents/workspace-executor\";\nimport type { SandboxServices } from \"@ragents/host/plugin-support/workspace-sandbox-host.js\";\nimport type { RunProcessSnapshot } from \"../contract.js\";\n\nexport interface RunProcesses {\n snapshot: (runId: string, signal?: AbortSignal) => Promise<RunProcessSnapshot>;\n terminate: (runId: string, processId: string, signal: AbortSignal) => Promise<void>;\n /** Ist der Arbeitsplatz nicht erreichbar, holt der Stopp des Runs (`stopRun` seines Executors) das Beenden nach, sobald er wieder da ist. */\n stopAll: (runId: string, signal?: AbortSignal) => Promise<void>;\n}\n\n/** Die Prozesse eines Runs liegen beim Executor, der ihn ausf\u00FChrt; wo das ist, entscheidet allein seine Bindung. */\nexport const runProcessesOf = (sandbox: Pick<SandboxServices, \"execute\">): RunProcesses => ({\n snapshot: async (runId, signal) => {\n const observed = await sandbox.execute(runId, PROCESS_OPERATIONS.snapshot, {}, signal ? { signal } : {}) as Omit<RunProcessSnapshot, \"runId\">;\n return { runId, ...observed };\n },\n terminate: async (runId, processId, signal) => {\n await sandbox.execute(runId, PROCESS_OPERATIONS.stop, { processId }, { signal });\n },\n stopAll: async (runId, signal) => {\n await sandbox.execute(runId, PROCESS_OPERATIONS.stopAll, {}, { whenReachable: true, ...(signal ? { signal } : {}) });\n },\n});\n"],
|
|
5
|
+
"mappings": ";;;;AACA,SAAS,2BAA2B;AAEpC,SAAS,4BAA4B;;;ACHrC,SAAS,YAAY;AACrB,SAAS,eAAe,uBAAuB;AAC/C,SAAS,gBAAgB;AAElB,IAAM,sBAAsB;AA6BnC,IAAM,QAAQ,KAAK,OAAO,EAAE,WAAW,GAAG,WAAW,IAAI,aAAa,mBAAmB,CAAC;AAEnF,IAAM,qBAA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QA,QAAO,MAAM;AAAA,MACnE,kBAAkB,CAAC,EAAE,OAAAA,QAAO,OAAO,MAAM,UAAU,QAAQA,QAAO,MAAM;AAAA,MACxE,eAAe,CAAC,EAAE,OAAAA,OAAM,MAAM,UAAU,QAAQA,MAAK;AAAA,MACrD,UAAU,MAAM,SAAS,SAAS;AAAA,IACpC,CAAC;AAAA,EACH;AACF;AAEO,IAAM,SAAuB,EAAE,QAAQ,MAAM,gBAAgB;",
|
|
6
|
+
"names": ["runId", "runId", "runId", "runId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["[&>svg]:flex-none","[&_svg]:size-2.5","[overflow-wrap:anywhere]","access","activate","active","activeElement","additionalProperties","address","aktiven","alert","allOpen","anderen","anzeigen","aria-hidden","aria-label","as","async","auf","aus","await","background","beenden","beendet","beobachtet","beobachteten","bg-card/78","bg-primary/14","boolean","border","border-border-soft","busy","button","catch","caught","cause","className","cn","command","configuredPlugin","const","controller","current","currentColor","data-[origin=background]:[border-right-style:dashed]","data-[origin=background]:border-dashed","data-hidden","data-origin","data-process-id","de-DE","defineOperation","dem","der","des","description","descriptor","dialogRef","disabled","eine","einem","eines","error","event","export","fallback","false","fehlen","fill","finally","flex","flex-1","flex-col","flex-none","focus-visible:bg-primary/28","focused","font-bold","font-medium","for","from","function","gap-1.5","gap-3","h-6","hat","header","height","hidden","hostname","hover:bg-primary/28","href","icon-xs","id","idle","if","ihren","im","import","in","inline-flex","input","inspect","instanceof","interface","isConnected","isRecord","iso","ist","items-center","items-stretch","key","kind","kindLabel","label","laufende","length","live","m7","max-md:hidden","max-md:inline","max-md:not-first:hidden","max-w-62","max-w-none","maxLength","md:data-[hidden=false]:hidden","message","messageFrom","min-w-0","min-w-5","minLength","mit","neuen","new","none","noreferrer","not-italic","number","observedAt","oder","of","offenen","onClick","onFocusCapture","onOpenChange","onStop","open","openJson","order","origin","originText","outline-none","overflow-hidden","p-0.75","params","parsed","pattern","pid","pillClass","pl-2.5","port","portClass","portFrom","ports","pr-0.5","preventScroll","process","processFrom","processHeader","processId","processes","processesContracts","px-1.5","py-px","querySelector","querySelectorAll","react","read","readRight","readonly","ref","rel","rememberFocus","renderProcess","requests","requiresWorkspace","result","return","rights","role","rootRef","round","rounded-full","rpc","run","runId","rx","scope","seenSince","seit","self-stretch","serviceUrl","session","sessionHeaders","setAllOpen","setState","setStops","shown","signal","size","size-5","snapshot","snapshotFrom","state","status","stop","stopClass","string","stroke","strokeLinecap","strokeLinejoin","strokeWidth","tabIndex","tabular-nums","target","text-[0.56rem]","text-[0.65rem]","text-destructive","text-ellipsis","text-foreground","text-muted-foreground","text-xs","throw","timeText","title","titleOf","tool-call","toolbar","tracking-[0.035em]","true","try","type","typebox","typeof","unbekannte","und","undefined","underline","underline-offset-2","unlesbar","uppercase","useAccess","useRef","useRunProcesses","useState","value","viewBox","visibleProcesses","void","w-35","w-42","w-full","webPlugin","weiter","weitere","whitespace-nowrap","width","wird","writable","write","zu"]
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var t=(e,r)=>{let s=globalThis.__ragentsHostModules?.[e];if(s===void 0)throw new Error(`Der Host stellt ${e} nicht bereit`);if(!(r in s))throw new Error(`Der Host stellt ${r} aus ${e} nicht bereit; das Bundle ist gegen einen neueren Host gebaut`);return s[r]};var m=t("typebox","Type");var z=t("@ragents/engine/src/rpc/contract","defineChannel");var D=t("@ragents/engine/src/rpc/contract","defineOperation");var w=t("@ragents/engine/src/http/contracts","openJson");var Q="ragents.processes",H=m.String({minLength:1,maxLength:64,description:"Kennung des Runs"}),F={snapshot:D({id:"ragents.processes.snapshot",description:"Die beobachteten Prozesse eines Runs mit ihren offenen Ports. Rechte: runs.read und ragents.processes.read.",rights:["runs.read","ragents.processes.read"],input:m.Object({runId:H},{additionalProperties:!1}),result:w("RunProcessSnapshot")}),stop:D({id:"ragents.processes.stop",description:"Einen Prozess des Runs beenden. Rechte: runs.read, runs.write und runs.inspect.",rights:["runs.read","runs.write","runs.inspect"],input:m.Object({runId:H,processId:m.String({pattern:"^[1-9][0-9]*-[a-f0-9]{64}$",description:"Kennung des Prozesses aus dem Stand"})},{additionalProperties:!1}),result:m.Null()}),live:z({id:"ragents.processes",description:"Der laufende Stand der Prozess\xFCberwachung eines Runs. Rechte: runs.read und ragents.processes.read.",rights:["runs.read","ragents.processes.read"],params:m.Object({runId:H},{additionalProperties:!1}),message:w("RunProcessMessage")})};var C=t("react","useEffect");var M=t("react","useLayoutEffect");var c=t("react","useRef");var I=t("react","useState");var S=t("@ragents/web/AccessContext","useAccess");var B=t("@ragents/web/ui","Dialog");var U=t("@ragents/web/ui","DialogBody");var $=t("@ragents/web/ui","DialogContent");var j=t("@ragents/web/ui","DialogHeader");var W=t("@ragents/web/ui","DialogTitle");var K=t("@ragents/web/ui","StopButton");var h=t("@ragents/web/ui","cn");var E=t("@ragents/web/Toolbar","ToolbarCopy");var y=t("@ragents/web/Toolbar","ToolbarItem");var A=t("@ragents/web/Toolbar","ToolbarLabel");var L=t("@ragents/web/Toolbar","ToolbarText");var O=t("@ragents/web/rpc","rpc");var b=t("@ragents/web/lib/guards","isRecord");var X=4,le=["tool-call","background"],de=e=>{if(!b(e)||typeof e.port!="number"||typeof e.address!="string")throw new Error("Ein Port-Eintrag der Prozess\xFCberwachung ist unlesbar");return{port:e.port,address:e.address}},ue=e=>{if(!b(e)||typeof e.id!="string"||!e.id||typeof e.pid!="number"||typeof e.label!="string"||typeof e.command!="string"||typeof e.seenSince!="string"||!le.includes(e.origin)||!Array.isArray(e.ports))throw new Error("Ein Prozess-Eintrag der Prozess\xFCberwachung ist unlesbar");return{id:e.id,pid:e.pid,label:e.label,command:e.command,origin:e.origin,ports:e.ports.map(de),seenSince:e.seenSince}},pe=e=>{if(!b(e)||typeof e.runId!="string"||typeof e.observedAt!="string"||!Array.isArray(e.processes))throw new Error("Der Stand der Prozess\xFCberwachung ist unlesbar");return{runId:e.runId,observedAt:e.observedAt,processes:e.processes.map(ue)}},Y=e=>{if(!b(e))throw new Error("Die Nachricht der Prozess\xFCberwachung ist unlesbar");if(e.kind==="error"&&typeof e.error=="string")return{kind:"error",error:e.error};if(e.kind==="snapshot")return{kind:"snapshot",snapshot:pe(e.snapshot)};throw new Error("Die Nachricht der Prozess\xFCberwachung hat eine unbekannte Art")},ee=(e,r)=>`http://${e.includes(":")?`[${e}]`:e}:${r}/`,V=e=>e.ports.length>0?"Dienst":"Prozess",ie=e=>e==="background"?"l\xE4uft im Hintergrund weiter":"l\xE4uft in einem Werkzeugaufruf",me=e=>{let r=new Date(e);return Number.isNaN(r.getTime())?e:r.toLocaleTimeString("de-DE")},_=e=>{let r=e.ports.length>0?`
|
|
2
|
+
Lauscht auf ${e.ports.map(s=>`${s.address}:${s.port}`).join(", ")}`:"";return`${e.command}
|
|
3
|
+
PID ${e.pid}, ${ie(e.origin)}, beobachtet seit ${me(e.seenSince)}${r}`},te=e=>({shown:e.slice(0,X),hidden:Math.max(0,e.length-X)});var q=t("react/jsx-runtime","Fragment");var a=t("react/jsx-runtime","jsx");var n=t("react/jsx-runtime","jsxs");var re={snapshot:void 0,error:void 0},xe="inline-flex h-6 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border-soft bg-card/78 pl-2.5 pr-0.5 text-xs font-medium text-muted-foreground data-[origin=background]:border-dashed [&>svg]:flex-none",ce="flex-none rounded-full bg-primary/14 px-1.5 py-px text-foreground tabular-nums underline underline-offset-2 hover:bg-primary/28 focus-visible:bg-primary/28",ge="size-5 min-w-5 rounded-full p-0.75 [&_svg]:size-2.5",be=e=>{let[r,s]=I(re);return C(()=>(s(re),O.subscribe(F.live,{runId:e},l=>{try{let f=Y(l);if(f.kind==="snapshot"&&f.snapshot.runId!==e)throw new Error("Der Prozessstand geh\xF6rt zu einem anderen Run");s(u=>f.kind==="snapshot"?{snapshot:f.snapshot,error:void 0}:{snapshot:u.snapshot,error:f.error})}catch(f){s(u=>({...u,error:f instanceof Error?f.message:String(f)}))}},l=>s(f=>({...f,error:l})))),[e]),r};function oe(){return n("svg",{"aria-hidden":!0,fill:"none",height:"12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",width:"12",children:[a("rect",{height:"16",rx:"2",width:"18",x:"3",y:"4"}),a("path",{d:"m7 9 3 3-3 3M13 15h4"})]})}function Ie({process:e,state:r,writable:s,onStop:l,toolbar:f=!1}){let u=a(K,{busy:r?.busy===!0,className:ge,disabled:!s||r?.busy,label:r?.busy?`${e.label} wird beendet`:`${e.label} beenden`,onClick:l,size:"icon-xs",title:s?r?.busy?"Wird beendet ...":`${e.label} beenden`:"Zum Beenden fehlen Schreib- oder Inspektionsrechte"}),d=e.ports.map(p=>n("a",{className:ce,href:ee(window.location.hostname,p.port),rel:"noreferrer",target:"_blank",title:`${p.address}:${p.port} im neuen Tab \xF6ffnen`,children:[":",p.port]},`${p.address}:${p.port}`));return n("div",{className:h("flex min-w-0 flex-col",f?"flex-none self-stretch max-md:not-first:hidden":"w-full"),"data-process-id":e.id,children:[f?n(y,{className:"max-w-none flex-1 data-[origin=background]:[border-right-style:dashed]","data-origin":e.origin,title:_(e),children:[a(oe,{}),n(E,{className:"w-35 flex-none",children:[a(A,{children:V(e)}),a(L,{children:e.label})]}),d,u]}):n("span",{className:h(xe,"w-full"),"data-origin":e.origin,title:_(e),children:[a(oe,{}),a("em",{className:"flex-none text-[0.56rem] font-bold uppercase not-italic tracking-[0.035em]",children:V(e)}),a("span",{className:"min-w-0 flex-1 overflow-hidden text-ellipsis text-foreground",children:e.label}),d,u]}),r?.error&&a("span",{className:h("text-[0.65rem] text-destructive",f?"max-w-62 overflow-hidden text-ellipsis whitespace-nowrap":"[overflow-wrap:anywhere]"),role:"alert",title:r.error,children:r.error})]})}function he({runId:e}){let r=S(),s=r.can("runs.write")&&r.can("runs.inspect"),l=be(e),[f,u]=I({}),[d,p]=I(!1),P=c(new Map),R=c(null),N=c(null),T=c(null),k=c(null),g=l.snapshot?.processes??[],{shown:G,hidden:v}=te(g);C(()=>{let o=P.current;return()=>{for(let i of o.values())i.abort();o.clear()}},[]),M(()=>{if(!T.current||T.current.isConnected||document.activeElement!==document.body)return;let o=(d?N.current:R.current)?.querySelector("button:not(:disabled), a[href]")??(d?N.current:null)??k.current;T.current=null,o?.focus({preventScroll:!0})},[l.snapshot,d]);let J=o=>{if(!(o.target instanceof HTMLElement))return;T.current=o.target;let i=R.current?.closest("header");k.current=[...i?.querySelectorAll("button:not(:disabled), a[href]")??[]].find(x=>!R.current?.contains(x))??null},fe=async o=>{if(!s||P.current.has(o.id)||f[o.id]?.busy)return;let i=new AbortController;P.current.set(o.id,i),u(x=>({...x,[o.id]:{busy:!0}}));try{await O.call(F.stop,{runId:e,processId:o.id},{signal:i.signal})}catch(x){i.signal.aborted||u(ne=>({...ne,[o.id]:{error:x instanceof Error?x.message:String(x)}}))}finally{P.current.delete(o.id)}},Z=(o,i=!1)=>a(Ie,{process:o,state:f[o.id],writable:s,toolbar:i,onStop:()=>{fe(o)}},o.id);return G.length===0&&l.error===void 0&&!d?null:n(q,{children:[n("div",{"aria-label":"Prozesse und Ports des Runs",className:"flex min-w-0 flex-none items-stretch self-stretch",ref:R,onFocusCapture:J,children:[G.map(o=>Z(o,!0)),(g.length>1||d)&&n(y,{as:"button",className:"md:data-[hidden=false]:hidden","data-hidden":v>0||d,type:"button",onClick:()=>p(!0),title:"Alle Prozesse des Runs anzeigen",children:[a("span",{className:"max-md:hidden",children:v>0?`+${v} weitere`:"Prozesse"}),n("span",{className:"hidden max-md:inline",children:["Alle ",g.length]})]}),l.error!==void 0&&a(y,{className:"w-42 text-destructive",role:"status",title:l.error,children:n(E,{children:[a(A,{children:"Prozesse"}),a(L,{children:"\xDCberwachung gest\xF6rt"})]})})]}),d&&a(B,{open:!0,onOpenChange:o=>{o||(p(!1),g.length===0&&requestAnimationFrame(()=>k.current?.focus({preventScroll:!0})))},children:n($,{scope:"run",children:[a(j,{children:a(W,{children:"Prozesse und Ports"})}),n(U,{className:"flex flex-col gap-3 outline-none",ref:N,tabIndex:-1,onFocusCapture:J,children:[g.length>0?g.map(o=>Z(o)):a("p",{role:"status",children:"Keine aktiven Prozesse."}),l.error!==void 0&&a("p",{className:"text-destructive",role:"alert",children:l.error})]})]})})]})}var ae=()=>function({session:r}){let s=S();return s.can("runs.read")&&s.can("ragents.processes.read")?a(he,{runId:r.session.id},r.session.id):null};var ye=e=>({...e,sessionHeaders:[{readRight:"ragents.processes.read",requiresWorkspace:!0,id:"ragents.processes.live",order:110,Header:ae()}]}),se={id:Q},gr={...se,activate:()=>ye(se)};export{gr as webPlugin};
|
|
4
|
+
//# sourceMappingURL=/plugins/ragents.processes/web/index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["ragents-host-read:read", "ragents-host-value:typebox#Type", "ragents-host-value:@ragents/engine/src/rpc/contract#defineChannel", "ragents-host-value:@ragents/engine/src/rpc/contract#defineOperation", "ragents-host-value:@ragents/engine/src/http/contracts#openJson", "../../../plugins/ragents.processes/contract.ts", "ragents-host-value:react#useEffect", "ragents-host-value:react#useLayoutEffect", "ragents-host-value:react#useRef", "ragents-host-value:react#useState", "ragents-host-value:@ragents/web/AccessContext#useAccess", "ragents-host-value:@ragents/web/ui#Dialog", "ragents-host-value:@ragents/web/ui#DialogBody", "ragents-host-value:@ragents/web/ui#DialogContent", "ragents-host-value:@ragents/web/ui#DialogHeader", "ragents-host-value:@ragents/web/ui#DialogTitle", "ragents-host-value:@ragents/web/ui#StopButton", "ragents-host-value:@ragents/web/ui#cn", "ragents-host-value:@ragents/web/Toolbar#ToolbarCopy", "ragents-host-value:@ragents/web/Toolbar#ToolbarItem", "ragents-host-value:@ragents/web/Toolbar#ToolbarLabel", "ragents-host-value:@ragents/web/Toolbar#ToolbarText", "ragents-host-value:@ragents/web/rpc#rpc", "ragents-host-value:@ragents/web/lib/guards#isRecord", "../../../plugins/ragents.processes/web/processes.ts", "ragents-host-value:react/jsx-runtime#Fragment", "ragents-host-value:react/jsx-runtime#jsx", "ragents-host-value:react/jsx-runtime#jsxs", "../../../plugins/ragents.processes/web/ProcessHeader.tsx", "../../../plugins/ragents.processes/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(\"typebox\", \"Type\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineChannel\");\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/http/contracts\", \"openJson\");\n", "import { Type } from \"typebox\";\nimport { defineChannel, defineOperation } from \"@ragents/engine/src/rpc/contract\";\nimport { openJson } from \"@ragents/engine/src/http/contracts\";\n\nexport const PROCESSES_PLUGIN_ID = \"ragents.processes\";\n\nexport interface RunProcessPort {\n port: number;\n address: string;\n}\n\nexport type RunProcessOrigin = \"tool-call\" | \"background\";\n\nexport interface RunProcess {\n id: string;\n pid: number;\n label: string;\n command: string;\n origin: RunProcessOrigin;\n ports: RunProcessPort[];\n seenSince: string;\n}\n\nexport interface RunProcessSnapshot {\n runId: string;\n observedAt: string;\n processes: RunProcess[];\n}\n\nexport type RunProcessMessage =\n | { kind: \"snapshot\"; snapshot: RunProcessSnapshot }\n | { kind: \"error\"; error: string };\n\nconst runId = Type.String({ minLength: 1, maxLength: 64, description: \"Kennung des Runs\" });\n\nexport const processesContracts = {\n snapshot: defineOperation({\n id: \"ragents.processes.snapshot\",\n description: \"Die beobachteten Prozesse eines Runs mit ihren offenen Ports. Rechte: runs.read und ragents.processes.read.\",\n rights: [\"runs.read\", \"ragents.processes.read\"],\n input: Type.Object({ runId }, { additionalProperties: false }),\n result: openJson<RunProcessSnapshot>(\"RunProcessSnapshot\"),\n }),\n stop: defineOperation({\n id: \"ragents.processes.stop\",\n description: \"Einen Prozess des Runs beenden. Rechte: runs.read, runs.write und runs.inspect.\",\n rights: [\"runs.read\", \"runs.write\", \"runs.inspect\"],\n input: Type.Object({\n runId,\n processId: Type.String({ pattern: \"^[1-9][0-9]*-[a-f0-9]{64}$\", description: \"Kennung des Prozesses aus dem Stand\" }),\n }, { additionalProperties: false }),\n result: Type.Null(),\n }),\n live: defineChannel({\n id: \"ragents.processes\",\n description: \"Der laufende Stand der Prozess\u00FCberwachung eines Runs. Rechte: runs.read und ragents.processes.read.\",\n rights: [\"runs.read\", \"ragents.processes.read\"],\n params: Type.Object({ runId }, { additionalProperties: false }),\n message: openJson<RunProcessMessage>(\"RunProcessMessage\"),\n }),\n};\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\", \"useLayoutEffect\");\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(\"@ragents/web/AccessContext\", \"useAccess\");\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\", \"DialogBody\");\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\", \"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\", \"StopButton\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"cn\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarCopy\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarLabel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarText\");\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/lib/guards\", \"isRecord\");\n", "import { isRecord } from \"@ragents/web/lib/guards\";\nimport type { RunProcess, RunProcessMessage, RunProcessPort, RunProcessSnapshot } from \"../contract\";\n\nexport const VISIBLE_PROCESSES = 4;\n\nconst ORIGINS = [\"tool-call\", \"background\"] as const;\n\nconst portFrom = (value: unknown): RunProcessPort => {\n if (!isRecord(value) || typeof value.port !== \"number\" || typeof value.address !== \"string\") {\n throw new Error(\"Ein Port-Eintrag der Prozess\u00FCberwachung ist unlesbar\");\n }\n return { port: value.port, address: value.address };\n};\n\nconst processFrom = (value: unknown): RunProcess => {\n if (!isRecord(value) || typeof value.id !== \"string\" || !value.id || typeof value.pid !== \"number\" || typeof value.label !== \"string\"\n || typeof value.command !== \"string\" || typeof value.seenSince !== \"string\"\n || !ORIGINS.includes(value.origin as RunProcess[\"origin\"]) || !Array.isArray(value.ports)) {\n throw new Error(\"Ein Prozess-Eintrag der Prozess\u00FCberwachung ist unlesbar\");\n }\n return {\n id: value.id,\n pid: value.pid,\n label: value.label,\n command: value.command,\n origin: value.origin as RunProcess[\"origin\"],\n ports: value.ports.map(portFrom),\n seenSince: value.seenSince,\n };\n};\n\nconst snapshotFrom = (value: unknown): RunProcessSnapshot => {\n if (!isRecord(value) || typeof value.runId !== \"string\" || typeof value.observedAt !== \"string\"\n || !Array.isArray(value.processes)) {\n throw new Error(\"Der Stand der Prozess\u00FCberwachung ist unlesbar\");\n }\n return { runId: value.runId, observedAt: value.observedAt, processes: value.processes.map(processFrom) };\n};\n\nexport const messageFrom = (value: unknown): RunProcessMessage => {\n if (!isRecord(value)) throw new Error(\"Die Nachricht der Prozess\u00FCberwachung ist unlesbar\");\n if (value.kind === \"error\" && typeof value.error === \"string\") return { kind: \"error\", error: value.error };\n if (value.kind === \"snapshot\") return { kind: \"snapshot\", snapshot: snapshotFrom(value.snapshot) };\n throw new Error(\"Die Nachricht der Prozess\u00FCberwachung hat eine unbekannte Art\");\n};\n\nexport const serviceUrl = (hostname: string, port: number): string =>\n `http://${hostname.includes(\":\") ? `[${hostname}]` : hostname}:${port}/`;\n\nexport const kindLabel = (process: RunProcess): string => process.ports.length > 0 ? \"Dienst\" : \"Prozess\";\n\nconst originText = (origin: RunProcess[\"origin\"]): string =>\n origin === \"background\" ? \"l\u00E4uft im Hintergrund weiter\" : \"l\u00E4uft in einem Werkzeugaufruf\";\n\nconst timeText = (iso: string): string => {\n const parsed = new Date(iso);\n return Number.isNaN(parsed.getTime()) ? iso : parsed.toLocaleTimeString(\"de-DE\");\n};\n\nexport const titleOf = (process: RunProcess): string => {\n const ports = process.ports.length > 0\n ? `\\nLauscht auf ${process.ports.map((port) => `${port.address}:${port.port}`).join(\", \")}`\n : \"\";\n return `${process.command}\\nPID ${process.pid}, ${originText(process.origin)}, beobachtet seit ${timeText(process.seenSince)}${ports}`;\n};\n\nexport interface VisibleProcesses {\n shown: readonly RunProcess[];\n hidden: number;\n}\n\nexport const visibleProcesses = (processes: readonly RunProcess[]): VisibleProcesses => ({\n shown: processes.slice(0, VISIBLE_PROCESSES),\n hidden: Math.max(0, processes.length - VISIBLE_PROCESSES),\n});\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 { useEffect, useLayoutEffect, useRef, useState, type ComponentType, type FocusEvent } from \"react\";\nimport { useAccess } from \"@ragents/web/AccessContext\";\nimport type { SessionHeaderContext } from \"@ragents/web/PluginRegistry\";\nimport { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, StopButton, cn } from \"@ragents/web/ui\";\nimport { ToolbarCopy, ToolbarItem, ToolbarLabel, ToolbarText } from \"@ragents/web/Toolbar\";\nimport { rpc } from \"@ragents/web/rpc\";\nimport { processesContracts, type RunProcess, type RunProcessSnapshot } from \"../contract\";\nimport { kindLabel, messageFrom, serviceUrl, titleOf, visibleProcesses } from \"./processes\";\n\ninterface ProcessWatchState {\n snapshot: RunProcessSnapshot | undefined;\n error: string | undefined;\n}\n\nconst idle: ProcessWatchState = { snapshot: undefined, error: undefined };\n\nconst pillClass = \"inline-flex h-6 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-border-soft bg-card/78 pl-2.5 pr-0.5 text-xs font-medium text-muted-foreground data-[origin=background]:border-dashed [&>svg]:flex-none\";\nconst portClass = \"flex-none rounded-full bg-primary/14 px-1.5 py-px text-foreground tabular-nums underline underline-offset-2 hover:bg-primary/28 focus-visible:bg-primary/28\";\nconst stopClass = \"size-5 min-w-5 rounded-full p-0.75 [&_svg]:size-2.5\";\n\nconst useRunProcesses = (runId: string): ProcessWatchState => {\n const [state, setState] = useState<ProcessWatchState>(idle);\n useEffect(() => {\n setState(idle);\n return rpc.subscribe(processesContracts.live, { runId }, (data) => {\n try {\n const message = messageFrom(data);\n if (message.kind === \"snapshot\" && message.snapshot.runId !== runId) throw new Error(\"Der Prozessstand geh\u00F6rt zu einem anderen Run\");\n setState((current) => message.kind === \"snapshot\"\n ? { snapshot: message.snapshot, error: undefined }\n : { snapshot: current.snapshot, error: message.error });\n } catch (caught) {\n setState((current) => ({ ...current, error: caught instanceof Error ? caught.message : String(caught) }));\n }\n }, (message) => setState((current) => ({ ...current, error: message })));\n }, [runId]);\n return state;\n};\n\nfunction IconProcess() {\n return <svg aria-hidden fill=\"none\" height=\"12\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"1.8\" viewBox=\"0 0 24 24\" width=\"12\">\n <rect height=\"16\" rx=\"2\" width=\"18\" x=\"3\" y=\"4\" />\n <path d=\"m7 9 3 3-3 3M13 15h4\" />\n </svg>;\n}\n\ninterface StopState { busy?: boolean; error?: string }\n\nfunction ProcessPill({ process, state, writable, onStop, toolbar = false }: { process: RunProcess; state?: StopState; writable: boolean; onStop: () => void; toolbar?: boolean }) {\n const stop = <StopButton busy={state?.busy === true} className={stopClass} disabled={!writable || state?.busy}\n label={state?.busy ? `${process.label} wird beendet` : `${process.label} beenden`}\n onClick={onStop} size=\"icon-xs\"\n title={!writable ? \"Zum Beenden fehlen Schreib- oder Inspektionsrechte\" : state?.busy ? \"Wird beendet ...\" : `${process.label} beenden`} />;\n const ports = process.ports.map((port) => <a className={portClass} href={serviceUrl(window.location.hostname, port.port)}\n key={`${port.address}:${port.port}`} rel=\"noreferrer\" target=\"_blank\" title={`${port.address}:${port.port} im neuen Tab \u00F6ffnen`}>\n :{port.port}\n </a>);\n return <div className={cn(\"flex min-w-0 flex-col\", toolbar ? \"flex-none self-stretch max-md:not-first:hidden\" : \"w-full\")} data-process-id={process.id}>\n {toolbar\n ? <ToolbarItem className=\"max-w-none flex-1 data-[origin=background]:[border-right-style:dashed]\" data-origin={process.origin} title={titleOf(process)}>\n <IconProcess />\n <ToolbarCopy className=\"w-35 flex-none\">\n <ToolbarLabel>{kindLabel(process)}</ToolbarLabel>\n <ToolbarText>{process.label}</ToolbarText>\n </ToolbarCopy>\n {ports}\n {stop}\n </ToolbarItem>\n : <span className={cn(pillClass, \"w-full\")} data-origin={process.origin} title={titleOf(process)}>\n <IconProcess />\n <em className=\"flex-none text-[0.56rem] font-bold uppercase not-italic tracking-[0.035em]\">{kindLabel(process)}</em>\n <span className=\"min-w-0 flex-1 overflow-hidden text-ellipsis text-foreground\">{process.label}</span>\n {ports}\n {stop}\n </span>}\n {state?.error && <span className={cn(\"text-[0.65rem] text-destructive\", toolbar ? \"max-w-62 overflow-hidden text-ellipsis whitespace-nowrap\" : \"[overflow-wrap:anywhere]\")}\n role=\"alert\" title={state.error}>{state.error}</span>}\n </div>;\n}\n\nfunction ProcessHeaderContent({ runId }: { runId: string }) {\n const access = useAccess();\n const writable = access.can(\"runs.write\") && access.can(\"runs.inspect\");\n const state = useRunProcesses(runId);\n const [stops, setStops] = useState<Record<string, StopState>>({});\n const [allOpen, setAllOpen] = useState(false);\n const requests = useRef(new Map<string, AbortController>());\n const rootRef = useRef<HTMLDivElement>(null);\n const dialogRef = useRef<HTMLDivElement>(null);\n const focused = useRef<HTMLElement>(null);\n const fallback = useRef<HTMLElement>(null);\n const processes = state.snapshot?.processes ?? [];\n const { shown, hidden } = visibleProcesses(processes);\n useEffect(() => {\n const active = requests.current;\n return () => { for (const controller of active.values()) controller.abort(); active.clear(); };\n }, []);\n useLayoutEffect(() => {\n if (!focused.current || focused.current.isConnected || document.activeElement !== document.body) return;\n const target = (allOpen ? dialogRef.current : rootRef.current)?.querySelector<HTMLElement>(\"button:not(:disabled), a[href]\")\n ?? (allOpen ? dialogRef.current : null) ?? fallback.current;\n focused.current = null;\n target?.focus({ preventScroll: true });\n }, [state.snapshot, allOpen]);\n const rememberFocus = (event: FocusEvent<HTMLElement>) => {\n if (!(event.target instanceof HTMLElement)) return;\n focused.current = event.target;\n const header = rootRef.current?.closest(\"header\");\n fallback.current = [...(header?.querySelectorAll<HTMLElement>(\"button:not(:disabled), a[href]\") ?? [])]\n .find((element) => !rootRef.current?.contains(element)) ?? null;\n };\n const stop = async (process: RunProcess) => {\n if (!writable || requests.current.has(process.id) || stops[process.id]?.busy) return;\n const controller = new AbortController();\n requests.current.set(process.id, controller);\n setStops((current) => ({ ...current, [process.id]: { busy: true } }));\n try {\n await rpc.call(processesContracts.stop, { runId, processId: process.id }, { signal: controller.signal });\n } catch (cause) {\n if (!controller.signal.aborted) setStops((current) => ({ ...current, [process.id]: { error: cause instanceof Error ? cause.message : String(cause) } }));\n } finally { requests.current.delete(process.id); }\n };\n const renderProcess = (process: RunProcess, toolbar = false) => <ProcessPill key={process.id} process={process} state={stops[process.id]} writable={writable} toolbar={toolbar} onStop={() => { void stop(process); }} />;\n if (shown.length === 0 && state.error === undefined && !allOpen) return null;\n return <>\n <div aria-label=\"Prozesse und Ports des Runs\" className=\"flex min-w-0 flex-none items-stretch self-stretch\" ref={rootRef} onFocusCapture={rememberFocus}>\n {shown.map((process) => renderProcess(process, true))}\n {(processes.length > 1 || allOpen) && <ToolbarItem as=\"button\" className=\"md:data-[hidden=false]:hidden\" data-hidden={hidden > 0 || allOpen} type=\"button\" onClick={() => setAllOpen(true)} title=\"Alle Prozesse des Runs anzeigen\">\n <span className=\"max-md:hidden\">{hidden > 0 ? `+${hidden} weitere` : \"Prozesse\"}</span><span className=\"hidden max-md:inline\">Alle {processes.length}</span>\n </ToolbarItem>}\n {state.error !== undefined && <ToolbarItem className=\"w-42 text-destructive\" role=\"status\" title={state.error}><ToolbarCopy><ToolbarLabel>Prozesse</ToolbarLabel><ToolbarText>\u00DCberwachung gest\u00F6rt</ToolbarText></ToolbarCopy></ToolbarItem>}\n </div>\n {allOpen && <Dialog open onOpenChange={(open) => {\n if (open) return;\n setAllOpen(false);\n if (processes.length === 0) requestAnimationFrame(() => fallback.current?.focus({ preventScroll: true }));\n }}>\n <DialogContent scope=\"run\">\n <DialogHeader><DialogTitle>Prozesse und Ports</DialogTitle></DialogHeader>\n <DialogBody className=\"flex flex-col gap-3 outline-none\" ref={dialogRef} tabIndex={-1} onFocusCapture={rememberFocus}>\n {processes.length > 0 ? processes.map((process) => renderProcess(process)) : <p role=\"status\">Keine aktiven Prozesse.</p>}\n {state.error !== undefined && <p className=\"text-destructive\" role=\"alert\">{state.error}</p>}\n </DialogBody>\n </DialogContent>\n </Dialog>}\n </>;\n}\n\nexport const processHeader = (): ComponentType<SessionHeaderContext> =>\n function ProcessHeader({ session }: SessionHeaderContext) {\n const access = useAccess();\n return access.can(\"runs.read\") && access.can(\"ragents.processes.read\")\n ? <ProcessHeaderContent key={session.session.id} runId={session.session.id} /> : null;\n };\n", "import {\n type WebPlugin,\n type WebPluginDescriptor,\n} from \"@ragents/web/PluginRegistry\";\nimport { PROCESSES_PLUGIN_ID } from \"../contract\";\nimport { processHeader } from \"./ProcessHeader\";\n\nconst configuredPlugin = (descriptor: WebPluginDescriptor): WebPlugin => ({\n ...descriptor,\n sessionHeaders: [{\n readRight: \"ragents.processes.read\",\n requiresWorkspace: true,\n id: \"ragents.processes.live\",\n order: 110,\n Header: processHeader(),\n }],\n});\n\nconst descriptor: WebPluginDescriptor = { id: PROCESSES_PLUGIN_ID };\n\nexport const webPlugin: WebPlugin = {\n ...descriptor,\n activate: () => configuredPlugin(descriptor),\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,UAAW,MAAM,ECArC,IAAOC,EAAQC,EAAK,mCAAoC,eAAe,ECAvE,IAAOC,EAAQC,EAAK,mCAAoC,iBAAiB,ECAzE,IAAOC,EAAQC,EAAK,qCAAsC,UAAU,ECG7D,IAAMC,EAAsB,oBA6B7BC,EAAQC,EAAK,OAAO,CAAE,UAAW,EAAG,UAAW,GAAI,YAAa,kBAAmB,CAAC,EAE7EC,EAAqB,CAChC,SAAUC,EAAgB,CACxB,GAAI,6BACJ,YAAa,8GACb,OAAQ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CA,EAAQ,QAAQ,EAA+B,EAAK,IACrF,EClJF,IAAMC,GAAoBC,IAAgD,CACxE,GAAGA,EACH,eAAgB,CAAC,CACf,UAAW,yBACX,kBAAmB,GACnB,GAAI,yBACJ,MAAO,IACP,OAAQC,GAAc,CACxB,CAAC,CACH,GAEMD,GAAkC,CAAE,GAAIE,CAAoB,EAErDC,GAAuB,CAClC,GAAGH,GACH,SAAU,IAAMD,GAAiBC,EAAU,CAC7C",
|
|
6
|
+
"names": ["read", "specifier", "name", "module", "typebox_Type_default", "read", "contract_defineChannel_default", "read", "contract_defineOperation_default", "read", "contracts_openJson_default", "read", "PROCESSES_PLUGIN_ID", "runId", "typebox_Type_default", "processesContracts", "contract_defineOperation_default", "contracts_openJson_default", "contract_defineChannel_default", "react_useEffect_default", "read", "react_useLayoutEffect_default", "read", "react_useRef_default", "read", "react_useState_default", "read", "AccessContext_useAccess_default", "read", "ui_Dialog_default", "read", "ui_DialogBody_default", "read", "ui_DialogContent_default", "read", "ui_DialogHeader_default", "read", "ui_DialogTitle_default", "read", "ui_StopButton_default", "read", "ui_cn_default", "read", "Toolbar_ToolbarCopy_default", "read", "Toolbar_ToolbarItem_default", "read", "Toolbar_ToolbarLabel_default", "read", "Toolbar_ToolbarText_default", "read", "rpc_rpc_default", "read", "guards_isRecord_default", "read", "VISIBLE_PROCESSES", "ORIGINS", "portFrom", "value", "guards_isRecord_default", "processFrom", "snapshotFrom", "messageFrom", "serviceUrl", "hostname", "port", "kindLabel", "process", "originText", "origin", "timeText", "iso", "parsed", "titleOf", "ports", "visibleProcesses", "processes", "jsx_runtime_Fragment_default", "read", "jsx_runtime_jsx_default", "read", "jsx_runtime_jsxs_default", "read", "idle", "pillClass", "portClass", "stopClass", "useRunProcesses", "runId", "state", "setState", "react_useState_default", "react_useEffect_default", "rpc_rpc_default", "processesContracts", "data", "message", "messageFrom", "current", "caught", "IconProcess", "jsx_runtime_jsxs_default", "jsx_runtime_jsx_default", "ProcessPill", "process", "writable", "onStop", "toolbar", "stop", "ui_StopButton_default", "ports", "port", "serviceUrl", "ui_cn_default", "Toolbar_ToolbarItem_default", "titleOf", "Toolbar_ToolbarCopy_default", "Toolbar_ToolbarLabel_default", "kindLabel", "Toolbar_ToolbarText_default", "ProcessHeaderContent", "access", "AccessContext_useAccess_default", "stops", "setStops", "allOpen", "setAllOpen", "requests", "react_useRef_default", "rootRef", "dialogRef", "focused", "fallback", "processes", "shown", "hidden", "visibleProcesses", "active", "controller", "react_useLayoutEffect_default", "target", "rememberFocus", "event", "header", "element", "cause", "renderProcess", "jsx_runtime_Fragment_default", "ui_Dialog_default", "open", "ui_DialogContent_default", "ui_DialogHeader_default", "ui_DialogTitle_default", "ui_DialogBody_default", "processHeader", "session", "configuredPlugin", "descriptor", "processHeader", "PROCESSES_PLUGIN_ID", "webPlugin"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# RAgents
|
|
2
|
+
|
|
3
|
+
You are running in RAgents: a workshop in which you talk to the user as a coordinator and, when
|
|
4
|
+
needed, spawn further actors, observe their events and give them ordinary inputs.
|
|
5
|
+
|
|
6
|
+
Always write user-facing replies in the USER'S language, no matter which language these
|
|
7
|
+
instructions are written in.
|
|
8
|
+
|
|
9
|
+
What exactly you are supposed to do is described in the following sections.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": 3,
|
|
3
|
+
"id": "ragents.product",
|
|
4
|
+
"api": 6,
|
|
5
|
+
"hostNames": {
|
|
6
|
+
"server": {
|
|
7
|
+
"@ragents/engine": [
|
|
8
|
+
"builtinProfiles"
|
|
9
|
+
],
|
|
10
|
+
"@ragents/host/plugin-support/chat-display-policy": [
|
|
11
|
+
"chatDisplayEnvDescriptors",
|
|
12
|
+
"chatDisplayPolicyFromEnvironment"
|
|
13
|
+
],
|
|
14
|
+
"@ragents/host/plugin-support/model-aliases": [
|
|
15
|
+
"modelLabel"
|
|
16
|
+
],
|
|
17
|
+
"@ragents/host/plugin-support/model-choice": [
|
|
18
|
+
"builtinCatalog",
|
|
19
|
+
"modelChoiceEnvDescriptors",
|
|
20
|
+
"modelChoiceFromEnvironment"
|
|
21
|
+
],
|
|
22
|
+
"@ragents/host/plugin-support/model-upstreams": [
|
|
23
|
+
"modelUpstreamsToken"
|
|
24
|
+
],
|
|
25
|
+
"@ragents/host/plugin-support/plugin-config": [
|
|
26
|
+
"declaredEnvironment"
|
|
27
|
+
],
|
|
28
|
+
"@ragents/host/plugin-support/plugin-folder": [
|
|
29
|
+
"folderSystemPrompts",
|
|
30
|
+
"pluginAsset",
|
|
31
|
+
"pluginFolder"
|
|
32
|
+
],
|
|
33
|
+
"@ragents/host/plugin-support/product-model-settings": [
|
|
34
|
+
"ProductModelSettingsStore",
|
|
35
|
+
"productModelSettingsMethods"
|
|
36
|
+
],
|
|
37
|
+
"@ragents/host/plugin-support/product-relay": [
|
|
38
|
+
"RELAY_PROVIDER",
|
|
39
|
+
"createRelayCatalog"
|
|
40
|
+
],
|
|
41
|
+
"@ragents/host/plugin-support/product-start-options": [
|
|
42
|
+
"productStartOptions"
|
|
43
|
+
],
|
|
44
|
+
"@ragents/host/plugin-support/prompt": [
|
|
45
|
+
"handlebarsPrompt",
|
|
46
|
+
"systemPromptSelectionPrompt"
|
|
47
|
+
],
|
|
48
|
+
"@ragents/host/plugin-support/skills": [
|
|
49
|
+
"skillEnvDescriptors",
|
|
50
|
+
"skillsFromEnvironment"
|
|
51
|
+
],
|
|
52
|
+
"@ragents/host/plugin-support/system-prompts": [
|
|
53
|
+
"lazySystemPromptCatalog",
|
|
54
|
+
"systemPromptEnvDescriptors"
|
|
55
|
+
],
|
|
56
|
+
"@ragents/host/plugin-support/thinking-level": [
|
|
57
|
+
"roleThinkingLevel"
|
|
58
|
+
],
|
|
59
|
+
"@ragents/host/ragents/product-runtime": [
|
|
60
|
+
"productRuntimeToken"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"web": {
|
|
64
|
+
"@ragents/web/PluginRegistry": [
|
|
65
|
+
"chatDisplayPolicyFrom"
|
|
66
|
+
],
|
|
67
|
+
"@ragents/web/product/ProductModelSettings": [
|
|
68
|
+
"ProductModelSettings"
|
|
69
|
+
],
|
|
70
|
+
"@ragents/web/product/start-options": [
|
|
71
|
+
"productStartOptions"
|
|
72
|
+
],
|
|
73
|
+
"react/jsx-runtime": [
|
|
74
|
+
"jsx"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"stand": "83bcb0d455b8559983cc7811b8c3ba4a9ec5d2d595c7489c322d8a7e193a2f0c",
|
|
79
|
+
"sourceStand": "5ff99fc7488a7f23083d596ffa4eb0bf8d01431856fec65d33295379439346a8",
|
|
80
|
+
"server": "server/index.js",
|
|
81
|
+
"web": {
|
|
82
|
+
"entry": "web/index.js",
|
|
83
|
+
"classes": "web/classes.json"
|
|
84
|
+
},
|
|
85
|
+
"exports": {
|
|
86
|
+
"server": {},
|
|
87
|
+
"web": {}
|
|
88
|
+
},
|
|
89
|
+
"uses": [],
|
|
90
|
+
"assets": [
|
|
91
|
+
"preamble.hbs"
|
|
92
|
+
]
|
|
93
|
+
}
|