@bubblelab/bubble-core 0.1.165 → 0.1.167

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 (106) hide show
  1. package/dist/bubble-bundle.d.ts +141 -141
  2. package/dist/bubbles/service-bubble/agi-inc.d.ts +60 -60
  3. package/dist/bubbles/service-bubble/ai-agent.d.ts +9 -10
  4. package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -1
  5. package/dist/bubbles/service-bubble/ai-agent.js +40 -76
  6. package/dist/bubbles/service-bubble/ai-agent.js.map +1 -1
  7. package/dist/bubbles/service-bubble/airtable.d.ts +50 -50
  8. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +2 -2
  9. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +4 -4
  10. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +12 -12
  11. package/dist/bubbles/service-bubble/apify/actors/linkedin-jobs-scraper.d.ts +2 -2
  12. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +10 -10
  13. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-detail.d.ts +54 -54
  14. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +22 -22
  15. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +12 -12
  16. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +28 -28
  17. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +12 -12
  18. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +144 -144
  19. package/dist/bubbles/service-bubble/apify/apify.d.ts +12 -12
  20. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +62 -62
  21. package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +84 -84
  22. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +28 -28
  23. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +30 -30
  24. package/dist/bubbles/service-bubble/confluence/confluence.d.ts +24 -24
  25. package/dist/bubbles/service-bubble/confluence/confluence.schema.d.ts +24 -24
  26. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +126 -126
  27. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +158 -158
  28. package/dist/bubbles/service-bubble/eleven-labs.d.ts +28 -28
  29. package/dist/bubbles/service-bubble/firecrawl.d.ts +628 -628
  30. package/dist/bubbles/service-bubble/followupboss.d.ts +140 -140
  31. package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts +68 -68
  32. package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.d.ts +108 -108
  33. package/dist/bubbles/service-bubble/github.d.ts +104 -104
  34. package/dist/bubbles/service-bubble/gmail.d.ts +92 -92
  35. package/dist/bubbles/service-bubble/google-calendar.d.ts +138 -138
  36. package/dist/bubbles/service-bubble/google-drive.d.ts +60 -60
  37. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +44 -44
  38. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +48 -48
  39. package/dist/bubbles/service-bubble/hello-world.d.ts +8 -8
  40. package/dist/bubbles/service-bubble/http.d.ts +16 -16
  41. package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
  42. package/dist/bubbles/service-bubble/jira/jira.d.ts +86 -86
  43. package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +94 -94
  44. package/dist/bubbles/service-bubble/notion/notion.d.ts +534 -534
  45. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +8 -8
  46. package/dist/bubbles/service-bubble/postgresql.d.ts +10 -10
  47. package/dist/bubbles/service-bubble/posthog/posthog.d.ts +22 -22
  48. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +26 -26
  49. package/dist/bubbles/service-bubble/resend.d.ts +32 -32
  50. package/dist/bubbles/service-bubble/sendsafely/sendsafely.d.ts +10 -10
  51. package/dist/bubbles/service-bubble/sendsafely/sendsafely.schema.d.ts +12 -12
  52. package/dist/bubbles/service-bubble/slack/slack.d.ts +316 -316
  53. package/dist/bubbles/service-bubble/storage.d.ts +20 -20
  54. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +125 -125
  55. package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +143 -143
  56. package/dist/bubbles/service-bubble/telegram.d.ts +1562 -1562
  57. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +13 -13
  58. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +13 -13
  59. package/dist/bubbles/tool-bubble/browser-tools/_shared/schema.d.ts +2 -2
  60. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.d.ts +2 -2
  61. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts +2 -2
  62. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.d.ts +2 -2
  63. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +2 -2
  64. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.d.ts +2 -2
  65. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts +2 -2
  66. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.d.ts +2 -2
  67. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts +2 -2
  68. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +16 -16
  69. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +26 -26
  70. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +36 -97
  71. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts.map +1 -1
  72. package/dist/bubbles/tool-bubble/code-edit-tool.js +79 -202
  73. package/dist/bubbles/tool-bubble/code-edit-tool.js.map +1 -1
  74. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +22 -22
  75. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +4 -4
  76. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts +4 -4
  77. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +4 -4
  78. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +14 -14
  79. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +212 -212
  80. package/dist/bubbles/tool-bubble/list-airtable-bases-tool.d.ts +4 -4
  81. package/dist/bubbles/tool-bubble/list-airtable-tables-tool.d.ts +4 -4
  82. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
  83. package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +4 -4
  84. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +14 -14
  85. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +28 -28
  86. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +8 -8
  87. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +8 -8
  88. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +36 -36
  89. package/dist/bubbles/tool-bubble/tool-template.d.ts +4 -4
  90. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +64 -64
  91. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +22 -22
  92. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +8 -8
  93. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
  94. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +8 -8
  95. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +22 -22
  96. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +28 -28
  97. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +4 -4
  98. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +28 -28
  99. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +8 -8
  100. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +72 -72
  101. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +32 -32
  102. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +30 -30
  103. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +90 -90
  104. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +8 -8
  105. package/dist/bubbles.json +16 -51
  106. package/package.json +2 -2
