@pikku/cli 0.12.100 → 0.12.102

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 (246) hide show
  1. package/console-app/assets/{abnfDiagram-VRR7QNED-Icjp9hnB.js → abnfDiagram-VRR7QNED-BneJZPuq.js} +1 -1
  2. package/console-app/assets/{arc-BfGls--L.js → arc-B6oXAx95.js} +1 -1
  3. package/console-app/assets/architecture-TIHT7OUA-BIpQbDwm.js +1 -0
  4. package/console-app/assets/{architectureDiagram-ZJ3FMSHR-CpnsLBns.js → architectureDiagram-ZJ3FMSHR-Dn6JKcGL.js} +1 -1
  5. package/console-app/assets/{blockDiagram-677ZJIJ3-ByKRMGSr.js → blockDiagram-677ZJIJ3-CQtakjN5.js} +1 -1
  6. package/console-app/assets/{c4Diagram-LMCZKHZV-CzJSbsUo.js → c4Diagram-LMCZKHZV-DRBlz-sO.js} +1 -1
  7. package/console-app/assets/channel-D9eZ2wja.js +1 -0
  8. package/console-app/assets/{chunk-32BRIVSS-D_tc4HCY.js → chunk-32BRIVSS-DIionvWe.js} +1 -1
  9. package/console-app/assets/{chunk-52WLFC77-wkQkuUXG.js → chunk-52WLFC77-DwrMMV53.js} +1 -1
  10. package/console-app/assets/{chunk-C7G6YPKG-BFW3xG3R.js → chunk-C7G6YPKG-C7_SHoee.js} +1 -1
  11. package/console-app/assets/{chunk-EX3LRPZG-Car090Sw.js → chunk-EX3LRPZG-Brqi3de0.js} +1 -1
  12. package/console-app/assets/{chunk-FWX5IMBZ-c2ud9kQ-.js → chunk-FWX5IMBZ-CGXYdLJv.js} +2 -2
  13. package/console-app/assets/{chunk-HOUHSVGY-RYmQka5R.js → chunk-HOUHSVGY-C-mHnXIa.js} +1 -1
  14. package/console-app/assets/{chunk-ICXQ74PX-C-dqYC_9.js → chunk-ICXQ74PX-x3psPzuY.js} +1 -1
  15. package/console-app/assets/{chunk-MOJQB5TN-Cu3FUWwl.js → chunk-MOJQB5TN-2uXUItkq.js} +1 -1
  16. package/console-app/assets/{chunk-OGEWGWER-Z7f1yArD.js → chunk-OGEWGWER-eXRvfFkE.js} +1 -1
  17. package/console-app/assets/{chunk-PUDLZKDR-Bp68DuRj.js → chunk-PUDLZKDR-CyN33Wwe.js} +1 -1
  18. package/console-app/assets/{chunk-Q4XR5HBZ-CdKSYWZ4.js → chunk-Q4XR5HBZ-uyzxeIyh.js} +1 -1
  19. package/console-app/assets/{chunk-RYQCIY6F-9ISCAKm2.js → chunk-RYQCIY6F-CB9wv1YB.js} +1 -1
  20. package/console-app/assets/{chunk-V7JOEXUC-2EOc1nQB.js → chunk-V7JOEXUC-DLMzjIkb.js} +1 -1
  21. package/console-app/assets/chunk-VAUOI2AC--YVrsYCZ.js +1 -0
  22. package/console-app/assets/{chunk-VR4S4FIN-BPvN0PUm.js → chunk-VR4S4FIN-DtBvdHYI.js} +1 -1
  23. package/console-app/assets/{chunk-WYO6CB5R-DOpurCTP.js → chunk-WYO6CB5R-B_EVxwHf.js} +1 -1
  24. package/console-app/assets/chunk-XXDRQBXY-By-5aH9h.js +1 -0
  25. package/console-app/assets/{chunk-ZGVPDNZ5-Bu2weVOL.js → chunk-ZGVPDNZ5-CGfMGxHR.js} +1 -1
  26. package/console-app/assets/classDiagram-OUVF2IWQ-Bg6U871E.js +1 -0
  27. package/console-app/assets/classDiagram-v2-EOCWNBFH-Bg6U871E.js +1 -0
  28. package/console-app/assets/{cose-bilkent-JH36ORCC-nau-QGCX.js → cose-bilkent-JH36ORCC-B_3kCkWC.js} +1 -1
  29. package/console-app/assets/{cynefin-VYW2F7L2-BBw-E7lg.js → cynefin-VYW2F7L2-Buqf60VA.js} +1 -1
  30. package/console-app/assets/{cynefinDiagram-TSTJHNR4-BvnMvOvH.js → cynefinDiagram-TSTJHNR4-DOjw2x6X.js} +1 -1
  31. package/console-app/assets/{dagre-VKFMJZFB-CHEqPR29.js → dagre-VKFMJZFB-CTZTYT0b.js} +1 -1
  32. package/console-app/assets/{diagram-FQU43EPY-JijKRWyb.js → diagram-FQU43EPY-BZh4LC_G.js} +1 -1
  33. package/console-app/assets/{diagram-G47NLZAW-G5UsB31f.js → diagram-G47NLZAW-DDHD69gC.js} +1 -1
  34. package/console-app/assets/{diagram-NH7WQ7WH-BhuJ6fPu.js → diagram-NH7WQ7WH-YnfI_N0A.js} +1 -1
  35. package/console-app/assets/{diagram-OA4YK3LP-DaUF-8N4.js → diagram-OA4YK3LP-ByfLxp7x.js} +1 -1
  36. package/console-app/assets/{diagram-WEI45ONY-wLsJIhoM.js → diagram-WEI45ONY-CghNIRYp.js} +1 -1
  37. package/console-app/assets/{dist-fbBkbDNG.js → dist-DCLZxlZv.js} +1 -1
  38. package/console-app/assets/{ebnfDiagram-CCIWWBDH-BZCEa3Dz.js → ebnfDiagram-CCIWWBDH-D5_G_ZqU.js} +1 -1
  39. package/console-app/assets/{erDiagram-Q63AITRT-4XoEUtEh.js → erDiagram-Q63AITRT-B5ZtoDJs.js} +1 -1
  40. package/console-app/assets/eventmodeling-45OFAUF4-eU2Q2DYK.js +1 -0
  41. package/console-app/assets/flowDiagram-23GEKE2U-CtRJ8nYJ.js +1 -0
  42. package/console-app/assets/{ganttDiagram-NO4QXBWP-BXU7pfq6.js → ganttDiagram-NO4QXBWP-R-TggPMB.js} +1 -1
  43. package/console-app/assets/{gitGraph-TEB2WS4Q-BdMAmvpU.js → gitGraph-TEB2WS4Q-Cjhl-pwb.js} +1 -1
  44. package/console-app/assets/{gitGraphDiagram-IHSO6WYX-3Hn0zwZR.js → gitGraphDiagram-IHSO6WYX-DnQe5wWr.js} +1 -1
  45. package/console-app/assets/{index-Din2vBeb.js → index-BZTTf18Y.js} +150 -150
  46. package/console-app/assets/{index-BXMjqLQ5.css → index-r763CZB4.css} +1 -1
  47. package/console-app/assets/{info-DKCQHKI2-Dc_oQkp5.js → info-DKCQHKI2-DlSWT4UP.js} +1 -1
  48. package/console-app/assets/{infoDiagram-FWYZ7A6U-B3v4xCUn.js → infoDiagram-FWYZ7A6U-xqpfzGnj.js} +1 -1
  49. package/console-app/assets/{ishikawaDiagram-FXEZZL3T-DzWq9Vtp.js → ishikawaDiagram-FXEZZL3T-M_pUeGWs.js} +1 -1
  50. package/console-app/assets/{journeyDiagram-5HDEW3XC-C0buWi_a.js → journeyDiagram-5HDEW3XC-Dm6FR2DD.js} +1 -1
  51. package/console-app/assets/{kanban-definition-HUTT4EX6-DRAN9HhV.js → kanban-definition-HUTT4EX6-CbhkDdQH.js} +1 -1
  52. package/console-app/assets/{line-UqgRNiAC.js → line-C98Z2IVv.js} +1 -1
  53. package/console-app/assets/{linear-FTAGuk_3.js → linear-fYIkDCbB.js} +1 -1
  54. package/console-app/assets/{mermaid-parser.core-DIHI27FL.js → mermaid-parser.core-Dkioi2z2.js} +3 -3
  55. package/console-app/assets/{mermaid.core-D4q8kvcu.js → mermaid.core-CeJcbw8_.js} +3 -3
  56. package/console-app/assets/{mindmap-definition-LN4V7U3C-DN-_CNLb.js → mindmap-definition-LN4V7U3C-DDitGESW.js} +1 -1
  57. package/console-app/assets/{packet-7NZHBO7P-8a3PoQAb.js → packet-7NZHBO7P-DWZKJ9Us.js} +1 -1
  58. package/console-app/assets/{pegDiagram-2B236MQR-Bh2MhzCN.js → pegDiagram-2B236MQR-CZGjPLXH.js} +1 -1
  59. package/console-app/assets/{pie-RZYD4A2V-Bi6zbJDl.js → pie-RZYD4A2V-DT4-E-uE.js} +1 -1
  60. package/console-app/assets/{pieDiagram-ENE6RG2P-D2Z0W5UU.js → pieDiagram-ENE6RG2P-bgr82Jyt.js} +1 -1
  61. package/console-app/assets/{quadrantDiagram-ABIIQ3AL-DNOKka0p.js → quadrantDiagram-ABIIQ3AL-Dcw3uNG0.js} +1 -1
  62. package/console-app/assets/{radar-I7S5WNFK-CAxa68Sg.js → radar-I7S5WNFK-CFAbRVFk.js} +1 -1
  63. package/console-app/assets/{railroad-3IZDKUUU-CZb1usP7.js → railroad-3IZDKUUU-CjkCoEjH.js} +1 -1
  64. package/console-app/assets/railroad-abnf-AHOZXSZD-BM21cj3I.js +1 -0
  65. package/console-app/assets/railroad-ebnf-EBAXGLYW-CDjo5TUI.js +1 -0
  66. package/console-app/assets/railroad-peg-LSFZ7HO6-CiKQmfgW.js +1 -0
  67. package/console-app/assets/{railroadDiagram-RFXS5EU6-B1K2hbTD.js → railroadDiagram-RFXS5EU6-BUoL0dsw.js} +1 -1
  68. package/console-app/assets/{requirementDiagram-TGXJPOKE-K8wcOO0Q.js → requirementDiagram-TGXJPOKE-C27qMKlr.js} +1 -1
  69. package/console-app/assets/{sankeyDiagram-HTMAVEWB-WBPBkgNx.js → sankeyDiagram-HTMAVEWB-BYEhrrY0.js} +1 -1
  70. package/console-app/assets/{sequenceDiagram-DBY2YBRQ-Dz80qZZv.js → sequenceDiagram-DBY2YBRQ-BCuL4Pl6.js} +1 -1
  71. package/console-app/assets/{src-CnJCXDL0.js → src-jNbD6Nj3.js} +1 -1
  72. package/console-app/assets/{stateDiagram-2N3HPSRC-DMur7lZf.js → stateDiagram-2N3HPSRC-C8Ywa3Ah.js} +1 -1
  73. package/console-app/assets/stateDiagram-v2-6OUMAXLB-BIGwMDyj.js +1 -0
  74. package/console-app/assets/{swimlanes-5IMT3BWC-BlLdYcPU.js → swimlanes-5IMT3BWC-C12iYfdp.js} +1 -1
  75. package/console-app/assets/swimlanesDiagram-G3AALYLV-BsoUfqN-.js +8 -0
  76. package/console-app/assets/{timeline-definition-FHXFAJF6-CBOit0JY.js → timeline-definition-FHXFAJF6-BFQotHp7.js} +1 -1
  77. package/console-app/assets/{treeView-QDETBFTQ-DM1i1ast.js → treeView-QDETBFTQ-CGbwDLTd.js} +1 -1
  78. package/console-app/assets/{treemap-6X3UGDF4-ACrBEfY6.js → treemap-6X3UGDF4-DxSGskiF.js} +1 -1
  79. package/console-app/assets/{vennDiagram-L72KCM5P-BmeFWb5N.js → vennDiagram-L72KCM5P-D4hlUYc9.js} +1 -1
  80. package/console-app/assets/{wardley-OPB4EBWU-BpIbeh58.js → wardley-OPB4EBWU-XlXl32Vn.js} +1 -1
  81. package/console-app/assets/{wardleyDiagram-EHGQE667-CxL7Mv7y.js → wardleyDiagram-EHGQE667-ttCeFzYx.js} +1 -1
  82. package/console-app/assets/{xychartDiagram-FW5EYKEG-DkV75xT2.js → xychartDiagram-FW5EYKEG-BMG4kbfv.js} +1 -1
  83. package/console-app/index.html +2 -2
  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.js +1 -1
  159. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +9 -17
  160. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  161. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  162. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  163. package/dist/bin/pikku-bin.mjs +2 -2
  164. package/dist/src/cli.wiring.js +20 -11
  165. package/dist/src/deploy/analyzer/analyzer.js +21 -0
  166. package/dist/src/deploy/analyzer/manifest.d.ts +18 -0
  167. package/dist/src/fabric/functions/smoke.function.js +7 -4
  168. package/dist/src/fabric/functions/validate.function.js +1 -1
  169. package/dist/src/functions/commands/db-export.js +1 -1
  170. package/dist/src/functions/commands/db-shared.d.ts +0 -14
  171. package/dist/src/functions/commands/dev.d.ts +3 -0
  172. package/dist/src/functions/commands/dev.js +41 -2
  173. package/dist/src/functions/commands/knowledge-index.d.ts +3 -3
  174. package/dist/src/functions/commands/new-addon.js +6 -3
  175. package/dist/src/functions/commands/scenario-browser.d.ts +24 -1
  176. package/dist/src/functions/commands/scenario-browser.js +5 -1
  177. package/dist/src/functions/commands/scenario.d.ts +6 -0
  178. package/dist/src/functions/commands/scenario.js +26 -5
  179. package/dist/src/functions/commands/serve.d.ts +3 -0
  180. package/dist/src/functions/commands/serve.js +15 -1
  181. package/dist/src/functions/commands/{workspace-validate.d.ts → validate.d.ts} +18 -3
  182. package/dist/src/functions/commands/validate.js +9 -0
  183. package/dist/src/functions/db/local-db.d.ts +2 -1
  184. package/dist/src/functions/db/local-db.js +2 -2
  185. package/dist/src/functions/validate/addon-package-checks.d.ts +26 -0
  186. package/dist/src/functions/validate/addon-package-checks.js +258 -0
  187. package/dist/src/functions/validate/persona-checks.d.ts +1 -1
  188. package/dist/src/functions/validate/persona-checks.js +1 -1
  189. package/dist/src/functions/validate/scenario-file-checks.js +33 -0
  190. package/dist/src/functions/validate/shared-checks.d.ts +1 -1
  191. package/dist/src/functions/validate/shared-checks.js +1 -1
  192. package/dist/src/functions/validate/validate-registry.d.ts +52 -0
  193. package/dist/src/functions/validate/validate-registry.js +100 -0
  194. package/dist/src/functions/validate/validate.d.ts +47 -0
  195. package/dist/src/functions/validate/{workspace-validate.js → validate.js} +46 -12
  196. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +3 -2
  197. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +5 -1
  198. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
  199. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +15 -2
  200. package/dist/src/functions/wirings/ai-agent/serialize-model-aliases.d.ts +5 -0
  201. package/dist/src/functions/wirings/ai-agent/serialize-model-aliases.js +12 -0
  202. package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +1 -0
  203. package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.js +51 -0
  204. package/dist/src/functions/wirings/ai-scorer/serialize-scorer-names.d.ts +10 -0
  205. package/dist/src/functions/wirings/ai-scorer/serialize-scorer-names.js +17 -0
  206. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +27 -10
  207. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +9 -4
  208. package/dist/src/functions/wirings/console/serialize-console-functions.js +9 -56
  209. package/dist/src/functions/wirings/functions/serialize-function-types.js +7 -30
  210. package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +5 -1
  211. package/dist/src/functions/wirings/package/pikku-command-package.js +12 -1
  212. package/dist/src/functions/wirings/package/serialize-package.d.ts +1 -1
  213. package/dist/src/functions/wirings/package/serialize-package.js +5 -2
  214. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +1 -6
  215. package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +30 -0
  216. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +12 -4
  217. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +8 -16
  218. package/dist/src/functions/workflows/all.workflow.js +6 -1
  219. package/dist/src/server/bun-server-runner.js +3 -0
  220. package/dist/src/server/dev-server-runner.interface.d.ts +10 -0
  221. package/dist/src/server/node-server-runner.js +3 -0
  222. package/dist/src/services.js +1 -0
  223. package/dist/src/utils/meta-diff.d.ts +1 -1
  224. package/dist/src/utils/meta-diff.js +2 -0
  225. package/dist/src/utils/model-alias-override.d.ts +7 -0
  226. package/dist/src/utils/model-alias-override.js +33 -0
  227. package/dist/src/utils/pikku-cli-config.js +16 -0
  228. package/dist/tsconfig.tsbuildinfo +1 -1
  229. package/package.json +17 -17
  230. package/console-app/assets/architecture-TIHT7OUA-C8l7I5Lm.js +0 -1
  231. package/console-app/assets/channel-BgJ-Z0cx.js +0 -1
  232. package/console-app/assets/chunk-VAUOI2AC-DwKsbf70.js +0 -1
  233. package/console-app/assets/chunk-XXDRQBXY-RuYSFsQb.js +0 -1
  234. package/console-app/assets/classDiagram-OUVF2IWQ-ohoLCI8g.js +0 -1
  235. package/console-app/assets/classDiagram-v2-EOCWNBFH-ohoLCI8g.js +0 -1
  236. package/console-app/assets/eventmodeling-45OFAUF4-DZ7z4YJO.js +0 -1
  237. package/console-app/assets/flowDiagram-23GEKE2U-rd7-NwZT.js +0 -1
  238. package/console-app/assets/railroad-abnf-AHOZXSZD-DkQZciri.js +0 -1
  239. package/console-app/assets/railroad-ebnf-EBAXGLYW-CPBeASA9.js +0 -1
  240. package/console-app/assets/railroad-peg-LSFZ7HO6-CXEVIZ0g.js +0 -1
  241. package/console-app/assets/stateDiagram-v2-6OUMAXLB-BDgLCrot.js +0 -1
  242. package/console-app/assets/swimlanesDiagram-G3AALYLV-CZ5rQIcE.js +0 -8
  243. package/dist/.pikku/schemas/schemas/WorkspaceValidateOutput.schema.json +0 -1
  244. package/dist/src/functions/commands/workspace-validate.js +0 -9
  245. package/dist/src/functions/validate/workspace-validate.d.ts +0 -33
  246. /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.102
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.102
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.102
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.102
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.102
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.102
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,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.102
3
3
  */
