@nodetool-ai/cli 0.8.7 → 0.8.9-beta.1

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 (721) hide show
  1. package/README.md +61 -109
  2. package/dist/.nodetool-build-stamp +1 -1
  3. package/dist/chat.d.ts +3 -0
  4. package/dist/chat.d.ts.map +1 -0
  5. package/dist/chat.js +8 -0
  6. package/dist/chat.js.map +1 -0
  7. package/dist/index.d.ts +1 -12
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1 -231
  10. package/dist/index.js.map +1 -1
  11. package/dist/lean/commandFeatures.d.ts +3 -0
  12. package/dist/lean/commandFeatures.d.ts.map +1 -0
  13. package/dist/lean/commandFeatures.js +21 -0
  14. package/dist/lean/commandFeatures.js.map +1 -0
  15. package/dist/lean/errors.d.ts +19 -0
  16. package/dist/lean/errors.d.ts.map +1 -0
  17. package/dist/lean/errors.js +20 -0
  18. package/dist/lean/errors.js.map +1 -0
  19. package/dist/lean/program.d.ts +12 -0
  20. package/dist/lean/program.d.ts.map +1 -0
  21. package/dist/lean/program.js +398 -0
  22. package/dist/lean/program.js.map +1 -0
  23. package/dist/nodetool.js +6 -29
  24. package/dist/nodetool.js.map +1 -1
  25. package/package.json +14 -67
  26. package/dist/ExecutionTree.d.ts +0 -20
  27. package/dist/ExecutionTree.d.ts.map +0 -1
  28. package/dist/ExecutionTree.js +0 -100
  29. package/dist/ExecutionTree.js.map +0 -1
  30. package/dist/affected/affected.d.ts +0 -48
  31. package/dist/affected/affected.d.ts.map +0 -1
  32. package/dist/affected/affected.js +0 -167
  33. package/dist/affected/affected.js.map +0 -1
  34. package/dist/agent-toolbelt.d.ts +0 -15
  35. package/dist/agent-toolbelt.d.ts.map +0 -1
  36. package/dist/agent-toolbelt.js +0 -28
  37. package/dist/agent-toolbelt.js.map +0 -1
  38. package/dist/api-client.d.ts +0 -12
  39. package/dist/api-client.d.ts.map +0 -1
  40. package/dist/api-client.js +0 -21
  41. package/dist/api-client.js.map +0 -1
  42. package/dist/app-build/bundle.d.ts +0 -15
  43. package/dist/app-build/bundle.d.ts.map +0 -1
  44. package/dist/app-build/bundle.js +0 -45
  45. package/dist/app-build/bundle.js.map +0 -1
  46. package/dist/app-build/watch.d.ts +0 -13
  47. package/dist/app-build/watch.d.ts.map +0 -1
  48. package/dist/app-build/watch.js +0 -25
  49. package/dist/app-build/watch.js.map +0 -1
  50. package/dist/app-debug/app-target.d.ts +0 -14
  51. package/dist/app-debug/app-target.d.ts.map +0 -1
  52. package/dist/app-debug/app-target.js +0 -120
  53. package/dist/app-debug/app-target.js.map +0 -1
  54. package/dist/app-debug/harness.d.ts +0 -29
  55. package/dist/app-debug/harness.d.ts.map +0 -1
  56. package/dist/app-debug/harness.js +0 -116
  57. package/dist/app-debug/harness.js.map +0 -1
  58. package/dist/app-debug/index.d.ts +0 -12
  59. package/dist/app-debug/index.d.ts.map +0 -1
  60. package/dist/app-debug/index.js +0 -9
  61. package/dist/app-debug/index.js.map +0 -1
  62. package/dist/app.d.ts +0 -40
  63. package/dist/app.d.ts.map +0 -1
  64. package/dist/app.js +0 -1070
  65. package/dist/app.js.map +0 -1
  66. package/dist/bash-tool.d.ts +0 -13
  67. package/dist/bash-tool.d.ts.map +0 -1
  68. package/dist/bash-tool.js +0 -85
  69. package/dist/bash-tool.js.map +0 -1
  70. package/dist/chat-codeact.d.ts +0 -93
  71. package/dist/chat-codeact.d.ts.map +0 -1
  72. package/dist/chat-codeact.js +0 -179
  73. package/dist/chat-codeact.js.map +0 -1
  74. package/dist/chat-context.d.ts +0 -18
  75. package/dist/chat-context.d.ts.map +0 -1
  76. package/dist/chat-context.js +0 -32
  77. package/dist/chat-context.js.map +0 -1
  78. package/dist/chat-media.d.ts +0 -3
  79. package/dist/chat-media.d.ts.map +0 -1
  80. package/dist/chat-media.js +0 -46
  81. package/dist/chat-media.js.map +0 -1
  82. package/dist/chat-prompts.d.ts +0 -20
  83. package/dist/chat-prompts.d.ts.map +0 -1
  84. package/dist/chat-prompts.js +0 -42
  85. package/dist/chat-prompts.js.map +0 -1
  86. package/dist/chat-sessions.d.ts +0 -25
  87. package/dist/chat-sessions.d.ts.map +0 -1
  88. package/dist/chat-sessions.js +0 -153
  89. package/dist/chat-sessions.js.map +0 -1
  90. package/dist/child-exit.d.ts +0 -3
  91. package/dist/child-exit.d.ts.map +0 -1
  92. package/dist/child-exit.js +0 -17
  93. package/dist/child-exit.js.map +0 -1
  94. package/dist/command-errors.d.ts +0 -8
  95. package/dist/command-errors.d.ts.map +0 -1
  96. package/dist/command-errors.js +0 -49
  97. package/dist/command-errors.js.map +0 -1
  98. package/dist/commands/__tests__/jtbd.test.d.ts +0 -2
  99. package/dist/commands/__tests__/jtbd.test.d.ts.map +0 -1
  100. package/dist/commands/__tests__/jtbd.test.js +0 -120
  101. package/dist/commands/__tests__/jtbd.test.js.map +0 -1
  102. package/dist/commands/__tests__/runtime.test.d.ts +0 -2
  103. package/dist/commands/__tests__/runtime.test.d.ts.map +0 -1
  104. package/dist/commands/__tests__/runtime.test.js +0 -129
  105. package/dist/commands/__tests__/runtime.test.js.map +0 -1
  106. package/dist/commands/__tests__/timeline-render-audio.test.d.ts +0 -2
  107. package/dist/commands/__tests__/timeline-render-audio.test.d.ts.map +0 -1
  108. package/dist/commands/__tests__/timeline-render-audio.test.js +0 -53
  109. package/dist/commands/__tests__/timeline-render-audio.test.js.map +0 -1
  110. package/dist/commands/__tests__/timeline-render-completeness.test.d.ts +0 -2
  111. package/dist/commands/__tests__/timeline-render-completeness.test.d.ts.map +0 -1
  112. package/dist/commands/__tests__/timeline-render-completeness.test.js +0 -117
  113. package/dist/commands/__tests__/timeline-render-completeness.test.js.map +0 -1
  114. package/dist/commands/__tests__/timeline-render.test.d.ts +0 -2
  115. package/dist/commands/__tests__/timeline-render.test.d.ts.map +0 -1
  116. package/dist/commands/__tests__/timeline-render.test.js +0 -115
  117. package/dist/commands/__tests__/timeline-render.test.js.map +0 -1
  118. package/dist/commands/__tests__/timeline-score.test.d.ts +0 -2
  119. package/dist/commands/__tests__/timeline-score.test.d.ts.map +0 -1
  120. package/dist/commands/__tests__/timeline-score.test.js +0 -100
  121. package/dist/commands/__tests__/timeline-score.test.js.map +0 -1
  122. package/dist/commands/affected.d.ts +0 -9
  123. package/dist/commands/affected.d.ts.map +0 -1
  124. package/dist/commands/affected.js +0 -127
  125. package/dist/commands/affected.js.map +0 -1
  126. package/dist/commands/agent.d.ts +0 -33
  127. package/dist/commands/agent.d.ts.map +0 -1
  128. package/dist/commands/agent.js +0 -514
  129. package/dist/commands/agent.js.map +0 -1
  130. package/dist/commands/app.d.ts +0 -3
  131. package/dist/commands/app.d.ts.map +0 -1
  132. package/dist/commands/app.js +0 -406
  133. package/dist/commands/app.js.map +0 -1
  134. package/dist/commands/apps.d.ts +0 -15
  135. package/dist/commands/apps.d.ts.map +0 -1
  136. package/dist/commands/apps.js +0 -274
  137. package/dist/commands/apps.js.map +0 -1
  138. package/dist/commands/auth.d.ts +0 -12
  139. package/dist/commands/auth.d.ts.map +0 -1
  140. package/dist/commands/auth.js +0 -154
  141. package/dist/commands/auth.js.map +0 -1
  142. package/dist/commands/authorized-pack-install.d.ts +0 -7
  143. package/dist/commands/authorized-pack-install.d.ts.map +0 -1
  144. package/dist/commands/authorized-pack-install.js +0 -20
  145. package/dist/commands/authorized-pack-install.js.map +0 -1
  146. package/dist/commands/collections.d.ts +0 -10
  147. package/dist/commands/collections.d.ts.map +0 -1
  148. package/dist/commands/collections.js +0 -257
  149. package/dist/commands/collections.js.map +0 -1
  150. package/dist/commands/costs.d.ts +0 -15
  151. package/dist/commands/costs.d.ts.map +0 -1
  152. package/dist/commands/costs.js +0 -201
  153. package/dist/commands/costs.js.map +0 -1
  154. package/dist/commands/db.d.ts +0 -3
  155. package/dist/commands/db.d.ts.map +0 -1
  156. package/dist/commands/db.js +0 -176
  157. package/dist/commands/db.js.map +0 -1
  158. package/dist/commands/debug-summary-output.d.ts +0 -22
  159. package/dist/commands/debug-summary-output.d.ts.map +0 -1
  160. package/dist/commands/debug-summary-output.js +0 -28
  161. package/dist/commands/debug-summary-output.js.map +0 -1
  162. package/dist/commands/debug.d.ts +0 -13
  163. package/dist/commands/debug.d.ts.map +0 -1
  164. package/dist/commands/debug.js +0 -150
  165. package/dist/commands/debug.js.map +0 -1
  166. package/dist/commands/deploy-helpers.d.ts +0 -85
  167. package/dist/commands/deploy-helpers.d.ts.map +0 -1
  168. package/dist/commands/deploy-helpers.js +0 -217
  169. package/dist/commands/deploy-helpers.js.map +0 -1
  170. package/dist/commands/deploy.d.ts +0 -7
  171. package/dist/commands/deploy.d.ts.map +0 -1
  172. package/dist/commands/deploy.js +0 -449
  173. package/dist/commands/deploy.js.map +0 -1
  174. package/dist/commands/errors.d.ts +0 -11
  175. package/dist/commands/errors.d.ts.map +0 -1
  176. package/dist/commands/errors.js +0 -177
  177. package/dist/commands/errors.js.map +0 -1
  178. package/dist/commands/eval.d.ts +0 -152
  179. package/dist/commands/eval.d.ts.map +0 -1
  180. package/dist/commands/eval.js +0 -691
  181. package/dist/commands/eval.js.map +0 -1
  182. package/dist/commands/extension.d.ts +0 -12
  183. package/dist/commands/extension.d.ts.map +0 -1
  184. package/dist/commands/extension.js +0 -30
  185. package/dist/commands/extension.js.map +0 -1
  186. package/dist/commands/game-benchmark.d.ts +0 -48
  187. package/dist/commands/game-benchmark.d.ts.map +0 -1
  188. package/dist/commands/game-benchmark.js +0 -108
  189. package/dist/commands/game-benchmark.js.map +0 -1
  190. package/dist/commands/game-smoke.d.ts +0 -3
  191. package/dist/commands/game-smoke.d.ts.map +0 -1
  192. package/dist/commands/game-smoke.js +0 -23
  193. package/dist/commands/game-smoke.js.map +0 -1
  194. package/dist/commands/game.d.ts +0 -4
  195. package/dist/commands/game.d.ts.map +0 -1
  196. package/dist/commands/game.js +0 -856
  197. package/dist/commands/game.js.map +0 -1
  198. package/dist/commands/generate.d.ts +0 -17
  199. package/dist/commands/generate.d.ts.map +0 -1
  200. package/dist/commands/generate.js +0 -326
  201. package/dist/commands/generate.js.map +0 -1
  202. package/dist/commands/generations.d.ts +0 -17
  203. package/dist/commands/generations.d.ts.map +0 -1
  204. package/dist/commands/generations.js +0 -408
  205. package/dist/commands/generations.js.map +0 -1
  206. package/dist/commands/harness.d.ts +0 -90
  207. package/dist/commands/harness.d.ts.map +0 -1
  208. package/dist/commands/harness.js +0 -855
  209. package/dist/commands/harness.js.map +0 -1
  210. package/dist/commands/install-missing-packs.d.ts +0 -21
  211. package/dist/commands/install-missing-packs.d.ts.map +0 -1
  212. package/dist/commands/install-missing-packs.js +0 -48
  213. package/dist/commands/install-missing-packs.js.map +0 -1
  214. package/dist/commands/js-script-validation-output.d.ts +0 -7
  215. package/dist/commands/js-script-validation-output.d.ts.map +0 -1
  216. package/dist/commands/js-script-validation-output.js +0 -5
  217. package/dist/commands/js-script-validation-output.js.map +0 -1
  218. package/dist/commands/js-script-versions.d.ts +0 -53
  219. package/dist/commands/js-script-versions.d.ts.map +0 -1
  220. package/dist/commands/js-script-versions.js +0 -89
  221. package/dist/commands/js-script-versions.js.map +0 -1
  222. package/dist/commands/js-script.d.ts +0 -29
  223. package/dist/commands/js-script.d.ts.map +0 -1
  224. package/dist/commands/js-script.js +0 -240
  225. package/dist/commands/js-script.js.map +0 -1
  226. package/dist/commands/jtbd.d.ts +0 -38
  227. package/dist/commands/jtbd.d.ts.map +0 -1
  228. package/dist/commands/jtbd.js +0 -261
  229. package/dist/commands/jtbd.js.map +0 -1
  230. package/dist/commands/local-db.d.ts +0 -16
  231. package/dist/commands/local-db.d.ts.map +0 -1
  232. package/dist/commands/local-db.js +0 -33
  233. package/dist/commands/local-db.js.map +0 -1
  234. package/dist/commands/mcp.d.ts +0 -21
  235. package/dist/commands/mcp.d.ts.map +0 -1
  236. package/dist/commands/mcp.js +0 -166
  237. package/dist/commands/mcp.js.map +0 -1
  238. package/dist/commands/migrate-code-inputs.d.ts +0 -24
  239. package/dist/commands/migrate-code-inputs.d.ts.map +0 -1
  240. package/dist/commands/migrate-code-inputs.js +0 -120
  241. package/dist/commands/migrate-code-inputs.js.map +0 -1
  242. package/dist/commands/models-hf.d.ts +0 -9
  243. package/dist/commands/models-hf.d.ts.map +0 -1
  244. package/dist/commands/models-hf.js +0 -235
  245. package/dist/commands/models-hf.js.map +0 -1
  246. package/dist/commands/models-recommended.d.ts +0 -10
  247. package/dist/commands/models-recommended.d.ts.map +0 -1
  248. package/dist/commands/models-recommended.js +0 -120
  249. package/dist/commands/models-recommended.js.map +0 -1
  250. package/dist/commands/node.d.ts +0 -10
  251. package/dist/commands/node.d.ts.map +0 -1
  252. package/dist/commands/node.js +0 -130
  253. package/dist/commands/node.js.map +0 -1
  254. package/dist/commands/output.d.ts +0 -32
  255. package/dist/commands/output.d.ts.map +0 -1
  256. package/dist/commands/output.js +0 -150
  257. package/dist/commands/output.js.map +0 -1
  258. package/dist/commands/pack-install-authorization.d.ts +0 -40
  259. package/dist/commands/pack-install-authorization.d.ts.map +0 -1
  260. package/dist/commands/pack-install-authorization.js +0 -131
  261. package/dist/commands/pack-install-authorization.js.map +0 -1
  262. package/dist/commands/pack-management.d.ts +0 -26
  263. package/dist/commands/pack-management.d.ts.map +0 -1
  264. package/dist/commands/pack-management.js +0 -74
  265. package/dist/commands/pack-management.js.map +0 -1
  266. package/dist/commands/package-helpers.d.ts +0 -8
  267. package/dist/commands/package-helpers.d.ts.map +0 -1
  268. package/dist/commands/package-helpers.js +0 -53
  269. package/dist/commands/package-helpers.js.map +0 -1
  270. package/dist/commands/package.d.ts +0 -3
  271. package/dist/commands/package.d.ts.map +0 -1
  272. package/dist/commands/package.js +0 -258
  273. package/dist/commands/package.js.map +0 -1
  274. package/dist/commands/packs.d.ts +0 -14
  275. package/dist/commands/packs.d.ts.map +0 -1
  276. package/dist/commands/packs.js +0 -65
  277. package/dist/commands/packs.js.map +0 -1
  278. package/dist/commands/projects.d.ts +0 -11
  279. package/dist/commands/projects.d.ts.map +0 -1
  280. package/dist/commands/projects.js +0 -145
  281. package/dist/commands/projects.js.map +0 -1
  282. package/dist/commands/reliability.d.ts +0 -14
  283. package/dist/commands/reliability.d.ts.map +0 -1
  284. package/dist/commands/reliability.js +0 -80
  285. package/dist/commands/reliability.js.map +0 -1
  286. package/dist/commands/resource-read.d.ts +0 -28
  287. package/dist/commands/resource-read.d.ts.map +0 -1
  288. package/dist/commands/resource-read.js +0 -314
  289. package/dist/commands/resource-read.js.map +0 -1
  290. package/dist/commands/runs.d.ts +0 -7
  291. package/dist/commands/runs.d.ts.map +0 -1
  292. package/dist/commands/runs.js +0 -302
  293. package/dist/commands/runs.js.map +0 -1
  294. package/dist/commands/runtime.d.ts +0 -3
  295. package/dist/commands/runtime.d.ts.map +0 -1
  296. package/dist/commands/runtime.js +0 -169
  297. package/dist/commands/runtime.js.map +0 -1
  298. package/dist/commands/sketch-render.d.ts +0 -46
  299. package/dist/commands/sketch-render.d.ts.map +0 -1
  300. package/dist/commands/sketch-render.js +0 -131
  301. package/dist/commands/sketch-render.js.map +0 -1
  302. package/dist/commands/sketch-validation-output.d.ts +0 -7
  303. package/dist/commands/sketch-validation-output.d.ts.map +0 -1
  304. package/dist/commands/sketch-validation-output.js +0 -5
  305. package/dist/commands/sketch-validation-output.js.map +0 -1
  306. package/dist/commands/sketch-versions.d.ts +0 -66
  307. package/dist/commands/sketch-versions.d.ts.map +0 -1
  308. package/dist/commands/sketch-versions.js +0 -108
  309. package/dist/commands/sketch-versions.js.map +0 -1
  310. package/dist/commands/sketch.d.ts +0 -22
  311. package/dist/commands/sketch.d.ts.map +0 -1
  312. package/dist/commands/sketch.js +0 -101
  313. package/dist/commands/sketch.js.map +0 -1
  314. package/dist/commands/storage.d.ts +0 -24
  315. package/dist/commands/storage.d.ts.map +0 -1
  316. package/dist/commands/storage.js +0 -112
  317. package/dist/commands/storage.js.map +0 -1
  318. package/dist/commands/telegram.d.ts +0 -11
  319. package/dist/commands/telegram.d.ts.map +0 -1
  320. package/dist/commands/telegram.js +0 -66
  321. package/dist/commands/telegram.js.map +0 -1
  322. package/dist/commands/telemetry.d.ts +0 -24
  323. package/dist/commands/telemetry.d.ts.map +0 -1
  324. package/dist/commands/telemetry.js +0 -116
  325. package/dist/commands/telemetry.js.map +0 -1
  326. package/dist/commands/timeline-render.d.ts +0 -75
  327. package/dist/commands/timeline-render.d.ts.map +0 -1
  328. package/dist/commands/timeline-render.js +0 -465
  329. package/dist/commands/timeline-render.js.map +0 -1
  330. package/dist/commands/timeline-score.d.ts +0 -16
  331. package/dist/commands/timeline-score.d.ts.map +0 -1
  332. package/dist/commands/timeline-score.js +0 -89
  333. package/dist/commands/timeline-score.js.map +0 -1
  334. package/dist/commands/timeline-validation-output.d.ts +0 -7
  335. package/dist/commands/timeline-validation-output.d.ts.map +0 -1
  336. package/dist/commands/timeline-validation-output.js +0 -9
  337. package/dist/commands/timeline-validation-output.js.map +0 -1
  338. package/dist/commands/timeline-versions.d.ts +0 -72
  339. package/dist/commands/timeline-versions.d.ts.map +0 -1
  340. package/dist/commands/timeline-versions.js +0 -108
  341. package/dist/commands/timeline-versions.js.map +0 -1
  342. package/dist/commands/timeline.d.ts +0 -22
  343. package/dist/commands/timeline.d.ts.map +0 -1
  344. package/dist/commands/timeline.js +0 -103
  345. package/dist/commands/timeline.js.map +0 -1
  346. package/dist/commands/tools.d.ts +0 -11
  347. package/dist/commands/tools.d.ts.map +0 -1
  348. package/dist/commands/tools.js +0 -206
  349. package/dist/commands/tools.js.map +0 -1
  350. package/dist/commands/validate.d.ts +0 -24
  351. package/dist/commands/validate.d.ts.map +0 -1
  352. package/dist/commands/validate.js +0 -132
  353. package/dist/commands/validate.js.map +0 -1
  354. package/dist/commands/validation-output.d.ts +0 -25
  355. package/dist/commands/validation-output.d.ts.map +0 -1
  356. package/dist/commands/validation-output.js +0 -29
  357. package/dist/commands/validation-output.js.map +0 -1
  358. package/dist/commands/version-commands.d.ts +0 -91
  359. package/dist/commands/version-commands.d.ts.map +0 -1
  360. package/dist/commands/version-commands.js +0 -222
  361. package/dist/commands/version-commands.js.map +0 -1
  362. package/dist/commands/worker-models.d.ts +0 -13
  363. package/dist/commands/worker-models.d.ts.map +0 -1
  364. package/dist/commands/worker-models.js +0 -207
  365. package/dist/commands/worker-models.js.map +0 -1
  366. package/dist/commands/worker.d.ts +0 -23
  367. package/dist/commands/worker.d.ts.map +0 -1
  368. package/dist/commands/worker.js +0 -374
  369. package/dist/commands/worker.js.map +0 -1
  370. package/dist/debug/browser-runner.d.ts +0 -21
  371. package/dist/debug/browser-runner.d.ts.map +0 -1
  372. package/dist/debug/browser-runner.js +0 -196
  373. package/dist/debug/browser-runner.js.map +0 -1
  374. package/dist/debug/collector.d.ts +0 -9
  375. package/dist/debug/collector.d.ts.map +0 -1
  376. package/dist/debug/collector.js +0 -9
  377. package/dist/debug/collector.js.map +0 -1
  378. package/dist/debug/diff.d.ts +0 -48
  379. package/dist/debug/diff.d.ts.map +0 -1
  380. package/dist/debug/diff.js +0 -68
  381. package/dist/debug/diff.js.map +0 -1
  382. package/dist/debug/harness.d.ts +0 -11
  383. package/dist/debug/harness.d.ts.map +0 -1
  384. package/dist/debug/harness.js +0 -103
  385. package/dist/debug/harness.js.map +0 -1
  386. package/dist/debug/index.d.ts +0 -17
  387. package/dist/debug/index.d.ts.map +0 -1
  388. package/dist/debug/index.js +0 -16
  389. package/dist/debug/index.js.map +0 -1
  390. package/dist/debug/markdown.d.ts +0 -3
  391. package/dist/debug/markdown.d.ts.map +0 -1
  392. package/dist/debug/markdown.js +0 -127
  393. package/dist/debug/markdown.js.map +0 -1
  394. package/dist/debug/server-runner.d.ts +0 -24
  395. package/dist/debug/server-runner.d.ts.map +0 -1
  396. package/dist/debug/server-runner.js +0 -211
  397. package/dist/debug/server-runner.js.map +0 -1
  398. package/dist/debug/target.d.ts +0 -34
  399. package/dist/debug/target.d.ts.map +0 -1
  400. package/dist/debug/target.js +0 -95
  401. package/dist/debug/target.js.map +0 -1
  402. package/dist/debug/trace.d.ts +0 -30
  403. package/dist/debug/trace.d.ts.map +0 -1
  404. package/dist/debug/trace.js +0 -87
  405. package/dist/debug/trace.js.map +0 -1
  406. package/dist/debug/types.d.ts +0 -82
  407. package/dist/debug/types.d.ts.map +0 -1
  408. package/dist/debug/types.js +0 -13
  409. package/dist/debug/types.js.map +0 -1
  410. package/dist/debug/verdict.d.ts +0 -3
  411. package/dist/debug/verdict.d.ts.map +0 -1
  412. package/dist/debug/verdict.js +0 -78
  413. package/dist/debug/verdict.js.map +0 -1
  414. package/dist/debug/watch.d.ts +0 -23
  415. package/dist/debug/watch.d.ts.map +0 -1
  416. package/dist/debug/watch.js +0 -68
  417. package/dist/debug/watch.js.map +0 -1
  418. package/dist/debug-bundle.d.ts +0 -12
  419. package/dist/debug-bundle.d.ts.map +0 -1
  420. package/dist/debug-bundle.js +0 -23
  421. package/dist/debug-bundle.js.map +0 -1
  422. package/dist/diagnose.d.ts +0 -139
  423. package/dist/diagnose.d.ts.map +0 -1
  424. package/dist/diagnose.js +0 -418
  425. package/dist/diagnose.js.map +0 -1
  426. package/dist/document-json.d.ts +0 -11
  427. package/dist/document-json.d.ts.map +0 -1
  428. package/dist/document-json.js +0 -27
  429. package/dist/document-json.js.map +0 -1
  430. package/dist/evals/graph-runner.d.ts +0 -8
  431. package/dist/evals/graph-runner.d.ts.map +0 -1
  432. package/dist/evals/graph-runner.js +0 -136
  433. package/dist/evals/graph-runner.js.map +0 -1
  434. package/dist/harness/capability-coverage.d.ts +0 -161
  435. package/dist/harness/capability-coverage.d.ts.map +0 -1
  436. package/dist/harness/capability-coverage.js +0 -266
  437. package/dist/harness/capability-coverage.js.map +0 -1
  438. package/dist/harness/capability-table.d.ts +0 -17
  439. package/dist/harness/capability-table.d.ts.map +0 -1
  440. package/dist/harness/capability-table.js +0 -3925
  441. package/dist/harness/capability-table.js.map +0 -1
  442. package/dist/harness/changed-files.d.ts +0 -20
  443. package/dist/harness/changed-files.d.ts.map +0 -1
  444. package/dist/harness/changed-files.js +0 -90
  445. package/dist/harness/changed-files.js.map +0 -1
  446. package/dist/harness/declared-capabilities.d.ts +0 -12
  447. package/dist/harness/declared-capabilities.d.ts.map +0 -1
  448. package/dist/harness/declared-capabilities.js +0 -21
  449. package/dist/harness/declared-capabilities.js.map +0 -1
  450. package/dist/harness/registry.d.ts +0 -190
  451. package/dist/harness/registry.d.ts.map +0 -1
  452. package/dist/harness/registry.js +0 -2285
  453. package/dist/harness/registry.js.map +0 -1
  454. package/dist/install-lock.d.ts +0 -12
  455. package/dist/install-lock.d.ts.map +0 -1
  456. package/dist/install-lock.js +0 -139
  457. package/dist/install-lock.js.map +0 -1
  458. package/dist/interaction-script.d.ts +0 -40
  459. package/dist/interaction-script.d.ts.map +0 -1
  460. package/dist/interaction-script.js +0 -104
  461. package/dist/interaction-script.js.map +0 -1
  462. package/dist/js-script-debug/harness.d.ts +0 -146
  463. package/dist/js-script-debug/harness.d.ts.map +0 -1
  464. package/dist/js-script-debug/harness.js +0 -220
  465. package/dist/js-script-debug/harness.js.map +0 -1
  466. package/dist/js-script-debug/index.d.ts +0 -9
  467. package/dist/js-script-debug/index.d.ts.map +0 -1
  468. package/dist/js-script-debug/index.js +0 -9
  469. package/dist/js-script-debug/index.js.map +0 -1
  470. package/dist/js-script-debug/interactions.d.ts +0 -19
  471. package/dist/js-script-debug/interactions.d.ts.map +0 -1
  472. package/dist/js-script-debug/interactions.js +0 -17
  473. package/dist/js-script-debug/interactions.js.map +0 -1
  474. package/dist/js-script-debug/target.d.ts +0 -20
  475. package/dist/js-script-debug/target.d.ts.map +0 -1
  476. package/dist/js-script-debug/target.js +0 -55
  477. package/dist/js-script-debug/target.js.map +0 -1
  478. package/dist/local-model-interfaces.d.ts +0 -20
  479. package/dist/local-model-interfaces.d.ts.map +0 -1
  480. package/dist/local-model-interfaces.js +0 -41
  481. package/dist/local-model-interfaces.js.map +0 -1
  482. package/dist/local-secrets.d.ts +0 -3
  483. package/dist/local-secrets.d.ts.map +0 -1
  484. package/dist/local-secrets.js +0 -16
  485. package/dist/local-secrets.js.map +0 -1
  486. package/dist/markdown.d.ts +0 -9
  487. package/dist/markdown.d.ts.map +0 -1
  488. package/dist/markdown.js +0 -53
  489. package/dist/markdown.js.map +0 -1
  490. package/dist/node/run-node.d.ts +0 -31
  491. package/dist/node/run-node.d.ts.map +0 -1
  492. package/dist/node/run-node.js +0 -92
  493. package/dist/node/run-node.js.map +0 -1
  494. package/dist/node-registry.d.ts +0 -29
  495. package/dist/node-registry.d.ts.map +0 -1
  496. package/dist/node-registry.js +0 -38
  497. package/dist/node-registry.js.map +0 -1
  498. package/dist/nodetool-main.d.ts +0 -15
  499. package/dist/nodetool-main.d.ts.map +0 -1
  500. package/dist/nodetool-main.js +0 -1456
  501. package/dist/nodetool-main.js.map +0 -1
  502. package/dist/npm-runner.d.ts +0 -23
  503. package/dist/npm-runner.d.ts.map +0 -1
  504. package/dist/npm-runner.js +0 -160
  505. package/dist/npm-runner.js.map +0 -1
  506. package/dist/numeric-options.d.ts +0 -22
  507. package/dist/numeric-options.d.ts.map +0 -1
  508. package/dist/numeric-options.js +0 -45
  509. package/dist/numeric-options.js.map +0 -1
  510. package/dist/optional-node-root.d.ts +0 -10
  511. package/dist/optional-node-root.d.ts.map +0 -1
  512. package/dist/optional-node-root.js +0 -26
  513. package/dist/optional-node-root.js.map +0 -1
  514. package/dist/package-assets.d.ts +0 -8
  515. package/dist/package-assets.d.ts.map +0 -1
  516. package/dist/package-assets.js +0 -21
  517. package/dist/package-assets.js.map +0 -1
  518. package/dist/packs/command-service.d.ts +0 -14
  519. package/dist/packs/command-service.d.ts.map +0 -1
  520. package/dist/packs/command-service.js +0 -195
  521. package/dist/packs/command-service.js.map +0 -1
  522. package/dist/packs/doctor-lock.d.ts +0 -8
  523. package/dist/packs/doctor-lock.d.ts.map +0 -1
  524. package/dist/packs/doctor-lock.js +0 -50
  525. package/dist/packs/doctor-lock.js.map +0 -1
  526. package/dist/packs/doctor.d.ts +0 -25
  527. package/dist/packs/doctor.d.ts.map +0 -1
  528. package/dist/packs/doctor.js +0 -12
  529. package/dist/packs/doctor.js.map +0 -1
  530. package/dist/packs/global-bootstrap.d.ts +0 -11
  531. package/dist/packs/global-bootstrap.d.ts.map +0 -1
  532. package/dist/packs/global-bootstrap.js +0 -72
  533. package/dist/packs/global-bootstrap.js.map +0 -1
  534. package/dist/packs/host.d.ts +0 -17
  535. package/dist/packs/host.d.ts.map +0 -1
  536. package/dist/packs/host.js +0 -79
  537. package/dist/packs/host.js.map +0 -1
  538. package/dist/packs/install-manifests.d.ts +0 -2
  539. package/dist/packs/install-manifests.d.ts.map +0 -1
  540. package/dist/packs/install-manifests.js +0 -30
  541. package/dist/packs/install-manifests.js.map +0 -1
  542. package/dist/packs/install-process.d.ts +0 -4
  543. package/dist/packs/install-process.d.ts.map +0 -1
  544. package/dist/packs/install-process.js +0 -11
  545. package/dist/packs/install-process.js.map +0 -1
  546. package/dist/packs/install-selection.d.ts +0 -39
  547. package/dist/packs/install-selection.d.ts.map +0 -1
  548. package/dist/packs/install-selection.js +0 -67
  549. package/dist/packs/install-selection.js.map +0 -1
  550. package/dist/packs/install-state.d.ts +0 -21
  551. package/dist/packs/install-state.d.ts.map +0 -1
  552. package/dist/packs/install-state.js +0 -44
  553. package/dist/packs/install-state.js.map +0 -1
  554. package/dist/packs/install-tree.d.ts +0 -35
  555. package/dist/packs/install-tree.d.ts.map +0 -1
  556. package/dist/packs/install-tree.js +0 -253
  557. package/dist/packs/install-tree.js.map +0 -1
  558. package/dist/packs/install-verification.d.ts +0 -12
  559. package/dist/packs/install-verification.d.ts.map +0 -1
  560. package/dist/packs/install-verification.js +0 -76
  561. package/dist/packs/install-verification.js.map +0 -1
  562. package/dist/packs/installed.d.ts +0 -36
  563. package/dist/packs/installed.d.ts.map +0 -1
  564. package/dist/packs/installed.js +0 -87
  565. package/dist/packs/installed.js.map +0 -1
  566. package/dist/packs/installer-load-check.d.ts +0 -4
  567. package/dist/packs/installer-load-check.d.ts.map +0 -1
  568. package/dist/packs/installer-load-check.js +0 -52
  569. package/dist/packs/installer-load-check.js.map +0 -1
  570. package/dist/packs/installer.d.ts +0 -16
  571. package/dist/packs/installer.d.ts.map +0 -1
  572. package/dist/packs/installer.js +0 -142
  573. package/dist/packs/installer.js.map +0 -1
  574. package/dist/packs/management.d.ts +0 -51
  575. package/dist/packs/management.d.ts.map +0 -1
  576. package/dist/packs/management.js +0 -81
  577. package/dist/packs/management.js.map +0 -1
  578. package/dist/packs/mode.d.ts +0 -42
  579. package/dist/packs/mode.d.ts.map +0 -1
  580. package/dist/packs/mode.js +0 -215
  581. package/dist/packs/mode.js.map +0 -1
  582. package/dist/packs/owned-replay-plan.d.ts +0 -5
  583. package/dist/packs/owned-replay-plan.d.ts.map +0 -1
  584. package/dist/packs/owned-replay-plan.js +0 -68
  585. package/dist/packs/owned-replay-plan.js.map +0 -1
  586. package/dist/packs/removal-selection.d.ts +0 -12
  587. package/dist/packs/removal-selection.d.ts.map +0 -1
  588. package/dist/packs/removal-selection.js +0 -169
  589. package/dist/packs/removal-selection.js.map +0 -1
  590. package/dist/packs/removal.d.ts +0 -12
  591. package/dist/packs/removal.d.ts.map +0 -1
  592. package/dist/packs/removal.js +0 -138
  593. package/dist/packs/removal.js.map +0 -1
  594. package/dist/packs/repair.d.ts +0 -2
  595. package/dist/packs/repair.d.ts.map +0 -1
  596. package/dist/packs/repair.js +0 -2
  597. package/dist/packs/repair.js.map +0 -1
  598. package/dist/packs/serve.d.ts +0 -2
  599. package/dist/packs/serve.d.ts.map +0 -1
  600. package/dist/packs/serve.js +0 -14
  601. package/dist/packs/serve.js.map +0 -1
  602. package/dist/permission-gate.d.ts +0 -55
  603. package/dist/permission-gate.d.ts.map +0 -1
  604. package/dist/permission-gate.js +0 -118
  605. package/dist/permission-gate.js.map +0 -1
  606. package/dist/predicates.d.ts +0 -6
  607. package/dist/predicates.d.ts.map +0 -1
  608. package/dist/predicates.js +0 -6
  609. package/dist/predicates.js.map +0 -1
  610. package/dist/providers.d.ts +0 -117
  611. package/dist/providers.d.ts.map +0 -1
  612. package/dist/providers.js +0 -491
  613. package/dist/providers.js.map +0 -1
  614. package/dist/readline-input.d.ts +0 -23
  615. package/dist/readline-input.d.ts.map +0 -1
  616. package/dist/readline-input.js +0 -210
  617. package/dist/readline-input.js.map +0 -1
  618. package/dist/run-budget.d.ts +0 -40
  619. package/dist/run-budget.d.ts.map +0 -1
  620. package/dist/run-budget.js +0 -119
  621. package/dist/run-budget.js.map +0 -1
  622. package/dist/run-dsl-supervised.d.ts +0 -11
  623. package/dist/run-dsl-supervised.d.ts.map +0 -1
  624. package/dist/run-dsl-supervised.js +0 -89
  625. package/dist/run-dsl-supervised.js.map +0 -1
  626. package/dist/run-dsl.d.ts +0 -40
  627. package/dist/run-dsl.d.ts.map +0 -1
  628. package/dist/run-dsl.js +0 -65
  629. package/dist/run-dsl.js.map +0 -1
  630. package/dist/run-json.d.ts +0 -24
  631. package/dist/run-json.d.ts.map +0 -1
  632. package/dist/run-json.js +0 -132
  633. package/dist/run-json.js.map +0 -1
  634. package/dist/runtime-env.d.ts +0 -4
  635. package/dist/runtime-env.d.ts.map +0 -1
  636. package/dist/runtime-env.js +0 -31
  637. package/dist/runtime-env.js.map +0 -1
  638. package/dist/sandbox-catalog.d.ts +0 -26
  639. package/dist/sandbox-catalog.d.ts.map +0 -1
  640. package/dist/sandbox-catalog.js +0 -83
  641. package/dist/sandbox-catalog.js.map +0 -1
  642. package/dist/settings.d.ts +0 -19
  643. package/dist/settings.d.ts.map +0 -1
  644. package/dist/settings.js +0 -146
  645. package/dist/settings.js.map +0 -1
  646. package/dist/sketch-debug/harness.d.ts +0 -101
  647. package/dist/sketch-debug/harness.d.ts.map +0 -1
  648. package/dist/sketch-debug/harness.js +0 -118
  649. package/dist/sketch-debug/harness.js.map +0 -1
  650. package/dist/sketch-debug/index.d.ts +0 -9
  651. package/dist/sketch-debug/index.d.ts.map +0 -1
  652. package/dist/sketch-debug/index.js +0 -9
  653. package/dist/sketch-debug/index.js.map +0 -1
  654. package/dist/sketch-debug/interactions.d.ts +0 -19
  655. package/dist/sketch-debug/interactions.d.ts.map +0 -1
  656. package/dist/sketch-debug/interactions.js +0 -17
  657. package/dist/sketch-debug/interactions.js.map +0 -1
  658. package/dist/sketch-debug/target.d.ts +0 -48
  659. package/dist/sketch-debug/target.d.ts.map +0 -1
  660. package/dist/sketch-debug/target.js +0 -115
  661. package/dist/sketch-debug/target.js.map +0 -1
  662. package/dist/stdin.d.ts +0 -52
  663. package/dist/stdin.d.ts.map +0 -1
  664. package/dist/stdin.js +0 -363
  665. package/dist/stdin.js.map +0 -1
  666. package/dist/supervisor.d.ts +0 -97
  667. package/dist/supervisor.d.ts.map +0 -1
  668. package/dist/supervisor.js +0 -194
  669. package/dist/supervisor.js.map +0 -1
  670. package/dist/telemetry.d.ts +0 -38
  671. package/dist/telemetry.d.ts.map +0 -1
  672. package/dist/telemetry.js +0 -158
  673. package/dist/telemetry.js.map +0 -1
  674. package/dist/terminal-clipboard.d.ts +0 -3
  675. package/dist/terminal-clipboard.d.ts.map +0 -1
  676. package/dist/terminal-clipboard.js +0 -24
  677. package/dist/terminal-clipboard.js.map +0 -1
  678. package/dist/terminal-mouse.d.ts +0 -24
  679. package/dist/terminal-mouse.d.ts.map +0 -1
  680. package/dist/terminal-mouse.js +0 -84
  681. package/dist/terminal-mouse.js.map +0 -1
  682. package/dist/terminal-screen.d.ts +0 -41
  683. package/dist/terminal-screen.d.ts.map +0 -1
  684. package/dist/terminal-screen.js +0 -228
  685. package/dist/terminal-screen.js.map +0 -1
  686. package/dist/timeline-debug/harness.d.ts +0 -93
  687. package/dist/timeline-debug/harness.d.ts.map +0 -1
  688. package/dist/timeline-debug/harness.js +0 -100
  689. package/dist/timeline-debug/harness.js.map +0 -1
  690. package/dist/timeline-debug/index.d.ts +0 -9
  691. package/dist/timeline-debug/index.d.ts.map +0 -1
  692. package/dist/timeline-debug/index.js +0 -9
  693. package/dist/timeline-debug/index.js.map +0 -1
  694. package/dist/timeline-debug/interactions.d.ts +0 -19
  695. package/dist/timeline-debug/interactions.d.ts.map +0 -1
  696. package/dist/timeline-debug/interactions.js +0 -17
  697. package/dist/timeline-debug/interactions.js.map +0 -1
  698. package/dist/timeline-debug/target.d.ts +0 -34
  699. package/dist/timeline-debug/target.d.ts.map +0 -1
  700. package/dist/timeline-debug/target.js +0 -109
  701. package/dist/timeline-debug/target.js.map +0 -1
  702. package/dist/tool-format.d.ts +0 -54
  703. package/dist/tool-format.d.ts.map +0 -1
  704. package/dist/tool-format.js +0 -360
  705. package/dist/tool-format.js.map +0 -1
  706. package/dist/useExecutionState.d.ts +0 -44
  707. package/dist/useExecutionState.d.ts.map +0 -1
  708. package/dist/useExecutionState.js +0 -285
  709. package/dist/useExecutionState.js.map +0 -1
  710. package/dist/validate/index.d.ts +0 -29
  711. package/dist/validate/index.d.ts.map +0 -1
  712. package/dist/validate/index.js +0 -79
  713. package/dist/validate/index.js.map +0 -1
  714. package/dist/websocket-client.d.ts +0 -163
  715. package/dist/websocket-client.d.ts.map +0 -1
  716. package/dist/websocket-client.js +0 -677
  717. package/dist/websocket-client.js.map +0 -1
  718. package/dist/workflow-file.d.ts +0 -3
  719. package/dist/workflow-file.d.ts.map +0 -1
  720. package/dist/workflow-file.js +0 -176
  721. package/dist/workflow-file.js.map +0 -1
