@xemahq/dsl 0.8.3 → 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.
- package/dist/deliverable-spec/lib/schema.d.ts +5 -3
- package/dist/deliverable-spec/lib/schema.d.ts.map +1 -1
- package/dist/deliverable-spec/lib/schema.js +7 -1
- package/dist/deliverable-spec/lib/schema.js.map +1 -1
- package/dist/schema/action.schema.json +4 -31
- package/dist/schema/workflow.schema.json +1 -1
- package/dist/workflow/index.d.ts +2 -2
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +2 -2
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/lib/compiler/action-shape.d.ts +2 -3
- package/dist/workflow/lib/compiler/action-shape.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/action-shape.js +5 -19
- package/dist/workflow/lib/compiler/action-shape.js.map +1 -1
- package/dist/workflow/lib/compiler/compile.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/compile.js +7 -111
- package/dist/workflow/lib/compiler/compile.js.map +1 -1
- package/dist/workflow/lib/compiler/index.d.ts +2 -2
- package/dist/workflow/lib/compiler/index.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/index.js +2 -2
- package/dist/workflow/lib/compiler/index.js.map +1 -1
- package/dist/workflow/lib/compiler/manifest-source.d.ts +1 -2
- package/dist/workflow/lib/compiler/manifest-source.d.ts.map +1 -1
- package/dist/workflow/lib/compiler/manifest-source.js +30 -24
- package/dist/workflow/lib/compiler/manifest-source.js.map +1 -1
- package/dist/workflow/lib/compiler/mount-plan.js +7 -6
- package/dist/workflow/lib/compiler/mount-plan.js.map +1 -1
- package/dist/workflow/lib/compiler/types.d.ts +0 -6
- package/dist/workflow/lib/compiler/types.d.ts.map +1 -1
- package/dist/workflow/lib/types.d.ts +3 -7
- package/dist/workflow/lib/types.d.ts.map +1 -1
- package/dist/workspace-manifest/lib/compile.js +8 -8
- package/dist/workspace-manifest/lib/compile.js.map +1 -1
- package/dist/workspace-manifest/lib/schema.d.ts +3 -3
- package/dist/workspace-manifest/lib/schema.js +3 -3
- package/dist/workspace-manifest/lib/types.d.ts +1 -1
- package/dist/workspace-manifest/lib/types.d.ts.map +1 -1
- package/dist/workspace-manifest/lib/types.js.map +1 -1
- package/package.json +2 -2
- package/schema/action.schema.json +4 -31
- package/schema/workflow.schema.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const DELIVERABLE_SPEC_KINDS: readonly ["
|
|
2
|
+
export declare const DELIVERABLE_SPEC_KINDS: readonly ["MARKDOWN_DOCUMENT", "ZOD_SCHEMA", "JSON_SCHEMA", "ENDPOINT_FETCH", "STRUCTURED_JSON", "CUSTOM", "RESPONSE_ONLY"];
|
|
3
3
|
export type DeliverableSpecKindLiteral = (typeof DELIVERABLE_SPEC_KINDS)[number];
|
|
4
4
|
export declare const VERSIONING_MODES: readonly ["append", "new", "replace"];
|
|
5
5
|
export type VersioningModeLiteral = (typeof VERSIONING_MODES)[number];
|
|
@@ -26,7 +26,7 @@ export declare const DeliverableSpecMetadataSchema: z.ZodObject<{
|
|
|
26
26
|
}, z.core.$strip>;
|
|
27
27
|
export declare const DeliverableSpecSpecSchema: z.ZodObject<{
|
|
28
28
|
kind: z.ZodEnum<{
|
|
29
|
-
|
|
29
|
+
MARKDOWN_DOCUMENT: "MARKDOWN_DOCUMENT";
|
|
30
30
|
ZOD_SCHEMA: "ZOD_SCHEMA";
|
|
31
31
|
JSON_SCHEMA: "JSON_SCHEMA";
|
|
32
32
|
ENDPOINT_FETCH: "ENDPOINT_FETCH";
|
|
@@ -41,6 +41,7 @@ export declare const DeliverableSpecSpecSchema: z.ZodObject<{
|
|
|
41
41
|
workTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
42
|
content: z.ZodOptional<z.ZodString>;
|
|
43
43
|
contentFile: z.ZodOptional<z.ZodString>;
|
|
44
|
+
templateBinding: z.ZodOptional<z.ZodType<import("@xemahq/kernel-contracts/template").TemplateBinding, unknown, z.core.$ZodTypeInternals<import("@xemahq/kernel-contracts/template").TemplateBinding, unknown>>>;
|
|
44
45
|
multiPage: z.ZodOptional<z.ZodBoolean>;
|
|
45
46
|
pages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
46
47
|
slug: z.ZodString;
|
|
@@ -79,7 +80,7 @@ export declare const DeliverableSpecManifestSchema: z.ZodObject<{
|
|
|
79
80
|
}, z.core.$strip>;
|
|
80
81
|
spec: z.ZodObject<{
|
|
81
82
|
kind: z.ZodEnum<{
|
|
82
|
-
|
|
83
|
+
MARKDOWN_DOCUMENT: "MARKDOWN_DOCUMENT";
|
|
83
84
|
ZOD_SCHEMA: "ZOD_SCHEMA";
|
|
84
85
|
JSON_SCHEMA: "JSON_SCHEMA";
|
|
85
86
|
ENDPOINT_FETCH: "ENDPOINT_FETCH";
|
|
@@ -94,6 +95,7 @@ export declare const DeliverableSpecManifestSchema: z.ZodObject<{
|
|
|
94
95
|
workTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
96
|
content: z.ZodOptional<z.ZodString>;
|
|
96
97
|
contentFile: z.ZodOptional<z.ZodString>;
|
|
98
|
+
templateBinding: z.ZodOptional<z.ZodType<import("@xemahq/kernel-contracts/template").TemplateBinding, unknown, z.core.$ZodTypeInternals<import("@xemahq/kernel-contracts/template").TemplateBinding, unknown>>>;
|
|
97
99
|
multiPage: z.ZodOptional<z.ZodBoolean>;
|
|
98
100
|
pages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
99
101
|
slug: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/deliverable-spec/lib/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/deliverable-spec/lib/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuCxB,eAAO,MAAM,sBAAsB,6HAQzB,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAOjF,eAAO,MAAM,gBAAgB,uCAAwC,CAAC;AAEtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAOtE,eAAO,MAAM,sBAAsB;;;;iBAQjC,CAAC;AAOH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;mBAG3B,CAAC;AAMH,eAAO,MAAM,6BAA6B;;;;;iBAcxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuGnC,CAAC;AAEJ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYtC,CAAC;AAIL,eAAO,MAAM,oCAAoC;;;iBAU/C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;iBA0B1C,CAAC;AAEJ,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;iBAY7C,CAAC"}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeliverableSpecOverlayManifestSchema = exports.DeliverableSpecOverlaySpecSchema = exports.DeliverableSpecOverlayMetadataSchema = exports.DeliverableSpecManifestSchema = exports.DeliverableSpecSpecSchema = exports.DeliverableSpecMetadataSchema = exports.PageSourceSchema = exports.FilePageSourceSchema = exports.InlinePageSourceSchema = exports.VERSIONING_MODES = exports.DELIVERABLE_SPEC_KINDS = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const template_1 = require("@xemahq/kernel-contracts/template");
|
|
5
6
|
const SlugRegex = /^[a-z][a-z0-9-]*(?:\/[a-z][a-z0-9-]*)?$/;
|
|
6
7
|
const VersionRegex = /^\d+\.\d+\.\d+$/;
|
|
7
8
|
const KebabRegex = /^[a-z][a-z0-9-]*$/;
|
|
8
9
|
const OverlaySlugRegex = /^[a-z][a-z0-9-]*(?:\+[a-z][a-z0-9-]*)*$/;
|
|
9
10
|
const TagSlugRegex = /^[a-z0-9][a-z0-9-_.]*$/;
|
|
10
11
|
exports.DELIVERABLE_SPEC_KINDS = [
|
|
11
|
-
'
|
|
12
|
+
'MARKDOWN_DOCUMENT',
|
|
12
13
|
'ZOD_SCHEMA',
|
|
13
14
|
'JSON_SCHEMA',
|
|
14
15
|
'ENDPOINT_FETCH',
|
|
@@ -59,6 +60,7 @@ exports.DeliverableSpecSpecSchema = zod_1.z
|
|
|
59
60
|
workTypes: zod_1.z.array(zod_1.z.string()).max(20).optional(),
|
|
60
61
|
content: zod_1.z.string().max(1_000_000).optional(),
|
|
61
62
|
contentFile: zod_1.z.string().min(1).optional(),
|
|
63
|
+
templateBinding: template_1.TemplateBindingSchema.optional(),
|
|
62
64
|
multiPage: zod_1.z.boolean().optional(),
|
|
63
65
|
pages: zod_1.z.array(exports.PageSourceSchema).max(64).optional(),
|
|
64
66
|
pageAllocationHints: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
@@ -83,6 +85,10 @@ exports.DeliverableSpecSpecSchema = zod_1.z
|
|
|
83
85
|
versioningMode: zod_1.z.enum(exports.VERSIONING_MODES).optional(),
|
|
84
86
|
})
|
|
85
87
|
.refine((s) => !(s.content !== undefined && s.contentFile !== undefined), { message: 'spec cannot declare both `content` and `contentFile`' })
|
|
88
|
+
.refine((s) => s.kind !== 'MARKDOWN_DOCUMENT' ||
|
|
89
|
+
(s.content === undefined && s.contentFile === undefined), {
|
|
90
|
+
message: 'MARKDOWN_DOCUMENT guidance belongs in a Template selected by `templateBinding`, not in `content`/`contentFile`',
|
|
91
|
+
})
|
|
86
92
|
.refine((s) => !(s.zodSchemaSource !== undefined && s.zodSchemaSourceFile !== undefined), {
|
|
87
93
|
message: 'spec cannot declare both `zodSchemaSource` and `zodSchemaSourceFile`',
|
|
88
94
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/deliverable-spec/lib/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/deliverable-spec/lib/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,gEAA0E;AAoB1E,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAC5D,MAAM,YAAY,GAAG,iBAAiB,CAAC;AACvC,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAIvC,MAAM,gBAAgB,GAAG,yCAAyC,CAAC;AAGnE,MAAM,YAAY,GAAG,wBAAwB,CAAC;AASjC,QAAA,sBAAsB,GAAG;IACpC,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,iBAAiB;IACjB,QAAQ;IACR,eAAe;CACP,CAAC;AASE,QAAA,gBAAgB,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC;AASzD,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,8BAA8B,CAAC;IAClE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,KAAK,CAAC,UAAU,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,EAAE;CACd,CAAC,CAAC;AAOU,QAAA,oBAAoB,GA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,MAAM,CAAC;IACN,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC;IAChD,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC;IACzC,QAAQ,EAAE,4CAAoC;IAC9C,IAAI,EAAE,wCAAgC;CACvC,CAAC;KACD,IAAI,CAAC;IACJ,EAAE,EAAE,qEAAqE;IACzE,KAAK,EAAE,6BAA6B;IACpC,WAAW,EACT,gHAAgH;CACnH,CAAC,CAAC"}
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
},
|
|
273
273
|
"consumes": {
|
|
274
274
|
"type": "array",
|
|
275
|
-
"description": "Declarative contracts the action opts into. The
|
|
275
|
+
"description": "Declarative contracts the action opts into. The `session-launch@v1` entry enables canonical Session launch validation.",
|
|
276
276
|
"items": {
|
|
277
277
|
"$ref": "#/$defs/ActionContract"
|
|
278
278
|
}
|
|
@@ -280,17 +280,9 @@
|
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
"ActionContract": {
|
|
283
|
-
"
|
|
284
|
-
"oneOf": [
|
|
285
|
-
{
|
|
286
|
-
"$ref": "#/$defs/WorkspaceManifestActionContract"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"$ref": "#/$defs/AgentCompositionActionContract"
|
|
290
|
-
}
|
|
291
|
-
]
|
|
283
|
+
"$ref": "#/$defs/SessionLaunchActionContract"
|
|
292
284
|
},
|
|
293
|
-
"
|
|
285
|
+
"SessionLaunchActionContract": {
|
|
294
286
|
"type": "object",
|
|
295
287
|
"required": [
|
|
296
288
|
"kind",
|
|
@@ -300,7 +292,7 @@
|
|
|
300
292
|
"properties": {
|
|
301
293
|
"kind": {
|
|
302
294
|
"type": "string",
|
|
303
|
-
"const": "
|
|
295
|
+
"const": "session-launch"
|
|
304
296
|
},
|
|
305
297
|
"version": {
|
|
306
298
|
"type": "string",
|
|
@@ -323,25 +315,6 @@
|
|
|
323
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."
|
|
324
316
|
}
|
|
325
317
|
}
|
|
326
|
-
},
|
|
327
|
-
"AgentCompositionActionContract": {
|
|
328
|
-
"type": "object",
|
|
329
|
-
"required": [
|
|
330
|
-
"kind",
|
|
331
|
-
"version"
|
|
332
|
-
],
|
|
333
|
-
"additionalProperties": false,
|
|
334
|
-
"description": "Opts the action into the `with.composition` field — a `slug@version` reference to an Agent Composition resolved at dispatch time by the runtime.",
|
|
335
|
-
"properties": {
|
|
336
|
-
"kind": {
|
|
337
|
-
"type": "string",
|
|
338
|
-
"const": "agent-composition"
|
|
339
|
-
},
|
|
340
|
-
"version": {
|
|
341
|
-
"type": "string",
|
|
342
|
-
"const": "v1"
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
318
|
}
|
|
346
319
|
}
|
|
347
320
|
}
|
|
@@ -496,7 +496,7 @@
|
|
|
496
496
|
},
|
|
497
497
|
"UsesRef": {
|
|
498
498
|
"type": "string",
|
|
499
|
-
"description": "Either <namespace>/<actionId>[@<ver>] (e.g. xema/agent@1.0
|
|
499
|
+
"description": "Either <namespace>/<actionId>[@<ver>] (e.g. xema/agent@2.1.0, or xema/agent for the latest-at-compile shorthand) 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.",
|
|
500
500
|
"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.-]+)?)?)$"
|
|
501
501
|
},
|
|
502
502
|
"Strategy": {
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export { parseDurationMs } from './lib/duration';
|
|
|
8
8
|
export { DispatchInputFieldType, DispatchInputStringFormat, extractDispatchInputDescriptors, type DispatchInputDescriptor, } from './lib/dispatch-inputs';
|
|
9
9
|
export { dispatchInputsToJsonSchema } from './lib/dispatch-inputs/to-json-schema';
|
|
10
10
|
export { serializeWorkflowDocument } from './lib/serializer';
|
|
11
|
-
export { DECISION_GATE_ACTION_ID, applyGateDefaults, canonicalJsonSha256, canonicalJsonStringify, compileManifestSource, compileWorkflow,
|
|
11
|
+
export { DECISION_GATE_ACTION_ID, applyGateDefaults, canonicalJsonSha256, canonicalJsonStringify, compileManifestSource, compileWorkflow, getSessionLaunchContract, isAgentShapedAction, type CompileInput, type ResolvedDeliverableSpec, type ResolvedRef, } from './lib/compiler';
|
|
12
12
|
export { extractZodTopLevelObjectKeys, extractJsonSchemaTopLevelKeys, } from './lib/deliverable-spec-keys';
|
|
13
13
|
export { DeliverableSpecIntrospectionError, DeliverableSpecIntrospectionFailure, isDeliverableSpecIntrospectionError, } from './lib/deliverable-spec-introspection-error';
|
|
14
14
|
export { scanTopLevelZodObjectDeclarations } from './lib/deliverable-spec-source-scan';
|
|
15
15
|
export type { TopLevelZodObjectDeclaration } from './lib/deliverable-spec-source-scan';
|
|
16
|
-
export type { ActionContract, ActionManifest, ActionManifestMetadata, ActionManifestRetryDefaults, ActionManifestSpec, ActionManifestTimeoutDefaults,
|
|
16
|
+
export type { ActionContract, ActionManifest, ActionManifestMetadata, ActionManifestRetryDefaults, ActionManifestSpec, ActionManifestTimeoutDefaults, SessionLaunchActionContract, ScheduleDeclaration, WebhookDeclaration, WorkflowCallDeclaration, WorkflowConcurrencyDeclaration, WorkflowDefaults, WorkflowGateDefaults, WorkflowDispatchDeclaration, WorkflowDocument, WorkflowDynamicStrategyDeclaration, WorkflowInputDeclaration, WorkflowJobDeclaration, WorkflowMetadata, WorkflowPermissions, WorkflowRetryDeclaration, WorkflowStrategyDeclaration, WorkflowTriggerDeclarations, } from './lib/types';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,KAAK,6BAA6B,GACnC,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EACL,0BAA0B,EAC1B,oCAAoC,EACpC,4BAA4B,EAC5B,sBAAsB,EACtB,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EACL,oBAA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ACvF,YAAY,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AACvF,YAAY,EACV,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,6BAA6B,EAC7B,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,8BAA8B,EAC9B,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,EAChB,kCAAkC,EAClC,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,aAAa,CAAC"}
|
package/dist/workflow/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scanTopLevelZodObjectDeclarations = exports.isDeliverableSpecIntrospectionError = exports.DeliverableSpecIntrospectionFailure = exports.DeliverableSpecIntrospectionError = exports.extractJsonSchemaTopLevelKeys = exports.extractZodTopLevelObjectKeys = exports.isAgentShapedAction = exports.
|
|
3
|
+
exports.scanTopLevelZodObjectDeclarations = exports.isDeliverableSpecIntrospectionError = exports.DeliverableSpecIntrospectionFailure = exports.DeliverableSpecIntrospectionError = exports.extractJsonSchemaTopLevelKeys = exports.extractZodTopLevelObjectKeys = exports.isAgentShapedAction = exports.getSessionLaunchContract = exports.compileWorkflow = exports.compileManifestSource = exports.canonicalJsonStringify = exports.canonicalJsonSha256 = exports.applyGateDefaults = exports.DECISION_GATE_ACTION_ID = exports.serializeWorkflowDocument = exports.dispatchInputsToJsonSchema = exports.extractDispatchInputDescriptors = exports.DispatchInputStringFormat = exports.DispatchInputFieldType = exports.parseDurationMs = exports.stripInterpolation = exports.isInterpolationWrapped = exports.extractInterpolations = exports.evaluateExpression = exports.compileExpression = exports.ExpressionRoot = exports.ExpressionNodeKind = exports.ExpressionFunction = exports.EMPTY_CONTEXT_SEEDS = exports.validateWorkflowDocument = exports.validateReusableWorkflowDocument = exports.validateActionManifest = exports.parseAndValidateWorkflowYaml = exports.parseAndValidateReusableWorkflowYaml = exports.parseAndValidateActionYaml = exports.collectInstallationResourceHints = exports.InstallationResourceKind = exports.validateActionInputs = exports.isWorkflowDslError = exports.WorkflowDslError = void 0;
|
|
4
4
|
var errors_1 = require("./lib/errors");
|
|
5
5
|
Object.defineProperty(exports, "WorkflowDslError", { enumerable: true, get: function () { return errors_1.WorkflowDslError; } });
|
|
6
6
|
Object.defineProperty(exports, "isWorkflowDslError", { enumerable: true, get: function () { return errors_1.isWorkflowDslError; } });
|
|
@@ -43,7 +43,7 @@ Object.defineProperty(exports, "canonicalJsonSha256", { enumerable: true, get: f
|
|
|
43
43
|
Object.defineProperty(exports, "canonicalJsonStringify", { enumerable: true, get: function () { return compiler_1.canonicalJsonStringify; } });
|
|
44
44
|
Object.defineProperty(exports, "compileManifestSource", { enumerable: true, get: function () { return compiler_1.compileManifestSource; } });
|
|
45
45
|
Object.defineProperty(exports, "compileWorkflow", { enumerable: true, get: function () { return compiler_1.compileWorkflow; } });
|
|
46
|
-
Object.defineProperty(exports, "
|
|
46
|
+
Object.defineProperty(exports, "getSessionLaunchContract", { enumerable: true, get: function () { return compiler_1.getSessionLaunchContract; } });
|
|
47
47
|
Object.defineProperty(exports, "isAgentShapedAction", { enumerable: true, get: function () { return compiler_1.isAgentShapedAction; } });
|
|
48
48
|
var deliverable_spec_keys_1 = require("./lib/deliverable-spec-keys");
|
|
49
49
|
Object.defineProperty(exports, "extractZodTopLevelObjectKeys", { enumerable: true, get: function () { return deliverable_spec_keys_1.extractZodTopLevelObjectKeys; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":";;;AAgBA,uCAAoE;AAA3D,0GAAA,gBAAgB,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAC7C,uEAI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A;AAE1B,+CAa0B;AAZxB,iHAAA,mBAAmB,OAAA;AACnB,gHAAA,kBAAkB,OAAA;AAClB,gHAAA,kBAAkB,OAAA;AAClB,4GAAA,cAAc,OAAA;AACd,+GAAA,iBAAiB,OAAA;AACjB,gHAAA,kBAAkB,OAAA;AAClB,mHAAA,qBAAqB,OAAA;AACrB,oHAAA,sBAAsB,OAAA;AACtB,gHAAA,kBAAkB,OAAA;AAKpB,2CAAiD;AAAxC,2GAAA,eAAe,OAAA;AACxB,yDAK+B;AAJ7B,yHAAA,sBAAsB,OAAA;AACtB,4HAAA,yBAAyB,OAAA;AACzB,kIAAA,+BAA+B,OAAA;AAGjC,uEAAkF;AAAzE,4HAAA,0BAA0B,OAAA;AACnC,+CAA6D;AAApD,uHAAA,yBAAyB,OAAA;AAClC,2CAYwB;AAXtB,mHAAA,uBAAuB,OAAA;AACvB,6GAAA,iBAAiB,OAAA;AACjB,+GAAA,mBAAmB,OAAA;AACnB,kHAAA,sBAAsB,OAAA;AACtB,iHAAA,qBAAqB,OAAA;AACrB,2GAAA,eAAe,OAAA;AACf,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AAKrB,qEAGqC;AAFnC,qIAAA,4BAA4B,OAAA;AAC5B,sIAAA,6BAA6B,OAAA;AAE/B,mGAIoD;AAHlD,yJAAA,iCAAiC,OAAA;AACjC,2JAAA,mCAAmC,OAAA;AACnC,2JAAA,mCAAmC,OAAA;AAErC,mFAAuF;AAA9E,iJAAA,iCAAiC,OAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ActionManifest,
|
|
2
|
-
export declare function
|
|
1
|
+
import type { ActionManifest, SessionLaunchActionContract } from '../types';
|
|
2
|
+
export declare function getSessionLaunchContract(actionManifest: ActionManifest | null): SessionLaunchActionContract | null;
|
|
3
3
|
export declare function isAgentShapedAction(actionManifest: ActionManifest | null): actionManifest is ActionManifest;
|
|
4
|
-
export declare function getAgentContract(actionManifest: ActionManifest | null): AgentActionContract | null;
|
|
5
4
|
//# sourceMappingURL=action-shape.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-shape.d.ts","sourceRoot":"","sources":["../../../../src/workflow/lib/compiler/action-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"action-shape.d.ts","sourceRoot":"","sources":["../../../../src/workflow/lib/compiler/action-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAUlB,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,2BAA2B,GAAG,IAAI,CAUpC;AAWD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,GAAG,IAAI,GACpC,cAAc,IAAI,cAAc,CASlC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSessionLaunchContract = getSessionLaunchContract;
|
|
4
4
|
exports.isAgentShapedAction = isAgentShapedAction;
|
|
5
|
-
|
|
6
|
-
function getWorkspaceManifestContract(actionManifest) {
|
|
5
|
+
function getSessionLaunchContract(actionManifest) {
|
|
7
6
|
if (!actionManifest)
|
|
8
7
|
return null;
|
|
9
8
|
const contracts = actionManifest.spec.consumes;
|
|
10
9
|
if (!contracts || contracts.length === 0)
|
|
11
10
|
return null;
|
|
12
11
|
for (const c of contracts) {
|
|
13
|
-
if (c.kind === '
|
|
12
|
+
if (c.kind === 'session-launch' && c.version === 'v1') {
|
|
14
13
|
return c;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -19,25 +18,12 @@ function getWorkspaceManifestContract(actionManifest) {
|
|
|
19
18
|
function isAgentShapedAction(actionManifest) {
|
|
20
19
|
if (!actionManifest)
|
|
21
20
|
return false;
|
|
22
|
-
if (
|
|
21
|
+
if (getSessionLaunchContract(actionManifest) !== null)
|
|
23
22
|
return true;
|
|
24
23
|
const inputs = actionManifest.spec.inputs;
|
|
25
24
|
const properties = inputs?.properties;
|
|
26
25
|
if (!properties)
|
|
27
26
|
return false;
|
|
28
|
-
return '
|
|
29
|
-
}
|
|
30
|
-
function getAgentContract(actionManifest) {
|
|
31
|
-
if (!actionManifest)
|
|
32
|
-
return null;
|
|
33
|
-
const contracts = actionManifest.spec.consumes;
|
|
34
|
-
if (!contracts || contracts.length === 0)
|
|
35
|
-
return null;
|
|
36
|
-
for (const c of contracts) {
|
|
37
|
-
if (c.kind === 'agent' && c.version === 'v1') {
|
|
38
|
-
return c;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
27
|
+
return 'sessionLaunch' in properties;
|
|
42
28
|
}
|
|
43
29
|
//# sourceMappingURL=action-shape.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-shape.js","sourceRoot":"","sources":["../../../../src/workflow/lib/compiler/action-shape.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"action-shape.js","sourceRoot":"","sources":["../../../../src/workflow/lib/compiler/action-shape.ts"],"names":[],"mappings":";;AAaA,4DAYC;AAWD,kDAWC;AAlCD,SAAgB,wBAAwB,CACtC,cAAqC;IAErC,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC/C,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;QAC1B,IAAI,CAAC,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YACtD,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAWD,SAAgB,mBAAmB,CACjC,cAAqC;IAErC,IAAI,CAAC,cAAc;QAAE,OAAO,KAAK,CAAC;IAClC,IAAI,wBAAwB,CAAC,cAAc,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACnE,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,MAEtB,CAAC;IACd,MAAM,UAAU,GAAG,MAAM,EAAE,UAAU,CAAC;IACtC,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAC9B,OAAO,eAAe,IAAI,UAAU,CAAC;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../src/workflow/lib/compiler/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,WAAW,EAGjB,MAAM,mCAAmC,CAAC;AAyC3C,OAAO,KAAK,EACV,YAAY,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../src/workflow/lib/compiler/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,WAAW,EAGjB,MAAM,mCAAmC,CAAC;AAyC3C,OAAO,KAAK,EACV,YAAY,EAGb,MAAM,SAAS,CAAC;AAmBjB,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,CAqThE"}
|
|
@@ -33,7 +33,7 @@ function compileWorkflow(input) {
|
|
|
33
33
|
const defaults = (0, retry_timeout_1.resolveWorkflowDefaults)(workflow.defaults);
|
|
34
34
|
validateAllAuthoredExpressions(workflow);
|
|
35
35
|
(0, variable_requirements_1.validateVariableReferences)(workflow, requiredVariables, input.resolvedWallets);
|
|
36
|
-
validateAllLiteralReferences(workflow, input.
|
|
36
|
+
validateAllLiteralReferences(workflow, input.resolvedDeliverableSpecs ?? {});
|
|
37
37
|
(0, review_step_1.validateReviewSteps)(workflow);
|
|
38
38
|
const reviewNeedsExtensions = (0, review_step_1.computeReviewNeedsExtensions)(workflow);
|
|
39
39
|
validateMatrixGather(workflow);
|
|
@@ -54,7 +54,7 @@ function compileWorkflow(input) {
|
|
|
54
54
|
const resolved = lookupResolvedRef(job.uses, resolvedRefs);
|
|
55
55
|
manifestSourcesByJob[jobKey] = resolved.isReusableWorkflow
|
|
56
56
|
? null
|
|
57
|
-
: (0, manifest_source_1.compileManifestSource)(jobKey, job.with, resolved.actionManifest
|
|
57
|
+
: (0, manifest_source_1.compileManifestSource)(jobKey, job.with, resolved.actionManifest);
|
|
58
58
|
}
|
|
59
59
|
const compiledJobs = orderedJobs.map(({ key, payload, needs }) => {
|
|
60
60
|
const resolved = lookupResolvedRef(payload.uses, resolvedRefs);
|
|
@@ -87,7 +87,7 @@ function compileWorkflow(input) {
|
|
|
87
87
|
return rewritten;
|
|
88
88
|
})()
|
|
89
89
|
: null;
|
|
90
|
-
const compiledWith =
|
|
90
|
+
const compiledWith = (0, review_step_1.rewriteReviewStepWith)(key, payload, workflow, manifestSourcesByJob);
|
|
91
91
|
(0, installation_resource_validator_1.validateInstallationResourceBindings)({
|
|
92
92
|
jobKey: key,
|
|
93
93
|
actionId: actionRef.id,
|
|
@@ -236,131 +236,27 @@ function validateAllAuthoredExpressions(doc) {
|
|
|
236
236
|
}
|
|
237
237
|
(0, concurrency_1.validateConcurrencyGroupTemplate)(doc.concurrency);
|
|
238
238
|
}
|
|
239
|
-
function validateAllLiteralReferences(doc,
|
|
240
|
-
const agentValidationEnabled = Object.keys(resolvedAgents).length > 0;
|
|
239
|
+
function validateAllLiteralReferences(doc, resolvedDeliverableSpecs) {
|
|
241
240
|
const specValidationEnabled = Object.keys(resolvedDeliverableSpecs).length > 0;
|
|
242
|
-
if (!
|
|
241
|
+
if (!specValidationEnabled) {
|
|
243
242
|
return;
|
|
244
243
|
}
|
|
245
244
|
for (const [jobKey, job] of Object.entries(doc.jobs)) {
|
|
246
|
-
validateJobLiteralReferences(jobKey, job,
|
|
245
|
+
validateJobLiteralReferences(jobKey, job, specValidationEnabled ? resolvedDeliverableSpecs : null);
|
|
247
246
|
}
|
|
248
247
|
}
|
|
249
|
-
function validateJobLiteralReferences(jobKey, job,
|
|
248
|
+
function validateJobLiteralReferences(jobKey, job, resolvedSpecs) {
|
|
250
249
|
const withMap = job.with;
|
|
251
250
|
if (withMap) {
|
|
252
|
-
if (resolvedAgents) {
|
|
253
|
-
assertLiteralAgent(jobKey, 'with.agentRef', withMap['agentRef'], resolvedAgents);
|
|
254
|
-
validateReviewerAgents(jobKey, withMap['reviewers'], resolvedAgents);
|
|
255
|
-
validateReviewerAgents(jobKey, withMap['recipients'], resolvedAgents);
|
|
256
|
-
const escalationChain = withMap['escalationChain'];
|
|
257
|
-
if (Array.isArray(escalationChain)) {
|
|
258
|
-
for (let i = 0; i < escalationChain.length; i++) {
|
|
259
|
-
const step = escalationChain[i];
|
|
260
|
-
if (step !== null &&
|
|
261
|
-
typeof step === 'object' &&
|
|
262
|
-
!Array.isArray(step)) {
|
|
263
|
-
validateReviewerAgents(jobKey, step['recipients'], resolvedAgents);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
251
|
if (resolvedSpecs) {
|
|
269
252
|
assertLiteralDeliverableSpec(jobKey, 'with.deliverableSpecRef', withMap['deliverableSpecRef'], resolvedSpecs);
|
|
270
253
|
}
|
|
271
254
|
assertVersioningMode(jobKey, withMap['versioning']);
|
|
272
255
|
}
|
|
273
256
|
}
|
|
274
|
-
function validateReviewerAgents(jobKey, reviewers, resolvedAgents) {
|
|
275
|
-
if (!Array.isArray(reviewers)) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
for (let i = 0; i < reviewers.length; i++) {
|
|
279
|
-
const reviewer = reviewers[i];
|
|
280
|
-
if (reviewer === null ||
|
|
281
|
-
typeof reviewer !== 'object' ||
|
|
282
|
-
Array.isArray(reviewer)) {
|
|
283
|
-
continue;
|
|
284
|
-
}
|
|
285
|
-
assertLiteralAgent(jobKey, `with.reviewers[${i}].agentRef`, reviewer['target']?.['agentRef'] ?? reviewer['agentRef'], resolvedAgents);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
function attachResolvedReviewerPins(withBlock, resolvedAgents) {
|
|
289
|
-
const pinRecipients = (value) => {
|
|
290
|
-
if (!Array.isArray(value))
|
|
291
|
-
return value;
|
|
292
|
-
return value.map((recipient) => {
|
|
293
|
-
if (recipient === null ||
|
|
294
|
-
typeof recipient !== 'object' ||
|
|
295
|
-
Array.isArray(recipient)) {
|
|
296
|
-
return recipient;
|
|
297
|
-
}
|
|
298
|
-
const record = recipient;
|
|
299
|
-
if (record['kind'] !== 'agent')
|
|
300
|
-
return recipient;
|
|
301
|
-
const target = record['target'];
|
|
302
|
-
if (target === null ||
|
|
303
|
-
typeof target !== 'object' ||
|
|
304
|
-
Array.isArray(target)) {
|
|
305
|
-
return recipient;
|
|
306
|
-
}
|
|
307
|
-
const targetRecord = target;
|
|
308
|
-
const agentRef = targetRecord['agentRef'];
|
|
309
|
-
if (!isLiteralStringValue(agentRef))
|
|
310
|
-
return recipient;
|
|
311
|
-
const resolved = resolvedAgents[agentRef];
|
|
312
|
-
if (resolved === undefined)
|
|
313
|
-
return recipient;
|
|
314
|
-
return Object.freeze({
|
|
315
|
-
...record,
|
|
316
|
-
target: Object.freeze({
|
|
317
|
-
...targetRecord,
|
|
318
|
-
agentRevisionPin: Object.freeze({
|
|
319
|
-
agentRevisionId: resolved.agentRevisionId,
|
|
320
|
-
agentContentHash: resolved.agentContentHash,
|
|
321
|
-
agentSlug: resolved.slug,
|
|
322
|
-
}),
|
|
323
|
-
}),
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
};
|
|
327
|
-
const out = { ...withBlock };
|
|
328
|
-
if ('reviewers' in out)
|
|
329
|
-
out['reviewers'] = pinRecipients(out['reviewers']);
|
|
330
|
-
if ('recipients' in out)
|
|
331
|
-
out['recipients'] = pinRecipients(out['recipients']);
|
|
332
|
-
if (Array.isArray(out['escalationChain'])) {
|
|
333
|
-
out['escalationChain'] = out['escalationChain'].map((step) => {
|
|
334
|
-
if (step === null || typeof step !== 'object' || Array.isArray(step)) {
|
|
335
|
-
return step;
|
|
336
|
-
}
|
|
337
|
-
const record = step;
|
|
338
|
-
return Object.freeze({
|
|
339
|
-
...record,
|
|
340
|
-
recipients: pinRecipients(record['recipients']),
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
return Object.freeze(out);
|
|
345
|
-
}
|
|
346
257
|
function isLiteralStringValue(value) {
|
|
347
258
|
return typeof value === 'string' && !value.includes('${{');
|
|
348
259
|
}
|
|
349
|
-
function assertLiteralAgent(jobKey, fieldPath, value, resolvedAgents) {
|
|
350
|
-
if (!isLiteralStringValue(value)) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
if (resolvedAgents[value] !== undefined) {
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
const knownPreview = formatKnownPreview(Object.keys(resolvedAgents));
|
|
357
|
-
throw new errors_1.WorkflowDslError(workflow_1.WorkflowErrorCode.DSL_UNKNOWN_AGENT, `Job '${jobKey}' ${fieldPath} = '${value}' is not a registered agent. Known: [${knownPreview}].`, {
|
|
358
|
-
jobKey,
|
|
359
|
-
fieldPath,
|
|
360
|
-
value,
|
|
361
|
-
knownCount: Object.keys(resolvedAgents).length,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
260
|
function assertLiteralDeliverableSpec(jobKey, fieldPath, value, resolvedSpecs) {
|
|
365
261
|
if (!isLiteralStringValue(value)) {
|
|
366
262
|
return;
|