@@ -30,9 +30,9 @@ declare const ChartJSToolParamsSchema: z.ZodObject<{
30
30
  yAxisLabel?: string | undefined;
31
31
  }, {
32
32
  title?: string | undefined;
33
- colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
34
33
  xAxisLabel?: string | undefined;
35
34
  yAxisLabel?: string | undefined;
35
+ colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
36
36
  responsive?: boolean | undefined;
37
37
  maintainAspectRatio?: boolean | undefined;
38
38
  showLegend?: boolean | undefined;
@@ -66,6 +66,7 @@ declare const ChartJSToolParamsSchema: z.ZodObject<{
66
66
  xAxisLabel?: string | undefined;
67
67
  yAxisLabel?: string | undefined;
68
68
  } | undefined;
69
+ filePath?: string | undefined;
69
70
  credentials?: Partial<Record<CredentialType, string>> | undefined;
70
71
  config?: Record<string, unknown> | undefined;
71
72
  fileName?: string | undefined;
@@ -73,33 +74,32 @@ declare const ChartJSToolParamsSchema: z.ZodObject<{
73
74
  yColumn?: string | undefined;
74
75
  groupByColumn?: string | undefined;
75
76
  advancedConfig?: Record<string, unknown> | undefined;
76
- filePath?: string | undefined;
77
77
  }, {
78
78
  data: Record<string, unknown>[];
79
79
  reasoning: string;
80
80
  chartType: "table" | "line" | "bar" | "pie" | "doughnut" | "radar" | "scatter" | "bubble" | "polarArea";
81
81
  options?: {
82
82
  title?: string | undefined;
83
- colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
84
83
  xAxisLabel?: string | undefined;
85
84
  yAxisLabel?: string | undefined;
85
+ colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
86
86
  responsive?: boolean | undefined;
87
87
  maintainAspectRatio?: boolean | undefined;
88
88
  showLegend?: boolean | undefined;
89
89
  showTooltips?: boolean | undefined;
90
90
  stacked?: boolean | undefined;
91
91
  } | undefined;
92
+ filePath?: string | undefined;
92
93
  credentials?: Partial<Record<CredentialType, string>> | undefined;
93
94
  config?: Record<string, unknown> | undefined;
95
+ fileName?: string | undefined;
94
96
  width?: number | undefined;
95
97
  height?: number | undefined;
96
- fileName?: string | undefined;
97
98
  xColumn?: string | undefined;
98
99
  yColumn?: string | undefined;
99
100
  groupByColumn?: string | undefined;
100
101
  advancedConfig?: Record<string, unknown> | undefined;
101
102
  generateFile?: boolean | undefined;
102
- filePath?: string | undefined;
103
103
  }>;
104
104
  type ChartJSToolParamsInput = z.input<typeof ChartJSToolParamsSchema>;
105
105
  type ChartJSToolParams = z.output<typeof ChartJSToolParamsSchema>;
@@ -143,11 +143,11 @@ declare const ChartJSToolResultSchema: z.ZodObject<{
143
143
  headers: z.ZodArray<z.ZodString, "many">;
144
144
  rows: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
145
145
  }, "strip", z.ZodTypeAny, {
146
- headers: string[];
147
146
  rows: string[][];
148
- }, {
149
147
  headers: string[];
148
+ }, {
150
149
  rows: string[][];
150
+ headers: string[];
151
151
  }>>;
152
152
  filePath: z.ZodOptional<z.ZodString>;
153
153
  fileExists: z.ZodOptional<z.ZodBoolean>;
@@ -155,8 +155,8 @@ declare const ChartJSToolResultSchema: z.ZodObject<{
155
155
  success: z.ZodBoolean;
156
156
  error: z.ZodString;
157
157
  }, "strip", z.ZodTypeAny, {
158
- error: string;
159
158
  success: boolean;
159
+ error: string;
160
160
  metadata: {
161
161
  colorScheme: string;
162
162
  generatedAt: string;
@@ -172,17 +172,17 @@ declare const ChartJSToolResultSchema: z.ZodObject<{
172
172
  width: number;
173
173
  height: number;
174
174
  };
175
- fileSize?: number | undefined;
176
175
  filePath?: string | undefined;
176
+ fileSize?: number | undefined;
177
177
  imageBase64?: string | undefined;
178
178
  tableData?: {
179
- headers: string[];
180
179
  rows: string[][];
180
+ headers: string[];
181
181
  } | undefined;
182
182
  fileExists?: boolean | undefined;
183
183
  }, {
184
- error: string;
185
184
  success: boolean;
185
+ error: string;
186
186
  metadata: {
187
187
  colorScheme: string;
188
188
  generatedAt: string;
@@ -198,12 +198,12 @@ declare const ChartJSToolResultSchema: z.ZodObject<{
198
198
  width: number;
199
199
  height: number;
200
200
  };
201
- fileSize?: number | undefined;
202
201
  filePath?: string | undefined;
202
+ fileSize?: number | undefined;
203
203
  imageBase64?: string | undefined;
204
204
  tableData?: {
205
- headers: string[];
206
205
  rows: string[][];
206
+ headers: string[];
207
207
  } | undefined;
208
208
  fileExists?: boolean | undefined;
209
209
  }>;
@@ -244,9 +244,9 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
244
244
  yAxisLabel?: string | undefined;
245
245
  }, {
246
246
  title?: string | undefined;
247
- colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
248
247
  xAxisLabel?: string | undefined;
249
248
  yAxisLabel?: string | undefined;
249
+ colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
250
250
  responsive?: boolean | undefined;
251
251
  maintainAspectRatio?: boolean | undefined;
252
252
  showLegend?: boolean | undefined;
@@ -280,6 +280,7 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
280
280
  xAxisLabel?: string | undefined;
281
281
  yAxisLabel?: string | undefined;
282
282
  } | undefined;
283
+ filePath?: string | undefined;
283
284
  credentials?: Partial<Record<CredentialType, string>> | undefined;
284
285
  config?: Record<string, unknown> | undefined;
285
286
  fileName?: string | undefined;
@@ -287,33 +288,32 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
287
288
  yColumn?: string | undefined;
288
289
  groupByColumn?: string | undefined;
289
290
  advancedConfig?: Record<string, unknown> | undefined;
290
- filePath?: string | undefined;
291
291
  }, {
292
292
  data: Record<string, unknown>[];
293
293
  reasoning: string;
294
294
  chartType: "table" | "line" | "bar" | "pie" | "doughnut" | "radar" | "scatter" | "bubble" | "polarArea";
295
295
  options?: {
296
296
  title?: string | undefined;
297
- colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
298
297
  xAxisLabel?: string | undefined;
299
298
  yAxisLabel?: string | undefined;
299
+ colorScheme?: "default" | "viridis" | "plasma" | "inferno" | "magma" | "blues" | "greens" | "reds" | "oranges" | "categorical" | undefined;
300
300
  responsive?: boolean | undefined;
301
301
  maintainAspectRatio?: boolean | undefined;
302
302
  showLegend?: boolean | undefined;
303
303
  showTooltips?: boolean | undefined;
304
304
  stacked?: boolean | undefined;
305
305
  } | undefined;
306
+ filePath?: string | undefined;
306
307
  credentials?: Partial<Record<CredentialType, string>> | undefined;
307
308
  config?: Record<string, unknown> | undefined;
309
+ fileName?: string | undefined;
308
310
  width?: number | undefined;
309
311
  height?: number | undefined;
310
- fileName?: string | undefined;
311
312
  xColumn?: string | undefined;
312
313
  yColumn?: string | undefined;
313
314
  groupByColumn?: string | undefined;
314
315
  advancedConfig?: Record<string, unknown> | undefined;
315
316
  generateFile?: boolean | undefined;
316
- filePath?: string | undefined;
317
317
  }>;
318
318
  static readonly resultSchema: z.ZodObject<{
319
319
  chartConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -354,11 +354,11 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
354
354
  headers: z.ZodArray<z.ZodString, "many">;
355
355
  rows: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
356
356
  }, "strip", z.ZodTypeAny, {
357
- headers: string[];
358
357
  rows: string[][];
359
- }, {
360
358
  headers: string[];
359
+ }, {
361
360
  rows: string[][];
361
+ headers: string[];
362
362
  }>>;
363
363
  filePath: z.ZodOptional<z.ZodString>;
364
364
  fileExists: z.ZodOptional<z.ZodBoolean>;
@@ -366,8 +366,8 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
366
366
  success: z.ZodBoolean;
367
367
  error: z.ZodString;
368
368
  }, "strip", z.ZodTypeAny, {
369
- error: string;
370
369
  success: boolean;
370
+ error: string;
371
371
  metadata: {
372
372
  colorScheme: string;
373
373
  generatedAt: string;
@@ -383,17 +383,17 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
383
383
  width: number;
384
384
  height: number;
385
385
  };
386
- fileSize?: number | undefined;
387
386
  filePath?: string | undefined;
387
+ fileSize?: number | undefined;
388
388
  imageBase64?: string | undefined;
389
389
  tableData?: {
390
- headers: string[];
391
390
  rows: string[][];
391
+ headers: string[];
392
392
  } | undefined;
393
393
  fileExists?: boolean | undefined;
394
394
  }, {
395
- error: string;
396
395
  success: boolean;
396
+ error: string;
397
397
  metadata: {
398
398
  colorScheme: string;
399
399
  generatedAt: string;
@@ -409,12 +409,12 @@ export declare class ChartJSTool extends ToolBubble<ChartJSToolParams, ChartJSTo
409
409
  width: number;
410
410
  height: number;
411
411
  };
412
- fileSize?: number | undefined;
413
412
  filePath?: string | undefined;
413
+ fileSize?: number | undefined;
414
414
  imageBase64?: string | undefined;
415
415
  tableData?: {
416
- headers: string[];
417
416
  rows: string[][];
417
+ headers: string[];
418
418
  } | undefined;
419
419
  fileExists?: boolean | undefined;
420
420
  }>;
