@builder.io/dev-tools 1.28.17-dev.202603022023.5dff3f8ef → 1.28.17-dev.202603031856.393f0415b

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.
@@ -22,6 +22,7 @@ export interface ToolContext {
22
22
  debug: boolean;
23
23
  sys: DevToolsSys;
24
24
  credentials: Credentials;
25
+ asyncSubAgents: boolean;
25
26
  files: ProjectFile[];
26
27
  user: UserSource;
27
28
  position: CodeGenPosition;
@@ -1,6 +1,6 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import { type Credentials } from "./credentials";
3
- import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateUserMessage, SessionMode, UserContext, UserSource, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, SuggestedActionBuildError, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, FolderWatchEvent, MCPServerConfig, CodegenApiCreateTerminal, SyncChangesFromRemote, SearchFilesOptions, SearchFilesResult, SearchFileTreeOptions, SearchFileTreeResult, HttpServerState, ExplorationMetadataToolInput, CodegenAbortOptions, MessageUpdateOptions, GitRepoContext, SystemReminderObj, GitSnapshot, AutoPushMode } from "$/ai-utils";
3
+ import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateUserMessage, SessionMode, UserContext, UserSource, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, SuggestedActionBuildError, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, FolderWatchEvent, MCPServerConfig, CodegenApiCreateTerminal, SyncChangesFromRemote, SearchFilesOptions, SearchFilesResult, SearchFileTreeOptions, SearchFileTreeResult, HttpServerState, ExplorationMetadataToolInput, CodegenAbortOptions, MessageUpdateOptions, GitRepoContext, SystemReminderObj, GitSnapshot, AutoPushMode, QueueMode, CustomAgentDefinition } from "$/ai-utils";
4
4
  import { type ToolResolution } from "./code-tools";
5
5
  import { type SubAgent } from "./utils/agent-discovery";
6
6
  import EventEmitter from "node:events";
