@pikku/cli 0.12.145 → 0.12.152

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 (551) hide show
  1. package/console-app/assets/HelpPanel-CxjgE40i.js +1 -0
  2. package/console-app/assets/{abnfDiagram-N423BO3Z-BIPJyOId.js → abnfDiagram-VCTEODGH-UPW1PlxM.js} +1 -1
  3. package/console-app/assets/architecture-7GRP2DOG-BQN972Vc.js +1 -0
  4. package/console-app/assets/architectureDiagram-5GKGNRK7-B3XFrvZk.js +36 -0
  5. package/console-app/assets/blockDiagram-I7D4REHJ-Ca0v9UJQ.js +129 -0
  6. package/console-app/assets/c4Diagram-7LVT6UL2-CLewVsj_.js +38 -0
  7. package/console-app/assets/channel-B8xtOmL3.js +1 -0
  8. package/console-app/assets/chunk-4HAMMTFA-BwhbhOD9.js +62 -0
  9. package/console-app/assets/{chunk-NSK5VX7P-VK0slsok.js → chunk-75Z2AOVW-C7nAgNk0.js} +1 -1
  10. package/console-app/assets/chunk-DU6HZSFF-D4yYAcHt.js +127 -0
  11. package/console-app/assets/{chunk-2GRJ4B5K-pBREt5-Y.js → chunk-F27PBJKO-UHllOPps.js} +1 -1
  12. package/console-app/assets/{chunk-KEIR6QF5-BICK3FdT.js → chunk-FOHPRMQF-CoA4358r.js} +9 -9
  13. package/console-app/assets/chunk-GMAD6QVW-C0l_vm7T.js +72 -0
  14. package/console-app/assets/chunk-GVQU2GXP-h-H2Oird.js +1 -0
  15. package/console-app/assets/{chunk-5RXB4S5H-wo8Xtqiv.js → chunk-IMKFNOWR-DJ_W9CSg.js} +2 -2
  16. package/console-app/assets/chunk-L3NEJ4N5-Ce9oniwE.js +1 -0
  17. package/console-app/assets/chunk-OSK3NFVY-CdGE5qxS.js +10 -0
  18. package/console-app/assets/chunk-P2QGCYS3-DK1pHDdz.js +1 -0
  19. package/console-app/assets/{chunk-KBJHAD2P-PiPaopal.js → chunk-POPQ4Y6H-DjevEFNo.js} +1 -1
  20. package/console-app/assets/{chunk-4I5QYGJK-SmJ1Rqsn.js → chunk-PWAF6VOD-BVF5N1No.js} +1 -1
  21. package/console-app/assets/chunk-SHT3W25Y-BX8We-wN.js +168 -0
  22. package/console-app/assets/{chunk-6Q2QTUOP-B6uqaxr0.js → chunk-SVP7TREG-Cl0GgAPC.js} +1 -1
  23. package/console-app/assets/{chunk-GF5L2VYU-Cw7tsTe6.js → chunk-TICWLB2K-IWZAWDhu.js} +2 -2
  24. package/console-app/assets/chunk-XXDRQBXY-CGWcS5Ol.js +1 -0
  25. package/console-app/assets/classDiagram-ZZMXUADV-OGsmOlmO.js +1 -0
  26. package/console-app/assets/classDiagram-v2-VYDZK3BY-OGsmOlmO.js +1 -0
  27. package/console-app/assets/cose-bilkent-JH36ORCC-GsQ0JAnL.js +1 -0
  28. package/console-app/assets/cynefin-OW5HDTMX-hZsAZp_5.js +1 -0
  29. package/console-app/assets/{cynefinDiagram-MW4NZA55-BzFWEf8Y.js → cynefinDiagram-5FMLGOSQ-CsyMovx1.js} +1 -1
  30. package/console-app/assets/cytoscape.esm-B-1iW2ft.js +321 -0
  31. package/console-app/assets/dagre-BP8XEFz-.js +1 -0
  32. package/console-app/assets/dagre-GXQ25YYZ-Jg5285rx.js +4 -0
  33. package/console-app/assets/{diagram-7IWD3JNH-C58VaHJt.js → diagram-S7CK7UJ4-n9JiR8HK.js} +4 -4
  34. package/console-app/assets/{diagram-UB23O5K3-CmRNd5vm.js → diagram-UQ7AKVKN-Cde-dgbI.js} +1 -1
  35. package/console-app/assets/{diagram-B4RE2ZJO-B3w3TcXn.js → diagram-VSXAHHWV-CPZUg4FP.js} +1 -1
  36. package/console-app/assets/{diagram-Q27KOJAE-7oaP3D-d.js → diagram-VX7I27RA-B2rCDWvn.js} +1 -1
  37. package/console-app/assets/{diagram-LBJQPF4R-L1ZkDsab.js → diagram-Z3DM3KII-UwO0hte3.js} +1 -1
  38. package/console-app/assets/{ebnfDiagram-BXEA7PRR-D0rxzLaa.js → ebnfDiagram-PWID7BFC-BGJ_PBlS.js} +1 -1
  39. package/console-app/assets/erDiagram-RLTQ6QDP-CKsTScr3.js +99 -0
  40. package/console-app/assets/eventmodeling-NTZA5JFV-CnZOTLz3.js +1 -0
  41. package/console-app/assets/flowDiagram-HODETNUW-TYMCrte8.js +1 -0
  42. package/console-app/assets/ganttDiagram-EL5Y4UJY-koeTkIEA.js +292 -0
  43. package/console-app/assets/gitGraph-4MIJSDKK-DyRPbcM4.js +1 -0
  44. package/console-app/assets/{gitGraphDiagram-DS77QQ5N-JaW7OYCY.js → gitGraphDiagram-WWUBYQGX-DSIejrYw.js} +1 -1
  45. package/console-app/assets/graphlib-BpQ_697T.js +1 -0
  46. package/console-app/assets/index-BbJGr-r1.css +1 -0
  47. package/console-app/assets/index-Du9_fRSw.js +262 -0
  48. package/console-app/assets/info-A6RAGUB7-C63f9an_.js +1 -0
  49. package/console-app/assets/{infoDiagram-6WML65LV-DIbMcTbW.js → infoDiagram-27XIBGKW-Dz5gMcUF.js} +1 -1
  50. package/console-app/assets/{ishikawaDiagram-WSZJBQD7-mozqgfxi.js → ishikawaDiagram-5VMMS53U-m-nTAZTH.js} +1 -1
  51. package/console-app/assets/{journeyDiagram-NVQOT4AX-CKDrjPz5.js → journeyDiagram-3NMN7TZE-C7mjFY7i.js} +2 -2
  52. package/console-app/assets/{kanban-definition-27J2QSJJ-B9shPbST.js → kanban-definition-UXKFOSKX-Cm7PqOOP.js} +2 -2
  53. package/console-app/assets/{katex-CXMH3UgJ.js → katex-ZlcWpGUi.js} +2 -2
  54. package/console-app/assets/{line-DLrnl2PN.js → line-RZNRGurC.js} +1 -1
  55. package/console-app/assets/linear-C2IGWMlF.js +1 -0
  56. package/console-app/assets/{mermaid-parser.core-ElI_yw4f.js → mermaid-parser.core-DN1yDqgB.js} +3 -3
  57. package/console-app/assets/mermaid.core-DDRs3TbC.js +44 -0
  58. package/console-app/assets/{mindmap-definition-FAOFIHXS-BTvmLZE7.js → mindmap-definition-YA3MSWOX-o6riOwlF.js} +1 -1
  59. package/console-app/assets/packet-AYTQ26CC-B89F6gXG.js +1 -0
  60. package/console-app/assets/{pegDiagram-VL7TDLO6-1hBiUSmO.js → pegDiagram-XKGWAZYB-BQ1AAIaV.js} +1 -1
  61. package/console-app/assets/pie-WAS4IAKB-CzuwQlQz.js +1 -0
  62. package/console-app/assets/{pieDiagram-7S7Q4E2Y-vvgYfdFq.js → pieDiagram-E7YTZNPT-DlcGHWGT.js} +1 -1
  63. package/console-app/assets/{quadrantDiagram-CIZ2JOQS-B_emxK6O.js → quadrantDiagram-AXDQQJYC-DdITwqw-.js} +1 -1
  64. package/console-app/assets/radar-RG4KPBEZ-DlJ29jAN.js +1 -0
  65. package/console-app/assets/railroad-74A4TZTK-BL49fdM8.js +1 -0
  66. package/console-app/assets/railroad-abnf-HS5TGJTU-D9Ej_sin.js +1 -0
  67. package/console-app/assets/railroad-ebnf-LZEXJU2U-CjzlC3qv.js +1 -0
  68. package/console-app/assets/railroad-peg-WCYAUIDC-BPa6lIrj.js +1 -0
  69. package/console-app/assets/{railroadDiagram-AXF67PYL-IXXj_KlB.js → railroadDiagram-O6MQD6OU-BNgQGtF5.js} +1 -1
  70. package/console-app/assets/{requirementDiagram-LRYGKXZP-B15ZEbec.js → requirementDiagram-BXWQKSXE-48lE_WeD.js} +2 -2
  71. package/console-app/assets/{sankeyDiagram-W5VNT64P-w-sj_WN8.js → sankeyDiagram-P5KCCOFB-WmTardCP.js} +1 -1
  72. package/console-app/assets/{sequenceDiagram-SI44F4Z6-BP1UgEbX.js → sequenceDiagram-WJ2MYXX4-Bd5cHDMs.js} +1 -1
  73. package/console-app/assets/src-BTXg_NtK.js +1 -0
  74. package/console-app/assets/{stateDiagram-OKZ733FA-DE4L-y3n.js → stateDiagram-D77RDMKH-DBoCkqGv.js} +1 -1
  75. package/console-app/assets/stateDiagram-v2-MP3YSRHH-BLbaZawL.js +1 -0
  76. package/console-app/assets/swimlanes-42K2YHIH-lecUPBaK.js +1 -0
  77. package/console-app/assets/swimlanesDiagram-VR7AAH4N-CM_5HS_7.js +8 -0
  78. package/console-app/assets/{timeline-definition-Z64GVDOM-Cc8M2qee.js → timeline-definition-24CTP7MA-CWq0OWm1.js} +1 -1
  79. package/console-app/assets/treeView-Q6P3EWNA-C7lEeqUz.js +1 -0
  80. package/console-app/assets/treemap-WGGIJYW6-Bkx2DAoI.js +1 -0
  81. package/console-app/assets/{vennDiagram-T6HMQDX7-dpGyGzMg.js → vennDiagram-4TSXK5OY-Bw_kGRL3.js} +1 -1
  82. package/console-app/assets/wardley-WFR3VGLG-V0zki2L0.js +1 -0
  83. package/console-app/assets/{wardleyDiagram-T6FBY63Y-CBvRf8GJ.js → wardleyDiagram-VM6X3IG4-C5vrwEHM.js} +1 -1
  84. package/console-app/assets/{xychartDiagram-ELKLHX3M-UlPqx-ve.js → xychartDiagram-S5SC5T6Z-B9uA0moC.js} +3 -3
  85. package/console-app/index.html +2 -3
  86. package/dist/.pikku/addon/index.d.ts +1 -1
  87. package/dist/.pikku/addon/index.js +1 -1
  88. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  89. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  90. package/dist/.pikku/agent/index.d.ts +1 -1
  91. package/dist/.pikku/agent/index.js +1 -1
  92. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
  93. package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
  94. package/dist/.pikku/analytics/index.d.ts +7 -0
  95. package/dist/.pikku/analytics/index.js +7 -0
  96. package/dist/.pikku/analytics/pikku-analytics-types.gen.d.ts +5 -0
  97. package/dist/.pikku/analytics/pikku-analytics-types.gen.js +4 -0
  98. package/dist/.pikku/auth/auth.types.d.ts +1 -1
  99. package/dist/.pikku/auth/auth.types.js +1 -1
  100. package/dist/.pikku/auth/index.d.ts +1 -1
  101. package/dist/.pikku/auth/index.js +1 -1
  102. package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
  103. package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
  104. package/dist/.pikku/channel/index.d.ts +1 -1
  105. package/dist/.pikku/channel/index.js +1 -1
  106. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +3 -3
  107. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  108. package/dist/.pikku/cli/index.d.ts +1 -1
  109. package/dist/.pikku/cli/index.js +1 -1
  110. package/dist/.pikku/cli/pikku-cli-channel.d.ts +7 -7
  111. package/dist/.pikku/cli/pikku-cli-channel.js +36 -1
  112. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  113. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  114. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  115. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  116. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.json +207 -0
  117. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +2 -2
  118. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  119. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  120. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +207 -0
  121. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  122. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  123. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  124. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  125. package/dist/.pikku/error/index.d.ts +1 -1
  126. package/dist/.pikku/error/index.js +1 -1
  127. package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
  128. package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
  129. package/dist/.pikku/function/index.d.ts +1 -1
  130. package/dist/.pikku/function/index.js +1 -1
  131. package/dist/.pikku/function/pikku-function-types.gen.d.ts +8 -7
  132. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  133. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  134. package/dist/.pikku/function/pikku-functions-meta.gen.json +253 -26
  135. package/dist/.pikku/function/pikku-functions.gen.js +9 -1
  136. package/dist/.pikku/gateway/index.d.ts +1 -1
  137. package/dist/.pikku/gateway/index.js +1 -1
  138. package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
  139. package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
  140. package/dist/.pikku/http/index.d.ts +1 -1
  141. package/dist/.pikku/http/index.js +1 -1
  142. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  143. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  144. package/dist/.pikku/mcp/index.d.ts +1 -1
  145. package/dist/.pikku/mcp/index.js +1 -1
  146. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  147. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  148. package/dist/.pikku/middleware/index.d.ts +1 -1
  149. package/dist/.pikku/middleware/index.js +1 -1
  150. package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
  151. package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
  152. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
  153. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
  154. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  155. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  156. package/dist/.pikku/pikku-services.gen.d.ts +5 -1
  157. package/dist/.pikku/pikku-services.gen.js +4 -0
  158. package/dist/.pikku/queue/index.d.ts +1 -1
  159. package/dist/.pikku/queue/index.js +1 -1
  160. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  161. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  162. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  163. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  164. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  165. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  166. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +11 -0
  167. package/dist/.pikku/scenarios/index.d.ts +1 -1
  168. package/dist/.pikku/scenarios/index.js +1 -1
  169. package/dist/.pikku/scenarios/pikku-personas.gen.d.ts +1 -1
  170. package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
  171. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
  172. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
  173. package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
  174. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
  175. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
  176. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
  177. package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
  178. package/dist/.pikku/scheduler/index.d.ts +1 -1
  179. package/dist/.pikku/scheduler/index.js +1 -1
  180. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  181. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  182. package/dist/.pikku/schemas/register.gen.js +35 -1
  183. package/dist/.pikku/schemas/schemas/FabricChangesAskInput.schema.json +1 -0
  184. package/dist/.pikku/schemas/schemas/FabricChangesAskOutput.schema.json +1 -0
  185. package/dist/.pikku/schemas/schemas/FabricChangesClaimInput.schema.json +1 -0
  186. package/dist/.pikku/schemas/schemas/FabricChangesClaimOutput.schema.json +1 -0
  187. package/dist/.pikku/schemas/schemas/FabricChangesDoneInput.schema.json +1 -0
  188. package/dist/.pikku/schemas/schemas/FabricChangesDoneOutput.schema.json +1 -0
  189. package/dist/.pikku/schemas/schemas/FabricChangesFileInput.schema.json +1 -0
  190. package/dist/.pikku/schemas/schemas/FabricChangesFileOutput.schema.json +1 -0
  191. package/dist/.pikku/schemas/schemas/FabricChangesListInput.schema.json +1 -0
  192. package/dist/.pikku/schemas/schemas/FabricChangesListOutput.schema.json +1 -0
  193. package/dist/.pikku/schemas/schemas/FabricChangesShotInput.schema.json +1 -0
  194. package/dist/.pikku/schemas/schemas/FabricChangesShotOutput.schema.json +1 -0
  195. package/dist/.pikku/schemas/schemas/FabricChangesShowInput.schema.json +1 -0
  196. package/dist/.pikku/schemas/schemas/FabricChangesShowOutput.schema.json +1 -0
  197. package/dist/.pikku/schemas/schemas/FabricDeployApplyOutput.schema.json +1 -1
  198. package/dist/.pikku/schemas/schemas/FabricFindingsListOutput.schema.json +1 -1
  199. package/dist/.pikku/schemas/schemas/FabricProjectsListOutput.schema.json +1 -1
  200. package/dist/.pikku/schemas/schemas/FabricPublishOutput.schema.json +1 -1
  201. package/dist/.pikku/schemas/schemas/FabricRollbackOutput.schema.json +1 -1
  202. package/dist/.pikku/schemas/schemas/FabricSecretsDeleteOutput.schema.json +1 -1
  203. package/dist/.pikku/schemas/schemas/FabricSecretsRotateOutput.schema.json +1 -1
  204. package/dist/.pikku/schemas/schemas/PikkuAnalyticsOutput.schema.json +1 -0
  205. package/dist/.pikku/schemas/schemas/PikkuFeatureFlagsScaffoldOutput.schema.json +1 -0
  206. package/dist/.pikku/schemas/schemas/PikkuFlagsInput.schema.json +1 -0
  207. package/dist/.pikku/scopes/index.d.ts +2 -1
  208. package/dist/.pikku/scopes/index.js +2 -1
  209. package/dist/.pikku/scopes/pikku-flags-meta.gen.json +1 -0
  210. package/dist/.pikku/scopes/pikku-flags.gen.d.ts +41 -0
  211. package/dist/.pikku/scopes/pikku-flags.gen.js +34 -0
  212. package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
  213. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
  214. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +2 -1
  215. package/dist/.pikku/scopes/pikku-scope-types.gen.js +2 -1
  216. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  217. package/dist/.pikku/secrets/index.d.ts +1 -1
  218. package/dist/.pikku/secrets/index.js +1 -1
  219. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  220. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  221. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  222. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  223. package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
  224. package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
  225. package/dist/.pikku/setup/index.d.ts +1 -1
  226. package/dist/.pikku/setup/index.js +1 -1
  227. package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +2 -2
  228. package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
  229. package/dist/.pikku/trigger/index.d.ts +1 -1
  230. package/dist/.pikku/trigger/index.js +1 -1
  231. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  232. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  233. package/dist/.pikku/variables/index.d.ts +1 -1
  234. package/dist/.pikku/variables/index.js +1 -1
  235. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  236. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  237. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  238. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  239. package/dist/.pikku/workflow/index.d.ts +1 -1
  240. package/dist/.pikku/workflow/index.js +1 -1
  241. package/dist/.pikku/workflow/meta/allWorkflow.gen.json +42 -6
  242. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  243. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  244. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  245. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  246. package/dist/bin/pikku-bin.mjs +2 -2
  247. package/dist/src/deploy/analyzer/analyzer.d.ts +1 -1
  248. package/dist/src/deploy/analyzer/analyzer.js +40 -2
  249. package/dist/src/deploy/analyzer/grouping.d.ts +41 -7
  250. package/dist/src/deploy/analyzer/grouping.js +76 -2
  251. package/dist/src/deploy/build-pipeline.js +4 -0
  252. package/dist/src/fabric/fabric-commands.d.ts +360 -138
  253. package/dist/src/fabric/fabric-commands.js +166 -0
  254. package/dist/src/fabric/functions/add.function.d.ts +3 -3
  255. package/dist/src/fabric/functions/addon-verify.function.d.ts +9 -9
  256. package/dist/src/fabric/functions/changes-ask.function.d.ts +34 -0
  257. package/dist/src/fabric/functions/changes-ask.function.js +30 -0
  258. package/dist/src/fabric/functions/changes-claim.function.d.ts +50 -0
  259. package/dist/src/fabric/functions/changes-claim.function.js +43 -0
  260. package/dist/src/fabric/functions/changes-done.function.d.ts +55 -0
  261. package/dist/src/fabric/functions/changes-done.function.js +59 -0
  262. package/dist/src/fabric/functions/changes-file.function.d.ts +64 -0
  263. package/dist/src/fabric/functions/changes-file.function.js +56 -0
  264. package/dist/src/fabric/functions/changes-list.function.d.ts +60 -0
  265. package/dist/src/fabric/functions/changes-list.function.js +82 -0
  266. package/dist/src/fabric/functions/changes-shot.function.d.ts +66 -0
  267. package/dist/src/fabric/functions/changes-shot.function.js +56 -0
  268. package/dist/src/fabric/functions/changes-show.function.d.ts +41 -0
  269. package/dist/src/fabric/functions/changes-show.function.js +80 -0
  270. package/dist/src/fabric/functions/db-schema.function.d.ts +3 -3
  271. package/dist/src/fabric/functions/deploy-list.function.d.ts +3 -3
  272. package/dist/src/fabric/functions/deploy-units.function.d.ts +3 -3
  273. package/dist/src/fabric/functions/deploy.function.d.ts +12 -12
  274. package/dist/src/fabric/functions/deploy.function.js +6 -5
  275. package/dist/src/fabric/functions/domains-add.function.d.ts +7 -7
  276. package/dist/src/fabric/functions/domains-list.function.d.ts +3 -3
  277. package/dist/src/fabric/functions/domains-remove.function.d.ts +3 -3
  278. package/dist/src/fabric/functions/errors.function.d.ts +3 -3
  279. package/dist/src/fabric/functions/findings-clear.function.d.ts +3 -3
  280. package/dist/src/fabric/functions/findings-flush.function.d.ts +3 -3
  281. package/dist/src/fabric/functions/findings-list.function.d.ts +3 -3
  282. package/dist/src/fabric/functions/init.function.d.ts +3 -3
  283. package/dist/src/fabric/functions/link.function.d.ts +3 -3
  284. package/dist/src/fabric/functions/link.function.js +3 -2
  285. package/dist/src/fabric/functions/llm-key.function.d.ts +9 -9
  286. package/dist/src/fabric/functions/login.function.d.ts +3 -3
  287. package/dist/src/fabric/functions/logs.function.d.ts +3 -3
  288. package/dist/src/fabric/functions/logs.function.js +2 -1
  289. package/dist/src/fabric/functions/metrics.function.d.ts +3 -3
  290. package/dist/src/fabric/functions/projects-list.function.d.ts +3 -3
  291. package/dist/src/fabric/functions/publish.function.d.ts +3 -3
  292. package/dist/src/fabric/functions/report.function.d.ts +15 -15
  293. package/dist/src/fabric/functions/rollback.function.d.ts +9 -9
  294. package/dist/src/fabric/functions/secrets-delete.function.d.ts +3 -3
  295. package/dist/src/fabric/functions/secrets-list.function.d.ts +3 -3
  296. package/dist/src/fabric/functions/secrets-rotate.function.d.ts +3 -3
  297. package/dist/src/fabric/functions/secrets-set.function.d.ts +3 -3
  298. package/dist/src/fabric/functions/smoke.function.d.ts +3 -3
  299. package/dist/src/fabric/functions/status.function.d.ts +3 -3
  300. package/dist/src/fabric/functions/trace.function.d.ts +3 -3
  301. package/dist/src/fabric/functions/validate.function.d.ts +7 -7
  302. package/dist/src/fabric/functions/variables-get.function.d.ts +3 -3
  303. package/dist/src/fabric/functions/variables-set.function.d.ts +6 -6
  304. package/dist/src/fabric/lib/changes.d.ts +38 -0
  305. package/dist/src/fabric/lib/changes.js +70 -0
  306. package/dist/src/fabric/lib/errors.d.ts +21 -0
  307. package/dist/src/fabric/lib/errors.js +21 -0
  308. package/dist/src/fabric/lib/finding.d.ts +3 -3
  309. package/dist/src/fabric/lib/git.d.ts +3 -2
  310. package/dist/src/fabric/lib/git.js +10 -8
  311. package/dist/src/fabric/lib/output.d.ts +20 -0
  312. package/dist/src/fabric/lib/output.js +32 -7
  313. package/dist/src/functions/commands/all.d.ts +1 -1
  314. package/dist/src/functions/commands/audit.d.ts +1 -1
  315. package/dist/src/functions/commands/binary.d.ts +3 -3
  316. package/dist/src/functions/commands/bootstrap.d.ts +1 -1
  317. package/dist/src/functions/commands/bootstrap.js +3 -0
  318. package/dist/src/functions/commands/db-audit.d.ts +1 -1
  319. package/dist/src/functions/commands/db-baseline.d.ts +1 -1
  320. package/dist/src/functions/commands/db-check.d.ts +1 -1
  321. package/dist/src/functions/commands/db-codegen.d.ts +1 -1
  322. package/dist/src/functions/commands/db-export.d.ts +1 -1
  323. package/dist/src/functions/commands/db-generate.d.ts +1 -1
  324. package/dist/src/functions/commands/db-migrate.d.ts +1 -1
  325. package/dist/src/functions/commands/db-reset.d.ts +3 -3
  326. package/dist/src/functions/commands/deploy-apply.d.ts +3 -3
  327. package/dist/src/functions/commands/deploy-apply.js +35 -3
  328. package/dist/src/functions/commands/deploy-info.d.ts +1 -1
  329. package/dist/src/functions/commands/deploy-plan.d.ts +3 -3
  330. package/dist/src/functions/commands/deploy-plan.js +1 -0
  331. package/dist/src/functions/commands/dev-agent-runner.d.ts +9 -7
  332. package/dist/src/functions/commands/dev-agent-runner.js +56 -12
  333. package/dist/src/functions/commands/dev.d.ts +3 -3
  334. package/dist/src/functions/commands/dev.js +60 -6
  335. package/dist/src/functions/commands/dist.d.ts +3 -3
  336. package/dist/src/functions/commands/dist.js +2 -9
  337. package/dist/src/functions/commands/doc.d.ts +3 -3
  338. package/dist/src/functions/commands/emails-init.d.ts +1 -1
  339. package/dist/src/functions/commands/enable.d.ts +9 -9
  340. package/dist/src/functions/commands/import-n8n.d.ts +3 -3
  341. package/dist/src/functions/commands/info.d.ts +4 -4
  342. package/dist/src/functions/commands/init-or-warn.d.ts +19 -0
  343. package/dist/src/functions/commands/init-or-warn.js +25 -0
  344. package/dist/src/functions/commands/knowledge-index.d.ts +6 -6
  345. package/dist/src/functions/commands/knowledge-plan.d.ts +15 -15
  346. package/dist/src/functions/commands/knowledge-reconcile.d.ts +6 -6
  347. package/dist/src/functions/commands/knowledge-validate.d.ts +6 -6
  348. package/dist/src/functions/commands/login.d.ts +7 -7
  349. package/dist/src/functions/commands/meta.d.ts +34 -34
  350. package/dist/src/functions/commands/new-addon.d.ts +3 -3
  351. package/dist/src/functions/commands/new-function.d.ts +3 -3
  352. package/dist/src/functions/commands/new-middleware.d.ts +3 -3
  353. package/dist/src/functions/commands/new-permission.d.ts +3 -3
  354. package/dist/src/functions/commands/new-wiring.d.ts +3 -3
  355. package/dist/src/functions/commands/persona-sync.d.ts +3 -3
  356. package/dist/src/functions/commands/persona.d.ts +7 -7
  357. package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
  358. package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
  359. package/dist/src/functions/commands/roles-audit.d.ts +1 -1
  360. package/dist/src/functions/commands/roles-prune.d.ts +3 -3
  361. package/dist/src/functions/commands/scenario.d.ts +7 -7
  362. package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
  363. package/dist/src/functions/commands/scopes-prune.d.ts +3 -3
  364. package/dist/src/functions/commands/semver.d.ts +1 -1
  365. package/dist/src/functions/commands/serve.d.ts +3 -3
  366. package/dist/src/functions/commands/serve.js +40 -3
  367. package/dist/src/functions/commands/skills.d.ts +6 -6
  368. package/dist/src/functions/commands/update.d.ts +1 -1
  369. package/dist/src/functions/commands/validate.d.ts +6 -6
  370. package/dist/src/functions/commands/versions-check.d.ts +1 -1
  371. package/dist/src/functions/commands/versions-init.d.ts +3 -3
  372. package/dist/src/functions/commands/versions-update.d.ts +1 -1
  373. package/dist/src/functions/commands/watch.d.ts +3 -3
  374. package/dist/src/functions/db/zod-codegen.d.ts +19 -19
  375. package/dist/src/functions/knowledge/schemas.d.ts +5 -5
  376. package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
  377. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
  378. package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
  379. package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
  380. package/dist/src/functions/surface/build-surface-doc.js +1 -1
  381. package/dist/src/functions/surface/surface-doc.types.d.ts +1 -1
  382. package/dist/src/functions/surface/surface-editorial.js +5 -0
  383. package/dist/src/functions/validate/pikku-barrel-checks.js +2 -22
  384. package/dist/src/functions/validate/validate.d.ts +2 -2
  385. package/dist/src/functions/validate/websocket-deps-checks.d.ts +1 -1
  386. package/dist/src/functions/wirings/agent/pikku-command-agent-types.d.ts +1 -1
  387. package/dist/src/functions/wirings/agent/pikku-command-agent.d.ts +1 -1
  388. package/dist/src/functions/wirings/agent/pikku-command-public-agent.d.ts +1 -1
  389. package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.d.ts +1 -1
  390. package/dist/src/functions/wirings/analytics/pikku-command-analytics.d.ts +11 -0
  391. package/dist/src/functions/wirings/analytics/pikku-command-analytics.js +66 -0
  392. package/dist/src/functions/wirings/analytics/serialize-analytics.d.ts +30 -0
  393. package/dist/src/functions/wirings/analytics/serialize-analytics.js +141 -0
  394. package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +3 -3
  395. package/dist/src/functions/wirings/auth/pikku-command-auth.js +2 -6
  396. package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +1 -1
  397. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +15 -36
  398. package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
  399. package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
  400. package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
  401. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
  402. package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
  403. package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
  404. package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
  405. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
  406. package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
  407. package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
  408. package/dist/src/functions/wirings/errors/pikku-command-error-types.d.ts +1 -1
  409. package/dist/src/functions/wirings/flags/pikku-command-feature-flags-scaffold.d.ts +1 -0
  410. package/dist/src/functions/wirings/flags/pikku-command-feature-flags-scaffold.js +36 -0
  411. package/dist/src/functions/wirings/flags/pikku-command-flags.d.ts +7 -0
  412. package/dist/src/functions/wirings/flags/pikku-command-flags.js +36 -0
  413. package/dist/src/functions/wirings/flags/serialize-feature-flags-scaffold.d.ts +13 -0
  414. package/dist/src/functions/wirings/flags/serialize-feature-flags-scaffold.js +73 -0
  415. package/dist/src/functions/wirings/flags/serialize-flags-types.d.ts +14 -0
  416. package/dist/src/functions/wirings/flags/serialize-flags-types.js +68 -0
  417. package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
  418. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +3 -3
  419. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +1 -1
  420. package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
  421. package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.d.ts +2 -2
  422. package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.js +2 -1
  423. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
  424. package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
  425. package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
  426. package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
  427. package/dist/src/functions/wirings/functions/serialize-function-types.js +9 -4
  428. package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.d.ts +3 -3
  429. package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
  430. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
  431. package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
  432. package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
  433. package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
  434. package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
  435. package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
  436. package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
  437. package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
  438. package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
  439. package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +4 -3
  440. package/dist/src/functions/wirings/package/pikku-command-package-types.js +14 -1
  441. package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
  442. package/dist/src/functions/wirings/package/serialize-package-types.d.ts +1 -0
  443. package/dist/src/functions/wirings/package/serialize-package-types.js +15 -0
  444. package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
  445. package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +3 -3
  446. package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
  447. package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
  448. package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
  449. package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
  450. package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
  451. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
  452. package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
  453. package/dist/src/functions/wirings/remote-jobs/pikku-command-remote-jobs.d.ts +1 -1
  454. package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +3 -3
  455. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
  456. package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
  457. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
  458. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
  459. package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
  460. package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
  461. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
  462. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
  463. package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +3 -3
  464. package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
  465. package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +3 -3
  466. package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
  467. package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
  468. package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.d.ts +1 -1
  469. package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
  470. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
  471. package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
  472. package/dist/src/functions/workflows/all.workflow.js +34 -9
  473. package/dist/src/services.js +7 -0
  474. package/dist/src/utils/analytics-schemas-file.d.ts +6 -0
  475. package/dist/src/utils/analytics-schemas-file.js +9 -0
  476. package/dist/src/utils/file-import-path.js +4 -1
  477. package/dist/src/utils/pikku-cli-config.d.ts +2 -2
  478. package/dist/src/utils/pikku-cli-config.js +28 -0
  479. package/dist/src/utils/remove-legacy-scaffold-file.js +4 -0
  480. package/dist/src/utils/resolve-from-project.d.ts +5 -0
  481. package/dist/src/utils/resolve-from-project.js +8 -2
  482. package/dist/src/utils/tsc-check.d.ts +11 -15
  483. package/dist/src/utils/tsc-check.js +97 -86
  484. package/dist/tsconfig.tsbuildinfo +1 -1
  485. package/package.json +32 -25
  486. package/snippets.json +1 -1
  487. package/surface.json +743 -27
  488. package/CHANGELOG.md +0 -9620
  489. package/console-app/assets/HelpPanel-nYO2hRY5.js +0 -1
  490. package/console-app/assets/architecture-TIHT7OUA-B-c05-x5.js +0 -1
  491. package/console-app/assets/architectureDiagram-T3A2C74G-BAH1O4B7.js +0 -36
  492. package/console-app/assets/blockDiagram-VBNYF7ZC-T3kmcPgj.js +0 -132
  493. package/console-app/assets/c4Diagram-5PPSVZJV-DRva89Br.js +0 -10
  494. package/console-app/assets/channel-DJ3jfSNX.js +0 -1
  495. package/console-app/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
  496. package/console-app/assets/chunk-7Z6QIM7H-uxzNGOHh.js +0 -10
  497. package/console-app/assets/chunk-I66GZJ75-DksrbEtn.js +0 -127
  498. package/console-app/assets/chunk-JQJVKLGR-BnRvPhDK.js +0 -156
  499. package/console-app/assets/chunk-QR6OTTB3-CgQotuzQ.js +0 -62
  500. package/console-app/assets/chunk-RYQCIY6F-Cei0abOq.js +0 -1
  501. package/console-app/assets/chunk-UBXNYLIW-B55XJk4O.js +0 -1
  502. package/console-app/assets/chunk-W5SLKNZC-gFa01tuI.js +0 -1
  503. package/console-app/assets/chunk-WRU74C26-C3ESZQ-F.js +0 -70
  504. package/console-app/assets/chunk-XXDRQBXY-D0tL6SVk.js +0 -1
  505. package/console-app/assets/classDiagram-JCYQIIEL-BqEwCDi8.js +0 -1
  506. package/console-app/assets/classDiagram-v2-OCEON4UE-BqEwCDi8.js +0 -1
  507. package/console-app/assets/cose-bilkent-JH36ORCC-CUxqwjs-.js +0 -1
  508. package/console-app/assets/cynefin-VYW2F7L2-Dh1yOBBs.js +0 -1
  509. package/console-app/assets/cytoscape.esm-B-NFISlW.js +0 -321
  510. package/console-app/assets/dagre-DKjebq_c.js +0 -1
  511. package/console-app/assets/dagre-VZM6K2ZE-BllFBMe9.js +0 -4
  512. package/console-app/assets/erDiagram-JOGREHBK-Bg0FPLS0.js +0 -85
  513. package/console-app/assets/eventmodeling-45OFAUF4-CVovwmpS.js +0 -1
  514. package/console-app/assets/flowDiagram-UKHOOZJN-DwRgEyXD.js +0 -1
  515. package/console-app/assets/ganttDiagram-PKOTCBZU-BBxxHrPG.js +0 -292
  516. package/console-app/assets/gitGraph-TEB2WS4Q-Cn1MjFvM.js +0 -1
  517. package/console-app/assets/graphlib-IlWVLY3o.js +0 -1
  518. package/console-app/assets/index-C8MC-uMB.css +0 -1
  519. package/console-app/assets/index-Deds7K2I.js +0 -290
  520. package/console-app/assets/info-DKCQHKI2-C2R7hV-y.js +0 -1
  521. package/console-app/assets/isUndefined-T4snU1Mx.js +0 -1
  522. package/console-app/assets/linear-BQOZezXu.js +0 -1
  523. package/console-app/assets/map-BmPfXn7V.js +0 -1
  524. package/console-app/assets/mermaid.core-B02bSmuz.js +0 -42
  525. package/console-app/assets/packet-7NZHBO7P-CkYMF0Cd.js +0 -1
  526. package/console-app/assets/pie-RZYD4A2V-BFMvieVM.js +0 -1
  527. package/console-app/assets/radar-I7S5WNFK-C_2tp7_w.js +0 -1
  528. package/console-app/assets/railroad-3IZDKUUU-DwlFJLv5.js +0 -1
  529. package/console-app/assets/railroad-abnf-AHOZXSZD-Cyu_rpdZ.js +0 -1
  530. package/console-app/assets/railroad-ebnf-EBAXGLYW-BLiwK-H7.js +0 -1
  531. package/console-app/assets/railroad-peg-LSFZ7HO6-BUDTDYmP.js +0 -1
  532. package/console-app/assets/src-BI35UZf8.js +0 -1
  533. package/console-app/assets/stateDiagram-v2-UEYNNEHI-BsP8TwKV.js +0 -1
  534. package/console-app/assets/swimlanes-SLNWSIFB-DvAJxCGQ.js +0 -2
  535. package/console-app/assets/swimlanesDiagram-ULZ7WXOC-BAXO3Id2.js +0 -8
  536. package/console-app/assets/treeView-QDETBFTQ-DnlS0s0_.js +0 -1
  537. package/console-app/assets/treemap-6X3UGDF4-CiUoxlJe.js +0 -1
  538. package/console-app/assets/wardley-OPB4EBWU-DrTySJtR.js +0 -1
  539. package/dist/.pikku/console/index.d.ts +0 -1
  540. package/dist/.pikku/console/index.js +0 -1
  541. package/dist/.pikku/console/pikku-node-types.gen.d.ts +0 -6
  542. package/dist/.pikku/console/pikku-node-types.gen.js +0 -1
  543. package/dist/.pikku/pikku-meta-service.gen.d.ts +0 -7
  544. package/dist/.pikku/pikku-meta-service.gen.js +0 -9
  545. package/dist/.pikku/pikku-types.gen.d.ts +0 -17
  546. package/dist/.pikku/pikku-types.gen.js +0 -28
  547. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +0 -15
  548. package/dist/.pikku/workflow/pikku-personas.gen.js +0 -17
  549. package/dist/src/functions/surface/collect-surface.d.ts +0 -58
  550. package/dist/src/functions/surface/collect-surface.js +0 -613
  551. /package/console-app/assets/{sizeCapture-X5ZJPWSS-B0uUizjq.js → sizeCapture-INFHLROL-B0uUizjq.js} +0 -0
