@kindgi/cli 0.1.4-rc.5 → 0.1.5-rc.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 (329) hide show
  1. package/README.md +16 -10
  2. package/dist/build/defaults.d.ts +3 -1
  3. package/dist/build/defaults.d.ts.map +1 -1
  4. package/dist/build/defaults.js +44 -1
  5. package/dist/build/defaults.js.map +1 -1
  6. package/dist/build/java-image.d.ts +31 -0
  7. package/dist/build/java-image.d.ts.map +1 -0
  8. package/dist/build/java-image.js +146 -0
  9. package/dist/build/java-image.js.map +1 -0
  10. package/dist/build/pack-root.d.ts +1 -31
  11. package/dist/build/pack-root.d.ts.map +1 -1
  12. package/dist/build/pack-root.js +22 -2
  13. package/dist/build/pack-root.js.map +1 -1
  14. package/dist/build/runners.d.ts +44 -0
  15. package/dist/build/runners.d.ts.map +1 -1
  16. package/dist/build/scala-image.d.ts +21 -0
  17. package/dist/build/scala-image.d.ts.map +1 -0
  18. package/dist/build/scala-image.js +150 -0
  19. package/dist/build/scala-image.js.map +1 -0
  20. package/dist/cli-pin.d.ts +16 -0
  21. package/dist/cli-pin.d.ts.map +1 -0
  22. package/dist/cli-pin.js +66 -0
  23. package/dist/cli-pin.js.map +1 -0
  24. package/dist/commands/agents.d.ts.map +1 -1
  25. package/dist/commands/agents.js +9 -8
  26. package/dist/commands/agents.js.map +1 -1
  27. package/dist/commands/approvals.d.ts.map +1 -1
  28. package/dist/commands/approvals.js +30 -4
  29. package/dist/commands/approvals.js.map +1 -1
  30. package/dist/commands/artifacts.d.ts.map +1 -1
  31. package/dist/commands/artifacts.js +100 -37
  32. package/dist/commands/artifacts.js.map +1 -1
  33. package/dist/commands/auth.js +2 -2
  34. package/dist/commands/blocks.d.ts.map +1 -1
  35. package/dist/commands/blocks.js +5 -4
  36. package/dist/commands/blocks.js.map +1 -1
  37. package/dist/commands/build.d.ts +10 -2
  38. package/dist/commands/build.d.ts.map +1 -1
  39. package/dist/commands/build.js +109 -16
  40. package/dist/commands/build.js.map +1 -1
  41. package/dist/commands/capabilities.d.ts.map +1 -1
  42. package/dist/commands/capabilities.js +37 -10
  43. package/dist/commands/capabilities.js.map +1 -1
  44. package/dist/commands/console.d.ts +21 -0
  45. package/dist/commands/console.d.ts.map +1 -0
  46. package/dist/commands/console.js +87 -0
  47. package/dist/commands/console.js.map +1 -0
  48. package/dist/commands/conversations.d.ts.map +1 -1
  49. package/dist/commands/conversations.js +13 -2
  50. package/dist/commands/conversations.js.map +1 -1
  51. package/dist/commands/deploy.d.ts.map +1 -1
  52. package/dist/commands/deploy.js +2 -2
  53. package/dist/commands/deploy.js.map +1 -1
  54. package/dist/commands/dev.d.ts +11 -0
  55. package/dist/commands/dev.d.ts.map +1 -1
  56. package/dist/commands/dev.js +211 -39
  57. package/dist/commands/dev.js.map +1 -1
  58. package/dist/commands/doctor.d.ts +18 -5
  59. package/dist/commands/doctor.d.ts.map +1 -1
  60. package/dist/commands/doctor.js +421 -21
  61. package/dist/commands/doctor.js.map +1 -1
  62. package/dist/commands/env-scoped.d.ts +44 -0
  63. package/dist/commands/env-scoped.d.ts.map +1 -0
  64. package/dist/commands/env-scoped.js +222 -0
  65. package/dist/commands/env-scoped.js.map +1 -0
  66. package/dist/commands/env.d.ts.map +1 -1
  67. package/dist/commands/env.js +85 -123
  68. package/dist/commands/env.js.map +1 -1
  69. package/dist/commands/eval-runs.d.ts +9 -0
  70. package/dist/commands/eval-runs.d.ts.map +1 -1
  71. package/dist/commands/eval-runs.js +20 -19
  72. package/dist/commands/eval-runs.js.map +1 -1
  73. package/dist/commands/eval-suites.d.ts.map +1 -1
  74. package/dist/commands/eval-suites.js +16 -8
  75. package/dist/commands/eval-suites.js.map +1 -1
  76. package/dist/commands/exports.d.ts +3 -0
  77. package/dist/commands/exports.d.ts.map +1 -0
  78. package/dist/commands/exports.js +82 -0
  79. package/dist/commands/exports.js.map +1 -0
  80. package/dist/commands/feedback.d.ts.map +1 -1
  81. package/dist/commands/feedback.js +6 -5
  82. package/dist/commands/feedback.js.map +1 -1
  83. package/dist/commands/flows.d.ts.map +1 -1
  84. package/dist/commands/flows.js +2 -1
  85. package/dist/commands/flows.js.map +1 -1
  86. package/dist/commands/gate-policies.d.ts.map +1 -1
  87. package/dist/commands/gate-policies.js +2 -1
  88. package/dist/commands/gate-policies.js.map +1 -1
  89. package/dist/commands/guardrails.d.ts.map +1 -1
  90. package/dist/commands/guardrails.js +3 -2
  91. package/dist/commands/guardrails.js.map +1 -1
  92. package/dist/commands/helpers.js +5 -5
  93. package/dist/commands/helpers.js.map +1 -1
  94. package/dist/commands/index.d.ts.map +1 -1
  95. package/dist/commands/index.js +14 -0
  96. package/dist/commands/index.js.map +1 -1
  97. package/dist/commands/init.d.ts +1 -1
  98. package/dist/commands/init.d.ts.map +1 -1
  99. package/dist/commands/init.js +254 -18
  100. package/dist/commands/init.js.map +1 -1
  101. package/dist/commands/judge-classes.d.ts.map +1 -1
  102. package/dist/commands/judge-classes.js +11 -10
  103. package/dist/commands/judge-classes.js.map +1 -1
  104. package/dist/commands/judgments.d.ts.map +1 -1
  105. package/dist/commands/judgments.js +7 -6
  106. package/dist/commands/judgments.js.map +1 -1
  107. package/dist/commands/key.js +4 -4
  108. package/dist/commands/memory.d.ts.map +1 -1
  109. package/dist/commands/memory.js +277 -25
  110. package/dist/commands/memory.js.map +1 -1
  111. package/dist/commands/people.d.ts +3 -0
  112. package/dist/commands/people.d.ts.map +1 -0
  113. package/dist/commands/people.js +166 -0
  114. package/dist/commands/people.js.map +1 -0
  115. package/dist/commands/proposals.d.ts.map +1 -1
  116. package/dist/commands/proposals.js +390 -69
  117. package/dist/commands/proposals.js.map +1 -1
  118. package/dist/commands/provenance.d.ts.map +1 -1
  119. package/dist/commands/provenance.js +6 -7
  120. package/dist/commands/provenance.js.map +1 -1
  121. package/dist/commands/providers.d.ts.map +1 -1
  122. package/dist/commands/providers.js +46 -7
  123. package/dist/commands/providers.js.map +1 -1
  124. package/dist/commands/reviewers.d.ts.map +1 -1
  125. package/dist/commands/reviewers.js +3 -2
  126. package/dist/commands/reviewers.js.map +1 -1
  127. package/dist/commands/runs.d.ts.map +1 -1
  128. package/dist/commands/runs.js +24 -14
  129. package/dist/commands/runs.js.map +1 -1
  130. package/dist/commands/schedules.d.ts +3 -0
  131. package/dist/commands/schedules.d.ts.map +1 -0
  132. package/dist/commands/schedules.js +275 -0
  133. package/dist/commands/schedules.js.map +1 -0
  134. package/dist/commands/secrets.d.ts.map +1 -1
  135. package/dist/commands/secrets.js +10 -11
  136. package/dist/commands/secrets.js.map +1 -1
  137. package/dist/commands/service-accounts.d.ts +3 -0
  138. package/dist/commands/service-accounts.d.ts.map +1 -0
  139. package/dist/commands/service-accounts.js +175 -0
  140. package/dist/commands/service-accounts.js.map +1 -0
  141. package/dist/commands/skills.d.ts +1 -1
  142. package/dist/commands/skills.d.ts.map +1 -1
  143. package/dist/commands/skills.js +11 -4
  144. package/dist/commands/skills.js.map +1 -1
  145. package/dist/commands/sso.d.ts +6 -0
  146. package/dist/commands/sso.d.ts.map +1 -0
  147. package/dist/commands/sso.js +318 -0
  148. package/dist/commands/sso.js.map +1 -0
  149. package/dist/commands/tokens.d.ts +11 -0
  150. package/dist/commands/tokens.d.ts.map +1 -1
  151. package/dist/commands/tokens.js +144 -11
  152. package/dist/commands/tokens.js.map +1 -1
  153. package/dist/commands/tools.d.ts.map +1 -1
  154. package/dist/commands/tools.js +4 -3
  155. package/dist/commands/tools.js.map +1 -1
  156. package/dist/commands/unwired.d.ts.map +1 -1
  157. package/dist/commands/unwired.js +1 -30
  158. package/dist/commands/unwired.js.map +1 -1
  159. package/dist/commands/upgrade.d.ts +11 -0
  160. package/dist/commands/upgrade.d.ts.map +1 -0
  161. package/dist/commands/upgrade.js +160 -0
  162. package/dist/commands/upgrade.js.map +1 -0
  163. package/dist/context.d.ts +7 -0
  164. package/dist/context.d.ts.map +1 -1
  165. package/dist/context.js +1 -0
  166. package/dist/context.js.map +1 -1
  167. package/dist/dev/defaults.d.ts +28 -11
  168. package/dist/dev/defaults.d.ts.map +1 -1
  169. package/dist/dev/defaults.js +114 -35
  170. package/dist/dev/defaults.js.map +1 -1
  171. package/dist/dev/google-credentials.d.ts +50 -0
  172. package/dist/dev/google-credentials.d.ts.map +1 -0
  173. package/dist/dev/google-credentials.js +157 -0
  174. package/dist/dev/google-credentials.js.map +1 -0
  175. package/dist/dev/java-builder.d.ts +56 -0
  176. package/dist/dev/java-builder.d.ts.map +1 -0
  177. package/dist/dev/java-builder.js +204 -0
  178. package/dist/dev/java-builder.js.map +1 -0
  179. package/dist/dev/jvm-run-files.d.ts +29 -0
  180. package/dist/dev/jvm-run-files.d.ts.map +1 -0
  181. package/dist/dev/jvm-run-files.js +94 -0
  182. package/dist/dev/jvm-run-files.js.map +1 -0
  183. package/dist/dev/lines.d.ts +13 -0
  184. package/dist/dev/lines.d.ts.map +1 -0
  185. package/dist/dev/lines.js +24 -0
  186. package/dist/dev/lines.js.map +1 -0
  187. package/dist/dev/log-view.d.ts +116 -0
  188. package/dist/dev/log-view.d.ts.map +1 -0
  189. package/dist/dev/log-view.js +233 -0
  190. package/dist/dev/log-view.js.map +1 -0
  191. package/dist/dev/pack-code.d.ts +79 -4
  192. package/dist/dev/pack-code.d.ts.map +1 -1
  193. package/dist/dev/pack-code.js +262 -3
  194. package/dist/dev/pack-code.js.map +1 -1
  195. package/dist/dev/pack-env.d.ts.map +1 -1
  196. package/dist/dev/pack-env.js +4 -0
  197. package/dist/dev/pack-env.js.map +1 -1
  198. package/dist/dev/pack-service.d.ts +11 -1
  199. package/dist/dev/pack-service.d.ts.map +1 -1
  200. package/dist/dev/pack-service.js +56 -20
  201. package/dist/dev/pack-service.js.map +1 -1
  202. package/dist/dev/paths.d.ts +6 -0
  203. package/dist/dev/paths.d.ts.map +1 -1
  204. package/dist/dev/paths.js +8 -0
  205. package/dist/dev/paths.js.map +1 -1
  206. package/dist/dev/project-database.js +1 -1
  207. package/dist/dev/project-database.js.map +1 -1
  208. package/dist/dev/runners.d.ts +35 -9
  209. package/dist/dev/runners.d.ts.map +1 -1
  210. package/dist/dev/runtime-container.d.ts +10 -2
  211. package/dist/dev/runtime-container.d.ts.map +1 -1
  212. package/dist/dev/runtime-container.js +48 -20
  213. package/dist/dev/runtime-container.js.map +1 -1
  214. package/dist/dev/runtime-env.d.ts +10 -0
  215. package/dist/dev/runtime-env.d.ts.map +1 -1
  216. package/dist/dev/runtime-env.js +8 -4
  217. package/dist/dev/runtime-env.js.map +1 -1
  218. package/dist/dev/runtime-image.d.ts +1 -1
  219. package/dist/dev/runtime-image.js +1 -1
  220. package/dist/dev/scala-builder.d.ts +72 -0
  221. package/dist/dev/scala-builder.d.ts.map +1 -0
  222. package/dist/dev/scala-builder.js +347 -0
  223. package/dist/dev/scala-builder.js.map +1 -0
  224. package/dist/env/project-env.d.ts.map +1 -1
  225. package/dist/env/project-env.js +3 -1
  226. package/dist/env/project-env.js.map +1 -1
  227. package/dist/errors.d.ts +9 -0
  228. package/dist/errors.d.ts.map +1 -1
  229. package/dist/errors.js +15 -0
  230. package/dist/errors.js.map +1 -1
  231. package/dist/help.d.ts +14 -0
  232. package/dist/help.d.ts.map +1 -1
  233. package/dist/help.js +55 -0
  234. package/dist/help.js.map +1 -1
  235. package/dist/init/dependency-specs.d.ts +26 -0
  236. package/dist/init/dependency-specs.d.ts.map +1 -1
  237. package/dist/init/dependency-specs.js +38 -0
  238. package/dist/init/dependency-specs.js.map +1 -1
  239. package/dist/init/java-augment.d.ts +24 -0
  240. package/dist/init/java-augment.d.ts.map +1 -0
  241. package/dist/init/java-augment.js +198 -0
  242. package/dist/init/java-augment.js.map +1 -0
  243. package/dist/init/mode-detect.d.ts +2 -2
  244. package/dist/init/mode-detect.d.ts.map +1 -1
  245. package/dist/init/mode-detect.js +12 -1
  246. package/dist/init/mode-detect.js.map +1 -1
  247. package/dist/init/scala-augment.d.ts +23 -0
  248. package/dist/init/scala-augment.d.ts.map +1 -0
  249. package/dist/init/scala-augment.js +213 -0
  250. package/dist/init/scala-augment.js.map +1 -0
  251. package/dist/init/template-files.d.ts +40 -2
  252. package/dist/init/template-files.d.ts.map +1 -1
  253. package/dist/init/template-files.js +56 -5
  254. package/dist/init/template-files.js.map +1 -1
  255. package/dist/main.d.ts +3 -0
  256. package/dist/main.d.ts.map +1 -1
  257. package/dist/main.js +30 -4
  258. package/dist/main.js.map +1 -1
  259. package/dist/open-url.d.ts +15 -0
  260. package/dist/open-url.d.ts.map +1 -0
  261. package/dist/open-url.js +41 -0
  262. package/dist/open-url.js.map +1 -0
  263. package/dist/package-manager.d.ts +10 -3
  264. package/dist/package-manager.d.ts.map +1 -1
  265. package/dist/package-manager.js +19 -1
  266. package/dist/package-manager.js.map +1 -1
  267. package/dist/providers/preset-loader.d.ts.map +1 -1
  268. package/dist/providers/preset-loader.js +9 -1
  269. package/dist/providers/preset-loader.js.map +1 -1
  270. package/dist/providers/presets/anthropic.json +35 -4
  271. package/dist/providers/presets/gemini-api.json +3 -0
  272. package/dist/providers/presets/gemini.json +3 -0
  273. package/dist/providers/presets/groq.json +1 -0
  274. package/dist/providers/presets/openai.json +36 -4
  275. package/dist/providers/presets/openrouter.json +6 -2
  276. package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +28 -4
  277. package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +1 -1
  278. package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +47 -3
  279. package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +7 -5
  280. package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +81 -52
  281. package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +27 -1
  282. package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +5 -4
  283. package/dist/sdk-skills/kindgi-getting-started/SKILL.md +1 -1
  284. package/dist/sdk-skills/kindgi-java-authoring-agents/SKILL.md +220 -0
  285. package/dist/sdk-skills/kindgi-java-authoring-flows/SKILL.md +390 -0
  286. package/dist/sdk-skills/kindgi-java-authoring-guardrails/SKILL.md +209 -0
  287. package/dist/sdk-skills/kindgi-java-authoring-tools/SKILL.md +334 -0
  288. package/dist/sdk-skills/kindgi-java-getting-started/SKILL.md +270 -0
  289. package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +23 -5
  290. package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +1 -1
  291. package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +10 -3
  292. package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +36 -5
  293. package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +2 -2
  294. package/dist/sdk-skills/kindgi-scala-authoring-agents/SKILL.md +217 -0
  295. package/dist/sdk-skills/kindgi-scala-authoring-flows/SKILL.md +357 -0
  296. package/dist/sdk-skills/kindgi-scala-authoring-guardrails/SKILL.md +199 -0
  297. package/dist/sdk-skills/kindgi-scala-authoring-tools/SKILL.md +302 -0
  298. package/dist/sdk-skills/kindgi-scala-getting-started/SKILL.md +302 -0
  299. package/dist/templates/java/.mvn/wrapper/maven-wrapper.properties +3 -0
  300. package/dist/templates/java/AGENTS.md +31 -0
  301. package/dist/templates/java/README.md.tmpl +69 -0
  302. package/dist/templates/java/gitignore +9 -0
  303. package/dist/templates/java/kindgi.config.json.tmpl +8 -0
  304. package/dist/templates/java/kindgiw +33 -0
  305. package/dist/templates/java/kindgiw.cmd +28 -0
  306. package/dist/templates/java/mvnw +295 -0
  307. package/dist/templates/java/pom.xml.tmpl +65 -0
  308. package/dist/templates/java/src/main/java/__PACKAGE__/agents/EchoAgent.java.tmpl +27 -0
  309. package/dist/templates/java/src/main/java/__PACKAGE__/flows/EchoFlow.java.tmpl +18 -0
  310. package/dist/templates/java/src/main/java/__PACKAGE__/guardrails/ResponseNotEmpty.java.tmpl +28 -0
  311. package/dist/templates/java/src/main/java/__PACKAGE__/tools/Echo.java.tmpl +22 -0
  312. package/dist/templates/java/src/main/java/__PACKAGE__/tools/Greet.java.tmpl +23 -0
  313. package/dist/templates/java/src/test/java/__PACKAGE__/ToolsTest.java.tmpl +30 -0
  314. package/dist/templates/minimal/README.md.tmpl +8 -14
  315. package/dist/templates/python/README.md.tmpl +6 -6
  316. package/dist/templates/sample/README.md.tmpl +7 -13
  317. package/dist/templates/scala/AGENTS.md +32 -0
  318. package/dist/templates/scala/README.md.tmpl +75 -0
  319. package/dist/templates/scala/build.sbt.tmpl +16 -0
  320. package/dist/templates/scala/gitignore +13 -0
  321. package/dist/templates/scala/kindgi.config.json.tmpl +8 -0
  322. package/dist/templates/scala/project/build.properties +1 -0
  323. package/dist/templates/scala/src/main/scala/__PACKAGE__/agents/EchoAgent.scala.tmpl +23 -0
  324. package/dist/templates/scala/src/main/scala/__PACKAGE__/flows/EchoFlow.scala.tmpl +16 -0
  325. package/dist/templates/scala/src/main/scala/__PACKAGE__/guardrails/ResponseNotEmpty.scala.tmpl +21 -0
  326. package/dist/templates/scala/src/main/scala/__PACKAGE__/tools/Echo.scala.tmpl +16 -0
  327. package/dist/templates/scala/src/main/scala/__PACKAGE__/tools/Greet.scala.tmpl +17 -0
  328. package/dist/templates/scala/src/test/scala/__PACKAGE__/ToolsSuite.scala.tmpl +23 -0
  329. package/package.json +13 -12
