@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,704 @@
1
+ ---
2
+ name: kindgi-authoring-providers
3
+ description: >
4
+ Wire an LLM model provider so a Kindgi pack's agents
5
+ can actually call a real model. Covers four paths — hosted via
6
+ Anthropic native adapter, Gemini on Vertex AI (Google Application
7
+ Default Credentials, no API key), hosted via the OpenAI-compat adapter
8
+ (works with OpenAI + Groq + Together + Fireworks + OpenRouter +
9
+ Ollama + vLLM + any other OpenAI-compatible endpoint), and local
10
+ via the in-process ONNX adapter — plus the credential flow (in
11
+ `kindgi dev` the key lives in the project's env files — `.env`, then
12
+ `.env.local` — added by hand or with `kindgi secrets set`'s no-echo
13
+ prompt; the Kindgi runtime reads it through the dotenv secret binding
14
+ at agent-turn time). One provider row exposes one
15
+ connection with one or more models under `metadata.models[]`; the
16
+ router picks the (provider, model) tuple per invocation. Load this
17
+ when the user asks to "register a provider", "use Claude / GPT /
18
+ Groq / Llama / Gemini", "wire Anthropic", "use Vertex", "set up an API key for the agent",
19
+ or when an agent has been authored but the pack has no provider
20
+ registered yet. Authoring agents themselves is covered by
21
+ kindgi-authoring-agents; getting-started is covered by
22
+ kindgi-getting-started.
23
+ type: core
24
+ library: "@kindgi/sdk"
25
+ version: "0.9.1"
26
+ sdk_version: "0.1.0"
27
+ pack_languages: [node, python]
28
+ sources:
29
+ - packages/adapters/model-anthropic/src/provider.ts
30
+ - packages/adapters/model-gemini/src/provider.ts
31
+ - packages/adapters/model-openai-compat/src/provider.ts
32
+ - packages/adapters/model-in-process/src/provider.ts
33
+ - packages/api/src/routes/providers.ts
34
+ - packages/secrets-dotenv/src/index.ts
35
+ ---
36
+
37
+ # Wiring a model provider for a Kindgi pack
38
+
39
+ > **Running `kindgi`:** in a Node project the CLI is a devDependency
40
+ > (`@kindgi/cli`), not a global command. Run it through the project's
41
+ > package manager — `pnpm exec kindgi …`, `npx --no kindgi …` (npm),
42
+ > `yarn kindgi …` or `bun run kindgi …`. A Python pack (`[tool.kindgi]` in
43
+ > `pyproject.toml`) has no Node project: run the `kindgi` on `PATH`.
44
+ > Commands below are written `kindgi …` for brevity.
45
+
46
+ An **agent** is a versioned declaration; it needs a **provider** to run.
47
+ The provider is what turns the agent's messages into an LLM call.
48
+ `kindgi dev` ships with a stub `dev-echo` provider that only echoes
49
+ canned strings — fine for verifying the harness, useless for a real
50
+ agent turn. It is a **fallback** provider: it answers only when no other
51
+ registered provider fits the agent, so registering a real one takes over
52
+ with nothing else to change. This skill covers wiring a real one.
53
+
54
+ ## Mental model
55
+
56
+ ```
57
+ Project .env / .env.local dotenv SecretBinding runtime ProviderRegistry
58
+ ───────────────────────── ───────────────────── ────────────────────────
59
+ ANTHROPIC_API_KEY=sk-... → resolve('local', hydrated per tenant on first
60
+ 'ANTHROPIC_API_KEY') access; each row =
61
+ { metadata, adapter_id,
62
+ secret_ref?,
63
+ adapter_config? }
64
+ │ │
65
+ ▼ ▼
66
+ adapter factory ──── resolves apiKey lazily via closure
67
+ │
68
+ ▼
69
+ ModelProvider ────── router picks a (provider, model)
70
+ tuple when an agent's
71
+ capabilities.needs matches
72
+ ```
73
+
74
+ Three moving parts:
75
+ 1. **API key on disk** — in `kindgi dev` (environment `local`) the dotenv
76
+ secret binding reads the project's own env files: `.env`, then
77
+ `.env.local` on top (change the list with `dev.envFiles` in
78
+ `kindgi.config.ts`, or `envFiles` under `[tool.kindgi.dev]` in a Python
79
+ pack's `pyproject.toml`). A key already in the app's `.env` just works.
80
+ `kindgi secrets set` (interactive, no-echo) writes `.env.local`. For
81
+ non-sensitive values (log levels, region names, feature flags),
82
+ `kindgi env set NAME VALUE --env=local` writes the same file with a
83
+ positional value — never route real secrets through it. `KINDGI_*`
84
+ names configure Kindgi itself and are never resolvable as secrets.
85
+ 2. **Provider registration** — `kindgi providers register --spec=@provider.json` (`POST /v1/providers`)
86
+ 3. **Agent's `capabilities.needs`** — matched at the (provider, model) tuple level at turn time
87
+
88
+ **Registration body:** `{ metadata, adapter_id, secret_ref?, adapter_config? }`.
89
+ `secret_ref` points at the credential; `adapter_config` holds the adapter's
90
+ non-secret connection settings (a cloud project, a base URL) as flat string,
91
+ number or boolean values. Both are stored with the provider and handed to the
92
+ runtime; `kindgi providers list` / `get` show only `metadata`. Never put a
93
+ credential in `adapter_config`.
94
+
95
+ **Shape rule:** `ProviderMetadata.id` names the CONNECTION (e.g. `anthropic`,
96
+ `groq`, `local-onnx`); per-model fields (`name`, `contextWindow`, `cost`,
97
+ `features`) live inside `metadata.models[]`. One row can expose many models
98
+ under the same API key.
99
+
100
+ **Fallbacks:** `"fallback": true` in `metadata` makes a provider a
101
+ fallback — the router considers it only when no other provider satisfies
102
+ the agent's capability, and the turn's result then carries a
103
+ `fallback-provider` warning. `dev-echo` is one; a cheap local model can be
104
+ yours.
105
+
106
+ ## Path A — Hosted, native Anthropic
107
+
108
+ Best fidelity to Anthropic's API (prompt caching, latest models, tool
109
+ use, structured output). Requires an `ANTHROPIC_API_KEY`.
110
+
111
+ **Step 1 — set the key:**
112
+ ```sh
113
+ kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant
114
+ # Prompts interactively (echo disabled). Paste the key, press enter.
115
+ ```
116
+ Writes to `.env.local` at the pack root via the dotenv secret binding —
117
+ or add `ANTHROPIC_API_KEY=…` to `.env` / `.env.local` yourself; `kindgi
118
+ dev` reads both. If the pack lives inside an app whose `.env` already
119
+ has the key, there is nothing to do. Keep env files gitignored. For pipelines/CI, pipe the value with
120
+ `echo -n "$KEY" | kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant --from-stdin`,
121
+ or read from a mode-0600 file with `--from-file <path>`. Never pass a
122
+ credential on argv.
123
+
124
+ **Step 2 — register it, from the preset:**
125
+ ```sh
126
+ kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
127
+ kindgi providers register --preset=anthropic --models=claude-haiku-4-5 # just one
128
+ ```
129
+ The preset carries the models, context windows and current prices
130
+ (`kindgi providers presets` lists the presets and when their prices were
131
+ checked). In a pack it refuses until the key is in the pack's env files —
132
+ step 1. That's all for Anthropic; go to step 4. The rest of this path is
133
+ the same registration by hand, for a spec of your own.
134
+
135
+ **Step 2 (by hand) — write `provider.json`** at the pack root. One connection,
136
+ three models — matches how the Anthropic SDK actually works (the API
137
+ key is per-vendor; the model is per-call):
138
+ ```json
139
+ {
140
+ "metadata": {
141
+ "id": "anthropic",
142
+ "region": "us-east-1",
143
+ "models": [
144
+ {
145
+ "name": "claude-opus-5-5",
146
+ "contextWindow": 1000000,
147
+ "features": ["tool-use", "structured-output"],
148
+ "cost": {
149
+ "promptUsdPer1kTokens": 0.004,
150
+ "completionUsdPer1kTokens": 0.02
151
+ },
152
+ "description": "Most capable Opus — long-running agentic and knowledge work."
153
+ },
154
+ {
155
+ "name": "claude-sonnet-5-5",
156
+ "contextWindow": 1000000,
157
+ "features": ["tool-use", "structured-output"],
158
+ "cost": {
159
+ "promptUsdPer1kTokens": 0.002,
160
+ "completionUsdPer1kTokens": 0.01
161
+ },
162
+ "description": "Balanced performance/cost."
163
+ },
164
+ {
165
+ "name": "claude-haiku-4-5",
166
+ "contextWindow": 200000,
167
+ "features": ["tool-use"],
168
+ "cost": {
169
+ "promptUsdPer1kTokens": 0.001,
170
+ "completionUsdPer1kTokens": 0.005
171
+ },
172
+ "description": "Fastest and cheapest — routing, classification, simple calls."
173
+ }
174
+ ],
175
+ "description": "Anthropic Claude via native adapter."
176
+ },
177
+ "adapter_id": "@kindgi/adapter-model-anthropic",
178
+ "secret_ref": { "envName": "local", "name": "ANTHROPIC_API_KEY" }
179
+ }
180
+ ```
181
+
182
+ > ⚠ **Units gotcha:** the field is `promptUsdPer1kTokens` (per THOUSAND
183
+ > tokens), but every vendor pricing page (Anthropic, OpenAI, Groq)
184
+ > advertises rates PER MILLION. Divide by 1000 before you paste. Sonnet
185
+ > 5.5 is "$2 / MTok input" → `0.002`, "$10 / MTok output" → `0.01`. A
186
+ > misplaced factor makes real cost look 1000× real; a $0.15 budget
187
+ > blows in the first turn.
188
+
189
+ **Step 3 — register:**
190
+ ```sh
191
+ kindgi providers register --spec=@provider.json
192
+ ```
193
+ Returns `{providerId: "anthropic"}` on success. Idempotent in the sense
194
+ that re-registering the same id returns `provider-already-registered`;
195
+ unregister first if the config actually changed.
196
+
197
+ **Step 4 — verify:**
198
+ ```sh
199
+ kindgi providers list
200
+ ```
201
+
202
+ **Step 5 — run:** any agent whose `capabilities: [{needs: [{feature:
203
+ 'tool-use'}]}]` is now routed to a (`anthropic`, `<one of the models>`)
204
+ tuple. The router picks by score; prefer a provider with
205
+ `preferredProvider` and pin a model with a `models: { allow: [...] }`
206
+ capability requirement (see "How the router picks…" below).
207
+
208
+ Nothing to switch off: `dev-echo` is a fallback, so the new provider
209
+ answers every agent it satisfies. A turn that still lands on dev-echo
210
+ carries a `fallback-provider` warning — see mistake 9.
211
+
212
+ ## Path B — Hosted via OpenAI-compat
213
+
214
+ Works with **any** OpenAI-compatible endpoint. Same adapter, different
215
+ `baseURL`:
216
+
217
+ | Provider | baseURL |
218
+ |---|---|
219
+ | OpenAI | `https://api.openai.com/v1` |
220
+ | Groq | `https://api.groq.com/openai/v1` |
221
+ | Together | `https://api.together.xyz/v1` |
222
+ | Fireworks | `https://api.fireworks.ai/inference/v1` |
223
+ | OpenRouter | `https://openrouter.ai/api/v1` |
224
+ | DeepSeek | `https://api.deepseek.com/v1` |
225
+ | LiteLLM proxy | `http://localhost:4000/v1` |
226
+
227
+ The connection carries the `baseURL` (in `adapter_config`);
228
+ each endpoint is a separate provider row because each has its own API
229
+ key + region. Within one row, list every model that endpoint exposes.
230
+
231
+ **Step 1 — set the key:**
232
+ ```sh
233
+ kindgi secrets set GROQ_API_KEY --env=local --scope=tenant
234
+ # Interactive prompt; paste and enter.
235
+ ```
236
+
237
+ **Step 2 — `provider.json`** (Groq, exposing two Llama variants):
238
+ ```json
239
+ {
240
+ "metadata": {
241
+ "id": "groq",
242
+ "region": "us-central-1",
243
+ "models": [
244
+ {
245
+ "name": "llama-3.3-70b-versatile",
246
+ "contextWindow": 128000,
247
+ "features": ["tool-use"],
248
+ "cost": {
249
+ "promptUsdPer1kTokens": 0.00059,
250
+ "completionUsdPer1kTokens": 0.00079
251
+ }
252
+ },
253
+ {
254
+ "name": "llama-3.1-8b-instant",
255
+ "contextWindow": 128000,
256
+ "features": ["tool-use"],
257
+ "cost": {
258
+ "promptUsdPer1kTokens": 0.00005,
259
+ "completionUsdPer1kTokens": 0.00008
260
+ },
261
+ "description": "Fast + cheap tier — routing, classification."
262
+ }
263
+ ],
264
+ "description": "Groq-hosted Llama via OpenAI-compat."
265
+ },
266
+ "adapter_id": "@kindgi/adapter-model-openai-compat",
267
+ "secret_ref": { "envName": "local", "name": "GROQ_API_KEY" },
268
+ "adapter_config": { "baseURL": "https://api.groq.com/openai/v1" }
269
+ }
270
+ ```
271
+
272
+ **Steps 3–5** same as Path A.
273
+
274
+ ## Path C — Local via in-process ONNX
275
+
276
+ > ⚠️ **Dev-only.** The in-process ONNX adapter writes weights to
277
+ > `~/.cache/huggingface/hub/` — a per-machine cache with no production
278
+ > recipe (no volume-mount recipe, no image-bake pattern, no offline
279
+ > mode, no SHA pinning). Good for local dev, smoke tests, and CI
280
+ > runners that keep the same disk between runs. **Do not ship packs
281
+ > that rely on this adapter to production.** Use hosted providers
282
+ > (Path A) or Ollama (Path B) instead.
283
+
284
+ No API key. No network. Bundled with the framework — the adapter ships
285
+ `smollm2-360m` by default (~273 MB weights, cached at
286
+ `~/.cache/huggingface/hub/models--HuggingFaceTB--SmolLM2-360M-Instruct/`
287
+ after `kindgi adapters prepare`).
288
+
289
+ **Not for reasoning-heavy agents.** SmolLM 360M is fine for smoke
290
+ tests, canary agents, dev/CI. Real work needs a hosted model or a
291
+ larger local model via Ollama (Path B).
292
+
293
+ **`provider.json`** (single-model):
294
+ ```json
295
+ {
296
+ "metadata": {
297
+ "id": "local-onnx",
298
+ "region": "in-process",
299
+ "models": [
300
+ {
301
+ "name": "smollm2-360m",
302
+ "contextWindow": 2048,
303
+ "features": ["tool-use"],
304
+ "cost": {
305
+ "promptUsdPer1kTokens": 0,
306
+ "completionUsdPer1kTokens": 0
307
+ }
308
+ }
309
+ ],
310
+ "description": "Local ONNX smollm2-360m — dev + smoke tests."
311
+ },
312
+ "adapter_id": "@kindgi/adapter-model-in-process"
313
+ }
314
+ ```
315
+
316
+ Multi-model variant — the in-process adapter loads each pipeline lazily,
317
+ so listing several models keeps memory low until they're actually
318
+ invoked:
319
+
320
+ ```json
321
+ {
322
+ "metadata": {
323
+ "id": "local-onnx",
324
+ "region": "in-process",
325
+ "models": [
326
+ { "name": "smollm2-135m", "contextWindow": 2048, "features": [],
327
+ "cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } },
328
+ { "name": "smollm2-360m", "contextWindow": 2048, "features": ["tool-use"],
329
+ "cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } },
330
+ { "name": "qwen3-0.6b", "contextWindow": 32768, "features": ["tool-use", "long-context"],
331
+ "cost": { "promptUsdPer1kTokens": 0, "completionUsdPer1kTokens": 0 } }
332
+ ]
333
+ },
334
+ "adapter_id": "@kindgi/adapter-model-in-process"
335
+ }
336
+ ```
337
+
338
+ No `secret_ref` needed. Register + **prepare** + run:
339
+ ```sh
340
+ kindgi providers register --spec=@provider.json
341
+ kindgi adapters prepare @kindgi/adapter-model-in-process --model=smollm2-360m
342
+ kindgi runs start --agent=<agent-id> --input='{...}'
343
+ ```
344
+
345
+ **Always `prepare` before `runs start`.** It downloads the ONNX weights
346
+ (~273 MB for smollm2-360m, ~30s on a typical connection) and streams
347
+ per-file progress. Skipping it works — the first model call downloads
348
+ lazily — but that stalls a request path on a multi-hundred-MB
349
+ fetch with no observability, which is bad in dev and unacceptable in
350
+ production. Skip only for scripted teardown where the model is already
351
+ cached (`~/.cache/huggingface/hub/models--HuggingFaceTB--SmolLM2-360M-Instruct/`).
352
+
353
+ `prepare` is idempotent: subsequent invocations are cache hits and
354
+ return almost instantly, so put it in every `kindgi dev` boot script.
355
+
356
+ Multi-model providers: prepare each model separately.
357
+ ```sh
358
+ kindgi adapters prepare @kindgi/adapter-model-in-process --model=smollm2-135m
359
+ kindgi adapters prepare @kindgi/adapter-model-in-process --model=smollm2-360m
360
+ kindgi adapters prepare @kindgi/adapter-model-in-process --model=qwen3-0.6b
361
+ ```
362
+
363
+ ## Local via Ollama (via Path B)
364
+
365
+ For bigger local models — Ollama runs them, we point at the OpenAI-compat
366
+ endpoint it exposes:
367
+
368
+ ```json
369
+ {
370
+ "metadata": {
371
+ "id": "ollama",
372
+ "region": "local",
373
+ "models": [
374
+ {
375
+ "name": "llama3",
376
+ "contextWindow": 8192,
377
+ "features": ["tool-use"],
378
+ "cost": {
379
+ "promptUsdPer1kTokens": 0,
380
+ "completionUsdPer1kTokens": 0
381
+ }
382
+ }
383
+ ],
384
+ "description": "Local Ollama Llama 3 8B."
385
+ },
386
+ "adapter_id": "@kindgi/adapter-model-openai-compat",
387
+ "adapter_config": { "baseURL": "http://localhost:11434/v1" }
388
+ }
389
+ ```
390
+
391
+ Ollama doesn't check a key, so the row has no `secret_ref`: without one,
392
+ the adapter sends a placeholder key, as local servers expect.
393
+
394
+ **Any model you serve yourself** (Ollama, vLLM, llama.cpp's
395
+ `llama-server`, LM Studio) must do two things for an agent:
396
+ - **Call tools in the OpenAI format.** Serve it with tool calling on
397
+ (vLLM `--enable-auto-tool-choice --tool-call-parser <the model's>`,
398
+ `llama-server --jinja`), and pick a model that supports tools.
399
+ - **Answer without its thinking.** A thinking model (Qwen and others)
400
+ writes its reasoning first unless asked not to, and a typed answer then
401
+ isn't JSON (`output-schema-violation`). Turn thinking off on the server
402
+ (vLLM `--default-chat-template-kwargs '{"enable_thinking": false}'`,
403
+ `llama-server --reasoning off`), or, for a shared server you can't
404
+ reconfigure, per request from the provider row:
405
+ `"extraBody.chat_template_kwargs.enable_thinking": false` in
406
+ `adapter_config`. `adapter_config` is flat: one key per request field,
407
+ dots nest.
408
+
409
+ Assumes Ollama is installed + the model is pulled (`ollama pull llama3`).
410
+ See ollama.com for install / hardware requirements — Llama 3 8B needs
411
+ ~8GB RAM, Llama 3 70B needs ~48GB VRAM or ~140GB RAM.
412
+
413
+ ## Path D — Gemini on Vertex AI
414
+
415
+ Gemini through Google Cloud's Vertex AI. No API key: the adapter uses
416
+ **Google Application Default Credentials** — your `gcloud` login on a
417
+ laptop, the attached service account on Cloud Run (and other Google Cloud
418
+ runtimes). The same registration works in both.
419
+
420
+ **Step 1 — credentials:**
421
+ ```sh
422
+ gcloud auth application-default login # once per laptop
423
+ ```
424
+ The account (locally) or the service account (deployed) needs the
425
+ **Vertex AI User** role (`roles/aiplatform.user`) in the project. Running
426
+ outside Google Cloud: put a service-account key (its JSON) in a secret
427
+ (`kindgi secrets set GEMINI_SA_KEY --env=local --scope=tenant`) and add
428
+ `"secret_ref": { "envName": "local", "name": "GEMINI_SA_KEY" }`.
429
+
430
+ **Step 2 — `provider.json`:**
431
+ ```json
432
+ {
433
+ "metadata": {
434
+ "id": "gemini",
435
+ "region": "global",
436
+ "models": [
437
+ {
438
+ "name": "gemini-2.5-pro",
439
+ "contextWindow": 1048576,
440
+ "features": ["tool-use"],
441
+ "maxOutputTokens": 8192,
442
+ "cost": {
443
+ "promptUsdPer1kTokens": 0.00125,
444
+ "completionUsdPer1kTokens": 0.01,
445
+ "longContext": {
446
+ "thresholdTokens": 200000,
447
+ "promptUsdPer1kTokens": 0.0025,
448
+ "completionUsdPer1kTokens": 0.015
449
+ }
450
+ }
451
+ },
452
+ {
453
+ "name": "gemini-2.5-flash",
454
+ "contextWindow": 1048576,
455
+ "features": ["tool-use"],
456
+ "cost": { "promptUsdPer1kTokens": 0.0003, "completionUsdPer1kTokens": 0.0025 }
457
+ }
458
+ ]
459
+ },
460
+ "adapter_id": "@kindgi/adapter-model-gemini",
461
+ "adapter_config": { "project": "<your-gcp-project-id>" }
462
+ }
463
+ ```
464
+ - `adapter_config.project` is required: the Google Cloud project Vertex
465
+ bills and authorises against.
466
+ - `metadata.region` is the Vertex location: `global`, or a region such as
467
+ `us-central1` or `northamerica-northeast1` when data must stay in one
468
+ place. `unspecified` means `global`. Different locations are different
469
+ provider rows.
470
+ - Rates are per 1K tokens, from Google's published pricing; check them
471
+ before relying on budgets. Thinking tokens bill as output.
472
+ `longContext` switches the whole call to the higher rates past the
473
+ threshold; `cachedPromptMultiplier` (default 0.25) prices cached
474
+ prompt tokens.
475
+
476
+ **Step 3 — register and check:**
477
+ ```sh
478
+ kindgi providers register --spec=@provider.json
479
+ kindgi providers list
480
+ ```
481
+ Or skip step 2: `kindgi providers register --preset=gemini --project=<your-gcp-project-id>`
482
+ registers both models above.
483
+ Then pin it from an agent with `preferredProvider: 'gemini'` (and a model
484
+ with `preferredModel`; in Python, `preferred_provider="gemini"` and
485
+ `preferred_model=…`), or let the router pick by capability.
486
+
487
+ ## How the router picks between multiple providers + models
488
+
489
+ When an agent turn fires, the router expands each registered provider
490
+ into one entry per model (`metadata.models[]`), filters the resulting
491
+ (provider, model) tuples against the agent's `capabilities.needs` (and
492
+ tenant policy), then sorts survivors in this order:
493
+
494
+ 1. **Preferred provider / model.** Tuples matching the agent's
495
+ `preferredProvider` (and `preferredModel`, when the `Agent` object
496
+ carries one) are promoted to the front.
497
+ - Both set → promote the exact tuple.
498
+ - Only `preferredModel` set → promote any provider exposing that model.
499
+ - Only `preferredProvider` set → promote every model of that provider.
500
+ `defineAgent` accepts `preferredProvider` but not `preferredModel`
501
+ (`DefineAgentSpec` has no such field), so agents built with it can
502
+ only express a provider preference here. A Python `Agent` takes
503
+ both (`preferred_provider=`, `preferred_model=`).
504
+ 2. **`capability.prefer[]` weights.** If the agent's capability
505
+ declares `prefer: [{feature: 'thinking', weight: 3}, ...]`, tuples
506
+ with matching model features (or provider attributes) get higher
507
+ scores. Sorted by summed score, descending.
508
+ 3. **Deterministic lexical tiebreak.** When scores tie, tuples sort by
509
+ `(providerId, modelName)` alphabetically — replay-safe and stable.
510
+
511
+ **Practical rule:** preferences are soft — they rank, they don't
512
+ exclude. To guarantee which model runs, make it a hard requirement in
513
+ the capability: `{ models: { allow: ['claude-sonnet-5-5'] } }` (and
514
+ `{ providers: { allow: ['anthropic'] } }` to pin the connection). If no
515
+ registered tuple satisfies it, the turn fails with
516
+ `capability-routing-failed` instead of silently using another model.
517
+
518
+ **A/B testing a specific agent across models within one Anthropic
519
+ registration:**
520
+
521
+ ```ts
522
+ // agents/weather-agent-sonnet/index.ts
523
+ defineAgent({
524
+ id: 'my-pack.weather-agent-sonnet',
525
+ // …same name, instructions, tools, retrieval and guardrails as the opus variant
526
+ capabilities: [
527
+ { needs: [{ feature: 'tool-use' }, { models: { allow: ['claude-sonnet-5-5'] } }] },
528
+ ],
529
+ preferredProvider: 'anthropic',
530
+ });
531
+
532
+ // agents/weather-agent-opus/index.ts
533
+ defineAgent({
534
+ id: 'my-pack.weather-agent-opus',
535
+ // …
536
+ capabilities: [
537
+ { needs: [{ feature: 'tool-use' }, { models: { allow: ['claude-opus-5-5'] } }] },
538
+ ],
539
+ preferredProvider: 'anthropic',
540
+ });
541
+ ```
542
+
543
+ The same pair in a Python pack (`kindgi.Agent`; module-level, one file each):
544
+
545
+ ```python
546
+ # agents/weather_agent_sonnet.py
547
+ weather_agent_sonnet = Agent(
548
+ id="my-pack.weather-agent-sonnet",
549
+ # …same version, name, instructions, tools and guardrails as the opus variant
550
+ capabilities=[
551
+ {"needs": [{"feature": "tool-use"}, {"models": {"allow": ["claude-sonnet-5-5"]}}]},
552
+ ],
553
+ preferred_provider="anthropic",
554
+ )
555
+
556
+ # agents/weather_agent_opus.py
557
+ weather_agent_opus = Agent(
558
+ id="my-pack.weather-agent-opus",
559
+ # …
560
+ capabilities=[
561
+ {"needs": [{"feature": "tool-use"}, {"models": {"allow": ["claude-opus-5-5"]}}]},
562
+ ],
563
+ preferred_provider="anthropic",
564
+ )
565
+ ```
566
+
567
+ Both agents share the tool + instructions; only the pinned model
568
+ differs. One Anthropic provider registration + one API key covers
569
+ both. Register the provider once, then invoke each agent to compare
570
+ outputs on the same inputs.
571
+
572
+ **A/B testing across vendors:**
573
+
574
+ ```ts
575
+ defineAgent({
576
+ id: 'my-pack.weather-agent-groq',
577
+ // …
578
+ capabilities: [
579
+ { needs: [{ feature: 'tool-use' }, { models: { allow: ['llama-3.3-70b-versatile'] } }] },
580
+ ],
581
+ preferredProvider: 'groq',
582
+ });
583
+
584
+ defineAgent({
585
+ id: 'my-pack.weather-agent-anthropic',
586
+ // …
587
+ capabilities: [
588
+ { needs: [{ feature: 'tool-use' }, { models: { allow: ['claude-sonnet-5-5'] } }] },
589
+ ],
590
+ preferredProvider: 'anthropic',
591
+ });
592
+ ```
593
+
594
+ ## Common mistakes
595
+
596
+ 0. **`adapter_id` uses the short name.** The `adapter_id` field must
597
+ be the FULL npm package name of the adapter — `"@kindgi/adapter-model-anthropic"`,
598
+ NOT `"anthropic"`. Adapters are registered with the runtime under
599
+ their full package names, and a short name matches none of them, so
600
+ the registration fails. Confirm valid ids with `kindgi adapters list`.
601
+
602
+ 1. **`envName` mismatch between the setter (`kindgi secrets set` or `env set`) and `provider.json`.**
603
+ Both writers use `--env=<name>` (default `local`): `local` is the
604
+ project's env files (`.env`, `.env.local`), any other name is
605
+ `.env.<envName>`. If your `provider.json` has
606
+ `"secret_ref": {"envName": "production", ...}`, the SecretBinding
607
+ refuses to cross-resolve — you get `secret-not-found` at agent-turn
608
+ time. Match them.
609
+
610
+ 2. **Missing `features` on the model.** Agent declares
611
+ `capabilities: [{needs: [{feature: 'tool-use'}]}]`; at least one
612
+ model inside `metadata.models[]` must list `"features":
613
+ ["tool-use"]` or the router filters every tuple out. If `kindgi
614
+ runs start` returns "no provider satisfies capability", check the
615
+ per-model `features` list — not a provider-level field anymore.
616
+
617
+ 3. **Empty `models[]`.** Registration rejects with `empty-models`. Every
618
+ provider row must expose at least one model. Duplicate `name` within
619
+ the same array is also rejected (`duplicate-model-name`).
620
+
621
+ 4. **Setting `secret_ref` for the in-process adapter.** `in-process`
622
+ ignores `secret_ref` — no key needed. Leaving it in is harmless but
623
+ noisy.
624
+
625
+ 5. **Registering the same provider id twice with different config.**
626
+ Returns `409 provider-already-registered`. Unregister first:
627
+ ```sh
628
+ kindgi providers unregister <provider-id>
629
+ ```
630
+ Then re-register.
631
+
632
+ 6. **Key not found by the runtime.** `kindgi dev` reads the env files
633
+ at the PACK ROOT (the directory with `kindgi.config.ts`, or a Python
634
+ pack's `pyproject.toml` with `[tool.kindgi]`) — `.env` and
635
+ `.env.local`, or whatever `dev.envFiles` lists; the boot log prints
636
+ which files it found. A `KINDGI_`-prefixed name is Kindgi runtime
637
+ config and never resolves as a secret. Outside `kindgi dev`, the
638
+ runtime resolves secrets through the deployment's `SecretBinding`
639
+ (a KMS- or database-backed store, for example).
640
+
641
+ 7. **Forgetting to restart `kindgi dev` after registering a provider.**
642
+ You don't need to — provider registrations go to the running runtime
643
+ over HTTP (`POST /v1/providers`), which invalidates the tenant's
644
+ cached provider set. The next `kindgi runs start` sees the new
645
+ provider.
646
+
647
+ 8. **Compound `preferredProvider` strings.** `preferredProvider` is a
648
+ provider (connection) id such as `'anthropic'`; the model is a
649
+ separate choice. A value like `'anthropic-claude-sonnet-5-5'`
650
+ (vendor + model baked together) matches no provider id, so the hint
651
+ does nothing. Pin the model with a `models: { allow: [...] }`
652
+ requirement instead.
653
+
654
+ 9. **Replies still come from dev-echo** (`Tool responded: …`; the turn's
655
+ result has a `fallback-provider` warning). dev-echo is a fallback: it
656
+ answers only when no registered provider satisfies the agent. So your
657
+ provider doesn't — check its models' `features` against the agent's
658
+ `capabilities.needs` (mistake 2), a `models` / `providers` allow-list
659
+ that names nothing registered, and the tenant's policy. `kindgi
660
+ providers list` shows what is registered.
661
+
662
+ ## Verifying end-to-end
663
+
664
+ ```sh
665
+ # 0. Run the runtime (in its own terminal)
666
+ kindgi dev
667
+
668
+ # 1. Set the key (interactive, no-echo prompt)
669
+ kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant
670
+
671
+ # 2. Register the provider (one row, all models)
672
+ kindgi providers register --preset=anthropic # or --spec=@provider.json
673
+
674
+ # 3. Confirm it's there (list shows nested models per provider)
675
+ kindgi providers list
676
+
677
+ # 4. Run an agent that needs `tool-use`
678
+ kindgi runs start \
679
+ --agent=my-pack.some-agent \
680
+ --input='{"userMessage": "test"}'
681
+ ```
682
+
683
+ If the run completes with `status: "completed"`, the whole chain works
684
+ end-to-end. If it fails with `secret-not-found`, check point (1). If it
685
+ fails with "no provider satisfies capability", check point (2). If it
686
+ completes with dev-echo's canned reply, see mistake 9.
687
+
688
+ ## References
689
+
690
+ - `packages/adapters/model-anthropic/src/provider.ts` — Anthropic adapter
691
+ - `packages/adapters/model-openai-compat/src/provider.ts` — Universal adapter, full list of tested endpoints in header comment
692
+ - `packages/adapters/model-in-process/src/provider.ts` — Local ONNX adapter
693
+ - `packages/api/src/routes/providers.ts` — `POST /v1/providers` route
694
+ - `packages/secrets-dotenv/src/index.ts` — Dev-mode secret binding
695
+
696
+ ## When the framework itself is the problem
697
+
698
+ If you diagnose that the bug lives in Kindgi/`@kindgi/sdk` itself
699
+ (silent registration failure masking a real error, an unknown adapter
700
+ reported as the wrong error, adapter regression, router picking
701
+ the wrong provider or wrong model) — not in your pack's provider spec —
702
+ load the `kindgi-framework-feedback` skill and file a structured report
703
+ with `kindgi feedback write`. That diagnostic is high-signal input the
704
+ maintainers can act on; don't let it disappear into the transcript.