@dxos/plugin-debug 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.0

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 (501) hide show
  1. package/PLUGIN.mdl +241 -3
  2. package/README.md +27 -3
  3. package/dist/lib/Debug.mjs.map +1 -1
  4. package/dist/lib/DebugNodes.mjs +21 -2
  5. package/dist/lib/DebugNodes.mjs.map +1 -1
  6. package/dist/lib/DebugOperation.mjs +166 -2
  7. package/dist/lib/DebugOperation.mjs.map +1 -1
  8. package/dist/lib/DebugPlugin.mjs.map +1 -1
  9. package/dist/lib/DebugSurface.mjs +7 -2
  10. package/dist/lib/DebugSurface.mjs.map +1 -1
  11. package/dist/lib/IncidentSpace.mjs +2 -0
  12. package/dist/lib/PipelineSpace.mjs +2 -0
  13. package/dist/lib/ReviewSpace.mjs +2 -0
  14. package/dist/lib/StockfishSpace.mjs +2 -0
  15. package/dist/lib/TidepoolSpace.mjs +2 -0
  16. package/dist/lib/WeatherSpace.mjs +2 -0
  17. package/dist/lib/WorkerSpace.mjs +2 -0
  18. package/dist/lib/capabilities.browser.mjs +71 -0
  19. package/dist/lib/capabilities.browser.mjs.map +1 -0
  20. package/dist/lib/capabilities.mjs +17 -7
  21. package/dist/lib/capabilities.mjs.map +1 -1
  22. package/dist/lib/capabilities.node.mjs +13 -3
  23. package/dist/lib/capabilities.node.mjs.map +1 -1
  24. package/dist/lib/capabilities.tauri.mjs +71 -0
  25. package/dist/lib/capabilities.tauri.mjs.map +1 -0
  26. package/dist/lib/capabilities.workerd.mjs +3 -1
  27. package/dist/lib/capabilities.workerd.mjs.map +1 -1
  28. package/dist/lib/chunk-DebugConsole.mjs +241 -0
  29. package/dist/lib/chunk-DebugConsole.mjs.map +1 -0
  30. package/dist/lib/chunk-DebugObjectPanel.mjs +12 -16
  31. package/dist/lib/chunk-DebugObjectPanel.mjs.map +1 -1
  32. package/dist/lib/chunk-DebugPanelDrawer.mjs +48 -0
  33. package/dist/lib/chunk-DebugPanelDrawer.mjs.map +1 -0
  34. package/dist/lib/chunk-DebugPanelHeader.mjs +280 -0
  35. package/dist/lib/chunk-DebugPanelHeader.mjs.map +1 -0
  36. package/dist/lib/chunk-DebugPanelStatus.mjs +127 -0
  37. package/dist/lib/chunk-DebugPanelStatus.mjs.map +1 -0
  38. package/dist/lib/chunk-DebugSettings.mjs +81 -70
  39. package/dist/lib/chunk-DebugSettings.mjs.map +1 -1
  40. package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +21 -12
  41. package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs.map +1 -1
  42. package/dist/lib/chunk-DebugStatus.mjs +12 -12
  43. package/dist/lib/chunk-DebugStatus.mjs.map +1 -1
  44. package/dist/lib/chunk-IncidentSpace.mjs +269 -0
  45. package/dist/lib/chunk-IncidentSpace.mjs.map +1 -0
  46. package/dist/lib/chunk-LoggerPanel.mjs +18 -0
  47. package/dist/lib/chunk-LoggerPanel.mjs.map +1 -0
  48. package/dist/lib/chunk-PLUGIN.mjs +6 -0
  49. package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
  50. package/dist/lib/chunk-PipelineSpace.mjs +378 -0
  51. package/dist/lib/chunk-PipelineSpace.mjs.map +1 -0
  52. package/dist/lib/chunk-ReviewSpace.mjs +356 -0
  53. package/dist/lib/chunk-ReviewSpace.mjs.map +1 -0
  54. package/dist/lib/chunk-SpaceGenerator.mjs +107 -73
  55. package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -1
  56. package/dist/lib/chunk-StatsPanel.mjs +28 -35
  57. package/dist/lib/chunk-StatsPanel.mjs.map +1 -1
  58. package/dist/lib/chunk-StockfishSpace.mjs +563 -0
  59. package/dist/lib/chunk-StockfishSpace.mjs.map +1 -0
  60. package/dist/lib/chunk-TidepoolSpace.mjs +544 -0
  61. package/dist/lib/chunk-TidepoolSpace.mjs.map +1 -0
  62. package/dist/lib/chunk-WeatherSpace.mjs +206 -0
  63. package/dist/lib/chunk-WeatherSpace.mjs.map +1 -0
  64. package/dist/lib/chunk-Wireframe.mjs +6 -6
  65. package/dist/lib/chunk-Wireframe.mjs.map +1 -1
  66. package/dist/lib/chunk-WorkerSpace.mjs +177 -0
  67. package/dist/lib/chunk-WorkerSpace.mjs.map +1 -0
  68. package/dist/lib/chunk-app-graph-builder.mjs +72 -40
  69. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
  70. package/dist/lib/chunk-create-space-from-template.mjs +55 -0
  71. package/dist/lib/chunk-create-space-from-template.mjs.map +1 -0
  72. package/dist/lib/chunk-errors.mjs +13 -0
  73. package/dist/lib/chunk-errors.mjs.map +1 -0
  74. package/dist/lib/chunk-graph-retention.mjs +14 -0
  75. package/dist/lib/chunk-graph-retention.mjs.map +1 -0
  76. package/dist/lib/chunk-insert-lorem-ipsum.mjs +2 -2
  77. package/dist/lib/chunk-log-recording.mjs +29 -1
  78. package/dist/lib/chunk-log-recording.mjs.map +1 -1
  79. package/dist/lib/chunk-open-page.mjs +29 -0
  80. package/dist/lib/chunk-open-page.mjs.map +1 -0
  81. package/dist/lib/chunk-operation-handler.mjs +5 -0
  82. package/dist/lib/chunk-operation-handler.mjs.map +1 -1
  83. package/dist/lib/chunk-react-surface.mjs +73 -71
  84. package/dist/lib/chunk-react-surface.mjs.map +1 -1
  85. package/dist/lib/chunk-settings.mjs +2 -2
  86. package/dist/lib/chunk-settings.mjs.map +1 -1
  87. package/dist/lib/chunk-snapshot.mjs +170 -0
  88. package/dist/lib/chunk-snapshot.mjs.map +1 -0
  89. package/dist/lib/chunk-space-templates.mjs +21 -0
  90. package/dist/lib/chunk-space-templates.mjs.map +1 -0
  91. package/dist/lib/chunk-stats-panel.mjs +1 -1
  92. package/dist/lib/chunk-stats-panel.mjs.map +1 -1
  93. package/dist/lib/chunk-undo.mjs +17 -0
  94. package/dist/lib/chunk-undo.mjs.map +1 -0
  95. package/dist/lib/chunk-view-state.mjs +37 -0
  96. package/dist/lib/chunk-view-state.mjs.map +1 -0
  97. package/dist/lib/components.mjs +68 -28
  98. package/dist/lib/components.mjs.map +1 -1
  99. package/dist/lib/containers.mjs +5 -2
  100. package/dist/lib/containers.mjs.map +1 -1
  101. package/dist/lib/index.mjs +8 -2
  102. package/dist/lib/meta.mjs +3 -2
  103. package/dist/lib/meta.mjs.map +1 -1
  104. package/dist/lib/operations.mjs +7 -1
  105. package/dist/lib/operations.mjs.map +1 -1
  106. package/dist/lib/plugin.mjs +2 -2
  107. package/dist/lib/plugin.mjs.map +1 -1
  108. package/dist/lib/translations.mjs +13 -4
  109. package/dist/lib/translations.mjs.map +1 -1
  110. package/dist/types/scripts/build-template-archive.d.ts +2 -0
  111. package/dist/types/scripts/build-template-archive.d.ts.map +1 -0
  112. package/dist/types/src/DebugPlugin.d.ts +2 -2
  113. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  114. package/dist/types/src/capabilities/DebugSurfaces.d.ts +4 -5
  115. package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -1
  116. package/dist/types/src/capabilities/app-graph-builder.d.ts +31 -0
  117. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/app-graph-builder.test.d.ts +2 -0
  119. package/dist/types/src/capabilities/app-graph-builder.test.d.ts.map +1 -0
  120. package/dist/types/src/capabilities/gen/browser.d.ts +14 -0
  121. package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
  122. package/dist/types/src/capabilities/gen/node.d.ts +2 -0
  123. package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/gen/tauri.d.ts +14 -0
  125. package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
  126. package/dist/types/src/capabilities/gen/workerd.d.ts +2 -0
  127. package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
  128. package/dist/types/src/capabilities/graph-retention.d.ts +5 -0
  129. package/dist/types/src/capabilities/graph-retention.d.ts.map +1 -0
  130. package/dist/types/src/capabilities/index.d.ts +2 -0
  131. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  132. package/dist/types/src/capabilities/log-recording.d.ts +4 -0
  133. package/dist/types/src/capabilities/log-recording.d.ts.map +1 -1
  134. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  135. package/dist/types/src/capabilities/space-templates.d.ts +14 -0
  136. package/dist/types/src/capabilities/space-templates.d.ts.map +1 -0
  137. package/dist/types/src/components/SchemaTable/SchemaTable.d.ts +4 -3
  138. package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
  139. package/dist/types/src/components/SchemaTable/index.d.ts +1 -1
  140. package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -1
  141. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -1
  142. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  143. package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
  144. package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
  145. package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -1
  146. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  147. package/dist/types/src/components/index.d.ts +2 -2
  148. package/dist/types/src/components/index.d.ts.map +1 -1
  149. package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts +12 -0
  150. package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts.map +1 -0
  151. package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts +103 -0
  152. package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts.map +1 -0
  153. package/dist/types/src/containers/DebugConsole/cli.d.ts +24 -0
  154. package/dist/types/src/containers/DebugConsole/cli.d.ts.map +1 -0
  155. package/dist/types/src/containers/DebugConsole/index.d.ts +2 -0
  156. package/dist/types/src/containers/DebugConsole/index.d.ts.map +1 -0
  157. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +1 -1
  158. package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
  159. package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -1
  160. package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
  161. package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts +30 -0
  162. package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts.map +1 -0
  163. package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts +126 -0
  164. package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts.map +1 -0
  165. package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts +16 -0
  166. package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts.map +1 -0
  167. package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts +14 -0
  168. package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts.map +1 -0
  169. package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts +6 -0
  170. package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts.map +1 -0
  171. package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts +6 -0
  172. package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts.map +1 -0
  173. package/dist/types/src/containers/DebugPanel/index.d.ts +7 -0
  174. package/dist/types/src/containers/DebugPanel/index.d.ts.map +1 -0
  175. package/dist/types/src/containers/DebugPanel/view-state.d.ts +46 -0
  176. package/dist/types/src/containers/DebugPanel/view-state.d.ts.map +1 -0
  177. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts +10 -0
  178. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts.map +1 -0
  179. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts +114 -0
  180. package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts.map +1 -0
  181. package/dist/types/src/containers/DebugPanelDrawer/index.d.ts +2 -0
  182. package/dist/types/src/containers/DebugPanelDrawer/index.d.ts.map +1 -0
  183. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts +11 -0
  184. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts.map +1 -0
  185. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts +107 -0
  186. package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts.map +1 -0
  187. package/dist/types/src/containers/DebugPanelStatus/index.d.ts +2 -0
  188. package/dist/types/src/containers/DebugPanelStatus/index.d.ts.map +1 -0
  189. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts.map +1 -1
  190. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts +13 -4
  191. package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts.map +1 -1
  192. package/dist/types/src/containers/DebugPortSettings/index.d.ts +1 -1
  193. package/dist/types/src/containers/DebugPortSettings/index.d.ts.map +1 -1
  194. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +2 -2
  195. package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
  196. package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +14 -5
  197. package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
  198. package/dist/types/src/containers/DebugSettings/index.d.ts +1 -1
  199. package/dist/types/src/containers/DebugSettings/index.d.ts.map +1 -1
  200. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +1 -1
  201. package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
  202. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -1
  203. package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
  204. package/dist/types/src/containers/DebugStatus/index.d.ts +1 -1
  205. package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
  206. package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts +6 -0
  207. package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts.map +1 -0
  208. package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts +107 -0
  209. package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts.map +1 -0
  210. package/dist/types/src/containers/LoggerPanel/index.d.ts +2 -0
  211. package/dist/types/src/containers/LoggerPanel/index.d.ts.map +1 -0
  212. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  213. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts +13 -4
  214. package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
  215. package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -1
  216. package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
  217. package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts +5 -1
  218. package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts.map +1 -1
  219. package/dist/types/src/containers/StatsPanel/index.d.ts +1 -1
  220. package/dist/types/src/containers/StatsPanel/index.d.ts.map +1 -1
  221. package/dist/types/src/containers/Wireframe/Wireframe.d.ts +2 -2
  222. package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
  223. package/dist/types/src/containers/Wireframe/index.d.ts +1 -1
  224. package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
  225. package/dist/types/src/containers/index.d.ts +7 -1
  226. package/dist/types/src/containers/index.d.ts.map +1 -1
  227. package/dist/types/src/errors.d.ts +123 -0
  228. package/dist/types/src/errors.d.ts.map +1 -0
  229. package/dist/types/src/index.d.ts +2 -2
  230. package/dist/types/src/index.d.ts.map +1 -1
  231. package/dist/types/src/operations/DebugOperationHandlerSet.d.ts.map +1 -1
  232. package/dist/types/src/operations/create-space-from-template.d.ts +5 -0
  233. package/dist/types/src/operations/create-space-from-template.d.ts.map +1 -0
  234. package/dist/types/src/operations/errors.d.ts +33 -0
  235. package/dist/types/src/operations/errors.d.ts.map +1 -0
  236. package/dist/types/src/operations/index.d.ts +1 -1
  237. package/dist/types/src/operations/index.d.ts.map +1 -1
  238. package/dist/types/src/operations/open-page.d.ts +5 -0
  239. package/dist/types/src/operations/open-page.d.ts.map +1 -0
  240. package/dist/types/src/operations/snapshot.d.ts +5 -0
  241. package/dist/types/src/operations/snapshot.d.ts.map +1 -0
  242. package/dist/types/src/operations/snapshot.test.d.ts +2 -0
  243. package/dist/types/src/operations/snapshot.test.d.ts.map +1 -0
  244. package/dist/types/src/operations/undo.d.ts +5 -0
  245. package/dist/types/src/operations/undo.d.ts.map +1 -0
  246. package/dist/types/src/operations/undo.test.d.ts +2 -0
  247. package/dist/types/src/operations/undo.test.d.ts.map +1 -0
  248. package/dist/types/src/plugin.d.ts.map +1 -1
  249. package/dist/types/src/samples/crm/PipelineSpace.d.ts +21 -0
  250. package/dist/types/src/samples/crm/PipelineSpace.d.ts.map +1 -0
  251. package/dist/types/src/samples/crm/PipelineSpace.test.d.ts +2 -0
  252. package/dist/types/src/samples/crm/PipelineSpace.test.d.ts.map +1 -0
  253. package/dist/types/src/samples/crm/accounts.d.ts +55 -0
  254. package/dist/types/src/samples/crm/accounts.d.ts.map +1 -0
  255. package/dist/types/src/samples/crm/inbox.d.ts +14 -0
  256. package/dist/types/src/samples/crm/inbox.d.ts.map +1 -0
  257. package/dist/types/src/samples/crm/pipeline.d.ts +9 -0
  258. package/dist/types/src/samples/crm/pipeline.d.ts.map +1 -0
  259. package/dist/types/src/samples/crm/util.d.ts +14 -0
  260. package/dist/types/src/samples/crm/util.d.ts.map +1 -0
  261. package/dist/types/src/samples/incident/IncidentSpace.d.ts +21 -0
  262. package/dist/types/src/samples/incident/IncidentSpace.d.ts.map +1 -0
  263. package/dist/types/src/samples/incident/IncidentSpace.test.d.ts +2 -0
  264. package/dist/types/src/samples/incident/IncidentSpace.test.d.ts.map +1 -0
  265. package/dist/types/src/samples/incident/docs.d.ts +14 -0
  266. package/dist/types/src/samples/incident/docs.d.ts.map +1 -0
  267. package/dist/types/src/samples/incident/project.d.ts +16 -0
  268. package/dist/types/src/samples/incident/project.d.ts.map +1 -0
  269. package/dist/types/src/samples/incident/tasks.d.ts +9 -0
  270. package/dist/types/src/samples/incident/tasks.d.ts.map +1 -0
  271. package/dist/types/src/samples/incident/util.d.ts +32 -0
  272. package/dist/types/src/samples/incident/util.d.ts.map +1 -0
  273. package/dist/types/src/samples/index.d.ts +8 -0
  274. package/dist/types/src/samples/index.d.ts.map +1 -0
  275. package/dist/types/src/samples/review/ReviewSpace.d.ts +19 -0
  276. package/dist/types/src/samples/review/ReviewSpace.d.ts.map +1 -0
  277. package/dist/types/src/samples/review/ReviewSpace.test.d.ts +2 -0
  278. package/dist/types/src/samples/review/ReviewSpace.test.d.ts.map +1 -0
  279. package/dist/types/src/samples/review/assets.d.ts +19 -0
  280. package/dist/types/src/samples/review/assets.d.ts.map +1 -0
  281. package/dist/types/src/samples/review/util.d.ts +4 -0
  282. package/dist/types/src/samples/review/util.d.ts.map +1 -0
  283. package/dist/types/src/samples/review/work.d.ts +15 -0
  284. package/dist/types/src/samples/review/work.d.ts.map +1 -0
  285. package/dist/types/src/samples/stockfish/StockfishSpace.d.ts +27 -0
  286. package/dist/types/src/samples/stockfish/StockfishSpace.d.ts.map +1 -0
  287. package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts +2 -0
  288. package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts.map +1 -0
  289. package/dist/types/src/samples/stockfish/docs.d.ts +8 -0
  290. package/dist/types/src/samples/stockfish/docs.d.ts.map +1 -0
  291. package/dist/types/src/samples/stockfish/game.d.ts +10 -0
  292. package/dist/types/src/samples/stockfish/game.d.ts.map +1 -0
  293. package/dist/types/src/samples/stockfish/project.d.ts +31 -0
  294. package/dist/types/src/samples/stockfish/project.d.ts.map +1 -0
  295. package/dist/types/src/samples/stockfish/run.test.d.ts +2 -0
  296. package/dist/types/src/samples/stockfish/run.test.d.ts.map +1 -0
  297. package/dist/types/src/samples/stockfish/skill.d.ts +8 -0
  298. package/dist/types/src/samples/stockfish/skill.d.ts.map +1 -0
  299. package/dist/types/src/samples/stockfish/tasks.d.ts +12 -0
  300. package/dist/types/src/samples/stockfish/tasks.d.ts.map +1 -0
  301. package/dist/types/src/samples/stockfish/util.d.ts +14 -0
  302. package/dist/types/src/samples/stockfish/util.d.ts.map +1 -0
  303. package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts +22 -0
  304. package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts.map +1 -0
  305. package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts +2 -0
  306. package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts.map +1 -0
  307. package/dist/types/src/samples/tidepool/docs.d.ts +12 -0
  308. package/dist/types/src/samples/tidepool/docs.d.ts.map +1 -0
  309. package/dist/types/src/samples/tidepool/project.d.ts +20 -0
  310. package/dist/types/src/samples/tidepool/project.d.ts.map +1 -0
  311. package/dist/types/src/samples/tidepool/tasks.d.ts +14 -0
  312. package/dist/types/src/samples/tidepool/tasks.d.ts.map +1 -0
  313. package/dist/types/src/samples/tidepool/team.d.ts +9 -0
  314. package/dist/types/src/samples/tidepool/team.d.ts.map +1 -0
  315. package/dist/types/src/samples/tidepool/util.d.ts +14 -0
  316. package/dist/types/src/samples/tidepool/util.d.ts.map +1 -0
  317. package/dist/types/src/samples/weather/WeatherSpace.d.ts +21 -0
  318. package/dist/types/src/samples/weather/WeatherSpace.d.ts.map +1 -0
  319. package/dist/types/src/samples/weather/WeatherSpace.test.d.ts +2 -0
  320. package/dist/types/src/samples/weather/WeatherSpace.test.d.ts.map +1 -0
  321. package/dist/types/src/samples/weather/project.d.ts +20 -0
  322. package/dist/types/src/samples/weather/project.d.ts.map +1 -0
  323. package/dist/types/src/samples/weather/skill.d.ts +12 -0
  324. package/dist/types/src/samples/weather/skill.d.ts.map +1 -0
  325. package/dist/types/src/samples/weather/tasks.d.ts +9 -0
  326. package/dist/types/src/samples/weather/tasks.d.ts.map +1 -0
  327. package/dist/types/src/samples/weather/util.d.ts +16 -0
  328. package/dist/types/src/samples/weather/util.d.ts.map +1 -0
  329. package/dist/types/src/samples/worker/WorkerSpace.d.ts +22 -0
  330. package/dist/types/src/samples/worker/WorkerSpace.d.ts.map +1 -0
  331. package/dist/types/src/samples/worker/WorkerSpace.test.d.ts +2 -0
  332. package/dist/types/src/samples/worker/WorkerSpace.test.d.ts.map +1 -0
  333. package/dist/types/src/samples/worker/project.d.ts +18 -0
  334. package/dist/types/src/samples/worker/project.d.ts.map +1 -0
  335. package/dist/types/src/samples/worker/tasks.d.ts +9 -0
  336. package/dist/types/src/samples/worker/tasks.d.ts.map +1 -0
  337. package/dist/types/src/samples/worker/util.d.ts +14 -0
  338. package/dist/types/src/samples/worker/util.d.ts.map +1 -0
  339. package/dist/types/src/stories/SpaceTemplates.stories.d.ts +114 -0
  340. package/dist/types/src/stories/SpaceTemplates.stories.d.ts.map +1 -0
  341. package/dist/types/src/testing/index.d.ts +3 -0
  342. package/dist/types/src/testing/index.d.ts.map +1 -0
  343. package/dist/types/src/testing/stub-drawer-plugin.d.ts +8 -0
  344. package/dist/types/src/testing/stub-drawer-plugin.d.ts.map +1 -0
  345. package/dist/types/src/testing/stub-tools-plugin.d.ts +19 -0
  346. package/dist/types/src/testing/stub-tools-plugin.d.ts.map +1 -0
  347. package/dist/types/src/translations.d.ts +13 -4
  348. package/dist/types/src/translations.d.ts.map +1 -1
  349. package/dist/types/src/types/Debug.d.ts +2 -2
  350. package/dist/types/src/types/Debug.d.ts.map +1 -1
  351. package/dist/types/src/types/DebugNodes.d.ts +13 -1
  352. package/dist/types/src/types/DebugNodes.d.ts.map +1 -1
  353. package/dist/types/src/types/DebugOperation.d.ts +119 -0
  354. package/dist/types/src/types/DebugOperation.d.ts.map +1 -1
  355. package/dist/types/src/types/DebugSurface.d.ts +7 -0
  356. package/dist/types/src/types/DebugSurface.d.ts.map +1 -1
  357. package/dist/types/src/types/index.d.ts +6 -6
  358. package/dist/types/src/types/index.d.ts.map +1 -1
  359. package/dist/types/tsconfig.tsbuildinfo +1 -1
  360. package/dx.config.ts +3 -2
  361. package/package.json +129 -73
  362. package/scripts/build-template-archive.ts +65 -0
  363. package/src/DebugPlugin.ts +1 -1
  364. package/src/capabilities/DebugSurfaces.tsx +85 -71
  365. package/src/capabilities/app-graph-builder.test.ts +45 -0
  366. package/src/capabilities/app-graph-builder.ts +83 -46
  367. package/src/capabilities/gen/browser.ts +85 -0
  368. package/src/capabilities/gen/node.ts +15 -8
  369. package/src/capabilities/gen/tauri.ts +85 -0
  370. package/src/capabilities/gen/workerd.ts +11 -4
  371. package/src/capabilities/graph-retention.ts +23 -0
  372. package/src/capabilities/index.ts +18 -10
  373. package/src/capabilities/log-recording.ts +20 -1
  374. package/src/capabilities/operation-handler.ts +9 -0
  375. package/src/capabilities/react-surface.ts +33 -29
  376. package/src/capabilities/settings.ts +2 -2
  377. package/src/capabilities/space-templates.ts +25 -0
  378. package/src/capabilities/stats-panel.ts +1 -1
  379. package/src/components/SchemaTable/SchemaTable.tsx +44 -10
  380. package/src/components/SchemaTable/index.ts +1 -1
  381. package/src/components/SpaceGenerator/ObjectGenerator.tsx +22 -2
  382. package/src/components/SpaceGenerator/index.ts +2 -2
  383. package/src/components/SpaceGenerator/presets.ts +4 -4
  384. package/src/components/index.ts +2 -2
  385. package/src/containers/DebugConsole/DebugConsole.stories.tsx +29 -0
  386. package/src/containers/DebugConsole/DebugConsole.tsx +94 -0
  387. package/src/containers/DebugConsole/cli.ts +296 -0
  388. package/src/containers/DebugConsole/index.ts +5 -0
  389. package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +44 -44
  390. package/src/containers/DebugObjectPanel/index.ts +1 -1
  391. package/src/containers/DebugPanel/DebugPanel.stories.tsx +118 -0
  392. package/src/containers/DebugPanel/DebugPanel.tsx +72 -0
  393. package/src/containers/DebugPanel/DebugPanelContext.ts +33 -0
  394. package/src/containers/DebugPanel/DebugPanelHeader.tsx +54 -0
  395. package/src/containers/DebugPanel/DebugPanelMain.tsx +116 -0
  396. package/src/containers/DebugPanel/DebugPanelSidebar.tsx +123 -0
  397. package/src/containers/DebugPanel/index.ts +10 -0
  398. package/src/containers/DebugPanel/view-state.ts +60 -0
  399. package/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.tsx +92 -0
  400. package/src/containers/DebugPanelDrawer/DebugPanelDrawer.tsx +72 -0
  401. package/src/containers/DebugPanelDrawer/index.ts +5 -0
  402. package/src/containers/DebugPanelStatus/DebugPanelStatus.stories.tsx +119 -0
  403. package/src/containers/DebugPanelStatus/DebugPanelStatus.tsx +167 -0
  404. package/src/containers/DebugPanelStatus/index.ts +5 -0
  405. package/src/containers/DebugPortSettings/DebugPortSettings.stories.tsx +2 -2
  406. package/src/containers/DebugPortSettings/DebugPortSettings.tsx +33 -40
  407. package/src/containers/DebugPortSettings/index.ts +1 -1
  408. package/src/containers/DebugSettings/DebugSettings.stories.tsx +1 -1
  409. package/src/containers/DebugSettings/DebugSettings.tsx +71 -64
  410. package/src/containers/DebugSettings/index.ts +1 -1
  411. package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +39 -28
  412. package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -1
  413. package/src/containers/DebugStatus/DebugStatus.tsx +10 -10
  414. package/src/containers/DebugStatus/index.ts +1 -1
  415. package/src/containers/LoggerPanel/LoggerPanel.stories.tsx +62 -0
  416. package/src/containers/LoggerPanel/LoggerPanel.tsx +28 -0
  417. package/src/containers/LoggerPanel/index.ts +5 -0
  418. package/src/containers/SpaceGenerator/SpaceGenerator.stories.tsx +8 -8
  419. package/src/containers/SpaceGenerator/SpaceGenerator.tsx +102 -73
  420. package/src/containers/SpaceGenerator/index.ts +1 -1
  421. package/src/containers/StatsPanel/StatsPanel.tsx +32 -31
  422. package/src/containers/StatsPanel/index.ts +1 -1
  423. package/src/containers/Wireframe/Wireframe.tsx +8 -7
  424. package/src/containers/Wireframe/index.ts +1 -1
  425. package/src/containers/index.ts +22 -9
  426. package/src/errors.ts +23 -0
  427. package/src/index.ts +2 -2
  428. package/src/meta.ts +1 -1
  429. package/src/operations/DebugOperationHandlerSet.ts +5 -1
  430. package/src/operations/create-space-from-template.ts +57 -0
  431. package/src/operations/errors.ts +8 -0
  432. package/src/operations/index.ts +1 -1
  433. package/src/operations/open-page.ts +51 -0
  434. package/src/operations/snapshot.test.ts +57 -0
  435. package/src/operations/snapshot.ts +243 -0
  436. package/src/operations/undo.test.ts +19 -0
  437. package/src/operations/undo.ts +28 -0
  438. package/src/plugin.tsx +4 -0
  439. package/src/samples/crm/PipelineSpace.test.ts +55 -0
  440. package/src/samples/crm/PipelineSpace.ts +52 -0
  441. package/src/samples/crm/accounts.ts +153 -0
  442. package/src/samples/crm/inbox.ts +158 -0
  443. package/src/samples/crm/pipeline.ts +70 -0
  444. package/src/samples/crm/util.ts +18 -0
  445. package/src/samples/incident/IncidentSpace.test.ts +68 -0
  446. package/src/samples/incident/IncidentSpace.ts +61 -0
  447. package/src/samples/incident/docs.ts +111 -0
  448. package/src/samples/incident/project.ts +61 -0
  449. package/src/samples/incident/tasks.ts +101 -0
  450. package/src/samples/incident/util.ts +24 -0
  451. package/src/samples/index.ts +11 -0
  452. package/src/samples/review/ReviewSpace.test.ts +89 -0
  453. package/src/samples/review/ReviewSpace.ts +47 -0
  454. package/src/samples/review/assets.ts +123 -0
  455. package/src/samples/review/util.ts +10 -0
  456. package/src/samples/review/work.ts +249 -0
  457. package/src/samples/stockfish/StockfishSpace.test.ts +129 -0
  458. package/src/samples/stockfish/StockfishSpace.ts +70 -0
  459. package/src/samples/stockfish/docs.ts +65 -0
  460. package/src/samples/stockfish/game.ts +47 -0
  461. package/src/samples/stockfish/project.ts +87 -0
  462. package/src/samples/stockfish/run.test.ts +193 -0
  463. package/src/samples/stockfish/skill.ts +154 -0
  464. package/src/samples/stockfish/tasks.ts +306 -0
  465. package/src/samples/stockfish/util.ts +17 -0
  466. package/src/samples/tidepool/TidepoolSpace.test.ts +61 -0
  467. package/src/samples/tidepool/TidepoolSpace.ts +65 -0
  468. package/src/samples/tidepool/docs.ts +140 -0
  469. package/src/samples/tidepool/project.ts +57 -0
  470. package/src/samples/tidepool/tasks.ts +252 -0
  471. package/src/samples/tidepool/team.ts +87 -0
  472. package/src/samples/tidepool/util.ts +18 -0
  473. package/src/samples/weather/WeatherSpace.test.ts +93 -0
  474. package/src/samples/weather/WeatherSpace.ts +59 -0
  475. package/src/samples/weather/project.ts +76 -0
  476. package/src/samples/weather/skill.ts +45 -0
  477. package/src/samples/weather/tasks.ts +98 -0
  478. package/src/samples/weather/util.ts +21 -0
  479. package/src/samples/worker/WorkerSpace.test.ts +102 -0
  480. package/src/samples/worker/WorkerSpace.ts +56 -0
  481. package/src/samples/worker/project.ts +72 -0
  482. package/src/samples/worker/tasks.ts +119 -0
  483. package/src/samples/worker/util.ts +17 -0
  484. package/src/stories/SpaceTemplates.stories.tsx +105 -0
  485. package/src/testing/index.ts +6 -0
  486. package/src/testing/stub-drawer-plugin.ts +65 -0
  487. package/src/testing/stub-tools-plugin.tsx +95 -0
  488. package/src/translations.ts +15 -6
  489. package/src/types/Debug.ts +2 -2
  490. package/src/types/DebugNodes.ts +21 -1
  491. package/src/types/DebugOperation.ts +206 -0
  492. package/src/types/DebugSurface.ts +7 -0
  493. package/src/types/index.ts +6 -6
  494. package/dist/lib/chunk-LogStatus.mjs +0 -44
  495. package/dist/lib/chunk-LogStatus.mjs.map +0 -1
  496. package/dist/types/src/containers/LogStatus/LogStatus.d.ts +0 -6
  497. package/dist/types/src/containers/LogStatus/LogStatus.d.ts.map +0 -1
  498. package/dist/types/src/containers/LogStatus/index.d.ts +0 -2
  499. package/dist/types/src/containers/LogStatus/index.d.ts.map +0 -1
  500. package/src/containers/LogStatus/LogStatus.tsx +0 -51
  501. package/src/containers/LogStatus/index.ts +0 -5
