@pikku/cli 0.12.4 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.schema.json +1 -1
- package/console-app/assets/{index-AX4YS8AA.js → index-sUj3oFEL.js} +1 -1
- package/console-app/index.html +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +11 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +13 -13
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +88 -86
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
- package/dist/.pikku/pikku-websocket.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +5 -3
- package/dist/.pikku/schemas/schemas/ConsoleCommandInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/WatchInput.schema.json +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +34 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -5
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/cli.wiring.js +11 -1
- package/dist/src/functions/commands/all.js +16 -1
- package/dist/src/functions/commands/console.d.ts +3 -0
- package/dist/src/functions/commands/console.js +8 -1
- package/dist/src/functions/commands/new-addon.js +24 -18
- package/dist/src/functions/commands/versions-check.js +4 -4
- package/dist/src/functions/commands/versions-init.js +1 -1
- package/dist/src/functions/commands/versions-update.js +1 -1
- package/dist/src/functions/commands/watch.d.ts +7 -1
- package/dist/src/functions/commands/watch.js +10 -3
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +2 -2
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +2 -2
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +2 -2
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +12 -6
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +5 -5
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +15 -2
- package/dist/src/functions/wirings/functions/serialize-function-types.js +15 -15
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +4 -4
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +6 -6
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +63 -8
- package/dist/src/services.js +1 -1
- package/dist/src/utils/pikku-cli-config.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/dist/src/utils/openapi/codegen.d.ts +0 -20
- package/dist/src/utils/openapi/codegen.js +0 -456
- package/dist/src/utils/openapi/naming.d.ts +0 -30
- package/dist/src/utils/openapi/naming.js +0 -167
- package/dist/src/utils/openapi/parse-openapi.d.ts +0 -61
- package/dist/src/utils/openapi/parse-openapi.js +0 -306
- package/dist/src/utils/openapi/zod-codegen.d.ts +0 -1
- package/dist/src/utils/openapi/zod-codegen.js +0 -1
|
@@ -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<{
|
|
@@ -55,6 +55,19 @@ export const pikkuConsoleSetVariable = pikkuSessionlessFunc<
|
|
|
55
55
|
},
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
+
export const pikkuConsoleHasSecret = pikkuSessionlessFunc<
|
|
59
|
+
{ secretId: string },
|
|
60
|
+
{ exists: boolean }
|
|
61
|
+
>({
|
|
62
|
+
description: 'Check if a secret exists without reading its value',
|
|
63
|
+
expose: true,
|
|
64
|
+
auth: false,
|
|
65
|
+
func: async ({ secrets }, { secretId }) => {
|
|
66
|
+
const exists = await secrets.hasSecret(secretId)
|
|
67
|
+
return { exists }
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
|
|
58
71
|
export const pikkuConsoleGetSecret = pikkuSessionlessFunc<
|
|
59
72
|
{ secretId: string },
|
|
60
73
|
{ exists: boolean; value: unknown | null }
|
|
@@ -85,6 +98,6 @@ export const consoleRoutes = defineHTTPRoutes({
|
|
|
85
98
|
})
|
|
86
99
|
|
|
87
100
|
wireAddon({ name: 'console', package: '@pikku/addon-console' })
|
|
88
|
-
wireHTTPRoutes({ basePath: '
|
|
101
|
+
wireHTTPRoutes({ basePath: '${globalHTTPPrefix}', routes: { console: consoleRoutes } })
|
|
89
102
|
`;
|
|
90
103
|
};
|
|
@@ -331,7 +331,7 @@ export type PikkuFunctionConfig<
|
|
|
331
331
|
* Types are automatically inferred from the schemas.
|
|
332
332
|
*/
|
|
333
333
|
export type PikkuFunctionConfigWithSchema<
|
|
334
|
-
InputSchema extends StandardSchemaV1,
|
|
334
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
335
335
|
OutputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
336
336
|
RequiredWires extends keyof PikkuWire = never
|
|
337
337
|
> = {
|
|
@@ -341,20 +341,20 @@ export type PikkuFunctionConfigWithSchema<
|
|
|
341
341
|
mcp?: boolean
|
|
342
342
|
internal?: boolean
|
|
343
343
|
approvalRequired?: boolean
|
|
344
|
-
approvalDescription?: PikkuApprovalDescription<InferSchemaOutput<InputSchema>>
|
|
344
|
+
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never
|
|
345
345
|
func: PikkuFunction<
|
|
346
|
-
InferSchemaOutput<InputSchema
|
|
346
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
347
347
|
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
348
348
|
RequiredWires
|
|
349
349
|
> | PikkuFunctionSessionless<
|
|
350
|
-
InferSchemaOutput<InputSchema
|
|
350
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
351
351
|
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
352
352
|
RequiredWires
|
|
353
353
|
>
|
|
354
354
|
auth?: boolean
|
|
355
|
-
permissions?: CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>>
|
|
355
|
+
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
|
|
356
356
|
middleware?: PikkuMiddleware[]
|
|
357
|
-
input
|
|
357
|
+
input?: InputSchema
|
|
358
358
|
output?: OutputSchema
|
|
359
359
|
node?: NodeConfig
|
|
360
360
|
errors?: Array<typeof PikkuError>
|
|
@@ -399,11 +399,11 @@ export type PikkuFunctionConfigWithSchema<
|
|
|
399
399
|
* \`\`\`
|
|
400
400
|
*/
|
|
401
401
|
export function pikkuFunc<
|
|
402
|
-
InputSchema extends StandardSchemaV1,
|
|
402
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
403
403
|
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
404
404
|
>(
|
|
405
405
|
config: PikkuFunctionConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>
|
|
406
|
-
): PikkuFunctionConfig<InferSchemaOutput<InputSchema
|
|
406
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>
|
|
407
407
|
export function pikkuFunc<In, Out = unknown>(
|
|
408
408
|
func:
|
|
409
409
|
| PikkuFunction<In, Out, 'session' | 'rpc'>
|
|
@@ -417,7 +417,7 @@ export function pikkuFunc(func: any) {
|
|
|
417
417
|
* Configuration object for sessionless Pikku functions with Zod schema validation.
|
|
418
418
|
*/
|
|
419
419
|
export type PikkuFunctionSessionlessConfigWithSchema<
|
|
420
|
-
InputSchema extends StandardSchemaV1,
|
|
420
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
421
421
|
OutputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
422
422
|
RequiredWires extends keyof PikkuWire = never
|
|
423
423
|
> = {
|
|
@@ -429,16 +429,16 @@ export type PikkuFunctionSessionlessConfigWithSchema<
|
|
|
429
429
|
internal?: boolean
|
|
430
430
|
remote?: boolean
|
|
431
431
|
approvalRequired?: boolean
|
|
432
|
-
approvalDescription?: PikkuApprovalDescription<InferSchemaOutput<InputSchema>>
|
|
432
|
+
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never
|
|
433
433
|
func: PikkuFunctionSessionless<
|
|
434
|
-
InferSchemaOutput<InputSchema
|
|
434
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
435
435
|
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
|
|
436
436
|
RequiredWires
|
|
437
437
|
>
|
|
438
438
|
auth?: boolean
|
|
439
|
-
permissions?: CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>>
|
|
439
|
+
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
|
|
440
440
|
middleware?: PikkuMiddleware[]
|
|
441
|
-
input
|
|
441
|
+
input?: InputSchema
|
|
442
442
|
output?: OutputSchema
|
|
443
443
|
node?: NodeConfig
|
|
444
444
|
errors?: Array<typeof PikkuError>
|
|
@@ -480,11 +480,11 @@ export type PikkuFunctionSessionlessConfigWithSchema<
|
|
|
480
480
|
* \`\`\`
|
|
481
481
|
*/
|
|
482
482
|
export function pikkuSessionlessFunc<
|
|
483
|
-
InputSchema extends StandardSchemaV1,
|
|
483
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
484
484
|
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
485
485
|
>(
|
|
486
486
|
config: PikkuFunctionSessionlessConfigWithSchema<InputSchema, OutputSchema, 'session' | 'rpc'>
|
|
487
|
-
): PikkuFunctionConfig<InferSchemaOutput<InputSchema
|
|
487
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'session' | 'rpc'>
|
|
488
488
|
export function pikkuSessionlessFunc<In, Out = unknown>(
|
|
489
489
|
func:
|
|
490
490
|
| PikkuFunctionSessionless<In, Out, 'session' | 'rpc'>
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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 {
|
|
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
|
|
25
|
+
do<K extends keyof FlattenedRPCMap>(
|
|
26
26
|
stepName: string,
|
|
27
27
|
rpcName: K,
|
|
28
|
-
data:
|
|
28
|
+
data: FlattenedRPCMap[K]['input'],
|
|
29
29
|
options?: WorkflowStepOptions
|
|
30
|
-
): Promise<
|
|
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
|
|
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
|
|
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
|
|
package/dist/src/services.js
CHANGED
|
@@ -215,7 +215,7 @@ export const createSingletonServices = async (config) => {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
const manifest = !setupOnly
|
|
218
|
-
? ((await loadManifest(join(config.
|
|
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","
|
|
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.
|
|
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.
|
|
29
|
+
"@pikku/core": "^0.12.6",
|
|
29
30
|
"@pikku/inspector": "^0.12.3",
|
|
30
|
-
"@pikku/openapi-
|
|
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 {};
|