@pikku/cli 0.12.1 → 0.12.2

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 (98) hide show
  1. package/cli.schema.json +1 -1
  2. package/console-app/assets/{index-DiYPTQU_.js → index-DRJQtv3c.js} +1 -1
  3. package/console-app/index.html +1 -1
  4. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  5. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +1 -1
  6. package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +1 -1
  7. package/dist/.pikku/agent/pikku-agent-wirings.gen.js +1 -1
  8. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  9. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  10. package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
  11. package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
  12. package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
  13. package/dist/.pikku/cli/pikku-cli-channel.js +21 -1
  14. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  15. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  16. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  17. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  18. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  19. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +52 -0
  20. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  21. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  22. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  23. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  24. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  25. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  26. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  27. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  28. package/dist/.pikku/function/pikku-functions-meta.gen.json +202 -123
  29. package/dist/.pikku/function/pikku-functions.gen.js +3 -1
  30. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  31. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  32. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  33. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  34. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  35. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  36. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  37. package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
  38. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
  39. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
  40. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  41. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  42. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  43. package/dist/.pikku/pikku-types.gen.js +1 -1
  44. package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
  45. package/dist/.pikku/pikku-websocket.gen.js +1 -1
  46. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  47. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  48. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  49. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  50. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  51. package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +1 -1
  52. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  53. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +10 -5
  54. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  55. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  56. package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
  57. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
  58. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
  59. package/dist/.pikku/schemas/register.gen.js +9 -7
  60. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  61. package/dist/.pikku/schemas/schemas/PikkuGatewayOutput.schema.json +1 -0
  62. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  63. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  64. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  65. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  66. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  67. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  68. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  69. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  70. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  71. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  72. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  73. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  74. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  75. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  76. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  77. package/dist/src/cli.wiring.js +46 -0
  78. package/dist/src/functions/commands/all.js +7 -2
  79. package/dist/src/functions/commands/enable.d.ts +4 -0
  80. package/dist/src/functions/commands/enable.js +39 -0
  81. package/dist/src/functions/runtimes/fetch/index.js +2 -1
  82. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +4 -1
  83. package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.js +2 -1
  84. package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +3 -5
  85. package/dist/src/functions/wirings/console/pikku-command-console-functions.js +4 -6
  86. package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +1 -1
  87. package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -0
  88. package/dist/src/functions/wirings/gateway/pikku-command-gateway.js +22 -0
  89. package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.js +1 -1
  90. package/dist/src/functions/wirings/queue/pikku-command-queue-service.js +2 -1
  91. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +3 -5
  92. package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +3 -5
  93. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +2 -1
  94. package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +3 -10
  95. package/dist/src/services.js +12 -0
  96. package/dist/src/utils/pikku-cli-config.js +43 -16
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/package.json +4 -4
@@ -23,6 +23,10 @@
23
23
  "pikkuNewMiddleware": "pikkuNewMiddleware",
24
24
  "pikkuNewPermission": "pikkuNewPermission",
25
25
  "pikkuNewAddon": "pikkuNewAddon",
26
+ "enableRpc": "enableRpc",
27
+ "enableConsole": "enableConsole",
28
+ "enableAgent": "enableAgent",
29
+ "enableWorkflow": "enableWorkflow",
26
30
  "pikkuSummary": "pikkuSummary",
27
31
  "pikkuAIAgentTypes": "pikkuAIAgentTypes",
28
32
  "pikkuAIAgent": "pikkuAIAgent",
@@ -36,17 +40,18 @@
36
40
  "pikkuConsoleFunctions": "pikkuConsoleFunctions",
37
41
  "pikkuNodeTypes": "pikkuNodeTypes",
38
42
  "pikkuNodesMeta": "pikkuNodesMeta",
43
+ "pikkuAddonTypes": "pikkuAddonTypes",
44
+ "pikkuFunctionTypesSplit": "pikkuFunctionTypesSplit",
45
+ "pikkuFunctionTypes": "pikkuFunctionTypes",
46
+ "pikkuFunctions": "pikkuFunctions",
47
+ "pikkuServices": "pikkuServices",
48
+ "pikkuGateway": "pikkuGateway",
39
49
  "pikkuHTTPMap": "pikkuHTTPMap",
40
50
  "pikkuHTTP": "pikkuHTTP",
