@joe-broadhead/opencode-mem 0.9.14 → 0.11.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +1856 -0
  2. package/README.md +15 -7
  3. package/SECURITY.md +3 -1
  4. package/docs/agent-instructions.md +1 -1
  5. package/docs/agent-protocol.md +7 -7
  6. package/docs/permissions.md +16 -0
  7. package/package.json +8921 -1070
  8. package/shared/page-paths.js +44 -0
  9. package/skills/mem.pages/SKILL.md +3 -1
  10. package/skills/mem.usage/SKILL.md +15 -15
  11. package/src/action-grant-keys.js +159 -0
  12. package/src/action-grant.js +439 -0
  13. package/src/actions.js +1690 -0
  14. package/src/backend/records.js +25 -2
  15. package/src/backend/v3.js +76 -22
  16. package/src/call-shapes.js +17 -16
  17. package/src/collector-lock.js +533 -62
  18. package/src/collector-service.js +153 -26
  19. package/src/collector.js +623 -30
  20. package/src/config.js +88 -7
  21. package/src/connect.js +106 -8
  22. package/src/credentials.js +123 -25
  23. package/src/events.js +174 -3
  24. package/src/forget-turn.js +141 -0
  25. package/src/host-refusal.js +78 -0
  26. package/src/index.js +209 -22
  27. package/src/jobs/host.js +557 -0
  28. package/src/ops/codes.js +110 -0
  29. package/src/ops/copy-lineage.js +42 -0
  30. package/src/ops/index.js +28 -0
  31. package/src/ops/space-ops.js +1936 -0
  32. package/src/outlinks.js +103 -0
  33. package/src/p2-reservation.js +151 -0
  34. package/src/permissions.js +30 -0
  35. package/src/plugins/descriptor.js +62 -0
  36. package/src/plugins/discovery.js +318 -0
  37. package/src/plugins/grants.js +178 -0
  38. package/src/plugins/locate.js +319 -0
  39. package/src/plugins/manifest.js +1162 -0
  40. package/src/plugins/source-contract/index.js +34 -0
  41. package/src/plugins/source-contract/policy.js +102 -0
  42. package/src/plugins/source-contract/vendor/PROVENANCE.json +17 -0
  43. package/src/plugins/source-contract/vendor/RELEASE-SHA256SUMS +3 -0
  44. package/src/plugins/source-contract/vendor/RELEASE.json +17 -0
  45. package/src/plugins/source-contract/vendor/SHA256SUMS +41 -0
  46. package/src/plugins/source-contract/vendor/THIRD-PARTY-NOTICES.md +35 -0
  47. package/src/plugins/source-contract/vendor/broker-client.js +93 -0
  48. package/src/plugins/source-contract/vendor/chunks/chunk-3M5PAKSS.js +84 -0
  49. package/src/plugins/source-contract/vendor/chunks/chunk-4ERCA4TK.js +185 -0
  50. package/src/plugins/source-contract/vendor/chunks/chunk-6HDIB2SA.js +183 -0
  51. package/src/plugins/source-contract/vendor/chunks/chunk-ELPJD3ND.js +10 -0
  52. package/src/plugins/source-contract/vendor/chunks/chunk-HLVAKAYG.js +10 -0
  53. package/src/plugins/source-contract/vendor/chunks/chunk-I2RXJJJM.js +81 -0
  54. package/src/plugins/source-contract/vendor/chunks/chunk-KWEWSZ4V.js +505 -0
  55. package/src/plugins/source-contract/vendor/chunks/chunk-KYWBTAF4.js +182 -0
  56. package/src/plugins/source-contract/vendor/chunks/chunk-Q3RQA5J2.js +249 -0
  57. package/src/plugins/source-contract/vendor/chunks/chunk-RRUAIQ4I.js +156 -0
  58. package/src/plugins/source-contract/vendor/chunks/chunk-RYNKNCPP.js +165 -0
  59. package/src/plugins/source-contract/vendor/chunks/chunk-W5SHR7DQ.js +9477 -0
  60. package/src/plugins/source-contract/vendor/chunks/chunk-ZUKF7P6U.js +653 -0
  61. package/src/plugins/source-contract/vendor/cursor.js +26 -0
  62. package/src/plugins/source-contract/vendor/descriptor.js +34 -0
  63. package/src/plugins/source-contract/vendor/events.js +257 -0
  64. package/src/plugins/source-contract/vendor/index.js +10 -0
  65. package/src/plugins/source-contract/vendor/params.js +22 -0
  66. package/src/plugins/source-contract/vendor/permission.js +28 -0
  67. package/src/plugins/source-contract/vendor/pick.js +22 -0
  68. package/src/plugins/source-contract/vendor/read.js +29 -0
  69. package/src/plugins/source-contract/vendor/registry.js +23 -0
  70. package/src/plugins/source-contract/vendor/schema.js +17 -0
  71. package/src/plugins/source-contract/vendor/schemas/output.agenda.json +96 -0
  72. package/src/plugins/source-contract/vendor/schemas/output.countdown.json +28 -0
  73. package/src/plugins/source-contract/vendor/schemas/output.image.json +28 -0
  74. package/src/plugins/source-contract/vendor/schemas/output.inbox.json +84 -0
  75. package/src/plugins/source-contract/vendor/schemas/output.links.json +46 -0
  76. package/src/plugins/source-contract/vendor/schemas/output.list.json +57 -0
  77. package/src/plugins/source-contract/vendor/schemas/output.metric.json +61 -0
  78. package/src/plugins/source-contract/vendor/schemas/output.note.json +14 -0
  79. package/src/plugins/source-contract/vendor/schemas/output.progress.json +50 -0
  80. package/src/plugins/source-contract/vendor/schemas/output.record.json +38 -0
  81. package/src/plugins/source-contract/vendor/schemas/output.table.json +61 -0
  82. package/src/plugins/source-contract/vendor/schemas/output.thread.json +62 -0
  83. package/src/plugins/source-contract/vendor/schemas/sources.json +819 -0
  84. package/src/plugins/source-contract/vendor/schemas.js +19 -0
  85. package/src/plugins/source-contract/vendor/tools-rpc.js +42 -0
  86. package/src/plugins/verify.js +56 -0
  87. package/src/protocol.js +11 -6
  88. package/src/recall.js +92 -5
  89. package/src/records.js +61 -2
  90. package/src/requests.js +216 -0
  91. package/src/runtime.js +89 -7
  92. package/src/setup-time.js +68 -0
  93. package/src/skills.js +230 -8
  94. package/src/source-ids.js +25 -0
  95. package/src/sources/declaration.js +365 -0
  96. package/src/sources/reads.js +772 -0
  97. package/src/sources/rpc.js +151 -0
  98. package/src/sources.js +389 -92
  99. package/src/spaces.js +283 -11
  100. package/src/spool.js +61 -4
  101. package/src/stated.js +10 -5
  102. package/src/storable.js +139 -0
  103. package/src/tools/commitments.js +74 -23
  104. package/src/tools/held-write.js +46 -19
  105. package/src/tools/index.js +28 -0
  106. package/src/tools/ingest.js +38 -2
  107. package/src/tools/memory.js +56 -25
  108. package/src/tools/page.js +212 -95
  109. package/src/tools/recall.js +218 -4
  110. package/src/tools/share.js +42 -3
  111. package/src/tools/shared.js +84 -6
  112. package/src/tools/space-lifecycle.js +278 -0
  113. package/src/tools/spaces.js +381 -30
  114. package/src/tools/status.js +9 -2
  115. package/src/tools/wiki.js +231 -116
  116. package/src/util.js +110 -6
  117. package/src/vendor/source-contract/README.md +24 -0
  118. package/src/vendor/source-contract/THIRD-PARTY-NOTICES.md +35 -0
  119. package/src/vendor/source-contract/VENDOR.json +81 -0
  120. package/src/vendor/source-contract/chunks/chunk-3M5PAKSS.js +84 -0
  121. package/src/vendor/source-contract/chunks/chunk-6HDIB2SA.js +183 -0
  122. package/src/vendor/source-contract/chunks/chunk-HLVAKAYG.js +10 -0
  123. package/src/vendor/source-contract/chunks/chunk-I2RXJJJM.js +81 -0
  124. package/src/vendor/source-contract/chunks/chunk-KWEWSZ4V.js +505 -0
  125. package/src/vendor/source-contract/chunks/chunk-W5SHR7DQ.js +9477 -0
  126. package/src/vendor/source-contract/chunks/chunk-ZUKF7P6U.js +653 -0
  127. package/src/vendor/source-contract/cursor.js +26 -0
  128. package/src/vendor/source-contract/events.js +257 -0
  129. package/src/vendor/source-contract/registry.js +23 -0
  130. package/src/vendor/source-contract/tools-rpc.js +42 -0
  131. package/src/views/access-reads.js +256 -0
  132. package/src/views/communities.js +77 -0
  133. package/src/views/contracts.js +1082 -23
  134. package/src/views/inbox-bytes.js +103 -0
  135. package/src/views/profile.js +31 -0
  136. package/src/views/receipt.js +26 -1
  137. package/src/views/records-reads.js +520 -41
  138. package/src/views/rpc.js +153 -25
  139. package/src/views/shape.js +8 -5
  140. package/src/views/write-state.js +89 -0
  141. package/src/wiki-ingest.js +215 -0
  142. package/src/wiki-state.js +228 -0
  143. package/views/pages.html +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,1862 @@
3
3
  The format follows Keep a Changelog 1.1.0: one `## [x.y.z] - date` section per
4
4
  release.
5
5
 
