@sovorn/pi-session-memory 0.1.0 → 0.1.1

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
@@ -4,84 +4,64 @@
4
4
  [![npm](https://img.shields.io/npm/v/@sovorn/pi-session-memory?style=flat-square&logo=npm)](https://www.npmjs.com/package/@sovorn/pi-session-memory)
5
5
  [![GitHub](https://img.shields.io/badge/GitHub-sovorn--c%2Fpi--session--memory-181717?style=flat-square&logo=github)](https://github.com/sovorn-c/pi-session-memory)
6
6
 
7
- Session memory for [Pi](https://github.com/earendil-works/pi). It keeps a few short, source-linked notes for the coding session you have open. A local Laya model decides when a note is worth keeping and which note a later turn might need. Your configured Pi model writes the note only after you allow it for that session. If the extension or Laya fails, Pi keeps working with its normal context.
7
+ Session memory for [Pi](https://github.com/earendil-works/pi). It keeps short notes in your current coding session, linked to the original evidence. Local Laya decisions select which notes to keep and recall. Your Pi model writes notes only after you allow it.
8
8
 
9
- Generation is off by default. Install it, run `/memory status`, and nothing is generated.
10
-
11
- ## What it does
12
-
13
- - Stores observations and reflections in the current Pi session, linked to the original evidence.
14
- - Uses local Laya decisions to select a small working set of notes for later turns.
15
- - Lets the model request supporting notes or raw entries with `hydrate_session_memory`.
16
- - Leaves Pi's history and compaction intact. On memory failures, Pi continues with native context.
17
-
18
- This is an experiment, not cross-session search. No usefulness gain has been demonstrated yet. See [known limitations](#known-limitations) before enabling generation.
9
+ Generation is off by default. If memory fails, Pi continues with its normal context. This is experimental, with no demonstrated benefit yet and no cross-session memory.
19
10
 
20
11
  ## Install
21
12
 
22
- This repository is already a Pi package. Pi loads `./src/extension.ts` directly, with no build step. Choose one source below; you do not need to install it more than once.
23
-
24
- ### From GitHub
25
-
26
- ```sh
27
- pi install git:github.com/sovorn-c/pi-session-memory
28
- ```
13
+ Choose one source. Pi loads the extension directly, with no build step.
29
14
 
30
- Pi clones the repository and records the source in your settings. To try it for one run without saving an install:
15
+ ### npm
31
16
 
32
17
  ```sh
33
- pi -e git:github.com/sovorn-c/pi-session-memory
18
+ pi install npm:@sovorn/pi-session-memory
34
19
  ```
35
20
 
36
- ### npm
21
+ Pi handles the npm download and extension registration. `npm install` alone does not register it in Pi.
37
22
 
38
- Install [`@sovorn/pi-session-memory`](https://www.npmjs.com/package/@sovorn/pi-session-memory) through Pi. The unscoped name belongs to a different project.
23
+ ### GitHub
39
24
 
40
25
  ```sh
41
- pi install npm:@sovorn/pi-session-memory
26
+ pi install git:github.com/sovorn-c/pi-session-memory
42
27
  ```
43
28
 
44
- Pi manages the npm download and extension registration. `npm install` alone does not register the extension in Pi. The `pi-package` keyword makes a published package eligible for the [Pi package gallery](https://pi.dev/packages/@sovorn/pi-session-memory).
45
-
46
- ### From a local checkout
29
+ ### Local checkout
47
30
 
48
31
  ```sh
49
32
  git clone https://github.com/sovorn-c/pi-session-memory.git
50
33
  pi install /path/to/pi-session-memory
51
34
  ```
52
35
 
53
- Replace `/path/to/pi-session-memory` with the cloned directory. Pi records the path in `settings.json`; it does not copy the directory. To load only its entry for one run:
36
+ Replace the path with the cloned directory. Pi records it in settings without copying the directory.
54
37
 
55
- ```sh
56
- pi -e /path/to/pi-session-memory/src/extension.ts
57
- ```
58
-
59
- After install, start Pi and run `/memory status`. It shows generation, config path, Python command, and token cadence. Installation does not install Python, Laya, or model weights. Complete [Laya setup](#laya-setup) before enabling generation.
38
+ Start Pi and run `/memory status` to check that the extension loaded. This does not start Laya or send a provider request.
60
39
 
61
40
  ## Requirements
62
41
 
63
- You need Pi and Python 3.11. This tree was checked on macOS arm64 with Pi 1.0.2, Node v26.7.0, and Python 3.11.15.
42
+ You need Pi, Python 3.11, and a separate Laya installation with its model weights. Installation through Pi does not install Python or Laya. The tested platform is macOS on Apple Silicon, with Pi 1.0.2 and English session text.
43
+
44
+ ## Laya setup
64
45
 
65
- Laya 0.3.7 and its typed-decisions checkpoint are separate prerequisites. The worker checks the exact tested code revision and model weights before loading. See [Laya setup](#laya-setup) for those pins.
46
+ Complete the [Laya setup guide](docs/SETUP.md) before enabling generation. It covers the required Laya version, model files, and Python environment.
66
47
 
67
- ## Configure
48
+ Point `PI_SESSION_MEMORY_PYTHON` at that environment's Python interpreter. Use `PI_SESSION_MEMORY_LAYA_CHECKPOINT` if your model files are outside the default Hugging Face cache. A setup mismatch leaves Pi running without memory.
68
49
 
69
- Optional. With no config file, generation stays off and the other defaults below apply.
50
+ ## Use
70
51
 
71
- The file is `<Pi agent dir>/pi-session-memory/config.json`. The agent directory is usually `~/.pi/agent`. `PI_CODING_AGENT_DIR` overrides it. You create the file yourself. The extension reads it when a session starts and never writes it. A missing file uses the defaults. A malformed file uses the defaults and warns once.
52
+ | Command | Behavior |
53
+ | --- | --- |
54
+ | `/memory` or `/memory status` | Show generation, config path, Python command, and token cadence. |
55
+ | `/memory on` | Enable generation for this session. Pi asks for confirmation before the first write. |
56
+ | `/memory off` | Disable generation and revoke the session's stored confirmation. |
72
57
 
73
- | Key | Type | Default |
74
- | --- | --- | --- |
75
- | `generation` | boolean | `false` |
76
- | `python` | non-empty string, optional | `python3.11` |
77
- | `observeAfterTokens` | integer >= 1 | `10000` |
78
- | `reflectAfterTokens` | integer >= 1 | `20000` |
58
+ `/memory on` is not consent. A new session, fork, resume, or `/reload` clears the session switch and confirmation.
79
59
 
80
- `PI_SESSION_MEMORY_PYTHON` overrides `python`. `PI_SESSION_MEMORY_LAYA_CHECKPOINT` overrides the checkpoint directory. For the Python command, the environment variable wins, then the config value, then `python3.11`.
60
+ Notes remain in Pi's session history. Later requests may receive a small selection of notes. The model can use `hydrate_session_memory` to retrieve their supporting notes or exact linked entries. Pi's history and compaction remain intact.
81
61
 
82
- How many notes can be considered (6, maximum 8) and how long a projected note can be (4000 characters, maximum 6000) are internal limits, not settings. Edit the file, then `/reload` or start Pi again.
62
+ ## Configure
83
63
 
84
- Example, still off until you also confirm in the session:
64
+ Configuration is optional. Create `~/.pi/agent/pi-session-memory/config.json` if you want to change the defaults. If you set `PI_CODING_AGENT_DIR`, use that directory instead of `~/.pi/agent`.
85
65
 
86
66
  ```json
87
67
  {
@@ -92,133 +72,45 @@ Example, still off until you also confirm in the session:
92
72
  }
93
73
  ```
94
74
 
95
- ## Use
75
+ `generation` controls the initial switch, but enabling it still requires interactive confirmation. The cadence values must be positive integers. `PI_SESSION_MEMORY_PYTHON` takes priority over `python`. Edit the file, then `/reload` or start Pi again.
96
76
 
97
- `/memory` with no arguments is the same as `/memory status`.
77
+ The extension never writes this file. A missing file uses defaults. A malformed file uses defaults and warns once.
98
78
 
99
- `/memory status` prints whether generation is on, the config path, the Python command, and the cadence. It does not start Laya and does not call your model.
79
+ ## What gets sent
100
80
 
101
- `/memory on` enables generation for this session only. `/memory on` is not consent. The first time this session is about to write a memory, Pi asks you to confirm. Nothing is sent until you confirm.
81
+ Laya runs locally. When generation is enabled, Pi asks before sending session-derived text and source IDs to your configured model/provider to write notes:
102
82
 
103
- `/memory off` disables generation for this session and drops a confirmation already stored for it. Neither command writes the config file or the session file.
83
+ > Session-derived text and its source entry IDs will be sent to the currently configured Pi model/provider only after a local Laya gate accepts. Laya runs locally. The Pi session remains canonical; generated memories are appended as non-context session entries. Do you allow this for the current session?
104
84
 
105
- A new session, a fork, a resume, or `/reload` clears that session switch. You are asked again before the next write.
85
+ Declining prevents that write. Session text may include private content; the extension does not automatically redact it.
106
86
 
107
- When a later request needs an earlier note, local Laya may select one. Projected memory reaches the normal Pi provider inside the request Pi was already going to send. The model can call `hydrate_session_memory` to read a reflection, the observation it came from, or the exact linked raw entries. A missing link is reported. A replacement is not invented.
87
+ Projected memory reaches the normal Pi provider in a request Pi was already sending. Hydration returns linked entries from the current session without a separate provider call. Turning generation off does not disable recall of existing notes.
108
88
 
109
89
  ## Disable and remove
110
90
 
111
- `/memory off` turns generation off for the current session. The extension stays loaded.
112
-
113
- `pi --no-extensions` disables every extension for that run, including this one if you installed it.
91
+ `/memory off` stops generation for the current session. Use `pi --no-extensions` to disable all extensions for a run, including memory generation and recall.
114
92
 
115
93
  Remove the source you installed:
116
94
 
117
95
  ```sh
118
- # GitHub install:
119
- pi remove git:github.com/sovorn-c/pi-session-memory
120
-
121
- # npm install:
122
96
  pi remove npm:@sovorn/pi-session-memory
123
-
124
- # Local checkout:
97
+ # Or, for a GitHub install:
98
+ pi remove git:github.com/sovorn-c/pi-session-memory
99
+ # Or, for a local checkout:
125
100
  pi remove /path/to/pi-session-memory
126
101
  ```
127
102
 
128
- Remove drops the package source from `settings.json`. Your session files and any Laya cache stay where they are.
129
-
130
- ## What gets sent
131
-
132
- Generation is off by default. A write needs both a switch and an interactive confirmation: `generation: true` in the config, or `/memory on`, and then your answer for that session. `/memory on` is not consent. Pi shows this question:
133
-
134
- > Session-derived text and its source entry IDs will be sent to the currently configured Pi model/provider only after a local Laya gate accepts. Laya runs locally. The Pi session remains canonical; generated memories are appended as non-context session entries. Do you allow this for the current session?
135
-
136
- There is one provider call site, `modelRegistry.complete`. Decline, and that write does not happen. Projected memory reaches the normal Pi provider as part of a request Pi was already sending. `hydrate_session_memory` returns entries already in the session and does not call the provider.
137
-
138
- The extension runs with Pi's permissions. Behavior lives under `src/` and `worker/`. A static scan of `src/` and `worker/` finds no telemetry client and no network client. Recorded checks set `PI_OFFLINE=1`, `PI_TELEMETRY=0`, `HF_HUB_OFFLINE=1`, and `TRANSFORMERS_OFFLINE=1`.
139
-
140
- ## What one trial showed
141
-
142
- One synthetic trial compared a native arm with a memory arm. The native arm ran first. The result was no demonstrated benefit. The keyword oracle did not show a gain. Token usage was not recorded. The model was `openai-codex/gpt-6-luna` at thinking low, with 8 provider calls and 3 Laya decisions.
103
+ Removal drops the package source from Pi's settings. It does not delete session files or the Laya cache.
143
104
 
144
105
  ## Known limitations
145
106
 
146
- - Checked on macOS arm64, English, and one Pi session. There is no cross-session memory.
147
- - Provider-backed memory formation is not verified on Pi 1.0.2. It was last verified on Pi 0.87.1. Pi 1.0.2 checks so far used generation off, in no-provider runs.
148
- - In RPC mode the confirmation waits for the client's answer.
149
- - The first Laya load can take seconds. Laya confidence is uncalibrated for some choices.
150
- - No build, lint, typecheck, or CI is configured. Laya setup is machine-specific.
151
- - This is experimental. A local source security review found no blocking findings; it does not establish provider-backed compatibility.
152
-
153
- ## Laya setup
154
-
155
- Point `PI_SESSION_MEMORY_PYTHON` at a Python 3.11 interpreter that can import Laya. The pins below identify the tested dependency and model file. Pi and npm do not require these pins; this worker does. A mismatch leaves Pi running without memory.
156
-
157
- <details>
158
- <summary>Pinned Laya installation and model verification</summary>
159
-
160
- Laya is 0.3.7 at commit `010bacef009c855ccba814b51f7c8e1d38ab5e3f`. The checkpoint revision is `f9ab0b228f0fc0f14d873dbc99038f135c2da1b2`. The `model.safetensors` SHA-256 is `4fa56de72383a9d3efa9cfa78955733c81b9fc8067a587ca4beb82c78107a24e`.
161
-
162
- This VCS-form install is not run by this project:
163
-
164
- ```sh
165
- uv pip install "laya @ git+https://github.com/NandhaKishorM/laya@010bacef009c855ccba814b51f7c8e1d38ab5e3f"
166
- ```
167
-
168
- No download command is verified here. The checkpoint is the Hugging Face cache snapshot `models--convaiinnovations--laya-typed-decisions/snapshots/f9ab0b228f0fc0f14d873dbc99038f135c2da1b2`. The hub directory is `HF_HUB_CACHE`, otherwise `$HF_HOME/hub`, otherwise `$XDG_CACHE_HOME/huggingface/hub`, otherwise `~/.cache/huggingface/hub`. `PI_SESSION_MEMORY_LAYA_CHECKPOINT` overrides that directory. Check the weights with `shasum -a 256 model.safetensors` and compare it with the SHA-256 above. To refuse a hub fetch, set `HF_HUB_OFFLINE=1` and `TRANSFORMERS_OFFLINE=1`.
169
-
170
- </details>
171
-
172
- ## Check your install
173
-
174
- Start Pi and run `/memory status`. This checks that the extension loaded without starting Laya or sending a provider request. Use `/memory on` only after setup; review the confirmation before allowing generation.
175
-
176
- <details>
177
- <summary>Developer checks from a source checkout</summary>
178
-
179
- The first block needs no Laya cache and sends no provider request. It installs the package into a temporary Pi agent directory, checks that `/memory` is listed, checks that `pi --no-extensions` hides it, then removes it. The second block needs the two environment variables. The doc test skips that block when they are absent.
180
-
181
- <!-- verify-install:start -->
182
- ```sh
183
- set -euo pipefail
184
- agent="$(mktemp -d)"
185
- trap 'rm -rf "$agent"' EXIT
186
- export PI_CODING_AGENT_DIR="$agent"
187
- export PI_OFFLINE=1
188
- pi --version
189
- node --version
190
- pi install "$PWD"
191
- loaded="$(printf '%s\n' '{"type":"get_commands","id":"commands"}' | pi --mode rpc --no-session)"
192
- printf '%s\n' "$loaded" | grep -F '"name":"memory"' >/dev/null
193
- disabled="$(printf '%s\n' '{"type":"get_commands","id":"commands"}' | pi --mode rpc --no-session --no-extensions)"
194
- if printf '%s\n' "$disabled" | grep -F '"name":"memory"' >/dev/null; then
195
- echo "memory listed while extensions are disabled" >&2
196
- exit 1
197
- fi
198
- pi remove "$PWD"
199
- removed="$(printf '%s\n' '{"type":"get_commands","id":"commands"}' | pi --mode rpc --no-session)"
200
- if printf '%s\n' "$removed" | grep -F '"name":"memory"' >/dev/null; then
201
- echo "memory still listed after remove" >&2
202
- exit 1
203
- fi
204
- ```
205
- <!-- verify-install:end -->
206
-
207
- <!-- verify-laya:start -->
208
- ```sh
209
- set -euo pipefail
210
- : "${PI_SESSION_MEMORY_PYTHON:?set PI_SESSION_MEMORY_PYTHON}"
211
- : "${PI_SESSION_MEMORY_LAYA_CHECKPOINT:?set PI_SESSION_MEMORY_LAYA_CHECKPOINT}"
212
- unset NODE_TEST_CONTEXT
213
- "$PI_SESSION_MEMORY_PYTHON" -m unittest discover -s worker/tests -p 'test_*.py'
214
- node --test test/pi/projection.test.ts
215
- ```
216
- <!-- verify-laya:end -->
217
-
218
- </details>
219
-
220
- ## Status
107
+ - Experimental, English-only, and tested on macOS arm64 within one Pi session. There is no cross-session memory.
108
+ - Provider-backed memory formation is not verified on Pi 1.0.2. Its current compatibility checks used generation off, in no-provider runs.
109
+ - Laya setup is machine-specific. The first load can take seconds, and some decisions have uncalibrated confidence.
110
+ - In RPC mode, confirmation waits for the client's answer.
111
+ - A local source security review found no blocking findings. This is not a guarantee of security.
112
+ - No license has been selected; publication alone does not grant permission to reuse the code.
221
113
 
222
- Experimental. A local source security review found no blocking findings. This is not a guarantee of security. No license has been selected; publication alone does not grant permission to reuse the code. GitHub, npm, and local-path installation use the same Pi package manifest.
114
+ See [developer notes](docs/DEVELOPMENT.md) for verification scripts, runtime limits, and the recorded trial.
223
115
 
224
- Report problems or discuss the experiment in [GitHub issues](https://github.com/sovorn-c/pi-session-memory/issues). Include your Pi version, Python version, and `/memory status` output. Do not post session text, credentials, or private paths.
116
+ Report problems in [GitHub issues](https://github.com/sovorn-c/pi-session-memory/issues). Include Pi and Python versions and `/memory status` output. Do not post session text, credentials, or private paths.
@@ -0,0 +1,74 @@
1
+ # Developer notes
2
+
3
+ These checks are for contributors working from a source checkout. Users only need to start Pi and run `/memory status` to check that the extension loaded.
4
+
5
+ ## Package and runtime
6
+
7
+ The Pi package entry is `./src/extension.ts`. Pi loads it without a build step. No build, lint, typecheck, or CI is configured.
8
+
9
+ Candidate count and projected note length are internal limits, not user settings. The candidate count is 6, maximum 8. The projection limit is 4000 characters, maximum 6000.
10
+
11
+ ## Data flow checks
12
+
13
+ There is one provider call site, `modelRegistry.complete`. Generation is off by default and needs interactive confirmation after a local Laya gate accepts. `/memory on` is not consent.
14
+
15
+ Projected memory reaches the normal Pi provider in an existing request. `hydrate_session_memory` resolves linked evidence from the active branch without a separate provider call.
16
+
17
+ The extension runs with Pi's permissions. Behavior lives under `src/` and `worker/`. A static scan finds no telemetry client and no network client in those directories. This does not audit Pi or Laya dependencies.
18
+
19
+ Recorded offline checks set `PI_OFFLINE=1`, `PI_TELEMETRY=0`, `HF_HUB_OFFLINE=1`, and `TRANSFORMERS_OFFLINE=1`. Do not run provider-backed tests without explicit consent.
20
+
21
+ ## Verify installation
22
+
23
+ Run this block from the repository root. It uses a temporary Pi agent directory, checks command registration and disable behavior, then removes the package. It needs no Laya cache and sends no provider request.
24
+
25
+ <!-- verify-install:start -->
26
+ ```sh
27
+ set -euo pipefail
28
+ agent="$(mktemp -d)"
29
+ trap 'rm -rf "$agent"' EXIT
30
+ export PI_CODING_AGENT_DIR="$agent"
31
+ export PI_OFFLINE=1
32
+ pi --version
33
+ node --version
34
+ pi install "$PWD"
35
+ loaded="$(printf '%s\n' '{"type":"get_commands","id":"commands"}' | pi --mode rpc --no-session)"
36
+ printf '%s\n' "$loaded" | grep -F '"name":"memory"' >/dev/null
37
+ disabled="$(printf '%s\n' '{"type":"get_commands","id":"commands"}' | pi --mode rpc --no-session --no-extensions)"
38
+ if printf '%s\n' "$disabled" | grep -F '"name":"memory"' >/dev/null; then
39
+ echo "memory listed while extensions are disabled" >&2
40
+ exit 1
41
+ fi
42
+ pi remove "$PWD"
43
+ removed="$(printf '%s\n' '{"type":"get_commands","id":"commands"}' | pi --mode rpc --no-session)"
44
+ if printf '%s\n' "$removed" | grep -F '"name":"memory"' >/dev/null; then
45
+ echo "memory still listed after remove" >&2
46
+ exit 1
47
+ fi
48
+ ```
49
+ <!-- verify-install:end -->
50
+
51
+ ## Verify local Laya behavior
52
+
53
+ Run this block from the repository root with both environment variables set. The documentation test skips it when the runtime is absent. It runs worker and projection tests, not provider-backed formation.
54
+
55
+ <!-- verify-laya:start -->
56
+ ```sh
57
+ set -euo pipefail
58
+ : "${PI_SESSION_MEMORY_PYTHON:?set PI_SESSION_MEMORY_PYTHON}"
59
+ : "${PI_SESSION_MEMORY_LAYA_CHECKPOINT:?set PI_SESSION_MEMORY_LAYA_CHECKPOINT}"
60
+ unset NODE_TEST_CONTEXT
61
+ "$PI_SESSION_MEMORY_PYTHON" -m unittest discover -s worker/tests -p 'test_*.py'
62
+ node --test test/pi/projection.test.ts
63
+ ```
64
+ <!-- verify-laya:end -->
65
+
66
+ ## Recorded trial and compatibility
67
+
68
+ One synthetic trial compared a native arm with a memory arm. The native arm ran first. The result was no demonstrated benefit. The keyword oracle did not show a gain. Token usage was not recorded.
69
+
70
+ The model was `openai-codex/gpt-6-luna` at thinking low, with 8 provider calls and 3 Laya decisions. This is historical evidence, not proof of usefulness.
71
+
72
+ Provider-backed memory formation is not verified on Pi 1.0.2. It was last verified on Pi 0.87.1. Pi 1.0.2 checks so far used generation off, in no-provider runs. Native lifecycle and provider compatibility require separate evidence.
73
+
74
+ In RPC mode, confirmation waits for the client's answer. The first Laya load can take seconds; some choices have uncalibrated confidence. Setup is machine-specific.
package/docs/SETUP.md ADDED
@@ -0,0 +1,48 @@
1
+ # Laya setup
2
+
3
+ This guide is for users who want to enable session-memory generation or recall. These dependencies are separate from the Pi package. Installing the extension alone does not install them.
4
+
5
+ ## Python environment
6
+
7
+ Use Python 3.11 in an environment that can import Laya. Set `PI_SESSION_MEMORY_PYTHON` to that environment's interpreter, or set `python` in the extension's config file. The environment variable wins over config, then the default is `python3.11`.
8
+
9
+ The extension was checked on macOS arm64 with Pi 1.0.2, Node v26.7.0, and Python 3.11.15. Other platforms are not verified.
10
+
11
+ ## Required Laya source
12
+
13
+ The worker accepts Laya 0.3.7 at commit `010bacef009c855ccba814b51f7c8e1d38ab5e3f`. It accepts the pinned local checkout or a VCS installation whose package metadata records that commit. An ordinary version-only installation is not enough.
14
+
15
+ For an existing Python 3.11 environment, this VCS-form install is not run by this project:
16
+
17
+ ```sh
18
+ uv pip install --python "$PI_SESSION_MEMORY_PYTHON" "laya @ git+https://github.com/NandhaKishorM/laya@010bacef009c855ccba814b51f7c8e1d38ab5e3f"
19
+ ```
20
+
21
+ The commit pins the tested Laya code. Pi and npm do not require it, but the current worker checks it. A mismatch disables memory instead of loading untested code.
22
+
23
+ ## Model checkpoint
24
+
25
+ Use the Hugging Face `convaiinnovations/laya-typed-decisions` checkpoint at revision `f9ab0b228f0fc0f14d873dbc99038f135c2da1b2`. No download command is verified here.
26
+
27
+ The default cache snapshot is `models--convaiinnovations--laya-typed-decisions/snapshots/f9ab0b228f0fc0f14d873dbc99038f135c2da1b2`. The worker looks under these hub directories, in order:
28
+
29
+ 1. `HF_HUB_CACHE`
30
+ 2. `$HF_HOME/hub`
31
+ 3. `$XDG_CACHE_HOME/huggingface/hub`
32
+ 4. `~/.cache/huggingface/hub`
33
+
34
+ `PI_SESSION_MEMORY_LAYA_CHECKPOINT` overrides the snapshot directory. Its final directory name must match the required revision.
35
+
36
+ The `model.safetensors` SHA-256 must be `4fa56de72383a9d3efa9cfa78955733c81b9fc8067a587ca4beb82c78107a24e`. Check it from the snapshot directory:
37
+
38
+ ```sh
39
+ shasum -a 256 model.safetensors
40
+ ```
41
+
42
+ The hash checks that the weights match the tested model file. Set `HF_HUB_OFFLINE=1` and `TRANSFORMERS_OFFLINE=1` to refuse a hub fetch.
43
+
44
+ ## Start using memory
45
+
46
+ Start Pi and run `/memory status`. This reports configuration, not whether Laya inference works. Once setup is complete, run `/memory on` and review the provider disclosure before confirming.
47
+
48
+ If the worker cannot load or trust a decision, Pi continues with native context and reports that memory is unavailable. Check your Python interpreter, Laya source, and checkpoint path first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sovorn/pi-session-memory",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Pi extension that keeps small, source-linked memories of a coding session.",
6
6
  "homepage": "https://github.com/sovorn-c/pi-session-memory#readme",
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/sovorn-c/pi-session-memory.git"
10
10
  },
11
11
  "bugs": { "url": "https://github.com/sovorn-c/pi-session-memory/issues" },
12
- "files": ["src/", "worker/*.py"],
12
+ "files": ["src/", "worker/*.py", "docs/*.md"],
13
13
  "publishConfig": { "access": "public" },
14
14
  "keywords": ["pi-package", "pi-extension", "session-memory"],
15
15
  "pi": { "extensions": ["./src/extension.ts"] },