@martian-engineering/lossless-claw 0.9.4 → 0.11.0
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 +10 -3
- package/dist/index.js +329 -39
- package/docs/agent-tools.md +6 -6
- package/docs/architecture.md +17 -18
- package/docs/compaction-redesign-map.md +243 -0
- package/docs/configuration.md +40 -27
- package/docs/focus-briefs-implementation-plan.md +240 -0
- package/docs/tui.md +25 -1
- package/doctor-contract-api.d.ts +34 -0
- package/doctor-contract-api.js +349 -0
- package/openclaw.plugin.json +54 -24
- package/package.json +14 -21
- package/skills/lossless-claw/references/config.md +114 -51
- package/skills/lossless-claw/references/recall-tools.md +6 -0
package/README.md
CHANGED
|
@@ -65,6 +65,8 @@ The bundled skill focuses on configuration, diagnostics, architecture, and recal
|
|
|
65
65
|
- Node.js 22+
|
|
66
66
|
- An LLM provider configured in OpenClaw (used for summarization)
|
|
67
67
|
|
|
68
|
+
> **Compatibility:** `lossless-claw@0.10.0` and newer require OpenClaw `2026.5.12` or newer. These releases call OpenClaw's `api.runtime.llm.complete` capability for summarization, which is unavailable in older OpenClaw builds. If you cannot upgrade OpenClaw yet, stay on `lossless-claw@0.9.4` and remove `0.10.x`-only config such as `sweepMaxDepth`.
|
|
69
|
+
|
|
68
70
|
### Install the plugin
|
|
69
71
|
|
|
70
72
|
Use OpenClaw's plugin installer (recommended):
|
|
@@ -128,6 +130,10 @@ Add a `lossless-claw` entry under `plugins.entries` in your OpenClaw config:
|
|
|
128
130
|
"entries": {
|
|
129
131
|
"lossless-claw": {
|
|
130
132
|
"enabled": true,
|
|
133
|
+
"llm": {
|
|
134
|
+
"allowModelOverride": true,
|
|
135
|
+
"allowedModels": ["openai/gpt-5.4-mini"]
|
|
136
|
+
},
|
|
131
137
|
"config": {
|
|
132
138
|
"freshTailCount": 64,
|
|
133
139
|
"leafChunkTokens": 80000,
|
|
@@ -154,7 +160,7 @@ Add a `lossless-claw` entry under `plugins.entries` in your OpenClaw config:
|
|
|
154
160
|
}
|
|
155
161
|
```
|
|
156
162
|
|
|
157
|
-
`leafChunkTokens` controls how many source tokens can accumulate in a leaf compaction chunk before summarization is triggered. The default is `20000`, but quota-limited summary providers may benefit from a larger value to reduce compaction frequency. `summaryModel` and `summaryProvider` let you
|
|
163
|
+
`leafChunkTokens` controls how many source tokens can accumulate in a leaf compaction chunk before summarization is triggered. The default is `20000`, but quota-limited summary providers may benefit from a larger value to reduce compaction frequency. `summaryModel` and `summaryProvider` let you request a cheaper or faster compaction model through OpenClaw's `api.runtime.llm.complete` capability; OpenClaw still owns provider dispatch and auth. Explicit summary model requests require `llm.allowModelOverride` and matching `llm.allowedModels` policy entries for `lossless-claw`. `expansionModel` does the same for `lcm_expand_query` sub-agent calls (drilling into summaries to recover detail). `delegationTimeoutMs` controls how long `lcm_expand_query` waits for that delegated sub-agent to finish before returning a timeout error; it defaults to `120000` (120s). `summaryTimeoutMs` controls the per-call timeout for model-backed LCM summarization; it defaults to `60000` (60s). When unset, the model settings still fall back to OpenClaw's configured default model/provider. See [Expansion model override requirements](#expansion-model-override-requirements) for the required `subagent` trust policy when using `expansionModel`.
|
|
158
164
|
|
|
159
165
|
### Environment variables
|
|
160
166
|
|
|
@@ -228,6 +234,7 @@ Add a `subagent` policy under `plugins.entries.lossless-claw` and allowlist the
|
|
|
228
234
|
- `subagent.allowedModels` is optional but recommended. Use `"*"` only if you intentionally want to trust any target model.
|
|
229
235
|
- The chosen expansion target must also be available in OpenClaw's normal model catalog. If it is not already configured elsewhere, add it under the top-level `models` map as shown above.
|
|
230
236
|
- If you prefer splitting provider and model, set `config.expansionProvider` and use a bare `config.expansionModel`.
|
|
237
|
+
- `openclaw doctor --fix` can add the required `subagent` policy for a configured `expansionModel`. If a host still rejects a stale or unavailable override, `lcm_expand_query` retries once without the override so recall does not fail hard.
|
|
231
238
|
|
|
232
239
|
Plugin config equivalents:
|
|
233
240
|
|
|
@@ -250,11 +257,11 @@ For compaction summarization, lossless-claw resolves the model in this order:
|
|
|
250
257
|
1. `LCM_SUMMARY_MODEL` / `LCM_SUMMARY_PROVIDER`
|
|
251
258
|
2. Plugin config `summaryModel` / `summaryProvider`
|
|
252
259
|
3. OpenClaw's default compaction model/provider
|
|
253
|
-
4.
|
|
260
|
+
4. Runtime/session model/provider hints from OpenClaw
|
|
254
261
|
|
|
255
262
|
If `summaryModel` already includes a provider prefix such as `anthropic/claude-sonnet-4-20250514`, `summaryProvider` is ignored for that choice. Otherwise, the provider falls back to the matching override, then `OPENCLAW_PROVIDER`, then the provider inferred by the caller.
|
|
256
263
|
|
|
257
|
-
|
|
264
|
+
Summary calls are dispatched through OpenClaw's runtime LLM layer, so auth profiles, OAuth refresh, API keys, base URLs, and provider-specific request preparation remain host-owned. Run `openclaw doctor --fix` after adding explicit summary model overrides if you want OpenClaw to add the matching `plugins.entries.lossless-claw.llm` policy.
|
|
258
265
|
|
|
259
266
|
### Recommended starting configuration
|
|
260
267
|
|