@pikku/cli 0.12.83 → 0.12.86

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 (274) hide show
  1. package/console-app/assets/index-CSzCJzBb.css +1 -0
  2. package/console-app/assets/{index-CN_U0k_D.js → index-Cr3_cO3Z.js} +161 -150
  3. package/console-app/index.html +2 -2
  4. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +3 -2
  5. package/dist/.pikku/{http/pikku-http-wirings.gen.d.ts → auth/auth.types.d.ts} +1 -1
  6. package/dist/.pikku/auth/auth.types.js +5 -0
  7. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  8. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  9. package/dist/.pikku/cli/pikku-cli-channel.d.ts +4 -4
  10. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  11. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  12. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  13. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  14. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  15. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.json +4 -0
  16. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  17. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  18. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  19. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +4 -0
  20. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  21. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  22. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  23. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  24. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  25. package/dist/.pikku/function/pikku-function-types.gen.d.ts +24 -14
  26. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  27. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  28. package/dist/.pikku/function/pikku-functions-meta.gen.json +45 -36
  29. package/dist/.pikku/function/pikku-functions.gen.js +3 -3
  30. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  31. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  32. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  33. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  34. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -5
  35. package/dist/.pikku/pikku-bootstrap.gen.js +1 -5
  36. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  37. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  38. package/dist/.pikku/pikku-services.gen.d.ts +2 -1
  39. package/dist/.pikku/pikku-services.gen.js +1 -0
  40. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  41. package/dist/.pikku/pikku-types.gen.js +1 -1
  42. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  43. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  44. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  45. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -2
  46. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  47. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  48. package/dist/.pikku/schemas/register.gen.js +3 -7
  49. package/dist/.pikku/schemas/schemas/FabricLoginInput.schema.json +1 -1
  50. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  51. package/dist/.pikku/schemas/schemas/PikkuUserAdminFunctionsOutput.schema.json +1 -0
  52. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
  53. package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
  54. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
  55. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  56. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  57. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  58. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  59. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  60. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  61. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  62. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  63. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  64. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  65. package/dist/.pikku/workflow/meta/allWorkflow.gen.json +9 -3
  66. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +8 -2
  67. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  68. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  69. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  70. package/dist/bin/pikku-bin.mjs +2 -2
  71. package/dist/src/fabric/fabric-commands.d.ts +56 -53
  72. package/dist/src/fabric/fabric-commands.js +4 -0
  73. package/dist/src/fabric/functions/add.function.d.ts +2 -2
  74. package/dist/src/fabric/functions/addon-verify.function.d.ts +2 -2
  75. package/dist/src/fabric/functions/db-schema.function.d.ts +2 -2
  76. package/dist/src/fabric/functions/deploy-list.function.d.ts +2 -2
  77. package/dist/src/fabric/functions/deploy-units.function.d.ts +2 -2
  78. package/dist/src/fabric/functions/deploy.function.d.ts +4 -4
  79. package/dist/src/fabric/functions/domains-add.function.d.ts +2 -2
  80. package/dist/src/fabric/functions/domains-list.function.d.ts +2 -2
  81. package/dist/src/fabric/functions/domains-remove.function.d.ts +2 -2
  82. package/dist/src/fabric/functions/errors.function.d.ts +2 -2
  83. package/dist/src/fabric/functions/init.function.d.ts +2 -2
  84. package/dist/src/fabric/functions/link.function.d.ts +2 -2
  85. package/dist/src/fabric/functions/llm-key.function.d.ts +6 -6
  86. package/dist/src/fabric/functions/login.function.d.ts +6 -2
  87. package/dist/src/fabric/functions/login.function.js +45 -4
  88. package/dist/src/fabric/functions/logs.function.d.ts +2 -2
  89. package/dist/src/fabric/functions/metrics.function.d.ts +2 -2
  90. package/dist/src/fabric/functions/publish.function.d.ts +2 -2
  91. package/dist/src/fabric/functions/rollback.function.d.ts +2 -2
  92. package/dist/src/fabric/functions/secrets-list.function.d.ts +2 -2
  93. package/dist/src/fabric/functions/secrets-set.function.d.ts +2 -2
  94. package/dist/src/fabric/functions/smoke.function.d.ts +2 -2
  95. package/dist/src/fabric/functions/status.function.d.ts +2 -2
  96. package/dist/src/fabric/functions/trace.function.d.ts +2 -2
  97. package/dist/src/fabric/functions/validate.function.d.ts +2 -2
  98. package/dist/src/functions/commands/all.d.ts +1 -1
  99. package/dist/src/functions/commands/audit.d.ts +1 -1
  100. package/dist/src/functions/commands/binary.d.ts +2 -2
  101. package/dist/src/functions/commands/bootstrap.d.ts +1 -1
  102. package/dist/src/functions/commands/db-audit.d.ts +1 -1
  103. package/dist/src/functions/commands/db-generate.d.ts +1 -1
  104. package/dist/src/functions/commands/db-migrate.d.ts +1 -1
  105. package/dist/src/functions/commands/db-reset.d.ts +1 -1
  106. package/dist/src/functions/commands/db-seed.d.ts +1 -1
  107. package/dist/src/functions/commands/deploy-apply.d.ts +2 -2
  108. package/dist/src/functions/commands/deploy-info.d.ts +1 -1
  109. package/dist/src/functions/commands/deploy-plan.d.ts +2 -2
  110. package/dist/src/functions/commands/dev.d.ts +2 -2
  111. package/dist/src/functions/commands/emails-init.d.ts +1 -1
  112. package/dist/src/functions/commands/enable.d.ts +8 -8
  113. package/dist/src/functions/commands/import-n8n.d.ts +2 -2
  114. package/dist/src/functions/commands/info.d.ts +4 -4
  115. package/dist/src/functions/commands/login.d.ts +5 -5
  116. package/dist/src/functions/commands/meta.d.ts +25 -25
  117. package/dist/src/functions/commands/new-addon.d.ts +13 -2
  118. package/dist/src/functions/commands/new-addon.js +38 -4
  119. package/dist/src/functions/commands/new-function.d.ts +2 -2
  120. package/dist/src/functions/commands/new-middleware.d.ts +2 -2
  121. package/dist/src/functions/commands/new-permission.d.ts +2 -2
  122. package/dist/src/functions/commands/new-wiring.d.ts +2 -2
  123. package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
  124. package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
  125. package/dist/src/functions/commands/scenario.d.ts +3 -3
  126. package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
  127. package/dist/src/functions/commands/scopes-prune.d.ts +2 -2
  128. package/dist/src/functions/commands/serve.d.ts +2 -2
  129. package/dist/src/functions/commands/skills.d.ts +4 -4
  130. package/dist/src/functions/commands/versions-check.d.ts +1 -1
  131. package/dist/src/functions/commands/versions-init.d.ts +2 -2
  132. package/dist/src/functions/commands/versions-update.d.ts +1 -1
  133. package/dist/src/functions/commands/watch.d.ts +2 -2
  134. package/dist/src/functions/commands/workspace-validate.d.ts +2 -2
  135. package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
  136. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
  137. package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
  138. package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
  139. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
  140. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +3 -2
  141. package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
  142. package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
  143. package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +6 -2
  144. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
  145. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +3 -2
  146. package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +5 -1
  147. package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +112 -40
  148. package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +2 -2
  149. package/dist/src/functions/wirings/auth/pikku-command-auth.js +4 -0
  150. package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
  151. package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
  152. package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
  153. package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
  154. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
  155. package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
  156. package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
  157. package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
  158. package/dist/src/functions/wirings/console/pikku-command-console-functions.js +6 -2
  159. package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
  160. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
  161. package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +5 -1
  162. package/dist/src/functions/wirings/console/serialize-console-functions.js +55 -23
  163. package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
  164. package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
  165. package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
  166. package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +2 -2
  167. package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +2 -2
  168. package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
  169. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +2 -2
  170. package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
  171. package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
  172. package/dist/src/functions/wirings/functions/schemas.js +10 -1
  173. package/dist/src/functions/wirings/functions/serialize-function-types.js +23 -12
  174. package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
  175. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
  176. package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.js +2 -0
  177. package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
  178. package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
  179. package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
  180. package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
  181. package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
  182. package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
  183. package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
  184. package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
  185. package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
  186. package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
  187. package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
  188. package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
  189. package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
  190. package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
  191. package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
  192. package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
  193. package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
  194. package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
  195. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
  196. package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +8 -2
  197. package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
  198. package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +5 -4
  199. package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +17 -7
  200. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
  201. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +6 -2
  202. package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
  203. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
  204. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +6 -2
  205. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
  206. package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
  207. package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
  208. package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +5 -1
  209. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +16 -5
  210. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.d.ts +5 -1
  211. package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +16 -5
  212. package/dist/src/functions/wirings/scenarios/pikku-command-scenario-functions.d.ts +1 -1
  213. package/dist/src/functions/wirings/scenarios/pikku-command-scenario-functions.js +8 -2
  214. package/dist/src/functions/wirings/scenarios/serialize-scenario-functions.d.ts +5 -1
  215. package/dist/src/functions/wirings/scenarios/serialize-scenario-functions.js +22 -16
  216. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
  217. package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
  218. package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +2 -2
  219. package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
  220. package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +2 -2
  221. package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
  222. package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.d.ts +1 -0
  223. package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +49 -0
  224. package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.d.ts +24 -0
  225. package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +283 -0
  226. package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
  227. package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
  228. package/dist/src/functions/wirings/webhook/pikku-command-webhook.js +6 -2
  229. package/dist/src/functions/wirings/webhook/serialize-webhook.d.ts +5 -8
  230. package/dist/src/functions/wirings/webhook/serialize-webhook.js +19 -12
  231. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
  232. package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +8 -2
  233. package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
  234. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +2 -1
  235. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +5 -1
  236. package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +61 -31
  237. package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
  238. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +8 -2
  239. package/dist/src/functions/workflows/all.workflow.js +8 -0
  240. package/dist/src/utils/pikku-cli-config.js +40 -10
  241. package/dist/src/utils/remove-legacy-scaffold-file.d.ts +3 -0
  242. package/dist/src/utils/remove-legacy-scaffold-file.js +43 -0
  243. package/dist/src/utils/serialize-schemas.js +57 -2
  244. package/dist/tsconfig.tsbuildinfo +1 -1
  245. package/package.json +6 -6
  246. package/skills/pikku-addon/SKILL.md +1 -0
  247. package/skills/pikku-ai-agent/SKILL.md +5 -4
  248. package/skills/pikku-ai-vercel/SKILL.md +1 -0
  249. package/skills/pikku-better-auth/SKILL.md +57 -0
  250. package/skills/pikku-concepts/SKILL.md +1 -1
  251. package/skills/pikku-concepts/references/concept-mapping.md +11 -9
  252. package/skills/pikku-emails/SKILL.md +1 -0
  253. package/skills/pikku-fabric-debug/SKILL.md +112 -0
  254. package/skills/pikku-permissions/SKILL.md +8 -8
  255. package/skills/pikku-react/SKILL.md +32 -3
  256. package/skills/pikku-react-query/SKILL.md +38 -1
  257. package/skills/pikku-realtime/SKILL.md +1 -1
  258. package/skills/pikku-security/SKILL.md +3 -3
  259. package/skills/pikku-services/SKILL.md +34 -0
  260. package/skills/pikku-template-clone/SKILL.md +1 -0
  261. package/cli.schema.json +0 -1
  262. package/console-app/assets/index-CpHRlBt-.css +0 -1
  263. package/dist/.pikku/http/pikku-http-wirings-meta.gen.d.ts +0 -1
  264. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +0 -6
  265. package/dist/.pikku/http/pikku-http-wirings-meta.gen.json +0 -26
  266. package/dist/.pikku/http/pikku-http-wirings.gen.js +0 -5
  267. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +0 -1
  268. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +0 -6
  269. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +0 -10
  270. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +0 -4
  271. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +0 -5
  272. package/dist/.pikku/schemas/schemas/RemoteRPCHandlerInput.schema.json +0 -1
  273. package/dist/src/scaffold/rpc-remote.gen.d.ts +0 -10
  274. package/dist/src/scaffold/rpc-remote.gen.js +0 -27
