pi-harness-runtime 1.1.221 → 1.1.222
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 +61 -2
- 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
|
@@ -121,6 +121,30 @@ async function getTaskContext(): Promise<{
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
// --- Harness Startup Widget Messages (used by init functions) -----------------
|
|
125
|
+
interface HarnessMessage {
|
|
126
|
+
id: string;
|
|
127
|
+
label: string;
|
|
128
|
+
text: string;
|
|
129
|
+
status: "wait" | "ok" | "err";
|
|
130
|
+
details?: string[]; // Multi-line fix instructions for errors
|
|
131
|
+
}
|
|
132
|
+
const harnessMessages: HarnessMessage[] = [];
|
|
133
|
+
const preSessionErrors: HarnessMessage[] = []; // Errors from init functions (before session_start)
|
|
134
|
+
|
|
135
|
+
function addHarnessMessage(label: string, text: string, status: "wait" | "ok" | "err" = "wait", details?: string[]) {
|
|
136
|
+
const id = `${label}-${Date.now()}`;
|
|
137
|
+
const msg: HarnessMessage = { id, label, text, status, details };
|
|
138
|
+
|
|
139
|
+
// If session hasn't started yet, store in preSessionErrors
|
|
140
|
+
// The session_start handler will merge these into harnessMessages
|
|
141
|
+
if (harnessMessages.length === 0) {
|
|
142
|
+
preSessionErrors.push(msg);
|
|
143
|
+
} else {
|
|
144
|
+
harnessMessages.push(msg);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
124
148
|
async function initAutoContinue(pi: ExtensionAPI): Promise<void> {
|
|
125
149
|
try {
|
|
126
150
|
// Check if Jev API key is available (env var or keys file)
|
|
@@ -506,6 +530,11 @@ async function initTelegram(pi: ExtensionAPI): Promise<void> {
|
|
|
506
530
|
logStartup("[pi-harness] 3. echo \"{token}\" > ~/.pi-harness-runtime/keys/telegram-bot-token.txt");
|
|
507
531
|
logStartup("[pi-harness] 4. echo \"{chat-id}\" > ~/.pi-harness-runtime/keys/telegram-chat-id.txt");
|
|
508
532
|
logStartup("[pi-harness] 5. Reload pi — then DM @PiHarnessRuntimeBot to verify");
|
|
533
|
+
addHarnessMessage("Telegram", "not configured", "err", [
|
|
534
|
+
"echo \"<TOKEN>\" > keys/telegram-bot-token.txt",
|
|
535
|
+
"echo \"<CHAT_ID>\" > keys/telegram-chat-id.txt",
|
|
536
|
+
"Then: pi restart",
|
|
537
|
+
]);
|
|
509
538
|
return;
|
|
510
539
|
}
|
|
511
540
|
|
|
@@ -610,12 +639,21 @@ async function initHoncho(pi: ExtensionAPI): Promise<void> {
|
|
|
610
639
|
logStartup("[pi-harness] Honcho not configured:");
|
|
611
640
|
logStartup("[pi-harness] Get key: https://app.honcho.dev/api-keys");
|
|
612
641
|
logStartup(`[pi-harness] Then: echo "{api-key}" > ~/.pi-harness-runtime/keys/honcho-api-key.txt`);
|
|
642
|
+
addHarnessMessage("Honcho", "API key missing", "err", [
|
|
643
|
+
"Get key: https://app.honcho.dev/api-keys",
|
|
644
|
+
"echo \"<KEY>\" > keys/honcho-api-key.txt",
|
|
645
|
+
"Then: pi restart",
|
|
646
|
+
]);
|
|
613
647
|
return;
|
|
614
648
|
}
|
|
615
649
|
|
|
616
650
|
const apiKey = readFileSync(keyPath, "utf8").trim();
|
|
617
651
|
if (!apiKey) {
|
|
618
652
|
logStartup("[pi-harness] Honcho: API key is empty — skipping");
|
|
653
|
+
addHarnessMessage("Honcho", "API key empty", "err", [
|
|
654
|
+
"echo \"<KEY>\" > keys/honcho-api-key.txt",
|
|
655
|
+
"Then: pi restart",
|
|
656
|
+
]);
|
|
619
657
|
return;
|
|
620
658
|
}
|
|
621
659
|
|
|
@@ -635,6 +673,10 @@ async function initHoncho(pi: ExtensionAPI): Promise<void> {
|
|
|
635
673
|
}
|
|
636
674
|
} catch (err) {
|
|
637
675
|
logStartup("[pi-harness] Honcho: init failed:", err instanceof Error ? err.message : String(err));
|
|
676
|
+
addHarnessMessage("Honcho", "init failed", "err", [
|
|
677
|
+
err instanceof Error ? err.message : String(err),
|
|
678
|
+
"Check keys/honcho-api-key.txt",
|
|
679
|
+
]);
|
|
638
680
|
}
|
|
639
681
|
}
|
|
640
682
|
|
|
@@ -3033,6 +3075,7 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3033
3075
|
label: string;
|
|
3034
3076
|
text: string;
|
|
3035
3077
|
status: "wait" | "ok" | "err";
|
|
3078
|
+
details?: string[]; // Multi-line fix instructions for errors
|
|
3036
3079
|
}
|
|
3037
3080
|
const harnessMessages: HarnessMessage[] = [];
|
|
3038
3081
|
let startupVisible = true;
|
|
@@ -3040,9 +3083,9 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3040
3083
|
let harnessWidgetRegistered = false;
|
|
3041
3084
|
let sessionGeneration = 0;
|
|
3042
3085
|
|
|
3043
|
-
function addHarnessMessage(label: string, text: string, status: "wait" | "ok" | "err" = "wait") {
|
|
3086
|
+
function addHarnessMessage(label: string, text: string, status: "wait" | "ok" | "err" = "wait", details?: string[]) {
|
|
3044
3087
|
const id = `${label}-${Date.now()}`;
|
|
3045
|
-
harnessMessages.push({ id, label, text, status });
|
|
3088
|
+
harnessMessages.push({ id, label, text, status, details });
|
|
3046
3089
|
harnessTUI?.requestRender();
|
|
3047
3090
|
}
|
|
3048
3091
|
|
|
@@ -3066,6 +3109,14 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3066
3109
|
let text = `${treeChar} ${marker} ${msg.label}: ${msg.text}`;
|
|
3067
3110
|
text = truncateToWidth(text, width);
|
|
3068
3111
|
lines.push(text);
|
|
3112
|
+
|
|
3113
|
+
// Add fix instructions for errors (indented)
|
|
3114
|
+
if (msg.status === "err" && msg.details && msg.details.length > 0) {
|
|
3115
|
+
for (const detail of msg.details) {
|
|
3116
|
+
const detailLine = `${isLast ? " " : "│ "} Fix: ${detail}`;
|
|
3117
|
+
lines.push(truncateToWidth(detailLine, width));
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3069
3120
|
}
|
|
3070
3121
|
|
|
3071
3122
|
// Trailing spacer for breathing room (like Todos)
|
|
@@ -3109,6 +3160,14 @@ Run \`bd ready\` to see current bd issues.
|
|
|
3109
3160
|
{ placement: "aboveEditor" }, // Like Todos!
|
|
3110
3161
|
);
|
|
3111
3162
|
harnessWidgetRegistered = true;
|
|
3163
|
+
|
|
3164
|
+
// Merge pre-session errors into harnessMessages
|
|
3165
|
+
for (const err of preSessionErrors) {
|
|
3166
|
+
harnessMessages.push(err);
|
|
3167
|
+
}
|
|
3168
|
+
preSessionErrors.length = 0; // Clear pre-session errors
|
|
3169
|
+
|
|
3170
|
+
harnessTUI?.requestRender(); // Show widget with error messages
|
|
3112
3171
|
} else {
|
|
3113
3172
|
harnessTUI?.requestRender();
|
|
3114
3173
|
}
|
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.222",
|
|
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.222",
|
|
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",
|