@kindgi/cli 0.1.4 → 0.1.5

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 (325) hide show
  1. package/README.md +13 -7
  2. package/dist/build/bundle.d.ts +11 -3
  3. package/dist/build/bundle.d.ts.map +1 -1
  4. package/dist/build/bundle.js +17 -3
  5. package/dist/build/bundle.js.map +1 -1
  6. package/dist/build/defaults.d.ts +3 -1
  7. package/dist/build/defaults.d.ts.map +1 -1
  8. package/dist/build/defaults.js +44 -1
  9. package/dist/build/defaults.js.map +1 -1
  10. package/dist/build/java-image.d.ts +31 -0
  11. package/dist/build/java-image.d.ts.map +1 -0
  12. package/dist/build/java-image.js +146 -0
  13. package/dist/build/java-image.js.map +1 -0
  14. package/dist/build/pack-root.d.ts +1 -31
  15. package/dist/build/pack-root.d.ts.map +1 -1
  16. package/dist/build/pack-root.js +22 -2
  17. package/dist/build/pack-root.js.map +1 -1
  18. package/dist/build/runners.d.ts +44 -0
  19. package/dist/build/runners.d.ts.map +1 -1
  20. package/dist/build/scala-image.d.ts +21 -0
  21. package/dist/build/scala-image.d.ts.map +1 -0
  22. package/dist/build/scala-image.js +150 -0
  23. package/dist/build/scala-image.js.map +1 -0
  24. package/dist/cli-pin.d.ts +16 -0
  25. package/dist/cli-pin.d.ts.map +1 -0
  26. package/dist/cli-pin.js +66 -0
  27. package/dist/cli-pin.js.map +1 -0
  28. package/dist/commands/agents.d.ts.map +1 -1
  29. package/dist/commands/agents.js +9 -8
  30. package/dist/commands/agents.js.map +1 -1
  31. package/dist/commands/approvals.d.ts.map +1 -1
  32. package/dist/commands/approvals.js +30 -4
  33. package/dist/commands/approvals.js.map +1 -1
  34. package/dist/commands/artifacts.d.ts.map +1 -1
  35. package/dist/commands/artifacts.js +100 -37
  36. package/dist/commands/artifacts.js.map +1 -1
  37. package/dist/commands/auth.js +2 -2
  38. package/dist/commands/blocks.d.ts.map +1 -1
  39. package/dist/commands/blocks.js +5 -4
  40. package/dist/commands/blocks.js.map +1 -1
  41. package/dist/commands/build.d.ts +10 -2
  42. package/dist/commands/build.d.ts.map +1 -1
  43. package/dist/commands/build.js +109 -16
  44. package/dist/commands/build.js.map +1 -1
  45. package/dist/commands/capabilities.d.ts.map +1 -1
  46. package/dist/commands/capabilities.js +37 -10
  47. package/dist/commands/capabilities.js.map +1 -1
  48. package/dist/commands/console.d.ts +21 -0
  49. package/dist/commands/console.d.ts.map +1 -0
  50. package/dist/commands/console.js +87 -0
  51. package/dist/commands/console.js.map +1 -0
  52. package/dist/commands/conversations.d.ts.map +1 -1
  53. package/dist/commands/conversations.js +13 -2
  54. package/dist/commands/conversations.js.map +1 -1
  55. package/dist/commands/deploy.d.ts.map +1 -1
  56. package/dist/commands/deploy.js +2 -2
  57. package/dist/commands/deploy.js.map +1 -1
  58. package/dist/commands/dev.d.ts +11 -0
  59. package/dist/commands/dev.d.ts.map +1 -1
  60. package/dist/commands/dev.js +212 -40
  61. package/dist/commands/dev.js.map +1 -1
  62. package/dist/commands/doctor.d.ts +14 -2
  63. package/dist/commands/doctor.d.ts.map +1 -1
  64. package/dist/commands/doctor.js +356 -20
  65. package/dist/commands/doctor.js.map +1 -1
  66. package/dist/commands/env-scoped.d.ts +44 -0
  67. package/dist/commands/env-scoped.d.ts.map +1 -0
  68. package/dist/commands/env-scoped.js +222 -0
  69. package/dist/commands/env-scoped.js.map +1 -0
  70. package/dist/commands/env.d.ts.map +1 -1
  71. package/dist/commands/env.js +85 -123
  72. package/dist/commands/env.js.map +1 -1
  73. package/dist/commands/eval-runs.d.ts +9 -0
  74. package/dist/commands/eval-runs.d.ts.map +1 -1
  75. package/dist/commands/eval-runs.js +20 -19
  76. package/dist/commands/eval-runs.js.map +1 -1
  77. package/dist/commands/eval-suites.d.ts.map +1 -1
  78. package/dist/commands/eval-suites.js +16 -8
  79. package/dist/commands/eval-suites.js.map +1 -1
  80. package/dist/commands/exports.d.ts +3 -0
  81. package/dist/commands/exports.d.ts.map +1 -0
  82. package/dist/commands/exports.js +82 -0
  83. package/dist/commands/exports.js.map +1 -0
  84. package/dist/commands/feedback.d.ts.map +1 -1
  85. package/dist/commands/feedback.js +6 -5
  86. package/dist/commands/feedback.js.map +1 -1
  87. package/dist/commands/flows.d.ts.map +1 -1
  88. package/dist/commands/flows.js +2 -1
  89. package/dist/commands/flows.js.map +1 -1
  90. package/dist/commands/gate-policies.d.ts.map +1 -1
  91. package/dist/commands/gate-policies.js +2 -1
  92. package/dist/commands/gate-policies.js.map +1 -1
  93. package/dist/commands/guardrails.d.ts.map +1 -1
  94. package/dist/commands/guardrails.js +3 -2
  95. package/dist/commands/guardrails.js.map +1 -1
  96. package/dist/commands/helpers.js +5 -5
  97. package/dist/commands/helpers.js.map +1 -1
  98. package/dist/commands/index.d.ts.map +1 -1
  99. package/dist/commands/index.js +14 -0
  100. package/dist/commands/index.js.map +1 -1
  101. package/dist/commands/init.d.ts +1 -1
  102. package/dist/commands/init.d.ts.map +1 -1
  103. package/dist/commands/init.js +254 -18
  104. package/dist/commands/init.js.map +1 -1
  105. package/dist/commands/judge-classes.d.ts.map +1 -1
  106. package/dist/commands/judge-classes.js +11 -10
  107. package/dist/commands/judge-classes.js.map +1 -1
  108. package/dist/commands/judgments.d.ts.map +1 -1
  109. package/dist/commands/judgments.js +7 -6
  110. package/dist/commands/judgments.js.map +1 -1
  111. package/dist/commands/key.js +4 -4
  112. package/dist/commands/memory.d.ts.map +1 -1
  113. package/dist/commands/memory.js +277 -25
  114. package/dist/commands/memory.js.map +1 -1
  115. package/dist/commands/people.d.ts +3 -0
  116. package/dist/commands/people.d.ts.map +1 -0
  117. package/dist/commands/people.js +166 -0
  118. package/dist/commands/people.js.map +1 -0
  119. package/dist/commands/proposals.d.ts.map +1 -1
  120. package/dist/commands/proposals.js +390 -69
  121. package/dist/commands/proposals.js.map +1 -1
  122. package/dist/commands/provenance.d.ts.map +1 -1
  123. package/dist/commands/provenance.js +6 -7
  124. package/dist/commands/provenance.js.map +1 -1
  125. package/dist/commands/providers.d.ts.map +1 -1
  126. package/dist/commands/providers.js +7 -5
  127. package/dist/commands/providers.js.map +1 -1
  128. package/dist/commands/reviewers.d.ts.map +1 -1
  129. package/dist/commands/reviewers.js +3 -2
  130. package/dist/commands/reviewers.js.map +1 -1
  131. package/dist/commands/runs.d.ts.map +1 -1
  132. package/dist/commands/runs.js +35 -15
  133. package/dist/commands/runs.js.map +1 -1
  134. package/dist/commands/schedules.d.ts +3 -0
  135. package/dist/commands/schedules.d.ts.map +1 -0
  136. package/dist/commands/schedules.js +275 -0
  137. package/dist/commands/schedules.js.map +1 -0
  138. package/dist/commands/secrets.d.ts.map +1 -1
  139. package/dist/commands/secrets.js +10 -11
  140. package/dist/commands/secrets.js.map +1 -1
  141. package/dist/commands/service-accounts.d.ts +3 -0
  142. package/dist/commands/service-accounts.d.ts.map +1 -0
  143. package/dist/commands/service-accounts.js +175 -0
  144. package/dist/commands/service-accounts.js.map +1 -0
  145. package/dist/commands/skills.d.ts +1 -1
  146. package/dist/commands/skills.d.ts.map +1 -1
  147. package/dist/commands/skills.js +11 -4
  148. package/dist/commands/skills.js.map +1 -1
  149. package/dist/commands/sso.d.ts +6 -0
  150. package/dist/commands/sso.d.ts.map +1 -0
  151. package/dist/commands/sso.js +318 -0
  152. package/dist/commands/sso.js.map +1 -0
  153. package/dist/commands/tokens.d.ts +11 -0
  154. package/dist/commands/tokens.d.ts.map +1 -1
  155. package/dist/commands/tokens.js +144 -11
  156. package/dist/commands/tokens.js.map +1 -1
  157. package/dist/commands/tools.d.ts.map +1 -1
  158. package/dist/commands/tools.js +4 -3
  159. package/dist/commands/tools.js.map +1 -1
  160. package/dist/commands/unwired.d.ts.map +1 -1
  161. package/dist/commands/unwired.js +1 -30
  162. package/dist/commands/unwired.js.map +1 -1
  163. package/dist/commands/upgrade.d.ts +11 -0
  164. package/dist/commands/upgrade.d.ts.map +1 -0
  165. package/dist/commands/upgrade.js +160 -0
  166. package/dist/commands/upgrade.js.map +1 -0
  167. package/dist/context.d.ts +7 -0
  168. package/dist/context.d.ts.map +1 -1
  169. package/dist/context.js +1 -0
  170. package/dist/context.js.map +1 -1
  171. package/dist/dev/defaults.d.ts +28 -11
  172. package/dist/dev/defaults.d.ts.map +1 -1
  173. package/dist/dev/defaults.js +114 -35
  174. package/dist/dev/defaults.js.map +1 -1
  175. package/dist/dev/google-credentials.d.ts +50 -0
  176. package/dist/dev/google-credentials.d.ts.map +1 -0
  177. package/dist/dev/google-credentials.js +157 -0
  178. package/dist/dev/google-credentials.js.map +1 -0
  179. package/dist/dev/java-builder.d.ts +56 -0
  180. package/dist/dev/java-builder.d.ts.map +1 -0
  181. package/dist/dev/java-builder.js +204 -0
  182. package/dist/dev/java-builder.js.map +1 -0
  183. package/dist/dev/jvm-run-files.d.ts +29 -0
  184. package/dist/dev/jvm-run-files.d.ts.map +1 -0
  185. package/dist/dev/jvm-run-files.js +94 -0
  186. package/dist/dev/jvm-run-files.js.map +1 -0
  187. package/dist/dev/lines.d.ts +13 -0
  188. package/dist/dev/lines.d.ts.map +1 -0
  189. package/dist/dev/lines.js +24 -0
  190. package/dist/dev/lines.js.map +1 -0
  191. package/dist/dev/log-view.d.ts +116 -0
  192. package/dist/dev/log-view.d.ts.map +1 -0
  193. package/dist/dev/log-view.js +233 -0
  194. package/dist/dev/log-view.js.map +1 -0
  195. package/dist/dev/pack-code.d.ts +79 -4
  196. package/dist/dev/pack-code.d.ts.map +1 -1
  197. package/dist/dev/pack-code.js +262 -3
  198. package/dist/dev/pack-code.js.map +1 -1
  199. package/dist/dev/pack-env.d.ts.map +1 -1
  200. package/dist/dev/pack-env.js +4 -0
  201. package/dist/dev/pack-env.js.map +1 -1
  202. package/dist/dev/pack-service.d.ts +11 -1
  203. package/dist/dev/pack-service.d.ts.map +1 -1
  204. package/dist/dev/pack-service.js +56 -20
  205. package/dist/dev/pack-service.js.map +1 -1
  206. package/dist/dev/paths.d.ts +6 -0
  207. package/dist/dev/paths.d.ts.map +1 -1
  208. package/dist/dev/paths.js +8 -0
  209. package/dist/dev/paths.js.map +1 -1
  210. package/dist/dev/project-database.js +1 -1
  211. package/dist/dev/project-database.js.map +1 -1
  212. package/dist/dev/runners.d.ts +35 -9
  213. package/dist/dev/runners.d.ts.map +1 -1
  214. package/dist/dev/runtime-container.d.ts +10 -2
  215. package/dist/dev/runtime-container.d.ts.map +1 -1
  216. package/dist/dev/runtime-container.js +48 -20
  217. package/dist/dev/runtime-container.js.map +1 -1
  218. package/dist/dev/runtime-env.d.ts +10 -0
  219. package/dist/dev/runtime-env.d.ts.map +1 -1
  220. package/dist/dev/runtime-env.js +8 -4
  221. package/dist/dev/runtime-env.js.map +1 -1
  222. package/dist/dev/runtime-image.d.ts +1 -1
  223. package/dist/dev/runtime-image.js +1 -1
  224. package/dist/dev/scala-builder.d.ts +72 -0
  225. package/dist/dev/scala-builder.d.ts.map +1 -0
  226. package/dist/dev/scala-builder.js +347 -0
  227. package/dist/dev/scala-builder.js.map +1 -0
  228. package/dist/env/project-env.d.ts.map +1 -1
  229. package/dist/env/project-env.js +3 -1
  230. package/dist/env/project-env.js.map +1 -1
  231. package/dist/errors.d.ts +9 -0
  232. package/dist/errors.d.ts.map +1 -1
  233. package/dist/errors.js +15 -0
  234. package/dist/errors.js.map +1 -1
  235. package/dist/init/augment-scaffolder.js +1 -1
  236. package/dist/init/augment-scaffolder.js.map +1 -1
  237. package/dist/init/dependency-specs.d.ts +26 -0
  238. package/dist/init/dependency-specs.d.ts.map +1 -1
  239. package/dist/init/dependency-specs.js +38 -0
  240. package/dist/init/dependency-specs.js.map +1 -1
  241. package/dist/init/java-augment.d.ts +24 -0
  242. package/dist/init/java-augment.d.ts.map +1 -0
  243. package/dist/init/java-augment.js +198 -0
  244. package/dist/init/java-augment.js.map +1 -0
  245. package/dist/init/mode-detect.d.ts +2 -2
  246. package/dist/init/mode-detect.d.ts.map +1 -1
  247. package/dist/init/mode-detect.js +12 -1
  248. package/dist/init/mode-detect.js.map +1 -1
  249. package/dist/init/python-augment.js +1 -1
  250. package/dist/init/python-augment.js.map +1 -1
  251. package/dist/init/scala-augment.d.ts +23 -0
  252. package/dist/init/scala-augment.d.ts.map +1 -0
  253. package/dist/init/scala-augment.js +213 -0
  254. package/dist/init/scala-augment.js.map +1 -0
  255. package/dist/init/template-files.d.ts +40 -2
  256. package/dist/init/template-files.d.ts.map +1 -1
  257. package/dist/init/template-files.js +56 -5
  258. package/dist/init/template-files.js.map +1 -1
  259. package/dist/main.d.ts +3 -0
  260. package/dist/main.d.ts.map +1 -1
  261. package/dist/main.js +20 -2
  262. package/dist/main.js.map +1 -1
  263. package/dist/open-url.d.ts +15 -0
  264. package/dist/open-url.d.ts.map +1 -0
  265. package/dist/open-url.js +41 -0
  266. package/dist/open-url.js.map +1 -0
  267. package/dist/package-manager.d.ts +10 -3
  268. package/dist/package-manager.d.ts.map +1 -1
  269. package/dist/package-manager.js +19 -1
  270. package/dist/package-manager.js.map +1 -1
  271. package/dist/providers/presets/anthropic.json +11 -3
  272. package/dist/sdk-skills/kindgi-authoring-agents/SKILL.md +30 -2
  273. package/dist/sdk-skills/kindgi-authoring-flows/SKILL.md +1 -1
  274. package/dist/sdk-skills/kindgi-authoring-guardrails/SKILL.md +47 -3
  275. package/dist/sdk-skills/kindgi-authoring-mcp-servers/SKILL.md +7 -5
  276. package/dist/sdk-skills/kindgi-authoring-providers/SKILL.md +40 -15
  277. package/dist/sdk-skills/kindgi-authoring-tools/SKILL.md +66 -2
  278. package/dist/sdk-skills/kindgi-framework-feedback/SKILL.md +5 -4
  279. package/dist/sdk-skills/kindgi-getting-started/SKILL.md +1 -1
  280. package/dist/sdk-skills/kindgi-java-authoring-agents/SKILL.md +220 -0
  281. package/dist/sdk-skills/kindgi-java-authoring-flows/SKILL.md +390 -0
  282. package/dist/sdk-skills/kindgi-java-authoring-guardrails/SKILL.md +209 -0
  283. package/dist/sdk-skills/kindgi-java-authoring-tools/SKILL.md +334 -0
  284. package/dist/sdk-skills/kindgi-java-getting-started/SKILL.md +270 -0
  285. package/dist/sdk-skills/kindgi-python-authoring-agents/SKILL.md +25 -3
  286. package/dist/sdk-skills/kindgi-python-authoring-flows/SKILL.md +1 -1
  287. package/dist/sdk-skills/kindgi-python-authoring-guardrails/SKILL.md +10 -3
  288. package/dist/sdk-skills/kindgi-python-authoring-tools/SKILL.md +45 -6
  289. package/dist/sdk-skills/kindgi-python-getting-started/SKILL.md +2 -2
  290. package/dist/sdk-skills/kindgi-scala-authoring-agents/SKILL.md +217 -0
  291. package/dist/sdk-skills/kindgi-scala-authoring-flows/SKILL.md +357 -0
  292. package/dist/sdk-skills/kindgi-scala-authoring-guardrails/SKILL.md +199 -0
  293. package/dist/sdk-skills/kindgi-scala-authoring-tools/SKILL.md +302 -0
  294. package/dist/sdk-skills/kindgi-scala-getting-started/SKILL.md +302 -0
  295. package/dist/templates/java/.mvn/wrapper/maven-wrapper.properties +3 -0
  296. package/dist/templates/java/AGENTS.md +31 -0
  297. package/dist/templates/java/README.md.tmpl +69 -0
  298. package/dist/templates/java/gitignore +9 -0
  299. package/dist/templates/java/kindgi.config.json.tmpl +8 -0
  300. package/dist/templates/java/kindgiw +33 -0
  301. package/dist/templates/java/kindgiw.cmd +28 -0
  302. package/dist/templates/java/mvnw +295 -0
  303. package/dist/templates/java/pom.xml.tmpl +65 -0
  304. package/dist/templates/java/src/main/java/__PACKAGE__/agents/EchoAgent.java.tmpl +27 -0
  305. package/dist/templates/java/src/main/java/__PACKAGE__/flows/EchoFlow.java.tmpl +18 -0
  306. package/dist/templates/java/src/main/java/__PACKAGE__/guardrails/ResponseNotEmpty.java.tmpl +28 -0
  307. package/dist/templates/java/src/main/java/__PACKAGE__/tools/Echo.java.tmpl +22 -0
  308. package/dist/templates/java/src/main/java/__PACKAGE__/tools/Greet.java.tmpl +23 -0
  309. package/dist/templates/java/src/test/java/__PACKAGE__/ToolsTest.java.tmpl +30 -0
  310. package/dist/templates/minimal/README.md.tmpl +6 -12
  311. package/dist/templates/python/README.md.tmpl +4 -4
  312. package/dist/templates/sample/README.md.tmpl +5 -11
  313. package/dist/templates/scala/AGENTS.md +32 -0
  314. package/dist/templates/scala/README.md.tmpl +75 -0
  315. package/dist/templates/scala/build.sbt.tmpl +16 -0
  316. package/dist/templates/scala/gitignore +13 -0
  317. package/dist/templates/scala/kindgi.config.json.tmpl +8 -0
  318. package/dist/templates/scala/project/build.properties +1 -0
  319. package/dist/templates/scala/src/main/scala/__PACKAGE__/agents/EchoAgent.scala.tmpl +23 -0
  320. package/dist/templates/scala/src/main/scala/__PACKAGE__/flows/EchoFlow.scala.tmpl +16 -0
  321. package/dist/templates/scala/src/main/scala/__PACKAGE__/guardrails/ResponseNotEmpty.scala.tmpl +21 -0
  322. package/dist/templates/scala/src/main/scala/__PACKAGE__/tools/Echo.scala.tmpl +16 -0
  323. package/dist/templates/scala/src/main/scala/__PACKAGE__/tools/Greet.scala.tmpl +17 -0
  324. package/dist/templates/scala/src/test/scala/__PACKAGE__/ToolsSuite.scala.tmpl +23 -0
  325. package/package.json +13 -12
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAmBpD,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAEV,WAAW,EAKZ,MAAM,mBAAmB,CAAC;AAW3B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,UAAU,EAAE,WA+ExB,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,yBAAyB,MAAM,CAAC;AA8F7C,wBAAsB,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAwnBxE;AAmmBD,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AA+ED,UAAU,eAAe;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAC;IAC3D,6DAA6D;IAC7D,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjD,kFAAkF;IAClF,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,mGAAmG;IACnG,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AA8CD,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,MAAM,EAAE,CA4B1E"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAEL,KAAK,oBAAoB,EAK1B,MAAM,8BAA8B,CAAC;AA+BtC,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAEV,WAAW,EAKZ,MAAM,mBAAmB,CAAC;AAa3B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,UAAU,EAAE,WAqGxB,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAuH7C,wBAAsB,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAosBxE;AAgpBD,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AA+ED,UAAU,eAAe;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAC;IAC3D,6DAA6D;IAC7D,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjD,kFAAkF;IAClF,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,mGAAmG;IACnG,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,uGAAuG;IACvG,QAAQ,CAAC,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;CACnD;AA8CD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAKrE;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,MAAM,EAAE,CAoC1E"}
@@ -37,11 +37,13 @@ import { basename, isAbsolute, join, resolve } from 'node:path';
37
37
  import { createInterface } from 'node:readline';
