clanka 0.22.1 → 0.22.2
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/README.md +1 -1
- package/dist/Compaction.js +1 -1
- package/dist/Compaction.test.js +5 -5
- package/dist/bin/cli.mjs +2 -2
- package/dist/bin/cli.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Compaction.test.ts +6 -6
- package/src/Compaction.ts +1 -1
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ the session picks. `--fast` applies to them as well.
|
|
|
70
70
|
|
|
71
71
|
Before each model call, clanka compacts the history into a summary once the
|
|
72
72
|
context passes `--compaction-threshold` tokens (`CLANKA_COMPACTION_THRESHOLD`,
|
|
73
|
-
default
|
|
73
|
+
default 200000), or the assumed 236k context window minus a 16k reserve if
|
|
74
74
|
that is lower. `--no-compaction` or `CLANKA_COMPACTION=false` turns it off.
|
|
75
75
|
|
|
76
76
|
## Claude Agent
|
package/dist/Compaction.js
CHANGED
package/dist/Compaction.test.js
CHANGED
|
@@ -138,13 +138,13 @@ describe("Compaction.estimateTokens", () => {
|
|
|
138
138
|
});
|
|
139
139
|
});
|
|
140
140
|
describe("Compaction.CompactionConfig", () => {
|
|
141
|
-
it.effect("defaults to a 236k window, a 16k reserve and a
|
|
141
|
+
it.effect("defaults to a 236k window, a 16k reserve and a 200k threshold", () => Effect.gen(function* () {
|
|
142
142
|
const config = yield* Compaction.CompactionConfig;
|
|
143
143
|
assert.deepStrictEqual(Compaction.defaultConfig, {
|
|
144
144
|
enabled: true,
|
|
145
145
|
contextWindow: 236_000,
|
|
146
146
|
reserveTokens: 16_000,
|
|
147
|
-
thresholdTokens:
|
|
147
|
+
thresholdTokens: 200_000,
|
|
148
148
|
keepRecentTokens: 20_000,
|
|
149
149
|
});
|
|
150
150
|
assert.deepStrictEqual(config, Compaction.defaultConfig);
|
|
@@ -158,9 +158,9 @@ describe("Compaction.shouldCompact", () => {
|
|
|
158
158
|
};
|
|
159
159
|
const small = Prompt.fromMessages([user("hi")]);
|
|
160
160
|
for (const [tokens, expected] of [
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
[
|
|
161
|
+
[199_999, false],
|
|
162
|
+
[200_000, false],
|
|
163
|
+
[200_001, true],
|
|
164
164
|
]) {
|
|
165
165
|
it(`returns ${expected} with default config and ${tokens} reported tokens`, () => {
|
|
166
166
|
assert.strictEqual(Compaction.shouldCompact({
|
package/dist/bin/cli.mjs
CHANGED
|
@@ -20183,7 +20183,7 @@ const defaultConfig = {
|
|
|
20183
20183
|
enabled: true,
|
|
20184
20184
|
contextWindow: 236e3,
|
|
20185
20185
|
reserveTokens: 16e3,
|
|
20186
|
-
thresholdTokens:
|
|
20186
|
+
thresholdTokens: 2e5,
|
|
20187
20187
|
keepRecentTokens: 2e4
|
|
20188
20188
|
};
|
|
20189
20189
|
var CompactionConfig = class CompactionConfig extends Reference("clanka/Compaction/CompactionConfig", { defaultValue: () => defaultConfig }) {
|
|
@@ -28513,7 +28513,7 @@ const transformToolCallParams$1 = fnUntraced(function* (options, toolName, toolP
|
|
|
28513
28513
|
return yield* decodeEffect(codec)(toolParams).pipe(flatMap$1((decoded) => encodeUnknownEffect(tool.parametersSchema)(decoded)), orElseSucceed(() => toolParams));
|
|
28514
28514
|
});
|
|
28515
28515
|
// package.json
|
|
28516
|
-
var version$1 = "0.22.
|
|
28516
|
+
var version$1 = "0.22.2";
|
|
28517
28517
|
// src/ClaudeAgent.ts
|
|
28518
28518
|
const minimumClaudeCodeVersion = "2.1.248";
|
|
28519
28519
|
const serverName = "clanka";
|