@aeondave/pi-persona-mind 0.9.5 → 0.9.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.
package/AGENTS.md CHANGED
@@ -9,7 +9,7 @@ coupled through a versioned local companion handshake to
9
9
  - Typecheck: `npm run typecheck` (`tsc --noEmit`, strict + `exactOptionalPropertyTypes`)
10
10
  - Tests: `npm test` · both: `npm run verify`
11
11
  - Hermetic choke point: `node --import tsx --import ./test/setup/hermetic-env.ts --test test/*.test.ts`
12
- - Installed Pi 1.6.0 qualification: `node --import tsx scripts/qualify-host.mjs <absolute-pi-package-root> <absolute-pi-persona-extension-path> [<absolute-packed-mind-extension-path>]`
12
+ - Installed Pi 1.7.0 qualification: `node --import tsx scripts/qualify-host.mjs <absolute-pi-package-root> <absolute-pi-persona-extension-path> [<absolute-packed-mind-extension-path>]`
13
13
  (isolated profile, offline synthetic provider; no cloud authentication/model-quality claim).
14
14
 
15
15
  ## Conventions
@@ -17,13 +17,15 @@ coupled through a versioned local companion handshake to
17
17
  - User-requested commits use **AeonDave** as both author and committer, retaining the user's configured
18
18
  email. Never add `Co-authored-by` or assistant/bot attribution; do not push unless explicitly requested.
19
19
  - Erasable-syntax-only TS. `src/core/*` is pure (no Pi imports) and unit-tested.
20
- - Target the latest stable Pi only (currently 1.6.0), Node 22.19.0+. Keep host packages and
20
+ - Target the latest stable Pi only (currently 1.7.0), Node 22.19.0+. Keep host packages and
21
21
  typebox as optional peers on `*`, with all four Pi development packages pinned together.
22
22
  No historical-host branches; never bundle a second host runtime. Scope development security
23
23
  overrides to their affected parent/version and remove them when that graph no longer needs them.
24
24
  - Tests clear `PI_PERSONA_*` case-insensitively and pin `PI_AGENT_DIR` plus the SDK's
25
25
  `PI_CODING_AGENT_DIR` to the same throwaway directory.
26
26
  Keep the hermetic import on every direct test invocation. Real SDK tests use an offline provider.
27
+ - Honor Pi's explicit profile (`--agent-dir` or `PI_CODING_AGENT_DIR`) for Mind settings and stores.
28
+ Use `PI_AGENT_DIR` when it is the only profile override, matching Persona.
27
29
  - Require the loaded companion protocol at session activation and tool call time; missing or
28
30
  incompatible Persona means no capture, storage/migration, injection or scheduler activity.
29
31
  Settings files alone do not prove presence. Resolve the actual active persona through the
@@ -127,9 +129,9 @@ inspection. Re-run after final edits. Keep published files explicit; no tests, d
127
129
 
128
130
  ### Accepted platform diagnostics
129
131
 
130
- - Windows runs have zero expected skips. On other platforms, only the two Windows recovery-gate
131
- sharing-violation cases in `test/store.test.ts` are intentionally skipped: they exercise the
132
- Windows-specific `EPERM` handling, not the POSIX path. Report them as untested, never passed.
132
+ - Windows runs have zero expected skips. Other platforms skip three Windows sharing-violation
133
+ cases in `test/store.test.ts`: one for replacing an open file and two for recovery-gate
134
+ locks. Report these as skipped.
133
135
  - Evidence symlink-boundary tests are required on every platform. Windows test accounts need
134
136
  Developer Mode or `SeCreateSymbolicLinkPrivilege`; missing support fails rather than silently
