donobu 2.24.1 → 2.25.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 (105) hide show
  1. package/dist/assets/axe.js +14 -14
  2. package/dist/assets/generated/version +1 -1
  3. package/dist/assets/playwright-json-to-markdown.js +1 -1
  4. package/dist/esm/assets/axe.js +14 -14
  5. package/dist/esm/assets/generated/version +1 -1
  6. package/dist/esm/assets/playwright-json-to-markdown.js +1 -1
  7. package/dist/esm/main.d.ts +3 -0
  8. package/dist/esm/main.d.ts.map +1 -1
  9. package/dist/esm/main.js +3 -0
  10. package/dist/esm/main.js.map +1 -1
  11. package/dist/esm/managers/CodeGenerator.d.ts.map +1 -1
  12. package/dist/esm/managers/CodeGenerator.js +42 -0
  13. package/dist/esm/managers/CodeGenerator.js.map +1 -1
  14. package/dist/esm/models/CreateDonobuFlow.d.ts +3 -284
  15. package/dist/esm/models/CreateDonobuFlow.d.ts.map +1 -1
  16. package/dist/esm/plugin/PluginLoader.d.ts +3 -0
  17. package/dist/esm/plugin/PluginLoader.d.ts.map +1 -0
  18. package/dist/esm/plugin/PluginLoader.js +44 -0
  19. package/dist/esm/plugin/PluginLoader.js.map +1 -0
  20. package/dist/esm/plugin/PluginModule.d.ts +9 -0
  21. package/dist/esm/plugin/PluginModule.d.ts.map +1 -0
  22. package/dist/esm/plugin/PluginModule.js +3 -0
  23. package/dist/esm/plugin/PluginModule.js.map +1 -0
  24. package/dist/esm/tools/AcknowledgeUserInstruction.d.ts +3 -3
  25. package/dist/esm/tools/AnalyzePageTextTool.d.ts +3 -3
  26. package/dist/esm/tools/AssertPageTextTool.d.ts +3 -3
  27. package/dist/esm/tools/AssertPageTool.d.ts +3 -3
  28. package/dist/esm/tools/AssertTool.d.ts +3 -3
  29. package/dist/esm/tools/ChangeWebBrowserTabTool.d.ts +3 -3
  30. package/dist/esm/tools/ChooseSelectOptionTool.d.ts +7 -7
  31. package/dist/esm/tools/DetectBrokenLinksTool.d.ts +3 -3
  32. package/dist/esm/tools/DownloadPdfTool.d.ts +3 -3
  33. package/dist/esm/tools/ExtractGoogleStreetviewEntityDataTool.d.ts +3 -3
  34. package/dist/esm/tools/ExtractPublicFacebookEntityDataTool.d.ts +3 -3
  35. package/dist/esm/tools/GetEntityDataFromGoogleMapResult.d.ts +3 -3
  36. package/dist/esm/tools/GoForwardOrBackTool.d.ts +3 -3
  37. package/dist/esm/tools/GoToGoogleMapsStreetViewTool.d.ts +3 -3
  38. package/dist/esm/tools/GoToWebpageTool.d.ts +3 -3
  39. package/dist/esm/tools/HandleBrowserDialogTool.d.ts +3 -3
  40. package/dist/esm/tools/InputRandomizedEmailAddressTool.d.ts +7 -7
  41. package/dist/esm/tools/InputTextTool.d.ts +7 -7
  42. package/dist/esm/tools/MakeCommentTool.d.ts +3 -3
  43. package/dist/esm/tools/MarkObjectiveCompleteTool.d.ts +3 -3
  44. package/dist/esm/tools/NavigateWithinStreetView.d.ts +3 -3
  45. package/dist/esm/tools/PressKeyTool.d.ts +7 -7
  46. package/dist/esm/tools/ReplayableInteraction.d.ts +3 -3
  47. package/dist/esm/tools/RunInlineJavaScriptCodeTool.d.ts +3 -3
  48. package/dist/esm/tools/RunSandboxedJavaScriptCodeTool.d.ts +3 -3
  49. package/dist/esm/tools/ScrollPageTool.d.ts +3 -3
  50. package/dist/esm/tools/SetRunModeTool.d.ts +3 -3
  51. package/dist/esm/tools/SolveMfaChallenge.d.ts +11 -11
  52. package/dist/esm/tools/SummarizeLearningsTool.d.ts +3 -3
  53. package/dist/esm/tools/TriggerDonobuFlowTool.d.ts +38 -600
  54. package/dist/esm/tools/TriggerDonobuFlowTool.d.ts.map +1 -1
  55. package/dist/esm/tools/WaitTool.d.ts +3 -3
  56. package/dist/main.d.ts +3 -0
  57. package/dist/main.d.ts.map +1 -1
  58. package/dist/main.js +3 -0
  59. package/dist/main.js.map +1 -1
  60. package/dist/managers/CodeGenerator.d.ts.map +1 -1
  61. package/dist/managers/CodeGenerator.js +42 -0
  62. package/dist/managers/CodeGenerator.js.map +1 -1
  63. package/dist/models/CreateDonobuFlow.d.ts +3 -284
  64. package/dist/models/CreateDonobuFlow.d.ts.map +1 -1
  65. package/dist/plugin/PluginLoader.d.ts +3 -0
  66. package/dist/plugin/PluginLoader.d.ts.map +1 -0
  67. package/dist/plugin/PluginLoader.js +44 -0
  68. package/dist/plugin/PluginLoader.js.map +1 -0
  69. package/dist/plugin/PluginModule.d.ts +9 -0
  70. package/dist/plugin/PluginModule.d.ts.map +1 -0
  71. package/dist/plugin/PluginModule.js +3 -0
  72. package/dist/plugin/PluginModule.js.map +1 -0
  73. package/dist/tools/AcknowledgeUserInstruction.d.ts +3 -3
  74. package/dist/tools/AnalyzePageTextTool.d.ts +3 -3
  75. package/dist/tools/AssertPageTextTool.d.ts +3 -3
  76. package/dist/tools/AssertPageTool.d.ts +3 -3
  77. package/dist/tools/AssertTool.d.ts +3 -3
  78. package/dist/tools/ChangeWebBrowserTabTool.d.ts +3 -3
  79. package/dist/tools/ChooseSelectOptionTool.d.ts +7 -7
  80. package/dist/tools/DetectBrokenLinksTool.d.ts +3 -3
  81. package/dist/tools/DownloadPdfTool.d.ts +3 -3
  82. package/dist/tools/ExtractGoogleStreetviewEntityDataTool.d.ts +3 -3
  83. package/dist/tools/ExtractPublicFacebookEntityDataTool.d.ts +3 -3
  84. package/dist/tools/GetEntityDataFromGoogleMapResult.d.ts +3 -3
  85. package/dist/tools/GoForwardOrBackTool.d.ts +3 -3
  86. package/dist/tools/GoToGoogleMapsStreetViewTool.d.ts +3 -3
  87. package/dist/tools/GoToWebpageTool.d.ts +3 -3
  88. package/dist/tools/HandleBrowserDialogTool.d.ts +3 -3
  89. package/dist/tools/InputRandomizedEmailAddressTool.d.ts +7 -7
  90. package/dist/tools/InputTextTool.d.ts +7 -7
  91. package/dist/tools/MakeCommentTool.d.ts +3 -3
  92. package/dist/tools/MarkObjectiveCompleteTool.d.ts +3 -3
  93. package/dist/tools/NavigateWithinStreetView.d.ts +3 -3
  94. package/dist/tools/PressKeyTool.d.ts +7 -7
  95. package/dist/tools/ReplayableInteraction.d.ts +3 -3
  96. package/dist/tools/RunInlineJavaScriptCodeTool.d.ts +3 -3
  97. package/dist/tools/RunSandboxedJavaScriptCodeTool.d.ts +3 -3
  98. package/dist/tools/ScrollPageTool.d.ts +3 -3
  99. package/dist/tools/SetRunModeTool.d.ts +3 -3
  100. package/dist/tools/SolveMfaChallenge.d.ts +11 -11
  101. package/dist/tools/SummarizeLearningsTool.d.ts +3 -3
  102. package/dist/tools/TriggerDonobuFlowTool.d.ts +38 -600
  103. package/dist/tools/TriggerDonobuFlowTool.d.ts.map +1 -1
  104. package/dist/tools/WaitTool.d.ts +3 -3
  105. package/package.json +16 -4
