@oomol-lab/open-flow 0.1.0-beta.56 → 0.1.0-beta.58

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.
Files changed (36) hide show
  1. package/dist/browser/{createResourceDialog-Btjes3wD.js → createResourceDialog-C23SBjYd.js} +2 -2
  2. package/dist/browser/flow-authoring-node.d.ts +6 -2
  3. package/dist/browser/flow-authoring.js +44 -12
  4. package/dist/browser/flow-change-schema.d.ts +266 -0
  5. package/dist/browser/flow-change.d.ts +5 -0
  6. package/dist/browser/flow-change.js +33 -2
  7. package/dist/browser/{flowChanges-BxutPLYO.js → flowChanges-fBiAeTzR.js} +954 -487
  8. package/dist/browser/{flowWorkspace-Dg4mqfa6.js → flowWorkspace-MqcEfg7T.js} +3 -3
  9. package/dist/browser/{icons-p2A9zs8t.js → icons-6oQ8Q9Wm.js} +4298 -4252
  10. package/dist/browser/preview.js +354 -36
  11. package/dist/browser/workbench.js +21 -10
  12. package/dist/browser/{workbenchSelect-LRp_Xjeq.js → workbenchSelect-DpLbIr29.js} +1 -1
  13. package/dist/common/authoring.d.ts +207 -0
  14. package/dist/common/authoringSchema.d.ts +1293 -0
  15. package/dist/common/control-api-conformance.js +975 -505
  16. package/dist/common/control-api-errors.d.ts +2 -1
  17. package/dist/common/control-api.d.ts +81 -0
  18. package/dist/common/control-api.js +973 -586
  19. package/dist/common/control-requests.d.ts +128 -0
  20. package/dist/common/control-requests.js +3122 -346
  21. package/dist/common/decision.js +12 -2
  22. package/dist/common/flow-encoding.js +12 -2
  23. package/dist/common/flow-semantics.d.ts +9 -0
  24. package/dist/common/flow-semantics.js +28 -3
  25. package/dist/common/integration-trigger.js +12 -2
  26. package/dist/common/lib-DrKav3HG.js +11403 -0
  27. package/dist/common/mcp.d.ts +120 -11
  28. package/dist/common/mcp.js +423 -51
  29. package/dist/common/openapi.js +12 -2
  30. package/dist/common/poll-trigger.js +12 -2
  31. package/dist/common/scheduler.js +12 -2
  32. package/dist/common/webhook-trigger.js +12 -2
  33. package/package.json +7 -1
  34. package/skills/open-flow/SKILL.md +32 -0
  35. package/skills/open-flow/references/flow-authoring.md +356 -0
  36. package/skills/open-flow/references/flow-n8n-conversion.md +196 -0
@@ -14323,7 +14323,7 @@ function end_default() {
14323
14323
  }
14324
14324
  //#endregion
14325
14325
  //#region ../../node_modules/.bun/d3-transition@3.0.1+ddb27bb92657a88b/node_modules/d3-transition/src/transition/index.js
