@pikku/cli 0.12.107 → 0.12.110

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 (258) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/console-app/assets/{abnfDiagram-N423BO3Z-C5uToS9v.js → abnfDiagram-N423BO3Z-Bz2Ycfpe.js} +1 -1
  3. package/console-app/assets/architecture-TIHT7OUA-5QhJKy4P.js +1 -0
  4. package/console-app/assets/{architectureDiagram-T3A2C74G-BzJDRfv4.js → architectureDiagram-T3A2C74G-CvAkxhy0.js} +1 -1
  5. package/console-app/assets/{blockDiagram-VBNYF7ZC-X5G9Ch-D.js → blockDiagram-VBNYF7ZC-CuVOo2PB.js} +1 -1
  6. package/console-app/assets/{c4Diagram-5PPSVZJV-B59aO2Sc.js → c4Diagram-5PPSVZJV-4Vg8SxCa.js} +1 -1
  7. package/console-app/assets/channel-DoE3nnYB.js +1 -0
  8. package/console-app/assets/{chunk-2GRJ4B5K-Bwe32j_R.js → chunk-2GRJ4B5K-CKKR4_dC.js} +1 -1
  9. package/console-app/assets/{chunk-4I5QYGJK-Beg_uQQN.js → chunk-4I5QYGJK-C-m_kVjm.js} +1 -1
  10. package/console-app/assets/{chunk-5RXB4S5H-0HaMiv3k.js → chunk-5RXB4S5H-CyUGtd0h.js} +1 -1
  11. package/console-app/assets/{chunk-6Q2QTUOP-CXxkExOq.js → chunk-6Q2QTUOP-BuzItInf.js} +1 -1
  12. package/console-app/assets/{chunk-7Z6QIM7H-zUqPbrvp.js → chunk-7Z6QIM7H-BGiBPuWt.js} +1 -1
  13. package/console-app/assets/{chunk-GF5L2VYU-CY0wGPcJ.js → chunk-GF5L2VYU-D8jaliB9.js} +1 -1
  14. package/console-app/assets/{chunk-I66GZJ75-BP5UNkJY.js → chunk-I66GZJ75-C-Lq_UXl.js} +1 -1
  15. package/console-app/assets/{chunk-JQJVKLGR-3dvnUUZN.js → chunk-JQJVKLGR-D7viK-tf.js} +1 -1
  16. package/console-app/assets/{chunk-KBJHAD2P-ChD7o2bf.js → chunk-KBJHAD2P-BS9N9gG4.js} +1 -1
  17. package/console-app/assets/{chunk-NSK5VX7P-oG1nh33f.js → chunk-NSK5VX7P-Fi_H0vaS.js} +1 -1
  18. package/console-app/assets/{chunk-QR6OTTB3-D_uKJrj6.js → chunk-QR6OTTB3-BJdg-tcL.js} +1 -1
  19. package/console-app/assets/{chunk-RYQCIY6F-CtYhP8W5.js → chunk-RYQCIY6F-CVbGA6YZ.js} +1 -1
  20. package/console-app/assets/{chunk-UBXNYLIW-CMgD3fvL.js → chunk-UBXNYLIW-BF-sAqEK.js} +1 -1
  21. package/console-app/assets/{chunk-W5SLKNZC-cjI56NCs.js → chunk-W5SLKNZC-CXrJJ0BX.js} +1 -1
  22. package/console-app/assets/{chunk-WRU74C26-BQqHgerX.js → chunk-WRU74C26-CGzysGBy.js} +1 -1
  23. package/console-app/assets/chunk-XXDRQBXY-BDALKVU4.js +1 -0
  24. package/console-app/assets/classDiagram-JCYQIIEL-BgrrHQtN.js +1 -0
  25. package/console-app/assets/classDiagram-v2-OCEON4UE-BgrrHQtN.js +1 -0
  26. package/console-app/assets/{cose-bilkent-JH36ORCC-DcHzDpDb.js → cose-bilkent-JH36ORCC-BvFZIDHb.js} +1 -1
  27. package/console-app/assets/{cynefin-VYW2F7L2-Cn2zn-8-.js → cynefin-VYW2F7L2-DRQ8xGmN.js} +1 -1
  28. package/console-app/assets/{cynefinDiagram-MW4NZA55-C00zINdu.js → cynefinDiagram-MW4NZA55-BwxQ4C1z.js} +1 -1
  29. package/console-app/assets/{dagre-DE2imcyX.js → dagre-J22zmNeE.js} +1 -1
  30. package/console-app/assets/{dagre-VZM6K2ZE-Bb2uZ7tL.js → dagre-VZM6K2ZE-DPtUyvjD.js} +1 -1
  31. package/console-app/assets/{diagram-7IWD3JNH-DUN-JIa1.js → diagram-7IWD3JNH-DGAzJ2Ln.js} +1 -1
  32. package/console-app/assets/{diagram-B4RE2ZJO-Ct5iRFhI.js → diagram-B4RE2ZJO-D14cIfto.js} +1 -1
  33. package/console-app/assets/{diagram-LBJQPF4R-BZ2Hrr-9.js → diagram-LBJQPF4R-CUscJ_pO.js} +1 -1
  34. package/console-app/assets/{diagram-Q27KOJAE-BHaThj6T.js → diagram-Q27KOJAE-CehBHMt3.js} +1 -1
  35. package/console-app/assets/{diagram-UB23O5K3-CH-SzBoh.js → diagram-UB23O5K3-BvazI_qH.js} +1 -1
  36. package/console-app/assets/{ebnfDiagram-BXEA7PRR-BkjeNaQH.js → ebnfDiagram-BXEA7PRR-CBZPYFwZ.js} +1 -1
  37. package/console-app/assets/{erDiagram-JOGREHBK-BdL77bY3.js → erDiagram-JOGREHBK-BN3FevvT.js} +1 -1
  38. package/console-app/assets/eventmodeling-45OFAUF4-D2SxzJUl.js +1 -0
  39. package/console-app/assets/flowDiagram-UKHOOZJN-CQXuJ0z2.js +1 -0
  40. package/console-app/assets/{ganttDiagram-PKOTCBZU-DfgO68Ez.js → ganttDiagram-PKOTCBZU-03mWH2kB.js} +1 -1
  41. package/console-app/assets/{gitGraph-TEB2WS4Q-BNbepAzP.js → gitGraph-TEB2WS4Q-By2486wn.js} +1 -1
  42. package/console-app/assets/{gitGraphDiagram-DS77QQ5N-Crb8obGB.js → gitGraphDiagram-DS77QQ5N-CCzKPRBJ.js} +1 -1
  43. package/console-app/assets/{index-g8jA8DJo.js → index-snBzz_U8.js} +3 -3
  44. package/console-app/assets/{index-Dsydm-nw.css → index-suVNAhyL.css} +1 -1
  45. package/console-app/assets/{info-DKCQHKI2-D9tXUXel.js → info-DKCQHKI2-C_vsavqC.js} +1 -1
  46. package/console-app/assets/{infoDiagram-6WML65LV-BvG8ufLa.js → infoDiagram-6WML65LV-BKvU8du7.js} +1 -1
  47. package/console-app/assets/{ishikawaDiagram-WSZJBQD7-BWoGxEjO.js → ishikawaDiagram-WSZJBQD7-CnF0qm0n.js} +1 -1
  48. package/console-app/assets/{journeyDiagram-NVQOT4AX-CR4YcPHg.js → journeyDiagram-NVQOT4AX-DxKe9OZ7.js} +1 -1
  49. package/console-app/assets/{kanban-definition-27J2QSJJ-DYfc5EZe.js → kanban-definition-27J2QSJJ-CB8lgPxU.js} +1 -1
  50. package/console-app/assets/{line-NIaf8Mfw.js → line-DFNLso1I.js} +1 -1
  51. package/console-app/assets/{linear-DB_1BE-l.js → linear-D1cspVtk.js} +1 -1
  52. package/console-app/assets/{mermaid-parser.core-BqCVMHRZ.js → mermaid-parser.core-BtmN233C.js} +3 -3
  53. package/console-app/assets/{mermaid.core-CYaeERjF.js → mermaid.core-37H5_HoB.js} +4 -4
  54. package/console-app/assets/{mindmap-definition-FAOFIHXS-BCjT2v4F.js → mindmap-definition-FAOFIHXS-Czf82JOB.js} +1 -1
  55. package/console-app/assets/{packet-7NZHBO7P-CzFZvntp.js → packet-7NZHBO7P-CErYxAQM.js} +1 -1
  56. package/console-app/assets/{pegDiagram-VL7TDLO6-3iMotW64.js → pegDiagram-VL7TDLO6-CRKX6HOt.js} +1 -1
  57. package/console-app/assets/{pie-RZYD4A2V-CXIoUTJn.js → pie-RZYD4A2V-YmMmh6Nq.js} +1 -1
  58. package/console-app/assets/{pieDiagram-7S7Q4E2Y-B-EOKkdd.js → pieDiagram-7S7Q4E2Y-Cot0Fu5q.js} +1 -1
  59. package/console-app/assets/{quadrantDiagram-CIZ2JOQS-DDdq8l2N.js → quadrantDiagram-CIZ2JOQS-DPEonVYT.js} +1 -1
  60. package/console-app/assets/{radar-I7S5WNFK-9SLSkJ73.js → radar-I7S5WNFK-Pf_KiQJM.js} +1 -1
  61. package/console-app/assets/{railroad-3IZDKUUU-DdJ88Ord.js → railroad-3IZDKUUU-BYoOMoQY.js} +1 -1
  62. package/console-app/assets/railroad-abnf-AHOZXSZD-CCRXsRRD.js +1 -0
  63. package/console-app/assets/railroad-ebnf-EBAXGLYW-DVRSVgn8.js +1 -0
  64. package/console-app/assets/railroad-peg-LSFZ7HO6-COUBoNH3.js +1 -0
  65. package/console-app/assets/{railroadDiagram-AXF67PYL-BMW_s9QW.js → railroadDiagram-AXF67PYL-Di8N9tHD.js} +1 -1
  66. package/console-app/assets/{requirementDiagram-LRYGKXZP-BzcnEvjk.js → requirementDiagram-LRYGKXZP-2yZZ753q.js} +1 -1
  67. package/console-app/assets/{sankeyDiagram-W5VNT64P-Dh2TFvuG.js → sankeyDiagram-W5VNT64P-BwYA-xq1.js} +1 -1
  68. package/console-app/assets/{sequenceDiagram-SI44F4Z6-b-m-tQYz.js → sequenceDiagram-SI44F4Z6-odIxlx8J.js} +1 -1
  69. package/console-app/assets/{src-Dm8O0hiD.js → src-CxJwpjvz.js} +1 -1
  70. package/console-app/assets/{stateDiagram-OKZ733FA-W98kCkqj.js → stateDiagram-OKZ733FA-Du2S0qU9.js} +1 -1
  71. package/console-app/assets/stateDiagram-v2-UEYNNEHI-CTXOGDRR.js +1 -0
  72. package/console-app/assets/{swimlanes-SLNWSIFB-0q_y6cLu.js → swimlanes-SLNWSIFB-JZ3swzI2.js} +1 -1
  73. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-DRrggQgK.js +8 -0
  74. package/console-app/assets/{timeline-definition-Z64GVDOM-DmsNlhwe.js → timeline-definition-Z64GVDOM-CsppAEWi.js} +1 -1
  75. package/console-app/assets/{treeView-QDETBFTQ-DY7A9uJm.js → treeView-QDETBFTQ-DkkO8peQ.js} +1 -1
  76. package/console-app/assets/{treemap-6X3UGDF4-DI73Vm90.js → treemap-6X3UGDF4-hjLkPCJI.js} +1 -1
  77. package/console-app/assets/{vennDiagram-T6HMQDX7-Czpr9diJ.js → vennDiagram-T6HMQDX7-BOfgM1xp.js} +1 -1
  78. package/console-app/assets/{wardley-OPB4EBWU-C39AmDqd.js → wardley-OPB4EBWU-C5ZtGfBa.js} +1 -1
  79. package/console-app/assets/{wardleyDiagram-T6FBY63Y-DOtWBvnk.js → wardleyDiagram-T6FBY63Y-ymf3Vm6A.js} +1 -1
  80. package/console-app/assets/{xychartDiagram-ELKLHX3M-VHHuGrWV.js → xychartDiagram-ELKLHX3M-DdxXIoKz.js} +1 -1
  81. package/console-app/index.html +2 -2
  82. package/dist/.pikku/addon/index.d.ts +1 -1
  83. package/dist/.pikku/addon/index.js +1 -1
  84. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  85. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  86. package/dist/.pikku/agent/index.d.ts +1 -1
  87. package/dist/.pikku/agent/index.js +1 -1
  88. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  89. package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
  90. package/dist/.pikku/auth/index.d.ts +1 -1
  91. package/dist/.pikku/auth/index.js +1 -1
  92. package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
  93. package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
  94. package/dist/.pikku/channel/index.d.ts +1 -1
  95. package/dist/.pikku/channel/index.js +1 -1
  96. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  97. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  98. package/dist/.pikku/cli/index.d.ts +1 -1
  99. package/dist/.pikku/cli/index.js +1 -1
  100. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  101. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  102. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  103. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  104. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  105. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  106. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  107. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  108. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +7 -42
  109. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  110. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  111. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  112. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  113. package/dist/.pikku/error/index.d.ts +1 -1
  114. package/dist/.pikku/error/index.js +1 -1
  115. package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
  116. package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
  117. package/dist/.pikku/function/index.d.ts +1 -1
  118. package/dist/.pikku/function/index.js +1 -1
  119. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  120. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  121. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  122. package/dist/.pikku/function/pikku-functions-meta.gen.json +18 -18
  123. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  124. package/dist/.pikku/gateway/index.d.ts +1 -1
  125. package/dist/.pikku/gateway/index.js +1 -1
  126. package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
  127. package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
  128. package/dist/.pikku/http/index.d.ts +1 -1
  129. package/dist/.pikku/http/index.js +1 -1
  130. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  131. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  132. package/dist/.pikku/mcp/index.d.ts +1 -1
  133. package/dist/.pikku/mcp/index.js +1 -1
  134. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  135. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  136. package/dist/.pikku/middleware/index.d.ts +1 -1
  137. package/dist/.pikku/middleware/index.js +1 -1
  138. package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +2 -2
  139. package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
  140. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  141. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  142. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  143. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  144. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  145. package/dist/.pikku/queue/index.d.ts +1 -1
  146. package/dist/.pikku/queue/index.js +1 -1
  147. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  148. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  149. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  150. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  151. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  152. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  153. package/dist/.pikku/scenarios/index.d.ts +1 -1
  154. package/dist/.pikku/scenarios/index.js +1 -1
  155. package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
  156. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  157. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  158. package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
  159. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  160. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  161. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  162. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  163. package/dist/.pikku/scheduler/index.d.ts +1 -1
  164. package/dist/.pikku/scheduler/index.js +1 -1
  165. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  166. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  167. package/dist/.pikku/schemas/register.gen.js +1 -1
  168. package/dist/.pikku/scopes/index.d.ts +1 -1
  169. package/dist/.pikku/scopes/index.js +1 -1
  170. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  171. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  172. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  173. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  174. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  175. package/dist/.pikku/secrets/index.d.ts +1 -1
  176. package/dist/.pikku/secrets/index.js +1 -1
  177. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  178. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  179. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  180. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  181. package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
  182. package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
  183. package/dist/.pikku/setup/index.d.ts +1 -1
  184. package/dist/.pikku/setup/index.js +1 -1
  185. package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
  186. package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
  187. package/dist/.pikku/trigger/index.d.ts +1 -1
  188. package/dist/.pikku/trigger/index.js +1 -1
  189. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  190. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  191. package/dist/.pikku/variables/index.d.ts +1 -1
  192. package/dist/.pikku/variables/index.js +1 -1
  193. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  194. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  195. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  196. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  197. package/dist/.pikku/workflow/index.d.ts +1 -1
  198. package/dist/.pikku/workflow/index.js +1 -1
  199. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  200. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  201. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  202. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  203. package/dist/bin/pikku-bin.mjs +2 -2
  204. package/dist/src/cli.wiring.js +0 -42
  205. package/dist/src/deploy/bundler/bun-bundler.js +18 -2
  206. package/dist/src/fabric/functions/validate.function.js +24 -4
  207. package/dist/src/functions/commands/dev-agent-runner.js +48 -13
  208. package/dist/src/functions/commands/dev.js +1 -2
  209. package/dist/src/functions/commands/enable.js +11 -27
  210. package/dist/src/functions/commands/serve.js +1 -2
  211. package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.js +6 -6
  212. package/dist/src/functions/validate/shared-checks.js +1 -1
  213. package/dist/src/functions/wirings/agent/pikku-command-public-agent.js +1 -2
  214. package/dist/src/functions/wirings/agent/serialize-public-agent.d.ts +1 -1
  215. package/dist/src/functions/wirings/agent/serialize-public-agent.js +10 -11
  216. package/dist/src/functions/wirings/emails/pikku-command-emails.js +2 -2
  217. package/dist/src/functions/wirings/emails/serialize-emails.js +112 -42
  218. package/dist/src/functions/wirings/middleware/serialize-middleware-types.js +1 -1
  219. package/dist/src/functions/wirings/personas/serialize-personas-secrets.d.ts +5 -0
  220. package/dist/src/functions/wirings/personas/serialize-personas-secrets.js +6 -0
  221. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +1 -3
  222. package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +1 -1
  223. package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +3 -4
  224. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +1 -2
  225. package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
  226. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +3 -4
  227. package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.d.ts +4 -5
  228. package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +5 -6
  229. package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +5 -0
  230. package/dist/src/functions/wirings/scopes/serialize-scopes-client.d.ts +16 -0
  231. package/dist/src/functions/wirings/scopes/serialize-scopes-client.js +72 -0
  232. package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +1 -2
  233. package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.d.ts +1 -1
  234. package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +1 -8
  235. package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.js +1 -2
  236. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +1 -1
  237. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +1 -4
  238. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +1 -2
  239. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +1 -1
  240. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +8 -9
  241. package/dist/src/utils/pikku-cli-config.js +8 -4
  242. package/dist/src/utils/resolve-scaffold-feature.d.ts +7 -6
  243. package/dist/src/utils/resolve-scaffold-feature.js +11 -35
  244. package/dist/tsconfig.tsbuildinfo +1 -1
  245. package/package.json +8 -8
  246. package/surface.json +1 -1
  247. package/console-app/assets/architecture-TIHT7OUA-B1IpeRpl.js +0 -1
  248. package/console-app/assets/channel-sTJGzqn9.js +0 -1
  249. package/console-app/assets/chunk-XXDRQBXY-CLdTtHL4.js +0 -1
  250. package/console-app/assets/classDiagram-JCYQIIEL-Dh0wx8TK.js +0 -1
  251. package/console-app/assets/classDiagram-v2-OCEON4UE-Dh0wx8TK.js +0 -1
  252. package/console-app/assets/eventmodeling-45OFAUF4-C6PNVeIU.js +0 -1
  253. package/console-app/assets/flowDiagram-UKHOOZJN-CmURPvo2.js +0 -1
  254. package/console-app/assets/railroad-abnf-AHOZXSZD-D2QiLT8B.js +0 -1
  255. package/console-app/assets/railroad-ebnf-EBAXGLYW-CSMqj9L2.js +0 -1
  256. package/console-app/assets/railroad-peg-LSFZ7HO6-Cg1-F8im.js +0 -1
  257. package/console-app/assets/stateDiagram-v2-UEYNNEHI-DpnoMNHC.js +0 -1
  258. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-BmGtOaWo.js +0 -8
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * This file was generated by the @pikku/cli
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * This file was generated by the @pikku/cli
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  export { defineScope } from '@pikku/core/scope';
5
5
  export { defineSystemRole } from '@pikku/core/role';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  export { defineScope } from '@pikku/core/scope';
