@schlenkr/ragents 0.1.19 → 0.1.20

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 (206) hide show
  1. package/apps/server/src/host-api.json +6 -2
  2. package/apps/server/src/host-api.ts +3 -2
  3. package/apps/server/src/host-web.ts +3 -0
  4. package/apps/server/src/plugin-support/actor-programs/contract.ts +0 -3
  5. package/apps/server/src/plugin-support/removed-layout.ts +94 -0
  6. package/apps/server/src/ragents/engine.ts +2 -1
  7. package/apps/server/src/title-compactor.ts +5 -7
  8. package/apps/web/dist/assets/highlighted-body-KPVGNVTW-k67VKdbw.js +1 -0
  9. package/apps/web/dist/assets/main-CVjIz7BS.js +674 -0
  10. package/apps/web/dist/help/guide-clients.html +22 -42
  11. package/apps/web/dist/help/guide-clients.md +24 -45
  12. package/apps/web/dist/help/guide-functions.html +1 -1
  13. package/apps/web/dist/help/guide-functions.md +1 -1
  14. package/apps/web/dist/help/guide-getting-started.html +14 -22
  15. package/apps/web/dist/help/guide-getting-started.md +17 -24
  16. package/apps/web/dist/help/guide-ideas.html +1 -1
  17. package/apps/web/dist/help/guide-ideas.md +1 -1
  18. package/apps/web/dist/help/guide-plugins.html +1 -1
  19. package/apps/web/dist/help/guide-plugins.md +1 -1
  20. package/apps/web/dist/help/guide-programs.html +1 -1
  21. package/apps/web/dist/help/guide-programs.md +1 -1
  22. package/apps/web/dist/help/index.html +12 -79
  23. package/apps/web/dist/help/mini-app.css +8 -502
  24. package/apps/web/dist/host-web.json +28 -23
  25. package/apps/web/dist/index.html +2 -3
  26. package/apps/web/dist/run-panel.html +3 -4
  27. package/apps/web/src/Overview.tsx +4 -143
  28. package/apps/web/src/PluginChat.tsx +22 -116
  29. package/apps/web/src/PluginRegistry.tsx +4 -9
  30. package/apps/web/src/RunPreparationChat.tsx +4 -1
  31. package/apps/web/src/host-modules.ts +2 -0
  32. package/apps/web/src/main.tsx +23 -3
  33. package/apps/web/src/panel/RunLine.tsx +5 -2
  34. package/apps/web/src/panel/RunsPage.tsx +6 -6
  35. package/apps/web/src/panel/StartPage.tsx +6 -5
  36. package/apps/web/src/panel/contract.ts +3 -0
  37. package/apps/web/src/panel/page-props.ts +2 -0
  38. package/apps/web/src/run-apps.ts +34 -0
  39. package/apps/web/src/run-overview.ts +0 -27
  40. package/apps/web/src/run-panel/PanelContributions.tsx +41 -0
  41. package/apps/web/src/run-panel/RunPanelApp.tsx +172 -91
  42. package/apps/web/src/run-panel/RunPanelMenu.tsx +4 -3
  43. package/apps/web/src/run-panel/RunPanelWorkspace.tsx +8 -2
  44. package/apps/web/src/run-panel/clipboard.ts +17 -14
  45. package/apps/web/src/run-panel/host-contract.ts +8 -9
  46. package/apps/web/src/run-panel/host.ts +5 -31
  47. package/apps/web/src/run-panel/input-bridge.ts +15 -7
  48. package/bundles/ragents.activity/ragents-bundle.json +2 -2
  49. package/bundles/ragents.actor-programs/prompt.hbs +4 -5
  50. package/bundles/ragents.actor-programs/ragents-bundle.json +4 -14
  51. package/bundles/ragents.actor-programs/server/index.js +2 -14
  52. package/bundles/ragents.actor-programs/server/index.js.map +2 -2
  53. package/bundles/ragents.actor-programs/web/classes.json +1 -1
  54. package/bundles/ragents.actor-programs/web/index.js +1 -3
  55. package/bundles/ragents.actor-programs/web/index.js.map +4 -4
  56. package/bundles/ragents.ask/ragents-bundle.json +2 -2
  57. package/bundles/ragents.browser/ragents-bundle.json +2 -2
  58. package/bundles/ragents.documents/ragents-bundle.json +2 -2
  59. package/bundles/ragents.lsp-fsharp/ragents-bundle.json +2 -2
  60. package/bundles/ragents.lsp-roslyn/ragents-bundle.json +2 -2
  61. package/bundles/ragents.lsp-typescript/ragents-bundle.json +2 -2
  62. package/bundles/ragents.model-relay/ragents-bundle.json +2 -2
  63. package/bundles/ragents.orchestration/ragents-bundle.json +15 -41
  64. package/bundles/ragents.orchestration/server/index.js +10 -249
  65. package/bundles/ragents.orchestration/server/index.js.map +4 -4
  66. package/bundles/ragents.orchestration/web/chunks/chunk-KU7O6MEX.js +2 -0
  67. package/bundles/ragents.orchestration/web/chunks/chunk-KU7O6MEX.js.map +7 -0
  68. package/bundles/ragents.orchestration/web/classes.json +1 -1
  69. package/bundles/ragents.orchestration/web/exports/web/program-slot.js +1 -1
  70. package/bundles/ragents.orchestration/web/index.js +10 -18
  71. package/bundles/ragents.orchestration/web/index.js.map +4 -4
  72. package/bundles/ragents.overseer/ragents-bundle.json +3 -3
  73. package/bundles/ragents.overseer/server/index.js +0 -1
  74. package/bundles/ragents.overseer/server/index.js.map +2 -2
  75. package/bundles/ragents.processes/ragents-bundle.json +2 -2
  76. package/bundles/ragents.product/ragents-bundle.json +2 -2
  77. package/bundles/ragents.profile-distribution/ragents-bundle.json +2 -2
  78. package/bundles/ragents.reference/ragents-bundle.json +3 -3
  79. package/bundles/ragents.reference/run-scripts/balcony-wizard/RUN.md +1 -1
  80. package/bundles/ragents.reference/run-scripts/balcony-wizard/src/server.ts +1 -2
  81. package/bundles/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +6 -7
  82. package/bundles/ragents.reference/run-scripts/conversation-circle/RUN.md +3 -3
  83. package/bundles/ragents.reference/run-scripts/conversation-circle/src/server.ts +3 -13
  84. package/bundles/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
  85. package/bundles/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +1 -6
  86. package/bundles/ragents.reference/run-scripts/learning-afternoon/src/server.ts +1 -15
  87. package/bundles/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +1 -1
  88. package/bundles/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +1 -1
  89. package/bundles/ragents.reference/run-scripts/quick-note/RUN.md +1 -1
  90. package/bundles/ragents.reference/run-scripts/quick-note/src/server.ts +1 -2
  91. package/bundles/ragents.reference/run-scripts/quick-note/tests/program.test.ts +0 -2
  92. package/bundles/ragents.reference/run-scripts/run-roster/RUN.md +2 -2
  93. package/bundles/ragents.reference/run-scripts/run-roster/src/server.ts +1 -2
  94. package/bundles/ragents.reference/run-scripts/run-roster/tests/program.test.ts +0 -2
  95. package/bundles/ragents.reference/run-scripts/shared-actor-list/src/server.ts +1 -1
  96. package/bundles/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
  97. package/bundles/ragents.reference/run-scripts/word-game/src/contract.ts +1 -1
  98. package/bundles/ragents.reference/run-scripts/word-game/src/server.ts +0 -1
  99. package/bundles/ragents.reference/run-scripts/word-game/tests/program.test.ts +1 -2
  100. package/bundles/ragents.reference/skills/80-actor-text-analysis/SKILL.md +1 -1
  101. package/bundles/ragents.reference/skills/90-actor-notes/SKILL.md +1 -1
  102. package/bundles/ragents.todo/ragents-bundle.json +2 -2
  103. package/bundles/ragents.transcript/ragents-bundle.json +2 -2
  104. package/bundles/ragents.watch/ragents-bundle.json +2 -2
  105. package/bundles/ragents.workspace/ragents-bundle.json +2 -2
  106. package/package.json +8 -8
  107. package/packages/agent/dist/core/agent-settings.d.ts +1 -1
  108. package/packages/ai/dist/types.d.ts +2 -1
  109. package/packages/ragents/src/runtime/journal.ts +4 -0
  110. package/plugins/ragents.actor-programs/prompt.hbs +4 -5
  111. package/plugins/ragents.actor-programs/server/access-projections.ts +1 -1
  112. package/plugins/ragents.actor-programs/server/index.ts +0 -2
  113. package/plugins/ragents.actor-programs/server/runtime.ts +2 -10
  114. package/plugins/ragents.actor-programs/web/ActorViewFrame.tsx +5 -20
  115. package/plugins/ragents.actor-programs/web/AppsPanel.tsx +3 -79
  116. package/plugins/ragents.actor-programs/web/EmbeddedApps.tsx +0 -9
  117. package/plugins/ragents.actor-programs/web/api.ts +0 -20
  118. package/plugins/ragents.actor-programs/web/context.ts +0 -3
  119. package/plugins/ragents.actor-programs/web/index.tsx +0 -9
  120. package/plugins/ragents.orchestration/ragents-plugin.json +1 -2
  121. package/plugins/ragents.orchestration/server/index.ts +1 -11
  122. package/plugins/ragents.orchestration/web/ActorChat.tsx +1 -1
  123. package/plugins/ragents.orchestration/web/ActorChatControls.tsx +1 -1
  124. package/plugins/ragents.orchestration/web/FlowInspector.tsx +2 -4
  125. package/plugins/ragents.orchestration/web/InspectionPanel.tsx +21 -0
  126. package/plugins/ragents.orchestration/web/index.tsx +13 -9
  127. package/plugins/ragents.orchestration/web/program-slot.ts +0 -3
  128. package/plugins/ragents.orchestration/web/run-panel/AddresseeControl.tsx +15 -36
  129. package/plugins/ragents.orchestration/web/run-panel/RunPanel.tsx +76 -451
  130. package/plugins/ragents.orchestration/web/run-panel/run-panel-actors.ts +0 -27
  131. package/plugins/ragents.orchestration/web/run-panel/run-panel-state.ts +7 -40
  132. package/plugins/ragents.overseer/server/coordinator-prompt.ts +0 -1
  133. package/plugins/ragents.reference/examples.ts +1 -2
  134. package/plugins/ragents.reference/run-scripts/balcony-wizard/RUN.md +1 -1
  135. package/plugins/ragents.reference/run-scripts/balcony-wizard/src/server.ts +1 -2
  136. package/plugins/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +6 -7
  137. package/plugins/ragents.reference/run-scripts/conversation-circle/RUN.md +3 -3
  138. package/plugins/ragents.reference/run-scripts/conversation-circle/src/server.ts +3 -13
  139. package/plugins/ragents.reference/run-scripts/conversation-circle/tests/helpers.ts +1 -1
  140. package/plugins/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +1 -6
  141. package/plugins/ragents.reference/run-scripts/learning-afternoon/src/server.ts +1 -15
  142. package/plugins/ragents.reference/run-scripts/learning-afternoon/tests/program.test.ts +1 -1
  143. package/plugins/ragents.reference/run-scripts/moderated-round/tests/helpers.ts +1 -1
  144. package/plugins/ragents.reference/run-scripts/quick-note/RUN.md +1 -1
  145. package/plugins/ragents.reference/run-scripts/quick-note/src/server.ts +1 -2
  146. package/plugins/ragents.reference/run-scripts/quick-note/tests/program.test.ts +0 -2
  147. package/plugins/ragents.reference/run-scripts/run-roster/RUN.md +2 -2
  148. package/plugins/ragents.reference/run-scripts/run-roster/src/server.ts +1 -2
  149. package/plugins/ragents.reference/run-scripts/run-roster/tests/program.test.ts +0 -2
  150. package/plugins/ragents.reference/run-scripts/shared-actor-list/src/server.ts +1 -1
  151. package/plugins/ragents.reference/run-scripts/shared-actor-list/tests/helpers.ts +1 -1
  152. package/plugins/ragents.reference/run-scripts/word-game/src/contract.ts +1 -1
  153. package/plugins/ragents.reference/run-scripts/word-game/src/server.ts +0 -1
  154. package/plugins/ragents.reference/run-scripts/word-game/tests/program.test.ts +1 -2
  155. package/plugins/ragents.reference/skills/80-actor-text-analysis/SKILL.md +1 -1
  156. package/plugins/ragents.reference/skills/90-actor-notes/SKILL.md +1 -1
  157. package/plugins/ragents.reference/walkthroughs.ts +13 -14
  158. package/apps/web/dist/assets/highlighted-body-KPVGNVTW-BwD4uYEe.js +0 -1
  159. package/apps/web/dist/assets/main-KBrc5Q77.js +0 -11
  160. package/apps/web/dist/assets/mermaid-HWGCJPDP-CSCkaArr.js +0 -608
  161. package/apps/web/dist/assets/runPanel-BjG5NBKm.js +0 -26
  162. package/apps/web/src/App.tsx +0 -318
  163. package/apps/web/src/SessionList.tsx +0 -157
  164. package/apps/web/src/SurfaceShortcuts.tsx +0 -60
  165. package/apps/web/src/WorkspacePanel.tsx +0 -309
  166. package/apps/web/src/run-panel.tsx +0 -52
  167. package/bundles/ragents.orchestration/server/chunks/chunk-QS3WJ3D7.js +0 -11
  168. package/bundles/ragents.orchestration/server/chunks/chunk-QS3WJ3D7.js.map +0 -7
  169. package/bundles/ragents.orchestration/server/exports/server/contract.js +0 -9
  170. package/bundles/ragents.orchestration/server/exports/server/contract.js.map +0 -7
  171. package/bundles/ragents.orchestration/surface.hbs +0 -39
  172. package/bundles/ragents.orchestration/web/chunks/chunk-CFMJD5ZI.js +0 -2
  173. package/bundles/ragents.orchestration/web/chunks/chunk-CFMJD5ZI.js.map +0 -7
  174. package/bundles/ragents.orchestration/web/chunks/chunk-HOBLI364.js +0 -2
  175. package/bundles/ragents.orchestration/web/chunks/chunk-HOBLI364.js.map +0 -7
  176. package/bundles/ragents.orchestration/web/chunks/chunk-UCIMT2R4.js +0 -2
  177. package/bundles/ragents.orchestration/web/chunks/chunk-UCIMT2R4.js.map +0 -7
  178. package/bundles/ragents.orchestration/web/chunks/chunk-XGPPQCZR.js +0 -2
  179. package/bundles/ragents.orchestration/web/chunks/chunk-XGPPQCZR.js.map +0 -7
  180. package/bundles/ragents.orchestration/web/exports/web/surface-entities.js +0 -2
  181. package/bundles/ragents.orchestration/web/exports/web/surface-entities.js.map +0 -7
  182. package/bundles/ragents.orchestration/web/exports/web/tile-docking.js +0 -2
  183. package/bundles/ragents.orchestration/web/exports/web/tile-docking.js.map +0 -7
  184. package/plugins/ragents.actor-programs/web/ExpandIcon.tsx +0 -5
  185. package/plugins/ragents.actor-programs/web/FullscreenHost.tsx +0 -31
  186. package/plugins/ragents.orchestration/contract.ts +0 -51
  187. package/plugins/ragents.orchestration/server/contract.ts +0 -14
  188. package/plugins/ragents.orchestration/server/surface-tool.ts +0 -198
  189. package/plugins/ragents.orchestration/surface.hbs +0 -39
  190. package/plugins/ragents.orchestration/tiled-layout.ts +0 -55
  191. package/plugins/ragents.orchestration/web/ActorChatPreview.tsx +0 -29
  192. package/plugins/ragents.orchestration/web/ActorShortcut.tsx +0 -74
  193. package/plugins/ragents.orchestration/web/ActorSurfaceControls.tsx +0 -130
  194. package/plugins/ragents.orchestration/web/ActorTile.tsx +0 -23
  195. package/plugins/ragents.orchestration/web/Center.tsx +0 -133
  196. package/plugins/ragents.orchestration/web/SurfaceTiles.tsx +0 -47
  197. package/plugins/ragents.orchestration/web/TiledSurface.tsx +0 -280
  198. package/plugins/ragents.orchestration/web/actor-header-settings.ts +0 -41
  199. package/plugins/ragents.orchestration/web/run-panel/RunPanelSettings.tsx +0 -50
  200. package/plugins/ragents.orchestration/web/run-panel/run-panel-settings.ts +0 -47
  201. package/plugins/ragents.orchestration/web/run-panel/sheet-status.ts +0 -30
  202. package/plugins/ragents.orchestration/web/surface-entities.ts +0 -21
  203. package/plugins/ragents.orchestration/web/surface-view-settings.ts +0 -42
  204. package/plugins/ragents.orchestration/web/tile-docking.ts +0 -105
  205. package/plugins/ragents.orchestration/web/tiled-view-settings.ts +0 -74
  206. /package/apps/web/dist/assets/{mermaid-HWGCJPDP-BPn4aV2r.css → main-BPn4aV2r.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.ask",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/engine": [
@@ -72,7 +72,7 @@
72
72
  }
73
73
  },
