@joe-broadhead/opencode-mem 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,124 @@
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.15.0] - 2026-11-19
7
+
8
+ ### Fixed
9
+
10
+ - **A source the collector skips for consent is no longer left looking
11
+ broken.** Since 0.13.1 the collector reads nothing from a declared source
12
+ with no consent on, and it reported nothing for it, so the records service
13
+ kept the failure from before the skip and Sources, Home, `mem_spaces` and
14
+ Activity showed a source waiting for the person as failing. The collector now
15
+ reports each skipped binding as `sources.collected` with `{ ok: true,
16
+ accepted: 0, skipped: "consent", host }`; the records service stores it in a
17
+ new `source_collections.skipped` column (an additive migration), clears the
18
+ old `error` and `failed_since`, keeps its own `at` and clears another
19
+ machine's failure beside it; and the console reads it as waiting for the
20
+ person (Confirm account, Asked, or Off), never as failing. Only `"consent"`
21
+ is accepted: any other `skipped` value is refused as invalid.
22
+ - **An older records service** ignores `skipped` and reads the report as a
23
+ plain success that accepted nothing, which is harmless: the old failure is
24
+ cleared, and the row reads Quiet rather than failing.
25
+ - **An older plugin** never sends `skipped`, so nothing changes for it.
26
+ - **Records 0.14.0 with this plugin** ignores `skipped` and reads the report
27
+ as a plain success that accepted nothing. That is harmless, except that a
28
+ binding whose plugin is unavailable can show Quiet rather than waiting for
29
+ the person. The deploy order is records before the plugin, as always.
30
+
31
+ ### Added
32
+
33
+ - **The console in the app's look** (the console redesign, slices 0-2 and 6). The app's paper, night and density
34
+ tokens; a 44px bar, a cloth rail with the app's rows, tabs and an 856px page column; buttons as pills, status pills
35
+ with an icon and a word, banners, folds, empty states with their glyph, cloth toasts and dialogs; and an icon set
36
+ (`kit/icons.js`). Home, Review, Activity, Commitments, Jobs, Account, the sign-in pages and Memories (Saved, Learned
37
+ and Profile) are drawn as rows between hairlines, and every action keeps its call and its accessible name. A
38
+ deployment's theme still restyles the console, and the brand stays in the deploy repository: a theme must now define
39
+ the new tokens (opencode-mem-deploy PR #57 does).
40
+ - **Conversations** (slices 9 and 14). A Memories tab reads the person's own conversation turns, by day, with search,
41
+ across the agents that captured them. The agents come from records' new `agents.mine` (the caller's own names, at
42
+ most 100); only the caller's own turns ever show, in any space. Forgetting a turn or a conversation deletes it in the
43
+ core and reads it back; it stores no fingerprint and no purge for a whole turn.
44
+ - **Graphs, and code graphs in the main console** (slices 19 and 20). `kit/graph.js` draws a page's links and
45
+ backlinks (depth 1 and 2) as inline SVG with a list twin, and Pages → Code searches a code graph, follows callers
46
+ and callees, draws a layered impact view and node detail, and indexes a repository. For the hub's `explore` and
47
+ `node`, the gateway forwards only the fields the hub declares, and the catalog check on `code_graph_id` stays.
48
+ - **A wiki you can edit, and its map** (slices 10 and 21). Create a wiki with its first document, write and delete
49
+ documents and pages with a preview first, see an Updating pill while it ingests, and see a map of its pages in
50
+ communities, with a list twin.
51
+ - **Collected events** (slice 16). A Sources tab lists the person's own collected items, newest first, by source and
52
+ day, in the personal space only. Forgetting previews the exact count for the account it names. Records'
53
+ `events.list` gains `newest_first` and `total` (additive).
54
+ - **Routines, suggestions and jobs, complete** (slice 26). Activity shows the
55
+ routines' status (whether they run, their model, the day's spend and an open
56
+ breaker), and a space admin or owner gets **Run the daily now…**, previewed
57
+ first: records refuses anyone else with its own 403. Review gains **Ask for
58
+ changes…**: a note on an open suggestion, which stays open. Jobs gains what a
59
+ job staged, the version it would run now, **Archive…** (the owner's act,
60
+ previewed, which stops the job and deletes nothing), and each host as a row
61
+ with its last-seen moment and an Online or Idle pill.
62
+
63
+ ### Changed
64
+
65
+ - **The Sources page is the app's layout.** The states are drawn in three
66
+ groups (Needs you, Collecting, Not collecting), each with a label and a
67
+ count, and rows between hairlines: a 36px initial frame, the name with the
68
+ account and the status pill (its icon and its word, in the §4.3 tone, so
69
+ Collecting is green), the reason in plain words, one action pill and a More
70
+ menu. Only a Needs you row uses a primary action, and Stop collecting… and
71
+ Remove… live under More. Details holds the ids, the package, the hash, the
72
+ machine and the raw error; an attention banner counts what needs the person,
73
+ and Installed plugins and How collection works are folds. The lede is
74
+ shortened, and every action keeps its accessible name.
75
+ - **Sources says one thing per source, in plain words.** A new pure state model
76
+ (`deploy/auth/console/source-state.mjs`) joins everything known about one
77
+ source — the binding, or the binding made under its earlier name
78
+ (`retired_sources`); its bind request or plugin request; its consent; its
79
+ declaration and the plugin; its last collection, with another machine's
80
+ failure kept beside it — and answers one entry of seventeen states, in the
81
+ precedence of audit-reports/console-redesign/SPEC.md §4.3. Home reads the same
82
+ entry, so the two pages always agree.
83
+ - A binding and its open request are one row, joined by source and account:
84
+ a reported request is the **Confirm** the person needs, and no row offers
85
+ Turn on while one waits. Two accounts of one source are two rows, and an
86
+ action always names the binding it acts on — an earlier name's Stop
87
+ collecting no longer targets the declared id.
88
+ - An open request wins over a consent state whose action would ask for the
89
+ account again or turn a withdrawal back on, so a reported request is
90
+ always the **Confirm** it should be; its reason stays a second line.
91
+ - A source waiting for the person to confirm an account is **Confirm
92
+ account**, never a failure: an old failure from before the consent gate is a
93
+ muted line beside it, and its code stays in Details. That removes the
94
+ misleading red from Sources and Home.
95
+ - The human name comes from a `SOURCE_TITLES` table kept equal to the declared
96
+ ids by a test, as `KNOWN_SOURCES` is; a declared source keeps its `kind` and
97
+ whether this release collects it, so a snapshot says **Not collected** with
98
+ no action instead of offering Turn on.
99
+ - A source whose earlier name collects is one row for the family, and never
100
+ offers Turn on. A failure is said in plain words from the collector's code
101
+ table, and the raw `CODE: message` goes in Details. Another computer's
102
+ failure is a muted line that names the machine, or says "An older version of
103
+ Memory, on another computer" for a collector that gives no name; it never
104
+ changes the row's state.
105
+ - Home's **Waiting for you** lists only the states that need the person: a
106
+ source that is quiet, not heard from for a day, turned off or not collected
107
+ no longer appears there.
108
+ - **Diagnostics says what an admin sees:** a shared space's memories, members and agents, and only the admin's own
109
+ conversations in it, as the core keys them (the earlier wording said "a space's raw conversations").
110
+
111
+ ### Notes
112
+
113
+ - **Deploy records before the gateway and before the plugin.** Records 0.15.0 adds `source_collections.skipped` (an
114
+ additive column), `agents.mine`, and `events.list`'s `newest_first` and `total`. On records 0.14.0, the new plugin's
115
+ skip is stored as an ordinary success, and Collected reads the oldest window while it says "newest". If records is
116
+ rolled back to 0.14.0, roll the plugin back with it.
117
+ - **Apply the deploy theme with the new tokens before the gateway** (opencode-mem-deploy PR #57). The new
118
+ `console.css` reads tokens the old theme lacks, and the new theme keeps every token 0.14.0's sheet reads, so it can
119
+ go first.
120
+ - **Leave the engine off,** as 0.14.0's notes say: `RECORDS_ENGINE` stays unset.
121
+ - **Known limits:** a host's Online or Idle pill is the browser's own guess from its last-seen time; a Collected page
122
+ can end early when skipped history rows fill it; a stale document delete previews a no-op.
123
+
6
124
  ## [0.14.0] - 2026-11-18
7
125
 
8
126
  ### Added
@@ -74,6 +192,15 @@ release.
74
192
 
75
193
  ### Fixed
76
194
 
195
+ - **A healthy source can be stopped again.** The slice-4 layout offered Stop
196
+ collecting… only on a failing or replaced row, so Collecting, Quiet, Catching
197
+ up, Not heard from, Off and a plugin that needs the person had no way to stop
198
+ a binding. Every row with a binding now offers Stop collecting… under More,
199
+ whatever its state, and it names that binding (the earlier name for a row
200
+ made under one). A row with no binding offers nothing.
201
+ - **The More menu closes on a Tab-out or an outside click,** and its items are
202
+ out of the tab order while it is shut. Another computer's failure reads as one
203
+ line of text, not two columns.
77
204
  - **A collection failure that names no machine no longer overwrites a named machine's report.** A collector too old to
78
205
  send `host` can collect for the same person on its own schedule, from another machine, and fail there on every tick.
79
206
  When the standing report names a machine, that failure is kept beside it with the fixed label
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joe-broadhead/opencode-mem",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "type": "module",
5
5
  "description": "Durable private and shared-space memory for OpenCode agents",
6
6
  "license": "MIT",
@@ -511,7 +511,10 @@ export function createCollectorService({ ctx, runtime, toolkit, clock = REAL_CLO
511
511
  }
512
512
  },
513
513
  })