5
5
  export { defineSystemRole } from '@pikku/core/role';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * This file was generated by the @pikku/cli
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/secrets` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/secrets` resolves here.
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  export { defineSecret } from '@pikku/core/secret';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  export { defineSecret } from '@pikku/core/secret';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService } from '@pikku/core/services';
5
5
  import type { SecretService } from '@pikku/core/services';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService } from '@pikku/core/services';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { LocalMetaService } from '@pikku/core/services/local-meta';
5
5
  export declare class PikkuMetaService extends LocalMetaService {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { LocalMetaService } from '@pikku/core/services/local-meta';
5
5
  export class PikkuMetaService extends LocalMetaService {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/setup` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/setup` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Config and service factory definitions, declared once per application
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Config and service factory definitions, declared once per application
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/trigger` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/trigger` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/variables` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/variables` resolves here.
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  export { defineVariable } from '@pikku/core/variable';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  export { defineVariable } from '@pikku/core/variable';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
5
5
  import type { VariablesService } from '@pikku/core/services';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService, } from '@pikku/core/services';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/workflow` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  /**
5
5
  * Subpath entry — `#pikku/workflow` resolves here.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import type { PikkuWorkflowGraphConfig, PikkuWorkflowGraphResult } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { pikkuWorkflowGraph as corePikkuWorkflowGraph } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/state';
5
5
  import allWorkflowMeta from './meta/allWorkflow.gen.json' with { type: 'json' };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.107
2
+ * This file was generated by @pikku/cli@0.12.110
3
3
  */
4
4
  import { addWorkflow } from '@pikku/core/workflow';
5
5
  import './pikku-workflow-wirings-meta.gen.js';
@@ -11,8 +11,8 @@ async function checkForUpdate() {
11
11
  })
