pi-harness-runtime 1.1.425 → 1.1.427

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.
Files changed (167) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +1 -1
  3. package/harness/e2e/api-key-resolver.ts +3 -2
  4. package/harness/notification-center.ts +2 -1
  5. package/harness/skills-plan/2026-07-12-herdr-moo-skills-adaptation-plan.md +3 -3
  6. package/harness/skills-plan/2026-07-12-minimax-prompt-step1-sync.md +3 -3
  7. package/harness/skills-plan/2026-07-12-public-skill-export-and-sync-design.md +4 -4
  8. package/harness/ssh-detach-interceptor.test.ts +3 -3
  9. package/harness/ssh-hang-recovery.test.ts +86 -0
  10. package/harness/ssh-hang-recovery.ts +48 -14
  11. package/index.ts +9 -9
  12. package/package.json +1 -1
  13. package/packages/a2a-adapter/package.json +1 -1
  14. package/packages/agent-policy/package.json +1 -1
  15. package/packages/architecture-generator/package.json +1 -1
  16. package/packages/auth/package.json +1 -1
  17. package/packages/autonomous-refactor/package.json +1 -1
  18. package/packages/autonomous-runtime/package.json +1 -1
  19. package/packages/cache-strategy/package.json +1 -1
  20. package/packages/capability-registry/package.json +1 -1
  21. package/packages/checkpoint/package.json +1 -1
  22. package/packages/cli-plugin-sdk/package.json +1 -1
  23. package/packages/clipboard/package.json +1 -1
  24. package/packages/clipboard-plugin/package.json +1 -1
  25. package/packages/code-generation/package.json +1 -1
  26. package/packages/code-review/package.json +1 -1
  27. package/packages/codex-adapter/package.json +1 -1
  28. package/packages/codex-watcher/package.json +1 -1
  29. package/packages/config-capture/package.json +1 -1
  30. package/packages/connection-runtime/package.json +1 -1
  31. package/packages/context-compiler/package.json +1 -1
  32. package/packages/context-discovery/package.json +1 -1
  33. package/packages/context-manager/package.json +1 -1
  34. package/packages/contracts/dist/delegation-store.js +2 -1
  35. package/packages/contracts/dist/workspace-env-format.d.ts +2 -2
  36. package/packages/contracts/dist/workspace-env-format.js +2 -2
  37. package/packages/contracts/dist/workspace-env.js +2 -1
  38. package/packages/contracts/package.json +1 -1
  39. package/packages/contracts/src/delegation-store.ts +2 -1
  40. package/packages/contracts/src/workspace-env-format.ts +2 -2
  41. package/packages/contracts/src/workspace-env.ts +2 -1
  42. package/packages/contracts/test/workspace-env.test.ts +6 -6
  43. package/packages/cookie-sanitizer/package.json +1 -1
  44. package/packages/cost-optimizer/package.json +1 -1
  45. package/packages/dependency-analyzer/package.json +1 -1
  46. package/packages/django-plugin/package.json +1 -1
  47. package/packages/doc-generator/package.json +1 -1
  48. package/packages/durable-review/package.json +1 -1
  49. package/packages/e2e-tester/README.md +1 -1
  50. package/packages/e2e-tester/package.json +1 -1
  51. package/packages/evaluation-engine/package.json +1 -1
  52. package/packages/evaluation-runner/package.json +1 -1
  53. package/packages/event-bus/package.json +1 -1
  54. package/packages/event-sink/package.json +1 -1
  55. package/packages/event-store/package.json +1 -1
  56. package/packages/experience-replay/package.json +1 -1
  57. package/packages/feedback-collector/package.json +1 -1
  58. package/packages/file-copy-helper/package.json +1 -1
  59. package/packages/framework-detector/package.json +1 -1
  60. package/packages/framework-plugin-sdk/package.json +1 -1
  61. package/packages/frappe-plugin/package.json +1 -1
  62. package/packages/generic-web-plugin/package.json +1 -1
  63. package/packages/health-monitor/package.json +1 -1
  64. package/packages/intent-analyzer/package.json +1 -1
  65. package/packages/jev-judge/dist/delegation-harness.d.ts.map +1 -1
  66. package/packages/jev-judge/dist/delegation-harness.js +2 -1
  67. package/packages/jev-judge/dist/delegation-harness.js.map +1 -1
  68. package/packages/jev-judge/dist/index.d.ts.map +1 -1
  69. package/packages/jev-judge/dist/index.js +2 -1
  70. package/packages/jev-judge/dist/index.js.map +1 -1
  71. package/packages/jev-judge/package.json +1 -1
  72. package/packages/jev-judge/src/delegation-harness.ts +2 -1
  73. package/packages/jev-judge/src/index.ts +2 -1
  74. package/packages/knowledge-graph/package.json +1 -1
  75. package/packages/knowledge-retrieval/package.json +1 -1
  76. package/packages/laravel-plugin/package.json +1 -1
  77. package/packages/learning-engine/package.json +1 -1
  78. package/packages/logging/package.json +1 -1
  79. package/packages/logging/test/classification.test.ts +2 -2
  80. package/packages/mcp-adapter/package.json +1 -1
  81. package/packages/memory-engine/package.json +1 -1
  82. package/packages/milestone-manager/package.json +1 -1
  83. package/packages/model-registry/package.json +1 -1
  84. package/packages/nextjs-plugin/package.json +1 -1
  85. package/packages/notification/dist/adapters/telegram-adapter.js +2 -2
  86. package/packages/notification/dist/adapters/telegram-adapter.js.map +1 -1
  87. package/packages/notification/dist/notification-center.d.ts.map +1 -1
  88. package/packages/notification/dist/notification-center.js +2 -1
  89. package/packages/notification/dist/notification-center.js.map +1 -1
  90. package/packages/notification/package.json +1 -1
  91. package/packages/notification/src/adapters/telegram-adapter.ts +2 -2
  92. package/packages/notification/src/notification-center.ts +2 -1
  93. package/packages/observability/package.json +1 -1
  94. package/packages/okf-indexer/package.json +1 -1
  95. package/packages/paperclip-integration/dist/index.d.ts.map +1 -1
  96. package/packages/paperclip-integration/dist/index.js +3 -2
  97. package/packages/paperclip-integration/dist/index.js.map +1 -1
  98. package/packages/paperclip-integration/package.json +1 -1
  99. package/packages/paperclip-integration/src/index.ts +4 -2
  100. package/packages/performance-optimizer/package.json +1 -1
  101. package/packages/permission-mode/package.json +1 -1
  102. package/packages/privilege-broker/package.json +1 -1
  103. package/packages/project-analyzer/package.json +1 -1
  104. package/packages/project-bootstrap/package.json +1 -1
  105. package/packages/projection-engine/package.json +1 -1
  106. package/packages/prompt-compiler/package.json +1 -1
  107. package/packages/prompt-versioning/package.json +1 -1
  108. package/packages/provider-adapter-sdk/package.json +1 -1
  109. package/packages/provider-router/package.json +1 -1
  110. package/packages/provider-selector/package.json +1 -1
  111. package/packages/providers/package.json +1 -1
  112. package/packages/qdrant-skills/package.json +1 -1
  113. package/packages/quota-manager/package.json +1 -1
  114. package/packages/rate-limiter/package.json +1 -1
  115. package/packages/react-vite-plugin/package.json +1 -1
  116. package/packages/relay/package.json +1 -1
  117. package/packages/relay/test/relay-e2e.test.ts +4 -4
  118. package/packages/release-manager/package.json +1 -1
  119. package/packages/requirement-compiler/package.json +1 -1
  120. package/packages/runtime/package.json +1 -1
  121. package/packages/scheduler/package.json +1 -1
  122. package/packages/scheduler-adapter/package.json +1 -1
  123. package/packages/session/package.json +1 -1
  124. package/packages/session-api/package.json +1 -1
  125. package/packages/session-export/package.json +1 -1
  126. package/packages/shared-context/package.json +1 -1
  127. package/packages/skill-mcp-client/package.json +1 -1
  128. package/packages/skill-registry/package.json +1 -1
  129. package/packages/skills/dist/loader.d.ts.map +1 -1
  130. package/packages/skills/dist/loader.js +2 -1
  131. package/packages/skills/dist/loader.js.map +1 -1
  132. package/packages/skills/package.json +1 -1
  133. package/packages/skills/src/loader.ts +2 -1
  134. package/packages/sprint-planner/package.json +1 -1
  135. package/packages/subscription-engine/package.json +1 -1
  136. package/packages/task-compiler/package.json +1 -1
  137. package/packages/telegram/package.json +1 -1
  138. package/packages/tencentdb-memory/package.json +1 -1
  139. package/packages/tencentdb-sync/package.json +1 -1
  140. package/packages/test-data-generator/package.json +1 -1
  141. package/packages/test-generator/package.json +1 -1
  142. package/packages/todo-bd-sync/package.json +1 -1
  143. package/packages/token-estimation/package.json +1 -1
  144. package/packages/token-optimizer/package.json +1 -1
  145. package/packages/tooling-preference/package.json +1 -1
  146. package/packages/trajectory/package.json +1 -1
  147. package/packages/tui/dist/harness-footer.d.ts +2 -2
  148. package/packages/tui/dist/harness-footer.js +2 -2
  149. package/packages/tui/package.json +1 -1
  150. package/packages/tui/src/harness-footer.ts +2 -2
  151. package/packages/tui/test/harness-footer.test.ts +10 -10
  152. package/packages/two-phase-review/package.json +1 -1
  153. package/packages/types/package.json +1 -1
  154. package/packages/voice-api/package.json +1 -1
  155. package/packages/webmcp-tester/package.json +1 -1
  156. package/packages/wiki/package.json +1 -1
  157. package/packages/workflow-events/package.json +1 -1
  158. package/packages/workspace-scanner/package.json +1 -1
  159. package/packages/worktree/package.json +1 -1
  160. package/packages/write-review/package.json +1 -1
  161. package/scripts/convert-skills-to-okf.ts +4 -1
  162. package/scripts/r2-storage.ts +2 -1
  163. package/scripts/sync-callback-queue.ts +4 -3
  164. package/scripts/telegram-mobile-bot.ts +3 -2
  165. package/scripts/test-r2-telegram.ts +2 -1
  166. package/scripts/test-telegram-approval.ts +2 -1
  167. package/scripts/voice-api-example.ts +2 -1
