@harness-engineering/orchestrator 0.13.0 → 0.14.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/dist/index.d.mts +363 -0
- package/dist/index.d.ts +363 -0
- package/dist/index.js +48 -28
- package/dist/index.mjs +48 -28
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3048,54 +3048,244 @@ declare function makeBackendResolver(backends: Record<string, BackendDef> | null
|
|
|
3048
3048
|
*/
|
|
3049
3049
|
declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3050
3050
|
type: z.ZodLiteral<"mock">;
|
|
3051
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3052
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3053
|
+
costPer1kTokens: z.ZodNumber;
|
|
3054
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3055
|
+
contextWindow: z.ZodNumber;
|
|
3056
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3057
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3058
|
+
}, "strict", z.ZodTypeAny, {
|
|
3059
|
+
tier: "fast" | "standard" | "strong";
|
|
3060
|
+
costPer1kTokens: number;
|
|
3061
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3062
|
+
contextWindow: number;
|
|
3063
|
+
vision?: boolean | undefined;
|
|
3064
|
+
toolUse?: boolean | undefined;
|
|
3065
|
+
}, {
|
|
3066
|
+
tier: "fast" | "standard" | "strong";
|
|
3067
|
+
costPer1kTokens: number;
|
|
3068
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3069
|
+
contextWindow: number;
|
|
3070
|
+
vision?: boolean | undefined;
|
|
3071
|
+
toolUse?: boolean | undefined;
|
|
3072
|
+
}>>;
|
|
3051
3073
|
}, "strict", z.ZodTypeAny, {
|
|
3052
3074
|
type: "mock";
|
|
3075
|
+
capabilities?: {
|
|
3076
|
+
tier: "fast" | "standard" | "strong";
|
|
3077
|
+
costPer1kTokens: number;
|
|
3078
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3079
|
+
contextWindow: number;
|
|
3080
|
+
vision?: boolean | undefined;
|
|
3081
|
+
toolUse?: boolean | undefined;
|
|
3082
|
+
} | undefined;
|
|
3053
3083
|
}, {
|
|
3054
3084
|
type: "mock";
|
|
3085
|
+
capabilities?: {
|
|
3086
|
+
tier: "fast" | "standard" | "strong";
|
|
3087
|
+
costPer1kTokens: number;
|
|
3088
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3089
|
+
contextWindow: number;
|
|
3090
|
+
vision?: boolean | undefined;
|
|
3091
|
+
toolUse?: boolean | undefined;
|
|
3092
|
+
} | undefined;
|
|
3055
3093
|
}>, z.ZodObject<{
|
|
3056
3094
|
type: z.ZodLiteral<"claude">;
|
|
3057
3095
|
command: z.ZodOptional<z.ZodString>;
|
|
3096
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3097
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3098
|
+
costPer1kTokens: z.ZodNumber;
|
|
3099
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3100
|
+
contextWindow: z.ZodNumber;
|
|
3101
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3102
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3103
|
+
}, "strict", z.ZodTypeAny, {
|
|
3104
|
+
tier: "fast" | "standard" | "strong";
|
|
3105
|
+
costPer1kTokens: number;
|
|
3106
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3107
|
+
contextWindow: number;
|
|
3108
|
+
vision?: boolean | undefined;
|
|
3109
|
+
toolUse?: boolean | undefined;
|
|
3110
|
+
}, {
|
|
3111
|
+
tier: "fast" | "standard" | "strong";
|
|
3112
|
+
costPer1kTokens: number;
|
|
3113
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3114
|
+
contextWindow: number;
|
|
3115
|
+
vision?: boolean | undefined;
|
|
3116
|
+
toolUse?: boolean | undefined;
|
|
3117
|
+
}>>;
|
|
3058
3118
|
}, "strict", z.ZodTypeAny, {
|
|
3059
3119
|
type: "claude";
|
|
3120
|
+
capabilities?: {
|
|
3121
|
+
tier: "fast" | "standard" | "strong";
|
|
3122
|
+
costPer1kTokens: number;
|
|
3123
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3124
|
+
contextWindow: number;
|
|
3125
|
+
vision?: boolean | undefined;
|
|
3126
|
+
toolUse?: boolean | undefined;
|
|
3127
|
+
} | undefined;
|
|
3060
3128
|
command?: string | undefined;
|
|
3061
3129
|
}, {
|
|
3062
3130
|
type: "claude";
|
|
3131
|
+
capabilities?: {
|
|
3132
|
+
tier: "fast" | "standard" | "strong";
|
|
3133
|
+
costPer1kTokens: number;
|
|
3134
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3135
|
+
contextWindow: number;
|
|
3136
|
+
vision?: boolean | undefined;
|
|
3137
|
+
toolUse?: boolean | undefined;
|
|
3138
|
+
} | undefined;
|
|
3063
3139
|
command?: string | undefined;
|
|
3064
3140
|
}>, z.ZodObject<{
|
|
3065
3141
|
type: z.ZodLiteral<"anthropic">;
|
|
3066
3142
|
model: z.ZodString;
|
|
3067
3143
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3144
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3145
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3146
|
+
costPer1kTokens: z.ZodNumber;
|
|
3147
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3148
|
+
contextWindow: z.ZodNumber;
|
|
3149
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3150
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3151
|
+
}, "strict", z.ZodTypeAny, {
|
|
3152
|
+
tier: "fast" | "standard" | "strong";
|
|
3153
|
+
costPer1kTokens: number;
|
|
3154
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3155
|
+
contextWindow: number;
|
|
3156
|
+
vision?: boolean | undefined;
|
|
3157
|
+
toolUse?: boolean | undefined;
|
|
3158
|
+
}, {
|
|
3159
|
+
tier: "fast" | "standard" | "strong";
|
|
3160
|
+
costPer1kTokens: number;
|
|
3161
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3162
|
+
contextWindow: number;
|
|
3163
|
+
vision?: boolean | undefined;
|
|
3164
|
+
toolUse?: boolean | undefined;
|
|
3165
|
+
}>>;
|
|
3068
3166
|
}, "strict", z.ZodTypeAny, {
|
|
3069
3167
|
type: "anthropic";
|
|
3070
3168
|
model: string;
|
|
3169
|
+
capabilities?: {
|
|
3170
|
+
tier: "fast" | "standard" | "strong";
|
|
3171
|
+
costPer1kTokens: number;
|
|
3172
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3173
|
+
contextWindow: number;
|
|
3174
|
+
vision?: boolean | undefined;
|
|
3175
|
+
toolUse?: boolean | undefined;
|
|
3176
|
+
} | undefined;
|
|
3071
3177
|
apiKey?: string | undefined;
|
|
3072
3178
|
}, {
|
|
3073
3179
|
type: "anthropic";
|
|
3074
3180
|
model: string;
|
|
3181
|
+
capabilities?: {
|
|
3182
|
+
tier: "fast" | "standard" | "strong";
|
|
3183
|
+
costPer1kTokens: number;
|
|
3184
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3185
|
+
contextWindow: number;
|
|
3186
|
+
vision?: boolean | undefined;
|
|
3187
|
+
toolUse?: boolean | undefined;
|
|
3188
|
+
} | undefined;
|
|
3075
3189
|
apiKey?: string | undefined;
|
|
3076
3190
|
}>, z.ZodObject<{
|
|
3077
3191
|
type: z.ZodLiteral<"openai">;
|
|
3078
3192
|
model: z.ZodString;
|
|
3079
3193
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3194
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3195
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3196
|
+
costPer1kTokens: z.ZodNumber;
|
|
3197
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3198
|
+
contextWindow: z.ZodNumber;
|
|
3199
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3200
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3201
|
+
}, "strict", z.ZodTypeAny, {
|
|
3202
|
+
tier: "fast" | "standard" | "strong";
|
|
3203
|
+
costPer1kTokens: number;
|
|
3204
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3205
|
+
contextWindow: number;
|
|
3206
|
+
vision?: boolean | undefined;
|
|
3207
|
+
toolUse?: boolean | undefined;
|
|
3208
|
+
}, {
|
|
3209
|
+
tier: "fast" | "standard" | "strong";
|
|
3210
|
+
costPer1kTokens: number;
|
|
3211
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3212
|
+
contextWindow: number;
|
|
3213
|
+
vision?: boolean | undefined;
|
|
3214
|
+
toolUse?: boolean | undefined;
|
|
3215
|
+
}>>;
|
|
3080
3216
|
}, "strict", z.ZodTypeAny, {
|
|
3081
3217
|
type: "openai";
|
|
3082
3218
|
model: string;
|
|
3219
|
+
capabilities?: {
|
|
3220
|
+
tier: "fast" | "standard" | "strong";
|
|
3221
|
+
costPer1kTokens: number;
|
|
3222
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3223
|
+
contextWindow: number;
|
|
3224
|
+
vision?: boolean | undefined;
|
|
3225
|
+
toolUse?: boolean | undefined;
|
|
3226
|
+
} | undefined;
|
|
3083
3227
|
apiKey?: string | undefined;
|
|
3084
3228
|
}, {
|
|
3085
3229
|
type: "openai";
|
|
3086
3230
|
model: string;
|
|
3231
|
+
capabilities?: {
|
|
3232
|
+
tier: "fast" | "standard" | "strong";
|
|
3233
|
+
costPer1kTokens: number;
|
|
3234
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3235
|
+
contextWindow: number;
|
|
3236
|
+
vision?: boolean | undefined;
|
|
3237
|
+
toolUse?: boolean | undefined;
|
|
3238
|
+
} | undefined;
|
|
3087
3239
|
apiKey?: string | undefined;
|
|
3088
3240
|
}>, z.ZodObject<{
|
|
3089
3241
|
type: z.ZodLiteral<"gemini">;
|
|
3090
3242
|
model: z.ZodString;
|
|
3091
3243
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3244
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3245
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3246
|
+
costPer1kTokens: z.ZodNumber;
|
|
3247
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3248
|
+
contextWindow: z.ZodNumber;
|
|
3249
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3250
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3251
|
+
}, "strict", z.ZodTypeAny, {
|
|
3252
|
+
tier: "fast" | "standard" | "strong";
|
|
3253
|
+
costPer1kTokens: number;
|
|
3254
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3255
|
+
contextWindow: number;
|
|
3256
|
+
vision?: boolean | undefined;
|
|
3257
|
+
toolUse?: boolean | undefined;
|
|
3258
|
+
}, {
|
|
3259
|
+
tier: "fast" | "standard" | "strong";
|
|
3260
|
+
costPer1kTokens: number;
|
|
3261
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3262
|
+
contextWindow: number;
|
|
3263
|
+
vision?: boolean | undefined;
|
|
3264
|
+
toolUse?: boolean | undefined;
|
|
3265
|
+
}>>;
|
|
3092
3266
|
}, "strict", z.ZodTypeAny, {
|
|
3093
3267
|
type: "gemini";
|
|
3094
3268
|
model: string;
|
|
3269
|
+
capabilities?: {
|
|
3270
|
+
tier: "fast" | "standard" | "strong";
|
|
3271
|
+
costPer1kTokens: number;
|
|
3272
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3273
|
+
contextWindow: number;
|
|
3274
|
+
vision?: boolean | undefined;
|
|
3275
|
+
toolUse?: boolean | undefined;
|
|
3276
|
+
} | undefined;
|
|
3095
3277
|
apiKey?: string | undefined;
|
|
3096
3278
|
}, {
|
|
3097
3279
|
type: "gemini";
|
|
3098
3280
|
model: string;
|
|
3281
|
+
capabilities?: {
|
|
3282
|
+
tier: "fast" | "standard" | "strong";
|
|
3283
|
+
costPer1kTokens: number;
|
|
3284
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3285
|
+
contextWindow: number;
|
|
3286
|
+
vision?: boolean | undefined;
|
|
3287
|
+
toolUse?: boolean | undefined;
|
|
3288
|
+
} | undefined;
|
|
3099
3289
|
apiKey?: string | undefined;
|
|
3100
3290
|
}>, z.ZodObject<{
|
|
3101
3291
|
type: z.ZodLiteral<"local">;
|
|
@@ -3104,10 +3294,40 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3104
3294
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3105
3295
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3106
3296
|
probeIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
3297
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3298
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3299
|
+
costPer1kTokens: z.ZodNumber;
|
|
3300
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3301
|
+
contextWindow: z.ZodNumber;
|
|
3302
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3303
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3304
|
+
}, "strict", z.ZodTypeAny, {
|
|
3305
|
+
tier: "fast" | "standard" | "strong";
|
|
3306
|
+
costPer1kTokens: number;
|
|
3307
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3308
|
+
contextWindow: number;
|
|
3309
|
+
vision?: boolean | undefined;
|
|
3310
|
+
toolUse?: boolean | undefined;
|
|
3311
|
+
}, {
|
|
3312
|
+
tier: "fast" | "standard" | "strong";
|
|
3313
|
+
costPer1kTokens: number;
|
|
3314
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3315
|
+
contextWindow: number;
|
|
3316
|
+
vision?: boolean | undefined;
|
|
3317
|
+
toolUse?: boolean | undefined;
|
|
3318
|
+
}>>;
|
|
3107
3319
|
}, "strict", z.ZodTypeAny, {
|
|
3108
3320
|
type: "local";
|
|
3109
3321
|
model: string | [string, ...string[]];
|
|
3110
3322
|
endpoint: string;
|
|
3323
|
+
capabilities?: {
|
|
3324
|
+
tier: "fast" | "standard" | "strong";
|
|
3325
|
+
costPer1kTokens: number;
|
|
3326
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3327
|
+
contextWindow: number;
|
|
3328
|
+
vision?: boolean | undefined;
|
|
3329
|
+
toolUse?: boolean | undefined;
|
|
3330
|
+
} | undefined;
|
|
3111
3331
|
apiKey?: string | undefined;
|
|
3112
3332
|
timeoutMs?: number | undefined;
|
|
3113
3333
|
probeIntervalMs?: number | undefined;
|
|
@@ -3115,6 +3335,14 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3115
3335
|
type: "local";
|
|
3116
3336
|
model: string | [string, ...string[]];
|
|
3117
3337
|
endpoint: string;
|
|
3338
|
+
capabilities?: {
|
|
3339
|
+
tier: "fast" | "standard" | "strong";
|
|
3340
|
+
costPer1kTokens: number;
|
|
3341
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3342
|
+
contextWindow: number;
|
|
3343
|
+
vision?: boolean | undefined;
|
|
3344
|
+
toolUse?: boolean | undefined;
|
|
3345
|
+
} | undefined;
|
|
3118
3346
|
apiKey?: string | undefined;
|
|
3119
3347
|
timeoutMs?: number | undefined;
|
|
3120
3348
|
probeIntervalMs?: number | undefined;
|
|
@@ -3125,10 +3353,40 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3125
3353
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3126
3354
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3127
3355
|
probeIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
3356
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3357
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3358
|
+
costPer1kTokens: z.ZodNumber;
|
|
3359
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3360
|
+
contextWindow: z.ZodNumber;
|
|
3361
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3362
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3363
|
+
}, "strict", z.ZodTypeAny, {
|
|
3364
|
+
tier: "fast" | "standard" | "strong";
|
|
3365
|
+
costPer1kTokens: number;
|
|
3366
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3367
|
+
contextWindow: number;
|
|
3368
|
+
vision?: boolean | undefined;
|
|
3369
|
+
toolUse?: boolean | undefined;
|
|
3370
|
+
}, {
|
|
3371
|
+
tier: "fast" | "standard" | "strong";
|
|
3372
|
+
costPer1kTokens: number;
|
|
3373
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3374
|
+
contextWindow: number;
|
|
3375
|
+
vision?: boolean | undefined;
|
|
3376
|
+
toolUse?: boolean | undefined;
|
|
3377
|
+
}>>;
|
|
3128
3378
|
}, "strict", z.ZodTypeAny, {
|
|
3129
3379
|
type: "pi";
|
|
3130
3380
|
model: string | [string, ...string[]];
|
|
3131
3381
|
endpoint: string;
|
|
3382
|
+
capabilities?: {
|
|
3383
|
+
tier: "fast" | "standard" | "strong";
|
|
3384
|
+
costPer1kTokens: number;
|
|
3385
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3386
|
+
contextWindow: number;
|
|
3387
|
+
vision?: boolean | undefined;
|
|
3388
|
+
toolUse?: boolean | undefined;
|
|
3389
|
+
} | undefined;
|
|
3132
3390
|
apiKey?: string | undefined;
|
|
3133
3391
|
timeoutMs?: number | undefined;
|
|
3134
3392
|
probeIntervalMs?: number | undefined;
|
|
@@ -3136,6 +3394,14 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3136
3394
|
type: "pi";
|
|
3137
3395
|
model: string | [string, ...string[]];
|
|
3138
3396
|
endpoint: string;
|
|
3397
|
+
capabilities?: {
|
|
3398
|
+
tier: "fast" | "standard" | "strong";
|
|
3399
|
+
costPer1kTokens: number;
|
|
3400
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3401
|
+
contextWindow: number;
|
|
3402
|
+
vision?: boolean | undefined;
|
|
3403
|
+
toolUse?: boolean | undefined;
|
|
3404
|
+
} | undefined;
|
|
3139
3405
|
apiKey?: string | undefined;
|
|
3140
3406
|
timeoutMs?: number | undefined;
|
|
3141
3407
|
probeIntervalMs?: number | undefined;
|
|
@@ -3193,6 +3459,69 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3193
3459
|
}>>;
|
|
3194
3460
|
skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "atleastone">>]>>>;
|
|
3195
3461
|
modes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "atleastone">>]>>>;
|
|
3462
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
3463
|
+
complexityTierMatrix: z.ZodOptional<z.ZodRecord<z.ZodEnum<["trivial", "simple", "moderate", "complex"]>, z.ZodEnum<["fast", "standard", "strong"]>>>;
|
|
3464
|
+
skillTierOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["fast", "standard", "strong"]>>>;
|
|
3465
|
+
privacyFloor: z.ZodOptional<z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>>;
|
|
3466
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
3467
|
+
capUsd: z.ZodNumber;
|
|
3468
|
+
degradeAtPct: z.ZodOptional<z.ZodNumber>;
|
|
3469
|
+
onBudgetExhausted: z.ZodEnum<["degrade", "pause", "human"]>;
|
|
3470
|
+
}, "strip", z.ZodTypeAny, {
|
|
3471
|
+
capUsd: number;
|
|
3472
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3473
|
+
degradeAtPct?: number | undefined;
|
|
3474
|
+
}, {
|
|
3475
|
+
capUsd: number;
|
|
3476
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3477
|
+
degradeAtPct?: number | undefined;
|
|
3478
|
+
}>>;
|
|
3479
|
+
sensitivePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3480
|
+
escalationThreshold: z.ZodOptional<z.ZodNumber>;
|
|
3481
|
+
allowedProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3482
|
+
acceptanceEval: z.ZodOptional<z.ZodObject<{
|
|
3483
|
+
enabled: z.ZodBoolean;
|
|
3484
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3485
|
+
}, "strip", z.ZodTypeAny, {
|
|
3486
|
+
enabled: boolean;
|
|
3487
|
+
model?: string | undefined;
|
|
3488
|
+
}, {
|
|
3489
|
+
enabled: boolean;
|
|
3490
|
+
model?: string | undefined;
|
|
3491
|
+
}>>;
|
|
3492
|
+
}, "strip", z.ZodTypeAny, {
|
|
3493
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3494
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3495
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3496
|
+
budget?: {
|
|
3497
|
+
capUsd: number;
|
|
3498
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3499
|
+
degradeAtPct?: number | undefined;
|
|
3500
|
+
} | undefined;
|
|
3501
|
+
sensitivePaths?: string[] | undefined;
|
|
3502
|
+
escalationThreshold?: number | undefined;
|
|
3503
|
+
allowedProviders?: string[] | undefined;
|
|
3504
|
+
acceptanceEval?: {
|
|
3505
|
+
enabled: boolean;
|
|
3506
|
+
model?: string | undefined;
|
|
3507
|
+
} | undefined;
|
|
3508
|
+
}, {
|
|
3509
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3510
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3511
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3512
|
+
budget?: {
|
|
3513
|
+
capUsd: number;
|
|
3514
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3515
|
+
degradeAtPct?: number | undefined;
|
|
3516
|
+
} | undefined;
|
|
3517
|
+
sensitivePaths?: string[] | undefined;
|
|
3518
|
+
escalationThreshold?: number | undefined;
|
|
3519
|
+
allowedProviders?: string[] | undefined;
|
|
3520
|
+
acceptanceEval?: {
|
|
3521
|
+
enabled: boolean;
|
|
3522
|
+
model?: string | undefined;
|
|
3523
|
+
} | undefined;
|
|
3524
|
+
}>>;
|
|
3196
3525
|
}, "strict", z.ZodTypeAny, {
|
|
3197
3526
|
default: string | readonly [string, ...string[]];
|
|
3198
3527
|
'quick-fix'?: string | readonly [string, ...string[]] | undefined;
|
|
@@ -3210,6 +3539,23 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3210
3539
|
} | undefined;
|
|
3211
3540
|
skills?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3212
3541
|
modes?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3542
|
+
policy?: {
|
|
3543
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3544
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3545
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3546
|
+
budget?: {
|
|
3547
|
+
capUsd: number;
|
|
3548
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3549
|
+
degradeAtPct?: number | undefined;
|
|
3550
|
+
} | undefined;
|
|
3551
|
+
sensitivePaths?: string[] | undefined;
|
|
3552
|
+
escalationThreshold?: number | undefined;
|
|
3553
|
+
allowedProviders?: string[] | undefined;
|
|
3554
|
+
acceptanceEval?: {
|
|
3555
|
+
enabled: boolean;
|
|
3556
|
+
model?: string | undefined;
|
|
3557
|
+
} | undefined;
|
|
3558
|
+
} | undefined;
|
|
3213
3559
|
}, {
|
|
3214
3560
|
default: string | readonly [string, ...string[]];
|
|
3215
3561
|
'quick-fix'?: string | readonly [string, ...string[]] | undefined;
|
|
@@ -3227,6 +3573,23 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3227
3573
|
} | undefined;
|
|
3228
3574
|
skills?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3229
3575
|
modes?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3576
|
+
policy?: {
|
|
3577
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3578
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3579
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3580
|
+
budget?: {
|
|
3581
|
+
capUsd: number;
|
|
3582
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3583
|
+
degradeAtPct?: number | undefined;
|
|
3584
|
+
} | undefined;
|
|
3585
|
+
sensitivePaths?: string[] | undefined;
|
|
3586
|
+
escalationThreshold?: number | undefined;
|
|
3587
|
+
allowedProviders?: string[] | undefined;
|
|
3588
|
+
acceptanceEval?: {
|
|
3589
|
+
enabled: boolean;
|
|
3590
|
+
model?: string | undefined;
|
|
3591
|
+
} | undefined;
|
|
3592
|
+
} | undefined;
|
|
3230
3593
|
}>;
|
|
3231
3594
|
|
|
3232
3595
|
interface ResolverLogger {
|
package/dist/index.d.ts
CHANGED
|
@@ -3048,54 +3048,244 @@ declare function makeBackendResolver(backends: Record<string, BackendDef> | null
|
|
|
3048
3048
|
*/
|
|
3049
3049
|
declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3050
3050
|
type: z.ZodLiteral<"mock">;
|
|
3051
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3052
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3053
|
+
costPer1kTokens: z.ZodNumber;
|
|
3054
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3055
|
+
contextWindow: z.ZodNumber;
|
|
3056
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3057
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3058
|
+
}, "strict", z.ZodTypeAny, {
|
|
3059
|
+
tier: "fast" | "standard" | "strong";
|
|
3060
|
+
costPer1kTokens: number;
|
|
3061
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3062
|
+
contextWindow: number;
|
|
3063
|
+
vision?: boolean | undefined;
|
|
3064
|
+
toolUse?: boolean | undefined;
|
|
3065
|
+
}, {
|
|
3066
|
+
tier: "fast" | "standard" | "strong";
|
|
3067
|
+
costPer1kTokens: number;
|
|
3068
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3069
|
+
contextWindow: number;
|
|
3070
|
+
vision?: boolean | undefined;
|
|
3071
|
+
toolUse?: boolean | undefined;
|
|
3072
|
+
}>>;
|
|
3051
3073
|
}, "strict", z.ZodTypeAny, {
|
|
3052
3074
|
type: "mock";
|
|
3075
|
+
capabilities?: {
|
|
3076
|
+
tier: "fast" | "standard" | "strong";
|
|
3077
|
+
costPer1kTokens: number;
|
|
3078
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3079
|
+
contextWindow: number;
|
|
3080
|
+
vision?: boolean | undefined;
|
|
3081
|
+
toolUse?: boolean | undefined;
|
|
3082
|
+
} | undefined;
|
|
3053
3083
|
}, {
|
|
3054
3084
|
type: "mock";
|
|
3085
|
+
capabilities?: {
|
|
3086
|
+
tier: "fast" | "standard" | "strong";
|
|
3087
|
+
costPer1kTokens: number;
|
|
3088
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3089
|
+
contextWindow: number;
|
|
3090
|
+
vision?: boolean | undefined;
|
|
3091
|
+
toolUse?: boolean | undefined;
|
|
3092
|
+
} | undefined;
|
|
3055
3093
|
}>, z.ZodObject<{
|
|
3056
3094
|
type: z.ZodLiteral<"claude">;
|
|
3057
3095
|
command: z.ZodOptional<z.ZodString>;
|
|
3096
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3097
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3098
|
+
costPer1kTokens: z.ZodNumber;
|
|
3099
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3100
|
+
contextWindow: z.ZodNumber;
|
|
3101
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3102
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3103
|
+
}, "strict", z.ZodTypeAny, {
|
|
3104
|
+
tier: "fast" | "standard" | "strong";
|
|
3105
|
+
costPer1kTokens: number;
|
|
3106
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3107
|
+
contextWindow: number;
|
|
3108
|
+
vision?: boolean | undefined;
|
|
3109
|
+
toolUse?: boolean | undefined;
|
|
3110
|
+
}, {
|
|
3111
|
+
tier: "fast" | "standard" | "strong";
|
|
3112
|
+
costPer1kTokens: number;
|
|
3113
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3114
|
+
contextWindow: number;
|
|
3115
|
+
vision?: boolean | undefined;
|
|
3116
|
+
toolUse?: boolean | undefined;
|
|
3117
|
+
}>>;
|
|
3058
3118
|
}, "strict", z.ZodTypeAny, {
|
|
3059
3119
|
type: "claude";
|
|
3120
|
+
capabilities?: {
|
|
3121
|
+
tier: "fast" | "standard" | "strong";
|
|
3122
|
+
costPer1kTokens: number;
|
|
3123
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3124
|
+
contextWindow: number;
|
|
3125
|
+
vision?: boolean | undefined;
|
|
3126
|
+
toolUse?: boolean | undefined;
|
|
3127
|
+
} | undefined;
|
|
3060
3128
|
command?: string | undefined;
|
|
3061
3129
|
}, {
|
|
3062
3130
|
type: "claude";
|
|
3131
|
+
capabilities?: {
|
|
3132
|
+
tier: "fast" | "standard" | "strong";
|
|
3133
|
+
costPer1kTokens: number;
|
|
3134
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3135
|
+
contextWindow: number;
|
|
3136
|
+
vision?: boolean | undefined;
|
|
3137
|
+
toolUse?: boolean | undefined;
|
|
3138
|
+
} | undefined;
|
|
3063
3139
|
command?: string | undefined;
|
|
3064
3140
|
}>, z.ZodObject<{
|
|
3065
3141
|
type: z.ZodLiteral<"anthropic">;
|
|
3066
3142
|
model: z.ZodString;
|
|
3067
3143
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3144
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3145
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3146
|
+
costPer1kTokens: z.ZodNumber;
|
|
3147
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3148
|
+
contextWindow: z.ZodNumber;
|
|
3149
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3150
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3151
|
+
}, "strict", z.ZodTypeAny, {
|
|
3152
|
+
tier: "fast" | "standard" | "strong";
|
|
3153
|
+
costPer1kTokens: number;
|
|
3154
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3155
|
+
contextWindow: number;
|
|
3156
|
+
vision?: boolean | undefined;
|
|
3157
|
+
toolUse?: boolean | undefined;
|
|
3158
|
+
}, {
|
|
3159
|
+
tier: "fast" | "standard" | "strong";
|
|
3160
|
+
costPer1kTokens: number;
|
|
3161
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3162
|
+
contextWindow: number;
|
|
3163
|
+
vision?: boolean | undefined;
|
|
3164
|
+
toolUse?: boolean | undefined;
|
|
3165
|
+
}>>;
|
|
3068
3166
|
}, "strict", z.ZodTypeAny, {
|
|
3069
3167
|
type: "anthropic";
|
|
3070
3168
|
model: string;
|
|
3169
|
+
capabilities?: {
|
|
3170
|
+
tier: "fast" | "standard" | "strong";
|
|
3171
|
+
costPer1kTokens: number;
|
|
3172
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3173
|
+
contextWindow: number;
|
|
3174
|
+
vision?: boolean | undefined;
|
|
3175
|
+
toolUse?: boolean | undefined;
|
|
3176
|
+
} | undefined;
|
|
3071
3177
|
apiKey?: string | undefined;
|
|
3072
3178
|
}, {
|
|
3073
3179
|
type: "anthropic";
|
|
3074
3180
|
model: string;
|
|
3181
|
+
capabilities?: {
|
|
3182
|
+
tier: "fast" | "standard" | "strong";
|
|
3183
|
+
costPer1kTokens: number;
|
|
3184
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3185
|
+
contextWindow: number;
|
|
3186
|
+
vision?: boolean | undefined;
|
|
3187
|
+
toolUse?: boolean | undefined;
|
|
3188
|
+
} | undefined;
|
|
3075
3189
|
apiKey?: string | undefined;
|
|
3076
3190
|
}>, z.ZodObject<{
|
|
3077
3191
|
type: z.ZodLiteral<"openai">;
|
|
3078
3192
|
model: z.ZodString;
|
|
3079
3193
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3194
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3195
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3196
|
+
costPer1kTokens: z.ZodNumber;
|
|
3197
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3198
|
+
contextWindow: z.ZodNumber;
|
|
3199
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3200
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3201
|
+
}, "strict", z.ZodTypeAny, {
|
|
3202
|
+
tier: "fast" | "standard" | "strong";
|
|
3203
|
+
costPer1kTokens: number;
|
|
3204
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3205
|
+
contextWindow: number;
|
|
3206
|
+
vision?: boolean | undefined;
|
|
3207
|
+
toolUse?: boolean | undefined;
|
|
3208
|
+
}, {
|
|
3209
|
+
tier: "fast" | "standard" | "strong";
|
|
3210
|
+
costPer1kTokens: number;
|
|
3211
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3212
|
+
contextWindow: number;
|
|
3213
|
+
vision?: boolean | undefined;
|
|
3214
|
+
toolUse?: boolean | undefined;
|
|
3215
|
+
}>>;
|
|
3080
3216
|
}, "strict", z.ZodTypeAny, {
|
|
3081
3217
|
type: "openai";
|
|
3082
3218
|
model: string;
|
|
3219
|
+
capabilities?: {
|
|
3220
|
+
tier: "fast" | "standard" | "strong";
|
|
3221
|
+
costPer1kTokens: number;
|
|
3222
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3223
|
+
contextWindow: number;
|
|
3224
|
+
vision?: boolean | undefined;
|
|
3225
|
+
toolUse?: boolean | undefined;
|
|
3226
|
+
} | undefined;
|
|
3083
3227
|
apiKey?: string | undefined;
|
|
3084
3228
|
}, {
|
|
3085
3229
|
type: "openai";
|
|
3086
3230
|
model: string;
|
|
3231
|
+
capabilities?: {
|
|
3232
|
+
tier: "fast" | "standard" | "strong";
|
|
3233
|
+
costPer1kTokens: number;
|
|
3234
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3235
|
+
contextWindow: number;
|
|
3236
|
+
vision?: boolean | undefined;
|
|
3237
|
+
toolUse?: boolean | undefined;
|
|
3238
|
+
} | undefined;
|
|
3087
3239
|
apiKey?: string | undefined;
|
|
3088
3240
|
}>, z.ZodObject<{
|
|
3089
3241
|
type: z.ZodLiteral<"gemini">;
|
|
3090
3242
|
model: z.ZodString;
|
|
3091
3243
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3244
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3245
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3246
|
+
costPer1kTokens: z.ZodNumber;
|
|
3247
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3248
|
+
contextWindow: z.ZodNumber;
|
|
3249
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3250
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3251
|
+
}, "strict", z.ZodTypeAny, {
|
|
3252
|
+
tier: "fast" | "standard" | "strong";
|
|
3253
|
+
costPer1kTokens: number;
|
|
3254
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3255
|
+
contextWindow: number;
|
|
3256
|
+
vision?: boolean | undefined;
|
|
3257
|
+
toolUse?: boolean | undefined;
|
|
3258
|
+
}, {
|
|
3259
|
+
tier: "fast" | "standard" | "strong";
|
|
3260
|
+
costPer1kTokens: number;
|
|
3261
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3262
|
+
contextWindow: number;
|
|
3263
|
+
vision?: boolean | undefined;
|
|
3264
|
+
toolUse?: boolean | undefined;
|
|
3265
|
+
}>>;
|
|
3092
3266
|
}, "strict", z.ZodTypeAny, {
|
|
3093
3267
|
type: "gemini";
|
|
3094
3268
|
model: string;
|
|
3269
|
+
capabilities?: {
|
|
3270
|
+
tier: "fast" | "standard" | "strong";
|
|
3271
|
+
costPer1kTokens: number;
|
|
3272
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3273
|
+
contextWindow: number;
|
|
3274
|
+
vision?: boolean | undefined;
|
|
3275
|
+
toolUse?: boolean | undefined;
|
|
3276
|
+
} | undefined;
|
|
3095
3277
|
apiKey?: string | undefined;
|
|
3096
3278
|
}, {
|
|
3097
3279
|
type: "gemini";
|
|
3098
3280
|
model: string;
|
|
3281
|
+
capabilities?: {
|
|
3282
|
+
tier: "fast" | "standard" | "strong";
|
|
3283
|
+
costPer1kTokens: number;
|
|
3284
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3285
|
+
contextWindow: number;
|
|
3286
|
+
vision?: boolean | undefined;
|
|
3287
|
+
toolUse?: boolean | undefined;
|
|
3288
|
+
} | undefined;
|
|
3099
3289
|
apiKey?: string | undefined;
|
|
3100
3290
|
}>, z.ZodObject<{
|
|
3101
3291
|
type: z.ZodLiteral<"local">;
|
|
@@ -3104,10 +3294,40 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3104
3294
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3105
3295
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3106
3296
|
probeIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
3297
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3298
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3299
|
+
costPer1kTokens: z.ZodNumber;
|
|
3300
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3301
|
+
contextWindow: z.ZodNumber;
|
|
3302
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3303
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3304
|
+
}, "strict", z.ZodTypeAny, {
|
|
3305
|
+
tier: "fast" | "standard" | "strong";
|
|
3306
|
+
costPer1kTokens: number;
|
|
3307
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3308
|
+
contextWindow: number;
|
|
3309
|
+
vision?: boolean | undefined;
|
|
3310
|
+
toolUse?: boolean | undefined;
|
|
3311
|
+
}, {
|
|
3312
|
+
tier: "fast" | "standard" | "strong";
|
|
3313
|
+
costPer1kTokens: number;
|
|
3314
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3315
|
+
contextWindow: number;
|
|
3316
|
+
vision?: boolean | undefined;
|
|
3317
|
+
toolUse?: boolean | undefined;
|
|
3318
|
+
}>>;
|
|
3107
3319
|
}, "strict", z.ZodTypeAny, {
|
|
3108
3320
|
type: "local";
|
|
3109
3321
|
model: string | [string, ...string[]];
|
|
3110
3322
|
endpoint: string;
|
|
3323
|
+
capabilities?: {
|
|
3324
|
+
tier: "fast" | "standard" | "strong";
|
|
3325
|
+
costPer1kTokens: number;
|
|
3326
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3327
|
+
contextWindow: number;
|
|
3328
|
+
vision?: boolean | undefined;
|
|
3329
|
+
toolUse?: boolean | undefined;
|
|
3330
|
+
} | undefined;
|
|
3111
3331
|
apiKey?: string | undefined;
|
|
3112
3332
|
timeoutMs?: number | undefined;
|
|
3113
3333
|
probeIntervalMs?: number | undefined;
|
|
@@ -3115,6 +3335,14 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3115
3335
|
type: "local";
|
|
3116
3336
|
model: string | [string, ...string[]];
|
|
3117
3337
|
endpoint: string;
|
|
3338
|
+
capabilities?: {
|
|
3339
|
+
tier: "fast" | "standard" | "strong";
|
|
3340
|
+
costPer1kTokens: number;
|
|
3341
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3342
|
+
contextWindow: number;
|
|
3343
|
+
vision?: boolean | undefined;
|
|
3344
|
+
toolUse?: boolean | undefined;
|
|
3345
|
+
} | undefined;
|
|
3118
3346
|
apiKey?: string | undefined;
|
|
3119
3347
|
timeoutMs?: number | undefined;
|
|
3120
3348
|
probeIntervalMs?: number | undefined;
|
|
@@ -3125,10 +3353,40 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3125
3353
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3126
3354
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3127
3355
|
probeIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
3356
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3357
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3358
|
+
costPer1kTokens: z.ZodNumber;
|
|
3359
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3360
|
+
contextWindow: z.ZodNumber;
|
|
3361
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3362
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3363
|
+
}, "strict", z.ZodTypeAny, {
|
|
3364
|
+
tier: "fast" | "standard" | "strong";
|
|
3365
|
+
costPer1kTokens: number;
|
|
3366
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3367
|
+
contextWindow: number;
|
|
3368
|
+
vision?: boolean | undefined;
|
|
3369
|
+
toolUse?: boolean | undefined;
|
|
3370
|
+
}, {
|
|
3371
|
+
tier: "fast" | "standard" | "strong";
|
|
3372
|
+
costPer1kTokens: number;
|
|
3373
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3374
|
+
contextWindow: number;
|
|
3375
|
+
vision?: boolean | undefined;
|
|
3376
|
+
toolUse?: boolean | undefined;
|
|
3377
|
+
}>>;
|
|
3128
3378
|
}, "strict", z.ZodTypeAny, {
|
|
3129
3379
|
type: "pi";
|
|
3130
3380
|
model: string | [string, ...string[]];
|
|
3131
3381
|
endpoint: string;
|
|
3382
|
+
capabilities?: {
|
|
3383
|
+
tier: "fast" | "standard" | "strong";
|
|
3384
|
+
costPer1kTokens: number;
|
|
3385
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3386
|
+
contextWindow: number;
|
|
3387
|
+
vision?: boolean | undefined;
|
|
3388
|
+
toolUse?: boolean | undefined;
|
|
3389
|
+
} | undefined;
|
|
3132
3390
|
apiKey?: string | undefined;
|
|
3133
3391
|
timeoutMs?: number | undefined;
|
|
3134
3392
|
probeIntervalMs?: number | undefined;
|
|
@@ -3136,6 +3394,14 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3136
3394
|
type: "pi";
|
|
3137
3395
|
model: string | [string, ...string[]];
|
|
3138
3396
|
endpoint: string;
|
|
3397
|
+
capabilities?: {
|
|
3398
|
+
tier: "fast" | "standard" | "strong";
|
|
3399
|
+
costPer1kTokens: number;
|
|
3400
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3401
|
+
contextWindow: number;
|
|
3402
|
+
vision?: boolean | undefined;
|
|
3403
|
+
toolUse?: boolean | undefined;
|
|
3404
|
+
} | undefined;
|
|
3139
3405
|
apiKey?: string | undefined;
|
|
3140
3406
|
timeoutMs?: number | undefined;
|
|
3141
3407
|
probeIntervalMs?: number | undefined;
|
|
@@ -3193,6 +3459,69 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3193
3459
|
}>>;
|
|
3194
3460
|
skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "atleastone">>]>>>;
|
|
3195
3461
|
modes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "atleastone">>]>>>;
|
|
3462
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
3463
|
+
complexityTierMatrix: z.ZodOptional<z.ZodRecord<z.ZodEnum<["trivial", "simple", "moderate", "complex"]>, z.ZodEnum<["fast", "standard", "strong"]>>>;
|
|
3464
|
+
skillTierOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["fast", "standard", "strong"]>>>;
|
|
3465
|
+
privacyFloor: z.ZodOptional<z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>>;
|
|
3466
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
3467
|
+
capUsd: z.ZodNumber;
|
|
3468
|
+
degradeAtPct: z.ZodOptional<z.ZodNumber>;
|
|
3469
|
+
onBudgetExhausted: z.ZodEnum<["degrade", "pause", "human"]>;
|
|
3470
|
+
}, "strip", z.ZodTypeAny, {
|
|
3471
|
+
capUsd: number;
|
|
3472
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3473
|
+
degradeAtPct?: number | undefined;
|
|
3474
|
+
}, {
|
|
3475
|
+
capUsd: number;
|
|
3476
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3477
|
+
degradeAtPct?: number | undefined;
|
|
3478
|
+
}>>;
|
|
3479
|
+
sensitivePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3480
|
+
escalationThreshold: z.ZodOptional<z.ZodNumber>;
|
|
3481
|
+
allowedProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3482
|
+
acceptanceEval: z.ZodOptional<z.ZodObject<{
|
|
3483
|
+
enabled: z.ZodBoolean;
|
|
3484
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3485
|
+
}, "strip", z.ZodTypeAny, {
|
|
3486
|
+
enabled: boolean;
|
|
3487
|
+
model?: string | undefined;
|
|
3488
|
+
}, {
|
|
3489
|
+
enabled: boolean;
|
|
3490
|
+
model?: string | undefined;
|
|
3491
|
+
}>>;
|
|
3492
|
+
}, "strip", z.ZodTypeAny, {
|
|
3493
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3494
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3495
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3496
|
+
budget?: {
|
|
3497
|
+
capUsd: number;
|
|
3498
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3499
|
+
degradeAtPct?: number | undefined;
|
|
3500
|
+
} | undefined;
|
|
3501
|
+
sensitivePaths?: string[] | undefined;
|
|
3502
|
+
escalationThreshold?: number | undefined;
|
|
3503
|
+
allowedProviders?: string[] | undefined;
|
|
3504
|
+
acceptanceEval?: {
|
|
3505
|
+
enabled: boolean;
|
|
3506
|
+
model?: string | undefined;
|
|
3507
|
+
} | undefined;
|
|
3508
|
+
}, {
|
|
3509
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3510
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3511
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3512
|
+
budget?: {
|
|
3513
|
+
capUsd: number;
|
|
3514
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3515
|
+
degradeAtPct?: number | undefined;
|
|
3516
|
+
} | undefined;
|
|
3517
|
+
sensitivePaths?: string[] | undefined;
|
|
3518
|
+
escalationThreshold?: number | undefined;
|
|
3519
|
+
allowedProviders?: string[] | undefined;
|
|
3520
|
+
acceptanceEval?: {
|
|
3521
|
+
enabled: boolean;
|
|
3522
|
+
model?: string | undefined;
|
|
3523
|
+
} | undefined;
|
|
3524
|
+
}>>;
|
|
3196
3525
|
}, "strict", z.ZodTypeAny, {
|
|
3197
3526
|
default: string | readonly [string, ...string[]];
|
|
3198
3527
|
'quick-fix'?: string | readonly [string, ...string[]] | undefined;
|
|
@@ -3210,6 +3539,23 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3210
3539
|
} | undefined;
|
|
3211
3540
|
skills?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3212
3541
|
modes?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3542
|
+
policy?: {
|
|
3543
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3544
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3545
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3546
|
+
budget?: {
|
|
3547
|
+
capUsd: number;
|
|
3548
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3549
|
+
degradeAtPct?: number | undefined;
|
|
3550
|
+
} | undefined;
|
|
3551
|
+
sensitivePaths?: string[] | undefined;
|
|
3552
|
+
escalationThreshold?: number | undefined;
|
|
3553
|
+
allowedProviders?: string[] | undefined;
|
|
3554
|
+
acceptanceEval?: {
|
|
3555
|
+
enabled: boolean;
|
|
3556
|
+
model?: string | undefined;
|
|
3557
|
+
} | undefined;
|
|
3558
|
+
} | undefined;
|
|
3213
3559
|
}, {
|
|
3214
3560
|
default: string | readonly [string, ...string[]];
|
|
3215
3561
|
'quick-fix'?: string | readonly [string, ...string[]] | undefined;
|
|
@@ -3227,6 +3573,23 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3227
3573
|
} | undefined;
|
|
3228
3574
|
skills?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3229
3575
|
modes?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3576
|
+
policy?: {
|
|
3577
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3578
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3579
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3580
|
+
budget?: {
|
|
3581
|
+
capUsd: number;
|
|
3582
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3583
|
+
degradeAtPct?: number | undefined;
|
|
3584
|
+
} | undefined;
|
|
3585
|
+
sensitivePaths?: string[] | undefined;
|
|
3586
|
+
escalationThreshold?: number | undefined;
|
|
3587
|
+
allowedProviders?: string[] | undefined;
|
|
3588
|
+
acceptanceEval?: {
|
|
3589
|
+
enabled: boolean;
|
|
3590
|
+
model?: string | undefined;
|
|
3591
|
+
} | undefined;
|
|
3592
|
+
} | undefined;
|
|
3230
3593
|
}>;
|
|
3231
3594
|
|
|
3232
3595
|
interface ResolverLogger {
|
package/dist/index.js
CHANGED
|
@@ -2054,26 +2054,60 @@ var ModelSchema = import_zod.z.union([import_zod.z.string().min(1), import_zod.z
|
|
|
2054
2054
|
message: "model must be a non-empty string or array of strings"
|
|
2055
2055
|
})
|
|
2056
2056
|
});
|
|
2057
|
+
var CAPABILITY_TIER = import_zod.z.enum(["fast", "standard", "strong"]);
|
|
2058
|
+
var COMPLEXITY_LEVEL = import_zod.z.enum(["trivial", "simple", "moderate", "complex"]);
|
|
2059
|
+
var PRIVACY_CLASS = import_zod.z.enum(["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]);
|
|
2060
|
+
var BackendCapabilitiesSchema = import_zod.z.object({
|
|
2061
|
+
tier: CAPABILITY_TIER,
|
|
2062
|
+
costPer1kTokens: import_zod.z.number().nonnegative(),
|
|
2063
|
+
privacyClass: PRIVACY_CLASS,
|
|
2064
|
+
contextWindow: import_zod.z.number().int().positive(),
|
|
2065
|
+
vision: import_zod.z.boolean().optional(),
|
|
2066
|
+
toolUse: import_zod.z.boolean().optional()
|
|
2067
|
+
}).strict();
|
|
2068
|
+
var RoutingPolicySchema = import_zod.z.object({
|
|
2069
|
+
complexityTierMatrix: import_zod.z.record(COMPLEXITY_LEVEL, CAPABILITY_TIER).optional(),
|
|
2070
|
+
skillTierOverrides: import_zod.z.record(import_zod.z.string(), CAPABILITY_TIER).optional(),
|
|
2071
|
+
privacyFloor: PRIVACY_CLASS.optional(),
|
|
2072
|
+
budget: import_zod.z.object({
|
|
2073
|
+
capUsd: import_zod.z.number(),
|
|
2074
|
+
degradeAtPct: import_zod.z.number().optional(),
|
|
2075
|
+
onBudgetExhausted: import_zod.z.enum(["degrade", "pause", "human"])
|
|
2076
|
+
}).optional(),
|
|
2077
|
+
sensitivePaths: import_zod.z.array(import_zod.z.string()).optional(),
|
|
2078
|
+
escalationThreshold: import_zod.z.number().optional(),
|
|
2079
|
+
// string[], NOT the finite BackendDef['type'] union: an unknown provider must
|
|
2080
|
+
// fail CLOSED at tier selection, not reject the whole policy (Shuttle wire).
|
|
2081
|
+
allowedProviders: import_zod.z.array(import_zod.z.string()).optional(),
|
|
2082
|
+
acceptanceEval: import_zod.z.object({
|
|
2083
|
+
enabled: import_zod.z.boolean(),
|
|
2084
|
+
model: import_zod.z.string().optional()
|
|
2085
|
+
}).optional()
|
|
2086
|
+
});
|
|
2057
2087
|
var BackendDefSchema = import_zod.z.discriminatedUnion("type", [
|
|
2058
|
-
import_zod.z.object({ type: import_zod.z.literal("mock") }).strict(),
|
|
2088
|
+
import_zod.z.object({ type: import_zod.z.literal("mock"), capabilities: BackendCapabilitiesSchema.optional() }).strict(),
|
|
2059
2089
|
import_zod.z.object({
|
|
2060
2090
|
type: import_zod.z.literal("claude"),
|
|
2061
|
-
command: import_zod.z.string().optional()
|
|
2091
|
+
command: import_zod.z.string().optional(),
|
|
2092
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
2062
2093
|
}).strict(),
|
|
2063
2094
|
import_zod.z.object({
|
|
2064
2095
|
type: import_zod.z.literal("anthropic"),
|
|
2065
2096
|
model: import_zod.z.string().min(1),
|
|
2066
|
-
apiKey: import_zod.z.string().optional()
|
|
2097
|
+
apiKey: import_zod.z.string().optional(),
|
|
2098
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
2067
2099
|
}).strict(),
|
|
2068
2100
|
import_zod.z.object({
|
|
2069
2101
|
type: import_zod.z.literal("openai"),
|
|
2070
2102
|
model: import_zod.z.string().min(1),
|
|
2071
|
-
apiKey: import_zod.z.string().optional()
|
|
2103
|
+
apiKey: import_zod.z.string().optional(),
|
|
2104
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
2072
2105
|
}).strict(),
|
|
2073
2106
|
import_zod.z.object({
|
|
2074
2107
|
type: import_zod.z.literal("gemini"),
|
|
2075
2108
|
model: import_zod.z.string().min(1),
|
|
2076
|
-
apiKey: import_zod.z.string().optional()
|
|
2109
|
+
apiKey: import_zod.z.string().optional(),
|
|
2110
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
2077
2111
|
}).strict(),
|
|
2078
2112
|
import_zod.z.object({
|
|
2079
2113
|
type: import_zod.z.literal("local"),
|
|
@@ -2081,7 +2115,8 @@ var BackendDefSchema = import_zod.z.discriminatedUnion("type", [
|
|
|
2081
2115
|
model: ModelSchema,
|
|
2082
2116
|
apiKey: import_zod.z.string().optional(),
|
|
2083
2117
|
timeoutMs: import_zod.z.number().int().positive().optional(),
|
|
2084
|
-
probeIntervalMs: import_zod.z.number().int().min(1e3).optional()
|
|
2118
|
+
probeIntervalMs: import_zod.z.number().int().min(1e3).optional(),
|
|
2119
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
2085
2120
|
}).strict(),
|
|
2086
2121
|
import_zod.z.object({
|
|
2087
2122
|
type: import_zod.z.literal("pi"),
|
|
@@ -2089,7 +2124,8 @@ var BackendDefSchema = import_zod.z.discriminatedUnion("type", [
|
|
|
2089
2124
|
model: ModelSchema,
|
|
2090
2125
|
apiKey: import_zod.z.string().optional(),
|
|
2091
2126
|
timeoutMs: import_zod.z.number().int().positive().optional(),
|
|
2092
|
-
probeIntervalMs: import_zod.z.number().int().min(1e3).optional()
|
|
2127
|
+
probeIntervalMs: import_zod.z.number().int().min(1e3).optional(),
|
|
2128
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
2093
2129
|
}).strict()
|
|
2094
2130
|
]);
|
|
2095
2131
|
var RoutingValueSchema = import_zod.z.union([
|
|
@@ -2114,7 +2150,11 @@ var RoutingConfigSchema = import_zod.z.object({
|
|
|
2114
2150
|
}).strict().optional(),
|
|
2115
2151
|
// --- Spec B Phase 0: new optional maps (resolver wired in Phase 1) ---
|
|
2116
2152
|
skills: import_zod.z.record(import_zod.z.string().min(1), RoutingValueSchema).optional(),
|
|
2117
|
-
modes: import_zod.z.record(import_zod.z.string().min(1), RoutingValueSchema).optional()
|
|
2153
|
+
modes: import_zod.z.record(import_zod.z.string().min(1), RoutingValueSchema).optional(),
|
|
2154
|
+
// --- AMR: opt-in adaptive-routing policy. Its PRESENCE flips the orchestrator
|
|
2155
|
+
// from identity/default dispatch to complexity-aware tier routing (default-off
|
|
2156
|
+
// when absent). Previously accepted by the runtime PUT endpoint only. ---
|
|
2157
|
+
policy: RoutingPolicySchema.optional()
|
|
2118
2158
|
}).strict();
|
|
2119
2159
|
var WorkflowStepSchema = import_zod.z.object({
|
|
2120
2160
|
skill: import_zod.z.string().min(1),
|
|
@@ -10841,26 +10881,6 @@ async function handleTrace(req, res, deps) {
|
|
|
10841
10881
|
}
|
|
10842
10882
|
return true;
|
|
10843
10883
|
}
|
|
10844
|
-
var CAPABILITY_TIER = import_zod14.z.enum(["fast", "standard", "strong"]);
|
|
10845
|
-
var COMPLEXITY_LEVEL = import_zod14.z.enum(["trivial", "simple", "moderate", "complex"]);
|
|
10846
|
-
var PRIVACY_CLASS = import_zod14.z.enum(["on-device", "byo-endpoint", "shared-cloud"]);
|
|
10847
|
-
var RoutingPolicySchema = import_zod14.z.object({
|
|
10848
|
-
complexityTierMatrix: import_zod14.z.record(COMPLEXITY_LEVEL, CAPABILITY_TIER).optional(),
|
|
10849
|
-
skillTierOverrides: import_zod14.z.record(import_zod14.z.string(), CAPABILITY_TIER).optional(),
|
|
10850
|
-
privacyFloor: PRIVACY_CLASS.optional(),
|
|
10851
|
-
budget: import_zod14.z.object({
|
|
10852
|
-
capUsd: import_zod14.z.number(),
|
|
10853
|
-
degradeAtPct: import_zod14.z.number().optional(),
|
|
10854
|
-
onBudgetExhausted: import_zod14.z.enum(["degrade", "pause", "human"])
|
|
10855
|
-
}).optional(),
|
|
10856
|
-
sensitivePaths: import_zod14.z.array(import_zod14.z.string()).optional(),
|
|
10857
|
-
escalationThreshold: import_zod14.z.number().optional(),
|
|
10858
|
-
allowedProviders: import_zod14.z.array(import_zod14.z.string()).optional(),
|
|
10859
|
-
acceptanceEval: import_zod14.z.object({
|
|
10860
|
-
enabled: import_zod14.z.boolean(),
|
|
10861
|
-
model: import_zod14.z.string().optional()
|
|
10862
|
-
}).optional()
|
|
10863
|
-
});
|
|
10864
10884
|
async function handlePolicy(req, res, deps) {
|
|
10865
10885
|
if (!deps.ingestRoutingPolicy || deps.router === null) return unavailable(res);
|
|
10866
10886
|
let raw;
|
package/dist/index.mjs
CHANGED
|
@@ -1911,26 +1911,60 @@ var ModelSchema = z.union([z.string().min(1), z.array(z.string().min(1)).nonempt
|
|
|
1911
1911
|
message: "model must be a non-empty string or array of strings"
|
|
1912
1912
|
})
|
|
1913
1913
|
});
|
|
1914
|
+
var CAPABILITY_TIER = z.enum(["fast", "standard", "strong"]);
|
|
1915
|
+
var COMPLEXITY_LEVEL = z.enum(["trivial", "simple", "moderate", "complex"]);
|
|
1916
|
+
var PRIVACY_CLASS = z.enum(["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]);
|
|
1917
|
+
var BackendCapabilitiesSchema = z.object({
|
|
1918
|
+
tier: CAPABILITY_TIER,
|
|
1919
|
+
costPer1kTokens: z.number().nonnegative(),
|
|
1920
|
+
privacyClass: PRIVACY_CLASS,
|
|
1921
|
+
contextWindow: z.number().int().positive(),
|
|
1922
|
+
vision: z.boolean().optional(),
|
|
1923
|
+
toolUse: z.boolean().optional()
|
|
1924
|
+
}).strict();
|
|
1925
|
+
var RoutingPolicySchema = z.object({
|
|
1926
|
+
complexityTierMatrix: z.record(COMPLEXITY_LEVEL, CAPABILITY_TIER).optional(),
|
|
1927
|
+
skillTierOverrides: z.record(z.string(), CAPABILITY_TIER).optional(),
|
|
1928
|
+
privacyFloor: PRIVACY_CLASS.optional(),
|
|
1929
|
+
budget: z.object({
|
|
1930
|
+
capUsd: z.number(),
|
|
1931
|
+
degradeAtPct: z.number().optional(),
|
|
1932
|
+
onBudgetExhausted: z.enum(["degrade", "pause", "human"])
|
|
1933
|
+
}).optional(),
|
|
1934
|
+
sensitivePaths: z.array(z.string()).optional(),
|
|
1935
|
+
escalationThreshold: z.number().optional(),
|
|
1936
|
+
// string[], NOT the finite BackendDef['type'] union: an unknown provider must
|
|
1937
|
+
// fail CLOSED at tier selection, not reject the whole policy (Shuttle wire).
|
|
1938
|
+
allowedProviders: z.array(z.string()).optional(),
|
|
1939
|
+
acceptanceEval: z.object({
|
|
1940
|
+
enabled: z.boolean(),
|
|
1941
|
+
model: z.string().optional()
|
|
1942
|
+
}).optional()
|
|
1943
|
+
});
|
|
1914
1944
|
var BackendDefSchema = z.discriminatedUnion("type", [
|
|
1915
|
-
z.object({ type: z.literal("mock") }).strict(),
|
|
1945
|
+
z.object({ type: z.literal("mock"), capabilities: BackendCapabilitiesSchema.optional() }).strict(),
|
|
1916
1946
|
z.object({
|
|
1917
1947
|
type: z.literal("claude"),
|
|
1918
|
-
command: z.string().optional()
|
|
1948
|
+
command: z.string().optional(),
|
|
1949
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
1919
1950
|
}).strict(),
|
|
1920
1951
|
z.object({
|
|
1921
1952
|
type: z.literal("anthropic"),
|
|
1922
1953
|
model: z.string().min(1),
|
|
1923
|
-
apiKey: z.string().optional()
|
|
1954
|
+
apiKey: z.string().optional(),
|
|
1955
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
1924
1956
|
}).strict(),
|
|
1925
1957
|
z.object({
|
|
1926
1958
|
type: z.literal("openai"),
|
|
1927
1959
|
model: z.string().min(1),
|
|
1928
|
-
apiKey: z.string().optional()
|
|
1960
|
+
apiKey: z.string().optional(),
|
|
1961
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
1929
1962
|
}).strict(),
|
|
1930
1963
|
z.object({
|
|
1931
1964
|
type: z.literal("gemini"),
|
|
1932
1965
|
model: z.string().min(1),
|
|
1933
|
-
apiKey: z.string().optional()
|
|
1966
|
+
apiKey: z.string().optional(),
|
|
1967
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
1934
1968
|
}).strict(),
|
|
1935
1969
|
z.object({
|
|
1936
1970
|
type: z.literal("local"),
|
|
@@ -1938,7 +1972,8 @@ var BackendDefSchema = z.discriminatedUnion("type", [
|
|
|
1938
1972
|
model: ModelSchema,
|
|
1939
1973
|
apiKey: z.string().optional(),
|
|
1940
1974
|
timeoutMs: z.number().int().positive().optional(),
|
|
1941
|
-
probeIntervalMs: z.number().int().min(1e3).optional()
|
|
1975
|
+
probeIntervalMs: z.number().int().min(1e3).optional(),
|
|
1976
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
1942
1977
|
}).strict(),
|
|
1943
1978
|
z.object({
|
|
1944
1979
|
type: z.literal("pi"),
|
|
@@ -1946,7 +1981,8 @@ var BackendDefSchema = z.discriminatedUnion("type", [
|
|
|
1946
1981
|
model: ModelSchema,
|
|
1947
1982
|
apiKey: z.string().optional(),
|
|
1948
1983
|
timeoutMs: z.number().int().positive().optional(),
|
|
1949
|
-
probeIntervalMs: z.number().int().min(1e3).optional()
|
|
1984
|
+
probeIntervalMs: z.number().int().min(1e3).optional(),
|
|
1985
|
+
capabilities: BackendCapabilitiesSchema.optional()
|
|
1950
1986
|
}).strict()
|
|
1951
1987
|
]);
|
|
1952
1988
|
var RoutingValueSchema = z.union([
|
|
@@ -1971,7 +2007,11 @@ var RoutingConfigSchema = z.object({
|
|
|
1971
2007
|
}).strict().optional(),
|
|
1972
2008
|
// --- Spec B Phase 0: new optional maps (resolver wired in Phase 1) ---
|
|
1973
2009
|
skills: z.record(z.string().min(1), RoutingValueSchema).optional(),
|
|
1974
|
-
modes: z.record(z.string().min(1), RoutingValueSchema).optional()
|
|
2010
|
+
modes: z.record(z.string().min(1), RoutingValueSchema).optional(),
|
|
2011
|
+
// --- AMR: opt-in adaptive-routing policy. Its PRESENCE flips the orchestrator
|
|
2012
|
+
// from identity/default dispatch to complexity-aware tier routing (default-off
|
|
2013
|
+
// when absent). Previously accepted by the runtime PUT endpoint only. ---
|
|
2014
|
+
policy: RoutingPolicySchema.optional()
|
|
1975
2015
|
}).strict();
|
|
1976
2016
|
var WorkflowStepSchema = z.object({
|
|
1977
2017
|
skill: z.string().min(1),
|
|
@@ -10794,26 +10834,6 @@ async function handleTrace(req, res, deps) {
|
|
|
10794
10834
|
}
|
|
10795
10835
|
return true;
|
|
10796
10836
|
}
|
|
10797
|
-
var CAPABILITY_TIER = z14.enum(["fast", "standard", "strong"]);
|
|
10798
|
-
var COMPLEXITY_LEVEL = z14.enum(["trivial", "simple", "moderate", "complex"]);
|
|
10799
|
-
var PRIVACY_CLASS = z14.enum(["on-device", "byo-endpoint", "shared-cloud"]);
|
|
10800
|
-
var RoutingPolicySchema = z14.object({
|
|
10801
|
-
complexityTierMatrix: z14.record(COMPLEXITY_LEVEL, CAPABILITY_TIER).optional(),
|
|
10802
|
-
skillTierOverrides: z14.record(z14.string(), CAPABILITY_TIER).optional(),
|
|
10803
|
-
privacyFloor: PRIVACY_CLASS.optional(),
|
|
10804
|
-
budget: z14.object({
|
|
10805
|
-
capUsd: z14.number(),
|
|
10806
|
-
degradeAtPct: z14.number().optional(),
|
|
10807
|
-
onBudgetExhausted: z14.enum(["degrade", "pause", "human"])
|
|
10808
|
-
}).optional(),
|
|
10809
|
-
sensitivePaths: z14.array(z14.string()).optional(),
|
|
10810
|
-
escalationThreshold: z14.number().optional(),
|
|
10811
|
-
allowedProviders: z14.array(z14.string()).optional(),
|
|
10812
|
-
acceptanceEval: z14.object({
|
|
10813
|
-
enabled: z14.boolean(),
|
|
10814
|
-
model: z14.string().optional()
|
|
10815
|
-
}).optional()
|
|
10816
|
-
});
|
|
10817
10837
|
async function handlePolicy(req, res, deps) {
|
|
10818
10838
|
if (!deps.ingestRoutingPolicy || deps.router === null) return unavailable(res);
|
|
10819
10839
|
let raw;
|