74
74
  "revision": "0c115b8cade07b18dee1b1d11200bbc0427d98d13d0315d9bd47c8619ded8fbc",
75
- "sourceRevision": "ce0c0ff38394586fe032f02838bd9fcf644642c31f4a08f1575ca2aaade7bfbf",
75
+ "sourceRevision": "e8db16f3730374e5ffab8f6f1fc993fac265b64d25e02059d2fea92313f31ec3",
76
76
  "server": "server/index.js",
77
77
  "web": {
78
78
  "entry": "web/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.browser",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/engine": [
@@ -32,7 +32,7 @@
32
32
  "web": {}
33
33
  },
34
34
  "revision": "333c6a9b57576a4ab95556e201da67ed864acdf02787ce5edbd653e7beba6020",
35
- "sourceRevision": "43dc6b7d6064ff67e5bbd6ab2a32ee77bca8e562a2c1566fb223ec2f7d5c6792",
35
+ "sourceRevision": "6375a20cebee9976bfb66ad95a4b820b1c4e429626a27124a808d538344ca917",
36
36
  "server": "server/index.js",
37
37
  "executor": "executor/index.mjs",
38
38
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.documents",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/engine": [
@@ -101,7 +101,7 @@
101
101
  }
102
102
  },
103
103
  "revision": "3fdba8c39f30027176229901cf731b778170f0e1597c287ad94f7e48a430b5e8",
