opencode-self-improvement 0.30.5 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -244
- package/docs/auto-capture-evidence.md +8 -1
- package/docs/contradiction-authority.md +40 -4
- package/docs/development.md +23 -3
- package/docs/export-import.md +61 -0
- package/docs/flags.md +10 -2
- package/docs/import-quarantine.md +18 -2
- package/docs/injection-cost.md +10 -5
- package/docs/install.md +45 -0
- package/docs/options.md +41 -0
- package/docs/pre-release-ritual.md +4 -0
- package/docs/recall-quality.md +56 -0
- package/docs/repo-scoping.md +29 -5
- package/docs/secret-redaction.md +51 -0
- package/docs/store-concurrency.md +14 -1
- package/docs/surfaces.md +39 -0
- package/docs/troubleshooting.md +29 -0
- package/docs/use-ledger.md +61 -0
- package/docs/write-gates.md +17 -2
- package/docs/write-latency.md +25 -0
- package/package.json +1 -1
- package/src/capture/candidates.ts +1 -1
- package/src/capture/prompt.ts +1 -1
- package/src/capture/runtime.ts +19 -17
- package/src/capture/triggers.ts +1 -1
- package/src/consolidate/propose.ts +1 -1
- package/src/core/config/paths.ts +1 -1
- package/src/events.ts +2 -2
- package/src/gate/gate.ts +1 -1
- package/src/identity/session-context.ts +1 -1
- package/src/index.ts +18 -18
- package/src/init/run.ts +1 -1
- package/src/init/stamp.ts +1 -1
- package/src/inject/digest.ts +1 -1
- package/src/inject/epochs.ts +2 -2
- package/src/recall/gate.ts +30 -4
- package/src/status/report.ts +4 -4
- package/src/status/store-summary.ts +1 -1
- package/src/store/files/load.ts +1 -1
- package/src/store/lock.ts +1 -1
- package/src/store/prune.ts +1 -1
- package/src/store/tombstones/rejection.ts +1 -1
- package/src/store/tombstones/tombstone.ts +1 -1
- package/src/store/undo.ts +1 -1
- package/src/tools/consolidate.ts +2 -2
- package/src/tools/decay.ts +1 -1
- package/src/tools/deps.ts +1 -1
- package/src/tools/evidence.ts +1 -1
- package/src/tools/merge-review.ts +1 -1
- package/src/tools/recall.ts +15 -6
- package/src/tools/status-tool.ts +1 -1
- package/src/tools/update.ts +1 -1
- package/src/viewer/mutate.ts +1 -1
- /package/src/{command → init}/ensure.ts +0 -0
- /package/src/{hits → telemetry}/ledger.ts +0 -0
- /package/src/{evidence → telemetry}/record.ts +0 -0
package/src/tools/recall.ts
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
// and handler are byte-identical to the pre-split source; closure access arrives
|
|
3
3
|
// through ToolDeps.
|
|
4
4
|
import type { ToolRegister } from "./deps.ts";
|
|
5
|
-
import { record } from "../
|
|
5
|
+
import { record } from "../telemetry/record.ts";
|
|
6
6
|
import { formatMemory } from "../inject/format.ts";
|
|
7
7
|
import {
|
|
8
8
|
admitsRow,
|
|
9
|
+
exactAliasMatches,
|
|
9
10
|
gateEnabled,
|
|
10
11
|
queryConcepts,
|
|
11
12
|
recallHaystack,
|
|
@@ -51,14 +52,22 @@ export const register: ToolRegister = (editor, deps) => {
|
|
|
51
52
|
results = results.filter((m) => m.scope.includes(args.scope!));
|
|
52
53
|
if (args.type) results = results.filter((m) => m.type === args.type);
|
|
53
54
|
if (args.query) {
|
|
54
|
-
// Default on: a row must share two whole words of the query — the
|
|
55
|
-
// concepts rule, not the scorer's substring test (src/recall/gate.ts,
|
|
56
|
-
//). OPENCODE_MEMORY_QUERY_GATE=off restores the old matcher.
|
|
57
55
|
const gate = gateEnabled();
|
|
58
56
|
const concepts = gate ? queryConcepts(args.query) : [];
|
|
57
|
+
const aliases = exactAliasMatches(args.query, concepts, results);
|
|
59
58
|
results = results
|
|
60
|
-
.map((m) => ({
|
|
61
|
-
|
|
59
|
+
.map((m) => ({
|
|
60
|
+
m,
|
|
61
|
+
score: Math.max(
|
|
62
|
+
scoreMemory(m, args.query!),
|
|
63
|
+
aliases.has(m) ? 1 : 0,
|
|
64
|
+
),
|
|
65
|
+
}))
|
|
66
|
+
.filter(
|
|
67
|
+
(x) =>
|
|
68
|
+
x.score > 0 &&
|
|
69
|
+
(!gate || aliases.has(x.m) || admitsRow(x.m, concepts)),
|
|
70
|
+
)
|
|
62
71
|
.sort((a, b) => b.score - a.score)
|
|
63
72
|
.map((x) => x.m);
|
|
64
73
|
}
|
package/src/tools/status-tool.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The memory_status tool, extracted from index.ts.
|
|
2
2
|
// Closure access arrives through ToolDeps.
|
|
3
3
|
import type { ToolRegister } from "./deps.ts";
|
|
4
|
-
import { readLedger } from "../
|
|
4
|
+
import { readLedger } from "../telemetry/ledger.ts";
|
|
5
5
|
import { formatMemory } from "../inject/format.ts";
|
|
6
6
|
import { loadAll, malformedCount } from "../store/files/load.ts";
|
|
7
7
|
import { isVisibleTo, readerFromSid } from "../store/model/visibility.ts";
|
package/src/tools/update.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { memoryRoot } from "../core/config/paths.ts";
|
|
7
7
|
import { nonCaptureTags } from "../core/guidance.ts";
|
|
8
|
-
import { record } from "../
|
|
8
|
+
import { record } from "../telemetry/record.ts";
|
|
9
9
|
import { auditCaveat, runWriteGate, sameStrList } from "../gate/gate.ts";
|
|
10
10
|
import { loadAll } from "../store/files/load.ts";
|
|
11
11
|
import { markSuperseded } from "../store/files/supersede.ts";
|
package/src/viewer/mutate.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
chainId,
|
|
14
14
|
contentHash,
|
|
15
15
|
targetRepoFields,
|
|
16
|
-
} from "../
|
|
16
|
+
} from "../telemetry/record.ts";
|
|
17
17
|
import { removeTombstone, tombstone } from "../store/tombstones/tombstone.ts";
|
|
18
18
|
import { redactSecrets } from "../store/secrets.ts";
|
|
19
19
|
import { formatLine, parseLine } from "../core/logfmt/format.ts";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|