14326
- var id$1 = 0;
14326
+ var id$2 = 0;
14327
14327
  function Transition(groups, parents, name, id) {
14328
14328
  this._groups = groups;
14329
14329
  this._parents = parents;
@@ -14334,7 +14334,7 @@ function transition(name) {
14334
14334
  return selection().transition(name);
14335
14335
  }
14336
14336
  function newId() {
14337
- return ++id$1;
14337
+ return ++id$2;
14338
14338
  }
14339
14339
  var selection_prototype = selection.prototype;
14340
14340
  Transition.prototype = transition.prototype = {
@@ -54419,7 +54419,7 @@ function refine(fn, _params = {}) {
54419
54419
  function superRefine(fn, params) {
54420
54420
  return /* @__PURE__ */ _superRefine(fn, params);
54421
54421
  }
54422
- function json$3(params) {
54422
+ function json$4(params) {
54423
54423
  const jsonSchema = lazy$1(() => {
54424
54424
  return union$1([
54425
54425
  string(params),
@@ -54618,15 +54618,15 @@ function webhookSupportsBody(method) {
54618
54618
  return method !== "GET";
54619
54619
  }
54620
54620
  var text = string();
54621
- var json$2 = json$3();
54621
+ var json$3 = json$4();
54622
54622
  var strings = array(text);
54623
54623
  var port = object$1({
54624
54624
  description: text.optional(),
54625
- jsonSchema: json$2,
54625
+ jsonSchema: json$3,
54626
54626
  nullable: boolean(),
54627
54627
  handle: text
54628
54628
  });
54629
- var input = port.extend({ value: json$2.optional() });
54629
+ var input = port.extend({ value: json$3.optional() });
54630
54630
  var group$1 = object$1({
54631
54631
  collapsed: boolean().optional(),
54632
54632
  group: text
@@ -54642,7 +54642,7 @@ var source = union$1([object$1({
54642
54642
  })]);
54643
54643
  var fixedInput = union$1([object$1({ kind: literal("unset") }), object$1({
54644
54644
  kind: literal("value"),
54645
- value: json$2
54645
+ value: json$3
54646
54646
  })]);
54647
54647
  var mapping = union$1([fixedInput, object$1({
54648
54648
  kind: literal("sources"),
@@ -54693,7 +54693,7 @@ var inline = object$1({
54693
54693
  });
54694
54694
  var agentValue = union$1([object$1({
54695
54695
  kind: literal("value"),
54696
- value: json$2
54696
+ value: json$3
54697
54697
  }), object$1({
54698
54698
  kind: literal("input"),
54699
54699
  input: text
@@ -54725,7 +54725,7 @@ var decisionQuestion = discriminatedUnion("type", [
54725
54725
  criteria: strings
54726
54726
  })
54727
54727
  ]);
54728
- var managed = object$1({
54728
+ var managedFields = object$1({
54729
54729
  ...ports,
54730
54730
  name: text,
54731
54731
  executor: union$1([
@@ -54740,7 +54740,7 @@ var managed = object$1({
54740
54740
  method: text,
54741
54741
  path: text,
54742
54742
  serverUrl: text,
54743
- document: json$2,
54743
+ document: json$3,
54744
54744
  auth: array(object$1({
54745
54745
  id: text,
54746
54746
  type: _enum([
@@ -54784,11 +54784,12 @@ var managed = object$1({
54784
54784
  }).optional()
54785
54785
  })
54786
54786
  ])
54787
- }).transform(limitDecisionTask);
54788
- var operand = union$1([object$1({
54787
+ });
54788
+ var managed = managedFields.transform(limitDecisionTask);
54789
+ var operand$1 = union$1([object$1({
54789
54790
  kind: literal("value"),
54790
- value: json$2.optional(),
54791
- jsonSchema: json$2.optional()
54791
+ value: json$3.optional(),
54792
+ jsonSchema: json$3.optional()
54792
54793
  }), object$1({
54793
54794
  kind: literal("source"),
54794
54795
  source
@@ -54799,7 +54800,7 @@ var condition = {
54799
54800
  description: text.optional(),
54800
54801
  output: text,
54801
54802
  groups: array(object$1({ expressions: array(object$1({
54802
- left: operand,
54803
+ left: operand$1,
54803
54804
  operator: _enum([
54804
54805
  "!=",
54805
54806
  "<",
@@ -54822,7 +54823,7 @@ var condition = {
54822
54823
  "notHasValue",
54823
54824
  "startsWith"
54824
54825
  ]),
54825
- right: operand.optional()
54826
+ right: operand$1.optional()
54826
54827
  })) }))
54827
54828
  }))
54828
54829
  };
@@ -54959,6 +54960,25 @@ var node = union$1([
54959
54960
  })
54960
54961
  })
54961
54962
  ]);
54963
+ /** Configuration schemas shared by the node authoring boundary. */
54964
+ var authoringDefinitionSchemas = {
54965
+ input,
54966
+ port,
54967
+ ports,
54968
+ condition: strictObject(condition),
54969
+ wait: strictObject(wait),
54970
+ webhook: strictObject(webhook),
54971
+ schedule: triggerScheduleSchema,
54972
+ capabilities: array(capability),
54973
+ connector: managedFields.shape.executor.options[0].omit({ kind: true }).strict(),
54974
+ openapi: managedFields.shape.executor.options[1].omit({ kind: true }).strict(),
54975
+ decision: managedFields.shape.executor.options[2].omit({ kind: true }).strict(),
54976
+ llm: managedFields.shape.executor.options[3].omit({ kind: true }).strict(),
54977
+ agent: managedFields.shape.executor.options[4].omit({
54978
+ kind: true,
54979
+ notification: true
54980
+ }).strict()
54981
+ };
54962
54982
  var edge = object$1({
54963
54983
  source: text,
54964
54984
  target: text,
@@ -55046,6 +55066,11 @@ var shapes = {
55046
55066
  ...at,
55047
55067
  node
55048
55068
  },
55069
+ "graph.node.replace": {
55070
+ ...at,
55071
+ before: node,
55072
+ node
55073
+ },
55049
55074
  "graph.node.delete": at,
55050
55075
  "graph.node.field.set": union$1([
55051
55076
  object$1({
@@ -55615,7 +55640,7 @@ var ExpressionKind = Object.freeze({
55615
55640
  });
55616
55641
  //#endregion
55617
55642
  //#region src/json-schema-subset/expression/expression.ts
55618
- var expression = (delegate) => (e1, e2) => {
55643
+ var expression$1 = (delegate) => (e1, e2) => {
55619
55644
  const rootNode = {
55620
55645
  parent: null,
55621
55646
  swapped: false,
@@ -57603,7 +57628,7 @@ function checkWithResult(extendsContext, schema1, schema2) {
57603
57628
  const describe = describer();
57604
57629
  const equals = schemaEqualsChecker(extendsContext);
57605
57630
  context.isEquals = wrapEqualsCheckerWithCache(isDeepEquals);
57606
- context.calculate = expression({
57631
+ context.calculate = expression$1({
57607
57632
  describe,
57608
57633
  equals,
57609
57634
  calculate,
@@ -59201,7 +59226,7 @@ var schema$1 = lazy$1(() => union$1([boolean(), strictObject({
59201
59226
  "object",
59202
59227
  "string"
59203
59228
  ])).min(1)]).optional(),
59204
- const: json$3().optional(),
59229
+ const: json$4().optional(),
59205
59230
  allOf: array(schema$1).min(1).optional(),
59206
59231
  anyOf: array(schema$1).min(1).optional(),
59207
59232
  oneOf: array(schema$1).min(1).optional(),
@@ -59250,13 +59275,13 @@ var schema$1 = lazy$1(() => union$1([boolean(), strictObject({
59250
59275
  unevaluatedProperties: schema$1.optional(),
59251
59276
  description: string().optional(),
59252
59277
  title: string().optional(),
59253
- default: json$3().optional(),
59254
- examples: array(json$3()).optional(),
59278
+ default: json$4().optional(),
59279
+ examples: array(json$4()).optional(),
59255
59280
  readOnly: boolean().optional(),
59256
59281
  writeOnly: boolean().optional(),
59257
59282
  deprecated: boolean().optional(),
59258
59283
  $comment: string().optional(),
59259
- enum: array(json$3()).min(1).optional(),
59284
+ enum: array(json$4()).min(1).optional(),
59260
59285
  properties: record$2(string(), schema$1).optional(),
59261
59286
  required: array(string()).optional(),
59262
59287
  additionalProperties: schema$1.optional(),
@@ -73691,12 +73716,12 @@ var data_exports = /* @__PURE__ */ __exportAll({
73691
73716
  description: () => description$1,
73692
73717
  properties: () => properties$1,
73693
73718
  required: () => required,
73694
- type: () => type$2
73695
- }), $id$1, description$1, type$2, required, properties$1, data_default;
73719
+ type: () => type$3
73720
+ }), $id$1, description$1, type$3, required, properties$1, data_default;
73696
73721
  var init_data = __esmMin((() => {
73697
73722
  $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
73698
73723
  description$1 = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
73699
- type$2 = "object";
73724
+ type$3 = "object";
73700
73725
  required = ["$data"];
73701
73726
  properties$1 = { "$data": {
73702
73727
  "type": "string",
@@ -73705,7 +73730,7 @@ var init_data = __esmMin((() => {
73705
73730
  data_default = {
73706
73731
  $id: $id$1,
73707
73732
  description: description$1,
73708
- type: type$2,
73733
+ type: type$3,
73709
73734
  required,
73710
73735
  properties: properties$1,
73711
73736
  additionalProperties: false
@@ -77033,9 +77058,9 @@ var json_schema_draft_07_exports = /* @__PURE__ */ __exportAll({
77033
77058
  definitions: () => definitions,
77034
77059
  properties: () => properties,
77035
77060
  title: () => title,
77036
- type: () => type$1
77061
+ type: () => type$2
77037
77062
  });
77038
- var $schema, $id, title, definitions, type$1, properties, json_schema_draft_07_default;
77063
+ var $schema, $id, title, definitions, type$2, properties, json_schema_draft_07_default;
77039
77064
  var init_json_schema_draft_07 = __esmMin((() => {
77040
77065
  $schema = "http://json-schema.org/draft-07/schema#";
77041
77066
  $id = "http://json-schema.org/draft-07/schema#";
@@ -77067,7 +77092,7 @@ var init_json_schema_draft_07 = __esmMin((() => {
77067
77092
  "default": []
77068
77093
  }
77069
77094
  };
77070
- type$1 = ["object", "boolean"];
77095
+ type$2 = ["object", "boolean"];
77071
77096
  properties = {
77072
77097
  "$id": {
77073
77098
  "type": "string",
@@ -77173,7 +77198,7 @@ var init_json_schema_draft_07 = __esmMin((() => {
77173
77198
  $id,
77174
77199
  title,
77175
77200
  definitions,
77176
- type: type$1,
77201
+ type: type$2,
77177
77202
  properties,
77178
77203
  "default": true
77179
77204
  };
@@ -97342,7 +97367,7 @@ function AgentInputSource({ disabled, readOnly, source, port, inputs, onChange,
97342
97367
  }
97343
97368
  //#endregion
97344
97369
  //#region src/workbench/browser/runtime/editor/flowChanges.ts
97345
- function agentTool(action, id, connectionId) {
97370
+ function agentTool$1(action, id, connectionId) {
97346
97371
  return {
97347
97372
  id,
97348
97373
  name: `${action.actionId.replace(/[^a-zA-Z0-9_]/g, "_").slice(0, 48)}_${id.slice(0, 8)}`,
@@ -97403,7 +97428,7 @@ function EditableAgentTools({ config, disabled, inputs, connectors, prepareActio
97403
97428
  connectors,
97404
97429
  prepareAction,
97405
97430
  disabled,
97406
- createEntry: (action) => agentTool(action, crypto.randomUUID()),
97431
+ createEntry: (action) => agentTool$1(action, crypto.randomUUID()),
97407
97432
  onSave: async (tools) => {
97408
97433
  if (!agentFixedValuesValid({
97409
97434
  ...config,
@@ -103603,9 +103628,10 @@ var controlErrorCode = {
103603
103628
  };
103604
103629
  controlErrorCode.eventSourceInvalid, controlErrorCode.eventSourceIdentityUnavailable, controlErrorCode.eventSourceNotFound, controlErrorCode.eventSourceConflict, controlErrorCode.authenticationRequired, controlErrorCode.authorizationDenied, controlErrorCode.bindingUnresolved, controlErrorCode.connectorActionNotFound, controlErrorCode.connectorAccessConflict, controlErrorCode.connectorAccessInvalid, controlErrorCode.connectorAccessRequired, controlErrorCode.connectorAccessUnsupported, controlErrorCode.connectorUnconfigured, controlErrorCode.connectorUnavailable, controlErrorCode.connectorConsoleUnconfigured, controlErrorCode.engineUnavailable, controlErrorCode.engineUnsupported, controlErrorCode.flowInvalid, controlErrorCode.flowRepairRequired, controlErrorCode.flowUpgradeRequired, controlErrorCode.flowNotFound, controlErrorCode.flowBusy, controlErrorCode.flowConflict, controlErrorCode.flowPresentationConflict, controlErrorCode.flowRevisionConflict, controlErrorCode.liveConflict, controlErrorCode.liveNotFound, controlErrorCode.pageInvalidCursor, controlErrorCode.publicationConflict, controlErrorCode.publicationNotFound, controlErrorCode.publicationUnsupported, controlErrorCode.publishOperationNotFound, controlErrorCode.routeNotFound, controlErrorCode.runConflict, controlErrorCode.runEventsExpired, controlErrorCode.runInvalid, controlErrorCode.runNotFound, controlErrorCode.runNotTerminal, controlErrorCode.runOverloaded, controlErrorCode.runWaitNotFound, controlErrorCode.triggerKeyInvalid, controlErrorCode.triggerKeyNotFound, controlErrorCode.triggerNotFound, controlErrorCode.variableInvalid, controlErrorCode.variableLimitReached, controlErrorCode.variableNotFound;
103605
103630
  var ApiError = class extends Error {
103606
- constructor(status, code, message) {
103631
+ constructor(status, code, message, details) {
103607
103632
  super(message);
103608
103633
  this.code = code;
103634
+ this.details = details;
103609
103635
  this.name = "ApiError";
103610
103636
  this.status = status;
103611
103637
  }
@@ -103618,6 +103644,298 @@ var InvalidResponseError = class extends ApiError {
103618
103644
  this.detail = detail;
103619
103645
  }
103620
103646
  };
103647
+ //#endregion
103648
+ //#region src/control/common/authoringLlm.ts
103649
+ var authoringLlmConfiguration = strictObject({
103650
+ mode: _enum(["chat", "json"]),
103651
+ resultSchema: json$4(),
103652
+ model: json$4().optional().describe("Default model settings: {model, temperature?, top_p?, max_tokens?}. A bound model input takes precedence."),
103653
+ template: json$4().optional().describe("Default message templates: [{role: \"system\" | \"user\" | \"assistant\", content: \"Text with {{namedInput}}\"}]."),
103654
+ messages: json$4().optional().describe("Default conversation history, prepended without template interpolation; an array of {role, content} or null.")
103655
+ });
103656
+ //#endregion
103657
+ //#region src/control/common/authoringOpenApi.ts
103658
+ var authenticationSchema = union$1([
103659
+ strictObject({ schemes: array(string().min(1)).describe("One complete security alternative advertised by this operation; [] selects no authentication.") }),
103660
+ strictObject({ type: _enum(["bearer", "basic"]) }),
103661
+ strictObject({
103662
+ type: literal("apiKey"),
103663
+ name: string().min(1),
103664
+ in: _enum(["header", "query"])
103665
+ })
103666
+ ]);
103667
+ strictObject({
103668
+ sourceUrl: string().min(1),
103669
+ path: string().min(1),
103670
+ method: string().min(1),
103671
+ serverUrl: string().optional(),
103672
+ authentication: authenticationSchema.optional().describe("Omit to use the operation default. Bind credentials through the advertised node inputs.")
103673
+ });
103674
+ //#endregion
103675
+ //#region src/control/common/authoringSchema.ts
103676
+ var id$1 = string().min(1);
103677
+ var json$1 = json$4();
103678
+ var patch = record$2(id$1, json$1);
103679
+ var type$1 = _enum([
103680
+ "manual",
103681
+ "webhook",
103682
+ "cron",
103683
+ "error",
103684
+ "poll",
103685
+ "integration",
103686
+ "code",
103687
+ "connector",
103688
+ "agent",
103689
+ "llm",
103690
+ "decision",
103691
+ "openapi",
103692
+ "condition",
103693
+ "value",
103694
+ "wait",
103695
+ "approval"
103696
+ ]);
103697
+ var referenceSchema = id$1.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.");
103698
+ var output = strictObject({
103699
+ kind: literal("output"),
103700
+ node: referenceSchema,
103701
+ port: id$1.optional().describe("Omit for a node with one output. For multiple outputs, choose a name from node details."),
103702
+ field: string().optional()
103703
+ });
103704
+ var variable = strictObject({
103705
+ kind: literal("variable"),
103706
+ name: id$1
103707
+ });
103708
+ var authoringSourceSchema = union$1([
103709
+ output,
103710
+ variable,
103711
+ strictObject({
103712
+ kind: literal("value"),
103713
+ value: json$1
103714
+ }),
103715
+ strictObject({ kind: literal("unset") }),
103716
+ strictObject({ kind: literal("default") }),
103717
+ strictObject({
103718
+ kind: literal("sources"),
103719
+ sources: array(union$1([output, variable])).min(1)
103720
+ })
103721
+ ]);
103722
+ var operand = union$1([
103723
+ strictObject({
103724
+ kind: literal("value"),
103725
+ value: json$1.optional(),
103726
+ schema: json$1.optional()
103727
+ }),
103728
+ output,
103729
+ variable
103730
+ ]);
103731
+ var agentTool = authoringDefinitionSchemas.agent.shape.tools.element.omit({
103732
+ id: true,
103733
+ inputs: true
103734
+ }).extend({ inputs: record$2(id$1, authoringDefinitionSchemas.agent.shape.tools.element.shape.inputs.element.shape.source).optional().describe("Action input sources by name. The tool resolves types from the Action. New inputs default to model-provided; existing sources are preserved when omitted.") }).strict();
103735
+ var notification = strictObject({
103736
+ ...authoringDefinitionSchemas.connector.shape,
103737
+ messageHandle: id$1,
103738
+ inputs: record$2(id$1, union$1([strictObject({
103739
+ kind: literal("value"),
103740
+ value: json$1
103741
+ }), strictObject({
103742
+ kind: literal("input"),
103743
+ input: id$1
103744
+ })]))
103745
+ });
103746
+ var field = strictObject({
103747
+ schema: json$1.optional(),
103748
+ nullable: boolean().optional(),
103749
+ description: string().optional()
103750
+ });
103751
+ var inputFields = record$2(id$1, field.extend({ default: json$1.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.");
103752
+ var outputFields = record$2(id$1, field).describe("Code return fields by name. Omitted schema accepts any JSON; omitted nullable is true.");
103753
+ var expression = strictObject({
103754
+ left: operand,
103755
+ operator: authoringDefinitionSchemas.condition.shape.cases.element.shape.groups.element.shape.expressions.element.shape.operator,
103756
+ right: operand.optional()
103757
+ });
103758
+ var all = strictObject({ all: array(expression) });
103759
+ var when = union$1([
103760
+ expression,
103761
+ all,
103762
+ strictObject({ any: array(union$1([expression, all])) })
103763
+ ]);
103764
+ strictObject({}), strictObject({ sourceFlowIds: array(id$1).optional() }), authoringDefinitionSchemas.webhook.omit({ bodyFields: true }).extend({ body: inputFields }).strict(), strictObject({ schedule: authoringDefinitionSchemas.schedule }), strictObject({
103765
+ key: id$1,
103766
+ connectionId: id$1.optional(),
103767
+ schedule: authoringDefinitionSchemas.schedule
103768
+ }), strictObject({
103769
+ key: id$1,
103770
+ connectionId: id$1.optional()
103771
+ }), strictObject({
103772
+ inputs: inputFields,
103773
+ outputs: outputFields,
103774
+ capabilities: authoringDefinitionSchemas.capabilities.optional()
103775
+ }), authoringDefinitionSchemas.connector.strict(), authoringDefinitionSchemas.agent.omit({
103776
+ prompt: true,
103777
+ tools: true
103778
+ }).extend({
103779
+ inputs: inputFields,
103780
+ resultSchema: json$1.describe("JSON schema of the final result. Defaults to text. The tool manages the output definition; references can omit port."),
103781
+ tools: array(agentTool),
103782
+ notification: notification.optional()
103783
+ }).strict(), authoringLlmConfiguration.extend({ inputs: inputFields }), authoringDefinitionSchemas.decision, strictObject({
103784
+ match: _enum(["first", "all"]),
103785
+ branches: array(strictObject({
103786
+ name: id$1,
103787
+ description: string().optional(),
103788
+ when
103789
+ }))
103790
+ }), strictObject({
103791
+ values: patch,
103792
+ outputs: outputFields
103793
+ }), strictObject({ inputs: inputFields }), strictObject({ inputs: inputFields });
103794
+ var updates = strictObject({
103795
+ name: id$1.optional(),
103796
+ description: string().optional(),
103797
+ icon: string().optional(),
103798
+ maxExecutions: int().positive().optional(),
103799
+ timeoutMs: number().nonnegative().optional(),
103800
+ config: patch.optional().describe("Recursively merge configuration; omitted fields remain unchanged and arrays replace as a whole. This includes schema objects: {} does not clear an existing schema. Use clear paths to remove fields, e.g. [\"config\",\"inputs\",\"amount\",\"schema\",\"type\"].")
103801
+ });
103802
+ var authoringEditSchema = discriminatedUnion("op", [
103803
+ strictObject({
103804
+ op: literal("node.add"),
103805
+ as: id$1.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."),
103806
+ type: type$1,
103807
+ name: id$1,
103808
+ config: patch.optional(),
103809
+ inputs: record$2(id$1, authoringSourceSchema).optional().describe("Input data sources, applied after creation, as input.set operations. Execution edges are separate."),
103810
+ code: string().optional(),
103811
+ prompt: string().optional()
103812
+ }),
103813
+ strictObject({
103814
+ op: literal("node.update"),
103815
+ node: referenceSchema,
103816
+ set: updates.optional(),
103817
+ clear: array(array(id$1).min(1)).optional()
103818
+ }),
103819
+ strictObject({
103820
+ op: literal("node.remove"),
103821
+ node: referenceSchema
103822
+ }),
103823
+ strictObject({
103824
+ op: literal("input.set"),
103825
+ node: referenceSchema,
103826
+ input: id$1,
103827
+ source: authoringSourceSchema
103828
+ }),
103829
+ strictObject({
103830
+ op: _enum(["edge.connect", "edge.disconnect"]),
103831
+ source: referenceSchema,
103832
+ target: referenceSchema,
103833
+ branch: id$1.optional()
103834
+ }),
103835
+ strictObject({
103836
+ op: literal("text.edit"),
103837
+ node: referenceSchema,
103838
+ field: _enum(["code", "prompt"]),
103839
+ oldText: id$1,
103840
+ newText: string()
103841
+ }),
103842
+ strictObject({
103843
+ op: literal("text.set"),
103844
+ node: referenceSchema,
103845
+ field: _enum(["code", "prompt"]),
103846
+ text: string()
103847
+ })
103848
+ ]);
103849
+ strictObject({
103850
+ baseRevision: id$1,
103851
+ requestId: id$1.max(256),
103852
+ edits: array(authoringEditSchema).min(1).max(1e3)
103853
+ });
103854
+ strictObject({
103855
+ revision: id$1.optional().describe("Fixed revision from a previous read; omit to read the current draft."),
103856
+ nodes: array(id$1).min(1).max(100).optional().describe("Node references to read in one batch. Mutually exclusive with text. Long texts return metadata."),
103857
+ text: strictObject({
103858
+ node: id$1,
103859
+ field: _enum(["code", "prompt"]),
103860
+ start: int().positive().default(1),
103861
+ lines: int().min(1).max(200).default(80)
103862
+ }).optional().describe("Read code or prompt by line (1-based). Mutually exclusive with nodes. Follow nextStart at the same revision until truncated is false.")
103863
+ }).refine((v) => v.nodes == null || v.text == null, "Choose nodes or text.").meta({
103864
+ not: { required: ["nodes", "text"] },
103865
+ description: "Omit nodes and text for an outline; provide nodes for details, or text for an excerpt."
103866
+ });
103867
+ strictObject({ revisionId: id$1 });
103868
+ strictObject({
103869
+ revision: id$1.optional(),
103870
+ query: id$1.max(1e3),
103871
+ type: type$1.optional(),
103872
+ offset: int().nonnegative().default(0),
103873
+ limit: int().min(1).max(100).default(20)
103874
+ });
103875
+ strictObject({
103876
+ type: type$1.optional(),
103877
+ action: id$1.optional()
103878
+ }).refine((v) => v.type == null || v.action == null, "Choose type or action.");
103879
+ var authoringDiagnosticSchema = object$1({
103880
+ code: id$1,
103881
+ message: string(),
103882
+ nodes: array(id$1),
103883
+ field: string().optional(),
103884
+ line: number().optional(),
103885
+ column: number().optional()
103886
+ });
103887
+ object$1({
103888
+ flowId: id$1,
103889
+ revisionId: id$1,
103890
+ valid: boolean(),
103891
+ diagnostics: array(authoringDiagnosticSchema),
103892
+ version: literal(1)
103893
+ });
103894
+ object$1({
103895
+ flowId: id$1,
103896
+ saved: literal(true),
103897
+ revision: id$1,
103898
+ nodes: record$2(id$1, id$1),
103899
+ changes: array(object$1({
103900
+ index: int(),
103901
+ op: id$1,
103902
+ node: id$1.optional()
103903
+ })),
103904
+ validation: object$1({
103905
+ status: _enum([
103906
+ "valid",
103907
+ "invalid",
103908
+ "unavailable"
103909
+ ]),
103910
+ diagnostics: array(authoringDiagnosticSchema).optional()
103911
+ }),
103912
+ version: literal(1)
103913
+ });
103914
+ object$1({
103915
+ flowId: id$1,
103916
+ revision: id$1,
103917
+ data: object$1({
103918
+ nodes: array(record$2(string(), json$1)).optional(),
103919
+ edges: array(json$1).optional(),
103920
+ text: record$2(string(), json$1).optional()
103921
+ }),
103922
+ version: literal(1)
103923
+ });
103924
+ object$1({
103925
+ flowId: id$1,
103926
+ revision: id$1,
103927
+ data: object$1({
103928
+ matches: array(object$1({
103929
+ node: id$1,
103930
+ field: id$1,
103931
+ line: int().optional(),
103932
+ excerpt: string()
103933
+ })),
103934
+ total: int(),
103935
+ nextOffset: int().optional()
103936
+ }),
103937
+ version: literal(1)
103938
+ });
103621
103939
  discriminatedUnion("kind", [strictObject({ kind: literal("admin-delegation") }), strictObject({
103622
103940
  kind: literal("policy"),
103623
103941
  ruleId: string().min(1).nullable()
@@ -103654,9 +103972,9 @@ strictObject({
103654
103972
  union$1([strictObject({
103655
103973
  handle: string().min(1),
103656
103974
  description: string().optional(),
103657
- jsonSchema: json$3(),
103975
+ jsonSchema: json$4(),
103658
103976
  nullable: boolean(),
103659
- value: json$3().optional()
103977
+ value: json$4().optional()
103660
103978
  }), strictObject({
103661
103979
  group: string(),
103662
103980
  collapsed: boolean().optional()
@@ -103669,7 +103987,7 @@ strictObject({
103669
103987
  });
103670
103988
  //#endregion
103671
103989
  //#region src/control/common/results.ts
103672
- var json = json$3();
103990
+ var json = json$4();
103673
103991
  var entry = strictObject({
103674
103992
  pointer: string(),
103675
103993
  type: _enum([