41
51
  "pikkuHTTPTypes": "pikkuHTTPTypes",
42
52
  "pikkuMCPJSON": "pikkuMCPJSON",
43
53
  "pikkuMCPTypes": "pikkuMCPTypes",
44
54
  "pikkuMCP": "pikkuMCP",
45
- "pikkuAddonTypes": "pikkuAddonTypes",
46
- "pikkuFunctionTypesSplit": "pikkuFunctionTypesSplit",
47
- "pikkuFunctionTypes": "pikkuFunctionTypes",
48
- "pikkuFunctions": "pikkuFunctions",
49
- "pikkuServices": "pikkuServices",
50
55
  "pikkuMiddleware": "pikkuMiddleware",
51
56
  "pikkuSecretDefinitionTypes": "pikkuSecretDefinitionTypes",
52
57
  "pikkuVariableDefinitionTypes": "pikkuVariableDefinitionTypes",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-schedulers-wirings-meta.gen.json' with { type: 'json' };
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.1
3
+ * This file was generated by @pikku/cli@0.12.2
4
4
  */
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.1
3
+ * This file was generated by @pikku/cli@0.12.2
4
4
  */
5
5
  /* The files with an addScheduledTasks function call */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema';
5
5
  import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
@@ -20,6 +20,10 @@ import * as PikkuNewPermissionInput from './schemas/PikkuNewPermissionInput.sche
20
20
  addSchema('PikkuNewPermissionInput', PikkuNewPermissionInput);
21
21
  import * as PikkuNewAddonInput from './schemas/PikkuNewAddonInput.schema.json' with { type: 'json' };
22
22
  addSchema('PikkuNewAddonInput', PikkuNewAddonInput);
23
+ import * as PikkuAIAgentOutput from './schemas/PikkuAIAgentOutput.schema.json' with { type: 'json' };
24
+ addSchema('PikkuAIAgentOutput', PikkuAIAgentOutput);
25
+ import * as PikkuPublicAgentOutput from './schemas/PikkuPublicAgentOutput.schema.json' with { type: 'json' };
26
+ addSchema('PikkuPublicAgentOutput', PikkuPublicAgentOutput);
23
27
  import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
24
28
  addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
25
29
  import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
@@ -28,10 +32,12 @@ import * as PikkuConsoleFunctionsOutput from './schemas/PikkuConsoleFunctionsOut
28
32
  addSchema('PikkuConsoleFunctionsOutput', PikkuConsoleFunctionsOutput);
29
33
  import * as PikkuNodesMetaOutput from './schemas/PikkuNodesMetaOutput.schema.json' with { type: 'json' };
30
34
  addSchema('PikkuNodesMetaOutput', PikkuNodesMetaOutput);
31
- import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
32
- addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
35
+ import * as PikkuGatewayOutput from './schemas/PikkuGatewayOutput.schema.json' with { type: 'json' };
36
+ addSchema('PikkuGatewayOutput', PikkuGatewayOutput);
33
37
  import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
34
38
  addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
39
+ import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
40
+ addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
35
41
  import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
36
42
  addSchema('PikkuMCPOutput', PikkuMCPOutput);
37
43
  import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
@@ -54,9 +60,5 @@ import * as PikkuTriggerOutput from './schemas/PikkuTriggerOutput.schema.json' w
54
60
  addSchema('PikkuTriggerOutput', PikkuTriggerOutput);
55
61
  import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json' with { type: 'json' };
56
62
  addSchema('PikkuWorkflowOutput', PikkuWorkflowOutput);
57
- import * as PikkuAIAgentOutput from './schemas/PikkuAIAgentOutput.schema.json' with { type: 'json' };
58
- addSchema('PikkuAIAgentOutput', PikkuAIAgentOutput);
59
- import * as PikkuPublicAgentOutput from './schemas/PikkuPublicAgentOutput.schema.json' with { type: 'json' };
60
- addSchema('PikkuPublicAgentOutput', PikkuPublicAgentOutput);
61
63
  import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
62
64
  addSchema('PikkuCLIConfig', PikkuCLIConfig);
