@schlenkr/ragents 0.1.8 → 0.1.10

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.
Files changed (218) hide show
  1. package/apps/server/package.json +1 -1
  2. package/apps/server/src/access-projection.ts +6 -36
  3. package/apps/server/src/api/contracts.ts +5 -2
  4. package/apps/server/src/api/core-methods.ts +5 -3
  5. package/apps/server/src/config-definition.ts +24 -2
  6. package/apps/server/src/config-file.ts +1 -1
  7. package/apps/server/src/config.ts +0 -6
  8. package/apps/server/src/host-api.json +5 -10
  9. package/apps/server/src/host-api.ts +6 -7
  10. package/apps/server/src/plugin-build/build.ts +28 -5
  11. package/apps/server/src/plugin-build/plugin-description.ts +1 -1
  12. package/apps/server/src/plugin-build/typecheck.ts +2 -2
  13. package/apps/server/src/plugin-support/language-server/plugin.ts +8 -7
  14. package/apps/server/src/plugin-support/language-server/tools.ts +7 -6
  15. package/apps/server/src/plugin-support/model-aliases.ts +55 -25
  16. package/apps/server/src/plugin-support/process-sandbox.ts +16 -15
  17. package/apps/server/src/plugin-support/product-relay.ts +10 -2
  18. package/apps/server/src/plugin-support/workspace-sandbox-host.ts +18 -9
  19. package/apps/server/src/profile/bundle-manifest.ts +7 -3
  20. package/apps/server/src/profile/compose.ts +6 -0
  21. package/apps/server/src/profile/plugin-discovery.ts +6 -1
  22. package/apps/server/src/profile/provisioning.ts +6 -5
  23. package/apps/server/src/provider.ts +2 -2
  24. package/apps/server/src/ragents/engine.ts +2 -2
  25. package/apps/server/src/ragents/global-chat.ts +7 -1
  26. package/apps/server/src/ragents/host-services.ts +4 -0
  27. package/apps/server/src/ragents/session.ts +1 -1
  28. package/apps/server/src/server.ts +4 -1
  29. package/apps/server/tsconfig.json +2 -0
  30. package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-xXXhTDbh.js → highlighted-body-KPVGNVTW-BO4wLQtE.js} +1 -1
  31. package/apps/web/dist/assets/main-DnnqWHkH.js +11 -0
  32. package/apps/web/dist/assets/mermaid-HWGCJPDP-BLLeth5_.js +568 -0
  33. package/apps/web/dist/assets/{runPanel-ZT6TPDLM.js → runPanel-DPm7s3KM.js} +2 -2
  34. package/apps/web/dist/help/guide-clients.html +26 -8
  35. package/apps/web/dist/help/guide-clients.md +27 -8
  36. package/apps/web/dist/help/guide-distributed.html +12 -4
  37. package/apps/web/dist/help/guide-distributed.md +12 -4
  38. package/apps/web/dist/help/guide-getting-started.html +12 -8
  39. package/apps/web/dist/help/guide-getting-started.md +12 -8
  40. package/apps/web/dist/help/guide-plugins.html +6 -2
  41. package/apps/web/dist/help/guide-plugins.md +6 -2
  42. package/apps/web/dist/help/guide-runtime.html +2 -1
  43. package/apps/web/dist/help/guide-runtime.md +2 -1
  44. package/apps/web/dist/help/index.html +4328 -1132
  45. package/apps/web/dist/help/mini-app.css +24 -0
  46. package/apps/web/dist/host-web.json +4 -4
  47. package/apps/web/dist/index.html +2 -2
  48. package/apps/web/dist/run-panel.html +2 -2
  49. package/apps/web/package.json +1 -1
  50. package/apps/web/src/panel/ConnectionsPage.tsx +3 -0
  51. package/apps/web/src/panel/StartPage.tsx +3 -0
  52. package/apps/web/src/panel/contract.ts +7 -0
  53. package/bundles/ragents.activity/ragents-bundle.json +3 -3
  54. package/bundles/ragents.actor-programs/ragents-bundle.json +4 -4
  55. package/bundles/ragents.actor-programs/server/index.js +31 -3
  56. package/bundles/ragents.actor-programs/server/index.js.map +4 -4
  57. package/bundles/ragents.actor-programs/web/index.js.map +1 -1
  58. package/bundles/ragents.ask/ragents-bundle.json +4 -6
  59. package/bundles/ragents.ask/server/index.js +42 -11
  60. package/bundles/ragents.ask/server/index.js.map +3 -3
  61. package/bundles/ragents.ask/web/chunks/{chunk-V7W3QDVS.js → chunk-MBRPS477.js} +2 -2
  62. package/bundles/ragents.ask/web/chunks/{chunk-V7W3QDVS.js.map → chunk-MBRPS477.js.map} +4 -4
  63. package/bundles/ragents.ask/web/chunks/chunk-WFN4374U.js +2 -0
  64. package/bundles/ragents.ask/web/chunks/chunk-WFN4374U.js.map +7 -0
  65. package/bundles/ragents.ask/web/classes.json +1 -1
  66. package/bundles/ragents.ask/web/exports/ask-payload.js +1 -1
  67. package/bundles/ragents.ask/web/exports/web/QuestionCard.js +1 -1
  68. package/bundles/ragents.ask/web/index.js +1 -1
  69. package/bundles/ragents.ask/web/index.js.map +4 -4
  70. package/bundles/ragents.browser/executor/index.mjs +357 -0
  71. package/bundles/ragents.browser/executor/index.mjs.map +7 -0
  72. package/bundles/ragents.browser/ragents-bundle.json +5 -8
  73. package/bundles/ragents.browser/server/chunks/{chunk-2GKLLCBE.js → chunk-CWLX4VA5.js} +1 -1
  74. package/bundles/ragents.browser/server/chunks/chunk-CWLX4VA5.js.map +7 -0
  75. package/bundles/ragents.browser/server/exports/server/contract.js +1 -1
  76. package/bundles/ragents.browser/server/index.js +20 -9
  77. package/bundles/ragents.browser/server/index.js.map +4 -4
  78. package/bundles/ragents.documents/ragents-bundle.json +3 -3
  79. package/bundles/ragents.lsp-fsharp/executor/index.mjs +68 -0
  80. package/bundles/ragents.lsp-fsharp/executor/index.mjs.map +7 -0
  81. package/bundles/ragents.lsp-fsharp/ragents-bundle.json +5 -9
  82. package/bundles/ragents.lsp-fsharp/server/index.js +21 -6
  83. package/bundles/ragents.lsp-fsharp/server/index.js.map +4 -4
  84. package/bundles/ragents.lsp-roslyn/executor/index.mjs +68 -0
  85. package/bundles/ragents.lsp-roslyn/executor/index.mjs.map +7 -0
  86. package/bundles/ragents.lsp-roslyn/ragents-bundle.json +6 -8
  87. package/bundles/ragents.lsp-roslyn/server/index.js +54 -15
  88. package/bundles/ragents.lsp-roslyn/server/index.js.map +4 -4
  89. package/bundles/ragents.lsp-typescript/executor/index.mjs +49 -0
  90. package/bundles/ragents.lsp-typescript/executor/index.mjs.map +7 -0
  91. package/bundles/ragents.lsp-typescript/ragents-bundle.json +5 -7
  92. package/bundles/ragents.lsp-typescript/server/index.js +22 -2
  93. package/bundles/ragents.lsp-typescript/server/index.js.map +3 -3
  94. package/bundles/ragents.model-relay/ragents-bundle.json +4 -4
  95. package/bundles/ragents.model-relay/server/index.js +3 -2
  96. package/bundles/ragents.model-relay/server/index.js.map +2 -2
  97. package/bundles/ragents.orchestration/ragents-bundle.json +4 -4
  98. package/bundles/ragents.orchestration/web/classes.json +1 -1
  99. package/bundles/ragents.orchestration/web/index.js +6 -6
  100. package/bundles/ragents.orchestration/web/index.js.map +3 -3
  101. package/bundles/ragents.overseer/ragents-bundle.json +4 -4
  102. package/bundles/ragents.overseer/server/index.js +1 -1
  103. package/bundles/ragents.overseer/server/index.js.map +2 -2
  104. package/bundles/ragents.processes/ragents-bundle.json +3 -3
  105. package/bundles/ragents.product/ragents-bundle.json +3 -3
  106. package/bundles/ragents.profile-distribution/ragents-bundle.json +4 -4
  107. package/bundles/ragents.profile-distribution/server/index.js +1 -1
  108. package/bundles/ragents.profile-distribution/server/index.js.map +2 -2
  109. package/bundles/ragents.reference/ragents-bundle.json +3 -3
  110. package/bundles/ragents.todo/ragents-bundle.json +3 -3
  111. package/bundles/ragents.transcript/ragents-bundle.json +3 -3
  112. package/bundles/ragents.watch/ragents-bundle.json +3 -3
  113. package/bundles/ragents.workspace/ragents-bundle.json +11 -5
  114. package/bundles/ragents.workspace/server/index.js +105 -30
  115. package/bundles/ragents.workspace/server/index.js.map +3 -3
  116. package/bundles/ragents.workspace/web/classes.json +1 -1
  117. package/bundles/ragents.workspace/web/index.js +1 -1
  118. package/bundles/ragents.workspace/web/index.js.map +3 -3
  119. package/package.json +3 -3
  120. package/packages/agent/dist/core/agent-settings.d.ts +1 -7
  121. package/packages/agent/dist/core/compaction/compaction.d.ts +17 -13
  122. package/packages/agent/dist/core/model-runtime.d.ts +5 -4
  123. package/packages/agent/dist/core/provider-composer.d.ts +2 -1
  124. package/packages/agent/dist/core/tools/bash.d.ts +9 -3
  125. package/packages/agent/dist/index.d.ts +1 -1
  126. package/packages/agent/src/core/agent-settings.ts +1 -4
  127. package/packages/agent/src/core/compaction/compaction.ts +68 -30
  128. package/packages/agent/src/core/model-runtime.ts +12 -5
  129. package/packages/agent/src/core/provider-composer.ts +5 -0
  130. package/packages/agent/src/core/tools/bash.ts +36 -30
  131. package/packages/agent/src/index.ts +3 -0
  132. package/packages/ai/dist/types.d.ts +11 -0
  133. package/packages/ai/src/types.ts +12 -0
  134. package/packages/ragents/src/domain/event-semantics.ts +3 -0
  135. package/packages/ragents/src/domain/event-validation.ts +15 -2
  136. package/packages/ragents/src/domain/events.ts +3 -0
  137. package/packages/ragents/src/domain/model.ts +2 -0
  138. package/packages/ragents/src/domain/projection.ts +1 -0
  139. package/packages/ragents/src/drivers/agent-runtime.ts +1 -1
  140. package/packages/ragents/src/drivers/agent-turn.ts +8 -6
  141. package/packages/ragents/src/index.ts +1 -0
  142. package/packages/ragents/src/plugin-host.ts +46 -0
  143. package/packages/ragents/src/plugin-types.ts +19 -0
  144. package/packages/ragents/src/runtime/decisions/inputs.ts +6 -2
  145. package/packages/ragents/src/runtime/journal-storage.ts +5 -4
  146. package/packages/workspace-executor/package.json +0 -1
  147. package/packages/workspace-executor/src/bash-launch.ts +56 -10
  148. package/packages/workspace-executor/src/context.ts +4 -0
  149. package/packages/workspace-executor/src/contributions.ts +150 -0
  150. package/packages/workspace-executor/src/executor.ts +1 -1
  151. package/packages/workspace-executor/src/index.ts +16 -19
  152. package/packages/workspace-executor/src/language-server/host.ts +3 -0
  153. package/packages/workspace-executor/src/language-server/module.ts +12 -2
  154. package/packages/workspace-executor/src/language-server/roots.ts +0 -5
  155. package/packages/workspace-executor/src/managed-process.ts +28 -0
  156. package/packages/workspace-executor/src/modules.ts +7 -6
  157. package/packages/workspace-executor/src/sandbox-tools.ts +12 -12
  158. package/packages/workspace-executor/src/shell-platform.ts +14 -3
  159. package/packages/workspace-executor/src/tools.ts +0 -3
  160. package/plugins/ragents.actor-programs/server/access-projections.ts +31 -0
  161. package/plugins/ragents.actor-programs/server/index.ts +2 -0
  162. package/plugins/ragents.ask/ask-payload.ts +9 -0
  163. package/plugins/ragents.ask/server/ask-service.ts +53 -13
  164. package/plugins/ragents.ask/web/AskActionView.tsx +3 -2
  165. package/plugins/ragents.ask/web/index.tsx +0 -6
  166. package/plugins/ragents.browser/executor/index.ts +5 -0
  167. package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/module.ts +25 -31
  168. package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/playwright.ts +9 -23
  169. package/plugins/ragents.browser/provision.ts +1 -1
  170. package/plugins/ragents.browser/server/browser.ts +3 -3
  171. package/plugins/ragents.browser/server/contract.ts +2 -2
  172. package/plugins/ragents.browser/server/index.ts +1 -1
  173. package/plugins/ragents.lsp-fsharp/executor.ts +80 -0
  174. package/plugins/ragents.lsp-fsharp/provision.ts +1 -1
  175. package/plugins/ragents.lsp-fsharp/server/index.ts +2 -2
  176. package/plugins/ragents.lsp-roslyn/executor.ts +64 -0
  177. package/plugins/ragents.lsp-roslyn/provision.ts +1 -1
  178. package/plugins/ragents.lsp-roslyn/server/index.ts +28 -5
  179. package/plugins/ragents.lsp-roslyn/server/solution-on-start.ts +18 -6
  180. package/plugins/ragents.lsp-typescript/executor.ts +50 -0
  181. package/plugins/ragents.lsp-typescript/server/index.ts +2 -2
  182. package/plugins/ragents.model-relay/server/config.ts +1 -1
  183. package/plugins/ragents.model-relay/server/relay.ts +4 -2
  184. package/plugins/ragents.orchestration/web/ActorTile.tsx +1 -1
  185. package/plugins/ragents.orchestration/web/run-panel/RunPanel.tsx +8 -7
  186. package/plugins/ragents.orchestration/web/run-panel/sheet-status.ts +3 -3
  187. package/plugins/ragents.overseer/server/api.ts +2 -2
  188. package/plugins/ragents.profile-distribution/server/archive.ts +2 -1
  189. package/plugins/ragents.workspace/client/workspace-client.ts +128 -32
  190. package/plugins/ragents.workspace/contract.ts +33 -2
  191. package/plugins/ragents.workspace/server/binding.ts +10 -4
  192. package/plugins/ragents.workspace/server/clients.ts +56 -9
  193. package/plugins/ragents.workspace/server/config.ts +12 -0
  194. package/plugins/ragents.workspace/server/index.ts +15 -5
  195. package/plugins/ragents.workspace/server/runtime.ts +10 -0
  196. package/plugins/ragents.workspace/server/shell-platform.ts +6 -5
  197. package/plugins/ragents.workspace/web/WorkspaceBinding.tsx +1 -1
  198. package/ragents.config.core.ts +4 -1
  199. package/ragents.config.showcase.ts +4 -1
  200. package/scripts/agent/journal.ts +3 -1
  201. package/scripts/package/build-package.ts +3 -1
  202. package/scripts/provision/run-provision.ts +2 -2
  203. package/scripts/workspace-client/run-workspace-client.ts +7 -4
  204. package/apps/web/dist/assets/main-C7JeZFjs.js +0 -6
  205. package/apps/web/dist/assets/mermaid-HWGCJPDP-DfsU5ofC.js +0 -478
  206. package/apps/web/dist/help/screenshots/release-checklist-vscode.png +0 -0
  207. package/apps/web/dist/help/screenshots/release-checklist-web.png +0 -0
  208. package/bundles/ragents.ask/web/chunks/chunk-HGFDGTNC.js +0 -2
  209. package/bundles/ragents.ask/web/chunks/chunk-HGFDGTNC.js.map +0 -7
  210. package/bundles/ragents.browser/server/chunks/chunk-2GKLLCBE.js.map +0 -7
  211. package/packages/workspace-executor/src/language-server/adapters/fsharp.ts +0 -60
  212. package/packages/workspace-executor/src/language-server/adapters/index.ts +0 -7
  213. package/packages/workspace-executor/src/language-server/adapters/roslyn.ts +0 -56
  214. package/packages/workspace-executor/src/language-server/adapters/typescript.ts +0 -74
  215. package/packages/workspace-executor/src/language-server/solution.ts +0 -13
  216. package/plugins/ragents.ask/web/QuestionSection.tsx +0 -48
  217. /package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/contract.ts +0 -0
  218. /package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/pages.ts +0 -0
