@pikku/cli 0.12.103 → 0.12.105

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 (333) hide show
  1. package/console-app/assets/{abnfDiagram-VRR7QNED-BLi9JHGg.js → abnfDiagram-VRR7QNED-QRjCVsso.js} +1 -1
  2. package/console-app/assets/{arc-B3b5uYlL.js → arc-CloGjkHW.js} +1 -1
  3. package/console-app/assets/architecture-TIHT7OUA-Cz78Qi5H.js +1 -0
  4. package/console-app/assets/{architectureDiagram-ZJ3FMSHR-Dkd8kxIa.js → architectureDiagram-ZJ3FMSHR-Dl10fVqw.js} +1 -1
  5. package/console-app/assets/{blockDiagram-677ZJIJ3-DnH0nNlb.js → blockDiagram-677ZJIJ3-CMNoQhwm.js} +1 -1
  6. package/console-app/assets/{c4Diagram-LMCZKHZV-BlelCS5i.js → c4Diagram-LMCZKHZV-C2pWYCa6.js} +1 -1
  7. package/console-app/assets/channel-Bm4o-pNB.js +1 -0
  8. package/console-app/assets/{chunk-32BRIVSS-D7tMgtT1.js → chunk-32BRIVSS-DC3ZGIPN.js} +1 -1
  9. package/console-app/assets/{chunk-52WLFC77-CRepS35y.js → chunk-52WLFC77-DuAheIlc.js} +1 -1
  10. package/console-app/assets/{chunk-C7G6YPKG-CUldlJz4.js → chunk-C7G6YPKG-BVtRZIEZ.js} +1 -1
  11. package/console-app/assets/{chunk-EX3LRPZG-DODbrqEj.js → chunk-EX3LRPZG-CWXF7N33.js} +1 -1
  12. package/console-app/assets/{chunk-FWX5IMBZ-nZa59wGD.js → chunk-FWX5IMBZ-UN3i5qMG.js} +2 -2
  13. package/console-app/assets/{chunk-HOUHSVGY-BaawVZCa.js → chunk-HOUHSVGY-DMorD8Ib.js} +1 -1
  14. package/console-app/assets/{chunk-ICXQ74PX-C86LrIRs.js → chunk-ICXQ74PX-BiuzWyj2.js} +1 -1
  15. package/console-app/assets/{chunk-MOJQB5TN-ovUDQlyW.js → chunk-MOJQB5TN-6BhXmDyj.js} +1 -1
  16. package/console-app/assets/{chunk-OGEWGWER-ByZKAcGu.js → chunk-OGEWGWER-BNi3Gsmc.js} +1 -1
  17. package/console-app/assets/{chunk-PUDLZKDR-DdeJN3wJ.js → chunk-PUDLZKDR-DNWGCeoL.js} +1 -1
  18. package/console-app/assets/{chunk-Q4XR5HBZ-Blp5W9-b.js → chunk-Q4XR5HBZ-i4zkt4cc.js} +1 -1
  19. package/console-app/assets/{chunk-RYQCIY6F-DehwjyPp.js → chunk-RYQCIY6F-DvRUzuDz.js} +1 -1
  20. package/console-app/assets/{chunk-V7JOEXUC-Ca1xeVdo.js → chunk-V7JOEXUC-JMjbqEgu.js} +1 -1
  21. package/console-app/assets/chunk-VAUOI2AC-D4_whP-t.js +1 -0
  22. package/console-app/assets/{chunk-VR4S4FIN-Cj7ZlsLr.js → chunk-VR4S4FIN-BcHHugM0.js} +1 -1
  23. package/console-app/assets/{chunk-WYO6CB5R-CsdBQ1HS.js → chunk-WYO6CB5R-COKjEQwP.js} +1 -1
  24. package/console-app/assets/chunk-XXDRQBXY-mkAF2YHU.js +1 -0
  25. package/console-app/assets/{chunk-ZGVPDNZ5-DMnFdLEO.js → chunk-ZGVPDNZ5-CENGdlFJ.js} +1 -1
  26. package/console-app/assets/classDiagram-OUVF2IWQ-B2cEvfK0.js +1 -0
  27. package/console-app/assets/classDiagram-v2-EOCWNBFH-B2cEvfK0.js +1 -0
  28. package/console-app/assets/{cose-bilkent-JH36ORCC-CiYBhiBv.js → cose-bilkent-JH36ORCC-D6F1MghO.js} +1 -1
  29. package/console-app/assets/{cynefin-VYW2F7L2-BXuNC8qm.js → cynefin-VYW2F7L2-BIhff1Ln.js} +1 -1
  30. package/console-app/assets/{cynefinDiagram-TSTJHNR4-Ck53b-Nr.js → cynefinDiagram-TSTJHNR4-DrlBq_QP.js} +1 -1
  31. package/console-app/assets/{dagre-VKFMJZFB-C9hZCnOv.js → dagre-VKFMJZFB-Cm2eP0ez.js} +1 -1
  32. package/console-app/assets/{diagram-FQU43EPY-DuEKSLPE.js → diagram-FQU43EPY-C667dC19.js} +1 -1
  33. package/console-app/assets/{diagram-G47NLZAW-B_yO-zKt.js → diagram-G47NLZAW-3K3OPEuG.js} +1 -1
  34. package/console-app/assets/{diagram-NH7WQ7WH-CtKFjoB4.js → diagram-NH7WQ7WH-CUK-d5iT.js} +1 -1
  35. package/console-app/assets/{diagram-OA4YK3LP-T9eIYXYs.js → diagram-OA4YK3LP-BmjCoGBZ.js} +1 -1
  36. package/console-app/assets/{diagram-WEI45ONY-BTgu-I69.js → diagram-WEI45ONY-D33qA2d9.js} +1 -1
  37. package/console-app/assets/{dist-DSVj7qxi.js → dist-jqlCD26w.js} +1 -1
  38. package/console-app/assets/{ebnfDiagram-CCIWWBDH-BdyNRX2k.js → ebnfDiagram-CCIWWBDH-DUHkt7z6.js} +1 -1
  39. package/console-app/assets/{erDiagram-Q63AITRT-B0cr0nxe.js → erDiagram-Q63AITRT-BAtdfbq3.js} +1 -1
  40. package/console-app/assets/eventmodeling-45OFAUF4-iK6rmyk3.js +1 -0
  41. package/console-app/assets/flowDiagram-23GEKE2U-CSYhKO9Y.js +1 -0
  42. package/console-app/assets/{ganttDiagram-NO4QXBWP-Cr1R_nGh.js → ganttDiagram-NO4QXBWP-64_vh9rj.js} +1 -1
  43. package/console-app/assets/{gitGraph-TEB2WS4Q-zcmQoWd4.js → gitGraph-TEB2WS4Q-DlFJY0cQ.js} +1 -1
  44. package/console-app/assets/{gitGraphDiagram-IHSO6WYX-CHB9Fnch.js → gitGraphDiagram-IHSO6WYX-D9fpmYRm.js} +1 -1
  45. package/console-app/assets/{index-BbIUXgNl.js → index-Byf4wkdP.js} +159 -153
  46. package/console-app/assets/{index-C9U-Zyvx.css → index-CTO5cTAD.css} +1 -1
  47. package/console-app/assets/{info-DKCQHKI2-BGPZGp_E.js → info-DKCQHKI2-DhyT_-b1.js} +1 -1
  48. package/console-app/assets/{infoDiagram-FWYZ7A6U-Br_p6SR_.js → infoDiagram-FWYZ7A6U-ufTemVSR.js} +1 -1
  49. package/console-app/assets/{ishikawaDiagram-FXEZZL3T-Ma2d4IuN.js → ishikawaDiagram-FXEZZL3T-CWHvEncb.js} +1 -1
  50. package/console-app/assets/{journeyDiagram-5HDEW3XC-LdCblEX2.js → journeyDiagram-5HDEW3XC-DKH8UvEq.js} +1 -1
  51. package/console-app/assets/{kanban-definition-HUTT4EX6-CRWetzV4.js → kanban-definition-HUTT4EX6-BODtp_fB.js} +1 -1
  52. package/console-app/assets/{line-DrceqMYY.js → line-Do9j3HRL.js} +1 -1
  53. package/console-app/assets/{linear-acWbtwAj.js → linear-5Z8stnH-.js} +1 -1
  54. package/console-app/assets/{mermaid-parser.core-n773Jf0G.js → mermaid-parser.core-CYJsdwMO.js} +3 -3
  55. package/console-app/assets/{mermaid.core-DyTRkSqH.js → mermaid.core-DwI4IdKs.js} +3 -3
  56. package/console-app/assets/{mindmap-definition-LN4V7U3C-CBU-ehFU.js → mindmap-definition-LN4V7U3C-D7IWNYnf.js} +1 -1
  57. package/console-app/assets/{packet-7NZHBO7P-DL_fgdX1.js → packet-7NZHBO7P-comMLvz_.js} +1 -1
  58. package/console-app/assets/{pegDiagram-2B236MQR-CrFaAHHj.js → pegDiagram-2B236MQR-CbqiI_m5.js} +1 -1
  59. package/console-app/assets/{pie-RZYD4A2V-STtzW8Tz.js → pie-RZYD4A2V-VZXoX73g.js} +1 -1
  60. package/console-app/assets/{pieDiagram-ENE6RG2P-DsUOr1Ud.js → pieDiagram-ENE6RG2P-SA-sCnrt.js} +1 -1
  61. package/console-app/assets/{quadrantDiagram-ABIIQ3AL-DmuSe_qW.js → quadrantDiagram-ABIIQ3AL-CI840rae.js} +1 -1
  62. package/console-app/assets/{radar-I7S5WNFK-L8w2lEOb.js → radar-I7S5WNFK-W0UH9BdP.js} +1 -1
  63. package/console-app/assets/{railroad-3IZDKUUU-CxqlE5vc.js → railroad-3IZDKUUU-_HEtbruA.js} +1 -1
  64. package/console-app/assets/railroad-abnf-AHOZXSZD-ghLnUEfg.js +1 -0
  65. package/console-app/assets/railroad-ebnf-EBAXGLYW-D8JHCZD5.js +1 -0
  66. package/console-app/assets/railroad-peg-LSFZ7HO6-C9eC4l2D.js +1 -0
  67. package/console-app/assets/{railroadDiagram-RFXS5EU6-CJ8Lpbeo.js → railroadDiagram-RFXS5EU6-Cm2SfP9Z.js} +1 -1
  68. package/console-app/assets/{requirementDiagram-TGXJPOKE-8OXQXUud.js → requirementDiagram-TGXJPOKE-CyHrMdrC.js} +1 -1
  69. package/console-app/assets/{sankeyDiagram-HTMAVEWB-Bezd2CqZ.js → sankeyDiagram-HTMAVEWB-DL0eJ1aK.js} +1 -1
  70. package/console-app/assets/{sequenceDiagram-DBY2YBRQ-DHb5js3D.js → sequenceDiagram-DBY2YBRQ-B2AvEvXu.js} +1 -1
  71. package/console-app/assets/{src-DfFamOl-.js → src-72nNqhBu.js} +1 -1
  72. package/console-app/assets/{stateDiagram-2N3HPSRC-UpyJm2mi.js → stateDiagram-2N3HPSRC-vgyc-CMC.js} +1 -1
  73. package/console-app/assets/stateDiagram-v2-6OUMAXLB-B2WCkCZh.js +1 -0
  74. package/console-app/assets/{swimlanes-5IMT3BWC-yUrV5f4O.js → swimlanes-5IMT3BWC-GiOMMhZh.js} +1 -1
  75. package/console-app/assets/swimlanesDiagram-G3AALYLV-CkCbtoLb.js +8 -0
  76. package/console-app/assets/{timeline-definition-FHXFAJF6-B6w-rZeZ.js → timeline-definition-FHXFAJF6-DTJQsTn8.js} +1 -1
  77. package/console-app/assets/{treeView-QDETBFTQ-0k2QpnXc.js → treeView-QDETBFTQ-aizmbgl7.js} +1 -1
  78. package/console-app/assets/{treemap-6X3UGDF4-ByCuDcGA.js → treemap-6X3UGDF4-DIBl6bfV.js} +1 -1
  79. package/console-app/assets/{vennDiagram-L72KCM5P-BH4374lw.js → vennDiagram-L72KCM5P-C4Ngu7VX.js} +1 -1
  80. package/console-app/assets/{wardley-OPB4EBWU-DNVwuJz6.js → wardley-OPB4EBWU-BqdXyJTm.js} +1 -1
  81. package/console-app/assets/{wardleyDiagram-EHGQE667-EXnQ6lkx.js → wardleyDiagram-EHGQE667-Cw2M8s0p.js} +1 -1
  82. package/console-app/assets/{xychartDiagram-FW5EYKEG-rFh-UdgH.js → xychartDiagram-FW5EYKEG-BxMLZdbF.js} +1 -1
  83. package/console-app/index.html +9 -2
  84. package/console-app/site.webmanifest +19 -8
  85. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +12 -12
  86. package/dist/.pikku/agent/pikku-agent-types.gen.js +6 -6
  87. package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
  88. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +4 -4
  89. package/dist/.pikku/channel/pikku-channel-types.gen.js +3 -2
  90. package/dist/.pikku/cli/pikku-cli-channel.d.ts +1 -1
  91. package/dist/.pikku/cli/pikku-cli-channel.js +13 -3
  92. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +2 -2
  93. package/dist/.pikku/cli/pikku-cli-client.gen.js +2 -2
  94. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  95. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  96. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +2 -2
  97. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  98. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  99. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +48 -4
  100. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  101. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  102. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  103. package/dist/.pikku/cli/pikku-cli.gen.js +2 -2
  104. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  105. package/dist/.pikku/function/pikku-function-types.gen.d.ts +9 -7
  106. package/dist/.pikku/function/pikku-function-types.gen.js +5 -4
  107. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  108. package/dist/.pikku/function/pikku-functions-meta.gen.json +97 -54
  109. package/dist/.pikku/function/pikku-functions.gen.js +8 -8
  110. package/dist/.pikku/http/pikku-http-types.gen.d.ts +3 -3
  111. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  112. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +4 -3
  113. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  114. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  115. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  116. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  117. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  118. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  119. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  120. package/dist/.pikku/pikku-services.gen.d.ts +4 -4
  121. package/dist/.pikku/pikku-services.gen.js +3 -3
  122. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  123. package/dist/.pikku/pikku-types.gen.js +1 -1
  124. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +2 -2
  125. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  126. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  127. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  128. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  129. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  130. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +5 -3
  131. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  132. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  133. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  134. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  135. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  136. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  137. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +2 -2
  138. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  139. package/dist/.pikku/schemas/register.gen.js +8 -6
  140. package/dist/.pikku/schemas/schemas/PikkuSemverOutput.schema.json +1 -0
  141. package/dist/.pikku/scopes/pikku-personas.gen.d.ts +2 -1
  142. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  143. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +2 -2
  144. package/dist/.pikku/scopes/pikku-roles.gen.js +1 -1
  145. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +5 -5
  146. package/dist/.pikku/scopes/pikku-scope-types.gen.js +3 -3
  147. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +2 -2
  148. package/dist/.pikku/scopes/pikku-scopes.gen.js +1 -1
  149. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +3 -2
  150. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  151. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  152. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  153. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +3 -3
  154. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  155. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
  156. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  157. package/dist/.pikku/variables/pikku-variables.gen.d.ts +3 -3
  158. package/dist/.pikku/variables/pikku-variables.gen.js +2 -2
  159. package/dist/.pikku/workflow/meta/allWorkflow.gen.json +9 -9
  160. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +3 -2
  161. package/dist/.pikku/workflow/pikku-personas.gen.js +2 -2
  162. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +6 -6
  163. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +3 -3
  164. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  165. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  166. package/dist/bin/pikku-bin.mjs +2 -2
  167. package/dist/src/cli.wiring.js +50 -4
  168. package/dist/src/deploy/analyzer/analyzer.js +5 -5
  169. package/dist/src/deploy/bundler/bundler.js +2 -2
  170. package/dist/src/functions/commands/audit.js +33 -9
  171. package/dist/src/functions/commands/bootstrap.js +1 -1
  172. package/dist/src/functions/commands/{dev-ai-runner.d.ts → dev-agent-runner.d.ts} +3 -3
  173. package/dist/src/functions/commands/{dev-ai-runner.js → dev-agent-runner.js} +4 -4
  174. package/dist/src/functions/commands/dev.js +29 -23
  175. package/dist/src/functions/commands/persona-sync.js +2 -2
  176. package/dist/src/functions/commands/persona.js +7 -6
  177. package/dist/src/functions/commands/roles-prune.js +1 -1
  178. package/dist/src/functions/commands/roles-shared.d.ts +1 -1
  179. package/dist/src/functions/commands/roles-shared.js +1 -1
  180. package/dist/src/functions/commands/scenario-browser.d.ts +2 -2
  181. package/dist/src/functions/commands/scenario-formatter.d.ts +1 -1
  182. package/dist/src/functions/commands/scenario-ladder.d.ts +4 -3
  183. package/dist/src/functions/commands/scenario-ladder.js +1 -1
  184. package/dist/src/functions/commands/scenario-plan.d.ts +2 -2
  185. package/dist/src/functions/commands/scenario-plan.js +1 -1
  186. package/dist/src/functions/commands/scenario.d.ts +0 -3
  187. package/dist/src/functions/commands/scenario.js +40 -38
  188. package/dist/src/functions/commands/scopes-prune.js +1 -1
  189. package/dist/src/functions/commands/scopes-shared.d.ts +1 -1
  190. package/dist/src/functions/commands/scopes-shared.js +1 -1
  191. package/dist/src/functions/commands/semver-render.d.ts +2 -0
  192. package/dist/src/functions/commands/semver-render.js +60 -0
  193. package/dist/src/functions/commands/semver.d.ts +25 -0
  194. package/dist/src/functions/commands/semver.js +50 -0
  195. package/dist/src/functions/commands/serve.js +20 -19
  196. package/dist/src/functions/commands/start-coverage.d.ts +1 -1
  197. package/dist/src/functions/commands/start-coverage.js +2 -2
  198. package/dist/src/functions/commands/update-render.d.ts +2 -0
  199. package/dist/src/functions/commands/update-render.js +102 -0
  200. package/dist/src/functions/commands/update.d.ts +99 -0
  201. package/dist/src/functions/commands/update.js +392 -0
  202. package/dist/src/functions/commands/virtual-user-formatter.d.ts +1 -1
  203. package/dist/src/functions/validate/scenario-file-checks.js +1 -1
  204. package/dist/src/functions/validate/validate-registry.js +10 -0
  205. package/dist/src/functions/validate/workspace-exports-checks.d.ts +14 -0
  206. package/dist/src/functions/validate/workspace-exports-checks.js +211 -0
  207. package/dist/src/functions/wirings/agent/pikku-command-agent-types.d.ts +1 -0
  208. package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent-types.js → agent/pikku-command-agent-types.js} +3 -3
  209. package/dist/src/functions/wirings/agent/pikku-command-agent.d.ts +1 -0
  210. package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent.js → agent/pikku-command-agent.js} +5 -5
  211. package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.d.ts +2 -2
  212. package/dist/src/functions/wirings/agent/serialize-agent-types.d.ts +1 -0
  213. package/dist/src/functions/wirings/{ai-agent/serialize-ai-agent-types.js → agent/serialize-agent-types.js} +21 -32
  214. package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.js +1 -1
  215. package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.d.ts +1 -0
  216. package/dist/src/functions/wirings/{ai-scorer/pikku-command-ai-scorer.js → agent-scorer/pikku-command-agent-scorer.js} +5 -5
  217. package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.d.ts +1 -1
  218. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +6 -6
  219. package/dist/src/functions/wirings/channels/pikku-channels.js +1 -1
  220. package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
  221. package/dist/src/functions/wirings/channels/serialize-channel-types.js +4 -3
  222. package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +2 -2
  223. package/dist/src/functions/wirings/cli/pikku-command-cli.js +1 -1
  224. package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +1 -1
  225. package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +3 -3
  226. package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
  227. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
  228. package/dist/src/functions/wirings/cli/serialize-cli-types.js +2 -1
  229. package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +1 -1
  230. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
  231. package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +1 -1
  232. package/dist/src/functions/wirings/credentials/serialize-credentials-types.d.ts +1 -1
  233. package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +4 -3
  234. package/dist/src/functions/wirings/functions/pikku-command-functions.js +1 -1
  235. package/dist/src/functions/wirings/functions/serialize-addon-types.js +2 -1
  236. package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +1 -1
  237. package/dist/src/functions/wirings/functions/serialize-function-types.js +11 -12
  238. package/dist/src/functions/wirings/gateway/serialize-gateway-meta.d.ts +1 -1
  239. package/dist/src/functions/wirings/http/pikku-command-http-routes.js +1 -1
  240. package/dist/src/functions/wirings/http/pikku-http-routes.js +1 -1
  241. package/dist/src/functions/wirings/http/serialize-http-types.js +3 -2
  242. package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +1 -1
  243. package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +1 -1
  244. package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +3 -11
  245. package/dist/src/functions/wirings/package/serialize-package-types.js +7 -6
  246. package/dist/src/functions/wirings/personas/pikku-command-personas.js +1 -1
  247. package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +1 -1
  248. package/dist/src/functions/wirings/personas/serialize-personas-types.js +6 -2
  249. package/dist/src/functions/wirings/queue/serialize-queue-map.d.ts +1 -1
  250. package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +1 -1
  251. package/dist/src/functions/wirings/queue/serialize-queue-types.js +2 -1
  252. package/dist/src/functions/wirings/roles/pikku-command-roles.js +1 -1
  253. package/dist/src/functions/wirings/roles/serialize-roles-types.d.ts +1 -1
  254. package/dist/src/functions/wirings/roles/serialize-roles-types.js +2 -2
  255. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +1 -1
  256. package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +1 -1
  257. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +5 -5
  258. package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -2
  259. package/dist/src/functions/wirings/scenarios/scenario-partition.d.ts +1 -1
  260. package/dist/src/functions/wirings/scenarios/scenario-schema-partition.d.ts +1 -1
  261. package/dist/src/functions/wirings/scenarios/serialize-feature-meta.d.ts +1 -1
  262. package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +2 -2
  263. package/dist/src/functions/wirings/scenarios/serialize-scenario-registration.js +1 -1
  264. package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +1 -1
  265. package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +2 -1
  266. package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +1 -1
  267. package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +1 -1
  268. package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +3 -3
  269. package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +1 -1
  270. package/dist/src/functions/wirings/secrets/serialize-secrets-types.d.ts +1 -1
  271. package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +4 -3
  272. package/dist/src/functions/wirings/triggers/serialize-trigger-meta.d.ts +1 -1
  273. package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
  274. package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +3 -2
  275. package/dist/src/functions/wirings/variables/pikku-command-variables.js +1 -1
  276. package/dist/src/functions/wirings/variables/serialize-variables-types.d.ts +1 -1
  277. package/dist/src/functions/wirings/variables/serialize-variables-types.js +3 -3
  278. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +7 -13
  279. package/dist/src/functions/wirings/webhook/serialize-webhook.js +1 -1
  280. package/dist/src/functions/wirings/workflow/serialize-personas.d.ts +1 -1
  281. package/dist/src/functions/wirings/workflow/serialize-personas.js +4 -3
  282. package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.d.ts +1 -1
  283. package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.d.ts +1 -1
  284. package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +2 -2
  285. package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +1 -1
  286. package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +2 -2
  287. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +1 -1
  288. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +6 -9
  289. package/dist/src/functions/workflows/all.workflow.js +6 -5
  290. package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
  291. package/dist/src/server/node-server-runner.js +5 -2
  292. package/dist/src/services/cli-logger.service.js +1 -1
  293. package/dist/src/utils/precise-coverage-map.d.ts +1 -1
  294. package/dist/src/utils/remove-legacy-scaffold-file.d.ts +14 -0
  295. package/dist/src/utils/remove-legacy-scaffold-file.js +28 -1
  296. package/dist/src/utils/resolve-personas.d.ts +3 -3
  297. package/dist/src/utils/resolve-personas.js +2 -2
  298. package/dist/src/utils/schema-diff.d.ts +22 -0
  299. package/dist/src/utils/schema-diff.js +190 -0
  300. package/dist/src/utils/serialize-schemas.d.ts +1 -1
  301. package/dist/src/utils/serialize-schemas.js +1 -1
  302. package/dist/src/utils/surface-diff.d.ts +35 -0
  303. package/dist/src/utils/surface-diff.js +183 -0
  304. package/dist/src/utils/surface.d.ts +51 -0
  305. package/dist/src/utils/surface.js +156 -0
  306. package/dist/tsconfig.tsbuildinfo +1 -1
  307. package/package.json +25 -17
  308. package/console-app/assets/architecture-TIHT7OUA-BYeDayHv.js +0 -1
  309. package/console-app/assets/channel-CTa6nggO.js +0 -1
  310. package/console-app/assets/chunk-VAUOI2AC-BCngaLxk.js +0 -1
  311. package/console-app/assets/chunk-XXDRQBXY-CGIlOoBU.js +0 -1
  312. package/console-app/assets/classDiagram-OUVF2IWQ-Bwt1ZVOR.js +0 -1
  313. package/console-app/assets/classDiagram-v2-EOCWNBFH-Bwt1ZVOR.js +0 -1
  314. package/console-app/assets/eventmodeling-45OFAUF4-BeHdsPzc.js +0 -1
  315. package/console-app/assets/flowDiagram-23GEKE2U-6N6mIkfB.js +0 -1
  316. package/console-app/assets/railroad-abnf-AHOZXSZD-CkJOR_Em.js +0 -1
  317. package/console-app/assets/railroad-ebnf-EBAXGLYW-BH_pRGgm.js +0 -1
  318. package/console-app/assets/railroad-peg-LSFZ7HO6-B50bKcii.js +0 -1
  319. package/console-app/assets/stateDiagram-v2-6OUMAXLB-C6gAfg82.js +0 -1
  320. package/console-app/assets/swimlanesDiagram-G3AALYLV-Ch2_j5W5.js +0 -8
  321. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +0 -1
  322. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +0 -1
  323. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +0 -1
  324. package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +0 -1
  325. /package/dist/.pikku/schemas/schemas/{PikkuAIAgentOutput.schema.json → PikkuAgentOutput.schema.json} +0 -0
  326. /package/dist/.pikku/schemas/schemas/{PikkuAIScorerOutput.schema.json → PikkuAgentScorerOutput.schema.json} +0 -0
  327. /package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.d.ts +0 -0
  328. /package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.js +0 -0
  329. /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.js +0 -0
  330. /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.d.ts +0 -0
  331. /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.js +0 -0
  332. /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.d.ts +0 -0
  333. /package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.js +0 -0
