@cydm/pie 4.3.7 → 4.3.12
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 +1 -1
- package/dist/builtin/extensions/cron/index.js +112 -8
- package/dist/builtin/extensions/im-forward/README.md +17 -1
- package/dist/builtin/extensions/im-forward/index.js +918 -347
- package/dist/builtin/extensions/mcp-adapter/index.js +2 -2
- package/dist/builtin/extensions/memory/index.js +10 -3
- package/dist/builtin/extensions/pie-ipc/index.js +179 -378
- package/dist/builtin/extensions/pie-proc/index.js +36 -4
- package/dist/builtin/extensions/plan-mode/index.js +6 -5
- package/dist/builtin/extensions/subagent/index.js +15 -5
- package/dist/builtin/extensions/todo/index.js +6 -2
- package/dist/chunks/{chunk-N3BWFAMZ.js → chunk-EGNGHINP.js} +521 -161
- package/dist/chunks/{chunk-BJ4XN5VX.js → chunk-GY47MKCJ.js} +13 -8
- package/dist/chunks/{chunk-2SAFRLFJ.js → chunk-I7PBXG5Q.js} +1 -1
- package/dist/chunks/{chunk-WZLO5V2X.js → chunk-N5B5IGJ6.js} +355 -231
- package/dist/chunks/{manager-cli-QNMCCIFG.js → manager-cli-4Z6RZ7F4.js} +195 -205
- package/dist/chunks/{src-UVULNQOO.js → src-V2M7FLWY.js} +7 -1
- package/dist/cli.js +143 -20
- package/package.json +2 -2
|
@@ -175,7 +175,7 @@ async function runDistillWorkerMain(memoryRoot, date, noExit = false) {
|
|
|
175
175
|
const { AuthStorage } = await import("./auth-storage-3EGM3VTK.js");
|
|
176
176
|
const { getSessionsDir } = await import("./config-74AUVDLT.js");
|
|
177
177
|
const { FileSessionStore } = await import("./src-4EQ7PBEI.js");
|
|
178
|
-
const { MemoryStore, runDistillation } = await import("./src-
|
|
178
|
+
const { MemoryStore, runDistillation } = await import("./src-V2M7FLWY.js");
|
|
179
179
|
const store = new MemoryStore(memoryRoot);
|
|
180
180
|
ledger = store;
|
|
181
181
|
const registry = new ModelRegistry(AuthStorage.create());
|
|
@@ -198,7 +198,10 @@ async function runDistillWorkerMain(memoryRoot, date, noExit = false) {
|
|
|
198
198
|
systemPrompt: options?.system ?? "You are a precise extraction engine.",
|
|
199
199
|
messages: [{ role: "user", content: [{ type: "text", text: prompt }], timestamp: Date.now() }]
|
|
200
200
|
},
|
|
201
|
-
|
|
201
|
+
// 4.3.11: reasoning models (deepseek-flash) spend part of the
|
|
202
|
+
// budget on the thinking pass — 4096 truncated the JSON
|
|
203
|
+
// answer mid-array (stopReason=length). 16k for light calls.
|
|
204
|
+
{ apiKey: resolved.apiKey, maxTokens: Math.min(resolved.model.maxTokens ?? 16384, 16384) }
|
|
202
205
|
),
|
|
203
206
|
12e4,
|
|
204
207
|
`memory ${modelClass} model call`
|
|
@@ -244,7 +247,7 @@ async function runDistillWorkerMain(memoryRoot, date, noExit = false) {
|
|
|
244
247
|
}
|
|
245
248
|
return result;
|
|
246
249
|
}
|
|
247
|
-
async function runDistillAuto(memoryRoot, days = 7) {
|
|
250
|
+
async function runDistillAuto(memoryRoot, days = 7, runner) {
|
|
248
251
|
const log = (message) => {
|
|
249
252
|
try {
|
|
250
253
|
fs.appendFileSync(distillWorkerLogPath(memoryRoot), `[${(/* @__PURE__ */ new Date()).toISOString()}] ${message}
|
|
@@ -252,7 +255,7 @@ async function runDistillAuto(memoryRoot, days = 7) {
|
|
|
252
255
|
} catch {
|
|
253
256
|
}
|
|
254
257
|
};
|
|
255
|
-
const { MemoryStore, todayKey } = await import("./src-
|
|
258
|
+
const { MemoryStore, todayKey } = await import("./src-V2M7FLWY.js");
|
|
256
259
|
const store = new MemoryStore(memoryRoot);
|
|
257
260
|
const today = todayKey(Date.now());
|
|
258
261
|
const dates = [];
|
|
@@ -271,8 +274,9 @@ async function runDistillAuto(memoryRoot, days = 7) {
|
|
|
271
274
|
const lines = [];
|
|
272
275
|
let ok = true;
|
|
273
276
|
let deferred = false;
|
|
277
|
+
let failures = 0;
|
|
274
278
|
for (const date of dates) {
|
|
275
|
-
const result = await runDistillWorkerMain(memoryRoot, date, true);
|
|
279
|
+
const result = await (runner ?? runDistillWorkerMain)(memoryRoot, date, true);
|
|
276
280
|
if (!result.ok && result.busy) {
|
|
277
281
|
lines.push(`${date}: busy \u2014 another distillation worker is running; next schedule retries`);
|
|
278
282
|
deferred = true;
|
|
@@ -281,11 +285,12 @@ async function runDistillAuto(memoryRoot, days = 7) {
|
|
|
281
285
|
lines.push(`${date}: ${result.status ?? "failed"}${result.error ? ` \u2014 ${result.error}` : ""}`);
|
|
282
286
|
if (!result.ok) {
|
|
283
287
|
ok = false;
|
|
284
|
-
|
|
285
|
-
|
|
288
|
+
failures += 1;
|
|
289
|
+
log(`auto: ${date} failed (retryable); continuing the remaining dates`);
|
|
286
290
|
}
|
|
287
291
|
}
|
|
288
|
-
|
|
292
|
+
if (failures > 0) lines.push(`${failures} date(s) failed (retryable; next run retries them)`);
|
|
293
|
+
if (!process.env.NODE_TEST_CONTEXT) setTimeout(() => process.exit(ok || deferred ? 0 : 1), 50).unref?.();
|
|
289
294
|
return { ok: ok || deferred, lines };
|
|
290
295
|
}
|
|
291
296
|
|