@pikku/cli 0.12.104 → 0.12.107

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 (787) hide show
  1. package/CHANGELOG.md +7306 -0
  2. package/console-app/assets/abnfDiagram-N423BO3Z-C5uToS9v.js +1 -0
  3. package/console-app/assets/arc-D8VmsdJb.js +1 -0
  4. package/console-app/assets/architecture-TIHT7OUA-B1IpeRpl.js +1 -0
  5. package/console-app/assets/architectureDiagram-T3A2C74G-BzJDRfv4.js +36 -0
  6. package/console-app/assets/{blockDiagram-677ZJIJ3-CcSxyQZH.js → blockDiagram-VBNYF7ZC-X5G9Ch-D.js} +5 -5
  7. package/console-app/assets/c4Diagram-5PPSVZJV-B59aO2Sc.js +10 -0
  8. package/console-app/assets/channel-sTJGzqn9.js +1 -0
  9. package/console-app/assets/{chunk-32BRIVSS-Atv4wjmh.js → chunk-2GRJ4B5K-Bwe32j_R.js} +1 -1
  10. package/console-app/assets/{chunk-HOUHSVGY-CyU0q_QM.js → chunk-4I5QYGJK-Beg_uQQN.js} +1 -1
  11. package/console-app/assets/chunk-5RXB4S5H-0HaMiv3k.js +231 -0
  12. package/console-app/assets/{chunk-MOJQB5TN-DUKLkDFX.js → chunk-6Q2QTUOP-CXxkExOq.js} +1 -1
  13. package/console-app/assets/chunk-7Z6QIM7H-zUqPbrvp.js +10 -0
  14. package/console-app/assets/{chunk-V7JOEXUC-BfBH_WMn.js → chunk-GF5L2VYU-CY0wGPcJ.js} +3 -3
  15. package/console-app/assets/chunk-I66GZJ75-BP5UNkJY.js +127 -0
  16. package/console-app/assets/chunk-JQJVKLGR-3dvnUUZN.js +156 -0
  17. package/console-app/assets/{chunk-VR4S4FIN-q02O9Hva.js → chunk-KBJHAD2P-ChD7o2bf.js} +1 -1
  18. package/console-app/assets/{chunk-KEIR6QF5-DNzq6p3w.js → chunk-KEIR6QF5-BICK3FdT.js} +32 -32
  19. package/console-app/assets/chunk-NSK5VX7P-oG1nh33f.js +2 -0
  20. package/console-app/assets/{chunk-ZGVPDNZ5-2b6-Ub1z.js → chunk-QR6OTTB3-D_uKJrj6.js} +3 -3
  21. package/console-app/assets/chunk-RYQCIY6F-CtYhP8W5.js +1 -0
  22. package/console-app/assets/chunk-UBXNYLIW-CMgD3fvL.js +1 -0
  23. package/console-app/assets/{chunk-C7G6YPKG-DhtQv4yx.js → chunk-W5SLKNZC-cjI56NCs.js} +1 -1
  24. package/console-app/assets/{chunk-Q4XR5HBZ-Cpak96ZI.js → chunk-WRU74C26-BQqHgerX.js} +7 -7
  25. package/console-app/assets/chunk-XXDRQBXY-CLdTtHL4.js +1 -0
  26. package/console-app/assets/classDiagram-JCYQIIEL-Dh0wx8TK.js +1 -0
  27. package/console-app/assets/classDiagram-v2-OCEON4UE-Dh0wx8TK.js +1 -0
  28. package/console-app/assets/cose-bilkent-JH36ORCC-DcHzDpDb.js +1 -0
  29. package/console-app/assets/cynefin-VYW2F7L2-Cn2zn-8-.js +1 -0
  30. package/console-app/assets/cynefinDiagram-MW4NZA55-C00zINdu.js +62 -0
  31. package/console-app/assets/cytoscape.esm-B-NFISlW.js +321 -0
  32. package/console-app/assets/dagre-DE2imcyX.js +1 -0
  33. package/console-app/assets/dagre-VZM6K2ZE-Bb2uZ7tL.js +4 -0
  34. package/console-app/assets/defaultLocale-BFoDCU3G.js +1 -0
  35. package/console-app/assets/{diagram-OA4YK3LP-Dv-j07Wh.js → diagram-7IWD3JNH-DUN-JIa1.js} +3 -3
  36. package/console-app/assets/{diagram-FQU43EPY-SGSSyx5P.js → diagram-B4RE2ZJO-Ct5iRFhI.js} +1 -1
  37. package/console-app/assets/diagram-LBJQPF4R-BZ2Hrr-9.js +24 -0
  38. package/console-app/assets/diagram-Q27KOJAE-BHaThj6T.js +24 -0
  39. package/console-app/assets/diagram-UB23O5K3-CH-SzBoh.js +41 -0
  40. package/console-app/assets/dist-CsdsWTxp.js +1 -0
  41. package/console-app/assets/ebnfDiagram-BXEA7PRR-BkjeNaQH.js +1 -0
  42. package/console-app/assets/{erDiagram-Q63AITRT-DQ5Gu1Tw.js → erDiagram-JOGREHBK-BdL77bY3.js} +3 -3
  43. package/console-app/assets/eventmodeling-45OFAUF4-C6PNVeIU.js +1 -0
  44. package/console-app/assets/flowDiagram-UKHOOZJN-CmURPvo2.js +1 -0
  45. package/console-app/assets/ganttDiagram-PKOTCBZU-DfgO68Ez.js +292 -0
  46. package/console-app/assets/gitGraph-TEB2WS4Q-BNbepAzP.js +1 -0
  47. package/console-app/assets/{gitGraphDiagram-IHSO6WYX-7JFgdH2Q.js → gitGraphDiagram-DS77QQ5N-Crb8obGB.js} +4 -4
  48. package/console-app/assets/graphlib-IlWVLY3o.js +1 -0
  49. package/console-app/assets/index-Dsydm-nw.css +1 -0
  50. package/console-app/assets/index-g8jA8DJo.js +290 -0
  51. package/console-app/assets/info-DKCQHKI2-D9tXUXel.js +1 -0
  52. package/console-app/assets/infoDiagram-6WML65LV-BvG8ufLa.js +2 -0
  53. package/console-app/assets/init-C-OQMol4.js +1 -0
  54. package/console-app/assets/isUndefined-T4snU1Mx.js +1 -0
  55. package/console-app/assets/{ishikawaDiagram-FXEZZL3T-XjQC7Fmw.js → ishikawaDiagram-WSZJBQD7-BWoGxEjO.js} +3 -3
  56. package/console-app/assets/{journeyDiagram-5HDEW3XC-DyIcpJQM.js → journeyDiagram-NVQOT4AX-CR4YcPHg.js} +3 -3
  57. package/console-app/assets/{kanban-definition-HUTT4EX6-B1zYF1dv.js → kanban-definition-27J2QSJJ-DYfc5EZe.js} +6 -6
  58. package/console-app/assets/{katex-Vhh-h91d.js → katex-CXMH3UgJ.js} +3 -3
  59. package/console-app/assets/{line-C6UySSzG.js → line-NIaf8Mfw.js} +1 -1
  60. package/console-app/assets/linear-DB_1BE-l.js +1 -0
  61. package/console-app/assets/map-BmPfXn7V.js +1 -0
  62. package/console-app/assets/{mermaid-parser.core-Tfk1Eudy.js → mermaid-parser.core-BqCVMHRZ.js} +3 -3
  63. package/console-app/assets/mermaid.core-CYaeERjF.js +42 -0
  64. package/console-app/assets/{mindmap-definition-LN4V7U3C-5tBdCFVy.js → mindmap-definition-FAOFIHXS-BCjT2v4F.js} +3 -3
  65. package/console-app/assets/{ordinal-hYBb2elL.js → ordinal-BDEzSJ7C.js} +1 -1
  66. package/console-app/assets/packet-7NZHBO7P-CzFZvntp.js +1 -0
  67. package/console-app/assets/path-fybaL0A-.js +1 -0
  68. package/console-app/assets/pegDiagram-VL7TDLO6-3iMotW64.js +1 -0
  69. package/console-app/assets/pie-RZYD4A2V-CXIoUTJn.js +1 -0
  70. package/console-app/assets/pieDiagram-7S7Q4E2Y-B-EOKkdd.js +39 -0
  71. package/console-app/assets/{quadrantDiagram-ABIIQ3AL-Bwdtm5-W.js → quadrantDiagram-CIZ2JOQS-DDdq8l2N.js} +2 -2
  72. package/console-app/assets/radar-I7S5WNFK-9SLSkJ73.js +1 -0
  73. package/console-app/assets/railroad-3IZDKUUU-DdJ88Ord.js +1 -0
  74. package/console-app/assets/railroad-abnf-AHOZXSZD-D2QiLT8B.js +1 -0
  75. package/console-app/assets/railroad-ebnf-EBAXGLYW-CSMqj9L2.js +1 -0
  76. package/console-app/assets/railroad-peg-LSFZ7HO6-Cg1-F8im.js +1 -0
  77. package/console-app/assets/railroadDiagram-AXF67PYL-BMW_s9QW.js +1 -0
  78. package/console-app/assets/{requirementDiagram-TGXJPOKE-CRV748Vu.js → requirementDiagram-LRYGKXZP-BzcnEvjk.js} +2 -2
  79. package/console-app/assets/rolldown-runtime-BcKkbAw3.js +1 -0
  80. package/console-app/assets/{rough.esm-CSKSodPl.js → rough.esm-Dy-Kn_BL.js} +1 -1
  81. package/console-app/assets/{sankeyDiagram-HTMAVEWB-CrFvfCvp.js → sankeyDiagram-W5VNT64P-Dh2TFvuG.js} +2 -2
  82. package/console-app/assets/sequenceDiagram-SI44F4Z6-b-m-tQYz.js +162 -0
  83. package/console-app/assets/src-Dm8O0hiD.js +1 -0
  84. package/console-app/assets/stateDiagram-OKZ733FA-W98kCkqj.js +1 -0
  85. package/console-app/assets/stateDiagram-v2-UEYNNEHI-DpnoMNHC.js +1 -0
  86. package/console-app/assets/swimlanes-SLNWSIFB-0q_y6cLu.js +2 -0
  87. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-BmGtOaWo.js +8 -0
  88. package/console-app/assets/timeline-definition-Z64GVDOM-DmsNlhwe.js +120 -0
  89. package/console-app/assets/treeView-QDETBFTQ-DY7A9uJm.js +1 -0
  90. package/console-app/assets/treemap-6X3UGDF4-DI73Vm90.js +1 -0
  91. package/console-app/assets/vennDiagram-T6HMQDX7-Czpr9diJ.js +34 -0
  92. package/console-app/assets/wardley-OPB4EBWU-C39AmDqd.js +1 -0
  93. package/console-app/assets/{wardleyDiagram-EHGQE667-uWxnqqVK.js → wardleyDiagram-T6FBY63Y-DOtWBvnk.js} +36 -36
  94. package/console-app/assets/{xychartDiagram-FW5EYKEG-ClVawwGR.js → xychartDiagram-ELKLHX3M-VHHuGrWV.js} +4 -4
  95. package/console-app/index.html +4 -2
  96. package/dist/.pikku/addon/index.d.ts +7 -0
  97. package/dist/.pikku/addon/index.js +7 -0
  98. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +7 -0
  99. package/dist/.pikku/addon/pikku-addon-types.gen.js +7 -0
  100. package/dist/.pikku/agent/index.d.ts +7 -0
  101. package/dist/.pikku/agent/index.js +7 -0
  102. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +14 -13
  103. package/dist/.pikku/agent/pikku-agent-types.gen.js +5 -6
  104. package/dist/.pikku/agent/pikku-model-aliases.gen.js +2 -2
  105. package/dist/.pikku/auth/index.d.ts +8 -0
  106. package/dist/.pikku/auth/index.js +8 -0
  107. package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +118 -0
  108. package/dist/.pikku/auth/pikku-auth-types.gen.js +92 -0
  109. package/dist/.pikku/channel/index.d.ts +7 -0
  110. package/dist/.pikku/channel/index.js +7 -0
  111. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +6 -8
  112. package/dist/.pikku/channel/pikku-channel-types.gen.js +2 -9
  113. package/dist/.pikku/cli/index.d.ts +7 -0
  114. package/dist/.pikku/cli/index.js +7 -0
  115. package/dist/.pikku/cli/pikku-cli-channel.js +14 -3
  116. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  117. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  118. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  119. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  120. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +3 -2
  121. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  122. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +2 -2
  123. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +86 -22
  124. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  125. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  126. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  127. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  128. package/dist/.pikku/console/index.d.ts +1 -0
  129. package/dist/.pikku/console/index.js +1 -0
  130. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  131. package/dist/.pikku/error/index.d.ts +7 -0
  132. package/dist/.pikku/error/index.js +7 -0
  133. package/dist/.pikku/error/pikku-error-types.gen.d.ts +7 -0
  134. package/dist/.pikku/error/pikku-error-types.gen.js +7 -0
  135. package/dist/.pikku/function/index.d.ts +7 -0
  136. package/dist/.pikku/function/index.js +7 -0
  137. package/dist/.pikku/function/pikku-function-types.gen.d.ts +26 -258
  138. package/dist/.pikku/function/pikku-function-types.gen.js +2 -236
  139. package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
  140. package/dist/.pikku/function/pikku-functions-meta.gen.json +193 -128
  141. package/dist/.pikku/function/pikku-functions.gen.js +14 -12
  142. package/dist/.pikku/gateway/index.d.ts +7 -0
  143. package/dist/.pikku/gateway/index.js +7 -0
  144. package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +36 -0
  145. package/dist/.pikku/gateway/pikku-gateway-types.gen.js +25 -0
  146. package/dist/.pikku/http/index.d.ts +7 -0
  147. package/dist/.pikku/http/index.js +7 -0
  148. package/dist/.pikku/http/pikku-http-types.gen.d.ts +4 -22
  149. package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
  150. package/dist/.pikku/mcp/index.d.ts +7 -0
  151. package/dist/.pikku/mcp/index.js +7 -0
  152. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +7 -4
  153. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  154. package/dist/.pikku/middleware/index.d.ts +7 -0
  155. package/dist/.pikku/middleware/index.js +7 -0
  156. package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +117 -0
  157. package/dist/.pikku/middleware/pikku-middleware-types.gen.js +108 -0
  158. package/dist/.pikku/node/index.d.ts +1 -0
  159. package/dist/.pikku/node/index.js +1 -0
  160. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  161. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  162. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  163. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  164. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  165. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  166. package/dist/.pikku/pikku-services.gen.d.ts +4 -4
  167. package/dist/.pikku/pikku-services.gen.js +3 -3
  168. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  169. package/dist/.pikku/pikku-types.gen.js +1 -1
  170. package/dist/.pikku/queue/index.d.ts +7 -0
  171. package/dist/.pikku/queue/index.js +7 -0
  172. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  173. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  174. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +2 -2
  175. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  176. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  177. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +2 -2
  178. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +8 -5
  179. package/dist/.pikku/scenarios/index.d.ts +7 -0
  180. package/dist/.pikku/scenarios/index.js +7 -0
  181. package/dist/.pikku/scenarios/pikku-personas.gen.d.ts +17 -0
  182. package/dist/.pikku/scenarios/pikku-personas.gen.js +17 -0
  183. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +2 -2
  184. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  185. package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +310 -0
  186. package/dist/.pikku/scenarios/pikku-scenario-types.gen.js +71 -0
  187. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +2 -2
  188. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  189. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  190. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  191. package/dist/.pikku/scheduler/index.d.ts +7 -0
  192. package/dist/.pikku/scheduler/index.js +7 -0
  193. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +3 -2
  194. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  195. package/dist/.pikku/schemas/register.gen.js +9 -7
  196. package/dist/.pikku/schemas/schemas/PikkuSemverOutput.schema.json +1 -0
  197. package/dist/.pikku/scopes/index.d.ts +7 -0
  198. package/dist/.pikku/scopes/index.js +7 -0
  199. package/dist/.pikku/scopes/pikku-personas.gen.d.ts +5 -13
  200. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  201. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  202. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -3
  203. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  204. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  205. package/dist/.pikku/secrets/index.d.ts +8 -0
  206. package/dist/.pikku/secrets/index.js +8 -0
  207. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -2
  208. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  209. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +8 -12
  210. package/dist/.pikku/secrets/pikku-secrets.gen.js +7 -9
  211. package/dist/.pikku/services/pikku-meta-service.gen.d.ts +7 -0
  212. package/dist/.pikku/services/pikku-meta-service.gen.js +9 -0
  213. package/dist/.pikku/setup/index.d.ts +7 -0
  214. package/dist/.pikku/setup/index.js +7 -0
  215. package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +66 -0
  216. package/dist/.pikku/setup/pikku-setup-types.gen.js +87 -0
  217. package/dist/.pikku/trigger/index.d.ts +7 -0
  218. package/dist/.pikku/trigger/index.js +7 -0
  219. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +6 -6
  220. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  221. package/dist/.pikku/variables/index.d.ts +8 -0
  222. package/dist/.pikku/variables/index.js +8 -0
  223. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -2
  224. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  225. package/dist/.pikku/variables/pikku-variables.gen.d.ts +7 -10
  226. package/dist/.pikku/variables/pikku-variables.gen.js +8 -10
  227. package/dist/.pikku/workflow/index.d.ts +7 -0
  228. package/dist/.pikku/workflow/index.js +7 -0
  229. package/dist/.pikku/workflow/meta/allWorkflow.gen.json +105 -82
  230. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +1 -2
  231. package/dist/.pikku/workflow/pikku-personas.gen.js +1 -1
  232. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +21 -263
  233. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +2 -65
  234. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
  235. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +0 -1
  236. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  237. package/dist/bin/pikku-bin.mjs +2 -2
  238. package/dist/src/cli.wiring.js +69 -7
  239. package/dist/src/deploy/analyzer/analyzer.js +39 -17
  240. package/dist/src/deploy/build-pipeline.d.ts +13 -0
  241. package/dist/src/deploy/build-pipeline.js +22 -0
  242. package/dist/src/deploy/bundler/bundler.js +2 -2
  243. package/dist/src/deploy/server-entry.js +1 -1
  244. package/dist/src/fabric/fabric-commands.d.ts +104 -104
  245. package/dist/src/fabric/functions/add.function.d.ts +4 -4
  246. package/dist/src/fabric/functions/add.function.js +1 -1
  247. package/dist/src/fabric/functions/addon-verify.function.d.ts +4 -4
  248. package/dist/src/fabric/functions/addon-verify.function.js +1 -1
  249. package/dist/src/fabric/functions/db-schema.function.d.ts +4 -4
  250. package/dist/src/fabric/functions/db-schema.function.js +1 -1
  251. package/dist/src/fabric/functions/deploy-list.function.d.ts +4 -4
  252. package/dist/src/fabric/functions/deploy-list.function.js +1 -1
  253. package/dist/src/fabric/functions/deploy-units.function.d.ts +4 -4
  254. package/dist/src/fabric/functions/deploy-units.function.js +1 -1
  255. package/dist/src/fabric/functions/deploy.function.d.ts +8 -8
  256. package/dist/src/fabric/functions/deploy.function.js +1 -1
  257. package/dist/src/fabric/functions/domains-add.function.d.ts +4 -4
  258. package/dist/src/fabric/functions/domains-add.function.js +1 -1
  259. package/dist/src/fabric/functions/domains-list.function.d.ts +4 -4
  260. package/dist/src/fabric/functions/domains-list.function.js +1 -1
  261. package/dist/src/fabric/functions/domains-remove.function.d.ts +4 -4
  262. package/dist/src/fabric/functions/domains-remove.function.js +1 -1
  263. package/dist/src/fabric/functions/errors.function.d.ts +4 -4
  264. package/dist/src/fabric/functions/errors.function.js +1 -1
  265. package/dist/src/fabric/functions/init.function.d.ts +4 -4
  266. package/dist/src/fabric/functions/init.function.js +1 -1
  267. package/dist/src/fabric/functions/link.function.d.ts +4 -4
  268. package/dist/src/fabric/functions/link.function.js +1 -1
  269. package/dist/src/fabric/functions/llm-key.function.d.ts +4 -4
  270. package/dist/src/fabric/functions/llm-key.function.js +1 -1
  271. package/dist/src/fabric/functions/login.function.d.ts +4 -4
  272. package/dist/src/fabric/functions/login.function.js +1 -1
  273. package/dist/src/fabric/functions/logs.function.d.ts +4 -4
  274. package/dist/src/fabric/functions/logs.function.js +1 -1
  275. package/dist/src/fabric/functions/metrics.function.d.ts +4 -4
  276. package/dist/src/fabric/functions/metrics.function.js +1 -1
  277. package/dist/src/fabric/functions/publish.function.d.ts +4 -4
  278. package/dist/src/fabric/functions/publish.function.js +1 -1
  279. package/dist/src/fabric/functions/rollback.function.d.ts +4 -4
  280. package/dist/src/fabric/functions/rollback.function.js +1 -1
  281. package/dist/src/fabric/functions/secrets-list.function.d.ts +4 -4
  282. package/dist/src/fabric/functions/secrets-list.function.js +1 -1
  283. package/dist/src/fabric/functions/secrets-rotate.function.d.ts +4 -4
  284. package/dist/src/fabric/functions/secrets-rotate.function.js +1 -1
  285. package/dist/src/fabric/functions/secrets-set.function.d.ts +4 -4
  286. package/dist/src/fabric/functions/secrets-set.function.js +1 -1
  287. package/dist/src/fabric/functions/smoke.function.d.ts +4 -4
  288. package/dist/src/fabric/functions/smoke.function.js +13 -13
  289. package/dist/src/fabric/functions/status.function.d.ts +4 -4
  290. package/dist/src/fabric/functions/status.function.js +1 -1
  291. package/dist/src/fabric/functions/trace.function.d.ts +4 -4
  292. package/dist/src/fabric/functions/trace.function.js +1 -1
  293. package/dist/src/fabric/functions/validate.function.d.ts +4 -4
  294. package/dist/src/fabric/functions/validate.function.js +90 -27
  295. package/dist/src/fabric/lib/git.d.ts +23 -0
  296. package/dist/src/fabric/lib/git.js +39 -0
  297. package/dist/src/functions/commands/all.d.ts +1 -1
  298. package/dist/src/functions/commands/all.js +1 -1
  299. package/dist/src/functions/commands/audit.d.ts +11 -1
  300. package/dist/src/functions/commands/audit.js +59 -23
  301. package/dist/src/functions/commands/binary.d.ts +4 -4
  302. package/dist/src/functions/commands/binary.js +1 -1
  303. package/dist/src/functions/commands/bootstrap.d.ts +1 -1
  304. package/dist/src/functions/commands/bootstrap.js +5 -4
  305. package/dist/src/functions/commands/bun-coverage-loader.js +4 -1
  306. package/dist/src/functions/commands/db-audit.d.ts +1 -1
  307. package/dist/src/functions/commands/db-audit.js +1 -1
  308. package/dist/src/functions/commands/db-baseline.d.ts +1 -1
  309. package/dist/src/functions/commands/db-baseline.js +1 -1
  310. package/dist/src/functions/commands/db-check.d.ts +1 -1
  311. package/dist/src/functions/commands/db-check.js +1 -1
  312. package/dist/src/functions/commands/db-codegen.d.ts +1 -1
  313. package/dist/src/functions/commands/db-codegen.js +1 -1
  314. package/dist/src/functions/commands/db-export.d.ts +1 -1
  315. package/dist/src/functions/commands/db-export.js +1 -1
  316. package/dist/src/functions/commands/db-generate.d.ts +1 -1
  317. package/dist/src/functions/commands/db-generate.js +1 -1
  318. package/dist/src/functions/commands/db-migrate.d.ts +1 -1
  319. package/dist/src/functions/commands/db-migrate.js +1 -1
  320. package/dist/src/functions/commands/db-reset.d.ts +4 -4
  321. package/dist/src/functions/commands/db-reset.js +1 -1
  322. package/dist/src/functions/commands/deploy-apply.d.ts +4 -4
  323. package/dist/src/functions/commands/deploy-apply.js +14 -2
  324. package/dist/src/functions/commands/deploy-info.d.ts +1 -1
  325. package/dist/src/functions/commands/deploy-info.js +1 -1
  326. package/dist/src/functions/commands/deploy-plan.d.ts +4 -4
  327. package/dist/src/functions/commands/deploy-plan.js +6 -2
  328. package/dist/src/functions/commands/{dev-ai-runner.d.ts → dev-agent-runner.d.ts} +5 -4
  329. package/dist/src/functions/commands/{dev-ai-runner.js → dev-agent-runner.js} +4 -4
  330. package/dist/src/functions/commands/dev.d.ts +4 -4
  331. package/dist/src/functions/commands/dev.js +32 -25
  332. package/dist/src/functions/commands/emails-init.d.ts +1 -1
  333. package/dist/src/functions/commands/emails-init.js +19 -6
  334. package/dist/src/functions/commands/enable.d.ts +8 -8
  335. package/dist/src/functions/commands/enable.js +4 -2
  336. package/dist/src/functions/commands/environment.d.ts +27 -0
  337. package/dist/src/functions/commands/environment.js +36 -2
  338. package/dist/src/functions/commands/import-n8n.d.ts +4 -4
  339. package/dist/src/functions/commands/import-n8n.js +1 -1
  340. package/dist/src/functions/commands/info.d.ts +4 -4
  341. package/dist/src/functions/commands/info.js +1 -1
  342. package/dist/src/functions/commands/knowledge-index.d.ts +4 -4
  343. package/dist/src/functions/commands/knowledge-index.js +1 -1
  344. package/dist/src/functions/commands/knowledge-validate.d.ts +4 -4
  345. package/dist/src/functions/commands/knowledge-validate.js +1 -1
  346. package/dist/src/functions/commands/login.d.ts +9 -9
  347. package/dist/src/functions/commands/login.js +1 -1
  348. package/dist/src/functions/commands/meta.d.ts +37 -37
  349. package/dist/src/functions/commands/meta.js +1 -1
  350. package/dist/src/functions/commands/new-addon.d.ts +5 -4
  351. package/dist/src/functions/commands/new-addon.js +27 -25
  352. package/dist/src/functions/commands/new-function.d.ts +4 -4
  353. package/dist/src/functions/commands/new-function.js +4 -4
  354. package/dist/src/functions/commands/new-middleware.d.ts +4 -4
  355. package/dist/src/functions/commands/new-middleware.js +3 -3
  356. package/dist/src/functions/commands/new-permission.d.ts +4 -4
  357. package/dist/src/functions/commands/new-permission.js +3 -3
  358. package/dist/src/functions/commands/new-wiring.d.ts +4 -4
  359. package/dist/src/functions/commands/new-wiring.js +8 -8
  360. package/dist/src/functions/commands/persona-sync.d.ts +4 -4
  361. package/dist/src/functions/commands/persona-sync.js +1 -1
  362. package/dist/src/functions/commands/persona.d.ts +5 -5
  363. package/dist/src/functions/commands/persona.js +6 -6
  364. package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
  365. package/dist/src/functions/commands/pikku-command-bootstrap.js +7 -2
  366. package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
  367. package/dist/src/functions/commands/pikku-command-summary.js +2 -2
  368. package/dist/src/functions/commands/roles-audit.d.ts +1 -1
  369. package/dist/src/functions/commands/roles-audit.js +1 -1
  370. package/dist/src/functions/commands/roles-prune.d.ts +4 -4
  371. package/dist/src/functions/commands/roles-prune.js +1 -1
  372. package/dist/src/functions/commands/scenario-browser.d.ts +18 -12
  373. package/dist/src/functions/commands/scenario-browser.js +20 -6
  374. package/dist/src/functions/commands/scenario-formatter.d.ts +6 -52
  375. package/dist/src/functions/commands/scenario-ladder.d.ts +4 -4
  376. package/dist/src/functions/commands/scenario.d.ts +8 -11
  377. package/dist/src/functions/commands/scenario.js +107 -55
  378. package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
  379. package/dist/src/functions/commands/scopes-audit.js +1 -1
  380. package/dist/src/functions/commands/scopes-prune.d.ts +4 -4
  381. package/dist/src/functions/commands/scopes-prune.js +1 -1
  382. package/dist/src/functions/commands/semver-render.d.ts +2 -0
  383. package/dist/src/functions/commands/semver-render.js +60 -0
  384. package/dist/src/functions/commands/semver.d.ts +25 -0
  385. package/dist/src/functions/commands/semver.js +50 -0
  386. package/dist/src/functions/commands/serve.d.ts +4 -4
  387. package/dist/src/functions/commands/serve.js +25 -22
  388. package/dist/src/functions/commands/skills.d.ts +8 -8
  389. package/dist/src/functions/commands/skills.js +1 -1
  390. package/dist/src/functions/commands/update-render.d.ts +2 -0
  391. package/dist/src/functions/commands/update-render.js +102 -0
  392. package/dist/src/functions/commands/update.d.ts +99 -0
  393. package/dist/src/functions/commands/update.js +392 -0
  394. package/dist/src/functions/commands/validate.d.ts +4 -4
  395. package/dist/src/functions/commands/validate.js +1 -1
  396. package/dist/src/functions/commands/versions-check.d.ts +1 -1
  397. package/dist/src/functions/commands/versions-check.js +1 -1
  398. package/dist/src/functions/commands/versions-init.d.ts +4 -4
  399. package/dist/src/functions/commands/versions-init.js +1 -1
  400. package/dist/src/functions/commands/versions-update.d.ts +1 -1
  401. package/dist/src/functions/commands/versions-update.js +1 -1
  402. package/dist/src/functions/commands/watch.d.ts +4 -4
  403. package/dist/src/functions/commands/watch.js +1 -1
  404. package/dist/src/functions/db/annotation-parser.d.ts +11 -3
  405. package/dist/src/functions/db/better-auth-schema.js +1 -1
  406. package/dist/src/functions/db/db-codegen.js +4 -2
  407. package/dist/src/functions/db/local-db.js +3 -3
  408. package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
  409. package/dist/src/functions/runtimes/fetch/index.js +1 -1
  410. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
  411. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +1 -1
  412. package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
  413. package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.js +1 -1
  414. package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
  415. package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.js +1 -1
  416. package/dist/src/functions/surface/build-surface-doc.d.ts +22 -0
  417. package/dist/src/functions/surface/build-surface-doc.js +151 -0
  418. package/dist/src/functions/surface/collect-surface-usage.d.ts +16 -0
  419. package/dist/src/functions/surface/collect-surface-usage.js +35 -0
  420. package/dist/src/functions/surface/collect-surface.d.ts +19 -1
  421. package/dist/src/functions/surface/collect-surface.js +104 -16
  422. package/dist/src/functions/surface/generate-surface-doc.d.ts +1 -0
  423. package/dist/src/functions/surface/generate-surface-doc.js +46 -0
  424. package/dist/src/functions/surface/shipped-surface-doc.d.ts +16 -0
  425. package/dist/src/functions/surface/shipped-surface-doc.js +44 -0
  426. package/dist/src/functions/surface/surface-doc.types.d.ts +69 -0
  427. package/dist/src/functions/surface/surface-doc.types.js +1 -0
  428. package/dist/src/functions/surface/surface-editorial.d.ts +25 -0
  429. package/dist/src/functions/surface/surface-editorial.js +101 -0
  430. package/dist/src/functions/surface/write-surface-usage.d.ts +12 -0
  431. package/dist/src/functions/surface/write-surface-usage.js +18 -0
  432. package/dist/src/functions/validate/pikku-barrel-checks.d.ts +12 -0
  433. package/dist/src/functions/validate/pikku-barrel-checks.js +97 -0
  434. package/dist/src/functions/validate/scenario-file-checks.js +1 -1
  435. package/dist/src/functions/validate/shared-checks.d.ts +10 -0
  436. package/dist/src/functions/validate/shared-checks.js +16 -2
  437. package/dist/src/functions/validate/validate-registry.js +20 -0
  438. package/dist/src/functions/validate/workspace-exports-checks.d.ts +14 -0
  439. package/dist/src/functions/validate/workspace-exports-checks.js +211 -0
  440. package/dist/src/functions/wirings/agent/pikku-command-agent-types.d.ts +1 -0
  441. package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent-types.js → agent/pikku-command-agent-types.js} +5 -4
  442. package/dist/src/functions/wirings/agent/pikku-command-agent.d.ts +1 -0
  443. package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent.js → agent/pikku-command-agent.js} +7 -7
  444. package/dist/src/functions/wirings/agent/pikku-command-public-agent.d.ts +1 -0
  445. package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.js +4 -4
  446. package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.d.ts +2 -2
  447. package/dist/src/functions/wirings/agent/serialize-agent-types.d.ts +1 -0
  448. package/dist/src/functions/wirings/{ai-agent/serialize-ai-agent-types.js → agent/serialize-agent-types.js} +24 -30
  449. package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.js +1 -1
  450. package/dist/src/functions/wirings/agent/serialize-public-agent.d.ts +5 -0
  451. package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.js +5 -3
  452. package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.d.ts +1 -0
  453. package/dist/src/functions/wirings/{ai-scorer/pikku-command-ai-scorer.js → agent-scorer/pikku-command-agent-scorer.js} +7 -7
  454. package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.d.ts +1 -1
  455. package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +4 -4
  456. package/dist/src/functions/wirings/auth/pikku-command-auth.js +5 -4
  457. package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +1 -1
  458. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +3 -8
  459. package/dist/src/functions/wirings/auth/serialize-auth-guards.d.ts +12 -0
  460. package/dist/src/functions/wirings/auth/serialize-auth-guards.js +168 -0
  461. package/dist/src/functions/wirings/auth/serialize-auth-types.d.ts +4 -4
  462. package/dist/src/functions/wirings/auth/serialize-auth-types.js +4 -4
  463. package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
  464. package/dist/src/functions/wirings/channels/pikku-channels.js +2 -2
  465. package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
  466. package/dist/src/functions/wirings/channels/pikku-command-channel-types.js +6 -3
  467. package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
  468. package/dist/src/functions/wirings/channels/pikku-command-channels-map.js +1 -1
  469. package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
  470. package/dist/src/functions/wirings/channels/pikku-command-channels.js +2 -2
  471. package/dist/src/functions/wirings/channels/serialize-channel-types.d.ts +3 -1
  472. package/dist/src/functions/wirings/channels/serialize-channel-types.js +18 -24
  473. package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +1 -2
  474. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
  475. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +2 -2
  476. package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
  477. package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +3 -3
  478. package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
  479. package/dist/src/functions/wirings/cli/pikku-command-cli.js +2 -2
  480. package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
  481. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +9 -3
  482. package/dist/src/functions/wirings/cli/serialize-cli-types.d.ts +1 -1
  483. package/dist/src/functions/wirings/cli/serialize-cli-types.js +9 -3
  484. package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
  485. package/dist/src/functions/wirings/console/pikku-command-console-functions.js +6 -5
  486. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
  487. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
  488. package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
  489. package/dist/src/functions/wirings/console/serialize-console-functions.js +20 -4
  490. package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
  491. package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +2 -2
  492. package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +3 -4
  493. package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
  494. package/dist/src/functions/wirings/emails/pikku-command-emails.js +1 -1
  495. package/dist/src/functions/wirings/emails/serialize-emails.js +2 -2
  496. package/dist/src/functions/wirings/errors/pikku-command-error-types.d.ts +1 -0
  497. package/dist/src/functions/wirings/errors/pikku-command-error-types.js +17 -0
  498. package/dist/src/functions/wirings/errors/serialize-error-types.d.ts +9 -0
  499. package/dist/src/functions/wirings/errors/serialize-error-types.js +16 -0
  500. package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
  501. package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +20 -8
  502. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +4 -4
  503. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +17 -3
  504. package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
  505. package/dist/src/functions/wirings/functions/pikku-command-functions.js +2 -2
  506. package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.d.ts +14 -0
  507. package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.js +119 -0
  508. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
  509. package/dist/src/functions/wirings/functions/pikku-command-services.js +18 -3
  510. package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
  511. package/dist/src/functions/wirings/functions/schemas.js +1 -1
  512. package/dist/src/functions/wirings/functions/serialize-addon-types.d.ts +13 -0
  513. package/dist/src/functions/wirings/functions/serialize-addon-types.js +20 -1
  514. package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +1 -1
  515. package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +7 -2
  516. package/dist/src/functions/wirings/functions/serialize-function-types.js +46 -361
  517. package/dist/src/functions/wirings/functions/serialize-leaf-index.d.ts +17 -0
  518. package/dist/src/functions/wirings/functions/serialize-leaf-index.js +27 -0
  519. package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.d.ts +7 -0
  520. package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.js +24 -0
  521. package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
  522. package/dist/src/functions/wirings/gateway/pikku-command-gateway.js +1 -1
  523. package/dist/src/functions/wirings/gateway/serialize-gateway-types.d.ts +6 -0
  524. package/dist/src/functions/wirings/gateway/serialize-gateway-types.js +55 -0
  525. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
  526. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.js +3 -4
  527. package/dist/src/functions/wirings/graph/serialize-graph-wirings.d.ts +1 -1
  528. package/dist/src/functions/wirings/graph/serialize-graph-wirings.js +2 -2
  529. package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
  530. package/dist/src/functions/wirings/http/pikku-command-http-map.js +3 -3
  531. package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
  532. package/dist/src/functions/wirings/http/pikku-command-http-routes.js +2 -2
  533. package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
  534. package/dist/src/functions/wirings/http/pikku-command-http-types.js +7 -3
  535. package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
  536. package/dist/src/functions/wirings/http/pikku-command-openapi.js +1 -1
  537. package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
  538. package/dist/src/functions/wirings/http/pikku-http-routes.js +2 -2
  539. package/dist/src/functions/wirings/http/serialize-http-types.d.ts +3 -1
  540. package/dist/src/functions/wirings/http/serialize-http-types.js +20 -35
  541. package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +5 -1
  542. package/dist/src/functions/wirings/http/serialize-typed-http-map.js +5 -4
  543. package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
  544. package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.js +1 -1
  545. package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
  546. package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.js +5 -2
  547. package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
  548. package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +7 -3
  549. package/dist/src/functions/wirings/mcp/serialize-mcp-types.d.ts +3 -1
  550. package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +15 -15
  551. package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
  552. package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +1 -1
  553. package/dist/src/functions/wirings/middleware/serialize-middleware-types.d.ts +9 -0
  554. package/dist/src/functions/wirings/middleware/serialize-middleware-types.js +176 -0
  555. package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
  556. package/dist/src/functions/wirings/package/pikku-command-package-types.js +1 -1
  557. package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
  558. package/dist/src/functions/wirings/package/pikku-command-package.js +1 -1
  559. package/dist/src/functions/wirings/package/serialize-package-types.js +0 -4
  560. package/dist/src/functions/wirings/package/serialize-package.js +1 -1
  561. package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
  562. package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +1 -1
  563. package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +4 -4
  564. package/dist/src/functions/wirings/personas/pikku-command-personas.js +1 -1
  565. package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +1 -1
  566. package/dist/src/functions/wirings/personas/serialize-personas-types.js +9 -28
  567. package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
  568. package/dist/src/functions/wirings/queue/pikku-command-queue-map.js +1 -1
  569. package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
  570. package/dist/src/functions/wirings/queue/pikku-command-queue-service.js +1 -1
  571. package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
  572. package/dist/src/functions/wirings/queue/pikku-command-queue-types.js +4 -2
  573. package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
  574. package/dist/src/functions/wirings/queue/pikku-command-queue.js +1 -1
  575. package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
  576. package/dist/src/functions/wirings/queue/pikku-queue-map.js +1 -1
  577. package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
  578. package/dist/src/functions/wirings/queue/pikku-queue.js +1 -1
  579. package/dist/src/functions/wirings/queue/serialize-queue-map.js +1 -1
  580. package/dist/src/functions/wirings/queue/serialize-queue-types.d.ts +3 -1
  581. package/dist/src/functions/wirings/queue/serialize-queue-types.js +8 -5
  582. package/dist/src/functions/wirings/queue/serialize-queue-wrapper.js +1 -1
  583. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
  584. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +3 -4
  585. package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
  586. package/dist/src/functions/wirings/realtime/pikku-command-realtime.js +1 -1
  587. package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +1 -1
  588. package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +4 -8
  589. package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +4 -4
  590. package/dist/src/functions/wirings/roles/pikku-command-roles.js +2 -2
  591. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
  592. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +6 -6
  593. package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
  594. package/dist/src/functions/wirings/rpc/pikku-command-react-query.js +1 -1
  595. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
  596. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +6 -6
  597. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
  598. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +1 -1
  599. package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
  600. package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +1 -1
  601. package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
  602. package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +2 -2
  603. package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
  604. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +3 -2
  605. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.d.ts +1 -1
  606. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +4 -2
  607. package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +5 -5
  608. package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -3
  609. package/dist/src/functions/wirings/scenarios/scenario-partition.d.ts +1 -1
  610. package/dist/src/functions/wirings/scenarios/scenario-schema-partition.d.ts +1 -1
  611. package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +4 -4
  612. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
  613. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.js +5 -2
  614. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
  615. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +1 -1
  616. package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.d.ts +3 -1
  617. package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +10 -5
  618. package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +4 -4
  619. package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +4 -3
  620. package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
  621. package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +1 -1
  622. package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +13 -19
  623. package/dist/src/functions/wirings/setup/serialize-setup-types.d.ts +7 -0
  624. package/dist/src/functions/wirings/setup/serialize-setup-types.js +111 -0
  625. package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +4 -4
  626. package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.js +2 -2
  627. package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
  628. package/dist/src/functions/wirings/triggers/pikku-command-trigger.js +1 -1
  629. package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
  630. package/dist/src/functions/wirings/triggers/serialize-trigger-types.d.ts +3 -1
  631. package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +18 -11
  632. package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.d.ts +1 -1
  633. package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +18 -17
  634. package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.d.ts +10 -9
  635. package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +67 -49
  636. package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
  637. package/dist/src/functions/wirings/variables/pikku-command-variables.js +1 -1
  638. package/dist/src/functions/wirings/variables/serialize-variables-types.js +12 -16
  639. package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.d.ts +1 -1
  640. package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.js +4 -3
  641. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +1 -1
  642. package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +9 -11
  643. package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
  644. package/dist/src/functions/wirings/webhook/pikku-command-webhook.js +6 -6
  645. package/dist/src/functions/wirings/webhook/serialize-webhook.d.ts +1 -1
  646. package/dist/src/functions/wirings/webhook/serialize-webhook.js +3 -2
  647. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
  648. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +4 -4
  649. package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
  650. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +14 -5
  651. package/dist/src/functions/wirings/workflow/serialize-personas.js +2 -1
  652. package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.d.ts +1 -2
  653. package/dist/src/functions/wirings/workflow/serialize-scenario-types.d.ts +2 -0
  654. package/dist/src/functions/wirings/workflow/serialize-scenario-types.js +511 -0
  655. package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +1 -2
  656. package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +1 -1
  657. package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +4 -4
  658. package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +0 -4
  659. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +1 -1
  660. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +3 -2
  661. package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
  662. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +28 -441
  663. package/dist/src/functions/workflows/all.workflow.d.ts +1 -1
  664. package/dist/src/functions/workflows/all.workflow.js +83 -27
  665. package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
  666. package/dist/src/server/bun-server-runner.d.ts +1 -1
  667. package/dist/src/server/content-signing-jwt.js +1 -1
  668. package/dist/src/server/dev-server-runner.interface.d.ts +1 -1
  669. package/dist/src/server/node-server-runner.d.ts +1 -1
  670. package/dist/src/server/node-server-runner.js +5 -2
  671. package/dist/src/services/cli-logger.service.d.ts +1 -1
  672. package/dist/src/services/cli-logger.service.js +1 -1
  673. package/dist/src/services.d.ts +9 -6
  674. package/dist/src/services.js +22 -6
  675. package/dist/src/utils/file-writer.d.ts +2 -0
  676. package/dist/src/utils/file-writer.js +37 -1
  677. package/dist/src/utils/is-deploy-codegen.d.ts +21 -0
  678. package/dist/src/utils/is-deploy-codegen.js +23 -0
  679. package/dist/src/utils/leaf-import-path.d.ts +16 -0
  680. package/dist/src/utils/leaf-import-path.js +15 -0
  681. package/dist/src/utils/parse-cli-filters.js +15 -35
  682. package/dist/src/utils/pikku-cli-config.d.ts +11 -0
  683. package/dist/src/utils/pikku-cli-config.js +82 -12
  684. package/dist/src/utils/remove-legacy-scaffold-file.d.ts +14 -0
  685. package/dist/src/utils/remove-legacy-scaffold-file.js +36 -1
  686. package/dist/src/utils/resolve-scaffold-feature.js +5 -1
  687. package/dist/src/utils/schema-diff.d.ts +22 -0
  688. package/dist/src/utils/schema-diff.js +190 -0
  689. package/dist/src/utils/serialize-meta-ts.js +1 -1
  690. package/dist/src/utils/serialize-schemas.d.ts +1 -1
  691. package/dist/src/utils/surface-diff.d.ts +35 -0
  692. package/dist/src/utils/surface-diff.js +183 -0
  693. package/dist/src/utils/surface.d.ts +51 -0
  694. package/dist/src/utils/surface.js +156 -0
  695. package/dist/src/utils/tsc-check.d.ts +1 -1
  696. package/dist/src/utils/tsc-check.js +1 -1
  697. package/dist/tsconfig.tsbuildinfo +1 -1
  698. package/package.json +53 -44
  699. package/surface.json +4464 -0
  700. package/console-app/assets/abnfDiagram-VRR7QNED-DTI8lQi3.js +0 -1
  701. package/console-app/assets/arc-B_XK0Xbk.js +0 -1
  702. package/console-app/assets/architecture-TIHT7OUA-BtQ4ypaP.js +0 -1
  703. package/console-app/assets/architectureDiagram-ZJ3FMSHR-CzE1T938.js +0 -36
  704. package/console-app/assets/c4Diagram-LMCZKHZV-DSsAqAm5.js +0 -10
  705. package/console-app/assets/channel-yWsB39zH.js +0 -1
  706. package/console-app/assets/chunk-52WLFC77-DkXgWHeH.js +0 -10
  707. package/console-app/assets/chunk-EX3LRPZG-0GIQyrn1.js +0 -231
  708. package/console-app/assets/chunk-FWX5IMBZ-DZvpxO7-.js +0 -2
  709. package/console-app/assets/chunk-ICXQ74PX-CzAIiCX5.js +0 -2
  710. package/console-app/assets/chunk-OGEWGWER-DhmfsQT_.js +0 -1
  711. package/console-app/assets/chunk-PUDLZKDR-BMAILUQ6.js +0 -156
  712. package/console-app/assets/chunk-RYQCIY6F-9OVlGtkS.js +0 -1
  713. package/console-app/assets/chunk-VAUOI2AC-DbUlDq35.js +0 -1
  714. package/console-app/assets/chunk-WYO6CB5R-cQuwndtk.js +0 -127
  715. package/console-app/assets/chunk-XXDRQBXY-D0yYTMY0.js +0 -1
  716. package/console-app/assets/chunk-ZIRB5QZD-H-kepumB.js +0 -32
  717. package/console-app/assets/classDiagram-OUVF2IWQ-jBNBOKfR.js +0 -1
  718. package/console-app/assets/classDiagram-v2-EOCWNBFH-jBNBOKfR.js +0 -1
  719. package/console-app/assets/cose-bilkent-JH36ORCC-D8cALtKZ.js +0 -1
  720. package/console-app/assets/cynefin-VYW2F7L2-BphwdLzc.js +0 -1
  721. package/console-app/assets/cynefinDiagram-TSTJHNR4-7Rk31pXX.js +0 -62
  722. package/console-app/assets/cytoscape.esm-h6BdjjI9.js +0 -321
  723. package/console-app/assets/dagre-CXRCoUWR.js +0 -1
  724. package/console-app/assets/dagre-VKFMJZFB-e8-5QJxJ.js +0 -4
  725. package/console-app/assets/defaultLocale-C8Fc0cco.js +0 -1
  726. package/console-app/assets/diagram-G47NLZAW-F_m68BCv.js +0 -24
  727. package/console-app/assets/diagram-NH7WQ7WH-5p6A3YHp.js +0 -24
  728. package/console-app/assets/diagram-WEI45ONY-1gqT-Dqp.js +0 -41
  729. package/console-app/assets/dist-DQ3gF-0S.js +0 -1
  730. package/console-app/assets/ebnfDiagram-CCIWWBDH-Dsfd8DxK.js +0 -1
  731. package/console-app/assets/eventmodeling-45OFAUF4-BSTAXikh.js +0 -1
  732. package/console-app/assets/flowDiagram-23GEKE2U-zX29jtvN.js +0 -1
  733. package/console-app/assets/ganttDiagram-NO4QXBWP-2of9JObw.js +0 -292
  734. package/console-app/assets/gitGraph-TEB2WS4Q-q2ow8moS.js +0 -1
  735. package/console-app/assets/graphlib-B8gBHxth.js +0 -1
  736. package/console-app/assets/index-CTO5cTAD.css +0 -1
  737. package/console-app/assets/index-FDk51Irw.js +0 -255
  738. package/console-app/assets/info-DKCQHKI2-DA35x9Eq.js +0 -1
  739. package/console-app/assets/infoDiagram-FWYZ7A6U-wBw6slQd.js +0 -2
  740. package/console-app/assets/init-D6jRqBbL.js +0 -1
  741. package/console-app/assets/linear-B-Zu24zW.js +0 -1
  742. package/console-app/assets/map-DsCK-0Cs.js +0 -1
  743. package/console-app/assets/mermaid.core-HtlOIxsD.js +0 -11
  744. package/console-app/assets/packet-7NZHBO7P-CvZpWSge.js +0 -1
  745. package/console-app/assets/path-BWPyau1x.js +0 -1
  746. package/console-app/assets/pegDiagram-2B236MQR-Bw6WA3kx.js +0 -1
  747. package/console-app/assets/pie-RZYD4A2V-cW9hD9gn.js +0 -1
  748. package/console-app/assets/pieDiagram-ENE6RG2P-DkD_01Ea.js +0 -39
  749. package/console-app/assets/radar-I7S5WNFK-tOWig5fu.js +0 -1
  750. package/console-app/assets/railroad-3IZDKUUU-tZ2PcrQC.js +0 -1
  751. package/console-app/assets/railroad-abnf-AHOZXSZD-D3lzFQzK.js +0 -1
  752. package/console-app/assets/railroad-ebnf-EBAXGLYW-DRp6_rsA.js +0 -1
  753. package/console-app/assets/railroad-peg-LSFZ7HO6-CuWNWp3P.js +0 -1
  754. package/console-app/assets/railroadDiagram-RFXS5EU6-Dljzejc8.js +0 -1
  755. package/console-app/assets/sequenceDiagram-DBY2YBRQ-CXysYi1c.js +0 -162
  756. package/console-app/assets/src-Bilm7g2t.js +0 -1
  757. package/console-app/assets/stateDiagram-2N3HPSRC-C8aGjwyh.js +0 -1
  758. package/console-app/assets/stateDiagram-v2-6OUMAXLB-C21qKRsf.js +0 -1
  759. package/console-app/assets/swimlanes-5IMT3BWC-VaTW8Eyb.js +0 -2
  760. package/console-app/assets/swimlanesDiagram-G3AALYLV-CCQS8jgU.js +0 -8
  761. package/console-app/assets/timeline-definition-FHXFAJF6-D88F4W4L.js +0 -120
  762. package/console-app/assets/treeView-QDETBFTQ-hN0LxmWJ.js +0 -1
  763. package/console-app/assets/treemap-6X3UGDF4-Cz4whnzW.js +0 -1
  764. package/console-app/assets/vennDiagram-L72KCM5P-CoW2kun8.js +0 -34
  765. package/console-app/assets/wardley-OPB4EBWU-l9vWUHbB.js +0 -1
  766. package/dist/src/functions/db/coercion-plugin.d.ts +0 -7
  767. package/dist/src/functions/db/coercion-plugin.js +0 -103
  768. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +0 -1
  769. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +0 -1
  770. package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +0 -1
  771. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +0 -1
  772. package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +0 -5
  773. package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +0 -1
  774. package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +0 -1
  775. package/dist/src/functions/wirings/console/pikku-command-node-types.js +0 -21
  776. package/dist/src/functions/wirings/console/serialize-node-types.d.ts +0 -1
  777. package/dist/src/functions/wirings/console/serialize-node-types.js +0 -11
  778. package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +0 -7
  779. package/dist/src/functions/wirings/functions/pikku-command-function-types.js +0 -43
  780. package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +0 -4
  781. package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +0 -36
  782. /package/dist/.pikku/schemas/schemas/{PikkuAIAgentOutput.schema.json → PikkuAgentOutput.schema.json} +0 -0
  783. /package/dist/.pikku/schemas/schemas/{PikkuAIScorerOutput.schema.json → PikkuAgentScorerOutput.schema.json} +0 -0
  784. /package/dist/.pikku/schemas/schemas/{PikkuFunctionTypesInput.schema.json → PikkuGatewayTypesInput.schema.json} +0 -0
  785. /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.js +0 -0
  786. /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.d.ts +0 -0
  787. /package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.js +0 -0
