pi-harness-runtime 0.9.25 → 1.1.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 (350) hide show
  1. package/CHANGELOG.md +49 -7
  2. package/README.md +173 -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 +5 -5
  9. package/harness/e2e/openai-quota-scraper.ts +13 -8
  10. package/harness/forked-summarizer.ts +4 -4
  11. package/harness/herdr-agents.ts +91 -0
  12. package/harness/index.ts +5 -5
  13. package/harness/loop-code-agent.ts +284 -0
  14. package/harness/loop-controller.ts +201 -0
  15. package/harness/loop-review-agent.ts +295 -0
  16. package/harness/loop-runtime.ts +10 -10
  17. package/harness/loop-types.ts +118 -0
  18. package/harness/notification-events.ts +3 -3
  19. package/harness/output-limit-handler.ts +1 -1
  20. package/harness/partial-recovery.ts +3 -3
  21. package/harness/session-memory.ts +5 -5
  22. package/index.ts +139 -34
  23. package/package.json +1 -1
  24. package/packages/a2a-adapter/package.json +1 -1
  25. package/packages/a2a-adapter/src/types.ts +5 -5
  26. package/packages/auth/package.json +1 -1
  27. package/packages/autonomous-refactor/package.json +1 -1
  28. package/packages/autonomous-runtime/dist/inbox.d.ts +3 -3
  29. package/packages/autonomous-runtime/dist/inbox.js +12 -12
  30. package/packages/autonomous-runtime/dist/lease.js +14 -14
  31. package/packages/autonomous-runtime/dist/types.js +1 -1
  32. package/packages/autonomous-runtime/package.json +1 -1
  33. package/packages/autonomous-runtime/src/inbox.ts +12 -12
  34. package/packages/autonomous-runtime/src/lease.ts +15 -15
  35. package/packages/autonomous-runtime/src/types.ts +13 -13
  36. package/packages/autonomous-runtime/tsconfig.tsbuildinfo +1 -1
  37. package/packages/cache-strategy/package.json +1 -1
  38. package/packages/capability-registry/dist/types.js +1 -1
  39. package/packages/capability-registry/package.json +1 -1
  40. package/packages/capability-registry/src/types.ts +5 -5
  41. package/packages/checkpoint/README.md +6 -6
  42. package/packages/checkpoint/dist/differ.js +2 -2
  43. package/packages/checkpoint/dist/engine.js +3 -3
  44. package/packages/checkpoint/dist/index.js +5 -5
  45. package/packages/checkpoint/dist/storage.js +3 -3
  46. package/packages/checkpoint/dist/types.js +1 -1
  47. package/packages/checkpoint/package.json +1 -1
  48. package/packages/checkpoint/src/differ.ts +2 -2
  49. package/packages/checkpoint/src/engine.ts +3 -3
  50. package/packages/checkpoint/src/index.ts +5 -5
  51. package/packages/checkpoint/src/storage.ts +3 -3
  52. package/packages/checkpoint/src/types.ts +10 -10
  53. package/packages/checkpoint/tsconfig.tsbuildinfo +1 -1
  54. package/packages/cli-plugin-sdk/package.json +1 -1
  55. package/packages/clipboard/dist/src/clipboard.d.ts.map +1 -1
  56. package/packages/clipboard/dist/src/clipboard.js +15 -7
  57. package/packages/clipboard/dist/src/clipboard.js.map +1 -1
  58. package/packages/clipboard/dist/src/copy-sync.d.ts +27 -0
  59. package/packages/clipboard/dist/src/copy-sync.d.ts.map +1 -0
  60. package/packages/clipboard/dist/src/copy-sync.js +170 -0
  61. package/packages/clipboard/dist/src/copy-sync.js.map +1 -0
  62. package/packages/clipboard/dist/src/gist-relay.d.ts +48 -0
  63. package/packages/clipboard/dist/src/gist-relay.d.ts.map +1 -0
  64. package/packages/clipboard/dist/src/gist-relay.js +186 -0
  65. package/packages/clipboard/dist/src/gist-relay.js.map +1 -0
  66. package/packages/clipboard/dist/src/github-login.d.ts +16 -0
  67. package/packages/clipboard/dist/src/github-login.d.ts.map +1 -0
  68. package/packages/clipboard/dist/src/github-login.js +69 -0
  69. package/packages/clipboard/dist/src/github-login.js.map +1 -0
  70. package/packages/clipboard/dist/src/index.d.ts +2 -0
  71. package/packages/clipboard/dist/src/index.d.ts.map +1 -1
  72. package/packages/clipboard/dist/src/index.js +2 -1
  73. package/packages/clipboard/dist/src/index.js.map +1 -1
  74. package/packages/clipboard/package.json +1 -1
  75. package/packages/clipboard/src/clipboard.ts +16 -9
  76. package/packages/clipboard/src/copy-sync.ts +201 -0
  77. package/packages/clipboard/src/gist-relay.ts +240 -0
  78. package/packages/clipboard/src/github-login.ts +107 -0
  79. package/packages/clipboard/src/index.ts +2 -0
  80. package/packages/clipboard/test/mojibake.test.mjs +143 -0
  81. package/packages/code-generation/README.md +13 -13
  82. package/packages/code-generation/dist/faker.js +4 -4
  83. package/packages/code-generation/dist/generator.js +3 -3
  84. package/packages/code-generation/dist/index.js +3 -3
  85. package/packages/code-generation/dist/templates/registry.js +1 -1
  86. package/packages/code-generation/dist/types.js +1 -1
  87. package/packages/code-generation/package.json +1 -1
  88. package/packages/code-generation/src/faker.ts +5 -5
  89. package/packages/code-generation/src/generator.ts +4 -4
  90. package/packages/code-generation/src/index.ts +3 -3
  91. package/packages/code-generation/src/templates/registry.ts +1 -1
  92. package/packages/code-generation/src/types.ts +10 -10
  93. package/packages/code-generation/tsconfig.tsbuildinfo +1 -1
  94. package/packages/code-review/README.md +13 -13
  95. package/packages/code-review/dist/engine.js +3 -3
  96. package/packages/code-review/dist/index.js +3 -3
  97. package/packages/code-review/dist/types.js +1 -1
  98. package/packages/code-review/package.json +1 -1
  99. package/packages/code-review/src/engine.ts +3 -3
  100. package/packages/code-review/src/index.ts +3 -3
  101. package/packages/code-review/src/types.ts +10 -10
  102. package/packages/code-review/tsconfig.tsbuildinfo +1 -1
  103. package/packages/codex-adapter/package.json +1 -1
  104. package/packages/context-compiler/dist/compiler.js +1 -1
  105. package/packages/context-compiler/package.json +1 -1
  106. package/packages/context-compiler/src/compiler.ts +1 -1
  107. package/packages/context-compiler/src/types.ts +11 -11
  108. package/packages/context-compiler/test/context-compiler.test.ts +11 -11
  109. package/packages/context-discovery/package.json +1 -1
  110. package/packages/context-manager/package.json +1 -1
  111. package/packages/cookie-sanitizer/README.md +27 -27
  112. package/packages/cookie-sanitizer/package.json +1 -1
  113. package/packages/cost-optimizer/package.json +1 -1
  114. package/packages/cost-optimizer/src/types.ts +5 -5
  115. package/packages/dependency-analyzer/package.json +1 -1
  116. package/packages/django-plugin/dist/analyzer.js +7 -7
  117. package/packages/django-plugin/package.json +1 -1
  118. package/packages/django-plugin/src/analyzer.ts +7 -7
  119. package/packages/doc-generator/package.json +1 -1
  120. package/packages/evaluation-engine/dist/engine.js +9 -9
  121. package/packages/evaluation-engine/package.json +1 -1
  122. package/packages/evaluation-engine/src/engine.ts +9 -9
  123. package/packages/evaluation-engine/src/types.ts +3 -3
  124. package/packages/evaluation-runner/package.json +1 -1
  125. package/packages/event-bus/dist/src/herdr-bus.d.ts +121 -0
  126. package/packages/event-bus/dist/src/herdr-bus.d.ts.map +1 -0
  127. package/packages/event-bus/dist/src/herdr-bus.js +322 -0
  128. package/packages/event-bus/dist/src/herdr-bus.js.map +1 -0
  129. package/packages/event-bus/dist/src/index.d.ts +2 -0
  130. package/packages/event-bus/dist/src/index.d.ts.map +1 -1
  131. package/packages/event-bus/dist/src/index.js +1 -0
  132. package/packages/event-bus/dist/src/index.js.map +1 -1
  133. package/packages/event-bus/package.json +1 -1
  134. package/packages/event-bus/src/herdr-bus.ts +525 -0
  135. package/packages/event-bus/src/index.ts +29 -0
  136. package/packages/event-store/package.json +1 -1
  137. package/packages/experience-replay/dist/replay.js +7 -7
  138. package/packages/experience-replay/package.json +1 -1
  139. package/packages/experience-replay/src/replay.ts +7 -7
  140. package/packages/experience-replay/src/types.ts +5 -5
  141. package/packages/feedback-collector/package.json +1 -1
  142. package/packages/framework-detector/README.md +18 -18
  143. package/packages/framework-detector/dist/detector.js +3 -3
  144. package/packages/framework-detector/dist/index.js +3 -3
  145. package/packages/framework-detector/dist/signatures/registry.js +24 -24
  146. package/packages/framework-detector/dist/types.js +1 -1
  147. package/packages/framework-detector/package.json +1 -1
  148. package/packages/framework-detector/src/detector.ts +3 -3
  149. package/packages/framework-detector/src/index.ts +3 -3
  150. package/packages/framework-detector/src/signatures/registry.ts +24 -24
  151. package/packages/framework-detector/src/types.ts +7 -7
  152. package/packages/framework-detector/tsconfig.tsbuildinfo +1 -1
  153. package/packages/framework-plugin-sdk/README.md +23 -23
  154. package/packages/framework-plugin-sdk/dist/index.js +2 -2
  155. package/packages/framework-plugin-sdk/dist/manager.js +3 -3
  156. package/packages/framework-plugin-sdk/dist/types.js +2 -2
  157. package/packages/framework-plugin-sdk/package.json +1 -1
  158. package/packages/framework-plugin-sdk/src/index.ts +2 -2
  159. package/packages/framework-plugin-sdk/src/manager.ts +3 -3
  160. package/packages/framework-plugin-sdk/src/types.ts +10 -10
  161. package/packages/framework-plugin-sdk/tsconfig.tsbuildinfo +1 -1
  162. package/packages/frappe-plugin/dist/analyzer.js +8 -8
  163. package/packages/frappe-plugin/dist/types.js +1 -1
  164. package/packages/frappe-plugin/package.json +1 -1
  165. package/packages/frappe-plugin/src/analyzer.ts +8 -8
  166. package/packages/frappe-plugin/src/types.ts +10 -10
  167. package/packages/generic-web-plugin/dist/analyzer.js +5 -5
  168. package/packages/generic-web-plugin/package.json +1 -1
  169. package/packages/generic-web-plugin/src/analyzer.ts +5 -5
  170. package/packages/health-monitor/package.json +1 -1
  171. package/packages/health-monitor/src/monitor.ts +1 -1
  172. package/packages/intent-analyzer/package.json +1 -1
  173. package/packages/laravel-plugin/dist/analyzer.js +11 -11
  174. package/packages/laravel-plugin/package.json +1 -1
  175. package/packages/laravel-plugin/src/analyzer.ts +11 -11
  176. package/packages/learning-engine/dist/engine.js +5 -5
  177. package/packages/learning-engine/dist/types.js +1 -1
  178. package/packages/learning-engine/package.json +1 -1
  179. package/packages/learning-engine/src/engine.ts +5 -5
  180. package/packages/learning-engine/src/types.ts +6 -6
  181. package/packages/mcp-adapter/package.json +1 -1
  182. package/packages/memory-engine/dist/engine.js +8 -8
  183. package/packages/memory-engine/dist/types.js +2 -2
  184. package/packages/memory-engine/package.json +1 -1
  185. package/packages/memory-engine/src/engine.ts +8 -8
  186. package/packages/memory-engine/src/types.ts +9 -9
  187. package/packages/model-registry/package.json +1 -1
  188. package/packages/model-registry/src/types.ts +4 -4
  189. package/packages/nextjs-plugin/dist/analyzer.js +9 -9
  190. package/packages/nextjs-plugin/package.json +1 -1
  191. package/packages/nextjs-plugin/src/analyzer.ts +9 -9
  192. package/packages/notification/dist/notification-center.js +1 -1
  193. package/packages/notification/package.json +1 -1
  194. package/packages/notification/src/notification-center.ts +1 -1
  195. package/packages/observability/dist/alerts.js +2 -2
  196. package/packages/observability/dist/health.js +4 -4
  197. package/packages/observability/dist/index.js +6 -6
  198. package/packages/observability/dist/logger.js +7 -7
  199. package/packages/observability/dist/metrics.js +11 -11
  200. package/packages/observability/dist/tracer.js +3 -3
  201. package/packages/observability/dist/types.js +1 -1
  202. package/packages/observability/package.json +1 -1
  203. package/packages/observability/src/alerts.ts +2 -2
  204. package/packages/observability/src/health.ts +4 -4
  205. package/packages/observability/src/index.ts +6 -6
  206. package/packages/observability/src/logger.ts +7 -7
  207. package/packages/observability/src/metrics.ts +11 -11
  208. package/packages/observability/src/tracer.ts +3 -3
  209. package/packages/observability/src/types.ts +7 -7
  210. package/packages/observability/test/observability.test.ts +4 -4
  211. package/packages/observability/tsconfig.tsbuildinfo +1 -1
  212. package/packages/performance-optimizer/dist/optimizer.js +1 -1
  213. package/packages/performance-optimizer/package.json +1 -1
  214. package/packages/performance-optimizer/src/optimizer.ts +1 -1
  215. package/packages/performance-optimizer/src/types.ts +4 -4
  216. package/packages/privilege-broker/package.json +1 -1
  217. package/packages/project-analyzer/dist/analyzer.js +4 -4
  218. package/packages/project-analyzer/dist/index.js +8 -8
  219. package/packages/project-analyzer/dist/signals.js +3 -3
  220. package/packages/project-analyzer/dist/types.js +1 -1
  221. package/packages/project-analyzer/package.json +1 -1
  222. package/packages/project-analyzer/src/analyzer.ts +4 -4
  223. package/packages/project-analyzer/src/index.ts +9 -9
  224. package/packages/project-analyzer/src/signals.ts +4 -4
  225. package/packages/project-analyzer/src/types.ts +15 -15
  226. package/packages/project-analyzer/test/index.test.ts +17 -17
  227. package/packages/project-analyzer/tsconfig.tsbuildinfo +1 -1
  228. package/packages/projection-engine/package.json +1 -1
  229. package/packages/prompt-compiler/dist/section-builder.js +1 -1
  230. package/packages/prompt-compiler/dist/types.js +3 -3
  231. package/packages/prompt-compiler/package.json +1 -1
  232. package/packages/prompt-compiler/src/section-builder.ts +1 -1
  233. package/packages/prompt-compiler/src/types.ts +12 -12
  234. package/packages/prompt-compiler/test/prompt-compiler.test.ts +12 -12
  235. package/packages/prompt-versioning/package.json +1 -1
  236. package/packages/provider-adapter-sdk/dist/builder.js +1 -1
  237. package/packages/provider-adapter-sdk/dist/index.js +5 -5
  238. package/packages/provider-adapter-sdk/dist/registry.js +1 -1
  239. package/packages/provider-adapter-sdk/dist/tester.js +1 -1
  240. package/packages/provider-adapter-sdk/dist/types.js +1 -1
  241. package/packages/provider-adapter-sdk/package.json +1 -1
  242. package/packages/provider-adapter-sdk/src/builder.ts +1 -1
  243. package/packages/provider-adapter-sdk/src/index.ts +6 -6
  244. package/packages/provider-adapter-sdk/src/registry.ts +1 -1
  245. package/packages/provider-adapter-sdk/src/tester.ts +1 -1
  246. package/packages/provider-adapter-sdk/src/types.ts +5 -5
  247. package/packages/provider-adapter-sdk/tsconfig.tsbuildinfo +1 -1
  248. package/packages/provider-router/package.json +1 -1
  249. package/packages/provider-router/src/types.ts +4 -4
  250. package/packages/provider-selector/package.json +1 -1
  251. package/packages/providers/dist/deepagents-adapter.js +1 -1
  252. package/packages/providers/package.json +1 -1
  253. package/packages/providers/src/deepagents-adapter.ts +1 -1
  254. package/packages/quota-manager/package.json +1 -1
  255. package/packages/rate-limiter/package.json +1 -1
  256. package/packages/react-vite-plugin/dist/analyzer.js +7 -7
  257. package/packages/react-vite-plugin/package.json +1 -1
  258. package/packages/react-vite-plugin/src/analyzer.ts +7 -7
  259. package/packages/release-manager/package.json +1 -1
  260. package/packages/requirement-compiler/dist/compiler.js +17 -17
  261. package/packages/requirement-compiler/dist/types.js +2 -2
  262. package/packages/requirement-compiler/package.json +1 -1
  263. package/packages/requirement-compiler/src/compiler.ts +17 -17
  264. package/packages/requirement-compiler/src/types.ts +21 -21
  265. package/packages/requirement-compiler/test/requirement-compiler.test.ts +17 -17
  266. package/packages/runtime/dist/command-executor.js +1 -1
  267. package/packages/runtime/dist/local-runtime-agent.js +1 -1
  268. package/packages/runtime/dist/policy-engine.js +1 -1
  269. package/packages/runtime/dist/runtime-api.js +1 -1
  270. package/packages/runtime/dist/workspace-manager.js +1 -1
  271. package/packages/runtime/package.json +1 -1
  272. package/packages/runtime/src/command-executor.ts +1 -1
  273. package/packages/runtime/src/local-runtime-agent.ts +1 -1
  274. package/packages/runtime/src/policy-engine.ts +1 -1
  275. package/packages/runtime/src/runtime-api.ts +1 -1
  276. package/packages/runtime/src/workspace-manager.ts +1 -1
  277. package/packages/scheduler/package.json +1 -1
  278. package/packages/scheduler-adapter/package.json +1 -1
  279. package/packages/session/README.md +18 -18
  280. package/packages/session/dist/history.js +3 -3
  281. package/packages/session/dist/index.js +5 -5
  282. package/packages/session/dist/manager.js +3 -3
  283. package/packages/session/dist/policy.js +2 -2
  284. package/packages/session/dist/store.js +2 -2
  285. package/packages/session/dist/types.js +1 -1
  286. package/packages/session/package.json +1 -1
  287. package/packages/session/src/history.ts +3 -3
  288. package/packages/session/src/index.ts +5 -5
  289. package/packages/session/src/manager.ts +3 -3
  290. package/packages/session/src/policy.ts +4 -4
  291. package/packages/session/src/store.ts +3 -3
  292. package/packages/session/src/types.ts +10 -10
  293. package/packages/session/tsconfig.tsbuildinfo +1 -1
  294. package/packages/session-api/package.json +1 -1
  295. package/packages/session-export/package.json +1 -1
  296. package/packages/shared-context/package.json +1 -1
  297. package/packages/skill-registry/package.json +1 -1
  298. package/packages/skill-registry/src/types.ts +4 -4
  299. package/packages/sprint-planner/package.json +1 -1
  300. package/packages/subscription-engine/package.json +1 -1
  301. package/packages/task-compiler/dist/compiler.js +7 -7
  302. package/packages/task-compiler/dist/decompose.js +11 -11
  303. package/packages/task-compiler/dist/file-scope.js +6 -6
  304. package/packages/task-compiler/dist/graph.js +6 -6
  305. package/packages/task-compiler/dist/index.js +2 -2
  306. package/packages/task-compiler/dist/types.js +5 -5
  307. package/packages/task-compiler/dist/validate.js +2 -2
  308. package/packages/task-compiler/dist/verification.js +2 -2
  309. package/packages/task-compiler/package.json +1 -1
  310. package/packages/task-compiler/src/command-policy.ts +1 -1
  311. package/packages/task-compiler/src/compiler.ts +7 -7
  312. package/packages/task-compiler/src/decompose.ts +11 -11
  313. package/packages/task-compiler/src/file-scope.ts +6 -6
  314. package/packages/task-compiler/src/graph.ts +6 -6
  315. package/packages/task-compiler/src/index.ts +3 -3
  316. package/packages/task-compiler/src/types.ts +14 -14
  317. package/packages/task-compiler/src/validate.ts +2 -2
  318. package/packages/task-compiler/src/verification.ts +2 -2
  319. package/packages/task-compiler/test/task-compiler.test.ts +10 -10
  320. package/packages/test-data-generator/README.md +13 -13
  321. package/packages/test-data-generator/dist/faker-adapter.js +4 -4
  322. package/packages/test-data-generator/dist/generator.js +3 -3
  323. package/packages/test-data-generator/dist/index.js +3 -3
  324. package/packages/test-data-generator/dist/types.js +1 -1
  325. package/packages/test-data-generator/package.json +1 -1
  326. package/packages/test-data-generator/src/faker-adapter.ts +4 -4
  327. package/packages/test-data-generator/src/generator.ts +3 -3
  328. package/packages/test-data-generator/src/index.ts +3 -3
  329. package/packages/test-data-generator/src/types.ts +9 -9
  330. package/packages/test-data-generator/tsconfig.tsbuildinfo +1 -1
  331. package/packages/test-generator/package.json +1 -1
  332. package/packages/todo-bd-sync/package.json +22 -0
  333. package/packages/todo-bd-sync/src/detector.ts +150 -0
  334. package/packages/todo-bd-sync/src/extension.ts +101 -0
  335. package/packages/todo-bd-sync/src/index.ts +401 -0
  336. package/packages/todo-bd-sync/src/sync.ts +322 -0
  337. package/packages/todo-bd-sync/src/todo-reminder.ts +418 -0
  338. package/packages/todo-bd-sync/src/types.ts +137 -0
  339. package/packages/token-estimation/package.json +1 -1
  340. package/packages/token-optimizer/package.json +1 -1
  341. package/packages/tui/package.json +1 -1
  342. package/packages/types/package.json +1 -1
  343. package/packages/types/src/agent-worker-types.ts +5 -5
  344. package/packages/types/src/runtime-types.ts +12 -12
  345. package/packages/types/tsconfig.tsbuildinfo +1 -1
  346. package/packages/workflow-events/package.json +1 -1
  347. package/packages/workspace-scanner/package.json +1 -1
  348. package/packages/worktree/package.json +1 -1
  349. package/renderer.ts +7 -7
  350. package/skills/harness-runtime/SKILL.md +15 -15
