@fieldwangai/agentflow 0.1.73 → 0.1.74

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.
@@ -5386,18 +5386,9 @@ function listWorkspaceScheduleStatusesForFlow(userCtx = {}, flowSource = "user",
5386
5386
 
5387
5387
  function workspaceScheduleInferTargetRunNodeId(graph, scheduleNodeId, config = {}) {
5388
5388
  const instances = graph?.instances && typeof graph.instances === "object" ? graph.instances : {};
5389
- const explicit = String(config.targetRunNodeId || "").trim();
5390
- if (explicit && String(instances[explicit]?.definitionId || "") === "workspace_run") return explicit;
5391
- const edges = Array.isArray(graph?.edges) ? graph.edges : [];
5392
- for (const edge of edges) {
5393
- const source = String(edge?.source || "");
5394
- const target = String(edge?.target || "");
5395
- if (source !== String(scheduleNodeId || "") || !target) continue;
5396
- if (!workspaceIsControlEdge(graph, edge)) continue;
5397
- if (String(instances[target]?.definitionId || "") === "workspace_run") return target;
5398
- }
5399
- const firstRun = Object.entries(instances).find(([, instance]) => String(instance?.definitionId || "") === "workspace_run");
5400
- return firstRun ? firstRun[0] : "";
5389
+ return String(instances[scheduleNodeId]?.definitionId || "") === "workspace_scheduled_run"
5390
+ ? String(scheduleNodeId || "")
5391
+ : "";
5401
5392
  }
5402
5393
 
5403
5394
  function syncWorkspaceSchedulesForGraph(root, scoped, graph, authUser, userCtx = {}) {
@@ -5436,7 +5427,7 @@ function syncWorkspaceSchedulesForGraph(root, scoped, graph, authUser, userCtx =
5436
5427
  : workspaceScheduleNextRunAt(config, new Date(now));
5437
5428
  if (!targetRunNodeId) {
5438
5429
  lastStatus = "invalid";
5439
- lastError = "No target Run node selected or connected";
5430
+ lastError = "Scheduled Run node is missing";
5440
5431
  }
5441
5432
  } catch (e) {
5442
5433
  lastStatus = "invalid";
@@ -5533,7 +5524,7 @@ async function runWorkspaceScheduledEntry(root, entry) {
5533
5524
  updateWorkspaceScheduleEntry(entry.key, {
5534
5525
  nextRunAt,
5535
5526
  lastStatus: "invalid",
5536
- lastError: "No target Run node selected or connected",
5527
+ lastError: "Scheduled Run node is missing",
5537
5528
  lastErrorAt: Date.now(),
5538
5529
  });
5539
5530
  return;