@inf-monkeys-tech/monkeys 1.0.69 → 1.0.71
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/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/workflow-column.d.ts +131 -0
- package/lib/contracts/workflow-column.d.ts.map +1 -0
- package/lib/contracts/workflow-column.js +74 -0
- package/lib/contracts/workflow-column.js.map +1 -0
- package/lib/esm/contracts/index.mjs +83 -22
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +129 -22
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +112 -12
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +61 -0
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/index.json +1 -0
- package/lib/json-schema/workflow-column-binding.schema.json +389 -0
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/workflow-column.d.ts +8 -0
- package/lib/runtime/workflow-column.d.ts.map +1 -0
- package/lib/runtime/workflow-column.js +57 -0
- package/lib/runtime/workflow-column.js.map +1 -0
- package/lib/schemas/index.d.ts +71 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +9 -1
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
package/lib/contracts/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
package/lib/contracts/index.js
CHANGED
|
@@ -33,5 +33,6 @@ __exportStar(require("./tenant"), exports);
|
|
|
33
33
|
__exportStar(require("./theme"), exports);
|
|
34
34
|
__exportStar(require("./trend"), exports);
|
|
35
35
|
__exportStar(require("./workflow-definition"), exports);
|
|
36
|
+
__exportStar(require("./workflow-column"), exports);
|
|
36
37
|
__exportStar(require("./workflow-runtime"), exports);
|
|
37
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,wDAAsC;AACtC,6DAA2C;AAC3C,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,wDAAsC;AACtC,6DAA2C;AAC3C,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,oDAAkC;AAClC,qDAAmC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const WorkflowColumnFieldRefSchema: z.ZodObject<{
|
|
3
|
+
ontologyId: z.ZodString;
|
|
4
|
+
fieldKey: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export declare const WorkflowColumnInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<"default">;
|
|
8
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
9
|
+
kind: z.ZodLiteral<"constant">;
|
|
10
|
+
value: z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>;
|
|
11
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
+
kind: z.ZodLiteral<"field">;
|
|
13
|
+
field: z.ZodObject<{
|
|
14
|
+
ontologyId: z.ZodString;
|
|
15
|
+
fieldKey: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"context">;
|
|
19
|
+
field: z.ZodEnum<{
|
|
20
|
+
teamId: "teamId";
|
|
21
|
+
ontologyId: "ontologyId";
|
|
22
|
+
assetId: "assetId";
|
|
23
|
+
columnId: "columnId";
|
|
24
|
+
}>;
|
|
25
|
+
}, z.core.$strict>], "kind">;
|
|
26
|
+
export declare const WorkflowColumnDependencySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"field">;
|
|
28
|
+
field: z.ZodObject<{
|
|
29
|
+
ontologyId: z.ZodString;
|
|
30
|
+
fieldKey: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
33
|
+
kind: z.ZodLiteral<"relation">;
|
|
34
|
+
relation: z.ZodObject<{
|
|
35
|
+
ontologyId: z.ZodString;
|
|
36
|
+
fieldKey: z.ZodString;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
direction: z.ZodEnum<{
|
|
39
|
+
incoming: "incoming";
|
|
40
|
+
outgoing: "outgoing";
|
|
41
|
+
}>;
|
|
42
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
43
|
+
ontologyId: z.ZodString;
|
|
44
|
+
fieldKey: z.ZodString;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
}, z.core.$strict>], "kind">;
|
|
47
|
+
export declare const WorkflowColumnOutputPathSchema: z.ZodArray<z.ZodString>;
|
|
48
|
+
export declare const WorkflowColumnOutputSchema: z.ZodObject<{
|
|
49
|
+
type: z.ZodEnum<{
|
|
50
|
+
number: "number";
|
|
51
|
+
json: "json";
|
|
52
|
+
text: "text";
|
|
53
|
+
}>;
|
|
54
|
+
path: z.ZodArray<z.ZodString>;
|
|
55
|
+
nullable: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export declare const WorkflowColumnBindingSchema: z.ZodObject<{
|
|
58
|
+
contract: z.ZodLiteral<"WorkflowColumnBinding">;
|
|
59
|
+
version: z.ZodLiteral<1>;
|
|
60
|
+
enabled: z.ZodBoolean;
|
|
61
|
+
paused: z.ZodDefault<z.ZodBoolean>;
|
|
62
|
+
workflow: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
version: z.ZodNumber;
|
|
65
|
+
inputSchemaHash: z.ZodString;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"default">;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
kind: z.ZodLiteral<"constant">;
|
|
71
|
+
value: z.ZodType<import("./common").JsonValue, unknown, z.core.$ZodTypeInternals<import("./common").JsonValue, unknown>>;
|
|
72
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"field">;
|
|
74
|
+
field: z.ZodObject<{
|
|
75
|
+
ontologyId: z.ZodString;
|
|
76
|
+
fieldKey: z.ZodString;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"context">;
|
|
80
|
+
field: z.ZodEnum<{
|
|
81
|
+
teamId: "teamId";
|
|
82
|
+
ontologyId: "ontologyId";
|
|
83
|
+
assetId: "assetId";
|
|
84
|
+
columnId: "columnId";
|
|
85
|
+
}>;
|
|
86
|
+
}, z.core.$strict>], "kind">>;
|
|
87
|
+
dependencies: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
+
kind: z.ZodLiteral<"field">;
|
|
89
|
+
field: z.ZodObject<{
|
|
90
|
+
ontologyId: z.ZodString;
|
|
91
|
+
fieldKey: z.ZodString;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"relation">;
|
|
95
|
+
relation: z.ZodObject<{
|
|
96
|
+
ontologyId: z.ZodString;
|
|
97
|
+
fieldKey: z.ZodString;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
direction: z.ZodEnum<{
|
|
100
|
+
incoming: "incoming";
|
|
101
|
+
outgoing: "outgoing";
|
|
102
|
+
}>;
|
|
103
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
104
|
+
ontologyId: z.ZodString;
|
|
105
|
+
fieldKey: z.ZodString;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
}, z.core.$strict>], "kind">>>;
|
|
108
|
+
output: z.ZodObject<{
|
|
109
|
+
type: z.ZodEnum<{
|
|
110
|
+
number: "number";
|
|
111
|
+
json: "json";
|
|
112
|
+
text: "text";
|
|
113
|
+
}>;
|
|
114
|
+
path: z.ZodArray<z.ZodString>;
|
|
115
|
+
nullable: z.ZodDefault<z.ZodBoolean>;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
|
+
policy: z.ZodDefault<z.ZodObject<{
|
|
118
|
+
debounceMs: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
maxDelayMs: z.ZodDefault<z.ZodNumber>;
|
|
120
|
+
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
121
|
+
requireSearchProjection: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
expiry: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
path: z.ZodArray<z.ZodString>;
|
|
125
|
+
}, z.core.$strict>>;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
export type WorkflowColumnBinding = z.infer<typeof WorkflowColumnBindingSchema>;
|
|
128
|
+
export type WorkflowColumnInput = z.infer<typeof WorkflowColumnInputSchema>;
|
|
129
|
+
export type WorkflowColumnDependency = z.infer<typeof WorkflowColumnDependencySchema>;
|
|
130
|
+
export type WorkflowColumnFieldRef = z.infer<typeof WorkflowColumnFieldRefSchema>;
|
|
131
|
+
//# sourceMappingURL=workflow-column.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-column.d.ts","sourceRoot":"","sources":["../../src/contracts/workflow-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,4BAA4B;;;kBAK9B,CAAC;AAEZ,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;4BAUpC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;4BAUzC,CAAC;AAGH,eAAO,MAAM,8BAA8B,yBAA8C,CAAC;AAC1F,eAAO,MAAM,0BAA0B;;;;;;;;kBAM5B,CAAC;AAEZ,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8B7B,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowColumnBindingSchema = exports.WorkflowColumnOutputSchema = exports.WorkflowColumnOutputPathSchema = exports.WorkflowColumnDependencySchema = exports.WorkflowColumnInputSchema = exports.WorkflowColumnFieldRefSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
exports.WorkflowColumnFieldRefSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
ontologyId: common_1.ContractIdentifierSchema,
|
|
9
|
+
fieldKey: common_1.ContractIdentifierSchema,
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
exports.WorkflowColumnInputSchema = zod_1.z.discriminatedUnion('kind', [
|
|
13
|
+
zod_1.z.object({ kind: zod_1.z.literal('default') }).strict(),
|
|
14
|
+
zod_1.z.object({ kind: zod_1.z.literal('constant'), value: common_1.JsonValueSchema }).strict(),
|
|
15
|
+
zod_1.z.object({ kind: zod_1.z.literal('field'), field: exports.WorkflowColumnFieldRefSchema }).strict(),
|
|
16
|
+
zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
kind: zod_1.z.literal('context'),
|
|
19
|
+
field: zod_1.z.enum(['assetId', 'teamId', 'ontologyId', 'columnId']),
|
|
20
|
+
})
|
|
21
|
+
.strict(),
|
|
22
|
+
]);
|
|
23
|
+
exports.WorkflowColumnDependencySchema = zod_1.z.discriminatedUnion('kind', [
|
|
24
|
+
zod_1.z.object({ kind: zod_1.z.literal('field'), field: exports.WorkflowColumnFieldRefSchema }).strict(),
|
|
25
|
+
zod_1.z
|
|
26
|
+
.object({
|
|
27
|
+
kind: zod_1.z.literal('relation'),
|
|
28
|
+
relation: exports.WorkflowColumnFieldRefSchema,
|
|
29
|
+
direction: zod_1.z.enum(['incoming', 'outgoing']),
|
|
30
|
+
fields: zod_1.z.array(exports.WorkflowColumnFieldRefSchema).max(100),
|
|
31
|
+
})
|
|
32
|
+
.strict(),
|
|
33
|
+
]);
|
|
34
|
+
// Paths are literal own-property segments, never executable JSONPath expressions.
|
|
35
|
+
exports.WorkflowColumnOutputPathSchema = zod_1.z.array(zod_1.z.string().min(1).max(256)).max(20);
|
|
36
|
+
exports.WorkflowColumnOutputSchema = zod_1.z
|
|
37
|
+
.object({
|
|
38
|
+
type: zod_1.z.enum(['number', 'text', 'json']),
|
|
39
|
+
path: exports.WorkflowColumnOutputPathSchema,
|
|
40
|
+
nullable: zod_1.z.boolean().default(false),
|
|
41
|
+
})
|
|
42
|
+
.strict();
|
|
43
|
+
exports.WorkflowColumnBindingSchema = zod_1.z
|
|
44
|
+
.object({
|
|
45
|
+
contract: zod_1.z.literal('WorkflowColumnBinding'),
|
|
46
|
+
version: zod_1.z.literal(1),
|
|
47
|
+
enabled: zod_1.z.boolean(),
|
|
48
|
+
paused: zod_1.z.boolean().default(false),
|
|
49
|
+
workflow: zod_1.z
|
|
50
|
+
.object({
|
|
51
|
+
id: common_1.ContractIdentifierSchema,
|
|
52
|
+
version: zod_1.z.number().int().positive(),
|
|
53
|
+
inputSchemaHash: common_1.Sha256Schema,
|
|
54
|
+
})
|
|
55
|
+
.strict(),
|
|
56
|
+
inputs: zod_1.z.record(zod_1.z.string().min(1).max(128), exports.WorkflowColumnInputSchema),
|
|
57
|
+
dependencies: zod_1.z.array(exports.WorkflowColumnDependencySchema).max(100).default([]),
|
|
58
|
+
output: exports.WorkflowColumnOutputSchema,
|
|
59
|
+
policy: zod_1.z
|
|
60
|
+
.object({
|
|
61
|
+
debounceMs: zod_1.z.number().int().min(0).max(30000).default(5000),
|
|
62
|
+
maxDelayMs: zod_1.z.number().int().min(0).max(30000).default(30000),
|
|
63
|
+
concurrency: zod_1.z.number().int().min(1).max(32).default(2),
|
|
64
|
+
// Indexed queries need visible projections of their declared sources before execution.
|
|
65
|
+
requireSearchProjection: zod_1.z.boolean().optional(),
|
|
66
|
+
})
|
|
67
|
+
.strict()
|
|
68
|
+
.default({ debounceMs: 5000, maxDelayMs: 30000, concurrency: 2 }),
|
|
69
|
+
// The workflow supplies an ISO datetime with offset for one future expiry.
|
|
70
|
+
// Scheduling infrastructure needs no knowledge of months or business periods.
|
|
71
|
+
expiry: zod_1.z.object({ path: exports.WorkflowColumnOutputPathSchema }).strict().optional(),
|
|
72
|
+
})
|
|
73
|
+
.strict();
|
|
74
|
+
//# sourceMappingURL=workflow-column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-column.js","sourceRoot":"","sources":["../../src/contracts/workflow-column.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAAmF;AAEtE,QAAA,4BAA4B,GAAG,OAAC;KAC1C,MAAM,CAAC;IACN,UAAU,EAAE,iCAAwB;IACpC,QAAQ,EAAE,iCAAwB;CACnC,CAAC;KACD,MAAM,EAAE,CAAC;AAEC,QAAA,yBAAyB,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACpE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IACjD,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,wBAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1E,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,oCAA4B,EAAE,CAAC,CAAC,MAAM,EAAE;IACpF,OAAC;SACE,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC1B,KAAK,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;KAC/D,CAAC;SACD,MAAM,EAAE;CACZ,CAAC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EAAE,CAAC;IACpE,2EAA2E;IAC3E,8EAA8E;IAC9E,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,sCAA8B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/E,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -14793,22 +14793,77 @@ var WorkflowDefinitionSchema = z19.object({
|
|
|
14793
14793
|
if (definition.revision.kind === "release" && definition.metadata.version !== definition.revision.recordVersion) context.addIssue({ code: "custom", path: ["revision", "recordVersion"], message: "Release recordVersion must equal metadata.version." });
|
|
14794
14794
|
});
|
|
14795
14795
|
|
|
14796
|
-
// src/contracts/workflow-
|
|
14796
|
+
// src/contracts/workflow-column.ts
|
|
14797
14797
|
import { z as z20 } from "zod";
|
|
14798
|
-
var
|
|
14799
|
-
|
|
14798
|
+
var WorkflowColumnFieldRefSchema = z20.object({
|
|
14799
|
+
ontologyId: ContractIdentifierSchema,
|
|
14800
|
+
fieldKey: ContractIdentifierSchema
|
|
14801
|
+
}).strict();
|
|
14802
|
+
var WorkflowColumnInputSchema = z20.discriminatedUnion("kind", [
|
|
14803
|
+
z20.object({ kind: z20.literal("default") }).strict(),
|
|
14804
|
+
z20.object({ kind: z20.literal("constant"), value: JsonValueSchema }).strict(),
|
|
14805
|
+
z20.object({ kind: z20.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
|
|
14806
|
+
z20.object({
|
|
14807
|
+
kind: z20.literal("context"),
|
|
14808
|
+
field: z20.enum(["assetId", "teamId", "ontologyId", "columnId"])
|
|
14809
|
+
}).strict()
|
|
14810
|
+
]);
|
|
14811
|
+
var WorkflowColumnDependencySchema = z20.discriminatedUnion("kind", [
|
|
14812
|
+
z20.object({ kind: z20.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
|
|
14813
|
+
z20.object({
|
|
14814
|
+
kind: z20.literal("relation"),
|
|
14815
|
+
relation: WorkflowColumnFieldRefSchema,
|
|
14816
|
+
direction: z20.enum(["incoming", "outgoing"]),
|
|
14817
|
+
fields: z20.array(WorkflowColumnFieldRefSchema).max(100)
|
|
14818
|
+
}).strict()
|
|
14819
|
+
]);
|
|
14820
|
+
var WorkflowColumnOutputPathSchema = z20.array(z20.string().min(1).max(256)).max(20);
|
|
14821
|
+
var WorkflowColumnOutputSchema = z20.object({
|
|
14822
|
+
type: z20.enum(["number", "text", "json"]),
|
|
14823
|
+
path: WorkflowColumnOutputPathSchema,
|
|
14824
|
+
nullable: z20.boolean().default(false)
|
|
14825
|
+
}).strict();
|
|
14826
|
+
var WorkflowColumnBindingSchema = z20.object({
|
|
14827
|
+
contract: z20.literal("WorkflowColumnBinding"),
|
|
14828
|
+
version: z20.literal(1),
|
|
14829
|
+
enabled: z20.boolean(),
|
|
14830
|
+
paused: z20.boolean().default(false),
|
|
14831
|
+
workflow: z20.object({
|
|
14832
|
+
id: ContractIdentifierSchema,
|
|
14833
|
+
version: z20.number().int().positive(),
|
|
14834
|
+
inputSchemaHash: Sha256Schema
|
|
14835
|
+
}).strict(),
|
|
14836
|
+
inputs: z20.record(z20.string().min(1).max(128), WorkflowColumnInputSchema),
|
|
14837
|
+
dependencies: z20.array(WorkflowColumnDependencySchema).max(100).default([]),
|
|
14838
|
+
output: WorkflowColumnOutputSchema,
|
|
14839
|
+
policy: z20.object({
|
|
14840
|
+
debounceMs: z20.number().int().min(0).max(3e4).default(5e3),
|
|
14841
|
+
maxDelayMs: z20.number().int().min(0).max(3e4).default(3e4),
|
|
14842
|
+
concurrency: z20.number().int().min(1).max(32).default(2),
|
|
14843
|
+
// Indexed queries need visible projections of their declared sources before execution.
|
|
14844
|
+
requireSearchProjection: z20.boolean().optional()
|
|
14845
|
+
}).strict().default({ debounceMs: 5e3, maxDelayMs: 3e4, concurrency: 2 }),
|
|
14846
|
+
// The workflow supplies an ISO datetime with offset for one future expiry.
|
|
14847
|
+
// Scheduling infrastructure needs no knowledge of months or business periods.
|
|
14848
|
+
expiry: z20.object({ path: WorkflowColumnOutputPathSchema }).strict().optional()
|
|
14849
|
+
}).strict();
|
|
14850
|
+
|
|
14851
|
+
// src/contracts/workflow-runtime.ts
|
|
14852
|
+
import { z as z21 } from "zod";
|
|
14853
|
+
var WorkflowCatalogEntrySchema = z21.object({
|
|
14854
|
+
contract: z21.literal("WorkflowCatalogEntry"),
|
|
14800
14855
|
workflowId: ContractIdentifierSchema,
|
|
14801
14856
|
teamId: ContractIdentifierSchema,
|
|
14802
14857
|
creatorRef: EntityRefSchema,
|
|
14803
14858
|
currentDefinitionRef: EntityRefSchema,
|
|
14804
|
-
lifecycle:
|
|
14805
|
-
asset:
|
|
14806
|
-
preset:
|
|
14807
|
-
marketplacePublished:
|
|
14859
|
+
lifecycle: z21.enum(["ACTIVE", "DELETED"]),
|
|
14860
|
+
asset: z21.object({
|
|
14861
|
+
preset: z21.boolean(),
|
|
14862
|
+
marketplacePublished: z21.boolean(),
|
|
14808
14863
|
publishConfig: JsonObjectSchema.optional(),
|
|
14809
|
-
sort:
|
|
14864
|
+
sort: z21.number().int(),
|
|
14810
14865
|
forkFromRef: EntityRefSchema.optional(),
|
|
14811
|
-
notAuthorized:
|
|
14866
|
+
notAuthorized: z21.boolean()
|
|
14812
14867
|
}).strict(),
|
|
14813
14868
|
createdAt: IsoDateTimeSchema,
|
|
14814
14869
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -14843,17 +14898,17 @@ var WorkflowCatalogEntrySchema = z20.object({
|
|
|
14843
14898
|
});
|
|
14844
14899
|
}
|
|
14845
14900
|
});
|
|
14846
|
-
var WorkflowPublicationSchema =
|
|
14847
|
-
contract:
|
|
14901
|
+
var WorkflowPublicationSchema = z21.object({
|
|
14902
|
+
contract: z21.literal("WorkflowPublication"),
|
|
14848
14903
|
publicationId: ContractIdentifierSchema,
|
|
14849
14904
|
definitionRef: EntityRefSchema,
|
|
14850
14905
|
runtimeDefinitionRef: EntityRefSchema,
|
|
14851
14906
|
sourceHash: Sha256Schema,
|
|
14852
14907
|
compiledHash: Sha256Schema,
|
|
14853
|
-
status:
|
|
14908
|
+
status: z21.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
14854
14909
|
publisherRef: EntityRefSchema,
|
|
14855
14910
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
14856
|
-
failureReason:
|
|
14911
|
+
failureReason: z21.string().trim().min(1).optional()
|
|
14857
14912
|
}).strict().superRefine((publication, context) => {
|
|
14858
14913
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
14859
14914
|
context.addIssue({
|
|
@@ -14884,12 +14939,12 @@ var WorkflowPublicationSchema = z20.object({
|
|
|
14884
14939
|
});
|
|
14885
14940
|
}
|
|
14886
14941
|
});
|
|
14887
|
-
var WorkflowCompletionCommitSchema =
|
|
14888
|
-
contract:
|
|
14942
|
+
var WorkflowCompletionCommitSchema = z21.object({
|
|
14943
|
+
contract: z21.literal("WorkflowCompletionCommit"),
|
|
14889
14944
|
commitId: ContractIdentifierSchema,
|
|
14890
14945
|
run: ApplicationRunSchema,
|
|
14891
|
-
outputs:
|
|
14892
|
-
artifacts:
|
|
14946
|
+
outputs: z21.array(OutputRecordSchema),
|
|
14947
|
+
artifacts: z21.array(ArtifactManifestSchema),
|
|
14893
14948
|
lineage: LineageRecordSchema,
|
|
14894
14949
|
completedAt: IsoDateTimeSchema
|
|
14895
14950
|
}).strict().superRefine((commit, context) => {
|
|
@@ -14931,15 +14986,15 @@ var WorkflowCompletionCommitSchema = z20.object({
|
|
|
14931
14986
|
}
|
|
14932
14987
|
});
|
|
14933
14988
|
});
|
|
14934
|
-
var WorkflowCompletionReceiptSchema =
|
|
14935
|
-
contract:
|
|
14989
|
+
var WorkflowCompletionReceiptSchema = z21.object({
|
|
14990
|
+
contract: z21.literal("WorkflowCompletionReceipt"),
|
|
14936
14991
|
commitId: ContractIdentifierSchema,
|
|
14937
14992
|
runRef: EntityRefSchema,
|
|
14938
|
-
outputRefs:
|
|
14939
|
-
artifactRefs:
|
|
14993
|
+
outputRefs: z21.array(EntityRefSchema),
|
|
14994
|
+
artifactRefs: z21.array(EntityRefSchema),
|
|
14940
14995
|
contentHash: Sha256Schema,
|
|
14941
14996
|
committedAt: IsoDateTimeSchema,
|
|
14942
|
-
idempotentReplay:
|
|
14997
|
+
idempotentReplay: z21.boolean()
|
|
14943
14998
|
}).strict().superRefine((receipt, context) => {
|
|
14944
14999
|
if (receipt.runRef.kind !== "application-run") {
|
|
14945
15000
|
context.addIssue({
|
|
@@ -15366,6 +15421,12 @@ export {
|
|
|
15366
15421
|
WorkbenchRuntimeBundleSchema,
|
|
15367
15422
|
WorkbenchSchema,
|
|
15368
15423
|
WorkflowCatalogEntrySchema,
|
|
15424
|
+
WorkflowColumnBindingSchema,
|
|
15425
|
+
WorkflowColumnDependencySchema,
|
|
15426
|
+
WorkflowColumnFieldRefSchema,
|
|
15427
|
+
WorkflowColumnInputSchema,
|
|
15428
|
+
WorkflowColumnOutputPathSchema,
|
|
15429
|
+
WorkflowColumnOutputSchema,
|
|
15369
15430
|
WorkflowCompletionCommitSchema,
|
|
15370
15431
|
WorkflowCompletionReceiptSchema,
|
|
15371
15432
|
WorkflowDefinitionSchema,
|