@pikku/cli 0.12.104 → 0.12.105
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-DTI8lQi3.js → abnfDiagram-VRR7QNED-QRjCVsso.js} +1 -1
- package/console-app/assets/{arc-B_XK0Xbk.js → arc-CloGjkHW.js} +1 -1
- package/console-app/assets/architecture-TIHT7OUA-Cz78Qi5H.js +1 -0
- package/console-app/assets/{architectureDiagram-ZJ3FMSHR-CzE1T938.js → architectureDiagram-ZJ3FMSHR-Dl10fVqw.js} +1 -1
- package/console-app/assets/{blockDiagram-677ZJIJ3-CcSxyQZH.js → blockDiagram-677ZJIJ3-CMNoQhwm.js} +1 -1
- package/console-app/assets/{c4Diagram-LMCZKHZV-DSsAqAm5.js → c4Diagram-LMCZKHZV-C2pWYCa6.js} +1 -1
- package/console-app/assets/channel-Bm4o-pNB.js +1 -0
- package/console-app/assets/{chunk-32BRIVSS-Atv4wjmh.js → chunk-32BRIVSS-DC3ZGIPN.js} +1 -1
- package/console-app/assets/{chunk-52WLFC77-DkXgWHeH.js → chunk-52WLFC77-DuAheIlc.js} +1 -1
- package/console-app/assets/{chunk-C7G6YPKG-DhtQv4yx.js → chunk-C7G6YPKG-BVtRZIEZ.js} +1 -1
- package/console-app/assets/{chunk-EX3LRPZG-0GIQyrn1.js → chunk-EX3LRPZG-CWXF7N33.js} +1 -1
- package/console-app/assets/{chunk-FWX5IMBZ-DZvpxO7-.js → chunk-FWX5IMBZ-UN3i5qMG.js} +2 -2
- package/console-app/assets/{chunk-HOUHSVGY-CyU0q_QM.js → chunk-HOUHSVGY-DMorD8Ib.js} +1 -1
- package/console-app/assets/{chunk-ICXQ74PX-CzAIiCX5.js → chunk-ICXQ74PX-BiuzWyj2.js} +1 -1
- package/console-app/assets/{chunk-MOJQB5TN-DUKLkDFX.js → chunk-MOJQB5TN-6BhXmDyj.js} +1 -1
- package/console-app/assets/{chunk-OGEWGWER-DhmfsQT_.js → chunk-OGEWGWER-BNi3Gsmc.js} +1 -1
- package/console-app/assets/{chunk-PUDLZKDR-BMAILUQ6.js → chunk-PUDLZKDR-DNWGCeoL.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-Cpak96ZI.js → chunk-Q4XR5HBZ-i4zkt4cc.js} +1 -1
- package/console-app/assets/{chunk-RYQCIY6F-9OVlGtkS.js → chunk-RYQCIY6F-DvRUzuDz.js} +1 -1
- package/console-app/assets/{chunk-V7JOEXUC-BfBH_WMn.js → chunk-V7JOEXUC-JMjbqEgu.js} +1 -1
- package/console-app/assets/chunk-VAUOI2AC-D4_whP-t.js +1 -0
- package/console-app/assets/{chunk-VR4S4FIN-q02O9Hva.js → chunk-VR4S4FIN-BcHHugM0.js} +1 -1
- package/console-app/assets/{chunk-WYO6CB5R-cQuwndtk.js → chunk-WYO6CB5R-COKjEQwP.js} +1 -1
- package/console-app/assets/chunk-XXDRQBXY-mkAF2YHU.js +1 -0
- package/console-app/assets/{chunk-ZGVPDNZ5-2b6-Ub1z.js → chunk-ZGVPDNZ5-CENGdlFJ.js} +1 -1
- package/console-app/assets/classDiagram-OUVF2IWQ-B2cEvfK0.js +1 -0
- package/console-app/assets/classDiagram-v2-EOCWNBFH-B2cEvfK0.js +1 -0
- package/console-app/assets/{cose-bilkent-JH36ORCC-D8cALtKZ.js → cose-bilkent-JH36ORCC-D6F1MghO.js} +1 -1
- package/console-app/assets/{cynefin-VYW2F7L2-BphwdLzc.js → cynefin-VYW2F7L2-BIhff1Ln.js} +1 -1
- package/console-app/assets/{cynefinDiagram-TSTJHNR4-7Rk31pXX.js → cynefinDiagram-TSTJHNR4-DrlBq_QP.js} +1 -1
- package/console-app/assets/{dagre-VKFMJZFB-e8-5QJxJ.js → dagre-VKFMJZFB-Cm2eP0ez.js} +1 -1
- package/console-app/assets/{diagram-FQU43EPY-SGSSyx5P.js → diagram-FQU43EPY-C667dC19.js} +1 -1
- package/console-app/assets/{diagram-G47NLZAW-F_m68BCv.js → diagram-G47NLZAW-3K3OPEuG.js} +1 -1
- package/console-app/assets/{diagram-NH7WQ7WH-5p6A3YHp.js → diagram-NH7WQ7WH-CUK-d5iT.js} +1 -1
- package/console-app/assets/{diagram-OA4YK3LP-Dv-j07Wh.js → diagram-OA4YK3LP-BmjCoGBZ.js} +1 -1
- package/console-app/assets/{diagram-WEI45ONY-1gqT-Dqp.js → diagram-WEI45ONY-D33qA2d9.js} +1 -1
- package/console-app/assets/{dist-DQ3gF-0S.js → dist-jqlCD26w.js} +1 -1
- package/console-app/assets/{ebnfDiagram-CCIWWBDH-Dsfd8DxK.js → ebnfDiagram-CCIWWBDH-DUHkt7z6.js} +1 -1
- package/console-app/assets/{erDiagram-Q63AITRT-DQ5Gu1Tw.js → erDiagram-Q63AITRT-BAtdfbq3.js} +1 -1
- package/console-app/assets/eventmodeling-45OFAUF4-iK6rmyk3.js +1 -0
- package/console-app/assets/flowDiagram-23GEKE2U-CSYhKO9Y.js +1 -0
- package/console-app/assets/{ganttDiagram-NO4QXBWP-2of9JObw.js → ganttDiagram-NO4QXBWP-64_vh9rj.js} +1 -1
- package/console-app/assets/{gitGraph-TEB2WS4Q-q2ow8moS.js → gitGraph-TEB2WS4Q-DlFJY0cQ.js} +1 -1
- package/console-app/assets/{gitGraphDiagram-IHSO6WYX-7JFgdH2Q.js → gitGraphDiagram-IHSO6WYX-D9fpmYRm.js} +1 -1
- package/console-app/assets/{index-FDk51Irw.js → index-Byf4wkdP.js} +156 -150
- package/console-app/assets/{info-DKCQHKI2-DA35x9Eq.js → info-DKCQHKI2-DhyT_-b1.js} +1 -1
- package/console-app/assets/{infoDiagram-FWYZ7A6U-wBw6slQd.js → infoDiagram-FWYZ7A6U-ufTemVSR.js} +1 -1
- package/console-app/assets/{ishikawaDiagram-FXEZZL3T-XjQC7Fmw.js → ishikawaDiagram-FXEZZL3T-CWHvEncb.js} +1 -1
- package/console-app/assets/{journeyDiagram-5HDEW3XC-DyIcpJQM.js → journeyDiagram-5HDEW3XC-DKH8UvEq.js} +1 -1
- package/console-app/assets/{kanban-definition-HUTT4EX6-B1zYF1dv.js → kanban-definition-HUTT4EX6-BODtp_fB.js} +1 -1
- package/console-app/assets/{line-C6UySSzG.js → line-Do9j3HRL.js} +1 -1
- package/console-app/assets/{linear-B-Zu24zW.js → linear-5Z8stnH-.js} +1 -1
- package/console-app/assets/{mermaid-parser.core-Tfk1Eudy.js → mermaid-parser.core-CYJsdwMO.js} +3 -3
- package/console-app/assets/{mermaid.core-HtlOIxsD.js → mermaid.core-DwI4IdKs.js} +3 -3
- package/console-app/assets/{mindmap-definition-LN4V7U3C-5tBdCFVy.js → mindmap-definition-LN4V7U3C-D7IWNYnf.js} +1 -1
- package/console-app/assets/{packet-7NZHBO7P-CvZpWSge.js → packet-7NZHBO7P-comMLvz_.js} +1 -1
- package/console-app/assets/{pegDiagram-2B236MQR-Bw6WA3kx.js → pegDiagram-2B236MQR-CbqiI_m5.js} +1 -1
- package/console-app/assets/{pie-RZYD4A2V-cW9hD9gn.js → pie-RZYD4A2V-VZXoX73g.js} +1 -1
- package/console-app/assets/{pieDiagram-ENE6RG2P-DkD_01Ea.js → pieDiagram-ENE6RG2P-SA-sCnrt.js} +1 -1
- package/console-app/assets/{quadrantDiagram-ABIIQ3AL-Bwdtm5-W.js → quadrantDiagram-ABIIQ3AL-CI840rae.js} +1 -1
- package/console-app/assets/{radar-I7S5WNFK-tOWig5fu.js → radar-I7S5WNFK-W0UH9BdP.js} +1 -1
- package/console-app/assets/{railroad-3IZDKUUU-tZ2PcrQC.js → railroad-3IZDKUUU-_HEtbruA.js} +1 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-ghLnUEfg.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-D8JHCZD5.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-C9eC4l2D.js +1 -0
- package/console-app/assets/{railroadDiagram-RFXS5EU6-Dljzejc8.js → railroadDiagram-RFXS5EU6-Cm2SfP9Z.js} +1 -1
- package/console-app/assets/{requirementDiagram-TGXJPOKE-CRV748Vu.js → requirementDiagram-TGXJPOKE-CyHrMdrC.js} +1 -1
- package/console-app/assets/{sankeyDiagram-HTMAVEWB-CrFvfCvp.js → sankeyDiagram-HTMAVEWB-DL0eJ1aK.js} +1 -1
- package/console-app/assets/{sequenceDiagram-DBY2YBRQ-CXysYi1c.js → sequenceDiagram-DBY2YBRQ-B2AvEvXu.js} +1 -1
- package/console-app/assets/{src-Bilm7g2t.js → src-72nNqhBu.js} +1 -1
- package/console-app/assets/{stateDiagram-2N3HPSRC-C8aGjwyh.js → stateDiagram-2N3HPSRC-vgyc-CMC.js} +1 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-B2WCkCZh.js +1 -0
- package/console-app/assets/{swimlanes-5IMT3BWC-VaTW8Eyb.js → swimlanes-5IMT3BWC-GiOMMhZh.js} +1 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CkCbtoLb.js +8 -0
- package/console-app/assets/{timeline-definition-FHXFAJF6-D88F4W4L.js → timeline-definition-FHXFAJF6-DTJQsTn8.js} +1 -1
- package/console-app/assets/{treeView-QDETBFTQ-hN0LxmWJ.js → treeView-QDETBFTQ-aizmbgl7.js} +1 -1
- package/console-app/assets/{treemap-6X3UGDF4-Cz4whnzW.js → treemap-6X3UGDF4-DIBl6bfV.js} +1 -1
- package/console-app/assets/{vennDiagram-L72KCM5P-CoW2kun8.js → vennDiagram-L72KCM5P-C4Ngu7VX.js} +1 -1
- package/console-app/assets/{wardley-OPB4EBWU-l9vWUHbB.js → wardley-OPB4EBWU-BqdXyJTm.js} +1 -1
- package/console-app/assets/{wardleyDiagram-EHGQE667-uWxnqqVK.js → wardleyDiagram-EHGQE667-Cw2M8s0p.js} +1 -1
- package/console-app/assets/{xychartDiagram-FW5EYKEG-ClVawwGR.js → xychartDiagram-FW5EYKEG-BxMLZdbF.js} +1 -1
- package/console-app/index.html +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +12 -12
- package/dist/.pikku/agent/pikku-agent-types.gen.js +6 -6
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +4 -4
- package/dist/.pikku/channel/pikku-channel-types.gen.js +3 -2
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +13 -3
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +2 -2
- package/dist/.pikku/cli/pikku-cli-client.gen.js +2 -2
- 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 +2 -2
- 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 +48 -4
- 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 +2 -2
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +9 -7
- package/dist/.pikku/function/pikku-function-types.gen.js +5 -4
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +95 -52
- package/dist/.pikku/function/pikku-functions.gen.js +8 -8
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +3 -3
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +4 -3
- 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 +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/pikku-queue-types.gen.d.ts +2 -2
- 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 +5 -3
- 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 +2 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +8 -6
- package/dist/.pikku/schemas/schemas/PikkuSemverOutput.schema.json +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +2 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +2 -2
- package/dist/.pikku/scopes/pikku-roles.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +5 -5
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +3 -3
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +2 -2
- package/dist/.pikku/scopes/pikku-scopes.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +3 -2
- 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 +3 -3
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +3 -3
- package/dist/.pikku/variables/pikku-variables.gen.js +2 -2
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +9 -9
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +3 -2
- package/dist/.pikku/workflow/pikku-personas.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +6 -6
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +3 -3
- 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 +50 -4
- package/dist/src/deploy/analyzer/analyzer.js +5 -5
- package/dist/src/deploy/bundler/bundler.js +2 -2
- package/dist/src/functions/commands/audit.js +33 -9
- package/dist/src/functions/commands/bootstrap.js +1 -1
- package/dist/src/functions/commands/{dev-ai-runner.d.ts → dev-agent-runner.d.ts} +3 -3
- package/dist/src/functions/commands/{dev-ai-runner.js → dev-agent-runner.js} +4 -4
- package/dist/src/functions/commands/dev.js +29 -23
- package/dist/src/functions/commands/persona-sync.js +2 -2
- package/dist/src/functions/commands/persona.js +7 -6
- package/dist/src/functions/commands/roles-shared.d.ts +1 -1
- package/dist/src/functions/commands/roles-shared.js +1 -1
- package/dist/src/functions/commands/scenario-browser.d.ts +2 -2
- package/dist/src/functions/commands/scenario-formatter.d.ts +1 -1
- package/dist/src/functions/commands/scenario-ladder.d.ts +4 -3
- package/dist/src/functions/commands/scenario-ladder.js +1 -1
- package/dist/src/functions/commands/scenario-plan.d.ts +2 -2
- package/dist/src/functions/commands/scenario-plan.js +1 -1
- package/dist/src/functions/commands/scenario.d.ts +0 -3
- package/dist/src/functions/commands/scenario.js +40 -38
- package/dist/src/functions/commands/scopes-shared.d.ts +1 -1
- package/dist/src/functions/commands/scopes-shared.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.js +20 -19
- package/dist/src/functions/commands/start-coverage.d.ts +1 -1
- package/dist/src/functions/commands/start-coverage.js +2 -2
- 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/virtual-user-formatter.d.ts +1 -1
- package/dist/src/functions/validate/scenario-file-checks.js +1 -1
- package/dist/src/functions/validate/validate-registry.js +10 -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} +3 -3
- 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} +5 -5
- 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} +21 -32
- package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.js +1 -1
- 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} +5 -5
- package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.js +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +4 -3
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +2 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +3 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +2 -1
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.js +1 -1
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/serialize-credentials-types.js +4 -3
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +2 -1
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +11 -12
- package/dist/src/functions/wirings/gateway/serialize-gateway-meta.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/serialize-http-types.js +3 -2
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +1 -1
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +3 -11
- package/dist/src/functions/wirings/package/serialize-package-types.js +7 -6
- 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 +6 -2
- package/dist/src/functions/wirings/queue/serialize-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +2 -1
- package/dist/src/functions/wirings/roles/pikku-command-roles.js +1 -1
- package/dist/src/functions/wirings/roles/serialize-roles-types.d.ts +1 -1
- package/dist/src/functions/wirings/roles/serialize-roles-types.js +2 -2
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +5 -5
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -2
- 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-feature-meta.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/serialize-scenario-meta.js +2 -2
- package/dist/src/functions/wirings/scenarios/serialize-scenario-registration.js +1 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +2 -1
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.js +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +3 -3
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.js +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.js +4 -3
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
- package/dist/src/functions/wirings/triggers/serialize-trigger-types.js +3 -2
- package/dist/src/functions/wirings/variables/pikku-command-variables.js +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.d.ts +1 -1
- package/dist/src/functions/wirings/variables/serialize-variables-types.js +3 -3
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +7 -13
- package/dist/src/functions/wirings/webhook/serialize-webhook.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-personas.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-personas.js +4 -3
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +6 -9
- package/dist/src/functions/workflows/all.workflow.js +6 -5
- package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
- package/dist/src/server/node-server-runner.js +5 -2
- package/dist/src/services/cli-logger.service.js +1 -1
- package/dist/src/utils/precise-coverage-map.d.ts +1 -1
- package/dist/src/utils/remove-legacy-scaffold-file.d.ts +14 -0
- package/dist/src/utils/remove-legacy-scaffold-file.js +28 -1
- package/dist/src/utils/resolve-personas.d.ts +3 -3
- package/dist/src/utils/resolve-personas.js +2 -2
- package/dist/src/utils/schema-diff.d.ts +22 -0
- package/dist/src/utils/schema-diff.js +190 -0
- package/dist/src/utils/serialize-schemas.d.ts +1 -1
- package/dist/src/utils/serialize-schemas.js +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/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -17
- package/console-app/assets/architecture-TIHT7OUA-BtQ4ypaP.js +0 -1
- package/console-app/assets/channel-yWsB39zH.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-DbUlDq35.js +0 -1
- package/console-app/assets/chunk-XXDRQBXY-D0yYTMY0.js +0 -1
- 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/eventmodeling-45OFAUF4-BSTAXikh.js +0 -1
- package/console-app/assets/flowDiagram-23GEKE2U-zX29jtvN.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/stateDiagram-v2-6OUMAXLB-C21qKRsf.js +0 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CCQS8jgU.js +0 -8
- 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/serialize-ai-agent-types.d.ts +0 -1
- package/dist/src/functions/wirings/ai-scorer/pikku-command-ai-scorer.d.ts +0 -1
- /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/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.d.ts +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/pikku-command-public-agent.js +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-agent → agent}/serialize-model-aliases.js +0 -0
- /package/dist/src/functions/wirings/{ai-agent → agent}/serialize-public-agent.d.ts +0 -0
- /package/dist/src/functions/wirings/{ai-scorer → agent-scorer}/serialize-scorer-names.js +0 -0
|
@@ -48,7 +48,9 @@ function runBun(args, cwd) {
|
|
|
48
48
|
}
|
|
49
49
|
function normaliseSeverity(sev) {
|
|
50
50
|
const s = String(sev ?? '').toLowerCase();
|
|
51
|
-
return SEVERITY_ORDER.includes(s)
|
|
51
|
+
return SEVERITY_ORDER.includes(s)
|
|
52
|
+
? s
|
|
53
|
+
: 'info';
|
|
52
54
|
}
|
|
53
55
|
// bun audit --json → { "<pkg>": [ { id, url, title, severity, vulnerable_versions, cwe[], cvss:{score} } ] }
|
|
54
56
|
function parseBunAudit(raw) {
|
|
@@ -61,7 +63,9 @@ function parseBunAudit(raw) {
|
|
|
61
63
|
catch {
|
|
62
64
|
return issues;
|
|
63
65
|
}
|
|
64
|
-
const map = obj && typeof obj.advisories === 'object' && obj.advisories
|
|
66
|
+
const map = obj && typeof obj.advisories === 'object' && obj.advisories
|
|
67
|
+
? obj.advisories
|
|
68
|
+
: obj;
|
|
65
69
|
if (!map || typeof map !== 'object')
|
|
66
70
|
return issues;
|
|
67
71
|
for (const [pkg, list] of Object.entries(map)) {
|
|
@@ -77,7 +81,9 @@ function parseBunAudit(raw) {
|
|
|
77
81
|
url: a.url || a.advisory || '',
|
|
78
82
|
vulnerableVersions: a.vulnerable_versions || a.vulnerableVersions || '',
|
|
79
83
|
cwe: Array.isArray(a.cwe) ? a.cwe : a.cwe ? [String(a.cwe)] : [],
|
|
80
|
-
cvssScore: a.cvss && typeof a.cvss.score === 'number' && a.cvss.score > 0
|
|
84
|
+
cvssScore: a.cvss && typeof a.cvss.score === 'number' && a.cvss.score > 0
|
|
85
|
+
? a.cvss.score
|
|
86
|
+
: null,
|
|
81
87
|
recommendedVersion: null,
|
|
82
88
|
});
|
|
83
89
|
}
|
|
@@ -85,8 +91,14 @@ function parseBunAudit(raw) {
|
|
|
85
91
|
return issues;
|
|
86
92
|
}
|
|
87
93
|
function semverLevel(current, latest) {
|
|
88
|
-
const c = String(current)
|
|
89
|
-
|
|
94
|
+
const c = String(current)
|
|
95
|
+
.replace(/^[^\d]*/, '')
|
|
96
|
+
.split('.')
|
|
97
|
+
.map((n) => parseInt(n, 10));
|
|
98
|
+
const l = String(latest)
|
|
99
|
+
.replace(/^[^\d]*/, '')
|
|
100
|
+
.split('.')
|
|
101
|
+
.map((n) => parseInt(n, 10));
|
|
90
102
|
if (Number.isNaN(c[0]) || Number.isNaN(l[0]))
|
|
91
103
|
return 'unknown';
|
|
92
104
|
if (l[0] > c[0])
|
|
@@ -104,7 +116,10 @@ function parseBunOutdated(raw) {
|
|
|
104
116
|
for (const line of stripAnsi(raw).split('\n')) {
|
|
105
117
|
if (!line.includes('|'))
|
|
106
118
|
continue;
|
|
107
|
-
const cells = line
|
|
119
|
+
const cells = line
|
|
120
|
+
.split('|')
|
|
121
|
+
.map((c) => c.trim())
|
|
122
|
+
.filter((c) => c.length > 0);
|
|
108
123
|
if (cells.length !== 4)
|
|
109
124
|
continue;
|
|
110
125
|
const [pkg, current, , latest] = cells;
|
|
@@ -115,7 +130,12 @@ function parseBunOutdated(raw) {
|
|
|
115
130
|
if (seen.has(pkg))
|
|
116
131
|
continue;
|
|
117
132
|
seen.add(pkg);
|
|
118
|
-
updates.push({
|
|
133
|
+
updates.push({
|
|
134
|
+
package: pkg,
|
|
135
|
+
current,
|
|
136
|
+
latest,
|
|
137
|
+
level: semverLevel(current, latest),
|
|
138
|
+
});
|
|
119
139
|
}
|
|
120
140
|
return updates;
|
|
121
141
|
}
|
|
@@ -150,7 +170,9 @@ export const pikkuAudit = pikkuSessionlessFunc({
|
|
|
150
170
|
if (pm === 'bun') {
|
|
151
171
|
try {
|
|
152
172
|
const issues = parseBunAudit(runBun(['audit', '--json'], root));
|
|
153
|
-
const updates = includeOutdated
|
|
173
|
+
const updates = includeOutdated
|
|
174
|
+
? parseBunOutdated(runBun(['outdated'], root))
|
|
175
|
+
: [];
|
|
154
176
|
const latestByPkg = new Map(updates.map((u) => [u.package, u.latest]));
|
|
155
177
|
for (const i of issues)
|
|
156
178
|
i.recommendedVersion = latestByPkg.get(i.package) ?? null;
|
|
@@ -175,7 +197,9 @@ export const pikkuAudit = pikkuSessionlessFunc({
|
|
|
175
197
|
else {
|
|
176
198
|
logger.info(`pikku audit — ${summary.totalIssues} advisory(ies)` +
|
|
177
199
|
` (${summary.critical} critical, ${summary.high} high, ${summary.moderate} moderate, ${summary.low} low)` +
|
|
178
|
-
(includeOutdated
|
|
200
|
+
(includeOutdated
|
|
201
|
+
? `, ${summary.totalUpdates} available update(s)`
|
|
202
|
+
: ''));
|
|
179
203
|
}
|
|
180
204
|
logger.info(` → ${outFile}`);
|
|
181
205
|
},
|
|
@@ -20,7 +20,7 @@ export const bootstrap = pikkuVoidFunc({
|
|
|
20
20
|
await rpc.invoke('pikkuWorkflow', { bootstrap: true });
|
|
21
21
|
await rpc.invoke('pikkuTriggerTypes', { bootstrap: true });
|
|
22
22
|
await rpc.invoke('pikkuMCPTypes');
|
|
23
|
-
await rpc.invoke('
|
|
23
|
+
await rpc.invoke('pikkuAgentTypes');
|
|
24
24
|
await rpc.invoke('pikkuNodeTypes');
|
|
25
25
|
await rpc.invoke('pikkuSecretDefinitionTypes');
|
|
26
26
|
await rpc.invoke('pikkuScopeDefinitionTypes');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger, VariablesService } from '@pikku/core/services';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AgentRunnerService } from '@pikku/core/services';
|
|
3
3
|
/**
|
|
4
4
|
* Build the AI agent runner for `pikku dev` from env.
|
|
5
5
|
*
|
|
@@ -24,8 +24,8 @@ import type { AIAgentRunnerService } from '@pikku/core/services';
|
|
|
24
24
|
* If it becomes worth it, delegate just `transcription`/`speech` to the full
|
|
25
25
|
* provider and leave everything else on this one.
|
|
26
26
|
*/
|
|
27
|
-
export declare function
|
|
27
|
+
export declare function createDevAgentRunner({ logger, projectRoot, variables, }: {
|
|
28
28
|
logger: Logger;
|
|
29
29
|
projectRoot: string;
|
|
30
30
|
variables: VariablesService;
|
|
31
|
-
}): Promise<
|
|
31
|
+
}): Promise<AgentRunnerService | undefined>;
|
|
@@ -25,7 +25,7 @@ import { pathToFileURL } from 'url';
|
|
|
25
25
|
* If it becomes worth it, delegate just `transcription`/`speech` to the full
|
|
26
26
|
* provider and leave everything else on this one.
|
|
27
27
|
*/
|
|
28
|
-
export async function
|
|
28
|
+
export async function createDevAgentRunner({ logger, projectRoot, variables, }) {
|
|
29
29
|
// Pair the URL with its matching key — coalescing each var independently could
|
|
30
30
|
// combine an OPENAI_BASE_URL with a LITELLM_API_KEY (or vice versa) and
|
|
31
31
|
// misroute or 401 every call. Take a complete OpenAI pair first, else LiteLLM.
|
|
@@ -68,11 +68,11 @@ export async function createDevAIAgentRunner({ logger, projectRoot, variables, }
|
|
|
68
68
|
: ['@pikku/ai-vercel', '@ai-sdk/openai-compatible'];
|
|
69
69
|
return Promise.all([import(runner), import(provider)]);
|
|
70
70
|
};
|
|
71
|
-
let
|
|
71
|
+
let VercelAgentRunner;
|
|
72
72
|
let createOpenAICompatible;
|
|
73
73
|
try {
|
|
74
74
|
const [runnerModule, providerModule] = await loadPair();
|
|
75
|
-
({
|
|
75
|
+
({ VercelAgentRunner } = runnerModule);
|
|
76
76
|
({ createOpenAICompatible } = providerModule);
|
|
77
77
|
}
|
|
78
78
|
catch (error) {
|
|
@@ -100,5 +100,5 @@ export async function createDevAIAgentRunner({ logger, projectRoot, variables, }
|
|
|
100
100
|
}),
|
|
101
101
|
});
|
|
102
102
|
logger.info(`pikku dev: AI agent runner wired to ${baseURL}`);
|
|
103
|
-
return new
|
|
103
|
+
return new VercelAgentRunner(buildProviders(apiKey), buildProviders);
|
|
104
104
|
}
|
|
@@ -2,12 +2,14 @@ import { join, resolve } from 'path';
|
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
4
4
|
import chokidar from 'chokidar';
|
|
5
|
-
import { pikkuDevReloader
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { pikkuDevReloader } from '@pikku/core/dev';
|
|
6
|
+
import { reloadGeneratedMeta, reconcileAddonRegistry, } from '@pikku/core/ecosystem/dev';
|
|
7
|
+
import { ConsoleLogger, LocalEmailService, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService, QueueWebhookService, } from '@pikku/core/services';
|
|
8
|
+
import { spy, InMemoryAgentRunStateService, } from '@pikku/core/ecosystem/services';
|
|
9
|
+
import { KyselyAgentStorageService, KyselyAgentRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
|
|
8
10
|
import { stopSingletonServices } from '@pikku/core';
|
|
9
11
|
import { pikkuState } from '@pikku/core/ecosystem';
|
|
10
|
-
import {
|
|
12
|
+
import { wireAgentScorerQueueWorkers } from '@pikku/core/ecosystem/agent-scorer';
|
|
11
13
|
import { LocalMetaService } from '@pikku/core/services/local-meta';
|
|
12
14
|
import { LocalContent, } from '@pikku/core/services/local-content';
|
|
13
15
|
import { InMemorySchedulerService } from '@pikku/schedule';
|
|
@@ -15,7 +17,7 @@ import { resolveDb, createKysely, parseDatabaseUrl, } from '../db/local-db.js';
|
|
|
15
17
|
import { loadUserBootstrap, loadUserModule } from './load-user-project.js';
|
|
16
18
|
import { registerScenarioInstrumentation } from '../wirings/scenarios/register-scenario-instrumentation.js';
|
|
17
19
|
import { startCoverageService } from './start-coverage.js';
|
|
18
|
-
import {
|
|
20
|
+
import { createDevAgentRunner } from './dev-agent-runner.js';
|
|
19
21
|
import { resolveConsoleMount } from './serve-console.js';
|
|
20
22
|
import { serverReadyLine } from '../../server/server-ready.js';
|
|
21
23
|
import { createEphemeralContentSigningJWT } from '../../server/content-signing-jwt.js';
|
|
@@ -77,11 +79,15 @@ export const dev = pikkuSessionlessFunc({
|
|
|
77
79
|
// auth requests saw CLI services (no kysely) and crashed.
|
|
78
80
|
const isHotReload = previousSingletonServices !== commandSingletonServices &&
|
|
79
81
|
!!previousSingletonServices;
|
|
82
|
+
// Overlaid rather than swapped: swapping left the app reading the CLI's
|
|
83
|
+
// config for as long as codegen ran.
|
|
80
84
|
const codegenServices = isHotReload
|
|
81
85
|
? {
|
|
82
86
|
...previousSingletonServices,
|
|
83
|
-
config:
|
|
84
|
-
previousSingletonServices.config,
|
|
87
|
+
config: {
|
|
88
|
+
...previousSingletonServices.config,
|
|
89
|
+
...commandSingletonServices?.config,
|
|
90
|
+
},
|
|
85
91
|
}
|
|
86
92
|
: commandSingletonServices;
|
|
87
93
|
pikkuState(null, 'package', 'singletonServices', codegenServices);
|
|
@@ -163,19 +169,19 @@ export const dev = pikkuSessionlessFunc({
|
|
|
163
169
|
? new LocalContent(localContentConfig, logger, contentSigningJWT)
|
|
164
170
|
: undefined;
|
|
165
171
|
const schedulerService = new InMemorySchedulerService();
|
|
166
|
-
const
|
|
167
|
-
? new
|
|
172
|
+
const agentStorage = kysely
|
|
173
|
+
? new KyselyAgentStorageService(kysely)
|
|
168
174
|
: undefined;
|
|
169
|
-
const
|
|
170
|
-
? new
|
|
171
|
-
: new
|
|
175
|
+
const agentRunState = kysely
|
|
176
|
+
? new KyselyAgentRunStateService(kysely)
|
|
177
|
+
: new InMemoryAgentRunStateService();
|
|
172
178
|
const agentRunService = kysely
|
|
173
179
|
? new KyselyAgentRunService(kysely)
|
|
174
180
|
: undefined;
|
|
175
|
-
if (
|
|
176
|
-
await
|
|
177
|
-
if ('init' in
|
|
178
|
-
await
|
|
181
|
+
if (agentStorage)
|
|
182
|
+
await agentStorage.init();
|
|
183
|
+
if ('init' in agentRunState && typeof agentRunState.init === 'function') {
|
|
184
|
+
await agentRunState.init();
|
|
179
185
|
}
|
|
180
186
|
// InMemoryWorkflowService implements both the workflowService and
|
|
181
187
|
// workflowRunService surfaces (listRuns/getRun live on it). Expose the
|
|
@@ -190,8 +196,8 @@ export const dev = pikkuSessionlessFunc({
|
|
|
190
196
|
// Only when the project declares agents — otherwise the runner's
|
|
191
197
|
// missing-SDK warning fires spuriously for projects with global AI env.
|
|
192
198
|
const hasAgents = Object.keys(inspectorState.agents.agentsMeta).length > 0;
|
|
193
|
-
const
|
|
194
|
-
? await
|
|
199
|
+
const agentRunner = hasAgents
|
|
200
|
+
? await createDevAgentRunner({
|
|
195
201
|
logger,
|
|
196
202
|
projectRoot: config.rootDir,
|
|
197
203
|
variables,
|
|
@@ -204,7 +210,7 @@ export const dev = pikkuSessionlessFunc({
|
|
|
204
210
|
const devQueueService = new InMemoryQueueService();
|
|
205
211
|
const inMemoryServices = {
|
|
206
212
|
logger: devLogger,
|
|
207
|
-
...(
|
|
213
|
+
...(agentRunner ? { agentRunner } : {}),
|
|
208
214
|
emailService: test
|
|
209
215
|
? spy('emailService', new LocalEmailService())
|
|
210
216
|
: new LocalEmailService(),
|
|
@@ -216,8 +222,8 @@ export const dev = pikkuSessionlessFunc({
|
|
|
216
222
|
workflowService,
|
|
217
223
|
workflowRunService: workflowService,
|
|
218
224
|
triggerService: new InMemoryTriggerService(),
|
|
219
|
-
|
|
220
|
-
|
|
225
|
+
agentStorage,
|
|
226
|
+
agentRunState,
|
|
221
227
|
agentRunService,
|
|
222
228
|
eventHub,
|
|
223
229
|
...(kysely ? { kysely } : {}),
|
|
@@ -234,7 +240,7 @@ export const dev = pikkuSessionlessFunc({
|
|
|
234
240
|
};
|
|
235
241
|
pikkuState(null, 'package', 'singletonServices', resolvedServices);
|
|
236
242
|
resolvedServices.workflowService?.wireQueueWorkers?.();
|
|
237
|
-
|
|
243
|
+
wireAgentScorerQueueWorkers();
|
|
238
244
|
const { serverLifecycleFactory } = inspectorState.filesAndMethods;
|
|
239
245
|
const loadLifecycle = async () => {
|
|
240
246
|
if (!serverLifecycleFactory)
|
|
@@ -334,7 +340,7 @@ export const dev = pikkuSessionlessFunc({
|
|
|
334
340
|
invalidateInspectorState();
|
|
335
341
|
await runAllWithCommandState();
|
|
336
342
|
workflowService.wireQueueWorkers();
|
|
337
|
-
|
|
343
|
+
wireAgentScorerQueueWorkers();
|
|
338
344
|
// Pull the regenerated meta + JSON schemas into the running
|
|
339
345
|
// process so new/changed functions are callable without a
|
|
340
346
|
// restart (the hot-reloader registers their implementations).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
-
import { createHttpPersonas } from '@pikku/core/persona';
|
|
3
|
-
import { personaEnvironmentRefusal } from '@pikku/core/persona';
|
|
2
|
+
import { createHttpPersonas } from '@pikku/core/ecosystem/persona';
|
|
3
|
+
import { personaEnvironmentRefusal } from '@pikku/core/ecosystem/persona';
|
|
4
4
|
import { resolvePersonas } from '../../utils/resolve-personas.js';
|
|
5
5
|
import { resolveEnvironment } from './environment.js';
|
|
6
6
|
import { loadDeclaredRoles, openScopeServiceForRoles } from './roles-shared.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { resolve, dirname } from 'node:path';
|
|
2
2
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
4
|
-
import { createHttpPersonas, personaEnvironmentRefusal, roleMismatchMessage, verifyPersonaRoles, } from '@pikku/core/persona';
|
|
5
|
-
import { personaVirtualUserTarget,
|
|
4
|
+
import { createHttpPersonas, personaEnvironmentRefusal, roleMismatchMessage, verifyPersonaRoles, } from '@pikku/core/ecosystem/persona';
|
|
5
|
+
import { personaVirtualUserTarget, runVirtualUser, } from '@pikku/core/virtual-user';
|
|
6
|
+
import { catalogueClassification, DISPOSITIONS, prepareVirtualUserRun, } from '@pikku/core/ecosystem/virtual-user';
|
|
6
7
|
import { resolvePersonas } from '../../utils/resolve-personas.js';
|
|
7
8
|
import { resolveEnvironment } from './environment.js';
|
|
8
|
-
import {
|
|
9
|
+
import { createDevAgentRunner } from './dev-agent-runner.js';
|
|
9
10
|
import { formatVirtualUserReport } from './virtual-user-formatter.js';
|
|
10
11
|
const dispositionNames = Object.keys(DISPOSITIONS);
|
|
11
12
|
/**
|
|
@@ -84,12 +85,12 @@ export const personaRun = pikkuSessionlessFunc({
|
|
|
84
85
|
if (!resolvedModel) {
|
|
85
86
|
throw new Error('No model to think with — pass --model, or set scenarios.model in pikku.config.json.');
|
|
86
87
|
}
|
|
87
|
-
const
|
|
88
|
+
const agentRunner = await createDevAgentRunner({
|
|
88
89
|
logger,
|
|
89
90
|
projectRoot: config.rootDir,
|
|
90
91
|
variables,
|
|
91
92
|
});
|
|
92
|
-
if (!
|
|
93
|
+
if (!agentRunner) {
|
|
93
94
|
throw new Error('No AI provider is configured. Set OPENAI_BASE_URL + OPENAI_API_KEY (or LITELLM_PROXY_URL + LITELLM_API_KEY).');
|
|
94
95
|
}
|
|
95
96
|
// Shared with the scaffolded `runVirtualUser` RPC, which does the same
|
|
@@ -153,7 +154,7 @@ export const personaRun = pikkuSessionlessFunc({
|
|
|
153
154
|
model: resolvedModel,
|
|
154
155
|
agents: agents.map((agent) => agent.name),
|
|
155
156
|
}),
|
|
156
|
-
llm: (params) =>
|
|
157
|
+
llm: (params) => agentRunner.run(params),
|
|
157
158
|
model: resolvedModel,
|
|
158
159
|
seed: seed ? Number(seed) : undefined,
|
|
159
160
|
allowApprovalRequired: allowApproval ?? false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { flattenSystemRoleDefinitions } from '@pikku/core/role';
|
|
2
|
+
import { flattenSystemRoleDefinitions } from '@pikku/core/ecosystem/role';
|
|
3
3
|
import { loadDeclaredScopes, openScopeService } from './scopes-shared.js';
|
|
4
4
|
const isRoleDefinitionsMeta = (value) => typeof value === 'object' &&
|
|
5
5
|
value !== null &&
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* making the driver's optional isolation and diagnostics safe to call
|
|
8
8
|
* unconditionally.
|
|
9
9
|
*/
|
|
10
|
-
import type { ScenarioBrowserFailure, ScenarioBrowserProvider } from '@pikku/core/scenario';
|
|
11
|
-
import type { ResolvedPersona } from '@pikku/core/services';
|
|
10
|
+
import type { ScenarioBrowserFailure, ScenarioBrowserProvider } from '@pikku/core/ecosystem/scenario';
|
|
11
|
+
import type { ResolvedPersona } from '@pikku/core/ecosystem/services';
|
|
12
12
|
/** The default driver, used when a project names no other. */
|
|
13
13
|
export declare const DEFAULT_BROWSER_DRIVER = "@pikku/playwright";
|
|
14
14
|
export interface ScenarioBrowserDriverOptions {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* second formatter (JSON, JUnit) a matter of writing one function rather than
|
|
8
8
|
* unpicking the runner.
|
|
9
9
|
*/
|
|
10
|
-
import type { ScenarioBrowserFailure } from '@pikku/core/scenario';
|
|
10
|
+
import type { ScenarioBrowserFailure } from '@pikku/core/ecosystem/scenario';
|
|
11
11
|
/** The longest gherkin keyword ("Given"), so sentences line up under each other. */
|
|
12
12
|
declare const KEYWORD_WIDTH = 5;
|
|
13
13
|
/** One step of a run, already joined to the prose that declared it. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { ScenarioSurface } from '@pikku/core/scenario';
|
|
2
|
+
import type { ScenarioStepPhase } from '@pikku/core/ecosystem/scenario';
|
|
3
|
+
import type { WorkflowStepMeta } from '@pikku/core/ecosystem/workflow';
|
|
4
|
+
import type { FunctionsMeta } from '@pikku/core/ecosystem/services';
|
|
4
5
|
import type { ScenarioFailureDetail, ScenarioStepRow } from './scenario-formatter.js';
|
|
5
6
|
export interface ScenarioStepProse {
|
|
6
7
|
phase: ScenarioStepPhase;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* belongs to `scenario-formatter.ts`; this module only decides what each step
|
|
9
9
|
* is called.
|
|
10
10
|
*/
|
|
11
|
-
import { composeStepProse } from '@pikku/core/scenario';
|
|
11
|
+
import { composeStepProse } from '@pikku/core/ecosystem/scenario';
|
|
12
12
|
import { KEYWORD_WIDTH } from './scenario-formatter.js';
|
|
13
13
|
/**
|
|
14
14
|
* Walk a workflow's steps — including the ones nested inside branches, fanouts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CoreWorkflow } from '@pikku/core/workflow';
|
|
2
|
-
import type { CoreFeature } from '@pikku/core/scenario';
|
|
1
|
+
import type { CoreWorkflow } from '@pikku/core/ecosystem/workflow';
|
|
2
|
+
import type { CoreFeature } from '@pikku/core/ecosystem/scenario';
|
|
3
3
|
/** One scenario run: a scenario name and, for a feature's paired entry, its input. */
|
|
4
4
|
export type ScenarioPlanEntry = {
|
|
5
5
|
scenarioName: string;
|
|
@@ -7,7 +7,6 @@ export declare const scenarioRun: import("#pikku").PikkuFunctionConfig<{
|
|
|
7
7
|
tags?: string;
|
|
8
8
|
excludeTags?: string;
|
|
9
9
|
coverage?: boolean;
|
|
10
|
-
browser?: boolean;
|
|
11
10
|
run?: ScenarioSurface;
|
|
12
11
|
strict?: boolean;
|
|
13
12
|
spawn?: boolean;
|
|
@@ -24,7 +23,6 @@ export declare const scenarioRun: import("#pikku").PikkuFunctionConfig<{
|
|
|
24
23
|
tags?: string;
|
|
25
24
|
excludeTags?: string;
|
|
26
25
|
coverage?: boolean;
|
|
27
|
-
browser?: boolean;
|
|
28
26
|
run?: ScenarioSurface;
|
|
29
27
|
strict?: boolean;
|
|
30
28
|
spawn?: boolean;
|
|
@@ -41,7 +39,6 @@ export declare const scenarioRun: import("#pikku").PikkuFunctionConfig<{
|
|
|
41
39
|
tags?: string;
|
|
42
40
|
excludeTags?: string;
|
|
43
41
|
coverage?: boolean;
|
|
44
|
-
browser?: boolean;
|
|
45
42
|
run?: ScenarioSurface;
|
|
46
43
|
strict?: boolean;
|
|
47
44
|
spawn?: boolean;
|
|
@@ -3,20 +3,20 @@ import { resolve, join } from 'node:path';
|
|
|
3
3
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
5
5
|
import { InMemoryWorkflowService } from '@pikku/core/services';
|
|
6
|
-
import { createHttpPersonas } from '@pikku/core/persona';
|
|
7
|
-
import { PikkuScenarioService } from '@pikku/core/scenario';
|
|
6
|
+
import { createHttpPersonas } from '@pikku/core/ecosystem/persona';
|
|
7
|
+
import { PikkuScenarioService } from '@pikku/core/ecosystem/scenario';
|
|
8
8
|
import { pikkuState, getAllPackageStates } from '@pikku/core/ecosystem';
|
|
9
|
-
import { resolveFeatureScenarios } from '@pikku/core/scenario';
|
|
9
|
+
import { resolveFeatureScenarios } from '@pikku/core/ecosystem/scenario';
|
|
10
10
|
import { loadScenarioBootstrap } from './load-user-project.js';
|
|
11
11
|
import { collectScenarioStepProse, scenarioBrowserSteps, scenarioFailureFromSteps, scenarioStepRows, scenarioStepsWithoutBinding, scenarioSurfaceCoverage, } from './scenario-ladder.js';
|
|
12
|
-
import { SCENARIO_SURFACES } from '@pikku/core/scenario';
|
|
12
|
+
import { SCENARIO_SURFACES } from '@pikku/core/ecosystem/scenario';
|
|
13
13
|
import { formatScenarioReport } from './scenario-formatter.js';
|
|
14
14
|
import { resolveScenarioBrowserProvider, scenarioBrowserLifecycle, } from './scenario-browser.js';
|
|
15
15
|
import { resolvePersonas } from '../../utils/resolve-personas.js';
|
|
16
16
|
import { spawnDevServer } from '../../server/spawn-dev-server.js';
|
|
17
17
|
import { buildScenarioPlan } from './scenario-plan.js';
|
|
18
18
|
import { resolveEnvironment } from './environment.js';
|
|
19
|
-
import {
|
|
19
|
+
import { createDevAgentRunner } from './dev-agent-runner.js';
|
|
20
20
|
const isScenario = (wf) => wf?.scenario === true;
|
|
21
21
|
const listScenarios = (state) => Object.entries(state.workflows?.meta ?? {})
|
|
22
22
|
.filter(([, wf]) => isScenario(wf))
|
|
@@ -88,7 +88,7 @@ export const scenarioList = pikkuSessionlessFunc({
|
|
|
88
88
|
},
|
|
89
89
|
});
|
|
90
90
|
export const scenarioRun = pikkuSessionlessFunc({
|
|
91
|
-
func: async ({ logger, config, getInspectorState, variables }, { environment, flows, features, tags, excludeTags, coverage,
|
|
91
|
+
func: async ({ logger, config, getInspectorState, variables }, { environment, flows, features, tags, excludeTags, coverage, run: runSurface = 'default', strict = false, spawn = false, keepAlive = false, trace = false, screenshots = false, video = false, apiUrl, appUrl, }) => {
|
|
92
92
|
if (!SCENARIO_SURFACES.includes(runSurface)) {
|
|
93
93
|
throw new Error(`Unknown --run surface '${runSurface}'. Expected one of: ${SCENARIO_SURFACES.join(', ')}.`);
|
|
94
94
|
}
|
|
@@ -191,49 +191,44 @@ export const scenarioRun = pikkuSessionlessFunc({
|
|
|
191
191
|
scenarioBrowserSteps(state.workflows?.meta?.[name], functionsMeta),
|
|
192
192
|
])
|
|
193
193
|
.filter(([, steps]) => steps.length > 0));
|
|
194
|
-
// `--no-browser` is the blunt form of `--run default`: a machine with no
|
|
195
|
-
// browser takes the server-side path rather than skipping the scenario.
|
|
196
|
-
const effectiveSurface = browser === false && runSurface === 'browser' ? 'default' : runSurface;
|
|
197
194
|
const unrunnableStepsByFlow = new Map([...scenarioNames]
|
|
198
195
|
.map((name) => [
|
|
199
196
|
name,
|
|
200
|
-
scenarioStepsWithoutBinding(state.workflows?.meta?.[name], functionsMeta,
|
|
197
|
+
scenarioStepsWithoutBinding(state.workflows?.meta?.[name], functionsMeta, runSurface),
|
|
201
198
|
])
|
|
202
199
|
.filter(([, steps]) => steps.length > 0));
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
// already cleared that reason for anything named directly with `--flows`.
|
|
208
|
-
const skipReasonFor = (entry) => {
|
|
209
|
-
if (entry.skip)
|
|
210
|
-
return entry.skip;
|
|
211
|
-
const unrunnable = unrunnableStepsByFlow.get(entry.scenarioName);
|
|
212
|
-
if (unrunnable?.length) {
|
|
213
|
-
return `no ${effectiveSurface} or default binding: ${unrunnable.join(', ')}`;
|
|
214
|
-
}
|
|
215
|
-
return undefined;
|
|
216
|
-
};
|
|
217
|
-
const skipped = [];
|
|
200
|
+
// A `skip` is the project quarantining a scenario on purpose and stays
|
|
201
|
+
// green; no binding for the run surface is a misconfigured run and fails.
|
|
202
|
+
const quarantined = [];
|
|
203
|
+
const unrunnable = [];
|
|
218
204
|
groups = groups
|
|
219
205
|
.map((group) => ({
|
|
220
206
|
...group,
|
|
221
207
|
entries: group.entries.filter((entry) => {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
|
|
208
|
+
if (entry.skip) {
|
|
209
|
+
quarantined.push({ name: entry.scenarioName, reason: entry.skip });
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
const steps = unrunnableStepsByFlow.get(entry.scenarioName);
|
|
213
|
+
if (steps?.length) {
|
|
214
|
+
unrunnable.push({
|
|
215
|
+
name: entry.scenarioName,
|
|
216
|
+
reason: `no ${runSurface} or default binding: ${steps.join(', ')}`,
|
|
217
|
+
});
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
227
221
|
}),
|
|
228
222
|
}))
|
|
229
223
|
.filter((group) => group.entries.length > 0);
|
|
224
|
+
const skipped = [...quarantined, ...unrunnable];
|
|
230
225
|
const workflowService = new InMemoryWorkflowService();
|
|
231
226
|
const scenarioService = workflowService.setRunExtension((engine) => new PikkuScenarioService(engine));
|
|
232
227
|
scenarioService.setScenarioEnvironment({
|
|
233
228
|
apiUrl: env.apiUrl,
|
|
234
229
|
appUrl: env.appUrl,
|
|
235
230
|
});
|
|
236
|
-
scenarioService.setRunSurface(
|
|
231
|
+
scenarioService.setRunSurface(runSurface);
|
|
237
232
|
// Scenario steps run here, not on the target — everything they touch of the
|
|
238
233
|
// app goes over HTTP through an actor, which is what `guardRpc` below
|
|
239
234
|
// enforces. `actor.converse` is the exception, and the reason this is not
|
|
@@ -242,8 +237,8 @@ export const scenarioRun = pikkuSessionlessFunc({
|
|
|
242
237
|
// before it says anything. Built the same way `pikku dev` builds its own,
|
|
243
238
|
// and only when the project declares agents, so a project with no agents
|
|
244
239
|
// does not have to have AI env set to run scenarios.
|
|
245
|
-
const
|
|
246
|
-
? await
|
|
240
|
+
const agentRunner = Object.keys(state.agents?.agentsMeta ?? {}).length > 0
|
|
241
|
+
? await createDevAgentRunner({
|
|
247
242
|
logger,
|
|
248
243
|
projectRoot: config.rootDir,
|
|
249
244
|
variables,
|
|
@@ -253,7 +248,7 @@ export const scenarioRun = pikkuSessionlessFunc({
|
|
|
253
248
|
logger,
|
|
254
249
|
workflowService,
|
|
255
250
|
workflowRunService: workflowService,
|
|
256
|
-
...(
|
|
251
|
+
...(agentRunner ? { agentRunner } : {}),
|
|
257
252
|
});
|
|
258
253
|
const refuseInternal = (rpcName) => {
|
|
259
254
|
throw new Error(`Scenario tried to run '${rpcName}' as an internal step. Every workflow.do ` +
|
|
@@ -283,7 +278,7 @@ export const scenarioRun = pikkuSessionlessFunc({
|
|
|
283
278
|
// Only a browser run launches one. Under `--run default` a step with a
|
|
284
279
|
// browser binding takes its default path instead, so there is nothing to
|
|
285
280
|
// drive and nothing to pay for.
|
|
286
|
-
const needsBrowser =
|
|
281
|
+
const needsBrowser = runSurface === 'browser' &&
|
|
287
282
|
groups.some((group) => group.entries.some((entry) => browserStepsByFlow.has(entry.scenarioName)));
|
|
288
283
|
const failureDir = join(resolve(config.rootDir, config.outDir), 'scenario-failures');
|
|
289
284
|
// Artifacts are filed under the run, not the scenario, so one run's output
|
|
@@ -542,14 +537,14 @@ export const scenarioRun = pikkuSessionlessFunc({
|
|
|
542
537
|
const surfaceCoverage = { onSurface: 0, total: 0 };
|
|
543
538
|
const unwitnessed = new Set();
|
|
544
539
|
for (const name of scenarioNames) {
|
|
545
|
-
const scenario = scenarioSurfaceCoverage(state.workflows?.meta?.[name], functionsMeta,
|
|
540
|
+
const scenario = scenarioSurfaceCoverage(state.workflows?.meta?.[name], functionsMeta, runSurface);
|
|
546
541
|
surfaceCoverage.onSurface += scenario.onSurface;
|
|
547
542
|
surfaceCoverage.total += scenario.total;
|
|
548
543
|
for (const step of scenario.unwitnessed)
|
|
549
544
|
unwitnessed.add(step);
|
|
550
545
|
}
|
|
551
|
-
if (
|
|
552
|
-
const line = `${surfaceCoverage.onSurface}/${surfaceCoverage.total} steps ran on ${
|
|
546
|
+
if (runSurface !== 'default' && surfaceCoverage.total > 0) {
|
|
547
|
+
const line = `${surfaceCoverage.onSurface}/${surfaceCoverage.total} steps ran on ${runSurface}`;
|
|
553
548
|
if (unwitnessed.size === 0) {
|
|
554
549
|
logger.info(line);
|
|
555
550
|
}
|
|
@@ -558,9 +553,16 @@ export const scenarioRun = pikkuSessionlessFunc({
|
|
|
558
553
|
write(`${line} — asserted server-side only: ${[...unwitnessed].join(', ')}`);
|
|
559
554
|
}
|
|
560
555
|
}
|
|
556
|
+
// Exiting 0 here makes "62 held back" and "62 passed" indistinguishable
|
|
557
|
+
// to CI, which is how a whole browser suite went unrun.
|
|
558
|
+
if (unrunnable.length > 0) {
|
|
559
|
+
logger.error(`${unrunnable.length} scenario(s) could not run on '${runSurface}' — no binding for that surface and no default to fall back to. ` +
|
|
560
|
+
`Run them on the surface they are written for (--run browser), or hold them back explicitly with --exclude-tags.`);
|
|
561
|
+
}
|
|
561
562
|
const failed = results.filter((r) => r.status === 'failed');
|
|
562
563
|
if (failed.length > 0 ||
|
|
563
564
|
hookFailures.length > 0 ||
|
|
565
|
+
unrunnable.length > 0 ||
|
|
564
566
|
(strict && unwitnessed.size > 0)) {
|
|
565
567
|
process.exitCode = 1;
|
|
566
568
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Kysely } from 'kysely';
|
|
2
|
-
import type { FlatScope } from '@pikku/core/scope';
|
|
2
|
+
import type { FlatScope } from '@pikku/core/ecosystem/scope';
|
|
3
3
|
import { KyselyScopeService } from '@pikku/kysely';
|
|
4
4
|
import type { KyselyPikkuDB } from '@pikku/kysely';
|
|
5
5
|
type Logger = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { flattenScopeDefinitions } from '@pikku/core/scope';
|
|
2
|
+
import { flattenScopeDefinitions } from '@pikku/core/ecosystem/scope';
|
|
3
3
|
import { KyselyScopeService } from '@pikku/kysely';
|
|
4
4
|
import { createKysely, resolveDb } from '../db/local-db.js';
|
|
5
5
|
import { loadUserConfigForDb } from './db-shared.js';
|