@pikku/cli 0.12.128 → 0.12.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +230 -0
- package/console-app/assets/{abnfDiagram-N423BO3Z-BY2LM8wi.js → abnfDiagram-N423BO3Z-BQPUva28.js} +1 -1
- package/console-app/assets/architecture-TIHT7OUA-G_ldr-C2.js +1 -0
- package/console-app/assets/{architectureDiagram-T3A2C74G-CeqjY3Kw.js → architectureDiagram-T3A2C74G-Cjzy66o9.js} +1 -1
- package/console-app/assets/{blockDiagram-VBNYF7ZC-BW5174xj.js → blockDiagram-VBNYF7ZC-DVasSXpX.js} +1 -1
- package/console-app/assets/{c4Diagram-5PPSVZJV-B7zXAFL0.js → c4Diagram-5PPSVZJV-FB0YMoOr.js} +1 -1
- package/console-app/assets/channel-CuDpOUYn.js +1 -0
- package/console-app/assets/{chunk-2GRJ4B5K-BfRYzQ4t.js → chunk-2GRJ4B5K-BLGsmyy4.js} +1 -1
- package/console-app/assets/{chunk-4I5QYGJK-DBA7-Nu4.js → chunk-4I5QYGJK-DCgTj78f.js} +1 -1
- package/console-app/assets/{chunk-5RXB4S5H-D03lNzwi.js → chunk-5RXB4S5H-CX9hS68x.js} +1 -1
- package/console-app/assets/{chunk-6Q2QTUOP-DloGRHJZ.js → chunk-6Q2QTUOP-xrgFRP4Y.js} +1 -1
- package/console-app/assets/{chunk-7Z6QIM7H-DH3uHtl2.js → chunk-7Z6QIM7H-CbBMe7ej.js} +1 -1
- package/console-app/assets/{chunk-GF5L2VYU-Cu252lza.js → chunk-GF5L2VYU-BXraqZ7w.js} +1 -1
- package/console-app/assets/{chunk-I66GZJ75-DH54FcuO.js → chunk-I66GZJ75-CbpQtX8e.js} +1 -1
- package/console-app/assets/{chunk-JQJVKLGR-CeFuTL-V.js → chunk-JQJVKLGR-Cp9FHSH6.js} +1 -1
- package/console-app/assets/{chunk-KBJHAD2P-B-prFo0-.js → chunk-KBJHAD2P-Brvmen34.js} +1 -1
- package/console-app/assets/{chunk-NSK5VX7P-C10iA4GS.js → chunk-NSK5VX7P-Bo-dbDZD.js} +1 -1
- package/console-app/assets/{chunk-QR6OTTB3-Cd8apAsA.js → chunk-QR6OTTB3-B5Al5KEo.js} +1 -1
- package/console-app/assets/{chunk-RYQCIY6F-rfPUp2Fj.js → chunk-RYQCIY6F-WOZyn5It.js} +1 -1
- package/console-app/assets/{chunk-UBXNYLIW-D25wqJBc.js → chunk-UBXNYLIW-D9OoHV5X.js} +1 -1
- package/console-app/assets/{chunk-W5SLKNZC-CJvxkxuK.js → chunk-W5SLKNZC-BNTcVpi3.js} +1 -1
- package/console-app/assets/{chunk-WRU74C26-B9Wju92P.js → chunk-WRU74C26-DXijYjrx.js} +1 -1
- package/console-app/assets/chunk-XXDRQBXY-DRMEt0Gf.js +1 -0
- package/console-app/assets/classDiagram-JCYQIIEL-Bjgk6QkN.js +1 -0
- package/console-app/assets/classDiagram-v2-OCEON4UE-Bjgk6QkN.js +1 -0
- package/console-app/assets/{cose-bilkent-JH36ORCC-CwA1VCP5.js → cose-bilkent-JH36ORCC-CPN5VkQC.js} +1 -1
- package/console-app/assets/{cynefin-VYW2F7L2-C_qsD7eR.js → cynefin-VYW2F7L2-CuBPO3Z0.js} +1 -1
- package/console-app/assets/{cynefinDiagram-MW4NZA55-CkSLreFW.js → cynefinDiagram-MW4NZA55-BYc2PGXv.js} +1 -1
- package/console-app/assets/{dagre-WqgBlKb7.js → dagre-7HV9Jfb_.js} +1 -1
- package/console-app/assets/{dagre-VZM6K2ZE-0ssqLoHs.js → dagre-VZM6K2ZE-BpPyuM7i.js} +1 -1
- package/console-app/assets/{diagram-7IWD3JNH-DmRL3lmL.js → diagram-7IWD3JNH-DTH9ID9z.js} +1 -1
- package/console-app/assets/{diagram-B4RE2ZJO-Bsr9wG4I.js → diagram-B4RE2ZJO-DwZb9gPm.js} +1 -1
- package/console-app/assets/{diagram-LBJQPF4R-DdMw1FSY.js → diagram-LBJQPF4R-DfvBayzk.js} +1 -1
- package/console-app/assets/{diagram-Q27KOJAE-TPx5TB2B.js → diagram-Q27KOJAE-hksFpSxs.js} +1 -1
- package/console-app/assets/{diagram-UB23O5K3-e_1zSlZR.js → diagram-UB23O5K3-5hEVCouO.js} +1 -1
- package/console-app/assets/{ebnfDiagram-BXEA7PRR-BACajh2b.js → ebnfDiagram-BXEA7PRR-D0v6RJvf.js} +1 -1
- package/console-app/assets/{erDiagram-JOGREHBK-CojomKqL.js → erDiagram-JOGREHBK-DGps-M4l.js} +1 -1
- package/console-app/assets/eventmodeling-45OFAUF4-DWRslJcU.js +1 -0
- package/console-app/assets/flowDiagram-UKHOOZJN-CE3qN_pH.js +1 -0
- package/console-app/assets/{ganttDiagram-PKOTCBZU-yoOX4Xj2.js → ganttDiagram-PKOTCBZU-Dok7ME1t.js} +1 -1
- package/console-app/assets/{gitGraph-TEB2WS4Q-BcUY5hIc.js → gitGraph-TEB2WS4Q-8492lYYh.js} +1 -1
- package/console-app/assets/{gitGraphDiagram-DS77QQ5N-BtuIPjuB.js → gitGraphDiagram-DS77QQ5N-sPOnBy5f.js} +1 -1
- package/console-app/assets/{index-CzWW052c.js → index-DqNqujdF.js} +184 -184
- package/console-app/assets/{info-DKCQHKI2-B-iR9PUz.js → info-DKCQHKI2-U4uEmX4H.js} +1 -1
- package/console-app/assets/{infoDiagram-6WML65LV-CuXKIFH2.js → infoDiagram-6WML65LV-CNV12_Nx.js} +1 -1
- package/console-app/assets/{ishikawaDiagram-WSZJBQD7-CSueMFD6.js → ishikawaDiagram-WSZJBQD7-CcnTBGLj.js} +1 -1
- package/console-app/assets/{journeyDiagram-NVQOT4AX-kvnKStZp.js → journeyDiagram-NVQOT4AX-MX-UQBJ7.js} +1 -1
- package/console-app/assets/{kanban-definition-27J2QSJJ-CGGDEz30.js → kanban-definition-27J2QSJJ-BXh1Eu4D.js} +1 -1
- package/console-app/assets/{line-mtMM5-xO.js → line-2B2dlQbw.js} +1 -1
- package/console-app/assets/{linear-CLSje0O_.js → linear-DAVRH-Dp.js} +1 -1
- package/console-app/assets/{mermaid-parser.core-Cx6yvn3j.js → mermaid-parser.core-DxPo1qbR.js} +3 -3
- package/console-app/assets/{mermaid.core-BebGyklS.js → mermaid.core-DpvXaF3y.js} +4 -4
- package/console-app/assets/{mindmap-definition-FAOFIHXS-C2_WUUJ9.js → mindmap-definition-FAOFIHXS-wIEKn4qe.js} +1 -1
- package/console-app/assets/{packet-7NZHBO7P-Dh5yNCA8.js → packet-7NZHBO7P-CXySycDQ.js} +1 -1
- package/console-app/assets/{pegDiagram-VL7TDLO6-XgUxesi8.js → pegDiagram-VL7TDLO6-CDGkzO6q.js} +1 -1
- package/console-app/assets/{pie-RZYD4A2V-D2x2RAXI.js → pie-RZYD4A2V-9woSahH7.js} +1 -1
- package/console-app/assets/{pieDiagram-7S7Q4E2Y-Bbor0KbG.js → pieDiagram-7S7Q4E2Y-DLoZWnVF.js} +1 -1
- package/console-app/assets/{quadrantDiagram-CIZ2JOQS-DZmnMHpM.js → quadrantDiagram-CIZ2JOQS-NBGRoga7.js} +1 -1
- package/console-app/assets/{radar-I7S5WNFK-CPeriDtN.js → radar-I7S5WNFK-BYhW66ZA.js} +1 -1
- package/console-app/assets/{railroad-3IZDKUUU-2iKAyaie.js → railroad-3IZDKUUU-BqHXlwF5.js} +1 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-BfGOy69e.js +1 -0
- package/console-app/assets/railroad-ebnf-EBAXGLYW-BbGv9WfS.js +1 -0
- package/console-app/assets/railroad-peg-LSFZ7HO6-CCiPI8BL.js +1 -0
- package/console-app/assets/{railroadDiagram-AXF67PYL-DVEqCXoo.js → railroadDiagram-AXF67PYL-FYQaHJ6A.js} +1 -1
- package/console-app/assets/{requirementDiagram-LRYGKXZP-CSgSNL8p.js → requirementDiagram-LRYGKXZP-ihhW1kgC.js} +1 -1
- package/console-app/assets/{sankeyDiagram-W5VNT64P-CFk11odN.js → sankeyDiagram-W5VNT64P-Dw2EbW8v.js} +1 -1
- package/console-app/assets/{sequenceDiagram-SI44F4Z6-Cb5u6FsJ.js → sequenceDiagram-SI44F4Z6-C6i_U4QX.js} +1 -1
- package/console-app/assets/{src-LceHEY_Q.js → src-DF-84qwJ.js} +1 -1
- package/console-app/assets/{stateDiagram-OKZ733FA-DM1jWlkU.js → stateDiagram-OKZ733FA-xH4wcMO4.js} +1 -1
- package/console-app/assets/stateDiagram-v2-UEYNNEHI-BJln5PLd.js +1 -0
- package/console-app/assets/{swimlanes-SLNWSIFB-DD6MchlE.js → swimlanes-SLNWSIFB-CkFlU1Qc.js} +1 -1
- package/console-app/assets/swimlanesDiagram-ULZ7WXOC-CSLhmtbh.js +8 -0
- package/console-app/assets/{timeline-definition-Z64GVDOM-zu5cNnVv.js → timeline-definition-Z64GVDOM-BQE9-7mm.js} +1 -1
- package/console-app/assets/{treeView-QDETBFTQ-D_4IbvCG.js → treeView-QDETBFTQ-C4hse2Wn.js} +1 -1
- package/console-app/assets/{treemap-6X3UGDF4-DNc6bjUc.js → treemap-6X3UGDF4-Bi7ORgq6.js} +1 -1
- package/console-app/assets/{vennDiagram-T6HMQDX7-DfqoG28f.js → vennDiagram-T6HMQDX7-DbUdNREA.js} +1 -1
- package/console-app/assets/{wardley-OPB4EBWU-BqpI2Lx-.js → wardley-OPB4EBWU-BHqXIxRe.js} +1 -1
- package/console-app/assets/{wardleyDiagram-T6FBY63Y-CLIZSvNi.js → wardleyDiagram-T6FBY63Y-1VOvM_bb.js} +1 -1
- package/console-app/assets/{xychartDiagram-ELKLHX3M-Cni-XXa6.js → xychartDiagram-ELKLHX3M-C3DVfSR9.js} +1 -1
- package/console-app/index.html +1 -1
- package/dist/.pikku/addon/index.d.ts +1 -1
- package/dist/.pikku/addon/index.js +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
- package/dist/.pikku/agent/index.d.ts +1 -1
- package/dist/.pikku/agent/index.js +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/auth/index.d.ts +1 -1
- package/dist/.pikku/auth/index.js +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
- package/dist/.pikku/channel/index.d.ts +1 -1
- package/dist/.pikku/channel/index.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/index.d.ts +1 -1
- package/dist/.pikku/cli/index.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +26 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +85 -0
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/error/index.d.ts +1 -1
- package/dist/.pikku/error/index.js +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
- package/dist/.pikku/function/index.d.ts +1 -1
- package/dist/.pikku/function/index.js +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +95 -0
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/gateway/index.d.ts +1 -1
- package/dist/.pikku/gateway/index.js +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
- package/dist/.pikku/http/index.d.ts +1 -1
- package/dist/.pikku/http/index.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/index.d.ts +1 -1
- package/dist/.pikku/mcp/index.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/middleware/index.d.ts +1 -1
- package/dist/.pikku/middleware/index.js +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
- package/dist/.pikku/middleware/pikku-middleware-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-services.gen.d.ts +1 -1
- package/dist/.pikku/queue/index.d.ts +1 -1
- package/dist/.pikku/queue/index.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 +5 -0
- package/dist/.pikku/scenarios/index.d.ts +1 -1
- package/dist/.pikku/scenarios/index.js +1 -1
- package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -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-types.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/index.d.ts +1 -1
- package/dist/.pikku/scheduler/index.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 +21 -1
- package/dist/.pikku/schemas/schemas/KnowledgePlanDeferInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanDeferOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanProgressInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanProgressOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanSchemaInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanSchemaOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanSetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanSetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanShowInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/KnowledgePlanShowOutput.schema.json +1 -0
- package/dist/.pikku/scopes/index.d.ts +1 -1
- package/dist/.pikku/scopes/index.js +1 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/index.d.ts +1 -1
- package/dist/.pikku/secrets/index.js +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/setup/index.d.ts +1 -1
- package/dist/.pikku/setup/index.js +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
- package/dist/.pikku/trigger/index.d.ts +1 -1
- package/dist/.pikku/trigger/index.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/index.d.ts +1 -1
- package/dist/.pikku/variables/index.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/index.d.ts +1 -1
- package/dist/.pikku/workflow/index.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/cli.wiring.js +47 -0
- package/dist/src/deploy/analyzer/analyzer.js +42 -6
- package/dist/src/deploy/build-pipeline.js +92 -4
- package/dist/src/deploy/codegen/per-unit-codegen.d.ts +10 -0
- package/dist/src/deploy/codegen/per-unit-codegen.js +12 -1
- package/dist/src/deploy/server-entry.js +14 -1
- package/dist/src/functions/commands/knowledge-plan.d.ts +112 -0
- package/dist/src/functions/commands/knowledge-plan.js +35 -0
- package/dist/src/functions/db/local-db.d.ts +1 -1
- package/dist/src/functions/db/local-db.js +5 -5
- package/dist/src/functions/db/postgres/postgres-introspector.js +1 -1
- package/dist/src/functions/db/sqlite/dev-seed.d.ts +1 -1
- package/dist/src/functions/db/sqlite/sqlite-introspector.d.ts +1 -1
- package/dist/src/functions/db/sqlite/sqlite-introspector.js +1 -1
- package/dist/src/functions/db/sqlite/sqlite-kysely.d.ts +1 -1
- package/dist/src/functions/knowledge/render.d.ts +6 -1
- package/dist/src/functions/knowledge/render.js +74 -0
- package/dist/src/functions/knowledge/schemas.d.ts +45 -0
- package/dist/src/functions/knowledge/schemas.js +11 -1
- package/dist/src/functions/surface/surface-editorial.js +12 -12
- package/dist/src/functions/validate/shared-checks.js +1 -1
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -10
- package/surface.json +23 -29
- package/console-app/assets/architecture-TIHT7OUA-CWwmvxZF.js +0 -1
- package/console-app/assets/channel-pOkwZ_Ot.js +0 -1
- package/console-app/assets/chunk-XXDRQBXY-BU_UP6f5.js +0 -1
- package/console-app/assets/classDiagram-JCYQIIEL-CLBKUuxj.js +0 -1
- package/console-app/assets/classDiagram-v2-OCEON4UE-CLBKUuxj.js +0 -1
- package/console-app/assets/eventmodeling-45OFAUF4-DkN2KCrT.js +0 -1
- package/console-app/assets/flowDiagram-UKHOOZJN-DL0M9lBc.js +0 -1
- package/console-app/assets/railroad-abnf-AHOZXSZD-D26xz4MM.js +0 -1
- package/console-app/assets/railroad-ebnf-EBAXGLYW-CCAiMPWc.js +0 -1
- package/console-app/assets/railroad-peg-LSFZ7HO6-BA1zcisq.js +0 -1
- package/console-app/assets/stateDiagram-v2-UEYNNEHI-COVnPYic.js +0 -1
- package/console-app/assets/swimlanesDiagram-ULZ7WXOC-B5q8iRCQ.js +0 -8
- package/dist/src/functions/db/db-migrator.d.ts +0 -63
- package/dist/src/functions/db/db-migrator.js +0 -136
- package/dist/src/functions/db/migration-identifiers.d.ts +0 -58
- package/dist/src/functions/db/migration-identifiers.js +0 -262
- package/dist/src/functions/db/postgres/postgres-migrator.d.ts +0 -15
- package/dist/src/functions/db/postgres/postgres-migrator.js +0 -40
- package/dist/src/functions/db/schema-sql.d.ts +0 -43
- package/dist/src/functions/db/schema-sql.js +0 -135
- package/dist/src/functions/db/sqlite/sqlite-migrator.d.ts +0 -11
- package/dist/src/functions/db/sqlite/sqlite-migrator.js +0 -41
- package/dist/src/functions/db/sqlite/sqlite-runtime-bun.d.ts +0 -2
- package/dist/src/functions/db/sqlite/sqlite-runtime-bun.js +0 -62
- package/dist/src/functions/db/sqlite/sqlite-runtime-node.d.ts +0 -2
- package/dist/src/functions/db/sqlite/sqlite-runtime-node.js +0 -78
- package/dist/src/functions/db/sqlite/sqlite-runtime.d.ts +0 -20
- package/dist/src/functions/db/sqlite/sqlite-runtime.js +0 -13
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Runs: analyze → per-unit codegen → entry generation → bundle → configs
|
|
5
5
|
* Outputs everything to .deploy/<provider>/ without deploying.
|
|
6
6
|
*/
|
|
7
|
-
import { join } from 'node:path';
|
|
8
|
-
import { existsSync } from 'node:fs';
|
|
9
|
-
import { mkdir, writeFile, copyFile } from 'node:fs/promises';
|
|
7
|
+
import { join, relative } from 'node:path';
|
|
8
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
9
|
+
import { cp, mkdir, writeFile, copyFile } from 'node:fs/promises';
|
|
10
10
|
import { PikkuError } from '@pikku/core/errors';
|
|
11
11
|
import { analyzeDeployment } from './analyzer/index.js';
|
|
12
12
|
import { withoutScenarios } from '../functions/wirings/scenarios/scenario-partition.js';
|
|
@@ -61,6 +61,88 @@ function findLockfile(projectDir) {
|
|
|
61
61
|
}
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The database a standalone bundle has to open for itself.
|
|
66
|
+
*
|
|
67
|
+
* Every other provider deploys onto a host that supplies `kysely` — `pikku dev`
|
|
68
|
+
* builds one, a Cloudflare deploy binds one — so `createSingletonServices` is
|
|
69
|
+
* written expecting it. A standalone artifact has no host, and shipped one that
|
|
70
|
+
* never got a connection at all: the app booted straight into whatever its
|
|
71
|
+
* services factory does when the database is missing, which for the generated
|
|
72
|
+
* templates is a throw.
|
|
73
|
+
*
|
|
74
|
+
* Engine comes from the migrations directory rather than the user config,
|
|
75
|
+
* because that is the same signal `loadUserConfigForDb` falls back to and it
|
|
76
|
+
* needs no module loading here. `db/sqlite` and `db/postgres` are the two
|
|
77
|
+
* conventions the migrator already writes to, so a project declares its engine
|
|
78
|
+
* by having written migrations for it.
|
|
79
|
+
*
|
|
80
|
+
* Both at once is refused rather than resolved. Picking one would be picking
|
|
81
|
+
* which database the deployed app talks to on the strength of directory order,
|
|
82
|
+
* and the failure — an app running happily against the wrong, fully valid
|
|
83
|
+
* schema — is invisible until someone reads the data.
|
|
84
|
+
*
|
|
85
|
+
* The migrations are copied in beside the bundle under the same `db/<engine>/`
|
|
86
|
+
* path they have in the project, which is also where Fabric's build container
|
|
87
|
+
* stages them. Two producers writing the artifact cannot disagree about where
|
|
88
|
+
* the SQL lives, and `bundle.js db migrate` finds it either way.
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* The project's declared version, or nothing.
|
|
92
|
+
*
|
|
93
|
+
* Absent is a real answer — a project need not version itself — and is better
|
|
94
|
+
* reported as unknown than as a number this made up.
|
|
95
|
+
*/
|
|
96
|
+
function resolveProjectVersion(projectDir) {
|
|
97
|
+
try {
|
|
98
|
+
const pkg = JSON.parse(readFileSync(join(projectDir, 'package.json'), 'utf-8'));
|
|
99
|
+
return typeof pkg.version === 'string' ? pkg.version : undefined;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function resolveStandaloneDb(projectDir, pikkuDir, unitDir) {
|
|
106
|
+
const hasSqlite = existsSync(join(projectDir, 'db', 'sqlite'));
|
|
107
|
+
const hasPostgres = existsSync(join(projectDir, 'db', 'postgres'));
|
|
108
|
+
if (hasSqlite && hasPostgres) {
|
|
109
|
+
throw new Error('This project has both db/sqlite and db/postgres migrations, so a standalone build cannot tell which database the app is meant to open. Keep the one this app deploys against.');
|
|
110
|
+
}
|
|
111
|
+
const engine = hasSqlite ? 'sqlite' : hasPostgres ? 'postgres' : undefined;
|
|
112
|
+
if (!engine)
|
|
113
|
+
return undefined;
|
|
114
|
+
await cp(join(projectDir, 'db', engine), join(unitDir, 'db', engine), {
|
|
115
|
+
recursive: true,
|
|
116
|
+
});
|
|
117
|
+
// Absent for an app that annotates no columns, which is a database with
|
|
118
|
+
// nothing to coerce rather than a reason to hand the app no database.
|
|
119
|
+
const coercionFile = join(pikkuDir, 'db', 'coercion.gen.ts');
|
|
120
|
+
if (!existsSync(coercionFile))
|
|
121
|
+
return { engine };
|
|
122
|
+
let rel = relative(unitDir, coercionFile).replace(/\\/g, '/');
|
|
123
|
+
if (!rel.startsWith('.'))
|
|
124
|
+
rel = `./${rel}`;
|
|
125
|
+
return { engine, coercionImportPath: rel.replace(/\.ts$/, '.js') };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The app's server lifecycle, for entries that can call it.
|
|
129
|
+
*
|
|
130
|
+
* The hooks are resolved to an import rather than read at build time because
|
|
131
|
+
* they are the app's own code and have to run in the app's own process, with
|
|
132
|
+
* the services that process built.
|
|
133
|
+
*/
|
|
134
|
+
function resolveLifecycle(unitDir, state) {
|
|
135
|
+
const factory = state.filesAndMethods.serverLifecycleFactory;
|
|
136
|
+
if (!factory)
|
|
137
|
+
return undefined;
|
|
138
|
+
let rel = relative(unitDir, factory.file).replace(/\\/g, '/');
|
|
139
|
+
if (!rel.startsWith('.'))
|
|
140
|
+
rel = `./${rel}`;
|
|
141
|
+
return {
|
|
142
|
+
importPath: rel.replace(/\.tsx?$/, '.js'),
|
|
143
|
+
variable: factory.variable,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
64
146
|
export async function runBuildPipeline(options) {
|
|
65
147
|
const { projectDir, projectId, provider, inspectorState, getEntryContext, debugArtifacts, logger, bundler, } = options;
|
|
66
148
|
const deployDir = options.deployDir ?? join(projectDir, '.deploy');
|
|
@@ -115,6 +197,9 @@ export async function runBuildPipeline(options) {
|
|
|
115
197
|
const ctx = {
|
|
116
198
|
...getEntryContext(unitDir, pikkuDir, singleUnit, inspectorState),
|
|
117
199
|
frontend: frontendMount,
|
|
200
|
+
version: resolveProjectVersion(projectDir),
|
|
201
|
+
db: await resolveStandaloneDb(projectDir, pikkuDir, unitDir),
|
|
202
|
+
lifecycle: resolveLifecycle(unitDir, inspectorState),
|
|
118
203
|
};
|
|
119
204
|
const source = provider.generateEntrySource(ctx);
|
|
120
205
|
const entryPath = join(unitDir, 'entry.ts');
|
|
@@ -228,7 +313,10 @@ export async function runBuildPipeline(options) {
|
|
|
228
313
|
const unitDir = unit.target === 'server' ? containerDir : join(unitsDir, unit.name);
|
|
229
314
|
const entryPath = join(unitDir, 'entry.ts');
|
|
230
315
|
await mkdir(unitDir, { recursive: true });
|
|
231
|
-
const ctx =
|
|
316
|
+
const ctx = {
|
|
317
|
+
...getEntryContext(unitDir, pikkuDir, unit, inspectorState),
|
|
318
|
+
lifecycle: resolveLifecycle(unitDir, inspectorState),
|
|
319
|
+
};
|
|
232
320
|
const source = unit.target === 'server'
|
|
233
321
|
? (provider.generateServerEntrySource?.(ctx) ??
|
|
234
322
|
generateServerEntrySource(ctx))
|
|
@@ -42,6 +42,16 @@ export interface PerUnitCodegenResult {
|
|
|
42
42
|
error: string;
|
|
43
43
|
}>;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Collect the full set of filter names for a deployment unit.
|
|
47
|
+
*
|
|
48
|
+
* The --names filter matches against different identifier types depending
|
|
49
|
+
* on the metadata being filtered (function names, agent names, channel
|
|
50
|
+
* names, etc.). For a unit to get its complete metadata, we need to
|
|
51
|
+
* include both the function IDs and any wiring-level names (e.g. agent
|
|
52
|
+
* names, channel names) that reference those functions.
|
|
53
|
+
*/
|
|
54
|
+
export declare function collectFilterNames(unit: DeploymentUnit, manifest: DeploymentManifest, inspectorState: InspectorState, workflowQueues: boolean): string[];
|
|
45
55
|
/**
|
|
46
56
|
* Runs filtered codegen for each deployment unit.
|
|
47
57
|
*
|
|
@@ -34,7 +34,7 @@ function resolvePikkuBin() {
|
|
|
34
34
|
* include both the function IDs and any wiring-level names (e.g. agent
|
|
35
35
|
* names, channel names) that reference those functions.
|
|
36
36
|
*/
|
|
37
|
-
function collectFilterNames(unit, manifest, inspectorState, workflowQueues) {
|
|
37
|
+
export function collectFilterNames(unit, manifest, inspectorState, workflowQueues) {
|
|
38
38
|
const names = new Set(unit.functionIds);
|
|
39
39
|
// Include catch-all scaffold routes based on unit contents
|
|
40
40
|
const functionsMeta = inspectorState.functions.meta;
|
|
@@ -103,6 +103,17 @@ function collectFilterNames(unit, manifest, inspectorState, workflowQueues) {
|
|
|
103
103
|
if (handler.type === 'scheduled')
|
|
104
104
|
names.add(handler.taskName);
|
|
105
105
|
}
|
|
106
|
+
// `runAgent(...)` / `rpc.agent.run(...)` look the agent up in the
|
|
107
|
+
// in-process registry, so a function that calls one needs the agent's
|
|
108
|
+
// wiring — and its tools — bundled into its OWN unit, not just into
|
|
109
|
+
// the agent gateway unit.
|
|
110
|
+
for (const agentName of unit.invokedAgents ?? []) {
|
|
111
|
+
names.add(agentName);
|
|
112
|
+
const agentDef = manifest.agents.find((a) => a.name === agentName);
|
|
113
|
+
for (const id of agentDef?.toolFunctionIds ?? [])
|
|
114
|
+
names.add(id);
|
|
115
|
+
names.add('/rpc/:rpcName');
|
|
116
|
+
}
|
|
106
117
|
// Function units with workflow-state capability (workflow-starter,
|
|
107
118
|
// workflow-runner, workflow-status-checker) call rpc.startWorkflow
|
|
108
119
|
// and look workflows up by name in the registry. The registry is
|
|
@@ -18,6 +18,11 @@ export function generateServerEntrySource(ctx) {
|
|
|
18
18
|
ctx.configImport,
|
|
19
19
|
ctx.servicesImport,
|
|
20
20
|
ctx.mcpImport,
|
|
21
|
+
...(ctx.lifecycle
|
|
22
|
+
? [
|
|
23
|
+
`import { ${ctx.lifecycle.variable} as __pikkuLifecycle } from '${ctx.lifecycle.importPath}'`,
|
|
24
|
+
]
|
|
25
|
+
: []),
|
|
21
26
|
`import '${ctx.bootstrapPath}'`,
|
|
22
27
|
``,
|
|
23
28
|
`const PORT = Number(process.env.PORT ?? 8080)`,
|
|
@@ -33,9 +38,17 @@ export function generateServerEntrySource(ctx) {
|
|
|
33
38
|
` singletonServices.logger,`,
|
|
34
39
|
` { ${ctx.mcpServerOption}}`,
|
|
35
40
|
` )`,
|
|
36
|
-
` server.enableExitOnSignals(
|
|
41
|
+
` server.enableExitOnSignals(${ctx.lifecycle
|
|
42
|
+
? `{ beforeStop: () => __pikkuLifecycle?.beforeStop?.(singletonServices), afterStop: () => __pikkuLifecycle?.afterStop?.(singletonServices) }`
|
|
43
|
+
: ''})`,
|
|
37
44
|
` await server.init()`,
|
|
45
|
+
...(ctx.lifecycle
|
|
46
|
+
? [` await __pikkuLifecycle?.beforeStart?.(singletonServices)`]
|
|
47
|
+
: []),
|
|
38
48
|
` await server.start()`,
|
|
49
|
+
...(ctx.lifecycle
|
|
50
|
+
? [` await __pikkuLifecycle?.afterStart?.(singletonServices)`]
|
|
51
|
+
: []),
|
|
39
52
|
`}`,
|
|
40
53
|
``,
|
|
41
54
|
`main().catch((err) => {`,
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { renderKnowledgePlanDefer, renderKnowledgePlanProgress, renderKnowledgePlanSchema, renderKnowledgePlanSet, renderKnowledgePlanShow } from '../knowledge/render.js';
|
|
2
|
+
export declare const knowledgePlanSchema: import("#pikku/function").PikkuFunctionConfig<Record<string, never>, {
|
|
3
|
+
schema: string;
|
|
4
|
+
}, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<Record<string, never>, {
|
|
5
|
+
schema: string;
|
|
6
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<Record<string, never>, {
|
|
7
|
+
schema: string;
|
|
8
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
9
|
+
export declare const knowledgePlanShow: import("#pikku/function").PikkuFunctionConfig<{
|
|
10
|
+
milestone: string;
|
|
11
|
+
forBuild?: boolean | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
ok: boolean;
|
|
14
|
+
path: string;
|
|
15
|
+
body: string;
|
|
16
|
+
}, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<{
|
|
17
|
+
milestone: string;
|
|
18
|
+
forBuild?: boolean | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
ok: boolean;
|
|
21
|
+
path: string;
|
|
22
|
+
body: string;
|
|
23
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<{
|
|
24
|
+
milestone: string;
|
|
25
|
+
forBuild?: boolean | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
ok: boolean;
|
|
28
|
+
path: string;
|
|
29
|
+
body: string;
|
|
30
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
31
|
+
export declare const knowledgePlanProgress: import("#pikku/function").PikkuFunctionConfig<{
|
|
32
|
+
milestone: string;
|
|
33
|
+
}, {
|
|
34
|
+
ok: boolean;
|
|
35
|
+
path: string;
|
|
36
|
+
message: string;
|
|
37
|
+
done: string[];
|
|
38
|
+
missing: string[];
|
|
39
|
+
deferred: string[];
|
|
40
|
+
problems: string[];
|
|
41
|
+
}, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<{
|
|
42
|
+
milestone: string;
|
|
43
|
+
}, {
|
|
44
|
+
ok: boolean;
|
|
45
|
+
path: string;
|
|
46
|
+
message: string;
|
|
47
|
+
done: string[];
|
|
48
|
+
missing: string[];
|
|
49
|
+
deferred: string[];
|
|
50
|
+
problems: string[];
|
|
51
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<{
|
|
52
|
+
milestone: string;
|
|
53
|
+
}, {
|
|
54
|
+
ok: boolean;
|
|
55
|
+
path: string;
|
|
56
|
+
message: string;
|
|
57
|
+
done: string[];
|
|
58
|
+
missing: string[];
|
|
59
|
+
deferred: string[];
|
|
60
|
+
problems: string[];
|
|
61
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
62
|
+
export declare const knowledgePlanSet: import("#pikku/function").PikkuFunctionConfig<{
|
|
63
|
+
milestone: string;
|
|
64
|
+
file: string;
|
|
65
|
+
}, {
|
|
66
|
+
ok: boolean;
|
|
67
|
+
path: string;
|
|
68
|
+
problems: string[];
|
|
69
|
+
schema?: string | undefined;
|
|
70
|
+
}, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<{
|
|
71
|
+
milestone: string;
|
|
72
|
+
file: string;
|
|
73
|
+
}, {
|
|
74
|
+
ok: boolean;
|
|
75
|
+
path: string;
|
|
76
|
+
problems: string[];
|
|
77
|
+
schema?: string | undefined;
|
|
78
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<{
|
|
79
|
+
milestone: string;
|
|
80
|
+
file: string;
|
|
81
|
+
}, {
|
|
82
|
+
ok: boolean;
|
|
83
|
+
path: string;
|
|
84
|
+
problems: string[];
|
|
85
|
+
schema?: string | undefined;
|
|
86
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
87
|
+
export declare const knowledgePlanDefer: import("#pikku/function").PikkuFunctionConfig<{
|
|
88
|
+
milestone: string;
|
|
89
|
+
item: string;
|
|
90
|
+
reason: string;
|
|
91
|
+
}, {
|
|
92
|
+
ok: boolean;
|
|
93
|
+
path: string;
|
|
94
|
+
message: string;
|
|
95
|
+
}, "rpc" | "session", import("#pikku/function").PikkuFunctionSessionless<{
|
|
96
|
+
milestone: string;
|
|
97
|
+
item: string;
|
|
98
|
+
reason: string;
|
|
99
|
+
}, {
|
|
100
|
+
ok: boolean;
|
|
101
|
+
path: string;
|
|
102
|
+
message: string;
|
|
103
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices, unknown> | import("#pikku/function").PikkuFunction<{
|
|
104
|
+
milestone: string;
|
|
105
|
+
item: string;
|
|
106
|
+
reason: string;
|
|
107
|
+
}, {
|
|
108
|
+
ok: boolean;
|
|
109
|
+
path: string;
|
|
110
|
+
message: string;
|
|
111
|
+
}, "rpc" | "session", import("#pikku/function").WiredServices>, undefined, undefined>;
|
|
112
|
+
export { renderKnowledgePlanDefer, renderKnowledgePlanProgress, renderKnowledgePlanSchema, renderKnowledgePlanSet, renderKnowledgePlanShow, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku/function';
|
|
2
|
+
import { runKnowledgePlanDefer, runKnowledgePlanProgress, runKnowledgePlanSchema, runKnowledgePlanSet, runKnowledgePlanShow, } from '@pikku/knowledge';
|
|
3
|
+
import { renderKnowledgePlanDefer, renderKnowledgePlanProgress, renderKnowledgePlanSchema, renderKnowledgePlanSet, renderKnowledgePlanShow, } from '../knowledge/render.js';
|
|
4
|
+
import { KnowledgePlanDeferInputSchema, KnowledgePlanDeferOutputSchema, KnowledgePlanProgressInputSchema, KnowledgePlanProgressOutputSchema, KnowledgePlanSchemaInputSchema, KnowledgePlanSchemaOutputSchema, KnowledgePlanSetInputSchema, KnowledgePlanSetOutputSchema, KnowledgePlanShowInputSchema, KnowledgePlanShowOutputSchema, } from '../knowledge/schemas.js';
|
|
5
|
+
export const knowledgePlanSchema = pikkuSessionlessFunc({
|
|
6
|
+
description: 'Print the plan schema, so a plan is written against what is actually enforced rather than guessed at.',
|
|
7
|
+
input: KnowledgePlanSchemaInputSchema,
|
|
8
|
+
output: KnowledgePlanSchemaOutputSchema,
|
|
9
|
+
func: async () => runKnowledgePlanSchema(),
|
|
10
|
+
});
|
|
11
|
+
export const knowledgePlanShow = pikkuSessionlessFunc({
|
|
12
|
+
description: "Print a milestone's plan, either as it is stored or as the ordered list of work a build follows.",
|
|
13
|
+
input: KnowledgePlanShowInputSchema,
|
|
14
|
+
output: KnowledgePlanShowOutputSchema,
|
|
15
|
+
func: async ({ config }, input) => runKnowledgePlanShow(config.rootDir, input),
|
|
16
|
+
});
|
|
17
|
+
export const knowledgePlanProgress = pikkuSessionlessFunc({
|
|
18
|
+
description: "Reconcile a milestone's plan against the generated meta and say what is still owed, so a milestone closes on what exists rather than on what was claimed.",
|
|
19
|
+
input: KnowledgePlanProgressInputSchema,
|
|
20
|
+
output: KnowledgePlanProgressOutputSchema,
|
|
21
|
+
func: async ({ config }, input) => runKnowledgePlanProgress(config.rootDir, input),
|
|
22
|
+
});
|
|
23
|
+
export const knowledgePlanSet = pikkuSessionlessFunc({
|
|
24
|
+
description: 'Validate a plan against its milestone note and write it, or write nothing and say what is wrong.',
|
|
25
|
+
input: KnowledgePlanSetInputSchema,
|
|
26
|
+
output: KnowledgePlanSetOutputSchema,
|
|
27
|
+
func: async ({ config }, input) => runKnowledgePlanSet(config.rootDir, input),
|
|
28
|
+
});
|
|
29
|
+
export const knowledgePlanDefer = pikkuSessionlessFunc({
|
|
30
|
+
description: 'Move one first-pass item to the next pass with the reason on the record, so it stops blocking the milestone.',
|
|
31
|
+
input: KnowledgePlanDeferInputSchema,
|
|
32
|
+
output: KnowledgePlanDeferOutputSchema,
|
|
33
|
+
func: async ({ config }, input) => runKnowledgePlanDefer(config.rootDir, input),
|
|
34
|
+
});
|
|
35
|
+
export { renderKnowledgePlanDefer, renderKnowledgePlanProgress, renderKnowledgePlanSchema, renderKnowledgePlanSet, renderKnowledgePlanShow, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { type MigrateResult } from '
|
|
2
|
+
import { type MigrateResult } from '@pikku/migrator-sql';
|
|
3
3
|
import type { ColumnInfo } from './db-introspector.js';
|
|
4
4
|
import { type CodegenResult } from './db-codegen.js';
|
|
5
5
|
import { type ZodCodegenResult } from './zod-codegen.js';
|
|
@@ -5,18 +5,18 @@ import { pathToFileURL } from 'node:url';
|
|
|
5
5
|
import { runInNewContext } from 'node:vm';
|
|
6
6
|
import { transformSync } from 'esbuild';
|
|
7
7
|
import { CamelCasePlugin, Kysely, PostgresDialect } from 'kysely';
|
|
8
|
-
import { migrate, baselineMigrations, } from '
|
|
8
|
+
import { migrate, baselineMigrations, } from '@pikku/migrator-sql';
|
|
9
9
|
import { applyPikkuSchemas, compilePikkuSchemas, pikkuSchemas, requiredPikkuSchemas, resolveRequirements, createCoercionPlugin, } from '@pikku/kysely';
|
|
10
10
|
import { loadAuthOptions, getAuthMigrations } from './better-auth-schema.js';
|
|
11
11
|
import { generateSchemaTypes } from './db-codegen.js';
|
|
12
12
|
import { generateZodTypes } from './zod-codegen.js';
|
|
13
|
-
import { tableCreationSql } from '
|
|
14
|
-
import { SqliteMigrationExecutor } from '
|
|
13
|
+
import { tableCreationSql } from '@pikku/migrator-sql';
|
|
14
|
+
import { SqliteMigrationExecutor } from '@pikku/migrator-sql/sqlite';
|
|
15
15
|
import { SqliteIntrospector } from './sqlite/sqlite-introspector.js';
|
|
16
16
|
import { createSqliteKysely } from './sqlite/sqlite-kysely.js';
|
|
17
|
-
import { loadSqliteRuntime } from '
|
|
17
|
+
import { loadSqliteRuntime } from '@pikku/migrator-sql/sqlite';
|
|
18
18
|
import { devSeed as runDevSeed } from './sqlite/dev-seed.js';
|
|
19
|
-
import { PostgresMigrationExecutor } from '
|
|
19
|
+
import { PostgresMigrationExecutor } from '@pikku/migrator-sql/postgres';
|
|
20
20
|
import { createPGliteKysely } from './postgres/pglite-kysely.js';
|
|
21
21
|
import { PostgresIntrospector } from './postgres/postgres-introspector.js';
|
|
22
22
|
// ─── Resolution ───────────────────────────────────────────────────────────────
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Pool } from 'pg';
|
|
2
|
-
import { MIGRATION_TRACKING_TABLE } from '
|
|
2
|
+
import { MIGRATION_TRACKING_TABLE } from '@pikku/migrator-sql';
|
|
3
3
|
import { parseCheckEnumValues } from '../check-enums.js';
|
|
4
4
|
/** Table display name matching `listTables` (schema-qualified unless `public`). */
|
|
5
5
|
function tableKey(schema, table) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DbIntrospector, ColumnInfo, ForeignKeyInfo, EnumInfo } from '../db-introspector.js';
|
|
2
|
-
import type { SyncSqliteDatabase } from '
|
|
2
|
+
import type { SyncSqliteDatabase } from '@pikku/migrator-sql/sqlite';
|
|
3
3
|
export declare class SqliteIntrospector implements DbIntrospector {
|
|
4
4
|
private readonly db;
|
|
5
5
|
constructor(db: SyncSqliteDatabase);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MIGRATION_TRACKING_TABLE } from '
|
|
1
|
+
import { MIGRATION_TRACKING_TABLE } from '@pikku/migrator-sql';
|
|
2
2
|
import { parseCheckEnumsFromDdl } from '../check-enums.js';
|
|
3
3
|
const SKIP_TABLES = new Set(['sqlite_sequence', MIGRATION_TRACKING_TABLE]);
|
|
4
4
|
export class SqliteIntrospector {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Kysely, type KyselyPlugin } from 'kysely';
|
|
2
|
-
import type { SyncSqliteDatabase } from '
|
|
2
|
+
import type { SyncSqliteDatabase } from '@pikku/migrator-sql/sqlite';
|
|
3
3
|
export interface CreateSqliteKyselyOptions {
|
|
4
4
|
db: SyncSqliteDatabase;
|
|
5
5
|
camelCase?: boolean;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type { KnowledgeIndexResult, KnowledgeValidateResult } from '@pikku/knowledge';
|
|
1
|
+
import type { KnowledgeIndexResult, KnowledgePlanDeferResult, KnowledgePlanProgressResult, KnowledgePlanSchemaResult, KnowledgePlanSetResult, KnowledgePlanShowResult, KnowledgeValidateResult } from '@pikku/knowledge';
|
|
2
2
|
export declare const renderKnowledgeValidate: (_services: unknown, { ok, notes, findings }: KnowledgeValidateResult) => void;
|
|
3
3
|
export declare const renderKnowledgeIndex: (_services: unknown, { ok, check, files }: KnowledgeIndexResult) => void;
|
|
4
|
+
export declare const renderKnowledgePlanSchema: (_services: unknown, { schema }: KnowledgePlanSchemaResult) => void;
|
|
5
|
+
export declare const renderKnowledgePlanShow: (_services: unknown, { ok, path, body }: KnowledgePlanShowResult) => void;
|
|
6
|
+
export declare const renderKnowledgePlanProgress: (_services: unknown, { ok, path, message, done, missing, deferred, problems, }: KnowledgePlanProgressResult) => void;
|
|
7
|
+
export declare const renderKnowledgePlanSet: (_services: unknown, { ok, path, problems, schema }: KnowledgePlanSetResult) => void;
|
|
8
|
+
export declare const renderKnowledgePlanDefer: (_services: unknown, { ok, message }: KnowledgePlanDeferResult) => void;
|
|
@@ -64,3 +64,77 @@ export const renderKnowledgeIndex = (_services, { ok, check, files }) => {
|
|
|
64
64
|
process.exitCode = 1;
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
+
export const renderKnowledgePlanSchema = (_services, { schema }) => {
|
|
68
|
+
console.log(schema);
|
|
69
|
+
};
|
|
70
|
+
export const renderKnowledgePlanShow = (_services, { ok, path, body }) => {
|
|
71
|
+
if (!ok) {
|
|
72
|
+
console.log(`${removed('✗')} ${body}`);
|
|
73
|
+
process.exitCode = 1;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
console.log(dim(path));
|
|
77
|
+
console.log(body);
|
|
78
|
+
};
|
|
79
|
+
const list = (label, entries, colour) => {
|
|
80
|
+
if (entries.length === 0)
|
|
81
|
+
return;
|
|
82
|
+
console.log(colour(`${label} (${entries.length})`));
|
|
83
|
+
for (const entry of entries)
|
|
84
|
+
console.log(` ${entry}`);
|
|
85
|
+
console.log();
|
|
86
|
+
};
|
|
87
|
+
export const renderKnowledgePlanProgress = (_services, { ok, path, message, done, missing, deferred, problems, }) => {
|
|
88
|
+
if (message) {
|
|
89
|
+
console.log(`${removed('✗')} ${message}`);
|
|
90
|
+
process.exitCode = 1;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
console.log(dim(path));
|
|
94
|
+
console.log();
|
|
95
|
+
list('DONE', done, added);
|
|
96
|
+
list('MISSING', missing, removed);
|
|
97
|
+
list('DEFERRED to a later pass', deferred, dim);
|
|
98
|
+
list('PROBLEMS', problems, changed);
|
|
99
|
+
console.log('─'.repeat(40));
|
|
100
|
+
if (ok) {
|
|
101
|
+
console.log(`${added('✓')} the plan's first pass is built`);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (missing.length > 0) {
|
|
105
|
+
console.log(`${removed('✗')} the milestone is not built yet — build each missing item, or move it out with ` +
|
|
106
|
+
dim('pikku knowledge plan defer <milestone> <item> -r "<why>"'));
|
|
107
|
+
}
|
|
108
|
+
// A problem is something that EXISTS and does not do what was planned, so there is
|
|
109
|
+
// nothing to defer — saying "defer it" here sends the reader to a command that will
|
|
110
|
+
// refuse them.
|
|
111
|
+
if (problems.length > 0) {
|
|
112
|
+
console.log(`${removed('✗')} the milestone is not built yet — fix what the problems above name. ` +
|
|
113
|
+
dim('A problem is never deferred; the thing exists, it just does something else.'));
|
|
114
|
+
}
|
|
115
|
+
// A build closes a milestone on this exit code, so it has to be readable by a shell
|
|
116
|
+
// and not only by whoever is reading the output.
|
|
117
|
+
process.exitCode = 1;
|
|
118
|
+
};
|
|
119
|
+
export const renderKnowledgePlanSet = (_services, { ok, path, problems, schema }) => {
|
|
120
|
+
if (ok) {
|
|
121
|
+
console.log(`${added('✓')} plan written to ${path}`);
|
|
122
|
+
console.log(dim('the build is measured against it'));
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
console.log(`${removed('✗')} not written:`);
|
|
126
|
+
for (const problem of problems) {
|
|
127
|
+
console.log(` ${problem}`);
|
|
128
|
+
}
|
|
129
|
+
if (schema) {
|
|
130
|
+
console.log();
|
|
131
|
+
console.log(dim('the schema, in full — build the plan to match it:'));
|
|
132
|
+
console.log(schema);
|
|
133
|
+
}
|
|
134
|
+
process.exitCode = 1;
|
|
135
|
+
};
|
|
136
|
+
export const renderKnowledgePlanDefer = (_services, { ok, message }) => {
|
|
137
|
+
console.log(`${ok ? added('✓') : removed('✗')} ${message}`);
|
|
138
|
+
if (!ok)
|
|
139
|
+
process.exitCode = 1;
|
|
140
|
+
};
|
|
@@ -49,3 +49,48 @@ export declare const KnowledgeValidateOutputSchema: import("zod").ZodObject<{
|
|
|
49
49
|
fixHint: import("zod").ZodString;
|
|
50
50
|
}, import("zod/v4/core").$strip>>;
|
|
51
51
|
}, import("zod/v4/core").$strip>;
|
|
52
|
+
export declare const KnowledgePlanSchemaInputSchema: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
53
|
+
export declare const KnowledgePlanSchemaOutputSchema: import("zod").ZodObject<{
|
|
54
|
+
schema: import("zod").ZodString;
|
|
55
|
+
}, import("zod/v4/core").$strip>;
|
|
56
|
+
export declare const KnowledgePlanProgressInputSchema: import("zod").ZodObject<{
|
|
57
|
+
milestone: import("zod").ZodString;
|
|
58
|
+
}, import("zod/v4/core").$strip>;
|
|
59
|
+
export declare const KnowledgePlanProgressOutputSchema: import("zod").ZodObject<{
|
|
60
|
+
ok: import("zod").ZodBoolean;
|
|
61
|
+
path: import("zod").ZodString;
|
|
62
|
+
message: import("zod").ZodString;
|
|
63
|
+
done: import("zod").ZodArray<import("zod").ZodString>;
|
|
64
|
+
missing: import("zod").ZodArray<import("zod").ZodString>;
|
|
65
|
+
deferred: import("zod").ZodArray<import("zod").ZodString>;
|
|
66
|
+
problems: import("zod").ZodArray<import("zod").ZodString>;
|
|
67
|
+
}, import("zod/v4/core").$strip>;
|
|
68
|
+
export declare const KnowledgePlanShowInputSchema: import("zod").ZodObject<{
|
|
69
|
+
milestone: import("zod").ZodString;
|
|
70
|
+
forBuild: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
71
|
+
}, import("zod/v4/core").$strip>;
|
|
72
|
+
export declare const KnowledgePlanShowOutputSchema: import("zod").ZodObject<{
|
|
73
|
+
ok: import("zod").ZodBoolean;
|
|
74
|
+
path: import("zod").ZodString;
|
|
75
|
+
body: import("zod").ZodString;
|
|
76
|
+
}, import("zod/v4/core").$strip>;
|
|
77
|
+
export declare const KnowledgePlanSetInputSchema: import("zod").ZodObject<{
|
|
78
|
+
milestone: import("zod").ZodString;
|
|
79
|
+
file: import("zod").ZodString;
|
|
80
|
+
}, import("zod/v4/core").$strip>;
|
|
81
|
+
export declare const KnowledgePlanSetOutputSchema: import("zod").ZodObject<{
|
|
82
|
+
ok: import("zod").ZodBoolean;
|
|
83
|
+
path: import("zod").ZodString;
|
|
84
|
+
problems: import("zod").ZodArray<import("zod").ZodString>;
|
|
85
|
+
schema: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
+
}, import("zod/v4/core").$strip>;
|
|
87
|
+
export declare const KnowledgePlanDeferInputSchema: import("zod").ZodObject<{
|
|
88
|
+
milestone: import("zod").ZodString;
|
|
89
|
+
item: import("zod").ZodString;
|
|
90
|
+
reason: import("zod").ZodString;
|
|
91
|
+
}, import("zod/v4/core").$strip>;
|
|
92
|
+
export declare const KnowledgePlanDeferOutputSchema: import("zod").ZodObject<{
|
|
93
|
+
ok: import("zod").ZodBoolean;
|
|
94
|
+
path: import("zod").ZodString;
|
|
95
|
+
message: import("zod").ZodString;
|
|
96
|
+
}, import("zod/v4/core").$strip>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KnowledgeIndexInput, KnowledgeIndexOutput, KnowledgeValidateInput, KnowledgeValidateOutput, } from '@pikku/knowledge';
|
|
1
|
+
import { KnowledgeIndexInput, KnowledgeIndexOutput, KnowledgePlanDeferInput, KnowledgePlanDeferOutput, KnowledgePlanProgressInput, KnowledgePlanProgressOutput, KnowledgePlanSchemaInput, KnowledgePlanSchemaOutput, KnowledgePlanSetInput, KnowledgePlanSetOutput, KnowledgePlanShowInput, KnowledgePlanShowOutput, KnowledgeValidateInput, KnowledgeValidateOutput, } from '@pikku/knowledge';
|
|
2
2
|
/**
|
|
3
3
|
* The knowledge command schemas, re-bound to variables declared HERE rather than
|
|
4
4
|
* imported straight into the command files.
|
|
@@ -23,3 +23,13 @@ export const KnowledgeIndexInputSchema = KnowledgeIndexInput;
|
|
|
23
23
|
export const KnowledgeIndexOutputSchema = KnowledgeIndexOutput;
|
|
24
24
|
export const KnowledgeValidateInputSchema = KnowledgeValidateInput;
|
|
25
25
|
export const KnowledgeValidateOutputSchema = KnowledgeValidateOutput;
|
|
26
|
+
export const KnowledgePlanSchemaInputSchema = KnowledgePlanSchemaInput;
|
|
27
|
+
export const KnowledgePlanSchemaOutputSchema = KnowledgePlanSchemaOutput;
|
|
28
|
+
export const KnowledgePlanProgressInputSchema = KnowledgePlanProgressInput;
|
|
29
|
+
export const KnowledgePlanProgressOutputSchema = KnowledgePlanProgressOutput;
|
|
30
|
+
export const KnowledgePlanShowInputSchema = KnowledgePlanShowInput;
|
|
31
|
+
export const KnowledgePlanShowOutputSchema = KnowledgePlanShowOutput;
|
|
32
|
+
export const KnowledgePlanSetInputSchema = KnowledgePlanSetInput;
|
|
33
|
+
export const KnowledgePlanSetOutputSchema = KnowledgePlanSetOutput;
|
|
34
|
+
export const KnowledgePlanDeferInputSchema = KnowledgePlanDeferInput;
|
|
35
|
+
export const KnowledgePlanDeferOutputSchema = KnowledgePlanDeferOutput;
|