@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,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-ai-voice
|
|
3
|
+
description: 'Use when adding voice input (speech-to-text) or voice output (text-to-speech) to AI agents in a Pikku app. Covers voiceInput/voiceOutput middleware hooks and STT/TTS service interfaces.
|
|
4
|
+
TRIGGER when: code uses voiceInput, voiceOutput, STTService, TTSService, or user asks about voice, speech-to-text, text-to-speech, or @pikku/ai-voice.
|
|
5
|
+
DO NOT TRIGGER when: user asks about AI agent wiring (use pikku-ai-agent) or Vercel AI SDK (use pikku-ai-vercel).'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Pikku AI Voice (Speech I/O)
|
|
9
|
+
|
|
10
|
+
## Agent Operating Procedure
|
|
11
|
+
|
|
12
|
+
Use this skill as an execution checklist, not reference material.
|
|
13
|
+
|
|
14
|
+
1. Discover before editing. Prefer OpenCode tools such as `pikku-meta` when available; otherwise run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
15
|
+
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
16
|
+
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
17
|
+
4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
18
|
+
5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
19
|
+
|
|
20
|
+
`@pikku/ai-voice` provides speech-to-text and text-to-speech middleware hooks for Pikku AI agents.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
yarn add @pikku/ai-voice
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API Reference
|
|
29
|
+
|
|
30
|
+
### Service Interfaces
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
interface STTService {
|
|
34
|
+
transcribe(
|
|
35
|
+
audio: Uint8Array,
|
|
36
|
+
options?: { language?: string; format?: string }
|
|
37
|
+
): Promise<string>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface TTSService {
|
|
41
|
+
synthesize(
|
|
42
|
+
text: string,
|
|
43
|
+
options?: { voice?: string; format?: string }
|
|
44
|
+
): Promise<Uint8Array>
|
|
45
|
+
synthesizeStream?(
|
|
46
|
+
text: string,
|
|
47
|
+
options?: { voice?: string; format?: string }
|
|
48
|
+
): AsyncIterable<Uint8Array>
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Middleware Hooks
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { voiceInput, voiceOutput } from '@pikku/ai-voice'
|
|
56
|
+
|
|
57
|
+
voiceInput(config?: { language?: string }): PikkuAIMiddlewareHooks
|
|
58
|
+
voiceOutput(config?: { format?: string; voice?: string }): PikkuAIMiddlewareHooks
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
These return middleware hooks that can be attached to AI agent wirings to automatically transcribe audio input and synthesize audio output.
|
|
62
|
+
|
|
63
|
+
## Usage Patterns
|
|
64
|
+
|
|
65
|
+
### Voice-Enabled Agent
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { voiceInput, voiceOutput } from '@pikku/ai-voice'
|
|
69
|
+
import { wireAIAgent } from '@pikku/core/ai-agent'
|
|
70
|
+
|
|
71
|
+
wireAIAgent({
|
|
72
|
+
name: 'voice-assistant',
|
|
73
|
+
model: 'openai:gpt-4o',
|
|
74
|
+
systemPrompt: 'You are a voice assistant.',
|
|
75
|
+
middlewareHooks: [
|
|
76
|
+
voiceInput({ language: 'en' }),
|
|
77
|
+
voiceOutput({ voice: 'alloy', format: 'mp3' }),
|
|
78
|
+
],
|
|
79
|
+
func: myAgentFunc,
|
|
80
|
+
})
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Custom STT/TTS Services
|
|
84
|
+
|
|
85
|
+
Implement the `STTService` and `TTSService` interfaces with your provider (OpenAI Whisper, ElevenLabs, etc.) and register them as singleton services.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-auth-js
|
|
3
|
+
description: 'Use when integrating Auth.js (NextAuth) with a Pikku app. Covers createAuthHandler, createAuthRoutes, and Auth.js configuration.
|
|
4
|
+
TRIGGER when: code uses createAuthHandler, createAuthRoutes, user asks about Auth.js, NextAuth, OAuth providers, or @pikku/auth-js.
|
|
5
|
+
DO NOT TRIGGER when: user asks about JWT middleware (use pikku-security) or custom session services (use pikku-services).'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Pikku Auth.js Integration
|
|
9
|
+
|
|
10
|
+
## Agent Operating Procedure
|
|
11
|
+
|
|
12
|
+
Use this skill as an execution checklist, not reference material.
|
|
13
|
+
|
|
14
|
+
1. Discover before editing. Prefer OpenCode tools such as `pikku-meta` when available; otherwise run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
15
|
+
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
16
|
+
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
17
|
+
4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
18
|
+
5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
19
|
+
|
|
20
|
+
`@pikku/auth-js` provides [Auth.js](https://authjs.dev/) integration for Pikku apps, handling OAuth providers, session management, and auth routes.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
yarn add @pikku/auth-js @auth/core
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API Reference
|
|
29
|
+
|
|
30
|
+
### `createAuthHandler(config)`
|
|
31
|
+
|
|
32
|
+
Creates a Pikku function that handles all Auth.js routes (signin, signout, callback, etc.):
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { createAuthHandler } from '@pikku/auth-js'
|
|
36
|
+
|
|
37
|
+
const authHandler = createAuthHandler(
|
|
38
|
+
config: AuthConfig | ((services: CoreSingletonServices) => AuthConfig | Promise<AuthConfig>)
|
|
39
|
+
)
|
|
40
|
+
// Returns: { func: CorePikkuFunctionSessionless }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The config can be static or a factory function that receives singleton services (useful for dynamic provider configuration).
|
|
44
|
+
|
|
45
|
+
### `createAuthRoutes(config, basePath?)`
|
|
46
|
+
|
|
47
|
+
Creates HTTP route contracts for Auth.js endpoints:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { createAuthRoutes } from '@pikku/auth-js'
|
|
51
|
+
|
|
52
|
+
const authRoutes = createAuthRoutes(
|
|
53
|
+
config: AuthConfig | ((services) => AuthConfig | Promise<AuthConfig>),
|
|
54
|
+
basePath?: string // default: '/auth'
|
|
55
|
+
)
|
|
56
|
+
// Returns: HTTPRouteContract<HTTPRouteMap>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage Patterns
|
|
60
|
+
|
|
61
|
+
### Basic Setup
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
import { createAuthHandler, createAuthRoutes } from '@pikku/auth-js'
|
|
65
|
+
import GitHub from '@auth/core/providers/github'
|
|
66
|
+
|
|
67
|
+
const authConfig = {
|
|
68
|
+
providers: [
|
|
69
|
+
GitHub({
|
|
70
|
+
clientId: process.env.GITHUB_CLIENT_ID,
|
|
71
|
+
clientSecret: process.env.GITHUB_CLIENT_SECRET,
|
|
72
|
+
}),
|
|
73
|
+
],
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const authHandler = createAuthHandler(authConfig)
|
|
77
|
+
const authRoutes = createAuthRoutes(authConfig)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Dynamic Config with Services
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
const authHandler = createAuthHandler(async (services) => {
|
|
84
|
+
const githubSecret = await services.secrets.getSecretJSON('github-oauth')
|
|
85
|
+
return {
|
|
86
|
+
providers: [
|
|
87
|
+
GitHub({
|
|
88
|
+
clientId: githubSecret.clientId,
|
|
89
|
+
clientSecret: githubSecret.clientSecret,
|
|
90
|
+
}),
|
|
91
|
+
],
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Wiring Auth Routes
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { wireHTTPRoute } from '@pikku/core/http'
|
|
100
|
+
|
|
101
|
+
// Auth routes are automatically wired when passed to your HTTP runner
|
|
102
|
+
const routes = [
|
|
103
|
+
...authRoutes,
|
|
104
|
+
// ...your other routes
|
|
105
|
+
]
|
|
106
|
+
```
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-aws
|
|
3
|
+
description: 'Use when setting up AWS services (S3, SQS, Secrets Manager) in a Pikku app. Covers S3Content for file storage, SQSQueueService for queues, and AWSSecrets for secret management.
|
|
4
|
+
TRIGGER when: code uses S3Content, SQSQueueService, AWSSecrets, or user asks about AWS integration, S3 uploads, SQS queues, or AWS Secrets Manager with Pikku.
|
|
5
|
+
DO NOT TRIGGER when: user asks about AWS Lambda runtime (use pikku-deploy-lambda).'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Pikku AWS Services
|
|
9
|
+
|
|
10
|
+
## Agent Operating Procedure
|
|
11
|
+
|
|
12
|
+
Use this skill as an execution checklist, not reference material.
|
|
13
|
+
|
|
14
|
+
1. Discover before editing. Prefer OpenCode tools such as `pikku-meta` when available; otherwise run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
15
|
+
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
16
|
+
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
17
|
+
4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
18
|
+
5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
19
|
+
|
|
20
|
+
`@pikku/aws-services` provides AWS-backed implementations of Pikku's content, queue, and secret service interfaces.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
yarn add @pikku/aws-services
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API Reference
|
|
29
|
+
|
|
30
|
+
### `S3Content` (File Storage)
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { S3Content } from '@pikku/aws-services'
|
|
34
|
+
|
|
35
|
+
const content = new S3Content(
|
|
36
|
+
config: S3ContentConfig,
|
|
37
|
+
logger: Logger,
|
|
38
|
+
signConfig: { keyPairId: string; privateKey: string }
|
|
39
|
+
)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Methods:**
|
|
43
|
+
|
|
44
|
+
- `signURL(url: string, dateLessThan: Date, dateGreaterThan?: Date): Promise<string>` — Sign a CloudFront URL
|
|
45
|
+
- `signContentKey(key: string, dateLessThan: Date, dateGreaterThan?: Date): Promise<string>` — Sign a content key
|
|
46
|
+
- `getUploadURL(Key: string, ContentType: string): Promise<{ uploadUrl, assetKey }>` — Get presigned upload URL
|
|
47
|
+
- `readFile(Key: string): Promise<ReadableStream>` — Read file as stream
|
|
48
|
+
- `readFileAsBuffer(Key: string): Promise<Buffer>` — Read file as buffer
|
|
49
|
+
- `writeFile(Key: string, stream: ReadableStream): Promise<boolean>` — Write file from stream
|
|
50
|
+
- `copyFile(Key: string, fromAbsolutePath: string): Promise<boolean>` — Copy local file to S3
|
|
51
|
+
- `deleteFile(Key: string): Promise<boolean>` — Delete file
|
|
52
|
+
|
|
53
|
+
### `SQSQueueService` (Queue)
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { SQSQueueService } from '@pikku/aws-services'
|
|
57
|
+
|
|
58
|
+
const queue = new SQSQueueService(config: SQSQueueServiceConfig)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Implements `QueueService`. Note: `supportsResults = false` — job status tracking is not supported.
|
|
62
|
+
|
|
63
|
+
**Methods:**
|
|
64
|
+
|
|
65
|
+
- `add<T>(queueName: string, data: T, options?: JobOptions): Promise<string>` — Enqueue a message
|
|
66
|
+
|
|
67
|
+
### `AWSSecrets` (Secrets Manager)
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import { AWSSecrets } from '@pikku/aws-services'
|
|
71
|
+
|
|
72
|
+
const secrets = new AWSSecrets(config: AWSConfig)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Methods:**
|
|
76
|
+
|
|
77
|
+
- `getSecret<R>(SecretId: string): Promise<R>` — Get a secret value
|
|
78
|
+
- `getSecretJSON<R>(SecretId: string): Promise<R>` — Get and parse a JSON secret
|
|
79
|
+
- `hasSecret(SecretId: string): Promise<boolean>` — Check if secret exists
|
|
80
|
+
|
|
81
|
+
## Usage Patterns
|
|
82
|
+
|
|
83
|
+
### S3 Content Service
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
const createSingletonServices = pikkuServices(async (config) => {
|
|
87
|
+
const logger = new PinoLogger()
|
|
88
|
+
const content = new S3Content(
|
|
89
|
+
{ bucket: config.s3Bucket, region: config.awsRegion },
|
|
90
|
+
logger,
|
|
91
|
+
{ keyPairId: config.cfKeyPairId, privateKey: config.cfPrivateKey }
|
|
92
|
+
)
|
|
93
|
+
return { config, logger, content }
|
|
94
|
+
})
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### SQS Queue
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
const createSingletonServices = pikkuServices(async (config) => {
|
|
101
|
+
const queue = new SQSQueueService({
|
|
102
|
+
region: config.awsRegion,
|
|
103
|
+
queueUrlPrefix: config.sqsUrlPrefix,
|
|
104
|
+
})
|
|
105
|
+
return { config, queue }
|
|
106
|
+
})
|
|
107
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-backblaze
|
|
3
|
+
description: 'Use when setting up Backblaze B2 file storage in a Pikku app. Covers B2Content for file uploads, downloads, and signed URLs.
|
|
4
|
+
TRIGGER when: code uses B2Content, user asks about Backblaze B2, or @pikku/backblaze.
|
|
5
|
+
DO NOT TRIGGER when: user asks about S3 storage (use pikku-aws).'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Pikku Backblaze (B2 Content Storage)
|
|
9
|
+
|
|
10
|
+
## Agent Operating Procedure
|
|
11
|
+
|
|
12
|
+
Use this skill as an execution checklist, not reference material.
|
|
13
|
+
|
|
14
|
+
1. Discover before editing. Prefer OpenCode tools such as `pikku-meta` when available; otherwise run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
15
|
+
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
16
|
+
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
17
|
+
4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
18
|
+
5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
19
|
+
|
|
20
|
+
`@pikku/backblaze` provides Backblaze B2-backed file storage implementing the `ContentService` interface.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
yarn add @pikku/backblaze
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API Reference
|
|
29
|
+
|
|
30
|
+
### `B2Content`
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { B2Content } from '@pikku/backblaze'
|
|
34
|
+
|
|
35
|
+
const content = new B2Content(
|
|
36
|
+
config: B2ContentConfig,
|
|
37
|
+
logger: Logger
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Methods:**
|
|
42
|
+
|
|
43
|
+
- `signContentKey(key: string, dateLessThan: Date): Promise<string>` — Sign a content key
|
|
44
|
+
- `signURL(url: string, dateLessThan: Date): Promise<string>` — Sign a URL
|
|
45
|
+
- `getUploadURL(fileKey: string, contentType: string): Promise<{ uploadUrl, assetKey, uploadMethod?, uploadHeaders? }>` — Get upload URL
|
|
46
|
+
- `writeFile(assetKey: string, stream: ReadableStream): Promise<boolean>` — Write file
|
|
47
|
+
- `copyFile(assetKey: string, fromAbsolutePath: string): Promise<boolean>` — Copy local file to B2
|
|
48
|
+
- `readFile(assetKey: string): Promise<ReadableStream>` — Read file as stream
|
|
49
|
+
- `readFileAsBuffer(assetKey: string): Promise<Buffer>` — Read file as buffer
|
|
50
|
+
- `deleteFile(fileName: string): Promise<boolean>` — Delete file
|
|
51
|
+
|
|
52
|
+
## Usage Patterns
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { B2Content } from '@pikku/backblaze'
|
|
56
|
+
|
|
57
|
+
const createSingletonServices = pikkuServices(async (config) => {
|
|
58
|
+
const logger = new PinoLogger()
|
|
59
|
+
const content = new B2Content(
|
|
60
|
+
{
|
|
61
|
+
applicationKeyId: config.b2KeyId,
|
|
62
|
+
applicationKey: config.b2AppKey,
|
|
63
|
+
bucketId: config.b2BucketId,
|
|
64
|
+
cdnUrl: config.b2CdnUrl,
|
|
65
|
+
},
|
|
66
|
+
logger
|
|
67
|
+
)
|
|
68
|
+
return { config, logger, content }
|
|
69
|
+
})
|
|
70
|
+
```
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-cli
|
|
3
|
+
description: 'Use when building CLI commands with Pikku. Covers wireCLI, pikkuCLICommand, subcommands, options, parameters, custom renderers, and nested command groups.
|
|
4
|
+
TRIGGER when: code uses wireCLI/pikkuCLICommand, user asks about CLI commands, terminal tools, command-line interface, or adding subcommands.
|
|
5
|
+
DO NOT TRIGGER when: user asks about the pikku CLI tool itself (use pikku-info) or HTTP endpoints (use pikku-http).'
|
|
6
|
+
installGroups: [core]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pikku CLI Wiring
|
|
10
|
+
|
|
11
|
+
## Agent Operating Procedure
|
|
12
|
+
|
|
13
|
+
Use this skill as an execution checklist, not reference material.
|
|
14
|
+
|
|
15
|
+
1. Discover before editing. Prefer OpenCode tools such as `pikku-meta` when available; otherwise run the relevant `pikku meta ... --json` command and inspect only the focused output you need.
|
|
16
|
+
2. Identify the source files that own the behavior. Do not start by reading generated output, `.pikku`, `node_modules`, vendored packages, or broad build artifacts.
|
|
17
|
+
3. Make the smallest source change that satisfies the task. Keep generated files generated, and avoid hand-editing SDKs, schema output, or typegen.
|
|
18
|
+
4. Validate with the narrowest relevant command first, then run `pikku-verify` or `pikku all` when functions, wirings, schemas, or generated clients may have changed.
|
|
19
|
+
5. If validation fails, fix the source cause and rerun validation. Do not paper over generated errors by editing generated files.
|
|
20
|
+
|
|
21
|
+
Wire Pikku functions as CLI commands with parameters, options, subcommands, and custom terminal renderers.
|
|
22
|
+
|
|
23
|
+
## Before You Start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pikku info functions --verbose # See existing functions and their types
|
|
27
|
+
pikku info tags --verbose # Understand project organization
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
See `pikku-concepts` for the core mental model.
|
|
31
|
+
|
|
32
|
+
## API Reference
|
|
33
|
+
|
|
34
|
+
### `wireCLI(config)`
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { wireCLI } from '@pikku/core/cli'
|
|
38
|
+
|
|
39
|
+
wireCLI({
|
|
40
|
+
program: string, // Program name (e.g. 'todos')
|
|
41
|
+
options?: { // Global options
|
|
42
|
+
[key: string]: {
|
|
43
|
+
description: string,
|
|
44
|
+
short?: string, // Single char alias (e.g. 'v')
|
|
45
|
+
default?: any,
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
render?: PikkuCLIRender, // Default renderer for all commands
|
|
49
|
+
commands: {
|
|
50
|
+
[name: string]: PikkuCLICommand | {
|
|
51
|
+
description: string,
|
|
52
|
+
subcommands: { [name: string]: PikkuCLICommand }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
})
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### `pikkuCLICommand(config)`
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { pikkuCLICommand } from '#pikku'
|
|
62
|
+
|
|
63
|
+
pikkuCLICommand({
|
|
64
|
+
parameters?: string, // Positional args (e.g. '<text>', '<username> <email>')
|
|
65
|
+
func: PikkuFunc, // Business logic function
|
|
66
|
+
description?: string,
|
|
67
|
+
render?: PikkuCLIRender, // Custom output renderer
|
|
68
|
+
options?: {
|
|
69
|
+
[key: string]: {
|
|
70
|
+
description: string,
|
|
71
|
+
short?: string,
|
|
72
|
+
default?: any,
|
|
73
|
+
choices?: string[], // Restrict to values
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### `pikkuCLIRender(fn)`
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import { pikkuCLIRender } from '@pikku/core/cli'
|
|
83
|
+
|
|
84
|
+
const renderer = pikkuCLIRender<OutputType>((services, data) => {
|
|
85
|
+
// Format and print output to terminal
|
|
86
|
+
console.log(data)
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Usage Patterns
|
|
91
|
+
|
|
92
|
+
### Basic Commands
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
wireCLI({
|
|
96
|
+
program: 'todos',
|
|
97
|
+
commands: {
|
|
98
|
+
add: pikkuCLICommand({
|
|
99
|
+
parameters: '<text>',
|
|
100
|
+
func: createTodo,
|
|
101
|
+
description: 'Add a new todo',
|
|
102
|
+
render: todoRenderer,
|
|
103
|
+
options: {
|
|
104
|
+
priority: {
|
|
105
|
+
description: 'Set priority',
|
|
106
|
+
short: 'p',
|
|
107
|
+
default: 'normal',
|
|
108
|
+
choices: ['low', 'normal', 'high'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
list: pikkuCLICommand({
|
|
113
|
+
func: listTodos,
|
|
114
|
+
description: 'List all todos',
|
|
115
|
+
render: todosRenderer,
|
|
116
|
+
options: {
|
|
117
|
+
completed: {
|
|
118
|
+
description: 'Show completed only',
|
|
119
|
+
short: 'c',
|
|
120
|
+
default: false,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
}),
|
|
124
|
+
},
|
|
125
|
+
})
|
|
126
|
+
// Usage: todos add "Buy milk" -p high
|
|
127
|
+
// Usage: todos list -c
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Nested Subcommands
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
wireCLI({
|
|
134
|
+
program: 'app',
|
|
135
|
+
options: {
|
|
136
|
+
verbose: { description: 'Verbose output', short: 'v', default: false },
|
|
137
|
+
},
|
|
138
|
+
commands: {
|
|
139
|
+
greet: pikkuCLICommand({
|
|
140
|
+
parameters: '<name>',
|
|
141
|
+
func: greetUser,
|
|
142
|
+
render: greetRenderer,
|
|
143
|
+
}),
|
|
144
|
+
|
|
145
|
+
user: {
|
|
146
|
+
description: 'User management',
|
|
147
|
+
subcommands: {
|
|
148
|
+
create: pikkuCLICommand({
|
|
149
|
+
parameters: '<username> <email>',
|
|
150
|
+
func: createUser,
|
|
151
|
+
render: userRenderer,
|
|
152
|
+
options: {
|
|
153
|
+
admin: { description: 'Admin role', short: 'a', default: false },
|
|
154
|
+
},
|
|
155
|
+
}),
|
|
156
|
+
list: pikkuCLICommand({
|
|
157
|
+
func: listUsers,
|
|
158
|
+
render: usersRenderer,
|
|
159
|
+
options: {
|
|
160
|
+
limit: { description: 'Max results', short: 'l' },
|
|
161
|
+
},
|
|
162
|
+
}),
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
})
|
|
167
|
+
// Usage: app greet Alice
|
|
168
|
+
// Usage: app user create bob bob@example.com -a
|
|
169
|
+
// Usage: app user list -l 10
|
|
170
|
+
// Usage: app -v user list
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Custom Renderers
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
const todoRenderer = pikkuCLIRender<{ todo: Todo }>((_services, { todo }) => {
|
|
177
|
+
console.log(`✓ Created: ${todo.text} (priority: ${todo.priority})`)
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
const todosRenderer = pikkuCLIRender<{ todos: Todo[] }>(
|
|
181
|
+
(_services, { todos }) => {
|
|
182
|
+
todos.forEach((t, i) => {
|
|
183
|
+
const check = t.completed ? '✓' : ' '
|
|
184
|
+
console.log(` ${i + 1}. ${t.text} ${check}`)
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
// Default renderer for program, override per-command
|
|
190
|
+
wireCLI({
|
|
191
|
+
program: 'todos',
|
|
192
|
+
render: jsonRenderer,
|
|
193
|
+
commands: {
|
|
194
|
+
add: pikkuCLICommand({
|
|
195
|
+
func: createTodo,
|
|
196
|
+
render: todoRenderer, // Overrides jsonRenderer
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
})
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Complete Example
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
// functions/admin.functions.ts
|
|
206
|
+
export const createUser = pikkuFunc({
|
|
207
|
+
title: 'Create User',
|
|
208
|
+
func: async ({ db }, { username, email, admin }) => {
|
|
209
|
+
const user = await db.createUser({
|
|
210
|
+
username,
|
|
211
|
+
email,
|
|
212
|
+
role: admin ? 'admin' : 'user',
|
|
213
|
+
})
|
|
214
|
+
return { user }
|
|
215
|
+
},
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
export const listUsers = pikkuSessionlessFunc({
|
|
219
|
+
title: 'List Users',
|
|
220
|
+
func: async ({ db }, { limit }) => {
|
|
221
|
+
return { users: await db.listUsers(limit || 50) }
|
|
222
|
+
},
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
export const deleteUser = pikkuFunc({
|
|
226
|
+
title: 'Delete User',
|
|
227
|
+
func: async ({ db }, { username }) => {
|
|
228
|
+
await db.deleteUser(username)
|
|
229
|
+
return { deleted: username }
|
|
230
|
+
},
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
// wirings/cli.wiring.ts
|
|
234
|
+
const userRenderer = pikkuCLIRender<{ user: User }>((_services, { user }) => {
|
|
235
|
+
console.log(`Created user: ${user.username} (${user.email}) [${user.role}]`)
|
|
236
|
+
})
|
|
237
|
+
|
|
238
|
+
const usersRenderer = pikkuCLIRender<{ users: User[] }>(
|
|
239
|
+
(_services, { users }) => {
|
|
240
|
+
console.log(`Users (${users.length}):`)
|
|
241
|
+
users.forEach((u) =>
|
|
242
|
+
console.log(` ${u.username} <${u.email}> [${u.role}]`)
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
wireCLI({
|
|
248
|
+
program: 'admin',
|
|
249
|
+
commands: {
|
|
250
|
+
user: {
|
|
251
|
+
description: 'User management',
|
|
252
|
+
subcommands: {
|
|
253
|
+
create: pikkuCLICommand({
|
|
254
|
+
parameters: '<username> <email>',
|
|
255
|
+
func: createUser,
|
|
256
|
+
render: userRenderer,
|
|
257
|
+
options: {
|
|
258
|
+
admin: {
|
|
259
|
+
description: 'Create as admin',
|
|
260
|
+
short: 'a',
|
|
261
|
+
default: false,
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
}),
|
|
265
|
+
list: pikkuCLICommand({
|
|
266
|
+
func: listUsers,
|
|
267
|
+
render: usersRenderer,
|
|
268
|
+
options: {
|
|
269
|
+
limit: { description: 'Max results', short: 'l' },
|
|
270
|
+
},
|
|
271
|
+
}),
|
|
272
|
+
delete: pikkuCLICommand({
|
|
273
|
+
parameters: '<username>',
|
|
274
|
+
func: deleteUser,
|
|
275
|
+
description: 'Delete a user',
|
|
276
|
+
}),
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
})
|
|
281
|
+
```
|