@@ -1,4 +1,4 @@
1
- import{a as M,I as H,u as Z,r as i,j as e,B as y,J as De,K as Ae,w as ze,l as Fe,m as Te,v as _e,k as Me,P as He,H as ce,L as Ue,q as K,s as de,i as Be,N as ue,O as re,T as Ve,V as $e,A as ie,Y as qe,Z as Ke,_ as Ze,$ as Ge,t as Je,a0 as We,e as Qe,a1 as Ye,a2 as Xe,y as et,z as tt,a3 as nt,a4 as st,a5 as rt,F as it,Q as ot,a6 as at,a7 as lt,G as ct}from"./mermaid-HWGCJPDP-DfsU5ofC.js";/**
1
+ import{a as M,H,u as Z,r as i,j as e,B as y,I as De,J as Ae,v as ze,l as Fe,m as Te,t as _e,k as Me,P as He,G as ce,K as Ue,p as K,q as de,i as Be,L as ue,N as re,O as Ve,T as $e,A as ie,V as qe,Y as Ke,Z as Ze,_ as Ge,s as Je,$ as We,e as Qe,a0 as Ye,a1 as Xe,x as et,y as tt,a2 as nt,a3 as st,a4 as rt,z as it,Q as ot,a5 as at,a6 as lt,F as ct}from"./mermaid-HWGCJPDP-BLLeth5_.js";/**
2
2
  * @license lucide-react v1.46.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -18,4 +18,4 @@ import{a as M,I as H,u as Z,r as i,j as e,B as y,J as De,K as Ae,w as ze,l as Fe
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const me={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};me.node;const ht=M(me),$="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring/60 focus-visible:-outline-offset-2 disabled:cursor-default disabled:opacity-50 [&>svg]:size-4 [&>svg]:flex-none [&>svg]:text-muted-foreground";function q({onOpenSettings:t}){const o=H(),r=Z(),[s,a]=i.useState(!1),[l,c]=i.useState(!1),[f,x]=i.useState(),b=i.useRef(null),u=i.useId(),R=d=>{var S;return d.reason==="outside-press"&&d.event.target instanceof Node&&((S=b.current)==null?void 0:S.contains(d.event.target))===!0},E=()=>{if(o.kind==="vscode"){o.requestLogout(),a(!1);return}c(!0),x(void 0),r.logout().then(()=>a(!1)).catch(d=>x(d instanceof Error?d.message:String(d))).finally(()=>c(!1))};return e.jsxs(e.Fragment,{children:[e.jsx(y,{"aria-controls":s?u:void 0,"aria-expanded":s,"aria-haspopup":"dialog","aria-label":"Menü des Panels",className:"self-center",onClick:()=>a(d=>!d),ref:b,size:"icon-lg",title:"Menü",variant:"ghost",children:e.jsx(dt,{})}),e.jsx(De,{onOpenChange:(d,S)=>{!d&&R(S)||a(d)},open:s,children:e.jsxs(Ae,{align:"end",anchor:b,"aria-label":"Menü des Panels",className:"w-[220px] gap-0 p-1 text-[0.8rem]",collisionPadding:8,dim:!0,id:u,role:"dialog",side:"bottom",children:[e.jsxs("button",{className:$,onClick:()=>{a(!1),t()},type:"button",children:[e.jsx(ze,{}),"Einstellungen"]}),o.kind==="vscode"&&e.jsxs("button",{className:$,onClick:()=>{a(!1),o.openExternal(new URL("/",window.location.href).toString())},type:"button",children:[e.jsx(ut,{}),"Im Browser öffnen"]}),r.enabled&&r.user&&e.jsxs("button",{className:$,disabled:l,onClick:E,title:r.user.id,type:"button",children:[e.jsx(ht,{}),e.jsxs("span",{className:"grid min-w-0",children:[e.jsx("span",{children:"Abmelden"}),e.jsx("span",{className:"truncate text-[0.68rem] text-muted-foreground",children:r.user.label})]})]}),f&&e.jsx("p",{className:"px-2 py-1.5 text-[0.72rem] text-destructive",role:"alert",children:f})]})})]})}const xt=5e3;function pe(t){const[o,r]=i.useState([]),[s,a]=i.useState(!1),l=i.useRef(void 0),c=i.useRef(!1),f=i.useCallback(()=>{if(!t)return Promise.resolve();if(l.current)return c.current=!0,l.current;const x=async()=>{do{c.current=!1;try{r(await _e()),a(!1)}catch{a(!0)}}while(c.current)};return l.current=x().finally(()=>{l.current=void 0}),l.current},[t]);return i.useEffect(()=>{if(!t)return;f();const x=Fe.subscribe(Te.channels.runs,{},()=>void f()),b=setInterval(()=>void f(),xt);return()=>{x(),clearInterval(b)}},[t,f]),{sessions:o,unreachable:s,refresh:f}}const ge="relative z-[80] flex h-header flex-none items-stretch border-b border-border bg-shell shadow-bar",oe="max-w-[120px] self-center truncate rounded-full bg-secondary px-2 py-0.5 text-[0.66rem] font-semibold text-muted-foreground",mt="min-w-0 flex-1 self-center truncate px-1.5 text-[0.82rem] font-semibold",pt="Gestoppt im Run-Panel",gt=5e3,v="Neuer Run",vt="relative z-[80] flex h-header flex-none items-center gap-2 border-b border-border bg-shell px-3 shadow-bar",ve="m-auto max-w-[420px] p-6 text-center text-muted-foreground",wt=new Set,bt=()=>({id:crypto.randomUUID(),title:v,updatedAt:Date.now()}),we=(t,o="Run")=>({id:t,title:o,updatedAt:Date.now()}),St={kind:"working",title:"Profil wird geladen",detail:"Die Oberfläche des Servers wird geladen."},jt={kind:"working",title:"Run wird gestartet",detail:"Der neue Run wird angelegt."},ae={kind:"working",title:"Run wird gestartet",detail:"Die Vorlage wird gestartet."},kt={kind:"waiting",title:"Kein Run gewählt",detail:"Auf der Start-Seite startest Du einen neuen Run oder öffnest einen vorhandenen."},yt={kind:"error",title:"Keine Runs freigegeben",detail:"Für dieses Benutzerkonto sind keine Runs freigegeben."};function Rt({location:t}){const o=Me(),r=t.layout==="app";if(o.status==="loading")return e.jsx(w,{headless:r,state:St});if(o.status==="failed")return e.jsx(w,{headless:r,state:{kind:"error",title:"Das Profil konnte nicht geladen werden",detail:o.error},children:e.jsx(y,{onClick:()=>window.location.reload(),size:"sm",variant:"outline",children:"Neu laden"})});const s=t.layout==="app"?e.jsx(It,{elementId:t.elementId,registry:o.registry,runId:t.runId}):e.jsx(Et,{connection:t.connection,initialRunId:t.runId,registry:o.registry});return o.failures.length===0?s:e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx(He,{failures:o.failures}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:s})]})}function Et({connection:t,initialRunId:o,registry:r}){var se;const s=H(),a=Z(),l=a.can("runs.read"),c=l&&a.can("runs.write"),f=c&&a.can("runs.create"),x=f||c&&r.scriptEntries.some(n=>de(a,n.id)),b=Be((se=a.user)==null?void 0:se.id),[u,R]=i.useState(o),[E,d]=i.useState(),[S,I]=i.useState(),p=i.useCallback(()=>I(n=>n===u?void 0:n),[u]),[Se,G]=i.useState(),[h,N]=i.useState(),[D,J]=i.useState(),U=i.useRef(void 0),g=i.useCallback(n=>{U.current=n==null?void 0:n.runId,J(n)},[]),[W,B]=i.useState(),[P,Q]=i.useState(!1),[Y,X]=i.useState(),V=i.useCallback(()=>Q(!0),[]),{sessions:ee,unreachable:je,refresh:ke}=pe(l&&!h&&!D),[ye,Re]=i.useState(null),[Ee,Ne]=i.useState(null),O=i.useCallback((n,m)=>{var _;const j=(_=r.startEntries.find(Le=>Le.id===m))==null?void 0:_.fixedStartOptions;N({session:bt(),startOptions:n&&ue(n,j),entryId:m})},[r]),Ce=i.useCallback(()=>O(),[O]),L=i.useCallback((n,m)=>{N(void 0),g(void 0),G(m),R(n),I(s.kind==="vscode"?n:void 0)},[s.kind,g]),te=i.useCallback(n=>{N(void 0),g(n),Nt(n,r,a).then(()=>{U.current===n.runId&&L(n.runId)},m=>{U.current===n.runId&&J({...n,error:m instanceof Error?m.message:String(m)})})},[a,L,r,g]),Ie=i.useCallback(n=>{I(void 0),d(void 0),R(n)},[]),A=i.useCallback(()=>{I(void 0),N(void 0),g(void 0),B(void 0),s.kind==="vscode"?s.notify({type:"showStart"}):R(void 0)},[s,g]);i.useLayoutEffect(()=>{if(S){if(P||h){p();return}return window.addEventListener("pointerdown",p,!0),window.addEventListener("keydown",p,!0),window.addEventListener("blur",p),()=>{window.removeEventListener("pointerdown",p,!0),window.removeEventListener("keydown",p,!0),window.removeEventListener("blur",p)}}},[h,S,P,p]),i.useEffect(()=>s.onCommand(n=>{if(n.type==="selectRun"&&(I(void 0),N(void 0),g(void 0),B(void 0),G(void 0),d(void 0),R(n.runId??void 0)),n.type!=="newRun")return;if(s.kind!=="vscode"){x&&O(n.startOptions,n.entryId);return}const m=x?n.entryId===void 0&&!f?"Freie Runs sind für dieses Benutzerkonto nicht freigegeben.":void 0:"Neue Runs sind für dieses Benutzerkonto nicht freigegeben.";if(B(m),m!==void 0)return;const j=r.startEntries.find(_=>_.id===n.entryId);if(d((j==null?void 0:j.title)??v),n.entryId===void 0){L(crypto.randomUUID(),n.startOptions);return}if(j!==void 0&&r.guideFor(j)!==void 0){g(void 0),O(n.startOptions,j.id);return}te({runId:crypto.randomUUID(),entryId:n.entryId,startOptions:n.startOptions})}),[x,f,s,L,r,g,O,te]),i.useEffect(()=>{s.notify({type:"ready"})},[s]),i.useEffect(()=>{s.notify({type:"runChanged",runId:u??null})},[s,u]);const z=P&&e.jsx(Je,{onClose:()=>Q(!1),registry:r}),C=n=>e.jsxs(e.Fragment,{children:[e.jsx(y,{"aria-label":"Zur Start-Seite",className:"self-center",onClick:A,size:"icon-lg",title:"Zur Start-Seite",variant:"ghost",children:e.jsx(re,{})}),e.jsx("strong",{className:mt,children:n}),t&&e.jsx("span",{className:oe,title:`Server ${t}`,children:t}),e.jsx(q,{onOpenSettings:V})]}),F=e.jsx(y,{onClick:A,size:"sm",variant:"outline",children:"Zur Start-Seite"}),ne=h&&e.jsx(K,{initialStartOptions:h.startOptions,onStarted:()=>{L(h.session.id),d(n=>n??v),ke()},registry:r,session:h.session,startDialog:{onClose:s.kind==="vscode"?A:()=>N(void 0),initialEntryId:h.entryId}},h.session.id);if(D)return e.jsxs(e.Fragment,{children:[D.error===void 0?e.jsx(w,{header:C(E??v),state:ae}):e.jsx(w,{header:C(E??v),state:{kind:"error",title:"Der Run konnte nicht gestartet werden",detail:D.error},children:F}),z]});if(s.kind==="vscode"&&h)return e.jsxs(e.Fragment,{children:[e.jsx(w,{header:C(E??v),state:ae}),ne,z]});if(s.kind==="vscode"&&!(l&&u))return e.jsxs(e.Fragment,{children:[l?W!==void 0?e.jsx(w,{header:C(v),state:{kind:"error",title:"Kein neuer Run möglich",detail:W},children:F}):e.jsx(Ct,{header:C(v),children:F}):e.jsx(w,{header:C(v),state:yt,children:F}),z]});const T=ee.find(n=>n.id===u),Pe=()=>{u!==void 0&&(X(void 0),We(u,pt).catch(n=>X(`Stoppen fehlgeschlagen: ${n instanceof Error?n.message:String(n)}`)))},Oe=l?e.jsx(Qe,{activeId:u,onCreate:x?Ce:void 0,onSelect:Ie,onToggleSelected:()=>{},registry:r,seenRevisions:b.revisions,selectMode:!1,selectedIds:wt,sessions:ee}):e.jsx("p",{className:ve,children:"Für dieses Benutzerkonto sind keine Runs freigegeben."});return e.jsxs("div",{className:"flex h-full flex-col bg-[image:var(--surface-backdrop)]",children:[l&&u?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:ge,children:[e.jsx(y,{"aria-label":"Zur Start-Seite",className:"self-center",onClick:A,size:"icon-lg",title:"Zur Start-Seite",variant:"ghost",children:e.jsx(re,{})}),e.jsx("div",{"aria-label":"Run-Titelleiste",className:"flex min-w-0 flex-1 items-stretch overflow-x-auto no-scrollbar",ref:Re,role:"region"}),t&&e.jsx("span",{className:oe,title:`Server ${t}`,children:t}),e.jsx(Ve,{className:"self-center px-1.5",state:T!=null&&T.running?"running":"idle"}),e.jsx($e,{className:"self-center",disabled:!c,label:"Run stoppen",onClick:Pe,size:"icon-lg",title:"Run mit allen Agenten und Abläufen stoppen"}),e.jsx("div",{"aria-label":"Werkzeuge des Panels",className:"flex flex-none items-center empty:hidden",ref:Ne,role:"toolbar"}),e.jsx(q,{onOpenSettings:V})]}),Y&&e.jsx(ie,{variant:"destructive",children:Y}),e.jsx("main",{className:"relative z-1 flex min-h-0 min-w-0 flex-1 @container/chat-content",children:e.jsx(K,{autoFocusChat:S===u&&!P&&!h,onAutoFocusChatSettled:p,toolbarContainer:Ee,headerContainer:ye,initialStartOptions:Se,layout:"panel",onViewed:b.markViewed,registry:r,session:T??we(u,E),viewing:!h&&!P},u)})]}):e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:vt,children:[e.jsx(ft,{"aria-hidden":!0,className:"size-4 flex-none text-muted-foreground"}),e.jsx("strong",{className:"min-w-0 flex-1 truncate text-[0.82rem] font-semibold",children:r.brand.title}),e.jsx(q,{onOpenSettings:V})]}),e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto p-3",children:[je&&e.jsx(ie,{className:"mb-3",variant:"destructive",children:"Der Server ist nicht erreichbar."}),Oe]})]}),z,ne]})}async function Nt(t,o,r){const s=o.startEntries.find(a=>a.id===t.entryId);if(!s)throw new Error("Diese Vorlage gibt es in diesem Profil nicht.");if(!de(r,s.id))throw new Error(`${s.title} ist für dieses Benutzerkonto nicht freigegeben.`);if(t.startOptions){const a=await qe(t.runId),l=ue(t.startOptions,s.fixedStartOptions);for(const[c,f]of Ke(a,l))await Ze(t.runId,c,f)}await Ge(t.runId,s,null)}function Ct({children:t,header:o}){const[r,s]=i.useState(!1);return i.useEffect(()=>{const a=window.setTimeout(()=>s(!0),gt);return()=>window.clearTimeout(a)},[]),r?e.jsx(w,{header:o,state:kt,children:t}):e.jsx(w,{header:o,state:jt})}function w({children:t,header:o,headless:r=!1,state:s}){return e.jsxs("div",{className:"flex h-full flex-col bg-[image:var(--surface-backdrop)]",children:[!r&&e.jsx("header",{className:ge,children:o}),e.jsx("main",{className:"grid min-h-0 flex-1 place-items-center overflow-hidden p-6",children:e.jsx(Ue,{state:s,children:t})})]})}function It({elementId:t,registry:o,runId:r}){const s=H(),a=Z().can("runs.read"),{sessions:l}=pe(a);return i.useEffect(()=>{s.notify({type:"ready"})},[s]),a?e.jsx("main",{className:"relative flex h-full min-h-0 min-w-0 flex-1 bg-background @container/chat-content",children:e.jsx(K,{layout:{element:t},registry:o,session:l.find(c=>c.id===r)??we(r)},r)}):e.jsx("p",{className:ve,children:"Für dieses Benutzerkonto sind keine Runs freigegeben."})}function Pt(){const t=H();return e.jsxs(ce,{children:[e.jsx("h1",{className:"my-3 text-[1.5rem]",children:"Anmeldung erforderlich"}),e.jsx("p",{className:"mb-6 leading-normal text-muted-foreground",children:"Die Anmeldung läuft über VS Code. Danach lädt das Panel neu."}),e.jsx(y,{className:"w-full",onClick:()=>t.requestLogin(),children:"In VS Code anmelden"})]})}const k=t=>t!=null&&t.trim()?t.trim():void 0,Ot=t=>{if(t==="browser"||t==="vscode")return t;throw new Error(`Unbekannter Host ${JSON.stringify(t)}. Erlaubt sind browser und vscode.`)};function Lt(t){const o=new URLSearchParams(t),r=k(o.get("layout"))??"panel";if(r!=="panel"&&r!=="app")throw new Error(`Unbekanntes Layout ${JSON.stringify(r)}. Erlaubt sind panel und app.`);const s=k(o.get("theme"));if(s!==void 0&&!Ye(s))throw new Error(`Unbekannte Darstellung ${JSON.stringify(s)}. Erlaubt sind light und dark.`);const a={host:Ot(k(o.get("host"))??"browser"),connection:k(o.get("connection")),theme:s,access:k(o.get(Xe))},l=k(o.get("run"));if(r==="panel")return{layout:r,runId:l,...a};const c=k(o.get("element"));if(!l||!c)throw new Error("Das Layout app braucht run und element.");return{layout:r,runId:l,elementId:c,...a}}et();const be=document.getElementById("root");if(!be)throw new Error("Root-Element fehlt");const le=tt.createRoot(be);try{const t=Lt(window.location.search);t.access!==void 0&&nt(t.access);const o=st(t.host,window);if(t.host==="vscode"){const s=rt(window)}const r=it(window);t.theme!==void 0&&r.setPreference(t.theme),o.onCommand(s=>{s.type==="theme"&&r.setPreference(s.theme)}),le.render(e.jsx(i.StrictMode,{children:e.jsx(ot,{children:e.jsx(at,{value:o,children:e.jsx(lt,{value:t.host==="vscode"?{open:o.openPage}:void 0,children:e.jsx(ct,{Login:t.host==="vscode"?Pt:void 0,children:e.jsx(Rt,{location:t})})})})})}))}catch(t){le.render(e.jsxs(ce,{children:[e.jsx("h1",{className:"my-3 text-[1.5rem]",children:"Das RAgents-Panel konnte nicht geladen werden"}),e.jsx("p",{className:"mb-6 leading-normal",role:"alert",children:t instanceof Error?t.message:String(t)}),e.jsx(y,{onClick:()=>window.location.reload(),variant:"outline",children:"Erneut laden"})]}))}
21
+ */const pe={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};pe.node;const ht=M(pe),$="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2 py-1.5 text-left hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring/60 focus-visible:-outline-offset-2 disabled:cursor-default disabled:opacity-50 [&>svg]:size-4 [&>svg]:flex-none [&>svg]:text-muted-foreground";function q({onOpenSettings:t}){const o=H(),r=Z(),[s,a]=i.useState(!1),[l,c]=i.useState(!1),[f,x]=i.useState(),b=i.useRef(null),u=i.useId(),R=d=>{var S;return d.reason==="outside-press"&&d.event.target instanceof Node&&((S=b.current)==null?void 0:S.contains(d.event.target))===!0},E=()=>{if(o.kind==="vscode"){o.requestLogout(),a(!1);return}c(!0),x(void 0),r.logout().then(()=>a(!1)).catch(d=>x(d instanceof Error?d.message:String(d))).finally(()=>c(!1))};return e.jsxs(e.Fragment,{children:[e.jsx(y,{"aria-controls":s?u:void 0,"aria-expanded":s,"aria-haspopup":"dialog","aria-label":"Menü des Panels",className:"self-center",onClick:()=>a(d=>!d),ref:b,size:"icon-lg",title:"Menü",variant:"ghost",children:e.jsx(dt,{})}),e.jsx(De,{onOpenChange:(d,S)=>{!d&&R(S)||a(d)},open:s,children:e.jsxs(Ae,{align:"end",anchor:b,"aria-label":"Menü des Panels",className:"w-[220px] gap-0 p-1 text-[0.8rem]",collisionPadding:8,dim:!0,id:u,role:"dialog",side:"bottom",children:[e.jsxs("button",{className:$,onClick:()=>{a(!1),t()},type:"button",children:[e.jsx(ze,{}),"Einstellungen"]}),o.kind==="vscode"&&e.jsxs("button",{className:$,onClick:()=>{a(!1),o.openExternal(new URL("/",window.location.href).toString())},type:"button",children:[e.jsx(ut,{}),"Im Browser öffnen"]}),r.enabled&&r.user&&e.jsxs("button",{className:$,disabled:l,onClick:E,title:r.user.id,type:"button",children:[e.jsx(ht,{}),e.jsxs("span",{className:"grid min-w-0",children:[e.jsx("span",{children:"Abmelden"}),e.jsx("span",{className:"truncate text-[0.68rem] text-muted-foreground",children:r.user.label})]})]}),f&&e.jsx("p",{className:"px-2 py-1.5 text-[0.72rem] text-destructive",role:"alert",children:f})]})})]})}const xt=5e3;function me(t){const[o,r]=i.useState([]),[s,a]=i.useState(!1),l=i.useRef(void 0),c=i.useRef(!1),f=i.useCallback(()=>{if(!t)return Promise.resolve();if(l.current)return c.current=!0,l.current;const x=async()=>{do{c.current=!1;try{r(await _e()),a(!1)}catch{a(!0)}}while(c.current)};return l.current=x().finally(()=>{l.current=void 0}),l.current},[t]);return i.useEffect(()=>{if(!t)return;f();const x=Fe.subscribe(Te.channels.runs,{},()=>void f()),b=setInterval(()=>void f(),xt);return()=>{x(),clearInterval(b)}},[t,f]),{sessions:o,unreachable:s,refresh:f}}const ge="relative z-[80] flex h-header flex-none items-stretch border-b border-border bg-shell shadow-bar",oe="max-w-[120px] self-center truncate rounded-full bg-secondary px-2 py-0.5 text-[0.66rem] font-semibold text-muted-foreground",pt="min-w-0 flex-1 self-center truncate px-1.5 text-[0.82rem] font-semibold",mt="Gestoppt im Run-Panel",gt=5e3,v="Neuer Run",vt="relative z-[80] flex h-header flex-none items-center gap-2 border-b border-border bg-shell px-3 shadow-bar",ve="m-auto max-w-[420px] p-6 text-center text-muted-foreground",wt=new Set,bt=()=>({id:crypto.randomUUID(),title:v,updatedAt:Date.now()}),we=(t,o="Run")=>({id:t,title:o,updatedAt:Date.now()}),St={kind:"working",title:"Profil wird geladen",detail:"Die Oberfläche des Servers wird geladen."},jt={kind:"working",title:"Run wird gestartet",detail:"Der neue Run wird angelegt."},ae={kind:"working",title:"Run wird gestartet",detail:"Die Vorlage wird gestartet."},kt={kind:"waiting",title:"Kein Run gewählt",detail:"Auf der Start-Seite startest Du einen neuen Run oder öffnest einen vorhandenen."},yt={kind:"error",title:"Keine Runs freigegeben",detail:"Für dieses Benutzerkonto sind keine Runs freigegeben."};function Rt({location:t}){const o=Me(),r=t.layout==="app";if(o.status==="loading")return e.jsx(w,{headless:r,state:St});if(o.status==="failed")return e.jsx(w,{headless:r,state:{kind:"error",title:"Das Profil konnte nicht geladen werden",detail:o.error},children:e.jsx(y,{onClick:()=>window.location.reload(),size:"sm",variant:"outline",children:"Neu laden"})});const s=t.layout==="app"?e.jsx(It,{elementId:t.elementId,registry:o.registry,runId:t.runId}):e.jsx(Et,{connection:t.connection,initialRunId:t.runId,registry:o.registry});return o.failures.length===0?s:e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx(He,{failures:o.failures}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:s})]})}function Et({connection:t,initialRunId:o,registry:r}){var se;const s=H(),a=Z(),l=a.can("runs.read"),c=l&&a.can("runs.write"),f=c&&a.can("runs.create"),x=f||c&&r.scriptEntries.some(n=>de(a,n.id)),b=Be((se=a.user)==null?void 0:se.id),[u,R]=i.useState(o),[E,d]=i.useState(),[S,I]=i.useState(),m=i.useCallback(()=>I(n=>n===u?void 0:n),[u]),[Se,G]=i.useState(),[h,N]=i.useState(),[D,J]=i.useState(),U=i.useRef(void 0),g=i.useCallback(n=>{U.current=n==null?void 0:n.runId,J(n)},[]),[W,B]=i.useState(),[P,Q]=i.useState(!1),[Y,X]=i.useState(),V=i.useCallback(()=>Q(!0),[]),{sessions:ee,unreachable:je,refresh:ke}=me(l&&!h&&!D),[ye,Re]=i.useState(null),[Ee,Ne]=i.useState(null),O=i.useCallback((n,p)=>{var _;const j=(_=r.startEntries.find(Le=>Le.id===p))==null?void 0:_.fixedStartOptions;N({session:bt(),startOptions:n&&ue(n,j),entryId:p})},[r]),Ce=i.useCallback(()=>O(),[O]),L=i.useCallback((n,p)=>{N(void 0),g(void 0),G(p),R(n),I(s.kind==="vscode"?n:void 0)},[s.kind,g]),te=i.useCallback(n=>{N(void 0),g(n),Nt(n,r,a).then(()=>{U.current===n.runId&&L(n.runId)},p=>{U.current===n.runId&&J({...n,error:p instanceof Error?p.message:String(p)})})},[a,L,r,g]),Ie=i.useCallback(n=>{I(void 0),d(void 0),R(n)},[]),A=i.useCallback(()=>{I(void 0),N(void 0),g(void 0),B(void 0),s.kind==="vscode"?s.notify({type:"showStart"}):R(void 0)},[s,g]);i.useLayoutEffect(()=>{if(S){if(P||h){m();return}return window.addEventListener("pointerdown",m,!0),window.addEventListener("keydown",m,!0),window.addEventListener("blur",m),()=>{window.removeEventListener("pointerdown",m,!0),window.removeEventListener("keydown",m,!0),window.removeEventListener("blur",m)}}},[h,S,P,m]),i.useEffect(()=>s.onCommand(n=>{if(n.type==="selectRun"&&(I(void 0),N(void 0),g(void 0),B(void 0),G(void 0),d(void 0),R(n.runId??void 0)),n.type!=="newRun")return;if(s.kind!=="vscode"){x&&O(n.startOptions,n.entryId);return}const p=x?n.entryId===void 0&&!f?"Freie Runs sind für dieses Benutzerkonto nicht freigegeben.":void 0:"Neue Runs sind für dieses Benutzerkonto nicht freigegeben.";if(B(p),p!==void 0)return;const j=r.startEntries.find(_=>_.id===n.entryId);if(d((j==null?void 0:j.title)??v),n.entryId===void 0){L(crypto.randomUUID(),n.startOptions);return}if(j!==void 0&&r.guideFor(j)!==void 0){g(void 0),O(n.startOptions,j.id);return}te({runId:crypto.randomUUID(),entryId:n.entryId,startOptions:n.startOptions})}),[x,f,s,L,r,g,O,te]),i.useEffect(()=>{s.notify({type:"ready"})},[s]),i.useEffect(()=>{s.notify({type:"runChanged",runId:u??null})},[s,u]);const z=P&&e.jsx(Je,{onClose:()=>Q(!1),registry:r}),C=n=>e.jsxs(e.Fragment,{children:[e.jsx(y,{"aria-label":"Zur Start-Seite",className:"self-center",onClick:A,size:"icon-lg",title:"Zur Start-Seite",variant:"ghost",children:e.jsx(re,{})}),e.jsx("strong",{className:pt,children:n}),t&&e.jsx("span",{className:oe,title:`Server ${t}`,children:t}),e.jsx(q,{onOpenSettings:V})]}),F=e.jsx(y,{onClick:A,size:"sm",variant:"outline",children:"Zur Start-Seite"}),ne=h&&e.jsx(K,{initialStartOptions:h.startOptions,onStarted:()=>{L(h.session.id),d(n=>n??v),ke()},registry:r,session:h.session,startDialog:{onClose:s.kind==="vscode"?A:()=>N(void 0),initialEntryId:h.entryId}},h.session.id);if(D)return e.jsxs(e.Fragment,{children:[D.error===void 0?e.jsx(w,{header:C(E??v),state:ae}):e.jsx(w,{header:C(E??v),state:{kind:"error",title:"Der Run konnte nicht gestartet werden",detail:D.error},children:F}),z]});if(s.kind==="vscode"&&h)return e.jsxs(e.Fragment,{children:[e.jsx(w,{header:C(E??v),state:ae}),ne,z]});if(s.kind==="vscode"&&!(l&&u))return e.jsxs(e.Fragment,{children:[l?W!==void 0?e.jsx(w,{header:C(v),state:{kind:"error",title:"Kein neuer Run möglich",detail:W},children:F}):e.jsx(Ct,{header:C(v),children:F}):e.jsx(w,{header:C(v),state:yt,children:F}),z]});const T=ee.find(n=>n.id===u),Pe=()=>{u!==void 0&&(X(void 0),We(u,mt).catch(n=>X(`Stoppen fehlgeschlagen: ${n instanceof Error?n.message:String(n)}`)))},Oe=l?e.jsx(Qe,{activeId:u,onCreate:x?Ce:void 0,onSelect:Ie,onToggleSelected:()=>{},registry:r,seenRevisions:b.revisions,selectMode:!1,selectedIds:wt,sessions:ee}):e.jsx("p",{className:ve,children:"Für dieses Benutzerkonto sind keine Runs freigegeben."});return e.jsxs("div",{className:"flex h-full flex-col bg-[image:var(--surface-backdrop)]",children:[l&&u?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:ge,children:[e.jsx(y,{"aria-label":"Zur Start-Seite",className:"self-center",onClick:A,size:"icon-lg",title:"Zur Start-Seite",variant:"ghost",children:e.jsx(re,{})}),e.jsx("div",{"aria-label":"Run-Titelleiste",className:"flex min-w-0 flex-1 items-stretch overflow-x-auto no-scrollbar",ref:Re,role:"region"}),t&&e.jsx("span",{className:oe,title:`Server ${t}`,children:t}),e.jsx(Ve,{className:"self-center px-1.5",state:T!=null&&T.running?"running":"idle"}),e.jsx($e,{className:"self-center",disabled:!c,label:"Run stoppen",onClick:Pe,size:"icon-lg",title:"Run mit allen Agenten und Abläufen stoppen"}),e.jsx("div",{"aria-label":"Werkzeuge des Panels",className:"flex flex-none items-center empty:hidden",ref:Ne,role:"toolbar"}),e.jsx(q,{onOpenSettings:V})]}),Y&&e.jsx(ie,{variant:"destructive",children:Y}),e.jsx("main",{className:"relative z-1 flex min-h-0 min-w-0 flex-1 @container/chat-content",children:e.jsx(K,{autoFocusChat:S===u&&!P&&!h,onAutoFocusChatSettled:m,toolbarContainer:Ee,headerContainer:ye,initialStartOptions:Se,layout:"panel",onViewed:b.markViewed,registry:r,session:T??we(u,E),viewing:!h&&!P},u)})]}):e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:vt,children:[e.jsx(ft,{"aria-hidden":!0,className:"size-4 flex-none text-muted-foreground"}),e.jsx("strong",{className:"min-w-0 flex-1 truncate text-[0.82rem] font-semibold",children:r.brand.title}),e.jsx(q,{onOpenSettings:V})]}),e.jsxs("div",{className:"min-h-0 flex-1 overflow-auto p-3",children:[je&&e.jsx(ie,{className:"mb-3",variant:"destructive",children:"Der Server ist nicht erreichbar."}),Oe]})]}),z,ne]})}async function Nt(t,o,r){const s=o.startEntries.find(a=>a.id===t.entryId);if(!s)throw new Error("Diese Vorlage gibt es in diesem Profil nicht.");if(!de(r,s.id))throw new Error(`${s.title} ist für dieses Benutzerkonto nicht freigegeben.`);if(t.startOptions){const a=await qe(t.runId),l=ue(t.startOptions,s.fixedStartOptions);for(const[c,f]of Ke(a,l))await Ze(t.runId,c,f)}await Ge(t.runId,s,null)}function Ct({children:t,header:o}){const[r,s]=i.useState(!1);return i.useEffect(()=>{const a=window.setTimeout(()=>s(!0),gt);return()=>window.clearTimeout(a)},[]),r?e.jsx(w,{header:o,state:kt,children:t}):e.jsx(w,{header:o,state:jt})}function w({children:t,header:o,headless:r=!1,state:s}){return e.jsxs("div",{className:"flex h-full flex-col bg-[image:var(--surface-backdrop)]",children:[!r&&e.jsx("header",{className:ge,children:o}),e.jsx("main",{className:"grid min-h-0 flex-1 place-items-center overflow-hidden p-6",children:e.jsx(Ue,{state:s,children:t})})]})}function It({elementId:t,registry:o,runId:r}){const s=H(),a=Z().can("runs.read"),{sessions:l}=me(a);return i.useEffect(()=>{s.notify({type:"ready"})},[s]),a?e.jsx("main",{className:"relative flex h-full min-h-0 min-w-0 flex-1 bg-background @container/chat-content",children:e.jsx(K,{layout:{element:t},registry:o,session:l.find(c=>c.id===r)??we(r)},r)}):e.jsx("p",{className:ve,children:"Für dieses Benutzerkonto sind keine Runs freigegeben."})}function Pt(){const t=H();return e.jsxs(ce,{children:[e.jsx("h1",{className:"my-3 text-[1.5rem]",children:"Anmeldung erforderlich"}),e.jsx("p",{className:"mb-6 leading-normal text-muted-foreground",children:"Die Anmeldung läuft über VS Code. Danach lädt das Panel neu."}),e.jsx(y,{className:"w-full",onClick:()=>t.requestLogin(),children:"In VS Code anmelden"})]})}const k=t=>t!=null&&t.trim()?t.trim():void 0,Ot=t=>{if(t==="browser"||t==="vscode")return t;throw new Error(`Unbekannter Host ${JSON.stringify(t)}. Erlaubt sind browser und vscode.`)};function Lt(t){const o=new URLSearchParams(t),r=k(o.get("layout"))??"panel";if(r!=="panel"&&r!=="app")throw new Error(`Unbekanntes Layout ${JSON.stringify(r)}. Erlaubt sind panel und app.`);const s=k(o.get("theme"));if(s!==void 0&&!Ye(s))throw new Error(`Unbekannte Darstellung ${JSON.stringify(s)}. Erlaubt sind light und dark.`);const a={host:Ot(k(o.get("host"))??"browser"),connection:k(o.get("connection")),theme:s,access:k(o.get(Xe))},l=k(o.get("run"));if(r==="panel")return{layout:r,runId:l,...a};const c=k(o.get("element"));if(!l||!c)throw new Error("Das Layout app braucht run und element.");return{layout:r,runId:l,elementId:c,...a}}et();const be=document.getElementById("root");if(!be)throw new Error("Root-Element fehlt");const le=tt.createRoot(be);try{const t=Lt(window.location.search);t.access!==void 0&&nt(t.access);const o=st(t.host,window);if(t.host==="vscode"){const s=rt(window)}const r=it(window);t.theme!==void 0&&r.setPreference(t.theme),o.onCommand(s=>{s.type==="theme"&&r.setPreference(s.theme)}),le.render(e.jsx(i.StrictMode,{children:e.jsx(ot,{children:e.jsx(at,{value:o,children:e.jsx(lt,{value:t.host==="vscode"?{open:o.openPage}:void 0,children:e.jsx(ct,{Login:t.host==="vscode"?Pt:void 0,children:e.jsx(Rt,{location:t})})})})})}))}catch(t){le.render(e.jsxs(ce,{children:[e.jsx("h1",{className:"my-3 text-[1.5rem]",children:"Das RAgents-Panel konnte nicht geladen werden"}),e.jsx("p",{className:"mb-6 leading-normal",role:"alert",children:t instanceof Error?t.message:String(t)}),e.jsx(y,{onClick:()=>window.location.reload(),variant:"outline",children:"Erneut laden"})]}))}
@@ -156,8 +156,10 @@ mini-app, so unsaved input in it is lost. The choice is stored per run and survi
156
156
  The extension can also open a mini-app as an editor tab in the center, which works well with
