@xemahq/dsl 0.8.2 → 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 (51) hide show
  1. package/dist/deliverable-spec/lib/schema.d.ts +5 -3
  2. package/dist/deliverable-spec/lib/schema.d.ts.map +1 -1
  3. package/dist/deliverable-spec/lib/schema.js +7 -1
  4. package/dist/deliverable-spec/lib/schema.js.map +1 -1
  5. package/dist/payload-codec/index.d.ts.map +1 -1
  6. package/dist/payload-codec/index.js.map +1 -1
  7. package/dist/payload-codec/lib/codec.d.ts.map +1 -1
  8. package/dist/payload-codec/lib/codec.js +2 -1
  9. package/dist/payload-codec/lib/codec.js.map +1 -1
  10. package/dist/payload-codec/lib/payload.d.ts.map +1 -1
  11. package/dist/schema/action.schema.json +190 -51
  12. package/dist/schema/workflow.schema.json +336 -89
  13. package/dist/workflow/index.d.ts +2 -2
  14. package/dist/workflow/index.d.ts.map +1 -1
  15. package/dist/workflow/index.js +2 -2
  16. package/dist/workflow/index.js.map +1 -1
  17. package/dist/workflow/lib/compiler/action-shape.d.ts +2 -3
  18. package/dist/workflow/lib/compiler/action-shape.d.ts.map +1 -1
  19. package/dist/workflow/lib/compiler/action-shape.js +5 -19
  20. package/dist/workflow/lib/compiler/action-shape.js.map +1 -1
  21. package/dist/workflow/lib/compiler/compile.d.ts.map +1 -1
  22. package/dist/workflow/lib/compiler/compile.js +8 -112
  23. package/dist/workflow/lib/compiler/compile.js.map +1 -1
  24. package/dist/workflow/lib/compiler/index.d.ts +2 -2
  25. package/dist/workflow/lib/compiler/index.d.ts.map +1 -1
  26. package/dist/workflow/lib/compiler/index.js +2 -2
  27. package/dist/workflow/lib/compiler/index.js.map +1 -1
  28. package/dist/workflow/lib/compiler/manifest-source.d.ts +1 -2
  29. package/dist/workflow/lib/compiler/manifest-source.d.ts.map +1 -1
  30. package/dist/workflow/lib/compiler/manifest-source.js +30 -24
  31. package/dist/workflow/lib/compiler/manifest-source.js.map +1 -1
  32. package/dist/workflow/lib/compiler/mount-plan.js +7 -6
  33. package/dist/workflow/lib/compiler/mount-plan.js.map +1 -1
  34. package/dist/workflow/lib/compiler/types.d.ts +0 -6
  35. package/dist/workflow/lib/compiler/types.d.ts.map +1 -1
  36. package/dist/workflow/lib/types.d.ts +3 -7
  37. package/dist/workflow/lib/types.d.ts.map +1 -1
  38. package/dist/workspace-manifest/lib/compile.js +8 -8
  39. package/dist/workspace-manifest/lib/compile.js.map +1 -1
  40. package/dist/workspace-manifest/lib/schema.d.ts +3 -3
  41. package/dist/workspace-manifest/lib/schema.js +3 -3
  42. package/dist/workspace-manifest/lib/types.d.ts +1 -1
  43. package/dist/workspace-manifest/lib/types.d.ts.map +1 -1
  44. package/dist/workspace-manifest/lib/types.js.map +1 -1
  45. package/package.json +2 -17
  46. package/schema/action.schema.json +190 -51
  47. package/schema/workflow.schema.json +336 -89
  48. package/dist/payload-codec/temporal/index.d.ts +0 -5
  49. package/dist/payload-codec/temporal/index.d.ts.map +0 -1
  50. package/dist/payload-codec/temporal/index.js +0 -7
  51. package/dist/payload-codec/temporal/index.js.map +0 -1
@@ -4,18 +4,36 @@
4
4
  "title": "Xema Action Manifest",
