@gugacoder/agentic-sdk 0.2.0

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 (129) hide show
  1. package/dist/agent.d.ts +2 -0
  2. package/dist/agent.js +463 -0
  3. package/dist/context/compaction.d.ts +27 -0
  4. package/dist/context/compaction.js +219 -0
  5. package/dist/context/models.d.ts +6 -0
  6. package/dist/context/models.js +41 -0
  7. package/dist/context/tokenizer.d.ts +5 -0
  8. package/dist/context/tokenizer.js +11 -0
  9. package/dist/context/usage.d.ts +11 -0
  10. package/dist/context/usage.js +49 -0
  11. package/dist/display-schemas.d.ts +1865 -0
  12. package/dist/display-schemas.js +219 -0
  13. package/dist/index.d.ts +38 -0
  14. package/dist/index.js +28 -0
  15. package/dist/middleware/logging.d.ts +2 -0
  16. package/dist/middleware/logging.js +32 -0
  17. package/dist/prompts/assembly.d.ts +13 -0
  18. package/dist/prompts/assembly.js +229 -0
  19. package/dist/providers.d.ts +19 -0
  20. package/dist/providers.js +44 -0
  21. package/dist/proxy.d.ts +2 -0
  22. package/dist/proxy.js +103 -0
  23. package/dist/schemas.d.ts +228 -0
  24. package/dist/schemas.js +51 -0
  25. package/dist/session.d.ts +7 -0
  26. package/dist/session.js +102 -0
  27. package/dist/structured.d.ts +18 -0
  28. package/dist/structured.js +38 -0
  29. package/dist/tool-repair.d.ts +21 -0
  30. package/dist/tool-repair.js +72 -0
  31. package/dist/tools/api-spec.d.ts +4 -0
  32. package/dist/tools/api-spec.js +123 -0
  33. package/dist/tools/apply-patch.d.ts +484 -0
  34. package/dist/tools/apply-patch.js +157 -0
  35. package/dist/tools/ask-user.d.ts +14 -0
  36. package/dist/tools/ask-user.js +27 -0
  37. package/dist/tools/bash.d.ts +550 -0
  38. package/dist/tools/bash.js +43 -0
  39. package/dist/tools/batch.d.ts +13 -0
  40. package/dist/tools/batch.js +84 -0
  41. package/dist/tools/brave-search.d.ts +6 -0
  42. package/dist/tools/brave-search.js +19 -0
  43. package/dist/tools/code-search.d.ts +20 -0
  44. package/dist/tools/code-search.js +42 -0
  45. package/dist/tools/diagnostics.d.ts +4 -0
  46. package/dist/tools/diagnostics.js +69 -0
  47. package/dist/tools/display.d.ts +483 -0
  48. package/dist/tools/display.js +77 -0
  49. package/dist/tools/edit.d.ts +682 -0
  50. package/dist/tools/edit.js +47 -0
  51. package/dist/tools/glob.d.ts +4 -0
  52. package/dist/tools/glob.js +42 -0
  53. package/dist/tools/grep.d.ts +6 -0
  54. package/dist/tools/grep.js +69 -0
  55. package/dist/tools/http-request.d.ts +7 -0
  56. package/dist/tools/http-request.js +98 -0
  57. package/dist/tools/index.d.ts +1611 -0
  58. package/dist/tools/index.js +46 -0
  59. package/dist/tools/job-tools.d.ts +24 -0
  60. package/dist/tools/job-tools.js +67 -0
  61. package/dist/tools/list-dir.d.ts +5 -0
  62. package/dist/tools/list-dir.js +79 -0
  63. package/dist/tools/multi-edit.d.ts +814 -0
  64. package/dist/tools/multi-edit.js +57 -0
  65. package/dist/tools/read.d.ts +5 -0
  66. package/dist/tools/read.js +33 -0
  67. package/dist/tools/task.d.ts +21 -0
  68. package/dist/tools/task.js +51 -0
  69. package/dist/tools/todo.d.ts +14 -0
  70. package/dist/tools/todo.js +60 -0
  71. package/dist/tools/web-fetch.d.ts +4 -0
  72. package/dist/tools/web-fetch.js +126 -0
  73. package/dist/tools/web-search.d.ts +22 -0
  74. package/dist/tools/web-search.js +48 -0
  75. package/dist/tools/write.d.ts +550 -0
  76. package/dist/tools/write.js +30 -0
  77. package/dist/types.d.ts +201 -0
  78. package/dist/types.js +1 -0
  79. package/package.json +43 -0
  80. package/src/agent.ts +520 -0
  81. package/src/context/compaction.ts +265 -0
  82. package/src/context/models.ts +42 -0
  83. package/src/context/tokenizer.ts +12 -0
  84. package/src/context/usage.ts +65 -0
  85. package/src/display-schemas.ts +276 -0
  86. package/src/index.ts +43 -0
  87. package/src/middleware/logging.ts +37 -0
  88. package/src/prompts/assembly.ts +263 -0
  89. package/src/prompts/identity.md +10 -0
  90. package/src/prompts/patterns.md +7 -0
  91. package/src/prompts/safety.md +7 -0
  92. package/src/prompts/tool-guide.md +9 -0
  93. package/src/prompts/tools/bash.md +7 -0
  94. package/src/prompts/tools/edit.md +7 -0
  95. package/src/prompts/tools/glob.md +7 -0
  96. package/src/prompts/tools/grep.md +7 -0
  97. package/src/prompts/tools/read.md +7 -0
  98. package/src/prompts/tools/write.md +7 -0
  99. package/src/providers.ts +58 -0
  100. package/src/proxy.ts +101 -0
  101. package/src/schemas.ts +58 -0
  102. package/src/session.ts +110 -0
  103. package/src/structured.ts +65 -0
  104. package/src/tool-repair.ts +92 -0
  105. package/src/tools/api-spec.ts +158 -0
  106. package/src/tools/apply-patch.ts +188 -0
  107. package/src/tools/ask-user.ts +40 -0
  108. package/src/tools/bash.ts +51 -0
  109. package/src/tools/batch.ts +103 -0
  110. package/src/tools/brave-search.ts +24 -0
  111. package/src/tools/code-search.ts +69 -0
  112. package/src/tools/diagnostics.ts +93 -0
  113. package/src/tools/display.ts +105 -0
  114. package/src/tools/edit.ts +55 -0
  115. package/src/tools/glob.ts +46 -0
  116. package/src/tools/grep.ts +68 -0
  117. package/src/tools/http-request.ts +103 -0
  118. package/src/tools/index.ts +48 -0
  119. package/src/tools/job-tools.ts +84 -0
  120. package/src/tools/list-dir.ts +102 -0
  121. package/src/tools/multi-edit.ts +65 -0
  122. package/src/tools/read.ts +40 -0
  123. package/src/tools/task.ts +71 -0
  124. package/src/tools/todo.ts +82 -0
  125. package/src/tools/web-fetch.ts +155 -0
  126. package/src/tools/web-search.ts +75 -0
  127. package/src/tools/write.ts +34 -0
  128. package/src/types.ts +145 -0
  129. package/tsconfig.json +17 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Brave Web Search API client.
