@pikku/addon-ollama 0.1.3 → 0.1.5
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/dist/.pikku/addon/agent/index.d.ts +8 -0
- package/dist/.pikku/addon/agent/index.d.ts.map +1 -0
- package/dist/.pikku/addon/agent/index.js +8 -0
- package/dist/.pikku/addon/agent/index.js.map +1 -0
- package/dist/.pikku/addon/agent/index.ts +8 -0
- package/dist/.pikku/addon/agent/pikku-agent-map.gen.d.ts +4 -0
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.d.ts +54 -0
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.d.ts.map +1 -0
- package/dist/.pikku/{agent → addon/agent}/pikku-agent-types.gen.js +5 -3
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.js.map +1 -0
- package/dist/.pikku/{agent → addon/agent}/pikku-agent-types.gen.ts +28 -21
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.d.ts +2 -0
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.js +6 -0
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.js.map +1 -0
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.ts +6 -0
- package/dist/.pikku/addon/agent/pikku-scorer-names.gen.d.ts +8 -0
- package/dist/.pikku/addon/auth/index.d.ts +8 -0
- package/dist/.pikku/addon/auth/index.d.ts.map +1 -0
- package/dist/.pikku/addon/auth/index.js +8 -0
- package/dist/.pikku/addon/auth/index.js.map +1 -0
- package/dist/.pikku/addon/auth/index.ts +8 -0
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.d.ts +119 -0
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.js +93 -0
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.js.map +1 -0
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.ts +156 -0
- package/dist/.pikku/addon/channel/index.d.ts +8 -0
- package/dist/.pikku/addon/channel/index.d.ts.map +1 -0
- package/dist/.pikku/addon/channel/index.js +8 -0
- package/dist/.pikku/addon/channel/index.js.map +1 -0
- package/dist/.pikku/addon/channel/index.ts +8 -0
- package/dist/.pikku/{channel → addon/channel}/pikku-channel-types.gen.d.ts +5 -26
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.d.ts.map +1 -0
- package/dist/.pikku/{channel → addon/channel}/pikku-channel-types.gen.js +2 -19
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.js.map +1 -0
- package/dist/.pikku/{channel → addon/channel}/pikku-channel-types.gen.ts +7 -49
- package/dist/.pikku/addon/error/index.d.ts +8 -0
- package/dist/.pikku/addon/error/index.d.ts.map +1 -0
- package/dist/.pikku/addon/error/index.js +8 -0
- package/dist/.pikku/addon/error/index.js.map +1 -0
- package/dist/.pikku/addon/error/index.ts +8 -0
- package/dist/.pikku/addon/error/pikku-error-types.gen.d.ts +8 -0
- package/dist/.pikku/addon/error/pikku-error-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/error/pikku-error-types.gen.js +8 -0
- package/dist/.pikku/addon/error/pikku-error-types.gen.js.map +1 -0
- package/dist/.pikku/addon/error/pikku-error-types.gen.ts +8 -0
- package/dist/.pikku/addon/function/index.d.ts +8 -0
- package/dist/.pikku/addon/function/index.d.ts.map +1 -0
- package/dist/.pikku/addon/function/index.js +8 -0
- package/dist/.pikku/addon/function/index.js.map +1 -0
- package/dist/.pikku/addon/function/index.ts +8 -0
- package/dist/.pikku/addon/function/pikku-function-types.gen.d.ts +270 -0
- package/dist/.pikku/addon/function/pikku-function-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/function/pikku-function-types.gen.js +117 -0
- package/dist/.pikku/addon/function/pikku-function-types.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon}/function/pikku-function-types.gen.ts +65 -381
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.js +7 -0
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.js.map +1 -0
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.ts +7 -0
- package/dist/.pikku/addon/function/pikku-functions.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/function/pikku-functions.gen.js +14 -0
- package/dist/.pikku/addon/function/pikku-functions.gen.js.map +1 -0
- package/dist/.pikku/addon/function/pikku-functions.gen.ts +14 -0
- package/dist/.pikku/addon/http/index.d.ts +8 -0
- package/dist/.pikku/addon/http/index.d.ts.map +1 -0
- package/dist/.pikku/addon/http/index.js +8 -0
- package/dist/.pikku/addon/http/index.js.map +1 -0
- package/dist/.pikku/addon/http/index.ts +8 -0
- package/dist/.pikku/addon/http/pikku-http-types.gen.d.ts +50 -0
- package/dist/.pikku/addon/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/http/pikku-http-types.gen.js +11 -0
- package/dist/.pikku/addon/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/addon/http/pikku-http-types.gen.ts +62 -0
- package/dist/.pikku/addon/mcp/index.d.ts +8 -0
- package/dist/.pikku/addon/mcp/index.d.ts.map +1 -0
- package/dist/.pikku/addon/mcp/index.js +8 -0
- package/dist/.pikku/addon/mcp/index.js.map +1 -0
- package/dist/.pikku/addon/mcp/index.ts +8 -0
- package/dist/.pikku/{mcp → addon/mcp}/pikku-mcp-types.gen.d.ts +7 -36
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.js +16 -0
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon}/mcp/pikku-mcp-types.gen.ts +6 -50
- package/dist/.pikku/addon/middleware/index.d.ts +8 -0
- package/dist/.pikku/addon/middleware/index.d.ts.map +1 -0
- package/dist/.pikku/addon/middleware/index.js +8 -0
- package/dist/.pikku/addon/middleware/index.js.map +1 -0
- package/dist/.pikku/addon/middleware/index.ts +8 -0
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.d.ts +118 -0
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.js +109 -0
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.js.map +1 -0
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.ts +167 -0
- package/dist/.pikku/{pikku-bootstrap-scenarios.gen.d.ts → addon/pikku-bootstrap-scenarios.gen.d.ts} +1 -1
- package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.d.ts.map +1 -0
- package/dist/.pikku/{pikku-bootstrap-scenarios.gen.js → addon/pikku-bootstrap-scenarios.gen.js} +1 -1
- package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.js.map +1 -0
- package/dist/.pikku/{pikku-bootstrap-scenarios.gen.ts → addon/pikku-bootstrap-scenarios.gen.ts} +1 -1
- package/dist/.pikku/{pikku-bootstrap.gen.d.ts → addon/pikku-bootstrap.gen.d.ts} +3 -2
- package/dist/.pikku/addon/pikku-bootstrap.gen.d.ts.map +1 -0
- package/dist/.pikku/{pikku-bootstrap.gen.js → addon/pikku-bootstrap.gen.js} +3 -2
- package/dist/.pikku/addon/pikku-bootstrap.gen.js.map +1 -0
- package/dist/.pikku/addon/pikku-bootstrap.gen.ts +9 -0
- package/dist/.pikku/addon/pikku-package.gen.js +3 -2
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.ts +4 -2
- package/dist/.pikku/{pikku-services.gen.d.ts → addon/pikku-services.gen.d.ts} +9 -8
- package/dist/.pikku/addon/pikku-services.gen.d.ts.map +1 -0
- package/dist/.pikku/{pikku-services.gen.js → addon/pikku-services.gen.js} +5 -4
- package/dist/.pikku/addon/pikku-services.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon}/pikku-services.gen.ts +9 -8
- package/dist/.pikku/{rpc → addon/rpc}/pikku-rpc-wirings-map.gen.d.ts +6 -11
- package/dist/.pikku/{rpc → addon/rpc}/pikku-rpc-wirings-map.internal.gen.d.ts +6 -11
- package/dist/.pikku/{rpc → addon/rpc}/pikku-rpc-wirings-map.remote.gen.d.ts +6 -11
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
- package/dist/.pikku/{rpc → addon/rpc}/pikku-rpc-wirings-meta.internal.gen.ts +2 -2
- package/dist/.pikku/addon/scenarios/index.d.ts +8 -0
- package/dist/.pikku/addon/scenarios/index.d.ts.map +1 -0
- package/dist/.pikku/addon/scenarios/index.js +8 -0
- package/dist/.pikku/addon/scenarios/index.js.map +1 -0
- package/dist/.pikku/addon/scenarios/index.ts +8 -0
- package/dist/.pikku/{workflow → addon/scenarios}/pikku-personas.gen.d.ts +3 -1
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.d.ts.map +1 -0
- package/dist/.pikku/{workflow → addon/scenarios}/pikku-personas.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.js.map +1 -0
- package/dist/.pikku/{workflow → addon/scenarios}/pikku-personas.gen.ts +4 -6
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-functions-meta.gen.js +2 -2
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions-meta.gen.js.map +1 -0
- package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-functions-meta.gen.ts +3 -3
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.d.ts +5 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.js.map +1 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.ts +4 -0
- package/dist/.pikku/{workflow/pikku-workflow-types.gen.d.ts → addon/scenarios/pikku-scenario-types.gen.d.ts} +79 -107
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.d.ts.map +1 -0
- package/dist/.pikku/{workflow/pikku-workflow-types.gen.js → addon/scenarios/pikku-scenario-types.gen.js} +9 -16
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.js.map +1 -0
- package/dist/.pikku/{workflow/pikku-workflow-types.gen.ts → addon/scenarios/pikku-scenario-types.gen.ts} +119 -210
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-wirings-meta.gen.js +2 -2
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings-meta.gen.js.map +1 -0
- package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-wirings-meta.gen.ts +3 -3
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.d.ts +5 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.js.map +1 -0
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.ts +4 -0
- package/dist/.pikku/addon/scenarios/schemas/register.gen.d.ts +5 -0
- package/dist/.pikku/addon/scenarios/schemas/register.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/scenarios/schemas/register.gen.js +5 -0
- package/dist/.pikku/addon/scenarios/schemas/register.gen.js.map +1 -0
- package/dist/.pikku/addon/scenarios/schemas/register.gen.ts +4 -0
- package/dist/.pikku/addon/schemas/register.gen.d.ts.map +1 -0
- package/dist/.pikku/{schemas → addon/schemas}/register.gen.js +1 -1
- package/dist/.pikku/addon/schemas/register.gen.js.map +1 -0
- package/dist/.pikku/{schemas → addon/schemas}/register.gen.ts +1 -1
- package/dist/.pikku/addon/scopes/index.d.ts +8 -0
- package/dist/.pikku/addon/scopes/index.d.ts.map +1 -0
- package/dist/.pikku/addon/scopes/index.js +8 -0
- package/dist/.pikku/addon/scopes/index.js.map +1 -0
- package/dist/.pikku/addon/scopes/index.ts +8 -0
- package/dist/.pikku/{scopes → addon/scopes}/pikku-personas.gen.d.ts +5 -13
- package/dist/.pikku/addon/scopes/pikku-personas.gen.d.ts.map +1 -0
- package/dist/.pikku/{scopes → addon/scopes}/pikku-personas.gen.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-personas.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon}/scopes/pikku-personas.gen.ts +5 -16
- package/dist/.pikku/{scopes → addon/scopes}/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-roles.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/scopes/pikku-roles.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon}/scopes/pikku-roles.gen.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.d.ts +6 -0
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.d.ts.map +1 -0
- package/dist/.pikku/{scopes → addon/scopes}/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.js.map +1 -0
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.ts +5 -0
- package/dist/.pikku/{scopes → addon/scopes}/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-scopes.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/scopes/pikku-scopes.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon}/scopes/pikku-scopes.gen.ts +1 -1
- package/dist/.pikku/addon/secrets/index.d.ts +9 -0
- package/dist/.pikku/addon/secrets/index.d.ts.map +1 -0
- package/dist/.pikku/addon/secrets/index.js +9 -0
- package/dist/.pikku/addon/secrets/index.js.map +1 -0
- package/dist/.pikku/addon/secrets/index.ts +9 -0
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.d.ts +5 -0
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.js +5 -0
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.js.map +1 -0
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.ts +4 -0
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.d.ts +18 -0
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.js +19 -0
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.js.map +1 -0
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.ts +28 -0
- package/dist/.pikku/{pikku-meta-service.gen.d.ts → addon/services/pikku-meta-service.gen.d.ts} +1 -1
- package/dist/.pikku/addon/services/pikku-meta-service.gen.d.ts.map +1 -0
- package/dist/.pikku/{pikku-meta-service.gen.js → addon/services/pikku-meta-service.gen.js} +2 -2
- package/dist/.pikku/addon/services/pikku-meta-service.gen.js.map +1 -0
- package/{.pikku → dist/.pikku/addon/services}/pikku-meta-service.gen.ts +2 -2
- package/dist/.pikku/addon/setup/index.d.ts +9 -0
- package/dist/.pikku/addon/setup/index.d.ts.map +1 -0
- package/dist/.pikku/addon/setup/index.js +9 -0
- package/dist/.pikku/addon/setup/index.js.map +1 -0
- package/dist/.pikku/addon/setup/index.ts +9 -0
- package/dist/.pikku/addon/{pikku-addon-types.gen.d.ts → setup/pikku-addon-setup-types.gen.d.ts} +7 -6
- package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/{pikku-addon-types.gen.js → setup/pikku-addon-setup-types.gen.js} +3 -3
- package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.js.map +1 -0
- package/{.pikku/addon/pikku-addon-types.gen.ts → dist/.pikku/addon/setup/pikku-addon-setup-types.gen.ts} +6 -5
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.d.ts +67 -0
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.js +88 -0
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.js.map +1 -0
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.ts +105 -0
- package/dist/.pikku/addon/surface-usage.gen.json +1705 -0
- package/dist/.pikku/addon/trigger/index.d.ts +8 -0
- package/dist/.pikku/addon/trigger/index.d.ts.map +1 -0
- package/dist/.pikku/addon/trigger/index.js +8 -0
- package/dist/.pikku/addon/trigger/index.js.map +1 -0
- package/dist/.pikku/addon/trigger/index.ts +8 -0
- package/dist/.pikku/{trigger → addon/trigger}/pikku-trigger-types.gen.d.ts +6 -37
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.js +13 -0
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.js.map +1 -0
- package/dist/.pikku/{trigger → addon/trigger}/pikku-trigger-types.gen.ts +9 -45
- package/dist/.pikku/addon/variables/index.d.ts +9 -0
- package/dist/.pikku/addon/variables/index.d.ts.map +1 -0
- package/dist/.pikku/addon/variables/index.js +9 -0
- package/dist/.pikku/addon/variables/index.js.map +1 -0
- package/dist/.pikku/addon/variables/index.ts +9 -0
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.d.ts +5 -0
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.js +5 -0
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.js.map +1 -0
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.ts +4 -0
- package/dist/.pikku/addon/variables/pikku-variables.gen.d.ts +22 -0
- package/dist/.pikku/addon/variables/pikku-variables.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/variables/pikku-variables.gen.js +21 -0
- package/dist/.pikku/addon/variables/pikku-variables.gen.js.map +1 -0
- package/dist/.pikku/addon/variables/pikku-variables.gen.ts +32 -0
- package/dist/.pikku/addon/workflow/index.d.ts +8 -0
- package/dist/.pikku/addon/workflow/index.d.ts.map +1 -0
- package/dist/.pikku/addon/workflow/index.js +8 -0
- package/dist/.pikku/addon/workflow/index.js.map +1 -0
- package/dist/.pikku/addon/workflow/index.ts +8 -0
- package/dist/.pikku/{workflow → addon/workflow}/pikku-scenario-step-map.gen.d.ts +2 -2
- package/{.pikku → dist/.pikku/addon}/workflow/pikku-workflow-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.d.ts +106 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.js +16 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.js.map +1 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.ts +200 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.js +7 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.d.ts +5 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.js +5 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.js.map +1 -0
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.ts +3 -0
- package/dist/src/functions/embeddings/embed-many.function.d.ts +4 -4
- package/dist/src/functions/embeddings/embed-many.function.d.ts.map +1 -1
- package/dist/src/functions/embeddings/embed-many.function.js +1 -1
- package/dist/src/functions/embeddings/embed-many.function.js.map +1 -1
- package/dist/src/functions/embeddings/embed.function.d.ts +4 -4
- package/dist/src/functions/embeddings/embed.function.d.ts.map +1 -1
- package/dist/src/functions/embeddings/embed.function.js +1 -1
- package/dist/src/functions/embeddings/embed.function.js.map +1 -1
- package/dist/src/functions/text/generate-object.function.d.ts +4 -4
- package/dist/src/functions/text/generate-object.function.d.ts.map +1 -1
- package/dist/src/functions/text/generate-object.function.js +1 -1
- package/dist/src/functions/text/generate-object.function.js.map +1 -1
- package/dist/src/functions/text/generate.function.d.ts +4 -4
- package/dist/src/functions/text/generate.function.d.ts.map +1 -1
- package/dist/src/functions/text/generate.function.js +1 -1
- package/dist/src/functions/text/generate.function.js.map +1 -1
- package/dist/src/services.d.ts +1 -1
- package/dist/src/services.d.ts.map +1 -1
- package/dist/src/services.js +1 -1
- package/dist/src/services.js.map +1 -1
- package/dist/types/application-types.d.ts +12 -0
- package/package.json +8 -8
- package/.pikku/addon/pikku-package.gen.ts +0 -11
- package/.pikku/agent/pikku-agent-map.gen.d.ts +0 -4
- package/.pikku/agent/pikku-agent-types.gen.ts +0 -84
- package/.pikku/channel/pikku-channel-types.gen.ts +0 -177
- package/.pikku/console/pikku-node-types.gen.ts +0 -8
- package/.pikku/function/pikku-functions-meta.gen.ts +0 -7
- package/.pikku/function/pikku-functions.gen.ts +0 -14
- package/.pikku/http/pikku-http-types.gen.ts +0 -119
- package/.pikku/pikku-bootstrap-scenarios.gen.ts +0 -9
- package/.pikku/pikku-bootstrap.gen.ts +0 -8
- package/.pikku/pikku-types.gen.ts +0 -24
- package/.pikku/queue/pikku-queue-types.gen.ts +0 -27
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +0 -207
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +0 -211
- package/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +0 -207
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -6
- package/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +0 -12
- package/.pikku/scenarios/pikku-scenario-functions.gen.ts +0 -4
- package/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +0 -15
- package/.pikku/scenarios/pikku-scenario-wirings.gen.ts +0 -4
- package/.pikku/scenarios/schemas/register.gen.ts +0 -4
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
- package/.pikku/schemas/register.gen.ts +0 -39
- package/.pikku/scopes/pikku-scope-types.gen.ts +0 -7
- package/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
- package/.pikku/secrets/pikku-secrets.gen.ts +0 -34
- package/.pikku/trigger/pikku-trigger-types.gen.ts +0 -160
- package/.pikku/variables/pikku-variable-types.gen.ts +0 -5
- package/.pikku/variables/pikku-variables.gen.ts +0 -36
- package/.pikku/workflow/pikku-personas.gen.ts +0 -38
- package/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +0 -18
- package/.pikku/workflow/pikku-workflow-types.gen.ts +0 -591
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +0 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +0 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +0 -105
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +0 -4
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +0 -49
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.js.map +0 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +0 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js.map +0 -1
- package/dist/.pikku/console/pikku-addon-meta.gen.json +0 -61
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +0 -7
- package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +0 -1
- package/dist/.pikku/console/pikku-node-types.gen.js +0 -2
- package/dist/.pikku/console/pikku-node-types.gen.js.map +0 -1
- package/dist/.pikku/console/pikku-node-types.gen.ts +0 -8
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +0 -506
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +0 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +0 -351
- package/dist/.pikku/function/pikku-function-types.gen.js.map +0 -1
- package/dist/.pikku/function/pikku-function-types.gen.ts +0 -797
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -126
- package/dist/.pikku/function/pikku-functions-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +0 -7
- package/dist/.pikku/function/pikku-functions-meta.gen.js.map +0 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +0 -102
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +0 -7
- package/dist/.pikku/function/pikku-functions.gen.d.ts.map +0 -1
- package/dist/.pikku/function/pikku-functions.gen.js +0 -14
- package/dist/.pikku/function/pikku-functions.gen.js.map +0 -1
- package/dist/.pikku/function/pikku-functions.gen.ts +0 -14
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +0 -98
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +0 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +0 -50
- package/dist/.pikku/http/pikku-http-types.gen.js.map +0 -1
- package/dist/.pikku/http/pikku-http-types.gen.ts +0 -119
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +0 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +0 -38
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +0 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +0 -183
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts.map +0 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js.map +0 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +0 -1
- package/dist/.pikku/pikku-bootstrap.gen.js.map +0 -1
- package/dist/.pikku/pikku-bootstrap.gen.ts +0 -8
- package/dist/.pikku/pikku-meta-service.gen.d.ts.map +0 -1
- package/dist/.pikku/pikku-meta-service.gen.js.map +0 -1
- package/dist/.pikku/pikku-meta-service.gen.ts +0 -10
- package/dist/.pikku/pikku-services.gen.d.ts.map +0 -1
- package/dist/.pikku/pikku-services.gen.js.map +0 -1
- package/dist/.pikku/pikku-services.gen.ts +0 -50
- package/dist/.pikku/pikku-types.gen.d.ts +0 -13
- package/dist/.pikku/pikku-types.gen.d.ts.map +0 -1
- package/dist/.pikku/pikku-types.gen.js +0 -19
- package/dist/.pikku/pikku-types.gen.js.map +0 -1
- package/dist/.pikku/pikku-types.gen.ts +0 -24
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +0 -24
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +0 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +0 -17
- package/dist/.pikku/queue/pikku-queue-types.gen.js.map +0 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.ts +0 -27
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +0 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +0 -7
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +0 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +0 -6
- package/dist/.pikku/scenarios/features.gen.json +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +0 -5
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.ts +0 -4
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +0 -5
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js.map +0 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.ts +0 -4
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +0 -5
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts.map +0 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +0 -5
- package/dist/.pikku/scenarios/schemas/register.gen.js.map +0 -1
- package/dist/.pikku/scenarios/schemas/register.gen.ts +0 -4
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +0 -22
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +0 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +0 -17
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +0 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
- package/dist/.pikku/schemas/register.gen.d.ts.map +0 -1
- package/dist/.pikku/schemas/register.gen.js.map +0 -1
- package/dist/.pikku/schemas/schemas/OllamaEmbedInput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaEmbedManyInput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaEmbedManyOutput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaEmbedOutput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaGenerateObjectInput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaGenerateObjectOutput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaGenerateTextInput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/OllamaGenerateTextOutput.schema.json +0 -1
- package/dist/.pikku/schemas/schemas/VariableSchema_ollama_base_url.schema.json +0 -1
- package/dist/.pikku/scopes/pikku-personas-meta.gen.json +0 -1
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts.map +0 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js.map +0 -1
- package/dist/.pikku/scopes/pikku-personas.gen.ts +0 -52
- package/dist/.pikku/scopes/pikku-roles-meta.gen.json +0 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts.map +0 -1
- package/dist/.pikku/scopes/pikku-roles.gen.js.map +0 -1
- package/dist/.pikku/scopes/pikku-roles.gen.ts +0 -41
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +0 -8
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts.map +0 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js.map +0 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.ts +0 -7
- package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +0 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts.map +0 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.js.map +0 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.ts +0 -58
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +0 -6
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +0 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +0 -5
- package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +0 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
- package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +0 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +0 -22
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +0 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +0 -21
- package/dist/.pikku/secrets/pikku-secrets.gen.js.map +0 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +0 -34
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts.map +0 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +0 -34
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js.map +0 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +0 -6
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +0 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +0 -5
- package/dist/.pikku/variables/pikku-variable-types.gen.js.map +0 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.ts +0 -5
- package/dist/.pikku/variables/pikku-variables-meta.gen.json +0 -10
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +0 -25
- package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +0 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +0 -23
- package/dist/.pikku/variables/pikku-variables.gen.js.map +0 -1
- package/dist/.pikku/variables/pikku-variables.gen.ts +0 -36
- package/dist/.pikku/workflow/personas.gen.json +0 -1
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts.map +0 -1
- package/dist/.pikku/workflow/pikku-personas.gen.js.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +0 -38
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +0 -7
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +0 -5
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +0 -5
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js.map +0 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
- /package/{.pikku → dist/.pikku/addon}/console/pikku-addon-meta.gen.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/function/pikku-functions-meta-verbose.gen.json +0 -0
- /package/dist/.pikku/{function → addon/function}/pikku-functions-meta.gen.d.ts +0 -0
- /package/{.pikku → dist/.pikku/addon}/function/pikku-functions-meta.gen.json +0 -0
- /package/dist/.pikku/{function → addon/function}/pikku-functions.gen.d.ts +0 -0
- /package/dist/.pikku/{rpc → addon/rpc}/pikku-rpc-wirings-meta.internal.gen.d.ts +0 -0
- /package/{.pikku → dist/.pikku/addon}/rpc/pikku-rpc-wirings-meta.internal.gen.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/scenarios/features.gen.json +0 -0
- /package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-functions-meta.gen.d.ts +0 -0
- /package/{.pikku → dist/.pikku/addon}/scenarios/pikku-scenario-functions-meta.gen.json +0 -0
- /package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-functions.gen.js +0 -0
- /package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-wirings-meta.gen.d.ts +0 -0
- /package/dist/.pikku/{scenarios → addon/scenarios}/pikku-scenario-wirings.gen.js +0 -0
- /package/dist/.pikku/{schemas → addon/schemas}/register.gen.d.ts +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaEmbedInput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaEmbedManyInput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaEmbedManyOutput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaEmbedOutput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaGenerateObjectInput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaGenerateObjectOutput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaGenerateTextInput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/OllamaGenerateTextOutput.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/schemas/schemas/VariableSchema_ollama_base_url.schema.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/scopes/pikku-personas-meta.gen.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/scopes/pikku-roles-meta.gen.json +0 -0
- /package/dist/.pikku/{scopes → addon/scopes}/pikku-roles.gen.js +0 -0
- /package/{.pikku → dist/.pikku/addon}/scopes/pikku-scopes-meta.gen.json +0 -0
- /package/dist/.pikku/{scopes → addon/scopes}/pikku-scopes.gen.js +0 -0
- /package/{.pikku → dist/.pikku/addon}/secrets/pikku-secrets-meta.gen.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/variables/pikku-variables-meta.gen.json +0 -0
- /package/{.pikku → dist/.pikku/addon}/workflow/personas.gen.json +0 -0
- /package/dist/.pikku/{workflow → addon/workflow}/pikku-workflow-wirings-meta.gen.d.ts +0 -0
|
@@ -1,591 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
-
*/
|
|
4
|
-
import { WorkflowCancelledException } from '@pikku/core/workflow'
|
|
5
|
-
import { template } from '@pikku/core/workflow'
|
|
6
|
-
import {
|
|
7
|
-
pikkuWorkflowGraph as corePikkuWorkflowGraph,
|
|
8
|
-
type PikkuWorkflowGraphConfig,
|
|
9
|
-
type PikkuWorkflowGraphResult,
|
|
10
|
-
} from '@pikku/core/workflow'
|
|
11
|
-
import type { PikkuWorkflowWire, PikkuScenarioWire, WorkflowStepOptions, ScenarioStepOptions } from '@pikku/core/workflow'
|
|
12
|
-
|
|
13
|
-
export { WorkflowCancelledException }
|
|
14
|
-
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
|
|
15
|
-
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js'
|
|
16
|
-
import type { FlattenedWorkflowMap } from './pikku-workflow-map.gen.d.js'
|
|
17
|
-
import type { AgentMap as FlattenedAgentMap } from '../agent/pikku-agent-map.gen.d.js'
|
|
18
|
-
import type { FlattenedScenarioStepMap } from './pikku-scenario-step-map.gen.d.js'
|
|
19
|
-
import type { TypedPersonas } from './pikku-personas.gen.js'
|
|
20
|
-
|
|
21
|
-
export type { TypedPersonas }
|
|
22
|
-
|
|
23
|
-
export { template }
|
|
24
|
-
|
|
25
|
-
export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
26
|
-
do<K extends keyof FlattenedRPCMap>(
|
|
27
|
-
stepName: string,
|
|
28
|
-
rpcName: K,
|
|
29
|
-
data: FlattenedRPCMap[K]['input'],
|
|
30
|
-
options?: WorkflowStepOptions
|
|
31
|
-
): Promise<FlattenedRPCMap[K]['output']>
|
|
32
|
-
|
|
33
|
-
do<K extends keyof FlattenedWorkflowMap>(
|
|
34
|
-
stepName: string,
|
|
35
|
-
workflowName: K,
|
|
36
|
-
data: FlattenedWorkflowMap[K]['input'],
|
|
37
|
-
options?: WorkflowStepOptions
|
|
38
|
-
): Promise<FlattenedWorkflowMap[K]['output']>
|
|
39
|
-
|
|
40
|
-
do<T>(
|
|
41
|
-
stepName: string,
|
|
42
|
-
fn: () => T | Promise<T>,
|
|
43
|
-
options?: WorkflowStepOptions
|
|
44
|
-
): Promise<T>
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The typed half of a scenario wire: `step` and its `given`/`when`/`then`
|
|
49
|
-
* sugar, narrowed to the names declared by `pikkuScenarioStep` in this project.
|
|
50
|
-
* The phase only changes the prose the reporter renders.
|
|
51
|
-
*/
|
|
52
|
-
export interface TypedScenarioSteps {
|
|
53
|
-
step<K extends keyof FlattenedScenarioStepMap>(
|
|
54
|
-
stepName: string,
|
|
55
|
-
stepFunc: K,
|
|
56
|
-
data?: FlattenedScenarioStepMap[K]['input'],
|
|
57
|
-
options?: ScenarioStepOptions
|
|
58
|
-
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
59
|
-
|
|
60
|
-
given<K extends keyof FlattenedScenarioStepMap>(
|
|
61
|
-
stepName: string,
|
|
62
|
-
stepFunc: K,
|
|
63
|
-
data?: FlattenedScenarioStepMap[K]['input'],
|
|
64
|
-
options?: ScenarioStepOptions
|
|
65
|
-
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
66
|
-
|
|
67
|
-
when<K extends keyof FlattenedScenarioStepMap>(
|
|
68
|
-
stepName: string,
|
|
69
|
-
stepFunc: K,
|
|
70
|
-
data?: FlattenedScenarioStepMap[K]['input'],
|
|
71
|
-
options?: ScenarioStepOptions
|
|
72
|
-
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
73
|
-
|
|
74
|
-
then<K extends keyof FlattenedScenarioStepMap>(
|
|
75
|
-
stepName: string,
|
|
76
|
-
stepFunc: K,
|
|
77
|
-
data?: FlattenedScenarioStepMap[K]['input'],
|
|
78
|
-
options?: ScenarioStepOptions
|
|
79
|
-
): Promise<FlattenedScenarioStepMap[K]['output']>
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export type TypedScenario = TypedWorkflow &
|
|
83
|
-
Omit<PikkuScenarioWire, keyof PikkuWorkflowWire | keyof TypedScenarioSteps> &
|
|
84
|
-
TypedScenarioSteps
|
|
85
|
-
|
|
86
|
-
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
|
87
|
-
import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js'
|
|
88
|
-
import type { ScopeId } from '../scopes/pikku-scopes.gen.js'
|
|
89
|
-
import { PikkuError } from '@pikku/core/errors'
|
|
90
|
-
import type { CorePermissionGroup } from '@pikku/core'
|
|
91
|
-
|
|
92
|
-
export type PikkuFunctionWorkflow<
|
|
93
|
-
In = unknown,
|
|
94
|
-
Out = never
|
|
95
|
-
> = PikkuFunctionSessionless<In, Out, 'workflow'>
|
|
96
|
-
|
|
97
|
-
export type PikkuFunctionScenario<
|
|
98
|
-
In = unknown,
|
|
99
|
-
Out = never
|
|
100
|
-
> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors'>
|
|
101
|
-
|
|
102
|
-
export type PikkuWorkflowConfigWithSchema<
|
|
103
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
104
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
105
|
-
> = {
|
|
106
|
-
title?: string
|
|
107
|
-
description?: string
|
|
108
|
-
tags?: string[]
|
|
109
|
-
expose?: boolean
|
|
110
|
-
internal?: boolean
|
|
111
|
-
override?: string
|
|
112
|
-
version?: number
|
|
113
|
-
remote?: boolean
|
|
114
|
-
mcp?: boolean
|
|
115
|
-
readonly?: boolean
|
|
116
|
-
approvalRequired?: boolean
|
|
117
|
-
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never
|
|
118
|
-
func: PikkuFunctionWorkflow<
|
|
119
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
120
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
121
|
-
>
|
|
122
|
-
auth?: boolean
|
|
123
|
-
/**
|
|
124
|
-
* Scopes the session must hold to run this workflow. All of them are required
|
|
125
|
-
* (AND), and they are checked before `permissions`.
|
|
126
|
-
*/
|
|
127
|
-
scopes?: ScopeId[]
|
|
128
|
-
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
|
|
129
|
-
middleware?: PikkuMiddleware[]
|
|
130
|
-
input?: InputSchema
|
|
131
|
-
output?: OutputSchema
|
|
132
|
-
node?: NodeConfig
|
|
133
|
-
errors?: Array<typeof PikkuError>
|
|
134
|
-
inline?: boolean
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export function pikkuWorkflowFunc<
|
|
138
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
139
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
140
|
-
>(
|
|
141
|
-
config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>
|
|
142
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
143
|
-
export function pikkuWorkflowFunc<In, Out = unknown>(
|
|
144
|
-
func:
|
|
145
|
-
| PikkuFunctionWorkflow<In, Out>
|
|
146
|
-
| PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>
|
|
147
|
-
): PikkuFunctionConfig<In, Out, 'workflow'>
|
|
148
|
-
export function pikkuWorkflowFunc(func: any) {
|
|
149
|
-
return typeof func === 'function' ? { func } : func
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export function pikkuWorkflowComplexFunc<
|
|
153
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
154
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
155
|
-
>(
|
|
156
|
-
config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>
|
|
157
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
158
|
-
export function pikkuWorkflowComplexFunc<In, Out = unknown>(
|
|
159
|
-
func:
|
|
160
|
-
| PikkuFunctionWorkflow<In, Out>
|
|
161
|
-
| PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>
|
|
162
|
-
): PikkuFunctionConfig<In, Out, 'workflow'>
|
|
163
|
-
export function pikkuWorkflowComplexFunc(func: any) {
|
|
164
|
-
return typeof func === 'function' ? { func } : func
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export type PikkuScenarioConfigWithSchema<
|
|
168
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
169
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
170
|
-
> = Omit<PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>, 'func' | 'auth' | 'scopes' | 'permissions'> & {
|
|
171
|
-
func: PikkuFunctionScenario<
|
|
172
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
173
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
174
|
-
>
|
|
175
|
-
/**
|
|
176
|
-
* Runs before the scenario body. Same signature as `func`, but its return
|
|
177
|
-
* value is discarded — a hook is setup, not a step, so it is never recorded
|
|
178
|
-
* on the ladder. Throwing skips the body and fails the run; `after` still
|
|
179
|
-
* runs.
|
|
180
|
-
*/
|
|
181
|
-
before?: PikkuScenarioHook<InputSchema>
|
|
182
|
-
/**
|
|
183
|
-
* Always runs after the scenario body, in a `finally`, whether it passed or
|
|
184
|
-
* failed. Throwing fails a run that would otherwise have passed; on an
|
|
185
|
-
* already-failed run it attaches as the `cause` and never replaces the
|
|
186
|
-
* original error.
|
|
187
|
-
*/
|
|
188
|
-
after?: PikkuScenarioHook<InputSchema>
|
|
189
|
-
/**
|
|
190
|
-
* Why this scenario is held out of a default run, stated where the scenario
|
|
191
|
-
* is. The scenario still appears in the plan and is reported as skipped
|
|
192
|
-
* rather than quietly omitted; naming it directly with `--flows` runs it
|
|
193
|
-
* anyway.
|
|
194
|
-
*/
|
|
195
|
-
skip?: string
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* A scenario lifecycle hook: the scenario's own `(services, data, wire)`
|
|
200
|
-
* signature with its result discarded.
|
|
201
|
-
*/
|
|
202
|
-
export type PikkuScenarioHook<
|
|
203
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined
|
|
204
|
-
> = PikkuFunctionScenario<
|
|
205
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
206
|
-
void
|
|
207
|
-
>
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Declares a scenario hook. Returns the function verbatim — a hook is never
|
|
211
|
-
* registered, so this exists purely to give an inline hook a call site to be
|
|
212
|
-
* contextually typed from, the way every other pikku primitive is.
|
|
213
|
-
*/
|
|
214
|
-
export function pikkuScenarioHook<In = unknown>(
|
|
215
|
-
hook: PikkuFunctionScenario<In, void>
|
|
216
|
-
): PikkuFunctionScenario<In, void> {
|
|
217
|
-
return hook
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* A scenario: a complex workflow that drives the app the way users do.
|
|
222
|
-
* Steps run as actors over the REAL transport — `scenario.do(step, rpc,
|
|
223
|
-
* data, { actor: actors.yasser })` — so flows double as e2e tests and
|
|
224
|
-
* staged/production health checks (no state reset; scope what you create).
|
|
225
|
-
*/
|
|
226
|
-
export function pikkuScenario<
|
|
227
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
228
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
229
|
-
>(
|
|
230
|
-
config: PikkuScenarioConfigWithSchema<InputSchema, OutputSchema>
|
|
231
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenario' | 'actors', PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
232
|
-
export function pikkuScenario<In, Out = unknown>(
|
|
233
|
-
func:
|
|
234
|
-
| PikkuFunctionScenario<In, Out>
|
|
235
|
-
| PikkuFunctionConfig<In, Out, 'scenario' | 'actors', PikkuFunctionScenario<In, Out>>
|
|
236
|
-
): PikkuFunctionConfig<In, Out, 'scenario' | 'actors'>
|
|
237
|
-
export function pikkuScenario(func: any) {
|
|
238
|
-
return typeof func === 'function' ? { func } : func
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* A scenario as a feature references it. Any `pikkuScenario` export is
|
|
243
|
-
* assignable; `In` is recovered from it so the paired form's `data` is
|
|
244
|
-
* checked against that scenario's own input.
|
|
245
|
-
*/
|
|
246
|
-
export type PikkuScenarioRef<In = any, Out = any> = PikkuFunctionConfig<
|
|
247
|
-
In,
|
|
248
|
-
Out,
|
|
249
|
-
'scenario' | 'actors',
|
|
250
|
-
PikkuFunctionScenario<In, Out>,
|
|
251
|
-
any,
|
|
252
|
-
any
|
|
253
|
-
>
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* One entry in a feature's `scenarios` list, validated against itself: a bare
|
|
257
|
-
* scenario, or a scenario paired with the input to run it with. The paired form
|
|
258
|
-
* is gherkin's `Examples:` written as an ordinary loop.
|
|
259
|
-
*/
|
|
260
|
-
export type PikkuFeatureEntry<Entry> = Entry extends {
|
|
261
|
-
scenario: PikkuScenarioRef<infer In>
|
|
262
|
-
}
|
|
263
|
-
? { scenario: PikkuScenarioRef<In>; data: In }
|
|
264
|
-
: Entry extends PikkuScenarioRef
|
|
265
|
-
? Entry
|
|
266
|
-
: never
|
|
267
|
-
|
|
268
|
-
export type PikkuFeatureConfig<Scenarios extends readonly unknown[]> = {
|
|
269
|
-
/** Human-readable name. The export identifier is the id. */
|
|
270
|
-
name: string
|
|
271
|
-
description?: string
|
|
272
|
-
tags?: string[]
|
|
273
|
-
scenarios: { [K in keyof Scenarios]: PikkuFeatureEntry<Scenarios[K]> }
|
|
274
|
-
/**
|
|
275
|
-
* Runs ONCE before the whole group — not before each scenario. Per-scenario
|
|
276
|
-
* setup is the scenario's own `before`; gherkin's `Background:` is
|
|
277
|
-
* deliberately not expressible here.
|
|
278
|
-
*/
|
|
279
|
-
before?: PikkuScenarioHook
|
|
280
|
-
after?: PikkuScenarioHook
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* A feature: an ordered group of scenarios, mirroring gherkin's Feature ↔
|
|
285
|
-
* Scenario structure. Scenarios are referenced by imported identifier, so a
|
|
286
|
-
* renamed or deleted scenario is a compile error rather than a silent skip.
|
|
287
|
-
*
|
|
288
|
-
* A scenario does not have to belong to a feature — a void-input scenario
|
|
289
|
-
* still runs standalone.
|
|
290
|
-
*
|
|
291
|
-
* ```ts
|
|
292
|
-
* export const credentialFeature = pikkuFeature({
|
|
293
|
-
* name: 'Credential API',
|
|
294
|
-
* tags: ['credential'],
|
|
295
|
-
* before: startsMockOAuthServer,
|
|
296
|
-
* after: stopsMockOAuthServer,
|
|
297
|
-
* scenarios: [
|
|
298
|
-
* credentialLazyLoadScenario,
|
|
299
|
-
* ...['stripe', 'google'].map((name) => ({
|
|
300
|
-
* scenario: credentialRoundTripScenario,
|
|
301
|
-
* data: { name },
|
|
302
|
-
* })),
|
|
303
|
-
* ],
|
|
304
|
-
* })
|
|
305
|
-
* ```
|
|
306
|
-
*/
|
|
307
|
-
export function pikkuFeature<const Scenarios extends readonly unknown[]>(
|
|
308
|
-
config: PikkuFeatureConfig<Scenarios>
|
|
309
|
-
): PikkuFeatureConfig<Scenarios> {
|
|
310
|
-
return config
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* One surface's implementation of a step.
|
|
315
|
-
*
|
|
316
|
-
* Each binding is typed independently, so a browser binding gets a non-optional
|
|
317
|
-
* `wire.browser` and a cli binding a non-optional `wire.cli` without either
|
|
318
|
-
* leaking into the other.
|
|
319
|
-
*/
|
|
320
|
-
export type PikkuFunctionScenarioStep<
|
|
321
|
-
In = unknown,
|
|
322
|
-
Out = never,
|
|
323
|
-
Surface extends 'browser' | 'cli' | 'default' = 'default'
|
|
324
|
-
> = PikkuFunctionSessionless<
|
|
325
|
-
In,
|
|
326
|
-
Out,
|
|
327
|
-
Surface extends 'default' ? 'scenarioStep' : 'scenarioStep' | Surface
|
|
328
|
-
>
|
|
329
|
-
|
|
330
|
-
export type PikkuScenarioStepConfigWithSchema<
|
|
331
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
332
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
333
|
-
> = {
|
|
334
|
-
/** Registered name — this is the string `scenario.step()` references. */
|
|
335
|
-
name: string
|
|
336
|
-
/**
|
|
337
|
-
* What this step does, for the console and for whoever reads the source. It
|
|
338
|
-
* is also the fallback prose when no `template` is declared, in which case a
|
|
339
|
-
* reporter renders "Given the shopper buys an apple". Defaults to the call
|
|
340
|
-
* site's step name.
|
|
341
|
-
*/
|
|
342
|
-
description?: string
|
|
343
|
-
/**
|
|
344
|
-
* The prose a reporter renders for this step, with `{placeholders}` filled
|
|
345
|
-
* from the input the step was called with — `'sees {packageName}'` reports as
|
|
346
|
-
* "Then the admin sees @pikku/addon-todos". Every input field should appear,
|
|
347
|
-
* so the report names the values under test rather than repeating one
|
|
348
|
-
* sentence per call site.
|
|
349
|
-
*/
|
|
350
|
-
template?: string
|
|
351
|
-
title?: string
|
|
352
|
-
tags?: string[]
|
|
353
|
-
input?: InputSchema
|
|
354
|
-
output?: OutputSchema
|
|
355
|
-
errors?: Array<typeof PikkuError>
|
|
356
|
-
/**
|
|
357
|
-
* Drive this step through a real browser, as a human would. The runner
|
|
358
|
-
* provisions a window for the step's actor first — which makes an actor
|
|
359
|
-
* mandatory — and `wire.browser` is non-optional inside it.
|
|
360
|
-
*
|
|
361
|
-
* Compose shared utilities here rather than writing raw clicks: the step says
|
|
362
|
-
* what the actor is doing, the utilities say how.
|
|
363
|
-
*/
|
|
364
|
-
browser?: PikkuFunctionScenarioStep<
|
|
365
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
366
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
367
|
-
'browser'
|
|
368
|
-
>
|
|
369
|
-
/** Drive this step remotely, over the websocket. */
|
|
370
|
-
cli?: PikkuFunctionScenarioStep<
|
|
371
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
372
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
373
|
-
'cli'
|
|
374
|
-
>
|
|
375
|
-
/**
|
|
376
|
-
* The server-side path — the fast suite, and the floor every other surface
|
|
377
|
-
* falls back to.
|
|
378
|
-
*
|
|
379
|
-
* On a `then`, this is not an alternative to the other bindings but a second
|
|
380
|
-
* **witness**: the run executes every binding it has and fails if they
|
|
381
|
-
* disagree, because "the row says paid" and "the page says paid" are different
|
|
382
|
-
* claims and the gap between them is the bug nobody catches.
|
|
383
|
-
*/
|
|
384
|
-
default?: PikkuFunctionScenarioStep<
|
|
385
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
386
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
387
|
-
'default'
|
|
388
|
-
>
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
export type PikkuScenarioStepConfig<In, Out> =
|
|
392
|
-
Omit<PikkuScenarioStepConfigWithSchema<undefined, undefined>, 'browser' | 'cli' | 'default' | 'input' | 'output'> & {
|
|
393
|
-
browser?: PikkuFunctionScenarioStep<In, Out, 'browser'>
|
|
394
|
-
cli?: PikkuFunctionScenarioStep<In, Out, 'cli'>
|
|
395
|
-
default?: PikkuFunctionScenarioStep<In, Out, 'default'>
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* A named, reusable scenario step, declaring one implementation per surface an
|
|
400
|
-
* actor can drive it through.
|
|
401
|
-
*
|
|
402
|
-
* The step's identity is what the actor is trying to do; which surface carries
|
|
403
|
-
* it out is a binding. That is what lets one ladder run through a real browser,
|
|
404
|
-
* over the websocket, or entirely server-side — and what makes "how much of this
|
|
405
|
-
* flow can a human actually reach" a number rather than a guess.
|
|
406
|
-
*
|
|
407
|
-
* Steps are deliberately NOT registered as RPCs: a browser-driving step must
|
|
408
|
-
* never be network-callable.
|
|
409
|
-
*/
|
|
410
|
-
export function pikkuScenarioStep<
|
|
411
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
412
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
413
|
-
>(
|
|
414
|
-
config: PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>
|
|
415
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep' | 'browser' | 'cli', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser' | 'cli' | 'default'>, InputSchema, OutputSchema>
|
|
416
|
-
export function pikkuScenarioStep<In, Out = unknown>(
|
|
417
|
-
config: PikkuScenarioStepConfig<In, Out>
|
|
418
|
-
): PikkuFunctionConfig<In, Out, 'scenarioStep' | 'browser' | 'cli'>
|
|
419
|
-
export function pikkuScenarioStep(config: any) {
|
|
420
|
-
const surfaces = (['browser', 'cli', 'default'] as const).filter(
|
|
421
|
-
(surface) => typeof config[surface] === 'function'
|
|
422
|
-
)
|
|
423
|
-
if (surfaces.length === 0) {
|
|
424
|
-
throw new Error(
|
|
425
|
-
`[scenario] step '${config.name}' declares no surface bindings. Add at least a \`default\` (server-side) implementation.`
|
|
426
|
-
)
|
|
427
|
-
}
|
|
428
|
-
return {
|
|
429
|
-
...config,
|
|
430
|
-
surfaces,
|
|
431
|
-
// The runner sets the surface on the wire and calls this once per binding it
|
|
432
|
-
// resolved — every witness of a `then`, exactly one for an action step.
|
|
433
|
-
func: (services: any, data: any, wire: any) => {
|
|
434
|
-
const surface = wire?.scenarioStep?.surface ?? 'default'
|
|
435
|
-
const binding = config[surface] ?? config.default
|
|
436
|
-
return binding(services, data, wire)
|
|
437
|
-
},
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* What a step declares when nobody drives it: one implementation, and no
|
|
443
|
-
* surfaces to choose between.
|
|
444
|
-
*
|
|
445
|
-
* `func` rather than `default` is the point. `default` means *the fallback when
|
|
446
|
-
* no other surface applies*, which implies others could exist; `func` says
|
|
447
|
-
* structurally that there is one way this happens. That also keeps the phase
|
|
448
|
-
* rule coherent — an assertion runs every witness it has and fails if they
|
|
449
|
-
* disagree, and this has exactly one by construction.
|
|
450
|
-
*/
|
|
451
|
-
export type PikkuSubjectScenarioStepConfigWithSchema<
|
|
452
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
453
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
454
|
-
> = Omit<
|
|
455
|
-
PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>,
|
|
456
|
-
'browser' | 'cli' | 'default'
|
|
457
|
-
> & {
|
|
458
|
-
func: PikkuFunctionScenarioStep<
|
|
459
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
460
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
461
|
-
'default'
|
|
462
|
-
>
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export type PikkuSubjectScenarioStepConfig<In, Out> =
|
|
466
|
-
Omit<PikkuScenarioStepConfig<In, Out>, 'browser' | 'cli' | 'default'> & {
|
|
467
|
-
func: PikkuFunctionScenarioStep<In, Out, 'default'>
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* A step in which the app acts on itself — "Given the platform has expired the
|
|
472
|
-
* trial".
|
|
473
|
-
*
|
|
474
|
-
* The grammatical subject of that sentence is not a user of your app; it **is**
|
|
475
|
-
* your app, which is why it is its own declaration rather than a persona with an
|
|
476
|
-
* asterisk. A persona is a person.
|
|
477
|
-
*
|
|
478
|
-
* Local-test-only, and never in a virtual user's catalogue: a virtual user that
|
|
479
|
-
* could expire its own trial is manufacturing the outcome it exists to discover.
|
|
480
|
-
*/
|
|
481
|
-
export function pikkuPlatformScenarioStep<
|
|
482
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
483
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
484
|
-
>(
|
|
485
|
-
config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema>
|
|
486
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>
|
|
487
|
-
export function pikkuPlatformScenarioStep<In, Out = unknown>(
|
|
488
|
-
config: PikkuSubjectScenarioStepConfig<In, Out>
|
|
489
|
-
): PikkuFunctionConfig<In, Out, 'scenarioStep'>
|
|
490
|
-
export function pikkuPlatformScenarioStep(config: any) {
|
|
491
|
-
return { ...config, surfaces: ['default'] }
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* A step in which a third-party system acts — "Given Stripe's webhook arrives",
|
|
496
|
-
* "When Mailgun bounces it".
|
|
497
|
-
*
|
|
498
|
-
* `addon` names the addon that wraps that service, the same name its
|
|
499
|
-
* `wireAddon` declares. These steps *are* the mock its consumers currently
|
|
500
|
-
* hand-write: shipped by the addon author, maintained with the addon, and the
|
|
501
|
-
* same artifact that appears in the prose.
|
|
502
|
-
*
|
|
503
|
-
* Note that arranging and asserting are different — "Stripe's webhook arrives"
|
|
504
|
-
* stubs, "Then Stripe was charged" asserts, and only the first is a stub.
|
|
505
|
-
*
|
|
506
|
-
* Local-test-only, and never in a virtual user's catalogue: one that could
|
|
507
|
-
* invoke this would forge its own payment success.
|
|
508
|
-
*/
|
|
509
|
-
export function pikkuAddonScenarioStep<
|
|
510
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
511
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
512
|
-
>(
|
|
513
|
-
config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema> & { addon: string }
|
|
514
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>
|
|
515
|
-
export function pikkuAddonScenarioStep<In, Out = unknown>(
|
|
516
|
-
config: PikkuSubjectScenarioStepConfig<In, Out> & { addon: string }
|
|
517
|
-
): PikkuFunctionConfig<In, Out, 'scenarioStep'>
|
|
518
|
-
export function pikkuAddonScenarioStep(config: any) {
|
|
519
|
-
return { ...config, surfaces: ['default'] }
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
type TypedRef<T> = { $ref: string; path?: string } & { __phantomType?: T }
|
|
523
|
-
|
|
524
|
-
type TemplateString = {
|
|
525
|
-
$template: {
|
|
526
|
-
parts: string[]
|
|
527
|
-
expressions: Array<{ $ref: string; path?: string }>
|
|
528
|
-
}
|
|
529
|
-
} & { __brand: 'TemplateString' }
|
|
530
|
-
|
|
531
|
-
type InputWithRefs<T> = {
|
|
532
|
-
[K in keyof T]?: T[K] | TypedRef<T[K]> | TypedRef<unknown> | TemplateString
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
type NodeInputType<FuncMap extends Record<string, string>, K extends keyof FuncMap> =
|
|
536
|
-
FuncMap[K] extends keyof FlattenedRPCMap
|
|
537
|
-
? InputWithRefs<FlattenedRPCMap[FuncMap[K]]['input']>
|
|
538
|
-
: FuncMap[K] extends keyof FlattenedWorkflowMap
|
|
539
|
-
? InputWithRefs<FlattenedWorkflowMap[FuncMap[K]]['input']>
|
|
540
|
-
: Record<string, unknown>
|
|
541
|
-
|
|
542
|
-
type NodeOutputKeys<FuncMap extends Record<string, string>, N extends string> =
|
|
543
|
-
N extends keyof FuncMap
|
|
544
|
-
? FuncMap[N] extends keyof FlattenedRPCMap
|
|
545
|
-
? keyof FlattenedRPCMap[FuncMap[N]]['output'] & string
|
|
546
|
-
: FuncMap[N] extends keyof FlattenedWorkflowMap
|
|
547
|
-
? keyof FlattenedWorkflowMap[FuncMap[N]]['output'] & string
|
|
548
|
-
: FuncMap[N] extends keyof FlattenedAgentMap
|
|
549
|
-
? keyof FlattenedAgentMap[FuncMap[N]]['output'] & string
|
|
550
|
-
: string
|
|
551
|
-
: string
|
|
552
|
-
|
|
553
|
-
type RefFunction<FuncMap extends Record<string, string>> = {
|
|
554
|
-
<N extends Extract<keyof FuncMap, string>>(
|
|
555
|
-
nodeId: N,
|
|
556
|
-
path: NodeOutputKeys<FuncMap, N>
|
|
557
|
-
): TypedRef<unknown>
|
|
558
|
-
<N extends Extract<keyof FuncMap, string>>(nodeId: N): TypedRef<unknown>
|
|
559
|
-
(nodeId: 'trigger' | '$item', path?: string): TypedRef<unknown>
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
type TemplateFunction = (templateStr: string, refs: TypedRef<unknown>[]) => TemplateString
|
|
563
|
-
|
|
564
|
-
type GraphNodeConfigMap<FuncMap extends Record<string, string>> = {
|
|
565
|
-
[K in Extract<keyof FuncMap, string>]?: {
|
|
566
|
-
next?: NextConfig<Extract<keyof FuncMap, string>>
|
|
567
|
-
input?:
|
|
568
|
-
| NodeInputType<FuncMap, K>
|
|
569
|
-
| (() => NodeInputType<FuncMap, K>)
|
|
570
|
-
| ((ref: RefFunction<FuncMap>, template: TemplateFunction) => NodeInputType<FuncMap, K>)
|
|
571
|
-
onError?: Extract<keyof FuncMap, string> | Extract<keyof FuncMap, string>[]
|
|
572
|
-
/** Free-text node documentation. Non-semantic — excluded from graphHash. */
|
|
573
|
-
notes?: string
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
type NextConfig<NodeIds extends string> = NodeIds | NodeIds[] | { if: string; then: NodeIds; else?: NodeIds }
|
|
578
|
-
|
|
579
|
-
export function pikkuWorkflowGraph<
|
|
580
|
-
const FuncMap extends Record<
|
|
581
|
-
string,
|
|
582
|
-
| (keyof FlattenedRPCMap & string)
|
|
583
|
-
| (keyof FlattenedWorkflowMap & string)
|
|
584
|
-
| (keyof FlattenedAgentMap & string)
|
|
585
|
-
>
|
|
586
|
-
>(
|
|
587
|
-
config: PikkuWorkflowGraphConfig<FuncMap, GraphNodeConfigMap<FuncMap>>
|
|
588
|
-
): PikkuWorkflowGraphResult {
|
|
589
|
-
return corePikkuWorkflowGraph(config as any)
|
|
590
|
-
}
|
|
591
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
-
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core/internal'
|
|
5
|
-
import type { WorkflowsRuntimeMeta } from '@pikku/core/workflow/types'
|
|
6
|
-
|
|
7
|
-
const workflowsMeta: WorkflowsRuntimeMeta = {}
|
|
8
|
-
|
|
9
|
-
pikkuState('@pikku/addon-ollama', 'workflows', 'meta', workflowsMeta)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-addon-types.gen.d.ts","sourceRoot":"","sources":["../../../.pikku/addon/pikku-addon-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAA;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAM3E;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IACnC,SAAS,EAAE,qBAAqB,CAAA;IAChC,OAAO,EAAE,kBAAkB,CAAA;CAC5B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,SAAS,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,GAAG,iBAAiB,EACrI,MAAM,CAAC,QAAQ,EAAE,gBAAgB,KAAK,OAAO,CAAC,MAAM,CAAC,KACpD,YAAY,CAAC,MAAM,CAKrB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,gBAAgB,SAAS,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,GAAG,iBAAiB,EACtK,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,MAElD,QAAQ,MAAM,EAAE,mBAAmB,OAAO,CAAC,iBAAiB,CAAC,KAAG,OAAO,CAAC,yBAAyB,CAchH,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,GAAI,gBAAgB,SAAS,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,GAAG,iBAAiB,EAC3I,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,KAM7E,GACP,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-addon-types.gen.js","sourceRoot":"","sources":["../../../.pikku/addon/pikku-addon-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAMH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAgB3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAqD,EAC/B,EAAE;IACxB,OAAO,CAAC,KAAK,EAAE,UAAe,EAAE,gBAA6C,EAAmB,EAAE;QAChG,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAiC,CAAA;QAChG,OAAO,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,qBAAqB,CAAC,SAAS,CAAC,EAAsB,CAAC,CAAA;IACzI,CAAC,CAAoC,CAAA;AACvC,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,IAAgE,EAChE,EAAE;IACF,OAAO,KAAK,EAAE,MAAc,EAAE,gBAA6C,EAAsC,EAAE;QACjH,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAiC,CAAA;QACvG,MAAM,cAAc,GAAG,IAAI,qBAAqB,CAAC,SAAS,CAAC,CAAA;QAC3D,MAAM,YAAY,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,CAAA;QACpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAsB,CAAC,CAAA;QACxI,OAAO;YACL,MAAM;YACN,MAAM;YACN,MAAM;YACN,SAAS,EAAE,cAAc;YACzB,OAAO,EAAE,YAAY;YACrB,GAAG,MAAM;SAC8B,CAAA;IAC3C,CAAC,CAAA;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,IAAmF,EACnF,EAAE;IACF,OAAO,CAAC,CAAC,QAAa,EAAE,IAAe,EAAE,EAAE;QACzC,MAAM,cAAc,GAAG,IAAI,qBAAqB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;QACpE,MAAM,YAAY,GAAG,IAAI,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAC7D,OAAO,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAsB,EAAE,IAAI,CAAC,CAAA;IAC1G,CAAC,CAAQ,CAAA;AACX,CAAC,CAAA"}
|