taskplane 0.25.5 → 0.25.6

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.
@@ -10,7 +10,7 @@ import { userInfo } from "os";
10
10
  import { DONE_GRACE_MS, EXECUTION_POLL_INTERVAL_MS, ExecutionError, SESSION_SPAWN_RETRY_MAX } from "./types.ts";
11
11
  import type { AllocatedLane, AllocatedTask, DependencyGraph, LaneExecutionResult, LaneMonitorSnapshot, LaneTaskOutcome, LaneTaskStatus, MonitorState, MtimeTracker, OrchestratorConfig, ParsedTask, TaskMonitorSnapshot, WaveExecutionResult, WorkspaceConfig, ExecutionUnit, PacketPaths, RuntimeAgentId, RuntimeAgentRole, SupervisorAlertCallback } from "./types.ts";
12
12
  import { resolvePacketPaths, buildRuntimeAgentId } from "./types.ts";
13
- import { readRegistrySnapshot, readLaneSnapshot, isTerminalStatus, isProcessAlive, detectOrphans, markOrphansCrashed } from "./process-registry.ts";
13
+ import { readRegistrySnapshot, readLaneSnapshot, isTerminalStatus, isProcessAlive, detectOrphans, markOrphansCrashed, buildRegistrySnapshot, writeRegistrySnapshot } from "./process-registry.ts";
14
14
  import { allocateLanes } from "./waves.ts";
15
15
  import { resolveOperatorId } from "./naming.ts";
16
16
  import { runGit } from "./git.ts";
@@ -1138,11 +1138,15 @@ export async function monitorLanes(
1138
1138
  if (registry) {
1139
1139
  const orphans = detectOrphans(registry);
1140
1140
  if (orphans.length > 0) {
1141
+ // Mark individual agent manifests as crashed
1141
1142
  markOrphansCrashed(stateRootForRegistry ?? repoRoot, batchId, orphans);
1142
- // Refresh cache so this poll cycle sees the updated crashed status
1143
- setV2LivenessRegistryCache(
1144
- readRegistrySnapshot(stateRootForRegistry ?? repoRoot, batchId)
1145
- );
1143
+ // Rebuild and write registry.json from the updated individual manifests.
1144
+ // markOrphansCrashed only updates per-agent files; registry.json is a
1145
+ // cached aggregate that must be explicitly rebuilt so readRegistrySnapshot()
1146
+ // and the dashboard see the crashed status within this poll cycle.
1147
+ const freshRegistry = buildRegistrySnapshot(stateRootForRegistry ?? repoRoot, batchId);
1148
+ writeRegistrySnapshot(stateRootForRegistry ?? repoRoot, freshRegistry);
1149
+ setV2LivenessRegistryCache(freshRegistry);
1146
1150
  }
1147
1151
  }
1148
1152
  } catch {
@@ -1920,8 +1920,9 @@ export default function (pi: ExtensionAPI) {
1920
1920
  // "Discovery had fatal errors" on first /orch run after config creation.
1921
1921
  // Skip if a batch is already active to avoid swapping config mid-run.
1922
1922
  const _activePhase = orchBatchState.phase;
1923
+ // Treat paused as active — config must not change for a resumable batch
1923
1924
  const _isActiveBatch = _activePhase === "executing" || _activePhase === "launching"
1924
- || _activePhase === "merging" || _activePhase === "planning";
1925
+ || _activePhase === "merging" || _activePhase === "planning" || _activePhase === "paused";
1925
1926
  if (!_isActiveBatch) {
1926
1927
  try {
1927
1928
  // Build everything into temporaries first, then commit atomically
@@ -188,11 +188,15 @@ export function resolveTaskplanePackageFile(repoRoot: string, relPath: string):
188
188
  candidates.push(join("/usr", "local", "lib", "node_modules", "taskplane", relPath));
189
189
  candidates.push(join("/opt", "homebrew", "lib", "node_modules", "taskplane", relPath));
190
190
 
191
- // 8. Peer of pi's package (look adjacent to pi's CLI entrypoint)
191
+ // 8. Peer of pi's package (look adjacent to pi's CLI entrypoint).
192
+ // pi is at: <npmRoot>/@mariozechner/pi-coding-agent/dist/cli.js
193
+ // so piPkgDir = <npmRoot>/@mariozechner/pi-coding-agent (resolve up 2 levels from cli.js)
194
+ // then go up TWO more levels to reach <npmRoot>, then into taskplane/
192
195
  try {
193
196
  const piPath = process.argv[1] || "";
194
- const piPkgDir = resolve(piPath, "..", "..");
195
- candidates.push(join(piPkgDir, "..", "taskplane", relPath));
197
+ const piPkgDir = resolve(piPath, "..", ".."); // <npmRoot>/@mariozechner/pi-coding-agent
198
+ const npmRootFromPi = resolve(piPkgDir, "..", ".."); // <npmRoot>
199
+ candidates.push(join(npmRootFromPi, "taskplane", relPath));
196
200
  } catch { /* ignore — process.argv[1] may be undefined in test contexts */ }
197
201
 
198
202
  for (const candidate of candidates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.25.5",
3
+ "version": "0.25.6",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",