@schlenkr/ragents 0.1.10 → 0.1.12
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 +1 -1
- package/apps/server/package.json +1 -1
- package/apps/server/src/access-projection.ts +6 -6
- package/apps/server/src/access-service.ts +3 -3
- package/apps/server/src/access-session.ts +19 -19
- package/apps/server/src/api/contracts.ts +29 -29
- package/apps/server/src/api/core-methods.ts +17 -17
- package/apps/server/src/api/delivery.ts +2 -2
- package/apps/server/src/api/reference.ts +27 -27
- package/apps/server/src/api/rights.ts +18 -18
- package/apps/server/src/chat-handler.ts +5 -5
- package/apps/server/src/config-definition.ts +37 -10
- package/apps/server/src/config-file.ts +49 -49
- package/apps/server/src/config.ts +2 -0
- package/apps/server/src/data-directory.ts +2 -2
- package/apps/server/src/external-access.ts +1 -1
- package/apps/server/src/folder-install.ts +1 -1
- package/apps/server/src/help-files.ts +1 -1
- package/apps/server/src/host-api.json +6 -1
- package/apps/server/src/host-api.ts +3 -2
- package/apps/server/src/host-record.ts +3 -3
- package/apps/server/src/host-resolution-hooks.mjs +4 -4
- package/apps/server/src/host-version.ts +17 -17
- package/apps/server/src/host-web.ts +5 -5
- package/apps/server/src/main.ts +6 -6
- package/apps/server/src/missing-environment.ts +6 -6
- package/apps/server/src/parent-watch.ts +4 -4
- package/apps/server/src/plugin-build/build.ts +38 -38
- package/apps/server/src/plugin-build/host-api-names.ts +7 -7
- package/apps/server/src/plugin-build/plugin-description.ts +15 -15
- package/apps/server/src/plugin-build/typecheck.ts +1 -1
- package/apps/server/src/plugin-support/actor-programs/app-project.ts +19 -19
- package/apps/server/src/plugin-support/actor-programs/client-compiler.ts +4 -4
- package/apps/server/src/plugin-support/actor-programs/client-contracts.ts +11 -11
- package/apps/server/src/plugin-support/actor-programs/contract.ts +17 -17
- package/apps/server/src/plugin-support/actor-programs/runtime-libraries.ts +1 -1
- package/apps/server/src/plugin-support/actor-programs/workflow/index.ts +5 -5
- package/apps/server/src/plugin-support/actor-programs/workflow/prompt-reader.ts +2 -2
- package/apps/server/src/plugin-support/chat-display-policy.ts +2 -2
- package/apps/server/src/plugin-support/front-matter.ts +6 -6
- package/apps/server/src/plugin-support/http.ts +2 -2
- package/apps/server/src/plugin-support/language-server/contract.ts +8 -8
- package/apps/server/src/plugin-support/language-server/plugin.ts +2 -2
- package/apps/server/src/plugin-support/language-server/snapshot-method.ts +1 -1
- package/apps/server/src/plugin-support/language-server/tools.ts +11 -11
- package/apps/server/src/plugin-support/model-aliases.ts +30 -20
- package/apps/server/src/plugin-support/model-choice.ts +15 -15
- package/apps/server/src/plugin-support/model-completion.ts +44 -23
- package/apps/server/src/plugin-support/model-providers.ts +170 -0
- package/apps/server/src/plugin-support/model-upstreams.ts +1 -1
- package/apps/server/src/plugin-support/native-typescript-child.ts +4 -4
- package/apps/server/src/plugin-support/native-typescript-executor.ts +12 -12
- package/apps/server/src/plugin-support/plugin-config.ts +3 -3
- package/apps/server/src/plugin-support/plugin-folder.ts +2 -2
- package/apps/server/src/plugin-support/plugins-root.ts +2 -2
- package/apps/server/src/plugin-support/process-sandbox.ts +39 -39
- package/apps/server/src/plugin-support/product-model-settings-contract.ts +3 -3
- package/apps/server/src/plugin-support/product-model-settings.ts +10 -10
- package/apps/server/src/plugin-support/product-relay.ts +9 -9
- package/apps/server/src/plugin-support/product-start-options.ts +4 -4
- package/apps/server/src/plugin-support/prompt.ts +1 -1
- package/apps/server/src/plugin-support/provision.ts +8 -8
- package/apps/server/src/plugin-support/run-scripts.ts +17 -17
- package/apps/server/src/plugin-support/skills.ts +18 -18
- package/apps/server/src/plugin-support/start-entries-contract.ts +17 -17
- package/apps/server/src/plugin-support/start-options-contract.ts +5 -5
- package/apps/server/src/plugin-support/system-prompts.ts +11 -11
- package/apps/server/src/plugin-support/thinking-level.ts +2 -2
- package/apps/server/src/plugin-support/tool-availability.ts +2 -2
- package/apps/server/src/plugin-support/workspace-ownership.ts +5 -5
- package/apps/server/src/plugin-support/workspace-sandbox-host.ts +37 -37
- package/apps/server/src/plugin-support/zip.ts +7 -7
- package/apps/server/src/profile/bundle-manifest.ts +27 -27
- package/apps/server/src/profile/compose.ts +12 -7
- package/apps/server/src/profile/plugin-discovery.ts +14 -14
- package/apps/server/src/profile/provisioning.ts +5 -5
- package/apps/server/src/profile-target.ts +10 -10
- package/apps/server/src/protocol.ts +2 -2
- package/apps/server/src/provider.ts +62 -57
- package/apps/server/src/ragents/actor-chat-history.ts +8 -8
- package/apps/server/src/ragents/chat-text-positions.ts +2 -2
- package/apps/server/src/ragents/coordinator.ts +2 -2
- package/apps/server/src/ragents/engine.ts +23 -23
- package/apps/server/src/ragents/global-chat.ts +8 -8
- package/apps/server/src/ragents/host-services.ts +6 -3
- package/apps/server/src/ragents/journal-chat-events.ts +1 -1
- package/apps/server/src/ragents/run-owner.ts +2 -2
- package/apps/server/src/ragents/session.ts +49 -49
- package/apps/server/src/ragents/typescript-tools.ts +12 -12
- package/apps/server/src/ragents/workspace-runtime.ts +28 -28
- package/apps/server/src/rpc/dispatcher.ts +19 -19
- package/apps/server/src/rpc/http-transport.ts +11 -11
- package/apps/server/src/rpc/stdio-transport.ts +3 -3
- package/apps/server/src/run-preparation-input.ts +5 -5
- package/apps/server/src/run-preparation.ts +24 -24
- package/apps/server/src/run-transfer.ts +39 -39
- package/apps/server/src/server.ts +48 -48
- package/apps/server/src/settings.ts +1 -1
- package/apps/server/src/startup.ts +3 -3
- package/apps/server/src/title-compactor.ts +9 -9
- package/apps/server/src/title-settings.ts +3 -3
- package/apps/server/src/web-bundles.ts +2 -2
- package/apps/server/src/web-stylesheet.ts +2 -2
- package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-BO4wLQtE.js → highlighted-body-KPVGNVTW-CpPi6QLr.js} +1 -1
- package/apps/web/dist/assets/main-DJmCHGzM.js +11 -0
- package/apps/web/dist/assets/mermaid-HWGCJPDP-q-mf1kLN.js +608 -0
- package/apps/web/dist/assets/runPanel-nk_aMxSn.js +21 -0
- package/apps/web/dist/help/guide-access.html +5 -5
- package/apps/web/dist/help/guide-access.md +2 -2
- package/apps/web/dist/help/guide-clients.html +53 -54
- package/apps/web/dist/help/guide-clients.md +50 -51
- package/apps/web/dist/help/guide-distributed.html +12 -7
- package/apps/web/dist/help/guide-distributed.md +9 -4
- package/apps/web/dist/help/guide-functions.html +3 -3
- package/apps/web/dist/help/guide-getting-started.html +24 -15
- package/apps/web/dist/help/guide-getting-started.md +22 -12
- package/apps/web/dist/help/guide-ideas.html +3 -3
- package/apps/web/dist/help/guide-plugins.html +5 -4
- package/apps/web/dist/help/guide-plugins.md +2 -1
- package/apps/web/dist/help/guide-programs.html +3 -3
- package/apps/web/dist/help/guide-runtime.html +6 -6
- package/apps/web/dist/help/guide-runtime.md +3 -3
- package/apps/web/dist/help/guide.html +3 -3
- package/apps/web/dist/help/index.html +196 -144
- package/apps/web/dist/help/mini-app.css +6 -0
- package/apps/web/dist/help/mini-app.js +14 -14
- package/apps/web/dist/host-web.json +91 -91
- package/apps/web/dist/index.html +3 -3
- package/apps/web/dist/run-panel.html +3 -3
- package/apps/web/package.json +1 -1
- package/apps/web/src/AccessContext.tsx +15 -15
- package/apps/web/src/App.tsx +13 -13
- package/apps/web/src/DiffCode.tsx +2 -2
- package/apps/web/src/HelpDialog.tsx +3 -3
- package/apps/web/src/Overview.tsx +13 -13
- package/apps/web/src/PluginActivation.ts +1 -1
- package/apps/web/src/PluginChat.tsx +15 -15
- package/apps/web/src/PluginFailureNotice.tsx +1 -1
- package/apps/web/src/PluginRegistry.tsx +44 -44
- package/apps/web/src/RunPreparationChat.tsx +11 -11
- package/apps/web/src/RunStore.ts +1 -1
- package/apps/web/src/SessionList.tsx +14 -14
- package/apps/web/src/SettingsModal.tsx +112 -112
- package/apps/web/src/StartOptions.tsx +11 -11
- package/apps/web/src/StartSelection.tsx +11 -11
- package/apps/web/src/StartTiles.tsx +8 -8
- package/apps/web/src/SurfaceShortcuts.tsx +3 -3
- package/apps/web/src/ThemeSettings.tsx +8 -8
- package/apps/web/src/TitleModelSettings.tsx +13 -13
- package/apps/web/src/WorkspacePanel.tsx +9 -9
- package/apps/web/src/access-session.ts +4 -4
- package/apps/web/src/access-token.ts +5 -5
- package/apps/web/src/actor-conversation.ts +3 -3
- package/apps/web/src/actor-programs/client-ui/DataTable.tsx +8 -8
- package/apps/web/src/actor-programs/client-ui/FilePicker.tsx +4 -4
- package/apps/web/src/actor-programs/client-ui/FlowDiagram.tsx +13 -13
- package/apps/web/src/actor-programs/client-ui/Viewers.tsx +4 -4
- package/apps/web/src/actor-programs/client-ui/WorkflowDiagram.tsx +1 -1
- package/apps/web/src/actor-programs/client-ui/file-contracts.d.ts +4 -4
- package/apps/web/src/actor-programs/client-ui/file-selection.ts +1 -1
- package/apps/web/src/actor-programs/client-ui/viewer-contracts.d.ts +3 -3
- package/apps/web/src/api.ts +7 -7
- package/apps/web/src/chat/QuasselHost.tsx +1 -1
- package/apps/web/src/chat/StoppedActorNotice.tsx +5 -5
- package/apps/web/src/chat/chat-target.ts +3 -3
- package/apps/web/src/chat/requests.ts +2 -2
- package/apps/web/src/chat/useAttachmentCapabilities.ts +2 -2
- package/apps/web/src/chat-view-settings.tsx +5 -6
- package/apps/web/src/diff-view.css +1 -1
- package/apps/web/src/highlighting.css +1 -1
- package/apps/web/src/language-server/language-server-plugin.tsx +30 -30
- package/apps/web/src/lib/labels.ts +6 -6
- package/apps/web/src/main.tsx +4 -4
- package/apps/web/src/offered-machines.ts +2 -2
- package/apps/web/src/page-opener.tsx +1 -1
- package/apps/web/src/panel/ConnectionsPage.tsx +23 -23
- package/apps/web/src/panel/LoginForm.tsx +6 -6
- package/apps/web/src/panel/PanelDialogs.tsx +22 -22
- package/apps/web/src/panel/PanelHeader.tsx +2 -2
- package/apps/web/src/panel/PanelPage.tsx +1 -1
- package/apps/web/src/panel/RunLine.tsx +4 -4
- package/apps/web/src/panel/RunsPage.tsx +15 -15
- package/apps/web/src/panel/StartPage.tsx +26 -26
- package/apps/web/src/panel/connection-state.ts +9 -9
- package/apps/web/src/panel/contract.ts +28 -28
- package/apps/web/src/panel.tsx +1 -1
- package/apps/web/src/plugin-bootstrap.ts +5 -5
- package/apps/web/src/product/ModelControl.tsx +3 -3
- package/apps/web/src/product/ProductModelSettings.tsx +16 -16
- package/apps/web/src/product/SystemPromptControl.tsx +11 -11
- package/apps/web/src/product/model-settings.ts +2 -2
- package/apps/web/src/rpc/client.ts +16 -16
- package/apps/web/src/rpc.ts +1 -1
- package/apps/web/src/run-overview.ts +1 -1
- package/apps/web/src/run-panel/RunPanelApp.tsx +39 -39
- package/apps/web/src/run-panel/RunPanelHeader.tsx +6 -6
- package/apps/web/src/run-panel/RunPanelMenu.tsx +6 -6
- package/apps/web/src/run-panel/RunPanelRail.tsx +4 -4
- package/apps/web/src/run-panel/RunPanelWorkspace.tsx +3 -3
- package/apps/web/src/run-panel/clipboard.ts +3 -3
- package/apps/web/src/run-panel/host-contract.ts +5 -5
- package/apps/web/src/run-panel/host.ts +15 -15
- package/apps/web/src/run-panel/input-bridge.ts +1 -1
- package/apps/web/src/run-panel/run-panel-location.ts +5 -5
- package/apps/web/src/run-panel/use-session-list.ts +1 -1
- package/apps/web/src/run-panel/workspace-state.ts +3 -3
- package/apps/web/src/run-panel.tsx +4 -4
- package/apps/web/src/run-preparation.ts +2 -2
- package/apps/web/src/run-view.ts +3 -3
- package/apps/web/src/settings-contributions.ts +32 -32
- package/apps/web/src/theme.ts +9 -9
- package/apps/web/src/title-model-settings.ts +6 -6
- package/apps/web/src/ui/ListDetail.tsx +9 -9
- package/apps/web/src/ui/dialog.tsx +2 -2
- package/apps/web/src/ui/modal-controller.ts +3 -3
- package/apps/web/src/ui/modal.tsx +2 -2
- package/apps/web/src/ui/popover.tsx +1 -1
- package/apps/web/src/ui/relative-time.ts +8 -8
- package/apps/web/src/ui/startup-notice.tsx +2 -2
- package/apps/web/src/ui/state-icon.tsx +1 -1
- package/apps/web/src/ui/state-vocabulary.ts +16 -16
- package/apps/web/src/ui/stop-button.tsx +2 -2
- package/bundles/ragents.activity/ragents-bundle.json +3 -3
- package/bundles/ragents.activity/web/classes.json +1 -1
- package/bundles/ragents.activity/web/index.js +1 -1
- package/bundles/ragents.activity/web/index.js.map +2 -2
- package/bundles/ragents.actor-programs/ragents-bundle.json +3 -3
- package/bundles/ragents.actor-programs/server/index.js +225 -225
- package/bundles/ragents.actor-programs/server/index.js.map +2 -2
- package/bundles/ragents.actor-programs/web/classes.json +1 -1
- package/bundles/ragents.actor-programs/web/index.js +1 -1
- package/bundles/ragents.actor-programs/web/index.js.map +3 -3
- package/bundles/ragents.ask/ragents-bundle.json +3 -3
- package/bundles/ragents.ask/server/chunks/{chunk-PDJO75SQ.js → chunk-YOV27MAR.js} +2 -2
- package/bundles/ragents.ask/server/chunks/chunk-YOV27MAR.js.map +7 -0
- package/bundles/ragents.ask/server/exports/server/contract.js +1 -1
- package/bundles/ragents.ask/server/index.js +23 -23
- package/bundles/ragents.ask/server/index.js.map +2 -2
- package/bundles/ragents.ask/web/chunks/{chunk-WFN4374U.js → chunk-D6NNB5DS.js} +1 -1
- package/bundles/ragents.ask/web/chunks/chunk-D6NNB5DS.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/{chunk-MBRPS477.js → chunk-IQBHK7MV.js} +2 -2
- package/bundles/ragents.ask/web/chunks/{chunk-MBRPS477.js.map → chunk-IQBHK7MV.js.map} +3 -3
- package/bundles/ragents.ask/web/chunks/chunk-PWFIAMX4.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-PWFIAMX4.js.map +7 -0
- package/bundles/ragents.ask/web/chunks/chunk-QHGKEESD.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-QHGKEESD.js.map +7 -0
- package/bundles/ragents.ask/web/classes.json +1 -1
- package/bundles/ragents.ask/web/exports/ask-payload.js +1 -1
- package/bundles/ragents.ask/web/exports/web/QuestionCard.js +1 -1
- package/bundles/ragents.ask/web/exports/web/api.js +1 -1
- package/bundles/ragents.ask/web/index.js +1 -1
- package/bundles/ragents.ask/web/index.js.map +2 -2
- package/bundles/ragents.browser/executor/index.mjs +35 -35
- package/bundles/ragents.browser/executor/index.mjs.map +2 -2
- package/bundles/ragents.browser/ragents-bundle.json +3 -3
- package/bundles/ragents.browser/server/chunks/{chunk-CWLX4VA5.js → chunk-PYEISBNE.js} +1 -1
- package/bundles/ragents.browser/server/chunks/{chunk-CWLX4VA5.js.map → chunk-PYEISBNE.js.map} +1 -1
- package/bundles/ragents.browser/server/exports/server/contract.js +1 -1
- package/bundles/ragents.browser/server/index.js +31 -31
- package/bundles/ragents.browser/server/index.js.map +2 -2
- package/bundles/ragents.browser/skills/browser-testing/SKILL.md +30 -30
- package/bundles/ragents.documents/prompt.hbs +1 -1
- package/bundles/ragents.documents/ragents-bundle.json +3 -3
- package/bundles/ragents.documents/server/chunks/{chunk-QIECRZ7C.js → chunk-KMZWOVTI.js} +3 -3
- package/bundles/ragents.documents/server/chunks/{chunk-QIECRZ7C.js.map → chunk-KMZWOVTI.js.map} +2 -2
- package/bundles/ragents.documents/server/exports/contract.js +1 -1
- package/bundles/ragents.documents/server/index.js +26 -26
- package/bundles/ragents.documents/server/index.js.map +2 -2
- package/bundles/ragents.documents/web/classes.json +1 -1
- package/bundles/ragents.documents/web/index.js +1 -1
- package/bundles/ragents.documents/web/index.js.map +3 -3
- package/bundles/ragents.lsp-fsharp/executor/index.mjs +4 -4
- package/bundles/ragents.lsp-fsharp/executor/index.mjs.map +2 -2
- package/bundles/ragents.lsp-fsharp/ragents-bundle.json +3 -3
- package/bundles/ragents.lsp-fsharp/server/index.js +5 -5
- package/bundles/ragents.lsp-fsharp/server/index.js.map +2 -2
- package/bundles/ragents.lsp-fsharp/web/index.js +1 -1
- package/bundles/ragents.lsp-fsharp/web/index.js.map +2 -2
- package/bundles/ragents.lsp-roslyn/executor/index.mjs +3 -3
- package/bundles/ragents.lsp-roslyn/executor/index.mjs.map +2 -2
- package/bundles/ragents.lsp-roslyn/ragents-bundle.json +3 -3
- package/bundles/ragents.lsp-roslyn/server/index.js +17 -17
- package/bundles/ragents.lsp-roslyn/server/index.js.map +2 -2
- package/bundles/ragents.lsp-roslyn/web/index.js +1 -1
- package/bundles/ragents.lsp-roslyn/web/index.js.map +2 -2
- package/bundles/ragents.lsp-typescript/executor/index.mjs +2 -2
- package/bundles/ragents.lsp-typescript/executor/index.mjs.map +2 -2
- package/bundles/ragents.lsp-typescript/ragents-bundle.json +3 -3
- package/bundles/ragents.lsp-typescript/server/index.js.map +1 -1
- package/bundles/ragents.lsp-typescript/web/index.js +1 -1
- package/bundles/ragents.lsp-typescript/web/index.js.map +2 -2
- package/bundles/ragents.model-relay/ragents-bundle.json +8 -4
- package/bundles/ragents.model-relay/server/index.js +25 -21
- package/bundles/ragents.model-relay/server/index.js.map +2 -2
- package/bundles/ragents.orchestration/ragents-bundle.json +3 -3
- package/bundles/ragents.orchestration/server/index.js +28 -28
- package/bundles/ragents.orchestration/server/index.js.map +2 -2
- package/bundles/ragents.orchestration/web/chunks/{chunk-OSKPH6SZ.js → chunk-CFMJD5ZI.js} +2 -2
- package/bundles/ragents.orchestration/web/chunks/chunk-HOBLI364.js +2 -0
- package/bundles/ragents.orchestration/web/chunks/{chunk-OQYCNYXN.js.map → chunk-HOBLI364.js.map} +2 -2
- package/bundles/ragents.orchestration/web/chunks/{chunk-ODMMQGX2.js → chunk-UCIMT2R4.js} +2 -2
- package/bundles/ragents.orchestration/web/classes.json +1 -1
- package/bundles/ragents.orchestration/web/exports/web/program-slot.js +1 -1
- package/bundles/ragents.orchestration/web/exports/web/surface-entities.js +1 -1
- package/bundles/ragents.orchestration/web/index.js +8 -8
- package/bundles/ragents.orchestration/web/index.js.map +2 -2
- package/bundles/ragents.overseer/ragents-bundle.json +3 -3
- package/bundles/ragents.overseer/server/index.js +98 -98
- package/bundles/ragents.overseer/server/index.js.map +2 -2
- package/bundles/ragents.overseer/web/classes.json +1 -1
- package/bundles/ragents.overseer/web/index.js +1 -1
- package/bundles/ragents.overseer/web/index.js.map +2 -2
- package/bundles/ragents.processes/ragents-bundle.json +3 -3
- package/bundles/ragents.processes/server/index.js +11 -11
- package/bundles/ragents.processes/server/index.js.map +2 -2
- package/bundles/ragents.processes/web/classes.json +1 -1
- package/bundles/ragents.processes/web/index.js +3 -3
- package/bundles/ragents.processes/web/index.js.map +2 -2
- package/bundles/ragents.product/ragents-bundle.json +3 -3
- package/bundles/ragents.product/server/index.js +12 -13
- package/bundles/ragents.product/server/index.js.map +2 -2
- package/bundles/ragents.product/web/classes.json +1 -1
- package/bundles/ragents.product/web/index.js +1 -1
- package/bundles/ragents.product/web/index.js.map +2 -2
- package/bundles/ragents.profile-distribution/ragents-bundle.json +3 -3
- package/bundles/ragents.profile-distribution/server/index.js +31 -31
- package/bundles/ragents.profile-distribution/server/index.js.map +2 -2
- package/bundles/ragents.reference/ragents-bundle.json +3 -3
- package/bundles/ragents.reference/run-scripts/balcony-wizard/RUN.md +19 -19
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +2 -2
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/client.tsx +14 -14
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/conversation.ts +2 -2
- package/bundles/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/tests/conversation.test.ts +49 -49
- package/bundles/ragents.reference/run-scripts/balcony-wizard/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/balcony-wizard/src/server.ts +9 -9
- package/bundles/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +9 -9
- package/bundles/ragents.reference/run-scripts/conversation-circle/RUN.md +7 -7
- package/bundles/ragents.reference/run-scripts/conversation-circle/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/conversation-circle/src/server.ts +13 -13
- package/bundles/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
- package/bundles/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +8 -8
- package/bundles/ragents.reference/run-scripts/learning-afternoon/RUN.md +16 -16
- package/bundles/ragents.reference/run-scripts/learning-afternoon/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/experiment.md +1 -1
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/helper.md +3 -3
- package/bundles/ragents.reference/run-scripts/learning-afternoon/prompts/quiz.md +1 -1
- package/bundles/ragents.reference/run-scripts/learning-afternoon/src/server.ts +9 -9
- package/bundles/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +39 -39
- package/bundles/ragents.reference/run-scripts/moderated-round/RUN.md +7 -7
- package/bundles/ragents.reference/run-scripts/moderated-round/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/moderated-round/src/server.ts +9 -9
- package/bundles/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +1 -1
- package/bundles/ragents.reference/run-scripts/moderated-round/tests/program.test.ts +6 -6
- package/bundles/ragents.reference/run-scripts/shared-actor-list/RUN.md +12 -12
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/package.json +2 -2
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/contract.ts +3 -3
- package/bundles/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/tests/program.test.ts +4 -4
- package/bundles/ragents.reference/run-scripts/shared-actor-list/package.json +1 -1
- package/bundles/ragents.reference/run-scripts/shared-actor-list/src/server.ts +11 -11
- package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
- package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/program.test.ts +13 -13
- package/bundles/ragents.reference/run-scripts/word-game/RUN.md +18 -18
- package/bundles/ragents.reference/run-scripts/word-game/package.json +2 -2
- package/bundles/ragents.reference/run-scripts/word-game/src/client.tsx +1 -1
- package/bundles/ragents.reference/run-scripts/word-game/src/contract.ts +2 -2
- package/bundles/ragents.reference/run-scripts/word-game/src/server.ts +16 -16
- package/bundles/ragents.reference/run-scripts/word-game/tests/program.test.ts +39 -39
- package/bundles/ragents.reference/skills/100-shared-actor-list/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/110-all-card-slots/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/150-editorial-workbench/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/160-learning-companion/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/170-photo-collection/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/180-decision-workbench/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/190-review-queue/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/20-circle-of-four/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/200-typescript-diagnostics/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/210-moderator-handover/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/220-actor-approval-list/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/230-shared-state-views/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/240-live-result-list/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/250-balcony-wizard/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/30-llm-without-runtime-knowledge/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/35-actor-input-fifo/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/40-subscription-matrix/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/50-subscription-removal/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/60-stop-in-the-circle/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/65-artifact-least-privilege/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/70-headless-counter/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/75-lsp-demo/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/80-actor-text-analysis/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/90-actor-notes/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/95-hello-world/SKILL.md +5 -5
- package/bundles/ragents.reference/skills/decision-brief/SKILL.md +24 -24
- package/bundles/ragents.reference/skills/learning-sprint/SKILL.md +24 -24
- package/bundles/ragents.reference/web/classes.json +1 -1
- package/bundles/ragents.reference/web/index.js +1 -1
- package/bundles/ragents.reference/web/index.js.map +2 -2
- package/bundles/ragents.todo/ragents-bundle.json +3 -3
- package/bundles/ragents.todo/server/index.js +5 -8
- package/bundles/ragents.todo/server/index.js.map +2 -2
- package/bundles/ragents.todo/web/classes.json +1 -1
- package/bundles/ragents.todo/web/index.js +1 -1
- package/bundles/ragents.todo/web/index.js.map +2 -2
- package/bundles/ragents.transcript/ragents-bundle.json +3 -3
- package/bundles/ragents.transcript/server/index.js +11 -11
- package/bundles/ragents.transcript/server/index.js.map +2 -2
- package/bundles/ragents.watch/ragents-bundle.json +3 -3
- package/bundles/ragents.watch/server/index.js +48 -48
- package/bundles/ragents.watch/server/index.js.map +2 -2
- package/bundles/ragents.workspace/ragents-bundle.json +3 -3
- package/bundles/ragents.workspace/server/index.js +83 -83
- package/bundles/ragents.workspace/server/index.js.map +2 -2
- package/bundles/ragents.workspace/web/classes.json +1 -1
- package/bundles/ragents.workspace/web/index.js +1 -1
- package/bundles/ragents.workspace/web/index.js.map +2 -2
- package/package.json +4 -4
- package/packages/agent/dist/core/model-runtime.d.ts +7 -2
- package/packages/agent/dist/index.d.ts +1 -1
- package/packages/agent/dist/loop/agent-loop.d.ts +2 -2
- package/packages/agent/src/core/compaction/utils.ts +1 -1
- package/packages/agent/src/core/model-runtime.ts +45 -5
- package/packages/agent/src/index.ts +1 -1
- package/packages/agent/src/loop/agent-loop.ts +2 -2
- package/packages/ai/dist/models.d.ts +1 -0
- package/packages/ai/dist/models.generated.d.ts +4544 -983
- package/packages/ai/dist/providers/openrouter.models.d.ts +4544 -983
- package/packages/ai/src/api/ai-sdk.ts +33 -7
- package/packages/ai/src/api-registry.ts +1 -1
- package/packages/ai/src/index.ts +2 -2
- package/packages/ai/src/models.generated.ts +1 -1
- package/packages/ai/src/models.ts +1 -1
- package/packages/ai/src/providers/openrouter.models.ts +3725 -552
- package/packages/ragents/src/access.ts +12 -12
- package/packages/ragents/src/agents/actor-input.ts +33 -33
- package/packages/ragents/src/agents/catalog.ts +1 -1
- package/packages/ragents/src/agents/delivery.ts +17 -17
- package/packages/ragents/src/agents/plugins.ts +1 -1
- package/packages/ragents/src/agents/scheduler.ts +7 -7
- package/packages/ragents/src/agents/schemas.ts +1 -1
- package/packages/ragents/src/agents/tool-orientation.ts +4 -4
- package/packages/ragents/src/agents/tools.ts +20 -20
- package/packages/ragents/src/agents/toolset.ts +5 -5
- package/packages/ragents/src/agents/workspaces.ts +1 -1
- package/packages/ragents/src/domain/events.ts +1 -1
- package/packages/ragents/src/domain/model.ts +5 -5
- package/packages/ragents/src/drivers/agent-runtime.ts +1 -1
- package/packages/ragents/src/drivers/agent-turn.ts +4 -4
- package/packages/ragents/src/drivers/agent.ts +2 -2
- package/packages/ragents/src/drivers/attachments.ts +4 -4
- package/packages/ragents/src/http/contracts.ts +14 -14
- package/packages/ragents/src/http/methods.ts +6 -6
- package/packages/ragents/src/plugin-host.ts +119 -119
- package/packages/ragents/src/plugin-types.ts +16 -16
- package/packages/ragents/src/rpc/contract.ts +5 -5
- package/packages/ragents/src/rpc/contribution.ts +2 -2
- package/packages/ragents/src/rpc/peer.ts +11 -11
- package/packages/ragents/src/rpc/protocol.ts +2 -2
- package/packages/ragents/src/runtime/decisions/turns.ts +1 -1
- package/packages/ragents/src/runtime/journal-storage.ts +1 -1
- package/packages/ragents/src/runtime/journal.ts +10 -10
- package/packages/ragents/src/runtime/orchestration.ts +8 -8
- package/packages/ragents/src/runtime/stop.ts +2 -2
- package/packages/ragents/src/script/mediators.ts +35 -35
- package/packages/ragents/src/typescript/async-compiler.ts +14 -14
- package/packages/ragents/src/typescript/compiler-worker.ts +2 -2
- package/packages/ragents/src/typescript/compiler.ts +7 -7
- package/packages/ragents/src/typescript/snippet.ts +5 -5
- package/packages/workspace-executor/src/bash-launch.ts +13 -13
- package/packages/workspace-executor/src/commands.ts +18 -18
- package/packages/workspace-executor/src/context.ts +15 -15
- package/packages/workspace-executor/src/contributions.ts +44 -44
- package/packages/workspace-executor/src/errors.ts +1 -1
- package/packages/workspace-executor/src/executor.ts +16 -16
- package/packages/workspace-executor/src/files.ts +31 -31
- package/packages/workspace-executor/src/index.ts +1 -1
- package/packages/workspace-executor/src/language-server/contract.ts +2 -2
- package/packages/workspace-executor/src/language-server/diagnostics.ts +4 -4
- package/packages/workspace-executor/src/language-server/host.ts +36 -36
- package/packages/workspace-executor/src/language-server/json-rpc.ts +4 -4
- package/packages/workspace-executor/src/language-server/module.ts +11 -11
- package/packages/workspace-executor/src/language-server/roots.ts +3 -3
- package/packages/workspace-executor/src/language-server/session.ts +15 -15
- package/packages/workspace-executor/src/language-server/workspace-solutions.ts +3 -3
- package/packages/workspace-executor/src/managed-process.ts +12 -12
- package/packages/workspace-executor/src/module.ts +8 -8
- package/packages/workspace-executor/src/modules.ts +3 -3
- package/packages/workspace-executor/src/paths.ts +11 -11
- package/packages/workspace-executor/src/process-sandbox.ts +3 -3
- package/packages/workspace-executor/src/processes/module.ts +3 -3
- package/packages/workspace-executor/src/processes/process-table.ts +20 -20
- package/packages/workspace-executor/src/processes/scanner.ts +3 -3
- package/packages/workspace-executor/src/processes/snapshot.ts +2 -2
- package/packages/workspace-executor/src/processes/terminator.ts +13 -13
- package/packages/workspace-executor/src/run-folders.ts +3 -3
- package/packages/workspace-executor/src/safe-environment.ts +4 -4
- package/packages/workspace-executor/src/sandbox-tools.ts +28 -28
- package/packages/workspace-executor/src/session-ident.ts +2 -2
- package/packages/workspace-executor/src/shell-platform.ts +2 -2
- package/packages/workspace-executor/src/tools.ts +5 -5
- package/plugins/ragents.activity/web/ActivityHeader.tsx +3 -3
- package/plugins/ragents.activity/web/activity.ts +2 -2
- package/plugins/ragents.actor-programs/server/access-projections.ts +1 -1
- package/plugins/ragents.actor-programs/server/agent-tools.ts +2 -2
- package/plugins/ragents.actor-programs/server/capability-resolver.ts +3 -3
- package/plugins/ragents.actor-programs/server/controls-template.ts +46 -46
- package/plugins/ragents.actor-programs/server/controls-tool.ts +4 -4
- package/plugins/ragents.actor-programs/server/limits.ts +3 -3
- package/plugins/ragents.actor-programs/server/methods.ts +1 -1
- package/plugins/ragents.actor-programs/server/project-diagnostics.ts +8 -8
- package/plugins/ragents.actor-programs/server/routes.ts +8 -8
- package/plugins/ragents.actor-programs/server/runtime.ts +90 -90
- package/plugins/ragents.actor-programs/server/templates.ts +59 -59
- package/plugins/ragents.actor-programs/server/test-report.ts +5 -5
- package/plugins/ragents.actor-programs/server/tool-contributor.ts +1 -1
- package/plugins/ragents.actor-programs/web/ActorViewFrame.tsx +17 -17
- package/plugins/ragents.actor-programs/web/AppsPanel.tsx +26 -26
- package/plugins/ragents.actor-programs/web/EmbeddedApps.tsx +3 -3
- package/plugins/ragents.actor-programs/web/FullscreenHost.tsx +2 -2
- package/plugins/ragents.actor-programs/web/FunctionForm.tsx +16 -16
- package/plugins/ragents.actor-programs/web/ProgramSource.tsx +5 -5
- package/plugins/ragents.actor-programs/web/api.ts +36 -36
- package/plugins/ragents.actor-programs/web/bridge.ts +8 -8
- package/plugins/ragents.actor-programs/web/chat-state.ts +4 -4
- package/plugins/ragents.actor-programs/web/context.ts +1 -1
- package/plugins/ragents.actor-programs/web/function-input.ts +6 -6
- package/plugins/ragents.actor-programs/web/index.tsx +1 -1
- package/plugins/ragents.actor-programs/web/program-state.ts +4 -4
- package/plugins/ragents.ask/ask-payload.ts +1 -1
- package/plugins/ragents.ask/contract.ts +5 -5
- package/plugins/ragents.ask/server/answer-method.ts +1 -1
- package/plugins/ragents.ask/server/ask-service.ts +9 -9
- package/plugins/ragents.ask/server/ask-tool.ts +10 -10
- package/plugins/ragents.ask/server/contract.ts +5 -5
- package/plugins/ragents.ask/web/AskActionView.tsx +1 -1
- package/plugins/ragents.ask/web/QuestionCard.tsx +22 -22
- package/plugins/ragents.ask/web/index.tsx +2 -2
- package/plugins/ragents.browser/executor/contract.ts +6 -6
- package/plugins/ragents.browser/executor/index.ts +1 -1
- package/plugins/ragents.browser/executor/module.ts +6 -6
- package/plugins/ragents.browser/executor/pages.ts +32 -32
- package/plugins/ragents.browser/executor/playwright.ts +8 -8
- package/plugins/ragents.browser/provision.ts +7 -7
- package/plugins/ragents.browser/server/browser.ts +14 -14
- package/plugins/ragents.browser/server/contract.ts +1 -1
- package/plugins/ragents.browser/server/index.ts +1 -1
- package/plugins/ragents.browser/server/tools.ts +14 -14
- package/plugins/ragents.browser/skills/browser-testing/SKILL.md +30 -30
- package/plugins/ragents.documents/contract.ts +2 -2
- package/plugins/ragents.documents/prompt.hbs +1 -1
- package/plugins/ragents.documents/server/document-write-tool.ts +12 -12
- package/plugins/ragents.documents/server/files-route.ts +6 -6
- package/plugins/ragents.documents/server/show-document-tool.ts +26 -26
- package/plugins/ragents.documents/server/store.ts +1 -1
- package/plugins/ragents.documents/web/DocumentViewer.tsx +37 -37
- package/plugins/ragents.documents/web/index.tsx +11 -11
- package/plugins/ragents.lsp-fsharp/executor.ts +7 -7
- package/plugins/ragents.lsp-fsharp/provision.ts +7 -7
- package/plugins/ragents.lsp-roslyn/executor.ts +5 -5
- package/plugins/ragents.lsp-roslyn/provision.ts +4 -4
- package/plugins/ragents.lsp-roslyn/server/index.ts +5 -5
- package/plugins/ragents.lsp-roslyn/server/solution-on-start.ts +13 -13
- package/plugins/ragents.lsp-typescript/executor.ts +3 -3
- package/plugins/ragents.model-relay/server/config.ts +6 -2
- package/plugins/ragents.model-relay/server/index.ts +2 -2
- package/plugins/ragents.model-relay/server/relay.ts +23 -22
- package/plugins/ragents.orchestration/contract.ts +8 -8
- package/plugins/ragents.orchestration/server/index.ts +4 -4
- package/plugins/ragents.orchestration/server/run-stop-tool.ts +3 -3
- package/plugins/ragents.orchestration/server/surface-tool.ts +5 -5
- package/plugins/ragents.orchestration/tiled-layout.ts +11 -11
- package/plugins/ragents.orchestration/web/ActorChat.tsx +3 -3
- package/plugins/ragents.orchestration/web/ActorChatControls.tsx +4 -5
- package/plugins/ragents.orchestration/web/ActorChatPreview.tsx +1 -1
- package/plugins/ragents.orchestration/web/ActorPopout.tsx +1 -1
- package/plugins/ragents.orchestration/web/ActorShortcut.tsx +6 -6
- package/plugins/ragents.orchestration/web/ActorSurfaceControls.tsx +15 -15
- package/plugins/ragents.orchestration/web/Center.tsx +5 -5
- package/plugins/ragents.orchestration/web/DocumentsSection.tsx +2 -2
- package/plugins/ragents.orchestration/web/ExecutionsPanel.tsx +15 -15
- package/plugins/ragents.orchestration/web/FlowInspector.tsx +103 -103
- package/plugins/ragents.orchestration/web/JournalStatus.tsx +11 -11
- package/plugins/ragents.orchestration/web/MaterialBody.tsx +2 -2
- package/plugins/ragents.orchestration/web/StopRunButton.tsx +6 -6
- package/plugins/ragents.orchestration/web/TiledSurface.tsx +9 -9
- package/plugins/ragents.orchestration/web/actor-header-settings.ts +5 -5
- package/plugins/ragents.orchestration/web/constants.ts +2 -2
- package/plugins/ragents.orchestration/web/executions.ts +6 -6
- package/plugins/ragents.orchestration/web/format.ts +1 -1
- package/plugins/ragents.orchestration/web/index.tsx +2 -2
- package/plugins/ragents.orchestration/web/run-panel/AddresseeControl.tsx +7 -7
- package/plugins/ragents.orchestration/web/run-panel/AddresseeTree.tsx +8 -8
- package/plugins/ragents.orchestration/web/run-panel/RunPanel.tsx +22 -22
- package/plugins/ragents.orchestration/web/run-panel/RunPanelSettings.tsx +7 -7
- package/plugins/ragents.orchestration/web/run-panel/addressee-tree.ts +13 -13
- package/plugins/ragents.orchestration/web/run-panel/run-panel-actors.ts +3 -3
- package/plugins/ragents.orchestration/web/run-panel/run-panel-settings.ts +2 -2
- package/plugins/ragents.orchestration/web/run-panel/run-panel-startup.ts +3 -3
- package/plugins/ragents.orchestration/web/run-panel/run-panel-state.ts +7 -7
- package/plugins/ragents.orchestration/web/run-panel/sheet-status.ts +9 -9
- package/plugins/ragents.orchestration/web/surface-startup.ts +8 -8
- package/plugins/ragents.orchestration/web/surface-view-settings.ts +1 -1
- package/plugins/ragents.orchestration/web/tiled-view-settings.ts +1 -1
- package/plugins/ragents.overseer/contract.ts +20 -20
- package/plugins/ragents.overseer/server/api.ts +6 -6
- package/plugins/ragents.overseer/server/coordinator-prompt.ts +10 -10
- package/plugins/ragents.overseer/server/coordinator.ts +4 -4
- package/plugins/ragents.overseer/server/index.ts +24 -24
- package/plugins/ragents.overseer/server/orientation.ts +8 -8
- package/plugins/ragents.overseer/server/quick-answer.ts +9 -9
- package/plugins/ragents.overseer/server/run-directory.ts +5 -5
- package/plugins/ragents.overseer/server/settings.ts +6 -6
- package/plugins/ragents.overseer/server/user-location.ts +16 -16
- package/plugins/ragents.overseer/web/ModelSettings.tsx +9 -9
- package/plugins/ragents.overseer/web/index.tsx +20 -20
- package/plugins/ragents.overseer/web/model-settings.ts +1 -1
- package/plugins/ragents.overseer/web/quick-answers.ts +2 -2
- package/plugins/ragents.processes/contract.ts +5 -5
- package/plugins/ragents.processes/server/methods.ts +4 -4
- package/plugins/ragents.processes/server/observer.ts +8 -8
- package/plugins/ragents.processes/server/run-processes.ts +2 -2
- package/plugins/ragents.processes/web/ProcessHeader.tsx +10 -10
- package/plugins/ragents.processes/web/processes.ts +10 -10
- package/plugins/ragents.product/server/config.ts +1 -1
- package/plugins/ragents.product/server/index.ts +4 -4
- package/plugins/ragents.product/server/runtime.ts +9 -10
- package/plugins/ragents.product/web/index.tsx +1 -1
- package/plugins/ragents.profile-distribution/contract.ts +10 -10
- package/plugins/ragents.profile-distribution/server/archive.ts +20 -20
- package/plugins/ragents.profile-distribution/server/config.ts +2 -2
- package/plugins/ragents.profile-distribution/server/index.ts +4 -4
- package/plugins/ragents.reference/examples.ts +27 -27
- package/plugins/ragents.reference/run-scripts/balcony-wizard/RUN.md +19 -19
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +2 -2
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/client.tsx +14 -14
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/src/conversation.ts +2 -2
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/tests/conversation.test.ts +49 -49
- package/plugins/ragents.reference/run-scripts/balcony-wizard/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/src/server.ts +9 -9
- package/plugins/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +9 -9
- package/plugins/ragents.reference/run-scripts/conversation-circle/RUN.md +7 -7
- package/plugins/ragents.reference/run-scripts/conversation-circle/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/conversation-circle/src/server.ts +13 -13
- package/plugins/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +8 -8
- package/plugins/ragents.reference/run-scripts/learning-afternoon/RUN.md +16 -16
- package/plugins/ragents.reference/run-scripts/learning-afternoon/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/prompts/experiment.md +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/prompts/helper.md +3 -3
- package/plugins/ragents.reference/run-scripts/learning-afternoon/prompts/quiz.md +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/server.ts +9 -9
- package/plugins/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +39 -39
- package/plugins/ragents.reference/run-scripts/moderated-round/RUN.md +7 -7
- package/plugins/ragents.reference/run-scripts/moderated-round/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/moderated-round/src/server.ts +9 -9
- package/plugins/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/moderated-round/tests/program.test.ts +6 -6
- package/plugins/ragents.reference/run-scripts/shared-actor-list/RUN.md +12 -12
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/package.json +2 -2
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/src/contract.ts +3 -3
- package/plugins/ragents.reference/run-scripts/shared-actor-list/actors/shared-list/tests/program.test.ts +4 -4
- package/plugins/ragents.reference/run-scripts/shared-actor-list/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/shared-actor-list/src/server.ts +11 -11
- package/plugins/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
- package/plugins/ragents.reference/run-scripts/shared-actor-list/tests/program.test.ts +13 -13
- package/plugins/ragents.reference/run-scripts/word-game/RUN.md +18 -18
- package/plugins/ragents.reference/run-scripts/word-game/package.json +2 -2
- package/plugins/ragents.reference/run-scripts/word-game/src/client.tsx +1 -1
- package/plugins/ragents.reference/run-scripts/word-game/src/contract.ts +2 -2
- package/plugins/ragents.reference/run-scripts/word-game/src/server.ts +16 -16
- package/plugins/ragents.reference/run-scripts/word-game/tests/program.test.ts +39 -39
- package/plugins/ragents.reference/skills/100-shared-actor-list/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/110-all-card-slots/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/150-editorial-workbench/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/160-learning-companion/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/170-photo-collection/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/180-decision-workbench/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/190-review-queue/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/20-circle-of-four/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/200-typescript-diagnostics/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/210-moderator-handover/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/220-actor-approval-list/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/230-shared-state-views/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/240-live-result-list/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/250-balcony-wizard/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/30-llm-without-runtime-knowledge/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/35-actor-input-fifo/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/40-subscription-matrix/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/50-subscription-removal/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/60-stop-in-the-circle/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/65-artifact-least-privilege/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/70-headless-counter/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/75-lsp-demo/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/80-actor-text-analysis/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/90-actor-notes/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/95-hello-world/SKILL.md +5 -5
- package/plugins/ragents.reference/skills/decision-brief/SKILL.md +24 -24
- package/plugins/ragents.reference/skills/learning-sprint/SKILL.md +24 -24
- package/plugins/ragents.reference/walkthroughs.ts +128 -128
- package/plugins/ragents.reference/web/StartGuides.tsx +23 -23
- package/plugins/ragents.todo/contract.ts +0 -3
- package/plugins/ragents.todo/server/todo-tool.ts +6 -6
- package/plugins/ragents.todo/web/TodoSection.tsx +1 -1
- package/plugins/ragents.transcript/server/transcript.ts +11 -11
- package/plugins/ragents.watch/server/condition.ts +4 -4
- package/plugins/ragents.watch/server/functions.ts +27 -27
- package/plugins/ragents.watch/server/observation.ts +2 -2
- package/plugins/ragents.watch/server/service.ts +14 -14
- package/plugins/ragents.workspace/client/transport.ts +1 -1
- package/plugins/ragents.workspace/client/workspace-client.ts +63 -63
- package/plugins/ragents.workspace/contract.ts +46 -46
- package/plugins/ragents.workspace/server/binding.ts +20 -20
- package/plugins/ragents.workspace/server/browse-route.ts +8 -8
- package/plugins/ragents.workspace/server/clients.ts +50 -50
- package/plugins/ragents.workspace/server/config.ts +7 -7
- package/plugins/ragents.workspace/server/index.ts +3 -3
- package/plugins/ragents.workspace/server/runtime.ts +26 -26
- package/plugins/ragents.workspace/server/shell-platform.ts +1 -1
- package/plugins/ragents.workspace/web/FileBrowser.tsx +10 -10
- package/plugins/ragents.workspace/web/WorkspaceBinding.tsx +24 -24
- package/plugins/ragents.workspace/web/index.tsx +1 -1
- package/ragents.config.core.ts +1 -1
- package/ragents.config.developer.ts +3 -3
- package/ragents.config.showcase.ts +2 -2
- package/scripts/agent/agent-cli.ts +96 -96
- package/scripts/agent/journal.ts +5 -5
- package/scripts/agent/turn-control.ts +4 -4
- package/scripts/package/build-package.ts +31 -31
- package/scripts/package/host-links.mjs +3 -3
- package/scripts/package/publish-package.ts +29 -29
- package/scripts/package/ragents.mjs +19 -19
- package/scripts/plugin/build-builtin-plugins.ts +5 -5
- package/scripts/plugin/plugin-cli.ts +14 -14
- package/scripts/provision/run-provision.ts +14 -15
- package/scripts/remote/connect.ts +49 -49
- package/scripts/remote/start.ts +18 -18
- package/scripts/workspace-client/run-workspace-client.ts +23 -23
- package/apps/web/dist/assets/main-DnnqWHkH.js +0 -11
- package/apps/web/dist/assets/mermaid-HWGCJPDP-BLLeth5_.js +0 -568
- package/apps/web/dist/assets/runPanel-DPm7s3KM.js +0 -21
- package/bundles/ragents.ask/server/chunks/chunk-PDJO75SQ.js.map +0 -7
- package/bundles/ragents.ask/web/chunks/chunk-4VXWWEG7.js +0 -2
- package/bundles/ragents.ask/web/chunks/chunk-4VXWWEG7.js.map +0 -7
- package/bundles/ragents.ask/web/chunks/chunk-VUBJDIKQ.js +0 -2
- package/bundles/ragents.ask/web/chunks/chunk-VUBJDIKQ.js.map +0 -7
- package/bundles/ragents.ask/web/chunks/chunk-WFN4374U.js.map +0 -7
- package/bundles/ragents.orchestration/web/chunks/chunk-OQYCNYXN.js +0 -2
- /package/bundles/ragents.orchestration/web/chunks/{chunk-OSKPH6SZ.js.map → chunk-CFMJD5ZI.js.map} +0 -0
- /package/bundles/ragents.orchestration/web/chunks/{chunk-ODMMQGX2.js.map → chunk-UCIMT2R4.js.map} +0 -0
|
@@ -7,11 +7,11 @@ import { fileURLToPath } from "node:url";
|
|
|
7
7
|
import { readHostVersion, readPackageVersion } from "../../apps/server/src/host-version.ts";
|
|
8
8
|
import { hostWebDirectory, hostWebProblem, isCheckout } from "../../apps/server/src/host-web.ts";
|
|
9
9
|
import { runtimeLibraries } from "../../apps/server/src/plugin-support/actor-programs/runtime-libraries.ts";
|
|
10
|
-
import {
|
|
10
|
+
import { assertBundleRevision, readBundleManifest, sourceRevisionOf } from "../../apps/server/src/profile/bundle-manifest.ts";
|
|
11
11
|
import { builtInPluginFolders } from "../plugin/build-builtin-plugins.ts";
|
|
12
12
|
|
|
13
13
|
export const PACKAGE_NAME = "@schlenkr/ragents";
|
|
14
|
-
/**
|
|
14
|
+
/** The folder under dist/; the package name has a scope, the folder name stays plain. */
|
|
15
15
|
export const PACKAGE_FOLDER = "ragents";
|
|
16
16
|
|
|
17
17
|
const repositoryRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
@@ -19,12 +19,12 @@ const repositoryRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url))
|
|
|
19
19
|
const SKIPPED_FOLDERS = new Set(["node_modules", "dist", ".git"]);
|
|
20
20
|
const SKIPPED_FILES = new Set([".DS_Store"]);
|
|
21
21
|
|
|
22
|
-
/**
|
|
22
|
+
/** The subcommands' tests run in the checkout; in the package only their test material would be visible. */
|
|
23
23
|
const SKIPPED_IN_PACKAGE = /^scripts\/.*\.test\.tsx?$/;
|
|
24
24
|
|
|
25
25
|
const packagePath = (packageRoot: string, file: string): string => path.relative(packageRoot, file).split(path.sep).join("/");
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/** The repository's neutral profiles; ragents start runs them from the package as from the checkout. */
|
|
28
28
|
export const PACKAGED_PROFILES = ["core", "developer", "showcase"] as const;
|
|
29
29
|
|
|
30
30
|
export const PACKAGE_LICENSE = "PolyForm-Shield-1.0.0";
|
|
@@ -32,7 +32,7 @@ export const PACKAGE_AUTHOR = "Ronald Schlenker";
|
|
|
32
32
|
export const REPOSITORY_URL = "https://github.com/SchlenkR/RAgents";
|
|
33
33
|
export const PACKAGE_KEYWORDS = ["agents", "llm", "actors", "typescript", "csharp", "fsharp", "vscode"] as const;
|
|
34
34
|
|
|
35
|
-
/**
|
|
35
|
+
/** License and listing README are at the root of the package, their sources elsewhere in the repository. */
|
|
36
36
|
export const PACKAGE_ROOT_FILES: readonly (readonly [string, string])[] = [
|
|
37
37
|
["LICENSE", "LICENSE"],
|
|
38
38
|
["scripts/package/README.md", "README.md"],
|
|
@@ -42,7 +42,7 @@ const ROOT_FILE_SOURCES = new Set(PACKAGE_ROOT_FILES.map(([source]) => source));
|
|
|
42
42
|
|
|
43
43
|
const skippedInPackage = (relative: string): boolean => SKIPPED_IN_PACKAGE.test(relative) || ROOT_FILE_SOURCES.has(relative);
|
|
44
44
|
|
|
45
|
-
/**
|
|
45
|
+
/** What the host loads at runtime: server, engine, the built web, the built-in bundles, plugin sources for contracts and the build tool, profiles and the scripts behind the subcommands; plus the types from declarationFolders. */
|
|
46
46
|
export const packageContents = (root = repositoryRoot): readonly string[] => [
|
|
47
47
|
"apps/server/package.json",
|
|
48
48
|
"apps/server/tsconfig.json",
|
|
@@ -67,7 +67,7 @@ export const packageContents = (root = repositoryRoot): readonly string[] => [
|
|
|
67
67
|
"scripts/workspace-client",
|
|
68
68
|
];
|
|
69
69
|
|
|
70
|
-
/**
|
|
70
|
+
/** The forked agent runtime runs from its sources, its types exist only built; the build tool checks third-party plugins against them. */
|
|
71
71
|
export const declarationFolders = (root = repositoryRoot): readonly string[] =>
|
|
72
72
|
readdirSync(path.join(root, "packages"), { withFileTypes: true })
|
|
73
73
|
.filter((entry) => entry.isDirectory())
|
|
@@ -78,13 +78,13 @@ export const declarationFolders = (root = repositoryRoot): readonly string[] =>
|
|
|
78
78
|
})
|
|
79
79
|
.map((entry) => `packages/${entry.name}/dist`);
|
|
80
80
|
|
|
81
|
-
/**
|
|
81
|
+
/** What the host executes, bundles into a mini-app or reads when building a plugin. */
|
|
82
82
|
const SCANNED = ["apps/server/src", "apps/web", "packages", "plugins", "scripts"];
|
|
83
83
|
const PACKAGE_NAME_PATTERN = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;
|
|
84
84
|
const SCAN_SKIPPED = new Set(["node_modules", "dist"]);
|
|
85
85
|
const SCANNED_EXTENSIONS = new Set([".ts", ".tsx", ".mts", ".mjs", ".js", ".css"]);
|
|
86
86
|
const IMPORT_PATTERN = /\b(?:from|import|require(?:\.resolve)?)\s*\(?\s*["']([^"'\n]+)["']/g;
|
|
87
|
-
/**
|
|
87
|
+
/** An executor contribution resolves packages from the host at runtime; the package must carry them too. */
|
|
88
88
|
const HOST_PACKAGE_PATTERN = /\bhostPackageFile\([^,()]*,\s*["']([^"'\n]+)["']/g;
|
|
89
89
|
|
|
90
90
|
const files = async (folder: string, skippedFolders: ReadonlySet<string> = SKIPPED_FOLDERS): Promise<readonly string[]> => {
|
|
@@ -142,12 +142,12 @@ const declaredWebDependencies = (packageDirectory: string): readonly string[] =>
|
|
|
142
142
|
return Object.keys(declared);
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
/**
|
|
146
|
-
*
|
|
145
|
+
/** The packages that the executed part of the package actually imports, plus the libraries linked at runtime
|
|
146
|
+
* and those that the host's web offers to the web halves of third-party plugins. */
|
|
147
147
|
export const requiredPackages = (packageDirectory: string): ReadonlyMap<string, string> => {
|
|
148
148
|
const sources = new Map<string, string>();
|
|
149
|
-
for (const name of runtimeLibraries) sources.set(name, "plugins/ragents.actor-programs (
|
|
150
|
-
for (const name of declaredWebDependencies(packageDirectory)) sources.set(name, "apps/web/package.json (
|
|
149
|
+
for (const name of runtimeLibraries) sources.set(name, "plugins/ragents.actor-programs (linked at runtime)");
|
|
150
|
+
for (const name of declaredWebDependencies(packageDirectory)) sources.set(name, "apps/web/package.json (for the web halves of the plugins)");
|
|
151
151
|
for (const folder of scanRoots(packageDirectory)) {
|
|
152
152
|
for (const file of scannedFiles(folder)) {
|
|
153
153
|
const content = readFileSync(file, "utf8");
|
|
@@ -179,7 +179,7 @@ const anchors = (root: string): readonly string[] => [
|
|
|
179
179
|
.filter((file) => statSync(file, { throwIfNoEntry: false })?.isFile() === true)),
|
|
180
180
|
];
|
|
181
181
|
|
|
182
|
-
/**
|
|
182
|
+
/** The versions this checkout has installed for a package; the newest goes into the package. */
|
|
183
183
|
export const installedVersions = (name: string, root = repositoryRoot): readonly string[] => {
|
|
184
184
|
const found = new Set<string>();
|
|
185
185
|
for (const anchor of anchors(root)) {
|
|
@@ -193,7 +193,7 @@ export const installedVersions = (name: string, root = repositoryRoot): readonly
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
const versions = [...found].sort(compareVersions);
|
|
196
|
-
if (versions.length === 0) throw new Error(`
|
|
196
|
+
if (versions.length === 0) throw new Error(`The package ${name} is not installed in this checkout; without a version it cannot go into the package`);
|
|
197
197
|
return versions;
|
|
198
198
|
};
|
|
199
199
|
|
|
@@ -205,25 +205,25 @@ export interface BuiltPackage {
|
|
|
205
205
|
readonly flattened: readonly string[];
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
/**
|
|
208
|
+
/** The package ships the web prebuilt; it must be built and match its sources. */
|
|
209
209
|
const assertHostWeb = (root: string): void => {
|
|
210
210
|
const problem = hostWebProblem(hostWebDirectory(root), root, isCheckout(root));
|
|
211
|
-
if (problem) throw new Error(`${problem};
|
|
211
|
+
if (problem) throw new Error(`${problem}; run pnpm build:web first`);
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
/**
|
|
214
|
+
/** Every built-in plugin must exist as a bundle and match its sources, otherwise the package starts no profile. */
|
|
215
215
|
const assertBuiltInBundles = (root: string): void => {
|
|
216
216
|
for (const folder of builtInPluginFolders(path.join(root, "plugins"))) {
|
|
217
217
|
const bundle = path.join(root, "bundles", path.basename(folder));
|
|
218
|
-
if (!statSync(bundle, { throwIfNoEntry: false })?.isDirectory()) throw new Error(`
|
|
219
|
-
if (readBundleManifest(bundle).
|
|
218
|
+
if (!statSync(bundle, { throwIfNoEntry: false })?.isDirectory()) throw new Error(`The bundle ${bundle} is missing; run pnpm build:plugins first`);
|
|
219
|
+
if (readBundleManifest(bundle).sourceRevision !== sourceRevisionOf(folder)) throw new Error(`The bundle ${bundle} no longer matches ${folder}; run pnpm build:plugins first`);
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
const copyDeclarations = async (root: string, target: string): Promise<readonly string[]> => {
|
|
224
224
|
const copied: string[] = [];
|
|
225
225
|
for (const folder of declarationFolders(root)) {
|
|
226
|
-
if (!statSync(path.join(root, folder), { throwIfNoEntry: false })?.isDirectory()) throw new Error(`${folder}
|
|
226
|
+
if (!statSync(path.join(root, folder), { throwIfNoEntry: false })?.isDirectory()) throw new Error(`${folder} is missing; run pnpm build:agent first`);
|
|
227
227
|
for (const file of (await files(path.join(root, folder))).filter((name) => name.endsWith(".d.ts"))) {
|
|
228
228
|
const destination = path.join(target, path.relative(root, file));
|
|
229
229
|
await mkdir(path.dirname(destination), { recursive: true });
|
|
@@ -242,14 +242,14 @@ export const buildPackage = async (target: string, root = repositoryRoot): Promi
|
|
|
242
242
|
let fileCount = 0;
|
|
243
243
|
let byteSize = 0;
|
|
244
244
|
for (const entry of packageContents(root)) {
|
|
245
|
-
//
|
|
245
|
+
// A bundle is fully built and goes into the package completely, including an asset folder named dist.
|
|
246
246
|
const copied = await copyTo(path.join(root, entry), path.join(target, entry), target, entry === "bundles" ? new Set() : undefined);
|
|
247
247
|
fileCount += copied.length;
|
|
248
248
|
for (const file of copied) byteSize += statSync(file).size;
|
|
249
249
|
}
|
|
250
250
|
for (const folder of builtInPluginFolders(path.join(root, "plugins"))) {
|
|
251
251
|
const bundle = path.join(target, "bundles", path.basename(folder));
|
|
252
|
-
|
|
252
|
+
assertBundleRevision(bundle, readBundleManifest(bundle));
|
|
253
253
|
}
|
|
254
254
|
for (const file of await copyDeclarations(root, target)) {
|
|
255
255
|
fileCount += 1;
|
|
@@ -272,7 +272,7 @@ export const buildPackage = async (target: string, root = repositoryRoot): Promi
|
|
|
272
272
|
const manifest = {
|
|
273
273
|
name: PACKAGE_NAME,
|
|
274
274
|
version: readPackageVersion(root),
|
|
275
|
-
description: "RAgents
|
|
275
|
+
description: "RAgents host: server, engine, plugins and tools without a source checkout",
|
|
276
276
|
keywords: [...PACKAGE_KEYWORDS],
|
|
277
277
|
homepage: "https://schlenkr.github.io/RAgents/",
|
|
278
278
|
bugs: { url: `${REPOSITORY_URL}/issues` },
|
|
@@ -296,18 +296,18 @@ export const buildPackage = async (target: string, root = repositoryRoot): Promi
|
|
|
296
296
|
const main = async (): Promise<void> => {
|
|
297
297
|
const pack = process.argv.includes("--pack");
|
|
298
298
|
const unknown = process.argv.slice(2).filter((argument) => argument !== "--pack");
|
|
299
|
-
if (unknown.length) throw new Error(`
|
|
299
|
+
if (unknown.length) throw new Error(`Unknown argument: ${unknown.join(" ")} (allowed: --pack)`);
|
|
300
300
|
const target = path.join(repositoryRoot, "dist", PACKAGE_FOLDER);
|
|
301
301
|
const built = await buildPackage(target);
|
|
302
|
-
console.log(`==
|
|
303
|
-
console.log(`== Host
|
|
304
|
-
console.log(`== ${built.fileCount}
|
|
302
|
+
console.log(`== Package ${PACKAGE_NAME}@${built.manifest.version as string} in ${built.directory}`);
|
|
303
|
+
console.log(`== Host version ${(built.manifest.ragents as { hostVersion: string }).hostVersion}`);
|
|
304
|
+
console.log(`== ${built.fileCount} files, ${(built.byteSize / 1024 / 1024).toFixed(1)} MB, ${Object.keys(built.manifest.dependencies as object).length} dependencies`);
|
|
305
305
|
for (const [name, version] of Object.entries(built.manifest.dependencies as Record<string, string>)) console.log(` ${name}@${version}`);
|
|
306
|
-
for (const entry of built.flattened) console.log(`==
|
|
306
|
+
for (const entry of built.flattened) console.log(`== Multiple versions flattened: ${entry}`);
|
|
307
307
|
if (!pack) return;
|
|
308
308
|
const packed = spawnSync("npm", ["pack", "--pack-destination", path.dirname(built.directory)], { cwd: built.directory, encoding: "utf8", stdio: ["ignore", "pipe", "inherit"] });
|
|
309
|
-
if (packed.status !== 0) throw new Error(`npm pack
|
|
310
|
-
console.log(`==
|
|
309
|
+
if (packed.status !== 0) throw new Error(`npm pack ended with code ${packed.status}`);
|
|
310
|
+
console.log(`== Archive ${path.join(path.dirname(built.directory), packed.stdout.trim().split("\n").at(-1) ?? "")}`);
|
|
311
311
|
};
|
|
312
312
|
|
|
313
313
|
const moduleUrl: string | undefined = import.meta.url;
|
|
@@ -15,11 +15,11 @@ const workspaceFolders = (root) => [
|
|
|
15
15
|
const nameOf = (folder) => {
|
|
16
16
|
const file = path.join(folder, "package.json");
|
|
17
17
|
const name = JSON.parse(readFileSync(file, "utf8")).name;
|
|
18
|
-
if (typeof name !== "string" || !name) throw new Error(`${file}
|
|
18
|
+
if (typeof name !== "string" || !name) throw new Error(`${file} names no package name`);
|
|
19
19
|
return name;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
/**
|
|
22
|
+
/** Creates in the package @schlenkr/ragents the links that pnpm creates in the checkout; in the checkout it does nothing. */
|
|
23
23
|
export const ensureHostLinks = (root) => {
|
|
24
24
|
const manifest = path.join(root, "package.json");
|
|
25
25
|
if (!isFile(manifest) || JSON.parse(readFileSync(manifest, "utf8")).ragents?.hostVersion === undefined) return [];
|
|
@@ -28,7 +28,7 @@ export const ensureHostLinks = (root) => {
|
|
|
28
28
|
const link = path.join(root, "node_modules", nameOf(folder));
|
|
29
29
|
const existing = lstatSync(link, { throwIfNoEntry: false });
|
|
30
30
|
if (existing) {
|
|
31
|
-
if (realpathSync(link) !== realpathSync(folder)) throw new Error(`${link}
|
|
31
|
+
if (realpathSync(link) !== realpathSync(folder)) throw new Error(`${link} does not point to ${folder}; the package is damaged`);
|
|
32
32
|
continue;
|
|
33
33
|
}
|
|
34
34
|
mkdirSync(path.dirname(link), { recursive: true });
|
|
@@ -6,11 +6,11 @@ import { buildPackage, PACKAGE_FOLDER, PACKAGE_NAME } from "./build-package.ts";
|
|
|
6
6
|
|
|
7
7
|
const repositoryRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
8
8
|
|
|
9
|
-
const usage = `
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const usage = `Usage: pnpm publish:package [--dry-run]
|
|
10
|
+
Builds the package ${PACKAGE_NAME} and publishes it on npm. The token comes from the
|
|
11
|
+
environment variable npm_key. --dry-run passes the dry run through to npm and publishes nothing.
|
|
12
|
+
The version is in the root package.json; before building, the script raises the last place
|
|
13
|
+
above the last published version, in a dry run only in the output.`;
|
|
14
14
|
|
|
15
15
|
const REGISTRY_TOKEN_KEY = "npm_config_//registry.npmjs.org/:_authToken";
|
|
16
16
|
|
|
@@ -22,14 +22,14 @@ export interface NpmResult {
|
|
|
22
22
|
|
|
23
23
|
export type NpmRunner = (args: readonly string[], options: { cwd: string; token?: string }) => NpmResult;
|
|
24
24
|
|
|
25
|
-
/**
|
|
25
|
+
/** The token goes only as configuration into the child process's environment, never onto the command line. */
|
|
26
26
|
export const publishEnvironment = (token: string, base: NodeJS.ProcessEnv = process.env): NodeJS.ProcessEnv =>
|
|
27
27
|
({ ...base, [REGISTRY_TOKEN_KEY]: token });
|
|
28
28
|
|
|
29
|
-
/**
|
|
29
|
+
/** Everything that comes from npm goes through this mask so that the token does not show up even in an error message. */
|
|
30
30
|
export const redacting = (token: string) => (text: string): string => token ? text.split(token).join("<npm_key>") : text;
|
|
31
31
|
|
|
32
|
-
/**
|
|
32
|
+
/** An error message is one line; npm's output is therefore moved onto one. */
|
|
33
33
|
export const oneLine = (text: string): string => text.split("\n").map((line) => line.trim()).filter(Boolean).join("; ");
|
|
34
34
|
|
|
35
35
|
const runNpm: NpmRunner = (args, options) => {
|
|
@@ -39,22 +39,22 @@ const runNpm: NpmRunner = (args, options) => {
|
|
|
39
39
|
env: options.token ? publishEnvironment(options.token) : process.env,
|
|
40
40
|
stdio: ["ignore", "pipe", "pipe"],
|
|
41
41
|
});
|
|
42
|
-
if (result.error) throw new Error(`npm ${args[0]}
|
|
42
|
+
if (result.error) throw new Error(`npm ${args[0]} could not be started: ${result.error.message}`);
|
|
43
43
|
return { status: result.status ?? 1, stdout: result.stdout ?? "", stderr: result.stderr ?? "" };
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
/**
|
|
46
|
+
/** The versions already on npm; a package unknown there is the empty list, not an error. */
|
|
47
47
|
export const publishedVersions = (name: string, npm: NpmRunner): readonly string[] => {
|
|
48
48
|
const result = npm(["view", name, "versions", "--json"], { cwd: repositoryRoot });
|
|
49
49
|
if (result.status !== 0) {
|
|
50
50
|
if (/E404|404 Not Found/.test(`${result.stdout}\n${result.stderr}`)) return [];
|
|
51
|
-
throw new Error(`npm view ${name} versions
|
|
51
|
+
throw new Error(`npm view ${name} versions ended with code ${result.status}: ${oneLine(result.stderr)}`);
|
|
52
52
|
}
|
|
53
53
|
const parsed = JSON.parse(result.stdout.trim() || "[]") as string | readonly string[];
|
|
54
54
|
return typeof parsed === "string" ? [parsed] : parsed;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
/**
|
|
57
|
+
/** The highest version on npm; a package unknown there has none. */
|
|
58
58
|
export const latestPublishedVersion = (npm: NpmRunner = runNpm, name = PACKAGE_NAME): string | undefined =>
|
|
59
59
|
[...publishedVersions(name, npm)].sort(compareVersions).at(-1);
|
|
60
60
|
|
|
@@ -64,22 +64,22 @@ export interface PublishPlan {
|
|
|
64
64
|
readonly hostVersion: string;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/**
|
|
67
|
+
/** What must be right before a publish: the built manifest and a version that does not yet exist on npm. */
|
|
68
68
|
export const publishPlan = (manifest: Record<string, unknown>, published: readonly string[], version: string): PublishPlan => {
|
|
69
69
|
const { name } = manifest as { name?: unknown };
|
|
70
70
|
const access = (manifest.publishConfig as { access?: unknown } | undefined)?.access;
|
|
71
71
|
const hostVersion = (manifest.ragents as { hostVersion?: unknown } | undefined)?.hostVersion;
|
|
72
|
-
if (name !== PACKAGE_NAME) throw new Error(`
|
|
73
|
-
if (access !== "public") throw new Error(`${PACKAGE_NAME}
|
|
72
|
+
if (name !== PACKAGE_NAME) throw new Error(`The built package is named ${String(name)}, but ${PACKAGE_NAME} is published`);
|
|
73
|
+
if (access !== "public") throw new Error(`${PACKAGE_NAME} has a scope and needs publishConfig.access "public", not ${JSON.stringify(access)}`);
|
|
74
74
|
if (!/^\d+\.\d+\.\d+(?:-[0-9a-z.-]+)?$/.test(version)) {
|
|
75
|
-
throw new Error(`
|
|
75
|
+
throw new Error(`The version ${JSON.stringify(version)} is not a version; it is the version in the root package.json`);
|
|
76
76
|
}
|
|
77
77
|
if (typeof hostVersion !== "string" || !/^[0-9a-f]{40}$/.test(hostVersion)) {
|
|
78
|
-
throw new Error("
|
|
78
|
+
throw new Error("The package lacks ragents.hostVersion as a full Git commit; it is built only from a checkout");
|
|
79
79
|
}
|
|
80
80
|
if (published.includes(version)) {
|
|
81
|
-
throw new Error(`${PACKAGE_NAME}@${version}
|
|
82
|
-
+ "
|
|
81
|
+
throw new Error(`${PACKAGE_NAME}@${version} is already on npm (there: ${published.join(", ")}); `
|
|
82
|
+
+ "raise version in the root package.json and rebuild");
|
|
83
83
|
}
|
|
84
84
|
return { name: PACKAGE_NAME, version, hostVersion };
|
|
85
85
|
};
|
|
@@ -93,32 +93,32 @@ export interface PublishOptions {
|
|
|
93
93
|
readonly log: (line: string) => void;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
/** npm
|
|
96
|
+
/** npm reports a missing organization as 404; without the hint you look for the error in the package. */
|
|
97
97
|
const scopeAdvice = (output: string): string => /Scope not found/i.test(output)
|
|
98
|
-
? `
|
|
99
|
-
+ "
|
|
98
|
+
? ` The organization ${PACKAGE_NAME.split("/")[0]} does not exist on npm or the token may not use it: `
|
|
99
|
+
+ "create it on npmjs.com or grant the token access to the scope."
|
|
100
100
|
: "";
|
|
101
101
|
|
|
102
|
-
/**
|
|
102
|
+
/** Publishes the built folder; exit 0 of npm publish is the confirmation. */
|
|
103
103
|
export const publishDirectory = (options: PublishOptions): void => {
|
|
104
104
|
const hide = redacting(options.token);
|
|
105
105
|
const published = options.npm(["publish", "--access", "public", ...options.dryRun ? ["--dry-run"] : []], { cwd: options.directory, token: options.token });
|
|
106
106
|
const output = `${published.stdout}${published.stderr}`;
|
|
107
107
|
for (const line of output.split("\n")) if (line.trim()) options.log(hide(line));
|
|
108
|
-
if (published.status !== 0) throw new Error(`npm publish
|
|
108
|
+
if (published.status !== 0) throw new Error(`npm publish ended with code ${published.status}.${scopeAdvice(output)}`);
|
|
109
109
|
if (options.dryRun) {
|
|
110
|
-
options.log("==
|
|
110
|
+
options.log("== Dry run: nothing published");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
options.log(`==
|
|
113
|
+
options.log(`== Published: ${PACKAGE_NAME}@${options.version}`);
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
const main = async (): Promise<void> => {
|
|
117
117
|
const dryRun = process.argv.includes("--dry-run");
|
|
118
118
|
const unknown = process.argv.slice(2).filter((argument) => argument !== "--dry-run");
|
|
119
|
-
if (unknown.length) throw new Error(`
|
|
119
|
+
if (unknown.length) throw new Error(`Unknown argument: ${unknown.join(" ")}\n${usage}`);
|
|
120
120
|
const token = process.env.npm_key;
|
|
121
|
-
if (!token) throw new Error(`npm_key
|
|
121
|
+
if (!token) throw new Error(`npm_key is missing: the npm token with write access to ${PACKAGE_NAME}.\n${usage}`);
|
|
122
122
|
const manifestFile = path.join(repositoryRoot, "package.json");
|
|
123
123
|
const published = publishedVersions(PACKAGE_NAME, runNpm);
|
|
124
124
|
const extensionManifestFile = path.join(repositoryRoot, "apps", "vscode", "package.json");
|
|
@@ -131,7 +131,7 @@ const main = async (): Promise<void> => {
|
|
|
131
131
|
}
|
|
132
132
|
const built = await buildPackage(path.join(repositoryRoot, "dist", PACKAGE_FOLDER));
|
|
133
133
|
const plan = publishPlan(built.manifest, published, next.version);
|
|
134
|
-
console.log(`== ${plan.name}@${plan.version}
|
|
134
|
+
console.log(`== ${plan.name}@${plan.version} from host ${plan.hostVersion.slice(0, 12)}, ${built.fileCount} files, ${(built.byteSize / 1024 / 1024).toFixed(1)} MB`);
|
|
135
135
|
publishDirectory({ directory: built.directory, version: plan.version, token, dryRun, npm: runNpm, log: (line) => console.log(line) });
|
|
136
136
|
};
|
|
137
137
|
|
|
@@ -19,24 +19,24 @@ export const commands = {
|
|
|
19
19
|
stop: AGENT_CLI,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const usage = `
|
|
22
|
+
const usage = `Usage: ragents <command> [arguments]
|
|
23
23
|
|
|
24
|
-
run <
|
|
25
|
-
send <run> "<text>"
|
|
26
|
-
journal <run> [--tools]
|
|
27
|
-
stop <run> | stop --host
|
|
28
|
-
connect <server-url>
|
|
29
|
-
start <
|
|
30
|
-
|
|
31
|
-
provision [<
|
|
32
|
-
workspace-client <server-url>
|
|
33
|
-
plugin build <
|
|
34
|
-
--help, help
|
|
24
|
+
run <folder> "<task>" start the host without UI, create a run and wait for the end
|
|
25
|
+
send <run> "<text>" follow-up task in the same run
|
|
26
|
+
journal <run> [--tools] read the history of a run
|
|
27
|
+
stop <run> | stop --host cancel the running turn or stop the remembered host
|
|
28
|
+
connect <server-url> fetch the client profile with its bundles and start the local server with it
|
|
29
|
+
start <profile|path> start a profile of the package, an own profile file or a
|
|
30
|
+
fetched revision; the UI comes prebuilt
|
|
31
|
+
provision [<profile>|--workspace] fetch the plugins' tools
|
|
32
|
+
workspace-client <server-url> register this machine as a workspace
|
|
33
|
+
plugin build <folder...> build plugin source folders into bundles (--out, --watch)
|
|
34
|
+
--help, help this usage
|
|
35
35
|
|
|
36
|
-
run, send, journal
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
run, send, journal and stop take another profile with --profile <profile|path>: a name
|
|
37
|
+
next to the host or the path to an own ragents.config.<profile>.ts. RAGENTS_PROFILE sets
|
|
38
|
+
the same for all commands of a shell; if the profile requires sign-in, the user's
|
|
39
|
+
personal token goes into RAGENTS_TOKEN.
|
|
40
40
|
`;
|
|
41
41
|
|
|
42
42
|
const main = () => {
|
|
@@ -48,7 +48,7 @@ const main = () => {
|
|
|
48
48
|
}
|
|
49
49
|
const script = command ? commands[command] : undefined;
|
|
50
50
|
if (!script) {
|
|
51
|
-
console.error(command ? `
|
|
51
|
+
console.error(command ? `Unknown command: ${command}\n\n${usage}` : usage);
|
|
52
52
|
process.exit(1);
|
|
53
53
|
}
|
|
54
54
|
ensureHostLinks(root);
|
|
@@ -62,11 +62,11 @@ const main = () => {
|
|
|
62
62
|
process.on("SIGINT", forward("SIGINT"));
|
|
63
63
|
process.on("SIGTERM", forward("SIGTERM"));
|
|
64
64
|
child.once("error", (error) => {
|
|
65
|
-
console.error(`ragents ${command}
|
|
65
|
+
console.error(`ragents ${command} could not be started: ${error.message}`);
|
|
66
66
|
process.exit(1);
|
|
67
67
|
});
|
|
68
68
|
child.once("exit", (code, signal) => process.exit(code ?? (signal ? 1 : 0)));
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
// npm
|
|
71
|
+
// npm installs the command as a link; the comparison therefore needs the real path.
|
|
72
72
|
if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) main();
|
|
@@ -20,25 +20,25 @@ const removeOrphans = async (folders: readonly string[]): Promise<void> => {
|
|
|
20
20
|
.filter((entry) => entry.isDirectory() && !entry.name.startsWith(".") && !ids.has(entry.name));
|
|
21
21
|
for (const orphan of orphans) {
|
|
22
22
|
await rm(path.join(bundlesRoot, orphan.name), { recursive: true, force: true });
|
|
23
|
-
console.log(`
|
|
23
|
+
console.log(`removed: ${orphan.name} (no source folder anymore)`);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
//
|
|
27
|
+
// Without type checking, because pnpm -r typecheck already checks the sources; only outdated ones, so running servers and parallel builds keep their bundles.
|
|
28
28
|
const main = async (argv: readonly string[]): Promise<number> => {
|
|
29
29
|
const unknown = argv.filter((argument) => argument !== "--watch");
|
|
30
|
-
if (unknown.length > 0) throw new Error(`
|
|
30
|
+
if (unknown.length > 0) throw new Error(`Unknown argument: ${unknown.join(" ")} (allowed: --watch)`);
|
|
31
31
|
const folders = builtInPluginFolders();
|
|
32
32
|
if (argv.includes("--watch")) {
|
|
33
33
|
const watching = await watchPlugins(folders, { out: bundlesRoot }, printOutcome);
|
|
34
|
-
console.log(`
|
|
34
|
+
console.log(`watching ${folders.length} built-in plugins; Ctrl+C stops`);
|
|
35
35
|
await untilStopped();
|
|
36
36
|
await watching.stop();
|
|
37
37
|
return 0;
|
|
38
38
|
}
|
|
39
39
|
const outcomes = await buildPlugins(folders, { out: bundlesRoot, typecheck: false, onlyOutdated: true });
|
|
40
40
|
for (const outcome of outcomes) printOutcome(outcome);
|
|
41
|
-
if (outcomes.length < folders.length) console.log(`
|
|
41
|
+
if (outcomes.length < folders.length) console.log(`up to date: ${folders.length - outcomes.length} of ${folders.length} built-in plugins, left unchanged`);
|
|
42
42
|
await removeOrphans(folders);
|
|
43
43
|
return outcomes.every((outcome) => outcome.kind === "built") ? 0 : 1;
|
|
44
44
|
};
|
|
@@ -5,14 +5,14 @@ import { callerDirectory } from "../../apps/server/src/profile-target.ts";
|
|
|
5
5
|
|
|
6
6
|
export const DEFAULT_OUT = "dist/plugins";
|
|
7
7
|
|
|
8
|
-
export const usage = (): string => `
|
|
8
|
+
export const usage = (): string => `Usage: ragents plugin build <folder...> [--out <folder>] [--watch] [--no-typecheck]
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(import.meta.url, __dirname, createRequire),
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
Builds every plugin source folder with ragents-plugin.json into a bundle under <out>/<id>,
|
|
11
|
+
default ./${DEFAULT_OUT}. A bundle may take only the host API from the host and only their
|
|
12
|
+
declared exports from other plugins; any other location, a file access relative to its own
|
|
13
|
+
location (import.meta.url, __dirname, createRequire), a binary file (.node) and every type
|
|
14
|
+
error abort the build with the cause. --watch rebuilds on every change in the folder and does
|
|
15
|
+
not check types, the editor does that. Exit code 0 if all plugins are built, otherwise 1.`;
|
|
16
16
|
|
|
17
17
|
export interface PluginCommand {
|
|
18
18
|
readonly folders: readonly string[];
|
|
@@ -23,7 +23,7 @@ export interface PluginCommand {
|
|
|
23
23
|
|
|
24
24
|
export const parsePluginArguments = (argv: readonly string[], caller = callerDirectory()): PluginCommand => {
|
|
25
25
|
const [command, ...rest] = argv;
|
|
26
|
-
if (command !== "build") throw new Error(command ? `
|
|
26
|
+
if (command !== "build") throw new Error(command ? `Unknown command: plugin ${command}\n\n${usage()}` : usage());
|
|
27
27
|
const folders: string[] = [];
|
|
28
28
|
const switches = new Set<string>();
|
|
29
29
|
let out: string | undefined;
|
|
@@ -31,18 +31,18 @@ export const parsePluginArguments = (argv: readonly string[], caller = callerDir
|
|
|
31
31
|
const argument = rest[index]!;
|
|
32
32
|
if (argument === "--out") {
|
|
33
33
|
const value = rest[index + 1];
|
|
34
|
-
if (value === undefined || value.startsWith("--")) throw new Error("--out
|
|
34
|
+
if (value === undefined || value.startsWith("--")) throw new Error("--out needs a folder.");
|
|
35
35
|
out = value;
|
|
36
36
|
index += 1;
|
|
37
37
|
} else if (argument === "--watch" || argument === "--no-typecheck") {
|
|
38
38
|
switches.add(argument);
|
|
39
39
|
} else if (argument.startsWith("--")) {
|
|
40
|
-
throw new Error(`
|
|
40
|
+
throw new Error(`Unknown argument: ${argument}\n\n${usage()}`);
|
|
41
41
|
} else {
|
|
42
42
|
folders.push(path.resolve(caller, argument));
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
if (folders.length === 0) throw new Error(`plugin build
|
|
45
|
+
if (folders.length === 0) throw new Error(`plugin build needs at least one plugin folder.\n\n${usage()}`);
|
|
46
46
|
return {
|
|
47
47
|
folders,
|
|
48
48
|
out: path.resolve(caller, out ?? DEFAULT_OUT),
|
|
@@ -58,8 +58,8 @@ const shown = (folder: string, caller: string): string => {
|
|
|
58
58
|
|
|
59
59
|
export const outcomeLines = (outcome: PluginBuildOutcome, caller = callerDirectory()): readonly string[] =>
|
|
60
60
|
outcome.kind === "built"
|
|
61
|
-
? [`
|
|
62
|
-
: [`
|
|
61
|
+
? [`built: ${outcome.id} -> ${shown(outcome.bundle, caller)} (${outcome.milliseconds} ms${outcome.manifest.uses.length > 0 ? `, uses ${outcome.manifest.uses.join(", ")}` : ""})`]
|
|
62
|
+
: [`failed: ${outcome.id} (${shown(outcome.source, caller)})`, ...outcome.problems.map((problem) => ` ${problem.replaceAll("\n", "\n ")}`)];
|
|
63
63
|
|
|
64
64
|
export const printOutcome = (outcome: PluginBuildOutcome): void => {
|
|
65
65
|
const lines = outcomeLines(outcome).join("\n");
|
|
@@ -80,7 +80,7 @@ export const main = async (argv: readonly string[]): Promise<number> => {
|
|
|
80
80
|
const command = parsePluginArguments(argv);
|
|
81
81
|
if (command.watch) {
|
|
82
82
|
const watching = await watchPlugins(command.folders, { out: command.out }, printOutcome);
|
|
83
|
-
console.log(`
|
|
83
|
+
console.log(`watching ${command.folders.length} plugin folders; Ctrl+C stops`);
|
|
84
84
|
await untilStopped();
|
|
85
85
|
await watching.stop();
|
|
86
86
|
return 0;
|