@pikku/cli 0.12.93 → 0.12.99
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-CytV-CG1.js +1 -0
- package/console-app/assets/arc-C5PvmnaA.js +1 -0
- package/console-app/assets/architecture-TIHT7OUA-C1_ScvPX.js +1 -0
- package/console-app/assets/architectureDiagram-ZJ3FMSHR-CJ2xb7C-.js +36 -0
- package/console-app/assets/array-BifhSqXX.js +1 -0
- package/console-app/assets/blockDiagram-677ZJIJ3-CCecrBrk.js +132 -0
- package/console-app/assets/c4Diagram-LMCZKHZV-CBnpukvQ.js +10 -0
- package/console-app/assets/channel-CwDOkXGI.js +1 -0
- package/console-app/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/console-app/assets/chunk-32BRIVSS-D8qWWZRQ.js +1 -0
- package/console-app/assets/chunk-52WLFC77-BEpXHMsp.js +10 -0
- package/console-app/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/console-app/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
- package/console-app/assets/chunk-C7G6YPKG-DsHUMkOp.js +1 -0
- package/console-app/assets/chunk-EX3LRPZG-mM7TjVx9.js +231 -0
- package/console-app/assets/chunk-FWX5IMBZ-CndRAn18.js +2 -0
- package/console-app/assets/chunk-HOUHSVGY-D1kT8umn.js +1 -0
- package/console-app/assets/chunk-ICXQ74PX-CeSaGyro.js +2 -0
- package/console-app/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/console-app/assets/chunk-KEIR6QF5-DNzq6p3w.js +161 -0
- package/console-app/assets/chunk-MOJQB5TN-CaZOCHYr.js +88 -0
- package/console-app/assets/chunk-OGEWGWER-CnB1CsPt.js +1 -0
- package/console-app/assets/chunk-PUDLZKDR-BbGulHJm.js +156 -0
- package/console-app/assets/chunk-Q4XR5HBZ-BywwzeeR.js +70 -0
- package/console-app/assets/chunk-RYQCIY6F-CV0R1Adv.js +1 -0
- package/console-app/assets/chunk-V7JOEXUC-DGFaAWzB.js +206 -0
- package/console-app/assets/chunk-VAUOI2AC-DxPUd8Yb.js +1 -0
- package/console-app/assets/chunk-VR4S4FIN-D4-UaW_J.js +1 -0
- package/console-app/assets/chunk-WYO6CB5R-D_TFN0d9.js +127 -0
- package/console-app/assets/chunk-XXDRQBXY-BzVuweA_.js +1 -0
- package/console-app/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/console-app/assets/chunk-ZGVPDNZ5-C6hdkGQb.js +62 -0
- package/console-app/assets/chunk-ZIRB5QZD-H-kepumB.js +32 -0
- package/console-app/assets/classDiagram-OUVF2IWQ-CTYJkTT0.js +1 -0
- package/console-app/assets/classDiagram-v2-EOCWNBFH-CTYJkTT0.js +1 -0
- package/console-app/assets/cose-bilkent-JH36ORCC-B6ZPxN6v.js +1 -0
- package/console-app/assets/cynefin-VYW2F7L2-D_nmxNz_.js +1 -0
- package/console-app/assets/cynefinDiagram-TSTJHNR4-CHy5QN0S.js +62 -0
- package/console-app/assets/cytoscape.esm-h6BdjjI9.js +321 -0
- package/console-app/assets/dagre-CXRCoUWR.js +1 -0
- package/console-app/assets/dagre-VKFMJZFB-DYfukM34.js +4 -0
- package/console-app/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/console-app/assets/diagram-FQU43EPY-Dgb9TPSB.js +3 -0
- package/console-app/assets/diagram-G47NLZAW-CnFNZs9Z.js +24 -0
- package/console-app/assets/diagram-NH7WQ7WH-DN7h2DU-.js +24 -0
- package/console-app/assets/diagram-OA4YK3LP-RLaQaNtK.js +30 -0
- package/console-app/assets/diagram-WEI45ONY-DxHWhVGd.js +41 -0
- package/console-app/assets/dist-BaJNIo4I.js +1 -0
- package/console-app/assets/ebnfDiagram-CCIWWBDH-UN3Z81-l.js +1 -0
- package/console-app/assets/erDiagram-Q63AITRT-C9lGAY3i.js +85 -0
- package/console-app/assets/eventmodeling-45OFAUF4-Dc5wNSSK.js +1 -0
- package/console-app/assets/flowDiagram-23GEKE2U-zPyGHMi4.js +1 -0
- package/console-app/assets/ganttDiagram-NO4QXBWP-CvBjBcdK.js +292 -0
- package/console-app/assets/gitGraph-TEB2WS4Q-Cs5Z9jMo.js +1 -0
- package/console-app/assets/gitGraphDiagram-IHSO6WYX-B0i_IJ5r.js +106 -0
- package/console-app/assets/graphlib-B8gBHxth.js +1 -0
- package/console-app/assets/{index-CmAplHjZ.js → index-71U8EEj7.js} +155 -153
- package/console-app/assets/{index-BYj7ZbUU.css → index-BXMjqLQ5.css} +1 -1
- package/console-app/assets/info-DKCQHKI2-DHL0afNl.js +1 -0
- package/console-app/assets/infoDiagram-FWYZ7A6U-CBWykodX.js +2 -0
- package/console-app/assets/init-D6jRqBbL.js +1 -0
- package/console-app/assets/ishikawaDiagram-FXEZZL3T-DM377eW_.js +70 -0
- package/console-app/assets/journeyDiagram-5HDEW3XC-BpX_-Cns.js +139 -0
- package/console-app/assets/kanban-definition-HUTT4EX6-D3xFsQkO.js +89 -0
- package/console-app/assets/katex-Vhh-h91d.js +257 -0
- package/console-app/assets/line-CTSKHTE0.js +1 -0
- package/console-app/assets/linear-R5GlBvXT.js +1 -0
- package/console-app/assets/map-DsCK-0Cs.js +1 -0
- package/console-app/assets/mermaid-parser.core-CkHk4BPi.js +7 -0
- package/console-app/assets/mermaid.core-CcjGXuV6.js +11 -0
- package/console-app/assets/mindmap-definition-LN4V7U3C-CtolazqQ.js +96 -0
- package/console-app/assets/ordinal-hYBb2elL.js +1 -0
- package/console-app/assets/packet-7NZHBO7P-BxSOj_Ny.js +1 -0
- package/console-app/assets/path-BWPyau1x.js +1 -0
- package/console-app/assets/pegDiagram-2B236MQR-BNsMtxsM.js +1 -0
- package/console-app/assets/pie-RZYD4A2V-BbkKQBA5.js +1 -0
- package/console-app/assets/pieDiagram-ENE6RG2P-BAZLIz2f.js +39 -0
- package/console-app/assets/quadrantDiagram-ABIIQ3AL-Dpvn-1Fs.js +7 -0
- package/console-app/assets/radar-I7S5WNFK-B-uKXIAH.js +1 -0
- package/console-app/assets/railroad-3IZDKUUU-BHXXK04t.js +1 -0
- package/console-app/assets/railroad-abnf-AHOZXSZD-tXSQaBvY.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-DG3aohR0.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-DY_gBA-x.js +1 -0
- package/console-app/assets/railroadDiagram-RFXS5EU6-DfUApEQj.js +1 -0
- package/console-app/assets/requirementDiagram-TGXJPOKE-B2zX0jqo.js +84 -0
- package/console-app/assets/rough.esm-CSKSodPl.js +1 -0
- package/console-app/assets/sankeyDiagram-HTMAVEWB-CbQ2zc7z.js +40 -0
- package/console-app/assets/sequenceDiagram-DBY2YBRQ-BLT8PXI_.js +162 -0
- package/console-app/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
- package/console-app/assets/src-BLuPUFWW.js +1 -0
- package/console-app/assets/stateDiagram-2N3HPSRC-BvEyVp85.js +1 -0
- package/console-app/assets/stateDiagram-v2-6OUMAXLB-RGKS9iU4.js +1 -0
- package/console-app/assets/swimlanes-5IMT3BWC-1AZ459s6.js +2 -0
- package/console-app/assets/swimlanesDiagram-G3AALYLV-Ck_0-rfN.js +8 -0
- package/console-app/assets/timeline-definition-FHXFAJF6-dLuvH4s2.js +120 -0
- package/console-app/assets/treeView-QDETBFTQ-xL2msjo2.js +1 -0
- package/console-app/assets/treemap-6X3UGDF4-C98ichVP.js +1 -0
- package/console-app/assets/vennDiagram-L72KCM5P-HbUmidhv.js +34 -0
- package/console-app/assets/wardley-OPB4EBWU-C4gJS-m2.js +1 -0
- package/console-app/assets/wardleyDiagram-EHGQE667-B7b-LB02.js +78 -0
- package/console-app/assets/xychartDiagram-FW5EYKEG-Cm03zUGy.js +7 -0
- package/console-app/index.html +2 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/auth/auth.types.d.ts +1 -1
- package/dist/.pikku/auth/auth.types.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +13 -15
- package/dist/.pikku/cli/pikku-cli-channel.js +62 -8
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +14 -4
- package/dist/.pikku/cli/pikku-cli-client.gen.js +55 -18
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +136 -10
- 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 +18 -2
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +64 -23
- package/dist/.pikku/function/pikku-function-types.gen.js +27 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +171 -37
- package/dist/.pikku/function/pikku-functions.gen.js +13 -3
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +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 +2 -1
- package/dist/.pikku/pikku-services.gen.js +1 -0
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +8 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +15 -5
- package/dist/.pikku/schemas/schemas/DbResetInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PersonaRunInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PersonaSyncInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuPersonasInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuRolesInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuVirtualUserFunctionsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/RolesPruneInput.schema.json +1 -0
- package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +36 -0
- package/dist/.pikku/scopes/pikku-personas.gen.js +17 -0
- package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +30 -0
- package/dist/.pikku/scopes/pikku-roles.gen.js +18 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +4 -2
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +3 -2
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +46 -16
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +15 -0
- package/dist/.pikku/workflow/pikku-personas.gen.js +17 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +101 -24
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +22 -2
- 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/bin/pikku.js +0 -0
- package/dist/src/cli.wiring.js +108 -8
- package/dist/src/deploy/analyzer/analyzer.js +14 -0
- package/dist/src/deploy/analyzer/manifest.d.ts +11 -0
- package/dist/src/fabric/functions/validate.function.js +77 -177
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +3 -0
- package/dist/src/functions/commands/db-audit.js +1 -1
- package/dist/src/functions/commands/db-baseline.js +1 -1
- package/dist/src/functions/commands/db-check.js +6 -5
- package/dist/src/functions/commands/db-codegen.js +1 -1
- package/dist/src/functions/commands/db-generate.js +1 -1
- package/dist/src/functions/commands/db-migrate.js +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +15 -1
- package/dist/src/functions/commands/db-reset.js +18 -6
- package/dist/src/functions/commands/db-shared.d.ts +14 -0
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/dev-ai-runner.d.ts +16 -4
- package/dist/src/functions/commands/dev-ai-runner.js +63 -29
- package/dist/src/functions/commands/dev.js +10 -5
- package/dist/src/functions/commands/enable.d.ts +8 -8
- package/dist/src/functions/commands/enable.js +15 -19
- package/dist/src/functions/commands/{scenario-environment.d.ts → environment.d.ts} +9 -6
- package/dist/src/functions/commands/{scenario-environment.js → environment.js} +5 -4
- package/dist/src/functions/commands/new-addon.js +14 -14
- package/dist/src/functions/commands/persona-sync.d.ts +33 -0
- package/dist/src/functions/commands/persona-sync.js +151 -0
- package/dist/src/functions/commands/persona.d.ts +58 -0
- package/dist/src/functions/commands/persona.js +215 -0
- package/dist/src/functions/commands/roles-audit.d.ts +1 -0
- package/dist/src/functions/commands/roles-audit.js +37 -0
- package/dist/src/functions/commands/roles-prune.d.ts +16 -0
- package/dist/src/functions/commands/roles-prune.js +52 -0
- package/dist/src/functions/commands/roles-shared.d.ts +40 -0
- package/dist/src/functions/commands/roles-shared.js +77 -0
- package/dist/src/functions/commands/scenario-browser.d.ts +3 -3
- package/dist/src/functions/commands/scenario-browser.js +1 -1
- package/dist/src/functions/commands/scenario-ladder.d.ts +44 -2
- package/dist/src/functions/commands/scenario-ladder.js +52 -3
- package/dist/src/functions/commands/scenario.d.ts +7 -0
- package/dist/src/functions/commands/scenario.js +82 -18
- package/dist/src/functions/commands/scopes-shared.d.ts +12 -0
- package/dist/src/functions/commands/scopes-shared.js +2 -2
- package/dist/src/functions/commands/serve.js +8 -4
- package/dist/src/functions/commands/versions-check.js +3 -3
- package/dist/src/functions/commands/virtual-user-formatter.d.ts +30 -0
- package/dist/src/functions/commands/virtual-user-formatter.js +65 -0
- package/dist/src/functions/db/annotation-parser.d.ts +14 -0
- package/dist/src/functions/db/annotation-parser.js +50 -2
- package/dist/src/functions/db/better-auth-schema.js +2 -1
- package/dist/src/functions/db/db-codegen.d.ts +12 -0
- package/dist/src/functions/db/db-codegen.js +149 -16
- package/dist/src/functions/db/local-db.d.ts +87 -6
- package/dist/src/functions/db/local-db.js +239 -35
- package/dist/src/functions/db/sqlite/dev-seed.d.ts +12 -0
- package/dist/src/functions/db/sqlite/dev-seed.js +23 -0
- package/dist/src/functions/db/sqlite/sqlite-runtime-bun.js +1 -1
- package/dist/src/functions/validate/bootstrap-checks.d.ts +19 -0
- package/dist/src/functions/validate/bootstrap-checks.js +90 -0
- package/dist/src/functions/validate/persona-checks.d.ts +24 -0
- package/dist/src/functions/validate/persona-checks.js +136 -0
- package/dist/src/functions/validate/scenario-file-checks.d.ts +17 -0
- package/dist/src/functions/validate/scenario-file-checks.js +123 -0
- package/dist/src/functions/validate/shared-checks.d.ts +59 -0
- package/dist/src/functions/validate/shared-checks.js +311 -0
- package/dist/src/functions/validate/workspace-validate.d.ts +1 -2
- package/dist/src/functions/validate/workspace-validate.js +4 -196
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +2 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +1 -0
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +2 -2
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +24 -9
- package/dist/src/functions/wirings/auth/serialize-auth-types.d.ts +3 -1
- package/dist/src/functions/wirings/auth/serialize-auth-types.js +3 -1
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.js +10 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +9 -4
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +7 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +64 -28
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +63 -6
- package/dist/src/functions/wirings/cli/serialize-cli-entrypoint-guard.d.ts +12 -0
- package/dist/src/functions/wirings/cli/serialize-cli-entrypoint-guard.js +28 -0
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +4 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +5 -8
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +106 -32
- package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +25 -9
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
- package/dist/src/functions/wirings/package/serialize-package-types.js +5 -3
- package/dist/src/functions/wirings/personas/personas-secrets-file.d.ts +8 -0
- package/dist/src/functions/wirings/personas/personas-secrets-file.js +9 -0
- package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +7 -0
- package/dist/src/functions/wirings/personas/pikku-command-personas.js +57 -0
- package/dist/src/functions/wirings/personas/serialize-personas-secrets.d.ts +16 -0
- package/dist/src/functions/wirings/personas/serialize-personas-secrets.js +34 -0
- package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +18 -0
- package/dist/src/functions/wirings/personas/serialize-personas-types.js +76 -0
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +2 -1
- package/dist/src/functions/wirings/queue/serialize-queue-wrapper.js +2 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +2 -1
- package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +7 -0
- package/dist/src/functions/wirings/roles/pikku-command-roles.js +33 -0
- package/dist/src/functions/wirings/roles/serialize-roles-types.d.ts +14 -0
- package/dist/src/functions/wirings/roles/serialize-roles-types.js +55 -0
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +2 -1
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.d.ts +3 -3
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -3
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +1 -1
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +2 -1
- package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +2 -2
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.d.ts +1 -0
- package/dist/src/functions/wirings/virtual-user/pikku-command-virtual-user-functions.js +42 -0
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +28 -0
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +439 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +2 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +13 -13
- package/dist/src/functions/wirings/workflow/serialize-personas.d.ts +10 -0
- package/dist/src/functions/wirings/workflow/serialize-personas.js +46 -0
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.js +13 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +170 -40
- package/dist/src/functions/workflows/all.workflow.js +55 -16
- package/dist/src/server/bun-server-runner.d.ts +2 -2
- package/dist/src/server/bun-server-runner.js +5 -1
- package/dist/src/server/content-signing-jwt.d.ts +13 -0
- package/dist/src/server/content-signing-jwt.js +51 -0
- package/dist/src/server/dev-server-runner.interface.d.ts +10 -2
- package/dist/src/server/node-server-runner.d.ts +2 -2
- package/dist/src/server/node-server-runner.js +2 -1
- package/dist/src/services/cli-logger.service.d.ts +28 -16
- package/dist/src/services/cli-logger.service.js +25 -16
- package/dist/src/services.d.ts +3 -1
- package/dist/src/services.js +10 -1
- package/dist/src/utils/file-import-path.js +9 -0
- package/dist/src/utils/pikku-cli-config.js +52 -2
- package/dist/src/utils/resolve-personas.d.ts +27 -0
- package/dist/src/utils/resolve-personas.js +35 -0
- package/dist/src/utils/resolve-scaffold-feature.d.ts +19 -0
- package/dist/src/utils/resolve-scaffold-feature.js +49 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -17
- package/dist/.pikku/schemas/schemas/BootstrapInput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/ScenarioRunInput.schema.json +0 -1
- package/dist/.pikku/workflow/pikku-scenario-actors.gen.d.ts +0 -19
- package/dist/.pikku/workflow/pikku-scenario-actors.gen.js +0 -17
- package/dist/src/functions/commands/db-seed.d.ts +0 -1
- package/dist/src/functions/commands/db-seed.js +0 -24
- package/dist/src/functions/db/sqlite/seed.d.ts +0 -11
- package/dist/src/functions/db/sqlite/seed.js +0 -22
- package/dist/src/functions/wirings/workflow/serialize-scenario-actors.d.ts +0 -2
- package/dist/src/functions/wirings/workflow/serialize-scenario-actors.js +0 -40
- package/dist/src/utils/resolve-scenario-actors.d.ts +0 -23
- package/dist/src/utils/resolve-scenario-actors.js +0 -74
- /package/dist/.pikku/schemas/schemas/{DbSeedInput.schema.json → RolesAuditInput.schema.json} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.99
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { template } from '@pikku/core/workflow';
|
|
@@ -11,8 +11,8 @@ import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.
|
|
|
11
11
|
import type { FlattenedWorkflowMap } from './pikku-workflow-map.gen.d.js';
|
|
12
12
|
import type { AgentMap as FlattenedAgentMap } from '../agent/pikku-agent-map.gen.d.js';
|
|
13
13
|
import type { FlattenedScenarioStepMap } from './pikku-scenario-step-map.gen.d.js';
|
|
14
|
-
import type {
|
|
15
|
-
export type {
|
|
14
|
+
import type { TypedPersonas } from './pikku-personas.gen.js';
|
|
15
|
+
export type { TypedPersonas };
|
|
16
16
|
export { template };
|
|
17
17
|
export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
18
18
|
do<K extends keyof FlattenedRPCMap>(stepName: string, rpcName: K, data: FlattenedRPCMap[K]['input'], options?: WorkflowStepOptions): Promise<FlattenedRPCMap[K]['output']>;
|
|
@@ -20,12 +20,12 @@ export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
|
20
20
|
do<T>(stepName: string, fn: () => T | Promise<T>, options?: WorkflowStepOptions): Promise<T>;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* The typed half of a scenario wire: `
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* The typed half of a scenario wire: `given`/`when`/`then`, narrowed to the
|
|
24
|
+
* names declared by `pikkuScenarioStep` in this project. `given` and `when`
|
|
25
|
+
* differ only in the prose the reporter renders; `then` additionally makes the
|
|
26
|
+
* step's bindings witnesses rather than alternatives.
|
|
26
27
|
*/
|
|
27
28
|
export interface TypedScenarioSteps {
|
|
28
|
-
step<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
|
|
29
29
|
given<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
|
|
30
30
|
when<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
|
|
31
31
|
then<K extends keyof FlattenedScenarioStepMap>(stepName: string, stepFunc: K, data?: FlattenedScenarioStepMap[K]['input'], options?: ScenarioStepOptions): Promise<FlattenedScenarioStepMap[K]['output']>;
|
|
@@ -171,9 +171,16 @@ export type PikkuFeatureConfig<Scenarios extends readonly unknown[]> = {
|
|
|
171
171
|
* ```
|
|
172
172
|
*/
|
|
173
173
|
export declare function pikkuFeature<const Scenarios extends readonly unknown[]>(config: PikkuFeatureConfig<Scenarios>): PikkuFeatureConfig<Scenarios>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
/**
|
|
175
|
+
* One surface's implementation of a step.
|
|
176
|
+
*
|
|
177
|
+
* Each binding is typed independently, so a browser binding gets a non-optional
|
|
178
|
+
* `wire.browser` and a cli binding a non-optional `wire.cli` without either
|
|
179
|
+
* leaking into the other.
|
|
180
|
+
*/
|
|
181
|
+
export type PikkuFunctionScenarioStep<In = unknown, Out = never, Surface extends 'browser' | 'cli' | 'default' = 'default'> = PikkuFunctionSessionless<In, Out, Surface extends 'default' ? 'scenarioStep' : 'scenarioStep' | Surface>;
|
|
182
|
+
export type PikkuScenarioStepConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = {
|
|
183
|
+
/** Registered name — this is the string `scenario.given()` references. */
|
|
177
184
|
name: string;
|
|
178
185
|
/**
|
|
179
186
|
* What this step does, for the console and for whoever reads the source. It
|
|
@@ -190,32 +197,102 @@ export type PikkuScenarioStepConfigWithSchema<InputSchema extends StandardSchema
|
|
|
190
197
|
* sentence per call site.
|
|
191
198
|
*/
|
|
192
199
|
template?: string;
|
|
193
|
-
/**
|
|
194
|
-
* This step drives a browser. The runner provisions one for the step's actor
|
|
195
|
-
* before calling it — which also makes an actor mandatory — and `wire.browser`
|
|
196
|
-
* is non-optional inside `func`.
|
|
197
|
-
*/
|
|
198
|
-
browser?: B;
|
|
199
200
|
title?: string;
|
|
200
201
|
tags?: string[];
|
|
201
202
|
input?: InputSchema;
|
|
202
203
|
output?: OutputSchema;
|
|
203
204
|
errors?: Array<typeof PikkuError>;
|
|
204
|
-
|
|
205
|
+
/**
|
|
206
|
+
* Drive this step through a real browser, as a human would. The runner
|
|
207
|
+
* provisions a window for the step's actor first — which makes an actor
|
|
208
|
+
* mandatory — and `wire.browser` is non-optional inside it.
|
|
209
|
+
*
|
|
210
|
+
* Compose shared utilities here rather than writing raw clicks: the step says
|
|
211
|
+
* what the actor is doing, the utilities say how.
|
|
212
|
+
*/
|
|
213
|
+
browser?: PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser'>;
|
|
214
|
+
/** Drive this step remotely, over the websocket. */
|
|
215
|
+
cli?: PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'cli'>;
|
|
216
|
+
/**
|
|
217
|
+
* The server-side path — the fast suite, and the floor every other surface
|
|
218
|
+
* falls back to.
|
|
219
|
+
*
|
|
220
|
+
* On a `then`, this is not an alternative to the other bindings but a second
|
|
221
|
+
* **witness**: the run executes every binding it has and fails if they
|
|
222
|
+
* disagree, because "the row says paid" and "the page says paid" are different
|
|
223
|
+
* claims and the gap between them is the bug nobody catches.
|
|
224
|
+
*/
|
|
225
|
+
default?: PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>;
|
|
205
226
|
};
|
|
206
|
-
export type PikkuScenarioStepConfig<In, Out
|
|
207
|
-
|
|
227
|
+
export type PikkuScenarioStepConfig<In, Out> = Omit<PikkuScenarioStepConfigWithSchema<undefined, undefined>, 'browser' | 'cli' | 'default' | 'input' | 'output'> & {
|
|
228
|
+
browser?: PikkuFunctionScenarioStep<In, Out, 'browser'>;
|
|
229
|
+
cli?: PikkuFunctionScenarioStep<In, Out, 'cli'>;
|
|
230
|
+
default?: PikkuFunctionScenarioStep<In, Out, 'default'>;
|
|
208
231
|
};
|
|
209
232
|
/**
|
|
210
|
-
* A named, reusable scenario step
|
|
211
|
-
*
|
|
212
|
-
*
|
|
233
|
+
* A named, reusable scenario step, declaring one implementation per surface an
|
|
234
|
+
* actor can drive it through.
|
|
235
|
+
*
|
|
236
|
+
* The step's identity is what the actor is trying to do; which surface carries
|
|
237
|
+
* it out is a binding. That is what lets one ladder run through a real browser,
|
|
238
|
+
* over the websocket, or entirely server-side — and what makes "how much of this
|
|
239
|
+
* flow can a human actually reach" a number rather than a guess.
|
|
213
240
|
*
|
|
214
241
|
* Steps are deliberately NOT registered as RPCs: a browser-driving step must
|
|
215
242
|
* never be network-callable.
|
|
216
243
|
*/
|
|
217
|
-
export declare function pikkuScenarioStep<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
218
|
-
export declare function pikkuScenarioStep<In, Out = unknown
|
|
244
|
+
export declare function pikkuScenarioStep<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep' | 'browser' | 'cli', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser' | 'cli' | 'default'>, InputSchema, OutputSchema>;
|
|
245
|
+
export declare function pikkuScenarioStep<In, Out = unknown>(config: PikkuScenarioStepConfig<In, Out>): PikkuFunctionConfig<In, Out, 'scenarioStep' | 'browser' | 'cli'>;
|
|
246
|
+
/**
|
|
247
|
+
* What a step declares when nobody drives it: one implementation, and no
|
|
248
|
+
* surfaces to choose between.
|
|
249
|
+
*
|
|
250
|
+
* `func` rather than `default` is the point. `default` means *the fallback when
|
|
251
|
+
* no other surface applies*, which implies others could exist; `func` says
|
|
252
|
+
* structurally that there is one way this happens. That also keeps the phase
|
|
253
|
+
* rule coherent — an assertion runs every witness it has and fails if they
|
|
254
|
+
* disagree, and this has exactly one by construction.
|
|
255
|
+
*/
|
|
256
|
+
export type PikkuSubjectScenarioStepConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = Omit<PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>, 'browser' | 'cli' | 'default'> & {
|
|
257
|
+
func: PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>;
|
|
258
|
+
};
|
|
259
|
+
export type PikkuSubjectScenarioStepConfig<In, Out> = Omit<PikkuScenarioStepConfig<In, Out>, 'browser' | 'cli' | 'default'> & {
|
|
260
|
+
func: PikkuFunctionScenarioStep<In, Out, 'default'>;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* A step in which the app acts on itself — "Given the platform has expired the
|
|
264
|
+
* trial".
|
|
265
|
+
*
|
|
266
|
+
* The grammatical subject of that sentence is not a user of your app; it **is**
|
|
267
|
+
* your app, which is why it is its own declaration rather than a persona with an
|
|
268
|
+
* asterisk. A persona is a person.
|
|
269
|
+
*
|
|
270
|
+
* Local-test-only, and never in a virtual user's catalogue: a virtual user that
|
|
271
|
+
* could expire its own trial is manufacturing the outcome it exists to discover.
|
|
272
|
+
*/
|
|
273
|
+
export declare function pikkuPlatformScenarioStep<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>;
|
|
274
|
+
export declare function pikkuPlatformScenarioStep<In, Out = unknown>(config: PikkuSubjectScenarioStepConfig<In, Out>): PikkuFunctionConfig<In, Out, 'scenarioStep'>;
|
|
275
|
+
/**
|
|
276
|
+
* A step in which a third-party system acts — "Given Stripe's webhook arrives",
|
|
277
|
+
* "When Mailgun bounces it".
|
|
278
|
+
*
|
|
279
|
+
* `addon` names the addon that wraps that service, the same name its
|
|
280
|
+
* `wireAddon` declares. These steps *are* the mock its consumers currently
|
|
281
|
+
* hand-write: shipped by the addon author, maintained with the addon, and the
|
|
282
|
+
* same artifact that appears in the prose.
|
|
283
|
+
*
|
|
284
|
+
* Note that arranging and asserting are different — "Stripe's webhook arrives"
|
|
285
|
+
* stubs, "Then Stripe was charged" asserts, and only the first is a stub.
|
|
286
|
+
*
|
|
287
|
+
* Local-test-only, and never in a virtual user's catalogue: one that could
|
|
288
|
+
* invoke this would forge its own payment success.
|
|
289
|
+
*/
|
|
290
|
+
export declare function pikkuAddonScenarioStep<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema> & {
|
|
291
|
+
addon: string;
|
|
292
|
+
}): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>;
|
|
293
|
+
export declare function pikkuAddonScenarioStep<In, Out = unknown>(config: PikkuSubjectScenarioStepConfig<In, Out> & {
|
|
294
|
+
addon: string;
|
|
295
|
+
}): PikkuFunctionConfig<In, Out, 'scenarioStep'>;
|
|
219
296
|
type TypedRef<T> = {
|
|
220
297
|
$ref: string;
|
|
221
298
|
path?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.99
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { template } from '@pikku/core/workflow';
|
|
@@ -51,7 +51,27 @@ export function pikkuFeature(config) {
|
|
|
51
51
|
return config;
|
|
52
52
|
}
|
|
53
53
|
export function pikkuScenarioStep(config) {
|
|
54
|
-
|
|
54
|
+
const surfaces = ['browser', 'cli', 'default'].filter((surface) => typeof config[surface] === 'function');
|
|
55
|
+
if (surfaces.length === 0) {
|
|
56
|
+
throw new Error(`[scenario] step '${config.name}' declares no surface bindings. Add at least a \`default\` (server-side) implementation.`);
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
...config,
|
|
60
|
+
surfaces,
|
|
61
|
+
// The runner sets the surface on the wire and calls this once per binding it
|
|
62
|
+
// resolved — every witness of a `then`, exactly one for an action step.
|
|
63
|
+
func: (services, data, wire) => {
|
|
64
|
+
const surface = wire?.scenarioStep?.surface ?? 'default';
|
|
65
|
+
const binding = config[surface] ?? config.default;
|
|
66
|
+
return binding(services, data, wire);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export function pikkuPlatformScenarioStep(config) {
|
|
71
|
+
return { ...config, surfaces: ['default'] };
|
|
72
|
+
}
|
|
73
|
+
export function pikkuAddonScenarioStep(config) {
|
|
74
|
+
return { ...config, surfaces: ['default'] };
|
|
55
75
|
}
|
|
56
76
|
export function pikkuWorkflowGraph(config) {
|
|
57
77
|
return corePikkuWorkflowGraph(config);
|
package/dist/bin/pikku-bin.mjs
CHANGED
|
@@ -11,8 +11,8 @@ async function checkForUpdate() {
|
|
|
11
11
|
})
|
|
12
12
|
if (!res.ok) return
|
|
13
13
|
const { version: latest } = await res.json()
|
|
14
|
-
if (latest !== '0.12.
|
|
15
|
-
process.stderr.write(`\n Update available 0.12.
|
|
14
|
+
if (latest !== '0.12.99') {
|
|
15
|
+
process.stderr.write(`\n Update available 0.12.99 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
|
|
16
16
|
}
|
|
17
17
|
} catch {}
|
|
18
18
|
}
|
package/dist/bin/pikku.js
CHANGED
|
File without changes
|
package/dist/src/cli.wiring.js
CHANGED
|
@@ -22,16 +22,19 @@ import { dbCodegen } from './functions/commands/db-codegen.js';
|
|
|
22
22
|
import { dbCheck } from './functions/commands/db-check.js';
|
|
23
23
|
import { dbBaseline } from './functions/commands/db-baseline.js';
|
|
24
24
|
import { dbExport } from './functions/commands/db-export.js';
|
|
25
|
-
import { dbSeed } from './functions/commands/db-seed.js';
|
|
26
25
|
import { dbReset } from './functions/commands/db-reset.js';
|
|
27
26
|
import { dbAudit } from './functions/commands/db-audit.js';
|
|
28
27
|
import { scopesAudit } from './functions/commands/scopes-audit.js';
|
|
29
28
|
import { scopesPrune } from './functions/commands/scopes-prune.js';
|
|
29
|
+
import { rolesAudit } from './functions/commands/roles-audit.js';
|
|
30
|
+
import { rolesPrune } from './functions/commands/roles-prune.js';
|
|
30
31
|
import { pikkuAudit } from './functions/commands/audit.js';
|
|
31
32
|
import { workspaceValidate, renderWorkspaceValidate, } from './functions/commands/workspace-validate.js';
|
|
32
33
|
import { knowledgeValidate, renderKnowledgeValidate, } from './functions/commands/knowledge-validate.js';
|
|
33
34
|
import { knowledgeIndex, renderKnowledgeIndex, } from './functions/commands/knowledge-index.js';
|
|
34
35
|
import { scenarioRun, scenarioList } from './functions/commands/scenario.js';
|
|
36
|
+
import { personaList, personaRun } from './functions/commands/persona.js';
|
|
37
|
+
import { personaSync } from './functions/commands/persona-sync.js';
|
|
35
38
|
import { pikkuVersionsInit } from './functions/commands/versions-init.js';
|
|
36
39
|
import { pikkuEmailsInit } from './functions/commands/emails-init.js';
|
|
37
40
|
import { pikkuVersionsCheck } from './functions/commands/versions-check.js';
|
|
@@ -92,6 +95,10 @@ wireCLI({
|
|
|
92
95
|
description: 'Fail the build on critical diagnostics. Always on; accepted for symmetry with --fail-on-error/--fail-on-warn.',
|
|
93
96
|
default: true,
|
|
94
97
|
},
|
|
98
|
+
strictMeta: {
|
|
99
|
+
description: "Fail the build when an AI agent's tool has no description. Without one the model is offered the tool under its own name, so this is a quality gate rather than a correctness one — hence off by default. A 'title' does not satisfy it.",
|
|
100
|
+
default: false,
|
|
101
|
+
},
|
|
95
102
|
tsc: {
|
|
96
103
|
description: "After codegen, run a real tsc --noEmit over the project's tsconfig and fail on type errors. Prints full diagnostics with code frames. Off by default.",
|
|
97
104
|
default: false,
|
|
@@ -343,13 +350,15 @@ wireCLI({
|
|
|
343
350
|
func: dbExport,
|
|
344
351
|
description: "Publish this package's schema so projects consuming it as an addon can create its tables",
|
|
345
352
|
}),
|
|
346
|
-
seed: pikkuCLICommand({
|
|
347
|
-
func: dbSeed,
|
|
348
|
-
description: 'Apply db/seed.sql to the dev database',
|
|
349
|
-
}),
|
|
350
353
|
reset: pikkuCLICommand({
|
|
351
354
|
func: dbReset,
|
|
352
|
-
description: 'Wipe and recreate the dev database
|
|
355
|
+
description: 'Wipe and recreate the dev database: migrate, then apply db/<engine>-dev-seed.sql. Dev only — it refuses to run in production',
|
|
356
|
+
options: {
|
|
357
|
+
noSeed: {
|
|
358
|
+
description: 'Stop after migrating, leaving the database empty. For working on an empty-state or onboarding flow the test data would hide',
|
|
359
|
+
default: false,
|
|
360
|
+
},
|
|
361
|
+
},
|
|
353
362
|
}),
|
|
354
363
|
audit: pikkuCLICommand({
|
|
355
364
|
func: dbAudit,
|
|
@@ -377,6 +386,26 @@ wireCLI({
|
|
|
377
386
|
}),
|
|
378
387
|
},
|
|
379
388
|
},
|
|
389
|
+
roles: {
|
|
390
|
+
description: 'Inspect and maintain the roles declared with defineSystemRole',
|
|
391
|
+
subcommands: {
|
|
392
|
+
audit: pikkuCLICommand({
|
|
393
|
+
func: rolesAudit,
|
|
394
|
+
description: 'Report system roles in the database that are no longer declared in code, and how many people hold them',
|
|
395
|
+
}),
|
|
396
|
+
prune: pikkuCLICommand({
|
|
397
|
+
func: rolesPrune,
|
|
398
|
+
description: 'Remove system roles that are no longer declared in code, cascading them out of every user grant',
|
|
399
|
+
options: {
|
|
400
|
+
yes: {
|
|
401
|
+
description: 'Actually delete. Without it, prune only reports the blast radius',
|
|
402
|
+
short: 'y',
|
|
403
|
+
default: false,
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
}),
|
|
407
|
+
},
|
|
408
|
+
},
|
|
380
409
|
knowledge: {
|
|
381
410
|
description: 'Inspect and maintain the knowledge base — what this app is, in the language its users use',
|
|
382
411
|
subcommands: {
|
|
@@ -413,7 +442,7 @@ wireCLI({
|
|
|
413
442
|
subcommands: {
|
|
414
443
|
run: pikkuCLICommand({
|
|
415
444
|
func: scenarioRun,
|
|
416
|
-
description: 'Run scenarios against a configured environment (
|
|
445
|
+
description: 'Run scenarios against a configured environment (environments in pikku.config.json). Actor secret comes from SCENARIO_ACTOR_SECRET.',
|
|
417
446
|
parameters: '<environment>',
|
|
418
447
|
options: {
|
|
419
448
|
flows: {
|
|
@@ -435,9 +464,17 @@ wireCLI({
|
|
|
435
464
|
default: false,
|
|
436
465
|
},
|
|
437
466
|
browser: {
|
|
438
|
-
description: '
|
|
467
|
+
description: 'Shorthand for --run default when false: takes the server-side path instead of driving a browser',
|
|
439
468
|
default: true,
|
|
440
469
|
},
|
|
470
|
+
run: {
|
|
471
|
+
description: "Which surface every actor drives the system through: 'browser' (as a human), 'cli' (over the websocket), or 'default' (server-side, the fast path)",
|
|
472
|
+
default: 'default',
|
|
473
|
+
},
|
|
474
|
+
strict: {
|
|
475
|
+
description: 'Fail rather than pass a `then` that has no witness for --run, i.e. an assertion nobody checked on the surface its prose claims',
|
|
476
|
+
default: false,
|
|
477
|
+
},
|
|
441
478
|
spawn: {
|
|
442
479
|
description: "Start `pikku dev` on the environment's apiUrl for the run and stop it afterwards. Without it, the environment must already be serving",
|
|
443
480
|
default: false,
|
|
@@ -464,6 +501,69 @@ wireCLI({
|
|
|
464
501
|
}),
|
|
465
502
|
},
|
|
466
503
|
},
|
|
504
|
+
persona: {
|
|
505
|
+
description: 'The people this app is for, and running one against a real stage',
|
|
506
|
+
subcommands: {
|
|
507
|
+
run: pikkuCLICommand({
|
|
508
|
+
func: personaRun,
|
|
509
|
+
description: 'Sign in as a declared persona and work the API in character against a configured environment. Not a test runner: it asserts nothing and reports what came back that should not have. The sign-in secret comes from SCENARIO_ACTOR_SECRET.',
|
|
510
|
+
parameters: '<environment> <persona>',
|
|
511
|
+
options: {
|
|
512
|
+
disposition: {
|
|
513
|
+
description: 'How they behave: realistic (default), careless, newcomer, stale, auditor, adversarial',
|
|
514
|
+
short: 'd',
|
|
515
|
+
},
|
|
516
|
+
goals: {
|
|
517
|
+
description: "Comma-separated goals in your own words, run alongside the persona's own and the ones derived from scenarios",
|
|
518
|
+
},
|
|
519
|
+
steps: {
|
|
520
|
+
description: 'Model turns before it stops (default 40)',
|
|
521
|
+
},
|
|
522
|
+
mutations: {
|
|
523
|
+
description: 'Non-read calls before it stops',
|
|
524
|
+
},
|
|
525
|
+
duration: {
|
|
526
|
+
description: "Wall clock before it stops, e.g. '30m'",
|
|
527
|
+
},
|
|
528
|
+
seed: {
|
|
529
|
+
description: 'Replay a previous run — the same seed schedules the same run',
|
|
530
|
+
},
|
|
531
|
+
model: {
|
|
532
|
+
description: 'Model they think with. Defaults to scenarios.model in pikku.config.json',
|
|
533
|
+
},
|
|
534
|
+
allowApproval: {
|
|
535
|
+
description: 'Offer the endpoints the app marked as needing a human\u2019s approval. Off by default: those are the ones that spend money',
|
|
536
|
+
},
|
|
537
|
+
skipRoleCheck: {
|
|
538
|
+
description: 'Start without verifying the declared roles against the stage. For a target whose auth reports roles somewhere pikku cannot read — findings from an unverified run may be seed drift rather than product bugs',
|
|
539
|
+
},
|
|
540
|
+
apiUrl: {
|
|
541
|
+
description: "Override the environment's apiUrl for this run — for a target that only exists at run time, such as a freshly deployed sandbox",
|
|
542
|
+
},
|
|
543
|
+
out: {
|
|
544
|
+
description: 'Write the whole run — every step, response and finding — as JSON to this path',
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
}),
|
|
548
|
+
sync: pikkuCLICommand({
|
|
549
|
+
func: personaSync,
|
|
550
|
+
description: "Provision the declared personas into an environment: create each account and apply the roles it declares. Additive — it never revokes. Needs both the environment's API (to sign in) and its database (to write the grants), and the sign-in secret from SCENARIO_ACTOR_SECRET.",
|
|
551
|
+
parameters: '<environment>',
|
|
552
|
+
options: {
|
|
553
|
+
dryRun: {
|
|
554
|
+
description: 'Report who would be provisioned, with which roles, and why anyone was skipped — without touching anything',
|
|
555
|
+
},
|
|
556
|
+
apiUrl: {
|
|
557
|
+
description: "Override the environment's apiUrl — for a target that only exists at run time, such as a freshly deployed sandbox",
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
}),
|
|
561
|
+
list: pikkuCLICommand({
|
|
562
|
+
func: personaList,
|
|
563
|
+
description: 'List the declared personas — who each one is, what they may do, and what they are trying to get done',
|
|
564
|
+
}),
|
|
565
|
+
},
|
|
566
|
+
},
|
|
467
567
|
fabric: {
|
|
468
568
|
description: 'PikkuFabric commands (login, link, deploy, domains, secrets, logs, …)',
|
|
469
569
|
subcommands: fabricCommands,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Workflow orchestrators dispatch to step units via queue or RPC (inline).
|
|
8
8
|
*/
|
|
9
9
|
import { resolveDeployTarget, } from '@pikku/inspector';
|
|
10
|
+
import { relative } from 'node:path';
|
|
10
11
|
import { isScenarioFunction, withoutScenarios, withoutScenarioWorkflows, } from '../../functions/wirings/scenarios/scenario-partition.js';
|
|
11
12
|
export function analyzeDeployment(state, options) {
|
|
12
13
|
const serverlessIncompatible = new Set(options.serverlessIncompatible ?? []);
|
|
@@ -353,10 +354,22 @@ export function analyzeDeployment(state, options) {
|
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
// ── Secrets & Variables ────────────────────────────────────────────
|
|
357
|
+
const readSecretIds = new Set();
|
|
358
|
+
const unresolvedSecretReads = [];
|
|
359
|
+
for (const [file, usage] of state.secrets.usage ?? []) {
|
|
360
|
+
for (const key of usage.keys) {
|
|
361
|
+
readSecretIds.add(key);
|
|
362
|
+
}
|
|
363
|
+
for (const read of usage.dynamic) {
|
|
364
|
+
unresolvedSecretReads.push(`${relative(state.rootDir, file)}:${read}`);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
356
367
|
const secrets = state.secrets.definitions.map((s) => ({
|
|
357
368
|
secretId: s.secretId,
|
|
358
369
|
displayName: s.displayName,
|
|
359
370
|
description: s.description,
|
|
371
|
+
allowedHosts: s.allowedHosts,
|
|
372
|
+
read: readSecretIds.has(s.secretId),
|
|
360
373
|
}));
|
|
361
374
|
const variables = state.variables.definitions.map((v) => ({
|
|
362
375
|
variableId: v.variableId,
|
|
@@ -374,6 +387,7 @@ export function analyzeDeployment(state, options) {
|
|
|
374
387
|
mcpEndpoints,
|
|
375
388
|
workflows,
|
|
376
389
|
secrets,
|
|
390
|
+
unresolvedSecretReads: unresolvedSecretReads.sort(),
|
|
377
391
|
variables,
|
|
378
392
|
};
|
|
379
393
|
}
|
|
@@ -101,7 +101,13 @@ export interface SecretDeclaration {
|
|
|
101
101
|
secretId: string;
|
|
102
102
|
displayName: string;
|
|
103
103
|
description?: string;
|
|
104
|
+
/** Hosts this secret may be sent to. Absent means unrestricted. */
|
|
105
|
+
allowedHosts?: string[];
|
|
106
|
+
/** True when some code reads this secret with a statically resolvable key. */
|
|
107
|
+
read?: boolean;
|
|
104
108
|
}
|
|
109
|
+
/** Secret reads whose key the inspector could not resolve, as `file:line:source`. */
|
|
110
|
+
export type UnresolvedSecretRead = string;
|
|
105
111
|
export interface VariableDeclaration {
|
|
106
112
|
variableId: string;
|
|
107
113
|
displayName: string;
|
|
@@ -118,5 +124,10 @@ export interface DeploymentManifest {
|
|
|
118
124
|
mcpEndpoints: MCPEndpointDefinition[];
|
|
119
125
|
workflows: WorkflowDefinition[];
|
|
120
126
|
secrets: SecretDeclaration[];
|
|
127
|
+
/**
|
|
128
|
+
* Reads with a non-literal key. A deployment can only narrow a unit's secret
|
|
129
|
+
* scope to the declared set when this is empty.
|
|
130
|
+
*/
|
|
131
|
+
unresolvedSecretReads: UnresolvedSecretRead[];
|
|
121
132
|
variables: VariableDeclaration[];
|
|
122
133
|
}
|