pi-harness-runtime 1.1.215 → 1.1.217
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/harness/honcho-memory.ts +42 -9
- package/index.ts +25 -21
- 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/harness/honcho-memory.ts
CHANGED
|
@@ -185,21 +185,41 @@ async function checkHonchoHealth(): Promise<void> {
|
|
|
185
185
|
});
|
|
186
186
|
|
|
187
187
|
if (response.status === 401 || response.status === 403) {
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
logServiceEvent({
|
|
189
|
+
ts: new Date().toISOString(),
|
|
190
|
+
level: "warn",
|
|
191
|
+
service: "honcho",
|
|
192
|
+
operation: "health_check",
|
|
193
|
+
phase: "failed",
|
|
194
|
+
reason: "API key invalid or account suspended",
|
|
195
|
+
helpUrl: "https://app.honcho.dev",
|
|
196
|
+
});
|
|
190
197
|
return;
|
|
191
198
|
}
|
|
192
199
|
|
|
193
200
|
const data = await response.json().catch(() => ({})) as HonchoHealthResponse;
|
|
194
201
|
|
|
195
202
|
if (data.suspended || data.status === "suspended") {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
203
|
+
logServiceEvent({
|
|
204
|
+
ts: new Date().toISOString(),
|
|
205
|
+
level: "warn",
|
|
206
|
+
service: "honcho",
|
|
207
|
+
operation: "health_check",
|
|
208
|
+
phase: "failed",
|
|
209
|
+
reason: "account suspended due to inactivity",
|
|
210
|
+
helpUrl: "https://app.honcho.dev",
|
|
211
|
+
});
|
|
199
212
|
}
|
|
200
213
|
} catch (err) {
|
|
201
|
-
// Network errors are not critical
|
|
202
|
-
|
|
214
|
+
// Network errors are not critical - log to file
|
|
215
|
+
logServiceEvent({
|
|
216
|
+
ts: new Date().toISOString(),
|
|
217
|
+
level: "debug",
|
|
218
|
+
service: "honcho",
|
|
219
|
+
operation: "health_check",
|
|
220
|
+
phase: "failed",
|
|
221
|
+
reason: err instanceof Error ? err.message : String(err),
|
|
222
|
+
});
|
|
203
223
|
}
|
|
204
224
|
}
|
|
205
225
|
|
|
@@ -219,7 +239,14 @@ export function startHonchoHealthCheck(): void {
|
|
|
219
239
|
void checkHonchoHealth();
|
|
220
240
|
}, HONCHO_HEALTH_CHECK_INTERVAL);
|
|
221
241
|
|
|
222
|
-
|
|
242
|
+
logServiceEvent({
|
|
243
|
+
ts: new Date().toISOString(),
|
|
244
|
+
level: "info",
|
|
245
|
+
service: "honcho",
|
|
246
|
+
operation: "health_check_start",
|
|
247
|
+
phase: "completed",
|
|
248
|
+
intervalMs: HONCHO_HEALTH_CHECK_INTERVAL,
|
|
249
|
+
});
|
|
223
250
|
}
|
|
224
251
|
|
|
225
252
|
/**
|
|
@@ -229,7 +256,13 @@ export function stopHonchoHealthCheck(): void {
|
|
|
229
256
|
if (_honchoHealthInterval) {
|
|
230
257
|
clearInterval(_honchoHealthInterval);
|
|
231
258
|
_honchoHealthInterval = null;
|
|
232
|
-
|
|
259
|
+
logServiceEvent({
|
|
260
|
+
ts: new Date().toISOString(),
|
|
261
|
+
level: "info",
|
|
262
|
+
service: "honcho",
|
|
263
|
+
operation: "health_check_stop",
|
|
264
|
+
phase: "completed",
|
|
265
|
+
});
|
|
233
266
|
}
|
|
234
267
|
}
|
|
235
268
|
|
package/index.ts
CHANGED
|
@@ -543,19 +543,19 @@ async function initTelegram(pi: ExtensionAPI): Promise<void> {
|
|
|
543
543
|
);
|
|
544
544
|
center.setCallbackHandler(async (data: string, _query: { id: string }) => {
|
|
545
545
|
const parsed = parseCallbackData(data);
|
|
546
|
-
|
|
546
|
+
logToFile("[TelegramCallback]", `action=${parsed.action} target=${parsed.targetId}`);
|
|
547
547
|
|
|
548
548
|
switch (parsed.action) {
|
|
549
549
|
case CallbackActions.APPROVE:
|
|
550
550
|
// TODO: Resume auto-continue waiting state
|
|
551
|
-
|
|
551
|
+
logToFile("[TelegramCallback] Approved - user clicked Continue");
|
|
552
552
|
break;
|
|
553
553
|
case CallbackActions.REJECT:
|
|
554
554
|
// TODO: Dismiss notification, don't resume
|
|
555
|
-
|
|
555
|
+
logToFile("[TelegramCallback] Rejected - user clicked Not yet");
|
|
556
556
|
break;
|
|
557
557
|
default:
|
|
558
|
-
|
|
558
|
+
logToFile("[TelegramCallback]", `Unknown action: ${parsed.action}`);
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
561
|
|
|
@@ -1165,21 +1165,25 @@ const HARNESS_ROOT_DIR = join(homedir(), ".pi-harness-runtime");
|
|
|
1165
1165
|
|
|
1166
1166
|
/** Startup messages collected during init — shown on session_start via ctx.ui.notify */
|
|
1167
1167
|
const startupMessages: string[] = [];
|
|
1168
|
-
const
|
|
1168
|
+
const HARNESS_LOG_FILE = "/tmp/pi-harness.log";
|
|
1169
1169
|
|
|
1170
|
-
/** Log a harness
|
|
1171
|
-
function
|
|
1170
|
+
/** Log a harness message to file (not stderr - bypasses Pi's cursor tracking) */
|
|
1171
|
+
function logToFile(...parts: string[]): void {
|
|
1172
1172
|
const msg = parts.join(" ");
|
|
1173
|
-
startupMessages.push(msg);
|
|
1174
|
-
// Write to file using synchronous appendFileSync to avoid overlapping input field
|
|
1175
|
-
// Pi's renderer handles scrolling for managed content
|
|
1176
1173
|
try {
|
|
1177
|
-
appendFileSync(
|
|
1174
|
+
appendFileSync(HARNESS_LOG_FILE, msg + "\n");
|
|
1178
1175
|
} catch {
|
|
1179
1176
|
// Ignore file write errors
|
|
1180
1177
|
}
|
|
1181
1178
|
}
|
|
1182
1179
|
|
|
1180
|
+
/** Log a harness startup message to file and track for UI */
|
|
1181
|
+
function logStartup(...parts: string[]): void {
|
|
1182
|
+
const msg = parts.join(" ");
|
|
1183
|
+
startupMessages.push(msg);
|
|
1184
|
+
logToFile("[pi-harness]", ...parts);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1183
1187
|
interface HarnessSession {
|
|
1184
1188
|
jobId: string;
|
|
1185
1189
|
requirement: string;
|
|
@@ -1229,22 +1233,22 @@ async function nc(event: string, ctx: Record<string, unknown>): Promise<void> {
|
|
|
1229
1233
|
results = await nc.center.notify(event as never, ctx as never);
|
|
1230
1234
|
}
|
|
1231
1235
|
|
|
1232
|
-
// Log delivery outcomes
|
|
1236
|
+
// Log delivery outcomes to file
|
|
1233
1237
|
if (Array.isArray(results)) {
|
|
1234
1238
|
for (const result of results) {
|
|
1235
1239
|
if (result && typeof result === "object" && "success" in result) {
|
|
1236
1240
|
const r = result as { success: boolean; channel: string; error?: string };
|
|
1237
1241
|
if (r.success) {
|
|
1238
|
-
|
|
1242
|
+
logToFile("[TelegramNotification]", `${event} sent to ${r.channel}`);
|
|
1239
1243
|
} else {
|
|
1240
|
-
|
|
1244
|
+
logToFile("[TelegramNotification]", `${event} failed: ${r.error ?? "unknown"}`);
|
|
1241
1245
|
}
|
|
1242
1246
|
}
|
|
1243
1247
|
}
|
|
1244
1248
|
}
|
|
1245
1249
|
} catch (err) {
|
|
1246
|
-
// Never crash runtime on notification failure
|
|
1247
|
-
|
|
1250
|
+
// Never crash runtime on notification failure - log to file
|
|
1251
|
+
logToFile("[TelegramNotification]", `${event} threw: ${err instanceof Error ? err.message : String(err)}`);
|
|
1248
1252
|
}
|
|
1249
1253
|
}
|
|
1250
1254
|
|
|
@@ -1305,7 +1309,7 @@ const HARNESS_VERSION = (() => {
|
|
|
1305
1309
|
})();
|
|
1306
1310
|
|
|
1307
1311
|
function printBanner(): void {
|
|
1308
|
-
|
|
1312
|
+
logToFile(`[Harness] v${HARNESS_VERSION}`);
|
|
1309
1313
|
}
|
|
1310
1314
|
|
|
1311
1315
|
function ensureHarnessDir() {
|
|
@@ -1447,23 +1451,23 @@ function initJobPipeWatcher(pi: ExtensionAPI): void {
|
|
|
1447
1451
|
};
|
|
1448
1452
|
|
|
1449
1453
|
const processCommand = (cmd: { command: string; jobId: string; userId: number }) => {
|
|
1450
|
-
|
|
1454
|
+
logToFile("[JobPipe]", `Received: ${cmd.command} ${cmd.jobId} from user ${cmd.userId}`);
|
|
1451
1455
|
|
|
1452
1456
|
switch (cmd.command) {
|
|
1453
1457
|
case "resume": {
|
|
1454
1458
|
// Inject "resume" into agent conversation (same as auto-resume)
|
|
1455
1459
|
pi.sendUserMessage("resume", { deliverAs: "steer" });
|
|
1456
|
-
|
|
1460
|
+
logToFile("[JobPipe]", "Injected resume via steer");
|
|
1457
1461
|
break;
|
|
1458
1462
|
}
|
|
1459
1463
|
case "cancel": {
|
|
1460
1464
|
// Cancel the current job
|
|
1461
1465
|
pi.sendUserMessage("/harness-cancel", { deliverAs: "steer" });
|
|
1462
|
-
|
|
1466
|
+
logToFile("[JobPipe]", "Injected /harness-cancel via steer");
|
|
1463
1467
|
break;
|
|
1464
1468
|
}
|
|
1465
1469
|
default:
|
|
1466
|
-
|
|
1470
|
+
logToFile("[JobPipe]", `Unknown command: ${cmd.command}`);
|
|
1467
1471
|
}
|
|
1468
1472
|
};
|
|
1469
1473
|
|
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.217",
|
|
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",
|