104
- "sourceRevision": "4ec5929328998f6fff1cb2d4dd5a97d8d2352b1b858e4a88706728eafe2fead1",
104
+ "sourceRevision": "21ea5f20d4ae7a728c54d0cb4e67616c9a72157ec6b418e387fe8b9aab939f30",
105
105
  "server": "server/index.js",
106
106
  "web": {
107
107
  "entry": "web/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.lsp-fsharp",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/host/plugin-support/language-server/plugin": [
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "revision": "a39dafc264c6703d9481f358b21e5bf3997dc5d2dc7fe0d969d4905d49c7a1f8",
32
- "sourceRevision": "0c1724bed58160a4bfb446c45ef22ea4fa063a43b358d7c78ef64b220b36f653",
32
+ "sourceRevision": "2048ebc2d4cd76481528a756665e2d9cc3ffb59753108f7cface40684aee26de",
33
33
  "server": "server/index.js",
34
34
  "web": {
35
35
  "entry": "web/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.lsp-roslyn",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/host/plugin-support/language-server/plugin": [
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "revision": "cbe81aa88a4ea56476537fabbbb0995d09ccbfa269dd6a003df50a57c8286b02",
44
- "sourceRevision": "f351e54c82571eb6cde2b5e75379e9d6f13e8f57b38bd36d661e68b53d2e355d",
44
+ "sourceRevision": "0413f3e49623ba7a9ecc2215472a0a6ca705c3c84c349a1d41482dfc45338975",
45
45
  "server": "server/index.js",
46
46
  "web": {
47
47
  "entry": "web/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.lsp-typescript",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/host/plugin-support/language-server/plugin": [
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "revision": "8387de707a4fe8fdb8c67315346522b331728f8adf51a7fadda8db662681f0c4",
21
- "sourceRevision": "b188ca64f6ebf562df726715a505837a537cf9a432d549dc3dbec205ed8ff5ab",
21
+ "sourceRevision": "ccc1c6160d1a5428c4d12ed9e57a10076fa4ba1acb85a6dd7d89492c783d89b1",
22
22
  "server": "server/index.js",
23
23
  "web": {
24
24
  "entry": "web/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.model-relay",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/host/plugin-support/http": [
@@ -26,7 +26,7 @@
26
26
  "web": {}
27
27
  },
28
28
  "revision": "9090692eca49235944f149b25dccdc986a3c638007d8da2fb35f74d942454379",
29
- "sourceRevision": "f57ee897c518cd93bc1a089c0e37ed0154b04da83549ecedcc3c340ab1e36c62",
29
+ "sourceRevision": "1cc27a1a0ad6f99a58a57ac2e09ae54a973da3fe04e48e66f7ef38faadd061b4",
30
30
  "server": "server/index.js",
31
31
  "exports": {
32
32
  "server": {},
@@ -1,27 +1,17 @@
1
1
  {
2
2
  "format": 5,
3
3
  "id": "ragents.orchestration",
4
- "api": 7,
4
+ "api": 10,
5
5
  "hostNames": {
6
6
  "server": {
7
7
  "@ragents/engine": [
8
- "DomainError",
9
8
  "ScriptDriver",
10
- "actorByHandle",
11
9
  "actorInputSchema",
12
10
  "defineRunFunction",
13
11
  "defineToolAvailability",
14
12
  "enqueueActorInput",
15
13
  "eventResultSchemaOf",
16
- "holdsUsable",
17
- "serviceToken"
18
- ],
19
- "@ragents/engine/src/http/contracts": [
20
- "handleKey"
21
- ],
22
- "@ragents/host/plugin-support/actor-programs/contract": [
23
- "ACTOR_PROGRAMS_STATE_ID",
24
- "resolveActorView"
14
+ "holdsUsable"
25
15
  ],
26
16
  "@ragents/host/plugin-support/agent-tool": [
27
17
  "toolDescriptorFrom"
@@ -30,7 +20,6 @@
30
20
  "pluginAsset"
31
21
  ],
32
22
  "@ragents/host/plugin-support/prompt": [
33
- "boundToTools",
34
23
  "handlebarsPrompt"
35
24
  ],
36
25
  "@ragents/host/ragents/global-chat": [
@@ -45,7 +34,6 @@
45
34
  },
46
35
  "web": {
47
36
  "@ragents/engine/src/http/contracts": [
48
- "handleKey",
49
37
  "runContracts"
50
38
  ],
51
39
  "@ragents/web/AccessContext": [
@@ -64,8 +52,7 @@
64
52
  "useChatViewSettings"
65
53
  ],
66
54
  "@ragents/web/chat/chat-target": [
67
- "programChatNotice",
68
- "runIsWorking"
55
+ "programChatNotice"
69
56
  ],
70
57
  "@ragents/web/chat/StoppedActorNotice": [
71
58
  "StoppedActorNotice"
@@ -91,8 +78,12 @@
91
78
  "@ragents/web/rpc": [
92
79
  "rpc"
93
80
  ],
81
+ "@ragents/web/run-apps": [
82
+ "RunAppView",
83
+ "runApps",
84
+ "selectedRunApp"
85
+ ],
94
86
  "@ragents/web/run-panel/host": [
95
- "useCenterElements",
96
87
  "useRunPanelHost"
97
88
  ],
98
89
  "@ragents/web/run-view": [
@@ -106,14 +97,8 @@
106
97
  "@ragents/web/SourceCode": [
107
98
  "SourceCode"
108
99
  ],
109
- "@ragents/web/StatusGroup": [
110
- "StatusGroup"
111
- ],
112
100
  "@ragents/web/Toolbar": [
113
- "ToolbarCopy",
114
- "ToolbarItem",
115
- "ToolbarLabel",
116
- "ToolbarText"
101
+ "ToolbarItem"
117
102
  ],
118
103
  "@ragents/web/ui": [
119
104
  "Alert",
@@ -151,19 +136,13 @@
151
136
  "createContext",
152
137
  "createElement",
153
138
  "forwardRef",
154
- "memo",
155
139
  "useCallback",
156
140
  "useContext",
157
141
  "useEffect",
158
142
  "useId",
159
- "useLayoutEffect",
160
143
  "useMemo",
161
144
  "useRef",
162
- "useState",
163
- "useSyncExternalStore"
164
- ],
165
- "react-dom": [
166
- "createPortal"
145
+ "useState"
167
146
  ],
168
147
  "react/jsx-runtime": [
169
148
  "Fragment",
@@ -172,26 +151,21 @@
172
151
  ]
173
152
  }
174
153
  },
175
- "revision": "cbd72b88af0c8ac76486b4c0617545fc53b23315cf93dd924631ceb8e389b34b",
176
- "sourceRevision": "2a6a34d768f487b027fbffac38beed2afb04c8bbec3311d8f05ce7cd5d90ef4c",
154
+ "revision": "5a007d947d0dc02583723b884f6a206c2569250320a59ab4143f147043eeffe7",
155
+ "sourceRevision": "82f3ae7820066815b96963979c19d6f403081a9702e80ce192790768d534e5c2",
177
156
  "server": "server/index.js",
178
157
  "web": {
179
158
  "entry": "web/index.js",
180
159
  "classes": "web/classes.json"
181
160
  },
182
161
  "exports": {
183
- "server": {
184
- "server/contract": "server/exports/server/contract.js"
185
- },
162
+ "server": {},
186
163
  "web": {
187
- "web/surface-entities": "web/exports/web/surface-entities.js",
188
- "web/program-slot": "web/exports/web/program-slot.js",
189
- "web/tile-docking": "web/exports/web/tile-docking.js"
164
+ "web/program-slot": "web/exports/web/program-slot.js"
190
165
  }
191
166
  },
192
167
  "uses": [],
193
168
  "assets": [
194
- "orchestration.hbs",
195
- "surface.hbs"
169
+ "orchestration.hbs"
196
170
  ]
197
171
  }
@@ -1,8 +1,5 @@
1
1
  import { createRequire as __ragentsCreateRequire } from "node:module";
2
2
  const require = __ragentsCreateRequire(import.meta.url);
3
- import {
4
- surfacePlacementToken
5
- } from "./chunks/chunk-QS3WJ3D7.js";
6
3
 
7
4
  // server/index.ts
8
5
  import {
@@ -13,253 +10,24 @@ import {
13
10
  } from "@ragents/engine";
14
11
  import { runtimeProviderToken } from "@ragents/host/ragents/host-services.js";
15
12
  import { pluginAsset } from "@ragents/host/plugin-support/plugin-folder.js";
16
- import { boundToTools, handlebarsPrompt } from "@ragents/host/plugin-support/prompt.js";
13
+ import { handlebarsPrompt } from "@ragents/host/plugin-support/prompt.js";
17
14
 
18
- // server/surface-tool.ts
15
+ // server/run-stop-tool.ts
19
16
  import { Type } from "typebox";
20
- import {
21
- DomainError,
22
- actorByHandle,
23
- defineRunFunction,
24
- defineToolAvailability,
25
- holdsUsable
26
- } from "@ragents/engine";
17
+ import { defineRunFunction, defineToolAvailability, holdsUsable } from "@ragents/engine";
27
18
  import { toolDescriptorFrom } from "@ragents/host/plugin-support/agent-tool.js";
28
- import { ACTOR_PROGRAMS_STATE_ID, resolveActorView } from "@ragents/host/plugin-support/actor-programs/contract.js";
29
-
30
- // contract.ts
31
- import { handleKey } from "@ragents/engine/src/http/contracts";
32
-
33
- // tiled-layout.ts
34
- var MAX_SURFACE_TILE_DEPTH = 16;
35
- var MAX_SURFACE_TILES = 64;
36
- var surfaceTileNodeOf = (input) => {
37
- const entities = /* @__PURE__ */ new Set();
38
- const parse = (value, where, depth) => {
39
- if (depth > MAX_SURFACE_TILE_DEPTH) throw new Error(`${where}: at most ${MAX_SURFACE_TILE_DEPTH} nested splits are allowed`);
40
- if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error(`${where} must be a tile or a split`);
41
- const node = value;
42
- if (Object.hasOwn(node, "entity")) {
43
- if (Object.keys(node).some((key2) => key2 !== "entity" && key2 !== "chatInput")) throw new Error(`${where}: a tile carries only entity and chatInput; a split direction, weights and children`);
44
- if (typeof node.entity !== "string") throw new Error(`${where}.entity must be @handle or app:<name>/<view>`);
45
- const entity = surfaceEntityOf(node.entity);
46
- const key = surfaceEntityKey(entity);
47
- if (node.chatInput !== void 0 && (entity.kind !== "actor" || typeof node.chatInput !== "boolean")) {
48
- throw new Error(`${where}.chatInput is only allowed for actors, as a boolean`);
49
- }
50
- if (entities.has(key)) throw new Error(`${where}: ${key} is placed as a tile more than once`);
51
- entities.add(key);
52
- if (entities.size > MAX_SURFACE_TILES) throw new Error(`At most ${MAX_SURFACE_TILES} tiles are allowed`);
53
- return node.chatInput === void 0 ? { entity: key } : { entity: key, chatInput: node.chatInput };
54
- }
55
- if (Object.keys(node).some((key) => !["direction", "weights", "children"].includes(key))) throw new Error(`${where}: a split carries only direction, weights and children`);
56
- if (node.direction !== "horizontal" && node.direction !== "vertical") throw new Error(`${where}.direction must be horizontal or vertical`);
57
- if (!Array.isArray(node.weights) || node.weights.length !== 2 || node.weights.some((weight) => typeof weight !== "number" || !Number.isFinite(weight) || weight <= 0)) {
58
- throw new Error(`${where}.weights must contain exactly two finite positive numbers`);
59
- }
60
- if (!Array.isArray(node.children) || node.children.length !== 2) throw new Error(`${where}.children must contain exactly two tiles or splits`);
61
- return {
62
- direction: node.direction,
63
- weights: [node.weights[0], node.weights[1]],
64
- children: [parse(node.children[0], `${where}.children[0]`, depth + 1), parse(node.children[1], `${where}.children[1]`, depth + 1)]
65
- };
66
- };
67
- return parse(input, "root", 0);
68
- };
69
- var surfaceTileEntities = (root) => !root ? [] : "entity" in root ? [root.entity] : root.children.flatMap(surfaceTileEntities);
70
- var mapSurfaceTileEntities = (root, resolve) => "entity" in root ? { ...root, entity: resolve(root.entity) } : {
71
- ...root,
72
- children: [mapSurfaceTileEntities(root.children[0], resolve), mapSurfaceTileEntities(root.children[1], resolve)]
73
- };
74
-
75
- // contract.ts
76
- var ORCHESTRATION_PLUGIN_ID = "ragents.orchestration";
77
- var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
78
- var surfaceEntityOf = (text) => {
79
- const trimmed = text.trim();
80
- if (trimmed.startsWith("@")) {
81
- const handle = handleKey(trimmed);
82
- if (!handle || /\s/.test(handle)) throw new Error(`Entity ${JSON.stringify(text)}: a handle is missing after the @`);
83
- return { kind: "actor", handle };
84
- }
85
- const match = /^app:(.+)$/s.exec(trimmed);
86
- if (!match) {
87
- throw new Error(`Entity ${JSON.stringify(text)}: expected @handle or app:<id>`);
88
- }
89
- const id = match[1].trim();
90
- if (!id) throw new Error(`Entity ${JSON.stringify(text)}: the ID after the colon is empty`);
91
- return { kind: "app", id };
92
- };
93
- var surfaceEntityKey = (entity) => entity.kind === "actor" ? `@${entity.handle}` : `app:${entity.id}`;
94
- var LEGACY_KEYS = ["nodes", "shapes", "lines", "mode"];
95
- var surfaceLayoutOf = (value) => {
96
- if (!isRecord(value)) throw new Error("The arrangement must be an object with root");
97
- const legacy = LEGACY_KEYS.filter((key) => key in value);
98
- if (legacy.length > 0) {
99
- throw new Error(`The program arrangement comes from the removed free surface (${legacy.join(", ")}); canvas_layout_replace with root sets it anew as a tile layout`);
100
- }
101
- if (!("root" in value)) throw new Error("root is missing; expected a tile, a split or null");
102
- return { root: value.root === null ? null : surfaceTileNodeOf(value.root) };
103
- };
104
-
105
- // server/surface-tool.ts
106
- var surfaceToolMetadata = {
107
- name: "canvas_layout_replace",
108
- label: "Replace Surface Layout",
109
- description: "Arrange actors and mini-apps as tiles on the viewport-filling work surface, using a binary tree of weighted splits.",
110
- longDescription: "root is the whole arrangement and replaces the stored one. A tile is {entity:'@helper'} or {entity:'app:@workspace/main'}; a split is {direction:'horizontal',weights:[1,1],children:[tile,tile]}. horizontal means left/right, vertical means top/bottom, and weights give the ratio of the two children. App left, chat right at 50:50: {root:{direction:'horizontal',weights:[1,1],children:[{entity:'app:@workspace/main'},{entity:'@helper'}]}}. One tile above two tiles at 2:1: {root:{direction:'vertical',weights:[2,1],children:[{entity:'@lead'},{direction:'horizontal',weights:[1,1],children:[{entity:'@first'},{entity:'@second'}]}]}}. root:null clears the surface. Dividers are draggable, so do not resend a layout to fight a personal arrangement. Participants you do not place stay reachable through the run header."
111
- };
112
- var placeToolMetadata = {
113
- name: "canvas_layout_place",
114
- label: "Place on Surface",
115
- description: "Place one actor or mini-app next to the current surface layout instead of replacing it.",
116
- longDescription: "entity is {entity} of a tile: '@helper' or 'app:@workspace/main'. The current arrangement becomes one side of a new split and the entity the other: direction 'horizontal' (default) puts it to the right, 'vertical' below. weight is its share against the existing arrangement's weight 1, default 1. An entity the layout already shows stays where it is; placed is then false. On an empty surface the entity becomes the only tile. Use it when you join a running run, such as a run script started with start.embedded, so that the tiles others arranged stay."
117
- };
118
- var canDesignSurface = defineToolAvailability({
119
- availability: "conditional",
120
- availabilityDetail: "Only for agents and TypeScript actors with the capability plugin.state.write.",
121
- requiredCapabilities: ["plugin.state.write"]
122
- }, (actor) => actor.kind !== "human" && holdsUsable(actor, "plugin.state.write"));
123
- var tileSchema = Type.Cyclic({
124
- SurfaceTile: Type.Union([
125
- Type.Object({
126
- entity: Type.String({ minLength: 1, description: "Actor @handle or activated mini-app app:@handle/view-key or app:program-name/view-key; the server resolves the view ID" }),
127
- chatInput: Type.Optional(Type.Boolean({ description: "Actor tiles only: false hides the chat composer in the tile; default true. Does not change permissions or the inspector" }))
128
- }, { additionalProperties: false }),
129
- Type.Object({
130
- direction: Type.Union([Type.Literal("horizontal"), Type.Literal("vertical")]),
131
- weights: Type.Tuple([Type.Number({ exclusiveMinimum: 0 }), Type.Number({ exclusiveMinimum: 0 })]),
132
- children: Type.Tuple([Type.Ref("SurfaceTile"), Type.Ref("SurfaceTile")])
133
- }, { additionalProperties: false })
134
- ])
135
- }, "SurfaceTile");
136
- var surfaceLayoutSchema = Type.Object({
137
- root: Type.Union([tileSchema, Type.Null()], { description: "The whole arrangement: a tile or a binary split. Maximum 64 unique tiles and 16 nested splits. null clears the surface" })
138
- });
139
- var invalid = (message) => new DomainError("invalid-surface-layout", message, 400);
140
- var parsedLayout = (input) => {
141
- try {
142
- return surfaceLayoutOf(input);
143
- } catch (caught) {
144
- throw invalid(caught instanceof Error ? caught.message : String(caught));
145
- }
146
- };
147
- var isStopped = (actor) => actor.kind !== "human" && actor.lifecycle.kind === "stopped";
148
- var surfaceActorOf = (view, reference, where) => {
149
- const entity = surfaceEntityOf(reference);
150
- if (entity.kind !== "actor") throw invalid(`${where}: ${reference} is not an actor`);
151
- const handle = entity.handle;
152
- const found = actorByHandle(view.actors, handle);
153
- if (!found) {
154
- const known = view.actors.filter((actor) => actor.kind !== "human").map((actor) => `@${actor.handle}`);
155
- throw invalid(`${where}: @${handle} is not an actor of this run. Present: ${known.join(", ") || "none"}`);
156
- }
157
- if (found.kind === "human") {
158
- throw invalid(`${where}: @${handle} is the human in the chat; the chat is fixed to the left of the surface`);
159
- }
160
- return found;
161
- };
162
- var isActorReference = (reference) => surfaceEntityOf(reference).kind === "actor";
163
- var resolveAppReferences = (view, layout) => {
164
- const programs = view.pluginStates.flatMap((entry) => {
165
- if (entry.pluginId !== ACTOR_PROGRAMS_STATE_ID || entry.scope.kind !== "actor") return [];
166
- const actorId = entry.scope.actorId;
167
- const actor = view.actors.find((candidate) => candidate.id === actorId);
168
- if (!actor || actor.kind === "human" || isStopped(actor)) return [];
169
- const { program } = entry.state;
170
- return program ? [program] : [];
171
- });
172
- const resolve = (reference, where) => {
173
- const entity = surfaceEntityOf(reference);
174
- if (entity.kind !== "app") return reference;
175
- try {
176
- return `app:${resolveActorView(programs, entity.id).view.id}`;
177
- } catch (error) {
178
- throw invalid(`${where}: ${reference}: ${error instanceof Error ? error.message : String(error)} Surface entities get the prefix app:.`);
179
- }
180
- };
181
- return parsedLayout({ root: layout.root ? mapSurfaceTileEntities(layout.root, (entity) => resolve(entity, "root")) : null });
182
- };
183
- var checkLayoutAgainstRun = (view, input) => {
184
- const layout = resolveAppReferences(view, input);
185
- for (const reference of surfaceTileEntities(layout.root)) {
186
- if (isActorReference(reference)) surfaceActorOf(view, reference, "root");
187
- }
188
- return layout;
189
- };
190
- var currentLayout = (view) => {
191
- const state = view.pluginStates.find((entry) => entry.pluginId === ORCHESTRATION_PLUGIN_ID && entry.scope.kind === "run")?.state;
192
- return state === void 0 || state === null ? { root: null } : surfaceLayoutOf(state);
193
- };
194
- var placed = (view, request) => {
195
- const current = currentLayout(view);
196
- const [tile] = surfaceTileEntities(checkLayoutAgainstRun(view, parsedLayout({ root: { entity: request.entity } })).root);
197
- if (surfaceTileEntities(current.root).includes(tile)) return void 0;
198
- const root = current.root === null ? { entity: tile } : {
199
- direction: request.direction ?? "horizontal",
200
- weights: [1, request.weight ?? 1],
201
- children: [current.root, { entity: tile }]
202
- };
203
- return parsedLayout({ root });
204
- };
205
- var placeOnSurface = (runtime) => ({
206
- place: (context, runId, request) => {
207
- const layout = placed(runtime().view(runId), request);
208
- if (!layout) return { placed: false };
209
- runtime().replacePluginState(context, runId, { pluginId: ORCHESTRATION_PLUGIN_ID, scope: { kind: "run" }, state: layout });
210
- return { placed: true };
211
- }
212
- });
213
- var placeSchema = Type.Object({
214
- entity: Type.String({ minLength: 1, description: "Actor @handle or activated mini-app app:@handle/view-key or app:program-name/view-key" }),
215
- direction: Type.Optional(Type.Union([Type.Literal("horizontal"), Type.Literal("vertical")], { description: "horizontal: to the right of the current layout (default); vertical: below it" })),
216
- weight: Type.Optional(Type.Number({ exclusiveMinimum: 0, description: "Share of the placed tile against the existing arrangement's weight 1; default 1" }))
217
- }, { additionalProperties: false });
218
- var createPlaceTool = () => defineRunFunction({
219
- ...placeToolMetadata,
220
- schema: placeSchema,
221
- resultSchema: Type.Object({ placed: Type.Boolean() }, { additionalProperties: false }),
222
- available: canDesignSurface,
223
- run: ({ runtime, caller, context }, toolCallId, input) => placeOnSurface(() => runtime).place(context(toolCallId), caller.runId, input)
224
- });
225
- var createSurfaceTool = () => defineRunFunction({
226
- ...surfaceToolMetadata,
227
- schema: surfaceLayoutSchema,
228
- resultSchema: Type.Null(),
229
- available: canDesignSurface,
230
- run: ({ runtime, caller, context }, toolCallId, input) => {
231
- const view = runtime.view(caller.runId);
232
- const layout = checkLayoutAgainstRun(view, parsedLayout(input));
233
- runtime.replacePluginState(context(toolCallId), caller.runId, {
234
- pluginId: ORCHESTRATION_PLUGIN_ID,
235
- scope: { kind: "run" },
236
- state: layout
237
- });
238
- return null;
239
- }
240
- });
241
- var createSurfaceToolContributor = () => ({
242
- name: "ragents.orchestration.surface",
243
- descriptors: [toolDescriptorFrom(surfaceToolMetadata, canDesignSurface), toolDescriptorFrom(placeToolMetadata, canDesignSurface)],
244
- tools: () => [createSurfaceTool(), createPlaceTool()]
245
- });
246
-
247
- // server/run-stop-tool.ts
248
- import { Type as Type2 } from "typebox";
249
- import { defineRunFunction as defineRunFunction2, defineToolAvailability as defineToolAvailability2, holdsUsable as holdsUsable2 } from "@ragents/engine";
250
- import { toolDescriptorFrom as toolDescriptorFrom2 } from "@ragents/host/plugin-support/agent-tool.js";
251
- var available = defineToolAvailability2({
19
+ var available = defineToolAvailability({
252
20
  availability: "conditional",
253
21
  availabilityDetail: "For the primary actor with execution.stopOwned in its own run.",
254
22
  requiredCapabilities: ["execution.stopOwned"]
255
- }, (actor, view) => actor.kind !== "human" && actor.id === view.primaryActorId && holdsUsable2(actor, "execution.stopOwned"));
23
+ }, (actor, view) => actor.kind !== "human" && actor.id === view.primaryActorId && holdsUsable(actor, "execution.stopOwned"));
256
24
  var createRunStopContributor = (stop, onError) => {
257
- const definition = defineRunFunction2({
25
+ const definition = defineRunFunction({
258
26
  name: "run_stop",
259
27
  label: "Stop run",
260
28
  description: "Initiates the complete stop of your own run: running turns, tools, subagents and plugin services. Conversation and files are kept. Also cancels your own turn; acceptance is not a confirmation of completed cleanup. Use immediately when the user wants a complete cancellation; do not send a cancel message to busy agents.",
261
- schema: Type2.Object({}, { additionalProperties: false }),
262
- resultSchema: Type2.Object({ requested: Type2.Literal(true) }, { additionalProperties: false }),
29
+ schema: Type.Object({}, { additionalProperties: false }),
30
+ resultSchema: Type.Object({ requested: Type.Literal(true) }, { additionalProperties: false }),
263
31
  available,
264
32
  run: ({ caller, signal }) => {
265
33
  signal?.throwIfAborted();
@@ -269,7 +37,7 @@ var createRunStopContributor = (stop, onError) => {
269
37
  });
270
38
  return {
271
39
  name: "ragents.orchestration.run-stop",
272
- descriptors: [toolDescriptorFrom2(definition, available)],
40
+ descriptors: [toolDescriptorFrom(definition, available)],
273
41
  tools: () => [definition]
274
42
  };
275
43
  };
@@ -279,8 +47,6 @@ import { runManagementToken } from "@ragents/host/ragents/global-chat.js";
279
47
  var orchestrationPlugin = {
280
48
  manifest: { id: "ragents.orchestration" },
281
49
  register: (host) => {
282
- host.functions(createSurfaceToolContributor());
283
- host.provide(surfacePlacementToken, placeOnSurface(host.service(runtimeProviderToken)));
284
50
  host.functions(createRunStopContributor(
285
51
  (runId) => host.service(runManagementToken)().stop(runId),
286
52
  (error) => console.error("Run stop by the coordinator failed", error)
@@ -307,12 +73,7 @@ var orchestrationPlugin = {
307
73
  })
308
74
  });
309
75
  host.prompts(
310
- handlebarsPrompt("ragents.orchestration.prompt", 600, pluginAsset("ragents.orchestration", "orchestration.hbs")),
311
- boundToTools(
312
- handlebarsPrompt("ragents.orchestration.surface", 650, pluginAsset("ragents.orchestration", "surface.hbs")),
313
- "canvas_layout_replace",
314
- "canvas_layout_place"
315
- )
76
+ handlebarsPrompt("ragents.orchestration.prompt", 600, pluginAsset("ragents.orchestration", "orchestration.hbs"))
316
77
  );
317
78
  }
318
79
  };