package/surface.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.12.145",
2
+ "version": "0.12.152",
3
3
  "entryPoints": [
4
4
  {
5
5
  "id": "app",
@@ -87,7 +87,7 @@
87
87
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
88
88
  },
89
89
  {
90
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
90
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
91
91
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
92
92
  },
93
93
  {
@@ -102,6 +102,10 @@
102
102
  "line": "expose?: boolean",
103
103
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
104
104
  },
105
+ {
106
+ "line": "featureFlag?: undefined",
107
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
108
+ },
105
109
  {
106
110
  "line": "mcp?: boolean",
107
111
  "doc": "Offers the function to MCP clients as a tool, without a separate `wireMCPTool`."
@@ -131,7 +135,7 @@
131
135
  "doc": "Scenario steps only, and set by the definer rather than by hand: this step needs a persona, so the runner injects `wire.actor`."
132
136
  },
133
137
  {
134
- "line": "scopes?: never[]",
138
+ "line": "scopes?: import(\"#pikku/scopes/pikku-scopes.gen.js\").ScopeId[]",
135
139
  "doc": "Scopes the session must hold. All are required, and checked before `permissions`, which OR together — a scope only narrows access."
136
140
  },
137
141
  {
@@ -216,7 +220,7 @@
216
220
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
217
221
  },
218
222
  {
219
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
223
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
220
224
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
221
225
  },
222
226
  {
@@ -231,6 +235,10 @@
231
235
  "line": "expose?: boolean",
232
236
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
233
237
  },
238
+ {
239
+ "line": "featureFlag?: undefined",
240
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
241
+ },
234
242
  {
235
243
  "line": "func: PikkuFunction<In, Out, RequiredWires, any> | PikkuFunctionSessionless<In, Out, RequiredWires, any, any>",
236
244
  "doc": "The body. Its first parameter is the services it needs, destructured inline so the build can tree-shake the rest away."
@@ -276,7 +284,7 @@
276
284
  "doc": "Scenario steps only, and set by the definer rather than by hand: this step needs a persona, so the runner injects `wire.actor`."
277
285
  },
278
286
  {
279
- "line": "scopes?: never[]",
287
+ "line": "scopes?: import(\"#pikku/scopes/pikku-scopes.gen.js\").ScopeId[]",
280
288
  "doc": "Scopes the session must hold. All are required, and checked before `permissions`, which OR together — a scope only narrows access."
281
289
  },
282
290
  {
@@ -358,7 +366,7 @@
358
366
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
359
367
  },
360
368
  {
361
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
369
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
362
370
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
363
371
  },
364
372
  {
@@ -373,6 +381,10 @@
373
381
  "line": "expose?: boolean",
374
382
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
375
383
  },
384
+ {
385
+ "line": "featureFlag?: undefined",
386
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
387
+ },
376
388
  {
377
389
  "line": "func: PikkuFunction<ListInput<F, S>, ListOutput<Row>, \"rpc\" | \"session\", WiredServices> | PikkuFunctionSessionless<ListInput<F, S>, ListOutput<Row>, \"rpc\" | \"session\", WiredServices, unknown>",
378
390
  "doc": "The body. Its first parameter is the services it needs, destructured inline so the build can tree-shake the rest away."
@@ -418,7 +430,7 @@
418
430
  "doc": "Scenario steps only, and set by the definer rather than by hand: this step needs a persona, so the runner injects `wire.actor`."
419
431
  },
420
432
  {
421
- "line": "scopes?: never[]",
433
+ "line": "scopes?: import(\"#pikku/scopes/pikku-scopes.gen.js\").ScopeId[]",
422
434
  "doc": "Scopes the session must hold. All are required, and checked before `permissions`, which OR together — a scope only narrows access."
423
435
  },
424
436
  {
@@ -489,7 +501,7 @@
489
501
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
490
502
  },
491
503
  {
492
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
504
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
493
505
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
494
506
  },
495
507
  {
@@ -504,6 +516,10 @@
504
516
  "line": "expose?: boolean",
505
517
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
506
518
  },
519
+ {
520
+ "line": "featureFlag?: string",
521
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
522
+ },
507
523
  {
508
524
  "line": "mcp?: boolean",
509
525
  "doc": "Offers the function to MCP clients as a tool, without a separate `wireMCPTool`."
@@ -600,7 +616,7 @@
600
616
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
601
617
  },
602
618
  {
603
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
619
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
604
620
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
605
621
  },
606
622
  {
@@ -615,6 +631,10 @@
615
631
  "line": "expose?: boolean",
616
632
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
617
633
  },
634
+ {
635
+ "line": "featureFlag?: string",
636
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
637
+ },
618
638
  {
619
639
  "line": "mcp?: boolean",
620
640
  "doc": "Offers the function to MCP clients as a tool, without a separate `wireMCPTool`."
@@ -752,6 +772,14 @@
752
772
  {
753
773
  "line": "aiEmbedding?: AIEmbeddingService"
754
774
  },
775
+ {
776
+ "line": "analyticsIdentity?: AnalyticsIdentityResolver",
777
+ "doc": "Resolves the browser-originated half of an event's identity — vendor ids and consent — from the wire. Unset means a sink sees only what the session carries, which is enough for a product-analytics tool and not enough for an ad platform."
778
+ },
779
+ {
780
+ "line": "analyticsService?: AnalyticsService",
781
+ "doc": "Where product-analytics events go; unset means the logger."
782
+ },
755
783
  {
756
784
  "line": "audit?: AuditService"
757
785
  },
@@ -778,6 +806,10 @@
778
806
  {
779
807
  "line": "emailService?: EmailService"
780
808
  },
809
+ {
810
+ "line": "featureFlags?: FeatureFlagSource",
811
+ "doc": "The global feature-flag config, read by the function runner to enforce a flag's availability. Inert when absent: a project that declares no flag carries nothing, and a `featureFlag:` with no source registered is a no-op rather than a closed door."
812
+ },
781
813
  {
782
814
  "line": "logger: Logger"
783
815
  },
@@ -867,6 +899,14 @@
867
899
  {
868
900
  "line": "aiEmbedding?: AIEmbeddingService"
869
901
  },
902
+ {
903
+ "line": "analyticsIdentity?: AnalyticsIdentityResolver",
904
+ "doc": "Resolves the browser-originated half of an event's identity — vendor ids and consent — from the wire. Unset means a sink sees only what the session carries, which is enough for a product-analytics tool and not enough for an ad platform."
905
+ },
906
+ {
907
+ "line": "analyticsService?: AnalyticsService",
908
+ "doc": "Where product-analytics events go; unset means the logger."
909
+ },
870
910
  {
871
911
  "line": "audit?: AuditService"
872
912
  },
@@ -893,6 +933,10 @@
893
933
  {
894
934
  "line": "emailService?: EmailService"
895
935
  },
936
+ {
937
+ "line": "featureFlags?: FeatureFlagSource",
938
+ "doc": "The global feature-flag config, read by the function runner to enforce a flag's availability. Inert when absent: a project that declares no flag carries nothing, and a `featureFlag:` with no source registered is a no-op rather than a closed door."
939
+ },
896
940
  {
897
941
  "line": "logger: Logger"
898
942
  },
@@ -954,6 +998,14 @@
954
998
  {
955
999
  "line": "aiEmbedding?: AIEmbeddingService"
956
1000
  },
1001
+ {
1002
+ "line": "analyticsIdentity?: AnalyticsIdentityResolver",
1003
+ "doc": "Resolves the browser-originated half of an event's identity — vendor ids and consent — from the wire. Unset means a sink sees only what the session carries, which is enough for a product-analytics tool and not enough for an ad platform."
1004
+ },
1005
+ {
1006
+ "line": "analyticsService: AnalyticsService",
1007
+ "doc": "Where product-analytics events go; unset means the logger."
1008
+ },
957
1009
  {
958
1010
  "line": "audit?: AuditService"
959
1011
  },
@@ -968,23 +1020,27 @@
968
1020
  "line": "content?: ContentService<string>"
969
1021
  },
970
1022
  {
971
- "line": "coverageService?: CoverageService",
1023
+ "line": "coverageService: CoverageService",
972
1024
  "doc": "V8 precise-coverage collector (`pikku dev --coverage` only)"
973
1025
  },
974
1026
  {
975
- "line": "credentialService?: CredentialService"
1027
+ "line": "credentialService: CredentialService"
976
1028
  },
977
1029
  {
978
- "line": "deploymentService?: DeploymentService"
1030
+ "line": "deploymentService: DeploymentService"
979
1031
  },
980
1032
  {
981
1033
  "line": "emailService?: EmailService"
982
1034
  },
1035
+ {
1036
+ "line": "featureFlags?: FeatureFlagSource",
1037
+ "doc": "The global feature-flag config, read by the function runner to enforce a flag's availability. Inert when absent: a project that declares no flag carries nothing, and a `featureFlag:` with no source registered is a no-op rather than a closed door."
1038
+ },
983
1039
  {
984
1040
  "line": "logger: Logger"
985
1041
  },
986
1042
  {
987
- "line": "metaService?: MetaService"
1043
+ "line": "metaService: MetaService"
988
1044
  },
989
1045
  {
990
1046
  "line": "schedulerService: SchedulerService"
@@ -993,7 +1049,7 @@
993
1049
  "line": "schema: SchemaService"
994
1050
  },
995
1051
  {
996
- "line": "scopeService?: ScopeService",
1052
+ "line": "scopeService: ScopeService",
997
1053
  "doc": "Resolves and administers user scopes. Called when building a session, never by the function runner."
998
1054
  },
999
1055
  {
@@ -1004,15 +1060,15 @@
1004
1060
  "line": "variables: VariablesService"
1005
1061
  },
1006
1062
  {
1007
- "line": "virtualUserRunStore?: VirtualUserRunStore",
1063
+ "line": "virtualUserRunStore: VirtualUserRunStore",
1008
1064
  "doc": "Where virtual-user runs are recorded. A run is dispatched and answered for later, so this store is the only trace it leaves — see {@link VirtualUserRunStore}."
1009
1065
  },
1010
1066
  {
1011
- "line": "virtualUserScheduleStore?: VirtualUserScheduleStore",
1067
+ "line": "virtualUserScheduleStore: VirtualUserScheduleStore",
1012
1068
  "doc": "Each persona's cadence, for apps that want their virtual users to keep going without being asked. Separate from the run store on purpose: wiring nothing is how an app says it only wants the runs it starts itself."
1013
1069
  },
1014
1070
  {
1015
- "line": "webhookService?: WebhookService",
1071
+ "line": "webhookService: WebhookService",
1016
1072
  "doc": "Queue-backed outgoing webhook delivery. The queue-only default throws on the delivery-read methods; a store-backed implementation records history."
1017
1073
  },
1018
1074
  {
@@ -1216,6 +1272,229 @@
1216
1272
  }
1217
1273
  ]
