pi-harness-runtime 1.1.446 → 1.1.447
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/loop-review-agent.ts +10 -7
- package/package.json +1 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/package.json +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/evaluation-engine/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/file-copy-helper/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/jev-judge/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/logging/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/notification/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/prompt-compiler/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/relay/package.json +1 -1
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skills/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/package.json +1 -1
- package/packages/tooling-preference/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/two-phase-review/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/package.json +1 -1
- package/packages/write-review/package.json +1 -1
- package/scripts/copy-plugins.js +12 -2
- package/scripts/sync-skills.ts +19 -4
- package/scripts/sync-to-qdrant.ts +39 -23
|
@@ -86,8 +86,9 @@ async function main(): Promise<void> {
|
|
|
86
86
|
agentId: AGENT_ID,
|
|
87
87
|
taskId: action.taskId,
|
|
88
88
|
status: "success",
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
summary: verdict,
|
|
90
|
+
createdAt: new Date().toISOString(),
|
|
91
|
+
});
|
|
91
92
|
blackboard.updateAgentStatus(AGENT_ID, "idle");
|
|
92
93
|
|
|
93
94
|
// Decide next action based on verdict
|
|
@@ -117,11 +118,13 @@ async function main(): Promise<void> {
|
|
|
117
118
|
);
|
|
118
119
|
console.log(`[${AGENT_ID}] CHANGES — nextAction: code ${nextWrite}`);
|
|
119
120
|
} else {
|
|
120
|
-
blackboard.setNextAction(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
blackboard.setNextAction(
|
|
122
|
+
encodeNextAction({
|
|
123
|
+
taskId: "report",
|
|
124
|
+
agentType: "review",
|
|
125
|
+
iteration: 0,
|
|
126
|
+
}),
|
|
127
|
+
);
|
|
125
128
|
console.log(`[${AGENT_ID}] CHANGES — nextAction: report`);
|
|
126
129
|
}
|
|
127
130
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/two-phase-review",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.447",
|
|
4
4
|
"description": "pi-harness-runtime — two-phase implementation and review workflow (queue review signals, gate the phase, scope the diff)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/scripts/copy-plugins.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import { mkdirSync, existsSync, readdirSync, cpSync } from "node:fs";
|
|
13
13
|
import { join, dirname } from "node:path";
|
|
14
|
-
import { fileURLToPath } from "node:url";
|
|
14
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15
15
|
|
|
16
16
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
17
|
const __dirname = dirname(__filename);
|
|
@@ -57,4 +57,14 @@ function main() {
|
|
|
57
57
|
console.log("[copy-plugins] Done!");
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* The program runs only when the file is the entry point.
|
|
62
|
+
*
|
|
63
|
+
* The script is published in the npm package and is the postinstall hook,
|
|
64
|
+
* so a consumer may import it. An import must not copy files into the
|
|
65
|
+
* home directory of the machine that imported it.
|
|
66
|
+
*/
|
|
67
|
+
const entry = process.argv[1];
|
|
68
|
+
if (entry && pathToFileURL(entry).href === import.meta.url) {
|
|
69
|
+
main();
|
|
70
|
+
}
|
package/scripts/sync-skills.ts
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { existsSync, mkdirSync, readdirSync, statSync, copyFileSync, rmSync } from "node:fs";
|
|
14
|
-
import { join, basename
|
|
14
|
+
import { join, basename } from "node:path";
|
|
15
15
|
import { homedir } from "node:os";
|
|
16
|
+
import { pathToFileURL } from "node:url";
|
|
16
17
|
|
|
17
18
|
// Default paths
|
|
18
19
|
const DEFAULT_TARGET = join(homedir(), ".pi-harness-runtime", "skills");
|
|
@@ -270,6 +271,20 @@ function syncSkills(options: SyncOptions): void {
|
|
|
270
271
|
console.log(` 3. List skills: /skill list`);
|
|
271
272
|
}
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
/**
|
|
275
|
+
* The program runs only when the file is the entry point.
|
|
276
|
+
*
|
|
277
|
+
* The script is published in the npm package, so a consumer may import it.
|
|
278
|
+
* An import must not sync skills, and it must not end the importing
|
|
279
|
+
* process - the same rule the harness programs and the command modules
|
|
280
|
+
* follow.
|
|
281
|
+
*/
|
|
282
|
+
function main(): void {
|
|
283
|
+
const options = parseArgs();
|
|
284
|
+
syncSkills(options);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
const entry = process.argv[1];
|
|
288
|
+
if (entry && pathToFileURL(entry).href === import.meta.url) {
|
|
289
|
+
main();
|
|
290
|
+
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
15
15
|
import { join } from "node:path";
|
|
16
|
+
import { pathToFileURL } from "node:url";
|
|
16
17
|
import { QdrantClient } from "@qdrant/js-client-rest";
|
|
17
18
|
// The runtime and this script must write into the SAME collection with the
|
|
18
19
|
// SAME vectors: a collection holds vectors of exactly one size, and a vector
|
|
@@ -343,10 +344,19 @@ async function search(query: string): Promise<void> {
|
|
|
343
344
|
// Main
|
|
344
345
|
// =============================================================================
|
|
345
346
|
|
|
346
|
-
|
|
347
|
+
/**
|
|
348
|
+
* The program runs only when the file is the entry point.
|
|
349
|
+
*
|
|
350
|
+
* The script is published in the npm package, so a consumer may import it.
|
|
351
|
+
* An import must not talk to Qdrant, and it must not end the importing
|
|
352
|
+
* process - the same rule the harness programs and the command modules
|
|
353
|
+
* follow.
|
|
354
|
+
*/
|
|
355
|
+
async function main(): Promise<void> {
|
|
356
|
+
const args = process.argv.slice(2);
|
|
347
357
|
|
|
348
|
-
if (args.includes("--help")) {
|
|
349
|
-
|
|
358
|
+
if (args.includes("--help")) {
|
|
359
|
+
console.log(`
|
|
350
360
|
Sync Skills to Qdrant (Sanitized)
|
|
351
361
|
──────────────────────────────────
|
|
352
362
|
Upload skills to Qdrant for team sharing.
|
|
@@ -373,28 +383,34 @@ Environment:
|
|
|
373
383
|
Or create file:
|
|
374
384
|
~/.pi-harness-runtime/keys/qdrant-api-key.txt
|
|
375
385
|
`);
|
|
376
|
-
|
|
377
|
-
}
|
|
386
|
+
process.exit(0);
|
|
387
|
+
}
|
|
378
388
|
|
|
379
|
-
if (args.includes("--list")) {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
389
|
+
if (args.includes("--list")) {
|
|
390
|
+
await listSkills();
|
|
391
|
+
process.exit(0);
|
|
392
|
+
}
|
|
383
393
|
|
|
384
|
-
const searchIdx = args.indexOf("--search");
|
|
385
|
-
if (searchIdx !== -1 && args[searchIdx + 1]) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}
|
|
394
|
+
const searchIdx = args.indexOf("--search");
|
|
395
|
+
if (searchIdx !== -1 && args[searchIdx + 1]) {
|
|
396
|
+
await search(args[searchIdx + 1]);
|
|
397
|
+
process.exit(0);
|
|
398
|
+
}
|
|
389
399
|
|
|
390
|
-
const fromIdx = args.indexOf("--from");
|
|
391
|
-
if (fromIdx === -1 || !args[fromIdx + 1]) {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
400
|
+
const fromIdx = args.indexOf("--from");
|
|
401
|
+
if (fromIdx === -1 || !args[fromIdx + 1]) {
|
|
402
|
+
console.error("Error: --from <directory> is required");
|
|
403
|
+
console.error("Use --help for usage information.");
|
|
404
|
+
process.exit(1);
|
|
405
|
+
}
|
|
396
406
|
|
|
397
|
-
const sourceDir = args[fromIdx + 1];
|
|
398
|
-
const clear = args.includes("--clear");
|
|
407
|
+
const sourceDir = args[fromIdx + 1];
|
|
408
|
+
const clear = args.includes("--clear");
|
|
399
409
|
|
|
400
|
-
await syncToQdrant(sourceDir, clear);
|
|
410
|
+
await syncToQdrant(sourceDir, clear);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const entry = process.argv[1];
|
|
414
|
+
if (entry && pathToFileURL(entry).href === import.meta.url) {
|
|
415
|
+
await main();
|
|
416
|
+
}
|