@builder.io/ai-utils 0.11.34 → 0.12.0
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 +6 -1
- package/src/organization.d.ts +4 -1
- package/src/repo-indexing.d.ts +38 -1
- package/src/repo-indexing.js +12 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ export interface CodeGenInputOptions {
|
|
|
297
297
|
/** @deprecated */
|
|
298
298
|
repair?: boolean;
|
|
299
299
|
}
|
|
300
|
-
export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "abrupt-end" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit" | "unknown-design-system";
|
|
300
|
+
export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "abrupt-end" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "privacy-mode-key-required" | "privacy-mode-key-invalid" | "assertion" | "rate-limit" | "unknown-design-system";
|
|
301
301
|
export interface CodegenUsage {
|
|
302
302
|
total: number;
|
|
303
303
|
fast: number;
|
|
@@ -949,6 +949,11 @@ export type MachineConfig = (RemoteMachineConfig & {
|
|
|
949
949
|
export interface PrivacyMode {
|
|
950
950
|
encrypt: boolean;
|
|
951
951
|
encryptKey?: string;
|
|
952
|
+
/**
|
|
953
|
+
* Path to a file containing the encryption key for privacy mode.
|
|
954
|
+
* If provided, the key will be loaded from this file and set in encryptKey.
|
|
955
|
+
*/
|
|
956
|
+
encryptionKeyPath?: string;
|
|
952
957
|
/**
|
|
953
958
|
* If true, the user messages will be redacted from the history.
|
|
954
959
|
*
|
package/src/organization.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnvironmentVariable } from "./codegen";
|
|
1
|
+
import type { EnvironmentVariable, PrivacyMode } from "./codegen";
|
|
2
2
|
export interface GithubEnterpriseSetupValue {
|
|
3
3
|
host: string;
|
|
4
4
|
clientId: string;
|
|
@@ -32,6 +32,9 @@ interface OrganizationSettings {
|
|
|
32
32
|
autoDetectDevServerPatterns?: string[];
|
|
33
33
|
environmentVariables?: EnvironmentVariable[];
|
|
34
34
|
runInPty?: boolean;
|
|
35
|
+
privacyMode?: Pick<PrivacyMode, "mcpServers" | "redactUserMessages" | "redactLLMMessages"> & {
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
};
|
|
35
38
|
}
|
|
36
39
|
interface RoleOptions {
|
|
37
40
|
read?: boolean;
|
package/src/repo-indexing.d.ts
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
export type StoreComponentDocsInput = StoreComponentDocsInputV1 | StoreComponentDocsInputV2;
|
|
1
|
+
export type StoreComponentDocsInput = StoreComponentDocsInputV1 | StoreComponentDocsInputV2 | IndexDocumentV1;
|
|
2
|
+
export type IndexDocumentV1 = ComponentDocument | TokenDocument | IconDocument | AgentDocument;
|
|
3
|
+
export interface ComponentDocument extends DocumentBase {
|
|
4
|
+
type: "component";
|
|
5
|
+
relatedComponents: string[];
|
|
6
|
+
relevantFiles: string[];
|
|
7
|
+
hash: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TokenDocument extends DocumentBase {
|
|
10
|
+
type: "token";
|
|
11
|
+
hash: string;
|
|
12
|
+
relevantFiles: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface IconDocument extends DocumentBase {
|
|
15
|
+
type: "icon";
|
|
16
|
+
hash: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AgentDocument extends DocumentBase {
|
|
19
|
+
type: "agent";
|
|
20
|
+
}
|
|
21
|
+
export interface DocumentBase {
|
|
22
|
+
id?: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
content: string;
|
|
26
|
+
designSystemId: string;
|
|
27
|
+
designSystemPackage?: string;
|
|
28
|
+
designSystemVersion?: string;
|
|
29
|
+
tokens?: number;
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const isAgentDocument: (doc: IndexDocumentV1) => doc is AgentDocument;
|
|
33
|
+
export declare const isIconDocument: (doc: IndexDocumentV1) => doc is IconDocument;
|
|
34
|
+
export declare const isTokenDocument: (doc: IndexDocumentV1) => doc is TokenDocument;
|
|
35
|
+
export declare const isComponentDocument: (doc: IndexDocumentV1) => doc is ComponentDocument;
|
|
2
36
|
/**
|
|
3
37
|
* @deprecated
|
|
4
38
|
* While some documents may still use this format, new documents should use the
|
|
@@ -21,6 +55,9 @@ interface StoreComponentDocsInputV1 {
|
|
|
21
55
|
hash?: string;
|
|
22
56
|
designSystemId?: string;
|
|
23
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated
|
|
60
|
+
*/
|
|
24
61
|
interface StoreComponentDocsInputV2 {
|
|
25
62
|
id?: string;
|
|
26
63
|
ownerId?: string;
|
package/src/repo-indexing.js
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const isAgentDocument = (doc) => {
|
|
2
|
+
return doc.type === "agent";
|
|
3
|
+
};
|
|
4
|
+
export const isIconDocument = (doc) => {
|
|
5
|
+
return doc.type === "icon";
|
|
6
|
+
};
|
|
7
|
+
export const isTokenDocument = (doc) => {
|
|
8
|
+
return doc.type === "token";
|
|
9
|
+
};
|
|
10
|
+
export const isComponentDocument = (doc) => {
|
|
11
|
+
return doc.type === "component";
|
|
12
|
+
};
|