pi-harness-runtime 1.1.194 → 1.1.195
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/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/dist/conversation-bridge.d.ts +0 -13
- package/packages/notification/dist/conversation-bridge.d.ts.map +1 -1
- package/packages/notification/dist/conversation-bridge.js +7 -64
- package/packages/notification/dist/conversation-bridge.js.map +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/notification/src/conversation-bridge.ts +7 -74
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.195",
|
|
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",
|
|
@@ -39,7 +39,6 @@ export declare class ConversationBridge {
|
|
|
39
39
|
private pendingMessages;
|
|
40
40
|
private deliveredMessageIds;
|
|
41
41
|
private sessionStartTime;
|
|
42
|
-
private lastMessageId;
|
|
43
42
|
constructor(pi: ExtensionAPI, center: NotificationCenter, config?: Partial<ConversationBridgeConfig>);
|
|
44
43
|
/**
|
|
45
44
|
* Register all lifecycle hooks
|
|
@@ -49,14 +48,6 @@ export declare class ConversationBridge {
|
|
|
49
48
|
* Extract text content from a message
|
|
50
49
|
*/
|
|
51
50
|
private extractMessageContent;
|
|
52
|
-
/**
|
|
53
|
-
* Format a tool execution summary
|
|
54
|
-
*/
|
|
55
|
-
private formatToolSummary;
|
|
56
|
-
/**
|
|
57
|
-
* Send a tool summary to Telegram
|
|
58
|
-
*/
|
|
59
|
-
private sendToolSummary;
|
|
60
51
|
/**
|
|
61
52
|
* Finalize and send pending messages (called on agent_settled)
|
|
62
53
|
*/
|
|
@@ -73,10 +64,6 @@ export declare class ConversationBridge {
|
|
|
73
64
|
* Chunk a message into smaller parts
|
|
74
65
|
*/
|
|
75
66
|
private chunkMessage;
|
|
76
|
-
/**
|
|
77
|
-
* Truncate a string
|
|
78
|
-
*/
|
|
79
|
-
private truncate;
|
|
80
67
|
/**
|
|
81
68
|
* Reset state for new session
|
|
82
69
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-bridge.d.ts","sourceRoot":"","sources":["../src/conversation-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation-bridge.d.ts","sourceRoot":"","sources":["../src/conversation-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,gDAAgD;IAChD,sBAAsB,EAAE,OAAO,CAAC;IAChC,qCAAqC;IACrC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;CACtB;AAYD;;;;GAIG;AACH,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,EAAE,CAAe;IACzB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,eAAe,CAA0C;IACjE,OAAO,CAAC,mBAAmB,CAA0B;IACrD,OAAO,CAAC,gBAAgB,CAAsB;IAE9C,YACC,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,kBAAkB,EAC1B,MAAM,GAAE,OAAO,CAAC,wBAAwB,CAAM,EAW9C;IAED;;OAEG;IACH,QAAQ,IAAI,IAAI,CA2Ef;IAED;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA8B7B;;OAEG;YACW,uBAAuB;IAerC;;OAEG;YACW,oBAAoB;IAQlC;;OAEG;YACW,qBAAqB;IA6CnC;;OAEG;IACH,OAAO,CAAC,YAAY;IA8DpB;;OAEG;IACH,OAAO,CAAC,KAAK;IAMb;;OAEG;IACH,IAAI,IAAI,IAAI,CAGX;CACD;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACvC,EAAE,EAAE,YAAY,EAChB,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GACxC,kBAAkB,CAIpB"}
|
|
@@ -24,7 +24,6 @@ export class ConversationBridge {
|
|
|
24
24
|
pendingMessages = new Map();
|
|
25
25
|
deliveredMessageIds = new Set();
|
|
26
26
|
sessionStartTime = Date.now();
|
|
27
|
-
lastMessageId = null;
|
|
28
27
|
constructor(pi, center, config = {}) {
|
|
29
28
|
this.pi = pi;
|
|
30
29
|
this.center = center;
|
|
@@ -58,11 +57,9 @@ export class ConversationBridge {
|
|
|
58
57
|
this.stop();
|
|
59
58
|
});
|
|
60
59
|
// Message start - track new message
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.lastMessageId = msg.id;
|
|
65
|
-
}
|
|
60
|
+
// Track message start for assistant messages
|
|
61
|
+
this.pi.on("message_start", (_event) => {
|
|
62
|
+
// Message tracking is handled in message_end
|
|
66
63
|
});
|
|
67
64
|
// Message end - capture final assistant response
|
|
68
65
|
this.pi.on("message_end", (event) => {
|
|
@@ -72,7 +69,7 @@ export class ConversationBridge {
|
|
|
72
69
|
const content = this.extractMessageContent(msg);
|
|
73
70
|
if (!content || content.length < 10)
|
|
74
71
|
return; // Skip empty/too short
|
|
75
|
-
const messageId = msg.id ?? `msg-${
|
|
72
|
+
const messageId = msg.id ?? `msg-${this.sessionStartTime}`;
|
|
76
73
|
// Deduplicate
|
|
77
74
|
if (this.deliveredMessageIds.has(messageId)) {
|
|
78
75
|
console.log(`[ConversationBridge] Skipping duplicate: ${messageId}`);
|
|
@@ -92,15 +89,9 @@ export class ConversationBridge {
|
|
|
92
89
|
pending.events.add("message_end");
|
|
93
90
|
console.log(`[ConversationBridge] Assistant message captured: ${messageId.substring(0, 20)}...`);
|
|
94
91
|
});
|
|
95
|
-
// Tool execution end -
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const summary = this.formatToolSummary(event);
|
|
99
|
-
if (summary) {
|
|
100
|
-
this.sendToolSummary(summary);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
92
|
+
// Tool execution end - DISABLED by default (too noisy)
|
|
93
|
+
// Tool summaries spam Telegram with every tool call
|
|
94
|
+
// Enable only if explicitly configured and user wants verbose output
|
|
104
95
|
// Agent settled - finalize and send pending messages
|
|
105
96
|
this.pi.on("agent_settled", () => {
|
|
106
97
|
console.log("[ConversationBridge] Agent settled, finalizing messages...");
|
|
@@ -134,45 +125,6 @@ export class ConversationBridge {
|
|
|
134
125
|
}
|
|
135
126
|
return null;
|
|
136
127
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Format a tool execution summary
|
|
139
|
-
*/
|
|
140
|
-
formatToolSummary(event) {
|
|
141
|
-
const status = event.isError ? "FAILED" : "DONE";
|
|
142
|
-
const resultPreview = this.truncate(JSON.stringify(event.result ?? ""), 100);
|
|
143
|
-
return `[Tool] ${event.toolName}: ${status}${resultPreview ? ` - ${resultPreview}` : ""}`;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Send a tool summary to Telegram
|
|
147
|
-
*/
|
|
148
|
-
async sendToolSummary(summary) {
|
|
149
|
-
if (!this.center.hasHealthyChannels())
|
|
150
|
-
return;
|
|
151
|
-
const payload = {
|
|
152
|
-
event: "CodexSessionStarted", // Reusing existing event
|
|
153
|
-
jobId: `tool-${Date.now()}`,
|
|
154
|
-
timestamp: new Date().toISOString(),
|
|
155
|
-
title: "Tool Executed",
|
|
156
|
-
message: summary,
|
|
157
|
-
};
|
|
158
|
-
try {
|
|
159
|
-
const results = await this.center.notify("CodexSessionStarted", {
|
|
160
|
-
jobId: payload.jobId,
|
|
161
|
-
requirement: payload.message,
|
|
162
|
-
});
|
|
163
|
-
for (const result of results) {
|
|
164
|
-
if (result.success) {
|
|
165
|
-
console.log(`[ConversationBridge] Tool summary sent`);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
console.warn(`[ConversationBridge] Tool summary failed: ${result.error}`);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
catch (err) {
|
|
173
|
-
console.error("[ConversationBridge] Failed to send tool summary:", err);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
128
|
/**
|
|
177
129
|
* Finalize and send pending messages (called on agent_settled)
|
|
178
130
|
*/
|
|
@@ -295,21 +247,12 @@ export class ConversationBridge {
|
|
|
295
247
|
}
|
|
296
248
|
return chunks;
|
|
297
249
|
}
|
|
298
|
-
/**
|
|
299
|
-
* Truncate a string
|
|
300
|
-
*/
|
|
301
|
-
truncate(str, maxLen) {
|
|
302
|
-
if (str.length <= maxLen)
|
|
303
|
-
return str;
|
|
304
|
-
return str.substring(0, maxLen - 3) + "...";
|
|
305
|
-
}
|
|
306
250
|
/**
|
|
307
251
|
* Reset state for new session
|
|
308
252
|
*/
|
|
309
253
|
reset() {
|
|
310
254
|
this.pendingMessages.clear();
|
|
311
255
|
this.deliveredMessageIds.clear();
|
|
312
|
-
this.lastMessageId = null;
|
|
313
256
|
this.sessionStartTime = Date.now();
|
|
314
257
|
}
|
|
315
258
|
/**
|