@nodetool-ai/llm-nodes 0.8.1

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 (71) hide show
  1. package/README.md +52 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/index.d.ts +18 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +22 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/nodes/agent-control-tools.d.ts +22 -0
  8. package/dist/nodes/agent-control-tools.d.ts.map +1 -0
  9. package/dist/nodes/agent-control-tools.js +123 -0
  10. package/dist/nodes/agent-control-tools.js.map +1 -0
  11. package/dist/nodes/agent-loop.d.ts +73 -0
  12. package/dist/nodes/agent-loop.d.ts.map +1 -0
  13. package/dist/nodes/agent-loop.js +168 -0
  14. package/dist/nodes/agent-loop.js.map +1 -0
  15. package/dist/nodes/agent-recommended-models.d.ts +152 -0
  16. package/dist/nodes/agent-recommended-models.d.ts.map +1 -0
  17. package/dist/nodes/agent-recommended-models.js +656 -0
  18. package/dist/nodes/agent-recommended-models.js.map +1 -0
  19. package/dist/nodes/agent-thinking.d.ts +29 -0
  20. package/dist/nodes/agent-thinking.d.ts.map +1 -0
  21. package/dist/nodes/agent-thinking.js +139 -0
  22. package/dist/nodes/agent-thinking.js.map +1 -0
  23. package/dist/nodes/agent-threads.d.ts +17 -0
  24. package/dist/nodes/agent-threads.d.ts.map +1 -0
  25. package/dist/nodes/agent-threads.js +93 -0
  26. package/dist/nodes/agent-threads.js.map +1 -0
  27. package/dist/nodes/agent-tool-hydration.d.ts +50 -0
  28. package/dist/nodes/agent-tool-hydration.d.ts.map +1 -0
  29. package/dist/nodes/agent-tool-hydration.js +106 -0
  30. package/dist/nodes/agent-tool-hydration.js.map +1 -0
  31. package/dist/nodes/agent-utils.d.ts +174 -0
  32. package/dist/nodes/agent-utils.d.ts.map +1 -0
  33. package/dist/nodes/agent-utils.js +553 -0
  34. package/dist/nodes/agent-utils.js.map +1 -0
  35. package/dist/nodes/agents.d.ts +402 -0
  36. package/dist/nodes/agents.d.ts.map +1 -0
  37. package/dist/nodes/agents.js +1491 -0
  38. package/dist/nodes/agents.js.map +1 -0
  39. package/dist/nodes/director.d.ts +126 -0
  40. package/dist/nodes/director.d.ts.map +1 -0
  41. package/dist/nodes/director.js +337 -0
  42. package/dist/nodes/director.js.map +1 -0
  43. package/dist/nodes/gemini.d.ts +171 -0
  44. package/dist/nodes/gemini.d.ts.map +1 -0
  45. package/dist/nodes/gemini.js +985 -0
  46. package/dist/nodes/gemini.js.map +1 -0
  47. package/dist/nodes/generators.d.ts +162 -0
  48. package/dist/nodes/generators.d.ts.map +1 -0
  49. package/dist/nodes/generators.js +966 -0
  50. package/dist/nodes/generators.js.map +1 -0
  51. package/dist/nodes/mistral.d.ts +109 -0
  52. package/dist/nodes/mistral.d.ts.map +1 -0
  53. package/dist/nodes/mistral.js +447 -0
  54. package/dist/nodes/mistral.js.map +1 -0
  55. package/dist/nodes/openai.d.ts +292 -0
  56. package/dist/nodes/openai.d.ts.map +1 -0
  57. package/dist/nodes/openai.js +1806 -0
  58. package/dist/nodes/openai.js.map +1 -0
  59. package/dist/nodes/provider-spend.d.ts +45 -0
  60. package/dist/nodes/provider-spend.d.ts.map +1 -0
  61. package/dist/nodes/provider-spend.js +69 -0
  62. package/dist/nodes/provider-spend.js.map +1 -0
  63. package/dist/nodes/shots.d.ts +108 -0
  64. package/dist/nodes/shots.d.ts.map +1 -0
  65. package/dist/nodes/shots.js +378 -0
  66. package/dist/nodes/shots.js.map +1 -0
  67. package/dist/nodes/xai.d.ts +99 -0
  68. package/dist/nodes/xai.d.ts.map +1 -0
  69. package/dist/nodes/xai.js +360 -0
  70. package/dist/nodes/xai.js.map +1 -0
  71. package/package.json +111 -0