@@ -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" }, "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" }, "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": { "type": "boolean" }, "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" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" }, "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "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": { "anyOf": [{ "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": true }, "path": { "type": "string" }, "orchestratorQueue": { "type": "string" }, "workerQueue": { "type": "string" } }, "required": ["singleQueue", "path"], "additionalProperties": false }, { "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": false }, "dir": { "type": "string" }, "orchestratorQueuePrefix": { "type": "string" }, "workerQueuePrefix": { "type": "string" } }, "required": ["singleQueue", "dir"], "additionalProperties": false }] }, "rpc": { "type": "object", "properties": { "remoteRpcWorkersPath": { "type": "string" }, "publicRpcPath": { "type": "string" }, "publicRpcRequireAuth": { "type": "boolean" } }, "additionalProperties": false }, "agent": { "type": "object", "properties": { "publicAgentPath": { "type": "string" }, "publicAgentRequireAuth": { "type": "boolean" } }, "additionalProperties": false }, "console": { "type": "object", "properties": { "functionsPath": { "type": "string" } }, "additionalProperties": false }, "scaffold": { "type": "object", "properties": { "addonDir": { "type": "string" }, "functionDir": { "type": "string" }, "wiringDir": { "type": "string" }, "middlewareDir": { "type": "string" }, "permissionDir": { "type": "string" } }, "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 }, "node": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "string" } }, "icon": { "type": "string" }, "displayName": { "type": "string" }, "description": { "type": "string" } }, "additionalProperties": false }, "nodesMetaJsonFile": { "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", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaJsonFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringMetaJsonFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "mcpWiringsMetaJsonFile", "middlewareFile", "middlewareGroupsMetaJsonFile", "nodeTypesFile", "outDir", "packageFile", "packageMappings", "permissionsFile", "permissionsGroupsMetaJsonFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "queueWorkersWiringMetaJsonFile", "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", "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 }, "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": { "type": "boolean" }, "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 }, "node": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "string" } }, "icon": { "type": "string" }, "displayName": { "type": "string" }, "description": { "type": "string" } }, "additionalProperties": false }, "nodesMetaJsonFile": { "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 } } }
@@ -0,0 +1 @@
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret';
5
5
  export type { CoreSecret, SecretDefinitionMeta, SecretDefinitionsMeta } from '@pikku/core/secret';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable';
5
5
  export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
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.1
2
+ * This file was generated by @pikku/cli@0.12.2
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';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  const workflowsMeta = {};
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.1
3
+ * This file was generated by @pikku/cli@0.12.2
4
4
  */
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.1
3
+ * This file was generated by @pikku/cli@0.12.2
4
4
  */
@@ -19,6 +19,7 @@ import { pikkuNewMiddleware } from './functions/commands/new-middleware.js';
19
19
  import { pikkuNewPermission } from './functions/commands/new-permission.js';
20
20
  import { pikkuNewAddon } from './functions/commands/new-addon.js';
21
21
  import { pikkuInfoFunctions, pikkuInfoTags, pikkuInfoMiddleware, pikkuInfoPermissions, } from './functions/commands/info.js';
22
+ import { enableRpc, enableConsole, enableAgent, enableWorkflow, } from './functions/commands/enable.js';
22
23
  // import { clientCLIRenderer } from './services.js'
