@substrate-ai/factory 0.19.54 → 0.20.2

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 (491) hide show
  1. package/README.md +39 -0
  2. package/dist/config.d.ts +4 -4
  3. package/package.json +12 -3
  4. package/dist/__tests__/config.test.d.ts +0 -11
  5. package/dist/__tests__/config.test.d.ts.map +0 -1
  6. package/dist/__tests__/config.test.js +0 -215
  7. package/dist/__tests__/config.test.js.map +0 -1
  8. package/dist/__tests__/factory-run-command.test.d.ts +0 -12
  9. package/dist/__tests__/factory-run-command.test.d.ts.map +0 -1
  10. package/dist/__tests__/factory-run-command.test.js +0 -454
  11. package/dist/__tests__/factory-run-command.test.js.map +0 -1
  12. package/dist/__tests__/factory-validate-command.test.d.ts +0 -15
  13. package/dist/__tests__/factory-validate-command.test.d.ts.map +0 -1
  14. package/dist/__tests__/factory-validate-command.test.js +0 -339
  15. package/dist/__tests__/factory-validate-command.test.js.map +0 -1
  16. package/dist/__tests__/fixtures/advanced-cross-project-validation.dot.d.ts +0 -72
  17. package/dist/__tests__/fixtures/advanced-cross-project-validation.dot.d.ts.map +0 -1
  18. package/dist/__tests__/fixtures/advanced-cross-project-validation.dot.js +0 -121
  19. package/dist/__tests__/fixtures/advanced-cross-project-validation.dot.js.map +0 -1
  20. package/dist/__tests__/fixtures/llm-edge-routing.dot.d.ts +0 -28
  21. package/dist/__tests__/fixtures/llm-edge-routing.dot.d.ts.map +0 -1
  22. package/dist/__tests__/fixtures/llm-edge-routing.dot.js +0 -55
  23. package/dist/__tests__/fixtures/llm-edge-routing.dot.js.map +0 -1
  24. package/dist/__tests__/fixtures/manager-loop.dot.d.ts +0 -34
  25. package/dist/__tests__/fixtures/manager-loop.dot.d.ts.map +0 -1
  26. package/dist/__tests__/fixtures/manager-loop.dot.js +0 -61
  27. package/dist/__tests__/fixtures/manager-loop.dot.js.map +0 -1
  28. package/dist/__tests__/fixtures/parallel-fan-out-fan-in.dot.d.ts +0 -42
  29. package/dist/__tests__/fixtures/parallel-fan-out-fan-in.dot.d.ts.map +0 -1
  30. package/dist/__tests__/fixtures/parallel-fan-out-fan-in.dot.js +0 -118
  31. package/dist/__tests__/fixtures/parallel-fan-out-fan-in.dot.js.map +0 -1
  32. package/dist/__tests__/fixtures/subgraph-parent.dot.d.ts +0 -35
  33. package/dist/__tests__/fixtures/subgraph-parent.dot.d.ts.map +0 -1
  34. package/dist/__tests__/fixtures/subgraph-parent.dot.js +0 -69
  35. package/dist/__tests__/fixtures/subgraph-parent.dot.js.map +0 -1
  36. package/dist/__tests__/integration/advanced-graph-events.test.d.ts +0 -19
  37. package/dist/__tests__/integration/advanced-graph-events.test.d.ts.map +0 -1
  38. package/dist/__tests__/integration/advanced-graph-events.test.js +0 -288
  39. package/dist/__tests__/integration/advanced-graph-events.test.js.map +0 -1
  40. package/dist/__tests__/integration/checkpoint-resume.test.d.ts +0 -10
  41. package/dist/__tests__/integration/checkpoint-resume.test.d.ts.map +0 -1
  42. package/dist/__tests__/integration/checkpoint-resume.test.js +0 -125
  43. package/dist/__tests__/integration/checkpoint-resume.test.js.map +0 -1
  44. package/dist/__tests__/integration/conditional-pipeline.test.d.ts +0 -10
  45. package/dist/__tests__/integration/conditional-pipeline.test.d.ts.map +0 -1
  46. package/dist/__tests__/integration/conditional-pipeline.test.js +0 -106
  47. package/dist/__tests__/integration/conditional-pipeline.test.js.map +0 -1
  48. package/dist/__tests__/integration/convergence-validation.test.d.ts +0 -14
  49. package/dist/__tests__/integration/convergence-validation.test.d.ts.map +0 -1
  50. package/dist/__tests__/integration/convergence-validation.test.js +0 -449
  51. package/dist/__tests__/integration/convergence-validation.test.js.map +0 -1
  52. package/dist/__tests__/integration/epic44-coverage-gate.test.d.ts +0 -12
  53. package/dist/__tests__/integration/epic44-coverage-gate.test.d.ts.map +0 -1
  54. package/dist/__tests__/integration/epic44-coverage-gate.test.js +0 -58
  55. package/dist/__tests__/integration/epic44-coverage-gate.test.js.map +0 -1
  56. package/dist/__tests__/integration/epic45-coverage-gate.test.d.ts +0 -11
  57. package/dist/__tests__/integration/epic45-coverage-gate.test.d.ts.map +0 -1
  58. package/dist/__tests__/integration/epic45-coverage-gate.test.js +0 -64
  59. package/dist/__tests__/integration/epic45-coverage-gate.test.js.map +0 -1
  60. package/dist/__tests__/integration/epic46-scenario-primary-executor.test.d.ts +0 -2
  61. package/dist/__tests__/integration/epic46-scenario-primary-executor.test.d.ts.map +0 -1
  62. package/dist/__tests__/integration/epic46-scenario-primary-executor.test.js +0 -285
  63. package/dist/__tests__/integration/epic46-scenario-primary-executor.test.js.map +0 -1
  64. package/dist/__tests__/integration/events.test.d.ts +0 -8
  65. package/dist/__tests__/integration/events.test.d.ts.map +0 -1
  66. package/dist/__tests__/integration/events.test.js +0 -194
  67. package/dist/__tests__/integration/events.test.js.map +0 -1
  68. package/dist/__tests__/integration/graphs.d.ts +0 -59
  69. package/dist/__tests__/integration/graphs.d.ts.map +0 -1
  70. package/dist/__tests__/integration/graphs.js +0 -164
  71. package/dist/__tests__/integration/graphs.js.map +0 -1
  72. package/dist/__tests__/integration/helpers.d.ts +0 -127
  73. package/dist/__tests__/integration/helpers.d.ts.map +0 -1
  74. package/dist/__tests__/integration/helpers.js +0 -167
  75. package/dist/__tests__/integration/helpers.js.map +0 -1
  76. package/dist/__tests__/integration/integrity.test.d.ts +0 -8
  77. package/dist/__tests__/integration/integrity.test.d.ts.map +0 -1
  78. package/dist/__tests__/integration/integrity.test.js +0 -198
  79. package/dist/__tests__/integration/integrity.test.js.map +0 -1
  80. package/dist/__tests__/integration/llm-edge-routing.test.d.ts +0 -21
  81. package/dist/__tests__/integration/llm-edge-routing.test.d.ts.map +0 -1
  82. package/dist/__tests__/integration/llm-edge-routing.test.js +0 -341
  83. package/dist/__tests__/integration/llm-edge-routing.test.js.map +0 -1
  84. package/dist/__tests__/integration/manager-loop.test.d.ts +0 -24
  85. package/dist/__tests__/integration/manager-loop.test.d.ts.map +0 -1
  86. package/dist/__tests__/integration/manager-loop.test.js +0 -276
  87. package/dist/__tests__/integration/manager-loop.test.js.map +0 -1
  88. package/dist/__tests__/integration/multi-type-graph.test.d.ts +0 -10
  89. package/dist/__tests__/integration/multi-type-graph.test.d.ts.map +0 -1
  90. package/dist/__tests__/integration/multi-type-graph.test.js +0 -100
  91. package/dist/__tests__/integration/multi-type-graph.test.js.map +0 -1
  92. package/dist/__tests__/integration/parallel-fan-out-fan-in.test.d.ts +0 -22
  93. package/dist/__tests__/integration/parallel-fan-out-fan-in.test.d.ts.map +0 -1
  94. package/dist/__tests__/integration/parallel-fan-out-fan-in.test.js +0 -515
  95. package/dist/__tests__/integration/parallel-fan-out-fan-in.test.js.map +0 -1
  96. package/dist/__tests__/integration/persistence.test.d.ts +0 -8
  97. package/dist/__tests__/integration/persistence.test.d.ts.map +0 -1
  98. package/dist/__tests__/integration/persistence.test.js +0 -129
  99. package/dist/__tests__/integration/persistence.test.js.map +0 -1
  100. package/dist/__tests__/integration/pipeline-templates-integration.test.d.ts +0 -16
  101. package/dist/__tests__/integration/pipeline-templates-integration.test.d.ts.map +0 -1
  102. package/dist/__tests__/integration/pipeline-templates-integration.test.js +0 -171
  103. package/dist/__tests__/integration/pipeline-templates-integration.test.js.map +0 -1
  104. package/dist/__tests__/integration/scenario-pipeline.test.d.ts +0 -11
  105. package/dist/__tests__/integration/scenario-pipeline.test.d.ts.map +0 -1
  106. package/dist/__tests__/integration/scenario-pipeline.test.js +0 -243
  107. package/dist/__tests__/integration/scenario-pipeline.test.js.map +0 -1
  108. package/dist/__tests__/integration/stylesheet-application.test.d.ts +0 -12
  109. package/dist/__tests__/integration/stylesheet-application.test.d.ts.map +0 -1
  110. package/dist/__tests__/integration/stylesheet-application.test.js +0 -119
  111. package/dist/__tests__/integration/stylesheet-application.test.js.map +0 -1
  112. package/dist/__tests__/integration/subgraph-execution.test.d.ts +0 -24
  113. package/dist/__tests__/integration/subgraph-execution.test.d.ts.map +0 -1
  114. package/dist/__tests__/integration/subgraph-execution.test.js +0 -291
  115. package/dist/__tests__/integration/subgraph-execution.test.js.map +0 -1
  116. package/dist/__tests__/integration/validation-errors.test.d.ts +0 -8
  117. package/dist/__tests__/integration/validation-errors.test.d.ts.map +0 -1
  118. package/dist/__tests__/integration/validation-errors.test.js +0 -150
  119. package/dist/__tests__/integration/validation-errors.test.js.map +0 -1
  120. package/dist/agent/__tests__/loop-detection.test.d.ts +0 -2
  121. package/dist/agent/__tests__/loop-detection.test.d.ts.map +0 -1
  122. package/dist/agent/__tests__/loop-detection.test.js +0 -236
  123. package/dist/agent/__tests__/loop-detection.test.js.map +0 -1
  124. package/dist/agent/__tests__/loop.test.d.ts +0 -2
  125. package/dist/agent/__tests__/loop.test.d.ts.map +0 -1
  126. package/dist/agent/__tests__/loop.test.js +0 -868
  127. package/dist/agent/__tests__/loop.test.js.map +0 -1
  128. package/dist/agent/__tests__/truncation.test.d.ts +0 -2
  129. package/dist/agent/__tests__/truncation.test.d.ts.map +0 -1
  130. package/dist/agent/__tests__/truncation.test.js +0 -276
  131. package/dist/agent/__tests__/truncation.test.js.map +0 -1
  132. package/dist/agent/tools/__tests__/anthropic-tools.test.d.ts +0 -6
  133. package/dist/agent/tools/__tests__/anthropic-tools.test.d.ts.map +0 -1
  134. package/dist/agent/tools/__tests__/anthropic-tools.test.js +0 -49
  135. package/dist/agent/tools/__tests__/anthropic-tools.test.js.map +0 -1
  136. package/dist/agent/tools/__tests__/environment.test.d.ts +0 -6
  137. package/dist/agent/tools/__tests__/environment.test.d.ts.map +0 -1
  138. package/dist/agent/tools/__tests__/environment.test.js +0 -33
  139. package/dist/agent/tools/__tests__/environment.test.js.map +0 -1
  140. package/dist/agent/tools/__tests__/gemini-tools.test.d.ts +0 -6
  141. package/dist/agent/tools/__tests__/gemini-tools.test.d.ts.map +0 -1
  142. package/dist/agent/tools/__tests__/gemini-tools.test.js +0 -98
  143. package/dist/agent/tools/__tests__/gemini-tools.test.js.map +0 -1
  144. package/dist/agent/tools/__tests__/openai-tools.test.d.ts +0 -6
  145. package/dist/agent/tools/__tests__/openai-tools.test.d.ts.map +0 -1
  146. package/dist/agent/tools/__tests__/openai-tools.test.js +0 -53
  147. package/dist/agent/tools/__tests__/openai-tools.test.js.map +0 -1
  148. package/dist/agent/tools/__tests__/patch.test.d.ts +0 -6
  149. package/dist/agent/tools/__tests__/patch.test.d.ts.map +0 -1
  150. package/dist/agent/tools/__tests__/patch.test.js +0 -116
  151. package/dist/agent/tools/__tests__/patch.test.js.map +0 -1
  152. package/dist/agent/tools/__tests__/profiles.test.d.ts +0 -6
  153. package/dist/agent/tools/__tests__/profiles.test.d.ts.map +0 -1
  154. package/dist/agent/tools/__tests__/profiles.test.js +0 -125
  155. package/dist/agent/tools/__tests__/profiles.test.js.map +0 -1
  156. package/dist/agent/tools/__tests__/registry.test.d.ts +0 -6
  157. package/dist/agent/tools/__tests__/registry.test.d.ts.map +0 -1
  158. package/dist/agent/tools/__tests__/registry.test.js +0 -94
  159. package/dist/agent/tools/__tests__/registry.test.js.map +0 -1
  160. package/dist/agent/tools/__tests__/shared.test.d.ts +0 -6
  161. package/dist/agent/tools/__tests__/shared.test.d.ts.map +0 -1
  162. package/dist/agent/tools/__tests__/shared.test.js +0 -131
  163. package/dist/agent/tools/__tests__/shared.test.js.map +0 -1
  164. package/dist/backend/__tests__/direct-backend.test.d.ts +0 -14
  165. package/dist/backend/__tests__/direct-backend.test.d.ts.map +0 -1
  166. package/dist/backend/__tests__/direct-backend.test.js +0 -393
  167. package/dist/backend/__tests__/direct-backend.test.js.map +0 -1
  168. package/dist/backend/__tests__/direct-bootstrap.test.d.ts +0 -7
  169. package/dist/backend/__tests__/direct-bootstrap.test.d.ts.map +0 -1
  170. package/dist/backend/__tests__/direct-bootstrap.test.js +0 -177
  171. package/dist/backend/__tests__/direct-bootstrap.test.js.map +0 -1
  172. package/dist/backend/__tests__/mock-backend.test.d.ts +0 -7
  173. package/dist/backend/__tests__/mock-backend.test.d.ts.map +0 -1
  174. package/dist/backend/__tests__/mock-backend.test.js +0 -273
  175. package/dist/backend/__tests__/mock-backend.test.js.map +0 -1
  176. package/dist/backend/__tests__/parity.test.d.ts +0 -17
  177. package/dist/backend/__tests__/parity.test.d.ts.map +0 -1
  178. package/dist/backend/__tests__/parity.test.js +0 -411
  179. package/dist/backend/__tests__/parity.test.js.map +0 -1
  180. package/dist/context/__tests__/auto-summarizer.test.d.ts +0 -14
  181. package/dist/context/__tests__/auto-summarizer.test.d.ts.map +0 -1
  182. package/dist/context/__tests__/auto-summarizer.test.js +0 -189
  183. package/dist/context/__tests__/auto-summarizer.test.js.map +0 -1
  184. package/dist/context/__tests__/context-cli-command.test.d.ts +0 -7
  185. package/dist/context/__tests__/context-cli-command.test.d.ts.map +0 -1
  186. package/dist/context/__tests__/context-cli-command.test.js +0 -331
  187. package/dist/context/__tests__/context-cli-command.test.js.map +0 -1
  188. package/dist/context/__tests__/pyramid-summary-integration.test.d.ts +0 -2
  189. package/dist/context/__tests__/pyramid-summary-integration.test.d.ts.map +0 -1
  190. package/dist/context/__tests__/pyramid-summary-integration.test.js +0 -533
  191. package/dist/context/__tests__/pyramid-summary-integration.test.js.map +0 -1
  192. package/dist/context/__tests__/summarizer.test.d.ts +0 -2
  193. package/dist/context/__tests__/summarizer.test.d.ts.map +0 -1
  194. package/dist/context/__tests__/summarizer.test.js +0 -189
  195. package/dist/context/__tests__/summarizer.test.js.map +0 -1
  196. package/dist/context/__tests__/summary-cache.test.d.ts +0 -2
  197. package/dist/context/__tests__/summary-cache.test.d.ts.map +0 -1
  198. package/dist/context/__tests__/summary-cache.test.js +0 -214
  199. package/dist/context/__tests__/summary-cache.test.js.map +0 -1
  200. package/dist/context/__tests__/summary-metrics.test.d.ts +0 -2
  201. package/dist/context/__tests__/summary-metrics.test.d.ts.map +0 -1
  202. package/dist/context/__tests__/summary-metrics.test.js +0 -172
  203. package/dist/context/__tests__/summary-metrics.test.js.map +0 -1
  204. package/dist/context/__tests__/summary-types.test.d.ts +0 -2
  205. package/dist/context/__tests__/summary-types.test.d.ts.map +0 -1
  206. package/dist/context/__tests__/summary-types.test.js +0 -130
  207. package/dist/context/__tests__/summary-types.test.js.map +0 -1
  208. package/dist/convergence/__tests__/budget.test.d.ts +0 -6
  209. package/dist/convergence/__tests__/budget.test.d.ts.map +0 -1
  210. package/dist/convergence/__tests__/budget.test.js +0 -187
  211. package/dist/convergence/__tests__/budget.test.js.map +0 -1
  212. package/dist/convergence/__tests__/controller.test.d.ts +0 -9
  213. package/dist/convergence/__tests__/controller.test.d.ts.map +0 -1
  214. package/dist/convergence/__tests__/controller.test.js +0 -585
  215. package/dist/convergence/__tests__/controller.test.js.map +0 -1
  216. package/dist/convergence/__tests__/dual-signal.test.d.ts +0 -14
  217. package/dist/convergence/__tests__/dual-signal.test.d.ts.map +0 -1
  218. package/dist/convergence/__tests__/dual-signal.test.js +0 -123
  219. package/dist/convergence/__tests__/dual-signal.test.js.map +0 -1
  220. package/dist/convergence/__tests__/epic46-integration.test.d.ts +0 -15
  221. package/dist/convergence/__tests__/epic46-integration.test.d.ts.map +0 -1
  222. package/dist/convergence/__tests__/epic46-integration.test.js +0 -522
  223. package/dist/convergence/__tests__/epic46-integration.test.js.map +0 -1
  224. package/dist/convergence/__tests__/plateau.test.d.ts +0 -6
  225. package/dist/convergence/__tests__/plateau.test.d.ts.map +0 -1
  226. package/dist/convergence/__tests__/plateau.test.js +0 -163
  227. package/dist/convergence/__tests__/plateau.test.js.map +0 -1
  228. package/dist/convergence/__tests__/remediation.test.d.ts +0 -11
  229. package/dist/convergence/__tests__/remediation.test.d.ts.map +0 -1
  230. package/dist/convergence/__tests__/remediation.test.js +0 -209
  231. package/dist/convergence/__tests__/remediation.test.js.map +0 -1
  232. package/dist/convergence/__tests__/scenario-primary.test.d.ts +0 -13
  233. package/dist/convergence/__tests__/scenario-primary.test.d.ts.map +0 -1
  234. package/dist/convergence/__tests__/scenario-primary.test.js +0 -183
  235. package/dist/convergence/__tests__/scenario-primary.test.js.map +0 -1
  236. package/dist/factory-command.test.d.ts +0 -8
  237. package/dist/factory-command.test.d.ts.map +0 -1
  238. package/dist/factory-command.test.js +0 -304
  239. package/dist/factory-command.test.js.map +0 -1
  240. package/dist/graph/__tests__/attractor-compliance.test.d.ts +0 -10
  241. package/dist/graph/__tests__/attractor-compliance.test.d.ts.map +0 -1
  242. package/dist/graph/__tests__/attractor-compliance.test.js +0 -766
  243. package/dist/graph/__tests__/attractor-compliance.test.js.map +0 -1
  244. package/dist/graph/__tests__/checkpoint.test.d.ts +0 -8
  245. package/dist/graph/__tests__/checkpoint.test.d.ts.map +0 -1
  246. package/dist/graph/__tests__/checkpoint.test.js +0 -329
  247. package/dist/graph/__tests__/checkpoint.test.js.map +0 -1
  248. package/dist/graph/__tests__/condition-parser.test.d.ts +0 -14
  249. package/dist/graph/__tests__/condition-parser.test.d.ts.map +0 -1
  250. package/dist/graph/__tests__/condition-parser.test.js +0 -406
  251. package/dist/graph/__tests__/condition-parser.test.js.map +0 -1
  252. package/dist/graph/__tests__/context.test.d.ts +0 -14
  253. package/dist/graph/__tests__/context.test.d.ts.map +0 -1
  254. package/dist/graph/__tests__/context.test.js +0 -276
  255. package/dist/graph/__tests__/context.test.js.map +0 -1
  256. package/dist/graph/__tests__/edge-selector-events.test.d.ts +0 -11
  257. package/dist/graph/__tests__/edge-selector-events.test.d.ts.map +0 -1
  258. package/dist/graph/__tests__/edge-selector-events.test.js +0 -184
  259. package/dist/graph/__tests__/edge-selector-events.test.js.map +0 -1
  260. package/dist/graph/__tests__/edge-selector.test.d.ts +0 -6
  261. package/dist/graph/__tests__/edge-selector.test.d.ts.map +0 -1
  262. package/dist/graph/__tests__/edge-selector.test.js +0 -452
  263. package/dist/graph/__tests__/edge-selector.test.js.map +0 -1
  264. package/dist/graph/__tests__/executor-convergence.test.d.ts +0 -12
  265. package/dist/graph/__tests__/executor-convergence.test.d.ts.map +0 -1
  266. package/dist/graph/__tests__/executor-convergence.test.js +0 -432
  267. package/dist/graph/__tests__/executor-convergence.test.js.map +0 -1
  268. package/dist/graph/__tests__/executor-fidelity.test.d.ts +0 -13
  269. package/dist/graph/__tests__/executor-fidelity.test.d.ts.map +0 -1
  270. package/dist/graph/__tests__/executor-fidelity.test.js +0 -335
  271. package/dist/graph/__tests__/executor-fidelity.test.js.map +0 -1
  272. package/dist/graph/__tests__/executor.test.d.ts +0 -14
  273. package/dist/graph/__tests__/executor.test.d.ts.map +0 -1
  274. package/dist/graph/__tests__/executor.test.js +0 -901
  275. package/dist/graph/__tests__/executor.test.js.map +0 -1
  276. package/dist/graph/__tests__/fidelity.test.d.ts +0 -8
  277. package/dist/graph/__tests__/fidelity.test.d.ts.map +0 -1
  278. package/dist/graph/__tests__/fidelity.test.js +0 -135
  279. package/dist/graph/__tests__/fidelity.test.js.map +0 -1
  280. package/dist/graph/__tests__/llm-evaluator.test.d.ts +0 -7
  281. package/dist/graph/__tests__/llm-evaluator.test.d.ts.map +0 -1
  282. package/dist/graph/__tests__/llm-evaluator.test.js +0 -106
  283. package/dist/graph/__tests__/llm-evaluator.test.js.map +0 -1
  284. package/dist/graph/__tests__/parser-chaining.test.d.ts +0 -13
  285. package/dist/graph/__tests__/parser-chaining.test.d.ts.map +0 -1
  286. package/dist/graph/__tests__/parser-chaining.test.js +0 -215
  287. package/dist/graph/__tests__/parser-chaining.test.js.map +0 -1
  288. package/dist/graph/__tests__/parser.test.d.ts +0 -22
  289. package/dist/graph/__tests__/parser.test.d.ts.map +0 -1
  290. package/dist/graph/__tests__/parser.test.js +0 -452
  291. package/dist/graph/__tests__/parser.test.js.map +0 -1
  292. package/dist/graph/__tests__/run-state.test.d.ts +0 -13
  293. package/dist/graph/__tests__/run-state.test.d.ts.map +0 -1
  294. package/dist/graph/__tests__/run-state.test.js +0 -189
  295. package/dist/graph/__tests__/run-state.test.js.map +0 -1
  296. package/dist/graph/__tests__/transformer.test.d.ts +0 -16
  297. package/dist/graph/__tests__/transformer.test.d.ts.map +0 -1
  298. package/dist/graph/__tests__/transformer.test.js +0 -350
  299. package/dist/graph/__tests__/transformer.test.js.map +0 -1
  300. package/dist/graph/__tests__/validator-errors.test.d.ts +0 -15
  301. package/dist/graph/__tests__/validator-errors.test.d.ts.map +0 -1
  302. package/dist/graph/__tests__/validator-errors.test.js +0 -572
  303. package/dist/graph/__tests__/validator-errors.test.js.map +0 -1
  304. package/dist/graph/__tests__/validator-warnings.test.d.ts +0 -15
  305. package/dist/graph/__tests__/validator-warnings.test.d.ts.map +0 -1
  306. package/dist/graph/__tests__/validator-warnings.test.js +0 -363
  307. package/dist/graph/__tests__/validator-warnings.test.js.map +0 -1
  308. package/dist/handlers/__tests__/codergen-handler.test.d.ts +0 -14
  309. package/dist/handlers/__tests__/codergen-handler.test.d.ts.map +0 -1
  310. package/dist/handlers/__tests__/codergen-handler.test.js +0 -442
  311. package/dist/handlers/__tests__/codergen-handler.test.js.map +0 -1
  312. package/dist/handlers/__tests__/fan-in.test.d.ts +0 -14
  313. package/dist/handlers/__tests__/fan-in.test.d.ts.map +0 -1
  314. package/dist/handlers/__tests__/fan-in.test.js +0 -399
  315. package/dist/handlers/__tests__/fan-in.test.js.map +0 -1
  316. package/dist/handlers/__tests__/join-policy.test.d.ts +0 -9
  317. package/dist/handlers/__tests__/join-policy.test.d.ts.map +0 -1
  318. package/dist/handlers/__tests__/join-policy.test.js +0 -201
  319. package/dist/handlers/__tests__/join-policy.test.js.map +0 -1
  320. package/dist/handlers/__tests__/manager-loop.test.d.ts +0 -14
  321. package/dist/handlers/__tests__/manager-loop.test.d.ts.map +0 -1
  322. package/dist/handlers/__tests__/manager-loop.test.js +0 -322
  323. package/dist/handlers/__tests__/manager-loop.test.js.map +0 -1
  324. package/dist/handlers/__tests__/parallel-events.test.d.ts +0 -12
  325. package/dist/handlers/__tests__/parallel-events.test.d.ts.map +0 -1
  326. package/dist/handlers/__tests__/parallel-events.test.js +0 -252
  327. package/dist/handlers/__tests__/parallel-events.test.js.map +0 -1
  328. package/dist/handlers/__tests__/parallel-handler.test.d.ts +0 -14
  329. package/dist/handlers/__tests__/parallel-handler.test.d.ts.map +0 -1
  330. package/dist/handlers/__tests__/parallel-handler.test.js +0 -337
  331. package/dist/handlers/__tests__/parallel-handler.test.js.map +0 -1
  332. package/dist/handlers/__tests__/parallel-join.test.d.ts +0 -9
  333. package/dist/handlers/__tests__/parallel-join.test.d.ts.map +0 -1
  334. package/dist/handlers/__tests__/parallel-join.test.js +0 -267
  335. package/dist/handlers/__tests__/parallel-join.test.js.map +0 -1
  336. package/dist/handlers/__tests__/registry.test.d.ts +0 -14
  337. package/dist/handlers/__tests__/registry.test.d.ts.map +0 -1
  338. package/dist/handlers/__tests__/registry.test.js +0 -315
  339. package/dist/handlers/__tests__/registry.test.js.map +0 -1
  340. package/dist/handlers/__tests__/subgraph-events.test.d.ts +0 -10
  341. package/dist/handlers/__tests__/subgraph-events.test.d.ts.map +0 -1
  342. package/dist/handlers/__tests__/subgraph-events.test.js +0 -189
  343. package/dist/handlers/__tests__/subgraph-events.test.js.map +0 -1
  344. package/dist/handlers/__tests__/subgraph-inheritance.test.d.ts +0 -14
  345. package/dist/handlers/__tests__/subgraph-inheritance.test.d.ts.map +0 -1
  346. package/dist/handlers/__tests__/subgraph-inheritance.test.js +0 -267
  347. package/dist/handlers/__tests__/subgraph-inheritance.test.js.map +0 -1
  348. package/dist/handlers/__tests__/subgraph.test.d.ts +0 -14
  349. package/dist/handlers/__tests__/subgraph.test.d.ts.map +0 -1
  350. package/dist/handlers/__tests__/subgraph.test.js +0 -369
  351. package/dist/handlers/__tests__/subgraph.test.js.map +0 -1
  352. package/dist/handlers/__tests__/tool-handler.test.d.ts +0 -11
  353. package/dist/handlers/__tests__/tool-handler.test.d.ts.map +0 -1
  354. package/dist/handlers/__tests__/tool-handler.test.js +0 -184
  355. package/dist/handlers/__tests__/tool-handler.test.js.map +0 -1
  356. package/dist/handlers/__tests__/tool-scenario.test.d.ts +0 -12
  357. package/dist/handlers/__tests__/tool-scenario.test.d.ts.map +0 -1
  358. package/dist/handlers/__tests__/tool-scenario.test.js +0 -222
  359. package/dist/handlers/__tests__/tool-scenario.test.js.map +0 -1
  360. package/dist/handlers/__tests__/wait-human-handler.test.d.ts +0 -11
  361. package/dist/handlers/__tests__/wait-human-handler.test.d.ts.map +0 -1
  362. package/dist/handlers/__tests__/wait-human-handler.test.js +0 -251
  363. package/dist/handlers/__tests__/wait-human-handler.test.js.map +0 -1
  364. package/dist/llm/__tests__/client.test.d.ts +0 -2
  365. package/dist/llm/__tests__/client.test.d.ts.map +0 -1
  366. package/dist/llm/__tests__/client.test.js +0 -198
  367. package/dist/llm/__tests__/client.test.js.map +0 -1
  368. package/dist/llm/__tests__/types.test.d.ts +0 -2
  369. package/dist/llm/__tests__/types.test.d.ts.map +0 -1
  370. package/dist/llm/__tests__/types.test.js +0 -289
  371. package/dist/llm/__tests__/types.test.js.map +0 -1
  372. package/dist/llm/middleware/__tests__/cost-tracking.test.d.ts +0 -2
  373. package/dist/llm/middleware/__tests__/cost-tracking.test.d.ts.map +0 -1
  374. package/dist/llm/middleware/__tests__/cost-tracking.test.js +0 -73
  375. package/dist/llm/middleware/__tests__/cost-tracking.test.js.map +0 -1
  376. package/dist/llm/middleware/__tests__/logging.test.d.ts +0 -2
  377. package/dist/llm/middleware/__tests__/logging.test.d.ts.map +0 -1
  378. package/dist/llm/middleware/__tests__/logging.test.js +0 -127
  379. package/dist/llm/middleware/__tests__/logging.test.js.map +0 -1
  380. package/dist/llm/middleware/__tests__/retry.test.d.ts +0 -2
  381. package/dist/llm/middleware/__tests__/retry.test.d.ts.map +0 -1
  382. package/dist/llm/middleware/__tests__/retry.test.js +0 -126
  383. package/dist/llm/middleware/__tests__/retry.test.js.map +0 -1
  384. package/dist/llm/providers/__tests__/anthropic.test.d.ts +0 -2
  385. package/dist/llm/providers/__tests__/anthropic.test.d.ts.map +0 -1
  386. package/dist/llm/providers/__tests__/anthropic.test.js +0 -412
  387. package/dist/llm/providers/__tests__/anthropic.test.js.map +0 -1
  388. package/dist/llm/providers/__tests__/gemini.test.d.ts +0 -2
  389. package/dist/llm/providers/__tests__/gemini.test.d.ts.map +0 -1
  390. package/dist/llm/providers/__tests__/gemini.test.js +0 -591
  391. package/dist/llm/providers/__tests__/gemini.test.js.map +0 -1
  392. package/dist/llm/providers/__tests__/openai.test.d.ts +0 -2
  393. package/dist/llm/providers/__tests__/openai.test.d.ts.map +0 -1
  394. package/dist/llm/providers/__tests__/openai.test.js +0 -546
  395. package/dist/llm/providers/__tests__/openai.test.js.map +0 -1
  396. package/dist/persistence/__tests__/factory-queries.test.d.ts +0 -9
  397. package/dist/persistence/__tests__/factory-queries.test.d.ts.map +0 -1
  398. package/dist/persistence/__tests__/factory-queries.test.js +0 -372
  399. package/dist/persistence/__tests__/factory-queries.test.js.map +0 -1
  400. package/dist/persistence/__tests__/factory-schema.test.d.ts +0 -6
  401. package/dist/persistence/__tests__/factory-schema.test.d.ts.map +0 -1
  402. package/dist/persistence/__tests__/factory-schema.test.js +0 -105
  403. package/dist/persistence/__tests__/factory-schema.test.js.map +0 -1
  404. package/dist/scenarios/__tests__/cli-command-list.test.d.ts +0 -7
  405. package/dist/scenarios/__tests__/cli-command-list.test.d.ts.map +0 -1
  406. package/dist/scenarios/__tests__/cli-command-list.test.js +0 -237
  407. package/dist/scenarios/__tests__/cli-command-list.test.js.map +0 -1
  408. package/dist/scenarios/__tests__/cli-command.test.d.ts +0 -11
  409. package/dist/scenarios/__tests__/cli-command.test.d.ts.map +0 -1
  410. package/dist/scenarios/__tests__/cli-command.test.js +0 -275
  411. package/dist/scenarios/__tests__/cli-command.test.js.map +0 -1
  412. package/dist/scenarios/__tests__/integrity-pipeline.test.d.ts +0 -15
  413. package/dist/scenarios/__tests__/integrity-pipeline.test.d.ts.map +0 -1
  414. package/dist/scenarios/__tests__/integrity-pipeline.test.js +0 -318
  415. package/dist/scenarios/__tests__/integrity-pipeline.test.js.map +0 -1
  416. package/dist/scenarios/__tests__/runner-twins.test.d.ts +0 -13
  417. package/dist/scenarios/__tests__/runner-twins.test.d.ts.map +0 -1
  418. package/dist/scenarios/__tests__/runner-twins.test.js +0 -205
  419. package/dist/scenarios/__tests__/runner-twins.test.js.map +0 -1
  420. package/dist/scenarios/__tests__/scorer.test.d.ts +0 -11
  421. package/dist/scenarios/__tests__/scorer.test.d.ts.map +0 -1
  422. package/dist/scenarios/__tests__/scorer.test.js +0 -225
  423. package/dist/scenarios/__tests__/scorer.test.js.map +0 -1
  424. package/dist/scenarios/__tests__/scoring-integration.test.d.ts +0 -8
  425. package/dist/scenarios/__tests__/scoring-integration.test.d.ts.map +0 -1
  426. package/dist/scenarios/__tests__/scoring-integration.test.js +0 -178
  427. package/dist/scenarios/__tests__/scoring-integration.test.js.map +0 -1
  428. package/dist/scenarios/__tests__/store.test.d.ts +0 -5
  429. package/dist/scenarios/__tests__/store.test.d.ts.map +0 -1
  430. package/dist/scenarios/__tests__/store.test.js +0 -169
  431. package/dist/scenarios/__tests__/store.test.js.map +0 -1
  432. package/dist/stylesheet/__tests__/stylesheet.test.d.ts +0 -17
  433. package/dist/stylesheet/__tests__/stylesheet.test.d.ts.map +0 -1
  434. package/dist/stylesheet/__tests__/stylesheet.test.js +0 -368
  435. package/dist/stylesheet/__tests__/stylesheet.test.js.map +0 -1
  436. package/dist/templates/__tests__/templates.test.d.ts +0 -7
  437. package/dist/templates/__tests__/templates.test.d.ts.map +0 -1
  438. package/dist/templates/__tests__/templates.test.js +0 -92
  439. package/dist/templates/__tests__/templates.test.js.map +0 -1
  440. package/dist/twins/__tests__/docker-compose.test.d.ts +0 -13
  441. package/dist/twins/__tests__/docker-compose.test.d.ts.map +0 -1
  442. package/dist/twins/__tests__/docker-compose.test.js +0 -247
  443. package/dist/twins/__tests__/docker-compose.test.js.map +0 -1
  444. package/dist/twins/__tests__/health-monitor.test.d.ts +0 -19
  445. package/dist/twins/__tests__/health-monitor.test.d.ts.map +0 -1
  446. package/dist/twins/__tests__/health-monitor.test.js +0 -301
  447. package/dist/twins/__tests__/health-monitor.test.js.map +0 -1
  448. package/dist/twins/__tests__/integration/e2e.test.d.ts +0 -18
  449. package/dist/twins/__tests__/integration/e2e.test.d.ts.map +0 -1
  450. package/dist/twins/__tests__/integration/e2e.test.js +0 -146
  451. package/dist/twins/__tests__/integration/e2e.test.js.map +0 -1
  452. package/dist/twins/__tests__/integration/health-monitor-integration.test.d.ts +0 -16
  453. package/dist/twins/__tests__/integration/health-monitor-integration.test.d.ts.map +0 -1
  454. package/dist/twins/__tests__/integration/health-monitor-integration.test.js +0 -183
  455. package/dist/twins/__tests__/integration/health-monitor-integration.test.js.map +0 -1
  456. package/dist/twins/__tests__/integration/helpers.d.ts +0 -32
  457. package/dist/twins/__tests__/integration/helpers.d.ts.map +0 -1
  458. package/dist/twins/__tests__/integration/helpers.js +0 -67
  459. package/dist/twins/__tests__/integration/helpers.js.map +0 -1
  460. package/dist/twins/__tests__/integration/lifecycle.test.d.ts +0 -14
  461. package/dist/twins/__tests__/integration/lifecycle.test.d.ts.map +0 -1
  462. package/dist/twins/__tests__/integration/lifecycle.test.js +0 -127
  463. package/dist/twins/__tests__/integration/lifecycle.test.js.map +0 -1
  464. package/dist/twins/__tests__/integration/persistence-integration.test.d.ts +0 -14
  465. package/dist/twins/__tests__/integration/persistence-integration.test.d.ts.map +0 -1
  466. package/dist/twins/__tests__/integration/persistence-integration.test.js +0 -132
  467. package/dist/twins/__tests__/integration/persistence-integration.test.js.map +0 -1
  468. package/dist/twins/__tests__/persistence.test.d.ts +0 -10
  469. package/dist/twins/__tests__/persistence.test.d.ts.map +0 -1
  470. package/dist/twins/__tests__/persistence.test.js +0 -300
  471. package/dist/twins/__tests__/persistence.test.js.map +0 -1
  472. package/dist/twins/__tests__/registry.test.d.ts +0 -7
  473. package/dist/twins/__tests__/registry.test.d.ts.map +0 -1
  474. package/dist/twins/__tests__/registry.test.js +0 -282
  475. package/dist/twins/__tests__/registry.test.js.map +0 -1
  476. package/dist/twins/__tests__/run-state.test.d.ts +0 -9
  477. package/dist/twins/__tests__/run-state.test.d.ts.map +0 -1
  478. package/dist/twins/__tests__/run-state.test.js +0 -112
  479. package/dist/twins/__tests__/run-state.test.js.map +0 -1
  480. package/dist/twins/__tests__/templates-cli.test.d.ts +0 -10
  481. package/dist/twins/__tests__/templates-cli.test.d.ts.map +0 -1
  482. package/dist/twins/__tests__/templates-cli.test.js +0 -187
  483. package/dist/twins/__tests__/templates-cli.test.js.map +0 -1
  484. package/dist/twins/__tests__/templates.test.d.ts +0 -7
  485. package/dist/twins/__tests__/templates.test.d.ts.map +0 -1
  486. package/dist/twins/__tests__/templates.test.js +0 -87
  487. package/dist/twins/__tests__/templates.test.js.map +0 -1
  488. package/dist/twins/__tests__/twins-cli.test.d.ts +0 -11
  489. package/dist/twins/__tests__/twins-cli.test.d.ts.map +0 -1
  490. package/dist/twins/__tests__/twins-cli.test.js +0 -365
  491. package/dist/twins/__tests__/twins-cli.test.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini-tools.test.js","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/gemini-tools.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACxE,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AACzG,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAA;AAElD,QAAQ,CAAC,oCAAoC,EA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,MAAM,EAAE,QAAQ,CAAC,CAAA;YACzD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;QACvD,CAAC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Tests for OpenAI-specific tools (apply_patch wrapper).
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- export {};
6
- //# sourceMappingURL=openai-tools.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openai-tools.test.d.ts","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/openai-tools.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,53 +0,0 @@
1
- /**
2
- * Tests for OpenAI-specific tools (apply_patch wrapper).
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
6
- import { createApplyPatchTool } from '../openai-tools.js';
7
- import { mkdtemp, writeFile, readFile, rm } from 'node:fs/promises';
8
- import { join } from 'node:path';
9
- import { tmpdir } from 'node:os';
10
- describe('createApplyPatchTool', () => {
11
- let tmpDir;
12
- beforeEach(async () => {
13
- tmpDir = await mkdtemp(join(tmpdir(), 'openai-tool-'));
14
- });
15
- afterEach(async () => {
16
- await rm(tmpDir, { recursive: true, force: true });
17
- });
18
- it('has valid name, description, and inputSchema', () => {
19
- const tool = createApplyPatchTool();
20
- expect(tool.name).toBe('apply_patch');
21
- expect(tool.description.length).toBeGreaterThan(0);
22
- expect(tool.inputSchema).toHaveProperty('type', 'object');
23
- expect(tool.inputSchema.required).toContain('patch');
24
- });
25
- it('applies a v4a patch via executor with env.workdir', async () => {
26
- const filePath = join(tmpDir, 'test.ts');
27
- await writeFile(filePath, 'const x = 1;\nconst y = 2;\n', 'utf-8');
28
- const tool = createApplyPatchTool();
29
- const env = { workdir: tmpDir, exec: vi.fn() };
30
- const patch = [
31
- '*** Begin Patch',
32
- `*** Update File: test.ts`,
33
- '@@ const x = 1;',
34
- '-const x = 1;',
35
- '+const x = 42;',
36
- '*** End Patch',
37
- ].join('\n');
38
- const result = await tool.executor({ patch }, env);
39
- expect(result).toContain('Applied');
40
- const updated = await readFile(filePath, 'utf-8');
41
- expect(updated).toContain('const x = 42;');
42
- });
43
- });
44
- describe('all tool definitions schema validation', () => {
45
- it('apply_patch has required inputSchema fields', () => {
46
- const tool = createApplyPatchTool();
47
- const schema = tool.inputSchema;
48
- expect(schema.type).toBe('object');
49
- expect(schema.properties).toHaveProperty('patch');
50
- expect(schema.required).toContain('patch');
51
- });
52
- });
53
- //# sourceMappingURL=openai-tools.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openai-tools.test.js","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/openai-tools.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,MAAc,CAAA;IAElB,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC,CAAA;IACxD,CAAC,CAAC,CAAA;IAEF,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IA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A;QACjD,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,wCAAwC,EAAE,GAAG,EAAE;IACtD,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,IAAI,GAAG,oBAAoB,EAAE,CAAA;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAwF,CAAA;QAC5G,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAClC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QACjD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Tests for applyV4aPatch.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- export {};
6
- //# sourceMappingURL=patch.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patch.test.d.ts","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/patch.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,116 +0,0 @@
1
- /**
2
- * Tests for applyV4aPatch.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- import { describe, it, expect, beforeEach, afterEach } from 'vitest';
6
- import { readFile, mkdir, writeFile, rm } from 'node:fs/promises';
7
- import { join } from 'node:path';
8
- import { tmpdir } from 'node:os';
9
- import { randomUUID } from 'node:crypto';
10
- import { applyV4aPatch } from '../openai-tools.js';
11
- describe('applyV4aPatch', () => {
12
- let tmpDir;
13
- beforeEach(async () => {
14
- tmpDir = join(tmpdir(), `patch-test-${randomUUID()}`);
15
- await mkdir(tmpDir, { recursive: true });
16
- });
17
- afterEach(async () => {
18
- await rm(tmpDir, { recursive: true, force: true });
19
- });
20
- it('updates an existing file with one removed and one added line', async () => {
21
- const filePath = join(tmpDir, 'hello.ts');
22
- await writeFile(filePath, 'const x = 1\nconst y = 2\nconst z = 3\n', 'utf-8');
23
- const patch = [
24
- '*** Begin Patch',
25
- '*** Update File: hello.ts',
26
- '@@ context',
27
- '-const y = 2',
28
- '+const y = 99',
29
- '*** End Patch',
30
- ].join('\n');
31
- const result = await applyV4aPatch(patch, tmpDir);
32
- expect(result).toContain('hello.ts');
33
- const updated = await readFile(filePath, 'utf-8');
34
- expect(updated).toContain('const y = 99');
35
- expect(updated).not.toContain('const y = 2');
36
- });
37
- it('adds a new file from *** Add File block', async () => {
38
- const patch = [
39
- '*** Begin Patch',
40
- '*** Add File: new-file.ts',
41
- '+export const version = 1',
42
- '+export const name = "test"',
43
- '*** End Patch',
44
- ].join('\n');
45
- const result = await applyV4aPatch(patch, tmpDir);
46
- expect(result).toContain('new-file.ts');
47
- const created = await readFile(join(tmpDir, 'new-file.ts'), 'utf-8');
48
- expect(created).toContain('export const version = 1');
49
- expect(created).toContain('export const name = "test"');
50
- });
51
- it('handles multiple hunks in one file', async () => {
52
- const filePath = join(tmpDir, 'multi.ts');
53
- await writeFile(filePath, 'a\nb\nc\nd\ne\n', 'utf-8');
54
- const patch = [
55
- '*** Begin Patch',
56
- '*** Update File: multi.ts',
57
- '@@ first hunk',
58
- '-a',
59
- '+A',
60
- '@@ second hunk',
61
- '-c',
62
- '+C',
63
- '*** End Patch',
64
- ].join('\n');
65
- const result = await applyV4aPatch(patch, tmpDir);
66
- expect(result).toContain('multi.ts');
67
- const updated = await readFile(filePath, 'utf-8');
68
- expect(updated).toContain('A');
69
- expect(updated).toContain('C');
70
- });
71
- it('throws error when file not found in update block', async () => {
72
- const patch = [
73
- '*** Begin Patch',
74
- '*** Update File: nonexistent.ts',
75
- '@@ hunk',
76
- '-old line',
77
- '+new line',
78
- '*** End Patch',
79
- ].join('\n');
80
- await expect(applyV4aPatch(patch, tmpDir)).rejects.toThrow();
81
- });
82
- it('throws error for malformed patch (missing Begin Patch)', async () => {
83
- const patch = '*** Update File: foo.ts\n@@ hunk\n-old\n+new\n*** End Patch';
84
- await expect(applyV4aPatch(patch, tmpDir)).rejects.toThrow(/Malformed patch/);
85
- });
86
- it('throws error for malformed patch (missing End Patch)', async () => {
87
- const patch = '*** Begin Patch\n*** Update File: foo.ts\n@@ hunk\n-old\n+new';
88
- await expect(applyV4aPatch(patch, tmpDir)).rejects.toThrow(/Malformed patch/);
89
- });
90
- it('handles patch with multiple files', async () => {
91
- const file1 = join(tmpDir, 'file1.ts');
92
- const file2 = join(tmpDir, 'file2.ts');
93
- await writeFile(file1, 'original1\n', 'utf-8');
94
- await writeFile(file2, 'original2\n', 'utf-8');
95
- const patch = [
96
- '*** Begin Patch',
97
- '*** Update File: file1.ts',
98
- '@@ hunk',
99
- '-original1',
100
- '+updated1',
101
- '*** Update File: file2.ts',
102
- '@@ hunk',
103
- '-original2',
104
- '+updated2',
105
- '*** End Patch',
106
- ].join('\n');
107
- const result = await applyV4aPatch(patch, tmpDir);
108
- expect(result).toContain('file1.ts');
109
- expect(result).toContain('file2.ts');
110
- const c1 = await readFile(file1, 'utf-8');
111
- const c2 = await readFile(file2, 'utf-8');
112
- expect(c1).toContain('updated1');
113
- expect(c2).toContain('updated2');
114
- });
115
- });
116
- //# sourceMappingURL=patch.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patch.test.js","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/patch.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,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AC9C,MAAM,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,CAAA;QAE9C,MAAM,KAAK,GAAG;YACZ,iBAAiB;YACjB,2BAA2B;YAC3B,SAAS;YACT,YAAY;YACZ,WAAW;YACX,2BAA2B;YAC3B,SAAS;YACT,YAAY;YACZ,WAAW;YACX,eAAe;SAChB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAEZ,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QACjD,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;QACpC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;QAEpC,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QACzC,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QACzC,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;QAChC,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;IAClC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Tests for provider profiles.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- export {};
6
- //# sourceMappingURL=profiles.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profiles.test.d.ts","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/profiles.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,125 +0,0 @@
1
- /**
2
- * Tests for provider profiles.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- import { describe, it, expect, vi } from 'vitest';
6
- import { AnthropicProfile, OpenAIProfile, GeminiProfile } from '../profiles.js';
7
- describe('AnthropicProfile', () => {
8
- const profile = new AnthropicProfile('claude-opus-4-5');
9
- it('tools() includes edit_file', () => {
10
- const names = profile.tools().map(t => t.name);
11
- expect(names).toContain('edit_file');
12
- });
13
- it('tools() includes all 5 shared tools', () => {
14
- const names = profile.tools().map(t => t.name);
15
- expect(names).toContain('read_file');
16
- expect(names).toContain('write_file');
17
- expect(names).toContain('shell');
18
- expect(names).toContain('grep');
19
- expect(names).toContain('glob');
20
- });
21
- it('shell timeout is 120,000ms', async () => {
22
- const shellTool = profile.tools().find(t => t.name === 'shell');
23
- expect(shellTool).toBeDefined();
24
- // Verify timeout by executing the shell tool and capturing the timeout arg
25
- const mockEnv = {
26
- workdir: '/tmp',
27
- exec: vi.fn().mockResolvedValue({ stdout: 'ok', stderr: '', exitCode: 0 }),
28
- };
29
- // Call without explicit timeout_ms — should use the profile's default (120_000)
30
- await shellTool.executor({ command: 'echo test' }, mockEnv);
31
- expect(mockEnv.exec).toHaveBeenCalledWith('echo test', 120_000);
32
- });
33
- it('provider_options() returns { max_tokens: 4096 }', () => {
34
- const opts = profile.provider_options();
35
- expect(opts).toEqual({ max_tokens: 4096 });
36
- });
37
- it('build_system_prompt() returns a non-empty string referencing tools', () => {
38
- const prompt = profile.build_system_prompt();
39
- expect(typeof prompt).toBe('string');
40
- expect(prompt.length).toBeGreaterThan(0);
41
- expect(prompt).toContain('edit_file');
42
- });
43
- });
44
- describe('OpenAIProfile', () => {
45
- const profile = new OpenAIProfile('gpt-4o');
46
- it('tools() includes apply_patch', () => {
47
- const names = profile.tools().map(t => t.name);
48
- expect(names).toContain('apply_patch');
49
- });
50
- it('tools() does NOT include edit_file', () => {
51
- const names = profile.tools().map(t => t.name);
52
- expect(names).not.toContain('edit_file');
53
- });
54
- it('tools() includes all shared tools plus apply_patch', () => {
55
- const names = profile.tools().map(t => t.name);
56
- expect(names).toContain('read_file');
57
- expect(names).toContain('shell');
58
- expect(names).toContain('grep');
59
- expect(names).toContain('glob');
60
- });
61
- it('provider_options() returns {}', () => {
62
- const opts = profile.provider_options();
63
- expect(opts).toEqual({});
64
- });
65
- });
66
- describe('GeminiProfile', () => {
67
- const profile = new GeminiProfile('gemini-2.0-flash');
68
- it('tools() includes read_many_files', () => {
69
- const names = profile.tools().map(t => t.name);
70
- expect(names).toContain('read_many_files');
71
- });
72
- it('tools() includes list_dir', () => {
73
- const names = profile.tools().map(t => t.name);
74
- expect(names).toContain('list_dir');
75
- });
76
- it('tools() includes edit_file', () => {
77
- const names = profile.tools().map(t => t.name);
78
- expect(names).toContain('edit_file');
79
- });
80
- it('tools() includes all 5 shared tools', () => {
81
- const names = profile.tools().map(t => t.name);
82
- expect(names).toContain('read_file');
83
- expect(names).toContain('write_file');
84
- expect(names).toContain('shell');
85
- expect(names).toContain('grep');
86
- expect(names).toContain('glob');
87
- });
88
- it('provider_options() returns {}', () => {
89
- expect(profile.provider_options()).toEqual({});
90
- });
91
- });
92
- describe('ProviderProfile interface conformance', () => {
93
- it('all profiles implement ProviderProfile fields', () => {
94
- const profiles = [
95
- new AnthropicProfile('claude-3-haiku'),
96
- new OpenAIProfile('gpt-4o'),
97
- new GeminiProfile('gemini-2.0-flash'),
98
- ];
99
- for (const p of profiles) {
100
- expect(typeof p.id).toBe('string');
101
- expect(typeof p.model).toBe('string');
102
- expect(typeof p.supports_streaming).toBe('boolean');
103
- expect(typeof p.context_window_size).toBe('number');
104
- expect(typeof p.supports_parallel_tool_calls).toBe('boolean');
105
- expect(typeof p.build_system_prompt()).toBe('string');
106
- expect(Array.isArray(p.tools())).toBe(true);
107
- expect(typeof p.provider_options()).toBe('object');
108
- }
109
- });
110
- it('profile ids are correct', () => {
111
- expect(new AnthropicProfile('x').id).toBe('anthropic');
112
- expect(new OpenAIProfile('x').id).toBe('openai');
113
- expect(new GeminiProfile('x').id).toBe('gemini');
114
- });
115
- it('Anthropic shell timeout is 120s (tools have correct config)', () => {
116
- const profile = new AnthropicProfile('claude-opus-4-5');
117
- const tools = profile.tools();
118
- // Anthropic uses 120_000ms timeout. The edit_file tool should be last
119
- const editFileTool = tools.find(t => t.name === 'edit_file');
120
- expect(editFileTool).toBeDefined();
121
- // Anthropic has 6 tools (5 shared + edit_file)
122
- expect(tools).toHaveLength(6);
123
- });
124
- });
125
- //# sourceMappingURL=profiles.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profiles.test.js","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/profiles.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAwB,MAAM,gBAAgB,CAAA;AAErG,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IAEvD,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAC9C,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAC9C,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QACrC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QAChC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,CAA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AAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Tests for ToolRegistry.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- export {};
6
- //# sourceMappingURL=registry.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.test.d.ts","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/registry.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,94 +0,0 @@
1
- /**
2
- * Tests for ToolRegistry.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- import { describe, it, expect, vi, beforeEach } from 'vitest';
6
- import { ToolRegistry } from '../registry.js';
7
- function makeEnv() {
8
- return {
9
- workdir: '/tmp',
10
- exec: vi.fn().mockResolvedValue({ stdout: '', stderr: '', exitCode: 0 }),
11
- };
12
- }
13
- function makeTool(overrides) {
14
- return {
15
- name: 'test_tool',
16
- description: 'A test tool',
17
- inputSchema: {
18
- type: 'object',
19
- properties: {
20
- input: { type: 'string' },
21
- },
22
- required: ['input'],
23
- },
24
- executor: vi.fn().mockResolvedValue('result'),
25
- ...overrides,
26
- };
27
- }
28
- describe('ToolRegistry', () => {
29
- let registry;
30
- beforeEach(() => {
31
- registry = new ToolRegistry();
32
- });
33
- it('execute success returns content with truncation applied', async () => {
34
- const longResult = 'x'.repeat(200);
35
- const tool = makeTool({
36
- name: 'truncate_tool',
37
- outputTruncation: 100,
38
- executor: vi.fn().mockResolvedValue(longResult),
39
- });
40
- registry.register(tool);
41
- const result = await registry.execute('truncate_tool', { input: 'test' }, makeEnv());
42
- expect(result.isError).toBe(false);
43
- expect(result.content).toBe('x'.repeat(100) + '\n[truncated]');
44
- });
45
- it('execute unknown tool returns isError result', async () => {
46
- const result = await registry.execute('nonexistent_tool', {}, makeEnv());
47
- expect(result.isError).toBe(true);
48
- expect(result.content).toContain('Unknown tool: nonexistent_tool');
49
- });
50
- it('schema validation failure returns isError result (consistent with other error paths)', async () => {
51
- const tool = makeTool({ name: 'strict_tool' });
52
- registry.register(tool);
53
- // Pass wrong type for 'input' (should be string, passing number)
54
- const result = await registry.execute('strict_tool', { input: 123 }, makeEnv());
55
- expect(result.isError).toBe(true);
56
- expect(result.content).toContain('Validation failed');
57
- });
58
- it('executor error returns isError result (no throw)', async () => {
59
- const tool = makeTool({
60
- name: 'error_tool',
61
- executor: vi.fn().mockRejectedValue(new Error('executor blew up')),
62
- });
63
- registry.register(tool);
64
- const result = await registry.execute('error_tool', { input: 'x' }, makeEnv());
65
- expect(result.isError).toBe(true);
66
- expect(result.content).toContain('executor blew up');
67
- });
68
- it('getDefinitions returns all registered tools', () => {
69
- const t1 = makeTool({ name: 'tool_a' });
70
- const t2 = makeTool({ name: 'tool_b' });
71
- registry.register(t1);
72
- registry.register(t2);
73
- const defs = registry.getDefinitions();
74
- expect(defs).toHaveLength(2);
75
- expect(defs.map(d => d.name)).toContain('tool_a');
76
- expect(defs.map(d => d.name)).toContain('tool_b');
77
- });
78
- it('get returns tool by name or undefined', () => {
79
- const tool = makeTool({ name: 'my_tool' });
80
- registry.register(tool);
81
- expect(registry.get('my_tool')).toBeDefined();
82
- expect(registry.get('missing')).toBeUndefined();
83
- });
84
- it('register overwrites duplicate tool name', async () => {
85
- const original = makeTool({ name: 'dup', executor: vi.fn().mockResolvedValue('original') });
86
- const replacement = makeTool({ name: 'dup', executor: vi.fn().mockResolvedValue('replacement') });
87
- registry.register(original);
88
- registry.register(replacement);
89
- const result = await registry.execute('dup', { input: 'test' }, makeEnv());
90
- expect(result.content).toBe('replacement');
91
- expect(registry.getDefinitions()).toHaveLength(1);
92
- });
93
- });
94
- //# sourceMappingURL=registry.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.test.js","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/registry.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,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tools.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- export {};
6
- //# sourceMappingURL=shared.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.test.d.ts","sourceRoot":"","sources":["../../../../src/agent/tools/__tests__/shared.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,131 +0,0 @@
1
- /**
2
- * Tests for shared tools.
3
- * Story 48-6: Provider-Aligned Tool Sets
4
- */
5
- import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
6
- import { readFile, rm, mkdir } from 'node:fs/promises';
7
- import { join } from 'node:path';
8
- import { tmpdir } from 'node:os';
9
- import { randomUUID } from 'node:crypto';
10
- import { createSharedTools } from '../shared.js';
11
- // Build a mock execution environment
12
- function makeEnv(tmpDir, execFn) {
13
- return {
14
- workdir: tmpDir,
15
- exec: execFn ?? vi.fn().mockResolvedValue({ stdout: '', stderr: '', exitCode: 0 }),
16
- };
17
- }
18
- function getTool(tools, name) {
19
- const tool = tools.find(t => t.name === name);
20
- if (!tool)
21
- throw new Error(`Tool '${name}' not found`);
22
- return tool;
23
- }
24
- describe('createSharedTools', () => {
25
- let tmpDir;
26
- beforeEach(async () => {
27
- tmpDir = join(tmpdir(), `test-${randomUUID()}`);
28
- await mkdir(tmpDir, { recursive: true });
29
- });
30
- afterEach(async () => {
31
- await rm(tmpDir, { recursive: true, force: true });
32
- });
33
- it('returns 5 tools with correct names', () => {
34
- const tools = createSharedTools();
35
- const names = tools.map(t => t.name);
36
- expect(names).toContain('read_file');
37
- expect(names).toContain('write_file');
38
- expect(names).toContain('shell');
39
- expect(names).toContain('grep');
40
- expect(names).toContain('glob');
41
- expect(tools).toHaveLength(5);
42
- });
43
- it('read_file returns line-numbered content', async () => {
44
- const filePath = join(tmpDir, 'test.txt');
45
- await mkdir(tmpDir, { recursive: true });
46
- const { writeFile } = await import('node:fs/promises');
47
- await writeFile(filePath, 'hello\nworld\nfoo', 'utf-8');
48
- const tools = createSharedTools();
49
- const tool = getTool(tools, 'read_file');
50
- const env = makeEnv(tmpDir);
51
- const result = await tool.executor({ path: filePath }, env);
52
- expect(result).toContain('1\t');
53
- expect(result).toContain('hello');
54
- expect(result).toContain('2\t');
55
- expect(result).toContain('world');
56
- expect(result).toContain('3\t');
57
- expect(result).toContain('foo');
58
- });
59
- it('read_file applies offset and limit', async () => {
60
- const filePath = join(tmpDir, 'lines.txt');
61
- const { writeFile } = await import('node:fs/promises');
62
- await writeFile(filePath, 'line1\nline2\nline3\nline4\nline5', 'utf-8');
63
- const tools = createSharedTools();
64
- const tool = getTool(tools, 'read_file');
65
- const env = makeEnv(tmpDir);
66
- const result = await tool.executor({ path: filePath, offset: 2, limit: 2 }, env);
67
- expect(result).toContain('line2');
68
- expect(result).toContain('line3');
69
- expect(result).not.toContain('line1');
70
- expect(result).not.toContain('line4');
71
- });
72
- it('write_file creates parent directories and writes content', async () => {
73
- const filePath = join(tmpDir, 'nested', 'dir', 'file.txt');
74
- const tools = createSharedTools();
75
- const tool = getTool(tools, 'write_file');
76
- const env = makeEnv(tmpDir);
77
- const result = await tool.executor({ path: filePath, content: 'hello world' }, env);
78
- expect(result).toMatch(/Wrote \d+ bytes to/);
79
- expect(result).toContain(filePath);
80
- const written = await readFile(filePath, 'utf-8');
81
- expect(written).toBe('hello world');
82
- });
83
- it('shell captures command output via env.exec', async () => {
84
- const tools = createSharedTools();
85
- const tool = getTool(tools, 'shell');
86
- const mockExec = vi.fn().mockResolvedValue({ stdout: 'hello from shell', stderr: '', exitCode: 0 });
87
- const env = makeEnv(tmpDir, mockExec);
88
- const result = await tool.executor({ command: 'echo hello' }, env);
89
- expect(result).toBe('hello from shell');
90
- expect(mockExec).toHaveBeenCalledWith('echo hello', expect.any(Number));
91
- });
92
- it('shell enforces timeout via env.exec', async () => {
93
- const tools = createSharedTools(5000);
94
- const tool = getTool(tools, 'shell');
95
- const mockExec = vi.fn().mockResolvedValue({ stdout: 'ok', stderr: '', exitCode: 0 });
96
- const env = makeEnv(tmpDir, mockExec);
97
- await tool.executor({ command: 'sleep 1', timeout_ms: 1000 }, env);
98
- expect(mockExec).toHaveBeenCalledWith('sleep 1', 1000);
99
- // Without explicit timeout_ms, uses shellTimeoutMs
100
- await tool.executor({ command: 'sleep 1' }, env);
101
- expect(mockExec).toHaveBeenCalledWith('sleep 1', 5000);
102
- });
103
- it('shell throws on non-zero exit code (marked isError by registry)', async () => {
104
- const tools = createSharedTools();
105
- const tool = getTool(tools, 'shell');
106
- const mockExec = vi.fn().mockResolvedValue({ stdout: '', stderr: 'command not found', exitCode: 127 });
107
- const env = makeEnv(tmpDir, mockExec);
108
- await expect(tool.executor({ command: 'bad-cmd' }, env)).rejects.toThrow('command not found');
109
- });
110
- it('grep returns matching lines (via mock exec simulating rg)', async () => {
111
- const tools = createSharedTools();
112
- const tool = getTool(tools, 'grep');
113
- const mockExec = vi.fn().mockResolvedValue({
114
- stdout: 'file.ts:10:const foo = "bar"\nfile.ts:20:// foo baz',
115
- stderr: '',
116
- exitCode: 0,
117
- });
118
- const env = makeEnv(tmpDir, mockExec);
119
- const result = await tool.executor({ pattern: 'foo', paths: ['file.ts'] }, env);
120
- expect(result).toContain('foo');
121
- });
122
- it('glob returns files matching pattern', async () => {
123
- const tools = createSharedTools();
124
- const tool = getTool(tools, 'glob');
125
- // The glob tool may use a real implementation; just verify it returns a string
126
- const env = makeEnv(tmpDir);
127
- const result = await tool.executor({ pattern: '*.ts' }, env);
128
- expect(typeof result).toBe('string');
129
- });
130
- });
131
- //# sourceMappingURL=shared.test.js.map