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/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.10.0](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.24...v0.10.0) (2026-07-30)
6
+
7
+
8
+ ### Features
9
+
10
+ * blackboard-coordinated loop controller with early exit ([f3cf3ea](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f3cf3ea479170dd75b7e9a7c3515dde230bb0da7))
11
+ * herdr inter-agent event bus for autonomous code review ([1490cdd](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1490cddec80dac812065c3c681984524ad3194e1))
12
+ * loop controller for write-review cycles with early exit ([95066ce](https://github.com/ManotLuijiu/pi-harness-runtime/commit/95066ce8cb58c55eaa14d69fd826b5aaff680c16))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **clipboard:** pass UTF-8 bytes directly to xclip via stdin, avoid pipeline corruption ([051ca18](https://github.com/ManotLuijiu/pi-harness-runtime/commit/051ca18fb1deb1169a8a4da16aa9314d2e6ec66d))
18
+ * herdr-bus refactoring — rename publishers to *Simple variants ([d727591](https://github.com/ManotLuijiu/pi-harness-runtime/commit/d7275913a89deb56a6bcfdb912ea9d17e3a80ce1))
19
+ * import LoopConfig from index.js, remove unused LoopNextAction import ([1100a4e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/1100a4e87433e54416259dfdad41bc5e0def19b3))
20
+ * periodic quota refresh every 15 minutes via setInterval ([f28e700](https://github.com/ManotLuijiu/pi-harness-runtime/commit/f28e7004d089aeada1659f4d55a35461baba76fc))
21
+ * replace all Unicode box-drawing characters with ASCII ([dd4223a](https://github.com/ManotLuijiu/pi-harness-runtime/commit/dd4223abb0e25f746ee09ced05f6b3e40a10eb85))
22
+ * replace Unicode dashes and arrows with ASCII equivalents ([e9027e6](https://github.com/ManotLuijiu/pi-harness-runtime/commit/e9027e689c06fdc1ca2ac4a6365ed6a6a0a384fd))
23
+ * trigger cookie sync on startup so pre-existing cookies aren't ignored ([2914299](https://github.com/ManotLuijiu/pi-harness-runtime/commit/2914299b8caa02acbb06620c7cb8e4870acfa40e))
24
+
5
25
  ### [0.9.25](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.9.21...v0.9.25) (2026-07-27)
6
26
 
7
27
 
@@ -117,7 +137,7 @@ All notable changes to this project will be documented in this file. See [standa
117
137
  ### Bug Fixes
118
138
 
119
139
  * publish missing runtime modules ([3fc7058](https://github.com/ManotLuijiu/pi-harness-runtime/commit/3fc70586d0cd10f4d38eab67e4cadaec20aaeb56))
120
- * **release:** remove redundant Bump version step — was double-bumping version (0.7.10.8.0) when tag pushed ([413ad6d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/413ad6d49356ec62b94e9a4e09d3475ef39bebd6))
140
+ * **release:** remove redundant Bump version step — was double-bumping version (0.7.1->0.8.0) when tag pushed ([413ad6d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/413ad6d49356ec62b94e9a4e09d3475ef39bebd6))
121
141
 
122
142
  ## [0.9.0](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.7.1...v0.9.0) (2026-07-13)
123
143
 
@@ -127,7 +147,7 @@ All notable changes to this project will be documented in this file. See [standa
127
147
 
128
148
  ### Bug Fixes
129
149
 
130
- * **release:** remove redundant Bump version step — was double-bumping version (0.7.10.8.0) when tag pushed ([413ad6d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/413ad6d49356ec62b94e9a4e09d3475ef39bebd6))
150
+ * **release:** remove redundant Bump version step — was double-bumping version (0.7.1->0.8.0) when tag pushed ([413ad6d](https://github.com/ManotLuijiu/pi-harness-runtime/commit/413ad6d49356ec62b94e9a4e09d3475ef39bebd6))
131
151
 
132
152
  ### [0.7.1](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v0.6.3...v0.7.1) (2026-07-13)
133
153
 
@@ -158,11 +178,11 @@ All notable changes to this project will be documented in this file. See [standa
158
178
 
159
179
  ### Changed
160
180
 
161
- * **Project rename**: `pi-usage-status` `pi-harness-runtime`
162
- * npm package name: `pi-usage-status` `pi-harness-runtime`
163
- * Repository: `ManotLuijiu/pi-usage-status` `ManotLuijiu/pi-harness-runtime`
164
- * Bundled skill: `usage-status` `harness-runtime` (file path `skills/usage-status/` `skills/harness-runtime/`)
165
- * Status bar key: `usage-status` `harness-runtime`
181
+ * **Project rename**: `pi-usage-status` -> `pi-harness-runtime`
182
+ * npm package name: `pi-usage-status` -> `pi-harness-runtime`
183
+ * Repository: `ManotLuijiu/pi-usage-status` -> `ManotLuijiu/pi-harness-runtime`
184
+ * Bundled skill: `usage-status` -> `harness-runtime` (file path `skills/usage-status/` -> `skills/harness-runtime/`)
185
+ * Status bar key: `usage-status` -> `harness-runtime`
166
186
  * **Data directory unchanged**: still `~/.pi/usage-status/` (preserves existing user data)
167
187
  * **Env var unchanged**: still `PI_USAGE_DIR` (preserves existing user configs)
168
188
  * **Extension symlink unchanged**: still `~/.pi/agent/extensions/pi-usage-status` (repointed to renamed project directory)
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
5
5
  [![Platform](https://img.shields.io/badge/Platform-macOS%20|Linux-blue?style=for-the-badge)]()
6
6
 
7
- > ⚠️ **Beta Notice — Not Production Ready ⚠️**
7
+ > !️ **Beta Notice — Not Production Ready !️**
8
8
  > This project is in active development. Core features work.
9
9
 
10
10
  **Autonomous AI coding harness for pi: local token tracking + provider mirror + task orchestration.**
@@ -54,10 +54,10 @@ Requires Pi v0.37.3+.
54
54
  /harness start Build a REST API with JWT authentication
55
55
 
56
56
  # Runtime creates task graph:
57
- # task-001: Analyze requirements ready
58
- # task-002: Implement API depends on task-001
59
- # task-003: Write tests depends on task-002
60
- # task-004: Code review depends on task-003
57
+ # task-001: Analyze requirements -> ready
58
+ # task-002: Implement API -> depends on task-001
59
+ # task-003: Write tests -> depends on task-002
60
+ # task-004: Code review -> depends on task-003
61
61
 
62
62
  /harness status
63
63
  # Job: job-123, Status: running
@@ -74,48 +74,48 @@ Requires Pi v0.37.3+.
74
74
  # When all tasks complete:
75
75
  /harness status
76
76
  # Job: job-123, Status: ready_for_client
77
- # Tasks: 4/4 done
77
+ # Tasks: 4/4 done [x]
78
78
  ```
79
79
 
80
80
  ## Architecture
81
81
 
82
82
  ```
83
83
  pi-harness-runtime/
84
- ├── index.ts # Extension entry point
85
- ├── footer-status.ts # Footer bar renderer (local vs. mirror mode)
86
- ├── mirror.ts # Per-provider quota mirror (mirror.json)
87
- ├── harness/
88
- ├── job-state-machine.ts # 14-state lifecycle machine
89
- ├── task-graph.ts # DAG-based task management
90
- ├── master-planner.ts # Requirement task graph
91
- ├── loop-runtime.ts # Core execution loop
92
- ├── repair-engine.ts # Auto-fix failures
93
- ├── blackboard.ts # Agent coordination
94
- ├── context-window-manager.ts # Context tracking
95
- ├── agent-handoff.ts # Clean agent transitions
96
- ├── e2e/
97
- ├── minimax-quota-scraper.ts # Playwright MiniMax scraper
98
- └── playwright-runner.ts # Browser automation
99
- └── project-detector/
100
- └── detector.ts # Auto-detect project type
101
- ├── packages/
102
- ├── cookie-sanitizer/ # Live cookie-file sync via chokidar
103
- ├── providers/ # MiniMax, OpenAI, Codex adapters
104
- ├── quota-manager/ # Quota signal collection
105
- ├── auth/ # MiniMax browser auth
106
- └── worktree/ # Git worktree per task
107
- └── skills/
108
- └── harness-runtime/
109
- └── SKILL.md # Skill documentation
84
+ +-- index.ts # Extension entry point
85
+ +-- footer-status.ts # Footer bar renderer (local vs. mirror mode)
86
+ +-- mirror.ts # Per-provider quota mirror (mirror.json)
87
+ +-- harness/
88
+ | +-- job-state-machine.ts # 14-state lifecycle machine
89
+ | +-- task-graph.ts # DAG-based task management
90
+ | +-- master-planner.ts # Requirement -> task graph
91
+ | +-- loop-runtime.ts # Core execution loop
92
+ | +-- repair-engine.ts # Auto-fix failures
93
+ | +-- blackboard.ts # Agent coordination
94
+ | +-- context-window-manager.ts # Context tracking
95
+ | +-- agent-handoff.ts # Clean agent transitions
96
+ | +-- e2e/
97
+ | | +-- minimax-quota-scraper.ts # Playwright MiniMax scraper
98
+ | | +-- playwright-runner.ts # Browser automation
99
+ | +-- project-detector/
100
+ | +-- detector.ts # Auto-detect project type
101
+ +-- packages/
102
+ | +-- cookie-sanitizer/ # Live cookie-file sync via chokidar
103
+ | +-- providers/ # MiniMax, OpenAI, Codex adapters
104
+ | +-- quota-manager/ # Quota signal collection
105
+ | +-- auth/ # MiniMax browser auth
106
+ | +-- worktree/ # Git worktree per task
107
+ +-- skills/
108
+ +-- harness-runtime/
109
+ +-- SKILL.md # Skill documentation
110
110
  ```
111
111
 
112
112
  ## Job State Machine
113
113
 
114
114
  ```
115
- created planning queued running testing reviewing
116
-
115
+ created -> planning -> queued -> running -> testing -> reviewing
116
+ v v v v v
117
117
  cancelled blocked waiting_human repairing ready_for_client
118
-
118
+ v v
119
119
  paused_quota archived
120
120
  ```
121
121
 
@@ -136,18 +136,18 @@ All data stored locally in `~/.pi/`:
136
136
 
137
137
  ```
138
138
  ~/.pi/
139
- ├── usage-status/ # /usage data
140
- ├── usage.jsonl
141
- └── mirror.json # per-provider quota mirror
142
- ├── harness/ # /harness data
143
- └── jobs/
144
- └── <job-id>/
145
- ├── checkpoint.json
146
- ├── events.jsonl
147
- ├── task-graph.json
148
- ├── blackboard/
149
- └── repair-tasks.jsonl
150
- └── okf/ # (optional) Your custom OKF knowledge
139
+ +-- usage-status/ # /usage data
140
+ | +-- usage.jsonl
141
+ | +-- mirror.json # per-provider quota mirror
142
+ +-- harness/ # /harness data
143
+ | +-- jobs/
144
+ | +-- <job-id>/
145
+ | +-- checkpoint.json
146
+ | +-- events.jsonl
147
+ | +-- task-graph.json
148
+ | +-- blackboard/
149
+ | +-- repair-tasks.jsonl
150
+ +-- okf/ # (optional) Your custom OKF knowledge
151
151
  ```
152
152
 
153
153
  ## Custom OKF Knowledge (Optional)
@@ -156,9 +156,9 @@ Create `~/.pi/okf/` to add your custom knowledge that the runtime reads during c
156
156
 
157
157
  ```
158
158
  ~/.pi/okf/
159
- ├── <skill-name>.md # Your custom skill/procedure
160
- ├── <domain>.md # Domain-specific knowledge
161
- └── <project>.md # Project-specific rules
159
+ +-- <skill-name>.md # Your custom skill/procedure
160
+ +-- <domain>.md # Domain-specific knowledge
161
+ +-- <project>.md # Project-specific rules
162
162
  ```
163
163
 
164
164
  The runtime automatically detects and reads these files. If the folder doesn't exist, compilation proceeds without them.
@@ -221,7 +221,7 @@ MiniMax: cookies not found — drop any cookie file into
221
221
 
222
222
  The runtime watches `~/.pi-harness-runtime/cookies/` for cookie files. Drop any cookie export there — it syncs within ~1 second:
223
223
 
224
- 1. **Install EditThisCookie** Chrome extension export from `platform.minimax.io`
224
+ 1. **Install EditThisCookie** Chrome extension -> export from `platform.minimax.io`
225
225
  2. **Create the drop folder:**
226
226
 
227
227
  ```bash
@@ -256,7 +256,7 @@ export class AutoCompactEngine {
256
256
  return existsSync(join(this.rootDir, "continue_prompt.md"));
257
257
  }
258
258
 
259
- // ─── Private Methods ────────────────────────────────────────────────
259
+ // --- Private Methods ------------------------------------------------
260
260
 
261
261
  private ensureDir(): void {
262
262
  if (!existsSync(this.rootDir)) {
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Autonomous Review Agent — polls for code.written events and auto-triggers review.
3
+ * Human on the loop, not in the loop.
4
+ */
5
+ import { existsSync, readFileSync, writeFileSync } from "fs";
6
+ import { join } from "path";
7
+ import {
8
+ createHerdrBus,
9
+ ensureHerdrWorkspace,
10
+ publishReviewCompletedSimple,
11
+ publishReviewRequestedSimple,
12
+ } from "../packages/event-bus/src/herdr-bus.js";
13
+
14
+ const AGENT_ID = "review-agent";
15
+ const REVIEW_TIMEOUT_MS = 5 * 60 * 1000;
16
+
17
+ type CodeWrittenPayload = { taskId: string; files: string[]; branch?: string };
18
+
19
+ async function runReview(
20
+ bus: ReturnType<typeof createHerdrBus>,
21
+ codePayload: CodeWrittenPayload,
22
+ ): Promise<void> {
23
+ const { taskId, files } = codePayload;
24
+ const reportFile = join(
25
+ ensureHerdrWorkspace().reviews,
26
+ `${taskId}-review.md`,
27
+ );
28
+ console.log(`[${AGENT_ID}] Reviewing task ${taskId}, ${files.length} files`);
29
+
30
+ try {
31
+ publishReviewRequestedSimple(bus, taskId, taskId);
32
+
33
+ const fileBlocks = await Promise.all(
34
+ files.map(async (file) => {
35
+ const content = existsSync(file)
36
+ ? readFileSync(file, "utf-8").slice(0, 5000)
37
+ : `[Not found: ${file}]`;
38
+ return `## ${file}\n\n\`\`\`\n${content}\n\`\`\`\n`;
39
+ }),
40
+ );
41
+
42
+ const report = `# Code Review — Task ${taskId}
43
+ ## Files: ${files.join(", ")}
44
+
45
+ > Auto-generated. GPT review tab fills this in.
46
+
47
+ ${fileBlocks.join("\n")}
48
+ `;
49
+ writeFileSync(reportFile, report);
50
+ console.log(`[${AGENT_ID}] Report: ${reportFile}`);
51
+ publishReviewCompletedSimple(bus, taskId, reportFile, "changes_requested");
52
+
53
+ // Wait for GPT tab to update
54
+ await waitForGptReview(reportFile);
55
+ } catch (err) {
56
+ console.error(`[${AGENT_ID}] Review failed:`, err);
57
+ publishReviewCompletedSimple(bus, taskId, reportFile, "failed");
58
+ }
59
+ }
60
+
61
+ async function waitForGptReview(reportFile: string): Promise<void> {
62
+ const deadline = Date.now() + REVIEW_TIMEOUT_MS;
63
+ while (Date.now() < deadline) {
64
+ if (existsSync(reportFile)) {
65
+ const content = readFileSync(reportFile, "utf-8");
66
+ if (!content.includes("Pending")) return;
67
+ }
68
+ await new Promise((r) => setTimeout(r, 5000));
69
+ }
70
+ console.log(`[${AGENT_ID}] GPT review timed out`);
71
+ }
72
+
73
+ async function main(): Promise<void> {
74
+ console.log(`[${AGENT_ID}] Starting...`);
75
+ const bus = createHerdrBus(AGENT_ID);
76
+ ensureHerdrWorkspace();
77
+ bus.subscribe("code.written");
78
+ bus.startPolling(async (payload) => {
79
+ if (payload.topic === "code.written") {
80
+ const data = payload.data as CodeWrittenPayload;
81
+ if (data.files?.length) runReview(bus, data).catch(console.error);
82
+ }
83
+ });
84
+ console.log(`[${AGENT_ID}] Workspace: ${bus.getWorkspace()}`);
85
+ console.log(`[${AGENT_ID}] Polling for code.written...`);
86
+ }
87
+
88
+ main().catch(console.error);
@@ -6,13 +6,13 @@
6
6
  *
7
7
  * Architecture:
8
8
  * LoopRuntime.executeTask()
9
- * └─> CompactOrchestrator.invokeWithCompact()
10
- * ├─> beforeInvoke():
11
- * 1. Estimate token count with buffer awareness
12
- * 2. Check circuit breaker status
13
- * 3. Microcompact: prune old tool results if time-based
14
- * 4. If over autoCompactThreshold → Full compact via forked summarization
15
- * └─> afterInvoke():
9
+ * +-> CompactOrchestrator.invokeWithCompact()
10
+ * +-> beforeInvoke():
11
+ * | 1. Estimate token count with buffer awareness
12
+ * | 2. Check circuit breaker status
13
+ * | 3. Microcompact: prune old tool results if time-based
14
+ * | 4. If over autoCompactThreshold → Full compact via forked summarization
15
+ * +-> afterInvoke():
16
16
  * 1. Update token stats
17
17
  * 2. Handle reactive 413 (context too long)
18
18
  * 3. Generate continue prompt
@@ -38,12 +38,12 @@ import {
38
38
  } from "./context-window-manager.js";
39
39
  import { continuePromptGenerator } from "./continue-prompt.js";
40
40
 
41
- // ─── Re-exports ────────────────────────────────────────────────────────────────
41
+ // --- Re-exports ----------------------------------------------------------------
42
42
 
43
43
  /** Re-export CompactTriggerReason so harness/index.ts can re-export from here */
44
44
  export type { CompactTriggerReason } from "../packages/types/src/runtime-types.js";
45
45
 
46
- // ─── Callbacks ────────────────────────────────────────────────────────────────
46
+ // --- Callbacks ----------------------------------------------------------------
47
47
 
48
48
  /** Callbacks provided by the harness to handle compact side-effects */
49
49
  export interface CompactOrchestratorCallbacks {
@@ -74,7 +74,7 @@ export interface CompactOrchestratorCallbacks {
74
74
  ) => Promise<{ summary: string; droppedCount: number }>;
75
75
  }
76
76
 
77
- // ─── Config ───────────────────────────────────────────────────────────────────
77
+ // --- Config -------------------------------------------------------------------
78
78
 
79
79
  export interface CompactOrchestratorConfig {
80
80
  jobId: string;
@@ -96,7 +96,7 @@ export interface CompactOrchestratorConfig {
96
96
  contextWindowSize?: number;
97
97
  }
98
98
 
99
- // ─── Orchestrator ─────────────────────────────────────────────────────────────
99
+ // --- Orchestrator -------------------------------------------------------------
100
100
 
101
101
  /**
102
102
  * Compact Orchestrator
@@ -166,7 +166,7 @@ export class CompactOrchestrator {
166
166
  const { messages, model, maxOutputTokens } = opts;
167
167
  this.compactAttempts++;
168
168
 
169
- // ── Estimate tokens with buffer awareness ─────────────────────────────
169
+ // -- Estimate tokens with buffer awareness -----------------------------
170
170
  const estimate = this.contextWindow.estimateTokensWithBuffer({
171
171
  messages,
172
172
  tools: opts.tools,
@@ -175,7 +175,7 @@ export class CompactOrchestrator {
175
175
  model: model ?? this.model,
176
176
  });
177
177
 
178
- // ── Circuit breaker check ─────────────────────────────────────────────
178
+ // -- Circuit breaker check ---------------------------------------------
179
179
  if (this.contextWindow.shouldCircuitBreak()) {
180
180
  return {
181
181
  success: false,
@@ -183,7 +183,7 @@ export class CompactOrchestrator {
183
183
  };
184
184
  }
185
185
 
186
- // ── Blocking: must compact before API call ───────────────────────────
186
+ // -- Blocking: must compact before API call ---------------------------
187
187
  if (this.contextWindow.shouldBlockApiCall(estimate)) {
188
188
  callbacks.onPreCompact?.("token_threshold");
189
189
  const compact = await this.runFullCompact(
@@ -206,10 +206,10 @@ export class CompactOrchestrator {
206
206
  this.contextWindow.recordCompactSuccess();
207
207
  }
208
208
 
209
- // ── Time-based microcompact ─────────────────────────────────────────
209
+ // -- Time-based microcompact -----------------------------------------
210
210
  this.tryMicrocompact(messages);
211
211
 
212
- // ── Proactive auto-compact at 85% ──────────────────────────────────
212
+ // -- Proactive auto-compact at 85% ----------------------------------
213
213
  if (this.contextWindow.shouldProactiveCompact(estimate)) {
214
214
  callbacks.onPreCompact?.("token_threshold");
215
215
  const compact = await this.runFullCompact(
@@ -228,7 +228,7 @@ export class CompactOrchestrator {
228
228
  }
229
229
  }
230
230
 
231
- // ── Make the LLM call ───────────────────────────────────────────────
231
+ // -- Make the LLM call -----------------------------------------------
232
232
  const invoke = opts.invokeAgent ?? callbacks.invokeAgent;
233
233
  if (!invoke) {
234
234
  return {
@@ -242,7 +242,7 @@ export class CompactOrchestrator {
242
242
  // Track tool results
243
243
  this.trackToolResults(messages);
244
244
 
245
- // ── Update stats ─────────────────────────────────────────────────────
245
+ // -- Update stats -----------------------------------------------------
246
246
  if (result.usage) {
247
247
  this.contextWindow.updateStats({
248
248
  provider: this.provider,
@@ -252,7 +252,7 @@ export class CompactOrchestrator {
252
252
  });
253
253
  }
254
254
 
255
- // ── Reactive compact on context-too-long error ─────────────────────
255
+ // -- Reactive compact on context-too-long error ---------------------
256
256
  const isContextError = this.isContextTooLongError(result.error);
257
257
 
258
258
  if (isContextError) {
@@ -326,7 +326,7 @@ export class CompactOrchestrator {
326
326
  return { success: false, error: "Nothing to compact" };
327
327
  }
328
328
 
329
- // ── Generate summary ────────────────────────────────────────────────
329
+ // -- Generate summary ------------------------------------------------
330
330
  let summary = "";
331
331
  let droppedCount = oldMessages.length;
332
332
 
@@ -345,7 +345,7 @@ export class CompactOrchestrator {
345
345
  summary = this.heuristicSummary(oldMessages, reason);
346
346
  }
347
347
 
348
- // ── Build compact boundary message ───────────────────────────────────
348
+ // -- Build compact boundary message -----------------------------------
349
349
  const boundaryMsg: CompactableMessage = {
350
350
  role: "system",
351
351
  content: continuePromptGenerator.generateBoundary({
@@ -361,7 +361,7 @@ export class CompactOrchestrator {
361
361
  },
362
362
  };
363
363
 
364
- // ── Preserve tool results from recent messages ───────────────────────
364
+ // -- Preserve tool results from recent messages -----------------------
365
365
  const preservedRecent = recentMessages.map((msg) => {
366
366
  if (msg.role !== "assistant" || !msg.toolResults) return msg;
367
367
  return {
@@ -373,7 +373,7 @@ export class CompactOrchestrator {
373
373
  };
374
374
  });
375
375
 
376
- // ── Rebuild message array ───────────────────────────────────────────
376
+ // -- Rebuild message array -------------------------------------------
377
377
  messages.length = 0;
378
378
  messages.push(boundaryMsg, ...preservedRecent);
379
379
 
@@ -22,7 +22,7 @@ import {
22
22
  roughMessagesTokens,
23
23
  } from "../packages/token-estimation/src/index.ts";
24
24
 
25
- // ─── Constants ────────────────────────────────────────────────────────────────
25
+ // --- Constants ----------------------------------------------------------------
26
26
 
27
27
  /** Proactive compact triggers at this many tokens before limit */
28
28
  export const AUTOCOMPACT_BUFFER_TOKENS = 13_000;
@@ -36,7 +36,7 @@ export const BLOCKING_THRESHOLD_BUFFER_TOKENS = 20_000;
36
36
  /** Maximum consecutive compact failures before circuit breaker */
37
37
  export const MAX_CONSECUTIVE_COMPACT_FAILURES = 3;
38
38
 
39
- // ─── Types ──────────────────────────────────────────────────────────────────
39
+ // --- Types ------------------------------------------------------------------
40
40
 
41
41
  export interface CompactThresholds {
42
42
  /** Trigger proactive compact at this utilization (0.85) */
@@ -60,7 +60,7 @@ export interface TokenEstimate {
60
60
  shouldBlock: boolean;
61
61
  }
62
62
 
63
- // ─── Context Window Manager ─────────────────────────────────────────────────
63
+ // --- Context Window Manager -------------------------------------------------
64
64
 
65
65
  export class ContextWindowManager {
66
66
  private stats: Map<string, ContextWindowStats> = new Map();
@@ -95,7 +95,7 @@ export class ContextWindowManager {
95
95
  }
96
96
  }
97
97
 
98
- // ─── Public API ───────────────────────────────────────────────────────────
98
+ // --- Public API -----------------------------------------------------------
99
99
 
100
100
  /**
101
101
  * Update context window stats after a request
@@ -399,7 +399,7 @@ export class ContextWindowManager {
399
399
  }
400
400
  }
401
401
 
402
- // ─── Microcompact Helpers ───────────────────────────────────────────────────
402
+ // --- Microcompact Helpers ---------------------------------------------------
403
403
 
404
404
  /**
405
405
  * Microcompact: prune old tool results based on time gap.
@@ -7,7 +7,7 @@
7
7
 
8
8
  import type { CompactableMessage } from "../packages/types/src/runtime-types.js";
9
9
 
10
- // ─── Types ──────────────────────────────────────────────────────────────────
10
+ // --- Types ------------------------------------------------------------------
11
11
 
12
12
  export interface ContinueContext {
13
13
  /** Task identifier */
@@ -35,7 +35,7 @@ export interface MinimalContinueContext {
35
35
  recentMessages: CompactableMessage[];
36
36
  }
37
37
 
38
- // ─── Continue Prompt Generator ───────────────────────────────────────────────
38
+ // --- Continue Prompt Generator -----------------------------------------------
39
39
 
40
40
  export class ContinuePromptGenerator {
41
41
  /**
@@ -237,6 +237,6 @@ export class ContinuePromptGenerator {
237
237
  }
238
238
  }
239
239
 
240
- // ─── Singleton Instance ──────────────────────────────────────────────────────
240
+ // --- Singleton Instance ------------------------------------------------------
241
241
 
242
242
  export const continuePromptGenerator = new ContinuePromptGenerator();
@@ -555,7 +555,7 @@ MiniMax Quota Scraper Setup Instructions
555
555
  }
556
556
  }
557
557
 
558
- // ─── Quota Manager Integration ───────────────────────────────────────────────
558
+ // --- Quota Manager Integration -----------------------------------------------
559
559
 
560
560
  /**
561
561
  * Quota Manager that periodically fetches MiniMax quota data
@@ -12,7 +12,7 @@ import type {
12
12
  InvokeResult,
13
13
  } from "../packages/types/src/runtime-types.js";
14
14
 
15
- // ─── Types ──────────────────────────────────────────────────────────────────
15
+ // --- Types ------------------------------------------------------------------
16
16
 
17
17
  export interface SummarizerConfig {
18
18
  /** Model to use for summarization */
@@ -43,7 +43,7 @@ export interface InvokeOptions {
43
43
  systemPrompt?: string;
44
44
  }
45
45
 
46
- // ─── Default System Prompt ───────────────────────────────────────────────────
46
+ // --- Default System Prompt ---------------------------------------------------
47
47
 
48
48
  const DEFAULT_SUMMARY_SYSTEM = `You are a conversation summarizer. Your task is to create concise, accurate summaries that preserve essential context for continuing a conversation.
49
49
 
@@ -70,7 +70,7 @@ const DECISIONS_FOCUS = `Focus specifically on:
70
70
  4. What constraints or requirements influenced the decisions?
71
71
  5. Any lessons learned or trade-offs considered?`;
72
72
 
73
- // ─── Forked Summarizer ──────────────────────────────────────────────────────
73
+ // --- Forked Summarizer ------------------------------------------------------
74
74
 
75
75
  export class ForkedSummarizer {
76
76
  private readonly config: SummarizerConfig;
@@ -283,7 +283,7 @@ Do not include verbatim tool results — summarize their outcomes instead.`;
283
283
  }
284
284
  }
285
285
 
286
- // ─── Convenience Factory ────────────────────────────────────────────────────
286
+ // --- Convenience Factory ----------------------------------------------------
287
287
 
288
288
  /**
289
289
  * Create a ForkedSummarizer with default config