@pikku/cli 0.12.100 → 0.12.103

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 (259) hide show
  1. package/console-app/assets/{abnfDiagram-VRR7QNED-Icjp9hnB.js → abnfDiagram-VRR7QNED-BLi9JHGg.js} +1 -1
  2. package/console-app/assets/{arc-BfGls--L.js → arc-B3b5uYlL.js} +1 -1
  3. package/console-app/assets/architecture-TIHT7OUA-BYeDayHv.js +1 -0
  4. package/console-app/assets/{architectureDiagram-ZJ3FMSHR-CpnsLBns.js → architectureDiagram-ZJ3FMSHR-Dkd8kxIa.js} +1 -1
  5. package/console-app/assets/{blockDiagram-677ZJIJ3-ByKRMGSr.js → blockDiagram-677ZJIJ3-DnH0nNlb.js} +1 -1
  6. package/console-app/assets/{c4Diagram-LMCZKHZV-CzJSbsUo.js → c4Diagram-LMCZKHZV-BlelCS5i.js} +1 -1
  7. package/console-app/assets/channel-CTa6nggO.js +1 -0
  8. package/console-app/assets/{chunk-32BRIVSS-D_tc4HCY.js → chunk-32BRIVSS-D7tMgtT1.js} +1 -1
  9. package/console-app/assets/{chunk-52WLFC77-wkQkuUXG.js → chunk-52WLFC77-CRepS35y.js} +1 -1
  10. package/console-app/assets/{chunk-C7G6YPKG-BFW3xG3R.js → chunk-C7G6YPKG-CUldlJz4.js} +1 -1
  11. package/console-app/assets/{chunk-EX3LRPZG-Car090Sw.js → chunk-EX3LRPZG-DODbrqEj.js} +1 -1
  12. package/console-app/assets/{chunk-FWX5IMBZ-c2ud9kQ-.js → chunk-FWX5IMBZ-nZa59wGD.js} +2 -2
  13. package/console-app/assets/{chunk-HOUHSVGY-RYmQka5R.js → chunk-HOUHSVGY-BaawVZCa.js} +1 -1
  14. package/console-app/assets/{chunk-ICXQ74PX-C-dqYC_9.js → chunk-ICXQ74PX-C86LrIRs.js} +1 -1
  15. package/console-app/assets/{chunk-MOJQB5TN-Cu3FUWwl.js → chunk-MOJQB5TN-ovUDQlyW.js} +1 -1
  16. package/console-app/assets/{chunk-OGEWGWER-Z7f1yArD.js → chunk-OGEWGWER-ByZKAcGu.js} +1 -1
  17. package/console-app/assets/{chunk-PUDLZKDR-Bp68DuRj.js → chunk-PUDLZKDR-DdeJN3wJ.js} +1 -1
  18. package/console-app/assets/{chunk-Q4XR5HBZ-CdKSYWZ4.js → chunk-Q4XR5HBZ-Blp5W9-b.js} +1 -1
  19. package/console-app/assets/{chunk-RYQCIY6F-9ISCAKm2.js → chunk-RYQCIY6F-DehwjyPp.js} +1 -1
  20. package/console-app/assets/{chunk-V7JOEXUC-2EOc1nQB.js → chunk-V7JOEXUC-Ca1xeVdo.js} +1 -1
  21. package/console-app/assets/chunk-VAUOI2AC-BCngaLxk.js +1 -0
  22. package/console-app/assets/{chunk-VR4S4FIN-BPvN0PUm.js → chunk-VR4S4FIN-Cj7ZlsLr.js} +1 -1
  23. package/console-app/assets/{chunk-WYO6CB5R-DOpurCTP.js → chunk-WYO6CB5R-CsdBQ1HS.js} +1 -1
  24. package/console-app/assets/chunk-XXDRQBXY-CGIlOoBU.js +1 -0
  25. package/console-app/assets/{chunk-ZGVPDNZ5-Bu2weVOL.js → chunk-ZGVPDNZ5-DMnFdLEO.js} +1 -1
  26. package/console-app/assets/classDiagram-OUVF2IWQ-Bwt1ZVOR.js +1 -0
  27. package/console-app/assets/classDiagram-v2-EOCWNBFH-Bwt1ZVOR.js +1 -0
  28. package/console-app/assets/{cose-bilkent-JH36ORCC-nau-QGCX.js → cose-bilkent-JH36ORCC-CiYBhiBv.js} +1 -1
  29. package/console-app/assets/{cynefin-VYW2F7L2-BBw-E7lg.js → cynefin-VYW2F7L2-BXuNC8qm.js} +1 -1
  30. package/console-app/assets/{cynefinDiagram-TSTJHNR4-BvnMvOvH.js → cynefinDiagram-TSTJHNR4-Ck53b-Nr.js} +1 -1
  31. package/console-app/assets/{dagre-VKFMJZFB-CHEqPR29.js → dagre-VKFMJZFB-C9hZCnOv.js} +1 -1
  32. package/console-app/assets/{diagram-FQU43EPY-JijKRWyb.js → diagram-FQU43EPY-DuEKSLPE.js} +1 -1
  33. package/console-app/assets/{diagram-G47NLZAW-G5UsB31f.js → diagram-G47NLZAW-B_yO-zKt.js} +1 -1
  34. package/console-app/assets/{diagram-NH7WQ7WH-BhuJ6fPu.js → diagram-NH7WQ7WH-CtKFjoB4.js} +1 -1
  35. package/console-app/assets/{diagram-OA4YK3LP-DaUF-8N4.js → diagram-OA4YK3LP-T9eIYXYs.js} +1 -1
  36. package/console-app/assets/{diagram-WEI45ONY-wLsJIhoM.js → diagram-WEI45ONY-BTgu-I69.js} +1 -1
  37. package/console-app/assets/{dist-fbBkbDNG.js → dist-DSVj7qxi.js} +1 -1
  38. package/console-app/assets/{ebnfDiagram-CCIWWBDH-BZCEa3Dz.js → ebnfDiagram-CCIWWBDH-BdyNRX2k.js} +1 -1
  39. package/console-app/assets/{erDiagram-Q63AITRT-4XoEUtEh.js → erDiagram-Q63AITRT-B0cr0nxe.js} +1 -1
  40. package/console-app/assets/eventmodeling-45OFAUF4-BeHdsPzc.js +1 -0
  41. package/console-app/assets/flowDiagram-23GEKE2U-6N6mIkfB.js +1 -0
  42. package/console-app/assets/{ganttDiagram-NO4QXBWP-BXU7pfq6.js → ganttDiagram-NO4QXBWP-Cr1R_nGh.js} +1 -1
  43. package/console-app/assets/{gitGraph-TEB2WS4Q-BdMAmvpU.js → gitGraph-TEB2WS4Q-zcmQoWd4.js} +1 -1
  44. package/console-app/assets/{gitGraphDiagram-IHSO6WYX-3Hn0zwZR.js → gitGraphDiagram-IHSO6WYX-CHB9Fnch.js} +1 -1
  45. package/console-app/assets/{index-Din2vBeb.js → index-BbIUXgNl.js} +150 -150
  46. package/console-app/assets/{index-BXMjqLQ5.css → index-C9U-Zyvx.css} +1 -1
  47. package/console-app/assets/{info-DKCQHKI2-Dc_oQkp5.js → info-DKCQHKI2-BGPZGp_E.js} +1 -1
  48. package/console-app/assets/{infoDiagram-FWYZ7A6U-B3v4xCUn.js → infoDiagram-FWYZ7A6U-Br_p6SR_.js} +1 -1
  49. package/console-app/assets/{ishikawaDiagram-FXEZZL3T-DzWq9Vtp.js → ishikawaDiagram-FXEZZL3T-Ma2d4IuN.js} +1 -1
  50. package/console-app/assets/{journeyDiagram-5HDEW3XC-C0buWi_a.js → journeyDiagram-5HDEW3XC-LdCblEX2.js} +1 -1
  51. package/console-app/assets/{kanban-definition-HUTT4EX6-DRAN9HhV.js → kanban-definition-HUTT4EX6-CRWetzV4.js} +1 -1
  52. package/console-app/assets/{line-UqgRNiAC.js → line-DrceqMYY.js} +1 -1
  53. package/console-app/assets/{linear-FTAGuk_3.js → linear-acWbtwAj.js} +1 -1
  54. package/console-app/assets/{mermaid-parser.core-DIHI27FL.js → mermaid-parser.core-n773Jf0G.js} +3 -3
  55. package/console-app/assets/{mermaid.core-D4q8kvcu.js → mermaid.core-DyTRkSqH.js} +3 -3
  56. package/console-app/assets/{mindmap-definition-LN4V7U3C-DN-_CNLb.js → mindmap-definition-LN4V7U3C-CBU-ehFU.js} +1 -1
  57. package/console-app/assets/{packet-7NZHBO7P-8a3PoQAb.js → packet-7NZHBO7P-DL_fgdX1.js} +1 -1
  58. package/console-app/assets/{pegDiagram-2B236MQR-Bh2MhzCN.js → pegDiagram-2B236MQR-CrFaAHHj.js} +1 -1
  59. package/console-app/assets/{pie-RZYD4A2V-Bi6zbJDl.js → pie-RZYD4A2V-STtzW8Tz.js} +1 -1
  60. package/console-app/assets/{pieDiagram-ENE6RG2P-D2Z0W5UU.js → pieDiagram-ENE6RG2P-DsUOr1Ud.js} +1 -1
  61. package/console-app/assets/{quadrantDiagram-ABIIQ3AL-DNOKka0p.js → quadrantDiagram-ABIIQ3AL-DmuSe_qW.js} +1 -1
  62. package/console-app/assets/{radar-I7S5WNFK-CAxa68Sg.js → radar-I7S5WNFK-L8w2lEOb.js} +1 -1
  63. package/console-app/assets/{railroad-3IZDKUUU-CZb1usP7.js → railroad-3IZDKUUU-CxqlE5vc.js} +1 -1
  64. package/console-app/assets/railroad-abnf-AHOZXSZD-CkJOR_Em.js +1 -0
  65. package/console-app/assets/railroad-ebnf-EBAXGLYW-BH_pRGgm.js +1 -0
  66. package/console-app/assets/railroad-peg-LSFZ7HO6-B50bKcii.js +1 -0
  67. package/console-app/assets/{railroadDiagram-RFXS5EU6-B1K2hbTD.js → railroadDiagram-RFXS5EU6-CJ8Lpbeo.js} +1 -1
  68. package/console-app/assets/{requirementDiagram-TGXJPOKE-K8wcOO0Q.js → requirementDiagram-TGXJPOKE-8OXQXUud.js} +1 -1
  69. package/console-app/assets/{sankeyDiagram-HTMAVEWB-WBPBkgNx.js → sankeyDiagram-HTMAVEWB-Bezd2CqZ.js} +1 -1
  70. package/console-app/assets/{sequenceDiagram-DBY2YBRQ-Dz80qZZv.js → sequenceDiagram-DBY2YBRQ-DHb5js3D.js} +1 -1
  71. package/console-app/assets/{src-CnJCXDL0.js → src-DfFamOl-.js} +1 -1
  72. package/console-app/assets/{stateDiagram-2N3HPSRC-DMur7lZf.js → stateDiagram-2N3HPSRC-UpyJm2mi.js} +1 -1
  73. package/console-app/assets/stateDiagram-v2-6OUMAXLB-C6gAfg82.js +1 -0
  74. package/console-app/assets/{swimlanes-5IMT3BWC-BlLdYcPU.js → swimlanes-5IMT3BWC-yUrV5f4O.js} +1 -1
  75. package/console-app/assets/swimlanesDiagram-G3AALYLV-Ch2_j5W5.js +8 -0
  76. package/console-app/assets/{timeline-definition-FHXFAJF6-CBOit0JY.js → timeline-definition-FHXFAJF6-B6w-rZeZ.js} +1 -1
  77. package/console-app/assets/{treeView-QDETBFTQ-DM1i1ast.js → treeView-QDETBFTQ-0k2QpnXc.js} +1 -1
  78. package/console-app/assets/{treemap-6X3UGDF4-ACrBEfY6.js → treemap-6X3UGDF4-ByCuDcGA.js} +1 -1
  79. package/console-app/assets/{vennDiagram-L72KCM5P-BmeFWb5N.js → vennDiagram-L72KCM5P-BH4374lw.js} +1 -1
  80. package/console-app/assets/{wardley-OPB4EBWU-BpIbeh58.js → wardley-OPB4EBWU-DNVwuJz6.js} +1 -1
  81. package/console-app/assets/{wardleyDiagram-EHGQE667-CxL7Mv7y.js → wardleyDiagram-EHGQE667-EXnQ6lkx.js} +1 -1
  82. package/console-app/assets/{xychartDiagram-FW5EYKEG-DkV75xT2.js → xychartDiagram-FW5EYKEG-rFh-UdgH.js} +1 -1
  83. package/console-app/index.html +10 -3
  84. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -2
  85. package/dist/.pikku/agent/pikku-agent-types.gen.js +3 -0
  86. package/dist/.pikku/agent/pikku-model-aliases.gen.d.ts +1 -0
  87. package/dist/.pikku/agent/pikku-model-aliases.gen.js +5 -0
  88. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  89. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  90. package/dist/.pikku/cli/pikku-cli-channel.js +13 -8
  91. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  92. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  93. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  94. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  95. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  96. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  97. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  98. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +18 -12
  99. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  100. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  101. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  102. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  103. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  104. package/dist/.pikku/function/pikku-function-types.gen.d.ts +6 -25
  105. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  106. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  107. package/dist/.pikku/function/pikku-functions-meta.gen.json +51 -27
  108. package/dist/.pikku/function/pikku-functions.gen.js +3 -1
  109. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  110. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  111. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  112. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  113. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  114. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  115. package/dist/.pikku/pikku-bootstrap.gen.d.ts +2 -1
  116. package/dist/.pikku/pikku-bootstrap.gen.js +2 -1
  117. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  118. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  119. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  120. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  121. package/dist/.pikku/pikku-types.gen.js +1 -1
  122. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  123. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  124. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  125. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  126. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  127. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  128. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -1
  129. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  130. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  131. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  132. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  133. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  134. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  135. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  136. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  137. package/dist/.pikku/schemas/register.gen.js +7 -5
  138. package/dist/.pikku/schemas/schemas/DevInput.schema.json +1 -1
  139. package/dist/.pikku/schemas/schemas/PikkuAIScorerOutput.schema.json +1 -0
  140. package/dist/.pikku/schemas/schemas/ServeInput.schema.json +1 -1
  141. package/dist/.pikku/schemas/schemas/ValidateOutput.schema.json +1 -0
  142. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  143. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  144. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  145. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  146. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  147. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  148. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  149. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  150. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  151. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  152. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  153. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  154. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  155. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  156. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  157. package/dist/.pikku/workflow/meta/allWorkflow.gen.json +8 -2
  158. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +2 -1
  159. package/dist/.pikku/workflow/pikku-personas.gen.js +1 -1
  160. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +11 -18
  161. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  162. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  163. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  164. package/dist/bin/pikku-bin.mjs +2 -2
  165. package/dist/src/cli.wiring.js +20 -11
  166. package/dist/src/deploy/analyzer/analyzer.js +44 -0
  167. package/dist/src/deploy/analyzer/manifest.d.ts +37 -0
  168. package/dist/src/fabric/functions/smoke.function.js +7 -4
  169. package/dist/src/fabric/functions/validate.function.js +3 -1
  170. package/dist/src/functions/commands/db-export.js +1 -1
  171. package/dist/src/functions/commands/db-shared.d.ts +0 -14
  172. package/dist/src/functions/commands/dev.d.ts +3 -0
  173. package/dist/src/functions/commands/dev.js +41 -2
  174. package/dist/src/functions/commands/knowledge-index.d.ts +3 -3
  175. package/dist/src/functions/commands/new-addon.js +6 -3
  176. package/dist/src/functions/commands/scenario-browser.d.ts +25 -2
  177. package/dist/src/functions/commands/scenario-browser.js +5 -1
  178. package/dist/src/functions/commands/scenario-formatter.d.ts +1 -1
  179. package/dist/src/functions/commands/scenario-ladder.d.ts +1 -1
  180. package/dist/src/functions/commands/scenario-ladder.js +1 -1
  181. package/dist/src/functions/commands/scenario-plan.d.ts +2 -1
  182. package/dist/src/functions/commands/scenario-plan.js +1 -1
  183. package/dist/src/functions/commands/scenario.d.ts +7 -1
  184. package/dist/src/functions/commands/scenario.js +28 -7
  185. package/dist/src/functions/commands/serve.d.ts +3 -0
  186. package/dist/src/functions/commands/serve.js +15 -1
  187. package/dist/src/functions/commands/{workspace-validate.d.ts → validate.d.ts} +18 -3
  188. package/dist/src/functions/commands/validate.js +9 -0
  189. package/dist/src/functions/db/local-db.d.ts +2 -1
  190. package/dist/src/functions/db/local-db.js +2 -2
  191. package/dist/src/functions/surface/collect-surface.d.ts +14 -0
  192. package/dist/src/functions/surface/collect-surface.js +215 -0
  193. package/dist/src/functions/validate/addon-package-checks.d.ts +26 -0
  194. package/dist/src/functions/validate/addon-package-checks.js +258 -0
  195. package/dist/src/functions/validate/persona-checks.d.ts +1 -1
  196. package/dist/src/functions/validate/persona-checks.js +1 -1
  197. package/dist/src/functions/validate/scenario-file-checks.js +33 -0
  198. package/dist/src/functions/validate/shared-checks.d.ts +1 -1
  199. package/dist/src/functions/validate/shared-checks.js +1 -1
  200. package/dist/src/functions/validate/type-identity-checks.d.ts +25 -0
  201. package/dist/src/functions/validate/type-identity-checks.js +218 -0
  202. package/dist/src/functions/validate/validate-registry.d.ts +52 -0
  203. package/dist/src/functions/validate/validate-registry.js +111 -0
  204. package/dist/src/functions/validate/validate.d.ts +47 -0
  205. package/dist/src/functions/validate/{workspace-validate.js → validate.js} +46 -12
  206. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +3 -2
  207. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +5 -1
  208. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
  209. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +15 -2
  210. package/dist/src/functions/wirings/ai-agent/serialize-model-aliases.d.ts +5 -0
  211. package/dist/src/functions/wirings/ai-agent/serialize-model-aliases.js +12 -0
  212. package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +1 -0
  213. package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.js +51 -0
  214. package/dist/src/functions/wirings/ai-scorer/serialize-scorer-names.d.ts +10 -0
  215. package/dist/src/functions/wirings/ai-scorer/serialize-scorer-names.js +17 -0
  216. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +27 -10
  217. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +9 -4
  218. package/dist/src/functions/wirings/console/serialize-console-functions.js +9 -56
  219. package/dist/src/functions/wirings/functions/serialize-function-types.js +7 -30
  220. package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +5 -1
  221. package/dist/src/functions/wirings/package/pikku-command-package.js +12 -1
  222. package/dist/src/functions/wirings/package/serialize-package.d.ts +1 -1
  223. package/dist/src/functions/wirings/package/serialize-package.js +5 -2
  224. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +1 -6
  225. package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +30 -0
  226. package/dist/src/functions/wirings/scenarios/serialize-feature-meta.d.ts +1 -1
  227. package/dist/src/functions/wirings/scenarios/serialize-scenario-registration.js +6 -5
  228. package/dist/src/functions/wirings/workflow/serialize-personas.js +2 -5
  229. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +12 -4
  230. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +10 -17
  231. package/dist/src/functions/workflows/all.workflow.js +11 -1
  232. package/dist/src/server/bun-server-runner.js +3 -0
  233. package/dist/src/server/dev-server-runner.interface.d.ts +10 -0
  234. package/dist/src/server/node-server-runner.js +3 -0
  235. package/dist/src/services.js +1 -0
  236. package/dist/src/utils/meta-diff.d.ts +1 -1
  237. package/dist/src/utils/meta-diff.js +2 -0
  238. package/dist/src/utils/model-alias-override.d.ts +7 -0
  239. package/dist/src/utils/model-alias-override.js +33 -0
  240. package/dist/src/utils/pikku-cli-config.js +16 -0
  241. package/dist/tsconfig.tsbuildinfo +1 -1
  242. package/package.json +17 -17
  243. package/console-app/assets/architecture-TIHT7OUA-C8l7I5Lm.js +0 -1
  244. package/console-app/assets/channel-BgJ-Z0cx.js +0 -1
  245. package/console-app/assets/chunk-VAUOI2AC-DwKsbf70.js +0 -1
  246. package/console-app/assets/chunk-XXDRQBXY-RuYSFsQb.js +0 -1
  247. package/console-app/assets/classDiagram-OUVF2IWQ-ohoLCI8g.js +0 -1
  248. package/console-app/assets/classDiagram-v2-EOCWNBFH-ohoLCI8g.js +0 -1
  249. package/console-app/assets/eventmodeling-45OFAUF4-DZ7z4YJO.js +0 -1
  250. package/console-app/assets/flowDiagram-23GEKE2U-rd7-NwZT.js +0 -1
  251. package/console-app/assets/railroad-abnf-AHOZXSZD-DkQZciri.js +0 -1
  252. package/console-app/assets/railroad-ebnf-EBAXGLYW-CPBeASA9.js +0 -1
  253. package/console-app/assets/railroad-peg-LSFZ7HO6-CXEVIZ0g.js +0 -1
  254. package/console-app/assets/stateDiagram-v2-6OUMAXLB-BDgLCrot.js +0 -1
  255. package/console-app/assets/swimlanesDiagram-G3AALYLV-CZ5rQIcE.js +0 -8
  256. package/dist/.pikku/schemas/schemas/WorkspaceValidateOutput.schema.json +0 -1
  257. package/dist/src/functions/commands/workspace-validate.js +0 -9
  258. package/dist/src/functions/validate/workspace-validate.d.ts +0 -33
  259. /package/dist/.pikku/schemas/schemas/{WorkspaceValidateInput.schema.json → ValidateInput.schema.json} +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.100