@@ -34,16 +34,16 @@ assistant in the loop.
34
34
  ## Run
35
35
 
36
36
  ```sh
37
- pnpm install
38
- pnpm typecheck # verify the pack compiles
39
- kindgi dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
37
+ {{INSTALL}}
38
+ {{TYPECHECK}} # verify the pack compiles
39
+ {{KINDGI}} dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
40
40
  ```
41
41
 
42
42
  The api-server ships with a built-in `demo.echo-agent` you can hit to
43
43
  verify boot before authoring anything:
44
44
 
45
45
  ```sh
46
- kindgi runs start --agent=demo.echo-agent --input='{"userMessage":"hi"}'
46
+ {{KINDGI}} runs start --agent=demo.echo-agent --input='{"userMessage":"hi"}'
47
47
  ```
48
48
 
49
49
  ## Use a real model
@@ -55,21 +55,15 @@ use a real model, set one LLM provider's key and register its preset, with
55
55
  `kindgi dev` running, from another terminal. For Claude:
56
56
 
57
57
  ```sh
58
- kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
59
- kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
58
+ {{KINDGI}} secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
59
+ {{KINDGI}} providers register --preset=anthropic # Opus 5.5, Sonnet 5.5 (default), Haiku 5.5, Haiku 4.5
60
60
  ```
