pi-observational-memory 2.4.2 → 2.4.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/README.md CHANGED
@@ -76,7 +76,7 @@ flowchart TD
76
76
  Conv([Conversation accumulates])
77
77
  Obs[Observer<br/>async, fire-and-forget<br/>compresses each chunk into timestamped,<br/>relevance-tagged observations<br/>stored as silent tree entries]
78
78
  Comp[Compaction<br/>extension-owned; merges accumulated<br/>observations with prior compaction state]
79
- RP[Reflector + Pruner<br/>Reflector runs focused passes<br/>to crystallize durable patterns<br/>Pruner drops observations by id<br/>across up to 5 passes]
79
+ RP[Reflector + Pruner<br/>Reflector runs two focused passes<br/>to crystallize durable patterns<br/>Pruner drops observations by id<br/>across up to 2 passes]
80
80
  Sum[Summary mechanically assembled<br/>## Reflections<br/>&nbsp;&nbsp;[id] durable insight<br/>## Observations<br/>&nbsp;&nbsp;[id] YYYY-MM-DD HH:MM relevance ...<br/>Becomes the compactionSummary<br/>the agent sees on the next turn]
81
81
 
82
82
  Conv -->|every ~1k raw tokens since last bound| Obs
@@ -126,7 +126,31 @@ To run the background memory work (observer, reflector, pruner) on a cheaper / f
126
126
  }
127
127
  ```
128
128
 
129
- The six settings most worth knowing:
129
+ Nested agent-loop turns default to `16` for each memory role. To tune them (useful for controlling cost on large observation pools):
130
+
131
+ ```json
132
+ {
133
+ "observational-memory": {
134
+ "observerMaxTurnsPerRun": 8,
135
+ "reflectorMaxTurnsPerPass": 12,
136
+ "prunerMaxTurnsPerPass": 12
137
+ }
138
+ }
139
+ ```
140
+
141
+ A turn is one assistant/model response cycle inside Pi's nested agent loop. These caps are checked after a turn finishes; they are not hard mid-stream interrupts and are not literal tool-call counters.
142
+
143
+ For memory model calls, you can also tune thinking effort with one unified setting. Valid values are `off`, `minimal`, `low`, `medium`, `high`, and `xhigh`; the default is `low`.
144
+
145
+ ```json
146
+ {
147
+ "observational-memory": {
148
+ "thinkingLevel": "low"
149
+ }
150
+ }
151
+ ```
152
+
153
+ The settings most worth knowing:
130
154
 
131
155
  | Setting | Default | What it controls |
132
156
  |---|---|---|
@@ -135,6 +159,10 @@ The six settings most worth knowing:
135
159
  | `reflectionThresholdTokens` | `30,000` | The observation pool size at which reflector + pruner engage |
136
160
  | `passive` | `false` | Disables proactive observation and extension-triggered compaction while keeping manual/Pi compaction and commands active |
137
161
  | `compactionModel` | session model | Which model runs the observer / reflector / pruner — point at a cheaper one to save cost |
162
+ | `observerMaxTurnsPerRun` | `16` | Assistant-turn cap for each observer run |
163
+ | `reflectorMaxTurnsPerPass` | `16` | Assistant-turn cap for each reflector pass |
164
+ | `prunerMaxTurnsPerPass` | `16` | Assistant-turn cap for each pruner pass |
165
+ | `thinkingLevel` | `low` | Thinking effort for observer, reflector, and pruner calls; `off` omits Pi's reasoning option |
138
166
  | `compaction.keepRecentTokens` | `20,000` | How much recent conversation Pi keeps verbatim post-compaction (Pi setting; structural to the extension) |
139
167
 
140
168
  For shell/session-level control, `PI_OBSERVATIONAL_MEMORY_PASSIVE` overrides global and project settings. Use `1`, `true`, `yes`, or `on` to enable passive mode; use `0`, `false`, `no`, or `off` to force it off.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-observational-memory",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "Observational memory extension for pi — cache-friendly tiered compaction with observations and reflections.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,11 +40,12 @@
40
40
  "@mariozechner/pi-tui": "*"
41
41
  },
42
42
  "devDependencies": {
43
- "@mariozechner/pi-agent-core": "^0.66.1",
44
- "@mariozechner/pi-ai": "^0.66.1",
45
- "@mariozechner/pi-coding-agent": "^0.66.1",
46
- "@mariozechner/pi-tui": "^0.66.1",
43
+ "@mariozechner/pi-agent-core": "^0.73.0",
44
+ "@mariozechner/pi-ai": "^0.73.0",
45
+ "@mariozechner/pi-coding-agent": "^0.73.0",
46
+ "@mariozechner/pi-tui": "^0.73.0",
47
47
  "@types/node": "^22.0.0",
48
+ "typebox": "^1.1.38",
48
49
  "typescript": "^5.6.0",
49
50
  "vitest": "^4.1.5"
50
51
  }