@pikku/addon-console 0.12.11 → 0.12.13

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.
Files changed (96) hide show
  1. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  2. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  3. package/dist/.pikku/addon/pikku-package.gen.js +1 -1
  4. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  5. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  6. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  7. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  8. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  9. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  10. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  11. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  12. package/dist/.pikku/function/pikku-functions-meta.gen.json +53 -16
  13. package/dist/.pikku/function/pikku-functions.gen.js +5 -1
  14. package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
  15. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  16. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  17. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  18. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  19. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  20. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  21. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  22. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  23. package/dist/.pikku/pikku-services.gen.d.ts +2 -1
  24. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
  25. package/dist/.pikku/pikku-services.gen.js +1 -0
  26. package/dist/.pikku/pikku-services.gen.js.map +1 -1
  27. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  28. package/dist/.pikku/pikku-types.gen.js +1 -1
  29. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  30. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  31. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +8 -3
  32. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +9 -3
  33. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  34. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -0
  35. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  36. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  37. package/dist/.pikku/schemas/register.gen.js +7 -1
  38. package/dist/.pikku/schemas/register.gen.js.map +1 -1
  39. package/dist/.pikku/schemas/schemas/AddonPackageInfo.schema.json +1 -1
  40. package/dist/.pikku/schemas/schemas/AllMeta.schema.json +1 -1
  41. package/dist/.pikku/schemas/schemas/GetAddonMetaOutput.schema.json +1 -1
  42. package/dist/.pikku/schemas/schemas/GetFunctionsMetaOutput.schema.json +1 -1
  43. package/dist/.pikku/schemas/schemas/GetWorkflowMetaByIdOutput.schema.json +1 -1
  44. package/dist/.pikku/schemas/schemas/RenderEmailPreviewOutput.schema.json +1 -1
  45. package/dist/.pikku/schemas/schemas/StreamFunctionTestsOutput.schema.json +1 -0
  46. package/dist/.pikku/schemas/schemas/UpdateEmailTemplateInput.schema.json +1 -0
  47. package/dist/.pikku/schemas/schemas/UpdateEmailTemplateOutput.schema.json +1 -0
  48. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  49. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  50. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  51. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  52. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  53. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  54. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  55. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  56. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  57. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  58. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  59. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  60. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  61. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  62. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  63. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  64. package/dist/src/functions/get-workflow-meta-by-id.function.d.ts +0 -3
  65. package/dist/src/functions/get-workflow-meta-by-id.function.d.ts.map +1 -1
  66. package/dist/src/functions/render-email-preview.function.d.ts +2 -0
  67. package/dist/src/functions/render-email-preview.function.d.ts.map +1 -1
  68. package/dist/src/functions/render-email-preview.function.js +1 -0
  69. package/dist/src/functions/render-email-preview.function.js.map +1 -1
  70. package/dist/src/functions/run-function-tests.function.d.ts.map +1 -1
  71. package/dist/src/functions/run-function-tests.function.js +7 -4
  72. package/dist/src/functions/run-function-tests.function.js.map +1 -1
  73. package/dist/src/functions/stream-function-tests.function.d.ts +37 -0
  74. package/dist/src/functions/stream-function-tests.function.d.ts.map +1 -0
  75. package/dist/src/functions/stream-function-tests.function.js +253 -0
  76. package/dist/src/functions/stream-function-tests.function.js.map +1 -0
  77. package/dist/src/functions/stream-function-tests.function.test.d.ts +2 -0
  78. package/dist/src/functions/stream-function-tests.function.test.d.ts.map +1 -0
  79. package/dist/src/functions/stream-function-tests.function.test.js +238 -0
  80. package/dist/src/functions/stream-function-tests.function.test.js.map +1 -0
  81. package/dist/src/functions/update-email-template.function.d.ts +17 -0
  82. package/dist/src/functions/update-email-template.function.d.ts.map +1 -0
  83. package/dist/src/functions/update-email-template.function.js +24 -0
  84. package/dist/src/functions/update-email-template.function.js.map +1 -0
  85. package/dist/src/services/code-edit.service.d.ts +6 -0
  86. package/dist/src/services/code-edit.service.d.ts.map +1 -1
  87. package/dist/src/services/code-edit.service.js +13 -0
  88. package/dist/src/services/code-edit.service.js.map +1 -1
  89. package/dist/src/services/db-schema.service.d.ts +1 -26
  90. package/dist/src/services/db-schema.service.d.ts.map +1 -1
  91. package/dist/src/services/db-schema.service.js +35 -233
  92. package/dist/src/services/db-schema.service.js.map +1 -1
  93. package/dist/src/services.d.ts.map +1 -1
  94. package/dist/src/services.js +2 -21
  95. package/dist/src/services.js.map +1 -1
  96. package/package.json +4 -4
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "array", "items": { "$ref": "#/definitions/AddonPackageInfo" }, "definitions": { "AddonPackageInfo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "displayName": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "author": { "type": "string" }, "repository": { "type": "string" }, "license": { "type": "string" }, "readme": { "type": "string" }, "icon": { "type": "string" }, "publishedAt": { "type": "string" }, "updatedAt": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "categories": { "type": "array", "items": { "type": "string" } }, "functions": { "$ref": "#/definitions/FunctionsMeta" }, "agents": { "type": "object", "additionalProperties": {} }, "secrets": { "type": "object", "additionalProperties": {} }, "variables": { "type": "object", "additionalProperties": {} }, "httpRoutes": { "$ref": "#/definitions/HTTPWiringsMeta" }, "channels": { "$ref": "#/definitions/ChannelsMeta" }, "cli": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLIProgramMeta" } }, "mcp": { "anyOf": [{ "$ref": "#/definitions/McpMeta" }, { "type": "null" }] }, "schemas": { "type": "object", "additionalProperties": {} } }, "required": ["id", "name", "displayName", "version", "description", "author", "publishedAt", "updatedAt", "tags", "categories", "functions", "agents", "secrets", "variables", "httpRoutes", "channels", "cli", "mcp", "schemas"], "additionalProperties": false }, "FunctionsMeta": { "type": "object", "additionalProperties": { "$ref": "#/definitions/FunctionMeta" } }, "FunctionMeta": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "functionType": { "type": "string", "enum": ["user", "inline", "helper"] }, "funcWrapper": { "type": "string" }, "services": { "$ref": "#/definitions/FunctionServicesMeta" }, "wires": { "$ref": "#/definitions/FunctionWiresMeta" }, "inputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "outputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "isDirectFunction": { "type": "boolean" }, "sourceFile": { "type": "string" }, "exportedName": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "inputSchemaName": { "type": ["string", "null"] }, "outputSchemaName": { "type": ["string", "null"] }, "expose": { "type": "boolean" }, "remote": { "type": "boolean" }, "mcp": { "type": "boolean" }, "readonly": { "type": "boolean" }, "deploy": { "type": "string", "enum": ["serverless", "server", "auto"] }, "sessionless": { "type": "boolean" }, "version": { "type": "number" }, "approvalRequired": { "type": "boolean" }, "approvalDescription": { "type": "string" }, "implementationHash": { "type": "string" }, "contractHash": { "type": "string" }, "inputHash": { "type": "string" }, "outputHash": { "type": "string" } }, "required": ["inputSchemaName", "outputSchemaName", "pikkuFuncId"] }, "FunctionServicesMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "services": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "services"], "additionalProperties": false }, "FunctionWiresMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "wires": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "wires"], "additionalProperties": false }, "MiddlewareMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for middleware at any level\n- type: 'http' = HTTP route middleware group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based middleware group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual middleware" }, "PermissionMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for permissions at any level\n- type: 'http' = HTTP route permission group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based permission group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual permission" }, "HTTPWiringsMeta": { "type": "object", "properties": { "post": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "get": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "delete": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "patch": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "head": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "put": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "options": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } } }, "required": ["post", "get", "delete", "patch", "head", "put", "options"], "additionalProperties": false }, "HTTPWiringMeta": { "type": "object", "additionalProperties": false, "properties": { "route": { "type": "string" }, "method": { "$ref": "#/definitions/HTTPMethod" }, "params": { "type": "array", "items": { "type": "string" } }, "query": { "type": "array", "items": { "type": "string" } }, "inputTypes": { "$ref": "#/definitions/HTTPFunctionMetaInputTypes" }, "headersSchemaName": { "type": "string" }, "sse": { "type": "boolean", "const": true }, "groupBasePath": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } } }, "required": ["method", "pikkuFuncId", "route"], "description": "Represents metadata for a set of HTTP wirings, including HTTP wiring details, methods, input/output types, and documentation." }, "HTTPMethod": { "type": "string", "enum": ["post", "get", "delete", "patch", "head", "put", "options"], "description": "Represents the HTTP methods supported for API HTTP wirings." }, "HTTPFunctionMetaInputTypes": { "type": "object", "properties": { "params": { "type": "string" }, "query": { "type": "string" }, "body": { "type": "string" } }, "additionalProperties": false, "description": "Represents the input types for HTTP wiring metadata, including parameters, query, and body types." }, "ChannelsMeta": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ChannelMeta" } }, "ChannelMeta": { "type": "object", "properties": { "name": { "type": "string" }, "route": { "type": "string" }, "params": { "type": "array", "items": { "type": "string" } }, "query": { "type": "array", "items": { "type": "string" } }, "input": { "type": ["string", "null"] }, "inputTypes": { "$ref": "#/definitions/HTTPFunctionMetaInputTypes" }, "connect": { "anyOf": [{ "$ref": "#/definitions/ChannelMessageMeta" }, { "type": "null" }] }, "disconnect": { "anyOf": [{ "$ref": "#/definitions/ChannelMessageMeta" }, { "type": "null" }] }, "message": { "anyOf": [{ "$ref": "#/definitions/ChannelMessageMeta" }, { "type": "null" }] }, "messageWirings": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ChannelMessageMeta" } } }, "binary": { "type": ["boolean", "null"] }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "channelMiddleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } } }, "required": ["name", "route", "input", "connect", "disconnect", "message", "messageWirings"], "additionalProperties": false }, "ChannelMessageMeta": { "type": "object", "properties": { "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } } }, "required": ["pikkuFuncId"], "additionalProperties": false }, "CLIProgramMeta": { "type": "object", "properties": { "program": { "type": "string" }, "commands": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLICommandMeta" } }, "options": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLIOption" } }, "defaultRenderName": { "type": "string" } }, "required": ["program", "commands", "options"], "additionalProperties": false, "description": "CLI metadata collection (per program)" }, "CLICommandMeta": { "type": "object", "properties": { "parameters": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "positionals": { "type": "array", "items": { "$ref": "#/definitions/CLIPositional" } }, "options": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLIOption" } }, "renderName": { "type": "string" }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "subcommands": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLICommandMeta" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "isDefault": { "type": "boolean" } }, "required": ["pikkuFuncId", "positionals", "options"], "additionalProperties": false, "description": "CLI command metadata for runtime" }, "CLIPositional": { "type": "object", "properties": { "name": { "type": "string" }, "required": { "type": "boolean" }, "variadic": { "type": "boolean" } }, "required": ["name", "required"], "additionalProperties": false, "description": "Positional argument definition" }, "CLIOption": { "type": "object", "properties": { "description": { "type": "string" }, "short": { "type": "string" }, "default": {}, "choices": { "type": "array", "items": {} }, "array": { "type": "boolean" }, "required": { "type": "boolean" } }, "required": ["description"], "additionalProperties": false, "description": "CLI option definition" }, "McpMeta": { "type": "object", "properties": { "toolsMeta": { "$ref": "#/definitions/MCPToolMeta" }, "resourcesMeta": { "$ref": "#/definitions/MCPResourceMeta" }, "promptsMeta": { "$ref": "#/definitions/MCPPromptMeta" } }, "required": ["toolsMeta", "resourcesMeta", "promptsMeta"], "additionalProperties": false }, "MCPToolMeta": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "pikkuFuncId": { "type": "string" }, "inputSchema": { "type": ["string", "null"] }, "outputSchema": { "type": ["string", "null"] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "name": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "summary": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "streaming": { "type": "boolean" } }, "required": ["inputSchema", "name", "outputSchema", "pikkuFuncId"] }, "description": "Represents metadata for MCP tools, including name, description, and documentation." }, "MCPResourceMeta": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "pikkuFuncId": { "type": "string" }, "inputSchema": { "type": ["string", "null"] }, "outputSchema": { "type": ["string", "null"] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "uri": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "summary": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "mimeType": { "type": "string" }, "size": { "type": "number" }, "streaming": { "type": "boolean" }, "tags": { "type": "array", "items": { "type": "string" } } }, "required": ["description", "inputSchema", "outputSchema", "pikkuFuncId", "title", "uri"] }, "description": "Represents metadata for MCP resources, including name, description, and documentation." }, "MCPPromptMeta": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "pikkuFuncId": { "type": "string" }, "inputSchema": { "type": ["string", "null"] }, "outputSchema": { "type": ["string", "null"] }, "arguments": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" } }, "required": ["name", "description", "required"], "additionalProperties": false } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "name": { "type": "string" }, "description": { "type": "string" }, "summary": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } } }, "required": ["arguments", "description", "inputSchema", "name", "outputSchema", "pikkuFuncId"] }, "description": "Represents metadata for MCP prompts, including name, description, and arguments." } } }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "array", "items": { "$ref": "#/definitions/AddonPackageInfo" }, "definitions": { "AddonPackageInfo": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "displayName": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "author": { "type": "string" }, "repository": { "type": "string" }, "license": { "type": "string" }, "readme": { "type": "string" }, "icon": { "type": "string" }, "publishedAt": { "type": "string" }, "updatedAt": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "categories": { "type": "array", "items": { "type": "string" } }, "functions": { "$ref": "#/definitions/FunctionsMeta" }, "agents": { "type": "object", "additionalProperties": {} }, "secrets": { "type": "object", "additionalProperties": {} }, "variables": { "type": "object", "additionalProperties": {} }, "httpRoutes": { "$ref": "#/definitions/HTTPWiringsMeta" }, "channels": { "$ref": "#/definitions/ChannelsMeta" }, "cli": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLIProgramMeta" } }, "mcp": { "anyOf": [{ "$ref": "#/definitions/McpMeta" }, { "type": "null" }] }, "schemas": { "type": "object", "additionalProperties": {} } }, "required": ["id", "name", "displayName", "version", "description", "author", "publishedAt", "updatedAt", "tags", "categories", "functions", "agents", "secrets", "variables", "httpRoutes", "channels", "cli", "mcp", "schemas"], "additionalProperties": false }, "FunctionsMeta": { "type": "object", "additionalProperties": { "$ref": "#/definitions/FunctionMeta" } }, "FunctionMeta": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "functionType": { "type": "string", "enum": ["user", "inline", "helper"] }, "funcWrapper": { "type": "string" }, "services": { "$ref": "#/definitions/FunctionServicesMeta" }, "wires": { "$ref": "#/definitions/FunctionWiresMeta" }, "inputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "outputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "isDirectFunction": { "type": "boolean" }, "sourceFile": { "type": "string" }, "exportedName": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "inputSchemaName": { "type": ["string", "null"] }, "outputSchemaName": { "type": ["string", "null"] }, "expose": { "type": "boolean" }, "remote": { "type": "boolean" }, "mcp": { "type": "boolean" }, "readonly": { "type": "boolean" }, "deploy": { "type": "string", "enum": ["serverless", "server", "auto"] }, "sessionless": { "type": "boolean" }, "inline": { "type": "boolean", "description": "When false, workflow steps calling this function are dispatched via the queue. Defaults to true (inline)." }, "version": { "type": "number" }, "approvalRequired": { "type": "boolean" }, "approvalDescription": { "type": "string" }, "implementationHash": { "type": "string" }, "contractHash": { "type": "string" }, "inputHash": { "type": "string" }, "outputHash": { "type": "string" } }, "required": ["inputSchemaName", "outputSchemaName", "pikkuFuncId"] }, "FunctionServicesMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "services": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "services"], "additionalProperties": false }, "FunctionWiresMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "wires": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "wires"], "additionalProperties": false }, "MiddlewareMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for middleware at any level\n- type: 'http' = HTTP route middleware group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based middleware group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual middleware" }, "PermissionMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for permissions at any level\n- type: 'http' = HTTP route permission group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based permission group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual permission" }, "HTTPWiringsMeta": { "type": "object", "properties": { "post": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "get": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "delete": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "patch": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "head": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "put": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } }, "options": { "type": "object", "additionalProperties": { "$ref": "#/definitions/HTTPWiringMeta" } } }, "required": ["post", "get", "delete", "patch", "head", "put", "options"], "additionalProperties": false }, "HTTPWiringMeta": { "type": "object", "additionalProperties": false, "properties": { "route": { "type": "string" }, "method": { "$ref": "#/definitions/HTTPMethod" }, "params": { "type": "array", "items": { "type": "string" } }, "query": { "type": "array", "items": { "type": "string" } }, "inputTypes": { "$ref": "#/definitions/HTTPFunctionMetaInputTypes" }, "headersSchemaName": { "type": "string" }, "sse": { "type": "boolean", "const": true }, "groupBasePath": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } } }, "required": ["method", "pikkuFuncId", "route"], "description": "Represents metadata for a set of HTTP wirings, including HTTP wiring details, methods, input/output types, and documentation." }, "HTTPMethod": { "type": "string", "enum": ["post", "get", "delete", "patch", "head", "put", "options"], "description": "Represents the HTTP methods supported for API HTTP wirings." }, "HTTPFunctionMetaInputTypes": { "type": "object", "properties": { "params": { "type": "string" }, "query": { "type": "string" }, "body": { "type": "string" } }, "additionalProperties": false, "description": "Represents the input types for HTTP wiring metadata, including parameters, query, and body types." }, "ChannelsMeta": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ChannelMeta" } }, "ChannelMeta": { "type": "object", "properties": { "name": { "type": "string" }, "route": { "type": "string" }, "params": { "type": "array", "items": { "type": "string" } }, "query": { "type": "array", "items": { "type": "string" } }, "input": { "type": ["string", "null"] }, "inputTypes": { "$ref": "#/definitions/HTTPFunctionMetaInputTypes" }, "connect": { "anyOf": [{ "$ref": "#/definitions/ChannelMessageMeta" }, { "type": "null" }] }, "disconnect": { "anyOf": [{ "$ref": "#/definitions/ChannelMessageMeta" }, { "type": "null" }] }, "message": { "anyOf": [{ "$ref": "#/definitions/ChannelMessageMeta" }, { "type": "null" }] }, "messageWirings": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ChannelMessageMeta" } } }, "binary": { "type": ["boolean", "null"] }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "channelMiddleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } } }, "required": ["name", "route", "input", "connect", "disconnect", "message", "messageWirings"], "additionalProperties": false }, "ChannelMessageMeta": { "type": "object", "properties": { "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } } }, "required": ["pikkuFuncId"], "additionalProperties": false }, "CLIProgramMeta": { "type": "object", "properties": { "program": { "type": "string" }, "commands": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLICommandMeta" } }, "options": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLIOption" } }, "defaultRenderName": { "type": "string" } }, "required": ["program", "commands", "options"], "additionalProperties": false, "description": "CLI metadata collection (per program)" }, "CLICommandMeta": { "type": "object", "properties": { "parameters": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "positionals": { "type": "array", "items": { "$ref": "#/definitions/CLIPositional" } }, "options": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLIOption" } }, "renderName": { "type": "string" }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "subcommands": { "type": "object", "additionalProperties": { "$ref": "#/definitions/CLICommandMeta" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "isDefault": { "type": "boolean" } }, "required": ["pikkuFuncId", "positionals", "options"], "additionalProperties": false, "description": "CLI command metadata for runtime" }, "CLIPositional": { "type": "object", "properties": { "name": { "type": "string" }, "required": { "type": "boolean" }, "variadic": { "type": "boolean" } }, "required": ["name", "required"], "additionalProperties": false, "description": "Positional argument definition" }, "CLIOption": { "type": "object", "properties": { "description": { "type": "string" }, "short": { "type": "string" }, "default": {}, "choices": { "type": "array", "items": {} }, "array": { "type": "boolean" }, "required": { "type": "boolean" } }, "required": ["description"], "additionalProperties": false, "description": "CLI option definition" }, "McpMeta": { "type": "object", "properties": { "toolsMeta": { "$ref": "#/definitions/MCPToolMeta" }, "resourcesMeta": { "$ref": "#/definitions/MCPResourceMeta" }, "promptsMeta": { "$ref": "#/definitions/MCPPromptMeta" } }, "required": ["toolsMeta", "resourcesMeta", "promptsMeta"], "additionalProperties": false }, "MCPToolMeta": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "pikkuFuncId": { "type": "string" }, "inputSchema": { "type": ["string", "null"] }, "outputSchema": { "type": ["string", "null"] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "name": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "summary": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "streaming": { "type": "boolean" } }, "required": ["inputSchema", "name", "outputSchema", "pikkuFuncId"] }, "description": "Represents metadata for MCP tools, including name, description, and documentation." }, "MCPResourceMeta": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "pikkuFuncId": { "type": "string" }, "inputSchema": { "type": ["string", "null"] }, "outputSchema": { "type": ["string", "null"] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "uri": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "summary": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "mimeType": { "type": "string" }, "size": { "type": "number" }, "streaming": { "type": "boolean" }, "tags": { "type": "array", "items": { "type": "string" } } }, "required": ["description", "inputSchema", "outputSchema", "pikkuFuncId", "title", "uri"] }, "description": "Represents metadata for MCP resources, including name, description, and documentation." }, "MCPPromptMeta": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "pikkuFuncId": { "type": "string" }, "inputSchema": { "type": ["string", "null"] }, "outputSchema": { "type": ["string", "null"] }, "arguments": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" } }, "required": ["name", "description", "required"], "additionalProperties": false } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "name": { "type": "string" }, "description": { "type": "string" }, "summary": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } } }, "required": ["arguments", "description", "inputSchema", "name", "outputSchema", "pikkuFuncId"] }, "description": "Represents metadata for MCP prompts, including name, description, and arguments." } } }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "array", "items": { "$ref": "#/definitions/FunctionMetaWithVersions" }, "definitions": { "FunctionMetaWithVersions": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "number" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/FunctionVersionEntry" } }, "name": { "type": "string" }, "functionType": { "type": "string", "enum": ["user", "inline", "helper"] }, "funcWrapper": { "type": "string" }, "services": { "$ref": "#/definitions/FunctionServicesMeta" }, "wires": { "$ref": "#/definitions/FunctionWiresMeta" }, "inputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "outputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "isDirectFunction": { "type": "boolean" }, "sourceFile": { "type": "string" }, "exportedName": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "inputSchemaName": { "type": ["string", "null"] }, "outputSchemaName": { "type": ["string", "null"] }, "expose": { "type": "boolean" }, "remote": { "type": "boolean" }, "mcp": { "type": "boolean" }, "readonly": { "type": "boolean" }, "deploy": { "type": "string", "enum": ["serverless", "server", "auto"] }, "sessionless": { "type": "boolean" }, "approvalRequired": { "type": "boolean" }, "approvalDescription": { "type": "string" }, "implementationHash": { "type": "string" }, "contractHash": { "type": "string" }, "inputHash": { "type": "string" }, "outputHash": { "type": "string" } }, "required": ["inputSchemaName", "outputSchemaName", "pikkuFuncId"] }, "FunctionVersionEntry": { "type": "object", "properties": { "version": { "type": "number" }, "inputHash": { "type": "string" }, "outputHash": { "type": "string" } }, "required": ["version", "inputHash", "outputHash"], "additionalProperties": false }, "FunctionServicesMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "services": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "services"], "additionalProperties": false }, "FunctionWiresMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "wires": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "wires"], "additionalProperties": false }, "MiddlewareMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for middleware at any level\n- type: 'http' = HTTP route middleware group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based middleware group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual middleware" }, "PermissionMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for permissions at any level\n- type: 'http' = HTTP route permission group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based permission group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual permission" } } }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "array", "items": { "$ref": "#/definitions/FunctionMetaWithVersions" }, "definitions": { "FunctionMetaWithVersions": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "number" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/FunctionVersionEntry" } }, "name": { "type": "string" }, "functionType": { "type": "string", "enum": ["user", "inline", "helper"] }, "funcWrapper": { "type": "string" }, "services": { "$ref": "#/definitions/FunctionServicesMeta" }, "wires": { "$ref": "#/definitions/FunctionWiresMeta" }, "inputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "outputs": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } }, "isDirectFunction": { "type": "boolean" }, "sourceFile": { "type": "string" }, "exportedName": { "type": "string" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "inputSchemaName": { "type": ["string", "null"] }, "outputSchemaName": { "type": ["string", "null"] }, "expose": { "type": "boolean" }, "remote": { "type": "boolean" }, "mcp": { "type": "boolean" }, "readonly": { "type": "boolean" }, "deploy": { "type": "string", "enum": ["serverless", "server", "auto"] }, "sessionless": { "type": "boolean" }, "inline": { "type": "boolean", "description": "When false, workflow steps calling this function are dispatched via the queue. Defaults to true (inline)." }, "approvalRequired": { "type": "boolean" }, "approvalDescription": { "type": "string" }, "implementationHash": { "type": "string" }, "contractHash": { "type": "string" }, "inputHash": { "type": "string" }, "outputHash": { "type": "string" } }, "required": ["inputSchemaName", "outputSchemaName", "pikkuFuncId"] }, "FunctionVersionEntry": { "type": "object", "properties": { "version": { "type": "number" }, "inputHash": { "type": "string" }, "outputHash": { "type": "string" } }, "required": ["version", "inputHash", "outputHash"], "additionalProperties": false }, "FunctionServicesMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "services": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "services"], "additionalProperties": false }, "FunctionWiresMeta": { "type": "object", "properties": { "optimized": { "type": "boolean" }, "wires": { "type": "array", "items": { "type": "string" } } }, "required": ["optimized", "wires"], "additionalProperties": false }, "MiddlewareMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for middleware at any level\n- type: 'http' = HTTP route middleware group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based middleware group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual middleware" }, "PermissionMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for permissions at any level\n- type: 'http' = HTTP route permission group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based permission group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual permission" } } }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" } }, "context": { "$ref": "#/definitions/WorkflowContext" }, "dsl": { "type": "boolean" }, "inline": { "type": "boolean" }, "expose": { "type": "boolean" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } } }, "required": ["name", "pikkuFuncId", "steps"], "definitions": { "WorkflowStepMeta": { "anyOf": [{ "$ref": "#/definitions/RpcStepMeta" }, { "$ref": "#/definitions/BranchStepMeta" }, { "$ref": "#/definitions/ParallelGroupStepMeta" }, { "$ref": "#/definitions/FanoutStepMeta" }, { "$ref": "#/definitions/ReturnStepMeta" }, { "$ref": "#/definitions/InlineStepMeta" }, { "$ref": "#/definitions/SleepStepMeta" }, { "$ref": "#/definitions/CancelStepMeta" }, { "$ref": "#/definitions/SwitchStepMeta" }, { "$ref": "#/definitions/FilterStepMeta" }, { "$ref": "#/definitions/ArrayPredicateStepMeta" }, { "$ref": "#/definitions/SetStepMeta" }], "description": "Workflow step metadata (extracted by inspector)" }, "RpcStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "rpc", "description": "RPC form - generates queue worker" }, "stepName": { "type": "string", "description": "Cache key (stepName from workflow.do)" }, "rpcName": { "type": "string", "description": "RPC to invoke" }, "outputVar": { "type": "string", "description": "Output variable name (if assigned)" }, "inputs": { "anyOf": [{ "type": "object", "additionalProperties": { "$ref": "#/definitions/InputSource" } }, { "type": "string", "const": "passthrough" }], "description": "Input source mappings, or 'passthrough' when entire data is passed" }, "options": { "$ref": "#/definitions/WorkflowStepOptions", "description": "Step options" } }, "required": ["type", "stepName", "rpcName"], "additionalProperties": false, "description": "RPC step metadata (base form)" }, "InputSource": { "anyOf": [{ "type": "object", "properties": { "from": { "type": "string", "const": "input" }, "path": { "type": "string" } }, "required": ["from", "path"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "outputVar" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": ["from", "name"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "item" }, "path": { "type": "string" } }, "required": ["from", "path"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "literal" }, "value": {} }, "required": ["from", "value"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "template" }, "parts": { "type": "array", "items": { "type": "string" } }, "expressions": { "type": "array", "items": { "$ref": "#/definitions/InputSource" } } }, "required": ["from", "parts", "expressions"], "additionalProperties": false }], "description": "Input source for step arguments in DSL workflows" }, "WorkflowStepOptions": { "type": "object", "properties": { "description": { "type": "string", "description": "Display name for logs/UI (optional, doesn't affect execution)" }, "retries": { "type": "number", "description": "Number of retry attempts for failed steps (only applies to local execution)" }, "retryDelay": { "type": ["string", "number"], "description": "Delay between retry attempts (e.g., '1s', '2s', '2min')" } }, "additionalProperties": false, "description": "Workflow step options" }, "BranchStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "branch" }, "branches": { "type": "array", "items": { "$ref": "#/definitions/BranchCase" }, "description": "Branches in order: first is \"if\", rest are \"else if\"" }, "elseSteps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Else branch steps (when no conditions match)" } }, "required": ["type", "branches"], "additionalProperties": false, "description": "Branch step metadata (if/else-if/else control flow)" }, "BranchCase": { "type": "object", "properties": { "condition": { "$ref": "#/definitions/Condition", "description": "Condition for this branch" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Steps to execute when condition is true" } }, "required": ["condition", "steps"], "additionalProperties": false, "description": "A single branch in an if/else-if chain" }, "Condition": { "anyOf": [{ "$ref": "#/definitions/SimpleCondition" }, { "type": "object", "properties": { "type": { "type": "string", "const": "and" }, "conditions": { "type": "array", "items": { "$ref": "#/definitions/Condition" } } }, "required": ["type", "conditions"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "or" }, "conditions": { "type": "array", "items": { "$ref": "#/definitions/Condition" } } }, "required": ["type", "conditions"], "additionalProperties": false }], "description": "Nested condition structure supporting AND/OR operations" }, "SimpleCondition": { "type": "object", "properties": { "type": { "type": "string", "const": "simple" }, "expression": { "type": "string" } }, "required": ["type", "expression"], "additionalProperties": false, "description": "Simple condition expression (leaf node)" }, "ParallelGroupStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "parallel" }, "children": { "type": "array", "items": { "$ref": "#/definitions/RpcStepMeta" }, "description": "Child steps to execute in parallel" } }, "required": ["type", "children"], "additionalProperties": false, "description": "Parallel group step metadata (Promise.all with multiple steps)" }, "FanoutStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "fanout" }, "stepName": { "type": "string", "description": "Step name for this fanout" }, "sourceVar": { "type": "string", "description": "Source array variable name" }, "itemVar": { "type": "string", "description": "Iterator variable name" }, "mode": { "type": "string", "enum": ["parallel", "sequential"], "description": "Execution mode" }, "child": { "$ref": "#/definitions/RpcStepMeta", "description": "Child step to execute per iteration" }, "timeBetween": { "type": "string", "description": "Time between iterations (sequential mode only)" } }, "required": ["type", "stepName", "sourceVar", "itemVar", "mode", "child"], "additionalProperties": false, "description": "Fanout step metadata (parallel or sequential iteration)" }, "ReturnStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "return" }, "outputs": { "type": "object", "additionalProperties": { "$ref": "#/definitions/OutputBinding" }, "description": "Output bindings" } }, "required": ["type", "outputs"], "additionalProperties": false, "description": "Return step metadata (workflow output)" }, "OutputBinding": { "anyOf": [{ "type": "object", "properties": { "from": { "type": "string", "const": "outputVar" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": ["from", "name"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "stateVar" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": ["from", "name"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "input" }, "path": { "type": "string" } }, "required": ["from", "path"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "literal" }, "value": {} }, "required": ["from", "value"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "expression" }, "expression": { "type": "string" } }, "required": ["from", "expression"], "additionalProperties": false }], "description": "Output binding for return statements in DSL workflows" }, "InlineStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "inline", "description": "Inline form - local execution" }, "stepName": { "type": "string", "description": "Cache key (stepName from workflow.do)" }, "description": { "type": "string", "description": "Display name" }, "options": { "$ref": "#/definitions/WorkflowStepOptions", "description": "Step options" } }, "required": ["type", "stepName"], "additionalProperties": false, "description": "Inline step metadata (legacy support)" }, "SleepStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "sleep", "description": "Sleep step" }, "stepName": { "type": "string", "description": "Cache key (stepName from workflow.sleep)" }, "duration": { "type": ["string", "number"], "description": "Sleep duration" } }, "required": ["type", "stepName", "duration"], "additionalProperties": false, "description": "Sleep step metadata" }, "CancelStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "cancel", "description": "Cancel step" }, "reason": { "type": "string", "description": "Optional cancellation reason" } }, "required": ["type"], "additionalProperties": false, "description": "Cancel step metadata" }, "SwitchStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "switch" }, "expression": { "type": "string", "description": "Expression being switched on" }, "cases": { "type": "array", "items": { "$ref": "#/definitions/SwitchCaseMeta" }, "description": "Case branches" }, "defaultSteps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Default case steps (optional)" } }, "required": ["type", "expression", "cases"], "additionalProperties": false, "description": "Switch step metadata (switch/case control flow)" }, "SwitchCaseMeta": { "type": "object", "properties": { "value": { "type": ["string", "number", "boolean", "null"], "description": "Case value (literal) or expression" }, "expression": { "type": "string", "description": "Case expression (for complex cases)" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Steps to execute for this case" } }, "required": ["steps"], "additionalProperties": false, "description": "Switch case metadata" }, "FilterStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "filter" }, "sourceVar": { "type": "string", "description": "Source array variable name" }, "itemVar": { "type": "string", "description": "Iterator variable name" }, "condition": { "$ref": "#/definitions/Condition", "description": "Filter condition" }, "outputVar": { "type": "string", "description": "Output variable name (if assigned)" } }, "required": ["type", "sourceVar", "itemVar", "condition"], "additionalProperties": false, "description": "Filter step metadata (array.filter)" }, "ArrayPredicateStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "arrayPredicate" }, "mode": { "type": "string", "enum": ["some", "every"], "description": "Predicate mode" }, "sourceVar": { "type": "string", "description": "Source array variable name" }, "itemVar": { "type": "string", "description": "Iterator variable name" }, "condition": { "$ref": "#/definitions/Condition", "description": "Predicate condition" }, "outputVar": { "type": "string", "description": "Output variable name (if assigned)" } }, "required": ["type", "mode", "sourceVar", "itemVar", "condition"], "additionalProperties": false, "description": "Array predicate step metadata (array.some, array.every)" }, "SetStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "set", "description": "Set step" }, "variable": { "type": "string", "description": "Variable name to set (must be in context)" }, "value": { "description": "Value to assign (literal or expression)" } }, "required": ["type", "variable", "value"], "additionalProperties": false, "description": "Set step metadata (context variable assignment)" }, "WorkflowContext": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ContextVariable" }, "description": "Workflow context - state variables with defaults and types" }, "ContextVariable": { "type": "object", "properties": { "type": { "type": "string", "enum": ["string", "number", "boolean", "object", "array"], "description": "Variable type" }, "default": { "description": "Default value" }, "description": { "type": "string", "description": "Description for UI/docs" } }, "required": ["type"], "additionalProperties": false, "description": "Context variable definition (serialized from Zod schema or type inference)" }, "MiddlewareMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for middleware at any level\n- type: 'http' = HTTP route middleware group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based middleware group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual middleware" }, "PermissionMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for permissions at any level\n- type: 'http' = HTTP route permission group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based permission group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual permission" } } }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" } }, "context": { "$ref": "#/definitions/WorkflowContext" }, "dsl": { "type": "boolean" }, "expose": { "type": "boolean" }, "pikkuFuncId": { "type": "string" }, "packageName": { "type": "string" }, "title": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "summary": { "type": "string" }, "description": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } }, "middleware": { "type": "array", "items": { "$ref": "#/definitions/MiddlewareMetadata" } }, "permissions": { "type": "array", "items": { "$ref": "#/definitions/PermissionMetadata" } } }, "required": ["name", "pikkuFuncId", "steps"], "definitions": { "WorkflowStepMeta": { "anyOf": [{ "$ref": "#/definitions/RpcStepMeta" }, { "$ref": "#/definitions/BranchStepMeta" }, { "$ref": "#/definitions/ParallelGroupStepMeta" }, { "$ref": "#/definitions/FanoutStepMeta" }, { "$ref": "#/definitions/ReturnStepMeta" }, { "$ref": "#/definitions/InlineStepMeta" }, { "$ref": "#/definitions/SleepStepMeta" }, { "$ref": "#/definitions/CancelStepMeta" }, { "$ref": "#/definitions/SwitchStepMeta" }, { "$ref": "#/definitions/FilterStepMeta" }, { "$ref": "#/definitions/ArrayPredicateStepMeta" }, { "$ref": "#/definitions/SetStepMeta" }], "description": "Workflow step metadata (extracted by inspector)" }, "RpcStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "rpc", "description": "RPC form - generates queue worker" }, "stepName": { "type": "string", "description": "Cache key (stepName from workflow.do)" }, "rpcName": { "type": "string", "description": "RPC to invoke" }, "outputVar": { "type": "string", "description": "Output variable name (if assigned)" }, "inputs": { "anyOf": [{ "type": "object", "additionalProperties": { "$ref": "#/definitions/InputSource" } }, { "type": "string", "const": "passthrough" }], "description": "Input source mappings, or 'passthrough' when entire data is passed" }, "options": { "$ref": "#/definitions/WorkflowStepOptions", "description": "Step options" } }, "required": ["type", "stepName", "rpcName"], "additionalProperties": false, "description": "RPC step metadata (base form)" }, "InputSource": { "anyOf": [{ "type": "object", "properties": { "from": { "type": "string", "const": "input" }, "path": { "type": "string" } }, "required": ["from", "path"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "outputVar" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": ["from", "name"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "item" }, "path": { "type": "string" } }, "required": ["from", "path"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "literal" }, "value": {} }, "required": ["from", "value"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "template" }, "parts": { "type": "array", "items": { "type": "string" } }, "expressions": { "type": "array", "items": { "$ref": "#/definitions/InputSource" } } }, "required": ["from", "parts", "expressions"], "additionalProperties": false }], "description": "Input source for step arguments in DSL workflows" }, "WorkflowStepOptions": { "type": "object", "properties": { "description": { "type": "string", "description": "Display name for logs/UI (optional, doesn't affect execution)" }, "retries": { "type": "number", "description": "Number of retry attempts for failed steps (only applies to local execution)" }, "retryDelay": { "type": ["string", "number"], "description": "Delay between retry attempts (e.g., '1s', '2s', '2min')" } }, "additionalProperties": false, "description": "Workflow step options" }, "BranchStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "branch" }, "branches": { "type": "array", "items": { "$ref": "#/definitions/BranchCase" }, "description": "Branches in order: first is \"if\", rest are \"else if\"" }, "elseSteps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Else branch steps (when no conditions match)" } }, "required": ["type", "branches"], "additionalProperties": false, "description": "Branch step metadata (if/else-if/else control flow)" }, "BranchCase": { "type": "object", "properties": { "condition": { "$ref": "#/definitions/Condition", "description": "Condition for this branch" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Steps to execute when condition is true" } }, "required": ["condition", "steps"], "additionalProperties": false, "description": "A single branch in an if/else-if chain" }, "Condition": { "anyOf": [{ "$ref": "#/definitions/SimpleCondition" }, { "type": "object", "properties": { "type": { "type": "string", "const": "and" }, "conditions": { "type": "array", "items": { "$ref": "#/definitions/Condition" } } }, "required": ["type", "conditions"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "or" }, "conditions": { "type": "array", "items": { "$ref": "#/definitions/Condition" } } }, "required": ["type", "conditions"], "additionalProperties": false }], "description": "Nested condition structure supporting AND/OR operations" }, "SimpleCondition": { "type": "object", "properties": { "type": { "type": "string", "const": "simple" }, "expression": { "type": "string" } }, "required": ["type", "expression"], "additionalProperties": false, "description": "Simple condition expression (leaf node)" }, "ParallelGroupStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "parallel" }, "children": { "type": "array", "items": { "$ref": "#/definitions/RpcStepMeta" }, "description": "Child steps to execute in parallel" } }, "required": ["type", "children"], "additionalProperties": false, "description": "Parallel group step metadata (Promise.all with multiple steps)" }, "FanoutStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "fanout" }, "stepName": { "type": "string", "description": "Step name for this fanout" }, "sourceVar": { "type": "string", "description": "Source array variable name" }, "itemVar": { "type": "string", "description": "Iterator variable name" }, "mode": { "type": "string", "enum": ["parallel", "sequential"], "description": "Execution mode" }, "child": { "$ref": "#/definitions/RpcStepMeta", "description": "Child step to execute per iteration" }, "timeBetween": { "type": "string", "description": "Time between iterations (sequential mode only)" } }, "required": ["type", "stepName", "sourceVar", "itemVar", "mode", "child"], "additionalProperties": false, "description": "Fanout step metadata (parallel or sequential iteration)" }, "ReturnStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "return" }, "outputs": { "type": "object", "additionalProperties": { "$ref": "#/definitions/OutputBinding" }, "description": "Output bindings" } }, "required": ["type", "outputs"], "additionalProperties": false, "description": "Return step metadata (workflow output)" }, "OutputBinding": { "anyOf": [{ "type": "object", "properties": { "from": { "type": "string", "const": "outputVar" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": ["from", "name"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "stateVar" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": ["from", "name"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "input" }, "path": { "type": "string" } }, "required": ["from", "path"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "literal" }, "value": {} }, "required": ["from", "value"], "additionalProperties": false }, { "type": "object", "properties": { "from": { "type": "string", "const": "expression" }, "expression": { "type": "string" } }, "required": ["from", "expression"], "additionalProperties": false }], "description": "Output binding for return statements in DSL workflows" }, "InlineStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "inline", "description": "Inline form - local execution" }, "stepName": { "type": "string", "description": "Cache key (stepName from workflow.do)" }, "description": { "type": "string", "description": "Display name" }, "options": { "$ref": "#/definitions/WorkflowStepOptions", "description": "Step options" } }, "required": ["type", "stepName"], "additionalProperties": false, "description": "Inline step metadata (legacy support)" }, "SleepStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "sleep", "description": "Sleep step" }, "stepName": { "type": "string", "description": "Cache key (stepName from workflow.sleep)" }, "duration": { "type": ["string", "number"], "description": "Sleep duration" } }, "required": ["type", "stepName", "duration"], "additionalProperties": false, "description": "Sleep step metadata" }, "CancelStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "cancel", "description": "Cancel step" }, "reason": { "type": "string", "description": "Optional cancellation reason" } }, "required": ["type"], "additionalProperties": false, "description": "Cancel step metadata" }, "SwitchStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "switch" }, "expression": { "type": "string", "description": "Expression being switched on" }, "cases": { "type": "array", "items": { "$ref": "#/definitions/SwitchCaseMeta" }, "description": "Case branches" }, "defaultSteps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Default case steps (optional)" } }, "required": ["type", "expression", "cases"], "additionalProperties": false, "description": "Switch step metadata (switch/case control flow)" }, "SwitchCaseMeta": { "type": "object", "properties": { "value": { "type": ["string", "number", "boolean", "null"], "description": "Case value (literal) or expression" }, "expression": { "type": "string", "description": "Case expression (for complex cases)" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/WorkflowStepMeta" }, "description": "Steps to execute for this case" } }, "required": ["steps"], "additionalProperties": false, "description": "Switch case metadata" }, "FilterStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "filter" }, "sourceVar": { "type": "string", "description": "Source array variable name" }, "itemVar": { "type": "string", "description": "Iterator variable name" }, "condition": { "$ref": "#/definitions/Condition", "description": "Filter condition" }, "outputVar": { "type": "string", "description": "Output variable name (if assigned)" } }, "required": ["type", "sourceVar", "itemVar", "condition"], "additionalProperties": false, "description": "Filter step metadata (array.filter)" }, "ArrayPredicateStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "arrayPredicate" }, "mode": { "type": "string", "enum": ["some", "every"], "description": "Predicate mode" }, "sourceVar": { "type": "string", "description": "Source array variable name" }, "itemVar": { "type": "string", "description": "Iterator variable name" }, "condition": { "$ref": "#/definitions/Condition", "description": "Predicate condition" }, "outputVar": { "type": "string", "description": "Output variable name (if assigned)" } }, "required": ["type", "mode", "sourceVar", "itemVar", "condition"], "additionalProperties": false, "description": "Array predicate step metadata (array.some, array.every)" }, "SetStepMeta": { "type": "object", "properties": { "type": { "type": "string", "const": "set", "description": "Set step" }, "variable": { "type": "string", "description": "Variable name to set (must be in context)" }, "value": { "description": "Value to assign (literal or expression)" } }, "required": ["type", "variable", "value"], "additionalProperties": false, "description": "Set step metadata (context variable assignment)" }, "WorkflowContext": { "type": "object", "additionalProperties": { "$ref": "#/definitions/ContextVariable" }, "description": "Workflow context - state variables with defaults and types" }, "ContextVariable": { "type": "object", "properties": { "type": { "type": "string", "enum": ["string", "number", "boolean", "object", "array"], "description": "Variable type" }, "default": { "description": "Default value" }, "description": { "type": "string", "description": "Description for UI/docs" } }, "required": ["type"], "additionalProperties": false, "description": "Context variable definition (serialized from Zod schema or type inference)" }, "MiddlewareMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for middleware at any level\n- type: 'http' = HTTP route middleware group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based middleware group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual middleware" }, "PermissionMetadata": { "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "http" }, "route": { "type": "string" } }, "required": ["type", "route"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "tag" }, "tag": { "type": "string" } }, "required": ["type", "tag"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "wire" }, "name": { "type": "string" }, "inline": { "type": "boolean" } }, "required": ["type", "name"], "additionalProperties": false }], "description": "Metadata for permissions at any level\n- type: 'http' = HTTP route permission group (references httpGroup in pikkuState)\n- type: 'tag' = Tag-based permission group (references tagGroup in pikkuState)\n- type: 'wire' = Wire-level individual permission" } } }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "name": { "type": "string" }, "locale": { "type": "string" }, "subject": { "type": "string" }, "html": { "type": "string" }, "text": { "type": "string" }, "variables": { "type": "array", "items": { "type": "string" } }, "hash": { "type": "string" }, "missing": { "type": "array", "items": { "type": "string" } } }, "required": ["name", "locale", "subject", "html", "variables", "hash", "missing"], "additionalProperties": false, "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "name": { "type": "string" }, "locale": { "type": "string" }, "subject": { "type": "string" }, "html": { "type": "string" }, "text": { "type": "string" }, "source": { "type": "string", "description": "Raw, un-rendered template HTML source (templates/<name>.html) — what the editor edits." }, "variables": { "type": "array", "items": { "type": "string" } }, "hash": { "type": "string" }, "missing": { "type": "array", "items": { "type": "string" } } }, "required": ["name", "locale", "subject", "html", "source", "variables", "hash", "missing"], "additionalProperties": false, "definitions": {} }
@@ -0,0 +1 @@
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "anyOf": [{ "type": "object", "properties": { "type": { "type": "string", "const": "run-start" }, "scenarios": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "uri": { "type": "string" }, "steps": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "name", "uri", "steps"], "additionalProperties": false } } }, "required": ["type", "scenarios"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "scenario-start" }, "id": { "type": "string" }, "name": { "type": "string" }, "uri": { "type": "string" } }, "required": ["type", "id", "name", "uri"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "step" }, "scenarioId": { "type": "string" }, "step": { "type": "string" }, "status": {}, "duration": { "type": "number" }, "message": { "type": "string" } }, "required": ["type", "scenarioId", "step", "status", "duration"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "scenario-done" }, "id": { "type": "string" }, "name": { "type": "string" }, "status": {} }, "required": ["type", "id", "name", "status"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "done" }, "coverage": { "$ref": "#/definitions/FunctionCoverageReport" } }, "required": ["type", "coverage"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "error" }, "message": { "type": "string" } }, "required": ["type", "message"], "additionalProperties": false }], "definitions": { "FunctionCoverageReport": { "type": "object", "properties": { "generatedAt": { "type": "string" }, "summary": { "type": "object", "properties": { "total": { "type": "number" }, "covered": { "type": "number" }, "partial": { "type": "number" }, "uncovered": { "type": "number" }, "unknown": { "type": "number" }, "overallRatio": { "type": "number" } }, "required": ["total", "covered", "partial", "uncovered", "unknown", "overallRatio"], "additionalProperties": false }, "functions": { "type": "array", "items": { "$ref": "#/definitions/FunctionCoverageEntry" } } }, "required": ["generatedAt", "summary", "functions"], "additionalProperties": false }, "FunctionCoverageEntry": { "type": "object", "properties": { "name": { "type": "string" }, "sourceFile": { "type": "string" }, "exposed": { "type": "boolean" }, "description": { "type": ["string", "null"] }, "coveredLines": { "type": "number" }, "totalLines": { "type": "number" }, "missedLines": { "type": "array", "items": { "type": "number" } }, "ratio": { "type": "number" }, "status": { "$ref": "#/definitions/CoverageStatus" } }, "required": ["name", "sourceFile", "exposed", "description", "coveredLines", "totalLines", "missedLines", "ratio", "status"], "additionalProperties": false }, "CoverageStatus": { "type": "string", "enum": ["covered", "partial", "uncovered", "unknown"] } } }
@@ -0,0 +1 @@
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "templateName": { "type": "string" }, "source": { "type": "string" } }, "required": ["templateName", "source"], "additionalProperties": false, "definitions": {} }
@@ -0,0 +1 @@
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "success": { "type": "boolean" } }, "required": ["success"], "additionalProperties": false, "definitions": {} }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret';
5
5
  export type { CoreSecret, SecretDefinitionMeta, SecretDefinitionsMeta } from '@pikku/core/secret';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret';
