@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,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.21
|
|
3
|
+
*/
|
|
4
|
+
import { PikkuFetch } from "./pikku-fetch.gen.js";
|
|
5
|
+
import type { RPCInvoke, TypedAgentRun, TypedStartWorkflow, TypedRunWorkflow, TypedWorkflowStatus } from './rpc-map.gen.d.js';
|
|
6
|
+
/**
|
|
7
|
+
* PikkuRPC provides a type-safe client for making Remote Procedure Calls (RPC)
|
|
8
|
+
* to your Pikku server. It wraps the underlying HTTP client and provides a
|
|
9
|
+
* simple interface for invoking server-side functions.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PikkuRPC {
|
|
12
|
+
/** The underlying HTTP client used for making RPC calls */
|
|
13
|
+
pikkuFetch: PikkuFetch;
|
|
14
|
+
/**
|
|
15
|
+
* Sets a custom PikkuFetch instance to use for RPC calls.
|
|
16
|
+
* This allows you to configure custom settings or use a shared client instance.
|
|
17
|
+
*
|
|
18
|
+
* @param pikkuFetch - The PikkuFetch instance to use
|
|
19
|
+
*/
|
|
20
|
+
setPikkuFetch(pikkuFetch: PikkuFetch): void;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the base server URL for all RPC calls.
|
|
23
|
+
*
|
|
24
|
+
* @param serverUrl - The base URL of your Pikku server (e.g., 'https://api.example.com')
|
|
25
|
+
*/
|
|
26
|
+
setServerUrl(serverUrl: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the JWT token for authorization on all RPC calls.
|
|
29
|
+
*
|
|
30
|
+
* @param jwt - The JWT token to use for authorization, or null to remove authorization
|
|
31
|
+
*/
|
|
32
|
+
setAuthorizationJWT(jwt: string | null): void;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the API key for authorization on all RPC calls.
|
|
35
|
+
*
|
|
36
|
+
* @param apiKey - The API key to use for authorization, or null to remove the API key
|
|
37
|
+
*/
|
|
38
|
+
setAPIKey(apiKey: string | null): void;
|
|
39
|
+
/**
|
|
40
|
+
* Invokes a remote procedure call on the server.
|
|
41
|
+
* This is a generic method that routes to the appropriate server function
|
|
42
|
+
* based on the function name and passes the provided data.
|
|
43
|
+
*
|
|
44
|
+
* @param rpcName - The name of the server function to invoke
|
|
45
|
+
* @param data - The data to pass to the server function
|
|
46
|
+
* @returns A promise that resolves with the function's return value
|
|
47
|
+
*/
|
|
48
|
+
invoke: RPCInvoke;
|
|
49
|
+
/**
|
|
50
|
+
* Starts a workflow by name with the given input.
|
|
51
|
+
* Posts to \`/workflow/:workflowName/start\`.
|
|
52
|
+
*
|
|
53
|
+
* @param workflowName - The registered workflow name
|
|
54
|
+
* @param input - The workflow input data
|
|
55
|
+
* @returns A promise that resolves with the new run ID
|
|
56
|
+
*/
|
|
57
|
+
startWorkflow: TypedStartWorkflow;
|
|
58
|
+
/**
|
|
59
|
+
* Runs a workflow to completion and returns the output.
|
|
60
|
+
* Posts to \`/workflow/:workflowName/run\`.
|
|
61
|
+
*
|
|
62
|
+
* @param workflowName - The registered workflow name
|
|
63
|
+
* @param input - The workflow input data
|
|
64
|
+
* @returns A promise that resolves with the workflow output
|
|
65
|
+
*/
|
|
66
|
+
runWorkflow: TypedRunWorkflow;
|
|
67
|
+
/**
|
|
68
|
+
* Gets the current status of a workflow run.
|
|
69
|
+
* GET \`/workflow/:workflowName/status/:runId\`.
|
|
70
|
+
*
|
|
71
|
+
* @param workflowName - The registered workflow name
|
|
72
|
+
* @param runId - The workflow run ID
|
|
73
|
+
* @returns A promise with the minimal run status
|
|
74
|
+
*/
|
|
75
|
+
workflowStatus: TypedWorkflowStatus;
|
|
76
|
+
/**
|
|
77
|
+
* Agent namespace — methods for running, streaming, and approving AI agents.
|
|
78
|
+
* All methods post to \`/rpc/agent/:agentName/*\`.
|
|
79
|
+
*/
|
|
80
|
+
agent: {
|
|
81
|
+
/**
|
|
82
|
+
* Runs an agent to completion and returns the result.
|
|
83
|
+
*
|
|
84
|
+
* @param agentName - The registered agent name
|
|
85
|
+
* @param input - The agent input (message, threadId, resourceId)
|
|
86
|
+
* @returns A promise with runId, result, and token usage
|
|
87
|
+
*/
|
|
88
|
+
run: TypedAgentRun;
|
|
89
|
+
/**
|
|
90
|
+
* Streams agent responses via SSE. Used for real-time chat interfaces.
|
|
91
|
+
*
|
|
92
|
+
* @param agentName - The registered agent name
|
|
93
|
+
* @param input - The agent input (message, threadId, resourceId)
|
|
94
|
+
*/
|
|
95
|
+
stream: (agentName: string, input: Record<string, unknown>) => Promise<any>;
|
|
96
|
+
/**
|
|
97
|
+
* Approves or denies pending tool calls for an agent run.
|
|
98
|
+
*
|
|
99
|
+
* @param agentName - The registered agent name
|
|
100
|
+
* @param input - The approval payload (runId, approvals array)
|
|
101
|
+
*/
|
|
102
|
+
approve: (agentName: string, input: Record<string, unknown>) => Promise<any>;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export declare const pikkuRPC: PikkuRPC;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.21
|
|
3
|
+
*/
|
|
4
|
+
import { PikkuFetch } from "./pikku-fetch.gen.js";
|
|
5
|
+
/**
|
|
6
|
+
* PikkuRPC provides a type-safe client for making Remote Procedure Calls (RPC)
|
|
7
|
+
* to your Pikku server. It wraps the underlying HTTP client and provides a
|
|
8
|
+
* simple interface for invoking server-side functions.
|
|
9
|
+
*/
|
|
10
|
+
export class PikkuRPC {
|
|
11
|
+
/** The underlying HTTP client used for making RPC calls */
|
|
12
|
+
pikkuFetch = new PikkuFetch();
|
|
13
|
+
/**
|
|
14
|
+
* Sets a custom PikkuFetch instance to use for RPC calls.
|
|
15
|
+
* This allows you to configure custom settings or use a shared client instance.
|
|
16
|
+
*
|
|
17
|
+
* @param pikkuFetch - The PikkuFetch instance to use
|
|
18
|
+
*/
|
|
19
|
+
setPikkuFetch(pikkuFetch) {
|
|
20
|
+
this.pikkuFetch = pikkuFetch;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Sets the base server URL for all RPC calls.
|
|
24
|
+
*
|
|
25
|
+
* @param serverUrl - The base URL of your Pikku server (e.g., 'https://api.example.com')
|
|
26
|
+
*/
|
|
27
|
+
setServerUrl(serverUrl) {
|
|
28
|
+
this.pikkuFetch.setServerUrl(serverUrl);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Sets the JWT token for authorization on all RPC calls.
|
|
32
|
+
*
|
|
33
|
+
* @param jwt - The JWT token to use for authorization, or null to remove authorization
|
|
34
|
+
*/
|
|
35
|
+
setAuthorizationJWT(jwt) {
|
|
36
|
+
this.pikkuFetch.setAuthorizationJWT(jwt);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Sets the API key for authorization on all RPC calls.
|
|
40
|
+
*
|
|
41
|
+
* @param apiKey - The API key to use for authorization, or null to remove the API key
|
|
42
|
+
*/
|
|
43
|
+
setAPIKey(apiKey) {
|
|
44
|
+
this.pikkuFetch.setAPIKey(apiKey);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Invokes a remote procedure call on the server.
|
|
48
|
+
* This is a generic method that routes to the appropriate server function
|
|
49
|
+
* based on the function name and passes the provided data.
|
|
50
|
+
*
|
|
51
|
+
* @param rpcName - The name of the server function to invoke
|
|
52
|
+
* @param data - The data to pass to the server function
|
|
53
|
+
* @returns A promise that resolves with the function's return value
|
|
54
|
+
*/
|
|
55
|
+
invoke = ((rpcName, data) => {
|
|
56
|
+
return this.pikkuFetch.post(`/rpc/${String(rpcName)}`, { rpcName: String(rpcName), data });
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* Starts a workflow by name with the given input.
|
|
60
|
+
* Posts to \`/workflow/:workflowName/start\`.
|
|
61
|
+
*
|
|
62
|
+
* @param workflowName - The registered workflow name
|
|
63
|
+
* @param input - The workflow input data
|
|
64
|
+
* @returns A promise that resolves with the new run ID
|
|
65
|
+
*/
|
|
66
|
+
startWorkflow = async (workflowName, input) => {
|
|
67
|
+
return await this.pikkuFetch.post(`/workflow/${String(workflowName)}/start`, { data: input });
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Runs a workflow to completion and returns the output.
|
|
71
|
+
* Posts to \`/workflow/:workflowName/run\`.
|
|
72
|
+
*
|
|
73
|
+
* @param workflowName - The registered workflow name
|
|
74
|
+
* @param input - The workflow input data
|
|
75
|
+
* @returns A promise that resolves with the workflow output
|
|
76
|
+
*/
|
|
77
|
+
runWorkflow = async (workflowName, input) => {
|
|
78
|
+
return await this.pikkuFetch.post(`/workflow/${String(workflowName)}/run`, { data: input });
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Gets the current status of a workflow run.
|
|
82
|
+
* GET \`/workflow/:workflowName/status/:runId\`.
|
|
83
|
+
*
|
|
84
|
+
* @param workflowName - The registered workflow name
|
|
85
|
+
* @param runId - The workflow run ID
|
|
86
|
+
* @returns A promise with the minimal run status
|
|
87
|
+
*/
|
|
88
|
+
workflowStatus = async (workflowName, runId) => {
|
|
89
|
+
return await this.pikkuFetch.get(`/workflow/${String(workflowName)}/status/${runId}`);
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Agent namespace — methods for running, streaming, and approving AI agents.
|
|
93
|
+
* All methods post to \`/rpc/agent/:agentName/*\`.
|
|
94
|
+
*/
|
|
95
|
+
agent = {
|
|
96
|
+
/**
|
|
97
|
+
* Runs an agent to completion and returns the result.
|
|
98
|
+
*
|
|
99
|
+
* @param agentName - The registered agent name
|
|
100
|
+
* @param input - The agent input (message, threadId, resourceId)
|
|
101
|
+
* @returns A promise with runId, result, and token usage
|
|
102
|
+
*/
|
|
103
|
+
run: (async (agentName, input) => {
|
|
104
|
+
return await this.pikkuFetch.post(`/rpc/agent/${String(agentName)}`, input);
|
|
105
|
+
}),
|
|
106
|
+
/**
|
|
107
|
+
* Streams agent responses via SSE. Used for real-time chat interfaces.
|
|
108
|
+
*
|
|
109
|
+
* @param agentName - The registered agent name
|
|
110
|
+
* @param input - The agent input (message, threadId, resourceId)
|
|
111
|
+
*/
|
|
112
|
+
stream: async (agentName, input) => {
|
|
113
|
+
return await this.pikkuFetch.post(`/rpc/agent/${String(agentName)}/stream`, input);
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* Approves or denies pending tool calls for an agent run.
|
|
117
|
+
*
|
|
118
|
+
* @param agentName - The registered agent name
|
|
119
|
+
* @param input - The approval payload (runId, approvals array)
|
|
120
|
+
*/
|
|
121
|
+
approve: async (agentName, input) => {
|
|
122
|
+
return await this.pikkuFetch.post(`/rpc/agent/${String(agentName)}/approve`, input);
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export const pikkuRPC = new PikkuRPC();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const all: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const all: 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>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const binary: import("#pikku").PikkuFunctionConfig<{
|
|
2
|
+
compileTarget?: string;
|
|
3
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
|
+
compileTarget?: string;
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
6
|
+
compileTarget?: string;
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { resolve, dirname } from 'node:path';
|
|
2
|
+
import { existsSync, mkdirSync } from 'node:fs';
|
|
3
|
+
import { execFileSync } from 'node:child_process';
|
|
4
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
5
|
+
function targetSuffix(target) {
|
|
6
|
+
return target.replace(/^bun-/, '').replace(/[^a-z0-9_-]/g, '-');
|
|
7
|
+
}
|
|
8
|
+
export const binary = pikkuSessionlessFunc({
|
|
9
|
+
func: async ({ logger, config }, data) => {
|
|
10
|
+
const binConfig = config.binary;
|
|
11
|
+
if (!binConfig) {
|
|
12
|
+
throw new Error('No "binary" config found in pikku.config.json. Add a "binary" section with "entrypoint" and "output".');
|
|
13
|
+
}
|
|
14
|
+
const entrypoint = resolve(config.rootDir, binConfig.entrypoint);
|
|
15
|
+
if (!existsSync(entrypoint)) {
|
|
16
|
+
throw new Error(`Binary entrypoint not found: ${entrypoint}`);
|
|
17
|
+
}
|
|
18
|
+
const outputBase = resolve(config.rootDir, binConfig.output);
|
|
19
|
+
const outputDir = dirname(outputBase);
|
|
20
|
+
if (!existsSync(outputDir)) {
|
|
21
|
+
mkdirSync(outputDir, { recursive: true });
|
|
22
|
+
}
|
|
23
|
+
const targets = data?.compileTarget
|
|
24
|
+
? [data.compileTarget]
|
|
25
|
+
: binConfig.targets?.length
|
|
26
|
+
? binConfig.targets
|
|
27
|
+
: [undefined];
|
|
28
|
+
for (const target of targets) {
|
|
29
|
+
const outputPath = target
|
|
30
|
+
? `${outputBase}-${targetSuffix(target)}`
|
|
31
|
+
: outputBase;
|
|
32
|
+
const args = ['build', '--compile', `--outfile=${outputPath}`, entrypoint];
|
|
33
|
+
if (target)
|
|
34
|
+
args.splice(2, 0, `--target=${target}`);
|
|
35
|
+
logger.info(`Compiling${target ? ` for ${target}` : ''}...`);
|
|
36
|
+
execFileSync('bun', args, { stdio: 'inherit' });
|
|
37
|
+
logger.info(`Output: ${outputPath}`);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const bootstrap: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const bootstrap: 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>;
|
|
@@ -2,17 +2,20 @@ import { pikkuVoidFunc } from '#pikku';
|
|
|
2
2
|
export const bootstrap = pikkuVoidFunc({
|
|
3
3
|
remote: true,
|
|
4
4
|
func: async ({ logger, getInspectorState }, _data, { rpc }) => {
|
|
5
|
-
await getInspectorState(false,
|
|
6
|
-
await rpc.invoke('pikkuFunctionTypes');
|
|
5
|
+
await getInspectorState(false, true, true);
|
|
7
6
|
await rpc.invoke('pikkuFunctionTypesSplit');
|
|
7
|
+
await rpc.invoke('pikkuFunctionTypes');
|
|
8
8
|
await rpc.invoke('pikkuHTTPTypes');
|
|
9
9
|
await rpc.invoke('pikkuChannelTypes');
|
|
10
10
|
await rpc.invoke('pikkuSchedulerTypes');
|
|
11
11
|
await rpc.invoke('pikkuQueueTypes');
|
|
12
|
-
await rpc.invoke('pikkuWorkflow');
|
|
12
|
+
await rpc.invoke('pikkuWorkflow', { bootstrap: true });
|
|
13
|
+
await rpc.invoke('pikkuTriggerTypes');
|
|
13
14
|
await rpc.invoke('pikkuMCPTypes');
|
|
14
15
|
await rpc.invoke('pikkuAIAgentTypes');
|
|
15
|
-
await rpc.invoke('
|
|
16
|
+
await rpc.invoke('pikkuNodeTypes');
|
|
17
|
+
await rpc.invoke('pikkuSecretDefinitionTypes');
|
|
18
|
+
await rpc.invoke('pikkuCLITypes', { bootstrap: true });
|
|
16
19
|
if (logger.hasCriticalErrors()) {
|
|
17
20
|
process.exit(1);
|
|
18
21
|
}
|
|
@@ -2,12 +2,12 @@ export declare const consoleCommand: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
port?: string;
|
|
3
3
|
open?: string;
|
|
4
4
|
hmr?: boolean;
|
|
5
|
-
}, void, "
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
6
6
|
port?: string;
|
|
7
7
|
open?: string;
|
|
8
8
|
hmr?: boolean;
|
|
9
|
-
}, void, "
|
|
9
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
10
10
|
port?: string;
|
|
11
11
|
open?: string;
|
|
12
12
|
hmr?: boolean;
|
|
13
|
-
}, void, "
|
|
13
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dbMigrate: import("#pikku").PikkuFunctionConfig<{}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { resolveLocalDb, migrateAndCodegen } from '../db/local-db.js';
|
|
3
|
+
import { loadUserConfigForDb } from './db-shared.js';
|
|
4
|
+
export const dbMigrate = pikkuSessionlessFunc({
|
|
5
|
+
remote: true,
|
|
6
|
+
func: async ({ logger, config, getInspectorState }) => {
|
|
7
|
+
const userConfig = await loadUserConfigForDb({
|
|
8
|
+
config,
|
|
9
|
+
getInspectorState,
|
|
10
|
+
logger,
|
|
11
|
+
});
|
|
12
|
+
if (!userConfig)
|
|
13
|
+
return;
|
|
14
|
+
const resolved = resolveLocalDb(userConfig.dev?.db, config.rootDir, config.outDir, config.runtimeDir);
|
|
15
|
+
if (!resolved) {
|
|
16
|
+
logger.error('pikku db migrate: dev.db is not configured in your pikku config.');
|
|
17
|
+
throw new Error('dev.db not configured');
|
|
18
|
+
}
|
|
19
|
+
const { migrate, codegen, zod } = migrateAndCodegen(resolved);
|
|
20
|
+
if (migrate.applied.length === 0) {
|
|
21
|
+
logger.info(`db migrate: no pending migrations (${migrate.skipped.length} already applied)`);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
for (const name of migrate.applied) {
|
|
25
|
+
logger.info(`db migrate: applied ${name}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
logger.info(codegen.written
|
|
29
|
+
? `db migrate: regenerated ${codegen.outFile} (${codegen.tables.length} tables)`
|
|
30
|
+
: `db migrate: ${codegen.outFile} unchanged`);
|
|
31
|
+
logger.info(zod.written
|
|
32
|
+
? `db migrate: regenerated ${zod.outFile} (${zod.tables.length} tables)`
|
|
33
|
+
: `db migrate: ${zod.outFile} unchanged`);
|
|
34
|
+
},
|
|
35
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dbReset: import("#pikku").PikkuFunctionConfig<{}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { resolveLocalDb, reset, migrateAndCodegen, seed, } from '../db/local-db.js';
|
|
3
|
+
import { loadUserConfigForDb } from './db-shared.js';
|
|
4
|
+
export const dbReset = pikkuSessionlessFunc({
|
|
5
|
+
remote: true,
|
|
6
|
+
func: async ({ logger, config, getInspectorState }) => {
|
|
7
|
+
const userConfig = await loadUserConfigForDb({
|
|
8
|
+
config,
|
|
9
|
+
getInspectorState,
|
|
10
|
+
logger,
|
|
11
|
+
});
|
|
12
|
+
if (!userConfig)
|
|
13
|
+
return;
|
|
14
|
+
const resolved = resolveLocalDb(userConfig.dev?.db, config.rootDir, config.outDir, config.runtimeDir);
|
|
15
|
+
if (!resolved) {
|
|
16
|
+
logger.error('pikku db reset: dev.db is not configured in your pikku config.');
|
|
17
|
+
throw new Error('dev.db not configured');
|
|
18
|
+
}
|
|
19
|
+
reset(resolved, config.rootDir);
|
|
20
|
+
logger.info(`db reset: removed ${resolved.dbFile}`);
|
|
21
|
+
const { migrate, codegen, zod } = migrateAndCodegen(resolved);
|
|
22
|
+
for (const name of migrate.applied) {
|
|
23
|
+
logger.info(`db reset: applied ${name}`);
|
|
24
|
+
}
|
|
25
|
+
logger.info(codegen.written
|
|
26
|
+
? `db reset: regenerated ${codegen.outFile} (${codegen.tables.length} tables)`
|
|
27
|
+
: `db reset: ${codegen.outFile} unchanged`);
|
|
28
|
+
logger.info(zod.written
|
|
29
|
+
? `db reset: regenerated ${zod.outFile} (${zod.tables.length} tables)`
|
|
30
|
+
: `db reset: ${zod.outFile} unchanged`);
|
|
31
|
+
const seedResult = seed(resolved);
|
|
32
|
+
if (seedResult.applied) {
|
|
33
|
+
logger.info(`db reset: seeded ${resolved.seedFile} (${seedResult.bytes} bytes)`);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dbSeed: import("#pikku").PikkuFunctionConfig<{}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { pikkuSessionlessFunc } from '#pikku';
|
|
2
|
+
import { resolveLocalDb, seed } from '../db/local-db.js';
|
|
3
|
+
import { loadUserConfigForDb } from './db-shared.js';
|
|
4
|
+
export const dbSeed = pikkuSessionlessFunc({
|
|
5
|
+
remote: true,
|
|
6
|
+
func: async ({ logger, config, getInspectorState }) => {
|
|
7
|
+
const userConfig = await loadUserConfigForDb({
|
|
8
|
+
config,
|
|
9
|
+
getInspectorState,
|
|
10
|
+
logger,
|
|
11
|
+
});
|
|
12
|
+
if (!userConfig)
|
|
13
|
+
return;
|
|
14
|
+
const resolved = resolveLocalDb(userConfig.dev?.db, config.rootDir, config.outDir, config.runtimeDir);
|
|
15
|
+
if (!resolved) {
|
|
16
|
+
logger.error('pikku db seed: dev.db is not configured in your pikku config.');
|
|
17
|
+
throw new Error('dev.db not configured');
|
|
18
|
+
}
|
|
19
|
+
const result = seed(resolved);
|
|
20
|
+
if (!result.applied) {
|
|
21
|
+
logger.info(`db seed: no ${resolved.seedFile} found, nothing to do`);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
logger.info(`db seed: applied ${resolved.seedFile} (${result.bytes} bytes)`);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { DevDbConfig } from '../db/local-db.js';
|
|
2
|
+
export interface UserConfigShape {
|
|
3
|
+
dev?: {
|
|
4
|
+
db?: DevDbConfig;
|
|
5
|
+
};
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
interface LoadOptions {
|
|
9
|
+
config: {
|
|
10
|
+
rootDir: string;
|
|
11
|
+
outDir: string;
|
|
12
|
+
};
|
|
13
|
+
getInspectorState: (refresh: boolean) => Promise<{
|
|
14
|
+
filesAndMethods: {
|
|
15
|
+
pikkuConfigFactory?: {
|
|
16
|
+
file: string;
|
|
17
|
+
variable: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
logger: {
|
|
22
|
+
error: (msg: string) => void;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Load the user's pikkuConfig the same way `dev.ts` does — through the
|
|
27
|
+
* inspector state, then by importing the user's config factory file.
|
|
28
|
+
* Returns `null` (and logs the error) if the project hasn't defined a
|
|
29
|
+
* pikkuConfigFactory, so the caller can early-exit.
|
|
30
|
+
*/
|
|
31
|
+
export declare function loadUserConfigForDb(options: LoadOptions): Promise<UserConfigShape | null>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import { loadUserBootstrap, loadUserModule } from './load-user-project.js';
|
|
3
|
+
/**
|
|
4
|
+
* Load the user's pikkuConfig the same way `dev.ts` does — through the
|
|
5
|
+
* inspector state, then by importing the user's config factory file.
|
|
6
|
+
* Returns `null` (and logs the error) if the project hasn't defined a
|
|
7
|
+
* pikkuConfigFactory, so the caller can early-exit.
|
|
8
|
+
*/
|
|
9
|
+
export async function loadUserConfigForDb(options) {
|
|
10
|
+
const { config, getInspectorState, logger } = options;
|
|
11
|
+
const inspectorState = await getInspectorState(true);
|
|
12
|
+
const { pikkuConfigFactory } = inspectorState.filesAndMethods;
|
|
13
|
+
if (!pikkuConfigFactory) {
|
|
14
|
+
logger.error('createConfig must be defined in your project');
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const pikkuDir = resolve(config.rootDir, config.outDir);
|
|
18
|
+
await loadUserBootstrap(pikkuDir);
|
|
19
|
+
const configModule = await loadUserModule(pikkuConfigFactory.file);
|
|
20
|
+
const userCreateConfig = configModule[pikkuConfigFactory.variable];
|
|
21
|
+
if (typeof userCreateConfig !== 'function') {
|
|
22
|
+
logger.error(`Expected '${pikkuConfigFactory.variable}' in '${pikkuConfigFactory.file}' to be a function`);
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return (await userCreateConfig());
|
|
26
|
+
}
|
|
@@ -11,12 +11,12 @@ export declare const deployApply: import("#pikku").PikkuFunctionConfig<{
|
|
|
11
11
|
fromPlan?: boolean;
|
|
12
12
|
provider?: string;
|
|
13
13
|
resultFile?: string;
|
|
14
|
-
}, void, "
|
|
14
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
15
15
|
fromPlan?: boolean;
|
|
16
16
|
provider?: string;
|
|
17
17
|
resultFile?: string;
|
|
18
|
-
}, void, "
|
|
18
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
19
19
|
fromPlan?: boolean;
|
|
20
20
|
provider?: string;
|
|
21
21
|
resultFile?: string;
|
|
22
|
-
}, void, "
|
|
22
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -94,7 +94,6 @@ export async function resolveProvider(config, providerName) {
|
|
|
94
94
|
}
|
|
95
95
|
const ANSI = {
|
|
96
96
|
green: '\x1b[32m',
|
|
97
|
-
red: '\x1b[31m',
|
|
98
97
|
bold: '\x1b[1m',
|
|
99
98
|
reset: '\x1b[0m',
|
|
100
99
|
};
|
|
@@ -119,8 +118,12 @@ async function runDeploy(provider, providerDir, logger, resultFile) {
|
|
|
119
118
|
deployResult = await provider.deploy({
|
|
120
119
|
buildDir: providerDir,
|
|
121
120
|
logger,
|
|
122
|
-
onProgress: (
|
|
123
|
-
|
|
121
|
+
onProgress: (step, detail) => {
|
|
122
|
+
logger.info({
|
|
123
|
+
message: `[${step}] ${detail}`,
|
|
124
|
+
type: 'progress',
|
|
125
|
+
data: { progress: { step, detail } },
|
|
126
|
+
});
|
|
124
127
|
},
|
|
125
128
|
});
|
|
126
129
|
}
|
|
@@ -132,7 +135,6 @@ async function runDeploy(provider, providerDir, logger, resultFile) {
|
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
137
|
await writeResultFile(resultFile, deployResult);
|
|
135
|
-
console.log('');
|
|
136
138
|
if (deployResult.success) {
|
|
137
139
|
logger.info(`${ANSI.green}${ANSI.bold}Deployment complete.${ANSI.reset}`);
|
|
138
140
|
logger.info(` ${deployResult.workersDeployed?.length ?? 0} units deployed, ${deployResult.resourcesCreated?.length ?? 0} resources created`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const deployInfo: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const deployInfo: 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>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const deployPlan: import("#pikku").PikkuFunctionConfig<{
|
|
2
2
|
resultFile?: string;
|
|
3
3
|
provider?: string;
|
|
4
|
-
}, void, "
|
|
4
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
5
5
|
resultFile?: string;
|
|
6
6
|
provider?: string;
|
|
7
|
-
}, void, "
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
8
8
|
resultFile?: string;
|
|
9
9
|
provider?: string;
|
|
10
|
-
}, void, "
|
|
10
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -89,7 +89,13 @@ export const deployPlan = pikkuSessionlessFunc({
|
|
|
89
89
|
unitCount: result.bundled.length,
|
|
90
90
|
totalSizeBytes: totalSize,
|
|
91
91
|
errors: result.bundleErrors,
|
|
92
|
-
|
|
92
|
+
codegenErrors: result.codegenErrors,
|
|
93
|
+
summary: plan.summary,
|
|
94
|
+
changeCount: plan.changes.length,
|
|
95
|
+
artifacts: {
|
|
96
|
+
deploymentManifestPath: result.deploymentManifestPath,
|
|
97
|
+
infraPath: result.infraPath,
|
|
98
|
+
},
|
|
93
99
|
}, null, 2), 'utf-8');
|
|
94
100
|
}
|
|
95
101
|
},
|
|
@@ -2,12 +2,12 @@ export declare const dev: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
port?: string;
|
|
3
3
|
watch?: boolean;
|
|
4
4
|
hmr?: boolean;
|
|
5
|
-
}, void, "
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
6
6
|
port?: string;
|
|
7
7
|
watch?: boolean;
|
|
8
8
|
hmr?: boolean;
|
|
9
|
-
}, void, "
|
|
9
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
10
10
|
port?: string;
|
|
11
11
|
watch?: boolean;
|
|
12
12
|
hmr?: boolean;
|
|
13
|
-
}, void, "
|
|
13
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|