4
4
  /** Personas declared with definePersonas() */
5
5
  import { createHttpPersonas } from '@pikku/core/persona';
@@ -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.102
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
@@ -30,10 +30,7 @@ export interface TypedScenarioSteps {
30
30
  when<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
31
31
  then<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
32
32
  }
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
- */
33
+ /** `Out` types `scenario.context`. */
37
34
  export type TypedScenario<Out = unknown> = TypedWorkflow & Omit<PikkuScenarioWire<Out>, keyof PikkuWorkflowWire | keyof TypedScenarioSteps> & TypedScenarioSteps;
38
35
  import type { StandardSchemaV1 } from '@standard-schema/spec';
39
36
  import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js';
@@ -42,9 +39,9 @@ import { PikkuError } from '@pikku/core/errors';
42
39
  import type { CorePermissionGroup } from '@pikku/core';
43
40
  export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
44
41
  /**
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.
42
+ * `Ctx` types `scenario.context`, defaulting to the body's own output. A hook
43
+ * returns void but shares the scenario's context, so it passes that scenario's
44
+ * output here instead.
48
45
  */
49
46
  export type PikkuFunctionScenario<In = unknown, Out = never, Ctx = Out> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors', WiredServices, Ctx>;
50
47
  export type PikkuWorkflowConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = {
@@ -92,10 +89,8 @@ export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 |
92
89
  * Always runs after the scenario body, in a `finally`, whether it passed or
93
90
  * failed. Throwing fails a run that would otherwise have passed; on an
94
91
  * 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.
92
+ * original error. Reads `scenario.context` for whatever the body managed to
93
+ * record before it stopped.
99
94
  */
100
95
  after?: PikkuScenarioHook<InputSchema, OutputSchema>;
101
96
  /**
@@ -108,11 +103,8 @@ export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 |
108
103
  };
109
104
  /**
110
105
  * 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.
106
+ * signature with its result discarded. `OutputSchema` types
107
+ * `scenario.context` while the return type stays `void`.
116
108
  */
117
109
  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
110
  /**
@@ -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.102
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.102
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.102
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.102') {
15
+ process.stderr.write(`\n Update available 0.12.102 → ${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,25 @@ 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
+ for (const [namespace, addon] of state.rpc?.wireAddonDeclarations ?? []) {
376
+ if (addon.globalSecrets) {
377
+ unscopedSecretAddons.push({
378
+ namespace,
379
+ package: addon.package,
380
+ reason: addon.globalSecrets,
381
+ });
382
+ }
383
+ if (addon.globalCredentials) {
384
+ unscopedCredentialAddons.push({
385
+ namespace,
386
+ package: addon.package,
387
+ reason: addon.globalCredentials,
388
+ });
389
+ }
390
+ }
391
+ const byNamespace = (a, b) => a.namespace.localeCompare(b.namespace);
373
392
  const variables = state.variables.definitions.map((v) => ({
374
393
  variableId: v.variableId,
375
394
  displayName: v.displayName,
@@ -387,6 +406,8 @@ export function analyzeDeployment(state, options) {
387
406
  workflows,
388
407
  secrets,
389
408
  unresolvedSecretReads: unresolvedSecretReads.sort(),
409
+ unscopedSecretAddons: unscopedSecretAddons.sort(byNamespace),
410
+ unscopedCredentialAddons: unscopedCredentialAddons.sort(byNamespace),
390
411
  variables,
391
412
  };
392
413
  }
@@ -108,6 +108,13 @@ 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
+ }
111
118
  export interface VariableDeclaration {
112
119
  variableId: string;
113
120
  displayName: string;
@@ -129,5 +136,16 @@ export interface DeploymentManifest {
129
136
  * scope to the declared set when this is empty.
130
137
  */
131
138
  unresolvedSecretReads: UnresolvedSecretRead[];
139
+ /**
140
+ * Addon instances exempted from secret scoping. Every other addon reads only
141
+ * the secrets it declared, so this is the full list of packages that can
142
+ * reach a secret the app never named for them.
143
+ */
144
+ unscopedSecretAddons: UnscopedAddon[];
145
+ /**
146
+ * Addon instances exempted from credential scoping. Every other addon reaches
147
+ * only the credentials it declared, and none can enumerate the app's users.
148
+ */
149
+ unscopedCredentialAddons: UnscopedAddon[];
132
150
  variables: VariableDeclaration[];
133
151
  }
