pi-harness-runtime 1.1.144 → 1.1.146
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 +167 -10
- package/package.json +1 -1
- package/packages/a2a-adapter/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/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/dist/adapters/telegram-adapter.d.ts.map +1 -1
- package/packages/notification/dist/adapters/telegram-adapter.js.map +1 -1
- package/packages/notification/dist/notification-center.d.ts.map +1 -1
- package/packages/notification/dist/notification-center.js +12 -0
- package/packages/notification/dist/notification-center.js.map +1 -1
- package/packages/notification/dist/types.d.ts +1 -1
- package/packages/notification/dist/types.d.ts.map +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/notification/src/adapters/telegram-adapter.ts +2 -0
- package/packages/notification/src/notification-center.ts +12 -0
- package/packages/notification/src/types.ts +3 -0
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +1 -1
- package/packages/paperclip-integration/dist/index.d.ts +121 -0
- package/packages/paperclip-integration/dist/index.d.ts.map +1 -0
- package/packages/paperclip-integration/dist/index.js +228 -0
- package/packages/paperclip-integration/dist/index.js.map +1 -0
- package/packages/paperclip-integration/package.json +20 -0
- package/packages/paperclip-integration/src/index.ts +326 -0
- 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/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/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
|
@@ -69,6 +69,12 @@ import {
|
|
|
69
69
|
createBlackboard,
|
|
70
70
|
} from "./harness/blackboard.ts";
|
|
71
71
|
import { scheduleAutoResume, cancelAutoResume, getGLMQuotaCountdown } from "./harness/index.js";
|
|
72
|
+
import { startWatcher, classifyMessage } from "./packages/codex-watcher/dist/src/index.js";
|
|
73
|
+
import {
|
|
74
|
+
getPaperclipConfig,
|
|
75
|
+
hasPaperclipConfig,
|
|
76
|
+
PaperclipWatcher,
|
|
77
|
+
} from "./packages/paperclip-integration/dist/index.js";
|
|
72
78
|
|
|
73
79
|
// --- Jev Auto-Continue: Agent autonomous decision-making --------------------
|
|
74
80
|
// Lazy import - only loads when packages/jev-judge exists and API key available
|
|
@@ -91,7 +97,7 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
91
97
|
readFileSync(`${keysDir}/jev-api-key.txt`, "utf8").trim().length > 10;
|
|
92
98
|
|
|
93
99
|
if (!hasEnvKey && !hasFileKey) {
|
|
94
|
-
console.
|
|
100
|
+
console.error(
|
|
95
101
|
"[auto-continue] No Jev API key found. Set TYPESAFE_API_KEY run: echo \"{api_key}\" > ~/.pi-harness-runtime/keys/jev-api-key.txt"
|
|
96
102
|
);
|
|
97
103
|
return;
|
|
@@ -114,6 +120,11 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
114
120
|
if (hasContinuation && !waitingForUserSince) {
|
|
115
121
|
waitingForUserSince = new Date();
|
|
116
122
|
console.log("[auto-continue] Agent waiting for continuation confirmation");
|
|
123
|
+
// Emit WaitingForUserInput to Telegram so user knows to respond
|
|
124
|
+
nc("WaitingForUserInput", {
|
|
125
|
+
requirement: "Agent awaiting your response",
|
|
126
|
+
error: "Continue / proceed confirmation needed",
|
|
127
|
+
});
|
|
117
128
|
}
|
|
118
129
|
});
|
|
119
130
|
|
|
@@ -188,7 +199,7 @@ async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
|
188
199
|
// Start periodic check
|
|
189
200
|
setInterval(checkAndAutoContinue, AUTO_CONTINUE_INTERVAL_MS);
|
|
190
201
|
|
|
191
|
-
console.
|
|
202
|
+
console.error("[auto-continue] Jev Auto-Continue initialized");
|
|
192
203
|
} catch {
|
|
193
204
|
// auto-continue not available
|
|
194
205
|
}
|
|
@@ -290,6 +301,13 @@ async function initTelegram(): Promise<void> {
|
|
|
290
301
|
return;
|
|
291
302
|
}
|
|
292
303
|
|
|
304
|
+
// Wire to singleton nc() helper so all event emitters can reach Telegram
|
|
305
|
+
_nc = {
|
|
306
|
+
center,
|
|
307
|
+
notify: (event: string, ctx: Record<string, unknown>) =>
|
|
308
|
+
center.notify(event as never, ctx as never),
|
|
309
|
+
};
|
|
310
|
+
|
|
293
311
|
// Wire to GLMQuotaCountdown so it sends Telegram alerts
|
|
294
312
|
try {
|
|
295
313
|
const { getGLMQuotaCountdown } = await import("./harness/index.js");
|
|
@@ -820,6 +838,7 @@ function logStartup(...parts: string[]): void {
|
|
|
820
838
|
|
|
821
839
|
interface HarnessSession {
|
|
822
840
|
jobId: string;
|
|
841
|
+
requirement: string;
|
|
823
842
|
machine: JobStateMachine;
|
|
824
843
|
graph: TaskGraphManager;
|
|
825
844
|
blackboard: SharedBlackboard;
|
|
@@ -829,6 +848,23 @@ interface HarnessSession {
|
|
|
829
848
|
|
|
830
849
|
let currentSession: HarnessSession | null = null;
|
|
831
850
|
|
|
851
|
+
/** Singleton notification center — set by initTelegram(), used by all emit helpers */
|
|
852
|
+
let _nc: { center: unknown; notify: (event: string, ctx: Record<string, unknown>) => Promise<unknown> } | null = null;
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Fire a Telegram notification event. Silently skips if Telegram is not configured.
|
|
856
|
+
*/
|
|
857
|
+
async function nc(event: string, ctx: Record<string, unknown>): Promise<void> {
|
|
858
|
+
if (!_nc) return;
|
|
859
|
+
try {
|
|
860
|
+
await (_nc as { notify: (e: string, c: Record<string, unknown>) => Promise<void> }).notify(event, ctx);
|
|
861
|
+
} catch {
|
|
862
|
+
// Never crash runtime on notification failure
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
|
|
832
868
|
/**
|
|
833
869
|
* Safely extract a text view from an LLM message. Used to feed the TUI
|
|
834
870
|
* quota-signal extractor. Handles string content, array-of-parts content
|
|
@@ -1019,6 +1055,68 @@ export default function (pi: ExtensionAPI) {
|
|
|
1019
1055
|
// --- telegram-notifications: Telegram bot for harness event notifications ----
|
|
1020
1056
|
void initTelegram();
|
|
1021
1057
|
|
|
1058
|
+
// --- codex-watcher: Inject Codex plans into pi.dev + Telegram --------------
|
|
1059
|
+
// Lightweight: polls ~/.codex/sessions/ every 5s, no LangChain daemon.
|
|
1060
|
+
// On plan detected: sends Telegram alert + steer message to pi.dev.
|
|
1061
|
+
try {
|
|
1062
|
+
let latestCodexSession = "";
|
|
1063
|
+
let latestPlanOrdinal = 0;
|
|
1064
|
+
|
|
1065
|
+
const codexHandle = startWatcher({
|
|
1066
|
+
pollIntervalMs: 5000,
|
|
1067
|
+
maxIdlePolls: Infinity,
|
|
1068
|
+
onSessionChange: (session) => {
|
|
1069
|
+
if (session) {
|
|
1070
|
+
latestCodexSession = session.id;
|
|
1071
|
+
console.error(`[codex] Session started: ${session.threadName}`);
|
|
1072
|
+
nc("CodexSessionStarted", {
|
|
1073
|
+
requirement: session.threadName || "Codex session",
|
|
1074
|
+
taskTitle: session.id,
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
onMessages: (msgs) => {
|
|
1079
|
+
for (const msg of msgs) {
|
|
1080
|
+
// Skip user messages — only track assistant plans
|
|
1081
|
+
if (msg.role !== "assistant") continue;
|
|
1082
|
+
|
|
1083
|
+
const classification = classifyMessage(msg.text);
|
|
1084
|
+
if (classification !== "plan" && classification !== "mixed") continue;
|
|
1085
|
+
if (msg.ordinal <= latestPlanOrdinal) continue;
|
|
1086
|
+
|
|
1087
|
+
latestPlanOrdinal = msg.ordinal;
|
|
1088
|
+
|
|
1089
|
+
// Emit Telegram alert
|
|
1090
|
+
nc("CodexPlanDetected", {
|
|
1091
|
+
requirement: "Codex plan ready",
|
|
1092
|
+
taskTitle: `Ordinal ${msg.ordinal}`,
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
// Inject plan into pi.dev as a steer message
|
|
1096
|
+
const planPreview = msg.text.slice(0, 500) + (msg.text.length > 500 ? "
|
|
1097
|
+
..." : "");
|
|
1098
|
+
try {
|
|
1099
|
+
pi.sendUserMessage(
|
|
1100
|
+
`[Codex plan detected — ordinal ${msg.ordinal}]
|
|
1101
|
+
|
|
1102
|
+
${planPreview}`,
|
|
1103
|
+
{ deliverAs: "steer" },
|
|
1104
|
+
);
|
|
1105
|
+
} catch {
|
|
1106
|
+
// pi.dev may not be ready
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
// Clean up when pi session ends
|
|
1113
|
+
pi.on("session_end", () => {
|
|
1114
|
+
codexHandle.stop();
|
|
1115
|
+
});
|
|
1116
|
+
} catch {
|
|
1117
|
+
// Codex watcher unavailable (e.g. no codex package installed)
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1022
1120
|
// --- honcho-memory: Honcho MCP for peer/user memory (honcho_profile, etc.) ----
|
|
1023
1121
|
void initHoncho(pi);
|
|
1024
1122
|
|
|
@@ -1028,6 +1126,46 @@ export default function (pi: ExtensionAPI) {
|
|
|
1028
1126
|
// --- langchain-loop: Ping-pong write-review loop (planner + reviewer + coder) ----
|
|
1029
1127
|
void initLangChain(pi);
|
|
1030
1128
|
|
|
1129
|
+
// --- paperclip: Watch Paperclip inbox, route tasks to pi.dev + Telegram ------------
|
|
1130
|
+
// Only starts if PAPERCLIP_API_KEY is set or keys file exists.
|
|
1131
|
+
if (hasPaperclipConfig()) {
|
|
1132
|
+
const paperclipConfig = getPaperclipConfig();
|
|
1133
|
+
if (paperclipConfig) {
|
|
1134
|
+
const watcher = new PaperclipWatcher(paperclipConfig, {
|
|
1135
|
+
nc,
|
|
1136
|
+
sendUserMessage: (content, opts) => {
|
|
1137
|
+
try {
|
|
1138
|
+
pi.sendUserMessage(content, opts as { deliverAs: "steer" });
|
|
1139
|
+
} catch {
|
|
1140
|
+
// pi.dev may not be ready
|
|
1141
|
+
}
|
|
1142
|
+
},
|
|
1143
|
+
pollIntervalMs: 30_000,
|
|
1144
|
+
onRouted: async (issue) => {
|
|
1145
|
+
// Mark task as in_progress in Paperclip
|
|
1146
|
+
try {
|
|
1147
|
+
const config = getPaperclipConfig();
|
|
1148
|
+
if (config) {
|
|
1149
|
+
const { PaperclipClient } = await import(
|
|
1150
|
+
"./packages/paperclip-integration/dist/index.js"
|
|
1151
|
+
);
|
|
1152
|
+
const client = new PaperclipClient(config);
|
|
1153
|
+
await client.updateIssueStatus(issue.id, "in_progress");
|
|
1154
|
+
}
|
|
1155
|
+
} catch {
|
|
1156
|
+
// Non-critical
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
});
|
|
1160
|
+
void watcher.start();
|
|
1161
|
+
pi.on("session_end", () => watcher.stop());
|
|
1162
|
+
}
|
|
1163
|
+
} else {
|
|
1164
|
+
console.error(
|
|
1165
|
+
"[paperclip] Not configured. Set PAPERCLIP_API_KEY or write API key to ~/.pi-harness-runtime/keys/paperclip-api-key.txt",
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1031
1169
|
// --- loop-completions: Watch daemon completions → agent TUI todos --------
|
|
1032
1170
|
void initLoopCompletions(pi);
|
|
1033
1171
|
|
|
@@ -1266,7 +1404,12 @@ Run \`bd ready\` to see current bd issues.
|
|
|
1266
1404
|
outputLimitResumeAttempts += 1;
|
|
1267
1405
|
pendingOutputLimitResumeAfterCompact = true;
|
|
1268
1406
|
pendingOutputLimitResumeAfterSettled = true;
|
|
1269
|
-
queueAutoResume("output-limit", OUTPUT_LIMIT_RESUME_PROMPT, "steer");
|
|
1407
|
+
await queueAutoResume("output-limit", OUTPUT_LIMIT_RESUME_PROMPT, "steer");
|
|
1408
|
+
// Emit OutputLimitContinued to Telegram
|
|
1409
|
+
await nc("OutputLimitContinued", {
|
|
1410
|
+
requirement: "Session output",
|
|
1411
|
+
error: `Attempt ${outputLimitResumeAttempts}`,
|
|
1412
|
+
});
|
|
1270
1413
|
} else if (
|
|
1271
1414
|
shouldQueueProviderOverloadResume(
|
|
1272
1415
|
m,
|
|
@@ -2082,6 +2225,9 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2082
2225
|
return;
|
|
2083
2226
|
}
|
|
2084
2227
|
|
|
2228
|
+
// Emit JobStarted to Telegram
|
|
2229
|
+
await nc("JobStarted", { requirement, jobId });
|
|
2230
|
+
|
|
2085
2231
|
// Create task graph using heuristic planner
|
|
2086
2232
|
const planner = new MasterPlanner();
|
|
2087
2233
|
const planResult = await planner.createPlan(
|
|
@@ -2108,6 +2254,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2108
2254
|
// Store session
|
|
2109
2255
|
currentSession = {
|
|
2110
2256
|
jobId,
|
|
2257
|
+
requirement,
|
|
2111
2258
|
machine,
|
|
2112
2259
|
graph: createTaskGraphManager(),
|
|
2113
2260
|
blackboard,
|
|
@@ -2319,6 +2466,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2319
2466
|
}
|
|
2320
2467
|
|
|
2321
2468
|
cancelAutoResume(currentSession.jobId);
|
|
2469
|
+
await nc("JobCancelled", { requirement: currentSession.requirement });
|
|
2322
2470
|
const sessionJobId = currentSession.jobId;
|
|
2323
2471
|
currentSession = null;
|
|
2324
2472
|
|
|
@@ -2415,7 +2563,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2415
2563
|
return;
|
|
2416
2564
|
}
|
|
2417
2565
|
pendingOutputLimitResumeAfterSettled = false;
|
|
2418
|
-
queueAutoResume(
|
|
2566
|
+
void queueAutoResume(
|
|
2419
2567
|
"output-limit-settled",
|
|
2420
2568
|
OUTPUT_LIMIT_RESUME_PROMPT,
|
|
2421
2569
|
"followUp",
|
|
@@ -2423,7 +2571,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2423
2571
|
}, 0);
|
|
2424
2572
|
});
|
|
2425
2573
|
|
|
2426
|
-
pi.on("session_compact", (event, ctx) => {
|
|
2574
|
+
pi.on("session_compact", async (event, ctx) => {
|
|
2427
2575
|
// Capture only the setStatus function, not the ctx
|
|
2428
2576
|
footerSetStatus = ctx.ui.setStatus.bind(ctx.ui);
|
|
2429
2577
|
proactiveCompactInFlight = false;
|
|
@@ -2450,7 +2598,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2450
2598
|
}
|
|
2451
2599
|
|
|
2452
2600
|
if (forceOutputLimitResume) {
|
|
2453
|
-
queueAutoResume(
|
|
2601
|
+
await queueAutoResume(
|
|
2454
2602
|
"post-compact-output-limit",
|
|
2455
2603
|
OUTPUT_LIMIT_RESUME_PROMPT,
|
|
2456
2604
|
event.willRetry ? "steer" : "followUp",
|
|
@@ -2460,7 +2608,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2460
2608
|
|
|
2461
2609
|
outputLimitResumeAttempts = 0;
|
|
2462
2610
|
// pi.dev expects the literal "resume" command to continue after compaction.
|
|
2463
|
-
queueAutoResume("post-compact", "resume", "followUp");
|
|
2611
|
+
await queueAutoResume("post-compact", "resume", "followUp");
|
|
2464
2612
|
});
|
|
2465
2613
|
|
|
2466
2614
|
// --- Periodic quota refresh every 15 minutes ---
|
|
@@ -2503,7 +2651,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2503
2651
|
console.error(`[pi-harness] Resume skipped: hasPendingMessages=true`);
|
|
2504
2652
|
return;
|
|
2505
2653
|
}
|
|
2506
|
-
queueAutoResume(
|
|
2654
|
+
void queueAutoResume(
|
|
2507
2655
|
"provider-overload",
|
|
2508
2656
|
PROVIDER_OVERLOAD_RESUME_PROMPT,
|
|
2509
2657
|
"followUp",
|
|
@@ -2511,13 +2659,17 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2511
2659
|
}, delayMs);
|
|
2512
2660
|
}
|
|
2513
2661
|
|
|
2514
|
-
function queueAutoResume(
|
|
2662
|
+
async function queueAutoResume(
|
|
2515
2663
|
reason: string,
|
|
2516
2664
|
content: string,
|
|
2517
2665
|
deliverAs: "steer" | "followUp",
|
|
2518
|
-
): void {
|
|
2666
|
+
): Promise<void> {
|
|
2519
2667
|
try {
|
|
2520
2668
|
pi.sendUserMessage(content, { deliverAs });
|
|
2669
|
+
await nc("ResumeScheduled", {
|
|
2670
|
+
requirement: "Session auto-resume",
|
|
2671
|
+
error: reason,
|
|
2672
|
+
});
|
|
2521
2673
|
} catch (error) {
|
|
2522
2674
|
console.error(
|
|
2523
2675
|
`[pi-harness] Failed to queue ${reason} auto-resume:`,
|
|
@@ -2561,6 +2713,11 @@ Run \`bd ready\` to see current bd issues.
|
|
|
2561
2713
|
lastProactiveCompactAt = Date.now();
|
|
2562
2714
|
consecutiveCompactFailures = 0;
|
|
2563
2715
|
proactiveCompactCircuitReported = false;
|
|
2716
|
+
// Emit ContextCompacted to Telegram
|
|
2717
|
+
nc("ContextCompacted", {
|
|
2718
|
+
requirement: "Session context",
|
|
2719
|
+
error: "Proactive compact completed",
|
|
2720
|
+
});
|
|
2564
2721
|
},
|
|
2565
2722
|
onError: (error) => {
|
|
2566
2723
|
proactiveCompactInFlight = false;
|
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.146",
|
|
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",
|