@@ -0,0 +1,563 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import * as Effect from "effect/Effect";
3
+ import * as SampleSpace from "@dxos/app-toolkit/SampleSpace";
4
+ import { Database, Obj, Ref } from "@dxos/echo";
5
+ import * as Markdown from "@dxos/plugin-markdown/Markdown";
6
+ import * as Instructions from "@dxos/compute/Instructions";
7
+ import * as Project from "@dxos/compute/Project";
8
+ import { EntityId } from "@dxos/echo/Key";
9
+ import { Outline, Task, TaskSet } from "@dxos/types";
10
+ import { Text } from "@dxos/schema";
11
+ import * as Chess from "@dxos/plugin-chess/Chess";
12
+ import * as Game from "@dxos/plugin-game/Game";
13
+ import * as Skill from "@dxos/compute/Skill";
14
+ import * as Template from "@dxos/compute/Template";
15
+ import { trim } from "@dxos/util";
16
+ //#region src/samples/stockfish/docs.ts
17
+ var BRIEF_MD = `# Brief — chess engine as an MCP server on Workers
18
+
19
+ A chess engine any chat in this space can consult, built as one Cloudflare Worker speaking MCP and
20
+ registered against this space. The reader runs it end to end from the assistant, with no Cloudflare
21
+ account, no GitHub account until the last stage, and no Anthropic key at any point.
22
+
23
+ ## Shape
24
+
25
+ One Worker. One Streamable-HTTP MCP endpoint on it. Two tools — evaluate a position, and name the
26
+ best move from it — over a chess engine compiled to WebAssembly and bundled into the Worker.
27
+
28
+ ## Constraints
29
+
30
+ - **No database.** Every request carries the position as FEN; the Worker holds nothing between
31
+ requests, so it can be evicted and restarted freely.
32
+ - **No accounts to start.** The first deploy uses wrangler's unauthenticated mode, which mints a
33
+ temporary Cloudflare account and prints a URL to claim it. GitHub comes last, and only to publish.
34
+ - **No Anthropic key.** The chat driving this runs DeepSeek V4 Pro through the DXOS edge.
35
+ - **Written by the assistant, not delegated.** The assistant edits and runs things itself in the
36
+ sandbox. The coding harness pre-installed in the sandbox image is not the path — see the
37
+ Development skill.
38
+ - **Bounded search.** A fixed, low depth or a fixed millisecond budget per call. An MCP tool that
39
+ thinks for thirty seconds is a tool a chat gives up on.
40
+
41
+ ## Out of scope
42
+
43
+ Opening books, endgame tablebases, multi-PV analysis, game persistence, per-caller rate limiting,
44
+ and authentication beyond the shared key the MCP server record already carries.
45
+
46
+ ## Done means
47
+
48
+ The Worker is registered as an MCP server in this space, and a chat opened on the seeded game
49
+ answers "what is the best move here?" from the engine's reply rather than from its own knowledge —
50
+ visible as a tool call in the transcript.
51
+ `;
52
+ /** The project's brief: the requirement the first task designs against. */
53
+ var Docs = SampleSpace.phase("docs", {
54
+ schemas: [Markdown.Document],
55
+ run: () => Effect.gen(function* () {
56
+ return { brief: yield* Database.add(Markdown.make({
57
+ name: "BRIEF.md",
58
+ content: BRIEF_MD
59
+ })) };
60
+ })
61
+ });
62
+ //#endregion
63
+ //#region src/samples/stockfish/game.ts
64
+ var OPENING_PGN = "1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 *";
65
+ /** The position the deployed engine is asked about, as a game the chess chat can open. */
66
+ var ChessGame = SampleSpace.phase("game", {
67
+ schemas: [Game.Game, Chess.State],
68
+ run: () => Effect.gen(function* () {
69
+ const state = yield* Database.add(Chess.make({ pgn: OPENING_PGN }));
70
+ return {
71
+ game: yield* Database.add(Game.make({
72
+ name: "Test position — Spanish, 5 moves in",
73
+ players: [{
74
+ role: "white",
75
+ name: "You"
76
+ }, {
77
+ role: "black",
78
+ name: "Engine"
79
+ }],
80
+ variant: state
81
+ })),
82
+ state
83
+ };
84
+ })
85
+ });
86
+ //#endregion
87
+ //#region src/samples/stockfish/project.ts
88
+ var INSTRUCTIONS$1 = `Keep the Development skill enabled for the whole session — it carries how work \
89
+ is tracked, where the code is written and what counts as evidence, and it applies to every turn \
90
+ rather than to one task. Do not disable it to save context.
91
+
92
+ Build the MCP server described in BRIEF.md by working the task tree in order, and set each task's \
93
+ status as you finish it: the task list is how the reader follows this run.
94
+
95
+ Write the code yourself in one sandbox, driving it through the Sandbox skill. The sandbox image \
96
+ ships a coding agent of its own; do not delegate this project to it — it has none of this space's \
97
+ context, and its output would land on a container filesystem rather than in this project.
98
+
99
+ Verify every stage before starting the next, and redeploy in the two that change Worker code — a \
100
+ design or registration stage has nothing to deploy. File what you produce — the design, the Worker \
101
+ URL, the tool responses — as artifacts on this project rather than leaving it in the chat. The \
102
+ claim URL that the first deploy prints is a bearer credential for the account: give it to me \
103
+ directly and file it nowhere.
104
+
105
+ This project needs no Anthropic key and no Cloudflare login. If a step seems to need either, that \
106
+ is the wrong step.`;
107
+ /**
108
+ * The work-stream. It adopts the task set the tasks phase built (`Project.make` would otherwise
109
+ * create its own empty one) and carries the brief as an artifact.
110
+ *
111
+ * The skill reaches a chat through `instructions.skills`, which is the only binding path: a Skill
112
+ * object sitting in the space is not enabled by proximity. Binding makes it available; the text
113
+ * above is what keeps it on. The Sandbox skill cannot be bound the same way — it is contributed by
114
+ * a plugin under a key rather than stored here — so the text names it instead.
115
+ *
116
+ * No `repo` and no `McpServer`: the repository is created in stage five and the server record in
117
+ * stage four, and seeding either would name a URL that does not exist.
118
+ */
119
+ var ProjectPhase = SampleSpace.phase("project", {
120
+ schemas: [
121
+ Project.Project,
122
+ Instructions.Instructions,
123
+ Outline.Outline
124
+ ],
125
+ run: ({ docs, tasks, skill, game }) => Effect.gen(function* () {
126
+ const instructions = yield* Database.add(Instructions.make({
127
+ name: "Chess MCP on Workers",
128
+ text: INSTRUCTIONS$1,
129
+ skills: [Ref.make(skill.skill)],
130
+ objects: [
131
+ Ref.make(docs.brief),
132
+ Ref.make(tasks.taskSet),
133
+ Ref.make(game.game)
134
+ ]
135
+ }));
136
+ return {
137
+ project: yield* Database.add(Project.make({
138
+ name: "Chess MCP on Workers",
139
+ description: "A chess engine served from one Cloudflare Worker as an MCP server, registered against this space so any chat can ask it for a move.",
140
+ status: "active",
141
+ instructions: Ref.make(instructions),
142
+ taskSet: Ref.make(tasks.taskSet),
143
+ artifacts: [Ref.make(docs.brief)]
144
+ })),
145
+ instructions
146
+ };
147
+ })
148
+ });
149
+ //#endregion
150
+ //#region src/samples/stockfish/skill.ts
151
+ var INSTRUCTIONS = trim`
152
+ How multi-step development work is tracked and carried out here. These hold across a whole
153
+ session, not one task, so keep this skill enabled for the duration.
154
+
155
+ ## Tasks
156
+ - One task per unit of work, never per batch. A batched task hides which parts landed and which
157
+ were dropped.
158
+ - One or two lines per description. Detail belongs in the design document or the README.
159
+ - Work that ends in someone else's hands gets its own task, titled after the thing to act on and
160
+ assigned to them — never buried in the task that produced the work.
161
+ - Use the whole status range. \`blocked\` names what unblocks it; \`cancelled\` names why it was
162
+ dropped. Deleting a dropped item loses reasoning someone will otherwise re-derive later.
163
+ - Set status in the same turn the work completes, not in a batch at the end. The task list is how
164
+ the reader watches this run, so a status set late is a status that was wrong while it mattered.
165
+ - Respect \`dependsOn\`. A stage assumes the one before it deployed and was verified; starting one
166
+ early is how a failure gets attributed to the wrong change.
167
+ - Keep the outline scoped to the task in flight. Findings about another thread belong where that
168
+ thread lives.
169
+
170
+ ## Where the code is written
171
+ - **You write it.** The sandbox is a shell you drive: you create the files, run the build, and read
172
+ the failures. Creating a sandbox, running commands in it and moving files in and out are the
173
+ Sandbox skill's (\`org.dxos.skill.sandbox\`) — enable it rather than working from memory.
174
+ - **Do not hand the task to the harness in the image.** The sandbox image ships a coding agent of
175
+ its own, and \`org.dxos.skill.deepseek\` will run it. It is the wrong tool here: it starts with
176
+ none of this space's context — no brief, no task tree, no design document — and what it produces
177
+ lands on a container filesystem instead of in this project. Use it only if the reader asks for it
178
+ by name.
179
+ - **One sandbox for the whole project.** It keeps its filesystem, its installed toolchain and its
180
+ checkout between commands. A second one pays for all of that again and splits the tree in two.
181
+ - **The container is not durable.** Anything that has to survive it — the design, the deploy
182
+ output, the URLs — is filed as a project artifact in the same turn it is produced, not at the
183
+ end.
184
+
185
+ ## Deploying to Cloudflare
186
+ - **No account, first deploy.** \`wrangler deploy --temporary\` mints a temporary account and
187
+ prints a claim URL. The flag is not optional: plain \`wrangler deploy\` refuses in a
188
+ non-interactive shell and demands a token, and an authentication prompt is a dead end for a
189
+ session that cannot open a browser.
190
+ - **The claim URL is a bearer credential; the Worker URL is not.** Anyone holding the claim URL can
191
+ take ownership of the account, and a project artifact replicates in plaintext to everyone in the
192
+ space — so file the Worker URL and hand the claim URL straight to the reader, logging it nowhere.
193
+ Claiming needs a browser, so it is theirs to do; say that it expires with the Worker on it, which
194
+ invalidates every later stage rather than only the current one.
195
+ - **Deploy when the Worker changed, and verify every stage regardless.** A design stage has nothing
196
+ to deploy and a stage that only registers or publishes changes no Worker code — deploying there is
197
+ a no-op that reads as progress. Where you did deploy, a successful \`wrangler deploy\` is not
198
+ evidence that anything is serving; the response body is.
199
+ - **\`--temporary\` needs wrangler 4.102 or later, and that wrangler needs Node 22.** The sandbox
200
+ runs Node 20, and a plain \`npm install wrangler\` there resolves to the last version that fits
201
+ it, which has no \`--temporary\`. Install \`wrangler@latest\` explicitly and run its script under
202
+ a newer node without touching the image: \`npm install wrangler@latest\`, then
203
+ \`npx --yes node@22 node_modules/wrangler/bin/wrangler.js deploy --temporary\`.
204
+ - **Read the deploy output for what it warns about, not only its exit code.** Bundle size and a
205
+ missing binding are warnings on a deploy that succeeds and failures on the request that follows.
206
+ - **Bound work by work, not by wall-clock.** \`Date.now()\` does not advance during synchronous
207
+ compute in a Worker, so a time deadline never fires and every timing you report reads as zero.
208
+ Count iterations, nodes or bytes instead.
209
+
210
+ ## Models and credentials
211
+ - The chat runs DeepSeek V4 Pro through the DXOS edge. No Anthropic key is involved in this
212
+ project, and nothing here should ask for one.
213
+ - Bind credentials by REFERENCE with the variable name to read them as. Never paste a secret into
214
+ a prompt, a message or a shell command — a command line persists in the transcript and in the
215
+ container's history.
216
+ - A missing credential is a setup gap, not an error to stop on: name the connector the reader has
217
+ to connect, then wait. Do not retry in the same turn.
218
+
219
+ ## MCP servers
220
+ - A server is registered as an object in the space, with the transport as \`http\` — Streamable
221
+ HTTP. \`sse\` is the deprecated transport and is there for servers that have not migrated.
222
+ - Its key replicates in plaintext to everyone in the space. Register a key the server can rotate,
223
+ and never one that authorises anything beyond it.
224
+ - A chat that does not list a registered server's tools has failed to connect. That is a URL,
225
+ transport or handshake fault to diagnose — not a model that declined to use them.
226
+ - Prove the tool was actually called. An answer a model could have produced from its own knowledge
227
+ is not evidence the server is reachable; the tool call in the transcript is.
228
+
229
+ ## GitHub and publishing
230
+ - Publishing comes last, after the thing works. The two consent screens it needs are the only
231
+ steps that leave this space, and a first run that meets them mid-build stops there.
232
+ - An agent has no GitHub access of its own. Bind the space's token as \`GH_TOKEN\` before it is
233
+ needed, not after a 401.
234
+ - A connector token authorises access to repositories; it cannot CREATE one. Creating the
235
+ repository is the reader's task and it comes first — the token is then scoped to that repository
236
+ rather than to everything they own.
237
+ - Tokens rotate. A session that was pushing fine and now gets 401 or 403 holds a stale copy:
238
+ refresh the binding rather than restarting the session.
239
+
240
+ ## What counts as evidence
241
+ - Set the bar at execution, not compilation. "It builds" and "it parses" are not evidence: require
242
+ the thing to be RUN, and say what could not be exercised.
243
+ - A brief's premise is often wrong; expect it to be falsified. Ask what the real mechanism is
244
+ before changing the thing that looks like it, and re-ask when the previous answer was itself a
245
+ correction.
246
+ - When a measurement is corrected, sweep every conclusion that shared the flawed method. A bad
247
+ instrument invalidates results already banked; failing to propagate the fix backwards is the
248
+ expensive mistake.
249
+ - "Could not run it here" is an environment limit, not a behavioural difference. Only the second is
250
+ a stop; label the first untested rather than letting it read as a pass.
251
+ - The sandbox's own state contaminates results: tooling installed earlier makes a capability look
252
+ available when it is not. Verify a from-scratch claim in a clean container.
253
+ - A green build is not proof. Assignment and type erasure hide shape mismatches that fail only at
254
+ runtime — and a Worker's runtime is not node's, so a module that resolves locally can still be
255
+ missing at the edge.
256
+ - Distinguish cited from executed evidence. A comment describing a failure is a claim being
257
+ relayed, not a result; a load-bearing decision deserves a reproduction.
258
+ - Be terse about the plumbing. Creating a sandbox, installing a toolchain and each command that
259
+ found nothing are not worth narrating. What the reader wants is the outcome — the URL, the tool
260
+ response, the failure. Say something mid-flight only when they have to act.
261
+ `;
262
+ /** The development-preferences skill, as a space object a project's instructions can bind. */
263
+ var DevelopmentSkill = SampleSpace.phase("skill", {
264
+ schemas: [Skill.Skill, Text.Text],
265
+ run: () => Effect.gen(function* () {
266
+ return { skill: yield* Database.add(Skill.make({
267
+ key: "org.dxos.skill.development",
268
+ name: "Development",
269
+ description: "How work is tracked, where the code is written, and what counts as evidence.",
270
+ instructions: Template.make({ source: INSTRUCTIONS }),
271
+ agentCanEnable: true
272
+ })) };
273
+ })
274
+ });
275
+ //#endregion
276
+ //#region src/samples/stockfish/util.ts
277
+ /** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */
278
+ var REFERENCE = process.env.NOW ? new Date(process.env.NOW) : /* @__PURE__ */ new Date("2026-05-20T15:00:00Z");
279
+ /** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */
280
+ var daysAgo = SampleSpace.makeClock(REFERENCE).daysAgo;
281
+ //#endregion
282
+ //#region src/samples/stockfish/tasks.ts
283
+ /**
284
+ * The reader, as an assignee. A template cannot know who they are, so the actor carries the role and
285
+ * a label rather than a Person ref — enough for the row to say the step is not the agent's.
286
+ */
287
+ var USER = {
288
+ role: "user",
289
+ name: "You"
290
+ };
291
+ var PLAN = {
292
+ title: "Ship a chess engine as an MCP server on Cloudflare Workers",
293
+ description: "From the brief to a tool a chat in this space calls. Every stage is verified before the next one starts; the two that change Worker code deploy first.",
294
+ estimate: "l",
295
+ subTasks: [
296
+ {
297
+ title: "Design the tool surface and write it down",
298
+ description: "A Markdown artifact on this project, with the diagrams a reviewer reads instead of the code.",
299
+ estimate: "s",
300
+ subTasks: [
301
+ {
302
+ title: "Select DeepSeek V4 Pro as the chat model",
303
+ description: "Yours to do: the model is a Composer setting, not something this space can carry. Assistant settings → model, or the selector in the chat itself. It runs through the DXOS edge, so no Anthropic key is involved anywhere in this project.",
304
+ estimate: "xs",
305
+ assignee: USER
306
+ },
307
+ {
308
+ title: "Name the two tools and pin their schemas",
309
+ description: "Evaluate a position, and name the best move from one. FEN in, and a bounded search budget as an argument — decide the unit and the ceiling now.",
310
+ estimate: "xs"
311
+ },
312
+ {
313
+ title: "Diagram the request path",
314
+ description: "Chat → MCP client → Worker → engine, as a mermaid flowchart. Name what is bundled and what is fetched.",
315
+ estimate: "xs"
316
+ },
317
+ {
318
+ title: "Decide how the engine gets into the Worker",
319
+ description: "A WebAssembly build bundled with the Worker, and what that costs against the bundle-size limit. State the fallback if it does not fit.",
320
+ estimate: "xs"
321
+ },
322
+ {
323
+ title: "File the design as a project artifact",
324
+ description: "DESIGN.md, added to the project rather than left in the chat.",
325
+ estimate: "xs"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ title: "Deploy an empty Worker with no Cloudflare login",
331
+ description: "Nothing application-shaped in this stage. The point is a URL that answers before any code exists, and an account claimed while it is cheap to lose. No login to DEPLOY; claiming it afterwards is the one browser step here.",
332
+ estimate: "m",
333
+ subTasks: [
334
+ {
335
+ title: "Create the sandbox and install the toolchain",
336
+ description: "One sandbox for the whole project — it keeps its filesystem between commands, so a second one pays for node and wrangler again.",
337
+ estimate: "s"
338
+ },
339
+ {
340
+ title: "Initialize the project with wrangler",
341
+ description: "A TypeScript Worker returning one line of body. Anything more is a later stage.",
342
+ estimate: "xs"
343
+ },
344
+ {
345
+ title: "Deploy without authenticating to Cloudflare",
346
+ description: "`wrangler deploy --temporary` mints a temporary account and prints a Worker URL and a claim URL; plain `wrangler deploy` refuses non-interactively and demands a token, so the flag is not optional. File the WORKER url on the project. The claim URL is a bearer credential — hand it straight to the reader and file it nowhere.",
347
+ estimate: "s"
348
+ },
349
+ {
350
+ title: "Fetch the deployed URL and confirm the body",
351
+ description: "Fetch it. A successful deploy command is not evidence that anything is serving. Do not claim the account yet — the next stage still redeploys this Worker.",
352
+ estimate: "xs"
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ title: "Implement the MCP server and the engine",
358
+ description: "The application stage, redeployed and checked over the wire at the end of it.",
359
+ estimate: "l",
360
+ subTasks: [
361
+ {
362
+ title: "Answer the MCP handshake over Streamable HTTP",
363
+ description: "Initialize and `tools/list` on one endpoint, with the two tools advertised and nothing behind them yet.",
364
+ estimate: "m"
365
+ },
366
+ {
367
+ title: "Bundle the engine and run one search",
368
+ description: "Prove a search returns inside the budget the design set, from a Worker rather than from node. Bound it by work done, not by wall-clock: `Date.now()` does not advance during synchronous compute in a Worker, so a time deadline never fires there and the call reports zero elapsed.",
369
+ estimate: "m"
370
+ },
371
+ {
372
+ title: "Implement both tools over the engine",
373
+ description: "Reject an unparseable FEN as a tool error rather than letting the engine fail on it.",
374
+ estimate: "m"
375
+ },
376
+ {
377
+ title: "Redeploy and call `tools/list` and both tools over the wire",
378
+ description: "Against the deployed URL, not a local dev server. Paste the responses into the project — that is the stage evidence. This is the last deploy, so claiming comes next.",
379
+ estimate: "s"
380
+ },
381
+ {
382
+ title: "Claim the temporary Cloudflare account",
383
+ description: "Yours to do: claiming signs the account into yours, which needs a browser the agent does not have. It comes AFTER the last redeploy — an agent with no login cannot update a claimed account, and `--temporary` would mint a second one under a different URL. Do it inside the hour; the account expires with the Worker on it.",
384
+ estimate: "xs",
385
+ assignee: USER
386
+ }
387
+ ]
388
+ },
389
+ {
390
+ title: "Register the server and use it from the chess chat",
391
+ description: "The brief's definition of done, and the first point at which the thing is worth showing anyone.",
392
+ estimate: "m",
393
+ subTasks: [
394
+ {
395
+ title: "Add the deployed URL as an MCP server in this space",
396
+ description: "Register the URL as it stands AFTER the claim — a `workers.dev` hostname is account-scoped, so confirm it by fetching before trusting it. Protocol `http` — Streamable HTTP, not the deprecated SSE transport. Its key is stored in plaintext and replicates to everyone in the space, so keep it to one the Worker can rotate.",
397
+ estimate: "s"
398
+ },
399
+ {
400
+ title: "Enable the Chess plugin",
401
+ description: "Yours to do: it is available but off by default, and without it the seeded game has no board to open — the last step of this stage needs one. Settings -> plugin registry.",
402
+ estimate: "xs",
403
+ assignee: USER
404
+ },
405
+ {
406
+ title: "Confirm the tools reach the chat",
407
+ description: "A chat that lists the two tools has connected; one that does not is a transport or URL fault, not a model that chose against them.",
408
+ estimate: "xs"
409
+ },
410
+ {
411
+ title: "Ask for the best move in the seeded game",
412
+ description: "Open the game and ask. The answer has to arrive as a tool call in the transcript — a plausible move the model knew already is a failure of this step, not a pass.",
413
+ estimate: "s"
414
+ }
415
+ ]
416
+ },
417
+ {
418
+ title: "Publish it to GitHub",
419
+ description: "Last on purpose: the two consent screens below are the only steps that leave this space, and putting them here means a first run reaches a working engine before it meets one.",
420
+ estimate: "m",
421
+ subTasks: [
422
+ {
423
+ title: "Create an empty GitHub repository for the server",
424
+ description: "Yours to do: a connector token authorises access to repositories, it cannot create one. Make it empty — this stage pushes the first commit — and note the owner/name.",
425
+ estimate: "xs",
426
+ assignee: USER
427
+ },
428
+ {
429
+ title: "Connect the GitHub credential, scoped to that repository",
430
+ description: "On the authorisation screen choose \"Only select repositories\" and pick the one above, with Contents set to read and write. A token scoped to everything is a token the agent did not need.",
431
+ estimate: "xs",
432
+ assignee: USER
433
+ },
434
+ {
435
+ title: "Push the tree, with the deploy and MCP steps written down",
436
+ description: "A README that gets a reader from a clone to a registered MCP server. The wrangler invocation and the URL to register are the two things they cannot guess.",
437
+ estimate: "s"
438
+ }
439
+ ]
440
+ }
441
+ ]
442
+ };
443
+ /**
444
+ * Depth-first flatten, recording each task's children so they can be filed under it once stored.
445
+ * The stages are collected on the way down, as the root's children.
446
+ */
447
+ var buildTasks = (seed) => {
448
+ const tasks = [];
449
+ const stages = [];
450
+ const children = /* @__PURE__ */ new Map();
451
+ const visit = (seed, parent) => {
452
+ const task = Task.make({
453
+ title: seed.title,
454
+ status: "todo",
455
+ description: seed.description,
456
+ estimate: seed.estimate,
457
+ assignee: seed.assignee,
458
+ history: [{
459
+ id: EntityId.random(),
460
+ date: daysAgo(0),
461
+ event: "created",
462
+ description: "Filed from the chess MCP template."
463
+ }]
464
+ });
465
+ tasks.push(task);
466
+ if (parent) children.set(parent, [...children.get(parent) ?? [], task]);
467
+ if (parent === tasks[0]) stages.push(task);
468
+ for (const child of seed.subTasks ?? []) visit(child, task);
469
+ };
470
+ visit(seed, void 0);
471
+ return {
472
+ tasks,
473
+ stages,
474
+ children
475
+ };
476
+ };
477
+ /** The plan: one root task, five stages under it, and the steps under those. */
478
+ var Tasks = SampleSpace.phase("tasks", {
479
+ schemas: [TaskSet.TaskSet, Task.Task],
480
+ run: () => Effect.gen(function* () {
481
+ const taskSet = yield* Database.add(TaskSet.make({
482
+ name: "Chess MCP on Workers",
483
+ description: "Everything between the brief and a chat asking the engine for a move."
484
+ }));
485
+ const { tasks, stages, children } = buildTasks(PLAN);
486
+ yield* SampleSpace.children(taskSet, [tasks[0]], (taskSet, refs) => {
487
+ taskSet.tasks = refs;
488
+ });
489
+ for (const [parent, subtasks] of children) yield* SampleSpace.children(parent, subtasks, (parent, refs) => {
490
+ parent.subtasks = refs;
491
+ });
492
+ for (const [index, stage] of stages.entries()) if (index > 0) {
493
+ const previous = stages[index - 1];
494
+ Obj.update(stage, (stage) => {
495
+ stage.dependsOn = [Ref.make(previous)];
496
+ });
497
+ }
498
+ return {
499
+ taskSet,
500
+ tasks,
501
+ root: tasks[0],
502
+ stages
503
+ };
504
+ })
505
+ });
506
+ //#endregion
507
+ //#region src/samples/stockfish/StockfishSpace.ts
508
+ var StockfishSpace_exports = /* @__PURE__ */ __exportAll({
509
+ make: () => make,
510
+ makeTemplate: () => makeTemplate
511
+ });
512
+ var phases = {
513
+ skill: DevelopmentSkill,
514
+ docs: Docs,
515
+ game: ChessGame,
516
+ tasks: Tasks,
517
+ project: ProjectPhase
518
+ };
519
+ /**
520
+ * A starting point rather than a finished world: the brief for a chess engine exposed as an MCP
521
+ * server on Cloudflare Workers, the plan to build it as a task tree nothing has started on, a
522
+ * position to point the finished thing at, and the development-preferences skill a chat working it
523
+ * runs with.
524
+ *
525
+ * The other space templates depict a project mid-flight; this one is meant to be RUN. Every task is
526
+ * `todo`, the design artifact the first stage produces is deliberately absent, and neither the MCP
527
+ * server record nor a repository is seeded — stages four and five create them.
528
+ *
529
+ * It is deliberately reachable with no credentials but the reader's own DXOS identity: the chat runs
530
+ * DeepSeek through the edge, the first deploy uses wrangler's unauthenticated mode, and the only two
531
+ * consent screens are in the last stage.
532
+ */
533
+ var make = () => SampleSpace.make({
534
+ space: {
535
+ name: "Chess MCP on Workers",
536
+ icon: "shield-star",
537
+ hue: "amber"
538
+ },
539
+ reference: REFERENCE,
540
+ phases,
541
+ build: (phases) => Effect.gen(function* () {
542
+ const skill = yield* phases.skill();
543
+ const docs = yield* phases.docs();
544
+ const game = yield* phases.game();
545
+ const tasks = yield* phases.tasks();
546
+ yield* phases.project({
547
+ docs,
548
+ tasks,
549
+ skill,
550
+ game
551
+ });
552
+ yield* SampleSpace.collection("Documents", [Ref.make(docs.brief)]);
553
+ })
554
+ });
555
+ var makeTemplate = () => SampleSpace.makeTemplate({
556
+ id: "org.dxos.plugin-debug.template.stockfish",
557
+ description: "A brief, a five-stage plan as a task tree, a position to test against, and the skill for building it in a sandbox.",
558
+ definition: make()
559
+ });
560
+ //#endregion
561
+ export { make as n, makeTemplate as r, StockfishSpace_exports as t };
562
+
563
+ //# sourceMappingURL=chunk-StockfishSpace.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-StockfishSpace.mjs","names":[],"sources":["../../src/samples/stockfish/docs.ts","../../src/samples/stockfish/game.ts","../../src/samples/stockfish/project.ts","../../src/samples/stockfish/skill.ts","../../src/samples/stockfish/util.ts","../../src/samples/stockfish/tasks.ts","../../src/samples/stockfish/StockfishSpace.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Database } from '@dxos/echo';\nimport * as Markdown from '@dxos/plugin-markdown/Markdown';\n\n//\n// The one artifact this space ships with.\n//\n// The brief is INPUT — what to build and what not to. The design (the tool surface and the request\n// path) is the first task's output, so it is deliberately absent: seeding it would answer the\n// question the project exists to work through.\n//\n\nconst BRIEF_MD = `# Brief — chess engine as an MCP server on Workers\n\nA chess engine any chat in this space can consult, built as one Cloudflare Worker speaking MCP and\nregistered against this space. The reader runs it end to end from the assistant, with no Cloudflare\naccount, no GitHub account until the last stage, and no Anthropic key at any point.\n\n## Shape\n\nOne Worker. One Streamable-HTTP MCP endpoint on it. Two tools — evaluate a position, and name the\nbest move from it — over a chess engine compiled to WebAssembly and bundled into the Worker.\n\n## Constraints\n\n- **No database.** Every request carries the position as FEN; the Worker holds nothing between\n requests, so it can be evicted and restarted freely.\n- **No accounts to start.** The first deploy uses wrangler's unauthenticated mode, which mints a\n temporary Cloudflare account and prints a URL to claim it. GitHub comes last, and only to publish.\n- **No Anthropic key.** The chat driving this runs DeepSeek V4 Pro through the DXOS edge.\n- **Written by the assistant, not delegated.** The assistant edits and runs things itself in the\n sandbox. The coding harness pre-installed in the sandbox image is not the path — see the\n Development skill.\n- **Bounded search.** A fixed, low depth or a fixed millisecond budget per call. An MCP tool that\n thinks for thirty seconds is a tool a chat gives up on.\n\n## Out of scope\n\nOpening books, endgame tablebases, multi-PV analysis, game persistence, per-caller rate limiting,\nand authentication beyond the shared key the MCP server record already carries.\n\n## Done means\n\nThe Worker is registered as an MCP server in this space, and a chat opened on the seeded game\nanswers \"what is the best move here?\" from the engine's reply rather than from its own knowledge —\nvisible as a tool call in the transcript.\n`;\n\nexport type DocsResult = { brief: Markdown.Document };\n\n/** The project's brief: the requirement the first task designs against. */\nexport const Docs: SampleSpace.Phase<DocsResult> = SampleSpace.phase('docs', {\n schemas: [Markdown.Document],\n run: () =>\n Effect.gen(function* () {\n const brief = yield* Database.add(Markdown.make({ name: 'BRIEF.md', content: BRIEF_MD }));\n return { brief };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Database } from '@dxos/echo';\nimport * as Chess from '@dxos/plugin-chess/Chess';\nimport * as Game from '@dxos/plugin-game/Game';\n\n//\n// The thing the finished server gets pointed at.\n//\n// The last stage's definition of done is a chat answering \"what is the best move here?\" from the\n// engine rather than from what the model already knows, so the space ships a position to ask it\n// about. Seeded as a game rather than a bare FEN in the brief because the chess chat opens on a\n// Game — a position the reader has to paste in is a step that will be skipped.\n//\n// A Spanish opening five moves deep: quiet, materially level, and with no forced tactic, so a\n// plausible answer produced without calling the tool is not accidentally the right one.\n//\n\nconst OPENING_PGN = '1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 *';\n\nexport type GameResult = { game: Game.Game; state: Chess.State };\n\n/** The position the deployed engine is asked about, as a game the chess chat can open. */\nexport const ChessGame: SampleSpace.Phase<GameResult> = SampleSpace.phase('game', {\n schemas: [Game.Game, Chess.State],\n run: () =>\n Effect.gen(function* () {\n const state = yield* Database.add(Chess.make({ pgn: OPENING_PGN }));\n const game = yield* Database.add(\n Game.make({\n name: 'Test position — Spanish, 5 moves in',\n players: [\n { role: 'white', name: 'You' },\n { role: 'black', name: 'Engine' },\n ],\n variant: state,\n }),\n );\n\n return { game, state };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport * as Instructions from '@dxos/compute/Instructions';\nimport * as Project from '@dxos/compute/Project';\nimport { Database, Ref } from '@dxos/echo';\nimport { Outline } from '@dxos/types';\n\nimport { type DocsResult } from './docs.ts';\nimport { type GameResult } from './game.ts';\nimport { type SkillResult } from './skill.ts';\nimport { type TasksResult } from './tasks.ts';\n\n//\n// The project that ties the plan, the brief, the test position and the skill together.\n//\n\nexport type ProjectInput = { docs: DocsResult; tasks: TasksResult; skill: SkillResult; game: GameResult };\n\nexport type ProjectResult = { project: Project.Project; instructions: Instructions.Instructions };\n\nconst INSTRUCTIONS = `Keep the Development skill enabled for the whole session — it carries how work \\\nis tracked, where the code is written and what counts as evidence, and it applies to every turn \\\nrather than to one task. Do not disable it to save context.\n\nBuild the MCP server described in BRIEF.md by working the task tree in order, and set each task's \\\nstatus as you finish it: the task list is how the reader follows this run.\n\nWrite the code yourself in one sandbox, driving it through the Sandbox skill. The sandbox image \\\nships a coding agent of its own; do not delegate this project to it — it has none of this space's \\\ncontext, and its output would land on a container filesystem rather than in this project.\n\nVerify every stage before starting the next, and redeploy in the two that change Worker code — a \\\ndesign or registration stage has nothing to deploy. File what you produce — the design, the Worker \\\nURL, the tool responses — as artifacts on this project rather than leaving it in the chat. The \\\nclaim URL that the first deploy prints is a bearer credential for the account: give it to me \\\ndirectly and file it nowhere.\n\nThis project needs no Anthropic key and no Cloudflare login. If a step seems to need either, that \\\nis the wrong step.`;\n\n/**\n * The work-stream. It adopts the task set the tasks phase built (`Project.make` would otherwise\n * create its own empty one) and carries the brief as an artifact.\n *\n * The skill reaches a chat through `instructions.skills`, which is the only binding path: a Skill\n * object sitting in the space is not enabled by proximity. Binding makes it available; the text\n * above is what keeps it on. The Sandbox skill cannot be bound the same way — it is contributed by\n * a plugin under a key rather than stored here — so the text names it instead.\n *\n * No `repo` and no `McpServer`: the repository is created in stage five and the server record in\n * stage four, and seeding either would name a URL that does not exist.\n */\nexport const ProjectPhase: SampleSpace.Phase<ProjectResult, ProjectInput> = SampleSpace.phase('project', {\n // `Outline.Outline` is not created here directly: `Project.make` builds one for the project's own\n // outline, and a phase has to declare every type it persists or the space cannot register it.\n schemas: [Project.Project, Instructions.Instructions, Outline.Outline],\n run: ({ docs, tasks, skill, game }: ProjectInput) =>\n Effect.gen(function* () {\n const instructions = yield* Database.add(\n Instructions.make({\n name: 'Chess MCP on Workers',\n text: INSTRUCTIONS,\n skills: [Ref.make(skill.skill)],\n objects: [Ref.make(docs.brief), Ref.make(tasks.taskSet), Ref.make(game.game)],\n }),\n );\n\n const project = yield* Database.add(\n Project.make({\n name: 'Chess MCP on Workers',\n description:\n 'A chess engine served from one Cloudflare Worker as an MCP server, registered against this space so any chat can ask it for a move.',\n status: 'active',\n instructions: Ref.make(instructions),\n taskSet: Ref.make(tasks.taskSet),\n artifacts: [Ref.make(docs.brief)],\n }),\n );\n\n return { project, instructions };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport * as Skill from '@dxos/compute/Skill';\nimport * as Template from '@dxos/compute/Template';\nimport { Database } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\n//\n// Durable working preferences, seeded as a space object so a project's instructions can bind them.\n//\n// Preferences, not mechanics: how work is tracked, where the code is written, and what counts as\n// evidence. The mechanics of the sandbox (creating one, exec, file transfer) belong to\n// `org.dxos.skill.sandbox` and are cross-referenced rather than restated — two copies of a\n// procedure diverge, and the copy the model reads is the stale one.\n//\n\nconst INSTRUCTIONS = trim`\n How multi-step development work is tracked and carried out here. These hold across a whole\n session, not one task, so keep this skill enabled for the duration.\n\n ## Tasks\n - One task per unit of work, never per batch. A batched task hides which parts landed and which\n were dropped.\n - One or two lines per description. Detail belongs in the design document or the README.\n - Work that ends in someone else's hands gets its own task, titled after the thing to act on and\n assigned to them — never buried in the task that produced the work.\n - Use the whole status range. \\`blocked\\` names what unblocks it; \\`cancelled\\` names why it was\n dropped. Deleting a dropped item loses reasoning someone will otherwise re-derive later.\n - Set status in the same turn the work completes, not in a batch at the end. The task list is how\n the reader watches this run, so a status set late is a status that was wrong while it mattered.\n - Respect \\`dependsOn\\`. A stage assumes the one before it deployed and was verified; starting one\n early is how a failure gets attributed to the wrong change.\n - Keep the outline scoped to the task in flight. Findings about another thread belong where that\n thread lives.\n\n ## Where the code is written\n - **You write it.** The sandbox is a shell you drive: you create the files, run the build, and read\n the failures. Creating a sandbox, running commands in it and moving files in and out are the\n Sandbox skill's (\\`org.dxos.skill.sandbox\\`) — enable it rather than working from memory.\n - **Do not hand the task to the harness in the image.** The sandbox image ships a coding agent of\n its own, and \\`org.dxos.skill.deepseek\\` will run it. It is the wrong tool here: it starts with\n none of this space's context — no brief, no task tree, no design document — and what it produces\n lands on a container filesystem instead of in this project. Use it only if the reader asks for it\n by name.\n - **One sandbox for the whole project.** It keeps its filesystem, its installed toolchain and its\n checkout between commands. A second one pays for all of that again and splits the tree in two.\n - **The container is not durable.** Anything that has to survive it — the design, the deploy\n output, the URLs — is filed as a project artifact in the same turn it is produced, not at the\n end.\n\n ## Deploying to Cloudflare\n - **No account, first deploy.** \\`wrangler deploy --temporary\\` mints a temporary account and\n prints a claim URL. The flag is not optional: plain \\`wrangler deploy\\` refuses in a\n non-interactive shell and demands a token, and an authentication prompt is a dead end for a\n session that cannot open a browser.\n - **The claim URL is a bearer credential; the Worker URL is not.** Anyone holding the claim URL can\n take ownership of the account, and a project artifact replicates in plaintext to everyone in the\n space — so file the Worker URL and hand the claim URL straight to the reader, logging it nowhere.\n Claiming needs a browser, so it is theirs to do; say that it expires with the Worker on it, which\n invalidates every later stage rather than only the current one.\n - **Deploy when the Worker changed, and verify every stage regardless.** A design stage has nothing\n to deploy and a stage that only registers or publishes changes no Worker code — deploying there is\n a no-op that reads as progress. Where you did deploy, a successful \\`wrangler deploy\\` is not\n evidence that anything is serving; the response body is.\n - **\\`--temporary\\` needs wrangler 4.102 or later, and that wrangler needs Node 22.** The sandbox\n runs Node 20, and a plain \\`npm install wrangler\\` there resolves to the last version that fits\n it, which has no \\`--temporary\\`. Install \\`wrangler@latest\\` explicitly and run its script under\n a newer node without touching the image: \\`npm install wrangler@latest\\`, then\n \\`npx --yes node@22 node_modules/wrangler/bin/wrangler.js deploy --temporary\\`.\n - **Read the deploy output for what it warns about, not only its exit code.** Bundle size and a\n missing binding are warnings on a deploy that succeeds and failures on the request that follows.\n - **Bound work by work, not by wall-clock.** \\`Date.now()\\` does not advance during synchronous\n compute in a Worker, so a time deadline never fires and every timing you report reads as zero.\n Count iterations, nodes or bytes instead.\n\n ## Models and credentials\n - The chat runs DeepSeek V4 Pro through the DXOS edge. No Anthropic key is involved in this\n project, and nothing here should ask for one.\n - Bind credentials by REFERENCE with the variable name to read them as. Never paste a secret into\n a prompt, a message or a shell command — a command line persists in the transcript and in the\n container's history.\n - A missing credential is a setup gap, not an error to stop on: name the connector the reader has\n to connect, then wait. Do not retry in the same turn.\n\n ## MCP servers\n - A server is registered as an object in the space, with the transport as \\`http\\` — Streamable\n HTTP. \\`sse\\` is the deprecated transport and is there for servers that have not migrated.\n - Its key replicates in plaintext to everyone in the space. Register a key the server can rotate,\n and never one that authorises anything beyond it.\n - A chat that does not list a registered server's tools has failed to connect. That is a URL,\n transport or handshake fault to diagnose — not a model that declined to use them.\n - Prove the tool was actually called. An answer a model could have produced from its own knowledge\n is not evidence the server is reachable; the tool call in the transcript is.\n\n ## GitHub and publishing\n - Publishing comes last, after the thing works. The two consent screens it needs are the only\n steps that leave this space, and a first run that meets them mid-build stops there.\n - An agent has no GitHub access of its own. Bind the space's token as \\`GH_TOKEN\\` before it is\n needed, not after a 401.\n - A connector token authorises access to repositories; it cannot CREATE one. Creating the\n repository is the reader's task and it comes first — the token is then scoped to that repository\n rather than to everything they own.\n - Tokens rotate. A session that was pushing fine and now gets 401 or 403 holds a stale copy:\n refresh the binding rather than restarting the session.\n\n ## What counts as evidence\n - Set the bar at execution, not compilation. \"It builds\" and \"it parses\" are not evidence: require\n the thing to be RUN, and say what could not be exercised.\n - A brief's premise is often wrong; expect it to be falsified. Ask what the real mechanism is\n before changing the thing that looks like it, and re-ask when the previous answer was itself a\n correction.\n - When a measurement is corrected, sweep every conclusion that shared the flawed method. A bad\n instrument invalidates results already banked; failing to propagate the fix backwards is the\n expensive mistake.\n - \"Could not run it here\" is an environment limit, not a behavioural difference. Only the second is\n a stop; label the first untested rather than letting it read as a pass.\n - The sandbox's own state contaminates results: tooling installed earlier makes a capability look\n available when it is not. Verify a from-scratch claim in a clean container.\n - A green build is not proof. Assignment and type erasure hide shape mismatches that fail only at\n runtime — and a Worker's runtime is not node's, so a module that resolves locally can still be\n missing at the edge.\n - Distinguish cited from executed evidence. A comment describing a failure is a claim being\n relayed, not a result; a load-bearing decision deserves a reproduction.\n - Be terse about the plumbing. Creating a sandbox, installing a toolchain and each command that\n found nothing are not worth narrating. What the reader wants is the outcome — the URL, the tool\n response, the failure. Say something mid-flight only when they have to act.\n`;\n\nexport type SkillResult = { skill: Skill.Skill };\n\n/** The development-preferences skill, as a space object a project's instructions can bind. */\nexport const DevelopmentSkill: SampleSpace.Phase<SkillResult> = SampleSpace.phase('skill', {\n schemas: [Skill.Skill, Text.Text],\n run: () =>\n Effect.gen(function* () {\n const skill = yield* Database.add(\n Skill.make({\n key: 'org.dxos.skill.development',\n name: 'Development',\n description: 'How work is tracked, where the code is written, and what counts as evidence.',\n instructions: Template.make({ source: INSTRUCTIONS }),\n agentCanEnable: true,\n }),\n );\n\n return { skill };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\n/** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */\nexport const REFERENCE = process.env.NOW ? new Date(process.env.NOW) : new Date('2026-05-20T15:00:00Z');\n\n/**\n * Bound to the same reference the definition declares, so the pure content builders can date their\n * objects without every one of them being an effect.\n */\nexport const clock = SampleSpace.makeClock(REFERENCE);\n\n/** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */\nexport const daysAgo = clock.daysAgo;\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Database, Obj, Ref } from '@dxos/echo';\nimport { EntityId } from '@dxos/echo/Key';\nimport { Actor, Task, TaskSet } from '@dxos/types';\n\nimport { daysAgo } from './util.ts';\n\n//\n// The plan, authored as a tree.\n//\n// The set lists its root tasks and each task lists its own sub-tasks (`Task.subtasks`), at unbounded\n// depth. The seeds are nested the same way, which keeps the shape of the work visible in the source\n// rather than reconstructable only by following refs.\n//\n// Everything is `todo`: this is a plan to run, not a project caught mid-flight. The one thing the\n// seeds do assert is ORDER — a stage assumes the one before it landed, so each depends on its\n// predecessor and a runner that skips ahead is visibly out of order rather than merely early.\n//\n// The ordering constraint that shaped the stages: nothing needing an account outside this space\n// happens until the app already works. Publishing is stage five for exactly that reason — a consent\n// screen in the middle of the build is where a first run stops.\n//\n\ntype TaskSeed = {\n readonly title: string;\n readonly description?: string;\n readonly estimate?: Task.Estimate;\n /** Set where the step needs the reader's own hands — a consent screen, or a repository to own. */\n readonly assignee?: Actor.Actor;\n readonly subTasks?: ReadonlyArray<TaskSeed>;\n};\n\n/**\n * The reader, as an assignee. A template cannot know who they are, so the actor carries the role and\n * a label rather than a Person ref — enough for the row to say the step is not the agent's.\n */\nconst USER: Actor.Actor = { role: 'user', name: 'You' };\n\nconst PLAN: TaskSeed = {\n title: 'Ship a chess engine as an MCP server on Cloudflare Workers',\n description:\n 'From the brief to a tool a chat in this space calls. Every stage is verified before the next one starts; the two that change Worker code deploy first.',\n estimate: 'l',\n subTasks: [\n {\n title: 'Design the tool surface and write it down',\n description: 'A Markdown artifact on this project, with the diagrams a reviewer reads instead of the code.',\n estimate: 's',\n subTasks: [\n {\n title: 'Select DeepSeek V4 Pro as the chat model',\n description:\n 'Yours to do: the model is a Composer setting, not something this space can carry. Assistant settings → model, or the selector in the chat itself. It runs through the DXOS edge, so no Anthropic key is involved anywhere in this project.',\n estimate: 'xs',\n assignee: USER,\n },\n {\n title: 'Name the two tools and pin their schemas',\n description:\n 'Evaluate a position, and name the best move from one. FEN in, and a bounded search budget as an argument — decide the unit and the ceiling now.',\n estimate: 'xs',\n },\n {\n title: 'Diagram the request path',\n description:\n 'Chat → MCP client → Worker → engine, as a mermaid flowchart. Name what is bundled and what is fetched.',\n estimate: 'xs',\n },\n {\n title: 'Decide how the engine gets into the Worker',\n description:\n 'A WebAssembly build bundled with the Worker, and what that costs against the bundle-size limit. State the fallback if it does not fit.',\n estimate: 'xs',\n },\n {\n title: 'File the design as a project artifact',\n description: 'DESIGN.md, added to the project rather than left in the chat.',\n estimate: 'xs',\n },\n ],\n },\n {\n title: 'Deploy an empty Worker with no Cloudflare login',\n description:\n 'Nothing application-shaped in this stage. The point is a URL that answers before any code exists, and an account claimed while it is cheap to lose. No login to DEPLOY; claiming it afterwards is the one browser step here.',\n estimate: 'm',\n subTasks: [\n {\n title: 'Create the sandbox and install the toolchain',\n description:\n 'One sandbox for the whole project — it keeps its filesystem between commands, so a second one pays for node and wrangler again.',\n estimate: 's',\n },\n {\n title: 'Initialize the project with wrangler',\n description: 'A TypeScript Worker returning one line of body. Anything more is a later stage.',\n estimate: 'xs',\n },\n {\n title: 'Deploy without authenticating to Cloudflare',\n description:\n '`wrangler deploy --temporary` mints a temporary account and prints a Worker URL and a claim URL; plain `wrangler deploy` refuses non-interactively and demands a token, so the flag is not optional. File the WORKER url on the project. The claim URL is a bearer credential — hand it straight to the reader and file it nowhere.',\n estimate: 's',\n },\n {\n title: 'Fetch the deployed URL and confirm the body',\n description:\n 'Fetch it. A successful deploy command is not evidence that anything is serving. Do not claim the account yet — the next stage still redeploys this Worker.',\n estimate: 'xs',\n },\n ],\n },\n {\n title: 'Implement the MCP server and the engine',\n description: 'The application stage, redeployed and checked over the wire at the end of it.',\n estimate: 'l',\n subTasks: [\n {\n title: 'Answer the MCP handshake over Streamable HTTP',\n description:\n 'Initialize and `tools/list` on one endpoint, with the two tools advertised and nothing behind them yet.',\n estimate: 'm',\n },\n {\n title: 'Bundle the engine and run one search',\n description:\n 'Prove a search returns inside the budget the design set, from a Worker rather than from node. Bound it by work done, not by wall-clock: `Date.now()` does not advance during synchronous compute in a Worker, so a time deadline never fires there and the call reports zero elapsed.',\n estimate: 'm',\n },\n {\n title: 'Implement both tools over the engine',\n description: 'Reject an unparseable FEN as a tool error rather than letting the engine fail on it.',\n estimate: 'm',\n },\n {\n title: 'Redeploy and call `tools/list` and both tools over the wire',\n description:\n 'Against the deployed URL, not a local dev server. Paste the responses into the project — that is the stage evidence. This is the last deploy, so claiming comes next.',\n estimate: 's',\n },\n {\n title: 'Claim the temporary Cloudflare account',\n description:\n 'Yours to do: claiming signs the account into yours, which needs a browser the agent does not have. It comes AFTER the last redeploy — an agent with no login cannot update a claimed account, and `--temporary` would mint a second one under a different URL. Do it inside the hour; the account expires with the Worker on it.',\n estimate: 'xs',\n assignee: USER,\n },\n ],\n },\n {\n title: 'Register the server and use it from the chess chat',\n description: \"The brief's definition of done, and the first point at which the thing is worth showing anyone.\",\n estimate: 'm',\n subTasks: [\n {\n title: 'Add the deployed URL as an MCP server in this space',\n description:\n 'Register the URL as it stands AFTER the claim — a `workers.dev` hostname is account-scoped, so confirm it by fetching before trusting it. Protocol `http` — Streamable HTTP, not the deprecated SSE transport. Its key is stored in plaintext and replicates to everyone in the space, so keep it to one the Worker can rotate.',\n estimate: 's',\n },\n {\n title: 'Enable the Chess plugin',\n description:\n 'Yours to do: it is available but off by default, and without it the seeded game has no board to open — the last step of this stage needs one. Settings -> plugin registry.',\n estimate: 'xs',\n assignee: USER,\n },\n {\n title: 'Confirm the tools reach the chat',\n description:\n 'A chat that lists the two tools has connected; one that does not is a transport or URL fault, not a model that chose against them.',\n estimate: 'xs',\n },\n {\n title: 'Ask for the best move in the seeded game',\n description:\n 'Open the game and ask. The answer has to arrive as a tool call in the transcript — a plausible move the model knew already is a failure of this step, not a pass.',\n estimate: 's',\n },\n ],\n },\n {\n title: 'Publish it to GitHub',\n description:\n 'Last on purpose: the two consent screens below are the only steps that leave this space, and putting them here means a first run reaches a working engine before it meets one.',\n estimate: 'm',\n subTasks: [\n {\n title: 'Create an empty GitHub repository for the server',\n description:\n 'Yours to do: a connector token authorises access to repositories, it cannot create one. Make it empty — this stage pushes the first commit — and note the owner/name.',\n estimate: 'xs',\n assignee: USER,\n },\n {\n title: 'Connect the GitHub credential, scoped to that repository',\n description:\n 'On the authorisation screen choose \"Only select repositories\" and pick the one above, with Contents set to read and write. A token scoped to everything is a token the agent did not need.',\n estimate: 'xs',\n assignee: USER,\n },\n {\n title: 'Push the tree, with the deploy and MCP steps written down',\n description:\n 'A README that gets a reader from a clone to a registered MCP server. The wrangler invocation and the URL to register are the two things they cannot guess.',\n estimate: 's',\n },\n ],\n },\n ],\n};\n\nexport type TasksResult = {\n taskSet: TaskSet.TaskSet;\n tasks: Task.Task[];\n root: Task.Task;\n /** The five stages, in order — the level the dependency chain is written across. */\n stages: Task.Task[];\n};\n\n/**\n * Depth-first flatten, recording each task's children so they can be filed under it once stored.\n * The stages are collected on the way down, as the root's children.\n */\nconst buildTasks = (\n seed: TaskSeed,\n): { tasks: Task.Task[]; stages: Task.Task[]; children: Map<Task.Task, Task.Task[]> } => {\n const tasks: Task.Task[] = [];\n const stages: Task.Task[] = [];\n const children = new Map<Task.Task, Task.Task[]>();\n const visit = (seed: TaskSeed, parent: Task.Task | undefined) => {\n const task = Task.make({\n title: seed.title,\n status: 'todo',\n description: seed.description,\n estimate: seed.estimate,\n assignee: seed.assignee,\n // Task carries no due date; its dates are activity-log lines, so that is where they go.\n history: [\n {\n id: EntityId.random(),\n date: daysAgo(0),\n event: 'created' as const,\n description: 'Filed from the chess MCP template.',\n },\n ],\n });\n tasks.push(task);\n if (parent) {\n children.set(parent, [...(children.get(parent) ?? []), task]);\n }\n if (parent === tasks[0]) {\n stages.push(task);\n }\n for (const child of seed.subTasks ?? []) {\n visit(child, task);\n }\n };\n\n visit(seed, undefined);\n return { tasks, stages, children };\n};\n\n/** The plan: one root task, five stages under it, and the steps under those. */\nexport const Tasks: SampleSpace.Phase<TasksResult> = SampleSpace.phase('tasks', {\n schemas: [TaskSet.TaskSet, Task.Task],\n run: () =>\n Effect.gen(function* () {\n const taskSet = yield* Database.add(\n TaskSet.make({\n name: 'Chess MCP on Workers',\n description: 'Everything between the brief and a chat asking the engine for a move.',\n }),\n );\n\n const { tasks, stages, children } = buildTasks(PLAN);\n yield* SampleSpace.children(taskSet, [tasks[0]], (taskSet, refs) => {\n taskSet.tasks = refs;\n });\n for (const [parent, subtasks] of children) {\n yield* SampleSpace.children(parent, subtasks, (parent, refs) => {\n parent.subtasks = refs;\n });\n }\n\n // Each stage depends on the one before it: the stages are sequential by construction (an MCP\n // server cannot be registered before it has a URL), and stating it is what makes a runner\n // working out of order visible rather than merely early.\n for (const [index, stage] of stages.entries()) {\n if (index > 0) {\n const previous = stages[index - 1];\n Obj.update(stage, (stage) => {\n stage.dependsOn = [Ref.make(previous)];\n });\n }\n }\n\n return { taskSet, tasks, root: tasks[0], stages };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\n\nimport type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Ref } from '@dxos/echo';\n\nimport { Docs } from './docs.ts';\nimport { ChessGame } from './game.ts';\nimport { ProjectPhase } from './project.ts';\nimport { DevelopmentSkill } from './skill.ts';\nimport { Tasks } from './tasks.ts';\nimport { REFERENCE } from './util.ts';\n\nconst phases = {\n skill: DevelopmentSkill,\n docs: Docs,\n game: ChessGame,\n tasks: Tasks,\n project: ProjectPhase,\n};\n\n/**\n * A starting point rather than a finished world: the brief for a chess engine exposed as an MCP\n * server on Cloudflare Workers, the plan to build it as a task tree nothing has started on, a\n * position to point the finished thing at, and the development-preferences skill a chat working it\n * runs with.\n *\n * The other space templates depict a project mid-flight; this one is meant to be RUN. Every task is\n * `todo`, the design artifact the first stage produces is deliberately absent, and neither the MCP\n * server record nor a repository is seeded — stages four and five create them.\n *\n * It is deliberately reachable with no credentials but the reader's own DXOS identity: the chat runs\n * DeepSeek through the edge, the first deploy uses wrangler's unauthenticated mode, and the only two\n * consent screens are in the last stage.\n */\nexport const make = (): SampleSpace.Definition<typeof phases, void> =>\n SampleSpace.make({\n // Reaches a space only where the definition is applied directly (the generator panel, the\n // archive test): the create-space dialog takes its icon from `space-templates.ts`, which\n // overrides every template's by list index. See DESIGN.md §7.\n space: { name: 'Chess MCP on Workers', icon: 'shield-star', hue: 'amber' },\n reference: REFERENCE,\n phases,\n build: (phases) =>\n Effect.gen(function* () {\n const skill = yield* phases.skill();\n const docs = yield* phases.docs();\n const game = yield* phases.game();\n const tasks = yield* phases.tasks();\n yield* phases.project({ docs, tasks, skill, game });\n\n // The root holds collections only. Project/TaskSet/Task/Skill/Game are not collection-item\n // types, so they live directly in the space DB and surface through their own containers.\n yield* SampleSpace.collection('Documents', [Ref.make(docs.brief)]);\n }),\n });\n\nexport const makeTemplate = (): AppCapabilities.SpaceTemplate =>\n SampleSpace.makeTemplate({\n id: 'org.dxos.plugin-debug.template.stockfish',\n description:\n 'A brief, a five-stage plan as a task tree, a position to test against, and the skill for building it in a sandbox.',\n definition: make(),\n });\n"],"mappings":"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"}