2
+ * This file was generated by @pikku/cli@0.12.103
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.100
2
+ * This file was generated by @pikku/cli@0.12.103
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.100
2
+ * This file was generated by @pikku/cli@0.12.103
3
3
  */
4
4
  export { defineVariable } from '@pikku/core/variable';
5
5
  export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.100
2
+ * This file was generated by @pikku/cli@0.12.103
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.100
2
+ * This file was generated by @pikku/cli@0.12.103
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.100
2
+ * This file was generated by @pikku/cli@0.12.103
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
5
5
  import variablesMeta from './pikku-variables-meta.gen.json' with { type: 'json' };
@@ -231,9 +231,15 @@
231
231
  "AI agent": {
232
232
  "nodeId": "AI agent",
233
233
  "rpcName": "pikkuAIAgent",
234
- "next": "Public agent scaffold",
234
+ "next": "AI scorer",
235
235
  "stepHash": "b40cd11dc611"
236
236
  },
237
+ "AI scorer": {
238
+ "nodeId": "AI scorer",
239
+ "rpcName": "pikkuAIScorer",
240
+ "next": "Public agent scaffold",
241
+ "stepHash": "4671def89706"
242
+ },
237
243
  "Public agent scaffold": {
238
244
  "nodeId": "Public agent scaffold",
239
245
  "rpcName": "pikkuPublicAgent",
@@ -634,5 +640,5 @@
634
640
  "entryNodeIds": [
635
641
  "Bootstrap inspect"
636
642
  ],
637
- "graphHash": "c8f162576369"
643
+ "graphHash": "dd727be4816c"
638
644
  }