1218
1274
  },
1275
+ {
1276
+ "specifier": "#pikku/analytics",
1277
+ "name": "analytics",
1278
+ "step": "enhance it",
1279
+ "summary": "The events a project can measure, declared by name so the generated ingest knows what to accept. Where they go is an AnalyticsService on singleton services; what a function records into is the analytics service on the invocation.",
1280
+ "skill": null,
1281
+ "symbols": [
1282
+ {
1283
+ "name": "AnalyticsClientContext",
1284
+ "kind": "interface",
1285
+ "origin": {
1286
+ "via": "core",
1287
+ "subpath": "./analytics"
1288
+ },
1289
+ "summary": "Its presence, not `at`, is what marks a record as relayed from a browser — a beacon is free to omit `at`.",
1290
+ "docs": "Its presence, not `at`, is what marks a record as relayed from a browser — a\nbeacon is free to omit `at`.",
1291
+ "members": [
1292
+ {
1293
+ "line": "at?: number"
1294
+ }
1295
+ ]
1296
+ },
1297
+ {
1298
+ "name": "AnalyticsEventBase",
1299
+ "kind": "type",
1300
+ "origin": {
1301
+ "via": "core",
1302
+ "subpath": "./analytics"
1303
+ },
1304
+ "summary": "The constraint a project's declared event union is checked against.",
1305
+ "docs": "The constraint a project's declared event union is checked against.\n\nOnly `name` is fixed, because the name is the whole of what pikku itself\nreads — everything else on an event belongs to the app and to the sinks it\nwires, and narrowing it here would make the generic useless for anyone whose\nevents carry more than a fixed set of props.",
1306
+ "members": [
1307
+ {
1308
+ "line": "name: string"
1309
+ }
1310
+ ]
1311
+ },
1312
+ {
1313
+ "name": "AnalyticsEventDefinitions",
1314
+ "kind": "type",
1315
+ "origin": {
1316
+ "via": "core",
1317
+ "subpath": "./analytics"
1318
+ },
1319
+ "summary": "Events keyed by name; each value is the schema for that event's props.",
1320
+ "docs": "Events keyed by name; each value is the schema for that event's props."
1321
+ },
1322
+ {
1323
+ "name": "AnalyticsEventPropsSchema",
1324
+ "kind": "type",
1325
+ "origin": {
1326
+ "via": "core",
1327
+ "subpath": "./analytics"
1328
+ },
1329
+ "summary": "The schema for one event's props. The generated ingest rebuilds each member of the union as `z.object(schema.shape)` so it can attach the event name, so a schema with no `shape` — a union, a primitive, a schema from a library that does not expose one — is not something an event can be declared with, and saying so here fails at the declaration rather than in generated code.",
1330
+ "docs": "The schema for one event's props. The generated ingest rebuilds each member\nof the union as `z.object(schema.shape)` so it can attach the event name, so\na schema with no `shape` — a union, a primitive, a schema from a library\nthat does not expose one — is not something an event can be declared with,\nand saying so here fails at the declaration rather than in generated code.",
1331
+ "members": [
1332
+ {
1333
+ "line": "~standard: StandardSchemaV1.Props<unknown, unknown>",
1334
+ "doc": "The Standard Schema properties."
1335
+ },
1336
+ {
1337
+ "line": "shape: Record<string, unknown>"
1338
+ }
1339
+ ]
1340
+ },
1341
+ {
1342
+ "name": "AnalyticsIdentity",
1343
+ "kind": "interface",
1344
+ "origin": {
1345
+ "via": "core",
1346
+ "subpath": "./analytics"
1347
+ },
1348
+ "summary": "Stamped server-side from the session and never read from the request body, which is what makes an unauthenticated ingest safe to expose.",
1349
+ "docs": "Stamped server-side from the session and never read from the request body,\nwhich is what makes an unauthenticated ingest safe to expose.",
1350
+ "members": [
1351
+ {
1352
+ "line": "anonymousId?: string",
1353
+ "doc": "A device-scoped id for a visitor with no session, minted by pikku rather than by a vendor. Distinct from `pikkuUserId`, which is derived from a session and is therefore absent for exactly the visitor this identifies. Without it a product-analytics sink has no honest option for anonymous traffic: keying on a shared literal collapses every visitor into one person, and dropping the event loses the whole pre-signup funnel."
1354
+ },
1355
+ {
1356
+ "line": "consent?: Record<string, boolean>",
1357
+ "doc": "What the visitor agreed to, keyed by purpose. A sink gated on a purpose absent here does not send. Open-ended rather than a fixed pair, because the purposes are the consent tool's vocabulary and jurisdictions do not agree on them. Undefined means the app wired no consent resolver, not that consent was refused — the gate belongs to the sink, which is where the app decides what absence means."
1358
+ },
1359
+ {
1360
+ "line": "orgId?: string"
1361
+ },
1362
+ {
1363
+ "line": "pikkuUserId?: string"
1364
+ },
1365
+ {
1366
+ "line": "userId: string | null"
1367
+ },
1368
+ {
1369
+ "line": "vendorIds?: Record<string, string>",
1370
+ "doc": "Identifiers a destination keys on that pikku does not mint — GA4's `client_id`, Meta's `fbp` and `fbc`, a vendor's own device id. All of them originate in the browser, and a sink that cannot produce one does not degrade, it sends nothing usable. Resolved server-side from first-party cookies on the request, never read from the event body, on the same reasoning as the rest of this object: a crafted client call must not be able to attribute an event to someone else."
1371
+ }
1372
+ ]
1373
+ },
1374
+ {
1375
+ "name": "AnalyticsLog",
1376
+ "kind": "interface",
1377
+ "origin": {
1378
+ "via": "core",
1379
+ "subpath": "./analytics"
1380
+ },
1381
+ "summary": "`services.analytics`: buffered for the invocation, flushed when it ends, always best-effort. `record` is a method rather than a property so an app can narrow `Events` in its own `SingletonServices`.",
1382
+ "docs": "`services.analytics`: buffered for the invocation, flushed when it ends,\nalways best-effort. `record` is a method rather than a property so an app can\nnarrow `Events` in its own `SingletonServices`.",
1383
+ "signature": "AnalyticsLog<Events>",
1384
+ "members": [
1385
+ {
1386
+ "line": "close: () => Promise<void>"
1387
+ },
1388
+ {
1389
+ "line": "flush: () => Promise<void>"
1390
+ },
1391
+ {
1392
+ "line": "record: (event: Events, client?: AnalyticsClientContext) => Promise<void>"
1393
+ }
1394
+ ]
1395
+ },
1396
+ {
1397
+ "name": "AnalyticsRecord",
1398
+ "kind": "interface",
1399
+ "origin": {
1400
+ "via": "core",
1401
+ "subpath": "./analytics"
1402
+ },
1403
+ "summary": "What an event becomes once pikku has accepted it, and the only shape an {@link AnalyticsService} is ever handed.",
1404
+ "docs": "What an event becomes once pikku has accepted it, and the only shape an\n{@link AnalyticsService} is ever handed.\n\nDistinct from {@link AnalyticsEventInput}, which is what a caller submits:\nthe identity, the trace and the origin are stamped server-side on the way\nthrough, so a sink never has to trust — or re-derive — any of them.",
1405
+ "members": [
1406
+ {
1407
+ "line": "at?: number"
1408
+ },
1409
+ {
1410
+ "line": "functionId?: string"
1411
+ },
1412
+ {
1413
+ "line": "name: string"
1414
+ },
1415
+ {
1416
+ "line": "occurredAt: string"
1417
+ },
1418
+ {
1419
+ "line": "props?: Record<string, unknown>"
1420
+ },
1421
+ {
1422
+ "line": "source: \"server\" | \"client\""
1423
+ },
1424
+ {
1425
+ "line": "traceId?: string"
1426
+ },
1427
+ {
1428
+ "line": "userIdentity: AnalyticsIdentity"
1429
+ },
1430
+ {
1431
+ "line": "wireType?: PikkuWiringTypes"
1432
+ }
1433
+ ]
1434
+ },
1435
+ {
1436
+ "name": "AnalyticsService",
1437
+ "kind": "interface",
1438
+ "origin": {
1439
+ "via": "core",
1440
+ "subpath": "./analytics"
1441
+ },
1442
+ "summary": "Where accepted events go. Pikku validates, identifies and batches them; it does not store them.",
1443
+ "docs": "Where accepted events go. Pikku validates, identifies and batches them; it\ndoes not store them.\n\nOne method, taking a batch, because a batch is what a destination is always\nhanded: the invocation buffers and flushes once, and a lone event is a batch\nof one. A single-event method beside it would be a second path every sink had\nto implement and every caller had to choose between.",
1444
+ "members": [
1445
+ {
1446
+ "line": "write: (batch: AnalyticsRecord[]) => Promise<void>"
1447
+ }
1448
+ ]
1449
+ },
1450
+ {
1451
+ "name": "defineAnalyticsEvents",
1452
+ "kind": "function",
1453
+ "origin": {
1454
+ "via": "core",
1455
+ "subpath": "./analytics"
1456
+ },
1457
+ "summary": "Declare what a module can measure. Call it as often as suits the project; the CLI unions every declaration into the ingest schema.",
1458
+ "docs": "Declare what a module can measure. Call it as often as suits the project; the\nCLI unions every declaration into the ingest schema.\n\nIt must stay an exported const — the schema pipeline reads the value by name.\nIt registers nothing at runtime: where events go is an `AnalyticsService` on\nsingleton services.",
1459
+ "signature": "<const Events extends AnalyticsEventDefinitions>(events: Events) => Events"
1460
+ },
1461
+ {
1462
+ "name": "flattenAnalyticsEvent",
1463
+ "kind": "function",
1464
+ "origin": {
1465
+ "via": "core",
1466
+ "subpath": "./analytics"
1467
+ },
1468
+ "summary": "Removes the discriminator, so `props` is free of the series key.",
1469
+ "docs": "Removes the discriminator, so `props` is free of the series key.",
1470
+ "signature": "(event: AnalyticsEventBase, at?: number) => AnalyticsEventInput",
1471
+ "members": [
1472
+ {
1473
+ "line": "name: string"
1474
+ }
1475
+ ]
1476
+ },
1477
+ {
1478
+ "name": "LoggerAnalyticsService",
1479
+ "kind": "class",
1480
+ "origin": {
1481
+ "via": "core",
1482
+ "subpath": "./analytics"
1483
+ },
1484
+ "summary": "What an app gets before it has chosen a store. There is deliberately no noop: a validated wire with nowhere for the events to go is indistinguishable from a broken one.",
1485
+ "docs": "What an app gets before it has chosen a store. There is deliberately no noop:\na validated wire with nowhere for the events to go is indistinguishable from\na broken one.\n\nAt `debug` so attaching a real store does not report every event twice.",
1486
+ "signature": "new LoggerAnalyticsService(logger: Logger)",
1487
+ "members": [
1488
+ {
1489
+ "line": "logger: any"
1490
+ },
1491
+ {
1492
+ "line": "write: (batch: AnalyticsRecord[]) => Promise<void>"
1493
+ }
1494
+ ]
1495
+ }
1496
+ ]
1497
+ },
1219
1498
  {
1220
1499
  "specifier": "#pikku/error",
1221
1500
  "name": "error",
@@ -1335,6 +1614,21 @@
1335
1614
  "signature": "new ExpectationFailedError(message?: string)",
1336
1615
  "status": 417
1337
1616
  },