@@ -0,0 +1,402 @@
1
+ import { BaseNode } from "@nodetool-ai/node-sdk";
2
+ import type { ImageRef, AudioRef } from "@nodetool-ai/node-sdk";
3
+ import type { Message, ProcessingContext } from "@nodetool-ai/runtime";
4
+ import type { LanguageModel, OutputCorrelation } from "@nodetool-ai/protocol";
5
+ import type { ToolLike } from "./agent-utils.js";
6
+ import { toProviderTools, serializeToolResult, streamProviderMessages } from "./agent-utils.js";
7
+ export { expandAssetReferences } from "@nodetool-ai/runtime";
8
+ export type { ToolLike };
9
+ export { streamProviderMessages, toProviderTools, serializeToolResult };
10
+ export { runAgentLoop } from "./agent-loop.js";
11
+ export type { AgentLoopOptions, AgentLoopResult } from "./agent-loop.js";
12
+ /** Output handles SummarizerNode.process() emits. */
13
+ type SummarizerNodeOutputs = {
14
+ text: string;
15
+ output: string;
16
+ };
17
+ export declare class SummarizerNode extends BaseNode {
18
+ static readonly nodeType = "nodetool.agents.Summarizer";
19
+ static readonly body = "content_card";
20
+ static readonly autoSaveAsset = true;
21
+ static readonly title = "Summarizer";
22
+ static readonly description = "Generate concise summaries of text content using LLM providers with streaming output.\n text, summarization, nlp, content, streaming\n\n Specialized for creating high-quality summaries with real-time streaming:\n - Condensing long documents into key points\n - Creating executive summaries with live output\n - Extracting main ideas from text as they're generated\n - Maintaining factual accuracy while reducing length";
23
+ static readonly metadataOutputTypes: {
24
+ text: string;
25
+ chunk: string;
26
+ };
27
+ static readonly inlineFields: string[];
28
+ static readonly inputFields: string[];
29
+ static readonly outputCorrelation: {
30
+ text: {
31
+ kind: "single";
32
+ source: string;
33
+ };
34
+ chunk: {
35
+ kind: "iteration";
36
+ source: string;
37
+ group: string;
38
+ };
39
+ };
40
+ static readonly recommendedModels: ({
41
+ id: string;
42
+ type: string;
43
+ name: string;
44
+ repo_id: string;
45
+ description: string;
46
+ size_on_disk: number;
47
+ } | {
48
+ id: "ggml-org/gemma-3-4b-it-GGUF:gemma-3-4b-it-Q4_K_M.gguf";
49
+ type: "llama_cpp_model";
50
+ name: "Gemma 3 4B IT (GGUF)";
51
+ repo_id: "ggml-org/gemma-3-4b-it-GGUF";
52
+ path: "gemma-3-4b-it-Q4_K_M.gguf";
53
+ size_on_disk: 3113851289;
54
+ pipeline_tag: "image-text-to-text";
55
+ tags: readonly ["gguf", "image-text-to-text", "arxiv:1905.07830", "arxiv:1905.10044", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1705.03551", "arxiv:1911.01547", "arxiv:1907.10641", "arxiv:1903.00161", "arxiv:2009.03300", "arxiv:2304.06364", "arxiv:2103.03874", "arxiv:2110.14168", "arxiv:2311.12022", "arxiv:2108.07732", "arxiv:2107.03374", "arxiv:2210.03057", "arxiv:2106.03193", "arxiv:1910.11856", "arxiv:2502.12404", "arxiv:2502.21228", "arxiv:2404.16816", "arxiv:2104.12756", "arxiv:2311.16502", "arxiv:2203.10244", "arxiv:2404.12390", "arxiv:1810.12440", "arxiv:1908.02660", "arxiv:2312.11805", "base_model:google/gemma-3-4b-it", "base_model:quantized:google/gemma-3-4b-it", "license:gemma", "endpoints_compatible", "region:us", "conversational"];
56
+ has_model_index: false;
57
+ downloads: 25779;
58
+ likes: 48;
59
+ description: string;
60
+ })[];
61
+ system_prompt: string;
62
+ model: LanguageModel;
63
+ text: string;
64
+ image: ImageRef;
65
+ audio: AudioRef;
66
+ max_sentences: number;
67
+ private _maxSentences;
68
+ genProcess(context?: ProcessingContext): AsyncGenerator<Record<string, unknown>>;
69
+ process(context?: ProcessingContext): Promise<SummarizerNodeOutputs>;
70
+ }
71
+ /** Output handles EnhancePromptNode.process() emits. */
72
+ type EnhancePromptNodeOutputs = {
73
+ text: string;
74
+ output: string;
75
+ };
76
+ export declare class EnhancePromptNode extends BaseNode {
77
+ static readonly nodeType = "nodetool.agents.EnhancePrompt";
78
+ static readonly body = "content_card";
79
+ static readonly autoSaveAsset = true;
80
+ static readonly title = "Enhance Prompt";
81
+ static readonly description = "Rewrite a rough draft into a clearer, more detailed prompt using an LLM, with streaming output.\n text, prompt, prompt-engineering, llm, rewrite, streaming\n\n Turn a short or vague idea into an effective prompt:\n - Add specificity, structure, and missing detail\n - Tune the result for the target model (text, image, video, audio, code)\n - Preserve the original intent while removing ambiguity\n - Stream the improved prompt as it is written";
82
+ static readonly metadataOutputTypes: {
83
+ text: string;
84
+ chunk: string;
85
+ };
86
+ static readonly inlineFields: string[];
87
+ static readonly inputFields: string[];
88
+ static readonly outputCorrelation: {
89
+ text: {
90
+ kind: "single";
91
+ source: string;
92
+ };
93
+ chunk: {
94
+ kind: "iteration";
95
+ source: string;
96
+ group: string;
97
+ };
98
+ };
99
+ static readonly recommendedModels: ({
100
+ id: string;
101
+ type: string;
102
+ name: string;
103
+ repo_id: string;
104
+ description: string;
105
+ size_on_disk: number;
106
+ } | {
107
+ id: "ggml-org/gemma-3-4b-it-GGUF:gemma-3-4b-it-Q4_K_M.gguf";
108
+ type: "llama_cpp_model";
109
+ name: "Gemma 3 4B IT (GGUF)";
110
+ repo_id: "ggml-org/gemma-3-4b-it-GGUF";
111
+ path: "gemma-3-4b-it-Q4_K_M.gguf";
112
+ size_on_disk: 3113851289;
113
+ pipeline_tag: "image-text-to-text";
114
+ tags: readonly ["gguf", "image-text-to-text", "arxiv:1905.07830", "arxiv:1905.10044", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1705.03551", "arxiv:1911.01547", "arxiv:1907.10641", "arxiv:1903.00161", "arxiv:2009.03300", "arxiv:2304.06364", "arxiv:2103.03874", "arxiv:2110.14168", "arxiv:2311.12022", "arxiv:2108.07732", "arxiv:2107.03374", "arxiv:2210.03057", "arxiv:2106.03193", "arxiv:1910.11856", "arxiv:2502.12404", "arxiv:2502.21228", "arxiv:2404.16816", "arxiv:2104.12756", "arxiv:2311.16502", "arxiv:2203.10244", "arxiv:2404.12390", "arxiv:1810.12440", "arxiv:1908.02660", "arxiv:2312.11805", "base_model:google/gemma-3-4b-it", "base_model:quantized:google/gemma-3-4b-it", "license:gemma", "endpoints_compatible", "region:us", "conversational"];
115
+ has_model_index: false;
116
+ downloads: 25779;
117
+ likes: 48;
118
+ description: string;
119
+ })[];
120
+ system_prompt: string;
121
+ model: LanguageModel;
122
+ prompt: string;
123
+ target: string;
124
+ private _target;
125
+ genProcess(context?: ProcessingContext): AsyncGenerator<Record<string, unknown>>;
126
+ process(context?: ProcessingContext): Promise<EnhancePromptNodeOutputs>;
127
+ }
128
+ /** Output handles CreateThreadNode.process() emits. */
129
+ type CreateThreadNodeOutputs = {
130
+ thread_id: string;
131
+ };
132
+ export declare class CreateThreadNode extends BaseNode {
133
+ static readonly nodeType = "nodetool.agents.CreateThread";
134
+ static readonly title = "Create Thread";
135
+ static readonly inlineFields: string[];
136
+ static readonly inputFields: string[];
137
+ static readonly description = "Create a new conversation thread and return its ID.\n threads, chat, conversation, context\n\n Use this to seed a thread_id that downstream Agent nodes can reuse for\n persistent history across the graph or multiple runs.";
138
+ static readonly metadataOutputTypes: {
139
+ thread_id: string;
140
+ };
141
+ title: string;
142
+ thread_id: string;
143
+ process(context?: ProcessingContext): Promise<CreateThreadNodeOutputs>;
144
+ }
145
+ export declare class ExtractorNode extends BaseNode {
146
+ static readonly nodeType = "nodetool.agents.Extractor";
147
+ static readonly body = "content_card";
148
+ static readonly title = "Extractor";
149
+ static readonly description = "Extract structured data from text content using LLM providers.\n data-extraction, structured-data, nlp, parsing\n\n Specialized for extracting structured information:\n - Converting unstructured text into structured data\n - Identifying and extracting specific fields from documents\n - Parsing text according to predefined schemas\n - Creating structured records from natural language content";
150
+ static readonly inlineFields: string[];
151
+ static readonly inputFields: string[];
152
+ static readonly supportsDynamicOutputs = true;
153
+ static readonly recommendedModels: ({
154
+ id: string;
155
+ type: string;
156
+ name: string;
157
+ repo_id: string;
158
+ description: string;
159
+ size_on_disk: number;
160
+ } | {
161
+ id: "ggml-org/gemma-3-4b-it-GGUF:gemma-3-4b-it-Q4_K_M.gguf";
162
+ type: "llama_cpp_model";
163
+ name: "Gemma 3 4B IT (GGUF)";
164
+ repo_id: "ggml-org/gemma-3-4b-it-GGUF";
165
+ path: "gemma-3-4b-it-Q4_K_M.gguf";
166
+ size_on_disk: 3113851289;
167
+ pipeline_tag: "image-text-to-text";
168
+ tags: readonly ["gguf", "image-text-to-text", "arxiv:1905.07830", "arxiv:1905.10044", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1705.03551", "arxiv:1911.01547", "arxiv:1907.10641", "arxiv:1903.00161", "arxiv:2009.03300", "arxiv:2304.06364", "arxiv:2103.03874", "arxiv:2110.14168", "arxiv:2311.12022", "arxiv:2108.07732", "arxiv:2107.03374", "arxiv:2210.03057", "arxiv:2106.03193", "arxiv:1910.11856", "arxiv:2502.12404", "arxiv:2502.21228", "arxiv:2404.16816", "arxiv:2104.12756", "arxiv:2311.16502", "arxiv:2203.10244", "arxiv:2404.12390", "arxiv:1810.12440", "arxiv:1908.02660", "arxiv:2312.11805", "base_model:google/gemma-3-4b-it", "base_model:quantized:google/gemma-3-4b-it", "license:gemma", "endpoints_compatible", "region:us", "conversational"];
169
+ has_model_index: false;
170
+ downloads: 25779;
171
+ likes: 48;
172
+ description: string;
173
+ })[];
174
+ system_prompt: string;
175
+ model: LanguageModel;
176
+ text: string;
177
+ image: ImageRef;
178
+ audio: AudioRef;
179
+ max_tokens: number;
180
+ process(context?: ProcessingContext): Promise<Record<string, unknown>>;
181
+ }
182
+ /** Output handles ClassifierNode.process() emits. */
183
+ type ClassifierNodeOutputs = {
184
+ output: string;
185
+ category: string;
186
+ };
187
+ export declare class ClassifierNode extends BaseNode {
188
+ static readonly nodeType = "nodetool.agents.Classifier";
189
+ static readonly body = "content_card";
190
+ static readonly autoSaveAsset = true;
191
+ static readonly title = "Classifier";
192
+ static readonly description = "Classify text into predefined or dynamic categories using LLM.\n classification, nlp, categorization\n\n Use cases:\n - Sentiment analysis\n - Topic classification\n - Intent detection\n - Content categorization";
193
+ static readonly metadataOutputTypes: {
194
+ output: string;
195
+ };
196
+ static readonly inlineFields: string[];
197
+ static readonly inputFields: string[];
198
+ static readonly recommendedModels: ({
199
+ id: string;
200
+ type: string;
201
+ name: string;
202
+ repo_id: string;
203
+ description: string;
204
+ size_on_disk: number;
205
+ } | {
206
+ id: "ggml-org/gemma-3-4b-it-GGUF:gemma-3-4b-it-Q4_K_M.gguf";
207
+ type: "llama_cpp_model";
208
+ name: "Gemma 3 4B IT (GGUF)";
209
+ repo_id: "ggml-org/gemma-3-4b-it-GGUF";
210
+ path: "gemma-3-4b-it-Q4_K_M.gguf";
211
+ size_on_disk: 3113851289;
212
+ pipeline_tag: "image-text-to-text";
213
+ tags: readonly ["gguf", "image-text-to-text", "arxiv:1905.07830", "arxiv:1905.10044", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1705.03551", "arxiv:1911.01547", "arxiv:1907.10641", "arxiv:1903.00161", "arxiv:2009.03300", "arxiv:2304.06364", "arxiv:2103.03874", "arxiv:2110.14168", "arxiv:2311.12022", "arxiv:2108.07732", "arxiv:2107.03374", "arxiv:2210.03057", "arxiv:2106.03193", "arxiv:1910.11856", "arxiv:2502.12404", "arxiv:2502.21228", "arxiv:2404.16816", "arxiv:2104.12756", "arxiv:2311.16502", "arxiv:2203.10244", "arxiv:2404.12390", "arxiv:1810.12440", "arxiv:1908.02660", "arxiv:2312.11805", "base_model:google/gemma-3-4b-it", "base_model:quantized:google/gemma-3-4b-it", "license:gemma", "endpoints_compatible", "region:us", "conversational"];
214
+ has_model_index: false;
215
+ downloads: 25779;
216
+ likes: 48;
217
+ description: string;
218
+ })[];
219
+ system_prompt: string;
220
+ model: LanguageModel;
221
+ text: string;
222
+ image: ImageRef;
223
+ audio: AudioRef;
224
+ categories: string[];
225
+ max_tokens: number;
226
+ process(context?: ProcessingContext): Promise<ClassifierNodeOutputs>;
227
+ }
228
+ /** Output handles DecisionNode.process() emits. `if_true`/`if_false`: only the taken one. */
229
+ type DecisionNodeOutputs = {
230
+ decision: boolean;
231
+ reason: string;
232
+ if_true?: unknown;
233
+ if_false?: unknown;
234
+ };
235
+ /**
236
+ * An LLM answers a yes/no question about its inputs and routes `value` down
237
+ * the matching branch, like `If` with the condition written as a prompt.
238
+ * `decision` is the bool itself, so it can drive `If`, `Loop.condition`, or
239
+ * any bool input. Wire extra inputs as dynamic inputs; each is shown to the
240
+ * model by name. docs/workflow-loops.md.
241
+ */
242
+ export declare class DecisionNode extends BaseNode {
243
+ static readonly nodeType = "nodetool.agents.Decision";
244
+ static readonly body = "content_card";
245
+ static readonly title = "Decision";
246
+ static readonly description = "Let an LLM make a yes/no decision about the inputs, then route the value down the matching branch.\n decision, judge, condition, branch, if, evaluate, approve, verify, gate, loop, agent\n\n Write the question in prompt. Wire the value to route into value, and any other context as extra inputs; images and audio are shown to the model. decision carries the answer as a bool, reason explains it, and only the taken branch (if_true or if_false) emits value.\n\n Use cases:\n - Judge whether a draft or generated image meets a brief\n - Drive a Loop's condition from a model's judgement\n - Route items to different branches by a natural-language rule";
247
+ static readonly metadataOutputTypes: {
248
+ decision: string;
249
+ reason: string;
250
+ if_true: string;
251
+ if_false: string;
252
+ };
253
+ static readonly inlineFields: string[];
254
+ static readonly inputFields: string[];
255
+ static readonly supportsDynamicInputs = true;
256
+ static readonly recommendedModels: ({
257
+ id: string;
258
+ type: string;
259
+ name: string;
260
+ repo_id: string;
261
+ description: string;
262
+ size_on_disk: number;
263
+ } | {
264
+ id: "ggml-org/gemma-3-4b-it-GGUF:gemma-3-4b-it-Q4_K_M.gguf";
265
+ type: "llama_cpp_model";
266
+ name: "Gemma 3 4B IT (GGUF)";
267
+ repo_id: "ggml-org/gemma-3-4b-it-GGUF";
268
+ path: "gemma-3-4b-it-Q4_K_M.gguf";
269
+ size_on_disk: 3113851289;
270
+ pipeline_tag: "image-text-to-text";
271
+ tags: readonly ["gguf", "image-text-to-text", "arxiv:1905.07830", "arxiv:1905.10044", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1705.03551", "arxiv:1911.01547", "arxiv:1907.10641", "arxiv:1903.00161", "arxiv:2009.03300", "arxiv:2304.06364", "arxiv:2103.03874", "arxiv:2110.14168", "arxiv:2311.12022", "arxiv:2108.07732", "arxiv:2107.03374", "arxiv:2210.03057", "arxiv:2106.03193", "arxiv:1910.11856", "arxiv:2502.12404", "arxiv:2502.21228", "arxiv:2404.16816", "arxiv:2104.12756", "arxiv:2311.16502", "arxiv:2203.10244", "arxiv:2404.12390", "arxiv:1810.12440", "arxiv:1908.02660", "arxiv:2312.11805", "base_model:google/gemma-3-4b-it", "base_model:quantized:google/gemma-3-4b-it", "license:gemma", "endpoints_compatible", "region:us", "conversational"];
272
+ has_model_index: false;
273
+ downloads: 25779;
274
+ likes: 48;
275
+ description: string;
276
+ })[];
277
+ static readonly outputCorrelation: Record<string, OutputCorrelation>;
278
+ model: LanguageModel;
279
+ prompt: string;
280
+ value: unknown;
281
+ system_prompt: string;
282
+ max_tokens: number;
283
+ process(context?: ProcessingContext): Promise<DecisionNodeOutputs>;
284
+ }
285
+ export declare class AgentNode extends BaseNode {
286
+ static readonly nodeType: string;
287
+ static readonly body = "content_card";
288
+ static readonly autoSaveAsset = true;
289
+ static readonly title: string;
290
+ static readonly description: string;
291
+ static readonly metadataOutputTypes: {
292
+ text: string;
293
+ chunk: string;
294
+ thinking: string;
295
+ audio: string;
296
+ };
297
+ static readonly inlineFields: never[];
298
+ static readonly inputFields: string[];
299
+ static readonly supportsDynamicOutputs = true;
300
+ static readonly outputCorrelation: {
301
+ text: {
302
+ kind: "single";
303
+ source: string;
304
+ };
305
+ chunk: {
306
+ kind: "iteration";
307
+ source: string;
308
+ group: string;
309
+ };
310
+ thinking: {
311
+ kind: "iteration";
312
+ source: string;
313
+ group: string;
314
+ };
315
+ audio: {
316
+ kind: "iteration";
317
+ source: string;
318
+ group: string;
319
+ };
320
+ };
321
+ static readonly recommendedModels: ({
322
+ id: string;
323
+ type: string;
324
+ name: string;
325
+ repo_id: string;
326
+ description: string;
327
+ size_on_disk: number;
328
+ path?: undefined;
329
+ pipeline_tag?: undefined;
330
+ tags?: undefined;
331
+ has_model_index?: undefined;
332
+ downloads?: undefined;
333
+ likes?: undefined;
334
+ } | {
335
+ id: string;
336
+ type: string;
337
+ name: string;
338
+ repo_id: string;
339
+ path: string;
340
+ description: string;
341
+ size_on_disk: number;
342
+ tags: string[];
343
+ has_model_index: boolean;
344
+ downloads: number;
345
+ likes: number;
346
+ pipeline_tag?: undefined;
347
+ } | {
348
+ id: "ggml-org/gemma-3-4b-it-GGUF:gemma-3-4b-it-Q4_K_M.gguf";
349
+ type: "llama_cpp_model";
350
+ name: "Gemma 3 4B IT (GGUF)";
351
+ repo_id: "ggml-org/gemma-3-4b-it-GGUF";
352
+ path: "gemma-3-4b-it-Q4_K_M.gguf";
353
+ size_on_disk: 3113851289;
354
+ pipeline_tag: "image-text-to-text";
355
+ tags: readonly ["gguf", "image-text-to-text", "arxiv:1905.07830", "arxiv:1905.10044", "arxiv:1911.11641", "arxiv:1904.09728", "arxiv:1705.03551", "arxiv:1911.01547", "arxiv:1907.10641", "arxiv:1903.00161", "arxiv:2009.03300", "arxiv:2304.06364", "arxiv:2103.03874", "arxiv:2110.14168", "arxiv:2311.12022", "arxiv:2108.07732", "arxiv:2107.03374", "arxiv:2210.03057", "arxiv:2106.03193", "arxiv:1910.11856", "arxiv:2502.12404", "arxiv:2502.21228", "arxiv:2404.16816", "arxiv:2104.12756", "arxiv:2311.16502", "arxiv:2203.10244", "arxiv:2404.12390", "arxiv:1810.12440", "arxiv:1908.02660", "arxiv:2312.11805", "base_model:google/gemma-3-4b-it", "base_model:quantized:google/gemma-3-4b-it", "license:gemma", "endpoints_compatible", "region:us", "conversational"];
356
+ has_model_index: false;
357
+ downloads: 25779;
358
+ likes: 48;
359
+ description: string;
360
+ } | {
361
+ id: string;
362
+ type: string;
363
+ name: string;
364
+ repo_id: string;
365
+ path: string;
366
+ description: string;
367
+ size_on_disk: number;
368
+ pipeline_tag: string;
369
+ tags: string[];
370
+ has_model_index: boolean;
371
+ downloads: number;
372
+ likes: number;
373
+ })[];
374
+ model: LanguageModel;
375
+ system: string;
376
+ prompt: string;
377
+ tools: string[];
378
+ image: ImageRef[];
379
+ audio: AudioRef[];
380
+ history: Message[];
381
+ thread_id: string;
382
+ max_tokens: number;
383
+ max_turns: number;
384
+ cost_cap_usd: number;
385
+ timeout_s: number;
386
+ /**
387
+ * Build the tool list for this run. Override in subclasses to inject
388
+ * additional tools (e.g. sandbox shell/file/browser tools) alongside the
389
+ * user-selected ones. Control tools from kernel control edges are
390
+ * appended separately by the genProcess paths and don't need to be
391
+ * handled here.
392
+ *
393
+ * An override returns the tools ungated: `genProcess` wraps whatever comes
394
+ * back in the run's permission gate, so a subclass cannot inject a tool that
395
+ * skips the ladder.
396
+ */
397
+ protected buildTools(context?: ProcessingContext): Promise<ToolLike[]>;
398
+ genProcess(context?: ProcessingContext): AsyncGenerator<Record<string, unknown>>;
399
+ process(context?: ProcessingContext): Promise<Record<string, unknown>>;
400
+ }
401
+ export declare const AGENT_NODES: (typeof SummarizerNode | typeof EnhancePromptNode | typeof CreateThreadNode | typeof ExtractorNode | typeof ClassifierNode | typeof DecisionNode | typeof AgentNode)[];
402
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/nodes/agents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EACV,OAAO,EAEP,iBAAiB,EAIlB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOjD,OAAO,EAcL,eAAe,EACf,mBAAmB,EAEnB,sBAAsB,EAIvB,MAAM,kBAAkB,CAAC;AA4B1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,mBAAmB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