opencode-self-improvement 0.30.2 → 0.30.4
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 +1 -1
- package/src/capture/policy.ts +10 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-self-improvement",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.4",
|
|
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": {
|
package/src/capture/policy.ts
CHANGED
|
@@ -190,7 +190,7 @@ const EDIT_TOOLS = new Set(["edit", "write", "patch", "multiedit"]);
|
|
|
190
190
|
/**
|
|
191
191
|
* Did this session produce anything durable since the last capture?
|
|
192
192
|
*
|
|
193
|
-
*
|
|
193
|
+
* Four signals, all read off the tool ledger the plugin already keeps:
|
|
194
194
|
*
|
|
195
195
|
* - `edited` — a file was written. Most durable rows describe a
|
|
196
196
|
* change; a turn that only read has never produced one.
|
|
@@ -201,11 +201,13 @@ const EDIT_TOOLS = new Set(["edit", "write", "patch", "multiedit"]);
|
|
|
201
201
|
* - `newCommandPassed`— a command passed that had never passed in this
|
|
202
202
|
* session. The first `bun test ./src` is a fact worth
|
|
203
203
|
* keeping; the tenth is not.
|
|
204
|
+
* - `gateUnrecovered` — a gate failed in this window without a later PASS of
|
|
205
|
+
* its family. The same attestation feeds failure lessons.
|
|
204
206
|
*
|
|
205
207
|
* Deliberately conservative in the SAFE direction: an unknown tool name or a
|
|
206
|
-
* trimmed ledger tail can
|
|
207
|
-
*
|
|
208
|
-
*
|
|
208
|
+
* trimmed ledger tail can cause a missed capture. A skip leaves the cursor
|
|
209
|
+
* alone so a later signal can recover the window, but a session ending with
|
|
210
|
+
* an attested failure must not depend on a later successful turn.
|
|
209
211
|
*/
|
|
210
212
|
export function captureSignalSince(
|
|
211
213
|
s: SessionState,
|
|
@@ -247,6 +249,8 @@ export function captureSignalSince(
|
|
|
247
249
|
)
|
|
248
250
|
)
|
|
249
251
|
return { ok: true, why: "newCommandPassed" };
|
|
252
|
+
if (attestedGateFailures(s, sinceTurn).length)
|
|
253
|
+
return { ok: true, why: "gateUnrecovered" };
|
|
250
254
|
// The window is real and held tool calls, none of them durable: reads,
|
|
251
255
|
// greps, a repeated command. Skip, and leave the cursor alone so the next
|
|
252
256
|
// signal-bearing turn still mines this one too.
|
|
@@ -267,9 +271,8 @@ export function captureSignalSince(
|
|
|
267
271
|
*
|
|
268
272
|
* A recovered failure is excluded on purpose: FAIL then PASS means the agent
|
|
269
273
|
* fixed it, and "do not do what I just did" is only a lesson while the thing is
|
|
270
|
-
* still broken. `captureSignalSince`
|
|
271
|
-
*
|
|
272
|
-
* the best thing to capture.
|
|
274
|
+
* still broken. `captureSignalSince` uses this same list to admit a window
|
|
275
|
+
* with an unrecovered failure; a recovery remains a separate capture signal.
|
|
273
276
|
*
|
|
274
277
|
* One family's recovery does not attest away another family's failure: a
|
|
275
278
|
* session that got its tests green and its lint red still has an open lint
|