5
5
  "description": "Declarative manifest for a single action version. Manifests live in plugins/software-dev/workflow-config/actions/ and are seeded into the workflow-engine action registry.",
6
6
  "type": "object",
7
- "required": ["apiVersion", "kind", "metadata", "spec"],
7
+ "required": [
8
+ "apiVersion",
9
+ "kind",
10
+ "metadata",
11
+ "spec"
12
+ ],
8
13
  "additionalProperties": false,
9
14
  "properties": {
10
- "apiVersion": { "type": "string", "const": "xema.dev/workflow/v1alpha1" },
11
- "kind": { "type": "string", "const": "Action" },
12
- "metadata": { "$ref": "#/$defs/Metadata" },
13
- "spec": { "$ref": "#/$defs/Spec" }
15
+ "apiVersion": {
16
+ "type": "string",
17
+ "const": "xema.dev/workflow/v1alpha1"
18
+ },
19
+ "kind": {
20
+ "type": "string",
21
+ "const": "Action"
22
+ },
23
+ "metadata": {
24
+ "$ref": "#/$defs/Metadata"
25
+ },
26
+ "spec": {
27
+ "$ref": "#/$defs/Spec"
28
+ }
14
29
  },
15
30
  "$defs": {
16
31
  "Metadata": {
17
32
  "type": "object",
18
- "required": ["id", "version"],
33
+ "required": [
34
+ "id",
35
+ "version"
36
+ ],
19
37
  "additionalProperties": false,
20
38
  "properties": {
21
39
  "id": {
@@ -27,17 +45,44 @@
27
45
  "type": "string",
28
46
  "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.-]+)?$"
29
47
  },
30
- "title": { "type": "string", "maxLength": 120 },
31
- "description": { "type": "string", "maxLength": 4000 }
48
+ "title": {
49
+ "type": "string",
50
+ "maxLength": 120
51
+ },
52
+ "description": {
53
+ "type": "string",
54
+ "maxLength": 4000
55
+ }
32
56
  }
33
57
  },
34
58
  "Spec": {
35
59
  "type": "object",
36
- "required": ["executionKind", "taskQueue", "inputs", "outputs", "permissions", "retryDefaults", "timeoutDefaults"],
60
+ "required": [
61
+ "executionKind",
62
+ "taskQueue",
63
+ "inputs",
64
+ "outputs",
65
+ "permissions",
66
+ "retryDefaults",
67
+ "timeoutDefaults"
68
+ ],
37
69
  "additionalProperties": false,
38
70
  "properties": {
39
- "executionKind": { "type": "string", "enum": ["activity", "child_workflow"] },
40
- "taskQueue": { "type": "string", "enum": ["xema_default", "xema_agent", "xema_human"] },
71
+ "executionKind": {
72
+ "type": "string",
73
+ "enum": [
74
+ "activity",
75
+ "child_workflow"
76
+ ]
77
+ },
78
+ "taskQueue": {
79
+ "type": "string",
80
+ "enum": [
81
+ "xema_default",
82
+ "xema_agent",
83
+ "xema_human"
84
+ ]
85
+ },
41
86
  "actionKind": {
42
87
  "type": "string",
43
88
  "description": "Semantic category — drives consumer presentation (FE canvas shape, badge icon). Optional; omitted manifests are treated as 'generic'. Closed list mirrors `ActionKind` in `@xemahq/workflow-contracts`.",
@@ -88,40 +133,122 @@
88
133
  "description": "Minimum permission scope this action requires.",
89
134
  "additionalProperties": false,
90
135
  "properties": {
91
- "repos": { "type": "string", "enum": ["none", "read", "limited", "write"] },
92
- "kb": { "type": "string", "enum": ["none", "read", "limited", "write"] },
93
- "backlog": { "type": "string", "enum": ["none", "read", "limited", "write"] },
94
- "integrations": { "type": "string", "enum": ["none", "read", "limited", "write"] },
95
- "artifacts": { "type": "string", "enum": ["none", "read", "limited", "write"] }
136
+ "artifacts": {
137
+ "type": "string",
138
+ "enum": [
139
+ "none",
140
+ "read",
141
+ "limited",
142
+ "write"
143
+ ]
144
+ },
145
+ "backlog": {
146
+ "type": "string",
147
+ "enum": [
148
+ "none",
149
+ "read",
150
+ "limited",
151
+ "write"
152
+ ]
153
+ },
154
+ "connectors": {
155
+ "type": "string",
156
+ "enum": [
157
+ "none",
158
+ "read",
159
+ "limited",
160
+ "write"
161
+ ]
162
+ },
163
+ "kb": {
164
+ "type": "string",
165
+ "enum": [
166
+ "none",
167
+ "read",
168
+ "limited",
169
+ "write"
170
+ ]
171
+ },
172
+ "memory": {
173
+ "type": "string",
174
+ "enum": [
175
+ "none",
176
+ "read",
177
+ "limited",
178
+ "write"
179
+ ]
180
+ },
181
+ "repos": {
182
+ "type": "string",
183
+ "enum": [
184
+ "none",
185
+ "read",
186
+ "limited",
187
+ "write"
188
+ ]
189
+ }
96
190
  }
97
191
  },
98
192
  "allowedMounts": {
99
193
  "type": "array",
100
- "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
194
+ "items": {
195
+ "type": "string",
196
+ "pattern": "^[a-z][a-z0-9-]*$"
197
+ },
101
198
  "uniqueItems": true
102
199
  },
103
200
  "retryDefaults": {
104
201
  "type": "object",
105
- "required": ["maxAttempts", "initialInterval", "backoffCoefficient", "maximumInterval"],
202
+ "required": [
203
+ "maxAttempts",
204
+ "initialInterval",
205
+ "backoffCoefficient",
206
+ "maximumInterval"
207
+ ],
106
208
  "additionalProperties": false,
107
209
  "properties": {
108
- "maxAttempts": { "type": "integer", "minimum": 1, "maximum": 20 },
109
- "initialInterval": { "type": "string", "pattern": "^([1-9][0-9]*)(s|m|h)$" },
110
- "backoffCoefficient": { "type": "number", "minimum": 1.0, "maximum": 10.0 },
111
- "maximumInterval": { "type": "string", "pattern": "^([1-9][0-9]*)(s|m|h)$" },
210
+ "maxAttempts": {
211
+ "type": "integer",
212
+ "minimum": 1,
213
+ "maximum": 20
214
+ },
215
+ "initialInterval": {
216
+ "type": "string",
217
+ "pattern": "^([1-9][0-9]*)(s|m|h)$"
218
+ },
219
+ "backoffCoefficient": {
220
+ "type": "number",
221
+ "minimum": 1.0,
222
+ "maximum": 10.0
223
+ },
224
+ "maximumInterval": {
225
+ "type": "string",
226
+ "pattern": "^([1-9][0-9]*)(s|m|h)$"
227
+ },
112
228
  "nonRetryableErrorTypes": {
113
229
  "type": "array",
114
- "items": { "type": "string", "minLength": 1 }
230
+ "items": {
231
+ "type": "string",
232
+ "minLength": 1
233
+ }
115
234
  }
116
235
  }
117
236
  },
118
237
  "timeoutDefaults": {
119
238
  "type": "object",
120
- "required": ["startToClose"],
239
+ "required": [
240
+ "startToClose"
241
+ ],
121
242
  "additionalProperties": false,
122
243
  "properties": {
123
- "startToClose": { "type": "string", "pattern": "^([1-9][0-9]*)(s|m|h)$" },
124
- "heartbeat": { "type": "string", "pattern": "^([1-9][0-9]*)(s|m|h)$" }
244
+ "startToClose": {
245
+ "type": "string",
246
+ "pattern": "^([1-9][0-9]*)(s|m|h)$"
247
+ },
248
+ "heartbeat": {
249
+ "type": "string",
250
+ "pattern": "^([1-9][0-9]*)(s|m|h)$"
251
+ }
125
252
  }
126
253
  },
127
254
  "auditEventMapping": {
@@ -129,36 +256,58 @@
129
256
  "description": "Mapping from step lifecycle to audit-log-api event code.",
130
257
  "additionalProperties": false,
131
258
  "properties": {
132
- "started": { "type": "string", "minLength": 1 },
133
- "succeeded": { "type": "string", "minLength": 1 },
134
- "failed": { "type": "string", "minLength": 1 }
259
+ "started": {
260
+ "type": "string",
261
+ "minLength": 1
262
+ },
263
+ "succeeded": {
264
+ "type": "string",
265
+ "minLength": 1
266
+ },
267
+ "failed": {
268
+ "type": "string",
269
+ "minLength": 1
270
+ }
135
271
  }
136
272
  },
137
273
  "consumes": {
138
274
  "type": "array",
139
- "description": "Declarative contracts the action opts into. The DSL compiler reads this list to decide which validation lanes apply — e.g. the `workspace-manifest@v1` entry enables the manifest-source lane (`agentRef` required) and the frontend canvas Inspector renders the manifest picker.",
140
- "items": { "$ref": "#/$defs/ActionContract" }
275
+ "description": "Declarative contracts the action opts into. The `session-launch@v1` entry enables canonical Session launch validation.",
276
+ "items": {
277
+ "$ref": "#/$defs/ActionContract"
278
+ }
141
279
  }
142
280
  }
143
281
  },
144
282
  "ActionContract": {
145
- "description": "Versioned consume-contract declaration. Kinds: `workspace-manifest@v1` (manifest-source lane, `agentRef` required) and `agent-composition@v1` (`with.composition` slug@version reference).",
146
- "oneOf": [
147
- { "$ref": "#/$defs/WorkspaceManifestActionContract" },
148
- { "$ref": "#/$defs/AgentCompositionActionContract" }
149
- ]
283
+ "$ref": "#/$defs/SessionLaunchActionContract"
150
284
  },
151
- "WorkspaceManifestActionContract": {
285
+ "SessionLaunchActionContract": {
152
286
  "type": "object",
153
- "required": ["kind", "version"],
287
+ "required": [
288
+ "kind",
289
+ "version"
290
+ ],
154
291
  "additionalProperties": false,
155
292
  "properties": {
156
- "kind": { "type": "string", "const": "workspace-manifest" },
157
- "version": { "type": "string", "const": "v1" },
293
+ "kind": {
294
+ "type": "string",
295
+ "const": "session-launch"
296
+ },
297
+ "version": {
298
+ "type": "string",
299
+ "const": "v1"
300
+ },
158
301
  "surfaces": {
159
302
  "type": "array",
160
303
  "description": "Restricts the surfaces the action can be invoked on. Must intersect the manifest's `metadata.surfaceCompat`.",
161
- "items": { "type": "string", "enum": ["workflow", "agent-session"] },
304
+ "items": {
305
+ "type": "string",
306
+ "enum": [
307
+ "workflow",
308
+ "agent-session"
309
+ ]
310
+ },
162
311
  "uniqueItems": true
163
312
  },
164
313
  "roleHint": {
@@ -166,16 +315,6 @@
166
315
  "description": "Pins the manifest's `spec.agent.role` to a closed `AgentRunRole`. Compile-time fail when a workflow points the action at a manifest whose role doesn't match."
167
316
  }
168
317
  }
169
- },
170
- "AgentCompositionActionContract": {
171
- "type": "object",
172
- "required": ["kind", "version"],
173
- "additionalProperties": false,
174
- "description": "Opts the action into the `with.composition` field — a `slug@version` reference to an Agent Composition resolved at dispatch time by the runtime.",
175
- "properties": {
176
- "kind": { "type": "string", "const": "agent-composition" },
177
- "version": { "type": "string", "const": "v1" }
178
- }
179
318
  }
180
319
  }
181
320
  }