@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,291 @@
1
+ ---
2
+ name: kindgi-authoring-guardrails
3
+ description: >
4
+ Covers writing guardrails (safety checks) for a Kindgi pack: the check
5
+ implementation via defineCheck from @kindgi/sdk/define, the guardrail
6
+ declaration a pack file default-exports (the indexer's shape), the
7
+ three kinds (zero-llm / llm-judge / external), action semantics
8
+ (halt / retry / escalate / log-only / compensate), severity levels,
9
+ scope selectors, config schemas via Zod or JSON Schema, validating a
10
+ declaration with defineGuardrail from @kindgi/guardrails, and how
11
+ guardrails reach agents. Load this whenever you are authoring or
12
+ editing code inside a pack's guardrails/ directory, defining a check,
13
+ or wiring a guardrail onto an agent. Authoring tools is covered by
14
+ kindgi-authoring-tools; authoring agents is covered by
15
+ kindgi-authoring-agents.
16
+ type: core
17
+ library: "@kindgi/sdk"
18
+ version: "0.3.5"
19
+ sdk_version: "0.1.0"
20
+ pack_languages: [node]
21
+ sources:
22
+ - packages/guardrails/src/types.ts
23
+ - packages/guardrails/src/define-check.ts
24
+ - packages/guardrails/src/define.ts
25
+ - packages/guardrails/src/judge.ts
26
+ - packages/guardrails/src/checks.ts
27
+ - packages/handler-runtime/src/kindgi-index.ts
28
+ - packages/handler-runtime/src/handler-runner.ts
29
+ ---
30
+
31
+ # Authoring Kindgi guardrails
32
+
33
+ > **Running `kindgi`:** the CLI is a devDependency of the project (`@kindgi/cli`),
34
+ > not a global command. Run it through the project's package manager —
35
+ > `pnpm exec kindgi …`, `npx --no kindgi …` (npm), `yarn kindgi …` or
36
+ > `bun run kindgi …`. Commands below are written `kindgi …` for brevity.
37
+
38
+ A **guardrail** is a safety rule an agent turn must satisfy. It combines
39
+ a **check** (the function that inspects the turn's trace) with an
40
+ **action** (what happens when the check fails). In a pack, a guardrail
41
+ lives at `guardrails/<name>/index.ts`. For an agent turn, the runtime
42
+ evaluates every guardrail the agent lists once, on the final response,
43
+ before the response is stored.
44
+
45
+ ## Mental model: guardrail vs check
46
+
47
+ - **Check** — the implementation. `defineCheck({ id, kind, configSchema?,
48
+ evaluate })` from `@kindgi/sdk/define` returns a registered check whose
49
+ `evaluate(config, trace, bindings)` resolves to `{ passed, reason? }`.
50
+ Zero-llm checks are pure over the trace.
51
+ - **Guardrail** — the declaration: `id`, `kind`, the `check` it uses,
52
+ the check's `config`, and `action` / `severity` / `scope`. Its type is
53
+ `Guardrail` from `@kindgi/guardrails`. One check can back many
54
+ guardrails with different configs.
55
+ - **Built-in checks** (`BUILT_IN_CHECK_IDS` in `@kindgi/guardrails`):
56
+ `must-cite`, `never-call-tool`, `max-tool-calls`, `output-matches`,
57
+ `tool-order`, `required-substring`, `forbidden-substring`. A guardrail
58
+ can name one of these instead of shipping its own check.
59
+
60
+ `@kindgi/sdk` exports `defineCheck` but no helper for the guardrail
61
+ itself: a pack file default-exports the declaration as a plain object.
62
+
63
+ ## A pack guardrail file (zero-llm)
64
+
65
+ ```ts
66
+ // guardrails/no-fabricated-quotes/index.ts
67
+ import { defineCheck } from '@kindgi/sdk/define';
68
+ import { z } from 'zod';
69
+
70
+ // The check implementation. The pack service calls `check.evaluate`.
71
+ export const check = defineCheck({
72
+ id: 'acme.checks.no-fabricated-quotes',
73
+ kind: 'zero-llm',
74
+ configSchema: z.object({ minPrecedentCalls: z.number().int().min(0).optional() }),
75
+ evaluate: async (config, trace) => {
76
+ const needed = config.minPrecedentCalls ?? 1;
77
+ const precedentCalls = trace.toolCalls.filter((c) => c.toolName === 'acme.fetch-precedent');
78
+ if (precedentCalls.length < needed) {
79
+ return {
80
+ passed: false,
81
+ reason: `Only ${precedentCalls.length} precedent lookups (need ${needed}+).`,
82
+ };
83
+ }
84
+ return { passed: true };
85
+ },
86
+ });
87
+
88
+ // The guardrail declaration the indexer reads.
89
+ export default {
90
+ id: 'acme.no-fabricated-quotes',
91
+ name: 'No fabricated quotations',
92
+ kind: 'zero-llm',
93
+ check,
94
+ action: { 'on-violation': 'halt' },
95
+ severity: 'critical',
96
+ };
97
+ ```
98
+
99
+ How the pack tooling reads this file:
100
+
101
+ - The **indexer** (`packages/handler-runtime/src/kindgi-index.ts`)
102
+ recognises a guardrail by a default export with a `kind` and an
103
+ `action` object carrying `on-violation`. It records `id`, `name`,
104
+ `kind`, `action`, `severity`, `scope`, `sandbox` / `limits` /
105
+ `network`, and the check: its id (`check` may be the check id as a
106
+ string, or the check object) and its config schema (from the check's
107
+ `configZod`, `configSchema` or `configJsonSchema`, or a top-level
108
+ `configZod` / `configSchema`), and the declaration's `config` — what
109
+ the check runs with. It does not record `description`, `budget` or
110
+ `judgeCapabilities`.
111
+ - The **pack service** loads the same module to run the check. It uses
112
+ the module's `evaluate` export, or the `default` / `check` export when
113
+ that is a function or has an `evaluate` method — here, the named
114
+ `check` export.
115
+
116
+ ## Validating a declaration in-process
117
+
118
+ `defineGuardrail(spec, checks)` from `@kindgi/guardrails` validates a
119
+ `Guardrail` against the wire schema and a check registry: the check id
120
+ must be registered, the check's `kind` must match, and `config` must
121
+ pass the check's config schema. It returns a `Result`; use it in tests
122
+ or wherever guardrails are registered in-process.
123
+
124
+ ```ts
125
+ import { createCheckRegistry, defineGuardrail } from '@kindgi/guardrails';
126
+ import type { GuardrailId } from '@kindgi/sdk/types';
127
+
128
+ import { check } from './index.js';
129
+
130
+ const checks = createCheckRegistry([check]); // built-in checks are included
131
+ const defined = defineGuardrail(
132
+ {
133
+ id: 'acme.no-fabricated-quotes' as GuardrailId,
134
+ kind: 'zero-llm',
135
+ check: check.id,
136
+ config: { minPrecedentCalls: 2 },
137
+ action: { 'on-violation': 'halt' },
138
+ severity: 'critical',
139
+ },
140
+ checks,
141
+ );
142
+ if (defined.kind === 'err') {
143
+ throw new Error(`acme.no-fabricated-quotes: ${defined.error.message}`);
144
+ }
145
+ ```
146
+
147
+ Registering a guardrail through the API (`POST /v1/guardrails`, or
148
+ `client.guardrails.author(spec, { projectId })` in `@kindgi/sdk/client`)
149
+ stores the declaration only; the check it names must already be
150
+ available to the runtime that evaluates it.
151
+
152
+ ## Field-by-field
153
+
154
+ - **`id`** — `<pack-id>.<guardrail-name>` (kebab-case, dot-namespaced).
155
+ Name the ASSERTION as a positive rule (e.g. `no-fabricated-quotes`,
156
+ `response-not-empty`, `must-cite-source`).
157
+ - **`kind`**:
158
+ - `'zero-llm'` — pure function over the trace. Fast, deterministic,
159
+ free. **The default choice for most safety rules.**
160
+ - `'llm-judge'` — a model scores the turn against a rubric. Costs
161
+ money; requires `judgeCapabilities`. See below.
162
+ - `'external'` — evaluated outside the engine. The built-in
163
+ `external` strategy returns an `invalid-guardrail` error; a caller
164
+ that wants external evaluation registers its own strategy.
165
+ - **`check`** — the id of a registered check (built-in, or one built
166
+ with `defineCheck`). In a pack file it may also be the check object.
167
+ - **`config`** — the check's parameters, validated against the check's
168
+ `configSchema` by `defineGuardrail`. In a pack, the declaration's
169
+ `config` goes into the index and the check runs with it; without one
170
+ it runs with `{}`. `evaluate` receives the config as declared —
171
+ schema defaults are not filled in — so handle absent optional fields.
172
+ - **`action.on-violation`** — `'halt'`, `'retry'` (with
173
+ `retry.maxAttempts`, 1–10), `'escalate'` (with `escalateTo`),
174
+ `'log-only'`, `'compensate'` (with `compensateWith`, a tool id). In an
175
+ agent turn, a failed `halt` guardrail fails the turn with
176
+ `guardrail-violation` and the response is not stored; failures with
177
+ any other action are reported in `AgentTurnResult.violations` and the
178
+ turn completes. The action handlers in `@kindgi/guardrails`
179
+ (`retryHandler`, `escalateHandler`, `compensateHandler`, …) record the
180
+ intent for callers that act on it.
181
+ - **`severity`** — `'info'` / `'warn'` / `'error'` (the default) /
182
+ `'critical'`. Orthogonal to `action`: logs and dashboards group by
183
+ severity; execution follows the action. A `log-only` guardrail can
184
+ still be `'critical'`.
185
+ - **`scope`** — when the guardrail applies. `{ when: 'always' }` fires
186
+ everywhere; `{ when: 'ci-only' }` blocks CI but not runtime;
187
+ `{ when: 'runtime-only' }` enforces at runtime but not CI. `agents`,
188
+ `flows` and `tenants` lists narrow it further.
189
+ - **`budget`** — `{ maxCostUsd?, maxLatencyMs? }`, relevant to
190
+ `llm-judge`. Declarative: the runtime does not enforce it.
191
+ - **`judgeCapabilities`** — for `llm-judge`: the capability
192
+ declaration used to route the judge model.
193
+
194
+ ## LLM-judge guardrail (costs money)
195
+
196
+ An `llm-judge` guardrail does not run custom check code: the engine's
197
+ `llm-judge` strategy sends the turn's trace and the rubric in `config`
198
+ (`{ rubric, responseFormat?, threshold?, temperature? }`) to a model
199
+ routed through `judgeCapabilities`, and parses a PASS/FAIL or a score.
200
+
201
+ ```ts
202
+ import type { Guardrail } from '@kindgi/guardrails';
203
+ import type { GuardrailId } from '@kindgi/sdk/types';
204
+
205
+ export const toneProfessional: Guardrail = {
206
+ id: 'acme.tone-professional' as GuardrailId,
207
+ kind: 'llm-judge',
208
+ // Required by the `Guardrail` type; the llm-judge strategy judges
209
+ // with `config` and does not call this check.
210
+ check: 'acme.checks.tone-professional',
211
+ config: {
212
+ rubric: 'The response is professional in tone and contains no slang.',
213
+ responseFormat: 'pass-fail',
214
+ },
215
+ judgeCapabilities: { needs: [{ feature: 'structured-output' }] },
216
+ action: { 'on-violation': 'log-only' },
217
+ severity: 'warn',
218
+ budget: { maxCostUsd: 0.01, maxLatencyMs: 5000 }, // declarative, not enforced
219
+ };
220
+ ```
221
+
222
+ The judge is resolved from the provider registry passed in the
223
+ evaluation bindings (or a pinned `judgeProvider`), under the tenant
224
+ policy in those bindings when one is passed. Checks that run in a pack are called with empty
225
+ `bindings` — no provider registry — so a pack check cannot call a model
226
+ itself; use `kind: 'llm-judge'` for model-based rules.
227
+
228
+ ## Wiring the guardrail onto an agent
229
+
230
+ Agents reference guardrails by id:
231
+
232
+ ```ts
233
+ // agents/brief-writer/index.ts
234
+ guardrails: ['acme.no-fabricated-quotes'],
235
+ ```
236
+
237
+ At the start of each turn, the runtime resolves these ids against the
238
+ guardrails available to the run. An id that isn't registered fails the
239
+ turn with `unresolved-guardrail`, so register the guardrail before an
240
+ agent references it.
241
+
242
+ ## Changing a guardrail
243
+
244
+ Guardrails have no `version` field; the id is the stable identifier.
245
+ Changing a guardrail's check, config, severity or action changes
246
+ behavior for every agent that references it. When you tighten a rule
247
+ (raise severity from `warn` to `error`, switch the action from
248
+ `log-only` to `halt`), check whether the agents that reference it are
249
+ ready for the stricter enforcement.
250
+
251
+ ## Common mistakes
252
+
253
+ 1. **Confusing guardrail and check.** The id in `agent.guardrails: [...]`
254
+ is the GUARDRAIL id, not the check id. The agent binds to
255
+ guardrails; guardrails reference checks.
256
+
257
+ 2. **A check whose `evaluate` always returns `passed: true`.** If you
258
+ are stubbing the check, give the guardrail `action: { 'on-violation':
259
+ 'log-only' }` so it is honest about not being enforced.
260
+
261
+ 3. **Calling a model from a pack check.** Pack checks receive empty
262
+ `bindings`; there is no provider registry to route through. Declare
263
+ an `llm-judge` guardrail with a rubric instead.
264
+
265
+ 4. **Not declaring `configSchema`.** Without it, `config` is
266
+ `Record<string, unknown>` — no validation, no editor completion,
267
+ silent typos. Prefer Zod for TS-side inference on
268
+ `evaluate(config, ...)`.
269
+
270
+ 5. **Ignoring the `Result` from `defineGuardrail`.** It returns
271
+ `Result<Guardrail, …>`; check `kind` and throw at load time.
272
+ `defineCheck` itself throws when its `configSchema` can't be
273
+ compiled.
274
+
275
+ ## References
276
+
277
+ - Type surface: hover any `@kindgi/sdk/define` export for full JSDoc;
278
+ `Guardrail`, `defineGuardrail` and the built-in checks are in
279
+ `@kindgi/guardrails`.
280
+ - Companion docs: `pnpm --filter @kindgi/sdk exec typedoc`.
281
+ - Built-in check implementations: `packages/guardrails/src/checks.ts`.
282
+
283
+ ## When the framework itself is the problem
284
+
285
+ If you diagnose that the bug lives in Kindgi/`@kindgi/sdk` itself
286
+ (guardrail runtime dropping context fields, check-sandbox dispatch
287
+ regression, misleading error message, CLI friction) — not in the
288
+ pack's own code — load the `kindgi-framework-feedback` skill and file
289
+ a structured report with `kindgi feedback write`. That diagnostic is
290
+ high-signal input the maintainers can act on; don't let it disappear
291
+ into the transcript.
@@ -0,0 +1,289 @@
1
+ ---
2
+ name: kindgi-authoring-mcp-servers
3
+ description: >
4
+ Wire an MCP server into a Kindgi pack so the coding agent (Claude Code,
5
+ Cursor, VS Code, Windsurf, …) can discover a live external resource
6
+ through tools instead of asking the user to paste schemas or values.
7
+ Uses `kindgi secrets set` for the credential (interactive, no-echo) and
8
+ `kindgi mcp add <preset>` to write `.mcp.json` at the pack root. The
9
+ launcher (`kindgi mcp-launch`) spawns the actual MCP server as a
10
+ subprocess with the secret injected into its env — never onto the
11
+ model's transcript. Load this when the user says "I have a Postgres
12
+ URL, can you look at the schema", "connect to my database", "wire
13
+ MCP", "add a Postgres MCP", "let CC query my DB", "I don't want to
14
+ paste my table shape", or when the model is about to ask the user to
15
+ paste external schema/data that Kindgi could discover through MCP.
16
+ Credential storage is covered by kindgi-authoring-providers's
17
+ `kindgi secrets set` flow.
18
+ type: core
19
+ library: "@kindgi/sdk"
20
+ version: "0.3.0"
21
+ sdk_version: "0.1.0"
22
+ pack_languages: [node, python]
23
+ ---
24
+
25
+ # Wiring an MCP server for a Kindgi pack
26
+
27
+ > **Running `kindgi`:** in a Node project the CLI is a devDependency
28
+ > (`@kindgi/cli`), not a global command. Run it through the project's
29
+ > package manager — `pnpm exec kindgi …`, `npx --no kindgi …` (npm),
30
+ > `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
31
+ > `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`.
32
+ > Commands below are written `kindgi …` for brevity.
33
+
34
+ If the user has an external resource (Postgres DB, GitHub org, Notion
35
+ workspace, …) that would be useful to a coding agent, **wire an MCP
36
+ server** rather than asking the user to paste values. Kindgi keeps the
37
+ credential out of the model's transcript by injecting it into the
38
+ subprocess's environment; the model only sees the tools the MCP server
39
+ exposes.
40
+
41
+ ## When to reach for this
42
+
43
+ Reach for MCP when the user hands you a live external resource by
44
+ reference (URL, host + credential, workspace id). Signals from the
45
+ user:
46
+ - "I have a Postgres database at $URL"
47
+ - "Connect to my Notion workspace at $TOKEN"
48
+ - "Let CC look at the schema of my DB"
49
+ - "Don't paste it, just query it"
50
+
51
+ **Do NOT reach for MCP when:**
52
+ - The resource is a static file the user has locally (just Read it).
53
+ - The resource is best-inspected once by a human (a one-shot answer, no
54
+ agent tools needed).
55
+ - The user is in a client that hasn't loaded `.mcp.json` yet — they'll
56
+ need to restart their MCP client after `kindgi mcp add` (see gotcha
57
+ #2 below).
58
+
59
+ ## Mental model
60
+
61
+ ```
62
+ Kindgi's SecretBinding .mcp.json (pack root) launcher subprocess MCP server subprocess
63
+ ───────────────────── ──────────────────── ────────────────── ────────────────────
64
+ MY_DB_URL=… → { "command": "pnpm", → reads .env + → spawns child with
65
+ (.env / .env.local, or "args": ["exec","kindgi", .env.local (the DATABASE_URI in env,
66
+ `kindgi secrets set`) "mcp-launch", "--", …] } pack env files), stdio piped to CC
67
+ │ substitutes secret ▲ │
68
+ │ into child env │ ▼
69
+ ▼ │ MCP protocol (stdio)
70
+ Claude Code / Cursor spawns │ ▲ │
71
+ `kindgi mcp-launch …` at │ │ ▼
72
+ startup ─────────────────────────────┘ ┌─────────────────┐
73
+ │ Claude Code │
74
+ │ (or Cursor…) │
75
+ └─────────────────┘
76
+ ```
77
+
78
+ Three moving parts:
79
+
80
+ 1. **The secret on disk** — for `local`, the project's env files at the
81
+ pack root (`.env`, then `.env.local`; `dev.envFiles` to change);
82
+ other environments use `.env.<envName>`. Add it by hand or with
83
+ `kindgi secrets set` (interactive no-echo prompt; never the value on
84
+ argv), which writes `.env.local`. See `kindgi-authoring-providers`
85
+ for the same flow used for LLM API keys.
86
+ 2. **`.mcp.json` at the pack root** — Kindgi writes this via
87
+ `kindgi mcp add`. Every entry runs the project's own `kindgi
88
+ mcp-launch -- <launcher-flags>...` through its package manager
89
+ (`"command": "pnpm", "args": ["exec", "kindgi", "mcp-launch", …]`;
90
+ npm: `npx --no kindgi …`) — never a global `kindgi`, never a
91
+ download. A Python pack has no Node project, so its entries run the
92
+ `kindgi` on `PATH` (`"command": "kindgi", "args": ["mcp-launch", …]`).
93
+ The file is safe to commit — it references secrets by NAME, not
94
+ value.
95
+ 3. **The launcher** — `kindgi mcp-launch` is what the coding agent
96
+ actually spawns. It reads the referenced secret from the pack env files,
97
+ injects it into the child MCP server's env, and pipes stdio through.
98
+
99
+ ## Path A — Postgres
100
+
101
+ Best-worn path. Uses `crystaldba/postgres-mcp` via Docker with
102
+ read-only access mode by default.
103
+
104
+ **Step 1 — set the DB URL** (interactive, no-echo):
105
+
106
+ ```sh
107
+ kindgi secrets set MY_DB_URL --env=local --scope=tenant
108
+ # paste postgres://user:pass@host:port/db, press enter
109
+ ```
110
+
111
+ For pipelines/CI: `pbpaste | kindgi secrets set … --from-stdin`, or
112
+ `--from-file=<path>` on a mode-0600 file. Never pass the value on argv.
113
+
114
+ **Step 2 — wire the MCP server:**
115
+
116
+ ```sh
117
+ kindgi mcp add postgres --secret=MY_DB_URL
118
+ ```
119
+
120
+ Writes `.mcp.json` at the pack root (or merges into an existing one).
121
+ The server name defaults to `my_db` (derived from the secret
122
+ name — see "Server naming" below). Override with `--server-name=<label>`.
123
+
124
+ **Step 3 — restart your MCP client.** MCP servers are loaded at client
125
+ startup — a fresh `.mcp.json` doesn't take effect mid-session:
126
+ - **Claude Code:** exit + `claude` again in the same pack dir
127
+ - **Cursor:** ⌘⇧P → "Restart Extension Host" (or restart the app)
128
+ - **Claude Desktop:** quit + reopen
129
+ - **Windsurf:** Command Palette → "Restart Windsurf"
130
+
131
+ **Step 4 — use it.** Tools like `execute_sql`, `list_tables`,
132
+ `analyze_index_health` now appear. Ask the agent things like "what
133
+ tables are in this schema?" or "what's the shape of the customers
134
+ table?" or "how many rows are in orders where created_at > 2024?".
135
+
136
+ ## Path B — Multiple servers in the same pack
137
+
138
+ Two connections against different DBs? Two `mcp add` invocations,
139
+ each with its own `--secret` and `--server-name`:
140
+
141
+ ```sh
142
+ kindgi secrets set MY_DB_URL --env=local --scope=tenant
143
+ kindgi secrets set ANALYTICS_DB_URL --env=local --scope=tenant
144
+
145
+ kindgi mcp add postgres --secret=MY_DB_URL --server-name=my_db
146
+ kindgi mcp add postgres --secret=ANALYTICS_DB_URL --server-name=analytics_db
147
+ ```
148
+
149
+ `.mcp.json` gets two entries. The agent picks the right one by name
150
+ when it invokes a tool (e.g. `my_db.execute_sql`).
151
+
152
+ ## Server naming
153
+
154
+ `--server-name` defaults are derived from the secret name:
155
+
156
+ | Secret name | Default server name |
157
+ |---|---|
158
+ | `MY_DB_URL` | `my_db` |
159
+ | `ANALYTICS_DB_URL` | `analytics_db` |
160
+ | `ANTHROPIC_API_KEY` | `anthropic_api` |
161
+ | `GITHUB_PAT` | `github` |
162
+ | `DB_PASSWORD` | `db` |
163
+
164
+ The suffix-stripping (`_url` / `_uri` / `_key` / `_token` / `_pat` /
165
+ `_secret` / `_password`) is intentional — the server name should
166
+ describe the *resource*, not the *credential shape*. Override with
167
+ `--server-name=<label>` when the default reads wrong.
168
+
169
+ ## Path C — Non-Claude-Code clients
170
+
171
+ `.mcp.json` at the pack root is what Claude Code reads natively. Other
172
+ clients read from their own paths (`.cursor/mcp.json`, `.vscode/mcp.json`,
173
+ Claude Desktop's system-wide config). To bridge:
174
+
175
+ 1. Establish a symlink from the client's expected path to `.mcp.json`:
176
+ ```sh
177
+ mkdir -p .cursor && ln -sfn ../.mcp.json .cursor/mcp.json
178
+ ```
179
+ 2. Restart the client.
180
+
181
+ Symlinks work because the FILE CONTENTS are portable across every MCP
182
+ client — the `mcpServers` block has the same shape everywhere. Only
183
+ the file LOCATION differs. Edits to `.mcp.json` flow through
184
+ automatically via the symlink; no re-sync needed.
185
+
186
+ Windows users without dev-drive symlinks: `cp .mcp.json .cursor/mcp.json`,
187
+ and re-copy after every `kindgi mcp` edit.
188
+
189
+ ## Verifying end-to-end
190
+
191
+ ```sh
192
+ # 1. Check the secret exists
193
+ kindgi secrets list --env=local --scope=tenant
194
+
195
+ # 2. Check .mcp.json
196
+ kindgi mcp list
197
+
198
+ # 3. Check available presets
199
+ kindgi mcp presets
200
+ ```
201
+
202
+ `kindgi mcp list` prints the configured servers with their launcher
203
+ argv shape. `kindgi mcp presets` shows what presets are available and
204
+ their audit status. If the postgres preset audit says
205
+ `urlLeakInErrors: "pending"`, that's a known unresolved item — see
206
+ gotcha #4.
207
+
208
+ ## Common mistakes
209
+
210
+ 1. **Reading `.mcp.json` mid-session and asking about it.** `.mcp.json`
211
+ references secrets by NAME (e.g. `secret:MY_DB_URL@local:tenant`),
212
+ not by value. Safe to Read + describe to the user. **Do NOT** run
213
+ `cat .env`, `env | grep`, or Read `.env` / `.env.local` — those return
214
+ the raw URL, which enters your transcript, gets sent to the model
215
+ provider on every subsequent turn, and can be exfiltrated via
216
+ prompt injection. Once a secret is in a model's context, it's a
217
+ rotation event, not a "clean up the log" event.
218
+
219
+ 2. **Expecting the new server to activate without a restart.** MCP
220
+ servers are loaded at client startup. `kindgi mcp add` writes the
221
+ config file; the CLIENT doesn't re-scan it until a restart. Tell
222
+ the user to restart their client after `mcp add`, and don't call
223
+ MCP tools before that restart happens in your current session.
224
+
225
+ 3. **`--env` / `--scope` mismatch between `secrets set` and `mcp add`.**
226
+ Both flags need to agree — the launcher looks up the secret using
227
+ whatever `--env` + `--scope` you passed to `mcp add`. Default is
228
+ `--env=local --scope=tenant`; match this on both commands.
229
+
230
+ 4. **Trusting a preset's audit metadata that says `pending`.** Every
231
+ preset carries `audit.urlLeakInErrors`. Only `"verified-safe"` means
232
+ someone has confirmed the wrapped MCP server doesn't echo the
233
+ secret in its error/debug output. `"pending"` means the audit
234
+ hasn't run — the server may or may not leak. When you see a
235
+ `pending` preset in a session that handles real credentials, tell
236
+ the user: "this preset works but its URL-echo safety isn't
237
+ verified for this version; watch tool error messages for the raw
238
+ URL, and file feedback if you see one."
239
+
240
+ 5. **Trying to use MCP against a `localhost` DB from Docker on Mac
241
+ without the host-remap.** Docker containers on Mac can't reach the
242
+ host's `localhost`. The `postgres` preset carries `hostRemap:
243
+ "docker-desktop"`, which the launcher applies automatically — it
244
+ rewrites `@localhost` / `@127.0.0.1` in the resolved URL to
245
+ `@host.docker.internal` before injecting into the container's env.
246
+ If you author a preset with a Docker runtime + a localhost
247
+ consumer, include `"hostRemap": "docker-desktop"` in the preset JSON.
248
+
249
+ 6. **`kindgi mcp add` fails with "Secret X not in .env, .env.local".** The
250
+ secret hasn't been stored yet. Run `kindgi secrets set X --env=local
251
+ --scope=tenant` first. The error message includes this fix pointer.
252
+
253
+ ## Security discipline
254
+
255
+ The invariants this skill inherits — every bullet here is enforced by
256
+ you, the coding agent, in the session where MCP is wired:
257
+
258
+ - **Never Read `.env`, `.env.local` or `.env.<envName>` files.** Their contents are the raw
259
+ secret values. Reading them puts the secret in your tool result and
260
+ from there in every subsequent turn's context sent to the model
261
+ provider.
262
+ - **Never run `env | grep SECRET_NAME`, `printenv SECRET_NAME`, or
263
+ equivalent** in a bash tool. Same failure — the value returns in the
264
+ tool result.
265
+ - **When a tool errors, check the error message before summarizing.**
266
+ Some MCP servers echo the connection string in `connection refused`
267
+ errors. If you see the URL in a tool error, redact when
268
+ summarizing to the user, and file the incident via the
269
+ `kindgi-framework-feedback` skill so the preset's audit gets updated.
270
+ - **Prefer `kindgi mcp list` over Reading `.mcp.json`** when the user
271
+ asks "what's configured?" — the list output has the same info in a
272
+ cleaner shape and is safe to include in your reply.
273
+ - **Never repeat the resolved URL back to the user** — even in a
274
+ "here's what I wired up" summary. Refer to the secret by NAME and
275
+ to the server by its `.mcp.json` label. The point of MCP is that
276
+ the value stays out of every layer that a model can see; repeating
277
+ it in your reply defeats the invariant.
278
+
279
+ ## When the framework itself is the problem
280
+
281
+ If you diagnose that the bug lives in Kindgi/`@kindgi/cli` itself
282
+ (`kindgi mcp add` writes malformed JSON, `mcp-launch` hangs, a preset
283
+ has bad `defaultArgs`, launcher can't resolve a secret that clearly
284
+ exists in the pack env files, an MCP server echoes the URL in its
285
+ error tool result) — not in your pack's `.mcp.json` or secret setup —
286
+ load the `kindgi-framework-feedback` skill and file a structured
287
+ report with `kindgi feedback write`. That diagnostic is high-signal
288
+ input the maintainers can act on; don't let it disappear into the
289
+ transcript.