@pikku/addon-ollama 0.1.2 → 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.
Files changed (224) hide show
  1. package/.pikku/addon/pikku-addon-types.gen.ts +1 -1
  2. package/.pikku/addon/pikku-package.gen.ts +1 -1
  3. package/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  4. package/.pikku/agent/pikku-agent-types.gen.ts +4 -2
  5. package/.pikku/channel/pikku-channel-types.gen.ts +1 -1
  6. package/.pikku/console/pikku-addon-meta.gen.json +4 -1
  7. package/.pikku/console/pikku-node-types.gen.ts +1 -1
  8. package/.pikku/function/pikku-function-types.gen.ts +117 -74
  9. package/.pikku/function/pikku-functions-meta-verbose.gen.json +8 -0
  10. package/.pikku/function/pikku-functions-meta.gen.json +28 -4
  11. package/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  12. package/.pikku/function/pikku-functions.gen.ts +1 -1
  13. package/.pikku/http/pikku-http-types.gen.ts +3 -31
  14. package/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  15. package/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
  16. package/.pikku/pikku-bootstrap.gen.ts +1 -1
  17. package/.pikku/pikku-meta-service.gen.ts +1 -1
  18. package/.pikku/pikku-services.gen.ts +6 -1
  19. package/.pikku/pikku-types.gen.ts +4 -1
  20. package/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  21. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +1 -1
  22. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +1 -1
  23. package/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +207 -0
  24. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +1 -1
  25. package/.pikku/scenarios/features.gen.json +1 -0
  26. package/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
  27. package/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
  28. package/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
  29. package/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
  30. package/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
  31. package/.pikku/scenarios/schemas/register.gen.ts +4 -0
  32. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  33. package/.pikku/schemas/register.gen.ts +1 -1
  34. package/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
  35. package/.pikku/scopes/pikku-personas.gen.ts +52 -0
  36. package/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
  37. package/.pikku/scopes/pikku-roles.gen.ts +41 -0
  38. package/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
  39. package/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
  40. package/.pikku/scopes/pikku-scopes.gen.ts +58 -0
  41. package/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
  42. package/.pikku/secrets/pikku-secrets.gen.ts +14 -1
  43. package/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  44. package/.pikku/variables/pikku-variable-types.gen.ts +2 -2
  45. package/.pikku/variables/pikku-variables.gen.ts +17 -4
  46. package/.pikku/workflow/personas.gen.json +1 -0
  47. package/.pikku/workflow/pikku-personas.gen.ts +38 -0
  48. package/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
  49. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  50. package/.pikku/workflow/pikku-workflow-types.gen.ts +429 -5
  51. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +3 -3
  52. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  53. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
  54. package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
  55. package/dist/.pikku/addon/pikku-addon-types.gen.ts +1 -1
  56. package/dist/.pikku/addon/pikku-package.gen.js +1 -1
  57. package/dist/.pikku/addon/pikku-package.gen.ts +1 -1
  58. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +1 -1
  59. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +4 -2
  60. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
  61. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
  62. package/dist/.pikku/agent/pikku-agent-types.gen.ts +4 -2
  63. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  64. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  65. package/dist/.pikku/channel/pikku-channel-types.gen.ts +1 -1
  66. package/dist/.pikku/console/pikku-addon-meta.gen.json +4 -1
  67. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  68. package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
  69. package/dist/.pikku/function/pikku-function-types.gen.d.ts +77 -61
  70. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
  71. package/dist/.pikku/function/pikku-function-types.gen.js +29 -12
  72. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
  73. package/dist/.pikku/function/pikku-function-types.gen.ts +117 -74
  74. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +8 -0
  75. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  76. package/dist/.pikku/function/pikku-functions-meta.gen.json +28 -4
  77. package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  78. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  79. package/dist/.pikku/function/pikku-functions.gen.ts +1 -1
  80. package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -24
  81. package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -1
  82. package/dist/.pikku/http/pikku-http-types.gen.js +2 -24
  83. package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -1
  84. package/dist/.pikku/http/pikku-http-types.gen.ts +3 -31
  85. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  86. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  87. package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  88. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +10 -0
  89. package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts.map +1 -0
  90. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +10 -0
  91. package/dist/.pikku/pikku-bootstrap-scenarios.gen.js.map +1 -0
  92. package/dist/.pikku/pikku-bootstrap-scenarios.gen.ts +9 -0
  93. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  94. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  95. package/dist/.pikku/pikku-bootstrap.gen.ts +1 -1
  96. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  97. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  98. package/dist/.pikku/pikku-meta-service.gen.ts +1 -1
  99. package/dist/.pikku/pikku-services.gen.d.ts +6 -1
  100. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
  101. package/dist/.pikku/pikku-services.gen.js +5 -0
  102. package/dist/.pikku/pikku-services.gen.js.map +1 -1
  103. package/dist/.pikku/pikku-services.gen.ts +6 -1
  104. package/dist/.pikku/pikku-types.gen.d.ts +2 -1
  105. package/dist/.pikku/pikku-types.gen.d.ts.map +1 -1
  106. package/dist/.pikku/pikku-types.gen.js +3 -1
  107. package/dist/.pikku/pikku-types.gen.js.map +1 -1
  108. package/dist/.pikku/pikku-types.gen.ts +4 -1
  109. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  110. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  111. package/dist/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  112. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +1 -1
  113. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +1 -1
  114. package/dist/.pikku/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +207 -0
  115. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  116. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +1 -1
  117. package/dist/.pikku/scenarios/features.gen.json +1 -0
  118. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts +2 -0
  119. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.d.ts.map +1 -0
  120. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +11 -0
  121. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js.map +1 -0
  122. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.json +1 -0
  123. package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.ts +12 -0
  124. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +5 -0
  125. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts.map +1 -0
  126. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js +2 -0
  127. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.js.map +1 -0
  128. package/dist/.pikku/scenarios/pikku-scenario-functions.gen.ts +4 -0
  129. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts +2 -0
  130. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.d.ts.map +1 -0
  131. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +11 -0
  132. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js.map +1 -0
  133. package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.ts +15 -0
  134. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +5 -0
  135. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts.map +1 -0
  136. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js +2 -0
  137. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.js.map +1 -0
  138. package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.ts +4 -0
  139. package/dist/.pikku/scenarios/schemas/register.gen.d.ts +5 -0
  140. package/dist/.pikku/scenarios/schemas/register.gen.d.ts.map +1 -0
  141. package/dist/.pikku/scenarios/schemas/register.gen.js +5 -0
  142. package/dist/.pikku/scenarios/schemas/register.gen.js.map +1 -0
  143. package/dist/.pikku/scenarios/schemas/register.gen.ts +4 -0
  144. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  145. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  146. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  147. package/dist/.pikku/schemas/register.gen.js +1 -1
  148. package/dist/.pikku/schemas/register.gen.ts +1 -1
  149. package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
  150. package/dist/.pikku/scopes/pikku-personas.gen.d.ts +37 -0
  151. package/dist/.pikku/scopes/pikku-personas.gen.d.ts.map +1 -0
  152. package/dist/.pikku/scopes/pikku-personas.gen.js +18 -0
  153. package/dist/.pikku/scopes/pikku-personas.gen.js.map +1 -0
  154. package/dist/.pikku/scopes/pikku-personas.gen.ts +52 -0
  155. package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
  156. package/dist/.pikku/scopes/pikku-roles.gen.d.ts +31 -0
  157. package/dist/.pikku/scopes/pikku-roles.gen.d.ts.map +1 -0
  158. package/dist/.pikku/scopes/pikku-roles.gen.js +19 -0
  159. package/dist/.pikku/scopes/pikku-roles.gen.js.map +1 -0
  160. package/dist/.pikku/scopes/pikku-roles.gen.ts +41 -0
  161. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +8 -0
  162. package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts.map +1 -0
  163. package/dist/.pikku/scopes/pikku-scope-types.gen.js +6 -0
  164. package/dist/.pikku/scopes/pikku-scope-types.gen.js.map +1 -0
  165. package/dist/.pikku/scopes/pikku-scope-types.gen.ts +7 -0
  166. package/dist/.pikku/scopes/pikku-scopes-meta.gen.json +1 -0
  167. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +36 -0
  168. package/dist/.pikku/scopes/pikku-scopes.gen.d.ts.map +1 -0
  169. package/dist/.pikku/scopes/pikku-scopes.gen.js +28 -0
  170. package/dist/.pikku/scopes/pikku-scopes.gen.js.map +1 -0
  171. package/dist/.pikku/scopes/pikku-scopes.gen.ts +58 -0
  172. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
  173. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -1
  174. package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
  175. package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -1
  176. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +2 -2
  177. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +11 -1
  178. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -1
  179. package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -1
  180. package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -1
  181. package/dist/.pikku/secrets/pikku-secrets.gen.ts +14 -1
  182. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  183. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  184. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  185. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +2 -2
  186. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -1
  187. package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
  188. package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -1
  189. package/dist/.pikku/variables/pikku-variable-types.gen.ts +2 -2
  190. package/dist/.pikku/variables/pikku-variables.gen.d.ts +11 -1
  191. package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -1
  192. package/dist/.pikku/variables/pikku-variables.gen.js +14 -4
  193. package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -1
  194. package/dist/.pikku/variables/pikku-variables.gen.ts +17 -4
  195. package/dist/.pikku/workflow/personas.gen.json +1 -0
  196. package/dist/.pikku/workflow/pikku-personas.gen.d.ts +16 -0
  197. package/dist/.pikku/workflow/pikku-personas.gen.d.ts.map +1 -0
  198. package/dist/.pikku/workflow/pikku-personas.gen.js +18 -0
  199. package/dist/.pikku/workflow/pikku-personas.gen.js.map +1 -0
  200. package/dist/.pikku/workflow/pikku-personas.gen.ts +38 -0
  201. package/dist/.pikku/workflow/pikku-scenario-step-map.gen.d.ts +18 -0
  202. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +1 -1
  203. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +254 -5
  204. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
  205. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +62 -1
  206. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
  207. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +429 -5
  208. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  209. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -1
  210. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +3 -3
  211. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  212. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  213. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  214. package/dist/src/functions/embeddings/embed-many.function.d.ts +2 -2
  215. package/dist/src/functions/embeddings/embed-many.function.d.ts.map +1 -1
  216. package/dist/src/functions/embeddings/embed.function.d.ts +2 -2
  217. package/dist/src/functions/embeddings/embed.function.d.ts.map +1 -1
  218. package/dist/src/functions/text/generate-object.function.d.ts +6 -6
  219. package/dist/src/functions/text/generate-object.function.d.ts.map +1 -1
  220. package/dist/src/functions/text/generate.function.d.ts +2 -2
  221. package/dist/src/functions/text/generate.function.d.ts.map +1 -1
  222. package/dist/src/ollama.variable.js +2 -2
  223. package/dist/src/ollama.variable.js.map +1 -1
  224. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow'
