@martian-engineering/lossless-claw 0.2.0 → 0.2.1

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  > ⚠️ **Current requirement:** This plugin currently requires a custom OpenClaw build with [PR #22201](https://github.com/openclaw/openclaw/pull/22201) applied until that PR is merged upstream.
4
4
 
5
- Lossless Context Management plugin for [OpenClaw](https://github.com/openclaw/openclaw), based on the [LCM paper](https://voltropy.com/LCM). Replaces OpenClaw's built-in sliding-window compaction with a DAG-based summarization system that preserves every message while keeping active context within model token limits.
5
+ Lossless Context Management plugin for [OpenClaw](https://github.com/openclaw/openclaw), based on the [LCM paper](https://papers.voltropy.com/LCM). Replaces OpenClaw's built-in sliding-window compaction with a DAG-based summarization system that preserves every message while keeping active context within model token limits.
6
6
 
7
7
  ## What it does
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@martian-engineering/lossless-claw",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Lossless Context Management plugin for OpenClaw — DAG-based conversation summarization with incremental compaction",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/src/compaction.ts CHANGED
@@ -795,14 +795,13 @@ export class CompactionEngine {
795
795
  private resolveIncrementalMaxDepth(): number {
796
796
  if (
797
797
  typeof this.config.incrementalMaxDepth === "number" &&
798
- Number.isFinite(this.config.incrementalMaxDepth) &&
799
- this.config.incrementalMaxDepth > 0
798
+ Number.isFinite(this.config.incrementalMaxDepth)
800
799
  ) {
801
- return Math.floor(this.config.incrementalMaxDepth);
800
+ if (this.config.incrementalMaxDepth < 0) return Infinity;
801
+ if (this.config.incrementalMaxDepth > 0) return Math.floor(this.config.incrementalMaxDepth);
802
802
  }
803
803
  return 0;
804
804
  }
805
-
806
805
  private resolveFanoutForDepth(targetDepth: number, hardTrigger: boolean): number {
807
806
  if (hardTrigger) {
808
807
  return this.resolveCondensedMinFanoutHard();