bioscode 0.1.5
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/LICENSE +306 -0
- package/NOTICE +45 -0
- package/README.md +277 -0
- package/dist/auth/index.d.ts +202 -0
- package/dist/brand/index.d.ts +7 -0
- package/dist/brand/loader.d.ts +463 -0
- package/dist/brand/rules.d.ts +25 -0
- package/dist/brand/schema.d.ts +246 -0
- package/dist/bus/bus-event.d.ts +10 -0
- package/dist/bus/global.d.ts +7 -0
- package/dist/bus/index.d.ts +26 -0
- package/dist/cli/auth.d.ts +23 -0
- package/dist/cli/brand.d.ts +6 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/ui.d.ts +26 -0
- package/dist/command/index.d.ts +54 -0
- package/dist/config/config.d.ts +6036 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/markdown.d.ts +415 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/version.d.ts +5 -0
- package/dist/diff/engine.d.ts +15 -0
- package/dist/diff/index.d.ts +8 -0
- package/dist/diff/types.d.ts +66 -0
- package/dist/file/ignore.d.ts +7 -0
- package/dist/flag/index.d.ts +19 -0
- package/dist/gateway/bridge.d.ts +11 -0
- package/dist/gateway/handlers/llm.d.ts +7 -0
- package/dist/gateway/handlers/permission.d.ts +15 -0
- package/dist/gateway/handlers/session.d.ts +7 -0
- package/dist/gateway/handlers/system.d.ts +7 -0
- package/dist/gateway/handlers/tool.d.ts +7 -0
- package/dist/gateway/index.d.ts +18 -0
- package/dist/gateway/protocol.d.ts +159 -0
- package/dist/gateway/router.d.ts +7 -0
- package/dist/gateway/server.d.ts +24 -0
- package/dist/global/index.d.ts +23 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +34 -0
- package/dist/permission/index.d.ts +2 -0
- package/dist/permission/permission.d.ts +172 -0
- package/dist/permission/types.d.ts +109 -0
- package/dist/project/index.d.ts +3 -0
- package/dist/project/instance.d.ts +33 -0
- package/dist/project/project.d.ts +82 -0
- package/dist/project/state.d.ts +4 -0
- package/dist/prompt/index.d.ts +5 -0
- package/dist/prompt/system.d.ts +29 -0
- package/dist/prompt/template.d.ts +24 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/models.d.ts +14 -0
- package/dist/provider/provider.d.ts +848 -0
- package/dist/provider/types.d.ts +328 -0
- package/dist/server/index.d.ts +21 -0
- package/dist/server/routes/api.d.ts +2 -0
- package/dist/server/routes/auth.d.ts +2 -0
- package/dist/server/routes/events.d.ts +2 -0
- package/dist/server/routes/health.d.ts +2 -0
- package/dist/server/routes/sessions.d.ts +2 -0
- package/dist/server/services/agent.d.ts +40 -0
- package/dist/server/services/permission.d.ts +43 -0
- package/dist/server/sse/emitter.d.ts +57 -0
- package/dist/session/context-cache.d.ts +75 -0
- package/dist/session/context-optimization.d.ts +165 -0
- package/dist/session/index.d.ts +5 -0
- package/dist/session/llm.d.ts +68 -0
- package/dist/session/message-optimizer.d.ts +32 -0
- package/dist/session/session.d.ts +524 -0
- package/dist/session/title-generator.d.ts +11 -0
- package/dist/session/types.d.ts +713 -0
- package/dist/snapshot/index.d.ts +40 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/storage.d.ts +34 -0
- package/dist/theme.d.ts +64 -0
- package/dist/tool/bash.d.ts +19 -0
- package/dist/tool/edit.d.ts +21 -0
- package/dist/tool/glob.d.ts +15 -0
- package/dist/tool/grep.d.ts +20 -0
- package/dist/tool/image.d.ts +22 -0
- package/dist/tool/index.d.ts +11 -0
- package/dist/tool/ls.d.ts +14 -0
- package/dist/tool/read.d.ts +17 -0
- package/dist/tool/registry.d.ts +30 -0
- package/dist/tool/think.d.ts +11 -0
- package/dist/tool/todo.d.ts +76 -0
- package/dist/tool/tool.d.ts +65 -0
- package/dist/tool/webfetch.d.ts +15 -0
- package/dist/tool/write.d.ts +16 -0
- package/dist/tui/App.d.ts +10 -0
- package/dist/tui/components/Header.d.ts +13 -0
- package/dist/tui/components/LoadingIndicator.d.ts +26 -0
- package/dist/tui/components/Message/AssistantMessage.d.ts +11 -0
- package/dist/tui/components/Message/ReasoningMessage.d.ts +21 -0
- package/dist/tui/components/Message/ToolCallMessage.d.ts +26 -0
- package/dist/tui/components/Message/UserMessage.d.ts +12 -0
- package/dist/tui/components/Message/index.d.ts +16 -0
- package/dist/tui/components/PermissionPrompt.d.ts +6 -0
- package/dist/tui/components/PromptInput.d.ts +33 -0
- package/dist/tui/components/REPL.d.ts +22 -0
- package/dist/tui/components/Spinner.d.ts +13 -0
- package/dist/tui/components/StatusBar.d.ts +13 -0
- package/dist/tui/components/TodoList.d.ts +17 -0
- package/dist/tui/components/WelcomeBox.d.ts +13 -0
- package/dist/tui/components/dialogs/DiagnosticsPanel.d.ts +12 -0
- package/dist/tui/components/dialogs/HelpPanel.d.ts +11 -0
- package/dist/tui/components/dialogs/ModelSelector.d.ts +14 -0
- package/dist/tui/components/dialogs/PermissionPrompt.d.ts +17 -0
- package/dist/tui/components/dialogs/SessionPicker.d.ts +20 -0
- package/dist/tui/components/dialogs/index.d.ts +10 -0
- package/dist/tui/components/diff/DiffHunk.d.ts +12 -0
- package/dist/tui/components/diff/DiffLine.d.ts +14 -0
- package/dist/tui/components/diff/DiffStats.d.ts +12 -0
- package/dist/tui/components/diff/DiffView.d.ts +15 -0
- package/dist/tui/components/diff/index.d.ts +9 -0
- package/dist/tui/hooks/useAnimatedLabel.d.ts +12 -0
- package/dist/tui/hooks/usePermission.d.ts +34 -0
- package/dist/tui/hooks/useTermWidth.d.ts +13 -0
- package/dist/tui/index.d.ts +20 -0
- package/dist/tui/theme.d.ts +8 -0
- package/dist/tui/utils/Cursor.d.ts +37 -0
- package/dist/tui/utils/clipboard.d.ts +3 -0
- package/dist/tui/utils/keypress.d.ts +39 -0
- package/dist/tui/utils/markdown.d.ts +13 -0
- package/dist/tui/utils/openContent.d.ts +22 -0
- package/dist/util/ascii.d.ts +22 -0
- package/dist/util/bell.d.ts +14 -0
- package/dist/util/color.d.ts +28 -0
- package/dist/util/context.d.ts +10 -0
- package/dist/util/debug.d.ts +51 -0
- package/dist/util/error.d.ts +294 -0
- package/dist/util/example-commands.d.ts +18 -0
- package/dist/util/filesystem.d.ts +17 -0
- package/dist/util/id.d.ts +24 -0
- package/dist/util/iife.d.ts +1 -0
- package/dist/util/index.d.ts +7 -0
- package/dist/util/lazy.d.ts +1 -0
- package/dist/util/log.d.ts +26 -0
- package/dist/util/paths.d.ts +45 -0
- package/dist/util/shell.d.ts +36 -0
- package/dist/util/timeout.d.ts +1 -0
- package/dist/util/wildcard.d.ts +8 -0
- package/package.json +87 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare namespace Auth {
|
|
3
|
+
const Oauth: z.ZodObject<{
|
|
4
|
+
type: z.ZodLiteral<"oauth">;
|
|
5
|
+
refresh: z.ZodString;
|
|
6
|
+
access: z.ZodString;
|
|
7
|
+
expires: z.ZodNumber;
|
|
8
|
+
enterpriseUrl: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
type: "oauth";
|
|
11
|
+
refresh: string;
|
|
12
|
+
access: string;
|
|
13
|
+
expires: number;
|
|
14
|
+
enterpriseUrl?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
type: "oauth";
|
|
17
|
+
refresh: string;
|
|
18
|
+
access: string;
|
|
19
|
+
expires: number;
|
|
20
|
+
enterpriseUrl?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
const Api: z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"api">;
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "api";
|
|
27
|
+
key: string;
|
|
28
|
+
}, {
|
|
29
|
+
type: "api";
|
|
30
|
+
key: string;
|
|
31
|
+
}>;
|
|
32
|
+
const WellKnown: z.ZodObject<{
|
|
33
|
+
type: z.ZodLiteral<"wellknown">;
|
|
34
|
+
key: z.ZodString;
|
|
35
|
+
token: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
type: "wellknown";
|
|
38
|
+
key: string;
|
|
39
|
+
token: string;
|
|
40
|
+
}, {
|
|
41
|
+
type: "wellknown";
|
|
42
|
+
key: string;
|
|
43
|
+
token: string;
|
|
44
|
+
}>;
|
|
45
|
+
const ServiceAccount: z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<"service-account">;
|
|
47
|
+
serviceAccount: z.ZodObject<{
|
|
48
|
+
project_id: z.ZodString;
|
|
49
|
+
client_email: z.ZodString;
|
|
50
|
+
private_key: z.ZodString;
|
|
51
|
+
location: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
project_id: string;
|
|
54
|
+
client_email: string;
|
|
55
|
+
private_key: string;
|
|
56
|
+
location?: string | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
project_id: string;
|
|
59
|
+
client_email: string;
|
|
60
|
+
private_key: string;
|
|
61
|
+
location?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
type: "service-account";
|
|
65
|
+
serviceAccount: {
|
|
66
|
+
project_id: string;
|
|
67
|
+
client_email: string;
|
|
68
|
+
private_key: string;
|
|
69
|
+
location?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
type: "service-account";
|
|
73
|
+
serviceAccount: {
|
|
74
|
+
project_id: string;
|
|
75
|
+
client_email: string;
|
|
76
|
+
private_key: string;
|
|
77
|
+
location?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
const PerplexityApiKey: z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"perplexity-api-key">;
|
|
82
|
+
apiKey: z.ZodString;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
type: "perplexity-api-key";
|
|
85
|
+
apiKey: string;
|
|
86
|
+
}, {
|
|
87
|
+
type: "perplexity-api-key";
|
|
88
|
+
apiKey: string;
|
|
89
|
+
}>;
|
|
90
|
+
const Info: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"oauth">;
|
|
92
|
+
refresh: z.ZodString;
|
|
93
|
+
access: z.ZodString;
|
|
94
|
+
expires: z.ZodNumber;
|
|
95
|
+
enterpriseUrl: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
type: "oauth";
|
|
98
|
+
refresh: string;
|
|
99
|
+
access: string;
|
|
100
|
+
expires: number;
|
|
101
|
+
enterpriseUrl?: string | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
type: "oauth";
|
|
104
|
+
refresh: string;
|
|
105
|
+
access: string;
|
|
106
|
+
expires: number;
|
|
107
|
+
enterpriseUrl?: string | undefined;
|
|
108
|
+
}>, z.ZodObject<{
|
|
109
|
+
type: z.ZodLiteral<"api">;
|
|
110
|
+
key: z.ZodString;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
type: "api";
|
|
113
|
+
key: string;
|
|
114
|
+
}, {
|
|
115
|
+
type: "api";
|
|
116
|
+
key: string;
|
|
117
|
+
}>, z.ZodObject<{
|
|
118
|
+
type: z.ZodLiteral<"wellknown">;
|
|
119
|
+
key: z.ZodString;
|
|
120
|
+
token: z.ZodString;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
type: "wellknown";
|
|
123
|
+
key: string;
|
|
124
|
+
token: string;
|
|
125
|
+
}, {
|
|
126
|
+
type: "wellknown";
|
|
127
|
+
key: string;
|
|
128
|
+
token: string;
|
|
129
|
+
}>, z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"service-account">;
|
|
131
|
+
serviceAccount: z.ZodObject<{
|
|
132
|
+
project_id: z.ZodString;
|
|
133
|
+
client_email: z.ZodString;
|
|
134
|
+
private_key: z.ZodString;
|
|
135
|
+
location: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
project_id: string;
|
|
138
|
+
client_email: string;
|
|
139
|
+
private_key: string;
|
|
140
|
+
location?: string | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
project_id: string;
|
|
143
|
+
client_email: string;
|
|
144
|
+
private_key: string;
|
|
145
|
+
location?: string | undefined;
|
|
146
|
+
}>;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
type: "service-account";
|
|
149
|
+
serviceAccount: {
|
|
150
|
+
project_id: string;
|
|
151
|
+
client_email: string;
|
|
152
|
+
private_key: string;
|
|
153
|
+
location?: string | undefined;
|
|
154
|
+
};
|
|
155
|
+
}, {
|
|
156
|
+
type: "service-account";
|
|
157
|
+
serviceAccount: {
|
|
158
|
+
project_id: string;
|
|
159
|
+
client_email: string;
|
|
160
|
+
private_key: string;
|
|
161
|
+
location?: string | undefined;
|
|
162
|
+
};
|
|
163
|
+
}>, z.ZodObject<{
|
|
164
|
+
type: z.ZodLiteral<"perplexity-api-key">;
|
|
165
|
+
apiKey: z.ZodString;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
type: "perplexity-api-key";
|
|
168
|
+
apiKey: string;
|
|
169
|
+
}, {
|
|
170
|
+
type: "perplexity-api-key";
|
|
171
|
+
apiKey: string;
|
|
172
|
+
}>]>;
|
|
173
|
+
type Info = z.infer<typeof Info>;
|
|
174
|
+
function get(providerID: string): Promise<{
|
|
175
|
+
type: "oauth";
|
|
176
|
+
refresh: string;
|
|
177
|
+
access: string;
|
|
178
|
+
expires: number;
|
|
179
|
+
enterpriseUrl?: string | undefined;
|
|
180
|
+
} | {
|
|
181
|
+
type: "api";
|
|
182
|
+
key: string;
|
|
183
|
+
} | {
|
|
184
|
+
type: "wellknown";
|
|
185
|
+
key: string;
|
|
186
|
+
token: string;
|
|
187
|
+
} | {
|
|
188
|
+
type: "service-account";
|
|
189
|
+
serviceAccount: {
|
|
190
|
+
project_id: string;
|
|
191
|
+
client_email: string;
|
|
192
|
+
private_key: string;
|
|
193
|
+
location?: string | undefined;
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
type: "perplexity-api-key";
|
|
197
|
+
apiKey: string;
|
|
198
|
+
}>;
|
|
199
|
+
function all(): Promise<Record<string, Info>>;
|
|
200
|
+
function set(key: string, info: Info): Promise<void>;
|
|
201
|
+
function remove(key: string): Promise<void>;
|
|
202
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand Module
|
|
3
|
+
*
|
|
4
|
+
* Re-exports brand configuration from theme.ts for backward compatibility
|
|
5
|
+
*/
|
|
6
|
+
export { PRODUCT_NAME, PRODUCT_COMMAND, CONFIG_DIR, CONFIG_FILE, RULES_FILE, ENV_PREFIX, LOGO_SIMPLE, LOGO_EXTENDED, LOGO_ASCII, LOCAL_RULE_FILES, GLOBAL_RULE_FILES, DEFAULT_THEME, PRIMARY_COLOR, themes, getTheme, setTheme, getThemeNames, initTheme, } from "../theme";
|
|
7
|
+
export type { Theme } from "../theme";
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand Configuration Loader
|
|
3
|
+
*
|
|
4
|
+
* Handles loading and merging brand configurations from files
|
|
5
|
+
*/
|
|
6
|
+
import z from "zod";
|
|
7
|
+
import { type BrandConfig, type BrandConfigOverride } from "./schema";
|
|
8
|
+
export declare namespace BrandLoader {
|
|
9
|
+
/**
|
|
10
|
+
* Brand loading error
|
|
11
|
+
*/
|
|
12
|
+
const LoadError: {
|
|
13
|
+
new (data: {
|
|
14
|
+
message: string;
|
|
15
|
+
path?: string | undefined;
|
|
16
|
+
cause?: any;
|
|
17
|
+
}, options?: ErrorOptions): {
|
|
18
|
+
readonly name: "BrandLoadError";
|
|
19
|
+
readonly data: {
|
|
20
|
+
message: string;
|
|
21
|
+
path?: string | undefined;
|
|
22
|
+
cause?: any;
|
|
23
|
+
};
|
|
24
|
+
schema(): z.ZodObject<{
|
|
25
|
+
name: z.ZodLiteral<"BrandLoadError">;
|
|
26
|
+
data: z.ZodObject<{
|
|
27
|
+
message: z.ZodString;
|
|
28
|
+
path: z.ZodOptional<z.ZodString>;
|
|
29
|
+
cause: z.ZodOptional<z.ZodAny>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
message: string;
|
|
32
|
+
path?: string | undefined;
|
|
33
|
+
cause?: any;
|
|
34
|
+
}, {
|
|
35
|
+
message: string;
|
|
36
|
+
path?: string | undefined;
|
|
37
|
+
cause?: any;
|
|
38
|
+
}>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
name: "BrandLoadError";
|
|
41
|
+
data: {
|
|
42
|
+
message: string;
|
|
43
|
+
path?: string | undefined;
|
|
44
|
+
cause?: any;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
name: "BrandLoadError";
|
|
48
|
+
data: {
|
|
49
|
+
message: string;
|
|
50
|
+
path?: string | undefined;
|
|
51
|
+
cause?: any;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
toObject(): {
|
|
55
|
+
name: "BrandLoadError";
|
|
56
|
+
data: {
|
|
57
|
+
message: string;
|
|
58
|
+
path?: string | undefined;
|
|
59
|
+
cause?: any;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
message: string;
|
|
63
|
+
stack?: string;
|
|
64
|
+
cause?: unknown;
|
|
65
|
+
};
|
|
66
|
+
readonly Schema: z.ZodObject<{
|
|
67
|
+
name: z.ZodLiteral<"BrandLoadError">;
|
|
68
|
+
data: z.ZodObject<{
|
|
69
|
+
message: z.ZodString;
|
|
70
|
+
path: z.ZodOptional<z.ZodString>;
|
|
71
|
+
cause: z.ZodOptional<z.ZodAny>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
message: string;
|
|
74
|
+
path?: string | undefined;
|
|
75
|
+
cause?: any;
|
|
76
|
+
}, {
|
|
77
|
+
message: string;
|
|
78
|
+
path?: string | undefined;
|
|
79
|
+
cause?: any;
|
|
80
|
+
}>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
name: "BrandLoadError";
|
|
83
|
+
data: {
|
|
84
|
+
message: string;
|
|
85
|
+
path?: string | undefined;
|
|
86
|
+
cause?: any;
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
name: "BrandLoadError";
|
|
90
|
+
data: {
|
|
91
|
+
message: string;
|
|
92
|
+
path?: string | undefined;
|
|
93
|
+
cause?: any;
|
|
94
|
+
};
|
|
95
|
+
}>;
|
|
96
|
+
isInstance(input: any): input is {
|
|
97
|
+
readonly name: "BrandLoadError";
|
|
98
|
+
readonly data: {
|
|
99
|
+
message: string;
|
|
100
|
+
path?: string | undefined;
|
|
101
|
+
cause?: any;
|
|
102
|
+
};
|
|
103
|
+
schema(): z.ZodObject<{
|
|
104
|
+
name: z.ZodLiteral<"BrandLoadError">;
|
|
105
|
+
data: z.ZodObject<{
|
|
106
|
+
message: z.ZodString;
|
|
107
|
+
path: z.ZodOptional<z.ZodString>;
|
|
108
|
+
cause: z.ZodOptional<z.ZodAny>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
message: string;
|
|
111
|
+
path?: string | undefined;
|
|
112
|
+
cause?: any;
|
|
113
|
+
}, {
|
|
114
|
+
message: string;
|
|
115
|
+
path?: string | undefined;
|
|
116
|
+
cause?: any;
|
|
117
|
+
}>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
name: "BrandLoadError";
|
|
120
|
+
data: {
|
|
121
|
+
message: string;
|
|
122
|
+
path?: string | undefined;
|
|
123
|
+
cause?: any;
|
|
124
|
+
};
|
|
125
|
+
}, {
|
|
126
|
+
name: "BrandLoadError";
|
|
127
|
+
data: {
|
|
128
|
+
message: string;
|
|
129
|
+
path?: string | undefined;
|
|
130
|
+
cause?: any;
|
|
131
|
+
};
|
|
132
|
+
}>;
|
|
133
|
+
toObject(): {
|
|
134
|
+
name: "BrandLoadError";
|
|
135
|
+
data: {
|
|
136
|
+
message: string;
|
|
137
|
+
path?: string | undefined;
|
|
138
|
+
cause?: any;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
message: string;
|
|
142
|
+
stack?: string;
|
|
143
|
+
cause?: unknown;
|
|
144
|
+
};
|
|
145
|
+
create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): {
|
|
146
|
+
new (data: z.input<Data>, options?: ErrorOptions): {
|
|
147
|
+
readonly name: Name;
|
|
148
|
+
readonly data: z.input<Data>;
|
|
149
|
+
schema(): z.ZodObject<{
|
|
150
|
+
name: z.ZodLiteral<Name>;
|
|
151
|
+
data: Data;
|
|
152
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
153
|
+
name: z.ZodLiteral<Name>;
|
|
154
|
+
data: Data;
|
|
155
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
156
|
+
name: z.ZodLiteral<Name>;
|
|
157
|
+
data: Data;
|
|
158
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
|
|
159
|
+
toObject(): {
|
|
160
|
+
name: Name;
|
|
161
|
+
data: z.input<Data>;
|
|
162
|
+
};
|
|
163
|
+
message: string;
|
|
164
|
+
stack?: string;
|
|
165
|
+
cause?: unknown;
|
|
166
|
+
};
|
|
167
|
+
readonly Schema: z.ZodObject<{
|
|
168
|
+
name: z.ZodLiteral<Name>;
|
|
169
|
+
data: Data;
|
|
170
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
171
|
+
name: z.ZodLiteral<Name>;
|
|
172
|
+
data: Data;
|
|
173
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
174
|
+
name: z.ZodLiteral<Name>;
|
|
175
|
+
data: Data;
|
|
176
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
|
|
177
|
+
isInstance(input: any): input is InstanceType</*elided*/ any>;
|
|
178
|
+
create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): /*elided*/ any;
|
|
179
|
+
readonly Unknown: {
|
|
180
|
+
new (data: {
|
|
181
|
+
message: string;
|
|
182
|
+
}, options?: ErrorOptions): {
|
|
183
|
+
readonly name: "UnknownError";
|
|
184
|
+
readonly data: {
|
|
185
|
+
message: string;
|
|
186
|
+
};
|
|
187
|
+
schema(): z.ZodObject<{
|
|
188
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
189
|
+
data: z.ZodObject<{
|
|
190
|
+
message: z.ZodString;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
message: string;
|
|
193
|
+
}, {
|
|
194
|
+
message: string;
|
|
195
|
+
}>;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
name: "UnknownError";
|
|
198
|
+
data: {
|
|
199
|
+
message: string;
|
|
200
|
+
};
|
|
201
|
+
}, {
|
|
202
|
+
name: "UnknownError";
|
|
203
|
+
data: {
|
|
204
|
+
message: string;
|
|
205
|
+
};
|
|
206
|
+
}>;
|
|
207
|
+
toObject(): {
|
|
208
|
+
name: "UnknownError";
|
|
209
|
+
data: {
|
|
210
|
+
message: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
message: string;
|
|
214
|
+
stack?: string;
|
|
215
|
+
cause?: unknown;
|
|
216
|
+
};
|
|
217
|
+
readonly Schema: z.ZodObject<{
|
|
218
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
219
|
+
data: z.ZodObject<{
|
|
220
|
+
message: z.ZodString;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
message: string;
|
|
223
|
+
}, {
|
|
224
|
+
message: string;
|
|
225
|
+
}>;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
name: "UnknownError";
|
|
228
|
+
data: {
|
|
229
|
+
message: string;
|
|
230
|
+
};
|
|
231
|
+
}, {
|
|
232
|
+
name: "UnknownError";
|
|
233
|
+
data: {
|
|
234
|
+
message: string;
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
237
|
+
isInstance(input: any): input is {
|
|
238
|
+
readonly name: "UnknownError";
|
|
239
|
+
readonly data: {
|
|
240
|
+
message: string;
|
|
241
|
+
};
|
|
242
|
+
schema(): z.ZodObject<{
|
|
243
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
244
|
+
data: z.ZodObject<{
|
|
245
|
+
message: z.ZodString;
|
|
246
|
+
}, "strip", z.ZodTypeAny, {
|
|
247
|
+
message: string;
|
|
248
|
+
}, {
|
|
249
|
+
message: string;
|
|
250
|
+
}>;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
name: "UnknownError";
|
|
253
|
+
data: {
|
|
254
|
+
message: string;
|
|
255
|
+
};
|
|
256
|
+
}, {
|
|
257
|
+
name: "UnknownError";
|
|
258
|
+
data: {
|
|
259
|
+
message: string;
|
|
260
|
+
};
|
|
261
|
+
}>;
|
|
262
|
+
toObject(): {
|
|
263
|
+
name: "UnknownError";
|
|
264
|
+
data: {
|
|
265
|
+
message: string;
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
message: string;
|
|
269
|
+
stack?: string;
|
|
270
|
+
cause?: unknown;
|
|
271
|
+
};
|
|
272
|
+
create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): /*elided*/ any;
|
|
273
|
+
readonly Unknown: /*elided*/ any;
|
|
274
|
+
isError(error: unknown): error is Error;
|
|
275
|
+
isError(value: unknown): value is Error;
|
|
276
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
277
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
278
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
279
|
+
stackTraceLimit: number;
|
|
280
|
+
};
|
|
281
|
+
isError(error: unknown): error is Error;
|
|
282
|
+
isError(value: unknown): value is Error;
|
|
283
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
284
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
285
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
286
|
+
stackTraceLimit: number;
|
|
287
|
+
};
|
|
288
|
+
readonly Unknown: {
|
|
289
|
+
new (data: {
|
|
290
|
+
message: string;
|
|
291
|
+
}, options?: ErrorOptions): {
|
|
292
|
+
readonly name: "UnknownError";
|
|
293
|
+
readonly data: {
|
|
294
|
+
message: string;
|
|
295
|
+
};
|
|
296
|
+
schema(): z.ZodObject<{
|
|
297
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
298
|
+
data: z.ZodObject<{
|
|
299
|
+
message: z.ZodString;
|
|
300
|
+
}, "strip", z.ZodTypeAny, {
|
|
301
|
+
message: string;
|
|
302
|
+
}, {
|
|
303
|
+
message: string;
|
|
304
|
+
}>;
|
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
|
306
|
+
name: "UnknownError";
|
|
307
|
+
data: {
|
|
308
|
+
message: string;
|
|
309
|
+
};
|
|
310
|
+
}, {
|
|
311
|
+
name: "UnknownError";
|
|
312
|
+
data: {
|
|
313
|
+
message: string;
|
|
314
|
+
};
|
|
315
|
+
}>;
|
|
316
|
+
toObject(): {
|
|
317
|
+
name: "UnknownError";
|
|
318
|
+
data: {
|
|
319
|
+
message: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
message: string;
|
|
323
|
+
stack?: string;
|
|
324
|
+
cause?: unknown;
|
|
325
|
+
};
|
|
326
|
+
readonly Schema: z.ZodObject<{
|
|
327
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
328
|
+
data: z.ZodObject<{
|
|
329
|
+
message: z.ZodString;
|
|
330
|
+
}, "strip", z.ZodTypeAny, {
|
|
331
|
+
message: string;
|
|
332
|
+
}, {
|
|
333
|
+
message: string;
|
|
334
|
+
}>;
|
|
335
|
+
}, "strip", z.ZodTypeAny, {
|
|
336
|
+
name: "UnknownError";
|
|
337
|
+
data: {
|
|
338
|
+
message: string;
|
|
339
|
+
};
|
|
340
|
+
}, {
|
|
341
|
+
name: "UnknownError";
|
|
342
|
+
data: {
|
|
343
|
+
message: string;
|
|
344
|
+
};
|
|
345
|
+
}>;
|
|
346
|
+
isInstance(input: any): input is {
|
|
347
|
+
readonly name: "UnknownError";
|
|
348
|
+
readonly data: {
|
|
349
|
+
message: string;
|
|
350
|
+
};
|
|
351
|
+
schema(): z.ZodObject<{
|
|
352
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
353
|
+
data: z.ZodObject<{
|
|
354
|
+
message: z.ZodString;
|
|
355
|
+
}, "strip", z.ZodTypeAny, {
|
|
356
|
+
message: string;
|
|
357
|
+
}, {
|
|
358
|
+
message: string;
|
|
359
|
+
}>;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
name: "UnknownError";
|
|
362
|
+
data: {
|
|
363
|
+
message: string;
|
|
364
|
+
};
|
|
365
|
+
}, {
|
|
366
|
+
name: "UnknownError";
|
|
367
|
+
data: {
|
|
368
|
+
message: string;
|
|
369
|
+
};
|
|
370
|
+
}>;
|
|
371
|
+
toObject(): {
|
|
372
|
+
name: "UnknownError";
|
|
373
|
+
data: {
|
|
374
|
+
message: string;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
message: string;
|
|
378
|
+
stack?: string;
|
|
379
|
+
cause?: unknown;
|
|
380
|
+
};
|
|
381
|
+
create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): {
|
|
382
|
+
new (data: z.input<Data>, options?: ErrorOptions): {
|
|
383
|
+
readonly name: Name;
|
|
384
|
+
readonly data: z.input<Data>;
|
|
385
|
+
schema(): z.ZodObject<{
|
|
386
|
+
name: z.ZodLiteral<Name>;
|
|
387
|
+
data: Data;
|
|
388
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
389
|
+
name: z.ZodLiteral<Name>;
|
|
390
|
+
data: Data;
|
|
391
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
392
|
+
name: z.ZodLiteral<Name>;
|
|
393
|
+
data: Data;
|
|
394
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
|
|
395
|
+
toObject(): {
|
|
396
|
+
name: Name;
|
|
397
|
+
data: z.input<Data>;
|
|
398
|
+
};
|
|
399
|
+
message: string;
|
|
400
|
+
stack?: string;
|
|
401
|
+
cause?: unknown;
|
|
402
|
+
};
|
|
403
|
+
readonly Schema: z.ZodObject<{
|
|
404
|
+
name: z.ZodLiteral<Name>;
|
|
405
|
+
data: Data;
|
|
406
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
407
|
+
name: z.ZodLiteral<Name>;
|
|
408
|
+
data: Data;
|
|
409
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
410
|
+
name: z.ZodLiteral<Name>;
|
|
411
|
+
data: Data;
|
|
412
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
|
|
413
|
+
isInstance(input: any): input is InstanceType</*elided*/ any>;
|
|
414
|
+
create<Name extends string, Data extends z.ZodType>(name: Name, data: Data): /*elided*/ any;
|
|
415
|
+
readonly Unknown: /*elided*/ any;
|
|
416
|
+
isError(error: unknown): error is Error;
|
|
417
|
+
isError(value: unknown): value is Error;
|
|
418
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
419
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
420
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
421
|
+
stackTraceLimit: number;
|
|
422
|
+
};
|
|
423
|
+
readonly Unknown: /*elided*/ any;
|
|
424
|
+
isError(error: unknown): error is Error;
|
|
425
|
+
isError(value: unknown): value is Error;
|
|
426
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
427
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
428
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
429
|
+
stackTraceLimit: number;
|
|
430
|
+
};
|
|
431
|
+
isError(error: unknown): error is Error;
|
|
432
|
+
isError(value: unknown): value is Error;
|
|
433
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
434
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
435
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
436
|
+
stackTraceLimit: number;
|
|
437
|
+
};
|
|
438
|
+
type LoadError = InstanceType<typeof LoadError>;
|
|
439
|
+
/**
|
|
440
|
+
* Load brand config from a JSONC file
|
|
441
|
+
*/
|
|
442
|
+
function loadFromFile(filepath: string, partial?: boolean): Promise<BrandConfig | BrandConfigOverride>;
|
|
443
|
+
/**
|
|
444
|
+
* Load brand config from repository root
|
|
445
|
+
*/
|
|
446
|
+
function loadRepoConfig(repoRoot?: string): Promise<BrandConfig>;
|
|
447
|
+
/**
|
|
448
|
+
* Load client-level brand override
|
|
449
|
+
*/
|
|
450
|
+
function loadClientConfig(configDir: string): Promise<BrandConfigOverride | null>;
|
|
451
|
+
/**
|
|
452
|
+
* Get default Porter brand configuration
|
|
453
|
+
*/
|
|
454
|
+
function getDefaultBrand(): BrandConfig;
|
|
455
|
+
/**
|
|
456
|
+
* Merge base brand config with client override
|
|
457
|
+
*/
|
|
458
|
+
function merge(base: BrandConfig, override: BrandConfigOverride | null): BrandConfig;
|
|
459
|
+
/**
|
|
460
|
+
* Save brand config to file
|
|
461
|
+
*/
|
|
462
|
+
function saveToFile(filepath: string, config: BrandConfig | BrandConfigOverride): Promise<void>;
|
|
463
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand-aware Rule Files
|
|
3
|
+
*
|
|
4
|
+
* Provides dynamic rule file names based on brand configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace BrandRules {
|
|
7
|
+
/**
|
|
8
|
+
* Get local rule files for the current brand
|
|
9
|
+
* Returns array with brand-specific rule file + standard files
|
|
10
|
+
*/
|
|
11
|
+
function getLocalRuleFiles(): Promise<string[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Get global rule files for the current brand
|
|
14
|
+
* Returns array with only the brand-specific rule file
|
|
15
|
+
*/
|
|
16
|
+
function getGlobalRuleFiles(): Promise<string[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Get local rule files synchronously (uses build-time config)
|
|
19
|
+
*/
|
|
20
|
+
function getLocalRuleFilesSync(): string[];
|
|
21
|
+
/**
|
|
22
|
+
* Get global rule files synchronously (uses build-time config)
|
|
23
|
+
*/
|
|
24
|
+
function getGlobalRuleFilesSync(): string[];
|
|
25
|
+
}
|