pi-harness-runtime 0.9.25 → 0.10.0

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 (321) hide show
  1. package/CHANGELOG.md +27 -7
  2. package/README.md +51 -51
  3. package/harness/auto-compact.ts +1 -1
  4. package/harness/autonomous-review.ts +88 -0
  5. package/harness/context-compact-orchestrator.ts +23 -23
  6. package/harness/context-window-manager.ts +5 -5
  7. package/harness/continue-prompt.ts +3 -3
  8. package/harness/e2e/minimax-quota-scraper.ts +1 -1
  9. package/harness/forked-summarizer.ts +4 -4
  10. package/harness/herdr-agents.ts +91 -0
  11. package/harness/index.ts +5 -5
  12. package/harness/loop-code-agent.ts +284 -0
  13. package/harness/loop-controller.ts +201 -0
  14. package/harness/loop-review-agent.ts +295 -0
  15. package/harness/loop-runtime.ts +10 -10
  16. package/harness/loop-types.ts +118 -0
  17. package/harness/notification-events.ts +3 -3
  18. package/harness/output-limit-handler.ts +1 -1
  19. package/harness/partial-recovery.ts +3 -3
  20. package/harness/session-memory.ts +5 -5
  21. package/index.ts +46 -32
  22. package/package.json +1 -1
  23. package/packages/a2a-adapter/package.json +1 -1
  24. package/packages/a2a-adapter/src/types.ts +5 -5
  25. package/packages/auth/package.json +1 -1
  26. package/packages/autonomous-refactor/package.json +1 -1
  27. package/packages/autonomous-runtime/dist/inbox.d.ts +3 -3
  28. package/packages/autonomous-runtime/dist/inbox.js +12 -12
  29. package/packages/autonomous-runtime/dist/lease.js +14 -14
  30. package/packages/autonomous-runtime/dist/types.js +1 -1
  31. package/packages/autonomous-runtime/package.json +1 -1
  32. package/packages/autonomous-runtime/src/inbox.ts +12 -12
  33. package/packages/autonomous-runtime/src/lease.ts +15 -15
  34. package/packages/autonomous-runtime/src/types.ts +13 -13
  35. package/packages/autonomous-runtime/tsconfig.tsbuildinfo +1 -1
  36. package/packages/cache-strategy/package.json +1 -1
  37. package/packages/capability-registry/dist/types.js +1 -1
  38. package/packages/capability-registry/package.json +1 -1
  39. package/packages/capability-registry/src/types.ts +5 -5
  40. package/packages/checkpoint/README.md +6 -6
  41. package/packages/checkpoint/dist/differ.js +2 -2
  42. package/packages/checkpoint/dist/engine.js +3 -3
  43. package/packages/checkpoint/dist/index.js +5 -5
  44. package/packages/checkpoint/dist/storage.js +3 -3
  45. package/packages/checkpoint/dist/types.js +1 -1
  46. package/packages/checkpoint/package.json +1 -1
  47. package/packages/checkpoint/src/differ.ts +2 -2
  48. package/packages/checkpoint/src/engine.ts +3 -3
  49. package/packages/checkpoint/src/index.ts +5 -5
  50. package/packages/checkpoint/src/storage.ts +3 -3
  51. package/packages/checkpoint/src/types.ts +10 -10
  52. package/packages/checkpoint/tsconfig.tsbuildinfo +1 -1
  53. package/packages/cli-plugin-sdk/package.json +1 -1
  54. package/packages/clipboard/dist/src/clipboard.d.ts.map +1 -1
  55. package/packages/clipboard/dist/src/clipboard.js +15 -7
  56. package/packages/clipboard/dist/src/clipboard.js.map +1 -1
  57. package/packages/clipboard/package.json +1 -1
  58. package/packages/clipboard/src/clipboard.ts +16 -9
  59. package/packages/code-generation/README.md +13 -13
  60. package/packages/code-generation/dist/faker.js +4 -4
  61. package/packages/code-generation/dist/generator.js +3 -3
  62. package/packages/code-generation/dist/index.js +3 -3
  63. package/packages/code-generation/dist/templates/registry.js +1 -1
  64. package/packages/code-generation/dist/types.js +1 -1
  65. package/packages/code-generation/package.json +1 -1
  66. package/packages/code-generation/src/faker.ts +5 -5
  67. package/packages/code-generation/src/generator.ts +4 -4
  68. package/packages/code-generation/src/index.ts +3 -3
  69. package/packages/code-generation/src/templates/registry.ts +1 -1
  70. package/packages/code-generation/src/types.ts +10 -10
  71. package/packages/code-generation/tsconfig.tsbuildinfo +1 -1
  72. package/packages/code-review/README.md +13 -13
  73. package/packages/code-review/dist/engine.js +3 -3
  74. package/packages/code-review/dist/index.js +3 -3
  75. package/packages/code-review/dist/types.js +1 -1
  76. package/packages/code-review/package.json +1 -1
  77. package/packages/code-review/src/engine.ts +3 -3
  78. package/packages/code-review/src/index.ts +3 -3
  79. package/packages/code-review/src/types.ts +10 -10
  80. package/packages/code-review/tsconfig.tsbuildinfo +1 -1
  81. package/packages/codex-adapter/package.json +1 -1
  82. package/packages/context-compiler/dist/compiler.js +1 -1
  83. package/packages/context-compiler/package.json +1 -1
  84. package/packages/context-compiler/src/compiler.ts +1 -1
  85. package/packages/context-compiler/src/types.ts +11 -11
  86. package/packages/context-compiler/test/context-compiler.test.ts +11 -11
  87. package/packages/context-discovery/package.json +1 -1
  88. package/packages/context-manager/package.json +1 -1
  89. package/packages/cookie-sanitizer/README.md +27 -27
  90. package/packages/cookie-sanitizer/package.json +1 -1
  91. package/packages/cost-optimizer/package.json +1 -1
  92. package/packages/cost-optimizer/src/types.ts +5 -5
  93. package/packages/dependency-analyzer/package.json +1 -1
  94. package/packages/django-plugin/dist/analyzer.js +7 -7
  95. package/packages/django-plugin/package.json +1 -1
  96. package/packages/django-plugin/src/analyzer.ts +7 -7
  97. package/packages/doc-generator/package.json +1 -1
  98. package/packages/evaluation-engine/dist/engine.js +9 -9
  99. package/packages/evaluation-engine/package.json +1 -1
  100. package/packages/evaluation-engine/src/engine.ts +9 -9
  101. package/packages/evaluation-engine/src/types.ts +3 -3
  102. package/packages/evaluation-runner/package.json +1 -1
  103. package/packages/event-bus/dist/src/herdr-bus.d.ts +121 -0
  104. package/packages/event-bus/dist/src/herdr-bus.d.ts.map +1 -0
  105. package/packages/event-bus/dist/src/herdr-bus.js +322 -0
  106. package/packages/event-bus/dist/src/herdr-bus.js.map +1 -0
  107. package/packages/event-bus/dist/src/index.d.ts +2 -0
  108. package/packages/event-bus/dist/src/index.d.ts.map +1 -1
  109. package/packages/event-bus/dist/src/index.js +1 -0
  110. package/packages/event-bus/dist/src/index.js.map +1 -1
  111. package/packages/event-bus/package.json +1 -1
  112. package/packages/event-bus/src/herdr-bus.ts +525 -0
  113. package/packages/event-bus/src/index.ts +29 -0
  114. package/packages/event-store/package.json +1 -1
  115. package/packages/experience-replay/dist/replay.js +7 -7
  116. package/packages/experience-replay/package.json +1 -1
  117. package/packages/experience-replay/src/replay.ts +7 -7
  118. package/packages/experience-replay/src/types.ts +5 -5
  119. package/packages/feedback-collector/package.json +1 -1
  120. package/packages/framework-detector/README.md +18 -18
  121. package/packages/framework-detector/dist/detector.js +3 -3
  122. package/packages/framework-detector/dist/index.js +3 -3
  123. package/packages/framework-detector/dist/signatures/registry.js +24 -24
  124. package/packages/framework-detector/dist/types.js +1 -1
  125. package/packages/framework-detector/package.json +1 -1
  126. package/packages/framework-detector/src/detector.ts +3 -3
  127. package/packages/framework-detector/src/index.ts +3 -3
  128. package/packages/framework-detector/src/signatures/registry.ts +24 -24
  129. package/packages/framework-detector/src/types.ts +7 -7
  130. package/packages/framework-detector/tsconfig.tsbuildinfo +1 -1
  131. package/packages/framework-plugin-sdk/README.md +23 -23
  132. package/packages/framework-plugin-sdk/dist/index.js +2 -2
  133. package/packages/framework-plugin-sdk/dist/manager.js +3 -3
  134. package/packages/framework-plugin-sdk/dist/types.js +2 -2
  135. package/packages/framework-plugin-sdk/package.json +1 -1
  136. package/packages/framework-plugin-sdk/src/index.ts +2 -2
  137. package/packages/framework-plugin-sdk/src/manager.ts +3 -3
  138. package/packages/framework-plugin-sdk/src/types.ts +10 -10
  139. package/packages/framework-plugin-sdk/tsconfig.tsbuildinfo +1 -1
  140. package/packages/frappe-plugin/dist/analyzer.js +8 -8
  141. package/packages/frappe-plugin/dist/types.js +1 -1
  142. package/packages/frappe-plugin/package.json +1 -1
  143. package/packages/frappe-plugin/src/analyzer.ts +8 -8
  144. package/packages/frappe-plugin/src/types.ts +10 -10
  145. package/packages/generic-web-plugin/dist/analyzer.js +5 -5
  146. package/packages/generic-web-plugin/package.json +1 -1
  147. package/packages/generic-web-plugin/src/analyzer.ts +5 -5
  148. package/packages/health-monitor/package.json +1 -1
  149. package/packages/health-monitor/src/monitor.ts +1 -1
  150. package/packages/intent-analyzer/package.json +1 -1
  151. package/packages/laravel-plugin/dist/analyzer.js +11 -11
  152. package/packages/laravel-plugin/package.json +1 -1
  153. package/packages/laravel-plugin/src/analyzer.ts +11 -11
  154. package/packages/learning-engine/dist/engine.js +5 -5
  155. package/packages/learning-engine/dist/types.js +1 -1
  156. package/packages/learning-engine/package.json +1 -1
  157. package/packages/learning-engine/src/engine.ts +5 -5
  158. package/packages/learning-engine/src/types.ts +6 -6
  159. package/packages/mcp-adapter/package.json +1 -1
  160. package/packages/memory-engine/dist/engine.js +8 -8
  161. package/packages/memory-engine/dist/types.js +2 -2
  162. package/packages/memory-engine/package.json +1 -1
  163. package/packages/memory-engine/src/engine.ts +8 -8
  164. package/packages/memory-engine/src/types.ts +9 -9
  165. package/packages/model-registry/package.json +1 -1
  166. package/packages/model-registry/src/types.ts +4 -4
  167. package/packages/nextjs-plugin/dist/analyzer.js +9 -9
  168. package/packages/nextjs-plugin/package.json +1 -1
  169. package/packages/nextjs-plugin/src/analyzer.ts +9 -9
  170. package/packages/notification/dist/notification-center.js +1 -1
  171. package/packages/notification/package.json +1 -1
  172. package/packages/notification/src/notification-center.ts +1 -1
  173. package/packages/observability/dist/alerts.js +2 -2
  174. package/packages/observability/dist/health.js +4 -4
  175. package/packages/observability/dist/index.js +6 -6
  176. package/packages/observability/dist/logger.js +7 -7
  177. package/packages/observability/dist/metrics.js +11 -11
  178. package/packages/observability/dist/tracer.js +3 -3
  179. package/packages/observability/dist/types.js +1 -1
  180. package/packages/observability/package.json +1 -1
  181. package/packages/observability/src/alerts.ts +2 -2
  182. package/packages/observability/src/health.ts +4 -4
  183. package/packages/observability/src/index.ts +6 -6
  184. package/packages/observability/src/logger.ts +7 -7
  185. package/packages/observability/src/metrics.ts +11 -11
  186. package/packages/observability/src/tracer.ts +3 -3
  187. package/packages/observability/src/types.ts +7 -7
  188. package/packages/observability/test/observability.test.ts +4 -4
  189. package/packages/observability/tsconfig.tsbuildinfo +1 -1
  190. package/packages/performance-optimizer/dist/optimizer.js +1 -1
  191. package/packages/performance-optimizer/package.json +1 -1
  192. package/packages/performance-optimizer/src/optimizer.ts +1 -1
  193. package/packages/performance-optimizer/src/types.ts +4 -4
  194. package/packages/privilege-broker/package.json +1 -1
  195. package/packages/project-analyzer/dist/analyzer.js +4 -4
  196. package/packages/project-analyzer/dist/index.js +8 -8
  197. package/packages/project-analyzer/dist/signals.js +3 -3
  198. package/packages/project-analyzer/dist/types.js +1 -1
  199. package/packages/project-analyzer/package.json +1 -1
  200. package/packages/project-analyzer/src/analyzer.ts +4 -4
  201. package/packages/project-analyzer/src/index.ts +9 -9
  202. package/packages/project-analyzer/src/signals.ts +4 -4
  203. package/packages/project-analyzer/src/types.ts +15 -15
  204. package/packages/project-analyzer/test/index.test.ts +17 -17
  205. package/packages/project-analyzer/tsconfig.tsbuildinfo +1 -1
  206. package/packages/projection-engine/package.json +1 -1
  207. package/packages/prompt-compiler/dist/section-builder.js +1 -1
  208. package/packages/prompt-compiler/dist/types.js +3 -3
  209. package/packages/prompt-compiler/package.json +1 -1
  210. package/packages/prompt-compiler/src/section-builder.ts +1 -1
  211. package/packages/prompt-compiler/src/types.ts +12 -12
  212. package/packages/prompt-compiler/test/prompt-compiler.test.ts +12 -12
  213. package/packages/prompt-versioning/package.json +1 -1
  214. package/packages/provider-adapter-sdk/dist/builder.js +1 -1
  215. package/packages/provider-adapter-sdk/dist/index.js +5 -5
  216. package/packages/provider-adapter-sdk/dist/registry.js +1 -1
  217. package/packages/provider-adapter-sdk/dist/tester.js +1 -1
  218. package/packages/provider-adapter-sdk/dist/types.js +1 -1
  219. package/packages/provider-adapter-sdk/package.json +1 -1
  220. package/packages/provider-adapter-sdk/src/builder.ts +1 -1
  221. package/packages/provider-adapter-sdk/src/index.ts +6 -6
  222. package/packages/provider-adapter-sdk/src/registry.ts +1 -1
  223. package/packages/provider-adapter-sdk/src/tester.ts +1 -1
  224. package/packages/provider-adapter-sdk/src/types.ts +5 -5
  225. package/packages/provider-adapter-sdk/tsconfig.tsbuildinfo +1 -1
  226. package/packages/provider-router/package.json +1 -1
  227. package/packages/provider-router/src/types.ts +4 -4
  228. package/packages/provider-selector/package.json +1 -1
  229. package/packages/providers/dist/deepagents-adapter.js +1 -1
  230. package/packages/providers/package.json +1 -1
  231. package/packages/providers/src/deepagents-adapter.ts +1 -1
  232. package/packages/quota-manager/package.json +1 -1
  233. package/packages/rate-limiter/package.json +1 -1
  234. package/packages/react-vite-plugin/dist/analyzer.js +7 -7
  235. package/packages/react-vite-plugin/package.json +1 -1
  236. package/packages/react-vite-plugin/src/analyzer.ts +7 -7
  237. package/packages/release-manager/package.json +1 -1
  238. package/packages/requirement-compiler/dist/compiler.js +17 -17
  239. package/packages/requirement-compiler/dist/types.js +2 -2
  240. package/packages/requirement-compiler/package.json +1 -1
  241. package/packages/requirement-compiler/src/compiler.ts +17 -17
  242. package/packages/requirement-compiler/src/types.ts +21 -21
  243. package/packages/requirement-compiler/test/requirement-compiler.test.ts +17 -17
  244. package/packages/runtime/dist/command-executor.js +1 -1
  245. package/packages/runtime/dist/local-runtime-agent.js +1 -1
  246. package/packages/runtime/dist/policy-engine.js +1 -1
  247. package/packages/runtime/dist/runtime-api.js +1 -1
  248. package/packages/runtime/dist/workspace-manager.js +1 -1
  249. package/packages/runtime/package.json +1 -1
  250. package/packages/runtime/src/command-executor.ts +1 -1
  251. package/packages/runtime/src/local-runtime-agent.ts +1 -1
  252. package/packages/runtime/src/policy-engine.ts +1 -1
  253. package/packages/runtime/src/runtime-api.ts +1 -1
  254. package/packages/runtime/src/workspace-manager.ts +1 -1
  255. package/packages/scheduler/package.json +1 -1
  256. package/packages/scheduler-adapter/package.json +1 -1
  257. package/packages/session/README.md +18 -18
  258. package/packages/session/dist/history.js +3 -3
  259. package/packages/session/dist/index.js +5 -5
  260. package/packages/session/dist/manager.js +3 -3
  261. package/packages/session/dist/policy.js +2 -2
  262. package/packages/session/dist/store.js +2 -2
  263. package/packages/session/dist/types.js +1 -1
  264. package/packages/session/package.json +1 -1
  265. package/packages/session/src/history.ts +3 -3
  266. package/packages/session/src/index.ts +5 -5
  267. package/packages/session/src/manager.ts +3 -3
  268. package/packages/session/src/policy.ts +4 -4
  269. package/packages/session/src/store.ts +3 -3
  270. package/packages/session/src/types.ts +10 -10
  271. package/packages/session/tsconfig.tsbuildinfo +1 -1
  272. package/packages/session-api/package.json +1 -1
  273. package/packages/session-export/package.json +1 -1
  274. package/packages/shared-context/package.json +1 -1
  275. package/packages/skill-registry/package.json +1 -1
  276. package/packages/skill-registry/src/types.ts +4 -4
  277. package/packages/sprint-planner/package.json +1 -1
  278. package/packages/subscription-engine/package.json +1 -1
  279. package/packages/task-compiler/dist/compiler.js +7 -7
  280. package/packages/task-compiler/dist/decompose.js +11 -11
  281. package/packages/task-compiler/dist/file-scope.js +6 -6
  282. package/packages/task-compiler/dist/graph.js +6 -6
  283. package/packages/task-compiler/dist/index.js +2 -2
  284. package/packages/task-compiler/dist/types.js +5 -5
  285. package/packages/task-compiler/dist/validate.js +2 -2
  286. package/packages/task-compiler/dist/verification.js +2 -2
  287. package/packages/task-compiler/package.json +1 -1
  288. package/packages/task-compiler/src/command-policy.ts +1 -1
  289. package/packages/task-compiler/src/compiler.ts +7 -7
  290. package/packages/task-compiler/src/decompose.ts +11 -11
  291. package/packages/task-compiler/src/file-scope.ts +6 -6
  292. package/packages/task-compiler/src/graph.ts +6 -6
  293. package/packages/task-compiler/src/index.ts +3 -3
  294. package/packages/task-compiler/src/types.ts +14 -14
  295. package/packages/task-compiler/src/validate.ts +2 -2
  296. package/packages/task-compiler/src/verification.ts +2 -2
  297. package/packages/task-compiler/test/task-compiler.test.ts +10 -10
  298. package/packages/test-data-generator/README.md +13 -13
  299. package/packages/test-data-generator/dist/faker-adapter.js +4 -4
  300. package/packages/test-data-generator/dist/generator.js +3 -3
  301. package/packages/test-data-generator/dist/index.js +3 -3
  302. package/packages/test-data-generator/dist/types.js +1 -1
  303. package/packages/test-data-generator/package.json +1 -1
  304. package/packages/test-data-generator/src/faker-adapter.ts +4 -4
  305. package/packages/test-data-generator/src/generator.ts +3 -3
  306. package/packages/test-data-generator/src/index.ts +3 -3
  307. package/packages/test-data-generator/src/types.ts +9 -9
  308. package/packages/test-data-generator/tsconfig.tsbuildinfo +1 -1
  309. package/packages/test-generator/package.json +1 -1
  310. package/packages/token-estimation/package.json +1 -1
  311. package/packages/token-optimizer/package.json +1 -1
  312. package/packages/tui/package.json +1 -1
  313. package/packages/types/package.json +1 -1
  314. package/packages/types/src/agent-worker-types.ts +5 -5
  315. package/packages/types/src/runtime-types.ts +12 -12
  316. package/packages/types/tsconfig.tsbuildinfo +1 -1
  317. package/packages/workflow-events/package.json +1 -1
  318. package/packages/workspace-scanner/package.json +1 -1
  319. package/packages/worktree/package.json +1 -1
  320. package/renderer.ts +7 -7
  321. package/skills/harness-runtime/SKILL.md +15 -15