157
157
  &quot;Nur Chat&quot; in the run panel.</p>
158
158
  <p>In &quot;Chat unten&quot;, the handle controls the expanded chat height. Dragging up makes it taller;
159
- dragging down makes it shorter. The chosen height is stored per run. The collapsed chat always
160
- shows only the handle, status, and complete input, including multiple input lines. Hovering or
159
+ dragging down makes it shorter. The chosen height is stored per run. The collapsed chat shows the
160
+ handle, status, and complete input, including multiple input lines. An open question sits
161
+ completely above the input there as well: the collapsed chat grows by its height, up to half of
162
+ the panel, and the status line reads &quot;Wartet auf Eingabe&quot; (waiting for input). Hovering or
161
163
  writing opens the chat to the chosen height (90 percent of the panel by default). Dragging leaves
162
164
  the chat open at its new height. Clicking the handle opens or closes it. With
163
165
  keyboard focus on the handle, up and down change the height, Home and End select its limits, and
@@ -204,11 +206,14 @@ a checkout. <code>ragents.hostPath</code> remains an override pointing to a chec
204
206
  The status bar shows the number of connected servers and opens the start page when clicked. See
205
207
  the root <code>README.md</code> for details.</p>
206
208
  <p>Install the extension from the Marketplace as <code>purestate.ragents-vscode</code> using &quot;Extensions:
