@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,296 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Args from 'effect/cli/Argument';
6
+ import * as Command from 'effect/cli/Command';
7
+ import * as Flag from 'effect/cli/Flag';
8
+ import * as Console from 'effect/Console';
9
+ import * as Effect from 'effect/Effect';
10
+ import * as Layer from 'effect/Layer';
11
+
12
+ import * as Capabilities from '@dxos/app-framework/Capabilities';
13
+ import * as Capability from '@dxos/app-framework/Capability';
14
+ import type * as Devtools from '@dxos/app-framework/Devtools';
15
+ import * as Plugin from '@dxos/app-framework/Plugin';
16
+ import type * as PluginManager from '@dxos/app-framework/PluginManager';
17
+ import type * as Operation from '@dxos/compute/Operation';
18
+ import { BaseError } from '@dxos/errors';
19
+ import { SpaceId } from '@dxos/keys';
20
+ import { getDebugPortController } from '@dxos/react-client/devtools';
21
+
22
+ import { DebugOperationError } from '../../operations/errors.ts';
23
+
24
+ /**
25
+ * The debug console's command set — the introspection surface an agent uses over the debug port
26
+ * (operations, snapshot, plugin management), driveable by hand. Operations are invoked through the
27
+ * same invoker the agent path uses, so the two surfaces cannot drift.
28
+ */
29
+ export type DebugCli = {
30
+ command: ReturnType<typeof makeCommand>;
31
+ layer: Layer.Layer<Plugin.Service | Capability.Service, never, never>;
32
+ };
33
+
34
+ export type DebugCliOptions = {
35
+ /** Receives each command result as printed — the clipboard source for "copy last result". */
36
+ onResult?: (text: string) => void;
37
+ };
38
+
39
+ const normalizeKey = (key: unknown): string => String(key).replace(/^dxn:/, '');
40
+
41
+ /**
42
+ * The Linear label the PostHog feedback submissions sync under; console-filed issues carry it too
43
+ * so both sources land in one triage view.
44
+ */
45
+ const REPORT_LABEL = 'Composer Feedback Form';
46
+
47
+ const findDefinition = Effect.fn(function* (key: string) {
48
+ const capabilities = (yield* Plugin.Service).capabilities;
49
+ const wanted = normalizeKey(key);
50
+ for (const set of capabilities.getAll(Capabilities.OperationHandler)) {
51
+ const definition = set.definitions().find((candidate) => normalizeKey(candidate.meta.key) === wanted);
52
+ if (definition) {
53
+ return definition;
54
+ }
55
+ }
56
+ return yield* Effect.fail(new DebugOperationError({ message: `Unknown operation: ${key} (try "ops").` }));
57
+ });
58
+
59
+ const invokeOperation = Effect.fn(function* (key: string, input: unknown, spaceId?: SpaceId) {
60
+ const capabilities = (yield* Plugin.Service).capabilities;
61
+ const definition = yield* findDefinition(key);
62
+ const invoker = capabilities.get(Capabilities.OperationInvoker);
63
+ const { data, error } = yield* Effect.promise(() =>
64
+ invoker.invokePromise(definition as Operation.Definition.Any, input as never, spaceId ? { spaceId } : undefined),
65
+ );
66
+ if (error) {
67
+ return yield* Effect.fail(error instanceof BaseError ? error : DebugOperationError.wrap()(error));
68
+ }
69
+ return data;
70
+ });
71
+
72
+ /** Results may hold live objects; a snapshot of what is printable beats a serializer crash. */
73
+ const format = (value: unknown): string => {
74
+ if (value === undefined) {
75
+ return 'undefined';
76
+ }
77
+ if (typeof value === 'string') {
78
+ return value;
79
+ }
80
+ try {
81
+ return JSON.stringify(value, null, 2) ?? String(value);
82
+ } catch {
83
+ return String(value);
84
+ }
85
+ };
86
+
87
+ /**
88
+ * Evaluates a snippet with the same bindings the agent debug port provides (`dxos`, `composer`).
89
+ * Tried as an expression first so `1 + 1` works; statements fall back to an async body.
90
+ */
91
+ const evalSnippet = (code: string): Promise<unknown> => {
92
+ const compile = () => {
93
+ try {
94
+ // eslint-disable-next-line no-implied-eval -- eval is this console's purpose, same as the debug port.
95
+ return new Function('dxos', 'composer', `'use strict'; return (async () => (${code}))();`);
96
+ } catch {
97
+ // eslint-disable-next-line no-implied-eval -- as above; statement-shaped snippets need a body.
98
+ return new Function('dxos', 'composer', `'use strict'; return (async () => { ${code} })();`);
99
+ }
100
+ };
101
+ const composer: Devtools.ComposerDevtools | undefined = globalThis.composer;
102
+ return Promise.resolve(compile()(Reflect.get(globalThis, '__DXOS__'), composer));
103
+ };
104
+
105
+ const makeCommand = (options: DebugCliOptions = {}) => {
106
+ const print = (value: unknown) =>
107
+ Effect.suspend(() => {
108
+ const text = format(value);
109
+ options.onResult?.(text);
110
+ return Console.log(text);
111
+ });
112
+
113
+ const snapshot = Command.make('snapshot', {}, () =>
114
+ Effect.gen(function* () {
115
+ yield* print(yield* invokeOperation('org.dxos.operation.debug.snapshot', {}));
116
+ }),
117
+ ).pipe(Command.withDescription('One JSON document of the live UI state: layout, attention, planks, actions.'));
118
+
119
+ const plugins = Command.make(
120
+ 'plugins',
121
+ {
122
+ all: Flag.Boolean('all').pipe(Flag.withDefault(false), Flag.withDescription('Include disabled plugins.')),
123
+ },
124
+ ({ all }) =>
125
+ Effect.gen(function* () {
126
+ const manager = yield* Plugin.Service;
127
+ const enabled = new Set(manager.getEnabled());
128
+ const active = new Set(manager.getActive());
129
+ const rows = manager
130
+ .getPlugins()
131
+ .map((plugin) => {
132
+ const id = plugin.meta.profile.key;
133
+ return {
134
+ id,
135
+ enabled: enabled.has(id),
136
+ active: plugin.modules.some((module) => active.has(module.id)),
137
+ };
138
+ })
139
+ .filter((row) => all || row.enabled);
140
+ yield* print(rows);
141
+ }),
142
+ ).pipe(Command.withDescription('List plugins on this host.'));
143
+
144
+ const enable = Command.make(
145
+ 'enable',
146
+ {
147
+ ids: Args.String('ids').pipe(Args.withDescription('Plugin ids.'), Args.variadic({ min: 1 })),
148
+ },
149
+ ({ ids }) =>
150
+ Effect.gen(function* () {
151
+ yield* print(yield* invokeOperation('org.dxos.operation.registry.enablePlugins', { ids }));
152
+ }),
153
+ ).pipe(Command.withDescription('Enable plugins (with their dependencies).'));
154
+
155
+ const disable = Command.make(
156
+ 'disable',
157
+ {
158
+ ids: Args.String('ids').pipe(Args.withDescription('Plugin ids.'), Args.variadic({ min: 1 })),
159
+ },
160
+ ({ ids }) =>
161
+ Effect.gen(function* () {
162
+ yield* print(yield* invokeOperation('org.dxos.operation.registry.disablePlugins', { ids }));
163
+ }),
164
+ ).pipe(Command.withDescription('Disable plugins (with their enabled dependents).'));
165
+
166
+ const ops = Command.make(
167
+ 'ops',
168
+ {
169
+ filter: Args.String('filter').pipe(
170
+ Args.withDescription('Substring filter on the key.'),
171
+ Args.variadic({ max: 1 }),
172
+ ),
173
+ },
174
+ ({ filter }) =>
175
+ Effect.gen(function* () {
176
+ const capabilities = (yield* Plugin.Service).capabilities;
177
+ const needle = filter[0]?.toLowerCase();
178
+ const keys = new Set<string>();
179
+ for (const set of capabilities.getAll(Capabilities.OperationHandler)) {
180
+ for (const definition of set.definitions()) {
181
+ const key = normalizeKey(definition.meta.key);
182
+ if (!needle || key.toLowerCase().includes(needle)) {
183
+ keys.add(key);
184
+ }
185
+ }
186
+ }
187
+ yield* print([...keys].sort());
188
+ }),
189
+ ).pipe(Command.withDescription('List invokable operations.'));
190
+
191
+ const invoke = Command.make(
192
+ 'invoke',
193
+ {
194
+ key: Args.String('key').pipe(Args.withDescription('Operation key (bare or dxn: form).')),
195
+ input: Args.String('input').pipe(Args.withDescription('JSON input; defaults to {}.'), Args.variadic({ max: 1 })),
196
+ space: Flag.String('space').pipe(
197
+ Flag.optional,
198
+ Flag.withDescription('Space id, for operations that declare a database service.'),
199
+ ),
200
+ },
201
+ ({ key, input, space }) =>
202
+ Effect.gen(function* () {
203
+ const parsed: unknown = input[0] ? JSON.parse(input[0]) : {};
204
+ const spaceId = space._tag === 'Some' ? SpaceId.make(space.value) : undefined;
205
+ yield* print(yield* invokeOperation(key, parsed, spaceId));
206
+ }),
207
+ ).pipe(Command.withDescription('Invoke an operation with a JSON payload.'));
208
+
209
+ const evaluate = Command.make(
210
+ 'eval',
211
+ {
212
+ code: Args.String('code').pipe(Args.withDescription('JavaScript to evaluate.'), Args.variadic({ min: 1 })),
213
+ },
214
+ ({ code }) =>
215
+ Effect.gen(function* () {
216
+ yield* print(yield* Effect.promise(() => evalSnippet(code.join(' '))));
217
+ }),
218
+ ).pipe(Command.withDescription('Evaluate a snippet with `dxos` and `composer` in scope.'));
219
+
220
+ const report = Command.make(
221
+ 'report',
222
+ {
223
+ title: Args.String('title').pipe(Args.withDescription('Issue title.'), Args.variadic({ min: 1 })),
224
+ body: Flag.String('body').pipe(Flag.optional, Flag.withDescription('Issue body; defaults to the title.')),
225
+ type: Flag.String('type').pipe(Flag.optional, Flag.withDescription('bug | feature.')),
226
+ severity: Flag.String('severity').pipe(
227
+ Flag.optional,
228
+ Flag.withDescription('"High priority" | "Medium priority" | "Low priority".'),
229
+ ),
230
+ label: Flag.String('label').pipe(
231
+ Flag.optional,
232
+ Flag.withDescription(`Linear label; defaults to "${REPORT_LABEL}".`),
233
+ ),
234
+ noLogs: Flag.Boolean('no-logs').pipe(Flag.withDefault(false), Flag.withDescription('Skip the debug log dump.')),
235
+ },
236
+ ({ title, body, type, severity, label, noLogs }) =>
237
+ Effect.gen(function* () {
238
+ const heading = title.join(' ');
239
+ const result = yield* invokeOperation('org.dxos.operation.support.submitIssue', {
240
+ report: {
241
+ title: heading,
242
+ // The report schema requires a description, so a bare `report <title>` repeats the title.
243
+ body: body._tag === 'Some' && body.value.trim() ? body.value : heading,
244
+ ...(type._tag === 'Some' ? { type: type.value } : {}),
245
+ ...(severity._tag === 'Some' ? { severity: severity.value } : {}),
246
+ labels: [label._tag === 'Some' ? label.value : REPORT_LABEL],
247
+ includeLogs: !noLogs,
248
+ },
249
+ });
250
+ const issue = result as { issueIdentifier?: string; issueUrl?: string } | undefined;
251
+ yield* print(issue?.issueUrl ? `${issue.issueIdentifier} ${issue.issueUrl}` : result);
252
+ }),
253
+ ).pipe(Command.withDescription('File a Linear issue with the logs attached.'), Command.unlisted);
254
+
255
+ const port = Command.make(
256
+ 'port',
257
+ {
258
+ action: Args.String('action').pipe(
259
+ Args.withDescription('start | stop; omit for status.'),
260
+ Args.variadic({ max: 1 }),
261
+ ),
262
+ },
263
+ ({ action }) =>
264
+ Effect.gen(function* () {
265
+ const controller = getDebugPortController();
266
+ switch (action[0]) {
267
+ case 'start': {
268
+ const session = controller.start({ persist: true });
269
+ yield* print(`Session: ${session}`);
270
+ break;
271
+ }
272
+ case 'stop': {
273
+ controller.stop();
274
+ yield* print('Stopped.');
275
+ break;
276
+ }
277
+ default: {
278
+ yield* print(controller.getStatus());
279
+ }
280
+ }
281
+ }),
282
+ ).pipe(Command.withDescription('Agent debug port: status, start, stop.'));
283
+
284
+ return Command.make('debug').pipe(
285
+ Command.withDescription('Composer debug console.'),
286
+ Command.withSubcommands([snapshot, plugins, enable, disable, ops, invoke, evaluate, report, port]),
287
+ );
288
+ };
289
+
290
+ export const createDebugCli = (manager: PluginManager.PluginManager, options?: DebugCliOptions): DebugCli => ({
291
+ command: makeCommand(options),
292
+ layer: Layer.mergeAll(
293
+ Layer.succeed(Plugin.Service, manager),
294
+ Layer.succeed(Capability.Service, manager.capabilities),
295
+ ),
296
+ });
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export * from './DebugConsole.tsx';
@@ -4,13 +4,15 @@
4
4
 