@@ -26,7 +26,7 @@ export interface SessionContext {
26
26
  sessionId: string;
27
27
  turns: CodegenTurn[];
28
28
  customInstructions: CustomInstruction[];
29
- customAgents: SubAgent[];
29
+ customAgents: CustomAgentDefinition[];
30
30
  userContext: UserContext;
31
31
  prettierConfig: Record<string, unknown> | null;
32
32
  state: GenerateCompletionState;
@@ -43,6 +43,7 @@ export interface CodeGenSessionOptionsBase {
43
43
  position: CodeGenPosition;
44
44
  maxTokens?: number;
45
45
  mode: CodeGenMode;
46
+ queueMode?: QueueMode;
46
47
  privacyMode?: PrivacyMode;
47
48
  builtInCustomInstructions?: CustomInstruction[];
48
49
  builtInCustomAgents?: SubAgent[];
@@ -61,6 +62,7 @@ export interface CodeGenSessionOptionsBase {
61
62
  agentType?: string;
62
63
  includeMemories?: boolean;
63
64
  fusionStatusMonitor?: FusionStatusMonitor;
65
+ asyncSubAgents?: boolean;
64
66
  }
65
67
  export interface CodeGenSessionOptionsSession extends CodeGenSessionOptionsBase {
66
68
  sessionOrCompletionId?: string;
@@ -96,6 +98,7 @@ export declare class CodeGenSession {
96
98
  /** Returns runtime git repo contexts for all enabled repos */
97
99
  get gitRepoContexts(): readonly GitRepoContext[];
98
100
  get workingDirectory(): string;
101
+ get bashWorkingDirectory(): string;
99
102
  getSessionMode(): SessionMode;
100
103
  switchSessionMode(newMode: SessionMode): Promise<void>;
101
104
  removeSystemReminder(tag: string): void;
@@ -309,6 +312,14 @@ export declare class CodeGenSession {
309
312
  resume?: string;
310
313
  mcpServers?: boolean;
311
314
  }): Promise<SpawnAgentResult>;
315
+ /**
316
+ * Returns info about currently running background sub-agents.
317
+ */
318
+ getRunningSubAgents(): Array<{
319
+ id: string;
320
+ description: string;
321
+ startedAt: number;
322
+ }>;
312
323
  setProxyOrigin(proxySrc: string | undefined, proxyDefaultOrigin: string | undefined): void;
313
324
  getTurns(): CodegenTurn[];
314
325
  getSessionContext(): SessionContext;
@@ -444,6 +455,12 @@ export declare class CodeGenSession {
444
455
  * @returns The file content or null if the file doesn't exist
445
456
  */
446
457
  readFile(filePath: string, skipAclCheck?: boolean): Promise<string | null>;
458
+ /**
459
+ * Reads a binary file from the workspace and returns its content as base64.
460
+ * Unlike readFile which reads as UTF-8 (corrupting binary data), this method
461
+ * preserves binary content by encoding it as base64.
462
+ */
463
+ readBinaryFile(filePath: string): Promise<string | null>;
447
464
  /**
448
465
  * Gets file content at a specific git reference (e.g., origin/main, HEAD~1, commit hash)
449
466
  * @param filePath - The file path relative to the workspace
@@ -524,6 +541,17 @@ export declare class CodeGenSession {
524
541
  * @returns Array of file names in the directory or empty array if directory doesn't exist
525
542
  */
526
543
  listDir(dirPath: string): Promise<string[]>;
544
+ /**
545
+ * List custom instructions (rules and skills) discovered from the workspace.
546
+ * Returns instructions with isSkill flag to distinguish skills from rules.
547
+ */
548
+ listCustomInstructions(): Promise<Array<{
549
+ id: string;
550
+ name: string;
551
+ description?: string;
552
+ type?: string;
553
+ isSkill: boolean;
554
+ }>>;
527
555
  /**
528
556
  * Get stats for a file in the workspace
529
557
  * @param filePath A file path that may include a workspace prefix
@@ -154,4 +154,6 @@ export interface CLIArgs {
154
154
  * Requires designSystemName to be provided or will prompt for it.
155
155
  */
156
156
  testFusionExample?: boolean;
157
+ /** Run space-sync in continuous mode, syncing every 2 minutes */
158
+ continuous?: boolean;
157
159
  }
@@ -0,0 +1,4 @@
1
+ import type { SendMessageToBranchToolInput, SpawnBranchToolInput } from "$/ai-utils";
2
+ import type { ToolContext, ToolResolution } from "../code-tools";
3
+ export declare function spawnBranch(toolContext: ToolContext, input: SpawnBranchToolInput): Promise<ToolResolution>;
4
+ export declare function sendMessageToBranch(toolContext: ToolContext, input: SendMessageToBranchToolInput): Promise<ToolResolution>;
@@ -0,0 +1,6 @@
1
+ export interface StartCronCheckerOptions {
2
+ cronFilePath: string;
3
+ emitMessage: (content: string) => Promise<void>;
4
+ intervalMs?: number;
5
+ }
6
+ export declare function startCronChecker(options: StartCronCheckerOptions): () => void;
@@ -0,0 +1,3 @@
1
+ import type { DevToolsSys } from "@builder.io/dev-tools/core";
2
+ import type { CLIArgs } from "../index";
3
+ export declare function runSpaceSyncCommand(sys: DevToolsSys, args: CLIArgs): Promise<void>;
@@ -0,0 +1,8 @@
1
+ import type { DevToolsSys } from "../../core";
2
+ export interface SyncOrgTreeOptions {
3
+ sys: DevToolsSys;
4
+ ownerId: string;
5
+ privateKey: string;
6
+ outputDir: string;
7
+ }
8
+ export declare function syncOrgTree(options: SyncOrgTreeOptions): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,7 @@
2
2
  * Agent definition parsing utilities
3
3
  * Handles parsing of custom agent definition files
4
4
  */
5
- import type { CodeGenMode } from "$/ai-utils";
5
+ import type { CodeGenMode, QueueMode } from "$/ai-utils";
6
6
  export interface SubAgent {
7
7
  name: string;
8
8
  description?: string;
@@ -16,6 +16,8 @@ export interface SubAgent {
16
16
  needDevServer?: boolean;
17
17
  needValidation?: boolean;
18
18
  resetAfterRun?: boolean;
19
+ mcpServers?: boolean;
20
+ queueMode?: QueueMode;
19
21
  }
20
22
  /**
21
23
  * Parses an agent definition file (Markdown with YAML frontmatter)
@@ -0,0 +1,11 @@
1
+ export interface OrgAgentSystemPromptOptions {
2
+ soulMd?: string;
3
+ agentsMd?: string;
4
+ activeProjectsSummary?: string;
5
+ memoriesContext?: string;
6
+ }
7
+ /**
8
+ * Assembles the full system prompt for the org agent by concatenating
9
+ * the SOUL.md, AGENTS.md, active projects summary, and memories context.
10
+ */
11
+ export declare function assembleOrgAgentSystemPrompt(options: OrgAgentSystemPromptOptions): string;
@@ -0,0 +1,2 @@
1
+ import type { CustomAgentDefinition } from "$/ai-utils";
2
+ export declare const ORG_AGENT: CustomAgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { CustomAgentDefinition } from "$/ai-utils";
2
+ export declare const ORG_WORKER: CustomAgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { CustomAgentDefinition } from "$/ai-utils";
2
+ export declare const PROJECT_SETUP_AGENT: CustomAgentDefinition;
@@ -22,4 +22,8 @@ export declare function loadMemories(sys: DevToolsSys, credentials: Credentials,
22
22
  * Write memories to `.builder/memories/` as markdown files grouped by category.
23
23
  * Errors are silently swallowed to avoid blocking session initialization.
24
24
  */
25
- export declare function syncMemoriesToDisk(sys: DevToolsSys, memories: MemorySummary[], rootDir: string): Promise<void>;
25
+ /**
26
+ * Write memories as markdown files into the given directory.
27
+ * Clears the directory first, then writes category files.
28
+ */
29
+ export declare function syncMemoriesToDir(sys: DevToolsSys, memories: MemorySummary[], memoriesDir: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { WorkspaceFolder, WorkspaceConfiguration } from "@builder.io/ai-utils";
1
+ import type { WorkspaceFolder, WorkspaceConfiguration } from "$/ai-utils";
2
2
  import type { DevToolsPath, DevToolsSys } from "../../types";
3
3
  export interface ResolveWorkspacePathOptions {
4
4
  filePath: string;
@@ -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): "number" | "string" | "boolean" | "object" | "array";
20
+ export declare function getPrimitiveType(t: string): "string" | "object" | "number" | "boolean" | "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;
@@ -19,7 +19,7 @@ export declare function clone<T>(obj: T): T;
19
19
  export declare function shouldSkipFolder(sys: DevToolsSys, skipFolders: Set<string>, fileName: string): boolean;
20
20
  export declare function getPackageManager(): string;
21
21
  export declare function isWindows(): boolean;
22
- export declare function builderNpxPackage(): "@builder.io/agent" | "\"@builder.io/dev-tools\"" | "builder.io";
22
+ export declare function builderNpxPackage(): "builder.io" | "@builder.io/agent" | "\"@builder.io/dev-tools\"";
23
23
  /**
24
24
  * Sanitizes a component name for use in filesystem paths by replacing invalid characters with underscores
25
25
  * @param name The component name to sanitize