package/index.ts CHANGED
@@ -68,13 +68,15 @@ import { homedir } from "node:os";
68
68
  import { appendFileSync, existsSync, mkdirSync } from "node:fs";
69
69
  import { join } from "node:path";
70
70
 
71
- // ─── Debug log → file instead of TUI ─────────────────────────────────
71
+ // --- Debug log → file instead of TUI ---------------------------------
72
72
  const DEBUG_LOG_DIR = join(homedir(), ".pi", "harness-logs");
73
73
  const DEBUG_LOG_PATH = join(DEBUG_LOG_DIR, "harness-debug.log");
74
74
 
75
75
  try {
76
76
  if (!existsSync(DEBUG_LOG_DIR)) mkdirSync(DEBUG_LOG_DIR, { recursive: true });
77
- } catch { /* non-fatal */ }
77
+ } catch {
78
+ /* non-fatal */
79
+ }
78
80
 
79
81
  // Write harness runtime logs to file only (NOT to TUI stdout)
80
82
  function _debugLog(...args: unknown[]): void {
@@ -82,14 +84,16 @@ function _debugLog(...args: unknown[]): void {
82
84
  const line =
83
85
  new Date().toISOString() +
84
86
  " " +
85
- args.map((a) => (typeof a === "object" ? JSON.stringify(a) : String(a))).join(" ");
87
+ args
88
+ .map((a) => (typeof a === "object" ? JSON.stringify(a) : String(a)))
89
+ .join(" ");
86
90
  appendFileSync(DEBUG_LOG_PATH, line + "\n");
87
91
  } catch {
88
92
  // non-fatal
89
93
  }
90
94
  }
