@pikku/addon-ollama 0.1.0 → 0.1.2

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 (177) hide show
  1. package/.pikku/addon/pikku-addon-types.gen.ts +31 -4
  2. package/.pikku/addon/pikku-package.gen.ts +3 -1
  3. package/.pikku/agent/pikku-agent-map.gen.d.ts +2 -14
  4. package/.pikku/agent/pikku-agent-types.gen.ts +13 -7
  5. package/.pikku/channel/pikku-channel-types.gen.ts +177 -0
  6. package/.pikku/console/pikku-addon-meta.gen.json +58 -0
  7. package/.pikku/console/pikku-node-types.gen.ts +1 -1
  8. package/.pikku/function/pikku-function-types.gen.ts +209 -103
  9. package/.pikku/function/pikku-functions-meta-verbose.gen.json +56 -44
  10. package/.pikku/function/pikku-functions-meta.gen.json +42 -38
  11. package/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  12. package/.pikku/function/pikku-functions.gen.ts +2 -2
  13. package/.pikku/http/pikku-http-types.gen.ts +147 -0
  14. package/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
  15. package/.pikku/pikku-bootstrap.gen.ts +2 -9
  16. package/.pikku/pikku-meta-service.gen.ts +10 -0
  17. package/.pikku/pikku-services.gen.ts +14 -2
  18. package/.pikku/pikku-types.gen.ts +1 -1
  19. package/.pikku/queue/pikku-queue-types.gen.ts +27 -0
  20. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +81 -62
  21. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +84 -65
  22. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +6 -0
  23. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
  24. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
  25. package/.pikku/schemas/register.gen.ts +17 -17
  26. package/.pikku/secrets/pikku-secret-types.gen.ts +1 -1
  27. package/.pikku/secrets/pikku-secrets.gen.ts +1 -1
  28. package/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  29. package/.pikku/variables/pikku-variable-types.gen.ts +1 -1
  30. package/.pikku/variables/pikku-variables-meta.gen.json +1 -1
  31. package/.pikku/variables/pikku-variables.gen.ts +1 -1
  32. package/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
  33. package/.pikku/workflow/pikku-workflow-types.gen.ts +66 -57
  34. package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +1 -1
  35. package/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  36. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +19 -3
  37. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -1
  38. package/dist/.pikku/addon/pikku-addon-types.gen.js +26 -3
  39. package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -1
  40. package/dist/.pikku/addon/pikku-addon-types.gen.ts +31 -4
  41. package/dist/.pikku/addon/pikku-package.gen.js +2 -1
  42. package/dist/.pikku/addon/pikku-package.gen.js.map +1 -1
  43. package/dist/.pikku/addon/pikku-package.gen.ts +3 -1
  44. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +2 -14
  45. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +6 -6
  46. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -1
  47. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -1
  48. package/dist/.pikku/agent/pikku-agent-types.gen.ts +13 -7
  49. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
  50. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
  51. package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
  52. package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
  53. package/dist/.pikku/channel/pikku-channel-types.gen.ts +177 -0
  54. package/dist/.pikku/console/pikku-addon-meta.gen.json +58 -0
  55. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  56. package/dist/.pikku/console/pikku-node-types.gen.ts +1 -1
  57. package/dist/.pikku/function/pikku-function-types.gen.d.ts +97 -84
  58. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -1
  59. package/dist/.pikku/function/pikku-function-types.gen.js +96 -60
  60. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -1
  61. package/dist/.pikku/function/pikku-function-types.gen.ts +209 -103
  62. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +56 -44
  63. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  64. package/dist/.pikku/function/pikku-functions-meta.gen.json +42 -38
  65. package/dist/.pikku/function/pikku-functions-meta.gen.ts +1 -1
  66. package/dist/.pikku/function/pikku-functions.gen.js +2 -2
  67. package/dist/.pikku/function/pikku-functions.gen.js.map +1 -1
  68. package/dist/.pikku/function/pikku-functions.gen.ts +2 -2
  69. package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
  70. package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
  71. package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
  72. package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
  73. package/dist/.pikku/http/pikku-http-types.gen.ts +147 -0
  74. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
  75. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
  76. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
  77. package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
  78. package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
  79. package/dist/.pikku/pikku-bootstrap.gen.d.ts +4 -2
  80. package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -1
  81. package/dist/.pikku/pikku-bootstrap.gen.js +2 -10
  82. package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -1
  83. package/dist/.pikku/pikku-bootstrap.gen.ts +2 -9
  84. package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
  85. package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
  86. package/dist/.pikku/pikku-meta-service.gen.js +10 -0
  87. package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
  88. package/dist/.pikku/pikku-meta-service.gen.ts +10 -0
  89. package/dist/.pikku/pikku-services.gen.d.ts +12 -2
  90. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -1
  91. package/dist/.pikku/pikku-services.gen.js +11 -0
  92. package/dist/.pikku/pikku-services.gen.js.map +1 -1
  93. package/dist/.pikku/pikku-services.gen.ts +14 -2
  94. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  95. package/dist/.pikku/pikku-types.gen.js +1 -1
  96. package/dist/.pikku/pikku-types.gen.ts +1 -1
  97. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +24 -0
  98. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
  99. package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
  100. package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
  101. package/dist/.pikku/queue/pikku-queue-types.gen.ts +27 -0
  102. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +81 -62
  103. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +84 -65
  104. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
  105. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
  106. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
  107. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
  108. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +6 -0
  109. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
  110. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
  111. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
  112. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
  113. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
  114. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
  115. package/dist/.pikku/schemas/register.gen.js +11 -11
  116. package/dist/.pikku/schemas/register.gen.js.map +1 -1
  117. package/dist/.pikku/schemas/register.gen.ts +17 -17
  118. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  119. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  120. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +1 -1
  121. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  122. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  123. package/dist/.pikku/secrets/pikku-secrets.gen.ts +1 -1
  124. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  125. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  126. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +1 -1
  127. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  128. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  129. package/dist/.pikku/variables/pikku-variable-types.gen.ts +1 -1
  130. package/dist/.pikku/variables/pikku-variables-meta.gen.json +1 -1
  131. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  132. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  133. package/dist/.pikku/variables/pikku-variables.gen.ts +1 -1
  134. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +9 -5
  135. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +36 -27
  136. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -1
  137. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +5 -18
  138. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -1
  139. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +66 -57
  140. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  141. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +1 -1
  142. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
  143. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  144. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
  145. package/dist/src/functions/embeddings/embed-many.function.d.ts +3 -0
  146. package/dist/src/functions/embeddings/embed-many.function.d.ts.map +1 -1
  147. package/dist/src/functions/embeddings/embed-many.function.js +1 -1
  148. package/dist/src/functions/embeddings/embed-many.function.js.map +1 -1
  149. package/dist/src/functions/embeddings/embed.function.d.ts +3 -0
  150. package/dist/src/functions/embeddings/embed.function.d.ts.map +1 -1
  151. package/dist/src/functions/embeddings/embed.function.js +1 -1
  152. package/dist/src/functions/embeddings/embed.function.js.map +1 -1
  153. package/dist/src/functions/text/generate-object.function.d.ts +17 -4
  154. package/dist/src/functions/text/generate-object.function.d.ts.map +1 -1
  155. package/dist/src/functions/text/generate-object.function.js +2 -2
  156. package/dist/src/functions/text/generate-object.function.js.map +1 -1
  157. package/dist/src/functions/text/generate.function.d.ts +13 -0
  158. package/dist/src/functions/text/generate.function.d.ts.map +1 -1
  159. package/dist/src/functions/text/generate.function.js +2 -2
  160. package/dist/src/functions/text/generate.function.js.map +1 -1
  161. package/package.json +8 -8
  162. package/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
  163. package/.pikku/agent/pikku-agent-wirings-meta.gen.ts +0 -7
  164. package/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
  165. package/.pikku/console/pikku-nodes-meta.gen.json +0 -57
  166. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts +0 -2
  167. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.d.ts.map +0 -1
  168. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +0 -7
  169. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js.map +0 -1
  170. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.json +0 -3
  171. package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.ts +0 -7
  172. package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +0 -5
  173. package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts.map +0 -1
  174. package/dist/.pikku/agent/pikku-agent-wirings.gen.js +0 -5
  175. package/dist/.pikku/agent/pikku-agent-wirings.gen.js.map +0 -1
  176. package/dist/.pikku/agent/pikku-agent-wirings.gen.ts +0 -3
  177. package/dist/.pikku/console/pikku-nodes-meta.gen.json +0 -57
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for typescript to be aware of RPCs and their return types
@@ -9,10 +9,40 @@
9
9
 
