@builder.io/dev-tools 1.6.41-dev.202505081902.3b00ea72 → 1.6.41

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.
@@ -12,13 +12,12 @@ export interface ToolResolution {
12
12
  isError: boolean;
13
13
  title?: string;
14
14
  }
15
- export type CommitMode = "commits" | "draft-prs" | "prs";
16
15
  export interface ProvidedToolContext {
17
16
  commandCtx?: RunCommandCtx;
18
17
  checkCommand?: string;
19
18
  localServerUrl?: string;
20
19
  allowedCommands?: RegExp[];
21
- commitMode?: CommitMode;
20
+ commitMode?: "auto" | "manual";
22
21
  }
23
22
  export interface ToolContext extends ProvidedToolContext {
24
23
  sys: DevToolsSys;
@@ -3,7 +3,7 @@ import type { CLIArgs } from "./index";
3
3
  import { type Credentials } from "./credentials";
4
4
  import type { CodegenTurn, CustomInstruction, GenerateCompletionState, GenerateCompletionStep, GenerateUserMessage, UserContext } from "$/ai-utils";
5
5
  import prettier from "prettier";
6
- import { type CommitMode, type ProvidedToolContext } from "./code-tools";
6
+ import { type ProvidedToolContext } from "./code-tools";
7
7
  export interface RunCommandCtx {
8
8
  command: string;
9
9
  state: "running" | "stopped";
@@ -59,38 +59,6 @@ export declare class CodeGenSession {
59
59
  constructor(options: CodeGenSessionOptions);
60
60
  get workingDirectory(): string;
61
61
  initializeSession(): Promise<void>;
62
- setRepoUrl(repoUrl: string): void;
63
- setPrUrl(prUrl: string): void;
64
- pushRepo(repoFullName: string, githubToken: string): Promise<{
65
- success: boolean;
66
- error: string;
67
- details?: undefined;
68
- } | {
69
- success: boolean;
70
- error?: undefined;
71
- details?: undefined;
72
- } | {
73
- success: boolean;
74
- error: string;
75
- details: string;
76
- }>;
77
- createPR(repoFullName: string, githubToken: string, branchName: string): Promise<{
78
- success: boolean;
79
- prUrl: any;
80
- prNumber: any;
81
- error?: undefined;
82
- details?: undefined;
83
- } | {
84
- success: boolean;
85
- error: string;
86
- details: unknown;
87
- prUrl?: undefined;
88
- prNumber?: undefined;
89
- }>;
90
- setCommitMode(commitMode: CommitMode): void;
91
- pushChanges(pullFirst?: boolean): Promise<void>;
92
- hasChangesRelativeToRemote(): Promise<boolean>;
93
- pullLatestFromRemote(): Promise<void>;
94
62
  /**
95
63
  * Get the current commit hash
96
64
  */
@@ -152,7 +120,7 @@ export declare class CodeGenSession {
152
120
  abort(): void;
153
121
  stopEventLoop(): Promise<void>;
154
122
  close(): Promise<void>;
155
- connectToEventLoop(shouldReplay: boolean, onStep: (step: GenerateCompletionStep) => void): Promise<() => void>;
123
+ connectToEventLoop(shouldReplay: boolean, onStep: (step: GenerateCompletionStep) => void): () => void;
156
124
  waitForEventLoop(): Promise<void>;
157
125
  agentCompletion(userMessage: GenerateUserMessage, signal: AbortSignal | undefined, onStep: (step: GenerateCompletionStep) => void): Promise<void>;
158
126
  commitWorkInProgress(lastTurn: CodegenTurn): Promise<string | undefined>;
@@ -70,5 +70,4 @@ export declare const getGitHubRemoteUrl: ({ repoFullName, githubToken, }: {
70
70
  repoFullName: string;
71
71
  githubToken: string | undefined;
72
72
  }) => string;
73
- export declare const getActiveBranchCommand: () => string;
74
- export declare const getActiveBranch: (cwd?: string) => string;
73
+ export declare const getActiveBranch: () => string;
@@ -4,6 +4,10 @@ import type { CLIArgs } from "./index";
4
4
  * Large random-ish port number that is unlikely to be used
5
5
  */
6
6
  export declare const PROXY_PORT = 48752;
7
+ /**
8
+ * Maximum number of attempts to generate PR description
9
+ */
10
+ export declare const MAX_PR_CONTENT_ATTEMPTS = 2;
7
11
  export interface LaunchArgs extends CLIArgs {
8
12
  cwdAgent?: string;
9
13
  /** Fusion project ID */
@@ -17,7 +17,7 @@ export declare const NUMBER_TYPES: string[];
17
17
  export declare const BOOLEAN_TYPES: string[];
18
18
  export declare const ARRAY_TYPES: string[];
19
19
  export declare const OBJECT_TYPES: string[];
20
- export declare function getPrimitiveType(t: string): "string" | "object" | "number" | "boolean" | "array";
20
+ export declare function getPrimitiveType(t: string): "number" | "string" | "boolean" | "object" | "array";
21
21
  export declare function removeQuotes(text: string): string;
22
22
  export declare const resolveType: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string[] | undefined;
23
23
  export declare const typeToString: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string;
@@ -8,4 +8,4 @@ export declare function objectExpressionToObjectValue(sys: DevToolsSys, objectLi
8
8
  };
9
9
  export declare function convertArrayExpressionToJsArray(sys: DevToolsSys, arr: ts.ArrayLiteralExpression): any[];
10
10
  export declare function getTextOfPropertyName(sys: DevToolsSys, prop: ts.PropertyAssignment | ts.ObjectLiteralElementLike | undefined): string | undefined;
11
- export declare function valueToExpression(sys: DevToolsSys, val: any): ts.ObjectLiteralExpression | ts.Identifier | ts.StringLiteral | ts.NumericLiteral | ts.ArrayLiteralExpression | ts.TrueLiteral | ts.FalseLiteral;
11
+ export declare function valueToExpression(sys: DevToolsSys, val: any): ts.ObjectLiteralExpression | ts.Identifier | ts.StringLiteral | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.ArrayLiteralExpression;