@cxtms/cx-schema 1.9.259 → 1.9.260
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/workflowValidator.d.ts +7 -0
- package/dist/workflowValidator.d.ts.map +1 -1
- package/dist/workflowValidator.js +54 -0
- package/dist/workflowValidator.js.map +1 -1
- package/package.json +1 -1
- package/schemas/actions/sound.json +4 -3
- package/schemas/actions/vibrate.json +6 -4
- package/schemas/components/README.md +1 -0
- package/schemas/components/avatar.json +117 -1
- package/schemas/components/infoLine.json +82 -1
- package/schemas/components/planner.json +369 -1
- package/schemas/components/progressBar.json +115 -1
- package/schemas/fields/attachment.json +35 -2
- package/schemas/workflows/agent/agent.json +98 -0
- package/schemas/workflows/tasks/attachment.json +58 -2
- package/schemas/workflows/workflow.json +14 -19
- package/skills/cxtms-developer/ref-entity-notification.md +2 -2
- package/skills/cxtms-developer/ref-entity-shared.md +6 -2
- package/skills/cxtms-module-builder/SKILL.md +83 -5
- package/skills/cxtms-module-builder/ref-components-data.md +1 -1
- package/skills/cxtms-module-builder/ref-components-display.md +98 -15
- package/skills/cxtms-module-builder/ref-components-forms.md +27 -1
- package/skills/cxtms-module-builder/ref-components-interactive.md +3 -3
- package/skills/cxtms-module-builder/ref-components-layout.md +1 -1
- package/skills/cxtms-workflow-builder/SKILL.md +3 -1
- package/skills/cxtms-workflow-builder/ref-agent.md +283 -0
- package/skills/cxtms-workflow-builder/ref-communication.md +37 -10
- package/templates/workflow-agent.yaml +48 -0
|
@@ -1 +1,369 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Planner Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"component",
|
|
7
|
+
"props"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"component": {
|
|
11
|
+
"const": "planner"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Component instance name for referencing in actions/variables"
|
|
16
|
+
},
|
|
17
|
+
"props": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": [
|
|
20
|
+
"queries",
|
|
21
|
+
"rows",
|
|
22
|
+
"columns",
|
|
23
|
+
"itemTemplate"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"height": {
|
|
27
|
+
"default": 700,
|
|
28
|
+
"description": "Board height; drives the vertical scroll viewport"
|
|
29
|
+
},
|
|
30
|
+
"refreshHandler": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Named refresh channel: `- refresh: <this name>` re-runs the queries and rebuilds the board even when no query variable changed (e.g. after a mutation from an item template). Defaults to the component name.",
|
|
33
|
+
"x-example": "driverPlannerData"
|
|
34
|
+
},
|
|
35
|
+
"debug": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"default": false,
|
|
38
|
+
"description": "Log per-stage pipeline counts (extracted N -> M rows -> K columns, orphan count, resolved paths) through logger"
|
|
39
|
+
},
|
|
40
|
+
"options": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"enableVirtualization": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"default": true,
|
|
46
|
+
"description": "false forces plain (non-virtualised) rendering"
|
|
47
|
+
},
|
|
48
|
+
"virtualizeThreshold": {
|
|
49
|
+
"type": "number",
|
|
50
|
+
"default": 50,
|
|
51
|
+
"description": "Row count above which rows virtualise (TanStack Virtual, measured heights)"
|
|
52
|
+
},
|
|
53
|
+
"estimatedRowHeight": {
|
|
54
|
+
"type": "number",
|
|
55
|
+
"default": 220,
|
|
56
|
+
"description": "Initial row height estimate; real heights are measured after mount"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": true
|
|
60
|
+
},
|
|
61
|
+
"queries": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"minItems": 1,
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": [
|
|
67
|
+
"name",
|
|
68
|
+
"query"
|
|
69
|
+
],
|
|
70
|
+
"properties": {
|
|
71
|
+
"name": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Query name; rows.fromQuery references the rows source by this name"
|
|
74
|
+
},
|
|
75
|
+
"query": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"description": "GraphQL query configuration",
|
|
78
|
+
"properties": {
|
|
79
|
+
"command": {
|
|
80
|
+
"description": "GraphQL document string"
|
|
81
|
+
},
|
|
82
|
+
"variables": {
|
|
83
|
+
"description": "Query variables (template expressions supported). Changing any referenced variable re-runs the query and rebuilds the board."
|
|
84
|
+
},
|
|
85
|
+
"path": {
|
|
86
|
+
"description": "Plain dot-path into the response (getObj; no [] segments here)"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"itemsPath": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "Items sources only. Path relative to the query.path result, resolved with expandPath: every array-valued segment flat-maps automatically (no leading []; explicit [] segments are accepted no-ops). Missing/null segments yield []. Omitted -> the path result itself, normalized to an array.",
|
|
93
|
+
"x-example": "orderMoves"
|
|
94
|
+
},
|
|
95
|
+
"parentAs": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Items sources only. Attaches the direct owner of the final flattened collection to every item under this key (e.g. item.order).",
|
|
98
|
+
"x-example": "order"
|
|
99
|
+
},
|
|
100
|
+
"mapping": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "Items sources only. Optional per-item template, context { ...variables, item } (item already carries the parent); result is merged over the raw item. Supply mapping.id when the entity has no id field."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": true
|
|
106
|
+
},
|
|
107
|
+
"description": "All data sources, in the useComponentQueries convention. Every query NOT referenced by rows.fromQuery is an items source; items from all items sources concatenate. The pipeline runs once after all queries resolve."
|
|
108
|
+
},
|
|
109
|
+
"rows": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": [
|
|
112
|
+
"groupBy",
|
|
113
|
+
"headerWidth"
|
|
114
|
+
],
|
|
115
|
+
"properties": {
|
|
116
|
+
"groupBy": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Dot-path ON the item -> row key (string-coerced). null/undefined/'' -> Unassigned.",
|
|
119
|
+
"x-example": "driver.contactId"
|
|
120
|
+
},
|
|
121
|
+
"fromQuery": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "Name of the rows-source query. Rows come from it including rows with zero items. Omitted -> rows derived from distinct groupBy values in first-seen order."
|
|
124
|
+
},
|
|
125
|
+
"key": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"description": "Dot-path on the row record -> row key (string-coerced, must match groupBy values). Required with fromQuery.",
|
|
128
|
+
"x-example": "contactId"
|
|
129
|
+
},
|
|
130
|
+
"label": {
|
|
131
|
+
"description": "Row label template; context: item = the row record. Default: the row key.",
|
|
132
|
+
"x-example": "{{ item.firstName }} {{ item.lastName }}"
|
|
133
|
+
},
|
|
134
|
+
"orderBy": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"description": "Row sort over row fields (key, label, record.*). Default: rows-query order / first-seen order. Each entry is { field: dot-path to the sort value, direction: asc|desc (default asc) }. Multi-key and stable; null/undefined always sort last regardless of direction; ISO dates compare as dates, numbers numerically, strings locale-aware with numeric collation (natural sort, so numeric strings such as customValues sort by value)."
|
|
137
|
+
},
|
|
138
|
+
"unassigned": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"description": "Synthetic row collecting orphan items (group key matches no row). Always renders last.",
|
|
141
|
+
"properties": {
|
|
142
|
+
"show": {
|
|
143
|
+
"default": true,
|
|
144
|
+
"description": "false hides the row AND logs a warning with the dropped count — items are never silently dropped"
|
|
145
|
+
},
|
|
146
|
+
"label": {
|
|
147
|
+
"default": "Unassigned"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"headerWidth": {
|
|
152
|
+
"type": "number",
|
|
153
|
+
"description": "Row-header column width in px. Required: the column is sticky and virtualised rows need explicit widths to stay aligned."
|
|
154
|
+
},
|
|
155
|
+
"headerPadding": {
|
|
156
|
+
"default": 1,
|
|
157
|
+
"description": "Row-header cell padding in theme spacing units (1 = 4px), same idea as the top-level cellPadding but for the first column.",
|
|
158
|
+
"x-example": 2.5
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"additionalProperties": true,
|
|
162
|
+
"description": "Row model: grouping key on the item plus an optional dedicated rows source (visible empty rows)"
|
|
163
|
+
},
|
|
164
|
+
"columns": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"required": [
|
|
167
|
+
"width"
|
|
168
|
+
],
|
|
169
|
+
"properties": {
|
|
170
|
+
"orderBy": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"description": "Sort WITHIN each row -> slot order. Item at sorted index i renders in column i. Runs after ALL sources resolve. Each entry is { field: dot-path to the sort value, direction: asc|desc (default asc) }. Multi-key and stable; null/undefined always sort last regardless of direction; ISO dates compare as dates, numbers numerically, strings locale-aware with numeric collation (natural sort, so numeric strings such as customValues sort by value)."
|
|
173
|
+
},
|
|
174
|
+
"appendEmpty": {
|
|
175
|
+
"type": "boolean",
|
|
176
|
+
"description": "Always append one empty trailing slot: column count = largest group + 1 (1 when there are no items), so every lane keeps an empty cell for emptyCellTemplate / add-move affordances.",
|
|
177
|
+
"default": false
|
|
178
|
+
},
|
|
179
|
+
"label": {
|
|
180
|
+
"default": "{{ index }}",
|
|
181
|
+
"description": "Column header template; variables: index (1-based), columnIndex (0-based)",
|
|
182
|
+
"x-example": "Move {{ index }}"
|
|
183
|
+
},
|
|
184
|
+
"width": {
|
|
185
|
+
"type": "number",
|
|
186
|
+
"description": "Column width in px. Required: every virtualised row applies the same explicit gridTemplateColumns."
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"additionalProperties": true,
|
|
190
|
+
"description": "Column model: ordinal slots. Column count = size of the largest group (+1 with appendEmpty); horizontal scroll, no cap."
|
|
191
|
+
},
|
|
192
|
+
"rowHeaderTemplate": {
|
|
193
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
194
|
+
"description": "Row header cell; receives row { key, label, record, items, isUnassigned }, rowIndex, itemCount. Default: row.label as plain text."
|
|
195
|
+
},
|
|
196
|
+
"itemTemplate": {
|
|
197
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
198
|
+
"description": "Item cell; receives item (incl. item.<parentAs> and intact nested collections — iterate them with `collection`), row, column { index, columnIndex, label }, rowIndex, columnIndex"
|
|
199
|
+
},
|
|
200
|
+
"emptyCellTemplate": {
|
|
201
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
202
|
+
"description": "Optional; receives row, column, rowIndex, columnIndex. Default: empty cell."
|
|
203
|
+
},
|
|
204
|
+
"summaryComponent": {
|
|
205
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
206
|
+
"description": "Optional per-column footer (sticky below the viewport); receives column, columnIndex, items (that column across all rows), totalCount"
|
|
207
|
+
},
|
|
208
|
+
"emptyStateTemplate": {
|
|
209
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
210
|
+
"description": "Optional; shown when the pipeline yields zero items (rows from the rows query still render)"
|
|
211
|
+
},
|
|
212
|
+
"itemAccent": {
|
|
213
|
+
"description": "Optional per-item color template (same context as itemTemplate), usually a status color. Paints a bar down the card's left edge and a low-alpha wash of the same color over the card background. Accepts hex/rgb()/hsl() or a theme palette path ('warning.main'); anything unparseable renders the plain card.",
|
|
214
|
+
"x-example": "{{ item.orderMove.orderMoveStatus.color }}"
|
|
215
|
+
},
|
|
216
|
+
"itemGroups": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"required": [
|
|
219
|
+
"key"
|
|
220
|
+
],
|
|
221
|
+
"properties": {
|
|
222
|
+
"key": {
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"headerTemplate": {
|
|
226
|
+
"$ref": "../schemas.json#/definitions/component"
|
|
227
|
+
},
|
|
228
|
+
"accent": {},
|
|
229
|
+
"dotsMenu": {
|
|
230
|
+
"type": "object"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"additionalProperties": false
|
|
234
|
+
},
|
|
235
|
+
"dragSource": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"required": [
|
|
238
|
+
"type"
|
|
239
|
+
],
|
|
240
|
+
"properties": {
|
|
241
|
+
"type": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"data": {},
|
|
245
|
+
"canDrag": {}
|
|
246
|
+
},
|
|
247
|
+
"additionalProperties": false
|
|
248
|
+
},
|
|
249
|
+
"events": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"additionalProperties": {
|
|
252
|
+
"$ref": "../schemas.json#/definitions/actionsList"
|
|
253
|
+
},
|
|
254
|
+
"description": "Interaction handlers; payloads merge last over variables + store",
|
|
255
|
+
"properties": {
|
|
256
|
+
"onItemClick": {
|
|
257
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
258
|
+
"description": "Click on an item (propagation stopped); payload: item, row, column, rowIndex, columnIndex"
|
|
259
|
+
},
|
|
260
|
+
"onCellClick": {
|
|
261
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
262
|
+
"description": "Click on cell background — never fires from inside an item; payload: row, column, rowIndex, columnIndex"
|
|
263
|
+
},
|
|
264
|
+
"onRowClick": {
|
|
265
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
266
|
+
"description": "Click on the row header; payload: row, rowIndex"
|
|
267
|
+
},
|
|
268
|
+
"onItemsLoaded": {
|
|
269
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
270
|
+
"description": "Fires once per completed pipeline; payload: items, itemCount, rowCount, columnCount"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"cellPadding": {
|
|
275
|
+
"default": 0.5,
|
|
276
|
+
"description": "Gap between the card (or empty-cell content) and the cell separators, in theme spacing units (1 = 4px). Inner card padding is the item template's own business (options.p).",
|
|
277
|
+
"x-example": 2.5
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"additionalProperties": true
|
|
281
|
+
},
|
|
282
|
+
"isHidden": {
|
|
283
|
+
"description": "Boolean template expression for conditional rendering"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"additionalProperties": true,
|
|
287
|
+
"description": "Generic grouped & ordered planning grid: each resource (driver, truck, dock, crew...) is a row, its work items appear as ordinal slots across the columns (slot 1, slot 2...). Columns are positional — the item's index in its sorted group — not dates; for date/time columns use timeline-grid. Fully YAML-driven four-stage pipeline: Extract (queries + itemsPath) -> Group (rows.groupBy) -> Sort (columns.orderBy) -> Place.",
|
|
288
|
+
"x-examples": [
|
|
289
|
+
{
|
|
290
|
+
"component": "planner",
|
|
291
|
+
"name": "driverPlanner",
|
|
292
|
+
"props": {
|
|
293
|
+
"height": 700,
|
|
294
|
+
"queries": [
|
|
295
|
+
{
|
|
296
|
+
"name": "moves",
|
|
297
|
+
"query": {
|
|
298
|
+
"command": "query GetOrderMovesForPlanner($date: DateTime!, $branchId: Int) { orders(filter: { orderMoves: { date: $date } }) { items { orderId orderNumber orderMoves { orderMoveId startDate driver { contactId firstName lastName } orderMoveLegs { legType location } } } } }",
|
|
299
|
+
"variables": {
|
|
300
|
+
"date": "{{ plannerDate }}",
|
|
301
|
+
"branchId": "{{ branchId }}"
|
|
302
|
+
},
|
|
303
|
+
"path": "orders.items"
|
|
304
|
+
},
|
|
305
|
+
"itemsPath": "orderMoves",
|
|
306
|
+
"parentAs": "order",
|
|
307
|
+
"mapping": {
|
|
308
|
+
"id": "{{ item.orderMoveId }}"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "drivers",
|
|
313
|
+
"query": {
|
|
314
|
+
"command": "query GetPlannerDrivers($branchId: Int) { contacts(filter: { branchId: $branchId }) { items { contactId firstName lastName } } }",
|
|
315
|
+
"variables": {
|
|
316
|
+
"branchId": "{{ branchId }}"
|
|
317
|
+
},
|
|
318
|
+
"path": "contacts.items"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"rows": {
|
|
323
|
+
"groupBy": "driver.contactId",
|
|
324
|
+
"fromQuery": "drivers",
|
|
325
|
+
"key": "contactId",
|
|
326
|
+
"label": "{{ item.firstName }} {{ item.lastName }}",
|
|
327
|
+
"orderBy": [
|
|
328
|
+
{
|
|
329
|
+
"field": "label",
|
|
330
|
+
"direction": "asc"
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"unassigned": {
|
|
334
|
+
"show": true,
|
|
335
|
+
"label": "Unassigned"
|
|
336
|
+
},
|
|
337
|
+
"headerWidth": 260
|
|
338
|
+
},
|
|
339
|
+
"columns": {
|
|
340
|
+
"orderBy": [
|
|
341
|
+
{
|
|
342
|
+
"field": "startDate",
|
|
343
|
+
"direction": "asc"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"field": "orderMoveId",
|
|
347
|
+
"direction": "asc"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"label": "Move {{ index }}",
|
|
351
|
+
"width": 420
|
|
352
|
+
},
|
|
353
|
+
"itemTemplate": {
|
|
354
|
+
"component": "card",
|
|
355
|
+
"props": {
|
|
356
|
+
"title": "{{ item.order.orderNumber }}"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"events": {
|
|
360
|
+
"onItemClick": [
|
|
361
|
+
{
|
|
362
|
+
"navigate": "orders/{{ item.order.orderId }}"
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
@@ -1 +1,115 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "ProgressBar Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"component"
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"component": {
|
|
10
|
+
"const": "progressBar"
|
|
11
|
+
},
|
|
12
|
+
"name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Unique name identifier for the progress bar"
|
|
15
|
+
},
|
|
16
|
+
"props": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"value": {
|
|
20
|
+
"description": "Completed amount. Overrides the derived count when items/completedPath are also set"
|
|
21
|
+
},
|
|
22
|
+
"max": {
|
|
23
|
+
"description": "Total amount. Defaults to items.length when items is set. max 0 or missing → nothing renders"
|
|
24
|
+
},
|
|
25
|
+
"items": {
|
|
26
|
+
"description": "Single-chunk template resolving to an array, e.g. '{{ row.items }}'. Sets max = length; combined with completedPath sets value = matched count"
|
|
27
|
+
},
|
|
28
|
+
"completedPath": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Dot path inside each item to test, e.g. orderMove.orderMoveStatus.statusStage"
|
|
31
|
+
},
|
|
32
|
+
"completedValue": {
|
|
33
|
+
"description": "Value at completedPath that counts as completed, e.g. Completed. Omitted → any truthy value counts"
|
|
34
|
+
},
|
|
35
|
+
"label": {
|
|
36
|
+
"description": "Caption on the left above the bar, e.g. Moves"
|
|
37
|
+
},
|
|
38
|
+
"showValue": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "Show the value caption (right-aligned for linear, centered for circular). Default true"
|
|
41
|
+
},
|
|
42
|
+
"valueFormat": {
|
|
43
|
+
"enum": [
|
|
44
|
+
"count",
|
|
45
|
+
"percent"
|
|
46
|
+
],
|
|
47
|
+
"description": "count → '2/5' (default), percent → '40%'"
|
|
48
|
+
},
|
|
49
|
+
"variant": {
|
|
50
|
+
"enum": [
|
|
51
|
+
"linear",
|
|
52
|
+
"circular",
|
|
53
|
+
"segmented"
|
|
54
|
+
],
|
|
55
|
+
"description": "Bar shape: linear (default), circular or segmented"
|
|
56
|
+
},
|
|
57
|
+
"height": {
|
|
58
|
+
"description": "Linear bar thickness in px. Default 6"
|
|
59
|
+
},
|
|
60
|
+
"size": {
|
|
61
|
+
"description": "Circular variant diameter in px. Default 40"
|
|
62
|
+
},
|
|
63
|
+
"color": {
|
|
64
|
+
"description": "Theme color (primary, success, warning, info, error, secondary) or CSS color. Default: primary, flipping to success at 100%"
|
|
65
|
+
},
|
|
66
|
+
"activeColor": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Mobile segmented variant color for completed segments"
|
|
69
|
+
},
|
|
70
|
+
"trackColor": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "Track or incomplete-segment color"
|
|
73
|
+
},
|
|
74
|
+
"tooltip": {
|
|
75
|
+
"description": "Tooltip on hover"
|
|
76
|
+
},
|
|
77
|
+
"testID": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"isHidden": {
|
|
81
|
+
"description": "Conditionally hide the bar"
|
|
82
|
+
},
|
|
83
|
+
"permission": {
|
|
84
|
+
"description": "Permission(s) required to render the component: a permission string or an array of permission strings"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": true,
|
|
91
|
+
"description": "Abstract progress bar. Feed it value/max directly, or an items array with a declarative completed predicate — what the numbers mean (moves, stops, hours…) is the module's business. Renders nothing when max is 0, so it can be declared unconditionally.",
|
|
92
|
+
"x-examples": [
|
|
93
|
+
{
|
|
94
|
+
"component": "progressBar",
|
|
95
|
+
"name": "laneMovesProgress",
|
|
96
|
+
"props": {
|
|
97
|
+
"label": "Moves",
|
|
98
|
+
"items": "{{ row.items }}",
|
|
99
|
+
"completedPath": "orderMove.orderMoveStatus.statusStage",
|
|
100
|
+
"completedValue": "Completed"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"component": "progressBar",
|
|
105
|
+
"name": "hoursOfService",
|
|
106
|
+
"props": {
|
|
107
|
+
"label": "Hours",
|
|
108
|
+
"value": "{{ row.record.customValues.hoursUsed }}",
|
|
109
|
+
"max": 11,
|
|
110
|
+
"valueFormat": "percent",
|
|
111
|
+
"color": "warning"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
@@ -84,13 +84,37 @@
|
|
|
84
84
|
"items": { "type": "string" }
|
|
85
85
|
},
|
|
86
86
|
"parentId": {
|
|
87
|
-
"
|
|
87
|
+
"anyOf": [{ "type": "string" }, { "type": "integer" }, { "$ref": "../schemas.json#/definitions/templateExpression" }],
|
|
88
88
|
"description": "Parent entity ID for linking attachment"
|
|
89
89
|
},
|
|
90
90
|
"parentType": {
|
|
91
|
-
"
|
|
91
|
+
"anyOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/templateExpression" }],
|
|
92
92
|
"description": "Logical parent type/entity for the attachment (e.g., Order, Contact)"
|
|
93
93
|
},
|
|
94
|
+
"links": {
|
|
95
|
+
"oneOf": [
|
|
96
|
+
{
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"entityType": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "Linked entity type: Order, Contact, Job or TrackingEvent"
|
|
104
|
+
},
|
|
105
|
+
"entityId": {
|
|
106
|
+
"type": ["string", "integer"],
|
|
107
|
+
"description": "Linked entity id (int, or UUID for jobs); templates allowed"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": ["entityType", "entityId"],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{ "$ref": "../schemas.json#/definitions/templateExpression" }
|
|
115
|
+
],
|
|
116
|
+
"description": "More entities to link the uploaded attachment to, besides parentId/parentType. Entries whose entityType or entityId resolves empty are skipped."
|
|
117
|
+
},
|
|
94
118
|
"onUploaded": {
|
|
95
119
|
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/actions" }],
|
|
96
120
|
"description": "Actions to execute after successful upload"
|
|
@@ -151,6 +175,15 @@
|
|
|
151
175
|
"parentId": "{{ orderId }}",
|
|
152
176
|
"parentType": "Order"
|
|
153
177
|
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "attachment",
|
|
181
|
+
"label": { "en-US": "Event Photo" },
|
|
182
|
+
"options": {
|
|
183
|
+
"parentId": "{{ orderId }}",
|
|
184
|
+
"parentType": "Order",
|
|
185
|
+
"links": [{ "entityType": "TrackingEvent", "entityId": "{{ trackingEventId }}" }]
|
|
186
|
+
}
|
|
154
187
|
}
|
|
155
188
|
]
|
|
156
189
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "agent/agent.json",
|
|
4
|
+
"title": "Agent section",
|
|
5
|
+
"description": "Configuration for workflowType: Agent. An LLM agent that calls other workflows as tools.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["instructions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"description": { "type": "string", "description": "What this agent does. Shown to callers and to other agents that may invoke it." },
|
|
10
|
+
"ui": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "How the AI Assistant chat shows this agent. Display-only; no runtime effect.",
|
|
13
|
+
"properties": {
|
|
14
|
+
"name": { "type": "string", "description": "Display name. Defaults to the workflow name." },
|
|
15
|
+
"shortDescription": { "type": "string", "description": "One line under the name, e.g. 'Status, ETAs, exceptions, POD'." },
|
|
16
|
+
"icon": { "type": "string", "description": "Tabler icon name without the 'tabler-' prefix, e.g. 'map-pin'. Defaults to 'robot'." },
|
|
17
|
+
"color": { "type": "string", "enum": ["primary", "secondary", "info", "success", "warning", "error"], "description": "Theme palette color for the agent's icon. Defaults to 'primary'." },
|
|
18
|
+
"prompts": { "type": "array", "items": { "type": "string" }, "maxItems": 5, "description": "Suggested prompts shown on an empty chat. At most 5." }
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
"instructions": { "type": "string", "minLength": 1, "description": "System instructions. Handlebars template over workflow variables and inputs." },
|
|
23
|
+
"model": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"fromConfig": { "type": "string", "description": "Organization config name holding provider, model, apiKey, endpoint. Default ai.default." },
|
|
27
|
+
"name": { "type": "string", "description": "Overrides the config's model name." },
|
|
28
|
+
"temperature": { "type": "number", "minimum": 0, "maximum": 2 },
|
|
29
|
+
"contextWindow": { "type": "integer", "minimum": 1, "description": "The model's context window in tokens. Needed when this agent overrides the model name via model.name: the organization config's window describes the config's model, not this one. Defaults to 256000 when neither the agent nor the resolved model configuration declares one." }
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"session": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"type": { "type": "string", "enum": ["task", "chat"], "default": "task", "description": "task ends when set_result is called; chat is open-ended." },
|
|
37
|
+
"maxTurns": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 },
|
|
38
|
+
"timeout": { "type": "integer", "minimum": 1, "default": 300, "description": "Seconds." }
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false
|
|
41
|
+
},
|
|
42
|
+
"result": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "JSON Schema (type: object) for the set_result argument.",
|
|
45
|
+
"properties": { "type": { "const": "object" } },
|
|
46
|
+
"required": ["type"]
|
|
47
|
+
},
|
|
48
|
+
"skills": { "type": "array", "items": { "type": "string" }, "description": "Installed skill names to enable (runtime in a later release)." },
|
|
49
|
+
"tools": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"description": "Tools the agent may call: other workflows, or built-in tools. Each entry has exactly one of 'workflow' or 'builtin'.",
|
|
52
|
+
"items": {
|
|
53
|
+
"oneOf": [
|
|
54
|
+
{
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["workflow"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"workflow": { "type": "string", "minLength": 1, "description": "Workflow name or workflowId to expose as a tool." },
|
|
59
|
+
"instructions": { "type": "string", "description": "When and how the agent should use this tool." },
|
|
60
|
+
"mode": { "type": "string", "enum": ["auto", "approval", "always"], "default": "auto", "description": "'auto' runs the tool as soon as the model calls it. 'approval' pauses a chat session until a person approves or declines the call, unless the chat is in Auto approval mode, where it runs and is recorded as auto-approved. 'always' pauses a chat session for a person in every approval mode. A task session (no person present) refuses 'approval' and 'always' calls outright and tells the agent it needs human approval." }
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["builtin"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"builtin": { "type": "string", "enum": ["data.query", "data.schema", "data.type"], "description": "A built-in, read-only data tool. data.query runs a GraphQL query in the agent's organization (tool data_query); data.schema lists query fields and types (data_schema); data.type describes one type (data_type)." },
|
|
69
|
+
"instructions": { "type": "string", "description": "When and how the agent should use this tool." },
|
|
70
|
+
"mode": { "type": "string", "enum": ["auto", "approval", "always"], "default": "auto", "description": "Same meaning as for workflow tools." }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"mcp": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": { "type": "object", "required": ["fromConfig"], "properties": { "fromConfig": { "type": "string" } }, "additionalProperties": false },
|
|
80
|
+
"description": "Outbound MCP connections (runtime in a later release)."
|
|
81
|
+
},
|
|
82
|
+
"agents": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"agent": { "type": "string", "description": "Name of another Agent workflow in this organization." },
|
|
88
|
+
"url": { "type": "string", "format": "uri", "description": "Remote A2A agent card URL." },
|
|
89
|
+
"modes": { "type": "array", "items": { "type": "string", "enum": ["task", "chat"] } }
|
|
90
|
+
},
|
|
91
|
+
"oneOf": [{ "required": ["agent"] }, { "required": ["url"] }],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
},
|
|
94
|
+
"description": "Allow list of agents this agent may invoke (runtime in a later release)."
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"additionalProperties": false
|
|
98
|
+
}
|