@oomol-lab/open-flow 0.1.0-beta.69 → 0.1.0-beta.70
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/{ContentIcon-CsECY5id.js → ContentIcon-CUQHjQIw.js} +16 -8
- package/dist/browser/{FlowCanvas-C5X22xQ7.js → FlowCanvas-CqtUDPGj.js} +11 -26
- package/dist/browser/{createResourceDialog-Di5BBrQv.js → createResourceDialog-BAHYW9yu.js} +3 -3
- package/dist/browser/{dialog-Bjo-r9B0.js → dialog-DcGOzUP2.js} +162 -12
- package/dist/browser/{exportSvg-Cj6Spxx-.js → exportSvg-Dv5Qgrq7.js} +2 -2
- package/dist/browser/flow-authoring.js +95 -12
- package/dist/browser/flow-change-schema.d.ts +24 -1
- package/dist/browser/flow-change.d.ts +33 -4
- package/dist/browser/flow-change.js +96 -13
- package/dist/browser/{flowChanges-Dp-rcEJ6.js → flowChanges-CYyehKer.js} +2593 -2254
- package/dist/browser/{flowWorkspace-CB1QACku.js → flowWorkspace-qYUZPJHR.js} +1114 -392
- package/dist/browser/preview.css +225 -221
- package/dist/browser/preview.js +3781 -2655
- package/dist/browser/{tooltip-CJjYs_2I.js → tooltip-wZJRB9oP.js} +28 -1
- package/dist/browser/ui.css +8 -20
- package/dist/browser/workbench.css +225 -221
- package/dist/browser/workbench.js +31 -10
- package/dist/browser/{workbenchSelect-C3hxUcYm.js → workbenchSelect-D8_vP2p5.js} +2 -2
- package/dist/command/index.js +45 -45
- package/dist/common/authoring.d.ts +3 -3
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +37 -374
- package/dist/common/control-api-conformance.js +151 -55
- package/dist/common/control-api.d.ts +12 -78
- package/dist/common/control-api.js +162 -39
- package/dist/common/control-requests.d.ts +3 -3
- package/dist/common/control-requests.js +221 -35
- package/dist/common/decision.js +85 -7
- package/dist/common/engine-contract.d.ts +4 -2
- package/dist/common/flow-encoding.js +110 -14
- package/dist/common/flow-graph.d.ts +3 -0
- package/dist/common/flow-semantics.js +273 -14
- package/dist/common/integration-trigger.js +85 -7
- package/dist/common/liveDetails.d.ts +15 -0
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +134 -38
- package/dist/common/openapi.js +85 -7
- package/dist/common/poll-trigger.js +85 -7
- package/dist/common/run-events.d.ts +2 -0
- package/dist/common/run-events.js +59 -2
- package/dist/common/runtime-contract.js +14 -4
- package/dist/common/scheduler.d.ts +6 -2
- package/dist/common/scheduler.js +178 -11
- package/dist/common/webhook-response.d.ts +43 -0
- package/dist/common/webhook-trigger.d.ts +12 -0
- package/dist/common/webhook-trigger.js +236 -9
- package/dist/common/workflow.js +85 -7
- package/package.json +1 -1
- package/skills/open-flow/references/flow-authoring.md +15 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/execution/common/engineContract.ts
|
|
2
|
-
var currentEngineContract = "open-flow-engine/
|
|
2
|
+
var currentEngineContract = "open-flow-engine/v7";
|
|
3
3
|
`${JSON.stringify(currentEngineContract)}`, new Set([
|
|
4
4
|
"assert",
|
|
5
5
|
"assert/strict",
|
|
@@ -25,7 +25,7 @@ var currentEngineContract = "open-flow-engine/v6";
|
|
|
25
25
|
"url",
|
|
26
26
|
"util",
|
|
27
27
|
"zlib"
|
|
28
|
-
].flatMap((name) => [name, `node:${name}`])), `${JSON.stringify("open-flow-engine/
|
|
28
|
+
].flatMap((name) => [name, `node:${name}`])), `${JSON.stringify("open-flow-engine/v7/nodejs-compat-v1")}`;
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/lite/index.mjs
|
|
31
31
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1072,7 +1072,7 @@ function timeSource(args) {
|
|
|
1072
1072
|
function time(args) {
|
|
1073
1073
|
return new RegExp(`^${timeSource(args)}$`);
|
|
1074
1074
|
}
|
|
1075
|
-
function datetime(args) {
|
|
1075
|
+
function datetime$1(args) {
|
|
1076
1076
|
const opts = ["Z"];
|
|
1077
1077
|
if (args.offset) opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
|
|
1078
1078
|
const qualified = `${timeSource({
|
|
@@ -1723,7 +1723,7 @@ var $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
|
|
|
1723
1723
|
$ZodStringFormat.init(inst, def);
|
|
1724
1724
|
});
|
|
1725
1725
|
var $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
|
|
1726
|
-
def.pattern ?? (def.pattern = datetime(def));
|
|
1726
|
+
def.pattern ?? (def.pattern = datetime$1(def));
|
|
1727
1727
|
$ZodStringFormat.init(inst, def);
|
|
1728
1728
|
});
|
|
1729
1729
|
var $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
|
|
@@ -5720,6 +5720,11 @@ function preprocess(fn, schema) {
|
|
|
5720
5720
|
});
|
|
5721
5721
|
}
|
|
5722
5722
|
//#endregion
|
|
5723
|
+
//#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/iso.js
|
|
5724
|
+
function datetime(params) {
|
|
5725
|
+
return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
|
|
5726
|
+
}
|
|
5727
|
+
//#endregion
|
|
5723
5728
|
//#region src/openapi/common/authBindings.ts
|
|
5724
5729
|
/** Never allow credentials to enter a Revision as literal node inputs. */
|
|
5725
5730
|
function assertOpenApiAuthBindings(document) {
|
|
@@ -5852,6 +5857,33 @@ var triggerScheduleSchema = array(union([object({
|
|
|
5852
5857
|
value: number()
|
|
5853
5858
|
})]));
|
|
5854
5859
|
//#endregion
|
|
5860
|
+
//#region src/localization/common/timeZone.ts
|
|
5861
|
+
/** Validate a named timezone using the same runtime data used for date conversion. */
|
|
5862
|
+
function isTimeZone(value) {
|
|
5863
|
+
try {
|
|
5864
|
+
Intl.DateTimeFormat("en", { timeZone: value });
|
|
5865
|
+
return true;
|
|
5866
|
+
} catch {
|
|
5867
|
+
return false;
|
|
5868
|
+
}
|
|
5869
|
+
}
|
|
5870
|
+
//#endregion
|
|
5871
|
+
//#region src/flow/common/wait.ts
|
|
5872
|
+
/** Drafts retain incomplete values; semantic validation gates publication and execution. */
|
|
5873
|
+
var waitAutoContinueDraftSchema = discriminatedUnion("kind", [strictObject({
|
|
5874
|
+
kind: literal("after"),
|
|
5875
|
+
durationMs: number().nullable()
|
|
5876
|
+
}), strictObject({
|
|
5877
|
+
kind: literal("at"),
|
|
5878
|
+
at: string$1(),
|
|
5879
|
+
timezone: string$1().optional()
|
|
5880
|
+
})]);
|
|
5881
|
+
/** Static business configuration; the deployment owns the allowed wait lifetime. */
|
|
5882
|
+
var waitAutoContinueSchema = discriminatedUnion("kind", [waitAutoContinueDraftSchema.options[0].extend({ durationMs: number().int().positive().max(Number.MAX_SAFE_INTEGER) }), waitAutoContinueDraftSchema.options[1].extend({
|
|
5883
|
+
at: datetime({ offset: true }),
|
|
5884
|
+
timezone: string$1().refine(isTimeZone, "Select a valid IANA timezone.").optional()
|
|
5885
|
+
})]);
|
|
5886
|
+
//#endregion
|
|
5855
5887
|
//#region src/flow/common/webhookMethod.ts
|
|
5856
5888
|
var webhookMethods = [
|
|
5857
5889
|
"GET",
|
|
@@ -5863,6 +5895,44 @@ var webhookMethods = [
|
|
|
5863
5895
|
function webhookSupportsBody(method) {
|
|
5864
5896
|
return method !== "GET";
|
|
5865
5897
|
}
|
|
5898
|
+
//#endregion
|
|
5899
|
+
//#region src/flow/common/webhookResponse.ts
|
|
5900
|
+
var webhookResponseTimeout = {
|
|
5901
|
+
defaultMs: 3e4,
|
|
5902
|
+
minMs: 1e3,
|
|
5903
|
+
maxMs: 6e4
|
|
5904
|
+
};
|
|
5905
|
+
/** Fixed inputs belong to the node, not author-supplied definitions. */
|
|
5906
|
+
var webhookResponseInputs = [
|
|
5907
|
+
{
|
|
5908
|
+
handle: "body",
|
|
5909
|
+
jsonSchema: {},
|
|
5910
|
+
nullable: true,
|
|
5911
|
+
value: ""
|
|
5912
|
+
},
|
|
5913
|
+
{
|
|
5914
|
+
handle: "statusCode",
|
|
5915
|
+
jsonSchema: { type: "number" },
|
|
5916
|
+
nullable: false,
|
|
5917
|
+
value: 200
|
|
5918
|
+
},
|
|
5919
|
+
{
|
|
5920
|
+
handle: "headers",
|
|
5921
|
+
jsonSchema: {
|
|
5922
|
+
jsonSchema: {
|
|
5923
|
+
type: "object",
|
|
5924
|
+
additionalProperties: { type: [
|
|
5925
|
+
"string",
|
|
5926
|
+
"number",
|
|
5927
|
+
"boolean"
|
|
5928
|
+
] }
|
|
5929
|
+
},
|
|
5930
|
+
nullable: true
|
|
5931
|
+
}.jsonSchema,
|
|
5932
|
+
nullable: false,
|
|
5933
|
+
value: {}
|
|
5934
|
+
}
|
|
5935
|
+
];
|
|
5866
5936
|
var text = string$1();
|
|
5867
5937
|
var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
|
|
5868
5938
|
var json$2 = json$3();
|
|
@@ -6090,9 +6160,24 @@ var webhookOptions = object({
|
|
|
6090
6160
|
allowedMethods: never().optional(),
|
|
6091
6161
|
allowedOrigins: strings$1.optional(),
|
|
6092
6162
|
noResponseBody: never().optional(),
|
|
6163
|
+
responseBody: discriminatedUnion("kind", [strictObject({
|
|
6164
|
+
kind: literal("workflow-outputs"),
|
|
6165
|
+
output: text.optional(),
|
|
6166
|
+
timeoutMs: number().int().min(webhookResponseTimeout.minMs).max(webhookResponseTimeout.maxMs).optional()
|
|
6167
|
+
}), strictObject({
|
|
6168
|
+
kind: literal("webhook-response"),
|
|
6169
|
+
nodeId: text.optional(),
|
|
6170
|
+
timeoutMs: number().int().min(webhookResponseTimeout.minMs).max(webhookResponseTimeout.maxMs).optional()
|
|
6171
|
+
})]).optional(),
|
|
6093
6172
|
responseData: text.optional(),
|
|
6094
6173
|
responseHeaders: record$2(text, text).optional(),
|
|
6095
|
-
|
|
6174
|
+
responseHeadersSource: strictObject({
|
|
6175
|
+
kind: literal("workflow-outputs"),
|
|
6176
|
+
output: text.optional()
|
|
6177
|
+
}).optional(),
|
|
6178
|
+
responseHeaderOutputs: record$2(text, text).optional(),
|
|
6179
|
+
responseStatusCode: number().int().min(200).max(599).optional(),
|
|
6180
|
+
responseStatusCodeOutput: text.optional()
|
|
6096
6181
|
});
|
|
6097
6182
|
var webhook = {
|
|
6098
6183
|
bodyFields: array(input),
|
|
@@ -6147,6 +6232,12 @@ var base = {
|
|
|
6147
6232
|
onError: _enum(["stop", "error"]).optional()
|
|
6148
6233
|
};
|
|
6149
6234
|
var node = union([
|
|
6235
|
+
strictObject({
|
|
6236
|
+
...base,
|
|
6237
|
+
kind: literal("webhook-response"),
|
|
6238
|
+
retry: never().optional(),
|
|
6239
|
+
onError: never().optional()
|
|
6240
|
+
}),
|
|
6150
6241
|
strictObject({
|
|
6151
6242
|
...base,
|
|
6152
6243
|
kind: literal("outputs"),
|
|
@@ -6179,7 +6270,8 @@ var node = union([
|
|
|
6179
6270
|
strictObject({
|
|
6180
6271
|
...base,
|
|
6181
6272
|
kind: literal("wait"),
|
|
6182
|
-
...wait
|
|
6273
|
+
...wait,
|
|
6274
|
+
autoContinue: waitAutoContinueDraftSchema.optional()
|
|
6183
6275
|
}).omit({ timeoutMs: true }),
|
|
6184
6276
|
object({
|
|
6185
6277
|
...trigger,
|
|
@@ -6235,6 +6327,7 @@ var authoringDefinitionSchemas = {
|
|
|
6235
6327
|
ports: ports$1,
|
|
6236
6328
|
condition: strictObject(condition),
|
|
6237
6329
|
wait: strictObject(wait),
|
|
6330
|
+
waitAutoContinue: waitAutoContinueSchema,
|
|
6238
6331
|
webhook: strictObject(webhook),
|
|
6239
6332
|
schedule: triggerScheduleSchema,
|
|
6240
6333
|
capabilities: array(capability),
|
|
@@ -6281,7 +6374,8 @@ var revision = object({
|
|
|
6281
6374
|
literal(6),
|
|
6282
6375
|
literal(7),
|
|
6283
6376
|
literal(8),
|
|
6284
|
-
literal(9)
|
|
6377
|
+
literal(9),
|
|
6378
|
+
literal(10)
|
|
6285
6379
|
]),
|
|
6286
6380
|
document,
|
|
6287
6381
|
modules: record$2(text, module)
|
|
@@ -6414,8 +6508,14 @@ var shapes = {
|
|
|
6414
6508
|
},
|
|
6415
6509
|
"graph.node.resolution.set": {
|
|
6416
6510
|
...at,
|
|
6417
|
-
before:
|
|
6418
|
-
|
|
6511
|
+
before: strictObject({
|
|
6512
|
+
...wait,
|
|
6513
|
+
autoContinue: waitAutoContinueDraftSchema.optional()
|
|
6514
|
+
}),
|
|
6515
|
+
value: strictObject({
|
|
6516
|
+
...wait,
|
|
6517
|
+
autoContinue: waitAutoContinueDraftSchema.optional()
|
|
6518
|
+
})
|
|
6419
6519
|
},
|
|
6420
6520
|
"graph.node.webhook.set": {
|
|
6421
6521
|
...at,
|
|
@@ -6476,12 +6576,14 @@ array(union([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, sha
|
|
|
6476
6576
|
...shape
|
|
6477
6577
|
})])).values()])).min(1);
|
|
6478
6578
|
function checkModelVersion(content) {
|
|
6579
|
+
if (content.modelVersion < 10 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "webhook" && (candidateNode.options?.responseBody != null || candidateNode.options?.responseStatusCodeOutput != null || candidateNode.options?.responseHeadersSource != null || candidateNode.options?.responseHeaderOutputs != null))) throw new TypeError("Dynamic Webhook responses require Flow model version 10.");
|
|
6479
6580
|
if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => "retry" in candidateNode && candidateNode.retry != null)) throw new TypeError("Node retries require Flow model version 9.");
|
|
6480
6581
|
if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => {
|
|
6481
6582
|
if (candidateNode.onError != null) return true;
|
|
6482
6583
|
if ([...Object.values("inputs" in candidateNode ? candidateNode.inputs : {}), ...Object.values(candidateNode.kind == "outputs" ? candidateNode.outputMappings : {})].some((candidateMapping) => candidateMapping.kind == "sources" && candidateMapping.sources.some((candidateSource) => candidateSource.kind == "node" && candidateSource.system))) return true;
|
|
6483
6584
|
return candidateNode.kind == "condition" && candidateNode.cases.some((item) => item.groups.some((candidateGroup) => candidateGroup.expressions.some((expression) => [expression.left, expression.right].some((candidateOperand) => candidateOperand?.kind == "source" && candidateOperand.source.kind == "node" && candidateOperand.source.system))));
|
|
6484
6585
|
})) throw new TypeError("Node error handling requires Flow model version 9.");
|
|
6586
|
+
if (content.modelVersion < 10 && Object.values(content.document.graph.nodes).some((candidate) => candidate.kind === "webhook-response")) throw new TypeError("Webhook response nodes require Flow model version 10.");
|
|
6485
6587
|
if (content.modelVersion < 8 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "outputs")) throw new TypeError("Workflow outputs require Flow model version 8.");
|
|
6486
6588
|
if (content.modelVersion < 7 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "start")) throw new TypeError("Start Triggers require Flow model version 7.");
|
|
6487
6589
|
if (content.modelVersion < 6 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task)) throw new TypeError("Node-owned managed Tasks require Flow model version 6.");
|
|
@@ -9365,6 +9467,7 @@ var patch = record$2(id$1, json$1);
|
|
|
9365
9467
|
var type = _enum([
|
|
9366
9468
|
"start",
|
|
9367
9469
|
"outputs",
|
|
9470
|
+
"webhook-response",
|
|
9368
9471
|
"workflow",
|
|
9369
9472
|
"webhook",
|
|
9370
9473
|
"cron",
|
|
@@ -9468,29 +9571,30 @@ var when = union([
|
|
|
9468
9571
|
strictObject({ any: array(union([expression, all])) })
|
|
9469
9572
|
]);
|
|
9470
9573
|
var authoringConfigurations = {
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9574
|
+
"webhook-response": strictObject({}),
|
|
9575
|
+
"workflow": strictObject({ flowId: id$1 }),
|
|
9576
|
+
"start": strictObject({ inputDefs: flowInputFields.default({}) }),
|
|
9577
|
+
"outputs": strictObject({ outputDefs: flowOutputFields.default({}) }),
|
|
9578
|
+
"error": strictObject({ sourceFlowIds: array(id$1).optional() }),
|
|
9579
|
+
"webhook": authoringDefinitionSchemas.webhook.omit({ bodyFields: true }).extend({ body: inputFields }).strict(),
|
|
9580
|
+
"cron": strictObject({ schedule: authoringDefinitionSchemas.schedule }),
|
|
9581
|
+
"poll": strictObject({
|
|
9478
9582
|
key: id$1,
|
|
9479
9583
|
connectionId: id$1.optional(),
|
|
9480
9584
|
schedule: authoringDefinitionSchemas.schedule
|
|
9481
9585
|
}),
|
|
9482
|
-
integration: strictObject({
|
|
9586
|
+
"integration": strictObject({
|
|
9483
9587
|
key: id$1,
|
|
9484
9588
|
connectionId: id$1.optional()
|
|
9485
9589
|
}),
|
|
9486
|
-
code: strictObject({
|
|
9590
|
+
"code": strictObject({
|
|
9487
9591
|
inputs: inputFields,
|
|
9488
9592
|
outputs: outputFields,
|
|
9489
9593
|
capabilities: authoringDefinitionSchemas.capabilities.optional()
|
|
9490
9594
|
}),
|
|
9491
|
-
connector: authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9492
|
-
openapi: authoringOpenApiSchema,
|
|
9493
|
-
agent: authoringDefinitionSchemas.agent.omit({
|
|
9595
|
+
"connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9596
|
+
"openapi": authoringOpenApiSchema,
|
|
9597
|
+
"agent": authoringDefinitionSchemas.agent.omit({
|
|
9494
9598
|
prompt: true,
|
|
9495
9599
|
tools: true
|
|
9496
9600
|
}).extend({
|
|
@@ -9499,9 +9603,9 @@ var authoringConfigurations = {
|
|
|
9499
9603
|
tools: array(agentTool),
|
|
9500
9604
|
notification: notification.optional()
|
|
9501
9605
|
}).strict(),
|
|
9502
|
-
llm: authoringLlmConfiguration.extend({ inputs: inputFields }),
|
|
9503
|
-
decision: authoringDefinitionSchemas.decision,
|
|
9504
|
-
condition: strictObject({
|
|
9606
|
+
"llm": authoringLlmConfiguration.extend({ inputs: inputFields }),
|
|
9607
|
+
"decision": authoringDefinitionSchemas.decision,
|
|
9608
|
+
"condition": strictObject({
|
|
9505
9609
|
match: _enum(["first", "all"]),
|
|
9506
9610
|
branches: array(strictObject({
|
|
9507
9611
|
name: id$1,
|
|
@@ -9509,12 +9613,15 @@ var authoringConfigurations = {
|
|
|
9509
9613
|
when
|
|
9510
9614
|
}))
|
|
9511
9615
|
}),
|
|
9512
|
-
value: strictObject({
|
|
9616
|
+
"value": strictObject({
|
|
9513
9617
|
values: patch,
|
|
9514
9618
|
outputs: outputFields
|
|
9515
9619
|
}),
|
|
9516
|
-
wait: strictObject({
|
|
9517
|
-
|
|
9620
|
+
"wait": strictObject({
|
|
9621
|
+
inputs: inputFields,
|
|
9622
|
+
autoContinue: authoringDefinitionSchemas.waitAutoContinue.optional().describe("Wait only. Omit to disable; clear config.autoContinue to remove. after counts from each wait registration; at requires an explicit offset and continues immediately if already past. Optional timezone preserves the editor zone; at remains the absolute instant. Server requires the deadline to precede the 7-day expiry.")
|
|
9623
|
+
}),
|
|
9624
|
+
"approval": strictObject({ inputs: inputFields })
|
|
9518
9625
|
};
|
|
9519
9626
|
var updates = strictObject({
|
|
9520
9627
|
onError: _enum(["stop", "error"]).optional(),
|
|
@@ -10888,6 +10995,7 @@ function triggerOutputPorts(trigger) {
|
|
|
10888
10995
|
//#region src/flow/common/graph.ts
|
|
10889
10996
|
function nodeInputPorts(node) {
|
|
10890
10997
|
switch (node.kind) {
|
|
10998
|
+
case "webhook-response": return portsByHandle(webhookResponseInputs);
|
|
10891
10999
|
case "outputs": return portsByHandle(node.outputDefs);
|
|
10892
11000
|
case "condition": return conditionInputPorts(node);
|
|
10893
11001
|
case "value": return {};
|
|
@@ -10934,7 +11042,8 @@ function resolutionOutputPorts(node) {
|
|
|
10934
11042
|
pattern: "\\S"
|
|
10935
11043
|
},
|
|
10936
11044
|
...Object.fromEntries(actions.map((action) => [`${action}Url`, { type: "string" }])),
|
|
10937
|
-
expiresAt: { type: "string" }
|
|
11045
|
+
expiresAt: { type: "string" },
|
|
11046
|
+
...node.kind == "wait" && node.autoContinue != null ? { autoContinueAt: { type: "string" } } : {}
|
|
10938
11047
|
}),
|
|
10939
11048
|
...Object.fromEntries(actions.map((action) => [action, objectPort({
|
|
10940
11049
|
inputs,
|
|
@@ -10946,6 +11055,7 @@ function resolutionOutputPorts(node) {
|
|
|
10946
11055
|
}
|
|
10947
11056
|
function nodeOutputPorts(node) {
|
|
10948
11057
|
switch (node.kind) {
|
|
11058
|
+
case "webhook-response":
|
|
10949
11059
|
case "outputs":
|
|
10950
11060
|
case "condition": return {};
|
|
10951
11061
|
case "value": return portsByHandle(node.values);
|
|
@@ -11039,6 +11149,10 @@ function inspectNode(node) {
|
|
|
11039
11149
|
...Object.keys(defaults).length == 0 ? {} : { inputDefaults: defaults }
|
|
11040
11150
|
};
|
|
11041
11151
|
switch (node.kind) {
|
|
11152
|
+
case "webhook-response": return {
|
|
11153
|
+
...node,
|
|
11154
|
+
...ports
|
|
11155
|
+
};
|
|
11042
11156
|
case "outputs": return {
|
|
11043
11157
|
...node,
|
|
11044
11158
|
...ports,
|
|
@@ -11854,6 +11968,7 @@ function runWaiting(value) {
|
|
|
11854
11968
|
if (!Array.isArray(actions) || !(actions.length == 1 && actions[0] == "continue" || actions.length == 2 && actions[0] == "approve" && actions[1] == "reject")) return invalidResponse();
|
|
11855
11969
|
return {
|
|
11856
11970
|
actions,
|
|
11971
|
+
...source.autoContinueAt === void 0 ? {} : { autoContinueAt: string(source.autoContinueAt) },
|
|
11857
11972
|
expiresAt: string(source.expiresAt),
|
|
11858
11973
|
nodeId: string(source.nodeId),
|
|
11859
11974
|
prompt: string(source.prompt),
|
|
@@ -12128,24 +12243,32 @@ function decodeRunEvent(value) {
|
|
|
12128
12243
|
kind,
|
|
12129
12244
|
payload: { waitIds: payload.waitIds.map((id) => string(id)) }
|
|
12130
12245
|
};
|
|
12131
|
-
case "wait.created":
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12246
|
+
case "wait.created": {
|
|
12247
|
+
const timing = payload.autoContinueAt === void 0 ? {} : { autoContinueAt: string(payload.autoContinueAt) };
|
|
12248
|
+
return {
|
|
12249
|
+
...base,
|
|
12250
|
+
kind,
|
|
12251
|
+
payload: {
|
|
12252
|
+
...timing,
|
|
12253
|
+
expiresAt: string(payload.expiresAt),
|
|
12254
|
+
nodeId: string(payload.nodeId),
|
|
12255
|
+
waitId: string(payload.waitId),
|
|
12256
|
+
waitingSince: string(payload.waitingSince)
|
|
12257
|
+
}
|
|
12258
|
+
};
|
|
12259
|
+
}
|
|
12141
12260
|
case "run.resolved": {
|
|
12142
12261
|
const action = payload.action;
|
|
12262
|
+
const resolutionSource = payload.source;
|
|
12263
|
+
if (resolutionSource !== void 0 && resolutionSource !== "manual" && resolutionSource !== "automatic") return invalidResponse();
|
|
12264
|
+
const audit = resolutionSource === void 0 ? {} : { source: resolutionSource };
|
|
12143
12265
|
if (action !== "approve" && action !== "continue" && action !== "reject") return invalidResponse();
|
|
12144
12266
|
if (payload.comment !== null && typeof payload.comment != "string") return invalidResponse();
|
|
12145
12267
|
return {
|
|
12146
12268
|
...base,
|
|
12147
12269
|
kind,
|
|
12148
12270
|
payload: {
|
|
12271
|
+
...audit,
|
|
12149
12272
|
action,
|
|
12150
12273
|
comment: payload.comment,
|
|
12151
12274
|
resolvedAt: string(payload.resolvedAt),
|
|
@@ -12181,7 +12304,7 @@ function decodeRunEvent(value) {
|
|
|
12181
12304
|
switch (kind) {
|
|
12182
12305
|
case "node.started": {
|
|
12183
12306
|
const nodeKind = payload.nodeKind;
|
|
12184
|
-
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
12307
|
+
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
12185
12308
|
return {
|
|
12186
12309
|
...base,
|
|
12187
12310
|
kind,
|
|
@@ -35,7 +35,7 @@ export declare const controlRequests: {
|
|
|
35
35
|
edits: ({
|
|
36
36
|
op: "node.add";
|
|
37
37
|
as: string;
|
|
38
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "workflow";
|
|
38
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
39
39
|
name: string;
|
|
40
40
|
onError?: "error" | "stop" | undefined;
|
|
41
41
|
retry?: {
|
|
@@ -177,12 +177,12 @@ export declare const controlRequests: {
|
|
|
177
177
|
authoringSearch: (value: unknown) => {
|
|
178
178
|
revision?: string | undefined;
|
|
179
179
|
query: string;
|
|
180
|
-
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "workflow" | undefined;
|
|
180
|
+
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow" | undefined;
|
|
181
181
|
offset: number;
|
|
182
182
|
limit: number;
|
|
183
183
|
};
|
|
184
184
|
authoringSchema: (value: unknown) => {
|
|
185
|
-
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "workflow" | undefined;
|
|
185
|
+
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow" | undefined;
|
|
186
186
|
action?: string | undefined;
|
|
187
187
|
};
|
|
188
188
|
loadOpenApiDocument: (value: unknown) => {
|