pi-crew 0.2.22 → 0.2.23
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.
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
2
|
import type { AgentConfig } from "../../agents/agent-config.ts";
|
|
4
3
|
import type { CrewRuntimeConfig } from "../../config/config.ts";
|
|
5
4
|
import { writeArtifact } from "../../state/artifact-store.ts";
|
|
@@ -9,6 +8,7 @@ import type { ArtifactDescriptor, TeamRunManifest, TeamTaskState } from "../../s
|
|
|
9
8
|
import type { WorkflowStep } from "../../workflows/workflow-config.ts";
|
|
10
9
|
import { appendCrewAgentEvent, appendCrewAgentOutput, emptyCrewAgentProgress, recordFromTask, upsertCrewAgent } from "../crew-agent-records.ts";
|
|
11
10
|
import { createWorkerHeartbeat, touchWorkerHeartbeat } from "../worker-heartbeat.ts";
|
|
11
|
+
import { loadRunManifestById, saveRunTasks } from "../../state/state-store.ts";
|
|
12
12
|
import { createStartupEvidence, type WorkerStartupEvidence } from "../worker-startup.ts";
|
|
13
13
|
import { runLiveSessionTask } from "../live-session-runtime.ts";
|
|
14
14
|
import { shouldAppendProgressEventUpdate, type ProgressEventSummary } from "../progress-event-coalescer.ts";
|
|
@@ -81,10 +81,7 @@ export async function runLiveTask(input: RunLiveTaskInput): Promise<RunLiveTaskO
|
|
|
81
81
|
...task,
|
|
82
82
|
heartbeat: touchWorkerHeartbeat(task.heartbeat ?? createWorkerHeartbeat(task.id)),
|
|
83
83
|
};
|
|
84
|
-
tasks =
|
|
85
|
-
// Persist to tasks.json using the same pattern as task-runner.ts
|
|
86
|
-
const tasksPath = path.join(manifest.stateRoot, "tasks.json");
|
|
87
|
-
try { fs.writeFileSync(tasksPath, JSON.stringify({ ...loaded, tasks }, null, 2)); } catch {}
|
|
84
|
+
tasks = persistSingleTaskUpdate(manifest, tasks, task);
|
|
88
85
|
lastHeartbeatPersistedAt = now;
|
|
89
86
|
}
|
|
90
87
|
const summary = progressEventSummary(task, event);
|