pi-harness-runtime 1.1.398 → 1.1.402

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 (613) hide show
  1. package/AGENTS.md +44 -2
  2. package/CHANGELOG.md +21 -0
  3. package/RULES.md +28 -0
  4. package/harness/agent-handoff.ts +2 -3
  5. package/harness/autonomous-review.ts +1 -1
  6. package/harness/blackboard.ts +2 -3
  7. package/harness/context-compact-orchestrator.ts +1 -1
  8. package/harness/context-window-manager.ts +2 -2
  9. package/harness/e2e/playwright-runner.ts +6 -4
  10. package/harness/herdr-agents.ts +1 -1
  11. package/harness/job-state-machine.ts +1 -1
  12. package/harness/langchain/daemon.ts +3 -3
  13. package/harness/langchain/graph.ts +2 -2
  14. package/harness/langchain/ping-pong-middleware.ts +2 -2
  15. package/harness/loop-code-agent.ts +6 -4
  16. package/harness/loop-controller.ts +1 -1
  17. package/harness/loop-review-agent.ts +1 -1
  18. package/harness/loop-types.ts +1 -1
  19. package/harness/master-planner.ts +1 -1
  20. package/harness/project-detector/detector.ts +1 -2
  21. package/harness/repair-engine.ts +2 -4
  22. package/harness/service-diagnostics.ts +1 -1
  23. package/harness/skill-sync.ts +3 -3
  24. package/index.ts +276 -55
  25. package/mirror.ts +1 -1
  26. package/package.json +5 -3
  27. package/packages/a2a-adapter/dist/discovery.d.ts.map +1 -1
  28. package/packages/a2a-adapter/dist/discovery.js +0 -1
  29. package/packages/a2a-adapter/dist/discovery.js.map +1 -1
  30. package/packages/a2a-adapter/package.json +1 -1
  31. package/packages/a2a-adapter/src/discovery.ts +0 -1
  32. package/packages/agent-policy/package.json +1 -1
  33. package/packages/architecture-generator/package.json +1 -1
  34. package/packages/auth/dist/index.d.ts +9 -0
  35. package/packages/auth/dist/index.d.ts.map +1 -0
  36. package/packages/auth/dist/index.js +9 -0
  37. package/packages/auth/dist/index.js.map +1 -0
  38. package/packages/auth/package.json +1 -1
  39. package/packages/auth/src/index.ts +9 -0
  40. package/packages/autonomous-refactor/package.json +1 -1
  41. package/packages/autonomous-runtime/package.json +1 -1
  42. package/packages/cache-strategy/package.json +1 -1
  43. package/packages/capability-registry/package.json +1 -1
  44. package/packages/checkpoint/package.json +1 -1
  45. package/packages/cli-plugin-sdk/package.json +1 -1
  46. package/packages/clipboard/package.json +1 -1
  47. package/packages/clipboard-plugin/package.json +1 -1
  48. package/packages/code-generation/package.json +1 -1
  49. package/packages/code-review/package.json +1 -1
  50. package/packages/codex-adapter/package.json +1 -1
  51. package/packages/codex-watcher/package.json +1 -1
  52. package/packages/config-capture/dist/index.d.ts +52 -0
  53. package/packages/config-capture/dist/index.d.ts.map +1 -0
  54. package/packages/config-capture/dist/index.js +261 -0
  55. package/packages/config-capture/dist/index.js.map +1 -0
  56. package/packages/config-capture/package.json +1 -1
  57. package/packages/connection-runtime/package.json +1 -1
  58. package/packages/context-compiler/package.json +1 -1
  59. package/packages/context-discovery/package.json +1 -1
  60. package/packages/context-manager/package.json +1 -1
  61. package/packages/contracts/package.json +1 -1
  62. package/packages/cookie-sanitizer/package.json +1 -1
  63. package/packages/cost-optimizer/package.json +1 -1
  64. package/packages/dependency-analyzer/package.json +1 -1
  65. package/packages/django-plugin/package.json +1 -1
  66. package/packages/doc-generator/package.json +1 -1
  67. package/packages/durable-review/package.json +1 -1
  68. package/packages/e2e-tester/package.json +1 -1
  69. package/packages/evaluation-engine/package.json +1 -1
  70. package/packages/evaluation-runner/package.json +1 -1
  71. package/packages/event-bus/package.json +1 -1
  72. package/packages/event-sink/package.json +1 -1
  73. package/packages/event-store/package.json +1 -1
  74. package/packages/experience-replay/package.json +1 -1
  75. package/packages/feedback-collector/package.json +1 -1
  76. package/packages/file-copy-helper/dist/extension.d.ts +15 -0
  77. package/packages/file-copy-helper/dist/extension.d.ts.map +1 -0
  78. package/packages/file-copy-helper/dist/extension.debug.d.ts +15 -0
  79. package/packages/file-copy-helper/dist/extension.debug.d.ts.map +1 -0
  80. package/packages/file-copy-helper/dist/extension.debug.js +215 -0
  81. package/packages/file-copy-helper/dist/extension.debug.js.map +1 -0
  82. package/packages/file-copy-helper/dist/extension.js +222 -0
  83. package/packages/file-copy-helper/dist/extension.js.map +1 -0
  84. package/packages/file-copy-helper/dist/index.d.ts +3 -0
  85. package/packages/file-copy-helper/dist/index.d.ts.map +1 -0
  86. package/packages/file-copy-helper/dist/index.js +3 -0
  87. package/packages/file-copy-helper/dist/index.js.map +1 -0
  88. package/packages/file-copy-helper/dist/intent-detector.d.ts +21 -0
  89. package/packages/file-copy-helper/dist/intent-detector.d.ts.map +1 -0
  90. package/packages/file-copy-helper/dist/intent-detector.js +348 -0
  91. package/packages/file-copy-helper/dist/intent-detector.js.map +1 -0
  92. package/packages/file-copy-helper/package.json +1 -1
  93. package/packages/framework-detector/package.json +1 -1
  94. package/packages/framework-plugin-sdk/package.json +1 -1
  95. package/packages/frappe-plugin/package.json +1 -1
  96. package/packages/generic-web-plugin/package.json +1 -1
  97. package/packages/health-monitor/package.json +1 -1
  98. package/packages/intent-analyzer/package.json +1 -1
  99. package/packages/jev-judge/dist/auto-continue.d.ts +161 -2
  100. package/packages/jev-judge/dist/auto-continue.d.ts.map +1 -1
  101. package/packages/jev-judge/dist/auto-continue.js +267 -22
  102. package/packages/jev-judge/dist/auto-continue.js.map +1 -1
  103. package/packages/jev-judge/dist/index.d.ts +2 -0
  104. package/packages/jev-judge/dist/index.d.ts.map +1 -1
  105. package/packages/jev-judge/dist/index.js +2 -0
  106. package/packages/jev-judge/dist/index.js.map +1 -1
  107. package/packages/jev-judge/dist/question-risk.d.ts +50 -0
  108. package/packages/jev-judge/dist/question-risk.d.ts.map +1 -0
  109. package/packages/jev-judge/dist/question-risk.js +100 -0
  110. package/packages/jev-judge/dist/question-risk.js.map +1 -0
  111. package/packages/jev-judge/package.json +1 -1
  112. package/packages/jev-judge/src/auto-continue.ts +426 -29
  113. package/packages/jev-judge/src/index.ts +4 -0
  114. package/packages/jev-judge/src/question-risk.ts +151 -0
  115. package/packages/jev-judge/tests/auto-continue-context.test.ts +221 -0
  116. package/packages/jev-judge/tests/outcome-application.test.ts +132 -0
  117. package/packages/jev-judge/tests/question-risk.test.ts +116 -0
  118. package/packages/knowledge-graph/package.json +1 -1
  119. package/packages/knowledge-retrieval/package.json +1 -1
  120. package/packages/laravel-plugin/package.json +1 -1
  121. package/packages/learning-engine/package.json +1 -1
  122. package/packages/logging/README.md +36 -3
  123. package/packages/logging/dist/config.d.ts +7 -0
  124. package/packages/logging/dist/config.d.ts.map +1 -1
  125. package/packages/logging/dist/config.js +14 -0
  126. package/packages/logging/dist/config.js.map +1 -1
  127. package/packages/logging/dist/incidents/schema.d.ts +111 -0
  128. package/packages/logging/dist/incidents/schema.d.ts.map +1 -0
  129. package/packages/logging/dist/incidents/schema.js +0 -0
  130. package/packages/logging/dist/incidents/schema.js.map +1 -0
  131. package/packages/logging/dist/index.d.ts +2 -0
  132. package/packages/logging/dist/index.d.ts.map +1 -1
  133. package/packages/logging/dist/index.js +2 -0
  134. package/packages/logging/dist/index.js.map +1 -1
  135. package/packages/logging/dist/server/http.d.ts +4 -3
  136. package/packages/logging/dist/server/http.d.ts.map +1 -1
  137. package/packages/logging/dist/server/http.js +35 -3
  138. package/packages/logging/dist/server/http.js.map +1 -1
  139. package/packages/logging/dist/server/incident-qdrant.d.ts +83 -0
  140. package/packages/logging/dist/server/incident-qdrant.d.ts.map +1 -0
  141. package/packages/logging/dist/server/incident-qdrant.js +129 -0
  142. package/packages/logging/dist/server/incident-qdrant.js.map +1 -0
  143. package/packages/logging/dist/server/incident-store.d.ts +76 -0
  144. package/packages/logging/dist/server/incident-store.d.ts.map +1 -0
  145. package/packages/logging/dist/server/incident-store.js +157 -0
  146. package/packages/logging/dist/server/incident-store.js.map +1 -0
  147. package/packages/logging/dist/server/index.d.ts +4 -0
  148. package/packages/logging/dist/server/index.d.ts.map +1 -1
  149. package/packages/logging/dist/server/index.js +2 -0
  150. package/packages/logging/dist/server/index.js.map +1 -1
  151. package/packages/logging/dist/server/service.d.ts +33 -0
  152. package/packages/logging/dist/server/service.d.ts.map +1 -1
  153. package/packages/logging/dist/server/service.js +63 -0
  154. package/packages/logging/dist/server/service.js.map +1 -1
  155. package/packages/logging/dist/shipper.d.ts +74 -3
  156. package/packages/logging/dist/shipper.d.ts.map +1 -1
  157. package/packages/logging/dist/shipper.js +88 -5
  158. package/packages/logging/dist/shipper.js.map +1 -1
  159. package/packages/logging/dist/singleton.d.ts.map +1 -1
  160. package/packages/logging/dist/singleton.js +1 -0
  161. package/packages/logging/dist/singleton.js.map +1 -1
  162. package/packages/logging/package.json +1 -1
  163. package/packages/logging/src/config.ts +22 -0
  164. package/packages/logging/src/incidents/schema.ts +0 -0
  165. package/packages/logging/src/index.ts +17 -0
  166. package/packages/logging/src/server/http.ts +42 -3
  167. package/packages/logging/src/server/incident-qdrant.ts +177 -0
  168. package/packages/logging/src/server/incident-store.ts +192 -0
  169. package/packages/logging/src/server/index.ts +21 -0
  170. package/packages/logging/src/server/service.ts +79 -0
  171. package/packages/logging/src/shipper.ts +120 -5
  172. package/packages/logging/src/singleton.ts +1 -0
  173. package/packages/logging/test/fanout.test.ts +186 -0
  174. package/packages/logging/test/incidents.test.ts +404 -0
  175. package/packages/mcp-adapter/package.json +1 -1
  176. package/packages/memory-engine/package.json +1 -1
  177. package/packages/milestone-manager/package.json +1 -1
  178. package/packages/model-registry/package.json +1 -1
  179. package/packages/nextjs-plugin/package.json +1 -1
  180. package/packages/notification/dist/adapters/detail-format.d.ts +10 -2
  181. package/packages/notification/dist/adapters/detail-format.d.ts.map +1 -1
  182. package/packages/notification/dist/adapters/detail-format.js +39 -0
  183. package/packages/notification/dist/adapters/detail-format.js.map +1 -1
  184. package/packages/notification/dist/adapters/line-adapter.d.ts +33 -0
  185. package/packages/notification/dist/adapters/line-adapter.d.ts.map +1 -1
  186. package/packages/notification/dist/adapters/line-adapter.js +84 -7
  187. package/packages/notification/dist/adapters/line-adapter.js.map +1 -1
  188. package/packages/notification/dist/adapters/telegram-adapter.d.ts.map +1 -1
  189. package/packages/notification/dist/adapters/telegram-adapter.js +6 -2
  190. package/packages/notification/dist/adapters/telegram-adapter.js.map +1 -1
  191. package/packages/notification/dist/notification-center.d.ts.map +1 -1
  192. package/packages/notification/dist/notification-center.js +59 -7
  193. package/packages/notification/dist/notification-center.js.map +1 -1
  194. package/packages/notification/dist/pending-question.d.ts +69 -2
  195. package/packages/notification/dist/pending-question.d.ts.map +1 -1
  196. package/packages/notification/dist/pending-question.js +88 -2
  197. package/packages/notification/dist/pending-question.js.map +1 -1
  198. package/packages/notification/dist/types.d.ts +18 -0
  199. package/packages/notification/dist/types.d.ts.map +1 -1
  200. package/packages/notification/package.json +1 -1
  201. package/packages/notification/src/adapters/detail-format.ts +42 -2
  202. package/packages/notification/src/adapters/line-adapter.ts +94 -7
  203. package/packages/notification/src/adapters/telegram-adapter.ts +6 -2
  204. package/packages/notification/src/notification-center.ts +65 -8
  205. package/packages/notification/src/pending-question.ts +160 -8
  206. package/packages/notification/src/types.ts +18 -0
  207. package/packages/notification/test/approval-payload.test.ts +269 -0
  208. package/packages/notification/test/pending-question-lifecycle.test.ts +195 -0
  209. package/packages/observability/package.json +1 -1
  210. package/packages/okf-indexer/dist/index.d.ts +9 -0
  211. package/packages/okf-indexer/dist/index.d.ts.map +1 -0
  212. package/packages/okf-indexer/dist/index.js +9 -0
  213. package/packages/okf-indexer/dist/index.js.map +1 -0
  214. package/packages/okf-indexer/package.json +1 -1
  215. package/packages/okf-indexer/src/index.ts +9 -0
  216. package/packages/paperclip-integration/package.json +1 -1
  217. package/packages/performance-optimizer/package.json +1 -1
  218. package/packages/permission-mode/package.json +1 -1
  219. package/packages/privilege-broker/package.json +1 -1
  220. package/packages/project-analyzer/package.json +1 -1
  221. package/packages/project-bootstrap/package.json +1 -1
  222. package/packages/projection-engine/package.json +1 -1
  223. package/packages/prompt-compiler/package.json +1 -1
  224. package/packages/prompt-versioning/package.json +1 -1
  225. package/packages/provider-adapter-sdk/package.json +1 -1
  226. package/packages/provider-router/dist/provider-router.d.ts.map +1 -1
  227. package/packages/provider-router/dist/types.d.ts +2 -2
  228. package/packages/provider-router/dist/types.d.ts.map +1 -1
  229. package/packages/provider-router/dist/types.js +1 -1
  230. package/packages/provider-router/package.json +1 -1
  231. package/packages/provider-router/src/types.ts +2 -2
  232. package/packages/provider-selector/package.json +1 -1
  233. package/packages/providers/package.json +1 -1
  234. package/packages/qdrant-skills/package.json +1 -1
  235. package/packages/quota-manager/package.json +1 -1
  236. package/packages/rate-limiter/package.json +1 -1
  237. package/packages/react-vite-plugin/package.json +1 -1
  238. package/packages/relay/package.json +1 -1
  239. package/packages/release-manager/package.json +1 -1
  240. package/packages/requirement-compiler/package.json +1 -1
  241. package/packages/runtime/package.json +1 -1
  242. package/packages/scheduler/dist/index.d.ts +9 -0
  243. package/packages/scheduler/dist/index.d.ts.map +1 -0
  244. package/packages/scheduler/dist/index.js +9 -0
  245. package/packages/scheduler/dist/index.js.map +1 -0
  246. package/packages/scheduler/dist/scheduler.d.ts +17 -0
  247. package/packages/scheduler/dist/scheduler.d.ts.map +1 -0
  248. package/packages/scheduler/dist/scheduler.js +41 -0
  249. package/packages/scheduler/dist/scheduler.js.map +1 -0
  250. package/packages/scheduler/package.json +1 -1
  251. package/packages/scheduler/src/index.ts +9 -0
  252. package/packages/scheduler-adapter/package.json +1 -1
  253. package/packages/session/package.json +1 -1
  254. package/packages/session-api/package.json +1 -1
  255. package/packages/session-export/package.json +1 -1
  256. package/packages/shared-context/dist/index.d.ts +7 -0
  257. package/packages/shared-context/dist/index.d.ts.map +1 -0
  258. package/packages/shared-context/dist/index.js +7 -0
  259. package/packages/shared-context/dist/index.js.map +1 -0
  260. package/packages/shared-context/dist/shared-context.d.ts +12 -0
  261. package/packages/shared-context/dist/shared-context.d.ts.map +1 -0
  262. package/packages/shared-context/dist/shared-context.js +39 -0
  263. package/packages/shared-context/dist/shared-context.js.map +1 -0
  264. package/packages/shared-context/package.json +1 -1
  265. package/packages/skill-mcp-client/dist/client.d.ts +56 -0
  266. package/packages/skill-mcp-client/dist/client.d.ts.map +1 -0
  267. package/packages/skill-mcp-client/dist/client.js +101 -0
  268. package/packages/skill-mcp-client/dist/client.js.map +1 -0
  269. package/packages/skill-mcp-client/dist/errors.d.ts +44 -0
  270. package/packages/skill-mcp-client/dist/errors.d.ts.map +1 -0
  271. package/packages/skill-mcp-client/dist/errors.js +68 -0
  272. package/packages/skill-mcp-client/dist/errors.js.map +1 -0
  273. package/packages/skill-mcp-client/dist/index.d.ts +9 -0
  274. package/packages/skill-mcp-client/dist/index.d.ts.map +1 -0
  275. package/packages/skill-mcp-client/dist/index.js +9 -0
  276. package/packages/skill-mcp-client/dist/index.js.map +1 -0
  277. package/packages/skill-mcp-client/dist/types.d.ts +106 -0
  278. package/packages/skill-mcp-client/dist/types.d.ts.map +1 -0
  279. package/packages/skill-mcp-client/dist/types.js +14 -0
  280. package/packages/skill-mcp-client/dist/types.js.map +1 -0
  281. package/packages/skill-mcp-client/package.json +1 -1
  282. package/packages/skill-registry/package.json +1 -1
  283. package/packages/skills/package.json +1 -5
  284. package/packages/sprint-planner/package.json +1 -1
  285. package/packages/subscription-engine/package.json +1 -1
  286. package/packages/task-compiler/package.json +1 -1
  287. package/packages/telegram/package.json +1 -1
  288. package/packages/telegram/src/agent-messages.d.ts +28 -0
  289. package/packages/telegram/src/agent-messages.js +90 -0
  290. package/packages/telegram/src/bindings.d.ts +296 -0
  291. package/packages/telegram/src/bindings.js +1086 -0
  292. package/packages/telegram/src/bus.d.ts +759 -0
  293. package/packages/telegram/src/bus.js +2732 -0
  294. package/packages/telegram/src/commands.d.ts +761 -0
  295. package/packages/telegram/src/commands.js +2622 -0
  296. package/packages/telegram/src/config.d.ts +222 -0
  297. package/packages/telegram/src/config.js +844 -0
  298. package/packages/telegram/src/delivery.d.ts +161 -0
  299. package/packages/telegram/src/delivery.js +550 -0
  300. package/packages/telegram/src/extension.d.ts +7 -0
  301. package/packages/telegram/src/extension.js +2444 -0
  302. package/packages/telegram/src/inbound.d.ts +94 -0
  303. package/packages/telegram/src/inbound.js +478 -0
  304. package/packages/telegram/src/index.d.ts +6 -0
  305. package/packages/telegram/src/index.js +6 -0
  306. package/packages/telegram/src/keyboard.d.ts +21 -0
  307. package/packages/telegram/src/keyboard.js +37 -0
  308. package/packages/telegram/src/lifecycle.d.ts +210 -0
  309. package/packages/telegram/src/lifecycle.js +538 -0
  310. package/packages/telegram/src/pi.d.ts +76 -0
  311. package/packages/telegram/src/pi.js +130 -0
  312. package/packages/telegram/src/polling.d.ts +332 -0
  313. package/packages/telegram/src/polling.js +1219 -0
  314. package/packages/telegram/src/replies.d.ts +210 -0
  315. package/packages/telegram/src/replies.js +752 -0
  316. package/packages/telegram/src/routing.d.ts +388 -0
  317. package/packages/telegram/src/routing.js +7886 -0
  318. package/packages/telegram/src/runtime.d.ts +159 -0
  319. package/packages/telegram/src/runtime.js +351 -0
  320. package/packages/telegram/src/telegram-api.d.ts +564 -0
  321. package/packages/telegram/src/telegram-api.js +1332 -0
  322. package/packages/telegram/src/turns.d.ts +108 -0
  323. package/packages/telegram/src/turns.js +482 -0
  324. package/packages/telegram/src/updates.d.ts +1545 -0
  325. package/packages/telegram/src/updates.js +6420 -0
  326. package/packages/tencentdb-memory/package.json +1 -1
  327. package/packages/tencentdb-sync/package.json +1 -1
  328. package/packages/test-data-generator/package.json +1 -1
  329. package/packages/test-generator/package.json +1 -1
  330. package/packages/todo-bd-sync/dist/detector.d.ts +54 -0
  331. package/packages/todo-bd-sync/dist/detector.d.ts.map +1 -0
  332. package/packages/todo-bd-sync/dist/detector.js +132 -0
  333. package/packages/todo-bd-sync/dist/detector.js.map +1 -0
  334. package/packages/todo-bd-sync/dist/extension.d.ts +30 -0
  335. package/packages/todo-bd-sync/dist/extension.d.ts.map +1 -0
  336. package/packages/todo-bd-sync/dist/extension.js +35 -0
  337. package/packages/todo-bd-sync/dist/extension.js.map +1 -0
  338. package/packages/todo-bd-sync/dist/index.d.ts +87 -0
  339. package/packages/todo-bd-sync/dist/index.d.ts.map +1 -0
  340. package/packages/todo-bd-sync/dist/index.js +296 -0
  341. package/packages/todo-bd-sync/dist/index.js.map +1 -0
  342. package/packages/todo-bd-sync/dist/sync.d.ts +72 -0
  343. package/packages/todo-bd-sync/dist/sync.d.ts.map +1 -0
  344. package/packages/todo-bd-sync/dist/sync.js +290 -0
  345. package/packages/todo-bd-sync/dist/sync.js.map +1 -0
  346. package/packages/todo-bd-sync/dist/task-analyzer.d.ts +49 -0
  347. package/packages/todo-bd-sync/dist/task-analyzer.d.ts.map +1 -0
  348. package/packages/todo-bd-sync/dist/task-analyzer.js +240 -0
  349. package/packages/todo-bd-sync/dist/task-analyzer.js.map +1 -0
  350. package/packages/todo-bd-sync/dist/todo-reminder.d.ts +126 -0
  351. package/packages/todo-bd-sync/dist/todo-reminder.d.ts.map +1 -0
  352. package/packages/todo-bd-sync/dist/todo-reminder.js +329 -0
  353. package/packages/todo-bd-sync/dist/todo-reminder.js.map +1 -0
  354. package/packages/todo-bd-sync/dist/types.d.ts +65 -0
  355. package/packages/todo-bd-sync/dist/types.d.ts.map +1 -0
  356. package/packages/todo-bd-sync/dist/types.js +67 -0
  357. package/packages/todo-bd-sync/dist/types.js.map +1 -0
  358. package/packages/todo-bd-sync/package.json +1 -1
  359. package/packages/token-estimation/dist/index.d.ts +94 -0
  360. package/packages/token-estimation/dist/index.d.ts.map +1 -0
  361. package/packages/token-estimation/dist/index.js +115 -0
  362. package/packages/token-estimation/dist/index.js.map +1 -0
  363. package/packages/token-estimation/package.json +1 -1
  364. package/packages/token-optimizer/package.json +1 -1
  365. package/packages/trajectory/package.json +1 -1
  366. package/packages/tui/package.json +1 -1
  367. package/packages/types/dist/ai-providers.d.ts +36 -0
  368. package/packages/types/dist/ai-providers.d.ts.map +1 -0
  369. package/packages/types/dist/ai-providers.js +66 -0
  370. package/packages/types/dist/ai-providers.js.map +1 -0
  371. package/packages/types/dist/index.d.ts +12 -0
  372. package/packages/types/dist/index.d.ts.map +1 -0
  373. package/packages/types/dist/index.js +12 -0
  374. package/packages/types/dist/index.js.map +1 -0
  375. package/packages/types/package.json +5 -5
  376. package/packages/types/src/index.ts +12 -0
  377. package/packages/voice-api/package.json +1 -1
  378. package/packages/webmcp-tester/package.json +1 -1
  379. package/packages/wiki/package.json +1 -1
  380. package/packages/workflow-events/package.json +1 -1
  381. package/packages/workspace-scanner/package.json +1 -1
  382. package/packages/worktree/package.json +1 -1
  383. package/packages/worktree/worktree.ts +1 -1
  384. package/packages/write-review/package.json +1 -1
  385. package/renderer.ts +1 -1
  386. package/scripts/build-packages.ts +162 -0
  387. package/scripts/relay-client.ts +2 -2
  388. package/scripts/typecheck-packages.mjs +3 -3
  389. package/scripts/unified-webhook-server.ts +22 -10
  390. package/scripts/verify-package-contents.ts +345 -0
  391. package/scripts/ws-server.ts +1 -1
  392. package/tracker.ts +1 -1
  393. package/harness/browser-scrapers/base-browser-scraper.d.ts +0 -91
  394. package/harness/browser-scrapers/chrome-profile-manager.d.ts +0 -80
  395. package/harness/browser-scrapers/codex-browser-scraper.d.ts +0 -60
  396. package/harness/browser-scrapers/index.d.ts +0 -29
  397. package/harness/browser-scrapers/zai-browser-scraper.d.ts +0 -79
  398. package/harness/e2e/browser-scrapers/base-browser-scraper.d.ts +0 -92
  399. package/harness/e2e/browser-scrapers/chrome-profile-manager.d.ts +0 -81
  400. package/harness/e2e/browser-scrapers/codex-browser-scraper.d.ts +0 -61
  401. package/harness/e2e/browser-scrapers/index.d.ts +0 -30
  402. package/harness/e2e/browser-scrapers/zai-browser-scraper.d.ts +0 -80
  403. package/harness/langchain/agents.d.ts +0 -143
  404. package/harness/langchain/agents.test.d.ts +0 -2
  405. package/harness/langchain/checkpointer.d.ts +0 -48
  406. package/harness/langchain/checkpointer.test.d.ts +0 -8
  407. package/harness/langchain/cron-cli.d.ts +0 -12
  408. package/harness/langchain/daemon.d.ts +0 -161
  409. package/harness/langchain/daemon.test.d.ts +0 -11
  410. package/harness/langchain/file-tools.d.ts +0 -97
  411. package/harness/langchain/graph.d.ts +0 -706
  412. package/harness/langchain/model-router.d.ts +0 -63
  413. package/harness/langchain/model-router.test.d.ts +0 -2
  414. package/harness/langchain/models.d.ts +0 -72
  415. package/harness/langchain/ping-pong-middleware.d.ts +0 -28
  416. package/harness/langchain/ping-pong-middleware.test.d.ts +0 -2
  417. package/harness/langchain/run.d.ts +0 -15
  418. package/harness/langchain/scoreboard.test.d.ts +0 -13
  419. package/harness/langchain/status-line.d.ts +0 -91
  420. package/harness/langchain/status-line.test.d.ts +0 -8
  421. package/harness/langchain/surge.d.ts +0 -111
  422. package/harness/langchain/surge.test.d.ts +0 -10
  423. package/harness/langchain/widget.d.ts +0 -105
  424. package/harness/langchain/widget.test.d.ts +0 -8
  425. package/packages/autonomous-runtime/dist/worker.d.ts +0 -63
  426. package/packages/autonomous-runtime/dist/worker.js +0 -133
  427. package/packages/capability-registry/src/types.d.ts +0 -47
  428. package/packages/clipboard/dist/clipboard.d.ts +0 -11
  429. package/packages/clipboard/dist/clipboard.js +0 -40
  430. package/packages/clipboard/dist/index.d.ts +0 -2
  431. package/packages/clipboard/dist/index.js +0 -2
  432. package/packages/clipboard/dist/types.d.ts +0 -13
  433. package/packages/clipboard/dist/types.js +0 -5
  434. package/packages/context-discovery/dist/discover.d.ts +0 -3
  435. package/packages/context-discovery/dist/discover.js +0 -42
  436. package/packages/context-discovery/dist/discovery.d.ts +0 -28
  437. package/packages/context-discovery/dist/discovery.js +0 -21
  438. package/packages/context-discovery/dist/index.d.ts +0 -3
  439. package/packages/context-discovery/dist/index.js +0 -2
  440. package/packages/context-discovery/dist/types.d.ts +0 -16
  441. package/packages/context-discovery/dist/types.js +0 -2
  442. package/packages/event-bus/dist/bus.d.ts +0 -15
  443. package/packages/event-bus/dist/bus.js +0 -90
  444. package/packages/event-bus/dist/index.d.ts +0 -4
  445. package/packages/event-bus/dist/index.js +0 -3
  446. package/packages/event-bus/dist/test/bus.test.js +0 -52
  447. package/packages/event-bus/dist/types.d.ts +0 -27
  448. package/packages/event-bus/dist/types.js +0 -10
  449. package/packages/event-store/dist/index.d.ts +0 -3
  450. package/packages/event-store/dist/index.js +0 -2
  451. package/packages/event-store/dist/store.d.ts +0 -15
  452. package/packages/event-store/dist/store.js +0 -131
  453. package/packages/event-store/dist/test/store.test.js +0 -57
  454. package/packages/event-store/dist/types.d.ts +0 -48
  455. package/packages/event-store/dist/types.js +0 -5
  456. package/packages/event-store/src/types.d.ts +0 -48
  457. package/packages/file-copy-helper/dist/src/extension.js +0 -186
  458. package/packages/model-registry/src/types.d.ts +0 -63
  459. package/packages/notification/dist/src/adapters/email-adapter.d.ts +0 -17
  460. package/packages/notification/dist/src/adapters/email-adapter.d.ts.map +0 -1
  461. package/packages/notification/dist/src/adapters/email-adapter.js +0 -89
  462. package/packages/notification/dist/src/adapters/email-adapter.js.map +0 -1
  463. package/packages/notification/dist/src/adapters/line-adapter.d.ts +0 -17
  464. package/packages/notification/dist/src/adapters/line-adapter.d.ts.map +0 -1
  465. package/packages/notification/dist/src/adapters/line-adapter.js +0 -99
  466. package/packages/notification/dist/src/adapters/line-adapter.js.map +0 -1
  467. package/packages/notification/dist/src/adapters/ntfy-adapter.d.ts +0 -17
  468. package/packages/notification/dist/src/adapters/ntfy-adapter.d.ts.map +0 -1
  469. package/packages/notification/dist/src/adapters/ntfy-adapter.js +0 -84
  470. package/packages/notification/dist/src/adapters/ntfy-adapter.js.map +0 -1
  471. package/packages/notification/dist/src/adapters/telegram-adapter.d.ts +0 -56
  472. package/packages/notification/dist/src/adapters/telegram-adapter.d.ts.map +0 -1
  473. package/packages/notification/dist/src/adapters/telegram-adapter.js +0 -251
  474. package/packages/notification/dist/src/adapters/telegram-adapter.js.map +0 -1
  475. package/packages/notification/dist/src/adapters/webhook-adapter.d.ts +0 -15
  476. package/packages/notification/dist/src/adapters/webhook-adapter.d.ts.map +0 -1
  477. package/packages/notification/dist/src/adapters/webhook-adapter.js +0 -64
  478. package/packages/notification/dist/src/adapters/webhook-adapter.js.map +0 -1
  479. package/packages/notification/dist/src/base-adapter.d.ts +0 -36
  480. package/packages/notification/dist/src/base-adapter.d.ts.map +0 -1
  481. package/packages/notification/dist/src/base-adapter.js +0 -39
  482. package/packages/notification/dist/src/base-adapter.js.map +0 -1
  483. package/packages/notification/dist/src/index.d.ts +0 -12
  484. package/packages/notification/dist/src/index.d.ts.map +0 -1
  485. package/packages/notification/dist/src/index.js +0 -12
  486. package/packages/notification/dist/src/index.js.map +0 -1
  487. package/packages/notification/dist/src/notification-center.d.ts +0 -89
  488. package/packages/notification/dist/src/notification-center.d.ts.map +0 -1
  489. package/packages/notification/dist/src/notification-center.js +0 -356
  490. package/packages/notification/dist/src/notification-center.js.map +0 -1
  491. package/packages/notification/dist/src/notification-policy.d.ts +0 -66
  492. package/packages/notification/dist/src/notification-policy.d.ts.map +0 -1
  493. package/packages/notification/dist/src/notification-policy.js +0 -153
  494. package/packages/notification/dist/src/notification-policy.js.map +0 -1
  495. package/packages/notification/dist/src/telegram-webhook-handler.d.ts +0 -86
  496. package/packages/notification/dist/src/telegram-webhook-handler.d.ts.map +0 -1
  497. package/packages/notification/dist/src/telegram-webhook-handler.js +0 -149
  498. package/packages/notification/dist/src/telegram-webhook-handler.js.map +0 -1
  499. package/packages/notification/dist/src/types.d.ts +0 -106
  500. package/packages/notification/dist/src/types.d.ts.map +0 -1
  501. package/packages/notification/dist/src/types.js +0 -7
  502. package/packages/notification/dist/src/types.js.map +0 -1
  503. package/packages/projection-engine/dist/engine.d.ts +0 -61
  504. package/packages/projection-engine/dist/engine.js +0 -76
  505. package/packages/projection-engine/dist/index.d.ts +0 -2
  506. package/packages/projection-engine/dist/index.js +0 -2
  507. package/packages/projection-engine/dist/project.d.ts +0 -3
  508. package/packages/projection-engine/dist/project.js +0 -24
  509. package/packages/projection-engine/dist/types.d.ts +0 -55
  510. package/packages/projection-engine/dist/types.js +0 -5
  511. package/packages/projection-engine/src/types.d.ts +0 -55
  512. package/packages/provider-adapter-sdk/dist/src/builder.d.ts +0 -140
  513. package/packages/provider-adapter-sdk/dist/src/builder.d.ts.map +0 -1
  514. package/packages/provider-adapter-sdk/dist/src/builder.js +0 -332
  515. package/packages/provider-adapter-sdk/dist/src/builder.js.map +0 -1
  516. package/packages/provider-adapter-sdk/dist/src/errors.d.ts +0 -71
  517. package/packages/provider-adapter-sdk/dist/src/errors.d.ts.map +0 -1
  518. package/packages/provider-adapter-sdk/dist/src/errors.js +0 -111
  519. package/packages/provider-adapter-sdk/dist/src/errors.js.map +0 -1
  520. package/packages/provider-adapter-sdk/dist/src/index.d.ts +0 -15
  521. package/packages/provider-adapter-sdk/dist/src/index.d.ts.map +0 -1
  522. package/packages/provider-adapter-sdk/dist/src/index.js +0 -19
  523. package/packages/provider-adapter-sdk/dist/src/index.js.map +0 -1
  524. package/packages/provider-adapter-sdk/dist/src/registry.d.ts +0 -108
  525. package/packages/provider-adapter-sdk/dist/src/registry.d.ts.map +0 -1
  526. package/packages/provider-adapter-sdk/dist/src/registry.js +0 -301
  527. package/packages/provider-adapter-sdk/dist/src/registry.js.map +0 -1
  528. package/packages/provider-adapter-sdk/dist/src/tester.d.ts +0 -71
  529. package/packages/provider-adapter-sdk/dist/src/tester.d.ts.map +0 -1
  530. package/packages/provider-adapter-sdk/dist/src/tester.js +0 -392
  531. package/packages/provider-adapter-sdk/dist/src/tester.js.map +0 -1
  532. package/packages/provider-adapter-sdk/dist/src/types.d.ts +0 -182
  533. package/packages/provider-adapter-sdk/dist/src/types.d.ts.map +0 -1
  534. package/packages/provider-adapter-sdk/dist/src/types.js +0 -11
  535. package/packages/provider-adapter-sdk/dist/src/types.js.map +0 -1
  536. package/packages/provider-router/dist/capability-registry/src/types.d.ts +0 -47
  537. package/packages/provider-router/dist/capability-registry/src/types.d.ts.map +0 -1
  538. package/packages/provider-router/dist/capability-registry/src/types.js +0 -10
  539. package/packages/provider-router/dist/capability-registry/src/types.js.map +0 -1
  540. package/packages/provider-router/dist/provider-router/src/index.d.ts +0 -23
  541. package/packages/provider-router/dist/provider-router/src/index.d.ts.map +0 -1
  542. package/packages/provider-router/dist/provider-router/src/index.js +0 -25
  543. package/packages/provider-router/dist/provider-router/src/index.js.map +0 -1
  544. package/packages/provider-router/dist/provider-router/src/policy.d.ts +0 -10
  545. package/packages/provider-router/dist/provider-router/src/policy.d.ts.map +0 -1
  546. package/packages/provider-router/dist/provider-router/src/policy.js +0 -45
  547. package/packages/provider-router/dist/provider-router/src/policy.js.map +0 -1
  548. package/packages/provider-router/dist/provider-router/src/provider-router.d.ts +0 -56
  549. package/packages/provider-router/dist/provider-router/src/provider-router.d.ts.map +0 -1
  550. package/packages/provider-router/dist/provider-router/src/provider-router.js +0 -222
  551. package/packages/provider-router/dist/provider-router/src/provider-router.js.map +0 -1
  552. package/packages/provider-router/dist/provider-router/src/strategies.d.ts +0 -19
  553. package/packages/provider-router/dist/provider-router/src/strategies.d.ts.map +0 -1
  554. package/packages/provider-router/dist/provider-router/src/strategies.js +0 -110
  555. package/packages/provider-router/dist/provider-router/src/strategies.js.map +0 -1
  556. package/packages/provider-router/dist/provider-router/src/types.d.ts +0 -91
  557. package/packages/provider-router/dist/provider-router/src/types.d.ts.map +0 -1
  558. package/packages/provider-router/dist/provider-router/src/types.js +0 -10
  559. package/packages/provider-router/dist/provider-router/src/types.js.map +0 -1
  560. package/packages/provider-router/dist/src/index.d.ts +0 -23
  561. package/packages/provider-router/dist/src/index.d.ts.map +0 -1
  562. package/packages/provider-router/dist/src/index.js +0 -25
  563. package/packages/provider-router/dist/src/index.js.map +0 -1
  564. package/packages/provider-router/dist/src/policy.d.ts +0 -10
  565. package/packages/provider-router/dist/src/policy.d.ts.map +0 -1
  566. package/packages/provider-router/dist/src/policy.js +0 -45
  567. package/packages/provider-router/dist/src/policy.js.map +0 -1
  568. package/packages/provider-router/dist/src/provider-router.d.ts +0 -56
  569. package/packages/provider-router/dist/src/provider-router.d.ts.map +0 -1
  570. package/packages/provider-router/dist/src/provider-router.js +0 -222
  571. package/packages/provider-router/dist/src/provider-router.js.map +0 -1
  572. package/packages/provider-router/dist/src/strategies.d.ts +0 -19
  573. package/packages/provider-router/dist/src/strategies.d.ts.map +0 -1
  574. package/packages/provider-router/dist/src/strategies.js +0 -110
  575. package/packages/provider-router/dist/src/strategies.js.map +0 -1
  576. package/packages/provider-router/dist/src/types.d.ts +0 -91
  577. package/packages/provider-router/dist/src/types.d.ts.map +0 -1
  578. package/packages/provider-router/dist/src/types.js +0 -10
  579. package/packages/provider-router/dist/src/types.js.map +0 -1
  580. package/packages/provider-router/dist/types/src/runtime-types.d.ts +0 -412
  581. package/packages/provider-router/dist/types/src/runtime-types.d.ts.map +0 -1
  582. package/packages/provider-router/dist/types/src/runtime-types.js +0 -2
  583. package/packages/provider-router/dist/types/src/runtime-types.js.map +0 -1
  584. package/packages/session-api/dist/api.d.ts +0 -83
  585. package/packages/session-api/dist/api.js +0 -35
  586. package/packages/session-api/dist/index.d.ts +0 -2
  587. package/packages/session-api/dist/index.js +0 -2
  588. package/packages/session-api/dist/types.d.ts +0 -22
  589. package/packages/session-api/dist/types.js +0 -5
  590. package/packages/session-export/dist/exporter.d.ts +0 -28
  591. package/packages/session-export/dist/exporter.js +0 -38
  592. package/packages/session-export/dist/index.d.ts +0 -2
  593. package/packages/session-export/dist/index.js +0 -2
  594. package/packages/session-export/dist/types.d.ts +0 -20
  595. package/packages/session-export/dist/types.js +0 -5
  596. package/packages/subscription-engine/dist/engine.d.ts +0 -13
  597. package/packages/subscription-engine/dist/engine.js +0 -40
  598. package/packages/subscription-engine/dist/index.d.ts +0 -2
  599. package/packages/subscription-engine/dist/index.js +0 -2
  600. package/packages/subscription-engine/dist/subscriptions.d.ts +0 -19
  601. package/packages/subscription-engine/dist/subscriptions.js +0 -32
  602. package/packages/subscription-engine/dist/types.d.ts +0 -24
  603. package/packages/subscription-engine/dist/types.js +0 -5
  604. package/packages/trajectory/test/store.test.d.ts +0 -2
  605. package/packages/workflow-events/dist/events.d.ts +0 -38
  606. package/packages/workflow-events/dist/events.js +0 -46
  607. package/packages/workflow-events/dist/index.d.ts +0 -2
  608. package/packages/workflow-events/dist/index.js +0 -2
  609. package/packages/workflow-events/dist/pipeline.d.ts +0 -21
  610. package/packages/workflow-events/dist/pipeline.js +0 -27
  611. package/packages/workflow-events/dist/types.d.ts +0 -110
  612. package/packages/workflow-events/dist/types.js +0 -5
  613. package/packages/workflow-events/src/types.d.ts +0 -110
