@joshuaswarren/openclaw-engram 9.3.5 → 9.3.7

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.
@@ -58,6 +58,36 @@
58
58
  "default": 15,
59
59
  "description": "Max minutes before forced extraction"
60
60
  },
61
+ "bufferSurpriseTriggerEnabled": {
62
+ "type": "boolean",
63
+ "default": false,
64
+ "description": "Issue #563 (D-MEM). When true, the smart buffer flushes immediately on turns whose embedding-based surprise score exceeds bufferSurpriseThreshold, in addition to the existing turn-count / signal / time triggers. Additive only — never suppresses existing flushes. Off by default."
65
+ },
66
+ "bufferSurpriseThreshold": {
67
+ "type": "number",
68
+ "default": 0.35,
69
+ "minimum": 0,
70
+ "maximum": 1,
71
+ "description": "Threshold in [0, 1] above which a surprise score flushes the buffer. Higher = require more novelty to flush. Ignored when bufferSurpriseTriggerEnabled is false."
72
+ },
73
+ "bufferSurpriseK": {
74
+ "type": "number",
75
+ "default": 5,
76
+ "minimum": 1,
77
+ "description": "Number of nearest-neighbor memories to average over when computing the surprise score. Clamped to the recent-memory window size."
78
+ },
79
+ "bufferSurpriseRecentMemoryCount": {
80
+ "type": "number",
81
+ "default": 20,
82
+ "minimum": 0,
83
+ "description": "Maximum number of recent memories sampled for surprise scoring. Bounds embedding cost per turn. Set to 0 to effectively disable the trigger even when the flag is on."
84
+ },
85
+ "bufferSurpriseProbeTimeoutMs": {
86
+ "type": "number",
87
+ "default": 2000,
88
+ "minimum": 1,
89
+ "description": "Hard timeout (ms) for the surprise probe. If the probe does not resolve within this window the buffer treats it as failed and falls through to the existing triggers — a slow or hung embedder cannot stall the turn-append path."
90
+ },
61
91
  "consolidateEveryN": {
62
92
  "type": "number",
63
93
  "default": 3,
@@ -318,6 +348,24 @@
318
348
  }
319
349
  }
320
350
  },
