@builder.io/ai-utils 0.91.1 → 0.93.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.91.1",
3
+ "version": "0.93.0",
4
4
  "description": "Builder.io AI utils",
5
5
  "files": [
6
6
  "src"
package/src/codegen.d.ts CHANGED
@@ -374,6 +374,7 @@ export declare const BuilderEditToolInputSchema: z.ZodObject<{
374
374
  filePath: z.ZodString;
375
375
  old_str: z.ZodString;
376
376
  new_str: z.ZodString;
377
+ activeLocale: z.ZodOptional<z.ZodString>;
377
378
  }, z.core.$strip>;
378
379
  export type BuilderEditToolInput = z.infer<typeof BuilderEditToolInputSchema>;
379
380
  export declare const GetScreenshotToolInputSchema: z.ZodObject<{
@@ -1535,6 +1536,7 @@ export declare const CodeGenToolMapSchema: z.ZodObject<{
1535
1536
  filePath: z.ZodString;
1536
1537
  old_str: z.ZodString;
1537
1538
  new_str: z.ZodString;
1539
+ activeLocale: z.ZodOptional<z.ZodString>;
1538
1540
  }, z.core.$strip>;
1539
1541
  WebFetch: z.ZodObject<{
1540
1542
  url: z.ZodString;
@@ -2864,6 +2866,10 @@ export declare const CodeGenInputOptionsSchema: z.ZodObject<{
2864
2866
  systemReminderPrompt: z.ZodOptional<z.ZodString>;
2865
2867
  }, z.core.$loose>;
2866
2868
  export type CodeGenInputOptions = z.infer<typeof CodeGenInputOptionsSchema> & {
2869
+ /** @internal Configured locales from BuilderEditorState for editor AI. */
2870
+ _availableLocales?: string[];
2871
+ /** @internal Locale used to serialize the current BuilderEdit source. */
2872
+ _serializedLocale?: string;
2867
2873
  /** @internal Derived from BuilderEditorState.components for editor AI. */
2868
2874
  _allowedComponentNames?: string[];
2869
2875
  /** @internal Derived from BuilderEditorState.components for editor AI. */
package/src/codegen.js CHANGED
@@ -567,6 +567,9 @@ export const BuilderEditToolInputSchema = z
567
567
  new_str: z.string().meta({
568
568
  description: "New content to replace the old content with",
569
569
  }),
570
+ activeLocale: z.string().min(1).optional().meta({
571
+ description: 'Locale to edit. Use "Default" for the default locale, or one of the configured available locales.',
572
+ }),
570
573
  })
571
574
  .meta({ title: "BuilderEditToolInput" });
572
575
  export const GetScreenshotToolInputSchema = z
@@ -90,6 +90,10 @@ export interface BuilderEditorState {
90
90
  * The active locale of the builder editor.
91
91
  */
92
92
  activeLocale?: string;
93
+ /**
94
+ * Locales configured for the current entry or space.
95
+ */
96
+ availableLocales?: string[];
93
97
  /**
94
98
  * The locale of the provided builder content.
95
99
  */
@@ -519,5 +519,15 @@ export interface Organization {
519
519
  gatewaySuspendedAt?: number;
520
520
  gatewaySuspendedBy?: string;
521
521
  gatewaySuspendedReason?: string;
522
+ /**
523
+ * Per-token daily gateway request cap for this space. Absent means the code
524
+ * default. Server-only config, set from the internal app's gateway admin —
525
+ * `firestore.rules` must keep it in the organizations `unChanged()` list, or
526
+ * any member of the space can raise their own cap from the client SDK.
527
+ */
528
+ gatewayTokenDailyCap?: number;
529
+ gatewayTokenDailyCapAt?: number;
530
+ gatewayTokenDailyCapBy?: string;
531
+ gatewayTokenDailyCapReason?: string;
522
532
  }
523
533
  export {};