@xemahq/dsl 0.1.1
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/LICENSE +201 -0
- package/dist/deliverable-spec/index.d.ts +3 -0
- package/dist/deliverable-spec/index.d.ts.map +1 -0
- package/dist/deliverable-spec/index.js +19 -0
- package/dist/deliverable-spec/index.js.map +1 -0
- package/dist/deliverable-spec/lib/schema.d.ts +151 -0
- package/dist/deliverable-spec/lib/schema.d.ts.map +1 -0
- package/dist/deliverable-spec/lib/schema.js +139 -0
- package/dist/deliverable-spec/lib/schema.js.map +1 -0
- package/dist/deliverable-spec/lib/types.d.ts +8 -0
- package/dist/deliverable-spec/lib/types.d.ts.map +1 -0
- package/dist/deliverable-spec/lib/types.js +3 -0
- package/dist/deliverable-spec/lib/types.js.map +1 -0
- package/dist/payload-codec/index.d.ts +8 -0
- package/dist/payload-codec/index.d.ts.map +1 -0
- package/dist/payload-codec/index.js +27 -0
- package/dist/payload-codec/index.js.map +1 -0
- package/dist/payload-codec/lib/blob-store.d.ts +37 -0
- package/dist/payload-codec/lib/blob-store.d.ts.map +1 -0
- package/dist/payload-codec/lib/blob-store.js +0 -0
- package/dist/payload-codec/lib/blob-store.js.map +1 -0
- package/dist/payload-codec/lib/codec-context.d.ts +6 -0
- package/dist/payload-codec/lib/codec-context.d.ts.map +1 -0
- package/dist/payload-codec/lib/codec-context.js +16 -0
- package/dist/payload-codec/lib/codec-context.js.map +1 -0
- package/dist/payload-codec/lib/codec.d.ts +51 -0
- package/dist/payload-codec/lib/codec.d.ts.map +1 -0
- package/dist/payload-codec/lib/codec.js +330 -0
- package/dist/payload-codec/lib/codec.js.map +1 -0
- package/dist/payload-codec/lib/enums.d.ts +18 -0
- package/dist/payload-codec/lib/enums.d.ts.map +1 -0
- package/dist/payload-codec/lib/enums.js +23 -0
- package/dist/payload-codec/lib/enums.js.map +1 -0
- package/dist/payload-codec/lib/errors.d.ts +18 -0
- package/dist/payload-codec/lib/errors.d.ts.map +1 -0
- package/dist/payload-codec/lib/errors.js +39 -0
- package/dist/payload-codec/lib/errors.js.map +1 -0
- package/dist/payload-codec/lib/http-blob-store.d.ts +21 -0
- package/dist/payload-codec/lib/http-blob-store.d.ts.map +1 -0
- package/dist/payload-codec/lib/http-blob-store.js +139 -0
- package/dist/payload-codec/lib/http-blob-store.js.map +1 -0
- package/dist/payload-codec/lib/lru-cache.d.ts +12 -0
- package/dist/payload-codec/lib/lru-cache.d.ts.map +1 -0
- package/dist/payload-codec/lib/lru-cache.js +59 -0
- package/dist/payload-codec/lib/lru-cache.js.map +1 -0
- package/dist/schema/action.schema.json +181 -0
- package/dist/schema/reusable-workflow.schema.json +46 -0
- package/dist/schema/workflow.schema.json +373 -0
- package/dist/workflow/index.d.ts +14 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +49 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/lib/action-input-validator.d.ts +10 -0
- package/dist/workflow/lib/action-input-validator.d.ts.map +1 -0
- package/dist/workflow/lib/action-input-validator.js +69 -0
- package/dist/workflow/lib/action-input-validator.js.map +1 -0
- package/dist/workflow/lib/compiler/action-shape.d.ts +5 -0
- package/dist/workflow/lib/compiler/action-shape.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/action-shape.js +43 -0
- package/dist/workflow/lib/compiler/action-shape.js.map +1 -0
- package/dist/workflow/lib/compiler/canonical-json.d.ts +3 -0
- package/dist/workflow/lib/compiler/canonical-json.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/canonical-json.js +45 -0
- package/dist/workflow/lib/compiler/canonical-json.js.map +1 -0
- package/dist/workflow/lib/compiler/compile.d.ts +4 -0
- package/dist/workflow/lib/compiler/compile.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/compile.js +794 -0
- package/dist/workflow/lib/compiler/compile.js.map +1 -0
- package/dist/workflow/lib/compiler/concurrency.d.ts +5 -0
- package/dist/workflow/lib/compiler/concurrency.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/concurrency.js +104 -0
- package/dist/workflow/lib/compiler/concurrency.js.map +1 -0
- package/dist/workflow/lib/compiler/dag.d.ts +10 -0
- package/dist/workflow/lib/compiler/dag.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/dag.js +74 -0
- package/dist/workflow/lib/compiler/dag.js.map +1 -0
- package/dist/workflow/lib/compiler/index.d.ts +6 -0
- package/dist/workflow/lib/compiler/index.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/index.js +14 -0
- package/dist/workflow/lib/compiler/index.js.map +1 -0
- package/dist/workflow/lib/compiler/inputs.d.ts +4 -0
- package/dist/workflow/lib/compiler/inputs.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/inputs.js +108 -0
- package/dist/workflow/lib/compiler/inputs.js.map +1 -0
- package/dist/workflow/lib/compiler/installation-resource-validator.d.ts +9 -0
- package/dist/workflow/lib/compiler/installation-resource-validator.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/installation-resource-validator.js +76 -0
- package/dist/workflow/lib/compiler/installation-resource-validator.js.map +1 -0
- package/dist/workflow/lib/compiler/manifest-source.d.ts +4 -0
- package/dist/workflow/lib/compiler/manifest-source.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/manifest-source.js +100 -0
- package/dist/workflow/lib/compiler/manifest-source.js.map +1 -0
- package/dist/workflow/lib/compiler/matrix.d.ts +4 -0
- package/dist/workflow/lib/compiler/matrix.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/matrix.js +76 -0
- package/dist/workflow/lib/compiler/matrix.js.map +1 -0
- package/dist/workflow/lib/compiler/mount-plan.d.ts +4 -0
- package/dist/workflow/lib/compiler/mount-plan.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/mount-plan.js +96 -0
- package/dist/workflow/lib/compiler/mount-plan.js.map +1 -0
- package/dist/workflow/lib/compiler/payload-reach-in.d.ts +14 -0
- package/dist/workflow/lib/compiler/payload-reach-in.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/payload-reach-in.js +273 -0
- package/dist/workflow/lib/compiler/payload-reach-in.js.map +1 -0
- package/dist/workflow/lib/compiler/permissions.d.ts +6 -0
- package/dist/workflow/lib/compiler/permissions.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/permissions.js +43 -0
- package/dist/workflow/lib/compiler/permissions.js.map +1 -0
- package/dist/workflow/lib/compiler/retry-timeout.d.ts +6 -0
- package/dist/workflow/lib/compiler/retry-timeout.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/retry-timeout.js +64 -0
- package/dist/workflow/lib/compiler/retry-timeout.js.map +1 -0
- package/dist/workflow/lib/compiler/review-step.d.ts +18 -0
- package/dist/workflow/lib/compiler/review-step.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/review-step.js +247 -0
- package/dist/workflow/lib/compiler/review-step.js.map +1 -0
- package/dist/workflow/lib/compiler/types.d.ts +42 -0
- package/dist/workflow/lib/compiler/types.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/types.js +3 -0
- package/dist/workflow/lib/compiler/types.js.map +1 -0
- package/dist/workflow/lib/compiler/variable-requirements.d.ts +5 -0
- package/dist/workflow/lib/compiler/variable-requirements.d.ts.map +1 -0
- package/dist/workflow/lib/compiler/variable-requirements.js +119 -0
- package/dist/workflow/lib/compiler/variable-requirements.js.map +1 -0
- package/dist/workflow/lib/deliverable-spec-keys.d.ts +3 -0
- package/dist/workflow/lib/deliverable-spec-keys.d.ts.map +1 -0
- package/dist/workflow/lib/deliverable-spec-keys.js +90 -0
- package/dist/workflow/lib/deliverable-spec-keys.js.map +1 -0
- package/dist/workflow/lib/dispatch-inputs/index.d.ts +23 -0
- package/dist/workflow/lib/dispatch-inputs/index.d.ts.map +1 -0
- package/dist/workflow/lib/dispatch-inputs/index.js +106 -0
- package/dist/workflow/lib/dispatch-inputs/index.js.map +1 -0
- package/dist/workflow/lib/dispatch-inputs/to-json-schema.d.ts +3 -0
- package/dist/workflow/lib/dispatch-inputs/to-json-schema.d.ts.map +1 -0
- package/dist/workflow/lib/dispatch-inputs/to-json-schema.js +43 -0
- package/dist/workflow/lib/dispatch-inputs/to-json-schema.js.map +1 -0
- package/dist/workflow/lib/duration.d.ts +2 -0
- package/dist/workflow/lib/duration.d.ts.map +1 -0
- package/dist/workflow/lib/duration.js +26 -0
- package/dist/workflow/lib/duration.js.map +1 -0
- package/dist/workflow/lib/errors.d.ts +9 -0
- package/dist/workflow/lib/errors.d.ts.map +1 -0
- package/dist/workflow/lib/errors.js +28 -0
- package/dist/workflow/lib/errors.js.map +1 -0
- package/dist/workflow/lib/expression/ast.d.ts +61 -0
- package/dist/workflow/lib/expression/ast.d.ts.map +1 -0
- package/dist/workflow/lib/expression/ast.js +34 -0
- package/dist/workflow/lib/expression/ast.js.map +1 -0
- package/dist/workflow/lib/expression/context.d.ts +63 -0
- package/dist/workflow/lib/expression/context.d.ts.map +1 -0
- package/dist/workflow/lib/expression/context.js +32 -0
- package/dist/workflow/lib/expression/context.js.map +1 -0
- package/dist/workflow/lib/expression/evaluator.d.ts +5 -0
- package/dist/workflow/lib/expression/evaluator.d.ts.map +1 -0
- package/dist/workflow/lib/expression/evaluator.js +291 -0
- package/dist/workflow/lib/expression/evaluator.js.map +1 -0
- package/dist/workflow/lib/expression/index.d.ts +9 -0
- package/dist/workflow/lib/expression/index.d.ts.map +1 -0
- package/dist/workflow/lib/expression/index.js +26 -0
- package/dist/workflow/lib/expression/index.js.map +1 -0
- package/dist/workflow/lib/expression/interpolation.d.ts +9 -0
- package/dist/workflow/lib/expression/interpolation.d.ts.map +1 -0
- package/dist/workflow/lib/expression/interpolation.js +51 -0
- package/dist/workflow/lib/expression/interpolation.js.map +1 -0
- package/dist/workflow/lib/expression/parser.d.ts +4 -0
- package/dist/workflow/lib/expression/parser.d.ts.map +1 -0
- package/dist/workflow/lib/expression/parser.js +203 -0
- package/dist/workflow/lib/expression/parser.js.map +1 -0
- package/dist/workflow/lib/expression/template.d.ts +18 -0
- package/dist/workflow/lib/expression/template.d.ts.map +1 -0
- package/dist/workflow/lib/expression/template.js +63 -0
- package/dist/workflow/lib/expression/template.js.map +1 -0
- package/dist/workflow/lib/expression/tokenizer.d.ts +3 -0
- package/dist/workflow/lib/expression/tokenizer.d.ts.map +1 -0
- package/dist/workflow/lib/expression/tokenizer.js +153 -0
- package/dist/workflow/lib/expression/tokenizer.js.map +1 -0
- package/dist/workflow/lib/expression/tokens.d.ts +25 -0
- package/dist/workflow/lib/expression/tokens.d.ts.map +1 -0
- package/dist/workflow/lib/expression/tokens.js +24 -0
- package/dist/workflow/lib/expression/tokens.js.map +1 -0
- package/dist/workflow/lib/expression/walk-artifact-refs.d.ts +5 -0
- package/dist/workflow/lib/expression/walk-artifact-refs.d.ts.map +1 -0
- package/dist/workflow/lib/expression/walk-artifact-refs.js +138 -0
- package/dist/workflow/lib/expression/walk-artifact-refs.js.map +1 -0
- package/dist/workflow/lib/installation-resource-kind.d.ts +14 -0
- package/dist/workflow/lib/installation-resource-kind.d.ts.map +1 -0
- package/dist/workflow/lib/installation-resource-kind.js +59 -0
- package/dist/workflow/lib/installation-resource-kind.js.map +1 -0
- package/dist/workflow/lib/schemas-loader.d.ts +4 -0
- package/dist/workflow/lib/schemas-loader.d.ts.map +1 -0
- package/dist/workflow/lib/schemas-loader.js +36 -0
- package/dist/workflow/lib/schemas-loader.js.map +1 -0
- package/dist/workflow/lib/serializer.d.ts +3 -0
- package/dist/workflow/lib/serializer.d.ts.map +1 -0
- package/dist/workflow/lib/serializer.js +15 -0
- package/dist/workflow/lib/serializer.js.map +1 -0
- package/dist/workflow/lib/types.d.ts +179 -0
- package/dist/workflow/lib/types.d.ts.map +1 -0
- package/dist/workflow/lib/types.js +3 -0
- package/dist/workflow/lib/types.js.map +1 -0
- package/dist/workflow/lib/validate.d.ts +8 -0
- package/dist/workflow/lib/validate.d.ts.map +1 -0
- package/dist/workflow/lib/validate.js +119 -0
- package/dist/workflow/lib/validate.js.map +1 -0
- package/dist/workspace-manifest/index.d.ts +6 -0
- package/dist/workspace-manifest/index.d.ts.map +1 -0
- package/dist/workspace-manifest/index.js +22 -0
- package/dist/workspace-manifest/index.js.map +1 -0
- package/dist/workspace-manifest/lib/compile.d.ts +8 -0
- package/dist/workspace-manifest/lib/compile.d.ts.map +1 -0
- package/dist/workspace-manifest/lib/compile.js +439 -0
- package/dist/workspace-manifest/lib/compile.js.map +1 -0
- package/dist/workspace-manifest/lib/interpolate.d.ts +12 -0
- package/dist/workspace-manifest/lib/interpolate.d.ts.map +1 -0
- package/dist/workspace-manifest/lib/interpolate.js +81 -0
- package/dist/workspace-manifest/lib/interpolate.js.map +1 -0
- package/dist/workspace-manifest/lib/resolve-extends.d.ts +10 -0
- package/dist/workspace-manifest/lib/resolve-extends.d.ts.map +1 -0
- package/dist/workspace-manifest/lib/resolve-extends.js +108 -0
- package/dist/workspace-manifest/lib/resolve-extends.js.map +1 -0
- package/dist/workspace-manifest/lib/schema.d.ts +710 -0
- package/dist/workspace-manifest/lib/schema.d.ts.map +1 -0
- package/dist/workspace-manifest/lib/schema.js +355 -0
- package/dist/workspace-manifest/lib/schema.js.map +1 -0
- package/dist/workspace-manifest/lib/types.d.ts +153 -0
- package/dist/workspace-manifest/lib/types.d.ts.map +1 -0
- package/dist/workspace-manifest/lib/types.js +10 -0
- package/dist/workspace-manifest/lib/types.js.map +1 -0
- package/package.json +79 -0
- package/schema/action.schema.json +181 -0
- package/schema/reusable-workflow.schema.json +46 -0
- package/schema/workflow.schema.json +373 -0
- package/src/deliverable-spec/index.ts +19 -0
- package/src/deliverable-spec/lib/schema.ts +248 -0
- package/src/deliverable-spec/lib/types.ts +26 -0
- package/src/payload-codec/index.ts +40 -0
- package/src/payload-codec/lib/blob-store.ts +0 -0
- package/src/payload-codec/lib/codec-context.ts +38 -0
- package/src/payload-codec/lib/codec.ts +593 -0
- package/src/payload-codec/lib/enums.ts +58 -0
- package/src/payload-codec/lib/errors.ts +54 -0
- package/src/payload-codec/lib/http-blob-store.ts +257 -0
- package/src/payload-codec/lib/lru-cache.ts +81 -0
- package/src/workflow/index.ts +98 -0
- package/src/workflow/lib/action-input-validator.ts +160 -0
- package/src/workflow/lib/compiler/action-shape.ts +71 -0
- package/src/workflow/lib/compiler/canonical-json.ts +53 -0
- package/src/workflow/lib/compiler/compile.ts +1518 -0
- package/src/workflow/lib/compiler/concurrency.ts +223 -0
- package/src/workflow/lib/compiler/dag.ts +108 -0
- package/src/workflow/lib/compiler/index.ts +10 -0
- package/src/workflow/lib/compiler/inputs.ts +199 -0
- package/src/workflow/lib/compiler/installation-resource-validator.ts +114 -0
- package/src/workflow/lib/compiler/manifest-source.ts +176 -0
- package/src/workflow/lib/compiler/matrix.ts +135 -0
- package/src/workflow/lib/compiler/mount-plan.ts +202 -0
- package/src/workflow/lib/compiler/payload-reach-in.ts +497 -0
- package/src/workflow/lib/compiler/permissions.ts +64 -0
- package/src/workflow/lib/compiler/retry-timeout.ts +105 -0
- package/src/workflow/lib/compiler/review-step.ts +517 -0
- package/src/workflow/lib/compiler/types.ts +170 -0
- package/src/workflow/lib/compiler/variable-requirements.ts +208 -0
- package/src/workflow/lib/deliverable-spec-keys.ts +109 -0
- package/src/workflow/lib/dispatch-inputs/index.ts +160 -0
- package/src/workflow/lib/dispatch-inputs/to-json-schema.ts +60 -0
- package/src/workflow/lib/duration.ts +48 -0
- package/src/workflow/lib/errors.ts +37 -0
- package/src/workflow/lib/expression/ast.ts +108 -0
- package/src/workflow/lib/expression/context.ts +148 -0
- package/src/workflow/lib/expression/evaluator.ts +492 -0
- package/src/workflow/lib/expression/index.ts +28 -0
- package/src/workflow/lib/expression/interpolation.ts +84 -0
- package/src/workflow/lib/expression/parser.ts +264 -0
- package/src/workflow/lib/expression/template.ts +117 -0
- package/src/workflow/lib/expression/tokenizer.ts +200 -0
- package/src/workflow/lib/expression/tokens.ts +30 -0
- package/src/workflow/lib/expression/walk-artifact-refs.ts +232 -0
- package/src/workflow/lib/installation-resource-kind.ts +107 -0
- package/src/workflow/lib/schemas-loader.ts +64 -0
- package/src/workflow/lib/serializer.ts +30 -0
- package/src/workflow/lib/types.ts +361 -0
- package/src/workflow/lib/validate.ts +199 -0
- package/src/workspace-manifest/index.ts +27 -0
- package/src/workspace-manifest/lib/compile.ts +608 -0
- package/src/workspace-manifest/lib/interpolate.ts +140 -0
- package/src/workspace-manifest/lib/resolve-extends.ts +260 -0
- package/src/workspace-manifest/lib/schema.ts +612 -0
- package/src/workspace-manifest/lib/types.ts +392 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://xema.dev/schemas/workflow/v1alpha1/Action.json",
|
|
4
|
+
"title": "Xema Action Manifest",
|
|
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
|
+
"type": "object",
|
|
7
|
+
"required": ["apiVersion", "kind", "metadata", "spec"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"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" }
|
|
14
|
+
},
|
|
15
|
+
"$defs": {
|
|
16
|
+
"Metadata": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["id", "version"],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]{0,62}$",
|
|
24
|
+
"description": "Canonical action id as `<namespace>/<actionId>`, e.g. `xema/agent` or `software-dev/scm-checkout`."
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.-]+)?$"
|
|
29
|
+
},
|
|
30
|
+
"title": { "type": "string", "maxLength": 120 },
|
|
31
|
+
"description": { "type": "string", "maxLength": 4000 }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"Spec": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["executionKind", "taskQueue", "inputs", "outputs", "permissions", "retryDefaults", "timeoutDefaults"],
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"executionKind": { "type": "string", "enum": ["activity", "child_workflow"] },
|
|
40
|
+
"taskQueue": { "type": "string", "enum": ["xema_default", "xema_agent", "xema_human"] },
|
|
41
|
+
"actionKind": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"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`.",
|
|
44
|
+
"enum": [
|
|
45
|
+
"agent",
|
|
46
|
+
"review",
|
|
47
|
+
"wait",
|
|
48
|
+
"timer",
|
|
49
|
+
"aggregate",
|
|
50
|
+
"dispatch",
|
|
51
|
+
"branch",
|
|
52
|
+
"loop",
|
|
53
|
+
"publish",
|
|
54
|
+
"notify",
|
|
55
|
+
"inquiry",
|
|
56
|
+
"fetch",
|
|
57
|
+
"transform",
|
|
58
|
+
"validate",
|
|
59
|
+
"terminate",
|
|
60
|
+
"generic"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"inputs": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"description": "JSON Schema (Draft 2020-12) for the action's `with:` arguments."
|
|
66
|
+
},
|
|
67
|
+
"outputs": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "JSON Schema (Draft 2020-12) for the action's emitted outputs."
|
|
70
|
+
},
|
|
71
|
+
"outputBindings": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"description": "Optional per-output deliverable-spec bindings. Keys are output names declared in `outputs`. Each entry pins the output's payload shape to a deliverable spec; the DSL compiler reads this first for typed reach-in validation, falling back to the job-level `with.deliverableSpecRef` when absent.",
|
|
74
|
+
"additionalProperties": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"deliverableSpecRef": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "Canonical `<slug>@<version>` (e.g. `metrics-snapshot@1.0.0`).",
|
|
81
|
+
"pattern": "^[a-z][a-z0-9-]*@[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"permissions": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"description": "Minimum permission scope this action requires.",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"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"] }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"allowedMounts": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
101
|
+
"uniqueItems": true
|
|
102
|
+
},
|
|
103
|
+
"retryDefaults": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"required": ["maxAttempts", "initialInterval", "backoffCoefficient", "maximumInterval"],
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"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)$" },
|
|
112
|
+
"nonRetryableErrorTypes": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": { "type": "string", "minLength": 1 }
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"timeoutDefaults": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"required": ["startToClose"],
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"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)$" }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"auditEventMapping": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"description": "Mapping from step lifecycle to audit-log-api event code.",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"properties": {
|
|
132
|
+
"started": { "type": "string", "minLength": 1 },
|
|
133
|
+
"succeeded": { "type": "string", "minLength": 1 },
|
|
134
|
+
"failed": { "type": "string", "minLength": 1 }
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"consumes": {
|
|
138
|
+
"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 triplet and the frontend canvas Inspector renders the manifest picker.",
|
|
140
|
+
"items": { "$ref": "#/$defs/ActionContract" }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"ActionContract": {
|
|
145
|
+
"description": "Versioned consume-contract declaration. Kinds: `workspace-manifest@v1` (manifest-source triplet) and `agent-composition@v1` (`with.composition` slug@version reference).",
|
|
146
|
+
"oneOf": [
|
|
147
|
+
{ "$ref": "#/$defs/WorkspaceManifestActionContract" },
|
|
148
|
+
{ "$ref": "#/$defs/AgentCompositionActionContract" }
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"WorkspaceManifestActionContract": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"required": ["kind", "version"],
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"properties": {
|
|
156
|
+
"kind": { "type": "string", "const": "workspace-manifest" },
|
|
157
|
+
"version": { "type": "string", "const": "v1" },
|
|
158
|
+
"surfaces": {
|
|
159
|
+
"type": "array",
|
|
160
|
+
"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"] },
|
|
162
|
+
"uniqueItems": true
|
|
163
|
+
},
|
|
164
|
+
"roleHint": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"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
|
+
}
|
|
168
|
+
}
|
|
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
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://xema.dev/schemas/workflow/v1alpha1/ReusableWorkflow.json",
|
|
4
|
+
"title": "Xema Reusable Workflow",
|
|
5
|
+
"description": "A workflow invoked via `workflow_call` from another workflow. Must declare `on.workflow_call`.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["apiVersion", "kind", "metadata", "on", "jobs"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"apiVersion": { "type": "string", "const": "xema.dev/workflow/v1alpha1" },
|
|
11
|
+
"kind": { "type": "string", "const": "Workflow" },
|
|
12
|
+
"metadata": {
|
|
13
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/Metadata"
|
|
14
|
+
},
|
|
15
|
+
"on": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["workflow_call"],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"workflow_call": {
|
|
21
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/WorkflowCallTrigger"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"concurrency": {
|
|
26
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/Concurrency"
|
|
27
|
+
},
|
|
28
|
+
"defaults": {
|
|
29
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/Defaults"
|
|
30
|
+
},
|
|
31
|
+
"permissions": {
|
|
32
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/Permissions"
|
|
33
|
+
},
|
|
34
|
+
"vars": { "type": "object", "additionalProperties": true },
|
|
35
|
+
"jobs": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"minProperties": 1,
|
|
38
|
+
"additionalProperties": {
|
|
39
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/Job"
|
|
40
|
+
},
|
|
41
|
+
"propertyNames": {
|
|
42
|
+
"$ref": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json#/$defs/JobKey"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://xema.dev/schemas/workflow/v1alpha1/Workflow.json",
|
|
4
|
+
"title": "Xema Workflow",
|
|
5
|
+
"description": "Authoring shape for a Xema workflow document (system or custom).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["apiVersion", "kind", "metadata", "on", "jobs"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"apiVersion": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"const": "xema.dev/workflow/v1alpha1"
|
|
13
|
+
},
|
|
14
|
+
"kind": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "Workflow"
|
|
17
|
+
},
|
|
18
|
+
"metadata": { "$ref": "#/$defs/Metadata" },
|
|
19
|
+
"on": { "$ref": "#/$defs/Triggers" },
|
|
20
|
+
"concurrency": { "$ref": "#/$defs/Concurrency" },
|
|
21
|
+
"defaults": { "$ref": "#/$defs/Defaults" },
|
|
22
|
+
"permissions": { "$ref": "#/$defs/Permissions" },
|
|
23
|
+
"vars": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Static key/value pairs bound into every job's expression context as `vars.*`.",
|
|
26
|
+
"additionalProperties": true
|
|
27
|
+
},
|
|
28
|
+
"requires": { "$ref": "#/$defs/Requires" },
|
|
29
|
+
"jobs": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"minProperties": 1,
|
|
32
|
+
"additionalProperties": { "$ref": "#/$defs/Job" },
|
|
33
|
+
"propertyNames": { "$ref": "#/$defs/JobKey" }
|
|
34
|
+
},
|
|
35
|
+
"outputs": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Workflow-level named outputs. Each key references a (job, outputName) pair via fromJob/fromOutput and declares the kind of value surfaced.",
|
|
38
|
+
"additionalProperties": { "$ref": "#/$defs/WorkflowOutput" },
|
|
39
|
+
"propertyNames": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,62}$" }
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"$defs": {
|
|
43
|
+
"Metadata": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["name", "version"],
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"properties": {
|
|
48
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
|
|
49
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.-]+)?$" },
|
|
50
|
+
"title": { "type": "string", "maxLength": 120 },
|
|
51
|
+
"description": { "type": "string", "maxLength": 4000 },
|
|
52
|
+
"category": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
53
|
+
"tags": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
|
|
56
|
+
"uniqueItems": true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"JobKey": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[a-z][a-z0-9_-]{0,62}$"
|
|
63
|
+
},
|
|
64
|
+
"Requires": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"description": "Wallet (variable + secret bundle) contracts the workflow needs at dispatch time. Resolved by the engine against project-registry-api before the run is started.",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"properties": {
|
|
69
|
+
"wallets": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"minItems": 1,
|
|
72
|
+
"maxItems": 32,
|
|
73
|
+
"uniqueItems": true,
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
77
|
+
"description": "Wallet name unique within the workflow's project/org scope."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"integrations": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"minItems": 1,
|
|
83
|
+
"maxItems": 16,
|
|
84
|
+
"description": "Integration adapter kinds the workflow consumes. Biome-shipped workflows declare these so biome-host-api can cross-validate against the biome's manifest at boot.",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": ["adapterKind", "capabilities"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"adapterKind": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
93
|
+
"description": "Adapter kind slug (e.g. 'scm', 'tracker', 'documentation')."
|
|
94
|
+
},
|
|
95
|
+
"capabilities": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"minItems": 1,
|
|
98
|
+
"uniqueItems": true,
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"pattern": "^[a-z]+(\\.[a-z][a-z0-9-]*)+$",
|
|
102
|
+
"description": "Capability slug in <domain>.<verb-qualifier> form."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"optional": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"description": "Whether the workflow can degrade if the integration is unbound."
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"Triggers": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"description": "At least one trigger must be declared.",
|
|
117
|
+
"minProperties": 1,
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"properties": {
|
|
120
|
+
"workflow_dispatch": { "$ref": "#/$defs/WorkflowDispatchTrigger" },
|
|
121
|
+
"schedule": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"minItems": 1,
|
|
124
|
+
"maxItems": 16,
|
|
125
|
+
"items": { "$ref": "#/$defs/ScheduleTrigger" }
|
|
126
|
+
},
|
|
127
|
+
"webhook": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"minItems": 1,
|
|
130
|
+
"maxItems": 32,
|
|
131
|
+
"items": { "$ref": "#/$defs/WebhookTrigger" }
|
|
132
|
+
},
|
|
133
|
+
"workflow_call": { "$ref": "#/$defs/WorkflowCallTrigger" }
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"WorkflowDispatchTrigger": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"properties": {
|
|
140
|
+
"inputs": { "$ref": "#/$defs/InputSchemaMap" }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"ScheduleTrigger": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": ["cron"],
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"properties": {
|
|
148
|
+
"cron": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"description": "Standard 5-field cron expression.",
|
|
151
|
+
"pattern": "^[^\\s]+\\s+[^\\s]+\\s+[^\\s]+\\s+[^\\s]+\\s+[^\\s]+$"
|
|
152
|
+
},
|
|
153
|
+
"timezone": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9+_/-]+$" },
|
|
154
|
+
"inputs": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"description": "Pre-bound inputs for every fire.",
|
|
157
|
+
"additionalProperties": true
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"WebhookTrigger": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"required": ["event"],
|
|
164
|
+
"additionalProperties": false,
|
|
165
|
+
"properties": {
|
|
166
|
+
"event": { "type": "string", "pattern": "^[a-z][a-z0-9._]*$" },
|
|
167
|
+
"secretRef": { "type": "string", "minLength": 1 },
|
|
168
|
+
"filters": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": { "type": "string" }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"WorkflowCallTrigger": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"properties": {
|
|
178
|
+
"inputs": { "$ref": "#/$defs/InputSchemaMap" },
|
|
179
|
+
"outputs": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": { "type": "string" }
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"InputSchemaMap": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": { "$ref": "#/$defs/InputSchemaEntry" }
|
|
188
|
+
},
|
|
189
|
+
"InputSchemaEntry": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"required": ["type"],
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"properties": {
|
|
194
|
+
"type": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"enum": ["string", "number", "integer", "boolean", "object", "array"]
|
|
197
|
+
},
|
|
198
|
+
"required": { "type": "boolean", "default": false },
|
|
199
|
+
"default": {},
|
|
200
|
+
"description": { "type": "string", "maxLength": 1000 },
|
|
201
|
+
"enum": { "type": "array", "minItems": 1 },
|
|
202
|
+
"items": { "type": "object" }
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"Concurrency": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"required": ["group", "mode"],
|
|
208
|
+
"additionalProperties": false,
|
|
209
|
+
"properties": {
|
|
210
|
+
"group": { "type": "string", "minLength": 1 },
|
|
211
|
+
"mode": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": ["allow", "queue", "cancel_in_progress", "skip"]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"Defaults": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"properties": {
|
|
221
|
+
"retry": { "$ref": "#/$defs/RetryPolicy" },
|
|
222
|
+
"timeout": { "$ref": "#/$defs/Timeout" }
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"Timeout": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"description": "Duration literal: <int><unit> where unit is one of s, m, h. Hours cap at 168 (1 week).",
|
|
228
|
+
"pattern": "^([1-9][0-9]*)(s|m|h)$"
|
|
229
|
+
},
|
|
230
|
+
"RetryPolicy": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"properties": {
|
|
234
|
+
"maxAttempts": { "type": "integer", "minimum": 1, "maximum": 20 },
|
|
235
|
+
"initialInterval": { "$ref": "#/$defs/Timeout" },
|
|
236
|
+
"backoffCoefficient": { "type": "number", "minimum": 1.0, "maximum": 10.0 },
|
|
237
|
+
"maximumInterval": { "$ref": "#/$defs/Timeout" },
|
|
238
|
+
"nonRetryableErrorTypes": {
|
|
239
|
+
"type": "array",
|
|
240
|
+
"items": { "type": "string", "minLength": 1 }
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"Permissions": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"additionalProperties": false,
|
|
247
|
+
"properties": {
|
|
248
|
+
"repos": { "$ref": "#/$defs/PermissionScope" },
|
|
249
|
+
"kb": { "$ref": "#/$defs/PermissionScope" },
|
|
250
|
+
"backlog": { "$ref": "#/$defs/PermissionScope" },
|
|
251
|
+
"integrations": { "$ref": "#/$defs/PermissionScope" },
|
|
252
|
+
"artifacts": { "$ref": "#/$defs/PermissionScope" },
|
|
253
|
+
"memory": { "$ref": "#/$defs/PermissionScope" }
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"PermissionScope": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"enum": ["none", "read", "limited", "write"]
|
|
259
|
+
},
|
|
260
|
+
"Job": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"required": ["uses"],
|
|
263
|
+
"additionalProperties": false,
|
|
264
|
+
"properties": {
|
|
265
|
+
"title": { "type": "string", "maxLength": 120 },
|
|
266
|
+
"needs": {
|
|
267
|
+
"type": "array",
|
|
268
|
+
"items": { "$ref": "#/$defs/JobKey" },
|
|
269
|
+
"uniqueItems": true
|
|
270
|
+
},
|
|
271
|
+
"if": { "type": "string", "minLength": 1 },
|
|
272
|
+
"strategy": { "$ref": "#/$defs/Strategy" },
|
|
273
|
+
"matrixGather": {
|
|
274
|
+
"type": "array",
|
|
275
|
+
"description": "List of upstream jobKeys whose per-entry outputs should be flattened. For each key listed here, `needs.<key>.outputs` is reshaped from `{ kind: 'matrix', outputs: [...] }` to the flat array `[...]` before the job's `with:` expressions and `if:` are evaluated. Authors use this for synthesizer / coordinator jobs that need to aggregate across a matrix. Each key must be a declared job with a matrix strategy; the compiler auto-adds every key here to `needs` so authors do not have to duplicate.",
|
|
276
|
+
"items": { "$ref": "#/$defs/JobKey" },
|
|
277
|
+
"minItems": 1,
|
|
278
|
+
"uniqueItems": true
|
|
279
|
+
},
|
|
280
|
+
"uses": { "$ref": "#/$defs/UsesRef" },
|
|
281
|
+
"with": { "type": "object", "additionalProperties": true },
|
|
282
|
+
"outputs": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"additionalProperties": { "type": "string" }
|
|
285
|
+
},
|
|
286
|
+
"retry": { "$ref": "#/$defs/RetryPolicy" },
|
|
287
|
+
"timeout": { "$ref": "#/$defs/Timeout" },
|
|
288
|
+
"permissions": { "$ref": "#/$defs/Permissions" }
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"UsesRef": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Either <namespace>/<actionId>[@<ver>] (e.g. xema/agent@1.0.0, or xema/agent for the latest-at-compile shorthand from plan §G) or xema://workflow/<slug>[@<ver>] for reusable workflow refs. When the version is omitted, the engine pins the resolved version into the CompiledRun at compile time — replays remain deterministic.",
|
|
294
|
+
"pattern": "^([a-z][a-z0-9-]*/[a-z][a-z0-9-]*(@[0-9]+(\\.[0-9]+(\\.[0-9]+(-[A-Za-z0-9.-]+)?)?)?)?|xema://workflow/[a-z][a-z0-9-]*(@[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.-]+)?)?)$"
|
|
295
|
+
},
|
|
296
|
+
"Strategy": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"additionalProperties": false,
|
|
299
|
+
"properties": {
|
|
300
|
+
"matrix": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"minProperties": 1,
|
|
303
|
+
"additionalProperties": {
|
|
304
|
+
"type": "array",
|
|
305
|
+
"minItems": 1,
|
|
306
|
+
"maxItems": 64
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"dynamic": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"required": ["from", "as"],
|
|
312
|
+
"additionalProperties": false,
|
|
313
|
+
"properties": {
|
|
314
|
+
"from": { "type": "string", "minLength": 1 },
|
|
315
|
+
"as": { "type": "string", "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$" },
|
|
316
|
+
"maxEntries": { "type": "integer", "minimum": 1, "maximum": 64 },
|
|
317
|
+
"keyBy": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"minLength": 1,
|
|
320
|
+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*$"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"maxParallel": { "type": "integer", "minimum": 1, "maximum": 64 }
|
|
325
|
+
},
|
|
326
|
+
"oneOf": [
|
|
327
|
+
{ "required": ["matrix"] },
|
|
328
|
+
{ "required": ["dynamic"] }
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
"WorkflowOutput": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"required": ["kind", "slug", "fromJob", "fromOutput"],
|
|
334
|
+
"oneOf": [
|
|
335
|
+
{
|
|
336
|
+
"additionalProperties": false,
|
|
337
|
+
"properties": {
|
|
338
|
+
"kind": { "const": "deliverable" },
|
|
339
|
+
"slug": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
|
|
340
|
+
"fromJob": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,62}$" },
|
|
341
|
+
"fromOutput": { "type": "string", "minLength": 1 },
|
|
342
|
+
"description": { "type": "string", "maxLength": 4000 },
|
|
343
|
+
"deliverableSpecRef": { "type": "string", "minLength": 1 }
|
|
344
|
+
},
|
|
345
|
+
"required": ["kind", "slug", "fromJob", "fromOutput", "deliverableSpecRef"]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"additionalProperties": false,
|
|
349
|
+
"properties": {
|
|
350
|
+
"kind": { "const": "structured" },
|
|
351
|
+
"slug": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
|
|
352
|
+
"fromJob": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,62}$" },
|
|
353
|
+
"fromOutput": { "type": "string", "minLength": 1 },
|
|
354
|
+
"description": { "type": "string", "maxLength": 4000 },
|
|
355
|
+
"schemaRef": { "type": "string", "minLength": 1 }
|
|
356
|
+
},
|
|
357
|
+
"required": ["kind", "slug", "fromJob", "fromOutput"]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"additionalProperties": false,
|
|
361
|
+
"properties": {
|
|
362
|
+
"kind": { "const": "text" },
|
|
363
|
+
"slug": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$" },
|
|
364
|
+
"fromJob": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,62}$" },
|
|
365
|
+
"fromOutput": { "type": "string", "minLength": 1 },
|
|
366
|
+
"description": { "type": "string", "maxLength": 4000 }
|
|
367
|
+
},
|
|
368
|
+
"required": ["kind", "slug", "fromJob", "fromOutput"]
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// ── @xemahq/deliverable-spec-dsl ──
|
|
3
|
+
//
|
|
4
|
+
// Zod schema for the `manifest.yaml` files that ship inside biome
|
|
5
|
+
// `deliverable-specs/` content directories. A deliverable-spec manifest
|
|
6
|
+
// declares the SHAPE of a single catalog row: kind, content body, page
|
|
7
|
+
// layout, validator parameters.
|
|
8
|
+
//
|
|
9
|
+
// Consumers:
|
|
10
|
+
// - `biomes/workflow-runtime/api/deliverable-specs-api`: the seeder validates each manifest at
|
|
11
|
+
// boot using this schema; the schemas controller serves the JSON
|
|
12
|
+
// Schema rendition at `/schemas/deliverable-spec/v1.json` so authors
|
|
13
|
+
// can wire their YAML editor via `# yaml-language-server: $schema=…`.
|
|
14
|
+
//
|
|
15
|
+
// Sibling to `@xemahq/workflow-dsl` and `@xemahq/workspace-manifest-dsl`.
|
|
16
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
17
|
+
|
|
18
|
+
export * from './lib/schema';
|
|
19
|
+
export * from './lib/types';
|