@oomol-lab/open-flow 0.1.0-beta.66 → 0.1.0-beta.68

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 (44) hide show
  1. package/dist/browser/ContentIcon-Sx9bywU-.js +11861 -0
  2. package/dist/browser/FlowCanvas-CXpaeurx.js +22721 -0
  3. package/dist/browser/{createResourceDialog-C-Si_cYs.js → createResourceDialog-BKmimKA_.js} +3 -2
  4. package/dist/browser/dialog-ZmfcwuMS.js +8785 -0
  5. package/dist/browser/event-sources.d.ts +4 -1
  6. package/dist/browser/exportSvg-D4CqCcx2.js +659 -0
  7. package/dist/browser/flow-authoring-node.d.ts +2 -0
  8. package/dist/browser/flow-authoring.js +6 -5
  9. package/dist/browser/flow-change.js +6 -5
  10. package/dist/browser/{flowChanges-T4_R5p1f.js → flowChanges-B5tZMcGr.js} +3440 -15004
  11. package/dist/browser/{flowRunInputEditorStore-DJqmR6Qh.js → flowRunInputEditorStore-ys1-w9GW.js} +2 -1
  12. package/dist/browser/{flowWorkspace-C0J5C0oM.js → flowWorkspace-zFBFtZPo.js} +1232 -23701
  13. package/dist/browser/languages-gYzoQqCi.js +68 -0
  14. package/dist/browser/licenses.md +24 -0
  15. package/dist/browser/preview.css +125 -55
  16. package/dist/browser/preview.js +16256 -15986
  17. package/dist/browser/theme.css +1 -0
  18. package/dist/browser/{icons-BD3m0RQq.js → tooltip-CJjYs_2I.js} +280 -9041
  19. package/dist/browser/ui.css +38 -4
  20. package/dist/browser/{value-BADHeZ9I.js → value-BbFQZZ_V.js} +1 -68
  21. package/dist/browser/workbench-contract.d.ts +1 -1
  22. package/dist/browser/workbench.css +2907 -2871
  23. package/dist/browser/workbench.d.ts +0 -1
  24. package/dist/browser/workbench.js +760 -461
  25. package/dist/browser/{workbenchSelect-B-PFpF_Q.js → workbenchSelect-CChdgugI.js} +2 -1
  26. package/dist/command/index.js +25 -25
  27. package/dist/common/authoringExamples.d.ts +2 -2
  28. package/dist/common/control-api-conformance.js +57 -12
  29. package/dist/common/control-api.d.ts +12 -2
  30. package/dist/common/control-api.js +41 -8
  31. package/dist/common/control-requests.js +7 -6
  32. package/dist/common/decision.js +5 -4
  33. package/dist/common/flow-encoding.js +7 -4
  34. package/dist/common/flow-semantics.js +11 -8
  35. package/dist/common/integration-trigger.js +5 -4
  36. package/dist/common/mcp.js +42 -9
  37. package/dist/common/openapi.js +5 -4
  38. package/dist/common/poll-trigger.js +5 -4
  39. package/dist/common/scheduler.js +5 -4
  40. package/dist/common/webhook-trigger.js +5 -4
  41. package/dist/common/workflow.js +5 -4
  42. package/package.json +1 -1
  43. package/skills/open-flow/SKILL.md +9 -0
  44. package/skills/open-flow/references/flow-authoring.md +2 -0