12
12
  if (!res.ok) return
13
13
  const { version: latest } = await res.json()
14
- if (latest !== '0.12.107') {
15
- process.stderr.write(`\n Update available 0.12.107 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
14
+ if (latest !== '0.12.110') {
15
+ process.stderr.write(`\n Update available 0.12.110 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
16
16
  }
17
17
  } catch {}
18
18
  }
@@ -681,72 +681,30 @@ wireCLI({
681
681
  rpc: pikkuCLICommand({
682
682
  func: enableRpc,
683
683
  description: 'Enable public RPC endpoint',
684
- options: {
685
- noAuth: {
686
- description: 'Disable auth requirement',
687
- default: false,
688
- },
689
- },
690
684
  }),
691
685
  console: pikkuCLICommand({
692
686
  func: enableConsole,
693
687
  description: 'Enable console functions',
694
- options: {
695
- noAuth: {
696
- description: 'Disable auth requirement',
697
- default: false,
698
- },
699
- },
700
688
  }),
701
689
  scenarios: pikkuCLICommand({
702
690
  func: enableScenarios,
703
691
  description: 'Enable scenario instrumentation functions',
704
- options: {
705
- noAuth: {
706
- description: 'Disable auth requirement',
707
- default: false,
708
- },
709
- },
710
692
  }),
711
693
  agent: pikkuCLICommand({
712
694
  func: enableAgent,
713
695
  description: 'Enable public agent endpoints',
714
- options: {
715
- noAuth: {
716
- description: 'Disable auth requirement',
717
- default: false,
718
- },
719
- },
720
696
  }),
721
697
  workflow: pikkuCLICommand({
722
698
  func: enableWorkflow,
723
699
  description: 'Enable workflow workers',
724
- options: {
725
- noAuth: {
726
- description: 'Disable auth requirement',
727
- default: false,
728
- },
729
- },
730
700
  }),
731
701
  events: pikkuCLICommand({
732
702
  func: enableEvents,
733
703
  description: 'Enable the realtime events channel + SSE stream (scaffolds events.gen.ts)',
734
- options: {
735
- noAuth: {
736
- description: 'Disable auth requirement',
737
- default: false,
738
- },
739
- },
740
704
  }),
741
705
  'remote-rpc': pikkuCLICommand({
742
706
  func: enableRemoteRpc,
743
707
  description: 'Enable the remote internal RPC queue worker + HTTP endpoint (scaffolds rpc-remote.gen.ts)',
744
- options: {
745
- noAuth: {
746
- description: 'Disable auth requirement',
747
- default: false,
748
- },
749
- },
750
708
  }),
751
709
  webhook: pikkuCLICommand({
752
710
  func: enableWebhook,
@@ -16,6 +16,7 @@ function getBun() {
16
16
  }
17
17
  return bun;
18
18
  }
19
+ const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
19
20
  const pkgHead = (spec) => spec.startsWith('@')
20
21
  ? spec.split('/').slice(0, 2).join('/')
21
22
  : spec.split('/')[0];
@@ -28,6 +29,13 @@ const pkgHead = (spec) => spec.startsWith('@')
28
29
  * - `externals`: keep external (node:*, cloudflare:*, declared npm deps) and
29
30
  * CAPTURE the real npm package names — Bun's metafile omits external
30
31
  * imports, so capture is how per-unit dependency extraction works.
32
+ *
33
+ * The `onResolve` filter is built from exactly those three lists, so the callback
34
+ * only ever runs on a specifier it rewrites. It must never fire and then return
35
+ * undefined to defer to Bun: a deferred bare specifier that resolves through a
36
+ * package.json `exports` subpath (`@pikku/core/workflow`) silently bundles as an
37
+ * empty module, and the worker dies at startup on `ReferenceError: X is not
38
+ * defined` for every binding it exported.
31
39
  */
32
40
  function createBunResolvePlugin(opts) {
33
41
  const { aliases, externals, stubPatterns, captured } = opts;
@@ -38,10 +46,18 @@ function createBunResolvePlugin(opts) {
38
46
  }
39
47
  return (s) => s === pat || s.startsWith(pat + '/');
40
48
  });
49
+ const filter = new RegExp([
50
+ ...Object.keys(aliases ?? {}).map((name) => `^${escapeRegExp(name)}$`),
51
+ ...stubPatterns.map((re) => re.source),
52
+ '^node:',
53
+ ...externals.map((pat) => pat.endsWith('*')
54
+ ? `^${escapeRegExp(pat.slice(0, -1))}`
55
+ : `^${escapeRegExp(pat)}($|\\/)`),
56
+ ].join('|'));
41
57
  return {
42
58
  name: 'pikku-bun-resolve',
43
59
  setup(build) {
44
- build.onResolve({ filter: /.*/ }, (args) => {
60
+ build.onResolve({ filter }, (args) => {
45
61
  let path = args.path;
46
62
  // Relative / absolute → let Bun resolve natively.
47
63
  if (path.startsWith('.') || path.startsWith('/'))
@@ -63,7 +79,7 @@ function createBunResolvePlugin(opts) {
63
79
  captured.add(pkgHead(path));
64
80
  return { path, external: true };
65
81
  }
66
- // Everything else Bun bundles it (resolving the .bun store natively).
82
+ // Unreachable: the filter above is built from these same three lists.
67
83
  return;
68
84
  });
69
85
  build.onLoad({ filter: /.*/, namespace: 'pikku-stub' }, () => ({
@@ -779,6 +779,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
779
779
  // was supposed to report the broken config. Shape-check the entries once here
780
780
  // and let the apps/ and type-check passes consume the narrowed list.
781
781
  const declaredFrontends = [];
782
+ let hasMantineFrontend = false;
782
783
  /** every syntactically valid cwd, including ones whose directory is missing */
783
784
  const declaredCwdList = [];
784
785
  const rawFrontends = fabricConfig?.frontends;
@@ -864,6 +865,9 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
864
865
  const isReactFrontend = !!(appAllDeps['@mantine/core'] ||
865
866
  appAllDeps['@pikku/mantine'] ||
866
867
  appAllDeps['react']);
868
+ if (appAllDeps['@mantine/core'] || appAllDeps['@pikku/mantine']) {
869
+ hasMantineFrontend = true;
870
+ }
867
871
  if (isReactFrontend) {
868
872
  const srcFiles = await listSourceFiles(join(appPath, 'src'));
869
873
  let usesMessages = false;
@@ -1059,9 +1063,12 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
1059
1063
  }
1060
1064
  // ── packages/theme + packages/components ──────────────────────────────
1061
1065
  const designDocUrl = 'https://pikkufabric.dev/docs/design';
1066
+ const designSeverity = hasMantineFrontend ? w : info;
1062
1067
  const themePkgDir = join(root, 'packages', 'mantine-theme');
1063
1068
  if (!existsSync(themePkgDir)) {
1064
- info('theme-missing', 'packages/mantine-theme/ not found — Fabric design features require a theme package', themePkgDir, `Create packages/mantine-theme/ with your Mantine theme tokens. See ${designDocUrl}`);
1069
+ designSeverity('theme-missing', hasMantineFrontend
1070
+ ? 'packages/mantine-theme/ not found — the Fabric console Design tab has no themes to list and reports "No themes yet"'
1071
+ : 'packages/mantine-theme/ not found — Fabric design features require a theme package', themePkgDir, `Create packages/mantine-theme/ with your Mantine theme tokens. See ${designDocUrl}`);
1065
1072
  }
1066
1073
  else {
1067
1074
  // The Fabric console's Design tab lists a theme only when it can read a
@@ -1085,7 +1092,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
1085
1092
  }
1086
1093
  }
1087
1094
  if (specIds.length === 0) {
1088
- info('theme-no-spec', 'packages/mantine-theme/ has no themes/<id>.json spec — the Fabric console Design tab reports "no theme set" (and cannot edit the theme) even if the app is branded via a hand-written createTheme()', themesDir, lines('Add a theme spec the console can read:', '1. Create packages/mantine-theme/themes/<id>.json (id is kebab-case), e.g.:', '{', ' "name": "My Brand",', ' "brand": { "colors": { "primary": "#4f46e5" }, "fonts": { "body": "Inter" } },', ' "structure": { "defaultRadius": "md", "defaultColorScheme": "light" }', '}', '2. Create packages/mantine-theme/active.json: { "id": "<id>" }', '3. Build the Mantine theme from the active spec in index.ts.', `See ${designDocUrl}`));
1095
+ designSeverity('theme-no-spec', 'packages/mantine-theme/ has no themes/<id>.json spec — the Fabric console Design tab reports "no theme set" (and cannot edit the theme) even if the app is branded via a hand-written createTheme()', themesDir, lines('Add a theme spec the console can read:', '1. Create packages/mantine-theme/themes/<id>.json (id is kebab-case), e.g.:', '{', ' "name": "My Brand",', ' "brand": { "colors": { "primary": "#4f46e5" }, "fonts": { "body": "Inter" } },', ' "structure": { "defaultRadius": "md", "defaultColorScheme": "light" }', '}', '2. Create packages/mantine-theme/active.json: { "id": "<id>" }', '3. Build the Mantine theme from the active spec in index.ts.', `See ${designDocUrl}`));
1089
1096
  }
1090
1097
  else {
1091
1098
  // A spec exists — active.json must point at one, else the console has no
@@ -1102,8 +1109,21 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
1102
1109
  }
1103
1110
  }
1104
1111
  }
1105
- if (!existsSync(join(root, 'packages', 'components'))) {
1106
- info('components-missing', 'packages/components/ not found — Fabric design features require a components package', join(root, 'packages', 'components'), `Create packages/components/ with your shared UI components. See ${designDocUrl}`);
1112
+ // The design server globs stories from apps/*/src/components, not packages/components.
1113
+ const storyFiles = [];
1114
+ let hasComponentKit = false;
1115
+ for (const name of existsSync(appsDir) ? await readdir(appsDir) : []) {
1116
+ const kitDir = join(appsDir, name, 'src', 'components');
1117
+ if (!existsSync(kitDir))
1118
+ continue;
1119
+ hasComponentKit = true;
1120
+ for (const file of await listSourceFiles(kitDir)) {
1121
+ if (file.endsWith('.stories.tsx'))
1122
+ storyFiles.push(file);
1123
+ }
1124
+ }
1125
+ if (hasComponentKit && storyFiles.length === 0) {
1126
+ designSeverity('design-no-stories', "no apps/*/src/components/**/*.stories.tsx found — the Fabric console Design tab's Library and App lenses have nothing to show", join(appsDir, '*', 'src', 'components'), lines('Add a story beside a component. The Library lens reads <Name>.stories.tsx', '(each named export is a visual variant); the App lens reads', '<Name>.app.stories.tsx (each named export is one data state of the query', 'or mutation the page drives it with). A minimal Library story:', '', " import type { Story, StoryMeta } from './csf.types'", " import { Wordmark } from './Wordmark'", '', ' export default {', " title: 'Wordmark',", ' component: Wordmark,', ' } satisfies StoryMeta', '', " export const Default: Story = { args: { name: 'Acme' } }", `See ${designDocUrl}`));
1107
1127
  }
1108
1128
  // ── frontend type-check (what the build container actually runs) ───────
1109
1129
  // Every check above is a heuristic standing in for this compile. The build
@@ -54,26 +54,61 @@ export async function createDevAgentRunner({ logger, projectRoot, variables, })
54
54
  // copy of `@ai-sdk/provider` handed to a runner built against another is the
55
55
  // one combination that fails at call time rather than at load time, with an
56
56
  // error about the model spec that names neither package.
57
+ const PAIR = ['@pikku/ai-vercel', '@ai-sdk/openai-compatible'];
58
+ // `projectRoot` is the root package.json, and under an isolated node_modules
59
+ // layout (bun, pnpm) that resolves only what the *root* declares — a monorepo
60
+ // that installed the pair in the workspace using it still misses here. Say so
61
+ // rather than silently swapping in our own copies: the failure that follows
62
+ // names neither package, so the log line is the only thing connecting it back.
63
+ const resolveFromProject = (name) => {
64
+ try {
65
+ return pathToFileURL(fromProject.resolve(name)).href;
66
+ }
67
+ catch {
68
+ return undefined;
69
+ }
70
+ };
57
71
  const loadPair = async () => {
58
- const project = ['@pikku/ai-vercel', '@ai-sdk/openai-compatible'].map((name) => {
59
- try {
60
- return pathToFileURL(fromProject.resolve(name)).href;
61
- }
62
- catch {
63
- return undefined;
64
- }
65
- });
66
- const [runner, provider] = project.every(Boolean)
67
- ? project
68
- : ['@pikku/ai-vercel', '@ai-sdk/openai-compatible'];
69
- return Promise.all([import(runner), import(provider)]);
72
+ const project = PAIR.map(resolveFromProject);
73
+ const complete = project.every(Boolean);
74
+ if (!complete && project.some(Boolean)) {
75
+ const missing = PAIR.filter((_, index) => !project[index]);
76
+ logger.warn(`pikku dev: ${missing.join(' and ')} could not be resolved from ${join(projectRoot, 'package.json')}, so the CLI's own AI SDK copies are being used for all of ${PAIR.join(' and ')}. In a monorepo with an isolated node_modules layout, declare them at the root.`);
77
+ }
78
+ const [runner, provider] = complete ? project : PAIR;
79
+ return Promise.all([import(runner), import(provider)]).then((modules) => [...modules, complete ? project : undefined]);
80
+ };
81
+ // The runner and the provider each hold their own `@ai-sdk/provider`. When the
82
+ // majors differ the provider builds a model whose `specificationVersion` the
83
+ // runner's `ai` refuses, and the throw arrives at the first model call reading
84
+ // `Unsupported model version …` — naming the model and the gateway, but not
85
+ // the two packages that actually disagree. Check it here instead, where both
86
+ // paths are in hand.
87
+ const providerSpecVersion = (from) => {
88
+ if (!from) {
89
+ return undefined;
90
+ }
91
+ try {
92
+ return createRequire(from)('@ai-sdk/provider/package.json')
93
+ .version;
94
+ }
95
+ catch {
96
+ return undefined;
97
+ }
70
98
  };
71
99
  let VercelAgentRunner;
72
100
  let createOpenAICompatible;
73
101
  try {
74
- const [runnerModule, providerModule] = await loadPair();
102
+ const [runnerModule, providerModule, resolved] = await loadPair();
75
103
  ({ VercelAgentRunner } = runnerModule);
76
104
  ({ createOpenAICompatible } = providerModule);
105
+ const [runnerSpec, providerSpec] = (resolved ?? []).map(providerSpecVersion);
106
+ if (runnerSpec &&
107
+ providerSpec &&
108
+ runnerSpec.split('.')[0] !== providerSpec.split('.')[0]) {
109
+ logger.error(`pikku dev: AI agents disabled — @pikku/ai-vercel resolves @ai-sdk/provider@${runnerSpec} but @ai-sdk/openai-compatible resolves @ai-sdk/provider@${providerSpec}. Those majors are incompatible: the provider builds models the runner's \`ai\` refuses. @ai-sdk/openai-compatible publishes one line per major of \`ai\` (npm dist-tags ai-v5/ai-v6/latest) — install the line matching the \`ai\` your @pikku/ai-vercel peer-depends on.`);
110
+ return undefined;
111
+ }
77
112
  }
78
113
  catch (error) {
79
114
  logger.warn(`pikku dev: AI provider env is set but the AI SDK packages could not be loaded — AI agents disabled: ${error instanceof Error ? error.message : String(error)}`);
@@ -22,7 +22,6 @@ import { createDevAgentRunner } from './dev-agent-runner.js';
22
22
  import { resolveConsoleMount } from './serve-console.js';
23
23
  import { serverReadyLine } from '../../server/server-ready.js';
24
24
  import { createEphemeralContentSigningJWT } from '../../server/content-signing-jwt.js';
25
- import { resolveScaffoldFeature } from '../../utils/resolve-scaffold-feature.js';
26
25
  import { applyModelAliasOverride } from '../../utils/model-alias-override.js';
27
26
  export const dev = pikkuSessionlessFunc({
28
27
  remote: true,
@@ -135,7 +134,7 @@ export const dev = pikkuSessionlessFunc({
135
134
  // project — an app bootstrap is what a deployed bundle imports, and coverage
136
135
  // endpoints have no business in one.
137
136
  if (config.scaffold?.scenarios) {
138
- registerScenarioInstrumentation(resolveScaffoldFeature('scenarios', config.scaffold.scenarios).auth);
137
+ registerScenarioInstrumentation();
139
138
  }
140
139
  const configModule = await loadUserModule(pikkuConfigFactory.file);
141
140
  const servicesModule = await loadUserModule(singletonServicesFactory.file);
@@ -1,14 +1,7 @@
1
1
  import { readFile, writeFile } from 'fs/promises';
2
2
  import { join } from 'path';
3
3
  import { pikkuVoidFunc } from '#pikku/function';
4
- /**
5
- * Remote RPC workers carry no auth dimension — `serialize-remote-rpc.ts`
6
- * hardcodes `auth: false` on what it generates — so enabling it writes a bare
7
- * `true` and there is nothing to opt out of.
8
- */
9
- const NO_AUTH_DIMENSION = new Set(['remoteRpc']);
10
- async function enableFeature(feature, logger, config, data) {
11
- const noAuth = data?.noAuth ?? false;
4
+ async function enableFeature(feature, logger, config) {
12
5
  const configPath = join(config.configDir, 'pikku.config.json');
13
6
  const raw = await readFile(configPath, 'utf-8');
14
7
  const json = JSON.parse(raw);
@@ -18,41 +11,32 @@ async function enableFeature(feature, logger, config, data) {
18
11
  if (!json.scaffold.pikkuDir) {
19
12
  json.scaffold.pikkuDir = 'pikku';
20
13
  }
21
- // `true` is enabled AND authenticated. Only an explicit --no-auth writes the
22
- // object form, so a feature can never be turned on public by accident.
23
- //
24
- // The console is an admin surface — every RPC requires a session, so
25
- // --no-auth is ignored for it.
26
- const wantsPublic = noAuth &&
27
- feature !== 'console' &&
28
- !NO_AUTH_DIMENSION.has(feature);
29
- const value = feature === 'webhook' ? true : wantsPublic ? { auth: false } : true;
14
+ const value = true;
30
15
  json.scaffold[feature] = value;
31
16
  await writeFile(configPath, JSON.stringify(json, null, 2) + '\n', 'utf-8');
32
- logger.info(`Enabled scaffold.${feature} = ${JSON.stringify(value)} in ${configPath}` +
33
- (wantsPublic ? ' (public — no session required)' : ''));
17
+ logger.info(`Enabled scaffold.${feature} = ${JSON.stringify(value)} in ${configPath}`);
34
18
  }
35
19
  export const enableRpc = pikkuVoidFunc({
36
- func: async ({ logger, config }, data) => enableFeature('rpc', logger, config, data),
20
+ func: async ({ logger, config }) => enableFeature('rpc', logger, config),
37
21
  });
38
22
  export const enableConsole = pikkuVoidFunc({
39
- func: async ({ logger, config }, data) => enableFeature('console', logger, config, data),
23
+ func: async ({ logger, config }) => enableFeature('console', logger, config),
40
24
  });
41
25
  export const enableScenarios = pikkuVoidFunc({
42
- func: async ({ logger, config }, data) => enableFeature('scenarios', logger, config, data),
26
+ func: async ({ logger, config }) => enableFeature('scenarios', logger, config),
43
27
  });
44
28
  export const enableAgent = pikkuVoidFunc({
45
- func: async ({ logger, config }, data) => enableFeature('agent', logger, config, data),
29
+ func: async ({ logger, config }) => enableFeature('agent', logger, config),
46
30
  });
47
31
  export const enableWorkflow = pikkuVoidFunc({
48
- func: async ({ logger, config }, data) => enableFeature('workflow', logger, config, data),
32
+ func: async ({ logger, config }) => enableFeature('workflow', logger, config),
49
33
  });
50
34
  export const enableEvents = pikkuVoidFunc({
51
- func: async ({ logger, config }, data) => enableFeature('events', logger, config, data),
35
+ func: async ({ logger, config }) => enableFeature('events', logger, config),
52
36
  });
53
37
  export const enableRemoteRpc = pikkuVoidFunc({
54
- func: async ({ logger, config }, data) => enableFeature('remoteRpc', logger, config, data),
38
+ func: async ({ logger, config }) => enableFeature('remoteRpc', logger, config),
55
39
  });
56
40
  export const enableWebhook = pikkuVoidFunc({
57
- func: async ({ logger, config }, data) => enableFeature('webhook', logger, config, data),
41
+ func: async ({ logger, config }) => enableFeature('webhook', logger, config),
58
42
  });