5
5
  import React, { useMemo, useState } from 'react';
6
6
 
7
- import { AppSurface } from '@dxos/app-toolkit/ui';
7
+ import * as AppSurface from '@dxos/app-toolkit/AppSurface';
8
8
  import { ObjectsTree } from '@dxos/devtools';
9
9
  import { type Entity, Filter, Json, Obj, Query } from '@dxos/echo';
10
10
  import { useQuery } from '@dxos/echo-react';
11
11
  import type { EntityId } from '@dxos/keys';
12
- import { Clipboard, Panel, ScrollArea, Toolbar } from '@dxos/react-ui';
13
12
  import { Syntax } from '@dxos/react-ui-syntax-highlighter';
13
+ import * as Panel from '@dxos/react-ui/Panel';
14
+ import * as ScrollArea from '@dxos/react-ui/ScrollArea';
15
+ import * as Toolbar from '@dxos/react-ui/Toolbar';
14
16
  import { mx } from '@dxos/ui-theme';
15
17
 
16
18
  export type DebugObjectPanelProps = Pick<
@@ -37,48 +39,46 @@ export const DebugObjectPanel = ({ role, companionTo, onOpen, canOpen }: DebugOb
37
39
  const [selectedObject] = useQuery(db, selectionQuery);
38
40
 
39
41
  return (
40
- <Clipboard.Provider>
41
- <Panel.Root role={role}>
42
- <Panel.Toolbar asChild>
43
- <Toolbar.Root />
44
- </Panel.Toolbar>
45
- <Panel.Content asChild>
46
- <div className={mx('grid divide-y divide-subdued-separator', db && 'grid-rows-[1fr_2fr]')}>
47
- {db && (
48
- <ScrollArea.Root>
49
- <ScrollArea.Viewport>
50
- <ObjectsTree
51
- db={db}
52
- root={companionTo}
53
- onSelect={(entity) => setSelectedId(entity.id)}
54
- onOpen={onOpen}
55
- canOpen={canOpen}
56
- />
57
- </ScrollArea.Viewport>
58
- </ScrollArea.Root>
59
- )}
60
- <Syntax.Root
61
- data={selectedObject}
62
- getReplacer={(depth) => (db ? Json.createRefReplacer({ db, depth }) : undefined)}
63
- >
64
- <Panel.Root>
65
- <Panel.Toolbar asChild>
66
- <Toolbar.Root classNames='grid grid-cols-[1fr_3rem]'>
67
- <Syntax.Filter />
68
- <Syntax.Depth />
69
- </Toolbar.Root>
70
- </Panel.Toolbar>
71
- <Panel.Content asChild>
72
- <Syntax.Viewport>
73
- <Syntax.Code />
74
- </Syntax.Viewport>
75
- </Panel.Content>
76
- </Panel.Root>
77
- </Syntax.Root>
78
- </div>
79
- </Panel.Content>
80
- </Panel.Root>
81
- </Clipboard.Provider>
42
+ <Panel.Root role={role}>
43
+ <Panel.Header>
44
+ <Toolbar.Root />
45
+ </Panel.Header>
46
+ <Panel.Body asChild>
47
+ <div className={mx('grid divide-y divide-separator-subtle', db && 'grid-rows-[1fr_2fr]')}>
48
+ {db && (
49
+ <ScrollArea.Root>
50
+ <ScrollArea.Viewport>
51
+ <ObjectsTree
52
+ db={db}
53
+ root={companionTo}
54
+ onSelect={(entity) => setSelectedId(entity.id)}
55
+ onOpen={onOpen}
56
+ canOpen={canOpen}
57
+ />
58
+ </ScrollArea.Viewport>
59
+ </ScrollArea.Root>
60
+ )}
61
+ <Syntax.Root
62
+ data={selectedObject}
63
+ getReplacer={(depth) => (db ? Json.createRefReplacer({ db, depth }) : undefined)}
64
+ >
65
+ <Panel.Root>
66
+ <Panel.Header>
67
+ <Toolbar.Root classNames='grid grid-cols-[1fr_6rem]'>
68
+ <Syntax.Filter />
69
+ <Syntax.Depth />
70
+ </Toolbar.Root>
71
+ </Panel.Header>
72
+ <Panel.Body asChild>
73
+ <Syntax.Viewport>
74
+ <Syntax.Code />
75
+ </Syntax.Viewport>
76
+ </Panel.Body>
77
+ </Panel.Root>
78
+ </Syntax.Root>
79
+ </div>
80
+ </Panel.Body>
81
+ </Panel.Root>
82
82
  );
83
83
  };