38
38
  import { discoveryRoots, findKindgiConfig, packLanguage, resolveDiscovery, } from '@kindgi/handler-runtime';
39
39
  import { LOCAL_ENV_NAME, displayEnvPath, packValues, readPackEnv, runtimeValues, } from '@kindgi/secrets-dotenv';
40
- import { CORS_ORIGINS_VAR, PUBLIC_TOKEN_KEY_PATH_VAR, parseCorsOrigins } from '@kindgi/env-schema';
40
+ import { CORS_ORIGINS_VAR, EXPORT_SIGNING_KEY_PATH_VAR, PUBLIC_TOKEN_KEY_PATH_VAR, parseCorsOrigins, } from '@kindgi/env-schema';
41
41
  import { createDevOnlyImportsCheck } from '../dev/dev-only-imports.js';
42
- import { resolvePackCode } from '../dev/pack-code.js';
42
+ import { DEV_GOOGLE_CREDENTIALS_VAR, VERTEX_PROVIDER_ID, isVertexRegistration, resolveDevGoogleCredentials, vertexCredentialsHint, } from '../dev/google-credentials.js';
43
+ import { DEFAULT_DEV_LOG_VIEW, parseDevLogFlags, resolveDevLogView, runtimeLogLevels, showIndexerLine, showLine, showText, sourceLogEnv, } from '../dev/log-view.js';
44
+ import { isJvmPackCode, resolvePackCode } from '../dev/pack-code.js';
43
45
  import { devPackEnv, devPackEnvFiles } from '../dev/pack-env.js';
