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 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 160000), or the assumed 236k context window minus a 16k reserve if
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
@@ -31,7 +31,7 @@ export const defaultConfig = {
31
31
  enabled: true,
32
32
  contextWindow: 236_000,
33
33
  reserveTokens: 16_000,
34
- thresholdTokens: 160_000,
34
+ thresholdTokens: 200_000,
35
35
  keepRecentTokens: 20_000,
36
36
  };
37
37
  /**
@@ -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 160k threshold", () => Effect.gen(function* () {
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: 160_000,
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
- [159_999, false],
162
- [160_000, false],
163
- [160_001, true],
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: 16e4,
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.1";
28516
+ var version$1 = "0.22.2";
28517
28517
  // src/ClaudeAgent.ts
28518
28518
  const minimumClaudeCodeVersion = "2.1.248";
28519
28519
  const serverName = "clanka";