@builder.io/ai-utils 0.59.0 → 0.60.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 +1 -1
- package/src/codegen.d.ts +2806 -1034
- package/src/codegen.js +1883 -0
- package/src/mapping.d.ts +13 -12
- package/src/mapping.js +15 -1
- package/src/messages.d.ts +305 -107
- package/src/messages.js +158 -0
- package/src/projects.d.ts +27 -13
- package/src/projects.js +23 -0
package/src/projects.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import type { ConnectivityErrorCode, CheckType, LikelyCause } from "./connectivity/types.js";
|
|
2
3
|
import type { FileOverride, EnvironmentVariable, LaunchServerState, LaunchServerStatus, BranchBackup, CommitMode, CustomInstruction, CustomAgentDefinition, GitSnapshot, AutoPushMode, GenerateUserMessage, CodeGenToolMap, GenerateCompletionStep, ReviewEffort } from "./codegen";
|
|
3
4
|
import type { FallbackTokensPrivate } from "./organization";
|
|
@@ -327,19 +328,32 @@ export type ShutdownResponse = {
|
|
|
327
328
|
export type ShutdownResponseSerialized = Omit<ShutdownResponse, "error"> & {
|
|
328
329
|
error?: string;
|
|
329
330
|
};
|
|
330
|
-
export
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
export
|
|
338
|
-
key:
|
|
339
|
-
type: "script"
|
|
340
|
-
name:
|
|
341
|
-
script:
|
|
342
|
-
}
|
|
331
|
+
export declare const SetupMiseDependencySchema: z.ZodObject<{
|
|
332
|
+
key: z.ZodString;
|
|
333
|
+
type: z.ZodLiteral<"mise">;
|
|
334
|
+
tool: z.ZodString;
|
|
335
|
+
version: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
export type SetupMiseDependency = z.infer<typeof SetupMiseDependencySchema>;
|
|
338
|
+
export declare const SetupScriptDependencySchema: z.ZodObject<{
|
|
339
|
+
key: z.ZodString;
|
|
340
|
+
type: z.ZodLiteral<"script">;
|
|
341
|
+
name: z.ZodString;
|
|
342
|
+
script: z.ZodString;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
export type SetupScriptDependency = z.infer<typeof SetupScriptDependencySchema>;
|
|
345
|
+
export declare const SetupDependencySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
346
|
+
key: z.ZodString;
|
|
347
|
+
type: z.ZodLiteral<"mise">;
|
|
348
|
+
tool: z.ZodString;
|
|
349
|
+
version: z.ZodOptional<z.ZodString>;
|
|
350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
+
key: z.ZodString;
|
|
352
|
+
type: z.ZodLiteral<"script">;
|
|
353
|
+
name: z.ZodString;
|
|
354
|
+
script: z.ZodString;
|
|
355
|
+
}, z.core.$strip>], "type">;
|
|
356
|
+
export type SetupDependency = z.infer<typeof SetupDependencySchema>;
|
|
343
357
|
export type FusionExecutionEnvironment = "containerized" | "container-less" | "cloud" | "cloud-v2";
|
|
344
358
|
export type AgentType = "setup-project" | "project-configuration" | "org-agent" | "code-review-orchestrator" | "design-system-indexer" | "builder-publish-integration";
|
|
345
359
|
export interface PartialBranchData {
|
package/src/projects.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
/**
|
|
2
3
|
* Detect git provider from a repository URL (HTTPS or SSH).
|
|
3
4
|
* Used by both error diagnostics and connectivity checks for consistent provider labeling.
|
|
@@ -36,6 +37,28 @@ export const STARTER_REPO = "BuilderIO/fusion-starter";
|
|
|
36
37
|
export const DSI_PREVIEW_REPO = "BuilderIO/dsi-starter";
|
|
37
38
|
export const EXAMPLE_OR_STARTER_REPOS = [...EXAMPLE_REPOS, STARTER_REPO];
|
|
38
39
|
export const EXAMPLE_OR_STARTER_REPOS_URLS = EXAMPLE_OR_STARTER_REPOS.map((repo) => `https://github.com/${repo}`);
|
|
40
|
+
export const SetupMiseDependencySchema = z
|
|
41
|
+
.object({
|
|
42
|
+
key: z.string(),
|
|
43
|
+
type: z.literal("mise"),
|
|
44
|
+
tool: z.string(),
|
|
45
|
+
version: z.string().optional(),
|
|
46
|
+
})
|
|
47
|
+
.meta({ title: "SetupMiseDependency" });
|
|
48
|
+
export const SetupScriptDependencySchema = z
|
|
49
|
+
.object({
|
|
50
|
+
key: z.string(),
|
|
51
|
+
type: z.literal("script"),
|
|
52
|
+
name: z.string(),
|
|
53
|
+
script: z.string(),
|
|
54
|
+
})
|
|
55
|
+
.meta({ title: "SetupScriptDependency" });
|
|
56
|
+
export const SetupDependencySchema = z
|
|
57
|
+
.discriminatedUnion("type", [
|
|
58
|
+
SetupMiseDependencySchema,
|
|
59
|
+
SetupScriptDependencySchema,
|
|
60
|
+
])
|
|
61
|
+
.meta({ title: "SetupDependency" });
|
|
39
62
|
export const checkIsNewBranch = (branch) => {
|
|
40
63
|
return "projectId" in branch;
|
|
41
64
|
};
|