@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,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { buildArchive, histogram } from '@dxos/app-toolkit/testing';
|
|
8
|
+
import * as EffectEx from '@dxos/effect/EffectEx';
|
|
9
|
+
|
|
10
|
+
import * as TidepoolSpace from './TidepoolSpace.ts';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The Tidepool template is built on demand rather than committed, so this asserts its shape in
|
|
14
|
+
* place of a fixture: if a schema it seeds changes incompatibly, the build fails here.
|
|
15
|
+
*/
|
|
16
|
+
describe('Tidepool template', () => {
|
|
17
|
+
test('builds an archive with the whole project graph', { timeout: 120_000 }, async ({ expect }) => {
|
|
18
|
+
const { json, objectCount } = await EffectEx.runPromise(buildArchive(TidepoolSpace.make()));
|
|
19
|
+
const counts = histogram(json);
|
|
20
|
+
const countOf = (typename: string) =>
|
|
21
|
+
Object.entries(counts)
|
|
22
|
+
.filter(([type]) => type.includes(typename))
|
|
23
|
+
.reduce((total, [, count]) => total + count, 0);
|
|
24
|
+
|
|
25
|
+
expect(objectCount).toBeGreaterThan(0);
|
|
26
|
+
expect(countOf('type.project')).toBe(1);
|
|
27
|
+
expect(countOf('type.repo')).toBe(1);
|
|
28
|
+
expect(countOf('type.taskSet')).toBe(1);
|
|
29
|
+
expect(countOf('type.milestone')).toBe(3);
|
|
30
|
+
expect(countOf('type.organization')).toBe(2);
|
|
31
|
+
expect(countOf('type.person')).toBe(6);
|
|
32
|
+
expect(countOf('type.document')).toBe(3);
|
|
33
|
+
expect(countOf('type.outline')).toBe(1);
|
|
34
|
+
// Six roots, eleven sub-tasks (three of them one level deeper).
|
|
35
|
+
expect(countOf('type.task:')).toBe(17);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Same budget as above: this also boots a client and builds the whole space, which a shared CI
|
|
39
|
+
// runner with coverage instrumentation does not finish inside the 15s default.
|
|
40
|
+
test('files every sub-task under a parent, at two levels', { timeout: 120_000 }, async ({ expect }) => {
|
|
41
|
+
const { json } = await EffectEx.runPromise(buildArchive(TidepoolSpace.make()));
|
|
42
|
+
const objects: Array<{ '@type'?: string; 'id': string; 'title'?: string; 'subtasks'?: unknown }> =
|
|
43
|
+
JSON.parse(json).objects;
|
|
44
|
+
const tasks = objects.filter((object) => object['@type']?.includes('type.task:'));
|
|
45
|
+
// Refs serialize as an envelope, so a parent's `subtasks` are matched by id within it.
|
|
46
|
+
const childrenOf = (parent: (typeof tasks)[number] | undefined) => {
|
|
47
|
+
const listed = JSON.stringify(parent?.subtasks ?? []);
|
|
48
|
+
return tasks.filter((task) => listed.includes(task.id));
|
|
49
|
+
};
|
|
50
|
+
const children = tasks.flatMap((task) => childrenOf(task));
|
|
51
|
+
|
|
52
|
+
expect(tasks.filter((task) => !children.includes(task))).toHaveLength(6);
|
|
53
|
+
expect(children).toHaveLength(11);
|
|
54
|
+
|
|
55
|
+
// The migration sub-task has children of its own — the level Bramble's flat task set never
|
|
56
|
+
// exercised.
|
|
57
|
+
const migration = tasks.find((task) => task.title?.startsWith('Migrate notes written'));
|
|
58
|
+
expect(migration?.id).toBeDefined();
|
|
59
|
+
expect(childrenOf(migration)).toHaveLength(3);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
|
|
9
|
+
import type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
10
|
+
import * as SampleSpace from '@dxos/app-toolkit/SampleSpace';
|
|
11
|
+
import { Ref } from '@dxos/echo';
|
|
12
|
+
|
|
13
|
+
import { Docs } from './docs.ts';
|
|
14
|
+
import { ProjectPhase } from './project.ts';
|
|
15
|
+
import { Tasks } from './tasks.ts';
|
|
16
|
+
import { People, Team } from './team.ts';
|
|
17
|
+
import { REFERENCE } from './util.ts';
|
|
18
|
+
|
|
19
|
+
const phases = {
|
|
20
|
+
team: Team,
|
|
21
|
+
people: People,
|
|
22
|
+
docs: Docs,
|
|
23
|
+
tasks: Tasks,
|
|
24
|
+
project: ProjectPhase,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A software-project template: one repository, one work-stream, a two-level task tree, and the
|
|
29
|
+
* documents a project accumulates — a `.mdl` spec with rule and QA-flow blocks, an architecture note
|
|
30
|
+
* carrying a mermaid diagram, and a decision log.
|
|
31
|
+
*
|
|
32
|
+
* The second `SpaceTemplate` definition, and the reason the phase machinery exists: nothing here is
|
|
33
|
+
* shared with the Bramble space except the builder itself — the seeds, the phases and the world are
|
|
34
|
+
* this space's own.
|
|
35
|
+
*/
|
|
36
|
+
export const make = (): SampleSpace.Definition<typeof phases, void> =>
|
|
37
|
+
SampleSpace.make({
|
|
38
|
+
space: { name: 'Tidepool — Offline sync v2', icon: 'flask', hue: 'cyan' },
|
|
39
|
+
reference: REFERENCE,
|
|
40
|
+
phases,
|
|
41
|
+
build: (phases) =>
|
|
42
|
+
Effect.gen(function* () {
|
|
43
|
+
const organizations = yield* phases.team();
|
|
44
|
+
const people = yield* phases.people(organizations);
|
|
45
|
+
|
|
46
|
+
const docs = yield* phases.docs();
|
|
47
|
+
const tasks = yield* phases.tasks(people);
|
|
48
|
+
yield* phases.project({ docs, tasks });
|
|
49
|
+
|
|
50
|
+
// The root holds collections only. Project/Repo/TaskSet/Task are not collection-item types,
|
|
51
|
+
// so they live directly in the space DB and surface through the project's own containers.
|
|
52
|
+
yield* SampleSpace.collection('Documents', [
|
|
53
|
+
Ref.make(docs.spec),
|
|
54
|
+
Ref.make(docs.architecture),
|
|
55
|
+
Ref.make(docs.decisions),
|
|
56
|
+
]);
|
|
57
|
+
}),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const makeTemplate = (): AppCapabilities.SpaceTemplate =>
|
|
61
|
+
SampleSpace.makeTemplate({
|
|
62
|
+
id: 'org.dxos.plugin-debug.template.tidepool',
|
|
63
|
+
description: 'A work-stream with a two-level task tree, a .mdl spec, an architecture note and a decision log.',
|
|
64
|
+
definition: make(),
|
|
65
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
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 } from '@dxos/echo';
|
|
9
|
+
import * as Markdown from '@dxos/plugin-markdown/Markdown';
|
|
10
|
+
import { Outline } from '@dxos/types';
|
|
11
|
+
|
|
12
|
+
//
|
|
13
|
+
// The documents a software project accumulates: a spec, an architecture note, a decision log and
|
|
14
|
+
// the scratch checklist.
|
|
15
|
+
//
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A `.mdl` spec — the plugin-spec grammar this repo uses for its own plugins: prose under `##`
|
|
19
|
+
* headings, `rule` blocks the agentic review enforces, and `flow` blocks a QA run executes.
|
|
20
|
+
*/
|
|
21
|
+
const SPEC_MDL = `# Sync v2
|
|
22
|
+
|
|
23
|
+
## Design
|
|
24
|
+
|
|
25
|
+
A note is a CRDT sequence plus a plain-text title. The envelope carries a version byte so a client
|
|
26
|
+
that speaks v1 is refused with a typed error instead of failing to parse.
|
|
27
|
+
|
|
28
|
+
Reconciliation is one-way: the device offers its operations, the server replies with what it does
|
|
29
|
+
not hold. Nothing is deleted on either side as part of a sync.
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
\`\`\`rule no-lww-on-bodies
|
|
34
|
+
A note body is never merged by timestamp. Any code path that picks a winner by \`updatedAt\` on
|
|
35
|
+
\`note.body\` is a defect — bodies converge through the sequence CRDT.
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
\`\`\`rule versioned-envelope
|
|
39
|
+
Every payload written to the wire carries the envelope version. A writer that omits it is a defect;
|
|
40
|
+
an unversioned payload on read is rejected, not guessed at.
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
## QA
|
|
44
|
+
|
|
45
|
+
\`\`\`flow QA-1 two devices, one paragraph
|
|
46
|
+
1. Take device A and device B offline.
|
|
47
|
+
2. On A, append a sentence to the second paragraph of "Tide pool survey — bay 3".
|
|
48
|
+
3. On B, correct a word in the same paragraph.
|
|
49
|
+
4. Bring both online.
|
|
50
|
+
5. Both edits are present and the paragraph reads correctly. Neither edit is lost.
|
|
51
|
+
\`\`\`
|
|
52
|
+
|
|
53
|
+
\`\`\`flow QA-2 v1 note on first open
|
|
54
|
+
1. Install the v1 client, write a note, uninstall.
|
|
55
|
+
2. Install this build and open that note.
|
|
56
|
+
3. The note opens, renders, and is converted in place exactly once.
|
|
57
|
+
4. Re-open it. No second conversion is recorded.
|
|
58
|
+
\`\`\`
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
const ARCHITECTURE_MD = `# Architecture
|
|
62
|
+
|
|
63
|
+
Three moving parts. The device owns the truth; the relay only holds what it has been handed.
|
|
64
|
+
|
|
65
|
+
\`\`\`mermaid
|
|
66
|
+
flowchart LR
|
|
67
|
+
subgraph Device
|
|
68
|
+
UI[Editor] --> Store[(Local store)]
|
|
69
|
+
Store --> Queue[Outbox]
|
|
70
|
+
end
|
|
71
|
+
Queue -->|offer ops| Relay
|
|
72
|
+
Relay -->|missing ops| Store
|
|
73
|
+
Relay --> Blobs[(Attachment store)]
|
|
74
|
+
Queue -->|content hash| Blobs
|
|
75
|
+
\`\`\`
|
|
76
|
+
|
|
77
|
+
## Why the outbox is separate from the store
|
|
78
|
+
|
|
79
|
+
A field device is offline for weeks, so the store has to be readable and writable with no network at
|
|
80
|
+
all. Sync is therefore a consumer of the store rather than a layer under it — which is what lets the
|
|
81
|
+
editor be indifferent to connectivity.
|
|
82
|
+
|
|
83
|
+
## Attachments
|
|
84
|
+
|
|
85
|
+
Photos are content-addressed on capture. The device asks the relay which hashes it already holds and
|
|
86
|
+
uploads only the remainder, so a reconnect after two weeks in the field does not re-send the trip.
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
const DECISIONS_MD = `# Decisions
|
|
90
|
+
|
|
91
|
+
## 2026-05-11 — Titles are last-writer-wins, bodies are not
|
|
92
|
+
|
|
93
|
+
A title is one line, usually typed once. Running it through the sequence CRDT costs the same
|
|
94
|
+
machinery as a body and buys a merge nobody asked for: two people renaming a note want to see one
|
|
95
|
+
name win, not a splice of both.
|
|
96
|
+
|
|
97
|
+
Bodies are different — paragraphs are edited concurrently and losing an edit is the bug we set out
|
|
98
|
+
to fix. So: body through the CRDT, title by timestamp, and the rule against timestamp-merging
|
|
99
|
+
bodies is written into SPEC.mdl so a future change has to argue with it.
|
|
100
|
+
|
|
101
|
+
## 2026-05-04 — Version the envelope rather than sniffing it
|
|
102
|
+
|
|
103
|
+
Sniffing works until a v1 payload happens to parse as v2. A version byte turns that into a refusal
|
|
104
|
+
with a readable message, which is what a field team needs to hear.
|
|
105
|
+
|
|
106
|
+
## 2026-04-28 — Convert v1 notes eagerly, in place
|
|
107
|
+
|
|
108
|
+
The alternative — read v1 forever behind a shim — leaves two formats live indefinitely and every
|
|
109
|
+
later change has to handle both. Converting on first open is a one-time cost and it has to be
|
|
110
|
+
idempotent, which is a thing a test can state.
|
|
111
|
+
`;
|
|
112
|
+
|
|
113
|
+
const OUTLINE_MD = `- [x] Agree the envelope version byte
|
|
114
|
+
- [x] Write SPEC.mdl and get Ravi to read it
|
|
115
|
+
- [ ] Decide on conflicting titles
|
|
116
|
+
- [x] Write up the options
|
|
117
|
+
- [ ] Get Noa to sign off
|
|
118
|
+
- [ ] Ask Sung-min what "saved" should look like on the device
|
|
119
|
+
- [ ] Book the Northwind survey window
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
export type DocsResult = {
|
|
123
|
+
spec: Markdown.Document;
|
|
124
|
+
architecture: Markdown.Document;
|
|
125
|
+
decisions: Markdown.Document;
|
|
126
|
+
outline: Outline.Outline;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/** The project's written artifacts, plus the outline that backs its scratch checklist. */
|
|
130
|
+
export const Docs: SampleSpace.Phase<DocsResult> = SampleSpace.phase('docs', {
|
|
131
|
+
schemas: [Markdown.Document, Outline.Outline],
|
|
132
|
+
run: () =>
|
|
133
|
+
Effect.gen(function* () {
|
|
134
|
+
const spec = yield* Database.add(Markdown.make({ name: 'SPEC.mdl', content: SPEC_MDL }));
|
|
135
|
+
const architecture = yield* Database.add(Markdown.make({ name: 'ARCHITECTURE.md', content: ARCHITECTURE_MD }));
|
|
136
|
+
const decisions = yield* Database.add(Markdown.make({ name: 'DECISIONS.md', content: DECISIONS_MD }));
|
|
137
|
+
const outline = yield* Database.add(Outline.make({ name: 'Working notes', content: OUTLINE_MD }));
|
|
138
|
+
return { spec, architecture, decisions, outline };
|
|
139
|
+
}),
|
|
140
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
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 Project from '@dxos/compute/Project';
|
|
9
|
+
import { Database, Ref } from '@dxos/echo';
|
|
10
|
+
import { Repo } from '@dxos/types';
|
|
11
|
+
|
|
12
|
+
import { type DocsResult } from './docs.ts';
|
|
13
|
+
import { type TasksResult } from './tasks.ts';
|
|
14
|
+
|
|
15
|
+
//
|
|
16
|
+
// The repository and the project that ties everything else together.
|
|
17
|
+
//
|
|
18
|
+
|
|
19
|
+
export type ProjectInput = { docs: DocsResult; tasks: TasksResult };
|
|
20
|
+
|
|
21
|
+
export type ProjectResult = { project: Project.Project; repo: Repo.Repo };
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The work-stream itself: it names the repository the work lands in, adopts the task set, and holds
|
|
25
|
+
* the written artifacts in order. `Project.make` would create its own empty task set, so the one
|
|
26
|
+
* built by the tasks phase is passed in explicitly.
|
|
27
|
+
*/
|
|
28
|
+
export const ProjectPhase: SampleSpace.Phase<ProjectResult, ProjectInput> = SampleSpace.phase('project', {
|
|
29
|
+
schemas: [Project.Project, Repo.Repo],
|
|
30
|
+
run: ({ docs, tasks }: ProjectInput) =>
|
|
31
|
+
Effect.gen(function* () {
|
|
32
|
+
const repo = yield* Database.add(
|
|
33
|
+
Repo.make({
|
|
34
|
+
name: 'tidepool',
|
|
35
|
+
owner: 'tidepool',
|
|
36
|
+
url: 'https://github.com/tidepool/tidepool',
|
|
37
|
+
description: 'Offline-first notes for field research.',
|
|
38
|
+
defaultBranch: 'main',
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const project = yield* Database.add(
|
|
43
|
+
Project.make({
|
|
44
|
+
name: 'Offline sync v2',
|
|
45
|
+
description:
|
|
46
|
+
'Make two field devices editing the same note converge without a manual step, in time for the Northwind survey.',
|
|
47
|
+
status: 'active',
|
|
48
|
+
repo: Ref.make(repo),
|
|
49
|
+
taskSet: Ref.make(tasks.taskSet),
|
|
50
|
+
outline: Ref.make(docs.outline),
|
|
51
|
+
artifacts: [Ref.make(docs.spec), Ref.make(docs.architecture), Ref.make(docs.decisions)],
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return { project, repo };
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
@@ -0,0 +1,252 @@
|
|
|
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 { Milestone, Task, TaskSet } from '@dxos/types';
|
|
11
|
+
|
|
12
|
+
import { type PersonKey, type PersonMap } from './team.ts';
|
|
13
|
+
import { daysAgo } from './util.ts';
|
|
14
|
+
|
|
15
|
+
//
|
|
16
|
+
// The task set, authored as a tree.
|
|
17
|
+
//
|
|
18
|
+
// The set lists its root tasks and each task lists its own sub-tasks (`Task.subtasks`), at unbounded
|
|
19
|
+
// depth. The seeds are nested the same way, which keeps the shape of the work visible in the source
|
|
20
|
+
// rather than reconstructable only by following refs.
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
type TaskSeed = {
|
|
24
|
+
readonly title: string;
|
|
25
|
+
readonly status: Task.Status;
|
|
26
|
+
readonly assignee?: PersonKey;
|
|
27
|
+
readonly description?: string;
|
|
28
|
+
readonly priority?: Task.Priority;
|
|
29
|
+
readonly estimate?: Task.Estimate;
|
|
30
|
+
/** Milestone key this task rolls up to; inherited by sub-tasks that do not name their own. */
|
|
31
|
+
readonly milestone?: MilestoneKey;
|
|
32
|
+
readonly subTasks?: ReadonlyArray<TaskSeed>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type MilestoneKey = 'protocol' | 'merge' | 'field';
|
|
36
|
+
|
|
37
|
+
const MILESTONE_SEEDS = [
|
|
38
|
+
{
|
|
39
|
+
key: 'protocol',
|
|
40
|
+
name: 'Sync protocol frozen',
|
|
41
|
+
description: 'Wire format agreed and versioned; no further breaking changes before launch.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: 'merge',
|
|
45
|
+
name: 'Conflict-free merge',
|
|
46
|
+
description: 'Two field devices editing the same note offline converge without a manual step.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: 'field',
|
|
50
|
+
name: 'Northwind field trial',
|
|
51
|
+
description: 'Two weeks offline on the Northwind survey, then a clean reconciliation.',
|
|
52
|
+
},
|
|
53
|
+
] as const;
|
|
54
|
+
|
|
55
|
+
const TASK_SEEDS: ReadonlyArray<TaskSeed> = [
|
|
56
|
+
{
|
|
57
|
+
title: 'Freeze the v2 sync wire format',
|
|
58
|
+
status: 'done',
|
|
59
|
+
assignee: 'ravi',
|
|
60
|
+
priority: 'urgent',
|
|
61
|
+
milestone: 'protocol',
|
|
62
|
+
description: 'Version the envelope so a v1 client is rejected with a readable error, not a parse failure.',
|
|
63
|
+
subTasks: [
|
|
64
|
+
{ title: 'Add a version byte to the envelope', status: 'done', assignee: 'ravi', estimate: 's' },
|
|
65
|
+
{ title: 'Reject v1 payloads with a typed error', status: 'done', assignee: 'ravi', estimate: 's' },
|
|
66
|
+
{
|
|
67
|
+
title: 'Write the format down in SPEC.mdl',
|
|
68
|
+
status: 'done',
|
|
69
|
+
assignee: 'noa',
|
|
70
|
+
estimate: 'xs',
|
|
71
|
+
description: 'The spec is the artifact reviewers read; the code is not.',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Last-writer-wins is not good enough for notes',
|
|
77
|
+
status: 'started',
|
|
78
|
+
assignee: 'ravi',
|
|
79
|
+
priority: 'high',
|
|
80
|
+
milestone: 'merge',
|
|
81
|
+
estimate: 'l',
|
|
82
|
+
description: 'Two people editing the same paragraph offline lose one edit. Move the note body to a CRDT.',
|
|
83
|
+
subTasks: [
|
|
84
|
+
{ title: 'Model the note body as a sequence CRDT', status: 'done', assignee: 'ravi', estimate: 'm' },
|
|
85
|
+
{
|
|
86
|
+
title: 'Decide what happens to conflicting titles',
|
|
87
|
+
status: 'review',
|
|
88
|
+
assignee: 'noa',
|
|
89
|
+
estimate: 's',
|
|
90
|
+
description: 'A title is one line; a CRDT there reads as noise. Written up in DECISIONS.md.',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
title: 'Migrate notes written by the v1 client',
|
|
94
|
+
status: 'started',
|
|
95
|
+
assignee: 'imogen',
|
|
96
|
+
estimate: 'm',
|
|
97
|
+
subTasks: [
|
|
98
|
+
{ title: 'Detect a v1 note on read', status: 'done', assignee: 'imogen', estimate: 's' },
|
|
99
|
+
{ title: 'Convert in place, once, on first open', status: 'started', assignee: 'imogen', estimate: 's' },
|
|
100
|
+
{ title: 'Prove the conversion is idempotent', status: 'todo', assignee: 'lena', estimate: 's' },
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'Attachment sync eats the battery',
|
|
107
|
+
status: 'todo',
|
|
108
|
+
assignee: 'imogen',
|
|
109
|
+
priority: 'high',
|
|
110
|
+
milestone: 'field',
|
|
111
|
+
estimate: 'm',
|
|
112
|
+
description: 'Photos re-upload on every reconnect. Content-address them and skip what the server already has.',
|
|
113
|
+
subTasks: [
|
|
114
|
+
{ title: 'Hash attachments on capture', status: 'todo', assignee: 'imogen', estimate: 's' },
|
|
115
|
+
{ title: 'Ask the server what it already holds', status: 'todo', assignee: 'ravi', estimate: 's' },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: 'Offline state has no affordance in the UI',
|
|
120
|
+
status: 'started',
|
|
121
|
+
assignee: 'theo',
|
|
122
|
+
priority: 'medium',
|
|
123
|
+
milestone: 'field',
|
|
124
|
+
estimate: 's',
|
|
125
|
+
description: 'Sung-min asked how anyone knows whether a note is saved. Nothing in the UI answers that.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
title: 'Two-week offline soak test',
|
|
129
|
+
status: 'blocked',
|
|
130
|
+
assignee: 'lena',
|
|
131
|
+
priority: 'high',
|
|
132
|
+
milestone: 'field',
|
|
133
|
+
estimate: 'l',
|
|
134
|
+
description: 'Blocked on the v1 migration: soaking a format we are about to change proves nothing.',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: 'Cut 2.0-beta.1 for Northwind',
|
|
138
|
+
status: 'todo',
|
|
139
|
+
assignee: 'noa',
|
|
140
|
+
priority: 'medium',
|
|
141
|
+
milestone: 'field',
|
|
142
|
+
estimate: 's',
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
|
|
146
|
+
export type TasksResult = {
|
|
147
|
+
taskSet: TaskSet.TaskSet;
|
|
148
|
+
tasks: Task.Task[];
|
|
149
|
+
milestones: Milestone.Milestone[];
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Depth-first flatten, resolving each seed against its parent's milestone and recording each task's
|
|
154
|
+
* children so they can be filed under it once stored.
|
|
155
|
+
*/
|
|
156
|
+
const buildTasks = (
|
|
157
|
+
seeds: ReadonlyArray<TaskSeed>,
|
|
158
|
+
people: PersonMap,
|
|
159
|
+
milestones: Record<MilestoneKey, Milestone.Milestone>,
|
|
160
|
+
): { tasks: Task.Task[]; roots: Task.Task[]; children: Map<Task.Task, Task.Task[]> } => {
|
|
161
|
+
const tasks: Task.Task[] = [];
|
|
162
|
+
const roots: Task.Task[] = [];
|
|
163
|
+
const children = new Map<Task.Task, Task.Task[]>();
|
|
164
|
+
const visit = (seed: TaskSeed, parent: Task.Task | undefined, milestone: MilestoneKey | undefined) => {
|
|
165
|
+
const key = seed.milestone ?? milestone;
|
|
166
|
+
const task = Task.make({
|
|
167
|
+
title: seed.title,
|
|
168
|
+
status: seed.status,
|
|
169
|
+
description: seed.description,
|
|
170
|
+
priority: seed.priority,
|
|
171
|
+
estimate: seed.estimate,
|
|
172
|
+
assignee: seed.assignee ? { contact: Ref.make(people[seed.assignee]) } : undefined,
|
|
173
|
+
milestone: key ? Ref.make(milestones[key]) : undefined,
|
|
174
|
+
// Task carries no due date; its dates are activity-log lines, so that is where they go.
|
|
175
|
+
history: [
|
|
176
|
+
{
|
|
177
|
+
id: EntityId.random(),
|
|
178
|
+
date: daysAgo(21),
|
|
179
|
+
event: 'created' as const,
|
|
180
|
+
description: 'Filed against the sync v2 work-stream.',
|
|
181
|
+
},
|
|
182
|
+
...(seed.status === 'done'
|
|
183
|
+
? [
|
|
184
|
+
{
|
|
185
|
+
id: EntityId.random(),
|
|
186
|
+
date: daysAgo(9),
|
|
187
|
+
event: 'updated' as const,
|
|
188
|
+
description: 'Status changed to done.',
|
|
189
|
+
},
|
|
190
|
+
]
|
|
191
|
+
: []),
|
|
192
|
+
],
|
|
193
|
+
});
|
|
194
|
+
tasks.push(task);
|
|
195
|
+
if (parent) {
|
|
196
|
+
children.set(parent, [...(children.get(parent) ?? []), task]);
|
|
197
|
+
} else {
|
|
198
|
+
roots.push(task);
|
|
199
|
+
}
|
|
200
|
+
for (const child of seed.subTasks ?? []) {
|
|
201
|
+
visit(child, task, key);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
for (const seed of seeds) {
|
|
206
|
+
visit(seed, undefined, undefined);
|
|
207
|
+
}
|
|
208
|
+
return { tasks, roots, children };
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The project's work: three milestones and a two-level task tree. The set lists the roots and each
|
|
213
|
+
* parent lists its sub-tasks, both written through `SampleSpace.children`.
|
|
214
|
+
*/
|
|
215
|
+
export const Tasks: SampleSpace.Phase<TasksResult, PersonMap> = SampleSpace.phase('tasks', {
|
|
216
|
+
schemas: [TaskSet.TaskSet, Task.Task, Milestone.Milestone],
|
|
217
|
+
run: (people: PersonMap) =>
|
|
218
|
+
Effect.gen(function* () {
|
|
219
|
+
const taskSet = yield* Database.add(
|
|
220
|
+
TaskSet.make({ name: 'Offline sync v2', description: 'Everything that has to land before the field trial.' }),
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
const milestones = yield* SampleSpace.seed(MILESTONE_SEEDS, (seed) =>
|
|
224
|
+
Effect.succeed(Milestone.make({ name: seed.name, description: seed.description })),
|
|
225
|
+
);
|
|
226
|
+
yield* SampleSpace.children(taskSet, Object.values(milestones), (taskSet, refs) => {
|
|
227
|
+
taskSet.milestones = refs;
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
const { tasks, roots, children } = buildTasks(TASK_SEEDS, people, milestones);
|
|
231
|
+
yield* SampleSpace.children(taskSet, roots, (taskSet, refs) => {
|
|
232
|
+
taskSet.tasks = refs;
|
|
233
|
+
});
|
|
234
|
+
for (const [parent, subtasks] of children) {
|
|
235
|
+
yield* SampleSpace.children(parent, subtasks, (parent, refs) => {
|
|
236
|
+
parent.subtasks = refs;
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// One execution dependency, so the blocked soak test reads as blocked for a stated reason
|
|
241
|
+
// rather than by status alone.
|
|
242
|
+
const soak = tasks.find((task) => task.title.startsWith('Two-week offline soak'));
|
|
243
|
+
const migration = tasks.find((task) => task.title.startsWith('Migrate notes written'));
|
|
244
|
+
if (soak && migration) {
|
|
245
|
+
Obj.update(soak, (soak) => {
|
|
246
|
+
soak.dependsOn = [Ref.make(migration)];
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return { taskSet, tasks, milestones: Object.values(milestones) };
|
|
251
|
+
}),
|
|
252
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as SampleSpace from '@dxos/app-toolkit/SampleSpace';
|
|
6
|
+
import { Database, Ref } from '@dxos/echo';
|
|
7
|
+
import { Organization, Person } from '@dxos/types';
|
|
8
|
+
|
|
9
|
+
//
|
|
10
|
+
// The company and the people who show up in tasks, reviews and decisions.
|
|
11
|
+
//
|
|
12
|
+
|
|
13
|
+
export type OrgKey = 'tidepool' | 'northwind';
|
|
14
|
+
|
|
15
|
+
export type OrgMap = Record<OrgKey, Organization.Organization>;
|
|
16
|
+
|
|
17
|
+
const ORG_SEEDS = [
|
|
18
|
+
{
|
|
19
|
+
key: 'tidepool',
|
|
20
|
+
name: 'Tidepool',
|
|
21
|
+
description: 'Six-person team building an offline-first notes app for field research.',
|
|
22
|
+
status: 'active',
|
|
23
|
+
website: 'https://tidepool.dev',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: 'northwind',
|
|
27
|
+
name: 'Northwind Marine Lab',
|
|
28
|
+
description: 'Design partner. Their field teams work for weeks with no connectivity.',
|
|
29
|
+
status: 'active',
|
|
30
|
+
website: 'https://northwind-marine.org',
|
|
31
|
+
},
|
|
32
|
+
] as const;
|
|
33
|
+
|
|
34
|
+
export const Team: SampleSpace.Phase<OrgMap> = SampleSpace.phase('team', {
|
|
35
|
+
schemas: [Organization.Organization],
|
|
36
|
+
run: () =>
|
|
37
|
+
SampleSpace.seed(ORG_SEEDS, (seed) =>
|
|
38
|
+
Database.add(
|
|
39
|
+
Organization.make({
|
|
40
|
+
name: seed.name,
|
|
41
|
+
description: seed.description,
|
|
42
|
+
status: seed.status,
|
|
43
|
+
website: seed.website,
|
|
44
|
+
}),
|
|
45
|
+
),
|
|
46
|
+
),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export type PersonKey = 'noa' | 'ravi' | 'imogen' | 'theo' | 'lena' | 'sung';
|
|
50
|
+
|
|
51
|
+
export type PersonMap = Record<PersonKey, Person.Person>;
|
|
52
|
+
|
|
53
|
+
const PERSON_SEEDS = [
|
|
54
|
+
{ key: 'noa', fullName: 'Noa Almeida', jobTitle: 'Engineering lead', orgKey: 'tidepool', email: 'noa@tidepool.dev' },
|
|
55
|
+
{ key: 'ravi', fullName: 'Ravi Menon', jobTitle: 'Sync engineer', orgKey: 'tidepool', email: 'ravi@tidepool.dev' },
|
|
56
|
+
{
|
|
57
|
+
key: 'imogen',
|
|
58
|
+
fullName: 'Imogen Clarke',
|
|
59
|
+
jobTitle: 'Mobile engineer',
|
|
60
|
+
orgKey: 'tidepool',
|
|
61
|
+
email: 'imogen@tidepool.dev',
|
|
62
|
+
},
|
|
63
|
+
{ key: 'theo', fullName: 'Theo Baptiste', jobTitle: 'Designer', orgKey: 'tidepool', email: 'theo@tidepool.dev' },
|
|
64
|
+
{ key: 'lena', fullName: 'Lena Hofer', jobTitle: 'QA', orgKey: 'tidepool', email: 'lena@tidepool.dev' },
|
|
65
|
+
{
|
|
66
|
+
key: 'sung',
|
|
67
|
+
fullName: 'Sung-min Park',
|
|
68
|
+
jobTitle: 'Field research lead',
|
|
69
|
+
orgKey: 'northwind',
|
|
70
|
+
email: 'sungmin@northwind-marine.org',
|
|
71
|
+
},
|
|
72
|
+
] as const;
|
|
73
|
+
|
|
74
|
+
export const People: SampleSpace.Phase<PersonMap, OrgMap> = SampleSpace.phase('people', {
|
|
75
|
+
schemas: [Person.Person],
|
|
76
|
+
run: (organizations: OrgMap) =>
|
|
77
|
+
SampleSpace.seed(PERSON_SEEDS, (seed) =>
|
|
78
|
+
Database.add(
|
|
79
|
+
Person.make({
|
|
80
|
+
fullName: seed.fullName,
|
|
81
|
+
jobTitle: seed.jobTitle,
|
|
82
|
+
organization: Ref.make(organizations[seed.orgKey]),
|
|
83
|
+
emails: [{ label: 'Work', value: seed.email }],
|
|
84
|
+
}),
|
|
85
|
+
),
|
|
86
|
+
),
|
|
87
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export const daysAgo = clock.daysAgo;
|
|
17
|
+
|
|
18
|
+
export const daysFromNow = clock.daysFromNow;
|