@@ -3,20 +3,20 @@ import { resolve, join } from 'node:path';
3
3
  import { mkdirSync, writeFileSync } from 'node:fs';
4
4
  import { pikkuSessionlessFunc } from '#pikku';
5
5
  import { InMemoryWorkflowService } from '@pikku/core/services';
6
- import { createHttpPersonas } from '@pikku/core/persona';
7
- import { PikkuScenarioService } from '@pikku/core/scenario';
6
+ import { createHttpPersonas } from '@pikku/core/ecosystem/persona';
7
+ import { PikkuScenarioService } from '@pikku/core/ecosystem/scenario';
8
8
  import { pikkuState, getAllPackageStates } from '@pikku/core/ecosystem';
9
- import { resolveFeatureScenarios } from '@pikku/core/scenario';
9
+ import { resolveFeatureScenarios } from '@pikku/core/ecosystem/scenario';
10
10
  import { loadScenarioBootstrap } from './load-user-project.js';
11
11
  import { collectScenarioStepProse, scenarioBrowserSteps, scenarioFailureFromSteps, scenarioStepRows, scenarioStepsWithoutBinding, scenarioSurfaceCoverage, } from './scenario-ladder.js';
12
- import { SCENARIO_SURFACES } from '@pikku/core/scenario';
12
+ import { SCENARIO_SURFACES } from '@pikku/core/ecosystem/scenario';
13
13
  import { formatScenarioReport } from './scenario-formatter.js';