135
137
  dropping those security checks. No other conditional skips are accepted.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.7](https://github.com/AeonDave/pi-persona-mind/releases/tag/v0.9.7) - 2026-11-30
4
+
5
+ - Require Pi 1.7.0. Mind reads settings and stores memory in the profile selected by `--agent-dir`
6
+ or `PI_CODING_AGENT_DIR`. `PI_AGENT_DIR` still works when it is the only profile override.
7
+ - Refresh the supervisor's memory from its active branch and scoped stores after native
8
+ compaction inside a tool loop. A cue saved during that run can reach the next model response.
9
+ - Automatic consolidation reaches older records while new ones arrive, advances past records
10
+ that exceed a window's budget and honors a foreground settle during cancellation. An unrelated
11
+ record between two compatible notes no longer keeps them out of the same review window when the pair fits.
12
+ - Repeating an identical automatic capture reuses its active session note and stays quiet.
13
+ Collapsed note cards show the note text. Optional suggestions preserve storage warnings.
14
+
15
+ ## [0.9.6](https://github.com/AeonDave/pi-persona-mind/releases/tag/v0.9.6) - 2026-11-27
16
+
17
+ - Delegated workers can receive their selected skills and Mind memory together. Previously Mind
18
+ could cause Persona to reject the delegation before the worker's first model call.
19
+ - Mind now requires Pi 1.6.1. Its memory, backlog and delegated-worker integration are tested
20
+ against that host.
21
+
3
22
  ## [0.9.5](https://github.com/AeonDave/pi-persona-mind/releases/tag/v0.9.5) - 2026-11-25
4
23
 
5
24
  - Saved Persona workers rank lean memory by the launch task and show relative ages as of the
package/README.md CHANGED
@@ -1,170 +1,84 @@
1
- <h1 align="center">pi-persona-mind</h1>
2
-
3
- <p align="center">
4
- <img src="https://raw.githubusercontent.com/AeonDave/pi-persona-mind/v0.9.5/assets/banner.png" alt="pi-persona-mind — durable memory for Pi">
5
- </p>
6
-
7
- [![CI](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml)
8
- [![npm version](https://img.shields.io/npm/v/@aeondave/pi-persona-mind?logo=npm)](https://www.npmjs.com/package/@aeondave/pi-persona-mind)
9
- [![License](https://img.shields.io/github/license/AeonDave/pi-persona-mind)](LICENSE)
10
-
11
- **Local, scoped memory for Pi.** Keep useful project decisions, persona preferences, session notes
12
- and deferred work without turning every conversation into permanent memory.
13
- Mind complements Pi's native conversation history and compaction; it does not replace them.
14
-
15
- ## Features
16
-
17
- | What you need | What Mind provides |
18
- |---|---|
19
- | Continue a long project | Durable repository decisions, session notes and explicit handoffs for the next session |
20
- | Keep context focused | Bounded retrieval by words, code identifiers, tags and paths, with explicit full-record reads |
21
- | See what the agent remembers | **F10**: saved facts, prepared context and an active-branch timeline |
22
- | Maintain a growing archive | Bounded consolidation, evidence-grounded review, change history and guarded undo |
23
- | Understand a changed decision | Retained before/after records for explicit replacements, kept out of active recall |
24
-
25
- Memory is stored in local files and Pi's native session history. Recall and browsing need no model
26
- call. [Automatic consolidation](#quiet-automatic-maintenance) is on by default; it and explicit
27
- knowledge reviews use the current session model and incur model usage.
28
-
29
- ## Quick start
30
-
31
- Mind 0.9.5 requires **Pi 1.6.0**, **Node.js 22.19.0+**, and
32
- [**pi-persona 1.18.1+**](https://github.com/AeonDave/pi-persona) loaded in the same instance.
33
-
34
- ```bash
35
- pi install npm:@aeondave/pi-persona
36
- pi install npm:@aeondave/pi-persona-mind
37
- ```
38
-
39
- For existing installations, use `pi update npm:@aeondave/pi-persona` and
40
- `pi update npm:@aeondave/pi-persona-mind`. Restart Pi or run **`/reload`** after installing or
41
- updating; `/persona reload` alone does not reload extension code. Keep only one installation source
42
- per extension and remove the old source before switching between npm and Git.
43
-
44
- Mind needs a **compatible, running Persona**, not just an installed package or settings file.
45
- Without that companion and its current session owner, memory operations and background activity stay
46
- inactive. See [host and companion integration](docs/DESIGN.md#scope-and-companion-integration).
47
-
48
- Try asking your agent:
49
-
50
- - “Save this as a durable project decision: schema changes require a migration.”
51
- - “Keep this constraint only for the current session.”
52
- - “Remember this preference across projects for this persona.”
53
- - “Put the blocked migration in the backlog and remind me tomorrow.”
54
- - “Recall the decision about retries and show the complete saved record.”
55
- - “Save a handoff with the goal, completed work, remaining work, next step and references.”
56
-
57
- Press **F10** to inspect what Mind has saved and prepared. Use **`/mind`** for a snapshot,
58
- **`/mind help`** for commands and **`/mind doctor`** for effective settings and storage warnings.
59
-
60
- ## Memory that fits the work
61
-
62
- Choose the lifetime and scope that match your intent:
63
-
64
- | Memory | Where it belongs | Lifetime |
65
- |---|---|---|
66
- | Session notes | The active native session branch | Survive compaction and persisted resume; stay out of new sessions and workers |
67
- | Project working memory | Temporary repository context | 48 hours by default |
68
- | Durable project memory | Repository decisions | Until changed or forgotten |
69
- | Persona memory | One persona across projects | Until changed or forgotten |
70
- | Shared memory | Deliberately shared across personas | Until changed or forgotten |
71
- | Backlog | Deferred project work and reminders | 48 hours by default; later reminders extend expiry |
72
-
73
- The agent chooses scope from your intent; durable saves require an explicit `project`, `persona`
74
- or `shared` destination. Strong direct-user cues may be captured automatically, but
75
- **automatic capture creates provisional session notes only**, even for “remember” or “from now on”.
76
- Broader retention requires a separate deliberate `memory` call with an explicit durable scope.
77
-
78
- Reminders notify you while Pi is open; they do not wake the model. Delegated workers receive a lean
79
- memory selection, without session notes or memory/backlog write tools. Home-directory sessions skip
80
- project injection and reminders. See [lifetimes and scope](docs/DESIGN.md#four-lifetimes) and
81
- [session notes](docs/DESIGN.md#session-notes) for persistence, branch-local forgetting and expiry.
82
-
83
- ## Retrieval and inspection
84
-
85
- Mind selects relevant excerpts each turn within one shared context budget. Exact words and paths
86
- receive more weight than matches across code identifiers (`HTTPResponseParser` → “HTTP response parser”)
87
- and vowel accents (`café` → “cafe”). Unicode text remains searchable. This is lexical retrieval;
88
- it can miss paraphrases or conflicting facts. Use `memory recall`
89
- to search and `memory read` to inspect a complete record. The budget is an estimate, not a billing counter.
90
-
91
- **F10** toggles the read-only inspector in the interactive TUI:
92
-
93
- - **Memories** browses scoped facts, full text, dates, tags and available recording provenance.
94
- - **Context** shows the last block prepared by Mind, including omissions—not the final provider payload.
95
- - **Timeline** shows bounded user/assistant text and session-note events on the active branch.
96
-
97
- Open a record for detail and press **s** for its recording source, when available. Recording provenance
98
- shows how a fact was saved; it does not verify the assertion. Timeline and source lookup cover a
99
- bounded active-branch window.
100
-
101
- In Memories, **a** opens maintenance actions; `/mind browse`, `/mind browse context` and `/mind timeline`
102
- are command alternatives. Browsing alone is read-only and makes no model calls.
103
-
104
- F10 shares Persona's F9 window frame and theme. **PageUp/PageDown** follow visible rows, narrow
105
- windows keep the selection visible, and **?** opens help. See the
106
- [inspector design](docs/DESIGN.md#read-only-memory-inspector) for navigation, sources and coverage.
107
-
108
- ## Maintain knowledge deliberately
109
-
110
- **Decision history** keeps the previous fact when an explicit replacement retires it. Use
111
- `/mind history project-long` to find a receipt and `/mind history show <receiptId> project-long`
112
- to inspect its before/after records. Old facts stay out of active recall and injected context.
113
- History is bounded; ordinary replacements are inspectable, while guarded undo applies to consolidation.
114
- [History and retention →](docs/DESIGN.md#replacement-history)
115
-
116
- **Consolidation** merges compatible saved facts and applies validated changes. `/mind optimize`
117
- reviews one bounded window per allowed project/persona tier; `/mind optimize project-long` selects
118
- durable project memory alone. Inspect changes with `/mind optimize history`; `/mind optimize undo`
119
- restores affected facts only when its conflict checks pass. This reorganizes saved knowledge; it does
120
- not verify it against your repository. [Consolidation and undo details →](docs/DESIGN.md#explicit-consolidation)
121
-
122
- **Knowledge review** runs in the interactive terminal and checks selected facts against repository
123
- files you choose and bounded active-branch user-role text. Repository evidence requires project trust.
124
- The worker proposes corrections, conflicts, insufficient-evidence findings or retirement
125
- recommendations for your review.
126
-
127
- 1. Choose **F10 → Memories → a**, or run `/mind review project-long` (also `project` or `persona`).
128
- 2. Select evidence and confirm the model call. Inspect the proposal with `/mind review show`.
129
- 3. Use `/mind review apply` to separately approve corrections, or `/mind review discard` to discard them.
130
- Application rechecks evidence and memory freshness. Retirement is a recommendation; forgetting a
131
- fact is a separate deliberate action.
132
-
133
- Both workflows use a **visible Persona-hosted Mind worker on the current session model** and incur
134
- model usage. Choose a model with `/model` before starting. New input or model, branch, session and
135
- owner changes invalidate pending review work. Shared memory and session notes are excluded from
136
- these model-driven mutations. Reviews and undo history are bounded; a reviewed window is not a
137
- whole-archive audit or a guarantee of truth.
138
-
139
- ### Quiet automatic maintenance
140
-
141
- Automatic consolidation is on by default. After eligible saves, it waits for the foreground to become
142
- idle and respects usage, cooldown and ownership limits. A real worker is visible in Persona;
143
- successful changes produce one small **mind** notification, while routine no-ops stay quiet.
144
- Failures and important warnings remain visible, and applied changes retain history for guarded undo.
145
-
146
- Use `/mind optimize auto status`, `/mind optimize auto off` or `/mind optimize auto on` for the current
147
- session. `PI_PERSONA_MIND_OPTIMIZE=off` disables automatic optimization at startup. Capture can be set
148
- with `PI_PERSONA_MIND_CAPTURE=auto|prompt|off`, and `PI_PERSONA_MIND_NUDGE=off` disables suggestions.
149
- See [automatic review](docs/DESIGN.md#automatic-semantic-review) for admission and cost details.
150
-
151
- ## Hand off a long task
152
-
153
- Ask the agent to save a handoff before switching sessions. It records the goal, completed work,
154
- pending work, next step and references, together with the originating session and branch.
155
- In a new session with the same project and persona, use **`/mind handoff list`** and
156
- **`/mind handoff show <id>`** to consult it.
157
-
158
- A handoff is an explicit work snapshot, not proof that a task is complete. It is never injected or
159
- executed automatically. Completion requires a resolution; forgetting is explicit. Each persona can hold
160
- up to 32 handoffs in a bounded project file (128 KiB for the whole file), with no automatic expiry or
161
- eviction.
162
- [Commands, ownership and limits →](docs/DESIGN.md#cross-session-handoffs)
163
-
164
- ## Learn more
165
-
166
- - [Design: lifetimes, storage, limits, commands and safeguards](docs/DESIGN.md)
167
- - [Evidence-grounded review and approval](docs/DESIGN.md#evidence-grounded-knowledge-review)
168
- - [Storage recovery and concurrent writes](docs/DESIGN.md#durable-files-and-recovery)
169
- - [Architecture decisions and evaluation boundaries](docs/MEMORY-RESEARCH.md)
170
- - [Release history](CHANGELOG.md) · [MIT license](LICENSE)
1
+ <h1 align="center">pi-persona-mind</h1>
2
+
3
+ **Local memory for Pi and pi-persona.** Save a decision once and recall it the next time you open
4
+ the repository. Keep temporary constraints on the current session branch and carry personal
5
+ preferences across projects with the same persona.
6
+
7
+ <p align="center">
8
+ <img src="https://raw.githubusercontent.com/AeonDave/pi-persona-mind/v0.9.7/assets/banner.png" width="540" alt="pi-persona-mind — durable memory for Pi">
9
+ </p>
10
+
11
+ [![CI](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AeonDave/pi-persona-mind/actions/workflows/test.yml)
12
+ [![npm version](https://img.shields.io/npm/v/@aeondave/pi-persona-mind?logo=npm)](https://www.npmjs.com/package/@aeondave/pi-persona-mind)
13
+ [![License](https://img.shields.io/github/license/AeonDave/pi-persona-mind)](LICENSE)
14
+
15
+ ## Features
16
+
17
+ | What you can do | How it works |
18
+ |---|---|
19
+ | Choose who remembers | Save a fact for one session branch, one repository, one persona across projects, or explicitly share it across personas. |
20
+ | Recover context after compaction | After Pi compacts a tool loop, Mind refreshes the supervisor’s reference from the active branch and scoped stores. It can include a fact saved moments earlier. |
21
+ | Find and inspect a decision | Search by words, code identifiers, tags or paths. Press **F10** to browse complete records, see the last context Mind prepared, or read the active-branch timeline. |
22
+ | Give workers relevant context | Delegated workers get a short memory selection alongside their assigned skills. The supervisor keeps the session notes and memory-writing tools. |
23
+ | Pick up unfinished work | Save a handoff with the goal, progress, next step and references. Open it in a later session with the same project and persona. |
24
+ | Defer a task | Add it to the project backlog with a reminder. Pi notifies you while it is open without waking the model. |
25
+ | Maintain saved knowledge | Consolidate related facts, inspect the history of a changed decision, or review a fact against evidence you select. |
26
+
27
+ ## Quick start
28
+
29
+ Mind requires **Pi 1.7.0**, **Node.js 22.19.0+** and a compatible **pi-persona 1.18.1+** release
30
+ loaded in the same Pi instance. Install the current companion release for this Pi version.
31
+ [pi-persona releases](https://github.com/AeonDave/pi-persona/releases)
32
+
33
+ ```bash
34
+ pi install npm:@aeondave/pi-persona
35
+ pi install npm:@aeondave/pi-persona-mind
36
+ ```
37
+
38
+ Restart Pi or run **`/reload`**. For an existing installation, run `pi update <source>` for each
39
+ package, using the same `npm:` sources shown above. Mind stores project, persona and shared facts
40
+ in the active Pi profile, selected by `pi --agent-dir <dir>` or `PI_CODING_AGENT_DIR`.
41
+
42
+ Try this in a repository:
43
+
44
+ 1. Ask **“Save this as a durable project decision: every database schema change needs a migration.”**
45
+ 2. Open a fresh Pi session in the same repository and ask **“What did we decide about schema changes?”**
46
+ 3. Press **F10 → Memories** to read the full saved record. **Context** shows which excerpts Mind
47
+ selected for the turn. Use **`/mind doctor`** to inspect the active settings or a storage warning.
48
+
49
+ ## Choose what persists
50
+
51
+ Automatic capture turns strong cues such as “remember this” into provisional **session notes**.
52
+ Repeating the same capture reuses the existing note on that branch. Session notes survive compaction
53
+ and resuming the saved branch. A new session starts with its own notes.
54
+
55
+ For **durable memory**, name the destination when asking the agent to save a fact. **Project** keeps
56
+ a repository decision available across personas. **Persona** carries a preference across projects.
57
+ **Shared** makes a fact available across personas. These facts have no automatic expiry. Mind
58
+ selects relevant excerpts within a context budget and sends them to the session model. Ask for
59
+ the complete record when you need an exact command or the conditions under which a workaround applies.
60
+
61
+ **Working project memory** and **backlog items** expire after 48 hours by default. A reminder set
62
+ for a later date extends the item's expiry. For longer work, ask the agent to save a handoff.
63
+ Use `/mind handoff list` and `/mind handoff show <id>` to consult it when you return.
64
+
65
+ ## Maintenance and model usage
66
+
67
+ Browsing, recall and full-record reads use local data and need no additional model call.
68
+ Automatic consolidation is on by default. After eligible saves and once the foreground settles,
69
+ a visible Persona worker can use the **current session model** to consolidate saved facts.
70
+ Use `/mind optimize auto status` to check or `/mind optimize auto off` to disable it for this session.
71
+ Set `PI_PERSONA_MIND_OPTIMIZE=off` to start with it disabled.
72
+
73
+ Explicit consolidation and evidence-grounded review also use the current model. Use
74
+ `/mind optimize history` to inspect consolidation changes. Guarded undo restores them when conflict
75
+ checks pass. Explicit fact replacements retain a before/after history for inspection. To check
76
+ a fact against trusted repository files or recent user messages, start `/mind review` in the TUI,
77
+ choose the evidence and approve any proposed correction before it is applied.
78
+
79
+ ## Learn more
80
+
81
+ - [Storage, scopes and companion integration](docs/DESIGN.md#scope-and-companion-integration) · [Session notes](docs/DESIGN.md#session-notes) · [Handoffs](docs/DESIGN.md#cross-session-handoffs)
82
+ - [F10 inspector and recording sources](docs/DESIGN.md#read-only-memory-inspector)
83
+ - [Automatic consolidation and usage limits](docs/DESIGN.md#automatic-semantic-review) · [Replacement history](docs/DESIGN.md#replacement-history) · [Knowledge review](docs/DESIGN.md#evidence-grounded-knowledge-review)
84
+ - [Design decisions and evaluation](docs/MEMORY-RESEARCH.md) · [Release history](CHANGELOG.md)
package/docs/DESIGN.md CHANGED
@@ -9,15 +9,19 @@ the user workflow is in [README](../README.md). Local design rationale and evalu
9
9
  This design contract describes the current development tree; released changes are recorded separately
10
10
  in CHANGELOG.md.
11
11
 
12
- Target the latest stable Pi only, currently 1.6.0, and Node >=22.19. All four development Pi packages
12
+ Target the latest stable Pi only, currently 1.7.0, and Node >=22.19. All four development Pi packages
13
13
  are pinned together; runtime host/typebox packages remain optional wildcard peers. No second host
14
14
  runtime or historical hook-shape adapter is bundled. A development-only security override does not
15
15
  patch an installed host.
16
16
 
17
+ Mind and Persona use the profile Pi selects through `--agent-dir` or `PI_CODING_AGENT_DIR`.
18
+ `PI_AGENT_DIR` applies when it is the only profile override. Mind resolves the profile when the
19
+ extension loads, after Pi has applied the CLI flag.
20
+
17
21
  Mind requires a loaded compatible pi-persona through its versioned local companion handshake.
18
22
  Missing/incompatible presence leaves tools inactive and suppresses capture, storage/import,
19
23
  injection and reminders. A settings file or installed npm package is not proof of an active
20
- companion. Mind 0.9.5 requires Persona 1.18.1 or later for these paired contracts. Its optional npm
24
+ companion. Mind requires Persona 1.18.1 or later for these paired contracts. Its optional npm
21
25
  peer declares that requirement without auto-installing or activating another extension.
22
26
 
23
27
  The node-only core has no Pi imports. The factory wires native Pi hooks, tools, scope, scheduling
@@ -97,11 +101,17 @@ PI_PERSONA_DISABLE alone does not designate a worker. Workers get lean objective
97
101
  no project/session notes, no memory/backlog tools and no reminders. Both Persona engines freeze the
98
102
  launching persona. In-process workers receive it through their own extension bus; child processes
99
103
  receive a scrubbed spawn-local payload. A later parent selection cannot move a worker's memory scope.
104
+ Mind appends worker memory through Pi's prompt options. Persona can preload the selected skill
105
+ bodies in Pi's skills section and verify both inputs when the worker resumes. Pi records the
106
+ worker's memory excerpts in its native system messages when the worker transcript is saved.
100
107
  For a persisted worker with one valid Persona v1 contract on the active branch, lean memory ranking
101
108
  uses the first user turn after that contract. Labels such as `today` and `1d` in the worker's lean
102
109
  memory refer to that launch turn's timestamp. Mind reads current durable memory for each turn, and
103
110
  Persona checks the resulting prompt against the saved contract.
104
111
 
112
+ After upgrading from 0.9.5, a worker saved with memory in a full-prompt override can report
113
+ `prompt configuration` on resume. Start a fresh delegation with the same brief and skills in that case.
114
+
105
115
  Intercom/Exocom and worker output stay foreign reference material, not automatic capture requests.
106
116
  Only the reserved pi-persona-deferred-input custom type replays direct user input. This is a
107
117
  trusted-extension convention, not authentication against other code running in the same process.
@@ -121,11 +131,29 @@ Admission and replay both scan content. No append occurs after owner revocation;
121
131
  includes the native manager, session ID and file. No asynchronous gap separates validation and append.
122
132
 
123
133
  Receipts distinguish session storage from memory-only storage; Pi controls disk flushing.
134
+ An identical automatic capture reuses the active note when kind, text and source match.
135
+ It consumes no additional note or history slot and produces no new notification. After a
136
+ branch-local forget, the user can capture it again. Explicit writes keep their own provenance.
124
137
  Injection is reference data, escaped and bounded to a 600-token planning estimate (UTF-8 bytes / 3)
125
138
  with excerpts of at most 700 characters. It shares the total memory budget. Current task matching
126
139
  precedes recency, with objective priority. Omitted entries and clipping are disclosed. Explicit read returns the whole note.
127
140
  An in-memory session is not advertised as restart-durable.
128
141
 
142
+ The supervisor gets one request-local, labelled memory reference. Pi converts it to user-role
143
+ content for the provider. On ordinary tool continuations the reference stays at the turn's
144
+ starting input. If Pi compacts inside the run, Mind rebuilds it from the current owner's stores
145
+ and active-branch notes and places it before the native summary. This preserves changes made by
146
+ tools since the run began. Mind adds no reference to the session log or summary prompt.
147
+ The worker retains its separate lean system-prompt contract and selected skills. Explicit
148
+ memory tool arguments, results and anything the model repeats follow Pi's ordinary history rules.
149
+
150
+ Pi can also replay a previously sent request to warm an eligible provider cache. If the memory
151
+ owner changes, that replay can still contain the previous owner's reference. Pi 1.7.0 reuses the
152
+ original request context. Its warming decision exposes costs and an action without a request ID,
153
+ so Mind cannot reliably veto only that replay. Pi's global `cacheWarming`
154
+ setting defaults to `"idle"` for eligible, cost-effective requests. `"streaming"` limits warming
155
+ to active runs, and `"off"` disables warm requests. [Pi 1.7.0 settings](https://github.com/earendil-works/pi/blob/v1.7.0/packages/coding-agent/docs/settings.md)
156
+
129
157
  ## Cross-session handoffs
130
158
 
131
159
  `memory { action: "handoff", handoff: { operation: "save", goal, completed, pending, nextStep,
@@ -299,8 +327,14 @@ do not recursively schedule automatic workers. Shared memories are excluded.
299
327
  Persona hosts a real asynchronous Mind worker, visible in its standard agent view. The exact current
300
328
  session model is the only allowed selection: no alternate provider/model or fallback. The worker has
301
329
  no arbitrary tools, a 180-second deadline, and at most 12 full source records within 24,000 JSON
302
- characters, with explicit IDs and provenance. Selection reserves the newest eligible record and
303
- rotates bounded windows within a page and across older pages. Progress is session/scope-local and
330
+ characters, with explicit IDs and provenance. Selection normally reserves the newest eligible
331
+ record. If it would crowd out the next full record or separate a same-kind pair that fits without
332
+ it, that window gives the older records priority. Selection rotates within and across pages.
333
+ Each tier keeps the current page's
334
+ ordered IDs in memory (up to 100). The next page follows a recording-time and ID boundary, so new
335
+ writes and changes to last-seen time cannot push older facts continually out of reach. The next
336
+ sweep can include records restored behind an already traversed boundary. Reactivation starts from
337
+ the first page. Progress is session/scope-local and
304
338
  advances only for completed reviews or explicitly ineligible/already-reviewed sets; cancelled work
305
339
  does not count as reviewed. Byte-excluded records remain eligible on later passes. Coverage requires
306
340
  further admitted triggers, never an unbounded autonomous sweep. Its output is strict JSON with at most four replacement
@@ -312,6 +346,10 @@ selected automatic window with no same-kind pair starts no worker and consumes n
312
346
  allowance. A merge count alone still does not establish semantic truth; conflicting conclusions must
313
347
  not be adjudicated by the background reviewer.
314
348
 
349
+ A foreground settle observed while cancelled work finishes still counts toward the next eligible
350
+ retry. New foreground input invalidates that idle signal. Competing sessions may review the same
351
+ tier, and the fingerprint check prevents a stale proposal from overwriting newer facts.
352
+
315
353
  The parent rejects malformed, unsafe, unattributed, stale or foreign-owner changes and applies accepted
316
354
  replacements through the existing plan/CAS boundary. Kind does not change lifetime: consolidating
317
355
  owned short-term objectives stays in project STM and preserves the earliest expiry. Unrelated rows
@@ -554,7 +592,7 @@ language detector, language-specific factor, local tokenizer execution or runtim
554
592
  The reference encoding is not the current model's billing counter, and eight curated vectors do not
555
593
  establish broad language coverage or justify automatic budget tuning. The runtime budget is unchanged.
556
594
 
557
- Tests isolate PI_PERSONA_* and a throwaway PI_AGENT_DIR, use the actual Pi 1.6.0 SDK/tool pipeline and
595
+ Tests isolate PI_PERSONA_* and use a throwaway profile, the actual Pi 1.7.0 SDK/tool pipeline and
558
596
  offline providers, and join session_shutdown before SDK disposal. Native session tests cover persisted
559
597
  reopen, branch/fork, in-memory behavior and owner revocation. Store tests cover lost writes, stale plans,
560
598
  invalid inputs and concurrent apply. Installed-host/package qualification complements source tests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeondave/pi-persona-mind",
3
- "version": "0.9.5",
3
+ "version": "0.9.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Local memory for Pi with pi-persona — durable project and persona facts, session notes, bounded retrieval, and supervised automatic consolidation.",
@@ -52,7 +52,7 @@
52
52
  "verify": "npm run typecheck && npm test"
53
53
  },
54
54
  "pi": {
55
- "image": "https://raw.githubusercontent.com/AeonDave/pi-persona-mind/v0.9.5/assets/banner.png",
55
+ "image": "https://raw.githubusercontent.com/AeonDave/pi-persona-mind/v0.9.7/assets/banner.png",
56
56
  "extensions": [
57
57
  "./src/index.ts"
58
58
  ]
@@ -82,10 +82,10 @@
82
82
  }
83
83
  },
84
84
  "devDependencies": {
85
- "@earendil-works/pi-agent-core": "1.6.0",
86
- "@earendil-works/pi-ai": "1.6.0",
87
- "@earendil-works/pi-coding-agent": "1.6.0",
88
- "@earendil-works/pi-tui": "1.6.0",
85
+ "@earendil-works/pi-agent-core": "1.7.0",
86
+ "@earendil-works/pi-ai": "1.7.0",
87
+ "@earendil-works/pi-coding-agent": "1.7.0",
88
+ "@earendil-works/pi-tui": "1.7.0",
89
89
  "@types/node": "^22.0.0",
90
90
  "tsx": "^4.19.0",
91
91
  "typebox": "*",