@@ -73,7 +73,7 @@ export class HarnessNotificationEvents {
73
73
  return this.center.listChannels();
74
74
  }
75
75
 
76
- // ─── Event Emitters ────────────────────────────────────────────────
76
+ // --- Event Emitters ------------------------------------------------
77
77
 
78
78
  /**
79
79
  * Emit JobStarted event
@@ -173,7 +173,7 @@ export class HarnessNotificationEvents {
173
173
  await this.emit("Error", { error });
174
174
  }
175
175
 
176
- // ─── State Machine Event Listeners ─────────────────────────────────
176
+ // --- State Machine Event Listeners ---------------------------------
177
177
 
178
178
  /**
179
179
  * Wire up with JobStateMachine to emit events on transitions
@@ -207,7 +207,7 @@ export class HarnessNotificationEvents {
207
207
  }
208
208
  }
209
209
 
210
- // ─── Private Methods ───────────────────────────────────────────────
210
+ // --- Private Methods -----------------------------------------------
211
211
 
212
212
  private async emit(
213
213
  event: NotificationEvent,
@@ -277,7 +277,7 @@ export class OutputLimitHandler {
277
277
  return this.attempts >= this.maxAttempts;
278
278
  }
279
279
 
280
- // ─── Private Methods ────────────────────────────────────────────────
280
+ // --- Private Methods ------------------------------------------------
281
281
 
282
282
  private ensureDir(): void {
283
283
  if (!existsSync(this.rootDir)) {
@@ -70,7 +70,7 @@ export class PartialRecovery {
70
70
  this.loadExistingPartials();
71
71
  }
72
72
 
73
- // ─── Public API ───────────────────────────────────────────────────────────
73
+ // --- Public API -----------------------------------------------------------
74
74
 
75
75
  /**
76
76
  * Save a partial response
@@ -285,7 +285,7 @@ export class PartialRecovery {
285
285
  }
286
286
  }
287
287
 
288
- // ─── Private Methods ────────────────────────────────────────────────
288
+ // --- Private Methods ------------------------------------------------
289
289
 
290
290
  private ensureDir(): void {
291
291
  if (!existsSync(this.rootDir)) {
@@ -517,7 +517,7 @@ export class PartialRecovery {
517
517
  }
518
518
  }
519
519
 
520
- // ─── Factory ────────────────────────────────────────────────────────────────
520
+ // --- Factory ----------------------------------------------------------------
521
521
 
522
522
  /**
523
523
  * Create a PartialRecovery manager for a task
@@ -11,7 +11,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
11
11
  import { join } from "node:path";
12
12
  import type { CompactableMessage } from "../packages/types/src/runtime-types.js";
13
13
 
14
- // ─── Types ──────────────────────────────────────────────────────────────────
14
+ // --- Types ------------------------------------------------------------------
15
15
 
16
16
  export interface SessionMemory {
17
17
  jobId: string;
@@ -41,7 +41,7 @@ export interface TestResult {
41
41
  timestamp: string;
42
42
  }
43
43
 
44
- // ─── Session Memory Manager ─────────────────────────────────────────────────
44
+ // --- Session Memory Manager -------------------------------------------------
45
45
 
46
46
  export class SessionMemoryManager {
47
47
  private memory: SessionMemory;
@@ -66,7 +66,7 @@ export class SessionMemoryManager {
66
66
  };
67
67
  }
68
68
 
69
- // ─── Public API ───────────────────────────────────────────────────────────
69
+ // --- Public API -----------------------------------------------------------
70
70
 
71
71
  /**
72
72
  * Extract key facts from recent messages
@@ -362,7 +362,7 @@ export class SessionMemoryManager {
362
362
  this.save();
363
363
  }
364
364
 
365
- // ─── Private Methods ──────────────────────────────────────────────────
365
+ // --- Private Methods --------------------------------------------------
366
366
 
367
367
  private load(): SessionMemory | null {
368
368
  if (!existsSync(this.memoryPath)) {
@@ -388,7 +388,7 @@ export class SessionMemoryManager {
388
388
  }
389
389
  }
390
390
 
391
- // ─── Factory ────────────────────────────────────────────────────────────────
391
+ // --- Factory ----------------------------------------------------------------
392
392
 
393
393
  /**
394
394
  * Create a SessionMemoryManager for a job
package/index.ts CHANGED
@@ -13,6 +13,7 @@
13
13
  * Runs directly from Bun.
14
14
  */
