@xemahq/dsl 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deliverable-spec/lib/schema.d.ts +2 -0
- package/dist/deliverable-spec/lib/schema.d.ts.map +1 -1
- package/dist/deliverable-spec/lib/schema.js +10 -1
- package/dist/deliverable-spec/lib/schema.js.map +1 -1
- package/dist/schema/reusable-workflow.schema.json +9 -1
- package/dist/schema/workflow.schema.json +39 -13
- package/dist/workflow/index.d.ts +3 -0
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +7 -1
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/lib/compiler/compile.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/compile.js +105 -20
- package/dist/workflow/lib/compiler/compile.js.map +1 -1
- package/dist/workflow/lib/compiler/concurrency.js +1 -1
- package/dist/workflow/lib/compiler/concurrency.js.map +1 -1
- package/dist/workflow/lib/compiler/manifest-source.d.ts +2 -1
- package/dist/workflow/lib/compiler/manifest-source.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/manifest-source.js +13 -4
- package/dist/workflow/lib/compiler/manifest-source.js.map +1 -1
- package/dist/workflow/lib/compiler/review-step.d.ts +2 -1
- package/dist/workflow/lib/compiler/review-step.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/review-step.js +13 -1
- package/dist/workflow/lib/compiler/review-step.js.map +1 -1
- package/dist/workflow/lib/compiler/types.d.ts +3 -2
- package/dist/workflow/lib/compiler/types.d.ts.map +1 -1
- package/dist/workflow/lib/deliverable-spec-introspection-error.d.ts +12 -0
- package/dist/workflow/lib/deliverable-spec-introspection-error.d.ts.map +1 -0
- package/dist/workflow/lib/deliverable-spec-introspection-error.js +33 -0
- package/dist/workflow/lib/deliverable-spec-introspection-error.js.map +1 -0
- package/dist/workflow/lib/deliverable-spec-keys.d.ts +1 -1
- package/dist/workflow/lib/deliverable-spec-keys.d.ts.map +1 -1
- package/dist/workflow/lib/deliverable-spec-keys.js +27 -52
- package/dist/workflow/lib/deliverable-spec-keys.js.map +1 -1
- package/dist/workflow/lib/deliverable-spec-source-scan.d.ts +6 -0
- package/dist/workflow/lib/deliverable-spec-source-scan.d.ts.map +1 -0
- package/dist/workflow/lib/deliverable-spec-source-scan.js +189 -0
- package/dist/workflow/lib/deliverable-spec-source-scan.js.map +1 -0
- package/dist/workflow/lib/expression/context.d.ts +1 -1
- package/dist/workflow/lib/expression/context.d.ts.map +1 -1
- package/dist/workflow/lib/expression/context.js +1 -1
- package/dist/workflow/lib/expression/context.js.map +1 -1
- package/dist/workflow/lib/types.d.ts +1 -1
- package/dist/workflow/lib/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/schema/reusable-workflow.schema.json +9 -1
- package/schema/workflow.schema.json +39 -13
- package/src/deliverable-spec/lib/schema.ts +23 -0
- package/src/workflow/index.ts +7 -0
- package/src/workflow/lib/compiler/compile.ts +302 -149
- package/src/workflow/lib/compiler/concurrency.ts +1 -1
- package/src/workflow/lib/compiler/manifest-source.ts +23 -8
- package/src/workflow/lib/compiler/review-step.ts +33 -2
- package/src/workflow/lib/compiler/types.ts +9 -9
- package/src/workflow/lib/deliverable-spec-introspection-error.ts +63 -0
- package/src/workflow/lib/deliverable-spec-keys.ts +88 -50
- package/src/workflow/lib/deliverable-spec-source-scan.ts +280 -0
- package/src/workflow/lib/expression/context.ts +2 -2
- package/src/workflow/lib/types.ts +38 -8
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ConcurrencyMode,
|
|
3
|
+
PermissionScope,
|
|
4
|
+
} from '@xemahq/kernel-contracts/workflow';
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* Authored-shape TypeScript types for a Xema workflow document. These match
|
|
@@ -90,7 +93,8 @@ export interface WorkflowStructuredOutputDeclaration
|
|
|
90
93
|
readonly schemaRef?: string;
|
|
91
94
|
}
|
|
92
95
|
|
|
93
|
-
export interface WorkflowTextOutputDeclaration
|
|
96
|
+
export interface WorkflowTextOutputDeclaration
|
|
97
|
+
extends WorkflowOutputDeclarationBase {
|
|
94
98
|
readonly kind: 'text';
|
|
95
99
|
}
|
|
96
100
|
|
|
@@ -119,7 +123,12 @@ export interface WorkflowConnectorRequirement {
|
|
|
119
123
|
|
|
120
124
|
export interface WorkflowMetadata {
|
|
121
125
|
readonly name: string;
|
|
122
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Compatibility version for an explicitly reusable public workflow API.
|
|
128
|
+
* Ordinary workflows omit this; their immutable revision is generated by
|
|
129
|
+
* the workflow registry.
|
|
130
|
+
*/
|
|
131
|
+
readonly contractVersion?: string;
|
|
123
132
|
readonly title?: string;
|
|
124
133
|
readonly description?: string;
|
|
125
134
|
readonly category?: string;
|
|
@@ -155,7 +164,13 @@ export interface WorkflowCallDeclaration {
|
|
|
155
164
|
}
|
|
156
165
|
|
|
157
166
|
export interface WorkflowInputDeclaration {
|
|
158
|
-
readonly type:
|
|
167
|
+
readonly type:
|
|
168
|
+
| 'string'
|
|
169
|
+
| 'number'
|
|
170
|
+
| 'integer'
|
|
171
|
+
| 'boolean'
|
|
172
|
+
| 'object'
|
|
173
|
+
| 'array';
|
|
159
174
|
readonly required?: boolean;
|
|
160
175
|
readonly default?: unknown;
|
|
161
176
|
readonly description?: string;
|
|
@@ -207,7 +222,12 @@ export interface WorkflowRetryDeclaration {
|
|
|
207
222
|
readonly nonRetryableErrorTypes?: readonly string[];
|
|
208
223
|
}
|
|
209
224
|
|
|
210
|
-
export type WorkflowPermissions = Partial<
|
|
225
|
+
export type WorkflowPermissions = Partial<
|
|
226
|
+
Record<
|
|
227
|
+
'repos' | 'kb' | 'backlog' | 'connectors' | 'artifacts' | 'memory',
|
|
228
|
+
PermissionScope
|
|
229
|
+
>
|
|
230
|
+
>;
|
|
211
231
|
|
|
212
232
|
export interface WorkflowJobDeclaration {
|
|
213
233
|
readonly title?: string;
|
|
@@ -224,8 +244,14 @@ export interface WorkflowJobDeclaration {
|
|
|
224
244
|
}
|
|
225
245
|
|
|
226
246
|
export type WorkflowStrategyDeclaration =
|
|
227
|
-
| {
|
|
228
|
-
|
|
247
|
+
| {
|
|
248
|
+
readonly matrix: Readonly<Record<string, readonly unknown[]>>;
|
|
249
|
+
readonly maxParallel?: number;
|
|
250
|
+
}
|
|
251
|
+
| {
|
|
252
|
+
readonly dynamic: WorkflowDynamicStrategyDeclaration;
|
|
253
|
+
readonly maxParallel?: number;
|
|
254
|
+
};
|
|
229
255
|
|
|
230
256
|
export interface WorkflowDynamicStrategyDeclaration {
|
|
231
257
|
readonly from: string;
|
|
@@ -307,7 +333,11 @@ export interface ActionManifestSpec {
|
|
|
307
333
|
readonly allowedMounts?: readonly string[];
|
|
308
334
|
readonly retryDefaults: ActionManifestRetryDefaults;
|
|
309
335
|
readonly timeoutDefaults: ActionManifestTimeoutDefaults;
|
|
310
|
-
readonly auditEventMapping?: Partial<{
|
|
336
|
+
readonly auditEventMapping?: Partial<{
|
|
337
|
+
started: string;
|
|
338
|
+
succeeded: string;
|
|
339
|
+
failed: string;
|
|
340
|
+
}>;
|
|
311
341
|
/**
|
|
312
342
|
* Declarative contracts the action opts into. The DSL compiler reads
|
|
313
343
|
* this list to decide which validation lanes apply — e.g. the
|