5
5
  import { template } from '@pikku/core/workflow'
@@ -8,12 +8,17 @@ import {
8
8
  type PikkuWorkflowGraphConfig,
9
9
  type PikkuWorkflowGraphResult,
10
10
  } from '@pikku/core/workflow'
11
- import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow'
11
+ import type { PikkuWorkflowWire, PikkuScenarioWire, WorkflowStepOptions, ScenarioStepOptions } from '@pikku/core/workflow'
12
12
 
13
13
  export { WorkflowCancelledException }
14
14
  import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js'
15
15
  import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js'
16
16
  import type { FlattenedWorkflowMap } from './pikku-workflow-map.gen.d.js'
17
+ import type { AgentMap as FlattenedAgentMap } from '../agent/pikku-agent-map.gen.d.js'
18
+ import type { FlattenedScenarioStepMap } from './pikku-scenario-step-map.gen.d.js'
19
+ import type { TypedPersonas } from './pikku-personas.gen.js'
20
+
21
+ export type { TypedPersonas }
17
22
 
18
23
  export { template }
19
24
 
@@ -39,8 +44,48 @@ export interface TypedWorkflow extends PikkuWorkflowWire {
39
44
  ): Promise<T>
40
45
  }
41
46
 
47
+ /**
48
+ * The typed half of a scenario wire: `step` and its `given`/`when`/`then`
49
+ * sugar, narrowed to the names declared by `pikkuScenarioStep` in this project.
50
+ * The phase only changes the prose the reporter renders.
51
+ */
52
+ export interface TypedScenarioSteps {
53
+ step<K extends keyof FlattenedScenarioStepMap>(
54
+ stepName: string,
55
+ stepFunc: K,
56
+ data?: FlattenedScenarioStepMap[K]['input'],
57
+ options?: ScenarioStepOptions
58
+ ): Promise<FlattenedScenarioStepMap[K]['output']>
59
+
60
+ given<K extends keyof FlattenedScenarioStepMap>(
61
+ stepName: string,
62
+ stepFunc: K,
63
+ data?: FlattenedScenarioStepMap[K]['input'],
64
+ options?: ScenarioStepOptions
65
+ ): Promise<FlattenedScenarioStepMap[K]['output']>
66
+
67
+ when<K extends keyof FlattenedScenarioStepMap>(
68
+ stepName: string,
69
+ stepFunc: K,
70
+ data?: FlattenedScenarioStepMap[K]['input'],
71
+ options?: ScenarioStepOptions
72
+ ): Promise<FlattenedScenarioStepMap[K]['output']>
73
+
74
+ then<K extends keyof FlattenedScenarioStepMap>(
75
+ stepName: string,
76
+ stepFunc: K,
77
+ data?: FlattenedScenarioStepMap[K]['input'],
78
+ options?: ScenarioStepOptions
79
+ ): Promise<FlattenedScenarioStepMap[K]['output']>
80
+ }
81
+
82
+ export type TypedScenario = TypedWorkflow &
83
+ Omit<PikkuScenarioWire, keyof PikkuWorkflowWire | keyof TypedScenarioSteps> &
84
+ TypedScenarioSteps
85
+
42
86
  import type { StandardSchemaV1 } from '@standard-schema/spec'
