pi-harness-runtime 1.1.218 → 1.1.220
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/index.ts +33 -42
- package/package.json +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/architecture-generator/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard-plugin/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/e2e-tester/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/file-copy-helper/package.json +1 -1
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/knowledge-graph/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +1 -1
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/project-bootstrap/package.json +1 -1
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/telegram/package.json +1 -1
- package/packages/tencentdb-memory/package.json +1 -1
- package/packages/tencentdb-sync/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/write-review/package.json +1 -1
package/index.ts
CHANGED
|
@@ -140,9 +140,7 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
140
140
|
readFileSync(`${keysDir}/jev-api-key.txt`, "utf8").trim().length > 10;
|
|
141
141
|
|
|
142
142
|
if (!hasEnvKey && !hasFileKey) {
|
|
143
|
-
|
|
144
|
-
"[auto-continue] No Jev API key found. Set TYPESAFE_API_KEY run: echo \"{api_key}\" > ~/.pi-harness-runtime/keys/jev-api-key.txt"
|
|
145
|
-
);
|
|
143
|
+
logToFile("[auto-continue]", "No Jev API key found. Set TYPESAFE_API_KEY run: echo \"{api_key}\" > ~/.pi-harness-runtime/keys/jev-api-key.txt");
|
|
146
144
|
return;
|
|
147
145
|
}
|
|
148
146
|
|
|
@@ -888,12 +886,8 @@ function initMoocodingSyncHint(): void {
|
|
|
888
886
|
if (benchEntries.length === 0) return;
|
|
889
887
|
|
|
890
888
|
const targetPath = join(homedir(), ".pi-harness-runtime", "skills");
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
);
|
|
894
|
-
console.error(
|
|
895
|
-
`[pi-harness] Run /sync-skills --from ${benchPath} --to ${targetPath}`
|
|
896
|
-
);
|
|
889
|
+
logToFile("[pi-harness]", `${benchEntries.length} moocoding skill(s) found in frappe-bench`);
|
|
890
|
+
logToFile("[pi-harness]", `Run /sync-skills --from ${benchPath} --to ${targetPath}`);
|
|
897
891
|
} catch {
|
|
898
892
|
// Non-fatal — ignore errors
|
|
899
893
|
}
|
|
@@ -1527,7 +1521,7 @@ function initJobPipeWatcher(pi: ExtensionAPI): void {
|
|
|
1527
1521
|
|
|
1528
1522
|
// Poll every 60 seconds for new commands (user approval doesn't need sub-second latency)
|
|
1529
1523
|
setInterval(startWatcher, 60_000);
|
|
1530
|
-
|
|
1524
|
+
logToFile("[JobPipe]", "Watching for Telegram approval commands via API (polling every 60s)");
|
|
1531
1525
|
}
|
|
1532
1526
|
|
|
1533
1527
|
export default function (pi: ExtensionAPI) {
|
|
@@ -1582,7 +1576,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1582
1576
|
maxIdlePolls: Infinity,
|
|
1583
1577
|
onSessionChange: (session) => {
|
|
1584
1578
|
if (session) {
|
|
1585
|
-
|
|
1579
|
+
logToFile("[codex]", `Session started: ${session.threadName}`);
|
|
1586
1580
|
nc("CodexSessionStarted", {
|
|
1587
1581
|
requirement: session.threadName || "Codex session",
|
|
1588
1582
|
taskTitle: session.id,
|
|
@@ -1673,9 +1667,7 @@ ${planPreview}`,
|
|
|
1673
1667
|
// pi.on("session_end", () => watcher.stop()); // Removed - type error
|
|
1674
1668
|
}
|
|
1675
1669
|
} else {
|
|
1676
|
-
|
|
1677
|
-
"[paperclip] Not configured. Set PAPERCLIP_API_KEY or write API key to ~/.pi-harness-runtime/keys/paperclip-api-key.txt",
|
|
1678
|
-
);
|
|
1670
|
+
logToFile("[paperclip]", "Not configured. Set PAPERCLIP_API_KEY or write API key to ~/.pi-harness-runtime/keys/paperclip-api-key.txt");
|
|
1679
1671
|
}
|
|
1680
1672
|
|
|
1681
1673
|
// --- loop-completions: Watch daemon completions → agent TUI todos --------
|
|
@@ -1935,13 +1927,13 @@ Run \`bd ready\` to see current bd issues.
|
|
|
1935
1927
|
)
|
|
1936
1928
|
) {
|
|
1937
1929
|
providerOverloadResumeAttempts += 1;
|
|
1938
|
-
|
|
1930
|
+
logToFile("[pi-harness]", `Scheduling provider overload resume #${providerOverloadResumeAttempts}`);
|
|
1939
1931
|
scheduleProviderOverloadResume(() => ctx.hasPendingMessages());
|
|
1940
1932
|
} else if (m.stopReason === "stop") {
|
|
1941
1933
|
outputLimitResumeAttempts = 0;
|
|
1942
1934
|
pendingOutputLimitResumeAfterSettled = false;
|
|
1943
1935
|
if (providerOverloadResumeAttempts > 0) {
|
|
1944
|
-
|
|
1936
|
+
logToFile("[pi-harness]", `Counter reset (stopReason=stop), was=${providerOverloadResumeAttempts}`);
|
|
1945
1937
|
}
|
|
1946
1938
|
providerOverloadResumeAttempts = 0;
|
|
1947
1939
|
clearProviderOverloadResume();
|
|
@@ -2055,8 +2047,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2055
2047
|
resets_at: signal.resetsAt,
|
|
2056
2048
|
});
|
|
2057
2049
|
} catch (e) {
|
|
2058
|
-
|
|
2059
|
-
"[pi-harness] tui-signal write failed:",
|
|
2050
|
+
logToFile("[pi-harness] tui-signal write failed:",
|
|
2060
2051
|
e instanceof Error ? e.message : String(e),
|
|
2061
2052
|
);
|
|
2062
2053
|
}
|
|
@@ -2099,7 +2090,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2099
2090
|
} catch (e) {
|
|
2100
2091
|
const msg = e instanceof Error ? e.message : String(e);
|
|
2101
2092
|
if (msg.includes("ENOSPC")) {
|
|
2102
|
-
|
|
2093
|
+
logToFile(
|
|
2103
2094
|
"[pi-harness] cookie-sanitizer watcher: ENOSPC — " +
|
|
2104
2095
|
"inotify watcher limit reached.\n" +
|
|
2105
2096
|
"Fix (once, as root):\n" +
|
|
@@ -2108,7 +2099,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2108
2099
|
"Drop folder sync still works — polling will resume automatically.",
|
|
2109
2100
|
);
|
|
2110
2101
|
} else {
|
|
2111
|
-
|
|
2102
|
+
logToFile("[pi-harness] cookie-sanitizer watcher failed to start:", msg);
|
|
2112
2103
|
}
|
|
2113
2104
|
}
|
|
2114
2105
|
|
|
@@ -2287,8 +2278,9 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2287
2278
|
};
|
|
2288
2279
|
} catch (error) {
|
|
2289
2280
|
if (!suppressErrors) {
|
|
2290
|
-
|
|
2291
|
-
"[pi-harness]
|
|
2281
|
+
logToFile(
|
|
2282
|
+
"[pi-harness]",
|
|
2283
|
+
"Browser-profile quota fetch skipped:",
|
|
2292
2284
|
error instanceof Error ? error.message : String(error),
|
|
2293
2285
|
);
|
|
2294
2286
|
}
|
|
@@ -2333,8 +2325,9 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2333
2325
|
return true;
|
|
2334
2326
|
} catch (error) {
|
|
2335
2327
|
if (!suppressErrors) {
|
|
2336
|
-
|
|
2337
|
-
"[pi-harness]
|
|
2328
|
+
logToFile(
|
|
2329
|
+
"[pi-harness]",
|
|
2330
|
+
"Quota auto-fetch skipped:",
|
|
2338
2331
|
error instanceof Error ? error.message : String(error),
|
|
2339
2332
|
);
|
|
2340
2333
|
}
|
|
@@ -2381,8 +2374,9 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2381
2374
|
return true;
|
|
2382
2375
|
} catch (error) {
|
|
2383
2376
|
if (!suppressErrors) {
|
|
2384
|
-
|
|
2385
|
-
"[pi-harness]
|
|
2377
|
+
logToFile(
|
|
2378
|
+
"[pi-harness]",
|
|
2379
|
+
"OpenAI quota auto-fetch skipped:",
|
|
2386
2380
|
error instanceof Error ? error.message : String(error),
|
|
2387
2381
|
);
|
|
2388
2382
|
}
|
|
@@ -2403,7 +2397,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2403
2397
|
const data = await _glmQuotaScraper.fetchUsage();
|
|
2404
2398
|
if (!data) {
|
|
2405
2399
|
if (!suppressErrors) {
|
|
2406
|
-
|
|
2400
|
+
logToFile("[pi-harness]", "GLM quota auto-fetch: no data returned");
|
|
2407
2401
|
}
|
|
2408
2402
|
return false;
|
|
2409
2403
|
}
|
|
@@ -2460,16 +2454,13 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2460
2454
|
const resetTime = resetAt
|
|
2461
2455
|
? `resets at ${new Date(resetAt).toLocaleString()}`
|
|
2462
2456
|
: "resets soon";
|
|
2463
|
-
|
|
2457
|
+
logToFile("[pi-harness]", `GLM 5h quota exhausted! ${resetTime}`);
|
|
2464
2458
|
}
|
|
2465
2459
|
return true;
|
|
2466
2460
|
}
|
|
2467
2461
|
|
|
2468
2462
|
if (!suppressErrors) {
|
|
2469
|
-
|
|
2470
|
-
"[pi-harness] GLM quota auto-fetch skipped:",
|
|
2471
|
-
errorMsg,
|
|
2472
|
-
);
|
|
2463
|
+
logToFile("[pi-harness]", "GLM quota auto-fetch skipped:", errorMsg);
|
|
2473
2464
|
}
|
|
2474
2465
|
return false;
|
|
2475
2466
|
}
|
|
@@ -3272,14 +3263,15 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3272
3263
|
clearProviderOverloadResume();
|
|
3273
3264
|
const delayMs = getProviderOverloadResumeDelayMs();
|
|
3274
3265
|
const delayMinutes = Math.max(1, Math.round(delayMs / 60_000));
|
|
3275
|
-
|
|
3276
|
-
|
|
3266
|
+
logToFile(
|
|
3267
|
+
"[pi-harness]",
|
|
3268
|
+
`Provider overloaded; scheduling resume in ${delayMinutes} min (${delayMs}ms) attempt=${providerOverloadResumeAttempts}`,
|
|
3277
3269
|
);
|
|
3278
3270
|
providerOverloadResumeTimer = setTimeout(() => {
|
|
3279
3271
|
providerOverloadResumeTimer = null;
|
|
3280
|
-
|
|
3272
|
+
logToFile("[pi-harness]", 'Provider resume timer fired, sending "resume"');
|
|
3281
3273
|
if (hasPendingMessages()) {
|
|
3282
|
-
|
|
3274
|
+
logToFile("[pi-harness]", "Resume skipped: hasPendingMessages=true");
|
|
3283
3275
|
return;
|
|
3284
3276
|
}
|
|
3285
3277
|
void queueAutoResume(
|
|
@@ -3302,8 +3294,9 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3302
3294
|
error: reason,
|
|
3303
3295
|
});
|
|
3304
3296
|
} catch (error) {
|
|
3305
|
-
|
|
3306
|
-
|
|
3297
|
+
logToFile(
|
|
3298
|
+
"[pi-harness]",
|
|
3299
|
+
`Failed to queue ${reason} auto-resume:`,
|
|
3307
3300
|
error instanceof Error ? error.message : String(error),
|
|
3308
3301
|
);
|
|
3309
3302
|
}
|
|
@@ -3316,9 +3309,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3316
3309
|
if (consecutiveCompactFailures >= MAX_PROACTIVE_COMPACT_FAILURES) {
|
|
3317
3310
|
if (!proactiveCompactCircuitReported) {
|
|
3318
3311
|
proactiveCompactCircuitReported = true;
|
|
3319
|
-
|
|
3320
|
-
`[pi-harness] Proactive compact disabled after ${consecutiveCompactFailures} consecutive failures`,
|
|
3321
|
-
);
|
|
3312
|
+
logToFile("[pi-harness]", `Proactive compact disabled after ${consecutiveCompactFailures} consecutive failures`);
|
|
3322
3313
|
}
|
|
3323
3314
|
return;
|
|
3324
3315
|
}
|
|
@@ -3353,7 +3344,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3353
3344
|
onError: (error) => {
|
|
3354
3345
|
proactiveCompactInFlight = false;
|
|
3355
3346
|
consecutiveCompactFailures += 1;
|
|
3356
|
-
|
|
3347
|
+
logToFile("[pi-harness]", "Proactive compact failed:", error.message);
|
|
3357
3348
|
},
|
|
3358
3349
|
};
|
|
3359
3350
|
ctx.compact(compactOptions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.220",
|
|
4
4
|
"description": "Capability Registry for pi-harness-runtime — tracks model capabilities and enables capability-based routing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|