@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.
Files changed (228) hide show
  1. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +2 -2
  2. package/dist/.pikku/addon/pikku-addon-types.gen.js +2 -2
  3. package/dist/.pikku/addon/pikku-addon-types.gen.ts +2 -2
  4. package/dist/.pikku/addon/pikku-package.gen.js +3 -2
  5. package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
  6. package/dist/.pikku/addon/pikku-package.gen.ts +4 -2
  7. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  8. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +8 -2
  9. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
  10. package/dist/.pikku/agent/pikku-agent-types.gen.js +3 -0
  11. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
  12. package/dist/.pikku/agent/pikku-agent-types.gen.ts +17 -2
  13. package/dist/.pikku/agent/pikku-model-aliases.gen.d.ts +2 -0
  14. package/dist/.pikku/agent/pikku-model-aliases.gen.d.ts.map +1 -0
  15. package/dist/.pikku/agent/pikku-model-aliases.gen.js +6 -0
  16. package/dist/.pikku/agent/pikku-model-aliases.gen.js.map +1 -0
  17. package/dist/.pikku/agent/pikku-model-aliases.gen.ts +6 -0
  18. package/dist/.pikku/agent/pikku-scorer-names.gen.d.ts +8 -0
  19. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  20. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  21. package/dist/.pikku/channel/pikku-channel-types.gen.ts +1 -1
  22. package/dist/.pikku/console/pikku-addon-meta.gen.json +4 -1
  23. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  24. package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
  25. package/dist/.pikku/function/pikku-function-types.gen.d.ts +76 -64
  26. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
  27. package/dist/.pikku/function/pikku-function-types.gen.js +30 -13
  28. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
  29. package/dist/.pikku/function/pikku-function-types.gen.ts +127 -79
  30. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +8 -0
  31. package/dist/.pikku/function/pikku-functions-meta.gen.js +2 -2
  32. package/dist/.pikku/function/pikku-functions-meta.gen.js.map +1 -1
  33. package/dist/.pikku/function/pikku-functions-meta.gen.json +28 -4
  34. package/dist/.pikku/function/pikku-functions-meta.gen.ts +2 -2
  35. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  36. package/dist/.pikku/function/pikku-functions.gen.ts +1 -1
  37. package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -24
  38. package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -1
  39. package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
  40. package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -1
  41. package/dist/.pikku/http/pikku-http-types.gen.ts +3 -31
  42. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  43. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  44. package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  45. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +10 -0
  46. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts.map +1 -0
  47. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +10 -0
  48. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js.map +1 -0
  49. package/dist/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
  50. package/dist/.pikku/pikku-bootstrap.gen.d.ts +2 -1
  51. package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
  52. package/dist/.pikku/pikku-bootstrap.gen.js +2 -1
  53. package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
  54. package/dist/.pikku/pikku-bootstrap.gen.ts +2 -1
  55. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  56. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  57. package/dist/.pikku/pikku-meta-service.gen.ts +1 -1
  58. package/dist/.pikku/pikku-services.gen.d.ts +7 -1
  59. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
  60. package/dist/.pikku/pikku-services.gen.js +6 -0
  61. package/dist/.pikku/pikku-services.gen.js.map +1 -1
  62. package/dist/.pikku/pikku-services.gen.ts +7 -1
  63. package/dist/.pikku/pikku-types.gen.d.ts +2 -1
  64. package/dist/.pikku/pikku-types.gen.d.ts.map +1 -1
  65. package/dist/.pikku/pikku-types.gen.js +3 -1
  66. package/dist/.pikku/pikku-types.gen.js.map +1 -1
  67. package/dist/.pikku/pikku-types.gen.ts +4 -1
  68. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  69. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  70. package/dist/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  71. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -7
  72. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +2 -7
  73. package/{.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts → dist/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts} +2 -7
  74. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +2 -2
  75. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -1
  76. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +2 -2
  77. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts +2 -0
  78. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +1 -0
  79. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +11 -0
  80. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js.map +1 -0
  81. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
  82. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
  83. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +5 -0
  84. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts.map +1 -0
  85. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js +2 -0
  86. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js.map +1 -0
  87. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
  88. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts +2 -0
  89. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +1 -0
  90. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +11 -0
  91. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js.map +1 -0
  92. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
  93. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +5 -0
  94. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts.map +1 -0
  95. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js +2 -0
  96. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js.map +1 -0
  97. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
  98. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +5 -0
  99. package/dist/.pikku/scenarios/schemas/register.gen.d.ts.map +1 -0
  100. package/dist/.pikku/scenarios/schemas/register.gen.js +5 -0
  101. package/dist/.pikku/scenarios/schemas/register.gen.js.map +1 -0
  102. package/dist/.pikku/scenarios/schemas/register.gen.ts +4 -0
  103. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  104. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  105. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  106. package/dist/.pikku/schemas/register.gen.js +1 -1
  107. package/dist/.pikku/schemas/register.gen.ts +1 -1
  108. package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
  109. package/dist/.pikku/scopes/pikku-personas.gen.d.ts +37 -0
  110. package/dist/.pikku/scopes/pikku-personas.gen.d.ts.map +1 -0
  111. package/dist/.pikku/scopes/pikku-personas.gen.js +18 -0
  112. package/dist/.pikku/scopes/pikku-personas.gen.js.map +1 -0
  113. package/dist/.pikku/scopes/pikku-personas.gen.ts +52 -0
  114. package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
  115. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +31 -0
  116. package/dist/.pikku/scopes/pikku-roles.gen.d.ts.map +1 -0
  117. package/dist/.pikku/scopes/pikku-roles.gen.js +19 -0
  118. package/dist/.pikku/scopes/pikku-roles.gen.js.map +1 -0
  119. package/dist/.pikku/scopes/pikku-roles.gen.ts +41 -0
  120. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +8 -0
  121. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts.map +1 -0
  122. package/dist/.pikku/scopes/pikku-scope-types.gen.js +6 -0
  123. package/dist/.pikku/scopes/pikku-scope-types.gen.js.map +1 -0
  124. package/dist/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
  125. package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
  126. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +36 -0
  127. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts.map +1 -0
  128. package/dist/.pikku/scopes/pikku-scopes.gen.js +28 -0
  129. package/dist/.pikku/scopes/pikku-scopes.gen.js.map +1 -0
  130. package/dist/.pikku/scopes/pikku-scopes.gen.ts +58 -0
  131. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
  132. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -1
  133. package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
  134. package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -1
  135. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
  136. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
  137. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -1
  138. package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -1
  139. package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -1
  140. package/dist/.pikku/secrets/pikku-secrets.gen.ts +14 -1
  141. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  142. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  143. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  144. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
  145. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -1
  146. package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
  147. package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -1
  148. package/dist/.pikku/variables/pikku-variable-types.gen.ts +2 -2
  149. package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
  150. package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -1
  151. package/dist/.pikku/variables/pikku-variables.gen.js +14 -4
  152. package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -1
  153. package/dist/.pikku/variables/pikku-variables.gen.ts +17 -4
  154. package/dist/.pikku/workflow/personas.gen.json +1 -0
  155. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +17 -0
  156. package/dist/.pikku/workflow/pikku-personas.gen.d.ts.map +1 -0
  157. package/dist/.pikku/workflow/pikku-personas.gen.js +18 -0
  158. package/dist/.pikku/workflow/pikku-personas.gen.js.map +1 -0
  159. package/dist/.pikku/workflow/pikku-personas.gen.ts +35 -0
  160. package/dist/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
  161. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  162. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +263 -5
  163. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
  164. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +62 -1
  165. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
  166. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +435 -5
  167. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +2 -2
  168. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -1
  169. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +4 -4
  170. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  171. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  172. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  173. package/dist/src/functions/embeddings/embed-many.function.d.ts +2 -2
  174. package/dist/src/functions/embeddings/embed-many.function.d.ts.map +1 -1
  175. package/dist/src/functions/embeddings/embed.function.d.ts +2 -2
  176. package/dist/src/functions/embeddings/embed.function.d.ts.map +1 -1
  177. package/dist/src/functions/text/generate-object.function.d.ts +6 -6
  178. package/dist/src/functions/text/generate-object.function.d.ts.map +1 -1
  179. package/dist/src/functions/text/generate.function.d.ts +2 -2
  180. package/dist/src/functions/text/generate.function.d.ts.map +1 -1
  181. package/dist/src/ollama.variable.js +2 -2
  182. package/dist/src/ollama.variable.js.map +1 -1
  183. package/dist/types/application-types.d.ts +17 -0
  184. package/package.json +6 -7
  185. package/.pikku/addon/pikku-addon-types.gen.ts +0 -105
  186. package/.pikku/addon/pikku-package.gen.ts +0 -11
  187. package/.pikku/agent/pikku-agent-map.gen.d.ts +0 -4
  188. package/.pikku/agent/pikku-agent-types.gen.ts +0 -82
  189. package/.pikku/channel/pikku-channel-types.gen.ts +0 -177
  190. package/.pikku/console/pikku-addon-meta.gen.json +0 -58
  191. package/.pikku/console/pikku-node-types.gen.ts +0 -8
  192. package/.pikku/function/pikku-function-types.gen.ts +0 -754
  193. package/.pikku/function/pikku-functions-meta-verbose.gen.json +0 -118
  194. package/.pikku/function/pikku-functions-meta.gen.json +0 -78
  195. package/.pikku/function/pikku-functions-meta.gen.ts +0 -7
  196. package/.pikku/function/pikku-functions.gen.ts +0 -14
  197. package/.pikku/http/pikku-http-types.gen.ts +0 -147
  198. package/.pikku/mcp/pikku-mcp-types.gen.ts +0 -183
  199. package/.pikku/pikku-bootstrap.gen.ts +0 -8
  200. package/.pikku/pikku-meta-service.gen.ts +0 -10
  201. package/.pikku/pikku-services.gen.ts +0 -45
  202. package/.pikku/pikku-types.gen.ts +0 -21
  203. package/.pikku/queue/pikku-queue-types.gen.ts +0 -27
  204. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +0 -211
  205. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +0 -6
  206. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -6
  207. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +0 -25
  208. package/.pikku/schemas/register.gen.ts +0 -39
  209. package/.pikku/schemas/schemas/OllamaEmbedInput.schema.json +0 -1
  210. package/.pikku/schemas/schemas/OllamaEmbedManyInput.schema.json +0 -1
  211. package/.pikku/schemas/schemas/OllamaEmbedManyOutput.schema.json +0 -1
  212. package/.pikku/schemas/schemas/OllamaEmbedOutput.schema.json +0 -1
  213. package/.pikku/schemas/schemas/OllamaGenerateObjectInput.schema.json +0 -1
  214. package/.pikku/schemas/schemas/OllamaGenerateObjectOutput.schema.json +0 -1
  215. package/.pikku/schemas/schemas/OllamaGenerateTextInput.schema.json +0 -1
  216. package/.pikku/schemas/schemas/OllamaGenerateTextOutput.schema.json +0 -1
  217. package/.pikku/schemas/schemas/VariableSchema_ollama_base_url.schema.json +0 -1
  218. package/.pikku/secrets/pikku-secret-types.gen.ts +0 -5
  219. package/.pikku/secrets/pikku-secrets.gen.ts +0 -21
  220. package/.pikku/trigger/pikku-trigger-types.gen.ts +0 -160
  221. package/.pikku/variables/pikku-variable-types.gen.ts +0 -5
  222. package/.pikku/variables/pikku-variables-meta.gen.json +0 -10
  223. package/.pikku/variables/pikku-variables.gen.ts +0 -23
  224. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +0 -38
  225. package/.pikku/workflow/pikku-workflow-types.gen.ts +0 -167
  226. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +0 -9
  227. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +0 -3
  228. /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)
@@ -1,3 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */