@oomol-lab/open-flow 0.1.0-beta.62 → 0.1.0-beta.64
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/browser/{createResourceDialog-DZgJsr3e.js → createResourceDialog-BAJXbzNH.js} +20 -7
- package/dist/browser/flow-authoring.js +8 -7
- package/dist/browser/flow-change-schema.d.ts +1 -0
- package/dist/browser/flow-change.d.ts +1 -0
- package/dist/browser/flow-change.js +8 -7
- package/dist/browser/flow-notifications.d.ts +6 -0
- package/dist/browser/{flowChanges-CzYIVevI.js → flowChanges-BAMkSaKF.js} +1771 -1331
- package/dist/browser/{flowRunInputEditorStore-Dsxyfwae.js → flowRunInputEditorStore-B2Rw4VsT.js} +1 -1
- package/dist/browser/{flowWorkspace-BgZaFKZm.js → flowWorkspace-DxLc1Ybv.js} +429 -205
- package/dist/browser/{icons-CajfDpy_.js → icons-Db2Jb2iX.js} +30 -10
- package/dist/browser/preview.css +40 -52
- package/dist/browser/preview.js +7752 -7452
- package/dist/browser/theme.css +4 -0
- package/dist/browser/{typeScriptSession-fXPMFGjW.js → typeScriptSession-D0bjYDeg.js} +1 -1
- package/dist/browser/ui.css +39 -51
- package/dist/browser/ui.js +5 -5
- package/dist/browser/{value-DL_poNiC.js → value-BADHeZ9I.js} +12 -1
- package/dist/browser/workbench-contract.d.ts +10 -0
- package/dist/browser/workbench.css +43 -59
- package/dist/browser/workbench.d.ts +5 -3
- package/dist/browser/workbench.js +255 -216
- package/dist/browser/{workbenchSelect-H9wzEFkH.js → workbenchSelect-C-jf6NIM.js} +1 -1
- package/dist/command/index.js +49 -48
- package/dist/common/authoringSchema.d.ts +1 -0
- package/dist/common/canvas-commands.d.ts +19 -0
- package/dist/common/connector-action.d.ts +1 -0
- package/dist/common/connector-action.js +15 -12
- package/dist/common/control-api-conformance.js +127 -8
- package/dist/common/control-api.d.ts +16 -0
- package/dist/common/control-api.js +67 -8
- package/dist/common/control-requests.d.ts +23 -0
- package/dist/common/control-requests.js +64 -19
- package/dist/common/decision.js +8 -7
- package/dist/common/flow-connectionUsage.d.ts +1 -0
- package/dist/common/flow-encoding.d.ts +1 -0
- package/dist/common/flow-encoding.js +202 -10
- package/dist/common/flow-notifications.d.ts +6 -0
- package/dist/common/flow-semantics.js +64 -46
- package/dist/common/flow-workflowFile.d.ts +23 -0
- package/dist/common/integration-trigger.js +8 -7
- package/dist/common/localization.d.ts +1 -0
- package/dist/common/localization.js +12 -1
- package/dist/common/mcp.d.ts +103 -0
- package/dist/common/mcp.js +135 -11
- package/dist/common/openapi.js +8 -7
- package/dist/common/poll-trigger.js +8 -7
- package/dist/common/runtime-contract.js +1 -1
- package/dist/common/scheduler.d.ts +22 -2
- package/dist/common/scheduler.js +354 -83
- package/dist/common/trigger-config.d.ts +2 -0
- package/dist/common/webhook-trigger.js +8 -7
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
- package/skills/open-flow/SKILL.md +1 -1
- package/skills/open-flow/references/flow-authoring.md +49 -0
package/dist/common/mcp.js
CHANGED
|
@@ -5851,6 +5851,23 @@ function preprocess(fn, schema) {
|
|
|
5851
5851
|
out: schema
|
|
5852
5852
|
});
|
|
5853
5853
|
}
|
|
5854
|
+
/** Transient operations on each connected canvas's own viewport. */
|
|
5855
|
+
var canvasCommandSchema = discriminatedUnion("type", [
|
|
5856
|
+
strictObject({
|
|
5857
|
+
type: literal("focus"),
|
|
5858
|
+
nodeId: string$1().min(1)
|
|
5859
|
+
}),
|
|
5860
|
+
strictObject({
|
|
5861
|
+
type: literal("zoom"),
|
|
5862
|
+
zoom: number().min(.1).max(3)
|
|
5863
|
+
}),
|
|
5864
|
+
strictObject({
|
|
5865
|
+
type: literal("pan"),
|
|
5866
|
+
dx: number(),
|
|
5867
|
+
dy: number()
|
|
5868
|
+
}),
|
|
5869
|
+
strictObject({ type: literal("fit") })
|
|
5870
|
+
]);
|
|
5854
5871
|
//#endregion
|
|
5855
5872
|
//#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/lite/index.mjs
|
|
5856
5873
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -6850,10 +6867,10 @@ function compileEnumAndConst(context, enumList, constValue, schema) {
|
|
|
6850
6867
|
}
|
|
6851
6868
|
if (compiledEnum.length === 0) recordWarn(context, "all of elements from list is rejected by currently schema object", "enum");
|
|
6852
6869
|
}
|
|
6853
|
-
if (constValue && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
|
|
6870
|
+
if (constValue !== void 0 && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
|
|
6854
6871
|
if (compiledEnum) {
|
|
6855
6872
|
if (compiledEnum.length === 0) isNever = true;
|
|
6856
|
-
else if (constValue) {
|
|
6873
|
+
else if (constValue !== void 0) {
|
|
6857
6874
|
let foundEquals = false;
|
|
6858
6875
|
for (const enumValue of compiledEnum) if (isDeepEquals(enumValue, constValue)) {
|
|
6859
6876
|
foundEquals = true;
|
|
@@ -6866,7 +6883,7 @@ function compileEnumAndConst(context, enumList, constValue, schema) {
|
|
|
6866
6883
|
const compiledSchema = {};
|
|
6867
6884
|
if (schema.type) compiledSchema.type = schema.type;
|
|
6868
6885
|
if (compiledEnum) compiledSchema.enum = compiledEnum;
|
|
6869
|
-
if (constValue) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
|
|
6886
|
+
if (constValue !== void 0) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
|
|
6870
6887
|
return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
|
|
6871
6888
|
}
|
|
6872
6889
|
//#endregion
|
|
@@ -7261,7 +7278,7 @@ function compileSchema(context, schema) {
|
|
|
7261
7278
|
let targetSchema = schema;
|
|
7262
7279
|
let shouldHandleEnumAndConst = false;
|
|
7263
7280
|
const { enum: enumList, const: constValue } = schema;
|
|
7264
|
-
if (enumList || constValue) {
|
|
7281
|
+
if (enumList || constValue !== void 0) {
|
|
7265
7282
|
const { enum: _0, const: _1, ...rest } = schema;
|
|
7266
7283
|
targetSchema = rest;
|
|
7267
7284
|
shouldHandleEnumAndConst = true;
|
|
@@ -7851,7 +7868,7 @@ function schemaEqualsChecker(extendsContext) {
|
|
|
7851
7868
|
}
|
|
7852
7869
|
function isValueEquals(value1, value2) {
|
|
7853
7870
|
if (value1 === value2) return true;
|
|
7854
|
-
if (value1 === null) return false;
|
|
7871
|
+
if (value1 === null || value2 === null) return false;
|
|
7855
7872
|
if (typeof value1 !== "object") return false;
|
|
7856
7873
|
if (typeof value1 !== typeof value2) return false;
|
|
7857
7874
|
if (isCompiledSchema(value1) && isCompiledSchema(value2)) return isCompiledSchemaEquals(value1, value2);
|
|
@@ -8417,7 +8434,7 @@ function findMismatchPath(source, target) {
|
|
|
8417
8434
|
if ((sourceSchema.maxProperties ?? Number.POSITIVE_INFINITY) > (targetSchema.maxProperties ?? Number.POSITIVE_INFINITY)) return [...targetPath, "maxProperties"];
|
|
8418
8435
|
break;
|
|
8419
8436
|
}
|
|
8420
|
-
case CompiledKind.EnumOrConst: return [...targetPath, targetSchema.const
|
|
8437
|
+
case CompiledKind.EnumOrConst: return [...targetPath, targetSchema.const === void 0 ? "enum" : "const"];
|
|
8421
8438
|
}
|
|
8422
8439
|
return targetPath;
|
|
8423
8440
|
}
|
|
@@ -8894,7 +8911,8 @@ var managedFields = object({
|
|
|
8894
8911
|
object({
|
|
8895
8912
|
kind: literal("connector"),
|
|
8896
8913
|
action: text,
|
|
8897
|
-
connectionId: text.optional()
|
|
8914
|
+
connectionId: text.optional(),
|
|
8915
|
+
outputMode: literal("value").optional()
|
|
8898
8916
|
}),
|
|
8899
8917
|
object({
|
|
8900
8918
|
kind: literal("openapi"),
|
|
@@ -9525,7 +9543,7 @@ var authoringConfigurations = {
|
|
|
9525
9543
|
outputs: outputFields,
|
|
9526
9544
|
capabilities: authoringDefinitionSchemas.capabilities.optional()
|
|
9527
9545
|
}),
|
|
9528
|
-
connector: authoringDefinitionSchemas.connector.strict(),
|
|
9546
|
+
connector: authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9529
9547
|
openapi: authoringOpenApiSchema,
|
|
9530
9548
|
agent: authoringDefinitionSchemas.agent.omit({
|
|
9531
9549
|
prompt: true,
|
|
@@ -10253,6 +10271,24 @@ function providerIconAppearance(metadata, position) {
|
|
|
10253
10271
|
}
|
|
10254
10272
|
};
|
|
10255
10273
|
}
|
|
10274
|
+
//#endregion
|
|
10275
|
+
//#region src/flow/common/workflowFile.ts
|
|
10276
|
+
var envelope = strictObject({
|
|
10277
|
+
kind: literal("open-flow-workflow"),
|
|
10278
|
+
version: literal(1),
|
|
10279
|
+
name: string$1().optional(),
|
|
10280
|
+
content: unknown(),
|
|
10281
|
+
presentation: record$2(string$1(), json$4()).optional()
|
|
10282
|
+
});
|
|
10283
|
+
/** Structural decoding only: incomplete drafts are supported, repair is never attempted. */
|
|
10284
|
+
function decodeWorkflowFile(value) {
|
|
10285
|
+
checkJsonDepth(value, -1);
|
|
10286
|
+
const file = envelope.parse(value);
|
|
10287
|
+
return {
|
|
10288
|
+
...file,
|
|
10289
|
+
content: decodeRevisionContent(file.content)
|
|
10290
|
+
};
|
|
10291
|
+
}
|
|
10256
10292
|
new TextEncoder();
|
|
10257
10293
|
//#endregion
|
|
10258
10294
|
//#region src/control/common/providerAccess.ts
|
|
@@ -11620,6 +11656,26 @@ var ControlClient = class {
|
|
|
11620
11656
|
exact(source, ["version"]);
|
|
11621
11657
|
if (source.version != 1) return invalidResponse();
|
|
11622
11658
|
}
|
|
11659
|
+
async exportFlow(flowId) {
|
|
11660
|
+
const value = await this.request(`/v1/flows/${segment(flowId)}/export`);
|
|
11661
|
+
try {
|
|
11662
|
+
return decodeWorkflowFile(value);
|
|
11663
|
+
} catch {
|
|
11664
|
+
return invalidResponse();
|
|
11665
|
+
}
|
|
11666
|
+
}
|
|
11667
|
+
async importFlow(file, options = {}) {
|
|
11668
|
+
return flow$1(await this.request("/v1/flows/import", {
|
|
11669
|
+
method: "POST",
|
|
11670
|
+
headers: { "Idempotency-Key": options.idempotencyKey ?? `flow-${randomId()}` },
|
|
11671
|
+
body: JSON.stringify({
|
|
11672
|
+
file,
|
|
11673
|
+
name: options.name,
|
|
11674
|
+
teamId: options.teamId,
|
|
11675
|
+
version: 1
|
|
11676
|
+
})
|
|
11677
|
+
}));
|
|
11678
|
+
}
|
|
11623
11679
|
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId) {
|
|
11624
11680
|
return flow$1(await this.request("/v1/flows", {
|
|
11625
11681
|
body: JSON.stringify({
|
|
@@ -11631,6 +11687,26 @@ var ControlClient = class {
|
|
|
11631
11687
|
method: "POST"
|
|
11632
11688
|
}));
|
|
11633
11689
|
}
|
|
11690
|
+
async broadcastCanvas(flowId, command) {
|
|
11691
|
+
const source = record(await this.request(`/v1/flows/${segment(flowId)}/canvas`, {
|
|
11692
|
+
method: "POST",
|
|
11693
|
+
body: JSON.stringify({
|
|
11694
|
+
version: 1,
|
|
11695
|
+
command
|
|
11696
|
+
})
|
|
11697
|
+
}));
|
|
11698
|
+
exact(source, [
|
|
11699
|
+
"version",
|
|
11700
|
+
"flowId",
|
|
11701
|
+
"broadcast"
|
|
11702
|
+
]);
|
|
11703
|
+
if (source.version != 1 || source.broadcast !== true || source.flowId !== flowId) return invalidResponse();
|
|
11704
|
+
return {
|
|
11705
|
+
version: 1,
|
|
11706
|
+
flowId: string(source.flowId),
|
|
11707
|
+
broadcast: true
|
|
11708
|
+
};
|
|
11709
|
+
}
|
|
11634
11710
|
async getFlow(flowId) {
|
|
11635
11711
|
return flow$1(await this.request(`/v1/flows/${segment(flowId)}`));
|
|
11636
11712
|
}
|
|
@@ -12179,6 +12255,43 @@ async function rpc(harness, method, params) {
|
|
|
12179
12255
|
return body.result;
|
|
12180
12256
|
}
|
|
12181
12257
|
var mcpConformanceCases = [
|
|
12258
|
+
{
|
|
12259
|
+
name: "shares workflow import and export with REST and preserves idempotency",
|
|
12260
|
+
async verify(harness) {
|
|
12261
|
+
const client = new ControlClient((url, init) => harness.request(new Request(new URL(url, harness.origin), init)));
|
|
12262
|
+
const original = await client.createFlow("Template source");
|
|
12263
|
+
const exported = await rpc(harness, "tools/call", {
|
|
12264
|
+
name: "flow_export",
|
|
12265
|
+
arguments: { flowId: original.flowId }
|
|
12266
|
+
});
|
|
12267
|
+
assert(exported.isError != true, "MCP export failed.");
|
|
12268
|
+
assert(dequal(exported.structuredContent, await client.exportFlow(original.flowId)), "MCP and REST exports differ.");
|
|
12269
|
+
const args = {
|
|
12270
|
+
file: exported.structuredContent,
|
|
12271
|
+
name: "Imported template",
|
|
12272
|
+
idempotencyKey: crypto.randomUUID()
|
|
12273
|
+
};
|
|
12274
|
+
const imported = await rpc(harness, "tools/call", {
|
|
12275
|
+
name: "flow_import",
|
|
12276
|
+
arguments: args
|
|
12277
|
+
});
|
|
12278
|
+
assert(imported.isError != true, "MCP import failed.");
|
|
12279
|
+
const flow = imported.structuredContent;
|
|
12280
|
+
assert(flow.flowId != original.flowId && flow.draftRevisionId != original.draftRevisionId, "Import reused resource identities.");
|
|
12281
|
+
assert((await client.getEditor(flow.flowId)).live.publication == null, "Import published the Flow.");
|
|
12282
|
+
assert(dequal((await rpc(harness, "tools/call", {
|
|
12283
|
+
name: "flow_import",
|
|
12284
|
+
arguments: args
|
|
12285
|
+
})).structuredContent, imported.structuredContent), "Import retry created another Flow.");
|
|
12286
|
+
assert((await rpc(harness, "tools/call", {
|
|
12287
|
+
name: "flow_import",
|
|
12288
|
+
arguments: {
|
|
12289
|
+
...args,
|
|
12290
|
+
name: "Changed import"
|
|
12291
|
+
}
|
|
12292
|
+
})).isError == true, "Changed import must conflict.");
|
|
12293
|
+
}
|
|
12294
|
+
},
|
|
12182
12295
|
{
|
|
12183
12296
|
name: "publishes the public MCP catalog, input schemas and annotations",
|
|
12184
12297
|
async verify(harness) {
|
|
@@ -12314,14 +12427,14 @@ var mutationKey = id.max(256).describe("Stable identity for this mutation. Retry
|
|
|
12314
12427
|
var pageLimit = int().min(1).max(100).default(50);
|
|
12315
12428
|
var flow = id.describe("Exact Flow ID returned by flow_list or flow_create.");
|
|
12316
12429
|
var run = id.describe("Exact Run ID returned by flow_run or run_list.");
|
|
12317
|
-
var mcpInstructions = "Use flow_list, flow_read and flow_search to inspect root workflows. Read node type schemas with flow_schema. Use flow_edit with the observed baseRevision and a stable requestId. Node edits affect only the selected node. Text edits require exactly one match. Execution edges and input sources are independent. Legacy Subflow content is unsupported. Edits can save incomplete drafts; inspect returned diagnostics and use flow_check before running. Use flow_check before flow_run. Select an explicit Trigger node ID and fixed revision or publication. A new Flow has no Trigger until you add one. Before adding a Feishu Trigger, use event_source_list and compare its Connection IDs with connector_connections in the Flow scope. If no source is available, create and verify one in Workbench. Use flow_publish to publish a fixed Revision, then poll flow_publish_status until succeeded or failed. Use flow_live to inspect current online entries after publication. Use flow_set_enabled to enable or disable the observed Live publication. flow_run returns an accepted Run, not its final result. Find Runs with run_list, poll run_get and use run_result after terminal. Resolve a waiting Run only with an explicit run_resolve_wait action allowed by run_get. Use run_results and run_result_read to inspect stored Agent tool results; these are separate from the terminal Run result. Retry flow_edit with identical arguments and the same requestId. Retry flow_create, flow_publish and flow_run only with identical arguments and the same idempotencyKey; a new key can execute the Flow again. Other mutations use the same resource identity and arguments when retrying. Cancel a Run explicitly with run_cancel. Use nextCursor and nextAfter to read subsequent pages. Connector-backed deployments may require a Team; inspect connector_teams before creating a Flow.";
|
|
12318
|
-
function tool(description, schema, readOnly) {
|
|
12430
|
+
var mcpInstructions = "Use flow_list, flow_read and flow_search to inspect root workflows. Read node type schemas with flow_schema. Use flow_edit with the observed baseRevision and a stable requestId. Node edits affect only the selected node. Text edits require exactly one match. Execution edges and input sources are independent. Legacy Subflow content is unsupported. Edits can save incomplete drafts; inspect returned diagnostics and use flow_check before running. Use flow_check before flow_run. Select an explicit Trigger node ID and fixed revision or publication. A new Flow has no Trigger until you add one. Before adding a Feishu Trigger, use event_source_list and compare its Connection IDs with connector_connections in the Flow scope. If no source is available, create and verify one in Workbench. Use flow_publish to publish a fixed Revision, then poll flow_publish_status until succeeded or failed. Use flow_live to inspect current online entries after publication. Use flow_set_enabled to enable or disable the observed Live publication. flow_run returns an accepted Run, not its final result. Find Runs with run_list, poll run_get and use run_result after terminal. Resolve a waiting Run only with an explicit run_resolve_wait action allowed by run_get. Use run_results and run_result_read to inspect stored Agent tool results; these are separate from the terminal Run result. Retry flow_edit with identical arguments and the same requestId. Retry flow_create, flow_import, flow_publish and flow_run only with identical arguments and the same idempotencyKey; a new key can execute the Flow again. Canvas commands are transient broadcasts without execution confirmation; never automatically retry flow_canvas because pan is relative. Other mutations use the same resource identity and arguments when retrying. Cancel a Run explicitly with run_cancel. Use nextCursor and nextAfter to read subsequent pages. Connector-backed deployments may require a Team; inspect connector_teams before creating a Flow.";
|
|
12431
|
+
function tool(description, schema, readOnly, idempotent = true) {
|
|
12319
12432
|
return {
|
|
12320
12433
|
description,
|
|
12321
12434
|
annotations: {
|
|
12322
12435
|
readOnlyHint: readOnly,
|
|
12323
12436
|
destructiveHint: !readOnly,
|
|
12324
|
-
idempotentHint:
|
|
12437
|
+
idempotentHint: idempotent,
|
|
12325
12438
|
openWorldHint: true
|
|
12326
12439
|
},
|
|
12327
12440
|
inputSchema: { "~standard": {
|
|
@@ -12342,6 +12455,10 @@ function tool(description, schema, readOnly) {
|
|
|
12342
12455
|
};
|
|
12343
12456
|
}
|
|
12344
12457
|
var mcpTools = {
|
|
12458
|
+
flow_canvas: tool("Broadcast a transient canvas command to connected Workbenches viewing this Flow. Success only confirms Server broadcast, not delivery or execution. No replay, session selection or Presentation save. Pan uses screen pixels (positive right/down); zoom is an absolute ratio (0.1–3); fit includes all nodes. Repeating pan moves again.", strictObject({
|
|
12459
|
+
flowId: flow,
|
|
12460
|
+
command: canvasCommandSchema
|
|
12461
|
+
}), false, false),
|
|
12345
12462
|
flow_live: tool("Read the current published Flow, enablement and online entries, including Webhook URLs and request fields. Draft changes do not affect this view. An unpublished Flow returns not-published with no entries.", strictObject({ flowId: flow }), true),
|
|
12346
12463
|
flow_list: tool("List Flows in this deployment. Continue with nextCursor; cursors are compatible with the Control API.", strictObject({
|
|
12347
12464
|
cursor: id.optional(),
|
|
@@ -12350,6 +12467,13 @@ var mcpTools = {
|
|
|
12350
12467
|
flow_read: tool("Read an outline, selected node details, or a bounded code/prompt excerpt. Carry the returned revision into subsequent reads and edits.", authoringReadSchema.safeExtend({ flowId: flow }).meta({ ...authoringReadSchema.meta() }), true),
|
|
12351
12468
|
flow_search: tool("Find nodes by name, configuration or source text in a fixed Revision. Follow nextOffset for more matches.", authoringSearchSchema.extend({ flowId: flow }), true),
|
|
12352
12469
|
flow_schema: tool("Read node configuration schemas and the edit grammar, or an Action contract. Action lookup requires a flowId.", authoringSchemaQuery.safeExtend({ flowId: flow.optional() }), true),
|
|
12470
|
+
flow_export: tool("Export the current draft as a shareable workflow JSON file. Structured external references are cleared. Literal secrets in code, prompts or business JSON remain; review before sharing.", strictObject({ flowId: flow }), true),
|
|
12471
|
+
flow_import: tool("Import workflow JSON as a new unpublished draft. External references are cleared and must be configured again. Keep identical arguments and idempotencyKey when retrying.", strictObject({
|
|
12472
|
+
file: json,
|
|
12473
|
+
name: id.optional(),
|
|
12474
|
+
teamId: id.optional(),
|
|
12475
|
+
idempotencyKey: mutationKey
|
|
12476
|
+
}), false),
|
|
12353
12477
|
flow_create: tool("Create an empty Flow. If this deployment uses OOMOL Connector, choose a teamId from connector_teams. Keep the key and arguments stable when retrying.", strictObject({
|
|
12354
12478
|
name: id.refine((name) => name == name.trim() && resourceNameIssue(name) == null, "Flow name is invalid."),
|
|
12355
12479
|
idempotencyKey: mutationKey,
|
package/dist/common/openapi.js
CHANGED
|
@@ -6801,7 +6801,8 @@ var managedFields = object$1({
|
|
|
6801
6801
|
object$1({
|
|
6802
6802
|
kind: literal("connector"),
|
|
6803
6803
|
action: text,
|
|
6804
|
-
connectionId: text.optional()
|
|
6804
|
+
connectionId: text.optional(),
|
|
6805
|
+
outputMode: literal("value").optional()
|
|
6805
6806
|
}),
|
|
6806
6807
|
object$1({
|
|
6807
6808
|
kind: literal("openapi"),
|
|
@@ -8186,10 +8187,10 @@ function compileEnumAndConst(context, enumList, constValue, schema) {
|
|
|
8186
8187
|
}
|
|
8187
8188
|
if (compiledEnum.length === 0) recordWarn(context, "all of elements from list is rejected by currently schema object", "enum");
|
|
8188
8189
|
}
|
|
8189
|
-
if (constValue && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
|
|
8190
|
+
if (constValue !== void 0 && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
|
|
8190
8191
|
if (compiledEnum) {
|
|
8191
8192
|
if (compiledEnum.length === 0) isNever = true;
|
|
8192
|
-
else if (constValue) {
|
|
8193
|
+
else if (constValue !== void 0) {
|
|
8193
8194
|
let foundEquals = false;
|
|
8194
8195
|
for (const enumValue of compiledEnum) if (isDeepEquals(enumValue, constValue)) {
|
|
8195
8196
|
foundEquals = true;
|
|
@@ -8202,7 +8203,7 @@ function compileEnumAndConst(context, enumList, constValue, schema) {
|
|
|
8202
8203
|
const compiledSchema = {};
|
|
8203
8204
|
if (schema.type) compiledSchema.type = schema.type;
|
|
8204
8205
|
if (compiledEnum) compiledSchema.enum = compiledEnum;
|
|
8205
|
-
if (constValue) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
|
|
8206
|
+
if (constValue !== void 0) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
|
|
8206
8207
|
return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
|
|
8207
8208
|
}
|
|
8208
8209
|
//#endregion
|
|
@@ -8597,7 +8598,7 @@ function compileSchema(context, schema) {
|
|
|
8597
8598
|
let targetSchema = schema;
|
|
8598
8599
|
let shouldHandleEnumAndConst = false;
|
|
8599
8600
|
const { enum: enumList, const: constValue } = schema;
|
|
8600
|
-
if (enumList || constValue) {
|
|
8601
|
+
if (enumList || constValue !== void 0) {
|
|
8601
8602
|
const { enum: _0, const: _1, ...rest } = schema;
|
|
8602
8603
|
targetSchema = rest;
|
|
8603
8604
|
shouldHandleEnumAndConst = true;
|
|
@@ -9187,7 +9188,7 @@ function schemaEqualsChecker(extendsContext) {
|
|
|
9187
9188
|
}
|
|
9188
9189
|
function isValueEquals(value1, value2) {
|
|
9189
9190
|
if (value1 === value2) return true;
|
|
9190
|
-
if (value1 === null) return false;
|
|
9191
|
+
if (value1 === null || value2 === null) return false;
|
|
9191
9192
|
if (typeof value1 !== "object") return false;
|
|
9192
9193
|
if (typeof value1 !== typeof value2) return false;
|
|
9193
9194
|
if (isCompiledSchema(value1) && isCompiledSchema(value2)) return isCompiledSchemaEquals(value1, value2);
|
|
@@ -9753,7 +9754,7 @@ function findMismatchPath(source, target) {
|
|
|
9753
9754
|
if ((sourceSchema.maxProperties ?? Number.POSITIVE_INFINITY) > (targetSchema.maxProperties ?? Number.POSITIVE_INFINITY)) return [...targetPath, "maxProperties"];
|
|
9754
9755
|
break;
|
|
9755
9756
|
}
|
|
9756
|
-
case CompiledKind.EnumOrConst: return [...targetPath, targetSchema.const
|
|
9757
|
+
case CompiledKind.EnumOrConst: return [...targetPath, targetSchema.const === void 0 ? "enum" : "const"];
|
|
9757
9758
|
}
|
|
9758
9759
|
return targetPath;
|
|
9759
9760
|
}
|
|
@@ -6808,7 +6808,8 @@ var managedFields = object({
|
|
|
6808
6808
|
object({
|
|
6809
6809
|
kind: literal("connector"),
|
|
6810
6810
|
action: text,
|
|
6811
|
-
connectionId: text.optional()
|
|
6811
|
+
connectionId: text.optional(),
|
|
6812
|
+
outputMode: literal("value").optional()
|
|
6812
6813
|
}),
|
|
6813
6814
|
object({
|
|
6814
6815
|
kind: literal("openapi"),
|
|
@@ -8193,10 +8194,10 @@ function compileEnumAndConst(context, enumList, constValue, schema) {
|
|
|
8193
8194
|
}
|
|
8194
8195
|
if (compiledEnum.length === 0) recordWarn(context, "all of elements from list is rejected by currently schema object", "enum");
|
|
8195
8196
|
}
|
|
8196
|
-
if (constValue && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
|
|
8197
|
+
if (constValue !== void 0 && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
|
|
8197
8198
|
if (compiledEnum) {
|
|
8198
8199
|
if (compiledEnum.length === 0) isNever = true;
|
|
8199
|
-
else if (constValue) {
|
|
8200
|
+
else if (constValue !== void 0) {
|
|
8200
8201
|
let foundEquals = false;
|
|
8201
8202
|
for (const enumValue of compiledEnum) if (isDeepEquals(enumValue, constValue)) {
|
|
8202
8203
|
foundEquals = true;
|
|
@@ -8209,7 +8210,7 @@ function compileEnumAndConst(context, enumList, constValue, schema) {
|
|
|
8209
8210
|
const compiledSchema = {};
|
|
8210
8211
|
if (schema.type) compiledSchema.type = schema.type;
|
|
8211
8212
|
if (compiledEnum) compiledSchema.enum = compiledEnum;
|
|
8212
|
-
if (constValue) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
|
|
8213
|
+
if (constValue !== void 0) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
|
|
8213
8214
|
return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
|
|
8214
8215
|
}
|
|
8215
8216
|
//#endregion
|
|
@@ -8604,7 +8605,7 @@ function compileSchema(context, schema) {
|
|
|
8604
8605
|
let targetSchema = schema;
|
|
8605
8606
|
let shouldHandleEnumAndConst = false;
|
|
8606
8607
|
const { enum: enumList, const: constValue } = schema;
|
|
8607
|
-
if (enumList || constValue) {
|
|
8608
|
+
if (enumList || constValue !== void 0) {
|
|
8608
8609
|
const { enum: _0, const: _1, ...rest } = schema;
|
|
8609
8610
|
targetSchema = rest;
|
|
8610
8611
|
shouldHandleEnumAndConst = true;
|
|
@@ -9194,7 +9195,7 @@ function schemaEqualsChecker(extendsContext) {
|
|
|
9194
9195
|
}
|
|
9195
9196
|
function isValueEquals(value1, value2) {
|
|
9196
9197
|
if (value1 === value2) return true;
|
|
9197
|
-
if (value1 === null) return false;
|
|
9198
|
+
if (value1 === null || value2 === null) return false;
|
|
9198
9199
|
if (typeof value1 !== "object") return false;
|
|
9199
9200
|
if (typeof value1 !== typeof value2) return false;
|
|
9200
9201
|
if (isCompiledSchema(value1) && isCompiledSchema(value2)) return isCompiledSchemaEquals(value1, value2);
|
|
@@ -9760,7 +9761,7 @@ function findMismatchPath(source, target) {
|
|
|
9760
9761
|
if ((sourceSchema.maxProperties ?? Number.POSITIVE_INFINITY) > (targetSchema.maxProperties ?? Number.POSITIVE_INFINITY)) return [...targetPath, "maxProperties"];
|
|
9761
9762
|
break;
|
|
9762
9763
|
}
|
|
9763
|
-
case CompiledKind.EnumOrConst: return [...targetPath, targetSchema.const
|
|
9764
|
+
case CompiledKind.EnumOrConst: return [...targetPath, targetSchema.const === void 0 ? "enum" : "const"];
|
|
9764
9765
|
}
|
|
9765
9766
|
return targetPath;
|
|
9766
9767
|
}
|
|
@@ -398,7 +398,7 @@ export default () => fs.readFileSync('/etc/passwd', 'utf8')`)
|
|
|
398
398
|
program: program(harness, `export default async (_input, context) => ({ available: typeof context.outputs, previous: await context.getPrevious(), value: 1 })`)
|
|
399
399
|
}), {
|
|
400
400
|
available: "undefined",
|
|
401
|
-
previous:
|
|
401
|
+
previous: [],
|
|
402
402
|
value: 1
|
|
403
403
|
}, "Final Task outputs");
|
|
404
404
|
}
|
|
@@ -9,6 +9,8 @@ export interface WaitResolution {
|
|
|
9
9
|
readonly resolvedAt: string;
|
|
10
10
|
readonly comment: string | null;
|
|
11
11
|
}
|
|
12
|
+
export declare class PortValidationError extends Error {
|
|
13
|
+
}
|
|
12
14
|
export type SchedulerEvent = {
|
|
13
15
|
readonly flowId: string;
|
|
14
16
|
readonly parentJobId?: string;
|
|
@@ -103,6 +105,24 @@ export interface WaitHost {
|
|
|
103
105
|
readonly resolutions: (waitIds: readonly string[], block: boolean) => Effect.Effect<Readonly<Record<string, WaitResolution>>, Error>;
|
|
104
106
|
}
|
|
105
107
|
export declare const waitRetentionMs = 120000;
|
|
108
|
+
export interface DependenciesCheckpoint {
|
|
109
|
+
nextId: number;
|
|
110
|
+
iterations: Record<string, number>;
|
|
111
|
+
nodes: Record<string, DependencyState>;
|
|
112
|
+
}
|
|
113
|
+
interface DependencyState {
|
|
114
|
+
id: number;
|
|
115
|
+
status: 'pending' | 'running' | 'completed' | 'skipped';
|
|
116
|
+
input: Record<string, {
|
|
117
|
+
readonly execution: number;
|
|
118
|
+
readonly outputs: Readonly<Record<string, JsonValue>>;
|
|
119
|
+
}>;
|
|
120
|
+
output?: Readonly<Record<string, JsonValue>>;
|
|
121
|
+
previous: string[];
|
|
122
|
+
released: string[];
|
|
123
|
+
jobId?: string;
|
|
124
|
+
seeded: boolean;
|
|
125
|
+
}
|
|
106
126
|
export interface FlowRunCheckpoint {
|
|
107
127
|
readonly bindingValues: Readonly<Record<string, string>>;
|
|
108
128
|
readonly inputs: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
|
|
@@ -111,7 +131,7 @@ export interface FlowRunCheckpoint {
|
|
|
111
131
|
readonly outputs: Readonly<Record<string, JsonValue>>;
|
|
112
132
|
}>>;
|
|
113
133
|
readonly counts: Readonly<Record<string, Readonly<Record<string, number>>>>;
|
|
114
|
-
readonly
|
|
134
|
+
readonly dependencies: DependenciesCheckpoint;
|
|
115
135
|
readonly version: 5;
|
|
116
136
|
readonly waits: readonly PendingWait[];
|
|
117
137
|
readonly agents: Readonly<Record<string, {
|
|
@@ -143,7 +163,7 @@ interface TaskInvocationBase {
|
|
|
143
163
|
export type TaskInvocation = TaskInvocationBase & ({
|
|
144
164
|
readonly capabilities: readonly ConnectorCapability[];
|
|
145
165
|
readonly moduleId: string;
|
|
146
|
-
readonly getPrevious: () => PreviousNode
|
|
166
|
+
readonly getPrevious: () => readonly PreviousNode[];
|
|
147
167
|
} | {
|
|
148
168
|
readonly kind: 'managed';
|
|
149
169
|
});
|