@pikku/cli 0.12.20 → 0.12.22
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/cli.schema.json +1 -1
- package/console-app/assets/index-C52h1B_L.css +1 -0
- package/console-app/assets/index-CAk106ji.js +232 -0
- package/console-app/index.html +3 -6
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +3 -3
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +6 -6
- package/dist/.pikku/cli/pikku-cli-channel.js +280 -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 +792 -8
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +44 -70
- package/dist/.pikku/function/pikku-function-types.gen.js +33 -40
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +1439 -316
- package/dist/.pikku/function/pikku-functions.gen.js +21 -9
- 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/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.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.gen.d.ts +3 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +3 -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.d.ts +1 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +6 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +250 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +4 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +5 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +66 -10
- 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 +157 -11
- package/dist/.pikku/schemas/schemas/BinaryInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DbMigrateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DbResetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DbSeedInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDbSchemaInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDbSchemaOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployApplyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployApplyOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployListOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployPlanInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployPlanOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployUnitsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDeployUnitsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsAddInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsAddOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsListOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsRemoveInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricDomainsRemoveOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricErrorsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricErrorsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricInitInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricInitOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLLMKeyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLLMKeyOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLinkInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLinkOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLoginInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLoginOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLogsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricLogsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricMetricsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricMetricsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricRollbackInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricRollbackOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsListOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsSetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricSecretsSetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricStatusInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricStatusOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricTraceInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricTraceOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricValidateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricValidateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuCommandChannelsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCommandHTTPOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCommandQueueOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuEventsScaffoldOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaClientsInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaContextInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaFunctionsGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaFunctionsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaMiddlewareGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaMiddlewareListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaPermissionsGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaPermissionsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaSchemasGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaSchemasListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresChannelInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresHttpInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresQueueInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresSchedulerInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresTriggerInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWiresTypeInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWorkflowsGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuMetaWorkflowsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuSkillsInstallInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuSkillsListInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuTestsCoverageInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuTestsInitInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/WorkflowRunStatus.schema.json +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +237 -629
- 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 +23 -0
- package/dist/bin/pikku.js +28 -1
- package/dist/src/cli.wiring.js +286 -10
- package/dist/src/deploy/analyzer/analyzer.d.ts +16 -1
- package/dist/src/deploy/analyzer/analyzer.js +83 -43
- package/dist/src/deploy/analyzer/manifest.d.ts +10 -0
- package/dist/src/deploy/build-pipeline.d.ts +2 -0
- package/dist/src/deploy/build-pipeline.js +123 -19
- package/dist/src/deploy/bundler/bundler.d.ts +3 -1
- package/dist/src/deploy/bundler/bundler.js +40 -9
- package/dist/src/deploy/bundler/dep-extractor.d.ts +5 -2
- package/dist/src/deploy/bundler/dep-extractor.js +103 -23
- package/dist/src/deploy/bundler/types.d.ts +5 -1
- package/dist/src/deploy/codegen/per-unit-codegen.d.ts +11 -1
- package/dist/src/deploy/codegen/per-unit-codegen.js +49 -6
- package/dist/src/deploy/plan/planner.js +25 -3
- package/dist/src/deploy/plan/provider.d.ts +2 -0
- package/dist/src/deploy/provider-adapter.d.ts +34 -0
- package/dist/src/deploy/server-entry.d.ts +16 -0
- package/dist/src/deploy/server-entry.js +81 -0
- package/dist/src/fabric/fabric-commands.d.ts +522 -0
- package/dist/src/fabric/fabric-commands.js +299 -0
- package/dist/src/fabric/functions/db-schema.function.d.ts +35 -0
- package/dist/src/fabric/functions/db-schema.function.js +37 -0
- package/dist/src/fabric/functions/deploy-list.function.d.ts +41 -0
- package/dist/src/fabric/functions/deploy-list.function.js +43 -0
- package/dist/src/fabric/functions/deploy-units.function.d.ts +35 -0
- package/dist/src/fabric/functions/deploy-units.function.js +41 -0
- package/dist/src/fabric/functions/deploy.function.d.ts +105 -0
- package/dist/src/fabric/functions/deploy.function.js +122 -0
- package/dist/src/fabric/functions/domains-add.function.d.ts +35 -0
- package/dist/src/fabric/functions/domains-add.function.js +46 -0
- package/dist/src/fabric/functions/domains-list.function.d.ts +20 -0
- package/dist/src/fabric/functions/domains-list.function.js +50 -0
- package/dist/src/fabric/functions/domains-remove.function.d.ts +24 -0
- package/dist/src/fabric/functions/domains-remove.function.js +44 -0
- package/dist/src/fabric/functions/errors.function.d.ts +44 -0
- package/dist/src/fabric/functions/errors.function.js +50 -0
- package/dist/src/fabric/functions/init.function.d.ts +51 -0
- package/dist/src/fabric/functions/init.function.js +54 -0
- package/dist/src/fabric/functions/link.function.d.ts +28 -0
- package/dist/src/fabric/functions/link.function.js +77 -0
- package/dist/src/fabric/functions/llm-key.function.d.ts +46 -0
- package/dist/src/fabric/functions/llm-key.function.js +76 -0
- package/dist/src/fabric/functions/login.function.d.ts +42 -0
- package/dist/src/fabric/functions/login.function.js +68 -0
- package/dist/src/fabric/functions/logs.function.d.ts +40 -0
- package/dist/src/fabric/functions/logs.function.js +84 -0
- package/dist/src/fabric/functions/metrics.function.d.ts +32 -0
- package/dist/src/fabric/functions/metrics.function.js +49 -0
- package/dist/src/fabric/functions/rollback.function.d.ts +76 -0
- package/dist/src/fabric/functions/rollback.function.js +69 -0
- package/dist/src/fabric/functions/secrets-list.function.d.ts +24 -0
- package/dist/src/fabric/functions/secrets-list.function.js +37 -0
- package/dist/src/fabric/functions/secrets-set.function.d.ts +32 -0
- package/dist/src/fabric/functions/secrets-set.function.js +36 -0
- package/dist/src/fabric/functions/status.function.d.ts +34 -0
- package/dist/src/fabric/functions/status.function.js +43 -0
- package/dist/src/fabric/functions/trace.function.d.ts +28 -0
- package/dist/src/fabric/functions/trace.function.js +45 -0
- package/dist/src/fabric/functions/validate.function.d.ts +50 -0
- package/dist/src/fabric/functions/validate.function.js +363 -0
- package/dist/src/fabric/lib/config.d.ts +64 -0
- package/dist/src/fabric/lib/config.js +62 -0
- package/dist/src/fabric/lib/console-url.d.ts +5 -0
- package/dist/src/fabric/lib/console-url.js +13 -0
- package/dist/src/fabric/lib/git.d.ts +53 -0
- package/dist/src/fabric/lib/git.js +151 -0
- package/dist/src/fabric/lib/http.d.ts +4 -0
- package/dist/src/fabric/lib/http.js +12 -0
- package/dist/src/fabric/lib/not-implemented.d.ts +5 -0
- package/dist/src/fabric/lib/not-implemented.js +8 -0
- package/dist/src/fabric/lib/output.d.ts +23 -0
- package/dist/src/fabric/lib/output.js +39 -0
- package/dist/src/fabric/lib/prompt.d.ts +12 -0
- package/dist/src/fabric/lib/prompt.js +32 -0
- package/dist/src/fabric/lib/stage.d.ts +7 -0
- package/dist/src/fabric/lib/stage.js +14 -0
- package/dist/src/fabric/sdk/pikku-fetch.gen.d.ts +14 -0
- package/dist/src/fabric/sdk/pikku-fetch.gen.js +30 -0
- package/dist/src/fabric/sdk/pikku-rpc.gen.d.ts +105 -0
- package/dist/src/fabric/sdk/pikku-rpc.gen.js +126 -0
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +7 -0
- package/dist/src/functions/commands/binary.js +40 -0
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/bootstrap.js +7 -4
- package/dist/src/functions/commands/console.d.ts +3 -3
- package/dist/src/functions/commands/db-migrate.d.ts +1 -0
- package/dist/src/functions/commands/db-migrate.js +35 -0
- package/dist/src/functions/commands/db-reset.d.ts +1 -0
- package/dist/src/functions/commands/db-reset.js +36 -0
- package/dist/src/functions/commands/db-seed.d.ts +1 -0
- package/dist/src/functions/commands/db-seed.js +27 -0
- package/dist/src/functions/commands/db-shared.d.ts +32 -0
- package/dist/src/functions/commands/db-shared.js +26 -0
- package/dist/src/functions/commands/deploy-apply.d.ts +3 -3
- package/dist/src/functions/commands/deploy-apply.js +6 -4
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +3 -3
- package/dist/src/functions/commands/deploy-plan.js +7 -1
- package/dist/src/functions/commands/dev.d.ts +3 -3
- package/dist/src/functions/commands/dev.js +142 -86
- package/dist/src/functions/commands/enable.d.ts +5 -4
- package/dist/src/functions/commands/enable.js +4 -0
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/load-user-project.d.ts +11 -0
- package/dist/src/functions/commands/load-user-project.js +40 -0
- package/dist/src/functions/commands/meta.d.ts +82 -0
- package/dist/src/functions/commands/meta.js +454 -0
- package/dist/src/functions/commands/new-addon.d.ts +3 -3
- package/dist/src/functions/commands/new-function.d.ts +3 -3
- package/dist/src/functions/commands/new-middleware.d.ts +3 -3
- package/dist/src/functions/commands/new-permission.d.ts +3 -3
- package/dist/src/functions/commands/new-wiring.d.ts +3 -3
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-bootstrap.js +15 -1
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.js +7 -1
- package/dist/src/functions/commands/skills.d.ts +26 -0
- package/dist/src/functions/commands/skills.js +184 -0
- package/dist/src/functions/commands/tests-coverage.d.ts +7 -0
- package/dist/src/functions/commands/tests-coverage.js +231 -0
- package/dist/src/functions/commands/tests-init.d.ts +7 -0
- package/dist/src/functions/commands/tests-init.js +225 -0
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +3 -3
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/versions-update.js +4 -2
- package/dist/src/functions/commands/watch.d.ts +3 -3
- package/dist/src/functions/commands/watch.js +1 -1
- package/dist/src/functions/db/local-db.d.ts +48 -0
- package/dist/src/functions/db/local-db.js +106 -0
- package/dist/src/functions/db/seed.d.ts +11 -0
- package/dist/src/functions/db/seed.js +22 -0
- package/dist/src/functions/db/sql-migrator.d.ts +26 -0
- package/dist/src/functions/db/sql-migrator.js +104 -0
- package/dist/src/functions/db/sqlite-codegen.d.ts +45 -0
- package/dist/src/functions/db/sqlite-codegen.js +294 -0
- package/dist/src/functions/db/zod-codegen.d.ts +10 -0
- package/dist/src/functions/db/zod-codegen.js +109 -0
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +21 -2
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.d.ts +1 -0
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.js +163 -0
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +5 -2
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -0
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.js +32 -0
- package/dist/src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.d.ts +11 -0
- package/dist/src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.js +36 -0
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +1 -10
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +76 -1
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +5 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +5 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +8 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +27 -9
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +5 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +13 -3
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +5 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +5 -0
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +5 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +7 -2
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +105 -80
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +2 -2
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -0
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +26 -0
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -0
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.js +35 -0
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.d.ts +23 -0
- package/dist/src/functions/wirings/realtime/serialize-events-scaffold.js +98 -0
- package/dist/src/functions/wirings/realtime/serialize-realtime-client.d.ts +22 -0
- package/dist/src/functions/wirings/realtime/serialize-realtime-client.js +337 -0
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +5 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +5 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +3 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +2 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +13 -7
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +1 -0
- package/dist/src/functions/wirings/rpc/serialize-react-query-hooks.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +7 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +16 -2
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.js +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +5 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +18 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.d.ts +3 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-bootstrap-map.js +40 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +56 -2
- package/dist/src/functions/workflows/all.workflow.js +45 -12
- package/dist/src/scaffold/rpc-remote.gen.d.ts +3 -3
- package/dist/src/scaffold/rpc-remote.gen.js +7 -2
- package/dist/src/scaffold/workflow-routes.gen.d.ts +18 -18
- package/dist/src/scaffold/workflow-routes.gen.js +33 -1
- package/dist/src/services/cli-logger.service.d.ts +22 -3
- package/dist/src/services/cli-logger.service.js +107 -41
- package/dist/src/services.js +32 -67
- package/dist/src/utils/generate-bootstrap-file.js +3 -0
- package/dist/src/utils/parse-cli-filters.d.ts +18 -0
- package/dist/src/utils/parse-cli-filters.js +99 -0
- package/dist/src/utils/pikku-cli-config.js +29 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -4
- package/skills/pikku-addon/SKILL.md +330 -0
- package/skills/pikku-ai-agent/SKILL.md +227 -0
- package/skills/pikku-ai-vercel/SKILL.md +78 -0
- package/skills/pikku-ai-voice/SKILL.md +85 -0
- package/skills/pikku-auth-js/SKILL.md +106 -0
- package/skills/pikku-aws/SKILL.md +107 -0
- package/skills/pikku-backblaze/SKILL.md +70 -0
- package/skills/pikku-cli/SKILL.md +281 -0
- package/skills/pikku-concepts/SKILL.md +281 -0
- package/skills/pikku-concepts/references/concept-mapping.md +528 -0
- package/skills/pikku-config/SKILL.md +208 -0
- package/skills/pikku-cron/SKILL.md +211 -0
- package/skills/pikku-deploy-azure/SKILL.md +69 -0
- package/skills/pikku-deploy-cloudflare/SKILL.md +80 -0
- package/skills/pikku-deploy-express/SKILL.md +83 -0
- package/skills/pikku-deploy-fastify/SKILL.md +70 -0
- package/skills/pikku-deploy-lambda/SKILL.md +107 -0
- package/skills/pikku-deploy-nextjs/SKILL.md +76 -0
- package/skills/pikku-deploy-uws/SKILL.md +85 -0
- package/skills/pikku-fabric/SKILL.md +245 -0
- package/skills/pikku-feature/SKILL.md +258 -0
- package/skills/pikku-gateway-slack/SKILL.md +112 -0
- package/skills/pikku-http/SKILL.md +317 -0
- package/skills/pikku-i18n/SKILL.md +208 -0
- package/skills/pikku-info/SKILL.md +95 -0
- package/skills/pikku-jose/SKILL.md +102 -0
- package/skills/pikku-kysely/SKILL.md +145 -0
- package/skills/pikku-mcp/SKILL.md +237 -0
- package/skills/pikku-mongodb/SKILL.md +102 -0
- package/skills/pikku-n8n-addon-map/SKILL.md +178 -0
- package/skills/pikku-n8n-code-translate/SKILL.md +166 -0
- package/skills/pikku-pino/SKILL.md +77 -0
- package/skills/pikku-queue/SKILL.md +237 -0
- package/skills/pikku-react/SKILL.md +183 -0
- package/skills/pikku-react-query/SKILL.md +205 -0
- package/skills/pikku-realtime/SKILL.md +285 -0
- package/skills/pikku-redis/SKILL.md +87 -0
- package/skills/pikku-rpc/SKILL.md +168 -0
- package/skills/pikku-rtl/SKILL.md +205 -0
- package/skills/pikku-schedule/SKILL.md +54 -0
- package/skills/pikku-schema-ajv/SKILL.md +60 -0
- package/skills/pikku-schema-cfworker/SKILL.md +60 -0
- package/skills/pikku-security/SKILL.md +243 -0
- package/skills/pikku-services/SKILL.md +247 -0
- package/skills/pikku-template-clone/SKILL.md +39 -0
- package/skills/pikku-testing/SKILL.md +428 -0
- package/skills/pikku-trigger/SKILL.md +177 -0
- package/skills/pikku-versioning/SKILL.md +169 -0
- package/skills/pikku-websocket/SKILL.md +239 -0
- package/skills/pikku-workflow/SKILL.md +283 -0
- package/skills/pikku-workflows-client/SKILL.md +150 -0
- package/skills/pikku-ws/SKILL.md +45 -0
- package/console-app/assets/index-BpY2pSuA.css +0 -10
- package/console-app/assets/index-DXLy-_D4.js +0 -717
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +0 -10
- package/dist/.pikku/cli/pikku-cli-client.gen.js +0 -44
- /package/dist/.pikku/schemas/schemas/{PikkuChannelsOutput.schema.json → PikkuCLIEntryOutput.schema.json} +0 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { getSchema } from '@pikku/core/schema';
|
|
3
|
+
function out(value) {
|
|
4
|
+
console.log(JSON.stringify(value));
|
|
5
|
+
}
|
|
6
|
+
export const pikkuMetaFunctionsList = pikkuSessionlessFunc({
|
|
7
|
+
func: async ({ getInspectorState }) => {
|
|
8
|
+
const state = await getInspectorState();
|
|
9
|
+
const meta = state.functions.meta ?? {};
|
|
10
|
+
const functions = Object.entries(meta).map(([id, m]) => ({
|
|
11
|
+
id,
|
|
12
|
+
name: m.name ?? id,
|
|
13
|
+
description: m.description ?? null,
|
|
14
|
+
tags: m.tags ?? [],
|
|
15
|
+
}));
|
|
16
|
+
out({ functions });
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export const pikkuMetaFunctionsGet = pikkuSessionlessFunc({
|
|
20
|
+
func: async ({ getInspectorState }, data) => {
|
|
21
|
+
const state = await getInspectorState();
|
|
22
|
+
const m = state.functions.meta?.[data.functionId];
|
|
23
|
+
if (!m)
|
|
24
|
+
throw new Error(`Function not found: ${data.functionId}`);
|
|
25
|
+
out({
|
|
26
|
+
functionId: data.functionId,
|
|
27
|
+
name: m.name ?? data.functionId,
|
|
28
|
+
description: m.description ?? null,
|
|
29
|
+
sourceFile: m.sourceFile ?? null,
|
|
30
|
+
inputSchemaName: m.inputSchemaName ?? null,
|
|
31
|
+
outputSchemaName: m.outputSchemaName ?? null,
|
|
32
|
+
tags: m.tags ?? [],
|
|
33
|
+
expose: m.expose === true,
|
|
34
|
+
readonly: m.readonly === true,
|
|
35
|
+
input: { name: m.inputSchemaName ?? null, jsonSchema: null },
|
|
36
|
+
output: { name: m.outputSchemaName ?? null, jsonSchema: null },
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const pikkuMetaSchemasList = pikkuSessionlessFunc({
|
|
41
|
+
func: async ({ getInspectorState }) => {
|
|
42
|
+
const state = await getInspectorState();
|
|
43
|
+
const schemaNames = Object.keys(state.schemas ?? {}).sort();
|
|
44
|
+
out({ schemaNames });
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
export const pikkuMetaSchemasGet = pikkuSessionlessFunc({
|
|
48
|
+
func: async ({ getInspectorState }, data) => {
|
|
49
|
+
const state = await getInspectorState();
|
|
50
|
+
const schema = state.schemas?.[data.schemaName] ?? getSchema(data.schemaName);
|
|
51
|
+
if (!schema)
|
|
52
|
+
throw new Error(`Schema not found: ${data.schemaName}`);
|
|
53
|
+
out({
|
|
54
|
+
schemaName: data.schemaName,
|
|
55
|
+
jsonSchema: schema,
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
export const pikkuMetaWorkflowsList = pikkuSessionlessFunc({
|
|
60
|
+
func: async ({ getInspectorState }) => {
|
|
61
|
+
const state = await getInspectorState();
|
|
62
|
+
const meta = state.workflows?.meta ?? {};
|
|
63
|
+
const workflows = Object.entries(meta).map(([id, wf]) => ({
|
|
64
|
+
id,
|
|
65
|
+
name: wf.name ?? id,
|
|
66
|
+
description: wf.description ?? null,
|
|
67
|
+
}));
|
|
68
|
+
out({ workflows });
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
export const pikkuMetaWorkflowsGet = pikkuSessionlessFunc({
|
|
72
|
+
func: async ({ getInspectorState }, data) => {
|
|
73
|
+
const state = await getInspectorState();
|
|
74
|
+
const wf = (state.workflows?.meta ?? {})[data.workflowId];
|
|
75
|
+
if (!wf)
|
|
76
|
+
throw new Error(`Workflow not found: ${data.workflowId}`);
|
|
77
|
+
out({
|
|
78
|
+
workflowId: data.workflowId,
|
|
79
|
+
name: wf.name ?? data.workflowId,
|
|
80
|
+
description: wf.description ?? null,
|
|
81
|
+
steps: wf.steps ?? [],
|
|
82
|
+
mode: wf.inline ? 'inline' : 'distributed',
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
export const pikkuMetaMiddlewareList = pikkuSessionlessFunc({
|
|
87
|
+
func: async ({ getInspectorState }) => {
|
|
88
|
+
const state = await getInspectorState();
|
|
89
|
+
const defs = state.middleware?.definitions ?? {};
|
|
90
|
+
const middleware = Object.entries(defs).map(([id, d]) => ({
|
|
91
|
+
id,
|
|
92
|
+
name: d.name ?? id,
|
|
93
|
+
description: d.description ?? null,
|
|
94
|
+
}));
|
|
95
|
+
out({ middleware });
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
export const pikkuMetaMiddlewareGet = pikkuSessionlessFunc({
|
|
99
|
+
func: async ({ getInspectorState }, data) => {
|
|
100
|
+
const state = await getInspectorState();
|
|
101
|
+
const d = (state.middleware?.definitions ?? {})[data.middlewareId];
|
|
102
|
+
if (!d)
|
|
103
|
+
throw new Error(`Middleware not found: ${data.middlewareId}`);
|
|
104
|
+
out({
|
|
105
|
+
middlewareId: data.middlewareId,
|
|
106
|
+
name: d.name ?? data.middlewareId,
|
|
107
|
+
description: d.description ?? null,
|
|
108
|
+
scope: ['function', 'workflow', 'agent'],
|
|
109
|
+
configSchema: null,
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
export const pikkuMetaPermissionsList = pikkuSessionlessFunc({
|
|
114
|
+
func: async ({ getInspectorState }) => {
|
|
115
|
+
const state = await getInspectorState();
|
|
116
|
+
const defs = state.permissions?.definitions ?? {};
|
|
117
|
+
const permissions = Object.entries(defs).map(([id, d]) => ({
|
|
118
|
+
id,
|
|
119
|
+
name: d.name ?? id,
|
|
120
|
+
description: d.description ?? null,
|
|
121
|
+
}));
|
|
122
|
+
out({ permissions });
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
export const pikkuMetaPermissionsGet = pikkuSessionlessFunc({
|
|
126
|
+
func: async ({ getInspectorState }, data) => {
|
|
127
|
+
const state = await getInspectorState();
|
|
128
|
+
const d = (state.permissions?.definitions ?? {})[data.permissionId];
|
|
129
|
+
if (!d)
|
|
130
|
+
throw new Error(`Permission not found: ${data.permissionId}`);
|
|
131
|
+
out({
|
|
132
|
+
permissionId: data.permissionId,
|
|
133
|
+
name: d.name ?? data.permissionId,
|
|
134
|
+
description: d.description ?? null,
|
|
135
|
+
scope: ['function', 'workflow', 'agent'],
|
|
136
|
+
configSchema: null,
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
export const pikkuMetaWiresList = pikkuSessionlessFunc({
|
|
141
|
+
func: async ({ getInspectorState }) => {
|
|
142
|
+
const state = await getInspectorState();
|
|
143
|
+
const wireTypes = [
|
|
144
|
+
{
|
|
145
|
+
type: 'http',
|
|
146
|
+
count: Object.keys(state.http?.meta ?? {}).reduce((n, k) => n + Object.keys((state.http?.meta)[k] ?? {}).length, 0),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'scheduler',
|
|
150
|
+
count: Object.keys(state.scheduledTasks?.meta ?? {}).length,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: 'queue',
|
|
154
|
+
count: Object.keys(state.queueWorkers?.meta ?? {}).length,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'channel',
|
|
158
|
+
count: Object.keys(state.channels?.meta ?? {}).length,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'trigger',
|
|
162
|
+
count: Object.keys(state.triggers?.meta ?? {}).length,
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
out({ wireTypes });
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
async function wiresByType(getInspectorState, type) {
|
|
169
|
+
const state = await getInspectorState();
|
|
170
|
+
let items = [];
|
|
171
|
+
if (type === 'http') {
|
|
172
|
+
const meta = state.http?.meta ?? {};
|
|
173
|
+
for (const [route, methods] of Object.entries(meta)) {
|
|
174
|
+
for (const [method, m] of Object.entries(methods ?? {})) {
|
|
175
|
+
items.push({
|
|
176
|
+
id: `${method}:${route}`,
|
|
177
|
+
functionId: m.pikkuFuncId,
|
|
178
|
+
route,
|
|
179
|
+
method,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else if (type === 'scheduler') {
|
|
185
|
+
items = Object.entries(state.scheduledTasks?.meta ?? {}).map(([functionId, m]) => ({
|
|
186
|
+
id: m?.name ?? functionId,
|
|
187
|
+
functionId,
|
|
188
|
+
cron: m?.schedule ?? null,
|
|
189
|
+
}));
|
|
190
|
+
}
|
|
191
|
+
else if (type === 'queue') {
|
|
192
|
+
items = Object.entries(state.queueWorkers?.meta ?? {}).map(([functionId, m]) => ({
|
|
193
|
+
id: m?.queueName ?? functionId,
|
|
194
|
+
functionId,
|
|
195
|
+
queueName: m?.queueName ?? null,
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
else if (type === 'channel') {
|
|
199
|
+
items = Object.entries(state.channels?.meta ?? {}).map(([channelName, m]) => ({
|
|
200
|
+
id: channelName,
|
|
201
|
+
functionId: m?.message?.pikkuFuncId ??
|
|
202
|
+
m?.connect?.pikkuFuncId ??
|
|
203
|
+
m?.disconnect?.pikkuFuncId ??
|
|
204
|
+
null,
|
|
205
|
+
channelName,
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
else if (type === 'trigger') {
|
|
209
|
+
items = Object.entries(state.triggers?.meta ?? {}).map(([functionId, m]) => ({
|
|
210
|
+
id: m?.name ?? functionId,
|
|
211
|
+
functionId,
|
|
212
|
+
eventType: m?.type ?? null,
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
throw new Error(`Unsupported wire type: ${type}`);
|
|
217
|
+
}
|
|
218
|
+
return items;
|
|
219
|
+
}
|
|
220
|
+
export const pikkuMetaWiresType = pikkuSessionlessFunc({
|
|
221
|
+
func: async ({ getInspectorState }, data) => {
|
|
222
|
+
const items = await wiresByType(getInspectorState, data.type);
|
|
223
|
+
out({ type: data.type, items });
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
export const pikkuMetaWiresHttp = pikkuSessionlessFunc({
|
|
227
|
+
func: async ({ getInspectorState }) => {
|
|
228
|
+
out({
|
|
229
|
+
type: 'http',
|
|
230
|
+
items: await wiresByType(getInspectorState, 'http'),
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
export const pikkuMetaWiresScheduler = pikkuSessionlessFunc({
|
|
235
|
+
func: async ({ getInspectorState }) => {
|
|
236
|
+
out({
|
|
237
|
+
type: 'scheduler',
|
|
238
|
+
items: await wiresByType(getInspectorState, 'scheduler'),
|
|
239
|
+
});
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
export const pikkuMetaWiresQueue = pikkuSessionlessFunc({
|
|
243
|
+
func: async ({ getInspectorState }) => {
|
|
244
|
+
out({
|
|
245
|
+
type: 'queue',
|
|
246
|
+
items: await wiresByType(getInspectorState, 'queue'),
|
|
247
|
+
});
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
export const pikkuMetaWiresChannel = pikkuSessionlessFunc({
|
|
251
|
+
func: async ({ getInspectorState }) => {
|
|
252
|
+
out({
|
|
253
|
+
type: 'channel',
|
|
254
|
+
items: await wiresByType(getInspectorState, 'channel'),
|
|
255
|
+
});
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
export const pikkuMetaWiresTrigger = pikkuSessionlessFunc({
|
|
259
|
+
func: async ({ getInspectorState }) => {
|
|
260
|
+
out({
|
|
261
|
+
type: 'trigger',
|
|
262
|
+
items: await wiresByType(getInspectorState, 'trigger'),
|
|
263
|
+
});
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
/**
|
|
267
|
+
* Bulk context endpoint.
|
|
268
|
+
*
|
|
269
|
+
* Single inspection → returns everything a planner needs for first-pass
|
|
270
|
+
* planning: functions, all wires, middleware, permissions, workflows, plus
|
|
271
|
+
* project capabilities (which wire types are in use) and layout (where new
|
|
272
|
+
* files should land). Designed to replace the 6+ list calls in the planner
|
|
273
|
+
* spec — one process spawn, one inspect, ~all the metadata.
|
|
274
|
+
*
|
|
275
|
+
* Targeted `pikku meta * get` calls are still the right tool when the planner
|
|
276
|
+
* wants schema details (input/output JSON schemas) for a specific entry.
|
|
277
|
+
*/
|
|
278
|
+
export const pikkuMetaContext = pikkuSessionlessFunc({
|
|
279
|
+
func: async ({ getInspectorState, config }) => {
|
|
280
|
+
const state = await getInspectorState();
|
|
281
|
+
const functions = Object.entries(state.functions.meta ?? {}).map(([id, m]) => ({
|
|
282
|
+
id,
|
|
283
|
+
name: m?.name ?? id,
|
|
284
|
+
description: m?.description ?? null,
|
|
285
|
+
tags: m?.tags ?? [],
|
|
286
|
+
sourceFile: m?.sourceFile ?? null,
|
|
287
|
+
inputSchemaName: m?.inputSchemaName ?? null,
|
|
288
|
+
outputSchemaName: m?.outputSchemaName ?? null,
|
|
289
|
+
expose: m?.expose === true,
|
|
290
|
+
readonly: m?.readonly === true,
|
|
291
|
+
}));
|
|
292
|
+
const middleware = Object.entries(state.middleware?.definitions ?? {}).map(([id, d]) => ({
|
|
293
|
+
id,
|
|
294
|
+
name: d?.name ?? id,
|
|
295
|
+
description: d?.description ?? null,
|
|
296
|
+
}));
|
|
297
|
+
const permissions = Object.entries(state.permissions?.definitions ?? {}).map(([id, d]) => ({
|
|
298
|
+
id,
|
|
299
|
+
name: d?.name ?? id,
|
|
300
|
+
description: d?.description ?? null,
|
|
301
|
+
}));
|
|
302
|
+
const workflows = Object.entries(state.workflows?.meta ?? {}).map(([id, wf]) => ({
|
|
303
|
+
id,
|
|
304
|
+
name: wf?.name ?? id,
|
|
305
|
+
description: wf?.description ?? null,
|
|
306
|
+
mode: wf?.inline ? 'inline' : 'distributed',
|
|
307
|
+
}));
|
|
308
|
+
const wires = {
|
|
309
|
+
http: await wiresByType(getInspectorState, 'http'),
|
|
310
|
+
scheduler: await wiresByType(getInspectorState, 'scheduler'),
|
|
311
|
+
queue: await wiresByType(getInspectorState, 'queue'),
|
|
312
|
+
channel: await wiresByType(getInspectorState, 'channel'),
|
|
313
|
+
trigger: await wiresByType(getInspectorState, 'trigger'),
|
|
314
|
+
};
|
|
315
|
+
const capabilities = {
|
|
316
|
+
http: wires.http.length > 0,
|
|
317
|
+
scheduler: wires.scheduler.length > 0,
|
|
318
|
+
queue: wires.queue.length > 0,
|
|
319
|
+
channel: wires.channel.length > 0,
|
|
320
|
+
trigger: wires.trigger.length > 0,
|
|
321
|
+
workflow: workflows.length > 0,
|
|
322
|
+
mcp: Object.keys(state.mcp?.meta ?? {}).length > 0,
|
|
323
|
+
agent: Object.keys(state.agents?.meta ?? {}).length > 0,
|
|
324
|
+
};
|
|
325
|
+
const cfg = config;
|
|
326
|
+
const srcDirectories = cfg.srcDirectories ?? [];
|
|
327
|
+
// If the project doesn't declare scaffold dirs, fall back to standard
|
|
328
|
+
// conventions rooted at the first src directory. Agents need a concrete
|
|
329
|
+
// target dir to emit `targetFile` against — null is not actionable.
|
|
330
|
+
const srcRoot = srcDirectories[0] ?? 'src';
|
|
331
|
+
const layout = {
|
|
332
|
+
rootDir: cfg.rootDir ?? null,
|
|
333
|
+
srcDirectories,
|
|
334
|
+
configFile: cfg.configFile ?? null,
|
|
335
|
+
scaffold: {
|
|
336
|
+
functionDir: cfg.scaffold?.functionDir ?? `${srcRoot}/functions`,
|
|
337
|
+
wiringDir: cfg.scaffold?.wiringDir ?? `${srcRoot}/wirings`,
|
|
338
|
+
middlewareDir: cfg.scaffold?.middlewareDir ?? `${srcRoot}/middleware`,
|
|
339
|
+
permissionDir: cfg.scaffold?.permissionDir ?? `${srcRoot}/permissions`,
|
|
340
|
+
},
|
|
341
|
+
globalHTTPPrefix: cfg.globalHTTPPrefix || null,
|
|
342
|
+
};
|
|
343
|
+
const summary = {
|
|
344
|
+
functions: functions.length,
|
|
345
|
+
middleware: middleware.length,
|
|
346
|
+
permissions: permissions.length,
|
|
347
|
+
workflows: workflows.length,
|
|
348
|
+
wires: {
|
|
349
|
+
http: wires.http.length,
|
|
350
|
+
scheduler: wires.scheduler.length,
|
|
351
|
+
queue: wires.queue.length,
|
|
352
|
+
channel: wires.channel.length,
|
|
353
|
+
trigger: wires.trigger.length,
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
out({
|
|
357
|
+
schemaVersion: 'meta-context.v1',
|
|
358
|
+
summary,
|
|
359
|
+
capabilities,
|
|
360
|
+
layout,
|
|
361
|
+
functions,
|
|
362
|
+
middleware,
|
|
363
|
+
permissions,
|
|
364
|
+
workflows,
|
|
365
|
+
wires,
|
|
366
|
+
});
|
|
367
|
+
},
|
|
368
|
+
});
|
|
369
|
+
/**
|
|
370
|
+
* Frontend-targeted metadata.
|
|
371
|
+
*
|
|
372
|
+
* Returns only what a UI agent needs to write client code:
|
|
373
|
+
* - RPCs: every exposed function with input/output type names,
|
|
374
|
+
* description, readonly flag, tags.
|
|
375
|
+
* - Workflows: name, description, mode (inline|distributed), input/output
|
|
376
|
+
* types resolved through the workflow's underlying function.
|
|
377
|
+
* - Channels: name, route, description, plus the input/output types of
|
|
378
|
+
* the connect / disconnect / message handlers and any routed messages.
|
|
379
|
+
*
|
|
380
|
+
* Everything else (middleware, permissions, layout, scaffold dirs,
|
|
381
|
+
* non-exposed functions, http wires) is a backend concern and stays in
|
|
382
|
+
* `pikku meta context`.
|
|
383
|
+
*/
|
|
384
|
+
export const pikkuMetaClients = pikkuSessionlessFunc({
|
|
385
|
+
func: async ({ getInspectorState }) => {
|
|
386
|
+
const state = await getInspectorState();
|
|
387
|
+
const functionsMeta = (state.functions.meta ?? {});
|
|
388
|
+
const lookupIO = (pikkuFuncId) => {
|
|
389
|
+
if (!pikkuFuncId)
|
|
390
|
+
return { input: null, output: null, description: null };
|
|
391
|
+
const m = functionsMeta[pikkuFuncId];
|
|
392
|
+
return {
|
|
393
|
+
input: m?.inputSchemaName ?? null,
|
|
394
|
+
output: m?.outputSchemaName ?? null,
|
|
395
|
+
description: m?.description ?? null,
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
const rpcs = Object.entries(functionsMeta)
|
|
399
|
+
.filter(([_id, m]) => m?.expose === true)
|
|
400
|
+
.map(([id, m]) => ({
|
|
401
|
+
name: id,
|
|
402
|
+
description: m?.description ?? null,
|
|
403
|
+
readonly: m?.readonly === true,
|
|
404
|
+
tags: m?.tags ?? [],
|
|
405
|
+
input: m?.inputSchemaName ?? null,
|
|
406
|
+
output: m?.outputSchemaName ?? null,
|
|
407
|
+
}));
|
|
408
|
+
const workflows = Object.entries(state.workflows?.meta ?? {}).map(([id, wf]) => {
|
|
409
|
+
const io = lookupIO(wf?.pikkuFuncId ?? id);
|
|
410
|
+
return {
|
|
411
|
+
name: id,
|
|
412
|
+
description: wf?.description ?? io.description,
|
|
413
|
+
mode: wf?.inline ? 'inline' : 'distributed',
|
|
414
|
+
input: io.input,
|
|
415
|
+
output: io.output,
|
|
416
|
+
};
|
|
417
|
+
});
|
|
418
|
+
const channels = Object.entries(state.channels?.meta ?? {}).map(([name, ch]) => {
|
|
419
|
+
const messageWirings = {};
|
|
420
|
+
for (const [route, methods] of Object.entries(ch?.messageWirings ?? {})) {
|
|
421
|
+
messageWirings[route] = {};
|
|
422
|
+
for (const [method, handler] of Object.entries(methods ?? {})) {
|
|
423
|
+
messageWirings[route][method] = lookupIO(handler?.pikkuFuncId);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return {
|
|
427
|
+
name,
|
|
428
|
+
route: ch?.route ?? null,
|
|
429
|
+
description: ch?.description ?? null,
|
|
430
|
+
connect: ch?.connect?.pikkuFuncId
|
|
431
|
+
? lookupIO(ch.connect.pikkuFuncId)
|
|
432
|
+
: null,
|
|
433
|
+
disconnect: ch?.disconnect?.pikkuFuncId
|
|
434
|
+
? lookupIO(ch.disconnect.pikkuFuncId)
|
|
435
|
+
: null,
|
|
436
|
+
message: ch?.message?.pikkuFuncId
|
|
437
|
+
? lookupIO(ch.message.pikkuFuncId)
|
|
438
|
+
: null,
|
|
439
|
+
messageWirings: Object.keys(messageWirings).length > 0 ? messageWirings : null,
|
|
440
|
+
};
|
|
441
|
+
});
|
|
442
|
+
out({
|
|
443
|
+
schemaVersion: 'meta-clients.v1',
|
|
444
|
+
summary: {
|
|
445
|
+
rpcs: rpcs.length,
|
|
446
|
+
workflows: workflows.length,
|
|
447
|
+
channels: channels.length,
|
|
448
|
+
},
|
|
449
|
+
rpcs,
|
|
450
|
+
workflows,
|
|
451
|
+
channels,
|
|
452
|
+
});
|
|
453
|
+
},
|
|
454
|
+
});
|
|
@@ -12,7 +12,7 @@ export declare const pikkuNewAddon: import("#pikku").PikkuFunctionConfig<{
|
|
|
12
12
|
openapi?: string;
|
|
13
13
|
mcp?: boolean;
|
|
14
14
|
camelCase?: boolean;
|
|
15
|
-
}, void, "
|
|
15
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
16
16
|
name: string;
|
|
17
17
|
displayName?: string;
|
|
18
18
|
description?: string;
|
|
@@ -26,7 +26,7 @@ export declare const pikkuNewAddon: import("#pikku").PikkuFunctionConfig<{
|
|
|
26
26
|
openapi?: string;
|
|
27
27
|
mcp?: boolean;
|
|
28
28
|
camelCase?: boolean;
|
|
29
|
-
}, void, "
|
|
29
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
30
30
|
name: string;
|
|
31
31
|
displayName?: string;
|
|
32
32
|
description?: string;
|
|
@@ -40,4 +40,4 @@ export declare const pikkuNewAddon: import("#pikku").PikkuFunctionConfig<{
|
|
|
40
40
|
openapi?: string;
|
|
41
41
|
mcp?: boolean;
|
|
42
42
|
camelCase?: boolean;
|
|
43
|
-
}, void, "
|
|
43
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const pikkuNewFunction: import("#pikku").PikkuFunctionConfig<{
|
|
2
2
|
name: string;
|
|
3
3
|
type?: string;
|
|
4
|
-
}, void, "
|
|
4
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
5
5
|
name: string;
|
|
6
6
|
type?: string;
|
|
7
|
-
}, void, "
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
8
8
|
name: string;
|
|
9
9
|
type?: string;
|
|
10
|
-
}, void, "
|
|
10
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const pikkuNewMiddleware: import("#pikku").PikkuFunctionConfig<{
|
|
2
2
|
name: string;
|
|
3
3
|
type?: string;
|
|
4
|
-
}, void, "
|
|
4
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
5
5
|
name: string;
|
|
6
6
|
type?: string;
|
|
7
|
-
}, void, "
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
8
8
|
name: string;
|
|
9
9
|
type?: string;
|
|
10
|
-
}, void, "
|
|
10
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const pikkuNewPermission: import("#pikku").PikkuFunctionConfig<{
|
|
2
2
|
name: string;
|
|
3
3
|
type?: string;
|
|
4
|
-
}, void, "
|
|
4
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
5
5
|
name: string;
|
|
6
6
|
type?: string;
|
|
7
|
-
}, void, "
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
8
8
|
name: string;
|
|
9
9
|
type?: string;
|
|
10
|
-
}, void, "
|
|
10
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const pikkuNewWiring: import("#pikku").PikkuFunctionConfig<{
|
|
2
2
|
name: string;
|
|
3
3
|
type?: string;
|
|
4
|
-
}, void, "
|
|
4
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
5
5
|
name: string;
|
|
6
6
|
type?: string;
|
|
7
|
-
}, void, "
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
8
8
|
name: string;
|
|
9
9
|
type?: string;
|
|
10
|
-
}, void, "
|
|
10
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type BootstrapInput = {
|
|
2
2
|
allImports: string[];
|
|
3
3
|
};
|
|
4
|
-
export declare const pikkuBootstrap: import("#pikku").PikkuFunctionConfig<BootstrapInput, void, "
|
|
4
|
+
export declare const pikkuBootstrap: import("#pikku").PikkuFunctionConfig<BootstrapInput, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<BootstrapInput, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<BootstrapInput, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
1
2
|
import { join, dirname } from 'node:path';
|
|
2
3
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
3
4
|
import { getFileImportRelativePath } from '../../utils/file-import-path.js';
|
|
@@ -12,7 +13,20 @@ export const pikkuBootstrap = pikkuSessionlessFunc({
|
|
|
12
13
|
logger.debug(`• Addon bootstrap: ${decl.package}`);
|
|
13
14
|
}
|
|
14
15
|
const wireAddonFileImports = Array.from(stateBeforeBootstrap.rpc?.wireAddonFiles ?? []).map((to) => `import '${getFileImportRelativePath(config.bootstrapFile, to, config.packageMappings)}'`);
|
|
15
|
-
const
|
|
16
|
+
const localImportTargets = Array.from(new Set([
|
|
17
|
+
...(config.rpcInternalWiringMetaFile &&
|
|
18
|
+
existsSync(config.rpcInternalWiringMetaFile)
|
|
19
|
+
? [config.rpcInternalWiringMetaFile]
|
|
20
|
+
: []),
|
|
21
|
+
...allImports,
|
|
22
|
+
]));
|
|
23
|
+
const safeLocalImportTargets = localImportTargets.filter((to) => {
|
|
24
|
+
if (typeof to === 'string' && to.length > 0)
|
|
25
|
+
return true;
|
|
26
|
+
logger.warn(`Skipping invalid bootstrap import path: ${String(to)}`);
|
|
27
|
+
return false;
|
|
28
|
+
});
|
|
29
|
+
const localImports = safeLocalImportTargets.map((to) => `import '${getFileImportRelativePath(config.bootstrapFile, to, config.packageMappings)}'`);
|
|
16
30
|
const addonImports = addonBootstraps.map((packagePath) => `import '${packagePath}'`);
|
|
17
31
|
const outDir = dirname(config.bootstrapFile);
|
|
18
32
|
const metaServiceFile = join(outDir, 'pikku-meta-service.gen.ts');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pikkuSummary: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const pikkuSummary: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -49,7 +49,13 @@ export const pikkuSummary = pikkuSessionlessFunc({
|
|
|
49
49
|
summary.set('workflowGraphs', workflowGraphsCount);
|
|
50
50
|
}
|
|
51
51
|
if (!logger.isSilent()) {
|
|
52
|
-
|
|
52
|
+
// Route through the logger so JSON mode emits a single NDJSON
|
|
53
|
+
// record instead of raw chalk-coloured text written directly to
|
|
54
|
+
// stdout (which would break NDJSON consumers).
|
|
55
|
+
logger.info({ message: summary.format(), type: 'summary' });
|
|
56
|
+
}
|
|
57
|
+
if (logger.hasCriticalErrors()) {
|
|
58
|
+
throw new Error('Pikku inspection failed due to critical diagnostics');
|
|
53
59
|
}
|
|
54
60
|
},
|
|
55
61
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const pikkuSkillsList: import("#pikku").PikkuFunctionConfig<{
|
|
2
|
+
target?: string;
|
|
3
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
|
+
target?: string;
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
6
|
+
target?: string;
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
8
|
+
export declare const pikkuSkillsInstall: import("#pikku").PikkuFunctionConfig<{
|
|
9
|
+
agent?: string;
|
|
10
|
+
only?: string;
|
|
11
|
+
core?: boolean;
|
|
12
|
+
fabric?: boolean;
|
|
13
|
+
update?: boolean;
|
|
14
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
15
|
+
agent?: string;
|
|
16
|
+
only?: string;
|
|
17
|
+
core?: boolean;
|
|
18
|
+
fabric?: boolean;
|
|
19
|
+
update?: boolean;
|
|
20
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
21
|
+
agent?: string;
|
|
22
|
+
only?: string;
|
|
23
|
+
core?: boolean;
|
|
24
|
+
fabric?: boolean;
|
|
25
|
+
update?: boolean;
|
|
26
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|