514
- await reportCollections(call, where, results)
514
+ // A skip is a statement about a consent this run checked. When the listing
515
+ // failed, the run knows no consent at all: it reports no skip, and records
516
+ // keeps the row it had (the 0153 review's M).
517
+ await reportCollections(call, where, results, { consentsKnown: Boolean(plugins) })
515
518
  return finish(trigger, started, results, "", collectableSources(sources, { only }).length === 0, { probes, collected })
516
519
  }
517
520
 
@@ -521,7 +524,7 @@ export function createCollectorService({ ctx, runtime, toolkit, clock = REAL_CLO
521
524
  * effort: a service older than 0.9.8 does not know the call, and a failed
522
525
  * report never fails the collection.
523
526
  */
524
- async function reportCollections(call, where, results) {
527
+ async function reportCollections(call, where, results, { consentsKnown = true } = {}) {
525
528
  // A service asked to stop reports nothing: its run is the instance being
526
529
  // disposed, and its plugin RPCs are already gone (0.12.4, live at 22:19Z on
527
530
  // 2026-11-17), so every binding would be reported failing for the host's
@@ -529,18 +532,30 @@ export function createCollectorService({ ctx, runtime, toolkit, clock = REAL_CLO
529
532
  if (stopped) return
530
533
  for (const result of results) {
531
534
  if (stopped) return
532
- // Not due, another machine's binding, and one no consent lets this machine
533
- // read, are not this run's reports. A needs-consent binding is never turned
534
- // failing (O2): its state is the absence of a consent, and the console
535
- // shows that from plugins.list.
536
- if (result.notDue || result.otherHost || result.needsConsent || result.transient || typeof result.source !== "string") continue
535
+ // Not due, another machine's binding, and a transient host fault are not
536
+ // this run's reports.
537
+ if (result.notDue || result.otherHost || result.transient || typeof result.source !== "string") continue
537
538
  // `more` travels with the report (review S5): the console's Sources row says
538
539
  // "catching up" from records, so it must know the run left pages behind.
539
540
  // `host` is this machine: the records service shows a binding's failing
540
541
  // state only for the collector that last succeeded for it, so a machine
541
542
  // with no sign-in to the source cannot turn it failing (0.12.3).
542
- const body = { source: result.source, account: result.account ?? "default", ok: !result.error, accepted: Number.isInteger(result.accepted) ? result.accepted : undefined, more: result.more === true, host }
543
- if (result.error) body.error = reasonText(result, 300)
543
+ //
544
+ // A binding no consent lets this machine read is reported as **skipped**,
545
+ // not as a failure (0.15.0, console redesign §4.4): since 0.13.1 the
546
+ // collector reads nothing from it, and saying nothing left records holding
547
+ // the failure from before the skip, so Sources showed a source waiting for
548
+ // its person as red. A skip is a success that read nothing, and the row's
549
+ // own state says why.
550
+ // Only a consent this run actually checked may be called missing. With no
551
+ // listing, a gated binding is one Memory could not check: it is not
552
+ // reported at all, as 0.14.0 did, and the listing's failure is logged once
553
+ // where it happened.
554
+ if (result.needsConsent === true && !consentsKnown) continue
555
+ const skipped = result.needsConsent === true ? "consent" : undefined
556
+ const body = { source: result.source, account: result.account ?? "default", ok: skipped ? true : !result.error, accepted: Number.isInteger(result.accepted) ? result.accepted : undefined, more: result.more === true, host }
557
+ if (skipped) body.skipped = skipped
558
+ if (result.error && !skipped) body.error = reasonText(result, 300)
544
559
  try {
545
560
  await call("sources.collected", body, where)
546
561
  } catch (error) {