@@ -63,7 +63,8 @@ export const pikkuWorkflow = pikkuSessionlessFunc({
63
63
  const rpcMapImportPath = getFileImportRelativePath(workflowTypesFile, config.rpcInternalMapDeclarationFile, packageMappings);
64
64
  const workflowMapImportPath = getFileImportRelativePath(workflowTypesFile, workflowMapDeclarationFile, packageMappings);
65
65
  const agentMapImportPath = getFileImportRelativePath(workflowTypesFile, config.agentMapDeclarationFile, packageMappings);
66
- await writeFileInDir(logger, workflowTypesFile, serializeWorkflowTypes(functionTypesImportPath, rpcMapImportPath, workflowMapImportPath, agentMapImportPath));
66
+ const scopesImportPath = getFileImportRelativePath(workflowTypesFile, config.scopesFile, packageMappings);
67
+ await writeFileInDir(logger, workflowTypesFile, serializeWorkflowTypes(functionTypesImportPath, rpcMapImportPath, workflowMapImportPath, agentMapImportPath, scopesImportPath));
67
68
  const scenarioActors = config.scenarios?.actors;
68
69
  if (scenarioActors && Object.keys(scenarioActors).length > 0) {
69
70
  const agentMapImportPath = getFileImportRelativePath(config.scenarioActorsFile, config.agentMapDeclarationFile, packageMappings);
@@ -1,4 +1,8 @@
1
+ export interface WorkflowRoutesGenOutput {
2
+ schemas: string;
3
+ functions: string;
4
+ }
1
5
  /**
2
6
  * Generate catch-all HTTP routes for workflow operations
3
7
  */
4
- export declare const serializeWorkflowRoutes: (pathToPikkuTypes: string, requireAuth?: boolean) => string;
8
+ export declare const serializeWorkflowRoutes: (pathToPikkuTypes: string, requireAuth?: boolean) => WorkflowRoutesGenOutput;
@@ -3,13 +3,53 @@
3
3
  */
4
4
  export const serializeWorkflowRoutes = (pathToPikkuTypes, requireAuth = true) => {
5
5
  const authFlag = requireAuth ? 'true' : 'false';
6
- return `/**
6
+ const schemas = `/**
7
+ * Auto-generated workflow route schemas
8
+ * Do not edit manually - regenerate with 'npx pikku'
9
+ */
10
+ import { z } from 'zod'
11
+
12
+ export const WorkflowStart = z.object({
13
+ workflowName: z.string(),
14
+ data: z.unknown().optional(),
15
+ })
16
+
17
+ export const GraphStart = z.object({
18
+ workflowName: z.string(),
19
+ nodeId: z.string(),
20
+ data: z.unknown().optional(),
21
+ })
22
+
23
+ export const WorkflowRunRef = z.object({
24
+ workflowName: z.string(),
25
+ runId: z.string(),
26
+ })
27
+
28
+ export const WorkflowRunId = z.object({ runId: z.string() })
29
+
30
+ export const WorkflowApproval = z.object({
31
+ workflowName: z.string(),
32
+ runId: z.string(),
33
+ reason: z.string(),
34
+ decision: z.unknown(),
35
+ })
36
+
37
+ export const Acknowledged = z.object({ ok: z.literal(true) })
38
+ `;
39
+ const functions = `/**
7
40
  * Workflow HTTP catch-all routes
8
41
  * Do not edit manually - regenerate with 'npx pikku'
9
42
  */
10
43
  import { pikkuSessionlessFunc, wireHTTPRoutes } from '${pathToPikkuTypes}'
11
44
  import { MissingServiceError } from '@pikku/core/errors'
12
- import type { WorkflowRunStatus } from '@pikku/core/workflow'
45
+ import {
46
+ WorkflowStart,
47
+ GraphStart,
48
+ WorkflowRunRef,
49
+ WorkflowRunId,
50
+ WorkflowApproval,
51
+ Acknowledged,
52
+ } from './workflow-routes.schemas.gen.js'
13
53
 
14
54
  function assertWorkflowService(workflowService: unknown): asserts workflowService {
15
55
  if (!workflowService) throw new MissingServiceError('workflowService is required')
@@ -19,12 +59,11 @@ function assertWorkflowRunService(workflowRunService: unknown): asserts workflow
19
59
  if (!workflowRunService) throw new MissingServiceError('workflowRunService is required')
20
60
  }
21
61
 
22
- export const workflowStarter = pikkuSessionlessFunc<
23
- { workflowName: string; data?: unknown },
24
- { runId: string }
25
- >({
62
+ export const workflowStarter = pikkuSessionlessFunc({
26
63
  tags: ['pikku'],
27
64
  auth: ${authFlag},
65
+ input: WorkflowStart,
66
+ output: WorkflowRunId,
28
67
  // workflowService is destructured (even though we delegate via rpc) so the
29
68
  // analyzer assigns workflow-state capability to this unit — without it,
30
69
  // rpc.startWorkflow() runs against a container missing workflowService.
@@ -34,24 +73,20 @@ export const workflowStarter = pikkuSessionlessFunc<
34
73
  },
35
74
  })
36
75
 
37
- export const workflowRunner = pikkuSessionlessFunc<
38
- { workflowName: string; data?: unknown },
39
- unknown
40
- >({
76
+ export const workflowRunner = pikkuSessionlessFunc({
41
77
  tags: ['pikku'],
42
78
  auth: ${authFlag},
79
+ input: WorkflowStart,
43
80
  func: async ({ workflowService }, { workflowName, data }, { rpc }) => {
44
81
  assertWorkflowService(workflowService)
45
82
  return await workflowService.runToCompletion(workflowName, data ?? {}, rpc)
46
83
  },
47
84
  })
48
85
 
49
- export const workflowStatusChecker = pikkuSessionlessFunc<
50
- { workflowName: string; runId: string },
51
- WorkflowRunStatus
52
- >({
86
+ export const workflowStatusChecker = pikkuSessionlessFunc({
53
87
  tags: ['pikku'],
54
88
  auth: ${authFlag},
89
+ input: WorkflowRunRef,
55
90
  func: async ({ workflowService }, { runId }) => {
56
91
  assertWorkflowService(workflowService)
57
92
  const status = await workflowService.getRunStatus(runId)
@@ -64,12 +99,10 @@ export const workflowStatusChecker = pikkuSessionlessFunc<
64
99
  * Minimal workflow status stream — sends step names and statuses only.
65
100
  * Use this for user-facing frontends where internal details should not be exposed.
66
101
  */
67
- export const workflowStatusStream = pikkuSessionlessFunc<
68
- { workflowName: string; runId: string },
69
- unknown
70
- >({
102
+ export const workflowStatusStream = pikkuSessionlessFunc({
71
103
  tags: ['pikku'],
72
104
  auth: ${authFlag},
105
+ input: WorkflowRunRef,
73
106
  func: async ({ workflowRunService }, { runId }, { channel }) => {
74
107
  assertWorkflowRunService(workflowRunService)
75
108
  if (!channel) return
@@ -151,12 +184,10 @@ export const workflowStatusStream = pikkuSessionlessFunc<
151
184
  * Full workflow status stream — includes output, error, and child run IDs.
152
185
  * Use this for admin consoles and internal tooling.
153
186
  */
154
- export const workflowStatusStreamFull = pikkuSessionlessFunc<
155
- { workflowName: string; runId: string },
156
- unknown
157
- >({
187
+ export const workflowStatusStreamFull = pikkuSessionlessFunc({
158
188
  tags: ['pikku'],
159
189
  auth: ${authFlag},
190
+ input: WorkflowRunRef,
160
191
  func: async ({ workflowRunService }, { runId }, { channel }) => {
161
192
  assertWorkflowRunService(workflowRunService)
162
193
  if (!channel) return
@@ -238,12 +269,11 @@ export const workflowStatusStreamFull = pikkuSessionlessFunc<
238
269
  },
239
270
  })
240
271
 
241
- export const graphStarter = pikkuSessionlessFunc<
242
- { workflowName: string; nodeId: string; data?: unknown },
243
- { runId: string }
244
- >({
272
+ export const graphStarter = pikkuSessionlessFunc({
245
273
  tags: ['pikku'],
246
274
  auth: ${authFlag},
275
+ input: GraphStart,
276
+ output: WorkflowRunId,
247
277
  // See workflowStarter — destructure workflowService so the analyzer
248
278
  // assigns workflow-state capability to this unit.
249
279
  func: async ({ workflowService }, { workflowName, nodeId, data }, { rpc }) => {
@@ -261,18 +291,17 @@ export const graphStarter = pikkuSessionlessFunc<
261
291
  * run. Gate this route with your own auth/permissions to control WHO may
262
292
  * approve: the framework does not model approver identity.
263
293
  */
264
- export const workflowApprover = pikkuSessionlessFunc<
265
- { workflowName: string; runId: string; reason: string; decision: unknown },
266
- { ok: true }
267
- >({
294
+ export const workflowApprover = pikkuSessionlessFunc({
268
295
  tags: ['pikku'],
269
296
  auth: ${authFlag},
297
+ input: WorkflowApproval,
298
+ output: Acknowledged,
270
299
  // See workflowStarter — destructure workflowService so the analyzer
271
300
  // assigns workflow-state capability to this unit.
272
301
  func: async ({ workflowService }, { runId, reason, decision }) => {
273
302
  assertWorkflowService(workflowService)
274
303
  await workflowService.approveStep(runId, reason, decision)
275
- return { ok: true }
304
+ return { ok: true as const }
276
305
  },
277
306
  })
278
307
 
@@ -320,4 +349,5 @@ wireHTTPRoutes({
320
349
  },
321
350
  })
322
351
  `;
352
+ return { schemas, functions };
323
353
  };
@@ -1 +1 @@
1
- export declare const serializeWorkflowTypes: (functionTypesImportPath: string, rpcMapImportPath: string, workflowMapImportPath: string, agentMapImportPath: string) => string;
1
+ export declare const serializeWorkflowTypes: (functionTypesImportPath: string, rpcMapImportPath: string, workflowMapImportPath: string, agentMapImportPath: string, scopesImportPath: string) => string;
@@ -1,4 +1,4 @@
1
- export const serializeWorkflowTypes = (functionTypesImportPath, rpcMapImportPath, workflowMapImportPath, agentMapImportPath) => {
1
+ export const serializeWorkflowTypes = (functionTypesImportPath, rpcMapImportPath, workflowMapImportPath, agentMapImportPath, scopesImportPath) => {
2
2
  return `import { WorkflowCancelledException } from '@pikku/core/workflow'
3
3
  import { template } from '@pikku/core/workflow'
4
4
  import {
@@ -42,6 +42,7 @@ export type TypedScenario = TypedWorkflow & Omit<PikkuScenarioWire, keyof PikkuW
42
42
 
43
43
  import type { StandardSchemaV1 } from '@standard-schema/spec'
44
44
  import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '${functionTypesImportPath}'
45
+ import type { ScopeId } from '${scopesImportPath}'
45
46
  import { PikkuError } from '@pikku/core/errors'
46
47
  import type { CorePermissionGroup } from '@pikku/core'
47
48
 
@@ -76,6 +77,11 @@ export type PikkuWorkflowConfigWithSchema<
76
77
  OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
77
78
  >
78
79
  auth?: boolean
80
+ /**
81
+ * Scopes the session must hold to run this workflow. All of them are required
82
+ * (AND), and they are checked before \`permissions\`.
83
+ */
84
+ scopes?: ScopeId[]
79
85
  permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
80
86
  middleware?: PikkuMiddleware[]
81
87
  input?: InputSchema
@@ -118,7 +124,7 @@ export function pikkuWorkflowComplexFunc(func: any) {
118
124
  export type PikkuScenarioConfigWithSchema<
119
125
  InputSchema extends StandardSchemaV1 | undefined = undefined,
120
126
  OutputSchema extends StandardSchemaV1 | undefined = undefined
121
- > = Omit<PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>, 'func'> & {
127
+ > = Omit<PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>, 'func' | 'auth' | 'scopes' | 'permissions'> & {
122
128
  func: PikkuFunctionScenario<
123
129
  InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
124
130
  OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
@@ -1,6 +1,7 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { pikkuWorkflowComplexFunc } from '#pikku/workflow/pikku-workflow-types.gen.js';
3
3
  import { assertSingleCoreVersion } from '../../utils/assert-single-core-version.js';
4
+ import { pruneLegacyScaffoldFiles } from '../../utils/remove-legacy-scaffold-file.js';
4
5
  import { PikkuTypecheckFailedError, renderTscFull, renderTscSummary, runProjectTypecheck, } from '../../utils/tsc-check.js';
5
6
  const scaffoldFiles = (config) => {
6
7
  const files = [];
@@ -21,6 +22,11 @@ const scaffoldFiles = (config) => {
21
22
  file: config.scenariosFunctionsFile,
22
23
  generator: 'pikkuScenarioFunctions',
23
24
  });
25
+ if (config.scaffold?.userAdmin && config.userAdminFunctionsFile)
26
+ files.push({
27
+ file: config.userAdminFunctionsFile,
28
+ generator: 'pikkuUserAdminFunctions',
29
+ });
24
30
  if (config.scaffold?.agent && config.publicAgentFile)
25
31
  files.push({
26
32
  file: config.publicAgentFile,
@@ -39,6 +45,7 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
39
45
  // Preflight: a split @pikku/core install silently breaks wiring registration
40
46
  // (workflows/RPCs "disappear"), so refuse to codegen against it.
41
47
  await assertSingleCoreVersion(config.rootDir, logger);
48
+ await pruneLegacyScaffoldFiles(config);
42
49
  const allImports = [];
43
50
  let typesDeclarationFileExists = true;
44
51
  if (!existsSync(config.outDir)) {
@@ -144,6 +151,7 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
144
151
  workflow.do('Public RPC', 'pikkuPublicRPC', null),
145
152
  workflow.do('Console functions', 'pikkuConsoleFunctions', null),
146
153
  workflow.do('Scenario functions', 'pikkuScenarioFunctions', null),
154
+ workflow.do('User admin functions', 'pikkuUserAdminFunctions', null),
147
155
  workflow.do('Events scaffold', 'pikkuEventsScaffold', null),
148
156
  workflow.do('Emails', 'pikkuEmails', null),
149
157
  workflow.do('Secret definition types', 'pikkuSecretDefinitionTypes', null),
@@ -210,31 +210,58 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
210
210
  ? scaffoldDir
211
211
  : join(result.rootDir, scaffoldDir);
212
212
  if (result.scaffold?.remoteRpc && !result.remoteRpcWorkersFile) {
213
- result.remoteRpcWorkersFile = join(resolvedScaffoldDir, 'rpc-remote.gen.ts');
213
+ result.remoteRpcWorkersFile = join(resolvedScaffoldDir, 'rpc', 'rpc-remote.gen.ts');
214
+ }
215
+ if (result.scaffold?.remoteRpc && !result.remoteRpcSchemasFile) {
216
+ result.remoteRpcSchemasFile = join(resolvedScaffoldDir, 'rpc', 'rpc-remote.schemas.gen.ts');
214
217
  }
215
218
  if (result.scaffold?.graph && !result.graphWiringsFile) {
216
- result.graphWiringsFile = join(resolvedScaffoldDir, 'graph.wirings.gen.ts');
219
+ result.graphWiringsFile = join(resolvedScaffoldDir, 'graph', 'graph.wirings.gen.ts');
217
220
  }
218
221
  if (result.scaffold?.webhook && !result.webhookWorkersFile) {
219
- result.webhookWorkersFile = join(resolvedScaffoldDir, 'webhook.gen.ts');
222
+ result.webhookWorkersFile = join(resolvedScaffoldDir, 'webhook', 'webhook.gen.ts');
223
+ }
224
+ if (result.scaffold?.webhook && !result.webhookSchemasFile) {
225
+ result.webhookSchemasFile = join(resolvedScaffoldDir, 'webhook', 'webhook.schemas.gen.ts');
220
226
  }
221
227
  if (result.scaffold?.workflow && !result.workflowRoutesFile) {
222
- result.workflowRoutesFile = join(resolvedScaffoldDir, 'workflow-routes.gen.ts');
228
+ result.workflowRoutesFile = join(resolvedScaffoldDir, 'workflow', 'workflow-routes.gen.ts');
229
+ }
230
+ if (result.scaffold?.workflow && !result.workflowRoutesSchemasFile) {
231
+ result.workflowRoutesSchemasFile = join(resolvedScaffoldDir, 'workflow', 'workflow-routes.schemas.gen.ts');
223
232
  }
224
233
  if (result.scaffold?.rpc && !result.publicRpcFile) {
225
- result.publicRpcFile = join(resolvedScaffoldDir, 'rpc-public.gen.ts');
234
+ result.publicRpcFile = join(resolvedScaffoldDir, 'rpc', 'rpc-public.gen.ts');
235
+ }
236
+ if (result.scaffold?.rpc && !result.publicRpcSchemasFile) {
237
+ result.publicRpcSchemasFile = join(resolvedScaffoldDir, 'rpc', 'rpc-public.schemas.gen.ts');
226
238
  }
227
239
  if (result.scaffold?.agent && !result.publicAgentFile) {
228
- result.publicAgentFile = join(resolvedScaffoldDir, 'agent.gen.ts');
240
+ result.publicAgentFile = join(resolvedScaffoldDir, 'agent', 'agent.gen.ts');
241
+ }
242
+ if (result.scaffold?.agent && !result.publicAgentSchemasFile) {
243
+ result.publicAgentSchemasFile = join(resolvedScaffoldDir, 'agent', 'agent.schemas.gen.ts');
229
244
  }
230
245
  if (result.scaffold?.console && !result.consoleFunctionsFile) {
231
- result.consoleFunctionsFile = join(resolvedScaffoldDir, 'console.gen.ts');
246
+ result.consoleFunctionsFile = join(resolvedScaffoldDir, 'console', 'console.gen.ts');
247
+ }
248
+ if (result.scaffold?.console && !result.consoleSchemasFile) {
249
+ result.consoleSchemasFile = join(resolvedScaffoldDir, 'console', 'console.schemas.gen.ts');
250
+ }
251
+ if (result.scaffold?.userAdmin && !result.userAdminFunctionsFile) {
252
+ result.userAdminFunctionsFile = join(resolvedScaffoldDir, 'admin', 'user-admin.gen.ts');
253
+ }
254
+ if (result.scaffold?.userAdmin && !result.userAdminSchemasFile) {
255
+ result.userAdminSchemasFile = join(resolvedScaffoldDir, 'admin', 'user-admin.schemas.gen.ts');
232
256
  }
233
257
  if (result.scaffold?.scenarios && !result.scenariosFunctionsFile) {
234
- result.scenariosFunctionsFile = join(resolvedScaffoldDir, 'scenarios.gen.ts');
258
+ result.scenariosFunctionsFile = join(resolvedScaffoldDir, 'scenarios', 'scenarios.gen.ts');
259
+ }
260
+ if (result.scaffold?.scenarios && !result.scenariosSchemasFile) {
261
+ result.scenariosSchemasFile = join(resolvedScaffoldDir, 'scenarios', 'scenarios.schemas.gen.ts');
235
262
  }
236
263
  if (!result.authFile) {
237
- result.authFile = join(resolvedScaffoldDir, 'auth.gen.ts');
264
+ result.authFile = join(resolvedScaffoldDir, 'auth', 'auth.gen.ts');
238
265
  }
239
266
  if (!result.authTypesFile) {
240
267
  result.authTypesFile = join(result.outDir, 'auth', 'auth.types.ts');
@@ -243,7 +270,10 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
243
270
  result.authMetaJsonFile = join(result.outDir, 'auth', 'pikku-auth-meta.gen.json');
244
271
  }
245
272
  if (result.scaffold?.events && !result.eventsChannelFile) {
246
- result.eventsChannelFile = join(resolvedScaffoldDir, 'events.gen.ts');
273
+ result.eventsChannelFile = join(resolvedScaffoldDir, 'realtime', 'events.gen.ts');
274
+ }
275
+ if (result.scaffold?.events && !result.eventsSchemasFile) {
276
+ result.eventsSchemasFile = join(resolvedScaffoldDir, 'realtime', 'events.schemas.gen.ts');
247
277
  }
248
278
  if (result.scaffold?.events &&
249
279
  result.clientFiles?.fetchFile &&
@@ -0,0 +1,3 @@
1
+ import type { PikkuCLIConfig } from '../../types/config.js';
2
+ export declare const removeLegacyScaffoldFile: (file: string) => Promise<void>;
3
+ export declare const pruneLegacyScaffoldFiles: (config: PikkuCLIConfig) => Promise<void>;
@@ -0,0 +1,43 @@
1
+ import { rm } from 'node:fs/promises';
2
+ import { existsSync } from 'node:fs';
3
+ import { basename, dirname, join } from 'node:path';
4
+ const scaffoldFiles = (config) => {
5
+ const authDir = config.authFile ? dirname(config.authFile) : undefined;
6
+ return [
7
+ config.graphWiringsFile,
8
+ config.webhookWorkersFile,
9
+ config.webhookSchemasFile,
10
+ config.workflowRoutesFile,
11
+ config.workflowRoutesSchemasFile,
12
+ config.publicRpcFile,
13
+ config.publicRpcSchemasFile,
14
+ config.remoteRpcWorkersFile,
15
+ config.remoteRpcSchemasFile,
16
+ config.publicAgentFile,
17
+ config.publicAgentSchemasFile,
18
+ config.consoleFunctionsFile,
19
+ config.consoleSchemasFile,
20
+ config.scenariosFunctionsFile,
21
+ config.scenariosSchemasFile,
22
+ config.userAdminFunctionsFile,
23
+ config.userAdminSchemasFile,
24
+ config.eventsChannelFile,
25
+ config.eventsSchemasFile,
26
+ config.authFile,
27
+ authDir ? join(authDir, 'auth-secrets.gen.ts') : undefined,
28
+ authDir ? join(authDir, 'auth-middleware.gen.ts') : undefined,
29
+ ];
30
+ };
31
+ export const removeLegacyScaffoldFile = async (file) => {
32
+ const legacy = join(dirname(dirname(file)), basename(file));
33
+ if (legacy !== file && existsSync(legacy)) {
34
+ await rm(legacy, { force: true });
35
+ }
36
+ };
37
+ export const pruneLegacyScaffoldFiles = async (config) => {
38
+ for (const file of scaffoldFiles(config)) {
39
+ if (file) {
40
+ await removeLegacyScaffoldFile(file);
41
+ }
42
+ }
43
+ };
@@ -1,5 +1,6 @@
1
1
  import { writeFileInDir } from './file-writer.js';
2
- import { mkdir, writeFile } from 'fs/promises';
2
+ import { mkdir, readdir, unlink, writeFile } from 'fs/promises';
3
+ const SCHEMA_FILE_SUFFIX = '.schema.json';
3
4
  function toValidIdentifier(name) {
4
5
  let result = name.replace(/[-./: ]/g, '_');
5
6
  if (/^\d/.test(result)) {
@@ -7,9 +8,59 @@ function toValidIdentifier(name) {
7
8
  }
8
9
  return result;
9
10
  }
11
+ /**
12
+ * Delete `<schemaParentDir>/schemas/*.schema.json` for schemas this run did not
13
+ * generate.
14
+ *
15
+ * Codegen rewrites `register.gen.ts` from scratch every run, so a schema that is no
16
+ * longer required stops being registered — but its JSON file used to stay on disk
17
+ * forever. That orphan is not inert: it is the artifact everything reaches for when
18
+ * asking "what does the server validate against?", and it answers with the shape the
19
+ * function had at some earlier point. Tooling reading it concludes the schema is fine
20
+ * while the running server disagrees, which is a dead end that reads as "the server is
21
+ * stale" and cannot be resolved by regenerating or restarting.
22
+ *
23
+ * Keeping the directory in step with `register.gen.ts` is the whole fix: if it is not
24
+ * imported there, it must not be on disk to be misread.
25
+ */
26
+ async function pruneOrphanedSchemaFiles(logger, schemaParentDir, keep) {
27
+ const dir = `${schemaParentDir}/schemas`;
28
+ let entries;
29
+ try {
30
+ entries = await readdir(dir);
31
+ }
32
+ catch (e) {
33
+ // No schemas dir yet (first run, or none were ever generated) — nothing to prune.
34
+ // Anything else (permissions, IO) means we do NOT know what is on disk, and
35
+ // reporting a clean generation over an unread directory is the exact false
36
+ // "everything is registered" claim this prune exists to stop.
37
+ if (e?.code === 'ENOENT') {
38
+ return;
39
+ }
40
+ throw e;
41
+ }
42
+ const orphans = entries.filter((entry) => entry.endsWith(SCHEMA_FILE_SUFFIX) &&
43
+ !keep.has(entry.slice(0, -SCHEMA_FILE_SUFFIX.length)));
44
+ await Promise.all(orphans.map(async (orphan) => {
45
+ try {
46
+ await unlink(`${dir}/${orphan}`);
47
+ }
48
+ catch (e) {
49
+ // A file we cannot remove is stale output, not a reason to fail the build —
50
+ // but say so, because it will keep being read as if it were current.
51
+ logger.error(`• Could not remove stale schema ${orphan}: ${e}`);
52
+ }
53
+ }));
54
+ if (orphans.length > 0) {
55
+ logger.info(`• Removed ${orphans.length} stale schema file(s).\x1b[0m`);
56
+ }
57
+ }
10
58
  export async function saveSchemas(logger, schemaParentDir, schemas, requiredSchemas, supportsImportAttributes, packageName) {
11
59
  if (requiredSchemas.size === 0) {
12
60
  await writeFileInDir(logger, `${schemaParentDir}/register.gen.ts`, 'export const empty = null;');
61
+ // Every file in schemas/ is now an orphan: register.gen.ts registers nothing, so
62
+ // leaving them would be exactly the misleading state this prune exists to prevent.
63
+ await pruneOrphanedSchemaFiles(logger, schemaParentDir, new Set());
13
64
  logger.info(`• Skipping schemas since none found.\x1b[0m`);
14
65
  return;
15
66
  }
@@ -22,8 +73,12 @@ export async function saveSchemas(logger, schemaParentDir, schemas, requiredSche
22
73
  // Sort so register.gen.ts is byte-identical across runs — requiredSchemas is
23
74
  // a Set in (nondeterministic) traversal-insertion order.
24
75
  const availableSchemas = Array.from(requiredSchemas)
25
- .filter((schema) => schemas[schema])
76
+ // Presence, not truthiness: `false` is a legal JSON Schema (it rejects everything),
77
+ // and dropping it here would unregister the schema AND prune its file.
78
+ .filter((schema) => schemas[schema] !== undefined)
26
79
  .sort();
80
+ // Keep exactly what register.gen.ts is about to import — the two must not disagree.
81
+ await pruneOrphanedSchemaFiles(logger, schemaParentDir, new Set(availableSchemas));
27
82
  const packageNameArg = packageName ? `, '${packageName}'` : '';
28
83
  const schemaImports = availableSchemas
29
84
  .map((schema) => {
@@ -1 +1 @@
1
- {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/server-entry.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bun-bundler.ts","../src/deploy/bundler/bundler.interface.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/node-bundler.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/fabric/fabric-commands.ts","../src/fabric/functions/add.function.ts","../src/fabric/functions/addon-verify.function.ts","../src/fabric/functions/db-schema.function.ts","../src/fabric/functions/deploy-list.function.ts","../src/fabric/functions/deploy-units.function.ts","../src/fabric/functions/deploy.function.ts","../src/fabric/functions/domains-add.function.ts","../src/fabric/functions/domains-list.function.ts","../src/fabric/functions/domains-remove.function.ts","../src/fabric/functions/errors.function.ts","../src/fabric/functions/init.function.ts","../src/fabric/functions/link.function.ts","../src/fabric/functions/llm-key.function.ts","../src/fabric/functions/login.function.ts","../src/fabric/functions/logs.function.ts","../src/fabric/functions/metrics.function.ts","../src/fabric/functions/publish.function.ts","../src/fabric/functions/rollback.function.ts","../src/fabric/functions/secrets-list.function.ts","../src/fabric/functions/secrets-set.function.ts","../src/fabric/functions/smoke.function.ts","../src/fabric/functions/status.function.ts","../src/fabric/functions/trace.function.ts","../src/fabric/functions/validate.function.ts","../src/fabric/lib/config.ts","../src/fabric/lib/console-url.ts","../src/fabric/lib/git.ts","../src/fabric/lib/http.ts","../src/fabric/lib/not-implemented.ts","../src/fabric/lib/output.ts","../src/fabric/lib/prompt.ts","../src/fabric/lib/stage.ts","../src/fabric/sdk/http-map.gen.d.ts","../src/fabric/sdk/pikku-fetch.gen.ts","../src/fabric/sdk/pikku-rpc.gen.ts","../src/fabric/sdk/rpc-map.gen.d.ts","../src/functions/commands/all.ts","../src/functions/commands/audit.ts","../src/functions/commands/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/bun-coverage-loader.ts","../src/functions/commands/db-audit.ts","../src/functions/commands/db-generate.ts","../src/functions/commands/db-migrate.ts","../src/functions/commands/db-reset.ts","../src/functions/commands/db-seed.ts","../src/functions/commands/db-shared.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/dev-ai-runner.ts","../src/functions/commands/dev.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.ts","../src/functions/commands/import-n8n.ts","../src/functions/commands/info.ts","../src/functions/commands/load-user-project.ts","../src/functions/commands/login.ts","../src/functions/commands/meta.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/scenario.ts","../src/functions/commands/scopes-audit.ts","../src/functions/commands/scopes-prune.ts","../src/functions/commands/scopes-shared.ts","../src/functions/commands/serve-console.ts","../src/functions/commands/serve.ts","../src/functions/commands/skills.ts","../src/functions/commands/start-coverage.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/commands/workspace-validate.ts","../src/functions/db/annotation-parser.ts","../src/functions/db/better-auth-schema.ts","../src/functions/db/coercion-plugin.ts","../src/functions/db/db-codegen.ts","../src/functions/db/db-introspector.ts","../src/functions/db/db-migrator.ts","../src/functions/db/local-db.ts","../src/functions/db/zod-codegen.ts","../src/functions/db/postgres/pglite-kysely.ts","../src/functions/db/postgres/postgres-introspector.ts","../src/functions/db/postgres/postgres-migrator.ts","../src/functions/db/sqlite/seed.ts","../src/functions/db/sqlite/sqlite-introspector.ts","../src/functions/db/sqlite/sqlite-kysely.ts","../src/functions/db/sqlite/sqlite-migrator.ts","../src/functions/db/sqlite/sqlite-runtime-bun.ts","../src/functions/db/sqlite/sqlite-runtime-node.ts","../src/functions/db/sqlite/sqlite-runtime.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.ts","../src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/validate/workspace-validate.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/auth/pikku-command-auth.ts","../src/functions/wirings/auth/serialize-auth-gen.ts","../src/functions/wirings/auth/serialize-auth-meta.ts","../src/functions/wirings/auth/serialize-auth-types.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/emails/pikku-command-emails.ts","../src/functions/wirings/emails/serialize-emails.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-refs.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/gateway/serialize-gateway-meta.ts","../src/functions/wirings/graph/pikku-command-graph-wirings.ts","../src/functions/wirings/graph/serialize-graph-wirings.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/realtime/pikku-command-events-scaffold.ts","../src/functions/wirings/realtime/pikku-command-realtime.ts","../src/functions/wirings/realtime/serialize-events-scaffold.ts","../src/functions/wirings/realtime/serialize-realtime-client.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-react-query.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-react-query-hooks.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scenarios/pikku-command-scenario-functions.ts","../src/functions/wirings/scenarios/serialize-scenario-functions.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/scopes/pikku-command-scopes.ts","../src/functions/wirings/scopes/serialize-scopes-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/webhook/pikku-command-webhook.ts","../src/functions/wirings/webhook/serialize-webhook.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-scenario-actors.ts","../src/functions/wirings/workflow/serialize-workflow-bootstrap-map.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/scaffold/rpc-remote.gen.ts","../src/server/bun-server-runner.ts","../src/server/dev-server-runner.interface.ts","../src/server/node-server-runner.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/assert-single-core-version.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/detect-better-auth.ts","../src/utils/device-auth.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/meta-diff.ts","../src/utils/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/precise-coverage-map.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../src/utils/tsc-check.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-contracts-meta.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/scopes/pikku-scope-types.gen.ts","../.pikku/scopes/pikku-scopes.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/bun-sqlite.d.ts","../types/config.d.ts"],"version":"6.0.3"}
1
+ {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/server-entry.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bun-bundler.ts","../src/deploy/bundler/bundler.interface.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/node-bundler.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/fabric/fabric-commands.ts","../src/fabric/functions/add.function.ts","../src/fabric/functions/addon-verify.function.ts","../src/fabric/functions/db-schema.function.ts","../src/fabric/functions/deploy-list.function.ts","../src/fabric/functions/deploy-units.function.ts","../src/fabric/functions/deploy.function.ts","../src/fabric/functions/domains-add.function.ts","../src/fabric/functions/domains-list.function.ts","../src/fabric/functions/domains-remove.function.ts","../src/fabric/functions/errors.function.ts","../src/fabric/functions/init.function.ts","../src/fabric/functions/link.function.ts","../src/fabric/functions/llm-key.function.ts","../src/fabric/functions/login.function.ts","../src/fabric/functions/logs.function.ts","../src/fabric/functions/metrics.function.ts","../src/fabric/functions/publish.function.ts","../src/fabric/functions/rollback.function.ts","../src/fabric/functions/secrets-list.function.ts","../src/fabric/functions/secrets-set.function.ts","../src/fabric/functions/smoke.function.ts","../src/fabric/functions/status.function.ts","../src/fabric/functions/trace.function.ts","../src/fabric/functions/validate.function.ts","../src/fabric/lib/config.ts","../src/fabric/lib/console-url.ts","../src/fabric/lib/git.ts","../src/fabric/lib/http.ts","../src/fabric/lib/not-implemented.ts","../src/fabric/lib/output.ts","../src/fabric/lib/prompt.ts","../src/fabric/lib/stage.ts","../src/fabric/sdk/http-map.gen.d.ts","../src/fabric/sdk/pikku-fetch.gen.ts","../src/fabric/sdk/pikku-rpc.gen.ts","../src/fabric/sdk/rpc-map.gen.d.ts","../src/functions/commands/all.ts","../src/functions/commands/audit.ts","../src/functions/commands/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/bun-coverage-loader.ts","../src/functions/commands/db-audit.ts","../src/functions/commands/db-generate.ts","../src/functions/commands/db-migrate.ts","../src/functions/commands/db-reset.ts","../src/functions/commands/db-seed.ts","../src/functions/commands/db-shared.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/dev-ai-runner.ts","../src/functions/commands/dev.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.ts","../src/functions/commands/import-n8n.ts","../src/functions/commands/info.ts","../src/functions/commands/load-user-project.ts","../src/functions/commands/login.ts","../src/functions/commands/meta.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/scenario.ts","../src/functions/commands/scopes-audit.ts","../src/functions/commands/scopes-prune.ts","../src/functions/commands/scopes-shared.ts","../src/functions/commands/serve-console.ts","../src/functions/commands/serve.ts","../src/functions/commands/skills.ts","../src/functions/commands/start-coverage.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/commands/workspace-validate.ts","../src/functions/db/annotation-parser.ts","../src/functions/db/better-auth-schema.ts","../src/functions/db/coercion-plugin.ts","../src/functions/db/db-codegen.ts","../src/functions/db/db-introspector.ts","../src/functions/db/db-migrator.ts","../src/functions/db/local-db.ts","../src/functions/db/zod-codegen.ts","../src/functions/db/postgres/pglite-kysely.ts","../src/functions/db/postgres/postgres-introspector.ts","../src/functions/db/postgres/postgres-migrator.ts","../src/functions/db/sqlite/seed.ts","../src/functions/db/sqlite/sqlite-introspector.ts","../src/functions/db/sqlite/sqlite-kysely.ts","../src/functions/db/sqlite/sqlite-migrator.ts","../src/functions/db/sqlite/sqlite-runtime-bun.ts","../src/functions/db/sqlite/sqlite-runtime-node.ts","../src/functions/db/sqlite/sqlite-runtime.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.ts","../src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/validate/workspace-validate.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/auth/pikku-command-auth.ts","../src/functions/wirings/auth/serialize-auth-gen.ts","../src/functions/wirings/auth/serialize-auth-meta.ts","../src/functions/wirings/auth/serialize-auth-types.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/emails/pikku-command-emails.ts","../src/functions/wirings/emails/serialize-emails.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-refs.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/gateway/serialize-gateway-meta.ts","../src/functions/wirings/graph/pikku-command-graph-wirings.ts","../src/functions/wirings/graph/serialize-graph-wirings.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/realtime/pikku-command-events-scaffold.ts","../src/functions/wirings/realtime/pikku-command-realtime.ts","../src/functions/wirings/realtime/serialize-events-scaffold.ts","../src/functions/wirings/realtime/serialize-realtime-client.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-react-query.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-react-query-hooks.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scenarios/pikku-command-scenario-functions.ts","../src/functions/wirings/scenarios/serialize-scenario-functions.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/scopes/pikku-command-scopes.ts","../src/functions/wirings/scopes/serialize-scopes-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/user-admin/pikku-command-user-admin-functions.ts","../src/functions/wirings/user-admin/serialize-user-admin-functions.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/webhook/pikku-command-webhook.ts","../src/functions/wirings/webhook/serialize-webhook.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-scenario-actors.ts","../src/functions/wirings/workflow/serialize-workflow-bootstrap-map.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/server/bun-server-runner.ts","../src/server/dev-server-runner.interface.ts","../src/server/node-server-runner.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/assert-single-core-version.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/detect-better-auth.ts","../src/utils/device-auth.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/meta-diff.ts","../src/utils/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/precise-coverage-map.ts","../src/utils/remove-legacy-scaffold-file.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../src/utils/tsc-check.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/auth/auth.types.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-contracts-meta.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/scopes/pikku-scope-types.gen.ts","../.pikku/scopes/pikku-scopes.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/bun-sqlite.d.ts","../types/config.d.ts"],"version":"6.0.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.12.83",
3
+ "version": "0.12.86",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -28,12 +28,12 @@
28
28
  "@electric-sql/pglite": "^0.5.1",
29
29
  "@jridgewell/trace-mapping": "^0.3.25",
30
30
  "@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
31
- "@pikku/better-auth": "^0.12.18",
31
+ "@pikku/better-auth": "^0.12.19",
32
32
  "@pikku/bun-server": "^0.12.4",
33
33
  "@pikku/deploy-cloudflare": "^0.12.8",
34
34
  "@pikku/fetch": "^0.12.8",
35
- "@pikku/inspector": "^0.12.43",
36
- "@pikku/kysely": "^0.13.1",
35
+ "@pikku/inspector": "^0.12.45",
36
+ "@pikku/kysely": "^0.13.2",
37
37
  "@pikku/kysely-node-sqlite": "^0.12.3",
38
38
  "@pikku/n8n-import": "^0.0.2",
39
39
  "@pikku/node-http-server": "^0.12.6",
@@ -60,10 +60,10 @@
60
60
  "zod-to-ts": "^2.1.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "@pikku/core": "^0.12.64"
63
+ "@pikku/core": "^0.12.67"
64
64
  },
65
65
  "devDependencies": {
66
- "@pikku/core": "^0.12.64",
66
+ "@pikku/core": "^0.12.67",
67
67
  "@types/istanbul-lib-instrument": "^1.7.7",
68
68
  "@types/node": "^24.11.0",
69
69
  "@types/pg": "^8.11.0",