@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,211 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- /**
5
- * This provides the structure needed for typescript to be aware of RPCs and their return types
6
- */
7
-
8
-
9
-
10
-
11
-
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 = {
43
- /** The Ollama model to use (e.g. "llama3.2", "phi3:mini") */
44
- model: string;
45
- /** The prompt to generate a structured object from */
46
- prompt?: string | undefined;
47
- /** A list of messages comprising the conversation so far */
48
- messages?: {
49
- /** The role of the message author */
50
- role: "system" | "user" | "assistant";
51
- /** The contents of the message */
52
- content: string;
53
- }[] | undefined;
54
- /** System message to set the behavior of the model */
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;
66
- /** Maximum number of tokens to generate */
67
- maxTokens?: number | undefined;
68
- /** Sampling temperature between 0 and 2 */
69
- temperature?: number | undefined;
70
- }
71
- export type OllamaGenerateObjectOutput = {
72
- /** The generated structured object */
73
- object: any;
74
- /** The reason the model stopped generating */
75
- finishReason: string;
76
- /** Token usage statistics */
77
- usage: {
78
- /** Number of tokens in the prompt */
79
- promptTokens: number;
80
- /** Number of tokens in the completion */
81
- completionTokens: number;
82
- /** Total number of tokens used */
83
- totalTokens: number;
84
- };
85
- }
86
- export type OllamaGenerateTextInput = {
87
- /** The Ollama model to use (e.g. "llama3.2", "phi3:mini") */
88
- model: string;
89
- /** The prompt to generate text from */
90
- prompt?: string | undefined;
91
- /** A list of messages comprising the conversation so far */
92
- messages?: {
93
- /** The role of the message author */
94
- role: "system" | "user" | "assistant";
95
- /** The contents of the message */
96
- content: string;
97
- }[] | undefined;
98
- /** System message to set the behavior of the model */
99
- system?: string | undefined;
100
- /** Maximum number of tokens to generate */
101
- maxTokens?: number | undefined;
102
- /** Sampling temperature between 0 and 2 */
103
- temperature?: number | undefined;
104
- /** Nucleus sampling parameter */
105
- topP?: number | undefined;
106
- /** Random seed for reproducible results */
107
- seed?: number | undefined;
108
- }
109
- export type OllamaGenerateTextOutput = {
110
- /** The generated text */
111
- text: string;
112
- /** The reason the model stopped generating */
113
- finishReason: string;
114
- /** Token usage statistics */
115
- usage: {
116
- /** Number of tokens in the prompt */
117
- promptTokens: number;
118
- /** Number of tokens in the completion */
119
- completionTokens: number;
120
- /** Total number of tokens used */
121
- totalTokens: number;
122
- };
123
- }
124
- export type VariableSchema_ollama_base_url = string
125
-
126
- interface RPCHandler<I, O> {
127
- input: I;
128
- output: O;
129
- }
130
-
131
- export type RPCMap = {
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
- };
137
-
138
-
139
-
140
- // No addon packages, use RPCMap directly
141
- export type FlattenedRPCMap = RPCMap
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
-
150
-
151
- export type RPCInvoke = <Name extends keyof FlattenedRPCMap>(
152
- ...args: IsVoidishInput<FlattenedRPCMap[Name]['input']> extends true
153
- ? [name: Name]
154
- : [name: Name, data: FlattenedRPCMap[Name]['input']]
155
- ) => Promise<FlattenedRPCMap[Name]['output']>
156
-
157
- export type RPCRemote = <Name extends keyof FlattenedRPCMap>(
158
- ...args: IsVoidishInput<FlattenedRPCMap[Name]['input']> extends true
159
- ? [name: Name]
160
- : [name: Name, data: FlattenedRPCMap[Name]['input']]
161
- ) => Promise<FlattenedRPCMap[Name]['output']>
162
-
163
- import type { FlattenedWorkflowMap } from '../workflow/pikku-workflow-map.gen.d.js'
164
-
165
- import type { AgentMap } from '../agent/pikku-agent-map.gen.d.js'
166
-
167
-
168
- type FlattenedAgentMap = AgentMap
169
-
170
-
171
- import type { PikkuRPC } from '@pikku/core/rpc'
172
-
173
- interface AIAgentInput {
174
- message: string
175
- threadId: string
176
- resourceId: string
177
- }
178
-
179
- export type TypedStartWorkflow = <Name extends keyof FlattenedWorkflowMap>(
180
- name: Name,
181
- input: FlattenedWorkflowMap[Name]['input'],
182
- options?: { startNode?: string }
183
- ) => Promise<{ runId: string }>
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
-
195
- type TypedAgentRun = [keyof FlattenedAgentMap] extends [never]
196
- ? (name: string, input: AIAgentInput) => Promise<any>
197
- : <Name extends keyof FlattenedAgentMap>(
198
- name: Name,
199
- input: AIAgentInput
200
- ) => Promise<{ runId: string; result: FlattenedAgentMap[Name]['output']; usage: { inputTokens: number; outputTokens: number } }>
201
-
202
- type TypedAgentStream = [keyof FlattenedAgentMap] extends [never]
203
- ? (name: string, input: AIAgentInput, options?: { requiresToolApproval?: 'all' | 'explicit' | false }) => Promise<void>
204
- : <Name extends keyof FlattenedAgentMap>(
205
- name: Name,
206
- input: AIAgentInput,
207
- options?: { requiresToolApproval?: 'all' | 'explicit' | false }
208
- ) => Promise<void>
209
-
210
- export type TypedPikkuRPC = PikkuRPC<RPCInvoke, RPCRemote, TypedStartWorkflow, TypedAgentRun, TypedAgentStream>
211
-
@@ -1,6 +0,0 @@
1
- {
2
- "ollamaEmbedMany": "ollamaEmbedMany",
3
- "ollamaEmbed": "ollamaEmbed",
4
- "ollamaGenerateObject": "ollamaGenerateObject",
5
- "ollamaGenerateText": "ollamaGenerateText"
6
- }
@@ -1,6 +0,0 @@
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>)
@@ -1,25 +0,0 @@
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,39 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- import { addSchema } from '@pikku/core/schema'
5
-
6
- import * as OllamaEmbedInput from './schemas/OllamaEmbedInput.schema.json' with { type: 'json' }
7
- addSchema('OllamaEmbedInput', OllamaEmbedInput, '@pikku/addon-ollama')
8
-
9
-
10
- import * as OllamaEmbedManyInput from './schemas/OllamaEmbedManyInput.schema.json' with { type: 'json' }
11
- addSchema('OllamaEmbedManyInput', OllamaEmbedManyInput, '@pikku/addon-ollama')
12
-
13
-
14
- import * as OllamaEmbedManyOutput from './schemas/OllamaEmbedManyOutput.schema.json' with { type: 'json' }
15
- addSchema('OllamaEmbedManyOutput', OllamaEmbedManyOutput, '@pikku/addon-ollama')
16
-
17
-
18
- import * as OllamaEmbedOutput from './schemas/OllamaEmbedOutput.schema.json' with { type: 'json' }
19
- addSchema('OllamaEmbedOutput', OllamaEmbedOutput, '@pikku/addon-ollama')
20
-
21
-
22
- import * as OllamaGenerateObjectInput from './schemas/OllamaGenerateObjectInput.schema.json' with { type: 'json' }
23
- addSchema('OllamaGenerateObjectInput', OllamaGenerateObjectInput, '@pikku/addon-ollama')
24
-
25
-
26
- import * as OllamaGenerateObjectOutput from './schemas/OllamaGenerateObjectOutput.schema.json' with { type: 'json' }
27
- addSchema('OllamaGenerateObjectOutput', OllamaGenerateObjectOutput, '@pikku/addon-ollama')
28
-
29
-
30
- import * as OllamaGenerateTextInput from './schemas/OllamaGenerateTextInput.schema.json' with { type: 'json' }
31
- addSchema('OllamaGenerateTextInput', OllamaGenerateTextInput, '@pikku/addon-ollama')
32
-
33
-
34
- import * as OllamaGenerateTextOutput from './schemas/OllamaGenerateTextOutput.schema.json' with { type: 'json' }
35
- addSchema('OllamaGenerateTextOutput', OllamaGenerateTextOutput, '@pikku/addon-ollama')
36
-
37
-
38
- import * as VariableSchema_ollama_base_url from './schemas/VariableSchema_ollama_base_url.schema.json' with { type: 'json' }
39
- addSchema('VariableSchema_ollama_base_url', VariableSchema_ollama_base_url, '@pikku/addon-ollama')
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","description":"The Ollama embedding model to use (e.g. \"nomic-embed-text\", \"mxbai-embed-large\")"},"value":{"type":"string","description":"The text to embed"}},"required":["model","value"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","description":"The Ollama embedding model to use (e.g. \"nomic-embed-text\", \"mxbai-embed-large\")"},"values":{"type":"array","items":{"type":"string"},"description":"The texts to embed"}},"required":["model","values"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"embeddings":{"type":"array","items":{"type":"array","items":{"type":"number"}},"description":"The embedding vectors"},"usage":{"type":"object","properties":{"tokens":{"type":"number","description":"Number of tokens used"}},"required":["tokens"],"additionalProperties":false,"description":"Token usage statistics"}},"required":["embeddings","usage"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"embedding":{"type":"array","items":{"type":"number"},"description":"The embedding vector"},"usage":{"type":"object","properties":{"tokens":{"type":"number","description":"Number of tokens used"}},"required":["tokens"],"additionalProperties":false,"description":"Token usage statistics"}},"required":["embedding","usage"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","description":"The Ollama model to use (e.g. \"llama3.2\", \"phi3:mini\")"},"prompt":{"description":"The prompt to generate a structured object from","type":"string"},"messages":{"description":"A list of messages comprising the conversation so far","type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"],"description":"The role of the message author"},"content":{"type":"string","description":"The contents of the message"}},"required":["role","content"],"additionalProperties":false}},"system":{"description":"System message to set the behavior of the model","type":"string"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema describing the expected output object"},"schemaName":{"description":"Optional name for the schema","type":"string"},"schemaDescription":{"description":"Optional description of what the schema represents","type":"string"},"mode":{"description":"Mode for object generation. Use \"json\" for models that do not support tools.","type":"string","enum":["auto","tool","json"]},"maxTokens":{"description":"Maximum number of tokens to generate","type":"number"},"temperature":{"description":"Sampling temperature between 0 and 2","type":"number","minimum":0,"maximum":2}},"required":["model","schema"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"description":"The generated structured object"},"finishReason":{"type":"string","description":"The reason the model stopped generating"},"usage":{"type":"object","properties":{"promptTokens":{"type":"number","description":"Number of tokens in the prompt"},"completionTokens":{"type":"number","description":"Number of tokens in the completion"},"totalTokens":{"type":"number","description":"Total number of tokens used"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"description":"Token usage statistics"}},"required":["object","finishReason","usage"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"type":"string","description":"The Ollama model to use (e.g. \"llama3.2\", \"phi3:mini\")"},"prompt":{"description":"The prompt to generate text from","type":"string"},"messages":{"description":"A list of messages comprising the conversation so far","type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"],"description":"The role of the message author"},"content":{"type":"string","description":"The contents of the message"}},"required":["role","content"],"additionalProperties":false}},"system":{"description":"System message to set the behavior of the model","type":"string"},"maxTokens":{"description":"Maximum number of tokens to generate","type":"number"},"temperature":{"description":"Sampling temperature between 0 and 2","type":"number","minimum":0,"maximum":2},"topP":{"description":"Nucleus sampling parameter","type":"number"},"seed":{"description":"Random seed for reproducible results","type":"number"}},"required":["model"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","description":"The generated text"},"finishReason":{"type":"string","description":"The reason the model stopped generating"},"usage":{"type":"object","properties":{"promptTokens":{"type":"number","description":"Number of tokens in the prompt"},"completionTokens":{"type":"number","description":"Number of tokens in the completion"},"totalTokens":{"type":"number","description":"Total number of tokens used"}},"required":["promptTokens","completionTokens","totalTokens"],"additionalProperties":false,"description":"Token usage statistics"}},"required":["text","finishReason","usage"],"additionalProperties":false}
@@ -1 +0,0 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","default":"http://localhost:11434/v1","description":"Base URL for the Ollama API","type":"string"}
@@ -1,5 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- export { wireSecret } from '@pikku/core/secret'
5
- export type { CoreSecret, SecretDefinitionMeta, SecretDefinitionsMeta } from '@pikku/core/secret'
@@ -1,21 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- import { TypedSecretService as CoreTypedSecretService, type CredentialMeta } from '@pikku/core/services'
5
- import type { SecretService } from '@pikku/core/services'
6
-
7
- export interface CredentialsMap {
8
-
9
- }
10
-
11
- export type SecretId = keyof CredentialsMap
12
-
13
- const CREDENTIALS_META: Record<string, CredentialMeta> = {
14
-
15
- }
16
-
17
- export class TypedSecretService extends CoreTypedSecretService<CredentialsMap> {
18
- constructor(secrets: SecretService) {
19
- super(secrets, CREDENTIALS_META)
20
- }
21
- }
@@ -1,160 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- /**
5
- * Trigger-specific type definitions for tree-shaking optimization
6
- */
7
-
8
- import { CorePikkuTriggerFunction, CorePikkuTriggerFunctionConfig, CoreTrigger, wireTrigger as wireTriggerCore, wireTriggerSource as wireTriggerSourceCore } from '@pikku/core/trigger'
9
- import type { CoreNodeConfig } from '@pikku/core/node'
10
- import type { SingletonServices } from '../../types/application-types.d.js'
11
- import type { StandardSchemaV1 } from '@standard-schema/spec'
12
-
13
-
14
-
15
- /**
16
- * A trigger function that sets up a subscription and returns a teardown function.
17
- * The trigger is fired via wire.trigger.invoke(data).
18
- *
19
- * @template TInput - Input type (configuration passed when wired)
20
- * @template TOutput - Output type produced when trigger fires
21
- */
22
- export type PikkuTriggerFunction<
23
- TInput = unknown,
24
- TOutput = unknown
25
- > = CorePikkuTriggerFunction<TInput, TOutput, SingletonServices>
26
-
27
- /**
28
- * Configuration object for creating a trigger function with metadata
29
- */
30
- export type PikkuTriggerFunctionConfig<
31
- TInput = unknown,
32
- TOutput = unknown,
33
- InputSchema extends StandardSchemaV1 | undefined = undefined,
34
- OutputSchema extends StandardSchemaV1 | undefined = undefined
35
- > = CorePikkuTriggerFunctionConfig<TInput, TOutput, SingletonServices, InputSchema, OutputSchema>
36
-
37
- /**
38
- * Helper type to infer the output type from a Standard Schema
39
- */
40
- type InferSchemaOutput<T> = T extends StandardSchemaV1<any, infer Output> ? Output : never
41
-
42
- /**
43
- * Configuration object for trigger functions with Zod schema validation.
44
- * Use this when you want to define input/output schemas using Zod.
45
- * Types are automatically inferred from the schemas.
46
- */
47
- export type PikkuTriggerFunctionConfigWithSchema<
48
- InputSchema extends StandardSchemaV1,
49
- OutputSchema extends StandardSchemaV1 | undefined = undefined
50
- > = {
51
- title?: string
52
- description?: string
53
- tags?: string[]
54
- func: PikkuTriggerFunction<
55
- InferSchemaOutput<InputSchema>,
56
- OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
57
- >
58
- input: InputSchema
59
- output?: OutputSchema
60
- node?: CoreNodeConfig
61
- }
62
-
63
- /**
64
- * Type definition for trigger wirings.
65
- * Declares a trigger name and its target pikku function.
66
- */
67
- export type TriggerWiring = CoreTrigger
68
-
69
- /**
70
- * A trigger source with the subscription function, using project-specific services.
71
- *
72
- * @template TInput - Input type passed to the trigger function
73
- * @template TOutput - Output type produced when trigger fires
74
- */
75
- export type TriggerSource<
76
- TInput = unknown,
77
- TOutput = unknown
78
- > = {
79
- name: string
80
- func: PikkuTriggerFunctionConfig<TInput, TOutput>
81
- } & (unknown extends TInput ? { input?: TInput } : { input: TInput })
82
-
83
- /**
84
- * Creates a trigger function configuration.
85
- * Use this to define trigger functions that set up subscriptions.
86
- *
87
- * @param triggerOrConfig - Function definition or configuration object
88
- * @returns The normalized configuration object
89
- *
90
- * @example
91
- * ```typescript
92
- * export const redisSubscribeTrigger = pikkuTriggerFunc<
93
- * { channel: string },
94
- * { message: string }
95
- * >(async ({ redis }, { channel }, { trigger }) => {
96
- * const subscriber = redis.duplicate()
97
- * await subscriber.subscribe(channel, (msg) => {
98
- * trigger.invoke({ message: msg })
99
- * })
100
- * return () => subscriber.unsubscribe()
101
- * })
102
- *
103
- * export const redisSubscribeTrigger = pikkuTriggerFunc({
104
- * title: 'Redis Subscribe Trigger',
105
- * description: 'Listens to Redis pub/sub channel',
106
- * input: z.object({ channel: z.string() }),
107
- * output: z.object({ message: z.string() }),
108
- * func: async ({ redis }, { channel }, { trigger }) => {
109
- * const subscriber = redis.duplicate()
110
- * await subscriber.subscribe(channel, (msg) => {
111
- * trigger.invoke({ message: msg })
112
- * })
113
- * return () => subscriber.unsubscribe()
114
- * }
115
- * })
116
- * ```
117
- */
118
- export function pikkuTriggerFunc<
119
- InputSchema extends StandardSchemaV1,
120
- OutputSchema extends StandardSchemaV1 | undefined = undefined
121
- >(
122
- config: PikkuTriggerFunctionConfigWithSchema<InputSchema, OutputSchema>
123
- ): PikkuTriggerFunctionConfig<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, InputSchema, OutputSchema>
124
- export function pikkuTriggerFunc<TInput, TOutput = unknown>(
125
- triggerOrConfig:
126
- | PikkuTriggerFunction<TInput, TOutput>
127
- | PikkuTriggerFunctionConfig<TInput, TOutput>
128
- ): PikkuTriggerFunctionConfig<TInput, TOutput>
129
- export function pikkuTriggerFunc(triggerOrConfig: any) {
130
- if (typeof triggerOrConfig === 'function') {
131
- return { func: triggerOrConfig }
132
- }
133
- return triggerOrConfig
134
- }
135
-
136
- /**
137
- * Registers a trigger with the Pikku framework.
138
- * Declares a trigger name and its target pikku function.
139
- * Runs everywhere — inspector extracts at build time.
140
- *
141
- * @param trigger - Trigger definition with name and function config
142
- */
143
- export const wireTrigger = (
144
- trigger: TriggerWiring
145
- ) => {
146
- wireTriggerCore(trigger as any)
147
- }
148
-
149
- /**
150
- * Registers a trigger source with the Pikku framework.
151
- * Provides the subscription function and input data.
152
- * Only imported in the trigger worker process.
153
- *
154
- * @param source - Trigger source with name, func, and input
155
- */
156
- export const wireTriggerSource = <TInput = unknown, TOutput = unknown>(
157
- source: TriggerSource<TInput, TOutput>
158
- ) => {
159
- wireTriggerSourceCore(source as any)
160
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- export { wireVariable } from '@pikku/core/variable'
5
- export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable'
@@ -1,10 +0,0 @@
1
- {
2
- "ollama_base_url": {
3
- "name": "ollama_base_url",
4
- "displayName": "Ollama Base URL",
5
- "description": "Base URL for the Ollama API",
6
- "variableId": "OLLAMA_BASE_URL",
7
- "schema": "VariableSchema_ollama_base_url",
8
- "sourceFile": "/home/runner/work/addons/addons/packages/ai/ollama/src/ollama.variable.ts"
9
- }
10
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- import { TypedVariablesService as CoreTypedVariablesService, type VariableMeta } from '@pikku/core/services'
5
- import type { VariablesService } from '@pikku/core/services'
6
- import type { z } from 'zod'
7
- import { ollamaBaseUrlSchema } from '../../src/ollama.variable.js'
8
-
9
- export interface VariablesMap {
10
- 'OLLAMA_BASE_URL': z.infer<typeof ollamaBaseUrlSchema>
11
- }
12
-
13
- export type VariableId = keyof VariablesMap
14
-
15
- const VARIABLES_META: Record<string, VariableMeta> = {
16
- 'OLLAMA_BASE_URL': { name: 'ollama_base_url', displayName: 'Ollama Base URL' }
17
- }
18
-
19
- export class TypedVariablesService extends CoreTypedVariablesService<VariablesMap> {
20
- constructor(variables: VariablesService) {
21
- super(variables, VARIABLES_META)
22
- }
23
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * This file was generated by @pikku/cli@0.12.55
3
- */
4
- /**
5
- * Workflow type map with input/output types for each workflow
6
- */
7
-
8
-
9
-
10
-
11
-
12
- interface WorkflowHandler<I, O> {
13
- input: I;
14
- output: O;
15
- }
16
-
17
- interface GraphNodeHandler<I> {
18
- input: I;
19
- }
20
-
21
- export type WorkflowMap = {
22
- };
23
-
24
- export type GraphsMap = {
25
- };
26
-
27
- export type FlattenedWorkflowMap = WorkflowMap
28
-
29
-
30
- export type WorkflowClient<Name extends keyof FlattenedWorkflowMap> = {
31
- start: (input: FlattenedWorkflowMap[Name]['input']) => Promise<{ runId: string }>;
32
- getRun: <output extends keyof FlattenedWorkflowMap[Name]>(runId: string) => Promise<FlattenedWorkflowMap[Name][output]>;
33
- cancelRun: (runId: string) => Promise<boolean>;
34
- }
35
-
36
- export type TypedWorkflowClients = {
37
- [Name in keyof FlattenedWorkflowMap]: WorkflowClient<Name>;
38
- }