351
+ "codingMode": {
352
+ "type": "object",
353
+ "additionalProperties": false,
354
+ "default": {},
355
+ "description": "Coding-agent project/branch scoping (issue #569).",
356
+ "properties": {
357
+ "projectScope": {
358
+ "type": "boolean",
359
+ "default": true,
360
+ "description": "When true and the session has a resolved git context, memory routes to a project-scoped namespace (project:<id>). Set to false to restore pre-#569 behaviour exactly."
361
+ },
362
+ "branchScope": {
363
+ "type": "boolean",
364
+ "default": false,
365
+ "description": "When true, memory also overlays the current branch (project:<id>/branch:<name>). Opt-in — most development wants cross-branch recall. Wired in PR 3 of #569."
366
+ }
367
+ }
368
+ },
321
369
  "procedural": {
322
370
  "type": "object",
323
371
  "additionalProperties": false,
@@ -325,8 +373,8 @@
325
373
  "properties": {
326
374
  "enabled": {
327
375
  "type": "boolean",
328
- "default": false,
329
- "description": "Master gate for procedural memory: extraction, recall boost, and mining (issue #519)."
376
+ "default": true,
377
+ "description": "Master gate for procedural memory: extraction, recall boost, and mining (issue #519). Default-on since issue #567 PR 4/5; set to `false` to opt out."
330
378
  },
331
379
  "minOccurrences": {
332
380
  "type": "integer",
@@ -339,7 +387,7 @@
339
387
  "type": "number",
340
388
  "minimum": 0,
341
389
  "maximum": 1,
342
- "default": 0.7,
390
+ "default": 0.75,
343
391
  "description": "Minimum success-rate floor (from trajectory outcomes) for miner promotion."
344
392
  },
345
393
  "autoPromoteOccurrences": {
@@ -358,14 +406,14 @@
358
406
  "type": "integer",
359
407
  "minimum": 1,
360
408
  "maximum": 3650,
361
- "default": 30,
409
+ "default": 14,
362
410
  "description": "Trajectory lookback window for procedural mining."
363
411
  },
364
412
  "recallMaxProcedures": {
365
413
  "type": "integer",
366
414
  "minimum": 1,
367
415
  "maximum": 10,
368
- "default": 3,
416
+ "default": 2,
369
417
  "description": "Maximum procedure memories to inject on task-initiation recall."
370
418
  },
371
419
  "proceduralMiningCronAutoRegister": {
@@ -1922,6 +1970,48 @@
1922
1970
  "default": true,
1923
1971
  "description": "Automatically supersede contradicted memories"
1924
1972
  },
1973
+ "contradictionScan": {
1974
+ "type": "object",
1975
+ "description": "Configuration for the nightly contradiction-scan cron (issue #520)",
1976
+ "properties": {
1977
+ "enabled": {
1978
+ "type": "boolean",
1979
+ "default": false,
1980
+ "description": "Enable the nightly contradiction scan cron (disabled by default per rule 48)"
1981
+ },
1982
+ "similarityFloor": {
1983
+ "type": "number",
1984
+ "default": 0.82,
1985
+ "minimum": 0,
1986
+ "maximum": 1,
1987
+ "description": "Embedding cosine similarity floor for candidate pair generation"
1988
+ },
1989
+ "topicOverlapFloor": {
1990
+ "type": "number",
1991
+ "default": 0.4,
1992
+ "minimum": 0,
1993
+ "maximum": 1,
1994
+ "description": "Minimum topic-token Jaccard overlap for unstructured pairs"
1995
+ },
1996
+ "maxPairsPerRun": {
1997
+ "type": "integer",
1998
+ "default": 500,
1999
+ "minimum": 1,
2000
+ "description": "Cap on candidate pairs evaluated per cron run"
2001
+ },
2002
+ "cooldownDays": {
2003
+ "type": "integer",
2004
+ "default": 14,
2005
+ "minimum": 0,
2006
+ "description": "Cooldown in days. 0 = always re-evaluate."
2007
+ },
2008
+ "autoMergeDuplicates": {
2009
+ "type": "boolean",
2010
+ "default": false,
2011
+ "description": "Auto-flag pairs judged duplicates for dedup (still requires user approval)"
2012
+ }
2013
+ }
2014
+ },
1925
2015
  "temporalSupersessionEnabled": {
1926
2016
  "type": "boolean",
1927
2017
  "default": true,
@@ -1933,9 +2023,35 @@
1933
2023
  "description": "If true, include temporally-superseded facts in recall results (for audit/history). Default: exclude."
1934
2024
  },
1935
2025
  "recallDirectAnswerEnabled": {
2026
+ "type": "boolean",
2027
+ "default": true,
2028
+ "description": "When true, recall runs the direct-answer tier in observation mode: annotates LastRecallSnapshot.tierExplain with which tier would have served the query (issue #518). Does not short-circuit the QMD path in the current release."
2029
+ },
2030
+ "recallGraphEnabled": {
1936
2031
  "type": "boolean",
1937
2032
  "default": false,
1938
- "description": "When true, recall checks whether a single validated high-trust memory can answer the query before QMD runs (issue #518). Default off until bench validation."
2033
+ "description": "When true, recall builds a retrieval graph from memory frontmatter and runs Personalized PageRank, merging the result with QMD via MMR (issue #559 PR 4). Default false — ships off pending the retrieval-graph bench in PR 5."
2034
+ },
2035
+ "recallGraphDamping": {
2036
+ "type": "number",
2037
+ "minimum": 0,
2038
+ "maximum": 0.999999999,
2039
+ "default": 0.85,
2040
+ "description": "PPR damping factor used by the graph retrieval tier (issue #559)."
2041
+ },
2042
+ "recallGraphIterations": {
2043
+ "type": "integer",
2044
+ "minimum": 0,
2045
+ "maximum": 500,
2046
+ "default": 20,
2047
+ "description": "Maximum power-iteration rounds for PPR. Higher values trade latency for convergence."
2048
+ },
2049
+ "recallGraphTopK": {
2050
+ "type": "integer",
2051
+ "minimum": 0,
2052
+ "maximum": 10000,
2053
+ "default": 50,
2054
+ "description": "Maximum memories returned by the graph retrieval tier before the MMR diversifier runs."
1939
2055
  },
1940
2056
  "recallDirectAnswerTokenOverlapFloor": {
1941
2057
  "type": "number",
@@ -1972,6 +2088,75 @@
1972
2088
  ],
1973
2089
  "description": "Taxonomy category IDs eligible for direct-answer routing."
1974
2090
  },
2091
+ "recallCrossNamespaceBudgetEnabled": {
2092
+ "type": "boolean",
2093
+ "default": false,
2094
+ "description": "Cross-namespace query-budget limiter (issue #565). When true, a principal that issues a burst of recalls against namespaces other than their own is throttled once its per-window count crosses the hard limit. Ships disabled."
2095
+ },
2096
+ "recallCrossNamespaceBudgetWindowMs": {
2097
+ "type": "number",
2098
+ "minimum": 1,
2099
+ "default": 60000,
2100
+ "description": "Rolling window in ms over which cross-namespace reads are counted for the per-principal budget."
2101
+ },
2102
+ "recallCrossNamespaceBudgetSoftLimit": {
2103
+ "type": "number",
2104
+ "minimum": 0,
2105
+ "default": 10,
2106
+ "description": "Soft threshold for the cross-namespace budget: calls past this count are flagged but still allowed."
2107
+ },
2108
+ "recallCrossNamespaceBudgetHardLimit": {
2109
+ "type": "number",
2110
+ "minimum": 1,
2111
+ "default": 30,
2112
+ "description": "Hard threshold for the cross-namespace budget: calls past this count are denied until the window advances."
2113
+ },
2114
+ "recallAuditAnomalyDetectionEnabled": {
2115
+ "type": "boolean",
2116
+ "default": false,
2117
+ "description": "When true, access surfaces (MCP, HTTP) run the anomaly detector over a tail of the audit trail after each recall and surface flags via logs/metrics. Ships disabled — enable explicitly."
2118
+ },
2119
+ "recallAuditAnomalyWindowMs": {
2120
+ "type": "number",
2121
+ "minimum": 1,
2122
+ "default": 300000,
2123
+ "description": "Rolling window (ms) over which audit entries are analyzed by the anomaly detector. Default 5 minutes."
2124
+ },
2125
+ "recallAuditAnomalyRepeatQueryLimit": {
2126
+ "type": "number",
2127
+ "minimum": 1,
2128
+ "default": 5,
2129
+ "description": "Threshold for the repeat-query anomaly flag: number of identical queries within the window before flagging."
2130
+ },
2131
+ "recallAuditAnomalyNamespaceWalkLimit": {
2132
+ "type": "number",
2133
+ "minimum": 1,
2134
+ "default": 3,
2135
+ "description": "Threshold for the namespace-walk anomaly flag: number of distinct namespaces queried within the window before flagging."
2136
+ },
2137
+ "recallAuditAnomalyHighCardinalityLimit": {
2138
+ "type": "number",
2139
+ "minimum": 1,
2140
+ "default": 50,
2141
+ "description": "Threshold for the high-cardinality-return anomaly flag: number of distinct results returned within the window before flagging."
2142
+ },
2143
+ "recallAuditAnomalyRapidFireLimit": {
2144
+ "type": "number",
2145
+ "minimum": 1,
2146
+ "default": 30,
2147
+ "description": "Threshold for the rapid-fire anomaly flag: number of recall requests within the window before flagging."
2148
+ },
2149
+ "recallMemoryWorthFilterEnabled": {
2150
+ "type": "boolean",
2151
+ "default": true,
2152
+ "description": "When true, recall multiplies candidate scores by the Memory Worth factor (mw_success / mw_fail counters, see issue #560). Memories with a history of failed sessions sink; neutral/uninstrumented memories are untouched. PR 5 bench: +0.60 precision@5 vs baseline on all 50 seeded cases. Operators can opt out with false."
2153
+ },
2154
+ "recallMemoryWorthHalfLifeMs": {
2155
+ "type": "number",
2156
+ "minimum": 0,
2157
+ "default": 0,
2158
+ "description": "Half-life (ms) for Memory Worth decay. Positive values exponentially decay older outcomes toward the neutral prior; 0 disables decay."
2159
+ },
1975
2160
  "memoryLinkingEnabled": {
1976
2161
  "type": "boolean",
1977
2162
  "default": false,
@@ -2264,6 +2449,27 @@
2264
2449
  "default": false,
2265
2450
  "description": "Shadow mode for the extraction judge. When true, judge verdicts are logged but all facts are still persisted regardless of the verdict."
2266
2451
  },
2452
+ "extractionJudgeMaxDeferrals": {
2453
+ "type": "number",
2454
+ "default": 2,
2455
+ "minimum": 1,
2456
+ "description": "Maximum number of times the same candidate text may be deferred by the extraction judge before the verdict is forcibly converted to 'reject'. Prevents pathological LLM responses from looping forever on ambiguous facts (issue #562)."
2457
+ },
2458
+ "extractionJudgeTelemetryEnabled": {
2459
+ "type": "boolean",
2460
+ "default": false,
2461
+ "description": "Emit structured telemetry rows to state/observation-ledger/extraction-judge-verdicts.jsonl on every judge verdict. Off by default; enable to collect defer-rate and latency metrics for operator dashboards (issue #562)."
2462
+ },
2463
+ "collectJudgeTrainingPairs": {
2464
+ "type": "boolean",
2465
+ "default": false,
2466
+ "description": "Opt-in collector for (candidate_text, verdict_kind, reason) tuples used to prep a future GRPO training pipeline. Rows land under ~/.remnic/judge-training/<date>.jsonl (NOT in the shared memory directory). Off by default (issue #562)."
2467
+ },
2468
+ "judgeTrainingDir": {
2469
+ "type": "string",
2470
+ "default": "",
2471
+ "description": "Override directory for judge training-pair collection. Empty string uses the default (~/.remnic/judge-training). Only consulted when collectJudgeTrainingPairs is true."
2472
+ },
2267
2473
  "inlineSourceAttributionEnabled": {
2268
2474
  "type": "boolean",
2269
2475
  "default": false,
@@ -2387,6 +2593,11 @@
2387
2593
  "default": 15000,
2388
2594
  "description": "Timeout for fast-tier local LLM requests (ms). Lower than primary since fast ops should complete quickly."
2389
2595
  },
2596
+ "localLlmDisableThinking": {
2597
+ "type": "boolean",
2598
+ "default": true,
2599
+ "description": "When true (default), request chain-of-thought / thinking-mode suppression on the main local LLM (issue #548). The `chat_template_kwargs: { enable_thinking: false }` field is only injected when the detected backend is known to support it (LM Studio, vLLM); strict OpenAI-compat backends fail open to avoid the 400-cooldown path. Structured-output tasks like extraction and consolidation gain nothing from reasoning tokens and thinking-capable models (Qwen 3.5, Gemma 4, DeepSeek) often blow the 60s timeout before emitting content. Set to false to restore thinking for narrative tasks. The fast-tier client always disables thinking and is not affected by this flag."
2600
+ },
2390
2601
  "hourlySummaryCronAutoRegister": {
2391
2602
  "type": "boolean",
2392
2603
  "default": false,
@@ -2673,6 +2884,11 @@
2673
2884
  "default": 100,
2674
2885
  "description": "Max memories to consolidate per run to limit LLM cost."
2675
2886
  },
2887
+ "operatorAwareConsolidationEnabled": {
2888
+ "type": "boolean",
2889
+ "default": false,
2890
+ "description": "Opt in to operator-aware consolidation prompts so the LLM returns structured {operator, output} JSON and SPLIT/MERGE/UPDATE is recorded on derived_via. When disabled (default), derived_via still populates via the cluster-shape heuristic."
2891
+ },
2676
2892
  "creationMemoryEnabled": {
2677
2893
  "type": "boolean",
2678
2894
  "default": false,
@@ -3451,6 +3667,11 @@
3451
3667
  "minimum": 0,
3452
3668
  "description": "Number of top candidates per section to run MMR over. Candidates past this remain in original order."
3453
3669
  },
3670
+ "recallReasoningTraceBoostEnabled": {
3671
+ "type": "boolean",
3672
+ "default": false,
3673
+ "description": "Boost stored reasoning_trace memories in recall results when the incoming query reads like a problem-solving ask (e.g. 'how do I...', 'step by step', 'walk me through...'). Default false - opt in after benchmarking (issue #564)."
3674
+ },
3454
3675
  "recallPipeline": {
3455
3676
  "type": "array",
3456
3677
  "description": "Ordered recall sections with per-section budgets and feature knobs.",
@@ -4049,6 +4270,10 @@
4049
4270
  "label": "Auto-Resolve Contradictions",
4050
4271
  "help": "Automatically supersede old memories when contradiction is confirmed"
4051
4272
  },
4273
+ "contradictionScan": {
4274
+ "label": "Contradiction Scan",
4275
+ "help": "Nightly cron that pairs similar memories and flags contradictions for review (issue #520)"
4276
+ },
4052
4277
  "temporalSupersessionEnabled": {
4053
4278
  "label": "Temporal Supersession",
4054
4279
  "help": "Mark older facts superseded when a newer fact writes a conflicting value for the same entityRef + structured attribute (issue #375)"
@@ -4062,6 +4287,25 @@
4062
4287
  "label": "Direct-Answer Retrieval Tier",
4063
4288
  "help": "Route validated high-trust queries to a fast direct-answer path before QMD (issue #518)."
4064
4289
  },
4290
+ "recallGraphEnabled": {
4291
+ "label": "Graph Retrieval (PPR)",
4292
+ "help": "Run Personalized PageRank on the retrieval graph and merge with QMD via MMR (issue #559)."
4293
+ },
4294
+ "recallGraphDamping": {
4295
+ "label": "Graph Recall Damping",
4296
+ "advanced": true,
4297
+ "placeholder": "0.85"
4298
+ },
4299
+ "recallGraphIterations": {
4300
+ "label": "Graph Recall Iterations",
4301
+ "advanced": true,
4302
+ "placeholder": "20"
4303
+ },
4304
+ "recallGraphTopK": {
4305
+ "label": "Graph Recall Top-K",
4306
+ "advanced": true,
4307
+ "placeholder": "50"
4308
+ },
4065
4309
  "recallDirectAnswerTokenOverlapFloor": {
4066
4310
  "label": "Direct-Answer Token Overlap Floor",
4067
4311
  "advanced": true,
@@ -4283,6 +4527,11 @@
4283
4527
  "advanced": true,
4284
4528
  "help": "Timeout for fast-tier requests. Lower than primary since fast ops should complete quickly."
4285
4529
  },
4530
+ "localLlmDisableThinking": {
4531
+ "label": "Disable Local LLM Thinking Mode",
4532
+ "advanced": true,
4533
+ "help": "Suppress chain-of-thought reasoning on the main local LLM. Default on — extraction / consolidation are structured-output tasks where thinking is pure latency tax and a common cause of 60s timeouts on Qwen 3.5 / Gemma 4 / DeepSeek. The suppression field (chat_template_kwargs) is only sent when the backend is known to support it (LM Studio, vLLM); strict OpenAI-compat backends fail open. Turn off if you want thinking on narrative tasks. Fast-tier client always disables thinking regardless."
4534
+ },
4286
4535
  "evalHarnessEnabled": {
4287
4536
  "label": "Evaluation Harness",
4288
4537
  "help": "Enable Engram's benchmark/evaluation harness foundation and benchmark-status diagnostics."
@@ -4437,6 +4686,11 @@
4437
4686
  "advanced": true,
4438
4687
  "help": "Max memories to consolidate per run to limit LLM cost."
4439
4688
  },
4689
+ "operatorAwareConsolidationEnabled": {
4690
+ "label": "Operator-Aware Consolidation Prompt",
4691
+ "advanced": true,
4692
+ "help": "Opt in to operator-aware consolidation prompts (default off). When enabled, the LLM returns structured {operator, output} JSON and we record SPLIT/MERGE/UPDATE on derived_via. When disabled (default), derived_via still populates via the cluster-shape heuristic."
4693
+ },
4440
4694
  "creationMemoryEnabled": {
4441
4695
  "label": "Creation Memory",
4442
4696
  "advanced": true,
@@ -4747,6 +5001,11 @@
4747
5001
  "advanced": true,
4748
5002
  "placeholder": "40",
4749
5003
  "help": "Number of top candidates per section over which MMR is applied"
5004
+ },
5005
+ "recallReasoningTraceBoostEnabled": {
5006
+ "label": "Boost Reasoning Traces on Problem-Solving Queries",
5007
+ "advanced": true,
5008
+ "help": "Promote stored reasoning_trace memories to the top of recall results when the incoming query reads like a problem-solving ask. Default off; enable after benchmarking (issue #564)."
4750
5009
  }
4751
5010
  }
4752
5011
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joshuaswarren/openclaw-engram",
3
- "version": "9.3.5",
3
+ "version": "9.3.7",
4
4
  "description": "Deprecated compatibility shim for Engram installs. Re-exports @remnic/plugin-openclaw and forwards engram-access to @remnic/core.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,8 @@
31
31
  ]
32
32
  },
33
33
  "dependencies": {
34
- "@remnic/plugin-openclaw": "^1.0.6",
35
- "@remnic/core": "^1.0.3"
34
+ "@remnic/core": "^1.1.1",
35
+ "@remnic/plugin-openclaw": "^1.0.8"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "openclaw": ">=2026.4.8"