6
+ ## [0.11.3] - 2026-11-16
7
+
8
+ ### Added
9
+
10
+ - `meetings.list` and `meetings.read` list and read the person's meeting pages, newest first by the
11
+ meeting's start, with the page's `at`, `endsAt`, `people`, `body` and `transcript`.
12
+ - `share.requests` lists the hand-over requests addressed to the caller, pending first and then
13
+ newest first, and never a request the caller sent.
14
+ - `projects.list` lists the project pages the caller can read across the spaces they can reach,
15
+ narrowed by name and by id, with `more` and `incomplete` when a space holds more or could not be
16
+ read.
17
+ - `commitments.list` items carry `due`, an ISO 8601 local date, and the order is dated first by
18
+ `due`, then undated, with ties by creation.
19
+ - `review.list` items carry `at`, an ISO 8601 instant, and the queue reads oldest first with ties
20
+ by id.
21
+ - `pages.list` items carry `changedAt`, an ISO 8601 instant. `updated` stays the display day.
22
+ - `metadata.memoryReceipt` carries `text`, `textMore`, `state` and `link`, so a host draws the
23
+ saved card from one place.
24
+ - The declaration carries `toolsRequireResource: "memory"`. A host that has not handed the engine a
25
+ `memory` resource is told so, and the agent is given none of Memory's tools.
26
+ - A wiki answers its own state (A1), and pages are still listed during an ingest, marked `stale`, so
27
+ the person's pages never vanish (A2).
28
+ - Ingest is automatic and debounced (A3): after the last write Memory starts one ingest itself,
29
+ `MEMORY_WIKI_INGEST_MS` sets the delay, `ingest: false` is accepted and ignored, and a write
30
+ during an ingest is queued rather than refused.
31
+ - Every write and every refusal of `mem_remember`, `mem_commitments`, `mem_page` and `mem_wiki`
32
+ answers with a structured first line, `state: <state> · id: <id> · link: <kind>:<address>`:
33
+ `stored`, `held`, `processing`, `queued`, `ready`, `failed` or `refused`, with `link`
34
+ naming a memory, a commitment, a page or a wiki document
35
+ ([write-states.md](docs/write-states.md); A4). The prose after it is unchanged, and
36
+ `metadata.memoryReceipt` carries the same `state` and `link`.
37
+
38
+ ### Changed
39
+
40
+ - A host's direct `mem.collect` with no call id is refused when the host has offered no `memory`
41
+ resource. The answer names the state (`unconfigured`) and never says it started.
42
+
43
+ ### Fixed
44
+
45
+ - A miss or an absence now says which space it searched, and the scoped sentence is used only where
46
+ the space really refused the read.
47
+
48
+ ### Checks
49
+
50
+ - A `test-node24` CI job runs the suite on Node 24, the version the release workflow publishes on,
51
+ so a Node 24 only failure stops a merge instead of the first publish.
52
+
53
+ ### Deploy
54
+
55
+ No migrations, and no records or control schema change.
56
+
57
+ ## [0.11.2] - 2026-11-16
58
+
59
+ Includes every change listed under 0.11.1 and 0.11.0, and this fix:
60
+
61
+ ### Fixed
62
+
63
+ - A recall in a shared space now also counts the person's own private matches for the
64
+ same query and states the count, without showing them. An agent no longer has only a
65
+ warning that private memory was not searched.
66
+
67
+ ## [0.11.1] - 2026-11-16
68
+
69
+ Not released: it did not pass its release gate. In one attempt, after searching only a
70
+ shared space, the agent told the person their own notes held nothing on a topic that a
71
+ private note covered. Its changes ship in 0.11.2.
72
+
73
+ Includes every change listed under 0.11.0, and this fix:
74
+
75
+ ### Fixed
76
+
77
+ - A commitment the agent saves keeps a due date or a trigger only when the person's
78
+ own messages name it. Otherwise it is saved without one, and the answer says to
79
+ ask the person. A press with no call id, in a session with no person message,
80
+ keeps them, as before.
81
+
82
+ ## [0.11.0] - 2026-11-15
83
+
84
+ Not released: it did not pass its release gate. In one attempt, the agent saved a
85
+ commitment with a condition the person never stated. Its changes ship in 0.11.1.
86
+
87
+ **0.11 is not released**, and `package.json` stays at 0.10.2 until its release
88
+ commit. **0.10.4 and 0.10.5 were never released:** 0.10.4 was a candidate whose
89
+ gate found two wrong answers about what memory holds, and 0.10.5 was the
90
+ candidate that fixed them and passed its own gate; neither was published, and
91
+ both sections are kept below as history, marked not released. 0.10.5's
92
+ candidate is in this tree — it was merged in at `3ac0fa5b` — so everything they
93
+ carry ships here. This section is what `build/0.11` merges: reviewed lanes
94
+ whose entries were written in their own branches and are combined here, in one
95
+ section, without a version bump — the space and sharing acts (#58 A2–A9, A11),
96
+ control's P2, console parity (#59 §4.5), the source contract, Memory as a
97
+ source provider (#58 §B), Memory Jobs' schedule and shared budget, the
98
+ spaces-to-join read, 0.10.2's three Jelly reads, Plan A's declared actions, a
99
+ person's erasure when Jelly ID deletes their account, a removed file retracting
100
+ what it caused, one collector per cell, source reads through Jelly's broker (off
101
+ until source-contract #8), and Jelly's own sheet, read-only page and wiki twins
102
+ and tiles (#55 and #72–#75).
103
+
104
+ **Jelly 0.4.0-beta.20 or newer (protocol major 7) is required.** The
105
+ declaration carries 34 actions; an older Jelly caps a plugin at 32 and refuses
106
+ the whole declaration with a schema error (`actions: Too big: expected array to
107
+ have <=32 items`), so Memory 0.11 does not load there. `requires` has no
108
+ feature name for the 48-action cap, so the refusal is a schema error rather
109
+ than "needs a newer Jelly".
110
+
111
+ **0.10.4 to 0.10.7 were never released:** 0.10.4 to 0.10.6 keep their own
112
+ sections below, each marked not released, and 0.11 carries all four releases’
113
+ changes.
114
+
115
+ ### Security
116
+
117
+ - **Your jelly sign-in token now goes only to the Memory service it was issued for.** If Memory's address points at another server, Memory uses your `/connect` sign-in or the key you pasted instead, and never hands that other server your jelly token. If neither is set, Memory tells you to run `/connect`.
118
+
119
+ - **Inside Jelly, with an address of one's own, the person's Jelly identity
120
+ token went to that address; from 0.11 it only ever goes to Jelly's own
121
+ origin** (`jelly-declarations` review R2-B1). With the switch on and a
122
+ service address of one's own configured, `createCredentials` minted the Jelly
123
+ identity token first and sent it there: a token that names the person, carries
124
+ no `cnf`, and lives ten minutes, so whoever operated that address could replay
125
+ it against Jelly's Memory — and the person's own key was never used.
126
+ `createCredentials` now takes `identityAllowed`, which `src/index.js` passes
127
+ `false` whenever `insideJelly && ownService`, so an address of one's own is
128
+ reached only by the person's key or `/connect` and Jelly's token only ever
129
+ goes to the origin Jelly offers. **Exposure is low:** before 0.11 such an
130
+ address could come only from a config file. Test:
131
+ `JD-switch-on-own-address-never-jelly-token`.
132
+ - **A source's, a plugin's and a job's own failure text is redacted wherever it
133
+ is stored or shown; before 0.11 it was stored raw and displayed verbatim.**
134
+ A probe or a paused bind stored `refresh_token=…`, `token=tk_…` and
135
+ `Bearer sk-live-…` in `source_requests.note`, `source_collections.error`,
136
+ `plugin_consents.reason`, `job_runs.refusals`, `job_logs.detail` and
137
+ `collector.json` — the status file every process reads — and `sources.list`,
138
+ `mem_spaces` health and the console showed them. Slicing to 100 or 300
139
+ characters protects nothing. Every one of those paths now goes through the
140
+ shared `storable.js` redactor **where it is written**, and the records service
141
+ redacts again as it answers `sources.list`, `jobs.runs`, `jobs.logs`,
142
+ `jobs.list`, `plugin_consents.reason` and `plugin_requests.note`, so a row an
143
+ older build wrote cannot show a secret through any reader, the console
144
+ included; `collector.json` is redacted field by field as it is written.
145
+ Tests: `RS-pause-reason-redacted`, `RS-refusal-reason-redacted`,
146
+ `RS-status-file-redacted`, `RS-status-held-redacted`,
147
+ `RS-job-checkpoint-redacted`, `RS-old-source-rows-redacted-on-read`.
148
+ - **Routine model errors are redacted too, and the daily journal's line with
149
+ them; the routine paths kept that text raw, the journal line since 0.9.14.**
150
+ A provider error can quote a key or a URL with a token, and `runs.run.error`
151
+ (and its `result`), the `memory.routine.llm` log line and the journal page's
152
+ "The model failed on part of the day (…)" each carried it — into a page that
153
+ is full-text indexed and shown by the console, a log, and `listRuns`,
154
+ `routines.status` and `space.stats` (`last_runs`), which the console's Home,
155
+ Spaces and Activity and `mem_spaces` health read. The shared redactor now runs
156
+ where the run finishes and again in the records service on write (`putRun`)
157
+ and on read, so an old row cannot show one either. Journals written before
158
+ this fix are **not** rewritten — an ordinary page's body is the person's own
159
+ text — and the line keeps the fixed prefix above, so it can be found and
160
+ redacted, or the person can edit the page. Tests:
161
+ `RS-daily-llm-error-redacted`, `RS-routine-llm-error-redacted`.
162
+ - **The skill mirror is bound to the account and the origin it was mirrored
163
+ for.** `skill.json` records both beside the mirrored `SKILL.md`, so signed
164
+ out, signed in as someone else, or on another server, no cached skill is
165
+ registered and a previous account's private skills never come back. Tests:
166
+ `JU-cache-not-used-after-sign-out`, `JU-cache-not-used-for-another-account`
167
+ (the whole change, with its measurements and deadlines, is **A start no
168
+ longer waits for the skill mirror** under Fixed).
169
+
170
+ ### Added
171
+
172
+ - **A meeting's page carries its transcript, and a review row names its meeting
173
+ (0.11, jelly's #61 and #62, the fields and the read).** `page.save` takes
174
+ `transcript` and keeps it in `fields.transcript`, the field the meeting engine
175
+ reads (`records/src/jobs/meetings.js`), and declares the `path` and `type` its
176
+ answer already carried, so a host can save the same meeting's page again. One
177
+ meeting has one page: a save that names no path lands at `meetings/<meeting
178
+ id>` whatever the page is called, and a second save of the same meeting updates
179
+ that page and adds a version instead of writing a second one; a page that
180
+ lives at the path and is another meeting's is refused, as before. A page's
181
+ `fields` take 32 KiB in the records service and the meeting's fields ride
182
+ there too, so `transcript` is held to 16 KiB of **UTF-8 bytes** (the declared
183
+ `maxLength` is that figure in characters, a ceiling a JSON Schema can state,
184
+ and the act checks the bytes before the store sees them) and `meeting` to
185
+ 1 KiB of JSON. The declaration's caps are ceilings, not a budget: `page.save`
186
+ serves every page, so the ordinary page's `body` keeps the **58 KiB** it had,
187
+ and a note-only page with a large body saves as before. What is checked is
188
+ the thing itself, before anything is signed or written: the page's whole
189
+ `fields` against the store's 32 KiB **in the JSON the store writes** (escaping
190
+ a quote or a newline costs two bytes), and the whole press, at the preview and
191
+ again at the save, against **61,440 bytes** of JSON — the grant's 64 KiB less
192
+ the room ADR §4.4 keeps. Each refusal names the size and the limit and never
193
+ cuts the text. A longer transcript is later work: a Files address on the page
194
+ (`fields.transcript_file`), read in parts with the person's rights. Meeting
195
+ ids that differ only in case keep their own pages: only an id that is already
196
+ a path segment is used as it is, and anything else carries a digest of the
197
+ exact id. `review.list` rows carry `meeting
198
+ {id, path}` when a proposal came from a meeting page, and each `evidence` entry
199
+ keeps `at` (the transcript's moment, or the note's line) and `file` (the
200
+ transcript it came from) beside its quote, so a host ties an item to its
201
+ meeting and the moment it was said. The Inbox carries the same two, derived
202
+ from the proposal's own fields and read from the same space, so a Keep row can
203
+ name its meeting and its moment with nothing new stored; they are held back
204
+ behind `INBOX_ITEM_MEETING` until Jelly's strict Inbox item takes them, because
205
+ its host leaves out an item it cannot read. Proposals stay off by default
206
+ (`RECORDS_MEETING_PROPOSALS`) and the acts stay dark: this is the declared
207
+ input and answer, and the read shape (`src/ops/space-ops.js`,
208
+ `src/views/contracts.js`, `src/views/records-reads.js`).
209
+
210
+ - **Jelly's two remaining 0.11 actions, declared (#77 and #78).** `suggestion.dismiss
211
+ { id, forever? }` hides one suggestion from `mem.suggestions` without deciding
212
+ it ("Not now"), or turns its kind off in the person's own space ("Never
213
+ suggest this"); the suggestion read already carries its turn. `held.decide
214
+ { id, op: accept | edit | drop, edits? }` is one action for a held team
215
+ write's three decisions, modelled on `proposal.decide`: accept completes the
216
+ shared write, edit keeps the corrected words held, drop writes nothing. Both
217
+ are spent in the person's personal space and are bound to the version their
218
+ preview showed: a press with no live preview is refused, and nothing changes.
219
+ Both stay dark behind the plugin's `actions` and records'
220
+ `RECORDS_ACTIONS_ENABLED`, and both are **declared** now: Jelly
221
+ 0.4.0-beta.20 carries protocol major 7 and a 48-action cap, so the six acts
222
+ once held (`HELD_FOR_CAP`, `HELD_FOR_CONTROL_P2`) are declared under their own
223
+ names, making **34 actions**, with no name merged. A held write's preview shows the edited words that will
224
+ land, and the console turns a muted suggestion kind back on. See
225
+ [design/actions-0.11-suggestion-held.md](docs/design/actions-0.11-suggestion-held.md).
226
+
227
+ - **Collect wakes a resting jelly host once each morning (jelly D70/D71 and
228
+ #4262, opencode-mem#58).** Memory's `collect` routine declared no `wake`, so
229
+ on a resting host Collect waited for the host's next wake. `jelly.routines`
230
+ now declares two routines, each calling `mem.collect({})`:
231
+ `collect` every 30 minutes with `wake: false` stated explicitly, and
232
+ `collect-morning` daily at `0 6 * * *` with **`wake: true`** ("Wake once each
233
+ morning to collect new events from your enabled sources"). 06:00 is the
234
+ host's own zone: Jelly's routine schema has no `tz`, and the host writes the
235
+ agent's — the person's — IANA zone as the schedule's `when.tz`, resolving the
236
+ cron in it including daylight saving; on a cloud machine with nothing saved
237
+ that zone is UTC. **The person approves the wake once**, by accepting the
238
+ declaration on their host; they can turn either routine off in the host's routine list.
239
+
240
+ **A routine still collects with no person present.** Memory’s request guard checks
241
+ only the calls the model makes, which carry a call id. A routine’s check runs without
242
+ one, both when jelly runs a declared routine and when OpenCode runs a schedule’s check,
243
+ so `mem.collect` runs. That exemption covers `mem.collect` alone: a review decision
244
+ without a call id is always refused.
245
+
246
+ - **A proposal names its wiki, and the review read lists its sources
247
+ (`opencode-mem#63`, `#76`).** A space holds several wikis and a folder path
248
+ does not say which, so `proposal.create` takes `wiki` beside `parent` (both
249
+ already-declared fields; no new action name), and the proposal read carries
250
+ `wiki` and `parent` for the page a suggestion would create. Every
251
+ `review.list` row also carries `sources`: the evidence the proposal cites,
252
+ with its quotes, then the record's own event, turn, session or routine, each
253
+ once and at most ten — what Jelly's Review page lists as Sources. A quote is
254
+ the record's own text, so erasing the record takes it, and a ref is an id,
255
+ never a person's name. `#76` asked for `proposal.create` itself: it was already
256
+ declared (Plan A, `5225a66c`), and its input now carries `wiki`, `parent` and
257
+ `note`, so Jelly's Propose sends the wiki, the page and the note. No action
258
+ name is added, and the declaration stays at 28. That wiki is resolved in the
259
+ target space when the proposal is filed — a foreign, unknown or commitments
260
+ wiki is refused, as a copy into a wiki is — so the read never names a
261
+ destination nothing could honour. Accept does not file into the wiki yet: a
262
+ wiki holds flat files, `parent` is a records folder, and the applied page is
263
+ records' `review.decide`'s, so the row's `wiki` is the request, not the
264
+ destination (`docs/jelly.md`).
265
+
266
+ - **Memory reports its own setup time, and its tool list never moves (0.11,
267
+ jelly #80 and #81, D226).** A host starting an engine waits for every plugin's
268
+ setup, and Jelly's engine-start telemetry can name the slowest phase but not
269
+ the plugin that spent it. Memory now times its own setup, once per start, on a
270
+ monotonic clock, in seventeen named phases (`config`, `host`, `credentials`,
271
+ `backend`, `connect`, `status`, `wiring`, `tools`, `rules`, `views`, `sources`,
272
+ `skills`, `builtinSkill`, `commands`, `hooks`, `capture`, `flush`), and answers
273
+ them through the declared read `memory.setup` — `{ ms, phases: [{ name, ms }],
274
+ at }`, under `mem_status` — which reads nothing, asks for no sign-in and needs
275
+ no request, so it can be read as soon as the engine is up. `ms` is the phases'
276
+ sum (`src/setup-time.js`, `test/jelly-uptime.test.js`). Measured on one laptop
277
+ with every request stubbed (`npm run measure:setup`,
278
+ `scripts/setup-phases.mjs`): a whole setup is **5–10 ms** — 5.5 ms with the
279
+ service a Jelly account offers, 9.6 ms with an address and key of one's own,
280
+ 10.1 ms with nothing set up — and the same 7–13 ms when that address refuses
281
+ every connection, accepts and never answers, or answers control but stalls the
282
+ skill list with eight spaces. The largest phases are `flush` (3.5 ms) and
283
+ `builtinSkill` (0.6 ms); **no phase waits on the network** — the skill mirror
284
+ reads the spaces' skills after setup returns, and `skills` is now a disk read
285
+ of `stateDir/skills` (0.1–0.6 ms) — and the 25 synchronous disk reads cost
286
+ about 0.8 ms warm (`docs/jelly.md`). No behaviour changed to get there. The
287
+ registered tools are also held to being decided once, at setup: signing in,
288
+ signing out, an account change and a credential refresh leave the list
289
+ identical, inside and outside Jelly. Jelly master has no declaration field
290
+ for that yet, so none is declared.
291
+
292
+ - **Proposals from meeting pages (0.11, `opencode-mem#58` item 2).** Jelly saves
293
+ one page of type `meeting` per meeting, with its notes and links to its
294
+ recording and transcript. Memory Jobs now reads a saved meeting page — its
295
+ notes, and the transcript the page carries — and turns the **decisions and
296
+ commitments** it finds into **proposals in review, never memories**: each one
297
+ cites the page and the moment it came from (the transcript's timestamp, or the
298
+ line's offset), and nothing is stored until the person accepts, edits or
299
+ rejects it. The owner's decision of 2026-11-14 allows this to run at the
300
+ measured proposal precision (80–87%) because every proposal is reviewed;
301
+ extraction that saves a memory directly keeps the 0.90 bar, so `extract`'s
302
+ direct-save default stays `off`. **Attribution is by authorship, never by
303
+ default:** a note line is the person's only when the page is theirs and nobody
304
+ else saved it since — a guest's or a teammate's line is "someone else's", and a
305
+ page a job wrote (an external agenda) is context and proposes nothing. Each
306
+ proposal says whose line it is. Proposals are written in the space the meeting
307
+ page lives in, so a team meeting's proposals are read only by its members. The
308
+ pass is idempotent (a page whose notes, transcript and author are unchanged is
309
+ not read again, and a proposal is keyed by content), a deploy backfills
310
+ nothing (only a save marks a page; `jobs.meetings`, the owner's ask, reads the
311
+ old ones), a tick reads at most five pages, a page the budget stopped stays
312
+ pending, anything past the caps or the budget is recorded rather than dropped,
313
+ deleting the page retires its proposals, and it spends the space's one shared
314
+ day budget and respects its one breaker (counted by the service-wide cap too).
315
+ It is **off by default** under the new `RECORDS_MEETING_PROPOSALS` (unset
316
+ means off; `on` turns it on, and only after the held-out set passes)
317
+ (`records/src/jobs/meetings.js`, `records/test/jobs-meetings.test.js`).
318
+ - **A press a real Jelly makes, for the acts bound to state a preview showed
319
+ (0.11, #58 section A).** Jelly draws a confirmation from an action's preview
320
+ and presses with the same input it previewed: it never merges the preview's
321
+ answer into the press (`view-source.ts` `take`). So a page cannot send back
322
+ the fields a preview computed, and `space.manage`'s archive and leave and
323
+ `share.copy`'s version and wiki file could never be pressed from a host: every
324
+ press was refused. Memory now keeps what the preview showed — the page
325
+ version, the computed file, the membership digest — in the space store the
326
+ act is spent in (`act_previews`, through the new `acts.preview`), keyed by the
327
+ act, the canonical digest of the person's own input and the person, for ten
328
+ minutes; `acts.apply` spends that snapshot once, in the grant's transaction,
329
+ and answers it to the plugin, which puts the fields back on the operation's
330
+ input exactly as if the page had sent them. A change in between is still
331
+ `VERSION_CONFLICT`, a spent or missing snapshot asks for a fresh preview, and a
332
+ caller that does send `version` or `expectedDigest` keeps the explicit path and
333
+ its stricter check. Control's leave binds the state digest in its reservation
334
+ only when the signed input names one, so a host's press commits at the body's
335
+ digest, which control still holds to the state now.
336
+ - **Space and sharing operations for Jelly's actions (#58 A2–A9, A11).**
337
+ The service side of the actions Jelly draws, as operations and previews the
338
+ action framework registers: `page.save` (with the `meeting` page type),
339
+ `page.move` and its preview, `page.delete`, `wiki.delete` and its preview,
340
+ `space.create` (a team or a topic, invite-only or open, with members),
341
+ `share.grant` and `share.revoke` with previews, `share.transfer` as a request
342
+ the new owner accepts or declines, `page.copy` and its preview (marked with
343
+ where it came from), proposals (`proposal.create`, `accept` with edits,
344
+ `askChanges`, `reject`) and `space.join`/`space.requestJoin`. Control gains
345
+ `spaces.flavor` and `spaces.visibility` (migration 020, and a flavor is only
346
+ ever a shared space's), join requests with approve and decline, the
347
+ `joinable` read behind `mem.spaces-to-join`, and a `dry_run` share preview
348
+ that runs the commit's own checks and writes nothing; records gains
349
+ `proposals.create` and `proposals.askChanges`.
350
+ - **A handover and a join request are rows, not audit entries (migration
351
+ 021).** Each is `pending`, `accepted`, `declined`, `cancelled` or `expired`;
352
+ a partial unique index allows one pending request per target and recipient;
353
+ accepting checks `state = 'pending'` in the same transaction that moves
354
+ ownership, so a settled request cannot be resurrected, and each request
355
+ expires. A handover is G2-P: a browser session, or the host's verified grant
356
+ once P2's reservation key is set (below), and the ownership change is
357
+ recorded under the person who accepted it.
358
+ - **A proposal never rewrites a team page.** An agent may propose an added
359
+ line, never a rewrite; accepting a change to a page in a shared space is the
360
+ person's act, decided from what was written; a line-changing proposal carries
361
+ the `base_version` it was written against and a later one is
362
+ `VERSION_CONFLICT`, while an append carries no version and merges beside a
363
+ later append (its guard is that a section it found still exists, outside any
364
+ code fence; one that was not there is its own to create, as
365
+ `records.append` does); a proposal body, an added line, its section and an
366
+ `askChanges` note go through the same secret and email refusal as a direct
367
+ write.
368
+ - **A move or copy preview reads the grants, not only the members.** The new
369
+ `GET /v1/spaces/:id/readers?path=` answers who reads a path — members, a
370
+ space-wide grant, a folder grant whose prefix covers it, a page grant — and
371
+ names a group or role as that group or role. A cross-space move out of a
372
+ shared space is refused before anything is copied: the store will not delete a
373
+ team page for a bearer, so `page.copy` is the way, and the person deletes the
374
+ original in the console.
375
+ - **A space's members, and who a page is shared with, are view reads (Jelly's
376
+ ask 10).** `members.list` and `grants.list` let Jelly's space page and share
377
+ sheet read what they show instead of asking the agent: control's own member
378
+ roster and grants, behind the same `mem_spaces` permission as the `members`
379
+ and `access` actions, with control deciding every visibility rule (a viewer's
380
+ role for the roster; a page's owner or a space admin for its grants). Answers
381
+ are bounded and paged at 50 rows **and 56,000 bytes of JSON** — the limit the
382
+ other reads hold to — because a name is up to 200 characters and may be
383
+ multi-byte; a page cut for room keeps a run from the top and answers a
384
+ `cursor` for the row after its last, so nothing is lost and nothing is listed
385
+ twice. `grants.list` names one page, folder or wiki by the `resource` a `mem_share`
386
+ grant uses — the gateway's `resource_id` read, which this gives the service
387
+ client it was missing, so `mem_share` list and revoke read one page's grants
388
+ through the real gateway too — and without a target answers only the grants
389
+ that name the caller, because a key cannot list every grant in a space.
390
+ - **`mem.grants` says `scope: "mine"` when it reads the caller's own grants.**
391
+ It named that answer `space`, which no key can read: control's bearer route
392
+ answers a page's grants by `resource_id` and, without one, only the grants that
393
+ name the caller. The answer now says which it is.
394
+ - **The 17 space and sharing acts run end to end (#58 A2–A9, A11).** Each is a
395
+ declared action *and* an act records applies: a grant the host signed is
396
+ **reserved** by `acts.apply` (verified, bound to the person, spent once, with
397
+ an `act_audit` row that outlives the ledger), the plugin runs the operation
398
+ from `src/ops` **as the person whose device pressed**, and `acts.settle` makes
399
+ the receipt terminal (`applied`, or `refused` when the operation's own rule
400
+ said no). The operations keep their rules — ownership, a team page's
401
+ protections, G2-P on a transfer — and the action layer neither skips nor
402
+ repeats one. `share.revoke` is an owner device's act (`local`, always): it
403
+ takes away someone else's access, and `space.create` is always confirmed,
404
+ because a space that names members hands them access at once. A handover is
405
+ spent and audited in the space it changes, a move that copied and could not
406
+ remove the original settles `partial` with the copy's id, and an `act_audit`
407
+ row keeps every act's outcome (applied, refused, partial, unrecorded) after
408
+ its receipt is pruned. Every action's preview is a read through the same
409
+ services, with the action's own input, and writes nothing — a move, a copy, a
410
+ share, a wiki delete, a save, a page delete, a handover, a proposal decision,
411
+ a join-request decision and a visibility change — and the two older
412
+ `memory.revise.preview` and `inbox.decide.preview` read their record.
413
+ `test/actions-space.test.js` holds one end-to-end test per action and per
414
+ preview, and a refused case per action. The last two are A11's:
415
+ `space.joinRequest.decide` (approve or decline a waiting join request,
416
+ `chat`/always, previewing who gains read access) and `space.visibility` (who
417
+ can find or join, `local`/always, G2-P, previewing the members, the requests
418
+ that become direct joins, and the population). The declaration is now **34
419
+ actions and 44 RPC methods**, under Jelly's caps of 48 and 64 (protocol major
420
+ 7, Jelly 0.4.0-beta.20). The four whose control path needs P2
421
+ (`share.transfer`, `share.decide`, `space.visibility`, `space.manage`) are
422
+ declared too; without `P2_RESERVATION_KEY` each press refuses
423
+ `P2_UNAVAILABLE`, naming the secret, before control is asked.
424
+ - **P2: a verified host grant reaches a G2-P act, on in 0.11
425
+ (`docs/design/p2-control.md`).** A reservation (`src/p2-reservation.js`, four
426
+ byte-identical copies: the plugin, records, the gateway and control) is signed
427
+ by records at `acts.apply` and verified by control before a G2-P act runs, so
428
+ a grant the host signed is spent once and control's `personAtBrowser` is not
429
+ bypassed; migration 023 holds the spend. It is on where
430
+ `P2_RESERVATION_KEY` is set the same in records, the gateway and control;
431
+ with no key, the four P2 presses refuse `P2_UNAVAILABLE` in the plugin's words
432
+ before control is asked.
433
+ The gateway also serves Memory's own action key and pulls the hosts' public
434
+ keys into `ACTION_KEYS_FILE` (unset turns the puller off), refusing a file
435
+ older than its limit, and a stale key file fails closed. **A reservation is
436
+ spent only from the host it was issued to** (`p2_host`): records refuses a
437
+ grant another host signed than the request's credential names, and any grant
438
+ from a caller that names no host (`grant_host`, from the new
439
+ `x-records-identity-host` header), the gateway refuses a proof
440
+ from another host and one from a credential that names no host, and control
441
+ refuses a proof that is not the host the gateway asserted, spending it under
442
+ that host (`x-control-host`). A G2-P press is a host's press, so Memory's own
443
+ sign-in alone makes the change in the console (P1).
444
+ - **One action list behind both UIs (opencode-mem#59 §4.5).** The console now
445
+ offers every act the `jelly.actions` list declares: Browse spaces (an open
446
+ space joined, an invite-only one asked for), a handover accepted or declined,
447
+ Send a copy (A8), Suggest an edit (A9), Delete this wiki (C14, with the pages,
448
+ the readers and an honest "links from other wikis cannot be read here"), and
449
+ Edit words for a held team write before it is accepted (A15's edit half,
450
+ through a new records method `review.edit` that shares one store operation
451
+ with the `write.decide` action). Every one of those routes is a browser
452
+ session's (P1, `session_required` for a key), and each confirm is bound to
453
+ what its preview showed: a copy names the version and a page that moved is
454
+ `version_conflict`, a wiki delete carries the preview's digest
455
+ (`state_changed`), and a held write's edit names the version it edits.
456
+ `review.edit` is session-only at the gateway and again in the records store.
457
+ A copy's name comes from one function shared by the console and the action
458
+ (`shared/page-paths.js`), which also keeps the `-copy` suffix whole on a long
459
+ title. `test/console-parity.test.js` holds the two lists to each other, checks
460
+ that `pages/write` is `page.save` and `review/decide` is `proposal.decide` at
461
+ the records call they make (kind, path, title, body and type), and prints
462
+ every console act with no declared action, administration included, in full.
463
+ - **Memory as a source provider (D202, app#2346).** A top-level `sources` key in
464
+ `package.json` declares eight sources under contract version 1:
465
+ `mem.turn-receipts`, `mem.names`, `mem.members`, `mem.grants`,
466
+ `mem.spaces-to-join`, `mem.meeting-records`, `mem.suggestions` (events,
467
+ `x-mem/suggestion`) and `mem.pages-search`. They are served over the package's
468
+ tools RPC (`<package>.tools`) with `registerToolsRpc`, so a call is resolved
469
+ against the session's own rules before it runs and nothing is added to an
470
+ agent's surface. Every read runs as the session's own credential and only
471
+ reaches the spaces control lists for that person. `src/vendor/source-contract/`
472
+ carries the package's `dist/` from its PR head, dev-time only; the conformance
473
+ kit runs over every source in `test/sources-conformance.test.js`
474
+ ([docs/sources.md](docs/sources.md), #58 §B). `mem.spaces-to-join` answers
475
+ control's `GET /v1/spaces/joinable` end to end (#58 S4, A11): the
476
+ organisation's open spaces, the visibility their owners chose, marked
477
+ `join: "open"`, and never an invite-only space — a grant made by any editor,
478
+ or to a group or org role, is one person's access, not a listing — and never
479
+ a space they are in, an archived or personal one, another organisation's, or
480
+ one whose existence they may not see. Control bounds the list at 200 and
481
+ says `more`; the source keeps its own cap and passes either on, and the
482
+ console's Browse spaces shows the same list (and the cut), joining or reading
483
+ a space past the bound by id (`test/sources-spaces-e2e.test.js` runs it
484
+ against the real control and records services). Five of the sources answer their
485
+ own `x-mem/<name>` output, with its JSON Schema inline; `mem.names` and
486
+ `mem.pages-search` answer the registry's `list`. The package carries only what
487
+ the plugin imports at runtime, not the kit it is tested with.
488
+ - **A GitHub-installed plugin is found where OpenCode puts it (B6).**
489
+ `opencode plugin add github:joe-broadhead/opencode-<name>#vX.Y.Z` installs
490
+ under `<cache>/npm/git-<repo>-<sha256(target)[:12]>/<stamp>/node_modules/<name>`,
491
+ and Memory finds the stamp whose lockfile commit is the one `/api/plugin`
492
+ reports, reads its `sources` from that package on disk and hashes it. A
493
+ store that holds the plugin at another commit is refused with its own
494
+ sentence rather than the layout's. Discovery never asks npm anything: no
495
+ `npm view`, no registry fetch, and no `require.resolve` by bare package
496
+ name (a test runs it in a process where all three are traps).
497
+ - **One session, one curator (B8, reworked).** `sessions_seen` is keyed on the
498
+ OpenCode session id, in the **person's personal space** whatever space is
499
+ active, and the **first pipeline to see a session owns its curation**. Both
500
+ sides always keep their transcript: capture's `sessions.seen` records the
501
+ gateway's verified `x-records-session` (a body's `session_id` is ignored), and
502
+ History's `events.ingest` records the session its event's own `thread` names.
503
+ Curation is skipped at **read time**, counted and reversible — the natural
504
+ `listEvents` read (and so the daily routine, which also skips capture's L0
505
+ turns of a History-owned session) and the jobs' curate reader both honour the
506
+ owner. Nothing is withdrawn and nothing is written twice.
507
+ - **A page that restarts its window after the cursor advanced is a new restart
508
+ (A2).** A resync counts as the same only while the cursor is held at the
509
+ position it was counted at; the day's second real restart pauses the binding.
510
+ - **A declared account with a dash, a dot or a digit binds itself (B4).** A
511
+ per-account read's alias is everything after the plugin prefix's first dash,
512
+ so `plaud-work-2_list` names `work-2`, not `2`.
513
+ - **`needs_rebind` takes precedence (B3).** A plain pause keeps it, and only the
514
+ person's rebind clears it; resume cannot lift it.
515
+ - **Plugin text shown as markup is escaped at the display edge (B5).**
516
+ `escapeForDisplay` (`src/util.js`) is the one helper for a source's
517
+ `scope.describe`, its owner label or a note, and the contract says so.
518
+ - **A page's copy can land in a hub wiki (#57-11, A8's residual), and every page
519
+ copy now needs write access where the page is.** `share.copy` with
520
+ `op: "page"` takes `to.wiki`: the copy is written into that wiki as one flat
521
+ Markdown source file, at most 512 KiB, named from the page's own name
522
+ (`harbour-copy.md`), naming its source in the file, with the ingest started;
523
+ records writes nothing. Only a wiki the caller may write is accepted (the
524
+ space's editor, admin or owner, control's own role), a file already at that
525
+ name is refused rather than overwritten, and the preview names the wiki and
526
+ the exact file the press must send back. A copy also carries the page's
527
+ `version`: a page that changed after the preview is `VERSION_CONFLICT`, and a
528
+ press without the version is `NEEDS_APPROVAL`. The source's writer role is
529
+ required for both targets, as the console requires it, so a viewer cannot
530
+ copy a page out of their space. Class and confirmation stay `chat` /
531
+ `always`, the declared count stays 28, and `to.wiki` and `version` are inside
532
+ the grant's input digest.
533
+
534
+ - **A delivered capture can be removed by its turn's key prefix**
535
+ (`POST /v1/capture/delete`), and stays removed. The request names the
536
+ session, the visibility and the turn's full key prefix
537
+ (`<session>:<message>:`; a session-only or shorter prefix, or another
538
+ session's, is refused, so no session-wide erase is possible); the gateway
539
+ resolves exactly the placement the capture used, so the receipts are the
540
+ caller's own, and reads their message ids (never from the request). The
541
+ delete goes out with the agent and task the capture was placed with, from
542
+ the receipt, and with the turn's session (the cell matches rows on all of
543
+ them); the count is the cell's `data.deleted_count`, and a short count is a
544
+ 502 with the erase reported unconfirmed. It writes a
545
+ tombstone for the turn first, so a capture of it that arrives later is
546
+ refused (`409 capture_tombstoned`); a write still running answers `425`; a
547
+ prefix that stored nothing answers `{ deleted: 0 }`; a core that answered a
548
+ capture without ids answers `capture_delete_unsupported` rather than
549
+ pretending; and the count is the cell's own `deleted_count`. It exists for
550
+ the forget below, whose own turn another plugin instance may have delivered.
551
+
552
+ - **A person's account is erased when Jelly ID says it is deleted
553
+ (`account.deleted`, resource-token contract §10; approved by the owner on
554
+ 2026-11-14).** Jelly ID reports deletions
555
+ to the gateway (`POST /resource/accounts/events`, §10), which polls every five
556
+ minutes with Memory's own key, signing a fresh RFC 7523 assertion per request
557
+ and keeping no state; control stores each event by id (`account_events`), so a
558
+ replay inserts nothing and acting twice is harmless. On `account.deleted`
559
+ **at once** — normally within five minutes — every agent credential of the
560
+ person is revoked, every session and every grant naming them is deleted,
561
+ every membership is removed, their identity row keeps `(issuer, subject)` and
562
+ gains `tombstoned_at` (so `resolveIdentity` answers `403 account_deleted` and
563
+ nobody is provisioned again silently), their user row stays as a tombstone
564
+ (`disabled`, the email replaced by `deleted+<user id>@invalid`), and one
565
+ `account.erase.revoke` audit row records ids and counts only. **Within the
566
+ job** the same poll cycle runs a pass (a failed step retries after five
567
+ minutes, well inside 24 hours): the person's personal space is purged, its
568
+ core layers — L0 turns, L1 atoms, and L2 and L3 for every agent — are deleted
569
+ under the person's own user id, and in
570
+ each shared space they were in, copies of their private memory
571
+ (`fields.copied_from.space`), held batches, keyed-write ledgers, forgotten-copy
572
+ keys, agent grants and the source requests and proposals they made are
573
+ withdrawn while **the team's pages and their content stay**, themselves
574
+ becoming `former-member` — in the record and in every stored version. The
575
+ state machine is `queued → done` with `retrying` between passes, and a step
576
+ that succeeded is recorded in the erasure's `report`, so a retry resumes; the
577
+ gateway then purges the person from `auth.db` (the Better Auth user, sessions,
578
+ accounts, API keys, the plugin sign-in devices and grants they approved,
579
+ capture receipts, and any table a later version adds, found by the identity
580
+ columns) and confirms it. `person.erase` needs its own credential
581
+ (`RECORDS_ERASE_KEY`, sent as `x-records-erase-key` from control's
582
+ `CONTROL_RECORDS_ERASE_KEY`): a records key alone can read and write a space
583
+ and must not erase a person. A shared space nobody active remains for is
584
+ **kept and marked**, never purged, and one a grant reaches is never purged at
585
+ all — an org admin resolves it by adding an active owner, and control's health
586
+ names the ids. Two stores outlive the erasure: `deleted_accounts` (issuer,
587
+ subject, user id, event id, time; keyed by all three, kept after completion)
588
+ is the restore list, and a control restore rolls it back, which is why Jelly
589
+ ID's feed — 90 days, longer than the 37-day backup window — is the authority
590
+ after a full restore; `CONTROL_ERASED_FILE` is a second copy of erased
591
+ identities outside control's database, rebuilt at start from every erasure its
592
+ records hold and never failing open, so a restored database cannot sign a
593
+ rolled-back person in again while the feed is down. Memory-issued credentials
594
+ are held until the feed's replay drains. Erasure is off until the feed is
595
+ configured (`ACCOUNT_FEED_CONTROL_URL` and the service key), so a cell that
596
+ sets neither behaves as 0.10.x. Control's migrations are 024 (`account_erasure`),
597
+ 025 (`agent_credentials` takes the `account_deleted` reason its CHECK refused,
598
+ so an erasure of a person holding a credential no longer threw and retried for
599
+ ever) and 026 (the PostgreSQL half of 024 was keyed on `subject` alone and
600
+ failed every erasure with `42703`; the key is `(issuer, subject, user_id)` in
601
+ both dialects). Every table is classified from the schema, and the
602
+ every-table proof runs on PostgreSQL as it does on SQLite. The operator's
603
+ runbook is [docs/operations/account-erasure.md](docs/operations/account-erasure.md);
604
+ the tests are `test/account-erasure-e2e.test.js`, `-hold`, `-postgres`,
605
+ `-regressions`, `-restore` and `test/account-feed.test.js`.
606
+
607
+ - **A file removed at its source retracts what it caused (0.11).** Jelly has no
608
+ deletion channel: it re-emits the event with no words and the label `gone` or
609
+ `withheld`, so a `file` event shaped that way **is** a removal. In the page's
610
+ own transaction Memory clears the row's `title`, `text` and `url` (keeping its
611
+ labels, its moment and `removed_at`), then retracts what it derived: a waiting
612
+ proposal is retired and its quote scrubbed from the row and from every stored
613
+ version; a record the person already accepted stays theirs and loses the
614
+ removed file's citation, link and quote — in its versions too, with
615
+ `fields.removed_sources` saying which file went; a page's rendered line that
616
+ cited the event goes; and a job's staged output (`job_items`, `job_extracted`)
617
+ is deleted. A copy in another space is **reported, never retracted** (another
618
+ space's record is that space's), and the answer carries `removals[].copies`.
619
+ The person is told on that day's `journal/<date>` — the event id, the records
620
+ that came from it and the reason, never the file's name or path, which the
621
+ ingest took off the row — and only when Memory actually held the file; one
622
+ `delete_audit` row per removal records that the rule retracted something.
623
+ Finding it is indexed, not a scan: every record's citations are `cite` edges
624
+ written with the record, a space that predates them is backfilled once in
625
+ bounded slices (resumable from `meta.cite_edges`; 50,000 records in 174 ms),
626
+ and a removal that arrives while the index is incomplete **waits**
627
+ (`removals_pending`, `index_building`). The work is bounded and resumable per
628
+ event (`events.retract_pending`, `retract_after`), `sources.unbind` refuses
629
+ while a binding still has removals pending, and every `events.ingest` answer
630
+ carries `removals_pending` (a quiet tick too), as `sources.list` and
631
+ `space.stats` do per binding and per space. **The records service finishes
632
+ removals on its own clock**, not the collector's: `startRemovalWorker` ticks
633
+ about every 10 s, each tick runs slices of about 150 ms of rewrites (one per
634
+ space, ~1 s cap), the commit outside that budget, in the spaces that left a
635
+ `spaces/<id>.work` marker — never by scanning
636
+ every space file — so a deletion completes whether or not OpenCode is running
637
+ and whatever the collector's cadence is; a space being drained is skipped, and
638
+ the flag, the scrub and the resume point commit together, so nothing is done
639
+ twice and a crash loses nothing. Measured on a 10,000-record space with 500
640
+ held-file tombstones and no collector: 5 ticks, about 4.6 s of work, worst tick
641
+ 1.1 s, every quote gone in about a minute
642
+ (`docs/design/memory-v1-contracts.md`; `test/source-removals.test.js`).
643
+
644
+ - **Inside Jelly, a source read asks Jelly's broker first, and fails closed
645
+ (0.11, `feat/broker-request-identity`).** A declared source's read goes through
646
+ the contract's `sourceReader`: Jelly's host broker first (`jelly.core.request`,
647
+ kind `broker`), then the embedded tools-RPC read. The request is the package's
648
+ own `brokerRequest`, carrying `package`, `version`, `descriptorHash` and
649
+ `consumer: "memory"` — and the hash is the consent's **confirmed** digest, not
650
+ merely the installed one, so Jelly enforces what the person confirmed.
651
+ **It fails closed:** an unreachable core plugin, a rejected call, an empty or
652
+ malformed answer all become `{offered: true, ok: false, UNAVAILABLE}` and hold
653
+ the binding, and **only Jelly's own explicit `{ offered: false }` lets a read
654
+ run embedded**, so a broker that is off or unwell is never a way around
655
+ Jelly's declaration and grant checks. It is offered only inside Jelly: an RPC
656
+ id has no owner, so nothing asks one outside it. A read has a **30 s budget**
657
+ (`SOURCE_READ_TIMEOUT_MS`) and the broker the same 30 s
658
+ (`BROKER_TIMEOUT_MS` = `SOURCE_READ_TIMEOUT_MS`), the abort
659
+ passed in OpenCode's own shape so a parked request is really removed, one
660
+ broker deadline per tick, and — once a plugin's call times out — a **per-plugin
661
+ hold for the rest of that tick**, so a silent broker pauses one binding and
662
+ never stalls collection. **A changed declaration pauses; it does not read.**
663
+ Any `PERMISSION_DENIED` on a bound source pauses as `DECLARATION_CHANGED` /
664
+ `needs_rebind` when the installed digest differs from the confirmed one, and as
665
+ its own `ACCESS_REFUSED` ("Memory's access to this source was refused …") when
666
+ they are equal, so a withdrawn grant cannot loop; the refusal's own code is
667
+ recorded, never its English message. `plugins.reconfirm` is a real "Confirm
668
+ again": a browser-session write at the gateway, it previews the declaration
669
+ installed now (digest, scope keys, scope), records exactly the digest the
670
+ dialog showed, and clears only a declaration change — an owner or account
671
+ change stays paused as `rebind_required` — so **reconfirm and resume work per
672
+ binding**, and `plugins.resume` names one (`source` and `account`), leaving the
673
+ plugin's other bindings as they were. **The contract's source-id grammar is
674
+ accepted** for declared sources (`slack.workspace`, `gws.calendar.today`, at
675
+ most 64 characters) beside Memory's word rule, in one module
676
+ (`src/source-ids.js`) whose copies the records service and the console carry
677
+ byte-identically, so such a source can be requested, consented and
678
+ reconfirmed (`test/source-ids.test.js`). **Jelly's broker is OFF until
679
+ source-contract #8 settles** — it is off unless `JELLY_SOURCE_BROKER=on` — so
680
+ **reads stay embedded today** and production behaviour is unchanged; the gate
681
+ runs with it off.
682
+
683
+ - **Jelly's own sheet, its reads and its tiles (0.11, Jelly's #55 and #72–#75;
684
+ `feat/jelly-declarations`).**
685
+ - **The read-only twins.** `mem.pages` (list, read, links, history) and
686
+ `mem.wikis` (list, search, read, status) carry exactly today's reads and
687
+ write nothing anywhere, are declared `readOnly`, and are **registered only
688
+ inside Jelly**. Jelly's fence keeps the tools a declaration marks `readOnly`
689
+ and drops every other one, and `mem.page` and `mem.wiki` each hold reads and
690
+ writes together — so a researcher or a reviewer Jelly fences to read-only
691
+ tools was given neither, no page and no wiki, ever. Each twin runs the same
692
+ code as its write tool and refuses a write action whatever a caller sends, so
693
+ every write stays in `mem.page`/`mem.wiki` behind its `page.write`,
694
+ `page.delete`, `wiki.write` or `wiki.delete` ask. Each is described in one
695
+ sentence of its own, is labelled in the "Searching memory" work kind, and is
696
+ **not** in the generated agent protocol, the namespace line or a skill — so
697
+ **OpenCode's tools and the protocol are unchanged**; only a Jelly host's
698
+ fenced agent ever sees them. They cost 1,375 direct-tool characters (Jelly's
699
+ 28,848 against OpenCode's 27,473), inside the **1,400** the owner allowed for
700
+ the twins: a ceiling of their own, added to OpenCode's unchanged
701
+ `directTools` budget, with nothing else allowed to grow into it
702
+ (`test/surface-budget.test.js`).
703
+ - **The `ownService` switch, applied exactly as Jelly's sheet shows it.** Off —
704
+ including unset, whose declared default is `false` — is the service the
705
+ person's Jelly account offers, and inside Jelly **nothing of their own is
706
+ read**: no address, no key, no explicit core or knowledge URL, so a key of
707
+ theirs can never reach another operator's server. On with an address uses it;
708
+ on with no address loads and answers `connected: false`, `state: "unconfigured"`
709
+ naming the field, instead of throwing. **An address saved
710
+ before 0.11 is not used while the sheet shows the switch off, and the person
711
+ is told so** rather than switched servers silently (Jelly's pause for a
712
+ legacy address). Outside Jelly an address set still means one, so every
713
+ install before 0.11 keeps working. `controlURL` and `token` are
714
+ `visibleWhen` the switch — display only, as Jelly's contract says.
715
+ - **The sign-in row.** One `account` row ("Memory account") over the `memory`
716
+ integration the plugin already registers, `required: false` because a pasted
717
+ key alone is enough, and `presetBy: "token"`, so the sheet shows one row or
718
+ the other and never both, and Sign out is the engine's on that integration.
719
+ It is registered whenever Memory has an origin and left unmatched
720
+ ("Optional", no method) where Jelly's identity signs the person in and the
721
+ credential would be ignored.
722
+ - **One tile sentence per state**, and the switch's own two states answer
723
+ before anything asks a credential: `unconfigured` naming the field, `paused`
724
+ in one 57-character sentence naming the switch the person must turn on, and
725
+ the overview carries **no simulator address** (`http://127.0.0.1:8420` was
726
+ the base URL's default, not a service anyone typed).
727
+ - **Preview titles.** The answer all four previews share — `review.decide`,
728
+ `write.decide`, `proposal.decide` and `inbox.decide` — carries `title`: the
729
+ record's own title, else the first line of its words, on one line, at most
730
+ 120 characters. Jelly's panel can then read `Keep "<title>"?` instead of a
731
+ raw `rec_…` id, and the field is declared with a sample on each
732
+ (`test/jelly-held-title.test.js`).
733
+ - **Space counts, for members.** Each `spaces.list` row, and the `space` of
734
+ every read that names one, carries `members` (how many people it is shared
735
+ with) and `wikis` (how many wikis it holds), answered by control from its own
736
+ tables in the same query that lists the spaces a person can see, so the
737
+ Spaces page draws its per-row counts; a count is never a list of people or
738
+ grants, a **member** sees every wiki in the space (a space role reaches every
739
+ resource, collections included) and a grant-only viewer gets no counts, and
740
+ either field is left out when the answer has none rather than invented as
741
+ zero. Work kinds gain `revise`, `page` and `commitments` of their own, so a
742
+ conversation says what Memory did and every declared tool is still labelled
743
+ once.
744
+
745
+ ### Changed
746
+
747
+ - **OpenCode's range gains a ceiling: 2.1.4 or newer, below 2.4.0, and a host outside it is told
748
+ why.** 2.3 is tested (jelly moves its engine to 2.3) and nothing above it is. `setup` refuses a
749
+ newer host, and the floor refuses an older one, by registering **one tool, `mem_off`, and nothing
750
+ else** — no hooks, no protocol block, no request — whose description and answer say the reason in
751
+ full ("Memory is off: this OpenCode (2.4.0) is newer than Memory supports. Update Memory, or use
752
+ OpenCode below 2.4.0."), and by writing the same sentence to Memory's own debug log at `ERROR`.
753
+ **OpenCode discards a plugin's `console.error`**, so a message there would have left a person with
754
+ memory tools that vanished and no reason; the tool lets the agent tell them, and the log is the
755
+ second place to look. `docs/troubleshooting.md` names both, then OpenCode's own log (where a
756
+ registration failure lands, because that throw is not caught). `versionBelow` is the mirror of
757
+ `versionAtLeast` (`src/util.js`), and both drop a leading `v`, so `v2.3.0` is admitted rather than
758
+ refused as older than 2.1.4. The floor is unchanged, and `versionAtLeast("3.0.0", 2, 1, 4)` is
759
+ still true, so the ceiling is the only new refusal. `test/version.test.js` pins 2.3.0 and 2.3.9 in,
760
+ 2.4.0/2.5.1/3.0.0 out, the floor's own five cases, `v2.3.0` in and `v2.4.0` out, and — for both
761
+ refusals — exactly one tool whose description and answer carry the sentence, no skill, command, RPC,
762
+ namespace or hook, no request, and the sentence in the debug log.
763
+ What 2.3 changed for a plugin, and why it does not touch Memory: **`ToolContext.cancel` is removed**
764
+ (Memory never read it) and **`signal` is now a cooperative stop** — reading it, or spreading the
765
+ context, opts in, and no Memory tool does either, so Memory's tools stay in the interrupted class
766
+ with a stopped call reported as on 2.2.6; **background subagents** keep the child's `parentID` and
767
+ add no `session.*` event type, and capture keeps a tool's name and never its output, so neither the
768
+ session tree nor a captured turn changes. Measured on an isolated 2.3.0 and 2.2.6 binary (own
769
+ prefix, own XDG roots, `--standalone`): Memory loads in both, the host holds the same 36 tools with
770
+ the same 16 `mem_*` names, `core` passes 38/38 on both, and `tools` 15/15 on 2.3.0 against 14/15 on
771
+ 2.2.6 — that one item (`tool-share-revoke`) trips its own "at most 4 memory calls" budget on both
772
+ engines in a re-run (1/3 each), so it is the item's instability, not 2.3. **A new `opencode-real`
773
+ CI job** runs a real 2.2.6 and 2.3.0 binary through start, load, tool list and one Code Mode tool
774
+ call (`scripts/opencode-smoke.mjs`, a local fake provider, no credential).
775
+
776
+ - **Memory no longer detects its host.** Jelly-only surfaces are gated on what the host offers through the contracts, never on whether the host is jelly.
777
+ - **The read-only twins (`mem.pages`, `mem.wikis`), `ownService` and its key handling follow the resource-token contract:** they apply only where the host offers Memory a `memory` resource.
778
+ - **The host's identity token goes only to the origin its `memory` resource names,** decided per request. So it never reaches a person's own Memory address, even when the host offers the resource after start.
779
+ - **Source reads ask the host's broker only where the host offers the `memory` resource.** There, only an explicit `{ offered: false }` reads embedded, and every other broker failure holds the read. **In plain OpenCode, sources are always read embedded.**
780
+ - **A new `plain-opencode` CI job runs Memory in a host shaped like OpenCode's** (a callable `rpc`, no `memory` resource), and fails if a jelly-only surface appears.
781
+
782
+ - **The console-only gaps become declared actions (Plan A, #59 §4.5).** One
783
+ name per console act, in the safe shape §3.1 of the action-cap proposal
784
+ decided: `page.move` gains `prefix` (a whole folder, `records.move`'s own
785
+ `path_prefix` branch) and `paths` (up to fifty pages) and `page.delete` gains
786
+ `paths`; `memory.revise` gains `add`; the new `memory.organise` (`op: move |
787
+ retire | restore | confirm`, with a preview that names the op) absorbs the
788
+ console's `memories/bulk` and `memories/move`; the new `share.copy`
789
+ (`op: page | memories`) absorbs `page.copy`; `space.join` gains `op: join |
790
+ request` and absorbs `space.requestJoin`; and `commitment.create`,
791
+ `commitment.delete` and `commitment.move` close the console's commitments
792
+ area. Held back with the other control-P2 acts: `share.decide`
793
+ (`op: accept | decline`) replaces `share.accept` and `share.decline`, and the
794
+ new `space.manage` (`op: rename | archive | unarchive | leave`, `local` /
795
+ `always`: leaving cannot be undone) closes the space lifecycle. Each grouped action's `op` is bound to the change it makes:
796
+ the gateway checks the signed op before forwarding and control checks it again
797
+ and spends the reservation as that one act (for `space.manage`: its op, its
798
+ space and its change), so a press signed to decline can never accept, or one
799
+ space's rename rename another. A leave or an archive carries the preview's
800
+ digest **in the signed input**: the plugin refuses a press without one rather
801
+ than filling it in. The declaration carries 34 actions of Jelly's 48, every
802
+ act wired and named once; a deployment without `P2_RESERVATION_KEY` refuses a
803
+ P2 press `P2_UNAVAILABLE`. A grant still binds one action and one input digest, so a
804
+ grant for one `op` cannot authorise another (`test/actions-space.test.js`).
805
+ - **Five console acts stay console-only, each with its reason in the parity test.**
806
+ `memories/lift` (records' `forgotten.lift` refuses every bearer, so it needs a
807
+ grant door of its own), `memories/move` (a move changes who can see a memory,
808
+ so it needs its own action; this release does not add it) and
809
+ `spaces/request-deletion` (P1 by design: control refuses a host
810
+ grant for a deletion request). `learned/correct` and
811
+ `learned/forget` stay console-only too: they change atoms in the memory core,
812
+ which has no grant door, so records' `memory.revise` and `memory.forget`
813
+ cannot reach them.
814
+ - **No name Jelly's app binds was renamed.** `commitment.done|cancel|reopen|
815
+ snooze|edit`, `page.write`, `page.save`, `profile.erase` and `space.create`
816
+ are declared exactly as `detect.ts` looks for them. The four names this
817
+ change removes — `page.copy`, `space.requestJoin`, `share.accept`,
818
+ `share.decline` — appear in Jelly master only in its asks document, never in
819
+ its app code.
820
+ - **The gateway's and control's P2 act lists follow the declaration.** Both name
821
+ `share.decide` (not `share.accept` and `share.decline`) and `space.manage`, and
822
+ each act's `op` is checked against the route or the change it makes.
823
+ - **Jelly's cap is checked on the whole wired set.** `test/actions.test.js` holds
824
+ `ACTION_NAMES` (declared plus held) to 32 as well as the declared set, because
825
+ a declaration over the cap is refused whole.
826
+ - **The job tick opens only the spaces that have work (0.11).** It used to open
827
+ every space every minute to read its job rows, which turns over the store's
828
+ open-file cache (128 handles) once a cell holds more than 128 spaces. It now
829
+ keeps one small index per space — its earliest due job (one that already has
830
+ a queued or running run is not work), when its earliest `running` row would
831
+ go stale, and how many finished runs wait for curate — recomputed by every
832
+ job write in the same transaction and rebuilt by one scan at start, so a
833
+ restart still finds the stale `running` rows §4.2 re-queues. A space the
834
+ index has never seen — installed after the scan, or written while it ran — is
835
+ read once on the next tick, so a new space is never invisible; a space whose
836
+ file is gone drops out as the tick lists the files. Tests: 500 spaces, 3 with
837
+ a due job, open exactly those 3; a space installed with a due job after the
838
+ scan and a job written during it are both ticked on the next (same) pass.
839
+ - **One model budget and one breaker per space, for the routines and the job
840
+ runner together (0.11).** `RECORDS_BUDGET_TOKENS` was the routines' day and
841
+ each job had its own caps; the day is now the sum of both ledgers (the
842
+ routines' `runs` and the jobs' `job_runs`, store method `modelTokens`), and
843
+ one breaker per space stops both sides' calls
844
+ (`records/src/model-guard.js`, created once by the service and passed to
845
+ both). **The day is the space's own local day** — its local midnight to the
846
+ next one in UTC (`dates.js` `dayBounds`), the space's `fields.tz` — so an
847
+ evening run in New York is that day's and never the next UTC day's, and a run
848
+ just after local midnight east of UTC stays in its day. `routines.status`
849
+ shows the shared `breaker` beside the day's `budget`
850
+ `{limit, day, used, routines, jobs}`; a new
851
+ `RECORDS_LLM_BREAKER_COOLDOWN_MINUTES` (`60`) sets the cool-down, and
852
+ `RECORDS_LLM_BREAKER_FAILURES` keeps its documented `5`. A space under budget
853
+ runs exactly as before. `RECORDS_JOBS_EXTRACT` is still off by default: the
854
+ shared budget is a prerequisite for turning it on, not a decision to.
855
+
856
+ - **A start no longer waits for Memory's server to say who is signed in
857
+ (opencode-mem#58).** `/connect` keeps a Memory sign-in in OpenCode's own
858
+ store, and renewing it is a request; setup used to await that probe, so with a
859
+ sign-in due for renewal every engine start waited on Memory's server — about
860
+ 15 s against a server that never answered, where a signed-out start takes a
861
+ few milliseconds. Setup now reads only what the host holds on disk (no
862
+ request, bounded at 250 ms), starts the probe in the background and awaits
863
+ none of it; the renewal and the answer are bounded (10 s), a failure is
864
+ logged once instead of vanishing, and a tool call made before the probe ends
865
+ joins it and answers from it. **A person sees nothing change except the
866
+ wait:** the tool list and every tool's words are the same, and the start's
867
+ own line and warnings now name the sign-in on disk, which the probe corrects
868
+ (a sign-in for another Memory address, or an ended one, is reported by the
869
+ first use and in the log). **Nothing a person wrote is sent without an
870
+ identity:** the spool's replay and the backend probe start only once the
871
+ probe confirms the sign-in, and a gateway request with no credential at all
872
+ is refused before it is sent rather than sent bare (local direct mode, which
873
+ has no gateway address, still sends without one). Tests:
874
+ `SU-setup-does-not-wait-on-server`,
875
+ `SU-first-use-waits-for-probe`, `SU-background-failure-is-quiet`,
876
+ `SU-signin-for-another-address-not-claimed`, `SU-fresh-start-keeps-its-skills`,
877
+ `SU-unconfirmed-signin-sends-no-spool`, `SU-unusable-signin-sends-no-spool`,
878
+ `SU-confirmed-signin-flushes`, `SU-no-credential-sends-nothing`.
879
+
880
+ ### Fixed
881
+
882
+ - **The agent no longer collects or decides proposals unasked.** `mem_collect` and a review decision the model makes run only when the person's latest message asks for them; a host's routine still collects. Recall's line about collected mail now offers a collection instead of inviting one.
883
+
884
+ - **Plugin sources reach Memory under the account they really read.**
885
+ - **The bug:** a source whose plugin reads one account of its own (History, Linear, X) answers its probe and its pages with that account. Memory insisted on `default`, and refused them (`ACCOUNT_MISMATCH`).
886
+ - **A binding for such a source is now keyed by the account its probe reports.**
887
+ - **Binding it again for a different account supersedes the old binding,** which stops collecting and keeps what it collected.
888
+ - **Snapshot sources are not offered in this release.** `slack.dms`, `gws.calendar.today` and `gws.image` are `snapshot` sources, which 0.11 does not collect. The console and the tool now say so, instead of offering a binding that collects nothing, and a snapshot binding made earlier is marked as not collected.
889
+ - **The Sources row shows the installed plugin's version beside the release that declares its sources,** and says when a binding is catching up (a run ended with more to read). **Nothing is refused on a version:** a git-pinned or `0.0.0` build keeps collecting through the earlier path.
890
+
891
+ - **A source can no longer be bound twice under two names.**
892
+ - **The bug:** once the family plugins declared their sources under source-contract, a source's legacy alias (`gmail`, `slack`, `x`, …) stayed bindable beside its declared names (`gws.gmail`, `slack.workspace`, `x.*`), so one account could be collected twice.
893
+ - **One rule in records now decides what can be bound,** and every path uses it: the console, the agent's tool, and plugin consent. Once a package declares its sources, its legacy alias is no longer offered, and it's refused for an account already bound under a declared name, and the other way round.
894
+ - **Existing legacy bindings keep collecting, once.**
895
+ - **Sibling declared sources bind together** (`x.mentions`, `x.bookmarks`, `x.timeline`).
896
+ - **`slack.mentions` is not mapped:** its overlap with `slack.workspace` comes from Slack's own two sources.
897
+
898
+ - **A source is not offered twice under two names, and a second binding of the
899
+ same account is refused (audit 1.3; review F1, F2).** The nine family plugins
900
+ now declare their sources, so `gmail` and `gws.gmail` were both bindable for
901
+ one mailbox and Memory curated it twice; X's legacy `x` was not mapped at all,
902
+ so `x` beside any of `x.mentions`, `x.bookmarks` and `x.timeline` read — and
903
+ paid for — the same feeds twice. One rule now lives at the records service
904
+ (`records/src/plugins/legacy-sources.js`), where every path converges: a
905
+ legacy alias whose package declares is not offered and not bindable, and a
906
+ second name for an account already bound or requested is refused with a next
907
+ step that names the declared source and the trade (unbinding deletes the
908
+ existing events). `sources.request`, `sources.bind`, `plugins.request` and
909
+ `plugins.consent` run it; `plugins.list` answers the retired aliases with the
910
+ declared sources each stands for, so the console stops offering them and
911
+ explains a refusal in those words (its other records refusals keep their fixed
912
+ message); the plugin's `mem_spaces` keeps no copy of the rule and shows the
913
+ server's answer. A declared source is the same account as its alias alone:
914
+ X's `x.mentions`, `x.bookmarks` and `x.timeline` are three feeds, so all three
915
+ bind beside each other for one account (round 2 fixed them refusing each
916
+ other). `slack` maps to `slack.workspace` only — `slack.mentions` is another
917
+ tool and API the legacy name never called, and the overlap between Slack's two
918
+ declared sources is Slack's to solve, not this alias map's. A binding made
919
+ through an alias before its package declared keeps collecting exactly once,
920
+ with its events, and a legacy request filed before the declaration cannot be
921
+ confirmed into a new one after it. Tests:
922
+ `SC-console-no-retired-alias`, `SC-console-no-double-bind`,
923
+ `SC-records-consent-no-double-bind`, `SC-declared-siblings-bind`,
924
+ `SC-legacy-vs-declared-both-orders`, `SC-x-mapped-no-double-read`,
925
+ `SC-nine-families` (each of the nine, from its released declaration, and its
926
+ sibling sources), `SC-alias-retired-when-declared`,
927
+ `SC-no-double-bind-same-account`, `SC-legacy-binding-still-collects`.
928
+
929
+ - **The Inbox read keeps within Jelly's answer limit.** Jelly ignores a plugin answer over 65,536 bytes and silently keeps the person's last Inbox (`backend/host/src/plugin-views/rpc.ts:247`). `inbox.list` now fits its answer within 61,440 bytes. It drops evidence quotes first, then meeting links, then shortens item text, the last item first. It never drops an item or changes a key. Today's reads peak at 28–33 KB and are unchanged: this guards the meeting fields, which stay off (`INBOX_ITEM_MEETING`).
930
+
931
+ - **The daily routine's own copy of a model error reached the journal page and
932
+ the log (0.11 review, round 3, follow-up).** `daily.js` kept `llmError` raw, and
933
+ two readers took it: the journal page ("The model failed on part of the day
934
+ (…)") and the `memory.routine.llm` log line. The store's secret gate withholds
935
+ a *named* secret but not one in a URL query, so a provider error quoting an
936
+ Azure SAS URL stored the whole signature in a page that is full-text indexed
937
+ and shown by the console, and the log held the raw `sk-proj-…` key and the
938
+ Bearer token. `llmError` now goes through the shared redactor at that one site,
939
+ which drops the query and keeps the host and the HTTP status, so the page and
940
+ the log both stay diagnosable. The routine's other failure logs (the ledger, a
941
+ tick stage, a write) take the same redaction. Journals written before this fix
942
+ are **not** rewritten: an ordinary page's body is the person's own text, and
943
+ redacting every page on read would drop a URL's query from content that is not
944
+ a failure. Such a page holds the line under the fixed prefix "The model failed
945
+ on part of the day (", so a one-off script can find and redact that line, and
946
+ the person can edit the page. Test: `RS-daily-llm-error-redacted` (the log and
947
+ the page).
948
+ - **A model provider's error reaches no store or surface with its secret
949
+ (0.11 review, round 3).** `routines/src/llm.js` carries the provider's own
950
+ words (`the model answered 500: …`), and a provider's error can quote a key or
951
+ a URL with a token. A daily run kept that text in its ledger row
952
+ (`runs.run.error`, and again in its `result`), and `listRuns`,
953
+ `routines.status` and `space.stats` `last_runs` returned it — so the console's
954
+ Home, Spaces and Activity and `mem_spaces` health showed it. The routine's
955
+ error is now redacted with the shared `storable.js` redactor where the run is
956
+ finished (so its log line and its answer are too), and the records service
957
+ redacts `run.error` and `result.error` on write (`putRun`) and on read
958
+ (`listRuns`, `space.stats`), so a row an older build wrote cannot show one
959
+ either. A job's model-stage errors and the model breaker's log line take the
960
+ same redaction. Test: `RS-routine-llm-error-redacted` (the stored row,
961
+ `listRuns`, `routines.status` and `space.stats`).
962
+ - **An old source row shows no secret on Sources or Home (0.11 review, round 2).**
963
+ The two columns a **0.9.x** database holds were written long before 0.10.4's
964
+ gate: `source_requests.note` (the plugin's own sentence about a failed probe)
965
+ and `source_collections.error` (the collector's last failure). `sources.list`
966
+ returns both and the console shows them, so an old row still displayed a
967
+ `Bearer sk-live-…` and a `token=tk_…` verbatim. Both are now redacted where
968
+ they are **read**, with the redactor both packages carry (`errorText`), so a
969
+ row written before the fix cannot show a secret through any reader and a row
970
+ this build wrote is answered unchanged. They are redacted on write too
971
+ (`sources.report`, `sources.collected`), as are a host's `jobs.finish` error
972
+ **before** its 300-character slice, a job probe's `note` (`jobs.probe` and
973
+ `jobs.request`), and `plugins.pause`/`plugins.flag`'s caller-supplied reason
974
+ and the `plugin_paused` conflict, which quote a stored consent reason. Test:
975
+ `RS-old-source-rows-redacted-on-read` (raw 0.9.x rows planted, then read).
976
+ - **A job stores and shows no secret from a source's page, and the status file
977
+ redacts `held` too (0.11 review B1 and S1).** The other way a source's page
978
+ reaches the store is a **job**, and jobs are on by default: `jobs.checkpoint`
979
+ forwarded the page's `refused[]` and `failed[]` text, the records service kept
980
+ it in `job_runs.refusals` and `job_logs.detail`, and `mem_spaces` `logs` and
981
+ the console Jobs page showed it — a `Bearer sk-live-…` and a `token=tk_…`
982
+ verbatim, because slicing to 100 characters protects nothing. The redactor now
983
+ lives in `storable.js`, which both the plugin and the records service carry, so
984
+ records redacts each `refused[].reason` and `failed[].reason` **before** the
985
+ slice, and redacts them again as it answers `jobs.runs`, `jobs.logs` and
986
+ `jobs.list`, `plugin_consents.reason` and `plugin_requests.note` — so a row a
987
+ build before this fix wrote cannot show one either, through any reader
988
+ including the console. `collector.json` redacts `held` field by field, as the
989
+ rest of the row already was. Tests: `RS-job-checkpoint-redacted` (the answer,
990
+ the two rows, the answers records gives, and the `mem_spaces` line over a raw
991
+ pre-fix row) and `RS-status-held-redacted`.
992
+ - **A source's own failure text is redacted wherever it is stored, logged or
993
+ shown (0.11 review F1 and F2).** 0.10.4's `errorMessage` and `redactErrorText`
994
+ gate every failure the answers carry, and 0.11's source paths bypassed it: a
995
+ pausing `AUTH_REQUIRED` sent its raw message to `plugins.pause`, and the
996
+ records service kept it in `plugin_consents.reason`, which every process and
997
+ the console read — a probe stored `refresh_token=…`, `token=tk_…` and
998
+ `Bearer sk-live-…` verbatim. The pause reason, a refusal's reason, the
999
+ sentence a source says about its own setup, a bind request's note and a
1000
+ skipped run's reason are now redacted where they are written, and
1001
+ `collector.json` — the status file every process reads — is redacted field by
1002
+ field as it is written, so a status file from an older build cannot leak one
1003
+ either. Tests: `RS-pause-reason-redacted`, `RS-refusal-reason-redacted`,
1004
+ `RS-status-file-redacted`.
1005
+ - **A bind's clear refusal reaches the person on a real host, not "try again
1006
+ later" (`opencode-mem#69`, contract v0.1.0 review F5).** Real OpenCode answers
1007
+ an RPC method a plugin registered no handler for with its own type,
1008
+ `rpc.method_not_found` (`@opencode/core` `rpc` `call`), thrown to the plugin as
1009
+ the engine's plain `{type, message}`; a handler that fails is `rpc.internal`,
1010
+ "RPC call failed". The first is now mapped to the contract's refusal — the
1011
+ source implements no probe method, nothing was read, and declaring
1012
+ `sources.probe.action` is optional — and every other failure is left exactly as
1013
+ it is. Test: `F5-real-opencode-missing-method-refused`.
1014
+ - **A declared source that declares no probe is refused, in its own words
1015
+ (`opencode-mem#69`, contract v0.1.0 review F5).** A bind reads the person
1016
+ through the contract's `probe`, and the contract refuses
1017
+ `events_list({ limit: 0 })` for a declared source, so a descriptor with no
1018
+ `sources.probe.action` had nothing to fall back to: the request failed with
1019
+ "the host has no RPC method …/probe", which names the wrong thing, and the
1020
+ path was untested. `probeSource` now refuses before any host call, with
1021
+ `SCHEMA_VIOLATION` and the declaration that is missing, and the collector
1022
+ reports those words to the person; the previous contract's owner-only page is
1023
+ never used for a declared source. Test: `F5-no-probe-refused`.
1024
+ - **A space past control's 200-row bound is readable through Memory
1025
+ (`opencode-mem#67`).** `GET /v1/spaces/joinable` cut at 200 open spaces and
1026
+ said `more`, and dropped the `space=` query control takes to look one row up by
1027
+ id: the 201st was offered to nobody, so a host that showed the cut could not
1028
+ reach what it said was left. The route passes `space` on, and a test reads the
1029
+ 201st by id beside a cut page that says `more`. Browse spaces stays the
1030
+ declared source `mem.spaces-to-join` — one declaration, with its own
1031
+ `outputSchema`, `probe` and `more`, rather than a second view read of the same
1032
+ rows (`docs/sources.md`).
1033
+ - **`members.list` and `grants.list` keep their whole answer inside the view
1034
+ limit, its cursor included (`opencode-mem#65`).** The page was fitted to
1035
+ `ANSWER_BYTES` on its rows alone, then the read added `more`, a cursor bound to
1036
+ the space and target ids, and the "mine" note: a 200-character space and target
1037
+ put fifty hostile rows at 56,233 bytes, over the read's own limit (the 64 KB
1038
+ view cap still held, with the 8 KB margin). The fit now keeps
1039
+ `ACCESS_TAIL_BYTES` (1,024) for those fields before it keeps a row, so what the
1040
+ host reads is inside the limit, and a test fits a hostile page through both
1041
+ reads. The `mine` assertion that passed on an empty list now names the grant the
1042
+ caller holds and nothing else in the space.
1043
+
1044
+ - **A start no longer waits for the skill mirror (0.11, jelly #80 F1).** Setup
1045
+ awaited the refresh of the spaces' skills, so a slow or missing Memory server
1046
+ was charged to the engine's start: 2,010 ms against a server that accepts and
1047
+ never answers, 4,192 ms when it answered control but stalled the skill list,
1048
+ and 33,301 ms with eight spaces (each space's list one after another, each
1049
+ with a retry). The mirror on disk is now the start's source: a refresh writes
1050
+ `stateDir/skills/<id>/SKILL.md` with a `skill.json` beside it, and setup
1051
+ registers those files before anything asks the network
1052
+ (`registerMirroredSkills`, `src/skills.js`), so the first session of a start
1053
+ has its skills with the server down. The refresh runs after the start, under
1054
+ one 1.5 s deadline, reading every space's list in parallel with no retry, and
1055
+ swaps the registration when it completes; a skill published since the last run
1056
+ arrives at the session bind, which already refreshes the space it binds. A
1057
+ fresh host with no mirror behaves exactly as before. Measured with
1058
+ `npm run measure:setup` (the harness now gives its stub real spaces and
1059
+ contexts, and drives blackhole, refusal and stalled servers): the same three
1060
+ cases are 12.8 ms, 8.5 ms and 6.6 ms, inside the 5–10 ms a start takes with
1061
+ everything answering. `JU-setup-never-waits-on-skills` and
1062
+ `JU-cached-skills-at-first-session` hold it.
1063
+
1064
+ The cache is bound to its owner: `skill.json` records the server origin and a
1065
+ hash of the account subject it was mirrored for, and setup registers a cached
1066
+ skill only when the sign-in names that same account and origin (asked of
1067
+ Jelly's own accessor, bounded, never a request). Signed out, signed in as
1068
+ someone else, or on another server, none of the cached skills is registered —
1069
+ the previous account's private skills never come back — and the refresh fills
1070
+ them instead. The background refresh has a 10 s deadline, enough for a slow
1071
+ server (three round trips at 600 ms are 1.8 s), and a host with nothing usable
1072
+ cached retries it with backoff (5 s, 30 s, then every 2 minutes) until it
1073
+ succeeds, so a fresh host on a slow server still gets its skills and a dead
1074
+ one costs occasional requests. A personal-space session bind refreshes the
1075
+ mirror too, not only a shared one, and every timer is cleared on dispose.
1076
+ `JU-cache-not-used-after-sign-out`, `JU-cache-not-used-for-another-account`
1077
+ and `JU-fresh-host-gets-skills-at-600ms` hold it.
1078
+
1079
+ - **A forget no longer leaves its text in the turn that asked for it** (the
1080
+ 0.9.14 gate's `tool-revise-forget#2`). The person asked Memory to forget a
1081
+ Wi-Fi hint; the forget worked, and the agent's answer in the same turn quoted
1082
+ the hint, so the turn's capture stored it and the text survived in Memory's
1083
+ own L0 transcript. Exact-text masking cannot close this — a paraphrase of the
1084
+ forgotten text carries no run of its words — so the turn is not kept at all:
1085
+ when a forget succeeds, the session is marked while its turn is open
1086
+ (`src/forget-turn.js`), that turn is not captured, and one log line keeps its
1087
+ place, naming the session and never the text.
1088
+ - **A subagent's forget marks the parent's and the root's turn too**: without
1089
+ `captureSubagents` the child has no turn of its own, and the parent's turn
1090
+ is the one that carries the request and the task's result. The tool result
1091
+ always tells the agent not to repeat the forgotten text.
1092
+ - **Every plugin instance sees the drop.** The instance that runs the forget
1093
+ takes the turn's capture claim while the turn is open, so another instance
1094
+ over the same event stream finds it at its flush.
1095
+ - **Only a turn the forget can be tied to is touched.** A finished turn is
1096
+ never deleted or dropped, whatever it holds. A foreground subagent's
1097
+ parent turn (the one open when the host created the child) is dropped with
1098
+ the child's own; a background child never marks a later, unrelated parent
1099
+ turn.
1100
+ - **A steered turn is offered, not deleted.** A turn flushed because the
1101
+ person steered, or evicted mid-flight, may hold the text and stays; the
1102
+ forget's result says so and asks the agent to offer removing it, with the
1103
+ person's consent.
1104
+ - **A copy of the forget's own turn is erased even if another instance
1105
+ delivered it first.** The plugin awaits `POST /v1/capture/delete`, which
1106
+ tombstones the turn (one receipt lifetime) and deletes its message ids
1107
+ under the capture's own agent; a write still running answers 425 and is
1108
+ retried for five seconds, and an unconfirmed erasure is reported in the
1109
+ result, telling the agent the person can ask for that turn to be removed.
1110
+ - **A delete the service did not confirm counts as done** for capture: the
1111
+ text may already be gone. A forget made with no turn open marks nothing, a
1112
+ declined forget changes nothing, and the mark's life is its turn's (the
1113
+ flush spends it; the 24-hour bound is only a safety net).
1114
+ - **The result says only what happened.** "This turn isn't kept" appears
1115
+ only when a turn was marked (a background subagent's forget drops none),
1116
+ and the unconfirmed-erase sentence points at the consent path for a kept
1117
+ turn, not at the console page that cannot erase turns.
1118
+ - **A capture refused because its turn was erased is dropped, not
1119
+ quarantined.** `409 capture_tombstoned` deletes the spool entry with an
1120
+ id-only log line, so text the person asked to forget never sits in a
1121
+ quarantine file.
1122
+ - No tool description, schema or protocol text changed: the sentences are
1123
+ tool-result text.
1124
+
1125
+ - **The store takes every event kind the shared contract defines, and a
1126
+ refused event is never a silent drop** (DESIGN-jelly-sources §0.2, §2.3.1).
1127
+ The records service accepted nine kinds, so `jelly.files` (`file`),
1128
+ `jelly.routine-runs` (`x-jelly/routine-run`) and Memory's own
1129
+ `mem.suggestions` (`x-mem/suggestion`) were refused by `events.ingest` — and
1130
+ the contract's policy advances the cursor past `refused[]`, so those events
1131
+ were dropped and the cursor moved past them for good. The store's kind gate is
1132
+ now the vendored contract's own `isEventKind` (the contract's eleven kinds and
1133
+ every `x-<plugin>/<kind>` extension), carried inside the records service
1134
+ rather than copied by hand, with the copies held byte-identical by
1135
+ `check:copies` and `test/source-kinds.test.js`.
1136
+ - **A refusal is counted, shown and audited — the store's own.** Only an event
1137
+ the *store* refuses is a row of `event_refusals`, written in the page's own
1138
+ transaction: the source, the account, the event's id and kind, and the
1139
+ refusal's own sentence, never its title or text. `sources.list` reports
1140
+ `refusals: {count, at, newest_id, kind, reason}` for each binding from those
1141
+ rows. **A refusal the source plugin itself makes is not stored:** its
1142
+ `refused[]` entry travels in that run's result instead — the id and the
1143
+ reason — and is what `mem_spaces` health names, so it is never a silent drop
1144
+ and never a count alone, but there is no row to count later. Person erasure
1145
+ and `sources.unbind` delete the store's rows with the source's events;
1146
+ retention prunes them with the events they are about.
1147
+ - **The cursor follows the contract exactly as before:** `failed[]` holds it,
1148
+ `refused[]` (a page's, the consent's, or the store's) advances it, and every
1149
+ advance of that kind now leaves the trace above.
1150
+
1151
+ - **One collector per cell, and a holder that lost the lease stops before it
1152
+ writes (0.11 review, rounds 1–3).** The collector's lease let two processes
1153
+ both believe they held it: a re-acquire and a heartbeat read the record and
1154
+ then touched the path, so a takeover in between touched the new holder's file
1155
+ and the old holder went on collecting; a stale heartbeat alone allowed a
1156
+ takeover while the holder was alive (a blocked event loop, a machine asleep, a
1157
+ clock jump); and a release could unlink a new holder's lock. Beating and
1158
+ releasing now work through an open file (`fstat`, the record, `futimes`), and
1159
+ a beat's name is checked to still point at the same inode, so a beat can never
1160
+ count for another holder's lock; a release works through its own open file and
1161
+ inode, so it cannot briefly take another holder's lock off the path. A stale
1162
+ lease is taken over only when it is **abandoned**: its
1163
+ holder's process is gone (`kill(pid, 0)` on this machine); its pid is alive but
1164
+ is not the holder (it started after the lease was written, read from `/proc`
1165
+ or `ps -o lstart=`); or it has not beaten within the ceiling — now **half an
1166
+ hour**, 30 missed minute beats, where it was a day, because a holder that
1167
+ wakes after losing its lease stops rather than writing, so a short ceiling
1168
+ recovers a silent holder at the cost of a moment's overlap and never two
1169
+ collectors actually writing. A record from another host, or one whose start
1170
+ time cannot be read at all (Windows has no `/proc` and no `ps`), is judged by
1171
+ its heartbeat alone, as it always was. A holder that lost the lease checks
1172
+ before each binding's read and each page's ingest (`stillHolder`) and stops,
1173
+ leaving the status to the holder that has it, and the sessions write is fenced
1174
+ at its commit (`lock.held()`), so a displaced holder cannot rename stale
1175
+ sessions over the new holder's copy. `test/collector-lock.test.js` holds the
1176
+ unit cases (a live holder is never taken over; a dead holder's lease is taken
1177
+ over exactly once; a claim whose start time cannot be read ages out at the
1178
+ ceiling), two real processes contend for 50 rounds and never both hold it, and
1179
+ `CL-sessions-write-fenced` holds the commit fence.
1180
+
1181
+ - **One read budget decides every source read, whether Jelly's broker answers
1182
+ it or Memory reads it embedded (0.11 review N7–N8).** No deadline bounded an
1183
+ embedded declared-source read, and an older Jelly that answers nothing while
1184
+ its broker is off could hang a request and stall all collection — one read
1185
+ held the whole tick. `SOURCE_READ_TIMEOUT_MS` (30 s, fifteen times the records
1186
+ client's own read timeout and well inside the 30-minute cadence) now covers
1187
+ the embedded read and the broker both, the broker's own
1188
+ `BROKER_TIMEOUT_MS` is that same budget (`= SOURCE_READ_TIMEOUT_MS`, or the
1189
+ caller's), and the abort is passed in
1190
+ OpenCode's own shape (`{ signal: controller.signal }`), so a timed-out call is
1191
+ actually aborted and its parked request removed. On timeout the transport
1192
+ answers `{offered: true, ok: false, UNAVAILABLE}` with "jelly's broker did not
1193
+ answer in time, so nothing was read": the binding is held and retried on its
1194
+ next cadence, the run carries on with the other bindings, and a timeout is
1195
+ never an embedded read. One deadline covers a tick's broker reads
1196
+ (`resetBrokerTick`), so eight bindings cost one deadline rather than eight; an
1197
+ embedded timeout is bounded per plugin — the plugin that timed out holds its
1198
+ other bindings at once, other plugins are independent, and the next tick
1199
+ retries. The probe takes the same budget: `probeSource` copied the budget but
1200
+ not its name, so `timeoutMs` was undefined and **any** plugin whose answer
1201
+ took a moment failed its probe, which meant no declared source could bind
1202
+ (`BR-probe-binds-with-real-client-wiring`). And Memory's own deadline decides
1203
+ a timeout even when the plugin rejects the instant it is aborted, which is
1204
+ what OpenCode's adapter does: the deadline's callback now records that it
1205
+ fired, so a plugin's other bindings are still held rather than waiting out
1206
+ their own budgets (`BR-broker-timeout-holds-never-stalls`).
1207
+
1208
+ - **A revoke's preview names everyone who loses access, and reports a downgrade
1209
+ as well as a loss (0.11 review, `fix/acts-defects`).** A space-wide grant was
1210
+ counted twice in the preview's policy input — once as the grant and once as
1211
+ the person's space permission — so removing the grant that was somebody's only
1212
+ access answered `loseAccess: []` and `affected: 0`: the person confirming was
1213
+ told nobody loses access while someone did (an H2). Revoking a viewer member's
1214
+ editor grant answered the same way even though write access went, and
1215
+ contradicted the grant's own preview, which said they gained `write`. The
1216
+ preview now names every principal whose access drops, with what they had
1217
+ (`access`) and what they keep (`to`: `read` after `write`, `null` for a full
1218
+ loss), and `affected` counts both; it uses the person's membership role, never
1219
+ the grant-derived space permission. Names still follow the members and grants
1220
+ reads — the operator, the person, the grant's author or an admin of the
1221
+ target; someone the caller may not see is counted, never named; a group or
1222
+ role grant is named as that group or role, once per transition — and an agent
1223
+ grant is read with the agent's own role in its home space, capped by its
1224
+ owner's, so an agent that keeps access is not listed. Tests:
1225
+ `control/test/share-preview.test.js`, `test/share-revoke-preview.test.js`,
1226
+ `test/space-ops-gateway.test.js`.
1227
+
1228
+ - **A personal space's wiki can be previewed and deleted (0.11 review,
1229
+ `fix/acts-defects`).** `wiki.delete` and its preview read the wiki with the
1230
+ session's scope, not the space the input names, so the knowledge service was
1231
+ asked about another space's container and the gateway refused the named wiki
1232
+ at `/v3/wiki/page/ls` (403). Both now use the space's own scope (`wikiScope`,
1233
+ the helper `share.copy` already uses). The readers read the preview needs then
1234
+ refused a personal space (`personal_space`); it is a read, so it now answers
1235
+ for one — its owner by membership, and counts only for someone who reaches it
1236
+ through one of its page grants — while the join, handover and lifecycle routes
1237
+ keep refusing one. The preview also counted `pages` where the hub answers
1238
+ `items`, so it reported 0 pages for a wiki that had pages. The ask is
1239
+ unchanged: `wiki.delete` is `ask`, class `local`, always confirmed. Tests:
1240
+ `test/wiki-delete-personal.test.js`, `control/test/space-readers.test.js`.
1241
+
1242
+ - **An erasure reaches every row that holds the person, and rewrites nobody
1243
+ else's (`fix/erasure-coverage`, 0.11 review, rounds 9–11).** Five job tables
1244
+ (`job_items`, `job_curation`, `job_withdrawals`, `job_extracted`,
1245
+ `job_versions`) hold the person and had been classified person-free by hand,
1246
+ so they were never filled, scanned or erased; a table is now **personal when
1247
+ any column can hold a person** — an id (`user`, `owner`, `*_by`, `principal`,
1248
+ `actor`, `member`, `subject`, `reference`), a handle (`account`, `email`), or a
1249
+ column whose name says so — read from the schema rather than kept in a list,
1250
+ so a table added later cannot be missed. The proof's `auth.db` was
1251
+ hand-written, and Better Auth's verification row holds an address in
1252
+ `identifier`, not an id: it is now generated by the gateway's own
1253
+ `getMigrations` (better-auth 1.7.12 with the apiKey plugin) and the connect and
1254
+ capture tables come from the gateway's own factories, and a purge matches a
1255
+ row whose `identifier` or email is the person's address, read from their user
1256
+ row before it goes. A real source or job stores the external account owner
1257
+ (`google:<address>`), so keying only on the Memory user id erased nothing;
1258
+ every id form a row carries is matched — the Memory id, the core's upstream
1259
+ id, the external owner, and the Memory-side link — and the rule covers row
1260
+ text and JSON (`run`, `value`, `diff`, `identifier`), not only columns. The
1261
+ last round found the opposite harm: the `job_versions` scrub walked every row
1262
+ in the space and replaced every `label`, so another person's job spec and a
1263
+ team channel label became "former-member". It now reads only the person's own
1264
+ jobs and rewrites by path — the owner's id and label, the account, and a JSON
1265
+ patch's `/owner` and `/account` — leaving another person's spec byte-identical.
1266
+ A bound source with no job is not found today because sources are personal
1267
+ only, so that file is deleted whole; the runbook says so and it is revisited
1268
+ when shared sources ship. Tests: `test/account-erasure-coverage.test.js`
1269
+ (`EC-*`), `-postgres`, `-restore`.
1270
+
1271
+ - **A handover asked for by someone who is not the owner says it is a request,
1272
+ and the agent's page read marks a missing link only where that reader can know
1273
+ (the 0.10.5 gate's B10 and A5; `fix/handover-links`).** The server's handover
1274
+ preview is written as the person who may perform it, so an editor was told "you become an admin",
1275
+ and the result said "the space's owner confirms" with no name — which the agent
1276
+ filled with an invented one. The preview and the result now follow the caller's
1277
+ role: for anyone who is not the owner they say this sends a handover **request**
1278
+ that the space's owner confirms in the console, and they **name that owner only
1279
+ when the caller can see them**, else say the owner is not visible to the
1280
+ caller; a `members` row marks the owner the same way ("owner: not visible to
1281
+ you"). Production lets only the owner preview or hand over — a non-owner's call
1282
+ is refused `403` — and that refusal was rendered as "memory unavailable: not
1283
+ handed over: SPACES_FORBIDDEN: …", which reads as an outage: **a 403 from
1284
+ control is now shown as its own refusal**, in its words, with its next step and
1285
+ no code envelope, while a 5xx or a transport failure still answers "memory
1286
+ unavailable". On the agent's own page read — `mem_page` `read`, and the Jelly
1287
+ twins that call it — a `[[path]]` outlink whose target has no page in the space
1288
+ is marked `[[path]] (no page yet)`, from one bounded
1289
+ `records.get` for its distinct links (50, the store's own limit) — but the
1290
+ store reports `missing` both when a page does not exist **and** when the caller
1291
+ cannot read it, so **a mark is made only where that reader can know the page is
1292
+ missing**: a reader holding space-level read (not a page `grant`, not the role
1293
+ `grant`) sees it, and **a link that is grant-only or otherwise unreadable is
1294
+ left unmarked**, so the agent's read never reveals whether a page it cannot see
1295
+ exists; a failed lookup marks nothing rather than call an existing page
1296
+ missing. No tool description changed (always on 10,247; direct tools 27,473).
1297
+ Tests:
1298
+ `HO-preview-for-non-owner`, `HO-result-names-confirmer-or-not-visible`,
1299
+ `HO-members-owner-visibility`, `HO-production-refusal-shown`,
1300
+ `PL-missing-link-marked`, `PL-existing-link-unmarked`,
1301
+ `PL-grant-only-reader-no-false-absence`, `PL-unreadable-target-unmarked`.
1302
+
1303
+ - **Jelly's Pages view says only what the reader can know about links.** It showed "<target>: no page yet" for a page that exists when the reader held only a grant, or when the lookup failed. It also showed "Nothing links here yet." when the backlinks lookup failed (0.9.14 has the same view). The view and the agent's page read now share one rule (`src/outlinks.js`):
1304
+ - `pages.read` omits `outlinks[].exists` when existence can't be known; the field is now optional in the declared schema;
1305
+ - a failed backlinks lookup fails the read;
1306
+ - a reader without space-level read sees backlinks worded as theirs to see ("Nothing you can see links here."; the agent's page read says "Backlinks you can see: none").
1307
+
1308
+ Space-level read counts only for the roles viewer, editor, admin and owner.
1309
+
1310
+ ### Checks
1311
+
1312
+ - **The eval's write allowlist flags the seven jobs writes** (`jobs.draft`, `run`, `pause`, `resume`, `archive`, `activate` and `remove`), as 0.11's does, so a release gate shows them to its adjudicators. 0.10's `mem_spaces` already offers these operations.
1313
+
1314
+ The lanes that change tests and CI only, each merged into `build/0.11`, with no
1315
+ product change of its own:
1316
+
1317
+ - **A paced Linux loop of the lock tests is the lock's judge**
1318
+ (`ci/collector-lock-loop`). `.github/workflows/collector-lock-loop.yml` runs
1319
+ `.github/scripts/paced-lock-loop.sh` — the lock and race tests under a real
1320
+ pace, on ext4 and on overlayfs, and 200 runs of the race tests on a 2-CPU
1321
+ overlayfs — on every pull request into `build/*` too. The local two-owner
1322
+ failure that started it was a test artefact, diagnosed and fixed with review;
1323
+ the fixed tests still fail against the pre-fix code.
1324
+ - **CI's PostgreSQL job retries the client fetch** (`ci/postgres-resilient`)
1325
+ instead of failing the job when the first fetch misses.
1326
+ - **The acts gate harness** (`feat/acts-gate-harness`): every press carries the
1327
+ person's own credential, names its host, and carries exactly the input Jelly
1328
+ previewed — `test/acts-gate-classes.test.js`, `-ops`, `-p1`, `-scenarios`,
1329
+ `test/p2-gate.test.js`, `test/support/acts-gate-world.js` and
1330
+ `test/support/jelly-host-standin.js`, written up in
1331
+ [docs/acts-gate-harness.md](docs/acts-gate-harness.md).
1332
+ - **Every declared view read runs against the real services**
1333
+ (`test/declared-reads-real`): `test/views-declared-reads.test.js` holds each
1334
+ one against the real records service and control, not a stub.
1335
+ - **The eval fixes the gate asked for** (`fix/eval-scenarios`): the two known
1336
+ scenario defects — a wiki delete whose wiki was never seeded, and a handoff
1337
+ item a page's own body could satisfy — and a held team write made observable
1338
+ to the gate's reader.
1339
+ - **Three flake fixes, each about a test's own clock**
1340
+ (`fix/console-degraded-flake`, `fix/shutdown-race`,
1341
+ `fix/forget-turn-flake`): a busy runner no longer times the fixture's own
1342
+ control call out, the shutdown deadline is the test's clock and not the
1343
+ runner's, and the forget's delete keeps its fast timers' arguments.
1344
+
1345
+ ### Docs
1346
+
1347
+ - **The core and hub images are named by the Docker Hub tag they carry,
1348
+ `1.0.0`, not `2.0.0-beta.1`, a tag neither image publishes**
1349
+ (opencode-mem#86, point 2, stage A). `SECURITY.md` and `docs/architecture.md`
1350
+ name `1.0.0` beside each image id and add that no upstream commit is
1351
+ published for these images: they carry no revision label, the vendor
1352
+ publishes no source repository, and so the pin stays by image id. Upstream
1353
+ has since published `1.0.1`, `1.0.2` and `1.0.3`. The dated records under
1354
+ `docs/audit/` are unchanged; `docs/deployment.md` and the `session/add` row
1355
+ follow the same tag.
1356
+
1357
+ ### Deploy
1358
+
1359
+ **Jelly 0.4.0-beta.20 or newer (protocol major 7) is required for the plugin.**
1360
+ An older Jelly refuses the 34-action declaration whole as a schema error
1361
+ (`actions: Too big: expected array to have <=32 items`); upgrade Jelly before
1362
+ the 0.11 plugin.
1363
+
1364
+ **Records first, then control and the gateway, then the plugin and the console.**
1365
+
1366
+ **The records schema moves, forward only: `SCHEMA_VERSION` 5 → 7.** Opening a
1367
+ space file with 0.11's records service raises its `schema_version` to 7 and runs
1368
+ two steps: **6** adds `sessions_seen` (one row per OpenCode session, with which
1369
+ side saw it first) and `events.session_id` / `events.curated_by` with their
1370
+ index, and **7** adds `binding_resyncs.cursor`. **The irreversible step is that
1371
+ raise itself:** a records service that opens a space file writes version 7 into
1372
+ it, and a 0.10 records service then refuses that file — `records: this space
1373
+ file has schema version 7, newer than this service (5); upgrade the service` —
1374
+ there is no migration back, so rolling the records
1375
+ service back means restoring every space file it opened from backup, taken
1376
+ before its first start. Roll records forward to 0.11 across the whole cell
1377
+ before any other component, and do not start 0.11 records on a cell you may
1378
+ have to roll back.
1379
+
1380
+ **Two columns are added without a migration step.** When 0.11's records
1381
+ service first opens a space file, after the `ADDITIVE` tables it also adds
1382
+ `source_collections.more` (so the collector can report that a run left pages
1383
+ behind on Sources) and `sources.asked_account` (the account a binding was asked
1384
+ with, so a re-key supersedes only its own ask and a person's named accounts are
1385
+ never stopped by one another) — both nullable, both by `ensureColumns`,
1386
+ `records/src/schema.js`. `MIGRATIONS` is unchanged and `SCHEMA_VERSION` stays 7:
1387
+ nothing is rewritten and no version moves. **Neither column changes what a
1388
+ rollback costs.** A 0.9.14 records service refuses any space file that 0.11 has
1389
+ opened — its `SCHEMA_VERSION` is 5 and `migrateVersions` throws `records: this
1390
+ space file has schema version 7, newer than this service (5); upgrade the
1391
+ service` — so rolling records back means restoring every space file from the
1392
+ backup taken before 0.11 first opened it, as the paragraph above says.
1393
+
1394
+ **Control's migrations are 020 to 026**, and every one has its twin under
1395
+ `control/migrations/postgres/`, so SQLite and PostgreSQL move together — the
1396
+ schema is the same version on both:
1397
+ 020 `spaces_flavor_visibility`, 021 `space_requests` (join and handover
1398
+ requests), 022 `space_requests_one_transfer`, 023 `act_reservations` (P2),
1399
+ 024 `account_erasure`, 025 `agent_credential_erasure_reason` (the
1400
+ `account_deleted` reason the existing CHECK refused, so the table is rebuilt),
1401
+ and 026 `deleted_accounts_issuer` (the PostgreSQL half of 024 was keyed on
1402
+ `subject` alone and failed every erasure with `42703`; on SQLite the key was
1403
+ already right and the step is a no-op).
1404
+
1405
+ **What is dark, and what a cell that sets nothing sees.** The declaration is
1406
+ static: **34 actions**, every act this build wires, under Jelly's 48-action cap.
1407
+ An act changes nothing until **both action switches** are on: the plugin's
1408
+ `actions` option (`MEM_ACTIONS`, default `false`, so every press answers
1409
+ `ACTIONS_OFF`) and records' `RECORDS_ACTIONS_ENABLED` (empty, so every act
1410
+ answers `grant_action`). The four P2 acts need one more thing:
1411
+ `P2_RESERVATION_KEY`, the same value in records (which signs the reservation),
1412
+ the gateway and control (which verify and spend it). **A cell that sets no P2
1413
+ key** issues no reservation, and a press of `share.transfer`, `share.decide`,
1414
+ `space.visibility` or `space.manage` refuses `P2_UNAVAILABLE`, naming the
1415
+ secret and the three services, before control is asked — not a misleading
1416
+ `NEEDS_APPROVAL`. The gateway's key puller still needs `ACTION_KEYS_FILE` (the
1417
+ file the puller writes and records reads). Erasure is off until Jelly ID's feed is
1418
+ configured (`ACCOUNT_FEED_CONTROL_URL` and Memory's own service key at the
1419
+ gateway, plus each cell's pinned records credential and
1420
+ `RECORDS_ERASE_KEY` ⇄ `CONTROL_RECORDS_ERASE_KEY`), so a cell that sets none of
1421
+ them erases nothing and behaves as 0.10.x. **If you do turn the feed on, place
1422
+ `CONTROL_ERASED_FILE` outside control's backup set** (compose mounts its own
1423
+ volume at `/var/lib/control-erased`): it is the second store of erased
1424
+ identities, and restoring control must not roll it back —
1425
+ [docs/operations/account-erasure.md](docs/operations/account-erasure.md) has the
1426
+ settings, the `auth.db` boundary and the backup windows.
1427
+
1428
+ The source contract is the vendored pre-tag copy, not the tagged release: the
1429
+ tag does not exist yet, so `npm run tag:check` fails by design until it does and
1430
+ is not one of the pre-checks (the freeze checklist says why).
1431
+
1432
+ ## [0.10.6] - not released
1433
+
1434
+ **Never released.** Its two fixes — a truthful non-owner handover, and a link marked
1435
+ missing only where the absence is knowable — ship in 0.11, under 0.11’s own
1436
+ entries above.
1437
+
1438
+ ## [0.10.5] - not released
1439
+
1440
+ **Never released.** Its gate passed (`VERDICT PASS`), and its candidate is the
1441
+ one `build/0.11` was cut from — `b74f3a40`, gate candidate `7858d077`, merged at
1442
+ `3ac0fa5b` — so its fixes ship in 0.11 and are not a release of their own. It
1443
+ carried 0.10.4, never released either: its gate found two wrong answers about
1444
+ what memory holds — one where a hit stated the answer in other words and the
1445
+ agent said it was not recorded (A1), and one where a space's collected events
1446
+ went unmentioned on a miss (A16) — which this section fixes.
1447
+
1448
+ ### Fixed
1449
+
1450
+ - **A hit that states the answer in other words, or for a named part, is the
1451
+ answer.** The recall guidance says so, to give it with its scope and its id —
1452
+ unless the question names a different part — and to say "not recorded" only
1453
+ when no hit states it. A hit that only mentions the subject without stating the
1454
+ asked fact is not the answer: it is cited as what it does say, and the answer is
1455
+ not recorded. A worked example shows the other-words case, and is dropped rather
1456
+ than crowding an answer when the result has little room.
1457
+ - **A space's collected events are mentioned when they matter.** On a miss, and
1458
+ only beside no answer, the result says how many collected events the space
1459
+ holds, from which source, and that recall cannot read them yet, so the agent
1460
+ neither claims the answer is there nor says it is not in Memory. The line stays
1461
+ away from a stated answer and from browsed records, where it would compete with
1462
+ what was found.
1463
+ - **"Last collected" is named only from a successful collection.** A collection
1464
+ that failed says the time it was recorded as unknown, instead of presenting a
1465
+ failed attempt as when Memory last read the source.
1466
+
1467
+ ## [0.10.4] - not released
1468
+
1469
+ **Never released:** its gate found two wrong answers about what memory holds — a
1470
+ hit that stated the answer in other words read as "not recorded" (A1), and a
1471
+ space's collected events unmentioned on a miss (A16) — which 0.10.5 fixes. It
1472
+ carried 0.10.3 — never released either: its gate found four wrong answers, each
1473
+ stating a fact no tool had returned. Its entries are kept below, marked not
1474
+ released, and ship in 0.10.5.
1475
+
1476
+ ### Fixed
1477
+
1478
+ - **A commitment says it is new.** After an `add`, the open list marks the record
1479
+ it just wrote "(just added)", so it does not read like one that was already
1480
+ there, and a due-list row for something added in this conversation says
1481
+ "(added in this conversation)". A duplicate add says "already open, so nothing
1482
+ was added", and its existing record is marked "already open, nothing added".
1483
+ - **`members` says which one is you.** The person's own row is marked ", you"
1484
+ inside its role, and — only when their row was found — an "other members: N"
1485
+ count follows. When the roster cannot be matched to the person, no one is
1486
+ marked, no count is given, and nothing is claimed about who is in the space.
1487
+ - **A failure shows its real message, redacted.** The answer carries the message
1488
+ the service or the source actually gave, with secrets taken out: private keys,
1489
+ cookie values, a URL's query string and fragment, userinfo, Memory's own secret
1490
+ patterns, random-looking tokens, and long hex runs. When anything still looks
1491
+ secret, the message is withheld rather than shown, and no failure reads as an
1492
+ empty object.
1493
+ - **`health` says collected events are not recallable.** When events have
1494
+ arrived, it says recall does not read them and that only a routine turns them
1495
+ into proposals or journal pages, so a failed collect does not read as "it
1496
+ never arrived".
1497
+
1498
+ ## [0.10.3] - not released
1499
+
1500
+ **Never released:** its gate found four wrong answers, each stating a fact no tool
1501
+ had returned, which 0.10.4 fixes. It carried 0.10.2 — also never released: its
1502
+ gate found one H2, an unscoped absence claim (`suite-lifecycle`
1503
+ `life-archive-asked#3`), the mirror of 0.10.1's, where 0.10.2 scoped an absence
1504
+ claim for a recall in a shared space but a recall in the person's own space still
1505
+ supported "nothing in memory records a rule". Its entries are kept below, marked
1506
+ not released, and ship in 0.10.5.
1507
+
1508
+ ### Fixed
1509
+
1510
+ - **A recall miss says which scope it holds for, and names the spaces it did not
1511
+ read** (0.10.2 gate, `suite-lifecycle` `life-archive-asked#3`, H2). The person
1512
+ asked what archiving the Shared Workspace memory space does, and to see it
1513
+ first. One `mem_recall` — a task, and its session's own space — missed, and
1514
+ the answer said "nothing in memory records a rule about that either way",
1515
+ while the Shared Workspace, where a team rule lives, was never searched. The
1516
+ result said "only one scope was searched", which names no space and offers no
1517
+ next step, so the claim about memory survived it.
1518
+ - **On a miss**, in the person's own space, a task scope, or a page grant, the
1519
+ result names the scope it searched and the spaces it did not read — at most
1520
+ five names, then "and N more" — and says that "not recorded" holds only for
1521
+ the searched scope: **"say so, or search a space the person named"**. The
1522
+ scoped claim is the fix; it never sends an agent to a space the person did
1523
+ not name (protocol rule 1, review S2). A shared-space miss keeps its 0.10.2
1524
+ sentence, which already names the private memory it never reads.
1525
+ - **A personal-space hit now bounds the claim too** (review S4): 0.10.1's H2
1526
+ was a hit on another topic, and only a shared space had a hit line. It now
1527
+ says *the person's own memory only: "not recorded" holds for it alone* — no
1528
+ names and no invitation, so it costs no call and reads no space list. It
1529
+ appears on any personal-space hit in control mode, whether or not the person
1530
+ can reach another space.
1531
+ - The space list is read at most once, on a miss, and never on a hit; local
1532
+ direct mode has one fixed scope, so it lists nothing. A note that says the
1533
+ scope "was searched" needs a search that answered: a failed layer makes the
1534
+ result incomplete, not empty, so the note stays away (review N1).
1535
+ - **A space name is neutralised before it reaches the note** (review S1). A
1536
+ name is set by another member of the organisation, and a probe showed
1537
+ `</recalled_memory>` passing through: names now take the same fence
1538
+ neutralisation as the scope label beside them.
1539
+ - The empty-scope ban beside the note says "Do not search *this space* again",
1540
+ so the search the note offers is not forbidden. The person's own space now
1541
+ follows the same rule as a shared one.
1542
+ - **The protocol is unchanged.** Rule 2's "If no record states it, say so" read
1543
+ as "say memory has nothing", and keeping both meanings — say so, and where
1544
+ you looked — costs more characters than the block has: the scoped wording
1545
+ needs 22 more and 7 are free (the wrapped block is 1,443 of the surface
1546
+ budget's 1,450; the block itself 1,412 of 1,425), and every trim available
1547
+ dropped a rule's scope ("this session") or a rule's subject. So rule 2 keeps "say so", and
1548
+ the scope is carried where it is free: the recall result's own miss text
1549
+ ("If no rule is found, say it is not recorded in this scope") and the note
1550
+ above. Sizes are 0.10.2's: block 1,412 of 1,425, wrapped 1,443 of 1,450, the
1551
+ direct tools 27,473 of 27,500, and no description or schema changed.
1552
+
1553
+ `test/recall-tool.test.js` holds it: a personal-space miss, a task scope, a
1554
+ page grant, the five-name bound, a personal-space hit, a hostile space name,
1555
+ an unreadable space list, a failed layer, and the shared-space line unchanged.
1556
+
1557
+ - **A page's owner is named, on the page and in every listing.** The field
1558
+ shipped in 0.9.14 — `owner {id, name}` on `pages.read` and on each `pages.list`
1559
+ row — never appeared: it matched the record's `owner` against control's member
1560
+ roster by equality, and those are two different ids. A record's owner is the
1561
+ core's **upstream** user id (what the gateway sends as `x-records-user`, from
1562
+ `context.user.upstream_id`), while control's roster knows a person by its own
1563
+ `user_id` (`usr_…`), so nothing matched and every page carried no owner at all.
1564
+ It failed closed — no wrong name — but Jelly drew no owner anywhere. The roster
1565
+ now carries each member's upstream id too (control's member listing, both
1566
+ stores, and the gateway's roster read; the console's own member answers and the
1567
+ context's `user` still never carry it), and the view matches a record's owner
1568
+ on the one id that person's records are written under: their upstream id, or
1569
+ their own `user_id` when control has none. `owner.id` is control's `user_id`:
1570
+ the person's own id everywhere else (the space's members read), and the only one
1571
+ Jelly can relate to a member it draws; the upstream id is the core's own name
1572
+ for that person and no view answer shows it. Visibility is unchanged — a name
1573
+ only where the caller can see that member through the space's roster — so a
1574
+ reader holding only a page grant is still told no owner, a record owned by
1575
+ another person whose upstream id equals a member's `user_id` names nobody, and
1576
+ a routine's pages name no one. No agent-facing text changes.
1577
+
1578
+ ## [0.10.2] - not released
1579
+
1580
+ **Never released:** its gate found one H2, an unscoped absence claim
1581
+ (`suite-lifecycle` `life-archive-asked#3`), which 0.10.3 fixes. It carried
1582
+ 0.10.0 and 0.10.1, neither of them released either: 0.10.0 closed a commitment
1583
+ correctly and then invented two open ones, and 0.10.1 deleted a page the person
1584
+ never asked to remove and, by the coordinator's second read, said their memory
1585
+ held no note of a plan it did hold. Its entries below are kept and marked not
1586
+ released, and they ship in 0.10.5.
1587
+
1588
+ ### Added
1589
+
1590
+ Three reads Jelly asked for on #58 (its asks 2, 3, 4 and 6). They are view reads
1591
+ (the plugin's declared `rpc` in its jelly declaration), so no agent-facing text
1592
+ changes and no budget moves: always-on stays ≤ 10,500 and direct ≤ 27,500.
1593
+
1594
+ - **`names.known`, for dictation.** A new read under `mem_page`, capped at 50,
1595
+ answering `{names: [{name, kind, aliases?}], more, incomplete}`: the titles of
1596
+ the person's people, project and team pages, and their glossary entries
1597
+ (`term`), with the aliases a page's own `fields.aliases` names. Ordered
1598
+ deterministically — the most referenced name first (the pages of the same read
1599
+ that link to it), then by name — and carrying no space id and no path, so a
1600
+ dictation vocabulary is what a person would say. Each list read asks the
1601
+ service for those four page types only, so an old people page is still a name
1602
+ in a space of newer journals, and follows the cursor for up to five 200-row
1603
+ pages per space; a space past that, a glossary past its bodies, or more names
1604
+ than one answer holds sets `more`, so the list is never cut silently. Read
1605
+ only over the spaces control lists for the caller, each on its own, and only
1606
+ the pages the caller may read: a space that cannot be read is named in
1607
+ `incomplete`, and a page outside a page grant contributes neither a name nor a
1608
+ link count.
1609
+ - **`community` on each `graph.links` node (Jelly's ask 2).** A deterministic
1610
+ grouping of the answer's own pages by their links, so a host can colour the
1611
+ graph: the nodes are put in one canonical order (by path, then id) and their
1612
+ edges follow, then label propagation for at most 8 rounds, ties to the
1613
+ smallest label, numbered by first appearance. Computed on every read and never
1614
+ stored; the same graph gives the same grouping whatever order the service
1615
+ returned it in, the work is bounded by the answer's own node and edge caps, and
1616
+ because it reads only the nodes and edges already in the answer, a community
1617
+ can never reveal a page the caller cannot see — including in a page-grant
1618
+ space, whose reads return only the granted rows. The algorithm is documented in
1619
+ `docs/jelly.md` ("Communities in a graph").
1620
+ - **`grantOnly` on a space (Jelly's ask 4, its #49 answer 8).** `spaces.list`'s
1621
+ rows and every `space` a view read names say whether a write there waits for a
1622
+ grant, so a host can say "this waits for you in the Inbox". It is `false` for
1623
+ every space from one named constant (`SPACE_GRANT_ONLY`): Memory holds no write
1624
+ for a grant yet, and the field is declared now so the answer does not change
1625
+ shape when a held-write policy lands. A tool's receipt (`metadata.memoryReceipt`)
1626
+ is display data, not a view schema, and keeps its own space shape.
1627
+
1628
+ ### Fixed
1629
+
1630
+ - **An agent deletes or forgets only what the person asked to remove; its own
1631
+ mistake is reported, not tidied** (0.10.1 gate, jelly-core
1632
+ `core-wiki-write#2`, H3). The person asked for a wiki. The agent first made a
1633
+ personal page by mistake, then deleted that page and its history on its own:
1634
+ only the eval's automatic ask-broker had approved the `page.delete` ask, and
1635
+ the person never asked for a delete. An unasked delete or forget is harmful,
1636
+ whoever approved the ask.
1637
+ - Protocol rule 4 said "Ask first to delete, forget or replace unnamed items",
1638
+ which read as permission to ask. It now says **"Delete, forget or replace
1639
+ only on request; no tidy-ups"**: the consent is the person's request, and
1640
+ an agent does not tidy up after itself.
1641
+ - The narrow detail the always-on block cannot afford — *say so, and offer to
1642
+ remove it* — is at the delete itself: the `mem_page` and `mem_wiki`
1643
+ `confirm` arguments now say a delete is only on the person's request (the
1644
+ wiki one adds: "Pass true only when the person asked; one you propose is
1645
+ offered, never deleted"); so do the `mem_page` and `mem_wiki` delete
1646
+ previews, the `mem.usage` and `mem.pages` skills, and the protocol
1647
+ document's "Deletes" line.
1648
+ - The block is 1,412 of its 1,425 characters (1,443 of 1,450 wrapped); the
1649
+ always-on surface is 10,247 of 10,500 and the direct tools 27,473 of
1650
+ 27,500.
1651
+ - `memory.forget`, `wiki.delete` and `page.delete` keep their ask, unchanged.
1652
+
1653
+ - **A recall says which memory it searched, so "not recorded" can only name
1654
+ that scope** (the 0.10.1 gate's second read, `hand-note-no-private#4`). The
1655
+ person asked for a handoff note on the team's Harbour page; their own memory
1656
+ held "Next week I finish the PDF export spec for Harbour", but the session's
1657
+ space was the shared one, so no recall read the private space, and the agent
1658
+ told them "memory has no note of your plans" — a definite absence no search
1659
+ supported. A recall whose space is shared (or reached by page grant) now
1660
+ carries one line. A result with a hit bounds the claim:
1661
+ `Shared space: only this space was searched, not the person's private memory,
1662
+ so "not recorded" holds for this space only.` A result with no hit also says
1663
+ how, so the next step is one call and not a guess: `Shared space: the
1664
+ person's private memory was not searched. Search it with visibility:
1665
+ "private" before saying it is not recorded.` Both lines turn on a memory hit
1666
+ (records, atoms or past turns); a document index does not count, because a
1667
+ space with one always renders a `<knowledge>` fence, even with no hit, and a
1668
+ failure block when the search fails. The empty-space instruction is
1669
+ scoped the same way: "Answer that it is not recorded in this space". The
1670
+ person's own space, an unbound shared default (which reads personal) and local
1671
+ direct mode carry neither. Tool-result text only: no tool description,
1672
+ schema, skill call shape or the always-on protocol changed (still 1,443
1673
+ characters wrapped), and the note is taken out of the same per-recall budget
1674
+ the coverage line is. What goes onto a shared page is unchanged: the fix only
1675
+ makes the agent look in the person's own memory, and the team-page rules
1676
+ still decide what it may write there. `test/recall-tool.test.js` covers a
1677
+ shared miss and a shared hit, every `in:` value, `visibility: "team"`, an
1678
+ explicit shared or personal space, an unbound shared default, local direct
1679
+ mode, a private recall with no line, and a private recall that serves the plan
1680
+ the shared one never saw; `test/records-asks.test.js` covers the page grant,
1681
+ and `test/recall-tool.test.js` also covers a shared space with a wiki: no hit,
1682
+ a failed search, and a real document hit all keep the miss line.
1683
+
1684
+ ### Checks
1685
+
1686
+ - Tests first: `test/views-names.test.js` and `test/views-communities.test.js`
1687
+ cover both reads, their visibility (only the caller's spaces are read; a hidden
1688
+ page changes no community and appears in no name), determinism, ordering and
1689
+ the caps; the contract, speaker and end-to-end view suites cover `grantOnly`.
1690
+ - `JELLY_REPO=~/hey-jelly npm run check:jelly:master` passes against Jelly's
1691
+ `origin/master`, and no field is held back: none waits on a Jelly reader.
1692
+
1693
+ ## [0.10.1] - not released
1694
+
1695
+ **Never released:** its gate found two decisive harmful events — an unasked
1696
+ delete (H3, `core-wiki-write#2`), and an unscoped "not recorded" claim the
1697
+ coordinator's second read made H2 (`hand-note-no-private#4`), which 0.10.2's
1698
+ scoped-recall branch answers. It carries 0.10.0 — also never released, its gate having found one wrong answer (a
1699
+ commitment closed correctly, then two open ones invented). Its entries — 0.10.0's
1700
+ grants S1, the space lifecycle, Memory Jobs J0 to J4, the plugin kit and plugin
1701
+ declarations, plus the commitment-result fix and two eval-harness
1702
+ corrections — ship in 0.10.5.
1703
+
1704
+ ### Added
1705
+
1706
+ - **Memory Jobs J4: curation into memories and the graph (proposals only).** The
1707
+ extract stage reads what a job collected and proposes memories, commitments
1708
+ and graph entities; every proposal waits for review (a person's accept is the
1709
+ console's, as for any held write), and a run never writes a memory directly.
1710
+ **`extract` is off by default** (`RECORDS_JOBS_EXTRACT`), so a job stores
1711
+ what it reads and curates nothing until an operator turns it on.
1712
+ - **Attribution is a rule, not a pattern list.** In the person's own verified
1713
+ message a first-person promise is theirs only above the first
1714
+ reply-boundary line and on a line that names no other person; otherwise it
1715
+ is withheld and counted, never proposed. False negatives are accepted,
1716
+ false positives are not: a relayed block that names somebody and ends in
1717
+ `:` is never the person's.
1718
+ - **The payment guard is Jobs only.** A line that carries payment context is
1719
+ dropped from what the extractor may propose; Routines keep their own rule
1720
+ and `decisionKind`, unchanged.
1721
+ - **Decision markers are Jobs only.** `Outcome:`, `Resolution:`, `Decided:`,
1722
+ `Conclusion:`, "agreed with <X>:" and a present-tense "we <verb> … on/by
1723
+ <date>" mark a decision; a hedge or a question is not one.
1724
+ - **The eval** (85 labelled units, run by the J4 lane with the gate's model)
1725
+ prints the counts each run.
1726
+
1727
+ - **Verified-caller grants, dark (S1).** An action-grant verifier and its key
1728
+ file (`src/action-grant.js`, `records/src/action-grant.js`), the gateway's
1729
+ verified-caller identity headers (`x-records-identity-issuer`,
1730
+ `x-records-identity-subject`, `x-records-principal`), `acts.apply` as a
1731
+ write, and the records service's `act_grants` ledger: one row per grant
1732
+ spent, in the same transaction as the act, so a second use fails and rolls
1733
+ back. The verifier fails closed on the declaration, the API-key issuer and
1734
+ the check order, and notices a key file swapped in with its mtime and size
1735
+ intact. Nothing calls it yet: the verifier is dark until a later slice
1736
+ turns it on.
1737
+ - **The space lifecycle (S1, S2).** `mem_spaces` gains create, rename,
1738
+ archive (and restore), leave and handover, each asking the person: create,
1739
+ rename and unarchive are G1 (a setting may lift the ask); archive, leave
1740
+ and handover are G2 and never skipped, and each carries `expected_digest`,
1741
+ the digest of the state the preview showed, so a space changed behind the
1742
+ preview is refused. Handover is a request the person confirms in Memory's
1743
+ console. The console's Spaces area adds a new space, rename, leave, make
1744
+ owner, a danger zone and a deletion request (G4). The gateway gains one
1745
+ path-id decoder for every route, so a decorated id (`agt_1%20`) is refused
1746
+ rather than trimmed into another agent's, and self-leave's bypass is closed.
1747
+ Eval: lifecycle suite `2026-11-13.3`, 9/9.
1748
+ - **Memory Jobs J0 to J2.** `mem_spaces jobs` lists, reads, drafts, runs now,
1749
+ pauses, resumes and archives a scheduled pipeline; a draft never runs, and
1750
+ activating or deleting one answers with the console link where only the
1751
+ person can act. A job reads a source the way its connector's declaration
1752
+ says (schema v2), a consent names its version, a paused consent stays
1753
+ paused, and approval of a consented digest is a console session's. No
1754
+ collected text can draw an image. New asks: `job.run` and `job.resume`
1755
+ (G1), `job.archive` (G2).
1756
+ - **The plugin kit (schema v2).** Memory's connector schema v2, a kit and a
1757
+ check, with one command that runs the examples and the kit's tests
1758
+ (`plugin-kit/`): read verbs on operations, no joined names, no extra
1759
+ grants, exact grants after the calls.
1760
+ - **Plugin declarations, read-only (plugin-declared Memory, slice S1).** Memory
1761
+ reads each installed plugin's `package.json#memory` from disk (OpenCode's
1762
+ plugin store for package plugins, `<path>/package.json` for local ones),
1763
+ validates it against the fixed frame (`memory-plugin.v1`: the schema, the
1764
+ read-verb allowlist and the write-verb check on every token), compares an
1765
+ optional `<plugin id>.memory/manifest` RPC byte for byte, and reports each
1766
+ plugin's state to the records service (`plugins.report`, `plugins.list`).
1767
+ The console's Sources page lists them as Available, Invalid, Unverified,
1768
+ Conflict or Missing (a plugin the last full report no longer names). One
1769
+ bad declaration is invalid on its own; the rest of the report is kept. When no package plugin can be found, it says "OpenCode changed its
1770
+ plugin store; update Memory". Nothing is collected from a declaration yet:
1771
+ the collector and the source registry are unchanged, and plugin text never
1772
+ enters a prompt.
1773
+
1774
+ ### Fixed
1775
+
1776
+ - **A commitment change says what is still open, so an agent has nothing to
1777
+ fill in** (the 0.10.0 gate's H2, `tool-commitment-close#3`, jelly-tools). The
1778
+ gate found the agent closing a commitment correctly with
1779
+ `mem_commitments` `update` (state `done`), then telling the person "Your open
1780
+ list now holds two items: Sam — activation walkthrough (Fri 13 Nov); Rowan —
1781
+ agent eval write-up (Fri 20 Nov)." No tool returned those, and the store held
1782
+ no other open commitment: the answer said only what changed, so the list was
1783
+ invented. Now every `add`, `update` (any state) and `delete` answer ends with
1784
+ the state of the person's own scope: `Open now: 2 — "Agent eval write-up"
1785
+ (Rowan, Fri 27 Nov); "Activation walkthrough" (Sam, Fri 20 Nov).` — the count,
1786
+ up to five items (what, owner, due; the latest due date first, undated last,
1787
+ and `and N more` past five) — or `No other open commitments.` when none is
1788
+ left. It is read from the same private scope `list` reads, so another space's
1789
+ commitments never appear. Tool-result text only: no tool description or
1790
+ schema changed, and the always-on and direct budgets are the same (10,244 and
1791
+ 27,497 characters). `test/commitments-open-result.test.js` covers a close
1792
+ that leaves none, one that leaves two, seven open counted at five, a delete,
1793
+ and another space that stays out.
1794
+
1795
+ ### Evals
1796
+
1797
+ - **The gate's harness reads the fake control's lifecycle endpoints, and stores
1798
+ a rename** (`audit-reports/gate010/SECOND-READ.md`). `observedWrites`
1799
+ (`scripts/eval/write-allowlist.mjs`) now lists
1800
+ `space.handover_requested` beside the other lifecycle endpoints, and
1801
+ `scripts/eval/harness-control.mjs` keeps a renamed space's new name, so a
1802
+ scenario's rename is read back as it happened. Eval mechanism only: no
1803
+ product code, no tool, no schema.
1804
+
1805
+ ### Deploy
1806
+
1807
+ **Records first, then control and the gateway, then the plugin and the console.**
1808
+ **No migration runs anywhere, and no schema version moves.** Control's
1809
+ migrations are the ones 0.9.12 shipped and its schema is unchanged. In the
1810
+ records service every table 0.10 adds is `create table if not exists` in the
1811
+ `ADDITIVE` block (`records/src/schema.js`), created when a space file is opened
1812
+ without raising its `schema_version`, so an older records service opens the
1813
+ same file and ignores the tables it does not know, and nothing is rewritten.
1814
+ Back up anyway, as for any deploy. In order, what is additive:
1815
+
1816
+ 1. `jobs`, `job_runs`, `job_versions`, `job_requests`, `job_consents`: a job,
1817
+ each run of it, every version it has had, the person's bind-like request and
1818
+ the version they confirmed.
1819
+ 2. `job_items`, `job_extracted`, `job_curation`, `job_withdrawals`: the items a
1820
+ run read, the items the extract engine has already sent to the model, the
1821
+ memories and graph entries a run proposed, and an item a later run withdrew.
1822
+ 3. `binding_resyncs`, `job_hosts`: a binding's one restart per UTC day, and the
1823
+ host a binding runs on.
1824
+ 4. `job_lens`, `job_logs`: the block a job last wrote, by its own content hash,
1825
+ and its run log.
1826
+ 5. `act_grants`: one row per verified-caller grant spent, keyed by the host and
1827
+ the grant's single-use id, written in the same transaction as the act, so a
1828
+ second use fails on the primary key. It holds no content: the act's answer is
1829
+ the receipt.
1830
+ 6. `plugins`, `plugin_digests`: each plugin declaration as the person's
1831
+ collector reported it and this service validated it, with its package,
1832
+ source, version, digest and state; and the first digest seen for each package
1833
+ install at one version, so a different digest at the same version is an
1834
+ edited install.
1835
+ 7. `plugin_requests`, `plugin_consents`, `plugin_pending`, `plugin_changes`: a
1836
+ plugin-declared source's request and the account the person's collector
1837
+ probed, the consent they confirmed in a browser session, and the changes that
1838
+ wait for them and the ones applied.
1839
+
1840
+ - **Jobs are on by default** (`RECORDS_JOBS=on`), and a job stores what it reads
1841
+ and writes its page under its own grants. **`RECORDS_JOBS_EXTRACT` is off by
1842
+ default**: with it off, a job collects, renders its page and records its runs,
1843
+ and the extract stage proposes nothing, so no memory, commitment or graph
1844
+ entry comes from a job. Turn it on only after the extract eval passes on the
1845
+ cell's own model. `RECORDS_JOBS_DAILY_TOKENS` and
1846
+ `RECORDS_JOBS_EXTRACT_TOKENS` bound the spend.
1847
+ - **The routines are unchanged**: their scheduler, their budgets and their
1848
+ propose-only default (`RECORDS_ROUTINE_APPLY=propose`). Jobs and routines keep
1849
+ separate budgets and breakers in this release (shared in 0.11).
1850
+ - **`mem_spaces jobs` `archive` and `resume` now need the person's proof**: a
1851
+ console session, or the `state_digest` a preview showed (`mem_spaces jobs get`
1852
+ names it). An agent's call carries it; a bare bearer's is refused. This is the
1853
+ job's archive, not `mem_spaces archive`, which archives the space itself.
1854
+
1855
+ That is all 20: the job ledger's 13, `act_grants`, and the 6 `plugin*` tables.
1856
+
1857
+ ### Known issues
1858
+
1859
+ - **Jobs and Routines keep separate budgets and breakers; shared in 0.11**
1860
+ (`extract` is off by default).
1861
+
6
1862
  ## [0.9.14] - 2026-11-13
7
1863
 
8
1864
  This release includes 0.9.13. **0.9.13 was not released:** its gate found one