@@ -1,63 +0,0 @@
1
- /**
2
- * Smart model router — reads the request prompt and decides which model to use
3
- * for each agent role at runtime. No hardcoded model IDs; all choices are driven
4
- * by env vars + optional per-request directives in the prompt.
5
- *
6
- * Per-request directives (optional — fallback to env defaults if absent):
7
- *
8
- * Planner directive:
9
- * [planner: gpt-5.6] or [planner: GLM-5.2] or [planner: MiniMax-M2]
10
- *
11
- * Reviewer directive (master reviewer — GLM is the design default):
12
- * [reviewer: GLM-5.2] or [reviewer: GPT-5.6]
13
- *
14
- * Coder directive:
15
- * [coder: MiniMax-M2] or [coder: gpt-5.6]
16
- *
17
- * Examples in a prompt:
18
- * "Implement X [reviewer: GPT-5.6] [planner: GLM-5.2]"
19
- * "Use GLM as master reviewer for this task"
20
- * "GPT as reviewer: please review this code"
21
- *
22
- * The parser is forgiving — these all work:
23
- * [reviewer: GLM] → uses GLM_MODEL from env
24
- * [reviewer: gpt] → uses PLANNER_MODEL from env (same family)
25
- * [reviewer: MiniMax] → uses MINIMAX_MODEL from env
26
- *
27
- * Wiki: wiki/multi-agent-langchain.md
28
- */
29
- /** Model options derived from a resolved env prefix. */
30
- export interface ResolvedModel {
31
- model: string;
32
- baseURL: string;
33
- apiKey: string;
34
- }
35
- /** Result of routing a request to models. */
36
- export interface RouteResult {
37
- planner: ResolvedModel;
38
- reviewer: ResolvedModel;
39
- coder: ResolvedModel;
40
- /** Text of the request with directive comments stripped (safe for agent prompts). */
41
- cleanRequest: string;
42
- }
43
- /**
44
- * Resolve a model family to actual env-backed model options.
45
- * family: "GLM" | "PLANNER" | "MINIMAX" (case-insensitive input)
46
- */
47
- export declare function resolveModel(family: string): ResolvedModel;
48
- /**
49
- * Route a request prompt to the correct model configuration.
50
- *
51
- * Algorithm:
52
- * 1. Extract [role: family] directives from the prompt
53
- * 2. Resolve each family to actual env-backed model options
54
- * 3. Apply defaults (planner→PLANNER, reviewer→GLM, coder→MINIMAX)
55
- * 4. Strip directive comments from the request before passing to agents
56
- */
57
- export declare function routeRequest(request: string): RouteResult;
58
- /**
59
- * Route a request, also scanning natural-language hints.
60
- * Directives ([role: family]) take precedence over natural hints.
61
- */
62
- export declare function routeRequestSmart(request: string): RouteResult;
63
- //# sourceMappingURL=model-router.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=model-router.test.d.ts.map
@@ -1,72 +0,0 @@
1
- /**
2
- * Model factories — all models fully env-driven, no hardcoded defaults.
3
- *
4
- * Agent roles (configurable via env):
5
- * planner → GPT (PLANNER_API_KEY, PLANNER_MODEL, PLANNER_BASE_URL)
6
- * reviewer → GLM (GLM_API_KEY, GLM_MODEL, GLM_BASE_URL)
7
- * coder → MiniMax (MINIMAX_API_KEY, MINIMAX_MODEL, MINIMAX_BASE_URL)
8
- *
9
- * Wiki: wiki/multi-agent-langchain.md
10
- */
11
- import { ChatOpenAI } from "@langchain/openai";
12
- export interface ModelOptions {
13
- /** Override model id (e.g. "gpt-5.6", "GLM-5.2", "MiniMax-M2") */
14
- model?: string;
15
- /** Override API base URL */
16
- baseURL?: string;
17
- /** Override API key */
18
- apiKey?: string;
19
- /** Sampling temperature */
20
- temperature?: number;
21
- }
22
- /**
23
- * Pre-resolved model config from model-router.ts.
24
- * Pass this to skip env-lookup and use the routed model directly.
25
- */
26
- export interface ResolvedModelOptions {
27
- model: string;
28
- baseURL: string;
29
- apiKey: string;
30
- /** Sampling temperature */
31
- temperature?: number;
32
- }
33
- /**
34
- * Planner model — GPT family.
35
- *
36
- * Can be called with:
37
- * - ModelOptions (override fields, rest from env)
38
- * - ResolvedModelOptions (fully resolved from model-router, no env lookup)
39
- *
40
- * Env vars (when using ModelOptions):
41
- * PLANNER_API_KEY (required)
42
- * PLANNER_MODEL (required)
43
- * PLANNER_BASE_URL (required)
44
- */
45
- export declare function createPlannerModel(opts?: ModelOptions | ResolvedModelOptions): ChatOpenAI;
46
- /**
47
- * Reviewer model — GLM family (master reviewer per design).
48
- *
49
- * Can be called with:
50
- * - ModelOptions (override fields, rest from env)
51
- * - ResolvedModelOptions (fully resolved from model-router, no env lookup)
52
- *
53
- * Env vars (when using ModelOptions):
54
- * GLM_API_KEY (required)
55
- * GLM_MODEL (required)
56
- * GLM_BASE_URL (required)
57
- */
58
- export declare function createReviewerModel(opts?: ModelOptions | ResolvedModelOptions): ChatOpenAI;
59
- /**
60
- * Coder model — MiniMax family.
61
- *
62
- * Can be called with:
63
- * - ModelOptions (override fields, rest from env)
64
- * - ResolvedModelOptions (fully resolved from model-router, no env lookup)
65
- *
66
- * Env vars (when using ModelOptions):
67
- * MINIMAX_API_KEY (required)
68
- * MINIMAX_MODEL (required)
69
- * MINIMAX_BASE_URL (required)
70
- */
71
- export declare function createCoderModel(opts?: ModelOptions | ResolvedModelOptions): ChatOpenAI;
72
- //# sourceMappingURL=models.d.ts.map
@@ -1,28 +0,0 @@
1
- import { PingPongDecisionEngine, type PingPongDecisionOptions, type PingPongDecisionResult } from "../../packages/intent-analyzer/src/index.js";
2
- export interface PingPongMiddlewareOptions extends PingPongDecisionOptions {
3
- /** Shared directory watched by LoopDaemon. Defaults to /tmp/herdr-workspace. */
4
- workspace?: string;
5
- /** Repository root and blackboard owner. Defaults to process.cwd(). */
6
- projectRoot?: string;
7
- /** Agent or terminal identifier for audit records. */
8
- actorId?: string;
9
- /** Also enqueue suggest_ping_pong decisions. Default: false. */
10
- enqueueSuggestions?: boolean;
11
- /** Test hook for stable timestamps. */
12
- now?: () => Date;
13
- }
14
- export interface PingPongMiddlewareResult {
15
- decision: PingPongDecisionResult;
16
- enqueued: boolean;
17
- taskId?: string;
18
- taskFile?: string;
19
- auditFile: string;
20
- blackboardFile: string;
21
- }
22
- export declare class PingPongMiddleware {
23
- private readonly engine;
24
- constructor(engine?: PingPongDecisionEngine);
25
- submit(request: string, options?: PingPongMiddlewareOptions): PingPongMiddlewareResult;
26
- }
27
- export declare function submitPingPongIntent(request: string, options?: PingPongMiddlewareOptions): PingPongMiddlewareResult;
28
- //# sourceMappingURL=ping-pong-middleware.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ping-pong-middleware.test.d.ts.map
@@ -1,15 +0,0 @@
1
- /**
2
- * CLI runner for the LangChain write-review loop.
3
- *
4
- * Usage:
5
- * bun harness/langchain/run.ts --mode graph --request "implement X" [--max-iterations 3]
6
- * bun harness/langchain/run.ts --mode graph --request "implement X" --dry-run
7
- * bun harness/langchain/run.ts --mode supervisor --request "implement X"
8
- *
9
- * --dry-run uses deterministic stubs — no API keys needed. Use it to verify
10
- * the whole loop machinery (plan → write → review → fix → approve).
11
- *
12
- * Wiki: wiki/multi-agent-langchain.md
13
- */
14
- export {};
15
- //# sourceMappingURL=run.d.ts.map
@@ -1,13 +0,0 @@
1
- /**
2
- * Scoreboard integration tests — T15
3
- *
4
- * Tests that the WriteReviewBlackboard is correctly wired into the LangGraph loop:
5
- * 1. `buildRealLoopDeps` creates and updates the blackboard at each step
6
- * 2. Agent prompts receive the scoreboard markdown
7
- * 3. `status.json` reflects the current phase/verdict/files
8
- *
9
- * Run:
10
- * bun test harness/langchain/scoreboard.test.ts
11
- */
12
- export {};
13
- //# sourceMappingURL=scoreboard.test.d.ts.map
@@ -1,91 +0,0 @@
1
- /**
2
- * Status line manager — drives the harness loop status in the pi host.
3
- *
4
- * Architecture:
5
- *
6
- * Pi-lens installed?
7
- * ├─ YES → LoopWidget.makeRenderer() → pi host's ui.setWidget("harness-loop", ...)
8
- * └─ NO → write to .harness-status → pi host reads and displays
9
- *
10
- * The status line shows two tiers of information:
11
- * [loop status] [API quota]
12
- * [P] planning | MiniMax: 5h: 89% left · week: 90% left
13
- *
14
- * API quota is read from ~/.pi-harness/quota.json (written by the pi host
15
- * process that has access to the TUI quota signals). The daemon polls this
16
- * file every 60s so the status line stays fresh even when no task is running.
17
- *
18
- * Wiki: wiki/pi-lens-status-line.md
19
- */
20
- export interface QuotaData {
21
- /** MiniMax 5-hour window usage percentage (0–100). Undefined = unknown. */
22
- fiveHourPercent?: number;
23
- /** MiniMax weekly window usage percentage (0–100). Undefined = unknown. */
24
- weeklyPercent?: number;
25
- /** ISO timestamp of when the 5-hour quota resets. */
26
- fiveHourResetAt?: string;
27
- /** ISO timestamp of when the weekly quota resets. */
28
- weeklyResetAt?: string;
29
- /** Raw message from GLM quota signal (for display) */
30
- rawMessage?: string;
31
- }
32
- /** True when the daemon is running inside a pi-lens-equipped pi host. */
33
- export declare function isPiLensAvailable(): boolean;
34
- /**
35
- * Build a one-line status string.
36
- * Format: "MiniMax: 5h: 89% left (resets in 2h) · week: 90% left"
37
- */
38
- export declare function formatQuotaLine(q: QuotaData): string;
39
- /**
40
- * Drives the harness status line in the pi host.
41
- *
42
- * - When pi-lens is available: provides the LoopWidget renderer factory
43
- * for the pi host to integrate via `ui.setWidget("harness-loop", factory)`.
44
- * - When pi-lens is not available: writes a plain-text status to
45
- * `<workspace>/.harness-status` every time update() is called.
46
- *
47
- * The pi host can read `.harness-status` and display it in its own UI.
48
- */
49
- export declare class StatusLineManager {
50
- private readonly workspace;
51
- private readonly quotaFile;
52
- private lastQuota;
53
- private timer?;
54
- private loopStatus;
55
- constructor(workspace: string);
56
- /**
57
- * Start polling the quota file.
58
- * Call once after construction.
59
- */
60
- start(): void;
61
- /** Stop polling. */
62
- stop(): void;
63
- /**
64
- * Update the loop status (planning/writing/reviewing/finished).
65
- * Call this from the daemon's onStep handler.
66
- */
67
- updateLoopStatus(status: string): void;
68
- /**
69
- * Update the full status — call after each loop transition.
70
- * Writes the status file (when no pi-lens) and logs to console.
71
- */
72
- update(data: {
73
- loopStatus?: string;
74
- quota?: QuotaData;
75
- }): void;
76
- /**
77
- * Returns a rendered one-line status string for the pi host to display.
78
- * Combines loop status + quota into a single readable line.
79
- */
80
- getLine(): string;
81
- private _pollQuota;
82
- private _writeStatusFile;
83
- }
84
- /**
85
- * Write quota data to the shared quota file.
86
- * Call this from the pi host process that receives GLM TUI signals.
87
- *
88
- * The daemon reads this file to keep its status line fresh.
89
- */
90
- export declare function writeQuotaFile(data: QuotaData): void;
91
- //# sourceMappingURL=status-line.d.ts.map
@@ -1,8 +0,0 @@
1
- /**
2
- * StatusLineManager tests — T16
3
- *
4
- * Tests the pi-lens detection, quota formatting, and status file writing
5
- * when pi-lens is not available.
6
- */
7
- export {};
8
- //# sourceMappingURL=status-line.test.d.ts.map
@@ -1,111 +0,0 @@
1
- /**
2
- * Surge auto-resume — 529 / overloaded_error (MiniMax) + 1308 (GLM quota) detection,
3
- * escalation backoff, and retry wrappers for the daemon's graph invocations.
4
- *
5
- * Two wrappers:
6
- * invokeWithSurgeRetry — MiniMax 529/overload; exponential backoff
7
- * invokeWithGLMRetry — GLM 1308 quota; waits until reset time
8
- *
9
- * Wiki: wiki/peak-hour-surge-auto-resume.md
10
- */
11
- export interface SurgeSignal {
12
- /** Parsed recovery delay in ms (midpoint of the stated range, or fallback) */
13
- retryAfterMs: number;
14
- /** True when the delay came from an explicit provider statement */
15
- explicit: boolean;
16
- /** Raw error text for logs */
17
- sourceText: string;
18
- }
19
- /**
20
- * Classify an unknown error as a transient provider surge (MiniMax).
21
- * Returns null for anything that is not a 529/overload-class failure.
22
- */
23
- export declare function classifySurge(err: unknown): SurgeSignal | null;
24
- /**
25
- * Classify a GLM 1308 quota exhaustion error.
26
- * Returns the reset-at ISO timestamp, or null if not a GLM quota error.
27
- */
28
- export declare function classifyGLMQuota(err: unknown): GLMQuotaSignal | null;
29
- export interface GLMQuotaSignal {
30
- /** ISO timestamp when the quota resets */
31
- resetAt: string;
32
- /** Epoch ms when the quota resets */
33
- resetAtEpoch: number;
34
- /** Raw error text for logs */
35
- sourceText: string;
36
- }
37
- export interface SurgePolicy {
38
- /** Override the signal's parsed delay (ms). Default: use the signal. */
39
- baseDelayMs?: number;
40
- /** Delay multiplier per attempt. Default: 2 (3 → 6 → 12 min) */
41
- multiplier: number;
42
- /** Floor for any wait. Default: 30_000 (never hammer a surging provider) */
43
- minDelayMs: number;
44
- /** Ceiling for any wait. Default: 15 min */
45
- maxDelayMs: number;
46
- /** ± ratio applied as jitter. Default: 0.2 */
47
- jitterRatio: number;
48
- /** Max surge pauses before giving up. Default: 5 */
49
- maxAttempts: number;
50
- }
51
- /**
52
- * Deterministic delay computation (unit-testable, no timers).
53
- * `rand` in [0,1] controls jitter; omit it for zero jitter.
54
- */
55
- export declare function computeSurgeDelayMs(signal: SurgeSignal, attempt: number, policy?: Partial<SurgePolicy>, rand?: number): number;
56
- /** Attempt counter with escalation; persists across a task's lifetime. */
57
- export declare class SurgeScheduler {
58
- private attempt;
59
- private readonly policy;
60
- constructor(policy?: Partial<SurgePolicy>);
61
- /** Next attempt number, or null when maxAttempts is exhausted. */
62
- nextAttempt(): number | null;
63
- get attempts(): number;
64
- delayFor(signal: SurgeSignal, rand?: number): number;
65
- }
66
- export interface SurgeRetryOptions {
67
- policy?: Partial<SurgePolicy>;
68
- /**
69
- * Pre-existing scheduler to use. When provided, the attempt counter persists
70
- * across calls — enabling true exponential escalation across multiple surges
71
- * within the same task (e.g. surge on 2nd loop.invoke, surge on 3rd loop.invoke).
72
- * If omitted, a fresh scheduler is created (attempt counter resets per call).
73
- */
74
- scheduler?: SurgeScheduler;
75
- /** Called before each surge pause (logging / notifications) */
76
- onSurge?: (info: {
77
- attempt: number;
78
- delayMs: number;
79
- signal: SurgeSignal;
80
- }) => void;
81
- /** Called once when attempts are exhausted (no more retries in this scheduler).
82
- * Can be async to allow sleeping. Return true to retry, false/undefined to throw.
83
- */
84
- onExhausted?: (signal: SurgeSignal) => boolean | void | Promise<boolean | void>;
85
- /** Injectable sleep for tests. Default: real setTimeout */
86
- sleep?: (ms: number) => Promise<void>;
87
- }
88
- /**
89
- * Run `fn`, retrying only on surge-classified failures (MiniMax 529/overload)
90
- * with exponential backoff. Non-surge errors rethrow immediately.
91
- */
92
- export declare function invokeWithSurgeRetry<T>(fn: () => Promise<T>, opts?: SurgeRetryOptions): Promise<T>;
93
- export interface GLMRetryOptions {
94
- /** Called when GLM quota exhaustion is detected (for status-line countdown) */
95
- onGLMQuota?: (signal: GLMQuotaSignal) => void;
96
- /** Called after the countdown expires and the loop retries */
97
- onGLMRetry?: (signal: GLMQuotaSignal) => void;
98
- /** Called when the GLM quota error is non-retryable (e.g., no reset time) */
99
- onGLMExhausted?: (signal: GLMQuotaSignal) => void;
100
- /** Injectable sleep for tests. Default: real setTimeout */
101
- sleep?: (ms: number) => Promise<void>;
102
- /** How often to tick the countdown callback (default: 30s) */
103
- tickMs?: number;
104
- }
105
- /**
106
- * Run `fn`, retrying on GLM 1308 quota errors.
107
- * After the first 1308, waits until the reset time before retrying.
108
- * Subsequent 1308s within the same wait window are silently ignored.
109
- * Non-GLM-quota errors rethrow immediately.
110
- */
111
- export declare function invokeWithGLMRetry<T>(fn: () => Promise<T>, opts?: GLMRetryOptions): Promise<T>;
@@ -1,10 +0,0 @@
1
- /**
2
- * Surge auto-resume tests — S2/S4 acceptance (wiki/peak-hour-surge-auto-resume.md)
3
- *
4
- * All deterministic via injected sleep/rand — no real timers, no API keys.
5
- *
6
- * Run:
7
- * bun test harness/langchain/surge.test.ts
8
- */
9
- export {};
10
- //# sourceMappingURL=surge.test.d.ts.map
@@ -1,105 +0,0 @@
1
- /**
2
- * LoopWidget — harness progress display for the pi host status line.
3
- *
4
- * Architecture mirrors pi-lens's `clients/widget-state.ts` + `renderWidget()`:
5
- * - State store: per-file step counts, iteration, phase
6
- * - Render function: builds the `!NW ●ME` style summary line
7
- * - Pi host integration: wired via ExtensionUIContext.setWidget() when available
8
- *
9
- * The widget is designed as a dependency injected into LoopDaemon/LoopRuntime,
10
- * so it works in two modes:
11
- * 1. Standalone (console): logs human-readable progress to stderr
12
- * 2. Pi host: calls ui.setWidget("harness-loop", renderFn) for TUI display
13
- *
14
- * Wiki: wiki/multi-agent-langchain.md
15
- */
16
- import type { TUI } from "@earendil-works/pi-tui";
17
- import type { Theme } from "@earendil-works/pi-coding-agent";
18
- /** Valid theme color keys passed to `theme.fg()`.*/
19
- type ColorKey = "dim" | "error" | "warning" | "success" | "accent";
20
- export type LoopPhase = "idle" | "planning" | "writing" | "reviewing" | "fixing" | "approving" | "blocked" | "surge-pause" | "complete" | "error";
21
- export interface LoopWidgetOptions {
22
- /** Called with the rendered lines each time the widget updates. */
23
- onRender?: (lines: string[]) => void;
24
- }
25
- export declare class LoopWidget {
26
- private files;
27
- private phase;
28
- private iteration;
29
- private maxIterations;
30
- private stepLabel;
31
- private errors;
32
- private warnings;
33
- private readonly onRender?;
34
- constructor(options?: LoopWidgetOptions);
35
- /** Called when the loop starts a new iteration. */
36
- startIteration(iter: number, max: number): void;
37
- /** Called when the loop transitions to a new phase. */
38
- setPhase(phase: LoopPhase, label?: string): void;
39
- /** Called when the coder writes to a file. */
40
- recordWrite(filePath: string): void;
41
- /** Called when the reviewer reports blockers for a file. */
42
- recordBlockers(filePath: string, count: number): void;
43
- /** Called when the reviewer passes a file (no blockers). */
44
- recordReviewPass(filePath: string): void;
45
- /** Called on surge-pause / quota-wait events. */
46
- setSurgePause(resetAt?: Date): void;
47
- /** Called on unrecoverable error. */
48
- setError(message: string): void;
49
- /** Called when the loop completes with a verdict. */
50
- setComplete(verdict: "approved" | "rejected" | "max_iterations"): void;
51
- /** Reset to idle state. */
52
- reset(): void;
53
- /**
54
- * Build widget lines for the pi host's `setWidget()` renderer.
55
- *
56
- * Returns 0-3 lines:
57
- * Line 1: `harness [iter 2/5] ✍ coder !2W` — header + summary
58
- * Line 2: ` surge pause — resets 19:17` — surge detail (when applicable)
59
- * Line 3: ` ●surge.ts ✍2 🔍3 !1` — file rows (up to 5)
60
- */
61
- renderWidget(width: number, theme: {
62
- fg: (color: ColorKey, s: string) => string;
63
- }): string[];
64
- /** Console fallback (standalone mode). */
65
- toConsoleString(): string;
66
- /**
67
- * Returns a pi-tui Component factory for use with `ui.setWidget("harness-loop", factory)`.
68
- * The caller (pi host integration) owns the `setWidget` call — this factory is just
69
- * the render function.
70
- *
71
- * Usage in pi host:
72
- * ```
73
- * setWidget("harness-loop", makeWidgetRenderer(widget, theme), { placement: "belowEditor" });
74
- * ```
75
- */
76
- /**
77
- * Returns a factory suitable for `ui.setWidget("harness-loop", factory)` in the
78
- * pi host. The factory's `render(width)` is called by the pi-tui render loop
79
- * on every frame; `invalidate` is called by the harness to trigger a re-render.
80
- */
81
- makeRenderer(): {
82
- factory: (tui: TUI, theme: Theme) => {
83
- render: (width: number) => string[];
84
- invalidate: () => void;
85
- dispose: () => void;
86
- };
87
- invalidate: () => void;
88
- };
89
- private getOrCreate;
90
- private fileRecords;
91
- private fileBasename;
92
- private classifyFileTier;
93
- private phaseLabel;
94
- private phaseIcon;
95
- private formatResetTime;
96
- /**
97
- * Truncate `line` to `width` visible columns.
98
- * Uses `visibleWidth` (not raw char count) so ANSI codes don't cause
99
- * false wrapping — matching how the terminal measures columns.
100
- */
101
- private fitLine;
102
- private render;
103
- }
104
- export declare function getLoopWidget(): LoopWidget;
105
- //# sourceMappingURL=widget.d.ts.map
@@ -1,8 +0,0 @@
1
- /**
2
- * LoopWidget tests — T14
3
- *
4
- * Run:
5
- * bun test harness/langchain/widget.test.ts
6
- */
7
- export {};
8
- //# sourceMappingURL=widget.test.d.ts.map
@@ -1,63 +0,0 @@
1
- /**
2
- * Worker Stub — RFC-0101 §4
3
- *
4
- * A worker is a pi session that owns tasks from the inbox.
5
- * This is the lightweight worker-side of the lease protocol.
6
- *
7
- * The worker picks up work via the inbox's `claim()` method
8
- * and reports results via `complete()`.
9
- */
10
- import type { TaskResult, WorkerStatus } from "./types.js";
11
- import type { TaskInbox } from "./inbox.js";
12
- import type { TaskLease } from "./lease.js";
13
- export interface WorkerConfig {
14
- inbox: TaskInbox;
15
- workerId: string;
16
- heartbeatIntervalMs?: number;
17
- onError?: (taskId: string, error: unknown) => void;
18
- }
19
- export interface WorkerEvents {
20
- onLease: (lease: TaskLease) => void;
21
- onLeaseExpired: (taskId: string) => void;
22
- onComplete: (taskId: string, result: TaskResult) => void;
23
- onError: (taskId: string, error: unknown) => void;
24
- }
25
- /**
26
- * Worker — picks up tasks from the inbox and processes them.
27
- *
28
- * Lifecycle:
29
- * 1. Construct with inbox + workerId
30
- * 2. `start()` — begins polling/claiming tasks
31
- * 3. `stop()` — stops claiming, expires held leases
32
- *
33
- * The worker does NOT run tasks itself — it delegates to the harness
34
- * loop runtime. It just manages the lease lifecycle.
35
- */
36
- export declare class Worker {
37
- private readonly config;
38
- private readonly events;
39
- private running;
40
- private heartbeatTimer;
41
- constructor(config: WorkerConfig);
42
- on<K extends keyof WorkerEvents>(event: K, handler: WorkerEvents[K]): void;
43
- /**
44
- * Start the worker — begins polling for available tasks.
45
- */
46
- start(): Promise<void>;
47
- /**
48
- * Stop the worker — stops polling and expires any held leases.
49
- */
50
- stop(): Promise<void>;
51
- /**
52
- * Status of this worker.
53
- */
54
- status(): WorkerStatus;
55
- private _poll;
56
- private _processTask;
57
- /**
58
- * Run a single task. Stub — replaces with actual harness loop integration.
59
- */
60
- private _runTask;
61
- private _heartbeat;
62
- }
63
- //# sourceMappingURL=worker.d.ts.map