@pikku/addon-graph 0.0.2 → 0.12.0
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/.pikku/addon/pikku-addon-types.gen.ts +30 -3
- package/.pikku/addon/pikku-package.gen.ts +3 -1
- package/.pikku/agent/pikku-agent-map.gen.d.ts +2 -14
- package/.pikku/agent/pikku-agent-types.gen.ts +13 -7
- package/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/.pikku/cli/pikku-cli-types.gen.ts +105 -0
- package/.pikku/console/pikku-addon-meta.gen.json +281 -0
- package/.pikku/console/pikku-node-types.gen.ts +2 -2
- package/.pikku/function/pikku-function-types.gen.ts +70 -34
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +274 -196
- package/.pikku/function/pikku-functions-meta.gen.json +160 -144
- package/.pikku/function/pikku-functions-meta.gen.ts +1 -1
- package/.pikku/function/pikku-functions.gen.ts +4 -2
- package/.pikku/http/pikku-http-types.gen.ts +147 -0
- package/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/.pikku/pikku-bootstrap.gen.ts +2 -9
- package/.pikku/pikku-meta-service.gen.ts +10 -0
- package/.pikku/pikku-services.gen.ts +10 -3
- package/.pikku/pikku-types.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +212 -194
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +221 -202
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/.pikku/schemas/register.gen.ts +69 -65
- package/.pikku/schemas/schemas/SleepInput.schema.json +1 -0
- package/.pikku/secrets/pikku-secret-types.gen.ts +1 -1
- package/.pikku/secrets/pikku-secrets.gen.ts +1 -1
- package/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
- package/.pikku/variables/pikku-variable-types.gen.ts +1 -1
- package/.pikku/variables/pikku-variables.gen.ts +1 -1
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
- package/.pikku/workflow/pikku-workflow-types.gen.ts +66 -57
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +1 -1
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +18 -2
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +25 -2
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +30 -3
- package/dist/.pikku/addon/pikku-package.gen.js +2 -1
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.ts +3 -1
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +2 -14
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.ts +13 -7
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +78 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts.map +1 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.js +61 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.js.map +1 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.ts +105 -0
- package/dist/.pikku/console/pikku-addon-meta.gen.json +281 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +2 -2
- package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.ts +2 -2
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +56 -30
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +31 -19
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.ts +70 -34
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +274 -196
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +160 -144
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
- package/dist/.pikku/function/pikku-functions.gen.js +4 -2
- package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-functions.gen.ts +4 -2
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.ts +147 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +4 -2
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +2 -10
- package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.ts +2 -9
- package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
- package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.js +10 -0
- package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.ts +10 -0
- package/dist/.pikku/pikku-services.gen.d.ts +8 -3
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +7 -1
- package/dist/.pikku/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/pikku-services.gen.ts +10 -3
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/pikku-types.gen.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +24 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +212 -194
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +221 -202
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +27 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/dist/.pikku/schemas/register.gen.js +35 -33
- package/dist/.pikku/schemas/register.gen.js.map +1 -1
- package/dist/.pikku/schemas/register.gen.ts +69 -65
- package/dist/.pikku/schemas/schemas/SleepInput.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-secret-types.gen.ts +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/secrets/pikku-secrets.gen.ts +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/trigger/pikku-trigger-types.gen.ts +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-variable-types.gen.ts +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/variables/pikku-variables.gen.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +36 -27
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -18
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +66 -57
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +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/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
- package/dist/src/functions/data/jwt.function.d.ts.map +1 -1
- package/dist/src/functions/data/jwt.function.js +3 -2
- package/dist/src/functions/data/jwt.function.js.map +1 -1
- package/dist/src/functions/data/sleep.function.d.ts +16 -0
- package/dist/src/functions/data/sleep.function.d.ts.map +1 -0
- package/dist/src/functions/data/sleep.function.js +18 -0
- package/dist/src/functions/data/sleep.function.js.map +1 -0
- package/package.json +3 -2
- package/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
- package/.pikku/agent/pikku-agent-wirings-meta.gen.ts +0 -7
- package/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts +0 -2
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +0 -7
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.ts +0 -7
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +0 -5
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js +0 -5
- package/dist/.pikku/agent/pikku-agent-wirings.gen.js.map +0 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
5
|
-
try {
|
|
6
|
-
const { fileURLToPath: __fileURLToPath } = await import('url')
|
|
7
|
-
const { dirname: __dirname } = await import('path')
|
|
8
|
-
__pikkuState('@pikku/addon-graph', 'package', 'metaDir', __dirname(__fileURLToPath(import.meta.url)))
|
|
9
|
-
} catch {}
|
|
10
|
-
import './agent/pikku-agent-wirings-meta.gen.js'
|
|
4
|
+
import './rpc/pikku-rpc-wirings-meta.internal.gen.js'
|
|
11
5
|
import './function/pikku-functions-meta.gen.js'
|
|
12
6
|
import './addon/pikku-package.gen.js'
|
|
13
|
-
import './agent/pikku-agent-wirings.gen.js'
|
|
14
7
|
import './schemas/register.gen.js'
|
|
15
8
|
import './function/pikku-functions.gen.js'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
+
*/
|
|
4
|
+
import { LocalMetaService } from '@pikku/core/services/local-meta'
|
|
5
|
+
|
|
6
|
+
export class PikkuMetaService extends LocalMetaService {
|
|
7
|
+
constructor() {
|
|
8
|
+
super('/home/runner/work/pikku/pikku/packages/addon/pikku-graph/.pikku')
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
3
|
*/
|
|
4
4
|
import type { SingletonServices } from '../types/application-types.d.js'
|
|
5
5
|
import type { Services } from '../types/application-types.d.js'
|
|
6
6
|
|
|
7
7
|
// Singleton services map: true if required, false if available but unused
|
|
8
8
|
export const requiredSingletonServices = {
|
|
9
|
+
'agentRunService': false,
|
|
9
10
|
'aiAgentRunner': false,
|
|
10
11
|
'aiRunState': false,
|
|
11
12
|
'aiStorage': false,
|
|
12
13
|
'config': true,
|
|
13
14
|
'content': false,
|
|
15
|
+
'credentialService': false,
|
|
14
16
|
'deploymentService': false,
|
|
15
|
-
'jwt':
|
|
17
|
+
'jwt': true,
|
|
16
18
|
'logger': true,
|
|
19
|
+
'metaService': false,
|
|
17
20
|
'queueService': false,
|
|
18
21
|
'schedulerService': false,
|
|
19
22
|
'schema': true,
|
|
20
23
|
'secrets': true,
|
|
21
24
|
'variables': true,
|
|
25
|
+
'workflowRunService': false,
|
|
22
26
|
'workflowService': false,
|
|
23
27
|
} as const
|
|
24
28
|
|
|
@@ -27,6 +31,9 @@ export const requiredWireServices = {
|
|
|
27
31
|
} as const
|
|
28
32
|
|
|
29
33
|
// Type exports
|
|
30
|
-
export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'logger' | 'schema' | 'secrets' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'logger' | 'schema' | 'secrets' | 'variables'>>
|
|
34
|
+
export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'jwt' | 'logger' | 'schema' | 'secrets' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'jwt' | 'logger' | 'schema' | 'secrets' | 'variables'>>
|
|
31
35
|
|
|
32
36
|
export type RequiredWireServices = Partial<Services>
|
|
37
|
+
|
|
38
|
+
// Services this addon needs from the parent project
|
|
39
|
+
export const requiredParentServices = ["jwt"] as const
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Queue-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { CoreQueueWorker, wireQueueWorker as wireQueueWorkerCore } from '@pikku/core/queue'
|
|
9
|
+
import type { PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Type definition for queue workers that process background jobs.
|
|
13
|
+
*
|
|
14
|
+
* @template In - Input type for the queue job
|
|
15
|
+
* @template Out - Output type for the queue job
|
|
16
|
+
*/
|
|
17
|
+
type QueueWiring<In, Out> = CoreQueueWorker<PikkuFunctionConfig<In, Out, 'session' | 'rpc'>>
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Registers a queue worker with the Pikku framework.
|
|
21
|
+
* Workers process background jobs from queues.
|
|
22
|
+
*
|
|
23
|
+
* @param queueWorker - Queue worker definition with job handler
|
|
24
|
+
*/
|
|
25
|
+
export const wireQueueWorker = (queueWorker: QueueWiring<any, any>) => {
|
|
26
|
+
wireQueueWorkerCore(queueWorker as any)
|
|
27
|
+
}
|
|
@@ -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.19
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* This provides the structure needed for typescript to be aware of RPCs and their return types
|
|
@@ -9,6 +9,34 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
export type AggregateInput = {
|
|
13
|
+
/** The array of items to aggregate */
|
|
14
|
+
items: {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}[];
|
|
17
|
+
/** The field path to collect values from */
|
|
18
|
+
field: string;
|
|
19
|
+
/** The name of the output field containing the list */
|
|
20
|
+
outputField?: string | undefined;
|
|
21
|
+
/** Only include unique values */
|
|
22
|
+
unique?: boolean | undefined;
|
|
23
|
+
}
|
|
24
|
+
export type AggregateOutput = {
|
|
25
|
+
/** The output object with aggregated values */
|
|
26
|
+
item: {
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export type ChunkInput = {
|
|
31
|
+
/** The array to split into chunks */
|
|
32
|
+
items: unknown[];
|
|
33
|
+
/** Size of each chunk */
|
|
34
|
+
size: number;
|
|
35
|
+
}
|
|
36
|
+
export type ChunkOutput = {
|
|
37
|
+
/** Array of chunks */
|
|
38
|
+
chunks: unknown[][];
|
|
39
|
+
}
|
|
12
40
|
export type CoalesceInput = {
|
|
13
41
|
/** Values to check in order */
|
|
14
42
|
values: unknown[];
|
|
@@ -65,113 +93,29 @@ export type DateTimeOutput = {
|
|
|
65
93
|
/** Unix timestamp in milliseconds */
|
|
66
94
|
timestamp: number;
|
|
67
95
|
}
|
|
68
|
-
export type
|
|
69
|
-
/** The
|
|
70
|
-
|
|
71
|
-
/** Token expiration time */
|
|
72
|
-
expiresIn: {
|
|
73
|
-
/** Duration value */
|
|
74
|
-
value: number;
|
|
75
|
-
/** Time unit */
|
|
76
|
-
unit: "second" | "minute" | "hour" | "day" | "week" | "year";
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export type JwtSignOutput = {
|
|
80
|
-
/** The signed JWT token */
|
|
81
|
-
token: string;
|
|
82
|
-
}
|
|
83
|
-
export type JwtDecodeInput = {
|
|
84
|
-
/** The JWT token to decode */
|
|
85
|
-
token: string;
|
|
86
|
-
}
|
|
87
|
-
export type JwtDecodeOutput = {
|
|
88
|
-
/** The decoded payload */
|
|
89
|
-
payload: any;
|
|
90
|
-
}
|
|
91
|
-
export type MathInput = {
|
|
92
|
-
/** The math operation to perform */
|
|
93
|
-
operation: "add" | "subtract" | "multiply" | "divide" | "modulo" | "power" | "sqrt" | "abs" | "round" | "floor" | "ceil" | "min" | "max" | "random";
|
|
94
|
-
/** First operand */
|
|
95
|
-
a?: number | undefined;
|
|
96
|
-
/** Second operand (for binary operations) */
|
|
97
|
-
b?: number | undefined;
|
|
98
|
-
/** Decimal places for round operation */
|
|
99
|
-
decimals?: number | undefined;
|
|
100
|
-
}
|
|
101
|
-
export type MathOutput = {
|
|
102
|
-
/** The result of the operation */
|
|
103
|
-
result: number;
|
|
104
|
-
}
|
|
105
|
-
export type StringTransformInput = {
|
|
106
|
-
/** The input string */
|
|
107
|
-
value: string;
|
|
108
|
-
/** The transformation to apply */
|
|
109
|
-
operation: "uppercase" | "lowercase" | "capitalize" | "camelCase" | "snakeCase" | "kebabCase" | "trim" | "trimStart" | "trimEnd" | "split" | "replace" | "slice" | "padStart" | "padEnd";
|
|
110
|
-
/** Separator for split operation */
|
|
111
|
-
separator?: string | undefined;
|
|
112
|
-
/** Search string for replace operation */
|
|
113
|
-
search?: string | undefined;
|
|
114
|
-
/** Replacement string for replace operation */
|
|
115
|
-
replacement?: string | undefined;
|
|
116
|
-
/** Replace all occurrences */
|
|
117
|
-
replaceAll?: boolean | undefined;
|
|
118
|
-
/** Start index for slice */
|
|
119
|
-
start?: number | undefined;
|
|
120
|
-
/** End index for slice */
|
|
121
|
-
end?: number | undefined;
|
|
122
|
-
/** Target length for pad operations */
|
|
123
|
-
length?: number | undefined;
|
|
124
|
-
/** Character to pad with */
|
|
125
|
-
padChar?: string | undefined;
|
|
126
|
-
}
|
|
127
|
-
export type StringTransformOutput = {
|
|
128
|
-
/** The transformed result */
|
|
129
|
-
result: string | string[];
|
|
130
|
-
}
|
|
131
|
-
export type TypeConvertInput = {
|
|
132
|
-
/** The value to convert */
|
|
133
|
-
value: unknown;
|
|
134
|
-
/** Target type */
|
|
135
|
-
to: "string" | "number" | "boolean" | "json" | "array";
|
|
136
|
-
/** Radix for number parsing (e.g., 10, 16) */
|
|
137
|
-
radix?: number | undefined;
|
|
138
|
-
}
|
|
139
|
-
export type TypeConvertOutput = {
|
|
140
|
-
/** The converted value */
|
|
141
|
-
result: unknown;
|
|
142
|
-
/** Whether the conversion succeeded */
|
|
143
|
-
success: boolean;
|
|
144
|
-
/** The original type of the value */
|
|
145
|
-
originalType: string;
|
|
146
|
-
}
|
|
147
|
-
export type AggregateInput = {
|
|
148
|
-
/** The array of items to aggregate */
|
|
149
|
-
items: {
|
|
96
|
+
export type EditFieldsInput = {
|
|
97
|
+
/** The input object to transform */
|
|
98
|
+
item: {
|
|
150
99
|
[key: string]: unknown;
|
|
100
|
+
};
|
|
101
|
+
/** List of field operations to perform */
|
|
102
|
+
operations: {
|
|
103
|
+
/** The field path to operate on (supports dot notation) */
|
|
104
|
+
field: string;
|
|
105
|
+
/** The operation to perform */
|
|
106
|
+
operation: "set" | "remove" | "rename";
|
|
107
|
+
/** The value to set (for set operation) */
|
|
108
|
+
value?: unknown | undefined;
|
|
109
|
+
/** The new field name (for rename operation) */
|
|
110
|
+
newName?: string | undefined;
|
|
151
111
|
}[];
|
|
152
|
-
/** The field path to collect values from */
|
|
153
|
-
field: string;
|
|
154
|
-
/** The name of the output field containing the list */
|
|
155
|
-
outputField?: string | undefined;
|
|
156
|
-
/** Only include unique values */
|
|
157
|
-
unique?: boolean | undefined;
|
|
158
112
|
}
|
|
159
|
-
export type
|
|
160
|
-
/** The
|
|
113
|
+
export type EditFieldsOutput = {
|
|
114
|
+
/** The transformed object */
|
|
161
115
|
item: {
|
|
162
116
|
[key: string]: unknown;
|
|
163
117
|
};
|
|
164
118
|
}
|
|
165
|
-
export type ChunkInput = {
|
|
166
|
-
/** The array to split into chunks */
|
|
167
|
-
items: unknown[];
|
|
168
|
-
/** Size of each chunk */
|
|
169
|
-
size: number;
|
|
170
|
-
}
|
|
171
|
-
export type ChunkOutput = {
|
|
172
|
-
/** Array of chunks */
|
|
173
|
-
chunks: unknown[][];
|
|
174
|
-
}
|
|
175
119
|
export type FindInput = {
|
|
176
120
|
/** The array to search */
|
|
177
121
|
items: {
|
|
@@ -210,6 +154,29 @@ export type GroupByOutput = {
|
|
|
210
154
|
}[];
|
|
211
155
|
};
|
|
212
156
|
}
|
|
157
|
+
export type JwtDecodeInput = {
|
|
158
|
+
/** The JWT token to decode */
|
|
159
|
+
token: string;
|
|
160
|
+
}
|
|
161
|
+
export type JwtDecodeOutput = {
|
|
162
|
+
/** The decoded payload */
|
|
163
|
+
payload: any;
|
|
164
|
+
}
|
|
165
|
+
export type JwtSignInput = {
|
|
166
|
+
/** The payload to encode into the JWT */
|
|
167
|
+
payload: any;
|
|
168
|
+
/** Token expiration time */
|
|
169
|
+
expiresIn: {
|
|
170
|
+
/** Duration value */
|
|
171
|
+
value: number;
|
|
172
|
+
/** Time unit */
|
|
173
|
+
unit: "second" | "minute" | "hour" | "day" | "week" | "year";
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
export type JwtSignOutput = {
|
|
177
|
+
/** The signed JWT token */
|
|
178
|
+
token: string;
|
|
179
|
+
}
|
|
213
180
|
export type LimitInput = {
|
|
214
181
|
/** The array of items to limit */
|
|
215
182
|
items: unknown[];
|
|
@@ -224,6 +191,62 @@ export type LimitOutput = {
|
|
|
224
191
|
/** The original total count before limiting */
|
|
225
192
|
totalCount: number;
|
|
226
193
|
}
|
|
194
|
+
export type MathInput = {
|
|
195
|
+
/** The math operation to perform */
|
|
196
|
+
operation: "add" | "subtract" | "multiply" | "divide" | "modulo" | "power" | "sqrt" | "abs" | "round" | "floor" | "ceil" | "min" | "max" | "random";
|
|
197
|
+
/** First operand */
|
|
198
|
+
a?: number | undefined;
|
|
199
|
+
/** Second operand (for binary operations) */
|
|
200
|
+
b?: number | undefined;
|
|
201
|
+
/** Decimal places for round operation */
|
|
202
|
+
decimals?: number | undefined;
|
|
203
|
+
}
|
|
204
|
+
export type MathOutput = {
|
|
205
|
+
/** The result of the operation */
|
|
206
|
+
result: number;
|
|
207
|
+
}
|
|
208
|
+
export type MergeInput = {
|
|
209
|
+
/** Objects to merge (later objects override earlier ones) */
|
|
210
|
+
items: {
|
|
211
|
+
[key: string]: unknown;
|
|
212
|
+
}[];
|
|
213
|
+
/** Perform deep merge of nested objects */
|
|
214
|
+
deep?: boolean | undefined;
|
|
215
|
+
}
|
|
216
|
+
export type MergeOutput = {
|
|
217
|
+
/** The merged object */
|
|
218
|
+
item: {
|
|
219
|
+
[key: string]: unknown;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
export type OmitInput = {
|
|
223
|
+
/** The input object */
|
|
224
|
+
item: {
|
|
225
|
+
[key: string]: unknown;
|
|
226
|
+
};
|
|
227
|
+
/** Fields to remove */
|
|
228
|
+
fields: string[];
|
|
229
|
+
}
|
|
230
|
+
export type OmitOutput = {
|
|
231
|
+
/** Object without the specified fields */
|
|
232
|
+
item: {
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
export type PickInput = {
|
|
237
|
+
/** The input object */
|
|
238
|
+
item: {
|
|
239
|
+
[key: string]: unknown;
|
|
240
|
+
};
|
|
241
|
+
/** Fields to keep (supports dot notation for nested fields) */
|
|
242
|
+
fields: string[];
|
|
243
|
+
}
|
|
244
|
+
export type PickOutput = {
|
|
245
|
+
/** Object with only the specified fields */
|
|
246
|
+
item: {
|
|
247
|
+
[key: string]: unknown;
|
|
248
|
+
};
|
|
249
|
+
}
|
|
227
250
|
export type RemoveDuplicatesInput = {
|
|
228
251
|
/** The array of items to deduplicate */
|
|
229
252
|
items: {
|
|
@@ -242,6 +265,27 @@ export type RemoveDuplicatesOutput = {
|
|
|
242
265
|
/** Number of duplicates removed */
|
|
243
266
|
removedCount: number;
|
|
244
267
|
}
|
|
268
|
+
export type RenameKeysInput = {
|
|
269
|
+
/** The input object to transform */
|
|
270
|
+
item: {
|
|
271
|
+
[key: string]: unknown;
|
|
272
|
+
};
|
|
273
|
+
/** List of key rename mappings */
|
|
274
|
+
mappings: {
|
|
275
|
+
/** The original key name */
|
|
276
|
+
oldKey: string;
|
|
277
|
+
/** The new key name */
|
|
278
|
+
newKey: string;
|
|
279
|
+
}[];
|
|
280
|
+
/** Whether to keep keys that are not in the mapping */
|
|
281
|
+
keepUnmapped?: boolean | undefined;
|
|
282
|
+
}
|
|
283
|
+
export type RenameKeysOutput = {
|
|
284
|
+
/** The transformed object with renamed keys */
|
|
285
|
+
item: {
|
|
286
|
+
[key: string]: unknown;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
245
289
|
export type ReverseInput = {
|
|
246
290
|
/** The array to reverse */
|
|
247
291
|
items: unknown[];
|
|
@@ -250,6 +294,12 @@ export type ReverseOutput = {
|
|
|
250
294
|
/** The reversed array */
|
|
251
295
|
items: unknown[];
|
|
252
296
|
}
|
|
297
|
+
export type SleepInput = {
|
|
298
|
+
/** A unique name for this sleep step */
|
|
299
|
+
name: string;
|
|
300
|
+
/** Duration to sleep in milliseconds */
|
|
301
|
+
ms: number;
|
|
302
|
+
}
|
|
253
303
|
export type SortInput = {
|
|
254
304
|
/** The array of items to sort */
|
|
255
305
|
items: {
|
|
@@ -285,6 +335,32 @@ export type SplitOutOutput = {
|
|
|
285
335
|
[key: string]: unknown;
|
|
286
336
|
}[];
|
|
287
337
|
}
|
|
338
|
+
export type StringTransformInput = {
|
|
339
|
+
/** The input string */
|
|
340
|
+
value: string;
|
|
341
|
+
/** The transformation to apply */
|
|
342
|
+
operation: "uppercase" | "lowercase" | "capitalize" | "camelCase" | "snakeCase" | "kebabCase" | "trim" | "trimStart" | "trimEnd" | "split" | "replace" | "slice" | "padStart" | "padEnd";
|
|
343
|
+
/** Separator for split operation */
|
|
344
|
+
separator?: string | undefined;
|
|
345
|
+
/** Search string for replace operation */
|
|
346
|
+
search?: string | undefined;
|
|
347
|
+
/** Replacement string for replace operation */
|
|
348
|
+
replacement?: string | undefined;
|
|
349
|
+
/** Replace all occurrences */
|
|
350
|
+
replaceAll?: boolean | undefined;
|
|
351
|
+
/** Start index for slice */
|
|
352
|
+
start?: number | undefined;
|
|
353
|
+
/** End index for slice */
|
|
354
|
+
end?: number | undefined;
|
|
355
|
+
/** Target length for pad operations */
|
|
356
|
+
length?: number | undefined;
|
|
357
|
+
/** Character to pad with */
|
|
358
|
+
padChar?: string | undefined;
|
|
359
|
+
}
|
|
360
|
+
export type StringTransformOutput = {
|
|
361
|
+
/** The transformed result */
|
|
362
|
+
result: string | string[];
|
|
363
|
+
}
|
|
288
364
|
export type SummarizeInput = {
|
|
289
365
|
/** The array of items to summarize */
|
|
290
366
|
items: {
|
|
@@ -308,6 +384,22 @@ export type SummarizeOutput = {
|
|
|
308
384
|
[key: string]: unknown;
|
|
309
385
|
}[];
|
|
310
386
|
}
|
|
387
|
+
export type TypeConvertInput = {
|
|
388
|
+
/** The value to convert */
|
|
389
|
+
value: unknown;
|
|
390
|
+
/** Target type */
|
|
391
|
+
to: "string" | "number" | "boolean" | "json" | "array";
|
|
392
|
+
/** Radix for number parsing (e.g., 10, 16) */
|
|
393
|
+
radix?: number | undefined;
|
|
394
|
+
}
|
|
395
|
+
export type TypeConvertOutput = {
|
|
396
|
+
/** The converted value */
|
|
397
|
+
result: unknown;
|
|
398
|
+
/** Whether the conversion succeeded */
|
|
399
|
+
success: boolean;
|
|
400
|
+
/** The original type of the value */
|
|
401
|
+
originalType: string;
|
|
402
|
+
}
|
|
311
403
|
export type UniqueInput = {
|
|
312
404
|
/** The array to get unique values from */
|
|
313
405
|
items: unknown[];
|
|
@@ -318,92 +410,6 @@ export type UniqueOutput = {
|
|
|
318
410
|
/** Array with only unique values */
|
|
319
411
|
items: unknown[];
|
|
320
412
|
}
|
|
321
|
-
export type EditFieldsInput = {
|
|
322
|
-
/** The input object to transform */
|
|
323
|
-
item: {
|
|
324
|
-
[key: string]: unknown;
|
|
325
|
-
};
|
|
326
|
-
/** List of field operations to perform */
|
|
327
|
-
operations: {
|
|
328
|
-
/** The field path to operate on (supports dot notation) */
|
|
329
|
-
field: string;
|
|
330
|
-
/** The operation to perform */
|
|
331
|
-
operation: "set" | "remove" | "rename";
|
|
332
|
-
/** The value to set (for set operation) */
|
|
333
|
-
value?: unknown | undefined;
|
|
334
|
-
/** The new field name (for rename operation) */
|
|
335
|
-
newName?: string | undefined;
|
|
336
|
-
}[];
|
|
337
|
-
}
|
|
338
|
-
export type EditFieldsOutput = {
|
|
339
|
-
/** The transformed object */
|
|
340
|
-
item: {
|
|
341
|
-
[key: string]: unknown;
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
export type MergeInput = {
|
|
345
|
-
/** Objects to merge (later objects override earlier ones) */
|
|
346
|
-
items: {
|
|
347
|
-
[key: string]: unknown;
|
|
348
|
-
}[];
|
|
349
|
-
/** Perform deep merge of nested objects */
|
|
350
|
-
deep?: boolean | undefined;
|
|
351
|
-
}
|
|
352
|
-
export type MergeOutput = {
|
|
353
|
-
/** The merged object */
|
|
354
|
-
item: {
|
|
355
|
-
[key: string]: unknown;
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
export type OmitInput = {
|
|
359
|
-
/** The input object */
|
|
360
|
-
item: {
|
|
361
|
-
[key: string]: unknown;
|
|
362
|
-
};
|
|
363
|
-
/** Fields to remove */
|
|
364
|
-
fields: string[];
|
|
365
|
-
}
|
|
366
|
-
export type OmitOutput = {
|
|
367
|
-
/** Object without the specified fields */
|
|
368
|
-
item: {
|
|
369
|
-
[key: string]: unknown;
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
export type PickInput = {
|
|
373
|
-
/** The input object */
|
|
374
|
-
item: {
|
|
375
|
-
[key: string]: unknown;
|
|
376
|
-
};
|
|
377
|
-
/** Fields to keep (supports dot notation for nested fields) */
|
|
378
|
-
fields: string[];
|
|
379
|
-
}
|
|
380
|
-
export type PickOutput = {
|
|
381
|
-
/** Object with only the specified fields */
|
|
382
|
-
item: {
|
|
383
|
-
[key: string]: unknown;
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
export type RenameKeysInput = {
|
|
387
|
-
/** The input object to transform */
|
|
388
|
-
item: {
|
|
389
|
-
[key: string]: unknown;
|
|
390
|
-
};
|
|
391
|
-
/** List of key rename mappings */
|
|
392
|
-
mappings: {
|
|
393
|
-
/** The original key name */
|
|
394
|
-
oldKey: string;
|
|
395
|
-
/** The new key name */
|
|
396
|
-
newKey: string;
|
|
397
|
-
}[];
|
|
398
|
-
/** Whether to keep keys that are not in the mapping */
|
|
399
|
-
keepUnmapped?: boolean | undefined;
|
|
400
|
-
}
|
|
401
|
-
export type RenameKeysOutput = {
|
|
402
|
-
/** The transformed object with renamed keys */
|
|
403
|
-
item: {
|
|
404
|
-
[key: string]: unknown;
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
413
|
|
|
408
414
|
interface RPCHandler<I, O> {
|
|
409
415
|
input: I;
|
|
@@ -420,16 +426,18 @@ export type FlattenedRPCMap = RPCMap
|
|
|
420
426
|
|
|
421
427
|
|
|
422
428
|
export type RPCInvoke = <Name extends keyof FlattenedRPCMap>(
|
|
423
|
-
|
|
424
|
-
|
|
429
|
+
...args: FlattenedRPCMap[Name]['input'] extends void | null
|
|
430
|
+
? [name: Name]
|
|
431
|
+
: [name: Name, data: FlattenedRPCMap[Name]['input']]
|
|
425
432
|
) => Promise<FlattenedRPCMap[Name]['output']>
|
|
426
433
|
|
|
427
434
|
export type RPCRemote = <Name extends keyof FlattenedRPCMap>(
|
|
428
|
-
|
|
429
|
-
|
|
435
|
+
...args: FlattenedRPCMap[Name]['input'] extends void | null
|
|
436
|
+
? [name: Name]
|
|
437
|
+
: [name: Name, data: FlattenedRPCMap[Name]['input']]
|
|
430
438
|
) => Promise<FlattenedRPCMap[Name]['output']>
|
|
431
439
|
|
|
432
|
-
import type {
|
|
440
|
+
import type { FlattenedWorkflowMap } from '../workflow/pikku-workflow-map.gen.d.js'
|
|
433
441
|
|
|
434
442
|
import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js'
|
|
435
443
|
|
|
@@ -445,12 +453,22 @@ interface AIAgentInput {
|
|
|
445
453
|
resourceId: string
|
|
446
454
|
}
|
|
447
455
|
|
|
448
|
-
export type TypedStartWorkflow = <Name extends keyof
|
|
456
|
+
export type TypedStartWorkflow = <Name extends keyof FlattenedWorkflowMap>(
|
|
449
457
|
name: Name,
|
|
450
|
-
input:
|
|
458
|
+
input: FlattenedWorkflowMap[Name]['input'],
|
|
451
459
|
options?: { startNode?: string }
|
|
452
460
|
) => Promise<{ runId: string }>
|
|
453
461
|
|
|
462
|
+
export type TypedRunWorkflow = <Name extends keyof FlattenedWorkflowMap>(
|
|
463
|
+
name: Name,
|
|
464
|
+
input: FlattenedWorkflowMap[Name]['input']
|
|
465
|
+
) => Promise<FlattenedWorkflowMap[Name]['output']>
|
|
466
|
+
|
|
467
|
+
export type TypedWorkflowStatus = (
|
|
468
|
+
workflowName: string,
|
|
469
|
+
runId: string
|
|
470
|
+
) => Promise<{ id: string; status: 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled'; output?: unknown; error?: { message?: string } }>
|
|
471
|
+
|
|
454
472
|
type TypedAgentRun = [keyof FlattenedAgentMap] extends [never]
|
|
455
473
|
? (name: string, input: AIAgentInput) => Promise<any>
|
|
456
474
|
: <Name extends keyof FlattenedAgentMap>(
|