@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
|
@@ -25155,7 +25155,7 @@ ${tail}` : ""),
|
|
|
25155
25155
|
}
|
|
25156
25156
|
try {
|
|
25157
25157
|
const result = await withTimeout(
|
|
25158
|
-
client.callTool({ name: toolName, arguments: args },
|
|
25158
|
+
client.callTool({ name: toolName, arguments: args }, signal !== void 0 ? { signal } : void 0),
|
|
25159
25159
|
CALL_TIMEOUT_MS,
|
|
25160
25160
|
`call "${prefixedName}"`,
|
|
25161
25161
|
signal
|
|
@@ -25174,7 +25174,7 @@ ${tail}` : ""),
|
|
|
25174
25174
|
error: `MCP server "${server}" returned a result that fails its own outputSchema: ${message}. The call DID reach the server and the tool likely executed \u2014 do NOT retry automatically; verify state with a read-only tool first.`
|
|
25175
25175
|
};
|
|
25176
25176
|
}
|
|
25177
|
-
if (runtime.client === void 0 || /closed|aborted|timed out|socket|ECONNRESET/i.test(message)) {
|
|
25177
|
+
if (signal?.aborted || runtime.client === void 0 || /closed|aborted|timed out|socket|ECONNRESET/i.test(message)) {
|
|
25178
25178
|
return {
|
|
25179
25179
|
delivery: "may_have_run",
|
|
25180
25180
|
error: `MCP call "${prefixedName}" outcome unknown: ${message}. The request may have executed \u2014 do NOT retry automatically; verify state with a read-only tool first.`
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
distillWorkerLogPath,
|
|
4
4
|
readDistillWorkerLog,
|
|
5
5
|
spawnDistillWorker
|
|
6
|
-
} from "../../../chunks/chunk-
|
|
6
|
+
} from "../../../chunks/chunk-GY47MKCJ.js";
|
|
7
7
|
import {
|
|
8
8
|
getConfigDir,
|
|
9
9
|
getSettingsPath
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
saveAttestedEntry,
|
|
20
20
|
searchMemory,
|
|
21
21
|
todayKey
|
|
22
|
-
} from "../../../chunks/chunk-
|
|
22
|
+
} from "../../../chunks/chunk-N5B5IGJ6.js";
|
|
23
23
|
import "../../../chunks/chunk-XMOWWL4B.js";
|
|
24
24
|
import "../../../chunks/chunk-B4N5LJMD.js";
|
|
25
25
|
import "../../../chunks/chunk-6JEYRAQM.js";
|
|
@@ -282,11 +282,17 @@ function buildInjectionSection(store, budget, projectKey) {
|
|
|
282
282
|
}
|
|
283
283
|
function buildInjectionSectionWithIds(store, budget, projectKey) {
|
|
284
284
|
const entries = store.loadEntries();
|
|
285
|
+
const isLowValue = (entry) => {
|
|
286
|
+
if (entry.provenance === "user-attested") return false;
|
|
287
|
+
const inj = entry.injectedCount ?? 0;
|
|
288
|
+
const cons = entry.consumedCount ?? 0;
|
|
289
|
+
return inj >= 10 && inj / (cons + 1) >= 10;
|
|
290
|
+
};
|
|
285
291
|
const take = (surface, limit, extra) => {
|
|
286
292
|
const pool = entries.filter((entry) => {
|
|
287
293
|
if (surface === "project") return entry.kind === "project" && (!extra || extra(entry));
|
|
288
294
|
return entry.surface === surface && (!extra || extra(entry));
|
|
289
|
-
}).sort((a, b) => b.usageCount - a.usageCount || b.lastAccessed - a.lastAccessed);
|
|
295
|
+
}).sort((a, b) => Number(isLowValue(a)) - Number(isLowValue(b)) || b.usageCount - a.usageCount || b.lastAccessed - a.lastAccessed);
|
|
290
296
|
const kept = [];
|
|
291
297
|
let used = 0;
|
|
292
298
|
for (const entry of pool) {
|
|
@@ -322,6 +328,7 @@ function buildInjectionSectionWithIds(store, budget, projectKey) {
|
|
|
322
328
|
}
|
|
323
329
|
const recentDates = store.listJournalDates().slice(-3);
|
|
324
330
|
const digest = [];
|
|
331
|
+
let digestUsed = 0;
|
|
325
332
|
for (const date of recentDates.reverse()) {
|
|
326
333
|
const journal = store.readJournal(date);
|
|
327
334
|
if (!journal) continue;
|