@dexto/core 1.5.2 → 1.5.4
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/agent/DextoAgent.cjs +296 -2
- package/dist/agent/DextoAgent.d.ts +114 -0
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +287 -2
- package/dist/agent/schemas.d.ts +93 -21
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/approval/manager.cjs +16 -0
- package/dist/approval/manager.d.ts +10 -0
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +16 -0
- package/dist/approval/types.d.ts +11 -0
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/context/compaction/overflow.cjs +6 -10
- package/dist/context/compaction/overflow.d.ts +14 -11
- package/dist/context/compaction/overflow.d.ts.map +1 -1
- package/dist/context/compaction/overflow.js +6 -10
- package/dist/context/compaction/providers/reactive-overflow-provider.cjs +15 -0
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts +15 -0
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts.map +1 -1
- package/dist/context/compaction/providers/reactive-overflow-provider.js +15 -0
- package/dist/context/compaction/schemas.cjs +22 -2
- package/dist/context/compaction/schemas.d.ts +45 -0
- package/dist/context/compaction/schemas.d.ts.map +1 -1
- package/dist/context/compaction/schemas.js +22 -2
- package/dist/context/compaction/strategies/reactive-overflow.cjs +166 -26
- package/dist/context/compaction/strategies/reactive-overflow.d.ts +21 -0
- package/dist/context/compaction/strategies/reactive-overflow.d.ts.map +1 -1
- package/dist/context/compaction/strategies/reactive-overflow.js +166 -26
- package/dist/context/manager.cjs +278 -31
- package/dist/context/manager.d.ts +192 -5
- package/dist/context/manager.d.ts.map +1 -1
- package/dist/context/manager.js +285 -32
- package/dist/context/types.d.ts +6 -0
- package/dist/context/types.d.ts.map +1 -1
- package/dist/context/utils.cjs +77 -11
- package/dist/context/utils.d.ts +86 -8
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/context/utils.js +71 -11
- package/dist/events/index.cjs +7 -1
- package/dist/events/index.d.ts +58 -7
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +7 -1
- package/dist/filesystem/filesystem-service.cjs +18 -15
- package/dist/filesystem/filesystem-service.d.ts +3 -3
- package/dist/filesystem/filesystem-service.d.ts.map +1 -1
- package/dist/filesystem/filesystem-service.js +18 -15
- package/dist/filesystem/path-validator.cjs +16 -7
- package/dist/filesystem/path-validator.d.ts +10 -3
- package/dist/filesystem/path-validator.d.ts.map +1 -1
- package/dist/filesystem/path-validator.js +16 -7
- package/dist/filesystem/types.d.ts +4 -0
- package/dist/filesystem/types.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.cjs +19 -1
- package/dist/llm/executor/stream-processor.d.ts +3 -0
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +19 -1
- package/dist/llm/executor/turn-executor.cjs +219 -30
- package/dist/llm/executor/turn-executor.d.ts +62 -10
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +219 -30
- package/dist/llm/executor/types.d.ts +28 -0
- package/dist/llm/executor/types.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.cjs +36 -28
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +36 -28
- package/dist/llm/services/factory.cjs +3 -2
- package/dist/llm/services/factory.d.ts +3 -1
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +3 -2
- package/dist/llm/services/vercel.cjs +34 -6
- package/dist/llm/services/vercel.d.ts +23 -3
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +34 -6
- package/dist/logger/v2/schemas.cjs +4 -0
- package/dist/logger/v2/schemas.d.ts +16 -0
- package/dist/logger/v2/schemas.d.ts.map +1 -1
- package/dist/logger/v2/schemas.js +4 -0
- package/dist/logger/v2/transport-factory.cjs +4 -1
- package/dist/logger/v2/transport-factory.d.ts.map +1 -1
- package/dist/logger/v2/transport-factory.js +4 -1
- package/dist/logger/v2/transports/silent-transport.cjs +33 -0
- package/dist/logger/v2/transports/silent-transport.d.ts +15 -0
- package/dist/logger/v2/transports/silent-transport.d.ts.map +1 -0
- package/dist/logger/v2/transports/silent-transport.js +10 -0
- package/dist/session/chat-session.cjs +20 -11
- package/dist/session/chat-session.d.ts +9 -4
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +20 -11
- package/dist/session/compaction-service.cjs +139 -0
- package/dist/session/compaction-service.d.ts +81 -0
- package/dist/session/compaction-service.d.ts.map +1 -0
- package/dist/session/compaction-service.js +106 -0
- package/dist/session/session-manager.cjs +146 -0
- package/dist/session/session-manager.d.ts +50 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +146 -0
- package/dist/session/title-generator.cjs +2 -2
- package/dist/session/title-generator.js +2 -2
- package/dist/systemPrompt/in-built-prompts.cjs +36 -0
- package/dist/systemPrompt/in-built-prompts.d.ts +18 -1
- package/dist/systemPrompt/in-built-prompts.d.ts.map +1 -1
- package/dist/systemPrompt/in-built-prompts.js +25 -0
- package/dist/systemPrompt/manager.cjs +22 -0
- package/dist/systemPrompt/manager.d.ts +10 -0
- package/dist/systemPrompt/manager.d.ts.map +1 -1
- package/dist/systemPrompt/manager.js +22 -0
- package/dist/systemPrompt/registry.cjs +2 -1
- package/dist/systemPrompt/registry.d.ts +1 -1
- package/dist/systemPrompt/registry.d.ts.map +1 -1
- package/dist/systemPrompt/registry.js +2 -1
- package/dist/systemPrompt/schemas.cjs +7 -0
- package/dist/systemPrompt/schemas.d.ts +13 -13
- package/dist/systemPrompt/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.js +7 -0
- package/dist/tools/error-codes.cjs +1 -0
- package/dist/tools/error-codes.d.ts +1 -0
- package/dist/tools/error-codes.d.ts.map +1 -1
- package/dist/tools/error-codes.js +1 -0
- package/dist/tools/errors.cjs +17 -0
- package/dist/tools/errors.d.ts +9 -0
- package/dist/tools/errors.d.ts.map +1 -1
- package/dist/tools/errors.js +17 -0
- package/dist/tools/internal-tools/provider.cjs +3 -2
- package/dist/tools/internal-tools/provider.d.ts +1 -1
- package/dist/tools/internal-tools/provider.d.ts.map +1 -1
- package/dist/tools/internal-tools/provider.js +3 -2
- package/dist/tools/tool-manager.cjs +77 -4
- package/dist/tools/tool-manager.d.ts +18 -0
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +78 -5
- package/dist/tools/types.d.ts +5 -3
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/index.cjs +3 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
package/dist/agent/schemas.d.ts
CHANGED
|
@@ -1138,18 +1138,18 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
1138
1138
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1139
1139
|
} & {
|
|
1140
1140
|
type: z.ZodLiteral<"dynamic">;
|
|
1141
|
-
source: z.ZodEnum<["date", "resources"]>;
|
|
1141
|
+
source: z.ZodEnum<["date", "env", "resources"]>;
|
|
1142
1142
|
}, "strict", z.ZodTypeAny, {
|
|
1143
1143
|
type: "dynamic";
|
|
1144
1144
|
enabled: boolean;
|
|
1145
1145
|
id: string;
|
|
1146
1146
|
priority: number;
|
|
1147
|
-
source: "date" | "resources";
|
|
1147
|
+
source: "date" | "env" | "resources";
|
|
1148
1148
|
}, {
|
|
1149
1149
|
type: "dynamic";
|
|
1150
1150
|
id: string;
|
|
1151
1151
|
priority: number;
|
|
1152
|
-
source: "date" | "resources";
|
|
1152
|
+
source: "date" | "env" | "resources";
|
|
1153
1153
|
enabled?: boolean | undefined;
|
|
1154
1154
|
}>, z.ZodObject<{
|
|
1155
1155
|
id: z.ZodString;
|
|
@@ -1216,7 +1216,7 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
1216
1216
|
enabled: boolean;
|
|
1217
1217
|
id: string;
|
|
1218
1218
|
priority: number;
|
|
1219
|
-
source: "date" | "resources";
|
|
1219
|
+
source: "date" | "env" | "resources";
|
|
1220
1220
|
} | {
|
|
1221
1221
|
type: "file";
|
|
1222
1222
|
options: {
|
|
@@ -1242,7 +1242,7 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
1242
1242
|
type: "dynamic";
|
|
1243
1243
|
id: string;
|
|
1244
1244
|
priority: number;
|
|
1245
|
-
source: "date" | "resources";
|
|
1245
|
+
source: "date" | "env" | "resources";
|
|
1246
1246
|
enabled?: boolean | undefined;
|
|
1247
1247
|
} | {
|
|
1248
1248
|
type: "file";
|
|
@@ -2376,6 +2376,12 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
2376
2376
|
logger: z.ZodDefault<z.ZodObject<{
|
|
2377
2377
|
level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error", "silly"]>>;
|
|
2378
2378
|
transports: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2379
|
+
type: z.ZodLiteral<"silent">;
|
|
2380
|
+
}, "strict", z.ZodTypeAny, {
|
|
2381
|
+
type: "silent";
|
|
2382
|
+
}, {
|
|
2383
|
+
type: "silent";
|
|
2384
|
+
}>, z.ZodObject<{
|
|
2379
2385
|
type: z.ZodLiteral<"console">;
|
|
2380
2386
|
colorize: z.ZodDefault<z.ZodBoolean>;
|
|
2381
2387
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -2424,6 +2430,8 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
2424
2430
|
}, "strict", z.ZodTypeAny, {
|
|
2425
2431
|
level: "debug" | "info" | "warn" | "error" | "silly";
|
|
2426
2432
|
transports: ({
|
|
2433
|
+
type: "silent";
|
|
2434
|
+
} | {
|
|
2427
2435
|
type: "console";
|
|
2428
2436
|
colorize: boolean;
|
|
2429
2437
|
} | {
|
|
@@ -2442,6 +2450,8 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
2442
2450
|
}, {
|
|
2443
2451
|
level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
|
|
2444
2452
|
transports?: ({
|
|
2453
|
+
type: "silent";
|
|
2454
|
+
} | {
|
|
2445
2455
|
type: "console";
|
|
2446
2456
|
colorize?: boolean | undefined;
|
|
2447
2457
|
} | {
|
|
@@ -3173,12 +3183,18 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
3173
3183
|
compaction: z.ZodDefault<z.ZodObject<{
|
|
3174
3184
|
type: z.ZodString;
|
|
3175
3185
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3186
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
3187
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
3176
3188
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3177
3189
|
type: z.ZodString;
|
|
3178
3190
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3191
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
3192
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
3179
3193
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3180
3194
|
type: z.ZodString;
|
|
3181
3195
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3196
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
3197
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
3182
3198
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
3183
3199
|
}, "strict", z.ZodTypeAny, {
|
|
3184
3200
|
llm: {
|
|
@@ -3253,6 +3269,8 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
3253
3269
|
logger: {
|
|
3254
3270
|
level: "debug" | "info" | "warn" | "error" | "silly";
|
|
3255
3271
|
transports: ({
|
|
3272
|
+
type: "silent";
|
|
3273
|
+
} | {
|
|
3256
3274
|
type: "console";
|
|
3257
3275
|
colorize: boolean;
|
|
3258
3276
|
} | {
|
|
@@ -3300,7 +3318,7 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
3300
3318
|
enabled: boolean;
|
|
3301
3319
|
id: string;
|
|
3302
3320
|
priority: number;
|
|
3303
|
-
source: "date" | "resources";
|
|
3321
|
+
source: "date" | "env" | "resources";
|
|
3304
3322
|
} | {
|
|
3305
3323
|
type: "file";
|
|
3306
3324
|
options: {
|
|
@@ -3405,6 +3423,8 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
3405
3423
|
compaction: {
|
|
3406
3424
|
type: string;
|
|
3407
3425
|
enabled: boolean;
|
|
3426
|
+
thresholdPercent: number;
|
|
3427
|
+
maxContextTokens?: number | undefined;
|
|
3408
3428
|
} & {
|
|
3409
3429
|
[k: string]: unknown;
|
|
3410
3430
|
};
|
|
@@ -3617,7 +3637,7 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
3617
3637
|
type: "dynamic";
|
|
3618
3638
|
id: string;
|
|
3619
3639
|
priority: number;
|
|
3620
|
-
source: "date" | "resources";
|
|
3640
|
+
source: "date" | "env" | "resources";
|
|
3621
3641
|
enabled?: boolean | undefined;
|
|
3622
3642
|
} | {
|
|
3623
3643
|
type: "file";
|
|
@@ -3707,6 +3727,8 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
3707
3727
|
logger?: {
|
|
3708
3728
|
level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
|
|
3709
3729
|
transports?: ({
|
|
3730
|
+
type: "silent";
|
|
3731
|
+
} | {
|
|
3710
3732
|
type: "console";
|
|
3711
3733
|
colorize?: boolean | undefined;
|
|
3712
3734
|
} | {
|
|
@@ -4004,6 +4026,8 @@ export declare function createAgentConfigSchema(options?: LLMValidationOptions):
|
|
|
4004
4026
|
compaction?: z.objectInputType<{
|
|
4005
4027
|
type: z.ZodString;
|
|
4006
4028
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4029
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
4030
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
4007
4031
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
4008
4032
|
}>, "ValidatedAgentConfig">;
|
|
4009
4033
|
/**
|
|
@@ -4045,18 +4069,18 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
4045
4069
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
4046
4070
|
} & {
|
|
4047
4071
|
type: z.ZodLiteral<"dynamic">;
|
|
4048
|
-
source: z.ZodEnum<["date", "resources"]>;
|
|
4072
|
+
source: z.ZodEnum<["date", "env", "resources"]>;
|
|
4049
4073
|
}, "strict", z.ZodTypeAny, {
|
|
4050
4074
|
type: "dynamic";
|
|
4051
4075
|
enabled: boolean;
|
|
4052
4076
|
id: string;
|
|
4053
4077
|
priority: number;
|
|
4054
|
-
source: "date" | "resources";
|
|
4078
|
+
source: "date" | "env" | "resources";
|
|
4055
4079
|
}, {
|
|
4056
4080
|
type: "dynamic";
|
|
4057
4081
|
id: string;
|
|
4058
4082
|
priority: number;
|
|
4059
|
-
source: "date" | "resources";
|
|
4083
|
+
source: "date" | "env" | "resources";
|
|
4060
4084
|
enabled?: boolean | undefined;
|
|
4061
4085
|
}>, z.ZodObject<{
|
|
4062
4086
|
id: z.ZodString;
|
|
@@ -4123,7 +4147,7 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
4123
4147
|
enabled: boolean;
|
|
4124
4148
|
id: string;
|
|
4125
4149
|
priority: number;
|
|
4126
|
-
source: "date" | "resources";
|
|
4150
|
+
source: "date" | "env" | "resources";
|
|
4127
4151
|
} | {
|
|
4128
4152
|
type: "file";
|
|
4129
4153
|
options: {
|
|
@@ -4149,7 +4173,7 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
4149
4173
|
type: "dynamic";
|
|
4150
4174
|
id: string;
|
|
4151
4175
|
priority: number;
|
|
4152
|
-
source: "date" | "resources";
|
|
4176
|
+
source: "date" | "env" | "resources";
|
|
4153
4177
|
enabled?: boolean | undefined;
|
|
4154
4178
|
} | {
|
|
4155
4179
|
type: "file";
|
|
@@ -5283,6 +5307,12 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
5283
5307
|
logger: z.ZodDefault<z.ZodObject<{
|
|
5284
5308
|
level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error", "silly"]>>;
|
|
5285
5309
|
transports: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
5310
|
+
type: z.ZodLiteral<"silent">;
|
|
5311
|
+
}, "strict", z.ZodTypeAny, {
|
|
5312
|
+
type: "silent";
|
|
5313
|
+
}, {
|
|
5314
|
+
type: "silent";
|
|
5315
|
+
}>, z.ZodObject<{
|
|
5286
5316
|
type: z.ZodLiteral<"console">;
|
|
5287
5317
|
colorize: z.ZodDefault<z.ZodBoolean>;
|
|
5288
5318
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -5331,6 +5361,8 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
5331
5361
|
}, "strict", z.ZodTypeAny, {
|
|
5332
5362
|
level: "debug" | "info" | "warn" | "error" | "silly";
|
|
5333
5363
|
transports: ({
|
|
5364
|
+
type: "silent";
|
|
5365
|
+
} | {
|
|
5334
5366
|
type: "console";
|
|
5335
5367
|
colorize: boolean;
|
|
5336
5368
|
} | {
|
|
@@ -5349,6 +5381,8 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
5349
5381
|
}, {
|
|
5350
5382
|
level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
|
|
5351
5383
|
transports?: ({
|
|
5384
|
+
type: "silent";
|
|
5385
|
+
} | {
|
|
5352
5386
|
type: "console";
|
|
5353
5387
|
colorize?: boolean | undefined;
|
|
5354
5388
|
} | {
|
|
@@ -6080,12 +6114,18 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6080
6114
|
compaction: z.ZodDefault<z.ZodObject<{
|
|
6081
6115
|
type: z.ZodString;
|
|
6082
6116
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
6117
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
6118
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
6083
6119
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
6084
6120
|
type: z.ZodString;
|
|
6085
6121
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
6122
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
6123
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
6086
6124
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
6087
6125
|
type: z.ZodString;
|
|
6088
6126
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
6127
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
6128
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
6089
6129
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
6090
6130
|
}, "strict", z.ZodTypeAny, {
|
|
6091
6131
|
llm: {
|
|
@@ -6160,6 +6200,8 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6160
6200
|
logger: {
|
|
6161
6201
|
level: "debug" | "info" | "warn" | "error" | "silly";
|
|
6162
6202
|
transports: ({
|
|
6203
|
+
type: "silent";
|
|
6204
|
+
} | {
|
|
6163
6205
|
type: "console";
|
|
6164
6206
|
colorize: boolean;
|
|
6165
6207
|
} | {
|
|
@@ -6207,7 +6249,7 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6207
6249
|
enabled: boolean;
|
|
6208
6250
|
id: string;
|
|
6209
6251
|
priority: number;
|
|
6210
|
-
source: "date" | "resources";
|
|
6252
|
+
source: "date" | "env" | "resources";
|
|
6211
6253
|
} | {
|
|
6212
6254
|
type: "file";
|
|
6213
6255
|
options: {
|
|
@@ -6312,6 +6354,8 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6312
6354
|
compaction: {
|
|
6313
6355
|
type: string;
|
|
6314
6356
|
enabled: boolean;
|
|
6357
|
+
thresholdPercent: number;
|
|
6358
|
+
maxContextTokens?: number | undefined;
|
|
6315
6359
|
} & {
|
|
6316
6360
|
[k: string]: unknown;
|
|
6317
6361
|
};
|
|
@@ -6524,7 +6568,7 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6524
6568
|
type: "dynamic";
|
|
6525
6569
|
id: string;
|
|
6526
6570
|
priority: number;
|
|
6527
|
-
source: "date" | "resources";
|
|
6571
|
+
source: "date" | "env" | "resources";
|
|
6528
6572
|
enabled?: boolean | undefined;
|
|
6529
6573
|
} | {
|
|
6530
6574
|
type: "file";
|
|
@@ -6614,6 +6658,8 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6614
6658
|
logger?: {
|
|
6615
6659
|
level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
|
|
6616
6660
|
transports?: ({
|
|
6661
|
+
type: "silent";
|
|
6662
|
+
} | {
|
|
6617
6663
|
type: "console";
|
|
6618
6664
|
colorize?: boolean | undefined;
|
|
6619
6665
|
} | {
|
|
@@ -6911,6 +6957,8 @@ export declare const AgentConfigSchema: z.ZodBranded<z.ZodObject<{
|
|
|
6911
6957
|
compaction?: z.objectInputType<{
|
|
6912
6958
|
type: z.ZodString;
|
|
6913
6959
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
6960
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
6961
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
6914
6962
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6915
6963
|
}>, "ValidatedAgentConfig">;
|
|
6916
6964
|
/**
|
|
@@ -6952,18 +7000,18 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
6952
7000
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
6953
7001
|
} & {
|
|
6954
7002
|
type: z.ZodLiteral<"dynamic">;
|
|
6955
|
-
source: z.ZodEnum<["date", "resources"]>;
|
|
7003
|
+
source: z.ZodEnum<["date", "env", "resources"]>;
|
|
6956
7004
|
}, "strict", z.ZodTypeAny, {
|
|
6957
7005
|
type: "dynamic";
|
|
6958
7006
|
enabled: boolean;
|
|
6959
7007
|
id: string;
|
|
6960
7008
|
priority: number;
|
|
6961
|
-
source: "date" | "resources";
|
|
7009
|
+
source: "date" | "env" | "resources";
|
|
6962
7010
|
}, {
|
|
6963
7011
|
type: "dynamic";
|
|
6964
7012
|
id: string;
|
|
6965
7013
|
priority: number;
|
|
6966
|
-
source: "date" | "resources";
|
|
7014
|
+
source: "date" | "env" | "resources";
|
|
6967
7015
|
enabled?: boolean | undefined;
|
|
6968
7016
|
}>, z.ZodObject<{
|
|
6969
7017
|
id: z.ZodString;
|
|
@@ -7030,7 +7078,7 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
7030
7078
|
enabled: boolean;
|
|
7031
7079
|
id: string;
|
|
7032
7080
|
priority: number;
|
|
7033
|
-
source: "date" | "resources";
|
|
7081
|
+
source: "date" | "env" | "resources";
|
|
7034
7082
|
} | {
|
|
7035
7083
|
type: "file";
|
|
7036
7084
|
options: {
|
|
@@ -7056,7 +7104,7 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
7056
7104
|
type: "dynamic";
|
|
7057
7105
|
id: string;
|
|
7058
7106
|
priority: number;
|
|
7059
|
-
source: "date" | "resources";
|
|
7107
|
+
source: "date" | "env" | "resources";
|
|
7060
7108
|
enabled?: boolean | undefined;
|
|
7061
7109
|
} | {
|
|
7062
7110
|
type: "file";
|
|
@@ -8190,6 +8238,12 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
8190
8238
|
logger: z.ZodDefault<z.ZodObject<{
|
|
8191
8239
|
level: z.ZodDefault<z.ZodEnum<["debug", "info", "warn", "error", "silly"]>>;
|
|
8192
8240
|
transports: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
8241
|
+
type: z.ZodLiteral<"silent">;
|
|
8242
|
+
}, "strict", z.ZodTypeAny, {
|
|
8243
|
+
type: "silent";
|
|
8244
|
+
}, {
|
|
8245
|
+
type: "silent";
|
|
8246
|
+
}>, z.ZodObject<{
|
|
8193
8247
|
type: z.ZodLiteral<"console">;
|
|
8194
8248
|
colorize: z.ZodDefault<z.ZodBoolean>;
|
|
8195
8249
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -8238,6 +8292,8 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
8238
8292
|
}, "strict", z.ZodTypeAny, {
|
|
8239
8293
|
level: "debug" | "info" | "warn" | "error" | "silly";
|
|
8240
8294
|
transports: ({
|
|
8295
|
+
type: "silent";
|
|
8296
|
+
} | {
|
|
8241
8297
|
type: "console";
|
|
8242
8298
|
colorize: boolean;
|
|
8243
8299
|
} | {
|
|
@@ -8256,6 +8312,8 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
8256
8312
|
}, {
|
|
8257
8313
|
level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
|
|
8258
8314
|
transports?: ({
|
|
8315
|
+
type: "silent";
|
|
8316
|
+
} | {
|
|
8259
8317
|
type: "console";
|
|
8260
8318
|
colorize?: boolean | undefined;
|
|
8261
8319
|
} | {
|
|
@@ -8987,12 +9045,18 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
8987
9045
|
compaction: z.ZodDefault<z.ZodObject<{
|
|
8988
9046
|
type: z.ZodString;
|
|
8989
9047
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
9048
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
9049
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
8990
9050
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
8991
9051
|
type: z.ZodString;
|
|
8992
9052
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
9053
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
9054
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
8993
9055
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
8994
9056
|
type: z.ZodString;
|
|
8995
9057
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
9058
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
9059
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
8996
9060
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
8997
9061
|
}, "strict", z.ZodTypeAny, {
|
|
8998
9062
|
llm: {
|
|
@@ -9067,6 +9131,8 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
9067
9131
|
logger: {
|
|
9068
9132
|
level: "debug" | "info" | "warn" | "error" | "silly";
|
|
9069
9133
|
transports: ({
|
|
9134
|
+
type: "silent";
|
|
9135
|
+
} | {
|
|
9070
9136
|
type: "console";
|
|
9071
9137
|
colorize: boolean;
|
|
9072
9138
|
} | {
|
|
@@ -9114,7 +9180,7 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
9114
9180
|
enabled: boolean;
|
|
9115
9181
|
id: string;
|
|
9116
9182
|
priority: number;
|
|
9117
|
-
source: "date" | "resources";
|
|
9183
|
+
source: "date" | "env" | "resources";
|
|
9118
9184
|
} | {
|
|
9119
9185
|
type: "file";
|
|
9120
9186
|
options: {
|
|
@@ -9219,6 +9285,8 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
9219
9285
|
compaction: {
|
|
9220
9286
|
type: string;
|
|
9221
9287
|
enabled: boolean;
|
|
9288
|
+
thresholdPercent: number;
|
|
9289
|
+
maxContextTokens?: number | undefined;
|
|
9222
9290
|
} & {
|
|
9223
9291
|
[k: string]: unknown;
|
|
9224
9292
|
};
|
|
@@ -9431,7 +9499,7 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
9431
9499
|
type: "dynamic";
|
|
9432
9500
|
id: string;
|
|
9433
9501
|
priority: number;
|
|
9434
|
-
source: "date" | "resources";
|
|
9502
|
+
source: "date" | "env" | "resources";
|
|
9435
9503
|
enabled?: boolean | undefined;
|
|
9436
9504
|
} | {
|
|
9437
9505
|
type: "file";
|
|
@@ -9521,6 +9589,8 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
9521
9589
|
logger?: {
|
|
9522
9590
|
level?: "debug" | "info" | "warn" | "error" | "silly" | undefined;
|
|
9523
9591
|
transports?: ({
|
|
9592
|
+
type: "silent";
|
|
9593
|
+
} | {
|
|
9524
9594
|
type: "console";
|
|
9525
9595
|
colorize?: boolean | undefined;
|
|
9526
9596
|
} | {
|
|
@@ -9818,6 +9888,8 @@ export declare const AgentConfigSchemaRelaxed: z.ZodBranded<z.ZodObject<{
|
|
|
9818
9888
|
compaction?: z.objectInputType<{
|
|
9819
9889
|
type: z.ZodString;
|
|
9820
9890
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
9891
|
+
maxContextTokens: z.ZodOptional<z.ZodNumber>;
|
|
9892
|
+
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
9821
9893
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
9822
9894
|
}>, "ValidatedAgentConfig">;
|
|
9823
9895
|
export type AgentConfig = z.input<typeof AgentConfigSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/agent/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAyB,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAkBxF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM/B,CAAC;AAkEH;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAA6C,CAAC;AAGnF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAGtE,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -463,6 +463,22 @@ class ApprovalManager {
|
|
|
463
463
|
getPendingApprovalRequests() {
|
|
464
464
|
return this.handler?.getPendingRequests?.() ?? [];
|
|
465
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* Auto-approve pending requests that match a predicate.
|
|
468
|
+
* Used when a pattern is remembered to auto-approve other parallel requests
|
|
469
|
+
* that would now match the same pattern.
|
|
470
|
+
*
|
|
471
|
+
* @param predicate Function that returns true for requests that should be auto-approved
|
|
472
|
+
* @param responseData Optional data to include in the auto-approval response
|
|
473
|
+
* @returns Number of requests that were auto-approved
|
|
474
|
+
*/
|
|
475
|
+
autoApprovePendingRequests(predicate, responseData) {
|
|
476
|
+
const count = this.handler?.autoApprovePending?.(predicate, responseData) ?? 0;
|
|
477
|
+
if (count > 0) {
|
|
478
|
+
this.logger.info(`Auto-approved ${count} pending request(s) due to matching pattern`);
|
|
479
|
+
}
|
|
480
|
+
return count;
|
|
481
|
+
}
|
|
466
482
|
/**
|
|
467
483
|
* Get current configuration
|
|
468
484
|
*/
|
|
@@ -262,6 +262,16 @@ export declare class ApprovalManager {
|
|
|
262
262
|
* Get full pending approval requests
|
|
263
263
|
*/
|
|
264
264
|
getPendingApprovalRequests(): ApprovalRequest[];
|
|
265
|
+
/**
|
|
266
|
+
* Auto-approve pending requests that match a predicate.
|
|
267
|
+
* Used when a pattern is remembered to auto-approve other parallel requests
|
|
268
|
+
* that would now match the same pattern.
|
|
269
|
+
*
|
|
270
|
+
* @param predicate Function that returns true for requests that should be auto-approved
|
|
271
|
+
* @param responseData Optional data to include in the auto-approval response
|
|
272
|
+
* @returns Number of requests that were auto-approved
|
|
273
|
+
*/
|
|
274
|
+
autoApprovePendingRequests(predicate: (request: ApprovalRequest) => boolean, responseData?: Record<string, unknown>): number;
|
|
265
275
|
/**
|
|
266
276
|
* Get current configuration
|
|
267
277
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/approval/manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EAC1B,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,gBAAgB,EAAE;QACd,IAAI,EAAE,QAAQ,GAAG,cAAc,GAAG,WAAW,CAAC;QAC9C,OAA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lC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI;IASjD;;OAEG;IACH,YAAY,IAAI,IAAI;IAKpB;;OAEG;IACI,UAAU,IAAI,OAAO;IAI5B;;;OAGG;IACH,OAAO,CAAC,aAAa;CAgBxB"}
|
package/dist/approval/manager.js
CHANGED
|
@@ -431,6 +431,22 @@ class ApprovalManager {
|
|
|
431
431
|
getPendingApprovalRequests() {
|
|
432
432
|
return this.handler?.getPendingRequests?.() ?? [];
|
|
433
433
|
}
|
|
434
|
+
/**
|
|
435
|
+
* Auto-approve pending requests that match a predicate.
|
|
436
|
+
* Used when a pattern is remembered to auto-approve other parallel requests
|
|
437
|
+
* that would now match the same pattern.
|
|
438
|
+
*
|
|
439
|
+
* @param predicate Function that returns true for requests that should be auto-approved
|
|
440
|
+
* @param responseData Optional data to include in the auto-approval response
|
|
441
|
+
* @returns Number of requests that were auto-approved
|
|
442
|
+
*/
|
|
443
|
+
autoApprovePendingRequests(predicate, responseData) {
|
|
444
|
+
const count = this.handler?.autoApprovePending?.(predicate, responseData) ?? 0;
|
|
445
|
+
if (count > 0) {
|
|
446
|
+
this.logger.info(`Auto-approved ${count} pending request(s) due to matching pattern`);
|
|
447
|
+
}
|
|
448
|
+
return count;
|
|
449
|
+
}
|
|
434
450
|
/**
|
|
435
451
|
* Get current configuration
|
|
436
452
|
*/
|
package/dist/approval/types.d.ts
CHANGED
|
@@ -245,5 +245,16 @@ export interface ApprovalHandler {
|
|
|
245
245
|
* @remarks Not all handlers track pending requests (e.g., auto-approve handlers)
|
|
246
246
|
*/
|
|
247
247
|
getPendingRequests?(): ApprovalRequest[];
|
|
248
|
+
/**
|
|
249
|
+
* Auto-approve pending requests that match a predicate (optional)
|
|
250
|
+
* Used when a pattern is remembered to auto-approve other parallel requests
|
|
251
|
+
* that would now match the same pattern.
|
|
252
|
+
*
|
|
253
|
+
* @param predicate Function that returns true for requests that should be auto-approved
|
|
254
|
+
* @param responseData Optional data to include in the auto-approval response
|
|
255
|
+
* @returns Number of requests that were auto-approved
|
|
256
|
+
* @remarks Not all handlers support this (e.g., auto-approve handlers don't need it)
|
|
257
|
+
*/
|
|
258
|
+
autoApprovePending?(predicate: (request: ApprovalRequest) => boolean, responseData?: Record<string, unknown>): number;
|
|
248
259
|
}
|
|
249
260
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/approval/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACR,8BAA8B,EAC9B,iCAAiC,EACjC,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,kCAAkC,EAClC,qCAAqC,EACrC,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACjC,0BAA0B,EAC1B,8BAA8B,EAC9B,iCAAiC,EACjC,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACzB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,oBAAY,YAAY;IACpB;;;OAGG;IACH,iBAAiB,sBAAsB;IAEvC;;;;OAIG;IACH,oBAAoB,yBAAyB;IAE7C;;;OAGG;IACH,WAAW,gBAAgB;IAE3B;;;OAGG;IACH,gBAAgB,qBAAqB;IAErC;;;OAGG;IACH,MAAM,WAAW;CACpB;AAED;;GAEG;AACH,oBAAY,cAAc;IACtB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;CAC1B;AAED;;;GAGG;AACH,oBAAY,YAAY;IACpB,0CAA0C;IAC1C,WAAW,gBAAgB;IAC3B,oEAAoE;IACpE,aAAa,kBAAkB;IA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|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
const outputBuffer = Math.min(maxOutput, DEFAULT_OUTPUT_BUFFER);
|
|
29
|
-
const usableTokens = contextWindow - outputBuffer;
|
|
25
|
+
function isOverflow(tokens, modelLimits, thresholdPercent = 0.9) {
|
|
26
|
+
const { contextWindow } = modelLimits;
|
|
27
|
+
const effectiveLimit = Math.floor(contextWindow * thresholdPercent);
|
|
30
28
|
const inputTokens = tokens.inputTokens ?? 0;
|
|
31
|
-
return inputTokens >
|
|
29
|
+
return inputTokens > effectiveLimit;
|
|
32
30
|
}
|
|
33
31
|
function getCompactionTarget(modelLimits, targetPercentage = 0.7) {
|
|
34
|
-
const { contextWindow
|
|
35
|
-
|
|
36
|
-
const usableTokens = contextWindow - outputBuffer;
|
|
37
|
-
return Math.floor(usableTokens * targetPercentage);
|
|
32
|
+
const { contextWindow } = modelLimits;
|
|
33
|
+
return Math.floor(contextWindow * targetPercentage);
|
|
38
34
|
}
|
|
39
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
36
|
0 && (module.exports = {
|