15
15
 
16
+ import { Key } from "@earendil-works/pi-tui";
16
17
  import type {
17
18
  CompactOptions,
18
19
  ExtensionAPI,
@@ -39,6 +40,8 @@ import {
39
40
  } from "./packages/quota-manager/src/tui-usage-monitor.ts";
40
41
  import { QuotaManager } from "./packages/quota-manager/src/quota-manager.ts";
41
42
  import { buildFooterStatusValue } from "./footer-status.ts";
43
+ import { registerGithubLoginCommand } from "./packages/clipboard/src/github-login.js";
44
+ import { registerCopySyncShortcut } from "./packages/clipboard/src/copy-sync.js";
42
45
  import {
43
46
  MAX_PROACTIVE_COMPACT_FAILURES,
44
47
  OUTPUT_LIMIT_RESUME_PROMPT,
@@ -64,17 +67,30 @@ import {
64
67
  createBlackboard,
65
68
  } from "./harness/blackboard.ts";
66
69
  import { scheduleAutoResume, cancelAutoResume } from "./harness/index.js";
70
+
71
+ // --- todo-bd-sync: Two-way sync between rpiv-todo and bd --------------------
72
+ // Lazy import - only loads when packages/todo-bd-sync exists
73
+ async function initTodoBdSync(pi: ExtensionAPI): Promise<void> {
74
+ try {
75
+ const mod = await import("./packages/todo-bd-sync/src/extension.js");
76
+ mod.registerTodoBdSync(pi, { debug: false });
77
+ } catch {
78
+ // todo-bd-sync not available
79
+ }
80
+ }
67
81
  import { homedir } from "node:os";
68
82
  import { appendFileSync, existsSync, mkdirSync } from "node:fs";
69
83
  import { join } from "node:path";
70
84
 
71
- // ─── Debug log → file instead of TUI ─────────────────────────────────
85
+ // --- Debug log → file instead of TUI ---------------------------------
72
86
  const DEBUG_LOG_DIR = join(homedir(), ".pi", "harness-logs");
73
87
  const DEBUG_LOG_PATH = join(DEBUG_LOG_DIR, "harness-debug.log");
74
88
 
75
89
  try {
76
90
  if (!existsSync(DEBUG_LOG_DIR)) mkdirSync(DEBUG_LOG_DIR, { recursive: true });
77
- } catch { /* non-fatal */ }
91
+ } catch {
92
+ /* non-fatal */
93
+ }
78
94
 
79
95
  // Write harness runtime logs to file only (NOT to TUI stdout)
80
96
  function _debugLog(...args: unknown[]): void {
@@ -82,14 +98,16 @@ function _debugLog(...args: unknown[]): void {
82
98
  const line =
83
99
  new Date().toISOString() +
84
100
  " " +
85
- args.map((a) => (typeof a === "object" ? JSON.stringify(a) : String(a))).join(" ");
101
+ args
102
+ .map((a) => (typeof a === "object" ? JSON.stringify(a) : String(a)))
103
+ .join(" ");
86
104
  appendFileSync(DEBUG_LOG_PATH, line + "\n");
87
105
  } catch {
88
106
  // non-fatal
89
107
  }
90
108
  }
91
109
 
92
- // ─── Selective console override — harness DEBUG → file only ────────
110
+ // --- Selective console override — harness DEBUG → file only --------
93
111
  // Real errors (no [DEBUG prefix) still print to TUI so you notice problems.
94
112
  const _origLog = console.log.bind(console);
95
113
  const _origError = console.error.bind(console);
@@ -108,7 +126,7 @@ console.error = (...args: unknown[]) => {
108
126
  }
109
127
  };