@@ -1,17 +1,14 @@
1
1
  /**
2
2
  * EDIT BUBBLEFLOW TOOL
3
3
  *
4
- * A tool bubble that applies code edits to BubbleFlow files using Morph Fast Apply.
5
- * This tool uses the Morph API via OpenRouter to intelligently merge code changes
6
- * specified by an AI agent into existing BubbleFlow code, following the Fast Apply
7
- * pattern used in Cursor.
4
+ * A tool bubble that applies code edits to BubbleFlow files using find-and-replace.
5
+ * This tool performs simple string replacement matching Claude Code's Edit tool behavior.
8
6
  *
9
7
  * Features:
10
- * - Intelligent code merging using Morph Fast Apply model
11
- * - Support for lazy edits with "// ... existing code ..." markers
12
- * - Minimal context repetition for efficient edits
13
- * - Automatic validation after edits
14
- * - Detailed diff reporting
8
+ * - Exact string find-and-replace
9
+ * - Uniqueness validation (prevents ambiguous edits)
10
+ * - Replace-all mode for renaming variables/strings
11
+ * - No external API calls required
15
12
  */
16
13
  import { z } from 'zod';
17
14
  import { ToolBubble } from '../../types/tool-bubble-class.js';
@@ -21,25 +18,25 @@ import { ToolBubble } from '../../types/tool-bubble-class.js';
21
18
  */
