@oomol-lab/open-flow 0.1.0-beta.37 → 0.1.0-beta.38

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.
@@ -57,5 +57,6 @@ export type PrepareFlowResult = {
57
57
  };
58
58
  export declare function prepareFlow(revision: RevisionContent, engineContract: string, triggerId?: string): Promise<PrepareFlowResult>;
59
59
  export declare function createRuntimeProgram(prepared: PreparedFlow, entryModuleId: string, engineDigest: string): RuntimeProgram | undefined;
60
+ export declare function referencedTaskIds(flow: Pick<FlowDocument, 'graph' | 'subflows' | 'tasks'>): ReadonlySet<string>;
60
61
  export declare function agentActions(flow: Pick<PreparedFlow, 'tasks'>): readonly ConnectorActionCapability[];
61
62
  export declare function codeActions(flow: Pick<PreparedFlow, 'graph' | 'subflows'>): readonly ConnectorCapability[];
@@ -17500,6 +17500,16 @@ function av(e, t, n) {
17500
17500
  };
17501
17501
  }
17502
17502
  function ov(e) {
17503
+ let t = /* @__PURE__ */ new Set();
17504
+ for (let n of [e.graph, ...Object.values(e.subflows).map((e) => e.graph)]) for (let r of Object.values(n.nodes)) {
17505
+ if (r.kind != "task" || r.taskId == null) continue;
17506
+ t.add(r.taskId);
17507
+ let n = e.tasks[r.taskId]?.executor;
17508
+ n?.kind == "agent" && n.notification != null && t.add(n.notification.taskId);
17509
+ }
17510
+ return t;
17511
+ }
17512
+ function sv(e) {
17503
17513
  return Object.values(e.tasks).flatMap((t) => {
17504
17514
  if (t.executor.kind != "agent") return [];
17505
17515
  let n = t.executor.notification == null ? void 0 : e.tasks[t.executor.notification.taskId]?.executor;
@@ -17510,8 +17520,8 @@ function ov(e) {
17510
17520
  }));
17511
17521
  });
17512
17522
  }
17513
- function sv(e) {
17523
+ function cv(e) {
17514
17524
  return [e.graph, ...Object.values(e.subflows).map((e) => e.graph)].flatMap((e) => Object.values(e.nodes).flatMap((e) => e.kind == "task" && e.task != null ? e.task.capabilities ?? [] : []));
17515
17525
  }
17516
17526
  //#endregion
17517
- export { ov as agentActions, Sp as agentInput, wp as agentToolInput, Cp as agentToolSchema, Em as availableOutputs, sv as codeActions, av as createRuntimeProgram, Q_ as flowClosure, Z_ as flowDependencies, vm as graphOrder, Xf as matchesSchema, up as matchesTriggerOutputs, fm as nodeInputPorts, iv as prepareFlow, cp as triggerOutputDefinitions, lp as triggerOutputPorts, ev as validRunTrigger, nv as validateFlow, tv as validateFlowInputs, Y_ as validateModules, $_ as variableBindings, ip as variableInputCompatible };
17527
+ export { sv as agentActions, Sp as agentInput, wp as agentToolInput, Cp as agentToolSchema, Em as availableOutputs, cv as codeActions, av as createRuntimeProgram, Q_ as flowClosure, Z_ as flowDependencies, vm as graphOrder, Xf as matchesSchema, up as matchesTriggerOutputs, fm as nodeInputPorts, iv as prepareFlow, ov as referencedTaskIds, cp as triggerOutputDefinitions, lp as triggerOutputPorts, ev as validRunTrigger, nv as validateFlow, tv as validateFlowInputs, Y_ as validateModules, $_ as variableBindings, ip as variableInputCompatible };