@kindgi/cli 0.0.0-bootstrap.0 → 0.1.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 (516) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +738 -1
  3. package/dist/build/apt.d.ts +16 -0
  4. package/dist/build/apt.d.ts.map +1 -0
  5. package/dist/build/apt.js +50 -0
  6. package/dist/build/apt.js.map +1 -0
  7. package/dist/build/bundle.d.ts +48 -0
  8. package/dist/build/bundle.d.ts.map +1 -0
  9. package/dist/build/bundle.js +125 -0
  10. package/dist/build/bundle.js.map +1 -0
  11. package/dist/build/containerfile.d.ts +27 -0
  12. package/dist/build/containerfile.d.ts.map +1 -0
  13. package/dist/build/containerfile.js +197 -0
  14. package/dist/build/containerfile.js.map +1 -0
  15. package/dist/build/context-files.d.ts +24 -0
  16. package/dist/build/context-files.d.ts.map +1 -0
  17. package/dist/build/context-files.js +99 -0
  18. package/dist/build/context-files.js.map +1 -0
  19. package/dist/build/defaults.d.ts +66 -0
  20. package/dist/build/defaults.d.ts.map +1 -0
  21. package/dist/build/defaults.js +597 -0
  22. package/dist/build/defaults.js.map +1 -0
  23. package/dist/build/envelope.d.ts +72 -0
  24. package/dist/build/envelope.d.ts.map +1 -0
  25. package/dist/build/envelope.js +76 -0
  26. package/dist/build/envelope.js.map +1 -0
  27. package/dist/build/host-install.d.ts +100 -0
  28. package/dist/build/host-install.d.ts.map +1 -0
  29. package/dist/build/host-install.js +443 -0
  30. package/dist/build/host-install.js.map +1 -0
  31. package/dist/build/image-config.d.ts +32 -0
  32. package/dist/build/image-config.d.ts.map +1 -0
  33. package/dist/build/image-config.js +129 -0
  34. package/dist/build/image-config.js.map +1 -0
  35. package/dist/build/integrity.d.ts +51 -0
  36. package/dist/build/integrity.d.ts.map +1 -0
  37. package/dist/build/integrity.js +75 -0
  38. package/dist/build/integrity.js.map +1 -0
  39. package/dist/build/node-image.d.ts +18 -0
  40. package/dist/build/node-image.d.ts.map +1 -0
  41. package/dist/build/node-image.js +46 -0
  42. package/dist/build/node-image.js.map +1 -0
  43. package/dist/build/pack-root.d.ts +69 -0
  44. package/dist/build/pack-root.d.ts.map +1 -0
  45. package/dist/build/pack-root.js +102 -0
  46. package/dist/build/pack-root.js.map +1 -0
  47. package/dist/build/poetry-requirements.d.ts +5 -0
  48. package/dist/build/poetry-requirements.d.ts.map +1 -0
  49. package/dist/build/poetry-requirements.js +8 -0
  50. package/dist/build/poetry-requirements.js.map +1 -0
  51. package/dist/build/python-image.d.ts +40 -0
  52. package/dist/build/python-image.d.ts.map +1 -0
  53. package/dist/build/python-image.js +197 -0
  54. package/dist/build/python-image.js.map +1 -0
  55. package/dist/build/runners.d.ts +259 -0
  56. package/dist/build/runners.d.ts.map +1 -0
  57. package/dist/build/runners.js +4 -0
  58. package/dist/build/runners.js.map +1 -0
  59. package/dist/build/version-specifier.d.ts +2 -0
  60. package/dist/build/version-specifier.d.ts.map +1 -0
  61. package/dist/build/version-specifier.js +70 -0
  62. package/dist/build/version-specifier.js.map +1 -0
  63. package/dist/cli-package.d.ts +15 -0
  64. package/dist/cli-package.d.ts.map +1 -0
  65. package/dist/cli-package.js +37 -0
  66. package/dist/cli-package.js.map +1 -0
  67. package/dist/cli.d.ts +3 -0
  68. package/dist/cli.d.ts.map +1 -0
  69. package/dist/cli.js +26 -0
  70. package/dist/cli.js.map +1 -0
  71. package/dist/commands/adapters.d.ts +3 -0
  72. package/dist/commands/adapters.d.ts.map +1 -0
  73. package/dist/commands/adapters.js +148 -0
  74. package/dist/commands/adapters.js.map +1 -0
  75. package/dist/commands/agents.d.ts +3 -0
  76. package/dist/commands/agents.d.ts.map +1 -0
  77. package/dist/commands/agents.js +82 -0
  78. package/dist/commands/agents.js.map +1 -0
  79. package/dist/commands/approvals.d.ts +3 -0
  80. package/dist/commands/approvals.d.ts.map +1 -0
  81. package/dist/commands/approvals.js +92 -0
  82. package/dist/commands/approvals.js.map +1 -0
  83. package/dist/commands/artifacts.d.ts +3 -0
  84. package/dist/commands/artifacts.d.ts.map +1 -0
  85. package/dist/commands/artifacts.js +87 -0
  86. package/dist/commands/artifacts.js.map +1 -0
  87. package/dist/commands/auth.d.ts +25 -0
  88. package/dist/commands/auth.d.ts.map +1 -0
  89. package/dist/commands/auth.js +283 -0
  90. package/dist/commands/auth.js.map +1 -0
  91. package/dist/commands/build.d.ts +46 -0
  92. package/dist/commands/build.d.ts.map +1 -0
  93. package/dist/commands/build.js +902 -0
  94. package/dist/commands/build.js.map +1 -0
  95. package/dist/commands/capabilities.d.ts +3 -0
  96. package/dist/commands/capabilities.d.ts.map +1 -0
  97. package/dist/commands/capabilities.js +38 -0
  98. package/dist/commands/capabilities.js.map +1 -0
  99. package/dist/commands/conversations.d.ts +3 -0
  100. package/dist/commands/conversations.d.ts.map +1 -0
  101. package/dist/commands/conversations.js +75 -0
  102. package/dist/commands/conversations.js.map +1 -0
  103. package/dist/commands/deploy.d.ts +7 -0
  104. package/dist/commands/deploy.d.ts.map +1 -0
  105. package/dist/commands/deploy.js +697 -0
  106. package/dist/commands/deploy.js.map +1 -0
  107. package/dist/commands/dev.d.ts +43 -0
  108. package/dist/commands/dev.d.ts.map +1 -0
  109. package/dist/commands/dev.js +1110 -0
  110. package/dist/commands/dev.js.map +1 -0
  111. package/dist/commands/env.d.ts +27 -0
  112. package/dist/commands/env.d.ts.map +1 -0
  113. package/dist/commands/env.js +816 -0
  114. package/dist/commands/env.js.map +1 -0
  115. package/dist/commands/feedback.d.ts +33 -0
  116. package/dist/commands/feedback.d.ts.map +1 -0
  117. package/dist/commands/feedback.js +374 -0
  118. package/dist/commands/feedback.js.map +1 -0
  119. package/dist/commands/flows.d.ts +3 -0
  120. package/dist/commands/flows.d.ts.map +1 -0
  121. package/dist/commands/flows.js +60 -0
  122. package/dist/commands/flows.js.map +1 -0
  123. package/dist/commands/guardrails.d.ts +3 -0
  124. package/dist/commands/guardrails.d.ts.map +1 -0
  125. package/dist/commands/guardrails.js +89 -0
  126. package/dist/commands/guardrails.js.map +1 -0
  127. package/dist/commands/health.d.ts +8 -0
  128. package/dist/commands/health.d.ts.map +1 -0
  129. package/dist/commands/health.js +40 -0
  130. package/dist/commands/health.js.map +1 -0
  131. package/dist/commands/helpers.d.ts +48 -0
  132. package/dist/commands/helpers.d.ts.map +1 -0
  133. package/dist/commands/helpers.js +110 -0
  134. package/dist/commands/helpers.js.map +1 -0
  135. package/dist/commands/index.d.ts +7 -0
  136. package/dist/commands/index.d.ts.map +1 -0
  137. package/dist/commands/index.js +90 -0
  138. package/dist/commands/index.js.map +1 -0
  139. package/dist/commands/init.d.ts +46 -0
  140. package/dist/commands/init.d.ts.map +1 -0
  141. package/dist/commands/init.js +454 -0
  142. package/dist/commands/init.js.map +1 -0
  143. package/dist/commands/key.d.ts +3 -0
  144. package/dist/commands/key.d.ts.map +1 -0
  145. package/dist/commands/key.js +322 -0
  146. package/dist/commands/key.js.map +1 -0
  147. package/dist/commands/mcp.d.ts +43 -0
  148. package/dist/commands/mcp.d.ts.map +1 -0
  149. package/dist/commands/mcp.js +433 -0
  150. package/dist/commands/mcp.js.map +1 -0
  151. package/dist/commands/memory.d.ts +3 -0
  152. package/dist/commands/memory.d.ts.map +1 -0
  153. package/dist/commands/memory.js +82 -0
  154. package/dist/commands/memory.js.map +1 -0
  155. package/dist/commands/observations.d.ts +3 -0
  156. package/dist/commands/observations.d.ts.map +1 -0
  157. package/dist/commands/observations.js +27 -0
  158. package/dist/commands/observations.js.map +1 -0
  159. package/dist/commands/proposals.d.ts +3 -0
  160. package/dist/commands/proposals.d.ts.map +1 -0
  161. package/dist/commands/proposals.js +116 -0
  162. package/dist/commands/proposals.js.map +1 -0
  163. package/dist/commands/provenance.d.ts +3 -0
  164. package/dist/commands/provenance.d.ts.map +1 -0
  165. package/dist/commands/provenance.js +53 -0
  166. package/dist/commands/provenance.js.map +1 -0
  167. package/dist/commands/providers.d.ts +3 -0
  168. package/dist/commands/providers.d.ts.map +1 -0
  169. package/dist/commands/providers.js +212 -0
  170. package/dist/commands/providers.js.map +1 -0
  171. package/dist/commands/reviewers.d.ts +3 -0
  172. package/dist/commands/reviewers.d.ts.map +1 -0
  173. package/dist/commands/reviewers.js +78 -0
  174. package/dist/commands/reviewers.js.map +1 -0
  175. package/dist/commands/runs.d.ts +3 -0
  176. package/dist/commands/runs.d.ts.map +1 -0
  177. package/dist/commands/runs.js +223 -0
  178. package/dist/commands/runs.js.map +1 -0
  179. package/dist/commands/secrets.d.ts +18 -0
  180. package/dist/commands/secrets.d.ts.map +1 -0
  181. package/dist/commands/secrets.js +702 -0
  182. package/dist/commands/secrets.js.map +1 -0
  183. package/dist/commands/skills.d.ts +64 -0
  184. package/dist/commands/skills.d.ts.map +1 -0
  185. package/dist/commands/skills.js +430 -0
  186. package/dist/commands/skills.js.map +1 -0
  187. package/dist/commands/test.d.ts +5 -0
  188. package/dist/commands/test.d.ts.map +1 -0
  189. package/dist/commands/test.js +181 -0
  190. package/dist/commands/test.js.map +1 -0
  191. package/dist/commands/tokens.d.ts +3 -0
  192. package/dist/commands/tokens.d.ts.map +1 -0
  193. package/dist/commands/tokens.js +33 -0
  194. package/dist/commands/tokens.js.map +1 -0
  195. package/dist/commands/tools.d.ts +3 -0
  196. package/dist/commands/tools.d.ts.map +1 -0
  197. package/dist/commands/tools.js +162 -0
  198. package/dist/commands/tools.js.map +1 -0
  199. package/dist/commands/types.d.ts +54 -0
  200. package/dist/commands/types.d.ts.map +1 -0
  201. package/dist/commands/types.js +4 -0
  202. package/dist/commands/types.js.map +1 -0
  203. package/dist/commands/unwired.d.ts +22 -0
  204. package/dist/commands/unwired.d.ts.map +1 -0
  205. package/dist/commands/unwired.js +52 -0
  206. package/dist/commands/unwired.js.map +1 -0
  207. package/dist/commands/version.d.ts +8 -0
  208. package/dist/commands/version.d.ts.map +1 -0
  209. package/dist/commands/version.js +41 -0
  210. package/dist/commands/version.js.map +1 -0
  211. package/dist/config.d.ts +42 -0
  212. package/dist/config.d.ts.map +1 -0
  213. package/dist/config.js +83 -0
  214. package/dist/config.js.map +1 -0
  215. package/dist/context.d.ts +162 -0
  216. package/dist/context.d.ts.map +1 -0
  217. package/dist/context.js +45 -0
  218. package/dist/context.js.map +1 -0
  219. package/dist/deploy/defaults.d.ts +14 -0
  220. package/dist/deploy/defaults.d.ts.map +1 -0
  221. package/dist/deploy/defaults.js +37 -0
  222. package/dist/deploy/defaults.js.map +1 -0
  223. package/dist/deploy/envelope-loader.d.ts +24 -0
  224. package/dist/deploy/envelope-loader.d.ts.map +1 -0
  225. package/dist/deploy/envelope-loader.js +141 -0
  226. package/dist/deploy/envelope-loader.js.map +1 -0
  227. package/dist/deploy/post.d.ts +48 -0
  228. package/dist/deploy/post.d.ts.map +1 -0
  229. package/dist/deploy/post.js +210 -0
  230. package/dist/deploy/post.js.map +1 -0
  231. package/dist/deploy/response.d.ts +42 -0
  232. package/dist/deploy/response.d.ts.map +1 -0
  233. package/dist/deploy/response.js +128 -0
  234. package/dist/deploy/response.js.map +1 -0
  235. package/dist/deploy/runners.d.ts +218 -0
  236. package/dist/deploy/runners.d.ts.map +1 -0
  237. package/dist/deploy/runners.js +4 -0
  238. package/dist/deploy/runners.js.map +1 -0
  239. package/dist/dev/bundler.d.ts +10 -0
  240. package/dist/dev/bundler.d.ts.map +1 -0
  241. package/dist/dev/bundler.js +235 -0
  242. package/dist/dev/bundler.js.map +1 -0
  243. package/dist/dev/defaults.d.ts +140 -0
  244. package/dist/dev/defaults.d.ts.map +1 -0
  245. package/dist/dev/defaults.js +709 -0
  246. package/dist/dev/defaults.js.map +1 -0
  247. package/dist/dev/dev-only-imports.d.ts +15 -0
  248. package/dist/dev/dev-only-imports.d.ts.map +1 -0
  249. package/dist/dev/dev-only-imports.js +57 -0
  250. package/dist/dev/dev-only-imports.js.map +1 -0
  251. package/dist/dev/docker-compose.dev.yml +68 -0
  252. package/dist/dev/index-child.d.ts +2 -0
  253. package/dist/dev/index-child.d.ts.map +1 -0
  254. package/dist/dev/index-child.js +53 -0
  255. package/dist/dev/index-child.js.map +1 -0
  256. package/dist/dev/pack-code.d.ts +36 -0
  257. package/dist/dev/pack-code.d.ts.map +1 -0
  258. package/dist/dev/pack-code.js +129 -0
  259. package/dist/dev/pack-code.js.map +1 -0
  260. package/dist/dev/pack-env.d.ts +13 -0
  261. package/dist/dev/pack-env.d.ts.map +1 -0
  262. package/dist/dev/pack-env.js +36 -0
  263. package/dist/dev/pack-env.js.map +1 -0
  264. package/dist/dev/pack-service.d.ts +40 -0
  265. package/dist/dev/pack-service.d.ts.map +1 -0
  266. package/dist/dev/pack-service.js +189 -0
  267. package/dist/dev/pack-service.js.map +1 -0
  268. package/dist/dev/paths.d.ts +22 -0
  269. package/dist/dev/paths.d.ts.map +1 -0
  270. package/dist/dev/paths.js +35 -0
  271. package/dist/dev/paths.js.map +1 -0
  272. package/dist/dev/postgres-container.d.ts +77 -0
  273. package/dist/dev/postgres-container.d.ts.map +1 -0
  274. package/dist/dev/postgres-container.js +346 -0
  275. package/dist/dev/postgres-container.js.map +1 -0
  276. package/dist/dev/python-builder.d.ts +16 -0
  277. package/dist/dev/python-builder.d.ts.map +1 -0
  278. package/dist/dev/python-builder.js +122 -0
  279. package/dist/dev/python-builder.js.map +1 -0
  280. package/dist/dev/register.d.ts +71 -0
  281. package/dist/dev/register.d.ts.map +1 -0
  282. package/dist/dev/register.js +54 -0
  283. package/dist/dev/register.js.map +1 -0
  284. package/dist/dev/runners.d.ts +312 -0
  285. package/dist/dev/runners.d.ts.map +1 -0
  286. package/dist/dev/runners.js +4 -0
  287. package/dist/dev/runners.js.map +1 -0
  288. package/dist/dev/runtime-container.d.ts +71 -0
  289. package/dist/dev/runtime-container.d.ts.map +1 -0
  290. package/dist/dev/runtime-container.js +173 -0
  291. package/dist/dev/runtime-container.js.map +1 -0
  292. package/dist/dev/runtime-env.d.ts +62 -0
  293. package/dist/dev/runtime-env.d.ts.map +1 -0
  294. package/dist/dev/runtime-env.js +100 -0
  295. package/dist/dev/runtime-env.js.map +1 -0
  296. package/dist/dev/runtime-image.d.ts +26 -0
  297. package/dist/dev/runtime-image.d.ts.map +1 -0
  298. package/dist/dev/runtime-image.js +44 -0
  299. package/dist/dev/runtime-image.js.map +1 -0
  300. package/dist/dev/runtime-registry.d.ts +73 -0
  301. package/dist/dev/runtime-registry.d.ts.map +1 -0
  302. package/dist/dev/runtime-registry.js +111 -0
  303. package/dist/dev/runtime-registry.js.map +1 -0
  304. package/dist/env/defaults.d.ts +3 -0
  305. package/dist/env/defaults.d.ts.map +1 -0
  306. package/dist/env/defaults.js +22 -0
  307. package/dist/env/defaults.js.map +1 -0
  308. package/dist/env/pack-env-plan.d.ts +70 -0
  309. package/dist/env/pack-env-plan.d.ts.map +1 -0
  310. package/dist/env/pack-env-plan.js +236 -0
  311. package/dist/env/pack-env-plan.js.map +1 -0
  312. package/dist/env/parser.d.ts +9 -0
  313. package/dist/env/parser.d.ts.map +1 -0
  314. package/dist/env/parser.js +11 -0
  315. package/dist/env/parser.js.map +1 -0
  316. package/dist/env/project-env.d.ts +34 -0
  317. package/dist/env/project-env.d.ts.map +1 -0
  318. package/dist/env/project-env.js +45 -0
  319. package/dist/env/project-env.js.map +1 -0
  320. package/dist/env/runners.d.ts +22 -0
  321. package/dist/env/runners.d.ts.map +1 -0
  322. package/dist/env/runners.js +4 -0
  323. package/dist/env/runners.js.map +1 -0
  324. package/dist/env/writer.d.ts +7 -0
  325. package/dist/env/writer.d.ts.map +1 -0
  326. package/dist/env/writer.js +9 -0
  327. package/dist/env/writer.js.map +1 -0
  328. package/dist/errors.d.ts +31 -0
  329. package/dist/errors.d.ts.map +1 -0
  330. package/dist/errors.js +111 -0
  331. package/dist/errors.js.map +1 -0
  332. package/dist/help.d.ts +5 -0
  333. package/dist/help.d.ts.map +1 -0
  334. package/dist/help.js +61 -0
  335. package/dist/help.js.map +1 -0
  336. package/dist/index.d.ts +13 -0
  337. package/dist/index.d.ts.map +1 -0
  338. package/dist/index.js +13 -0
  339. package/dist/index.js.map +1 -0
  340. package/dist/init/augment-scaffolder.d.ts +86 -0
  341. package/dist/init/augment-scaffolder.d.ts.map +1 -0
  342. package/dist/init/augment-scaffolder.js +538 -0
  343. package/dist/init/augment-scaffolder.js.map +1 -0
  344. package/dist/init/dependency-specs.d.ts +58 -0
  345. package/dist/init/dependency-specs.d.ts.map +1 -0
  346. package/dist/init/dependency-specs.js +153 -0
  347. package/dist/init/dependency-specs.js.map +1 -0
  348. package/dist/init/gitignore-patcher.d.ts +23 -0
  349. package/dist/init/gitignore-patcher.d.ts.map +1 -0
  350. package/dist/init/gitignore-patcher.js +103 -0
  351. package/dist/init/gitignore-patcher.js.map +1 -0
  352. package/dist/init/mode-detect.d.ts +34 -0
  353. package/dist/init/mode-detect.d.ts.map +1 -0
  354. package/dist/init/mode-detect.js +115 -0
  355. package/dist/init/mode-detect.js.map +1 -0
  356. package/dist/init/package-json-patcher.d.ts +36 -0
  357. package/dist/init/package-json-patcher.d.ts.map +1 -0
  358. package/dist/init/package-json-patcher.js +128 -0
  359. package/dist/init/package-json-patcher.js.map +1 -0
  360. package/dist/init/pnpm-workspace-patcher.d.ts +55 -0
  361. package/dist/init/pnpm-workspace-patcher.d.ts.map +1 -0
  362. package/dist/init/pnpm-workspace-patcher.js +248 -0
  363. package/dist/init/pnpm-workspace-patcher.js.map +1 -0
  364. package/dist/init/pyproject-patcher.d.ts +56 -0
  365. package/dist/init/pyproject-patcher.d.ts.map +1 -0
  366. package/dist/init/pyproject-patcher.js +324 -0
  367. package/dist/init/pyproject-patcher.js.map +1 -0
  368. package/dist/init/python-augment.d.ts +22 -0
  369. package/dist/init/python-augment.d.ts.map +1 -0
  370. package/dist/init/python-augment.js +300 -0
  371. package/dist/init/python-augment.js.map +1 -0
  372. package/dist/init/template-files.d.ts +18 -0
  373. package/dist/init/template-files.d.ts.map +1 -0
  374. package/dist/init/template-files.js +53 -0
  375. package/dist/init/template-files.js.map +1 -0
  376. package/dist/key/defaults.d.ts +3 -0
  377. package/dist/key/defaults.d.ts.map +1 -0
  378. package/dist/key/defaults.js +60 -0
  379. package/dist/key/defaults.js.map +1 -0
  380. package/dist/key/fingerprint.d.ts +6 -0
  381. package/dist/key/fingerprint.d.ts.map +1 -0
  382. package/dist/key/fingerprint.js +25 -0
  383. package/dist/key/fingerprint.js.map +1 -0
  384. package/dist/key/paths.d.ts +30 -0
  385. package/dist/key/paths.d.ts.map +1 -0
  386. package/dist/key/paths.js +51 -0
  387. package/dist/key/paths.js.map +1 -0
  388. package/dist/key/runners.d.ts +60 -0
  389. package/dist/key/runners.d.ts.map +1 -0
  390. package/dist/key/runners.js +4 -0
  391. package/dist/key/runners.js.map +1 -0
  392. package/dist/main.d.ts +113 -0
  393. package/dist/main.d.ts.map +1 -0
  394. package/dist/main.js +199 -0
  395. package/dist/main.js.map +1 -0
  396. package/dist/mcp/launcher.d.ts +143 -0
  397. package/dist/mcp/launcher.d.ts.map +1 -0
  398. package/dist/mcp/launcher.js +393 -0
  399. package/dist/mcp/launcher.js.map +1 -0
  400. package/dist/mcp/preset-loader.d.ts +29 -0
  401. package/dist/mcp/preset-loader.d.ts.map +1 -0
  402. package/dist/mcp/preset-loader.js +217 -0
  403. package/dist/mcp/preset-loader.js.map +1 -0
  404. package/dist/mcp/preset-types.d.ts +71 -0
  405. package/dist/mcp/preset-types.d.ts.map +1 -0
  406. package/dist/mcp/preset-types.js +4 -0
  407. package/dist/mcp/preset-types.js.map +1 -0
  408. package/dist/mcp/presets/README.md +68 -0
  409. package/dist/mcp/presets/postgres.json +15 -0
  410. package/dist/output.d.ts +26 -0
  411. package/dist/output.d.ts.map +1 -0
  412. package/dist/output.js +46 -0
  413. package/dist/output.js.map +1 -0
  414. package/dist/pack-config.d.ts +37 -0
  415. package/dist/pack-config.d.ts.map +1 -0
  416. package/dist/pack-config.js +65 -0
  417. package/dist/pack-config.js.map +1 -0
  418. package/dist/package-manager.d.ts +33 -0
  419. package/dist/package-manager.d.ts.map +1 -0
  420. package/dist/package-manager.js +129 -0
  421. package/dist/package-manager.js.map +1 -0
  422. package/dist/parse.d.ts +88 -0
  423. package/dist/parse.d.ts.map +1 -0
  424. package/dist/parse.js +100 -0
  425. package/dist/parse.js.map +1 -0
  426. package/dist/providers/preset-loader.d.ts +47 -0
  427. package/dist/providers/preset-loader.d.ts.map +1 -0
  428. package/dist/providers/preset-loader.js +107 -0
  429. package/dist/providers/preset-loader.js.map +1 -0
  430. package/dist/providers/presets/anthropic.json +47 -0
  431. package/dist/providers/presets/gemini.json +40 -0
  432. package/dist/reference.d.ts +28 -0
  433. package/dist/reference.d.ts.map +1 -0
  434. package/dist/reference.js +52 -0
  435. package/dist/reference.js.map +1 -0
  436. package/dist/sdk-package.d.ts +9 -0
  437. package/dist/sdk-package.d.ts.map +1 -0
  438. package/dist/sdk-package.js +20 -0
  439. package/dist/sdk-package.js.map +1 -0
  440. package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +252 -0
  441. package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +302 -0
  442. package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +297 -0
  443. package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +289 -0
  444. package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +705 -0
  445. package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +298 -0
  446. package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +211 -0
  447. package/dist/sdk-skills/kindgi-getting-started/SKILL.md +189 -0
  448. package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +205 -0
  449. package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +325 -0
  450. package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +176 -0
  451. package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +305 -0
  452. package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +242 -0
  453. package/dist/stop-signal.d.ts +15 -0
  454. package/dist/stop-signal.d.ts.map +1 -0
  455. package/dist/stop-signal.js +16 -0
  456. package/dist/stop-signal.js.map +1 -0
  457. package/dist/templates/minimal/.nvmrc +1 -0
  458. package/dist/templates/minimal/AGENTS.md +23 -0
  459. package/dist/templates/minimal/README.md.tmpl +69 -0
  460. package/dist/templates/minimal/agents/.gitkeep +0 -0
  461. package/dist/templates/minimal/flows/.gitkeep +0 -0
  462. package/dist/templates/minimal/gitignore +8 -0
  463. package/dist/templates/minimal/guardrails/.gitkeep +0 -0
  464. package/dist/templates/minimal/kindgi.config.ts.tmpl +44 -0
  465. package/dist/templates/minimal/package.json.tmpl +25 -0
  466. package/dist/templates/minimal/pnpm-workspace.yaml +8 -0
  467. package/dist/templates/minimal/tools/.gitkeep +0 -0
  468. package/dist/templates/minimal/tsconfig.json.tmpl +27 -0
  469. package/dist/templates/minimal/vitest.config.ts.tmpl +14 -0
  470. package/dist/templates/python/AGENTS.md +30 -0
  471. package/dist/templates/python/README.md.tmpl +56 -0
  472. package/dist/templates/python/agents/echo_agent.py.tmpl +23 -0
  473. package/dist/templates/python/flows/echo_flow.py.tmpl +17 -0
  474. package/dist/templates/python/gitignore +9 -0
  475. package/dist/templates/python/guardrails/response_not_empty.py.tmpl +27 -0
  476. package/dist/templates/python/pyproject.toml.tmpl +42 -0
  477. package/dist/templates/python/tests/test_tools.py.tmpl +22 -0
  478. package/dist/templates/python/tools/echo.py.tmpl +27 -0
  479. package/dist/templates/python/tools/greet.py.tmpl +20 -0
  480. package/dist/templates/sample/.nvmrc +1 -0
  481. package/dist/templates/sample/AGENTS.md +23 -0
  482. package/dist/templates/sample/README.md.tmpl +85 -0
  483. package/dist/templates/sample/agents/echo-agent/index.ts.tmpl +34 -0
  484. package/dist/templates/sample/flows/echo-flow/index.ts.tmpl +59 -0
  485. package/dist/templates/sample/gitignore +8 -0
  486. package/dist/templates/sample/guardrails/response-not-empty/index.ts.tmpl +58 -0
  487. package/dist/templates/sample/kindgi.config.ts.tmpl +41 -0
  488. package/dist/templates/sample/package.json.tmpl +25 -0
  489. package/dist/templates/sample/pnpm-workspace.yaml +8 -0
  490. package/dist/templates/sample/tools/echo/index.test.ts.tmpl +31 -0
  491. package/dist/templates/sample/tools/echo/index.ts.tmpl +37 -0
  492. package/dist/templates/sample/tools/fetch-httpbin/index.ts.tmpl +60 -0
  493. package/dist/templates/sample/tools/greet/index.ts.tmpl +35 -0
  494. package/dist/templates/sample/tsconfig.json.tmpl +27 -0
  495. package/dist/templates/sample/vitest.config.ts.tmpl +14 -0
  496. package/dist/terminal-input.d.ts +17 -0
  497. package/dist/terminal-input.d.ts.map +1 -0
  498. package/dist/terminal-input.js +88 -0
  499. package/dist/terminal-input.js.map +1 -0
  500. package/dist/test/defaults.d.ts +3 -0
  501. package/dist/test/defaults.d.ts.map +1 -0
  502. package/dist/test/defaults.js +104 -0
  503. package/dist/test/defaults.js.map +1 -0
  504. package/dist/test/runners.d.ts +60 -0
  505. package/dist/test/runners.d.ts.map +1 -0
  506. package/dist/test/runners.js +4 -0
  507. package/dist/test/runners.js.map +1 -0
  508. package/dist/version-info.d.ts +9 -0
  509. package/dist/version-info.d.ts.map +1 -0
  510. package/dist/version-info.js +27 -0
  511. package/dist/version-info.js.map +1 -0
  512. package/dist/write-fully.d.ts +13 -0
  513. package/dist/write-fully.d.ts.map +1 -0
  514. package/dist/write-fully.js +17 -0
  515. package/dist/write-fully.js.map +1 -0
  516. package/package.json +63 -4