61
61
 
62
62
  Claude takes over from dev-echo on the next turn; nothing to restart.
63
- `--models=claude-haiku-4-5` registers one model only. OpenAI
63
+ `--models=claude-sonnet-5-5` registers one model only. OpenAI
64
64
  (`OPENAI_API_KEY`, `--preset=openai`), Gemini (`GEMINI_API_KEY`,
65
65
  `--preset=gemini-api`), Groq (`GROQ_API_KEY`, `--preset=groq`) and
66
- OpenRouter, many vendors' models with one key (`OPENROUTER_API_KEY`,
66
+ OpenRouter, a hosted service your prompts pass through (`OPENROUTER_API_KEY`,
67
67
  `--preset=openrouter`), work the same way; `kindgi providers presets` lists
68
68
  the presets (Gemini on Vertex AI too). Picking a model per
69
69
  agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
70
-
71
- ## Note on `@kindgi/sdk` versioning
72
-
73
- This template pins `@kindgi/sdk: "workspace:*"` because the SDK is not
74
- yet published to npm. Until it is, add the pack to a pnpm workspace that
75
- contains the Kindgi packages (`pnpm-workspace.yaml`).
@@ -23,14 +23,14 @@ that uses both tools and the guardrail, and one flow that runs the echo tool.
23
23
  ```sh
24
24
  uv sync # .venv with kindgi and the dev tools
25
25
  uv run pytest
26
- kindgi dev # boots Kindgi locally and runs this pack's code, reloading on save
26
+ {{KINDGI}} dev # boots Kindgi locally and runs this pack's code, reloading on save
27
27
  ```
