@dxos/plugin-pipeline 0.8.4-main.effb148878 → 0.8.4-staging.60fe92afc8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/PLUGIN.mdl +345 -0
  2. package/dist/lib/neutral/PipelinePlugin.mjs +12 -0
  3. package/dist/lib/neutral/PipelinePlugin.mjs.map +4 -4
  4. package/dist/lib/neutral/{PipelineProperties-NFNEU3NR.mjs → PipelineProperties-JZQYG2CN.mjs} +9 -11
  5. package/dist/lib/neutral/PipelineProperties-JZQYG2CN.mjs.map +7 -0
  6. package/dist/lib/neutral/capabilities/index.mjs +1 -1
  7. package/dist/lib/neutral/{chunk-OVZ2ASS7.mjs → chunk-CYXDAAKN.mjs} +6 -4
  8. package/dist/lib/neutral/chunk-CYXDAAKN.mjs.map +7 -0
  9. package/dist/lib/neutral/components/index.mjs +4 -8
  10. package/dist/lib/neutral/components/index.mjs.map +3 -3
  11. package/dist/lib/neutral/containers/index.mjs +1 -1
  12. package/dist/lib/neutral/hooks/index.mjs +3 -4
  13. package/dist/lib/neutral/hooks/index.mjs.map +3 -3
  14. package/dist/lib/neutral/index.mjs +1 -1
  15. package/dist/lib/neutral/meta.json +1 -1
  16. package/dist/lib/neutral/meta.mjs +1 -1
  17. package/dist/lib/neutral/plugin.mjs +1 -1
  18. package/dist/lib/neutral/{react-surface-4W5YLCHT.mjs → react-surface-QG7QSZSS.mjs} +2 -2
  19. package/dist/lib/neutral/{react-surface-4W5YLCHT.mjs.map → react-surface-QG7QSZSS.mjs.map} +1 -1
  20. package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
  21. package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -1
  22. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -1
  23. package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -1
  24. package/dist/types/src/hooks/usePipelineBoardModel.d.ts.map +1 -1
  25. package/dist/types/src/meta.d.ts +1 -1
  26. package/dist/types/src/meta.d.ts.map +1 -1
  27. package/dist/types/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +43 -44
  29. package/src/PipelinePlugin.tsx +6 -0
  30. package/src/capabilities/react-surface.tsx +1 -1
  31. package/src/components/PipelineComponent/PipelineColumn.tsx +4 -13
  32. package/src/containers/PipelineArticle/PipelineArticle.stories.tsx +3 -6
  33. package/src/containers/PipelineProperties/PipelineProperties.tsx +21 -22
  34. package/src/hooks/usePipelineBoardModel.ts +3 -4
  35. package/src/meta.ts +5 -4
  36. package/src/vite-env.d.ts +10 -0
  37. package/dist/lib/neutral/PipelineProperties-NFNEU3NR.mjs.map +0 -7
  38. package/dist/lib/neutral/chunk-OVZ2ASS7.mjs.map +0 -7
