pi-harness-runtime 1.1.438 → 1.1.440
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/e2e/auto-test-loop.ts +6 -2
- package/harness/e2e/tools-detector.test.ts +0 -1
- package/harness/index.ts +2 -1
- package/harness/langchain/scoreboard.test.ts +44 -22
- package/harness/master-planner.ts +1 -1
- package/harness/output-limit-handler.ts +1 -1
- package/harness/project-detector/detector.ts +2 -4
- package/harness/task-graph.ts +460 -113
- package/index.ts +14 -7
- 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/dist/types.d.ts +9 -2
- package/packages/clipboard-plugin/dist/types.d.ts.map +1 -1
- package/packages/clipboard-plugin/package.json +1 -1
- package/packages/clipboard-plugin/src/types.ts +9 -2
- 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/connection-runtime/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/contracts/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/durable-review/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-sink/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/logging/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/permission-mode/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/relay/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/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/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/voice-api/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/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/gist-auth.ts +3 -3
- package/scripts/release-all.ts +5 -3
- package/scripts/tsconfig.json +12 -0
- package/scripts/typecheck-packages.mjs +13 -12
- package/scripts/verify-package-contents.ts +13 -1
- package/scripts/voice-api-example.ts +14 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/provider-router",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.440",
|
|
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/two-phase-review",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.440",
|
|
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/gist-auth.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Prompts for GitHub PAT and creates a secret Gist for clipboard sync.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { createInterface } from "node:readline/promises";
|
|
11
11
|
import {
|
|
12
12
|
createGist,
|
|
13
13
|
isConfigured,
|
|
@@ -19,7 +19,7 @@ async function main() {
|
|
|
19
19
|
if (isConfigured()) {
|
|
20
20
|
console.log("Gist clipboard sync is already configured.");
|
|
21
21
|
console.log("Run with --reset to reconfigure.\n");
|
|
22
|
-
const rl =
|
|
22
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
23
23
|
const answer = await rl.question("Reset configuration? (y/N): ");
|
|
24
24
|
rl.close();
|
|
25
25
|
if (answer.toLowerCase() !== "y") {
|
|
@@ -34,7 +34,7 @@ async function main() {
|
|
|
34
34
|
console.log("3. Select scopes: 'gist' (read and write gists)");
|
|
35
35
|
console.log("4. Copy the token\n");
|
|
36
36
|
|
|
37
|
-
const rl =
|
|
37
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
38
38
|
const token = await rl.question("GitHub Personal Access Token: ");
|
|
39
39
|
rl.close();
|
|
40
40
|
|
package/scripts/release-all.ts
CHANGED
|
@@ -84,9 +84,11 @@ async function setWorkspaceVersion(
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
pkg.version = version;
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
|
|
87
|
+
// The parse above already collapsed any duplicate keys (a duplicate
|
|
88
|
+
// "version" key is valid JSON but makes bun install warn or fail), so the
|
|
89
|
+
// plain serialization is enough. It cannot throw: the value came from
|
|
90
|
+
// JSON.parse and holds nothing but JSON types.
|
|
91
|
+
await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
90
92
|
const name =
|
|
91
93
|
typeof pkg.name === "string"
|
|
92
94
|
? `${pkg.name}@${version}`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"types": ["node", "bun-types"],
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"allowImportingTsExtensions": true
|
|
9
|
+
},
|
|
10
|
+
"include": ["**/*.ts", "**/*.d.mts"],
|
|
11
|
+
"exclude": ["release/**"]
|
|
12
|
+
}
|
|
@@ -26,19 +26,26 @@ import { join, relative } from "node:path";
|
|
|
26
26
|
* Maximum tolerated number of type errors per project. A project that is
|
|
27
27
|
* not listed must type check cleanly.
|
|
28
28
|
*/
|
|
29
|
+
// Every project type checks cleanly. A non-zero entry is a debt that hides
|
|
30
|
+
// a real error, so the baseline stays at zero until a project genuinely
|
|
31
|
+
// compiles.
|
|
29
32
|
const BASELINES = new Map([
|
|
30
33
|
["a2a-adapter", 0],
|
|
31
|
-
["clipboard-plugin",
|
|
34
|
+
["clipboard-plugin", 0],
|
|
32
35
|
["provider-router", 0],
|
|
33
36
|
["providers", 0],
|
|
34
37
|
["quota-manager", 0],
|
|
35
38
|
["runtime", 0],
|
|
36
|
-
["voice-api",
|
|
39
|
+
["voice-api", 0],
|
|
37
40
|
["worktree", 0],
|
|
38
|
-
["harness",
|
|
39
|
-
|
|
41
|
+
["harness", 0],
|
|
42
|
+
// The scripts of the repository type check cleanly. The project
|
|
43
|
+
// lives in `scripts/tsconfig.json`, so the language server reads the
|
|
44
|
+
// same configuration as the compiler and no longer answers with a
|
|
45
|
+
// project that has no node types.
|
|
46
|
+
["scripts", 0],
|
|
40
47
|
["scripts/release", 0],
|
|
41
|
-
["root",
|
|
48
|
+
["root", 0],
|
|
42
49
|
["new-modules", 0],
|
|
43
50
|
]);
|
|
44
51
|
|
|
@@ -68,16 +75,11 @@ for (const name of readdirSync(packagesDir).sort()) {
|
|
|
68
75
|
const project = join(packagesDir, name, "tsconfig.json");
|
|
69
76
|
if (existsSync(project)) projects.push(relative(root, project));
|
|
70
77
|
}
|
|
71
|
-
for (const extra of ["harness", "scripts/release"]) {
|
|
78
|
+
for (const extra of ["harness", "scripts", "scripts/release"]) {
|
|
72
79
|
if (existsSync(join(root, extra, "tsconfig.json"))) {
|
|
73
80
|
projects.push(join(extra, "tsconfig.json"));
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
|
-
// The scripts of the repository are their own project, with a config
|
|
77
|
-
// of their own at the root of the repository.
|
|
78
|
-
if (existsSync(join(root, "tsconfig.scripts.json"))) {
|
|
79
|
-
projects.push("tsconfig.scripts.json");
|
|
80
|
-
}
|
|
81
83
|
// The root extension (index.ts) has no project of its own - it is the entry
|
|
82
84
|
// point of the extension and was never type checked.
|
|
83
85
|
if (existsSync(join(root, "tsconfig.root.json"))) {
|
|
@@ -98,7 +100,6 @@ function ownerOf(projectPath) {
|
|
|
98
100
|
const normalized = projectPath.split("\\").join("/");
|
|
99
101
|
if (normalized === "tsconfig.root.json") return "root";
|
|
100
102
|
if (normalized === "tsconfig.new-modules.json") return "new-modules";
|
|
101
|
-
if (normalized === "tsconfig.scripts.json") return "scripts";
|
|
102
103
|
if (normalized.startsWith("packages/")) {
|
|
103
104
|
return normalized.split("/")[1];
|
|
104
105
|
}
|
|
@@ -269,11 +269,17 @@ function checkSensitiveContent(files: string[]): void {
|
|
|
269
269
|
);
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
+
// A file that cannot be read is a file that was not checked. The
|
|
273
|
+
// check fails closed for the same reason it fails closed on a
|
|
274
|
+
// missing term list: "nothing was found" must not mean "nothing
|
|
275
|
+
// was looked at".
|
|
276
|
+
let unreadable = 0;
|
|
272
277
|
for (const file of files) {
|
|
273
278
|
let content: string;
|
|
274
279
|
try {
|
|
275
280
|
content = readFileSync(join(ROOT, file), "utf8");
|
|
276
281
|
} catch {
|
|
282
|
+
unreadable++;
|
|
277
283
|
continue;
|
|
278
284
|
}
|
|
279
285
|
for (const found of scanText(content, file, terms)) {
|
|
@@ -284,8 +290,14 @@ function checkSensitiveContent(files: string[]): void {
|
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
292
|
console.log(
|
|
287
|
-
`[verify-package-contents] the sensitive content scan looked at ${files.length} published file(s) with the list of ${source}`,
|
|
293
|
+
`[verify-package-contents] the sensitive content scan looked at ${files.length - unreadable} published file(s) with the list of ${source}`,
|
|
288
294
|
);
|
|
295
|
+
if (unreadable > 0) {
|
|
296
|
+
problems.push({
|
|
297
|
+
kind: "sensitive-content",
|
|
298
|
+
detail: `${unreadable} published file(s) could not be read, so the sensitive content scan did not cover them`,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
289
301
|
}
|
|
290
302
|
|
|
291
303
|
/**
|
|
@@ -48,18 +48,17 @@ async function main() {
|
|
|
48
48
|
const transcriber = new VoiceTranscriber({ openaiApiKey });
|
|
49
49
|
console.log("✓ VoiceTranscriber created");
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
console.log(`✓ Providers: ${transcriber.getProviders().join(", ")}`);
|
|
57
|
-
console.log(`✓ Default: ${transcriber.getDefaultProvider()}`);
|
|
51
|
+
// The transcriber talks to the OpenAI Whisper API. The key was
|
|
52
|
+
// checked above, so it is configured; the model defaults to whisper-1.
|
|
53
|
+
console.log("✓ Provider: openai (whisper-1)");
|
|
58
54
|
|
|
59
55
|
// If Telegram token provided, create handler
|
|
60
56
|
if (telegramBotToken) {
|
|
61
57
|
console.log("✓ Telegram bot token loaded");
|
|
62
58
|
|
|
59
|
+
// The handler is what the webhook server calls. The demo does not
|
|
60
|
+
// start that server, so the answer below comes from the handler
|
|
61
|
+
// itself and not from Telegram.
|
|
63
62
|
const handler = new TelegramVoiceHandler({
|
|
64
63
|
botToken: telegramBotToken,
|
|
65
64
|
transcriber,
|
|
@@ -84,6 +83,12 @@ async function main() {
|
|
|
84
83
|
console.log("✓ TelegramVoiceHandler created");
|
|
85
84
|
console.log("\nListening for Telegram voice messages...");
|
|
86
85
|
console.log("(This is a demo - actual webhook server not started)");
|
|
86
|
+
|
|
87
|
+
// The webhook server calls this for every update. The demo sends an
|
|
88
|
+
// update that carries no voice message, so the answer shows the
|
|
89
|
+
// shape of the reply without a call to Telegram.
|
|
90
|
+
const answer = await handler.handleUpdate({ update_id: 0 });
|
|
91
|
+
console.log(`✓ The handler answers: ${JSON.stringify(answer)}`);
|
|
87
92
|
} else {
|
|
88
93
|
console.log("⚠ Telegram bot token not found");
|
|
89
94
|
console.log(" Create ~/.pi-harness-runtime/keys/telegram-bot-token.txt for Telegram integration");
|
|
@@ -94,12 +99,9 @@ async function main() {
|
|
|
94
99
|
console.log("Demo: Transcribing test audio file...");
|
|
95
100
|
|
|
96
101
|
// Note: In production, this would be triggered by actual Telegram/LINE webhooks
|
|
97
|
-
// For testing, you can
|
|
102
|
+
// For testing, you can transcribe an audio file yourself:
|
|
98
103
|
//
|
|
99
|
-
// const result = await transcriber.transcribe(
|
|
100
|
-
// audioUrl: "https://example.com/audio.ogg",
|
|
101
|
-
// language: "en",
|
|
102
|
-
// });
|
|
104
|
+
// const result = await transcriber.transcribe(audioBytes);
|
|
103
105
|
// console.log("Transcribed:", result.text);
|
|
104
106
|
|
|
105
107
|
console.log("\n" + "=".repeat(60));
|