@isaacriehm/cairn 0.1.0 → 0.1.3

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 (533) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +0 -1
  4. package/dist/index.js.map +1 -1
  5. package/package.json +4 -4
  6. package/dist/backprop/id.d.ts +0 -14
  7. package/dist/backprop/id.js +0 -40
  8. package/dist/backprop/id.js.map +0 -1
  9. package/dist/backprop/index.d.ts +0 -23
  10. package/dist/backprop/index.js +0 -21
  11. package/dist/backprop/index.js.map +0 -1
  12. package/dist/backprop/prompt.d.ts +0 -16
  13. package/dist/backprop/prompt.js +0 -101
  14. package/dist/backprop/prompt.js.map +0 -1
  15. package/dist/backprop/runner.d.ts +0 -18
  16. package/dist/backprop/runner.js +0 -95
  17. package/dist/backprop/runner.js.map +0 -1
  18. package/dist/backprop/schema.d.ts +0 -61
  19. package/dist/backprop/schema.js +0 -55
  20. package/dist/backprop/schema.js.map +0 -1
  21. package/dist/backprop/types.d.ts +0 -101
  22. package/dist/backprop/types.js +0 -24
  23. package/dist/backprop/types.js.map +0 -1
  24. package/dist/backprop/writer.d.ts +0 -27
  25. package/dist/backprop/writer.js +0 -301
  26. package/dist/backprop/writer.js.map +0 -1
  27. package/dist/claude/error.d.ts +0 -33
  28. package/dist/claude/error.js +0 -58
  29. package/dist/claude/error.js.map +0 -1
  30. package/dist/claude/index.d.ts +0 -3
  31. package/dist/claude/index.js +0 -3
  32. package/dist/claude/index.js.map +0 -1
  33. package/dist/claude/runner.d.ts +0 -11
  34. package/dist/claude/runner.js +0 -132
  35. package/dist/claude/runner.js.map +0 -1
  36. package/dist/claude/types.d.ts +0 -52
  37. package/dist/claude/types.js +0 -14
  38. package/dist/claude/types.js.map +0 -1
  39. package/dist/cli/daemon.d.ts +0 -54
  40. package/dist/cli/daemon.js +0 -351
  41. package/dist/cli/daemon.js.map +0 -1
  42. package/dist/cli/install.d.ts +0 -52
  43. package/dist/cli/install.js +0 -308
  44. package/dist/cli/install.js.map +0 -1
  45. package/dist/cli/mirror.d.ts +0 -1
  46. package/dist/cli/mirror.js +0 -97
  47. package/dist/cli/mirror.js.map +0 -1
  48. package/dist/cli/run.d.ts +0 -1
  49. package/dist/cli/run.js +0 -174
  50. package/dist/cli/run.js.map +0 -1
  51. package/dist/cli/task.d.ts +0 -18
  52. package/dist/cli/task.js +0 -137
  53. package/dist/cli/task.js.map +0 -1
  54. package/dist/cli/watch.d.ts +0 -1
  55. package/dist/cli/watch.js +0 -73
  56. package/dist/cli/watch.js.map +0 -1
  57. package/dist/decision-capture/capture.d.ts +0 -57
  58. package/dist/decision-capture/capture.js +0 -186
  59. package/dist/decision-capture/capture.js.map +0 -1
  60. package/dist/decision-capture/extractor.d.ts +0 -20
  61. package/dist/decision-capture/extractor.js +0 -103
  62. package/dist/decision-capture/extractor.js.map +0 -1
  63. package/dist/decision-capture/id.d.ts +0 -14
  64. package/dist/decision-capture/id.js +0 -44
  65. package/dist/decision-capture/id.js.map +0 -1
  66. package/dist/decision-capture/index.d.ts +0 -25
  67. package/dist/decision-capture/index.js +0 -21
  68. package/dist/decision-capture/index.js.map +0 -1
  69. package/dist/decision-capture/prompt.d.ts +0 -15
  70. package/dist/decision-capture/prompt.js +0 -68
  71. package/dist/decision-capture/prompt.js.map +0 -1
  72. package/dist/decision-capture/refinement-prompt.d.ts +0 -25
  73. package/dist/decision-capture/refinement-prompt.js +0 -146
  74. package/dist/decision-capture/refinement-prompt.js.map +0 -1
  75. package/dist/decision-capture/refinement-schema.d.ts +0 -52
  76. package/dist/decision-capture/refinement-schema.js +0 -61
  77. package/dist/decision-capture/refinement-schema.js.map +0 -1
  78. package/dist/decision-capture/refinement.d.ts +0 -60
  79. package/dist/decision-capture/refinement.js +0 -439
  80. package/dist/decision-capture/refinement.js.map +0 -1
  81. package/dist/decision-capture/schema.d.ts +0 -70
  82. package/dist/decision-capture/schema.js +0 -71
  83. package/dist/decision-capture/schema.js.map +0 -1
  84. package/dist/decision-capture/types.d.ts +0 -201
  85. package/dist/decision-capture/types.js +0 -20
  86. package/dist/decision-capture/types.js.map +0 -1
  87. package/dist/decision-capture/writer.d.ts +0 -90
  88. package/dist/decision-capture/writer.js +0 -267
  89. package/dist/decision-capture/writer.js.map +0 -1
  90. package/dist/frontend/discord/acl.d.ts +0 -6
  91. package/dist/frontend/discord/acl.js +0 -19
  92. package/dist/frontend/discord/acl.js.map +0 -1
  93. package/dist/frontend/discord/channels.d.ts +0 -29
  94. package/dist/frontend/discord/channels.js +0 -58
  95. package/dist/frontend/discord/channels.js.map +0 -1
  96. package/dist/frontend/discord/classifier.d.ts +0 -16
  97. package/dist/frontend/discord/classifier.js +0 -29
  98. package/dist/frontend/discord/classifier.js.map +0 -1
  99. package/dist/frontend/discord/index.d.ts +0 -118
  100. package/dist/frontend/discord/index.js +0 -1104
  101. package/dist/frontend/discord/index.js.map +0 -1
  102. package/dist/frontend/discord/slash.d.ts +0 -18
  103. package/dist/frontend/discord/slash.js +0 -90
  104. package/dist/frontend/discord/slash.js.map +0 -1
  105. package/dist/frontend/inbox.d.ts +0 -17
  106. package/dist/frontend/inbox.js +0 -30
  107. package/dist/frontend/inbox.js.map +0 -1
  108. package/dist/frontend/index.d.ts +0 -8
  109. package/dist/frontend/index.js +0 -6
  110. package/dist/frontend/index.js.map +0 -1
  111. package/dist/frontend/stub/index.d.ts +0 -58
  112. package/dist/frontend/stub/index.js +0 -144
  113. package/dist/frontend/stub/index.js.map +0 -1
  114. package/dist/frontend/types.d.ts +0 -247
  115. package/dist/frontend/types.js +0 -15
  116. package/dist/frontend/types.js.map +0 -1
  117. package/dist/gc/apply.d.ts +0 -26
  118. package/dist/gc/apply.js +0 -48
  119. package/dist/gc/apply.js.map +0 -1
  120. package/dist/gc/canary.d.ts +0 -42
  121. package/dist/gc/canary.js +0 -134
  122. package/dist/gc/canary.js.map +0 -1
  123. package/dist/gc/classify.d.ts +0 -25
  124. package/dist/gc/classify.js +0 -89
  125. package/dist/gc/classify.js.map +0 -1
  126. package/dist/gc/doc-gardening.d.ts +0 -29
  127. package/dist/gc/doc-gardening.js +0 -146
  128. package/dist/gc/doc-gardening.js.map +0 -1
  129. package/dist/gc/frontmatter.d.ts +0 -35
  130. package/dist/gc/frontmatter.js +0 -111
  131. package/dist/gc/frontmatter.js.map +0 -1
  132. package/dist/gc/generator-drift.d.ts +0 -28
  133. package/dist/gc/generator-drift.js +0 -53
  134. package/dist/gc/generator-drift.js.map +0 -1
  135. package/dist/gc/index.d.ts +0 -35
  136. package/dist/gc/index.js +0 -26
  137. package/dist/gc/index.js.map +0 -1
  138. package/dist/gc/quality-update.d.ts +0 -23
  139. package/dist/gc/quality-update.js +0 -69
  140. package/dist/gc/quality-update.js.map +0 -1
  141. package/dist/gc/stub-hits.d.ts +0 -31
  142. package/dist/gc/stub-hits.js +0 -125
  143. package/dist/gc/stub-hits.js.map +0 -1
  144. package/dist/gc/sweep.d.ts +0 -56
  145. package/dist/gc/sweep.js +0 -178
  146. package/dist/gc/sweep.js.map +0 -1
  147. package/dist/gc/types.d.ts +0 -129
  148. package/dist/gc/types.js +0 -26
  149. package/dist/gc/types.js.map +0 -1
  150. package/dist/ground/drift.d.ts +0 -8
  151. package/dist/ground/drift.js +0 -23
  152. package/dist/ground/drift.js.map +0 -1
  153. package/dist/ground/frontmatter.d.ts +0 -20
  154. package/dist/ground/frontmatter.js +0 -49
  155. package/dist/ground/frontmatter.js.map +0 -1
  156. package/dist/ground/glob.d.ts +0 -10
  157. package/dist/ground/glob.js +0 -46
  158. package/dist/ground/glob.js.map +0 -1
  159. package/dist/ground/index.d.ts +0 -14
  160. package/dist/ground/index.js +0 -10
  161. package/dist/ground/index.js.map +0 -1
  162. package/dist/ground/ledgers.d.ts +0 -18
  163. package/dist/ground/ledgers.js +0 -103
  164. package/dist/ground/ledgers.js.map +0 -1
  165. package/dist/ground/manifest.d.ts +0 -10
  166. package/dist/ground/manifest.js +0 -88
  167. package/dist/ground/manifest.js.map +0 -1
  168. package/dist/ground/paths.d.ts +0 -20
  169. package/dist/ground/paths.js +0 -61
  170. package/dist/ground/paths.js.map +0 -1
  171. package/dist/ground/quality-grades.d.ts +0 -11
  172. package/dist/ground/quality-grades.js +0 -98
  173. package/dist/ground/quality-grades.js.map +0 -1
  174. package/dist/ground/schemas.d.ts +0 -306
  175. package/dist/ground/schemas.js +0 -188
  176. package/dist/ground/schemas.js.map +0 -1
  177. package/dist/ground/walk.d.ts +0 -7
  178. package/dist/ground/walk.js +0 -53
  179. package/dist/ground/walk.js.map +0 -1
  180. package/dist/init/detect.d.ts +0 -25
  181. package/dist/init/detect.js +0 -336
  182. package/dist/init/detect.js.map +0 -1
  183. package/dist/init/index.d.ts +0 -14
  184. package/dist/init/index.js +0 -9
  185. package/dist/init/index.js.map +0 -1
  186. package/dist/init/init.d.ts +0 -68
  187. package/dist/init/init.js +0 -673
  188. package/dist/init/init.js.map +0 -1
  189. package/dist/init/mapper.d.ts +0 -160
  190. package/dist/init/mapper.js +0 -248
  191. package/dist/init/mapper.js.map +0 -1
  192. package/dist/init/prompts.d.ts +0 -70
  193. package/dist/init/prompts.js +0 -80
  194. package/dist/init/prompts.js.map +0 -1
  195. package/dist/init/secrets.d.ts +0 -18
  196. package/dist/init/secrets.js +0 -76
  197. package/dist/init/secrets.js.map +0 -1
  198. package/dist/init/seed.d.ts +0 -21
  199. package/dist/init/seed.js +0 -75
  200. package/dist/init/seed.js.map +0 -1
  201. package/dist/init/setup-runners.d.ts +0 -17
  202. package/dist/init/setup-runners.js +0 -70
  203. package/dist/init/setup-runners.js.map +0 -1
  204. package/dist/init/types.d.ts +0 -59
  205. package/dist/init/types.js +0 -10
  206. package/dist/init/types.js.map +0 -1
  207. package/dist/init/walker.d.ts +0 -53
  208. package/dist/init/walker.js +0 -460
  209. package/dist/init/walker.js.map +0 -1
  210. package/dist/init/workflow-block.d.ts +0 -34
  211. package/dist/init/workflow-block.js +0 -110
  212. package/dist/init/workflow-block.js.map +0 -1
  213. package/dist/logger.d.ts +0 -3
  214. package/dist/logger.js +0 -23
  215. package/dist/logger.js.map +0 -1
  216. package/dist/mcp/context.d.ts +0 -16
  217. package/dist/mcp/context.js +0 -8
  218. package/dist/mcp/context.js.map +0 -1
  219. package/dist/mcp/errors.d.ts +0 -17
  220. package/dist/mcp/errors.js +0 -23
  221. package/dist/mcp/errors.js.map +0 -1
  222. package/dist/mcp/index.d.ts +0 -10
  223. package/dist/mcp/index.js +0 -7
  224. package/dist/mcp/index.js.map +0 -1
  225. package/dist/mcp/path-allowlist.d.ts +0 -25
  226. package/dist/mcp/path-allowlist.js +0 -66
  227. package/dist/mcp/path-allowlist.js.map +0 -1
  228. package/dist/mcp/result.d.ts +0 -8
  229. package/dist/mcp/result.js +0 -18
  230. package/dist/mcp/result.js.map +0 -1
  231. package/dist/mcp/schemas.d.ts +0 -153
  232. package/dist/mcp/schemas.js +0 -135
  233. package/dist/mcp/schemas.js.map +0 -1
  234. package/dist/mcp/server.d.ts +0 -11
  235. package/dist/mcp/server.js +0 -58
  236. package/dist/mcp/server.js.map +0 -1
  237. package/dist/mcp/telemetry.d.ts +0 -15
  238. package/dist/mcp/telemetry.js +0 -13
  239. package/dist/mcp/telemetry.js.map +0 -1
  240. package/dist/mcp/tools/append.d.ts +0 -8
  241. package/dist/mcp/tools/append.js +0 -33
  242. package/dist/mcp/tools/append.js.map +0 -1
  243. package/dist/mcp/tools/archive.d.ts +0 -8
  244. package/dist/mcp/tools/archive.js +0 -49
  245. package/dist/mcp/tools/archive.js.map +0 -1
  246. package/dist/mcp/tools/ask-operator.d.ts +0 -34
  247. package/dist/mcp/tools/ask-operator.js +0 -93
  248. package/dist/mcp/tools/ask-operator.js.map +0 -1
  249. package/dist/mcp/tools/canonical-for-topic.d.ts +0 -6
  250. package/dist/mcp/tools/canonical-for-topic.js +0 -40
  251. package/dist/mcp/tools/canonical-for-topic.js.map +0 -1
  252. package/dist/mcp/tools/decision-get.d.ts +0 -6
  253. package/dist/mcp/tools/decision-get.js +0 -49
  254. package/dist/mcp/tools/decision-get.js.map +0 -1
  255. package/dist/mcp/tools/decisions-for-symbol.d.ts +0 -7
  256. package/dist/mcp/tools/decisions-for-symbol.js +0 -42
  257. package/dist/mcp/tools/decisions-for-symbol.js.map +0 -1
  258. package/dist/mcp/tools/decisions-in-scope.d.ts +0 -7
  259. package/dist/mcp/tools/decisions-in-scope.js +0 -47
  260. package/dist/mcp/tools/decisions-in-scope.js.map +0 -1
  261. package/dist/mcp/tools/drop-task.d.ts +0 -12
  262. package/dist/mcp/tools/drop-task.js +0 -47
  263. package/dist/mcp/tools/drop-task.js.map +0 -1
  264. package/dist/mcp/tools/get-full.d.ts +0 -7
  265. package/dist/mcp/tools/get-full.js +0 -46
  266. package/dist/mcp/tools/get-full.js.map +0 -1
  267. package/dist/mcp/tools/ground-get.d.ts +0 -7
  268. package/dist/mcp/tools/ground-get.js +0 -80
  269. package/dist/mcp/tools/ground-get.js.map +0 -1
  270. package/dist/mcp/tools/index.d.ts +0 -3
  271. package/dist/mcp/tools/index.js +0 -44
  272. package/dist/mcp/tools/index.js.map +0 -1
  273. package/dist/mcp/tools/invariant-get.d.ts +0 -6
  274. package/dist/mcp/tools/invariant-get.js +0 -49
  275. package/dist/mcp/tools/invariant-get.js.map +0 -1
  276. package/dist/mcp/tools/invariants-in-scope.d.ts +0 -7
  277. package/dist/mcp/tools/invariants-in-scope.js +0 -65
  278. package/dist/mcp/tools/invariants-in-scope.js.map +0 -1
  279. package/dist/mcp/tools/query-history.d.ts +0 -9
  280. package/dist/mcp/tools/query-history.js +0 -33
  281. package/dist/mcp/tools/query-history.js.map +0 -1
  282. package/dist/mcp/tools/record-decision.d.ts +0 -14
  283. package/dist/mcp/tools/record-decision.js +0 -101
  284. package/dist/mcp/tools/record-decision.js.map +0 -1
  285. package/dist/mcp/tools/record-run-event.d.ts +0 -10
  286. package/dist/mcp/tools/record-run-event.js +0 -28
  287. package/dist/mcp/tools/record-run-event.js.map +0 -1
  288. package/dist/mcp/tools/search.d.ts +0 -9
  289. package/dist/mcp/tools/search.js +0 -165
  290. package/dist/mcp/tools/search.js.map +0 -1
  291. package/dist/mcp/tools/supersedes-chain.d.ts +0 -6
  292. package/dist/mcp/tools/supersedes-chain.js +0 -66
  293. package/dist/mcp/tools/supersedes-chain.js.map +0 -1
  294. package/dist/mcp/tools/timeline.d.ts +0 -9
  295. package/dist/mcp/tools/timeline.js +0 -65
  296. package/dist/mcp/tools/timeline.js.map +0 -1
  297. package/dist/mcp/tools/types.d.ts +0 -9
  298. package/dist/mcp/tools/types.js +0 -2
  299. package/dist/mcp/tools/types.js.map +0 -1
  300. package/dist/mirror/clone.d.ts +0 -6
  301. package/dist/mirror/clone.js +0 -48
  302. package/dist/mirror/clone.js.map +0 -1
  303. package/dist/mirror/dirty-overlap.d.ts +0 -13
  304. package/dist/mirror/dirty-overlap.js +0 -77
  305. package/dist/mirror/dirty-overlap.js.map +0 -1
  306. package/dist/mirror/index.d.ts +0 -7
  307. package/dist/mirror/index.js +0 -7
  308. package/dist/mirror/index.js.map +0 -1
  309. package/dist/mirror/paths.d.ts +0 -18
  310. package/dist/mirror/paths.js +0 -45
  311. package/dist/mirror/paths.js.map +0 -1
  312. package/dist/mirror/push.d.ts +0 -9
  313. package/dist/mirror/push.js +0 -27
  314. package/dist/mirror/push.js.map +0 -1
  315. package/dist/mirror/state.d.ts +0 -4
  316. package/dist/mirror/state.js +0 -36
  317. package/dist/mirror/state.js.map +0 -1
  318. package/dist/mirror/sync.d.ts +0 -9
  319. package/dist/mirror/sync.js +0 -33
  320. package/dist/mirror/sync.js.map +0 -1
  321. package/dist/mirror/types.d.ts +0 -77
  322. package/dist/mirror/types.js +0 -2
  323. package/dist/mirror/types.js.map +0 -1
  324. package/dist/orchestrator/activity-summarizer.d.ts +0 -33
  325. package/dist/orchestrator/activity-summarizer.js +0 -120
  326. package/dist/orchestrator/activity-summarizer.js.map +0 -1
  327. package/dist/orchestrator/inbox.d.ts +0 -78
  328. package/dist/orchestrator/inbox.js +0 -115
  329. package/dist/orchestrator/inbox.js.map +0 -1
  330. package/dist/orchestrator/index.d.ts +0 -9
  331. package/dist/orchestrator/index.js +0 -7
  332. package/dist/orchestrator/index.js.map +0 -1
  333. package/dist/orchestrator/orchestrator.d.ts +0 -154
  334. package/dist/orchestrator/orchestrator.js +0 -2437
  335. package/dist/orchestrator/orchestrator.js.map +0 -1
  336. package/dist/orchestrator/prompt.d.ts +0 -19
  337. package/dist/orchestrator/prompt.js +0 -50
  338. package/dist/orchestrator/prompt.js.map +0 -1
  339. package/dist/orchestrator/queue.d.ts +0 -21
  340. package/dist/orchestrator/queue.js +0 -80
  341. package/dist/orchestrator/queue.js.map +0 -1
  342. package/dist/orchestrator/run-log.d.ts +0 -53
  343. package/dist/orchestrator/run-log.js +0 -92
  344. package/dist/orchestrator/run-log.js.map +0 -1
  345. package/dist/orchestrator/runner.d.ts +0 -56
  346. package/dist/orchestrator/runner.js +0 -172
  347. package/dist/orchestrator/runner.js.map +0 -1
  348. package/dist/orchestrator/tool-digest.d.ts +0 -35
  349. package/dist/orchestrator/tool-digest.js +0 -116
  350. package/dist/orchestrator/tool-digest.js.map +0 -1
  351. package/dist/orchestrator/types.d.ts +0 -263
  352. package/dist/orchestrator/types.js +0 -2
  353. package/dist/orchestrator/types.js.map +0 -1
  354. package/dist/orchestrator/workspace.d.ts +0 -21
  355. package/dist/orchestrator/workspace.js +0 -31
  356. package/dist/orchestrator/workspace.js.map +0 -1
  357. package/dist/profiles/index.d.ts +0 -3
  358. package/dist/profiles/index.js +0 -3
  359. package/dist/profiles/index.js.map +0 -1
  360. package/dist/profiles/registry.d.ts +0 -5
  361. package/dist/profiles/registry.js +0 -31
  362. package/dist/profiles/registry.js.map +0 -1
  363. package/dist/profiles/types.d.ts +0 -48
  364. package/dist/profiles/types.js +0 -11
  365. package/dist/profiles/types.js.map +0 -1
  366. package/dist/profiles/unknown.d.ts +0 -9
  367. package/dist/profiles/unknown.js +0 -17
  368. package/dist/profiles/unknown.js.map +0 -1
  369. package/dist/reviewer/index.d.ts +0 -6
  370. package/dist/reviewer/index.js +0 -5
  371. package/dist/reviewer/index.js.map +0 -1
  372. package/dist/reviewer/prompt.d.ts +0 -11
  373. package/dist/reviewer/prompt.js +0 -132
  374. package/dist/reviewer/prompt.js.map +0 -1
  375. package/dist/reviewer/remediation.d.ts +0 -15
  376. package/dist/reviewer/remediation.js +0 -61
  377. package/dist/reviewer/remediation.js.map +0 -1
  378. package/dist/reviewer/reviewer.d.ts +0 -9
  379. package/dist/reviewer/reviewer.js +0 -89
  380. package/dist/reviewer/reviewer.js.map +0 -1
  381. package/dist/reviewer/schema.d.ts +0 -45
  382. package/dist/reviewer/schema.js +0 -43
  383. package/dist/reviewer/schema.js.map +0 -1
  384. package/dist/reviewer/types.d.ts +0 -74
  385. package/dist/reviewer/types.js +0 -14
  386. package/dist/reviewer/types.js.map +0 -1
  387. package/dist/sensors/attestation.d.ts +0 -44
  388. package/dist/sensors/attestation.js +0 -262
  389. package/dist/sensors/attestation.js.map +0 -1
  390. package/dist/sensors/catalog.d.ts +0 -41
  391. package/dist/sensors/catalog.js +0 -123
  392. package/dist/sensors/catalog.js.map +0 -1
  393. package/dist/sensors/decisions.d.ts +0 -30
  394. package/dist/sensors/decisions.js +0 -393
  395. package/dist/sensors/decisions.js.map +0 -1
  396. package/dist/sensors/diff.d.ts +0 -27
  397. package/dist/sensors/diff.js +0 -148
  398. package/dist/sensors/diff.js.map +0 -1
  399. package/dist/sensors/index.d.ts +0 -13
  400. package/dist/sensors/index.js +0 -9
  401. package/dist/sensors/index.js.map +0 -1
  402. package/dist/sensors/remediation.d.ts +0 -20
  403. package/dist/sensors/remediation.js +0 -65
  404. package/dist/sensors/remediation.js.map +0 -1
  405. package/dist/sensors/runner.d.ts +0 -44
  406. package/dist/sensors/runner.js +0 -95
  407. package/dist/sensors/runner.js.map +0 -1
  408. package/dist/sensors/structural.d.ts +0 -30
  409. package/dist/sensors/structural.js +0 -204
  410. package/dist/sensors/structural.js.map +0 -1
  411. package/dist/sensors/stub-catalog.d.ts +0 -39
  412. package/dist/sensors/stub-catalog.js +0 -115
  413. package/dist/sensors/stub-catalog.js.map +0 -1
  414. package/dist/sensors/types.d.ts +0 -135
  415. package/dist/sensors/types.js +0 -14
  416. package/dist/sensors/types.js.map +0 -1
  417. package/dist/tier0/classify.d.ts +0 -5
  418. package/dist/tier0/classify.js +0 -91
  419. package/dist/tier0/classify.js.map +0 -1
  420. package/dist/tier0/index.d.ts +0 -3
  421. package/dist/tier0/index.js +0 -3
  422. package/dist/tier0/index.js.map +0 -1
  423. package/dist/tier0/ollama.d.ts +0 -22
  424. package/dist/tier0/ollama.js +0 -63
  425. package/dist/tier0/ollama.js.map +0 -1
  426. package/dist/tier0/types.d.ts +0 -24
  427. package/dist/tier0/types.js +0 -7
  428. package/dist/tier0/types.js.map +0 -1
  429. package/dist/tightener/index.d.ts +0 -4
  430. package/dist/tightener/index.js +0 -4
  431. package/dist/tightener/index.js.map +0 -1
  432. package/dist/tightener/prompt.d.ts +0 -3
  433. package/dist/tightener/prompt.js +0 -67
  434. package/dist/tightener/prompt.js.map +0 -1
  435. package/dist/tightener/schema.d.ts +0 -68
  436. package/dist/tightener/schema.js +0 -44
  437. package/dist/tightener/schema.js.map +0 -1
  438. package/dist/tightener/tighten.d.ts +0 -2
  439. package/dist/tightener/tighten.js +0 -66
  440. package/dist/tightener/tighten.js.map +0 -1
  441. package/dist/tightener/types.d.ts +0 -74
  442. package/dist/tightener/types.js +0 -6
  443. package/dist/tightener/types.js.map +0 -1
  444. package/dist/uat/bundle.d.ts +0 -68
  445. package/dist/uat/bundle.js +0 -168
  446. package/dist/uat/bundle.js.map +0 -1
  447. package/dist/uat/index.d.ts +0 -15
  448. package/dist/uat/index.js +0 -10
  449. package/dist/uat/index.js.map +0 -1
  450. package/dist/uat/persistent.d.ts +0 -64
  451. package/dist/uat/persistent.js +0 -206
  452. package/dist/uat/persistent.js.map +0 -1
  453. package/dist/uat/probes/cli.d.ts +0 -11
  454. package/dist/uat/probes/cli.js +0 -107
  455. package/dist/uat/probes/cli.js.map +0 -1
  456. package/dist/uat/probes/http.d.ts +0 -12
  457. package/dist/uat/probes/http.js +0 -139
  458. package/dist/uat/probes/http.js.map +0 -1
  459. package/dist/uat/probes/index.d.ts +0 -21
  460. package/dist/uat/probes/index.js +0 -30
  461. package/dist/uat/probes/index.js.map +0 -1
  462. package/dist/uat/probes/integration.d.ts +0 -18
  463. package/dist/uat/probes/integration.js +0 -188
  464. package/dist/uat/probes/integration.js.map +0 -1
  465. package/dist/uat/probes/sql/config.d.ts +0 -14
  466. package/dist/uat/probes/sql/config.js +0 -57
  467. package/dist/uat/probes/sql/config.js.map +0 -1
  468. package/dist/uat/probes/sql/index.d.ts +0 -29
  469. package/dist/uat/probes/sql/index.js +0 -43
  470. package/dist/uat/probes/sql/index.js.map +0 -1
  471. package/dist/uat/probes/sql/mysql.d.ts +0 -12
  472. package/dist/uat/probes/sql/mysql.js +0 -96
  473. package/dist/uat/probes/sql/mysql.js.map +0 -1
  474. package/dist/uat/probes/sql/pg.d.ts +0 -20
  475. package/dist/uat/probes/sql/pg.js +0 -102
  476. package/dist/uat/probes/sql/pg.js.map +0 -1
  477. package/dist/uat/probes/sql/sqlite.d.ts +0 -9
  478. package/dist/uat/probes/sql/sqlite.js +0 -58
  479. package/dist/uat/probes/sql/sqlite.js.map +0 -1
  480. package/dist/uat/probes/sql/types.d.ts +0 -46
  481. package/dist/uat/probes/sql/types.js +0 -10
  482. package/dist/uat/probes/sql/types.js.map +0 -1
  483. package/dist/uat/probes/sql.d.ts +0 -9
  484. package/dist/uat/probes/sql.js +0 -119
  485. package/dist/uat/probes/sql.js.map +0 -1
  486. package/dist/uat/probes/ui.d.ts +0 -19
  487. package/dist/uat/probes/ui.js +0 -244
  488. package/dist/uat/probes/ui.js.map +0 -1
  489. package/dist/uat/prompt.d.ts +0 -10
  490. package/dist/uat/prompt.js +0 -85
  491. package/dist/uat/prompt.js.map +0 -1
  492. package/dist/uat/question.d.ts +0 -50
  493. package/dist/uat/question.js +0 -139
  494. package/dist/uat/question.js.map +0 -1
  495. package/dist/uat/rejection.d.ts +0 -58
  496. package/dist/uat/rejection.js +0 -163
  497. package/dist/uat/rejection.js.map +0 -1
  498. package/dist/uat/runner.d.ts +0 -6
  499. package/dist/uat/runner.js +0 -96
  500. package/dist/uat/runner.js.map +0 -1
  501. package/dist/uat/schema.d.ts +0 -322
  502. package/dist/uat/schema.js +0 -189
  503. package/dist/uat/schema.js.map +0 -1
  504. package/dist/uat/types.d.ts +0 -268
  505. package/dist/uat/types.js +0 -18
  506. package/dist/uat/types.js.map +0 -1
  507. package/dist/uat/uat.d.ts +0 -89
  508. package/dist/uat/uat.js +0 -256
  509. package/dist/uat/uat.js.map +0 -1
  510. package/dist/voice/index.d.ts +0 -4
  511. package/dist/voice/index.js +0 -4
  512. package/dist/voice/index.js.map +0 -1
  513. package/dist/voice/model.d.ts +0 -23
  514. package/dist/voice/model.js +0 -46
  515. package/dist/voice/model.js.map +0 -1
  516. package/dist/voice/pipe.d.ts +0 -9
  517. package/dist/voice/pipe.js +0 -47
  518. package/dist/voice/pipe.js.map +0 -1
  519. package/dist/voice/transcribe.d.ts +0 -3
  520. package/dist/voice/transcribe.js +0 -43
  521. package/dist/voice/transcribe.js.map +0 -1
  522. package/dist/voice/types.d.ts +0 -26
  523. package/dist/voice/types.js +0 -9
  524. package/dist/voice/types.js.map +0 -1
  525. package/dist/watch/daemon.d.ts +0 -21
  526. package/dist/watch/daemon.js +0 -143
  527. package/dist/watch/daemon.js.map +0 -1
  528. package/dist/watch/index.d.ts +0 -4
  529. package/dist/watch/index.js +0 -3
  530. package/dist/watch/index.js.map +0 -1
  531. package/dist/watch/regenerate.d.ts +0 -25
  532. package/dist/watch/regenerate.js +0 -51
  533. package/dist/watch/regenerate.js.map +0 -1