43
87
  import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js'
88
+ import type { ScopeId } from '../scopes/pikku-scopes.gen.js'
44
89
  import { PikkuError } from '@pikku/core/errors'
45
90
  import type { CorePermissionGroup } from '@pikku/core'
46
91
 
@@ -49,6 +94,11 @@ export type PikkuFunctionWorkflow<
49
94
  Out = never
50
95
  > = PikkuFunctionSessionless<In, Out, 'workflow'>
51
96
 
97
+ export type PikkuFunctionScenario<
98
+ In = unknown,
99
+ Out = never
100
+ > = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors'>
101
+
52
102
  export type PikkuWorkflowConfigWithSchema<
53
103
  InputSchema extends StandardSchemaV1 | undefined = undefined,
54
104
  OutputSchema extends StandardSchemaV1 | undefined = undefined
@@ -70,6 +120,11 @@ export type PikkuWorkflowConfigWithSchema<
70
120
  OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
71
121
  >
72
122
  auth?: boolean
123
+ /**
124
+ * Scopes the session must hold to run this workflow. All of them are required
125
+ * (AND), and they are checked before `permissions`.
126
+ */
127
+ scopes?: ScopeId[]
73
128
  permissions?: InputSchema extends StandardSchemaV1 ? CorePermissionGroup<PikkuPermission<InferSchemaOutput<InputSchema>>> : undefined
74
129
  middleware?: PikkuMiddleware[]