@@ -54,7 +54,7 @@ function makeFooterData(statuses: Record<string, string>): ReadonlyFooterDataPro
54
54
 
55
55
  function makeSessionInfo(overrides: Partial<FooterSessionInfo> = {}): FooterSessionInfo {
56
56
  return {
57
- cwd: "/home/frappe/pi-harness-runtime",
57
+ cwd: "/home/tester/pi-harness-runtime",
58
58
  branch: "main",
59
59
  sessionName: null,
60
60
  modelId: "MiniMax-M2",
@@ -89,11 +89,11 @@ const WORKSPACE =
89
89
  function makeLiveCtx(overrides: Record<string, unknown> = {}): ExtensionContext {
90
90
  return {
91
91
  mode: "tui",
92
- cwd: "/home/frappe/pi-harness-runtime",
92
+ cwd: "/home/tester/pi-harness-runtime",
93
93
  model: { id: "MiniMax-M2", provider: "minimax", contextWindow: 200000 },
94
94
  thinkingLevel: "high",
95
95
  sessionManager: {
96
- getCwd: () => "/home/frappe/pi-harness-runtime",
96
+ getCwd: () => "/home/tester/pi-harness-runtime",
97
97
  getSessionName: () => "session-1",
98
98
  getEntries: () => [
99
99
  {
@@ -202,7 +202,7 @@ describe("harness footer rows", () => {
202
202
  // `input ?? (0 + cacheRead + cacheWrite)` and reported CH9000.0%.
203
203
  const ctx = makeLiveCtx({
204
204
  sessionManager: {
205
- getCwd: () => "/home/frappe/pi-harness-runtime",
205
+ getCwd: () => "/home/tester/pi-harness-runtime",
206
206
  getSessionName: () => "session-1",
207
207
  getEntries: () => [
208
208
  {
@@ -440,7 +440,7 @@ describe("harness footer helpers", () => {
440
440
 
441
441
  it("breaks a word that is longer than the width", () => {
442
442
  const lines = wrapStatusText(
443
- "Workspace: /home/frappe/a-very-long-directory-name/pi-harness-runtime",
443
+ "Workspace: /home/tester/a-very-long-directory-name/pi-harness-runtime",
444
444
  20,
445
445
  0,
446
446
  );
@@ -522,14 +522,14 @@ describe("harness footer helpers", () => {
522
522
  });
523
523
 
524
524
  it("collapses the home directory to ~", () => {
525
- expect(formatCwdForFooter("/home/frappe/project", "/home/frappe")).toBe(
525
+ expect(formatCwdForFooter("/home/tester/project", "/home/tester")).toBe(
526
526
  "~/project",
527
527
  );
528
- expect(formatCwdForFooter("/home/frappe", "/home/frappe")).toBe("~");
529
- expect(formatCwdForFooter("/opt/work", "/home/frappe")).toBe("/opt/work");
528
+ expect(formatCwdForFooter("/home/tester", "/home/tester")).toBe("~");
529
+ expect(formatCwdForFooter("/opt/work", "/home/tester")).toBe("/opt/work");
530
530
  // A sibling directory that merely shares the home prefix is NOT in home.
531
- expect(formatCwdForFooter("/home/frappeX", "/home/frappe")).toBe(
532
- "/home/frappeX",
531
+ expect(formatCwdForFooter("/home/testerX", "/home/tester")).toBe(
532
+ "/home/testerX",
533
533
  );
534
534
  });
535
535
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/two-phase-review",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/types",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "description": "Shared TypeScript types for pi-harness-runtime packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/voice-api",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "type": "module",
5
5
  "description": "Voice-to-text API using Whisper for Telegram and LINE integration",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/webmcp-tester",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/wiki",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "description": "LLM Wiki integration for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/workflow-events",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/workspace-scanner",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/worktree",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "description": "pi-harness-runtime — worktree",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/write-review",
3
- "version": "1.1.425",
3
+ "version": "1.1.427",
4
4
  "description": "Two-agent write-review loop with blackboard coordination",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -10,9 +10,12 @@
10
10
 
11
11
  import { readdir, readFile, writeFile, mkdir } from "fs/promises";
12
12
  import { existsSync } from "fs";
13
+ import { homedir as osHomedir } from "node:os";
14
+ import { join } from "node:path";
13
15
 
14
16
  const SOURCE_DIR =
15
- "/home/frappe/frappe-bench/.claude-plugins/moocoding-skills/skills";
17
+ process.env.SKILLS_SOURCE_DIR ||
18
+ join(process.env.HOME || osHomedir(), "frappe-bench", ".claude-plugins", "moocoding-skills", "skills");
16
19
  const OUTPUT_DIR = "./OKF/skills";
17
20
 
18
21
  // Sensitive patterns to sanitize
@@ -5,6 +5,7 @@
5
5
  * Credentials loaded from key files per sensitive data rules.
6
6
  */
7
7
 
8
+ import { homedir as osHomedir } from "node:os";
8
9
  import { existsSync, readFileSync } from "node:fs";
9
10
  import { join } from "node:path";
10
11
  import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
@@ -27,7 +28,7 @@ export interface R2Config {
27
28
  * Load R2 config from key files
28
29
  */
29
30
  export function loadR2Config(): R2Config | null {
30
- const keysDir = join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "keys");
31
+ const keysDir = join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "keys");
31
32
 
32
33
  const accountIdFile = join(keysDir, "r2-account-id.txt");
33
34
  const accessKeyFile = join(keysDir, "r2-access-key-id.txt");
@@ -7,16 +7,17 @@
7
7
  * bun run scripts/sync-callback-queue.ts
8
8
  *
9
9
  * Or set up a cron job:
10
- * * * * * * bun /home/frappe/pi-harness-runtime/scripts/sync-callback-queue.ts
10
+ * * * * * * bun ~/pi-harness-runtime/scripts/sync-callback-queue.ts
11
11
  */
12
12
 
13
+ import { homedir as osHomedir } from "node:os";
13
14
  import { execSync } from "child_process";
14
15
  import { readFileSync, writeFileSync, existsSync } from "fs";
15
16
  import { join } from "path";
16
17
 
17
18
  const VPS_HOST = process.env.VPS_HOST || "frappe@217.216.37.251";
18
- const VPS_QUEUE = "/home/frappe/.pi-harness-runtime/callback-queue.jsonl";
19
- const LOCAL_QUEUE = join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "callback-queue.jsonl");
19
+ const VPS_QUEUE = process.env.VPS_QUEUE || "~/.pi-harness-runtime/callback-queue.jsonl";
20
+ const LOCAL_QUEUE = join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "callback-queue.jsonl");
20
21
 
21
22
  function syncQueue(): number {
22
23
  try {
@@ -8,12 +8,13 @@
8
8
  * - Quick status - current job at a glance
9
9
  */
10
10
 
11
+ import { homedir as osHomedir } from "node:os";
11
12
  import * as fs from "node:fs";
12
13
  import * as path from "node:path";
13
14
  import { existsSync, readFileSync, writeFileSync, appendFileSync } from "node:fs";
14
15
 
15
- const keysDir = path.join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "keys");
16
- const dataDir = path.join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "data");
16
+ const keysDir = path.join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "keys");
17
+ const dataDir = path.join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "data");
17
18
 
18
19
  // Load config
19
20
  const botToken = fs.readFileSync(path.join(keysDir, "telegram-bot-token.txt"), "utf8").trim();
@@ -6,6 +6,7 @@
6
6
  * Run: bun run scripts/test-r2-telegram.ts
7
7
  */
8
8
 
9
+ import { homedir as osHomedir } from "node:os";
9
10
  import * as fs from "node:fs";
10
11
  import * as path from "node:path";
11
12
  import { uploadLogsToR2 } from "./r2-storage.js";
@@ -16,7 +17,7 @@ async function main() {
16
17
  console.log("=".repeat(60));
17
18
 
18
19
  // Load Telegram config
19
- const keysDir = path.join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "keys");
20
+ const keysDir = path.join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "keys");
20
21
  const botToken = fs.readFileSync(path.join(keysDir, "telegram-bot-token.txt"), "utf8").trim();
21
22
  const chatId = fs.readFileSync(path.join(keysDir, "telegram-chat-id.txt"), "utf8").trim();
22
23
 
@@ -9,11 +9,12 @@
9
9
  * 5. Job command written for pi-harness to resume
10
10
  */
11
11
 
12
+ import { homedir as osHomedir } from "node:os";
12
13
  import * as fs from "node:fs";
13
14
  import * as path from "node:path";
14
15
 
15
16
  // Load config
16
- const keysDir = path.join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "keys");
17
+ const keysDir = path.join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "keys");
17
18
 
18
19
  const botToken = fs.readFileSync(path.join(keysDir, "telegram-bot-token.txt"), "utf8").trim();
19
20
  const chatId = fs.readFileSync(path.join(keysDir, "telegram-chat-id.txt"), "utf8").trim();
@@ -10,6 +10,7 @@
10
10
  * OPENAI_API_KEY=sk-xxx bun run scripts/voice-api-example.ts
11
11
  */
12
12
 
13
+ import { homedir as osHomedir } from "node:os";
13
14
  import * as fs from "node:fs";
14
15
  import * as path from "node:path";
15
16
  import { VoiceTranscriber } from "../packages/voice-api/dist/transcriber.js";
@@ -17,7 +18,7 @@ import { TelegramVoiceHandler } from "../packages/voice-api/dist/telegram.js";
17
18
 
18
19
  // Load API keys from key files
19
20
  function loadKey(filename: string): string | null {
20
- const keysDir = path.join(process.env.HOME || "/home/frappe", ".pi-harness-runtime", "keys");
21
+ const keysDir = path.join(process.env.HOME || osHomedir(), ".pi-harness-runtime", "keys");
21
22
  const filepath = path.join(keysDir, filename);
22
23
  try {
23
24
  return fs.readFileSync(filepath, "utf8").trim();