@builder.io/ai-utils 0.19.1 → 0.20.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.
- package/package.json +1 -1
- package/src/codegen.d.ts +35 -1
- package/src/projects.d.ts +10 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -431,6 +431,7 @@ export interface CodeGenInputOptions {
|
|
|
431
431
|
encryptKey?: string;
|
|
432
432
|
modelOverride?: string;
|
|
433
433
|
errorIfHadCompaction?: boolean;
|
|
434
|
+
promptVersion?: "v1" | "v2" | "v3";
|
|
434
435
|
reasoning?: "low" | "medium" | "high" | "minimal";
|
|
435
436
|
redactUserMessages?: boolean;
|
|
436
437
|
redactLLMMessages?: boolean;
|
|
@@ -452,6 +453,11 @@ export interface CodeGenInputOptions {
|
|
|
452
453
|
* These tools will be executed on the client side and passed through from the server
|
|
453
454
|
*/
|
|
454
455
|
localMCPTools?: LocalMCPTools[];
|
|
456
|
+
/**
|
|
457
|
+
* Indicates whether the codegen is running in local mode (local filesystem)
|
|
458
|
+
* vs cloud/container mode. Used to determine git auto-commit behavior.
|
|
459
|
+
*/
|
|
460
|
+
isLocal?: boolean;
|
|
455
461
|
maxAgentLoops?: number;
|
|
456
462
|
maxAgentTiming?: number;
|
|
457
463
|
/**
|
|
@@ -965,7 +971,7 @@ export interface GenerateUserMessage {
|
|
|
965
971
|
includeRelevantMemories?: boolean;
|
|
966
972
|
category?: CodeGenCategory;
|
|
967
973
|
metadata?: Record<string, any>;
|
|
968
|
-
autoPush?: "force-push" | "merge-push" | "ff-push" | "none";
|
|
974
|
+
autoPush?: "force-push" | "merge-push" | "ff-push" | "safe-push" | "none";
|
|
969
975
|
syncChanges?: SyncChangesFromRemote;
|
|
970
976
|
enabledMCPs?: string[];
|
|
971
977
|
sessionMode?: SessionMode;
|
|
@@ -1601,6 +1607,10 @@ export interface PushChangesOptions {
|
|
|
1601
1607
|
};
|
|
1602
1608
|
/** If specified, only push changes for this folder (multi-repo support) */
|
|
1603
1609
|
folderName?: string;
|
|
1610
|
+
/** If true, abort and clean up if merge conflict is detected during pull */
|
|
1611
|
+
abortOnMergeConflict?: boolean;
|
|
1612
|
+
/** If true, verify fast-forward is possible before pushing, fail if not */
|
|
1613
|
+
requireFastForward?: boolean;
|
|
1604
1614
|
}
|
|
1605
1615
|
export interface SyncChangesFromRemote {
|
|
1606
1616
|
remoteBranches?: "both" | "main" | "ai";
|
|
@@ -1854,3 +1864,27 @@ export interface LaunchInitializeSessionOptions {
|
|
|
1854
1864
|
customInstructions?: CustomInstruction[];
|
|
1855
1865
|
privacyMode?: PrivacyMode;
|
|
1856
1866
|
}
|
|
1867
|
+
/**
|
|
1868
|
+
* Request for generating a commit message via LLM
|
|
1869
|
+
*/
|
|
1870
|
+
export interface CommitMessageRequest {
|
|
1871
|
+
/** Git diff from previous commit */
|
|
1872
|
+
diff: string;
|
|
1873
|
+
/** User messages sent during AI work */
|
|
1874
|
+
userMessages: string[];
|
|
1875
|
+
/** Last 10 commits from main branch for style reference */
|
|
1876
|
+
recentCommits: string[];
|
|
1877
|
+
/** Whether to generate a long commit message */
|
|
1878
|
+
longCommit?: boolean;
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Response from commit message generation
|
|
1882
|
+
*/
|
|
1883
|
+
export interface CommitMessageResponse {
|
|
1884
|
+
/** Full commit message */
|
|
1885
|
+
message: string;
|
|
1886
|
+
/** First line (50-72 chars) - the commit title */
|
|
1887
|
+
title: string;
|
|
1888
|
+
/** Optional extended description */
|
|
1889
|
+
body?: string;
|
|
1890
|
+
}
|
package/src/projects.d.ts
CHANGED
|
@@ -272,7 +272,7 @@ export type FusionExecutionEnvironment = "containerized" | "container-less" | "c
|
|
|
272
272
|
export interface PartialBranchData {
|
|
273
273
|
name?: string;
|
|
274
274
|
createdBy: string;
|
|
275
|
-
friendlyName
|
|
275
|
+
friendlyName?: string;
|
|
276
276
|
isDefault: boolean;
|
|
277
277
|
isPublic: boolean;
|
|
278
278
|
lockedFusionEnvironment?: FusionExecutionEnvironment;
|
|
@@ -323,6 +323,13 @@ export interface BranchMetadata {
|
|
|
323
323
|
[key: string]: unknown;
|
|
324
324
|
}
|
|
325
325
|
export type PRStatus = "open" | "closed" | "merged" | "draft" | "approved";
|
|
326
|
+
export interface BranchReview {
|
|
327
|
+
userId: string;
|
|
328
|
+
status: "approved" | "changes_requested" | "commented" | "pending";
|
|
329
|
+
comment?: string | null;
|
|
330
|
+
createdAt: number;
|
|
331
|
+
updatedAt: number;
|
|
332
|
+
}
|
|
326
333
|
interface BranchSharedData {
|
|
327
334
|
appName?: string | null;
|
|
328
335
|
prNumber?: number | null;
|
|
@@ -348,6 +355,8 @@ interface BranchSharedData {
|
|
|
348
355
|
friendlyName?: string;
|
|
349
356
|
useHomeDir?: boolean;
|
|
350
357
|
useCloudHomeDir?: boolean;
|
|
358
|
+
reviewers?: string[] | null;
|
|
359
|
+
reviews?: BranchReview[] | null;
|
|
351
360
|
ipv4?: {
|
|
352
361
|
address: string | null;
|
|
353
362
|
allocated: boolean | null;
|