@oomol-lab/open-flow 0.1.0-beta.74 → 0.1.0-beta.76
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/README.md +3 -1
- package/dist/browser/{ContentIcon-CUQHjQIw.js → ContentIcon-Cm1hbVzW.js} +4 -3
- package/dist/browser/{FlowCanvas-Dtf8_cQp.js → FlowCanvas-NzKtla_c.js} +62 -62
- package/dist/browser/{createResourceDialog-DI9pL-Yr.js → createResourceDialog-BgdedQqu.js} +3 -3
- package/dist/browser/{dialog-BYJGvItc.js → dialog-aSElFFw2.js} +322 -26
- package/dist/browser/{exportSvg-BOoy7-Db.js → exportSvg-Dcz4HTo_.js} +2 -2
- package/dist/browser/{flowChanges-RL-H4CjD.js → flowChanges-NZyS7HSp.js} +490 -438
- package/dist/browser/{flowWorkspace-BkDsETj0.js → flowWorkspace-Bl0SDehy.js} +499 -61
- package/dist/browser/preview.css +696 -825
- package/dist/browser/preview.js +1399 -717
- package/dist/browser/theme.css +114 -262
- package/dist/browser/{tooltip-wZJRB9oP.js → tooltip-3XMK9jkr.js} +1 -1
- package/dist/browser/{typeScriptSession-CSRwWmZm.js → typeScriptSession-C9sBGOKZ.js} +1 -1
- package/dist/browser/ui.css +354 -460
- package/dist/browser/ui.js +1 -1
- package/dist/browser/workbench.css +696 -825
- package/dist/browser/workbench.js +13 -7
- package/dist/browser/{workbenchSelect-BcWPWGzw.js → workbenchSelect-DBGP7Y4Z.js} +2 -2
- package/dist/command/index.js +41 -43
- package/dist/common/authoring.d.ts +5 -5
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +70 -4
- package/dist/common/connector-proxy.d.ts +1 -1
- package/dist/common/control-api-conformance.js +250 -138
- package/dist/common/control-api.d.ts +3 -2
- package/dist/common/control-api.js +246 -134
- package/dist/common/control-requests.d.ts +3 -3
- package/dist/common/control-requests.js +353 -79
- package/dist/common/cron-trigger.d.ts +2 -1
- package/dist/common/decision.d.ts +4 -4
- package/dist/common/decision.js +5 -2
- package/dist/common/engine-contract.d.ts +6 -1
- package/dist/common/event-source-definition.d.ts +1 -1
- package/dist/common/event-source-view.d.ts +22 -0
- package/dist/common/event-source.d.ts +1 -1
- package/dist/common/event-source.js +24 -65
- package/dist/common/event-sources.d.ts +0 -21
- package/dist/common/flow-authoring.js +90 -19
- package/dist/common/flow-change-schema.d.ts +9 -1
- package/dist/common/flow-change.d.ts +7 -201
- package/dist/common/flow-change.js +96 -23
- package/dist/common/flow-encoding.js +89 -21
- package/dist/common/flow-graph.d.ts +2 -1
- package/dist/common/flow-input-value.d.ts +1 -1
- package/dist/common/flow-model.d.ts +121 -0
- package/dist/common/flow-notifications.d.ts +1 -1
- package/dist/common/flow-retry.d.ts +3 -5
- package/dist/common/flow-semantics.js +816 -586
- package/dist/common/flow-workflowReferences.d.ts +8 -0
- package/dist/common/flowInspection.d.ts +1 -1
- package/dist/common/http-hosts.d.ts +6 -0
- package/dist/common/http-request.d.ts +164 -0
- package/dist/common/http-request.js +5272 -0
- package/dist/common/integration-trigger.d.ts +2 -1
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +248 -136
- package/dist/common/openapi.d.ts +4 -4
- package/dist/common/openapi.js +4 -1
- package/dist/common/poll-trigger.d.ts +2 -1
- package/dist/common/run-events.js +11 -9
- package/dist/common/runtime-contract.d.ts +23 -1
- package/dist/common/runtime-contract.js +607 -72
- package/dist/common/runtime-nodejs-compat.d.ts +44 -0
- package/dist/common/runtime-nodejs-compat.js +5870 -0
- package/dist/common/scheduler-checkpoint.d.ts +1 -1
- package/dist/common/scheduler-node-execution.d.ts +1 -1
- package/dist/common/scheduler.d.ts +2 -2
- package/dist/common/scheduler.js +95 -25
- package/dist/common/trigger-catalog.d.ts +1 -7
- package/dist/common/trigger-config-options.d.ts +1 -1
- package/dist/common/trigger-config.d.ts +1 -1
- package/dist/common/trigger-contract.d.ts +2 -1
- package/dist/common/trigger-localization.d.ts +8 -2
- package/dist/common/trigger-model.d.ts +101 -0
- package/dist/common/webhook-response.d.ts +1 -3
- package/dist/common/webhook-trigger.d.ts +3 -1
- package/dist/common/webhook-trigger.js +12 -11
- package/dist/common/workflow.d.ts +3 -12
- package/dist/common/workflow.js +25 -23
- package/dist/index.d.ts +41 -14
- package/package.json +9 -1
- package/skills/open-flow/references/flow-authoring.md +1 -0
- package/skills/open-flow/references/flow-n8n-conversion.md +19 -15
- package/src/base/common/json.ts +1 -1
- package/src/connector/common/proxy.ts +1 -1
- package/src/control/common/api.ts +7 -5
- package/src/control/common/authoring.ts +14 -3
- package/src/control/common/authoringExamples.ts +8 -0
- package/src/control/common/authoringSchema.ts +38 -25
- package/src/control/common/authoringTools.ts +1 -1
- package/src/control/common/conformance.ts +1 -1
- package/src/control/common/connectorDecoders.ts +1 -1
- package/src/control/common/eventSources.ts +2 -29
- package/src/control/common/triggerCatalog.ts +1 -8
- package/src/decision/common/decision.ts +15 -7
- package/src/event-source/common/definition.ts +1 -1
- package/src/event-source/common/index.ts +1 -1
- package/src/event-source/common/view.ts +20 -0
- package/src/execution/common/checkpoint.ts +1 -1
- package/src/execution/common/events.ts +3 -0
- package/src/execution/common/node-execution.ts +5 -3
- package/src/execution/common/scheduler.ts +2 -1
- package/src/flow/common/change.ts +59 -192
- package/src/flow/common/changeSchema.ts +39 -5
- package/src/flow/common/connectionUsage.ts +1 -1
- package/src/flow/common/graph.ts +10 -4
- package/src/flow/common/inputValue.ts +1 -1
- package/src/flow/common/model.ts +130 -0
- package/src/flow/common/modules.ts +1 -1
- package/src/flow/common/portChanges.ts +1 -1
- package/src/flow/common/retry.ts +3 -5
- package/src/flow/common/semantics.ts +71 -7
- package/src/flow/common/webhookResponse.ts +4 -8
- package/src/flow/common/workflowReferences.ts +31 -0
- package/src/http/common/authBindings.ts +9 -0
- package/src/http/common/headers.ts +5 -0
- package/src/http/common/hosts.ts +13 -0
- package/src/http/common/httpRequest.ts +266 -0
- package/src/openapi/common/openapi.ts +9 -5
- package/src/{execution → runtime}/common/engineContract.ts +24 -15
- package/src/runtime/common/nodejsCompat.ts +275 -0
- package/src/runtime/common/nodejsGuest.generated.json +47 -0
- package/src/runtime/common/runtime.ts +1138 -0
- package/src/trigger/common/config.ts +1 -1
- package/src/trigger/common/configOptions.ts +1 -1
- package/src/trigger/common/contract.ts +2 -1
- package/src/trigger/common/cron.ts +2 -1
- package/src/trigger/common/integration.ts +2 -1
- package/src/trigger/common/model.ts +87 -0
- package/src/trigger/common/poll.ts +2 -1
- package/src/trigger/common/webhook.ts +7 -4
- package/src/trigger/providers/fieldDescriptions.ts +1 -1
- package/src/trigger/providers/localization.ts +9 -2
- package/src/trigger/providers/remote.ts +1 -1
- package/src/types/index.ts +44 -15
- package/src/workflow/common/workflow.ts +3 -44
- package/src/execution/common/runtime.ts +0 -563
- package/src/openapi/common/authBindings.ts +0 -12
- /package/src/{control → connector}/common/providerIconSprite.ts +0 -0
|
@@ -22,44 +22,6 @@ function dequal(foo, bar) {
|
|
|
22
22
|
return foo !== foo && bar !== bar;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region src/execution/common/engineContract.ts
|
|
26
|
-
var currentEngineContract = "open-flow-engine/v8";
|
|
27
|
-
`${JSON.stringify(currentEngineContract)}`, new Set([
|
|
28
|
-
"assert",
|
|
29
|
-
"assert/strict",
|
|
30
|
-
"buffer",
|
|
31
|
-
"console",
|
|
32
|
-
"constants",
|
|
33
|
-
"crypto",
|
|
34
|
-
"events",
|
|
35
|
-
"fs",
|
|
36
|
-
"fs/promises",
|
|
37
|
-
"os",
|
|
38
|
-
"path",
|
|
39
|
-
"path/posix",
|
|
40
|
-
"process",
|
|
41
|
-
"punycode",
|
|
42
|
-
"querystring",
|
|
43
|
-
"stream",
|
|
44
|
-
"stream/promises",
|
|
45
|
-
"stream/web",
|
|
46
|
-
"string_decoder",
|
|
47
|
-
"timers",
|
|
48
|
-
"timers/promises",
|
|
49
|
-
"url",
|
|
50
|
-
"util",
|
|
51
|
-
"zlib"
|
|
52
|
-
].flatMap((name) => [name, `node:${name}`])), `${JSON.stringify("open-flow-engine/v8/nodejs-compat-v1")}`;
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/openapi/common/authBindings.ts
|
|
55
|
-
/** Never allow credentials to enter a Revision as literal node inputs. */
|
|
56
|
-
function assertOpenApiAuthBindings(document) {
|
|
57
|
-
for (const node of Object.values(document.graph.nodes)) {
|
|
58
|
-
if (node.kind != "task" || !("executor" in node.task) || node.task.executor.kind != "openapi") continue;
|
|
59
|
-
for (const [handle, mapping] of Object.entries(node.inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("OpenAPI authentication accepts deployment variables and upstream outputs only.");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
25
|
//#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
64
26
|
function getEnumValues(entries) {
|
|
65
27
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
@@ -8514,6 +8476,9 @@ function isSchemaKeyword(value) {
|
|
|
8514
8476
|
}
|
|
8515
8477
|
//#endregion
|
|
8516
8478
|
//#region src/decision/common/decision.ts
|
|
8479
|
+
function isDecisionExecutor(executor) {
|
|
8480
|
+
return executor.kind === "decision";
|
|
8481
|
+
}
|
|
8517
8482
|
var decisionLimits = {
|
|
8518
8483
|
choice: 255,
|
|
8519
8484
|
score: 10
|
|
@@ -8536,7 +8501,7 @@ function limitDecisionQuestions(questions) {
|
|
|
8536
8501
|
}
|
|
8537
8502
|
/** Loading an oversized task also updates its previously generated output schemas. */
|
|
8538
8503
|
function limitDecisionTask(task) {
|
|
8539
|
-
if (task.executor
|
|
8504
|
+
if (!isDecisionExecutor(task.executor)) return task;
|
|
8540
8505
|
const original = task.executor.questions;
|
|
8541
8506
|
const questions = limitDecisionQuestions(original);
|
|
8542
8507
|
if (questions === original) return task;
|
|
@@ -8602,6 +8567,67 @@ function answerSchema(question) {
|
|
|
8602
8567
|
required: Object.keys(properties)
|
|
8603
8568
|
};
|
|
8604
8569
|
}
|
|
8570
|
+
//#endregion
|
|
8571
|
+
//#region src/http/common/authBindings.ts
|
|
8572
|
+
/** Never allow credentials to enter a Revision as literal inputs of an OpenAPI or HTTP request node. */
|
|
8573
|
+
function assertHttpAuthBindings(inputs) {
|
|
8574
|
+
for (const [handle, mapping] of Object.entries(inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("HTTP authentication accepts deployment variables and upstream outputs only.");
|
|
8575
|
+
}
|
|
8576
|
+
//#endregion
|
|
8577
|
+
//#region src/http/common/hosts.ts
|
|
8578
|
+
/** Hosts of a Code `http` Capability: lowercase DNS names or IPv4 addresses; `*.example.com` matches subdomains only. */
|
|
8579
|
+
var httpHostPattern = /^(?:\*\.)?(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
8580
|
+
/** Wildcards must name a registrable suffix, so `*.com` is rejected. */
|
|
8581
|
+
function isHttpHost(value) {
|
|
8582
|
+
return httpHostPattern.test(value) && (!value.startsWith("*.") || value.slice(2).includes("."));
|
|
8583
|
+
}
|
|
8584
|
+
//#endregion
|
|
8585
|
+
//#region src/http/common/httpRequest.ts
|
|
8586
|
+
var parameterSchema = strictObject({
|
|
8587
|
+
mode: _enum(["fields", "object"]).default("fields"),
|
|
8588
|
+
names: array(string$1()).default([])
|
|
8589
|
+
});
|
|
8590
|
+
var httpRequestConfigSchema = strictObject({
|
|
8591
|
+
method: _enum([
|
|
8592
|
+
"GET",
|
|
8593
|
+
"POST",
|
|
8594
|
+
"PUT",
|
|
8595
|
+
"PATCH",
|
|
8596
|
+
"DELETE",
|
|
8597
|
+
"HEAD",
|
|
8598
|
+
"OPTIONS"
|
|
8599
|
+
]).default("GET"),
|
|
8600
|
+
query: parameterSchema.default({
|
|
8601
|
+
mode: "fields",
|
|
8602
|
+
names: []
|
|
8603
|
+
}),
|
|
8604
|
+
headers: parameterSchema.default({
|
|
8605
|
+
mode: "fields",
|
|
8606
|
+
names: []
|
|
8607
|
+
}),
|
|
8608
|
+
bodyFormat: _enum([
|
|
8609
|
+
"none",
|
|
8610
|
+
"json",
|
|
8611
|
+
"text",
|
|
8612
|
+
"form"
|
|
8613
|
+
]).default("none"),
|
|
8614
|
+
authentication: union([
|
|
8615
|
+
strictObject({ type: literal("none") }),
|
|
8616
|
+
strictObject({ type: _enum(["bearer", "basic"]) }),
|
|
8617
|
+
strictObject({
|
|
8618
|
+
type: literal("apiKey"),
|
|
8619
|
+
name: string$1(),
|
|
8620
|
+
in: _enum(["header", "query"])
|
|
8621
|
+
})
|
|
8622
|
+
]).default({ type: "none" }),
|
|
8623
|
+
responseFormat: _enum([
|
|
8624
|
+
"auto",
|
|
8625
|
+
"json",
|
|
8626
|
+
"text"
|
|
8627
|
+
]).default("auto"),
|
|
8628
|
+
statusPolicy: _enum(["success", "all"]).default("success")
|
|
8629
|
+
});
|
|
8630
|
+
var httpRequestExecutorSchema = httpRequestConfigSchema.extend({ kind: literal("http-request") });
|
|
8605
8631
|
function checkJsonDepth(value, depth = 0) {
|
|
8606
8632
|
if (depth > 64) throw new TypeError("Value exceeds the maximum JSON depth.");
|
|
8607
8633
|
if (value != null && typeof value == "object") for (const child of Object.values(value)) checkJsonDepth(child, depth + 1);
|
|
@@ -8771,7 +8797,15 @@ var workflowCapabilitySchema = strictObject({
|
|
|
8771
8797
|
inputs: array(port$1),
|
|
8772
8798
|
outputs: array(port$1).nullable()
|
|
8773
8799
|
});
|
|
8774
|
-
var
|
|
8800
|
+
var httpCapabilitySchema = strictObject({
|
|
8801
|
+
kind: literal("http"),
|
|
8802
|
+
hosts: array(text.refine(isHttpHost, "Use a lowercase host name or IPv4 address, optionally prefixed by \"*.\" for subdomains.")).min(1).max(20).describe("Hosts Code may call with context.fetch. \"*.example.com\" matches subdomains only.")
|
|
8803
|
+
});
|
|
8804
|
+
var capability = union([
|
|
8805
|
+
connectorCapabilitySchema,
|
|
8806
|
+
workflowCapabilitySchema,
|
|
8807
|
+
httpCapabilitySchema
|
|
8808
|
+
]);
|
|
8775
8809
|
var inline = object({
|
|
8776
8810
|
...ports$1,
|
|
8777
8811
|
name: text,
|
|
@@ -8881,7 +8915,8 @@ var managedFields = object({
|
|
|
8881
8915
|
kind: literal("workflow"),
|
|
8882
8916
|
flowId: text,
|
|
8883
8917
|
revisionId: text
|
|
8884
|
-
})
|
|
8918
|
+
}),
|
|
8919
|
+
httpRequestExecutorSchema
|
|
8885
8920
|
])
|
|
8886
8921
|
});
|
|
8887
8922
|
var managed = managedFields.transform(limitDecisionTask);
|
|
@@ -9150,7 +9185,8 @@ var revision = object({
|
|
|
9150
9185
|
literal(8),
|
|
9151
9186
|
literal(9),
|
|
9152
9187
|
literal(10),
|
|
9153
|
-
literal(11)
|
|
9188
|
+
literal(11),
|
|
9189
|
+
literal(12)
|
|
9154
9190
|
]),
|
|
9155
9191
|
document,
|
|
9156
9192
|
modules: record$3(text, module)
|
|
@@ -9181,7 +9217,7 @@ function decodeRevisionContent(value) {
|
|
|
9181
9217
|
checkJsonDepth(value);
|
|
9182
9218
|
const content = revision.parse(value);
|
|
9183
9219
|
checkModelVersion(content);
|
|
9184
|
-
|
|
9220
|
+
assertDocumentHttpAuthBindings(content.document);
|
|
9185
9221
|
return content;
|
|
9186
9222
|
}
|
|
9187
9223
|
var shapes = {
|
|
@@ -9351,6 +9387,8 @@ array(union([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, sha
|
|
|
9351
9387
|
...shape
|
|
9352
9388
|
})])).values()])).min(1);
|
|
9353
9389
|
function checkModelVersion(content) {
|
|
9390
|
+
if (content.modelVersion < 12 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "moduleId" in candidateNode.task && candidateNode.task.capabilities?.some((item) => item.kind == "http"))) throw new TypeError("Code HTTP access requires Flow model version 12.");
|
|
9391
|
+
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind == "http-request")) throw new TypeError("HTTP Request requires Flow model version 11.");
|
|
9354
9392
|
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && ("moduleId" in candidateNode.task ? candidateNode.task.capabilities?.some((item) => item.kind == "workflow") : candidateNode.task.executor.kind == "agent" && candidateNode.task.executor.tools.some((item) => item.kind == "workflow")))) throw new TypeError("Workflow tools require Flow model version 11.");
|
|
9355
9393
|
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.");
|
|
9356
9394
|
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.");
|
|
@@ -9365,6 +9403,9 @@ function checkModelVersion(content) {
|
|
|
9365
9403
|
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.");
|
|
9366
9404
|
if (content.modelVersion < 5 && Object.values(content.document.graph.nodes).some((itemNode) => itemNode.kind == "error")) throw new TypeError("Error workflows require Flow model version 5.");
|
|
9367
9405
|
}
|
|
9406
|
+
function assertDocumentHttpAuthBindings(content) {
|
|
9407
|
+
for (const graphNode of Object.values(content.graph.nodes)) if (graphNode.kind == "task" && "executor" in graphNode.task && ["openapi", "http-request"].includes(graphNode.task.executor.kind)) assertHttpAuthBindings(graphNode.inputs);
|
|
9408
|
+
}
|
|
9368
9409
|
//#endregion
|
|
9369
9410
|
//#region src/flow/common/change.ts
|
|
9370
9411
|
/** Lossless upgrade of readable content. Historical content and its encoding stay unchanged. */
|
|
@@ -9375,10 +9416,10 @@ function upgradeRevisionContent(content) {
|
|
|
9375
9416
|
function upgradeDecodedRevisionContent(content) {
|
|
9376
9417
|
const graph = content.document.graph;
|
|
9377
9418
|
const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
|
|
9378
|
-
if (!hasManual && content.modelVersion ==
|
|
9419
|
+
if (!hasManual && content.modelVersion == 12) return content;
|
|
9379
9420
|
return {
|
|
9380
9421
|
...content,
|
|
9381
|
-
modelVersion:
|
|
9422
|
+
modelVersion: 12,
|
|
9382
9423
|
document: {
|
|
9383
9424
|
...content.document,
|
|
9384
9425
|
graph: hasManual ? {
|
|
@@ -9396,6 +9437,78 @@ function upgradeManualTrigger(node) {
|
|
|
9396
9437
|
} : node;
|
|
9397
9438
|
}
|
|
9398
9439
|
//#endregion
|
|
9440
|
+
//#region src/runtime/common/engineContract.ts
|
|
9441
|
+
/** v9 is a single contract: the Node compatibility builtins, `context.fetch`, and no `context.egress`. */
|
|
9442
|
+
var currentEngineContract = "open-flow-engine/v9";
|
|
9443
|
+
/** The published v8 Node compatibility contract, retained for existing Publications and Runs. */
|
|
9444
|
+
var nodejsEngineContract = "open-flow-engine/v8/nodejs-compat-v1";
|
|
9445
|
+
var platformSource = (contract) => `export const engineContract = ${JSON.stringify(contract)}
|
|
9446
|
+
export function identity(value) { return value }
|
|
9447
|
+
`;
|
|
9448
|
+
var v8Contract = {
|
|
9449
|
+
workflowTools: true,
|
|
9450
|
+
httpRequests: true,
|
|
9451
|
+
waitAutoContinue: true,
|
|
9452
|
+
webhookResponses: true,
|
|
9453
|
+
platformExports: /* @__PURE__ */ new Set(["engineContract", "identity"]),
|
|
9454
|
+
platformModule: "open-flow:platform",
|
|
9455
|
+
platformSource: platformSource("open-flow-engine/v8")
|
|
9456
|
+
};
|
|
9457
|
+
var nodejsContract = {
|
|
9458
|
+
...v8Contract,
|
|
9459
|
+
builtinModules: new Set([
|
|
9460
|
+
"assert",
|
|
9461
|
+
"assert/strict",
|
|
9462
|
+
"buffer",
|
|
9463
|
+
"console",
|
|
9464
|
+
"constants",
|
|
9465
|
+
"crypto",
|
|
9466
|
+
"events",
|
|
9467
|
+
"fs",
|
|
9468
|
+
"fs/promises",
|
|
9469
|
+
"os",
|
|
9470
|
+
"path",
|
|
9471
|
+
"path/posix",
|
|
9472
|
+
"process",
|
|
9473
|
+
"punycode",
|
|
9474
|
+
"querystring",
|
|
9475
|
+
"stream",
|
|
9476
|
+
"stream/promises",
|
|
9477
|
+
"stream/web",
|
|
9478
|
+
"string_decoder",
|
|
9479
|
+
"timers",
|
|
9480
|
+
"timers/promises",
|
|
9481
|
+
"url",
|
|
9482
|
+
"util",
|
|
9483
|
+
"zlib"
|
|
9484
|
+
].flatMap((name) => [name, `node:${name}`])),
|
|
9485
|
+
platformSource: platformSource(nodejsEngineContract)
|
|
9486
|
+
};
|
|
9487
|
+
var currentContract = {
|
|
9488
|
+
...nodejsContract,
|
|
9489
|
+
codeFetch: true,
|
|
9490
|
+
platformSource: platformSource(currentEngineContract)
|
|
9491
|
+
};
|
|
9492
|
+
function findEngineContract(contract) {
|
|
9493
|
+
if (contract == "open-flow-engine/v9") return currentContract;
|
|
9494
|
+
if (contract == "open-flow-engine/v8") return v8Contract;
|
|
9495
|
+
if (contract == "open-flow-engine/v8/nodejs-compat-v1") return nodejsContract;
|
|
9496
|
+
if (contract == "open-flow-engine/v7" || contract == "open-flow-engine/v7/nodejs-compat-v1") return {
|
|
9497
|
+
...contract.endsWith("/nodejs-compat-v1") ? nodejsContract : v8Contract,
|
|
9498
|
+
workflowTools: false,
|
|
9499
|
+
httpRequests: false,
|
|
9500
|
+
platformSource: platformSource(contract)
|
|
9501
|
+
};
|
|
9502
|
+
if (contract == "open-flow-engine/v6" || contract == "open-flow-engine/v6/nodejs-compat-v1") return {
|
|
9503
|
+
...contract == "open-flow-engine/v6" ? v8Contract : nodejsContract,
|
|
9504
|
+
workflowTools: false,
|
|
9505
|
+
httpRequests: false,
|
|
9506
|
+
waitAutoContinue: false,
|
|
9507
|
+
webhookResponses: false,
|
|
9508
|
+
platformSource: platformSource(contract)
|
|
9509
|
+
};
|
|
9510
|
+
}
|
|
9511
|
+
//#endregion
|
|
9399
9512
|
//#region src/workflow/common/workflow.ts
|
|
9400
9513
|
var portSchema = object({
|
|
9401
9514
|
handle: string$1().min(1),
|
|
@@ -9461,9 +9574,9 @@ var authoringOpenApiSchema = strictObject({
|
|
|
9461
9574
|
});
|
|
9462
9575
|
//#endregion
|
|
9463
9576
|
//#region src/control/common/authoringSchema.ts
|
|
9464
|
-
var id$
|
|
9577
|
+
var id$2 = string$1().min(1);
|
|
9465
9578
|
var json$2 = json$4();
|
|
9466
|
-
var patch = record$3(id$
|
|
9579
|
+
var patch = record$3(id$2, json$2);
|
|
9467
9580
|
var type = _enum([
|
|
9468
9581
|
"start",
|
|
9469
9582
|
"outputs",
|
|
@@ -9480,16 +9593,17 @@ var type = _enum([
|
|
|
9480
9593
|
"llm",
|
|
9481
9594
|
"decision",
|
|
9482
9595
|
"openapi",
|
|
9596
|
+
"http-request",
|
|
9483
9597
|
"condition",
|
|
9484
9598
|
"value",
|
|
9485
9599
|
"wait",
|
|
9486
9600
|
"approval"
|
|
9487
9601
|
]);
|
|
9488
|
-
var referenceSchema = id$
|
|
9602
|
+
var referenceSchema = id$2.describe("An existing node reference returned by read/search, or $alias for a preceding node.add in this edit batch. For node.add.as \"step\", reference \"$step\", never bare \"step\". Aliases are local to one batch.");
|
|
9489
9603
|
var output = strictObject({
|
|
9490
9604
|
kind: literal("output"),
|
|
9491
9605
|
node: referenceSchema,
|
|
9492
|
-
port: id$
|
|
9606
|
+
port: id$2.optional().describe("Omit for a node with one output. For multiple outputs, choose a name from node details."),
|
|
9493
9607
|
field: string$1().optional()
|
|
9494
9608
|
});
|
|
9495
9609
|
var system = strictObject({
|
|
@@ -9500,7 +9614,7 @@ var system = strictObject({
|
|
|
9500
9614
|
});
|
|
9501
9615
|
var variable$1 = strictObject({
|
|
9502
9616
|
kind: literal("variable"),
|
|
9503
|
-
name: id$
|
|
9617
|
+
name: id$2
|
|
9504
9618
|
});
|
|
9505
9619
|
var authoringSourceSchema = union([
|
|
9506
9620
|
output,
|
|
@@ -9531,7 +9645,7 @@ var operand = union([
|
|
|
9531
9645
|
system,
|
|
9532
9646
|
variable$1
|
|
9533
9647
|
]);
|
|
9534
|
-
var toolSources = record$3(id$
|
|
9648
|
+
var toolSources = record$3(id$2, agentToolFields.inputs.element.shape.source).optional().describe("Tool input sources by name. The platform resolves types from the selected Action or workflow. New inputs default to model-provided; omitted existing sources are preserved.");
|
|
9535
9649
|
var agentTool = union([workflowAgentToolSchema.omit({
|
|
9536
9650
|
id: true,
|
|
9537
9651
|
inputs: true,
|
|
@@ -9541,20 +9655,24 @@ var agentTool = union([workflowAgentToolSchema.omit({
|
|
|
9541
9655
|
id: true,
|
|
9542
9656
|
inputs: true
|
|
9543
9657
|
}).extend({ inputs: toolSources }).strict()]);
|
|
9544
|
-
var authoringCapabilities = array(union([
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9658
|
+
var authoringCapabilities = array(union([
|
|
9659
|
+
connectorCapabilitySchema,
|
|
9660
|
+
strictObject({
|
|
9661
|
+
kind: literal("workflow"),
|
|
9662
|
+
name: id$2,
|
|
9663
|
+
flowId: id$2
|
|
9664
|
+
}),
|
|
9665
|
+
httpCapabilitySchema
|
|
9666
|
+
]));
|
|
9549
9667
|
var notification = strictObject({
|
|
9550
9668
|
...authoringDefinitionSchemas.connector.shape,
|
|
9551
|
-
messageHandle: id$
|
|
9552
|
-
inputs: record$3(id$
|
|
9669
|
+
messageHandle: id$2,
|
|
9670
|
+
inputs: record$3(id$2, union([strictObject({
|
|
9553
9671
|
kind: literal("value"),
|
|
9554
9672
|
value: json$2
|
|
9555
9673
|
}), strictObject({
|
|
9556
9674
|
kind: literal("input"),
|
|
9557
|
-
input: id$
|
|
9675
|
+
input: id$2
|
|
9558
9676
|
})]))
|
|
9559
9677
|
});
|
|
9560
9678
|
var field = strictObject({
|
|
@@ -9562,14 +9680,14 @@ var field = strictObject({
|
|
|
9562
9680
|
nullable: boolean().optional(),
|
|
9563
9681
|
description: string$1().optional()
|
|
9564
9682
|
});
|
|
9565
|
-
var inputFields = record$3(id$
|
|
9566
|
-
var flowInputFields = record$3(id$
|
|
9683
|
+
var inputFields = record$3(id$2, field.extend({ default: json$2.optional() })).describe("Optional business input constraints by name. A binding to a new Code, Agent, LLM, Wait or Approval input automatically declares an input accepting any JSON. Existing constraints are preserved. Omitted schema accepts any JSON; omitted nullable is true. Use default for inherited values; input.set supplies data.");
|
|
9684
|
+
var flowInputFields = record$3(id$2, field).describe("Workflow input definitions by name. Omitted schema accepts any JSON; omitted nullable is true. No defaults. Supply call values as trigger.outputs.");
|
|
9567
9685
|
var flowOutputFields = flowInputFields.describe("Workflow output definitions by name. Omitted schema accepts any JSON; omitted nullable is true. No defaults. Set values on the Outputs node with input.set or node.add.inputs.");
|
|
9568
|
-
var flowInputFieldsView = record$3(id$
|
|
9686
|
+
var flowInputFieldsView = record$3(id$2, field.extend({
|
|
9569
9687
|
schema: json$2,
|
|
9570
9688
|
nullable: boolean()
|
|
9571
9689
|
}));
|
|
9572
|
-
var outputFields = record$3(id$
|
|
9690
|
+
var outputFields = record$3(id$2, field).describe("Code return fields by name. Omitted schema accepts any JSON; omitted nullable is true.");
|
|
9573
9691
|
var expression = strictObject({
|
|
9574
9692
|
left: operand,
|
|
9575
9693
|
operator: authoringDefinitionSchemas.condition.shape.cases.element.shape.groups.element.shape.expressions.element.shape.operator,
|
|
@@ -9583,20 +9701,20 @@ var when = union([
|
|
|
9583
9701
|
]);
|
|
9584
9702
|
var authoringConfigurations = {
|
|
9585
9703
|
"webhook-response": strictObject({}),
|
|
9586
|
-
"workflow": strictObject({ flowId: id$
|
|
9704
|
+
"workflow": strictObject({ flowId: id$2 }),
|
|
9587
9705
|
"start": strictObject({ inputDefs: flowInputFields.default({}) }),
|
|
9588
9706
|
"outputs": strictObject({ outputDefs: flowOutputFields.default({}) }),
|
|
9589
|
-
"error": strictObject({ sourceFlowIds: array(id$
|
|
9707
|
+
"error": strictObject({ sourceFlowIds: array(id$2).optional() }),
|
|
9590
9708
|
"webhook": authoringDefinitionSchemas.webhook.omit({ bodyFields: true }).extend({ body: inputFields }).strict(),
|
|
9591
9709
|
"cron": strictObject({ schedule: authoringDefinitionSchemas.schedule }),
|
|
9592
9710
|
"poll": strictObject({
|
|
9593
|
-
key: id$
|
|
9594
|
-
connectionId: id$
|
|
9711
|
+
key: id$2,
|
|
9712
|
+
connectionId: id$2.optional(),
|
|
9595
9713
|
schedule: authoringDefinitionSchemas.schedule
|
|
9596
9714
|
}),
|
|
9597
9715
|
"integration": strictObject({
|
|
9598
|
-
key: id$
|
|
9599
|
-
connectionId: id$
|
|
9716
|
+
key: id$2,
|
|
9717
|
+
connectionId: id$2.optional()
|
|
9600
9718
|
}),
|
|
9601
9719
|
"code": strictObject({
|
|
9602
9720
|
inputs: inputFields,
|
|
@@ -9605,6 +9723,7 @@ var authoringConfigurations = {
|
|
|
9605
9723
|
}),
|
|
9606
9724
|
"connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9607
9725
|
"openapi": authoringOpenApiSchema,
|
|
9726
|
+
"http-request": httpRequestConfigSchema,
|
|
9608
9727
|
"agent": authoringDefinitionSchemas.agent.omit({
|
|
9609
9728
|
prompt: true,
|
|
9610
9729
|
tools: true
|
|
@@ -9619,7 +9738,7 @@ var authoringConfigurations = {
|
|
|
9619
9738
|
"condition": strictObject({
|
|
9620
9739
|
match: _enum(["first", "all"]),
|
|
9621
9740
|
branches: array(strictObject({
|
|
9622
|
-
name: id$
|
|
9741
|
+
name: id$2,
|
|
9623
9742
|
description: string$1().optional(),
|
|
9624
9743
|
when
|
|
9625
9744
|
}))
|
|
@@ -9636,7 +9755,7 @@ var authoringConfigurations = {
|
|
|
9636
9755
|
};
|
|
9637
9756
|
var updates = strictObject({
|
|
9638
9757
|
onError: _enum(["stop", "error"]).optional(),
|
|
9639
|
-
name: id$
|
|
9758
|
+
name: id$2.optional(),
|
|
9640
9759
|
description: string$1().optional(),
|
|
9641
9760
|
icon: string$1().optional(),
|
|
9642
9761
|
maxExecutions: int().positive().optional(),
|
|
@@ -9647,13 +9766,13 @@ var updates = strictObject({
|
|
|
9647
9766
|
var authoringEditSchema = discriminatedUnion("op", [
|
|
9648
9767
|
strictObject({
|
|
9649
9768
|
op: literal("node.add"),
|
|
9650
|
-
as: id$
|
|
9769
|
+
as: id$2.regex(/^[A-Za-z][\w-]*$/).describe("Unique batch-local alias without the $ prefix. Later edits must reference this new node as $alias; the bare alias is not its node ID."),
|
|
9651
9770
|
type,
|
|
9652
|
-
name: id$
|
|
9771
|
+
name: id$2,
|
|
9653
9772
|
onError: _enum(["stop", "error"]).optional(),
|
|
9654
9773
|
retry: retryConfigurationSchema.optional(),
|
|
9655
9774
|
config: patch.optional(),
|
|
9656
|
-
inputs: record$3(id$
|
|
9775
|
+
inputs: record$3(id$2, authoringSourceSchema).optional().describe("Input data sources, applied after creation, as input.set operations. Execution edges are separate."),
|
|
9657
9776
|
code: string$1().optional(),
|
|
9658
9777
|
prompt: string$1().optional()
|
|
9659
9778
|
}),
|
|
@@ -9661,12 +9780,12 @@ var authoringEditSchema = discriminatedUnion("op", [
|
|
|
9661
9780
|
op: literal("node.update"),
|
|
9662
9781
|
node: referenceSchema,
|
|
9663
9782
|
set: updates.optional(),
|
|
9664
|
-
clear: array(array(id$
|
|
9783
|
+
clear: array(array(id$2).min(1)).optional()
|
|
9665
9784
|
}),
|
|
9666
9785
|
strictObject({
|
|
9667
9786
|
op: literal("node.refresh"),
|
|
9668
9787
|
node: referenceSchema,
|
|
9669
|
-
tool: id$
|
|
9788
|
+
tool: id$2.optional().describe("Name of a workflow tool on an Agent or Code node. Omit for a Call Workflow node.")
|
|
9670
9789
|
}),
|
|
9671
9790
|
strictObject({
|
|
9672
9791
|
op: literal("node.remove"),
|
|
@@ -9675,20 +9794,20 @@ var authoringEditSchema = discriminatedUnion("op", [
|
|
|
9675
9794
|
strictObject({
|
|
9676
9795
|
op: literal("input.set"),
|
|
9677
9796
|
node: referenceSchema,
|
|
9678
|
-
input: id$
|
|
9797
|
+
input: id$2,
|
|
9679
9798
|
source: authoringSourceSchema
|
|
9680
9799
|
}),
|
|
9681
9800
|
strictObject({
|
|
9682
9801
|
op: _enum(["edge.connect", "edge.disconnect"]),
|
|
9683
9802
|
source: referenceSchema,
|
|
9684
9803
|
target: referenceSchema,
|
|
9685
|
-
branch: id$
|
|
9804
|
+
branch: id$2.optional()
|
|
9686
9805
|
}),
|
|
9687
9806
|
strictObject({
|
|
9688
9807
|
op: literal("text.edit"),
|
|
9689
9808
|
node: referenceSchema,
|
|
9690
9809
|
field: _enum(["code", "prompt"]),
|
|
9691
|
-
oldText: id$
|
|
9810
|
+
oldText: id$2,
|
|
9692
9811
|
newText: string$1()
|
|
9693
9812
|
}),
|
|
9694
9813
|
strictObject({
|
|
@@ -9699,15 +9818,15 @@ var authoringEditSchema = discriminatedUnion("op", [
|
|
|
9699
9818
|
})
|
|
9700
9819
|
]);
|
|
9701
9820
|
strictObject({
|
|
9702
|
-
baseRevision: id$
|
|
9703
|
-
requestId: id$
|
|
9821
|
+
baseRevision: id$2,
|
|
9822
|
+
requestId: id$2.max(256),
|
|
9704
9823
|
edits: array(authoringEditSchema).min(1).max(1e3)
|
|
9705
9824
|
});
|
|
9706
9825
|
strictObject({
|
|
9707
|
-
revision: id$
|
|
9708
|
-
nodes: array(id$
|
|
9826
|
+
revision: id$2.optional().describe("Fixed revision from a previous read; omit to read the current draft."),
|
|
9827
|
+
nodes: array(id$2).min(1).max(100).optional().describe("Node references to read in one batch. Mutually exclusive with text. Long texts return metadata."),
|
|
9709
9828
|
text: strictObject({
|
|
9710
|
-
node: id$
|
|
9829
|
+
node: id$2,
|
|
9711
9830
|
field: _enum(["code", "prompt"]),
|
|
9712
9831
|
start: int().positive().default(1),
|
|
9713
9832
|
lines: int().min(1).max(200).default(80)
|
|
@@ -9716,42 +9835,43 @@ strictObject({
|
|
|
9716
9835
|
not: { required: ["nodes", "text"] },
|
|
9717
9836
|
description: "Omit nodes and text for an outline; provide nodes for details, or text for an excerpt."
|
|
9718
9837
|
});
|
|
9719
|
-
strictObject({ revisionId: id$
|
|
9838
|
+
strictObject({ revisionId: id$2 });
|
|
9720
9839
|
strictObject({
|
|
9721
|
-
revision: id$
|
|
9722
|
-
query: id$
|
|
9840
|
+
revision: id$2.optional(),
|
|
9841
|
+
query: id$2.max(1e3),
|
|
9723
9842
|
type: type.optional(),
|
|
9724
9843
|
offset: int().nonnegative().default(0),
|
|
9725
9844
|
limit: int().min(1).max(100).default(20)
|
|
9726
9845
|
});
|
|
9727
9846
|
strictObject({
|
|
9728
9847
|
type: type.optional(),
|
|
9729
|
-
action: id$
|
|
9848
|
+
action: id$2.optional()
|
|
9730
9849
|
}).refine((v) => v.type == null || v.action == null, "Choose type or action.");
|
|
9850
|
+
`${[...findEngineContract(currentEngineContract).builtinModules].filter((name) => !name.startsWith("node:")).join(", ")}`;
|
|
9731
9851
|
var authoringDiagnosticSchema = object({
|
|
9732
|
-
code: id$
|
|
9852
|
+
code: id$2,
|
|
9733
9853
|
message: string$1(),
|
|
9734
|
-
nodes: array(id$
|
|
9854
|
+
nodes: array(id$2),
|
|
9735
9855
|
field: string$1().optional(),
|
|
9736
9856
|
line: number().optional(),
|
|
9737
9857
|
column: number().optional()
|
|
9738
9858
|
});
|
|
9739
9859
|
var authoringCheckResponse = object({
|
|
9740
|
-
flowId: id$
|
|
9741
|
-
revisionId: id$
|
|
9860
|
+
flowId: id$2,
|
|
9861
|
+
revisionId: id$2,
|
|
9742
9862
|
valid: boolean(),
|
|
9743
9863
|
diagnostics: array(authoringDiagnosticSchema),
|
|
9744
9864
|
version: literal(1)
|
|
9745
9865
|
});
|
|
9746
9866
|
var authoringEditResponse = object({
|
|
9747
|
-
flowId: id$
|
|
9867
|
+
flowId: id$2,
|
|
9748
9868
|
saved: literal(true),
|
|
9749
|
-
revision: id$
|
|
9750
|
-
nodes: record$3(id$
|
|
9869
|
+
revision: id$2,
|
|
9870
|
+
nodes: record$3(id$2, id$2),
|
|
9751
9871
|
changes: array(object({
|
|
9752
9872
|
index: int(),
|
|
9753
|
-
op: id$
|
|
9754
|
-
node: id$
|
|
9873
|
+
op: id$2,
|
|
9874
|
+
node: id$2.optional()
|
|
9755
9875
|
})),
|
|
9756
9876
|
validation: object({
|
|
9757
9877
|
status: _enum([
|
|
@@ -9764,8 +9884,8 @@ var authoringEditResponse = object({
|
|
|
9764
9884
|
version: literal(1)
|
|
9765
9885
|
});
|
|
9766
9886
|
var authoringReadResponse = object({
|
|
9767
|
-
flowId: id$
|
|
9768
|
-
revision: id$
|
|
9887
|
+
flowId: id$2,
|
|
9888
|
+
revision: id$2,
|
|
9769
9889
|
data: object({
|
|
9770
9890
|
nodes: array(record$3(string$1(), json$2)).optional(),
|
|
9771
9891
|
edges: array(json$2).optional(),
|
|
@@ -9774,12 +9894,12 @@ var authoringReadResponse = object({
|
|
|
9774
9894
|
version: literal(1)
|
|
9775
9895
|
});
|
|
9776
9896
|
var authoringSearchResponse = object({
|
|
9777
|
-
flowId: id$
|
|
9778
|
-
revision: id$
|
|
9897
|
+
flowId: id$2,
|
|
9898
|
+
revision: id$2,
|
|
9779
9899
|
data: object({
|
|
9780
9900
|
matches: array(object({
|
|
9781
|
-
node: id$
|
|
9782
|
-
field: id$
|
|
9901
|
+
node: id$2.optional(),
|
|
9902
|
+
field: id$2,
|
|
9783
9903
|
line: int().optional(),
|
|
9784
9904
|
excerpt: string$1()
|
|
9785
9905
|
})),
|
|
@@ -10315,7 +10435,7 @@ function decodeEntries(values, current) {
|
|
|
10315
10435
|
return parsed.data;
|
|
10316
10436
|
}
|
|
10317
10437
|
//#endregion
|
|
10318
|
-
//#region src/
|
|
10438
|
+
//#region src/connector/common/providerIconSprite.ts
|
|
10319
10439
|
/** Optional artwork must never make an otherwise usable catalog unavailable. */
|
|
10320
10440
|
function providerIconAppearance(metadata, position) {
|
|
10321
10441
|
if (!metadata || typeof metadata != "object" || !position || typeof position != "object") return {};
|
|
@@ -10747,6 +10867,30 @@ function connectorProvider(value) {
|
|
|
10747
10867
|
};
|
|
10748
10868
|
}
|
|
10749
10869
|
//#endregion
|
|
10870
|
+
//#region src/event-source/common/view.ts
|
|
10871
|
+
var id$1 = string$1().min(1).max(256);
|
|
10872
|
+
/** Public projection of a source that Connector validates and Open Flow exposes unchanged. */
|
|
10873
|
+
var eventSourceViewSchema = object({
|
|
10874
|
+
appId: id$1.nullable(),
|
|
10875
|
+
workspaceId: id$1.optional(),
|
|
10876
|
+
installationId: id$1.optional(),
|
|
10877
|
+
organizationId: id$1.optional(),
|
|
10878
|
+
projectId: id$1.optional(),
|
|
10879
|
+
projectKey: id$1.optional(),
|
|
10880
|
+
subscriptionStatus: _enum([
|
|
10881
|
+
"idle",
|
|
10882
|
+
"pending",
|
|
10883
|
+
"ready",
|
|
10884
|
+
"error"
|
|
10885
|
+
]).optional(),
|
|
10886
|
+
lastError: string$1().optional(),
|
|
10887
|
+
signingSecretConfigured: boolean().optional(),
|
|
10888
|
+
manageSubscriptions: boolean().nullable(),
|
|
10889
|
+
verificationTokenConfigured: boolean().nullable(),
|
|
10890
|
+
encryptKeyConfigured: boolean().nullable(),
|
|
10891
|
+
verifiedAt: string$1().nullable()
|
|
10892
|
+
});
|
|
10893
|
+
//#endregion
|
|
10750
10894
|
//#region src/control/common/eventSources.ts
|
|
10751
10895
|
var id = string$1().min(1).max(256);
|
|
10752
10896
|
var eventType = string$1().regex(/^[a-z][a-z0-9_.:]{0,127}$/);
|
|
@@ -10766,29 +10910,12 @@ var eventSourceSchema = object({
|
|
|
10766
10910
|
"fireflies",
|
|
10767
10911
|
"jira"
|
|
10768
10912
|
]),
|
|
10769
|
-
|
|
10770
|
-
workspaceId: id.optional(),
|
|
10771
|
-
installationId: id.optional(),
|
|
10772
|
-
organizationId: id.optional(),
|
|
10773
|
-
projectId: id.optional(),
|
|
10774
|
-
projectKey: id.optional(),
|
|
10775
|
-
subscriptionStatus: _enum([
|
|
10776
|
-
"idle",
|
|
10777
|
-
"pending",
|
|
10778
|
-
"ready",
|
|
10779
|
-
"error"
|
|
10780
|
-
]).optional(),
|
|
10781
|
-
lastError: string$1().optional(),
|
|
10782
|
-
signingSecretConfigured: boolean().optional(),
|
|
10913
|
+
...eventSourceViewSchema.shape,
|
|
10783
10914
|
connectionId: id,
|
|
10784
10915
|
teamId: id.nullable(),
|
|
10785
10916
|
enabled: boolean(),
|
|
10786
10917
|
eventTypes: array(eventType),
|
|
10787
|
-
manageSubscriptions: boolean().nullable(),
|
|
10788
|
-
verificationTokenConfigured: boolean().nullable(),
|
|
10789
|
-
encryptKeyConfigured: boolean().nullable(),
|
|
10790
10918
|
endpointUrl: string$1().nullable(),
|
|
10791
|
-
verifiedAt: string$1().nullable(),
|
|
10792
10919
|
lastReceivedAt: string$1().nullable(),
|
|
10793
10920
|
updatedAt: string$1(),
|
|
10794
10921
|
consumers: array(object({
|
|
@@ -10797,21 +10924,6 @@ var eventSourceSchema = object({
|
|
|
10797
10924
|
triggerNodeId: id
|
|
10798
10925
|
}))
|
|
10799
10926
|
});
|
|
10800
|
-
eventSourceSchema.pick({
|
|
10801
|
-
appId: true,
|
|
10802
|
-
workspaceId: true,
|
|
10803
|
-
installationId: true,
|
|
10804
|
-
organizationId: true,
|
|
10805
|
-
projectId: true,
|
|
10806
|
-
projectKey: true,
|
|
10807
|
-
subscriptionStatus: true,
|
|
10808
|
-
lastError: true,
|
|
10809
|
-
signingSecretConfigured: true,
|
|
10810
|
-
manageSubscriptions: true,
|
|
10811
|
-
verificationTokenConfigured: true,
|
|
10812
|
-
encryptKeyConfigured: true,
|
|
10813
|
-
verifiedAt: true
|
|
10814
|
-
});
|
|
10815
10927
|
function decodeEventSource(value) {
|
|
10816
10928
|
return eventSourceSchema.parse(value);
|
|
10817
10929
|
}
|
|
@@ -11666,7 +11778,7 @@ function decodeRunEvent(value) {
|
|
|
11666
11778
|
switch (kind) {
|
|
11667
11779
|
case "node.started": {
|
|
11668
11780
|
const nodeKind = payload.nodeKind;
|
|
11669
|
-
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();
|
|
11781
|
+
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
11670
11782
|
return {
|
|
11671
11783
|
...base,
|
|
11672
11784
|
kind,
|