@kindgi/cli 0.0.0-bootstrap.0 → 0.1.0

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 (496) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +690 -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 +45 -0
  8. package/dist/build/bundle.d.ts.map +1 -0
  9. package/dist/build/bundle.js +121 -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 +196 -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 +586 -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 +48 -0
  28. package/dist/build/host-install.d.ts.map +1 -0
  29. package/dist/build/host-install.js +375 -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 +3 -0
  88. package/dist/commands/auth.d.ts.map +1 -0
  89. package/dist/commands/auth.js +88 -0
  90. package/dist/commands/auth.js.map +1 -0
  91. package/dist/commands/build.d.ts +39 -0
  92. package/dist/commands/build.d.ts.map +1 -0
  93. package/dist/commands/build.js +872 -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 +44 -0
  108. package/dist/commands/dev.d.ts.map +1 -0
  109. package/dist/commands/dev.js +1032 -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 +37 -0
  132. package/dist/commands/helpers.d.ts.map +1 -0
  133. package/dist/commands/helpers.js +93 -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 +455 -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 +202 -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 +221 -0
  178. package/dist/commands/runs.js.map +1 -0
  179. package/dist/commands/secrets.d.ts +21 -0
  180. package/dist/commands/secrets.d.ts.map +1 -0
  181. package/dist/commands/secrets.js +750 -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 +153 -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 +17 -0
  204. package/dist/commands/unwired.d.ts.map +1 -0
  205. package/dist/commands/unwired.js +41 -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 +153 -0
  216. package/dist/context.d.ts.map +1 -0
  217. package/dist/context.js +44 -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 +8 -0
  240. package/dist/dev/bundler.d.ts.map +1 -0
  241. package/dist/dev/bundler.js +154 -0
  242. package/dist/dev/bundler.js.map +1 -0
  243. package/dist/dev/defaults.d.ts +138 -0
  244. package/dist/dev/defaults.d.ts.map +1 -0
  245. package/dist/dev/defaults.js +691 -0
  246. package/dist/dev/defaults.js.map +1 -0
  247. package/dist/dev/docker-compose.dev.yml +56 -0
  248. package/dist/dev/index-child.d.ts +2 -0
  249. package/dist/dev/index-child.d.ts.map +1 -0
  250. package/dist/dev/index-child.js +53 -0
  251. package/dist/dev/index-child.js.map +1 -0
  252. package/dist/dev/pack-code.d.ts +36 -0
  253. package/dist/dev/pack-code.d.ts.map +1 -0
  254. package/dist/dev/pack-code.js +129 -0
  255. package/dist/dev/pack-code.js.map +1 -0
  256. package/dist/dev/pack-env.d.ts +13 -0
  257. package/dist/dev/pack-env.d.ts.map +1 -0
  258. package/dist/dev/pack-env.js +36 -0
  259. package/dist/dev/pack-env.js.map +1 -0
  260. package/dist/dev/pack-service.d.ts +32 -0
  261. package/dist/dev/pack-service.d.ts.map +1 -0
  262. package/dist/dev/pack-service.js +188 -0
  263. package/dist/dev/pack-service.js.map +1 -0
  264. package/dist/dev/paths.d.ts +22 -0
  265. package/dist/dev/paths.d.ts.map +1 -0
  266. package/dist/dev/paths.js +35 -0
  267. package/dist/dev/paths.js.map +1 -0
  268. package/dist/dev/python-builder.d.ts +16 -0
  269. package/dist/dev/python-builder.d.ts.map +1 -0
  270. package/dist/dev/python-builder.js +122 -0
  271. package/dist/dev/python-builder.js.map +1 -0
  272. package/dist/dev/register.d.ts +71 -0
  273. package/dist/dev/register.d.ts.map +1 -0
  274. package/dist/dev/register.js +54 -0
  275. package/dist/dev/register.js.map +1 -0
  276. package/dist/dev/runners.d.ts +287 -0
  277. package/dist/dev/runners.d.ts.map +1 -0
  278. package/dist/dev/runners.js +4 -0
  279. package/dist/dev/runners.js.map +1 -0
  280. package/dist/dev/runtime-container.d.ts +62 -0
  281. package/dist/dev/runtime-container.d.ts.map +1 -0
  282. package/dist/dev/runtime-container.js +164 -0
  283. package/dist/dev/runtime-container.js.map +1 -0
  284. package/dist/dev/runtime-env.d.ts +62 -0
  285. package/dist/dev/runtime-env.d.ts.map +1 -0
  286. package/dist/dev/runtime-env.js +100 -0
  287. package/dist/dev/runtime-env.js.map +1 -0
  288. package/dist/dev/runtime-image.d.ts +13 -0
  289. package/dist/dev/runtime-image.d.ts.map +1 -0
  290. package/dist/dev/runtime-image.js +15 -0
  291. package/dist/dev/runtime-image.js.map +1 -0
  292. package/dist/env/defaults.d.ts +3 -0
  293. package/dist/env/defaults.d.ts.map +1 -0
  294. package/dist/env/defaults.js +22 -0
  295. package/dist/env/defaults.js.map +1 -0
  296. package/dist/env/pack-env-plan.d.ts +70 -0
  297. package/dist/env/pack-env-plan.d.ts.map +1 -0
  298. package/dist/env/pack-env-plan.js +236 -0
  299. package/dist/env/pack-env-plan.js.map +1 -0
  300. package/dist/env/parser.d.ts +9 -0
  301. package/dist/env/parser.d.ts.map +1 -0
  302. package/dist/env/parser.js +11 -0
  303. package/dist/env/parser.js.map +1 -0
  304. package/dist/env/project-env.d.ts +34 -0
  305. package/dist/env/project-env.d.ts.map +1 -0
  306. package/dist/env/project-env.js +45 -0
  307. package/dist/env/project-env.js.map +1 -0
  308. package/dist/env/runners.d.ts +22 -0
  309. package/dist/env/runners.d.ts.map +1 -0
  310. package/dist/env/runners.js +4 -0
  311. package/dist/env/runners.js.map +1 -0
  312. package/dist/env/writer.d.ts +7 -0
  313. package/dist/env/writer.d.ts.map +1 -0
  314. package/dist/env/writer.js +9 -0
  315. package/dist/env/writer.js.map +1 -0
  316. package/dist/errors.d.ts +31 -0
  317. package/dist/errors.d.ts.map +1 -0
  318. package/dist/errors.js +107 -0
  319. package/dist/errors.js.map +1 -0
  320. package/dist/help.d.ts +5 -0
  321. package/dist/help.d.ts.map +1 -0
  322. package/dist/help.js +61 -0
  323. package/dist/help.js.map +1 -0
  324. package/dist/index.d.ts +13 -0
  325. package/dist/index.d.ts.map +1 -0
  326. package/dist/index.js +13 -0
  327. package/dist/index.js.map +1 -0
  328. package/dist/init/augment-scaffolder.d.ts +74 -0
  329. package/dist/init/augment-scaffolder.d.ts.map +1 -0
  330. package/dist/init/augment-scaffolder.js +459 -0
  331. package/dist/init/augment-scaffolder.js.map +1 -0
  332. package/dist/init/dependency-specs.d.ts +58 -0
  333. package/dist/init/dependency-specs.d.ts.map +1 -0
  334. package/dist/init/dependency-specs.js +153 -0
  335. package/dist/init/dependency-specs.js.map +1 -0
  336. package/dist/init/gitignore-patcher.d.ts +23 -0
  337. package/dist/init/gitignore-patcher.d.ts.map +1 -0
  338. package/dist/init/gitignore-patcher.js +103 -0
  339. package/dist/init/gitignore-patcher.js.map +1 -0
  340. package/dist/init/mode-detect.d.ts +34 -0
  341. package/dist/init/mode-detect.d.ts.map +1 -0
  342. package/dist/init/mode-detect.js +115 -0
  343. package/dist/init/mode-detect.js.map +1 -0
  344. package/dist/init/package-json-patcher.d.ts +36 -0
  345. package/dist/init/package-json-patcher.d.ts.map +1 -0
  346. package/dist/init/package-json-patcher.js +128 -0
  347. package/dist/init/package-json-patcher.js.map +1 -0
  348. package/dist/init/pyproject-patcher.d.ts +56 -0
  349. package/dist/init/pyproject-patcher.d.ts.map +1 -0
  350. package/dist/init/pyproject-patcher.js +324 -0
  351. package/dist/init/pyproject-patcher.js.map +1 -0
  352. package/dist/init/python-augment.d.ts +22 -0
  353. package/dist/init/python-augment.d.ts.map +1 -0
  354. package/dist/init/python-augment.js +300 -0
  355. package/dist/init/python-augment.js.map +1 -0
  356. package/dist/init/template-files.d.ts +16 -0
  357. package/dist/init/template-files.d.ts.map +1 -0
  358. package/dist/init/template-files.js +38 -0
  359. package/dist/init/template-files.js.map +1 -0
  360. package/dist/key/defaults.d.ts +3 -0
  361. package/dist/key/defaults.d.ts.map +1 -0
  362. package/dist/key/defaults.js +60 -0
  363. package/dist/key/defaults.js.map +1 -0
  364. package/dist/key/fingerprint.d.ts +6 -0
  365. package/dist/key/fingerprint.d.ts.map +1 -0
  366. package/dist/key/fingerprint.js +25 -0
  367. package/dist/key/fingerprint.js.map +1 -0
  368. package/dist/key/paths.d.ts +30 -0
  369. package/dist/key/paths.d.ts.map +1 -0
  370. package/dist/key/paths.js +51 -0
  371. package/dist/key/paths.js.map +1 -0
  372. package/dist/key/runners.d.ts +60 -0
  373. package/dist/key/runners.d.ts.map +1 -0
  374. package/dist/key/runners.js +4 -0
  375. package/dist/key/runners.js.map +1 -0
  376. package/dist/main.d.ts +106 -0
  377. package/dist/main.d.ts.map +1 -0
  378. package/dist/main.js +198 -0
  379. package/dist/main.js.map +1 -0
  380. package/dist/mcp/launcher.d.ts +143 -0
  381. package/dist/mcp/launcher.d.ts.map +1 -0
  382. package/dist/mcp/launcher.js +393 -0
  383. package/dist/mcp/launcher.js.map +1 -0
  384. package/dist/mcp/preset-loader.d.ts +29 -0
  385. package/dist/mcp/preset-loader.d.ts.map +1 -0
  386. package/dist/mcp/preset-loader.js +217 -0
  387. package/dist/mcp/preset-loader.js.map +1 -0
  388. package/dist/mcp/preset-types.d.ts +71 -0
  389. package/dist/mcp/preset-types.d.ts.map +1 -0
  390. package/dist/mcp/preset-types.js +4 -0
  391. package/dist/mcp/preset-types.js.map +1 -0
  392. package/dist/mcp/presets/README.md +68 -0
  393. package/dist/mcp/presets/postgres.json +15 -0
  394. package/dist/output.d.ts +26 -0
  395. package/dist/output.d.ts.map +1 -0
  396. package/dist/output.js +46 -0
  397. package/dist/output.js.map +1 -0
  398. package/dist/pack-config.d.ts +37 -0
  399. package/dist/pack-config.d.ts.map +1 -0
  400. package/dist/pack-config.js +65 -0
  401. package/dist/pack-config.js.map +1 -0
  402. package/dist/package-manager.d.ts +33 -0
  403. package/dist/package-manager.d.ts.map +1 -0
  404. package/dist/package-manager.js +129 -0
  405. package/dist/package-manager.js.map +1 -0
  406. package/dist/parse.d.ts +82 -0
  407. package/dist/parse.d.ts.map +1 -0
  408. package/dist/parse.js +99 -0
  409. package/dist/parse.js.map +1 -0
  410. package/dist/providers/preset-loader.d.ts +47 -0
  411. package/dist/providers/preset-loader.d.ts.map +1 -0
  412. package/dist/providers/preset-loader.js +107 -0
  413. package/dist/providers/preset-loader.js.map +1 -0
  414. package/dist/providers/presets/anthropic.json +47 -0
  415. package/dist/providers/presets/gemini.json +40 -0
  416. package/dist/reference.d.ts +28 -0
  417. package/dist/reference.d.ts.map +1 -0
  418. package/dist/reference.js +52 -0
  419. package/dist/reference.js.map +1 -0
  420. package/dist/sdk-package.d.ts +9 -0
  421. package/dist/sdk-package.d.ts.map +1 -0
  422. package/dist/sdk-package.js +20 -0
  423. package/dist/sdk-package.js.map +1 -0
  424. package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +253 -0
  425. package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +299 -0
  426. package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +291 -0
  427. package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +289 -0
  428. package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +704 -0
  429. package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +288 -0
  430. package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +211 -0
  431. package/dist/sdk-skills/kindgi-getting-started/SKILL.md +181 -0
  432. package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +205 -0
  433. package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +322 -0
  434. package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +173 -0
  435. package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +299 -0
  436. package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +240 -0
  437. package/dist/stop-signal.d.ts +15 -0
  438. package/dist/stop-signal.d.ts.map +1 -0
  439. package/dist/stop-signal.js +16 -0
  440. package/dist/stop-signal.js.map +1 -0
  441. package/dist/templates/minimal/.gitignore +8 -0
  442. package/dist/templates/minimal/.nvmrc +1 -0
  443. package/dist/templates/minimal/AGENTS.md +23 -0
  444. package/dist/templates/minimal/README.md.tmpl +69 -0
  445. package/dist/templates/minimal/agents/.gitkeep +0 -0
  446. package/dist/templates/minimal/flows/.gitkeep +0 -0
  447. package/dist/templates/minimal/guardrails/.gitkeep +0 -0
  448. package/dist/templates/minimal/kindgi.config.ts.tmpl +44 -0
  449. package/dist/templates/minimal/package.json.tmpl +25 -0
  450. package/dist/templates/minimal/pnpm-workspace.yaml +6 -0
  451. package/dist/templates/minimal/tools/.gitkeep +0 -0
  452. package/dist/templates/minimal/tsconfig.json.tmpl +27 -0
  453. package/dist/templates/minimal/vitest.config.ts.tmpl +14 -0
  454. package/dist/templates/python/.gitignore +9 -0
  455. package/dist/templates/python/AGENTS.md +30 -0
  456. package/dist/templates/python/README.md.tmpl +56 -0
  457. package/dist/templates/python/agents/echo_agent.py.tmpl +23 -0
  458. package/dist/templates/python/flows/echo_flow.py.tmpl +17 -0
  459. package/dist/templates/python/guardrails/response_not_empty.py.tmpl +27 -0
  460. package/dist/templates/python/pyproject.toml.tmpl +42 -0
  461. package/dist/templates/python/tests/test_tools.py.tmpl +22 -0
  462. package/dist/templates/python/tools/echo.py.tmpl +27 -0
  463. package/dist/templates/python/tools/greet.py.tmpl +20 -0
  464. package/dist/templates/sample/.gitignore +8 -0
  465. package/dist/templates/sample/.nvmrc +1 -0
  466. package/dist/templates/sample/AGENTS.md +23 -0
  467. package/dist/templates/sample/README.md.tmpl +85 -0
  468. package/dist/templates/sample/agents/echo-agent/index.ts.tmpl +34 -0
  469. package/dist/templates/sample/flows/echo-flow/index.ts.tmpl +59 -0
  470. package/dist/templates/sample/guardrails/response-not-empty/index.ts.tmpl +50 -0
  471. package/dist/templates/sample/kindgi.config.ts.tmpl +41 -0
  472. package/dist/templates/sample/package.json.tmpl +25 -0
  473. package/dist/templates/sample/pnpm-workspace.yaml +6 -0
  474. package/dist/templates/sample/tools/echo/index.test.ts.tmpl +31 -0
  475. package/dist/templates/sample/tools/echo/index.ts.tmpl +37 -0
  476. package/dist/templates/sample/tools/fetch-httpbin/index.ts.tmpl +60 -0
  477. package/dist/templates/sample/tools/greet/index.ts.tmpl +35 -0
  478. package/dist/templates/sample/tsconfig.json.tmpl +27 -0
  479. package/dist/templates/sample/vitest.config.ts.tmpl +14 -0
  480. package/dist/test/defaults.d.ts +3 -0
  481. package/dist/test/defaults.d.ts.map +1 -0
  482. package/dist/test/defaults.js +104 -0
  483. package/dist/test/defaults.js.map +1 -0
  484. package/dist/test/runners.d.ts +60 -0
  485. package/dist/test/runners.d.ts.map +1 -0
  486. package/dist/test/runners.js +4 -0
  487. package/dist/test/runners.js.map +1 -0
  488. package/dist/version-info.d.ts +9 -0
  489. package/dist/version-info.d.ts.map +1 -0
  490. package/dist/version-info.js +27 -0
  491. package/dist/version-info.js.map +1 -0
  492. package/dist/write-fully.d.ts +13 -0
  493. package/dist/write-fully.d.ts.map +1 -0
  494. package/dist/write-fully.js +17 -0
  495. package/dist/write-fully.js.map +1 -0
  496. package/package.json +63 -4