207
- Install Extension&quot; or <code>code --install-extension purestate.ragents-vscode</code>. To install a locally
208
- packaged file, run <code>pnpm package:vscode</code>, which builds
209
- <code>dist/ragents-vscode-&lt;version&gt;.vsix</code>, then use &quot;Extensions: Install from VSIX&quot; or
210
- <code>code --install-extension dist/ragents-vscode-&lt;version&gt;.vsix --force</code>. <code>scripts/vscode/install-local.sh</code>
211
- performs both steps, rebuilds the built-in plugins, and
209
+ Install Extension&quot; or <code>code --install-extension purestate.ragents-vscode</code>. The Marketplace
210
+ delivers the build for your platform, which carries ripgrep for the <code>bash</code> tool (see
211
+ <a href="guide-distributed.html#work-on-windows">Work on Windows</a> for the Windows bash). To install a locally
212
+ packaged file, run <code>pnpm package:vscode</code>, which builds the universal
213
+ <code>dist/ragents-vscode-&lt;version&gt;.vsix</code> and one <code>dist/ragents-vscode-&lt;platform&gt;-&lt;version&gt;.vsix</code> per
214
+ platform, such as <code>darwin-arm64</code>, then use &quot;Extensions: Install from VSIX&quot; or
215
+ <code>code --install-extension dist/ragents-vscode-darwin-arm64-&lt;version&gt;.vsix --force</code>. <code>scripts/vscode/install-local.sh</code>
216
+ performs both steps with the file for this machine, rebuilds the built-in plugins, and
212
217
  rebuilds the web interface if it no longer matches its sources, so that hosts from this checkout