75
130
  input?: InputSchema
@@ -109,6 +164,361 @@ export function pikkuWorkflowComplexFunc(func: any) {
109
164
  return typeof func === 'function' ? { func } : func
110
165
  }
111
166
 
167
+ export type PikkuScenarioConfigWithSchema<
168
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
169
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
170
+ > = Omit<PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>, 'func' | 'auth' | 'scopes' | 'permissions'> & {
171
+ func: PikkuFunctionScenario<
172
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
173
+ OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
174
+ >
175
+ /**
176
+ * Runs before the scenario body. Same signature as `func`, but its return
177
+ * value is discarded — a hook is setup, not a step, so it is never recorded
178
+ * on the ladder. Throwing skips the body and fails the run; `after` still
179
+ * runs.
180
+ */
181
+ before?: PikkuScenarioHook<InputSchema>
182
+ /**
183
+ * Always runs after the scenario body, in a `finally`, whether it passed or
184
+ * failed. Throwing fails a run that would otherwise have passed; on an
185
+ * already-failed run it attaches as the `cause` and never replaces the
186
+ * original error.
187
+ */
188
+ after?: PikkuScenarioHook<InputSchema>
189
+ /**
190
+ * Why this scenario is held out of a default run, stated where the scenario
191
+ * is. The scenario still appears in the plan and is reported as skipped
192
+ * rather than quietly omitted; naming it directly with `--flows` runs it
193
+ * anyway.
194
+ */
195
+ skip?: string
196
+ }
197
+
198
+ /**
199
+ * A scenario lifecycle hook: the scenario's own `(services, data, wire)`
200
+ * signature with its result discarded.
201
+ */
202
+ export type PikkuScenarioHook<
203
+ InputSchema extends StandardSchemaV1 | undefined = undefined
204
+ > = PikkuFunctionScenario<
205
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
206
+ void
207
+ >
208
+
209
+ /**
210
+ * Declares a scenario hook. Returns the function verbatim — a hook is never
211
+ * registered, so this exists purely to give an inline hook a call site to be
212
+ * contextually typed from, the way every other pikku primitive is.
213
+ */
214
+ export function pikkuScenarioHook<In = unknown>(
215
+ hook: PikkuFunctionScenario<In, void>
216
+ ): PikkuFunctionScenario<In, void> {
217
+ return hook
218
+ }
219
+
220
+ /**
221
+ * A scenario: a complex workflow that drives the app the way users do.
222
+ * Steps run as actors over the REAL transport — `scenario.do(step, rpc,
223
+ * data, { actor: actors.yasser })` — so flows double as e2e tests and
224
+ * staged/production health checks (no state reset; scope what you create).
225
+ */
226
+ export function pikkuScenario<
227
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
228
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
229
+ >(
230
+ config: PikkuScenarioConfigWithSchema<InputSchema, OutputSchema>
231
+ ): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenario' | 'actors', PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
232
+ export function pikkuScenario<In, Out = unknown>(
233
+ func:
234
+ | PikkuFunctionScenario<In, Out>
235
+ | PikkuFunctionConfig<In, Out, 'scenario' | 'actors', PikkuFunctionScenario<In, Out>>
236
+ ): PikkuFunctionConfig<In, Out, 'scenario' | 'actors'>
237
+ export function pikkuScenario(func: any) {
238
+ return typeof func === 'function' ? { func } : func
239
+ }
240
+
241
+ /**
242
+ * A scenario as a feature references it. Any `pikkuScenario` export is
243
+ * assignable; `In` is recovered from it so the paired form's `data` is
244
+ * checked against that scenario's own input.
245
+ */
246
+ export type PikkuScenarioRef<In = any, Out = any> = PikkuFunctionConfig<
247
+ In,
248
+ Out,
249
+ 'scenario' | 'actors',
250
+ PikkuFunctionScenario<In, Out>,
251
+ any,
252
+ any
253
+ >
254
+
255
+ /**
256
+ * One entry in a feature's `scenarios` list, validated against itself: a bare
257
+ * scenario, or a scenario paired with the input to run it with. The paired form
258
+ * is gherkin's `Examples:` written as an ordinary loop.
259
+ */
260
+ export type PikkuFeatureEntry<Entry> = Entry extends {
261
+ scenario: PikkuScenarioRef<infer In>
262
+ }
263
+ ? { scenario: PikkuScenarioRef<In>; data: In }
264
+ : Entry extends PikkuScenarioRef
265
+ ? Entry
266
+ : never
267
+
268
+ export type PikkuFeatureConfig<Scenarios extends readonly unknown[]> = {
269
+ /** Human-readable name. The export identifier is the id. */
270
+ name: string
271
+ description?: string
272
+ tags?: string[]
273
+ scenarios: { [K in keyof Scenarios]: PikkuFeatureEntry<Scenarios[K]> }
274
+ /**
275
+ * Runs ONCE before the whole group — not before each scenario. Per-scenario
276
+ * setup is the scenario's own `before`; gherkin's `Background:` is
277
+ * deliberately not expressible here.
278
+ */
279
+ before?: PikkuScenarioHook
280
+ after?: PikkuScenarioHook
281
+ }
282
+
283
+ /**
284
+ * A feature: an ordered group of scenarios, mirroring gherkin's Feature ↔
285
+ * Scenario structure. Scenarios are referenced by imported identifier, so a
286
+ * renamed or deleted scenario is a compile error rather than a silent skip.
287
+ *
288
+ * A scenario does not have to belong to a feature — a void-input scenario
289
+ * still runs standalone.
290
+ *
291
+ * ```ts
292
+ * export const credentialFeature = pikkuFeature({
293
+ * name: 'Credential API',
294
+ * tags: ['credential'],
295
+ * before: startsMockOAuthServer,
296
+ * after: stopsMockOAuthServer,
297
+ * scenarios: [
298
+ * credentialLazyLoadScenario,
299
+ * ...['stripe', 'google'].map((name) => ({
300
+ * scenario: credentialRoundTripScenario,
301
+ * data: { name },
302
+ * })),
303
+ * ],
304
+ * })
305
+ * ```
306
+ */
307
+ export function pikkuFeature<const Scenarios extends readonly unknown[]>(
308
+ config: PikkuFeatureConfig<Scenarios>
309
+ ): PikkuFeatureConfig<Scenarios> {
310
+ return config
311
+ }
312
+
313
+ /**
314
+ * One surface's implementation of a step.
315
+ *
316
+ * Each binding is typed independently, so a browser binding gets a non-optional
317
+ * `wire.browser` and a cli binding a non-optional `wire.cli` without either
318
+ * leaking into the other.
319
+ */
320
+ export type PikkuFunctionScenarioStep<
321
+ In = unknown,
322
+ Out = never,
323
+ Surface extends 'browser' | 'cli' | 'default' = 'default'
324
+ > = PikkuFunctionSessionless<
325
+ In,
326
+ Out,
327
+ Surface extends 'default' ? 'scenarioStep' : 'scenarioStep' | Surface
328
+ >
329
+
330
+ export type PikkuScenarioStepConfigWithSchema<
331
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
332
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
333
+ > = {
334
+ /** Registered name — this is the string `scenario.step()` references. */
335
+ name: string
336
+ /**
337
+ * What this step does, for the console and for whoever reads the source. It
338
+ * is also the fallback prose when no `template` is declared, in which case a
339
+ * reporter renders "Given the shopper buys an apple". Defaults to the call
340
+ * site's step name.
341
+ */
342
+ description?: string
343
+ /**
344
+ * The prose a reporter renders for this step, with `{placeholders}` filled
345
+ * from the input the step was called with — `'sees {packageName}'` reports as
346
+ * "Then the admin sees @pikku/addon-todos". Every input field should appear,
347
+ * so the report names the values under test rather than repeating one
348
+ * sentence per call site.
349
+ */
350
+ template?: string
351
+ title?: string
352
+ tags?: string[]
353
+ input?: InputSchema
354
+ output?: OutputSchema
355
+ errors?: Array<typeof PikkuError>
356
+ /**
357
+ * Drive this step through a real browser, as a human would. The runner
358
+ * provisions a window for the step's actor first — which makes an actor
359
+ * mandatory — and `wire.browser` is non-optional inside it.
360
+ *
361
+ * Compose shared utilities here rather than writing raw clicks: the step says
362
+ * what the actor is doing, the utilities say how.
363
+ */
364
+ browser?: PikkuFunctionScenarioStep<
365
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
366
+ OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
367
+ 'browser'
368
+ >
369
+ /** Drive this step remotely, over the websocket. */
370
+ cli?: PikkuFunctionScenarioStep<
371
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
372
+ OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
373
+ 'cli'
374
+ >
375
+ /**
376
+ * The server-side path — the fast suite, and the floor every other surface
377
+ * falls back to.
378
+ *
379
+ * On a `then`, this is not an alternative to the other bindings but a second
380
+ * **witness**: the run executes every binding it has and fails if they
381
+ * disagree, because "the row says paid" and "the page says paid" are different
382
+ * claims and the gap between them is the bug nobody catches.
383
+ */
384
+ default?: PikkuFunctionScenarioStep<
385
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
386
+ OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
387
+ 'default'
388
+ >
389
+ }
390
+
391
+ export type PikkuScenarioStepConfig<In, Out> =
392
+ Omit<PikkuScenarioStepConfigWithSchema<undefined, undefined>, 'browser' | 'cli' | 'default' | 'input' | 'output'> & {
393
+ browser?: PikkuFunctionScenarioStep<In, Out, 'browser'>
394
+ cli?: PikkuFunctionScenarioStep<In, Out, 'cli'>
395
+ default?: PikkuFunctionScenarioStep<In, Out, 'default'>
396
+ }
397
+
398
+ /**
399
+ * A named, reusable scenario step, declaring one implementation per surface an
400
+ * actor can drive it through.
401
+ *
402
+ * The step's identity is what the actor is trying to do; which surface carries
403
+ * it out is a binding. That is what lets one ladder run through a real browser,
404
+ * over the websocket, or entirely server-side — and what makes "how much of this
405
+ * flow can a human actually reach" a number rather than a guess.
406
+ *
407
+ * Steps are deliberately NOT registered as RPCs: a browser-driving step must
408
+ * never be network-callable.
409
+ */
410
+ export function pikkuScenarioStep<
411
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
412
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
413
+ >(
414
+ config: PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>
415
+ ): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep' | 'browser' | 'cli', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'browser' | 'cli' | 'default'>, InputSchema, OutputSchema>
416
+ export function pikkuScenarioStep<In, Out = unknown>(
417
+ config: PikkuScenarioStepConfig<In, Out>
418
+ ): PikkuFunctionConfig<In, Out, 'scenarioStep' | 'browser' | 'cli'>
419
+ export function pikkuScenarioStep(config: any) {
420
+ const surfaces = (['browser', 'cli', 'default'] as const).filter(
421
+ (surface) => typeof config[surface] === 'function'
422
+ )
423
+ if (surfaces.length === 0) {
424
+ throw new Error(
425
+ `[scenario] step '${config.name}' declares no surface bindings. Add at least a \`default\` (server-side) implementation.`
426
+ )
427
+ }
428
+ return {
429
+ ...config,
430
+ surfaces,
431
+ // The runner sets the surface on the wire and calls this once per binding it
432
+ // resolved — every witness of a `then`, exactly one for an action step.
433
+ func: (services: any, data: any, wire: any) => {
434
+ const surface = wire?.scenarioStep?.surface ?? 'default'
435
+ const binding = config[surface] ?? config.default
436
+ return binding(services, data, wire)
437
+ },
438
+ }
439
+ }
440
+
441
+ /**
442
+ * What a step declares when nobody drives it: one implementation, and no
443
+ * surfaces to choose between.
444
+ *
445
+ * `func` rather than `default` is the point. `default` means *the fallback when
446
+ * no other surface applies*, which implies others could exist; `func` says
447
+ * structurally that there is one way this happens. That also keeps the phase
448
+ * rule coherent — an assertion runs every witness it has and fails if they
449
+ * disagree, and this has exactly one by construction.
450
+ */
451
+ export type PikkuSubjectScenarioStepConfigWithSchema<
452
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
453
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
454
+ > = Omit<
455
+ PikkuScenarioStepConfigWithSchema<InputSchema, OutputSchema>,
456
+ 'browser' | 'cli' | 'default'
457
+ > & {
458
+ func: PikkuFunctionScenarioStep<
459
+ InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
460
+ OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown,
461
+ 'default'
462
+ >
463
+ }
464
+
465
+ export type PikkuSubjectScenarioStepConfig<In, Out> =
466
+ Omit<PikkuScenarioStepConfig<In, Out>, 'browser' | 'cli' | 'default'> & {
467
+ func: PikkuFunctionScenarioStep<In, Out, 'default'>
468
+ }
469
+
470
+ /**
471
+ * A step in which the app acts on itself — "Given the platform has expired the
472
+ * trial".
473
+ *
474
+ * The grammatical subject of that sentence is not a user of your app; it **is**
475
+ * your app, which is why it is its own declaration rather than a persona with an
476
+ * asterisk. A persona is a person.
477
+ *
478
+ * Local-test-only, and never in a virtual user's catalogue: a virtual user that
479
+ * could expire its own trial is manufacturing the outcome it exists to discover.
480
+ */
481
+ export function pikkuPlatformScenarioStep<
482
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
483
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
484
+ >(
485
+ config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema>
486
+ ): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>
487
+ export function pikkuPlatformScenarioStep<In, Out = unknown>(
488
+ config: PikkuSubjectScenarioStepConfig<In, Out>
489
+ ): PikkuFunctionConfig<In, Out, 'scenarioStep'>
490
+ export function pikkuPlatformScenarioStep(config: any) {
491
+ return { ...config, surfaces: ['default'] }
492
+ }
493
+
494
+ /**
495
+ * A step in which a third-party system acts — "Given Stripe's webhook arrives",
496
+ * "When Mailgun bounces it".
497
+ *
498
+ * `addon` names the addon that wraps that service, the same name its
499
+ * `wireAddon` declares. These steps *are* the mock its consumers currently
500
+ * hand-write: shipped by the addon author, maintained with the addon, and the
501
+ * same artifact that appears in the prose.
502
+ *
503
+ * Note that arranging and asserting are different — "Stripe's webhook arrives"
504
+ * stubs, "Then Stripe was charged" asserts, and only the first is a stub.
505
+ *
506
+ * Local-test-only, and never in a virtual user's catalogue: one that could
507
+ * invoke this would forge its own payment success.
508
+ */
509
+ export function pikkuAddonScenarioStep<
510
+ InputSchema extends StandardSchemaV1 | undefined = undefined,
511
+ OutputSchema extends StandardSchemaV1 | undefined = undefined
512
+ >(
513
+ config: PikkuSubjectScenarioStepConfigWithSchema<InputSchema, OutputSchema> & { addon: string }
514
+ ): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenarioStep', PikkuFunctionScenarioStep<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'default'>, InputSchema, OutputSchema>
515
+ export function pikkuAddonScenarioStep<In, Out = unknown>(
516
+ config: PikkuSubjectScenarioStepConfig<In, Out> & { addon: string }
517
+ ): PikkuFunctionConfig<In, Out, 'scenarioStep'>
518
+ export function pikkuAddonScenarioStep(config: any) {
519
+ return { ...config, surfaces: ['default'] }
520
+ }
521
+
112
522
  type TypedRef<T> = { $ref: string; path?: string } & { __phantomType?: T }