1617
+ {
1618
+ "name": "FeatureUnavailableError",
1619
+ "kind": "class",
1620
+ "origin": {
1621
+ "via": "core",
1622
+ "subpath": "./errors"
1623
+ },
1624
+ "signature": "new FeatureUnavailableError(feature: string)",
1625
+ "members": [
1626
+ {
1627
+ "line": "payload: { error: \"feature_unavailable\"; feature: string; }"
1628
+ }
1629
+ ],
1630
+ "status": 503
1631
+ },
1338
1632
  {
1339
1633
  "name": "ForbiddenError",
1340
1634
  "kind": "class",
@@ -3404,6 +3698,20 @@
3404
3698
  "summary": "The scopes a caller can hold and the roles that grant them, gating a call outside the permission pool.",
3405
3699
  "skill": "pikku-auth",
3406
3700
  "symbols": [
3701
+ {
3702
+ "name": "defineFeatureFlags",
3703
+ "kind": "function",
3704
+ "origin": {
3705
+ "via": "core",
3706
+ "subpath": "./flag"
3707
+ },
3708
+ "summary": "No-op function for declaring feature flags. This exists purely for TypeScript type checking and will be tree-shaken. The CLI extracts metadata via AST parsing and generates a `FeatureFlagName` union, so `flags.calList` is a compile error rather than a silent `false`.",
3709
+ "docs": "No-op function for declaring feature flags.\nThis exists purely for TypeScript type checking and will be tree-shaken.\nThe CLI extracts metadata via AST parsing and generates a `FeatureFlagName`\nunion, so `flags.calList` is a compile error rather than a silent `false`.\n\nThat typing is load-bearing rather than a convenience: flags fail closed, so\na typo'd flag reads `false`, hides its feature permanently, and leaves every\ntest, screenshot and gate green. An untyped key makes a missing product\nindistinguishable from a working one.\n\nRemoval is deliberately not destructive. Deleting a declaration leaves the\nrow in the store, marked undeclared and inert, until `pikku flags prune` —\nthe same additive contract `defineScope` and `defineSystemRole` have, and for\nthe same reason: a mid-deploy revocation is not something a code edit should\nbe able to cause.",
3710
+ "signature": "(_config: CoreFeatureFlags) => void",
3711
+ "examples": [
3712
+ "```typescript\ndefineFeatureFlags({\n takeInBike: {\n description: 'Book a bike in at the counter',\n anyOf: ['bikes:intake'],\n },\n aiAssistant: {\n description: 'The assistant panel',\n // no anyOf — the switch is the whole answer\n },\n})\n```"
3713
+ ]
3714
+ },
3407
3715
  {
3408
3716
  "name": "defineScope",
3409
3717
  "kind": "function",
@@ -3431,6 +3739,46 @@
3431
3739
  "examples": [
3432
3740
  "```typescript\ndefineSystemRole({\n buyer: {\n displayName: 'Buyer',\n description: 'Can browse the catalogue and place orders',\n scopes: ['catalogue:read', 'orders:create'],\n },\n admin: {\n description: 'Everything',\n scopes: ['admin'],\n },\n})\n```"
3433
3741
  ]
3742
+ },
3743
+ {
3744
+ "name": "FEATURE_FLAGS",
3745
+ "kind": "const",
3746
+ "origin": {
3747
+ "via": "generated"
3748
+ },
3749
+ "summary": "The declared flag set, for a FeatureFlagStore to sync into its store.",
3750
+ "docs": "The declared flag set, for a FeatureFlagStore to sync into its store.\n\nDerived from the metadata sidecar rather than inlined, so the import above\nforces tsc to emit the .json alongside this file — an addon publishes only\nits compiled output, and a host reads that .json to merge the addon's flags\ninto its own union.\n\nAdditive on removal: a deleted declaration leaves the row marked\n`declared: false` rather than switching a feature off on deploy. Use\n`pikku flags prune` to remove them.",
3751
+ "signature": "DeclaredFlag[]"
3752
+ },
3753
+ {
3754
+ "name": "FEATURE_FLAGS_FALLBACK",
3755
+ "kind": "const",
3756
+ "origin": {
3757
+ "via": "generated"
3758
+ },
3759
+ "summary": "What a flag source falls back to when its backing store cannot be read: every declared flag on, no rollout, no overrides.",
3760
+ "docs": "What a flag source falls back to when its backing store cannot be read: every\ndeclared flag on, no rollout, no overrides.\n\nFailing open is deliberate. A flag store is not an authorization boundary —\n`scopes:` is — so an unreadable config must not take the product down with\nit.",
3761
+ "signature": "FlagConfigSnapshot"
3762
+ },
3763
+ {
3764
+ "name": "FEATURE_FLAGS_META",
3765
+ "kind": "const",
3766
+ "origin": {
3767
+ "via": "generated"
3768
+ },
3769
+ "summary": "Declared flags, keyed by name. Rendered by the console beside each switch.",
3770
+ "docs": "Declared flags, keyed by name. Rendered by the console beside each switch.\n\nKeyed by `FeatureFlagName` so a misspelled lookup is a type error, which is\nthe whole point of generating the union. The assertion is what\n`Object.fromEntries` costs — it returns an index signature — and it is\nsound here because both this object and the union are built from\n`FEATURE_FLAGS`, so every key of the union is present.",
3771
+ "signature": "Record<never, DeclaredFlag>"
3772
+ },
3773
+ {
3774
+ "name": "FeatureFlagName",
3775
+ "kind": "type",
3776
+ "origin": {
3777
+ "via": "generated"
3778
+ },
3779
+ "summary": "Every feature flag declared in this application.",
3780
+ "docs": "Every feature flag declared in this application.",
3781
+ "signature": "never"
3434
3782
  }
3435
3783
  ]
3436
3784
  },
@@ -3568,7 +3916,7 @@
3568
3916
  "doc": "Who the agent is. Joined with `personality` and `goal`, in that order, to form the system prompt."
3569
3917
  },
3570
3918
  {
3571
- "line": "scopes?: never[]",
3919
+ "line": "scopes?: import(\"#pikku/scopes/pikku-scopes.gen.js\").ScopeId[]",
3572
3920
  "doc": "Scopes the session must hold to run this agent. All of them are required (AND), and they are checked before `permissions` — unlike permissions, which OR together, a scope can only narrow access. Narrowed to the generated `ScopeId` union in a project's own `#pikku/scopes`, so an undeclared scope is a compile error."
3573
3921
  },
3574
3922
  {
@@ -3754,7 +4102,7 @@
3754
4102
  "doc": "Unique across the project. It is how the graph is started and how its runs are grouped."
3755
4103
  },
3756
4104
  {
3757
- "line": "nodes: Record<string, 43 names (pikku meta)>",
4105
+ "line": "nodes: Record<string, 118 names (pikku meta)>",
3758
4106
  "doc": "The graph's steps, keyed by node id, each naming a function. `pikku meta` lists the names available here."
3759
4107
  },
3760
4108
  {
@@ -4024,7 +4372,7 @@
4024
4372
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
4025
4373
  },
4026
4374
  {
4027
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
4375
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
4028
4376
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
4029
4377
  },
4030
4378
  {
@@ -4039,6 +4387,10 @@
4039
4387
  "line": "expose?: boolean",
4040
4388
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
4041
4389
  },
4390
+ {
4391
+ "line": "featureFlag?: undefined",
4392
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
4393
+ },
4042
4394
  {
4043
4395
  "line": "func: PikkuFunctionScenario<In, Out, Out>",
4044
4396
  "doc": "The body. Its first parameter is the services it needs, destructured inline so the build can tree-shake the rest away."
@@ -4084,7 +4436,7 @@
4084
4436
  "doc": "Scenario steps only, and set by the definer rather than by hand: this step needs a persona, so the runner injects `wire.actor`."
4085
4437
  },
4086
4438
  {
4087
- "line": "scopes?: never[]",
4439
+ "line": "scopes?: import(\"#pikku/scopes/pikku-scopes.gen.js\").ScopeId[]",
4088
4440
  "doc": "Scopes the session must hold. All are required, and checked before `permissions`, which OR together — a scope only narrows access."
4089
4441
  },
4090
4442
  {
@@ -4429,7 +4781,7 @@
4429
4781
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
4430
4782
  },
4431
4783
  {
4432
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
4784
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
4433
4785
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
4434
4786
  },
4435
4787
  {
@@ -4444,6 +4796,10 @@
4444
4796
  "line": "expose?: boolean",
4445
4797
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
4446
4798
  },
4799
+ {
4800
+ "line": "featureFlag?: undefined",
4801
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
4802
+ },
4447
4803
  {
4448
4804
  "line": "mcp?: boolean",
4449
4805
  "doc": "Offers the function to MCP clients as a tool, without a separate `wireMCPTool`."
@@ -4558,7 +4914,7 @@
4558
4914
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
4559
4915
  },
4560
4916
  {
4561
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
4917
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
4562
4918
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
4563
4919
  },
4564
4920
  {
@@ -4573,6 +4929,10 @@
4573
4929
  "line": "expose?: boolean",
4574
4930
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
4575
4931
  },
4932
+ {
4933
+ "line": "featureFlag?: undefined",
4934
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
4935
+ },
4576
4936
  {
4577
4937
  "line": "func: PikkuFunction<In, Out, RequiredWires, any> | PikkuFunctionSessionless<In, Out, RequiredWires, any, any>",
4578
4938
  "doc": "The body. Its first parameter is the services it needs, destructured inline so the build can tree-shake the rest away."
@@ -4700,7 +5060,7 @@
4700
5060
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
4701
5061
  },
4702
5062
  {
4703
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
5063
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
4704
5064
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
4705
5065
  },
4706
5066
  {
@@ -4715,6 +5075,10 @@
4715
5075
  "line": "expose?: boolean",
4716
5076
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
4717
5077
  },
5078
+ {
5079
+ "line": "featureFlag?: undefined",
5080
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
5081
+ },
4718
5082
  {
4719
5083
  "line": "func: PikkuFunction<ListInput<F, S>, ListOutput<Row>, \"rpc\" | \"session\", WiredServices> | PikkuFunctionSessionless<ListInput<F, S>, ListOutput<Row>, \"rpc\" | \"session\", WiredServices, unknown>",
4720
5084
  "doc": "The body. Its first parameter is the services it needs, destructured inline so the build can tree-shake the rest away."
@@ -4831,7 +5195,7 @@
4831
5195
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
4832
5196
  },
4833
5197
  {
4834
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
5198
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
4835
5199
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
4836
5200
  },
4837
5201
  {
@@ -4846,6 +5210,10 @@
4846
5210
  "line": "expose?: boolean",
4847
5211
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
4848
5212
  },
5213
+ {
5214
+ "line": "featureFlag?: string",
5215
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
5216
+ },
4849
5217
  {
4850
5218
  "line": "mcp?: boolean",
4851
5219
  "doc": "Offers the function to MCP clients as a tool, without a separate `wireMCPTool`."
@@ -4942,7 +5310,7 @@
4942
5310
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
4943
5311
  },
4944
5312
  {
4945
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
5313
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
4946
5314
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
4947
5315
  },
4948
5316
  {
@@ -4957,6 +5325,10 @@
4957
5325
  "line": "expose?: boolean",
4958
5326
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
4959
5327
  },
5328
+ {
5329
+ "line": "featureFlag?: string",
5330
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
5331
+ },
4960
5332
  {
4961
5333
  "line": "mcp?: boolean",
4962
5334
  "doc": "Offers the function to MCP clients as a tool, without a separate `wireMCPTool`."
@@ -5103,6 +5475,18 @@
5103
5475
  {
5104
5476
  "line": "aiEmbedding?: AIEmbeddingService"
5105
5477
  },
5478
+ {
5479
+ "line": "analytics?: AnalyticsLog<AnalyticsEventBase>",
5480
+ "doc": "Request-scoped buffer writing into `analyticsService`. Narrow it to the app's own event union in `SingletonServices` to type `record()`."
5481
+ },
5482
+ {
5483
+ "line": "analyticsIdentity?: AnalyticsIdentityResolver",
5484
+ "doc": "Resolves the browser-originated half of an event's identity — vendor ids and consent — from the wire. Unset means a sink sees only what the session carries, which is enough for a product-analytics tool and not enough for an ad platform."
5485
+ },
5486
+ {
5487
+ "line": "analyticsService?: AnalyticsService",
5488
+ "doc": "Where product-analytics events go; unset means the logger."
5489
+ },
5106
5490
  {
5107
5491
  "line": "audit?: AuditService"
5108
5492
  },
@@ -5136,6 +5520,10 @@
5136
5520
  {
5137
5521
  "line": "eventHub?: EventHubService<Record<string, any>>"
5138
5522
  },
5523
+ {
5524
+ "line": "featureFlags?: FeatureFlagSource",
5525
+ "doc": "The global feature-flag config, read by the function runner to enforce a flag's availability. Inert when absent: a project that declares no flag carries nothing, and a `featureFlag:` with no source registered is a no-op rather than a closed door."
5526
+ },
5139
5527
  {
5140
5528
  "line": "jwt?: JWTService"
5141
5529
  },
@@ -5243,6 +5631,18 @@
5243
5631
  {
5244
5632
  "line": "aiEmbedding?: AIEmbeddingService"
5245
5633
  },
5634
+ {
5635
+ "line": "analytics?: AnalyticsLog<AnalyticsEventBase>",
5636
+ "doc": "Request-scoped buffer writing into `analyticsService`. Narrow it to the app's own event union in `SingletonServices` to type `record()`."
5637
+ },
5638
+ {
5639
+ "line": "analyticsIdentity?: AnalyticsIdentityResolver",
5640
+ "doc": "Resolves the browser-originated half of an event's identity — vendor ids and consent — from the wire. Unset means a sink sees only what the session carries, which is enough for a product-analytics tool and not enough for an ad platform."
5641
+ },
5642
+ {
5643
+ "line": "analyticsService?: AnalyticsService",
5644
+ "doc": "Where product-analytics events go; unset means the logger."
5645
+ },
5246
5646
  {
5247
5647
  "line": "audit?: AuditService"
5248
5648
  },
@@ -5276,6 +5676,10 @@
5276
5676
  {
5277
5677
  "line": "eventHub?: EventHubService<Record<string, any>>"
5278
5678
  },
5679
+ {
5680
+ "line": "featureFlags?: FeatureFlagSource",
5681
+ "doc": "The global feature-flag config, read by the function runner to enforce a flag's availability. Inert when absent: a project that declares no flag carries nothing, and a `featureFlag:` with no source registered is a no-op rather than a closed door."
5682
+ },
5279
5683
  {
5280
5684
  "line": "jwt?: JWTService"
5281
5685
  },
@@ -5352,6 +5756,18 @@
5352
5756
  {
5353
5757
  "line": "aiEmbedding?: AIEmbeddingService"
5354
5758
  },
5759
+ {
5760
+ "line": "analytics?: AnalyticsLog<AnalyticsEventBase>",
5761
+ "doc": "Request-scoped buffer writing into `analyticsService`. Narrow it to the app's own event union in `SingletonServices` to type `record()`."
5762
+ },
5763
+ {
5764
+ "line": "analyticsIdentity?: AnalyticsIdentityResolver",
5765
+ "doc": "Resolves the browser-originated half of an event's identity — vendor ids and consent — from the wire. Unset means a sink sees only what the session carries, which is enough for a product-analytics tool and not enough for an ad platform."
5766
+ },
5767
+ {
5768
+ "line": "analyticsService?: AnalyticsService",
5769
+ "doc": "Where product-analytics events go; unset means the logger."
5770
+ },
5355
5771
  {
5356
5772
  "line": "audit?: AuditService"
5357
5773
  },
@@ -5385,6 +5801,10 @@
5385
5801
  {
5386
5802
  "line": "eventHub?: EventHubService<Record<string, any>>"
5387
5803
  },
5804
+ {
5805
+ "line": "featureFlags?: FeatureFlagSource",
5806
+ "doc": "The global feature-flag config, read by the function runner to enforce a flag's availability. Inert when absent: a project that declares no flag carries nothing, and a `featureFlag:` with no source registered is a no-op rather than a closed door."
5807
+ },
5388
5808
  {
5389
5809
  "line": "jwt?: JWTService"
5390
5810
  },
@@ -5556,6 +5976,229 @@
5556
5976
  }
5557
5977
  ]
5558
5978
  },
5979
+ {
5980
+ "specifier": "#pikku/addon/analytics",
5981
+ "name": "analytics",
5982
+ "step": "enhance it",
5983
+ "summary": "The events a project can measure, declared by name so the generated ingest knows what to accept. Where they go is an AnalyticsService on singleton services; what a function records into is the analytics service on the invocation.",
5984
+ "skill": null,
5985
+ "symbols": [
5986
+ {
5987
+ "name": "AnalyticsClientContext",
5988
+ "kind": "interface",
5989
+ "origin": {
5990
+ "via": "core",
5991
+ "subpath": "./analytics"
5992
+ },
5993
+ "summary": "Its presence, not `at`, is what marks a record as relayed from a browser — a beacon is free to omit `at`.",
5994
+ "docs": "Its presence, not `at`, is what marks a record as relayed from a browser — a\nbeacon is free to omit `at`.",
5995
+ "members": [
5996
+ {
5997
+ "line": "at?: number"
5998
+ }
5999
+ ]
6000
+ },
6001
+ {
6002
+ "name": "AnalyticsEventBase",
6003
+ "kind": "type",
6004
+ "origin": {
6005
+ "via": "core",
6006
+ "subpath": "./analytics"
6007
+ },
6008
+ "summary": "The constraint a project's declared event union is checked against.",
6009
+ "docs": "The constraint a project's declared event union is checked against.\n\nOnly `name` is fixed, because the name is the whole of what pikku itself\nreads — everything else on an event belongs to the app and to the sinks it\nwires, and narrowing it here would make the generic useless for anyone whose\nevents carry more than a fixed set of props.",
6010
+ "members": [
6011
+ {
6012
+ "line": "name: string"
6013
+ }
6014
+ ]
6015
+ },
6016
+ {
6017
+ "name": "AnalyticsEventDefinitions",
6018
+ "kind": "type",
6019
+ "origin": {
6020
+ "via": "core",
6021
+ "subpath": "./analytics"
6022
+ },
6023
+ "summary": "Events keyed by name; each value is the schema for that event's props.",
6024
+ "docs": "Events keyed by name; each value is the schema for that event's props."
6025
+ },
6026
+ {
6027
+ "name": "AnalyticsEventPropsSchema",
6028
+ "kind": "type",
6029
+ "origin": {
6030
+ "via": "core",
6031
+ "subpath": "./analytics"
6032
+ },
6033
+ "summary": "The schema for one event's props. The generated ingest rebuilds each member of the union as `z.object(schema.shape)` so it can attach the event name, so a schema with no `shape` — a union, a primitive, a schema from a library that does not expose one — is not something an event can be declared with, and saying so here fails at the declaration rather than in generated code.",
6034
+ "docs": "The schema for one event's props. The generated ingest rebuilds each member\nof the union as `z.object(schema.shape)` so it can attach the event name, so\na schema with no `shape` — a union, a primitive, a schema from a library\nthat does not expose one — is not something an event can be declared with,\nand saying so here fails at the declaration rather than in generated code.",
6035
+ "members": [
6036
+ {
6037
+ "line": "~standard: StandardSchemaV1.Props<unknown, unknown>",
6038
+ "doc": "The Standard Schema properties."
6039
+ },
6040
+ {
6041
+ "line": "shape: Record<string, unknown>"
6042
+ }
6043
+ ]
6044
+ },
6045
+ {
6046
+ "name": "AnalyticsIdentity",
6047
+ "kind": "interface",
6048
+ "origin": {
6049
+ "via": "core",
6050
+ "subpath": "./analytics"
6051
+ },
6052
+ "summary": "Stamped server-side from the session and never read from the request body, which is what makes an unauthenticated ingest safe to expose.",
6053
+ "docs": "Stamped server-side from the session and never read from the request body,\nwhich is what makes an unauthenticated ingest safe to expose.",
6054
+ "members": [
6055
+ {
6056
+ "line": "anonymousId?: string",
6057
+ "doc": "A device-scoped id for a visitor with no session, minted by pikku rather than by a vendor. Distinct from `pikkuUserId`, which is derived from a session and is therefore absent for exactly the visitor this identifies. Without it a product-analytics sink has no honest option for anonymous traffic: keying on a shared literal collapses every visitor into one person, and dropping the event loses the whole pre-signup funnel."
6058
+ },
6059
+ {
6060
+ "line": "consent?: Record<string, boolean>",
6061
+ "doc": "What the visitor agreed to, keyed by purpose. A sink gated on a purpose absent here does not send. Open-ended rather than a fixed pair, because the purposes are the consent tool's vocabulary and jurisdictions do not agree on them. Undefined means the app wired no consent resolver, not that consent was refused — the gate belongs to the sink, which is where the app decides what absence means."
6062
+ },
6063
+ {
6064
+ "line": "orgId?: string"
6065
+ },
6066
+ {
6067
+ "line": "pikkuUserId?: string"
6068
+ },
6069
+ {
6070
+ "line": "userId: string | null"
6071
+ },
6072
+ {
6073
+ "line": "vendorIds?: Record<string, string>",
6074
+ "doc": "Identifiers a destination keys on that pikku does not mint — GA4's `client_id`, Meta's `fbp` and `fbc`, a vendor's own device id. All of them originate in the browser, and a sink that cannot produce one does not degrade, it sends nothing usable. Resolved server-side from first-party cookies on the request, never read from the event body, on the same reasoning as the rest of this object: a crafted client call must not be able to attribute an event to someone else."
6075
+ }
6076
+ ]
6077
+ },
6078
+ {
6079
+ "name": "AnalyticsLog",
6080
+ "kind": "interface",
6081
+ "origin": {
6082
+ "via": "core",
6083
+ "subpath": "./analytics"
6084
+ },
6085
+ "summary": "`services.analytics`: buffered for the invocation, flushed when it ends, always best-effort. `record` is a method rather than a property so an app can narrow `Events` in its own `SingletonServices`.",
6086
+ "docs": "`services.analytics`: buffered for the invocation, flushed when it ends,\nalways best-effort. `record` is a method rather than a property so an app can\nnarrow `Events` in its own `SingletonServices`.",
6087
+ "signature": "AnalyticsLog<Events>",
6088
+ "members": [
6089
+ {
6090
+ "line": "close: () => Promise<void>"
6091
+ },
6092
+ {
6093
+ "line": "flush: () => Promise<void>"
6094
+ },
6095
+ {
6096
+ "line": "record: (event: Events, client?: AnalyticsClientContext) => Promise<void>"
6097
+ }
6098
+ ]
6099
+ },
6100
+ {
6101
+ "name": "AnalyticsRecord",
6102
+ "kind": "interface",
6103
+ "origin": {
6104
+ "via": "core",
6105
+ "subpath": "./analytics"
6106
+ },
6107
+ "summary": "What an event becomes once pikku has accepted it, and the only shape an {@link AnalyticsService} is ever handed.",
6108
+ "docs": "What an event becomes once pikku has accepted it, and the only shape an\n{@link AnalyticsService} is ever handed.\n\nDistinct from {@link AnalyticsEventInput}, which is what a caller submits:\nthe identity, the trace and the origin are stamped server-side on the way\nthrough, so a sink never has to trust — or re-derive — any of them.",
6109
+ "members": [
6110
+ {
6111
+ "line": "at?: number"
6112
+ },
6113
+ {
6114
+ "line": "functionId?: string"
6115
+ },
6116
+ {
6117
+ "line": "name: string"
6118
+ },
6119
+ {
6120
+ "line": "occurredAt: string"
6121
+ },
6122
+ {
6123
+ "line": "props?: Record<string, unknown>"
6124
+ },
6125
+ {
6126
+ "line": "source: \"server\" | \"client\""
6127
+ },
6128
+ {
6129
+ "line": "traceId?: string"
6130
+ },
6131
+ {
6132
+ "line": "userIdentity: AnalyticsIdentity"
6133
+ },
6134
+ {
6135
+ "line": "wireType?: PikkuWiringTypes"
6136
+ }
6137
+ ]
6138
+ },
6139
+ {
6140
+ "name": "AnalyticsService",
6141
+ "kind": "interface",
6142
+ "origin": {
6143
+ "via": "core",
6144
+ "subpath": "./analytics"
6145
+ },
6146
+ "summary": "Where accepted events go. Pikku validates, identifies and batches them; it does not store them.",
6147
+ "docs": "Where accepted events go. Pikku validates, identifies and batches them; it\ndoes not store them.\n\nOne method, taking a batch, because a batch is what a destination is always\nhanded: the invocation buffers and flushes once, and a lone event is a batch\nof one. A single-event method beside it would be a second path every sink had\nto implement and every caller had to choose between.",
6148
+ "members": [
6149
+ {
6150
+ "line": "write: (batch: AnalyticsRecord[]) => Promise<void>"
6151
+ }
6152
+ ]
6153
+ },
6154
+ {
6155
+ "name": "defineAnalyticsEvents",
6156
+ "kind": "function",
6157
+ "origin": {
6158
+ "via": "core",
6159
+ "subpath": "./analytics"
6160
+ },
6161
+ "summary": "Declare what a module can measure. Call it as often as suits the project; the CLI unions every declaration into the ingest schema.",
6162
+ "docs": "Declare what a module can measure. Call it as often as suits the project; the\nCLI unions every declaration into the ingest schema.\n\nIt must stay an exported const — the schema pipeline reads the value by name.\nIt registers nothing at runtime: where events go is an `AnalyticsService` on\nsingleton services.",
6163
+ "signature": "<const Events extends AnalyticsEventDefinitions>(events: Events) => Events"
6164
+ },
6165
+ {
6166
+ "name": "flattenAnalyticsEvent",
6167
+ "kind": "function",
6168
+ "origin": {
6169
+ "via": "core",
6170
+ "subpath": "./analytics"
6171
+ },
6172
+ "summary": "Removes the discriminator, so `props` is free of the series key.",
6173
+ "docs": "Removes the discriminator, so `props` is free of the series key.",
6174
+ "signature": "(event: AnalyticsEventBase, at?: number) => AnalyticsEventInput",
6175
+ "members": [
6176
+ {
6177
+ "line": "name: string"
6178
+ }
6179
+ ]
6180
+ },
6181
+ {
6182
+ "name": "LoggerAnalyticsService",
6183
+ "kind": "class",
6184
+ "origin": {
6185
+ "via": "core",
6186
+ "subpath": "./analytics"
6187
+ },
6188
+ "summary": "What an app gets before it has chosen a store. There is deliberately no noop: a validated wire with nowhere for the events to go is indistinguishable from a broken one.",
6189
+ "docs": "What an app gets before it has chosen a store. There is deliberately no noop:\na validated wire with nowhere for the events to go is indistinguishable from\na broken one.\n\nAt `debug` so attaching a real store does not report every event twice.",
6190
+ "signature": "new LoggerAnalyticsService(logger: Logger)",
6191
+ "members": [
6192
+ {
6193
+ "line": "logger: any"
6194
+ },
6195
+ {
6196
+ "line": "write: (batch: AnalyticsRecord[]) => Promise<void>"
6197
+ }
6198
+ ]
6199
+ }
6200
+ ]
6201
+ },
5559
6202
  {
5560
6203
  "specifier": "#pikku/addon/error",
5561
6204
  "name": "error",
@@ -5675,6 +6318,21 @@
5675
6318
  "signature": "new ExpectationFailedError(message?: string)",
5676
6319
  "status": 417
5677
6320
  },
