@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.
Files changed (115) hide show
  1. package/cli.schema.json +1 -1
  2. package/console-app/assets/{index-AX4YS8AA.js → index-sUj3oFEL.js} +1 -1
  3. package/console-app/index.html +1 -1
  4. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
  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 +1 -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 +1 -1
  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 +195 -195
  29. package/dist/.pikku/function/pikku-functions.gen.js +1 -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 +2 -2
  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 -9
  60. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  61. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  62. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  63. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  64. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  65. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  66. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  67. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  68. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  69. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  70. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  71. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +34 -5
  72. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -5
  73. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  74. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  75. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  76. package/dist/src/cli.wiring.js +1 -1
  77. package/dist/src/functions/commands/all.js +16 -1
  78. package/dist/src/functions/commands/new-addon.js +20 -6
  79. package/dist/src/functions/commands/versions-check.js +4 -4
  80. package/dist/src/functions/commands/versions-init.js +1 -1
  81. package/dist/src/functions/commands/versions-update.js +1 -1
  82. package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +2 -2
  83. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts +1 -1
  84. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +2 -2
  85. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
  86. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +2 -2
  87. package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +1 -1
  88. package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +12 -6
  89. package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +1 -1
  90. package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +5 -5
  91. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +1 -1
  92. package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
  93. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
  94. package/dist/src/functions/wirings/console/pikku-command-console-functions.js +1 -1
  95. package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
  96. package/dist/src/functions/wirings/console/serialize-console-functions.js +2 -2
  97. package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +1 -1
  98. package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +1 -1
  99. package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
  100. package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +4 -4
  101. package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.d.ts +1 -1
  102. package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +6 -6
  103. package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +63 -8
  104. package/dist/src/services.js +1 -1
  105. package/dist/src/utils/pikku-cli-config.js +1 -0
  106. package/dist/tsconfig.tsbuildinfo +1 -1
  107. package/package.json +5 -4
  108. package/dist/src/utils/openapi/codegen.d.ts +0 -20
  109. package/dist/src/utils/openapi/codegen.js +0 -442
  110. package/dist/src/utils/openapi/naming.d.ts +0 -30
  111. package/dist/src/utils/openapi/naming.js +0 -167
  112. package/dist/src/utils/openapi/parse-openapi.d.ts +0 -61
  113. package/dist/src/utils/openapi/parse-openapi.js +0 -306
  114. package/dist/src/utils/openapi/zod-codegen.d.ts +0 -1
  115. package/dist/src/utils/openapi/zod-codegen.js +0 -1
