@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.
- package/PLUGIN.mdl +241 -3
- package/README.md +27 -3
- package/dist/lib/Debug.mjs.map +1 -1
- package/dist/lib/DebugNodes.mjs +21 -2
- package/dist/lib/DebugNodes.mjs.map +1 -1
- package/dist/lib/DebugOperation.mjs +166 -2
- package/dist/lib/DebugOperation.mjs.map +1 -1
- package/dist/lib/DebugPlugin.mjs.map +1 -1
- package/dist/lib/DebugSurface.mjs +7 -2
- package/dist/lib/DebugSurface.mjs.map +1 -1
- package/dist/lib/IncidentSpace.mjs +2 -0
- package/dist/lib/PipelineSpace.mjs +2 -0
- package/dist/lib/ReviewSpace.mjs +2 -0
- package/dist/lib/StockfishSpace.mjs +2 -0
- package/dist/lib/TidepoolSpace.mjs +2 -0
- package/dist/lib/WeatherSpace.mjs +2 -0
- package/dist/lib/WorkerSpace.mjs +2 -0
- package/dist/lib/capabilities.browser.mjs +71 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +17 -7
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +13 -3
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +71 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +3 -1
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/chunk-DebugConsole.mjs +241 -0
- package/dist/lib/chunk-DebugConsole.mjs.map +1 -0
- package/dist/lib/chunk-DebugObjectPanel.mjs +12 -16
- package/dist/lib/chunk-DebugObjectPanel.mjs.map +1 -1
- package/dist/lib/chunk-DebugPanelDrawer.mjs +48 -0
- package/dist/lib/chunk-DebugPanelDrawer.mjs.map +1 -0
- package/dist/lib/chunk-DebugPanelHeader.mjs +280 -0
- package/dist/lib/chunk-DebugPanelHeader.mjs.map +1 -0
- package/dist/lib/chunk-DebugPanelStatus.mjs +127 -0
- package/dist/lib/chunk-DebugPanelStatus.mjs.map +1 -0
- package/dist/lib/chunk-DebugSettings.mjs +81 -70
- package/dist/lib/chunk-DebugSettings.mjs.map +1 -1
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +21 -12
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs.map +1 -1
- package/dist/lib/chunk-DebugStatus.mjs +12 -12
- package/dist/lib/chunk-DebugStatus.mjs.map +1 -1
- package/dist/lib/chunk-IncidentSpace.mjs +269 -0
- package/dist/lib/chunk-IncidentSpace.mjs.map +1 -0
- package/dist/lib/chunk-LoggerPanel.mjs +18 -0
- package/dist/lib/chunk-LoggerPanel.mjs.map +1 -0
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/chunk-PipelineSpace.mjs +378 -0
- package/dist/lib/chunk-PipelineSpace.mjs.map +1 -0
- package/dist/lib/chunk-ReviewSpace.mjs +356 -0
- package/dist/lib/chunk-ReviewSpace.mjs.map +1 -0
- package/dist/lib/chunk-SpaceGenerator.mjs +107 -73
- package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -1
- package/dist/lib/chunk-StatsPanel.mjs +28 -35
- package/dist/lib/chunk-StatsPanel.mjs.map +1 -1
- package/dist/lib/chunk-StockfishSpace.mjs +563 -0
- package/dist/lib/chunk-StockfishSpace.mjs.map +1 -0
- package/dist/lib/chunk-TidepoolSpace.mjs +544 -0
- package/dist/lib/chunk-TidepoolSpace.mjs.map +1 -0
- package/dist/lib/chunk-WeatherSpace.mjs +206 -0
- package/dist/lib/chunk-WeatherSpace.mjs.map +1 -0
- package/dist/lib/chunk-Wireframe.mjs +6 -6
- package/dist/lib/chunk-Wireframe.mjs.map +1 -1
- package/dist/lib/chunk-WorkerSpace.mjs +177 -0
- package/dist/lib/chunk-WorkerSpace.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +72 -40
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-create-space-from-template.mjs +55 -0
- package/dist/lib/chunk-create-space-from-template.mjs.map +1 -0
- package/dist/lib/chunk-errors.mjs +13 -0
- package/dist/lib/chunk-errors.mjs.map +1 -0
- package/dist/lib/chunk-graph-retention.mjs +14 -0
- package/dist/lib/chunk-graph-retention.mjs.map +1 -0
- package/dist/lib/chunk-insert-lorem-ipsum.mjs +2 -2
- package/dist/lib/chunk-log-recording.mjs +29 -1
- package/dist/lib/chunk-log-recording.mjs.map +1 -1
- package/dist/lib/chunk-open-page.mjs +29 -0
- package/dist/lib/chunk-open-page.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +5 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +73 -71
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-settings.mjs +2 -2
- package/dist/lib/chunk-settings.mjs.map +1 -1
- package/dist/lib/chunk-snapshot.mjs +170 -0
- package/dist/lib/chunk-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-space-templates.mjs +21 -0
- package/dist/lib/chunk-space-templates.mjs.map +1 -0
- package/dist/lib/chunk-stats-panel.mjs +1 -1
- package/dist/lib/chunk-stats-panel.mjs.map +1 -1
- package/dist/lib/chunk-undo.mjs +17 -0
- package/dist/lib/chunk-undo.mjs.map +1 -0
- package/dist/lib/chunk-view-state.mjs +37 -0
- package/dist/lib/chunk-view-state.mjs.map +1 -0
- package/dist/lib/components.mjs +68 -28
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/containers.mjs +5 -2
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +8 -2
- package/dist/lib/meta.mjs +3 -2
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/operations.mjs +7 -1
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/plugin.mjs +2 -2
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/translations.mjs +13 -4
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/scripts/build-template-archive.d.ts +2 -0
- package/dist/types/scripts/build-template-archive.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -2
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/DebugSurfaces.d.ts +4 -5
- package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +31 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts +2 -0
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +14 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts +2 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +14 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +2 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/graph-retention.d.ts +5 -0
- package/dist/types/src/capabilities/graph-retention.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +2 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/log-recording.d.ts +4 -0
- package/dist/types/src/capabilities/log-recording.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/space-templates.d.ts +14 -0
- package/dist/types/src/capabilities/space-templates.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts +4 -3
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SchemaTable/index.d.ts +1 -1
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts +12 -0
- package/dist/types/src/containers/DebugConsole/DebugConsole.d.ts.map +1 -0
- package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts +103 -0
- package/dist/types/src/containers/DebugConsole/DebugConsole.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugConsole/cli.d.ts +24 -0
- package/dist/types/src/containers/DebugConsole/cli.d.ts.map +1 -0
- package/dist/types/src/containers/DebugConsole/index.d.ts +2 -0
- package/dist/types/src/containers/DebugConsole/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts +30 -0
- package/dist/types/src/containers/DebugPanel/DebugPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts +126 -0
- package/dist/types/src/containers/DebugPanel/DebugPanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts +16 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelContext.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts +14 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelHeader.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts +6 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelMain.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts +6 -0
- package/dist/types/src/containers/DebugPanel/DebugPanelSidebar.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/index.d.ts +7 -0
- package/dist/types/src/containers/DebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanel/view-state.d.ts +46 -0
- package/dist/types/src/containers/DebugPanel/view-state.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts +10 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts +114 -0
- package/dist/types/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelDrawer/index.d.ts +2 -0
- package/dist/types/src/containers/DebugPanelDrawer/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts +11 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts +107 -0
- package/dist/types/src/containers/DebugPanelStatus/DebugPanelStatus.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPanelStatus/index.d.ts +2 -0
- package/dist/types/src/containers/DebugPanelStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts +13 -4
- package/dist/types/src/containers/DebugPortSettings/DebugPortSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DebugPortSettings/index.d.ts +1 -1
- package/dist/types/src/containers/DebugPortSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +2 -2
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +14 -5
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts +1 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts +6 -0
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.d.ts.map +1 -0
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts +107 -0
- package/dist/types/src/containers/LoggerPanel/LoggerPanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/LoggerPanel/index.d.ts +2 -0
- package/dist/types/src/containers/LoggerPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts +13 -4
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts +5 -1
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/StatsPanel/index.d.ts +1 -1
- package/dist/types/src/containers/StatsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts +2 -2
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +7 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +123 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/DebugOperationHandlerSet.d.ts.map +1 -1
- package/dist/types/src/operations/create-space-from-template.d.ts +5 -0
- package/dist/types/src/operations/create-space-from-template.d.ts.map +1 -0
- package/dist/types/src/operations/errors.d.ts +33 -0
- package/dist/types/src/operations/errors.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open-page.d.ts +5 -0
- package/dist/types/src/operations/open-page.d.ts.map +1 -0
- package/dist/types/src/operations/snapshot.d.ts +5 -0
- package/dist/types/src/operations/snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/snapshot.test.d.ts +2 -0
- package/dist/types/src/operations/snapshot.test.d.ts.map +1 -0
- package/dist/types/src/operations/undo.d.ts +5 -0
- package/dist/types/src/operations/undo.d.ts.map +1 -0
- package/dist/types/src/operations/undo.test.d.ts +2 -0
- package/dist/types/src/operations/undo.test.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/samples/crm/PipelineSpace.d.ts +21 -0
- package/dist/types/src/samples/crm/PipelineSpace.d.ts.map +1 -0
- package/dist/types/src/samples/crm/PipelineSpace.test.d.ts +2 -0
- package/dist/types/src/samples/crm/PipelineSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/crm/accounts.d.ts +55 -0
- package/dist/types/src/samples/crm/accounts.d.ts.map +1 -0
- package/dist/types/src/samples/crm/inbox.d.ts +14 -0
- package/dist/types/src/samples/crm/inbox.d.ts.map +1 -0
- package/dist/types/src/samples/crm/pipeline.d.ts +9 -0
- package/dist/types/src/samples/crm/pipeline.d.ts.map +1 -0
- package/dist/types/src/samples/crm/util.d.ts +14 -0
- package/dist/types/src/samples/crm/util.d.ts.map +1 -0
- package/dist/types/src/samples/incident/IncidentSpace.d.ts +21 -0
- package/dist/types/src/samples/incident/IncidentSpace.d.ts.map +1 -0
- package/dist/types/src/samples/incident/IncidentSpace.test.d.ts +2 -0
- package/dist/types/src/samples/incident/IncidentSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/incident/docs.d.ts +14 -0
- package/dist/types/src/samples/incident/docs.d.ts.map +1 -0
- package/dist/types/src/samples/incident/project.d.ts +16 -0
- package/dist/types/src/samples/incident/project.d.ts.map +1 -0
- package/dist/types/src/samples/incident/tasks.d.ts +9 -0
- package/dist/types/src/samples/incident/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/incident/util.d.ts +32 -0
- package/dist/types/src/samples/incident/util.d.ts.map +1 -0
- package/dist/types/src/samples/index.d.ts +8 -0
- package/dist/types/src/samples/index.d.ts.map +1 -0
- package/dist/types/src/samples/review/ReviewSpace.d.ts +19 -0
- package/dist/types/src/samples/review/ReviewSpace.d.ts.map +1 -0
- package/dist/types/src/samples/review/ReviewSpace.test.d.ts +2 -0
- package/dist/types/src/samples/review/ReviewSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/review/assets.d.ts +19 -0
- package/dist/types/src/samples/review/assets.d.ts.map +1 -0
- package/dist/types/src/samples/review/util.d.ts +4 -0
- package/dist/types/src/samples/review/util.d.ts.map +1 -0
- package/dist/types/src/samples/review/work.d.ts +15 -0
- package/dist/types/src/samples/review/work.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.d.ts +27 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts +2 -0
- package/dist/types/src/samples/stockfish/StockfishSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/docs.d.ts +8 -0
- package/dist/types/src/samples/stockfish/docs.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/game.d.ts +10 -0
- package/dist/types/src/samples/stockfish/game.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/project.d.ts +31 -0
- package/dist/types/src/samples/stockfish/project.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/run.test.d.ts +2 -0
- package/dist/types/src/samples/stockfish/run.test.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/skill.d.ts +8 -0
- package/dist/types/src/samples/stockfish/skill.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/tasks.d.ts +12 -0
- package/dist/types/src/samples/stockfish/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/stockfish/util.d.ts +14 -0
- package/dist/types/src/samples/stockfish/util.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts +22 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts +2 -0
- package/dist/types/src/samples/tidepool/TidepoolSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/docs.d.ts +12 -0
- package/dist/types/src/samples/tidepool/docs.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/project.d.ts +20 -0
- package/dist/types/src/samples/tidepool/project.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/tasks.d.ts +14 -0
- package/dist/types/src/samples/tidepool/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/team.d.ts +9 -0
- package/dist/types/src/samples/tidepool/team.d.ts.map +1 -0
- package/dist/types/src/samples/tidepool/util.d.ts +14 -0
- package/dist/types/src/samples/tidepool/util.d.ts.map +1 -0
- package/dist/types/src/samples/weather/WeatherSpace.d.ts +21 -0
- package/dist/types/src/samples/weather/WeatherSpace.d.ts.map +1 -0
- package/dist/types/src/samples/weather/WeatherSpace.test.d.ts +2 -0
- package/dist/types/src/samples/weather/WeatherSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/weather/project.d.ts +20 -0
- package/dist/types/src/samples/weather/project.d.ts.map +1 -0
- package/dist/types/src/samples/weather/skill.d.ts +12 -0
- package/dist/types/src/samples/weather/skill.d.ts.map +1 -0
- package/dist/types/src/samples/weather/tasks.d.ts +9 -0
- package/dist/types/src/samples/weather/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/weather/util.d.ts +16 -0
- package/dist/types/src/samples/weather/util.d.ts.map +1 -0
- package/dist/types/src/samples/worker/WorkerSpace.d.ts +22 -0
- package/dist/types/src/samples/worker/WorkerSpace.d.ts.map +1 -0
- package/dist/types/src/samples/worker/WorkerSpace.test.d.ts +2 -0
- package/dist/types/src/samples/worker/WorkerSpace.test.d.ts.map +1 -0
- package/dist/types/src/samples/worker/project.d.ts +18 -0
- package/dist/types/src/samples/worker/project.d.ts.map +1 -0
- package/dist/types/src/samples/worker/tasks.d.ts +9 -0
- package/dist/types/src/samples/worker/tasks.d.ts.map +1 -0
- package/dist/types/src/samples/worker/util.d.ts +14 -0
- package/dist/types/src/samples/worker/util.d.ts.map +1 -0
- package/dist/types/src/stories/SpaceTemplates.stories.d.ts +114 -0
- package/dist/types/src/stories/SpaceTemplates.stories.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/stub-drawer-plugin.d.ts +8 -0
- package/dist/types/src/testing/stub-drawer-plugin.d.ts.map +1 -0
- package/dist/types/src/testing/stub-tools-plugin.d.ts +19 -0
- package/dist/types/src/testing/stub-tools-plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +13 -4
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Debug.d.ts +2 -2
- package/dist/types/src/types/Debug.d.ts.map +1 -1
- package/dist/types/src/types/DebugNodes.d.ts +13 -1
- package/dist/types/src/types/DebugNodes.d.ts.map +1 -1
- package/dist/types/src/types/DebugOperation.d.ts +119 -0
- package/dist/types/src/types/DebugOperation.d.ts.map +1 -1
- package/dist/types/src/types/DebugSurface.d.ts +7 -0
- package/dist/types/src/types/DebugSurface.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +6 -6
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +3 -2
- package/package.json +129 -73
- package/scripts/build-template-archive.ts +65 -0
- package/src/DebugPlugin.ts +1 -1
- package/src/capabilities/DebugSurfaces.tsx +85 -71
- package/src/capabilities/app-graph-builder.test.ts +45 -0
- package/src/capabilities/app-graph-builder.ts +83 -46
- package/src/capabilities/gen/browser.ts +85 -0
- package/src/capabilities/gen/node.ts +15 -8
- package/src/capabilities/gen/tauri.ts +85 -0
- package/src/capabilities/gen/workerd.ts +11 -4
- package/src/capabilities/graph-retention.ts +23 -0
- package/src/capabilities/index.ts +18 -10
- package/src/capabilities/log-recording.ts +20 -1
- package/src/capabilities/operation-handler.ts +9 -0
- package/src/capabilities/react-surface.ts +33 -29
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/space-templates.ts +25 -0
- package/src/capabilities/stats-panel.ts +1 -1
- package/src/components/SchemaTable/SchemaTable.tsx +44 -10
- package/src/components/SchemaTable/index.ts +1 -1
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +22 -2
- package/src/components/SpaceGenerator/index.ts +2 -2
- package/src/components/SpaceGenerator/presets.ts +4 -4
- package/src/components/index.ts +2 -2
- package/src/containers/DebugConsole/DebugConsole.stories.tsx +29 -0
- package/src/containers/DebugConsole/DebugConsole.tsx +94 -0
- package/src/containers/DebugConsole/cli.ts +296 -0
- package/src/containers/DebugConsole/index.ts +5 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +44 -44
- package/src/containers/DebugObjectPanel/index.ts +1 -1
- package/src/containers/DebugPanel/DebugPanel.stories.tsx +118 -0
- package/src/containers/DebugPanel/DebugPanel.tsx +72 -0
- package/src/containers/DebugPanel/DebugPanelContext.ts +33 -0
- package/src/containers/DebugPanel/DebugPanelHeader.tsx +54 -0
- package/src/containers/DebugPanel/DebugPanelMain.tsx +116 -0
- package/src/containers/DebugPanel/DebugPanelSidebar.tsx +123 -0
- package/src/containers/DebugPanel/index.ts +10 -0
- package/src/containers/DebugPanel/view-state.ts +60 -0
- package/src/containers/DebugPanelDrawer/DebugPanelDrawer.stories.tsx +92 -0
- package/src/containers/DebugPanelDrawer/DebugPanelDrawer.tsx +72 -0
- package/src/containers/DebugPanelDrawer/index.ts +5 -0
- package/src/containers/DebugPanelStatus/DebugPanelStatus.stories.tsx +119 -0
- package/src/containers/DebugPanelStatus/DebugPanelStatus.tsx +167 -0
- package/src/containers/DebugPanelStatus/index.ts +5 -0
- package/src/containers/DebugPortSettings/DebugPortSettings.stories.tsx +2 -2
- package/src/containers/DebugPortSettings/DebugPortSettings.tsx +33 -40
- package/src/containers/DebugPortSettings/index.ts +1 -1
- package/src/containers/DebugSettings/DebugSettings.stories.tsx +1 -1
- package/src/containers/DebugSettings/DebugSettings.tsx +71 -64
- package/src/containers/DebugSettings/index.ts +1 -1
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +39 -28
- package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -1
- package/src/containers/DebugStatus/DebugStatus.tsx +10 -10
- package/src/containers/DebugStatus/index.ts +1 -1
- package/src/containers/LoggerPanel/LoggerPanel.stories.tsx +62 -0
- package/src/containers/LoggerPanel/LoggerPanel.tsx +28 -0
- package/src/containers/LoggerPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.stories.tsx +8 -8
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +102 -73
- package/src/containers/SpaceGenerator/index.ts +1 -1
- package/src/containers/StatsPanel/StatsPanel.tsx +32 -31
- package/src/containers/StatsPanel/index.ts +1 -1
- package/src/containers/Wireframe/Wireframe.tsx +8 -7
- package/src/containers/Wireframe/index.ts +1 -1
- package/src/containers/index.ts +22 -9
- package/src/errors.ts +23 -0
- package/src/index.ts +2 -2
- package/src/meta.ts +1 -1
- package/src/operations/DebugOperationHandlerSet.ts +5 -1
- package/src/operations/create-space-from-template.ts +57 -0
- package/src/operations/errors.ts +8 -0
- package/src/operations/index.ts +1 -1
- package/src/operations/open-page.ts +51 -0
- package/src/operations/snapshot.test.ts +57 -0
- package/src/operations/snapshot.ts +243 -0
- package/src/operations/undo.test.ts +19 -0
- package/src/operations/undo.ts +28 -0
- package/src/plugin.tsx +4 -0
- package/src/samples/crm/PipelineSpace.test.ts +55 -0
- package/src/samples/crm/PipelineSpace.ts +52 -0
- package/src/samples/crm/accounts.ts +153 -0
- package/src/samples/crm/inbox.ts +158 -0
- package/src/samples/crm/pipeline.ts +70 -0
- package/src/samples/crm/util.ts +18 -0
- package/src/samples/incident/IncidentSpace.test.ts +68 -0
- package/src/samples/incident/IncidentSpace.ts +61 -0
- package/src/samples/incident/docs.ts +111 -0
- package/src/samples/incident/project.ts +61 -0
- package/src/samples/incident/tasks.ts +101 -0
- package/src/samples/incident/util.ts +24 -0
- package/src/samples/index.ts +11 -0
- package/src/samples/review/ReviewSpace.test.ts +89 -0
- package/src/samples/review/ReviewSpace.ts +47 -0
- package/src/samples/review/assets.ts +123 -0
- package/src/samples/review/util.ts +10 -0
- package/src/samples/review/work.ts +249 -0
- package/src/samples/stockfish/StockfishSpace.test.ts +129 -0
- package/src/samples/stockfish/StockfishSpace.ts +70 -0
- package/src/samples/stockfish/docs.ts +65 -0
- package/src/samples/stockfish/game.ts +47 -0
- package/src/samples/stockfish/project.ts +87 -0
- package/src/samples/stockfish/run.test.ts +193 -0
- package/src/samples/stockfish/skill.ts +154 -0
- package/src/samples/stockfish/tasks.ts +306 -0
- package/src/samples/stockfish/util.ts +17 -0
- package/src/samples/tidepool/TidepoolSpace.test.ts +61 -0
- package/src/samples/tidepool/TidepoolSpace.ts +65 -0
- package/src/samples/tidepool/docs.ts +140 -0
- package/src/samples/tidepool/project.ts +57 -0
- package/src/samples/tidepool/tasks.ts +252 -0
- package/src/samples/tidepool/team.ts +87 -0
- package/src/samples/tidepool/util.ts +18 -0
- package/src/samples/weather/WeatherSpace.test.ts +93 -0
- package/src/samples/weather/WeatherSpace.ts +59 -0
- package/src/samples/weather/project.ts +76 -0
- package/src/samples/weather/skill.ts +45 -0
- package/src/samples/weather/tasks.ts +98 -0
- package/src/samples/weather/util.ts +21 -0
- package/src/samples/worker/WorkerSpace.test.ts +102 -0
- package/src/samples/worker/WorkerSpace.ts +56 -0
- package/src/samples/worker/project.ts +72 -0
- package/src/samples/worker/tasks.ts +119 -0
- package/src/samples/worker/util.ts +17 -0
- package/src/stories/SpaceTemplates.stories.tsx +105 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/stub-drawer-plugin.ts +65 -0
- package/src/testing/stub-tools-plugin.tsx +95 -0
- package/src/translations.ts +15 -6
- package/src/types/Debug.ts +2 -2
- package/src/types/DebugNodes.ts +21 -1
- package/src/types/DebugOperation.ts +206 -0
- package/src/types/DebugSurface.ts +7 -0
- package/src/types/index.ts +6 -6
- package/dist/lib/chunk-LogStatus.mjs +0 -44
- package/dist/lib/chunk-LogStatus.mjs.map +0 -1
- package/dist/types/src/containers/LogStatus/LogStatus.d.ts +0 -6
- package/dist/types/src/containers/LogStatus/LogStatus.d.ts.map +0 -1
- package/dist/types/src/containers/LogStatus/index.d.ts +0 -2
- package/dist/types/src/containers/LogStatus/index.d.ts.map +0 -1
- package/src/containers/LogStatus/LogStatus.tsx +0 -51
- package/src/containers/LogStatus/index.ts +0 -5
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
|
|
9
|
+
import { Provider } from '@dxos/ai';
|
|
10
|
+
import { LanguageModelFixture } from '@dxos/ai/testing';
|
|
11
|
+
import * as SampleSpace from '@dxos/app-toolkit/SampleSpace';
|
|
12
|
+
import { AiContext } from '@dxos/assistant';
|
|
13
|
+
import * as ChatContextSkill from '@dxos/assistant-toolkit/ChatContextSkill';
|
|
14
|
+
import * as SkillManagerSkill from '@dxos/assistant-toolkit/SkillManagerSkill';
|
|
15
|
+
import * as Chat from '@dxos/assistant/Chat';
|
|
16
|
+
import { SpaceProperties } from '@dxos/client-protocol';
|
|
17
|
+
import * as AgentService from '@dxos/compute/AgentService';
|
|
18
|
+
import * as Project from '@dxos/compute/Project';
|
|
19
|
+
import * as Skill from '@dxos/compute/Skill';
|
|
20
|
+
import { Database, Feed, Obj, Query, Ref } from '@dxos/echo';
|
|
21
|
+
import * as EffectEx from '@dxos/effect/EffectEx';
|
|
22
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
23
|
+
import { invariant } from '@dxos/invariant';
|
|
24
|
+
import { DXN, EntityId } from '@dxos/keys';
|
|
25
|
+
import * as ProjectOperationHandlerSet from '@dxos/plugin-projects/ProjectOperationHandlerSet';
|
|
26
|
+
import * as ProjectSkill from '@dxos/plugin-projects/ProjectSkill';
|
|
27
|
+
import * as SandboxSkill from '@dxos/plugin-sandbox/SandboxSkill';
|
|
28
|
+
import * as SpaceOperationHandlerSet from '@dxos/plugin-space/SpaceOperationHandlerSet';
|
|
29
|
+
import * as TasksOperationHandlerSet from '@dxos/plugin-tasks/TasksOperationHandlerSet';
|
|
30
|
+
import { Text } from '@dxos/schema';
|
|
31
|
+
import { Message, Task } from '@dxos/types';
|
|
32
|
+
|
|
33
|
+
import * as StockfishSpace from './StockfishSpace.ts';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The first turn of the chess-MCP template, driven live.
|
|
37
|
+
*
|
|
38
|
+
* The template is a plan meant to be RUN, and `sample.test.ts` only asserts the shape it ships in.
|
|
39
|
+
* This covers the step after that: the space is instantiated, a chat is opened over its project
|
|
40
|
+
* with the skills the plan names, and a real DeepSeek model is asked to pick the work up. What it
|
|
41
|
+
* proves is the wiring a first run depends on — the template's instructions and skill reach the
|
|
42
|
+
* session, the task ledger's verbs resolve, and the model can move the root task off `todo` — none
|
|
43
|
+
* of which the archive test can see.
|
|
44
|
+
*
|
|
45
|
+
* Manual by tag, for two reasons: it spends a real model call, and the sandbox service the later
|
|
46
|
+
* stages need is unreliable enough that a scheduled run would fail on it rather than on this.
|
|
47
|
+
* Which is also why it stops here: picking up the root task needs no container.
|
|
48
|
+
*
|
|
49
|
+
* Run with, and re-record the conversation with, respectively:
|
|
50
|
+
* DX_RUN_MANUAL_TESTS=1 moon run plugin-debug:test -- src/sample/stockfish/run.test.ts
|
|
51
|
+
* DX_UPDATE_MODEL_FIXTURES=1 DX_RUN_MANUAL_TESTS=1 DEEPSEEK_API_KEY=... moon run \
|
|
52
|
+
* plugin-debug:test -- src/sample/stockfish/run.test.ts
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
// Stable entity ids, so the memoized conversation matches across runs: the space's own content is
|
|
56
|
+
// already dated against the template's fixed reference.
|
|
57
|
+
EntityId.dangerouslyDisableRandomness();
|
|
58
|
+
|
|
59
|
+
/** The model the template's own first step tells the reader to select. */
|
|
60
|
+
const MODEL = DXN.make('com.deepseek.model.deepseek-v4-pro.default');
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The skills a chat working this template is expected to carry, beyond the Development skill the
|
|
64
|
+
* space seeds and binds through its own instructions.
|
|
65
|
+
*
|
|
66
|
+
* `SandboxSkill` is here because the plan names it as where the code gets written; its tools only
|
|
67
|
+
* resolve once a run also registers `plugin-sandbox`'s handlers against a live sandbox service, and
|
|
68
|
+
* an unresolvable tool is dropped from the session toolkit rather than failing it. The DeepSeek
|
|
69
|
+
* harness skill is deliberately absent: it drives the coding agent inside the sandbox image, and
|
|
70
|
+
* the template's instructions forbid delegating this project to it — the harness driving this run
|
|
71
|
+
* is ours.
|
|
72
|
+
*/
|
|
73
|
+
const EXPECTED_SKILLS = [SkillManagerSkill.make(), ChatContextSkill.make(), ProjectSkill.make(), SandboxSkill.make()];
|
|
74
|
+
|
|
75
|
+
const template = StockfishSpace.make();
|
|
76
|
+
|
|
77
|
+
const TestLayer = AssistantTestLayer({
|
|
78
|
+
// Direct to the vendor rather than through EDGE, which the app routes this model over for auth
|
|
79
|
+
// and metering: that path needs a HALO identity and an `EdgeHttpClient`, and a headless test
|
|
80
|
+
// stack has neither. Memoized like any other preset, so a recorded run replays without a key.
|
|
81
|
+
aiServicePreset: 'deepseek',
|
|
82
|
+
model: MODEL,
|
|
83
|
+
provider: Provider.edge.id,
|
|
84
|
+
// Every verb the bound skills declare, so no tool the model reaches for fails to resolve.
|
|
85
|
+
operationHandlers: [
|
|
86
|
+
ProjectOperationHandlerSet.handlers,
|
|
87
|
+
TasksOperationHandlerSet.handlers,
|
|
88
|
+
SpaceOperationHandlerSet.handlers,
|
|
89
|
+
ChatContextSkill.Handlers,
|
|
90
|
+
SkillManagerSkill.Handlers,
|
|
91
|
+
],
|
|
92
|
+
// The template's own schemas plus what a chat over it persists: `SpaceProperties` carries the
|
|
93
|
+
// root-collection annotation the sample builder writes.
|
|
94
|
+
types: [
|
|
95
|
+
...template.schemas,
|
|
96
|
+
SpaceProperties,
|
|
97
|
+
Chat.Chat,
|
|
98
|
+
AiContext.Binding,
|
|
99
|
+
Feed.Feed,
|
|
100
|
+
Message.Message,
|
|
101
|
+
Text.Text,
|
|
102
|
+
Skill.Skill,
|
|
103
|
+
],
|
|
104
|
+
skills: EXPECTED_SKILLS,
|
|
105
|
+
tracing: 'pretty',
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Applies the template to the test database and opens a chat over the project it created, wired the
|
|
110
|
+
* way a project companion chat is: the project's own instructions (which carry the Development
|
|
111
|
+
* skill and the brief), and the expected skills bound onto the chat's feed.
|
|
112
|
+
*/
|
|
113
|
+
const instantiateTemplate = Effect.fnUntraced(function* () {
|
|
114
|
+
const properties = yield* Database.add(Obj.make(SpaceProperties, {}));
|
|
115
|
+
yield* Database.flush();
|
|
116
|
+
const { db } = yield* Database.Service;
|
|
117
|
+
yield* SampleSpace.applyTo(template, { db, properties });
|
|
118
|
+
|
|
119
|
+
const [project] = yield* Database.query(Query.type(Project.Project)).run;
|
|
120
|
+
invariant(project, 'Expected the template to create a project.');
|
|
121
|
+
invariant(project.instructions, 'Expected the project to carry instructions.');
|
|
122
|
+
const instructions = yield* Database.load(project.instructions);
|
|
123
|
+
|
|
124
|
+
const feed = yield* Database.add(Feed.make());
|
|
125
|
+
const chat = yield* Database.add(
|
|
126
|
+
Chat.make({ name: 'Chess MCP on Workers', feed: Ref.make(feed), instructions: Ref.make(instructions) }),
|
|
127
|
+
);
|
|
128
|
+
Chat.linkCompanion({ chat, subject: project });
|
|
129
|
+
Obj.setParent(feed, chat);
|
|
130
|
+
|
|
131
|
+
const runtime = yield* Effect.context<Database.Service>();
|
|
132
|
+
const binder = yield* EffectEx.acquireReleaseResource(() => new AiContext.Binder({ feed, runtime }));
|
|
133
|
+
yield* Effect.promise(() =>
|
|
134
|
+
binder.bind({
|
|
135
|
+
skills: EXPECTED_SKILLS.map((skill) => Ref.make(skill)),
|
|
136
|
+
objects: [Ref.make(project)],
|
|
137
|
+
}),
|
|
138
|
+
);
|
|
139
|
+
yield* Database.flush();
|
|
140
|
+
|
|
141
|
+
return { project, instructions, chat };
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
/** The one task with no parent: the plan's root. */
|
|
145
|
+
const rootTask = Effect.gen(function* () {
|
|
146
|
+
const tasks = yield* Database.query(Query.type(Task.Task)).run;
|
|
147
|
+
const roots = tasks.filter((task) => Task.getParentTask(task) === undefined);
|
|
148
|
+
invariant(roots.length === 1, `Expected one root task, got ${roots.length}.`);
|
|
149
|
+
return roots[0];
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
describe('Chess MCP template, run live', { tags: ['manual'] }, () => {
|
|
153
|
+
it.effect(
|
|
154
|
+
'a DeepSeek chat over the instantiated template picks up the root task',
|
|
155
|
+
Effect.fnUntraced(
|
|
156
|
+
function* ({ expect }) {
|
|
157
|
+
const { instructions, chat } = yield* instantiateTemplate();
|
|
158
|
+
|
|
159
|
+
// Preconditions, so a failure below is the model's and not the seeding's: the Development
|
|
160
|
+
// skill reaches the session through the project's instructions (the only binding path), and
|
|
161
|
+
// the plan has not been started.
|
|
162
|
+
const bound = new Set<string>();
|
|
163
|
+
for (const skillRef of instructions.skills) {
|
|
164
|
+
bound.add(Skill.getKey(yield* Database.load(skillRef)));
|
|
165
|
+
}
|
|
166
|
+
expect(bound).toContain('org.dxos.skill.development');
|
|
167
|
+
const root = yield* rootTask;
|
|
168
|
+
expect(root.status).toBe('todo');
|
|
169
|
+
|
|
170
|
+
const session = yield* AgentService.getSession(chat);
|
|
171
|
+
yield* session.submitPrompt(
|
|
172
|
+
'Read the task list for this project, then pick up the work: set the root task to started ' +
|
|
173
|
+
'and tell me, in one sentence each, what the first stage is and which of its steps are ' +
|
|
174
|
+
'mine rather than yours. Do not start any stage yet.',
|
|
175
|
+
);
|
|
176
|
+
yield* session.waitForCompletion();
|
|
177
|
+
|
|
178
|
+
// The observable effect of picking the work up, read off the ledger rather than the reply.
|
|
179
|
+
expect(root.status).toBe('started');
|
|
180
|
+
// And nothing below it: the plan's stages are ordered, and a run that starts stage one in
|
|
181
|
+
// the same turn it reads the list has skipped the reader's two settings steps.
|
|
182
|
+
const started = (yield* Database.query(Query.type(Task.Task)).run).filter(
|
|
183
|
+
(task) => Task.getParentTask(task) !== undefined && task.status !== 'todo',
|
|
184
|
+
);
|
|
185
|
+
expect(started).toEqual([]);
|
|
186
|
+
},
|
|
187
|
+
Effect.provide(TestLayer),
|
|
188
|
+
TestHelpers.provideTestContext,
|
|
189
|
+
),
|
|
190
|
+
// A live model with a task tree to read takes several tool round-trips; a replay does not.
|
|
191
|
+
{ timeout: LanguageModelFixture.isUpdateEnabled() ? 300_000 : 60_000 },
|
|
192
|
+
);
|
|
193
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import * as SampleSpace from '@dxos/app-toolkit/SampleSpace';
|
|
8
|
+
import * as Skill from '@dxos/compute/Skill';
|
|
9
|
+
import * as Template from '@dxos/compute/Template';
|
|
10
|
+
import { Database } from '@dxos/echo';
|
|
11
|
+
import { Text } from '@dxos/schema';
|
|
12
|
+
import { trim } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
//
|
|
15
|
+
// Durable working preferences, seeded as a space object so a project's instructions can bind them.
|
|
16
|
+
//
|
|
17
|
+
// Preferences, not mechanics: how work is tracked, where the code is written, and what counts as
|
|
18
|
+
// evidence. The mechanics of the sandbox (creating one, exec, file transfer) belong to
|
|
19
|
+
// `org.dxos.skill.sandbox` and are cross-referenced rather than restated — two copies of a
|
|
20
|
+
// procedure diverge, and the copy the model reads is the stale one.
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
const INSTRUCTIONS = trim`
|
|
24
|
+
How multi-step development work is tracked and carried out here. These hold across a whole
|
|
25
|
+
session, not one task, so keep this skill enabled for the duration.
|
|
26
|
+
|
|
27
|
+
## Tasks
|
|
28
|
+
- One task per unit of work, never per batch. A batched task hides which parts landed and which
|
|
29
|
+
were dropped.
|
|
30
|
+
- One or two lines per description. Detail belongs in the design document or the README.
|
|
31
|
+
- Work that ends in someone else's hands gets its own task, titled after the thing to act on and
|
|
32
|
+
assigned to them — never buried in the task that produced the work.
|
|
33
|
+
- Use the whole status range. \`blocked\` names what unblocks it; \`cancelled\` names why it was
|
|
34
|
+
dropped. Deleting a dropped item loses reasoning someone will otherwise re-derive later.
|
|
35
|
+
- Set status in the same turn the work completes, not in a batch at the end. The task list is how
|
|
36
|
+
the reader watches this run, so a status set late is a status that was wrong while it mattered.
|
|
37
|
+
- Respect \`dependsOn\`. A stage assumes the one before it deployed and was verified; starting one
|
|
38
|
+
early is how a failure gets attributed to the wrong change.
|
|
39
|
+
- Keep the outline scoped to the task in flight. Findings about another thread belong where that
|
|
40
|
+
thread lives.
|
|
41
|
+
|
|
42
|
+
## Where the code is written
|
|
43
|
+
- **You write it.** The sandbox is a shell you drive: you create the files, run the build, and read
|
|
44
|
+
the failures. Creating a sandbox, running commands in it and moving files in and out are the
|
|
45
|
+
Sandbox skill's (\`org.dxos.skill.sandbox\`) — enable it rather than working from memory.
|
|
46
|
+
- **Do not hand the task to the harness in the image.** The sandbox image ships a coding agent of
|
|
47
|
+
its own, and \`org.dxos.skill.deepseek\` will run it. It is the wrong tool here: it starts with
|
|
48
|
+
none of this space's context — no brief, no task tree, no design document — and what it produces
|
|
49
|
+
lands on a container filesystem instead of in this project. Use it only if the reader asks for it
|
|
50
|
+
by name.
|
|
51
|
+
- **One sandbox for the whole project.** It keeps its filesystem, its installed toolchain and its
|
|
52
|
+
checkout between commands. A second one pays for all of that again and splits the tree in two.
|
|
53
|
+
- **The container is not durable.** Anything that has to survive it — the design, the deploy
|
|
54
|
+
output, the URLs — is filed as a project artifact in the same turn it is produced, not at the
|
|
55
|
+
end.
|
|
56
|
+
|
|
57
|
+
## Deploying to Cloudflare
|
|
58
|
+
- **No account, first deploy.** \`wrangler deploy --temporary\` mints a temporary account and
|
|
59
|
+
prints a claim URL. The flag is not optional: plain \`wrangler deploy\` refuses in a
|
|
60
|
+
non-interactive shell and demands a token, and an authentication prompt is a dead end for a
|
|
61
|
+
session that cannot open a browser.
|
|
62
|
+
- **The claim URL is a bearer credential; the Worker URL is not.** Anyone holding the claim URL can
|
|
63
|
+
take ownership of the account, and a project artifact replicates in plaintext to everyone in the
|
|
64
|
+
space — so file the Worker URL and hand the claim URL straight to the reader, logging it nowhere.
|
|
65
|
+
Claiming needs a browser, so it is theirs to do; say that it expires with the Worker on it, which
|
|
66
|
+
invalidates every later stage rather than only the current one.
|
|
67
|
+
- **Deploy when the Worker changed, and verify every stage regardless.** A design stage has nothing
|
|
68
|
+
to deploy and a stage that only registers or publishes changes no Worker code — deploying there is
|
|
69
|
+
a no-op that reads as progress. Where you did deploy, a successful \`wrangler deploy\` is not
|
|
70
|
+
evidence that anything is serving; the response body is.
|
|
71
|
+
- **\`--temporary\` needs wrangler 4.102 or later, and that wrangler needs Node 22.** The sandbox
|
|
72
|
+
runs Node 20, and a plain \`npm install wrangler\` there resolves to the last version that fits
|
|
73
|
+
it, which has no \`--temporary\`. Install \`wrangler@latest\` explicitly and run its script under
|
|
74
|
+
a newer node without touching the image: \`npm install wrangler@latest\`, then
|
|
75
|
+
\`npx --yes node@22 node_modules/wrangler/bin/wrangler.js deploy --temporary\`.
|
|
76
|
+
- **Read the deploy output for what it warns about, not only its exit code.** Bundle size and a
|
|
77
|
+
missing binding are warnings on a deploy that succeeds and failures on the request that follows.
|
|
78
|
+
- **Bound work by work, not by wall-clock.** \`Date.now()\` does not advance during synchronous
|
|
79
|
+
compute in a Worker, so a time deadline never fires and every timing you report reads as zero.
|
|
80
|
+
Count iterations, nodes or bytes instead.
|
|
81
|
+
|
|
82
|
+
## Models and credentials
|
|
83
|
+
- The chat runs DeepSeek V4 Pro through the DXOS edge. No Anthropic key is involved in this
|
|
84
|
+
project, and nothing here should ask for one.
|
|
85
|
+
- Bind credentials by REFERENCE with the variable name to read them as. Never paste a secret into
|
|
86
|
+
a prompt, a message or a shell command — a command line persists in the transcript and in the
|
|
87
|
+
container's history.
|
|
88
|
+
- A missing credential is a setup gap, not an error to stop on: name the connector the reader has
|
|
89
|
+
to connect, then wait. Do not retry in the same turn.
|
|
90
|
+
|
|
91
|
+
## MCP servers
|
|
92
|
+
- A server is registered as an object in the space, with the transport as \`http\` — Streamable
|
|
93
|
+
HTTP. \`sse\` is the deprecated transport and is there for servers that have not migrated.
|
|
94
|
+
- Its key replicates in plaintext to everyone in the space. Register a key the server can rotate,
|
|
95
|
+
and never one that authorises anything beyond it.
|
|
96
|
+
- A chat that does not list a registered server's tools has failed to connect. That is a URL,
|
|
97
|
+
transport or handshake fault to diagnose — not a model that declined to use them.
|
|
98
|
+
- Prove the tool was actually called. An answer a model could have produced from its own knowledge
|
|
99
|
+
is not evidence the server is reachable; the tool call in the transcript is.
|
|
100
|
+
|
|
101
|
+
## GitHub and publishing
|
|
102
|
+
- Publishing comes last, after the thing works. The two consent screens it needs are the only
|
|
103
|
+
steps that leave this space, and a first run that meets them mid-build stops there.
|
|
104
|
+
- An agent has no GitHub access of its own. Bind the space's token as \`GH_TOKEN\` before it is
|
|
105
|
+
needed, not after a 401.
|
|
106
|
+
- A connector token authorises access to repositories; it cannot CREATE one. Creating the
|
|
107
|
+
repository is the reader's task and it comes first — the token is then scoped to that repository
|
|
108
|
+
rather than to everything they own.
|
|
109
|
+
- Tokens rotate. A session that was pushing fine and now gets 401 or 403 holds a stale copy:
|
|
110
|
+
refresh the binding rather than restarting the session.
|
|
111
|
+
|
|
112
|
+
## What counts as evidence
|
|
113
|
+
- Set the bar at execution, not compilation. "It builds" and "it parses" are not evidence: require
|
|
114
|
+
the thing to be RUN, and say what could not be exercised.
|
|
115
|
+
- A brief's premise is often wrong; expect it to be falsified. Ask what the real mechanism is
|
|
116
|
+
before changing the thing that looks like it, and re-ask when the previous answer was itself a
|
|
117
|
+
correction.
|
|
118
|
+
- When a measurement is corrected, sweep every conclusion that shared the flawed method. A bad
|
|
119
|
+
instrument invalidates results already banked; failing to propagate the fix backwards is the
|
|
120
|
+
expensive mistake.
|
|
121
|
+
- "Could not run it here" is an environment limit, not a behavioural difference. Only the second is
|
|
122
|
+
a stop; label the first untested rather than letting it read as a pass.
|
|
123
|
+
- The sandbox's own state contaminates results: tooling installed earlier makes a capability look
|
|
124
|
+
available when it is not. Verify a from-scratch claim in a clean container.
|
|
125
|
+
- A green build is not proof. Assignment and type erasure hide shape mismatches that fail only at
|
|
126
|
+
runtime — and a Worker's runtime is not node's, so a module that resolves locally can still be
|
|
127
|
+
missing at the edge.
|
|
128
|
+
- Distinguish cited from executed evidence. A comment describing a failure is a claim being
|
|
129
|
+
relayed, not a result; a load-bearing decision deserves a reproduction.
|
|
130
|
+
- Be terse about the plumbing. Creating a sandbox, installing a toolchain and each command that
|
|
131
|
+
found nothing are not worth narrating. What the reader wants is the outcome — the URL, the tool
|
|
132
|
+
response, the failure. Say something mid-flight only when they have to act.
|
|
133
|
+
`;
|
|
134
|
+
|
|
135
|
+
export type SkillResult = { skill: Skill.Skill };
|
|
136
|
+
|
|
137
|
+
/** The development-preferences skill, as a space object a project's instructions can bind. */
|
|
138
|
+
export const DevelopmentSkill: SampleSpace.Phase<SkillResult> = SampleSpace.phase('skill', {
|
|
139
|
+
schemas: [Skill.Skill, Text.Text],
|
|
140
|
+
run: () =>
|
|
141
|
+
Effect.gen(function* () {
|
|
142
|
+
const skill = yield* Database.add(
|
|
143
|
+
Skill.make({
|
|
144
|
+
key: 'org.dxos.skill.development',
|
|
145
|
+
name: 'Development',
|
|
146
|
+
description: 'How work is tracked, where the code is written, and what counts as evidence.',
|
|
147
|
+
instructions: Template.make({ source: INSTRUCTIONS }),
|
|
148
|
+
agentCanEnable: true,
|
|
149
|
+
}),
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
return { skill };
|
|
153
|
+
}),
|
|
154
|
+
});
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import * as SampleSpace from '@dxos/app-toolkit/SampleSpace';
|
|
8
|
+
import { Database, Obj, Ref } from '@dxos/echo';
|
|
9
|
+
import { EntityId } from '@dxos/echo/Key';
|
|
10
|
+
import { Actor, Task, TaskSet } from '@dxos/types';
|
|
11
|
+
|
|
12
|
+
import { daysAgo } from './util.ts';
|
|
13
|
+
|
|
14
|
+
//
|
|
15
|
+
// The plan, authored as a tree.
|
|
16
|
+
//
|
|
17
|
+
// The set lists its root tasks and each task lists its own sub-tasks (`Task.subtasks`), at unbounded
|
|
18
|
+
// depth. The seeds are nested the same way, which keeps the shape of the work visible in the source
|
|
19
|
+
// rather than reconstructable only by following refs.
|
|
20
|
+
//
|
|
21
|
+
// Everything is `todo`: this is a plan to run, not a project caught mid-flight. The one thing the
|
|
22
|
+
// seeds do assert is ORDER — a stage assumes the one before it landed, so each depends on its
|
|
23
|
+
// predecessor and a runner that skips ahead is visibly out of order rather than merely early.
|
|
24
|
+
//
|
|
25
|
+
// The ordering constraint that shaped the stages: nothing needing an account outside this space
|
|
26
|
+
// happens until the app already works. Publishing is stage five for exactly that reason — a consent
|
|
27
|
+
// screen in the middle of the build is where a first run stops.
|
|
28
|
+
//
|
|
29
|
+
|
|
30
|
+
type TaskSeed = {
|
|
31
|
+
readonly title: string;
|
|
32
|
+
readonly description?: string;
|
|
33
|
+
readonly estimate?: Task.Estimate;
|
|
34
|
+
/** Set where the step needs the reader's own hands — a consent screen, or a repository to own. */
|
|
35
|
+
readonly assignee?: Actor.Actor;
|
|
36
|
+
readonly subTasks?: ReadonlyArray<TaskSeed>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The reader, as an assignee. A template cannot know who they are, so the actor carries the role and
|
|
41
|
+
* a label rather than a Person ref — enough for the row to say the step is not the agent's.
|
|
42
|
+
*/
|
|
43
|
+
const USER: Actor.Actor = { role: 'user', name: 'You' };
|
|
44
|
+
|
|
45
|
+
const PLAN: TaskSeed = {
|
|
46
|
+
title: 'Ship a chess engine as an MCP server on Cloudflare Workers',
|
|
47
|
+
description:
|
|
48
|
+
'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.',
|
|
49
|
+
estimate: 'l',
|
|
50
|
+
subTasks: [
|
|
51
|
+
{
|
|
52
|
+
title: 'Design the tool surface and write it down',
|
|
53
|
+
description: 'A Markdown artifact on this project, with the diagrams a reviewer reads instead of the code.',
|
|
54
|
+
estimate: 's',
|
|
55
|
+
subTasks: [
|
|
56
|
+
{
|
|
57
|
+
title: 'Select DeepSeek V4 Pro as the chat model',
|
|
58
|
+
description:
|
|
59
|
+
'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.',
|
|
60
|
+
estimate: 'xs',
|
|
61
|
+
assignee: USER,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: 'Name the two tools and pin their schemas',
|
|
65
|
+
description:
|
|
66
|
+
'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.',
|
|
67
|
+
estimate: 'xs',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: 'Diagram the request path',
|
|
71
|
+
description:
|
|
72
|
+
'Chat → MCP client → Worker → engine, as a mermaid flowchart. Name what is bundled and what is fetched.',
|
|
73
|
+
estimate: 'xs',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Decide how the engine gets into the Worker',
|
|
77
|
+
description:
|
|
78
|
+
'A WebAssembly build bundled with the Worker, and what that costs against the bundle-size limit. State the fallback if it does not fit.',
|
|
79
|
+
estimate: 'xs',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: 'File the design as a project artifact',
|
|
83
|
+
description: 'DESIGN.md, added to the project rather than left in the chat.',
|
|
84
|
+
estimate: 'xs',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
title: 'Deploy an empty Worker with no Cloudflare login',
|
|
90
|
+
description:
|
|
91
|
+
'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.',
|
|
92
|
+
estimate: 'm',
|
|
93
|
+
subTasks: [
|
|
94
|
+
{
|
|
95
|
+
title: 'Create the sandbox and install the toolchain',
|
|
96
|
+
description:
|
|
97
|
+
'One sandbox for the whole project — it keeps its filesystem between commands, so a second one pays for node and wrangler again.',
|
|
98
|
+
estimate: 's',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'Initialize the project with wrangler',
|
|
102
|
+
description: 'A TypeScript Worker returning one line of body. Anything more is a later stage.',
|
|
103
|
+
estimate: 'xs',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'Deploy without authenticating to Cloudflare',
|
|
107
|
+
description:
|
|
108
|
+
'`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.',
|
|
109
|
+
estimate: 's',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
title: 'Fetch the deployed URL and confirm the body',
|
|
113
|
+
description:
|
|
114
|
+
'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.',
|
|
115
|
+
estimate: 'xs',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: 'Implement the MCP server and the engine',
|
|
121
|
+
description: 'The application stage, redeployed and checked over the wire at the end of it.',
|
|
122
|
+
estimate: 'l',
|
|
123
|
+
subTasks: [
|
|
124
|
+
{
|
|
125
|
+
title: 'Answer the MCP handshake over Streamable HTTP',
|
|
126
|
+
description:
|
|
127
|
+
'Initialize and `tools/list` on one endpoint, with the two tools advertised and nothing behind them yet.',
|
|
128
|
+
estimate: 'm',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: 'Bundle the engine and run one search',
|
|
132
|
+
description:
|
|
133
|
+
'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.',
|
|
134
|
+
estimate: 'm',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: 'Implement both tools over the engine',
|
|
138
|
+
description: 'Reject an unparseable FEN as a tool error rather than letting the engine fail on it.',
|
|
139
|
+
estimate: 'm',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: 'Redeploy and call `tools/list` and both tools over the wire',
|
|
143
|
+
description:
|
|
144
|
+
'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.',
|
|
145
|
+
estimate: 's',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
title: 'Claim the temporary Cloudflare account',
|
|
149
|
+
description:
|
|
150
|
+
'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.',
|
|
151
|
+
estimate: 'xs',
|
|
152
|
+
assignee: USER,
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
title: 'Register the server and use it from the chess chat',
|
|
158
|
+
description: "The brief's definition of done, and the first point at which the thing is worth showing anyone.",
|
|
159
|
+
estimate: 'm',
|
|
160
|
+
subTasks: [
|
|
161
|
+
{
|
|
162
|
+
title: 'Add the deployed URL as an MCP server in this space',
|
|
163
|
+
description:
|
|
164
|
+
'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.',
|
|
165
|
+
estimate: 's',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
title: 'Enable the Chess plugin',
|
|
169
|
+
description:
|
|
170
|
+
'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.',
|
|
171
|
+
estimate: 'xs',
|
|
172
|
+
assignee: USER,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
title: 'Confirm the tools reach the chat',
|
|
176
|
+
description:
|
|
177
|
+
'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.',
|
|
178
|
+
estimate: 'xs',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
title: 'Ask for the best move in the seeded game',
|
|
182
|
+
description:
|
|
183
|
+
'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.',
|
|
184
|
+
estimate: 's',
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
title: 'Publish it to GitHub',
|
|
190
|
+
description:
|
|
191
|
+
'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.',
|
|
192
|
+
estimate: 'm',
|
|
193
|
+
subTasks: [
|
|
194
|
+
{
|
|
195
|
+
title: 'Create an empty GitHub repository for the server',
|
|
196
|
+
description:
|
|
197
|
+
'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.',
|
|
198
|
+
estimate: 'xs',
|
|
199
|
+
assignee: USER,
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: 'Connect the GitHub credential, scoped to that repository',
|
|
203
|
+
description:
|
|
204
|
+
'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.',
|
|
205
|
+
estimate: 'xs',
|
|
206
|
+
assignee: USER,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: 'Push the tree, with the deploy and MCP steps written down',
|
|
210
|
+
description:
|
|
211
|
+
'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.',
|
|
212
|
+
estimate: 's',
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
export type TasksResult = {
|
|
220
|
+
taskSet: TaskSet.TaskSet;
|
|
221
|
+
tasks: Task.Task[];
|
|
222
|
+
root: Task.Task;
|
|
223
|
+
/** The five stages, in order — the level the dependency chain is written across. */
|
|
224
|
+
stages: Task.Task[];
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Depth-first flatten, recording each task's children so they can be filed under it once stored.
|
|
229
|
+
* The stages are collected on the way down, as the root's children.
|
|
230
|
+
*/
|
|
231
|
+
const buildTasks = (
|
|
232
|
+
seed: TaskSeed,
|
|
233
|
+
): { tasks: Task.Task[]; stages: Task.Task[]; children: Map<Task.Task, Task.Task[]> } => {
|
|
234
|
+
const tasks: Task.Task[] = [];
|
|
235
|
+
const stages: Task.Task[] = [];
|
|
236
|
+
const children = new Map<Task.Task, Task.Task[]>();
|
|
237
|
+
const visit = (seed: TaskSeed, parent: Task.Task | undefined) => {
|
|
238
|
+
const task = Task.make({
|
|
239
|
+
title: seed.title,
|
|
240
|
+
status: 'todo',
|
|
241
|
+
description: seed.description,
|
|
242
|
+
estimate: seed.estimate,
|
|
243
|
+
assignee: seed.assignee,
|
|
244
|
+
// Task carries no due date; its dates are activity-log lines, so that is where they go.
|
|
245
|
+
history: [
|
|
246
|
+
{
|
|
247
|
+
id: EntityId.random(),
|
|
248
|
+
date: daysAgo(0),
|
|
249
|
+
event: 'created' as const,
|
|
250
|
+
description: 'Filed from the chess MCP template.',
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
});
|
|
254
|
+
tasks.push(task);
|
|
255
|
+
if (parent) {
|
|
256
|
+
children.set(parent, [...(children.get(parent) ?? []), task]);
|
|
257
|
+
}
|
|
258
|
+
if (parent === tasks[0]) {
|
|
259
|
+
stages.push(task);
|
|
260
|
+
}
|
|
261
|
+
for (const child of seed.subTasks ?? []) {
|
|
262
|
+
visit(child, task);
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
visit(seed, undefined);
|
|
267
|
+
return { tasks, stages, children };
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/** The plan: one root task, five stages under it, and the steps under those. */
|
|
271
|
+
export const Tasks: SampleSpace.Phase<TasksResult> = SampleSpace.phase('tasks', {
|
|
272
|
+
schemas: [TaskSet.TaskSet, Task.Task],
|
|
273
|
+
run: () =>
|
|
274
|
+
Effect.gen(function* () {
|
|
275
|
+
const taskSet = yield* Database.add(
|
|
276
|
+
TaskSet.make({
|
|
277
|
+
name: 'Chess MCP on Workers',
|
|
278
|
+
description: 'Everything between the brief and a chat asking the engine for a move.',
|
|
279
|
+
}),
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
const { tasks, stages, children } = buildTasks(PLAN);
|
|
283
|
+
yield* SampleSpace.children(taskSet, [tasks[0]], (taskSet, refs) => {
|
|
284
|
+
taskSet.tasks = refs;
|
|
285
|
+
});
|
|
286
|
+
for (const [parent, subtasks] of children) {
|
|
287
|
+
yield* SampleSpace.children(parent, subtasks, (parent, refs) => {
|
|
288
|
+
parent.subtasks = refs;
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Each stage depends on the one before it: the stages are sequential by construction (an MCP
|
|
293
|
+
// server cannot be registered before it has a URL), and stating it is what makes a runner
|
|
294
|
+
// working out of order visible rather than merely early.
|
|
295
|
+
for (const [index, stage] of stages.entries()) {
|
|
296
|
+
if (index > 0) {
|
|
297
|
+
const previous = stages[index - 1];
|
|
298
|
+
Obj.update(stage, (stage) => {
|
|
299
|
+
stage.dependsOn = [Ref.make(previous)];
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
return { taskSet, tasks, root: tasks[0], stages };
|
|
305
|
+
}),
|
|
306
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as SampleSpace from '@dxos/app-toolkit/SampleSpace';
|
|
6
|
+
|
|
7
|
+
/** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */
|
|
8
|
+
export const REFERENCE = process.env.NOW ? new Date(process.env.NOW) : new Date('2026-05-20T15:00:00Z');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Bound to the same reference the definition declares, so the pure content builders can date their
|
|
12
|
+
* objects without every one of them being an effect.
|
|
13
|
+
*/
|
|
14
|
+
export const clock = SampleSpace.makeClock(REFERENCE);
|
|
15
|
+
|
|
16
|
+
/** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */
|
|
17
|
+
export const daysAgo = clock.daysAgo;
|