14
14
  import { resolveScenarioBrowserProvider, scenarioBrowserLifecycle, } from './scenario-browser.js';
15
15
  import { resolvePersonas } from '../../utils/resolve-personas.js';
16
16
  import { spawnDevServer } from '../../server/spawn-dev-server.js';
17
17
  import { buildScenarioPlan } from './scenario-plan.js';
18
18
  import { resolveEnvironment } from './environment.js';
19
- import { createDevAIAgentRunner } from './dev-ai-runner.js';
19
+ import { createDevAgentRunner } from './dev-agent-runner.js';
20
20
  const isScenario = (wf) => wf?.scenario === true;
21
21
  const listScenarios = (state) => Object.entries(state.workflows?.meta ?? {})
22
22
  .filter(([, wf]) => isScenario(wf))
@@ -88,7 +88,7 @@ export const scenarioList = pikkuSessionlessFunc({
88
88
  },
89
89
  });
90
90
  export const scenarioRun = pikkuSessionlessFunc({
91
- func: async ({ logger, config, getInspectorState, variables }, { environment, flows, features, tags, excludeTags, coverage, browser = true, run: runSurface = 'default', strict = false, spawn = false, keepAlive = false, trace = false, screenshots = false, video = false, apiUrl, appUrl, }) => {
91
+ func: async ({ logger, config, getInspectorState, variables }, { environment, flows, features, tags, excludeTags, coverage, run: runSurface = 'default', strict = false, spawn = false, keepAlive = false, trace = false, screenshots = false, video = false, apiUrl, appUrl, }) => {
92
92
  if (!SCENARIO_SURFACES.includes(runSurface)) {
93
93
  throw new Error(`Unknown --run surface '${runSurface}'. Expected one of: ${SCENARIO_SURFACES.join(', ')}.`);
94
94
  }
@@ -191,49 +191,44 @@ export const scenarioRun = pikkuSessionlessFunc({
191
191
  scenarioBrowserSteps(state.workflows?.meta?.[name], functionsMeta),
192
192
  ])
193
193
  .filter(([, steps]) => steps.length > 0));
194
- // `--no-browser` is the blunt form of `--run default`: a machine with no
195
- // browser takes the server-side path rather than skipping the scenario.
196
- const effectiveSurface = browser === false && runSurface === 'browser' ? 'default' : runSurface;
197
194
  const unrunnableStepsByFlow = new Map([...scenarioNames]
198
195
  .map((name) => [
199
196
  name,
200
- scenarioStepsWithoutBinding(state.workflows?.meta?.[name], functionsMeta, effectiveSurface),
197
+ scenarioStepsWithoutBinding(state.workflows?.meta?.[name], functionsMeta, runSurface),
201
198
  ])
202
199
  .filter(([, steps]) => steps.length > 0));
203
- // Two reasons a scenario is held back, both reported as SKIP rather than
204
- // failed. `--no-browser` is the direct replacement for cucumber's `@console`
205
- // tag, so a standard run stays green on a machine with no browser; a `skip`
206
- // on the scenario itself is the project quarantining it, and the plan has
207
- // already cleared that reason for anything named directly with `--flows`.
208
- const skipReasonFor = (entry) => {
209
- if (entry.skip)
210
- return entry.skip;
211
- const unrunnable = unrunnableStepsByFlow.get(entry.scenarioName);
212
- if (unrunnable?.length) {
213
- return `no ${effectiveSurface} or default binding: ${unrunnable.join(', ')}`;
214
- }
215
- return undefined;
216
- };
217
- const skipped = [];
200
+ // A `skip` is the project quarantining a scenario on purpose and stays
201
+ // green; no binding for the run surface is a misconfigured run and fails.
202
+ const quarantined = [];
203
+ const unrunnable = [];
218
204
  groups = groups
219
205
  .map((group) => ({
220
206
  ...group,
221
207
  entries: group.entries.filter((entry) => {
222
- const reason = skipReasonFor(entry);
223
- if (!reason)
224
- return true;
225
- skipped.push({ name: entry.scenarioName, reason });
226
- return false;
208
+ if (entry.skip) {
209
+ quarantined.push({ name: entry.scenarioName, reason: entry.skip });
210
+ return false;
211
+ }
212
+ const steps = unrunnableStepsByFlow.get(entry.scenarioName);
213
+ if (steps?.length) {
214
+ unrunnable.push({
215
+ name: entry.scenarioName,
216
+ reason: `no ${runSurface} or default binding: ${steps.join(', ')}`,
217
+ });
218
+ return false;
219
+ }
220
+ return true;
227
221
  }),
228
222
  }))
229
223
  .filter((group) => group.entries.length > 0);
224
+ const skipped = [...quarantined, ...unrunnable];
230
225
  const workflowService = new InMemoryWorkflowService();
231
226
  const scenarioService = workflowService.setRunExtension((engine) => new PikkuScenarioService(engine));
232
227
  scenarioService.setScenarioEnvironment({
233
228
  apiUrl: env.apiUrl,
234
229
  appUrl: env.appUrl,
235
230
  });
236
- scenarioService.setRunSurface(effectiveSurface);
231
+ scenarioService.setRunSurface(runSurface);
237
232
  // Scenario steps run here, not on the target — everything they touch of the
238
233
  // app goes over HTTP through an actor, which is what `guardRpc` below
239
234
  // enforces. `actor.converse` is the exception, and the reason this is not
@@ -242,8 +237,8 @@ export const scenarioRun = pikkuSessionlessFunc({
242
237
  // before it says anything. Built the same way `pikku dev` builds its own,
243
238
  // and only when the project declares agents, so a project with no agents
244
239
  // does not have to have AI env set to run scenarios.
245
- const aiAgentRunner = Object.keys(state.agents?.agentsMeta ?? {}).length > 0
246
- ? await createDevAIAgentRunner({
240
+ const agentRunner = Object.keys(state.agents?.agentsMeta ?? {}).length > 0
241
+ ? await createDevAgentRunner({
247
242
  logger,
248
243
  projectRoot: config.rootDir,
249
244
  variables,
@@ -253,7 +248,7 @@ export const scenarioRun = pikkuSessionlessFunc({
253
248
  logger,
254
249
  workflowService,
255
250
  workflowRunService: workflowService,
256
- ...(aiAgentRunner ? { aiAgentRunner } : {}),
251
+ ...(agentRunner ? { agentRunner } : {}),
257
252
  });
258
253
  const refuseInternal = (rpcName) => {
259
254
  throw new Error(`Scenario tried to run '${rpcName}' as an internal step. Every workflow.do ` +
@@ -283,7 +278,7 @@ export const scenarioRun = pikkuSessionlessFunc({
283
278
  // Only a browser run launches one. Under `--run default` a step with a
284
279
  // browser binding takes its default path instead, so there is nothing to
285
280
  // drive and nothing to pay for.
286
- const needsBrowser = effectiveSurface === 'browser' &&
281
+ const needsBrowser = runSurface === 'browser' &&
287
282
  groups.some((group) => group.entries.some((entry) => browserStepsByFlow.has(entry.scenarioName)));
288
283
  const failureDir = join(resolve(config.rootDir, config.outDir), 'scenario-failures');
289
284
  // Artifacts are filed under the run, not the scenario, so one run's output
@@ -542,14 +537,14 @@ export const scenarioRun = pikkuSessionlessFunc({
542
537
  const surfaceCoverage = { onSurface: 0, total: 0 };
543
538
  const unwitnessed = new Set();
544
539
  for (const name of scenarioNames) {
545
- const scenario = scenarioSurfaceCoverage(state.workflows?.meta?.[name], functionsMeta, effectiveSurface);
540
+ const scenario = scenarioSurfaceCoverage(state.workflows?.meta?.[name], functionsMeta, runSurface);
546
541
  surfaceCoverage.onSurface += scenario.onSurface;
547
542
  surfaceCoverage.total += scenario.total;
548
543
  for (const step of scenario.unwitnessed)
549
544
  unwitnessed.add(step);
550
545
  }
551
- if (effectiveSurface !== 'default' && surfaceCoverage.total > 0) {
552
- const line = `${surfaceCoverage.onSurface}/${surfaceCoverage.total} steps ran on ${effectiveSurface}`;
546
+ if (runSurface !== 'default' && surfaceCoverage.total > 0) {
547
+ const line = `${surfaceCoverage.onSurface}/${surfaceCoverage.total} steps ran on ${runSurface}`;
553
548
  if (unwitnessed.size === 0) {
554
549
  logger.info(line);
555
550
  }
@@ -558,9 +553,16 @@ export const scenarioRun = pikkuSessionlessFunc({
558
553
  write(`${line} — asserted server-side only: ${[...unwitnessed].join(', ')}`);
559
554
  }
560
555
  }
556
+ // Exiting 0 here makes "62 held back" and "62 passed" indistinguishable
557
+ // to CI, which is how a whole browser suite went unrun.
558
+ if (unrunnable.length > 0) {
559
+ logger.error(`${unrunnable.length} scenario(s) could not run on '${runSurface}' — no binding for that surface and no default to fall back to. ` +
560
+ `Run them on the surface they are written for (--run browser), or hold them back explicitly with --exclude-tags.`);
561
+ }
561
562
  const failed = results.filter((r) => r.status === 'failed');
562
563
  if (failed.length > 0 ||
563
564
  hookFailures.length > 0 ||
565
+ unrunnable.length > 0 ||
564
566
  (strict && unwitnessed.size > 0)) {
565
567
  process.exitCode = 1;
566
568
  }
@@ -40,7 +40,7 @@ export const scopesPrune = pikkuSessionlessFunc({
40
40
  logger.info('');
41
41
  logger.info(`scopes prune: removed ${pruned.length} scope(s)`);
42
42
  if (granted.length > 0) {
43
- logger.warn(`Revoked from ${affectedRoles.size} role(s). Users holding those roles lose these scopes on their next request.`);
43
+ logger.warn(`Revoked from ${affectedRoles.size} role(s). Users holding those roles lose these scopes on their next request — unless mapSession sets scopes itself, in which case it is authoritative and they keep them.`);
44
44
  }
45
45
  }
46
46
  finally {
@@ -1,5 +1,5 @@
1
1
  import type { Kysely } from 'kysely';
2
- import type { FlatScope } from '@pikku/core/scope';
2
+ import type { FlatScope } from '@pikku/core/ecosystem/scope';
3
3
  import { KyselyScopeService } from '@pikku/kysely';
4
4
  import type { KyselyPikkuDB } from '@pikku/kysely';
5
5
  type Logger = {
@@ -1,5 +1,5 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { flattenScopeDefinitions } from '@pikku/core/scope';
2
+ import { flattenScopeDefinitions } from '@pikku/core/ecosystem/scope';
3
3
  import { KyselyScopeService } from '@pikku/kysely';
4
4
  import { createKysely, resolveDb } from '../db/local-db.js';
5
5
  import { loadUserConfigForDb } from './db-shared.js';
@@ -0,0 +1,2 @@
1
+ import type { SemverResult } from './semver.js';
2
+ export declare const renderSemver: (_services: unknown, result: SemverResult) => void;
@@ -0,0 +1,60 @@
1
+ import { added, changed, dim, removed, table } from '../../fabric/lib/output.js';
2
+ const STATUS_COLOUR = {
3
+ added,
4
+ removed,
5
+ modified: changed,
6
+ };
7
+ const verdictColour = (verdict) => verdict === 'major'
8
+ ? removed(verdict)
9
+ : verdict === 'minor'
10
+ ? changed(verdict)
11
+ : dim(verdict);
12
+ export const renderSemver = (_services, result) => {
13
+ if (result.mode === 'emit') {
14
+ // No `--out`: the snapshot itself is the output, so it can be redirected.
15
+ if (!result.written) {
16
+ console.log(JSON.stringify(result.surface));
17
+ return;
18
+ }
19
+ const counts = [
20
+ `${Object.keys(result.surface.functions).length} functions`,
21
+ `${Object.keys(result.surface.schemas).length} schemas`,
22
+ ].join(', ');
23
+ console.log(`Surface snapshot written to ${result.written} ${dim(counts)}`);
24
+ return;
25
+ }
26
+ const lines = [''];
27
+ if (result.changes.length === 0) {
28
+ lines.push(`${verdictColour('patch')} no surface change against ${result.baseline}`, dim(' only internals moved'), '');
29
+ lines.push(dim(` written to ${result.written}`));
30
+ console.log(lines.join('\n'));
31
+ return;
32
+ }
33
+ const rows = result.changes.map((change) => [
34
+ change.breaking ? removed('breaking') : dim('compatible'),
35
+ change.kind,
36
+ STATUS_COLOUR[change.status](change.status),
37
+ change.id,
38
+ change.reasons[0] ?? '',
39
+ ]);
40
+ lines.push(table(['', 'Kind', 'Status', 'Id', 'Reason'], rows));
41
+ // Only the first reason fits the table; a function whose schema moved in
42
+ // several ways gets the rest listed underneath so nothing is lost to layout.
43
+ for (const change of result.changes) {
44
+ if (change.reasons.length <= 1)
45
+ continue;
46
+ lines.push('', `${change.kind} ${change.id}`);
47
+ for (const reason of change.reasons) {
48
+ lines.push(dim(` ${reason}`));
49
+ }
50
+ }
51
+ const { breaking, added: addedCount, removed: removedCount, modified, } = result.summary;
52
+ const summary = [
53
+ `${breaking} breaking`,
54
+ `${addedCount} added`,
55
+ `${removedCount} removed`,
56
+ `${modified} modified`,
57
+ ].join(' ');
58
+ lines.push('', '─'.repeat(40), `${verdictColour(result.verdict)} against ${result.baseline}`, dim(` ${summary}`), dim(` written to ${result.written}`));
59
+ console.log(lines.join('\n'));
60
+ };
@@ -0,0 +1,25 @@
1
+ import { type Surface } from '../../utils/surface.js';
2
+ import { type SurfaceChanges } from '../../utils/surface-diff.js';
3
+ /**
4
+ * `pikku semver` — what does this build owe the clients of another one?
5
+ *
6
+ * The baseline is deliberately external: a deployed environment, not the
7
+ * previous commit. Comparing against production is what makes the answer
8
+ * actionable, and pointing `--against` somewhere else is how you ask the same
9
+ * question about staging.
10
+ */
11
+ export type SemverInput = {
12
+ against?: string;
13
+ emit?: boolean;
14
+ out?: string;
15
+ failOn?: string;
16
+ };
17
+ export type SemverResult = {
18
+ mode: 'emit';
19
+ surface: Surface;
20
+ written: string | null;
21
+ } | ({
22
+ mode: 'compare';
23
+ written: string;
24
+ } & SurfaceChanges);
25
+ export declare const pikkuSemver: import("#pikku").PikkuFunctionConfig<SemverInput, SemverResult, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<SemverInput, SemverResult, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<SemverInput, SemverResult, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
@@ -0,0 +1,50 @@
1
+ import { mkdirSync, writeFileSync } from 'fs';
2
+ import { dirname, join, resolve } from 'path';
3
+ import { pikkuSessionlessFunc } from '#pikku';
4
+ import { loadManifest } from '../../utils/contract-versions.js';
5
+ import { loadSurface, readSurface } from '../../utils/surface.js';
6
+ import { computeSurfaceDiff, } from '../../utils/surface-diff.js';
7
+ const FAIL_LEVELS = ['major', 'minor', 'patch'];
8
+ // Ordered by severity, so `--fail-on minor` also fails on major.
9
+ const SEVERITY = { patch: 0, minor: 1, major: 2 };
10
+ async function currentSurface(rootDir, outDir) {
11
+ const manifest = await loadManifest(join(rootDir, 'versions.pikku.json'));
12
+ return readSurface(outDir, manifest);
13
+ }
14
+ function writeJson(path, value) {
15
+ mkdirSync(dirname(path), { recursive: true });
16
+ writeFileSync(path, JSON.stringify(value, null, 2) + '\n', 'utf-8');
17
+ }
18
+ export const pikkuSemver = pikkuSessionlessFunc({
19
+ func: async ({ config }, input) => {
20
+ const outDir = resolve(config.rootDir, config.outDir);
21
+ const out = input?.out ? resolve(config.rootDir, input.out) : null;
22
+ if (input?.emit === true) {
23
+ const surface = await currentSurface(config.rootDir, outDir);
24
+ if (out)
25
+ writeJson(out, surface);
26
+ return { mode: 'emit', surface, written: out };
27
+ }
28
+ const against = input?.against;
29
+ if (!against) {
30
+ throw new Error("Nothing to compare against. Pass `--against <path|url>` — a `.pikku` directory, a snapshot file, or a snapshot URL — or `--emit` to produce this build's snapshot.");
31
+ }
32
+ const [before, after] = await Promise.all([
33
+ loadSurface(against),
34
+ currentSurface(config.rootDir, outDir),
35
+ ]);
36
+ const changes = computeSurfaceDiff(before, after, against);
37
+ const changesPath = out ?? join(outDir, 'changes.gen.json');
38
+ writeJson(changesPath, changes);
39
+ const failOn = input?.failOn;
40
+ if (failOn) {
41
+ if (!FAIL_LEVELS.includes(failOn)) {
42
+ throw new Error(`--fail-on must be one of ${FAIL_LEVELS.join(', ')}, got '${failOn}'.`);
43
+ }
44
+ if (SEVERITY[changes.verdict] >= SEVERITY[failOn]) {
45
+ throw new Error(`Release is ${changes.verdict} against ${against}, at or above --fail-on ${failOn}. See ${changesPath}.`);
46
+ }
47
+ }
48
+ return { mode: 'compare', written: changesPath, ...changes };
49
+ },
50
+ });
@@ -1,10 +1,11 @@
1
1
  import { join, resolve } from 'path';
2
2
  import { pikkuSessionlessFunc } from '#pikku';
3
- import { ConsoleLogger, LocalEmailService, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService, InMemoryAIRunStateService, QueueWebhookService, } from '@pikku/core/services';
4
- import { KyselyAIStorageService, KyselyAIRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
3
+ import { ConsoleLogger, LocalEmailService, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService, QueueWebhookService, } from '@pikku/core/services';
4
+ import { InMemoryAgentRunStateService } from '@pikku/core/ecosystem/services';
5
+ import { KyselyAgentStorageService, KyselyAgentRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
5
6
  import { stopSingletonServices } from '@pikku/core';
6
7
  import { pikkuState } from '@pikku/core/ecosystem';
7
- import { wireAIScorerQueueWorkers } from '@pikku/core/ai-scorer';
8
+ import { wireAgentScorerQueueWorkers } from '@pikku/core/ecosystem/agent-scorer';
8
9
  import { LocalMetaService } from '@pikku/core/services/local-meta';
9
10
  import { LocalContent, } from '@pikku/core/services/local-content';
10
11
  import { InMemorySchedulerService } from '@pikku/schedule';
@@ -12,7 +13,7 @@ import { resolveDb, createKysely, parseDatabaseUrl, } from '../db/local-db.js';
12
13
  import { loadUserBootstrap, loadUserModule } from './load-user-project.js';
13
14
  import { registerScenarioInstrumentation } from '../wirings/scenarios/register-scenario-instrumentation.js';
14
15
  import { resolveScaffoldFeature } from '../../utils/resolve-scaffold-feature.js';
15
- import { createDevAIAgentRunner } from './dev-ai-runner.js';
16
+ import { createDevAgentRunner } from './dev-agent-runner.js';
16
17
  import { resolveConsoleMount } from './serve-console.js';
17
18
  import { serverReadyLine } from '../../server/server-ready.js';
18
19
  import { createEphemeralContentSigningJWT } from '../../server/content-signing-jwt.js';
@@ -75,24 +76,24 @@ export const serve = pikkuSessionlessFunc({
75
76
  ? new LocalContent(localContentConfig, logger, contentSigningJWT)
76
77
  : undefined;
77
78
  const schedulerService = new InMemorySchedulerService();
78
- const aiStorage = kysely
79
- ? new KyselyAIStorageService(kysely)
79
+ const agentStorage = kysely
80
+ ? new KyselyAgentStorageService(kysely)
80
81
  : undefined;
81
- const aiRunState = kysely
82
- ? new KyselyAIRunStateService(kysely)
83
- : new InMemoryAIRunStateService();
82
+ const agentRunState = kysely
83
+ ? new KyselyAgentRunStateService(kysely)
84
+ : new InMemoryAgentRunStateService();
84
85
  const agentRunService = kysely
85
86
  ? new KyselyAgentRunService(kysely)
86
87
  : undefined;
87
- if (aiStorage)
88
- await aiStorage.init();
89
- if ('init' in aiRunState && typeof aiRunState.init === 'function') {
90
- await aiRunState.init();
88
+ if (agentStorage)
89
+ await agentStorage.init();
90
+ if ('init' in agentRunState && typeof agentRunState.init === 'function') {
91
+ await agentRunState.init();
91
92
  }
92
93
  const devLogger = new ConsoleLogger();
93
94
  const hasAgents = Object.keys(inspectorState.agents.agentsMeta).length > 0;
94
- const aiAgentRunner = hasAgents
95
- ? await createDevAIAgentRunner({
95
+ const agentRunner = hasAgents
96
+ ? await createDevAgentRunner({
96
97
  logger,
97
98
  projectRoot: config.rootDir,
98
99
  variables,
@@ -102,7 +103,7 @@ export const serve = pikkuSessionlessFunc({
102
103
  const serveQueueService = new InMemoryQueueService();
103
104
  const inMemoryServices = {
104
105
  logger: devLogger,
105
- ...(aiAgentRunner ? { aiAgentRunner } : {}),
106
+ ...(agentRunner ? { agentRunner } : {}),
106
107
  emailService: new LocalEmailService(),
107
108
  metaService: new LocalMetaService(pikkuDir),
108
109
  schedulerService,
@@ -111,8 +112,8 @@ export const serve = pikkuSessionlessFunc({
111
112
  workflowService,
112
113
  workflowRunService: workflowService,
113
114
  triggerService: new InMemoryTriggerService(),
114
- aiStorage,
115
- aiRunState,
115
+ agentStorage,
116
+ agentRunState,
116
117
  agentRunService,
117
118
  eventHub,
118
119
  ...(kysely ? { kysely } : {}),
@@ -128,7 +129,7 @@ export const serve = pikkuSessionlessFunc({
128
129
  };
129
130
  pikkuState(null, 'package', 'singletonServices', resolvedServices);
130
131
  resolvedServices.workflowService?.wireQueueWorkers?.();
131
- wireAIScorerQueueWorkers();
132
+ wireAgentScorerQueueWorkers();
132
133
  const { serverLifecycleFactory } = inspectorState.filesAndMethods;
133
134
  const loadLifecycle = async () => {
134
135
  if (!serverLifecycleFactory)
@@ -1,4 +1,4 @@
1
- import type { CoverageService } from '@pikku/core/services';
1
+ import type { CoverageService } from '@pikku/core/ecosystem/services';
2
2
  interface CoverageLogger {
3
3
  info(message: string): void;
4
4
  warn(message: string): void;
@@ -1,5 +1,5 @@
1
- import { V8CoverageService } from '@pikku/core/services/v8-coverage';
2
- import { IstanbulCoverageService } from '@pikku/core/services/istanbul-coverage';
1
+ import { V8CoverageService } from '@pikku/core/ecosystem/services/v8-coverage';
2
+ import { IstanbulCoverageService } from '@pikku/core/ecosystem/services/istanbul-coverage';
3
3
  import { registerBunCoverageLoader } from './bun-coverage-loader.js';
4
4
  import { mapPreciseCoverage, mapLineHitsToReport, } from '../../utils/precise-coverage-map.js';
5
5
  const isBunRuntime = () => typeof globalThis.Bun !== 'undefined';
@@ -0,0 +1,2 @@
1
+ import type { UpdateResult } from './update.js';
2
+ export declare const renderUpdate: (_services: unknown, result: UpdateResult) => void;
@@ -0,0 +1,102 @@
1
+ import { added, changed, dim, removed, table } from '../../fabric/lib/output.js';
2
+ const STATUS_LABEL = {
3
+ current: dim('current'),
4
+ outdated: changed('outdated'),
5
+ 'stale-install': changed('stale install'),
6
+ linked: dim('linked'),
7
+ manual: dim('manual'),
8
+ unresolved: removed('unresolved'),
9
+ };
10
+ /**
11
+ * A linked package is a deliberate local checkout, not a decision waiting on
12
+ * the user — so it is counted but never listed. Listing it buries the two rows
13
+ * that matter under twenty that don't, which is what a monorepo run looks like.
14
+ */
15
+ const QUIET = ['current', 'linked'];
16
+ export const renderUpdate = (_services, result) => {
17
+ const { entries, peers, summary, applied } = result;
18
+ if (entries.length === 0) {
19
+ console.log(dim('No @pikku/* dependencies found.'));
20
+ return;
21
+ }
22
+ const multiManifest = new Set(entries.map((entry) => entry.manifest)).size > 1;
23
+ const interesting = entries.filter((entry) => !QUIET.includes(entry.status));
24
+ const rows = (interesting.length > 0 ? interesting : entries).map((entry) => [
25
+ entry.package,
26
+ entry.range,
27
+ entry.installed ?? dim('—'),
28
+ entry.latest ?? dim('—'),
29
+ entry.target ? added(entry.target) : dim('—'),
30
+ STATUS_LABEL[entry.status],
31
+ ...(multiManifest ? [dim(entry.manifest)] : []),
32
+ ]);
33
+ console.log(table([
34
+ 'Package',
35
+ 'Range',
36
+ 'Installed',
37
+ 'Latest',
38
+ applied ? 'Written' : 'Update to',
39
+ 'Status',
40
+ ...(multiManifest ? ['Manifest'] : []),
41
+ ], rows));
42
+ for (const entry of entries) {
43
+ if (entry.reason &&
44
+ entry.status !== 'stale-install' &&
45
+ !QUIET.includes(entry.status)) {
46
+ console.log(`${dim('•')} ${entry.package}: ${dim(entry.reason)}`);
47
+ }
48
+ }
49
+ if (peers.length > 0) {
50
+ console.log();
51
+ console.log(changed(`${peers.length} unsatisfied peer requirement(s):`));
52
+ for (const peer of peers) {
53
+ const has = peer.found
54
+ ? `has ${peer.found}${peer.resolved ? dim(` (${peer.resolved})`) : ''}`
55
+ : removed('not declared');
56
+ console.log(` ${peer.package} needs ${peer.peer}@${peer.required} — ${has}`);
57
+ }
58
+ if (!applied && peers.some((peer) => peer.found)) {
59
+ console.log(dim(' run with --update-peers to write the ranges you already declare'));
60
+ }
61
+ if (peers.some((peer) => !peer.found)) {
62
+ console.log(dim(' a peer you do not declare is yours to add — update never adds one'));
63
+ }
64
+ }
65
+ console.log('─'.repeat(40));
66
+ const counts = [
67
+ dim(`${summary.checked} @pikku dependenc${summary.checked === 1 ? 'y' : 'ies'}`),
68
+ ];
69
+ if (summary.outdated > 0)
70
+ counts.push(changed(`${summary.outdated} outdated`));
71
+ if (summary.staleInstall > 0)
72
+ counts.push(changed(`${summary.staleInstall} stale install`));
73
+ if (summary.linked > 0)
74
+ counts.push(dim(`${summary.linked} linked`));
75
+ if (summary.manual > 0)
76
+ counts.push(dim(`${summary.manual} manual`));
77
+ if (summary.unresolved > 0)
78
+ counts.push(removed(`${summary.unresolved} unresolved`));
79
+ console.log(counts.join(' '));
80
+ if (applied) {
81
+ if (result.written.length === 0) {
82
+ console.log(added('✓') + ' ' + dim('nothing to write — already current'));
83
+ }
84
+ else {
85
+ console.log(added('✓') +
86
+ ` ${result.written.length} package.json file${result.written.length !== 1 ? 's' : ''} updated`);
87
+ console.log(result.installed
88
+ ? added('✓') +
89
+ ' ' +
90
+ dim(`${result.packageManager} install completed`)
91
+ : dim(result.packageManager === 'unknown'
92
+ ? ' no lockfile found — install with your package manager'
93
+ : ` skipped install — run \`${result.packageManager} install\``));
94
+ }
95
+ }
96
+ else if (summary.outdated > 0 || summary.staleInstall > 0) {
97
+ console.log(dim(' run `pikku update --update` to apply'));
98
+ }
99
+ else {
100
+ console.log(added('✓') + ' ' + dim('every @pikku dependency is current'));
101
+ }
102
+ };
@@ -0,0 +1,99 @@
1
+ export type PackageManager = 'bun' | 'npm' | 'yarn' | 'pnpm' | 'unknown';
2
+ export type DependencyField = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies';
3
+ export type UpdateStatus = 'current' | 'outdated' | 'stale-install' | 'linked' | 'manual' | 'unresolved';
4
+ export type UpdateEntry = {
5
+ package: string;
6
+ /** package.json holding the range, relative to the project root. */
7
+ manifest: string;
8
+ field: DependencyField;
9
+ range: string;
10
+ /** Version resolved in node_modules, when the project has been installed. */
11
+ installed: string | null;
12
+ latest: string | null;
13
+ /** The range `--update` would write, or null when there is nothing to write. */
14
+ target: string | null;
15
+ status: UpdateStatus;
16
+ reason?: string;
17
+ };
18
+ export type PeerFinding = {
19
+ /** The @pikku package that declares the peer. */
20
+ package: string;
21
+ peer: string;
22
+ required: string;
23
+ /** The range the project declares for the peer, or null when it declares none. */
24
+ found: string | null;
25
+ resolved: string | null;
26
+ manifest: string;
27
+ optional: boolean;
28
+ /** The range `--update-peers` would write. */
29
+ target: string;
30
+ };
31
+ export type UpdateResult = {
32
+ root: string;
33
+ registry: string;
34
+ tag: string;
35
+ packageManager: PackageManager;
36
+ entries: UpdateEntry[];
37
+ peers: PeerFinding[];
38
+ applied: boolean;
39
+ /** Manifests rewritten by `--update`, relative to the project root. */
40
+ written: string[];
41
+ installed: boolean;
42
+ summary: {
43
+ checked: number;
44
+ outdated: number;
45
+ staleInstall: number;
46
+ linked: number;
47
+ manual: number;
48
+ unresolved: number;
49
+ peerIssues: number;
50
+ };
51
+ };
52
+ export type UpdateInput = {
53
+ update?: boolean;
54
+ updatePeers?: boolean;
55
+ install?: boolean;
56
+ tag?: string;
57
+ registry?: string;
58
+ };
59
+ export type Packument = {
60
+ 'dist-tags'?: Record<string, string>;
61
+ versions?: Record<string, {
62
+ peerDependencies?: Record<string, string>;
63
+ peerDependenciesMeta?: Record<string, {
64
+ optional?: boolean;
65
+ }>;
66
+ }>;
67
+ };
68
+ export type FetchPackument = (name: string) => Promise<Packument | null>;
69
+ /** The range `--update` writes for `latest`, or null when the range is not ours to move. */
70
+ export declare const rewriteRange: (range: string, latest: string) => string | null;
71
+ export declare const findProjectRoot: (startDir: string, exists?: (path: string) => boolean) => string;
72
+ /**
73
+ * Where `install` has to run: the nearest directory at or above the project
74
+ * root that says which package manager owns the tree. In a monorepo that is the
75
+ * workspace root, not the package the command was invoked in.
76
+ *
77
+ * The corepack `packageManager` field wins over lockfiles — it states intent
78
+ * before a lockfile exists, and a project can carry a stale one from another
79
+ * tool. Guessing wrong is not a soft failure: the install spawns a binary that
80
+ * isn't on PATH.
81
+ */
82
+ export declare const findInstallRoot: (root: string, exists?: (path: string) => boolean, read?: (path: string) => any | null) => {
83
+ dir: string;
84
+ packageManager: PackageManager;
85
+ };
86
+ /** Every package.json the run covers: the project root, plus its workspaces. */
87
+ export declare const collectManifestPaths: (root: string) => Promise<string[]>;
88
+ /** Version resolved in node_modules, walking up from the manifest's own directory. */
89
+ export declare const resolveInstalled: (manifestDir: string, name: string, read?: (path: string) => any | null) => string | null;
90
+ export declare const runUpdate: ({ rootDir, apply, updatePeers, install, tag, registry, fetchPackument, }: {
91
+ rootDir: string;
92
+ apply: boolean;
93
+ updatePeers: boolean;
94
+ install: boolean;
95
+ tag: string;
96
+ registry: string;
97
+ fetchPackument?: FetchPackument;
98
+ }) => Promise<UpdateResult>;
99
+ export declare const pikkuUpdate: import("#pikku").PikkuFunctionConfig<UpdateInput, UpdateResult, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<UpdateInput, UpdateResult, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<UpdateInput, UpdateResult, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;