@oomol-lab/open-flow 0.1.0-beta.12 → 0.1.0-beta.14
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/{DesignerIcon-ckcKnxxJ.js → DesignerIcon-Bzpx8BtG.js} +7 -2
- package/dist/browser/{_virtual_open-flow-twemoji-DJwKsM_w.js → _virtual_open-flow-twemoji-CpHJOEsk.js} +4028 -2
- package/dist/browser/carbon-Cn-DTyjG.js +54 -0
- package/dist/browser/{createResourceDialog-2pESP2wA.js → createResourceDialog-Cdixb0WC.js} +13 -13
- package/dist/browser/{dist-BZ5PTFAs.js → dist-D1VYgicl.js} +426 -305
- package/dist/browser/{dist-Bmb2mZvW.js → dist-DYjIVIZC.js} +22 -22
- package/dist/browser/{dist-Ce71Szg7.js → dist-DwvhuMxw.js} +15 -15
- package/dist/browser/{dist-DY4qlXTK.js → dist-TJfrvoIQ.js} +21 -21
- package/dist/browser/{esm-BPZ0P6x4.js → esm-3CD4_kEl.js} +1 -1
- package/dist/browser/flow-authoring-node.d.ts +4 -0
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +1525 -1454
- package/dist/browser/flow-change.d.ts +42 -0
- package/dist/browser/flow-change.js +1423 -1387
- package/dist/browser/{flowChanges-CHPdBmZb.js → flowChanges-CNSahvWH.js} +2791 -1609
- package/dist/browser/{flowWorkspace-BLGcgnHj.js → flowWorkspace-DvitOPqI.js} +50474 -49229
- package/dist/browser/inputValues-CczmpMHr.js +30 -0
- package/dist/browser/licenses.md +3 -1
- package/dist/browser/{select-Dn3vpjGC.js → select-DCGY8Lom.js} +2569 -2013
- package/dist/browser/{typeScriptSession-BoV-FDl3.js → typeScriptSession-DnAmJCzu.js} +6 -6
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +828 -767
- package/dist/browser/workbenchSelect-DdXtOYD1.js +30 -0
- package/dist/common/control-api-conformance.js +5340 -218
- package/dist/common/control-api.d.ts +244 -11
- package/dist/common/control-api.js +2023 -1615
- package/dist/common/control-requests.js +1153 -1117
- package/dist/common/flow-agent.d.ts +10 -0
- package/dist/common/flow-encoding.js +162 -127
- package/dist/common/flow-semantics.d.ts +4 -2
- package/dist/common/flow-semantics.js +4495 -3448
- package/dist/common/mcp.js +1351 -1308
- package/dist/common/run-events.js +2 -1
- package/dist/common/run-lifecycle.d.ts +4 -0
- package/dist/common/run-lifecycle.js +30 -0
- package/dist/common/run-results.d.ts +57 -0
- package/dist/common/runtime-contract.d.ts +24 -0
- package/dist/common/scheduler.d.ts +29 -9
- package/dist/common/scheduler.js +3246 -2323
- package/package.json +1 -1
- package/dist/browser/carbon-DMCVsjHo.js +0 -53
- package/dist/browser/waitNotificationInputs-BFbQUOyp.js +0 -29
- package/dist/browser/workbenchSelect-DzF8oik9.js +0 -435
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentInput, AgentTool, JsonValue, ManagedTaskDefinition, ManagedTaskExecutor } from '../browser/flow-change.js';
|
|
2
|
+
export type AgentConfig = Extract<ManagedTaskExecutor, {
|
|
3
|
+
readonly kind: 'agent';
|
|
4
|
+
}>;
|
|
5
|
+
export declare function agentConfigIssues(task: ManagedTaskDefinition, tasks: Readonly<Record<string, ManagedTaskDefinition>>): readonly string[];
|
|
6
|
+
export declare function agentInput(source: Exclude<AgentInput, {
|
|
7
|
+
readonly kind: 'model';
|
|
8
|
+
}>, input: Readonly<Record<string, JsonValue>>): JsonValue;
|
|
9
|
+
export declare function agentToolSchema(tool: AgentTool): JsonValue;
|
|
10
|
+
export declare function agentToolInput(tool: AgentTool, input: Readonly<Record<string, JsonValue>>, argumentsValue: unknown): Readonly<Record<string, JsonValue>>;
|
|
@@ -3993,8 +3993,7 @@ var qo = /*@__PURE__*/ T("ZodObject", (e, t) => {
|
|
|
3993
3993
|
function H(e, t) {
|
|
3994
3994
|
return new qo({
|
|
3995
3995
|
type: "object",
|
|
3996
|
-
shape: e,
|
|
3997
|
-
catchall: Go(),
|
|
3996
|
+
shape: e ?? {},
|
|
3998
3997
|
...v(t)
|
|
3999
3998
|
});
|
|
4000
3999
|
}
|
|
@@ -4301,18 +4300,49 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4301
4300
|
name: q,
|
|
4302
4301
|
moduleId: q,
|
|
4303
4302
|
capabilities: V(zs).optional()
|
|
4304
|
-
}), Vs = H({
|
|
4303
|
+
}), Vs = U([H({
|
|
4304
|
+
kind: K("value"),
|
|
4305
|
+
value: J
|
|
4306
|
+
}), H({
|
|
4307
|
+
kind: K("input"),
|
|
4308
|
+
input: q
|
|
4309
|
+
})]), Hs = U([Vs, H({ kind: K("model") })]), Us = H({
|
|
4305
4310
|
...Rs,
|
|
4306
4311
|
name: q,
|
|
4307
|
-
executor: U([
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4312
|
+
executor: U([
|
|
4313
|
+
H({
|
|
4314
|
+
kind: K("connector"),
|
|
4315
|
+
action: q,
|
|
4316
|
+
connectionId: q.optional()
|
|
4317
|
+
}),
|
|
4318
|
+
H({
|
|
4319
|
+
kind: K("llm"),
|
|
4320
|
+
mode: G(["chat", "json"])
|
|
4321
|
+
}),
|
|
4322
|
+
H({
|
|
4323
|
+
kind: K("agent"),
|
|
4324
|
+
code: B().optional(),
|
|
4325
|
+
model: q,
|
|
4326
|
+
prompt: Vs,
|
|
4327
|
+
system: q,
|
|
4328
|
+
maxRounds: z(),
|
|
4329
|
+
tools: V(H({
|
|
4330
|
+
id: q,
|
|
4331
|
+
name: q,
|
|
4332
|
+
description: q,
|
|
4333
|
+
action: q,
|
|
4334
|
+
connectionId: q.optional(),
|
|
4335
|
+
approval: B(),
|
|
4336
|
+
inputs: V(Y.extend({ source: Hs }))
|
|
4337
|
+
})),
|
|
4338
|
+
notification: H({
|
|
4339
|
+
taskId: q,
|
|
4340
|
+
messageHandle: q,
|
|
4341
|
+
inputs: W(q, Vs)
|
|
4342
|
+
}).optional()
|
|
4343
|
+
})
|
|
4344
|
+
])
|
|
4345
|
+
}), Ws = {
|
|
4316
4346
|
input: Y,
|
|
4317
4347
|
cases: V(H({
|
|
4318
4348
|
output: q,
|
|
@@ -4345,7 +4375,7 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4345
4375
|
}))
|
|
4346
4376
|
})),
|
|
4347
4377
|
defaultOutput: q.optional()
|
|
4348
|
-
},
|
|
4378
|
+
}, Gs = {
|
|
4349
4379
|
actions: U([Qo([K("continue")]), Qo([K("approve"), K("reject")])]),
|
|
4350
4380
|
prompt: q,
|
|
4351
4381
|
notification: H({
|
|
@@ -4353,7 +4383,7 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4353
4383
|
messageHandle: q,
|
|
4354
4384
|
taskId: q
|
|
4355
4385
|
}).optional()
|
|
4356
|
-
},
|
|
4386
|
+
}, Ks = {
|
|
4357
4387
|
inputsDef: V(Y),
|
|
4358
4388
|
options: H({
|
|
4359
4389
|
allowedMethods: As.optional(),
|
|
@@ -4363,7 +4393,7 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4363
4393
|
responseHeaders: W(q, q).optional(),
|
|
4364
4394
|
responseStatusCode: z().optional()
|
|
4365
4395
|
}).optional()
|
|
4366
|
-
},
|
|
4396
|
+
}, qs = V(U([H({
|
|
4367
4397
|
type: K("cron"),
|
|
4368
4398
|
expression: q,
|
|
4369
4399
|
timezone: q
|
|
@@ -4377,7 +4407,7 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4377
4407
|
"week"
|
|
4378
4408
|
]),
|
|
4379
4409
|
value: z()
|
|
4380
|
-
})])),
|
|
4410
|
+
})])), Js = {
|
|
4381
4411
|
configSchema: J,
|
|
4382
4412
|
definitionVersion: z(),
|
|
4383
4413
|
description: q,
|
|
@@ -4386,7 +4416,7 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4386
4416
|
name: q,
|
|
4387
4417
|
payloadSchema: J,
|
|
4388
4418
|
provider: q
|
|
4389
|
-
},
|
|
4419
|
+
}, Ys = H({
|
|
4390
4420
|
body: H({
|
|
4391
4421
|
allowArray: B(),
|
|
4392
4422
|
allowEmpty: B(),
|
|
@@ -4406,7 +4436,7 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4406
4436
|
"PUT"
|
|
4407
4437
|
])),
|
|
4408
4438
|
successStatus: z()
|
|
4409
|
-
}),
|
|
4439
|
+
}), Xs = {
|
|
4410
4440
|
name: q,
|
|
4411
4441
|
description: q.optional(),
|
|
4412
4442
|
icon: q.optional()
|
|
@@ -4416,11 +4446,11 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4416
4446
|
description: q.optional(),
|
|
4417
4447
|
icon: q.optional(),
|
|
4418
4448
|
timeoutMs: z().optional()
|
|
4419
|
-
},
|
|
4449
|
+
}, Zs = U([
|
|
4420
4450
|
H({
|
|
4421
4451
|
...X,
|
|
4422
4452
|
kind: K("condition"),
|
|
4423
|
-
...
|
|
4453
|
+
...Ws
|
|
4424
4454
|
}),
|
|
4425
4455
|
H({
|
|
4426
4456
|
...X,
|
|
@@ -4448,100 +4478,100 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4448
4478
|
...X,
|
|
4449
4479
|
kind: K("wait"),
|
|
4450
4480
|
input: Y,
|
|
4451
|
-
...
|
|
4481
|
+
...Gs
|
|
4452
4482
|
}).omit({ timeoutMs: !0 }),
|
|
4453
4483
|
H({
|
|
4454
|
-
...
|
|
4484
|
+
...Xs,
|
|
4455
4485
|
kind: K("manual")
|
|
4456
4486
|
}),
|
|
4457
4487
|
H({
|
|
4458
|
-
...
|
|
4488
|
+
...Xs,
|
|
4459
4489
|
kind: K("webhook"),
|
|
4460
|
-
...
|
|
4490
|
+
...Ks
|
|
4461
4491
|
}),
|
|
4462
4492
|
H({
|
|
4463
|
-
...
|
|
4493
|
+
...Xs,
|
|
4464
4494
|
kind: K("cron"),
|
|
4465
|
-
cronTimes:
|
|
4495
|
+
cronTimes: qs
|
|
4466
4496
|
}),
|
|
4467
4497
|
H({
|
|
4468
|
-
...
|
|
4498
|
+
...Xs,
|
|
4469
4499
|
kind: K("poll"),
|
|
4470
4500
|
bindingId: q,
|
|
4471
4501
|
config: W(q, J),
|
|
4472
4502
|
definition: H({
|
|
4473
|
-
...
|
|
4503
|
+
...Js,
|
|
4474
4504
|
type: K("poll")
|
|
4475
4505
|
}),
|
|
4476
|
-
pollTimes:
|
|
4506
|
+
pollTimes: qs
|
|
4477
4507
|
}),
|
|
4478
4508
|
H({
|
|
4479
|
-
...
|
|
4509
|
+
...Xs,
|
|
4480
4510
|
kind: K("integration"),
|
|
4481
4511
|
bindingId: q,
|
|
4482
4512
|
config: W(q, J),
|
|
4483
4513
|
definition: H({
|
|
4484
|
-
...
|
|
4514
|
+
...Js,
|
|
4485
4515
|
type: K("integration"),
|
|
4486
|
-
endpoint:
|
|
4516
|
+
endpoint: Ys
|
|
4487
4517
|
})
|
|
4488
4518
|
})
|
|
4489
|
-
]),
|
|
4519
|
+
]), Qs = U([H({ kind: K("flow") }), H({
|
|
4490
4520
|
kind: K("subflow"),
|
|
4491
4521
|
id: q
|
|
4492
|
-
})]),
|
|
4522
|
+
})]), $s = H({
|
|
4493
4523
|
source: q,
|
|
4494
4524
|
target: q,
|
|
4495
4525
|
sourceHandle: q.optional()
|
|
4496
4526
|
}), Z = {
|
|
4497
4527
|
nodeId: q,
|
|
4498
|
-
target:
|
|
4499
|
-
},
|
|
4528
|
+
target: Qs
|
|
4529
|
+
}, ec = H({
|
|
4500
4530
|
name: q,
|
|
4501
4531
|
inputs: V(Y),
|
|
4502
4532
|
outputs: V(js.extend({ sources: V(U([Ns, Ps])) }))
|
|
4503
|
-
}),
|
|
4504
|
-
nodes: W(q,
|
|
4505
|
-
edges: V(
|
|
4506
|
-
}),
|
|
4533
|
+
}), tc = H({
|
|
4534
|
+
nodes: W(q, Zs),
|
|
4535
|
+
edges: V($s)
|
|
4536
|
+
}), nc = H({
|
|
4507
4537
|
kind: G(["connection", "variable"]),
|
|
4508
4538
|
target: q
|
|
4509
|
-
}),
|
|
4539
|
+
}), rc = H({
|
|
4510
4540
|
name: q,
|
|
4511
4541
|
imports: As,
|
|
4512
4542
|
source: q
|
|
4513
|
-
}),
|
|
4514
|
-
bindings: W(q,
|
|
4515
|
-
graph:
|
|
4516
|
-
subflows: W(q,
|
|
4517
|
-
tasks: W(q,
|
|
4518
|
-
}),
|
|
4543
|
+
}), ic = H({
|
|
4544
|
+
bindings: W(q, nc),
|
|
4545
|
+
graph: tc,
|
|
4546
|
+
subflows: W(q, ec.extend({ graph: tc })),
|
|
4547
|
+
tasks: W(q, Us)
|
|
4548
|
+
}), ac = H({
|
|
4519
4549
|
modelVersion: K(1),
|
|
4520
|
-
document:
|
|
4521
|
-
modules: W(q,
|
|
4522
|
-
}),
|
|
4550
|
+
document: ic,
|
|
4551
|
+
modules: W(q, rc)
|
|
4552
|
+
}), oc = ac.extend({
|
|
4523
4553
|
kind: K("open-flow-flow-revision"),
|
|
4524
4554
|
version: K(1)
|
|
4525
4555
|
});
|
|
4526
|
-
function
|
|
4527
|
-
return ks(e),
|
|
4556
|
+
function sc(e) {
|
|
4557
|
+
return ks(e), ic.parse(e);
|
|
4528
4558
|
}
|
|
4529
|
-
function
|
|
4530
|
-
return ks(e),
|
|
4559
|
+
function cc(e) {
|
|
4560
|
+
return ks(e), ac.parse(e);
|
|
4531
4561
|
}
|
|
4532
|
-
function
|
|
4533
|
-
ks(e)
|
|
4534
|
-
let t = e;
|
|
4562
|
+
function lc(e) {
|
|
4563
|
+
ks(e);
|
|
4564
|
+
let t = oc.parse(e);
|
|
4535
4565
|
return {
|
|
4536
4566
|
modelVersion: t.modelVersion,
|
|
4537
4567
|
document: t.document,
|
|
4538
4568
|
modules: t.modules
|
|
4539
4569
|
};
|
|
4540
4570
|
}
|
|
4541
|
-
var
|
|
4571
|
+
var uc = {
|
|
4542
4572
|
"binding.create": {
|
|
4543
4573
|
bindingId: q,
|
|
4544
|
-
binding:
|
|
4574
|
+
binding: nc
|
|
4545
4575
|
},
|
|
4546
4576
|
"binding.delete": { bindingId: q },
|
|
4547
4577
|
"binding.target.set": {
|
|
@@ -4550,16 +4580,16 @@ var cc = {
|
|
|
4550
4580
|
value: q
|
|
4551
4581
|
},
|
|
4552
4582
|
"graph.edge.connect": {
|
|
4553
|
-
target:
|
|
4554
|
-
edge:
|
|
4583
|
+
target: Qs,
|
|
4584
|
+
edge: $s
|
|
4555
4585
|
},
|
|
4556
4586
|
"graph.edge.disconnect": {
|
|
4557
|
-
target:
|
|
4558
|
-
edge:
|
|
4587
|
+
target: Qs,
|
|
4588
|
+
edge: $s
|
|
4559
4589
|
},
|
|
4560
4590
|
"graph.node.create": {
|
|
4561
4591
|
...Z,
|
|
4562
|
-
node:
|
|
4592
|
+
node: Zs
|
|
4563
4593
|
},
|
|
4564
4594
|
"graph.node.delete": Z,
|
|
4565
4595
|
"graph.node.field.set": U([H({
|
|
@@ -4592,8 +4622,8 @@ var cc = {
|
|
|
4592
4622
|
},
|
|
4593
4623
|
"graph.node.condition.set": {
|
|
4594
4624
|
...Z,
|
|
4595
|
-
before: H(
|
|
4596
|
-
value: H(
|
|
4625
|
+
before: H(Ws),
|
|
4626
|
+
value: H(Ws)
|
|
4597
4627
|
},
|
|
4598
4628
|
"graph.node.values.set": {
|
|
4599
4629
|
...Z,
|
|
@@ -4603,14 +4633,14 @@ var cc = {
|
|
|
4603
4633
|
"graph.node.wait.set": {
|
|
4604
4634
|
...Z,
|
|
4605
4635
|
target: H({ kind: K("flow") }),
|
|
4606
|
-
before: H(
|
|
4607
|
-
value: H(
|
|
4636
|
+
before: H(Gs),
|
|
4637
|
+
value: H(Gs)
|
|
4608
4638
|
},
|
|
4609
4639
|
"graph.node.webhook.set": {
|
|
4610
4640
|
...Z,
|
|
4611
4641
|
target: H({ kind: K("flow") }),
|
|
4612
|
-
before: H(
|
|
4613
|
-
value: H(
|
|
4642
|
+
before: H(Ks),
|
|
4643
|
+
value: H(Ks)
|
|
4614
4644
|
},
|
|
4615
4645
|
"graph.node.task.ports.set": {
|
|
4616
4646
|
...Z,
|
|
@@ -4635,12 +4665,12 @@ var cc = {
|
|
|
4635
4665
|
},
|
|
4636
4666
|
"graph.trigger.schedule.set": {
|
|
4637
4667
|
nodeId: q,
|
|
4638
|
-
before:
|
|
4639
|
-
value:
|
|
4668
|
+
before: qs,
|
|
4669
|
+
value: qs
|
|
4640
4670
|
},
|
|
4641
4671
|
"module.create": {
|
|
4642
4672
|
moduleId: q,
|
|
4643
|
-
module:
|
|
4673
|
+
module: rc
|
|
4644
4674
|
},
|
|
4645
4675
|
"module.delete": { moduleId: q },
|
|
4646
4676
|
"module.rename": {
|
|
@@ -4657,17 +4687,17 @@ var cc = {
|
|
|
4657
4687
|
},
|
|
4658
4688
|
"subflow.create": {
|
|
4659
4689
|
subflowId: q,
|
|
4660
|
-
subflow:
|
|
4690
|
+
subflow: ec.extend({ graph: tc })
|
|
4661
4691
|
},
|
|
4662
4692
|
"subflow.definition.set": {
|
|
4663
4693
|
subflowId: q,
|
|
4664
|
-
before:
|
|
4665
|
-
definition:
|
|
4694
|
+
before: ec,
|
|
4695
|
+
definition: ec
|
|
4666
4696
|
},
|
|
4667
4697
|
"subflow.delete": { subflowId: q },
|
|
4668
4698
|
"task.create": {
|
|
4669
4699
|
taskId: q,
|
|
4670
|
-
task:
|
|
4700
|
+
task: Us
|
|
4671
4701
|
},
|
|
4672
4702
|
"task.delete": { taskId: q },
|
|
4673
4703
|
"task.connector.connection.set": {
|
|
@@ -4675,6 +4705,11 @@ var cc = {
|
|
|
4675
4705
|
before: q.optional(),
|
|
4676
4706
|
value: q.optional()
|
|
4677
4707
|
},
|
|
4708
|
+
"task.agent.set": {
|
|
4709
|
+
taskId: q,
|
|
4710
|
+
before: Us,
|
|
4711
|
+
value: Us
|
|
4712
|
+
},
|
|
4678
4713
|
"task.llm.mode.set": {
|
|
4679
4714
|
taskId: q,
|
|
4680
4715
|
before: G(["chat", "json"]),
|
|
@@ -4686,30 +4721,30 @@ var cc = {
|
|
|
4686
4721
|
value: q
|
|
4687
4722
|
}
|
|
4688
4723
|
};
|
|
4689
|
-
V(U([...new Map(Object.entries(
|
|
4724
|
+
V(U([...new Map(Object.entries(uc).map(([e, t]) => [e, t instanceof L ? t : H({
|
|
4690
4725
|
kind: K(e),
|
|
4691
4726
|
...t
|
|
4692
4727
|
})])).values()])).min(1);
|
|
4693
4728
|
//#endregion
|
|
4694
4729
|
//#region src/flow/common/encoding.ts
|
|
4695
|
-
var
|
|
4696
|
-
function
|
|
4730
|
+
var dc = new TextEncoder();
|
|
4731
|
+
function fc(e) {
|
|
4697
4732
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
4698
|
-
if (Array.isArray(e)) return `[${e.map(
|
|
4733
|
+
if (Array.isArray(e)) return `[${e.map(fc).join(",")}]`;
|
|
4699
4734
|
let t = e;
|
|
4700
|
-
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${
|
|
4735
|
+
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${fc(t[e])}`).join(",")}}`;
|
|
4701
4736
|
}
|
|
4702
|
-
function
|
|
4703
|
-
return
|
|
4737
|
+
function pc(e) {
|
|
4738
|
+
return dc.encode(fc(e));
|
|
4704
4739
|
}
|
|
4705
|
-
async function
|
|
4740
|
+
async function mc(e) {
|
|
4706
4741
|
let t = new Uint8Array(e.byteLength);
|
|
4707
4742
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
4708
4743
|
}
|
|
4709
4744
|
function Q(e) {
|
|
4710
4745
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
4711
4746
|
}
|
|
4712
|
-
function
|
|
4747
|
+
function hc(e) {
|
|
4713
4748
|
return "handle" in e ? {
|
|
4714
4749
|
...e.description == null ? {} : { description: e.description },
|
|
4715
4750
|
handle: e.handle,
|
|
@@ -4722,9 +4757,9 @@ function pc(e) {
|
|
|
4722
4757
|
};
|
|
4723
4758
|
}
|
|
4724
4759
|
function $(e) {
|
|
4725
|
-
return e.map(
|
|
4760
|
+
return e.map(hc);
|
|
4726
4761
|
}
|
|
4727
|
-
function
|
|
4762
|
+
function gc(e) {
|
|
4728
4763
|
switch (e.kind) {
|
|
4729
4764
|
case "sources": return {
|
|
4730
4765
|
kind: e.kind,
|
|
@@ -4736,10 +4771,10 @@ function mc(e) {
|
|
|
4736
4771
|
};
|
|
4737
4772
|
}
|
|
4738
4773
|
}
|
|
4739
|
-
function
|
|
4740
|
-
return Object.fromEntries(Q(e).map(([e, t]) => [e,
|
|
4774
|
+
function _c(e) {
|
|
4775
|
+
return Object.fromEntries(Q(e).map(([e, t]) => [e, gc(t)]));
|
|
4741
4776
|
}
|
|
4742
|
-
function
|
|
4777
|
+
function vc(e) {
|
|
4743
4778
|
return e.map((e) => ({
|
|
4744
4779
|
...e.description == null ? {} : { description: e.description },
|
|
4745
4780
|
handle: e.handle,
|
|
@@ -4748,12 +4783,12 @@ function gc(e) {
|
|
|
4748
4783
|
sources: e.sources.map((e) => ({ ...e }))
|
|
4749
4784
|
}));
|
|
4750
4785
|
}
|
|
4751
|
-
function
|
|
4752
|
-
if (!("inputs" in e)) return
|
|
4786
|
+
function yc(e) {
|
|
4787
|
+
if (!("inputs" in e)) return Ec(e);
|
|
4753
4788
|
let t = {
|
|
4754
4789
|
...e.description == null ? {} : { description: e.description },
|
|
4755
4790
|
...e.icon == null ? {} : { icon: e.icon },
|
|
4756
|
-
inputs:
|
|
4791
|
+
inputs: _c(e.inputs),
|
|
4757
4792
|
...e.name == null ? {} : { name: e.name },
|
|
4758
4793
|
...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
|
|
4759
4794
|
};
|
|
@@ -4772,7 +4807,7 @@ function _c(e) {
|
|
|
4772
4807
|
...e.defaultOutput == null ? {} : { defaultOutput: e.defaultOutput },
|
|
4773
4808
|
input: {
|
|
4774
4809
|
handle: e.input.handle,
|
|
4775
|
-
...
|
|
4810
|
+
...hc(e.input)
|
|
4776
4811
|
},
|
|
4777
4812
|
kind: e.kind
|
|
4778
4813
|
};
|
|
@@ -4787,7 +4822,7 @@ function _c(e) {
|
|
|
4787
4822
|
taskId: e.taskId
|
|
4788
4823
|
}) : Object.assign({}, t, {
|
|
4789
4824
|
kind: e.kind,
|
|
4790
|
-
task:
|
|
4825
|
+
task: Sc(e.task)
|
|
4791
4826
|
});
|
|
4792
4827
|
return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
|
|
4793
4828
|
}
|
|
@@ -4801,11 +4836,11 @@ function _c(e) {
|
|
|
4801
4836
|
actions: e.actions,
|
|
4802
4837
|
input: {
|
|
4803
4838
|
handle: e.input.handle,
|
|
4804
|
-
...
|
|
4839
|
+
...hc(e.input)
|
|
4805
4840
|
},
|
|
4806
4841
|
kind: e.kind,
|
|
4807
4842
|
...e.notification == null ? {} : { notification: {
|
|
4808
|
-
inputs:
|
|
4843
|
+
inputs: _c(e.notification.inputs),
|
|
4809
4844
|
messageHandle: e.notification.messageHandle,
|
|
4810
4845
|
taskId: e.notification.taskId
|
|
4811
4846
|
} },
|
|
@@ -4813,16 +4848,16 @@ function _c(e) {
|
|
|
4813
4848
|
};
|
|
4814
4849
|
}
|
|
4815
4850
|
}
|
|
4816
|
-
function
|
|
4851
|
+
function bc(e) {
|
|
4817
4852
|
return {
|
|
4818
4853
|
edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
|
|
4819
|
-
let n =
|
|
4854
|
+
let n = fc(e), r = fc(t);
|
|
4820
4855
|
return n < r ? -1 : +(n > r);
|
|
4821
4856
|
}),
|
|
4822
|
-
nodes: Object.fromEntries(Q(e.nodes).map(([e, t]) => [e,
|
|
4857
|
+
nodes: Object.fromEntries(Q(e.nodes).map(([e, t]) => [e, yc(t)]))
|
|
4823
4858
|
};
|
|
4824
4859
|
}
|
|
4825
|
-
function
|
|
4860
|
+
function xc(e) {
|
|
4826
4861
|
return {
|
|
4827
4862
|
executor: e.executor,
|
|
4828
4863
|
inputs: $(e.inputs),
|
|
@@ -4830,7 +4865,7 @@ function yc(e) {
|
|
|
4830
4865
|
outputs: $(e.outputs)
|
|
4831
4866
|
};
|
|
4832
4867
|
}
|
|
4833
|
-
function
|
|
4868
|
+
function Sc(e) {
|
|
4834
4869
|
return {
|
|
4835
4870
|
...e.capabilities == null ? {} : { capabilities: e.capabilities },
|
|
4836
4871
|
inputs: $(e.inputs),
|
|
@@ -4839,7 +4874,7 @@ function bc(e) {
|
|
|
4839
4874
|
outputs: $(e.outputs)
|
|
4840
4875
|
};
|
|
4841
4876
|
}
|
|
4842
|
-
function
|
|
4877
|
+
function Cc(e) {
|
|
4843
4878
|
return {
|
|
4844
4879
|
configSchema: e.configSchema,
|
|
4845
4880
|
definitionVersion: e.definitionVersion,
|
|
@@ -4861,7 +4896,7 @@ function xc(e) {
|
|
|
4861
4896
|
type: e.type
|
|
4862
4897
|
};
|
|
4863
4898
|
}
|
|
4864
|
-
function
|
|
4899
|
+
function wc(e) {
|
|
4865
4900
|
return {
|
|
4866
4901
|
...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
|
|
4867
4902
|
...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
|
|
@@ -4871,7 +4906,7 @@ function Sc(e) {
|
|
|
4871
4906
|
...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
|
|
4872
4907
|
};
|
|
4873
4908
|
}
|
|
4874
|
-
function
|
|
4909
|
+
function Tc(e) {
|
|
4875
4910
|
switch (e.type) {
|
|
4876
4911
|
case "cron": return {
|
|
4877
4912
|
expression: e.expression,
|
|
@@ -4885,7 +4920,7 @@ function Cc(e) {
|
|
|
4885
4920
|
};
|
|
4886
4921
|
}
|
|
4887
4922
|
}
|
|
4888
|
-
function
|
|
4923
|
+
function Ec(e) {
|
|
4889
4924
|
let t = (t) => ({
|
|
4890
4925
|
...e.description == null ? {} : { description: e.description },
|
|
4891
4926
|
...e.icon == null ? {} : { icon: e.icon },
|
|
@@ -4898,63 +4933,63 @@ function wc(e) {
|
|
|
4898
4933
|
...t(e.kind),
|
|
4899
4934
|
inputsDef: e.inputsDef.map((e) => ({
|
|
4900
4935
|
handle: e.handle,
|
|
4901
|
-
...
|
|
4936
|
+
...hc(e)
|
|
4902
4937
|
})),
|
|
4903
|
-
...e.options == null ? {} : { options:
|
|
4938
|
+
...e.options == null ? {} : { options: wc(e.options) }
|
|
4904
4939
|
};
|
|
4905
4940
|
case "cron": return {
|
|
4906
4941
|
...t(e.kind),
|
|
4907
|
-
cronTimes: e.cronTimes.map(
|
|
4942
|
+
cronTimes: e.cronTimes.map(Tc)
|
|
4908
4943
|
};
|
|
4909
4944
|
case "poll": return {
|
|
4910
4945
|
...t(e.kind),
|
|
4911
4946
|
bindingId: e.bindingId,
|
|
4912
4947
|
config: e.config,
|
|
4913
|
-
definition:
|
|
4914
|
-
pollTimes: e.pollTimes.map(
|
|
4948
|
+
definition: Cc(e.definition),
|
|
4949
|
+
pollTimes: e.pollTimes.map(Tc)
|
|
4915
4950
|
};
|
|
4916
4951
|
case "integration": return {
|
|
4917
4952
|
...t(e.kind),
|
|
4918
4953
|
bindingId: e.bindingId,
|
|
4919
4954
|
config: e.config,
|
|
4920
|
-
definition:
|
|
4955
|
+
definition: Cc(e.definition)
|
|
4921
4956
|
};
|
|
4922
4957
|
}
|
|
4923
4958
|
}
|
|
4924
|
-
function
|
|
4959
|
+
function Dc(e) {
|
|
4925
4960
|
return {
|
|
4926
4961
|
bindings: Object.fromEntries(Q(e.bindings)),
|
|
4927
|
-
graph:
|
|
4962
|
+
graph: bc(e.graph),
|
|
4928
4963
|
subflows: Object.fromEntries(Q(e.subflows).map(([e, t]) => [e, {
|
|
4929
|
-
graph:
|
|
4964
|
+
graph: bc(t.graph),
|
|
4930
4965
|
inputs: $(t.inputs),
|
|
4931
4966
|
name: t.name,
|
|
4932
|
-
outputs:
|
|
4967
|
+
outputs: vc(t.outputs)
|
|
4933
4968
|
}])),
|
|
4934
|
-
tasks: Object.fromEntries(Q(e.tasks).map(([e, t]) => [e,
|
|
4969
|
+
tasks: Object.fromEntries(Q(e.tasks).map(([e, t]) => [e, xc(t)]))
|
|
4935
4970
|
};
|
|
4936
4971
|
}
|
|
4937
|
-
function
|
|
4972
|
+
function Oc(e) {
|
|
4938
4973
|
return {
|
|
4939
4974
|
imports: e.imports.toSorted(),
|
|
4940
4975
|
name: e.name,
|
|
4941
4976
|
source: e.source
|
|
4942
4977
|
};
|
|
4943
4978
|
}
|
|
4944
|
-
function
|
|
4979
|
+
function kc(e) {
|
|
4945
4980
|
return {
|
|
4946
|
-
document:
|
|
4981
|
+
document: Dc(e.document),
|
|
4947
4982
|
kind: "open-flow-flow-revision",
|
|
4948
4983
|
modelVersion: e.modelVersion,
|
|
4949
|
-
modules: Object.fromEntries(Q(e.modules).map(([e, t]) => [e,
|
|
4984
|
+
modules: Object.fromEntries(Q(e.modules).map(([e, t]) => [e, Oc(t)])),
|
|
4950
4985
|
version: 1
|
|
4951
4986
|
};
|
|
4952
4987
|
}
|
|
4953
|
-
function
|
|
4954
|
-
return
|
|
4988
|
+
function Ac(e) {
|
|
4989
|
+
return pc(kc(e));
|
|
4955
4990
|
}
|
|
4956
|
-
function
|
|
4957
|
-
return
|
|
4991
|
+
function jc(e) {
|
|
4992
|
+
return lc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
|
|
4958
4993
|
}
|
|
4959
4994
|
//#endregion
|
|
4960
|
-
export {
|
|
4995
|
+
export { Dc as canonicalDocument, bc as canonicalGraph, pc as canonicalJsonBytes, Oc as canonicalModule, vc as canonicalOutputs, $ as canonicalPorts, xc as canonicalTask, sc as decodeFlowDocument, jc as decodeRevision, cc as decodeRevisionContent, mc as digestBytes, Ac as encodeRevision, Os as maxJsonDepth };
|
|
@@ -4,6 +4,7 @@ import type { ConnectorCapability, FlowDocument, Graph, RevisionContent } from '
|
|
|
4
4
|
export { availableOutputs, graphOrder, nodeInputPorts } from './flow-graph.js';
|
|
5
5
|
export { validateModules } from './flow-modules.js';
|
|
6
6
|
export { matchesSchema, triggerPayloadSchema, variableInputCompatible } from './flow-schema.js';
|
|
7
|
+
export { agentInput, agentToolInput, agentToolSchema } from './flow-agent.js';
|
|
7
8
|
export interface SemanticClosure {
|
|
8
9
|
readonly dependencies: {
|
|
9
10
|
readonly bindings: ReadonlySet<string>;
|
|
@@ -14,7 +15,7 @@ export interface SemanticClosure {
|
|
|
14
15
|
};
|
|
15
16
|
readonly digest: string;
|
|
16
17
|
}
|
|
17
|
-
export declare function flowDependencies(content: RevisionContent): SemanticClosure['dependencies'];
|
|
18
|
+
export declare function flowDependencies(content: RevisionContent, triggerId?: string): SemanticClosure['dependencies'];
|
|
18
19
|
export declare function flowClosure(content: RevisionContent): Promise<SemanticClosure>;
|
|
19
20
|
export declare function variableBindings(revision: RevisionContent, bindingIds: Iterable<string>): Readonly<Record<string, string>>;
|
|
20
21
|
export interface Diagnostic {
|
|
@@ -52,6 +53,7 @@ export type PrepareFlowResult = {
|
|
|
52
53
|
readonly kind: 'prepared';
|
|
53
54
|
readonly validation: FlowValidation;
|
|
54
55
|
};
|
|
55
|
-
export declare function prepareFlow(revision: RevisionContent, engineContract: string): Promise<PrepareFlowResult>;
|
|
56
|
+
export declare function prepareFlow(revision: RevisionContent, engineContract: string, triggerId?: string): Promise<PrepareFlowResult>;
|
|
56
57
|
export declare function createRuntimeProgram(prepared: PreparedFlow, entryModuleId: string, engineDigest: string): RuntimeProgram | undefined;
|
|
58
|
+
export declare function agentActions(flow: Pick<PreparedFlow, 'tasks'>): readonly ConnectorCapability[];
|
|
57
59
|
export declare function codeActions(flow: Pick<PreparedFlow, 'graph' | 'subflows'>): readonly ConnectorCapability[];
|