@crewx/sdk 0.9.0-rc.227 → 0.9.0-rc.229
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/dist/app-sync/index.js +23 -23
- package/dist/config/canonicalize-agent-options.d.ts +11 -0
- package/dist/config/models.generated.d.ts +2 -2
- package/dist/esm/app-sync/index.js +23 -23
- package/dist/esm/index.js +291 -291
- package/dist/esm/plugins/index.js +44 -44
- package/dist/esm/repository/index.js +72 -72
- package/dist/index.browser.js +3 -3
- package/dist/index.d.ts +6 -4
- package/dist/index.js +283 -283
- package/dist/plugins/index.js +44 -44
- package/dist/provider/cli/adapters/claude-task-events.d.ts +48 -0
- package/dist/repository/index.js +72 -72
- package/dist/route/index.d.ts +2 -2
- package/dist/route/types.d.ts +115 -0
- package/dist/task-log/claude-background-task.d.ts +30 -0
- package/dist/types/index.d.ts +40 -0
- package/package.json +1 -1
package/dist/route/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { RouteConfigSchema, RouteModelConfigSchema, RouteCandidateConfigSchema, RouteLinkConfigSchema, } from './types.js';
|
|
2
|
-
export type { JsonPrimitive, JsonValue, RouteBlockedCause, RouteModel, RouteModelConfig, RouteCandidate, RouteCandidateConfig, RouteConfig, RouteContext, RouteDecision, RouteFunction, RouteHealth, RouteLinkConfig, RouteLinkError, RouteMode, RouteOutput, RoutePassOutput, RouteQuotaObservation, RouteRequest, RouteRunner, RouteSelectOutput, } from './types.js';
|
|
1
|
+
export { RouteConfigSchema, RouteModelConfigSchema, RouteModelModeSchema, RouteCandidateConfigSchema, RouteLinkConfigSchema, } from './types.js';
|
|
2
|
+
export type { JsonPrimitive, JsonValue, RouteBlockedCause, RouteModel, RouteModelConfig, RouteModelMode, RouteCandidate, RouteCandidateConfig, RouteConfig, RouteContext, RouteDecision, RouteFunction, RouteHealth, RouteLinkConfig, RouteLinkError, RouteMode, RouteOutput, RoutePassOutput, RouteQuotaObservation, RouteRequest, RouteRunner, RouteSelectOutput, } from './types.js';
|
|
3
3
|
export { RouteError, RouteRunnerError } from './errors.js';
|
|
4
4
|
export type { RouteErrorCode, RouteRunnerErrorCode } from './errors.js';
|
|
5
5
|
export { builtInStrategy, roundRobin, smoothWeighted } from './strategies.js';
|
package/dist/route/types.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const RouteModelModeSchema: z.ZodObject<{
|
|
3
|
+
query: z.ZodString;
|
|
4
|
+
execute: z.ZodString;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
query: string;
|
|
7
|
+
execute: string;
|
|
8
|
+
}, {
|
|
9
|
+
query: string;
|
|
10
|
+
execute: string;
|
|
11
|
+
}>;
|
|
2
12
|
export declare const RouteModelConfigSchema: z.ZodObject<{
|
|
3
13
|
id: z.ZodString;
|
|
4
14
|
provider: z.ZodString;
|
|
@@ -6,17 +16,35 @@ export declare const RouteModelConfigSchema: z.ZodObject<{
|
|
|
6
16
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
7
17
|
account: z.ZodOptional<z.ZodString>;
|
|
8
18
|
effort: z.ZodOptional<z.ZodString>;
|
|
19
|
+
mode: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
query: z.ZodString;
|
|
21
|
+
execute: z.ZodString;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
query: string;
|
|
24
|
+
execute: string;
|
|
25
|
+
}, {
|
|
26
|
+
query: string;
|
|
27
|
+
execute: string;
|
|
28
|
+
}>>;
|
|
9
29
|
}, "strict", z.ZodTypeAny, {
|
|
10
30
|
id: string;
|
|
11
31
|
model: string;
|
|
12
32
|
provider: string;
|
|
13
33
|
weight: number;
|
|
34
|
+
mode?: {
|
|
35
|
+
query: string;
|
|
36
|
+
execute: string;
|
|
37
|
+
} | undefined;
|
|
14
38
|
effort?: string | undefined;
|
|
15
39
|
account?: string | undefined;
|
|
16
40
|
}, {
|
|
17
41
|
id: string;
|
|
18
42
|
model: string;
|
|
19
43
|
provider: string;
|
|
44
|
+
mode?: {
|
|
45
|
+
query: string;
|
|
46
|
+
execute: string;
|
|
47
|
+
} | undefined;
|
|
20
48
|
effort?: string | undefined;
|
|
21
49
|
weight?: number | undefined;
|
|
22
50
|
account?: string | undefined;
|
|
@@ -28,17 +56,35 @@ export declare const RouteCandidateConfigSchema: z.ZodObject<{
|
|
|
28
56
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
29
57
|
account: z.ZodOptional<z.ZodString>;
|
|
30
58
|
effort: z.ZodOptional<z.ZodString>;
|
|
59
|
+
mode: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
query: z.ZodString;
|
|
61
|
+
execute: z.ZodString;
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
|
+
query: string;
|
|
64
|
+
execute: string;
|
|
65
|
+
}, {
|
|
66
|
+
query: string;
|
|
67
|
+
execute: string;
|
|
68
|
+
}>>;
|
|
31
69
|
}, "strict", z.ZodTypeAny, {
|
|
32
70
|
id: string;
|
|
33
71
|
model: string;
|
|
34
72
|
provider: string;
|
|
35
73
|
weight: number;
|
|
74
|
+
mode?: {
|
|
75
|
+
query: string;
|
|
76
|
+
execute: string;
|
|
77
|
+
} | undefined;
|
|
36
78
|
effort?: string | undefined;
|
|
37
79
|
account?: string | undefined;
|
|
38
80
|
}, {
|
|
39
81
|
id: string;
|
|
40
82
|
model: string;
|
|
41
83
|
provider: string;
|
|
84
|
+
mode?: {
|
|
85
|
+
query: string;
|
|
86
|
+
execute: string;
|
|
87
|
+
} | undefined;
|
|
42
88
|
effort?: string | undefined;
|
|
43
89
|
weight?: number | undefined;
|
|
44
90
|
account?: string | undefined;
|
|
@@ -73,17 +119,35 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
73
119
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
74
120
|
account: z.ZodOptional<z.ZodString>;
|
|
75
121
|
effort: z.ZodOptional<z.ZodString>;
|
|
122
|
+
mode: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
query: z.ZodString;
|
|
124
|
+
execute: z.ZodString;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
query: string;
|
|
127
|
+
execute: string;
|
|
128
|
+
}, {
|
|
129
|
+
query: string;
|
|
130
|
+
execute: string;
|
|
131
|
+
}>>;
|
|
76
132
|
}, "strict", z.ZodTypeAny, {
|
|
77
133
|
id: string;
|
|
78
134
|
model: string;
|
|
79
135
|
provider: string;
|
|
80
136
|
weight: number;
|
|
137
|
+
mode?: {
|
|
138
|
+
query: string;
|
|
139
|
+
execute: string;
|
|
140
|
+
} | undefined;
|
|
81
141
|
effort?: string | undefined;
|
|
82
142
|
account?: string | undefined;
|
|
83
143
|
}, {
|
|
84
144
|
id: string;
|
|
85
145
|
model: string;
|
|
86
146
|
provider: string;
|
|
147
|
+
mode?: {
|
|
148
|
+
query: string;
|
|
149
|
+
execute: string;
|
|
150
|
+
} | undefined;
|
|
87
151
|
effort?: string | undefined;
|
|
88
152
|
weight?: number | undefined;
|
|
89
153
|
account?: string | undefined;
|
|
@@ -95,17 +159,35 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
95
159
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
96
160
|
account: z.ZodOptional<z.ZodString>;
|
|
97
161
|
effort: z.ZodOptional<z.ZodString>;
|
|
162
|
+
mode: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
query: z.ZodString;
|
|
164
|
+
execute: z.ZodString;
|
|
165
|
+
}, "strict", z.ZodTypeAny, {
|
|
166
|
+
query: string;
|
|
167
|
+
execute: string;
|
|
168
|
+
}, {
|
|
169
|
+
query: string;
|
|
170
|
+
execute: string;
|
|
171
|
+
}>>;
|
|
98
172
|
}, "strict", z.ZodTypeAny, {
|
|
99
173
|
id: string;
|
|
100
174
|
model: string;
|
|
101
175
|
provider: string;
|
|
102
176
|
weight: number;
|
|
177
|
+
mode?: {
|
|
178
|
+
query: string;
|
|
179
|
+
execute: string;
|
|
180
|
+
} | undefined;
|
|
103
181
|
effort?: string | undefined;
|
|
104
182
|
account?: string | undefined;
|
|
105
183
|
}, {
|
|
106
184
|
id: string;
|
|
107
185
|
model: string;
|
|
108
186
|
provider: string;
|
|
187
|
+
mode?: {
|
|
188
|
+
query: string;
|
|
189
|
+
execute: string;
|
|
190
|
+
} | undefined;
|
|
109
191
|
effort?: string | undefined;
|
|
110
192
|
weight?: number | undefined;
|
|
111
193
|
account?: string | undefined;
|
|
@@ -122,6 +204,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
122
204
|
model: string;
|
|
123
205
|
provider: string;
|
|
124
206
|
weight: number;
|
|
207
|
+
mode?: {
|
|
208
|
+
query: string;
|
|
209
|
+
execute: string;
|
|
210
|
+
} | undefined;
|
|
125
211
|
effort?: string | undefined;
|
|
126
212
|
account?: string | undefined;
|
|
127
213
|
}[] | undefined;
|
|
@@ -134,6 +220,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
134
220
|
model: string;
|
|
135
221
|
provider: string;
|
|
136
222
|
weight: number;
|
|
223
|
+
mode?: {
|
|
224
|
+
query: string;
|
|
225
|
+
execute: string;
|
|
226
|
+
} | undefined;
|
|
137
227
|
effort?: string | undefined;
|
|
138
228
|
account?: string | undefined;
|
|
139
229
|
}[] | undefined;
|
|
@@ -146,6 +236,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
146
236
|
id: string;
|
|
147
237
|
model: string;
|
|
148
238
|
provider: string;
|
|
239
|
+
mode?: {
|
|
240
|
+
query: string;
|
|
241
|
+
execute: string;
|
|
242
|
+
} | undefined;
|
|
149
243
|
effort?: string | undefined;
|
|
150
244
|
weight?: number | undefined;
|
|
151
245
|
account?: string | undefined;
|
|
@@ -158,6 +252,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
158
252
|
id: string;
|
|
159
253
|
model: string;
|
|
160
254
|
provider: string;
|
|
255
|
+
mode?: {
|
|
256
|
+
query: string;
|
|
257
|
+
execute: string;
|
|
258
|
+
} | undefined;
|
|
161
259
|
effort?: string | undefined;
|
|
162
260
|
weight?: number | undefined;
|
|
163
261
|
account?: string | undefined;
|
|
@@ -174,6 +272,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
174
272
|
model: string;
|
|
175
273
|
provider: string;
|
|
176
274
|
weight: number;
|
|
275
|
+
mode?: {
|
|
276
|
+
query: string;
|
|
277
|
+
execute: string;
|
|
278
|
+
} | undefined;
|
|
177
279
|
effort?: string | undefined;
|
|
178
280
|
account?: string | undefined;
|
|
179
281
|
}[] | undefined;
|
|
@@ -186,6 +288,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
186
288
|
model: string;
|
|
187
289
|
provider: string;
|
|
188
290
|
weight: number;
|
|
291
|
+
mode?: {
|
|
292
|
+
query: string;
|
|
293
|
+
execute: string;
|
|
294
|
+
} | undefined;
|
|
189
295
|
effort?: string | undefined;
|
|
190
296
|
account?: string | undefined;
|
|
191
297
|
}[] | undefined;
|
|
@@ -198,6 +304,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
198
304
|
id: string;
|
|
199
305
|
model: string;
|
|
200
306
|
provider: string;
|
|
307
|
+
mode?: {
|
|
308
|
+
query: string;
|
|
309
|
+
execute: string;
|
|
310
|
+
} | undefined;
|
|
201
311
|
effort?: string | undefined;
|
|
202
312
|
weight?: number | undefined;
|
|
203
313
|
account?: string | undefined;
|
|
@@ -210,6 +320,10 @@ declare const RouteConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
210
320
|
id: string;
|
|
211
321
|
model: string;
|
|
212
322
|
provider: string;
|
|
323
|
+
mode?: {
|
|
324
|
+
query: string;
|
|
325
|
+
execute: string;
|
|
326
|
+
} | undefined;
|
|
213
327
|
effort?: string | undefined;
|
|
214
328
|
weight?: number | undefined;
|
|
215
329
|
account?: string | undefined;
|
|
@@ -233,6 +347,7 @@ type ParsedRouteConfig = RouteConfig & {
|
|
|
233
347
|
};
|
|
234
348
|
export declare const RouteConfigSchema: z.ZodType<ParsedRouteConfig, z.ZodTypeDef, z.input<typeof RouteConfigInputSchema>>;
|
|
235
349
|
export type RouteModelConfig = z.infer<typeof RouteModelConfigSchema>;
|
|
350
|
+
export type RouteModelMode = z.infer<typeof RouteModelModeSchema>;
|
|
236
351
|
export type RouteCandidateConfig = RouteModelConfig;
|
|
237
352
|
export type RouteLinkConfig = z.infer<typeof RouteLinkConfigSchema>;
|
|
238
353
|
export type JsonPrimitive = string | number | boolean | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type ClaudeBackgroundTaskStatus = 'running' | 'completed' | 'failed' | 'stopped';
|
|
2
|
+
export interface ClaudeBackgroundTask {
|
|
3
|
+
providerTaskId: string;
|
|
4
|
+
parentToolUseId?: string;
|
|
5
|
+
taskType: 'local_bash' | 'local_agent' | 'unknown';
|
|
6
|
+
label?: string;
|
|
7
|
+
status: ClaudeBackgroundTaskStatus;
|
|
8
|
+
endedWithTurn: boolean;
|
|
9
|
+
exitCode?: number;
|
|
10
|
+
backgrounded: boolean;
|
|
11
|
+
startedAt?: string;
|
|
12
|
+
endedAt?: string;
|
|
13
|
+
elapsedMs?: number;
|
|
14
|
+
lastToolName?: string;
|
|
15
|
+
toolUses?: number;
|
|
16
|
+
totalTokens?: number;
|
|
17
|
+
firstSeq: number;
|
|
18
|
+
lastSeq: number;
|
|
19
|
+
rawSeqs: number[];
|
|
20
|
+
}
|
|
21
|
+
export interface FoldClaudeBackgroundTasksResult {
|
|
22
|
+
tasks: ClaudeBackgroundTask[];
|
|
23
|
+
consumedSeqs: Set<number>;
|
|
24
|
+
}
|
|
25
|
+
export interface ClaudeBackgroundTaskLogRow {
|
|
26
|
+
seq: number;
|
|
27
|
+
timestamp: string;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function foldClaudeBackgroundTasks(rows: ReadonlyArray<ClaudeBackgroundTaskLogRow>): FoldClaudeBackgroundTasksResult;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1460,6 +1460,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1460
1460
|
id: string;
|
|
1461
1461
|
model: string;
|
|
1462
1462
|
provider: string;
|
|
1463
|
+
mode?: {
|
|
1464
|
+
query: string;
|
|
1465
|
+
execute: string;
|
|
1466
|
+
} | undefined;
|
|
1463
1467
|
effort?: string | undefined;
|
|
1464
1468
|
weight?: number | undefined;
|
|
1465
1469
|
account?: string | undefined;
|
|
@@ -1472,6 +1476,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1472
1476
|
id: string;
|
|
1473
1477
|
model: string;
|
|
1474
1478
|
provider: string;
|
|
1479
|
+
mode?: {
|
|
1480
|
+
query: string;
|
|
1481
|
+
execute: string;
|
|
1482
|
+
} | undefined;
|
|
1475
1483
|
effort?: string | undefined;
|
|
1476
1484
|
weight?: number | undefined;
|
|
1477
1485
|
account?: string | undefined;
|
|
@@ -2162,6 +2170,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2162
2170
|
id: string;
|
|
2163
2171
|
model: string;
|
|
2164
2172
|
provider: string;
|
|
2173
|
+
mode?: {
|
|
2174
|
+
query: string;
|
|
2175
|
+
execute: string;
|
|
2176
|
+
} | undefined;
|
|
2165
2177
|
effort?: string | undefined;
|
|
2166
2178
|
weight?: number | undefined;
|
|
2167
2179
|
account?: string | undefined;
|
|
@@ -2174,6 +2186,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2174
2186
|
id: string;
|
|
2175
2187
|
model: string;
|
|
2176
2188
|
provider: string;
|
|
2189
|
+
mode?: {
|
|
2190
|
+
query: string;
|
|
2191
|
+
execute: string;
|
|
2192
|
+
} | undefined;
|
|
2177
2193
|
effort?: string | undefined;
|
|
2178
2194
|
weight?: number | undefined;
|
|
2179
2195
|
account?: string | undefined;
|
|
@@ -2864,6 +2880,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2864
2880
|
id: string;
|
|
2865
2881
|
model: string;
|
|
2866
2882
|
provider: string;
|
|
2883
|
+
mode?: {
|
|
2884
|
+
query: string;
|
|
2885
|
+
execute: string;
|
|
2886
|
+
} | undefined;
|
|
2867
2887
|
effort?: string | undefined;
|
|
2868
2888
|
weight?: number | undefined;
|
|
2869
2889
|
account?: string | undefined;
|
|
@@ -2876,6 +2896,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2876
2896
|
id: string;
|
|
2877
2897
|
model: string;
|
|
2878
2898
|
provider: string;
|
|
2899
|
+
mode?: {
|
|
2900
|
+
query: string;
|
|
2901
|
+
execute: string;
|
|
2902
|
+
} | undefined;
|
|
2879
2903
|
effort?: string | undefined;
|
|
2880
2904
|
weight?: number | undefined;
|
|
2881
2905
|
account?: string | undefined;
|
|
@@ -3566,6 +3590,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3566
3590
|
id: string;
|
|
3567
3591
|
model: string;
|
|
3568
3592
|
provider: string;
|
|
3593
|
+
mode?: {
|
|
3594
|
+
query: string;
|
|
3595
|
+
execute: string;
|
|
3596
|
+
} | undefined;
|
|
3569
3597
|
effort?: string | undefined;
|
|
3570
3598
|
weight?: number | undefined;
|
|
3571
3599
|
account?: string | undefined;
|
|
@@ -3578,6 +3606,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3578
3606
|
id: string;
|
|
3579
3607
|
model: string;
|
|
3580
3608
|
provider: string;
|
|
3609
|
+
mode?: {
|
|
3610
|
+
query: string;
|
|
3611
|
+
execute: string;
|
|
3612
|
+
} | undefined;
|
|
3581
3613
|
effort?: string | undefined;
|
|
3582
3614
|
weight?: number | undefined;
|
|
3583
3615
|
account?: string | undefined;
|
|
@@ -4268,6 +4300,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4268
4300
|
id: string;
|
|
4269
4301
|
model: string;
|
|
4270
4302
|
provider: string;
|
|
4303
|
+
mode?: {
|
|
4304
|
+
query: string;
|
|
4305
|
+
execute: string;
|
|
4306
|
+
} | undefined;
|
|
4271
4307
|
effort?: string | undefined;
|
|
4272
4308
|
weight?: number | undefined;
|
|
4273
4309
|
account?: string | undefined;
|
|
@@ -4280,6 +4316,10 @@ export declare const CrewxProjectConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4280
4316
|
id: string;
|
|
4281
4317
|
model: string;
|
|
4282
4318
|
provider: string;
|
|
4319
|
+
mode?: {
|
|
4320
|
+
query: string;
|
|
4321
|
+
execute: string;
|
|
4322
|
+
} | undefined;
|
|
4283
4323
|
effort?: string | undefined;
|
|
4284
4324
|
weight?: number | undefined;
|
|
4285
4325
|
account?: string | undefined;
|