113
523
 
114
524
  type TemplateString = {
@@ -125,13 +535,19 @@ type InputWithRefs<T> = {
125
535
  type NodeInputType<FuncMap extends Record<string, string>, K extends keyof FuncMap> =
126
536
  FuncMap[K] extends keyof FlattenedRPCMap
127
537
  ? InputWithRefs<FlattenedRPCMap[FuncMap[K]]['input']>
128
- : Record<string, unknown>
538
+ : FuncMap[K] extends keyof FlattenedWorkflowMap
539
+ ? InputWithRefs<FlattenedWorkflowMap[FuncMap[K]]['input']>
540
+ : Record<string, unknown>
129
541
 
130
542
  type NodeOutputKeys<FuncMap extends Record<string, string>, N extends string> =
131
543
  N extends keyof FuncMap
132
544
  ? FuncMap[N] extends keyof FlattenedRPCMap
133
545
  ? keyof FlattenedRPCMap[FuncMap[N]]['output'] & string
134
- : string
546
+ : FuncMap[N] extends keyof FlattenedWorkflowMap
547
+ ? keyof FlattenedWorkflowMap[FuncMap[N]]['output'] & string
548
+ : FuncMap[N] extends keyof FlattenedAgentMap
549
+ ? keyof FlattenedAgentMap[FuncMap[N]]['output'] & string
550
+ : string
135
551
  : string
136
552
 
137
553
  type RefFunction<FuncMap extends Record<string, string>> = {
@@ -139,6 +555,7 @@ type RefFunction<FuncMap extends Record<string, string>> = {
139
555
  nodeId: N,
140
556
  path: NodeOutputKeys<FuncMap, N>
141
557
  ): TypedRef<unknown>
558
+ <N extends Extract<keyof FuncMap, string>>(nodeId: N): TypedRef<unknown>
142
559
  (nodeId: 'trigger' | '$item', path?: string): TypedRef<unknown>
143
560
  }
144
561
 
@@ -152,13 +569,20 @@ type GraphNodeConfigMap<FuncMap extends Record<string, string>> = {
152
569
  | (() => NodeInputType<FuncMap, K>)
153
570
  | ((ref: RefFunction<FuncMap>, template: TemplateFunction) => NodeInputType<FuncMap, K>)
154
571
  onError?: Extract<keyof FuncMap, string> | Extract<keyof FuncMap, string>[]
572
+ /** Free-text node documentation. Non-semantic — excluded from graphHash. */
573
+ notes?: string
155
574
  }
156
575
  }
157
576
 
158
577
  type NextConfig<NodeIds extends string> = NodeIds | NodeIds[] | { if: string; then: NodeIds; else?: NodeIds }
159
578
 
160
579
  export function pikkuWorkflowGraph<
161
- const FuncMap extends Record<string, keyof FlattenedRPCMap & string>
580
+ const FuncMap extends Record<
581
+ string,
582
+ | (keyof FlattenedRPCMap & string)
583
+ | (keyof FlattenedWorkflowMap & string)
584
+ | (keyof FlattenedAgentMap & string)
585
+ >
162
586
  >(
163
587
  config: PikkuWorkflowGraphConfig<FuncMap, GraphNodeConfigMap<FuncMap>>
164
588
  ): PikkuWorkflowGraphResult {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  const workflowsMeta = {};
@@ -1 +1 @@
1
- {"version":3,"file":"pikku-workflow-wirings-meta.gen.js","sourceRoot":"","sources":["../../../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,aAAa,GAA6B,EAAE,CAAA;AAElD,UAAU,CAAC,qBAAqB,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,CAAA"}
1
+ {"version":3,"file":"pikku-workflow-wirings-meta.gen.js","sourceRoot":"","sources":["../../../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,aAAa,GAAyB,EAAE,CAAA;AAE9C,UAAU,CAAC,qBAAqB,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,CAAA"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal'
5
- import type { SerializedWorkflowGraphs } from '@pikku/inspector/workflow-graph'
5
+ import type { WorkflowsRuntimeMeta } from '@pikku/core/workflow/types'
6
6
 
7
- const workflowsMeta: SerializedWorkflowGraphs = {}
7
+ const workflowsMeta: WorkflowsRuntimeMeta = {}
8
8
 
9
9
  pikkuState('@pikku/addon-ollama', 'workflows', 'meta', workflowsMeta)
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.55
3
+ * This file was generated by @pikku/cli@0.12.96
4
4
  */
5
5
  //# sourceMappingURL=pikku-workflow-wirings.gen.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.12.55
3
+ * This file was generated by @pikku/cli@0.12.96
4
4
  */
5
5
  //# sourceMappingURL=pikku-workflow-wirings.gen.js.map
@@ -1,3 +1,3 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.55
2
+ * This file was generated by @pikku/cli@0.12.96
3
3
  */
@@ -28,7 +28,7 @@ export declare const ollamaEmbedMany: import("#pikku").PikkuFunctionConfig<{
28
28
  usage: {
29
29
  tokens: number;
30
30
  };
31
- }, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
31
+ }, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
32
32
  model: string;
33
33
  values: string[];
34
34
  }, {
@@ -36,5 +36,5 @@ export declare const ollamaEmbedMany: import("#pikku").PikkuFunctionConfig<{
36
36
  usage: {
37
37
  tokens: number;
38
38
  };
39
- }, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
39
+ }, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
40
40
  //# sourceMappingURL=embed-many.function.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embed-many.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/embeddings/embed-many.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAA;AAEF,eAAO,MAAM,WAAW;;iBAEtB,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;iBAGhC,CAAA;AAIF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;uEAe1B,CAAA"}
1
+ {"version":3,"file":"embed-many.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/embeddings/embed-many.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAA;AAEF,eAAO,MAAM,WAAW;;iBAEtB,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;iBAGhC,CAAA;AAIF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;4EAe1B,CAAA"}
@@ -28,7 +28,7 @@ export declare const ollamaEmbed: import("#pikku").PikkuFunctionConfig<{
28
28
  usage: {
29
29
  tokens: number;
30
30
  };
31
- }, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
31
+ }, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
32
32
  model: string;
33
33
  value: string;
34
34
  }, {
@@ -36,5 +36,5 @@ export declare const ollamaEmbed: import("#pikku").PikkuFunctionConfig<{
36
36
  usage: {
37
37
  tokens: number;
38
38
  };
39
- }, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
39
+ }, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
40
40
  //# sourceMappingURL=embed.function.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embed.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/embeddings/embed.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAA;AAEF,eAAO,MAAM,WAAW;;iBAEtB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;iBAG5B,CAAA;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;uEAetB,CAAA"}
1
+ {"version":3,"file":"embed.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/embeddings/embed.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAA;AAEF,eAAO,MAAM,WAAW;;iBAEtB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;iBAG5B,CAAA;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;4EAetB,CAAA"}
@@ -23,9 +23,9 @@ export declare const OllamaGenerateObjectInput: z.ZodObject<{
23
23
  schemaName: z.ZodOptional<z.ZodString>;
24
24
  schemaDescription: z.ZodOptional<z.ZodString>;
25
25
  mode: z.ZodOptional<z.ZodEnum<{
26
+ json: "json";
26
27
  auto: "auto";
27
28
  tool: "tool";
28
- json: "json";
29
29
  }>>;
30
30
  maxTokens: z.ZodOptional<z.ZodNumber>;
31
31
  temperature: z.ZodOptional<z.ZodNumber>;
@@ -55,7 +55,7 @@ export declare const ollamaGenerateObject: import("#pikku").PikkuFunctionConfig<
55
55
  system?: string | undefined;
56
56
  schemaName?: string | undefined;
57
57
  schemaDescription?: string | undefined;
58
- mode?: "auto" | "tool" | "json" | undefined;
58
+ mode?: "json" | "auto" | "tool" | undefined;
59
59
  maxTokens?: number | undefined;
60
60
  temperature?: number | undefined;
61
61
  }, {
@@ -77,7 +77,7 @@ export declare const ollamaGenerateObject: import("#pikku").PikkuFunctionConfig<
77
77
  system?: string | undefined;
78
78
  schemaName?: string | undefined;
79
79
  schemaDescription?: string | undefined;
80
- mode?: "auto" | "tool" | "json" | undefined;
80
+ mode?: "json" | "auto" | "tool" | undefined;
81
81
  maxTokens?: number | undefined;
82
82
  temperature?: number | undefined;
83
83
  }, {
@@ -88,7 +88,7 @@ export declare const ollamaGenerateObject: import("#pikku").PikkuFunctionConfig<
88
88
  completionTokens: number;
89
89
  totalTokens: number;
90
90
  };
91
- }, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
91
+ }, "rpc" | "session", import("#pikku").WiredServices> | import("#pikku").PikkuFunction<{
92
92
  model: string;
93
93
  schema: Record<string, any>;
94
94
  prompt?: string | undefined;
@@ -99,7 +99,7 @@ export declare const ollamaGenerateObject: import("#pikku").PikkuFunctionConfig<
99
99
  system?: string | undefined;
100
100
  schemaName?: string | undefined;
101
101
  schemaDescription?: string | undefined;
102
- mode?: "auto" | "tool" | "json" | undefined;
102
+ mode?: "json" | "auto" | "tool" | undefined;
103
103
  maxTokens?: number | undefined;
104
104
  temperature?: number | undefined;
105
105
  }, {
@@ -110,5 +110,5 @@ export declare const ollamaGenerateObject: import("#pikku").PikkuFunctionConfig<
110
110
  completionTokens: number;
111
111
  totalTokens: number;
112
112
  };
113
- }, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
113
+ }, "rpc" | "session", import("#pikku").WiredServices>, undefined, undefined>;
114
114
  //# sourceMappingURL=generate-object.function.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-object.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/text/generate-object.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,aAAa;;;;;;;iBAGxB,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;iBAWpC,CAAA;AAEF,eAAO,MAAM,WAAW;;;;iBAItB,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;iBAIrC,CAAA;AAIF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEAwB/B,CAAA"}
1
+ {"version":3,"file":"generate-object.function.d.ts","sourceRoot":"","sources":["../../../../src/functions/text/generate-object.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,aAAa;;;;;;;iBAGxB,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;iBAWpC,CAAA;AAEF,eAAO,MAAM,WAAW;;;;iBAItB,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;iBAIrC,CAAA;AAIF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAwB/B,CAAA"}