@@ -8,7 +8,7 @@ declare const descriptions: {
8
8
  readonly integration: 'Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.';
9
9
  readonly decision: 'AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running.';
10
10
  readonly openapi: 'A fixed JSON API operation. Replace the example document and URL before running.';
11
- readonly connector: 'A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show.';
11
+ readonly connector: 'A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account.';
12
12
  readonly code: 'A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions.';
13
13
  readonly condition: 'A condition with true and false execution branches.';
14
14
  readonly value: 'A fixed value node.';
@@ -22,7 +22,7 @@ declare const descriptions: {
22
22
  export declare const authoringExampleNames: (keyof typeof descriptions)[];
23
23
  export declare const authoringExamples: {
24
24
  name: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm-chat" | "llm-json" | "openapi" | "poll" | "poll-notification" | "start" | "value" | "wait" | "webhook";
25
- description: "A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show." | "A Flow Error node. Select upstream Flows, then publish and enable this Flow to listen for failures in their automatic runs." | "A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions." | "A Start node with a required message parameter. Supply it through trigger.outputs." | "A Wait with a continue action and a built-in notification output." | "A Webhook start node." | "A condition with true and false execution branches." | "A fixed JSON API operation. Replace the example document and URL before running." | "A fixed value node." | "AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running." | "An Agent with code computation enabled. Configure a model available in the deployment." | "An Approval with approve and reject decision branches and a built-in notification output." | "An LLM JSON Task and its node; configure a model available in the deployment." | "An LLM chat Task and its node; configure a model available in the deployment." | "An hourly scheduled start node." | "Gmail events → JavaScript text formatting → Connector notification. Replace connection/action IDs and match the notification input ports." | "Gmail polling by key; replace CONNECTION_ID with an active Gmail connection." | "Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.";
25
+ description: "A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account." | "A Flow Error node. Select upstream Flows, then publish and enable this Flow to listen for failures in their automatic runs." | "A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions." | "A Start node with a required message parameter. Supply it through trigger.outputs." | "A Wait with a continue action and a built-in notification output." | "A Webhook start node." | "A condition with true and false execution branches." | "A fixed JSON API operation. Replace the example document and URL before running." | "A fixed value node." | "AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running." | "An Agent with code computation enabled. Configure a model available in the deployment." | "An Approval with approve and reject decision branches and a built-in notification output." | "An LLM JSON Task and its node; configure a model available in the deployment." | "An LLM chat Task and its node; configure a model available in the deployment." | "An hourly scheduled start node." | "Gmail events → JavaScript text formatting → Connector notification. Replace connection/action IDs and match the notification input ports." | "Gmail polling by key; replace CONNECTION_ID with an active Gmail connection." | "Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.";
26
26
  }[];
27
27
  export declare function authoringExample(name: string): {
28
28
  version: 1;
@@ -8579,6 +8579,7 @@ function webhookSupportsBody(method) {
8579
8579
  return method !== "GET";
8580
8580
  }
8581
8581
  var text = string$1();
8582
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
8582
8583
  var json$3 = json$4();
8583
8584
  var strings$1 = array(text);
8584
8585
  var port$1 = object({
@@ -8634,7 +8635,7 @@ var capability = union([
8634
8635
  mode: literal("independent"),
8635
8636
  actions: array(strictObject({
8636
8637
  action: text,
8637
- connectionId: text.optional()
8638
+ connectionId: actionConnection.optional()
8638
8639
  }))
8639
8640
  }),
8640
8641
  strictObject({
@@ -8694,7 +8695,7 @@ var managedFields = object({
8694
8695
  object({
8695
8696
  kind: literal("connector"),
8696
8697
  action: text,
8697
- connectionId: text.optional(),
8698
+ connectionId: actionConnection.optional(),
8698
8699
  outputMode: literal("value").optional()
8699
8700
  }),
8700
8701
  object({
@@ -8734,13 +8735,13 @@ var managedFields = object({
8734
8735
  name: text,
8735
8736
  description: text,
8736
8737
  action: text,
8737
- connectionId: text.optional(),
8738
+ connectionId: actionConnection.optional(),
8738
8739
  approval: boolean(),
8739
8740
  inputs: array(input.extend({ source: agentInput }))
8740
8741
  })),
8741
8742
  notification: object({
8742
8743
  action: text,
8743
- connectionId: text.optional(),
8744
+ connectionId: actionConnection.optional(),
8744
8745
  inputDefinitions: array(input),
8745
8746
  messageHandle: text,
8746
8747
  inputs: record$3(text, agentValue)
@@ -10891,6 +10892,15 @@ function flow(value) {
10891
10892
  version: 1
10892
10893
  };
10893
10894
  }
10895
+ function flowListItem(value) {
10896
+ const source = record$1(value);
10897
+ const referenceCount = integer(source.referenceCount);
10898
+ if (referenceCount < 0) return invalidResponse();
10899
+ return {
10900
+ ...flow(source),
10901
+ referenceCount
10902
+ };
10903
+ }
10894
10904
  function flowPage(value) {
10895
10905
  const source = record$1(value);
10896
10906
  if (source.version != 1 || !Array.isArray(source.flows)) return invalidResponse();
@@ -10900,7 +10910,7 @@ function flowPage(value) {
10900
10910
  if (total != null && !Number.isSafeInteger(total)) return invalidResponse();
10901
10911
  return {
10902
10912
  ...nextCursor == null ? {} : { nextCursor },
10903
- flows: source.flows.map(flow),
10913
+ flows: source.flows.map(flowListItem),
10904
10914
  ...total == null ? {} : { total },
10905
10915
  version: 1
10906
10916
  };
@@ -11101,6 +11111,21 @@ function workflowIdentity(value) {
11101
11111
  executionId: string(ref.executionId)
11102
11112
  };
11103
11113
  }
11114
+ function runInitiator(value) {
11115
+ const source = record$1(value);
11116
+ if (![
11117
+ "workbench",
11118
+ "cli",
11119
+ "mcp",
11120
+ "api",
11121
+ "trigger",
11122
+ "workflow"
11123
+ ].includes(source.channel)) return invalidResponse();
11124
+ return {
11125
+ channel: source.channel,
11126
+ ...source.actorId === void 0 ? {} : { actorId: string(source.actorId) }
11127
+ };
11128
+ }
11104
11129
  function runDetails(value) {
11105
11130
  const source = record$1(value);
11106
11131
  const summary = run(source);
@@ -11122,6 +11147,7 @@ function runDetails(value) {
11122
11147
  if (source.calls !== void 0 && !Array.isArray(source.calls)) return invalidResponse();
11123
11148
  const details = {
11124
11149
  ...summary,
11150
+ ...source.initiator === void 0 ? {} : { initiator: runInitiator(source.initiator) },
11125
11151
  ...errorHandling(source),
11126
11152
  ...source.triggerNodeId === void 0 ? {} : { triggerNodeId: string(source.triggerNodeId) },
11127
11153
  ...source.caller === void 0 ? {} : { caller: workflowIdentity(source.caller) },
@@ -11499,7 +11525,8 @@ function operationKey(operation) {
11499
11525
  return `${operation}-${randomId()}`;
11500
11526
  }
11501
11527
  var ControlClient = class {
11502
- constructor(requestControl) {
11528
+ constructor(requestControl, channel = "api") {
11529
+ this.channel = channel;
11503
11530
  this.requestControl = requestControl;
11504
11531
  }
11505
11532
  async loadOpenApiDocument(url, signal) {
@@ -12019,7 +12046,10 @@ var ControlClient = class {
12019
12046
  trigger: options.trigger,
12020
12047
  version: 2
12021
12048
  }),
12022
- headers: { "idempotency-key": options.idempotencyKey ?? operationKey("run") },
12049
+ headers: {
12050
+ "idempotency-key": options.idempotencyKey ?? operationKey("run"),
12051
+ "x-open-flow-client": this.channel
12052
+ },
12023
12053
  method: "POST"
12024
12054
  }));
12025
12055
  return created.source == "draft" ? created : invalidResponse();
@@ -12032,7 +12062,10 @@ var ControlClient = class {
12032
12062
  publicationId,
12033
12063
  version: 2
12034
12064
  }),
12035
- headers: { "idempotency-key": options.idempotencyKey ?? operationKey("run") },
12065
+ headers: {
12066
+ "idempotency-key": options.idempotencyKey ?? operationKey("run"),
12067
+ "x-open-flow-client": this.channel
12068
+ },
12036
12069
  method: "POST"
12037
12070
  }));
12038
12071
  return created.source == "live" ? created : invalidResponse();
@@ -12712,13 +12745,22 @@ var controlApiConformanceCases = [
12712
12745
  await error(await createFlowRequest(harness, "Different flow", "flow-lifecycle"), 409, "flow.conflict", "Conflicting Flow");
12713
12746
  equal(await json(await request(harness, `/v1/flows/${flowId}`), 200, "Read Flow"), created, "Read Flow");
12714
12747
  const page = await json(await request(harness, "/v1/flows?includeTotal=true"), 200, "List Flows");
12715
- equal(page.flows, [created], "Listed Flows");
12748
+ equal(page.flows, [{
12749
+ ...created,
12750
+ referenceCount: 0
12751
+ }], "Listed Flows");
12716
12752
  equal(page.total, 1, "Flow total");
12717
12753
  const second = await createFlow(harness, "Second control flow", "flow-lifecycle-second");
12718
12754
  const firstPage = await json(await request(harness, "/v1/flows?limit=1"), 200, "List first Flow page");
12719
- equal(firstPage.flows, [created], "First Flow page");
12755
+ equal(firstPage.flows, [{
12756
+ ...created,
12757
+ referenceCount: 0
12758
+ }], "First Flow page");
12720
12759
  const cursor = requiredString(firstPage.nextCursor, "Flow cursor");
12721
- equal((await json(await request(harness, `/v1/flows?limit=1&cursor=${encodeURIComponent(cursor)}`), 200, "List second Flow page")).flows, [second], "Second Flow page");
12760
+ equal((await json(await request(harness, `/v1/flows?limit=1&cursor=${encodeURIComponent(cursor)}`), 200, "List second Flow page")).flows, [{
12761
+ ...second,
12762
+ referenceCount: 0
12763
+ }], "Second Flow page");
12722
12764
  equal((await json(await request(harness, `/v1/flows/${flowId}`, {
12723
12765
  body: JSON.stringify({
12724
12766
  name: "Renamed flow",
@@ -13259,7 +13301,10 @@ var publicationControlApiConformanceCases = [
13259
13301
  publicationId,
13260
13302
  revisionId
13261
13303
  }, "Disabled summary");
13262
- equal((await json(await request(harness, "/v1/flows"), 200, "List disabled Flow")).flows, [disabled], "List includes Live state");
13304
+ equal((await json(await request(harness, "/v1/flows"), 200, "List disabled Flow")).flows, [{
13305
+ ...disabled,
13306
+ referenceCount: 0
13307
+ }], "List includes Live state");
13263
13308
  equal((await json(await request(harness, `/v1/flows/${flowId}/live`), 200, "Disabled Live")).status, "suspended", "Disabled Live status");
13264
13309
  await error(await liveRunRequest(harness, publicationId, "disabled-run"), 412, "live.conflict", "Disabled Live rejects Run");
13265
13310
  await json(await request(harness, `/v1/flows/${flowId}/revisions/${revisionId}/runs`, {
@@ -86,8 +86,11 @@ export interface Presentation {
86
86
  readonly value: Readonly<Record<string, JsonValue>>;
87
87
  readonly version: 1;
88
88
  }
89
+ export interface FlowListItem extends Flow {
90
+ readonly referenceCount: number;
91
+ }
89
92
  export interface FlowPage {
90
- readonly flows: readonly Flow[];
93
+ readonly flows: readonly FlowListItem[];
91
94
  readonly nextCursor?: string;
92
95
  readonly total?: number;
93
96
  readonly version: 1;
@@ -378,6 +381,11 @@ export interface PublicationPage {
378
381
  readonly total?: number;
379
382
  readonly version: 1;
380
383
  }
384
+ export type RunChannel = 'workbench' | 'cli' | 'mcp' | 'api' | 'trigger' | 'workflow';
385
+ export interface RunInitiator {
386
+ readonly actorId?: string;
387
+ readonly channel: RunChannel;
388
+ }
381
389
  export interface Run {
382
390
  readonly createdAt: string;
383
391
  readonly finishedAt?: string;
@@ -419,6 +427,7 @@ export interface WorkflowRunCall extends WorkflowCaller {
419
427
  readonly status: RunStatus | null;
420
428
  }
421
429
  type RunDetailsBase = Run & {
430
+ readonly initiator?: RunInitiator;
422
431
  readonly caller?: WorkflowCaller;
423
432
  readonly calls?: readonly WorkflowRunCall[];
424
433
  readonly triggerNodeId?: string;
@@ -785,7 +794,8 @@ export type ConditionalResult<T> = {
785
794
  };
786
795
  export declare class ControlClient {
787
796
  private readonly requestControl;
788
- constructor(requestControl: ControlRequest);
797
+ private readonly channel;
798
+ constructor(requestControl: ControlRequest, channel?: 'workbench' | 'cli' | 'api');
789
799
  loadOpenApiDocument(url: string, signal?: AbortSignal): Promise<JsonValue>;
790
800
  listFlows(options?: {
791
801
  readonly cursor?: string;
@@ -5823,6 +5823,7 @@ function webhookSupportsBody(method) {
5823
5823
  return method !== "GET";
5824
5824
  }
5825
5825
  var text = string$1();
5826
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
5826
5827
  var json$2 = json$3();
5827
5828
  var strings$1 = array(text);
5828
5829
  var port$1 = object({
@@ -5878,7 +5879,7 @@ var capability = union([
5878
5879
  mode: literal("independent"),
5879
5880
  actions: array(strictObject({
5880
5881
  action: text,
5881
- connectionId: text.optional()
5882
+ connectionId: actionConnection.optional()
5882
5883
  }))
5883
5884
  }),
5884
5885
  strictObject({
@@ -5938,7 +5939,7 @@ var managedFields = object({
5938
5939
  object({
5939
5940
  kind: literal("connector"),
5940
5941
  action: text,
5941
- connectionId: text.optional(),
5942
+ connectionId: actionConnection.optional(),
5942
5943
  outputMode: literal("value").optional()
5943
5944
  }),
5944
5945
  object({
@@ -5978,13 +5979,13 @@ var managedFields = object({
5978
5979
  name: text,
5979
5980
  description: text,
5980
5981
  action: text,
5981
- connectionId: text.optional(),
5982
+ connectionId: actionConnection.optional(),
5982
5983
  approval: boolean(),
5983
5984
  inputs: array(input.extend({ source: agentInput }))
5984
5985
  })),
5985
5986
  notification: object({
5986
5987
  action: text,
5987
- connectionId: text.optional(),
5988
+ connectionId: actionConnection.optional(),
5988
5989
  inputDefinitions: array(input),
5989
5990
  messageHandle: text,
5990
5991
  inputs: record$2(text, agentValue)
@@ -11538,6 +11539,15 @@ function flow(value) {
11538
11539
  version: 1
11539
11540
  };
11540
11541
  }
11542
+ function flowListItem(value) {
11543
+ const source = record(value);
11544
+ const referenceCount = integer(source.referenceCount);
11545
+ if (referenceCount < 0) return invalidResponse();
11546
+ return {
11547
+ ...flow(source),
11548
+ referenceCount
11549
+ };
11550
+ }
11541
11551
  function flowPage(value) {
11542
11552
  const source = record(value);
11543
11553
  if (source.version != 1 || !Array.isArray(source.flows)) return invalidResponse();
@@ -11547,7 +11557,7 @@ function flowPage(value) {
11547
11557
  if (total != null && !Number.isSafeInteger(total)) return invalidResponse();
11548
11558
  return {
11549
11559
  ...nextCursor == null ? {} : { nextCursor },
11550
- flows: source.flows.map(flow),
11560
+ flows: source.flows.map(flowListItem),
11551
11561
  ...total == null ? {} : { total },
11552
11562
  version: 1
11553
11563
  };
@@ -11748,6 +11758,21 @@ function workflowIdentity(value) {
11748
11758
  executionId: string(ref.executionId)
11749
11759
  };
11750
11760
  }
11761
+ function runInitiator(value) {
11762
+ const source = record(value);
11763
+ if (![
11764
+ "workbench",
11765
+ "cli",
11766
+ "mcp",
11767
+ "api",
11768
+ "trigger",
11769
+ "workflow"
11770
+ ].includes(source.channel)) return invalidResponse();
11771
+ return {
11772
+ channel: source.channel,
11773
+ ...source.actorId === void 0 ? {} : { actorId: string(source.actorId) }
11774
+ };
11775
+ }
11751
11776
  function runDetails(value) {
11752
11777
  const source = record(value);
11753
11778
  const summary = run(source);
@@ -11769,6 +11794,7 @@ function runDetails(value) {
11769
11794
  if (source.calls !== void 0 && !Array.isArray(source.calls)) return invalidResponse();
11770
11795
  const details = {
11771
11796
  ...summary,
11797
+ ...source.initiator === void 0 ? {} : { initiator: runInitiator(source.initiator) },
11772
11798
  ...errorHandling(source),
11773
11799
  ...source.triggerNodeId === void 0 ? {} : { triggerNodeId: string(source.triggerNodeId) },
11774
11800
  ...source.caller === void 0 ? {} : { caller: workflowIdentity(source.caller) },
@@ -12149,7 +12175,8 @@ function operationKey(operation) {
12149
12175
  return `${operation}-${randomId()}`;
12150
12176
  }
12151
12177
  var ControlClient = class {
12152
- constructor(requestControl) {
12178
+ constructor(requestControl, channel = "api") {
12179
+ this.channel = channel;
12153
12180
  this.requestControl = requestControl;
12154
12181
  }
12155
12182
  async loadOpenApiDocument(url, signal) {
@@ -12669,7 +12696,10 @@ var ControlClient = class {
12669
12696
  trigger: options.trigger,
12670
12697
  version: 2
12671
12698
  }),
12672
- headers: { "idempotency-key": options.idempotencyKey ?? operationKey("run") },
12699
+ headers: {
12700
+ "idempotency-key": options.idempotencyKey ?? operationKey("run"),
12701
+ "x-open-flow-client": this.channel
12702
+ },
12673
12703
  method: "POST"
12674
12704
  }));
12675
12705
  return created.source == "draft" ? created : invalidResponse();
@@ -12682,7 +12712,10 @@ var ControlClient = class {
12682
12712
  publicationId,
12683
12713
  version: 2
12684
12714
  }),
12685
- headers: { "idempotency-key": options.idempotencyKey ?? operationKey("run") },
12715
+ headers: {
12716
+ "idempotency-key": options.idempotencyKey ?? operationKey("run"),
12717
+ "x-open-flow-client": this.channel
12718
+ },
12686
12719
  method: "POST"
12687
12720
  }));
12688
12721
  return created.source == "live" ? created : invalidResponse();
@@ -6887,7 +6887,7 @@ function decodeConnectorCapabilities(value) {
6887
6887
  const actions = source.actions.map((entry) => {
6888
6888
  if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Action.");
6889
6889
  const action = entry;
6890
- if (Object.keys(action).some((key) => !["action", "connectionId"].includes(key)) || typeof action.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action.action) || Object.hasOwn(action, "connectionId") && (typeof action.connectionId != "string" || action.connectionId.length == 0)) throw new TypeError("Invalid Connector Action permission.");
6890
+ if (Object.keys(action).some((key) => !["action", "connectionId"].includes(key)) || typeof action.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action.action) || Object.hasOwn(action, "connectionId") && typeof action.connectionId != "string") throw new TypeError("Invalid Connector Action permission.");
6891
6891
  return action.connectionId == null ? { action: action.action } : {
6892
6892
  action: action.action,
6893
6893
  connectionId: action.connectionId
@@ -10423,6 +10423,7 @@ function webhookSupportsBody(method) {
10423
10423
  return method !== "GET";
10424
10424
  }
10425
10425
  var text$1 = string();
10426
+ var actionConnection = text$1.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
10426
10427
  var json$4 = json$5();
10427
10428
  var strings = array(text$1);
10428
10429
  var port = object$1({
@@ -10478,7 +10479,7 @@ var capability = union([
10478
10479
  mode: literal("independent"),
10479
10480
  actions: array(strictObject({
10480
10481
  action: text$1,
10481
- connectionId: text$1.optional()
10482
+ connectionId: actionConnection.optional()
10482
10483
  }))
10483
10484
  }),
10484
10485
  strictObject({
@@ -10538,7 +10539,7 @@ var managedFields = object$1({
10538
10539
  object$1({
10539
10540
  kind: literal("connector"),
10540
10541
  action: text$1,
10541
- connectionId: text$1.optional(),
10542
+ connectionId: actionConnection.optional(),
10542
10543
  outputMode: literal("value").optional()
10543
10544
  }),
10544
10545
  object$1({
@@ -10578,13 +10579,13 @@ var managedFields = object$1({
10578
10579
  name: text$1,
10579
10580
  description: text$1,
10580
10581
  action: text$1,
10581
- connectionId: text$1.optional(),
10582
+ connectionId: actionConnection.optional(),
10582
10583
  approval: boolean(),
10583
10584
  inputs: array(input.extend({ source: agentInput }))
10584
10585
  })),
10585
10586
  notification: object$1({
10586
10587
  action: text$1,
10587
- connectionId: text$1.optional(),
10588
+ connectionId: actionConnection.optional(),
10588
10589
  inputDefinitions: array(input),
10589
10590
  messageHandle: text$1,
10590
10591
  inputs: record$3(text$1, agentValue)
@@ -14170,7 +14171,7 @@ var descriptions = {
14170
14171
  "integration": "Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.",
14171
14172
  "decision": "AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running.",
14172
14173
  "openapi": "A fixed JSON API operation. Replace the example document and URL before running.",
14173
- "connector": "A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show.",
14174
+ "connector": "A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account.",
14174
14175
  "code": "A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions.",
14175
14176
  "condition": "A condition with true and false execution branches.",
14176
14177
  "value": "A fixed value node.",
@@ -6597,6 +6597,7 @@ var webhookMethods = [
6597
6597
  "DELETE"
6598
6598
  ];
6599
6599
  var text = string();
6600
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
6600
6601
  var json = json$1();
6601
6602
  var strings = array(text);
6602
6603
  var port = object({
@@ -6652,7 +6653,7 @@ var capability = union([
6652
6653
  mode: literal("independent"),
6653
6654
  actions: array(strictObject({
6654
6655
  action: text,
6655
- connectionId: text.optional()
6656
+ connectionId: actionConnection.optional()
6656
6657
  }))
6657
6658
  }),
6658
6659
  strictObject({
@@ -6712,7 +6713,7 @@ var managedFields = object({
6712
6713
  object({
6713
6714
  kind: literal("connector"),
6714
6715
  action: text,
6715
- connectionId: text.optional(),
6716
+ connectionId: actionConnection.optional(),
6716
6717
  outputMode: literal("value").optional()
6717
6718
  }),
6718
6719
  object({
@@ -6752,13 +6753,13 @@ var managedFields = object({
6752
6753
  name: text,
6753
6754
  description: text,
6754
6755
  action: text,
6755
- connectionId: text.optional(),
6756
+ connectionId: actionConnection.optional(),
6756
6757
  approval: boolean(),
6757
6758
  inputs: array(input.extend({ source: agentInput }))
6758
6759
  })),
6759
6760
  notification: object({
6760
6761
  action: text,
6761
- connectionId: text.optional(),
6762
+ connectionId: actionConnection.optional(),
6762
6763
  inputDefinitions: array(input),
6763
6764
  messageHandle: text,
6764
6765
  inputs: record$1(text, agentValue)
@@ -8579,6 +8579,7 @@ var webhookMethods = [
8579
8579
  "DELETE"
8580
8580
  ];
8581
8581
  var text = string();
8582
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
8582
8583
  var json = json$1();
8583
8584
  var strings = array(text);
8584
8585
  var port = object({
@@ -8634,7 +8635,7 @@ var capability = union([
8634
8635
  mode: literal("independent"),
8635
8636
  actions: array(strictObject({
8636
8637
  action: text,
8637
- connectionId: text.optional()
8638
+ connectionId: actionConnection.optional()
8638
8639
  }))
8639
8640
  }),
8640
8641
  strictObject({
@@ -8694,7 +8695,7 @@ var managedFields = object({
8694
8695
  object({
8695
8696
  kind: literal("connector"),
8696
8697
  action: text,
8697
- connectionId: text.optional(),
8698
+ connectionId: actionConnection.optional(),
8698
8699
  outputMode: literal("value").optional()
8699
8700
  }),
8700
8701
  object({
@@ -8734,13 +8735,13 @@ var managedFields = object({
8734
8735
  name: text,
8735
8736
  description: text,
8736
8737
  action: text,
8737
- connectionId: text.optional(),
8738
+ connectionId: actionConnection.optional(),
8738
8739
  approval: boolean(),
8739
8740
  inputs: array(input.extend({ source: agentInput }))
8740
8741
  })),
8741
8742
  notification: object({
8742
8743
  action: text,
8743
- connectionId: text.optional(),
8744
+ connectionId: actionConnection.optional(),
8744
8745
  inputDefinitions: array(input),
8745
8746
  messageHandle: text,
8746
8747
  inputs: record$1(text, agentValue)
@@ -9522,6 +9523,7 @@ function clearNodeConnections(graph, connectionId) {
9522
9523
  if ("executor" in node.task) {
9523
9524
  const executor = node.task.executor;
9524
9525
  const clear = (value) => {
9526
+ if (value.connectionId === "") return value;
9525
9527
  if (connectionId != null && value.connectionId != connectionId) return value;
9526
9528
  const { connectionId: _, ...rest } = value;
9527
9529
  return rest;
@@ -9566,6 +9568,7 @@ function clearNodeConnections(graph, connectionId) {
9566
9568
  return {
9567
9569
  ...capability,
9568
9570
  actions: capability.actions.map((action) => {
9571
+ if (action.connectionId === "") return action;
9569
9572
  if (connectionId != null && action.connectionId != connectionId) return action;
9570
9573
  const { connectionId: _, ...remaining } = action;
9571
9574
  return remaining;
@@ -6611,6 +6611,7 @@ function webhookSupportsBody(method) {
6611
6611
  return method !== "GET";
6612
6612
  }
6613
6613
  var text = string();
6614
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
6614
6615
  var json = json$1();
6615
6616
  var strings = array(text);
6616
6617
  var port = object$1({
@@ -6666,7 +6667,7 @@ var capability = union([
6666
6667
  mode: literal("independent"),
6667
6668
  actions: array(strictObject({
6668
6669
  action: text,
6669
- connectionId: text.optional()
6670
+ connectionId: actionConnection.optional()
6670
6671
  }))
6671
6672
  }),
6672
6673
  strictObject({
@@ -6726,7 +6727,7 @@ var managedFields = object$1({
6726
6727
  object$1({
6727
6728
  kind: literal("connector"),
6728
6729
  action: text,
6729
- connectionId: text.optional(),
6730
+ connectionId: actionConnection.optional(),
6730
6731
  outputMode: literal("value").optional()
6731
6732
  }),
6732
6733
  object$1({
@@ -6766,13 +6767,13 @@ var managedFields = object$1({
6766
6767
  name: text,
6767
6768
  description: text,
6768
6769
  action: text,
6769
- connectionId: text.optional(),
6770
+ connectionId: actionConnection.optional(),
6770
6771
  approval: boolean(),
6771
6772
  inputs: array(input.extend({ source: agentInput$1 }))
6772
6773
  })),
6773
6774
  notification: object$1({
6774
6775
  action: text,
6775
- connectionId: text.optional(),
6776
+ connectionId: actionConnection.optional(),
6776
6777
  inputDefinitions: array(input),
6777
6778
  messageHandle: text,
6778
6779
  inputs: record$1(text, agentValue)
@@ -7367,7 +7368,7 @@ function decodeConnectorCapabilities(value) {
7367
7368
  const actions = source.actions.map((entry) => {
7368
7369
  if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Action.");
7369
7370
  const action = entry;
7370
- if (Object.keys(action).some((key) => !["action", "connectionId"].includes(key)) || typeof action.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action.action) || Object.hasOwn(action, "connectionId") && (typeof action.connectionId != "string" || action.connectionId.length == 0)) throw new TypeError("Invalid Connector Action permission.");
7371
+ if (Object.keys(action).some((key) => !["action", "connectionId"].includes(key)) || typeof action.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action.action) || Object.hasOwn(action, "connectionId") && typeof action.connectionId != "string") throw new TypeError("Invalid Connector Action permission.");
7371
7372
  return action.connectionId == null ? { action: action.action } : {
7372
7373
  action: action.action,
7373
7374
  connectionId: action.connectionId
@@ -11097,6 +11098,7 @@ function clearNodeConnections(graph, connectionId) {
11097
11098
  if ("executor" in node.task) {
11098
11099
  const executor = node.task.executor;
11099
11100
  const clear = (value) => {
11101
+ if (value.connectionId === "") return value;
11100
11102
  if (connectionId != null && value.connectionId != connectionId) return value;
11101
11103
  const { connectionId: _, ...rest } = value;
11102
11104
  return rest;
@@ -11141,6 +11143,7 @@ function clearNodeConnections(graph, connectionId) {
11141
11143
  return {
11142
11144
  ...capability,
11143
11145
  actions: capability.actions.map((action) => {
11146
+ if (action.connectionId === "") return action;
11144
11147
  if (connectionId != null && action.connectionId != connectionId) return action;
11145
11148
  const { connectionId: _, ...remaining } = action;
11146
11149
  return remaining;
@@ -11606,7 +11609,7 @@ function agentConfigIssues(task) {
11606
11609
  ids.add(tool.id);
11607
11610
  names.add(tool.name);
11608
11611
  if (tool.description.trim().length == 0) issues.push(`Tool ${tool.name} requires a description.`);
11609
- if (!/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(tool.action) || tool.connectionId === "") issues.push(`Tool ${tool.name} has an invalid Action or Connection.`);
11612
+ if (!/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(tool.action)) issues.push(`Tool ${tool.name} has an invalid Action or Connection.`);
11610
11613
  const fields = /* @__PURE__ */ new Set();
11611
11614
  for (const port of tool.inputs) {
11612
11615
  if (port.handle.length == 0 || fields.has(port.handle)) issues.push(`Tool ${tool.name} has an empty or duplicate input.`);
@@ -24177,7 +24180,7 @@ function variableBindings(revision, bindingIds) {
24177
24180
  function flowResourceReferences(content) {
24178
24181
  const connections = /* @__PURE__ */ new Map();
24179
24182
  for (const use of connectionUsage(content.document)) {
24180
- if (use.connectionId == null) continue;
24183
+ if (use.connectionId == null || use.connectionId === "") continue;
24181
24184
  connections.set(JSON.stringify([use.providerId, use.connectionId]), {
24182
24185
  providerId: use.providerId,
24183
24186
  connectionId: use.connectionId
@@ -24432,7 +24435,7 @@ function agentActions(flow) {
24432
24435
  const task = node.task;
24433
24436
  if (task.executor.kind != "agent") return [];
24434
24437
  const notice = task.executor.notification;
24435
- return [...task.executor.tools, ...notice != null ? [notice] : []].map((tool) => ({
24438
+ return [...task.executor.tools, ...notice != null ? [notice] : []].filter((tool) => tool.connectionId !== "").map((tool) => ({
24436
24439
  kind: "connector",
24437
24440
  action: tool.action,
24438
24441
  connections: tool.connectionId == null ? [] : [{ connectionId: tool.connectionId }]
@@ -6694,6 +6694,7 @@ var webhookMethods = [
6694
6694
  "DELETE"
6695
6695
  ];
6696
6696
  var text = string();
6697
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
6697
6698
  var json = json$1();
6698
6699
  var strings = array(text);
6699
6700
  var port = object({
@@ -6749,7 +6750,7 @@ var capability = union([
6749
6750
  mode: literal("independent"),
6750
6751
  actions: array(strictObject({
6751
6752
  action: text,
6752
- connectionId: text.optional()
6753
+ connectionId: actionConnection.optional()
6753
6754
  }))
6754
6755
  }),
6755
6756
  strictObject({
@@ -6809,7 +6810,7 @@ var managedFields = object({
6809
6810
  object({
6810
6811
  kind: literal("connector"),
6811
6812
  action: text,
6812
- connectionId: text.optional(),
6813
+ connectionId: actionConnection.optional(),
6813
6814
  outputMode: literal("value").optional()
6814
6815
  }),
6815
6816
  object({
@@ -6849,13 +6850,13 @@ var managedFields = object({
6849
6850
  name: text,
6850
6851
  description: text,
6851
6852
  action: text,
6852
- connectionId: text.optional(),
6853
+ connectionId: actionConnection.optional(),
6853
6854
  approval: boolean(),
6854
6855
  inputs: array(input.extend({ source: agentInput }))
6855
6856
  })),
6856
6857
  notification: object({
6857
6858
  action: text,
6858
- connectionId: text.optional(),
6859
+ connectionId: actionConnection.optional(),
6859
6860
  inputDefinitions: array(input),
6860
6861
  messageHandle: text,
6861
6862
  inputs: record$2(text, agentValue)