@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.
- package/cli/index.cjs +3058 -2435
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +2 -1
- package/core/index.mjs +2 -1
- package/node/index.cjs +13 -1
- package/node/index.mjs +13 -1
- package/package.json +1 -1
- package/server/index.cjs +34 -9
- package/server/index.mjs +34 -9
- package/types/cli/code-tools.d.ts +1 -0
- package/types/cli/codegen.d.ts +30 -2
- package/types/cli/index.d.ts +2 -0
- package/types/cli/org-agent/branch-tools.d.ts +4 -0
- package/types/cli/org-agent/cron-checker.d.ts +6 -0
- package/types/cli/org-agent/sync-org-tree.d.ts +3 -0
- package/types/cli/org-agent/tree-builder.d.ts +8 -0
- package/types/cli/org-agent/tree-builder.test.d.ts +1 -0
- package/types/cli/utils/agent-parser.d.ts +3 -1
- package/types/cli/utils/agents/org-agent-system-prompt.d.ts +11 -0
- package/types/cli/utils/agents/org-agent.d.ts +2 -0
- package/types/cli/utils/agents/org-worker.d.ts +2 -0
- package/types/cli/utils/agents/project-setup-agent.d.ts +2 -0
- package/types/cli/utils/memory-sync.d.ts +5 -1
- package/types/cli/utils/workspace-path-resolver.d.ts +1 -1
- package/types/common/ast/component-input-types.d.ts +1 -1
- package/types/common/utils.d.ts +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
- package/types/types.d.ts +1 -0
- package/types/cli/utils/resolve-shell-env.d.ts +0 -33
- /package/types/cli/{utils/resolve-shell-env.test.d.ts → org-agent/cron-checker.test.d.ts} +0 -0
package/types/cli/codegen.d.ts
CHANGED
|
@@ -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:
|
|
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
|
package/types/cli/index.d.ts
CHANGED
|
@@ -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 @@
|
|
|
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;
|
|
@@ -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
|
-
|
|
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 "
|
|
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): "
|
|
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;
|
package/types/common/utils.d.ts
CHANGED
|
@@ -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\""
|
|
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
|