10
10
 
11
11
 
12
- export type OllamaGenerateTextInput = {
12
+ export type OllamaEmbedInput = {
13
+ /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
14
+ model: string;
15
+ /** The text to embed */
16
+ value: string;
17
+ }
18
+ export type OllamaEmbedManyInput = {
19
+ /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
20
+ model: string;
21
+ /** The texts to embed */
22
+ values: string[];
23
+ }
24
+ export type OllamaEmbedManyOutput = {
25
+ /** The embedding vectors */
26
+ embeddings: number[][];
27
+ /** Token usage statistics */
28
+ usage: {
29
+ /** Number of tokens used */
30
+ tokens: number;
31
+ };
32
+ }
33
+ export type OllamaEmbedOutput = {
34
+ /** The embedding vector */
35
+ embedding: number[];
36
+ /** Token usage statistics */
37
+ usage: {
38
+ /** Number of tokens used */
39
+ tokens: number;
40
+ };
41
+ }
42
+ export type OllamaGenerateObjectInput = {
13
43
  /** The Ollama model to use (e.g. "llama3.2", "phi3:mini") */
14
44
  model: string;
15
- /** The prompt to generate text from */
45
+ /** The prompt to generate a structured object from */
16
46
  prompt?: string | undefined;
17
47
  /** A list of messages comprising the conversation so far */
18
48
  messages?: {
@@ -23,18 +53,24 @@ export type OllamaGenerateTextInput = {
23
53
  }[] | undefined;
24
54
  /** System message to set the behavior of the model */
25
55
  system?: string | undefined;
56
+ /** JSON Schema describing the expected output object */
57
+ schema: {
58
+ [key: string]: any;
59
+ };
60
+ /** Optional name for the schema */
61
+ schemaName?: string | undefined;
62
+ /** Optional description of what the schema represents */
63
+ schemaDescription?: string | undefined;
64
+ /** Mode for object generation. Use "json" for models that do not support tools. */
65
+ mode?: ("auto" | "tool" | "json") | undefined;
26
66
  /** Maximum number of tokens to generate */
27
67
  maxTokens?: number | undefined;
28
68
  /** Sampling temperature between 0 and 2 */
29
69
  temperature?: number | undefined;
30
- /** Nucleus sampling parameter */
31
- topP?: number | undefined;
32
- /** Random seed for reproducible results */
33
- seed?: number | undefined;
34
70
  }
35
- export type OllamaGenerateTextOutput = {
36
- /** The generated text */
37
- text: string;
71
+ export type OllamaGenerateObjectOutput = {
72
+ /** The generated structured object */
73
+ object: any;
38
74
  /** The reason the model stopped generating */
39
75
  finishReason: string;
40
76
  /** Token usage statistics */
@@ -47,10 +83,10 @@ export type OllamaGenerateTextOutput = {
47
83
  totalTokens: number;
48
84
  };
49
85
  }
50
- export type OllamaGenerateObjectInput = {
86
+ export type OllamaGenerateTextInput = {
51
87
  /** The Ollama model to use (e.g. "llama3.2", "phi3:mini") */
52
88
  model: string;
53
- /** The prompt to generate a structured object from */
89
+ /** The prompt to generate text from */
54
90
  prompt?: string | undefined;
55
91
  /** A list of messages comprising the conversation so far */
56
92
  messages?: {
@@ -61,24 +97,18 @@ export type OllamaGenerateObjectInput = {
61
97
  }[] | undefined;
62
98
  /** System message to set the behavior of the model */
63
99
  system?: string | undefined;
64
- /** JSON Schema describing the expected output object */
65
- schema: {
66
- [key: string]: any;
67
- };
68
- /** Optional name for the schema */
69
- schemaName?: string | undefined;
70
- /** Optional description of what the schema represents */
71
- schemaDescription?: string | undefined;
72
- /** Mode for object generation. Use "json" for models that do not support tools. */
73
- mode?: ("auto" | "tool" | "json") | undefined;
74
100
  /** Maximum number of tokens to generate */
75
101
  maxTokens?: number | undefined;
76
102
  /** Sampling temperature between 0 and 2 */
77
103
  temperature?: number | undefined;
104
+ /** Nucleus sampling parameter */
105
+ topP?: number | undefined;
106
+ /** Random seed for reproducible results */
107
+ seed?: number | undefined;
78
108
  }
79
- export type OllamaGenerateObjectOutput = {
80
- /** The generated structured object */
81
- object: any;
109
+ export type OllamaGenerateTextOutput = {
110
+ /** The generated text */
111
+ text: string;
82
112
  /** The reason the model stopped generating */
83
113
  finishReason: string;
84
114
  /** Token usage statistics */
@@ -91,36 +121,6 @@ export type OllamaGenerateObjectOutput = {
91
121
  totalTokens: number;
92
122
  };
93
123
  }
94
- export type OllamaEmbedInput = {
95
- /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
96
- model: string;
97
- /** The text to embed */
98
- value: string;
99
- }
100
- export type OllamaEmbedOutput = {
101
- /** The embedding vector */
102
- embedding: number[];
103
- /** Token usage statistics */
104
- usage: {
105
- /** Number of tokens used */
106
- tokens: number;
107
- };
108
- }
109
- export type OllamaEmbedManyInput = {
110
- /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
111
- model: string;
112
- /** The texts to embed */
113
- values: string[];
114
- }
115
- export type OllamaEmbedManyOutput = {
116
- /** The embedding vectors */
117
- embeddings: number[][];
118
- /** Token usage statistics */
119
- usage: {
120
- /** Number of tokens used */
121
- tokens: number;
122
- };
123
- }
124
124
  export type VariableSchema_ollama_base_url = string
125
125
 
126
126
  interface RPCHandler<I, O> {
@@ -136,18 +136,27 @@ export type RPCMap = {
136
136
  // No addon packages, use RPCMap directly
137
137
  export type FlattenedRPCMap = RPCMap
138
138
 
139
+ type IsAny<T> = 0 extends (1 & T) ? true : false
140
+ type IsVoidishInput<T> = IsAny<T> extends true
141
+ ? false
142
+ : [T] extends [void | null | undefined]
143
+ ? true
144
+ : false
145
+
139
146
 
140
147
  export type RPCInvoke = <Name extends keyof FlattenedRPCMap>(
141
- name: Name,
142
- data: FlattenedRPCMap[Name]['input']
148
+ ...args: IsVoidishInput<FlattenedRPCMap[Name]['input']> extends true
149
+ ? [name: Name]
150
+ : [name: Name, data: FlattenedRPCMap[Name]['input']]
143
151
  ) => Promise<FlattenedRPCMap[Name]['output']>
144
152
 
145
153
  export type RPCRemote = <Name extends keyof FlattenedRPCMap>(
146
- name: Name,
147
- data: FlattenedRPCMap[Name]['input']
154
+ ...args: IsVoidishInput<FlattenedRPCMap[Name]['input']> extends true
155
+ ? [name: Name]
156
+ : [name: Name, data: FlattenedRPCMap[Name]['input']]
148
157
  ) => Promise<FlattenedRPCMap[Name]['output']>
149
158
 
150
- import type { WorkflowMap } from '../workflow/pikku-workflow-map.gen.d.js'
159
+ import type { FlattenedWorkflowMap } from '../workflow/pikku-workflow-map.gen.d.js'
151
160
 
152
161
  import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js'
153
162
 
@@ -163,12 +172,22 @@ interface AIAgentInput {
163
172
  resourceId: string
164
173
  }
165
174
 
166
- export type TypedStartWorkflow = <Name extends keyof WorkflowMap>(
175
+ export type TypedStartWorkflow = <Name extends keyof FlattenedWorkflowMap>(
167
176
  name: Name,
168
- input: WorkflowMap[Name]['input'],
177
+ input: FlattenedWorkflowMap[Name]['input'],
169
178
  options?: { startNode?: string }
170
179
  ) => Promise<{ runId: string }>
171
180
 
181
+ export type TypedRunWorkflow = <Name extends keyof FlattenedWorkflowMap>(
182
+ name: Name,
183
+ input: FlattenedWorkflowMap[Name]['input']
184
+ ) => Promise<FlattenedWorkflowMap[Name]['output']>
185
+
186
+ export type TypedWorkflowStatus = (
187
+ workflowName: string,
188
+ runId: string
189
+ ) => Promise<{ id: string; status: 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled'; output?: unknown; error?: { message?: string } }>
190
+
172
191
  type TypedAgentRun = [keyof FlattenedAgentMap] extends [never]
173
192
  ? (name: string, input: AIAgentInput) => Promise<any>
174
193
  : <Name extends keyof FlattenedAgentMap>(
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  /**
5
5
  * This provides the structure needed for typescript to be aware of RPCs and their return types
@@ -9,10 +9,40 @@
9
9
 
10
10
 
11
11
 
12
- export type OllamaGenerateTextInput = {
12
+ export type OllamaEmbedInput = {
13
+ /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
14
+ model: string;
15
+ /** The text to embed */
16
+ value: string;
17
+ }
18
+ export type OllamaEmbedManyInput = {
19
+ /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
20
+ model: string;
21
+ /** The texts to embed */
22
+ values: string[];
23
+ }
24
+ export type OllamaEmbedManyOutput = {
25
+ /** The embedding vectors */
26
+ embeddings: number[][];
27
+ /** Token usage statistics */
28
+ usage: {
29
+ /** Number of tokens used */
30
+ tokens: number;
31
+ };
32
+ }
33
+ export type OllamaEmbedOutput = {
34
+ /** The embedding vector */
35
+ embedding: number[];
36
+ /** Token usage statistics */
37
+ usage: {
38
+ /** Number of tokens used */
39
+ tokens: number;
40
+ };
41
+ }
42
+ export type OllamaGenerateObjectInput = {
13
43
  /** The Ollama model to use (e.g. "llama3.2", "phi3:mini") */
14
44
  model: string;
15
- /** The prompt to generate text from */
45
+ /** The prompt to generate a structured object from */
16
46
  prompt?: string | undefined;
17
47
  /** A list of messages comprising the conversation so far */
18
48
  messages?: {
@@ -23,18 +53,24 @@ export type OllamaGenerateTextInput = {
23
53
  }[] | undefined;
24
54
  /** System message to set the behavior of the model */
25
55
  system?: string | undefined;
56
+ /** JSON Schema describing the expected output object */
57
+ schema: {
58
+ [key: string]: any;
59
+ };
60
+ /** Optional name for the schema */
61
+ schemaName?: string | undefined;
62
+ /** Optional description of what the schema represents */
63
+ schemaDescription?: string | undefined;
64
+ /** Mode for object generation. Use "json" for models that do not support tools. */
65
+ mode?: ("auto" | "tool" | "json") | undefined;
26
66
  /** Maximum number of tokens to generate */
27
67
  maxTokens?: number | undefined;
28
68
  /** Sampling temperature between 0 and 2 */
29
69
  temperature?: number | undefined;
30
- /** Nucleus sampling parameter */
31
- topP?: number | undefined;
32
- /** Random seed for reproducible results */
33
- seed?: number | undefined;
34
70
  }
35
- export type OllamaGenerateTextOutput = {
36
- /** The generated text */
37
- text: string;
71
+ export type OllamaGenerateObjectOutput = {
72
+ /** The generated structured object */
73
+ object: any;
38
74
  /** The reason the model stopped generating */
39
75
  finishReason: string;
40
76
  /** Token usage statistics */
@@ -47,10 +83,10 @@ export type OllamaGenerateTextOutput = {
47
83
  totalTokens: number;
48
84
  };
49
85
  }
50
- export type OllamaGenerateObjectInput = {
86
+ export type OllamaGenerateTextInput = {
51
87
  /** The Ollama model to use (e.g. "llama3.2", "phi3:mini") */
52
88
  model: string;
53
- /** The prompt to generate a structured object from */
89
+ /** The prompt to generate text from */
54
90
  prompt?: string | undefined;
55
91
  /** A list of messages comprising the conversation so far */
56
92
  messages?: {
@@ -61,24 +97,18 @@ export type OllamaGenerateObjectInput = {
61
97
  }[] | undefined;
62
98
  /** System message to set the behavior of the model */
63
99
  system?: string | undefined;
64
- /** JSON Schema describing the expected output object */
65
- schema: {
66
- [key: string]: any;
67
- };
68
- /** Optional name for the schema */
69
- schemaName?: string | undefined;
70
- /** Optional description of what the schema represents */
71
- schemaDescription?: string | undefined;
72
- /** Mode for object generation. Use "json" for models that do not support tools. */
73
- mode?: ("auto" | "tool" | "json") | undefined;
74
100
  /** Maximum number of tokens to generate */
75
101
  maxTokens?: number | undefined;
76
102
  /** Sampling temperature between 0 and 2 */
77
103
  temperature?: number | undefined;
104
+ /** Nucleus sampling parameter */
105
+ topP?: number | undefined;
106
+ /** Random seed for reproducible results */
107
+ seed?: number | undefined;
78
108
  }
79
- export type OllamaGenerateObjectOutput = {
80
- /** The generated structured object */
81
- object: any;
109
+ export type OllamaGenerateTextOutput = {
110
+ /** The generated text */
111
+ text: string;
82
112
  /** The reason the model stopped generating */
83
113
  finishReason: string;
84
114
  /** Token usage statistics */
@@ -91,36 +121,6 @@ export type OllamaGenerateObjectOutput = {
91
121
  totalTokens: number;
92
122
  };
93
123
  }
94
- export type OllamaEmbedInput = {
95
- /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
96
- model: string;
97
- /** The text to embed */
98
- value: string;
99
- }
100
- export type OllamaEmbedOutput = {
101
- /** The embedding vector */
102
- embedding: number[];
103
- /** Token usage statistics */
104
- usage: {
105
- /** Number of tokens used */
106
- tokens: number;
107
- };
108
- }
109
- export type OllamaEmbedManyInput = {
110
- /** The Ollama embedding model to use (e.g. "nomic-embed-text", "mxbai-embed-large") */
111
- model: string;
112
- /** The texts to embed */
113
- values: string[];
114
- }
115
- export type OllamaEmbedManyOutput = {
116
- /** The embedding vectors */
117
- embeddings: number[][];
118
- /** Token usage statistics */
119
- usage: {
120
- /** Number of tokens used */
121
- tokens: number;
122
- };
123
- }
124
124
  export type VariableSchema_ollama_base_url = string
125
125
 
126
126
  interface RPCHandler<I, O> {
@@ -129,10 +129,10 @@ interface RPCHandler<I, O> {
129
129
  }
130
130
 
131
131
  export type RPCMap = {
132
- readonly 'ollamaGenerateText': RPCHandler<OllamaGenerateTextInput, OllamaGenerateTextOutput>,
133
- readonly 'ollamaGenerateObject': RPCHandler<OllamaGenerateObjectInput, OllamaGenerateObjectOutput>,
134
- readonly 'ollamaEmbed': RPCHandler<OllamaEmbedInput, OllamaEmbedOutput>,
135
132
  readonly 'ollamaEmbedMany': RPCHandler<OllamaEmbedManyInput, OllamaEmbedManyOutput>,
133
+ readonly 'ollamaEmbed': RPCHandler<OllamaEmbedInput, OllamaEmbedOutput>,
134
+ readonly 'ollamaGenerateObject': RPCHandler<OllamaGenerateObjectInput, OllamaGenerateObjectOutput>,
135
+ readonly 'ollamaGenerateText': RPCHandler<OllamaGenerateTextInput, OllamaGenerateTextOutput>,
136
136
  };
137
137
 
138
138
 
@@ -140,18 +140,27 @@ export type RPCMap = {
140
140
  // No addon packages, use RPCMap directly
141
141
  export type FlattenedRPCMap = RPCMap
142
142
 
143
+ type IsAny<T> = 0 extends (1 & T) ? true : false
144
+ type IsVoidishInput<T> = IsAny<T> extends true
145
+ ? false
146
+ : [T] extends [void | null | undefined]
147
+ ? true
148
+ : false
149
+
143
150
 
144
151
  export type RPCInvoke = <Name extends keyof FlattenedRPCMap>(
145
- name: Name,
146
- data: FlattenedRPCMap[Name]['input']
152
+ ...args: IsVoidishInput<FlattenedRPCMap[Name]['input']> extends true
153
+ ? [name: Name]
154
+ : [name: Name, data: FlattenedRPCMap[Name]['input']]
147
155
  ) => Promise<FlattenedRPCMap[Name]['output']>
148
156
 
149
157
  export type RPCRemote = <Name extends keyof FlattenedRPCMap>(
150
- name: Name,
151
- data: FlattenedRPCMap[Name]['input']
158
+ ...args: IsVoidishInput<FlattenedRPCMap[Name]['input']> extends true
159
+ ? [name: Name]
160
+ : [name: Name, data: FlattenedRPCMap[Name]['input']]
152
161
  ) => Promise<FlattenedRPCMap[Name]['output']>
153
162
 
154
- import type { WorkflowMap } from '../workflow/pikku-workflow-map.gen.d.js'
163
+ import type { FlattenedWorkflowMap } from '../workflow/pikku-workflow-map.gen.d.js'
155
164
 
156
165
  import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js'
157
166
 
@@ -167,12 +176,22 @@ interface AIAgentInput {
167
176
  resourceId: string
168
177
  }
169
178
 
170
- export type TypedStartWorkflow = <Name extends keyof WorkflowMap>(
179
+ export type TypedStartWorkflow = <Name extends keyof FlattenedWorkflowMap>(
171
180
  name: Name,
172
- input: WorkflowMap[Name]['input'],
181
+ input: FlattenedWorkflowMap[Name]['input'],
173
182
  options?: { startNode?: string }
174
183
  ) => Promise<{ runId: string }>
175
184
 
185
+ export type TypedRunWorkflow = <Name extends keyof FlattenedWorkflowMap>(
186
+ name: Name,
187
+ input: FlattenedWorkflowMap[Name]['input']
188
+ ) => Promise<FlattenedWorkflowMap[Name]['output']>
189
+
190
+ export type TypedWorkflowStatus = (
191
+ workflowName: string,
192
+ runId: string
193
+ ) => Promise<{ id: string; status: 'running' | 'suspended' | 'completed' | 'failed' | 'cancelled'; output?: unknown; error?: { message?: string } }>
194
+
176
195
  type TypedAgentRun = [keyof FlattenedAgentMap] extends [never]
177
196
  ? (name: string, input: AIAgentInput) => Promise<any>
178
197
  : <Name extends keyof FlattenedAgentMap>(
@@ -0,0 +1,6 @@
1
+ {
2
+ "ollamaEmbedMany": "ollamaEmbedMany",
3
+ "ollamaEmbed": "ollamaEmbed",
4
+ "ollamaGenerateObject": "ollamaGenerateObject",
5
+ "ollamaGenerateText": "ollamaGenerateText"
6
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was generated by @pikku/cli@0.12.55
3
+ */
4
+ import { pikkuState } from '@pikku/core/internal'
5
+ import metaData from './pikku-rpc-wirings-meta.internal.gen.json' with { type: 'json' }
6
+ pikkuState('@pikku/addon-ollama', 'rpc', 'meta', metaData as Record<string, string>)
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file was generated by @pikku/cli@0.12.55
3
+ */
4
+ /**
5
+ * Scheduler-specific type definitions for tree-shaking optimization
6
+ */
7
+
8
+ import { CoreScheduledTask, wireScheduler as wireSchedulerCore } from '@pikku/core/scheduler'
9
+ import type { PikkuFunctionConfig, PikkuMiddleware } from '../function/pikku-function-types.gen.js'
10
+
11
+ /**
12
+ * Type definition for scheduled tasks that run at specified intervals.
13
+ * These are sessionless functions that execute based on cron expressions.
14
+ */
15
+ type SchedulerWiring = CoreScheduledTask<PikkuFunctionConfig<void, void, 'session' | 'rpc'>, PikkuMiddleware>
16
+
17
+ /**
18
+ * Registers a scheduled task with the Pikku framework.
19
+ * Tasks run based on cron expressions and are sessionless.
20
+ *
21
+ * @param task - Scheduled task definition with cron expression and handler
22
+ */
23
+ export const wireScheduler = (task: SchedulerWiring) => {
24
+ wireSchedulerCore(task as any)
25
+ }
@@ -1,38 +1,38 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema'
5
5
 
6
- import * as OllamaGenerateTextInput from './schemas/OllamaGenerateTextInput.schema.json' with { type: 'json' }
7
- addSchema('OllamaGenerateTextInput', OllamaGenerateTextInput, '@pikku/addon-ollama')
6
+ import * as OllamaEmbedInput from './schemas/OllamaEmbedInput.schema.json' with { type: 'json' }
7
+ addSchema('OllamaEmbedInput', OllamaEmbedInput, '@pikku/addon-ollama')
8
8
 
9
9
 
10
- import * as OllamaGenerateTextOutput from './schemas/OllamaGenerateTextOutput.schema.json' with { type: 'json' }
11
- addSchema('OllamaGenerateTextOutput', OllamaGenerateTextOutput, '@pikku/addon-ollama')
10
+ import * as OllamaEmbedManyInput from './schemas/OllamaEmbedManyInput.schema.json' with { type: 'json' }
11
+ addSchema('OllamaEmbedManyInput', OllamaEmbedManyInput, '@pikku/addon-ollama')
12
12
 
13
13
 
14
- import * as OllamaGenerateObjectInput from './schemas/OllamaGenerateObjectInput.schema.json' with { type: 'json' }
15
- addSchema('OllamaGenerateObjectInput', OllamaGenerateObjectInput, '@pikku/addon-ollama')
14
+ import * as OllamaEmbedManyOutput from './schemas/OllamaEmbedManyOutput.schema.json' with { type: 'json' }
15
+ addSchema('OllamaEmbedManyOutput', OllamaEmbedManyOutput, '@pikku/addon-ollama')
16
16
 
17
17
 
18
- import * as OllamaGenerateObjectOutput from './schemas/OllamaGenerateObjectOutput.schema.json' with { type: 'json' }
19
- addSchema('OllamaGenerateObjectOutput', OllamaGenerateObjectOutput, '@pikku/addon-ollama')
18
+ import * as OllamaEmbedOutput from './schemas/OllamaEmbedOutput.schema.json' with { type: 'json' }
19
+ addSchema('OllamaEmbedOutput', OllamaEmbedOutput, '@pikku/addon-ollama')
20
20
 
21
21
 
22
- import * as OllamaEmbedInput from './schemas/OllamaEmbedInput.schema.json' with { type: 'json' }
23
- addSchema('OllamaEmbedInput', OllamaEmbedInput, '@pikku/addon-ollama')
22
+ import * as OllamaGenerateObjectInput from './schemas/OllamaGenerateObjectInput.schema.json' with { type: 'json' }
23
+ addSchema('OllamaGenerateObjectInput', OllamaGenerateObjectInput, '@pikku/addon-ollama')
24
24
 
25
25
 
26
- import * as OllamaEmbedOutput from './schemas/OllamaEmbedOutput.schema.json' with { type: 'json' }
27
- addSchema('OllamaEmbedOutput', OllamaEmbedOutput, '@pikku/addon-ollama')
26
+ import * as OllamaGenerateObjectOutput from './schemas/OllamaGenerateObjectOutput.schema.json' with { type: 'json' }
27
+ addSchema('OllamaGenerateObjectOutput', OllamaGenerateObjectOutput, '@pikku/addon-ollama')
28
28
 
29
29
 
30
- import * as OllamaEmbedManyInput from './schemas/OllamaEmbedManyInput.schema.json' with { type: 'json' }
31
- addSchema('OllamaEmbedManyInput', OllamaEmbedManyInput, '@pikku/addon-ollama')
30
+ import * as OllamaGenerateTextInput from './schemas/OllamaGenerateTextInput.schema.json' with { type: 'json' }
31
+ addSchema('OllamaGenerateTextInput', OllamaGenerateTextInput, '@pikku/addon-ollama')
32
32
 
33
33
 
34
- import * as OllamaEmbedManyOutput from './schemas/OllamaEmbedManyOutput.schema.json' with { type: 'json' }
35
- addSchema('OllamaEmbedManyOutput', OllamaEmbedManyOutput, '@pikku/addon-ollama')
34
+ import * as OllamaGenerateTextOutput from './schemas/OllamaGenerateTextOutput.schema.json' with { type: 'json' }
35
+ addSchema('OllamaGenerateTextOutput', OllamaGenerateTextOutput, '@pikku/addon-ollama')
36
36
 
37
37
 
38
38
  import * as VariableSchema_ollama_base_url from './schemas/VariableSchema_ollama_base_url.schema.json' with { type: 'json' }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret'
5
5
  export type { CoreSecret, SecretDefinitionMeta, SecretDefinitionsMeta } from '@pikku/core/secret'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService, type CredentialMeta } from '@pikku/core/services'
5
5
  import type { SecretService } from '@pikku/core/services'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable'
5
5
  export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable'
@@ -5,6 +5,6 @@
5
5
  "description": "Base URL for the Ollama API",
6
6
  "variableId": "OLLAMA_BASE_URL",
7
7
  "schema": "VariableSchema_ollama_base_url",
8
- "sourceFile": "/Users/yasser/git/pikku/addons/packages/ai/ollama/src/ollama.variable.ts"
8
+ "sourceFile": "/home/runner/work/addons/addons/packages/ai/ollama/src/ollama.variable.ts"
9
9
  }
10
10
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService, type VariableMeta } from '@pikku/core/services'
5
5
  import type { VariablesService } from '@pikku/core/services'
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.1
2
+ * This file was generated by @pikku/cli@0.12.55
3
3
  */
4
4
  /**
5
5
  * Workflow type map with input/output types for each workflow
@@ -8,6 +8,7 @@
8
8
 
9
9
 
10
10
 
11
+
11
12
  interface WorkflowHandler<I, O> {
12
13
  input: I;
13
14
  output: O;
@@ -23,12 +24,15 @@ export type WorkflowMap = {
23
24
  export type GraphsMap = {
24
25
  };
25
26
 
26
- export type WorkflowClient<Name extends keyof WorkflowMap> = {
27
- start: (input: WorkflowMap[Name]['input']) => Promise<{ runId: string }>;
28
- getRun: <output extends keyof WorkflowMap[Name]>(runId: string) => Promise<WorkflowMap[Name][output]>;
27
+ export type FlattenedWorkflowMap = WorkflowMap
28
+
29
+
30
+ export type WorkflowClient<Name extends keyof FlattenedWorkflowMap> = {
31
+ start: (input: FlattenedWorkflowMap[Name]['input']) => Promise<{ runId: string }>;
32
+ getRun: <output extends keyof FlattenedWorkflowMap[Name]>(runId: string) => Promise<FlattenedWorkflowMap[Name][output]>;
29
33
  cancelRun: (runId: string) => Promise<boolean>;
30
34
  }
31
35
 
32
36
  export type TypedWorkflowClients = {
33
- [Name in keyof WorkflowMap]: WorkflowClient<Name>;
37
+ [Name in keyof FlattenedWorkflowMap]: WorkflowClient<Name>;
34
38
  }