@psiclawops/hypercompositor 0.8.0 → 0.8.3
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/index.d.ts.map +1 -1
- package/dist/index.js +19 -10
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EAId,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAUL,kBAAkB,EAInB,MAAM,sBAAsB,CAAC;AAU9B,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;AAYlG,KAAK,iBAAiB,GAClB,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,WAAW,CAAC;AAEhB,KAAK,wBAAwB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvD,UAAU,0BAA0B;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,wBAAwB,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,WAAW,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA0BD,iBAAS,aAAa,CAAC,MAAM,EAAE;IAC7B,IAAI,EAAE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AChE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAoBrC;AA+yFD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAU1F;;;;;;;;AAsFD,wBA8FG"}
|
package/dist/index.js
CHANGED
|
@@ -955,13 +955,22 @@ function maybeLogPressureAccountingAnomaly(fields) {
|
|
|
955
955
|
redisVsComposed: Math.abs(fields.redisTokens - fields.composedTokens),
|
|
956
956
|
runtimeVsRedis: Math.abs(fields.runtimeTokens - fields.redisTokens),
|
|
957
957
|
};
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
958
|
+
// Post-0.6.0: "redis" is actually the L1 SQLite cache window, which lags
|
|
959
|
+
// behind the runtime message array between trim passes. Cache-vs-runtime
|
|
960
|
+
// drift is structural and harmless — the runtime array is authoritative
|
|
961
|
+
// (it's what the model sees). Only warn when runtimeVsComposed diverges,
|
|
962
|
+
// which indicates an actual trim accounting bug.
|
|
963
|
+
if (deltas.runtimeVsComposed < threshold) {
|
|
964
|
+
// Log cache drift at debug level for observability, not as a warning.
|
|
965
|
+
if (deltas.redisVsComposed >= threshold || deltas.runtimeVsRedis >= threshold) {
|
|
966
|
+
console.debug(`[hypermem-plugin] cache-drift (non-anomalous): path=${fields.path} ` +
|
|
967
|
+
`runtime=${fields.runtimeTokens} cache=${fields.redisTokens} composed=${fields.composedTokens} ` +
|
|
968
|
+
`budget=${fields.budget}`);
|
|
969
|
+
}
|
|
961
970
|
return;
|
|
962
971
|
}
|
|
963
972
|
console.warn(`[hypermem-plugin] pressure-accounting anomaly: path=${fields.path} ` +
|
|
964
|
-
`runtime=${fields.runtimeTokens}
|
|
973
|
+
`runtime=${fields.runtimeTokens} cache=${fields.redisTokens} composed=${fields.composedTokens} ` +
|
|
965
974
|
`budget=${fields.budget} threshold=${threshold}`);
|
|
966
975
|
guardTelemetry({
|
|
967
976
|
path: fields.path,
|
|
@@ -1282,10 +1291,10 @@ function createHyperMemEngine() {
|
|
|
1282
1291
|
// Non-fatal: missing files are silently skipped.
|
|
1283
1292
|
let identityBlock;
|
|
1284
1293
|
try {
|
|
1285
|
-
// Council agents live at workspace/<agentId>/
|
|
1294
|
+
// Council agents live at workspace-council/<agentId>/
|
|
1286
1295
|
// Other agents at workspace/<agentId>/ — try council path first
|
|
1287
1296
|
const homedir = os.homedir();
|
|
1288
|
-
const councilPath = path.join(homedir, '.openclaw', 'workspace', agentId);
|
|
1297
|
+
const councilPath = path.join(homedir, '.openclaw', 'workspace-council', agentId);
|
|
1289
1298
|
const workspacePath = path.join(homedir, '.openclaw', 'workspace', agentId);
|
|
1290
1299
|
let wsPath = councilPath;
|
|
1291
1300
|
try {
|
|
@@ -1317,7 +1326,7 @@ function createHyperMemEngine() {
|
|
|
1317
1326
|
let _wsPathForSeed;
|
|
1318
1327
|
try {
|
|
1319
1328
|
const homedir2 = os.homedir();
|
|
1320
|
-
const councilPath2 = path.join(homedir2, '.openclaw', 'workspace', agentId);
|
|
1329
|
+
const councilPath2 = path.join(homedir2, '.openclaw', 'workspace-council', agentId);
|
|
1321
1330
|
const workspacePath2 = path.join(homedir2, '.openclaw', 'workspace', agentId);
|
|
1322
1331
|
try {
|
|
1323
1332
|
await fs.access(councilPath2);
|
|
@@ -1352,7 +1361,7 @@ function createHyperMemEngine() {
|
|
|
1352
1361
|
// Post-warm pressure check: if messages.db had accumulated history,
|
|
1353
1362
|
// warm() may have loaded the session straight to 80%+. Pre-trim now
|
|
1354
1363
|
// so the first turn has headroom instead of starting saturated.
|
|
1355
|
-
// This is the "restart at 98%" failure mode reported by
|
|
1364
|
+
// This is the "restart at 98%" failure mode reported by Helm 2026-04-05:
|
|
1356
1365
|
// JSONL truncation + Redis flush isn't enough if messages.db is still full
|
|
1357
1366
|
// and warm() reloads it. Trim here closes the loop.
|
|
1358
1367
|
try {
|
|
@@ -2574,7 +2583,7 @@ ${replayRecovery.emittedText}`
|
|
|
2574
2583
|
// gradient-compressed window to budget before writing to Redis. Without
|
|
2575
2584
|
// this, afterTurn writes up to 250 messages regardless of budget, causing
|
|
2576
2585
|
// trimHistoryToTokenBudget to fire and trim ~200 messages on every
|
|
2577
|
-
// subsequent assemble() — the churn loop seen in
|
|
2586
|
+
// subsequent assemble() — the churn loop seen in Helm's logs.
|
|
2578
2587
|
if (hm.cache.isConnected) {
|
|
2579
2588
|
try {
|
|
2580
2589
|
const modelState = await hm.cache.getModelState(agentId, sk);
|
|
@@ -2598,7 +2607,7 @@ ${replayRecovery.emittedText}`
|
|
|
2598
2607
|
// If a session just finished a turn at >80% pressure, the NEXT turn's
|
|
2599
2608
|
// incoming tool results (parallel web searches, large exec output, etc.)
|
|
2600
2609
|
// will hit a window with no headroom — the ingestion wave failure mode
|
|
2601
|
-
// (reported by
|
|
2610
|
+
// (reported by Helm, 2026-04-05). Pre-trim here so the tool-loop
|
|
2602
2611
|
// assemble() path starts the next turn with meaningful space.
|
|
2603
2612
|
//
|
|
2604
2613
|
// Uses modelState.tokenBudget if cached; skips if unavailable (non-fatal).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psiclawops/hypercompositor",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "HyperCompositor
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "HyperCompositor \u2014 context engine plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"openclaw": {
|
|
19
19
|
"plugin": {
|
|
20
20
|
"id": "hypercompositor",
|
|
21
|
-
"name": "HyperCompositor
|
|
21
|
+
"name": "HyperCompositor \u2014 Context Engine",
|
|
22
22
|
"kind": "context-engine"
|
|
23
23
|
},
|
|
24
24
|
"extensions": [
|