110
128
 
111
- // ─── Harness Runtime State ────────────────────────────────────────────
129
+ // --- Harness Runtime State --------------------------------------------
112
130
  const HARNESS_ROOT_DIR = join(homedir(), ".pi", "harness");
113
131
 
114
132
  interface HarnessSession {
@@ -207,7 +225,32 @@ export default function (pi: ExtensionAPI) {
207
225
  const mirrorStore = new MirrorStore();
208
226
  ensureHarnessDir();
209
227
 
210
- // ─── Auto-track every assistant message ──────────────────────────────
228
+ // --- todo-bd-sync: Initialize two-way sync with bd ---------------
229
+ // Start async init but don't await - runs in background
230
+ void initTodoBdSync(pi);
231
+
232
+ // --- Auto-Invoke rpiv-todo via System Prompt ------------------------
233
+ // This makes the todo overlay ALWAYS activate at session start
234
+ const AUTO_TODO_INVOKE_HINT = `
235
+
236
+ You have access to a todo tool that shows a persistent task overlay.
237
+ ALWAYS use it at the START of every session to capture user requirements as tasks.
238
+ When the user gives you a multi-step task:
239
+ 1. Immediately create todo items for each step using the todo tool
240
+ 2. Keep tasks updated - mark in_progress when working, completed when done
241
+ 3. When a task is completed, continue to the next or ask the user
242
+
243
+ The todo overlay persists and helps track progress across your conversation.
244
+ `;
245
+ let firstAgentStart = true;
246
+ pi.on("before_agent_start", async (event) => {
247
+ if (firstAgentStart) {
248
+ event.systemPrompt += AUTO_TODO_INVOKE_HINT;
249
+ firstAgentStart = false;
250
+ }
251
+ });
252
+
253
+ // --- Auto-track every assistant message ------------------------------
211
254
  pi.on("message_end", async (event, ctx) => {
212
255
  if (isOutputLimitResumePromptMessage(event.message)) {
213
256
  pendingOutputLimitResumeAfterSettled = false;
@@ -274,7 +317,7 @@ export default function (pi: ExtensionAPI) {
274
317
  }
275
318
  });
276
319
 
277
- // ─── Smart quota fetch for MiniMax status ────────────────────────
320
+ // --- Smart quota fetch for MiniMax status ------------------------
278
321
  const MINIMAX_REFRESH_MIN_INTERVAL_MS = 15 * 60 * 1000;
279
322
  const MINIMAX_REFRESH_TOKEN_THRESHOLD = 200_000;
280
323
  const MINIMAX_REFRESH_REQUEST_THRESHOLD = 12;
@@ -282,12 +325,12 @@ export default function (pi: ExtensionAPI) {
282
325
  ? new MiniMaxQuotaScraper({ cookieFile: process.env.QUOTA_COOKIE_FILE })
283
326
  : new MiniMaxQuotaScraper();
284
327
 
285
- // ─── Smart quota fetch for OpenAI status ─────────────────────────
328
+ // --- Smart quota fetch for OpenAI status -------------------------
286
329
  const OPENAI_REFRESH_MIN_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes
287
- const _openaiQuotaScraper = new OpenAIQuotaScraper();
330
+ const _openaiQuotaScraper = new OpenAIQuotaScraper({ quiet: true });
288
331
  let lastOpenAIQuotaFetchAt = 0;
289
332
 
290
- // ─── Cookie sanitizer integration ────────────────────────────────────
333
+ // --- Cookie sanitizer integration ------------------------------------
291
334
  // The drop folder is the user-facing, forgiving input. The canonical
292
335
  // cache (`~/.config/minimax-cookies.txt`) is the runtime-owned,
293
336
  // normalized output that `MiniMaxQuotaScraper` reads. Either being
@@ -310,7 +353,7 @@ export default function (pi: ExtensionAPI) {
310
353
 
311
354
  const cookieQuotaAutoFetchAvailable = hasCookieSource();
312
355
 
313
- // ─── TUI quota signal plumbing (OpenAI / GLM / Anthropic / OpenRouter) ──
356
+ // --- TUI quota signal plumbing (OpenAI / GLM / Anthropic / OpenRouter) --
314
357
  // The TUIUsageMonitor parses provider quota-exhaustion messages from pi's
315
358
  // TUI / message stream and emits signals we write to per-provider mirror
316
359
  // entries. For providers that don't expose a continuous usage API this is
@@ -339,10 +382,12 @@ export default function (pi: ExtensionAPI) {
339
382
  }
340
383
  });
341
384
 
385
+ let lastQuotaAutoFetchAt = 0;
386
+
342
387
  // Live watcher — sanitises on every change in the drop folder.
343
388
  const cookieWatcher = new CookieWatcher({
344
389
  dropDir: cookieDropDir,
345
- syncOptions: { cachePath: cookieCachePath },
390
+ syncOptions: { cachePath: cookieCachePath, providerHint: "minimax" },
346
391
  onEvent: (event) => {
347
392
  if (event.kind === "sync-error" || event.kind === "watcher-error") {
348
393
  const msg = "message" in event ? event.message : "";
@@ -365,8 +410,12 @@ export default function (pi: ExtensionAPI) {
365
410
  }
366
411
  },
367
412
  });
413
+
368
414
  try {
369
415
  cookieWatcher.start();
416
+ // Sync existing drop-folder cookies now (ignoreInitial: true means
417
+ // the watcher won't do this automatically on startup).
418
+ cookieWatcher.triggerNow();
370
419
  } catch (e) {
371
420
  const msg = e instanceof Error ? e.message : String(e);
372
421
  if (msg.includes("ENOSPC")) {
@@ -389,7 +438,6 @@ export default function (pi: ExtensionAPI) {
389
438
  let footerStatusCtx: {
390
439
  ui: { setStatus: (key: string, value: string) => void };
391
440
  } | null = null;
392
- let lastQuotaAutoFetchAt = 0;
393
441
  let quotaAutoFetchInFlight = false;
394
442
  let proactiveCompactInFlight = false;
395
443
  let lastProactiveCompactAt = 0;
@@ -399,6 +447,49 @@ export default function (pi: ExtensionAPI) {
399
447
  let pendingOutputLimitResumeAfterCompact = false;
400
448
  let pendingOutputLimitResumeAfterSettled = false;
401
449
 
450
+ // --- Context-usage escalating warning tiers -----------------------------
451
+ // Amber at 75%, red at 85%. No notify above 90% (proactive compact handles it).
452
+ // Per-session dedup: only notify when crossing INTO a new higher tier.
453
+ const TIER_WARNING = 0.75; // amber
454
+ const TIER_ERROR = 0.85; // red
455
+ let lastNotifiedTier: "none" | "warning" | "error" = "none";
456
+
457
+ function maybeNotifyContextUsage(ctx: ExtensionContext): void {
458
+ const usage = ctx.getContextUsage();
459
+ const pct = usage?.percent;
460
+ if (pct === null || pct === undefined) return;
461
+ if (pct >= 0.9) return; // proactive compact handles 90%+
462
+
463
+ const tier: "none" | "warning" | "error" =
464
+ pct >= TIER_ERROR ? "error" : pct >= TIER_WARNING ? "warning" : "none";
465
+
466
+ // Only notify when crossing into a strictly higher tier
467
+ if (tier === "none") {
468
+ lastNotifiedTier = "none";
469
+ return;
470
+ }
471
+ if (
472
+ tier === "warning" &&
473
+ lastNotifiedTier !== "warning" &&
474
+ lastNotifiedTier !== "error"
475
+ ) {
476
+ lastNotifiedTier = "warning";
477
+ ctx.ui.notify(
478
+ `Context at ${Math.round(pct * 100)}% — consider condensing`,
479
+ "info",
480
+ );
481
+ return;
482
+ }
483
+ if (tier === "error" && lastNotifiedTier !== "error") {
484
+ lastNotifiedTier = "error";
485
+ ctx.ui.notify(
486
+ `Context at ${Math.round(pct * 100)}% — approaching limit`,
487
+ "warning",
488
+ );
489
+ return;
490
+ }
491
+ }
492
+
402
493
  function writeMirrorRecord(
403
494
  provider: ProviderId,
404
495
  record: Omit<import("./mirror.js").ProviderMirrorRecord, "provider">,
@@ -692,7 +783,7 @@ export default function (pi: ExtensionAPI) {
692
783
  return;
693
784
  }
694
785
 
695
- // ─── /usage — show full status ───────────────────────────────────────
786
+ // --- /usage — show full status ---------------------------------------
696
787
  pi.registerCommand("usage", {
697
788
  description: "Show Codex-style usage status (local + provider mirror)",
698
789
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -710,7 +801,7 @@ export default function (pi: ExtensionAPI) {
710
801
  },
711
802
  });
712
803
 
713
- // ─── /usage refresh — force auto-fetch ────────────────────────────
804
+ // --- /usage refresh — force auto-fetch ----------------------------
714
805
  pi.registerCommand("usage-refresh", {
715
806
  description: "Force refresh quota from provider console",
716
807
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -735,14 +826,14 @@ export default function (pi: ExtensionAPI) {
735
826
  },
736
827
  });
737
828
 
738
- // ─── /usage today — focused view ─────────────────────────────────────
829
+ // --- /usage today — focused view -------------------------------------
739
830
  pi.registerCommand("usage-today", {
740
831
  description: "Show today's usage + 5h window",
741
832
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
742
833
  const local = aggregateWindows(tracker.all());
743
834
  const lines = [
744
835
  " Today's usage",
745
- "─────────────────────────────────────",
836
+ "-------------------------------------",
746
837
  ` Model: ${ctx.model?.id ?? "unknown"}`,
747
838
  ` Today: ${local.today.tokens} tokens · ${local.today.requests} requests · $${local.today.cost.toFixed(4)}`,
748
839
  ` This 5h: ${local.five_h.tokens} tokens · ${local.five_h.requests} requests · $${local.five_h.cost.toFixed(4)}`,
@@ -753,14 +844,14 @@ export default function (pi: ExtensionAPI) {
753
844
  },
754
845
  });
755
846
 
756
- // ─── /usage week — focused view ──────────────────────────────────────
847
+ // --- /usage week — focused view --------------------------------------
757
848
  pi.registerCommand("usage-week", {
758
849
  description: "Show this week's usage + lifetime totals",
759
850
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
760
851
  const local = aggregateWindows(tracker.all());
761
852
  const lines = [
762
853
  " This week's usage",
763
- "─────────────────────────────────────",
854
+ "-------------------------------------",
764
855
  ` Model: ${ctx.model?.id ?? "unknown"}`,
765
856
  ` This week: ${local.weekly.tokens} tokens · ${local.weekly.requests} requests · $${local.weekly.cost.toFixed(4)}`,
766
857
  ` Lifetime: ${local.lifetime.tokens} tokens · ${local.lifetime.requests} requests · $${local.lifetime.cost.toFixed(4)}`,
@@ -771,7 +862,7 @@ export default function (pi: ExtensionAPI) {
771
862
  },
772
863
  });
773
864
 
774
- // ─── /usage reset — clear mirror ─────────────────────────────────────
865
+ // --- /usage reset — clear mirror -------------------------------------
775
866
  pi.registerCommand("usage-reset", {
776
867
  description: "Clear the provider mirror (force re-sync next time)",
777
868
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -811,7 +902,13 @@ export default function (pi: ExtensionAPI) {
811
902
  },
812
903
  });
813
904
 
814
- // ─── /harness start — Start a new harness job ──────────────────────
905
+ // --- /github-login — Connect GitHub Gist for clipboard sync ------------
906
+ registerGithubLoginCommand(pi);
907
+
908
+ // --- Ctrl+Shift+C — Copy to clipboard + sync to Gist ------------
909
+ registerCopySyncShortcut(pi, Key);
910
+
911
+ // --- /harness start — Start a new harness job ----------------------
815
912
  pi.registerCommand("harness-start", {
816
913
  description: "Start a new harness job: /harness start <requirement>",
817
914
  handler: async (args: string, ctx: ExtensionCommandContext) => {
@@ -883,7 +980,7 @@ export default function (pi: ExtensionAPI) {
883
980
  },
884
981
  });
885
982
 
886
- // ─── /harness status — Show harness job status ─────────────────────
983
+ // --- /harness status — Show harness job status ---------------------
887
984
  pi.registerCommand("harness-status", {
888
985
  description: "Show current harness job status",
889
986
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -904,22 +1001,22 @@ export default function (pi: ExtensionAPI) {
904
1001
  const progress = currentSession.graph.getProgressSummary();
905
1002
  const lines = [
906
1003
  `Harness Job Status`,
907
- `${"─".repeat(40)}`,
1004
+ `${"-".repeat(40)}`,
908
1005
  `Job ID: ${currentSession.jobId}`,
909
1006
  `Status: ${summary.status}`,
910
1007
  `Terminal: ${summary.isTerminal ? "Yes" : "No"}`,
911
1008
  `Can Resume: ${summary.canResume ? "Yes" : "No"}`,
912
- `${"─".repeat(40)}`,
1009
+ `${"-".repeat(40)}`,
913
1010
  `Tasks: ${progress.done}/${progress.total} done, ${progress.running} running, ${progress.failed} failed`,
914
1011
  `Created: ${currentSession.createdAt}`,
915
- `${"─".repeat(40)}`,
1012
+ `${"-".repeat(40)}`,
916
1013
  `Run /harness tasks for task list`,
917
1014
  ];
918
1015
  ctx.ui.notify(lines.join("\n"), "info");
919
1016
  },
920
1017
  });
921
1018
 
922
- // ─── /harness tasks — List all tasks ───────────────────────────────
1019
+ // --- /harness tasks — List all tasks -------------------------------
923
1020
  pi.registerCommand("harness-tasks", {
924
1021
  description: "List all tasks in the current harness job",
925
1022
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -942,7 +1039,7 @@ export default function (pi: ExtensionAPI) {
942
1039
 
943
1040
  const lines = [
944
1041
  `Tasks for Job ${currentSession.jobId}`,
945
- `${"─".repeat(50)}`,
1042
+ `${"-".repeat(50)}`,
946
1043
  ];
947
1044
 
948
1045
  for (const task of tasks) {
@@ -950,14 +1047,14 @@ export default function (pi: ExtensionAPI) {
950
1047
  lines.push(`[${task.id}] ${status} ${task.title}`);
951
1048
  }
952
1049
 
953
- lines.push(`${"─".repeat(50)}`);
1050
+ lines.push(`${"-".repeat(50)}`);
954
1051
  const ready = currentSession.graph.getReadyTasks();
955
1052
  lines.push(`${ready.length} tasks ready to execute.`);
956
1053
  ctx.ui.notify(lines.join("\n"), "info");
957
1054
  },
958
1055
  });
959
1056
 
960
- // ─── /harness pause — Pause the harness job ───────────────────────
1057
+ // --- /harness pause — Pause the harness job -----------------------
961
1058
  pi.registerCommand("harness-pause", {
962
1059
  description: "Pause the current harness job",
963
1060
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -1013,7 +1110,7 @@ export default function (pi: ExtensionAPI) {
1013
1110
  },
1014
1111
  });
1015
1112
 
1016
- // ─── /harness resume — Resume the harness job ───────────────────────
1113
+ // --- /harness resume — Resume the harness job -----------------------
1017
1114
  pi.registerCommand("harness-resume", {
1018
1115
  description: "Resume a paused harness job",
1019
1116
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -1049,7 +1146,7 @@ export default function (pi: ExtensionAPI) {
1049
1146
  },
1050
1147
  });
1051
1148
 
1052
- // ─── /harness cancel — Cancel the harness job ──────────────────────
1149
+ // --- /harness cancel — Cancel the harness job ----------------------
1053
1150
  pi.registerCommand("harness-cancel", {
1054
1151
  description: "Cancel the current harness job",
1055
1152
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
@@ -1086,7 +1183,7 @@ export default function (pi: ExtensionAPI) {
1086
1183
  },
1087
1184
  });
1088
1185
 
1089
- // ─── Footer status (persistent badge) ────────────────────────────────
1186
+ // --- Footer status (persistent badge) --------------------------------
1090
1187
  pi.on("session_start", (_event, ctx) => {
1091
1188
  footerStatusCtx = ctx;
1092
1189
  refreshFooterStatus(
@@ -1110,6 +1207,7 @@ export default function (pi: ExtensionAPI) {
1110
1207
  );
1111
1208
  void maybeAutoFetchQuota(ctx.model?.id ?? null);
1112
1209
  maybeTriggerProactiveCompact(ctx);
1210
+ maybeNotifyContextUsage(ctx);
1113
1211
  });
1114
1212
 
1115
1213
  pi.on("agent_end", () => {
@@ -1165,6 +1263,13 @@ export default function (pi: ExtensionAPI) {
1165
1263
  queueAutoResume("post-compact", "resume", "followUp");
1166
1264
  });
1167
1265
 
1266
+ // --- Periodic quota refresh every 15 minutes ---
1267
+ // `maybeAutoFetchQuota` checks its own rate-limit (MINIMAX_REFRESH_MIN_INTERVAL_MS)
1268
+ // so this is safe to call frequently.
1269
+ setInterval(() => {
1270
+ void maybeAutoFetchQuota(lastActiveProvider ?? null);
1271
+ }, MINIMAX_REFRESH_MIN_INTERVAL_MS);
1272
+
1168
1273
  function queueAutoResume(
1169
1274
  reason: string,
1170
1275
  content: string,
@@ -1226,9 +1331,9 @@ export default function (pi: ExtensionAPI) {
1226
1331
  }
1227
1332
  }
1228
1333
 
1229
- // ──────────────────────────────────────────────────────────────────────
1334
+ // ----------------------------------------------------------------------
1230
1335
  // Helper: refresh persistent footer status with one-line summary
1231
- // ──────────────────────────────────────────────────────────────────────
1336
+ // ----------------------------------------------------------------------
1232
1337
  function refreshFooterStatus(
1233
1338
  ctx: { ui: { setStatus: (key: string, value: string) => void } },
1234
1339
  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": "1.1.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": "1.1.0",
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": "1.1.0",
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": "1.1.0",
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: