@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,206 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as SampleSpace from "@dxos/app-toolkit/SampleSpace";
|
|
4
|
+
import { Database, Obj, Ref } from "@dxos/echo";
|
|
5
|
+
import * as Instructions from "@dxos/compute/Instructions";
|
|
6
|
+
import * as Project from "@dxos/compute/Project";
|
|
7
|
+
import { EntityId } from "@dxos/echo/Key";
|
|
8
|
+
import { Outline, Task, TaskSet } from "@dxos/types";
|
|
9
|
+
import { Text } from "@dxos/schema";
|
|
10
|
+
import * as Skill from "@dxos/compute/Skill";
|
|
11
|
+
import * as Template from "@dxos/compute/Template";
|
|
12
|
+
import { trim } from "@dxos/util";
|
|
13
|
+
//#region src/samples/weather/project.ts
|
|
14
|
+
var INSTRUCTIONS$1 = `Build, deploy, configure and test the weather MCP server described by the task \
|
|
15
|
+
list, on your own and in one go: start the first task now, work them in order, and set each one's \
|
|
16
|
+
status as you finish it. Do not stop to ask — nothing in this project needs me.
|
|
17
|
+
|
|
18
|
+
The task descriptions are the whole specification: one Worker, one tool (\`get_weather\`), one \
|
|
19
|
+
upstream API. There is no design stage. If a step starts to look like architecture, it is the wrong step.
|
|
20
|
+
|
|
21
|
+
Write the code yourself in one sandbox, driving it through the Sandbox skill \
|
|
22
|
+
(\`org.dxos.skill.sandbox\`). Do not delegate to the coding agent in the sandbox image — it has none \
|
|
23
|
+
of this space's context.
|
|
24
|
+
|
|
25
|
+
The server is called from a browser, so it must answer CORS preflights and send CORS headers on \
|
|
26
|
+
every response — without them the tool silently never connects. Deploy with \`wrangler deploy --temporary\`. Do not claim the account and never file or repeat the \
|
|
27
|
+
claim URL. The container is not durable, so file the Worker URL and the tool's response on this \
|
|
28
|
+
project in the turn you produce them.
|
|
29
|
+
|
|
30
|
+
Configure the server by setting its URL on the Weather MCP skill's \`mcpServers\` with the Database \
|
|
31
|
+
skill; that skill is already bound here, so the tool is available on your next turn.
|
|
32
|
+
|
|
33
|
+
This project needs no Cloudflare login and no API keys. If a step seems to need either, that is the \
|
|
34
|
+
wrong step.`;
|
|
35
|
+
/**
|
|
36
|
+
* The work-stream. It adopts the task set the tasks phase built and binds the Weather MCP skill
|
|
37
|
+
* through `instructions.skills` — the only path a seeded skill reaches a chat by — so the run can
|
|
38
|
+
* configure the server with one update and no enable step.
|
|
39
|
+
*/
|
|
40
|
+
var ProjectPhase = SampleSpace.phase("project", {
|
|
41
|
+
schemas: [
|
|
42
|
+
Project.Project,
|
|
43
|
+
Instructions.Instructions,
|
|
44
|
+
Outline.Outline,
|
|
45
|
+
Text.Text
|
|
46
|
+
],
|
|
47
|
+
run: ({ tasks, skill }) => Effect.gen(function* () {
|
|
48
|
+
const instructions = yield* Database.add(Instructions.make({
|
|
49
|
+
name: "Weather MCP",
|
|
50
|
+
text: INSTRUCTIONS$1,
|
|
51
|
+
skills: [Ref.make(skill.skill)],
|
|
52
|
+
objects: [Ref.make(tasks.taskSet)]
|
|
53
|
+
}));
|
|
54
|
+
return {
|
|
55
|
+
project: yield* Database.add(Project.make({
|
|
56
|
+
name: "Weather MCP",
|
|
57
|
+
description: "A one-tool MCP server over the Open-Meteo forecast, deployed as a temporary Cloudflare Worker and called from this chat.",
|
|
58
|
+
status: "active",
|
|
59
|
+
instructions: Ref.make(instructions),
|
|
60
|
+
taskSet: Ref.make(tasks.taskSet)
|
|
61
|
+
})),
|
|
62
|
+
instructions
|
|
63
|
+
};
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/samples/weather/skill.ts
|
|
68
|
+
var INSTRUCTIONS = trim`
|
|
69
|
+
Carries the weather MCP server this project deploys. Its \`mcpServers\` list starts empty: the
|
|
70
|
+
Worker URL only exists once the deploy has run, and the run sets it here. A chat with this skill
|
|
71
|
+
bound connects every listed server at the start of each turn, so the \`get_weather\` tool appears
|
|
72
|
+
on the turn after the URL is set.
|
|
73
|
+
`;
|
|
74
|
+
/**
|
|
75
|
+
* The skill the deployed server hangs off. Seeded rather than created by the run because a skill is
|
|
76
|
+
* the one place a chat reads MCP servers from, and the project's instructions can bind a seeded
|
|
77
|
+
* object — so configuring the server is one field update, not a skill to author and enable.
|
|
78
|
+
*/
|
|
79
|
+
var WeatherSkill = SampleSpace.phase("skill", {
|
|
80
|
+
schemas: [Skill.Skill, Text.Text],
|
|
81
|
+
run: () => Effect.gen(function* () {
|
|
82
|
+
return { skill: yield* Database.add(Skill.make({
|
|
83
|
+
key: "org.dxos.skill.weatherMcp",
|
|
84
|
+
name: "Weather MCP",
|
|
85
|
+
description: "The weather MCP server deployed by this project.",
|
|
86
|
+
instructions: Template.make({ source: INSTRUCTIONS }),
|
|
87
|
+
mcpServers: [],
|
|
88
|
+
agentCanEnable: true
|
|
89
|
+
})) };
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/samples/weather/util.ts
|
|
94
|
+
/** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */
|
|
95
|
+
var REFERENCE = process.env.NOW ? new Date(process.env.NOW) : /* @__PURE__ */ new Date("2026-05-20T15:00:00Z");
|
|
96
|
+
/** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */
|
|
97
|
+
var daysAgo = SampleSpace.makeClock(REFERENCE).daysAgo;
|
|
98
|
+
/** The upstream the Worker's one tool wraps; parameterised on coordinates by the tool. */
|
|
99
|
+
var FORECAST_URL = "https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41¤t=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m";
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/samples/weather/tasks.ts
|
|
102
|
+
var STEPS = [
|
|
103
|
+
{
|
|
104
|
+
title: "Build the weather MCP Worker",
|
|
105
|
+
description: `One sandbox for the run. A TypeScript Worker that speaks MCP over Streamable HTTP on one endpoint — \`initialize\`, \`tools/list\` and \`tools/call\` — with exactly one tool, \`get_weather\`, taking \`latitude\` and \`longitude\` and returning the current temperature and wind speed plus the hourly series from ${FORECAST_URL} with those coordinates substituted. The MCP client runs in the browser, so every response must carry CORS headers and an \`OPTIONS\` preflight must answer 204: \`Access-Control-Allow-Origin: *\`, \`Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS\`, \`Access-Control-Allow-Headers\` covering \`content-type\`, \`accept\`, \`authorization\`, \`mcp-session-id\` and \`mcp-protocol-version\`, and \`Access-Control-Expose-Headers: mcp-session-id\`. No auth, no dependencies beyond wrangler. The client is the MCP TypeScript SDK's Streamable HTTP transport, and it needs more than the three methods: answer every request with \`Content-Type: application/json\` and a JSON-RPC response object at HTTP 200 — an unknown method too, as a JSON-RPC error, never a 4xx; in \`initialize\` echo the \`protocolVersion\` the client sent, with \`capabilities: { tools: {} }\` and a \`serverInfo\`; answer any notification (a message with no \`id\`, such as \`notifications/initialized\`) with 202 and no body, since a client whose notification gets a 4xx never finishes connecting; answer \`GET\` and \`DELETE\` on the endpoint with 405. Return the tool's result as \`{ content: [{ type: 'text', text: <the forecast as JSON> }] }\`. \`--temporary\` needs wrangler 4.102+, which needs Node 22 while the sandbox runs Node 20: install \`wrangler@latest\` and run it as \`npx --yes node@22 node_modules/wrangler/bin/wrangler.js\`.`,
|
|
106
|
+
estimate: "s"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: "Deploy it to a temporary Cloudflare account",
|
|
110
|
+
description: "`wrangler deploy --temporary` — plain `wrangler deploy` demands a token non-interactively. File the Worker URL on the project. Do not claim the account and do not file or repeat the claim URL: it is a bearer credential, and this run never needs it.",
|
|
111
|
+
estimate: "xs"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: "Configure the server for this space",
|
|
115
|
+
description: "Set the Worker URL on the Weather MCP skill's `mcpServers` as `{ name: 'weather', url, protocol: 'http' }` through the Database skill's update tool. The skill is already bound to this chat and servers are connected at the start of every turn, so `get_weather` appears on your next turn — no restart.",
|
|
116
|
+
estimate: "xs"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: "Test the tool from this chat",
|
|
120
|
+
description: "Before calling, check CORS against the deployed URL — `curl -i -X OPTIONS -H \"Origin: http://localhost\" -H \"Access-Control-Request-Method: POST\" -H \"Access-Control-Request-Headers: content-type,mcp-session-id\" <url>` must return the allow headers; a browser client fails its preflight otherwise, and the tool never appears. Then call `get_weather` for Berlin (52.52, 13.41) and file the response on the project. The call has to appear as a tool call in the transcript; a forecast the model produced on its own is a failure, not a pass.",
|
|
121
|
+
estimate: "xs"
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
/** The four steps, each depending on the one before it. */
|
|
125
|
+
var Tasks = SampleSpace.phase("tasks", {
|
|
126
|
+
schemas: [TaskSet.TaskSet, Task.Task],
|
|
127
|
+
run: () => Effect.gen(function* () {
|
|
128
|
+
const taskSet = yield* Database.add(TaskSet.make({
|
|
129
|
+
name: "Weather MCP",
|
|
130
|
+
description: "From an empty sandbox to a weather tool this chat calls."
|
|
131
|
+
}));
|
|
132
|
+
const tasks = STEPS.map((step) => Task.make({
|
|
133
|
+
title: step.title,
|
|
134
|
+
description: step.description,
|
|
135
|
+
estimate: step.estimate,
|
|
136
|
+
status: "todo",
|
|
137
|
+
history: [{
|
|
138
|
+
id: EntityId.random(),
|
|
139
|
+
date: daysAgo(0),
|
|
140
|
+
event: "created",
|
|
141
|
+
description: "Filed from the weather MCP template."
|
|
142
|
+
}]
|
|
143
|
+
}));
|
|
144
|
+
yield* SampleSpace.children(taskSet, tasks, (taskSet, refs) => {
|
|
145
|
+
taskSet.tasks = refs;
|
|
146
|
+
});
|
|
147
|
+
for (const [index, task] of tasks.entries()) if (index > 0) {
|
|
148
|
+
const previous = tasks[index - 1];
|
|
149
|
+
Obj.update(task, (task) => {
|
|
150
|
+
task.dependsOn = [Ref.make(previous)];
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
taskSet,
|
|
155
|
+
tasks
|
|
156
|
+
};
|
|
157
|
+
})
|
|
158
|
+
});
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/samples/weather/WeatherSpace.ts
|
|
161
|
+
var WeatherSpace_exports = /* @__PURE__ */ __exportAll({
|
|
162
|
+
FORECAST_URL: () => FORECAST_URL,
|
|
163
|
+
make: () => make,
|
|
164
|
+
makeTemplate: () => makeTemplate
|
|
165
|
+
});
|
|
166
|
+
var phases = {
|
|
167
|
+
skill: WeatherSkill,
|
|
168
|
+
tasks: Tasks,
|
|
169
|
+
project: ProjectPhase
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* The fastest loop through building an MCP server and using it: one Worker with one tool over the
|
|
173
|
+
* Open-Meteo forecast, four tasks from an empty sandbox to a tool call in this chat, all of them the
|
|
174
|
+
* agent's.
|
|
175
|
+
*
|
|
176
|
+
* It sits between `WorkerSpace` (a deploy with nothing to call) and `StockfishSpace` (an engine, a
|
|
177
|
+
* design stage and a publish step): enough to exercise the whole build → deploy → configure → call
|
|
178
|
+
* path, small enough to run unattended. The account stays temporary and unclaimed, and the server is
|
|
179
|
+
* configured on a seeded skill because a skill is where a chat reads MCP servers from.
|
|
180
|
+
*/
|
|
181
|
+
var make = () => SampleSpace.make({
|
|
182
|
+
space: {
|
|
183
|
+
name: "Weather MCP",
|
|
184
|
+
icon: "sun",
|
|
185
|
+
hue: "sky"
|
|
186
|
+
},
|
|
187
|
+
reference: REFERENCE,
|
|
188
|
+
phases,
|
|
189
|
+
build: (phases) => Effect.gen(function* () {
|
|
190
|
+
const skill = yield* phases.skill();
|
|
191
|
+
const tasks = yield* phases.tasks();
|
|
192
|
+
yield* phases.project({
|
|
193
|
+
tasks,
|
|
194
|
+
skill
|
|
195
|
+
});
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
var makeTemplate = () => SampleSpace.makeTemplate({
|
|
199
|
+
id: "org.dxos.plugin-debug.template.weather",
|
|
200
|
+
description: "Four tasks an agent runs alone: a one-tool MCP server over a weather API, deployed to a temporary Worker and called from the chat.",
|
|
201
|
+
definition: make()
|
|
202
|
+
});
|
|
203
|
+
//#endregion
|
|
204
|
+
export { FORECAST_URL as i, make as n, makeTemplate as r, WeatherSpace_exports as t };
|
|
205
|
+
|
|
206
|
+
//# sourceMappingURL=chunk-WeatherSpace.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-WeatherSpace.mjs","names":[],"sources":["../../src/samples/weather/project.ts","../../src/samples/weather/skill.ts","../../src/samples/weather/util.ts","../../src/samples/weather/tasks.ts","../../src/samples/weather/WeatherSpace.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport * as Instructions from '@dxos/compute/Instructions';\nimport * as Project from '@dxos/compute/Project';\nimport { Database, Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { Outline } from '@dxos/types';\n\nimport { type SkillResult } from './skill.ts';\nimport { type TasksResult } from './tasks.ts';\n\nexport type ProjectInput = { tasks: TasksResult; skill: SkillResult };\n\nexport type ProjectResult = { project: Project.Project; instructions: Instructions.Instructions };\n\nconst INSTRUCTIONS = `Build, deploy, configure and test the weather MCP server described by the task \\\nlist, on your own and in one go: start the first task now, work them in order, and set each one's \\\nstatus as you finish it. Do not stop to ask — nothing in this project needs me.\n\nThe task descriptions are the whole specification: one Worker, one tool (\\`get_weather\\`), one \\\nupstream API. There is no design stage. If a step starts to look like architecture, it is the wrong step.\n\nWrite the code yourself in one sandbox, driving it through the Sandbox skill \\\n(\\`org.dxos.skill.sandbox\\`). Do not delegate to the coding agent in the sandbox image — it has none \\\nof this space's context.\n\nThe server is called from a browser, so it must answer CORS preflights and send CORS headers on \\\nevery response — without them the tool silently never connects. Deploy with \\`wrangler deploy --temporary\\`. Do not claim the account and never file or repeat the \\\nclaim URL. The container is not durable, so file the Worker URL and the tool's response on this \\\nproject in the turn you produce them.\n\nConfigure the server by setting its URL on the Weather MCP skill's \\`mcpServers\\` with the Database \\\nskill; that skill is already bound here, so the tool is available on your next turn.\n\nThis project needs no Cloudflare login and no API keys. If a step seems to need either, that is the \\\nwrong step.`;\n\n/**\n * The work-stream. It adopts the task set the tasks phase built and binds the Weather MCP skill\n * through `instructions.skills` — the only path a seeded skill reaches a chat by — so the run can\n * configure the server with one update and no enable step.\n */\nexport const ProjectPhase: SampleSpace.Phase<ProjectResult, ProjectInput> = SampleSpace.phase('project', {\n // `Project.make` builds an outline for the project and the instructions' prose is stored as a\n // Text; a phase has to declare every type it persists or the space cannot register it.\n schemas: [Project.Project, Instructions.Instructions, Outline.Outline, Text.Text],\n run: ({ tasks, skill }: ProjectInput) =>\n Effect.gen(function* () {\n const instructions = yield* Database.add(\n Instructions.make({\n name: 'Weather MCP',\n text: INSTRUCTIONS,\n skills: [Ref.make(skill.skill)],\n objects: [Ref.make(tasks.taskSet)],\n }),\n );\n\n const project = yield* Database.add(\n Project.make({\n name: 'Weather MCP',\n description:\n 'A one-tool MCP server over the Open-Meteo forecast, deployed as a temporary Cloudflare Worker and called from this chat.',\n status: 'active',\n instructions: Ref.make(instructions),\n taskSet: Ref.make(tasks.taskSet),\n }),\n );\n\n return { project, instructions };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport * as Skill from '@dxos/compute/Skill';\nimport * as Template from '@dxos/compute/Template';\nimport { Database } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nconst INSTRUCTIONS = trim`\n Carries the weather MCP server this project deploys. Its \\`mcpServers\\` list starts empty: the\n Worker URL only exists once the deploy has run, and the run sets it here. A chat with this skill\n bound connects every listed server at the start of each turn, so the \\`get_weather\\` tool appears\n on the turn after the URL is set.\n`;\n\nexport type SkillResult = { skill: Skill.Skill };\n\n/**\n * The skill the deployed server hangs off. Seeded rather than created by the run because a skill is\n * the one place a chat reads MCP servers from, and the project's instructions can bind a seeded\n * object — so configuring the server is one field update, not a skill to author and enable.\n */\nexport const WeatherSkill: SampleSpace.Phase<SkillResult> = SampleSpace.phase('skill', {\n schemas: [Skill.Skill, Text.Text],\n run: () =>\n Effect.gen(function* () {\n const skill = yield* Database.add(\n Skill.make({\n key: 'org.dxos.skill.weatherMcp',\n name: 'Weather MCP',\n description: 'The weather MCP server deployed by this project.',\n instructions: Template.make({ source: INSTRUCTIONS }),\n mcpServers: [],\n agentCanEnable: true,\n }),\n );\n\n return { skill };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\n/** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */\nexport const REFERENCE = process.env.NOW ? new Date(process.env.NOW) : new Date('2026-05-20T15:00:00Z');\n\n/**\n * Bound to the same reference the definition declares, so the pure content builders can date their\n * objects without every one of them being an effect.\n */\nexport const clock = SampleSpace.makeClock(REFERENCE);\n\n/** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */\nexport const daysAgo = clock.daysAgo;\n\n/** The upstream the Worker's one tool wraps; parameterised on coordinates by the tool. */\nexport const FORECAST_URL =\n 'https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41¤t=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Database, Obj, Ref } from '@dxos/echo';\nimport { EntityId } from '@dxos/echo/Key';\nimport { Task, TaskSet } from '@dxos/types';\n\nimport { FORECAST_URL, daysAgo } from './util.ts';\n\n//\n// Four steps, flat and in order, all the agent's: nothing here needs the reader, so a chat can run\n// the plan end to end on its own. Each depends on the one before it, so a runner working ahead is\n// visibly out of order rather than merely early.\n//\n\ntype TaskSeed = {\n readonly title: string;\n readonly description: string;\n readonly estimate?: Task.Estimate;\n};\n\nconst STEPS: ReadonlyArray<TaskSeed> = [\n {\n title: 'Build the weather MCP Worker',\n description: `One sandbox for the run. A TypeScript Worker that speaks MCP over Streamable HTTP on one endpoint — \\`initialize\\`, \\`tools/list\\` and \\`tools/call\\` — with exactly one tool, \\`get_weather\\`, taking \\`latitude\\` and \\`longitude\\` and returning the current temperature and wind speed plus the hourly series from ${FORECAST_URL} with those coordinates substituted. The MCP client runs in the browser, so every response must carry CORS headers and an \\`OPTIONS\\` preflight must answer 204: \\`Access-Control-Allow-Origin: *\\`, \\`Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONS\\`, \\`Access-Control-Allow-Headers\\` covering \\`content-type\\`, \\`accept\\`, \\`authorization\\`, \\`mcp-session-id\\` and \\`mcp-protocol-version\\`, and \\`Access-Control-Expose-Headers: mcp-session-id\\`. No auth, no dependencies beyond wrangler. The client is the MCP TypeScript SDK's Streamable HTTP transport, and it needs more than the three methods: answer every request with \\`Content-Type: application/json\\` and a JSON-RPC response object at HTTP 200 — an unknown method too, as a JSON-RPC error, never a 4xx; in \\`initialize\\` echo the \\`protocolVersion\\` the client sent, with \\`capabilities: { tools: {} }\\` and a \\`serverInfo\\`; answer any notification (a message with no \\`id\\`, such as \\`notifications/initialized\\`) with 202 and no body, since a client whose notification gets a 4xx never finishes connecting; answer \\`GET\\` and \\`DELETE\\` on the endpoint with 405. Return the tool's result as \\`{ content: [{ type: 'text', text: <the forecast as JSON> }] }\\`. \\`--temporary\\` needs wrangler 4.102+, which needs Node 22 while the sandbox runs Node 20: install \\`wrangler@latest\\` and run it as \\`npx --yes node@22 node_modules/wrangler/bin/wrangler.js\\`.`,\n estimate: 's',\n },\n {\n title: 'Deploy it to a temporary Cloudflare account',\n description:\n '`wrangler deploy --temporary` — plain `wrangler deploy` demands a token non-interactively. File the Worker URL on the project. Do not claim the account and do not file or repeat the claim URL: it is a bearer credential, and this run never needs it.',\n estimate: 'xs',\n },\n {\n title: 'Configure the server for this space',\n description:\n \"Set the Worker URL on the Weather MCP skill's `mcpServers` as `{ name: 'weather', url, protocol: 'http' }` through the Database skill's update tool. The skill is already bound to this chat and servers are connected at the start of every turn, so `get_weather` appears on your next turn — no restart.\",\n estimate: 'xs',\n },\n {\n title: 'Test the tool from this chat',\n description:\n 'Before calling, check CORS against the deployed URL — `curl -i -X OPTIONS -H \"Origin: http://localhost\" -H \"Access-Control-Request-Method: POST\" -H \"Access-Control-Request-Headers: content-type,mcp-session-id\" <url>` must return the allow headers; a browser client fails its preflight otherwise, and the tool never appears. Then call `get_weather` for Berlin (52.52, 13.41) and file the response on the project. The call has to appear as a tool call in the transcript; a forecast the model produced on its own is a failure, not a pass.',\n estimate: 'xs',\n },\n];\n\nexport type TasksResult = { taskSet: TaskSet.TaskSet; tasks: Task.Task[] };\n\n/** The four steps, each depending on the one before it. */\nexport const Tasks: SampleSpace.Phase<TasksResult> = SampleSpace.phase('tasks', {\n schemas: [TaskSet.TaskSet, Task.Task],\n run: () =>\n Effect.gen(function* () {\n const taskSet = yield* Database.add(\n TaskSet.make({\n name: 'Weather MCP',\n description: 'From an empty sandbox to a weather tool this chat calls.',\n }),\n );\n\n const tasks = STEPS.map((step) =>\n Task.make({\n title: step.title,\n description: step.description,\n estimate: step.estimate,\n status: 'todo',\n // Task carries no due date; its dates are activity-log lines, so that is where they go.\n history: [\n {\n id: EntityId.random(),\n date: daysAgo(0),\n event: 'created' as const,\n description: 'Filed from the weather MCP template.',\n },\n ],\n }),\n );\n yield* SampleSpace.children(taskSet, tasks, (taskSet, refs) => {\n taskSet.tasks = refs;\n });\n\n for (const [index, task] of tasks.entries()) {\n if (index > 0) {\n const previous = tasks[index - 1];\n Obj.update(task, (task) => {\n task.dependsOn = [Ref.make(previous)];\n });\n }\n }\n\n return { taskSet, tasks };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\n\nimport type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\nimport { ProjectPhase } from './project.ts';\nimport { WeatherSkill } from './skill.ts';\nimport { Tasks } from './tasks.ts';\nimport { REFERENCE } from './util.ts';\n\nexport { FORECAST_URL } from './util.ts';\n\nconst phases = {\n skill: WeatherSkill,\n tasks: Tasks,\n project: ProjectPhase,\n};\n\n/**\n * The fastest loop through building an MCP server and using it: one Worker with one tool over the\n * Open-Meteo forecast, four tasks from an empty sandbox to a tool call in this chat, all of them the\n * agent's.\n *\n * It sits between `WorkerSpace` (a deploy with nothing to call) and `StockfishSpace` (an engine, a\n * design stage and a publish step): enough to exercise the whole build → deploy → configure → call\n * path, small enough to run unattended. The account stays temporary and unclaimed, and the server is\n * configured on a seeded skill because a skill is where a chat reads MCP servers from.\n */\nexport const make = (): SampleSpace.Definition<typeof phases, void> =>\n SampleSpace.make({\n // Reaches a space only where the definition is applied directly (the generator panel, the\n // archive test): the create-space dialog takes its icon from `space-templates.ts`.\n space: { name: 'Weather MCP', icon: 'sun', hue: 'sky' },\n reference: REFERENCE,\n phases,\n build: (phases) =>\n Effect.gen(function* () {\n const skill = yield* phases.skill();\n const tasks = yield* phases.tasks();\n yield* phases.project({ tasks, skill });\n\n // No root collection: this space seeds no documents — the project, its tasks and the skill\n // surface through their own containers.\n }),\n });\n\nexport const makeTemplate = (): AppCapabilities.SpaceTemplate =>\n SampleSpace.makeTemplate({\n id: 'org.dxos.plugin-debug.template.weather',\n description:\n 'Four tasks an agent runs alone: a one-tool MCP server over a weather API, deployed to a temporary Worker and called from the chat.',\n definition: make(),\n });\n"],"mappings":";;;;;;;;;;;;;AAoBA,IAAM,iBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BrB,IAAa,eAA+D,YAAY,MAAM,WAAW;CAGvG,SAAS;EAAC,QAAQ;EAAS,aAAa;EAAc,QAAQ;EAAS,KAAK;CAAI;CAChF,MAAM,EAAE,OAAO,YACb,OAAO,IAAI,aAAa;EACtB,MAAM,eAAe,OAAO,SAAS,IACnC,aAAa,KAAK;GAChB,MAAM;GACN,MAAM;GACN,QAAQ,CAAC,IAAI,KAAK,MAAM,KAAK,CAAC;GAC9B,SAAS,CAAC,IAAI,KAAK,MAAM,OAAO,CAAC;EACnC,CAAC,CACH;EAaA,OAAO;GAAE,SAAA,OAXc,SAAS,IAC9B,QAAQ,KAAK;IACX,MAAM;IACN,aACE;IACF,QAAQ;IACR,cAAc,IAAI,KAAK,YAAY;IACnC,SAAS,IAAI,KAAK,MAAM,OAAO;GACjC,CAAC,CACH;GAEkB;EAAa;CACjC,CAAC;AACL,CAAC;;;AC9DD,IAAM,eAAe,IAAI;;;;;;;;;;;AAczB,IAAa,eAA+C,YAAY,MAAM,SAAS;CACrF,SAAS,CAAC,MAAM,OAAO,KAAK,IAAI;CAChC,WACE,OAAO,IAAI,aAAa;EAYtB,OAAO,EAAE,OAAA,OAXY,SAAS,IAC5B,MAAM,KAAK;GACT,KAAK;GACL,MAAM;GACN,aAAa;GACb,cAAc,SAAS,KAAK,EAAE,QAAQ,aAAa,CAAC;GACpD,YAAY,CAAC;GACb,gBAAgB;EAClB,CAAC,CACH,EAEe;CACjB,CAAC;AACL,CAAC;;;;ACrCD,IAAa,YAAY,QAAQ,IAAI,MAAM,IAAI,KAAK,QAAQ,IAAI,GAAG,oBAAI,IAAI,KAAK,sBAAsB;;AAStG,IAAa,UAHQ,YAAY,UAAU,SAGpB,CAAA,CAAM;;AAG7B,IAAa,eACX;;;ACKF,IAAM,QAAiC;CACrC;EACE,OAAO;EACP,aAAa,0TAA0T,aAAa;EACpV,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;AACF;;AAKA,IAAa,QAAwC,YAAY,MAAM,SAAS;CAC9E,SAAS,CAAC,QAAQ,SAAS,KAAK,IAAI;CACpC,WACE,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,SAAS,IAC9B,QAAQ,KAAK;GACX,MAAM;GACN,aAAa;EACf,CAAC,CACH;EAEA,MAAM,QAAQ,MAAM,KAAK,SACvB,KAAK,KAAK;GACR,OAAO,KAAK;GACZ,aAAa,KAAK;GAClB,UAAU,KAAK;GACf,QAAQ;GAER,SAAS,CACP;IACE,IAAI,SAAS,OAAO;IACpB,MAAM,QAAQ,CAAC;IACf,OAAO;IACP,aAAa;GACf,CACF;EACF,CAAC,CACH;EACA,OAAO,YAAY,SAAS,SAAS,QAAQ,SAAS,SAAS;GAC7D,QAAQ,QAAQ;EAClB,CAAC;EAED,KAAK,MAAM,CAAC,OAAO,SAAS,MAAM,QAAQ,GACxC,IAAI,QAAQ,GAAG;GACb,MAAM,WAAW,MAAM,QAAQ;GAC/B,IAAI,OAAO,OAAO,SAAS;IACzB,KAAK,YAAY,CAAC,IAAI,KAAK,QAAQ,CAAC;GACtC,CAAC;EACH;EAGF,OAAO;GAAE;GAAS;EAAM;CAC1B,CAAC;AACL,CAAC;;;;;;;;AC/ED,IAAM,SAAS;CACb,OAAO;CACP,OAAO;CACP,SAAS;AACX;;;;;;;;;;;AAYA,IAAa,aACX,YAAY,KAAK;CAGf,OAAO;EAAE,MAAM;EAAe,MAAM;EAAO,KAAK;CAAM;CACtD,WAAW;CACX;CACA,QAAQ,WACN,OAAO,IAAI,aAAa;EACtB,MAAM,QAAQ,OAAO,OAAO,MAAM;EAClC,MAAM,QAAQ,OAAO,OAAO,MAAM;EAClC,OAAO,OAAO,QAAQ;GAAE;GAAO;EAAM,CAAC;CAIxC,CAAC;AACL,CAAC;AAEH,IAAa,qBACX,YAAY,aAAa;CACvB,IAAI;CACJ,aACE;CACF,YAAY,KAAK;AACnB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "react";
|
|
2
1
|
import { Obj } from "@dxos/echo";
|
|
3
|
-
import
|
|
2
|
+
import "react";
|
|
4
3
|
import { mx } from "@dxos/ui-theme";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { JsonHighlighter } from "@dxos/react-ui-syntax-highlighter";
|
|
7
|
-
import { useResizeDetector } from "react-resize-detector";
|
|
8
6
|
import { useAttentionAttributes } from "@dxos/react-ui-attention";
|
|
7
|
+
import * as Layout from "@dxos/react-ui/Layout";
|
|
8
|
+
import { useResizeDetector } from "react-resize-detector";
|
|
9
9
|
//#region src/containers/Wireframe/Wireframe.tsx
|
|
10
10
|
var Wireframe = ({ classNames, label, object }) => {
|
|
11
11
|
const attentionAttrs = useAttentionAttributes(Obj.getURI(object));
|
|
@@ -14,11 +14,11 @@ var Wireframe = ({ classNames, label, object }) => {
|
|
|
14
14
|
ref,
|
|
15
15
|
className: mx("relative grow min-h-96", classNames),
|
|
16
16
|
...attentionAttrs,
|
|
17
|
-
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
17
|
+
children: [/* @__PURE__ */ jsxs(Layout.Flex, {
|
|
18
18
|
column: true,
|
|
19
19
|
gap: "sm",
|
|
20
20
|
classNames: "absolute inset-2 overflow-hidden font-mono",
|
|
21
|
-
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
21
|
+
children: [/* @__PURE__ */ jsxs(Layout.Flex, {
|
|
22
22
|
justify: "between",
|
|
23
23
|
children: [/* @__PURE__ */ jsx("div", { children: label }), /* @__PURE__ */ jsx("div", { children: `[${width}x${height}]` })]
|
|
24
24
|
}), object && /* @__PURE__ */ jsx(JsonHighlighter, {
|
|
@@ -28,7 +28,7 @@ var Wireframe = ({ classNames, label, object }) => {
|
|
|
28
28
|
}), /* @__PURE__ */ jsxs("svg", {
|
|
29
29
|
width,
|
|
30
30
|
height,
|
|
31
|
-
className: "bg-transparent *:text-
|
|
31
|
+
className: "bg-transparent *:text-fg-subtle",
|
|
32
32
|
children: [
|
|
33
33
|
/* @__PURE__ */ jsx("rect", {
|
|
34
34
|
x: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-Wireframe.mjs","names":[],"sources":["../../src/containers/Wireframe/Wireframe.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { Obj } from '@dxos/echo';\nimport {
|
|
1
|
+
{"version":3,"file":"chunk-Wireframe.mjs","names":[],"sources":["../../src/containers/Wireframe/Wireframe.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { Obj } from '@dxos/echo';\nimport { useAttentionAttributes } from '@dxos/react-ui-attention';\nimport { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport type * as Util from '@dxos/react-ui/Util';\nimport { mx } from '@dxos/ui-theme';\n\n// TODO(burdon): Create generic container with wireframe mode.\nexport type WireframeProps = Util.ThemedClassName<{\n object: Obj.Unknown;\n label?: string;\n}>;\n\n// TODO(burdon): Make focusable and attendable with input.\nexport const Wireframe = ({ classNames, label, object }: WireframeProps) => {\n const attentionAttrs = useAttentionAttributes(Obj.getURI(object));\n const { width, height, ref } = useResizeDetector();\n\n return (\n <div ref={ref} className={mx('relative grow min-h-96', classNames)} {...attentionAttrs}>\n <Layout.Flex column gap='sm' classNames='absolute inset-2 overflow-hidden font-mono'>\n <Layout.Flex justify='between'>\n <div>{label}</div>\n <div>{`[${width}x${height}]`}</div>\n </Layout.Flex>\n {object && <JsonHighlighter data={object} classNames='text-xs opacity-75 rounded-sm' />}\n </Layout.Flex>\n <svg width={width} height={height} className='bg-transparent *:text-fg-subtle'>\n <rect x={0} y={0} width={width} height={height} strokeWidth={1} fill='none' />\n <line x1={0} y1={0} x2={width} y2={height} strokeWidth={1} />\n <line x1={0} y1={height} x2={width} y2={0} strokeWidth={1} />\n </svg>\n </div>\n );\n};\n\nWireframe.displayName = 'Wireframe';\n"],"mappings":";;;;;;;;;AAqBA,IAAa,aAAa,EAAE,YAAY,OAAO,aAA6B;CAC1E,MAAM,iBAAiB,uBAAuB,IAAI,OAAO,MAAM,CAAC;CAChE,MAAM,EAAE,OAAO,QAAQ,QAAQ,kBAAkB;CAEjD,OACE,qBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,0BAA0B,UAAU;EAAG,GAAI;EAAxE,UAAA,CACE,qBAAC,OAAO,MAAR;GAAa,QAAA;GAAO,KAAI;GAAK,YAAW;GAAxC,UAAA,CACE,qBAAC,OAAO,MAAR;IAAa,SAAQ;IAArB,UAAA,CACE,oBAAC,OAAD,EAAA,UAAM,MAAW,CAAA,GACjB,oBAAC,OAAD,EAAA,UAAM,IAAI,MAAM,GAAG,OAAO,GAAQ,CAAA,CACvB;GACZ,CAAA,GAAA,UAAU,oBAAC,iBAAD;IAAiB,MAAM;IAAQ,YAAW;GAAiC,CAAA,CAC3E;EACb,CAAA,GAAA,qBAAC,OAAD;GAAY;GAAe;GAAQ,WAAU;GAA7C,UAAA;IACE,oBAAC,QAAD;KAAM,GAAG;KAAG,GAAG;KAAU;KAAe;KAAQ,aAAa;KAAG,MAAK;IAAQ,CAAA;IAC7E,oBAAC,QAAD;KAAM,IAAI;KAAG,IAAI;KAAG,IAAI;KAAO,IAAI;KAAQ,aAAa;IAAI,CAAA;IAC5D,oBAAC,QAAD;KAAM,IAAI;KAAG,IAAI;KAAQ,IAAI;KAAO,IAAI;KAAG,aAAa;IAAI,CAAA;GACzD;EACF,CAAA,CAAA;;AAET;AAEA,UAAU,cAAc"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as SampleSpace from "@dxos/app-toolkit/SampleSpace";
|
|
4
|
+
import { Database, Obj, Ref } from "@dxos/echo";
|
|
5
|
+
import * as Instructions from "@dxos/compute/Instructions";
|
|
6
|
+
import * as Project from "@dxos/compute/Project";
|
|
7
|
+
import { EntityId } from "@dxos/echo/Key";
|
|
8
|
+
import { Outline, Task, TaskSet } from "@dxos/types";
|
|
9
|
+
import { Text } from "@dxos/schema";
|
|
10
|
+
//#region src/samples/worker/project.ts
|
|
11
|
+
var INSTRUCTIONS = `Deploy the Worker described by the task list, working the tasks in order and \
|
|
12
|
+
setting each one's status as you finish it: the task list is how I follow this run.
|
|
13
|
+
|
|
14
|
+
What the Worker does is the whole specification — one fetch handler, JSON out, a greeting and the \
|
|
15
|
+
current UTC time. There is no design stage and nothing to choose. If a step starts to look like \
|
|
16
|
+
architecture, it is the wrong step.
|
|
17
|
+
|
|
18
|
+
Write the code yourself in one sandbox, driving it through the Sandbox skill \
|
|
19
|
+
(\`org.dxos.skill.sandbox\`). The sandbox image ships a coding agent of its own; do not delegate to \
|
|
20
|
+
it — it has none of this space's context, and its output would land on a container filesystem \
|
|
21
|
+
rather than in this project.
|
|
22
|
+
|
|
23
|
+
The container is not durable, so file what has to outlive it — the Worker URL, the response body — \
|
|
24
|
+
as artifacts on this project in the turn you produce it, not at the end. The claim URL that the \
|
|
25
|
+
deploy prints is a bearer credential for the account: give it to me directly and file it nowhere.
|
|
26
|
+
|
|
27
|
+
This project needs no Cloudflare login and no API keys. If a step seems to need either, that is the \
|
|
28
|
+
wrong step.`;
|
|
29
|
+
/**
|
|
30
|
+
* The work-stream. It adopts the task set the tasks phase built (`Project.make` would otherwise
|
|
31
|
+
* create its own empty one), and starts with no artifacts: the URL and the response are what the
|
|
32
|
+
* run produces, and seeding either would name something that does not exist.
|
|
33
|
+
*/
|
|
34
|
+
var ProjectPhase = SampleSpace.phase("project", {
|
|
35
|
+
schemas: [
|
|
36
|
+
Project.Project,
|
|
37
|
+
Instructions.Instructions,
|
|
38
|
+
Outline.Outline,
|
|
39
|
+
Text.Text
|
|
40
|
+
],
|
|
41
|
+
run: ({ tasks }) => Effect.gen(function* () {
|
|
42
|
+
const instructions = yield* Database.add(Instructions.make({
|
|
43
|
+
name: "Hello Worker",
|
|
44
|
+
text: INSTRUCTIONS,
|
|
45
|
+
objects: [Ref.make(tasks.taskSet)]
|
|
46
|
+
}));
|
|
47
|
+
return {
|
|
48
|
+
project: yield* Database.add(Project.make({
|
|
49
|
+
name: "Hello Worker",
|
|
50
|
+
description: "One Cloudflare Worker that answers with a greeting and the time, deployed from a sandbox with no Cloudflare account.",
|
|
51
|
+
status: "active",
|
|
52
|
+
instructions: Ref.make(instructions),
|
|
53
|
+
taskSet: Ref.make(tasks.taskSet)
|
|
54
|
+
})),
|
|
55
|
+
instructions
|
|
56
|
+
};
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/samples/worker/util.ts
|
|
61
|
+
/** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */
|
|
62
|
+
var REFERENCE = process.env.NOW ? new Date(process.env.NOW) : /* @__PURE__ */ new Date("2026-05-20T15:00:00Z");
|
|
63
|
+
/** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */
|
|
64
|
+
var daysAgo = SampleSpace.makeClock(REFERENCE).daysAgo;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/samples/worker/tasks.ts
|
|
67
|
+
var STEPS = [
|
|
68
|
+
{
|
|
69
|
+
title: "Create a sandbox and install wrangler",
|
|
70
|
+
description: "One sandbox for the whole run — it keeps its filesystem between commands, so a second one pays for node and wrangler again. `--temporary` needs wrangler 4.102 or later and that wrangler needs Node 22, while the sandbox runs Node 20: install `wrangler@latest` explicitly and run its script under a newer node — `npx --yes node@22 node_modules/wrangler/bin/wrangler.js` — since a plain install resolves to the last version that fits Node 20 and has no flag. Creating one and running commands in it belong to the Sandbox skill.",
|
|
71
|
+
estimate: "s"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: "Write the Worker",
|
|
75
|
+
description: "A TypeScript Worker whose fetch handler answers every request with JSON: a greeting and the current UTC time. No router, no dependencies, no build step beyond wrangler's own.",
|
|
76
|
+
estimate: "xs"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: "Deploy it with no Cloudflare login",
|
|
80
|
+
description: "`wrangler deploy --temporary` mints a temporary account and prints a Worker URL and a claim URL; plain `wrangler deploy` refuses non-interactively and demands a token, so the flag is not optional. File the Worker URL on the project. The claim URL is a bearer credential — hand it straight to me and file it nowhere.",
|
|
81
|
+
estimate: "s"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: "Fetch the deployed URL and check the response",
|
|
85
|
+
description: "Fetch it and paste the body into the project. A deploy command that exited zero is not evidence that anything is serving.",
|
|
86
|
+
estimate: "xs"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
title: "Claim the temporary Cloudflare account",
|
|
90
|
+
description: "Yours to do: claiming signs the account into yours, which needs a browser the agent does not have. It comes after the last deploy — 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.",
|
|
91
|
+
estimate: "xs",
|
|
92
|
+
assignee: {
|
|
93
|
+
role: "user",
|
|
94
|
+
name: "You"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
/** The five steps, each depending on the one before it. */
|
|
99
|
+
var Tasks = SampleSpace.phase("tasks", {
|
|
100
|
+
schemas: [TaskSet.TaskSet, Task.Task],
|
|
101
|
+
run: () => Effect.gen(function* () {
|
|
102
|
+
const taskSet = yield* Database.add(TaskSet.make({
|
|
103
|
+
name: "Hello Worker",
|
|
104
|
+
description: "From an empty sandbox to a URL that answers."
|
|
105
|
+
}));
|
|
106
|
+
const tasks = STEPS.map((step) => Task.make({
|
|
107
|
+
title: step.title,
|
|
108
|
+
description: step.description,
|
|
109
|
+
estimate: step.estimate,
|
|
110
|
+
assignee: step.assignee,
|
|
111
|
+
status: "todo",
|
|
112
|
+
history: [{
|
|
113
|
+
id: EntityId.random(),
|
|
114
|
+
date: daysAgo(0),
|
|
115
|
+
event: "created",
|
|
116
|
+
description: "Filed from the worker template."
|
|
117
|
+
}]
|
|
118
|
+
}));
|
|
119
|
+
yield* SampleSpace.children(taskSet, tasks, (taskSet, refs) => {
|
|
120
|
+
taskSet.tasks = refs;
|
|
121
|
+
});
|
|
122
|
+
for (const [index, task] of tasks.entries()) if (index > 0) {
|
|
123
|
+
const previous = tasks[index - 1];
|
|
124
|
+
Obj.update(task, (task) => {
|
|
125
|
+
task.dependsOn = [Ref.make(previous)];
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
taskSet,
|
|
130
|
+
tasks
|
|
131
|
+
};
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/samples/worker/WorkerSpace.ts
|
|
136
|
+
var WorkerSpace_exports = /* @__PURE__ */ __exportAll({
|
|
137
|
+
make: () => make,
|
|
138
|
+
makeTemplate: () => makeTemplate
|
|
139
|
+
});
|
|
140
|
+
var phases = {
|
|
141
|
+
tasks: Tasks,
|
|
142
|
+
project: ProjectPhase
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* The smallest thing that still builds and deploys: one Cloudflare Worker returning a greeting and
|
|
146
|
+
* the time, as five tasks from an empty sandbox to a URL that answers.
|
|
147
|
+
*
|
|
148
|
+
* It is the short path through the same ground `StockfishSpace` covers at length. There the work is
|
|
149
|
+
* the engine and the deploy is one stage of five; here the deploy IS the project, so there is no
|
|
150
|
+
* brief to design against, no skill to bind and nothing seeded for the run to point at — a chat
|
|
151
|
+
* that reads the task list has the whole specification.
|
|
152
|
+
*
|
|
153
|
+
* Reachable with no credentials but the reader's own DXOS identity: the first deploy uses wrangler's
|
|
154
|
+
* unauthenticated mode, and the single consent screen is the last task.
|
|
155
|
+
*/
|
|
156
|
+
var make = () => SampleSpace.make({
|
|
157
|
+
space: {
|
|
158
|
+
name: "Hello Worker",
|
|
159
|
+
icon: "rocket-launch",
|
|
160
|
+
hue: "cyan"
|
|
161
|
+
},
|
|
162
|
+
reference: REFERENCE,
|
|
163
|
+
phases,
|
|
164
|
+
build: (phases) => Effect.gen(function* () {
|
|
165
|
+
const tasks = yield* phases.tasks();
|
|
166
|
+
yield* phases.project({ tasks });
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
var makeTemplate = () => SampleSpace.makeTemplate({
|
|
170
|
+
id: "org.dxos.plugin-debug.template.worker",
|
|
171
|
+
description: "Five tasks from an empty sandbox to a Cloudflare Worker that answers, with no account to start.",
|
|
172
|
+
definition: make()
|
|
173
|
+
});
|
|
174
|
+
//#endregion
|
|
175
|
+
export { make as n, makeTemplate as r, WorkerSpace_exports as t };
|
|
176
|
+
|
|
177
|
+
//# sourceMappingURL=chunk-WorkerSpace.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-WorkerSpace.mjs","names":[],"sources":["../../src/samples/worker/project.ts","../../src/samples/worker/util.ts","../../src/samples/worker/tasks.ts","../../src/samples/worker/WorkerSpace.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport * as Instructions from '@dxos/compute/Instructions';\nimport * as Project from '@dxos/compute/Project';\nimport { Database, Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { Outline } from '@dxos/types';\n\nimport { type TasksResult } from './tasks.ts';\n\nexport type ProjectInput = { tasks: TasksResult };\n\nexport type ProjectResult = { project: Project.Project; instructions: Instructions.Instructions };\n\nconst INSTRUCTIONS = `Deploy the Worker described by the task list, working the tasks in order and \\\nsetting each one's status as you finish it: the task list is how I follow this run.\n\nWhat the Worker does is the whole specification — one fetch handler, JSON out, a greeting and the \\\ncurrent UTC time. There is no design stage and nothing to choose. If a step starts to look like \\\narchitecture, it is the wrong step.\n\nWrite the code yourself in one sandbox, driving it through the Sandbox skill \\\n(\\`org.dxos.skill.sandbox\\`). The sandbox image ships a coding agent of its own; do not delegate to \\\nit — it has none of this space's context, and its output would land on a container filesystem \\\nrather than in this project.\n\nThe container is not durable, so file what has to outlive it — the Worker URL, the response body — \\\nas artifacts on this project in the turn you produce it, not at the end. The claim URL that the \\\ndeploy prints is a bearer credential for the account: give it to me directly and file it nowhere.\n\nThis project needs no Cloudflare login and no API keys. If a step seems to need either, that is the \\\nwrong step.`;\n\n/**\n * The work-stream. It adopts the task set the tasks phase built (`Project.make` would otherwise\n * create its own empty one), and starts with no artifacts: the URL and the response are what the\n * run produces, and seeding either would name something that does not exist.\n */\nexport const ProjectPhase: SampleSpace.Phase<ProjectResult, ProjectInput> = SampleSpace.phase('project', {\n // Neither `Outline.Outline` nor `Text.Text` is created here directly: `Project.make` builds an\n // outline for the project, and the instructions' prose is stored as a Text. A phase has to declare\n // every type it persists or the space cannot register it.\n schemas: [Project.Project, Instructions.Instructions, Outline.Outline, Text.Text],\n run: ({ tasks }: ProjectInput) =>\n Effect.gen(function* () {\n const instructions = yield* Database.add(\n Instructions.make({\n name: 'Hello Worker',\n text: INSTRUCTIONS,\n objects: [Ref.make(tasks.taskSet)],\n }),\n );\n\n const project = yield* Database.add(\n Project.make({\n name: 'Hello Worker',\n description:\n 'One Cloudflare Worker that answers with a greeting and the time, deployed from a sandbox with no Cloudflare account.',\n status: 'active',\n instructions: Ref.make(instructions),\n taskSet: Ref.make(tasks.taskSet),\n }),\n );\n\n return { project, instructions };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\n/** Stable reference date so regenerations are reproducible. Override with NOW=2026-05-20 env. */\nexport const REFERENCE = process.env.NOW ? new Date(process.env.NOW) : new Date('2026-05-20T15:00:00Z');\n\n/**\n * Bound to the same reference the definition declares, so the pure content builders can date their\n * objects without every one of them being an effect.\n */\nexport const clock = SampleSpace.makeClock(REFERENCE);\n\n/** ISO timestamp that many days before {@link REFERENCE}, at an optional UTC hour of that day. */\nexport const daysAgo = clock.daysAgo;\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\nimport { Database, Obj, Ref } from '@dxos/echo';\nimport { EntityId } from '@dxos/echo/Key';\nimport { Actor, Task, TaskSet } from '@dxos/types';\n\nimport { daysAgo } from './util.ts';\n\n//\n// Five steps, flat and in order.\n//\n// Flat on purpose: the whole run is one afternoon's work, and a tree would imply stages that can be\n// planned against each other. Everything is `todo` — this is a plan to run, not a project caught\n// mid-flight — and each step depends on the one before it, so a runner working ahead is visibly out\n// of order rather than merely early.\n//\n\ntype TaskSeed = {\n readonly title: string;\n readonly description: string;\n readonly estimate?: Task.Estimate;\n /** Set where the step needs the reader's own hands — here, the one browser consent screen. */\n readonly assignee?: Actor.Actor;\n};\n\n/**\n * The reader, as an assignee. A template cannot know who they are, so the actor carries the role and\n * a label rather than a Person ref — enough for the row to say the step is not the agent's.\n */\nconst USER: Actor.Actor = { role: 'user', name: 'You' };\n\nconst STEPS: ReadonlyArray<TaskSeed> = [\n {\n title: 'Create a sandbox and install wrangler',\n description:\n 'One sandbox for the whole run — it keeps its filesystem between commands, so a second one pays for node and wrangler again. `--temporary` needs wrangler 4.102 or later and that wrangler needs Node 22, while the sandbox runs Node 20: install `wrangler@latest` explicitly and run its script under a newer node — `npx --yes node@22 node_modules/wrangler/bin/wrangler.js` — since a plain install resolves to the last version that fits Node 20 and has no flag. Creating one and running commands in it belong to the Sandbox skill.',\n estimate: 's',\n },\n {\n title: 'Write the Worker',\n description:\n \"A TypeScript Worker whose fetch handler answers every request with JSON: a greeting and the current UTC time. No router, no dependencies, no build step beyond wrangler's own.\",\n estimate: 'xs',\n },\n {\n title: 'Deploy it with no Cloudflare login',\n description:\n '`wrangler deploy --temporary` mints a temporary account and prints a Worker URL and a claim URL; plain `wrangler deploy` refuses non-interactively and demands a token, so the flag is not optional. File the Worker URL on the project. The claim URL is a bearer credential — hand it straight to me and file it nowhere.',\n estimate: 's',\n },\n {\n title: 'Fetch the deployed URL and check the response',\n description:\n 'Fetch it and paste the body into the project. A deploy command that exited zero is not evidence that anything is serving.',\n estimate: 'xs',\n },\n {\n title: 'Claim the temporary Cloudflare account',\n description:\n 'Yours to do: claiming signs the account into yours, which needs a browser the agent does not have. It comes after the last deploy — an agent with no login cannot update a claimed account, and `--temporary` would mint a second one under a different URL. Do it inside the hour; the account expires with the Worker on it.',\n estimate: 'xs',\n assignee: USER,\n },\n];\n\nexport type TasksResult = { taskSet: TaskSet.TaskSet; tasks: Task.Task[] };\n\n/** The five steps, each depending on the one before it. */\nexport const Tasks: SampleSpace.Phase<TasksResult> = SampleSpace.phase('tasks', {\n schemas: [TaskSet.TaskSet, Task.Task],\n run: () =>\n Effect.gen(function* () {\n const taskSet = yield* Database.add(\n TaskSet.make({\n name: 'Hello Worker',\n description: 'From an empty sandbox to a URL that answers.',\n }),\n );\n\n const tasks = STEPS.map((step) =>\n Task.make({\n title: step.title,\n description: step.description,\n estimate: step.estimate,\n assignee: step.assignee,\n status: 'todo',\n // Task carries no due date; its dates are activity-log lines, so that is where they go.\n history: [\n {\n id: EntityId.random(),\n date: daysAgo(0),\n event: 'created' as const,\n description: 'Filed from the worker template.',\n },\n ],\n }),\n );\n yield* SampleSpace.children(taskSet, tasks, (taskSet, refs) => {\n taskSet.tasks = refs;\n });\n\n // Nothing can be deployed before it is written, and nothing claimed before it is deployed.\n for (const [index, task] of tasks.entries()) {\n if (index > 0) {\n const previous = tasks[index - 1];\n Obj.update(task, (task) => {\n task.dependsOn = [Ref.make(previous)];\n });\n }\n }\n\n return { taskSet, tasks };\n }),\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\n\nimport type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as SampleSpace from '@dxos/app-toolkit/SampleSpace';\n\nimport { ProjectPhase } from './project.ts';\nimport { Tasks } from './tasks.ts';\nimport { REFERENCE } from './util.ts';\n\nconst phases = {\n tasks: Tasks,\n project: ProjectPhase,\n};\n\n/**\n * The smallest thing that still builds and deploys: one Cloudflare Worker returning a greeting and\n * the time, as five tasks from an empty sandbox to a URL that answers.\n *\n * It is the short path through the same ground `StockfishSpace` covers at length. There the work is\n * the engine and the deploy is one stage of five; here the deploy IS the project, so there is no\n * brief to design against, no skill to bind and nothing seeded for the run to point at — a chat\n * that reads the task list has the whole specification.\n *\n * Reachable with no credentials but the reader's own DXOS identity: the first deploy uses wrangler's\n * unauthenticated mode, and the single consent screen is the last task.\n */\nexport const make = (): SampleSpace.Definition<typeof phases, void> =>\n SampleSpace.make({\n // Reaches a space only where the definition is applied directly (the generator panel, the\n // archive test): the create-space dialog takes its icon from `space-templates.ts`, which\n // overrides every template's by list index. See DESIGN.md §7.\n space: { name: 'Hello Worker', icon: 'rocket-launch', hue: 'cyan' },\n reference: REFERENCE,\n phases,\n build: (phases) =>\n Effect.gen(function* () {\n const tasks = yield* phases.tasks();\n yield* phases.project({ tasks });\n\n // No root collection: the root holds collections only, and this space seeds no documents —\n // the project and its tasks surface through their own containers.\n }),\n });\n\nexport const makeTemplate = (): AppCapabilities.SpaceTemplate =>\n SampleSpace.makeTemplate({\n id: 'org.dxos.plugin-debug.template.worker',\n description: 'Five tasks from an empty sandbox to a Cloudflare Worker that answers, with no account to start.',\n definition: make(),\n });\n"],"mappings":";;;;;;;;;;AAmBA,IAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;AAwBrB,IAAa,eAA+D,YAAY,MAAM,WAAW;CAIvG,SAAS;EAAC,QAAQ;EAAS,aAAa;EAAc,QAAQ;EAAS,KAAK;CAAI;CAChF,MAAM,EAAE,YACN,OAAO,IAAI,aAAa;EACtB,MAAM,eAAe,OAAO,SAAS,IACnC,aAAa,KAAK;GAChB,MAAM;GACN,MAAM;GACN,SAAS,CAAC,IAAI,KAAK,MAAM,OAAO,CAAC;EACnC,CAAC,CACH;EAaA,OAAO;GAAE,SAAA,OAXc,SAAS,IAC9B,QAAQ,KAAK;IACX,MAAM;IACN,aACE;IACF,QAAQ;IACR,cAAc,IAAI,KAAK,YAAY;IACnC,SAAS,IAAI,KAAK,MAAM,OAAO;GACjC,CAAC,CACH;GAEkB;EAAa;CACjC,CAAC;AACL,CAAC;;;;AChED,IAAa,YAAY,QAAQ,IAAI,MAAM,IAAI,KAAK,QAAQ,IAAI,GAAG,oBAAI,IAAI,KAAK,sBAAsB;;AAStG,IAAa,UAHQ,YAAY,UAAU,SAGpB,CAAA,CAAM;;;ACoB7B,IAAM,QAAiC;CACrC;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;CACZ;CACA;EACE,OAAO;EACP,aACE;EACF,UAAU;EACV,UAAU;GAhCc,MAAM;GAAQ,MAAM;EAgClC;CACZ;AACF;;AAKA,IAAa,QAAwC,YAAY,MAAM,SAAS;CAC9E,SAAS,CAAC,QAAQ,SAAS,KAAK,IAAI;CACpC,WACE,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,SAAS,IAC9B,QAAQ,KAAK;GACX,MAAM;GACN,aAAa;EACf,CAAC,CACH;EAEA,MAAM,QAAQ,MAAM,KAAK,SACvB,KAAK,KAAK;GACR,OAAO,KAAK;GACZ,aAAa,KAAK;GAClB,UAAU,KAAK;GACf,UAAU,KAAK;GACf,QAAQ;GAER,SAAS,CACP;IACE,IAAI,SAAS,OAAO;IACpB,MAAM,QAAQ,CAAC;IACf,OAAO;IACP,aAAa;GACf,CACF;EACF,CAAC,CACH;EACA,OAAO,YAAY,SAAS,SAAS,QAAQ,SAAS,SAAS;GAC7D,QAAQ,QAAQ;EAClB,CAAC;EAGD,KAAK,MAAM,CAAC,OAAO,SAAS,MAAM,QAAQ,GACxC,IAAI,QAAQ,GAAG;GACb,MAAM,WAAW,MAAM,QAAQ;GAC/B,IAAI,OAAO,OAAO,SAAS;IACzB,KAAK,YAAY,CAAC,IAAI,KAAK,QAAQ,CAAC;GACtC,CAAC;EACH;EAGF,OAAO;GAAE;GAAS;EAAM;CAC1B,CAAC;AACL,CAAC;;;;;;;ACvGD,IAAM,SAAS;CACb,OAAO;CACP,SAAS;AACX;;;;;;;;;;;;;AAcA,IAAa,aACX,YAAY,KAAK;CAIf,OAAO;EAAE,MAAM;EAAgB,MAAM;EAAiB,KAAK;CAAO;CAClE,WAAW;CACX;CACA,QAAQ,WACN,OAAO,IAAI,aAAa;EACtB,MAAM,QAAQ,OAAO,OAAO,MAAM;EAClC,OAAO,OAAO,QAAQ,EAAE,MAAM,CAAC;CAIjC,CAAC;AACL,CAAC;AAEH,IAAa,qBACX,YAAY,aAAa;CACvB,IAAI;CACJ,aAAa;CACb,YAAY,KAAK;AACnB,CAAC"}
|