@@ -0,0 +1,259 @@
1
+ /**
2
+ * Injectable seams for `kindgi build`. Every side effect flows through
3
+ * this interface so tests can substitute fixtures without invoking real
4
+ * esbuild, real `tar`, real `fetch`, or Docker. Production wiring lives
5
+ * at `packages/cli/src/build/defaults.ts`.
6
+ *
7
+ * `kindgi build` is the CLI-side orchestrator, in nine steps:
8
+ *
9
+ * 1. Local indexer pass (integrity gate baseline)
10
+ * 2. esbuild bundle
11
+ * 3. Generate multi-stage Containerfile
12
+ * 4. Tar the bundle
13
+ * 5. Compute sha256(pack.tgz)
14
+ * 6. POST /v1/build + subscribe to SSE build logs (terminal payload =
15
+ * { imageRef, imageDigest, indexJson, indexHash, buildLogsUrl })
16
+ * 7. Local integrity gate — hash diff + optional docker pull + diff
17
+ * 8. Sign locally (Ed25519 over canonicalised envelope body)
18
+ * 9. Emit deploy-envelope.json (`kindgi deploy` POSTs this file)
19
+ *
20
+ * The full pipeline is composed by `commands/build.ts` from the seams
21
+ * declared here. Each seam is named per its pipeline step so a test
22
+ * looking at a failing stage can substitute only that field.
23
+ */
24
+ import type { IndexResult } from '../dev/runners.js';
25
+ /**
26
+ * The manifest slot the local integrity gate uses. Kept structural so
27
+ * tests hand back plain objects without importing
28
+ * `@kindgi/handler-runtime`. Production wiring runs the bundled
29
+ * `kindgi-index.mjs` over the bundles, as the image's indexer stage
30
+ * does, and reads `expected-index.json` back off disk.
31
+ */
32
+ export type LocalIndexResult = IndexResult;
33
+ export interface RunLocalIndexerOptions {
34
+ readonly packDir: string;
35
+ /** The bundles (`esbuildBundle`'s `outputDir`): the indexer, the config, the bundle map. */
36
+ readonly bundleDir: string;
37
+ readonly outputPath: string;
38
+ readonly artifactVersion: string;
39
+ readonly publishedAt: string;
40
+ }
41
+ export interface EsbuildBundleOptions {
42
+ readonly packDir: string;
43
+ readonly outputDir: string;
44
+ /**
45
+ * The pack's discovery patterns (defaults filled in) — every file
46
+ * they match is bundled as an entrypoint, the same set the indexer
47
+ * discovers.
48
+ */
49
+ readonly discoveryPatterns: readonly string[];
50
+ /** The pack's `kindgi.config.*`, bundled to `kindgi.config.mjs`. */
51
+ readonly configPath: string;
52
+ /** The Node major the image runs: the bundles' esbuild target. */
53
+ readonly nodeMajor: number;
54
+ }
55
+ export interface EsbuildBundleResult {
56
+ /** Absolute paths of every emitted file (bundles and sourcemaps). */
57
+ readonly emitted: readonly string[];
58
+ /** Total bundle byte size — surfaced in the summary. */
59
+ readonly totalBytes: number;
60
+ /** The packages the pack's bundles import from `node_modules`, sorted. */
61
+ readonly externals: readonly string[];
62
+ /** Each primitive's source path → its bundle, under `outputDir` (`bundle-map.json`). */
63
+ readonly bundleMap: Readonly<Record<string, string>>;
64
+ }
65
+ import type { HostInstall, HostSecret } from './host-install.js';
66
+ import type { ResolvedImage } from './image-config.js';
67
+ import type { PythonInstaller } from './python-image.js';
68
+ export interface WriteContainerfileOptions {
69
+ readonly outputPath: string;
70
+ readonly artifactVersion: string;
71
+ readonly publishedAt: string;
72
+ /** The pinned base image (`node-image.ts`). */
73
+ readonly baseImageRef: string;
74
+ /** buildTarget threaded into the ARG for the indexer stage. */
75
+ readonly buildTarget: string;
76
+ readonly install: HostInstall;
77
+ /** What `image` in `kindgi.config` adds. */
78
+ readonly image: ResolvedImage;
79
+ /** Whether the context has `include/` (`bundle.include` files). */
80
+ readonly hasIncludes: boolean;
81
+ }
82
+ export interface WriteContextOptions {
83
+ readonly contextDir: string;
84
+ readonly packDir: string;
85
+ readonly install: HostInstall;
86
+ readonly bundleDir: string;
87
+ readonly containerfilePath: string;
88
+ /** `bundle.include` files, relative to `packDir`. */
89
+ readonly includes: readonly string[];
90
+ /** The files the image's build extensions read, relative to `packDir`. */
91
+ readonly extensionFiles: readonly string[];
92
+ }
93
+ export interface TarPackOptions {
94
+ /** A context `writeContext` wrote; removed once tarred. */
95
+ readonly contextDir: string;
96
+ readonly outputPath: string;
97
+ }
98
+ export interface DockerBuildOptions {
99
+ readonly contextDir: string;
100
+ readonly tag: string;
101
+ readonly buildTarget: string;
102
+ /** The image's platform (`linux/amd64`). Absent: this machine's. */
103
+ readonly platform?: string;
104
+ /** Push `tag` to its registry instead of loading it into the local image store. */
105
+ readonly push?: boolean;
106
+ /** Registry config for the install, as BuildKit secrets. */
107
+ readonly secrets: readonly (Pick<HostSecret, 'id'> & {
108
+ readonly src: string;
109
+ })[];
110
+ readonly onLog?: (line: string) => void;
111
+ }
112
+ export type DockerBuildResult = {
113
+ readonly kind: 'ok';
114
+ /** Loaded: the local image id. Pushed: the pushed manifest's digest. */
115
+ readonly imageId: string;
116
+ /** Pushed: the digest the registry has (`sha256:…`). */
117
+ readonly digest?: string;
118
+ } | {
119
+ readonly kind: 'err';
120
+ readonly message: string;
121
+ };
122
+ export interface TarPackResult {
123
+ readonly path: string;
124
+ readonly bytes: Uint8Array;
125
+ readonly size: number;
126
+ }
127
+ export interface PostBuildOptions {
128
+ readonly endpoint: string;
129
+ readonly tarballBytes: Uint8Array;
130
+ readonly tarballSha256: string;
131
+ readonly buildTarget: string;
132
+ readonly registryPushCredsRef?: string;
133
+ readonly fetchImpl: typeof fetch;
134
+ }
135
+ export interface PostBuildResult {
136
+ readonly buildJobId: string;
137
+ readonly status: 'queued' | 'running' | 'completed' | 'failed';
138
+ readonly buildLogsUrl: string;
139
+ /**
140
+ * When the build server replays an idempotent hit (200 with existing
141
+ * completed job), the terminal payload is returned inline — the caller
142
+ * can skip the SSE stream.
143
+ */
144
+ readonly terminal?: TerminalPayload;
145
+ }
146
+ export interface TerminalPayload {
147
+ readonly status: 'completed' | 'failed';
148
+ readonly imageRef?: string;
149
+ readonly imageDigest?: string;
150
+ readonly indexJson?: Readonly<Record<string, unknown>>;
151
+ readonly indexHash?: string;
152
+ readonly buildLogsUrl?: string;
153
+ readonly error?: {
154
+ readonly code: string;
155
+ readonly message: string;
156
+ };
157
+ }
158
+ export interface StreamBuildLogsOptions {
159
+ readonly endpoint: string;
160
+ readonly buildJobId: string;
161
+ readonly fetchImpl: typeof fetch;
162
+ readonly onLog: (line: string) => void;
163
+ readonly signal?: AbortSignal;
164
+ }
165
+ export interface PullImageIndexOptions {
166
+ readonly imageRef: string;
167
+ readonly workDir: string;
168
+ /** `false`: the image is in the local store already (`--local`). Default: pull it. */
169
+ readonly pull?: boolean;
170
+ /** The image's platform, when it isn't this machine's (an amd64 image on Apple silicon). */
171
+ readonly platform?: string;
172
+ readonly onLog?: (line: string) => void;
173
+ readonly signal?: AbortSignal;
174
+ }
175
+ export interface PullImageIndexResult {
176
+ /** Raw bytes of `/app/index.json` extracted from the image. */
177
+ readonly bytes: Uint8Array;
178
+ }
179
+ export interface SignOptions {
180
+ /** PEM-encoded PKCS8 Ed25519 private key. */
181
+ readonly privateKeyPem: string;
182
+ /** Bytes to sign — the canonicalised signature body. */
183
+ readonly message: Uint8Array;
184
+ }
185
+ export interface SignResult {
186
+ /** Base64-encoded 64-byte signature. */
187
+ readonly signatureBase64: string;
188
+ /** PEM-encoded public key derived from the private key. */
189
+ readonly publicKeyPem: string;
190
+ }
191
+ /**
192
+ * The steps that differ for a Python pack (`[tool.kindgi]` in
193
+ * `pyproject.toml`): no bundle — its own indexer with the pack's
194
+ * interpreter, its own Containerfile, the pack root as the context.
195
+ */
196
+ export interface PythonBuildRunners {
197
+ readonly runLocalIndexer: (opts: Omit<RunLocalIndexerOptions, 'bundleDir'> & {
198
+ readonly python: readonly [string, ...string[]];
199
+ readonly env: Readonly<Record<string, string>>;
200
+ }) => Promise<LocalIndexResult>;
201
+ readonly writeContainerfile: (opts: Omit<WriteContainerfileOptions, 'baseImageRef' | 'install' | 'image' | 'hasIncludes'> & {
202
+ readonly baseImageRef: string;
203
+ readonly uvImageRef: string;
204
+ readonly installer: PythonInstaller;
205
+ /** Debian packages for the image, checked (`checkAptPackages`). */
206
+ readonly systemPackages: readonly string[];
207
+ }) => Promise<void>;
208
+ /** Tars `files` (pack-relative) and the Containerfile, deterministically. */
209
+ readonly tarContext: (opts: {
210
+ readonly packDir: string;
211
+ readonly files: readonly string[];
212
+ readonly containerfilePath: string;
213
+ readonly outputPath: string;
214
+ }) => Promise<TarPackResult>;
215
+ }
216
+ /**
217
+ * Injected seams the `build` command consumes. Every side effect must
218
+ * pass through one of these — no `import('esbuild')` / `import('tar')`
219
+ * inside `commands/build.ts` and no direct docker or filesystem writes
220
+ * outside these methods. Tests substitute per-field to exercise every
221
+ * pipeline branch without ever booting real esbuild / real tar / real
222
+ * docker / real network.
223
+ */
224
+ export interface BuildRunners {
225
+ /** Runs the CLI's own indexer against the pack + writes to `outputPath`. */
226
+ readonly runLocalIndexer: (opts: RunLocalIndexerOptions) => Promise<LocalIndexResult>;
227
+ /** Bundles the pack source + framework entrypoints into `outputDir`. */
228
+ readonly esbuildBundle: (opts: EsbuildBundleOptions) => Promise<EsbuildBundleResult>;
229
+ /** Emits the multi-stage Containerfile at `outputPath`. */
230
+ readonly writeContainerfile: (opts: WriteContainerfileOptions) => Promise<void>;
231
+ /** Writes the image's build context: the install's files, the bundles, the includes, the Containerfile. */
232
+ readonly writeContext: (opts: WriteContextOptions) => Promise<void>;
233
+ /** Tars a written context into a single gzipped archive. */
234
+ readonly tarPack: (opts: TarPackOptions) => Promise<TarPackResult>;
235
+ /** `--local`: builds the image into the local Docker image store. */
236
+ readonly dockerBuild?: (opts: DockerBuildOptions) => Promise<DockerBuildResult>;
237
+ /** POSTs the tarball to `POST /v1/build`. */
238
+ readonly postBuild: (opts: PostBuildOptions) => Promise<PostBuildResult>;
239
+ /**
240
+ * Subscribes to `GET /v1/build/:jobId/stream`. Forwards each `log`
241
+ * event to `onLog`. Resolves with the terminal payload the server
242
+ * emits before closing the stream.
243
+ */
244
+ readonly streamBuildLogs: (opts: StreamBuildLogsOptions) => Promise<TerminalPayload>;
245
+ /**
246
+ * Optional docker-pull-and-extract path. When absent OR when the
247
+ * command runs with `--skip-image-pull`, the integrity gate uses only
248
+ * the hash-comparison path.
249
+ */
250
+ readonly pullImageIndex?: (opts: PullImageIndexOptions) => Promise<PullImageIndexResult>;
251
+ /**
252
+ * Ed25519 signature over the canonicalised envelope body. Returns the
253
+ * base64-encoded signature + the derived public key in PEM.
254
+ */
255
+ readonly signEnvelope: (opts: SignOptions) => Promise<SignResult>;
256
+ /** A Python pack's steps; absent → `kindgi build` refuses a Python pack. */
257
+ readonly python?: PythonBuildRunners;
258
+ }
259
+ //# sourceMappingURL=runners.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runners.d.ts","sourceRoot":"","sources":["../../src/build/runners.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,WAAW,EA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K,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzF;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAClE,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;CACtC"}
@@ -0,0 +1,4 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright (C) 2026 Kindgi Inc.
3
+ export {};
4
+ //# sourceMappingURL=runners.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runners.js","sourceRoot":"","sources":["../../src/build/runners.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC"}
@@ -0,0 +1,2 @@
1
+ export declare function satisfiesSpecifiers(version: string, specifiers: string): boolean | undefined;
2
+ //# sourceMappingURL=version-specifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-specifier.d.ts","sourceRoot":"","sources":["../../src/build/version-specifier.ts"],"names":[],"mappings":"AAaA,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAe5F"}
@@ -0,0 +1,70 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright (C) 2026 Kindgi Inc.
3
+ export function satisfiesSpecifiers(version, specifiers) {
4
+ const v = parseRelease(version);
5
+ if (v === undefined)
6
+ return undefined;
7
+ const clauses = specifiers
8
+ .split(',')
9
+ .map((c) => c.trim())
10
+ .filter((c) => c !== '');
11
+ if (clauses.length === 0)
12
+ return undefined;
13
+ let all = true;
14
+ for (const clause of clauses) {
15
+ const ok = satisfies(v, clause);
16
+ if (ok === undefined)
17
+ return undefined;
18
+ all &&= ok;
19
+ }
20
+ return all;
21
+ }
22
+ function satisfies(v, clause) {
23
+ const m = /^(~=|===|==|!=|<=|>=|<|>)\s*([0-9]+(?:\.[0-9]+)*)(\.\*)?$/.exec(clause);
24
+ if (m === null)
25
+ return undefined;
26
+ const [, op, raw, wildcard] = m;
27
+ const target = parseRelease(raw);
28
+ if (wildcard !== undefined) {
29
+ if (op !== '==' && op !== '!=')
30
+ return undefined;
31
+ const prefix = startsWith(v, target);
32
+ return op === '==' ? prefix : !prefix;
33
+ }
34
+ const c = compare(v, target);
35
+ switch (op) {
36
+ case '==':
37
+ case '===':
38
+ return c === 0;
39
+ case '!=':
40
+ return c !== 0;
41
+ case '<':
42
+ return c < 0;
43
+ case '<=':
44
+ return c <= 0;
45
+ case '>':
46
+ return c > 0;
47
+ case '>=':
48
+ return c >= 0;
49
+ default:
50
+ // `~=X.Y.Z` is `>=X.Y.Z, ==X.Y.*`; it needs two release segments.
51
+ if (target.length < 2)
52
+ return undefined;
53
+ return c >= 0 && startsWith(v, target.slice(0, -1));
54
+ }
55
+ }
56
+ function parseRelease(text) {
57
+ return /^[0-9]+(\.[0-9]+)*$/.test(text) ? text.split('.').map(Number) : undefined;
58
+ }
59
+ function compare(a, b) {
60
+ for (let i = 0; i < Math.max(a.length, b.length); i += 1) {
61
+ const d = (a[i] ?? 0) - (b[i] ?? 0);
62
+ if (d !== 0)
63
+ return d;
64
+ }
65
+ return 0;
66
+ }
67
+ function startsWith(v, prefix) {
68
+ return prefix.every((part, i) => (v[i] ?? 0) === part);
69
+ }
70
+ //# sourceMappingURL=version-specifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-specifier.js","sourceRoot":"","sources":["../../src/build/version-specifier.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAYjC,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,UAAkB;IACrE,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,MAAM,OAAO,GAAG,UAAU;SACvB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,E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AE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,15 @@
1
+ /** The running `@kindgi/cli` package — its root, version, and the SDK spec it depends on. */
2
+ export interface CliPackageInfo {
3
+ readonly root: string;
4
+ readonly version: string;
5
+ /** `dependencies['@kindgi/sdk']` — `workspace:*` in a checkout, a version once published. */
6
+ readonly sdkDependency: string | undefined;
7
+ }
8
+ /**
9
+ * Walk up from this module to the `package.json` named `@kindgi/cli`.
10
+ * Works from `src/` (tests) and `dist/` (built), in a checkout or under
11
+ * `node_modules`. Companion to `resolveSdkPackageRoot` — no repo-layout
12
+ * assumption. `undefined` when not found (broken install).
13
+ */
14
+ export declare function resolveCliPackage(): CliPackageInfo | undefined;
15
+ //# sourceMappingURL=cli-package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-package.d.ts","sourceRoot":"","sources":["../src/cli-package.ts"],"names":[],"mappings":"AAOA,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6FAA6F;IAC7F,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,SAAS,CAS9D"}
@@ -0,0 +1,37 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright (C) 2026 Kindgi Inc.
3
+ import { readFileSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ /**
7
+ * Walk up from this module to the `package.json` named `@kindgi/cli`.
8
+ * Works from `src/` (tests) and `dist/` (built), in a checkout or under
9
+ * `node_modules`. Companion to `resolveSdkPackageRoot` — no repo-layout
10
+ * assumption. `undefined` when not found (broken install).
11
+ */
12
+ export function resolveCliPackage() {
13
+ let dir = dirname(fileURLToPath(import.meta.url));
14
+ for (;;) {
15
+ const info = readCliPackageJson(join(dir, 'package.json'));
16
+ if (info !== undefined)
17
+ return { root: dir, ...info };
18
+ const parent = dirname(dir);
19
+ if (parent === dir)
20
+ return undefined;
21
+ dir = parent;
22
+ }
23
+ }
24
+ function readCliPackageJson(path) {
25
+ let pkg;
26
+ try {
27
+ pkg = JSON.parse(readFileSync(path, 'utf8'));
28
+ }
29
+ catch {
30
+ return undefined;
31
+ }
32
+ if (pkg.name !== '@kindgi/cli' || typeof pkg.version !== 'string')
33
+ return undefined;
34
+ const sdk = pkg.dependencies?.['@kindgi/sdk'];
35
+ return { version: pkg.version, sdkDependency: typeof sdk === 'string' ? sdk : undefined };
36
+ }
37
+ //# sourceMappingURL=cli-package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-package.js","sourceRoot":"","sources":["../src/cli-package.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAUzC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,IAAI,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,SAAS,CAAC;QACR,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;QAC3D,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;QACtD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,SAAS,CAAC;QACrC,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CACzB,IAAY;IAEZ,IAAI,GAAkF,CAAC;IACvF,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAe,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,KAAK,aAAa,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACpF,MAAM,GAAG,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,aAAa,CAAC,CAAC;IAC9C,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AAC5F,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // Copyright (C) 2026 Kindgi Inc.
4
+ import { runCli } from './main.js';
5
+ import { createStopSignal } from './stop-signal.js';
6
+ import { writeFully } from './write-fully.js';
7
+ async function main() {
8
+ // SIGINT/SIGTERM → an AbortSignal so long-lived commands (currently
9
+ // only `kindgi dev` — the watch loop) can shut down cleanly; a second
10
+ // signal forces the exit. Short-lived commands never observe it.
11
+ const stopSignal = createStopSignal(process, (code) => process.exit(code));
12
+ const outcome = await runCli({
13
+ argv: process.argv.slice(2),
14
+ env: process.env,
15
+ stopSignal,
16
+ });
17
+ // Exit once the output is out: piped output would be cut otherwise.
18
+ await writeFully(process.stdout, outcome.stdout);
19
+ await writeFully(process.stderr, outcome.stderr);
20
+ process.exit(outcome.exitCode);
21
+ }
22
+ main().catch(async (err) => {
23
+ await writeFully(process.stderr, `Fatal: ${err instanceof Error ? (err.stack ?? err.message) : String(err)}\n`);
24
+ process.exit(1);
25
+ });
26
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,sCAAsC;AACtC,iCAAiC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,KAAK,UAAU,IAAI;IACjB,oEAAoE;IACpE,sEAAsE;IACtE,iEAAiE;IACjE,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE3E,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC;QAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3B,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,UAAU;KACX,CAAC,CAAC;IACH,oEAAoE;IACpE,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAY,EAAE,EAAE;IAClC,MAAM,UAAU,CACd,OAAO,CAAC,MAAM,EACd,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAC9E,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from './types.js';
2
+ export declare const adaptersCommand: Command;
3
+ //# sourceMappingURL=adapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../src/commands/adapters.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAA8B,MAAM,YAAY,CAAC;AAiJtE,eAAO,MAAM,eAAe,EAAE,OAM7B,CAAC"}
@@ -0,0 +1,148 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright (C) 2026 Kindgi Inc.
3
+ import { commandResultFromThrown, requiredPositional, stringFlag } from './helpers.js';
4
+ const prepareCmd = {
5
+ kind: 'leaf',
6
+ name: 'prepare',
7
+ description: 'Pre-warm an adapter (download weights, initialize sessions). Streams SSE progress. Call after `providers register`, before `runs start`.',
8
+ usage: 'kindgi adapters prepare <adapter-id> [--model=<key>] [--params=<json-or-@file>]',
9
+ optionSpec: {
10
+ model: {
11
+ type: 'string',
12
+ description: 'The model to prepare, by key: shorthand for a `model` field in `--params`, and wins over it.',
13
+ },
14
+ params: {
15
+ type: 'string',
16
+ description: "The adapter's prepare settings, as an inline JSON object.",
17
+ },
18
+ },
19
+ run: async (ctx) => {
20
+ let adapterId;
21
+ try {
22
+ adapterId = requiredPositional(ctx, 0, 'adapter-id');
23
+ }
24
+ catch (err) {
25
+ return { kind: 'error', stderr: `${err.message}\n`, exitCode: 2 };
26
+ }
27
+ // Compose adapter params. `--model=<key>` is a shorthand for the
28
+ // in-process ONNX adapter (its only meaningful param); `--params`
29
+ // accepts an arbitrary JSON blob for any adapter.
30
+ const paramsFlag = stringFlag(ctx, 'params');
31
+ const modelFlag = stringFlag(ctx, 'model');
32
+ let params;
33
+ if (paramsFlag !== undefined) {
34
+ try {
35
+ params = JSON.parse(paramsFlag);
36
+ }
37
+ catch (err) {
38
+ return {
39
+ kind: 'error',
40
+ stderr: `Malformed --params JSON: ${err.message}\n`,
41
+ exitCode: 2,
42
+ };
43
+ }
44
+ }
45
+ if (modelFlag !== undefined) {
46
+ params = { ...(params ?? {}), model: modelFlag };
47
+ }
48
+ // Wire SIGINT / stopSignal to the SSE stream so Ctrl-C aborts
49
+ // mid-download cleanly instead of leaving a dangling connection.
50
+ const controller = new AbortController();
51
+ const upstream = ctx.stopSignal;
52
+ if (upstream !== undefined) {
53
+ if (upstream.aborted)
54
+ controller.abort();
55
+ else
56
+ upstream.addEventListener('abort', () => controller.abort(), { once: true });
57
+ }
58
+ const iterable = ctx.client().adapters.prepare({
59
+ adapterId,
60
+ ...(params !== undefined && { params }),
61
+ signal: controller.signal,
62
+ });
63
+ const jsonMode = ctx.globals.format === 'json';
64
+ const events = [];
65
+ const stdoutChunks = [];
66
+ const stderrChunks = [];
67
+ stderrChunks.push(`\n Preparing ${adapterId}${params !== undefined ? ` (${JSON.stringify(params)})` : ''}…\n`);
68
+ try {
69
+ for await (const event of iterable) {
70
+ events.push(event);
71
+ if (jsonMode) {
72
+ stdoutChunks.push(`${JSON.stringify(event)}\n`);
73
+ }
74
+ else {
75
+ stderrChunks.push(renderProgressLine(event));
76
+ }
77
+ if (event.kind === 'ready' || event.kind === 'error')
78
+ break;
79
+ }
80
+ }
81
+ catch (err) {
82
+ return commandResultFromThrown(err, ctx, 'kindgi adapters prepare');
83
+ }
84
+ const terminal = events[events.length - 1];
85
+ if (terminal?.kind === 'error') {
86
+ return {
87
+ kind: 'error',
88
+ stderr: [...stderrChunks, `\n Failed: ${terminal.message}\n\n`].join(''),
89
+ exitCode: 1,
90
+ };
91
+ }
92
+ if (jsonMode) {
93
+ return {
94
+ kind: 'ok',
95
+ rendered: {
96
+ stdout: stdoutChunks.join(''),
97
+ stderr: stderrChunks.join(''),
98
+ },
99
+ };
100
+ }
101
+ const summary = terminal?.kind === 'ready'
102
+ ? (terminal.message ?? 'ready')
103
+ : 'stream ended without terminal event';
104
+ stderrChunks.push(`\n Ready: ${summary}\n\n`);
105
+ return {
106
+ kind: 'ok',
107
+ rendered: {
108
+ stdout: '',
109
+ stderr: stderrChunks.join(''),
110
+ },
111
+ };
112
+ },
113
+ };
114
+ function renderProgressLine(event) {
115
+ if (event.kind === 'ready') {
116
+ return ` ✓ ${event.message ?? 'ready'}\n`;
117
+ }
118
+ if (event.kind === 'error') {
119
+ return ` ✗ ${event.message}\n`;
120
+ }
121
+ // progress
122
+ const parts = [];
123
+ if (event.message !== undefined)
124
+ parts.push(event.message);
125
+ if (typeof event.ratio === 'number') {
126
+ parts.push(`${Math.round(event.ratio * 100)}%`);
127
+ }
128
+ if (typeof event.loadedBytes === 'number' && typeof event.totalBytes === 'number') {
129
+ parts.push(`(${formatBytes(event.loadedBytes)} / ${formatBytes(event.totalBytes)})`);
130
+ }
131
+ return ` ${parts.join(' ')}\n`;
132
+ }
133
+ function formatBytes(n) {
134
+ if (n < 1024)
135
+ return `${n} B`;
136
+ if (n < 1024 * 1024)
137
+ return `${(n / 1024).toFixed(1)} KB`;
138
+ if (n < 1024 * 1024 * 1024)
139
+ return `${(n / (1024 * 1024)).toFixed(1)} MB`;
140
+ return `${(n / (1024 * 1024 * 1024)).toFixed(2)} GB`;
141
+ }
142
+ export const adaptersCommand = {
143
+ kind: 'group',
144
+ name: 'adapters',
145
+ description: 'Manage adapter lifecycle (prepare / warmup). Read-side lives on `kindgi providers`.',
146
+ subcommands: [prepareCmd],
147
+ };
148
+ //# sourceMappingURL=adapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/commands/adapters.ts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,OAAO,GAAG,CAAC,IAAI,CAAC;IAC9B,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1E,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAY;IACtC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,qFAAqF;IACvF,WAAW,EAAE,CAAC,UAAU,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from './types.js';
2
+ export declare const agentsCommand: Command;
3
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,YAAY,CAAC;AAwFvD,eAAO,MAAM,aAAa,EAAE,OAK3B,CAAC"}