23
24
  wireCLI({
24
25
  program: 'pikku',
@@ -126,6 +127,51 @@ wireCLI({
126
127
  func: pikkuNext,
127
128
  description: 'Generate Next.js backend and HTTP wrappers',
128
129
  }),
130
+ enable: {
131
+ description: 'Enable Pikku features',
132
+ subcommands: {
133
+ rpc: pikkuCLICommand({
134
+ func: enableRpc,
135
+ description: 'Enable public RPC endpoint',
136
+ options: {
137
+ 'no-auth': {
138
+ description: 'Disable auth requirement',
139
+ default: false,
140
+ },
141
+ },
142
+ }),
143
+ console: pikkuCLICommand({
144
+ func: enableConsole,
145
+ description: 'Enable console functions',
146
+ options: {
147
+ 'no-auth': {
148
+ description: 'Disable auth requirement',
149
+ default: false,
150
+ },
151
+ },
152
+ }),
153
+ agent: pikkuCLICommand({
154
+ func: enableAgent,
155
+ description: 'Enable public agent endpoints',
156
+ options: {
157
+ 'no-auth': {
158
+ description: 'Disable auth requirement',
159
+ default: false,
160
+ },
161
+ },
162
+ }),
163
+ workflow: pikkuCLICommand({
164
+ func: enableWorkflow,
165
+ description: 'Enable workflow workers',
166
+ options: {
167
+ 'no-auth': {
168
+ description: 'Disable auth requirement',
169
+ default: false,
170
+ },
171
+ },
172
+ }),
173
+ },
174
+ },
129
175
  new: {
130
176
  description: 'Scaffold new functions and wirings',
131
177
  subcommands: {
@@ -41,7 +41,7 @@ export const all = pikkuVoidFunc({
41
41
  const agents = await rpc.invoke('pikkuAIAgent', null);
42
42
  if (agents) {
43
43
  allImports.push(config.agentWiringMetaFile, config.agentWiringsFile);
44
- if (config.agent?.publicAgentPath) {
44
+ if (config.scaffold?.agent) {
45
45
  await rpc.invoke('pikkuPublicAgent', null);
46
46
  }
47
47
  }
@@ -112,6 +112,10 @@ export const all = pikkuVoidFunc({
112
112
  await rpc.invoke('pikkuWebSocketTyped', null);
113
113
  allImports.push(config.channelsWiringMetaFile, config.channelsWiringFile);
114
114
  }
115
+ const gateways = await rpc.invoke('pikkuGateway', null);
116
+ if (gateways) {
117
+ allImports.push(config.gatewaysWiringFile);
118
+ }
115
119
  const mcp = await rpc.invoke('pikkuMCP', null);
116
120
  if (mcp) {
117
121
  await rpc.invoke('pikkuMCPJSON', null);
@@ -124,7 +128,8 @@ export const all = pikkuVoidFunc({
124
128
  }
125
129
  }
126
130
  await rpc.invoke('pikkuNodesMeta', null);
127
- if (config.nextBackendFile || config.nextHTTPFile) {
131
+ if (config.clientFiles?.nextBackendFile ||
132
+ config.clientFiles?.nextHTTPFile) {
128
133
  await rpc.invoke('pikkuNext', null);
129
134
  }
130
135
  if (config.openAPI) {
@@ -0,0 +1,4 @@
1
+ export declare const enableRpc: import("#pikku").PikkuFunctionConfig<void, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
2
+ export declare const enableConsole: import("#pikku").PikkuFunctionConfig<void, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
3
+ export declare const enableAgent: import("#pikku").PikkuFunctionConfig<void, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
4
+ export declare const enableWorkflow: import("#pikku").PikkuFunctionConfig<void, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
@@ -0,0 +1,39 @@
1
+ import { readFile, writeFile } from 'fs/promises';
2
+ import { join } from 'path';
3
+ import { pikkuVoidFunc } from '#pikku';
4
+ const FEATURE_DEFAULTS = {
5
+ rpc: 'auth',
6
+ agent: 'auth',
7
+ console: 'no-auth',
8
+ workflow: 'auth',
9
+ };
10
+ async function enableFeature(feature, logger, config, data) {
11
+ const noAuth = data?.['no-auth'] ?? false;
12
+ const configPath = join(config.configDir, 'pikku.config.json');
13
+ const raw = await readFile(configPath, 'utf-8');
14
+ const json = JSON.parse(raw);
15
+ if (!json.scaffold) {
16
+ json.scaffold = {};
17
+ }
18
+ if (!json.scaffold.pikkuDir) {
19
+ json.scaffold.pikkuDir = 'pikku';
20
+ }
21
+ const value = noAuth
22
+ ? 'no-auth'
23
+ : FEATURE_DEFAULTS[feature];
24
+ json.scaffold[feature] = value;
25
+ await writeFile(configPath, JSON.stringify(json, null, 2) + '\n', 'utf-8');
26
+ logger.info(`Enabled scaffold.${feature} = '${value}' in ${configPath}`);
27
+ }
28
+ export const enableRpc = pikkuVoidFunc({
29
+ func: async ({ logger, config }, data) => enableFeature('rpc', logger, config, data),
30
+ });
31
+ export const enableConsole = pikkuVoidFunc({
32
+ func: async ({ logger, config }, data) => enableFeature('console', logger, config, data),
33
+ });
34
+ export const enableAgent = pikkuVoidFunc({
35
+ func: async ({ logger, config }, data) => enableFeature('agent', logger, config, data),
36
+ });
37
+ export const enableWorkflow = pikkuVoidFunc({
38
+ func: async ({ logger, config }, data) => enableFeature('workflow', logger, config, data),
39
+ });
@@ -5,7 +5,8 @@ import { writeFileInDir } from '../../../utils/file-writer.js';
5
5
  import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
6
6
  export const pikkuFetch = pikkuSessionlessFunc({
7
7
  func: async ({ logger, config }) => {
8
- const { fetchFile, httpMapDeclarationFile, packageMappings } = config;
8
+ const fetchFile = config.clientFiles?.fetchFile;
9
+ const { httpMapDeclarationFile, packageMappings } = config;
9
10
  // If fetchFile is not set, clean up any existing file and return
10
11
  if (!fetchFile) {
11
12
  logger.debug({
@@ -7,7 +7,10 @@ import { serializeNextJsBackendWrapper as serializeNextBackendWrapper } from './
7
7
  import { serializeNextJsHTTPWrapper as serializeNextHTTPWrapper } from './serialize-nextjs-http-wrapper.js';
8
8
  export const pikkuNext = pikkuSessionlessFunc({
9
9
  func: async ({ logger, config, getInspectorState }) => {
10
- const { nextBackendFile, nextHTTPFile, httpMapDeclarationFile, rpcMapDeclarationFile, packageMappings, fetchFile, } = config;
10
+ const nextBackendFile = config.clientFiles?.nextBackendFile;
11
+ const nextHTTPFile = config.clientFiles?.nextHTTPFile;
12
+ const fetchFile = config.clientFiles?.fetchFile;
13
+ const { httpMapDeclarationFile, rpcMapDeclarationFile, packageMappings } = config;
11
14
  // If both files are undefined, clean up any existing files and return
12
15
  if (!nextBackendFile && !nextHTTPFile) {
13
16
  logger.debug({
@@ -5,7 +5,8 @@ import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-
5
5
  import { serializeWebsocketWrapper } from './serialize-websocket-wrapper.js';
6
6
  export const pikkuWebSocketTyped = pikkuSessionlessFunc({
7
7
  func: async ({ logger, config }) => {
8
- const { websocketFile, channelsMapDeclarationFile, packageMappings } = config;
8
+ const websocketFile = config.clientFiles?.websocketFile;
9
+ const { channelsMapDeclarationFile, packageMappings } = config;
9
10
  // If websocketFile is not set, clean up any existing file and return
10
11
  if (!websocketFile) {
11
12
  logger.debug({
@@ -3,13 +3,11 @@ import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
3
3
  import { writeFileInDir } from '../../../utils/file-writer.js';
4
4
  import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
5
5
  import { serializePublicAgent } from './serialize-public-agent.js';
6
- import { join } from 'path';
7
6
  export const pikkuPublicAgent = pikkuSessionlessFunc({
8
7
  func: async ({ logger, config }) => {
9
- if (config.agent?.publicAgentPath) {
10
- const publicAgentPath = join(config.rootDir, config.agent.publicAgentPath);
11
- const pathToPikkuTypes = getFileImportRelativePath(publicAgentPath, config.typesDeclarationFile, config.packageMappings);
12
- await writeFileInDir(logger, publicAgentPath, serializePublicAgent(pathToPikkuTypes, config.agent.publicAgentRequireAuth ?? true));
8
+ if (config.scaffold?.agent) {
9
+ const pathToPikkuTypes = getFileImportRelativePath(config.publicAgentFile, config.typesDeclarationFile, config.packageMappings);
10
+ await writeFileInDir(logger, config.publicAgentFile, serializePublicAgent(pathToPikkuTypes, config.scaffold.agent === 'auth'));
13
11
  return true;
14
12
  }
15
13
  return false;
@@ -3,14 +3,12 @@ import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
3
3
  import { writeFileInDir } from '../../../utils/file-writer.js';
4
4
  import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
5
5
  import { serializeConsoleFunctions } from './serialize-console-functions.js';
6
- import { join } from 'path';
7
6
  export const pikkuConsoleFunctions = pikkuSessionlessFunc({
8
7
  func: async ({ logger, config }) => {
9
- if (config.console?.functionsPath) {
10
- const consoleFunctionsPath = join(config.rootDir, config.console.functionsPath);
11
- const pathToPikkuTypes = getFileImportRelativePath(consoleFunctionsPath, config.typesDeclarationFile, config.packageMappings);
12
- const pathToAgentTypes = getFileImportRelativePath(consoleFunctionsPath, config.agentTypesFile, config.packageMappings);
13
- await writeFileInDir(logger, consoleFunctionsPath, serializeConsoleFunctions(pathToPikkuTypes, pathToAgentTypes));
8
+ if (config.scaffold?.console) {
9
+ const pathToPikkuTypes = getFileImportRelativePath(config.consoleFunctionsFile, config.typesDeclarationFile, config.packageMappings);
10
+ const pathToAgentTypes = getFileImportRelativePath(config.consoleFunctionsFile, config.agentTypesFile, config.packageMappings);
11
+ await writeFileInDir(logger, config.consoleFunctionsFile, serializeConsoleFunctions(pathToPikkuTypes, pathToAgentTypes));
14
12
  return true;
15
13
  }
16
14
  return false;
@@ -60,7 +60,7 @@ export const pikkuNodesMeta = pikkuSessionlessFunc({
60
60
  categories: node?.categories,
61
61
  },
62
62
  };
63
- if (nodesMetaJsonFile) {
63
+ if (nodesMetaJsonFile && config.scaffold?.console) {
64
64
  const minimalMeta = stripVerboseFields(metaData);
65
65
  await writeFileInDir(logger, nodesMetaJsonFile, JSON.stringify(minimalMeta, null, 2), { ignoreModifyComment: true });
66
66
  if (hasVerboseFields(metaData)) {
@@ -0,0 +1 @@
1
+ export declare const pikkuGateway: import("#pikku").PikkuFunctionConfig<void, boolean | undefined, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, boolean | undefined, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, boolean | undefined, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
@@ -0,0 +1,22 @@
1
+ import { pikkuSessionlessFunc } from '#pikku';
2
+ import { serializeFileImports } from '../../../utils/file-imports-serializer.js';
3
+ import { writeFileInDir } from '../../../utils/file-writer.js';
4
+ import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
5
+ export const pikkuGateway = pikkuSessionlessFunc({
6
+ func: async ({ logger, config, getInspectorState }) => {
7
+ const visitState = await getInspectorState();
8
+ const { gatewaysWiringFile, packageMappings } = config;
9
+ const { gateways } = visitState;
10
+ if (Object.keys(gateways.meta).length === 0) {
11
+ return undefined;
12
+ }
13
+ await writeFileInDir(logger, gatewaysWiringFile, serializeFileImports('wireGateway', gatewaysWiringFile, gateways.files, packageMappings));
14
+ return true;
15
+ },
16
+ middleware: [
17
+ logCommandInfoAndTime({
18
+ commandStart: 'Finding gateways',
19
+ commandEnd: 'Found gateways',
20
+ }),
21
+ ],
22
+ });
@@ -5,7 +5,7 @@ import { serializeMCPJson } from '@pikku/inspector';
5
5
  export const pikkuMCPJSON = pikkuSessionlessFunc({
6
6
  func: async ({ logger, config, getInspectorState }) => {
7
7
  const state = await getInspectorState();
8
- const { mcpJsonFile } = config;
8
+ const mcpJsonFile = config.clientFiles?.mcpJsonFile;
9
9
  if (mcpJsonFile) {
10
10
  const mcpJson = serializeMCPJson(logger, state);
11
11
  await writeFileInDir(logger, mcpJsonFile, mcpJson, {
@@ -5,7 +5,8 @@ import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-
5
5
  import { serializeQueueWrapper } from './serialize-queue-wrapper.js';
6
6
  export const pikkuQueueService = pikkuSessionlessFunc({
7
7
  func: async ({ logger, config }) => {
8
- const { queueWiringsFile, queueMapDeclarationFile, packageMappings } = config;
8
+ const queueWiringsFile = config.clientFiles?.queueWiringsFile;
9
+ const { queueMapDeclarationFile, packageMappings } = config;
9
10
  // If queueWiringsFile is not set, clean up any existing file and return
10
11
  if (!queueWiringsFile) {
11
12
  logger.debug({