@pikku/cli 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.schema.json +1 -1
- package/console-app/assets/index-DRJQtv3c.js +676 -0
- package/console-app/index.html +6 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +30 -3
- package/dist/.pikku/agent/pikku-agent-types.gen.js +13 -0
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +2 -2
- 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 +2 -2
- 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 +77 -3
- 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 +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +280 -10
- 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 +14 -11
- package/dist/.pikku/function/pikku-function-types.gen.js +25 -13
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.json +426 -93
- package/dist/.pikku/function/pikku-functions.gen.js +5 -3
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/.pikku/pikku-services.gen.d.ts +2 -1
- package/dist/.pikku/pikku-services.gen.js +1 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +16 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +2 -2
- 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 +15 -3
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuGatewayOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewAddonInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewFunctionInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewMiddlewareInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewPermissionInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuNewWiringInput.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 +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
- 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 +236 -9
- package/dist/src/functions/commands/all.js +13 -8
- package/dist/src/functions/commands/enable.d.ts +4 -0
- package/dist/src/functions/commands/enable.js +39 -0
- package/dist/src/functions/commands/info.d.ts +9 -0
- package/dist/src/functions/commands/info.js +283 -0
- package/dist/src/functions/commands/new-addon.d.ts +34 -0
- package/dist/src/functions/commands/new-addon.js +636 -0
- package/dist/src/functions/commands/new-function.d.ts +10 -0
- package/dist/src/functions/commands/new-function.js +79 -0
- package/dist/src/functions/commands/new-middleware.d.ts +10 -0
- package/dist/src/functions/commands/new-middleware.js +48 -0
- package/dist/src/functions/commands/new-permission.d.ts +10 -0
- package/dist/src/functions/commands/new-permission.js +45 -0
- package/dist/src/functions/commands/new-wiring.d.ts +10 -0
- package/dist/src/functions/commands/new-wiring.js +102 -0
- package/dist/src/functions/commands/pikku-command-bootstrap.js +11 -40
- package/dist/src/functions/commands/versions-check.js +85 -3
- package/dist/src/functions/commands/versions-update.js +1 -1
- package/dist/src/functions/runtimes/fetch/index.js +2 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +4 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +0 -4
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.js +2 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.js +3 -2
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +5 -5
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +3 -5
- package/dist/src/functions/wirings/ai-agent/serialize-agent-map.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/serialize-ai-agent-types.js +48 -3
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +30 -52
- package/dist/src/functions/wirings/channels/pikku-channels.js +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.js +2 -2
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.d.ts +4 -4
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +2 -2
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +4 -5
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.js +2 -2
- package/dist/src/functions/wirings/console/serialize-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/serialize-console-functions.js +18 -157
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -0
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.js +33 -0
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +4 -4
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +8 -14
- package/dist/src/functions/wirings/functions/schemas.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-addon-types.d.ts +1 -0
- package/dist/src/functions/wirings/functions/{serialize-external-types.js → serialize-addon-types.js} +16 -15
- package/dist/src/functions/wirings/functions/serialize-function-imports.d.ts +3 -3
- package/dist/src/functions/wirings/functions/serialize-function-imports.js +3 -3
- package/dist/src/functions/wirings/functions/serialize-function-types.js +28 -14
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +2 -2
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -0
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.js +22 -0
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.js +1 -1
- package/dist/src/functions/wirings/http/serialize-typed-http-map.d.ts +3 -3
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.js +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package.js +5 -5
- package/dist/src/functions/wirings/package/serialize-package.js +2 -2
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +0 -5
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.js +2 -1
- package/dist/src/functions/wirings/queue/serialize-queue-map.d.ts +2 -2
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +3 -5
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +3 -5
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +2 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +6 -6
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +2 -4
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +25 -16
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +43 -7
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.d.ts +8 -3
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +41 -31
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/serialize-secrets-types.d.ts +2 -2
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/serialize-trigger-meta.js +2 -2
- package/dist/src/functions/wirings/variables/serialize-variables-types.d.ts +2 -2
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +5 -12
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +2 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +2 -2
- package/dist/src/services/cli-logger-forwarder.service.d.ts +4 -3
- package/dist/src/services/cli-logger.service.d.ts +3 -2
- package/dist/src/services.d.ts +4 -3
- package/dist/src/services.js +14 -3
- package/dist/src/utils/check-required-types.d.ts +1 -1
- package/dist/src/utils/contract-versions.d.ts +1 -1
- package/dist/src/utils/file-writer.d.ts +6 -1
- package/dist/src/utils/file-writer.js +14 -1
- package/dist/src/utils/generate-bootstrap-file.d.ts +2 -2
- package/dist/src/utils/openapi/codegen.d.ts +19 -0
- package/dist/src/utils/openapi/codegen.js +288 -0
- package/dist/src/utils/openapi/naming.d.ts +30 -0
- package/dist/src/utils/openapi/naming.js +167 -0
- package/dist/src/utils/openapi/parse-openapi.d.ts +36 -0
- package/dist/src/utils/openapi/parse-openapi.js +196 -0
- package/dist/src/utils/openapi/zod-codegen.d.ts +53 -0
- package/dist/src/utils/openapi/zod-codegen.js +251 -0
- package/dist/src/utils/pikku-cli-config.d.ts +2 -2
- package/dist/src/utils/pikku-cli-config.js +51 -30
- package/dist/src/utils/pikku-files-and-methods.d.ts +1 -1
- package/dist/src/utils/pikku-files-and-methods.js +1 -1
- package/dist/src/utils/serialize-import-map.d.ts +2 -2
- package/dist/src/utils/serialize-import-map.js +1 -1
- package/dist/src/utils/serialize-meta-ts.js +1 -1
- package/dist/src/utils/serialize-schemas.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/console-app/assets/index-C19L3UJu.js +0 -637
- package/dist/src/functions/wirings/functions/pikku-command-external-types.d.ts +0 -1
- package/dist/src/functions/wirings/functions/pikku-command-external-types.js +0 -33
- package/dist/src/functions/wirings/functions/serialize-external-types.d.ts +0 -1
package/console-app/index.html
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
/>
|
|
10
10
|
<link rel="icon" href="/pikku-console-logo.png" />
|
|
11
11
|
<title>Pikku Console</title>
|
|
12
|
+
<style>
|
|
13
|
+
html {
|
|
14
|
+
font-size: 18px;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
12
17
|
<script>
|
|
13
18
|
try {
|
|
14
19
|
var scheme = localStorage.getItem('mantine-color-scheme')
|
|
@@ -20,7 +25,7 @@
|
|
|
20
25
|
}
|
|
21
26
|
} catch (e) {}
|
|
22
27
|
</script>
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
28
|
+
<script type="module" crossorigin src="/assets/index-DRJQtv3c.js"></script>
|
|
24
29
|
<link rel="stylesheet" crossorigin href="/assets/index-0Ui5UudO.css">
|
|
25
30
|
</head>
|
|
26
31
|
<body>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.2
|
|
3
3
|
*/
|
|
4
4
|
import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
|
|
5
|
-
import type { PikkuPermission, PikkuMiddleware, Services } from '../function/pikku-function-types.gen.js';
|
|
5
|
+
import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
6
6
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
7
|
-
import type { AIAgentMemoryConfig } from '@pikku/core/ai-agent';
|
|
7
|
+
import type { AIAgentMemoryConfig, AIAgentInput } from '@pikku/core/ai-agent';
|
|
8
|
+
import type { AgentMap } from './pikku-agent-map.gen.d.js';
|
|
8
9
|
type AIAgentConfig = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools' | 'agents' | 'memory'> & {
|
|
9
10
|
input?: StandardSchemaV1;
|
|
10
11
|
output?: StandardSchemaV1;
|
|
@@ -16,4 +17,30 @@ type AIAgentConfig = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware>, 'tools'
|
|
|
16
17
|
};
|
|
17
18
|
export declare const pikkuAIAgent: (agent: AIAgentConfig) => AIAgentConfig;
|
|
18
19
|
export declare const pikkuAIMiddleware: <State extends Record<string, unknown> = Record<string, unknown>, RequiredServices extends Services = Services>(hooks: PikkuAIMiddlewareHooks<State, RequiredServices>) => PikkuAIMiddlewareHooks<State, RequiredServices>;
|
|
20
|
+
export declare const agent: <Name extends keyof AgentMap>(agentName: Name) => PikkuFunctionConfig<AIAgentInput, {
|
|
21
|
+
runId: string;
|
|
22
|
+
result: AgentMap[Name]["output"];
|
|
23
|
+
usage: {
|
|
24
|
+
inputTokens: number;
|
|
25
|
+
outputTokens: number;
|
|
26
|
+
};
|
|
27
|
+
}, "session" | "rpc">;
|
|
28
|
+
export declare const agentStream: <Name extends keyof AgentMap>(agentName?: Name | undefined) => PikkuFunctionConfig<{
|
|
29
|
+
agentName?: string;
|
|
30
|
+
message: string;
|
|
31
|
+
threadId: string;
|
|
32
|
+
resourceId: string;
|
|
33
|
+
}, void, "session" | "rpc">;
|
|
34
|
+
export declare const agentResume: () => PikkuFunctionConfig<{
|
|
35
|
+
runId: string;
|
|
36
|
+
toolCallId: string;
|
|
37
|
+
approved: boolean;
|
|
38
|
+
}, void, "session" | "rpc">;
|
|
39
|
+
export declare const agentApprove: <Name extends keyof AgentMap>(agentName: Name) => PikkuFunctionConfig<{
|
|
40
|
+
runId: string;
|
|
41
|
+
approvals: {
|
|
42
|
+
toolCallId: string;
|
|
43
|
+
approved: boolean;
|
|
44
|
+
}[];
|
|
45
|
+
}, unknown, "session" | "rpc">;
|
|
19
46
|
export {};
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
+
import { agent as coreAgent, agentStream as coreAgentStream, agentResume as coreAgentResume, agentApprove as coreAgentApprove, } from '@pikku/core/ai-agent';
|
|
1
2
|
export const pikkuAIAgent = (agent) => {
|
|
2
3
|
return agent;
|
|
3
4
|
};
|
|
4
5
|
export const pikkuAIMiddleware = (hooks) => hooks;
|
|
6
|
+
export const agent = (agentName) => {
|
|
7
|
+
return coreAgent(agentName);
|
|
8
|
+
};
|
|
9
|
+
export const agentStream = (agentName) => {
|
|
10
|
+
return coreAgentStream(agentName);
|
|
11
|
+
};
|
|
12
|
+
export const agentResume = () => {
|
|
13
|
+
return coreAgentResume();
|
|
14
|
+
};
|
|
15
|
+
export const agentApprove = (agentName) => {
|
|
16
|
+
return coreAgentApprove(agentName);
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.2
|
|
3
3
|
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core';
|
|
4
|
+
import { pikkuState } from '@pikku/core/internal';
|
|
5
5
|
import metaData from './pikku-agent-wirings-meta.gen.json' with { type: 'json' };
|
|
6
6
|
pikkuState(null, 'agent', 'agentsMeta', metaData.agentsMeta);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.2
|
|
3
3
|
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core';
|
|
4
|
+
import { pikkuState } from '@pikku/core/internal';
|
|
5
5
|
import metaData from './pikku-channels-meta.gen.json' with { type: 'json' };
|
|
6
6
|
pikkuState(null, 'channel', 'meta', metaData);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.2
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* WebSocket channel backend for 'pikku' CLI commands
|
|
@@ -17,8 +17,22 @@ import { pikkuRPCClient } from '../../src/functions/wirings/rpc/pikku-command-rp
|
|
|
17
17
|
import { pikkuQueueService } from '../../src/functions/wirings/queue/pikku-command-queue-service.js';
|
|
18
18
|
import { pikkuOpenAPI } from '../../src/functions/wirings/http/pikku-command-openapi.js';
|
|
19
19
|
import { pikkuNext } from '../../src/functions/runtimes/nextjs/pikku-command-nextjs.js';
|
|
20
|
+
import { enableRpc } from '../../src/functions/commands/enable.js';
|
|
21
|
+
import { enableConsole } from '../../src/functions/commands/enable.js';
|
|
22
|
+
import { enableAgent } from '../../src/functions/commands/enable.js';
|
|
23
|
+
import { enableWorkflow } from '../../src/functions/commands/enable.js';
|
|
24
|
+
import { pikkuNewFunction } from '../../src/functions/commands/new-function.js';
|
|
25
|
+
import { pikkuNewWiring } from '../../src/functions/commands/new-wiring.js';
|
|
26
|
+
import { pikkuNewMiddleware } from '../../src/functions/commands/new-middleware.js';
|
|
27
|
+
import { pikkuNewPermission } from '../../src/functions/commands/new-permission.js';
|
|
28
|
+
import { pikkuNewAddon } from '../../src/functions/commands/new-addon.js';
|
|
20
29
|
import { pikkuVersionsInit } from '../../src/functions/commands/versions-init.js';
|
|
21
30
|
import { pikkuVersionsCheck } from '../../src/functions/commands/versions-check.js';
|
|
31
|
+
import { pikkuVersionsUpdate } from '../../src/functions/commands/versions-update.js';
|
|
32
|
+
import { pikkuInfoFunctions } from '../../src/functions/commands/info.js';
|
|
33
|
+
import { pikkuInfoTags } from '../../src/functions/commands/info.js';
|
|
34
|
+
import { pikkuInfoMiddleware } from '../../src/functions/commands/info.js';
|
|
35
|
+
import { pikkuInfoPermissions } from '../../src/functions/commands/info.js';
|
|
22
36
|
// Middleware to close the channel after CLI command completes
|
|
23
37
|
const cliCloseOnComplete = pikkuMiddleware(async (_services, { channel }, next) => {
|
|
24
38
|
const closeChannel = () => {
|
|
@@ -92,13 +106,73 @@ wireChannel({
|
|
|
92
106
|
func: pikkuNext,
|
|
93
107
|
middleware: [cliCloseOnComplete],
|
|
94
108
|
},
|
|
95
|
-
'
|
|
109
|
+
'enable.rpc': {
|
|
110
|
+
func: enableRpc,
|
|
111
|
+
middleware: [cliCloseOnComplete],
|
|
112
|
+
},
|
|
113
|
+
'enable.console': {
|
|
114
|
+
func: enableConsole,
|
|
115
|
+
middleware: [cliCloseOnComplete],
|
|
116
|
+
},
|
|
117
|
+
'enable.agent': {
|
|
118
|
+
func: enableAgent,
|
|
119
|
+
middleware: [cliCloseOnComplete],
|
|
120
|
+
},
|
|
121
|
+
'enable.workflow': {
|
|
122
|
+
func: enableWorkflow,
|
|
123
|
+
middleware: [cliCloseOnComplete],
|
|
124
|
+
},
|
|
125
|
+
'new.function': {
|
|
126
|
+
func: pikkuNewFunction,
|
|
127
|
+
middleware: [cliCloseOnComplete],
|
|
128
|
+
},
|
|
129
|
+
'new.wiring': {
|
|
130
|
+
func: pikkuNewWiring,
|
|
131
|
+
middleware: [cliCloseOnComplete],
|
|
132
|
+
},
|
|
133
|
+
'new.middleware': {
|
|
134
|
+
func: pikkuNewMiddleware,
|
|
135
|
+
middleware: [cliCloseOnComplete],
|
|
136
|
+
},
|
|
137
|
+
'new.permission': {
|
|
138
|
+
func: pikkuNewPermission,
|
|
139
|
+
middleware: [cliCloseOnComplete],
|
|
140
|
+
},
|
|
141
|
+
'new.addon': {
|
|
142
|
+
func: pikkuNewAddon,
|
|
143
|
+
middleware: [cliCloseOnComplete],
|
|
144
|
+
},
|
|
145
|
+
'versions.init': {
|
|
96
146
|
func: pikkuVersionsInit,
|
|
97
147
|
middleware: [cliCloseOnComplete],
|
|
98
148
|
},
|
|
99
|
-
'versions
|
|
149
|
+
'versions.check': {
|
|
100
150
|
func: pikkuVersionsCheck,
|
|
101
151
|
middleware: [cliCloseOnComplete],
|
|
152
|
+
},
|
|
153
|
+
'versions.update': {
|
|
154
|
+
func: pikkuVersionsUpdate,
|
|
155
|
+
middleware: [cliCloseOnComplete],
|
|
156
|
+
},
|
|
157
|
+
'info': {
|
|
158
|
+
func: pikkuInfoFunctions,
|
|
159
|
+
middleware: [cliCloseOnComplete],
|
|
160
|
+
},
|
|
161
|
+
'info.functions': {
|
|
162
|
+
func: pikkuInfoFunctions,
|
|
163
|
+
middleware: [cliCloseOnComplete],
|
|
164
|
+
},
|
|
165
|
+
'info.tags': {
|
|
166
|
+
func: pikkuInfoTags,
|
|
167
|
+
middleware: [cliCloseOnComplete],
|
|
168
|
+
},
|
|
169
|
+
'info.middleware': {
|
|
170
|
+
func: pikkuInfoMiddleware,
|
|
171
|
+
middleware: [cliCloseOnComplete],
|
|
172
|
+
},
|
|
173
|
+
'info.permissions': {
|
|
174
|
+
func: pikkuInfoPermissions,
|
|
175
|
+
middleware: [cliCloseOnComplete],
|
|
102
176
|
}
|
|
103
177
|
}
|
|
104
178
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.2
|
|
3
3
|
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core';
|
|
4
|
+
import { pikkuState } from '@pikku/core/internal';
|
|
5
5
|
import metaData from './pikku-cli-wirings-meta.gen.json' with { type: 'json' };
|
|
6
6
|
pikkuState(null, 'cli', 'meta', metaData);
|
|
@@ -98,21 +98,290 @@
|
|
|
98
98
|
"options": {},
|
|
99
99
|
"description": "Generate Next.js backend and HTTP wrappers"
|
|
100
100
|
},
|
|
101
|
-
"
|
|
102
|
-
"pikkuFuncId": "
|
|
101
|
+
"enable": {
|
|
102
|
+
"pikkuFuncId": "",
|
|
103
103
|
"positionals": [],
|
|
104
|
-
"options": {
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
"options": {},
|
|
105
|
+
"description": "Enable Pikku features",
|
|
106
|
+
"subcommands": {
|
|
107
|
+
"rpc": {
|
|
108
|
+
"pikkuFuncId": "enableRpc",
|
|
109
|
+
"positionals": [],
|
|
110
|
+
"options": {
|
|
111
|
+
"no-auth": {
|
|
112
|
+
"description": "Disable auth requirement",
|
|
113
|
+
"default": false
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"description": "Enable public RPC endpoint"
|
|
117
|
+
},
|
|
118
|
+
"console": {
|
|
119
|
+
"pikkuFuncId": "enableConsole",
|
|
120
|
+
"positionals": [],
|
|
121
|
+
"options": {
|
|
122
|
+
"no-auth": {
|
|
123
|
+
"description": "Disable auth requirement",
|
|
124
|
+
"default": false
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"description": "Enable console functions"
|
|
128
|
+
},
|
|
129
|
+
"agent": {
|
|
130
|
+
"pikkuFuncId": "enableAgent",
|
|
131
|
+
"positionals": [],
|
|
132
|
+
"options": {
|
|
133
|
+
"no-auth": {
|
|
134
|
+
"description": "Disable auth requirement",
|
|
135
|
+
"default": false
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"description": "Enable public agent endpoints"
|
|
139
|
+
},
|
|
140
|
+
"workflow": {
|
|
141
|
+
"pikkuFuncId": "enableWorkflow",
|
|
142
|
+
"positionals": [],
|
|
143
|
+
"options": {
|
|
144
|
+
"no-auth": {
|
|
145
|
+
"description": "Disable auth requirement",
|
|
146
|
+
"default": false
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"description": "Enable workflow workers"
|
|
107
150
|
}
|
|
108
|
-
}
|
|
109
|
-
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"new": {
|
|
154
|
+
"pikkuFuncId": "",
|
|
155
|
+
"positionals": [],
|
|
156
|
+
"options": {},
|
|
157
|
+
"description": "Scaffold new functions and wirings",
|
|
158
|
+
"subcommands": {
|
|
159
|
+
"function": {
|
|
160
|
+
"pikkuFuncId": "pikkuNewFunction",
|
|
161
|
+
"positionals": [
|
|
162
|
+
{
|
|
163
|
+
"name": "name",
|
|
164
|
+
"required": true
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"options": {
|
|
168
|
+
"type": {
|
|
169
|
+
"description": "Function type: func, sessionless (default), or void",
|
|
170
|
+
"short": "t",
|
|
171
|
+
"default": "sessionless"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"description": "Create a new Pikku function file",
|
|
175
|
+
"parameters": "<name>"
|
|
176
|
+
},
|
|
177
|
+
"wiring": {
|
|
178
|
+
"pikkuFuncId": "pikkuNewWiring",
|
|
179
|
+
"positionals": [
|
|
180
|
+
{
|
|
181
|
+
"name": "name",
|
|
182
|
+
"required": true
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"options": {
|
|
186
|
+
"type": {
|
|
187
|
+
"description": "Wiring type: http (default), channel, scheduler, queue, mcp, cli, or trigger",
|
|
188
|
+
"short": "t",
|
|
189
|
+
"default": "http"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"description": "Create a new wiring file",
|
|
193
|
+
"parameters": "<name>"
|
|
194
|
+
},
|
|
195
|
+
"middleware": {
|
|
196
|
+
"pikkuFuncId": "pikkuNewMiddleware",
|
|
197
|
+
"positionals": [
|
|
198
|
+
{
|
|
199
|
+
"name": "name",
|
|
200
|
+
"required": true
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"options": {
|
|
204
|
+
"type": {
|
|
205
|
+
"description": "Middleware type: simple (default) or factory",
|
|
206
|
+
"short": "t",
|
|
207
|
+
"default": "simple"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"description": "Create a new middleware file",
|
|
211
|
+
"parameters": "<name>"
|
|
212
|
+
},
|
|
213
|
+
"permission": {
|
|
214
|
+
"pikkuFuncId": "pikkuNewPermission",
|
|
215
|
+
"positionals": [
|
|
216
|
+
{
|
|
217
|
+
"name": "name",
|
|
218
|
+
"required": true
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"options": {
|
|
222
|
+
"type": {
|
|
223
|
+
"description": "Permission type: simple (default) or factory",
|
|
224
|
+
"short": "t",
|
|
225
|
+
"default": "simple"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"description": "Create a new permission file",
|
|
229
|
+
"parameters": "<name>"
|
|
230
|
+
},
|
|
231
|
+
"addon": {
|
|
232
|
+
"pikkuFuncId": "pikkuNewAddon",
|
|
233
|
+
"positionals": [
|
|
234
|
+
{
|
|
235
|
+
"name": "name",
|
|
236
|
+
"required": true
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"options": {
|
|
240
|
+
"displayName": {
|
|
241
|
+
"description": "Human-readable display name (defaults to PascalCase of name)"
|
|
242
|
+
},
|
|
243
|
+
"description": {
|
|
244
|
+
"description": "Package description (defaults to \"{displayName} integration for Pikku\")"
|
|
245
|
+
},
|
|
246
|
+
"category": {
|
|
247
|
+
"description": "Forge category (defaults to \"General\")",
|
|
248
|
+
"default": "General"
|
|
249
|
+
},
|
|
250
|
+
"dir": {
|
|
251
|
+
"description": "Override output directory (defaults to scaffold.addonDir or cwd)",
|
|
252
|
+
"short": "d"
|
|
253
|
+
},
|
|
254
|
+
"secret": {
|
|
255
|
+
"description": "Include secret schema file",
|
|
256
|
+
"default": false
|
|
257
|
+
},
|
|
258
|
+
"variable": {
|
|
259
|
+
"description": "Include variable definition file",
|
|
260
|
+
"default": false
|
|
261
|
+
},
|
|
262
|
+
"oauth": {
|
|
263
|
+
"description": "Include OAuth2 credential wiring and OAuth2Client-based API service",
|
|
264
|
+
"default": false
|
|
265
|
+
},
|
|
266
|
+
"test": {
|
|
267
|
+
"description": "Include test harness (default: true)",
|
|
268
|
+
"default": true
|
|
269
|
+
},
|
|
270
|
+
"openapi": {
|
|
271
|
+
"description": "Path to OpenAPI YAML/JSON spec to generate functions from"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"description": "Scaffold a new addon package",
|
|
275
|
+
"parameters": "<name>"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
110
278
|
},
|
|
111
|
-
"versions
|
|
112
|
-
"pikkuFuncId": "
|
|
279
|
+
"versions": {
|
|
280
|
+
"pikkuFuncId": "",
|
|
113
281
|
"positionals": [],
|
|
114
282
|
"options": {},
|
|
115
|
-
"description": "
|
|
283
|
+
"description": "Manage function contract versions",
|
|
284
|
+
"subcommands": {
|
|
285
|
+
"init": {
|
|
286
|
+
"pikkuFuncId": "pikkuVersionsInit",
|
|
287
|
+
"positionals": [],
|
|
288
|
+
"options": {
|
|
289
|
+
"force": {
|
|
290
|
+
"description": "Overwrite existing manifest"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"description": "Initialize the version manifest (versions.json)"
|
|
294
|
+
},
|
|
295
|
+
"check": {
|
|
296
|
+
"pikkuFuncId": "pikkuVersionsCheck",
|
|
297
|
+
"positionals": [],
|
|
298
|
+
"options": {},
|
|
299
|
+
"description": "Validate function contracts against the version manifest"
|
|
300
|
+
},
|
|
301
|
+
"update": {
|
|
302
|
+
"pikkuFuncId": "pikkuVersionsUpdate",
|
|
303
|
+
"positionals": [],
|
|
304
|
+
"options": {},
|
|
305
|
+
"description": "Update the version manifest with current contract hashes"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"info": {
|
|
310
|
+
"pikkuFuncId": "pikkuInfoFunctions",
|
|
311
|
+
"positionals": [],
|
|
312
|
+
"options": {
|
|
313
|
+
"limit": {
|
|
314
|
+
"description": "Maximum number of rows to display",
|
|
315
|
+
"default": "50"
|
|
316
|
+
},
|
|
317
|
+
"verbose": {
|
|
318
|
+
"description": "Show additional details (file paths, services, etc.)",
|
|
319
|
+
"default": false
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"description": "Show information about Pikku project resources",
|
|
323
|
+
"subcommands": {
|
|
324
|
+
"functions": {
|
|
325
|
+
"pikkuFuncId": "pikkuInfoFunctions",
|
|
326
|
+
"positionals": [],
|
|
327
|
+
"options": {
|
|
328
|
+
"limit": {
|
|
329
|
+
"description": "Maximum number of rows to display",
|
|
330
|
+
"default": "50"
|
|
331
|
+
},
|
|
332
|
+
"verbose": {
|
|
333
|
+
"description": "Show additional details (type, middleware, file)",
|
|
334
|
+
"default": false
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"description": "List all registered functions"
|
|
338
|
+
},
|
|
339
|
+
"tags": {
|
|
340
|
+
"pikkuFuncId": "pikkuInfoTags",
|
|
341
|
+
"positionals": [],
|
|
342
|
+
"options": {
|
|
343
|
+
"limit": {
|
|
344
|
+
"description": "Maximum number of rows to display",
|
|
345
|
+
"default": "50"
|
|
346
|
+
},
|
|
347
|
+
"verbose": {
|
|
348
|
+
"description": "Show names instead of counts",
|
|
349
|
+
"default": false
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"description": "List all tags with associated functions, middleware, and permissions"
|
|
353
|
+
},
|
|
354
|
+
"middleware": {
|
|
355
|
+
"pikkuFuncId": "pikkuInfoMiddleware",
|
|
356
|
+
"positionals": [],
|
|
357
|
+
"options": {
|
|
358
|
+
"limit": {
|
|
359
|
+
"description": "Maximum number of rows to display",
|
|
360
|
+
"default": "50"
|
|
361
|
+
},
|
|
362
|
+
"verbose": {
|
|
363
|
+
"description": "Show additional details (sourceFile, services)",
|
|
364
|
+
"default": false
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"description": "List all middleware definitions"
|
|
368
|
+
},
|
|
369
|
+
"permissions": {
|
|
370
|
+
"pikkuFuncId": "pikkuInfoPermissions",
|
|
371
|
+
"positionals": [],
|
|
372
|
+
"options": {
|
|
373
|
+
"limit": {
|
|
374
|
+
"description": "Maximum number of rows to display",
|
|
375
|
+
"default": "50"
|
|
376
|
+
},
|
|
377
|
+
"verbose": {
|
|
378
|
+
"description": "Show additional details (sourceFile, services)",
|
|
379
|
+
"default": false
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"description": "List all permission definitions"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
116
385
|
}
|
|
117
386
|
},
|
|
118
387
|
"options": {
|
|
@@ -169,6 +438,7 @@
|
|
|
169
438
|
"schedulerService",
|
|
170
439
|
"deploymentService",
|
|
171
440
|
"aiStorage",
|
|
441
|
+
"content",
|
|
172
442
|
"aiAgentRunner",
|
|
173
443
|
"aiRunState"
|
|
174
444
|
]
|