22
19
  declare const EditBubbleFlowToolParamsSchema: z.ZodObject<{
23
20
  initialCode: z.ZodString;
24
- instructions: z.ZodString;
25
- codeEdit: z.ZodString;
26
- morphModel: z.ZodOptional<z.ZodDefault<z.ZodString>>;
21
+ old_string: z.ZodString;
22
+ new_string: z.ZodString;
23
+ replace_all: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
27
24
  credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
28
25
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
26
  }, "strip", z.ZodTypeAny, {
30
- instructions: string;
31
27
  initialCode: string;
32
- codeEdit: string;
28
+ old_string: string;
29
+ new_string: string;
33
30
  credentials?: Record<string, string> | undefined;
34
31
  config?: Record<string, unknown> | undefined;
35
- morphModel?: string | undefined;
32
+ replace_all?: boolean | undefined;
36
33
  }, {
37
- instructions: string;
38
34
  initialCode: string;
39
- codeEdit: string;
35
+ old_string: string;
36
+ new_string: string;
40
37
  credentials?: Record<string, string> | undefined;
41
38
  config?: Record<string, unknown> | undefined;
42
- morphModel?: string | undefined;
39
+ replace_all?: boolean | undefined;
43
40
  }>;
44
41
  /**
45
42
  * Type definitions derived from schemas
@@ -53,53 +50,22 @@ type EditBubbleFlowToolResult = z.output<typeof EditBubbleFlowToolResultSchema>;
53
50
  declare const EditBubbleFlowToolResultSchema: z.ZodObject<{
54
51
  mergedCode: z.ZodString;
55
52
  applied: z.ZodBoolean;
56
- diff: z.ZodOptional<z.ZodString>;
57
- metadata: z.ZodObject<{
58
- editedAt: z.ZodString;
59
- originalLength: z.ZodNumber;
60
- finalLength: z.ZodNumber;
61
- morphModel: z.ZodString;
62
- }, "strip", z.ZodTypeAny, {
63
- originalLength: number;
64
- morphModel: string;
65
- editedAt: string;
66
- finalLength: number;
67
- }, {
68
- originalLength: number;
69
- morphModel: string;
70
- editedAt: string;
71
- finalLength: number;
72
- }>;
73
53
  success: z.ZodBoolean;
74
54
  error: z.ZodString;
75
55
  }, "strip", z.ZodTypeAny, {
76
- error: string;
77
56
  success: boolean;
78
- metadata: {
79
- originalLength: number;
80
- morphModel: string;
81
- editedAt: string;
82
- finalLength: number;
83
- };
57
+ error: string;
84
58
  mergedCode: string;
85
59
  applied: boolean;
86
- diff?: string | undefined;
87
60
  }, {
88
- error: string;
89
61
  success: boolean;
90
- metadata: {
91
- originalLength: number;
92
- morphModel: string;
93
- editedAt: string;
94
- finalLength: number;
95
- };
62
+ error: string;
96
63
  mergedCode: string;
97
64
  applied: boolean;
98
- diff?: string | undefined;
99
65
  }>;
100
66
  /**
101
67
  * Edit BubbleFlow Tool
102
- * Applies code edits using Morph Fast Apply API via AIAgent
68
+ * Applies code edits using find-and-replace
103
69
  */