@@ -1,33 +0,0 @@
1
- import { appendFileSync, existsSync, mkdirSync } from "node:fs";
2
- import { dirname } from "node:path";
3
- import { mcpError } from "../errors.js";
4
- import { isAppendAllowed, relPosix, safeJoin } from "../path-allowlist.js";
5
- import { appendInput } from "../schemas.js";
6
- async function handler(ctx, input) {
7
- const abs = safeJoin(ctx.repoRoot, input.path);
8
- if (typeof abs !== "string")
9
- return abs; // error envelope
10
- const rel = relPosix(ctx.repoRoot, abs);
11
- if (!isAppendAllowed(rel)) {
12
- return mcpError("PATH_NOT_ALLOWED", `Append-write is not allowed for "${rel}". Allowlist limited to runs/active/<id>/{events,commands}.jsonl, staleness/log.jsonl, and inbox/**.`);
13
- }
14
- // For runs/active/<id>/* paths, the run id segment must exist as a directory.
15
- const runMatch = rel.match(/^\.harness\/runs\/active\/([^/]+)\//);
16
- if (runMatch) {
17
- const runDir = `${ctx.repoRoot}/.harness/runs/active/${runMatch[1]}`;
18
- if (!existsSync(runDir)) {
19
- return mcpError("RUN_NOT_FOUND", `No active run dir at ${runDir}`);
20
- }
21
- }
22
- mkdirSync(dirname(abs), { recursive: true });
23
- const sep = input.newline_separator !== false ? "\n" : "";
24
- appendFileSync(abs, input.content + sep, "utf8");
25
- return { ok: true, path: rel, bytes_written: Buffer.byteLength(input.content + sep, "utf8") };
26
- }
27
- export const appendTool = {
28
- name: "harness_append",
29
- description: "Append-only write to a path-allowlisted file. No read required. Allowlist: runs/active/<id>/{events,commands}.jsonl, staleness/log.jsonl, inbox/**.",
30
- inputSchema: appendInput,
31
- handler,
32
- };
33
- //# sourceMappingURL=append.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"append.js","sourceRoot":"","sources":["../../../src/mcp/tools/append.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,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AI,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;AAChG,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,qJAAqJ;IACvJ,WAAW,EAAE,WAAW;IACxB,OAAO;CACR,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- path: string;
4
- reason: string;
5
- archive_dir?: string;
6
- }
7
- export declare const archiveTool: ToolDef<Input>;
8
- export {};
@@ -1,49 +0,0 @@
1
- import { existsSync, mkdirSync, renameSync, statSync } from "node:fs";
2
- import { dirname, join } from "node:path";
3
- import { recordDriftEvent } from "../../ground/index.js";
4
- import { mcpError } from "../errors.js";
5
- import { isArchiveDenied, relPosix, safeJoin } from "../path-allowlist.js";
6
- import { archiveInput } from "../schemas.js";
7
- async function handler(ctx, input) {
8
- const abs = safeJoin(ctx.repoRoot, input.path);
9
- if (typeof abs !== "string")
10
- return abs;
11
- const rel = relPosix(ctx.repoRoot, abs);
12
- if (isArchiveDenied(rel)) {
13
- return mcpError("NOT_ALLOWED", `Path "${rel}" is in the archive-deny list (sacred ground: AGENTS.md, .claude/**, decisions/, brand/).`);
14
- }
15
- if (rel.startsWith(".archive/")) {
16
- return { ok: true, idempotent: true, path: rel, note: "Already in .archive/" };
17
- }
18
- if (!existsSync(abs)) {
19
- return mcpError("FILE_NOT_FOUND", `No file at ${rel}`);
20
- }
21
- if (!statSync(abs).isFile()) {
22
- return mcpError("NOT_ALLOWED", `Path is not a file: ${rel}`);
23
- }
24
- const today = new Date().toISOString().slice(0, 10);
25
- const bucket = input.archive_dir ?? today;
26
- const target = join(ctx.repoRoot, ".archive", bucket, rel);
27
- mkdirSync(dirname(target), { recursive: true });
28
- renameSync(abs, target);
29
- recordDriftEvent(ctx.repoRoot, {
30
- ts: new Date().toISOString(),
31
- kind: "orphan_path",
32
- path: rel,
33
- detail: `archived: ${input.reason}`,
34
- severity: "soft",
35
- });
36
- return {
37
- ok: true,
38
- archived_from: rel,
39
- archived_to: relPosix(ctx.repoRoot, target),
40
- reason: input.reason,
41
- };
42
- }
43
- export const archiveTool = {
44
- name: "harness_archive",
45
- description: "Move a canonical-zone file to .archive/<archive_dir or today>/<original_path>. Idempotent. Records a staleness/log.jsonl event. Refuses sacred paths (AGENTS.md, .claude/**, decisions/, brand/).",
46
- inputSchema: archiveInput,
47
- handler,
48
- };
49
- //# sourceMappingURL=archive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../src/mcp/tools/archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAS7C,KAAK,UAAU,OAAO,CAAC,GAAe,EAAE,KAAY;IAClD,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACxC,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,QAAQ,CACb,aAAa,EACb,SAAS,GAAG,2FAA2F,CACxG,C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Q,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC3C,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,mMAAmM;IACrM,WAAW,EAAE,YAAY;IACzB,OAAO;CACR,CAAC"}
@@ -1,34 +0,0 @@
1
- /**
2
- * harness_ask_operator — agent-initiated operator dialog mid-run.
3
- *
4
- * The implementer agent calls this when it hits an ambiguity, needs
5
- * permission for a non-recoverable action, gets stuck, or wants to
6
- * verify its interpretation. The flow:
7
- *
8
- * 1. Tool writes a question file under
9
- * `.harness/runs/active/<run_id>/questions/<question_id>.q.json`.
10
- * 2. The orchestrator's question-watcher (chokidar) picks it up,
11
- * fires `adapter.requestDialog()` with the active operator
12
- * pinged (so they see it on mobile push).
13
- * 3. Operator answers via Discord button (or free-form follow-up
14
- * if no `options` were provided).
15
- * 4. The orchestrator writes the answer to
16
- * `.harness/runs/active/<run_id>/questions/<question_id>.a.json`.
17
- * 5. This tool polls for the answer file and returns its contents to
18
- * the agent.
19
- *
20
- * The agent run continues with the operator's answer in context. If
21
- * `timeout_ms` elapses before the operator answers, the tool returns
22
- * `{ timed_out: true }` and the agent decides what to do (default:
23
- * abort with a remediation note).
24
- */
25
- import type { ToolDef } from "./types.js";
26
- interface Input {
27
- run_id: string;
28
- question: string;
29
- options?: string[];
30
- category?: "ambiguity" | "permission" | "stuck" | "verify";
31
- timeout_ms?: number;
32
- }
33
- export declare const askOperatorTool: ToolDef<Input>;
34
- export {};
@@ -1,93 +0,0 @@
1
- /**
2
- * harness_ask_operator — agent-initiated operator dialog mid-run.
3
- *
4
- * The implementer agent calls this when it hits an ambiguity, needs
5
- * permission for a non-recoverable action, gets stuck, or wants to
6
- * verify its interpretation. The flow:
7
- *
8
- * 1. Tool writes a question file under
9
- * `.harness/runs/active/<run_id>/questions/<question_id>.q.json`.
10
- * 2. The orchestrator's question-watcher (chokidar) picks it up,
11
- * fires `adapter.requestDialog()` with the active operator
12
- * pinged (so they see it on mobile push).
13
- * 3. Operator answers via Discord button (or free-form follow-up
14
- * if no `options` were provided).
15
- * 4. The orchestrator writes the answer to
16
- * `.harness/runs/active/<run_id>/questions/<question_id>.a.json`.
17
- * 5. This tool polls for the answer file and returns its contents to
18
- * the agent.
19
- *
20
- * The agent run continues with the operator's answer in context. If
21
- * `timeout_ms` elapses before the operator answers, the tool returns
22
- * `{ timed_out: true }` and the agent decides what to do (default:
23
- * abort with a remediation note).
24
- */
25
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
26
- import { randomBytes } from "node:crypto";
27
- import { join } from "node:path";
28
- import { mcpError } from "../errors.js";
29
- import { askOperatorInput } from "../schemas.js";
30
- const POLL_INTERVAL_MS = 500;
31
- const DEFAULT_TIMEOUT_MS = 10 * 60_000;
32
- async function handler(ctx, input) {
33
- const runDir = join(ctx.repoRoot, ".harness", "runs", "active", input.run_id);
34
- if (!existsSync(runDir)) {
35
- return mcpError("RUN_NOT_FOUND", `No active run dir at ${runDir}. ask_operator must be called from within an in-flight run.`);
36
- }
37
- const questionsDir = join(runDir, "questions");
38
- mkdirSync(questionsDir, { recursive: true });
39
- const questionId = `Q-${Date.now().toString(36)}-${randomBytes(2).toString("hex")}`;
40
- const qPath = join(questionsDir, `${questionId}.q.json`);
41
- const aPath = join(questionsDir, `${questionId}.a.json`);
42
- const qPayload = {
43
- id: questionId,
44
- run_id: input.run_id,
45
- asked_at: new Date().toISOString(),
46
- question: input.question,
47
- ...(input.options !== undefined && input.options.length > 0
48
- ? { options: input.options }
49
- : {}),
50
- ...(input.category !== undefined ? { category: input.category } : {}),
51
- timeout_ms: input.timeout_ms ?? DEFAULT_TIMEOUT_MS,
52
- };
53
- writeFileSync(qPath, JSON.stringify(qPayload, null, 2), "utf8");
54
- // Poll for the answer file. The orchestrator's question-watcher
55
- // observes the question, fires the dialog, writes the answer.
56
- const deadline = Date.now() + (input.timeout_ms ?? DEFAULT_TIMEOUT_MS);
57
- while (Date.now() < deadline) {
58
- if (existsSync(aPath)) {
59
- try {
60
- const raw = readFileSync(aPath, "utf8");
61
- const answer = JSON.parse(raw);
62
- return {
63
- ok: true,
64
- question_id: questionId,
65
- answer: answer.answer,
66
- ...(answer.choice_id !== undefined ? { choice_id: answer.choice_id } : {}),
67
- ...(answer.free_text === true ? { free_text: true } : {}),
68
- ...(answer.timed_out === true ? { timed_out: true } : {}),
69
- };
70
- }
71
- catch (err) {
72
- return mcpError("VALIDATION_FAILED", `Failed to parse answer file ${aPath}: ${String(err)}`);
73
- }
74
- }
75
- await sleep(POLL_INTERVAL_MS);
76
- }
77
- return {
78
- ok: true,
79
- question_id: questionId,
80
- answer: "",
81
- timed_out: true,
82
- };
83
- }
84
- function sleep(ms) {
85
- return new Promise((r) => setTimeout(r, ms));
86
- }
87
- export const askOperatorTool = {
88
- name: "harness_ask_operator",
89
- description: "Stop and ask the operator a question. Use when the spec is genuinely ambiguous, you need permission for a non-recoverable action, you're stuck, or you want the operator to verify your interpretation. Provide 2-4 short option strings if the answer fits a closed set; omit `options` to invite a free-form reply. The tool blocks until the operator answers or `timeout_ms` (default 10 minutes) elapses.",
90
- inputSchema: askOperatorInput,
91
- handler,
92
- };
93
- //# sourceMappingURL=ask-operator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ask-operator.js","sourceRoot":"","sources":["../../../src/mcp/tools/ask-operator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,gBAAgB,EA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,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,QAAQ,CACb,mBAAmB,EACnB,+BAA+B,KAAK,KAAK,MAAM,CAAC,GAAG,CAAC,EAAE,CACvD,CAAC;YACJ,CAAC;QACH,CAAC;QACD,MAAM,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;QACL,EAAE,EAAE,IAAI;QACR,WAAW,EAAE,UAAU;QACvB,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,IAAI;KAChB,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,gZAAgZ;IAClZ,WAAW,EAAE,gBAAgB;IAC7B,OAAO;CACR,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- topic: string;
4
- }
5
- export declare const canonicalForTopicTool: ToolDef<Input>;
6
- export {};
@@ -1,40 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { existsSync, readFileSync, statSync } from "node:fs";
3
- import { join } from "node:path";
4
- import { parse as parseYaml } from "yaml";
5
- import { groundDir, parseFrontmatter } from "../../ground/index.js";
6
- import { mcpError } from "../errors.js";
7
- import { canonicalForTopicInput } from "../schemas.js";
8
- async function handler(ctx, input) {
9
- const file = join(groundDir(ctx.repoRoot), "canonical-map", "topics.yaml");
10
- if (!existsSync(file)) {
11
- return mcpError("TOPIC_NOT_REGISTERED", `No canonical-map registered (topics.yaml not found at ${file})`);
12
- }
13
- const parsedFile = parseYaml(readFileSync(file, "utf8"));
14
- const list = parsedFile?.topics ?? [];
15
- const entry = list.find((t) => t.topic === input.topic);
16
- if (!entry) {
17
- return mcpError("TOPIC_NOT_REGISTERED", `Topic "${input.topic}" is not registered. Curated registry only — do NOT invent topics.`, { available: list.map((t) => t.topic) });
18
- }
19
- const docPath = join(ctx.repoRoot, entry.canonical_path.split("#")[0] ?? entry.canonical_path);
20
- if (!existsSync(docPath) || !statSync(docPath).isFile()) {
21
- return mcpError("FILE_NOT_FOUND", `Topic registered, but canonical_path does not exist: ${entry.canonical_path}`);
22
- }
23
- const buf = readFileSync(docPath);
24
- const sha256 = createHash("sha256").update(buf).digest("hex");
25
- const fm = parseFrontmatter(buf.toString("utf8")).frontmatter;
26
- return {
27
- topic: entry.topic,
28
- canonical_path: entry.canonical_path,
29
- sha256,
30
- verified_at: fm?.["verified-at"] ?? null,
31
- audience: entry.audience ?? fm?.audience ?? null,
32
- };
33
- }
34
- export const canonicalForTopicTool = {
35
- name: "harness_canonical_for_topic",
36
- description: "Returns the authoritative canonical_path + sha256 + verified-at for a registered topic. Topics are curated; unknown topics return TOPIC_NOT_REGISTERED.",
37
- inputSchema: canonicalForTopicInput,
38
- handler,
39
- };
40
- //# sourceMappingURL=canonical-for-topic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canonical-for-topic.js","sourceRoot":"","sources":["../../../src/mcp/tools/canonical-for-topic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAkBvD,KAAK,UAAU,OAAO,CAAC,GA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,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,EAAE,GAAG,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC;IAC9D,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,MAAM;QACN,WAAW,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,IAAI;QACxC,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,EAAE,QAAQ,IAAI,IAAI;KACjD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAmB;IACnD,IAAI,EAAE,6BAA6B;IACnC,WAAW,EACT,yJAAyJ;IAC3J,WAAW,EAAE,sBAAsB;IACnC,OAAO;CACR,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- id: string;
4
- }
5
- export declare const decisionGetTool: ToolDef<Input>;
6
- export {};
@@ -1,49 +0,0 @@
1
- import { existsSync, readdirSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- import { decisionsDir, parseFrontmatter } from "../../ground/index.js";
4
- import { DecisionFrontmatter } from "../../ground/index.js";
5
- import { mcpError } from "../errors.js";
6
- import { decisionGetInput } from "../schemas.js";
7
- async function handler(ctx, input) {
8
- const dir = decisionsDir(ctx.repoRoot);
9
- if (!existsSync(dir)) {
10
- return mcpError("DECISION_NOT_FOUND", `No decisions directory at ${dir}`);
11
- }
12
- const files = readdirSync(dir, { withFileTypes: true, encoding: "utf8" });
13
- for (const f of files) {
14
- if (!f.isFile() || !f.name.endsWith(".md"))
15
- continue;
16
- const abs = join(dir, f.name);
17
- const parsed = parseFrontmatter(readFileSync(abs, "utf8"));
18
- const fm = DecisionFrontmatter.safeParse(parsed.frontmatter);
19
- if (!fm.success)
20
- continue;
21
- if (fm.data.id !== input.id)
22
- continue;
23
- return {
24
- id: fm.data.id,
25
- title: fm.data.title,
26
- status: fm.data.status,
27
- ...(fm.data.scope_globs !== undefined ? { scope_globs: fm.data.scope_globs } : {}),
28
- ...(fm.data.supersedes !== undefined ? { supersedes: fm.data.supersedes } : {}),
29
- ...(fm.data.superseded_by !== undefined ? { superseded_by: fm.data.superseded_by } : {}),
30
- ...(fm.data.decided_at !== undefined ? { decided_at: fm.data.decided_at } : {}),
31
- ...(fm.data.assertions !== undefined ? { assertions: fm.data.assertions } : {}),
32
- ...(fm.data.human_review_hint !== undefined
33
- ? { human_review_hint: fm.data.human_review_hint }
34
- : {}),
35
- ...(fm.data.related_invariants !== undefined
36
- ? { related_invariants: fm.data.related_invariants }
37
- : {}),
38
- body_markdown: parsed.body,
39
- };
40
- }
41
- return mcpError("DECISION_NOT_FOUND", `No decision with id ${input.id}`);
42
- }
43
- export const decisionGetTool = {
44
- name: "harness_decision_get",
45
- description: "Returns full ADR + assertions block for a decision id.",
46
- inputSchema: decisionGetInput,
47
- handler,
48
- };
49
- //# sourceMappingURL=decision-get.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decision-get.js","sourceRoot":"","sources":["../../../src/mcp/tools/decision-get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAOjD,KAAK,UAAU,OAAO,CAAC,GAAe,EAAE,KAAY;IAClD,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAA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} from "./types.js";
2
- interface Input {
3
- file: string;
4
- symbol: string;
5
- }
6
- export declare const decisionsForSymbolTool: ToolDef<Input>;
7
- export {};
@@ -1,42 +0,0 @@
1
- import { existsSync, readdirSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- import { decisionsDir, matchAnyGlob, parseFrontmatter } from "../../ground/index.js";
4
- import { DecisionFrontmatter } from "../../ground/index.js";
5
- import { decisionsForSymbolInput } from "../schemas.js";
6
- async function handler(ctx, input) {
7
- const dir = decisionsDir(ctx.repoRoot);
8
- if (!existsSync(dir))
9
- return [];
10
- const out = [];
11
- for (const entry of readdirSync(dir, { withFileTypes: true, encoding: "utf8" })) {
12
- if (!entry.isFile() || !entry.name.endsWith(".md"))
13
- continue;
14
- const abs = join(dir, entry.name);
15
- const raw = readFileSync(abs, "utf8");
16
- const parsed = parseFrontmatter(raw);
17
- const fm = DecisionFrontmatter.safeParse(parsed.frontmatter);
18
- if (!fm.success)
19
- continue;
20
- if (fm.data.status !== "accepted")
21
- continue;
22
- const scope = fm.data.scope_globs ?? [];
23
- if (!scope.some((g) => matchAnyGlob(input.file, [g])))
24
- continue;
25
- if (!parsed.body.includes(input.symbol))
26
- continue;
27
- out.push({
28
- id: fm.data.id,
29
- title: fm.data.title,
30
- status: fm.data.status,
31
- ...(fm.data.scope_globs !== undefined ? { scope_globs: fm.data.scope_globs } : {}),
32
- });
33
- }
34
- return out;
35
- }
36
- export const decisionsForSymbolTool = {
37
- name: "harness_decisions_for_symbol",
38
- description: "Decisions whose scope_globs cover `file` AND whose body explicitly mentions `symbol`. Smaller result than path-glob alone.",
39
- inputSchema: decisionsForSymbolInput,
40
- handler,
41
- };
42
- //# sourceMappingURL=decisions-for-symbol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decisions-for-symbol.js","sourceRoot":"","sources":["../../../src/mcp/tools/decisions-for-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAA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AC,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAAE,SAAS;QAChE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;YAAE,SAAS;QAClD,GAAG,CAAC,IAAI,CAAC;YACP,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE;YACd,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK;YACpB,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM;YACtB,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAmB;IACpD,IAAI,EAAE,8BAA8B;IACpC,WAAW,EACT,4HAA4H;IAC9H,WAAW,EAAE,uBAAuB;IACpC,OAAO;CACR,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- path_globs: string[];
4
- status?: ("draft" | "accepted" | "superseded" | "archived")[];
5
- }
6
- export declare const decisionsInScopeTool: ToolDef<Input>;
7
- export {};
@@ -1,47 +0,0 @@
1
- import { existsSync, readdirSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- import { decisionsDir, matchAnyGlob, parseFrontmatter } from "../../ground/index.js";
4
- import { DecisionFrontmatter } from "../../ground/index.js";
5
- import { decisionsInScopeInput } from "../schemas.js";
6
- async function handler(ctx, input) {
7
- const wantStatus = new Set(input.status ?? ["accepted"]);
8
- const dir = decisionsDir(ctx.repoRoot);
9
- if (!existsSync(dir))
10
- return [];
11
- const out = [];
12
- for (const entry of readdirSync(dir, { withFileTypes: true, encoding: "utf8" })) {
13
- if (!entry.isFile() || !entry.name.endsWith(".md"))
14
- continue;
15
- const abs = join(dir, entry.name);
16
- const parsed = parseFrontmatter(readFileSync(abs, "utf8"));
17
- const fm = DecisionFrontmatter.safeParse(parsed.frontmatter);
18
- if (!fm.success)
19
- continue;
20
- if (!wantStatus.has(fm.data.status))
21
- continue;
22
- const scope = fm.data.scope_globs ?? [];
23
- const overlap = scope.length === 0
24
- ? false
25
- : scope.some((scopeGlob) => input.path_globs.some((req) => matchAnyGlob(scopeGlob, [req]) || matchAnyGlob(req, [scopeGlob])));
26
- if (!overlap)
27
- continue;
28
- out.push({
29
- id: fm.data.id,
30
- title: fm.data.title,
31
- status: fm.data.status,
32
- ...(fm.data.scope_globs !== undefined ? { scope_globs: fm.data.scope_globs } : {}),
33
- ...(fm.data.supersedes !== undefined ? { supersedes: fm.data.supersedes } : {}),
34
- ...(fm.data.superseded_by !== undefined ? { superseded_by: fm.data.superseded_by } : {}),
35
- ...(fm.data.decided_at !== undefined ? { decided_at: fm.data.decided_at } : {}),
36
- });
37
- }
38
- out.sort((a, b) => (b.decided_at ?? "").localeCompare(a.decided_at ?? ""));
39
- return out;
40
- }
41
- export const decisionsInScopeTool = {
42
- name: "harness_decisions_in_scope",
43
- description: "List decision summaries whose scope_globs overlap any of the given path_globs.",
44
- inputSchema: decisionsInScopeInput,
45
- handler,
46
- };
47
- //# sourceMappingURL=decisions-in-scope.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decisions-in-scope.js","sourceRoot":"","sources":["../../../src/mcp/tools/decisions-in-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBA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AE,CAAC,CAAC,CAAC;IAC3E,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,IAAI,EAAE,4BAA4B;IAClC,WAAW,EACT,gFAAgF;IAClF,WAAW,EAAE,qBAAqB;IAClC,OAAO;CACR,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- title: string;
4
- body: string;
5
- intent: "run_pilot" | "review_module" | "fix_issue" | "eval" | "staleness_scan" | "unknown";
6
- target_path_globs?: string[];
7
- priority?: number;
8
- parent_task_id?: string;
9
- source?: string;
10
- }
11
- export declare const dropTaskTool: ToolDef<Input>;
12
- export {};
@@ -1,47 +0,0 @@
1
- import { mkdirSync, writeFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- import { stringify as stringifyYaml } from "yaml";
4
- import { dropTaskInput } from "../schemas.js";
5
- async function handler(ctx, input) {
6
- const today = new Date().toISOString().slice(0, 10);
7
- const slug = input.title
8
- .toLowerCase()
9
- .replace(/[^a-z0-9]+/g, "-")
10
- .replace(/^-+|-+$/g, "")
11
- .slice(0, 60);
12
- // ms-suffix gives uniqueness when the same agent files multiple tasks per second.
13
- const id = `TSK-${today}-${slug || "task"}-${Date.now() % 100000}`;
14
- const dir = join(ctx.repoRoot, ".harness", "tasks", "active", id);
15
- mkdirSync(dir, { recursive: true });
16
- const frontmatter = {
17
- id,
18
- type: "spec",
19
- status: "tightening",
20
- audience: "dual",
21
- generated: new Date().toISOString(),
22
- source: input.source ?? "agent_spawned",
23
- intent: input.intent,
24
- priority: input.priority ?? 5,
25
- ...(input.parent_task_id !== undefined ? { parent_task_id: input.parent_task_id } : {}),
26
- ...(input.target_path_globs !== undefined ? { target_path_globs: input.target_path_globs } : {}),
27
- trust_class: "code",
28
- };
29
- const spec = `---\n${stringifyYaml(frontmatter)}---\n\n# ${input.title}\n\n${input.body}\n`;
30
- writeFileSync(join(dir, "spec.md"), spec, "utf8");
31
- const status = {
32
- phase: "tightening",
33
- attempts: 0,
34
- last_event_at: new Date().toISOString(),
35
- queued_position: null,
36
- related_run_ids: [],
37
- };
38
- writeFileSync(join(dir, "status.yaml"), stringifyYaml(status), "utf8");
39
- return { ok: true, id, path: `.harness/tasks/active/${id}/spec.md` };
40
- }
41
- export const dropTaskTool = {
42
- name: "harness_drop_task",
43
- description: "Create a new active task — writes spec.md + status.yaml under .harness/tasks/active/<id>/. Used by spec-planner subagent. Operator-issued tasks come via the frontend adapter, not this tool.",
44
- inputSchema: dropTaskInput,
45
- handler,
46
- };
47
- //# sourceMappingURL=drop-task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drop-task.js","sourceRoot":"","sources":["../../../src/mcp/tools/drop-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAa9C,KAAK,UAAU,OAAO,CAAC,GAAe,EAAE,KAAY;IAClD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK;SACrB,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,kFAAkF;IAClF,MAAM,EAAE,GAAG,OAAO,KAAK,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IACnE,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,U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,CAAC,CAAC;IAEvE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAmB;IAC1C,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,+LAA+L;IACjM,WAAW,EAAE,aAAa;IAC1B,OAAO;CACR,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- id: string;
4
- kind: "decision" | "invariant" | "task" | "run";
5
- }
6
- export declare const getFullTool: ToolDef<Input>;
7
- export {};
@@ -1,46 +0,0 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- import { decisionsDir, invariantsDir } from "../../ground/index.js";
4
- import { mcpError } from "../errors.js";
5
- import { getFullInput } from "../schemas.js";
6
- async function handler(ctx, input) {
7
- switch (input.kind) {
8
- case "decision": {
9
- const path = join(decisionsDir(ctx.repoRoot), `${input.id}.md`);
10
- if (!existsSync(path)) {
11
- return mcpError("DECISION_NOT_FOUND", `No decision file at ${path}`);
12
- }
13
- return { id: input.id, kind: input.kind, content: readFileSync(path, "utf8") };
14
- }
15
- case "invariant": {
16
- const path = join(invariantsDir(ctx.repoRoot), `${input.id}.md`);
17
- if (!existsSync(path)) {
18
- return mcpError("INVARIANT_NOT_FOUND", `No invariant file at ${path}`);
19
- }
20
- return { id: input.id, kind: input.kind, content: readFileSync(path, "utf8") };
21
- }
22
- case "task": {
23
- const path = join(ctx.repoRoot, ".harness", "tasks", "active", input.id, "spec.tightened.md");
24
- const fallback = join(ctx.repoRoot, ".harness", "tasks", "active", input.id, "spec.md");
25
- const target = existsSync(path) ? path : existsSync(fallback) ? fallback : null;
26
- if (!target) {
27
- return mcpError("TASK_NOT_FOUND", `No active task ${input.id}`);
28
- }
29
- return { id: input.id, kind: input.kind, content: readFileSync(target, "utf8") };
30
- }
31
- case "run": {
32
- const meta = join(ctx.repoRoot, ".harness", "runs", "active", input.id, "meta.json");
33
- if (!existsSync(meta)) {
34
- return mcpError("RUN_NOT_FOUND", `No active run ${input.id}`);
35
- }
36
- return { id: input.id, kind: input.kind, content: readFileSync(meta, "utf8") };
37
- }
38
- }
39
- }
40
- export const getFullTool = {
41
- name: "harness_get_full",
42
- description: "Fetch full content of an artifact by id + kind (decision | invariant | task | run). Used after harness_search/timeline narrows candidates.",
43
- inputSchema: getFullInput,
44
- handler,
45
- };
46
- //# sourceMappingURL=get-full.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-full.js","sourceRoot":"","sources":["../../../src/mcp/tools/get-full.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAQ7C,KAAK,UAAU,OAAO,CAAC,GAAe,EAAE,KAAY;IAClD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;YAChE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtB,OAAO,QAAQ,CAAC,oBAAoB,EAAE,uBAAuB,IAAI,EAAE,CAAC,CAAC;YACvE,CAAC;YACD,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;QAC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AE,CAAC;QACnF,CAAC;QACD,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;YACrF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtB,OAAO,QAAQ,CAAC,eAAe,EAAE,iBAAiB,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;QACjF,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,4IAA4I;IAC9I,WAAW,EAAE,YAAY;IACzB,OAAO;CACR,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { ToolDef } from "./types.js";
2
- interface Input {
3
- category: "schema" | "routes" | "events" | "quality_grades" | "glossary" | "manifest";
4
- key?: string;
5
- }
6
- export declare const groundGetTool: ToolDef<Input>;
7
- export {};