package/PLUGIN.mdl ADDED
@@ -0,0 +1,345 @@
1
+ ---
2
+ id: org.dxos.plugin.pipeline
3
+ name: PipelinePlugin
4
+ version: 0.1.0
5
+ ---
6
+
7
+ A multi-column Kanban-style pipeline plugin for DXOS Composer.
8
+ Each Pipeline holds an ordered list of Columns; each Column is backed by a ViewModel
9
+ whose query selects any ECHO object type from the space.
10
+ Objects can be dragged between columns and the pipeline state persists collaboratively via ECHO.
11
+
12
+ ## Extensions
13
+
14
+ | Term | URI |
15
+ |-------------|--------------------------------|
16
+ | `type` | `org.dxos.mdl.type@1.0` |
17
+ | `feat` | `org.dxos.mdl.feat@1.0` |
18
+ | `test` | `org.dxos.mdl.test@1.0` |
19
+ | `component` | `org.dxos.mdl.component@1.0` |
20
+ | `op` | `org.dxos.mdl.op@1.0` |
21
+
22
+ ## Types
23
+
24
+ ```mdl
25
+ type Pipeline
26
+ desc: Root ECHO object (typename org.dxos.type.pipeline). Holds the ordered set of columns.
27
+ echo-type: Pipeline.Pipeline
28
+ fields:
29
+ name?: string
30
+ description?: string
31
+ image?: URL
32
+ columns: Column[]
33
+ invariants:
34
+ - columns maintain insertion order
35
+ - columns array is not exposed in generated forms (FormInputAnnotation = false)
36
+ ```
37
+
38
+ ```mdl
39
+ type Column
40
+ desc: One lane of the pipeline. Backed by a ViewModel whose query determines which objects appear.
41
+ echo-type: Pipeline.Column
42
+ fields:
43
+ name: string
44
+ view: Ref<View.View> # ViewModel containing query AST + JSON schema projection
45
+ order: string[] # explicit ordering of item ids within this column
46
+ invariants:
47
+ - view is a Ref to a ViewModel ECHO object stored in the same space
48
+ - order array tracks drag-reordering; items not in order appear after ordered items
49
+ ```
50
+
51
+ ```mdl
52
+ type ViewModel
53
+ desc: Runtime ECHO object that holds a QueryAST and JSON schema projection for a Column.
54
+ fields:
55
+ query: { ast: QueryAST }
56
+ projection: ProjectionSchema
57
+ jsonSchema: JsonSchema
58
+ ```
59
+
60
+ ## Components
61
+
62
+ ```mdl
63
+ component PipelineArticle
64
+ desc: Full-canvas article surface rendered for a Pipeline object.
65
+ props:
66
+ role: string
67
+ subject: Pipeline.Pipeline
68
+ attendableId?: string
69
+ state:
70
+ model: BoardModel<Pipeline.Column, Obj.Unknown>
71
+ slots:
72
+ toolbar: PipelineComponent.Toolbar
73
+ content: PipelineComponent.Columns
74
+ actions:
75
+ addColumn() → void # opens Settings companion panel
76
+ ```
77
+
78
+ ```mdl
79
+ component PipelineComponent
80
+ desc: Composable component set that renders the Kanban board.
81
+ sub-components:
82
+ Root # context provider for Item renderer and onAddColumn callback
83
+ Content # wraps Board.Root with the board model
84
+ Columns # renders Board.Content with PipelineColumn tiles; handles drag-drop via useEventHandlerAdapter
85
+ Toolbar # single "+" IconButton gated by attention; triggers onAddColumn
86
+ ```
87
+
88
+ ```mdl
89
+ component PipelineProperties
90
+ desc: Settings companion panel for managing pipeline columns.
91
+ props:
92
+ pipeline: Pipeline.Pipeline
93
+ state:
94
+ columns: Pipeline.Column[]
95
+ expandedId?: string # id of the currently expanded column editor
96
+ actions:
97
+ addColumn() → void
98
+ deleteColumn(column) → void
99
+ renameColumn(column, name) → void
100
+ moveColumn(from, to) → void
101
+ setQuery(column, query, target?) → void
102
+ layout: |
103
+ ┌──────────────────────────────────┐
104
+ │ "Views" heading │
105
+ ├──────────────────────────────────┤
106
+ │ List of Column rows │
107
+ │ drag handle | name | delete | │
108
+ │ [expanded: Form + ViewEditor] │
109
+ ├──────────────────────────────────┤
110
+ │ "+" add-column button │
111
+ └──────────────────────────────────┘
112
+ ```
113
+
114
+ ## Operations
115
+
116
+ ```mdl
117
+ op createPipeline
118
+ desc: Creates a new Pipeline ECHO object and adds it to the target space.
119
+ input:
120
+ name?: string
121
+ target?: Space
122
+ targetNodeId?: string
123
+ output: Pipeline.Pipeline
124
+ effects: [echo:write]
125
+ note: Delegates to SpaceOperation.AddObject with hidden=true.
126
+ ```
127
+
128
+ ```mdl
129
+ op createResearchProject
130
+ desc: Built-in template that scaffolds a Research pipeline with Mailbox, Contacts, Organizations, and Notes columns.
131
+ input:
132
+ db: Database.Database
133
+ name?: string
134
+ output: Pipeline.Pipeline
135
+ effects: [echo:write, echo:read]
136
+ note: |
137
+ Requires an existing Mailbox object in the database.
138
+ Returns null when no mailbox is found.
139
+ Creates four ViewModel columns: Mailbox messages, Person contacts,
140
+ Organization contacts, and Markdown documents.
141
+ ```
142
+
143
+ ## Features
144
+
145
+ ```mdl
146
+ feat F-1: Create Pipeline
147
+
148
+ req F-1.1: A new Pipeline is created with an empty columns array.
149
+ req F-1.2: The Pipeline is added to the active space via SpaceOperation.AddObject (hidden=true).
150
+ req F-1.3: The Pipeline appears as an article in Composer.
151
+ req F-1.4: Graph companions "Invocations" and "Automation" are added to the pipeline node.
152
+ ```
153
+
154
+ ```mdl
155
+ feat F-2: Manage Columns
156
+
157
+ req F-2.1:
158
+ when: user clicks "+" in the pipeline toolbar
159
+ then: Settings companion panel opens
160
+
161
+ req F-2.2:
162
+ when: user clicks "+" in PipelineProperties
163
+ then: a new Column is appended with an empty ViewModel and a Filter.nothing() query
164
+
165
+ req F-2.3:
166
+ when: user renames a column
167
+ then: column.name updated immediately via Obj.update
168
+
169
+ req F-2.4:
170
+ when: user deletes a column
171
+ then: Column removed from pipeline.columns; associated ViewModel ECHO object removed from db
172
+
173
+ req F-2.5:
174
+ when: user drags a column to a new position
175
+ then: pipeline.columns reordered via arrayMove
176
+ ```
177
+
178
+ ```mdl
179
+ feat F-3: Column Query
180
+
181
+ req F-3.1:
182
+ when: user changes the query in ViewEditor
183
+ then: column.view.query.ast updated; column.view.projection updated to match new schema
184
+
185
+ req F-3.2:
186
+ when: query targets a feed (queue DXN)
187
+ then: Query.from({ feeds: [queue] }) applied; items ordered newest-first
188
+
189
+ req F-3.3:
190
+ when: query targets the space directly
191
+ then: items ordered by ECHO insertion order
192
+ ```
193
+
194
+ ```mdl
195
+ feat F-4: Drag and Drop
196
+
197
+ req F-4.1:
198
+ when: user drags a Column tile
199
+ then: pipeline.columns reordered; change persisted via Obj.update
200
+
201
+ req F-4.2:
202
+ when: user drags an item between columns
203
+ then: column.order updated to reflect new position
204
+ note: The item itself is not moved to a different ECHO location; only the order array changes.
205
+
206
+ req F-4.3: Only Pipeline.Column objects are accepted as column drop targets (isColumn guard).
207
+ ```
208
+
209
+ ```mdl
210
+ feat F-5: Research Template
211
+
212
+ req F-5.1:
213
+ when: user creates a pipeline from the "org-research" template
214
+ then: Research pipeline created with Mailbox, Contacts, Organizations, and Notes columns
215
+
216
+ req F-5.2: Template creation fails gracefully when no Mailbox exists in the database.
217
+ ```
218
+
219
+ ```mdl
220
+ feat F-6: Invocation Companion
221
+
222
+ req F-6.1:
223
+ when: Pipeline article is open
224
+ then: "Invocations" companion tab shows InvocationTraceContainer for the pipeline's database
225
+
226
+ req F-6.2:
227
+ when: Pipeline article is open
228
+ then: "Automation" companion tab is available for wiring pipeline automation
229
+ ```
230
+
231
+ ## Acceptance
232
+
233
+ ```mdl
234
+ test T-1: New pipeline is empty
235
+ given: user creates a Pipeline article
236
+ then:
237
+ - pipeline.columns is empty
238
+ - pipeline appears in the space object list
239
+ ```
240
+
241
+ ```mdl
242
+ test T-2: Add column
243
+ given: an open Pipeline with no columns
244
+ when: user clicks "+" in PipelineProperties
245
+ then:
246
+ - pipeline.columns.length === 1
247
+ - new column has name === ""
248
+ - new column.view references a ViewModel with Filter.nothing() query
249
+ ```
250
+
251
+ ```mdl
252
+ test T-3: Rename column
253
+ given: a pipeline with one column named "Inbox"
254
+ when: user types "Email" in the column name field
255
+ then: pipeline.columns[0].name === "Email"
256
+ ```
257
+
258
+ ```mdl
259
+ test T-4: Delete column
260
+ given: a pipeline with one column
261
+ when: user deletes the column
262
+ then:
263
+ - pipeline.columns is empty
264
+ - associated ViewModel ECHO object no longer exists in db
265
+ ```
266
+
267
+ ```mdl
268
+ test T-5: Research template
269
+ given: a space with an existing Mailbox
270
+ when: user creates pipeline from "org-research" template
271
+ then:
272
+ - pipeline.columns.length === 4
273
+ - column names are "Mailbox", "Contacts", "Organizations", "Notes"
274
+ ```
275
+
276
+ ```mdl
277
+ test T-6: Research template missing mailbox
278
+ given: a space with no Mailbox
279
+ when: createResearchProject is called
280
+ then: returns null
281
+ ```
282
+
283
+ ---
284
+
285
+ ## Appendix: Extension Definitions
286
+
287
+ ```mdl
288
+ ext type
289
+ uri: org.dxos.mdl.type@1.0
290
+ desc: A named data structure with typed fields and optional literals.
291
+ fields:
292
+ desc?: Prose
293
+ fields?: FieldMap
294
+ literals?: UnionList
295
+ extends?: TypeRef[]
296
+ ```
297
+
298
+ ```mdl
299
+ ext feat
300
+ uri: org.dxos.mdl.feat@1.0
301
+ desc: A named feature grouping one or more requirements.
302
+ fields:
303
+ desc?: Prose
304
+ req: RequirementList
305
+ nesting: self
306
+ ```
307
+
308
+ ```mdl
309
+ ext test
310
+ uri: org.dxos.mdl.test@1.0
311
+ desc: An acceptance scenario expressed as given / when / then steps.
312
+ fields:
313
+ given?: Step | Step[]
314
+ when?: Step | Step[]
315
+ then: Step | Step[]
316
+ tags?: TagList
317
+ ```
318
+
319
+ ```mdl
320
+ ext component
321
+ uri: org.dxos.mdl.component@1.0
322
+ desc: A UI component with props, internal state, slots, actions, and events.
323
+ fields:
324
+ desc?: Prose
325
+ props?: FieldMap
326
+ state?: FieldMap
327
+ slots?: FieldMap
328
+ actions?: ActionMap
329
+ emits?: EventMap
330
+ layout?: CodeBlock
331
+ ```
332
+
333
+ ```mdl
334
+ ext op
335
+ uri: org.dxos.mdl.op@1.0
336
+ desc: A named operation with typed inputs, outputs, and declared effects.
337
+ fields:
338
+ desc?: Prose
339
+ input?: FieldMap
340
+ output?: TypeExpr
341
+ errors?: ErrorMap
342
+ effects?: EffectList
343
+ requires?: ServiceList
344
+ note?: Prose
345
+ ```
@@ -5,6 +5,11 @@ import { Pipeline } from "@dxos/types";
5
5
  import { AppGraphBuilder, CreateObject, ReactSurface } from "#capabilities";