104
70
  export declare class EditBubbleFlowTool extends ToolBubble<EditBubbleFlowToolParams, EditBubbleFlowToolResult> {
105
71
  /**
@@ -109,78 +75,51 @@ export declare class EditBubbleFlowTool extends ToolBubble<EditBubbleFlowToolPar
109
75
  static readonly bubbleName = "code-edit-tool";
110
76
  static readonly schema: z.ZodObject<{
111
77
  initialCode: z.ZodString;
112
- instructions: z.ZodString;
113
- codeEdit: z.ZodString;
114
- morphModel: z.ZodOptional<z.ZodDefault<z.ZodString>>;
78
+ old_string: z.ZodString;
79
+ new_string: z.ZodString;
80
+ replace_all: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
115
81
  credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
116
82
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
117
83
  }, "strip", z.ZodTypeAny, {
118
- instructions: string;
119
84
  initialCode: string;
120
- codeEdit: string;
85
+ old_string: string;
86
+ new_string: string;
121
87
  credentials?: Record<string, string> | undefined;
122
88
  config?: Record<string, unknown> | undefined;
123
- morphModel?: string | undefined;
89
+ replace_all?: boolean | undefined;
124
90
  }, {
125
- instructions: string;
126
91
  initialCode: string;
127
- codeEdit: string;
92
+ old_string: string;
93
+ new_string: string;
128
94
  credentials?: Record<string, string> | undefined;
129
95
  config?: Record<string, unknown> | undefined;
130
- morphModel?: string | undefined;
96
+ replace_all?: boolean | undefined;
131
97
  }>;
132
98
  static readonly resultSchema: z.ZodObject<{
133
99
  mergedCode: z.ZodString;
134
100
  applied: z.ZodBoolean;
135
- diff: z.ZodOptional<z.ZodString>;
136
- metadata: z.ZodObject<{
137
- editedAt: z.ZodString;
138
- originalLength: z.ZodNumber;
139
- finalLength: z.ZodNumber;
140
- morphModel: z.ZodString;
141
- }, "strip", z.ZodTypeAny, {
142
- originalLength: number;
143
- morphModel: string;
144
- editedAt: string;
145
- finalLength: number;
146
- }, {
147
- originalLength: number;
148
- morphModel: string;
149
- editedAt: string;
150
- finalLength: number;
151
- }>;
152
101
  success: z.ZodBoolean;
153
102
  error: z.ZodString;
154
103
  }, "strip", z.ZodTypeAny, {
155
- error: string;
156
104
  success: boolean;
157
- metadata: {
158
- originalLength: number;
159
- morphModel: string;
160
- editedAt: string;
161
- finalLength: number;
162
- };
105
+ error: string;
163
106
  mergedCode: string;
164
107
  applied: boolean;
165
- diff?: string | undefined;
166
108
  }, {
167
- error: string;
168
109
  success: boolean;
169
- metadata: {
170
- originalLength: number;
171
- morphModel: string;
172
- editedAt: string;
173
- finalLength: number;
174
- };
110
+ error: string;
175
111
  mergedCode: string;
176
112
  applied: boolean;
177
- diff?: string | undefined;
178
113
  }>;
179
- static readonly shortDescription = "Applies code edits to BubbleFlow files using Morph Fast Apply";
180
- static readonly longDescription = "\n A tool for intelligently applying code edits to BubbleFlow TypeScript files.\n Uses the Morph Fast Apply API via OpenRouter to merge lazy code edits into existing code.\n\n What it does:\n - Merges code edits specified with \"// ... existing code ...\" markers\n - Uses Morph's apply model for intelligent code merging\n - Minimizes context repetition for efficient edits\n - Returns the final merged code\n\n How it works:\n - Takes original code, edit instructions, and code edit as input\n - Sends to Morph API via OpenRouter using HttpBubble\n - Receives merged code from Morph's apply model\n - Returns the final code ready to be written to file\n\n Use cases:\n - When an AI agent needs to make edits to BubbleFlow code\n - When applying multiple distinct edits to a file at once\n - When making targeted changes without rewriting entire files\n - When following the Cursor Fast Apply pattern for code edits\n\n Important:\n - The codeEdit parameter should use \"// ... existing code ...\" to mark unchanged sections\n - The instructions parameter should be generated by the model in first person\n - Requires OPENROUTER_CRED credential for Morph API access via OpenRouter\n ";
114
+ static readonly shortDescription = "Applies code edits to BubbleFlow files using find-and-replace";
115
+ static readonly longDescription = "\n A tool for applying code edits to BubbleFlow TypeScript files using find-and-replace.\n\n What it does:\n - Finds exact text matches in code and replaces them\n - Validates uniqueness to prevent ambiguous edits\n - Supports replace-all mode for renaming variables/strings\n - No external API calls required\n\n How it works:\n - Takes the current code, old_string (text to find), and new_string (replacement)\n - Validates that old_string exists and is unique (unless replace_all is true)\n - Performs the replacement and returns the updated code\n\n Use cases:\n - When an AI agent needs to make edits to BubbleFlow code\n - When making targeted changes without rewriting entire files\n - When renaming variables or strings across a file\n\n Important:\n - old_string must be an exact match of text in the code\n - If old_string appears multiple times, provide more context or use replace_all\n - new_string must be different from old_string\n ";
181
116
  static readonly alias = "code-edit";
182
117
  /**
183
- * Main action method - performs code edit merging
118
+ * Count occurrences of a substring in a string
119
+ */
120
+ private countOccurrences;
121
+ /**
122
+ * Main action method - performs find-and-replace code editing
184
123
  */
185
124
  performAction(): Promise<EditBubbleFlowToolResult>;
186
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"code-edit-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/code-edit-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D;;;GAGG;AACH,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;EAsClC,CAAC;AAEH;;GAEG;AACH,KAAK,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAChF,KAAK,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEhF;;;GAGG;AACH,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BlC,CAAC;AAEH;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU,CAChD,wBAAwB,EACxB,wBAAwB,CACzB;IACC;;OAEG;IAGH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAGvC,MAAM,CAAC,QAAQ,CAAC,UAAU,oBAAoB;IAG9C,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;OAAkC;IACxD,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAkC;IAG9D,MAAM,CAAC,QAAQ,CAAC,gBAAgB,mEACkC;IAGlE,MAAM,CAAC,QAAQ,CAAC,eAAe,suCA0B7B;IAGF,MAAM,CAAC,QAAQ,CAAC,KAAK,eAAe;IAEpC;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,wBAAwB,CAAC;CA4OzD"}
1
+ {"version":3,"file":"code-edit-tool.d.ts","sourceRoot":"","sources":["../../../src/bubbles/tool-bubble/code-edit-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D;;;GAGG;AACH,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;EAwClC,CAAC;AAEH;;GAEG;AACH,KAAK,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAChF,KAAK,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEhF;;;GAGG;AACH,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;EAUlC,CAAC;AAEH;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU,CAChD,wBAAwB,EACxB,wBAAwB,CACzB;IACC;;OAEG;IAGH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAU;IAGvC,MAAM,CAAC,QAAQ,CAAC,UAAU,oBAAoB;IAG9C,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;OAAkC;IACxD,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;OAAkC;IAG9D,MAAM,CAAC,QAAQ,CAAC,gBAAgB,mEACkC;IAGlE,MAAM,CAAC,QAAQ,CAAC,eAAe,i/BAuB7B;IAGF,MAAM,CAAC,QAAQ,CAAC,KAAK,eAAe;IAEpC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAUxB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,wBAAwB,CAAC;CAsFzD"}