@pikku/addon-ollama 0.1.2 → 0.1.4
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/dist/.pikku/addon/pikku-addon-types.gen.d.ts +2 -2
- package/dist/.pikku/addon/pikku-addon-types.gen.js +2 -2
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +2 -2
- package/dist/.pikku/addon/pikku-package.gen.js +3 -2
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
- package/dist/.pikku/addon/pikku-package.gen.ts +4 -2
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +8 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.js +3 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.ts +17 -2
- package/dist/.pikku/agent/pikku-model-aliases.gen.d.ts +2 -0
- package/dist/.pikku/agent/pikku-model-aliases.gen.d.ts.map +1 -0
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +6 -0
- package/dist/.pikku/agent/pikku-model-aliases.gen.js.map +1 -0
- package/dist/.pikku/agent/pikku-model-aliases.gen.ts +6 -0
- package/dist/.pikku/agent/pikku-scorer-names.gen.d.ts +8 -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/channel/pikku-channel-types.gen.ts +1 -1
- 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 +76 -64
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +30 -13
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.ts +127 -79
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +8 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.js.map +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +28 -4
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +2 -2
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions.gen.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -24
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.ts +3 -31
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
- 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 +2 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +2 -1
- package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.ts +2 -1
- 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-meta-service.gen.ts +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +7 -1
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
- package/dist/.pikku/pikku-services.gen.js +6 -0
- package/dist/.pikku/pikku-services.gen.js.map +1 -1
- package/dist/.pikku/pikku-services.gen.ts +7 -1
- 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 +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.ts +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -7
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +2 -7
- package/{.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts → dist/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts} +2 -7
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +2 -2
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +2 -2
- 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 +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
- 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 +11 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +14 -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 +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 +14 -4
- package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.ts +17 -4
- package/dist/.pikku/workflow/personas.gen.json +1 -0
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +17 -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 +35 -0
- package/dist/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +263 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +62 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +435 -5
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +4 -4
- 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/embeddings/embed-many.function.d.ts +2 -2
- package/dist/src/functions/embeddings/embed-many.function.d.ts.map +1 -1
- package/dist/src/functions/embeddings/embed.function.d.ts +2 -2
- package/dist/src/functions/embeddings/embed.function.d.ts.map +1 -1
- package/dist/src/functions/text/generate-object.function.d.ts +6 -6
- package/dist/src/functions/text/generate-object.function.d.ts.map +1 -1
- package/dist/src/functions/text/generate.function.d.ts +2 -2
- package/dist/src/functions/text/generate.function.d.ts.map +1 -1
- package/dist/src/ollama.variable.js +2 -2
- package/dist/src/ollama.variable.js.map +1 -1
- package/dist/types/application-types.d.ts +17 -0
- package/package.json +6 -7
- package/.pikku/addon/pikku-addon-types.gen.ts +0 -105
- package/.pikku/addon/pikku-package.gen.ts +0 -11
- package/.pikku/agent/pikku-agent-map.gen.d.ts +0 -4
- package/.pikku/agent/pikku-agent-types.gen.ts +0 -82
- package/.pikku/channel/pikku-channel-types.gen.ts +0 -177
- package/.pikku/console/pikku-addon-meta.gen.json +0 -58
- package/.pikku/console/pikku-node-types.gen.ts +0 -8
- package/.pikku/function/pikku-function-types.gen.ts +0 -754
- package/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -118
- package/.pikku/function/pikku-functions-meta.gen.json +0 -78
- package/.pikku/function/pikku-functions-meta.gen.ts +0 -7
- package/.pikku/function/pikku-functions.gen.ts +0 -14
- package/.pikku/http/pikku-http-types.gen.ts +0 -147
- package/.pikku/mcp/pikku-mcp-types.gen.ts +0 -183
- package/.pikku/pikku-bootstrap.gen.ts +0 -8
- package/.pikku/pikku-meta-service.gen.ts +0 -10
- package/.pikku/pikku-services.gen.ts +0 -45
- package/.pikku/pikku-types.gen.ts +0 -21
- package/.pikku/queue/pikku-queue-types.gen.ts +0 -27
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +0 -211
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +0 -6
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -6
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
- package/.pikku/schemas/register.gen.ts +0 -39
- package/.pikku/schemas/schemas/OllamaEmbedInput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaEmbedManyInput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaEmbedManyOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaEmbedOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaGenerateObjectInput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaGenerateObjectOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaGenerateTextInput.schema.json +0 -1
- package/.pikku/schemas/schemas/OllamaGenerateTextOutput.schema.json +0 -1
- package/.pikku/schemas/schemas/VariableSchema_ollama_base_url.schema.json +0 -1
- package/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
- package/.pikku/secrets/pikku-secrets.gen.ts +0 -21
- package/.pikku/trigger/pikku-trigger-types.gen.ts +0 -160
- package/.pikku/variables/pikku-variable-types.gen.ts +0 -5
- package/.pikku/variables/pikku-variables-meta.gen.json +0 -10
- package/.pikku/variables/pikku-variables.gen.ts +0 -23
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +0 -38
- package/.pikku/workflow/pikku-workflow-types.gen.ts +0 -167
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
- /package/{.pikku/secrets/pikku-secrets-meta.gen.json → dist/.pikku/scenarios/features.gen.json} +0 -0
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.55
|
|
3
|
-
*/
|
|
4
|
-
import { WorkflowCancelledException } from '@pikku/core/workflow'
|
|
5
|
-
import { template } from '@pikku/core/workflow'
|
|
6
|
-
import {
|
|
7
|
-
pikkuWorkflowGraph as corePikkuWorkflowGraph,
|
|
8
|
-
type PikkuWorkflowGraphConfig,
|
|
9
|
-
type PikkuWorkflowGraphResult,
|
|
10
|
-
} from '@pikku/core/workflow'
|
|
11
|
-
import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow'
|
|
12
|
-
|
|
13
|
-
export { WorkflowCancelledException }
|
|
14
|
-
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
|
|
15
|
-
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js'
|
|
16
|
-
import type { FlattenedWorkflowMap } from './pikku-workflow-map.gen.d.js'
|
|
17
|
-
|
|
18
|
-
export { template }
|
|
19
|
-
|
|
20
|
-
export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
21
|
-
do<K extends keyof FlattenedRPCMap>(
|
|
22
|
-
stepName: string,
|
|
23
|
-
rpcName: K,
|
|
24
|
-
data: FlattenedRPCMap[K]['input'],
|
|
25
|
-
options?: WorkflowStepOptions
|
|
26
|
-
): Promise<FlattenedRPCMap[K]['output']>
|
|
27
|
-
|
|
28
|
-
do<K extends keyof FlattenedWorkflowMap>(
|
|
29
|
-
stepName: string,
|
|
30
|
-
workflowName: K,
|
|
31
|
-
data: FlattenedWorkflowMap[K]['input'],
|
|
32
|
-
options?: WorkflowStepOptions
|
|
33
|
-
): Promise<FlattenedWorkflowMap[K]['output']>
|
|
34
|
-
|
|
35
|
-
do<T>(
|
|
36
|
-
stepName: string,
|
|
37
|
-
fn: () => T | Promise<T>,
|
|
38
|
-
options?: WorkflowStepOptions
|
|
39
|
-
): Promise<T>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
|
43
|
-
import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js'
|
|
44
|
-
import { PikkuError } from '@pikku/core/errors'
|
|
45
|
-
import type { CorePermissionGroup } from '@pikku/core'
|
|
46
|
-
|
|
47
|
-
export type PikkuFunctionWorkflow<
|
|
48
|
-
In = unknown,
|
|
49
|
-
Out = never
|
|
50
|
-
> = PikkuFunctionSessionless<In, Out, 'workflow'>
|
|
51
|
-
|
|
52
|
-
export type PikkuWorkflowConfigWithSchema<
|
|
53
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
54
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
55
|
-
> = {
|
|
56
|
-
title?: string
|
|
57
|
-
description?: string
|
|
58
|
-
tags?: string[]
|
|
59
|
-
expose?: boolean
|
|
60
|
-
internal?: boolean
|
|
61
|
-
override?: string
|
|
62
|
-
version?: number
|
|
63
|
-
remote?: boolean
|
|
64
|
-
mcp?: boolean
|
|
65
|
-
readonly?: boolean
|
|
66
|
-
approvalRequired?: boolean
|
|
67
|
-
approvalDescription?: InputSchema extends StandardSchemaV1 ? PikkuApprovalDescription<InferSchemaOutput<InputSchema>> : never
|
|
68
|
-
func: PikkuFunctionWorkflow<
|
|
69
|
-
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
70
|
-
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
71
|
-
>
|
|
72
|
-
auth?: boolean
|
|
73
|
-
permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
|
|
74
|
-
middleware?: PikkuMiddleware[]
|
|
75
|
-
input?: InputSchema
|
|
76
|
-
output?: OutputSchema
|
|
77
|
-
node?: NodeConfig
|
|
78
|
-
errors?: Array<typeof PikkuError>
|
|
79
|
-
inline?: boolean
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function pikkuWorkflowFunc<
|
|
83
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
84
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
85
|
-
>(
|
|
86
|
-
config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>
|
|
87
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
88
|
-
export function pikkuWorkflowFunc<In, Out = unknown>(
|
|
89
|
-
func:
|
|
90
|
-
| PikkuFunctionWorkflow<In, Out>
|
|
91
|
-
| PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>
|
|
92
|
-
): PikkuFunctionConfig<In, Out, 'workflow'>
|
|
93
|
-
export function pikkuWorkflowFunc(func: any) {
|
|
94
|
-
return typeof func === 'function' ? { func } : func
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function pikkuWorkflowComplexFunc<
|
|
98
|
-
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
99
|
-
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
100
|
-
>(
|
|
101
|
-
config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>
|
|
102
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
103
|
-
export function pikkuWorkflowComplexFunc<In, Out = unknown>(
|
|
104
|
-
func:
|
|
105
|
-
| PikkuFunctionWorkflow<In, Out>
|
|
106
|
-
| PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>
|
|
107
|
-
): PikkuFunctionConfig<In, Out, 'workflow'>
|
|
108
|
-
export function pikkuWorkflowComplexFunc(func: any) {
|
|
109
|
-
return typeof func === 'function' ? { func } : func
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
type TypedRef<T> = { $ref: string; path?: string } & { __phantomType?: T }
|
|
113
|
-
|
|
114
|
-
type TemplateString = {
|
|
115
|
-
$template: {
|
|
116
|
-
parts: string[]
|
|
117
|
-
expressions: Array<{ $ref: string; path?: string }>
|
|
118
|
-
}
|
|
119
|
-
} & { __brand: 'TemplateString' }
|
|
120
|
-
|
|
121
|
-
type InputWithRefs<T> = {
|
|
122
|
-
[K in keyof T]?: T[K] | TypedRef<T[K]> | TypedRef<unknown> | TemplateString
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
type NodeInputType<FuncMap extends Record<string, string>, K extends keyof FuncMap> =
|
|
126
|
-
FuncMap[K] extends keyof FlattenedRPCMap
|
|
127
|
-
? InputWithRefs<FlattenedRPCMap[FuncMap[K]]['input']>
|
|
128
|
-
: Record<string, unknown>
|
|
129
|
-
|
|
130
|
-
type NodeOutputKeys<FuncMap extends Record<string, string>, N extends string> =
|
|
131
|
-
N extends keyof FuncMap
|
|
132
|
-
? FuncMap[N] extends keyof FlattenedRPCMap
|
|
133
|
-
? keyof FlattenedRPCMap[FuncMap[N]]['output'] & string
|
|
134
|
-
: string
|
|
135
|
-
: string
|
|
136
|
-
|
|
137
|
-
type RefFunction<FuncMap extends Record<string, string>> = {
|
|
138
|
-
<N extends Extract<keyof FuncMap, string>>(
|
|
139
|
-
nodeId: N,
|
|
140
|
-
path: NodeOutputKeys<FuncMap, N>
|
|
141
|
-
): TypedRef<unknown>
|
|
142
|
-
(nodeId: 'trigger' | '$item', path?: string): TypedRef<unknown>
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
type TemplateFunction = (templateStr: string, refs: TypedRef<unknown>[]) => TemplateString
|
|
146
|
-
|
|
147
|
-
type GraphNodeConfigMap<FuncMap extends Record<string, string>> = {
|
|
148
|
-
[K in Extract<keyof FuncMap, string>]?: {
|
|
149
|
-
next?: NextConfig<Extract<keyof FuncMap, string>>
|
|
150
|
-
input?:
|
|
151
|
-
| NodeInputType<FuncMap, K>
|
|
152
|
-
| (() => NodeInputType<FuncMap, K>)
|
|
153
|
-
| ((ref: RefFunction<FuncMap>, template: TemplateFunction) => NodeInputType<FuncMap, K>)
|
|
154
|
-
onError?: Extract<keyof FuncMap, string> | Extract<keyof FuncMap, string>[]
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
type NextConfig<NodeIds extends string> = NodeIds | NodeIds[] | { if: string; then: NodeIds; else?: NodeIds }
|
|
159
|
-
|
|
160
|
-
export function pikkuWorkflowGraph<
|
|
161
|
-
const FuncMap extends Record<string, keyof FlattenedRPCMap & string>
|
|
162
|
-
>(
|
|
163
|
-
config: PikkuWorkflowGraphConfig<FuncMap, GraphNodeConfigMap<FuncMap>>
|
|
164
|
-
): PikkuWorkflowGraphResult {
|
|
165
|
-
return corePikkuWorkflowGraph(config as any)
|
|
166
|
-
}
|
|
167
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.55
|
|
3
|
-
*/
|
|
4
|
-
import { pikkuState } from '@pikku/core/internal'
|
|
5
|
-
import type { SerializedWorkflowGraphs } from '@pikku/inspector/workflow-graph'
|
|
6
|
-
|
|
7
|
-
const workflowsMeta: SerializedWorkflowGraphs = {}
|
|
8
|
-
|
|
9
|
-
pikkuState('@pikku/addon-ollama', 'workflows', 'meta', workflowsMeta)
|
/package/{.pikku/secrets/pikku-secrets-meta.gen.json → dist/.pikku/scenarios/features.gen.json}
RENAMED
|
File without changes
|