pi-harness-runtime 1.1.29 → 1.1.30
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/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/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/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/file-copy-helper/src/extension.debug.ts +53 -16
- package/packages/file-copy-helper/src/extension.ts +48 -16
- 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/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/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/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/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/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/tui/package.json +1 -1
- package/packages/types/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.30",
|
|
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",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Injects "use cp instead of writing from scratch" reminder when user
|
|
5
5
|
* asks to mimic, copy, clone, or replicate files/folders between locations.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* DEBUG: All events and rule evaluations logged to /tmp/file-copy-helper-debug.log
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -113,42 +113,65 @@ sudo cp /source/path/components/notifications-provider.tsx /dest/path/components
|
|
|
113
113
|
* Check if text contains copy-related keywords
|
|
114
114
|
* Requires: explicit intent (mimic/copy/clone/replicate) AND destination context
|
|
115
115
|
*/
|
|
116
|
-
function shouldInjectCopyRule(text: string): {
|
|
116
|
+
function shouldInjectCopyRule(text: string): {
|
|
117
|
+
triggered: boolean;
|
|
118
|
+
reason: string;
|
|
119
|
+
} {
|
|
117
120
|
const lower = text.toLowerCase();
|
|
118
121
|
|
|
119
122
|
// Must have explicit mimic/copy/clone/replicate intent
|
|
120
123
|
const hasIntent = COPY_KEYWORDS.some((keyword) => lower.includes(keyword));
|
|
121
124
|
if (!hasIntent) {
|
|
122
|
-
return {
|
|
125
|
+
return {
|
|
126
|
+
triggered: false,
|
|
127
|
+
reason: `No intent keyword found. Keywords: ${COPY_KEYWORDS.join(", ")}`,
|
|
128
|
+
};
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
// Must have destination context (avoids false positives on "copy this code" etc)
|
|
126
132
|
const hasDest = COPY_DEST_CONTEXT.some((ctx) => lower.includes(ctx));
|
|
127
133
|
if (!hasDest) {
|
|
128
|
-
return {
|
|
134
|
+
return {
|
|
135
|
+
triggered: false,
|
|
136
|
+
reason: `No destination context found. Dest contexts: ${COPY_DEST_CONTEXT.join(", ")}`,
|
|
137
|
+
};
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
// Should have source context for full mimic behavior
|
|
132
141
|
const hasSource = COPY_SOURCE_CONTEXT.some((ctx) => lower.includes(ctx));
|
|
133
142
|
if (!hasSource) {
|
|
134
|
-
return {
|
|
143
|
+
return {
|
|
144
|
+
triggered: false,
|
|
145
|
+
reason: `No source context found. Source contexts: ${COPY_SOURCE_CONTEXT.join(", ")}`,
|
|
146
|
+
};
|
|
135
147
|
}
|
|
136
148
|
|
|
137
|
-
return {
|
|
149
|
+
return {
|
|
150
|
+
triggered: true,
|
|
151
|
+
reason: `All conditions met: hasIntent=${hasIntent}, hasDest=${hasDest}, hasSource=${hasSource}`,
|
|
152
|
+
};
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
/**
|
|
141
156
|
* Check if text contains import error triggers
|
|
142
157
|
*/
|
|
143
|
-
function shouldInjectImportErrorRule(text: string): {
|
|
158
|
+
function shouldInjectImportErrorRule(text: string): {
|
|
159
|
+
triggered: boolean;
|
|
160
|
+
reason: string;
|
|
161
|
+
} {
|
|
144
162
|
const lower = text.toLowerCase();
|
|
145
|
-
const matchingTriggers = IMPORT_ERROR_TRIGGERS.filter((t) =>
|
|
146
|
-
|
|
163
|
+
const matchingTriggers = IMPORT_ERROR_TRIGGERS.filter((t) =>
|
|
164
|
+
lower.includes(t),
|
|
165
|
+
);
|
|
166
|
+
|
|
147
167
|
if (matchingTriggers.length === 0) {
|
|
148
168
|
return { triggered: false, reason: "No import error triggers found" };
|
|
149
169
|
}
|
|
150
170
|
|
|
151
|
-
return {
|
|
171
|
+
return {
|
|
172
|
+
triggered: true,
|
|
173
|
+
reason: `Matched triggers: ${matchingTriggers.join(", ")}`,
|
|
174
|
+
};
|
|
152
175
|
}
|
|
153
176
|
|
|
154
177
|
/**
|
|
@@ -156,7 +179,10 @@ function shouldInjectImportErrorRule(text: string): { triggered: boolean; reason
|
|
|
156
179
|
*/
|
|
157
180
|
export function registerFileCopyHelper(pi: ExtensionAPI): void {
|
|
158
181
|
// Clear debug log on startup
|
|
159
|
-
fs.writeFileSync(
|
|
182
|
+
fs.writeFileSync(
|
|
183
|
+
DEBUG_LOG,
|
|
184
|
+
`[${new Date().toISOString()}] === DEBUG SESSION STARTED ===\n`,
|
|
185
|
+
);
|
|
160
186
|
|
|
161
187
|
pi.on("input", (event: InputEvent): InputEventResult | undefined => {
|
|
162
188
|
// DEBUG: Log what we receive
|
|
@@ -190,9 +216,15 @@ export function registerFileCopyHelper(pi: ExtensionAPI): void {
|
|
|
190
216
|
debugLog("COPY_RULE_CHECK", {
|
|
191
217
|
triggered: copyCheck.triggered,
|
|
192
218
|
reason: copyCheck.reason,
|
|
193
|
-
matchingKeywords: COPY_KEYWORDS.filter(k =>
|
|
194
|
-
|
|
195
|
-
|
|
219
|
+
matchingKeywords: COPY_KEYWORDS.filter((k) =>
|
|
220
|
+
text.toLowerCase().includes(k),
|
|
221
|
+
),
|
|
222
|
+
matchingDest: COPY_DEST_CONTEXT.filter((ctx) =>
|
|
223
|
+
text.toLowerCase().includes(ctx),
|
|
224
|
+
),
|
|
225
|
+
matchingSource: COPY_SOURCE_CONTEXT.filter((ctx) =>
|
|
226
|
+
text.toLowerCase().includes(ctx),
|
|
227
|
+
),
|
|
196
228
|
});
|
|
197
229
|
|
|
198
230
|
if (copyCheck.triggered) {
|
|
@@ -208,11 +240,16 @@ export function registerFileCopyHelper(pi: ExtensionAPI): void {
|
|
|
208
240
|
debugLog("IMPORT_ERROR_CHECK", {
|
|
209
241
|
triggered: importCheck.triggered,
|
|
210
242
|
reason: importCheck.reason,
|
|
211
|
-
matchingTriggers: IMPORT_ERROR_TRIGGERS.filter(t =>
|
|
243
|
+
matchingTriggers: IMPORT_ERROR_TRIGGERS.filter((t) =>
|
|
244
|
+
text.toLowerCase().includes(t),
|
|
245
|
+
),
|
|
212
246
|
});
|
|
213
247
|
|
|
214
248
|
if (importCheck.triggered) {
|
|
215
|
-
debugLog("INJECT", {
|
|
249
|
+
debugLog("INJECT", {
|
|
250
|
+
rule: "IMPORT_ERROR_RULE",
|
|
251
|
+
reason: importCheck.reason,
|
|
252
|
+
});
|
|
216
253
|
return {
|
|
217
254
|
action: "transform",
|
|
218
255
|
text: text + IMPORT_ERROR_RULE,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Injects "use cp instead of writing from scratch" reminder when user
|
|
5
5
|
* asks to mimic, copy, clone, or replicate files/folders between locations.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* DEBUG: All events and rule evaluations logged to /tmp/file-copy-helper-debug.log
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -113,43 +113,61 @@ sudo cp /source/path/components/notifications-provider.tsx /dest/path/components
|
|
|
113
113
|
* Check if text contains copy-related keywords
|
|
114
114
|
* Requires: explicit intent (mimic/copy/clone/replicate) AND destination context
|
|
115
115
|
*/
|
|
116
|
-
function shouldInjectCopyRule(text: string): {
|
|
116
|
+
function shouldInjectCopyRule(text: string): {
|
|
117
|
+
triggered: boolean;
|
|
118
|
+
reason: string;
|
|
119
|
+
} {
|
|
117
120
|
const lower = text.toLowerCase();
|
|
118
121
|
|
|
119
122
|
// Must have explicit mimic/copy/clone/replicate intent
|
|
120
123
|
const hasIntent = COPY_KEYWORDS.some((keyword) => lower.includes(keyword));
|
|
121
124
|
if (!hasIntent) {
|
|
122
|
-
return {
|
|
125
|
+
return {
|
|
126
|
+
triggered: false,
|
|
127
|
+
reason: `No intent keyword found. Keywords: ${COPY_KEYWORDS.join(", ")}`,
|
|
128
|
+
};
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
// Must have destination context (avoids false positives on "copy this code" etc)
|
|
126
132
|
const hasDest = COPY_DEST_CONTEXT.some((ctx) => lower.includes(ctx));
|
|
127
133
|
if (!hasDest) {
|
|
128
|
-
return {
|
|
134
|
+
return {
|
|
135
|
+
triggered: false,
|
|
136
|
+
reason: `No destination context found. Dest contexts: ${COPY_DEST_CONTEXT.join(", ")}`,
|
|
137
|
+
};
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
// Should have source context for full mimic behavior
|
|
132
141
|
const hasSource = COPY_SOURCE_CONTEXT.some((ctx) => lower.includes(ctx));
|
|
133
142
|
if (!hasSource) {
|
|
134
|
-
return {
|
|
143
|
+
return {
|
|
144
|
+
triggered: false,
|
|
145
|
+
reason: `No source context found. Source contexts: ${COPY_SOURCE_CONTEXT.join(", ")}`,
|
|
146
|
+
};
|
|
135
147
|
}
|
|
136
148
|
|
|
137
|
-
return {
|
|
149
|
+
return {
|
|
150
|
+
triggered: true,
|
|
151
|
+
reason: `All conditions met: hasIntent=${hasIntent}, hasDest=${hasDest}, hasSource=${hasSource}`,
|
|
152
|
+
};
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
/**
|
|
141
156
|
* Check if text contains import error triggers
|
|
142
157
|
* Requires BOTH: import error context + copy/deploy context
|
|
143
158
|
*/
|
|
144
|
-
function shouldInjectImportErrorRule(text: string): {
|
|
159
|
+
function shouldInjectImportErrorRule(text: string): {
|
|
160
|
+
triggered: boolean;
|
|
161
|
+
reason: string;
|
|
162
|
+
} {
|
|
145
163
|
const lower = text.toLowerCase();
|
|
146
|
-
|
|
164
|
+
|
|
147
165
|
// Must have import error context
|
|
148
166
|
const hasImportError = IMPORT_ERROR_TRIGGERS.some((t) => lower.includes(t));
|
|
149
167
|
if (!hasImportError) {
|
|
150
168
|
return { triggered: false, reason: "No import error triggers found" };
|
|
151
169
|
}
|
|
152
|
-
|
|
170
|
+
|
|
153
171
|
// Must have copy/deploy context
|
|
154
172
|
const hasCopyContext = COPY_CONTEXT.some((ctx) => lower.includes(ctx));
|
|
155
173
|
if (!hasCopyContext) {
|
|
@@ -164,7 +182,10 @@ function shouldInjectImportErrorRule(text: string): { triggered: boolean; reason
|
|
|
164
182
|
*/
|
|
165
183
|
export function registerFileCopyHelper(pi: ExtensionAPI): void {
|
|
166
184
|
// Clear debug log on startup
|
|
167
|
-
fs.writeFileSync(
|
|
185
|
+
fs.writeFileSync(
|
|
186
|
+
DEBUG_LOG,
|
|
187
|
+
`[${new Date().toISOString()}] === DEBUG SESSION STARTED ===\n`,
|
|
188
|
+
);
|
|
168
189
|
|
|
169
190
|
pi.on("input", (event: InputEvent): InputEventResult | undefined => {
|
|
170
191
|
// DEBUG: Log what we receive
|
|
@@ -198,9 +219,15 @@ export function registerFileCopyHelper(pi: ExtensionAPI): void {
|
|
|
198
219
|
debugLog("COPY_RULE_CHECK", {
|
|
199
220
|
triggered: copyCheck.triggered,
|
|
200
221
|
reason: copyCheck.reason,
|
|
201
|
-
matchingKeywords: COPY_KEYWORDS.filter(k =>
|
|
202
|
-
|
|
203
|
-
|
|
222
|
+
matchingKeywords: COPY_KEYWORDS.filter((k) =>
|
|
223
|
+
text.toLowerCase().includes(k),
|
|
224
|
+
),
|
|
225
|
+
matchingDest: COPY_DEST_CONTEXT.filter((ctx) =>
|
|
226
|
+
text.toLowerCase().includes(ctx),
|
|
227
|
+
),
|
|
228
|
+
matchingSource: COPY_SOURCE_CONTEXT.filter((ctx) =>
|
|
229
|
+
text.toLowerCase().includes(ctx),
|
|
230
|
+
),
|
|
204
231
|
});
|
|
205
232
|
|
|
206
233
|
if (copyCheck.triggered) {
|
|
@@ -216,12 +243,17 @@ export function registerFileCopyHelper(pi: ExtensionAPI): void {
|
|
|
216
243
|
debugLog("IMPORT_ERROR_CHECK", {
|
|
217
244
|
triggered: importCheck.triggered,
|
|
218
245
|
reason: importCheck.reason,
|
|
219
|
-
hasImportError: IMPORT_ERROR_TRIGGERS.some(t =>
|
|
220
|
-
|
|
246
|
+
hasImportError: IMPORT_ERROR_TRIGGERS.some((t) =>
|
|
247
|
+
text.toLowerCase().includes(t),
|
|
248
|
+
),
|
|
249
|
+
hasCopyContext: COPY_CONTEXT.some((ctx) => text.toLowerCase().includes(ctx)),
|
|
221
250
|
});
|
|
222
251
|
|
|
223
252
|
if (importCheck.triggered) {
|
|
224
|
-
debugLog("INJECT", {
|
|
253
|
+
debugLog("INJECT", {
|
|
254
|
+
rule: "IMPORT_ERROR_RULE",
|
|
255
|
+
reason: importCheck.reason,
|
|
256
|
+
});
|
|
225
257
|
return {
|
|
226
258
|
action: "transform",
|
|
227
259
|
text: text + IMPORT_ERROR_RULE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/provider-router",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.30",
|
|
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",
|