@pikku/cli 0.12.104 → 0.12.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7306 -0
- package/console-app/assets/abnfDiagram-N423BO3Z-C5uToS9v.js +1 -0
- package/console-app/assets/arc-D8VmsdJb.js +1 -0
- package/console-app/assets/architecture-TIHT7OUA-B1IpeRpl.js +1 -0
- package/console-app/assets/architectureDiagram-T3A2C74G-BzJDRfv4.js +36 -0
- package/console-app/assets/{blockDiagram-677ZJIJ3-CcSxyQZH.js → blockDiagram-VBNYF7ZC-X5G9Ch-D.js} +5 -5
- package/console-app/assets/c4Diagram-5PPSVZJV-B59aO2Sc.js +10 -0
- package/console-app/assets/channel-sTJGzqn9.js +1 -0
- package/console-app/assets/{chunk-32BRIVSS-Atv4wjmh.js → chunk-2GRJ4B5K-Bwe32j_R.js} +1 -1
- package/console-app/assets/{chunk-HOUHSVGY-CyU0q_QM.js → chunk-4I5QYGJK-Beg_uQQN.js} +1 -1
- package/console-app/assets/chunk-5RXB4S5H-0HaMiv3k.js +231 -0
- package/console-app/assets/{chunk-MOJQB5TN-DUKLkDFX.js → chunk-6Q2QTUOP-CXxkExOq.js} +1 -1
- package/console-app/assets/chunk-7Z6QIM7H-zUqPbrvp.js +10 -0
- package/console-app/assets/{chunk-V7JOEXUC-BfBH_WMn.js → chunk-GF5L2VYU-CY0wGPcJ.js} +3 -3
- package/console-app/assets/chunk-I66GZJ75-BP5UNkJY.js +127 -0
- package/console-app/assets/chunk-JQJVKLGR-3dvnUUZN.js +156 -0
- package/console-app/assets/{chunk-VR4S4FIN-q02O9Hva.js → chunk-KBJHAD2P-ChD7o2bf.js} +1 -1
- package/console-app/assets/{chunk-KEIR6QF5-DNzq6p3w.js → chunk-KEIR6QF5-BICK3FdT.js} +32 -32
- package/console-app/assets/chunk-NSK5VX7P-oG1nh33f.js +2 -0
- package/console-app/assets/{chunk-ZGVPDNZ5-2b6-Ub1z.js → chunk-QR6OTTB3-D_uKJrj6.js} +3 -3
- package/console-app/assets/chunk-RYQCIY6F-CtYhP8W5.js +1 -0
- package/console-app/assets/chunk-UBXNYLIW-CMgD3fvL.js +1 -0
- package/console-app/assets/{chunk-C7G6YPKG-DhtQv4yx.js → chunk-W5SLKNZC-cjI56NCs.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-Cpak96ZI.js → chunk-WRU74C26-BQqHgerX.js} +7 -7
- package/console-app/assets/chunk-XXDRQBXY-CLdTtHL4.js +1 -0
- package/console-app/assets/classDiagram-JCYQIIEL-Dh0wx8TK.js +1 -0
- package/console-app/assets/classDiagram-v2-OCEON4UE-Dh0wx8TK.js +1 -0
- package/console-app/assets/cose-bilkent-JH36ORCC-DcHzDpDb.js +1 -0
- package/console-app/assets/cynefin-VYW2F7L2-Cn2zn-8-.js +1 -0
- package/console-app/assets/cynefinDiagram-MW4NZA55-C00zINdu.js +62 -0
- package/console-app/assets/cytoscape.esm-B-NFISlW.js +321 -0
- package/console-app/assets/dagre-DE2imcyX.js +1 -0
- package/console-app/assets/dagre-VZM6K2ZE-Bb2uZ7tL.js +4 -0
- package/console-app/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/console-app/assets/{diagram-OA4YK3LP-Dv-j07Wh.js → diagram-7IWD3JNH-DUN-JIa1.js} +3 -3
- package/console-app/assets/{diagram-FQU43EPY-SGSSyx5P.js → diagram-B4RE2ZJO-Ct5iRFhI.js} +1 -1
- package/console-app/assets/diagram-LBJQPF4R-BZ2Hrr-9.js +24 -0
- package/console-app/assets/diagram-Q27KOJAE-BHaThj6T.js +24 -0
- package/console-app/assets/diagram-UB23O5K3-CH-SzBoh.js +41 -0
- package/console-app/assets/dist-CsdsWTxp.js +1 -0
- package/console-app/assets/ebnfDiagram-BXEA7PRR-BkjeNaQH.js +1 -0
- package/console-app/assets/{erDiagram-Q63AITRT-DQ5Gu1Tw.js → erDiagram-JOGREHBK-BdL77bY3.js} +3 -3
- package/console-app/assets/eventmodeling-45OFAUF4-C6PNVeIU.js +1 -0
- package/console-app/assets/flowDiagram-UKHOOZJN-CmURPvo2.js +1 -0
- package/console-app/assets/ganttDiagram-PKOTCBZU-DfgO68Ez.js +292 -0
- package/console-app/assets/gitGraph-TEB2WS4Q-BNbepAzP.js +1 -0
- package/console-app/assets/{gitGraphDiagram-IHSO6WYX-7JFgdH2Q.js → gitGraphDiagram-DS77QQ5N-Crb8obGB.js} +4 -4
- package/console-app/assets/graphlib-IlWVLY3o.js +1 -0
- package/console-app/assets/index-Dsydm-nw.css +1 -0
- package/console-app/assets/index-g8jA8DJo.js +290 -0
- package/console-app/assets/info-DKCQHKI2-D9tXUXel.js +1 -0
- package/console-app/assets/infoDiagram-6WML65LV-BvG8ufLa.js +2 -0
- package/console-app/assets/init-C-OQMol4.js +1 -0
- package/console-app/assets/isUndefined-T4snU1Mx.js +1 -0
- package/console-app/assets/{ishikawaDiagram-FXEZZL3T-XjQC7Fmw.js → ishikawaDiagram-WSZJBQD7-BWoGxEjO.js} +3 -3
- package/console-app/assets/{journeyDiagram-5HDEW3XC-DyIcpJQM.js → journeyDiagram-NVQOT4AX-CR4YcPHg.js} +3 -3
- package/console-app/assets/{kanban-definition-HUTT4EX6-B1zYF1dv.js → kanban-definition-27J2QSJJ-DYfc5EZe.js} +6 -6
- package/console-app/assets/{katex-Vhh-h91d.js → katex-CXMH3UgJ.js} +3 -3
- package/console-app/assets/{line-C6UySSzG.js → line-NIaf8Mfw.js} +1 -1
- package/console-app/assets/linear-DB_1BE-l.js +1 -0
- package/console-app/assets/map-BmPfXn7V.js +1 -0
- package/console-app/assets/{mermaid-parser.core-Tfk1Eudy.js → mermaid-parser.core-BqCVMHRZ.js} +3 -3
- package/console-app/assets/mermaid.core-CYaeERjF.js +42 -0
- package/console-app/assets/{mindmap-definition-LN4V7U3C-5tBdCFVy.js → mindmap-definition-FAOFIHXS-BCjT2v4F.js} +3 -3
- package/console-app/assets/{ordinal-hYBb2elL.js → ordinal-BDEzSJ7C.js} +1 -1
- package/console-app/assets/packet-7NZHBO7P-CzFZvntp.js +1 -0
- package/console-app/assets/path-fybaL0A-.js +1 -0
- package/console-app/assets/pegDiagram-VL7TDLO6-3iMotW64.js +1 -0
- package/console-app/assets/pie-RZYD4A2V-CXIoUTJn.js +1 -0
- package/console-app/assets/pieDiagram-7S7Q4E2Y-B-EOKkdd.js +39 -0
- package/console-app/assets/{quadrantDiagram-ABIIQ3AL-Bwdtm5-W.js → quadrantDiagram-CIZ2JOQS-DDdq8l2N.js} +2 -2
- package/console-app/assets/radar-I7S5WNFK-9SLSkJ73.js +1 -0
- package/console-app/assets/railroad-3IZDKUUU-DdJ88Ord.js +1 -0
- package/console-app/assets/railroad-abnf-AHOZXSZD-D2QiLT8B.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-CSMqj9L2.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-Cg1-F8im.js +1 -0
- package/console-app/assets/railroadDiagram-AXF67PYL-BMW_s9QW.js +1 -0
- package/console-app/assets/{requirementDiagram-TGXJPOKE-CRV748Vu.js → requirementDiagram-LRYGKXZP-BzcnEvjk.js} +2 -2
- package/console-app/assets/rolldown-runtime-BcKkbAw3.js +1 -0
- package/console-app/assets/{rough.esm-CSKSodPl.js → rough.esm-Dy-Kn_BL.js} +1 -1
- package/console-app/assets/{sankeyDiagram-HTMAVEWB-CrFvfCvp.js → sankeyDiagram-W5VNT64P-Dh2TFvuG.js} +2 -2
- package/console-app/assets/sequenceDiagram-SI44F4Z6-b-m-tQYz.js +162 -0
- package/console-app/assets/src-Dm8O0hiD.js +1 -0
- package/console-app/assets/stateDiagram-OKZ733FA-W98kCkqj.js +1 -0
- package/console-app/assets/stateDiagram-v2-UEYNNEHI-DpnoMNHC.js +1 -0
- package/console-app/assets/swimlanes-SLNWSIFB-0q_y6cLu.js +2 -0
- package/console-app/assets/swimlanesDiagram-ULZ7WXOC-BmGtOaWo.js +8 -0
- package/console-app/assets/timeline-definition-Z64GVDOM-DmsNlhwe.js +120 -0
- package/console-app/assets/treeView-QDETBFTQ-DY7A9uJm.js +1 -0
- package/console-app/assets/treemap-6X3UGDF4-DI73Vm90.js +1 -0
- package/console-app/assets/vennDiagram-T6HMQDX7-Czpr9diJ.js +34 -0
- package/console-app/assets/wardley-OPB4EBWU-C39AmDqd.js +1 -0
- package/console-app/assets/{wardleyDiagram-EHGQE667-uWxnqqVK.js → wardleyDiagram-T6FBY63Y-DOtWBvnk.js} +36 -36
- package/console-app/assets/{xychartDiagram-FW5EYKEG-ClVawwGR.js → xychartDiagram-ELKLHX3M-VHHuGrWV.js} +4 -4
- package/console-app/index.html +4 -2
- package/dist/.pikku/addon/index.d.ts +7 -0
- package/dist/.pikku/addon/index.js +7 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +7 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.js +7 -0
- package/dist/.pikku/agent/index.d.ts +7 -0
- package/dist/.pikku/agent/index.js +7 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +14 -13
- package/dist/.pikku/agent/pikku-agent-types.gen.js +5 -6
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +2 -2
- package/dist/.pikku/auth/index.d.ts +8 -0
- package/dist/.pikku/auth/index.js +8 -0
- package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +118 -0
- package/dist/.pikku/auth/pikku-auth-types.gen.js +92 -0
- package/dist/.pikku/channel/index.d.ts +7 -0
- package/dist/.pikku/channel/index.js +7 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +6 -8
- package/dist/.pikku/channel/pikku-channel-types.gen.js +2 -9
- package/dist/.pikku/cli/index.d.ts +7 -0
- package/dist/.pikku/cli/index.js +7 -0
- package/dist/.pikku/cli/pikku-cli-channel.js +14 -3
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +3 -2
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +86 -22
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/index.d.ts +1 -0
- package/dist/.pikku/console/index.js +1 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/error/index.d.ts +7 -0
- package/dist/.pikku/error/index.js +7 -0
- package/dist/.pikku/error/pikku-error-types.gen.d.ts +7 -0
- package/dist/.pikku/error/pikku-error-types.gen.js +7 -0
- package/dist/.pikku/function/index.d.ts +7 -0
- package/dist/.pikku/function/index.js +7 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +26 -258
- package/dist/.pikku/function/pikku-function-types.gen.js +2 -236
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.json +193 -128
- package/dist/.pikku/function/pikku-functions.gen.js +14 -12
- package/dist/.pikku/gateway/index.d.ts +7 -0
- package/dist/.pikku/gateway/index.js +7 -0
- package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +36 -0
- package/dist/.pikku/gateway/pikku-gateway-types.gen.js +25 -0
- package/dist/.pikku/http/index.d.ts +7 -0
- package/dist/.pikku/http/index.js +7 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +4 -22
- package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
- package/dist/.pikku/mcp/index.d.ts +7 -0
- package/dist/.pikku/mcp/index.js +7 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +7 -4
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/middleware/index.d.ts +7 -0
- package/dist/.pikku/middleware/index.js +7 -0
- package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +117 -0
- package/dist/.pikku/middleware/pikku-middleware-types.gen.js +108 -0
- package/dist/.pikku/node/index.d.ts +1 -0
- package/dist/.pikku/node/index.js +1 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +4 -4
- package/dist/.pikku/pikku-services.gen.js +3 -3
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/index.d.ts +7 -0
- package/dist/.pikku/queue/index.js +7 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +2 -2
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +2 -2
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +8 -5
- package/dist/.pikku/scenarios/index.d.ts +7 -0
- package/dist/.pikku/scenarios/index.js +7 -0
- package/dist/.pikku/scenarios/pikku-personas.gen.d.ts +17 -0
- package/dist/.pikku/scenarios/pikku-personas.gen.js +17 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +2 -2
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +310 -0
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.js +71 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +2 -2
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/scheduler/index.d.ts +7 -0
- package/dist/.pikku/scheduler/index.js +7 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +3 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +9 -7
- package/dist/.pikku/schemas/schemas/PikkuSemverOutput.schema.json +1 -0
- package/dist/.pikku/scopes/index.d.ts +7 -0
- package/dist/.pikku/scopes/index.js +7 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +5 -13
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -3
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/index.d.ts +8 -0
- package/dist/.pikku/secrets/index.js +8 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +8 -12
- package/dist/.pikku/secrets/pikku-secrets.gen.js +7 -9
- package/dist/.pikku/services/pikku-meta-service.gen.d.ts +7 -0
- package/dist/.pikku/services/pikku-meta-service.gen.js +9 -0
- package/dist/.pikku/setup/index.d.ts +7 -0
- package/dist/.pikku/setup/index.js +7 -0
- package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +66 -0
- package/dist/.pikku/setup/pikku-setup-types.gen.js +87 -0
- package/dist/.pikku/trigger/index.d.ts +7 -0
- package/dist/.pikku/trigger/index.js +7 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +6 -6
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/index.d.ts +8 -0
- package/dist/.pikku/variables/index.js +8 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +7 -10
- package/dist/.pikku/variables/pikku-variables.gen.js +8 -10
- package/dist/.pikku/workflow/index.d.ts +7 -0
- package/dist/.pikku/workflow/index.js +7 -0
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +105 -82
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +1 -2
- package/dist/.pikku/workflow/pikku-personas.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +21 -263
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +2 -65
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +0 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/cli.wiring.js +69 -7
- package/dist/src/deploy/analyzer/analyzer.js +39 -17
- package/dist/src/deploy/build-pipeline.d.ts +13 -0
- package/dist/src/deploy/build-pipeline.js +22 -0
- package/dist/src/deploy/bundler/bundler.js +2 -2
- package/dist/src/deploy/server-entry.js +1 -1
- package/dist/src/fabric/fabric-commands.d.ts +104 -104
- package/dist/src/fabric/functions/add.function.d.ts +4 -4
- package/dist/src/fabric/functions/add.function.js +1 -1
- package/dist/src/fabric/functions/addon-verify.function.d.ts +4 -4
- package/dist/src/fabric/functions/addon-verify.function.js +1 -1
- package/dist/src/fabric/functions/db-schema.function.d.ts +4 -4
- package/dist/src/fabric/functions/db-schema.function.js +1 -1
- package/dist/src/fabric/functions/deploy-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/deploy-list.function.js +1 -1
- package/dist/src/fabric/functions/deploy-units.function.d.ts +4 -4
- package/dist/src/fabric/functions/deploy-units.function.js +1 -1
- package/dist/src/fabric/functions/deploy.function.d.ts +8 -8
- package/dist/src/fabric/functions/deploy.function.js +1 -1
- package/dist/src/fabric/functions/domains-add.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-add.function.js +1 -1
- package/dist/src/fabric/functions/domains-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-list.function.js +1 -1
- package/dist/src/fabric/functions/domains-remove.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-remove.function.js +1 -1
- package/dist/src/fabric/functions/errors.function.d.ts +4 -4
- package/dist/src/fabric/functions/errors.function.js +1 -1
- package/dist/src/fabric/functions/init.function.d.ts +4 -4
- package/dist/src/fabric/functions/init.function.js +1 -1
- package/dist/src/fabric/functions/link.function.d.ts +4 -4
- package/dist/src/fabric/functions/link.function.js +1 -1
- package/dist/src/fabric/functions/llm-key.function.d.ts +4 -4
- package/dist/src/fabric/functions/llm-key.function.js +1 -1
- package/dist/src/fabric/functions/login.function.d.ts +4 -4
- package/dist/src/fabric/functions/login.function.js +1 -1
- package/dist/src/fabric/functions/logs.function.d.ts +4 -4
- package/dist/src/fabric/functions/logs.function.js +1 -1
- package/dist/src/fabric/functions/metrics.function.d.ts +4 -4
- package/dist/src/fabric/functions/metrics.function.js +1 -1
- package/dist/src/fabric/functions/publish.function.d.ts +4 -4
- package/dist/src/fabric/functions/publish.function.js +1 -1
- package/dist/src/fabric/functions/rollback.function.d.ts +4 -4
- package/dist/src/fabric/functions/rollback.function.js +1 -1
- package/dist/src/fabric/functions/secrets-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-list.function.js +1 -1
- package/dist/src/fabric/functions/secrets-rotate.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-rotate.function.js +1 -1
- package/dist/src/fabric/functions/secrets-set.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-set.function.js +1 -1
- package/dist/src/fabric/functions/smoke.function.d.ts +4 -4
- package/dist/src/fabric/functions/smoke.function.js +13 -13
- package/dist/src/fabric/functions/status.function.d.ts +4 -4
- package/dist/src/fabric/functions/status.function.js +1 -1
- package/dist/src/fabric/functions/trace.function.d.ts +4 -4
- package/dist/src/fabric/functions/trace.function.js +1 -1
- package/dist/src/fabric/functions/validate.function.d.ts +4 -4
- package/dist/src/fabric/functions/validate.function.js +90 -27
- package/dist/src/fabric/lib/git.d.ts +23 -0
- package/dist/src/fabric/lib/git.js +39 -0
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/all.js +1 -1
- package/dist/src/functions/commands/audit.d.ts +11 -1
- package/dist/src/functions/commands/audit.js +59 -23
- package/dist/src/functions/commands/binary.d.ts +4 -4
- package/dist/src/functions/commands/binary.js +1 -1
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +5 -4
- package/dist/src/functions/commands/bun-coverage-loader.js +4 -1
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-audit.js +1 -1
- package/dist/src/functions/commands/db-baseline.d.ts +1 -1
- package/dist/src/functions/commands/db-baseline.js +1 -1
- package/dist/src/functions/commands/db-check.d.ts +1 -1
- package/dist/src/functions/commands/db-check.js +1 -1
- package/dist/src/functions/commands/db-codegen.d.ts +1 -1
- package/dist/src/functions/commands/db-codegen.js +1 -1
- package/dist/src/functions/commands/db-export.d.ts +1 -1
- package/dist/src/functions/commands/db-export.js +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.js +1 -1
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-migrate.js +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +4 -4
- package/dist/src/functions/commands/db-reset.js +1 -1
- package/dist/src/functions/commands/deploy-apply.d.ts +4 -4
- package/dist/src/functions/commands/deploy-apply.js +14 -2
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-info.js +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +4 -4
- package/dist/src/functions/commands/deploy-plan.js +6 -2
- package/dist/src/functions/commands/{dev-ai-runner.d.ts → dev-agent-runner.d.ts} +5 -4
- package/dist/src/functions/commands/{dev-ai-runner.js → dev-agent-runner.js} +4 -4
- package/dist/src/functions/commands/dev.d.ts +4 -4
- package/dist/src/functions/commands/dev.js +32 -25
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/emails-init.js +19 -6
- package/dist/src/functions/commands/enable.d.ts +8 -8
- package/dist/src/functions/commands/enable.js +4 -2
- package/dist/src/functions/commands/environment.d.ts +27 -0
- package/dist/src/functions/commands/environment.js +36 -2
- package/dist/src/functions/commands/import-n8n.d.ts +4 -4
- package/dist/src/functions/commands/import-n8n.js +1 -1
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/info.js +1 -1
- package/dist/src/functions/commands/knowledge-index.d.ts +4 -4
- package/dist/src/functions/commands/knowledge-index.js +1 -1
- package/dist/src/functions/commands/knowledge-validate.d.ts +4 -4
- package/dist/src/functions/commands/knowledge-validate.js +1 -1
- package/dist/src/functions/commands/login.d.ts +9 -9
- package/dist/src/functions/commands/login.js +1 -1
- package/dist/src/functions/commands/meta.d.ts +37 -37
- package/dist/src/functions/commands/meta.js +1 -1
- package/dist/src/functions/commands/new-addon.d.ts +5 -4
- package/dist/src/functions/commands/new-addon.js +27 -25
- package/dist/src/functions/commands/new-function.d.ts +4 -4
- package/dist/src/functions/commands/new-function.js +4 -4
- package/dist/src/functions/commands/new-middleware.d.ts +4 -4
- package/dist/src/functions/commands/new-middleware.js +3 -3
- package/dist/src/functions/commands/new-permission.d.ts +4 -4
- package/dist/src/functions/commands/new-permission.js +3 -3
- package/dist/src/functions/commands/new-wiring.d.ts +4 -4
- package/dist/src/functions/commands/new-wiring.js +8 -8
- package/dist/src/functions/commands/persona-sync.d.ts +4 -4
- package/dist/src/functions/commands/persona-sync.js +1 -1
- package/dist/src/functions/commands/persona.d.ts +5 -5
- package/dist/src/functions/commands/persona.js +6 -6
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-bootstrap.js +7 -2
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.js +2 -2
- package/dist/src/functions/commands/roles-audit.d.ts +1 -1
- package/dist/src/functions/commands/roles-audit.js +1 -1
- package/dist/src/functions/commands/roles-prune.d.ts +4 -4
- package/dist/src/functions/commands/roles-prune.js +1 -1
- package/dist/src/functions/commands/scenario-browser.d.ts +18 -12
- package/dist/src/functions/commands/scenario-browser.js +20 -6
- package/dist/src/functions/commands/scenario-formatter.d.ts +6 -52
- package/dist/src/functions/commands/scenario-ladder.d.ts +4 -4
- package/dist/src/functions/commands/scenario.d.ts +8 -11
- package/dist/src/functions/commands/scenario.js +107 -55
- package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
- package/dist/src/functions/commands/scopes-audit.js +1 -1
- package/dist/src/functions/commands/scopes-prune.d.ts +4 -4
- package/dist/src/functions/commands/scopes-prune.js +1 -1
- package/dist/src/functions/commands/semver-render.d.ts +2 -0
- package/dist/src/functions/commands/semver-render.js +60 -0
- package/dist/src/functions/commands/semver.d.ts +25 -0
- package/dist/src/functions/commands/semver.js +50 -0
- package/dist/src/functions/commands/serve.d.ts +4 -4
- package/dist/src/functions/commands/serve.js +25 -22
- package/dist/src/functions/commands/skills.d.ts +8 -8
- package/dist/src/functions/commands/skills.js +1 -1
- package/dist/src/functions/commands/update-render.d.ts +2 -0
- package/dist/src/functions/commands/update-render.js +102 -0
- package/dist/src/functions/commands/update.d.ts +99 -0
- package/dist/src/functions/commands/update.js +392 -0
- package/dist/src/functions/commands/validate.d.ts +4 -4
- package/dist/src/functions/commands/validate.js +1 -1
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-check.js +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +4 -4
- package/dist/src/functions/commands/versions-init.js +1 -1
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/versions-update.js +1 -1
- package/dist/src/functions/commands/watch.d.ts +4 -4
- package/dist/src/functions/commands/watch.js +1 -1
- package/dist/src/functions/db/annotation-parser.d.ts +11 -3
- package/dist/src/functions/db/better-auth-schema.js +1 -1
- package/dist/src/functions/db/db-codegen.js +4 -2
- package/dist/src/functions/db/local-db.js +3 -3
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/fetch/index.js +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.js +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.js +1 -1
- package/dist/src/functions/surface/build-surface-doc.d.ts +22 -0
- package/dist/src/functions/surface/build-surface-doc.js +151 -0
- package/dist/src/functions/surface/collect-surface-usage.d.ts +16 -0
- package/dist/src/functions/surface/collect-surface-usage.js +35 -0
- package/dist/src/functions/surface/collect-surface.d.ts +19 -1
- package/dist/src/functions/surface/collect-surface.js +104 -16
- package/dist/src/functions/surface/generate-surface-doc.d.ts +1 -0
- package/dist/src/functions/surface/generate-surface-doc.js +46 -0
- package/dist/src/functions/surface/shipped-surface-doc.d.ts +16 -0
- package/dist/src/functions/surface/shipped-surface-doc.js +44 -0
- package/dist/src/functions/surface/surface-doc.types.d.ts +69 -0
- package/dist/src/functions/surface/surface-doc.types.js +1 -0
- package/dist/src/functions/surface/surface-editorial.d.ts +25 -0
- package/dist/src/functions/surface/surface-editorial.js +101 -0
- package/dist/src/functions/surface/write-surface-usage.d.ts +12 -0
- package/dist/src/functions/surface/write-surface-usage.js +18 -0
- package/dist/src/functions/validate/pikku-barrel-checks.d.ts +12 -0
- package/dist/src/functions/validate/pikku-barrel-checks.js +97 -0
- package/dist/src/functions/validate/scenario-file-checks.js +1 -1
- package/dist/src/functions/validate/shared-checks.d.ts +10 -0
- package/dist/src/functions/validate/shared-checks.js +16 -2
- package/dist/src/functions/validate/validate-registry.js +20 -0
- package/dist/src/functions/validate/workspace-exports-checks.d.ts +14 -0
- package/dist/src/functions/validate/workspace-exports-checks.js +211 -0
- package/dist/src/functions/wirings/agent/pikku-command-agent-types.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent-types.js → agent/pikku-command-agent-types.js} +5 -4
- package/dist/src/functions/wirings/agent/pikku-command-agent.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent/pikku-command-ai-agent.js → agent/pikku-command-agent.js} +7 -7
- package/dist/src/functions/wirings/agent/pikku-command-public-agent.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.js +4 -4
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.d.ts +2 -2
- package/dist/src/functions/wirings/agent/serialize-agent-types.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-agent/serialize-ai-agent-types.js → agent/serialize-agent-types.js} +24 -30
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.js +1 -1
- package/dist/src/functions/wirings/agent/serialize-public-agent.d.ts +5 -0
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.js +5 -3
- package/dist/src/functions/wirings/agent-scorer/pikku-command-agent-scorer.d.ts +1 -0
- package/dist/src/functions/wirings/{ai-scorer/pikku-command-ai-scorer.js → agent-scorer/pikku-command-agent-scorer.js} +7 -7
- package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.d.ts +1 -1
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +4 -4
- package/dist/src/functions/wirings/auth/pikku-command-auth.js +5 -4
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +1 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +3 -8
- package/dist/src/functions/wirings/auth/serialize-auth-guards.d.ts +12 -0
- package/dist/src/functions/wirings/auth/serialize-auth-guards.js +168 -0
- package/dist/src/functions/wirings/auth/serialize-auth-types.d.ts +4 -4
- package/dist/src/functions/wirings/auth/serialize-auth-types.js +4 -4
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.js +2 -2
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.js +6 -3
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.js +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +2 -2
- package/dist/src/functions/wirings/channels/serialize-channel-types.d.ts +3 -1
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +18 -24
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +1 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +2 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +3 -3
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +2 -2
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +9 -3
- package/dist/src/functions/wirings/cli/serialize-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +9 -3
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +6 -5
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +20 -4
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +2 -2
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +3 -4
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/emails/pikku-command-emails.js +1 -1
- package/dist/src/functions/wirings/emails/serialize-emails.js +2 -2
- package/dist/src/functions/wirings/errors/pikku-command-error-types.d.ts +1 -0
- package/dist/src/functions/wirings/errors/pikku-command-error-types.js +17 -0
- package/dist/src/functions/wirings/errors/serialize-error-types.d.ts +9 -0
- package/dist/src/functions/wirings/errors/serialize-error-types.js +16 -0
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +20 -8
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +4 -4
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +17 -3
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.d.ts +14 -0
- package/dist/src/functions/wirings/functions/pikku-command-leaf-indexes.js +119 -0
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +18 -3
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.d.ts +13 -0
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +20 -1
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +7 -2
- package/dist/src/functions/wirings/functions/serialize-function-types.js +46 -361
- package/dist/src/functions/wirings/functions/serialize-leaf-index.d.ts +17 -0
- package/dist/src/functions/wirings/functions/serialize-leaf-index.js +27 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.d.ts +7 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway-types.js +24 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.js +1 -1
- package/dist/src/functions/wirings/gateway/serialize-gateway-types.d.ts +6 -0
- package/dist/src/functions/wirings/gateway/serialize-gateway-types.js +55 -0
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.js +3 -4
- package/dist/src/functions/wirings/graph/serialize-graph-wirings.d.ts +1 -1
- package/dist/src/functions/wirings/graph/serialize-graph-wirings.js +2 -2
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.js +3 -3
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +2 -2
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.js +7 -3
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.js +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.js +2 -2
- package/dist/src/functions/wirings/http/serialize-http-types.d.ts +3 -1
- package/dist/src/functions/wirings/http/serialize-http-types.js +20 -35
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +5 -1
- package/dist/src/functions/wirings/http/serialize-typed-http-map.js +5 -4
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.js +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.js +5 -2
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +7 -3
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.d.ts +3 -1
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +15 -15
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +1 -1
- package/dist/src/functions/wirings/middleware/serialize-middleware-types.d.ts +9 -0
- package/dist/src/functions/wirings/middleware/serialize-middleware-types.js +176 -0
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
- package/dist/src/functions/wirings/package/pikku-command-package-types.js +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package.js +1 -1
- package/dist/src/functions/wirings/package/serialize-package-types.js +0 -4
- package/dist/src/functions/wirings/package/serialize-package.js +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +1 -1
- package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +4 -4
- package/dist/src/functions/wirings/personas/pikku-command-personas.js +1 -1
- package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +1 -1
- package/dist/src/functions/wirings/personas/serialize-personas-types.js +9 -28
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.js +4 -2
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.js +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.d.ts +3 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +8 -5
- package/dist/src/functions/wirings/queue/serialize-queue-wrapper.js +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +3 -4
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.js +1 -1
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +4 -8
- package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +4 -4
- package/dist/src/functions/wirings/roles/pikku-command-roles.js +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +6 -6
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +6 -6
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +2 -2
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +3 -2
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +4 -2
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +5 -5
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -3
- package/dist/src/functions/wirings/scenarios/scenario-partition.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/scenario-schema-partition.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +4 -4
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.js +5 -2
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +1 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.d.ts +3 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +10 -5
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +4 -4
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +4 -3
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +13 -19
- package/dist/src/functions/wirings/setup/serialize-setup-types.d.ts +7 -0
- package/dist/src/functions/wirings/setup/serialize-setup-types.js +111 -0
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +4 -4
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.js +2 -2
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.js +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.d.ts +3 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +18 -11
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.d.ts +1 -1
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +18 -17
- package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.d.ts +10 -9
- package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +67 -49
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.js +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.js +12 -16
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.d.ts +1 -1
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.js +4 -3
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +1 -1
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +9 -11
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.js +6 -6
- package/dist/src/functions/wirings/webhook/serialize-webhook.d.ts +1 -1
- package/dist/src/functions/wirings/webhook/serialize-webhook.js +3 -2
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +4 -4
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +14 -5
- package/dist/src/functions/wirings/workflow/serialize-personas.js +2 -1
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.d.ts +1 -2
- package/dist/src/functions/wirings/workflow/serialize-scenario-types.d.ts +2 -0
- package/dist/src/functions/wirings/workflow/serialize-scenario-types.js +511 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +1 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +4 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +0 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +3 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +28 -441
- package/dist/src/functions/workflows/all.workflow.d.ts +1 -1
- package/dist/src/functions/workflows/all.workflow.js +83 -27
- package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
- package/dist/src/server/bun-server-runner.d.ts +1 -1
- package/dist/src/server/content-signing-jwt.js +1 -1
- package/dist/src/server/dev-server-runner.interface.d.ts +1 -1
- package/dist/src/server/node-server-runner.d.ts +1 -1
- package/dist/src/server/node-server-runner.js +5 -2
- package/dist/src/services/cli-logger.service.d.ts +1 -1
- package/dist/src/services/cli-logger.service.js +1 -1
- package/dist/src/services.d.ts +9 -6
- package/dist/src/services.js +22 -6
- package/dist/src/utils/file-writer.d.ts +2 -0
- package/dist/src/utils/file-writer.js +37 -1
- package/dist/src/utils/is-deploy-codegen.d.ts +21 -0
- package/dist/src/utils/is-deploy-codegen.js +23 -0
- package/dist/src/utils/leaf-import-path.d.ts +16 -0
- package/dist/src/utils/leaf-import-path.js +15 -0
- package/dist/src/utils/parse-cli-filters.js +15 -35
- package/dist/src/utils/pikku-cli-config.d.ts +11 -0
- package/dist/src/utils/pikku-cli-config.js +82 -12
- package/dist/src/utils/remove-legacy-scaffold-file.d.ts +14 -0
- package/dist/src/utils/remove-legacy-scaffold-file.js +36 -1
- package/dist/src/utils/resolve-scaffold-feature.js +5 -1
- package/dist/src/utils/schema-diff.d.ts +22 -0
- package/dist/src/utils/schema-diff.js +190 -0
- package/dist/src/utils/serialize-meta-ts.js +1 -1
- package/dist/src/utils/serialize-schemas.d.ts +1 -1
- package/dist/src/utils/surface-diff.d.ts +35 -0
- package/dist/src/utils/surface-diff.js +183 -0
- package/dist/src/utils/surface.d.ts +51 -0
- package/dist/src/utils/surface.js +156 -0
- package/dist/src/utils/tsc-check.d.ts +1 -1
- package/dist/src/utils/tsc-check.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +53 -44
- package/surface.json +4464 -0
- package/console-app/assets/abnfDiagram-VRR7QNED-DTI8lQi3.js +0 -1
- package/console-app/assets/arc-B_XK0Xbk.js +0 -1
- package/console-app/assets/architecture-TIHT7OUA-BtQ4ypaP.js +0 -1
- package/console-app/assets/architectureDiagram-ZJ3FMSHR-CzE1T938.js +0 -36
- package/console-app/assets/c4Diagram-LMCZKHZV-DSsAqAm5.js +0 -10
- package/console-app/assets/channel-yWsB39zH.js +0 -1
- package/console-app/assets/chunk-52WLFC77-DkXgWHeH.js +0 -10
- package/console-app/assets/chunk-EX3LRPZG-0GIQyrn1.js +0 -231
- package/console-app/assets/chunk-FWX5IMBZ-DZvpxO7-.js +0 -2
- package/console-app/assets/chunk-ICXQ74PX-CzAIiCX5.js +0 -2
- package/console-app/assets/chunk-OGEWGWER-DhmfsQT_.js +0 -1
- package/console-app/assets/chunk-PUDLZKDR-BMAILUQ6.js +0 -156
- package/console-app/assets/chunk-RYQCIY6F-9OVlGtkS.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-DbUlDq35.js +0 -1
- package/console-app/assets/chunk-WYO6CB5R-cQuwndtk.js +0 -127
- package/console-app/assets/chunk-XXDRQBXY-D0yYTMY0.js +0 -1
- package/console-app/assets/chunk-ZIRB5QZD-H-kepumB.js +0 -32
- package/console-app/assets/classDiagram-OUVF2IWQ-jBNBOKfR.js +0 -1
- package/console-app/assets/classDiagram-v2-EOCWNBFH-jBNBOKfR.js +0 -1
- package/console-app/assets/cose-bilkent-JH36ORCC-D8cALtKZ.js +0 -1
- package/console-app/assets/cynefin-VYW2F7L2-BphwdLzc.js +0 -1
- package/console-app/assets/cynefinDiagram-TSTJHNR4-7Rk31pXX.js +0 -62
- package/console-app/assets/cytoscape.esm-h6BdjjI9.js +0 -321
- package/console-app/assets/dagre-CXRCoUWR.js +0 -1
- package/console-app/assets/dagre-VKFMJZFB-e8-5QJxJ.js +0 -4
- package/console-app/assets/defaultLocale-C8Fc0cco.js +0 -1
- package/console-app/assets/diagram-G47NLZAW-F_m68BCv.js +0 -24
- package/console-app/assets/diagram-NH7WQ7WH-5p6A3YHp.js +0 -24
- package/console-app/assets/diagram-WEI45ONY-1gqT-Dqp.js +0 -41
- package/console-app/assets/dist-DQ3gF-0S.js +0 -1
- package/console-app/assets/ebnfDiagram-CCIWWBDH-Dsfd8DxK.js +0 -1
- package/console-app/assets/eventmodeling-45OFAUF4-BSTAXikh.js +0 -1
- package/console-app/assets/flowDiagram-23GEKE2U-zX29jtvN.js +0 -1
- package/console-app/assets/ganttDiagram-NO4QXBWP-2of9JObw.js +0 -292
- package/console-app/assets/gitGraph-TEB2WS4Q-q2ow8moS.js +0 -1
- package/console-app/assets/graphlib-B8gBHxth.js +0 -1
- package/console-app/assets/index-CTO5cTAD.css +0 -1
- package/console-app/assets/index-FDk51Irw.js +0 -255
- package/console-app/assets/info-DKCQHKI2-DA35x9Eq.js +0 -1
- package/console-app/assets/infoDiagram-FWYZ7A6U-wBw6slQd.js +0 -2
- package/console-app/assets/init-D6jRqBbL.js +0 -1
- package/console-app/assets/linear-B-Zu24zW.js +0 -1
- package/console-app/assets/map-DsCK-0Cs.js +0 -1
- package/console-app/assets/mermaid.core-HtlOIxsD.js +0 -11
- package/console-app/assets/packet-7NZHBO7P-CvZpWSge.js +0 -1
- package/console-app/assets/path-BWPyau1x.js +0 -1
- package/console-app/assets/pegDiagram-2B236MQR-Bw6WA3kx.js +0 -1
- package/console-app/assets/pie-RZYD4A2V-cW9hD9gn.js +0 -1
- package/console-app/assets/pieDiagram-ENE6RG2P-DkD_01Ea.js +0 -39
- package/console-app/assets/radar-I7S5WNFK-tOWig5fu.js +0 -1
- package/console-app/assets/railroad-3IZDKUUU-tZ2PcrQC.js +0 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-D3lzFQzK.js +0 -1
- package/console-app/assets/railroad-ebnf-EBAXGLYW-DRp6_rsA.js +0 -1
- package/console-app/assets/railroad-peg-LSFZ7HO6-CuWNWp3P.js +0 -1
- package/console-app/assets/railroadDiagram-RFXS5EU6-Dljzejc8.js +0 -1
- package/console-app/assets/sequenceDiagram-DBY2YBRQ-CXysYi1c.js +0 -162
- package/console-app/assets/src-Bilm7g2t.js +0 -1
- package/console-app/assets/stateDiagram-2N3HPSRC-C8aGjwyh.js +0 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-C21qKRsf.js +0 -1
- package/console-app/assets/swimlanes-5IMT3BWC-VaTW8Eyb.js +0 -2
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CCQS8jgU.js +0 -8
- package/console-app/assets/timeline-definition-FHXFAJF6-D88F4W4L.js +0 -120
- package/console-app/assets/treeView-QDETBFTQ-hN0LxmWJ.js +0 -1
- package/console-app/assets/treemap-6X3UGDF4-Cz4whnzW.js +0 -1
- package/console-app/assets/vennDiagram-L72KCM5P-CoW2kun8.js +0 -34
- package/console-app/assets/wardley-OPB4EBWU-l9vWUHbB.js +0 -1
- package/dist/src/functions/db/coercion-plugin.d.ts +0 -7
- package/dist/src/functions/db/coercion-plugin.js +0 -103
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +0 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +0 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +0 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +0 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +0 -5
- package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +0 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +0 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.js +0 -21
- package/dist/src/functions/wirings/console/serialize-node-types.d.ts +0 -1
- package/dist/src/functions/wirings/console/serialize-node-types.js +0 -11
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +0 -7
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +0 -43
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +0 -4
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +0 -36
- /package/dist/.pikku/schemas/schemas/{PikkuAIAgentOutput.schema.json → PikkuAgentOutput.schema.json} +0 -0
- /package/dist/.pikku/schemas/schemas/{PikkuAIScorerOutput.schema.json → PikkuAgentScorerOutput.schema.json} +0 -0
- /package/dist/.pikku/schemas/schemas/{PikkuFunctionTypesInput.schema.json → PikkuGatewayTypesInput.schema.json} +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-agent-map.js +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-model-aliases.d.ts +0 -0
- /package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.js +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The handler is inlined: it is wired exactly once, so a named export would
|
|
5
5
|
* only be indirection.
|
|
6
6
|
*/
|
|
7
|
-
export const serializeWebhook = (
|
|
7
|
+
export const serializeWebhook = (leaf) => {
|
|
8
8
|
const schemas = `/**
|
|
9
9
|
* Auto-generated outgoing webhook delivery schemas
|
|
10
10
|
* Do not edit manually - regenerate with 'npx pikku'
|
|
@@ -23,7 +23,8 @@ export const WebhookDelivery = z.object({
|
|
|
23
23
|
* Auto-generated outgoing webhook delivery queue worker
|
|
24
24
|
* Do not edit manually - regenerate with 'npx pikku'
|
|
25
25
|
*/
|
|
26
|
-
import { pikkuSessionlessFunc
|
|
26
|
+
import { pikkuSessionlessFunc } from '${leaf('function')}'
|
|
27
|
+
import { wireQueueWorker } from '${leaf('queue')}'
|
|
27
28
|
import { pikkuWebhookWorkerFunc } from '@pikku/core/services'
|
|
28
29
|
import { WebhookDelivery } from './webhook.schemas.gen.js'
|
|
29
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuWorkflowRoutes: import("#pikku").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
1
|
+
export declare const pikkuWorkflowRoutes: import("#pikku/function").PikkuFunctionConfig<void, boolean, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<void, boolean, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<void, boolean, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
-
import {
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
|
+
import { getLeafImportPath } from '../../../utils/leaf-import-path.js';
|
|
3
3
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
4
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
5
5
|
import { removeLegacyScaffoldFile } from '../../../utils/remove-legacy-scaffold-file.js';
|
|
@@ -10,8 +10,8 @@ export const pikkuWorkflowRoutes = pikkuSessionlessFunc({
|
|
|
10
10
|
if (config.scaffold?.workflow &&
|
|
11
11
|
config.workflowRoutesFile &&
|
|
12
12
|
config.workflowRoutesSchemasFile) {
|
|
13
|
-
const
|
|
14
|
-
const { schemas, functions } = serializeWorkflowRoutes(
|
|
13
|
+
const leaf = (name) => getLeafImportPath(config.workflowRoutesFile, name, config);
|
|
14
|
+
const { schemas, functions } = serializeWorkflowRoutes(leaf, resolveScaffoldFeature('workflow', config.scaffold?.workflow).auth);
|
|
15
15
|
await writeFileInDir(logger, config.workflowRoutesSchemasFile, schemas);
|
|
16
16
|
await writeFileInDir(logger, config.workflowRoutesFile, functions);
|
|
17
17
|
await removeLegacyScaffoldFile(config.workflowRoutesFile);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type WorkflowCommandInput = {
|
|
2
2
|
bootstrap?: boolean;
|
|
3
3
|
};
|
|
4
|
-
export declare const pikkuWorkflow: import("#pikku").PikkuFunctionConfig<WorkflowCommandInput, boolean | undefined, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<WorkflowCommandInput, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<WorkflowCommandInput, boolean | undefined, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
4
|
+
export declare const pikkuWorkflow: import("#pikku/function").PikkuFunctionConfig<WorkflowCommandInput, boolean | undefined, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<WorkflowCommandInput, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<WorkflowCommandInput, boolean | undefined, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
5
5
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { pikkuSessionlessFunc } from '#pikku';
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
2
|
import { ErrorCode } from '@pikku/inspector';
|
|
3
3
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
4
4
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
5
5
|
import { serializeWorkflowTypes } from './serialize-workflow-types.js';
|
|
6
|
+
import { serializeScenarioTypes } from './serialize-scenario-types.js';
|
|
6
7
|
import { serializePersonas } from './serialize-personas.js';
|
|
7
8
|
import { resolvePersonas } from '../../../utils/resolve-personas.js';
|
|
8
9
|
import { serializeWorkflowRegistration } from './serialize-workflow-registration.js';
|
|
@@ -16,7 +17,7 @@ import { buildFeaturesMeta } from '../scenarios/serialize-feature-meta.js';
|
|
|
16
17
|
import { serializeScenarioWorkflowMeta } from '../scenarios/serialize-scenario-meta.js';
|
|
17
18
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
18
19
|
import { stripVerboseFields, hasVerboseFields, } from '../../../utils/strip-verbose-meta.js';
|
|
19
|
-
import { join } from 'path';
|
|
20
|
+
import { join, dirname } from 'path';
|
|
20
21
|
import { rm } from 'fs/promises';
|
|
21
22
|
export const pikkuWorkflow = pikkuSessionlessFunc({
|
|
22
23
|
func: async ({ logger, config, getInspectorState }, input) => {
|
|
@@ -88,9 +89,11 @@ export const pikkuWorkflow = pikkuSessionlessFunc({
|
|
|
88
89
|
const workflowMapImportPath = getFileImportRelativePath(workflowTypesFile, workflowMapDeclarationFile, packageMappings);
|
|
89
90
|
const agentMapImportPath = getFileImportRelativePath(workflowTypesFile, config.agentMapDeclarationFile, packageMappings);
|
|
90
91
|
const scopesImportPath = getFileImportRelativePath(workflowTypesFile, config.scopesFile, packageMappings);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
await writeFileInDir(logger, workflowTypesFile, serializeWorkflowTypes(functionTypesImportPath, getFileImportRelativePath(workflowTypesFile, config.middlewareTypesFile, packageMappings), getFileImportRelativePath(workflowTypesFile, config.authGuardsFile, packageMappings), rpcMapImportPath, workflowMapImportPath, agentMapImportPath, scopesImportPath));
|
|
93
|
+
// Scenarios get their own barrel: a scenario is a testing primitive, and
|
|
94
|
+
// mixing it into the workflow barrel meant every project that only ships
|
|
95
|
+
// workflows still imported the whole scenario surface.
|
|
96
|
+
await writeFileInDir(logger, config.scenarioTypesFile, serializeScenarioTypes(getFileImportRelativePath(config.scenarioTypesFile, functionTypesFile, packageMappings), getFileImportRelativePath(config.scenarioTypesFile, config.middlewareTypesFile, packageMappings), getFileImportRelativePath(config.scenarioTypesFile, workflowTypesFile, packageMappings), getFileImportRelativePath(config.scenarioTypesFile, config.scenarioStepMapDeclarationFile, packageMappings), getFileImportRelativePath(config.scenarioTypesFile, config.personasWiringFile, packageMappings)));
|
|
94
97
|
// Rides the workflow command rather than getting its own codegen node, so
|
|
95
98
|
// it can't drift out of the two hand-maintained ordering lists.
|
|
96
99
|
await writeFileInDir(logger, config.scenarioStepMapDeclarationFile, serializeScenarioStepMap(logger, config.scenarioStepMapDeclarationFile, packageMappings, typesMap, functionState.meta));
|
|
@@ -101,6 +104,12 @@ export const pikkuWorkflow = pikkuSessionlessFunc({
|
|
|
101
104
|
const agentMapImportPath = getFileImportRelativePath(config.personasWiringFile, config.agentMapDeclarationFile, packageMappings);
|
|
102
105
|
const exposedRpcMapImportPath = getFileImportRelativePath(config.personasWiringFile, config.rpcMapDeclarationFile, packageMappings);
|
|
103
106
|
await writeFileInDir(logger, config.personasWiringFile, serializePersonas(personas, agentMapImportPath, exposedRpcMapImportPath));
|
|
107
|
+
// Same reason as the scenario meta above: a project generated before this
|
|
108
|
+
// moved to `scenarios/` still has a copy under `workflow/`, and tsc
|
|
109
|
+
// compiles every file in the output tree whether anything imports it.
|
|
110
|
+
await rm(join(dirname(workflowTypesFile), 'pikku-personas.gen.ts'), {
|
|
111
|
+
force: true,
|
|
112
|
+
});
|
|
104
113
|
// Fixed path getPersonasMeta() reads; kept out of workflow/meta, which
|
|
105
114
|
// getWorkflowMeta() globs as workflows.
|
|
106
115
|
await writeFileInDir(logger, join(config.outDir, 'workflow', 'personas.gen.json'), JSON.stringify(personas, null, 2));
|
|
@@ -10,7 +10,8 @@ export const serializePersonas = (personas, agentMapImportPath, rpcMapImportPath
|
|
|
10
10
|
return `/** Personas declared with definePersonas() */
|
|
11
11
|
import { createHttpPersonas } from '@pikku/core/persona'
|
|
12
12
|
import type { HttpPersonasConfig } from '@pikku/core/persona'
|
|
13
|
-
import type { ScenarioPersona
|
|
13
|
+
import type { ScenarioPersona } from '@pikku/core/services'
|
|
14
|
+
import type { ResolvedPersona } from '@pikku/core/services'
|
|
14
15
|
import type { AgentMap } from '${agentMapImportPath}'
|
|
15
16
|
import type { FlattenedRPCMap } from '${rpcMapImportPath}'
|
|
16
17
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { type TypesMap } from '@pikku/inspector';
|
|
2
|
-
import type { FunctionsMeta } from '@pikku/core';
|
|
3
|
-
import type { Logger } from '@pikku/core/services';
|
|
2
|
+
import type { FunctionsMeta, Logger } from '@pikku/core/services';
|
|
4
3
|
export declare const serializeScenarioStepMap: (logger: Logger, relativeToPath: string, packageMappings: Record<string, string>, typesMap: TypesMap, functionsMeta: FunctionsMeta) => string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const sharedWorkflowConfigFields = " title?: string\n description?: string\n tags?: string[]\n expose?: boolean\n internal?: boolean\n override?: string\n version?: number\n remote?: boolean\n mcp?: boolean\n readonly?: boolean\n approvalRequired?: boolean\n approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never\n middleware?: PikkuMiddleware[]\n input?: InputSchema\n output?: OutputSchema\n node?: NodeConfig\n errors?: Array<typeof PikkuError>\n inline?: boolean";
|
|
2
|
+
export declare const serializeScenarioTypes: (functionTypesImportPath: string, middlewareTypesImportPath: string, workflowTypesImportPath: string, scenarioStepMapImportPath: string, personasImportPath: string) => string;
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The config fields a scenario shares with a workflow.
|
|
3
|
+
*
|
|
4
|
+
* Emitted into both barrels rather than imported across them: the workflow's
|
|
5
|
+
* own config type is private, and exporting it just so the scenario barrel can
|
|
6
|
+
* `Omit` from it would put a name back on the public surface to serve a
|
|
7
|
+
* generator-internal relationship. One definition here keeps the two emissions
|
|
8
|
+
* from drifting.
|
|
9
|
+
*/
|
|
10
|
+
const SHARED_CONFIG_FIELDS = ` title?: string
|
|
11
|
+
description?: string
|
|
12
|
+
tags?: string[]
|
|
13
|
+
expose?: boolean
|
|
14
|
+
internal?: boolean
|
|
15
|
+
override?: string
|
|
16
|
+
version?: number
|
|
17
|
+
remote?: boolean
|
|
18
|
+
mcp?: boolean
|
|
19
|
+
readonly?: boolean
|
|
20
|
+
approvalRequired?: boolean
|
|
21
|
+
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never
|
|
22
|
+
middleware?: PikkuMiddleware[]
|
|
23
|
+
input?: InputSchema
|
|
24
|
+
output?: OutputSchema
|
|
25
|
+
node?: NodeConfig
|
|
26
|
+
errors?: Array<typeof PikkuError>
|
|
27
|
+
inline?: boolean`;
|
|
28
|
+
export const sharedWorkflowConfigFields = SHARED_CONFIG_FIELDS;
|
|
29
|
+
export const serializeScenarioTypes = (functionTypesImportPath, middlewareTypesImportPath, workflowTypesImportPath, scenarioStepMapImportPath, personasImportPath) => {
|
|
30
|
+
return `import type {
|
|
31
|
+
PikkuScenarioWire,
|
|
32
|
+
ScenarioStepOptions,
|
|
33
|
+
} from '@pikku/core/scenario'
|
|
34
|
+
import type { PikkuWorkflowWire } from '@pikku/core/workflow'
|
|
35
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
|
36
|
+
import { PikkuError } from '@pikku/core/errors'
|
|
37
|
+
import type { PikkuFunctionSessionless, PikkuFunctionConfig, WiredServices, InferSchemaOutput, NodeConfig, PikkuApprovalDescription } from '${functionTypesImportPath}'
|
|
38
|
+
import type { PikkuMiddleware } from '${middlewareTypesImportPath}'
|
|
39
|
+
import type { TypedWorkflow } from '${workflowTypesImportPath}'
|
|
40
|
+
import type { FlattenedScenarioStepMap } from '${scenarioStepMapImportPath}'
|
|
41
|
+
import type { TypedPersonas } from '${personasImportPath}'
|
|
42
|
+
|
|
43
|
+
export type { TypedPersonas }
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The scenario test surface, re-exported so a step file has one specifier to
|
|
47
|
+
* import from. These names are not generated — they come straight from core —
|
|
48
|
+
* but routing them through here means a scenario file never has to know
|
|
49
|
+
* whether the helper it wants is typed against this project or shipped by the
|
|
50
|
+
* framework.
|
|
51
|
+
*/
|
|
52
|
+
export {
|
|
53
|
+
createCookieJar,
|
|
54
|
+
createScenarioRunner,
|
|
55
|
+
pollUntil,
|
|
56
|
+
requireScenarioEnv,
|
|
57
|
+
} from '@pikku/core/scenario'
|
|
58
|
+
export type {
|
|
59
|
+
PikkuBrowserWire,
|
|
60
|
+
ScenarioSurface,
|
|
61
|
+
TestIdSelector,
|
|
62
|
+
} from '@pikku/core/scenario'
|
|
63
|
+
export { postScenarioJson, readScenarioHttpResponse } from '@pikku/core/persona'
|
|
64
|
+
export type { ScenarioHttpResponse } from '@pikku/core/scenario'
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The typed half of a scenario wire: \`given\`/\`when\`/\`then\`, narrowed to the
|
|
68
|
+
* names declared by \`pikkuScenarioStep\` in this project. \`given\` and \`when\`
|
|
69
|
+
* differ only in the prose the reporter renders; \`then\` additionally makes the
|
|
70
|
+
* step's bindings witnesses rather than alternatives.
|
|
71
|
+
*/
|
|
72
|
+
export interface TypedScenarioSteps {
|
|
73
|
+
given<K extends keyof FlattenedScenarioStepMap>(
|
|
74
|
+
stepName: string,
|
|
75
|
+
stepFunc: K,
|
|
76
|
+
data?: FlattenedScenarioStepMap[K]['input'],
|
|
77
|
+
options?: ScenarioStepOptions
|
|
78
|
+
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
79
|
+
|
|
80
|
+
when<K extends keyof FlattenedScenarioStepMap>(
|
|
81
|
+
stepName: string,
|
|
82
|
+
stepFunc: K,
|
|
83
|
+
data?: FlattenedScenarioStepMap[K]['input'],
|
|
84
|
+
options?: ScenarioStepOptions
|
|
85
|
+
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
86
|
+
|
|
87
|
+
then<K extends keyof FlattenedScenarioStepMap>(
|
|
88
|
+
stepName: string,
|
|
89
|
+
stepFunc: K,
|
|
90
|
+
data?: FlattenedScenarioStepMap[K]['input'],
|
|
91
|
+
options?: ScenarioStepOptions
|
|
92
|
+
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** \`Out\` types \`scenario.context\`. */
|
|
96
|
+
export type TypedScenario<Out = unknown> = TypedWorkflow &
|
|
97
|
+
Omit<PikkuScenarioWire<Out>, keyof PikkuWorkflowWire | keyof TypedScenarioSteps> &
|
|
98
|
+
TypedScenarioSteps
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* \`Ctx\` types \`scenario.context\`, defaulting to the body's own output. A hook
|
|
102
|
+
* returns void but shares the scenario's context, so it passes that scenario's
|
|
103
|
+
* output here instead.
|
|
104
|
+
*/
|
|
105
|
+
export type PikkuFunctionScenario<
|
|
106
|
+
In = unknown,
|
|
107
|
+
Out = never,
|
|
108
|
+
Ctx = Out
|
|
109
|
+
> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors', WiredServices, Ctx>
|
|
110
|
+
|
|
111
|
+
type PikkuScenarioConfigWithSchema<
|
|
112
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
113
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
114
|
+
> = {
|
|
115
|
+
${SHARED_CONFIG_FIELDS}
|
|
116
|
+
func: PikkuFunctionScenario<
|
|
117
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
118
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
119
|
+
>
|
|
120
|
+
/**
|
|
121
|
+
* Runs before the scenario body. Same signature as \`func\`, but its return
|
|
122
|
+
* value is discarded — a hook is setup, not a step, so it is never recorded
|
|
123
|
+
* on the ladder. Throwing skips the body and fails the run; \`after\` still
|
|
124
|
+
* runs.
|
|
125
|
+
*/
|
|
126
|
+
before?: PikkuScenarioHook<InputSchema, OutputSchema>
|
|
127
|
+
/**
|
|
128
|
+
* Always runs after the scenario body, in a \`finally\`, whether it passed or
|
|
129
|
+
* failed. Throwing fails a run that would otherwise have passed; on an
|
|
130
|
+
* already-failed run it attaches as the \`cause\` and never replaces the
|
|
131
|
+
* original error. Reads \`scenario.context\` for whatever the body managed to
|
|
132
|
+
* record before it stopped.
|
|
133
|
+
*/
|
|
134
|
+
after?: PikkuScenarioHook<InputSchema, OutputSchema>
|
|
135
|
+
/**
|
|
136
|
+
* Why this scenario is held out of a default run, stated where the scenario
|
|
137
|
+
* is. The scenario still appears in the plan and is reported as skipped
|
|
138
|
+
* rather than quietly omitted; naming it directly with \`--flows\` runs it
|
|
139
|
+
* anyway.
|
|
140
|
+
*/
|
|
141
|
+
skip?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* A scenario lifecycle hook: the scenario's own \`(services, data, wire)\`
|
|
146
|
+
* signature with its result discarded. \`OutputSchema\` types
|
|
147
|
+
* \`scenario.context\` while the return type stays \`void\`.
|
|
148
|
+
*/
|
|
149
|
+
export type PikkuScenarioHook<
|
|
150
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
151
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
152
|
+
> = PikkuFunctionScenario<
|
|
153
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
154
|
+
void,
|
|
155
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
156
|
+
>
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Declares a scenario hook. Returns the function verbatim — a hook is never
|
|
160
|
+
* registered, so this exists purely to give an inline hook a call site to be
|
|
161
|
+
* contextually typed from, the way every other pikku primitive is.
|
|
162
|
+
*/
|
|
163
|
+
export function pikkuScenarioHook<In = unknown, Ctx = unknown>(
|
|
164
|
+
hook: PikkuFunctionScenario<In, void, Ctx>
|
|
165
|
+
): PikkuFunctionScenario<In, void, Ctx> {
|
|
166
|
+
return hook
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* A scenario: a complex workflow that drives the app the way users do.
|
|
171
|
+
* Steps run as actors over the REAL transport — \`scenario.do(step, rpc,
|
|
172
|
+
* data, { actor: actors.yasser })\` — so flows double as e2e tests and
|
|
173
|
+
* staged/production health checks (no state reset; scope what you create).
|
|
174
|
+
*/
|
|
175
|
+
export function pikkuScenario<
|
|
176
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
177
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
178
|
+
>(
|
|
179
|
+
config: PikkuScenarioConfigWithSchema<InputSchema, OutputSchema>
|
|
180
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenario' | 'actors', PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
181
|
+
export function pikkuScenario<In, Out = unknown>(
|
|
182
|
+
func:
|
|
183
|
+
| PikkuFunctionScenario<In, Out>
|
|
184
|
+
| PikkuFunctionConfig<In, Out, 'scenario' | 'actors', PikkuFunctionScenario<In, Out>>
|
|
185
|
+
): PikkuFunctionConfig<In, Out, 'scenario' | 'actors'>
|
|
186
|
+
export function pikkuScenario(func: any) {
|
|
187
|
+
return typeof func === 'function' ? { func } : func
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* A scenario as a feature references it. Any \`pikkuScenario\` export is
|
|
192
|
+
* assignable; \`In\` is recovered from it so the paired form's \`data\` is
|
|
193
|
+
* checked against that scenario's own input.
|
|
194
|
+
*/
|
|
195
|
+
export type PikkuScenarioRef<In = any, Out = any> = PikkuFunctionConfig<
|
|
196
|
+
In,
|
|
197
|
+
Out,
|
|
198
|
+
'scenario' | 'actors',
|
|
199
|
+
PikkuFunctionScenario<In, Out>,
|
|
200
|
+
any,
|
|
201
|
+
any
|
|
202
|
+
>
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* One entry in a feature's \`scenarios\` list, validated against itself: a bare
|
|
206
|
+
* scenario, or a scenario paired with the input to run it with. The paired form
|
|
207
|
+
* is gherkin's \`Examples:\` written as an ordinary loop.
|
|
208
|
+
*/
|
|
209
|
+
export type PikkuFeatureEntry<Entry> = Entry extends {
|
|
210
|
+
scenario: PikkuScenarioRef<infer In>
|
|
211
|
+
}
|
|
212
|
+
? { scenario: PikkuScenarioRef<In>; data: In }
|
|
213
|
+
: Entry extends PikkuScenarioRef
|
|
214
|
+
? Entry
|
|
215
|
+
: never
|
|
216
|
+
|
|
217
|
+
type PikkuFeatureConfig<Scenarios extends readonly unknown[]> = {
|
|
218
|
+
/** Human-readable name. The export identifier is the id. */
|
|
219
|
+
name: string
|
|
220
|
+
description?: string
|
|
221
|
+
tags?: string[]
|
|
222
|
+
scenarios: { [K in keyof Scenarios]: PikkuFeatureEntry<Scenarios[K]> }
|
|
223
|
+
/**
|
|
224
|
+
* Runs ONCE before the whole group — not before each scenario. Per-scenario
|
|
225
|
+
* setup is the scenario's own \`before\`; gherkin's \`Background:\` is
|
|
226
|
+
* deliberately not expressible here.
|
|
227
|
+
*/
|
|
228
|
+
before?: PikkuScenarioHook
|
|
229
|
+
after?: PikkuScenarioHook
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* A feature: an ordered group of scenarios, mirroring gherkin's Feature ↔
|
|
234
|
+
* Scenario structure. Scenarios are referenced by imported identifier, so a
|
|
235
|
+
* renamed or deleted scenario is a compile error rather than a silent skip.
|
|
236
|
+
*
|
|
237
|
+
* A scenario does not have to belong to a feature — a void-input scenario
|
|
238
|
+
* still runs standalone.
|
|
239
|
+
*
|
|
240
|
+
* \`\`\`ts
|
|
241
|
+
* export const credentialFeature = pikkuFeature({
|
|
242
|
+
* name: 'Credential API',
|
|
243
|
+
* tags: ['credential'],
|
|
244
|
+
* before: startsMockOAuthServer,
|
|
245
|
+
* after: stopsMockOAuthServer,
|
|
246
|
+
* scenarios: [
|
|
247
|
+
* credentialLazyLoadScenario,
|
|
248
|
+
* ...['stripe', 'google'].map((name) => ({
|
|
249
|
+
* scenario: credentialRoundTripScenario,
|
|
250
|
+
* data: { name },
|
|
251
|
+
* })),
|
|
252
|
+
* ],
|
|
253
|
+
* })
|
|
254
|
+
* \`\`\`
|
|
255
|
+
*/
|
|
256
|
+
export function pikkuFeature<const Scenarios extends readonly unknown[]>(
|
|
257
|
+
config: PikkuFeatureConfig<Scenarios>
|
|
258
|
+
): PikkuFeatureConfig<Scenarios> {
|
|
259
|
+
return config
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* One surface's implementation of a step.
|
|
264
|
+
*
|
|
265
|
+
* Each binding is typed independently, so a browser binding gets a non-optional
|
|
266
|
+
* \`wire.browser\` and a cli binding a non-optional \`wire.cli\` without either
|
|
267
|
+
* leaking into the other.
|
|
268
|
+
*/
|
|
269
|
+
export type PikkuFunctionScenarioStep<
|
|
270
|
+
In = unknown,
|
|
271
|
+
Out = never,
|
|
272
|
+
Surface extends 'browser' | 'cli' | 'default' = 'default',
|
|
273
|
+
HasActor extends boolean = false
|
|
274
|
+
> = PikkuFunctionSessionless<
|
|
275
|
+
In,
|
|
276
|
+
Out,
|
|
277
|
+
| 'scenarioStep'
|
|
278
|
+
| (Surface extends 'default' ? never : Surface)
|
|
279
|
+
| (HasActor extends true ? 'actor' : never)
|
|
280
|
+
>
|
|
281
|
+
|
|
282
|
+
type PikkuScenarioStepConfigWithSchema<
|
|
283
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
284
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
285
|
+
HasActor extends boolean = false
|
|
286
|
+
> = {
|
|
287
|
+
/** Registered name — this is the string \`scenario.given()\` references. */
|
|
288
|
+
name: string
|
|
289
|
+
/**
|
|
290
|
+
* This step is driven by a persona, so \`wire.actor\` is injected and
|
|
291
|
+
* non-optional inside every binding, and the runner refuses to dispatch it
|
|
292
|
+
* without one.
|
|
293
|
+
*
|
|
294
|
+
* A \`browser\` binding implies it — a window is opened as somebody. Declare it
|
|
295
|
+
* for a server-side step that calls RPCs as its actor. Leave it off for a step
|
|
296
|
+
* that has no persona to be: an assertion over a value an earlier step
|
|
297
|
+
* returned, or one that posts credentials precisely because it must not reuse
|
|
298
|
+
* an actor's session.
|
|
299
|
+
*/
|
|
300
|
+
actor?: HasActor
|
|
301
|
+
/**
|
|
302
|
+
* What this step does, for the console and for whoever reads the source. It
|
|
303
|
+
* is also the fallback prose when no \`template\` is declared, in which case a
|
|
304
|
+
* reporter renders "Given the shopper buys an apple". Defaults to the call
|
|
305
|
+
* site's step name.
|
|
306
|
+
*/
|
|
307
|
+
description?: string
|
|
308
|
+
/**
|
|
309
|
+
* The prose a reporter renders for this step, with \`{placeholders}\` filled
|
|
310
|
+
* from the input the step was called with — \`'sees {packageName}'\` reports as
|
|
311
|
+
* "Then the admin sees @pikku/addon-todos". Every input field should appear,
|
|
312
|
+
* so the report names the values under test rather than repeating one
|
|
313
|
+
* sentence per call site.
|
|
314
|
+
*/
|
|
315
|
+
template?: string
|
|
316
|
+
title?: string
|
|
317
|
+
tags?: string[]
|
|
318
|
+
input?: InputSchema
|
|
319
|
+
output?: OutputSchema
|
|
320
|
+
errors?: Array<typeof PikkuError>
|
|
321
|
+
/**
|
|
322
|
+
* Drive this step through a real browser, as a human would. The runner
|
|
323
|
+
* provisions a window for the step's actor first — which makes an actor
|
|
324
|
+
* mandatory — and \`wire.browser\` is non-optional inside it.
|
|
325
|
+
*
|
|
326
|
+
* Compose shared utilities here rather than writing raw clicks: the step says
|
|
327
|
+
* what the actor is doing, the utilities say how.
|
|
328
|
+
*/
|
|
329
|
+
browser?: PikkuFunctionScenarioStep<
|
|
330
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
331
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
332
|
+
'browser',
|
|
333
|
+
// A window is opened as somebody, so a browser binding has an actor whether
|
|
334
|
+
// or not the step declared one.
|
|
335
|
+
true
|
|
336
|
+
>
|
|
337
|
+
/** Drive this step remotely, over the websocket. */
|
|
338
|
+
cli?: PikkuFunctionScenarioStep<
|
|
339
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
340
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
341
|
+
'cli',
|
|
342
|
+
HasActor
|
|
343
|
+
>
|
|
344
|
+
/**
|
|
345
|
+
* The server-side path — the fast suite, and the floor every other surface
|
|
346
|
+
* falls back to.
|
|
347
|
+
*
|
|
348
|
+
* On a \`then\`, this is not an alternative to the other bindings but a second
|
|
349
|
+
* **witness**: the run executes every binding it has and fails if they
|
|
350
|
+
* disagree, because "the row says paid" and "the page says paid" are different
|
|
351
|
+
* claims and the gap between them is the bug nobody catches.
|
|
352
|
+
*/
|
|
353
|
+
default?: PikkuFunctionScenarioStep<
|
|
354
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
355
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
356
|
+
'default',
|
|
357
|
+
HasActor
|
|
358
|
+
>
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
type PikkuScenarioStepConfig<In, Out, HasActor extends boolean = false> =
|
|
362
|
+
Omit<PikkuScenarioStepConfigWithSchema<undefined, undefined, HasActor>, 'browser' | 'cli' | 'default' | 'input' | 'output'> & {
|
|
363
|
+
browser?: PikkuFunctionScenarioStep<In, Out, 'browser', true>
|
|
364
|
+
cli?: PikkuFunctionScenarioStep<In, Out, 'cli', HasActor>
|
|
365
|
+
default?: PikkuFunctionScenarioStep<In, Out, 'default', HasActor>
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* A named, reusable scenario step, declaring one implementation per surface an
|
|
370
|
+
* actor can drive it through.
|
|
371
|
+
*
|
|
372
|
+
* The step's identity is what the actor is trying to do; which surface carries
|
|
373
|
+
* it out is a binding. That is what lets one ladder run through a real browser,
|
|
374
|
+
* over the websocket, or entirely server-side — and what makes "how much of this
|
|
375
|
+
* flow can a human actually reach" a number rather than a guess.
|
|
376
|
+
*
|
|
377
|
+
* Steps are deliberately NOT registered as RPCs: a browser-driving step must
|
|
378
|
+
* never be network-callable.
|
|
379
|
+
*/
|
|
380
|
+
export function pikkuScenarioStep<
|
|
381
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
382
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
383
|
+
>(
|
|
384
|
+
config: PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema, true> & { actor: true }
|
|
385
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep' | 'browser' | 'cli', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser' | 'cli' | 'default'>, InputSchema, OutputSchema>
|
|
386
|
+
export function pikkuScenarioStep<In, Out = unknown>(
|
|
387
|
+
config: PikkuScenarioStepConfig<In, Out, true> & { actor: true }
|
|
388
|
+
): PikkuFunctionConfig<In, Out, 'scenarioStep' | 'browser' | 'cli'>
|
|
389
|
+
export function pikkuScenarioStep<
|
|
390
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
391
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
392
|
+
>(
|
|
393
|
+
config: PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema, true> & { browser: {} }
|
|
394
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep' | 'browser' | 'cli', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser' | 'cli' | 'default'>, InputSchema, OutputSchema>
|
|
395
|
+
export function pikkuScenarioStep<In, Out = unknown>(
|
|
396
|
+
config: PikkuScenarioStepConfig<In, Out, true> & { browser: {} }
|
|
397
|
+
): PikkuFunctionConfig<In, Out, 'scenarioStep' | 'browser' | 'cli'>
|
|
398
|
+
export function pikkuScenarioStep<
|
|
399
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
400
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
401
|
+
>(
|
|
402
|
+
config: PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>
|
|
403
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep' | 'browser' | 'cli', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser' | 'cli' | 'default'>, InputSchema, OutputSchema>
|
|
404
|
+
export function pikkuScenarioStep<In, Out = unknown>(
|
|
405
|
+
config: PikkuScenarioStepConfig<In, Out>
|
|
406
|
+
): PikkuFunctionConfig<In, Out, 'scenarioStep' | 'browser' | 'cli'>
|
|
407
|
+
export function pikkuScenarioStep(config: any) {
|
|
408
|
+
const surfaces = (['browser', 'cli', 'default'] as const).filter(
|
|
409
|
+
(surface) => typeof config[surface] === 'function'
|
|
410
|
+
)
|
|
411
|
+
if (surfaces.length === 0) {
|
|
412
|
+
throw new Error(
|
|
413
|
+
\`[scenario] step '\${config.name}' declares no surface bindings. Add at least a \\\`default\\\` (server-side) implementation.\`
|
|
414
|
+
)
|
|
415
|
+
}
|
|
416
|
+
return {
|
|
417
|
+
...config,
|
|
418
|
+
surfaces,
|
|
419
|
+
requiresActor: config.actor === true || surfaces.includes('browser'),
|
|
420
|
+
// The runner sets the surface on the wire and calls this once per binding it
|
|
421
|
+
// resolved — every witness of a \`then\`, exactly one for an action step.
|
|
422
|
+
func: (services: any, data: any, wire: any) => {
|
|
423
|
+
const surface = wire?.scenarioStep?.surface ?? 'default'
|
|
424
|
+
const binding = config[surface] ?? config.default
|
|
425
|
+
return binding(services, data, wire)
|
|
426
|
+
},
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* What a step declares when nobody drives it: one implementation, and no
|
|
432
|
+
* surfaces to choose between.
|
|
433
|
+
*
|
|
434
|
+
* \`func\` rather than \`default\` is the point. \`default\` means *the fallback when
|
|
435
|
+
* no other surface applies*, which implies others could exist; \`func\` says
|
|
436
|
+
* structurally that there is one way this happens. That also keeps the phase
|
|
437
|
+
* rule coherent — an assertion runs every witness it has and fails if they
|
|
438
|
+
* disagree, and this has exactly one by construction.
|
|
439
|
+
*/
|
|
440
|
+
type PikkuSubjectScenarioStepConfigWithSchema<
|
|
441
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
442
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
443
|
+
> = Omit<
|
|
444
|
+
PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>,
|
|
445
|
+
'browser' | 'cli' | 'default' | 'actor'
|
|
446
|
+
> & {
|
|
447
|
+
func: PikkuFunctionScenarioStep<
|
|
448
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
449
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
450
|
+
'default'
|
|
451
|
+
>
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
type PikkuSubjectScenarioStepConfig<In, Out> =
|
|
455
|
+
Omit<PikkuScenarioStepConfig<In, Out>, 'browser' | 'cli' | 'default' | 'actor'> & {
|
|
456
|
+
func: PikkuFunctionScenarioStep<In, Out, 'default'>
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* A step in which the app acts on itself — "Given the platform has expired the
|
|
461
|
+
* trial".
|
|
462
|
+
*
|
|
463
|
+
* The grammatical subject of that sentence is not a user of your app; it **is**
|
|
464
|
+
* your app, which is why it is its own declaration rather than a persona with an
|
|
465
|
+
* asterisk. A persona is a person.
|
|
466
|
+
*
|
|
467
|
+
* Local-test-only, and never in a virtual user's catalogue: a virtual user that
|
|
468
|
+
* could expire its own trial is manufacturing the outcome it exists to discover.
|
|
469
|
+
*/
|
|
470
|
+
export function pikkuPlatformScenarioStep<
|
|
471
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
472
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
473
|
+
>(
|
|
474
|
+
config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema>
|
|
475
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>
|
|
476
|
+
export function pikkuPlatformScenarioStep<In, Out = unknown>(
|
|
477
|
+
config: PikkuSubjectScenarioStepConfig<In, Out>
|
|
478
|
+
): PikkuFunctionConfig<In, Out, 'scenarioStep'>
|
|
479
|
+
export function pikkuPlatformScenarioStep(config: any) {
|
|
480
|
+
return { ...config, surfaces: ['default'] }
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* A step in which a third-party system acts — "Given Stripe's webhook arrives",
|
|
485
|
+
* "When Mailgun bounces it".
|
|
486
|
+
*
|
|
487
|
+
* \`addon\` names the addon that wraps that service, the same name its
|
|
488
|
+
* \`wireAddon\` declares. These steps *are* the mock its consumers currently
|
|
489
|
+
* hand-write: shipped by the addon author, maintained with the addon, and the
|
|
490
|
+
* same artifact that appears in the prose.
|
|
491
|
+
*
|
|
492
|
+
* Note that arranging and asserting are different — "Stripe's webhook arrives"
|
|
493
|
+
* stubs, "Then Stripe was charged" asserts, and only the first is a stub.
|
|
494
|
+
*
|
|
495
|
+
* Local-test-only, and never in a virtual user's catalogue: one that could
|
|
496
|
+
* invoke this would forge its own payment success.
|
|
497
|
+
*/
|
|
498
|
+
export function pikkuAddonScenarioStep<
|
|
499
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
500
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
501
|
+
>(
|
|
502
|
+
config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema> & { addon: string }
|
|
503
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>
|
|
504
|
+
export function pikkuAddonScenarioStep<In, Out = unknown>(
|
|
505
|
+
config: PikkuSubjectScenarioStepConfig<In, Out> & { addon: string }
|
|
506
|
+
): PikkuFunctionConfig<In, Out, 'scenarioStep'>
|
|
507
|
+
export function pikkuAddonScenarioStep(config: any) {
|
|
508
|
+
return { ...config, surfaces: ['default'] }
|
|
509
|
+
}
|
|
510
|
+
`;
|
|
511
|
+
};
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
import type { WorkflowsMeta } from '@pikku/core/workflow';
|
|
5
5
|
import { type TypesMap } from '@pikku/inspector';
|
|
6
6
|
import type { SerializedWorkflowGraphs } from '@pikku/inspector/workflow-graph';
|
|
7
|
-
import type { FunctionsMeta } from '@pikku/core';
|
|
8
|
-
import type { Logger } from '@pikku/core/services';
|
|
7
|
+
import type { FunctionsMeta, Logger } from '@pikku/core/services';
|
|
9
8
|
type WireAddonDeclarations = Map<string, {
|
|
10
9
|
package: string;
|
|
11
10
|
rpcEndpoint?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { serializeImportMap } from '../../../utils/serialize-import-map.js';
|
|
2
2
|
import { generateCustomTypes } from '@pikku/inspector';
|
|
3
|
-
import { parseVersionedId } from '@pikku/core';
|
|
3
|
+
import { parseVersionedId } from '@pikku/core/utils';
|
|
4
4
|
/**
|
|
5
5
|
* A workflow or graph node name is free-form prose written by a human, so an
|
|
6
6
|
* apostrophe or a backslash in it is ordinary. `JSON.stringify` emits a valid,
|