@pikku/addon-meta-conversions 0.1.1 → 0.1.3
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 +105 -0
- package/.pikku/addon/pikku-package.gen.ts +11 -0
- package/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
- package/.pikku/agent/pikku-agent-types.gen.ts +84 -0
- package/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/.pikku/console/pikku-addon-meta.gen.json +36 -0
- package/.pikku/console/pikku-node-types.gen.ts +8 -0
- package/.pikku/function/pikku-function-types.gen.ts +797 -0
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +33 -0
- package/.pikku/function/pikku-functions-meta.gen.json +27 -0
- package/.pikku/function/pikku-functions-meta.gen.ts +7 -0
- package/.pikku/function/pikku-functions.gen.ts +8 -0
- package/.pikku/http/pikku-http-types.gen.ts +119 -0
- package/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
- package/.pikku/pikku-bootstrap.gen.ts +8 -0
- package/.pikku/pikku-meta-service.gen.ts +10 -0
- package/.pikku/pikku-services.gen.ts +50 -0
- package/.pikku/pikku-types.gen.ts +24 -0
- package/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +135 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +136 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +135 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +3 -0
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/.pikku/scenarios/features.gen.json +1 -0
- package/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
- package/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
- package/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
- package/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
- package/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
- package/.pikku/scenarios/schemas/register.gen.ts +4 -0
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/.pikku/schemas/register.gen.ts +15 -0
- package/.pikku/schemas/schemas/EventSendInput.schema.json +1 -0
- package/.pikku/schemas/schemas/EventSendOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/SecretSchema_metaConversions.schema.json +1 -0
- package/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
- package/.pikku/scopes/pikku-personas.gen.ts +52 -0
- package/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
- package/.pikku/scopes/pikku-roles.gen.ts +41 -0
- package/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
- package/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
- package/.pikku/scopes/pikku-scopes.gen.ts +58 -0
- package/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
- package/.pikku/secrets/pikku-secrets-meta.gen.json +10 -0
- package/.pikku/secrets/pikku-secrets.gen.ts +36 -0
- package/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
- package/.pikku/variables/pikku-variable-types.gen.ts +5 -0
- package/.pikku/variables/pikku-variables-meta.gen.json +1 -0
- package/.pikku/variables/pikku-variables.gen.ts +34 -0
- package/.pikku/workflow/personas.gen.json +1 -0
- package/.pikku/workflow/pikku-personas.gen.ts +38 -0
- package/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
- package/.pikku/workflow/pikku-workflow-types.gen.ts +591 -0
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +4 -4
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +7 -3
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +11 -6
- 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 +8 -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 +15 -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/console/pikku-addon-meta.gen.json +4 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +133 -133
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +98 -61
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.ts +268 -157
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +5 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +8 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
- package/dist/.pikku/function/pikku-functions.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-functions.gen.ts +2 -2
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +98 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.js +50 -0
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.ts +119 -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-scenarios.gen.d.ts +10 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +10 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js.map +1 -0
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -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 +15 -2
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +14 -0
- package/dist/.pikku/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/pikku-services.gen.ts +17 -2
- package/dist/.pikku/pikku-types.gen.d.ts +2 -1
- package/dist/.pikku/pikku-types.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-types.gen.js +3 -1
- package/dist/.pikku/pikku-types.gen.js.map +1 -1
- package/dist/.pikku/pikku-types.gen.ts +4 -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 +28 -8
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +28 -8
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +135 -0
- 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 +3 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/dist/.pikku/scenarios/features.gen.json +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +11 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +5 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +11 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +5 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js +2 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js.map +1 -0
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +5 -0
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts.map +1 -0
- package/dist/.pikku/scenarios/schemas/register.gen.js +5 -0
- package/dist/.pikku/scenarios/schemas/register.gen.js.map +1 -0
- package/dist/.pikku/scenarios/schemas/register.gen.ts +4 -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 +1 -1
- package/dist/.pikku/schemas/register.gen.ts +1 -1
- package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +37 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.js +18 -0
- package/dist/.pikku/scopes/pikku-personas.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.ts +52 -0
- package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +31 -0
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.js +19 -0
- package/dist/.pikku/scopes/pikku-roles.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.ts +41 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +8 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +6 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
- package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +36 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts.map +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.js +28 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.js.map +1 -0
- package/dist/.pikku/scopes/pikku-scopes.gen.ts +58 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +12 -2
- package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +15 -2
- 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 +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.ts +2 -2
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +13 -3
- package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.ts +16 -3
- package/dist/.pikku/workflow/personas.gen.json +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +16 -0
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts.map +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.js +18 -0
- package/dist/.pikku/workflow/pikku-personas.gen.js.map +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.ts +38 -0
- package/dist/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +289 -31
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +66 -18
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +494 -61
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +3 -3
- 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/events/send.function.d.ts +2 -2
- package/dist/src/functions/events/send.function.d.ts.map +1 -1
- package/dist/src/meta-conversions.secret.js +2 -2
- package/dist/src/meta-conversions.secret.js.map +1 -1
- package/dist/src/services.d.ts.map +1 -1
- package/dist/src/services.js +1 -1
- package/dist/src/services.js.map +1 -1
- package/package.json +7 -6
- 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
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Trigger-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { CorePikkuTriggerFunction, CorePikkuTriggerFunctionConfig, CoreTrigger, wireTrigger as wireTriggerCore, wireTriggerSource as wireTriggerSourceCore } from '@pikku/core/trigger'
|
|
9
|
+
import type { CoreNodeConfig } from '@pikku/core/node'
|
|
10
|
+
import type { SingletonServices } from '../../types/application-types.d.js'
|
|
11
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A trigger function that sets up a subscription and returns a teardown function.
|
|
17
|
+
* The trigger is fired via wire.trigger.invoke(data).
|
|
18
|
+
*
|
|
19
|
+
* @template TInput - Input type (configuration passed when wired)
|
|
20
|
+
* @template TOutput - Output type produced when trigger fires
|
|
21
|
+
*/
|
|
22
|
+
export type PikkuTriggerFunction<
|
|
23
|
+
TInput = unknown,
|
|
24
|
+
TOutput = unknown
|
|
25
|
+
> = CorePikkuTriggerFunction<TInput, TOutput, SingletonServices>
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Configuration object for creating a trigger function with metadata
|
|
29
|
+
*/
|
|
30
|
+
export type PikkuTriggerFunctionConfig<
|
|
31
|
+
TInput = unknown,
|
|
32
|
+
TOutput = unknown,
|
|
33
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
34
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
35
|
+
> = CorePikkuTriggerFunctionConfig<TInput, TOutput, SingletonServices, InputSchema, OutputSchema>
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Helper type to infer the output type from a Standard Schema
|
|
39
|
+
*/
|
|
40
|
+
type InferSchemaOutput<T> = T extends StandardSchemaV1<any, infer Output> ? Output : never
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Configuration object for trigger functions with Zod schema validation.
|
|
44
|
+
* Use this when you want to define input/output schemas using Zod.
|
|
45
|
+
* Types are automatically inferred from the schemas.
|
|
46
|
+
*/
|
|
47
|
+
export type PikkuTriggerFunctionConfigWithSchema<
|
|
48
|
+
InputSchema extends StandardSchemaV1,
|
|
49
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
50
|
+
> = {
|
|
51
|
+
title?: string
|
|
52
|
+
description?: string
|
|
53
|
+
tags?: string[]
|
|
54
|
+
func: PikkuTriggerFunction<
|
|
55
|
+
InferSchemaOutput<InputSchema>,
|
|
56
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
57
|
+
>
|
|
58
|
+
input: InputSchema
|
|
59
|
+
output?: OutputSchema
|
|
60
|
+
node?: CoreNodeConfig
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Type definition for trigger wirings.
|
|
65
|
+
* Declares a trigger name and its target pikku function.
|
|
66
|
+
*/
|
|
67
|
+
export type TriggerWiring = CoreTrigger
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A trigger source with the subscription function, using project-specific services.
|
|
71
|
+
*
|
|
72
|
+
* @template TInput - Input type passed to the trigger function
|
|
73
|
+
* @template TOutput - Output type produced when trigger fires
|
|
74
|
+
*/
|
|
75
|
+
export type TriggerSource<
|
|
76
|
+
TInput = unknown,
|
|
77
|
+
TOutput = unknown
|
|
78
|
+
> = {
|
|
79
|
+
name: string
|
|
80
|
+
func: PikkuTriggerFunctionConfig<TInput, TOutput>
|
|
81
|
+
} & (unknown extends TInput ? { input?: TInput } : { input: TInput })
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Creates a trigger function configuration.
|
|
85
|
+
* Use this to define trigger functions that set up subscriptions.
|
|
86
|
+
*
|
|
87
|
+
* @param triggerOrConfig - Function definition or configuration object
|
|
88
|
+
* @returns The normalized configuration object
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* export const redisSubscribeTrigger = pikkuTriggerFunc<
|
|
93
|
+
* { channel: string },
|
|
94
|
+
* { message: string }
|
|
95
|
+
* >(async ({ redis }, { channel }, { trigger }) => {
|
|
96
|
+
* const subscriber = redis.duplicate()
|
|
97
|
+
* await subscriber.subscribe(channel, (msg) => {
|
|
98
|
+
* trigger.invoke({ message: msg })
|
|
99
|
+
* })
|
|
100
|
+
* return () => subscriber.unsubscribe()
|
|
101
|
+
* })
|
|
102
|
+
*
|
|
103
|
+
* export const redisSubscribeTrigger = pikkuTriggerFunc({
|
|
104
|
+
* title: 'Redis Subscribe Trigger',
|
|
105
|
+
* description: 'Listens to Redis pub/sub channel',
|
|
106
|
+
* input: z.object({ channel: z.string() }),
|
|
107
|
+
* output: z.object({ message: z.string() }),
|
|
108
|
+
* func: async ({ redis }, { channel }, { trigger }) => {
|
|
109
|
+
* const subscriber = redis.duplicate()
|
|
110
|
+
* await subscriber.subscribe(channel, (msg) => {
|
|
111
|
+
* trigger.invoke({ message: msg })
|
|
112
|
+
* })
|
|
113
|
+
* return () => subscriber.unsubscribe()
|
|
114
|
+
* }
|
|
115
|
+
* })
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export function pikkuTriggerFunc<
|
|
119
|
+
InputSchema extends StandardSchemaV1,
|
|
120
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
121
|
+
>(
|
|
122
|
+
config: PikkuTriggerFunctionConfigWithSchema<InputSchema, OutputSchema>
|
|
123
|
+
): PikkuTriggerFunctionConfig<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, InputSchema, OutputSchema>
|
|
124
|
+
export function pikkuTriggerFunc<TInput, TOutput = unknown>(
|
|
125
|
+
triggerOrConfig:
|
|
126
|
+
| PikkuTriggerFunction<TInput, TOutput>
|
|
127
|
+
| PikkuTriggerFunctionConfig<TInput, TOutput>
|
|
128
|
+
): PikkuTriggerFunctionConfig<TInput, TOutput>
|
|
129
|
+
export function pikkuTriggerFunc(triggerOrConfig: any) {
|
|
130
|
+
if (typeof triggerOrConfig === 'function') {
|
|
131
|
+
return { func: triggerOrConfig }
|
|
132
|
+
}
|
|
133
|
+
return triggerOrConfig
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Registers a trigger with the Pikku framework.
|
|
138
|
+
* Declares a trigger name and its target pikku function.
|
|
139
|
+
* Runs everywhere — inspector extracts at build time.
|
|
140
|
+
*
|
|
141
|
+
* @param trigger - Trigger definition with name and function config
|
|
142
|
+
*/
|
|
143
|
+
export const wireTrigger = (
|
|
144
|
+
trigger: TriggerWiring
|
|
145
|
+
) => {
|
|
146
|
+
wireTriggerCore(trigger as any)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Registers a trigger source with the Pikku framework.
|
|
151
|
+
* Provides the subscription function and input data.
|
|
152
|
+
* Only imported in the trigger worker process.
|
|
153
|
+
*
|
|
154
|
+
* @param source - Trigger source with name, func, and input
|
|
155
|
+
*/
|
|
156
|
+
export const wireTriggerSource = <TInput = unknown, TOutput = unknown>(
|
|
157
|
+
source: TriggerSource<TInput, TOutput>
|
|
158
|
+
) => {
|
|
159
|
+
wireTriggerSourceCore(source as any)
|
|
160
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
import { TypedVariablesService as CoreTypedVariablesService, type VariableMeta } from '@pikku/core/services'
|
|
5
|
+
import type { VariablesService } from '@pikku/core/services'
|
|
6
|
+
import type { VariableDefinitionsMeta } from '@pikku/core/variable'
|
|
7
|
+
import variablesMeta from './pikku-variables-meta.gen.json' with { type: 'json' }
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Every variable declared in this package.
|
|
11
|
+
*
|
|
12
|
+
* Read from the metadata sidecar rather than inlined, so that the import above
|
|
13
|
+
* forces tsc to emit the .json alongside this file. An addon publishes only its
|
|
14
|
+
* compiled output, and a host reads that .json to discover the addon's declared
|
|
15
|
+
* variables — an uncopied sidecar leaves them invisible to the host.
|
|
16
|
+
*/
|
|
17
|
+
export const VARIABLES_META: VariableDefinitionsMeta =
|
|
18
|
+
variablesMeta as VariableDefinitionsMeta
|
|
19
|
+
|
|
20
|
+
export interface VariablesMap {
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type VariableId = keyof VariablesMap
|
|
25
|
+
|
|
26
|
+
const TYPED_VARIABLES_META: Record<string, VariableMeta> = {
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class TypedVariablesService extends CoreTypedVariablesService<VariablesMap> {
|
|
31
|
+
constructor(variables: VariablesService) {
|
|
32
|
+
super(variables, TYPED_VARIABLES_META)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/** Personas declared with definePersonas() */
|
|
5
|
+
import { createHttpPersonas } from '@pikku/core/persona'
|
|
6
|
+
import type {
|
|
7
|
+
HttpPersonasConfig,
|
|
8
|
+
ScenarioPersona,
|
|
9
|
+
ResolvedPersona,
|
|
10
|
+
} from '@pikku/core/services'
|
|
11
|
+
import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js'
|
|
12
|
+
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.gen.d.js'
|
|
13
|
+
|
|
14
|
+
export const personaConfigs = {} as const satisfies Record<string, ResolvedPersona>
|
|
15
|
+
|
|
16
|
+
export type PersonaName = keyof typeof personaConfigs
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The same personas as a list, widened to `ResolvedPersona`. Iterating
|
|
20
|
+
* `personaConfigs` directly yields the literal type of each entry, on which an
|
|
21
|
+
* optional field a persona did not declare does not exist — so a seed reading
|
|
22
|
+
* `roles` off every persona needs this instead.
|
|
23
|
+
*/
|
|
24
|
+
export const personaList: ResolvedPersona[] = Object.values(personaConfigs)
|
|
25
|
+
|
|
26
|
+
export type AgentName = keyof AgentMap & string
|
|
27
|
+
export type TypedPersonas = Record<
|
|
28
|
+
PersonaName,
|
|
29
|
+
ScenarioPersona<AgentName, FlattenedRPCMap>
|
|
30
|
+
>
|
|
31
|
+
|
|
32
|
+
export const createPersonas = (
|
|
33
|
+
options: Omit<HttpPersonasConfig, 'personas'>
|
|
34
|
+
): TypedPersonas =>
|
|
35
|
+
createHttpPersonas({
|
|
36
|
+
...options,
|
|
37
|
+
personas: personaConfigs,
|
|
38
|
+
}) as TypedPersonas
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Scenario step map: the names `scenario.step/given/when/then` accepts, with
|
|
6
|
+
* the input and output types of each step.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
interface ScenarioStepHandler<I, O> {
|
|
13
|
+
input: I;
|
|
14
|
+
output: O;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type FlattenedScenarioStepMap = {
|
|
18
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Workflow type map with input/output types for each workflow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
interface WorkflowHandler<I, O> {
|
|
13
|
+
input: I;
|
|
14
|
+
output: O;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface GraphNodeHandler<I> {
|
|
18
|
+
input: I;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type WorkflowMap = {
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type GraphsMap = {
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type FlattenedWorkflowMap = WorkflowMap
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export type WorkflowClient<Name extends keyof FlattenedWorkflowMap> = {
|
|
31
|
+
start: (input: FlattenedWorkflowMap[Name]['input']) => Promise<{ runId: string }>;
|
|
32
|
+
getRun: <output extends keyof FlattenedWorkflowMap[Name]>(runId: string) => Promise<FlattenedWorkflowMap[Name][output]>;
|
|
33
|
+
cancelRun: (runId: string) => Promise<boolean>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type TypedWorkflowClients = {
|
|
37
|
+
[Name in keyof FlattenedWorkflowMap]: WorkflowClient<Name>;
|
|
38
|
+
}
|