@pikku/cli 0.12.83 → 0.12.85
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/console-app/assets/{index-CN_U0k_D.js → index-CEv-kj3J.js} +147 -150
- package/console-app/assets/index-CSzCJzBb.css +1 -0
- package/console-app/index.html +2 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +3 -2
- package/dist/.pikku/{http/pikku-http-wirings.gen.d.ts → auth/auth.types.d.ts} +1 -1
- package/dist/.pikku/auth/auth.types.js +5 -0
- 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/cli/pikku-cli-channel.d.ts +4 -4
- 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-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.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.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 +24 -14
- 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 +6 -21
- package/dist/.pikku/function/pikku-functions.gen.js +1 -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/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -5
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -5
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.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/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +1 -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/schemas/register.gen.js +1 -7
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/meta/allWorkflow.gen.json +2 -2
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +8 -2
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/fabric/fabric-commands.d.ts +50 -50
- package/dist/src/fabric/functions/add.function.d.ts +2 -2
- package/dist/src/fabric/functions/addon-verify.function.d.ts +2 -2
- package/dist/src/fabric/functions/db-schema.function.d.ts +2 -2
- package/dist/src/fabric/functions/deploy-list.function.d.ts +2 -2
- package/dist/src/fabric/functions/deploy-units.function.d.ts +2 -2
- package/dist/src/fabric/functions/deploy.function.d.ts +4 -4
- package/dist/src/fabric/functions/domains-add.function.d.ts +2 -2
- package/dist/src/fabric/functions/domains-list.function.d.ts +2 -2
- package/dist/src/fabric/functions/domains-remove.function.d.ts +2 -2
- package/dist/src/fabric/functions/errors.function.d.ts +2 -2
- package/dist/src/fabric/functions/init.function.d.ts +2 -2
- package/dist/src/fabric/functions/link.function.d.ts +2 -2
- package/dist/src/fabric/functions/llm-key.function.d.ts +2 -2
- package/dist/src/fabric/functions/login.function.d.ts +2 -2
- package/dist/src/fabric/functions/logs.function.d.ts +2 -2
- package/dist/src/fabric/functions/metrics.function.d.ts +2 -2
- package/dist/src/fabric/functions/publish.function.d.ts +2 -2
- package/dist/src/fabric/functions/rollback.function.d.ts +2 -2
- package/dist/src/fabric/functions/secrets-list.function.d.ts +2 -2
- package/dist/src/fabric/functions/secrets-set.function.d.ts +2 -2
- package/dist/src/fabric/functions/smoke.function.d.ts +2 -2
- package/dist/src/fabric/functions/status.function.d.ts +2 -2
- package/dist/src/fabric/functions/trace.function.d.ts +2 -2
- package/dist/src/fabric/functions/validate.function.d.ts +2 -2
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/audit.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +2 -2
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +1 -1
- package/dist/src/functions/commands/db-seed.d.ts +1 -1
- package/dist/src/functions/commands/deploy-apply.d.ts +2 -2
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +2 -2
- package/dist/src/functions/commands/dev.d.ts +2 -2
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/enable.d.ts +8 -8
- package/dist/src/functions/commands/import-n8n.d.ts +2 -2
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/login.d.ts +5 -5
- package/dist/src/functions/commands/meta.d.ts +25 -25
- package/dist/src/functions/commands/new-addon.d.ts +13 -2
- package/dist/src/functions/commands/new-addon.js +38 -4
- package/dist/src/functions/commands/new-function.d.ts +2 -2
- package/dist/src/functions/commands/new-middleware.d.ts +2 -2
- package/dist/src/functions/commands/new-permission.d.ts +2 -2
- package/dist/src/functions/commands/new-wiring.d.ts +2 -2
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/scenario.d.ts +3 -3
- package/dist/src/functions/commands/scopes-audit.d.ts +1 -1
- package/dist/src/functions/commands/scopes-prune.d.ts +2 -2
- package/dist/src/functions/commands/serve.d.ts +2 -2
- package/dist/src/functions/commands/skills.d.ts +4 -4
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +2 -2
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/watch.d.ts +2 -2
- package/dist/src/functions/commands/workspace-validate.d.ts +2 -2
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -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.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.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 +3 -2
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +55 -16
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +2 -2
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +23 -12
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/graph/pikku-command-graph-wirings.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +3 -3
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +3 -3
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/scenarios/pikku-command-scenario-functions.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/pikku-command-scopes.d.ts +2 -2
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +2 -2
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/webhook/pikku-command-webhook.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +2 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +8 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/skills/pikku-ai-agent/SKILL.md +3 -3
- package/skills/pikku-services/SKILL.md +34 -0
- package/console-app/assets/index-CpHRlBt-.css +0 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.d.ts +0 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +0 -6
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.json +0 -26
- package/dist/.pikku/http/pikku-http-wirings.gen.js +0 -5
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +0 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +0 -6
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +0 -10
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +0 -4
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +0 -5
- package/dist/.pikku/schemas/schemas/RemoteRPCHandlerInput.schema.json +0 -1
- package/dist/src/scaffold/rpc-remote.gen.d.ts +0 -10
- package/dist/src/scaffold/rpc-remote.gen.js +0 -27
package/console-app/index.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
} catch (e) {}
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="/console/assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="/console/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/console/assets/index-CEv-kj3J.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="/console/assets/index-CSzCJzBb.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="root"></div>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.85
|
|
3
3
|
*/
|
|
4
4
|
import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
|
|
5
5
|
import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
6
6
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
7
7
|
import type { AIAgentMemoryConfig, AIAgentInput } from '@pikku/core/ai-agent';
|
|
8
8
|
import type { AgentMap } from './pikku-agent-map.gen.d.js';
|
|
9
|
-
type
|
|
9
|
+
import type { ScopeId } from '../scopes/pikku-scopes.gen.js';
|
|
10
|
+
type AIAgentConfig<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = Omit<CoreAIAgent<PikkuPermission, PikkuMiddleware, ScopeId>, 'tools' | 'agents' | 'workflows' | 'memory' | 'input' | 'output'> & {
|
|
10
11
|
input?: InputSchema;
|
|
11
12
|
output?: OutputSchema;
|
|
12
13
|
memory?: Omit<AIAgentMemoryConfig, 'workingMemory'> & {
|
|
@@ -6,11 +6,11 @@ export declare const cliHelp: import("../function/pikku-function-types.gen.js").
|
|
|
6
6
|
args?: string[];
|
|
7
7
|
}, {
|
|
8
8
|
help: string;
|
|
9
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").
|
|
9
|
+
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices> | import("../function/pikku-function-types.gen.js").PikkuFunction<{
|
|
10
10
|
args?: string[];
|
|
11
11
|
}, {
|
|
12
12
|
help: string;
|
|
13
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").
|
|
13
|
+
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>;
|
|
14
14
|
export declare const cliRaw: import("../function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
15
15
|
args: string[];
|
|
16
16
|
}, {
|
|
@@ -23,10 +23,10 @@ export declare const cliRaw: import("../function/pikku-function-types.gen.js").P
|
|
|
23
23
|
help?: string;
|
|
24
24
|
result?: unknown;
|
|
25
25
|
error?: string;
|
|
26
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").
|
|
26
|
+
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices> | import("../function/pikku-function-types.gen.js").PikkuFunction<{
|
|
27
27
|
args: string[];
|
|
28
28
|
}, {
|
|
29
29
|
help?: string;
|
|
30
30
|
result?: unknown;
|
|
31
31
|
error?: string;
|
|
32
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").
|
|
32
|
+
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>;
|
|
@@ -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.85
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Core function, middleware, and permission types for all wirings
|
|
@@ -21,6 +21,16 @@ import type { TypedWorkflow, TypedScenario } from '../workflow/pikku-workflow-ty
|
|
|
21
21
|
export type { SingletonServices as SingletonServices };
|
|
22
22
|
export type { Services as Services };
|
|
23
23
|
export type Session = UserSession;
|
|
24
|
+
/**
|
|
25
|
+
* The services a wired function actually receives. The inspector records which
|
|
26
|
+
* services each wired `func`, `permissions` and `middleware` destructures and
|
|
27
|
+
* emits them as `RequiredSingletonServices`; intersecting that here makes those
|
|
28
|
+
* services **non-optional** at every call site. A service is optional only when
|
|
29
|
+
* nothing destructures it — in which case it is never created either. This is
|
|
30
|
+
* why an `if (!service)` guard inside a function body is always dead code.
|
|
31
|
+
*/
|
|
32
|
+
export type WiredSingletonServices = RequiredSingletonServices & SingletonServices;
|
|
33
|
+
export type WiredServices = RequiredSingletonServices & Services;
|
|
24
34
|
/**
|
|
25
35
|
* Inline node configuration for function definitions.
|
|
26
36
|
*/
|
|
@@ -37,18 +47,18 @@ export type NodeConfig = {
|
|
|
37
47
|
* @template In - The input type that the permission check will receive
|
|
38
48
|
* @template RequiredServices - The services required for this permission check
|
|
39
49
|
*/
|
|
40
|
-
export type PikkuPermission<In = unknown, RequiredServices extends Services =
|
|
50
|
+
export type PikkuPermission<In = unknown, RequiredServices extends Services = WiredServices> = CorePikkuPermission<In, RequiredServices, PikkuWire<In, never, false, Session>>;
|
|
41
51
|
/**
|
|
42
52
|
* Type-safe middleware definition that can access your application's services and session.
|
|
43
53
|
* Use this to define reusable middleware that can be applied to multiple wirings.
|
|
44
54
|
*
|
|
45
55
|
* @template RequiredServices - The services required for this middleware
|
|
46
56
|
*/
|
|
47
|
-
export type PikkuMiddleware<RequiredServices extends SingletonServices =
|
|
57
|
+
export type PikkuMiddleware<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuMiddleware<RequiredServices>;
|
|
48
58
|
/**
|
|
49
59
|
* Configuration object for creating a permission with metadata
|
|
50
60
|
*/
|
|
51
|
-
export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services =
|
|
61
|
+
export type PikkuPermissionConfig<In = unknown, RequiredServices extends Services = WiredServices> = {
|
|
52
62
|
/** The permission function */
|
|
53
63
|
func: PikkuPermission<In, RequiredServices>;
|
|
54
64
|
/** Optional human-readable name for the permission */
|
|
@@ -87,11 +97,11 @@ export declare const pikkuPermission: <In>(permission: PikkuPermission<In> | Pik
|
|
|
87
97
|
*
|
|
88
98
|
* @template RequiredServices - The services required for this auth check
|
|
89
99
|
*/
|
|
90
|
-
export type PikkuAuth<RequiredServices extends SingletonServices =
|
|
100
|
+
export type PikkuAuth<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuAuth<RequiredServices, Session>;
|
|
91
101
|
/**
|
|
92
102
|
* Configuration object for creating an auth permission with metadata
|
|
93
103
|
*/
|
|
94
|
-
export type PikkuAuthConfig<RequiredServices extends SingletonServices =
|
|
104
|
+
export type PikkuAuthConfig<RequiredServices extends SingletonServices = WiredSingletonServices> = CorePikkuAuthConfig<RequiredServices, Session>;
|
|
95
105
|
/**
|
|
96
106
|
* Factory function for creating auth-only permissions with tree-shaking support.
|
|
97
107
|
* Auth permissions only receive services and session (no request data),
|
|
@@ -112,11 +122,11 @@ export type PikkuAuthConfig<RequiredServices extends SingletonServices = Singlet
|
|
|
112
122
|
* })
|
|
113
123
|
* \`\`\`
|
|
114
124
|
*/
|
|
115
|
-
export declare const pikkuAuth: <RequiredServices extends SingletonServices =
|
|
125
|
+
export declare const pikkuAuth: <RequiredServices extends SingletonServices = WiredSingletonServices>(auth: PikkuAuth<RequiredServices> | PikkuAuthConfig<RequiredServices>) => PikkuPermission<any, any>;
|
|
116
126
|
/**
|
|
117
127
|
* Configuration object for creating middleware with metadata
|
|
118
128
|
*/
|
|
119
|
-
export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices =
|
|
129
|
+
export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = WiredSingletonServices> = {
|
|
120
130
|
/** The middleware function */
|
|
121
131
|
func: PikkuMiddleware<RequiredServices>;
|
|
122
132
|
/** Optional human-readable name for the middleware */
|
|
@@ -147,7 +157,7 @@ export type PikkuMiddlewareConfig<RequiredServices extends SingletonServices = S
|
|
|
147
157
|
* })
|
|
148
158
|
* ```
|
|
149
159
|
*/
|
|
150
|
-
export declare const pikkuMiddleware: <RequiredServices extends SingletonServices =
|
|
160
|
+
export declare const pikkuMiddleware: <RequiredServices extends SingletonServices = WiredSingletonServices>(middleware: PikkuMiddleware<RequiredServices> | PikkuMiddlewareConfig<RequiredServices>) => PikkuMiddleware<RequiredServices>;
|
|
151
161
|
/**
|
|
152
162
|
* Factory function for creating middleware factories
|
|
153
163
|
* Use this when your middleware needs configuration/input parameters
|
|
@@ -193,7 +203,7 @@ export declare const pikkuPermissionFactory: <In = any>(factory: (input: In) =>
|
|
|
193
203
|
* @template In - The input type (same as the function it describes)
|
|
194
204
|
* @template RequiredServices - The services required for this description function
|
|
195
205
|
*/
|
|
196
|
-
export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services =
|
|
206
|
+
export type PikkuApprovalDescription<In = unknown, RequiredServices extends Services = WiredServices> = (services: RequiredServices, data: In) => Promise<string>;
|
|
197
207
|
/**
|
|
198
208
|
* Factory function for creating approval description functions with tree-shaking support.
|
|
199
209
|
*
|
|
@@ -207,7 +217,7 @@ export type PikkuApprovalDescription<In = unknown, RequiredServices extends Serv
|
|
|
207
217
|
* )
|
|
208
218
|
* ```
|
|
209
219
|
*/
|
|
210
|
-
export declare const pikkuApprovalDescription: <In = unknown, RequiredServices extends Services =
|
|
220
|
+
export declare const pikkuApprovalDescription: <In = unknown, RequiredServices extends Services = WiredServices>(fn: PikkuApprovalDescription<In, RequiredServices>) => PikkuApprovalDescription<In, RequiredServices>;
|
|
211
221
|
/**
|
|
212
222
|
* A sessionless API function that doesn't require user authentication.
|
|
213
223
|
* Use this for public endpoints, health checks, or operations that don't need user context.
|
|
@@ -216,7 +226,7 @@ export declare const pikkuApprovalDescription: <In = unknown, RequiredServices e
|
|
|
216
226
|
* @template Out - The output type that the function returns
|
|
217
227
|
* @template RequiredServices - Services required by this function
|
|
218
228
|
*/
|
|
219
|
-
export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends Services =
|
|
229
|
+
export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends Services = WiredServices> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario>, RequiredWires>>;
|
|
220
230
|
/**
|
|
221
231
|
* A session-aware API function that requires user authentication.
|
|
222
232
|
* Use this for protected endpoints that need access to user session data.
|
|
@@ -225,7 +235,7 @@ export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires ex
|
|
|
225
235
|
* @template Out - The output type that the function returns
|
|
226
236
|
* @template RequiredServices - Services required by this function
|
|
227
237
|
*/
|
|
228
|
-
export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends Services =
|
|
238
|
+
export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends Services = WiredServices> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario>, RequiredWires>>;
|
|
229
239
|
/**
|
|
230
240
|
* Helper type to infer the output type from a Standard Schema
|
|
231
241
|
*/
|
|
@@ -342,7 +352,7 @@ export declare function pikkuSessionlessFunc<In, Out = unknown>(func: PikkuFunct
|
|
|
342
352
|
* })
|
|
343
353
|
* ```
|
|
344
354
|
*/
|
|
345
|
-
export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionConfig<void, void, "session" | "rpc">) => PikkuFunctionConfig<void, void, "rpc" | "session", PikkuFunctionSessionless<void, void, "rpc" | "session",
|
|
355
|
+
export declare const pikkuVoidFunc: (func: PikkuFunctionSessionless<void, void, "session" | "rpc"> | PikkuFunctionConfig<void, void, "session" | "rpc">) => PikkuFunctionConfig<void, void, "rpc" | "session", PikkuFunctionSessionless<void, void, "rpc" | "session", WiredServices> | PikkuFunction<void, void, "rpc" | "session", WiredServices>, undefined, undefined>;
|
|
346
356
|
/**
|
|
347
357
|
* References a registered function by name for use in any wiring.
|
|
348
358
|
* Works for both local and addon functions — resolves via RPC at runtime.
|
|
@@ -1281,7 +1281,7 @@
|
|
|
1281
1281
|
"PikkuNewAddonInput"
|
|
1282
1282
|
],
|
|
1283
1283
|
"outputs": [],
|
|
1284
|
-
"implementationHash": "
|
|
1284
|
+
"implementationHash": "baa095ba82205ff5",
|
|
1285
1285
|
"contractHash": "7ad6280aa8f3e18e",
|
|
1286
1286
|
"inputHash": "87a4bbd4",
|
|
1287
1287
|
"outputHash": "77e837d4"
|
|
@@ -1367,8 +1367,8 @@
|
|
|
1367
1367
|
],
|
|
1368
1368
|
"outputs": [],
|
|
1369
1369
|
"implementationHash": "bff81f186c6a4bf8",
|
|
1370
|
-
"contractHash": "
|
|
1371
|
-
"inputHash": "
|
|
1370
|
+
"contractHash": "d699dbed25674fbe",
|
|
1371
|
+
"inputHash": "83f342c1",
|
|
1372
1372
|
"outputHash": "0d154de9"
|
|
1373
1373
|
},
|
|
1374
1374
|
"pikkuSummary": {
|
|
@@ -1678,7 +1678,7 @@
|
|
|
1678
1678
|
"outputSchemaName": null,
|
|
1679
1679
|
"inputs": [],
|
|
1680
1680
|
"outputs": [],
|
|
1681
|
-
"implementationHash": "
|
|
1681
|
+
"implementationHash": "e5a567c121415ebf",
|
|
1682
1682
|
"middleware": [
|
|
1683
1683
|
{
|
|
1684
1684
|
"type": "wire",
|
|
@@ -2146,7 +2146,7 @@
|
|
|
2146
2146
|
"outputSchemaName": null,
|
|
2147
2147
|
"inputs": [],
|
|
2148
2148
|
"outputs": [],
|
|
2149
|
-
"implementationHash": "
|
|
2149
|
+
"implementationHash": "99b309db8e8700b1",
|
|
2150
2150
|
"middleware": [
|
|
2151
2151
|
{
|
|
2152
2152
|
"type": "wire",
|
|
@@ -3162,7 +3162,7 @@
|
|
|
3162
3162
|
"outputs": [
|
|
3163
3163
|
"PikkuWorkflowOutput"
|
|
3164
3164
|
],
|
|
3165
|
-
"implementationHash": "
|
|
3165
|
+
"implementationHash": "336b447a76456e0a",
|
|
3166
3166
|
"middleware": [
|
|
3167
3167
|
{
|
|
3168
3168
|
"type": "wire",
|
|
@@ -3188,20 +3188,5 @@
|
|
|
3188
3188
|
"contractHash": "5cf046fc5045a072",
|
|
3189
3189
|
"inputHash": "d5ff2f31",
|
|
3190
3190
|
"outputHash": "391c291d"
|
|
3191
|
-
},
|
|
3192
|
-
"remoteRPCHandler": {
|
|
3193
|
-
"pikkuFuncId": "remoteRPCHandler",
|
|
3194
|
-
"functionType": "user",
|
|
3195
|
-
"funcWrapper": "pikkuSessionlessFunc",
|
|
3196
|
-
"sessionless": true,
|
|
3197
|
-
"name": "remoteRPCHandler",
|
|
3198
|
-
"inputSchemaName": "RemoteRPCHandlerInput",
|
|
3199
|
-
"outputSchemaName": null,
|
|
3200
|
-
"inputs": [
|
|
3201
|
-
"RemoteRPCHandlerInput"
|
|
3202
|
-
],
|
|
3203
|
-
"outputs": [],
|
|
3204
|
-
"remote": true,
|
|
3205
|
-
"implementationHash": "105018a823bdb551"
|
|
3206
3191
|
}
|
|
3207
3192
|
}
|
|
@@ -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.85
|
|
3
3
|
*/
|
|
4
4
|
/* Import and register functions used by RPCs */
|
|
5
5
|
import { addFunction } from '@pikku/core/function';
|
|
@@ -80,7 +80,6 @@ import { pikkuWebhook } from '../../src/functions/wirings/webhook/pikku-command-
|
|
|
80
80
|
import { pikkuWebSocketTyped } from '../../src/functions/runtimes/websocket/pikku-command-websocket-typed.js';
|
|
81
81
|
import { pikkuWorkflow } from '../../src/functions/wirings/workflow/pikku-command-workflow.js';
|
|
82
82
|
import { pikkuWorkflowRoutes } from '../../src/functions/wirings/workflow/pikku-command-workflow-routes.js';
|
|
83
|
-
import { remoteRPCHandler } from '../../src/scaffold/rpc-remote.gen.js';
|
|
84
83
|
import { scopesAudit } from '../../src/functions/commands/scopes-audit.js';
|
|
85
84
|
import { scopesPrune } from '../../src/functions/commands/scopes-prune.js';
|
|
86
85
|
import { serve } from '../../src/functions/commands/serve.js';
|
|
@@ -162,7 +161,6 @@ addFunction('pikkuWebhook', pikkuWebhook);
|
|
|
162
161
|
addFunction('pikkuWebSocketTyped', pikkuWebSocketTyped);
|
|
163
162
|
addFunction('pikkuWorkflow', pikkuWorkflow);
|
|
164
163
|
addFunction('pikkuWorkflowRoutes', pikkuWorkflowRoutes);
|
|
165
|
-
addFunction('remoteRPCHandler', remoteRPCHandler);
|
|
166
164
|
addFunction('scopesAudit', scopesAudit);
|
|
167
165
|
addFunction('scopesPrune', scopesPrune);
|
|
168
166
|
addFunction('serve', serve);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.85
|
|
3
3
|
*/
|
|
4
4
|
import './rpc/pikku-rpc-wirings-meta.internal.gen.js';
|
|
5
|
-
import './http/pikku-http-wirings-meta.gen.js';
|
|
6
5
|
import './function/pikku-functions-meta.gen.js';
|
|
7
|
-
import './queue/pikku-queue-workers-wirings-meta.gen.js';
|
|
8
6
|
import './cli/pikku-cli-wirings-meta.gen.js';
|
|
9
7
|
import './schemas/register.gen.js';
|
|
10
|
-
import './http/pikku-http-wirings.gen.js';
|
|
11
8
|
import './function/pikku-functions.gen.js';
|
|
12
9
|
import './workflow/pikku-workflow-wirings.gen.js';
|
|
13
|
-
import './queue/pikku-queue-workers-wirings.gen.js';
|
|
14
10
|
import './cli/pikku-cli-wirings.gen.js';
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.85
|
|
3
3
|
*/
|
|
4
4
|
import './rpc/pikku-rpc-wirings-meta.internal.gen.js';
|
|
5
|
-
import './http/pikku-http-wirings-meta.gen.js';
|
|
6
5
|
import './function/pikku-functions-meta.gen.js';
|
|
7
|
-
import './queue/pikku-queue-workers-wirings-meta.gen.js';
|
|
8
6
|
import './cli/pikku-cli-wirings-meta.gen.js';
|
|
9
7
|
import './schemas/register.gen.js';
|
|
10
|
-
import './http/pikku-http-wirings.gen.js';
|
|
11
8
|
import './function/pikku-functions.gen.js';
|
|
12
9
|
import './workflow/pikku-workflow-wirings.gen.js';
|
|
13
|
-
import './queue/pikku-queue-workers-wirings.gen.js';
|
|
14
10
|
import './cli/pikku-cli-wirings.gen.js';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.85
|
|
3
3
|
*/
|
|
4
4
|
import { addSchema } from '@pikku/core/schema';
|
|
5
5
|
import * as BinaryInput from './schemas/BinaryInput.schema.json' with { type: 'json' };
|
|
6
6
|
addSchema('BinaryInput', BinaryInput);
|
|
7
|
-
import * as BootstrapInput from './schemas/BootstrapInput.schema.json' with { type: 'json' };
|
|
8
|
-
addSchema('BootstrapInput', BootstrapInput);
|
|
9
7
|
import * as DbAuditInput from './schemas/DbAuditInput.schema.json' with { type: 'json' };
|
|
10
8
|
addSchema('DbAuditInput', DbAuditInput);
|
|
11
9
|
import * as DbGenerateInput from './schemas/DbGenerateInput.schema.json' with { type: 'json' };
|
|
@@ -128,8 +126,6 @@ import * as PikkuAIAgentOutput from './schemas/PikkuAIAgentOutput.schema.json' w
|
|
|
128
126
|
addSchema('PikkuAIAgentOutput', PikkuAIAgentOutput);
|
|
129
127
|
import * as PikkuAuthInput from './schemas/PikkuAuthInput.schema.json' with { type: 'json' };
|
|
130
128
|
addSchema('PikkuAuthInput', PikkuAuthInput);
|
|
131
|
-
import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
|
|
132
|
-
addSchema('PikkuCLIConfig', PikkuCLIConfig);
|
|
133
129
|
import * as PikkuCLIEntryOutput from './schemas/PikkuCLIEntryOutput.schema.json' with { type: 'json' };
|
|
134
130
|
addSchema('PikkuCLIEntryOutput', PikkuCLIEntryOutput);
|
|
135
131
|
import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
|
|
@@ -252,8 +248,6 @@ import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json'
|
|
|
252
248
|
addSchema('PikkuWorkflowOutput', PikkuWorkflowOutput);
|
|
253
249
|
import * as PikkuWorkflowRoutesOutput from './schemas/PikkuWorkflowRoutesOutput.schema.json' with { type: 'json' };
|
|
254
250
|
addSchema('PikkuWorkflowRoutesOutput', PikkuWorkflowRoutesOutput);
|
|
255
|
-
import * as RemoteRPCHandlerInput from './schemas/RemoteRPCHandlerInput.schema.json' with { type: 'json' };
|
|
256
|
-
addSchema('RemoteRPCHandlerInput', RemoteRPCHandlerInput);
|
|
257
251
|
import * as ScenarioListInput from './schemas/ScenarioListInput.schema.json' with { type: 'json' };
|
|
258
252
|
addSchema('ScenarioListInput', ScenarioListInput);
|
|
259
253
|
import * as ScenarioRunInput from './schemas/ScenarioRunInput.schema.json' with { type: 'json' };
|