@pikku/cli 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.schema.json +1 -1
- package/console-app/assets/{index-AX4YS8AA.js → index-sUj3oFEL.js} +1 -1
- package/console-app/index.html +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +195 -195
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
- package/dist/.pikku/pikku-websocket.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +9 -9
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +34 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -5
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/cli.wiring.js +1 -1
- package/dist/src/functions/commands/all.js +16 -1
- package/dist/src/functions/commands/new-addon.js +20 -6
- package/dist/src/functions/commands/versions-check.js +4 -4
- package/dist/src/functions/commands/versions-init.js +1 -1
- package/dist/src/functions/commands/versions-update.js +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +2 -2
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +2 -2
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +2 -2
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +12 -6
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +5 -5
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +4 -4
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +6 -6
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +63 -8
- package/dist/src/services.js +1 -1
- package/dist/src/utils/pikku-cli-config.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/dist/src/utils/openapi/codegen.d.ts +0 -20
- package/dist/src/utils/openapi/codegen.js +0 -442
- package/dist/src/utils/openapi/naming.d.ts +0 -30
- package/dist/src/utils/openapi/naming.js +0 -167
- package/dist/src/utils/openapi/parse-openapi.d.ts +0 -61
- package/dist/src/utils/openapi/parse-openapi.js +0 -306
- package/dist/src/utils/openapi/zod-codegen.d.ts +0 -1
- package/dist/src/utils/openapi/zod-codegen.js +0 -1
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"pikkuQueueMap": "pikkuQueueMap",
|
|
61
61
|
"pikkuQueueTypes": "pikkuQueueTypes",
|
|
62
62
|
"pikkuQueue": "pikkuQueue",
|
|
63
|
-
"pikkuSchedulerTypes": "pikkuSchedulerTypes",
|
|
64
|
-
"pikkuScheduler": "pikkuScheduler",
|
|
65
63
|
"pikkuPublicRPC": "pikkuPublicRPC",
|
|
66
64
|
"pikkuRemoteRPC": "pikkuRemoteRPC",
|
|
67
65
|
"pikkuRPCInternalMap": "pikkuRPCInternalMap",
|
|
68
66
|
"pikkuRPCExposedMap": "pikkuRPCExposedMap",
|
|
69
67
|
"pikkuRPC": "pikkuRPC",
|
|
68
|
+
"pikkuSchedulerTypes": "pikkuSchedulerTypes",
|
|
69
|
+
"pikkuScheduler": "pikkuScheduler",
|
|
70
70
|
"pikkuSecrets": "pikkuSecrets",
|
|
71
71
|
"pikkuTriggerTypes": "pikkuTriggerTypes",
|
|
72
72
|
"pikkuTrigger": "pikkuTrigger",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.7
|
|
3
3
|
*/
|
|
4
4
|
import { addSchema } from '@pikku/core/schema';
|
|
5
5
|
import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
|
|
@@ -22,12 +22,14 @@ import * as PikkuNewPermissionInput from './schemas/PikkuNewPermissionInput.sche
|
|
|
22
22
|
addSchema('PikkuNewPermissionInput', PikkuNewPermissionInput);
|
|
23
23
|
import * as PikkuNewAddonInput from './schemas/PikkuNewAddonInput.schema.json' with { type: 'json' };
|
|
24
24
|
addSchema('PikkuNewAddonInput', PikkuNewAddonInput);
|
|
25
|
-
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
|
|
26
|
-
addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
|
|
27
25
|
import * as PikkuAIAgentOutput from './schemas/PikkuAIAgentOutput.schema.json' with { type: 'json' };
|
|
28
26
|
addSchema('PikkuAIAgentOutput', PikkuAIAgentOutput);
|
|
29
27
|
import * as PikkuPublicAgentOutput from './schemas/PikkuPublicAgentOutput.schema.json' with { type: 'json' };
|
|
30
28
|
addSchema('PikkuPublicAgentOutput', PikkuPublicAgentOutput);
|
|
29
|
+
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
|
|
30
|
+
addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
|
|
31
|
+
import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
|
|
32
|
+
addSchema('PikkuCLIOutput', PikkuCLIOutput);
|
|
31
33
|
import * as PikkuConsoleFunctionsOutput from './schemas/PikkuConsoleFunctionsOutput.schema.json' with { type: 'json' };
|
|
32
34
|
addSchema('PikkuConsoleFunctionsOutput', PikkuConsoleFunctionsOutput);
|
|
33
35
|
import * as PikkuNodesMetaOutput from './schemas/PikkuNodesMetaOutput.schema.json' with { type: 'json' };
|
|
@@ -38,18 +40,14 @@ import * as PikkuGatewayOutput from './schemas/PikkuGatewayOutput.schema.json' w
|
|
|
38
40
|
addSchema('PikkuGatewayOutput', PikkuGatewayOutput);
|
|
39
41
|
import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
|
|
40
42
|
addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
|
|
41
|
-
import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
|
|
42
|
-
addSchema('PikkuCLIOutput', PikkuCLIOutput);
|
|
43
|
-
import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
|
|
44
|
-
addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
|
|
45
43
|
import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
|
|
46
44
|
addSchema('PikkuMCPOutput', PikkuMCPOutput);
|
|
45
|
+
import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
|
|
46
|
+
addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
|
|
47
47
|
import * as PikkuPackageOutput from './schemas/PikkuPackageOutput.schema.json' with { type: 'json' };
|
|
48
48
|
addSchema('PikkuPackageOutput', PikkuPackageOutput);
|
|
49
49
|
import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema.json' with { type: 'json' };
|
|
50
50
|
addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
|
|
51
|
-
import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
|
|
52
|
-
addSchema('PikkuQueueOutput', PikkuQueueOutput);
|
|
53
51
|
import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
|
|
54
52
|
addSchema('PikkuPublicRPCOutput', PikkuPublicRPCOutput);
|
|
55
53
|
import * as PikkuRemoteRPCOutput from './schemas/PikkuRemoteRPCOutput.schema.json' with { type: 'json' };
|
|
@@ -58,6 +56,8 @@ import * as PikkuRPCOutput from './schemas/PikkuRPCOutput.schema.json' with { ty
|
|
|
58
56
|
addSchema('PikkuRPCOutput', PikkuRPCOutput);
|
|
59
57
|
import * as PikkuSchedulerOutput from './schemas/PikkuSchedulerOutput.schema.json' with { type: 'json' };
|
|
60
58
|
addSchema('PikkuSchedulerOutput', PikkuSchedulerOutput);
|
|
59
|
+
import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
|
|
60
|
+
addSchema('PikkuQueueOutput', PikkuQueueOutput);
|
|
61
61
|
import * as PikkuTriggerOutput from './schemas/PikkuTriggerOutput.schema.json' with { type: 'json' };
|
|
62
62
|
addSchema('PikkuTriggerOutput', PikkuTriggerOutput);
|
|
63
63
|
import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json' with { type: 'json' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "outDir": { "type": "string" }, "schemaDirectory": { "type": "string" }, "typesDeclarationFile": { "type": "string" }, "functionsFile": { "type": "string" }, "functionsMetaFile": { "type": "string" }, "functionsMetaJsonFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpWiringMetaJsonFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "gatewaysWiringFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsWiringMetaJsonFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalWiringMetaJsonFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "remoteRpcWorkersFile": { "type": "string" }, "publicRpcFile": { "type": "string" }, "publicAgentFile": { "type": "string" }, "consoleFunctionsFile": { "type": "string" }, "workflowWorkersFile": { "type": "string" }, "triggersTypesFile": { "type": "string" }, "triggersWiringFile": { "type": "string" }, "triggersWiringMetaFile": { "type": "string" }, "triggersWiringMetaJsonFile": { "type": "string" }, "triggerSourcesMetaFile": { "type": "string" }, "triggerSourcesMetaJsonFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersWiringMetaJsonFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueWorkersWiringMetaJsonFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "workflowsWiringFile": { "type": "string" }, "workflowsWiringMetaFile": { "type": "string" }, "workflowsWorkersFile": { "type": "string" }, "workflowMapDeclarationFile": { "type": "string" }, "workflowTypesFile": { "type": "string" }, "workflowMetaDir": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpWiringsMetaJsonFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "agentWiringsFile": { "type": "string" }, "agentWiringMetaFile": { "type": "string" }, "agentWiringMetaJsonFile": { "type": "string" }, "agentTypesFile": { "type": "string" }, "agentMapDeclarationFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliWiringMetaJsonFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaJsonFile": { "type": "string" }, "permissionsFile": { "type": "string" }, "permissionsGroupsMetaJsonFile": { "type": "string" }, "bootstrapFile": { "type": "string" }, "packageFile": { "type": "string" }, "addonTypesFile": { "type": "string" }, "nodeTypesFile": { "type": "string" }, "secretTypesFile": { "type": "string" }, "secretsFile": { "type": "string" }, "secretsMetaJsonFile": { "type": "string" }, "variableTypesFile": { "type": "string" }, "variablesFile": { "type": "string" }, "variablesMetaJsonFile": { "type": "string" }, "$schema": { "type": "string" }, "extends": { "type": "string" }, "rootDir": { "type": "string" }, "srcDirectories": { "type": "array", "items": { "type": "string" } }, "ignoreFiles": { "type": "array", "items": { "type": "string" } }, "packageMappings": { "type": "object", "additionalProperties": { "type": "string" } }, "addon": { "anyOf": [{ "type": "boolean" }, { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "string" } }, "icon": { "type": "string" }, "displayName": { "type": "string" }, "description": { "type": "string" } }, "additionalProperties": false }] }, "addonName": { "type": "string" }, "models": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "model": { "type": "string" }, "temperature": { "type": "number" }, "maxSteps": { "type": "number" } }, "required": ["model"], "additionalProperties": false }] } }, "agentDefaults": { "type": "object", "properties": { "temperature": { "type": "number" }, "maxSteps": { "type": "number" } }, "additionalProperties": false }, "agentOverrides": { "type": "object", "additionalProperties": { "type": "object", "properties": { "model": { "type": "string" }, "temperature": { "type": "number" }, "maxSteps": { "type": "number" } }, "additionalProperties": false } }, "configFile": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "userSessionType": { "type": "string" }, "singletonServicesFactoryType": { "type": "string" }, "wireServicesFactoryType": { "type": "string" }, "configDir": { "type": "string" }, "tsconfig": { "type": "string" }, "clientFiles": { "type": "object", "properties": { "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" } }, "additionalProperties": false }, "openAPI": { "type": "object", "properties": { "outputFile": { "type": "string" }, "additionalInfo": { "$ref": "#/definitions/OpenAPISpecInfo" } }, "required": ["outputFile", "additionalInfo"], "additionalProperties": false }, "schema": { "type": "object", "properties": { "additionalProperties": { "type": "boolean" }, "supportsImportAttributes": { "type": "boolean" } }, "additionalProperties": false }, "cli": { "type": "object", "properties": { "entrypoints": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }, { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }] } }] } } }, "additionalProperties": false }, "workflows": { "type": "object", "properties": { "orchestratorQueue": { "type": "string" }, "workerQueue": { "type": "string" } }, "additionalProperties": false }, "scaffold": { "type": "object", "properties": { "addonDir": { "type": "string" }, "functionDir": { "type": "string" }, "wiringDir": { "type": "string" }, "middlewareDir": { "type": "string" }, "permissionDir": { "type": "string" }, "pikkuDir": { "type": "string" }, "rpc": { "$ref": "#/definitions/PikkuScaffoldFeature" }, "console": { "$ref": "#/definitions/PikkuScaffoldFeature" }, "agent": { "$ref": "#/definitions/PikkuScaffoldFeature" }, "workflow": { "$ref": "#/definitions/PikkuScaffoldFeature" } }, "additionalProperties": false }, "forceRequiredServices": { "type": "array", "items": { "type": "string" } }, "schemasFromTypes": { "type": "array", "items": { "type": "string" } }, "stateOutput": { "type": "string" }, "stateInput": { "type": "string" }, "verboseMeta": { "type": "boolean" }, "lint": { "type": "object", "properties": { "servicesNotDestructured": { "type": "string", "enum": ["off", "warn", "error"] }, "wiresNotDestructured": { "type": "string", "enum": ["off", "warn", "error"] } }, "additionalProperties": false }, "addonMetaJsonFile": { "type": "string" }, "filters": { "$ref": "#/definitions/InspectorFilters" } }, "required": ["addonTypesFile", "agentMapDeclarationFile", "agentTypesFile", "agentWiringMetaFile", "agentWiringMetaJsonFile", "agentWiringsFile", "bootstrapFile", "channelsMapDeclarationFile", "channelsTypesFile", "channelsWiringFile", "channelsWiringMetaFile", "channelsWiringMetaJsonFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringMetaJsonFile", "cliWiringsFile", "configDir", "consoleFunctionsFile", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaJsonFile", "gatewaysWiringFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringMetaJsonFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "mcpWiringsMetaJsonFile", "middlewareFile", "middlewareGroupsMetaJsonFile", "nodeTypesFile", "outDir", "packageFile", "packageMappings", "permissionsFile", "permissionsGroupsMetaJsonFile", "publicAgentFile", "publicRpcFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "queueWorkersWiringMetaJsonFile", "remoteRpcWorkersFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcInternalWiringMetaJsonFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schedulersWiringMetaJsonFile", "schemaDirectory", "secretTypesFile", "secretsFile", "secretsMetaJsonFile", "servicesFile", "srcDirectories", "triggerSourcesMetaFile", "triggerSourcesMetaJsonFile", "triggersTypesFile", "triggersWiringFile", "triggersWiringMetaFile", "triggersWiringMetaJsonFile", "tsconfig", "typesDeclarationFile", "variableTypesFile", "variablesFile", "variablesMetaJsonFile", "workflowMapDeclarationFile", "workflowMetaDir", "workflowTypesFile", "workflowWorkersFile", "workflowsWiringFile", "workflowsWiringMetaFile", "workflowsWorkersFile"], "definitions": { "OpenAPISpecInfo": { "type": "object", "properties": { "info": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "termsOfService": { "type": "string" }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string" } }, "additionalProperties": false }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["title", "version", "description"], "additionalProperties": false }, "servers": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "description": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "externalDocs": { "type": "object", "properties": { "description": { "type": "string" }, "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "securitySchemes": { "type": "object" }, "security": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": {} } } } }, "required": ["info", "servers"], "additionalProperties": false }, "PikkuScaffoldFeature": { "type": ["string", "boolean"], "enum": ["auth", "no-auth", false] }, "InspectorFilters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "directories": { "type": "array", "items": { "type": "string" } }, "httpRoutes": { "type": "array", "items": { "type": "string" } }, "httpMethods": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
|
|
1
|
+
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "outDir": { "type": "string" }, "schemaDirectory": { "type": "string" }, "typesDeclarationFile": { "type": "string" }, "functionsFile": { "type": "string" }, "functionsMetaFile": { "type": "string" }, "functionsMetaJsonFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpWiringMetaJsonFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "gatewaysWiringFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsWiringMetaJsonFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalWiringMetaJsonFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "remoteRpcWorkersFile": { "type": "string" }, "publicRpcFile": { "type": "string" }, "publicAgentFile": { "type": "string" }, "consoleFunctionsFile": { "type": "string" }, "workflowWorkersFile": { "type": "string" }, "triggersTypesFile": { "type": "string" }, "triggersWiringFile": { "type": "string" }, "triggersWiringMetaFile": { "type": "string" }, "triggersWiringMetaJsonFile": { "type": "string" }, "triggerSourcesMetaFile": { "type": "string" }, "triggerSourcesMetaJsonFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersWiringMetaJsonFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueWorkersWiringMetaJsonFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "workflowsWiringFile": { "type": "string" }, "workflowsWiringMetaFile": { "type": "string" }, "workflowsWorkersFile": { "type": "string" }, "workflowMapDeclarationFile": { "type": "string" }, "workflowTypesFile": { "type": "string" }, "workflowMetaDir": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpWiringsMetaJsonFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "agentWiringsFile": { "type": "string" }, "agentWiringMetaFile": { "type": "string" }, "agentWiringMetaJsonFile": { "type": "string" }, "agentTypesFile": { "type": "string" }, "agentMapDeclarationFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliWiringMetaJsonFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaJsonFile": { "type": "string" }, "permissionsFile": { "type": "string" }, "permissionsGroupsMetaJsonFile": { "type": "string" }, "bootstrapFile": { "type": "string" }, "packageFile": { "type": "string" }, "addonTypesFile": { "type": "string" }, "nodeTypesFile": { "type": "string" }, "secretTypesFile": { "type": "string" }, "secretsFile": { "type": "string" }, "secretsMetaJsonFile": { "type": "string" }, "variableTypesFile": { "type": "string" }, "variablesFile": { "type": "string" }, "variablesMetaJsonFile": { "type": "string" }, "$schema": { "type": "string" }, "extends": { "type": "string" }, "rootDir": { "type": "string" }, "srcDirectories": { "type": "array", "items": { "type": "string" } }, "ignoreFiles": { "type": "array", "items": { "type": "string" } }, "packageMappings": { "type": "object", "additionalProperties": { "type": "string" } }, "addon": { "anyOf": [{ "type": "boolean" }, { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "string" } }, "icon": { "type": "string" }, "displayName": { "type": "string" }, "description": { "type": "string" }, "openapi": { "type": "object", "properties": { "version": { "type": "string" }, "hash": { "type": "string" } }, "required": ["version", "hash"], "additionalProperties": false } }, "additionalProperties": false }] }, "addonName": { "type": "string" }, "models": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "model": { "type": "string" }, "temperature": { "type": "number" }, "maxSteps": { "type": "number" } }, "required": ["model"], "additionalProperties": false }] } }, "agentDefaults": { "type": "object", "properties": { "temperature": { "type": "number" }, "maxSteps": { "type": "number" } }, "additionalProperties": false }, "agentOverrides": { "type": "object", "additionalProperties": { "type": "object", "properties": { "model": { "type": "string" }, "temperature": { "type": "number" }, "maxSteps": { "type": "number" } }, "additionalProperties": false } }, "configFile": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "userSessionType": { "type": "string" }, "singletonServicesFactoryType": { "type": "string" }, "wireServicesFactoryType": { "type": "string" }, "configDir": { "type": "string" }, "tsconfig": { "type": "string" }, "clientFiles": { "type": "object", "properties": { "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" } }, "additionalProperties": false }, "openAPI": { "type": "object", "properties": { "outputFile": { "type": "string" }, "additionalInfo": { "$ref": "#/definitions/OpenAPISpecInfo" } }, "required": ["outputFile", "additionalInfo"], "additionalProperties": false }, "schema": { "type": "object", "properties": { "additionalProperties": { "type": "boolean" }, "supportsImportAttributes": { "type": "boolean" } }, "additionalProperties": false }, "cli": { "type": "object", "properties": { "entrypoints": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }, { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }] } }] } } }, "additionalProperties": false }, "workflows": { "type": "object", "properties": { "orchestratorQueue": { "type": "string" }, "workerQueue": { "type": "string" } }, "additionalProperties": false }, "scaffold": { "type": "object", "properties": { "addonDir": { "type": "string" }, "functionDir": { "type": "string" }, "wiringDir": { "type": "string" }, "middlewareDir": { "type": "string" }, "permissionDir": { "type": "string" }, "pikkuDir": { "type": "string" }, "rpc": { "$ref": "#/definitions/PikkuScaffoldFeature" }, "console": { "$ref": "#/definitions/PikkuScaffoldFeature" }, "agent": { "$ref": "#/definitions/PikkuScaffoldFeature" }, "workflow": { "$ref": "#/definitions/PikkuScaffoldFeature" } }, "additionalProperties": false }, "forceRequiredServices": { "type": "array", "items": { "type": "string" } }, "schemasFromTypes": { "type": "array", "items": { "type": "string" } }, "stateOutput": { "type": "string" }, "stateInput": { "type": "string" }, "verboseMeta": { "type": "boolean" }, "lint": { "type": "object", "properties": { "servicesNotDestructured": { "type": "string", "enum": ["off", "warn", "error"] }, "wiresNotDestructured": { "type": "string", "enum": ["off", "warn", "error"] } }, "additionalProperties": false }, "addonMetaJsonFile": { "type": "string" }, "globalHTTPPrefix": { "type": "string" }, "filters": { "$ref": "#/definitions/InspectorFilters" } }, "required": ["addonTypesFile", "agentMapDeclarationFile", "agentTypesFile", "agentWiringMetaFile", "agentWiringMetaJsonFile", "agentWiringsFile", "bootstrapFile", "channelsMapDeclarationFile", "channelsTypesFile", "channelsWiringFile", "channelsWiringMetaFile", "channelsWiringMetaJsonFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringMetaJsonFile", "cliWiringsFile", "configDir", "consoleFunctionsFile", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaJsonFile", "gatewaysWiringFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringMetaJsonFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "mcpWiringsMetaJsonFile", "middlewareFile", "middlewareGroupsMetaJsonFile", "nodeTypesFile", "outDir", "packageFile", "packageMappings", "permissionsFile", "permissionsGroupsMetaJsonFile", "publicAgentFile", "publicRpcFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "queueWorkersWiringMetaJsonFile", "remoteRpcWorkersFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcInternalWiringMetaJsonFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schedulersWiringMetaJsonFile", "schemaDirectory", "secretTypesFile", "secretsFile", "secretsMetaJsonFile", "servicesFile", "srcDirectories", "triggerSourcesMetaFile", "triggerSourcesMetaJsonFile", "triggersTypesFile", "triggersWiringFile", "triggersWiringMetaFile", "triggersWiringMetaJsonFile", "tsconfig", "typesDeclarationFile", "variableTypesFile", "variablesFile", "variablesMetaJsonFile", "workflowMapDeclarationFile", "workflowMetaDir", "workflowTypesFile", "workflowWorkersFile", "workflowsWiringFile", "workflowsWiringMetaFile", "workflowsWorkersFile"], "definitions": { "OpenAPISpecInfo": { "type": "object", "properties": { "info": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "termsOfService": { "type": "string" }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string" } }, "additionalProperties": false }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["title", "version", "description"], "additionalProperties": false }, "servers": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "description": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "externalDocs": { "type": "object", "properties": { "description": { "type": "string" }, "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "securitySchemes": { "type": "object" }, "security": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": {} } } } }, "required": ["info", "servers"], "additionalProperties": false }, "PikkuScaffoldFeature": { "type": ["string", "boolean"], "enum": ["auth", "no-auth", false] }, "InspectorFilters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "directories": { "type": "array", "items": { "type": "string" } }, "httpRoutes": { "type": "array", "items": { "type": "string" } }, "httpMethods": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.7
|
|
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.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.7
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { template } from '@pikku/core/workflow';
|
|
@@ -7,16 +7,45 @@ import { type PikkuWorkflowGraphConfig, type PikkuWorkflowGraphResult } from '@p
|
|
|
7
7
|
import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow';
|
|
8
8
|
export { WorkflowCancelledException };
|
|
9
9
|
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
10
|
-
import type {
|
|
10
|
+
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
11
11
|
import type { WorkflowMap, GraphsMap } from './pikku-workflow-map.gen.d.js';
|
|
12
12
|
export { template };
|
|
13
13
|
export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
14
|
-
do<K extends keyof
|
|
14
|
+
do<K extends keyof FlattenedRPCMap>(stepName: string, rpcName: K, data: FlattenedRPCMap[K]['input'], options?: WorkflowStepOptions): Promise<FlattenedRPCMap[K]['output']>;
|
|
15
|
+
do<K extends keyof WorkflowMap>(stepName: string, workflowName: K, data: WorkflowMap[K]['input'], options?: WorkflowStepOptions): Promise<WorkflowMap[K]['output']>;
|
|
15
16
|
do<T>(stepName: string, fn: () => T | Promise<T>, options?: WorkflowStepOptions): Promise<T>;
|
|
16
17
|
}
|
|
18
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
19
|
+
import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js';
|
|
20
|
+
import { PikkuError } from '@pikku/core/errors';
|
|
21
|
+
import type { CorePermissionGroup } from '@pikku/core';
|
|
17
22
|
export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
|
|
18
|
-
export
|
|
19
|
-
|
|
23
|
+
export type PikkuWorkflowConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = {
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
tags?: string[];
|
|
27
|
+
expose?: boolean;
|
|
28
|
+
internal?: boolean;
|
|
29
|
+
override?: string;
|
|
30
|
+
version?: number;
|
|
31
|
+
remote?: boolean;
|
|
32
|
+
mcp?: boolean;
|
|
33
|
+
readonly?: boolean;
|
|
34
|
+
approvalRequired?: boolean;
|
|
35
|
+
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never;
|
|
36
|
+
func: PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>;
|
|
37
|
+
auth?: boolean;
|
|
38
|
+
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined;
|
|
39
|
+
middleware?: PikkuMiddleware[];
|
|
40
|
+
input?: InputSchema;
|
|
41
|
+
output?: OutputSchema;
|
|
42
|
+
node?: NodeConfig;
|
|
43
|
+
errors?: Array<typeof PikkuError>;
|
|
44
|
+
};
|
|
45
|
+
export declare function pikkuWorkflowFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>;
|
|
46
|
+
export declare function pikkuWorkflowFunc<In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>): PikkuFunctionConfig<In, Out, 'workflow'>;
|
|
47
|
+
export declare function pikkuWorkflowComplexFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>;
|
|
48
|
+
export declare function pikkuWorkflowComplexFunc<In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>): PikkuFunctionConfig<In, Out, 'workflow'>;
|
|
20
49
|
type TypedRef<T> = {
|
|
21
50
|
$ref: string;
|
|
22
51
|
path?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.7
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { workflow as coreWorkflow, workflowStart as coreWorkflowStart, workflowStatus as coreWorkflowStatus, graphStart as coreGraphStart, } from '@pikku/core/workflow';
|
|
@@ -7,12 +7,12 @@ import { template } from '@pikku/core/workflow';
|
|
|
7
7
|
import { pikkuWorkflowGraph as corePikkuWorkflowGraph, } from '@pikku/core/workflow';
|
|
8
8
|
export { WorkflowCancelledException };
|
|
9
9
|
export { template };
|
|
10
|
-
export
|
|
10
|
+
export function pikkuWorkflowFunc(func) {
|
|
11
11
|
return typeof func === 'function' ? { func } : func;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
12
|
+
}
|
|
13
|
+
export function pikkuWorkflowComplexFunc(func) {
|
|
14
14
|
return typeof func === 'function' ? { func } : func;
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
16
|
export function pikkuWorkflowGraph(config) {
|
|
17
17
|
return corePikkuWorkflowGraph(config);
|
|
18
18
|
}
|
package/dist/src/cli.wiring.js
CHANGED
|
@@ -289,7 +289,7 @@ wireCLI({
|
|
|
289
289
|
subcommands: {
|
|
290
290
|
init: pikkuCLICommand({
|
|
291
291
|
func: pikkuVersionsInit,
|
|
292
|
-
description: 'Initialize the version manifest (versions.json)',
|
|
292
|
+
description: 'Initialize the version manifest (versions.pikku.json)',
|
|
293
293
|
options: {
|
|
294
294
|
force: {
|
|
295
295
|
description: 'Overwrite existing manifest',
|
|
@@ -21,6 +21,21 @@ export const all = pikkuVoidFunc({
|
|
|
21
21
|
func: async ({ logger, config, getInspectorState }, _data, { rpc }) => {
|
|
22
22
|
const allImports = [];
|
|
23
23
|
let typesDeclarationFileExists = true;
|
|
24
|
+
if (!existsSync(config.outDir)) {
|
|
25
|
+
logger.debug(`• .pikku directory not found, running bootstrap first...`);
|
|
26
|
+
await getInspectorState(false, false, true);
|
|
27
|
+
await rpc.invoke('pikkuFunctionTypes', null);
|
|
28
|
+
await rpc.invoke('pikkuFunctionTypesSplit', null);
|
|
29
|
+
await rpc.invoke('pikkuHTTPTypes', null);
|
|
30
|
+
await rpc.invoke('pikkuChannelTypes', null);
|
|
31
|
+
await rpc.invoke('pikkuSchedulerTypes', null);
|
|
32
|
+
await rpc.invoke('pikkuQueueTypes', null);
|
|
33
|
+
await rpc.invoke('pikkuWorkflow', null);
|
|
34
|
+
await rpc.invoke('pikkuMCPTypes', null);
|
|
35
|
+
await rpc.invoke('pikkuAIAgentTypes', null);
|
|
36
|
+
await rpc.invoke('pikkuCLITypes', null);
|
|
37
|
+
await getInspectorState(true);
|
|
38
|
+
}
|
|
24
39
|
if (!existsSync(config.typesDeclarationFile)) {
|
|
25
40
|
typesDeclarationFileExists = false;
|
|
26
41
|
}
|
|
@@ -163,7 +178,7 @@ export const all = pikkuVoidFunc({
|
|
|
163
178
|
await rpc.invoke('pikkuVersionsUpdate', null);
|
|
164
179
|
}
|
|
165
180
|
catch {
|
|
166
|
-
logger.warn(`Run 'pikku init' to enable contract versioning.`);
|
|
181
|
+
logger.warn(`Run 'pikku versions init' to enable contract versioning.`);
|
|
167
182
|
}
|
|
168
183
|
await rpc.invoke('pikkuBootstrap', { allImports });
|
|
169
184
|
await rpc.invoke('pikkuSummary', null);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { mkdir, writeFile } from 'fs/promises';
|
|
4
|
+
import { createEmptyManifest, saveManifest, } from '../../utils/contract-versions.js';
|
|
4
5
|
import { pikkuSessionlessFunc } from '#pikku';
|
|
5
|
-
import { parseOpenAPISpec } from '
|
|
6
|
-
import { generateAddonFromOpenAPI } from '../../utils/openapi/codegen.js';
|
|
6
|
+
import { parseOpenAPISpec, computeContractHash, generateAddonFromOpenAPI, } from '@pikku/openapi-parser';
|
|
7
7
|
function toCamelCase(str) {
|
|
8
8
|
return str.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
9
9
|
}
|
|
@@ -31,14 +31,15 @@ function getAddonFiles(vars, flags) {
|
|
|
31
31
|
types: './dist/src/index.d.ts',
|
|
32
32
|
import: './dist/src/index.js',
|
|
33
33
|
},
|
|
34
|
-
'./.pikku/*': '
|
|
35
|
-
'./.pikku/pikku-metadata.gen.json': '
|
|
34
|
+
'./.pikku/*': './dist/.pikku/*',
|
|
35
|
+
'./.pikku/pikku-metadata.gen.json': './dist/.pikku/pikku-metadata.gen.json',
|
|
36
36
|
'./.pikku/rpc/pikku-rpc-wirings-map.internal.gen.js': {
|
|
37
|
-
types: '
|
|
37
|
+
types: './dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts',
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
|
-
files: ['dist'
|
|
40
|
+
files: ['dist'],
|
|
41
41
|
scripts: {
|
|
42
|
+
prepublishOnly: 'yarn build',
|
|
42
43
|
prebuild: 'pikku all',
|
|
43
44
|
build: 'tsc && cp -r .pikku dist/',
|
|
44
45
|
pikku: 'pikku all',
|
|
@@ -613,6 +614,16 @@ export const pikkuNewAddon = pikkuSessionlessFunc({
|
|
|
613
614
|
mcp,
|
|
614
615
|
});
|
|
615
616
|
Object.assign(addonFiles, openapiFiles);
|
|
617
|
+
// Inject openapi metadata into pikku.config.json
|
|
618
|
+
const config = JSON.parse(addonFiles['pikku.config.json']);
|
|
619
|
+
if (typeof config.addon === 'boolean' || !config.addon) {
|
|
620
|
+
config.addon = {};
|
|
621
|
+
}
|
|
622
|
+
config.addon.openapi = {
|
|
623
|
+
version: spec.info.version,
|
|
624
|
+
hash: computeContractHash(spec),
|
|
625
|
+
};
|
|
626
|
+
addonFiles['pikku.config.json'] = JSON.stringify(config, null, 2);
|
|
616
627
|
}
|
|
617
628
|
const written = await writeFiles(addonDir, addonFiles);
|
|
618
629
|
// Test harness
|
|
@@ -621,6 +632,9 @@ export const pikkuNewAddon = pikkuSessionlessFunc({
|
|
|
621
632
|
const testWritten = await writeFiles(join(addonDir, 'test'), testFiles);
|
|
622
633
|
written.push(...testWritten);
|
|
623
634
|
}
|
|
635
|
+
// Initialize version manifest
|
|
636
|
+
const manifestPath = join(addonDir, 'versions.pikku.json');
|
|
637
|
+
await saveManifest(manifestPath, createEmptyManifest());
|
|
624
638
|
logger.info(`Created addon at ${addonDir}`);
|
|
625
639
|
for (const f of written) {
|
|
626
640
|
logger.debug({ message: ` ${f}`, type: 'success' });
|
|
@@ -13,7 +13,7 @@ export const pikkuVersionsCheck = pikkuSessionlessFunc({
|
|
|
13
13
|
func: async ({ logger, config, getInspectorState }) => {
|
|
14
14
|
const visitState = await getInspectorState();
|
|
15
15
|
if (!visitState.manifest.initial) {
|
|
16
|
-
const manifestPath = join(config.
|
|
16
|
+
const manifestPath = join(config.rootDir, 'versions.pikku.json');
|
|
17
17
|
throw new Error(`[${ErrorCode.MANIFEST_MISSING}] Version manifest not found at ${manifestPath}. Run 'pikku versions init' to create one.`);
|
|
18
18
|
}
|
|
19
19
|
if (visitState.manifest.errors.length > 0) {
|
|
@@ -50,9 +50,9 @@ export const pikkuVersionsCheck = pikkuSessionlessFunc({
|
|
|
50
50
|
if (error.latestVersion !== undefined) {
|
|
51
51
|
logger.info(` Latest recorded version: ${error.latestVersion}`);
|
|
52
52
|
}
|
|
53
|
-
logger.info(` Version ${error.version} exists in code but not in versions.json`);
|
|
53
|
+
logger.info(` Version ${error.version} exists in code but not in versions.pikku.json`);
|
|
54
54
|
logger.info(``);
|
|
55
|
-
logger.info(` This usually means a merge conflict in versions.json.`);
|
|
55
|
+
logger.info(` This usually means a merge conflict in versions.pikku.json.`);
|
|
56
56
|
logger.info(` Resolve the conflict, then run:`);
|
|
57
57
|
logger.info(` npx pikku versions-update`);
|
|
58
58
|
}
|
|
@@ -76,7 +76,7 @@ export const pikkuVersionsCheck = pikkuSessionlessFunc({
|
|
|
76
76
|
}
|
|
77
77
|
else if (error.code === ErrorCode.MANIFEST_INTEGRITY_ERROR &&
|
|
78
78
|
error.functionKey) {
|
|
79
|
-
logger.info(`✗ ${error.functionKey} — versions.json integrity error`);
|
|
79
|
+
logger.info(`✗ ${error.functionKey} — versions.pikku.json integrity error`);
|
|
80
80
|
if (error.latestVersion !== undefined) {
|
|
81
81
|
logger.info(` "latest" field: ${error.latestVersion}`);
|
|
82
82
|
}
|
|
@@ -4,7 +4,7 @@ import { pikkuSessionlessFunc } from '#pikku';
|
|
|
4
4
|
import { createEmptyManifest, saveManifest, } from '../../utils/contract-versions.js';
|
|
5
5
|
export const pikkuVersionsInit = pikkuSessionlessFunc({
|
|
6
6
|
func: async ({ logger, config }, { force }) => {
|
|
7
|
-
const manifestPath = join(config.
|
|
7
|
+
const manifestPath = join(config.rootDir, 'versions.pikku.json');
|
|
8
8
|
if (existsSync(manifestPath) && !force) {
|
|
9
9
|
logger.error(`Version manifest already exists at ${manifestPath}. Use --force to overwrite.`);
|
|
10
10
|
process.exit(1);
|
|
@@ -4,7 +4,7 @@ import { ErrorCode } from '@pikku/inspector';
|
|
|
4
4
|
import { saveManifest } from '../../utils/contract-versions.js';
|
|
5
5
|
export const pikkuVersionsUpdate = pikkuSessionlessFunc({
|
|
6
6
|
func: async ({ logger, config, getInspectorState }) => {
|
|
7
|
-
const manifestPath = join(config.
|
|
7
|
+
const manifestPath = join(config.rootDir, 'versions.pikku.json');
|
|
8
8
|
const visitState = await getInspectorState();
|
|
9
9
|
if (!visitState.manifest.initial) {
|
|
10
10
|
throw new Error(`Version manifest not found at ${manifestPath}. Run 'pikku versions init' to create one.`);
|
|
@@ -43,14 +43,14 @@ export const pikkuNext = pikkuSessionlessFunc({
|
|
|
43
43
|
const bootstrapPath = getFileImportRelativePath(nextBackendFile, config.bootstrapFile, packageMappings);
|
|
44
44
|
const routesMapDeclarationPath = getFileImportRelativePath(nextBackendFile, httpMapDeclarationFile, packageMappings);
|
|
45
45
|
const rpcMapDeclarationPath = getFileImportRelativePath(nextBackendFile, rpcMapDeclarationFile, packageMappings);
|
|
46
|
-
const content = serializeNextBackendWrapper(bootstrapPath, routesMapDeclarationPath, rpcMapDeclarationPath, pikkuConfigImport, singletonServicesImport, wireServicesImport);
|
|
46
|
+
const content = serializeNextBackendWrapper(bootstrapPath, routesMapDeclarationPath, rpcMapDeclarationPath, pikkuConfigImport, singletonServicesImport, wireServicesImport, config.globalHTTPPrefix || '');
|
|
47
47
|
await writeFileInDir(logger, nextBackendFile, content);
|
|
48
48
|
}
|
|
49
49
|
if (nextHTTPFile && fetchFile) {
|
|
50
50
|
const routesMapDeclarationPath = getFileImportRelativePath(nextHTTPFile, httpMapDeclarationFile, packageMappings);
|
|
51
51
|
const rpcMapDeclarationPath = getFileImportRelativePath(nextHTTPFile, rpcMapDeclarationFile, packageMappings);
|
|
52
52
|
const fetchPath = getFileImportRelativePath(nextHTTPFile, fetchFile, packageMappings);
|
|
53
|
-
const content = serializeNextHTTPWrapper(routesMapDeclarationPath, rpcMapDeclarationPath, fetchPath);
|
|
53
|
+
const content = serializeNextHTTPWrapper(routesMapDeclarationPath, rpcMapDeclarationPath, fetchPath, config.globalHTTPPrefix || '');
|
|
54
54
|
await writeFileInDir(logger, nextHTTPFile, content);
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const serializeNextJsBackendWrapper: (bootstrapPath: string, routesMapPath: string, rpcMapPath: string, configImport: string, singleServicesFactoryImport: string, wireServicesImport: string | undefined) => string;
|
|
1
|
+
export declare const serializeNextJsBackendWrapper: (bootstrapPath: string, routesMapPath: string, rpcMapPath: string, configImport: string, singleServicesFactoryImport: string, wireServicesImport: string | undefined, globalHTTPPrefix?: string) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const serializeNextJsBackendWrapper = (bootstrapPath, routesMapPath, rpcMapPath, configImport, singleServicesFactoryImport, wireServicesImport) => {
|
|
1
|
+
export const serializeNextJsBackendWrapper = (bootstrapPath, routesMapPath, rpcMapPath, configImport, singleServicesFactoryImport, wireServicesImport, globalHTTPPrefix = '') => {
|
|
2
2
|
return `'server-only'
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -194,7 +194,7 @@ export const pikku = (_options?: any) => {
|
|
|
194
194
|
rpcName: Name,
|
|
195
195
|
data: FlattenedRPCMap[Name]['input']
|
|
196
196
|
): Promise<FlattenedRPCMap[Name]['output']> => {
|
|
197
|
-
return dynamicActionRequest('/rpc/:rpcName' as '/rpc/:rpcName', 'POST', { rpcName, data: data ?? null }) as unknown as FlattenedRPCMap[Name]['output']
|
|
197
|
+
return dynamicActionRequest('${globalHTTPPrefix}/rpc/:rpcName' as '${globalHTTPPrefix}/rpc/:rpcName', 'POST', { rpcName, data: data ?? null }) as unknown as FlattenedRPCMap[Name]['output']
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|