@cydm/pie 4.9.0 → 4.10.1
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/dist/builtin/extensions/ask-user/index.js +4 -4
- package/dist/builtin/extensions/im-forward/index.js +126 -74
- package/dist/builtin/extensions/memory/index.js +5 -5
- package/dist/builtin/extensions/pie-ipc/index.js +5 -5
- package/dist/builtin/extensions/pie-proc/index.js +336 -102
- package/dist/builtin/extensions/plan-mode/index.js +4 -4
- package/dist/builtin/extensions/subagent/index.js +5 -5
- package/dist/builtin/extensions/todo/index.js +4 -4
- package/dist/builtin/skills/computer-use-axi/computer-use-axi-broker.js +83 -10
- package/dist/chunks/{chunk-LRHNAG4V.js → chunk-5QMS6RQC.js} +7 -2
- package/dist/chunks/{chunk-EEC5PJTC.js → chunk-7LICWWUE.js} +3 -3
- package/dist/chunks/chunk-BB7ETSJK.js +463 -0
- package/dist/chunks/{chunk-BA4Z27XT.js → chunk-BQWHLYYZ.js} +1 -1
- package/dist/chunks/{chunk-Z5KL6AO2.js → chunk-BTUMBUDU.js} +2 -2
- package/dist/chunks/{chunk-WYXUF4MP.js → chunk-FC5AN5QP.js} +22 -1
- package/dist/chunks/{chunk-4UIUMTHG.js → chunk-G2K4GY6N.js} +1 -1
- package/dist/chunks/{chunk-DBDU3RRN.js → chunk-HK3FHIAH.js} +3 -3
- package/dist/chunks/{chunk-WBL73KRI.js → chunk-KWK7KTSZ.js} +1 -0
- package/dist/chunks/{chunk-PN6B54VT.js → chunk-XMTRKMBG.js} +6 -6
- package/dist/chunks/{host-image-fallback-RASJSVZY.js → host-image-fallback-3TEMOQM5.js} +1 -1
- package/dist/chunks/{manager-cli-Y6HM3MHA.js → manager-cli-UU6SDS3F.js} +1 -1
- package/dist/chunks/{manager-upgrade-LSTOHBUV.js → manager-upgrade-XPFXKO7A.js} +64 -39
- package/dist/chunks/{model-registry-5TLYILYR.js → model-registry-QKJ3YVDS.js} +2 -2
- package/dist/chunks/{read-file-understanding-VPKDBV23.js → read-file-understanding-N2ZZQLTZ.js} +5 -5
- package/dist/chunks/{src-6QGGDHIW.js → src-3PSR2AAX.js} +3 -3
- package/dist/chunks/{src-2XI5P62J.js → src-D5GN4Q5O.js} +2 -2
- package/dist/chunks/{src-DI4MCAGT.js → src-F5N6O2HR.js} +4 -4
- package/dist/chunks/{src-CCEENRKC.js → src-TIDKYA5F.js} +1 -1
- package/dist/chunks/{test-stream-SYVWIPPW.js → test-stream-JAJHK44G.js} +1 -1
- package/dist/cli.js +2379 -1045
- package/package.json +1 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
normalizePreInstallStopOutcome,
|
|
4
|
+
resolveDefaultTuiUsePidFile,
|
|
5
|
+
runWindowsPreInstallStop,
|
|
6
|
+
scanBlockingWindowsPeers
|
|
7
|
+
} from "./chunk-BB7ETSJK.js";
|
|
2
8
|
import {
|
|
3
9
|
readProcessCommandLine
|
|
4
10
|
} from "./chunk-7RJXKN7N.js";
|
|
@@ -245,22 +251,28 @@ async function performUpgrade(paths, effects, options) {
|
|
|
245
251
|
stage = s;
|
|
246
252
|
}, build));
|
|
247
253
|
}
|
|
254
|
+
let stoppedBeforeInstall = false;
|
|
248
255
|
if (effects.preInstallStop) {
|
|
249
|
-
const stopped = effects.preInstallStop(state);
|
|
250
|
-
if (stopped === "refused") {
|
|
251
|
-
return finish(build("install", "refused: could not stop the resident/workers before install (Windows file locks); check pie manager status and retry"));
|
|
256
|
+
const stopped = normalizePreInstallStopOutcome(effects.preInstallStop(state));
|
|
257
|
+
if (stopped.status === "refused") {
|
|
258
|
+
return finish(build("install", stopped.detail || "refused: could not stop the resident/workers before install (Windows file locks); check pie manager status and retry"));
|
|
259
|
+
}
|
|
260
|
+
if (stopped.status === "stopped") {
|
|
261
|
+
stoppedBeforeInstall = true;
|
|
262
|
+
effects.log("windows: resident/workers stopped before install (native-module file locks)");
|
|
252
263
|
}
|
|
253
|
-
if (stopped === "stopped") effects.log("windows: resident/workers stopped before install (native-module file locks)");
|
|
254
264
|
}
|
|
255
265
|
const install = effects.npmInstall(toVersion);
|
|
256
266
|
if (install.code !== 0) {
|
|
267
|
+
const recovery = stoppedBeforeInstall ? "\n(Windows: manager was stopped before install; run `pie manager start` or retry `pie manager upgrade`.)" : "";
|
|
257
268
|
return finish(build("install", `npm install @cydm/pie@${toVersion} failed (exit ${install.code}):
|
|
258
|
-
${install.tail}`));
|
|
269
|
+
${install.tail}${recovery}`));
|
|
259
270
|
}
|
|
260
271
|
const target = effects.installTargetCheck();
|
|
261
272
|
if (!target.ok) {
|
|
273
|
+
const recovery = stoppedBeforeInstall ? "\n(Windows: manager was stopped before install; run `pie manager start` or retry `pie manager upgrade`.)" : "";
|
|
262
274
|
return finish(build("install", `install target mismatch \u2014 restart skipped:
|
|
263
|
-
${target.detail}`));
|
|
275
|
+
${target.detail}${recovery}`));
|
|
264
276
|
}
|
|
265
277
|
return finish(await restartAndRecycle(effects, paths, state, fromVersion, toVersion, (s) => {
|
|
266
278
|
stage = s;
|
|
@@ -589,54 +601,67 @@ function cliEffects(paths, log) {
|
|
|
589
601
|
},
|
|
590
602
|
scanWorkers: () => scanWorkers(paths.discoveryDir),
|
|
591
603
|
retireWorkerIfStillIdle: (peer) => {
|
|
604
|
+
const isPidAlive = (pid) => {
|
|
605
|
+
try {
|
|
606
|
+
process.kill(pid, 0);
|
|
607
|
+
return true;
|
|
608
|
+
} catch (error) {
|
|
609
|
+
return error.code !== "ESRCH";
|
|
610
|
+
}
|
|
611
|
+
};
|
|
592
612
|
const fresh = readDiscoveryEntry(paths.discoveryDir, peer.file);
|
|
593
|
-
if (!fresh || fresh.pid !== peer.pid) return "gone";
|
|
613
|
+
if (!fresh || fresh.pid !== peer.pid) return isPidAlive(peer.pid) ? "unknown" : "gone";
|
|
594
614
|
if (fresh.unattended !== true || fresh.isManager === true) return "foreign";
|
|
595
615
|
if (fresh.state !== "idle") return "busy";
|
|
596
|
-
|
|
616
|
+
const cmdline = readProcessCommandLine(peer.pid);
|
|
617
|
+
if (cmdline === void 0) return isPidAlive(peer.pid) ? "unknown" : "gone";
|
|
618
|
+
if (!cmdline || !/json-events/.test(cmdline) || !/--idle/.test(cmdline)) return "foreign";
|
|
597
619
|
const updatedAt = typeof fresh.updatedAt === "number" ? fresh.updatedAt : peer.updatedAt;
|
|
598
620
|
const startedAt = processStartedAt(peer.pid);
|
|
599
621
|
if (updatedAt !== void 0 && startedAt !== void 0 && startedAt > updatedAt + 1e4) return "foreign";
|
|
600
622
|
try {
|
|
601
623
|
process.kill(peer.pid, process.platform === "win32" ? void 0 : "SIGTERM");
|
|
602
624
|
return "retired";
|
|
603
|
-
} catch {
|
|
604
|
-
return "gone";
|
|
625
|
+
} catch (error) {
|
|
626
|
+
return error.code === "ESRCH" ? "gone" : "failed";
|
|
605
627
|
}
|
|
606
628
|
},
|
|
607
629
|
writeResult: (result) => writeResultAtomic(paths.resultFile, result, log),
|
|
608
630
|
tryLock: () => tryLockWithReclamation(paths.lockFile),
|
|
609
631
|
unlock: () => unlockOwned(paths.lockFile),
|
|
610
|
-
...process.platform === "win32" ? {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
632
|
+
...process.platform === "win32" ? {
|
|
633
|
+
preInstallStop: (state) => runWindowsPreInstallStop(state, {
|
|
634
|
+
scanBlockingPeers: (s) => scanBlockingWindowsPeers(paths.discoveryDir, s.sessionId, s.pid, {
|
|
635
|
+
tuiUsePidFile: resolveDefaultTuiUsePidFile()
|
|
636
|
+
}),
|
|
637
|
+
scanIdleWorkers: () => partitionWorkers(effects.scanWorkers()).recycle,
|
|
638
|
+
retireWorkerIfStillIdle: (peer) => effects.retireWorkerIfStillIdle(peer),
|
|
639
|
+
findManagerResident: (sid) => findManagerResident(paths.discoveryDir, sid),
|
|
640
|
+
residentStatus: (s) => effects.residentStatus(s),
|
|
641
|
+
terminateResident: (s) => effects.terminateResident(s),
|
|
642
|
+
endServiceTask: () => {
|
|
643
|
+
const r = spawnSync("schtasks", ["/End", "/TN", "dev.pie.manager"], { encoding: "utf8", timeout: 2e4, windowsHide: true });
|
|
644
|
+
return {
|
|
645
|
+
status: r.status,
|
|
646
|
+
detail: `${r.stdout ?? ""} ${r.stderr ?? ""}`.trim().slice(0, 200),
|
|
647
|
+
...r.error ? { spawnError: r.error.message } : {}
|
|
648
|
+
};
|
|
649
|
+
},
|
|
650
|
+
waitExit: (pid, timeoutMs) => effects.waitExit(pid, timeoutMs),
|
|
651
|
+
isPidAlive: (pid) => {
|
|
652
|
+
try {
|
|
653
|
+
process.kill(pid, 0);
|
|
654
|
+
return true;
|
|
655
|
+
} catch (error) {
|
|
656
|
+
return error.code !== "ESRCH";
|
|
634
657
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
658
|
+
},
|
|
659
|
+
settleAfterStop: () => {
|
|
660
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 300);
|
|
661
|
+
},
|
|
662
|
+
log
|
|
663
|
+
})
|
|
664
|
+
} : {},
|
|
640
665
|
log
|
|
641
666
|
};
|
|
642
667
|
return effects;
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
assertNoSecretSubstrings,
|
|
5
5
|
configuredRemoteCredentialValues,
|
|
6
6
|
loadResolvedModelsConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FC5AN5QP.js";
|
|
8
8
|
import "./chunk-CBDQJMUI.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-G2K4GY6N.js";
|
|
10
10
|
import "./chunk-XXGYUYXI.js";
|
|
11
11
|
import "./chunk-LZQXQOPJ.js";
|
|
12
12
|
export {
|
package/dist/chunks/{read-file-understanding-VPKDBV23.js → read-file-understanding-N2ZZQLTZ.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
understandReadFile
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-BTUMBUDU.js";
|
|
5
|
+
import "./chunk-HK3FHIAH.js";
|
|
6
|
+
import "./chunk-5QMS6RQC.js";
|
|
7
|
+
import "./chunk-BQWHLYYZ.js";
|
|
8
8
|
import "./chunk-F7EBZTZO.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-G2K4GY6N.js";
|
|
10
10
|
import "./chunk-XXGYUYXI.js";
|
|
11
11
|
import "./chunk-LZQXQOPJ.js";
|
|
12
12
|
export {
|
|
@@ -142,9 +142,9 @@ import {
|
|
|
142
142
|
substituteArgs,
|
|
143
143
|
validateRetainedTailEntries,
|
|
144
144
|
verifyPreparedCompactionCommit
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-
|
|
147
|
-
import "./chunk-
|
|
145
|
+
} from "./chunk-5QMS6RQC.js";
|
|
146
|
+
import "./chunk-BQWHLYYZ.js";
|
|
147
|
+
import "./chunk-G2K4GY6N.js";
|
|
148
148
|
import "./chunk-XXGYUYXI.js";
|
|
149
149
|
import "./chunk-LZQXQOPJ.js";
|
|
150
150
|
export {
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
createToolCallerIdentity,
|
|
9
9
|
getAgentFailureMetadata,
|
|
10
10
|
getToolCallerIdentity
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-BQWHLYYZ.js";
|
|
12
|
+
import "./chunk-G2K4GY6N.js";
|
|
13
13
|
import "./chunk-XXGYUYXI.js";
|
|
14
14
|
import "./chunk-LZQXQOPJ.js";
|
|
15
15
|
export {
|
|
@@ -221,12 +221,12 @@ import {
|
|
|
221
221
|
understandFileWithModel,
|
|
222
222
|
validateTodos,
|
|
223
223
|
writeJournalNarrative
|
|
224
|
-
} from "./chunk-
|
|
225
|
-
import "./chunk-
|
|
226
|
-
import "./chunk-
|
|
224
|
+
} from "./chunk-HK3FHIAH.js";
|
|
225
|
+
import "./chunk-5QMS6RQC.js";
|
|
226
|
+
import "./chunk-BQWHLYYZ.js";
|
|
227
227
|
import {
|
|
228
228
|
hashText
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-G2K4GY6N.js";
|
|
230
230
|
import "./chunk-XXGYUYXI.js";
|
|
231
231
|
import "./chunk-LZQXQOPJ.js";
|
|
232
232
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
EventStream
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G2K4GY6N.js";
|
|
5
5
|
import "./chunk-XXGYUYXI.js";
|
|
6
6
|
import "./chunk-LZQXQOPJ.js";
|
|
7
7
|
|