44
- import { createPackRefresher, describePackEvent } from '../dev/pack-service.js';
46
+ import { createPackRefresher, showPackEvent } from '../dev/pack-service.js';
45
47
  import { PORT_SEARCH_SPAN, firstFreePort } from '../dev/port.js';
46
48
  import { resolveDevProject } from '../dev/project.js';
47
49
  import { adoptLegacyBundledEntries, declaredProviders, describeReconcile, devProvidersKey, devProvidersRecordPath, readOwnedProviders, reconcileProviders, writeOwnedProviders, } from '../dev/providers.js';
@@ -50,17 +52,19 @@ import { RuntimeStartStopped } from '../dev/runtime-container.js';
50
52
  import { DEFAULT_RUNTIME_IMAGE } from '../dev/runtime-image.js';
51
53
  import { describeEnvDiagnostics, loadLocalEnvSettings } from '../env/project-env.js';
52
54
  import { PYPI_NO_BUNDLER } from '../esbuild-loader.js';
55
+ import { openUrlInBrowser } from '../open-url.js';
53
56
  import { renderJson } from '../output.js';
54
57
  import { binDisplay, cliInstall, detectBinRunner } from '../package-manager.js';
55
58
  import { loadProviderPresets } from '../providers/preset-loader.js';
56
59
  import { CLI_VERSION } from '../version-info.js';