@@ -1,4 +1,5 @@
1
- import type { HttpPersonasConfig, ScenarioPersona, ResolvedPersona } from '@pikku/core/services';
1
+ import type { HttpPersonasConfig } from '@pikku/core/persona';
2
+ import type { ScenarioPersona, ResolvedPersona } from '@pikku/core/services';
2
3
  import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js';
3
4
  import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.gen.d.js';
4
5
  export declare const personaConfigs: {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.100
2
+ * This file was generated by @pikku/cli@0.12.103
3
3
  */
4
4
  /** Personas declared with definePersonas() */
5
5
  import { createHttpPersonas } from '@pikku/core/persona';
@@ -1,10 +1,11 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.100
2
+ * This file was generated by @pikku/cli@0.12.103
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
6
6
  import { type PikkuWorkflowGraphConfig, type PikkuWorkflowGraphResult } from '@pikku/core/workflow';
7
- import type { PikkuWorkflowWire, PikkuScenarioWire, WorkflowStepOptions, ScenarioStepOptions } from '@pikku/core/workflow';
7
+ import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow';
8
+ import type { PikkuScenarioWire, ScenarioStepOptions } from '@pikku/core/scenario';
8
9
  export { WorkflowCancelledException };
9
10
  import type { PikkuFunctionSessionless, PikkuFunctionConfig, WiredServices } from '../function/pikku-function-types.gen.js';
10
11
  import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
@@ -30,10 +31,7 @@ export interface TypedScenarioSteps {
30
31
  when<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
31
32
  then<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
32
33
  }
33
- /**
34
- * `Out` types `scenario.context` — the scratch the body shares with its
35
- * `before`/`after` hooks — as a partial of what a completed run produces.
36
- */
34
+ /** `Out` types `scenario.context`. */
37
35
  export type TypedScenario<Out = unknown> = TypedWorkflow & Omit<PikkuScenarioWire<Out>, keyof PikkuWorkflowWire | keyof TypedScenarioSteps> & TypedScenarioSteps;
38
36
  import type { StandardSchemaV1 } from '@standard-schema/spec';
39
37
  import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js';
@@ -42,9 +40,9 @@ import { PikkuError } from '@pikku/core/errors';
42
40
  import type { CorePermissionGroup } from '@pikku/core';
43
41
  export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
44
42
  /**
45
- * `Ctx` types `scenario.context` and defaults to the function's own output,
46
- * which is what a scenario body wants. A hook returns void but shares the
47
- * scenario's context, so it passes the scenario's output here instead.
43
+ * `Ctx` types `scenario.context`, defaulting to the body's own output. A hook
44
+ * returns void but shares the scenario's context, so it passes that scenario's
45
+ * output here instead.
48
46
  */
49
47
  export type PikkuFunctionScenario<In = unknown, Out = never, Ctx = Out> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors', WiredServices, Ctx>;
50
48
  export type PikkuWorkflowConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = {
@@ -92,10 +90,8 @@ export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 |
92
90
  * Always runs after the scenario body, in a `finally`, whether it passed or
93
91
  * failed. Throwing fails a run that would otherwise have passed; on an
94
92
  * already-failed run it attaches as the `cause` and never replaces the
95
- * original error.
96
- *
97
- * Reads `scenario.context` for whatever the body managed to record before it
98
- * stopped — that is how teardown learns the ids a failed run created.
93
+ * original error. Reads `scenario.context` for whatever the body managed to
94
+ * record before it stopped.
99
95
  */
100
96
  after?: PikkuScenarioHook<InputSchema, OutputSchema>;
101
97
  /**
@@ -108,11 +104,8 @@ export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 |
108
104
  };
109
105
  /**
110
106
  * A scenario lifecycle hook: the scenario's own `(services, data, wire)`
111
- * signature with its result discarded.
112
- *
113
- * The hook returns void but shares the scenario's `context`, so the output
114
- * schema types `scenario.context` while the return type stays `void` — a hook
115
- * is setup and teardown, never a step, and nothing it returns is recorded.
107
+ * signature with its result discarded. `OutputSchema` types
108
+ * `scenario.context` while the return type stays `void`.
116
109
  */
117
110
  export type PikkuScenarioHook<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, void, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>;
118
111
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.100
2
+ * This file was generated by @pikku/cli@0.12.103
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.100
2
+ * This file was generated by @pikku/cli@0.12.103
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/ecosystem';
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.100
2
+ * This file was generated by @pikku/cli@0.12.103
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.100') {
15
- process.stderr.write(`\n Update available 0.12.100 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
14
+ if (latest !== '0.12.103') {
15
+ process.stderr.write(`\n Update available 0.12.103 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
16
16
  }
17
17
  } catch {}
18
18
  }
