@defai.digital/ax-cli 1.0.1 → 1.1.3
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/.ax-cli/CUSTOM.md +97 -0
- package/.ax-cli/index.json +43 -0
- package/README.md +280 -55
- package/automatosx.config.json +333 -0
- package/dist/agent/context-manager.d.ts +76 -0
- package/dist/agent/context-manager.js +239 -0
- package/dist/agent/context-manager.js.map +1 -0
- package/dist/agent/grok-agent.d.ts +1 -0
- package/dist/agent/grok-agent.js +16 -0
- package/dist/agent/grok-agent.js.map +1 -1
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.js +106 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.js +173 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/schemas/api-schemas.d.ts +5 -554
- package/dist/schemas/api-schemas.js +3 -3
- package/dist/schemas/api-schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +20 -262
- package/dist/schemas/index.js +5 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/settings-schemas.d.ts +4 -153
- package/dist/schemas/settings-schemas.js +1 -3
- package/dist/schemas/settings-schemas.js.map +1 -1
- package/dist/schemas/tool-schemas.d.ts +6 -6
- package/dist/types/project-analysis.d.ts +76 -0
- package/dist/types/project-analysis.js +5 -0
- package/dist/types/project-analysis.js.map +1 -0
- package/dist/utils/instruction-generator.d.ts +21 -0
- package/dist/utils/instruction-generator.js +233 -0
- package/dist/utils/instruction-generator.js.map +1 -0
- package/dist/utils/project-analyzer.d.ts +24 -0
- package/dist/utils/project-analyzer.js +411 -0
- package/dist/utils/project-analyzer.js.map +1 -0
- package/dist/utils/version.d.ts +5 -0
- package/dist/utils/version.js +37 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +13 -2
- package/packages/schemas/README.md +388 -0
- package/packages/schemas/dist/index.d.ts +14 -0
- package/packages/schemas/dist/index.d.ts.map +1 -0
- package/packages/schemas/dist/index.js +19 -0
- package/packages/schemas/dist/index.js.map +1 -0
- package/packages/schemas/dist/public/core/brand-types.d.ts +308 -0
- package/packages/schemas/dist/public/core/brand-types.d.ts.map +1 -0
- package/packages/schemas/dist/public/core/brand-types.js +243 -0
- package/packages/schemas/dist/public/core/brand-types.js.map +1 -0
- package/packages/schemas/dist/public/core/enums.d.ts +227 -0
- package/packages/schemas/dist/public/core/enums.d.ts.map +1 -0
- package/packages/schemas/dist/public/core/enums.js +222 -0
- package/packages/schemas/dist/public/core/enums.js.map +1 -0
- package/packages/schemas/dist/public/core/id-types.d.ts +286 -0
- package/packages/schemas/dist/public/core/id-types.d.ts.map +1 -0
- package/packages/schemas/dist/public/core/id-types.js +136 -0
- package/packages/schemas/dist/public/core/id-types.js.map +1 -0
- package/packages/schemas/package.json +54 -0
- package/packages/schemas/vitest.config.ts +29 -0
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,115 +1,33 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { __brand } from '@ax-cli/schemas';
|
|
3
|
-
export { __brand };
|
|
4
2
|
/**
|
|
5
3
|
* Configuration schemas using Zod for runtime validation
|
|
6
4
|
*/
|
|
7
|
-
export declare const UserSettingsSchema: z.
|
|
8
|
-
apiKey
|
|
9
|
-
baseURL
|
|
10
|
-
defaultModel
|
|
11
|
-
models
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
apiKey?: string | undefined;
|
|
14
|
-
baseURL?: string | undefined;
|
|
15
|
-
defaultModel?: import("@ax-cli/schemas").Brand<string, "ModelId"> | undefined;
|
|
16
|
-
models?: import("@ax-cli/schemas").Brand<string, "ModelId">[] | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
apiKey?: string | undefined;
|
|
19
|
-
baseURL?: string | undefined;
|
|
20
|
-
defaultModel?: string | undefined;
|
|
21
|
-
models?: string[] | undefined;
|
|
5
|
+
export declare const UserSettingsSchema: z.ZodType<{
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
baseURL?: string;
|
|
8
|
+
defaultModel?: string;
|
|
9
|
+
models?: string[];
|
|
22
10
|
}>;
|
|
23
11
|
export type UserSettings = z.infer<typeof UserSettingsSchema>;
|
|
24
|
-
export declare const ProjectSettingsSchema: z.
|
|
25
|
-
model
|
|
26
|
-
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
27
|
-
name: z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "MCPServerId">, string>;
|
|
28
|
-
transport: z.ZodEnum<["stdio", "http", "sse"]>;
|
|
29
|
-
command: z.ZodOptional<z.ZodString>;
|
|
30
|
-
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
-
url: z.ZodOptional<z.ZodString>;
|
|
32
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
name: string & {
|
|
35
|
-
readonly [__brand]: "MCPServerId";
|
|
36
|
-
};
|
|
37
|
-
transport: "stdio" | "http" | "sse";
|
|
38
|
-
url?: string | undefined;
|
|
39
|
-
env?: Record<string, string> | undefined;
|
|
40
|
-
command?: string | undefined;
|
|
41
|
-
args?: string[] | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
name: string;
|
|
44
|
-
transport: "stdio" | "http" | "sse";
|
|
45
|
-
url?: string | undefined;
|
|
46
|
-
env?: Record<string, string> | undefined;
|
|
47
|
-
command?: string | undefined;
|
|
48
|
-
args?: string[] | undefined;
|
|
49
|
-
}>>>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
model?: import("@ax-cli/schemas").Brand<string, "ModelId"> | undefined;
|
|
52
|
-
mcpServers?: Record<string, {
|
|
53
|
-
name: string & {
|
|
54
|
-
readonly [__brand]: "MCPServerId";
|
|
55
|
-
};
|
|
56
|
-
transport: "stdio" | "http" | "sse";
|
|
57
|
-
url?: string | undefined;
|
|
58
|
-
env?: Record<string, string> | undefined;
|
|
59
|
-
command?: string | undefined;
|
|
60
|
-
args?: string[] | undefined;
|
|
61
|
-
}> | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
model?: string | undefined;
|
|
12
|
+
export declare const ProjectSettingsSchema: z.ZodType<{
|
|
13
|
+
model?: string;
|
|
64
14
|
mcpServers?: Record<string, {
|
|
65
15
|
name: string;
|
|
66
|
-
transport:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
16
|
+
transport: 'stdio' | 'http' | 'sse';
|
|
17
|
+
command?: string;
|
|
18
|
+
args?: string[];
|
|
19
|
+
url?: string;
|
|
20
|
+
env?: Record<string, string>;
|
|
21
|
+
}>;
|
|
72
22
|
}>;
|
|
73
23
|
export type ProjectSettings = z.infer<typeof ProjectSettingsSchema>;
|
|
74
|
-
export declare const MCPServerConfigSchema: z.
|
|
75
|
-
name: z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "MCPServerId">, string>;
|
|
76
|
-
transport: z.ZodEnum<["stdio", "http", "sse"]>;
|
|
77
|
-
command: z.ZodOptional<z.ZodString>;
|
|
78
|
-
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
79
|
-
url: z.ZodOptional<z.ZodString>;
|
|
80
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
name: string & {
|
|
83
|
-
readonly [__brand]: "MCPServerId";
|
|
84
|
-
};
|
|
85
|
-
transport: "stdio" | "http" | "sse";
|
|
86
|
-
url?: string | undefined;
|
|
87
|
-
env?: Record<string, string> | undefined;
|
|
88
|
-
command?: string | undefined;
|
|
89
|
-
args?: string[] | undefined;
|
|
90
|
-
}, {
|
|
91
|
-
name: string;
|
|
92
|
-
transport: "stdio" | "http" | "sse";
|
|
93
|
-
url?: string | undefined;
|
|
94
|
-
env?: Record<string, string> | undefined;
|
|
95
|
-
command?: string | undefined;
|
|
96
|
-
args?: string[] | undefined;
|
|
97
|
-
}>, {
|
|
98
|
-
name: string & {
|
|
99
|
-
readonly [__brand]: "MCPServerId";
|
|
100
|
-
};
|
|
101
|
-
transport: "stdio" | "http" | "sse";
|
|
102
|
-
url?: string | undefined;
|
|
103
|
-
env?: Record<string, string> | undefined;
|
|
104
|
-
command?: string | undefined;
|
|
105
|
-
args?: string[] | undefined;
|
|
106
|
-
}, {
|
|
24
|
+
export declare const MCPServerConfigSchema: z.ZodType<{
|
|
107
25
|
name: string;
|
|
108
|
-
transport:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
26
|
+
transport: 'stdio' | 'http' | 'sse';
|
|
27
|
+
command?: string;
|
|
28
|
+
args?: string[];
|
|
29
|
+
url?: string;
|
|
30
|
+
env?: Record<string, string>;
|
|
113
31
|
}>;
|
|
114
32
|
export type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;
|
|
115
33
|
export declare const ToolExecutionSchema: z.ZodObject<{
|
|
@@ -123,167 +41,7 @@ export declare const ToolExecutionSchema: z.ZodObject<{
|
|
|
123
41
|
arguments: Record<string, unknown>;
|
|
124
42
|
}>;
|
|
125
43
|
export type ToolExecution = z.infer<typeof ToolExecutionSchema>;
|
|
126
|
-
export declare const APIResponseSchema: z.
|
|
127
|
-
id: z.ZodString;
|
|
128
|
-
object: z.ZodString;
|
|
129
|
-
created: z.ZodNumber;
|
|
130
|
-
model: z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>;
|
|
131
|
-
choices: z.ZodArray<z.ZodObject<{
|
|
132
|
-
index: z.ZodNumber;
|
|
133
|
-
message: z.ZodObject<{
|
|
134
|
-
role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
|
|
135
|
-
content: z.ZodNullable<z.ZodString>;
|
|
136
|
-
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
137
|
-
id: z.ZodString;
|
|
138
|
-
type: z.ZodLiteral<"function">;
|
|
139
|
-
function: z.ZodObject<{
|
|
140
|
-
name: z.ZodString;
|
|
141
|
-
arguments: z.ZodString;
|
|
142
|
-
}, "strip", z.ZodTypeAny, {
|
|
143
|
-
name: string;
|
|
144
|
-
arguments: string;
|
|
145
|
-
}, {
|
|
146
|
-
name: string;
|
|
147
|
-
arguments: string;
|
|
148
|
-
}>;
|
|
149
|
-
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
function: {
|
|
151
|
-
name: string;
|
|
152
|
-
arguments: string;
|
|
153
|
-
};
|
|
154
|
-
id: string;
|
|
155
|
-
type: "function";
|
|
156
|
-
}, {
|
|
157
|
-
function: {
|
|
158
|
-
name: string;
|
|
159
|
-
arguments: string;
|
|
160
|
-
};
|
|
161
|
-
id: string;
|
|
162
|
-
type: "function";
|
|
163
|
-
}>, "many">>;
|
|
164
|
-
}, "strip", z.ZodTypeAny, {
|
|
165
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
166
|
-
content: string | null;
|
|
167
|
-
tool_calls?: {
|
|
168
|
-
function: {
|
|
169
|
-
name: string;
|
|
170
|
-
arguments: string;
|
|
171
|
-
};
|
|
172
|
-
id: string;
|
|
173
|
-
type: "function";
|
|
174
|
-
}[] | undefined;
|
|
175
|
-
}, {
|
|
176
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
177
|
-
content: string | null;
|
|
178
|
-
tool_calls?: {
|
|
179
|
-
function: {
|
|
180
|
-
name: string;
|
|
181
|
-
arguments: string;
|
|
182
|
-
};
|
|
183
|
-
id: string;
|
|
184
|
-
type: "function";
|
|
185
|
-
}[] | undefined;
|
|
186
|
-
}>;
|
|
187
|
-
finish_reason: z.ZodNullable<z.ZodEnum<["stop", "length", "tool_calls", "content_filter"]>>;
|
|
188
|
-
}, "strip", z.ZodTypeAny, {
|
|
189
|
-
message: {
|
|
190
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
191
|
-
content: string | null;
|
|
192
|
-
tool_calls?: {
|
|
193
|
-
function: {
|
|
194
|
-
name: string;
|
|
195
|
-
arguments: string;
|
|
196
|
-
};
|
|
197
|
-
id: string;
|
|
198
|
-
type: "function";
|
|
199
|
-
}[] | undefined;
|
|
200
|
-
};
|
|
201
|
-
index: number;
|
|
202
|
-
finish_reason: "length" | "tool_calls" | "stop" | "content_filter" | null;
|
|
203
|
-
}, {
|
|
204
|
-
message: {
|
|
205
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
206
|
-
content: string | null;
|
|
207
|
-
tool_calls?: {
|
|
208
|
-
function: {
|
|
209
|
-
name: string;
|
|
210
|
-
arguments: string;
|
|
211
|
-
};
|
|
212
|
-
id: string;
|
|
213
|
-
type: "function";
|
|
214
|
-
}[] | undefined;
|
|
215
|
-
};
|
|
216
|
-
index: number;
|
|
217
|
-
finish_reason: "length" | "tool_calls" | "stop" | "content_filter" | null;
|
|
218
|
-
}>, "many">;
|
|
219
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
220
|
-
prompt_tokens: z.ZodNumber;
|
|
221
|
-
completion_tokens: z.ZodNumber;
|
|
222
|
-
total_tokens: z.ZodNumber;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
prompt_tokens: number;
|
|
225
|
-
completion_tokens: number;
|
|
226
|
-
total_tokens: number;
|
|
227
|
-
}, {
|
|
228
|
-
prompt_tokens: number;
|
|
229
|
-
completion_tokens: number;
|
|
230
|
-
total_tokens: number;
|
|
231
|
-
}>>;
|
|
232
|
-
}, "strip", z.ZodTypeAny, {
|
|
233
|
-
object: string;
|
|
234
|
-
id: string;
|
|
235
|
-
created: number;
|
|
236
|
-
model: string & {
|
|
237
|
-
readonly [__brand]: "ModelId";
|
|
238
|
-
};
|
|
239
|
-
choices: {
|
|
240
|
-
message: {
|
|
241
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
242
|
-
content: string | null;
|
|
243
|
-
tool_calls?: {
|
|
244
|
-
function: {
|
|
245
|
-
name: string;
|
|
246
|
-
arguments: string;
|
|
247
|
-
};
|
|
248
|
-
id: string;
|
|
249
|
-
type: "function";
|
|
250
|
-
}[] | undefined;
|
|
251
|
-
};
|
|
252
|
-
index: number;
|
|
253
|
-
finish_reason: "length" | "tool_calls" | "stop" | "content_filter" | null;
|
|
254
|
-
}[];
|
|
255
|
-
usage?: {
|
|
256
|
-
prompt_tokens: number;
|
|
257
|
-
completion_tokens: number;
|
|
258
|
-
total_tokens: number;
|
|
259
|
-
} | undefined;
|
|
260
|
-
}, {
|
|
261
|
-
object: string;
|
|
262
|
-
id: string;
|
|
263
|
-
created: number;
|
|
264
|
-
model: string;
|
|
265
|
-
choices: {
|
|
266
|
-
message: {
|
|
267
|
-
role: "system" | "user" | "assistant" | "tool";
|
|
268
|
-
content: string | null;
|
|
269
|
-
tool_calls?: {
|
|
270
|
-
function: {
|
|
271
|
-
name: string;
|
|
272
|
-
arguments: string;
|
|
273
|
-
};
|
|
274
|
-
id: string;
|
|
275
|
-
type: "function";
|
|
276
|
-
}[] | undefined;
|
|
277
|
-
};
|
|
278
|
-
index: number;
|
|
279
|
-
finish_reason: "length" | "tool_calls" | "stop" | "content_filter" | null;
|
|
280
|
-
}[];
|
|
281
|
-
usage?: {
|
|
282
|
-
prompt_tokens: number;
|
|
283
|
-
completion_tokens: number;
|
|
284
|
-
total_tokens: number;
|
|
285
|
-
} | undefined;
|
|
286
|
-
}>;
|
|
44
|
+
export declare const APIResponseSchema: z.ZodType<any>;
|
|
287
45
|
export type APIResponse = z.infer<typeof APIResponseSchema>;
|
|
288
46
|
/**
|
|
289
47
|
* Validation helper functions
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
//
|
|
4
|
-
|
|
2
|
+
import { ModelIdSchema, MCPServerIdSchema } from '@ax-cli/schemas';
|
|
3
|
+
// Create local schemas that match the structure
|
|
4
|
+
const MessageRoleEnum = z.enum(['system', 'user', 'assistant', 'tool']);
|
|
5
|
+
const FinishReasonEnum = z.enum(['stop', 'length', 'tool_calls', 'content_filter']).nullable();
|
|
6
|
+
const TransportEnum = z.enum(['stdio', 'http', 'sse']);
|
|
5
7
|
/**
|
|
6
8
|
* Configuration schemas using Zod for runtime validation
|
|
7
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,gDAAgD;AAChD,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AACxE,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC/F,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAEvD;;GAEG;AAEH,uBAAuB;AACvB,MAAM,CAAC,MAAM,kBAAkB,GAK1B,CAAC,CAAC,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,aAAa,CAAC,QAAQ,EAAE;IACtC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AAU,2BAA2B,CAAC,IAAa;IAKvD,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACrD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -3,103 +3,9 @@
|
|
|
3
3
|
* Ensures graceful degradation on corrupted config files
|
|
4
4
|
*/
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export declare const
|
|
9
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
10
|
-
baseURL: z.ZodOptional<z.ZodString>;
|
|
11
|
-
defaultModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
12
|
-
currentModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
13
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
|
15
|
-
models: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>, "many">>;
|
|
16
|
-
confirmations: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
fileOperations: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
bashCommands: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
fileOperations?: boolean | undefined;
|
|
21
|
-
bashCommands?: boolean | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
fileOperations?: boolean | undefined;
|
|
24
|
-
bashCommands?: boolean | undefined;
|
|
25
|
-
}>>;
|
|
26
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
27
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
28
|
-
baseURL: z.ZodOptional<z.ZodString>;
|
|
29
|
-
defaultModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
30
|
-
currentModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
31
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
models: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>, "many">>;
|
|
34
|
-
confirmations: z.ZodOptional<z.ZodObject<{
|
|
35
|
-
fileOperations: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
-
bashCommands: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
fileOperations?: boolean | undefined;
|
|
39
|
-
bashCommands?: boolean | undefined;
|
|
40
|
-
}, {
|
|
41
|
-
fileOperations?: boolean | undefined;
|
|
42
|
-
bashCommands?: boolean | undefined;
|
|
43
|
-
}>>;
|
|
44
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
45
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
|
46
|
-
baseURL: z.ZodOptional<z.ZodString>;
|
|
47
|
-
defaultModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
48
|
-
currentModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
49
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
models: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>, "many">>;
|
|
52
|
-
confirmations: z.ZodOptional<z.ZodObject<{
|
|
53
|
-
fileOperations: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
-
bashCommands: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
-
}, "strip", z.ZodTypeAny, {
|
|
56
|
-
fileOperations?: boolean | undefined;
|
|
57
|
-
bashCommands?: boolean | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
fileOperations?: boolean | undefined;
|
|
60
|
-
bashCommands?: boolean | undefined;
|
|
61
|
-
}>>;
|
|
62
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
63
|
-
export declare const ProjectSettingsSchema: z.ZodObject<{
|
|
64
|
-
name: z.ZodOptional<z.ZodString>;
|
|
65
|
-
model: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
66
|
-
currentModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
67
|
-
customInstructions: z.ZodOptional<z.ZodString>;
|
|
68
|
-
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
69
|
-
includePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
70
|
-
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
71
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
72
|
-
name: z.ZodOptional<z.ZodString>;
|
|
73
|
-
model: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
74
|
-
currentModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
75
|
-
customInstructions: z.ZodOptional<z.ZodString>;
|
|
76
|
-
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
77
|
-
includePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
78
|
-
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
79
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
80
|
-
name: z.ZodOptional<z.ZodString>;
|
|
81
|
-
model: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
82
|
-
currentModel: z.ZodOptional<z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>>;
|
|
83
|
-
customInstructions: z.ZodOptional<z.ZodString>;
|
|
84
|
-
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
85
|
-
includePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
86
|
-
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
87
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
88
|
-
export declare const ModelOptionSchema: z.ZodObject<{
|
|
89
|
-
model: z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "ModelId">, string>;
|
|
90
|
-
description: z.ZodOptional<z.ZodString>;
|
|
91
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
model: string & {
|
|
94
|
-
readonly [__brand]: "ModelId";
|
|
95
|
-
};
|
|
96
|
-
maxTokens?: number | undefined;
|
|
97
|
-
description?: string | undefined;
|
|
98
|
-
}, {
|
|
99
|
-
model: string;
|
|
100
|
-
maxTokens?: number | undefined;
|
|
101
|
-
description?: string | undefined;
|
|
102
|
-
}>;
|
|
6
|
+
export declare const UserSettingsSchema: z.ZodType<any>;
|
|
7
|
+
export declare const ProjectSettingsSchema: z.ZodType<any>;
|
|
8
|
+
export declare const ModelOptionSchema: z.ZodType<any>;
|
|
103
9
|
export declare const MCPTransportConfigSchema: z.ZodObject<{
|
|
104
10
|
type: z.ZodEnum<["stdio", "http", "sse", "streamable_http"]>;
|
|
105
11
|
command: z.ZodOptional<z.ZodString>;
|
|
@@ -122,62 +28,7 @@ export declare const MCPTransportConfigSchema: z.ZodObject<{
|
|
|
122
28
|
command?: string | undefined;
|
|
123
29
|
args?: string[] | undefined;
|
|
124
30
|
}>;
|
|
125
|
-
export declare const MCPServerConfigSchema: z.
|
|
126
|
-
name: z.ZodEffects<z.ZodString, import("@ax-cli/schemas").Brand<string, "MCPServerId">, string>;
|
|
127
|
-
transport: z.ZodObject<{
|
|
128
|
-
type: z.ZodEnum<["stdio", "http", "sse", "streamable_http"]>;
|
|
129
|
-
command: z.ZodOptional<z.ZodString>;
|
|
130
|
-
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
131
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
132
|
-
url: z.ZodOptional<z.ZodString>;
|
|
133
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
134
|
-
}, "strip", z.ZodTypeAny, {
|
|
135
|
-
type: "stdio" | "http" | "sse" | "streamable_http";
|
|
136
|
-
headers?: Record<string, string> | undefined;
|
|
137
|
-
url?: string | undefined;
|
|
138
|
-
env?: Record<string, string> | undefined;
|
|
139
|
-
command?: string | undefined;
|
|
140
|
-
args?: string[] | undefined;
|
|
141
|
-
}, {
|
|
142
|
-
type: "stdio" | "http" | "sse" | "streamable_http";
|
|
143
|
-
headers?: Record<string, string> | undefined;
|
|
144
|
-
url?: string | undefined;
|
|
145
|
-
env?: Record<string, string> | undefined;
|
|
146
|
-
command?: string | undefined;
|
|
147
|
-
args?: string[] | undefined;
|
|
148
|
-
}>;
|
|
149
|
-
command: z.ZodOptional<z.ZodString>;
|
|
150
|
-
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
151
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
152
|
-
}, "strip", z.ZodTypeAny, {
|
|
153
|
-
name: string & {
|
|
154
|
-
readonly [__brand]: "MCPServerId";
|
|
155
|
-
};
|
|
156
|
-
transport: {
|
|
157
|
-
type: "stdio" | "http" | "sse" | "streamable_http";
|
|
158
|
-
headers?: Record<string, string> | undefined;
|
|
159
|
-
url?: string | undefined;
|
|
160
|
-
env?: Record<string, string> | undefined;
|
|
161
|
-
command?: string | undefined;
|
|
162
|
-
args?: string[] | undefined;
|
|
163
|
-
};
|
|
164
|
-
env?: Record<string, string> | undefined;
|
|
165
|
-
command?: string | undefined;
|
|
166
|
-
args?: string[] | undefined;
|
|
167
|
-
}, {
|
|
168
|
-
name: string;
|
|
169
|
-
transport: {
|
|
170
|
-
type: "stdio" | "http" | "sse" | "streamable_http";
|
|
171
|
-
headers?: Record<string, string> | undefined;
|
|
172
|
-
url?: string | undefined;
|
|
173
|
-
env?: Record<string, string> | undefined;
|
|
174
|
-
command?: string | undefined;
|
|
175
|
-
args?: string[] | undefined;
|
|
176
|
-
};
|
|
177
|
-
env?: Record<string, string> | undefined;
|
|
178
|
-
command?: string | undefined;
|
|
179
|
-
args?: string[] | undefined;
|
|
180
|
-
}>;
|
|
31
|
+
export declare const MCPServerConfigSchema: z.ZodType<any>;
|
|
181
32
|
export type UserSettings = z.infer<typeof UserSettingsSchema>;
|
|
182
33
|
export type ProjectSettings = z.infer<typeof ProjectSettingsSchema>;
|
|
183
34
|
export type ModelOption = z.infer<typeof ModelOptionSchema>;
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* Ensures graceful degradation on corrupted config files
|
|
4
4
|
*/
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
import {
|
|
7
|
-
// Re-export __brand to satisfy TypeScript's type resolution
|
|
8
|
-
export { __brand };
|
|
6
|
+
import { ModelIdSchema, MCPServerIdSchema } from '@ax-cli/schemas';
|
|
9
7
|
// User Settings Schema
|
|
10
8
|
export const UserSettingsSchema = z.object({
|
|
11
9
|
apiKey: z.string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-schemas.js","sourceRoot":"","sources":["../../src/schemas/settings-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"settings-schemas.js","sourceRoot":"","sources":["../../src/schemas/settings-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,uBAAuB;AACvB,MAAM,CAAC,MAAM,kBAAkB,GAAmB,CAAC,CAAC,MAAM,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,oCAAoC;IACpE,YAAY,EAAE,aAAa,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,aAAa,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;QACtB,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACtC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC,QAAQ,EAAE;CACd,CAAC,CAAC,WAAW,EA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AAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAmB,CAAC,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,iBAAiB;IACvB,SAAS,EAAE,wBAAwB;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,iBAAiB;IACjD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,iBAAiB;IACvD,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,iBAAiB;CACxD,CAAC,CAAC"}
|
|
@@ -142,13 +142,13 @@ export declare const TodoItemSchema: z.ZodObject<{
|
|
|
142
142
|
status: z.ZodEnum<["pending", "in_progress", "completed"]>;
|
|
143
143
|
priority: z.ZodEnum<["high", "medium", "low"]>;
|
|
144
144
|
}, "strip", z.ZodTypeAny, {
|
|
145
|
-
id: string;
|
|
146
145
|
status: "pending" | "in_progress" | "completed";
|
|
146
|
+
id: string;
|
|
147
147
|
content: string;
|
|
148
148
|
priority: "high" | "medium" | "low";
|
|
149
149
|
}, {
|
|
150
|
-
id: string;
|
|
151
150
|
status: "pending" | "in_progress" | "completed";
|
|
151
|
+
id: string;
|
|
152
152
|
content: string;
|
|
153
153
|
priority: "high" | "medium" | "low";
|
|
154
154
|
}>;
|
|
@@ -159,27 +159,27 @@ export declare const CreateTodoListSchema: z.ZodObject<{
|
|
|
159
159
|
status: z.ZodEnum<["pending", "in_progress", "completed"]>;
|
|
160
160
|
priority: z.ZodEnum<["high", "medium", "low"]>;
|
|
161
161
|
}, "strip", z.ZodTypeAny, {
|
|
162
|
-
id: string;
|
|
163
162
|
status: "pending" | "in_progress" | "completed";
|
|
163
|
+
id: string;
|
|
164
164
|
content: string;
|
|
165
165
|
priority: "high" | "medium" | "low";
|
|
166
166
|
}, {
|
|
167
|
-
id: string;
|
|
168
167
|
status: "pending" | "in_progress" | "completed";
|
|
168
|
+
id: string;
|
|
169
169
|
content: string;
|
|
170
170
|
priority: "high" | "medium" | "low";
|
|
171
171
|
}>, "many">;
|
|
172
172
|
}, "strip", z.ZodTypeAny, {
|
|
173
173
|
todos: {
|
|
174
|
-
id: string;
|
|
175
174
|
status: "pending" | "in_progress" | "completed";
|
|
175
|
+
id: string;
|
|
176
176
|
content: string;
|
|
177
177
|
priority: "high" | "medium" | "low";
|
|
178
178
|
}[];
|
|
179
179
|
}, {
|
|
180
180
|
todos: {
|
|
181
|
-
id: string;
|
|
182
181
|
status: "pending" | "in_progress" | "completed";
|
|
182
|
+
id: string;
|
|
183
183
|
content: string;
|
|
184
184
|
priority: "high" | "medium" | "low";
|
|
185
185
|
}[];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for project analysis and initialization
|
|
3
|
+
*/
|
|
4
|
+
export interface ProjectInfo {
|
|
5
|
+
/** Project name from package.json or directory name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Project version */
|
|
8
|
+
version?: string;
|
|
9
|
+
/** Primary programming language */
|
|
10
|
+
primaryLanguage: string;
|
|
11
|
+
/** Detected tech stack */
|
|
12
|
+
techStack: string[];
|
|
13
|
+
/** Project type (e.g., 'cli', 'web-app', 'library', 'api') */
|
|
14
|
+
projectType: string;
|
|
15
|
+
/** Main entry point file */
|
|
16
|
+
entryPoint?: string;
|
|
17
|
+
/** Key directories */
|
|
18
|
+
directories: {
|
|
19
|
+
source?: string;
|
|
20
|
+
tests?: string;
|
|
21
|
+
config?: string;
|
|
22
|
+
tools?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Key files and their purposes */
|
|
25
|
+
keyFiles: Record<string, string>;
|
|
26
|
+
/** Detected code conventions */
|
|
27
|
+
conventions: CodeConventions;
|
|
28
|
+
/** Build and test scripts */
|
|
29
|
+
scripts: {
|
|
30
|
+
build?: string;
|
|
31
|
+
test?: string;
|
|
32
|
+
lint?: string;
|
|
33
|
+
dev?: string;
|
|
34
|
+
};
|
|
35
|
+
/** Package manager (npm, yarn, pnpm, bun) */
|
|
36
|
+
packageManager?: string;
|
|
37
|
+
/** Last analysis timestamp */
|
|
38
|
+
lastAnalyzed: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CodeConventions {
|
|
41
|
+
/** Module system (commonjs, esm) */
|
|
42
|
+
moduleSystem?: string;
|
|
43
|
+
/** Import file extension requirement */
|
|
44
|
+
importExtension?: string;
|
|
45
|
+
/** Testing framework */
|
|
46
|
+
testFramework?: string;
|
|
47
|
+
/** Linting tool */
|
|
48
|
+
linter?: string;
|
|
49
|
+
/** Type checking */
|
|
50
|
+
typeChecker?: string;
|
|
51
|
+
/** Validation library */
|
|
52
|
+
validation?: string;
|
|
53
|
+
/** Code style preferences */
|
|
54
|
+
style?: {
|
|
55
|
+
semicolons?: boolean;
|
|
56
|
+
quotes?: 'single' | 'double';
|
|
57
|
+
indentation?: 'tabs' | 'spaces';
|
|
58
|
+
indentSize?: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface InitOptions {
|
|
62
|
+
/** Force regeneration even if files exist */
|
|
63
|
+
force?: boolean;
|
|
64
|
+
/** Output format for generated instructions */
|
|
65
|
+
format?: 'markdown' | 'text';
|
|
66
|
+
/** Verbose output */
|
|
67
|
+
verbose?: boolean;
|
|
68
|
+
/** Skip specific analysis steps */
|
|
69
|
+
skip?: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface AnalysisResult {
|
|
72
|
+
success: boolean;
|
|
73
|
+
projectInfo?: ProjectInfo;
|
|
74
|
+
error?: string;
|
|
75
|
+
warnings?: string[];
|
|
76
|
+
}
|