opencode-self-improvement 0.15.24 → 0.15.26
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-self-improvement",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.26",
|
|
4
4
|
"description": "Durable memory for opencode: remember facts, decisions, and commands across sessions, plus a one-command per-repo setup (/repo-init).",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"gate": "bun scripts/merge-gate.ts",
|
|
66
66
|
"gate:hooks": "git config core.hooksPath .githooks",
|
|
67
67
|
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
68
|
-
"bench": "bun bench/inject-cost.ts",
|
|
69
|
-
"bench:recall": "bun bench/recall-quality.ts",
|
|
70
|
-
"bench:write": "bun bench/write-latency.ts",
|
|
68
|
+
"bench": "bun bench/runners/inject-cost.ts",
|
|
69
|
+
"bench:recall": "bun bench/runners/recall-quality.ts",
|
|
70
|
+
"bench:write": "bun bench/runners/write-latency.ts",
|
|
71
71
|
"sweep:test": "bun scripts/test-sweep.ts",
|
|
72
72
|
"memory-view": "bun run src/viewer/server.ts",
|
|
73
73
|
"format": "biome format --write",
|
package/src/index.ts
CHANGED
|
@@ -237,7 +237,7 @@ const impl = {
|
|
|
237
237
|
// ever writes through the gate. A per-session, per-trigger cooldown bounds
|
|
238
238
|
// the cost. Compaction-triggered rows carry the CAPTURE_COMPACT_TAG tag and
|
|
239
239
|
// auto_capture_compaction_* evidence lines, idle rows keep auto_capture_*,
|
|
240
|
-
// so decay/status — and bench/capture-trigger-compare.ts — can measure
|
|
240
|
+
// so decay/status — and bench/runners/capture-trigger-compare.ts — can measure
|
|
241
241
|
// which trigger earns its tokens. Every failure is swallowed: capture must
|
|
242
242
|
// never be able to break a session.
|
|
243
243
|
const capture = configureAutoCapture(ctx, {
|
package/src/recall/score.ts
CHANGED
|
@@ -46,7 +46,7 @@ const LONG_QUERY_TOKENS = 3;
|
|
|
46
46
|
// author-supplied aliases indexed at write time (#40 item 3, the vocabulary
|
|
47
47
|
// bridge for the bench's strict-paraphrase wall). Keywords are indexed, never
|
|
48
48
|
// rendered, so they cannot change what a block costs.
|
|
49
|
-
// Exported for bench/recall-quality.ts — the benchmark measures the shipped
|
|
49
|
+
// Exported for bench/runners/recall-quality.ts — the benchmark measures the shipped
|
|
50
50
|
// matcher.
|
|
51
51
|
//
|
|
52
52
|
// Superseded rows are dropped HERE, not only by the callers. Every model-facing
|
|
@@ -85,7 +85,8 @@ export async function markManySupersededReport(
|
|
|
85
85
|
// The one exception is SECRET SCRUB (#128, review probe 4): the
|
|
86
86
|
// fields a merge/decay/update copies into the loser's row carry
|
|
87
87
|
// caller-authored prose (the rotation note "key ghp_... rotated"),
|
|
88
|
-
// and content already scrubs at this same boundary (
|
|
88
|
+
// and content already scrubs at this same boundary (appendMemory
|
|
89
|
+
// redacts content in src/store/files/append.ts). The
|
|
89
90
|
// durable row must not be the one place a credential survives when
|
|
90
91
|
// the evidence line beside it was cleaned.
|
|
91
92
|
const clean: SupersedeFields = { ...fields };
|
|
@@ -121,7 +122,7 @@ export async function clearSuperseded(ts: string): Promise<boolean> {
|
|
|
121
122
|
for (const file of await memoryFiles()) {
|
|
122
123
|
const outcome = await stampRow(file, ts, (parsed) => {
|
|
123
124
|
if (typeof parsed.superseded_by !== "string") return null;
|
|
124
|
-
// These
|
|
125
|
+
// These six keys are written only by markSuperseded (drift, canonical,
|
|
125
126
|
// update and merge_review), never by appendMemory, so they are all part of
|
|
126
127
|
// the marker and go with it. Field order round-trips because parseLine
|
|
127
128
|
// inserts keys in source order.
|
|
@@ -170,8 +170,3 @@ export function evidenceVisibleTo(
|
|
|
170
170
|
export function isVisibleHere(m: Memory): boolean {
|
|
171
171
|
return isVisibleTo(m, readerForAmbient());
|
|
172
172
|
}
|
|
173
|
-
|
|
174
|
-
// Rows visible to the current process (active filtering stays with callers).
|
|
175
|
-
export function visibleHere(mems: Memory[]): Memory[] {
|
|
176
|
-
return mems.filter(isVisibleHere);
|
|
177
|
-
}
|
package/src/store/prune.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Principle 3: a human can prune a bad memory. Deletion is auditable (reason),
|
|
2
2
|
// reversible (snapshot) and never touches a repo. The `prune` evidence line is
|
|
3
|
-
// emitted
|
|
3
|
+
// emitted after prune() returns so S5 can assert the reason and snapshot.
|
|
4
4
|
import { deletionsFile } from "../core/config/paths.ts";
|
|
5
5
|
import { prune, type PruneResult } from "./files/prune.ts";
|
|
6
6
|
import { readerFromSid } from "./model/visibility.ts";
|
|
@@ -230,7 +230,7 @@ function moved(a: string[], b: string[]): boolean {
|
|
|
230
230
|
/**
|
|
231
231
|
* The tombstone set, cached against the file's change token.
|
|
232
232
|
*
|
|
233
|
-
* `
|
|
233
|
+
* `probeRejection` runs on EVERY gated write, so without this each write pays a
|
|
234
234
|
* full read of every rejection ever recorded — a cost this mechanism introduced
|
|
235
235
|
* into the hot path, and one that shows up badly on Windows, where the CI runner
|
|
236
236
|
* is slow enough for it to matter. `fileIdentity` is the repo's own change token
|