@@ -29,7 +29,7 @@ import { scopesPrune } from './functions/commands/scopes-prune.js';
29
29
  import { rolesAudit } from './functions/commands/roles-audit.js';
30
30
  import { rolesPrune } from './functions/commands/roles-prune.js';
31
31
  import { pikkuAudit } from './functions/commands/audit.js';
32
- import { workspaceValidate, renderWorkspaceValidate, } from './functions/commands/workspace-validate.js';
32
+ import { validate, renderValidate } from './functions/commands/validate.js';
33
33
  import { knowledgeValidate, renderKnowledgeValidate, } from './functions/commands/knowledge-validate.js';
34
34
  import { knowledgeIndex, renderKnowledgeIndex, } from './functions/commands/knowledge-index.js';
35
35
  import { scenarioRun, scenarioList } from './functions/commands/scenario.js';
@@ -240,6 +240,9 @@ wireCLI({
240
240
  description: 'Test mode: record service calls for scenario assertions and set PIKKU_TEST_RUN for isTestRun()',
241
241
  default: false,
242
242
  },
243
+ model: {
244
+ description: 'Repoint model aliases for this run, e.g. \'cheap:openai/gpt-5-nano,tool:anthropic/claude-haiku-4-5\'. Overrides the "models" table in pikku.config.json without editing it',
245
+ },
243
246
  },