213
218
  start again. The script then restarts manually launched
214
219
  servers (<code>scripts/start.sh</code>, identified by <code>RAGENTS_LAUNCH=start.sh</code> in their environment, with logs under
@@ -263,7 +268,20 @@ server has locked, for example because its journal uses an older format, shows a
263
268
  tooltip names the cause; it does not open, but the selection mode deletes it.</p>
264
269
  <p><strong>Server</strong> is the configuration page. You can add, edit, sign in, sign out, connect,
265
270
  disconnect, and remove servers with confirmation, then open <code>settings.json</code> from the link
266
- at the bottom.</p>
271
+ at the bottom. If a connected server does not accept this window&#39;s folders as a workstation, its
272
+ entry says &quot;Arbeitsplatz nicht angemeldet&quot; (workstation not registered) with the cause.</p>
273
+ <p>The extension compares its own RAgents version with the version each server reports. If they
274
+ differ, the server row, the top of Start, the status bar, and a notification show &quot;RAgents-Fassung
275
+ passt nicht: Erweiterung 0.1.9, Server 0.1.8 - ...&quot; (RAgents version does not match), followed by
276
+ what to update: the extension if it is older, the server if it is older, or the host in
277
+ <code>ragents.hostPath</code> for a local profile. A server that reports no version counts as older. While the
278
+ workstation stays registered, this is a warning and everything keeps working. When the server
279
+ rejects the workstation for the same reason, because the workspace executor versions differ or the
280
+ host the extension uses lacks a plugin bundle the server&#39;s executor carries, or carries it in
281
+ another version, it is an error that also names the server&#39;s cause; the same error appears when
282
+ both report the same version but their builds differ. The notification appears once per server
283
+ and message; &quot;Erweiterung zeigen&quot; (show extension) opens the extension page for the update, and
284
+ &quot;Server zeigen&quot; (show server) opens the Server page.</p>
267
285
  <p>Every status uses a colored icon and a tooltip with the same vocabulary everywhere. A run is
268
286
  &quot;läuft&quot; (running), &quot;wartet auf Eingabe&quot; (waiting for input, with the number of open inputs),
269
287
  &quot;ruht&quot; (idle), &quot;beendet&quot; (ended), &quot;fehlgeschlagen&quot; (failed), or &quot;abgebrochen&quot; (cancelled). A
@@ -32,8 +32,10 @@ The extension can also open a mini-app as an editor tab in the center, which wor
32
32
  "Nur Chat" in the run panel.
33
33
 
34
34
  In "Chat unten", the handle controls the expanded chat height. Dragging up makes it taller;
35
- dragging down makes it shorter. The chosen height is stored per run. The collapsed chat always
36
- shows only the handle, status, and complete input, including multiple input lines. Hovering or
35
+ dragging down makes it shorter. The chosen height is stored per run. The collapsed chat shows the
36
+ handle, status, and complete input, including multiple input lines. An open question sits
37
+ completely above the input there as well: the collapsed chat grows by its height, up to half of
38
+ the panel, and the status line reads "Wartet auf Eingabe" (waiting for input). Hovering or
37
39
  writing opens the chat to the chosen height (90 percent of the panel by default). Dragging leaves
38
40
  the chat open at its new height. Clicking the handle opens or closes it. With
39
41
  keyboard focus on the handle, up and down change the height, Home and End select its limits, and
@@ -84,11 +86,14 @@ The status bar shows the number of connected servers and opens the start page wh
84
86
  the root `README.md` for details.
85
87
 
86
88
  Install the extension from the Marketplace as `purestate.ragents-vscode` using "Extensions:
87
- Install Extension" or `code --install-extension purestate.ragents-vscode`. To install a locally
88
- packaged file, run `pnpm package:vscode`, which builds
89
- `dist/ragents-vscode-<version>.vsix`, then use "Extensions: Install from VSIX" or
90
- `code --install-extension dist/ragents-vscode-<version>.vsix --force`. `scripts/vscode/install-local.sh`
91
- performs both steps, rebuilds the built-in plugins, and
89
+ Install Extension" or `code --install-extension purestate.ragents-vscode`. The Marketplace
90
+ delivers the build for your platform, which carries ripgrep for the `bash` tool (see
91
+ [Work on Windows](guide-distributed.html#work-on-windows) for the Windows bash). To install a locally
92
+ packaged file, run `pnpm package:vscode`, which builds the universal
93
+ `dist/ragents-vscode-<version>.vsix` and one `dist/ragents-vscode-<platform>-<version>.vsix` per
94
+ platform, such as `darwin-arm64`, then use "Extensions: Install from VSIX" or
95
+ `code --install-extension dist/ragents-vscode-darwin-arm64-<version>.vsix --force`. `scripts/vscode/install-local.sh`
96
+ performs both steps with the file for this machine, rebuilds the built-in plugins, and
92
97
  rebuilds the web interface if it no longer matches its sources, so that hosts from this checkout
93
98
  start again. The script then restarts manually launched
94
99
  servers (`scripts/start.sh`, identified by `RAGENTS_LAUNCH=start.sh` in their environment, with logs under
@@ -150,7 +155,21 @@ tooltip names the cause; it does not open, but the selection mode deletes it.
150
155
 
151
156
  **Server** is the configuration page. You can add, edit, sign in, sign out, connect,
152
157
  disconnect, and remove servers with confirmation, then open `settings.json` from the link
153
- at the bottom.
158
+ at the bottom. If a connected server does not accept this window's folders as a workstation, its
159
+ entry says "Arbeitsplatz nicht angemeldet" (workstation not registered) with the cause.
160
+
161
+ The extension compares its own RAgents version with the version each server reports. If they
162
+ differ, the server row, the top of Start, the status bar, and a notification show "RAgents-Fassung
163
+ passt nicht: Erweiterung 0.1.9, Server 0.1.8 - ..." (RAgents version does not match), followed by
164
+ what to update: the extension if it is older, the server if it is older, or the host in
165
+ `ragents.hostPath` for a local profile. A server that reports no version counts as older. While the
166
+ workstation stays registered, this is a warning and everything keeps working. When the server
167
+ rejects the workstation for the same reason, because the workspace executor versions differ or the
168
+ host the extension uses lacks a plugin bundle the server's executor carries, or carries it in
169
+ another version, it is an error that also names the server's cause; the same error appears when
170
+ both report the same version but their builds differ. The notification appears once per server
171
+ and message; "Erweiterung zeigen" (show extension) opens the extension page for the update, and
172
+ "Server zeigen" (show server) opens the Server page.
154
173
 
155
174
  Every status uses a colored icon and a tooltip with the same vocabulary everywhere. A run is
156
175
  "läuft" (running), "wartet auf Eingabe" (waiting for input, with the number of open inputs),
@@ -287,9 +287,14 @@ After transfer, inspect the journal with <code>pnpm driver journal &lt;runId&gt;
287
287
  <li><strong>The VS Code extension for Windows</strong> brings its own bash. The Marketplace delivers a
288
288
  <code>win32-x64</code> or <code>win32-arm64</code> build that contains a slim bash with the GNU tools (coreutils,
289
289
  <code>grep</code>, <code>sed</code>, <code>awk</code>, <code>find</code>, <code>diff</code>, <code>patch</code>, <code>tar</code>, <code>unzip</code>, <code>cygpath</code> and more), taken from
290
- a fixed Git for Windows release. The <code>bash</code> tool uses only this bash, for the workspace and for
291
- the local host; an installed Git Bash or a <code>bash.exe</code> on <code>PATH</code> is never used. PowerShell and
292
- <code>cmd.exe</code> are not used either.</li>
290
+ a fixed Git for Windows release, plus <code>rg.exe</code> (ripgrep) from a fixed ripgrep release. The
291
+ <code>bash</code> tool uses only this bash, for the workspace and for the local host; an installed Git
292
+ Bash or a <code>bash.exe</code> on <code>PATH</code> is never used. PowerShell and <code>cmd.exe</code> are not used either.</li>
293
+ <li><strong>Code search</strong> runs through <code>rg</code>, which skips <code>node_modules</code>, <code>bin</code>, <code>obj</code> and everything else
294
+ <code>.gitignore</code> excludes. The extension builds for macOS and Linux carry <code>rg</code> as well and put it at
295
+ the front of the <code>bash</code> tool&#39;s <code>PATH</code>, on the workstation and for the local host. The system
296
+ prompt tells the model to search with <code>rg</code> only when the machine running <code>bash</code> has one;
297
+ otherwise it tells the model to exclude dependency and build folders from <code>grep -r</code>.</li>
293
298
  <li><strong>Git</strong> is your own <code>git.exe</code> on <code>PATH</code>, for example from Git for Windows. The bundled bash
294
299
  contains no git, so your login works as usual: Git Credential Manager, <code>~/.gitconfig</code> and
295
300
  <code>~/.ssh</code>. On your own machine the bash inherits your whole environment, except the variables of
@@ -297,7 +302,10 @@ VS Code itself and <code>BASH_ENV</code>/<code>ENV</code>.</li>
297
302
  <li><strong>Without the extension</strong> (<code>ragents start</code> or <code>ragents workspace-client</code> from the npm package)
298
303
  set <code>RAGENTS_BASH</code> to the <code>bash.exe</code> of such a bundle, for example
299
304
  <code>&lt;extension folder&gt;\dist\bash\win32-x64\usr\bin\bash.exe</code>. Without it every <code>bash</code> call fails
300
- and names what is missing.</li>
305
+ and names what is missing. <code>RAGENTS_RG</code> names an <code>rg</code> in the same way, for example
306
+ <code>&lt;extension folder&gt;\dist\rg\win32-x64\rg.exe</code>, on every platform; without it, an <code>rg</code> on
307
+ <code>PATH</code> is used if there is one. A <code>RAGENTS_RG</code> that points to a missing file stops the server
308
+ start or the workstation&#39;s registration.</li>
301
309
  <li><strong>Node.js</strong> is enough with <code>@schlenkr/ragents</code>. A checkout additionally needs <strong>pnpm</strong>, and
302
310
  <code>pnpm install</code>, <code>pnpm build:agent</code>, and <code>scripts/start.sh</code> need a bash of your own, such as
303
311
  Git Bash.</li>
@@ -191,9 +191,14 @@ The local host and workspace also run on Windows. Requirements are:
191
191
  - **The VS Code extension for Windows** brings its own bash. The Marketplace delivers a
192
192
  `win32-x64` or `win32-arm64` build that contains a slim bash with the GNU tools (coreutils,
193
193
  `grep`, `sed`, `awk`, `find`, `diff`, `patch`, `tar`, `unzip`, `cygpath` and more), taken from
194
- a fixed Git for Windows release. The `bash` tool uses only this bash, for the workspace and for
195
- the local host; an installed Git Bash or a `bash.exe` on `PATH` is never used. PowerShell and
196
- `cmd.exe` are not used either.
194
+ a fixed Git for Windows release, plus `rg.exe` (ripgrep) from a fixed ripgrep release. The
195
+ `bash` tool uses only this bash, for the workspace and for the local host; an installed Git
196
+ Bash or a `bash.exe` on `PATH` is never used. PowerShell and `cmd.exe` are not used either.
197
+ - **Code search** runs through `rg`, which skips `node_modules`, `bin`, `obj` and everything else
198
+ `.gitignore` excludes. The extension builds for macOS and Linux carry `rg` as well and put it at
199
+ the front of the `bash` tool's `PATH`, on the workstation and for the local host. The system
200
+ prompt tells the model to search with `rg` only when the machine running `bash` has one;
201
+ otherwise it tells the model to exclude dependency and build folders from `grep -r`.
197
202
  - **Git** is your own `git.exe` on `PATH`, for example from Git for Windows. The bundled bash
198
203
  contains no git, so your login works as usual: Git Credential Manager, `~/.gitconfig` and
199
204
  `~/.ssh`. On your own machine the bash inherits your whole environment, except the variables of
@@ -201,7 +206,10 @@ The local host and workspace also run on Windows. Requirements are:
201
206
  - **Without the extension** (`ragents start` or `ragents workspace-client` from the npm package)
202
207
  set `RAGENTS_BASH` to the `bash.exe` of such a bundle, for example
203
208
  `<extension folder>\dist\bash\win32-x64\usr\bin\bash.exe`. Without it every `bash` call fails
204
- and names what is missing.
209
+ and names what is missing. `RAGENTS_RG` names an `rg` in the same way, for example
210
+ `<extension folder>\dist\rg\win32-x64\rg.exe`, on every platform; without it, an `rg` on
211
+ `PATH` is used if there is one. A `RAGENTS_RG` that points to a missing file stops the server
212
+ start or the workstation's registration.
205
213
  - **Node.js** is enough with `@schlenkr/ragents`. A checkout additionally needs **pnpm**, and
206
214
  `pnpm install`, `pnpm build:agent`, and `scripts/start.sh` need a bash of your own, such as
207
215
  Git Bash.
@@ -156,15 +156,19 @@ that exact environment variable. Startup fails if it is missing. Existing enviro
156
156
  take precedence over profile values; no <code>.env</code> file is loaded. Startup reports a missing
157
157
  referenced variable as an error. Configured models and reasoning levels must be valid in the
158
158
  available model catalog.</p>
159
- <p>A profile can also name its models by alias: <code>MODEL_ALIASES</code> in the <code>host</code> section lists
160
- <code>alias=provider/model</code> or <code>alias=provider/model@thinking</code>, and <code>AGENT_PROVIDER: &quot;alias&quot;</code> makes the
161
- product use them. The interface, the chat, and the journal then show only the alias names.</p>
159
+ <p>A profile can also name its models by alias: <code>MODEL_ALIASES</code> in the <code>host</code> section lists objects
160
+ with <code>alias</code>, <code>model</code> as <code>provider/model</code>, an optional default <code>thinking</code> level, and the model&#39;s
161
+ <code>compaction</code> values: the context size in tokens at which an agent compacts (<code>threshold</code>), how much
162
+ recent context stays verbatim (<code>keepRecentTokens</code>), and the summary budget (<code>summaryTokens</code>).
163
+ <code>AGENT_PROVIDER: &quot;alias&quot;</code> makes the product use them. The interface, the chat, and the journal then
164
+ show only the alias names.</p>
162
165
  <p>Alternatively, a profile can obtain its models from another RAgents server running the
163
- <code>ragents.model-relay</code> plugin, which offers that server&#39;s <code>MODEL_ALIASES</code>: set
164
- <code>AGENT_PROVIDER: &quot;relay&quot;</code>, point <code>RELAY_URL</code> to that server, use <code>RELAY_TOKEN: env(&quot;...&quot;)</code> with a
165
- user&#39;s personal token there, and use relay aliases for every model key. Only the relay server can
166
- see which model is behind an alias. Its log at <code>plugins/ragents.model-relay/relay.log</code> records the
167
- user, alias, target, and token count for each request.</p>
166
+ <code>ragents.model-relay</code> plugin, which offers that server&#39;s <code>MODEL_ALIASES</code> with their compaction
167
+ values: set <code>AGENT_PROVIDER: &quot;relay&quot;</code>, point <code>RELAY_URL</code> to that server, use
168
+ <code>RELAY_TOKEN: env(&quot;...&quot;)</code> with a user&#39;s personal token there, and use relay aliases for every model
169
+ key. Only the relay server can see which model is behind an alias. Its log at
170
+ <code>plugins/ragents.model-relay/relay.log</code> records the user, alias, target, and token count for each
171
+ request.</p>
168
172
  <p>Then start the neutral profile:</p>
169
173
  <pre><code class="language-sh">scripts/start.sh core
170
174
  </code></pre>
@@ -35,16 +35,20 @@ take precedence over profile values; no `.env` file is loaded. Startup reports a
35
35
  referenced variable as an error. Configured models and reasoning levels must be valid in the
36
36
  available model catalog.
37
37
 
38
- A profile can also name its models by alias: `MODEL_ALIASES` in the `host` section lists
39
- `alias=provider/model` or `alias=provider/model@thinking`, and `AGENT_PROVIDER: "alias"` makes the
40
- product use them. The interface, the chat, and the journal then show only the alias names.
38
+ A profile can also name its models by alias: `MODEL_ALIASES` in the `host` section lists objects
39
+ with `alias`, `model` as `provider/model`, an optional default `thinking` level, and the model's
40
+ `compaction` values: the context size in tokens at which an agent compacts (`threshold`), how much
41
+ recent context stays verbatim (`keepRecentTokens`), and the summary budget (`summaryTokens`).
42
+ `AGENT_PROVIDER: "alias"` makes the product use them. The interface, the chat, and the journal then
43
+ show only the alias names.
41
44
 
42
45
  Alternatively, a profile can obtain its models from another RAgents server running the
43
- `ragents.model-relay` plugin, which offers that server's `MODEL_ALIASES`: set
44
- `AGENT_PROVIDER: "relay"`, point `RELAY_URL` to that server, use `RELAY_TOKEN: env("...")` with a
45
- user's personal token there, and use relay aliases for every model key. Only the relay server can
46
- see which model is behind an alias. Its log at `plugins/ragents.model-relay/relay.log` records the
47
- user, alias, target, and token count for each request.
46
+ `ragents.model-relay` plugin, which offers that server's `MODEL_ALIASES` with their compaction
47
+ values: set `AGENT_PROVIDER: "relay"`, point `RELAY_URL` to that server, use
48
+ `RELAY_TOKEN: env("...")` with a user's personal token there, and use relay aliases for every model
49
+ key. Only the relay server can see which model is behind an alias. Its log at
50
+ `plugins/ragents.model-relay/relay.log` records the user, alias, target, and token count for each
51
+ request.
48
52
 
49
53
  Then start the neutral profile:
50
54
 
@@ -312,6 +312,7 @@ the built-in plugins live under <code>plugins/&lt;id&gt;/</code>:</p>
312
312
  contract.ts import-free contract shared by both halves, when present
313
313
  prompt.hbs assets at the plugin root, alongside prompts/, skills/,
314
314
  run-scripts/, provision.ts
315
+ executor.ts contribution to the workspace executor, when present
315
316
  </code></pre>
316
317
  <p><code>server/index.ts</code> exports exactly one entry point:</p>
317
318
  <pre><code class="language-ts">export const plugin: PluginModule = {
@@ -379,7 +380,8 @@ loads plugin sources; it loads finished bundles, and the author builds them. The
379
380
  <code>@schlenkr/ragents</code> carries everything this needs, so an empty folder and the package are enough.</p>
380
381
  <p><strong>Source folder.</strong> One folder per plugin, named after its ID, such as <code>acme.tickets</code>. It holds
381
382
  <code>ragents-plugin.json</code>, <code>server/index.ts</code> exporting <code>plugin</code>, optionally <code>provision.ts</code> for tools the
382
- plugin installs, <code>web/index.tsx</code> exporting <code>webPlugin</code> when there is an interface, and assets such
383
+ plugin installs and <code>executor.ts</code> for work that runs on the machine of a workspace, such as a
384
+ language server, <code>web/index.tsx</code> exporting <code>webPlugin</code> when there is an interface, and assets such
383
385
  as <code>prompt.hbs</code>, <code>prompts/</code>, <code>skills/</code>, and <code>run-scripts/</code> at the root. <code>ragents-plugin.json</code>
384
386
  names the ID, the files other plugins may import (per half, as paths without extension), and
385
387
  additional assets that go into the bundle:</p>
@@ -422,7 +424,9 @@ so does a host with the same number that lacks one of the names, as an older hos
422
424
  changes only when the host API changes incompatibly, not with every host release.</p>
423
425
  <p><strong>Ship.</strong> A bundle is a plain folder without <code>node_modules</code> or native binaries and runs wherever a
424
426
  host offers the same host API with the names it uses. Native tools such as language servers come through the plugin&#39;s
425
- provisioning. To hand a profile together with its bundles to other machines, a server adds
427
+ provisioning. The contribution to the workspace executor becomes one self-contained file that
428
+ imports only Node modules, so every machine can load it, the VS Code extension included; a
429
+ workstation loads it from the bundles of its own host, in exactly the version the server uses. To hand a profile together with its bundles to other machines, a server adds
426
430
  <code>ragents.profile-distribution</code>; <code>ragents connect</code> fetches the profile and its bundles and starts
427
431
  them with the local host (<a href="guide-distributed.html">Distributed work</a>). The client
428
432
  profile names such bundles relative to itself (<code>./</code> or <code>../</code>); the client resolves an absolute or
@@ -174,6 +174,7 @@ plugins/ragents.actor-programs/
174
174
  contract.ts import-free contract shared by both halves, when present
175
175
  prompt.hbs assets at the plugin root, alongside prompts/, skills/,
176
176
  run-scripts/, provision.ts
177
+ executor.ts contribution to the workspace executor, when present
177
178
  ```
178
179
 
179
180
  `server/index.ts` exports exactly one entry point:
@@ -257,7 +258,8 @@ loads plugin sources; it loads finished bundles, and the author builds them. The
257
258
 
258
259
  **Source folder.** One folder per plugin, named after its ID, such as `acme.tickets`. It holds
259
260
  `ragents-plugin.json`, `server/index.ts` exporting `plugin`, optionally `provision.ts` for tools the
260
- plugin installs, `web/index.tsx` exporting `webPlugin` when there is an interface, and assets such
261
+ plugin installs and `executor.ts` for work that runs on the machine of a workspace, such as a
262
+ language server, `web/index.tsx` exporting `webPlugin` when there is an interface, and assets such
261
263
  as `prompt.hbs`, `prompts/`, `skills/`, and `run-scripts/` at the root. `ragents-plugin.json`
262
264
  names the ID, the files other plugins may import (per half, as paths without extension), and
263
265
  additional assets that go into the bundle:
@@ -310,7 +312,9 @@ changes only when the host API changes incompatibly, not with every host release
310
312
 
311
313
  **Ship.** A bundle is a plain folder without `node_modules` or native binaries and runs wherever a
312
314
  host offers the same host API with the names it uses. Native tools such as language servers come through the plugin's
313
- provisioning. To hand a profile together with its bundles to other machines, a server adds
315
+ provisioning. The contribution to the workspace executor becomes one self-contained file that
316
+ imports only Node modules, so every machine can load it, the VS Code extension included; a
317
+ workstation loads it from the bundles of its own host, in exactly the version the server uses. To hand a profile together with its bundles to other machines, a server adds
314
318
  `ragents.profile-distribution`; `ragents connect` fetches the profile and its bundles and starts
315
319
  them with the local host ([Distributed work](guide-distributed.html)). The client
316
320
  profile names such bundles relative to itself (`./` or `../`); the client resolves an absolute or
@@ -200,7 +200,8 @@ copy of the current model context, and a new turn does not mean the model starts
200
200
  conversation memory.</p>
201
201
  <p>When the context grows too large, the agent compacts it: older parts are replaced by a summary
202
202
  written by the model, and recent parts are kept. A compaction is recorded in the journal as well,
203
- and the chat shows a short system note.</p>
203
+ and the chat shows a short system note. When it starts, how much recent context stays verbatim,
204
+ and how long the summary may be are values of the model; a profile sets them for each model alias.</p>
204
205
  <h2 id="interrupting-a-turn-stopping-an-actor-stopping-a-run-and-shutting-down-the-server">Interrupting a turn, stopping an actor, stopping a run, and shutting down the server</h2>
205
206
  <p>All stop paths follow the same principle: block new work first, then cancel, wait for running
206
207
  work, and only then release resources. The exact boundary differs:</p>
@@ -84,7 +84,8 @@ conversation memory.
84
84
 
85
85
  When the context grows too large, the agent compacts it: older parts are replaced by a summary
86
86
  written by the model, and recent parts are kept. A compaction is recorded in the journal as well,
87
- and the chat shows a short system note.
87
+ and the chat shows a short system note. When it starts, how much recent context stays verbatim,
88
+ and how long the summary may be are values of the model; a profile sets them for each model alias.
88
89
 
89
90
  ## Interrupting a turn, stopping an actor, stopping a run, and shutting down the server
90
91