@@ -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('/')
@@ -200,7 +200,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
200
200
  };
201
201
  const lines = (...parts) => parts.join('\n');
202
202
  // ── everything true of any pikku project ───────────────────────────────
203
- // Fabric validate is workspace validate plus the deploy-shaped checks. The
203
+ // Fabric validate is the app-project check plus the deploy-shaped checks. The
204
204
  // two used to be separate walks over the same project that duplicated sixteen
205
205
  // findings verbatim, and each carried checks the other lacked for no reason
206
206
  // anyone could name.
@@ -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: {
@@ -16,6 +16,7 @@ export interface ScenarioBrowserDriverOptions {
16
16
  actors: Record<string, ResolvedPersona>;
17
17
  signInPath?: string;
18
18
  failureDir?: string;
19
+ capture?: ScenarioCaptureOptions;
19
20
  config: unknown;
20
21
  }
21
22
  /**
@@ -43,6 +44,21 @@ export interface ScenarioBrowserDriver {
43
44
  apiUrl: string;
44
45
  }) => unknown;
45
46
  }
47
+ /**
48
+ * Artifacts a run may produce. Mirrors the driver's own CaptureOptions rather
49
+ * than importing it: the CLI must not depend on a driver package it resolves
50
+ * dynamically, and this shape is the contract between them.
51
+ */
52
+ export interface ScenarioCaptureOptions {
53
+ /** Root directory for the run's artifacts. */
54
+ dir: string;
55
+ /** The invocation these artifacts belong to. */
56
+ runId: string;
57
+ /** Record a video per scenario. */
58
+ video?: boolean;
59
+ /** Re-encode with ffmpeg when available. Defaults on — the footage is nearly static. */
60
+ compress?: boolean;
61
+ }
46
62
  export interface ResolveScenarioBrowserProviderOptions {
47
63
  /** The environment name, for error messages that tell the user what to edit. */
48
64
  environment: string;
@@ -53,6 +69,12 @@ export interface ResolveScenarioBrowserProviderOptions {
53
69
  signInPath?: string;
54
70
  /** Where failure screenshots are written. */
55
71
  failureDir: string;
72
+ /**
73
+ * Artifacts for this run — named screenshots, and optionally a video per
74
+ * scenario. Undefined leaves capture off, which is the default: most runs
75
+ * ask a pass/fail question and writing video to answer it is waste.
76
+ */
77
+ capture?: ScenarioCaptureOptions;
56
78
  /** The scenarios that declared browser steps, named in the missing-driver error. */
57
79
  browserScenarios: string[];
58
80
  /** Package to drive the browser. Defaults to `@pikku/playwright`. */
@@ -71,13 +93,14 @@ export interface ResolveScenarioBrowserProviderOptions {
71
93
  * because a run against a placeholder URL is worse than one that refuses to
72
94
  * start.
73
95
  */
74
- export declare const resolveScenarioBrowserProvider: ({ environment, apiUrl, appUrl, secret, actors, signInPath, failureDir, browserScenarios, driver, importDriver, }: ResolveScenarioBrowserProviderOptions) => Promise<ScenarioBrowserProvider>;
96
+ export declare const resolveScenarioBrowserProvider: ({ environment, apiUrl, appUrl, secret, actors, signInPath, failureDir, capture, browserScenarios, driver, importDriver, }: ResolveScenarioBrowserProviderOptions) => Promise<ScenarioBrowserProvider>;
75
97
  /**
76
98
  * The three calls the run loop makes, safe against a run with no browser and
77
99
  * against a driver that implements neither optional member.
78
100
  */
79
101
  export interface ScenarioBrowserLifecycle {
80
102
  reset(): Promise<void>;
103
+ beginScenario(scenario: string): void;
81
104
  captureFailure(label: string): Promise<ScenarioBrowserFailure[]>;
82
105
  close(): Promise<void>;
83
106
  }
@@ -12,7 +12,7 @@ export const DEFAULT_BROWSER_DRIVER = '@pikku/playwright';
12
12
  * because a run against a placeholder URL is worse than one that refuses to
13
13
  * start.
14
14
  */
15
- export const resolveScenarioBrowserProvider = async ({ environment, apiUrl, appUrl, secret, actors, signInPath, failureDir, browserScenarios, driver = DEFAULT_BROWSER_DRIVER, importDriver = (specifier) => import(specifier), }) => {
15
+ export const resolveScenarioBrowserProvider = async ({ environment, apiUrl, appUrl, secret, actors, signInPath, failureDir, capture, browserScenarios, driver = DEFAULT_BROWSER_DRIVER, importDriver = (specifier) => import(specifier), }) => {
16
16
  const module = await importDriver(driver).catch(() => {
17
17
  const install = driver === DEFAULT_BROWSER_DRIVER
18
18
  ? `Run 'yarn add -D ${driver} @playwright/test'`
@@ -33,6 +33,7 @@ export const resolveScenarioBrowserProvider = async ({ environment, apiUrl, appU
33
33
  actors,
34
34
  signInPath,
35
35
  failureDir,
36
+ capture,
36
37
  config,
37
38
  };
38
39
  if (module.createScenarioBrowserProvider) {
@@ -52,6 +53,9 @@ export const scenarioBrowserLifecycle = (provider) => ({
52
53
  reset: async () => {
53
54
  await provider?.reset?.();
54
55
  },
56
+ beginScenario: (scenario) => {
57
+ provider?.beginScenario?.(scenario);
58
+ },
55
59
  captureFailure: async (label) => {
56
60
  try {
57
61
  return (await provider?.captureFailure?.(label)) ?? [];