@@ -1,288 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare const CreateDonobuFlowSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
3
- id: z.ZodString;
4
- name: z.ZodNullable<z.ZodString>;
5
- createdWithDonobuVersion: z.ZodString;
6
- browser: z.ZodObject<{
7
- initialState: z.ZodOptional<z.ZodType<import("./BrowserStateFlowReference").BrowserStateReference, z.ZodTypeDef, import("./BrowserStateFlowReference").BrowserStateReference>>;
8
- persistState: z.ZodOptional<z.ZodBoolean>;
9
- using: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
10
- type: z.ZodLiteral<"device">;
11
- deviceName: z.ZodOptional<z.ZodString>;
12
- headless: z.ZodOptional<z.ZodBoolean>;
13
- }, "strip", z.ZodTypeAny, {
14
- type: "device";
15
- deviceName?: string | undefined;
16
- headless?: boolean | undefined;
17
- }, {
18
- type: "device";
19
- deviceName?: string | undefined;
20
- headless?: boolean | undefined;
21
- }>, z.ZodObject<{
22
- type: z.ZodLiteral<"remoteInstance">;
23
- url: z.ZodString;
24
- }, "strip", z.ZodTypeAny, {
25
- type: "remoteInstance";
26
- url: string;
27
- }, {
28
- type: "remoteInstance";
29
- url: string;
30
- }>, z.ZodObject<{
31
- type: z.ZodLiteral<"browserBase">;
32
- sessionArgs: z.ZodObject<{
33
- projectId: z.ZodString;
34
- extensionId: z.ZodOptional<z.ZodString>;
35
- browserSettings: z.ZodOptional<z.ZodObject<{
36
- context: z.ZodOptional<z.ZodObject<{
37
- id: z.ZodString;
38
- }, "strip", z.ZodTypeAny, {
39
- id: string;
40
- }, {
41
- id: string;
42
- }>>;
43
- extensionId: z.ZodOptional<z.ZodString>;
44
- viewport: z.ZodOptional<z.ZodObject<{
45
- width: z.ZodNumber;
46
- height: z.ZodNumber;
47
- }, "strip", z.ZodTypeAny, {
48
- width: number;
49
- height: number;
50
- }, {
51
- width: number;
52
- height: number;
53
- }>>;
54
- blockAds: z.ZodOptional<z.ZodBoolean>;
55
- solveCaptchas: z.ZodOptional<z.ZodBoolean>;
56
- advancedStealth: z.ZodOptional<z.ZodBoolean>;
57
- }, "strip", z.ZodTypeAny, {
58
- extensionId?: string | undefined;
59
- context?: {
60
- id: string;
61
- } | undefined;
62
- viewport?: {
63
- width: number;
64
- height: number;
65
- } | undefined;
66
- blockAds?: boolean | undefined;
67
- solveCaptchas?: boolean | undefined;
68
- advancedStealth?: boolean | undefined;
69
- }, {
70
- extensionId?: string | undefined;
71
- context?: {
72
- id: string;
73
- } | undefined;
74
- viewport?: {
75
- width: number;
76
- height: number;
77
- } | undefined;
78
- blockAds?: boolean | undefined;
79
- solveCaptchas?: boolean | undefined;
80
- advancedStealth?: boolean | undefined;
81
- }>>;
82
- timeout: z.ZodOptional<z.ZodNumber>;
83
- keepAlive: z.ZodOptional<z.ZodBoolean>;
84
- proxies: z.ZodOptional<z.ZodBoolean>;
85
- region: z.ZodOptional<z.ZodString>;
86
- userMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
87
- }, "strip", z.ZodTypeAny, {
88
- projectId: string;
89
- extensionId?: string | undefined;
90
- browserSettings?: {
91
- extensionId?: string | undefined;
92
- context?: {
93
- id: string;
94
- } | undefined;
95
- viewport?: {
96
- width: number;
97
- height: number;
98
- } | undefined;
99
- blockAds?: boolean | undefined;
100
- solveCaptchas?: boolean | undefined;
101
- advancedStealth?: boolean | undefined;
102
- } | undefined;
103
- timeout?: number | undefined;
104
- keepAlive?: boolean | undefined;
105
- proxies?: boolean | undefined;
106
- region?: string | undefined;
107
- userMetadata?: Record<string, string> | undefined;
108
- }, {
109
- projectId: string;
110
- extensionId?: string | undefined;
111
- browserSettings?: {
112
- extensionId?: string | undefined;
113
- context?: {
114
- id: string;
115
- } | undefined;
116
- viewport?: {
117
- width: number;
118
- height: number;
119
- } | undefined;
120
- blockAds?: boolean | undefined;
121
- solveCaptchas?: boolean | undefined;
122
- advancedStealth?: boolean | undefined;
123
- } | undefined;
124
- timeout?: number | undefined;
125
- keepAlive?: boolean | undefined;
126
- proxies?: boolean | undefined;
127
- region?: string | undefined;
128
- userMetadata?: Record<string, string> | undefined;
129
- }>;
130
- }, "strip", z.ZodTypeAny, {
131
- type: "browserBase";
132
- sessionArgs: {
133
- projectId: string;
134
- extensionId?: string | undefined;
135
- browserSettings?: {
136
- extensionId?: string | undefined;
137
- context?: {
138
- id: string;
139
- } | undefined;
140
- viewport?: {
141
- width: number;
142
- height: number;
143
- } | undefined;
144
- blockAds?: boolean | undefined;
145
- solveCaptchas?: boolean | undefined;
146
- advancedStealth?: boolean | undefined;
147
- } | undefined;
148
- timeout?: number | undefined;
149
- keepAlive?: boolean | undefined;
150
- proxies?: boolean | undefined;
151
- region?: string | undefined;
152
- userMetadata?: Record<string, string> | undefined;
153
- };
154
- }, {
155
- type: "browserBase";
156
- sessionArgs: {
157
- projectId: string;
158
- extensionId?: string | undefined;
159
- browserSettings?: {
160
- extensionId?: string | undefined;
161
- context?: {
162
- id: string;
163
- } | undefined;
164
- viewport?: {
165
- width: number;
166
- height: number;
167
- } | undefined;
168
- blockAds?: boolean | undefined;
169
- solveCaptchas?: boolean | undefined;
170
- advancedStealth?: boolean | undefined;
171
- } | undefined;
172
- timeout?: number | undefined;
173
- keepAlive?: boolean | undefined;
174
- proxies?: boolean | undefined;
175
- region?: string | undefined;
176
- userMetadata?: Record<string, string> | undefined;
177
- };
178
- }>]>;
179
- }, "strip", z.ZodTypeAny, {
180
- using: {
181
- type: "device";
182
- deviceName?: string | undefined;
183
- headless?: boolean | undefined;
184
- } | {
185
- type: "remoteInstance";
186
- url: string;
187
- } | {
188
- type: "browserBase";
189
- sessionArgs: {
190
- projectId: string;
191
- extensionId?: string | undefined;
192
- browserSettings?: {
193
- extensionId?: string | undefined;
194
- context?: {
195
- id: string;
196
- } | undefined;
197
- viewport?: {
198
- width: number;
199
- height: number;
200
- } | undefined;
201
- blockAds?: boolean | undefined;
202
- solveCaptchas?: boolean | undefined;
203
- advancedStealth?: boolean | undefined;
204
- } | undefined;
205
- timeout?: number | undefined;
206
- keepAlive?: boolean | undefined;
207
- proxies?: boolean | undefined;
208
- region?: string | undefined;
209
- userMetadata?: Record<string, string> | undefined;
210
- };
211
- };
212
- initialState?: import("./BrowserStateFlowReference").BrowserStateReference | undefined;
213
- persistState?: boolean | undefined;
214
- }, {
215
- using: {
216
- type: "device";
217
- deviceName?: string | undefined;
218
- headless?: boolean | undefined;
219
- } | {
220
- type: "remoteInstance";
221
- url: string;
222
- } | {
223
- type: "browserBase";
224
- sessionArgs: {
225
- projectId: string;
226
- extensionId?: string | undefined;
227
- browserSettings?: {
228
- extensionId?: string | undefined;
229
- context?: {
230
- id: string;
231
- } | undefined;
232
- viewport?: {
233
- width: number;
234
- height: number;
235
- } | undefined;
236
- blockAds?: boolean | undefined;
237
- solveCaptchas?: boolean | undefined;
238
- advancedStealth?: boolean | undefined;
239
- } | undefined;
240
- timeout?: number | undefined;
241
- keepAlive?: boolean | undefined;
242
- proxies?: boolean | undefined;
243
- region?: string | undefined;
244
- userMetadata?: Record<string, string> | undefined;
245
- };
246
- };
247
- initialState?: import("./BrowserStateFlowReference").BrowserStateReference | undefined;
248
- persistState?: boolean | undefined;
249
- }>;
250
- envVars: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
251
- gptConfigName: z.ZodNullable<z.ZodString>;
252
- hasGptConfigNameOverride: z.ZodBoolean;
253
- customTools: z.ZodNullable<z.ZodArray<z.ZodObject<{
254
- name: z.ZodString;
255
- description: z.ZodString;
256
- inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
257
- javascript: z.ZodString;
258
- }, "strip", z.ZodTypeAny, {
259
- name: string;
260
- description: string;
261
- inputSchema: Record<string, unknown>;
262
- javascript: string;
263
- }, {
264
- name: string;
265
- description: string;
266
- inputSchema: Record<string, unknown>;
267
- javascript: string;
268
- }>, "many">>;
269
- defaultMessageDuration: z.ZodNullable<z.ZodNumber>;
270
- runMode: z.ZodEnum<["AUTONOMOUS", "INSTRUCT", "DETERMINISTIC"]>;
271
- isControlPanelEnabled: z.ZodBoolean;
272
- callbackUrl: z.ZodNullable<z.ZodString>;
2
+ export declare const CreateDonobuFlowSchema: z.ZodObject<{
273
3
  targetWebsite: z.ZodString;
274
- overallObjective: z.ZodNullable<z.ZodString>;
275
- allowedTools: z.ZodArray<z.ZodString, "many">;
276
- resultJsonSchema: z.ZodNullable<z.ZodType<import("json-schema").JSONSchema7, z.ZodTypeDef, import("json-schema").JSONSchema7>>;
277
- result: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
278
- inputTokensUsed: z.ZodNumber;
279
- completionTokensUsed: z.ZodNumber;
280
- maxToolCalls: z.ZodNullable<z.ZodNumber>;
281
- startedAt: z.ZodNullable<z.ZodNumber>;
282
- completedAt: z.ZodNullable<z.ZodNumber>;
283
- state: z.ZodEnum<["UNSTARTED", "INITIALIZING", "QUERYING_LLM_FOR_NEXT_ACTION", "WAITING_ON_USER_FOR_NEXT_ACTION", "PAUSED", "RESUMING", "RUNNING_ACTION", "FAILED", "SUCCESS"]>;
284
- nextState: z.ZodNullable<z.ZodEnum<["UNSTARTED", "INITIALIZING", "QUERYING_LLM_FOR_NEXT_ACTION", "WAITING_ON_USER_FOR_NEXT_ACTION", "PAUSED", "RESUMING", "RUNNING_ACTION", "FAILED", "SUCCESS"]>>;
285
- }, "name" | "browser" | "envVars" | "customTools" | "defaultMessageDuration" | "callbackUrl" | "targetWebsite" | "overallObjective" | "allowedTools" | "resultJsonSchema" | "maxToolCalls">, {
4
+ } & {
286
5
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
287
6
  browser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
288
7
  initialState: z.ZodOptional<z.ZodType<import("./BrowserStateFlowReference").BrowserStateReference, z.ZodTypeDef, import("./BrowserStateFlowReference").BrowserStateReference>>;
@@ -567,7 +286,7 @@ export declare const CreateDonobuFlowSchema: z.ZodObject<z.objectUtil.extendShap
567
286
  parameters: Record<string, unknown>;
568
287
  toolCallId?: string | null | undefined;
569
288
  }>, "many">>>;