@@ -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,8 @@
1
+ node_modules/
2
+ dist/
3
+ .kindgi/
4
+ .kindgirc.json
5
+ *.tsbuildinfo
6
+ .env
7
+ .env.local
8
+ .DS_Store
@@ -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,50 @@
1
+ // {{PACK_ID}}.response-not-empty — zero-LLM guardrail that fails when the
2
+ // run's final `output` is empty or whitespace-only. Cheap, deterministic,
3
+ // replayable — the preferred kind of guardrail.
4
+ //
5
+ // The module exports a guardrail object literal whose `check` sub-object
6
+ // carries an inline `evaluate` handler. The indexer picks up `action` +
7
+ // `kind` at the top level; the runtime registers the inline check at
8
+ // boot.
9
+
10
+ import { defineCheck } from '@kindgi/sdk/define';
11
+ import { z } from 'zod';
12
+
13
+ const ConfigSchema = z.object({
14
+ minLength: z.number().int().min(0).default(1),
15
+ });
16
+
17
+ const check = defineCheck({
18
+ id: '{{PACK_ID}}.checks.response-not-empty',
19
+ kind: 'zero-llm',
20
+ configSchema: ConfigSchema,
21
+ evaluate: async (config, trace) => {
22
+ const output = trace.output;
23
+ const text = typeof output === 'string' ? output.trim() : '';
24
+ if (text.length < config.minLength) {
25
+ return {
26
+ passed: false,
27
+ reason: `Response too short: got ${text.length} chars, expected >= ${config.minLength}.`,
28
+ };
29
+ }
30
+ return { passed: true };
31
+ },
32
+ });
33
+
34
+ const guardrail = {
35
+ id: '{{PACK_ID}}.response-not-empty',
36
+ name: 'Response is non-empty',
37
+ kind: 'zero-llm' as const,
38
+ check: {
39
+ id: check.id,
40
+ evaluate: check.evaluate,
41
+ ...(check.validateConfig !== undefined && { validateConfig: check.validateConfig }),
42
+ },
43
+ configSchema: check.configJsonSchema,
44
+ action: { 'on-violation': 'halt' } as const,
45
+ severity: 'error' as const,
46
+ scope: { when: 'runtime-only' as const },
47
+ };
48
+
49
+ export default guardrail;
50
+ export { check };
@@ -0,0 +1,41 @@
1
+ // Kindgi pack config — scaffolded by `kindgi init --template=sample`.
2
+
3
+ const config = {
4
+ pack: {
5
+ id: '{{PACK_ID}}',
6
+ version: '{{PACK_VERSION}}',
7
+ description: 'A sample Kindgi pack — two tools, one guardrail, one agent, one flow.',
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. `kindgi build`
17
+ // reads `.build`, `.registry`, `.signingKey`, `.tenantId` for the
18
+ // chosen env; `kindgi deploy` reads `.endpoint`.
19
+ //
20
+ // Fill these in when you're ready to push a build. Local
21
+ // `kindgi dev` does NOT read this block.
22
+ // ---------------------------------------------------------------
23
+ environments: {
24
+ staging: {
25
+ endpoint: 'https://api.staging.example.com',
26
+ build: 'http://localhost:8787', // your Kindgi build server
27
+ registry: 'ghcr.io/your-org',
28
+ signingKey: '~/.kindgi/keys/staging.pem',
29
+ tenantId: 'tenant-your-org-staging',
30
+ },
31
+ production: {
32
+ endpoint: 'https://api.example.com',
33
+ build: 'https://build.example.com',
34
+ registry: 'ghcr.io/your-org',
35
+ signingKey: '~/.kindgi/keys/production.pem',
36
+ tenantId: 'tenant-your-org-production',
37
+ },
38
+ },
39
+ } as const;
40
+
41
+ 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=sample`. Two tools, one guardrail, one agent, one flow.",
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,6 @@
1
+ # pnpm 12+ reads settings from this file, not from `package.json`'s
2
+ # `pnpm` block. `allowBuilds` grants postinstall permission to
3
+ # specific dependencies — esbuild ships a native binary via
4
+ # postinstall that the vitest transform pipeline depends on.
5
+ allowBuilds:
6
+ esbuild: true
@@ -0,0 +1,31 @@
1
+ // {{PACK_ID}}.echo — smoke test verifying the tool compiles + the
2
+ // handler returns the expected shape. Scaffolded by `kindgi init`
3
+ // so `kindgi test` has something to run out of the box.
4
+
5
+ import { describe, expect, test } from 'vitest';
6
+
7
+ import type { ToolContext } from '@kindgi/sdk/define';
8
+ import type { TenantId } from '@kindgi/sdk/types';
9
+
10
+ import echo from './index.js';
11
+
12
+ function makeCtx(): ToolContext {
13
+ return {
14
+ tenantId: '00000000-0000-0000-0000-000000000001' as TenantId,
15
+ abortSignal: new AbortController().signal,
16
+ };
17
+ }
18
+
19
+ describe('{{PACK_ID}}.echo', () => {
20
+ test('compiles with the expected id', () => {
21
+ expect(echo.id).toBe('{{PACK_ID}}.echo');
22
+ });
23
+
24
+ test('handler round-trips the message + count', async () => {
25
+ if (echo.handler === undefined) throw new Error('handler missing');
26
+ const out = await echo.handler({ message: 'hello' }, makeCtx());
27
+ expect(out.echo).toBe('hello');
28
+ expect(out.characterCount).toBe(5);
29
+ expect(typeof out.echoedAt).toBe('string');
30
+ });
31
+ });
@@ -0,0 +1,37 @@
1
+ // {{PACK_ID}}.echo — echoes the caller-provided message back with a UTC
2
+ // timestamp. Zod-authored — the wire form is JSON Schema, converted at
3
+ // author time by `defineTool`.
4
+
5
+ import { defineTool } from '@kindgi/sdk/define';
6
+ import type { ToolId } from '@kindgi/sdk/types';
7
+ import { z } from 'zod';
8
+
9
+ const EchoInput = z.object({
10
+ message: z.string().min(1).max(500),
11
+ });
12
+
13
+ const EchoOutput = z.object({
14
+ echo: z.string(),
15
+ echoedAt: z.string(),
16
+ characterCount: z.number().int().nonnegative(),
17
+ });
18
+
19
+ const defined = defineTool({
20
+ id: '{{PACK_ID}}.echo' as ToolId,
21
+ description: 'Echoes the caller-provided message with a UTC timestamp + character count.',
22
+ version: '{{PACK_VERSION}}',
23
+ input: EchoInput,
24
+ output: EchoOutput,
25
+ effects: [],
26
+ handler: async (input) => ({
27
+ echo: input.message,
28
+ echoedAt: new Date().toISOString(),
29
+ characterCount: input.message.length,
30
+ }),
31
+ });
32
+
33
+ if (defined.kind === 'err') {
34
+ throw new Error(`{{PACK_ID}}.echo failed to compile: ${defined.error.message}`);
35
+ }
36
+
37
+ export default defined.value;
@@ -0,0 +1,60 @@
1
+ // {{PACK_ID}}.fetch-httpbin — declarative tool example (spec form).
2
+ //
3
+ // Uses `defineTool({spec: {kind: 'http', ...}})` — no imperative
4
+ // handler code. The runtime synthesizes the fetch call from the
5
+ // spec at register time. Handler receives validated input; URL
6
+ // template placeholders substitute from that input.
7
+ //
8
+ // This tool hits httpbin.org (a free HTTP debugging service) so
9
+ // it works without any secret configuration. For a real API with
10
+ // authentication, add:
11
+ //
12
+ // authorization: {
13
+ // kind: 'bearer',
14
+ // secretRef: { envName: 'local', name: 'MY_TOKEN' },
15
+ // },
16
+ //
17
+ // The runtime resolves the secret on every call from its secrets
18
+ // store, in the env the ref names — under `kindgi dev`, env `local`
19
+ // is your `.env` / `.env.local`. A secret it can't find fails the
20
+ // call with `secret-unavailable`, naming it.
21
+
22
+ import { defineTool } from '@kindgi/sdk/define';
23
+ import type { ToolId } from '@kindgi/sdk/types';
24
+ import { z } from 'zod';
25
+
26
+ const FetchInput = z.object({
27
+ path: z.string().regex(/^[a-z0-9\-\/]+$/, 'lowercase path segments only'),
28
+ });
29
+
30
+ const FetchOutput = z
31
+ .object({
32
+ url: z.string(),
33
+ origin: z.string().optional(),
34
+ headers: z.record(z.string(), z.string()).optional(),
35
+ args: z.record(z.string(), z.string()).optional(),
36
+ })
37
+ .passthrough();
38
+
39
+ const defined = defineTool({
40
+ id: '{{PACK_ID}}.fetch-httpbin' as ToolId,
41
+ description:
42
+ 'Fetch a path from httpbin.org (an HTTP request debugging service). Useful for testing the framework declarative-tool primitive end-to-end without needing real API credentials.',
43
+ version: '{{PACK_VERSION}}',
44
+ input: FetchInput,
45
+ output: FetchOutput,
46
+ effects: [{ kind: 'reads', resource: 'external:httpbin.org' }],
47
+ spec: {
48
+ kind: 'http',
49
+ method: 'GET',
50
+ urlTemplate: 'https://httpbin.org/{path}',
51
+ headers: [{ name: 'Accept', value: 'application/json' }],
52
+ timeoutMs: 10_000,
53
+ },
54
+ });
55
+
56
+ if (defined.kind === 'err') {
57
+ throw new Error(`{{PACK_ID}}.fetch-httpbin failed to compile: ${defined.error.message}`);
58
+ }
59
+
60
+ export default defined.value;
@@ -0,0 +1,35 @@
1
+ // {{PACK_ID}}.greet — greets a named recipient. Second Zod-authored tool
2
+ // alongside `echo` to show how a pack composes multiple primitives. It is
3
+ // read-only (`mutating: false`), so it also runs in a dry run.
4
+
5
+ import { defineTool } from '@kindgi/sdk/define';
6
+ import type { ToolId } from '@kindgi/sdk/types';
7
+ import { z } from 'zod';
8
+
9
+ const GreetInput = z.object({
10
+ name: z.string().min(1).max(100),
11
+ greeting: z.string().min(1).max(50).default('Hello'),
12
+ });
13
+
14
+ const GreetOutput = z.object({
15
+ message: z.string(),
16
+ });
17
+
18
+ const defined = defineTool({
19
+ id: '{{PACK_ID}}.greet' as ToolId,
20
+ description: 'Formats a greeting for the named recipient.',
21
+ version: '{{PACK_VERSION}}',
22
+ input: GreetInput,
23
+ output: GreetOutput,
24
+ effects: [],
25
+ mutating: false,
26
+ handler: async (input) => ({
27
+ message: `${input.greeting}, ${input.name}!`,
28
+ }),
29
+ });
30
+
31
+ if (defined.kind === 'err') {
32
+ throw new Error(`{{PACK_ID}}.greet failed to compile: ${defined.error.message}`);
33
+ }
34
+
35
+ export default defined.value;