pi-harness-runtime 1.1.214 → 1.1.216
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 +9 -2
- package/index.ts +23 -25
- 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,8 +185,15 @@ 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
|
|
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
|
|
|
@@ -1156,7 +1156,8 @@ function processCompletionFile(filePath: string, pi: ExtensionAPI): void {
|
|
|
1156
1156
|
// --- Debug logging (file only, no console override) ---------------
|
|
1157
1157
|
// Logs written to file only. Real console output preserved for pi's TUI.
|
|
1158
1158
|
import { homedir } from "node:os";
|
|
1159
|
-
import { existsSync, mkdirSync, readFileSync, symlinkSync } from "node:fs";
|
|
1159
|
+
import { existsSync, mkdirSync, readFileSync, symlinkSync, appendFileSync } from "node:fs";
|
|
1160
|
+
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
1160
1161
|
import { join, dirname } from "node:path";
|
|
1161
1162
|
|
|
1162
1163
|
// --- Harness Runtime State --------------------------------------------
|
|
@@ -1164,23 +1165,25 @@ const HARNESS_ROOT_DIR = join(homedir(), ".pi-harness-runtime");
|
|
|
1164
1165
|
|
|
1165
1166
|
/** Startup messages collected during init — shown on session_start via ctx.ui.notify */
|
|
1166
1167
|
const startupMessages: string[] = [];
|
|
1167
|
-
const
|
|
1168
|
+
const HARNESS_LOG_FILE = "/tmp/pi-harness.log";
|
|
1168
1169
|
|
|
1169
|
-
/** Log a harness
|
|
1170
|
-
function
|
|
1170
|
+
/** Log a harness message to file (not stderr - bypasses Pi's cursor tracking) */
|
|
1171
|
+
function logToFile(...parts: string[]): void {
|
|
1171
1172
|
const msg = parts.join(" ");
|
|
1172
|
-
startupMessages.push(msg);
|
|
1173
|
-
// Write to file instead of stderr to avoid overlapping the input field
|
|
1174
|
-
// Pi's renderer handles scrolling for managed content
|
|
1175
1173
|
try {
|
|
1176
|
-
|
|
1177
|
-
fs.appendFileSync(STARTUP_LOG_FILE, msg + "\n");
|
|
1178
|
-
});
|
|
1174
|
+
appendFileSync(HARNESS_LOG_FILE, msg + "\n");
|
|
1179
1175
|
} catch {
|
|
1180
1176
|
// Ignore file write errors
|
|
1181
1177
|
}
|
|
1182
1178
|
}
|
|
1183
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
|
+
|
|
1184
1187
|
interface HarnessSession {
|
|
1185
1188
|
jobId: string;
|
|
1186
1189
|
requirement: string;
|
|
@@ -1230,22 +1233,22 @@ async function nc(event: string, ctx: Record<string, unknown>): Promise<void> {
|
|
|
1230
1233
|
results = await nc.center.notify(event as never, ctx as never);
|
|
1231
1234
|
}
|
|
1232
1235
|
|
|
1233
|
-
// Log delivery outcomes
|
|
1236
|
+
// Log delivery outcomes to file
|
|
1234
1237
|
if (Array.isArray(results)) {
|
|
1235
1238
|
for (const result of results) {
|
|
1236
1239
|
if (result && typeof result === "object" && "success" in result) {
|
|
1237
1240
|
const r = result as { success: boolean; channel: string; error?: string };
|
|
1238
1241
|
if (r.success) {
|
|
1239
|
-
|
|
1242
|
+
logToFile("[TelegramNotification]", `${event} sent to ${r.channel}`);
|
|
1240
1243
|
} else {
|
|
1241
|
-
|
|
1244
|
+
logToFile("[TelegramNotification]", `${event} failed: ${r.error ?? "unknown"}`);
|
|
1242
1245
|
}
|
|
1243
1246
|
}
|
|
1244
1247
|
}
|
|
1245
1248
|
}
|
|
1246
1249
|
} catch (err) {
|
|
1247
|
-
// Never crash runtime on notification failure
|
|
1248
|
-
|
|
1250
|
+
// Never crash runtime on notification failure - log to file
|
|
1251
|
+
logToFile("[TelegramNotification]", `${event} threw: ${err instanceof Error ? err.message : String(err)}`);
|
|
1249
1252
|
}
|
|
1250
1253
|
}
|
|
1251
1254
|
|
|
@@ -3057,12 +3060,6 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3057
3060
|
harnessTUI?.requestRender(true); // Force redraw like Todos
|
|
3058
3061
|
}
|
|
3059
3062
|
|
|
3060
|
-
// Use real truncateToWidth from pi-tui for correct terminal width handling
|
|
3061
|
-
function truncateToWidth(text: string, width: number): string {
|
|
3062
|
-
if (text.length <= width) return text;
|
|
3063
|
-
return text.substring(0, width - 1) + "…";
|
|
3064
|
-
}
|
|
3065
|
-
|
|
3066
3063
|
function getHarnessLines(width: number): string[] {
|
|
3067
3064
|
if (!startupVisible || harnessMessages.length === 0) return [];
|
|
3068
3065
|
|
|
@@ -3104,6 +3101,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3104
3101
|
const mySession = sessionGeneration;
|
|
3105
3102
|
startupVisible = true;
|
|
3106
3103
|
harnessMessages.length = 0;
|
|
3104
|
+
harnessWidgetRegistered = false; // Reset for new session
|
|
3107
3105
|
|
|
3108
3106
|
// --- Install harness widget (like Todos with placement: "aboveEditor") -------
|
|
3109
3107
|
// Use setWidget with placement: "aboveEditor" - fixed above input field
|
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.216",
|
|
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/provider-router",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.216",
|
|
4
4
|
"description": "Enhanced Provider Router for pi-harness-runtime — intelligent routing with capabilities, costs, and quotas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/provider-router.js",
|