570
- }>, "strip", z.ZodTypeAny, {
289
+ }, "strip", z.ZodTypeAny, {
571
290
  targetWebsite: string;
572
291
  name?: string | null | undefined;
573
292
  browser?: {
@@ -1 +1 @@
1
- {"version":3,"file":"CreateDonobuFlow.d.ts","sourceRoot":"","sources":["../../../src/models/CreateDonobuFlow.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFhC,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"CreateDonobuFlow.d.ts","sourceRoot":"","sources":["../../../src/models/CreateDonobuFlow.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFhC,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Tool } from '../tools/Tool';
2
+ export declare function loadAllCustomToolPlugins(): Promise<Tool<any, any>[]>;
3
+ //# sourceMappingURL=PluginLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginLoader.d.ts","sourceRoot":"","sources":["../../../src/plugin/PluginLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAIrC,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAqC1E"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.loadAllCustomToolPlugins = loadAllCustomToolPlugins;
7
+ const promises_1 = __importDefault(require("node:fs/promises"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const node_url_1 = require("node:url");
10
+ const MiscUtils_1 = require("../utils/MiscUtils");
11
+ async function loadAllCustomToolPlugins() {
12
+ const pluginsDir = node_path_1.default.join(MiscUtils_1.MiscUtils.baseWorkingDirectory(), 'plugins');
13
+ // Collect candidate *.mjs / *.cjs / *.js / *.ts files (shallow-scan).
14
+ let entries = [];
15
+ try {
16
+ const dirents = await promises_1.default.readdir(pluginsDir, { withFileTypes: true });
17
+ entries = dirents
18
+ .filter((d) => d.isFile())
19
+ .filter((d) => /\.[cm]?js$|\.ts$/i.test(d.name))
20
+ .map((d) => node_path_1.default.join(pluginsDir, d.name));
21
+ }
22
+ catch {
23
+ // directory missing is not fatal – just return empty plugin list
24
+ return [];
25
+ }
26
+ const tools = [];
27
+ for (const file of entries) {
28
+ try {
29
+ // Dynamic import via file URL keeps Windows & *nix happy.
30
+ const mod = await import((0, node_url_1.pathToFileURL)(file).href);
31
+ if (mod &&
32
+ typeof mod.loadCustomTools === 'function') {
33
+ const pluginTools = await mod.loadCustomTools();
34
+ pluginTools.forEach((t) => tools.push(t));
35
+ }
36
+ }
37
+ catch (err) {
38
+ console.error(`Failed to load plugin "${file}":`, err);
39
+ // Keep going; a broken plugin should not stop startup.
40
+ }
41
+ }
42
+ return tools;
43
+ }
44
+ //# sourceMappingURL=PluginLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginLoader.js","sourceRoot":"","sources":["../../../src/plugin/PluginLoader.ts"],"names":[],"mappings":";;;;;AAOA,4DAqCC;AA5CD,gEAAkC;AAClC,0DAA6B;AAC7B,uCAAyC;AAGzC,kDAA+C;AAExC,KAAK,UAAU,wBAAwB;IAC5C,MAAM,UAAU,GAAG,mBAAI,CAAC,IAAI,CAAC,qBAAS,CAAC,oBAAoB,EAAE,EAAE,SAAS,CAAC,CAAC;IAE1E,sEAAsE;IACtE,IAAI,OAAO,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACtE,OAAO,GAAG,OAAO;aACd,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACzB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC/C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,iEAAiE;QACjE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,KAAK,GAAqB,EAAE,CAAC;IAEnC,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC;YACH,0DAA0D;YAC1D,MAAM,GAAG,GAAY,MAAM,MAAM,CAAC,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;YAE5D,IACE,GAAG;gBACH,OAAQ,GAA6B,CAAC,eAAe,KAAK,UAAU,EACpE,CAAC;gBACD,MAAM,WAAW,GAAG,MAAO,GAAoB,CAAC,eAAe,EAAE,CAAC;gBAClE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,0BAA0B,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC;YACvD,uDAAuD;QACzD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Tool } from '../tools/Tool';
2
+ /**
3
+ * Every plugin must export ONE async function with this exact name.
4
+ * Donobu will call it on startup.
5
+ */
6
+ export interface PluginModule {
7
+ loadCustomTools(): Promise<Tool<any, any>[]>;
8
+ }
9
+ //# sourceMappingURL=PluginModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginModule.d.ts","sourceRoot":"","sources":["../../../src/plugin/PluginModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;CAC9C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PluginModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginModule.js","sourceRoot":"","sources":["../../../src/plugin/PluginModule.ts"],"names":[],"mappings":""}
@@ -9,11 +9,11 @@ export declare const AcknowledgeUserInstructionCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  userInstruction: string;
11
11
  }>;
12
- export declare const AcknowledgeUserInstructionGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const AcknowledgeUserInstructionGptSchema: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  userInstruction: z.ZodString;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  rationale: string;
18
18
  userInstruction: string;
19
19
  }, {
@@ -12,12 +12,12 @@ export declare const AnalyzePageTextCoreParameters: z.ZodObject<{
12
12
  analysisToRun: string;
13
13
  additionalRelevantContext: string;
14
14
  }>;
15
- export declare const AnalyzePageTextGptParameters: z.ZodObject<z.objectUtil.extendShape<{
15
+ export declare const AnalyzePageTextGptParameters: z.ZodObject<{
16
16
  rationale: z.ZodString;
17
- }, {
17
+ } & {
18
18
  analysisToRun: z.ZodString;
19
19
  additionalRelevantContext: z.ZodString;
20
- }>, "strip", z.ZodTypeAny, {
20
+ }, "strip", z.ZodTypeAny, {
21
21
  rationale: string;
22
22
  analysisToRun: string;
23
23
  additionalRelevantContext: string;
@@ -9,11 +9,11 @@ export declare const AssertPageTextCoreParameters: z.ZodObject<{
9
9
  }, {
10
10
  text: string;
11
11
  }>;
12
- export declare const AssertPageTextGptParameters: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const AssertPageTextGptParameters: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  text: z.ZodString;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  text: string;
18
18
  rationale: string;
19
19
  }, {
@@ -15,13 +15,13 @@ export declare const AssertPageCoreSchema: z.ZodObject<{
15
15
  type: "url" | "title" | "content";
16
16
  isRegex?: boolean | undefined;
17
17
  }>;
18
- export declare const AssertPageToolGptSchema: z.ZodObject<z.objectUtil.extendShape<{
18
+ export declare const AssertPageToolGptSchema: z.ZodObject<{
19
19
  rationale: z.ZodString;
20
- }, {
20
+ } & {
21
21
  type: z.ZodEnum<["url", "title", "content"]>;
22
22
  expected: z.ZodString;
23
23
  isRegex: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
24
- }>, "strip", z.ZodTypeAny, {
24
+ }, "strip", z.ZodTypeAny, {
25
25
  expected: string;
26
26
  type: "url" | "title" | "content";
27
27
  rationale: string;
@@ -9,11 +9,11 @@ export declare const AssertCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  assertionToTestFor: string;
11
11
  }>;
12
- export declare const AssertToolGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const AssertToolGptSchema: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  assertionToTestFor: z.ZodString;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  rationale: string;
18
18
  assertionToTestFor: string;
19
19
  }, {
@@ -9,11 +9,11 @@ export declare const ChangeWebBrowserTabCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  tabUrl: string;
11
11
  }>;
12
- export declare const ChangeWebBrowserTabGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const ChangeWebBrowserTabGptSchema: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  tabUrl: z.ZodString;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  rationale: string;
18
18
  tabUrl: string;
19
19
  }, {
@@ -9,7 +9,7 @@ export declare const ChooseSelectOptionCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  optionValues: string[];
11
11
  }>;
12
- export declare const ChooseSelectOptionNonGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const ChooseSelectOptionNonGptSchema: z.ZodObject<{
13
13
  selector: z.ZodObject<{
14
14
  element: z.ZodArray<z.ZodString, "many">;
15
15
  frame: z.ZodNullable<z.ZodString>;
@@ -20,9 +20,9 @@ export declare const ChooseSelectOptionNonGptSchema: z.ZodObject<z.objectUtil.ex
20
20
  frame: string | null;
21
21
  element: string[];
22
22
  }>;
23
- }, {
23
+ } & {
24
24
  optionValues: z.ZodArray<z.ZodString, "many">;
25
- }>, "strip", z.ZodTypeAny, {
25
+ }, "strip", z.ZodTypeAny, {
26
26
  selector: {
27
27
  frame: string | null;
28
28
  element: string[];
@@ -35,14 +35,14 @@ export declare const ChooseSelectOptionNonGptSchema: z.ZodObject<z.objectUtil.ex
35
35
  };
36
36
  optionValues: string[];
37
37
  }>;
38
- export declare const ChooseSelectOptionGptSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
38
+ export declare const ChooseSelectOptionGptSchema: z.ZodObject<{
39
39
  rationale: z.ZodString;
40
- }, {
40
+ } & {
41
41
  whyThisAnnotation: z.ZodString;
42
42
  annotation: z.ZodString;
43
- }>, {
43
+ } & {
44
44
  optionValues: z.ZodArray<z.ZodString, "many">;
45
- }>, "strip", z.ZodTypeAny, {
45
+ }, "strip", z.ZodTypeAny, {
46
46
  annotation: string;
47
47
  rationale: string;
48
48
  whyThisAnnotation: string;
@@ -9,11 +9,11 @@ export declare const DetectBrokenLinksCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  captureScreenshots?: boolean | undefined;
11
11
  }>;
12
- export declare const DetectBrokenLinksGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const DetectBrokenLinksGptSchema: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  captureScreenshots: z.ZodOptional<z.ZodBoolean>;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  rationale: string;
18
18
  captureScreenshots?: boolean | undefined;
19
19
  }, {
@@ -9,11 +9,11 @@ export declare const DownloadPdfCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  url: string;
11
11
  }>;
12
- export declare const DownloadPdfGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const DownloadPdfGptSchema: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  url: z.ZodString;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  url: string;
18
18
  rationale: string;
19
19
  }, {
@@ -10,11 +10,11 @@ export declare const ExtractGoogleStreetviewEntityDataCoreSchema: z.ZodObject<{
10
10
  }, {
11
11
  entityName: string;
12
12
  }>;
13
- export declare const ExtractGoogleStreetviewEntityDataGptSchema: z.ZodObject<z.objectUtil.extendShape<{
13
+ export declare const ExtractGoogleStreetviewEntityDataGptSchema: z.ZodObject<{
14
14
  rationale: z.ZodString;
15
- }, {
15
+ } & {
16
16
  entityName: z.ZodString;
17
- }>, "strip", z.ZodTypeAny, {
17
+ }, "strip", z.ZodTypeAny, {
18
18
  rationale: string;
19
19
  entityName: string;
20
20
  }, {
@@ -12,12 +12,12 @@ export declare const ExtractPublicFacebookEntityDataCoreSchema: z.ZodObject<{
12
12
  facebookEntityName?: string | undefined;
13
13
  facebookEntityUrl?: string | undefined;
14
14
  }>;
15
- export declare const ExtractPublicFacebookEntityDataGptSchema: z.ZodObject<z.objectUtil.extendShape<{
15
+ export declare const ExtractPublicFacebookEntityDataGptSchema: z.ZodObject<{
16
16
  rationale: z.ZodString;
17
- }, {
17
+ } & {
18
18
  facebookEntityName: z.ZodOptional<z.ZodString>;
19
19
  facebookEntityUrl: z.ZodOptional<z.ZodString>;
20
- }>, "strip", z.ZodTypeAny, {
20
+ }, "strip", z.ZodTypeAny, {
21
21
  rationale: string;
22
22
  facebookEntityName?: string | undefined;
23
23
  facebookEntityUrl?: string | undefined;
@@ -3,12 +3,12 @@ import { ToolCallContext } from '../models/ToolCallContext';
3
3
  import { ToolCallResult } from '../models/ToolCallResult';
4
4
  import { NoArgsSchema } from '../models/ToolSchema';
5
5
  import { z } from 'zod';
6
- export declare const GetEntityDataFromGoogleMapResultGptSchema: z.ZodObject<z.objectUtil.extendShape<{
6
+ export declare const GetEntityDataFromGoogleMapResultGptSchema: z.ZodObject<{
7
7
  rationale: z.ZodString;
8
- }, {
8
+ } & {
9
9
  entityName: z.ZodString;
10
10
  entityAddress: z.ZodString;
11
- }>, "strip", z.ZodTypeAny, {
11
+ }, "strip", z.ZodTypeAny, {
12
12
  rationale: string;
13
13
  entityName: string;
14
14
  entityAddress: string;
@@ -9,11 +9,11 @@ export declare const GoForwardOrBackCoreSchema: z.ZodObject<{
9
9
  }, {
10
10
  direction: "FORWARD" | "BACK";
11
11
  }>;
12
- export declare const GoForwardOrBackGptSchema: z.ZodObject<z.objectUtil.extendShape<{
12
+ export declare const GoForwardOrBackGptSchema: z.ZodObject<{
13
13
  rationale: z.ZodString;
14
- }, {
14
+ } & {
15
15
  direction: z.ZodEnum<["FORWARD", "BACK"]>;
16
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
17
17
  rationale: string;
18
18
  direction: "FORWARD" | "BACK";
19
19
  }, {
@@ -12,12 +12,12 @@ export declare const GoToGoogleMapsStreetViewCoreSchema: z.ZodObject<{
12
12
  entityName: string;
13
13
  entityLocation: string;
14
14
  }>;
15
- export declare const GoToGoogleMapsStreetViewGptSchema: z.ZodObject<z.objectUtil.extendShape<{
15
+ export declare const GoToGoogleMapsStreetViewGptSchema: z.ZodObject<{
16
16
  rationale: z.ZodString;
17
- }, {
17
+ } & {
18
18
  entityName: z.ZodString;
19
19
  entityLocation: z.ZodString;
20
- }>, "strip", z.ZodTypeAny, {
20
+ }, "strip", z.ZodTypeAny, {
21
21
  rationale: string;
22
22
  entityName: string;
23
23
  entityLocation: string;