6
6
  import { meta } from "#meta";
7
7
  import { translations } from "#translations";
8
+
9
+ // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-pipeline/PLUGIN.mdl?raw
10
+ var PLUGIN_default = '---\nid: org.dxos.plugin.pipeline\nname: PipelinePlugin\nversion: 0.1.0\n---\n\nA multi-column Kanban-style pipeline plugin for DXOS Composer.\nEach Pipeline holds an ordered list of Columns; each Column is backed by a ViewModel\nwhose query selects any ECHO object type from the space.\nObjects can be dragged between columns and the pipeline state persists collaboratively via ECHO.\n\n## Extensions\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Pipeline\n desc: Root ECHO object (typename org.dxos.type.pipeline). Holds the ordered set of columns.\n echo-type: Pipeline.Pipeline\n fields:\n name?: string\n description?: string\n image?: URL\n columns: Column[]\n invariants:\n - columns maintain insertion order\n - columns array is not exposed in generated forms (FormInputAnnotation = false)\n```\n\n```mdl\ntype Column\n desc: One lane of the pipeline. Backed by a ViewModel whose query determines which objects appear.\n echo-type: Pipeline.Column\n fields:\n name: string\n view: Ref<View.View> # ViewModel containing query AST + JSON schema projection\n order: string[] # explicit ordering of item ids within this column\n invariants:\n - view is a Ref to a ViewModel ECHO object stored in the same space\n - order array tracks drag-reordering; items not in order appear after ordered items\n```\n\n```mdl\ntype ViewModel\n desc: Runtime ECHO object that holds a QueryAST and JSON schema projection for a Column.\n fields:\n query: { ast: QueryAST }\n projection: ProjectionSchema\n jsonSchema: JsonSchema\n```\n\n## Components\n\n```mdl\ncomponent PipelineArticle\n desc: Full-canvas article surface rendered for a Pipeline object.\n props:\n role: string\n subject: Pipeline.Pipeline\n attendableId?: string\n state:\n model: BoardModel<Pipeline.Column, Obj.Unknown>\n slots:\n toolbar: PipelineComponent.Toolbar\n content: PipelineComponent.Columns\n actions:\n addColumn() \u2192 void # opens Settings companion panel\n```\n\n```mdl\ncomponent PipelineComponent\n desc: Composable component set that renders the Kanban board.\n sub-components:\n Root # context provider for Item renderer and onAddColumn callback\n Content # wraps Board.Root with the board model\n Columns # renders Board.Content with PipelineColumn tiles; handles drag-drop via useEventHandlerAdapter\n Toolbar # single "+" IconButton gated by attention; triggers onAddColumn\n```\n\n```mdl\ncomponent PipelineProperties\n desc: Settings companion panel for managing pipeline columns.\n props:\n pipeline: Pipeline.Pipeline\n state:\n columns: Pipeline.Column[]\n expandedId?: string # id of the currently expanded column editor\n actions:\n addColumn() \u2192 void\n deleteColumn(column) \u2192 void\n renameColumn(column, name) \u2192 void\n moveColumn(from, to) \u2192 void\n setQuery(column, query, target?) \u2192 void\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 "Views" heading \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 List of Column rows \u2502\n \u2502 drag handle | name | delete | \u2502\n \u2502 [expanded: Form + ViewEditor] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 "+" add-column button \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop createPipeline\n desc: Creates a new Pipeline ECHO object and adds it to the target space.\n input:\n name?: string\n target?: Space\n targetNodeId?: string\n output: Pipeline.Pipeline\n effects: [echo:write]\n note: Delegates to SpaceOperation.AddObject with hidden=true.\n```\n\n```mdl\nop createResearchProject\n desc: Built-in template that scaffolds a Research pipeline with Mailbox, Contacts, Organizations, and Notes columns.\n input:\n db: Database.Database\n name?: string\n output: Pipeline.Pipeline\n effects: [echo:write, echo:read]\n note: |\n Requires an existing Mailbox object in the database.\n Returns null when no mailbox is found.\n Creates four ViewModel columns: Mailbox messages, Person contacts,\n Organization contacts, and Markdown documents.\n```\n\n## Features\n\n```mdl\nfeat F-1: Create Pipeline\n\n req F-1.1: A new Pipeline is created with an empty columns array.\n req F-1.2: The Pipeline is added to the active space via SpaceOperation.AddObject (hidden=true).\n req F-1.3: The Pipeline appears as an article in Composer.\n req F-1.4: Graph companions "Invocations" and "Automation" are added to the pipeline node.\n```\n\n```mdl\nfeat F-2: Manage Columns\n\n req F-2.1:\n when: user clicks "+" in the pipeline toolbar\n then: Settings companion panel opens\n\n req F-2.2:\n when: user clicks "+" in PipelineProperties\n then: a new Column is appended with an empty ViewModel and a Filter.nothing() query\n\n req F-2.3:\n when: user renames a column\n then: column.name updated immediately via Obj.update\n\n req F-2.4:\n when: user deletes a column\n then: Column removed from pipeline.columns; associated ViewModel ECHO object removed from db\n\n req F-2.5:\n when: user drags a column to a new position\n then: pipeline.columns reordered via arrayMove\n```\n\n```mdl\nfeat F-3: Column Query\n\n req F-3.1:\n when: user changes the query in ViewEditor\n then: column.view.query.ast updated; column.view.projection updated to match new schema\n\n req F-3.2:\n when: query targets a feed (queue DXN)\n then: Query.from({ feeds: [queue] }) applied; items ordered newest-first\n\n req F-3.3:\n when: query targets the space directly\n then: items ordered by ECHO insertion order\n```\n\n```mdl\nfeat F-4: Drag and Drop\n\n req F-4.1:\n when: user drags a Column tile\n then: pipeline.columns reordered; change persisted via Obj.update\n\n req F-4.2:\n when: user drags an item between columns\n then: column.order updated to reflect new position\n note: The item itself is not moved to a different ECHO location; only the order array changes.\n\n req F-4.3: Only Pipeline.Column objects are accepted as column drop targets (isColumn guard).\n```\n\n```mdl\nfeat F-5: Research Template\n\n req F-5.1:\n when: user creates a pipeline from the "org-research" template\n then: Research pipeline created with Mailbox, Contacts, Organizations, and Notes columns\n\n req F-5.2: Template creation fails gracefully when no Mailbox exists in the database.\n```\n\n```mdl\nfeat F-6: Invocation Companion\n\n req F-6.1:\n when: Pipeline article is open\n then: "Invocations" companion tab shows InvocationTraceContainer for the pipeline\'s database\n\n req F-6.2:\n when: Pipeline article is open\n then: "Automation" companion tab is available for wiring pipeline automation\n```\n\n## Acceptance\n\n```mdl\ntest T-1: New pipeline is empty\n given: user creates a Pipeline article\n then:\n - pipeline.columns is empty\n - pipeline appears in the space object list\n```\n\n```mdl\ntest T-2: Add column\n given: an open Pipeline with no columns\n when: user clicks "+" in PipelineProperties\n then:\n - pipeline.columns.length === 1\n - new column has name === ""\n - new column.view references a ViewModel with Filter.nothing() query\n```\n\n```mdl\ntest T-3: Rename column\n given: a pipeline with one column named "Inbox"\n when: user types "Email" in the column name field\n then: pipeline.columns[0].name === "Email"\n```\n\n```mdl\ntest T-4: Delete column\n given: a pipeline with one column\n when: user deletes the column\n then:\n - pipeline.columns is empty\n - associated ViewModel ECHO object no longer exists in db\n```\n\n```mdl\ntest T-5: Research template\n given: a space with an existing Mailbox\n when: user creates pipeline from "org-research" template\n then:\n - pipeline.columns.length === 4\n - column names are "Mailbox", "Contacts", "Organizations", "Notes"\n```\n\n```mdl\ntest T-6: Research template missing mailbox\n given: a space with no Mailbox\n when: createResearchProject is called\n then: returns null\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: A named operation with typed inputs, outputs, and declared effects.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n';
11
+
12
+ // src/PipelinePlugin.tsx
8
13
  var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