@@ -1 +1 @@
1
- export declare const serializeNextJsHTTPWrapper: (routesMapPath: string, rpcMapPath: string, pikkuFetchImport: string) => string;
1
+ export declare const serializeNextJsHTTPWrapper: (routesMapPath: string, rpcMapPath: string, pikkuFetchImport: string, globalHTTPPrefix?: string) => string;
@@ -1,4 +1,4 @@
1
- export const serializeNextJsHTTPWrapper = (routesMapPath, rpcMapPath, pikkuFetchImport) => {
1
+ export const serializeNextJsHTTPWrapper = (routesMapPath, rpcMapPath, pikkuFetchImport, globalHTTPPrefix = '') => {
2
2
  return `'server-only'
3
3
 
4
4
  /**
@@ -173,7 +173,7 @@ export const pikku = (options?: CorePikkuFetchOptions) => {
173
173
  rpcName: Name,
174
174
  data: FlattenedRPCMap[Name]['input']
175
175
  ): Promise<FlattenedRPCMap[Name]['output']> => {
176
- return dynamicActionRequest('/rpc/:rpcName' as '/rpc/:rpcName', 'POST', { rpcName, data: data ?? null }) as unknown as FlattenedRPCMap[Name]['output']
176
+ return dynamicActionRequest('${globalHTTPPrefix}/rpc/:rpcName' as '${globalHTTPPrefix}/rpc/:rpcName', 'POST', { rpcName, data: data ?? null }) as unknown as FlattenedRPCMap[Name]['output']
177
177
  }
178
178
 
179
179
  /**
@@ -7,7 +7,7 @@ export const pikkuPublicAgent = pikkuSessionlessFunc({
7
7
  func: async ({ logger, config }) => {
8
8
  if (config.scaffold?.agent) {
9
9
  const pathToPikkuTypes = getFileImportRelativePath(config.publicAgentFile, config.typesDeclarationFile, config.packageMappings);
10
- await writeFileInDir(logger, config.publicAgentFile, serializePublicAgent(pathToPikkuTypes, config.scaffold.agent === 'auth'));
10
+ await writeFileInDir(logger, config.publicAgentFile, serializePublicAgent(pathToPikkuTypes, config.scaffold.agent === 'auth', config.globalHTTPPrefix || ''));
11
11
  return true;
12
12
  }
13
13
  return false;
@@ -14,16 +14,22 @@ import type { StandardSchemaV1 } from '@standard-schema/spec'
14
14
  import type { AIAgentMemoryConfig, AIAgentInput } from '@pikku/core/ai-agent'
15
15
  import type { AgentMap } from '${agentMapImportPath}'
16
16
 
17
- type AIAgentConfig = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools' | 'agents' | 'memory'> & {
18
- input?: StandardSchemaV1
19
- output?: StandardSchemaV1
17
+ type AIAgentConfig<
18
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
19
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
20
+ > = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools' | 'agents' | 'memory' | 'input' | 'output'> & {
21
+ input?: InputSchema
22
+ output?: OutputSchema
20
23
  memory?: Omit<AIAgentMemoryConfig, 'workingMemory'> & { workingMemory?: StandardSchemaV1 }
21
24
  tools?: object[]
22
- agents?: AIAgentConfig[]
25
+ agents?: AIAgentConfig<StandardSchemaV1 | undefined, StandardSchemaV1 | undefined>[]
23
26
  }
24
27
 
25
- export const pikkuAIAgent = (
26
- agent: AIAgentConfig
28
+ export const pikkuAIAgent = <
29
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
30
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
31
+ >(
32
+ agent: AIAgentConfig<InputSchema, OutputSchema>
27
33
  ) => {
28
34
  return agent
29
35
  }
@@ -1 +1 @@
1
- export declare const serializePublicAgent: (pathToPikkuTypes: string, requireAuth?: boolean) => string;
1
+ export declare const serializePublicAgent: (pathToPikkuTypes: string, requireAuth?: boolean, globalHTTPPrefix?: string) => string;
@@ -1,4 +1,4 @@
1
- export const serializePublicAgent = (pathToPikkuTypes, requireAuth = true) => {
1
+ export const serializePublicAgent = (pathToPikkuTypes, requireAuth = true, globalHTTPPrefix = '') => {
2
2
  const authFlag = requireAuth ? 'true' : 'false';
3
3
  return `import { pikkuSessionlessFunc, defineHTTPRoutes, wireHTTPRoutes } from '${pathToPikkuTypes}'
4
4
 
@@ -58,23 +58,23 @@ export const agentRoutes = defineHTTPRoutes({
58
58
  tags: ['pikku:public'],
59
59
  routes: {
60
60
  agentRun: {
61
- route: '/rpc/agent/:agentName',
61
+ route: '${globalHTTPPrefix}/rpc/agent/:agentName',
62
62
  method: 'post',
63
63
  func: agentCaller,
64
64
  },
65
65
  agentStream: {
66
- route: '/rpc/agent/:agentName/stream',
66
+ route: '${globalHTTPPrefix}/rpc/agent/:agentName/stream',
67
67
  method: 'post',
68
68
  sse: true,
69
69
  func: agentStreamCaller,
70
70
  },
71
71
  agentApprove: {
72
- route: '/rpc/agent/:agentName/approve',
72
+ route: '${globalHTTPPrefix}/rpc/agent/:agentName/approve',
73
73
  method: 'post',
74
74
  func: agentApproveCaller,
75
75
  },
76
76
  agentResume: {
77
- route: '/rpc/agent/:agentName/resume',
77
+ route: '${globalHTTPPrefix}/rpc/agent/:agentName/resume',
78
78
  method: 'post',
79
79
  sse: true,
80
80
  func: agentResumeCaller,
@@ -56,7 +56,7 @@ export const pikkuCLIEntry = pikkuSessionlessFunc({
56
56
  `Move it to a source directory like "src/wirings/cli-channel.gen.ts".`);
57
57
  }
58
58
  const channelWireFile = resolvedWirePath;
59
- const channelCode = serializeChannelCLI(programName, programMeta, channelWireFile, visitState.functions.files, config.packageMappings, config.channelsTypesFile, config.functionTypesFile, channelName, channelRoute);
59
+ const channelCode = serializeChannelCLI(programName, programMeta, channelWireFile, visitState.functions.files, config.packageMappings, config.channelsTypesFile, config.functionTypesFile, channelName, channelRoute, config.globalHTTPPrefix || '');
60
60
  await writeFileInDir(logger, channelWireFile, channelCode);
61
61
  logger.debug(`Serialized CLI channel for ${programName}: ${channelWireFile}`);
62
62
  // Generate client code if clientPath is provided
@@ -6,4 +6,4 @@ import type { CLIProgramMeta } from '@pikku/core/cli';
6
6
  export declare function serializeChannelCLI(programName: string, programMeta: CLIProgramMeta, channelFile: string, functionFiles: Map<string, {
7
7
  path: string;
8
8
  exportedName: string;
9
- }>, packageMappings: Record<string, string>, channelTypesFile: string, functionTypesFile: string, channelName?: string, channelRoute?: string): string;
9
+ }>, packageMappings: Record<string, string>, channelTypesFile: string, functionTypesFile: string, channelName?: string, channelRoute?: string, globalHTTPPrefix?: string): string;
@@ -3,9 +3,9 @@ import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
3
3
  * Serializes a wireChannel call from CLI metadata
4
4
  * This creates a WebSocket backend for all CLI commands
5
5
  */
6
- export function serializeChannelCLI(programName, programMeta, channelFile, functionFiles, packageMappings, channelTypesFile, functionTypesFile, channelName, channelRoute) {
6
+ export function serializeChannelCLI(programName, programMeta, channelFile, functionFiles, packageMappings, channelTypesFile, functionTypesFile, channelName, channelRoute, globalHTTPPrefix = '') {
7
7
  const finalChannelName = channelName || `${programName}-cli`;
8
- const finalChannelRoute = channelRoute || `/cli/${programName}`;
8
+ const finalChannelRoute = channelRoute || `${globalHTTPPrefix}/cli/${programName}`;
9
9
  // Flatten all commands into a single routing map
10
10
  const commandMap = {};
11
11
  const collectCommands = (commands, path = []) => {
@@ -8,7 +8,7 @@ export const pikkuConsoleFunctions = pikkuSessionlessFunc({
8
8
  if (config.scaffold?.console) {
9
9
  const pathToPikkuTypes = getFileImportRelativePath(config.consoleFunctionsFile, config.typesDeclarationFile, config.packageMappings);
10
10
  const pathToAgentTypes = getFileImportRelativePath(config.consoleFunctionsFile, config.agentTypesFile, config.packageMappings);
11
- await writeFileInDir(logger, config.consoleFunctionsFile, serializeConsoleFunctions(pathToPikkuTypes, pathToAgentTypes));
11
+ await writeFileInDir(logger, config.consoleFunctionsFile, serializeConsoleFunctions(pathToPikkuTypes, pathToAgentTypes, config.globalHTTPPrefix || ''));
12
12
  return true;
13
13
  }
14
14
  return false;
@@ -1 +1 @@
1
- export declare const serializeConsoleFunctions: (pathToPikkuTypes: string, _pathToAgentTypes: string) => string;
1
+ export declare const serializeConsoleFunctions: (pathToPikkuTypes: string, _pathToAgentTypes: string, globalHTTPPrefix?: string) => string;
@@ -1,4 +1,4 @@
1
- export const serializeConsoleFunctions = (pathToPikkuTypes, _pathToAgentTypes) => {
1
+ export const serializeConsoleFunctions = (pathToPikkuTypes, _pathToAgentTypes, globalHTTPPrefix = '') => {
2
2
  return `import { pikkuSessionlessFunc, defineHTTPRoutes, wireHTTPRoutes, addon, wireAddon } from '${pathToPikkuTypes}'
3
3
 
4
4
  export const pikkuConsoleSetSecret = pikkuSessionlessFunc<{
@@ -98,6 +98,6 @@ export const consoleRoutes = defineHTTPRoutes({
98
98
  })
99
99
 
100
100
  wireAddon({ name: 'console', package: '@pikku/addon-console' })
101
- wireHTTPRoutes({ basePath: '/api', routes: { console: consoleRoutes } })
101
+ wireHTTPRoutes({ basePath: '${globalHTTPPrefix}', routes: { console: consoleRoutes } })
102
102
  `;
103
103
  };
@@ -7,7 +7,7 @@ export const pikkuPublicRPC = pikkuSessionlessFunc({
7
7
  func: async ({ logger, config }) => {
8
8
  if (config.scaffold?.rpc) {
9
9
  const pathToPikkuTypes = getFileImportRelativePath(config.publicRpcFile, config.typesDeclarationFile, config.packageMappings);
10
- await writeFileInDir(logger, config.publicRpcFile, serializePublicRPC(pathToPikkuTypes, config.scaffold.rpc === 'auth'));
10
+ await writeFileInDir(logger, config.publicRpcFile, serializePublicRPC(pathToPikkuTypes, config.scaffold.rpc === 'auth', config.globalHTTPPrefix || ''));
11
11
  return true;
12
12
  }
13
13
  return false;
@@ -16,7 +16,7 @@ export const pikkuRPCClient = pikkuSessionlessFunc({
16
16
  return;
17
17
  }
18
18
  const rpcMapDeclarationPath = getFileImportRelativePath(rpcWiringsFile, rpcMapDeclarationFile, packageMappings);
19
- const content = [serializeRPCWrapper(rpcMapDeclarationPath)];
19
+ const content = [serializeRPCWrapper(rpcMapDeclarationPath, config.globalHTTPPrefix || '')];
20
20
  await writeFileInDir(logger, rpcWiringsFile, content.join('\n'));
21
21
  },
22
22
  middleware: [
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Generate public RPC HTTP endpoint
3
3
  */
4
- export declare const serializePublicRPC: (pathToPikkuTypes: string, requireAuth?: boolean) => string;
4
+ export declare const serializePublicRPC: (pathToPikkuTypes: string, requireAuth?: boolean, globalHTTPPrefix?: string) => string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generate public RPC HTTP endpoint
3
3
  */
4
- export const serializePublicRPC = (pathToPikkuTypes, requireAuth = true) => {
4
+ export const serializePublicRPC = (pathToPikkuTypes, requireAuth = true, globalHTTPPrefix = '') => {
5
5
  const authFlag = requireAuth ? 'true' : 'false';
6
6
  return `/**
7
7
  * Auto-generated public RPC HTTP endpoint
@@ -25,7 +25,7 @@ export const workflowCaller = pikkuSessionlessFunc<
25
25
  >({
26
26
  auth: ${authFlag},
27
27
  func: async (_services, { workflowName, input }, { rpc }) => {
28
- return await rpc.startWorkflow(workflowName, input || {})
28
+ return await (rpc.startWorkflow as Function)(workflowName, input || {})
29
29
  },
30
30
  })
31
31
 
@@ -34,12 +34,12 @@ export const rpcRoutes = defineHTTPRoutes({
34
34
  tags: ['pikku:public'],
35
35
  routes: {
36
36
  rpc: {
37
- route: '/rpc/:rpcName',
37
+ route: '${globalHTTPPrefix}/rpc/:rpcName',
38
38
  method: 'post',
39
39
  func: rpcCaller,
40
40
  },
41
41
  workflow: {
42
- route: '/rpc/workflow/:workflowName',
42
+ route: '${globalHTTPPrefix}/rpc/workflow/:workflowName',
43
43
  method: 'post',
44
44
  func: workflowCaller,
45
45
  },
@@ -1 +1 @@
1
- export declare const serializeRPCWrapper: (rpcMapPath: string) => string;
1
+ export declare const serializeRPCWrapper: (rpcMapPath: string, globalHTTPPrefix?: string) => string;
@@ -1,4 +1,4 @@
1
- export const serializeRPCWrapper = (rpcMapPath) => {
1
+ export const serializeRPCWrapper = (rpcMapPath, globalHTTPPrefix = '') => {
2
2
  return `
3
3
  import { PikkuFetch } from "./pikku-fetch.gen.js"
4
4
  import type { RPCInvoke, TypedAgentRun, TypedStartWorkflow } from '${rpcMapPath}'
@@ -59,7 +59,7 @@ export class PikkuRPC {
59
59
  * @returns A promise that resolves with the function's return value
60
60
  */
61
61
  invoke: RPCInvoke = async (rpcName, data) => {
62
- return await this.pikkuFetch.post(\`/rpc/\${String(rpcName)}\` as never, { rpcName: String(rpcName), data }) as any
62
+ return await this.pikkuFetch.post(\`${globalHTTPPrefix}/rpc/\${String(rpcName)}\` as never, { rpcName: String(rpcName), data }) as any
63
63
  }
64
64
 
65
65
  /**
@@ -71,7 +71,7 @@ export class PikkuRPC {
71
71
  * @returns A promise that resolves with the new run ID
72
72
  */
73
73
  startWorkflow: TypedStartWorkflow = async (workflowName, input) => {
74
- return await this.pikkuFetch.post(\`/rpc/workflow/\${String(workflowName)}\` as never, { workflowName: String(workflowName), input }) as any
74
+ return await this.pikkuFetch.post(\`${globalHTTPPrefix}/rpc/workflow/\${String(workflowName)}\` as never, { workflowName: String(workflowName), input }) as any
75
75
  }
76
76
 
77
77
  /**
@@ -87,7 +87,7 @@ export class PikkuRPC {
87
87
  * @returns A promise with runId, result, and token usage
88
88
  */
89
89
  run: (async (agentName, input) => {
90
- return await this.pikkuFetch.post(\`/rpc/agent/\${String(agentName)}\` as never, input) as any
90
+ return await this.pikkuFetch.post(\`${globalHTTPPrefix}/rpc/agent/\${String(agentName)}\` as never, input) as any
91
91
  }) as TypedAgentRun,
92
92
  /**
93
93
  * Streams agent responses via SSE. Used for real-time chat interfaces.
@@ -96,7 +96,7 @@ export class PikkuRPC {
96
96
  * @param input - The agent input (message, threadId, resourceId)
97
97
  */
98
98
  stream: async (agentName: string, input: Record<string, unknown>) => {
99
- return await this.pikkuFetch.post(\`/rpc/agent/\${String(agentName)}/stream\` as never, input) as any
99
+ return await this.pikkuFetch.post(\`${globalHTTPPrefix}/rpc/agent/\${String(agentName)}/stream\` as never, input) as any
100
100
  },
101
101
  /**
102
102
  * Approves or denies pending tool calls for an agent run.
@@ -105,7 +105,7 @@ export class PikkuRPC {
105
105
  * @param input - The approval payload (runId, approvals array)
106
106
  */
107
107
  approve: async (agentName: string, input: Record<string, unknown>) => {
108
- return await this.pikkuFetch.post(\`/rpc/agent/\${String(agentName)}/approve\` as never, input) as any
108
+ return await this.pikkuFetch.post(\`${globalHTTPPrefix}/rpc/agent/\${String(agentName)}/approve\` as never, input) as any
109
109
  },
110
110
  }
111
111
  }
@@ -16,18 +16,25 @@ import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflo
16
16
 
17
17
  export { WorkflowCancelledException }
18
18
  import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '${functionTypesImportPath}'
19
- import type { RPCMap, FlattenedRPCMap } from '${rpcMapImportPath}'
19
+ import type { FlattenedRPCMap } from '${rpcMapImportPath}'
20
20
  import type { WorkflowMap, GraphsMap } from '${workflowMapImportPath}'
21
21
 
22
22
  export { template }
23
23
 
24
24
  export interface TypedWorkflow extends PikkuWorkflowWire {
25
- do<K extends keyof RPCMap>(
25
+ do<K extends keyof FlattenedRPCMap>(
26
26
  stepName: string,
27
27
  rpcName: K,
28
- data: RPCMap[K]['input'],
28
+ data: FlattenedRPCMap[K]['input'],
29
29
  options?: WorkflowStepOptions
30
- ): Promise<RPCMap[K]['output']>
30
+ ): Promise<FlattenedRPCMap[K]['output']>
31
+
32
+ do<K extends keyof WorkflowMap>(
33
+ stepName: string,
34
+ workflowName: K,
35
+ data: WorkflowMap[K]['input'],
36
+ options?: WorkflowStepOptions
37
+ ): Promise<WorkflowMap[K]['output']>
31
38
 
32
39
  do<T>(
33
40
  stepName: string,
@@ -36,24 +43,72 @@ export interface TypedWorkflow extends PikkuWorkflowWire {
36
43
  ): Promise<T>
37
44
  }
38
45
 
46
+ import type { StandardSchemaV1 } from '@standard-schema/spec'
47
+ import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '${functionTypesImportPath}'
48
+ import { PikkuError } from '@pikku/core/errors'
49
+ import type { CorePermissionGroup } from '@pikku/core'
50
+
39
51
  export type PikkuFunctionWorkflow<
40
52
  In = unknown,
41
53
  Out = never
42
54
  > = PikkuFunctionSessionless<In, Out, 'workflow'>
43
55
 
44
- export const pikkuWorkflowFunc = <In, Out = unknown>(
56
+ export type PikkuWorkflowConfigWithSchema<
57
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
58
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
59
+ > = {
60
+ title?: string
61
+ description?: string
62
+ tags?: string[]
63
+ expose?: boolean
64
+ internal?: boolean
65
+ override?: string
66
+ version?: number
67
+ remote?: boolean
68
+ mcp?: boolean
69
+ readonly?: boolean
70
+ approvalRequired?: boolean
71
+ approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never
72
+ func: PikkuFunctionWorkflow<
73
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
74
+ OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
75
+ >
76
+ auth?: boolean
77
+ permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
78
+ middleware?: PikkuMiddleware[]
79
+ input?: InputSchema
80
+ output?: OutputSchema
81
+ node?: NodeConfig
82
+ errors?: Array<typeof PikkuError>
83
+ }
84
+
85
+ export function pikkuWorkflowFunc<
86
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
87
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
88
+ >(
89
+ config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>
90
+ ): 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>
91
+ export function pikkuWorkflowFunc<In, Out = unknown>(
45
92
  func:
46
93
  | PikkuFunctionWorkflow<In, Out>
47
94
  | PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>
48
- ) => {
95
+ ): PikkuFunctionConfig<In, Out, 'workflow'>
96
+ export function pikkuWorkflowFunc(func: any) {
49
97
  return typeof func === 'function' ? { func } : func
50
98
  }
51
99
 
52
- export const pikkuWorkflowComplexFunc = <In, Out = unknown>(
100
+ export function pikkuWorkflowComplexFunc<
101
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
102
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
103
+ >(
104
+ config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>
105
+ ): 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>
106
+ export function pikkuWorkflowComplexFunc<In, Out = unknown>(
53
107
  func:
54
108
  | PikkuFunctionWorkflow<In, Out>
55
109
  | PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>
56
- ) => {
110
+ ): PikkuFunctionConfig<In, Out, 'workflow'>
111
+ export function pikkuWorkflowComplexFunc(func: any) {
57
112
  return typeof func === 'function' ? { func } : func
58
113
  }
59
114
 
@@ -215,7 +215,7 @@ export const createSingletonServices = async (config) => {
215
215
  }
216
216
  }
217
217
  const manifest = !setupOnly
218
- ? ((await loadManifest(join(config.outDir, 'versions.json'))) ??
218
+ ? ((await loadManifest(join(config.rootDir, 'versions.pikku.json'))) ??
219
219
  undefined)
220
220
  : undefined;
221
221
  unfilteredState = await inspect(logger, wiringFiles, {
@@ -354,6 +354,7 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
354
354
  if (!result.variablesMetaJsonFile) {
355
355
  result.variablesMetaJsonFile = join(variablesDir, 'pikku-variables-meta.gen.json');
356
356
  }
357
+ result.globalHTTPPrefix = result.globalHTTPPrefix ? result.globalHTTPPrefix.replace(/\/+$/, '') : '';
357
358
  if (requiredFields.length > 0) {
358
359
  validateCLIConfig(result, requiredFields);
359
360
  }
@@ -1 +1 @@
1
- {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.ts","../src/functions/commands/enable.ts","../src/functions/commands/info.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/wirings/workflow/serialize-workflow-workers.ts","../src/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../src/utils/openapi/codegen.ts","../src/utils/openapi/naming.ts","../src/utils/openapi/parse-openapi.ts","../src/utils/openapi/zod-codegen.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/agent/pikku-agent-wirings-meta.gen.ts","../.pikku/agent/pikku-agent-wirings.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-remote-rpc-workers.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/config.d.ts"],"version":"5.9.3"}
1
+ {"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.ts","../src/functions/commands/enable.ts","../src/functions/commands/info.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/wirings/workflow/serialize-workflow-workers.ts","../src/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/agent/pikku-agent-wirings-meta.gen.ts","../.pikku/agent/pikku-agent-wirings.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-remote-rpc-workers.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/config.d.ts"],"version":"5.9.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -21,13 +21,14 @@
21
21
  "release": "yarn build && npm test",
22
22
  "test": "bash run-tests.sh",
23
23
  "test:watch": "bash run-tests.sh --watch",
24
- "test:coverage": "bash run-tests.sh --coverage"
24
+ "test:coverage": "bash run-tests.sh --coverage",
25
+ "prepublishOnly": "yarn build"
25
26
  },
26
27
  "dependencies": {
27
28
  "@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
28
- "@pikku/core": "^0.12.5",
29
+ "@pikku/core": "^0.12.6",
29
30
  "@pikku/inspector": "^0.12.3",
30
- "@pikku/openapi-to-zod-schema": "^0.12.3",
31
+ "@pikku/openapi-parser": "^0.12.3",
31
32
  "@types/cookie": "^1.0.0",
32
33
  "@types/json-schema": "^7.0.15",
33
34
  "chalk": "^5.6.2",
@@ -1,20 +0,0 @@
1
- /**
2
- * Generates addon files from a parsed OpenAPI spec.
3
- * Returns Record<string, string> compatible with getAddonFiles output.
4
- */
5
- import type { ParsedSpec } from './parse-openapi.js';
6
- interface AddonVars {
7
- name: string;
8
- camelName: string;
9
- pascalName: string;
10
- screamingName: string;
11
- displayName: string;
12
- description: string;
13
- }
14
- interface CodegenFlags {
15
- oauth: boolean;
16
- secret: boolean;
17
- mcp?: boolean;
18
- }
19
- export declare function generateAddonFromOpenAPI(spec: ParsedSpec, vars: AddonVars, flags: CodegenFlags): Record<string, string>;
20
- export {};