28
28
 
29
29
  `kindgi dev` uses the pack's `.venv/bin/python` (or `dev.python` in
30
30
  `[tool.kindgi]`). Then, from another terminal:
31
31
 
32
32
  ```sh
33
- kindgi runs start --agent={{PACK_ID}}.echo-agent --input='{"userMessage":"hi"}'
33
+ {{KINDGI}} runs start --agent={{PACK_ID}}.echo-agent --input='{"userMessage":"hi"}'
34
34
  ```
35
35
 
36
36
  ## Use a real model
@@ -42,15 +42,15 @@ use a real model, set one LLM provider's key and register its preset, with
42
42
  `kindgi dev` running, from another terminal. For Claude:
43
43
 
44
44
  ```sh
45
- kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
46
- kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
45
+ {{KINDGI}} secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
46
+ {{KINDGI}} providers register --preset=anthropic # Opus 5.5, Sonnet 5.5 (default), Haiku 5.5, Haiku 4.5
47
47
  ```
48
48
 
49
49
  Claude takes over from dev-echo on the next turn; nothing to restart.
50
- `--models=claude-haiku-4-5` registers one model only. OpenAI
50
+ `--models=claude-sonnet-5-5` registers one model only. OpenAI
51
51
  (`OPENAI_API_KEY`, `--preset=openai`), Gemini (`GEMINI_API_KEY`,
52
52
  `--preset=gemini-api`), Groq (`GROQ_API_KEY`, `--preset=groq`) and
