@ordewell/core 0.10.7 → 0.10.9

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.
@@ -1,5 +1,5 @@
1
1
  import { ChildProcess } from 'child_process';
2
- import { a4 as RunnerId, av as UsageRecord, ag as SubagentOutcome, a5 as RunnerSessionCost, d as DiscoveredModel, ap as TaskSkillSnapshot } from './Task-C0o4i3Nn.js';
2
+ import { a4 as RunnerId, av as UsageRecord, ag as SubagentOutcome, a5 as RunnerSessionCost, d as DiscoveredModel, ap as TaskSkillSnapshot } from './Task-hFfRS9rN.js';
3
3
  import { z } from 'zod/v4';
4
4
 
5
5
  /**
@@ -1427,6 +1427,8 @@ interface AgentAdapter {
1427
1427
  sessionCost?(): RunnerSessionCost | null;
1428
1428
  /** Kill the process and release its resources. Idempotent. */
1429
1429
  dispose(): void;
1430
+ /** Whether the process has ended, for any reason. One that has can take no further turn. */
1431
+ readonly exited: boolean;
1430
1432
  /**
1431
1433
  * Whether the Ordewell MCP server passed in the start options' `mcp` is
1432
1434
  * connected, as the runner itself reports it (ADR-0022, S4). Absent on an
@@ -1,5 +1,5 @@
1
1
  import { ChildProcess } from 'child_process';
2
- import { a4 as RunnerId, av as UsageRecord, ag as SubagentOutcome, a5 as RunnerSessionCost, d as DiscoveredModel, ap as TaskSkillSnapshot } from './Task-C0o4i3Nn.mjs';
2
+ import { a4 as RunnerId, av as UsageRecord, ag as SubagentOutcome, a5 as RunnerSessionCost, d as DiscoveredModel, ap as TaskSkillSnapshot } from './Task-hFfRS9rN.mjs';
3
3
  import { z } from 'zod/v4';
4
4
 
5
5
  /**
@@ -1427,6 +1427,8 @@ interface AgentAdapter {
1427
1427
  sessionCost?(): RunnerSessionCost | null;
1428
1428
  /** Kill the process and release its resources. Idempotent. */
1429
1429
  dispose(): void;
1430
+ /** Whether the process has ended, for any reason. One that has can take no further turn. */
1431
+ readonly exited: boolean;
1430
1432
  /**
1431
1433
  * Whether the Ordewell MCP server passed in the start options' `mcp` is
1432
1434
  * connected, as the runner itself reports it (ADR-0022, S4). Absent on an
@@ -1,4 +1,4 @@
1
- import { a4 as RunnerId } from './Task-C0o4i3Nn.mjs';
1
+ import { a4 as RunnerId } from './Task-hFfRS9rN.mjs';
2
2
 
3
3
  interface RunnerModeInfo {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { a4 as RunnerId } from './Task-C0o4i3Nn.js';
1
+ import { a4 as RunnerId } from './Task-hFfRS9rN.js';
2
2
 
3
3
  interface RunnerModeInfo {
4
4
  id: string;
@@ -125,8 +125,9 @@ interface IsolationTaskRecord {
125
125
  repairedFiles?: string[];
126
126
  /**
127
127
  * Set once the task's landed work is in the checked-out HEAD of every repo
128
- * it changed — merged into the user's branch, by Merge all or by hand. What
129
- * a merge gate waits for (ADR-0020).
128
+ * it changed — merged into the user's branch, by Merge all or by hand — or
129
+ * can no longer be merged there, its integration branch gone. What a merge
130
+ * gate waits for (ADR-0020).
130
131
  */
131
132
  inHead?: true;
132
133
  }
@@ -502,7 +503,9 @@ interface IWorktreeIsolation {
502
503
  /**
503
504
  * Mark the landed tasks whose work the checked-out HEAD now contains in
504
505
  * every repo they changed (`git merge-base --is-ancestor`), and return their
505
- * ids. Only adds marks: a task found merged stays merged.
506
+ * ids. A repo whose integration branch is gone counts as containing it: no
507
+ * Merge all could bring that work in. Only adds marks: a task found merged
508
+ * stays merged.
506
509
  */
507
510
  findInHead(run: IsolationRun): Promise<string[]>;
508
511
  /**
@@ -125,8 +125,9 @@ interface IsolationTaskRecord {
125
125
  repairedFiles?: string[];
126
126
  /**
127
127
  * Set once the task's landed work is in the checked-out HEAD of every repo
128
- * it changed — merged into the user's branch, by Merge all or by hand. What
129
- * a merge gate waits for (ADR-0020).
128
+ * it changed — merged into the user's branch, by Merge all or by hand — or
129
+ * can no longer be merged there, its integration branch gone. What a merge
130
+ * gate waits for (ADR-0020).
130
131
  */
131
132
  inHead?: true;
132
133
  }
@@ -502,7 +503,9 @@ interface IWorktreeIsolation {
502
503
  /**
503
504
  * Mark the landed tasks whose work the checked-out HEAD now contains in
504
505
  * every repo they changed (`git merge-base --is-ancestor`), and return their
505
- * ids. Only adds marks: a task found merged stays merged.
506
+ * ids. A repo whose integration branch is gone counts as containing it: no
507
+ * Merge all could bring that work in. Only adds marks: a task found merged
508
+ * stays merged.
506
509
  */
507
510
  findInHead(run: IsolationRun): Promise<string[]>;
508
511
  /**
@@ -1972,6 +1972,12 @@ function withoutIsolation(tasks) {
1972
1972
  function handoffOf({ type: _type, ...handoff }) {
1973
1973
  return handoff;
1974
1974
  }
1975
+ function stillToMerge(handoff, runMerge) {
1976
+ if (!handoff?.landed.length) return handoff;
1977
+ if (!runMerge) return null;
1978
+ const same = runMerge.landed.length === handoff.landed.length && runMerge.landed.every((t, i) => t.taskId === handoff.landed[i].taskId);
1979
+ return same ? handoff : { ...handoff, repos: runMerge.repos, landed: runMerge.landed };
1980
+ }
1975
1981
  function planTasks(plan) {
1976
1982
  if ("tasks" in plan) return plan.tasks;
1977
1983
  return rejoinPlanTree(plan.pendingTasks, plan.phase === "executing" ? plan.executionLog : []);
@@ -1992,6 +1998,7 @@ function reduceRun(view, input) {
1992
1998
  ...view,
1993
1999
  tasks: applyStatus(view.tasks, new Map(input.tasks.map((t) => [t.id, t]))),
1994
2000
  runMerge: input.runMerge ?? null,
2001
+ handoff: stillToMerge(view.handoff, input.runMerge),
1995
2002
  usage: input.usage
1996
2003
  };
1997
2004
  case "task_started":
@@ -2835,4 +2842,4 @@ export {
2835
2842
  pastGateConfirmation,
2836
2843
  newTaskFields
2837
2844
  };
2838
- //# sourceMappingURL=chunk-DMG4ISUG.mjs.map
2845
+ //# sourceMappingURL=chunk-O6LQU3W6.mjs.map