244
247
  }),
245
248
  serve: pikkuCLICommand({
@@ -255,6 +258,9 @@ wireCLI({
255
258
  description: 'Also serve the Pikku Console same-origin at /console',
256
259
  default: false,
257
260
  },
261
+ model: {
262
+ description: 'Repoint model aliases for this run, e.g. \'cheap:openai/gpt-5-nano,tool:anthropic/claude-haiku-4-5\'. Overrides the "models" table in pikku.config.json without editing it',
263
+ },
258
264
  },
259
265
  }),
260
266
  login: pikkuCLICommand({
@@ -427,16 +433,11 @@ wireCLI({
427
433
  }),
428
434
  },
429
435
  },
430
- workspace: {
431
- description: 'Workspace-level validation and maintenance commands',
432
- subcommands: {
433
- validate: pikkuCLICommand({
434
- func: workspaceValidate,
435
- render: renderWorkspaceValidate,
436
- description: 'Check the project structure for Pikku workspace compatibility',
437
- }),
438
- },
439
- },
436
+ validate: pikkuCLICommand({
437
+ func: validate,
438
+ render: renderValidate,
439
+ description: 'Run every check that applies to this project — app structure, and the published file set of any addon it contains',
440
+ }),
440
441
  scenario: {
441
442
  description: 'Run and inspect scenarios (pikkuScenario)',
442
443
  subcommands: {
@@ -487,6 +488,14 @@ wireCLI({
487
488
  description: 'Keep every stack frame on a failure. Without it, only the project’s own frames are shown',
488
489
  default: false,
489
490
  },
491
+ screenshots: {
492
+ description: 'Write the screenshots scenarios ask for to disk, under .pikku/scenario-runs/<run>/<scenario>. Without it `browser.screenshot()` still returns the bytes and nothing is written',
493
+ default: false,
494
+ },
495
+ video: {
496
+ description: 'Record a video per scenario alongside the screenshots (implies --screenshots)',
497
+ default: false,
498
+ },
490
499
  apiUrl: {
491
500
  description: "Override the environment's apiUrl for this run — for a target that only exists at run time, such as a freshly deployed sandbox",
492
501
  },
@@ -370,6 +370,46 @@ export function analyzeDeployment(state, options) {
370
370
  allowedHosts: s.allowedHosts,
371
371
  read: readSecretIds.has(s.secretId),
372
372
  }));
373
+ const unscopedSecretAddons = [];
374
+ const unscopedCredentialAddons = [];
375
+ const grantedSecretAddons = [];
376
+ const grantedCredentialAddons = [];
377
+ // An override's key is a grant too: scoping is checked before the rename, so
378
+ // the key is a name the addon may read that it never declared.
379
+ const grantedNames = (grants, overrides) => [...new Set([...(grants ?? []), ...Object.keys(overrides ?? {})])].sort();
380
+ for (const [namespace, addon] of state.rpc?.wireAddonDeclarations ?? []) {
381
+ if (addon.globalSecrets) {
382
+ unscopedSecretAddons.push({
383
+ namespace,
384
+ package: addon.package,
385
+ reason: addon.globalSecrets,
386
+ });
387
+ }
388
+ else {
389
+ const granted = grantedNames(addon.secretGrants, addon.secretOverrides);
390
+ if (granted.length > 0) {
391
+ grantedSecretAddons.push({ namespace, package: addon.package, granted });
392
+ }
393
+ }
394
+ if (addon.globalCredentials) {
395
+ unscopedCredentialAddons.push({
396
+ namespace,
397
+ package: addon.package,
398
+ reason: addon.globalCredentials,
399
+ });
400
+ }
401
+ else {
402
+ const granted = grantedNames(addon.credentialGrants, addon.credentialOverrides);
403
+ if (granted.length > 0) {
404
+ grantedCredentialAddons.push({
405
+ namespace,
406
+ package: addon.package,
407
+ granted,
408
+ });
409
+ }
410
+ }
411
+ }
412
+ const byNamespace = (a, b) => a.namespace.localeCompare(b.namespace);
373
413
  const variables = state.variables.definitions.map((v) => ({
374
414
  variableId: v.variableId,
375
415
  displayName: v.displayName,
@@ -387,6 +427,10 @@ export function analyzeDeployment(state, options) {
387
427
  workflows,
388
428
  secrets,
389
429
  unresolvedSecretReads: unresolvedSecretReads.sort(),
430
+ unscopedSecretAddons: unscopedSecretAddons.sort(byNamespace),
431
+ unscopedCredentialAddons: unscopedCredentialAddons.sort(byNamespace),
432
+ grantedSecretAddons: grantedSecretAddons.sort(byNamespace),
433
+ grantedCredentialAddons: grantedCredentialAddons.sort(byNamespace),
390
434
  variables,
391
435
  };
392
436
  }
@@ -108,6 +108,23 @@ export interface SecretDeclaration {
108
108
  }
109
109
  /** Secret reads whose key the inspector could not resolve, as `file:line:source`. */
110
110
  export type UnresolvedSecretRead = string;
111
+ /** A `wireAddon` instance the app exempted from secret or credential scoping. */
112
+ export interface UnscopedAddon {
113
+ namespace: string;
114
+ package: string;
115
+ /** The app's stated reason, from `wireAddon({ globalSecrets | globalCredentials })`. */
116
+ reason: string;
117
+ }
118
+ /** A `wireAddon` instance the app lent named secrets or credentials it never declared. */
119
+ export interface GrantedAddon {
120
+ namespace: string;
121
+ package: string;
122
+ /**
123
+ * The names the addon may now read, as the addon reads them — grants and
124
+ * override keys alike, since scoping is checked before an override renames.
125
+ */
126
+ granted: string[];
127
+ }
111
128
  export interface VariableDeclaration {
112
129
  variableId: string;
113
130
  displayName: string;
@@ -129,5 +146,25 @@ export interface DeploymentManifest {
129
146
  * scope to the declared set when this is empty.
130
147
  */
131
148
  unresolvedSecretReads: UnresolvedSecretRead[];
149
+ /**
150
+ * Addon instances exempted from secret scoping. Every other addon reads only
151
+ * the secrets it declared, so this is the full list of packages that can
152
+ * reach a secret the app never named for them.
153
+ */
154
+ unscopedSecretAddons: UnscopedAddon[];
155
+ /**
156
+ * Addon instances exempted from credential scoping. Every other addon reaches
157
+ * only the credentials it declared, and none can enumerate the app's users.
158
+ */
159
+ unscopedCredentialAddons: UnscopedAddon[];
160
+ /**
161
+ * Addon instances lent named secrets on top of the ones they declared. The
162
+ * other half of the same waiver as `unscopedSecretAddons` — narrower, because
163
+ * the app named the set — so between them a deployment sees every secret an
164
+ * addon can reach that it did not declare for itself.
165
+ */
166
+ grantedSecretAddons: GrantedAddon[];
167
+ /** Addon instances lent named credentials on top of the ones they declared. */
168
+ grantedCredentialAddons: GrantedAddon[];
132
169
  variables: VariableDeclaration[];
133
170
  }
@@ -1,6 +1,6 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { existsSync, createWriteStream } from 'node:fs';
3
- import { mkdtemp, mkdir, readFile, realpath, rm, writeFile } from 'node:fs/promises';
3
+ import { mkdtemp, mkdir, readFile, realpath, rm, writeFile, } from 'node:fs/promises';
4
4
  import { createServer } from 'node:net';
5
5
  import { tmpdir } from 'node:os';
6
6
  import { join, relative, resolve } from 'node:path';
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
8
8
  import { setTimeout as delay } from 'node:timers/promises';
9
9
  import { z } from 'zod';
10
10
  import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
11
- import { findProjectRoot, readJsonSafe, } from '../../functions/validate/workspace-validate.js';
11
+ import { findProjectRoot, readJsonSafe, } from '../../functions/validate/validate.js';
12
12
  import { headSha, isWorkingTreeClean } from '../lib/git.js';
13
13
  import { added, changed, dim, removed } from '../lib/output.js';
14
14
  const DEFAULT_YARN_VERSION = 'yarn@4.9.2';
@@ -52,7 +52,9 @@ function truncateTail(text, maxBytes = DEV_LOG_TAIL_BYTES) {
52
52
  if (Buffer.byteLength(trimmed, 'utf8') <= maxBytes) {
53
53
  return trimmed;
54
54
  }
55
- const slice = Buffer.from(trimmed, 'utf8').subarray(-maxBytes).toString('utf8');
55
+ const slice = Buffer.from(trimmed, 'utf8')
56
+ .subarray(-maxBytes)
57
+ .toString('utf8');
56
58
  const newlineIndex = slice.indexOf('\n');
57
59
  return newlineIndex === -1 ? slice : slice.slice(newlineIndex + 1);
58
60
  }
@@ -322,7 +324,8 @@ async function startFrontends(args) {
322
324
  };
323
325
  }
324
326
  const rewritten = rewriteFrontendCommand(devConfig.command);
325
- const healthPath = typeof devConfig.healthPath === 'string' && devConfig.healthPath.length > 0
327
+ const healthPath = typeof devConfig.healthPath === 'string' &&
328
+ devConfig.healthPath.length > 0
326
329
  ? devConfig.healthPath
327
330
  : '/';
328
331
  const normalizedHealthPath = healthPath.startsWith('/')
@@ -7,6 +7,7 @@ import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
7
7
  import { added, changed, removed, dim } from '../lib/output.js';
8
8
  import { typeCheckFrontends } from '../lib/frontend-typecheck.js';
9
9
  import { readJsonSafe, readTextSafe, runSharedProjectChecks, } from '../../functions/validate/shared-checks.js';
10
+ import { runTypeIdentityChecks } from '../../functions/validate/type-identity-checks.js';
10
11
  const FindingSchema = z.object({
11
12
  id: z.string(),
12
13
  severity: z.enum(['error', 'warn', 'info']),
@@ -200,7 +201,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
200
201
  };
201
202
  const lines = (...parts) => parts.join('\n');
202
203
  // ── everything true of any pikku project ───────────────────────────────
203
- // Fabric validate is workspace validate plus the deploy-shaped checks. The
204
+ // Fabric validate is the app-project check plus the deploy-shaped checks. The
204
205
  // two used to be separate walks over the same project that duplicated sixteen
205
206
  // findings verbatim, and each carried checks the other lacked for no reason
206
207
  // anyone could name.
@@ -318,6 +319,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
318
319
  }
319
320
  }
320
321
  }
322
+ findings.push(...(await runTypeIdentityChecks(root)));
321
323
  // ── scaffold-implied dependencies ──────────────────────────────────────
322
324
  // `scaffold.console` makes codegen import
323
325
  // `@pikku/addon-console/.pikku/pikku-bootstrap.gen.js` from the generated
@@ -16,7 +16,7 @@ import { exportSchema } from '../db/local-db.js';
16
16
  export const dbExport = pikkuSessionlessFunc({
17
17
  remote: true,
18
18
  func: async ({ logger, config }) => {
19
- const artifact = await exportSchema(config.rootDir);
19
+ const artifact = await exportSchema(config.rootDir, config.db?.pgliteExtensions);
20
20
  const dialects = Object.keys(artifact);
21
21
  if (dialects.length === 0) {
22
22
  logger.info('db export: no db/sqlite or db/postgres migrations — nothing to publish');
@@ -1,20 +1,6 @@
1
1
  export interface UserConfigShape {
2
2
  sqliteDb?: string;
3
3
  postgresUrl?: string;
4
- /**
5
- * Postgres extensions the CLI's embedded PGlite databases must load — the
6
- * local dev database, and the shadow one every `db` command migrates to type
7
- * and diff a schema.
8
- *
9
- * A bare name is one of PGlite's bundled contrib extensions (`hstore`,
10
- * `citext`, `uuid_ossp`, …) and needs nothing installed. Anything else is a
11
- * package the project depends on, such as `@electric-sql/pglite-pgvector`.
12
- *
13
- * Needed even when `postgresUrl` points at a server that already has the
14
- * extension: the shadow database is PGlite regardless, so a `CREATE EXTENSION`
15
- * in a migration fails there unless it is declared here.
16
- */
17
- pgliteExtensions?: string[];
18
4
  [key: string]: unknown;
19
5
  }
20
6
  interface LoadOptions {
@@ -4,16 +4,19 @@ export declare const dev: import("#pikku").PikkuFunctionConfig<{
4
4
  hmr?: boolean;
5
5
  coverage?: boolean;
6
6
  test?: boolean;
7
+ model?: string;
7
8
  }, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
8
9
  port?: string;
9
10
  watch?: boolean;
10
11
  hmr?: boolean;
11
12
  coverage?: boolean;
12
13
  test?: boolean;
14
+ model?: string;
13
15
  }, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
14
16
  port?: string;
15
17
  watch?: boolean;
16
18
  hmr?: boolean;
17
19
  coverage?: boolean;
18
20
  test?: boolean;
21
+ model?: string;
19
22
  }, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
@@ -1,4 +1,5 @@
1
1
  import { join, resolve } from 'path';
2
+ import { existsSync, readFileSync } from 'node:fs';
2
3
  import { pikkuSessionlessFunc } from '#pikku';
3
4
  import chokidar from 'chokidar';
4
5
  import { pikkuDevReloader, reloadGeneratedMeta, reconcileAddonRegistry, } from '@pikku/core/dev';
@@ -6,6 +7,7 @@ import { ConsoleLogger, LocalEmailService, spy, InMemoryQueueService, InMemoryWo
6
7
  import { KyselyAIStorageService, KyselyAIRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
7
8
  import { stopSingletonServices } from '@pikku/core';
8
9
  import { pikkuState } from '@pikku/core/ecosystem';
10
+ import { wireAIScorerQueueWorkers } from '@pikku/core/ai-scorer';
9
11
  import { LocalMetaService } from '@pikku/core/services/local-meta';
10
12
  import { LocalContent, } from '@pikku/core/services/local-content';
11
13
  import { InMemorySchedulerService } from '@pikku/schedule';
@@ -18,10 +20,12 @@ import { resolveConsoleMount } from './serve-console.js';
18
20
  import { serverReadyLine } from '../../server/server-ready.js';
19
21
  import { createEphemeralContentSigningJWT } from '../../server/content-signing-jwt.js';
20
22
  import { resolveScaffoldFeature } from '../../utils/resolve-scaffold-feature.js';
23
+ import { applyModelAliasOverride } from '../../utils/model-alias-override.js';
21
24
  export const dev = pikkuSessionlessFunc({
22
25
  remote: true,
23
- func: async ({ logger, config, getInspectorState, invalidateInspectorState, variables, devServerRunner, }, { port, watch, hmr, coverage, test }, { rpc }) => {
26
+ func: async ({ logger, config, getInspectorState, invalidateInspectorState, variables, devServerRunner, }, { port, watch, hmr, coverage, test, model }, { rpc }) => {
24
27
  process.env.PIKKU_DEV_QUICK_LOGIN ??= 'true';
28
+ applyModelAliasOverride(logger, model, config.models);
25
29
  if (test) {
26
30
  process.env.PIKKU_TEST_RUN = 'true';
27
31
  }
@@ -230,6 +234,7 @@ export const dev = pikkuSessionlessFunc({
230
234
  };
231
235
  pikkuState(null, 'package', 'singletonServices', resolvedServices);
232
236
  resolvedServices.workflowService?.wireQueueWorkers?.();
237
+ wireAIScorerQueueWorkers();
233
238
  const { serverLifecycleFactory } = inspectorState.filesAndMethods;
234
239
  const loadLifecycle = async () => {
235
240
  if (!serverLifecycleFactory)
@@ -238,13 +243,46 @@ export const dev = pikkuSessionlessFunc({
238
243
  return m[serverLifecycleFactory.variable];
239
244
  };
240
245
  const consoleMount = await resolveConsoleMount();
246
+ /**
247
+ * Hand the server the generated MCP manifest so it actually serves MCP.
248
+ *
249
+ * Codegen reports "N MCP endpoints" and both transports mount them at
250
+ * `mcpPath` — but only when given `mcpJson`, and dev never passed it.
251
+ *
252
+ * It goes in the runner *options*, not in the config: the transport reads it
253
+ * off its third argument, and the runners forward a hand-picked list of
254
+ * fields. Putting it in `config` type-checks and is discarded in silence.
255
+ * So every pikku app announced an MCP surface at startup and served a 404,
256
+ * and the only way to exercise a tool was to deploy. `deploy-apply` even
257
+ * carries a comment saying the deployed bundle should match "the dev server"
258
+ * — which had never served it either.
259
+ *
260
+ * Absent or unparseable is not an error: an app with no MCP wirings has no
261
+ * manifest, and that is the common case.
262
+ */
263
+ const mcpJson = await (async () => {
264
+ const file = join(pikkuDir, 'mcp', 'mcp.gen.json');
265
+ if (!existsSync(file))
266
+ return undefined;
267
+ try {
268
+ const parsed = JSON.parse(readFileSync(file, 'utf-8'));
269
+ const count = (parsed.tools?.length ?? 0) +
270
+ (parsed.resources?.length ?? 0) +
271
+ (parsed.prompts?.length ?? 0);
272
+ return count > 0 ? parsed : undefined;
273
+ }
274
+ catch (err) {
275
+ logger.warn(`[pikku] could not parse ${file} — MCP will not be served: ${err instanceof Error ? err.message : String(err)}`);
276
+ return undefined;
277
+ }
278
+ })();
241
279
  const pikkuServer = devServerRunner.createServer({
242
280
  ...userConfig,
243
281
  hostname: bindHostname,
244
282
  port: resolvedPort,
245
283
  content: localContentConfig,
246
284
  ...(consoleMount ? { staticMounts: [consoleMount] } : {}),
247
- }, logger, { contentSigningJWT });
285
+ }, logger, { contentSigningJWT, mcpJson });
248
286
  const lifecycle = await loadLifecycle();
249
287
  await pikkuServer.init();
250
288
  await lifecycle?.beforeStart?.(resolvedServices);
@@ -296,6 +334,7 @@ export const dev = pikkuSessionlessFunc({
296
334
  invalidateInspectorState();
297
335
  await runAllWithCommandState();
298
336
  workflowService.wireQueueWorkers();
337
+ wireAIScorerQueueWorkers();
299
338
  // Pull the regenerated meta + JSON schemas into the running
300
339
  // process so new/changed functions are callable without a
301
340
  // restart (the hot-reloader registers their implementations).
@@ -6,7 +6,7 @@ export declare const knowledgeIndex: import("#pikku").PikkuFunctionConfig<{
6
6
  check: boolean;
7
7
  files: {
8
8
  path: string;
9
- action: "unchanged" | "created" | "updated";
9
+ action: "created" | "updated" | "unchanged";
10
10
  }[];
11
11
  }, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
12
12
  check?: boolean | undefined;
@@ -15,7 +15,7 @@ export declare const knowledgeIndex: import("#pikku").PikkuFunctionConfig<{
15
15
  check: boolean;
16
16
  files: {
17
17
  path: string;
18
- action: "unchanged" | "created" | "updated";
18
+ action: "created" | "updated" | "unchanged";
19
19
  }[];
20
20
  }, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
21
21
  check?: boolean | undefined;
@@ -24,7 +24,7 @@ export declare const knowledgeIndex: import("#pikku").PikkuFunctionConfig<{
24
24
  check: boolean;
25
25
  files: {
26
26
  path: string;
27
- action: "unchanged" | "created" | "updated";
27
+ action: "created" | "updated" | "unchanged";
28
28
  }[];
29
29
  }, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
30
30
  export { renderKnowledgeIndex };
@@ -134,9 +134,12 @@ export function getAddonFiles(vars, flags) {
134
134
  name: `@pikku/addon-${name}`,
135
135
  version: '0.0.1',
136
136
  type: 'module',
137
+ // Everything an installed package reaches for lives under dist. The
138
+ // addon's own build resolves #pikku through tsconfig `paths` instead, so
139
+ // these never have to point at the source tree.
137
140
  imports: {
138
- '#pikku': './.pikku/pikku-types.gen.ts',
139
- '#pikku/*': './.pikku/*',
141
+ '#pikku': './dist/.pikku/pikku-types.gen.js',
142
+ '#pikku/*': './dist/.pikku/*',
140
143
  },
141
144
  exports: {
142
145
  '.': {
@@ -153,7 +156,7 @@ export function getAddonFiles(vars, flags) {
153
156
  scripts: {
154
157
  prepublishOnly: 'yarn build',
155
158
  prebuild: 'pikku all',
156
- build: 'tsc && cp -r .pikku dist/',
159
+ build: 'tsc && cp -r .pikku types dist/',
157
160
  pikku: 'pikku all',
158
161
  },
159
162
  peerDependencies: {