60
+ import { consoleUrlOf, couldNotOpen } from './console.js';
57
61
  import { defaultSdkSkillsRoot } from './init.js';
58
62
  import { detectSkillDrift } from './skills.js';
59
63
  export const devCommand = {
60
64
  kind: 'leaf',
61
65
  name: 'dev',
62
66
  description: 'Run the Kindgi runtime as a container + hot-reload the pack under cwd.',
63
- usage: 'kindgi dev [--port <n>] [--database-url <url>] [--tenant <id>] [--dev-token <token>] [--no-watch] [--path <dir>] [--reset [--yes]] [--recreate-services] [--runtime-image <ref> | --runtime-url <url>]',
67
+ usage: 'kindgi dev [--port <n>] [--database-url <url>] [--tenant <id>] [--dev-token <token>] [--no-watch] [--open] [--path <dir>] [--reset [--yes]] [--recreate-services] [--runtime-image <ref> | --runtime-url <url>] [--log-level <level>] [--log <subsystem>=<level>]... [--log-format pretty|json] [--quiet]',
64
68
  optionSpec: {
65
69
  port: {
66
70
  type: 'string',
@@ -100,9 +104,13 @@ export const devCommand = {
100
104
  type: 'boolean',
101
105
  description: 'Start, index and register once, then exit. For smoke tests and CI.',
102
106
  },
107
+ open: {
108
+ type: 'boolean',
109
+ description: 'Open the console in your browser once Kindgi is up.',
110
+ },
103
111
  path: {
104
112
  type: 'string',
105
- description: 'The pack root, with a `kindgi.config.ts` (or `.mts`) or a `pyproject.toml` with `[tool.kindgi]`. Default: the current directory.',
113
+ description: 'The pack root, with a `kindgi.config.ts` (or `.mts`), a `pyproject.toml` with `[tool.kindgi]`, or a `kindgi.config.json` (Java). Default: the current directory.',
106
114
  },
107
115
  // --reset: a fresh start for the project. With the bundled Postgres it
108
116
  // drops the project's database (asking first) and makes a new token;
@@ -123,6 +131,21 @@ export const devCommand = {
123
131
  type: 'boolean',
124
132
  description: 'Let `docker compose` recreate the bundled Postgres if its definition changed (needs compose). By default an existing container is reused.',
125
133
  },
134
+ // The runtime's and the pack service's records: what's shown, and how.
135
+ // `--quiet` (a global flag) keeps errors only.
136
+ 'log-level': {
137
+ type: 'string',
138
+ description: "The lowest level of the log records shown: error, warn, info, debug or trace. Default: `KINDGI_LOG_LEVEL` (the shell's, then the env files'), else info; with `--quiet`, error.",
139
+ },
140
+ log: {
141
+ type: 'string',
142
+ multiple: true,
143
+ description: "A subsystem's own level, `<subsystem>=<level>` (e.g. `--log=http=debug`, `--log=pack=debug`); repeat it, or give a comma list. A dotted child inherits its parent's (`pack` covers `pack.tool`).",
144
+ },
145
+ 'log-format': {
146
+ type: 'string',
147
+ description: 'How log records are shown: `pretty` (the default: tagged `[runtime]` / `[pack]`, coloured on a terminal unless `NO_COLOR` is set) or `json` (each record as written, one per line on stdout, for `| jq`; everything else stays on stderr).',
148
+ },
126
149
  },
127
150
  run: async (ctx) => runDev(ctx),
128
151
  };
@@ -146,9 +169,31 @@ export const DEFAULT_WATCH_DEBOUNCE_MS = 200;
146
169
  * so nothing to intercept.
147
170
  */
148
171
  function emitProgress(msg) {
172
+ if (logView.quiet)
173
+ return;
174
+ emitProblem(msg);
175
+ }
176
+ /** A progress line that's an error: shown under `--quiet` too. */
177
+ function emitProblem(msg) {
149
178
  process.stderr.write(`${stoppingLineOpen ? '\n' : ''} ${msg}\n`);
150
179
  stoppingLineOpen = false;
151
180
  }
181
+ /**
182
+ * How logs show this session (`dev/log-view.ts`): set from the flags as
183
+ * `runDev` starts, and again once the env files are read.
184
+ */
185
+ let logView = DEFAULT_DEV_LOG_VIEW;
186
+ /** A source's line as the view shows it: records on stdout with `--log-format=json`. */
187
+ function emitOutput(output) {
188
+ if (output === undefined)
189
+ return;
190
+ for (const line of output.lines) {
191
+ if (output.stream === 'stdout')
192
+ process.stdout.write(`${line}\n`);
193
+ else
194
+ emitProblem(` ${line}`);
195
+ }
196
+ }
152
197
  /**
153
198
  * Shutdown is one line: "Stopping kindgi dev..." the moment the signal
154
199
  * arrives, finished with "stopped." once the runtime and the pack service
@@ -177,7 +222,7 @@ async function withHeartbeat(label, intervalMs, work) {
177
222
  const started = Date.now();
178
223
  const tick = setInterval(() => {
179
224
  const elapsed = Math.round((Date.now() - started) / 1000);
180
- process.stderr.write(` ⋯ ${label} (${elapsed}s elapsed)\n`);
225
+ emitProgress(`⋯ ${label} (${elapsed}s elapsed)`);
181
226
  }, intervalMs);
182
227
  try {
183
228
  return await work();
@@ -194,6 +239,14 @@ export async function runDev(ctx) {
194
239
  if (parsed.kind === 'error')
195
240
  return parsed;
196
241
  const args = parsed.args;
242
+ // How logs show: the flags and the shell's settings now, the env files'
243
+ // once they're read.
244
+ const stderrIsTTY = process.stderr.isTTY === true;
245
+ const earlyView = resolveDevLogView(args.log, { env: ctx.env, files: {}, isTTY: stderrIsTTY });
246
+ if (earlyView.kind === 'error') {
247
+ return { kind: 'error', stderr: `kindgi dev: ${earlyView.message}\n`, exitCode: 1 };
248
+ }
249
+ logView = earlyView.value;
197
250
  const runners = pickRunners(ctx);
198
251
  if (runners.kind === 'error')
199
252
  return runners;
@@ -205,7 +258,7 @@ export async function runDev(ctx) {
205
258
  if (configFile === undefined) {
206
259
  return {
207
260
  kind: 'error',
208
- stderr: `kindgi dev could not find a kindgi.config.ts (or a pyproject.toml with a [tool.kindgi] table) at ${args.packDir}.\nRun \`kindgi init <pack-name>\` to scaffold a pack, or pass --path=<dir> to point at an existing one.\n`,
261
+ stderr: `kindgi dev could not find a kindgi.config.ts (or a pyproject.toml with a [tool.kindgi] table, or a kindgi.config.json) at ${args.packDir}.\nRun \`kindgi init <pack-name>\` to scaffold a pack, or pass --path=<dir> to point at an existing one.\n`,
209
262
  exitCode: 1,
210
263
  };
211
264
  }
@@ -215,6 +268,15 @@ export async function runDev(ctx) {
215
268
  const projectEnv = await loadDevProjectEnv(ctx, args.packDir);
216
269
  if (projectEnv.kind === 'error')
217
270
  return projectEnv;
271
+ const view = resolveDevLogView(args.log, {
272
+ env: ctx.env,
273
+ files: projectEnv.runtime,
274
+ isTTY: stderrIsTTY,
275
+ });
276
+ if (view.kind === 'error') {
277
+ return { kind: 'error', stderr: `kindgi dev: ${view.message}\n`, exitCode: 1 };
278
+ }
279
+ logView = view.value;
218
280
  // The PyPI CLI (kindgi-cli) has no TypeScript bundler: say so before anything starts.
219
281
  if (projectEnv.language === 'node' && cliInstall(ctx.env) === 'pypi') {
220
282
  return { kind: 'error', stderr: `kindgi dev: ${PYPI_NO_BUNDLER}\n`, exitCode: 1 };
@@ -231,6 +293,22 @@ export async function runDev(ctx) {
231
293
  if (declared.kind === 'invalid') {
232
294
  return { kind: 'error', stderr: `kindgi dev: ${declared.message}\n`, exitCode: 1 };
233
295
  }
296
+ // Google credentials for Vertex AI: only the ones KINDGI_DEV_GOOGLE_CREDENTIALS
297
+ // names (the shell, then the env files) reach the runtime. A declared
298
+ // Vertex provider without them is said now, before anything starts.
299
+ const google = resolveDevGoogleCredentials(ctx.env[DEV_GOOGLE_CREDENTIALS_VAR] ?? projectEnv.runtime[DEV_GOOGLE_CREDENTIALS_VAR], ctx.env);
300
+ if (google.kind === 'error') {
301
+ return { kind: 'error', stderr: `kindgi dev: ${google.message}\n`, exitCode: 1 };
302
+ }
303
+ const declaredVertex = declared.providers
304
+ .filter((p) => isVertexRegistration(p.input))
305
+ .map((p) => p.id);
306
+ if (google.credentials !== undefined) {
307
+ emitProgress(`✓ Google credentials: ${google.credentials.path} (${google.credentials.who}), mounted read-only for Vertex AI`);
308
+ }
309
+ else if (declaredVertex.length > 0) {
310
+ emitProgress(`⚠ ${vertexCredentialsHint(declaredVertex, ctx.env)}`);
311
+ }
234
312
  // The runtime's port, before anything starts. Taken without `--port`
235
313
  // (another `kindgi dev`, say): the next free one, which `.kindgirc.json`
236
314
  // then records for every client. Taken with `--port`: refused.
@@ -375,12 +453,16 @@ export async function runDev(ctx) {
375
453
  // The pack's code is bundled and runs in a local pack service. It
376
454
  // starts once the pack is bundled and indexed; the api-server gets
377
455
  // its transport now.
378
- const packEnv = () => devPackEnv({
379
- packDir: args.packDir,
380
- ...(projectEnv.localEnvFiles !== undefined && { localEnvFiles: projectEnv.localEnvFiles }),
381
- hostEnv: ctx.env,
456
+ // The pack service and the indexer write records at the levels shown.
457
+ const packEnv = async () => ({
458
+ ...(await devPackEnv({
459
+ packDir: args.packDir,
460
+ ...(projectEnv.localEnvFiles !== undefined && { localEnvFiles: projectEnv.localEnvFiles }),
461
+ hostEnv: ctx.env,
462
+ })),
463
+ ...sourceLogEnv(logView),
382
464
  });
383
- const code = await resolveDevPackCode(dev, projectEnv.language, args.packDir, projectEnv.config, packEnv);
465
+ const code = await resolveDevPackCode(dev, projectEnv.language, args.packDir, projectEnv.config, packEnv, ctx.env);
384
466
  if (code.kind === 'error') {
385
467
  return code;
386
468
  }
@@ -392,11 +474,10 @@ export async function runDev(ctx) {
392
474
  packDir: args.packDir,
393
475
  code: code.value,
394
476
  env: packEnv,
395
- onLog: (line) => emitProgress(` [pack] ${line}`),
477
+ onLog: (line, stream) => emitOutput(showText('pack', line, logView, stream)),
396
478
  onEvent: (event) => {
397
- const line = describePackEvent(event);
398
- if (line !== undefined)
399
- emitProgress(line);
479
+ for (const output of showPackEvent(event, logView))
480
+ emitOutput(output);
400
481
  },
401
482
  };
402
483
  // The front listens for the whole session; children come and go behind
@@ -434,6 +515,7 @@ export async function runDev(ctx) {
434
515
  packDir: args.packDir,
435
516
  env: packEnv,
436
517
  code: code.value,
518
+ onIndexerOutput: (line) => emitOutput(showIndexerLine(line, logView)),
437
519
  ...(devOnly !== undefined && {
438
520
  onBuild: async (build) => {
439
521
  if (build.externals === undefined)
@@ -467,12 +549,19 @@ export async function runDev(ctx) {
467
549
  ...(publicRunTokens.keyPath !== undefined && {
468
550
  publicRunTokenKeyPath: publicRunTokens.keyPath,
469
551
  }),
552
+ ...(publicRunTokens.exportKeyPath !== undefined && {
553
+ exportSigningKeyPath: publicRunTokens.exportKeyPath,
554
+ }),
470
555
  ...(publicRunTokens.corsOrigins.length > 0 && {
471
556
  corsOrigins: publicRunTokens.corsOrigins,
472
557
  }),
558
+ ...(google.credentials !== undefined && {
559
+ googleCredentialsPath: google.credentials.path,
560
+ }),
473
561
  runtimeImage: args.runtimeImage,
474
562
  ...(args.runtimeUrl !== undefined && { runtimeUrl: args.runtimeUrl }),
475
- onLog: (line) => emitProgress(` [runtime] ${line}`),
563
+ logLevels: runtimeLogLevels(logView),
564
+ onLog: (line, stream) => emitOutput(showLine('runtime', line, logView, stream)),
476
565
  onProgress: emitProgress,
477
566
  ...(ctx.stopSignal !== undefined && { signal: ctx.stopSignal }),
478
567
  }));
@@ -537,8 +626,18 @@ export async function runDev(ctx) {
537
626
  });
538
627
  const providers = await registeredProviders(client);
539
628
  const registerProviderCommand = await registerProviderHint(kindgi);
629
+ // A Vertex provider registered by hand (the `gemini` preset) has no
630
+ // credentials either; a declared one was named before the start.
631
+ if (google.credentials === undefined) {
632
+ const byHand = (providers ?? [])
633
+ .map((p) => p.id)
634
+ .filter((id) => id === VERTEX_PROVIDER_ID && !declaredVertex.includes(id));
635
+ if (byHand.length > 0)
636
+ emitProgress(`⚠ ${vertexCredentialsHint(byHand, ctx.env)}`);
637
+ }
540
638
  const bannerLines = renderDevBanner({
541
639
  baseUrl: server.baseUrl,
640
+ consoleMounted: server.consoleMounted === true,
542
641
  tenantId: server.tenantId,
543
642
  token: server.token,
544
643
  providers,
@@ -549,6 +648,7 @@ export async function runDev(ctx) {
549
648
  discoveryRoots: discoveryRoots(projectEnv.discoveryPatterns),
550
649
  ...(servicesHandle !== undefined && { autoStartedServices: servicesHandle.services }),
551
650
  corsOrigins: publicRunTokens.corsOrigins,
651
+ ...(google.credentials !== undefined && { googleCredentials: google.credentials }),
552
652
  });
553
653
  // Write `.kindgirc.json` to the pack root so a SECOND terminal in
554
654
  // the same directory (`cd <pack>; kindgi runs start ...`) picks up
@@ -594,13 +694,14 @@ export async function runDev(ctx) {
594
694
  emitProgress('════════════════════════════════════════');
595
695
  emitProgress(' ✓ Kindgi is up');
596
696
  emitProgress('════════════════════════════════════════');
697
+ if (server.consoleMounted === true) {
698
+ for (const line of renderConsoleLines(server.baseUrl))
699
+ emitProgress(line);
700
+ }
597
701
  emitProgress(` API ${server.baseUrl}`);
598
702
  if (project !== undefined) {
599
703
  emitProgress(` Project ${project.name} · database ${project.database}`);
600
704
  }
601
- if (server.consoleMounted === true) {
602
- emitProgress(` Console ${server.baseUrl}/console/`);
603
- }
604
705
  emitProgress(` Tenant ${server.tenantId}`);
605
706
  emitProgress(` Token ${server.token}`);
606
707
  if (providers !== undefined) {
@@ -637,6 +738,16 @@ export async function runDev(ctx) {
637
738
  emitProgress(' Ctrl+C to stop.');
638
739
  emitProgress('');
639
740
  }
741
+ if (args.open) {
742
+ if (server.consoleMounted === true) {
743
+ const opened = await (ctx.openUrl ?? openUrlInBrowser)(consoleUrlOf(server.baseUrl));
744
+ emitProgress(opened.ok ? ' Opened the console in your browser.' : ` ${couldNotOpen(opened.reason)}`);
745
+ }
746
+ else {
747
+ emitProgress(' --open: this runtime serves no console, so there is nothing to open.');
748
+ }
749
+ emitProgress('');
750
+ }
640
751
  const watchHandles = [];
641
752
  let watchTicks = 0;
642
753
  let lastWatchOutcome;
@@ -684,7 +795,7 @@ export async function runDev(ctx) {
684
795
  }
685
796
  else {
686
797
  lastWatchReport = undefined;
687
- emitProgress(` ✗ refresh failed [${outcome.code}] ${outcome.message}`);
798
+ emitProblem(` ✗ refresh failed [${outcome.code}] ${outcome.message}`);
688
799
  }
689
800
  })();
690
801
  inFlightTicks.add(tick);
@@ -738,6 +849,7 @@ export async function runDev(ctx) {
738
849
  // stood when kindgi dev stopped.
739
850
  const summary = {
740
851
  apiUrl: server.baseUrl,
852
+ ...(server.consoleMounted === true && { consoleUrl: consoleUrlOf(server.baseUrl) }),
741
853
  tenantId: server.tenantId,
742
854
  token: server.token,
743
855
  port: server.port,
@@ -756,14 +868,19 @@ export async function runDev(ctx) {
756
868
  const stdout = ctx.globals.formatRequested ? renderJson(summary, ctx.globals.format).stdout : '';
757
869
  return {
758
870
  kind: 'ok',
759
- rendered: { stdout, stderr: args.watch ? '' : `${bannerLines.join('\n')}\n` },
871
+ // --quiet: errors only, so no summary.
872
+ rendered: {
873
+ stdout,
874
+ stderr: args.watch || logView.quiet ? '' : `${bannerLines.join('\n')}\n`,
875
+ },
760
876
  };
761
877
  }
762
878
  /**
763
879
  * Public run tokens for the browser app under development: signed with
764
880
  * the key file when `KINDGI_PUBLIC_TOKEN_SIGNING_KEY_PATH` is set,
765
881
  * otherwise with a key made now (tokens stop working when `kindgi dev`
766
- * stops). `KINDGI_CORS_ORIGINS` lists the app's origins
882
+ * stops). Exports the same way: `KINDGI_EXPORT_SIGNING_KEY_PATH`'s key
883
+ * file, otherwise a key the runtime makes at startup. `KINDGI_CORS_ORIGINS` lists the app's origins
767
884
  * (`http://localhost:3000`). Both come from the shell, then the env files,
768
885
  * like `KINDGI_DATABASE_URL`.
769
886
  */
@@ -773,11 +890,19 @@ async function resolveDevPublicRunTokens(shell, files) {
773
890
  return value === undefined || value.trim() === '' ? undefined : value.trim();
774
891
  };
775
892
  try {
776
- const keyPath = pick(PUBLIC_TOKEN_KEY_PATH_VAR);
777
- if (keyPath !== undefined && (!isAbsolute(keyPath) || !existsSync(keyPath))) {
778
- throw new Error(`${PUBLIC_TOKEN_KEY_PATH_VAR} must be the absolute path of an existing key file. Got "${keyPath}".`);
779
- }
780
- return { kind: 'ok', keyPath, corsOrigins: parseCorsOrigins(pick(CORS_ORIGINS_VAR)) };
893
+ const keyFile = (name) => {
894
+ const path = pick(name);
895
+ if (path !== undefined && (!isAbsolute(path) || !existsSync(path))) {
896
+ throw new Error(`${name} must be the absolute path of an existing key file. Got "${path}".`);
897
+ }
898
+ return path;
899
+ };
900
+ return {
901
+ kind: 'ok',
902
+ keyPath: keyFile(PUBLIC_TOKEN_KEY_PATH_VAR),
903
+ exportKeyPath: keyFile(EXPORT_SIGNING_KEY_PATH_VAR),
904
+ corsOrigins: parseCorsOrigins(pick(CORS_ORIGINS_VAR)),
905
+ };
781
906
  }
782
907
  catch (err) {
783
908
  return { kind: 'error', stderr: `kindgi dev: ${err.message}\n`, exitCode: 1 };
@@ -902,6 +1027,16 @@ function resolveDevArgs(ctx) {
902
1027
  };
903
1028
  }
904
1029
  const watch = !watchOff;
1030
+ // --open — the console in the browser; with --no-watch the runtime
1031
+ // stops as kindgi dev exits, so there'd be nothing to open.
1032
+ const open = ctx.options.open === true;
1033
+ if (open && !watch) {
1034
+ return {
1035
+ kind: 'error',
1036
+ stderr: "Contradictory flags: --open and --no-watch. With --no-watch the runtime stops when kindgi dev exits, so there's no console to open.\n",
1037
+ exitCode: 1,
1038
+ };
1039
+ }
905
1040
  // --path — pack root. Default is cwd.
906
1041
  const pathFlag = ctx.options.path;
907
1042
  const rawPath = typeof pathFlag === 'string' && pathFlag !== '' ? pathFlag : ctx.cwd;
@@ -929,6 +1064,16 @@ function resolveDevArgs(ctx) {
929
1064
  };
930
1065
  }
