@wrongstack/core 0.8.2 → 0.8.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/defaults/index.js +11 -5
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +10 -4
- package/dist/execution/index.js +11 -5
- package/dist/execution/index.js.map +1 -1
- package/dist/index.d.ts +416 -2
- package/dist/index.js +896 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/defaults/index.js
CHANGED
|
@@ -4842,12 +4842,18 @@ var AutoCompactionMiddleware = class _AutoCompactionMiddleware {
|
|
|
4842
4842
|
failureMode;
|
|
4843
4843
|
policyProvider;
|
|
4844
4844
|
/**
|
|
4845
|
-
*
|
|
4846
|
-
*
|
|
4847
|
-
*
|
|
4848
|
-
*
|
|
4845
|
+
* Calibration factor applied to the estimator output. The estimator is now
|
|
4846
|
+
* expected to already include messages + system prompt + tool definitions
|
|
4847
|
+
* (see `estimateRequestTokens.total`), so no overhead boost is needed. Kept
|
|
4848
|
+
* as a constant so a future calibration against real provider tokenization
|
|
4849
|
+
* (BPE vs the chars/3.5 rough estimator) can dial this without touching the
|
|
4850
|
+
* threshold-check math.
|
|
4851
|
+
*
|
|
4852
|
+
* Historical note: was 1.3 when the estimator only counted messages — that
|
|
4853
|
+
* double-counted system+tools once the estimator was upgraded, firing
|
|
4854
|
+
* compaction ~30% earlier than intended (e.g. real 56% load showed as 73%).
|
|
4849
4855
|
*/
|
|
4850
|
-
static OVERHEAD_FACTOR = 1
|
|
4856
|
+
static OVERHEAD_FACTOR = 1;
|
|
4851
4857
|
/**
|
|
4852
4858
|
* Once a compaction attempt reduces nothing (preserveK protects everything,
|
|
4853
4859
|
* no oversized tool_results remain to elide), retrying on every iteration
|