@dxos/plugin-pipeline 0.8.4-main.fcfe5033a5 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +345 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs +69 -0
  5. package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs.map +7 -0
  6. package/dist/lib/neutral/PipelinePlugin.mjs +38 -0
  7. package/dist/lib/neutral/PipelinePlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/PipelinePlugin.node.mjs +21 -0
  9. package/dist/lib/neutral/PipelinePlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/PipelinePlugin.workerd.mjs +16 -0
  11. package/dist/lib/neutral/PipelinePlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/neutral/PipelineProperties-JZQYG2CN.mjs +209 -0
  13. package/dist/lib/neutral/PipelineProperties-JZQYG2CN.mjs.map +7 -0
  14. package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs +44 -0
  15. package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs.map +7 -0
  16. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  17. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-CYXDAAKN.mjs +35 -0
  19. package/dist/lib/neutral/chunk-CYXDAAKN.mjs.map +7 -0
  20. package/dist/lib/neutral/components/index.mjs +203 -0
  21. package/dist/lib/neutral/components/index.mjs.map +7 -0
  22. package/dist/lib/neutral/containers/index.mjs +9 -0
  23. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  24. package/dist/lib/neutral/create-object-6Z4MMGX4.mjs +26 -0
  25. package/dist/lib/neutral/create-object-6Z4MMGX4.mjs.map +7 -0
  26. package/dist/lib/neutral/hooks/index.mjs +69 -0
  27. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  28. package/dist/lib/neutral/index.mjs +7 -0
  29. package/dist/lib/neutral/meta.json +1 -0
  30. package/dist/lib/neutral/meta.mjs +7 -0
  31. package/dist/lib/neutral/meta.mjs.map +7 -0
  32. package/dist/lib/neutral/plugin.mjs +11 -0
  33. package/dist/lib/neutral/plugin.mjs.map +7 -0
  34. package/dist/lib/neutral/react-surface-QG7QSZSS.mjs +49 -0
  35. package/dist/lib/neutral/react-surface-QG7QSZSS.mjs.map +7 -0
  36. package/dist/lib/neutral/translations.mjs +39 -0
  37. package/dist/lib/neutral/translations.mjs.map +7 -0
  38. package/dist/lib/neutral/types/index.mjs.map +7 -0
  39. package/dist/types/src/PipelinePlugin.d.ts +1 -0
  40. package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
  41. package/dist/types/src/PipelinePlugin.node.d.ts +4 -0
  42. package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -0
  43. package/dist/types/src/PipelinePlugin.test.d.ts +2 -0
  44. package/dist/types/src/PipelinePlugin.test.d.ts.map +1 -0
  45. package/dist/types/src/PipelinePlugin.workerd.d.ts +4 -0
  46. package/dist/types/src/PipelinePlugin.workerd.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  48. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  49. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  50. package/dist/types/src/capabilities/index.d.ts +6 -0
  51. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  52. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  53. package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts +4 -4
  54. package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -1
  55. package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +4 -0
  56. package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -1
  57. package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +44 -25
  58. package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
  59. package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts +6 -0
  60. package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts.map +1 -0
  61. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts +76 -0
  62. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -0
  63. package/dist/types/src/containers/PipelineArticle/index.d.ts +2 -0
  64. package/dist/types/src/containers/PipelineArticle/index.d.ts.map +1 -0
  65. package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -1
  66. package/dist/types/src/containers/index.d.ts +1 -1
  67. package/dist/types/src/containers/index.d.ts.map +1 -1
  68. package/dist/types/src/hooks/usePipelineBoardModel.d.ts.map +1 -1
  69. package/dist/types/src/index.d.ts +0 -1
  70. package/dist/types/src/index.d.ts.map +1 -1
  71. package/dist/types/src/meta.d.ts +1 -1
  72. package/dist/types/src/meta.d.ts.map +1 -1
  73. package/dist/types/src/plugin.d.ts +3 -0
  74. package/dist/types/src/plugin.d.ts.map +1 -0
  75. package/dist/types/src/templates/research.d.ts.map +1 -1
  76. package/dist/types/src/translations.d.ts +44 -26
  77. package/dist/types/src/translations.d.ts.map +1 -1
  78. package/dist/types/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +100 -64
  80. package/src/PipelinePlugin.node.ts +19 -0
  81. package/src/PipelinePlugin.test.ts +27 -0
  82. package/src/PipelinePlugin.tsx +10 -29
  83. package/src/PipelinePlugin.workerd.ts +16 -0
  84. package/src/capabilities/create-object.ts +30 -0
  85. package/src/capabilities/index.ts +1 -0
  86. package/src/capabilities/react-surface.tsx +3 -3
  87. package/src/components/PipelineComponent/PipelineColumn.tsx +23 -33
  88. package/src/components/PipelineComponent/PipelineComponent.stories.tsx +6 -8
  89. package/src/components/PipelineComponent/PipelineComponent.tsx +2 -2
  90. package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +18 -22
  91. package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +6 -8
  92. package/src/containers/PipelineArticle/index.ts +5 -0
  93. package/src/containers/PipelineProperties/PipelineProperties.tsx +45 -53
  94. package/src/containers/index.ts +1 -1
  95. package/src/hooks/usePipelineBoardModel.ts +8 -9
  96. package/src/index.ts +0 -1
  97. package/src/meta.ts +19 -6
  98. package/src/plugin.ts +9 -0
  99. package/src/templates/research.ts +2 -2
  100. package/src/translations.ts +2 -1
  101. package/src/vite-env.d.ts +10 -0
  102. package/dist/lib/browser/index.mjs +0 -98
  103. package/dist/lib/browser/index.mjs.map +0 -7
  104. package/dist/lib/browser/meta.json +0 -1
  105. package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +0 -6
  106. package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +0 -1
  107. package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts +0 -57
  108. package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +0 -1
  109. package/dist/types/src/containers/PipelineContainer/index.d.ts +0 -2
  110. package/dist/types/src/containers/PipelineContainer/index.d.ts.map +0 -1
  111. package/src/containers/PipelineContainer/index.ts +0 -5
  112. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  113. /package/dist/lib/{browser → neutral}/types/index.mjs +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
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
+ ```
package/README.md CHANGED
@@ -10,4 +10,4 @@
10
10
 
11
11
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
12
12
 
13
- License: [MIT](./LICENSE) Copyright 2023 © DXOS
13
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
@@ -0,0 +1,69 @@
1
+ // src/containers/PipelineArticle/PipelineArticle.tsx
2
+ import React, { useCallback, useEffect } from "react";
3
+ import { Capabilities } from "@dxos/app-framework";
4
+ import { Surface, useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
5
+ import { LayoutOperation } from "@dxos/app-toolkit";
6
+ import { AppSurface, OBJECT_ACTIONS_CONTRIBUTION_ID, OBJECT_ACTIONS_CONTRIBUTION_PRIORITY, useObjectMenuItems } from "@dxos/app-toolkit/ui";
7
+ import { Panel } from "@dxos/react-ui";
8
+ import { linkedSegment } from "@dxos/react-ui-attention";
9
+ import { useAttention } from "@dxos/react-ui-attention";
10
+ import { useMenu } from "@dxos/react-ui-menu";
11
+ import { PipelineComponent } from "#components";
12
+ import { usePipelineBoardModel } from "#hooks";
13
+ var PIPELINE_ITEM = "PipelineItem";
14
+ var PipelineArticle = ({ role, subject: pipeline, attendableId }) => {
15
+ const registry = useCapability(Capabilities.AtomRegistry);
16
+ const model = usePipelineBoardModel(pipeline, registry);
17
+ const { invokePromise } = useOperationInvoker();
18
+ const { hasAttention } = useAttention(attendableId);
19
+ const handleColumnAdd = useCallback(() => invokePromise(LayoutOperation.UpdateCompanion, {
20
+ subject: linkedSegment("settings")
21
+ }), [
22
+ invokePromise
23
+ ]);
24
+ return /* @__PURE__ */ React.createElement(PipelineComponent.Root, {
25
+ Item: PipelineItem,
26
+ onAddColumn: handleColumnAdd
27
+ }, /* @__PURE__ */ React.createElement(Panel.Root, {
28
+ role
29
+ }, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
30
+ asChild: true
31
+ }, /* @__PURE__ */ React.createElement(PipelineComponent.Toolbar, {
32
+ disabled: !hasAttention
33
+ })), /* @__PURE__ */ React.createElement(Panel.Content, {
34
+ asChild: true
35
+ }, /* @__PURE__ */ React.createElement(PipelineComponent.Content, {
36
+ asChild: true,
37
+ model
38
+ }, /* @__PURE__ */ React.createElement(PipelineComponent.Columns, {
39
+ pipeline
40
+ })))));
41
+ };
42
+ var PipelineItem = ({ item, projectionModel }) => {
43
+ const menu = useMenu(PIPELINE_ITEM);
44
+ const items = useObjectMenuItems(item);
45
+ useEffect(() => {
46
+ menu.addMenuItems({
47
+ id: OBJECT_ACTIONS_CONTRIBUTION_ID,
48
+ mode: "additive",
49
+ priority: OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,
50
+ items
51
+ });
52
+ return () => menu.removeMenuItems(OBJECT_ACTIONS_CONTRIBUTION_ID);
53
+ }, [
54
+ menu,
55
+ items
56
+ ]);
57
+ return /* @__PURE__ */ React.createElement(Surface.Surface, {
58
+ type: AppSurface.Card,
59
+ data: {
60
+ subject: item,
61
+ projection: projectionModel
62
+ },
63
+ limit: 1
64
+ });
65
+ };
66
+ export {
67
+ PipelineArticle as default
68
+ };
69
+ //# sourceMappingURL=PipelineArticle-6JIVXMYF.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/PipelineArticle/PipelineArticle.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect } from 'react';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { Surface, useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport {\n AppSurface,\n OBJECT_ACTIONS_CONTRIBUTION_ID,\n OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,\n useObjectMenuItems,\n} from '@dxos/app-toolkit/ui';\nimport { Panel } from '@dxos/react-ui';\nimport { linkedSegment } from '@dxos/react-ui-attention';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { useMenu } from '@dxos/react-ui-menu';\nimport { type Pipeline } from '@dxos/types';\n\nimport { type ItemProps, PipelineComponent } from '#components';\nimport { usePipelineBoardModel } from '#hooks';\n\nconst PIPELINE_ITEM = 'PipelineItem';\n\nexport type PipelineArticleProps = AppSurface.ObjectArticleProps<Pipeline.Pipeline>;\n\nexport const PipelineArticle = ({ role, subject: pipeline, attendableId }: PipelineArticleProps) => {\n const registry = useCapability(Capabilities.AtomRegistry);\n const model = usePipelineBoardModel(pipeline, registry);\n const { invokePromise } = useOperationInvoker();\n const { hasAttention } = useAttention(attendableId);\n\n const handleColumnAdd = useCallback(\n () =>\n invokePromise(LayoutOperation.UpdateCompanion, {\n subject: linkedSegment('settings'),\n }),\n [invokePromise],\n );\n\n return (\n <PipelineComponent.Root Item={PipelineItem} onAddColumn={handleColumnAdd}>\n <Panel.Root role={role}>\n <Panel.Toolbar asChild>\n <PipelineComponent.Toolbar disabled={!hasAttention} />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <PipelineComponent.Content asChild model={model}>\n <PipelineComponent.Columns pipeline={pipeline} />\n </PipelineComponent.Content>\n </Panel.Content>\n </Panel.Root>\n </PipelineComponent.Root>\n );\n};\n\nconst PipelineItem = ({ item, projectionModel }: ItemProps) => {\n const menu = useMenu(PIPELINE_ITEM);\n const items = useObjectMenuItems(item);\n\n useEffect(() => {\n menu.addMenuItems({\n id: OBJECT_ACTIONS_CONTRIBUTION_ID,\n mode: 'additive',\n priority: OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,\n items,\n });\n\n return () => menu.removeMenuItems(OBJECT_ACTIONS_CONTRIBUTION_ID);\n }, [menu, items]);\n\n return (\n <Surface.Surface\n type={AppSurface.Card}\n data={{\n subject: item,\n projection: projectionModel,\n }}\n limit={1}\n />\n );\n};\n"],
5
+ "mappings": ";AAIA,OAAOA,SAASC,aAAaC,iBAAiB;AAE9C,SAASC,oBAAoB;AAC7B,SAASC,SAASC,eAAeC,2BAA2B;AAC5D,SAASC,uBAAuB;AAChC,SACEC,YACAC,gCACAC,sCACAC,0BACK;AACP,SAASC,aAAa;AACtB,SAASC,qBAAqB;AAC9B,SAASC,oBAAoB;AAC7B,SAASC,eAAe;AAGxB,SAAyBC,yBAAyB;AAClD,SAASC,6BAA6B;AAEtC,IAAMC,gBAAgB;AAIf,IAAMC,kBAAkB,CAAC,EAAEC,MAAMC,SAASC,UAAUC,aAAY,MAAwB;AAC7F,QAAMC,WAAWnB,cAAcF,aAAasB,YAAY;AACxD,QAAMC,QAAQT,sBAAsBK,UAAUE,QAAAA;AAC9C,QAAM,EAAEG,cAAa,IAAKrB,oBAAAA;AAC1B,QAAM,EAAEsB,aAAY,IAAKd,aAAaS,YAAAA;AAEtC,QAAMM,kBAAkB5B,YACtB,MACE0B,cAAcpB,gBAAgBuB,iBAAiB;IAC7CT,SAASR,cAAc,UAAA;EACzB,CAAA,GACF;IAACc;GAAc;AAGjB,SACE,sBAAA,cAACX,kBAAkBe,MAAI;IAACC,MAAMC;IAAcC,aAAaL;KACvD,sBAAA,cAACjB,MAAMmB,MAAI;IAACX;KACV,sBAAA,cAACR,MAAMuB,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACpB,kBAAkBmB,SAAO;IAACE,UAAU,CAACT;OAExC,sBAAA,cAAChB,MAAM0B,SAAO;IAACF,SAAAA;KACb,sBAAA,cAACpB,kBAAkBsB,SAAO;IAACF,SAAAA;IAAQV;KACjC,sBAAA,cAACV,kBAAkBuB,SAAO;IAACjB;;AAMvC;AAEA,IAAMW,eAAe,CAAC,EAAEO,MAAMC,gBAAe,MAAa;AACxD,QAAMC,OAAO3B,QAAQG,aAAAA;AACrB,QAAMyB,QAAQhC,mBAAmB6B,IAAAA;AAEjCtC,YAAU,MAAA;AACRwC,SAAKE,aAAa;MAChBC,IAAIpC;MACJqC,MAAM;MACNC,UAAUrC;MACViC;IACF,CAAA;AAEA,WAAO,MAAMD,KAAKM,gBAAgBvC,8BAAAA;EACpC,GAAG;IAACiC;IAAMC;GAAM;AAEhB,SACE,sBAAA,cAACvC,QAAQA,SAAO;IACd6C,MAAMzC,WAAW0C;IACjBC,MAAM;MACJ9B,SAASmB;MACTY,YAAYX;IACd;IACAY,OAAO;;AAGb;",
6
+ "names": ["React", "useCallback", "useEffect", "Capabilities", "Surface", "useCapability", "useOperationInvoker", "LayoutOperation", "AppSurface", "OBJECT_ACTIONS_CONTRIBUTION_ID", "OBJECT_ACTIONS_CONTRIBUTION_PRIORITY", "useObjectMenuItems", "Panel", "linkedSegment", "useAttention", "useMenu", "PipelineComponent", "usePipelineBoardModel", "PIPELINE_ITEM", "PipelineArticle", "role", "subject", "pipeline", "attendableId", "registry", "AtomRegistry", "model", "invokePromise", "hasAttention", "handleColumnAdd", "UpdateCompanion", "Root", "Item", "PipelineItem", "onAddColumn", "Toolbar", "asChild", "disabled", "Content", "Columns", "item", "projectionModel", "menu", "items", "addMenuItems", "id", "mode", "priority", "removeMenuItems", "type", "Card", "data", "projection", "limit"]
7
+ }
@@ -0,0 +1,38 @@
1
+ // src/PipelinePlugin.tsx
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { Pipeline } from "@dxos/types";
5
+ import { AppGraphBuilder, CreateObject, ReactSurface } from "#capabilities";
6
+ import { meta } from "#meta";
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
13
+ var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
14
+ activate: AppGraphBuilder
15
+ }), AppPlugin.addCreateObjectModule({
16
+ activate: CreateObject
17
+ }), AppPlugin.addSchemaModule({
18
+ schema: [
19
+ Pipeline.Pipeline
20
+ ]
21
+ }), AppPlugin.addSurfaceModule({
22
+ activate: ReactSurface
23
+ }), AppPlugin.addTranslationsModule({
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
+ }
32
+ }), Plugin.make);
33
+ var PipelinePlugin_default = PipelinePlugin;
34
+ export {
35
+ PipelinePlugin,
36
+ PipelinePlugin_default as default
37
+ };
38
+ //# sourceMappingURL=PipelinePlugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
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
+ }
@@ -0,0 +1,21 @@
1
+ // src/PipelinePlugin.node.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { Pipeline } from "@dxos/types";
5
+ import { AppGraphBuilder, CreateObject } from "#capabilities";
6
+ import { meta } from "#meta";
7
+ var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
8
+ activate: AppGraphBuilder
9
+ }), AppPlugin.addCreateObjectModule({
10
+ activate: CreateObject
11
+ }), AppPlugin.addSchemaModule({
12
+ schema: [
13
+ Pipeline.Pipeline
14
+ ]
15
+ }), Plugin.make);
16
+ var PipelinePlugin_node_default = PipelinePlugin;
17
+ export {
18
+ PipelinePlugin,
19
+ PipelinePlugin_node_default as default
20
+ };
21
+ //# sourceMappingURL=PipelinePlugin.node.mjs.map