@nanobpm/nano-workforce 0.91.0 → 0.93.0

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.
@@ -14,7 +14,7 @@
14
14
  import type { AppJobHandler } from "@nanobpm/urban";
15
15
  import { BpmnError } from "@nanobpm/urban";
16
16
  import { deriveEpicPhase } from "../../app/epicPhase.ts";
17
- import { planTasks } from "../../app/plan.ts";
17
+ import { plans, planTasks } from "../../app/plan.ts";
18
18
  import type { WorkerInputs } from "../../nano-generated/worker-io.d.ts";
19
19
 
20
20
  // Input typed off the model data envelope (`RecordResultsIn` in plan-fanout.bpmn) — ADR 0040.
@@ -39,7 +39,7 @@ const handler: AppJobHandler<In> = async (job, app) => {
39
39
  const outcome = rows.length === 0
40
40
  ? "no work dispatched — the planner produced no tasks"
41
41
  : "no work dispatched — every task was blocked or skipped";
42
- await app.data.table("plans", "plan_key").update(planKey, {
42
+ await plans(app.data).update(planKey, {
43
43
  status: "failed",
44
44
  outcome,
45
45
  updated_at: ts,
@@ -56,7 +56,7 @@ const handler: AppJobHandler<In> = async (job, app) => {
56
56
  // outcome, and stamping "Dispatched" against a failed epic would misread. A null derivation
57
57
  // (element id absent) must not clobber the last implementing phase.
58
58
  const epicPhase = deriveEpicPhase(job.elementId);
59
- await app.data.table("plans", "plan_key").update(planKey, {
59
+ await plans(app.data).update(planKey, {
60
60
  status: "done",
61
61
  outcome: `${opened} PR(s) dispatched to convergence`,
62
62
  ...(epicPhase ? { epic_phase: epicPhase } : {}),