@pikku/cli 0.12.103 → 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-BLi9JHGg.js → abnfDiagram-VRR7QNED-QRjCVsso.js} +1 -1
- package/console-app/assets/{arc-B3b5uYlL.js → arc-CloGjkHW.js} +1 -1
- package/console-app/assets/architecture-TIHT7OUA-Cz78Qi5H.js +1 -0
- package/console-app/assets/{architectureDiagram-ZJ3FMSHR-Dkd8kxIa.js → architectureDiagram-ZJ3FMSHR-Dl10fVqw.js} +1 -1
- package/console-app/assets/{blockDiagram-677ZJIJ3-DnH0nNlb.js → blockDiagram-677ZJIJ3-CMNoQhwm.js} +1 -1
- package/console-app/assets/{c4Diagram-LMCZKHZV-BlelCS5i.js → c4Diagram-LMCZKHZV-C2pWYCa6.js} +1 -1
- package/console-app/assets/channel-Bm4o-pNB.js +1 -0
- package/console-app/assets/{chunk-32BRIVSS-D7tMgtT1.js → chunk-32BRIVSS-DC3ZGIPN.js} +1 -1
- package/console-app/assets/{chunk-52WLFC77-CRepS35y.js → chunk-52WLFC77-DuAheIlc.js} +1 -1
- package/console-app/assets/{chunk-C7G6YPKG-CUldlJz4.js → chunk-C7G6YPKG-BVtRZIEZ.js} +1 -1
- package/console-app/assets/{chunk-EX3LRPZG-DODbrqEj.js → chunk-EX3LRPZG-CWXF7N33.js} +1 -1
- package/console-app/assets/{chunk-FWX5IMBZ-nZa59wGD.js → chunk-FWX5IMBZ-UN3i5qMG.js} +2 -2
- package/console-app/assets/{chunk-HOUHSVGY-BaawVZCa.js → chunk-HOUHSVGY-DMorD8Ib.js} +1 -1
- package/console-app/assets/{chunk-ICXQ74PX-C86LrIRs.js → chunk-ICXQ74PX-BiuzWyj2.js} +1 -1
- package/console-app/assets/{chunk-MOJQB5TN-ovUDQlyW.js → chunk-MOJQB5TN-6BhXmDyj.js} +1 -1
- package/console-app/assets/{chunk-OGEWGWER-ByZKAcGu.js → chunk-OGEWGWER-BNi3Gsmc.js} +1 -1
- package/console-app/assets/{chunk-PUDLZKDR-DdeJN3wJ.js → chunk-PUDLZKDR-DNWGCeoL.js} +1 -1
- package/console-app/assets/{chunk-Q4XR5HBZ-Blp5W9-b.js → chunk-Q4XR5HBZ-i4zkt4cc.js} +1 -1
- package/console-app/assets/{chunk-RYQCIY6F-DehwjyPp.js → chunk-RYQCIY6F-DvRUzuDz.js} +1 -1
- package/console-app/assets/{chunk-V7JOEXUC-Ca1xeVdo.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-Cj7ZlsLr.js → chunk-VR4S4FIN-BcHHugM0.js} +1 -1
- package/console-app/assets/{chunk-WYO6CB5R-CsdBQ1HS.js → chunk-WYO6CB5R-COKjEQwP.js} +1 -1
- package/console-app/assets/chunk-XXDRQBXY-mkAF2YHU.js +1 -0
- package/console-app/assets/{chunk-ZGVPDNZ5-DMnFdLEO.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-CiYBhiBv.js → cose-bilkent-JH36ORCC-D6F1MghO.js} +1 -1
- package/console-app/assets/{cynefin-VYW2F7L2-BXuNC8qm.js → cynefin-VYW2F7L2-BIhff1Ln.js} +1 -1
- package/console-app/assets/{cynefinDiagram-TSTJHNR4-Ck53b-Nr.js → cynefinDiagram-TSTJHNR4-DrlBq_QP.js} +1 -1
- package/console-app/assets/{dagre-VKFMJZFB-C9hZCnOv.js → dagre-VKFMJZFB-Cm2eP0ez.js} +1 -1
- package/console-app/assets/{diagram-FQU43EPY-DuEKSLPE.js → diagram-FQU43EPY-C667dC19.js} +1 -1
- package/console-app/assets/{diagram-G47NLZAW-B_yO-zKt.js → diagram-G47NLZAW-3K3OPEuG.js} +1 -1
- package/console-app/assets/{diagram-NH7WQ7WH-CtKFjoB4.js → diagram-NH7WQ7WH-CUK-d5iT.js} +1 -1
- package/console-app/assets/{diagram-OA4YK3LP-T9eIYXYs.js → diagram-OA4YK3LP-BmjCoGBZ.js} +1 -1
- package/console-app/assets/{diagram-WEI45ONY-BTgu-I69.js → diagram-WEI45ONY-D33qA2d9.js} +1 -1
- package/console-app/assets/{dist-DSVj7qxi.js → dist-jqlCD26w.js} +1 -1
- package/console-app/assets/{ebnfDiagram-CCIWWBDH-BdyNRX2k.js → ebnfDiagram-CCIWWBDH-DUHkt7z6.js} +1 -1
- package/console-app/assets/{erDiagram-Q63AITRT-B0cr0nxe.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-Cr1R_nGh.js → ganttDiagram-NO4QXBWP-64_vh9rj.js} +1 -1
- package/console-app/assets/{gitGraph-TEB2WS4Q-zcmQoWd4.js → gitGraph-TEB2WS4Q-DlFJY0cQ.js} +1 -1
- package/console-app/assets/{gitGraphDiagram-IHSO6WYX-CHB9Fnch.js → gitGraphDiagram-IHSO6WYX-D9fpmYRm.js} +1 -1
- package/console-app/assets/{index-BbIUXgNl.js → index-Byf4wkdP.js} +159 -153
- package/console-app/assets/{index-C9U-Zyvx.css → index-CTO5cTAD.css} +1 -1
- package/console-app/assets/{info-DKCQHKI2-BGPZGp_E.js → info-DKCQHKI2-DhyT_-b1.js} +1 -1
- package/console-app/assets/{infoDiagram-FWYZ7A6U-Br_p6SR_.js → infoDiagram-FWYZ7A6U-ufTemVSR.js} +1 -1
- package/console-app/assets/{ishikawaDiagram-FXEZZL3T-Ma2d4IuN.js → ishikawaDiagram-FXEZZL3T-CWHvEncb.js} +1 -1
- package/console-app/assets/{journeyDiagram-5HDEW3XC-LdCblEX2.js → journeyDiagram-5HDEW3XC-DKH8UvEq.js} +1 -1
- package/console-app/assets/{kanban-definition-HUTT4EX6-CRWetzV4.js → kanban-definition-HUTT4EX6-BODtp_fB.js} +1 -1
- package/console-app/assets/{line-DrceqMYY.js → line-Do9j3HRL.js} +1 -1
- package/console-app/assets/{linear-acWbtwAj.js → linear-5Z8stnH-.js} +1 -1
- package/console-app/assets/{mermaid-parser.core-n773Jf0G.js → mermaid-parser.core-CYJsdwMO.js} +3 -3
- package/console-app/assets/{mermaid.core-DyTRkSqH.js → mermaid.core-DwI4IdKs.js} +3 -3
- package/console-app/assets/{mindmap-definition-LN4V7U3C-CBU-ehFU.js → mindmap-definition-LN4V7U3C-D7IWNYnf.js} +1 -1
- package/console-app/assets/{packet-7NZHBO7P-DL_fgdX1.js → packet-7NZHBO7P-comMLvz_.js} +1 -1
- package/console-app/assets/{pegDiagram-2B236MQR-CrFaAHHj.js → pegDiagram-2B236MQR-CbqiI_m5.js} +1 -1
- package/console-app/assets/{pie-RZYD4A2V-STtzW8Tz.js → pie-RZYD4A2V-VZXoX73g.js} +1 -1
- package/console-app/assets/{pieDiagram-ENE6RG2P-DsUOr1Ud.js → pieDiagram-ENE6RG2P-SA-sCnrt.js} +1 -1
- package/console-app/assets/{quadrantDiagram-ABIIQ3AL-DmuSe_qW.js → quadrantDiagram-ABIIQ3AL-CI840rae.js} +1 -1
- package/console-app/assets/{radar-I7S5WNFK-L8w2lEOb.js → radar-I7S5WNFK-W0UH9BdP.js} +1 -1
- package/console-app/assets/{railroad-3IZDKUUU-CxqlE5vc.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-CJ8Lpbeo.js → railroadDiagram-RFXS5EU6-Cm2SfP9Z.js} +1 -1
- package/console-app/assets/{requirementDiagram-TGXJPOKE-8OXQXUud.js → requirementDiagram-TGXJPOKE-CyHrMdrC.js} +1 -1
- package/console-app/assets/{sankeyDiagram-HTMAVEWB-Bezd2CqZ.js → sankeyDiagram-HTMAVEWB-DL0eJ1aK.js} +1 -1
- package/console-app/assets/{sequenceDiagram-DBY2YBRQ-DHb5js3D.js → sequenceDiagram-DBY2YBRQ-B2AvEvXu.js} +1 -1
- package/console-app/assets/{src-DfFamOl-.js → src-72nNqhBu.js} +1 -1
- package/console-app/assets/{stateDiagram-2N3HPSRC-UpyJm2mi.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-yUrV5f4O.js → swimlanes-5IMT3BWC-GiOMMhZh.js} +1 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-CkCbtoLb.js +8 -0
- package/console-app/assets/{timeline-definition-FHXFAJF6-B6w-rZeZ.js → timeline-definition-FHXFAJF6-DTJQsTn8.js} +1 -1
- package/console-app/assets/{treeView-QDETBFTQ-0k2QpnXc.js → treeView-QDETBFTQ-aizmbgl7.js} +1 -1
- package/console-app/assets/{treemap-6X3UGDF4-ByCuDcGA.js → treemap-6X3UGDF4-DIBl6bfV.js} +1 -1
- package/console-app/assets/{vennDiagram-L72KCM5P-BH4374lw.js → vennDiagram-L72KCM5P-C4Ngu7VX.js} +1 -1
- package/console-app/assets/{wardley-OPB4EBWU-DNVwuJz6.js → wardley-OPB4EBWU-BqdXyJTm.js} +1 -1
- package/console-app/assets/{wardleyDiagram-EHGQE667-EXnQ6lkx.js → wardleyDiagram-EHGQE667-Cw2M8s0p.js} +1 -1
- package/console-app/assets/{xychartDiagram-FW5EYKEG-rFh-UdgH.js → xychartDiagram-FW5EYKEG-BxMLZdbF.js} +1 -1
- package/console-app/index.html +9 -2
- package/console-app/site.webmanifest +19 -8
- 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 +97 -54
- 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-prune.js +1 -1
- 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-prune.js +1 -1
- 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/auth/serialize-auth-gen.js +6 -6
- 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-BYeDayHv.js +0 -1
- package/console-app/assets/channel-CTa6nggO.js +0 -1
- package/console-app/assets/chunk-VAUOI2AC-BCngaLxk.js +0 -1
- package/console-app/assets/chunk-XXDRQBXY-CGIlOoBU.js +0 -1
- package/console-app/assets/classDiagram-OUVF2IWQ-Bwt1ZVOR.js +0 -1
- package/console-app/assets/classDiagram-v2-EOCWNBFH-Bwt1ZVOR.js +0 -1
- package/console-app/assets/eventmodeling-45OFAUF4-BeHdsPzc.js +0 -1
- package/console-app/assets/flowDiagram-23GEKE2U-6N6mIkfB.js +0 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-CkJOR_Em.js +0 -1
- package/console-app/assets/railroad-ebnf-EBAXGLYW-BH_pRGgm.js +0 -1
- package/console-app/assets/railroad-peg-LSFZ7HO6-B50bKcii.js +0 -1
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-C6gAfg82.js +0 -1
- package/console-app/assets/swimlanesDiagram-G3AALYLV-Ch2_j5W5.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
package/dist/src/cli.wiring.js
CHANGED
|
@@ -29,6 +29,8 @@ 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 { pikkuSemver } from './functions/commands/semver.js';
|
|
33
|
+
import { renderSemver } from './functions/commands/semver-render.js';
|
|
32
34
|
import { validate, renderValidate } from './functions/commands/validate.js';
|
|
33
35
|
import { knowledgeValidate, renderKnowledgeValidate, } from './functions/commands/knowledge-validate.js';
|
|
34
36
|
import { knowledgeIndex, renderKnowledgeIndex, } from './functions/commands/knowledge-index.js';
|
|
@@ -39,6 +41,8 @@ import { pikkuVersionsInit } from './functions/commands/versions-init.js';
|
|
|
39
41
|
import { pikkuEmailsInit } from './functions/commands/emails-init.js';
|
|
40
42
|
import { pikkuVersionsCheck } from './functions/commands/versions-check.js';
|
|
41
43
|
import { pikkuVersionsUpdate } from './functions/commands/versions-update.js';
|
|
44
|
+
import { pikkuUpdate } from './functions/commands/update.js';
|
|
45
|
+
import { renderUpdate } from './functions/commands/update-render.js';
|
|
42
46
|
import { pikkuNewFunction } from './functions/commands/new-function.js';
|
|
43
47
|
import { pikkuNewWiring } from './functions/commands/new-wiring.js';
|
|
44
48
|
import { pikkuNewMiddleware } from './functions/commands/new-middleware.js';
|
|
@@ -205,6 +209,52 @@ wireCLI({
|
|
|
205
209
|
},
|
|
206
210
|
},
|
|
207
211
|
}),
|
|
212
|
+
update: pikkuCLICommand({
|
|
213
|
+
func: pikkuUpdate,
|
|
214
|
+
render: renderUpdate,
|
|
215
|
+
description: 'Report which @pikku/* dependencies can be updated, and the peers those updates need. Reports only until --update is passed',
|
|
216
|
+
options: {
|
|
217
|
+
update: {
|
|
218
|
+
description: 'Write the new ranges into every package.json covered by the run. Without it, update only reports',
|
|
219
|
+
default: false,
|
|
220
|
+
},
|
|
221
|
+
updatePeers: {
|
|
222
|
+
description: "Also write the ranges unsatisfied peers require (e.g. bumping 'ai' for @pikku/ai-vercel). Implies --update, and can cross a major version of a third-party package",
|
|
223
|
+
default: false,
|
|
224
|
+
},
|
|
225
|
+
install: {
|
|
226
|
+
description: 'After writing, run an install with the package manager the lockfile names. --no-install leaves node_modules alone',
|
|
227
|
+
default: true,
|
|
228
|
+
},
|
|
229
|
+
tag: {
|
|
230
|
+
description: "Dist-tag to update to (default: 'latest')",
|
|
231
|
+
default: 'latest',
|
|
232
|
+
},
|
|
233
|
+
registry: {
|
|
234
|
+
description: 'Registry to read versions from (default: npm_config_registry, else https://registry.npmjs.org)',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
}),
|
|
238
|
+
semver: pikkuCLICommand({
|
|
239
|
+
func: pikkuSemver,
|
|
240
|
+
render: renderSemver,
|
|
241
|
+
description: "Derive the release semver by comparing this build's surface against a deployed one; writes .pikku/changes.gen.json",
|
|
242
|
+
options: {
|
|
243
|
+
against: {
|
|
244
|
+
description: 'Baseline to compare against: a .pikku directory, a snapshot file, or a snapshot URL',
|
|
245
|
+
},
|
|
246
|
+
emit: {
|
|
247
|
+
description: "Produce this build's surface snapshot instead of comparing — publish it to serve as a baseline. Pair with --out; without it the snapshot goes to stdout after the CLI banner",
|
|
248
|
+
default: false,
|
|
249
|
+
},
|
|
250
|
+
out: {
|
|
251
|
+
description: 'Where to write the output (defaults to .pikku/changes.gen.json; with --emit, stdout)',
|
|
252
|
+
},
|
|
253
|
+
failOn: {
|
|
254
|
+
description: 'Exit non-zero when the verdict is at or above this level: major, minor or patch',
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
}),
|
|
208
258
|
watch: pikkuCLICommand({
|
|
209
259
|
func: watch,
|
|
210
260
|
description: 'Watch for file changes and regenerate automatically',
|
|
@@ -464,10 +514,6 @@ wireCLI({
|
|
|
464
514
|
description: 'Reset/snapshot server coverage per scenario (target must run with --coverage); writes coverage/scenario-coverage.json',
|
|
465
515
|
default: false,
|
|
466
516
|
},
|
|
467
|
-
browser: {
|
|
468
|
-
description: 'Shorthand for --run default when false: takes the server-side path instead of driving a browser',
|
|
469
|
-
default: true,
|
|
470
|
-
},
|
|
471
517
|
run: {
|
|
472
518
|
description: "Which surface every actor drives the system through: 'browser' (as a human), 'cli' (over the websocket), or 'default' (server-side, the fast path)",
|
|
473
519
|
default: 'default',
|
|
@@ -146,8 +146,8 @@ export function analyzeDeployment(state, options) {
|
|
|
146
146
|
const subAgentUnitNames = subAgentNames.map((sa) => `agent-${toSafeKebab(sa)}`);
|
|
147
147
|
// Agent needs AI services
|
|
148
148
|
const agentServices = [
|
|
149
|
-
{ capability: 'ai-model', sourceServiceName: '
|
|
150
|
-
{ capability: 'ai-storage', sourceServiceName: '
|
|
149
|
+
{ capability: 'ai-model', sourceServiceName: 'agentRunner' },
|
|
150
|
+
{ capability: 'ai-storage', sourceServiceName: 'agentStorage' },
|
|
151
151
|
];
|
|
152
152
|
// Concrete routes for this agent via catch-all
|
|
153
153
|
const agentRoutes = [
|
|
@@ -185,7 +185,7 @@ export function analyzeDeployment(state, options) {
|
|
|
185
185
|
agents.push({
|
|
186
186
|
// The registry KEY (export name, e.g. `kanbanAgent`), NOT the
|
|
187
187
|
// human-facing `agentMeta.name` (e.g. `kanban-agent`). Routes,
|
|
188
|
-
// `
|
|
188
|
+
// `addAgent(...)`, and the inspector-state name filter all key off
|
|
189
189
|
// this identifier — per-unit codegen passes it to `--names`, and the
|
|
190
190
|
// filter matches it against the `agentsMeta` key. Using the human name
|
|
191
191
|
// here makes the filter prune the agent, so its registration never gets
|
|
@@ -558,9 +558,9 @@ const SERVICE_CAPABILITY_MAP = {
|
|
|
558
558
|
content: 'object-storage',
|
|
559
559
|
storage: 'object-storage',
|
|
560
560
|
queueService: 'queue',
|
|
561
|
-
|
|
561
|
+
agentRunner: 'ai-model',
|
|
562
562
|
ai: 'ai-model',
|
|
563
|
-
|
|
563
|
+
agentStorage: 'ai-storage',
|
|
564
564
|
workflowService: 'workflow-state',
|
|
565
565
|
workflow: 'workflow-state',
|
|
566
566
|
credentialService: 'credential-store',
|
|
@@ -31,12 +31,12 @@ const SERVICE_GEN_FILE_MAP = {
|
|
|
31
31
|
* keeps their (often large) trees out of the bundle.
|
|
32
32
|
*
|
|
33
33
|
* The AI SDKs (@pikku/ai-vercel + @ai-sdk/* + `ai`, ~3MB) are only constructed
|
|
34
|
-
* when `
|
|
34
|
+
* when `agentRunner` is wired (agent units). Every non-agent unit stubs them.
|
|
35
35
|
* The shared services factory must guard the runner construction behind a
|
|
36
36
|
* defined-check on the dynamic import so a stubbed unit simply skips it.
|
|
37
37
|
*/
|
|
38
38
|
const SERVICE_MODULE_MAP = {
|
|
39
|
-
|
|
39
|
+
agentRunner: [/^@pikku\/ai-vercel/, /^@ai-sdk\//, /^ai$/],
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Read the per-unit pikku-services.gen.ts and return the set of gen file
|
|
@@ -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,
|
|
@@ -42,7 +42,7 @@ export const rolesPrune = pikkuSessionlessFunc({
|
|
|
42
42
|
logger.info('');
|
|
43
43
|
logger.info(`roles prune: removed ${pruned.length} system role(s)`);
|
|
44
44
|
if (held.length > 0) {
|
|
45
|
-
logger.warn(`Revoked from ${affectedUsers} user grant(s). They lose the role's scopes on their next request.`);
|
|
45
|
+
logger.warn(`Revoked from ${affectedUsers} user grant(s). They lose the role's scopes on their next request — unless mapSession sets scopes itself, in which case it is authoritative and they keep them.`);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
finally {
|
|
@@ -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;
|