91
95
 
92
- // ─── Selective console override — harness DEBUG → file only ────────
96
+ // --- Selective console override — harness DEBUG → file only --------
93
97
  // Real errors (no [DEBUG prefix) still print to TUI so you notice problems.
94
98
  const _origLog = console.log.bind(console);
95
99
  const _origError = console.error.bind(console);
@@ -108,7 +112,7 @@ console.error = (...args: unknown[]) => {
108
112
  }
109
113
  };
110
114
 
111
- // ─── Harness Runtime State ────────────────────────────────────────────
115
+ // --- Harness Runtime State --------------------------------------------
112
116
  const HARNESS_ROOT_DIR = join(homedir(), ".pi", "harness");
113
117
 
114
118
  interface HarnessSession {
@@ -207,7 +211,7 @@ export default function (pi: ExtensionAPI) {
207
211
  const mirrorStore = new MirrorStore();
208
212
  ensureHarnessDir();
209
213
 
210
- // ─── Auto-track every assistant message ──────────────────────────────
214
+ // --- Auto-track every assistant message ------------------------------
211
215
  pi.on("message_end", async (event, ctx) => {
212
216
  if (isOutputLimitResumePromptMessage(event.message)) {
213
217
  pendingOutputLimitResumeAfterSettled = false;
@@ -274,7 +278,7 @@ export default function (pi: ExtensionAPI) {
274
278
  }
275
279
  });
276
280
 
277
- // ─── Smart quota fetch for MiniMax status ────────────────────────
281
+ // --- Smart quota fetch for MiniMax status ------------------------
278
282
  const MINIMAX_REFRESH_MIN_INTERVAL_MS = 15 * 60 * 1000;
279
283
  const MINIMAX_REFRESH_TOKEN_THRESHOLD = 200_000;
280
284
  const MINIMAX_REFRESH_REQUEST_THRESHOLD = 12;
@@ -282,12 +286,12 @@ export default function (pi: ExtensionAPI) {
282
286
  ? new MiniMaxQuotaScraper({ cookieFile: process.env.QUOTA_COOKIE_FILE })
283
287
  : new MiniMaxQuotaScraper();
284
288
 
285
- // ─── Smart quota fetch for OpenAI status ─────────────────────────
289
+ // --- Smart quota fetch for OpenAI status -------------------------
286
290
  const OPENAI_REFRESH_MIN_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes
287
291
  const _openaiQuotaScraper = new OpenAIQuotaScraper();
288
292
  let lastOpenAIQuotaFetchAt = 0;
289
293
 
290
- // ─── Cookie sanitizer integration ────────────────────────────────────
294
+ // --- Cookie sanitizer integration ------------------------------------
291
295
  // The drop folder is the user-facing, forgiving input. The canonical
292
296
  // cache (`~/.config/minimax-cookies.txt`) is the runtime-owned,
293
297
  // normalized output that `MiniMaxQuotaScraper` reads. Either being
@@ -310,7 +314,7 @@ export default function (pi: ExtensionAPI) {
310
314
 
311
315
  const cookieQuotaAutoFetchAvailable = hasCookieSource();
312
316
 
313
- // ─── TUI quota signal plumbing (OpenAI / GLM / Anthropic / OpenRouter) ──
317
+ // --- TUI quota signal plumbing (OpenAI / GLM / Anthropic / OpenRouter) --
314
318
  // The TUIUsageMonitor parses provider quota-exhaustion messages from pi's
315
319
  // TUI / message stream and emits signals we write to per-provider mirror
316
320
  // entries. For providers that don't expose a continuous usage API this is
@@ -342,7 +346,7 @@ export default function (pi: ExtensionAPI) {
342
346
  // Live watcher — sanitises on every change in the drop folder.
343
347
  const cookieWatcher = new CookieWatcher({
344
348
  dropDir: cookieDropDir,
345
- syncOptions: { cachePath: cookieCachePath },
349
+ syncOptions: { cachePath: cookieCachePath, providerHint: "minimax" },
346
350
  onEvent: (event) => {
347
351
  if (event.kind === "sync-error" || event.kind === "watcher-error") {
348
352
  const msg = "message" in event ? event.message : "";
@@ -367,6 +371,9 @@ export default function (pi: ExtensionAPI) {
367
371
  });
368
372
  try {
369
373
  cookieWatcher.start();
374
+ // Sync existing drop-folder cookies now (ignoreInitial: true means
375
+ // the watcher won't do this automatically on startup).
376
+ cookieWatcher.triggerNow();
370
377
  } catch (e) {
371
378
  const msg = e instanceof Error ? e.message : String(e);
372
379
  if (msg.includes("ENOSPC")) {
@@ -692,7 +699,7 @@ export default function (pi: ExtensionAPI) {
692
699
  return;
693
700
  }
694
701
 
695
- // ─── /usage — show full status ───────────────────────────────────────
702
+ // --- /usage — show full status ---------------------------------------
696
703
  pi.registerCommand("usage", {
697
704
  description: "Show Codex-style usage status (local + provider mirror)",
698
705
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -710,7 +717,7 @@ export default function (pi: ExtensionAPI) {
710
717
  },
711
718
  });
712
719
 
713
- // ─── /usage refresh — force auto-fetch ────────────────────────────
720
+ // --- /usage refresh — force auto-fetch ----------------------------
714
721
  pi.registerCommand("usage-refresh", {
715
722
  description: "Force refresh quota from provider console",
716
723
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -735,14 +742,14 @@ export default function (pi: ExtensionAPI) {
735
742
  },
736
743
  });
737
744
 
738
- // ─── /usage today — focused view ─────────────────────────────────────
745
+ // --- /usage today — focused view -------------------------------------
739
746
  pi.registerCommand("usage-today", {
740
747
  description: "Show today's usage + 5h window",
741
748
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
742
749
  const local = aggregateWindows(tracker.all());
743
750
  const lines = [
744
751
  " Today's usage",
745
- "─────────────────────────────────────",
752
+ "-------------------------------------",
746
753
  ` Model: ${ctx.model?.id ?? "unknown"}`,
747
754
  ` Today: ${local.today.tokens} tokens · ${local.today.requests} requests · $${local.today.cost.toFixed(4)}`,
748
755
  ` This 5h: ${local.five_h.tokens} tokens · ${local.five_h.requests} requests · $${local.five_h.cost.toFixed(4)}`,
@@ -753,14 +760,14 @@ export default function (pi: ExtensionAPI) {
753
760
  },
754
761
  });
755
762
 
756
- // ─── /usage week — focused view ──────────────────────────────────────
763
+ // --- /usage week — focused view --------------------------------------
757
764
  pi.registerCommand("usage-week", {
758
765
  description: "Show this week's usage + lifetime totals",
759
766
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
760
767
  const local = aggregateWindows(tracker.all());
761
768
  const lines = [
762
769
  " This week's usage",
763
- "─────────────────────────────────────",
770
+ "-------------------------------------",
764
771
  ` Model: ${ctx.model?.id ?? "unknown"}`,
765
772
  ` This week: ${local.weekly.tokens} tokens · ${local.weekly.requests} requests · $${local.weekly.cost.toFixed(4)}`,
766
773
  ` Lifetime: ${local.lifetime.tokens} tokens · ${local.lifetime.requests} requests · $${local.lifetime.cost.toFixed(4)}`,
@@ -771,7 +778,7 @@ export default function (pi: ExtensionAPI) {
771
778
  },
772
779
  });
773
780
 
774
- // ─── /usage reset — clear mirror ─────────────────────────────────────
781
+ // --- /usage reset — clear mirror -------------------------------------
775
782
  pi.registerCommand("usage-reset", {
776
783
  description: "Clear the provider mirror (force re-sync next time)",
777
784
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -811,7 +818,7 @@ export default function (pi: ExtensionAPI) {
811
818
  },
812
819
  });
813
820
 
814
- // ─── /harness start — Start a new harness job ──────────────────────
821
+ // --- /harness start — Start a new harness job ----------------------
815
822
  pi.registerCommand("harness-start", {
816
823
  description: "Start a new harness job: /harness start <requirement>",
817
824
  handler: async (args: string, ctx: ExtensionCommandContext) => {
@@ -883,7 +890,7 @@ export default function (pi: ExtensionAPI) {
883
890
  },
884
891
  });
885
892
 
886
- // ─── /harness status — Show harness job status ─────────────────────
893
+ // --- /harness status — Show harness job status ---------------------
887
894
  pi.registerCommand("harness-status", {
888
895
  description: "Show current harness job status",
889
896
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -904,22 +911,22 @@ export default function (pi: ExtensionAPI) {
904
911
  const progress = currentSession.graph.getProgressSummary();
905
912
  const lines = [
906
913
  `Harness Job Status`,
907
- `${"─".repeat(40)}`,
914
+ `${"-".repeat(40)}`,
908
915
  `Job ID: ${currentSession.jobId}`,
909
916
  `Status: ${summary.status}`,
910
917
  `Terminal: ${summary.isTerminal ? "Yes" : "No"}`,
911
918
  `Can Resume: ${summary.canResume ? "Yes" : "No"}`,
912
- `${"─".repeat(40)}`,
919
+ `${"-".repeat(40)}`,
913
920
  `Tasks: ${progress.done}/${progress.total} done, ${progress.running} running, ${progress.failed} failed`,
914
921
  `Created: ${currentSession.createdAt}`,
915
- `${"─".repeat(40)}`,
922
+ `${"-".repeat(40)}`,
916
923
  `Run /harness tasks for task list`,
917
924
  ];
918
925
  ctx.ui.notify(lines.join("\n"), "info");
919
926
  },
920
927
  });
921
928
 
922
- // ─── /harness tasks — List all tasks ───────────────────────────────
929
+ // --- /harness tasks — List all tasks -------------------------------
923
930
  pi.registerCommand("harness-tasks", {
924
931
  description: "List all tasks in the current harness job",
925
932
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -942,7 +949,7 @@ export default function (pi: ExtensionAPI) {
942
949
 
943
950
  const lines = [
944
951
  `Tasks for Job ${currentSession.jobId}`,
945
- `${"─".repeat(50)}`,
952
+ `${"-".repeat(50)}`,
946
953
  ];
947
954
 
948
955
  for (const task of tasks) {
@@ -950,14 +957,14 @@ export default function (pi: ExtensionAPI) {
950
957
  lines.push(`[${task.id}] ${status} ${task.title}`);
951
958
  }
952
959
 
953
- lines.push(`${"─".repeat(50)}`);
960
+ lines.push(`${"-".repeat(50)}`);
954
961
  const ready = currentSession.graph.getReadyTasks();
955
962
  lines.push(`${ready.length} tasks ready to execute.`);
956
963
  ctx.ui.notify(lines.join("\n"), "info");
957
964
  },
958
965
  });
959
966
 
960
- // ─── /harness pause — Pause the harness job ───────────────────────
967
+ // --- /harness pause — Pause the harness job -----------------------
961
968
  pi.registerCommand("harness-pause", {
962
969
  description: "Pause the current harness job",
963
970
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -1013,7 +1020,7 @@ export default function (pi: ExtensionAPI) {
1013
1020
  },
1014
1021
  });
1015
1022
 
1016
- // ─── /harness resume — Resume the harness job ───────────────────────
1023
+ // --- /harness resume — Resume the harness job -----------------------
1017
1024
  pi.registerCommand("harness-resume", {
1018
1025
  description: "Resume a paused harness job",
1019
1026
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -1049,7 +1056,7 @@ export default function (pi: ExtensionAPI) {
1049
1056
  },
1050
1057
  });
1051
1058
 
1052
- // ─── /harness cancel — Cancel the harness job ──────────────────────
1059
+ // --- /harness cancel — Cancel the harness job ----------------------
1053
1060
  pi.registerCommand("harness-cancel", {
1054
1061
  description: "Cancel the current harness job",
1055
1062
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -1086,7 +1093,7 @@ export default function (pi: ExtensionAPI) {
1086
1093
  },
1087
1094
  });
1088
1095
 
1089
- // ─── Footer status (persistent badge) ────────────────────────────────
1096
+ // --- Footer status (persistent badge) --------------------------------
1090
1097
  pi.on("session_start", (_event, ctx) => {
1091
1098
  footerStatusCtx = ctx;
1092
1099
  refreshFooterStatus(
@@ -1165,6 +1172,13 @@ export default function (pi: ExtensionAPI) {
1165
1172
  queueAutoResume("post-compact", "resume", "followUp");
1166
1173
  });
1167
1174
 
1175
+ // --- Periodic quota refresh every 15 minutes ---
1176
+ // `maybeAutoFetchQuota` checks its own rate-limit (MINIMAX_REFRESH_MIN_INTERVAL_MS)
1177
+ // so this is safe to call frequently.
1178
+ setInterval(() => {
1179
+ void maybeAutoFetchQuota(lastActiveProvider ?? null);
1180
+ }, MINIMAX_REFRESH_MIN_INTERVAL_MS);
1181
+
1168
1182
  function queueAutoResume(
1169
1183
  reason: string,
1170
1184
  content: string,
@@ -1226,9 +1240,9 @@ export default function (pi: ExtensionAPI) {
1226
1240
  }
1227
1241
  }
1228
1242
 
1229
- // ──────────────────────────────────────────────────────────────────────
1243
+ // ----------------------------------------------------------------------
1230
1244
  // Helper: refresh persistent footer status with one-line summary
1231
- // ──────────────────────────────────────────────────────────────────────
1245
+ // ----------------------------------------------------------------------
1232
1246
  function refreshFooterStatus(
1233
1247
  ctx: { ui: { setStatus: (key: string, value: string) => void } },
1234
1248
  tracker: UsageTracker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "0.9.25",
3
+ "version": "0.10.0",
4
4
  "description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/a2a-adapter",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "type": "module",
5
5
  "description": "Google Agent-to-Agent (A2A) protocol adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -2,7 +2,7 @@
2
2
  * A2A Adapter — Types (RFC-0069)
3
3
  */
4
4
 
5
- // ─── Agent Card ─────────────────────────────────────────────────────────────
5
+ // --- Agent Card -------------------------------------------------------------
6
6
 
7
7
  export interface AgentCard {
8
8
  name: string;
@@ -36,7 +36,7 @@ export interface Authentication {
36
36
  credentials?: string;
37
37
  }
38
38
 
39
- // ─── Task ─────────────────────────────────────────────────────────────────
39
+ // --- Task -----------------------------------------------------------------
40
40
 
41
41
  export type TaskStatus =
42
42
  | "submitted"
@@ -71,7 +71,7 @@ export interface Artifact {
71
71
  parts: Array<{ type: "text"; text: string }>;
72
72
  }
73
73
 
74
- // ─── A2A Requests / Responses ─────────────────────────────────────────────
74
+ // --- A2A Requests / Responses ---------------------------------------------
75
75
 
76
76
  export type A2ARequest =
77
77
  | {
@@ -92,7 +92,7 @@ export interface A2AResponse {
92
92
  error?: { code: number; message: string };
93
93
  }
94
94
 
95
- // ─── A2A Client ─────────────────────────────────────────────────────────
95
+ // --- A2A Client ---------------------------------------------------------
96
96
 
97
97
  export interface A2AClientConfig {
98
98
  timeout?: number;
@@ -104,7 +104,7 @@ export interface TaskHandle {
104
104
  status: TaskStatus;
105
105
  }
106
106
 
107
- // ─── A2A Agent ───────────────────────────────────────────────────────────
107
+ // --- A2A Agent -----------------------------------------------------------
108
108
 
109
109
  export interface A2AAgentConfig {
110
110
  name: string;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/auth",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "description": "pi-harness-runtime — auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-refactor",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "type": "module",
5
5
  "description": "Autonomous refactoring engine",
6
6
  "main": "dist/index.js",
@@ -8,9 +8,9 @@ export declare class InboxError extends Error {
8
8
  * Storage layout:
9
9
  * ```
10
10
  * ~/.pi/harness/inbox/
11
- * ├── tasks.jsonl # append-only log (one JSON line per task)
12
- * ├── claimed/ # active leases (one JSON file per task)
13
- * └── BACKLOG.md # human-friendly authoring surface (optional)
11
+ * +-- tasks.jsonl # append-only log (one JSON line per task)
12
+ * +-- claimed/ # active leases (one JSON file per task)
13
+ * +-- BACKLOG.md # human-friendly authoring surface (optional)
14
14
  * ```
15
15
  *
16
16
  * Operations are:
@@ -6,23 +6,23 @@
6
6
  */
7
7
  import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync, } from "node:fs";
8
8
  import { getInboxDir, getTasksPath } from "./types.js";
9
- // ─── Errors ───────────────────────────────────────────────────────────────────
9
+ // --- Errors -------------------------------------------------------------------
10
10
  export class InboxError extends Error {
11
11
  constructor(msg) {
12
12
  super(`[InboxError] ${msg}`);
13
13
  this.name = "InboxError";
14
14
  }
15
15
  }
16
- // ─── TaskInbox ────────────────────────────────────────────────────────────────
16
+ // --- TaskInbox ----------------------------------------------------------------
17
17
  /**
18
18
  * Manages the append-only task inbox at `~/.pi/harness/inbox/tasks.jsonl`.
19
19
  *
20
20
  * Storage layout:
21
21
  * ```
22
22
  * ~/.pi/harness/inbox/
23
- * ├── tasks.jsonl # append-only log (one JSON line per task)
24
- * ├── claimed/ # active leases (one JSON file per task)
25
- * └── BACKLOG.md # human-friendly authoring surface (optional)
23
+ * +-- tasks.jsonl # append-only log (one JSON line per task)
24
+ * +-- claimed/ # active leases (one JSON file per task)
25
+ * +-- BACKLOG.md # human-friendly authoring surface (optional)
26
26
  * ```
27
27
  *
28
28
  * Operations are:
@@ -46,7 +46,7 @@ export class TaskInbox {
46
46
  mkdirSync(this.inboxDir, { recursive: true });
47
47
  }
48
48
  }
49
- // ─── append ──────────────────────────────────────────────────────────────
49
+ // --- append --------------------------------------------------------------
50
50
  /**
51
51
  * Append a new task to tasks.jsonl.
52
52
  * The task is validated before writing. Duplicate ids are rejected.
@@ -64,7 +64,7 @@ export class TaskInbox {
64
64
  appendFileSync(this.tasksPath, line, "utf8");
65
65
  this._cache = null; // invalidate
66
66
  }
67
- // ─── list ─────────────────────────────────────────────────────────────────
67
+ // --- list -----------------------------------------------------------------
68
68
  /**
69
69
  * Read all tasks from tasks.jsonl.
70
70
  * Results are sorted by priority ASC then createdAt ASC (oldest first).
@@ -106,13 +106,13 @@ export class TaskInbox {
106
106
  });
107
107
  return filtered;
108
108
  }
109
- // ─── get ─────────────────────────────────────────────────────────────────
109
+ // --- get -----------------------------------------------------------------
110
110
  /** Retrieve a single task by id, or null if not found. */
111
111
  get(id) {
112
112
  const tasks = this.list();
113
113
  return tasks.find((t) => t.id === id) ?? null;
114
114
  }
115
- // ─── transition ──────────────────────────────────────────────────────────
115
+ // --- transition ----------------------------------------------------------
116
116
  /**
117
117
  * Update a task's status in-place inside tasks.jsonl.
118
118
  *
@@ -159,7 +159,7 @@ export class TaskInbox {
159
159
  this._cache = null;
160
160
  return updated;
161
161
  }
162
- // ─── markDone / markFailed ───────────────────────────────────────────────
162
+ // --- markDone / markFailed -----------------------------------------------
163
163
  /** Convenience: mark a task as completed with a result. */
164
164
  complete(taskId, result) {
165
165
  return this.transition(taskId, "completed", { result }, {
@@ -179,7 +179,7 @@ export class TaskInbox {
179
179
  payload: { reason, attempts },
180
180
  });
181
181
  }
182
- // ─── reindex ─────────────────────────────────────────────────────────────
182
+ // --- reindex -------------------------------------------------------------
183
183
  /** Rewrite tasks.jsonl from the given task list. */
184
184
  _rewriteAll(tasks) {
185
185
  const tmp = `${this.tasksPath}.tmp`;
@@ -198,7 +198,7 @@ export class TaskInbox {
198
198
  this._rewriteAll(tasks);
199
199
  this._cache = null;
200
200
  }
201
- // ─── count ───────────────────────────────────────────────────────────────
201
+ // --- count ---------------------------------------------------------------
202
202
  /** Return counts of tasks grouped by status. */
203
203
  stats() {
204
204
  const tasks = this.list();
@@ -7,9 +7,9 @@
7
7
  * Filesystem layout:
8
8
  * ```
9
9
  * ~/.pi/harness/inbox/
10
- * ├── tasks.jsonl # task records
11
- * └── claimed/
12
- * └── <task-id>.lease.json # one lease file per claimed task
10
+ * +-- tasks.jsonl # task records
11
+ * +-- claimed/
12
+ * +-- <task-id>.lease.json # one lease file per claimed task
13
13
  * ```
14
14
  *
15
15
  * Safety properties:
@@ -20,14 +20,14 @@
20
20
  import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync, writeSync, } from "node:fs";
21
21
  import { join } from "node:path";
22
22
  import { getLeasesDir } from "./types.js";
23
- // ─── Errors ───────────────────────────────────────────────────────────────────
23
+ // --- Errors -------------------------------------------------------------------
24
24
  export class LeaseError extends Error {
25
25
  constructor(msg) {
26
26
  super(`[LeaseError] ${msg}`);
27
27
  this.name = "LeaseError";
28
28
  }
29
29
  }
30
- // ─── Constants ────────────────────────────────────────────────────────────────
30
+ // --- Constants ----------------------------------------------------------------
31
31
  /** Default lease duration before heartbeat extension is required. */
32
32
  export const DEFAULT_LEASE_TTL_MS = 30_000; // 30 s
33
33
  /** Heartbeat interval sent by the worker. */
@@ -50,7 +50,7 @@ export class LeaseManager {
50
50
  mkdirSync(this.leasesDir, { recursive: true });
51
51
  }
52
52
  }
53
- // ─── claim ───────────────────────────────────────────────────────────────
53
+ // --- claim ---------------------------------------------------------------
54
54
  /**
55
55
  * Atomically claim a task for a worker.
56
56
  *
@@ -111,7 +111,7 @@ export class LeaseManager {
111
111
  throw err;
112
112
  }
113
113
  }
114
- // ─── heartbeat ────────────────────────────────────────────────────────────
114
+ // --- heartbeat ------------------------------------------------------------
115
115
  /**
116
116
  * Extend a lease's expiry time.
117
117
  * Only the worker that holds the lease can extend it.
@@ -133,7 +133,7 @@ export class LeaseManager {
133
133
  this._writeLease(updated);
134
134
  return updated;
135
135
  }
136
- // ─── release ─────────────────────────────────────────────────────────────
136
+ // --- release -------------------------------------------------------------
137
137
  /**
138
138
  * Explicitly release a lease (task completed or failed without retry).
139
139
  */
@@ -146,7 +146,7 @@ export class LeaseManager {
146
146
  }
147
147
  this._removeLease(taskId);
148
148
  }
149
- // ─── get ─────────────────────────────────────────────────────────────────
149
+ // --- get -----------------------------------------------------------------
150
150
  /** Read a lease by taskId. Returns null if not found. */
151
151
  get(taskId) {
152
152
  const path = this._leasePath(taskId);
@@ -159,12 +159,12 @@ export class LeaseManager {
159
159
  return null;
160
160
  }
161
161
  }
162
- // ─── isExpired ────────────────────────────────────────────────────────────
162
+ // --- isExpired ------------------------------------------------------------
163
163
  /** Check if a lease has expired (expiresAt is in the past). */
164
164
  isExpired(lease) {
165
165
  return new Date(lease.expiresAt).getTime() < Date.now();
166
166
  }
167
- // ─── reap ────────────────────────────────────────────────────────────────
167
+ // --- reap ----------------------------------------------------------------
168
168
  /**
169
169
  * Scan all leases and return the ones that have expired.
170
170
  * Does NOT remove them — call reapAndRelease() to remove atomically.
@@ -214,7 +214,7 @@ export class LeaseManager {
214
214
  }
215
215
  return released;
216
216
  }
217
- // ─── recoverOrphanLeases ─────────────────────────────────────────────────
217
+ // --- recoverOrphanLeases -------------------------------------------------
218
218
  /**
219
219
  * On worker startup, release any leases held by dead workers.
220
220
  * A lease is orphaned if its worker has not re-claimed it since startup.
@@ -225,7 +225,7 @@ export class LeaseManager {
225
225
  recoverOnStartup() {
226
226
  return this.reapAndRelease();
227
227
  }
228
- // ─── listActive ───────────────────────────────────────────────────────────
228
+ // --- listActive -----------------------------------------------------------
229
229
  /** Return all active (non-expired) leases. */
230
230
  listActive() {
231
231
  if (!existsSync(this.leasesDir))
@@ -254,7 +254,7 @@ export class LeaseManager {
254
254
  }
255
255
  return active;
256
256
  }
257
- // ─── internals ───────────────────────────────────────────────────────────
257
+ // --- internals -----------------------------------------------------------
258
258
  _leasePath(taskId) {
259
259
  return join(this.leasesDir, `${taskId}.lease.json`);
260
260
  }
@@ -6,7 +6,7 @@
6
6
  * These types are the canonical contracts. Do not re-define them in other packages.
7
7
  */
8
8
  import { env } from "node:process";
9
- // ─── Storage paths ────────────────────────────────────────────────────────────
9
+ // --- Storage paths ------------------------------------------------------------
10
10
  const DEFAULT_ROOT = `${env["HOME"] ?? "."}/.pi/harness`;
11
11
  /** Returns the standard storage root for the runtime. */
12
12
  export function getRuntimeRoot() {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-runtime",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "description": "Autonomous Operations Runtime — task inbox, lease management, and worker lifecycle (RFC-0101)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",