pi-harness-runtime 1.1.284 → 1.1.286
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-init.ts +26 -10
- package/index.ts +12 -0
- 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/scripts/test-honcho.ts +58 -0
package/harness/honcho-init.ts
CHANGED
|
@@ -482,11 +482,27 @@ export async function initHoncho(options?: {
|
|
|
482
482
|
apiKey: key,
|
|
483
483
|
});
|
|
484
484
|
|
|
485
|
-
//
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
485
|
+
// MCP registration done - identity setup deferred to session_start
|
|
486
|
+
// (MCP tool calls require an active Pi session)
|
|
487
|
+
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "mcp_register", phase: "completed", reason: "identity_setup_deferred" });
|
|
488
|
+
honchoStatus.recordSuccess("init", undefined, { note: "identity deferred to session_start" });
|
|
489
|
+
|
|
490
|
+
return _honchoMemory;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Ensure Honcho workspace, peers, and session are created.
|
|
495
|
+
* Call this on session_start when MCP tool calls are available.
|
|
496
|
+
*/
|
|
497
|
+
export async function ensureHonchoIdentity(): Promise<boolean> {
|
|
498
|
+
if (!_honchoMemory || _initSucceeded) {
|
|
499
|
+
return _initSucceeded;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const workspaceName = DEFAULT_WORKSPACE_NAME;
|
|
503
|
+
const assistantName = DEFAULT_ASSISTANT_NAME;
|
|
504
|
+
const userName = "pi-user";
|
|
505
|
+
const sessionId = `pi-session-${Date.now()}`;
|
|
490
506
|
|
|
491
507
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "identity", phase: "start" });
|
|
492
508
|
|
|
@@ -495,7 +511,7 @@ export async function initHoncho(options?: {
|
|
|
495
511
|
if (!workspaceId) {
|
|
496
512
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_workspace", phase: "failed" });
|
|
497
513
|
honchoStatus.recordFailure("init", "workspace_failed", {});
|
|
498
|
-
return
|
|
514
|
+
return false;
|
|
499
515
|
}
|
|
500
516
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_workspace", phase: "completed", workspaceId });
|
|
501
517
|
|
|
@@ -504,7 +520,7 @@ export async function initHoncho(options?: {
|
|
|
504
520
|
if (!userPeerId) {
|
|
505
521
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_user_peer", phase: "failed" });
|
|
506
522
|
honchoStatus.recordFailure("init", "user_peer_failed", {});
|
|
507
|
-
return
|
|
523
|
+
return false;
|
|
508
524
|
}
|
|
509
525
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_user_peer", phase: "completed", userPeerId });
|
|
510
526
|
|
|
@@ -513,7 +529,7 @@ export async function initHoncho(options?: {
|
|
|
513
529
|
if (!assistantPeerId) {
|
|
514
530
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_assistant_peer", phase: "failed" });
|
|
515
531
|
honchoStatus.recordFailure("init", "assistant_peer_failed", {});
|
|
516
|
-
return
|
|
532
|
+
return false;
|
|
517
533
|
}
|
|
518
534
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_assistant_peer", phase: "completed", assistantPeerId });
|
|
519
535
|
|
|
@@ -522,7 +538,7 @@ export async function initHoncho(options?: {
|
|
|
522
538
|
if (!honchoSessionId) {
|
|
523
539
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_session", phase: "failed" });
|
|
524
540
|
honchoStatus.recordFailure("init", "session_failed", {});
|
|
525
|
-
return
|
|
541
|
+
return false;
|
|
526
542
|
}
|
|
527
543
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_session", phase: "completed", honchoSessionId });
|
|
528
544
|
|
|
@@ -551,7 +567,7 @@ export async function initHoncho(options?: {
|
|
|
551
567
|
// Mark initialization as successful
|
|
552
568
|
_initSucceeded = true;
|
|
553
569
|
|
|
554
|
-
return
|
|
570
|
+
return true;
|
|
555
571
|
}
|
|
556
572
|
|
|
557
573
|
/**
|
package/index.ts
CHANGED
|
@@ -2366,8 +2366,20 @@ export default function (pi: ExtensionAPI) {
|
|
|
2366
2366
|
|
|
2367
2367
|
// --- honcho-memory: Honcho MCP for peer/user memory (honcho_profile, etc.) ----
|
|
2368
2368
|
// Collect promise so we can wait for initialization before showing startup notification
|
|
2369
|
+
// Note: initHoncho registers the MCP server but workspace creation is deferred to session_start
|
|
2370
|
+
// because MCP tool calls require an active Pi session.
|
|
2369
2371
|
asyncInitPromises.push(initHoncho(pi));
|
|
2370
2372
|
|
|
2373
|
+
// Defer Honcho workspace/identity creation until we have an active session
|
|
2374
|
+
let honchoIdentitySetup = false;
|
|
2375
|
+
pi.on("session_start", async () => {
|
|
2376
|
+
if (honchoIdentitySetup) return;
|
|
2377
|
+
honchoIdentitySetup = true;
|
|
2378
|
+
|
|
2379
|
+
const { ensureHonchoIdentity } = await import("./harness/honcho-init.js");
|
|
2380
|
+
await ensureHonchoIdentity();
|
|
2381
|
+
});
|
|
2382
|
+
|
|
2371
2383
|
// --- moocoding-sync-hint: Suggest skill sync if skills dir is empty --------
|
|
2372
2384
|
void initMoocodingSyncHint();
|
|
2373
2385
|
|
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.286",
|
|
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.286",
|
|
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",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Honcho MCP connection
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
import { homedir } from "node:os";
|
|
8
|
+
|
|
9
|
+
async function testHoncho() {
|
|
10
|
+
console.log("=== Honcho MCP Test ===\n");
|
|
11
|
+
|
|
12
|
+
// 1. Check Honcho API key
|
|
13
|
+
const keyFile = join(homedir(), ".pi-harness-runtime", "keys", "honcho-api-key.txt");
|
|
14
|
+
let apiKey = "";
|
|
15
|
+
|
|
16
|
+
if (existsSync(keyFile)) {
|
|
17
|
+
apiKey = readFileSync(keyFile, "utf-8").trim();
|
|
18
|
+
console.log("✓ Honcho API key found");
|
|
19
|
+
} else {
|
|
20
|
+
console.log("✗ Honcho API key not found:", keyFile);
|
|
21
|
+
console.log(" Run: echo '{your-key}' >", keyFile);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 2. Check MCP config
|
|
26
|
+
const mcpConfig = join(homedir(), ".config", "mcp", "mcp.json");
|
|
27
|
+
if (existsSync(mcpConfig)) {
|
|
28
|
+
try {
|
|
29
|
+
const config = JSON.parse(readFileSync(mcpConfig, "utf-8"));
|
|
30
|
+
console.log("✓ MCP config found");
|
|
31
|
+
console.log(" Servers:", Object.keys(config.mcpServers || {}).join(", "));
|
|
32
|
+
} catch {
|
|
33
|
+
console.log("✗ MCP config parse error");
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
console.log("✗ MCP config not found");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 3. Test Honcho MCP connection
|
|
40
|
+
console.log("\nTesting Honcho MCP...");
|
|
41
|
+
try {
|
|
42
|
+
const health = await fetch("https://app.honcho.dev/api/health", {
|
|
43
|
+
headers: { "Authorization": `Bearer ${apiKey}` },
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (health.ok) {
|
|
47
|
+
console.log("✓ Honcho MCP connected");
|
|
48
|
+
} else {
|
|
49
|
+
console.log("✗ Honcho MCP health failed:", health.status);
|
|
50
|
+
}
|
|
51
|
+
} catch (err) {
|
|
52
|
+
console.log("✗ Honcho MCP call failed:", err);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
console.log("\n=== Done ===");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
testHoncho().catch(console.error);
|