53
- OpenRouter, many vendors' models with one key (`OPENROUTER_API_KEY`,
53
+ OpenRouter, a hosted service your prompts pass through (`OPENROUTER_API_KEY`,
54
54
  `--preset=openrouter`), work the same way; `kindgi providers presets` lists
55
55
  the presets (Gemini on Vertex AI too). Picking a model per
56
56
  agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
@@ -28,9 +28,9 @@ run with `kindgi dev`.
28
28
  ## Run
29
29
 
30
30
  ```sh
31
- pnpm install
32
- pnpm typecheck # verify the pack compiles
33
- kindgi dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
31
+ {{INSTALL}}
32
+ {{TYPECHECK}} # verify the pack compiles
33
+ {{KINDGI}} dev # runs the Kindgi runtime (Docker) + hot-reloads this pack
34
34
  ```
35
35
 
36
36
  `kindgi dev` bundles every primitive under the four folders above,
@@ -47,15 +47,15 @@ use a real model, set one LLM provider's key and register its preset, with
47
47
  `kindgi dev` running, from another terminal. For Claude:
48
48
 
49
49
  ```sh
50
- kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
51
- kindgi providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
50
+ {{KINDGI}} secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
51
+ {{KINDGI}} providers register --preset=anthropic # Opus 5.5, Sonnet 5.5 (default), Haiku 5.5, Haiku 4.5
52
52
  ```
53
53
 
54
54
  Claude takes over from dev-echo on the next turn; nothing to restart.
55
- `--models=claude-haiku-4-5` registers one model only. OpenAI
55
+ `--models=claude-sonnet-5-5` registers one model only. OpenAI
56
56
  (`OPENAI_API_KEY`, `--preset=openai`), Gemini (`GEMINI_API_KEY`,
57
57
  `--preset=gemini-api`), Groq (`GROQ_API_KEY`, `--preset=groq`) and
58
- OpenRouter, many vendors' models with one key (`OPENROUTER_API_KEY`,
58
+ OpenRouter, a hosted service your prompts pass through (`OPENROUTER_API_KEY`,
59
59
  `--preset=openrouter`), work the same way; `kindgi providers presets` lists
60
60
  the presets (Gemini on Vertex AI too). Picking a model per
61
61
  agent, and other providers: `.claude/skills/kindgi-authoring-providers/SKILL.md`.
@@ -83,9 +83,3 @@ import { z } from 'zod';
83
83
 
84
84
  Every `define*` export ships with JSDoc — hover it in your editor for
85
85
  field-level docs.