5
5
  //# sourceMappingURL=pikku-secret-types.gen.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService } from '@pikku/core/services';
5
5
  import type { SecretService } from '@pikku/core/services';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService } from '@pikku/core/services';
5
5
  const CREDENTIALS_META = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable';
5
5
  export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable';
5
5
  //# sourceMappingURL=pikku-variable-types.gen.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
5
5
  import type { VariablesService } from '@pikku/core/services';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
5
5
  const VARIABLES_META = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  /**
5
5
  * Workflow type map with input/output types for each workflow
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.29
2
+ * This file was generated by @pikku/cli@0.12.33
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  const workflowsMeta = {};
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.29
3
+ * This file was generated by @pikku/cli@0.12.33
4
4
  */
5
5
  //# sourceMappingURL=pikku-workflow-wirings.gen.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.29
3
+ * This file was generated by @pikku/cli@0.12.33
4
4
  */
5
5
  //# sourceMappingURL=pikku-workflow-wirings.gen.js.map
@@ -5,7 +5,6 @@ export declare const getWorkflowMetaById: import("#pikku").PikkuFunctionConfig<{
5
5
  steps: import("@pikku/core/workflow").WorkflowStepMeta[];
6
6
  context?: import("@pikku/core/workflow").WorkflowContext;
7
7
  dsl?: boolean;
8
- inline?: boolean;
9
8
  expose?: boolean;
10
9
  }) | null, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