3
+ * Docs: https://api.search.brave.com/app#/documentation/web-search
4
+ */
5
+ export async function braveSearch(query, numResults, apiKey) {
6
+ const count = numResults ?? 5;
7
+ const url = `https://api.search.brave.com/res/v1/web/search?q=${encodeURIComponent(query)}&count=${count}`;
8
+ const res = await fetch(url, {
9
+ headers: { "X-Subscription-Token": apiKey },
10
+ });
11
+ if (!res.ok)
12
+ return [];
13
+ const data = await res.json();
14
+ return (data.web?.results ?? []).slice(0, numResults).map((r) => ({
15
+ title: r.title,
16
+ url: r.url,
17
+ snippet: r.description,
18
+ }));
19
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A single code search result returned by a CodeSearch provider.
3
+ */
4
+ export interface CodeSearchResult {
5
+ title: string;
6
+ url: string;
7
+ content: string;
8
+ }
9
+ /**
10
+ * Callback type for pluggable code search providers.
11
+ * Implementors receive the query and return code examples and documentation snippets.
12
+ */
13
+ export type CodeSearchProvider = (query: string) => Promise<CodeSearchResult[]>;
14
+ /**
15
+ * Factory that creates the CodeSearch tool with an injected search provider.
16
+ * If no provider is given, returns a tool that explains no provider is configured.
17
+ */
18
+ export declare function createCodeSearchTool(searchProvider?: CodeSearchProvider): import("ai").Tool<{
19
+ query: string;
20
+ }, string>;
@@ -0,0 +1,42 @@
1
+ import { tool } from "ai";
2
+ import { z } from "zod";
3
+ const MAX_OUTPUT = 50_000;
4
+ /**
5
+ * Factory that creates the CodeSearch tool with an injected search provider.
6
+ * If no provider is given, returns a tool that explains no provider is configured.
7
+ */
8
+ export function createCodeSearchTool(searchProvider) {
9
+ return tool({
10
+ description: "Search for code examples, API documentation, and library patterns online. Use this to find usage examples, best practices, and documentation for APIs and libraries.",
11
+ inputSchema: z.object({
12
+ query: z
13
+ .string()
14
+ .describe("Search query about APIs, libraries, or coding patterns (e.g. 'zod v4 migration', 'express middleware error handling')"),
15
+ }),
16
+ execute: async ({ query }) => {
17
+ if (!searchProvider) {
18
+ return "CodeSearch provider not configured. The consuming application must provide an onCodeSearch callback in AiAgentOptions to enable code search.";
19
+ }
20
+ try {
21
+ const results = await searchProvider(query);
22
+ if (results.length === 0) {
23
+ return `No code examples found for: "${query}"`;
24
+ }
25
+ let output = `# Code search results for: "${query}"\n\n`;
26
+ for (let i = 0; i < results.length; i++) {
27
+ const r = results[i];
28
+ output += `## ${i + 1}. ${r.title}\n`;
29
+ output += `**Source:** ${r.url}\n\n`;
30
+ output += `${r.content}\n\n`;
31
+ }
32
+ if (output.length > MAX_OUTPUT) {
33
+ output = output.slice(0, MAX_OUTPUT) + "\n...[truncated at 50KB]";
34
+ }
35
+ return output.trim();
36
+ }
37
+ catch (err) {
38
+ return `Error searching code: ${err.message}`;
39
+ }
40
+ },
41
+ });
42
+ }
@@ -0,0 +1,4 @@
1
+ export declare const diagnosticsTool: import("ai").Tool<{
2
+ file_path?: string | undefined;
3
+ command?: string | undefined;
4
+ }, string>;
@@ -0,0 +1,69 @@
1
+ import { tool } from "ai";
2
+ import { z } from "zod";
3
+ import { exec } from "node:child_process";
4
+ const MAX_OUTPUT = 50_000;
5
+ const DEFAULT_COMMAND = "npx tsc --noEmit";
6
+ const DEFAULT_TIMEOUT = 120_000;
7
+ export const diagnosticsTool = tool({
8
+ description: "Runs a type-checking or linting command and returns structured diagnostics. " +
9
+ "Defaults to `npx tsc --noEmit`. Optionally filters errors to a specific file.",
10
+ inputSchema: z.object({
11
+ command: z
12
+ .string()
13
+ .optional()
14
+ .describe('The diagnostic command to run (default: "npx tsc --noEmit"). Examples: "npx eslint src/", "npx tsc --noEmit"'),
15
+ file_path: z
16
+ .string()
17
+ .optional()
18
+ .describe("Filter errors to this file path only. When set, only lines mentioning this path are returned."),
19
+ }),
20
+ execute: async ({ command, file_path }) => {
21
+ const cmd = command ?? DEFAULT_COMMAND;
22
+ const raw = await new Promise((resolve) => {
23
+ exec(cmd, { timeout: DEFAULT_TIMEOUT, maxBuffer: 10 * 1024 * 1024 }, (err, stdout, stderr) => {
24
+ resolve({
25
+ stdout: stdout ?? "",
26
+ stderr: stderr ?? "",
27
+ exitCode: err ? err.code ?? 1 : 0,
28
+ });
29
+ });
30
+ });
31
+ // Combine stdout + stderr (tsc writes to stdout, eslint to stdout, some tools to stderr)
32
+ let combined = raw.stdout;
33
+ if (raw.stderr) {
34
+ combined += (combined ? "\n" : "") + raw.stderr;
35
+ }
36
+ // If the command succeeded with no output, report clean
37
+ if (raw.exitCode === 0 && !combined.trim()) {
38
+ return "Nenhum erro encontrado.";
39
+ }
40
+ // If there's output but exit code 0, it may be warnings — still return them
41
+ let lines = combined.split("\n");
42
+ // Filter to specific file if requested
43
+ if (file_path) {
44
+ // Normalize path separators for matching
45
+ const normalized = file_path.replace(/\\/g, "/");
46
+ lines = lines.filter((line) => {
47
+ const normalizedLine = line.replace(/\\/g, "/");
48
+ return normalizedLine.includes(normalized);
49
+ });
50
+ if (lines.length === 0) {
51
+ return `Nenhum erro encontrado para ${file_path}.`;
52
+ }
53
+ }
54
+ let output = lines.join("\n").trim();
55
+ // If exit code 0 and we have output, it passed (possibly with warnings)
56
+ if (raw.exitCode === 0 && !output) {
57
+ return "Nenhum erro encontrado.";
58
+ }
59
+ if (!output) {
60
+ return raw.exitCode === 0
61
+ ? "Nenhum erro encontrado."
62
+ : `Comando falhou com código ${raw.exitCode} mas sem saída de erros.`;
63
+ }
64
+ if (output.length > MAX_OUTPUT) {
65
+ output = output.slice(0, MAX_OUTPUT) + "\n...[truncated]";
66
+ }
67
+ return output;
68
+ },
69
+ });
@@ -0,0 +1,483 @@
1
+ export declare function createDisplayTools(): {
2
+ display_highlight: import("ai").Tool<{
3
+ value: string | number;
4
+ label: string;
5
+ action: "metric";
6
+ unit?: string | undefined;
7
+ trend?: {
8
+ value: string;
9
+ direction: "up" | "down" | "neutral";
10
+ } | undefined;
11
+ icon?: string | undefined;
12
+ } | {
13
+ value: {
14
+ value: number;
15
+ currency: string;
16
+ };
17
+ label: string;
18
+ action: "price";
19
+ badge?: {
20
+ label: string;
21
+ variant: "default" | "success" | "warning" | "error" | "info";
22
+ } | undefined;
23
+ source?: {
24
+ name: string;
25
+ url: string;
26
+ favicon?: string | undefined;
27
+ } | undefined;
28
+ context?: string | undefined;
29
+ } | {
30
+ message: string;
31
+ variant: "success" | "warning" | "error" | "info";
32
+ action: "alert";
33
+ title?: string | undefined;
34
+ icon?: string | undefined;
35
+ } | {
36
+ layout: "buttons" | "cards" | "list";
37
+ choices: {
38
+ id: string;
39
+ label: string;
40
+ description?: string | undefined;
41
+ icon?: string | undefined;
42
+ }[];
43
+ action: "choices";
44
+ question?: string | undefined;
45
+ }, {
46
+ _display: boolean;
47
+ value: string | number;
48
+ label: string;
49
+ action: "metric";
50
+ unit?: string | undefined;
51
+ trend?: {
52
+ value: string;
53
+ direction: "up" | "down" | "neutral";
54
+ } | undefined;
55
+ icon?: string | undefined;
56
+ } | {
57
+ _display: boolean;
58
+ value: {
59
+ value: number;
60
+ currency: string;
61
+ };
62
+ label: string;
63
+ action: "price";
64
+ badge?: {
65
+ label: string;
66
+ variant: "default" | "success" | "warning" | "error" | "info";
67
+ } | undefined;
68
+ source?: {
69
+ name: string;
70
+ url: string;
71
+ favicon?: string | undefined;
72
+ } | undefined;
73
+ context?: string | undefined;
74
+ } | {
75
+ _display: boolean;
76
+ message: string;
77
+ variant: "success" | "warning" | "error" | "info";
78
+ action: "alert";
79
+ title?: string | undefined;
80
+ icon?: string | undefined;
81
+ } | {
82
+ _display: boolean;
83
+ layout: "buttons" | "cards" | "list";
84
+ choices: {
85
+ id: string;
86
+ label: string;
87
+ description?: string | undefined;
88
+ icon?: string | undefined;
89
+ }[];
90
+ action: "choices";
91
+ question?: string | undefined;
92
+ }>;
93
+ display_collection: import("ai").Tool<{
94
+ columns: {
95
+ type: "number" | "link" | "text" | "money" | "image" | "badge";
96
+ label: string;
97
+ key: string;
98
+ align: "left" | "center" | "right";
99
+ }[];
100
+ rows: Record<string, unknown>[];
101
+ sortable: boolean;
102
+ action: "table";
103
+ title?: string | undefined;
104
+ } | {
105
+ headers: string[];
106
+ rows: (string | number | null)[][];
107
+ action: "spreadsheet";
108
+ title?: string | undefined;
109
+ format?: {
110
+ moneyColumns?: number[] | undefined;
111
+ percentColumns?: number[] | undefined;
112
+ } | undefined;
113
+ } | {
114
+ items: {
115
+ title: string;
116
+ description?: string | undefined;
117
+ url?: string | undefined;
118
+ image?: string | undefined;
119
+ price?: {
120
+ value: number;
121
+ currency: string;
122
+ } | undefined;
123
+ originalPrice?: {
124
+ value: number;
125
+ currency: string;
126
+ } | undefined;
127
+ rating?: {
128
+ count: number;
129
+ score: number;
130
+ } | undefined;
131
+ source?: {
132
+ name: string;
133
+ url: string;
134
+ favicon?: string | undefined;
135
+ } | undefined;
136
+ badges?: {
137
+ label: string;
138
+ variant: "default" | "success" | "warning" | "error" | "info";
139
+ }[] | undefined;
140
+ }[];
141
+ action: "comparison";
142
+ title?: string | undefined;
143
+ attributes?: {
144
+ label: string;
145
+ key: string;
146
+ }[] | undefined;
147
+ } | {
148
+ items: {
149
+ title: string;
150
+ url?: string | undefined;
151
+ image?: string | undefined;
152
+ price?: {
153
+ value: number;
154
+ currency: string;
155
+ } | undefined;
156
+ badges?: {
157
+ label: string;
158
+ variant: "default" | "success" | "warning" | "error" | "info";
159
+ }[] | undefined;
160
+ subtitle?: string | undefined;
161
+ }[];
162
+ action: "carousel";
163
+ title?: string | undefined;
164
+ } | {
165
+ columns: number;
166
+ images: {
167
+ url: string;
168
+ alt?: string | undefined;
169
+ caption?: string | undefined;
170
+ }[];
171
+ layout: "grid" | "masonry";
172
+ action: "gallery";
173
+ title?: string | undefined;
174
+ } | {
175
+ label: string;
176
+ sources: {
177
+ title: string;
178
+ url: string;
179
+ favicon?: string | undefined;
180
+ snippet?: string | undefined;
181
+ }[];
182
+ action: "sources";
183
+ }, {
184
+ _display: boolean;
185
+ columns: {
186
+ type: "number" | "link" | "text" | "money" | "image" | "badge";
187
+ label: string;
188
+ key: string;
189
+ align: "left" | "center" | "right";
190
+ }[];
191
+ rows: Record<string, unknown>[];
192
+ sortable: boolean;
193
+ action: "table";
194
+ title?: string | undefined;
195
+ } | {
196
+ _display: boolean;
197
+ headers: string[];
198
+ rows: (string | number | null)[][];
199
+ action: "spreadsheet";
200
+ title?: string | undefined;
201
+ format?: {
202
+ moneyColumns?: number[] | undefined;
203
+ percentColumns?: number[] | undefined;
204
+ } | undefined;
205
+ } | {
206
+ _display: boolean;
207
+ items: {
208
+ title: string;
209
+ description?: string | undefined;
210
+ url?: string | undefined;
211
+ image?: string | undefined;
212
+ price?: {
213
+ value: number;
214
+ currency: string;
215
+ } | undefined;
216
+ originalPrice?: {
217
+ value: number;
218
+ currency: string;
219
+ } | undefined;
220
+ rating?: {
221
+ count: number;
222
+ score: number;
223
+ } | undefined;
224
+ source?: {
225
+ name: string;
226
+ url: string;
227
+ favicon?: string | undefined;
228
+ } | undefined;
229
+ badges?: {
230
+ label: string;
231
+ variant: "default" | "success" | "warning" | "error" | "info";
232
+ }[] | undefined;
233
+ }[];
234
+ action: "comparison";
235
+ title?: string | undefined;
236
+ attributes?: {
237
+ label: string;
238
+ key: string;
239
+ }[] | undefined;
240
+ } | {
241
+ _display: boolean;
242
+ items: {
243
+ title: string;
244
+ url?: string | undefined;
245
+ image?: string | undefined;
246
+ price?: {
247
+ value: number;
248
+ currency: string;
249
+ } | undefined;
250
+ badges?: {
251
+ label: string;
252
+ variant: "default" | "success" | "warning" | "error" | "info";
253
+ }[] | undefined;
254
+ subtitle?: string | undefined;
255
+ }[];
256
+ action: "carousel";
257
+ title?: string | undefined;
258
+ } | {
259
+ _display: boolean;
260
+ columns: number;
261
+ images: {
262
+ url: string;
263
+ alt?: string | undefined;
264
+ caption?: string | undefined;
265
+ }[];
266
+ layout: "grid" | "masonry";
267
+ action: "gallery";
268
+ title?: string | undefined;
269
+ } | {
270
+ _display: boolean;
271
+ label: string;
272
+ sources: {
273
+ title: string;
274
+ url: string;
275
+ favicon?: string | undefined;
276
+ snippet?: string | undefined;
277
+ }[];
278
+ action: "sources";
279
+ }>;
280
+ display_card: import("ai").Tool<{
281
+ title: string;
282
+ action: "product";
283
+ description?: string | undefined;
284
+ url?: string | undefined;
285
+ image?: string | undefined;
286
+ price?: {
287
+ value: number;
288
+ currency: string;
289
+ } | undefined;
290
+ originalPrice?: {
291
+ value: number;
292
+ currency: string;
293
+ } | undefined;
294
+ rating?: {
295
+ count: number;
296
+ score: number;
297
+ } | undefined;
298
+ source?: {
299
+ name: string;
300
+ url: string;
301
+ favicon?: string | undefined;
302
+ } | undefined;
303
+ badges?: {
304
+ label: string;
305
+ variant: "default" | "success" | "warning" | "error" | "info";
306
+ }[] | undefined;
307
+ } | {
308
+ title: string;
309
+ url: string;
310
+ action: "link";
311
+ description?: string | undefined;
312
+ favicon?: string | undefined;
313
+ image?: string | undefined;
314
+ domain?: string | undefined;
315
+ } | {
316
+ type: string;
317
+ name: string;
318
+ action: "file";
319
+ url?: string | undefined;
320
+ size?: number | undefined;
321
+ preview?: string | undefined;
322
+ } | {
323
+ url: string;
324
+ action: "image";
325
+ alt?: string | undefined;
326
+ caption?: string | undefined;
327
+ width?: number | undefined;
328
+ height?: number | undefined;
329
+ }, {
330
+ _display: boolean;
331
+ title: string;
332
+ action: "product";
333
+ description?: string | undefined;
334
+ url?: string | undefined;
335
+ image?: string | undefined;
336
+ price?: {
337
+ value: number;
338
+ currency: string;
339
+ } | undefined;
340
+ originalPrice?: {
341
+ value: number;
342
+ currency: string;
343
+ } | undefined;
344
+ rating?: {
345
+ count: number;
346
+ score: number;
347
+ } | undefined;
348
+ source?: {
349
+ name: string;
350
+ url: string;
351
+ favicon?: string | undefined;
352
+ } | undefined;
353
+ badges?: {
354
+ label: string;
355
+ variant: "default" | "success" | "warning" | "error" | "info";
356
+ }[] | undefined;
357
+ } | {
358
+ _display: boolean;
359
+ title: string;
360
+ url: string;
361
+ action: "link";
362
+ description?: string | undefined;
363
+ favicon?: string | undefined;
364
+ image?: string | undefined;
365
+ domain?: string | undefined;
366
+ } | {
367
+ _display: boolean;
368
+ type: string;
369
+ name: string;
370
+ action: "file";
371
+ url?: string | undefined;
372
+ size?: number | undefined;
373
+ preview?: string | undefined;
374
+ } | {
375
+ _display: boolean;
376
+ url: string;
377
+ action: "image";
378
+ alt?: string | undefined;
379
+ caption?: string | undefined;
380
+ width?: number | undefined;
381
+ height?: number | undefined;
382
+ }>;
383
+ display_visual: import("ai").Tool<{
384
+ type: "bar" | "line" | "pie" | "area" | "donut";
385
+ title: string;
386
+ data: {
387
+ value: number;
388
+ label: string;
389
+ color?: string | undefined;
390
+ }[];
391
+ action: "chart";
392
+ format?: {
393
+ locale: string;
394
+ prefix?: string | undefined;
395
+ suffix?: string | undefined;
396
+ } | undefined;
397
+ } | {
398
+ pins: {
399
+ lat: number;
400
+ lng: number;
401
+ label?: string | undefined;
402
+ address?: string | undefined;
403
+ }[];
404
+ zoom: number;
405
+ action: "map";
406
+ title?: string | undefined;
407
+ } | {
408
+ code: string;
409
+ language: string;
410
+ lineNumbers: boolean;
411
+ action: "code";
412
+ title?: string | undefined;
413
+ } | {
414
+ steps: {
415
+ status: "pending" | "completed" | "current";
416
+ label: string;
417
+ description?: string | undefined;
418
+ }[];
419
+ action: "progress";
420
+ title?: string | undefined;
421
+ } | {
422
+ steps: {
423
+ status: "pending" | "completed" | "current";
424
+ title: string;
425
+ description?: string | undefined;
426
+ }[];
427
+ orientation: "vertical" | "horizontal";
428
+ action: "steps";
429
+ title?: string | undefined;
430
+ }, {
431
+ _display: boolean;
432
+ type: "bar" | "line" | "pie" | "area" | "donut";
433
+ title: string;
434
+ data: {
435
+ value: number;
436
+ label: string;
437
+ color?: string | undefined;
438
+ }[];
439
+ action: "chart";
440
+ format?: {
441
+ locale: string;
442
+ prefix?: string | undefined;
443
+ suffix?: string | undefined;
444
+ } | undefined;
445
+ } | {
446
+ _display: boolean;
447
+ pins: {
448
+ lat: number;
449
+ lng: number;
450
+ label?: string | undefined;
451
+ address?: string | undefined;
452
+ }[];
453
+ zoom: number;
454
+ action: "map";
455
+ title?: string | undefined;
456
+ } | {
457
+ _display: boolean;
458
+ code: string;
459
+ language: string;
460
+ lineNumbers: boolean;
461
+ action: "code";
462
+ title?: string | undefined;
463
+ } | {
464
+ _display: boolean;
465
+ steps: {
466
+ status: "pending" | "completed" | "current";
467
+ label: string;
468
+ description?: string | undefined;
469
+ }[];
470
+ action: "progress";
471
+ title?: string | undefined;
472
+ } | {
473
+ _display: boolean;
474
+ steps: {
475
+ status: "pending" | "completed" | "current";
476
+ title: string;
477
+ description?: string | undefined;
478
+ }[];
479
+ orientation: "vertical" | "horizontal";
480
+ action: "steps";
481
+ title?: string | undefined;
482
+ }>;
483
+ };