6321
+ {
6322
+ "name": "FeatureUnavailableError",
6323
+ "kind": "class",
6324
+ "origin": {
6325
+ "via": "core",
6326
+ "subpath": "./errors"
6327
+ },
6328
+ "signature": "new FeatureUnavailableError(feature: string)",
6329
+ "members": [
6330
+ {
6331
+ "line": "payload: { error: \"feature_unavailable\"; feature: string; }"
6332
+ }
6333
+ ],
6334
+ "status": 503
6335
+ },
5678
6336
  {
5679
6337
  "name": "ForbiddenError",
5680
6338
  "kind": "class",
@@ -6944,6 +7602,20 @@
6944
7602
  "summary": "The scopes a caller can hold and the roles that grant them, gating a call outside the permission pool.",
6945
7603
  "skill": "pikku-auth",
6946
7604
  "symbols": [
7605
+ {
7606
+ "name": "defineFeatureFlags",
7607
+ "kind": "function",
7608
+ "origin": {
7609
+ "via": "core",
7610
+ "subpath": "./flag"
7611
+ },
7612
+ "summary": "No-op function for declaring feature flags. This exists purely for TypeScript type checking and will be tree-shaken. The CLI extracts metadata via AST parsing and generates a `FeatureFlagName` union, so `flags.calList` is a compile error rather than a silent `false`.",
7613
+ "docs": "No-op function for declaring feature flags.\nThis exists purely for TypeScript type checking and will be tree-shaken.\nThe CLI extracts metadata via AST parsing and generates a `FeatureFlagName`\nunion, so `flags.calList` is a compile error rather than a silent `false`.\n\nThat typing is load-bearing rather than a convenience: flags fail closed, so\na typo'd flag reads `false`, hides its feature permanently, and leaves every\ntest, screenshot and gate green. An untyped key makes a missing product\nindistinguishable from a working one.\n\nRemoval is deliberately not destructive. Deleting a declaration leaves the\nrow in the store, marked undeclared and inert, until `pikku flags prune` —\nthe same additive contract `defineScope` and `defineSystemRole` have, and for\nthe same reason: a mid-deploy revocation is not something a code edit should\nbe able to cause.",
7614
+ "signature": "(_config: CoreFeatureFlags) => void",
7615
+ "examples": [
7616
+ "```typescript\ndefineFeatureFlags({\n takeInBike: {\n description: 'Book a bike in at the counter',\n anyOf: ['bikes:intake'],\n },\n aiAssistant: {\n description: 'The assistant panel',\n // no anyOf — the switch is the whole answer\n },\n})\n```"
7617
+ ]
7618
+ },
6947
7619
  {
6948
7620
  "name": "defineScope",
6949
7621
  "kind": "function",
@@ -6971,6 +7643,46 @@
6971
7643
  "examples": [
6972
7644
  "```typescript\ndefineSystemRole({\n buyer: {\n displayName: 'Buyer',\n description: 'Can browse the catalogue and place orders',\n scopes: ['catalogue:read', 'orders:create'],\n },\n admin: {\n description: 'Everything',\n scopes: ['admin'],\n },\n})\n```"
6973
7645
  ]
7646
+ },
7647
+ {
7648
+ "name": "FEATURE_FLAGS",
7649
+ "kind": "const",
7650
+ "origin": {
7651
+ "via": "generated"
7652
+ },
7653
+ "summary": "The declared flag set, for a FeatureFlagStore to sync into its store.",
7654
+ "docs": "The declared flag set, for a FeatureFlagStore to sync into its store.\n\nDerived from the metadata sidecar rather than inlined, so the import above\nforces tsc to emit the .json alongside this file — an addon publishes only\nits compiled output, and a host reads that .json to merge the addon's flags\ninto its own union.\n\nAdditive on removal: a deleted declaration leaves the row marked\n`declared: false` rather than switching a feature off on deploy. Use\n`pikku flags prune` to remove them.",
7655
+ "signature": "DeclaredFlag[]"
7656
+ },
7657
+ {
7658
+ "name": "FEATURE_FLAGS_FALLBACK",
7659
+ "kind": "const",
7660
+ "origin": {
7661
+ "via": "generated"
7662
+ },
7663
+ "summary": "What a flag source falls back to when its backing store cannot be read: every declared flag on, no rollout, no overrides.",
7664
+ "docs": "What a flag source falls back to when its backing store cannot be read: every\ndeclared flag on, no rollout, no overrides.\n\nFailing open is deliberate. A flag store is not an authorization boundary —\n`scopes:` is — so an unreadable config must not take the product down with\nit.",
7665
+ "signature": "FlagConfigSnapshot"
7666
+ },
7667
+ {
7668
+ "name": "FEATURE_FLAGS_META",
7669
+ "kind": "const",
7670
+ "origin": {
7671
+ "via": "generated"
7672
+ },
7673
+ "summary": "Declared flags, keyed by name. Rendered by the console beside each switch.",
7674
+ "docs": "Declared flags, keyed by name. Rendered by the console beside each switch.\n\nKeyed by `FeatureFlagName` so a misspelled lookup is a type error, which is\nthe whole point of generating the union. The assertion is what\n`Object.fromEntries` costs — it returns an index signature — and it is\nsound here because both this object and the union are built from\n`FEATURE_FLAGS`, so every key of the union is present.",
7675
+ "signature": "Record<never, DeclaredFlag>"
7676
+ },
7677
+ {
7678
+ "name": "FeatureFlagName",
7679
+ "kind": "type",
7680
+ "origin": {
7681
+ "via": "generated"
7682
+ },
7683
+ "summary": "Every feature flag declared in this application.",
7684
+ "docs": "Every feature flag declared in this application.",
7685
+ "signature": "never"
6974
7686
  }
6975
7687
  ]
6976
7688
  },
@@ -7564,7 +8276,7 @@
7564
8276
  "doc": "Scenarios only: runs before the scenario body, with the scenario's own signature. Throwing skips the body and fails the run, but `after` still runs."
7565
8277
  },
7566
8278
  {
7567
- "line": "deploy?: \"auto\" | \"serverless\" | \"server\"",
8279
+ "line": "deploy?: \"auto\" | \"server\" | \"serverless\"",
7568
8280
  "doc": "Where this function is deployed when the build can go either way. `auto` lets the analyser decide from what the function touches."
7569
8281
  },
7570
8282
  {
@@ -7579,6 +8291,10 @@
7579
8291
  "line": "expose?: boolean",
7580
8292
  "doc": "Makes the function callable from outside as `POST /rpc/<name>`. Without a session requirement, a permission or an addon gate, that means callable by anyone."
7581
8293
  },
8294
+ {
8295
+ "line": "featureFlag?: undefined",
8296
+ "doc": "The feature this function belongs to. Singular: a function implements part of one feature, and needing two is a sign it does two things. Resolved at runtime on every call, unlike `tags:` — a flag is meant to be flipped in a running system, so nothing here filters a build. Checked for AVAILABILITY only, never capability — if the runner enforced the capability half a flag would become a second authorization path with OR-ish semantics against `scopes:`. Authorization is always `scopes:`. Runs after `scopes:` so an unauthorized caller gets a 403 whether or not the feature is up, rather than learning that it exists and is off."
8297
+ },
7582
8298
  {
7583
8299
  "line": "func: PikkuFunctionScenario<In, Out, Out>",
7584
8300
  "doc": "The body. Its first parameter is the services it needs, destructured inline so the build can tree-shake the rest away."