@builder.io/ai-utils 0.75.1 → 0.75.4

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.75.1",
3
+ "version": "0.75.4",
4
4
  "description": "Builder.io AI utils",
5
5
  "files": [
6
6
  "src"
package/src/codegen.d.ts CHANGED
@@ -4329,7 +4329,6 @@ export interface LaunchServerStatus {
4329
4329
  projectId?: string;
4330
4330
  detectedServerUrl?: string;
4331
4331
  httpClients: number;
4332
- _attemptDryRunBackupOutcome?: string;
4333
4332
  workingDirectory?: string;
4334
4333
  fusionConfig?: FusionConfig;
4335
4334
  fusionEnvironment: "cloud" | "cloud-v2" | "unknown";
@@ -4374,7 +4373,6 @@ export interface FusionStatus {
4374
4373
  machine: MachineConfig | undefined;
4375
4374
  projectId: string | undefined;
4376
4375
  detectedServerUrl: string | undefined;
4377
- _attemptDryRunBackupOutcome: string | undefined;
4378
4376
  workingDirectory: string | undefined;
4379
4377
  fusionEnvironment: "cloud" | "cloud-v2" | "unknown";
4380
4378
  containerState: "idle" | "busy";
package/src/codegen.js CHANGED
@@ -662,7 +662,7 @@ export const RecordFrameToolInputSchema = z
662
662
  description: "Optional longer description providing context about what this frame shows.",
663
663
  }),
664
664
  pr_highlight: z.boolean().optional().meta({
665
- description: "Set true to mark this as a 'verified screenshot' worth showing in the PR description — i.e. visual proof of how the fix/feature behaves. Use sparingly (1–3 per session) for the key moments that demonstrate the feature working. The title is used as the caption.",
665
+ description: "Set true to mark this as a 'verified screenshot' worth showing in the PR description — visual proof of how the fix/feature behaves. The title is the caption; `description` supports bullet points / multiple lines. Only flag a frame when it shows a GENUINELY DISTINCT UI state — never flag multiple shots of the same screen. For a single-screen change: flag exactly ONE frame and list ALL the changes as bullet points in `description`. For a multi-step flow: flag one frame per unique screen (e.g. step 1, 2, 3 — each a different UI). The first flagged frame is shown full-width as the hero, so make it the most representative.",
666
666
  }),
667
667
  })
668
668
  .meta({ title: "RecordFrameToolInput" });
@@ -11,6 +11,26 @@ export async function httpCheck(options) {
11
11
  const method = "HEAD";
12
12
  const redirect = isBrowser() ? "follow" : "manual";
13
13
  const signal = controller.signal;
14
+ if (isBrowser() && testId === "git-host:http") {
15
+ // Mirror classifyBrowserHttpCheck({ reachabilityOnly: true }) in the Builder app.
16
+ // Third-party git hosts lack CORS; no-cors HEAD is enough to verify the host is reachable.
17
+ await fetchFn(target, { method, mode: "no-cors", signal });
18
+ clearTimeout(timeoutId);
19
+ const durationMs = Date.now() - startTime;
20
+ const hasHighLatency = durationMs > LATENCY_THRESHOLD_MS;
21
+ return {
22
+ source,
23
+ testId,
24
+ target,
25
+ passed: true,
26
+ durationMs,
27
+ errorCode: hasHighLatency ? "latency_high" : undefined,
28
+ metadata: {
29
+ reachabilityOnly: true,
30
+ latencyHigh: hasHighLatency,
31
+ },
32
+ };
33
+ }
14
34
  /**
15
35
  * The custom fetch fn used in dev tools has proxy handling built-in, so no need
16
36
  * for a custom dispatcher.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
2
+ import { httpCheck } from "./http-check.js";
3
+ describe("httpCheck", () => {
4
+ beforeEach(() => {
5
+ vi.stubGlobal("window", { document: {} });
6
+ });
7
+ afterEach(() => {
8
+ vi.unstubAllGlobals();
9
+ });
10
+ it("uses no-cors reachability-only for browser git-host:http checks", async () => {
11
+ const fetchFn = vi.fn().mockResolvedValue({ type: "opaque" });
12
+ const result = await httpCheck({
13
+ target: "https://github.com",
14
+ source: "local",
15
+ testId: "git-host:http",
16
+ fetchFn,
17
+ });
18
+ expect(fetchFn).toHaveBeenCalledWith("https://github.com", {
19
+ method: "HEAD",
20
+ mode: "no-cors",
21
+ signal: expect.any(AbortSignal),
22
+ });
23
+ expect(result.passed).toBe(true);
24
+ expect(result.metadata).toMatchObject({ reachabilityOnly: true });
25
+ });
26
+ });
package/src/messages.d.ts CHANGED
@@ -92,6 +92,7 @@ export interface MCPServerURLDefinition {
92
92
  create_date?: number | null;
93
93
  serverId: string;
94
94
  disabled: boolean;
95
+ clientName?: string;
95
96
  }
96
97
  export interface MCPServerToolConfiguration {
97
98
  allowed_tools?: Array<string> | null;
@@ -116,6 +117,7 @@ export interface MCPServerDoc<TCreateDate = unknown, TLegacyTokenExpiresAt = nev
116
117
  createDate: TCreateDate;
117
118
  provider?: string;
118
119
  disabled?: boolean;
120
+ clientName: string | undefined;
119
121
  tool_configuration?: MCPServerToolConfiguration | null;
120
122
  oauthMetadata?: MCPServerOAuthMetadata | null;
121
123
  authorizationToken?: string;