@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
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ node_modules/
2
+ dist/
3
+ .kindgi/
4
+ .kindgirc.json
5
+ *.tsbuildinfo
6
+ .env
7
+ .env.local
8
+ .DS_Store
File without changes
@@ -0,0 +1,44 @@
1
+ // Kindgi pack config — scaffolded by `kindgi init --template=minimal`.
2
+
3
+ const config = {
4
+ pack: {
5
+ id: '{{PACK_ID}}',
6
+ version: '{{PACK_VERSION}}',
7
+ description: 'A minimal Kindgi pack.',
8
+ },
9
+ discovery: {
10
+ tools: 'tools/**/*.ts',
11
+ guardrails: 'guardrails/**/*.ts',
12
+ agents: 'agents/**/*.ts',
13
+ flows: 'flows/**/*.ts',
14
+ },
15
+ // ---------------------------------------------------------------
16
+ // Environments — one entry per deploy target (staging / production
17
+ // / preview / custom). Each names the build server endpoint, the
18
+ // signing key path (Ed25519 PEM, never leaves the developer's
19
+ // machine), the target registry (build server pushes here on your
20
+ // behalf), and the tenantId the Kindgi runtime scopes the
21
+ // deployment to. Consumed by `kindgi build` + `kindgi deploy`.
22
+ //
23
+ // Fill these in when you're ready to push a build off the laptop.
24
+ // Local `kindgi dev` does NOT read this block.
25
+ // ---------------------------------------------------------------
26
+ environments: {
27
+ staging: {
28
+ endpoint: 'https://api.staging.example.com',
29
+ build: 'http://localhost:8787', // your Kindgi build server
30
+ registry: 'ghcr.io/your-org',
31
+ signingKey: '~/.kindgi/keys/staging.pem',
32
+ tenantId: 'tenant-your-org-staging',
33
+ },
34
+ production: {
35
+ endpoint: 'https://api.example.com',
36
+ build: 'https://build.example.com',
37
+ registry: 'ghcr.io/your-org',
38
+ signingKey: '~/.kindgi/keys/production.pem',
39
+ tenantId: 'tenant-your-org-production',
40
+ },
41
+ },
42
+ } as const;
43
+
44
+ export default config;
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "{{PACK_NAME}}",
3
+ "version": "{{PACK_VERSION}}",
4
+ "private": true,
5
+ "description": "Kindgi pack — scaffolded by `kindgi init --template=minimal`.",
6
+ "license": "UNLICENSED",
7
+ "type": "module",
8
+ "engines": {
9
+ "node": ">=22.0.0"
10
+ },
11
+ "scripts": {
12
+ "typecheck": "tsc --noEmit",
13
+ "test": "vitest run"
14
+ },
15
+ "dependencies": {
16
+ "@kindgi/sdk": "workspace:*",
17
+ "zod": "^4.0.0"
18
+ },
19
+ "devDependencies": {
20
+ "@kindgi/cli": "workspace:*",
21
+ "@types/node": "^22.0.0",
22
+ "typescript": "^5.7.3",
23
+ "vitest": "^3.0.0"
24
+ }
25
+ }
@@ -0,0 +1,8 @@
1
+ # pnpm 12+ reads settings from this file, not from `package.json`'s
2
+ # `pnpm` block. `allowBuilds` records, per dependency, whether pnpm runs
3
+ # its install script (true) or skips it (false); pnpm 11+ stops an install
4
+ # until each one has a decision. esbuild (the CLI's bundler, and vitest's
5
+ # transform) works without its script: its native binary comes from its
6
+ # `@esbuild/<platform>` package, so the script stays off.
7
+ allowBuilds:
8
+ esbuild: false
File without changes
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2023",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "lib": ["ES2023", "DOM"],
7
+ "types": ["node"],
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "verbatimModuleSyntax": true,
12
+ "isolatedModules": true,
13
+ "declaration": true,
14
+ "sourceMap": true,
15
+ "noEmit": true,
16
+ "resolveJsonModule": true,
17
+ "forceConsistentCasingInFileNames": true
18
+ },
19
+ "include": [
20
+ "tools/**/*.ts",
21
+ "guardrails/**/*.ts",
22
+ "agents/**/*.ts",
23
+ "flows/**/*.ts",
24
+ "kindgi.config.ts"
25
+ ],
26
+ "exclude": ["node_modules", "dist", ".kindgi"]
27
+ }
@@ -0,0 +1,14 @@
1
+ // Vitest configuration for {{PACK_NAME}}. Scaffolded by `kindgi init`.
2
+ // `kindgi test` shells out to the pack's local vitest install using
3
+ // this config — the CLI does NOT force a vitest version through.
4
+
5
+ import { defineConfig } from 'vitest/config';
6
+
7
+ export default defineConfig({
8
+ test: {
9
+ include: ['**/*.test.ts'],
10
+ exclude: ['node_modules/**', '.kindgi/**', 'dist/**'],
11
+ reporters: ['default'],
12
+ passWithNoTests: true,
13
+ },
14
+ });
@@ -0,0 +1,30 @@
1
+ # AGENTS.md
2
+
3
+ This directory is a Kindgi pack written in Python (the `kindgi` package).
4
+ Tools are `@tool` functions, guardrail checks `@guardrail` functions; agents
5
+ (`Agent`) and flows (`Flow`) are data. Each lives at module level in a file
6
+ under `tools/`, `guardrails/`, `agents/` or `flows/`; a helper module there
7
+ starts with `_`. The config is `[tool.kindgi]` in `pyproject.toml`.
8
+
9
+ - `kindgi dev` boots Kindgi locally and runs this pack's code with its own
10
+ `.venv`, reloading on every save.
11
+ - `uv run pytest` runs the tests; a `Tool` or `Guardrail` is still callable.
12
+ - `uv run python -m kindgi.pack index --pack-dir .` shows what Kindgi sees.
13
+ - Agents answer through a model provider. `kindgi dev` gives a new pack
14
+ `dev-echo`, a fallback that calls the first tool and replies
15
+ "Tool responded: …" while no other provider fits. For Claude:
16
+ `kindgi providers register --preset=anthropic` (the key in `.env`
17
+ first); other providers and per-agent model choice:
18
+ `.claude/skills/kindgi-authoring-providers/SKILL.md`.
19
+
20
+ ## Skills
21
+
22
+ `.claude/skills/` holds Kindgi's skills for Python packs: getting started,
23
+ tools, guardrails and agents in Python (`kindgi-python-*`), model providers,
24
+ MCP servers, framework feedback. Claude Code loads them on its own; other
25
+ coding agents can read them. `kindgi skills sync` refreshes them.
26
+
27
+ When you diagnose a framework bug (something in Kindgi itself, not in this
28
+ pack's code), append an entry to `FEEDBACK.md` at the pack root via
29
+ `kindgi feedback write` — see
30
+ `.claude/skills/kindgi-framework-feedback/SKILL.md`.
@@ -0,0 +1,56 @@
1
+ # {{PACK_NAME}}
2
+
3
+ A sample Kindgi pack in Python — scaffolded by `kindgi init --template=python`.
4
+
5
+ Two tools (`echo`, `greet`), one guardrail (`response-not-empty`), one agent
6
+ that uses both tools and the guardrail, and one flow that runs the echo tool.
7
+
8
+ ## Layout
9
+
10
+ ```
11
+ {{PACK_NAME}}/
12
+ ├── pyproject.toml # [tool.kindgi] — the pack's id and version
13
+ ├── tools/echo.py # @tool — pydantic in, pydantic out
14
+ ├── tools/greet.py # @tool
15
+ ├── guardrails/response_not_empty.py # @guardrail — a zero-LLM check over the run
16
+ ├── agents/echo_agent.py # Agent(...) — data
17
+ ├── flows/echo_flow.py # Flow(...) — data
18
+ └── tests/test_tools.py # the tools and the check, called directly
19
+ ```
20
+
21
+ ## Run
22
+
23
+ ```sh
24
+ uv sync # .venv with kindgi and the dev tools
25
+ uv run pytest
26
+ kindgi dev # boots Kindgi locally and runs this pack's code, reloading on save
27
+ ```
28
+
29
+ `kindgi dev` uses the pack's `.venv/bin/python` (or `dev.python` in
30
+ `[tool.kindgi]`). Then, from another terminal:
31
+
32
+ ```sh
33
+ kindgi runs start --agent={{PACK_ID}}.echo-agent --input='{"userMessage":"hi"}'
34
+ ```
35
+
36
+ ## Use a real model
37
+
38
+ `kindgi dev` gives a new pack `dev-echo`, a fallback provider that calls the
39
+ first tool and replies "Tool responded: …" — it answers only while no other
40
+ provider fits. To use Claude, with `kindgi dev` running, from another terminal:
41
+
42
+ ```sh
43
+ kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
44
+ kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
45
+ ```
46
+
47
+ Claude takes over from dev-echo on the next turn; nothing to restart.
48
+ `--models=claude-haiku-4-5` registers one model only; `kindgi providers
49
+ presets` lists the presets (Gemini on Vertex AI too). Picking a model per
50
+ agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
51
+
52
+ ## Build
53
+
54
+ `kindgi build --env=<name>` makes the pack's image: dependencies from `uv.lock`
55
+ (run `uv lock` first), the index built in the image, the pack service as its
56
+ entrypoint.
@@ -0,0 +1,23 @@
1
+ """{{PACK_ID}}.echo-agent — uses both tools; the response-not-empty guardrail guards its answer."""
2
+
3
+ from kindgi import Agent
4
+
5
+ from ..guardrails.response_not_empty import response_not_empty
6
+ from ..tools.echo import echo
7
+ from ..tools.greet import greet
8
+
9
+ echo_agent = Agent(
10
+ id="{{PACK_ID}}.echo-agent",
11
+ version="{{PACK_VERSION}}",
12
+ name="Echo Agent",
13
+ description="Uses the pack's echo and greet tools; the response-not-empty guardrail guards the output.",
14
+ instructions=(
15
+ "For each user message: if the user sends a name, invoke `{{PACK_ID}}.greet` with it. "
16
+ "Otherwise invoke `{{PACK_ID}}.echo` with the message text. Quote the tool result verbatim."
17
+ ),
18
+ capabilities=[{"needs": [{"feature": "tool-use"}]}],
19
+ tools=[echo, greet],
20
+ guardrails=[response_not_empty],
21
+ conversation_policy={"historyLimit": 10},
22
+ budget={"maxSteps": 4, "maxCostUsd": 0.1, "maxWallMs": 60_000},
23
+ )
@@ -0,0 +1,17 @@
1
+ """{{PACK_ID}}.echo-flow — runs the pack's echo tool, then ends."""
2
+
3
+ from kindgi import Flow
4
+
5
+ from ..tools.echo import echo
6
+
7
+ echo_flow = Flow(
8
+ id="{{PACK_ID}}.echo-flow",
9
+ version="{{PACK_VERSION}}",
10
+ name="Echo Flow",
11
+ description="Runs the pack's echo tool and terminates.",
12
+ nodes=[{"id": "echo", "kind": "tool", "ref": echo}],
13
+ edges=[
14
+ {"id": "e-start", "from": "$start", "to": "echo"},
15
+ {"id": "e-end", "from": "echo", "to": "$end"},
16
+ ],
17
+ )
@@ -0,0 +1,9 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .kindgi/
6
+ .kindgirc.json
7
+ .env
8
+ .env.*
9
+ !.env.example
@@ -0,0 +1,27 @@
1
+ """{{PACK_ID}}.response-not-empty — a zero-LLM guardrail: the run's answer has content."""
2
+
3
+ from pydantic import BaseModel, Field
4
+
5
+ from kindgi import CheckResult, RunTrace, guardrail
6
+
7
+
8
+ class Config(BaseModel):
9
+ min_length: int = Field(1, alias="minLength", ge=0)
10
+
11
+
12
+ @guardrail(
13
+ id="{{PACK_ID}}.response-not-empty",
14
+ name="Response is non-empty",
15
+ check_id="{{PACK_ID}}.checks.response-not-empty",
16
+ on_violation="halt",
17
+ severity="error",
18
+ scope={"when": "runtime-only"},
19
+ )
20
+ def response_not_empty(config: Config, trace: RunTrace) -> CheckResult:
21
+ text = (trace.output or "").strip()
22
+ if len(text) < config.min_length:
23
+ return CheckResult(
24
+ passed=False,
25
+ reason=f"Response too short: {len(text)} chars, expected >= {config.min_length}.",
26
+ )
27
+ return CheckResult(passed=True)
@@ -0,0 +1,42 @@
1
+ [project]
2
+ name = "{{PACK_NAME}}"
3
+ version = "{{PACK_VERSION}}"
4
+ description = "A Kindgi pack — scaffolded by `kindgi init --template=python`."
5
+ requires-python = ">=3.11"
6
+ dependencies = [{{KINDGI_REQUIREMENT}}]
7
+
8
+ [dependency-groups]
9
+ dev = ["pytest>=8"]
10
+
11
+ # The uv versions this pack works with: `kindgi build` installs it with the
12
+ # uv in Kindgi's image, which reads the uv.lock they write.
13
+ [tool.uv]
14
+ required-version = "{{UV_REQUIRED_VERSION}}"
15
+ {{KINDGI_PYTHON_SOURCE}}
16
+ # The pack: what `kindgi dev`, `kindgi build` and `python -m kindgi.pack` read.
17
+ [tool.kindgi.pack]
18
+ id = "{{PACK_ID}}"
19
+ version = "{{PACK_VERSION}}"
20
+ description = "A sample Kindgi pack in Python — two tools, one guardrail, one agent, one flow."
21
+
22
+ # Optional — the defaults are shown.
23
+ # [tool.kindgi.discovery]
24
+ # tools = "tools/**/*.py"
25
+ # guardrails = "guardrails/**/*.py"
26
+ # agents = "agents/**/*.py"
27
+ # flows = "flows/**/*.py"
28
+
29
+ # [tool.kindgi.dev]
30
+ # python = ["uv", "run", "python"] # default: .venv/bin/python, else python3
31
+ # envFiles = [".env", ".env.local"]
32
+
33
+ # One block per deploy target; `kindgi build --env=<name>` reads it.
34
+ # [tool.kindgi.environments.staging]
35
+ # endpoint = "https://api.staging.example.com"
36
+ # build = "http://localhost:4001"
37
+ # tenantId = "tenant-your-org-staging"
38
+ # signingKey = "~/.kindgi/keys/staging.pem"
39
+
40
+ [tool.pytest.ini_options]
41
+ testpaths = ["tests"]
42
+ pythonpath = ["."]
@@ -0,0 +1,22 @@
1
+ """The pack's tools and guardrail, called directly — `uv run pytest`."""
2
+
3
+ from kindgi import RunTrace
4
+ from tools.echo import EchoInput, echo
5
+ from tools.greet import GreetInput, greet
6
+
7
+ from guardrails.response_not_empty import Config, response_not_empty
8
+
9
+
10
+ def test_echo_round_trips_the_message() -> None:
11
+ out = echo(EchoInput(message="hello"))
12
+ assert out.echo == "hello"
13
+ assert out.character_count == 5
14
+
15
+
16
+ def test_greet_uses_the_default_greeting() -> None:
17
+ assert greet(GreetInput(name="Ada")).message == "Hello, Ada!"
18
+
19
+
20
+ def test_an_empty_answer_fails_the_guardrail() -> None:
21
+ trace = RunTrace(run_id="r", tenant_id="t", output=" ")
22
+ assert not response_not_empty(Config(), trace).passed
@@ -0,0 +1,27 @@
1
+ """{{PACK_ID}}.echo — echoes the message back with a UTC timestamp and its length."""
2
+
3
+ from datetime import UTC, datetime
4
+
5
+ from pydantic import BaseModel, Field
6
+
7
+ from kindgi import tool
8
+
9
+
10
+ class EchoInput(BaseModel):
11
+ message: str = Field(min_length=1, max_length=500)
12
+
13
+
14
+ class Echo(BaseModel):
15
+ echo: str
16
+ echoed_at: str = Field(alias="echoedAt")
17
+ character_count: int = Field(alias="characterCount", ge=0)
18
+
19
+
20
+ @tool(id="{{PACK_ID}}.echo")
21
+ def echo(input: EchoInput) -> Echo:
22
+ """Echoes the caller-provided message with a UTC timestamp and character count."""
23
+ return Echo(
24
+ echo=input.message,
25
+ echoedAt=datetime.now(UTC).isoformat(),
26
+ characterCount=len(input.message),
27
+ )
@@ -0,0 +1,20 @@
1
+ """{{PACK_ID}}.greet — greets a named recipient."""
2
+
3
+ from pydantic import BaseModel, Field
4
+
5
+ from kindgi import tool
6
+
7
+
8
+ class GreetInput(BaseModel):
9
+ name: str = Field(min_length=1, max_length=100)
10
+ greeting: str = Field("Hello", min_length=1, max_length=50)
11
+
12
+
13
+ class Greeting(BaseModel):
14
+ message: str
15
+
16
+
17
+ @tool(id="{{PACK_ID}}.greet")
18
+ def greet(input: GreetInput) -> Greeting:
19
+ """Formats a greeting for the named recipient."""
20
+ return Greeting(message=f"{input.greeting}, {input.name}!")
@@ -0,0 +1 @@
1
+ 22
@@ -0,0 +1,23 @@
1
+ # AGENTS.md
2
+
3
+ This directory is a Kindgi pack. Author primitives via
4
+ `@kindgi/sdk` — `defineTool`, `defineAgent`, `defineCheck`,
5
+ `defineFlow`. Every export ships with JSDoc; hover them for
6
+ field-level docs. Iterate with `kindgi dev`; `kindgi --help` lists
7
+ the full CLI.
8
+
9
+ Agents answer through a model provider. `kindgi dev` gives a new pack
10
+ `dev-echo`, a fallback that calls the first tool and replies
11
+ "Tool responded: …" while no other provider fits. For Claude:
12
+ `kindgi providers register --preset=anthropic` (the key in `.env`
13
+ first); other providers and per-agent model choice:
14
+ `.claude/skills/kindgi-authoring-providers/SKILL.md`.
15
+
16
+ ## For Claude Code sessions
17
+
18
+ When you diagnose a framework bug (something in Kindgi itself, not in
19
+ this pack's code), append an entry to `FEEDBACK.md` at the pack root
20
+ via `kindgi feedback write` — see
21
+ `.claude/skills/kindgi-framework-feedback/SKILL.md`. Mark items fixed
22
+ by adding a `> **Fixed:** <note>` line right after their header; the
23
+ file is a plain markdown list you edit directly.
@@ -0,0 +1,85 @@
1
+ # {{PACK_NAME}}
2
+
3
+ A sample Kindgi pack — scaffolded by `kindgi init --template=sample`.
4
+
5
+ Two tools (`echo`, `greet`), one guardrail (`response-not-empty`), one
6
+ agent that uses both tools + the guardrail, and one flow that stitches
7
+ the two tools into a workflow. It is compile-time-valid and ready to
8
+ run with `kindgi dev`.
9
+
10
+ ## Layout
11
+
12
+ ```
13
+ {{PACK_NAME}}/
14
+ ├── kindgi.config.ts # pack id + version + discovery patterns
15
+ ├── package.json # depends on @kindgi/sdk + zod
16
+ ├── tsconfig.json
17
+ ├── tools/
18
+ │ ├── echo/index.ts # defineTool — Zod-authored echo
19
+ │ └── greet/index.ts # defineTool — Zod-authored greeting
20
+ ├── guardrails/
21
+ │ └── response-not-empty/index.ts # defineCheck — response has content
22
+ ├── agents/
23
+ │ └── echo-agent/index.ts # defineAgent — uses both tools + guardrail
24
+ └── flows/
25
+ └── echo-flow/index.ts # Flow — greet tool → echo agent step → declared output
26
+ ```
27
+
28
+ ## Run
29
+
30
+ ```sh
31
+ pnpm install
32
+ pnpm typecheck # verify the pack compiles
33
+ kindgi dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
34
+ ```
35
+
36
+ `kindgi dev` bundles every primitive under the four folders above,
37
+ runs their code in a local pack service, starts the Kindgi runtime as a
38
+ Docker container (with a local Postgres), registers this pack, and
39
+ re-registers on every file save.
40
+
41
+ ## Use a real model
42
+
43
+ `kindgi dev` gives a new pack `dev-echo`, a fallback provider that calls the
44
+ first tool and replies "Tool responded: …" — it answers only while no other
45
+ provider fits. To use Claude, with `kindgi dev` running, from another terminal:
46
+
47
+ ```sh
48
+ kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
49
+ kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
50
+ ```
51
+
52
+ Claude takes over from dev-echo on the next turn; nothing to restart.
53
+ `--models=claude-haiku-4-5` registers one model only; `kindgi providers
54
+ presets` lists the presets (Gemini on Vertex AI too). Picking a model per
55
+ agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
56
+
57
+ ## The four primitives (one file each)
58
+
59
+ | Kind | File | What it shows |
60
+ |---|---|---|
61
+ | Tool | `tools/echo/index.ts` | `defineTool` with Zod input/output; no `needs`; `effects: []`. |
62
+ | Tool | `tools/greet/index.ts` | Second Zod-authored tool — takes a name, returns a greeting. |
63
+ | Tool | `tools/fetch-httpbin/index.ts` | `defineTool({spec: {kind: 'http'}})` — declarative HTTP call, no imperative handler code. Hits httpbin.org so it works without credentials. |
64
+ | Guardrail | `guardrails/response-not-empty/index.ts` | `defineCheck` — zero-LLM check that a response payload is non-empty. |
65
+ | Agent | `agents/echo-agent/index.ts` | `defineAgent` — pulls in the local tools + the guardrail; uses `capabilities` for model routing. |
66
+ | Flow | `flows/echo-flow/index.ts` | `defineFlow` — a tool step fed from the run input, an agent step, a declared `output`. Run: `kindgi runs start --flow={{PACK_ID}}.echo-flow --input='{"name":"Ada"}'`. |
67
+
68
+ ## Extend
69
+
70
+ Add more primitives following the same folder convention. `defineTool` +
71
+ `defineCheck` + `defineAgent` all come from `@kindgi/sdk/define`:
72
+
73
+ ```ts
74
+ import { defineTool, defineCheck, defineAgent, defineFlow } from '@kindgi/sdk/define';
75
+ import { z } from 'zod';
76
+ ```
77
+
78
+ Every `define*` export ships with JSDoc — hover it in your editor for
79
+ field-level docs.
80
+
81
+ ## Note on `@kindgi/sdk` versioning
82
+
83
+ This template pins `@kindgi/sdk: "workspace:*"` because the SDK is not
84
+ yet published to npm. Until it is, add the pack to a pnpm workspace that
85
+ contains the Kindgi packages (`pnpm-workspace.yaml`).
@@ -0,0 +1,34 @@
1
+ // {{PACK_ID}}.echo-agent — pulls in both tools + the response-not-empty
2
+ // guardrail. The agent shape is pure metadata; every field is either a
3
+ // primitive or a reference to a registered substrate object.
4
+
5
+ import { defineAgent } from '@kindgi/sdk/define';
6
+ import type { AgentId, GuardrailId, Semver } from '@kindgi/sdk/types';
7
+
8
+ const defined = defineAgent({
9
+ id: '{{PACK_ID}}.echo-agent' as AgentId,
10
+ version: '{{PACK_VERSION}}' as Semver,
11
+ name: 'Echo Agent',
12
+ description:
13
+ 'Uses the pack\'s echo + greet tools; the response-not-empty guardrail guards the output.',
14
+ instructions:
15
+ 'For each user message: if the user sends a name, invoke `{{PACK_ID}}.greet` with it. Otherwise invoke `{{PACK_ID}}.echo` with the message text. Quote the tool result verbatim in your reply.',
16
+ capabilities: [{ needs: [{ feature: 'tool-use' as const }] }],
17
+ tools: [
18
+ { id: '{{PACK_ID}}.echo', version: '{{PACK_VERSION}}' },
19
+ { id: '{{PACK_ID}}.greet', version: '{{PACK_VERSION}}' },
20
+ ],
21
+ retrieval: [],
22
+ guardrails: ['{{PACK_ID}}.response-not-empty' as GuardrailId],
23
+ parameters: [],
24
+ conversationPolicy: { historyLimit: 10 },
25
+ budget: { maxSteps: 4, maxCostUsd: 0.1, maxWallMs: 15_000 },
26
+ });
27
+
28
+ if (defined.kind === 'err') {
29
+ throw new Error(
30
+ `{{PACK_ID}}.echo-agent failed to compile: ${defined.error.message}`,
31
+ );
32
+ }
33
+
34
+ export default defined.value;
@@ -0,0 +1,59 @@
1
+ // {{PACK_ID}}.echo-flow — greets a name with the greet tool, then hands
2
+ // the greeting to the echo agent as an agent step, and returns both.
3
+ //
4
+ // It shows the parts most flows use:
5
+ // - a tool step whose input is mapped from the run input
6
+ // (`inputMapping` — `runInput.name`);
7
+ // - an agent step: the agent runs one turn as a child run, gets the
8
+ // step's input as structured input (`{{ input.text }}` in its
9
+ // instructions) and as its message, and its answer is
10
+ // `nodeOutputs.respond.text` (`.output.<field>` with a typed `output`);
11
+ // - a declared `output`, checked against its schema.
12
+ // The kindgi-authoring-flows skill covers branches, loops and the rest.
13
+ //
14
+ // Run it: kindgi runs start --flow={{PACK_ID}}.echo-flow --input='{"name":"Ada"}'
15
+
16
+ import { defineFlow } from '@kindgi/sdk/define';
17
+
18
+ const defined = defineFlow({
19
+ id: '{{PACK_ID}}.echo-flow',
20
+ version: '{{PACK_VERSION}}',
21
+ name: 'Echo Flow',
22
+ description: 'Greets a name, then has the echo agent respond to the greeting.',
23
+ nodes: [
24
+ {
25
+ id: 'greet',
26
+ kind: 'tool',
27
+ ref: '{{PACK_ID}}.greet',
28
+ inputMapping: { name: { path: 'runInput.name' } },
29
+ },
30
+ {
31
+ id: 'respond',
32
+ kind: 'agent',
33
+ ref: '{{PACK_ID}}.echo-agent',
34
+ inputMapping: { text: { path: 'nodeOutputs.greet.message' } },
35
+ },
36
+ ],
37
+ edges: [
38
+ { id: 'e-start', from: '$start', to: 'greet' },
39
+ { id: 'e-respond', from: 'greet', to: 'respond' },
40
+ { id: 'e-end', from: 'respond', to: '$end' },
41
+ ],
42
+ output: {
43
+ mapping: {
44
+ greeting: { path: 'nodeOutputs.greet.message' },
45
+ reply: { path: 'nodeOutputs.respond.text' },
46
+ },
47
+ schema: {
48
+ type: 'object',
49
+ properties: { greeting: { type: 'string' }, reply: { type: 'string' } },
50
+ required: ['greeting', 'reply'],
51
+ },
52
+ },
53
+ });
54
+
55
+ if (defined.kind === 'err') {
56
+ throw new Error(`{{PACK_ID}}.echo-flow failed to compile: ${defined.error.message}`);
57
+ }
58
+
59
+ export default defined.value;
@@ -0,0 +1,8 @@
1
+ node_modules/
2
+ dist/
3
+ .kindgi/
4
+ .kindgirc.json
5
+ *.tsbuildinfo
6
+ .env
7
+ .env.local
8
+ .DS_Store