pi-durable-subagents 1.0.35 → 1.0.38
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/CHANGELOG.md +58 -0
- package/README.md +87 -7
- package/dist/agent/child/history.js +11 -2
- package/dist/agent/child.js +77 -20
- package/dist/agent/main.js +3 -5
- package/dist/cli/control.js +6 -6
- package/dist/cli/doctor.js +20 -1
- package/dist/cli/main.js +15 -9
- package/dist/cli/requests.js +2 -2
- package/dist/cli/restart.js +2 -1
- package/dist/cli/service.js +6 -4
- package/dist/compat/model.js +12 -6
- package/dist/events/derive.js +13 -4
- package/dist/events/waiting.js +43 -13
- package/dist/kernel/guards.js +3 -3
- package/dist/kernel/mailbox.js +2 -0
- package/dist/orchestrator/config.js +18 -3
- package/dist/orchestrator/executor/digest.js +10 -3
- package/dist/orchestrator/executor/hibernate.js +25 -2
- package/dist/orchestrator/executor/index.js +386 -93
- package/dist/orchestrator/ledger.js +6 -3
- package/dist/orchestrator/main.js +24 -9
- package/dist/orchestrator/snapshot.js +70 -17
- package/dist/platform/launch.js +127 -0
- package/dist/platform/lease.js +58 -14
- package/dist/platform/proctable.js +6 -3
- package/dist/ui/cards.js +1 -0
- package/dist/ui/screen.js +2 -2
- package/dist/ui/tool.js +3 -3
- package/dist/ui/view.js +1 -1
- package/package.json +1 -1
package/dist/ui/tool.js
CHANGED
|
@@ -32,7 +32,7 @@ export function resultLines(details) {
|
|
|
32
32
|
const d = (details ?? {});
|
|
33
33
|
if (typeof d.wid === "string" && typeof d.key === "string" && typeof d.phase === "string") {
|
|
34
34
|
const r = d.result;
|
|
35
|
-
return [`${d.key} · ${r?.status ?? d.phase}${typeof d.model === "string" ? ` · ${d.model}` : ""}`];
|
|
35
|
+
return [`${d.key} · ${r?.status ?? (d.phase === "queued" && d.answered ? "queued (answered, waiting for a slot)" : d.phase)}${typeof d.model === "string" ? ` · ${d.model}` : ""}`];
|
|
36
36
|
}
|
|
37
37
|
if (typeof d.wid === "string" && !Array.isArray(d.calls))
|
|
38
38
|
return [`started workflow ${d.wid}`, ...(typeof d.paused === "string" ? [`⚠ ${d.paused}`] : [])];
|
|
@@ -45,12 +45,12 @@ export function resultLines(details) {
|
|
|
45
45
|
const row = (w) => {
|
|
46
46
|
const done = w.calls.filter(c => c.phase === "sealed").length, failed = w.calls.filter(c => c.status && c.status !== "ok").length;
|
|
47
47
|
const asks = (w.attention ?? []).filter(a => a.kind === "question").length;
|
|
48
|
-
return `${w.name ?? short(w.wid)} · ${w.status} · ${done}/${w.calls.length} done${failed ? ` · ${failed} not ok` : ""}${asks ? ` · ${asks} asking` : ""}`;
|
|
48
|
+
return `${w.name ?? short(w.wid)} · ${w.followUps ? `follow-up running (run ${w.status})` : w.status} · ${done}/${w.calls.length} done${failed ? ` · ${failed} not ok` : ""}${asks ? ` · ${asks} asking` : ""}`;
|
|
49
49
|
};
|
|
50
50
|
if (Array.isArray(d.active)) {
|
|
51
51
|
const rows = d.active.map(w => {
|
|
52
52
|
const failed = w.calls.filter(c => c.status && c.status !== "ok").length, asks = w.asking?.length ?? 0, alerts = w.alerts?.length ?? 0;
|
|
53
|
-
return `${w.name ?? short(w.wid)} · ${w.paused ? "paused" : w.followUps ?
|
|
53
|
+
return `${w.name ?? short(w.wid)} · ${w.paused ? "paused" : w.followUps ? `follow-up running (run ${w.status})` : w.status} · ${w.progress} done${failed ? ` · ${failed} not ok` : ""}${asks ? ` · ${asks} asking` : ""}${alerts ? ` · ${alerts} alert${alerts > 1 ? "s" : ""}` : ""}`;
|
|
54
54
|
});
|
|
55
55
|
const finished = Array.isArray(d.finished) ? d.finished.length + Number(d.olderFinished ?? 0) : 0;
|
|
56
56
|
return [...(typeof d.paused === "string" ? [`⚠ ${d.paused}`] : []), ...(rows.length ? rows.slice(0, 6) : ["nothing running"]),
|
package/dist/ui/view.js
CHANGED
|
@@ -129,7 +129,7 @@ export function statusPhrase(call, workflow, facts, now) {
|
|
|
129
129
|
if (workflow.attention.some(a => a.kind === "stall" && a.call === call.callId))
|
|
130
130
|
return `no activity for ${duration(now - Math.max(call.lastActivity ?? call.startedAt ?? now, facts?.lastActivity ?? 0))}`;
|
|
131
131
|
if (call.phase === "queued")
|
|
132
|
-
return workflow.paused ? "paused · r resumes" : "queued: waiting for a free slot";
|
|
132
|
+
return workflow.paused ? "paused · r resumes" : call.answered ? "queued (answered, waiting for a slot)" : "queued: waiting for a free slot";
|
|
133
133
|
// Liveness (UI §2): the age of the newest evidence ticks, and resets whenever the agent does anything.
|
|
134
134
|
const since = duration(Math.max(0, now - Math.max(call.lastActivity ?? 0, facts?.lastActivity ?? 0, call.startedAt ?? 0)));
|
|
135
135
|
if (facts?.activity)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-durable-subagents",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Subagents for pi that never lose work and never do it twice. Crash-safe workflows, automatic recovery, and a live view just like the main agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|