@@ -1,220 +0,0 @@
1
- import { runInteractionSteps } from "../interaction-script.js";
2
- import { writeDebugBundle } from "../debug-bundle.js";
3
- import { resolveJsScriptTarget } from "./target.js";
4
- async function loadCore() {
5
- const core = await import("@nodetool-ai/execution/js-script-debug");
6
- return {
7
- validateJsScriptDoc: (raw, options) => core.validateJsScriptDoc(raw, options),
8
- buildJsScriptDebugReport: (input) => core.buildJsScriptDebugReport(input),
9
- renderJsScriptReportMarkdown: (report) => core.renderJsScriptReportMarkdown(report)
10
- };
11
- }
12
- /**
13
- * The default executor: one `ProcessingContext` per run, the document's own
14
- * packages, secrets and timeout, and the Code-node toolbelt — the same
15
- * envelope the `run_js_script` capability applies.
16
- *
17
- * The secret store is opened only when the document declares secrets, so a
18
- * file target with none stays database-free.
19
- */
20
- async function loadExecutor() {
21
- const { runCodeBody } = await import("@nodetool-ai/agents");
22
- const { PERMISSION_GATE_CONTEXT_KEY, ProcessingContext, headlessGate } = await import("@nodetool-ai/runtime");
23
- const { FileStorageAdapter } = await import("@nodetool-ai/storage");
24
- const { getDefaultAssetsPath } = await import("@nodetool-ai/config");
25
- const { JS_SCRIPT_MAX_TIMEOUT_SECONDS } = await import("@nodetool-ai/protocol/api-schemas/js-scripts.js");
26
- // The toolbelt's `nodetool.*` modules read and write the database, so a
27
- // body that saves a timeline needs it even when it declares no secrets.
28
- const { initDb, getSecret } = await import("@nodetool-ai/models");
29
- const { getDefaultDbPath } = await import("@nodetool-ai/config");
30
- initDb(getDefaultDbPath());
31
- // A body imports installed sandbox packs by name, as it does on the server.
32
- const { installSandboxCatalog } = await import("../sandbox-catalog.js");
33
- installSandboxCatalog();
34
- let seq = 0;
35
- return async (document, inputs, inputStreams, scriptId) => {
36
- let secretResolver;
37
- if (document.secrets.length > 0) {
38
- secretResolver = getSecret;
39
- }
40
- const contextInit = {
41
- jobId: `jsscript-cli-${++seq}`,
42
- userId: "1",
43
- storage: new FileStorageAdapter(getDefaultAssetsPath())
44
- };
45
- if (secretResolver) {
46
- contextInit.secretResolver = secretResolver;
47
- }
48
- const context = new ProcessingContext(contextInit);
49
- context.set(PERMISSION_GATE_CONTEXT_KEY, headlessGate("JS script debug"));
50
- if (scriptId) {
51
- // Mirrors `enterJsScript` in the `run_js_script` capability: the same
52
- // chain key, so a script this run invokes sees this CLI run as part
53
- // of the call chain the way it would through the capability path.
54
- const { JS_SCRIPT_CHAIN_KEY } = await import("@nodetool-ai/agents");
55
- context.set(JS_SCRIPT_CHAIN_KEY, [scriptId]);
56
- }
57
- const runOptions = {
58
- code: document.code,
59
- inputs,
60
- secrets: document.secrets,
61
- timeoutSeconds: Math.min(document.timeoutSeconds, JS_SCRIPT_MAX_TIMEOUT_SECONDS),
62
- withToolbelt: true
63
- };
64
- if (inputStreams) {
65
- runOptions.inputStreams = inputStreams;
66
- }
67
- return runCodeBody(context, runOptions);
68
- };
69
- }
70
- async function loadGrader() {
71
- const { gradeCodeCases } = await import("@nodetool-ai/agents");
72
- return async (document, execute) => {
73
- const report = await gradeCodeCases(document.tests.map((testCase, index) => {
74
- const graded = {
75
- name: testCase.name.trim() !== "" ? testCase.name : `case ${index + 1}`,
76
- inputs: testCase.inputs ?? {}
77
- };
78
- if (testCase.inputStreams) {
79
- graded.inputStreams = testCase.inputStreams;
80
- }
81
- if (testCase.expect) {
82
- graded.expect = testCase.expect;
83
- }
84
- if (testCase.expectedStreamed) {
85
- graded.expectedStreamed = testCase.expectedStreamed;
86
- }
87
- return graded;
88
- }), (testCase) => execute(document, testCase.inputs, testCase.inputStreams));
89
- return report;
90
- };
91
- }
92
- async function loadBridgeFactory() {
93
- const { createJsScriptToolBridge } = await import("@nodetool-ai/agents");
94
- return (initial) =>
95
- // SAFETY: the eval-surface bridge in @nodetool-ai/agents implements this
96
- // exact tool list and snapshot — it is the bridge this type describes. The
97
- // two packages declare the script document types independently, and that
98
- // duplication is the only reason the structures do not line up.
99
- createJsScriptToolBridge(initial);
100
- }
101
- /**
102
- * The document a target carries, parsed against the schema so the executor
103
- * gets defaults for anything the file left out. A document that does not parse
104
- * has already been reported by validation, so this is only reached on a sound
105
- * one.
106
- */
107
- async function asDocument(raw) {
108
- const { jsScriptDocument } = await import("@nodetool-ai/protocol/api-schemas/js-scripts.js");
109
- const parsed = jsScriptDocument.safeParse(raw);
110
- if (!parsed.success) {
111
- throw new Error(`The document does not parse: ${parsed.error.issues
112
- .map((issue) => `${issue.path.join(".") || "document"}: ${issue.message}`)
113
- .join("; ")}`);
114
- }
115
- return parsed.data;
116
- }
117
- async function executableDocument(raw, deps) {
118
- const document = await asDocument(raw);
119
- const core = deps.core ?? (await loadCore());
120
- const validation = await core.validateJsScriptDoc(document);
121
- if (!validation.ok) {
122
- throw new Error(`The script failed validation: ${validation.errors
123
- .map((issue) => `[${issue.code}] ${issue.message}`)
124
- .join("; ")}`);
125
- }
126
- return document;
127
- }
128
- /** Load a script and validate it — no sandbox, no bundle. */
129
- export async function runJsScriptValidate(ref, deps) {
130
- const resolved = await resolveJsScriptTarget(ref, deps);
131
- const core = deps.core ?? (await loadCore());
132
- const { discoverPackDtsSources, installSandboxCatalog } = await import("../sandbox-catalog.js");
133
- // The catalog reports an import no installed pack offers; the type check
134
- // leaves those to it.
135
- const validation = await core.validateJsScriptDoc(resolved.raw, {
136
- packDtsSources: discoverPackDtsSources(),
137
- sandboxModuleCatalog: installSandboxCatalog()
138
- });
139
- return { target: resolved.target, validation };
140
- }
141
- /** Run a script once with the given inputs. */
142
- export async function runJsScriptOnce(ref, inputs, deps, inputStreams) {
143
- const resolved = await resolveJsScriptTarget(ref, deps);
144
- const document = await executableDocument(resolved.raw, deps);
145
- if (inputStreams) {
146
- const declared = new Set(document.inputs.map((port) => port.name));
147
- const undeclared = Object.keys(inputStreams).filter((handle) => !declared.has(handle));
148
- if (undeclared.length > 0) {
149
- throw new Error(`--input-streams names ${undeclared.join(", ")}, which the script does ` +
150
- `not declare as inputs (declared: ${[...declared].join(", ") || "none"}).`);
151
- }
152
- }
153
- const execute = deps.execute ?? (await loadExecutor());
154
- const scriptId = resolved.target.kind === "id" ? resolved.target.ref : undefined;
155
- return {
156
- target: resolved.target,
157
- result: await execute(document, inputs, inputStreams, scriptId)
158
- };
159
- }
160
- /** Run a script's saved cases and grade them. */
161
- export async function runJsScriptTests(ref, deps) {
162
- const resolved = await resolveJsScriptTarget(ref, deps);
163
- const document = await executableDocument(resolved.raw, deps);
164
- if (document.tests.length === 0) {
165
- throw new Error(`${ref} has no saved test cases; there is nothing to run. Add some to the document's \`tests\`.`);
166
- }
167
- const execute = deps.execute ?? (await loadExecutor());
168
- const grade = deps.grade ?? (await loadGrader());
169
- return { target: resolved.target, report: await grade(document, execute) };
170
- }
171
- /**
172
- * Replay `--interact` against the headless bridge and write the bundle.
173
- *
174
- * A failing step is recorded and the script continues: a run that stops at the
175
- * first error hides every problem behind it, and the report is what the caller
176
- * came for.
177
- */
178
- export async function runJsScriptDebug(ref, options, deps) {
179
- const resolved = await resolveJsScriptTarget(ref, deps);
180
- const core = deps.core ?? (await loadCore());
181
- const steps = options.interact ?? [];
182
- const interactions = [];
183
- let snapshot;
184
- let finalDocument;
185
- if (steps.length > 0) {
186
- const createBridge = deps.createBridge ?? (await loadBridgeFactory());
187
- const bridgeInit = {
188
- document: await asDocument(resolved.raw)
189
- };
190
- if (resolved.target.name) {
191
- bridgeInit.name = resolved.target.name;
192
- }
193
- const bridge = createBridge(bridgeInit);
194
- interactions.push(...(await runInteractionSteps(steps, bridge.tools, "JS script", deps.onLog)));
195
- snapshot = bridge.finalState();
196
- finalDocument = bridge.document();
197
- }
198
- const reportInput = {
199
- target: resolved.target,
200
- document: resolved.raw,
201
- interactions
202
- };
203
- if (snapshot !== undefined) {
204
- reportInput.finalState = snapshot;
205
- }
206
- if (finalDocument !== undefined) {
207
- reportInput.finalDocument = finalDocument;
208
- }
209
- const report = await core.buildJsScriptDebugReport(reportInput);
210
- const bundleDir = await writeDebugBundle({
211
- kind: "jsscript",
212
- ref,
213
- outDir: options.outDir,
214
- raw: resolved.raw,
215
- report,
216
- reportMarkdown: core.renderJsScriptReportMarkdown(report),
217
- });
218
- return { report, bundleDir };
219
- }
220
- //# sourceMappingURL=harness.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"harness.js","sourceRoot":"","sources":["../../src/js-script-debug/harness.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,qBAAqB,EAGtB,MAAM,aAAa,CAAC;AAoHrB,KAAK,UAAU,QAAQ;IACrB,MAAM,IAAI,GAAG,MAAM,MAAM,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AQ,CAAC,MAAM;QACvB,QAAQ,EAAE,QAAQ,CAAC,GAAG;QACtB,YAAY;KACb,CAAC;IACF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,WAAW,CAAC,UAAU,GAAG,QAAQ,CAAC;IACpC,CAAC;IACD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,WAAW,CAAC,aAAa,GAAG,aAAa,CAAC;IAC5C,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC;IAEhE,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC;QACvC,IAAI,EAAE,UAAU;QAChB,GAAG;QACH,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,MAAM;QACN,cAAc,EAAE,IAAI,CAAC,4BAA4B,CAAC,MAAM,CAAC;KAC1D,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * The CLI host for the JS-script harness: target resolution, the `--interact`
3
- * script, sandbox execution, and the bundle writer. The rules themselves live
4
- * in `@nodetool-ai/execution/js-script-debug`.
5
- */
6
- export { runJsScriptValidate, runJsScriptOnce, runJsScriptTests, runJsScriptDebug, type CreateJsScriptBridge, type JsScriptBridge, type JsScriptBridgeTool, type JsScriptCaseResult, type JsScriptDebugCore, type JsScriptDebugDeps, type JsScriptDebugResult, type JsScriptExecutor, type JsScriptRunOutcome, type JsScriptRunResult, type JsScriptTestOutcome, type JsScriptTestReport, type JsScriptValidateResult } from "./harness.js";
7
- export { normalizeToolName, parseInteractionScript, type JsScriptInteractionStep } from "./interactions.js";
8
- export { resolveJsScriptTarget, type JsScriptRecord, type JsScriptTargetDeps, type ResolvedJsScriptTarget } from "./target.js";
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js-script-debug/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * The CLI host for the JS-script harness: target resolution, the `--interact`
3
- * script, sandbox execution, and the bundle writer. The rules themselves live
4
- * in `@nodetool-ai/execution/js-script-debug`.
5
- */
6
- export { runJsScriptValidate, runJsScriptOnce, runJsScriptTests, runJsScriptDebug } from "./harness.js";
7
- export { normalizeToolName, parseInteractionScript } from "./interactions.js";
8
- export { resolveJsScriptTarget } from "./target.js";
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js-script-debug/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAcjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EAEvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,qBAAqB,EAItB,MAAM,aAAa,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * The `--interact` script for `nodetool jsscript debug`.
3
- *
4
- * A step names one JS-script tool and the input to call it with:
5
- *
6
- * ```json
7
- * [{"tool": "set_ports", "input": {"outputs": [{"name": "total", "type": "int"}]}},
8
- * {"tool": "ui_jsscript_set_code",
9
- * "input": {"code": "await output(\"total\", 1);"}}]
10
- * ```
11
- *
12
- * Both spellings resolve to the same tool: the `ui_jsscript_` prefix is what
13
- * the bridge and the browser call it, and typing it for every step is noise.
14
- */
15
- import { type InteractionStep } from "../interaction-script.js";
16
- /** One parsed step, with the tool name in its canonical `ui_jsscript_*` form. */
17
- export type JsScriptInteractionStep = InteractionStep;
18
- export declare const normalizeToolName: (name: string) => string, parseInteractionScript: (json: string) => InteractionStep[];
19
- //# sourceMappingURL=interactions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["../../src/js-script-debug/interactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC;AAElC,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAEtD,eAAO,MAAQ,iBAAiB,4BAAE,sBAAsB,qCAIrD,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * The `--interact` script for `nodetool jsscript debug`.
3
- *
4
- * A step names one JS-script tool and the input to call it with:
5
- *
6
- * ```json
7
- * [{"tool": "set_ports", "input": {"outputs": [{"name": "total", "type": "int"}]}},
8
- * {"tool": "ui_jsscript_set_code",
9
- * "input": {"code": "await output(\"total\", 1);"}}]
10
- * ```
11
- *
12
- * Both spellings resolve to the same tool: the `ui_jsscript_` prefix is what
13
- * the bridge and the browser call it, and typing it for every step is noise.
14
- */
15
- import { createInteractionScript } from "../interaction-script.js";
16
- export const { normalizeToolName, parseInteractionScript } = createInteractionScript("ui_jsscript_", '{"tool":"set_code","input":{"code":"..."}}');
17
- //# sourceMappingURL=interactions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactions.js","sourceRoot":"","sources":["../../src/js-script-debug/interactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,uBAAuB,EAExB,MAAM,0BAA0B,CAAC;AAKlC,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,GACxD,uBAAuB,CACrB,cAAc,EACd,4CAA4C,CAC7C,CAAC"}
@@ -1,20 +0,0 @@
1
- import type { JsScriptDebugTarget } from "@nodetool-ai/execution/js-script-debug";
2
- /** A `js_scripts` row as the harness needs it. */
3
- export interface JsScriptRecord {
4
- id: string;
5
- name?: string | null;
6
- /** The stored document — a JSON string or an already-parsed object. */
7
- document: unknown;
8
- }
9
- export interface JsScriptTargetDeps {
10
- /** Load a script by DB id. */
11
- loadScript: (id: string) => Promise<JsScriptRecord | null>;
12
- }
13
- export interface ResolvedJsScriptTarget {
14
- target: JsScriptDebugTarget;
15
- /** The document exactly as loaded — validation's input, unrepaired. */
16
- raw: unknown;
17
- }
18
- /** Resolve a JS-script target: a JSON file path or a `js_scripts` row id. */
19
- export declare function resolveJsScriptTarget(ref: string, deps: JsScriptTargetDeps): Promise<ResolvedJsScriptTarget>;
20
- //# sourceMappingURL=target.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../src/js-script-debug/target.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAOlF,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uEAAuE;IACvE,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC5D;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,uEAAuE;IACvE,GAAG,EAAE,OAAO,CAAC;CACd;AAQD,6EAA6E;AAC7E,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,sBAAsB,CAAC,CAkCjC"}
@@ -1,55 +0,0 @@
1
- /**
2
- * Resolves a JS-script debug target into a document plus its name.
3
- *
4
- * A script is named two ways, and both end up in the same shape:
5
- *
6
- * - a **JSON file** — either a bare `JsScriptDocument` or a wrapper carrying
7
- * one under `document`, as the `js_scripts` row and the `jsScripts.get`
8
- * response do;
9
- * - a **`js_scripts` row id**, read through an injected loader so this module
10
- * needs no database.
11
- *
12
- * A path that exists on disk wins over an id, so a file named like an id is
13
- * still readable.
14
- */
15
- import { existsSync, readFileSync } from "node:fs";
16
- import { isRecord, isString } from "../predicates.js";
17
- import { documentOf } from "../document-json.js";
18
- /** A document is anything carrying a `code` string and a `schemaVersion`. */
19
- const looksLikeDocument = (value) => isRecord(value) &&
20
- isString(value.code) &&
21
- value.schemaVersion !== undefined;
22
- /** Resolve a JS-script target: a JSON file path or a `js_scripts` row id. */
23
- export async function resolveJsScriptTarget(ref, deps) {
24
- if (existsSync(ref)) {
25
- let parsed;
26
- try {
27
- parsed = JSON.parse(readFileSync(ref, "utf8"));
28
- }
29
- catch (e) {
30
- throw new Error(`${ref} is not valid JSON: ${e.message}`);
31
- }
32
- const raw = documentOf(parsed);
33
- if (!looksLikeDocument(raw)) {
34
- throw new Error(`${ref} is not a JS script document (no \`schemaVersion\`/\`code\`, and no \`document\` field carrying them).`);
35
- }
36
- const name = isRecord(parsed) && isString(parsed.name)
37
- ? parsed.name
38
- : undefined;
39
- const target = { kind: "file", ref };
40
- if (name) {
41
- target.name = name;
42
- }
43
- return { target, raw };
44
- }
45
- const record = await deps.loadScript(ref);
46
- if (!record) {
47
- throw new Error(`JS script not found: ${ref}`);
48
- }
49
- const target = { kind: "id", ref };
50
- if (record.name) {
51
- target.name = record.name;
52
- }
53
- return { target, raw: documentOf(record) };
54
- }
55
- //# sourceMappingURL=target.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"target.js","sourceRoot":"","sources":["../../src/js-script-debug/target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EACL,QAAQ,EACR,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AAqBjE,6EAA6E;AAC7E,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAW,EAAE,CACpD,QAAQ,CAAC,KAAK,CAAC;IACf,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC;IACpB,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC;AAEpC,6EAA6E;AAC7E,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAW,EACX,IAAwB;IAExB,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACpB,IAAI,MAAe,CAAC;QACpB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,uBAAwB,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACvE,CAAC;QACD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,wGAAwG,CAC/G,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GACR,QAAQ,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;YACvC,CAAC,CAAC,MAAM,CAAC,IAAI;YACb,CAAC,CAAC,SAAS,CAAC;QAChB,MAAM,MAAM,GAAwB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QAC1D,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;IACjD,CAAC;IACD,MAAM,MAAM,GAAwB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IACxD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC5B,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;AAC7C,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * The persistence a local (no-server) run gets: assets and timeline sequences,
3
- * against the same database `setupDb()` opens.
4
- *
5
- * Installed process-wide by each command that runs a graph, so every context
6
- * built downstream answers the same way. Wiring it per-entrance is what let
7
- * `nodetool debug` and `nodetool workflows run` disagree: a workflow that
8
- * saved an image ran under one and threw "ProcessingContext model interface
9
- * 'createAsset' is not configured" under the other.
10
- *
11
- * `createAsset` is the server's own implementation, imported rather than
12
- * rewritten — the local copy this replaced wrote no thumbnail and left
13
- * `parent_id` null, so a CLI-generated asset was invisible in every
14
- * folder-scoped listing in the UI.
15
- */
16
- import type { ProcessingContextModelInterfaces } from "@nodetool-ai/runtime";
17
- export declare function localModelInterfaces(): Promise<ProcessingContextModelInterfaces>;
18
- /** Install them as this process's default, once. */
19
- export declare function installLocalModelInterfaces(): Promise<void>;
20
- //# sourceMappingURL=local-model-interfaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-model-interfaces.d.ts","sourceRoot":"","sources":["../src/local-model-interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAG7E,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,gCAAgC,CAAC,CAgBtF;AAID,oDAAoD;AACpD,wBAAgB,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAO3D"}
@@ -1,41 +0,0 @@
1
- /**
2
- * The persistence a local (no-server) run gets: assets and timeline sequences,
3
- * against the same database `setupDb()` opens.
4
- *
5
- * Installed process-wide by each command that runs a graph, so every context
6
- * built downstream answers the same way. Wiring it per-entrance is what let
7
- * `nodetool debug` and `nodetool workflows run` disagree: a workflow that
8
- * saved an image ran under one and threw "ProcessingContext model interface
9
- * 'createAsset' is not configured" under the other.
10
- *
11
- * `createAsset` is the server's own implementation, imported rather than
12
- * rewritten — the local copy this replaced wrote no thumbnail and left
13
- * `parent_id` null, so a CLI-generated asset was invisible in every
14
- * folder-scoped listing in the UI.
15
- */
16
- import { setDefaultModelInterfaces } from "@nodetool-ai/runtime";
17
- export async function localModelInterfaces() {
18
- // The `/assets` subpath, not the package root: the root entry pulls in the
19
- // WebSocket runner and the HTTP server, which a local run does not need.
20
- const { createAssetModelInterface, updateAssetBytesModelInterface } = await import("@nodetool-ai/websocket/assets");
21
- // Storyboards, the entity library and the game templates, from the same
22
- // module the server installs — a harness run has to write the rows a server
23
- // run writes, or it proves nothing about the server.
24
- const { documentModelInterfaces } = await import("@nodetool-ai/websocket/documents");
25
- return {
26
- createAsset: createAssetModelInterface,
27
- updateAssetBytes: updateAssetBytesModelInterface,
28
- ...documentModelInterfaces()
29
- };
30
- }
31
- let installed = null;
32
- /** Install them as this process's default, once. */
33
- export function installLocalModelInterfaces() {
34
- if (!installed) {
35
- installed = localModelInterfaces().then((interfaces) => {
36
- setDefaultModelInterfaces(interfaces);
37
- });
38
- }
39
- return installed;
40
- }
41
- //# sourceMappingURL=local-model-interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-model-interfaces.js","sourceRoot":"","sources":["../src/local-model-interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,2EAA2E;IAC3E,yEAAyE;IACzE,MAAM,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,GACjE,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;IAChD,wEAAwE;IACxE,4EAA4E;IAC5E,qDAAqD;IACrD,MAAM,EAAE,uBAAuB,EAAE,GAAG,MAAM,MAAM,CAC9C,kCAAkC,CACnC,CAAC;IACF,OAAO;QACL,WAAW,EAAE,yBAAyB;QACtC,gBAAgB,EAAE,8BAA8B;QAChD,GAAG,uBAAuB,EAAE;KAC7B,CAAC;AACJ,CAAC;AAED,IAAI,SAAS,GAAyB,IAAI,CAAC;AAE3C,oDAAoD;AACpD,MAAM,UAAU,2BAA2B;IACzC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,oBAAoB,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;YACrD,yBAAyB,CAAC,UAAU,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Resolve a secret for the local user: encrypted store first, then env. */
2
- export declare function resolveLocalSecret(key: string): Promise<string | null>;
3
- //# sourceMappingURL=local-secrets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-secrets.d.ts","sourceRoot":"","sources":["../src/local-secrets.ts"],"names":[],"mappings":"AAaA,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAEtE"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Secret resolution for CLI runs.
3
- *
4
- * `getSecret(key)` with no user id never reads the encrypted store — the DB
5
- * lookup inside it is guarded by the caller's user id, so a bare reference
6
- * resolves from `process.env` alone. Every CLI surface runs as the local user,
7
- * so it must ask for that user's secrets explicitly, or a key the user stored
8
- * with `nodetool secrets store` is invisible and the provider answers 401.
9
- */
10
- import { getSecret } from "@nodetool-ai/models";
11
- import { LOCAL_USER_ID } from "./commands/local-db.js";
12
- /** Resolve a secret for the local user: encrypted store first, then env. */
13
- export function resolveLocalSecret(key) {
14
- return getSecret(key, LOCAL_USER_ID);
15
- }
16
- //# sourceMappingURL=local-secrets.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-secrets.js","sourceRoot":"","sources":["../src/local-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,SAAS,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;AACvC,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Markdown rendering for the terminal.
3
- * Uses marked + marked-terminal for full markdown support including
4
- * syntax-highlighted code blocks, tables, bold/italic, links.
5
- */
6
- export declare function renderMarkdown(text: string): Promise<string>;
7
- /** Synchronous fallback — strips markdown syntax for plain display. */
8
- export declare function stripMarkdown(text: string): string;
9
- //# sourceMappingURL=markdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BlE;AAED,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD"}
package/dist/markdown.js DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * Markdown rendering for the terminal.
3
- * Uses marked + marked-terminal for full markdown support including
4
- * syntax-highlighted code blocks, tables, bold/italic, links.
5
- */
6
- import { marked } from "marked";
7
- import { isString } from "./predicates.js";
8
- // Cache so we only set the extension once
9
- let _initialized = false;
10
- let _available = false;
11
- export async function renderMarkdown(text) {
12
- if (!_initialized) {
13
- try {
14
- // marked-terminal v7 exports markedTerminal() as a MarkedExtension factory
15
- const mod = await import("marked-terminal");
16
- const markedTerminal = mod.markedTerminal ?? mod.default;
17
- marked.use(markedTerminal({
18
- width: process.stdout.columns ?? 80,
19
- emoji: false,
20
- tab: 2,
21
- showSectionPrefix: false,
22
- reflowText: false
23
- }));
24
- _available = true;
25
- }
26
- catch {
27
- // Keep Markdown readable rather than returning marked's HTML renderer.
28
- }
29
- _initialized = true;
30
- }
31
- if (!_available)
32
- return text;
33
- try {
34
- const result = marked(text);
35
- if (isString(result))
36
- return result;
37
- return await result;
38
- }
39
- catch {
40
- return text; // fallback to raw text on render error
41
- }
42
- }
43
- /** Synchronous fallback — strips markdown syntax for plain display. */
44
- export function stripMarkdown(text) {
45
- return text
46
- .replace(/```[\s\S]*?```/g, "[code]")
47
- .replace(/`([^`]+)`/g, "$1")
48
- .replace(/\*\*([^*]+)\*\*/g, "$1")
49
- .replace(/\*([^*]+)\*/g, "$1")
50
- .replace(/^#{1,6}\s+/gm, "")
51
- .replace(/\[([^\]]+)\]\([^)]+\)/g, "$1");
52
- }
53
- //# sourceMappingURL=markdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.js","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,CAAC,iBAAiB,EAAE,QAAQ,CAAC;SACpC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC;SACjC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;SAC7B,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;SAC3B,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,31 +0,0 @@
1
- import { type MissingRuntimeDetails, type MissingPackDetails } from "@nodetool-ai/protocol";
2
- interface NodeRunResult {
3
- nodeType: string;
4
- title: string | null;
5
- ok: boolean;
6
- error: string | null;
7
- missingRuntime?: MissingRuntimeDetails;
8
- missingPack?: MissingPackDetails;
9
- durationMs: number;
10
- /** Every record emitted by the node (one entry for a one-shot process()). */
11
- chunks: Array<Record<string, unknown>>;
12
- /** Declared output handles, for reference. */
13
- outputs: Array<{
14
- name: string;
15
- type: string;
16
- }>;
17
- }
18
- interface RunSingleNodeOptions {
19
- /** Property values keyed by @prop name. */
20
- props?: Record<string, unknown>;
21
- /**
22
- * Resolves secrets (API keys) for nodes that need them. Injected by the
23
- * caller so this module stays free of a hard `@nodetool-ai/models` import
24
- * (which would pull in the SQLite native binding for hermetic runs). When
25
- * omitted, every secret resolves to null.
26
- */
27
- secretResolver?: (key: string) => Promise<string | null>;
28
- }
29
- export declare function runSingleNode(nodeType: string, options?: RunSingleNodeOptions): Promise<NodeRunResult>;
30
- export {};
31
- //# sourceMappingURL=run-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-node.d.ts","sourceRoot":"","sources":["../../src/node/run-node.ts"],"names":[],"mappings":"AAWA,OAAO,EAAiD,KAAK,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAK3I,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACvC,8CAA8C;IAC9C,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,oBAAoB;IAC5B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC1D;AAUD,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,aAAa,CAAC,CAyExB"}