@builder.io/ai-utils 0.4.19 → 0.4.20
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 +20 -2
- package/src/projects.d.ts +4 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export interface CodeGenInputOptions {
|
|
|
118
118
|
styleLibrary?: CodeGenStyleLibrary;
|
|
119
119
|
typescript?: boolean;
|
|
120
120
|
userContext?: UserContext;
|
|
121
|
+
aclPolicy?: AclPolicy;
|
|
121
122
|
enabledTools?: CodeGenTools[];
|
|
122
123
|
maxTokens?: number;
|
|
123
124
|
maxPages?: number;
|
|
@@ -150,7 +151,7 @@ export interface CodegenUsage {
|
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
153
|
export interface PromptSuggestion {
|
|
153
|
-
type: "missing-imports" | "lazy-code" | "no-file-for-diff" | "syntax-error" | "llm-suggested" | "diff-apply";
|
|
154
|
+
type: "missing-imports" | "lazy-code" | "no-file-for-diff" | "syntax-error" | "llm-suggested" | "diff-apply" | "acl-policy-violation";
|
|
154
155
|
filePath?: string;
|
|
155
156
|
line?: number;
|
|
156
157
|
importance: "high" | "medium" | "low";
|
|
@@ -159,7 +160,7 @@ export interface PromptSuggestion {
|
|
|
159
160
|
prompt: string;
|
|
160
161
|
}
|
|
161
162
|
export interface ActionItem {
|
|
162
|
-
type: "file" | "text" | "diff" | "thinking" | "tool" | "suggestion" | "tool_result" | "server_tool_result";
|
|
163
|
+
type: "file" | "file-drop" | "text" | "diff" | "thinking" | "tool" | "suggestion" | "tool_result" | "server_tool_result";
|
|
163
164
|
id?: string;
|
|
164
165
|
content: string;
|
|
165
166
|
filePath?: string;
|
|
@@ -260,6 +261,8 @@ export interface GenerateCompletionStepDone {
|
|
|
260
261
|
id: string;
|
|
261
262
|
applyResults: ApplyActionsResult[];
|
|
262
263
|
actions: ActionItem[];
|
|
264
|
+
creditsUsed: number;
|
|
265
|
+
sessionUsage: number;
|
|
263
266
|
usage: CodegenUsage | undefined;
|
|
264
267
|
url?: string;
|
|
265
268
|
stopReason: CompletionStopReason;
|
|
@@ -564,6 +567,20 @@ export interface WorkspaceConfiguration {
|
|
|
564
567
|
agentsMD?: string;
|
|
565
568
|
folders: WorkspaceFolder[];
|
|
566
569
|
}
|
|
570
|
+
export type Permission = "read" | "write" | "list";
|
|
571
|
+
export interface AclEntry {
|
|
572
|
+
action: "allow" | "deny";
|
|
573
|
+
resource: string;
|
|
574
|
+
permissions: Permission[];
|
|
575
|
+
description?: string;
|
|
576
|
+
}
|
|
577
|
+
export interface AclPolicy {
|
|
578
|
+
entries: AclEntry[];
|
|
579
|
+
}
|
|
580
|
+
export interface AccessResult {
|
|
581
|
+
allowed: boolean;
|
|
582
|
+
message: string;
|
|
583
|
+
}
|
|
567
584
|
export interface FusionConfig {
|
|
568
585
|
devCommand: string;
|
|
569
586
|
checkCommand?: string;
|
|
@@ -578,6 +595,7 @@ export interface FusionConfig {
|
|
|
578
595
|
serverUrl: string;
|
|
579
596
|
isLocal?: boolean;
|
|
580
597
|
envVariables?: Record<string, string>;
|
|
598
|
+
accessControl?: AclPolicy;
|
|
581
599
|
/** @deprecated use devCommand */
|
|
582
600
|
command?: string;
|
|
583
601
|
}
|
package/src/projects.d.ts
CHANGED
|
@@ -67,6 +67,9 @@ export interface WarningStateMessage extends BaseMessage {
|
|
|
67
67
|
message: string;
|
|
68
68
|
errors?: string[];
|
|
69
69
|
}
|
|
70
|
+
export interface PingMessage extends BaseMessage {
|
|
71
|
+
type: "ping";
|
|
72
|
+
}
|
|
70
73
|
export interface PlainMessage extends BaseMessage {
|
|
71
74
|
message: string;
|
|
72
75
|
}
|
|
@@ -139,5 +142,5 @@ export interface CleanupCompletedMessage extends BaseMessage {
|
|
|
139
142
|
/**
|
|
140
143
|
* Messages sent by the container orchestrator.
|
|
141
144
|
*/
|
|
142
|
-
export type ProjectsChunkMessage = InitializingMessage | FetchingGithubTokenMessage | FetchingFusionKeyMessage | CheckingAppMessage | CleaningUpAppMessage | CreatingAppMessage | CheckingIPMessage | AllocatingIPMessage | CheckingMachineMessage | CheckingVolumeMessage | ForkingVolumeMessage | RetryingWithNewRegionMessage | WaitingBeforePollingMessage | PollingMachineStatusMessage | WarningStateMessage | DebugMessage | ErrorMessage | InfoMessage | WarningMessage | MachineStatusMessage | LogsMessage | ConfigStatusMessage | AppCreatedMessage | MachineCreatedMessage | IpAllocatedMessage | VolumeForkedMessage | ReadyMessage | ErrorStateMessage | CleanupCompletedMessage;
|
|
145
|
+
export type ProjectsChunkMessage = InitializingMessage | FetchingGithubTokenMessage | FetchingFusionKeyMessage | CheckingAppMessage | CleaningUpAppMessage | CreatingAppMessage | CheckingIPMessage | AllocatingIPMessage | CheckingMachineMessage | CheckingVolumeMessage | ForkingVolumeMessage | RetryingWithNewRegionMessage | WaitingBeforePollingMessage | PollingMachineStatusMessage | WarningStateMessage | PingMessage | DebugMessage | ErrorMessage | InfoMessage | WarningMessage | MachineStatusMessage | LogsMessage | ConfigStatusMessage | AppCreatedMessage | MachineCreatedMessage | IpAllocatedMessage | VolumeForkedMessage | ReadyMessage | ErrorStateMessage | CleanupCompletedMessage;
|
|
143
146
|
export {};
|