pi-harness-runtime 1.1.285 → 1.1.287
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 +31 -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/harness/honcho-init.ts
CHANGED
|
@@ -133,16 +133,21 @@ async function callHonchoTool(
|
|
|
133
133
|
args,
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
+
logServiceEvent({ ts: new Date().toISOString(), level: "debug", service: "honcho", operation: "tool_call", phase: "start", tool: toolName, args: JSON.stringify(args).slice(0, 100) });
|
|
137
|
+
|
|
136
138
|
// Emit tool call
|
|
137
139
|
piEvents.emit(MCP_RUNTIME_TOOL_CALL_EVENT, request);
|
|
138
140
|
|
|
139
141
|
// Wait for result - adapter assigns a Promise to request.result
|
|
140
142
|
if (request.result === undefined) {
|
|
143
|
+
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "tool_call", phase: "failed", tool: toolName, reason: "no response from adapter" });
|
|
141
144
|
return { success: false, error: "No response from MCP adapter" };
|
|
142
145
|
}
|
|
143
146
|
|
|
144
147
|
// request.result is a Promise from the adapter
|
|
145
148
|
const result = await request.result;
|
|
149
|
+
|
|
150
|
+
logServiceEvent({ ts: new Date().toISOString(), level: "debug", service: "honcho", operation: "tool_call", phase: "completed", tool: toolName, result: JSON.stringify(result).slice(0, 200) });
|
|
146
151
|
|
|
147
152
|
if (!result.ok) {
|
|
148
153
|
return { success: false, error: result.error?.message ?? "Unknown error" };
|
|
@@ -482,11 +487,27 @@ export async function initHoncho(options?: {
|
|
|
482
487
|
apiKey: key,
|
|
483
488
|
});
|
|
484
489
|
|
|
485
|
-
//
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
+
// MCP registration done - identity setup deferred to session_start
|
|
491
|
+
// (MCP tool calls require an active Pi session)
|
|
492
|
+
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "mcp_register", phase: "completed", reason: "identity_setup_deferred" });
|
|
493
|
+
honchoStatus.recordSuccess("init", undefined, { note: "identity deferred to session_start" });
|
|
494
|
+
|
|
495
|
+
return _honchoMemory;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Ensure Honcho workspace, peers, and session are created.
|
|
500
|
+
* Call this on session_start when MCP tool calls are available.
|
|
501
|
+
*/
|
|
502
|
+
export async function ensureHonchoIdentity(): Promise<boolean> {
|
|
503
|
+
if (!_honchoMemory || _initSucceeded) {
|
|
504
|
+
return _initSucceeded;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const workspaceName = DEFAULT_WORKSPACE_NAME;
|
|
508
|
+
const assistantName = DEFAULT_ASSISTANT_NAME;
|
|
509
|
+
const userName = "pi-user";
|
|
510
|
+
const sessionId = `pi-session-${Date.now()}`;
|
|
490
511
|
|
|
491
512
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "identity", phase: "start" });
|
|
492
513
|
|
|
@@ -495,7 +516,7 @@ export async function initHoncho(options?: {
|
|
|
495
516
|
if (!workspaceId) {
|
|
496
517
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_workspace", phase: "failed" });
|
|
497
518
|
honchoStatus.recordFailure("init", "workspace_failed", {});
|
|
498
|
-
return
|
|
519
|
+
return false;
|
|
499
520
|
}
|
|
500
521
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_workspace", phase: "completed", workspaceId });
|
|
501
522
|
|
|
@@ -504,7 +525,7 @@ export async function initHoncho(options?: {
|
|
|
504
525
|
if (!userPeerId) {
|
|
505
526
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_user_peer", phase: "failed" });
|
|
506
527
|
honchoStatus.recordFailure("init", "user_peer_failed", {});
|
|
507
|
-
return
|
|
528
|
+
return false;
|
|
508
529
|
}
|
|
509
530
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_user_peer", phase: "completed", userPeerId });
|
|
510
531
|
|
|
@@ -513,7 +534,7 @@ export async function initHoncho(options?: {
|
|
|
513
534
|
if (!assistantPeerId) {
|
|
514
535
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_assistant_peer", phase: "failed" });
|
|
515
536
|
honchoStatus.recordFailure("init", "assistant_peer_failed", {});
|
|
516
|
-
return
|
|
537
|
+
return false;
|
|
517
538
|
}
|
|
518
539
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_assistant_peer", phase: "completed", assistantPeerId });
|
|
519
540
|
|
|
@@ -522,7 +543,7 @@ export async function initHoncho(options?: {
|
|
|
522
543
|
if (!honchoSessionId) {
|
|
523
544
|
logServiceEvent({ ts: new Date().toISOString(), level: "error", service: "honcho", operation: "create_session", phase: "failed" });
|
|
524
545
|
honchoStatus.recordFailure("init", "session_failed", {});
|
|
525
|
-
return
|
|
546
|
+
return false;
|
|
526
547
|
}
|
|
527
548
|
logServiceEvent({ ts: new Date().toISOString(), level: "info", service: "honcho", operation: "create_session", phase: "completed", honchoSessionId });
|
|
528
549
|
|
|
@@ -551,7 +572,7 @@ export async function initHoncho(options?: {
|
|
|
551
572
|
// Mark initialization as successful
|
|
552
573
|
_initSucceeded = true;
|
|
553
574
|
|
|
554
|
-
return
|
|
575
|
+
return true;
|
|
555
576
|
}
|
|
556
577
|
|
|
557
578
|
/**
|
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.287",
|
|
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.287",
|
|
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",
|