@builder.io/dev-tools 1.21.10 → 1.21.11

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.
@@ -47,6 +47,8 @@ export interface CodeGenSessionOptionsBase {
47
47
  enabledTools?: (keyof CodeGenToolMap)[];
48
48
  modelOverride?: string;
49
49
  skipFileDiff?: boolean;
50
+ agentType?: string;
51
+ includeMemories?: boolean;
50
52
  }
51
53
  export interface CodeGenSessionOptionsSession extends CodeGenSessionOptionsBase {
52
54
  sessionOrCompletionId?: string;
@@ -55,11 +57,17 @@ export interface CodeGenSessionOptionsInitialUrl extends CodeGenSessionOptionsBa
55
57
  initialUrl: string;
56
58
  }
57
59
  export type CodeGenSessionOptions = CodeGenSessionOptionsSession | CodeGenSessionOptionsInitialUrl;
58
- export interface SpawnAgentResult {
60
+ export type SpawnAgentResult = SpawnAgentResultSuccess | SpawnAgentResultFailed;
61
+ export interface SpawnAgentResultSuccess {
59
62
  success: boolean;
60
63
  response: string;
61
64
  metadata: ExplorationMetadataToolInput;
62
65
  lastTurn?: CodegenTurn;
66
+ sessionId: string;
67
+ }
68
+ export interface SpawnAgentResultFailed {
69
+ success: false;
70
+ response: string;
63
71
  }
64
72
  export type CodeGenEventEmitter = EventEmitter<{
65
73
  step: [GenerateCompletionStep];
@@ -86,21 +94,6 @@ export declare class CodeGenSession {
86
94
  loadMoreTurns(): Promise<CodegenTurn[]>;
87
95
  setCustomInstructions(instructions: CustomInstruction[]): Promise<void>;
88
96
  setCustomAgents(agents: SubAgent[]): Promise<void>;
89
- /**
90
- * Spawn a named custom agent by ID or name
91
- * @param agentNameOrId - The agent's name or ID
92
- * @param options - Additional spawning options
93
- * @returns SpawnAgentResult
94
- */
95
- spawnNamedAgent(agentName: string | undefined, options: {
96
- prompt: string;
97
- user: UserSource;
98
- onStep?: (step: GenerateCompletionStep, subagent_type: string) => void;
99
- signal?: AbortSignal;
100
- maxCompletions?: number;
101
- sessionId?: string;
102
- mcpServers?: boolean;
103
- }): Promise<SpawnAgentResult>;
104
97
  pushRepoV2(repoInfo: {
105
98
  repoFullName: string;
106
99
  repoUrl: string;
@@ -252,22 +245,28 @@ export declare class CodeGenSession {
252
245
  state: "installed" | "not-installed" | "install-failed" | "install-aborted";
253
246
  shouldProceed: boolean;
254
247
  }>;
255
- spawnAgent(options: {
248
+ getNamedAgentConfig(agentName: string | undefined, signal?: AbortSignal): Promise<{
249
+ success: true;
250
+ options: CodeGenSessionOptions;
256
251
  subagent_type: string;
252
+ } | {
253
+ success: false;
254
+ response: string;
255
+ }>;
256
+ /**
257
+ * Spawn a named custom agent by ID or name
258
+ * @param agentNameOrId - The agent's name or ID
259
+ * @param options - Additional spawning options
260
+ * @returns SpawnAgentResult
261
+ */
262
+ spawnNamedAgent(agentName: string | undefined, options: {
257
263
  prompt: string;
258
264
  user: UserSource;
259
- onStep?: (step: GenerateCompletionStep, subagent_type: string) => void;
260
- signal?: AbortSignal;
265
+ signal: AbortSignal;
261
266
  maxCompletions?: number;
262
267
  sessionId?: string;
268
+ resume?: string;
263
269
  mcpServers?: boolean;
264
- tools?: string[];
265
- model?: string;
266
- mode?: CodeGenMode;
267
- includeMemories?: boolean;
268
- needDevServer?: boolean;
269
- needValidation?: boolean;
270
- systemPrompt?: string;
271
270
  }): Promise<SpawnAgentResult>;
272
271
  setProxyOrigin(proxySrc: string | undefined): void;
273
272
  getTurns(): CodegenTurn[];
@@ -17,8 +17,8 @@ export interface SubAgent {
17
17
  }
18
18
  /**
19
19
  * Resolves model shortcut to full model name
20
- * @param modelOrShortcut - Model name or shortcut
21
- * @returns Resolved model name or undefined
20
+ * @param modelOrShortcut - Model name or shortcut (or "inherit" to use parent model)
21
+ * @returns Resolved model name or undefined (undefined means inherit from parent)
22
22
  */
23
23
  export declare function resolveModelShortcut(modelOrShortcut?: string): string | undefined;
24
24
  /**