9
14
  activate: AppGraphBuilder
10
15
  }), AppPlugin.addCreateObjectModule({
@@ -17,6 +22,13 @@ var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
17
22
  activate: ReactSurface
18
23
  }), AppPlugin.addTranslationsModule({
19
24
  translations
25
+ }), AppPlugin.addPluginAssetModule({
26
+ asset: {
27
+ pluginId: meta.id,
28
+ path: "PLUGIN.mdl",
29
+ content: PLUGIN_default,
30
+ mimeType: "application/x-mdl"
31
+ }
20
32
  }), Plugin.make);
21
33
  var PipelinePlugin_default = PipelinePlugin;
22
34
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/PipelinePlugin.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nimport { AppGraphBuilder, CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const PipelinePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default PipelinePlugin;\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AAEzB,SAASC,iBAAiBC,cAAcC,oBAAoB;AAC5D,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,iBAAiBR,OAAOS,OAAOH,IAAAA,EAAMI,KAChDT,UAAUU,kBAAkB;EAAEC,UAAUT;AAAgB,CAAA,GACxDF,UAAUY,sBAAsB;EAAED,UAAUR;AAAa,CAAA,GACzDH,UAAUa,gBAAgB;EAAEC,QAAQ;IAACb,SAASA;;AAAU,CAAA,GACxDD,UAAUe,iBAAiB;EAAEJ,UAAUP;AAAa,CAAA,GACpDJ,UAAUgB,sBAAsB;EAAEV;AAAa,CAAA,GAC/CP,OAAOkB,IAAI;AAGb,IAAA,yBAAeV;",
6
- "names": ["Plugin", "AppPlugin", "Pipeline", "AppGraphBuilder", "CreateObject", "ReactSurface", "meta", "translations", "PipelinePlugin", "define", "pipe", "addAppGraphModule", "activate", "addCreateObjectModule", "addSchemaModule", "schema", "addSurfaceModule", "addTranslationsModule", "make"]
3
+ "sources": ["../../../src/PipelinePlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-pipeline/PLUGIN.mdl?raw"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nimport { AppGraphBuilder, CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const PipelinePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default PipelinePlugin;\n", "---\nid: org.dxos.plugin.pipeline\nname: PipelinePlugin\nversion: 0.1.0\n---\n\nA multi-column Kanban-style pipeline plugin for DXOS Composer.\nEach Pipeline holds an ordered list of Columns; each Column is backed by a ViewModel\nwhose query selects any ECHO object type from the space.\nObjects can be dragged between columns and the pipeline state persists collaboratively via ECHO.\n\n## Extensions\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Pipeline\n desc: Root ECHO object (typename org.dxos.type.pipeline). Holds the ordered set of columns.\n echo-type: Pipeline.Pipeline\n fields:\n name?: string\n description?: string\n image?: URL\n columns: Column[]\n invariants:\n - columns maintain insertion order\n - columns array is not exposed in generated forms (FormInputAnnotation = false)\n```\n\n```mdl\ntype Column\n desc: One lane of the pipeline. Backed by a ViewModel whose query determines which objects appear.\n echo-type: Pipeline.Column\n fields:\n name: string\n view: Ref<View.View> # ViewModel containing query AST + JSON schema projection\n order: string[] # explicit ordering of item ids within this column\n invariants:\n - view is a Ref to a ViewModel ECHO object stored in the same space\n - order array tracks drag-reordering; items not in order appear after ordered items\n```\n\n```mdl\ntype ViewModel\n desc: Runtime ECHO object that holds a QueryAST and JSON schema projection for a Column.\n fields:\n query: { ast: QueryAST }\n projection: ProjectionSchema\n jsonSchema: JsonSchema\n```\n\n## Components\n\n```mdl\ncomponent PipelineArticle\n desc: Full-canvas article surface rendered for a Pipeline object.\n props:\n role: string\n subject: Pipeline.Pipeline\n attendableId?: string\n state:\n model: BoardModel<Pipeline.Column, Obj.Unknown>\n slots:\n toolbar: PipelineComponent.Toolbar\n content: PipelineComponent.Columns\n actions:\n addColumn() \u2192 void # opens Settings companion panel\n```\n\n```mdl\ncomponent PipelineComponent\n desc: Composable component set that renders the Kanban board.\n sub-components:\n Root # context provider for Item renderer and onAddColumn callback\n Content # wraps Board.Root with the board model\n Columns # renders Board.Content with PipelineColumn tiles; handles drag-drop via useEventHandlerAdapter\n Toolbar # single \"+\" IconButton gated by attention; triggers onAddColumn\n```\n\n```mdl\ncomponent PipelineProperties\n desc: Settings companion panel for managing pipeline columns.\n props:\n pipeline: Pipeline.Pipeline\n state:\n columns: Pipeline.Column[]\n expandedId?: string # id of the currently expanded column editor\n actions:\n addColumn() \u2192 void\n deleteColumn(column) \u2192 void\n renameColumn(column, name) \u2192 void\n moveColumn(from, to) \u2192 void\n setQuery(column, query, target?) \u2192 void\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 \"Views\" heading \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 List of Column rows \u2502\n \u2502 drag handle | name | delete | \u2502\n \u2502 [expanded: Form + ViewEditor] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \"+\" add-column button \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop createPipeline\n desc: Creates a new Pipeline ECHO object and adds it to the target space.\n input:\n name?: string\n target?: Space\n targetNodeId?: string\n output: Pipeline.Pipeline\n effects: [echo:write]\n note: Delegates to SpaceOperation.AddObject with hidden=true.\n```\n\n```mdl\nop createResearchProject\n desc: Built-in template that scaffolds a Research pipeline with Mailbox, Contacts, Organizations, and Notes columns.\n input:\n db: Database.Database\n name?: string\n output: Pipeline.Pipeline\n effects: [echo:write, echo:read]\n note: |\n Requires an existing Mailbox object in the database.\n Returns null when no mailbox is found.\n Creates four ViewModel columns: Mailbox messages, Person contacts,\n Organization contacts, and Markdown documents.\n```\n\n## Features\n\n```mdl\nfeat F-1: Create Pipeline\n\n req F-1.1: A new Pipeline is created with an empty columns array.\n req F-1.2: The Pipeline is added to the active space via SpaceOperation.AddObject (hidden=true).\n req F-1.3: The Pipeline appears as an article in Composer.\n req F-1.4: Graph companions \"Invocations\" and \"Automation\" are added to the pipeline node.\n```\n\n```mdl\nfeat F-2: Manage Columns\n\n req F-2.1:\n when: user clicks \"+\" in the pipeline toolbar\n then: Settings companion panel opens\n\n req F-2.2:\n when: user clicks \"+\" in PipelineProperties\n then: a new Column is appended with an empty ViewModel and a Filter.nothing() query\n\n req F-2.3:\n when: user renames a column\n then: column.name updated immediately via Obj.update\n\n req F-2.4:\n when: user deletes a column\n then: Column removed from pipeline.columns; associated ViewModel ECHO object removed from db\n\n req F-2.5:\n when: user drags a column to a new position\n then: pipeline.columns reordered via arrayMove\n```\n\n```mdl\nfeat F-3: Column Query\n\n req F-3.1:\n when: user changes the query in ViewEditor\n then: column.view.query.ast updated; column.view.projection updated to match new schema\n\n req F-3.2:\n when: query targets a feed (queue DXN)\n then: Query.from({ feeds: [queue] }) applied; items ordered newest-first\n\n req F-3.3:\n when: query targets the space directly\n then: items ordered by ECHO insertion order\n```\n\n```mdl\nfeat F-4: Drag and Drop\n\n req F-4.1:\n when: user drags a Column tile\n then: pipeline.columns reordered; change persisted via Obj.update\n\n req F-4.2:\n when: user drags an item between columns\n then: column.order updated to reflect new position\n note: The item itself is not moved to a different ECHO location; only the order array changes.\n\n req F-4.3: Only Pipeline.Column objects are accepted as column drop targets (isColumn guard).\n```\n\n```mdl\nfeat F-5: Research Template\n\n req F-5.1:\n when: user creates a pipeline from the \"org-research\" template\n then: Research pipeline created with Mailbox, Contacts, Organizations, and Notes columns\n\n req F-5.2: Template creation fails gracefully when no Mailbox exists in the database.\n```\n\n```mdl\nfeat F-6: Invocation Companion\n\n req F-6.1:\n when: Pipeline article is open\n then: \"Invocations\" companion tab shows InvocationTraceContainer for the pipeline's database\n\n req F-6.2:\n when: Pipeline article is open\n then: \"Automation\" companion tab is available for wiring pipeline automation\n```\n\n## Acceptance\n\n```mdl\ntest T-1: New pipeline is empty\n given: user creates a Pipeline article\n then:\n - pipeline.columns is empty\n - pipeline appears in the space object list\n```\n\n```mdl\ntest T-2: Add column\n given: an open Pipeline with no columns\n when: user clicks \"+\" in PipelineProperties\n then:\n - pipeline.columns.length === 1\n - new column has name === \"\"\n - new column.view references a ViewModel with Filter.nothing() query\n```\n\n```mdl\ntest T-3: Rename column\n given: a pipeline with one column named \"Inbox\"\n when: user types \"Email\" in the column name field\n then: pipeline.columns[0].name === \"Email\"\n```\n\n```mdl\ntest T-4: Delete column\n given: a pipeline with one column\n when: user deletes the column\n then:\n - pipeline.columns is empty\n - associated ViewModel ECHO object no longer exists in db\n```\n\n```mdl\ntest T-5: Research template\n given: a space with an existing Mailbox\n when: user creates pipeline from \"org-research\" template\n then:\n - pipeline.columns.length === 4\n - column names are \"Mailbox\", \"Contacts\", \"Organizations\", \"Notes\"\n```\n\n```mdl\ntest T-6: Research template missing mailbox\n given: a space with no Mailbox\n when: createResearchProject is called\n then: returns null\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: A named operation with typed inputs, outputs, and declared effects.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AAEzB,SAASC,iBAAiBC,cAAcC,oBAAoB;AAC5D,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACV7B;;;ADeO,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,sBAAsB;EAAEF,UAAUG;AAAa,CAAA,GACzDL,UAAUM,gBAAgB;EAAEC,QAAQ;IAACC,SAASA;;AAAU,CAAA,GACxDR,UAAUS,iBAAiB;EAAEP,UAAUQ;AAAa,CAAA,GACpDV,UAAUW,sBAAsB;EAAEC;AAAa,CAAA,GAC/CZ,UAAUa,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUjB,KAAKkB;IAAIC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACAxB,OAAOyB,IAAI;AAGb,IAAA,yBAAe1B;",
6
+ "names": ["Plugin", "AppPlugin", "Pipeline", "AppGraphBuilder", "CreateObject", "ReactSurface", "meta", "translations", "PipelinePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addCreateObjectModule", "CreateObject", "addSchemaModule", "schema", "Pipeline", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addPluginAssetModule", "asset", "pluginId", "id", "path", "content", "pluginSpec", "mimeType", "make"]
7
7
  }
@@ -3,7 +3,7 @@ import * as Schema from "effect/Schema";
3
3
  import React, { useCallback, useMemo, useRef, useState } from "react";
4
4
  import { resolveSchemaWithRegistry } from "@dxos/app-toolkit/query";
5
5
  import { useTypeOptions } from "@dxos/app-toolkit/ui";
6
- import { Filter, JsonSchema, Obj, Query, Ref, Tag } from "@dxos/echo";
6
+ import { Filter, JsonSchema, Obj, Query, Ref, Scope, Tag } from "@dxos/echo";
7
7
  import { useObject, useQuery } from "@dxos/react-client/echo";
8
8
  import { IconButton, useAsyncEffect, useTranslation } from "@dxos/react-ui";
9
9
  import { Form, ViewEditor } from "@dxos/react-ui-form";
@@ -45,7 +45,7 @@ var PipelineProperties = ({ classNames, pipeline }) => {
45
45
  if (!view?.query || !db) {
46
46
  return;
47
47
  }
48
- const foundType = await resolveSchemaWithRegistry(db.schemaRegistry, view.query.ast);
48
+ const foundType = await resolveSchemaWithRegistry(db, view.query.ast);
49
49
  if (foundType && foundType !== type) {
50
50
  setType(() => foundType);
51
51
  }
@@ -64,15 +64,13 @@ var PipelineProperties = ({ classNames, pipeline }) => {
64
64
  return;
65
65
  }
66
66
  const queue = target;
67
- const query = queue ? Query.fromAst(newQuery).from({
68
- feeds: [
69
- queue
70
- ]
71
- }) : Query.fromAst(newQuery);
67
+ const query = queue ? Query.fromAst(newQuery).from([
68
+ Scope.feed(String(queue))
69
+ ]) : Query.fromAst(newQuery);
72
70
  updateView((view2) => {
73
71
  view2.query.ast = query.ast;
74
72
  });
75
- const newType = await resolveSchemaWithRegistry(db.schemaRegistry, query.ast);
73
+ const newType = await resolveSchemaWithRegistry(db, query.ast);
76
74
  if (!newType) {
77
75
  return;
78
76
  }
@@ -185,13 +183,13 @@ var PipelineProperties = ({ classNames, pipeline }) => {
185
183
  schema: ColumnFormSchema,
186
184
  values: column2,
187
185
  onValuesChanged: handleColumnValuesChanged(column2)
188
- }, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.FieldSet, null))), type && /* @__PURE__ */ React.createElement(ViewEditor, {
186
+ }, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.FieldSet, null))), /* @__PURE__ */ React.createElement(ViewEditor, {
189
187
  ref: projectionRef,
190
188
  mode: "tag",
191
189
  readonly: true,
192
190
  type,
193
191
  view: column2.view.target,
194
- registry: db?.schemaRegistry,
192
+ registry: db?.graph.registry,
195
193
  db,
196
194
  tags,
197
195
  types,
@@ -208,4 +206,4 @@ var PipelineProperties = ({ classNames, pipeline }) => {
208
206
  export {
209
207
  PipelineProperties as default
210
208
  };
211
- //# sourceMappingURL=PipelineProperties-NFNEU3NR.mjs.map
209
+ //# sourceMappingURL=PipelineProperties-JZQYG2CN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/PipelineProperties/PipelineProperties.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';\nimport { useTypeOptions } from '@dxos/app-toolkit/ui';\nimport { EID, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Scope, Tag, type Type } from '@dxos/echo';\nimport { type Mutable } from '@dxos/echo/Obj';\nimport { SchemaEx } from '@dxos/effect';\nimport { useObject, useQuery } from '@dxos/react-client/echo';\nimport { IconButton, type ThemedClassName, useAsyncEffect, useTranslation } from '@dxos/react-ui';\nimport { Form, ViewEditor } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { type ProjectionModel, ViewModel } from '@dxos/schema';\nimport { Pipeline } from '@dxos/types';\nimport { mx, osTranslations } from '@dxos/ui-theme';\nimport { arrayMove } from '@dxos/util';\n\nimport { meta } from '#meta';\n\nconst listGrid = 'grid grid-cols-[min-content_1fr_min-content_min-content_min-content]';\nconst listItemGrid = 'grid grid-cols-subgrid col-span-5';\n\nconst ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick('name'));\n\nexport type PipelinePropertiesProps = ThemedClassName<{\n pipeline: Pipeline.Pipeline;\n}>;\n\n/**\n * Supports editing the pipeline view.\n */\nexport const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesProps) => {\n const { t } = useTranslation(meta.id);\n const db = Obj.getDatabase(pipeline);\n const [expandedId, setExpandedId] = useState<string>();\n const [columns, updateColumns] = useObject(pipeline, 'columns');\n const column = useMemo(() => columns.find((column) => column.view.uri === expandedId), [columns, expandedId]);\n const [view, updateView] = useObject(column?.view);\n const [type, setType] = useState<Type.AnyEntity>();\n const projectionRef = useRef<ProjectionModel>(null);\n const tags = useQuery(db, Filter.type(Tag.Tag));\n const types = useTypeOptions({\n db,\n annotation: {\n location: ['database', 'runtime'],\n kind: ['user'],\n },\n });\n\n useAsyncEffect(async () => {\n if (!view?.query || !db) {\n return;\n }\n\n const foundType = await resolveSchemaWithRegistry(db, view.query.ast);\n if (foundType && foundType !== type) {\n setType(() => foundType);\n }\n }, [db, view, type]);\n\n const handleMove = useCallback(\n (fromIndex: number, toIndex: number) =>\n updateColumns((columns) => {\n arrayMove(columns, fromIndex, toIndex);\n }),\n [updateColumns],\n );\n\n const handleQueryChanged = useCallback(\n async (newQuery: QueryAST.Query, target?: EID.EID) => {\n if (!view || !db) {\n return;\n }\n\n const queue = target;\n const query = queue ? Query.fromAst(newQuery).from([Scope.feed(String(queue))]) : Query.fromAst(newQuery);\n updateView((view) => {\n view.query.ast = query.ast as Mutable<typeof query.ast>;\n });\n const newType = await resolveSchemaWithRegistry(db, query.ast);\n if (!newType) {\n return;\n }\n\n const newView = ViewModel.make({\n query,\n jsonSchema: newType.jsonSchema,\n });\n updateView((view) => {\n view.projection = Obj.getSnapshot(newView).projection as Mutable<typeof view.projection>;\n });\n\n setType(() => newType);\n },\n [db, view, updateView, type],\n );\n\n const handleColumnValuesChanged = useCallback(\n (column: Pipeline.Column) =>\n (newValues: { name?: string }, { changed }: { changed: Record<SchemaEx.JsonPath, boolean> }) => {\n if (changed['name' as SchemaEx.JsonPath]) {\n const columnIndex = columns.findIndex((c) => c === column);\n if (columnIndex === -1) {\n return;\n }\n updateColumns((cols) => {\n cols[columnIndex].name = newValues.name ?? '';\n });\n }\n },\n [columns, updateColumns],\n );\n\n const handleToggleField = useCallback((column: Pipeline.Column) => {\n setExpandedId((prevExpandedId) => (prevExpandedId === column.view.uri ? undefined : column.view.uri));\n }, []);\n\n const handleDelete = useCallback(\n async (column: Pipeline.Column) => {\n if (column.view.uri === expandedId) {\n setExpandedId(undefined);\n }\n\n const index = columns.findIndex((l) => l === column);\n const viewToRemove = await column.view.load();\n updateColumns((columns) => {\n columns.splice(index, 1);\n });\n db?.remove(viewToRemove);\n },\n [expandedId, columns, updateColumns, db],\n );\n\n const handleAdd = useCallback(() => {\n if (!db) {\n return;\n }\n const newView = ViewModel.make({\n query: Query.select(Filter.nothing()),\n jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({})),\n });\n db.add(newView);\n updateColumns((columns) => {\n columns.push({\n name: '',\n // Type assertion needed due to QueryAST type variance.\n view: Ref.make(newView) as (typeof columns)[number]['view'],\n order: [],\n });\n });\n setExpandedId(newView.id);\n }, [db, updateColumns]);\n\n return (\n <div className={mx('py-form-padding overflow-y-auto', classNames)}>\n <h2 className='text-sm text-description py-1'>{t('views.label')}</h2>\n\n <List.Root<Pipeline.Column>\n items={columns}\n isItem={Schema.is(Pipeline.Column)}\n getId={(column) => column.view.uri}\n onMove={handleMove}\n >\n {({ items: columns }) => (\n <>\n <div role='list' className={mx(listGrid)}>\n {columns.map((column) => (\n <List.Item<Pipeline.Column>\n key={column.view.uri}\n item={column}\n classNames={listItemGrid}\n aria-expanded={expandedId === column.view.uri}\n >\n <div className={mx(listItemGrid, 'dx-hover rounded-xs cursor-pointer min-h-10')}>\n <List.ItemDragHandle />\n <List.ItemTitle onClick={() => handleToggleField(column)}>\n {column.name || t('untitled-view.title')}\n </List.ItemTitle>\n <List.ItemDeleteButton\n label={t('delete-view.label')}\n autoHide={false}\n onClick={() => handleDelete(column)}\n data-testid='view.delete'\n />\n <IconButton\n iconOnly\n variant='ghost'\n label={t('toggle-expand.label', { ns: osTranslations })}\n icon={expandedId === column.view.uri ? 'ph--caret-down--regular' : 'ph--caret-right--regular'}\n onClick={() => handleToggleField(column)}\n />\n </div>\n {expandedId === column.view.uri && column?.view.target && (\n <div className='col-span-5 my-2 border border-separator rounded-md'>\n <Form.Root\n schema={ColumnFormSchema}\n values={column}\n onValuesChanged={handleColumnValuesChanged(column)}\n >\n <Form.Content>\n <Form.FieldSet />\n </Form.Content>\n </Form.Root>\n <ViewEditor\n ref={projectionRef}\n mode='tag'\n readonly\n type={type}\n view={column.view.target}\n registry={db?.graph.registry}\n db={db}\n tags={tags}\n types={types}\n onQueryChanged={handleQueryChanged}\n />\n </div>\n )}\n </List.Item>\n ))}\n </div>\n </>\n )}\n </List.Root>\n\n <div className='my-form-padding'>\n <IconButton icon='ph--plus--regular' label={t('add-view.label')} onClick={handleAdd} classNames='w-full' />\n </div>\n </div>\n );\n};\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,aAAaC,SAASC,QAAQC,gBAAgB;AAE9D,SAASC,iCAAiC;AAC1C,SAASC,sBAAsB;AAC/B,SAAcC,QAAQC,YAAYC,KAAKC,OAAsBC,KAAKC,OAAOC,WAAsB;AAG/F,SAASC,WAAWC,gBAAgB;AACpC,SAASC,YAAkCC,gBAAgBC,sBAAsB;AACjF,SAASC,MAAMC,kBAAkB;AACjC,SAASC,YAAY;AACrB,SAA+BC,iBAAiB;AAChD,SAASC,gBAAgB;AACzB,SAASC,IAAIC,sBAAsB;AACnC,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AAErB,IAAMC,WAAW;AACjB,IAAMC,eAAe;AAErB,IAAMC,mBAAmBP,SAASQ,OAAOC,KAAYC,gBAAgBC,Y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AAoBN,OAAOtF,EAAE,gBAAA;IAAmBoF,SAASzB;IAAW7D,YAAW;;AAIxG;",
6
+ "names": ["Schema", "React", "useCallback", "useMemo", "useRef", "useState", "resolveSchemaWithRegistry", "useTypeOptions", "Filter", "JsonSchema", "Obj", "Query", "Ref", "Scope", "Tag", "useObject", "useQuery", "IconButton", "useAsyncEffect", "useTranslation", "Form", "ViewEditor", "List", "ViewModel", "Pipeline", "mx", "osTranslations", "arrayMove", "meta", "listGrid", "listItemGrid", "ColumnFormSchema", "Column", "pipe", "mutable", "pick", "PipelineProperties", "classNames", "pipeline", "t", "id", "db", "getDatabase", "expandedId", "setExpandedId", "columns", "updateColumns", "column", "find", "view", "uri", "updateView", "type", "setType", "projectionRef", "tags", "types", "annotation", "location", "kind", "query", "foundType", "ast", "handleMove", "fromIndex", "toIndex", "handleQueryChanged", "newQuery", "target", "queue", "fromAst", "from", "feed", "String", "newType", "newView", "make", "jsonSchema", "projection", "getSnapshot", "handleColumnValuesChanged", "newValues", "changed", "columnIndex", "findIndex", "c", "cols", "name", "handleToggleField", "prevExpandedId", "undefined", "handleDelete", "index", "l", "viewToRemove", "load", "splice", "remove", "handleAdd", "select", "nothing", "toJsonSchema", "Struct", "add", "push", "order", "div", "className", "h2", "Root", "items", "isItem", "is", "getId", "onMove", "role", "map", "Item", "key", "item", "aria-expanded", "ItemDragHandle", "ItemTitle", "onClick", "ItemDeleteButton", "label", "autoHide", "data-testid", "iconOnly", "variant", "ns", "icon", "schema", "values", "onValuesChanged", "Content", "FieldSet", "ref", "mode", "readonly", "registry", "graph", "onQueryChanged"]
7
+ }
@@ -2,7 +2,7 @@
2
2
  import { Capability } from "@dxos/app-framework";
3
3
  var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-ZLGRWRJU.mjs"));
4
4
  var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-6Z4MMGX4.mjs"));
5
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-4W5YLCHT.mjs"));
5
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-QG7QSZSS.mjs"));
6
6
  export {
7
7
  AppGraphBuilder,
8
8
  CreateObject,
@@ -1,7 +1,9 @@
1
1
  // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { DXN } from "@dxos/keys";
2
4
  import { trim } from "@dxos/util";
3
- var meta = {
4
- id: "org.dxos.plugin.pipeline",
5
+ var meta = Plugin.makeMeta({
6
+ key: DXN.make("org.dxos.plugin.pipeline"),
5
7
  name: "Pipelines",
6
8
  author: "DXOS",
7
9
  description: trim`
@@ -25,9 +27,9 @@ var meta = {
25
27
  tags: [
26
28
  "labs"
27
29
  ]
28
- };
30
+ });
29
31
 
30
32
  export {
31
33
  meta
32
34
  };
33
- //# sourceMappingURL=chunk-OVZ2ASS7.mjs.map
35
+ //# sourceMappingURL=chunk-CYXDAAKN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.pipeline'),\n name: 'Pipelines',\n author: 'DXOS',\n description: trim`\n A multi-column Kanban-style pipeline plugin for DXOS Composer.\n Each Pipeline holds an ordered set of Columns; each Column is backed by a ViewModel whose query\n can select any ECHO object type — messages, contacts, documents, or custom types — from the active space.\n\n Columns are fully configurable through the Settings companion panel, where users can add, rename,\n reorder, and delete columns and edit the underlying query and projection for each column.\n Objects can be dragged between columns and the full pipeline state, including column order and\n per-column item order, persists collaboratively via ECHO.\n\n A built-in Research template scaffolds a four-column pipeline wired to the Mailbox, Contacts,\n Organizations, and Notes objects in the space, providing an out-of-the-box CRM-style workflow.\n Pipeline articles also expose Invocations and Automation companion tabs for AI-driven automation.\n `,\n icon: 'ph--path--regular',\n iconHue: 'purple',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-pipeline',\n spec: 'PLUGIN.mdl',\n tags: ['labs'],\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,0BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;;;;;;;;;;;EAcbQ,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,MAAM;IAAC;;AACT,CAAA;",
6
+ "names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec", "tags"]
7
+ }
@@ -1,10 +1,8 @@
1
1
  // src/components/PipelineComponent/PipelineColumn.tsx
2
2
  import { useComposedRefs } from "@radix-ui/react-compose-refs";
3
- import * as Function from "effect/Function";
4
- import * as Option from "effect/Option";
5
3
  import React2, { forwardRef, useMemo, useRef, useState } from "react";
6
4
  import { resolveSchemaWithRegistry } from "@dxos/app-toolkit/query";
7
- import { Annotation, Filter, Obj as Obj2, Query, Type } from "@dxos/echo";
5
+ import { Filter, Obj as Obj2, Query, Type } from "@dxos/echo";
8
6
  import { useObject } from "@dxos/react-client/echo";
9
7
  import { Panel, Toolbar as Toolbar2, useAsyncEffect, useTranslation as useTranslation2 } from "@dxos/react-ui";
10
8
  import { Card } from "@dxos/react-ui";
@@ -108,7 +106,7 @@ var PipelineColumn = ({ data: column, location, classNames, debug }) => {
108
106
  if (!query || !db) {
109
107
  return;
110
108
  }
111
- const type2 = await resolveSchemaWithRegistry(db.schemaRegistry, query.ast);
109
+ const type2 = await resolveSchemaWithRegistry(db, query.ast);
112
110
  setType(() => type2);
113
111
  }, [
114
112
  db,
@@ -170,7 +168,7 @@ var ItemTile = /* @__PURE__ */ forwardRef(({ classNames, data, location, debug,
170
168
  const rootRef = useRef(null);
171
169
  const composedRef = useComposedRefs(rootRef, forwardedRef);
172
170
  const { Item } = usePipeline(ITEM_TILE_NAME);
173
- const icon = Function.pipe(Obj2.getType(data), Option.fromNullable, Option.map(Type.getSchema), Option.flatMap(Annotation.IconAnnotation.get), Option.map(({ icon: icon2 }) => icon2), Option.getOrElse(() => "ph--circle-dashed--regular"));
171
+ const icon = Obj2.getIcon(data)?.icon ?? "ph--circle-dashed--regular";
174
172
  return /* @__PURE__ */ React2.createElement(Menu.Root, null, /* @__PURE__ */ React2.createElement(Mosaic.Tile, {
175
173
  asChild: true,
176
174
  id: data.id,
@@ -186,9 +184,7 @@ var ItemTile = /* @__PURE__ */ forwardRef(({ classNames, data, location, debug,
186
184
  icon
187
185
  }), /* @__PURE__ */ React2.createElement(Card.Title, null, Obj2.getLabel(data, {
188
186
  fallback: "typename"
189
- })), /* @__PURE__ */ React2.createElement(Card.IconBlock, {
190
- padding: true
191
- }, /* @__PURE__ */ React2.createElement(Menu.Trigger, {
187
+ })), /* @__PURE__ */ React2.createElement(Card.IconBlock, null, /* @__PURE__ */ React2.createElement(Menu.Trigger, {
192
188
  asChild: true
193
189
  }, /* @__PURE__ */ React2.createElement(Toolbar2.IconButton, {
194
190
  iconOnly: true,