931
1066
  const runtimeImage = typeof imageFlag === 'string' && imageFlag !== '' ? imageFlag : DEFAULT_RUNTIME_IMAGE;
1067
+ // --log-level / --log / --log-format / --quiet — what the logs show, and how.
1068
+ const log = parseDevLogFlags({
1069
+ level: ctx.options['log-level'],
1070
+ log: ctx.options.log,
1071
+ format: ctx.options['log-format'],
1072
+ quiet: ctx.globals.format === 'quiet',
1073
+ });
1074
+ if (log.kind === 'error') {
1075
+ return { kind: 'error', stderr: `kindgi dev: ${log.message}\n`, exitCode: 1 };
1076
+ }
932
1077
  return {
933
1078
  kind: 'ok',
934
1079
  args: {
@@ -938,12 +1083,14 @@ function resolveDevArgs(ctx) {
938
1083
  tenantId,
939
1084
  token,
940
1085
  watch,
1086
+ open,
941
1087
  packDir,
942
1088
  reset,
943
1089
  yes,
944
1090
  recreateServices,
945
1091
  runtimeImage,
946
1092
  runtimeUrl,
1093
+ log: log.value,
947
1094
  },
948
1095
  };
949
1096
  }
@@ -1049,19 +1196,20 @@ async function readPersistedRc(kindgircPath) {
1049
1196
  /** What the boot loaded, live: the counts and failures, no primitives yet, or the indexer's error. */
1050
1197
  function emitBootIndex(bootIndex, bootReport, roots) {
1051
1198
  if (bootIndex.kind !== 'ok') {
1052
- // Dev stays up either way; the section says so.
1199
+ // Dev stays up either way; the section says so. No primitives yet isn't an error.
1200
+ const emit = bootIndex.code === 'discovery-empty' ? emitProgress : emitProblem;
1053
1201
  for (const line of renderIndexSection({ bootIndex, bootReport, discoveryRoots: roots })) {
1054
- emitProgress(line.replace(/^ {2}/, ''));
1202
+ emit(line.replace(/^ {2}/, ''));
1055
1203
  }
1056
1204
  return;
1057
1205
  }
1058
1206
  const c = bootIndex.counts;
1059
1207
  emitProgress(`✓ loaded: ${c.tools} tools, ${c.guardrails} guardrails, ${c.agents} agents, ${c.flows} flows`);
1060
1208
  for (const e of bootIndex.fileErrors) {
1061
- emitProgress(` ⚠ indexer: ${e.filePath ?? '?'} [${e.code}] ${e.message}`);
1209
+ emitProblem(` ⚠ indexer: ${e.filePath ?? '?'} [${e.code}] ${e.message}`);
1062
1210
  }
1063
1211
  for (const f of bootReport.failed) {
1064
- emitProgress(` ⚠ ${f.kind}: ${f.id} — ${f.message ?? 'unknown reason'}`);
1212
+ emitProblem(` ⚠ ${f.kind}: ${f.id} — ${f.message ?? 'unknown reason'}`);
1065
1213
  }
1066
1214
  }
1067
1215
  /**
@@ -1161,12 +1309,12 @@ function emitWatchTick(input) {
1161
1309
  emitProgress(` ✓ loaded ${registered} primitives (${totals}) in ${elapsedMs}ms`);
1162
1310
  return;
1163
1311
  }
1164
- emitProgress(` ⚠ loaded ${registered} of ${registered + failed.length} in ${elapsedMs}ms — ${totals}`);
1312
+ emitProblem(` ⚠ loaded ${registered} of ${registered + failed.length} in ${elapsedMs}ms — ${totals}`);
1165
1313
  for (const e of fileErrors) {
1166
- emitProgress(` ✗ indexer: ${e.filePath ?? '?'} [${e.code}] ${e.message}`);
1314
+ emitProblem(` ✗ indexer: ${e.filePath ?? '?'} [${e.code}] ${e.message}`);
1167
1315
  }
1168
1316
  for (const f of failed) {
1169
- emitProgress(` ✗ ${f.kind}: ${f.id} — ${f.message ?? 'unknown reason'}`);
1317
+ emitProblem(` ✗ ${f.kind}: ${f.id} — ${f.message ?? 'unknown reason'}`);
1170
1318
  }
1171
1319
  }
1172
1320
  /**
@@ -1200,11 +1348,11 @@ async function emitSkillDriftHint(packDir, language, syncCommand) {
1200
1348
  }
1201
1349
  /**
1202
1350
  * How this pack's code runs (`dev/pack-code.ts`). For a Python pack, the
1203
- * interpreter is resolved and checked — with the pack's own environment —
1204
- * before anything boots.
1351
+ * interpreter, and for a JVM pack, the JDK and Maven or sbt, are resolved
1352
+ * and checked — with the pack's own environment — before anything boots.
1205
1353
  */
1206
- async function resolveDevPackCode(dev, language, packDir, config, packEnv) {
1207
- const resolved = await resolvePackCode(language, packDir, config);
1354
+ async function resolveDevPackCode(dev, language, packDir, config, packEnv, hostEnv) {
1355
+ const resolved = await resolvePackCode(language, packDir, config, hostEnv);
1208
1356
  if (resolved.kind === 'err') {
1209
1357
  return { kind: 'error', stderr: `kindgi dev: ${resolved.message}\n`, exitCode: 1 };
1210
1358
  }
@@ -1215,6 +1363,13 @@ async function resolveDevPackCode(dev, language, packDir, config, packEnv) {
1215
1363
  }
1216
1364
  emitProgress(`✓ pack code: ${checked.value}`);
1217
1365
  }
1366
+ if (isJvmPackCode(resolved.value)) {
1367
+ const checked = await dev.checkPackJvm(resolved.value, await packEnv(), packDir);
1368
+ if (checked.kind === 'err') {
1369
+ return { kind: 'error', stderr: `kindgi dev: ${checked.message}\n`, exitCode: 1 };
1370
+ }
1371
+ emitProgress(`✓ pack code: ${checked.value}`);
1372
+ }
1218
1373
  return { kind: 'ok', value: resolved.value };
1219
1374
  }
1220
1375
  function getEnv(ctx, key) {
@@ -1311,7 +1466,7 @@ async function registerProviderHint(kindgi) {
1311
1466
  */
1312
1467
  function describeProviders(providers, registerProviderCommand) {
1313
1468
  if (providers.length === 0) {
1314
- return `none — agent turns fail until one is registered: ${registerProviderCommand}`;
1469
+ return `none — this runtime has no dev-echo fallback, so agent turns fail until one is registered: ${registerProviderCommand}`;
1315
1470
  }
1316
1471
  const named = providers
1317
1472
  .map((p) => p.fallback === true
@@ -1322,11 +1477,25 @@ function describeProviders(providers, registerProviderCommand) {
1322
1477
  return named;
1323
1478
  return `${named} — canned replies; for a real model: ${registerProviderCommand}`;
1324
1479
  }
1480
+ /**
1481
+ * The ready block's first lines: the console, and how to sign in to it
1482
+ * (T374). First, so the URL a person opens is the console's: the API's
1483
+ * own address used to be the first one printed, and answered 404.
1484
+ */
1485
+ export function renderConsoleLines(baseUrl) {
1486
+ return [
1487
+ ` Console ${consoleUrlOf(baseUrl)} (open in your browser)`,
1488
+ ' Sign in: "Sign in as seeded user" on the sign-in page (the dev token, below)',
1489
+ ];
1490
+ }
1325
1491
  /** The banner `kindgi dev --no-watch` prints to stderr when it exits. */
1326
1492
  export function renderDevBanner(inputs) {
1327
1493
  const lines = [];
1328
1494
  lines.push('');
1329
1495
  lines.push(' Starting Kindgi locally (dev: the runtime in a container, your code on this machine)');
1496
+ if (inputs.consoleMounted === true) {
1497
+ lines.push(` Console ${consoleUrlOf(inputs.baseUrl)}`);
1498
+ }
1330
1499
  lines.push(` API server ${inputs.baseUrl}`);
1331
1500
  lines.push(` Tenant ${inputs.tenantId}`);
1332
1501
  lines.push(` Bearer token ${inputs.token}`);
@@ -1340,6 +1509,9 @@ export function renderDevBanner(inputs) {
1340
1509
  if (inputs.corsOrigins !== undefined) {
1341
1510
  lines.push(` Browser origins ${describeBrowserOrigins(inputs.corsOrigins)}`);
1342
1511
  }
1512
+ if (inputs.googleCredentials !== undefined) {
1513
+ lines.push(` Google credentials ${inputs.googleCredentials.path} (${inputs.googleCredentials.who}), read-only, for Vertex AI`);
1514
+ }
1343
1515
  lines.push('');
1344
1516
  lines.push(...renderIndexSection(inputs));
1345
1517
  lines.push('');