@pikku/cli 0.12.100 → 0.12.103
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/console-app/assets/{abnfDiagram-VRR7QNED-Icjp9hnB.js → abnfDiagram-VRR7QNED-BLi9JHGg.js} +1 -1
- package/console-app/assets/{arc-BfGls--L.js → arc-B3b5uYlL.js} +1 -1
- package/console-app/assets/architecture-TIHT7OUA-BYeDayHv.js +1 -0
- package/console-app/assets/{architectureDiagram-ZJ3FMSHR-CpnsLBns.js → architectureDiagram-ZJ3FMSHR-Dkd8kxIa.js} +1 -1
- package/console-app/assets/{blockDiagram-677ZJIJ3-ByKRMGSr.js → blockDiagram-677ZJIJ3-DnH0nNlb.js} +1 -1
- package/console-app/assets/{c4Diagram-LMCZKHZV-CzJSbsUo.js → c4Diagram-LMCZKHZV-BlelCS5i.js} +1 -1
- package/console-app/assets/channel-CTa6nggO.js +1 -0
- package/console-app/assets/{chunk-32BRIVSS-D_tc4HCY.js → chunk-32BRIVSS-D7tMgtT1.js} +1 -1
- package/console-app/assets/{chunk-52WLFC77-wkQkuUXG.js → chunk-52WLFC77-CRepS35y.js} +1 -1
- package/console-app/assets/{chunk-C7G6YPKG-BFW3xG3R.js → chunk-C7G6YPKG-CUldlJz4.js} +1 -1
- package/console-app/assets/{chunk-EX3LRPZG-Car090Sw.js → chunk-EX3LRPZG-DODbrqEj.js} +1 -1
- package/console-app/assets/{chunk-FWX5IMBZ-c2ud9kQ-.js → chunk-FWX5IMBZ-nZa59wGD.js} +2 -2
- package/console-app/assets/{chunk-HOUHSVGY-RYmQka5R.js → chunk-HOUHSVGY-BaawVZCa.js} +1 -1
- package/console-app/assets/{chunk-ICXQ74PX-C-dqYC_9.js → chunk-ICXQ74PX-C86LrIRs.js} +1 -1
- package/console-app/assets/{chunk-MOJQB5TN-Cu3FUWwl.js → chunk-MOJQB5TN-ovUDQlyW.js} +1 -1
- package/console-app/assets/{chunk-OGEWGWER-Z7f1yArD.js → chunk-OGEWGWER-ByZKAcGu.js} +1 -1
- package/console-app/assets/{chunk-PUDLZKDR-Bp68DuRj.js → chunk-PUDLZKDR-DdeJN3wJ.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-CdKSYWZ4.js → chunk-Q4XR5HBZ-Blp5W9-b.js} +1 -1
- package/console-app/assets/{chunk-RYQCIY6F-9ISCAKm2.js → chunk-RYQCIY6F-DehwjyPp.js} +1 -1
- package/console-app/assets/{chunk-V7JOEXUC-2EOc1nQB.js → chunk-V7JOEXUC-Ca1xeVdo.js} +1 -1
- package/console-app/assets/chunk-VAUOI2AC-BCngaLxk.js +1 -0
- package/console-app/assets/{chunk-VR4S4FIN-BPvN0PUm.js → chunk-VR4S4FIN-Cj7ZlsLr.js} +1 -1
- package/console-app/assets/{chunk-WYO6CB5R-DOpurCTP.js → chunk-WYO6CB5R-CsdBQ1HS.js} +1 -1
- package/console-app/assets/chunk-XXDRQBXY-CGIlOoBU.js +1 -0
- package/console-app/assets/{chunk-ZGVPDNZ5-Bu2weVOL.js → chunk-ZGVPDNZ5-DMnFdLEO.js} +1 -1
- package/console-app/assets/classDiagram-OUVF2IWQ-Bwt1ZVOR.js +1 -0
- package/console-app/assets/classDiagram-v2-EOCWNBFH-Bwt1ZVOR.js +1 -0
- package/console-app/assets/{cose-bilkent-JH36ORCC-nau-QGCX.js → cose-bilkent-JH36ORCC-CiYBhiBv.js} +1 -1
- package/console-app/assets/{cynefin-VYW2F7L2-BBw-E7lg.js → cynefin-VYW2F7L2-BXuNC8qm.js} +1 -1
- package/console-app/assets/{cynefinDiagram-TSTJHNR4-BvnMvOvH.js → cynefinDiagram-TSTJHNR4-Ck53b-Nr.js} +1 -1
- package/console-app/assets/{dagre-VKFMJZFB-CHEqPR29.js → dagre-VKFMJZFB-C9hZCnOv.js} +1 -1
- package/console-app/assets/{diagram-FQU43EPY-JijKRWyb.js → diagram-FQU43EPY-DuEKSLPE.js} +1 -1
- package/console-app/assets/{diagram-G47NLZAW-G5UsB31f.js → diagram-G47NLZAW-B_yO-zKt.js} +1 -1
- package/console-app/assets/{diagram-NH7WQ7WH-BhuJ6fPu.js → diagram-NH7WQ7WH-CtKFjoB4.js} +1 -1
- package/console-app/assets/{diagram-OA4YK3LP-DaUF-8N4.js → diagram-OA4YK3LP-T9eIYXYs.js} +1 -1
- package/console-app/assets/{diagram-WEI45ONY-wLsJIhoM.js → diagram-WEI45ONY-BTgu-I69.js} +1 -1
- package/console-app/assets/{dist-fbBkbDNG.js → dist-DSVj7qxi.js} +1 -1
- package/console-app/assets/{ebnfDiagram-CCIWWBDH-BZCEa3Dz.js → ebnfDiagram-CCIWWBDH-BdyNRX2k.js} +1 -1
- package/console-app/assets/{erDiagram-Q63AITRT-4XoEUtEh.js → erDiagram-Q63AITRT-B0cr0nxe.js} +1 -1
- package/console-app/assets/eventmodeling-45OFAUF4-BeHdsPzc.js +1 -0
- package/console-app/assets/flowDiagram-23GEKE2U-6N6mIkfB.js +1 -0
- package/console-app/assets/{ganttDiagram-NO4QXBWP-BXU7pfq6.js → ganttDiagram-NO4QXBWP-Cr1R_nGh.js} +1 -1
- package/console-app/assets/{gitGraph-TEB2WS4Q-BdMAmvpU.js → gitGraph-TEB2WS4Q-zcmQoWd4.js} +1 -1
- package/console-app/assets/{gitGraphDiagram-IHSO6WYX-3Hn0zwZR.js → gitGraphDiagram-IHSO6WYX-CHB9Fnch.js} +1 -1
- package/console-app/assets/{index-Din2vBeb.js → index-BbIUXgNl.js} +150 -150
- package/console-app/assets/{index-BXMjqLQ5.css → index-C9U-Zyvx.css} +1 -1
- package/console-app/assets/{info-DKCQHKI2-Dc_oQkp5.js → info-DKCQHKI2-BGPZGp_E.js} +1 -1
- package/console-app/assets/{infoDiagram-FWYZ7A6U-B3v4xCUn.js → infoDiagram-FWYZ7A6U-Br_p6SR_.js} +1 -1
- package/console-app/assets/{ishikawaDiagram-FXEZZL3T-DzWq9Vtp.js → ishikawaDiagram-FXEZZL3T-Ma2d4IuN.js} +1 -1
- package/console-app/assets/{journeyDiagram-5HDEW3XC-C0buWi_a.js → journeyDiagram-5HDEW3XC-LdCblEX2.js} +1 -1
- package/console-app/assets/{kanban-definition-HUTT4EX6-DRAN9HhV.js → kanban-definition-HUTT4EX6-CRWetzV4.js} +1 -1
- package/console-app/assets/{line-UqgRNiAC.js → line-DrceqMYY.js} +1 -1
- package/console-app/assets/{linear-FTAGuk_3.js → linear-acWbtwAj.js} +1 -1
- package/console-app/assets/{mermaid-parser.core-DIHI27FL.js → mermaid-parser.core-n773Jf0G.js} +3 -3
- package/console-app/assets/{mermaid.core-D4q8kvcu.js → mermaid.core-DyTRkSqH.js} +3 -3
- package/console-app/assets/{mindmap-definition-LN4V7U3C-DN-_CNLb.js → mindmap-definition-LN4V7U3C-CBU-ehFU.js} +1 -1
- package/console-app/assets/{packet-7NZHBO7P-8a3PoQAb.js → packet-7NZHBO7P-DL_fgdX1.js} +1 -1
- package/console-app/assets/{pegDiagram-2B236MQR-Bh2MhzCN.js → pegDiagram-2B236MQR-CrFaAHHj.js} +1 -1
- package/console-app/assets/{pie-RZYD4A2V-Bi6zbJDl.js → pie-RZYD4A2V-STtzW8Tz.js} +1 -1
- package/console-app/assets/{pieDiagram-ENE6RG2P-D2Z0W5UU.js → pieDiagram-ENE6RG2P-DsUOr1Ud.js} +1 -1
- package/console-app/assets/{quadrantDiagram-ABIIQ3AL-DNOKka0p.js → quadrantDiagram-ABIIQ3AL-DmuSe_qW.js} +1 -1
- package/console-app/assets/{radar-I7S5WNFK-CAxa68Sg.js → radar-I7S5WNFK-L8w2lEOb.js} +1 -1
- package/console-app/assets/{railroad-3IZDKUUU-CZb1usP7.js → railroad-3IZDKUUU-CxqlE5vc.js} +1 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-CkJOR_Em.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-BH_pRGgm.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-B50bKcii.js +1 -0
- package/console-app/assets/{railroadDiagram-RFXS5EU6-B1K2hbTD.js → railroadDiagram-RFXS5EU6-CJ8Lpbeo.js} +1 -1
- package/console-app/assets/{requirementDiagram-TGXJPOKE-K8wcOO0Q.js → requirementDiagram-TGXJPOKE-8OXQXUud.js} +1 -1
- package/console-app/assets/{sankeyDiagram-HTMAVEWB-WBPBkgNx.js → sankeyDiagram-HTMAVEWB-Bezd2CqZ.js} +1 -1
- package/console-app/assets/{sequenceDiagram-DBY2YBRQ-Dz80qZZv.js → sequenceDiagram-DBY2YBRQ-DHb5js3D.js} +1 -1
- package/console-app/assets/{src-CnJCXDL0.js → src-DfFamOl-.js} +1 -1
- package/console-app/assets/{stateDiagram-2N3HPSRC-DMur7lZf.js → stateDiagram-2N3HPSRC-UpyJm2mi.js} +1 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-C6gAfg82.js +1 -0
- package/console-app/assets/{swimlanes-5IMT3BWC-BlLdYcPU.js → swimlanes-5IMT3BWC-yUrV5f4O.js} +1 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-Ch2_j5W5.js +8 -0
- package/console-app/assets/{timeline-definition-FHXFAJF6-CBOit0JY.js → timeline-definition-FHXFAJF6-B6w-rZeZ.js} +1 -1
- package/console-app/assets/{treeView-QDETBFTQ-DM1i1ast.js → treeView-QDETBFTQ-0k2QpnXc.js} +1 -1
- package/console-app/assets/{treemap-6X3UGDF4-ACrBEfY6.js → treemap-6X3UGDF4-ByCuDcGA.js} +1 -1
- package/console-app/assets/{vennDiagram-L72KCM5P-BmeFWb5N.js → vennDiagram-L72KCM5P-BH4374lw.js} +1 -1
- package/console-app/assets/{wardley-OPB4EBWU-BpIbeh58.js → wardley-OPB4EBWU-DNVwuJz6.js} +1 -1
- package/console-app/assets/{wardleyDiagram-EHGQE667-CxL7Mv7y.js → wardleyDiagram-EHGQE667-EXnQ6lkx.js} +1 -1
- package/console-app/assets/{xychartDiagram-FW5EYKEG-DkV75xT2.js → xychartDiagram-FW5EYKEG-rFh-UdgH.js} +1 -1
- package/console-app/index.html +10 -3
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.js +3 -0
- package/dist/.pikku/agent/pikku-model-aliases.gen.d.ts +1 -0
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +5 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +13 -8
- 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 +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +18 -12
- 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/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +6 -25
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +51 -27
- package/dist/.pikku/function/pikku-functions.gen.js +3 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- 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 +2 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +2 -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 +1 -1
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- 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/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +7 -5
- package/dist/.pikku/schemas/schemas/DevInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuAIScorerOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ServeInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/ValidateOutput.schema.json +1 -0
- 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 -1
- 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/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +8 -2
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +2 -1
- package/dist/.pikku/workflow/pikku-personas.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +11 -18
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -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 +20 -11
- package/dist/src/deploy/analyzer/analyzer.js +44 -0
- package/dist/src/deploy/analyzer/manifest.d.ts +37 -0
- package/dist/src/fabric/functions/smoke.function.js +7 -4
- package/dist/src/fabric/functions/validate.function.js +3 -1
- package/dist/src/functions/commands/db-export.js +1 -1
- package/dist/src/functions/commands/db-shared.d.ts +0 -14
- package/dist/src/functions/commands/dev.d.ts +3 -0
- package/dist/src/functions/commands/dev.js +41 -2
- package/dist/src/functions/commands/knowledge-index.d.ts +3 -3
- package/dist/src/functions/commands/new-addon.js +6 -3
- package/dist/src/functions/commands/scenario-browser.d.ts +25 -2
- package/dist/src/functions/commands/scenario-browser.js +5 -1
- package/dist/src/functions/commands/scenario-formatter.d.ts +1 -1
- package/dist/src/functions/commands/scenario-ladder.d.ts +1 -1
- package/dist/src/functions/commands/scenario-ladder.js +1 -1
- package/dist/src/functions/commands/scenario-plan.d.ts +2 -1
- package/dist/src/functions/commands/scenario-plan.js +1 -1
- package/dist/src/functions/commands/scenario.d.ts +7 -1
- package/dist/src/functions/commands/scenario.js +28 -7
- package/dist/src/functions/commands/serve.d.ts +3 -0
- package/dist/src/functions/commands/serve.js +15 -1
- package/dist/src/functions/commands/{workspace-validate.d.ts → validate.d.ts} +18 -3
- package/dist/src/functions/commands/validate.js +9 -0
- package/dist/src/functions/db/local-db.d.ts +2 -1
- package/dist/src/functions/db/local-db.js +2 -2
- package/dist/src/functions/surface/collect-surface.d.ts +14 -0
- package/dist/src/functions/surface/collect-surface.js +215 -0
- package/dist/src/functions/validate/addon-package-checks.d.ts +26 -0
- package/dist/src/functions/validate/addon-package-checks.js +258 -0
- package/dist/src/functions/validate/persona-checks.d.ts +1 -1
- package/dist/src/functions/validate/persona-checks.js +1 -1
- package/dist/src/functions/validate/scenario-file-checks.js +33 -0
- package/dist/src/functions/validate/shared-checks.d.ts +1 -1
- package/dist/src/functions/validate/shared-checks.js +1 -1
- package/dist/src/functions/validate/type-identity-checks.d.ts +25 -0
- package/dist/src/functions/validate/type-identity-checks.js +218 -0
- package/dist/src/functions/validate/validate-registry.d.ts +52 -0
- package/dist/src/functions/validate/validate-registry.js +111 -0
- package/dist/src/functions/validate/validate.d.ts +47 -0
- package/dist/src/functions/validate/{workspace-validate.js → validate.js} +46 -12
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +3 -2
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +5 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +15 -2
- package/dist/src/functions/wirings/ai-agent/serialize-model-aliases.d.ts +5 -0
- package/dist/src/functions/wirings/ai-agent/serialize-model-aliases.js +12 -0
- package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +1 -0
- package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.js +51 -0
- package/dist/src/functions/wirings/ai-scorer/serialize-scorer-names.d.ts +10 -0
- package/dist/src/functions/wirings/ai-scorer/serialize-scorer-names.js +17 -0
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +27 -10
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +9 -4
- package/dist/src/functions/wirings/console/serialize-console-functions.js +9 -56
- package/dist/src/functions/wirings/functions/serialize-function-types.js +7 -30
- package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +5 -1
- package/dist/src/functions/wirings/package/pikku-command-package.js +12 -1
- package/dist/src/functions/wirings/package/serialize-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/serialize-package.js +5 -2
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +1 -6
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +30 -0
- package/dist/src/functions/wirings/scenarios/serialize-feature-meta.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-scenario-registration.js +6 -5
- package/dist/src/functions/wirings/workflow/serialize-personas.js +2 -5
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +12 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +10 -17
- package/dist/src/functions/workflows/all.workflow.js +11 -1
- package/dist/src/server/bun-server-runner.js +3 -0
- package/dist/src/server/dev-server-runner.interface.d.ts +10 -0
- package/dist/src/server/node-server-runner.js +3 -0
- package/dist/src/services.js +1 -0
- package/dist/src/utils/meta-diff.d.ts +1 -1
- package/dist/src/utils/meta-diff.js +2 -0
- package/dist/src/utils/model-alias-override.d.ts +7 -0
- package/dist/src/utils/model-alias-override.js +33 -0
- package/dist/src/utils/pikku-cli-config.js +16 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
- package/console-app/assets/architecture-TIHT7OUA-C8l7I5Lm.js +0 -1
- package/console-app/assets/channel-BgJ-Z0cx.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-DwKsbf70.js +0 -1
- package/console-app/assets/chunk-XXDRQBXY-RuYSFsQb.js +0 -1
- package/console-app/assets/classDiagram-OUVF2IWQ-ohoLCI8g.js +0 -1
- package/console-app/assets/classDiagram-v2-EOCWNBFH-ohoLCI8g.js +0 -1
- package/console-app/assets/eventmodeling-45OFAUF4-DZ7z4YJO.js +0 -1
- package/console-app/assets/flowDiagram-23GEKE2U-rd7-NwZT.js +0 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-DkQZciri.js +0 -1
- package/console-app/assets/railroad-ebnf-EBAXGLYW-CPBeASA9.js +0 -1
- package/console-app/assets/railroad-peg-LSFZ7HO6-CXEVIZ0g.js +0 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-BDgLCrot.js +0 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CZ5rQIcE.js +0 -8
- package/dist/.pikku/schemas/schemas/WorkspaceValidateOutput.schema.json +0 -1
- package/dist/src/functions/commands/workspace-validate.js +0 -9
- package/dist/src/functions/validate/workspace-validate.d.ts +0 -33
- /package/dist/.pikku/schemas/schemas/{WorkspaceValidateInput.schema.json → ValidateInput.schema.json} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.103
|
|
3
3
|
*/
|
|
4
4
|
export { defineVariable } from '@pikku/core/variable';
|
|
5
5
|
export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.103
|
|
3
3
|
*/
|
|
4
4
|
import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
|
|
5
5
|
import variablesMeta from './pikku-variables-meta.gen.json' with { type: 'json' };
|
|
@@ -231,9 +231,15 @@
|
|
|
231
231
|
"AI agent": {
|
|
232
232
|
"nodeId": "AI agent",
|
|
233
233
|
"rpcName": "pikkuAIAgent",
|
|
234
|
-
"next": "
|
|
234
|
+
"next": "AI scorer",
|
|
235
235
|
"stepHash": "b40cd11dc611"
|
|
236
236
|
},
|
|
237
|
+
"AI scorer": {
|
|
238
|
+
"nodeId": "AI scorer",
|
|
239
|
+
"rpcName": "pikkuAIScorer",
|
|
240
|
+
"next": "Public agent scaffold",
|
|
241
|
+
"stepHash": "4671def89706"
|
|
242
|
+
},
|
|
237
243
|
"Public agent scaffold": {
|
|
238
244
|
"nodeId": "Public agent scaffold",
|
|
239
245
|
"rpcName": "pikkuPublicAgent",
|
|
@@ -634,5 +640,5 @@
|
|
|
634
640
|
"entryNodeIds": [
|
|
635
641
|
"Bootstrap inspect"
|
|
636
642
|
],
|
|
637
|
-
"graphHash": "
|
|
643
|
+
"graphHash": "dd727be4816c"
|
|
638
644
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { HttpPersonasConfig
|
|
1
|
+
import type { HttpPersonasConfig } from '@pikku/core/persona';
|
|
2
|
+
import type { ScenarioPersona, ResolvedPersona } from '@pikku/core/services';
|
|
2
3
|
import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js';
|
|
3
4
|
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.gen.d.js';
|
|
4
5
|
export declare const personaConfigs: {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.103
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { template } from '@pikku/core/workflow';
|
|
6
6
|
import { type PikkuWorkflowGraphConfig, type PikkuWorkflowGraphResult } from '@pikku/core/workflow';
|
|
7
|
-
import type { PikkuWorkflowWire,
|
|
7
|
+
import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow';
|
|
8
|
+
import type { PikkuScenarioWire, ScenarioStepOptions } from '@pikku/core/scenario';
|
|
8
9
|
export { WorkflowCancelledException };
|
|
9
10
|
import type { PikkuFunctionSessionless, PikkuFunctionConfig, WiredServices } from '../function/pikku-function-types.gen.js';
|
|
10
11
|
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
@@ -30,10 +31,7 @@ export interface TypedScenarioSteps {
|
|
|
30
31
|
when<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
|
|
31
32
|
then<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
|
|
32
33
|
}
|
|
33
|
-
/**
|
|
34
|
-
* `Out` types `scenario.context` — the scratch the body shares with its
|
|
35
|
-
* `before`/`after` hooks — as a partial of what a completed run produces.
|
|
36
|
-
*/
|
|
34
|
+
/** `Out` types `scenario.context`. */
|
|
37
35
|
export type TypedScenario<Out = unknown> = TypedWorkflow & Omit<PikkuScenarioWire<Out>, keyof PikkuWorkflowWire | keyof TypedScenarioSteps> & TypedScenarioSteps;
|
|
38
36
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
39
37
|
import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js';
|
|
@@ -42,9 +40,9 @@ import { PikkuError } from '@pikku/core/errors';
|
|
|
42
40
|
import type { CorePermissionGroup } from '@pikku/core';
|
|
43
41
|
export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
|
|
44
42
|
/**
|
|
45
|
-
* `Ctx` types `scenario.context
|
|
46
|
-
*
|
|
47
|
-
*
|
|
43
|
+
* `Ctx` types `scenario.context`, defaulting to the body's own output. A hook
|
|
44
|
+
* returns void but shares the scenario's context, so it passes that scenario's
|
|
45
|
+
* output here instead.
|
|
48
46
|
*/
|
|
49
47
|
export type PikkuFunctionScenario<In = unknown, Out = never, Ctx = Out> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors', WiredServices, Ctx>;
|
|
50
48
|
export type PikkuWorkflowConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = {
|
|
@@ -92,10 +90,8 @@ export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 |
|
|
|
92
90
|
* Always runs after the scenario body, in a `finally`, whether it passed or
|
|
93
91
|
* failed. Throwing fails a run that would otherwise have passed; on an
|
|
94
92
|
* already-failed run it attaches as the `cause` and never replaces the
|
|
95
|
-
* original error.
|
|
96
|
-
*
|
|
97
|
-
* Reads `scenario.context` for whatever the body managed to record before it
|
|
98
|
-
* stopped — that is how teardown learns the ids a failed run created.
|
|
93
|
+
* original error. Reads `scenario.context` for whatever the body managed to
|
|
94
|
+
* record before it stopped.
|
|
99
95
|
*/
|
|
100
96
|
after?: PikkuScenarioHook<InputSchema, OutputSchema>;
|
|
101
97
|
/**
|
|
@@ -108,11 +104,8 @@ export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 |
|
|
|
108
104
|
};
|
|
109
105
|
/**
|
|
110
106
|
* A scenario lifecycle hook: the scenario's own `(services, data, wire)`
|
|
111
|
-
* signature with its result discarded.
|
|
112
|
-
*
|
|
113
|
-
* The hook returns void but shares the scenario's `context`, so the output
|
|
114
|
-
* schema types `scenario.context` while the return type stays `void` — a hook
|
|
115
|
-
* is setup and teardown, never a step, and nothing it returns is recorded.
|
|
107
|
+
* signature with its result discarded. `OutputSchema` types
|
|
108
|
+
* `scenario.context` while the return type stays `void`.
|
|
116
109
|
*/
|
|
117
110
|
export type PikkuScenarioHook<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, void, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>;
|
|
118
111
|
/**
|
package/dist/bin/pikku-bin.mjs
CHANGED
|
@@ -11,8 +11,8 @@ async function checkForUpdate() {
|
|
|
11
11
|
})
|
|
12
12
|
if (!res.ok) return
|
|
13
13
|
const { version: latest } = await res.json()
|
|
14
|
-
if (latest !== '0.12.
|
|
15
|
-
process.stderr.write(`\n Update available 0.12.
|
|
14
|
+
if (latest !== '0.12.103') {
|
|
15
|
+
process.stderr.write(`\n Update available 0.12.103 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
|
|
16
16
|
}
|
|
17
17
|
} catch {}
|
|
18
18
|
}
|
package/dist/src/cli.wiring.js
CHANGED
|
@@ -29,7 +29,7 @@ import { scopesPrune } from './functions/commands/scopes-prune.js';
|
|
|
29
29
|
import { rolesAudit } from './functions/commands/roles-audit.js';
|
|
30
30
|
import { rolesPrune } from './functions/commands/roles-prune.js';
|
|
31
31
|
import { pikkuAudit } from './functions/commands/audit.js';
|
|
32
|
-
import {
|
|
32
|
+
import { validate, renderValidate } from './functions/commands/validate.js';
|
|
33
33
|
import { knowledgeValidate, renderKnowledgeValidate, } from './functions/commands/knowledge-validate.js';
|
|
34
34
|
import { knowledgeIndex, renderKnowledgeIndex, } from './functions/commands/knowledge-index.js';
|
|
35
35
|
import { scenarioRun, scenarioList } from './functions/commands/scenario.js';
|
|
@@ -240,6 +240,9 @@ wireCLI({
|
|
|
240
240
|
description: 'Test mode: record service calls for scenario assertions and set PIKKU_TEST_RUN for isTestRun()',
|
|
241
241
|
default: false,
|
|
242
242
|
},
|
|
243
|
+
model: {
|
|
244
|
+
description: 'Repoint model aliases for this run, e.g. \'cheap:openai/gpt-5-nano,tool:anthropic/claude-haiku-4-5\'. Overrides the "models" table in pikku.config.json without editing it',
|
|
245
|
+
},
|
|
243
246
|
},
|
|
244
247
|
}),
|
|
245
248
|
serve: pikkuCLICommand({
|
|
@@ -255,6 +258,9 @@ wireCLI({
|
|
|
255
258
|
description: 'Also serve the Pikku Console same-origin at /console',
|
|
256
259
|
default: false,
|
|
257
260
|
},
|
|
261
|
+
model: {
|
|
262
|
+
description: 'Repoint model aliases for this run, e.g. \'cheap:openai/gpt-5-nano,tool:anthropic/claude-haiku-4-5\'. Overrides the "models" table in pikku.config.json without editing it',
|
|
263
|
+
},
|
|
258
264
|
},
|
|
259
265
|
}),
|
|
260
266
|
login: pikkuCLICommand({
|
|
@@ -427,16 +433,11 @@ wireCLI({
|
|
|
427
433
|
}),
|
|
428
434
|
},
|
|
429
435
|
},
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
render: renderWorkspaceValidate,
|
|
436
|
-
description: 'Check the project structure for Pikku workspace compatibility',
|
|
437
|
-
}),
|
|
438
|
-
},
|
|
439
|
-
},
|
|
436
|
+
validate: pikkuCLICommand({
|
|
437
|
+
func: validate,
|
|
438
|
+
render: renderValidate,
|
|
439
|
+
description: 'Run every check that applies to this project — app structure, and the published file set of any addon it contains',
|
|
440
|
+
}),
|
|
440
441
|
scenario: {
|
|
441
442
|
description: 'Run and inspect scenarios (pikkuScenario)',
|
|
442
443
|
subcommands: {
|
|
@@ -487,6 +488,14 @@ wireCLI({
|
|
|
487
488
|
description: 'Keep every stack frame on a failure. Without it, only the project’s own frames are shown',
|
|
488
489
|
default: false,
|
|
489
490
|
},
|
|
491
|
+
screenshots: {
|
|
492
|
+
description: 'Write the screenshots scenarios ask for to disk, under .pikku/scenario-runs/<run>/<scenario>. Without it `browser.screenshot()` still returns the bytes and nothing is written',
|
|
493
|
+
default: false,
|
|
494
|
+
},
|
|
495
|
+
video: {
|
|
496
|
+
description: 'Record a video per scenario alongside the screenshots (implies --screenshots)',
|
|
497
|
+
default: false,
|
|
498
|
+
},
|
|
490
499
|
apiUrl: {
|
|
491
500
|
description: "Override the environment's apiUrl for this run — for a target that only exists at run time, such as a freshly deployed sandbox",
|
|
492
501
|
},
|
|
@@ -370,6 +370,46 @@ export function analyzeDeployment(state, options) {
|
|
|
370
370
|
allowedHosts: s.allowedHosts,
|
|
371
371
|
read: readSecretIds.has(s.secretId),
|
|
372
372
|
}));
|
|
373
|
+
const unscopedSecretAddons = [];
|
|
374
|
+
const unscopedCredentialAddons = [];
|
|
375
|
+
const grantedSecretAddons = [];
|
|
376
|
+
const grantedCredentialAddons = [];
|
|
377
|
+
// An override's key is a grant too: scoping is checked before the rename, so
|
|
378
|
+
// the key is a name the addon may read that it never declared.
|
|
379
|
+
const grantedNames = (grants, overrides) => [...new Set([...(grants ?? []), ...Object.keys(overrides ?? {})])].sort();
|
|
380
|
+
for (const [namespace, addon] of state.rpc?.wireAddonDeclarations ?? []) {
|
|
381
|
+
if (addon.globalSecrets) {
|
|
382
|
+
unscopedSecretAddons.push({
|
|
383
|
+
namespace,
|
|
384
|
+
package: addon.package,
|
|
385
|
+
reason: addon.globalSecrets,
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
const granted = grantedNames(addon.secretGrants, addon.secretOverrides);
|
|
390
|
+
if (granted.length > 0) {
|
|
391
|
+
grantedSecretAddons.push({ namespace, package: addon.package, granted });
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
if (addon.globalCredentials) {
|
|
395
|
+
unscopedCredentialAddons.push({
|
|
396
|
+
namespace,
|
|
397
|
+
package: addon.package,
|
|
398
|
+
reason: addon.globalCredentials,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
const granted = grantedNames(addon.credentialGrants, addon.credentialOverrides);
|
|
403
|
+
if (granted.length > 0) {
|
|
404
|
+
grantedCredentialAddons.push({
|
|
405
|
+
namespace,
|
|
406
|
+
package: addon.package,
|
|
407
|
+
granted,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
const byNamespace = (a, b) => a.namespace.localeCompare(b.namespace);
|
|
373
413
|
const variables = state.variables.definitions.map((v) => ({
|
|
374
414
|
variableId: v.variableId,
|
|
375
415
|
displayName: v.displayName,
|
|
@@ -387,6 +427,10 @@ export function analyzeDeployment(state, options) {
|
|
|
387
427
|
workflows,
|
|
388
428
|
secrets,
|
|
389
429
|
unresolvedSecretReads: unresolvedSecretReads.sort(),
|
|
430
|
+
unscopedSecretAddons: unscopedSecretAddons.sort(byNamespace),
|
|
431
|
+
unscopedCredentialAddons: unscopedCredentialAddons.sort(byNamespace),
|
|
432
|
+
grantedSecretAddons: grantedSecretAddons.sort(byNamespace),
|
|
433
|
+
grantedCredentialAddons: grantedCredentialAddons.sort(byNamespace),
|
|
390
434
|
variables,
|
|
391
435
|
};
|
|
392
436
|
}
|
|
@@ -108,6 +108,23 @@ export interface SecretDeclaration {
|
|
|
108
108
|
}
|
|
109
109
|
/** Secret reads whose key the inspector could not resolve, as `file:line:source`. */
|
|
110
110
|
export type UnresolvedSecretRead = string;
|
|
111
|
+
/** A `wireAddon` instance the app exempted from secret or credential scoping. */
|
|
112
|
+
export interface UnscopedAddon {
|
|
113
|
+
namespace: string;
|
|
114
|
+
package: string;
|
|
115
|
+
/** The app's stated reason, from `wireAddon({ globalSecrets | globalCredentials })`. */
|
|
116
|
+
reason: string;
|
|
117
|
+
}
|
|
118
|
+
/** A `wireAddon` instance the app lent named secrets or credentials it never declared. */
|
|
119
|
+
export interface GrantedAddon {
|
|
120
|
+
namespace: string;
|
|
121
|
+
package: string;
|
|
122
|
+
/**
|
|
123
|
+
* The names the addon may now read, as the addon reads them — grants and
|
|
124
|
+
* override keys alike, since scoping is checked before an override renames.
|
|
125
|
+
*/
|
|
126
|
+
granted: string[];
|
|
127
|
+
}
|
|
111
128
|
export interface VariableDeclaration {
|
|
112
129
|
variableId: string;
|
|
113
130
|
displayName: string;
|
|
@@ -129,5 +146,25 @@ export interface DeploymentManifest {
|
|
|
129
146
|
* scope to the declared set when this is empty.
|
|
130
147
|
*/
|
|
131
148
|
unresolvedSecretReads: UnresolvedSecretRead[];
|
|
149
|
+
/**
|
|
150
|
+
* Addon instances exempted from secret scoping. Every other addon reads only
|
|
151
|
+
* the secrets it declared, so this is the full list of packages that can
|
|
152
|
+
* reach a secret the app never named for them.
|
|
153
|
+
*/
|
|
154
|
+
unscopedSecretAddons: UnscopedAddon[];
|
|
155
|
+
/**
|
|
156
|
+
* Addon instances exempted from credential scoping. Every other addon reaches
|
|
157
|
+
* only the credentials it declared, and none can enumerate the app's users.
|
|
158
|
+
*/
|
|
159
|
+
unscopedCredentialAddons: UnscopedAddon[];
|
|
160
|
+
/**
|
|
161
|
+
* Addon instances lent named secrets on top of the ones they declared. The
|
|
162
|
+
* other half of the same waiver as `unscopedSecretAddons` — narrower, because
|
|
163
|
+
* the app named the set — so between them a deployment sees every secret an
|
|
164
|
+
* addon can reach that it did not declare for itself.
|
|
165
|
+
*/
|
|
166
|
+
grantedSecretAddons: GrantedAddon[];
|
|
167
|
+
/** Addon instances lent named credentials on top of the ones they declared. */
|
|
168
|
+
grantedCredentialAddons: GrantedAddon[];
|
|
132
169
|
variables: VariableDeclaration[];
|
|
133
170
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { existsSync, createWriteStream } from 'node:fs';
|
|
3
|
-
import { mkdtemp, mkdir, readFile, realpath, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { mkdtemp, mkdir, readFile, realpath, rm, writeFile, } from 'node:fs/promises';
|
|
4
4
|
import { createServer } from 'node:net';
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { join, relative, resolve } from 'node:path';
|
|
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
8
8
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
|
|
11
|
-
import { findProjectRoot, readJsonSafe, } from '../../functions/validate/
|
|
11
|
+
import { findProjectRoot, readJsonSafe, } from '../../functions/validate/validate.js';
|
|
12
12
|
import { headSha, isWorkingTreeClean } from '../lib/git.js';
|
|
13
13
|
import { added, changed, dim, removed } from '../lib/output.js';
|
|
14
14
|
const DEFAULT_YARN_VERSION = 'yarn@4.9.2';
|
|
@@ -52,7 +52,9 @@ function truncateTail(text, maxBytes = DEV_LOG_TAIL_BYTES) {
|
|
|
52
52
|
if (Buffer.byteLength(trimmed, 'utf8') <= maxBytes) {
|
|
53
53
|
return trimmed;
|
|
54
54
|
}
|
|
55
|
-
const slice = Buffer.from(trimmed, 'utf8')
|
|
55
|
+
const slice = Buffer.from(trimmed, 'utf8')
|
|
56
|
+
.subarray(-maxBytes)
|
|
57
|
+
.toString('utf8');
|
|
56
58
|
const newlineIndex = slice.indexOf('\n');
|
|
57
59
|
return newlineIndex === -1 ? slice : slice.slice(newlineIndex + 1);
|
|
58
60
|
}
|
|
@@ -322,7 +324,8 @@ async function startFrontends(args) {
|
|
|
322
324
|
};
|
|
323
325
|
}
|
|
324
326
|
const rewritten = rewriteFrontendCommand(devConfig.command);
|
|
325
|
-
const healthPath = typeof devConfig.healthPath === 'string' &&
|
|
327
|
+
const healthPath = typeof devConfig.healthPath === 'string' &&
|
|
328
|
+
devConfig.healthPath.length > 0
|
|
326
329
|
? devConfig.healthPath
|
|
327
330
|
: '/';
|
|
328
331
|
const normalizedHealthPath = healthPath.startsWith('/')
|
|
@@ -7,6 +7,7 @@ import { pikkuSessionlessFunc } from '../../../.pikku/pikku-types.gen.js';
|
|
|
7
7
|
import { added, changed, removed, dim } from '../lib/output.js';
|
|
8
8
|
import { typeCheckFrontends } from '../lib/frontend-typecheck.js';
|
|
9
9
|
import { readJsonSafe, readTextSafe, runSharedProjectChecks, } from '../../functions/validate/shared-checks.js';
|
|
10
|
+
import { runTypeIdentityChecks } from '../../functions/validate/type-identity-checks.js';
|
|
10
11
|
const FindingSchema = z.object({
|
|
11
12
|
id: z.string(),
|
|
12
13
|
severity: z.enum(['error', 'warn', 'info']),
|
|
@@ -200,7 +201,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
|
|
|
200
201
|
};
|
|
201
202
|
const lines = (...parts) => parts.join('\n');
|
|
202
203
|
// ── everything true of any pikku project ───────────────────────────────
|
|
203
|
-
// Fabric validate is
|
|
204
|
+
// Fabric validate is the app-project check plus the deploy-shaped checks. The
|
|
204
205
|
// two used to be separate walks over the same project that duplicated sixteen
|
|
205
206
|
// findings verbatim, and each carried checks the other lacked for no reason
|
|
206
207
|
// anyone could name.
|
|
@@ -318,6 +319,7 @@ export async function runValidate(startDir = process.cwd(), opts = {}) {
|
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
}
|
|
322
|
+
findings.push(...(await runTypeIdentityChecks(root)));
|
|
321
323
|
// ── scaffold-implied dependencies ──────────────────────────────────────
|
|
322
324
|
// `scaffold.console` makes codegen import
|
|
323
325
|
// `@pikku/addon-console/.pikku/pikku-bootstrap.gen.js` from the generated
|
|
@@ -16,7 +16,7 @@ import { exportSchema } from '../db/local-db.js';
|
|
|
16
16
|
export const dbExport = pikkuSessionlessFunc({
|
|
17
17
|
remote: true,
|
|
18
18
|
func: async ({ logger, config }) => {
|
|
19
|
-
const artifact = await exportSchema(config.rootDir);
|
|
19
|
+
const artifact = await exportSchema(config.rootDir, config.db?.pgliteExtensions);
|
|
20
20
|
const dialects = Object.keys(artifact);
|
|
21
21
|
if (dialects.length === 0) {
|
|
22
22
|
logger.info('db export: no db/sqlite or db/postgres migrations — nothing to publish');
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
export interface UserConfigShape {
|
|
2
2
|
sqliteDb?: string;
|
|
3
3
|
postgresUrl?: string;
|
|
4
|
-
/**
|
|
5
|
-
* Postgres extensions the CLI's embedded PGlite databases must load — the
|
|
6
|
-
* local dev database, and the shadow one every `db` command migrates to type
|
|
7
|
-
* and diff a schema.
|
|
8
|
-
*
|
|
9
|
-
* A bare name is one of PGlite's bundled contrib extensions (`hstore`,
|
|
10
|
-
* `citext`, `uuid_ossp`, …) and needs nothing installed. Anything else is a
|
|
11
|
-
* package the project depends on, such as `@electric-sql/pglite-pgvector`.
|
|
12
|
-
*
|
|
13
|
-
* Needed even when `postgresUrl` points at a server that already has the
|
|
14
|
-
* extension: the shadow database is PGlite regardless, so a `CREATE EXTENSION`
|
|
15
|
-
* in a migration fails there unless it is declared here.
|
|
16
|
-
*/
|
|
17
|
-
pgliteExtensions?: string[];
|
|
18
4
|
[key: string]: unknown;
|
|
19
5
|
}
|
|
20
6
|
interface LoadOptions {
|
|
@@ -4,16 +4,19 @@ export declare const dev: import("#pikku").PikkuFunctionConfig<{
|
|
|
4
4
|
hmr?: boolean;
|
|
5
5
|
coverage?: boolean;
|
|
6
6
|
test?: boolean;
|
|
7
|
+
model?: string;
|
|
7
8
|
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
8
9
|
port?: string;
|
|
9
10
|
watch?: boolean;
|
|
10
11
|
hmr?: boolean;
|
|
11
12
|
coverage?: boolean;
|
|
12
13
|
test?: boolean;
|
|
14
|
+
model?: string;
|
|
13
15
|
}, void, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
14
16
|
port?: string;
|
|
15
17
|
watch?: boolean;
|
|
16
18
|
hmr?: boolean;
|
|
17
19
|
coverage?: boolean;
|
|
18
20
|
test?: boolean;
|
|
21
|
+
model?: string;
|
|
19
22
|
}, void, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { join, resolve } from 'path';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
3
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
3
4
|
import chokidar from 'chokidar';
|
|
4
5
|
import { pikkuDevReloader, reloadGeneratedMeta, reconcileAddonRegistry, } from '@pikku/core/dev';
|
|
@@ -6,6 +7,7 @@ import { ConsoleLogger, LocalEmailService, spy, InMemoryQueueService, InMemoryWo
|
|
|
6
7
|
import { KyselyAIStorageService, KyselyAIRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
|
|
7
8
|
import { stopSingletonServices } from '@pikku/core';
|
|
8
9
|
import { pikkuState } from '@pikku/core/ecosystem';
|
|
10
|
+
import { wireAIScorerQueueWorkers } from '@pikku/core/ai-scorer';
|
|
9
11
|
import { LocalMetaService } from '@pikku/core/services/local-meta';
|
|
10
12
|
import { LocalContent, } from '@pikku/core/services/local-content';
|
|
11
13
|
import { InMemorySchedulerService } from '@pikku/schedule';
|
|
@@ -18,10 +20,12 @@ import { resolveConsoleMount } from './serve-console.js';
|
|
|
18
20
|
import { serverReadyLine } from '../../server/server-ready.js';
|
|
19
21
|
import { createEphemeralContentSigningJWT } from '../../server/content-signing-jwt.js';
|
|
20
22
|
import { resolveScaffoldFeature } from '../../utils/resolve-scaffold-feature.js';
|
|
23
|
+
import { applyModelAliasOverride } from '../../utils/model-alias-override.js';
|
|
21
24
|
export const dev = pikkuSessionlessFunc({
|
|
22
25
|
remote: true,
|
|
23
|
-
func: async ({ logger, config, getInspectorState, invalidateInspectorState, variables, devServerRunner, }, { port, watch, hmr, coverage, test }, { rpc }) => {
|
|
26
|
+
func: async ({ logger, config, getInspectorState, invalidateInspectorState, variables, devServerRunner, }, { port, watch, hmr, coverage, test, model }, { rpc }) => {
|
|
24
27
|
process.env.PIKKU_DEV_QUICK_LOGIN ??= 'true';
|
|
28
|
+
applyModelAliasOverride(logger, model, config.models);
|
|
25
29
|
if (test) {
|
|
26
30
|
process.env.PIKKU_TEST_RUN = 'true';
|
|
27
31
|
}
|
|
@@ -230,6 +234,7 @@ export const dev = pikkuSessionlessFunc({
|
|
|
230
234
|
};
|
|
231
235
|
pikkuState(null, 'package', 'singletonServices', resolvedServices);
|
|
232
236
|
resolvedServices.workflowService?.wireQueueWorkers?.();
|
|
237
|
+
wireAIScorerQueueWorkers();
|
|
233
238
|
const { serverLifecycleFactory } = inspectorState.filesAndMethods;
|
|
234
239
|
const loadLifecycle = async () => {
|
|
235
240
|
if (!serverLifecycleFactory)
|
|
@@ -238,13 +243,46 @@ export const dev = pikkuSessionlessFunc({
|
|
|
238
243
|
return m[serverLifecycleFactory.variable];
|
|
239
244
|
};
|
|
240
245
|
const consoleMount = await resolveConsoleMount();
|
|
246
|
+
/**
|
|
247
|
+
* Hand the server the generated MCP manifest so it actually serves MCP.
|
|
248
|
+
*
|
|
249
|
+
* Codegen reports "N MCP endpoints" and both transports mount them at
|
|
250
|
+
* `mcpPath` — but only when given `mcpJson`, and dev never passed it.
|
|
251
|
+
*
|
|
252
|
+
* It goes in the runner *options*, not in the config: the transport reads it
|
|
253
|
+
* off its third argument, and the runners forward a hand-picked list of
|
|
254
|
+
* fields. Putting it in `config` type-checks and is discarded in silence.
|
|
255
|
+
* So every pikku app announced an MCP surface at startup and served a 404,
|
|
256
|
+
* and the only way to exercise a tool was to deploy. `deploy-apply` even
|
|
257
|
+
* carries a comment saying the deployed bundle should match "the dev server"
|
|
258
|
+
* — which had never served it either.
|
|
259
|
+
*
|
|
260
|
+
* Absent or unparseable is not an error: an app with no MCP wirings has no
|
|
261
|
+
* manifest, and that is the common case.
|
|
262
|
+
*/
|
|
263
|
+
const mcpJson = await (async () => {
|
|
264
|
+
const file = join(pikkuDir, 'mcp', 'mcp.gen.json');
|
|
265
|
+
if (!existsSync(file))
|
|
266
|
+
return undefined;
|
|
267
|
+
try {
|
|
268
|
+
const parsed = JSON.parse(readFileSync(file, 'utf-8'));
|
|
269
|
+
const count = (parsed.tools?.length ?? 0) +
|
|
270
|
+
(parsed.resources?.length ?? 0) +
|
|
271
|
+
(parsed.prompts?.length ?? 0);
|
|
272
|
+
return count > 0 ? parsed : undefined;
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
logger.warn(`[pikku] could not parse ${file} — MCP will not be served: ${err instanceof Error ? err.message : String(err)}`);
|
|
276
|
+
return undefined;
|
|
277
|
+
}
|
|
278
|
+
})();
|
|
241
279
|
const pikkuServer = devServerRunner.createServer({
|
|
242
280
|
...userConfig,
|
|
243
281
|
hostname: bindHostname,
|
|
244
282
|
port: resolvedPort,
|
|
245
283
|
content: localContentConfig,
|
|
246
284
|
...(consoleMount ? { staticMounts: [consoleMount] } : {}),
|
|
247
|
-
}, logger, { contentSigningJWT });
|
|
285
|
+
}, logger, { contentSigningJWT, mcpJson });
|
|
248
286
|
const lifecycle = await loadLifecycle();
|
|
249
287
|
await pikkuServer.init();
|
|
250
288
|
await lifecycle?.beforeStart?.(resolvedServices);
|
|
@@ -296,6 +334,7 @@ export const dev = pikkuSessionlessFunc({
|
|
|
296
334
|
invalidateInspectorState();
|
|
297
335
|
await runAllWithCommandState();
|
|
298
336
|
workflowService.wireQueueWorkers();
|
|
337
|
+
wireAIScorerQueueWorkers();
|
|
299
338
|
// Pull the regenerated meta + JSON schemas into the running
|
|
300
339
|
// process so new/changed functions are callable without a
|
|
301
340
|
// restart (the hot-reloader registers their implementations).
|
|
@@ -6,7 +6,7 @@ export declare const knowledgeIndex: import("#pikku").PikkuFunctionConfig<{
|
|
|
6
6
|
check: boolean;
|
|
7
7
|
files: {
|
|
8
8
|
path: string;
|
|
9
|
-
action: "
|
|
9
|
+
action: "created" | "updated" | "unchanged";
|
|
10
10
|
}[];
|
|
11
11
|
}, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
12
12
|
check?: boolean | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const knowledgeIndex: import("#pikku").PikkuFunctionConfig<{
|
|
|
15
15
|
check: boolean;
|
|
16
16
|
files: {
|
|
17
17
|
path: string;
|
|
18
|
-
action: "
|
|
18
|
+
action: "created" | "updated" | "unchanged";
|
|
19
19
|
}[];
|
|
20
20
|
}, "rpc" | "session", import("#pikku").WiredServices, unknown> | import("#pikku").PikkuFunction<{
|
|
21
21
|
check?: boolean | undefined;
|
|
@@ -24,7 +24,7 @@ export declare const knowledgeIndex: import("#pikku").PikkuFunctionConfig<{
|
|
|
24
24
|
check: boolean;
|
|
25
25
|
files: {
|
|
26
26
|
path: string;
|
|
27
|
-
action: "
|
|
27
|
+
action: "created" | "updated" | "unchanged";
|
|
28
28
|
}[];
|
|
29
29
|
}, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
|
|
30
30
|
export { renderKnowledgeIndex };
|
|
@@ -134,9 +134,12 @@ export function getAddonFiles(vars, flags) {
|
|
|
134
134
|
name: `@pikku/addon-${name}`,
|
|
135
135
|
version: '0.0.1',
|
|
136
136
|
type: 'module',
|
|
137
|
+
// Everything an installed package reaches for lives under dist. The
|
|
138
|
+
// addon's own build resolves #pikku through tsconfig `paths` instead, so
|
|
139
|
+
// these never have to point at the source tree.
|
|
137
140
|
imports: {
|
|
138
|
-
'#pikku': '
|
|
139
|
-
'#pikku/*': '
|
|
141
|
+
'#pikku': './dist/.pikku/pikku-types.gen.js',
|
|
142
|
+
'#pikku/*': './dist/.pikku/*',
|
|
140
143
|
},
|
|
141
144
|
exports: {
|
|
142
145
|
'.': {
|
|
@@ -153,7 +156,7 @@ export function getAddonFiles(vars, flags) {
|
|
|
153
156
|
scripts: {
|
|
154
157
|
prepublishOnly: 'yarn build',
|
|
155
158
|
prebuild: 'pikku all',
|
|
156
|
-
build: 'tsc && cp -r .pikku dist/',
|
|
159
|
+
build: 'tsc && cp -r .pikku types dist/',
|
|
157
160
|
pikku: 'pikku all',
|
|
158
161
|
},
|
|
159
162
|
peerDependencies: {
|