84
84
 
@@ -2,4 +2,4 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- export { DebugObjectPanel as default } from './DebugObjectPanel';
5
+ export { DebugObjectPanel as default } from './DebugObjectPanel.tsx';
@@ -0,0 +1,118 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React from 'react';
7
+ import { expect, userEvent, within } from 'storybook/test';
8
+
9
+ import { withPluginManager } from '@dxos/app-framework/testing';
10
+ import * as CorePlugins from '@dxos/plugin-testing/CorePlugins';
11
+ import { Path } from '@dxos/react-ui-list';
12
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
13
+
14
+ import { translations } from '#translations';
15
+ import { DebugNodes } from '#types';
16
+
17
+ import * as DebugPlugin from '../../DebugPlugin.ts';
18
+ import { STUB_TOOL_PAGES, STUB_TOOLS_BRANCH, StubToolsPlugin } from '../../testing/index.ts';
19
+ import { DebugPanel, type DebugPanelRootProps } from './DebugPanel.tsx';
20
+ import { type DebugPanelViewState, debugPanelAspect } from './view-state.ts';
21
+
22
+ /**
23
+ * The body as every host splits it, sized by the story: the tree over the hidden debug category
24
+ * beside the selected tool's article. Selection and open branches come from persisted view state,
25
+ * so choosing a tool here survives a reload of the story.
26
+ */
27
+ const Render = (props: DebugPanelRootProps) => (
28
+ <div className='h-[24rem] w-[64rem] max-w-full grid'>
29
+ <DebugPanel.Root {...props}>
30
+ <DebugPanel.Body />
31
+ </DebugPanel.Root>
32
+ </div>
33
+ );
34
+
35
+ const meta = {
36
+ title: 'plugins/plugin-debug/containers/DebugPanel',
37
+ component: DebugPanel.Root,
38
+ render: Render,
39
+ decorators: [
40
+ // The attention core plugin provides the view state the selection persists through; the debug
41
+ // plugin contributes the console and log pages and their articles; the stub adds a branch.
42
+ withPluginManager({ plugins: [...CorePlugins.make(), DebugPlugin.make(), StubToolsPlugin()] }),
43
+ withTheme(),
44
+ withLayout({ layout: 'centered' }),
45
+ ],
46
+ parameters: { translations },
47
+ } satisfies Meta<typeof DebugPanel.Root>;
48
+
49
+ export default meta;
50
+
51
+ type Story = StoryObj<typeof meta>;
52
+
53
+ /** Its own context, so exercising the story does not decide which tool the app's rail opens on. */
54
+ export const Default: Story = {
55
+ args: { contextId: 'debug-panel-story' },
56
+ };
57
+
58
+ /**
59
+ * Console, then Logs, then a stub page under the branch, then the console again: the console stays
60
+ * mounted (hidden) throughout, while the stub page is gone once it is no longer selected.
61
+ */
62
+ export const Select: Story = {
63
+ args: { contextId: 'debug-panel-story-select' },
64
+ play: async ({ canvasElement }) => {
65
+ const canvas = within(canvasElement);
66
+ const tree = await canvas.findByRole('tree', {}, { timeout: 10_000 });
67
+ await userEvent.click(await within(tree).findByText('Console', {}, { timeout: 10_000 }));
68
+ const terminal = await canvas.findByRole('textbox', {}, { timeout: 10_000 });
69
+ await expect(terminal).toBeInTheDocument();
70
+
71
+ // The terminal's input is xterm's transparent helper, so visibility is read off the page's show/hide element.
72
+ await userEvent.click(await within(tree).findByText('Logs', {}, { timeout: 10_000 }));
73
+ await expect(terminal.closest('[hidden]')).not.toBeNull();
74
+
75
+ const [page] = STUB_TOOL_PAGES;
76
+ await userEvent.click(await within(tree).findByText('Tools', {}, { timeout: 10_000 }));
77
+ await userEvent.click(await within(tree).findByText(page.label, {}, { timeout: 10_000 }));
78
+ const stubPage = await canvas.findByTestId(`stubTool.${page.id}`, {}, { timeout: 10_000 });
79
+ await expect(stubPage).toBeVisible();
80
+ // The same console element is still there behind the page shown.
81
+ await expect(terminal).toBeInTheDocument();
82
+
83
+ await userEvent.click(await within(tree).findByText('Console', {}, { timeout: 10_000 }));
84
+ await expect(terminal.closest('[hidden]')).toBeNull();
85
+ // A page that is not the console or logs is mounted only while it is selected.
86
+ await expect(stubPage).not.toBeInTheDocument();
87
+ },
88
+ };
89
+
90
+ const RESTORE_CONTEXT = 'debug-panel-story-restore';
91
+
92
+ /** What the local backend persists for a context: the tree's open keys carry its id (`Tree` appends it to the path). */
93
+ const restoredState: DebugPanelViewState = {
94
+ nodeId: `${DebugNodes.DEBUG_ROOT_ID}/${STUB_TOOLS_BRANCH}/${STUB_TOOL_PAGES[1].id}`,
95
+ open: [Path.create(DebugNodes.DEBUG_ROOT_ID, RESTORE_CONTEXT, `${DebugNodes.DEBUG_ROOT_ID}/${STUB_TOOLS_BRANCH}`)],
96
+ };
97
+
98
+ /**
99
+ * A reload with a page selected under an open branch: the branch's pages come from a connector that
100
+ * only runs on expansion, so the panel has to expand what the persisted state names before either
101
+ * the row or the page can render.
102
+ */
103
+ export const Restore: Story = {
104
+ args: { contextId: RESTORE_CONTEXT },
105
+ loaders: [
106
+ () => {
107
+ localStorage.setItem(`dxos:view-state:${debugPanelAspect.key}:${RESTORE_CONTEXT}`, JSON.stringify(restoredState));
108
+ },
109
+ ],
110
+ play: async ({ canvasElement }) => {
111
+ const canvas = within(canvasElement);
112
+ const page = STUB_TOOL_PAGES[1];
113
+ await expect(await canvas.findByTestId(`stubTool.${page.id}`, {}, { timeout: 10_000 })).toBeVisible();
114
+ const tree = await canvas.findByRole('tree', {}, { timeout: 10_000 });
115
+ const row = (await within(tree).findByText(page.label, {}, { timeout: 10_000 })).closest('[role="treeitem"]');
116
+ await expect(row).toHaveAttribute('aria-selected', 'true');
117
+ },
118
+ };
@@ -0,0 +1,72 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import React, { type PropsWithChildren, useCallback, useMemo } from 'react';
6
+
7
+ import { useViewState, useViewStateActions } from '@dxos/react-ui-attention';
8
+ import * as Splitter from '@dxos/react-ui/Splitter';
9
+
10
+ import { DebugPanelContext, type DebugPanelContextValue } from './DebugPanelContext.ts';
11
+ import { DebugPanelMain } from './DebugPanelMain.tsx';
12
+ import { DebugPanelSidebar } from './DebugPanelSidebar.tsx';
13
+ import { DEBUG_PANEL_CONTEXT, type DebugPanelMode, debugPanelAspect } from './view-state.ts';
14
+
15
+ export type DebugPanelRootProps = PropsWithChildren<{
16
+ /** Overridable so a second host (or a story) gets its own selection rather than the rail's. */
17
+ contextId?: string;
18
+ }>;
19
+
20
+ /**
21
+ * The debug surface in parts, so a host places the tree and the page where the room is — the
22
+ * floating window and the deck's drawer both split them under a title bar. `Root` owns the
23
+ * selection, the expanded branches and the mode, persisted so a debugging session survives the
24
+ * reloads it provokes.
25
+ */
26
+ const DebugPanelRoot = ({ contextId = DEBUG_PANEL_CONTEXT, children }: DebugPanelRootProps) => {
27
+ const { nodeId, open, mode = 'docked' } = useViewState(debugPanelAspect, contextId);
28
+ const { update } = useViewStateActions(debugPanelAspect, contextId);
29
+ const select = useCallback((nodeId: string) => update((prev) => ({ ...prev, nodeId })), [update]);
30
+ const setOpen = useCallback(
31
+ (pathKey: string, isOpen: boolean) =>
32
+ update((prev) => ({
33
+ ...prev,
34
+ open: isOpen ? [...new Set([...prev.open, pathKey])] : prev.open.filter((key) => key !== pathKey),
35
+ })),
36
+ [update],
37
+ );
38
+ const setMode = useCallback((mode: DebugPanelMode) => update((prev) => ({ ...prev, mode })), [update]);
39
+ const value = useMemo<DebugPanelContextValue>(
40
+ () => ({ contextId, nodeId, open, mode, select, setOpen, setMode }),
41
+ [contextId, nodeId, open, mode, select, setOpen, setMode],
42
+ );
43
+
44
+ return <DebugPanelContext.Provider value={value}>{children}</DebugPanelContext.Provider>;
45
+ };
46
+
47
+ DebugPanelRoot.displayName = 'DebugPanel.Root';
48
+
49
+ /** The tree's opening width (rem): a navtree sidebar's, so tool labels read at the scale they do there. */
50
+ const SIDEBAR_SIZE = 16;
51
+
52
+ /** The tree beside the selected tool's page, split the same way in every host. */
53
+ const DebugPanelBody = () => (
54
+ <Splitter.Root orientation='horizontal' anchor='start' resizable defaultSize={SIDEBAR_SIZE} minSize={8}>
55
+ <Splitter.Panel position='start'>
56
+ <DebugPanelSidebar />
57
+ </Splitter.Panel>
58
+ <Splitter.ResizeTrigger />
59
+ <Splitter.Panel position='end'>
60
+ <DebugPanelMain />
61
+ </Splitter.Panel>
62
+ </Splitter.Root>
63
+ );
64
+
65
+ DebugPanelBody.displayName = 'DebugPanel.Body';
66
+
67
+ export const DebugPanel = {
68
+ Root: DebugPanelRoot,
69
+ Body: DebugPanelBody,
70
+ Sidebar: DebugPanelSidebar,
71
+ Main: DebugPanelMain,
72
+ };
@@ -0,0 +1,33 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { createContext, useContext } from 'react';
6
+
7
+ import { type DebugPanelMode } from './view-state.ts';
8
+
9
+ // Kept out of `DebugPanel.tsx`: the sidebar and main parts read the context the root provides, and
10
+ // a module importing its own importers is a cycle.
11
+
12
+ export type DebugPanelContextValue = {
13
+ contextId: string;
14
+ /** Qualified id of the selected page. */
15
+ nodeId?: string;
16
+ /** Joined paths of the expanded branches. */
17
+ open: readonly string[];
18
+ /** Where the panel is hosted; the hosts read it to decide which of them shows. */
19
+ mode: DebugPanelMode;
20
+ select: (nodeId: string) => void;
21
+ setOpen: (pathKey: string, open: boolean) => void;
22
+ setMode: (mode: DebugPanelMode) => void;
23
+ };
24
+
25
+ export const DebugPanelContext = createContext<DebugPanelContextValue | null>(null);
26
+
27
+ export const useDebugPanelContext = (): DebugPanelContextValue => {
28
+ const value = useContext(DebugPanelContext);
29
+ if (!value) {
30
+ throw new Error('Missing DebugPanelContext');
31
+ }
32
+ return value;
33
+ };