11
10
  workflowId: string;
@@ -14,7 +13,6 @@ export declare const getWorkflowMetaById: import("#pikku").PikkuFunctionConfig<{
14
13
  steps: import("@pikku/core/workflow").WorkflowStepMeta[];
15
14
  context?: import("@pikku/core/workflow").WorkflowContext;
16
15
  dsl?: boolean;
17
- inline?: boolean;
18
16
  expose?: boolean;
19
17
  }) | null, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
20
18
  workflowId: string;
@@ -23,7 +21,6 @@ export declare const getWorkflowMetaById: import("#pikku").PikkuFunctionConfig<{
23
21
  steps: import("@pikku/core/workflow").WorkflowStepMeta[];
24
22
  context?: import("@pikku/core/workflow").WorkflowContext;
25
23
  dsl?: boolean;
26
- inline?: boolean;
27
24
  expose?: boolean;
28
25
  }) | null, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
29
26
  //# sourceMappingURL=get-workflow-meta-by-id.function.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-workflow-meta-by-id.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-workflow-meta-by-id.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;gBAChB,MAAM;;;;;;;;;gBAAN,MAAM;;;;;;;;;gBAAN,MAAM;;;;;;;;+EA+BpB,CAAA"}
1
+ {"version":3,"file":"get-workflow-meta-by-id.function.d.ts","sourceRoot":"","sources":["../../../src/functions/get-workflow-meta-by-id.function.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB;gBAChB,MAAM;;;;;;;;gBAAN,MAAM;;;;;;;;gBAAN,MAAM;;;;;;;+EA+BpB,CAAA"}
@@ -11,6 +11,8 @@ export interface RenderEmailPreviewOutput {
11
11
  subject: string;
12
12
  html: string;
13
13
  text?: string;
14
+ /** Raw, un-rendered template HTML source (templates/<name>.html) — what the editor edits. */
15
+ source: string;
14
16
  variables: string[];
15
17
  hash: string;
16
18
  missing: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"render-email-preview.function.d.ts","sourceRoot":"","sources":["../../../src/functions/render-email-preview.function.ts"],"names":[],"mappings":"AASA,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;AAClE,KAAK,kBAAkB,GACnB,cAAc,GACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,KAAK,CAAC,OAAO,CAAC,CAAA;AAElB,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,eAAO,MAAM,kBAAkB,gZAsF7B,CAAA"}
1
+ {"version":3,"file":"render-email-preview.function.d.ts","sourceRoot":"","sources":["../../../src/functions/render-email-preview.function.ts"],"names":[],"mappings":"AASA,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;AAClE,KAAK,kBAAkB,GACnB,cAAc,GACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,KAAK,CAAC,OAAO,CAAC,CAAA;AAElB,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,eAAO,MAAM,kBAAkB,gZAuF7B,CAAA"}
@@ -59,6 +59,7 @@ export const renderEmailPreview = pikkuSessionlessFunc({
59
59
  subject,
60
60
  html,
61
61
  ...(text ? { text } : {}),
62
+ source: assets.html,
62
63
  variables: templateMeta.variables,
63
64
  hash: templateMeta.locales[locale]?.contentHash ?? '',
64
65
  missing: assets.missing,
@@ -1 +1 @@
1
- {"version":3,"file":"render-email-preview.function.js","sourceRoot":"","sources":["../../../src/functions/render-email-preview.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,aAAa,EA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ACP,IAAI;YACJ,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzB,SAAS,EAAE,YAAY,CAAC,SAAS;YACjC,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,IAAI,EAAE;YACrD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"render-email-preview.function.js","sourceRoot":"","sources":["../../../src/functions/render-email-preview.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,kCAAkC,CAAA;AA2BzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAGpD;IACA,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,+FAA+F;IACjG,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE;QACrC,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,YAAY,EAAE,CAAA;QACnD,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAE/C,CAAA;QAEb,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,aAAa,CAAC,2BAA2B,KAAK,CAAC,YAAY,EAAE,CAAC,CAAA;QAC1E,CAAC;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;QAE3E,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,sBAAsB,CACrD,KAA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;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM;YACxB,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC5B,GAAG,WAAW;gBACd,OAAO;gBACP,OAAO,EAAE,QAAQ;aAClB,CAAC;YACJ,CAAC,CAAC,QAAQ,CAAA;QAEZ,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI;YACtB,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC1B,GAAG,WAAW;gBACd,OAAO;aACR,CAAC,CAAC,IAAI,EAAE;YACX,CAAC,CAAC,SAAS,CAAA;QAEb,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,YAAY;YACxB,MAAM;YACN,OAAO;YACP,IAAI;YACJ,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzB,MAAM,EAAE,MAAM,CAAC,IAAI;YACnB,SAAS,EAAE,YAAY,CAAC,SAAS;YACjC,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,IAAI,EAAE;YACrD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"run-function-tests.function.d.ts","sourceRoot":"","sources":["../../../src/functions/run-function-tests.function.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAcjF,eAAO,MAAM,gBAAgB,sWAmD3B,CAAA"}
1
+ {"version":3,"file":"run-function-tests.function.d.ts","sourceRoot":"","sources":["../../../src/functions/run-function-tests.function.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAcjF,eAAO,MAAM,gBAAgB,sWAyD3B,CAAA"}
@@ -2,6 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
3
  import { spawn } from 'node:child_process';
4
4
  import { pikkuSessionlessFunc } from '#pikku';
5
+ import { NotFoundError } from '@pikku/core';
5
6
  function findBin(name, searchFrom) {
6
7
  let dir = searchFrom;
7
8
  for (let i = 0; i < 6; i++) {
@@ -21,12 +22,14 @@ export const runFunctionTests = pikkuSessionlessFunc({
21
22
  expose: true,
22
23
  auth: false,
23
24
  func: async ({ metaService }) => {
24
- if (!metaService?.basePath)
25
- return null;
25
+ if (!metaService?.basePath) {
26
+ throw new Error('Meta service is not configured. Ensure the console addon is set up with a MetaService.');
27
+ }
26
28
  const functionsDir = join(metaService.basePath, '..');
27
29
  const ftestDir = join(functionsDir, 'tests');
28
- if (!existsSync(ftestDir))
29
- return null;
30
+ if (!existsSync(ftestDir)) {
31
+ throw new NotFoundError('No tests found. Add a tests directory to your project first — see the test-harness template for an example.');
32
+ }
30
33
  const pikku = findBin('pikku', functionsDir);
31
34
  const spawnEnv = { ...process.env };
32
35
  const envFile = join(ftestDir, '.env.test');
@@ -1 +1 @@
1
- {"version":3,"file":"run-function-tests.function.js","sourceRoot":"","sources":["../../../src/functions/run-function-tests.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAG7C,SAAS,OAAO,CAAC,IAAY,EAAE,UAAkB;IAC/C,IAAI,GAAG,GAAG,UAAU,CAAA;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QACz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