@@ -0,0 +1,46 @@
1
+ import { mkdir, writeFile } from 'node:fs/promises';
2
+ import { dirname, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { getCLIVersion } from '../../utils/get-cli-version.js';
5
+ import { buildSurfaceDoc } from './build-surface-doc.js';
6
+ /**
7
+ * Build-time entry point: `@pikku/cli` ships the surface doc, so it is computed
8
+ * once when the CLI is built rather than by every project that consumes it.
9
+ * `build.sh` generates the two projects it reads — one application, one addon —
10
+ * and points this at them.
11
+ */
12
+ const usage = `Usage: generate-surface-doc --app <dir> --addon <dir> --out <file>`;
13
+ const parseArgs = (argv) => {
14
+ const parsed = {};
15
+ for (let index = 0; index < argv.length; index += 2) {
16
+ const flag = argv[index];
17
+ const value = argv[index + 1];
18
+ if (!flag?.startsWith('--') || value === undefined) {
19
+ throw new Error(usage);
20
+ }
21
+ parsed[flag.slice(2)] = value;
22
+ }
23
+ return parsed;
24
+ };
25
+ const main = async (argv) => {
26
+ const args = parseArgs(argv);
27
+ const { app, addon, out } = args;
28
+ if (!app || !addon || !out)
29
+ throw new Error(usage);
30
+ const doc = await buildSurfaceDoc({
31
+ version: getCLIVersion(),
32
+ app: { projectDir: app },
33
+ addon: { projectDir: addon },
34
+ });
35
+ const outFile = resolve(out);
36
+ await mkdir(dirname(outFile), { recursive: true });
37
+ await writeFile(outFile, `${JSON.stringify(doc, null, 2)}\n`, 'utf8');
38
+ for (const entryPoint of doc.entryPoints) {
39
+ const symbols = entryPoint.leaves.reduce((total, leaf) => total + leaf.symbols.length, 0);
40
+ process.stdout.write(` ${entryPoint.id}: ${entryPoint.leaves.length} leaves, ${symbols} exports\n`);
41
+ }
42
+ };
43
+ if (process.argv[1] &&
44
+ resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
45
+ await main(process.argv.slice(2));
46
+ }
@@ -0,0 +1,16 @@
1
+ import type { SurfaceDoc } from './surface-doc.types.js';
2
+ /** The name the doc is published under, inside the `@pikku/cli` package. */
3
+ export declare const SURFACE_DOC_FILE = "surface.json";
4
+ /**
5
+ * Where the shipped surface doc lives. It sits at the root of the `@pikku/cli`
6
+ * package, so a consumer outside this repository resolves it as
7
+ * `@pikku/cli/surface.json` — from in here the package root has to be walked to,
8
+ * because this module runs both from `src` and from `dist/src`.
9
+ */
10
+ export declare const shippedSurfaceDocPath: () => string | null;
11
+ /**
12
+ * The doc is built with the CLI, so a CLI running out of a source checkout that
13
+ * has never been built has none. That is a reason to skip seeding the usage
14
+ * overlay, not a reason to fail a prebuild.
15
+ */
16
+ export declare const readShippedSurfaceDoc: () => SurfaceDoc | null;
@@ -0,0 +1,44 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ /** The name the doc is published under, inside the `@pikku/cli` package. */
5
+ export const SURFACE_DOC_FILE = 'surface.json';
6
+ /**
7
+ * Where the shipped surface doc lives. It sits at the root of the `@pikku/cli`
8
+ * package, so a consumer outside this repository resolves it as
9
+ * `@pikku/cli/surface.json` — from in here the package root has to be walked to,
10
+ * because this module runs both from `src` and from `dist/src`.
11
+ */
12
+ export const shippedSurfaceDocPath = () => {
13
+ let directory = dirname(fileURLToPath(import.meta.url));
14
+ for (;;) {
15
+ // The first package.json above this module is the CLI's own, whether it is
16
+ // running from `src` or from `dist/src`. Stopping there rather than looking
17
+ // for the file itself keeps the search from wandering into a consumer's
18
+ // project and finding an unrelated surface.json.
19
+ if (existsSync(join(directory, 'package.json'))) {
20
+ const path = join(directory, SURFACE_DOC_FILE);
21
+ return existsSync(path) ? path : null;
22
+ }
23
+ const parent = dirname(directory);
24
+ if (parent === directory)
25
+ return null;
26
+ directory = parent;
27
+ }
28
+ };
29
+ /**
30
+ * The doc is built with the CLI, so a CLI running out of a source checkout that
31
+ * has never been built has none. That is a reason to skip seeding the usage
32
+ * overlay, not a reason to fail a prebuild.
33
+ */
34
+ export const readShippedSurfaceDoc = () => {
35
+ const path = shippedSurfaceDocPath();
36
+ if (!path)
37
+ return null;
38
+ try {
39
+ return JSON.parse(readFileSync(path, 'utf8'));
40
+ }
41
+ catch {
42
+ return null;
43
+ }
44
+ };
@@ -0,0 +1,69 @@
1
+ import type { SurfaceKind } from './collect-surface.js';
2
+ export type { SurfaceKind };
3
+ /**
4
+ * The order in which you meet these doors while building a service. It is the
5
+ * page's spine: the console groups by it and the reading order follows it.
6
+ */
7
+ export type SurfaceStep = 'create a function' | 'enhance it' | 'wire it up' | 'guard it' | 'orchestrate it' | 'test it';
8
+ export type SurfaceOrigin = {
9
+ via: 'generated';
10
+ } | {
11
+ via: 'core';
12
+ subpath: string;
13
+ } | {
14
+ via: 'package';
15
+ packageName: string;
16
+ };
17
+ export type SurfaceDocSymbol = {
18
+ name: string;
19
+ kind: SurfaceKind;
20
+ origin: SurfaceOrigin;
21
+ /** One line, for a list row. */
22
+ summary?: string;
23
+ /** The full documentation, for the panel that reads one export. */
24
+ docs?: string;
25
+ deprecated?: string;
26
+ };
27
+ export type SurfaceLeaf = {
28
+ /** The specifier you import from, e.g. `#pikku/http`. */
29
+ specifier: string;
30
+ name: string;
31
+ step: SurfaceStep;
32
+ summary: string;
33
+ symbols: SurfaceDocSymbol[];
34
+ };
35
+ export type SurfaceEntryPointId = 'app' | 'addon';
36
+ export type SurfaceEntryPoint = {
37
+ id: SurfaceEntryPointId;
38
+ /** What someone reaching for this entry point is trying to do. */
39
+ job: string;
40
+ specifierBase: string;
41
+ summary: string;
42
+ leaves: SurfaceLeaf[];
43
+ };
44
+ /**
45
+ * Metadata about the framework itself rather than about any one project: which
46
+ * leaves an application gets, which an addon gets, and what each one exports.
47
+ * It is computed when `@pikku/cli` is built and published inside it, so a
48
+ * consumer reads it at `@pikku/cli/surface.json` without generating anything.
49
+ */
50
+ export type SurfaceDoc = {
51
+ /** The `@pikku/cli` version this surface was computed from. */
52
+ version: string;
53
+ entryPoints: SurfaceEntryPoint[];
54
+ };
55
+ export type SurfaceSymbolUsage = {
56
+ imports: number;
57
+ /** The workspace packages or top-level source directories it is imported in. */
58
+ seenIn: string[];
59
+ /** The project-relative files the imports are written in. */
60
+ files: string[];
61
+ };
62
+ /**
63
+ * Measured usage, keyed by specifier and then by export name. It is per-project
64
+ * and written at prebuild time, so the console has it and the website does not
65
+ * — every affordance that reads it is optional.
66
+ */
67
+ export type SurfaceUsage = {
68
+ bySpecifier: Record<string, Record<string, SurfaceSymbolUsage>>;
69
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { SurfaceEntryPointId, SurfaceStep } from './surface-doc.types.js';
2
+ /**
3
+ * This file is prose, not derived data. Every other field of the surface doc is
4
+ * computed from the generated output, because the barrel is the source of truth
5
+ * for what a leaf exports — but which of the six steps a leaf belongs to, and
6
+ * the sentence that says what it is for, is a judgement no parser can make.
7
+ *
8
+ * A leaf with no entry here fails the build rather than defaulting to something
9
+ * bland, so a new leaf cannot ship undocumented.
10
+ */
11
+ export type LeafEditorial = {
12
+ step: SurfaceStep;
13
+ summary: string;
14
+ };
15
+ export type EntryPointEditorial = {
16
+ job: string;
17
+ summary: string;
18
+ };
19
+ /**
20
+ * Keyed by leaf name — the segment after `#pikku/`. Shared by the application
21
+ * and addon entry points, which differ in which leaves they have rather than in
22
+ * what a leaf is for.
23
+ */
24
+ export declare const LEAF_EDITORIAL: Record<string, LeafEditorial>;
25
+ export declare const ENTRY_POINT_EDITORIAL: Record<SurfaceEntryPointId, EntryPointEditorial>;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Keyed by leaf name — the segment after `#pikku/`. Shared by the application
3
+ * and addon entry points, which differ in which leaves they have rather than in
4
+ * what a leaf is for.
5
+ */
6
+ export const LEAF_EDITORIAL = {
7
+ setup: {
8
+ step: 'create a function',
9
+ summary: 'The three factories a project declares exactly once — its config, its singleton services and its per-wire services. An addon declares the same three in its own flavour, handed the logger, variables and secrets the host application already built. Everything else on this page is imported by features; these are imported by bootstrap and then left alone.',
10
+ },
11
+ function: {
12
+ step: 'create a function',
13
+ summary: 'The function definers every wiring eventually points at, and the types they are written against.',
14
+ },
15
+ middleware: {
16
+ step: 'enhance it',
17
+ summary: 'Middleware is one concept regardless of what it ends up attached to, so it is one import: define it here, then register it globally, against a tag, or against an HTTP route or channel.',
18
+ },
19
+ error: {
20
+ step: 'enhance it',
21
+ summary: 'The errors your functions throw and the HTTP status each one maps to, so a thrown error is part of the contract rather than a stack trace.',
22
+ },
23
+ variables: {
24
+ step: 'enhance it',
25
+ summary: 'Configuration a function reads through the variables service, declared once so a deployment can be checked for what it is missing.',
26
+ },
27
+ secrets: {
28
+ step: 'enhance it',
29
+ summary: 'Secrets a function can use without ever holding, declared here and resolved by the secrets service at runtime.',
30
+ },
31
+ credentials: {
32
+ step: 'enhance it',
33
+ summary: 'Third-party credentials — OAuth2 grants and API keys — declared so the runtime can acquire, refresh and inject them.',
34
+ },
35
+ addon: {
36
+ step: 'enhance it',
37
+ summary: 'Installs an addon into this application, on its own or over rpc against a remote one.',
38
+ },
39
+ http: {
40
+ step: 'wire it up',
41
+ summary: 'Wires a function to an HTTP route, with the path parameters checked against the function input.',
42
+ },
43
+ channel: {
44
+ step: 'wire it up',
45
+ summary: 'Wires a function to a websocket channel, its message routes and its pub/sub topics.',
46
+ },
47
+ queue: {
48
+ step: 'wire it up',
49
+ summary: 'Wires a function as a queue worker, so a job on the queue runs the same handler an HTTP route would.',
50
+ },
51
+ scheduler: {
52
+ step: 'wire it up',
53
+ summary: 'Wires a function to a cron expression to run it on a schedule.',
54
+ },
55
+ trigger: {
56
+ step: 'wire it up',
57
+ summary: 'Wires a function to an event a source emits, rather than to a caller that asks for it.',
58
+ },
59
+ gateway: {
60
+ step: 'wire it up',
61
+ summary: 'Wires a function behind a gateway that receives requests on behalf of another system.',
62
+ },
63
+ mcp: {
64
+ step: 'wire it up',
65
+ summary: 'Wires a function as an MCP tool, resource or prompt for a model to call.',
66
+ },
67
+ cli: {
68
+ step: 'wire it up',
69
+ summary: 'Wires a function as a command, with its flags and arguments derived from the function input.',
70
+ },
71
+ auth: {
72
+ step: 'guard it',
73
+ summary: 'Who may call a function, and what the call is made with: permissions that see the request, auth gates that run before it, and the credentials a function borrows rather than holds.',
74
+ },
75
+ scopes: {
76
+ step: 'guard it',
77
+ summary: 'The scopes a caller can hold and the roles that grant them, gating a call outside the permission pool.',
78
+ },
79
+ workflow: {
80
+ step: 'orchestrate it',
81
+ summary: 'Composes functions into a durable workflow whose steps survive a restart and retry on their own.',
82
+ },
83
+ agent: {
84
+ step: 'orchestrate it',
85
+ summary: 'Defines an AI agent, the tools it may call and the scorers that judge what it did.',
86
+ },
87
+ scenarios: {
88
+ step: 'test it',
89
+ summary: 'Drives features and scenarios against a real running server, in the vocabulary a user would use.',
90
+ },
91
+ };
92
+ export const ENTRY_POINT_EDITORIAL = {
93
+ app: {
94
+ job: 'build an app',
95
+ summary: 'This is the door you open to build a service. The CLI generates a barrel per concern into .pikku, package.json maps #pikku onto it, and everything below runs in the order you actually meet it while building — write a function, give it what it needs, decide how the world reaches it, say who may call it, compose it, then drive the whole thing in a test.',
96
+ },
97
+ addon: {
98
+ job: 'build an addon',
99
+ summary: 'An addon declares functions and contracts; the host application decides how the world reaches them. The same barrels are generated under #pikku/addon/*, minus every wiring — an addon that called wireHTTP would be registering a route in a registry it does not own.',
100
+ },
101
+ };
@@ -0,0 +1,12 @@
1
+ import type { SurfaceUsageCounts } from '@pikku/inspector';
2
+ import type { CLILogger } from '../../services/cli-logger.service.js';
3
+ export declare const SURFACE_USAGE_FILE = "surface-usage.gen.json";
4
+ /**
5
+ * The per-project half of the surface: which of the exports the shipped doc
6
+ * describes this project actually imports, and where. The counting itself is
7
+ * free — the inspector does it inside the sweep it already makes over every
8
+ * source file — so all that happens here is a merge and a write.
9
+ */
10
+ export declare const writeSurfaceUsage: (logger: CLILogger, config: {
11
+ outDir: string;
12
+ }, counts: SurfaceUsageCounts) => Promise<void>;
@@ -0,0 +1,18 @@
1
+ import { join } from 'node:path';
2
+ import { writeFileInDir } from '../../utils/file-writer.js';
3
+ import { mergeSurfaceUsage } from './collect-surface-usage.js';
4
+ import { readShippedSurfaceDoc } from './shipped-surface-doc.js';
5
+ export const SURFACE_USAGE_FILE = 'surface-usage.gen.json';
6
+ /**
7
+ * The per-project half of the surface: which of the exports the shipped doc
8
+ * describes this project actually imports, and where. The counting itself is
9
+ * free — the inspector does it inside the sweep it already makes over every
10
+ * source file — so all that happens here is a merge and a write.
11
+ */
12
+ export const writeSurfaceUsage = async (logger, config, counts) => {
13
+ const usage = mergeSurfaceUsage({
14
+ counts,
15
+ doc: readShippedSurfaceDoc() ?? undefined,
16
+ });
17
+ await writeFileInDir(logger, join(config.outDir, SURFACE_USAGE_FILE), JSON.stringify(usage, null, 2));
18
+ };
@@ -0,0 +1,12 @@
1
+ import type { ValidateFinding } from './persona-checks.js';
2
+ /**
3
+ * `#pikku` is the app tier's only door onto Pikku, and it is a namespace rather
4
+ * than a module: `#pikku/http`, `#pikku/workflow`, one subpath per wiring.
5
+ *
6
+ * The bare specifier used to resolve to a hub that re-exported every wiring
7
+ * leaf with `export *`, undoing the split the leaves exist for. Neither
8
+ * consumer could drop the result again: bundlers keep `export *` chains unless
9
+ * the package declares `sideEffects`, and Node and tsx do not tree-shake at
10
+ * all — so an app with no queues still executed `@pikku/core/queue` at boot.
11
+ */
12
+ export declare const runPikkuBarrelChecks: (dir: string) => Promise<ValidateFinding[]>;
@@ -0,0 +1,97 @@
1
+ import { readdir, readFile } from 'node:fs/promises';
2
+ import { join, relative } from 'node:path';
3
+ import ts from 'typescript';
4
+ const SKIP_DIRS = new Set([
5
+ 'node_modules',
6
+ '.git',
7
+ 'dist',
8
+ 'build',
9
+ '.pikku',
10
+ '.pikku-runtime',
11
+ 'coverage',
12
+ '.next',
13
+ '.yarn',
14
+ ]);
15
+ const SOURCE_EXTENSIONS = ['.ts', '.tsx', '.mts', '.cts'];
16
+ /**
17
+ * `.gen.*` and `.d.ts` are the generator's own output — what they import is
18
+ * decided by the codegen templates, not by the project.
19
+ */
20
+ const isGenerated = (path) => path.includes('.gen.') || path.endsWith('.d.ts');
21
+ /**
22
+ * The specifiers that reach the retired re-export hub: the bare namespace, and
23
+ * the hub as a deep file. Every other `#pikku/*` is a leaf or a generated
24
+ * client and resolves to exactly what it names.
25
+ */
26
+ const isBarrel = (specifier) => specifier === '#pikku' || /^#pikku\/pikku-types\.gen(\.js)?$/.test(specifier);
27
+ /**
28
+ * Parsed rather than grepped: a project's own codegen templates hold the
29
+ * specifiers they emit inside template literals, and those are output text
30
+ * rather than imports the file itself makes.
31
+ */
32
+ const barrelImports = (file, content) => {
33
+ const source = ts.createSourceFile(file, content, ts.ScriptTarget.Latest, true);
34
+ const found = [];
35
+ for (const statement of source.statements) {
36
+ if (!ts.isImportDeclaration(statement) &&
37
+ !ts.isExportDeclaration(statement)) {
38
+ continue;
39
+ }
40
+ const moduleSpecifier = statement.moduleSpecifier;
41
+ if (!moduleSpecifier || !ts.isStringLiteral(moduleSpecifier))
42
+ continue;
43
+ if (isBarrel(moduleSpecifier.text))
44
+ found.push(moduleSpecifier.text);
45
+ }
46
+ return found;
47
+ };
48
+ const collectSources = async (dir, out = []) => {
49
+ let entries;
50
+ try {
51
+ entries = await readdir(dir, { withFileTypes: true });
52
+ }
53
+ catch {
54
+ return out;
55
+ }
56
+ for (const entry of entries) {
57
+ const path = join(dir, entry.name);
58
+ if (entry.isDirectory()) {
59
+ if (SKIP_DIRS.has(entry.name) || entry.name.startsWith('.'))
60
+ continue;
61
+ await collectSources(path, out);
62
+ }
63
+ else if (SOURCE_EXTENSIONS.some((ext) => entry.name.endsWith(ext)) &&
64
+ !isGenerated(entry.name)) {
65
+ out.push(path);
66
+ }
67
+ }
68
+ return out;
69
+ };
70
+ /**
71
+ * `#pikku` is the app tier's only door onto Pikku, and it is a namespace rather
72
+ * than a module: `#pikku/http`, `#pikku/workflow`, one subpath per wiring.
73
+ *
74
+ * The bare specifier used to resolve to a hub that re-exported every wiring
75
+ * leaf with `export *`, undoing the split the leaves exist for. Neither
76
+ * consumer could drop the result again: bundlers keep `export *` chains unless
77
+ * the package declares `sideEffects`, and Node and tsx do not tree-shake at
78
+ * all — so an app with no queues still executed `@pikku/core/queue` at boot.
79
+ */
80
+ export const runPikkuBarrelChecks = async (dir) => {
81
+ const findings = [];
82
+ for (const file of await collectSources(dir)) {
83
+ const content = await readFile(file, 'utf8');
84
+ if (!content.includes('#pikku'))
85
+ continue;
86
+ for (const specifier of barrelImports(file, content)) {
87
+ findings.push({
88
+ id: 'pikku-barrel-import',
89
+ severity: 'error',
90
+ message: `${relative(dir, file)} imports '${specifier}' — the app tier reaches Pikku through one subpath per wiring, and a barrel pulls every wiring's core dependencies into the module graph`,
91
+ path: file,
92
+ fixHint: "Import from the leaf the name belongs to — '#pikku/function' for pikkuFunc, '#pikku/http' for wireHTTP, '#pikku/workflow' for workflow wiring",
93
+ });
94
+ }
95
+ }
96
+ return findings;
97
+ };
@@ -44,7 +44,7 @@ const VIRTUAL_USER_FILE = /\.(virtual-user|vu)\.tsx?$/;
44
44
  * are edited for opposite reasons, and a rubric buried in an agent definition
45
45
  * is one nobody reviews as a rubric.
46
46
  */
47
- const SCORER_DECLARATIONS = ['pikkuAIScorer', 'pikkuAIJudge'];
47
+ const SCORER_DECLARATIONS = ['pikkuAgentScorer', 'pikkuAgentJudge'];
48
48
  const SCORER_FILE = /\.scorers?\.tsx?$/;
49
49
  const isGenerated = (path) => path.includes('.gen.') || path.includes(`${'/'}.pikku${'/'}`);
50
50
  const listSourceFiles = async (dir) => {
@@ -45,6 +45,16 @@ export type SharedCheckResult = {
45
45
  */
46
46
  export declare function readJsonSafe<T>(path: string): Promise<T | null>;
47
47
  export declare function readTextSafe(path: string): Promise<string | null>;
48
+ /**
49
+ * Does any statement in `sql` create `tableName`?
50
+ *
51
+ * Every dialect quotes identifiers differently and Kysely's schema builder
52
+ * always quotes, so an unquoted-only match reports a table as missing on the
53
+ * exact projects most likely to have it. Accept each dialect's pair — and only
54
+ * a matching pair, via the backreference, so `"audit'` is not a hit — plus an
55
+ * optional schema qualifier, since `main.audit` is the same table.
56
+ */
57
+ export declare function migrationCreatesTable(sql: string, tableName: string): boolean;
48
58
  /**
49
59
  * Every check that is true of any pikku project, regardless of where it deploys.
50
60
  *
@@ -49,9 +49,23 @@ async function hasAuthSessionMiddleware(fnDir) {
49
49
  return false;
50
50
  return Object.values(meta.instances).some((instance) => /^betterAuth\w*Session$/.test(instance.definitionId ?? ''));
51
51
  }
52
- function migrationCreatesTable(sql, tableName) {
52
+ /**
53
+ * Does any statement in `sql` create `tableName`?
54
+ *
55
+ * Every dialect quotes identifiers differently and Kysely's schema builder
56
+ * always quotes, so an unquoted-only match reports a table as missing on the
57
+ * exact projects most likely to have it. Accept each dialect's pair — and only
58
+ * a matching pair, via the backreference, so `"audit'` is not a hit — plus an
59
+ * optional schema qualifier, since `main.audit` is the same table.
60
+ */
61
+ export function migrationCreatesTable(sql, tableName) {
53
62
  const escapedTable = tableName.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
54
- const re = new RegExp(`\\bcreate\\s+table\\s+(?:if\\s+not\\s+exists\\s+)?["'\`]?${escapedTable}["'\`]?\\b`, 'i');
63
+ const qualifier = `(?:(?:["'\`]?\\w+["'\`]?|\\[\\w+\\])\\.)?`;
64
+ // The word boundary belongs to the bare alternative only: a trailing `\b`
65
+ // after a closing quote would demand a word character next, so `"audit" (`
66
+ // would not match.
67
+ const quoted = `(?:(["'\`])${escapedTable}\\1|\\[${escapedTable}\\]|${escapedTable}\\b)`;
68
+ const re = new RegExp(`\\bcreate\\s+table\\s+(?:if\\s+not\\s+exists\\s+)?${qualifier}${quoted}`, 'i');
55
69
  return re.test(sql);
56
70
  }
57
71
  /** better-auth's core schema — the tables its adapter queries on every request. */
@@ -2,8 +2,10 @@ import { existsSync } from 'node:fs';
2
2
  import { readdir } from 'node:fs/promises';
3
3
  import { join, relative } from 'node:path';
4
4
  import { isAddonPackage, runAddonPackageChecks, } from './addon-package-checks.js';
5
+ import { runPikkuBarrelChecks } from './pikku-barrel-checks.js';
5
6
  import { runSharedProjectChecks } from './shared-checks.js';
6
7
  import { runTypeIdentityChecks } from './type-identity-checks.js';
8
+ import { runWorkspaceExportsChecks } from './workspace-exports-checks.js';
7
9
  /** A hand-written `types/application-types.d.ts` beside package.json. */
8
10
  const ADDON_MARKER = join('types', 'application-types.d.ts');
9
11
  const SKIP_DIRS = new Set([
@@ -63,6 +65,15 @@ export const CHECKS = [
63
65
  !existsSync(join(dir, ADDON_MARKER)),
64
66
  run: async ({ dir }) => (await runSharedProjectChecks(dir)).findings,
65
67
  },
68
+ {
69
+ id: 'pikku-barrel',
70
+ subject: 'app tier imports',
71
+ // Every Pikku project, addon included: an addon never generates the wiring
72
+ // leaves, so a barrel import there is the one that used to compile against
73
+ // a hub whose re-exports had quietly been dropped.
74
+ applies: async ({ dir }) => existsSync(join(dir, 'pikku.config.json')),
75
+ run: async ({ dir }) => runPikkuBarrelChecks(dir),
76
+ },
66
77
  {
67
78
  id: 'addon-package',
68
79
  subject: 'addon',
@@ -79,6 +90,15 @@ export const CHECKS = [
79
90
  applies: async ({ dir, label }) => label === '.' && existsSync(join(dir, 'node_modules')),
80
91
  run: async ({ dir }) => runTypeIdentityChecks(dir),
81
92
  },
93
+ {
94
+ id: 'workspace-exports',
95
+ subject: 'workspace subpath imports',
96
+ // Root only: the check pairs an import in one package with the exports map
97
+ // of another, so it needs the whole tree in view. Per-package it would see
98
+ // the consumer without the producer and report nothing.
99
+ applies: async ({ label }) => label === '.',
100
+ run: async ({ dir }) => runWorkspaceExportsChecks(dir),
101
+ },
82
102
  ];
83
103
  export async function planValidation(root) {
84
104
  const plan = [];
@@ -0,0 +1,14 @@
1
+ import type { ValidateFinding } from './persona-checks.js';
2
+ /**
3
+ * Every workspace-internal subpath import must resolve through the owning
4
+ * package's own `exports`.
5
+ *
6
+ * `exports` does not probe extensions the way a bundler alias does, so a map
7
+ * like `"./pikku/*": "./src/pikku/*"` resolves `pkg/pikku/client.gen` to a file
8
+ * called `client.gen` that was never written — the real file is `client.gen.ts`.
9
+ * Nothing catches it while a `resolve.alias` in the consumer's own vite config
10
+ * covers the same specifier: the alias wins locally, and the broken map only
11
+ * surfaces where that config is not in play (a sandbox scaffold config, a
12
+ * different bundler, plain node, another app in the same repo).
13
+ */
14
+ export declare function runWorkspaceExportsChecks(root: string): Promise<ValidateFinding[]>;