86
-
87
- ## Note on `@kindgi/sdk` versioning
88
-
89
- This template pins `@kindgi/sdk: "workspace:*"` because the SDK is not
90
- yet published to npm. Until it is, add the pack to a pnpm workspace that
91
- contains the Kindgi packages (`pnpm-workspace.yaml`).
@@ -0,0 +1,32 @@
1
+ # AGENTS.md
2
+
3
+ This directory is a Kindgi pack written in Scala (`com.kindgi %% kindgi-pack-scala`,
4
+ package `com.kindgi.pack.scaladsl`). Tools (`Tool[Input, Output](id)`) and
5
+ guardrail checks (`Guardrail[Config](id)`) are `val`s of an object named like
6
+ its file, under `src/main/scala/**/tools/` and `…/guardrails/`; agents
7
+ (`Agent(id)`) and flows (`Flow(id)`) are data, under `…/agents/` and
8
+ `…/flows/`. A tool's input and output schemas come from its case classes:
9
+ `Option` is optional, a parameter's default is the schema's default, Jakarta
10
+ Validation constraints become their keywords (in Scala 3, name their arguments:
11
+ `@Min(value = 0)`). A tool defined as a `def` or a `lazy val` isn't indexed:
12
+ make it a `val`. The config is `kindgi.config.json`.
13
+
14
+ - `./kindgiw dev` boots Kindgi locally, compiles this pack through sbt's server
15
+ and runs it with its JDK (17 or later), recompiling on every save.
16
+ - `sbt test` runs the tests; `tool.call(input, ToolContext.forTest())` calls a
17
+ handler directly.
18
+ - `java -cp "$(sbt -batch -error 'export Runtime/fullClasspath')" com.kindgi.pack.Main index --pack-dir .`
19
+ shows what Kindgi sees.
20
+ - Agents answer through a model provider. `kindgi dev` gives a new pack
21
+ `dev-echo`, a fallback that isn't a model: it calls the first tool and
22
+ replies "Tool responded: …" after a warning line, while no other provider
23
+ fits. For a real model, put one LLM provider's key in `.env`
24
+ (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, `GROQ_API_KEY` or
25
+ `OPENROUTER_API_KEY`) and add a `providers` list with its preset
26
+ (`[{"preset": "anthropic"}]`, or `"openai"`, `"gemini-api"`, `"groq"`,
27
+ `"openrouter"`) to `kindgi.config.json`: `kindgi dev` then registers it on
28
+ every boot, in every worktree.
29
+
30
+ When you diagnose a framework bug (something in Kindgi itself, not in this
31
+ pack's code), append an entry to `FEEDBACK.md` at the pack root with
32
+ `./kindgiw feedback write`.
@@ -0,0 +1,75 @@
1
+ # {{PACK_NAME}}
2
+
3
+ A sample Kindgi pack in Scala — scaffolded by `kindgi init --template=scala`.
4
+
5
+ Two tools (`echo`, `greet`), one guardrail (`response-not-empty`), one agent
6
+ that uses both tools and the guardrail, and one flow that runs the echo tool.
7
+
8
+ Java and Scala support is in preview: tested and supported, but the API may
9
+ still change in 0.1.6 without the usual deprecation period.
10
+
11
+ ## Layout
12
+
13
+ ```
14
+ {{PACK_NAME}}/
15
+ ├── kindgi.config.json # the pack's id and version ("language": "scala"), the CLI it pins
16
+ ├── build.sbt # kindgi-pack-scala, Scala 3.3, Java 17
17
+ ├── src/main/scala/{{SCALA_PACKAGE_PATH}}/
18
+ │ ├── tools/Echo.scala # Tool[Input, Output] — case classes in, case classes out
19
+ │ ├── tools/Greet.scala # a parameter's default is the schema's default
20
+ │ ├── guardrails/ResponseNotEmpty.scala # Guardrail[Config] — a zero-LLM check over the run
21
+ │ ├── agents/EchoAgent.scala # Agent — data
22
+ │ └── flows/EchoFlow.scala # Flow — data
23
+ └── src/test/scala/{{SCALA_PACKAGE_PATH}}/ToolsSuite.scala # the tools, called directly
24
+ ```
25
+
26
+ A file's tools, guardrails, agents and flows are the `val`s of an object named
27
+ like the file (`Greet.scala` holds `object Greet`).
28
+
29
+ ## Run
30
+
31
+ You need a JDK 17 or later (`JAVA_HOME`) and sbt.
32
+
33
+ ```sh
34
+ sbt test
35
+ ./kindgiw dev # the CLI the pack pins: boots Kindgi locally, compiles and runs this pack, recompiling on save
36
+ ```
37
+
38
+ Then, from another terminal:
39
+
40
+ ```sh
41
+ ./kindgiw runs start --agent={{PACK_ID}}.echo-agent --input='{"userMessage":"hi"}'
42
+ ```
43
+
44
+ `kindgi dev` compiles through sbt's server (`sbt --client`), so a save compiles
45
+ in about a second once it's warm. It starts that server when none is running
46
+ and stops it when it stops; a server you already run (your IDE's) is used and
47
+ left running. It uses `JAVA_HOME`'s JDK (or `dev.javaHome` in
48
+ `kindgi.config.json`) and the `sbt` on your `PATH` (or `dev.sbt`, e.g.
49
+ `["sbt", "-mem", "2048"]`). `SBT_OPTS` in your shell reaches sbt only, never
50
+ the pack.
51
+
52
+ ## Use a real model
53
+
54
+ `kindgi dev` gives a new pack `dev-echo`, a fallback provider that isn't a
55
+ model: it calls the first tool and replies "Tool responded: …", after a
56
+ warning line that says so. It answers only while no other provider fits. To
57
+ use a real model, set one LLM provider's key and register its preset, with
58
+ `kindgi dev` running, from another terminal. For Claude:
59
+
60
+ ```sh
61
+ ./kindgiw secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt; writes .env.local
62
+ ./kindgiw providers register --preset=anthropic # Opus 5.5, Sonnet 5.5, Haiku 4.5
63
+ ```
64
+
65
+ Claude takes over from dev-echo on the next turn; nothing to restart.
66
+ OpenAI (`OPENAI_API_KEY`, `--preset=openai`), Gemini (`GEMINI_API_KEY`,
67
+ `--preset=gemini-api`), Groq (`GROQ_API_KEY`, `--preset=groq`) and
68
+ OpenRouter (`OPENROUTER_API_KEY`, `--preset=openrouter`) work the same way;
69
+ `kindgi providers presets` lists the presets.
70
+
71
+ ## Build
72
+
73
+ `kindgi build --env=<name>` makes the pack's image: sbt compiles it in a
74
+ pinned sbt + JDK 17 image, the index is built in the image, and the pack
75
+ service runs on a JRE 17 as its entrypoint.
@@ -0,0 +1,16 @@
1
+ // {{PACK_ID}}: a Kindgi pack in Scala (kindgi.config.json, "language": "scala").
2
+
3
+ ThisBuild / scalaVersion := "3.3.8"
4
+
5
+ lazy val root = (project in file("."))
6
+ .settings(
7
+ name := "{{PACK_NAME}}",
8
+ version := "{{PACK_VERSION}}",{{SCALA_LOCAL_RESOLVER}}
9
+ libraryDependencies ++= Seq(
10
+ "com.kindgi" %% "kindgi-pack-scala" % "{{KINDGI_SCALA_VERSION}}",
11
+ "jakarta.validation" % "jakarta.validation-api" % "3.0.2",
12
+ "org.scalameta" %% "munit" % "1.3.6" % Test
13
+ ),
14
+ javacOptions ++= Seq("--release", "17"),
15
+ scalacOptions ++= Seq("-release", "17", "-deprecation", "-feature")
16
+ )
@@ -0,0 +1,13 @@
1
+ target/
2
+ project/target/
3
+ project/project/
4
+ .bsp/
5
+ .metals/
6
+ .bloop/
7
+ .kindgi/
8
+ .kindgirc.json
9
+ .env
10
+ .env.*
11
+ !.env.example
12
+ .idea/
13
+ .vscode/
@@ -0,0 +1,8 @@
1
+ {
2
+ "language": "scala",
3
+ "cli": "{{KINDGI_CLI_VERSION}}",
4
+ "pack": {
5
+ "id": "{{PACK_ID}}",
6
+ "version": "{{PACK_VERSION}}"
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ sbt.version=1.12.15
@@ -0,0 +1,23 @@
1
+ package {{SCALA_PACKAGE}}.agents
2
+
3
+ import com.kindgi.pack.scaladsl._
4
+ import {{SCALA_PACKAGE}}.guardrails.ResponseNotEmpty
5
+ import {{SCALA_PACKAGE}}.tools.{Echo, Greet}
6
+
7
+ /** {{PACK_ID}}.echo-agent — uses both tools; the response-not-empty guardrail guards its answer. */
8
+ object EchoAgent {
9
+ val agent: Agent = Agent("{{PACK_ID}}.echo-agent")
10
+ .version("{{PACK_VERSION}}")
11
+ .name("Echo Agent")
12
+ .description("Uses the pack's echo and greet tools; the response-not-empty guardrail guards the output.")
13
+ .instructions(
14
+ "For each user message: if the user sends a name, greet them with the greet tool. " +
15
+ "Otherwise echo their message with the echo tool. Quote the tool result verbatim.")
16
+ .capability(Map("needs" -> List(Map("feature" -> "tool-use"))))
17
+ .tool(Echo.tool)
18
+ .tool(Greet.tool)
19
+ .guardrail(ResponseNotEmpty.guardrail)
20
+ .set("conversationPolicy", Map("historyLimit" -> 10))
21
+ .set("budget", Map("maxSteps" -> 4, "maxCostUsd" -> 0.1, "maxWallMs" -> 60000))
22
+ .build()
23
+ }
@@ -0,0 +1,16 @@
1
+ package {{SCALA_PACKAGE}}.flows
2
+
3
+ import com.kindgi.pack.scaladsl._
4
+ import {{SCALA_PACKAGE}}.tools.Echo
5
+
6
+ /** {{PACK_ID}}.echo-flow — runs the pack's echo tool, then ends. */
7
+ object EchoFlow {
8
+ val flow: Flow = Flow("{{PACK_ID}}.echo-flow")
9
+ .version("{{PACK_VERSION}}")
10
+ .set("name", "Echo Flow")
11
+ .set("description", "Runs the pack's echo tool and terminates.")
12
+ .toolNode("echo", Echo.tool)
13
+ .edge("e-start", "$start", "echo")
14
+ .edge("e-end", "echo", "$end")
15
+ .build()
16
+ }
@@ -0,0 +1,21 @@
1
+ package {{SCALA_PACKAGE}}.guardrails
2
+
3
+ import com.kindgi.pack.scaladsl._
4
+ import jakarta.validation.constraints.Min
5
+
6
+ /** {{PACK_ID}}.response-not-empty — a zero-LLM guardrail: the run's answer has content. */
7
+ object ResponseNotEmpty {
8
+ final case class Config(@Min(value = 0) minLength: Int = 1)
9
+
10
+ val guardrail: Guardrail[Config] = Guardrail[Config]("{{PACK_ID}}.response-not-empty")
11
+ .name("Response is non-empty")
12
+ .checkId("{{PACK_ID}}.checks.response-not-empty")
13
+ .onViolation("halt")
14
+ .severity("error")
15
+ .set("scope", Map("when" -> "runtime-only"))
16
+ .check { (config, trace) =>
17
+ val text = Option(trace.output).getOrElse("").strip
18
+ if (text.length >= config.minLength) CheckResult.pass
19
+ else CheckResult.fail(s"Response too short: ${text.length} chars, expected >= ${config.minLength}.")
20
+ }
21
+ }
@@ -0,0 +1,16 @@
1
+ package {{SCALA_PACKAGE}}.tools
2
+
3
+ import com.kindgi.pack.scaladsl._
4
+ import jakarta.validation.constraints.{PositiveOrZero, Size}
5
+ import java.time.Instant
6
+
7
+ /** {{PACK_ID}}.echo — echoes the message back with a UTC timestamp and its length. */
8
+ object Echo {
9
+ final case class Input(@Size(min = 1, max = 500) message: String)
10
+ final case class Output(echo: String, echoedAt: Instant, @PositiveOrZero characterCount: Int)
11
+
12
+ val tool: Tool[Input, Output] = Tool[Input, Output]("{{PACK_ID}}.echo")
13
+ .description("Echoes the caller-provided message with a UTC timestamp and character count.")
14
+ .readOnly
15
+ .handler((in, _) => Output(in.message, Instant.now(), in.message.length))
16
+ }
@@ -0,0 +1,17 @@
1
+ package {{SCALA_PACKAGE}}.tools
2
+
3
+ import com.kindgi.pack.scaladsl._
4
+ import jakarta.validation.constraints.Size
5
+
6
+ /** {{PACK_ID}}.greet — greets a named recipient. */
7
+ object Greet {
8
+ final case class Input(
9
+ @Size(min = 1, max = 100) name: String,
10
+ @Size(min = 1, max = 50) greeting: String = "Hello")
11
+ final case class Output(message: String)
12
+
13
+ val tool: Tool[Input, Output] = Tool[Input, Output]("{{PACK_ID}}.greet")
14
+ .description("Formats a greeting for the named recipient.")
15
+ .readOnly
16
+ .handler((in, _) => Output(s"${in.greeting}, ${in.name}!"))
17
+ }
@@ -0,0 +1,23 @@
1
+ package {{SCALA_PACKAGE}}
2
+
3
+ import com.kindgi.pack.ToolContext
4
+ import {{SCALA_PACKAGE}}.tools.{Echo, Greet}
5
+
6
+ /** The pack's tools, called directly — `sbt test`. */
7
+ class ToolsSuite extends munit.FunSuite {
8
+ test("echo round-trips the message") {
9
+ val out = Echo.tool.call(Echo.Input("hello"), ToolContext.forTest())
10
+ assertEquals(out.echo, "hello")
11
+ assertEquals(out.characterCount, 5)
12
+ }
13
+
14
+ test("greet uses the greeting it is given, else Hello") {
15
+ assertEquals(Greet.tool.call(Greet.Input("Ada", "Hi"), ToolContext.forTest()).message, "Hi, Ada!")
16
+ assertEquals(Greet.tool.call(Greet.Input("Ada"), ToolContext.forTest()).message, "Hello, Ada!")
17
+ }
18
+
19
+ test("the tools say they only read") {
20
+ assert(!Echo.tool.mutating())
21
+ assert(!Greet.tool.mutating())
22
+ }
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kindgi/cli",
3
- "version": "0.1.4-rc.5",
3
+ "version": "0.1.5-rc.0",
4
4
  "description": "Command-line interface for Kindgi™ — the sovereign AI OS. Create a pack, run it on your machine (`kindgi dev`), build, sign and deploy it, and work with a running Kindgi API from the terminal.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -37,17 +37,18 @@
37
37
  "provenance": true
38
38
  },
39
39
  "dependencies": {
40
- "@kindgi/agents": "0.1.4-rc.5",
41
- "@kindgi/client": "0.1.4-rc.5",
42
- "@kindgi/dotenv-file": "0.1.4-rc.5",
43
- "@kindgi/crypto": "0.1.4-rc.5",
44
- "@kindgi/env-schema": "0.1.4-rc.5",
45
- "@kindgi/flow": "0.1.4-rc.5",
46
- "@kindgi/handler-runtime": "0.1.4-rc.5",
47
- "@kindgi/secrets-dotenv": "0.1.4-rc.5",
48
- "@kindgi/platform": "0.1.4-rc.5",
49
- "@kindgi/sdk": "0.1.4-rc.5",
50
- "@kindgi/types": "0.1.4-rc.5",
40
+ "@kindgi/agents": "0.1.5-rc.0",
41
+ "@kindgi/client": "0.1.5-rc.0",
42
+ "@kindgi/dotenv-file": "0.1.5-rc.0",
43
+ "@kindgi/crypto": "0.1.5-rc.0",
44
+ "@kindgi/env-schema": "0.1.5-rc.0",
45
+ "@kindgi/flow": "0.1.5-rc.0",
46
+ "@kindgi/handler-runtime": "0.1.5-rc.0",
47
+ "@kindgi/log": "0.1.5-rc.0",
48
+ "@kindgi/secrets-dotenv": "0.1.5-rc.0",
49
+ "@kindgi/platform": "0.1.5-rc.0",
50
+ "@kindgi/sdk": "0.1.5-rc.0",
51
+ "@kindgi/types": "0.1.5-rc.0",
51
52
  "esbuild": "^0.24.0",
52
53
  "semver": "^7.8.5",
53
54
  "smol-toml": "^1.9.0",