opencode-self-improvement 0.15.8 → 0.15.9
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/portable/export.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-self-improvement",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.9",
|
|
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/portable/export.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { dirname, join } from "node:path";
|
|
|
11
11
|
import { allowOutsideStorePaths, exportsDir, memoryRoot } from "../core/config/paths.ts";
|
|
12
12
|
import { resolveContained } from "../store/containment.ts";
|
|
13
13
|
import { loadAll } from "../store/files/load.ts"
|
|
14
|
+
import { redactSecrets } from "../store/secrets.ts"
|
|
14
15
|
import { isActive } from "../store/model/predicates.ts"
|
|
15
16
|
import { isVisibleTo, readerFromSid } from "../store/model/visibility.ts";
|
|
16
17
|
|
|
@@ -148,16 +149,20 @@ export async function exportMemories(opts: ExportOptions = {}): Promise<ExportRe
|
|
|
148
149
|
exportedAt: new Date().toISOString(),
|
|
149
150
|
count: mems.length,
|
|
150
151
|
});
|
|
152
|
+
// An export is a copy at rest, so it must not carry credentials that were
|
|
153
|
+
// stored before the write-side redaction existed (#74 slice 1). Redaction is
|
|
154
|
+
// applied to the value being serialised, never to the row: export stays a
|
|
155
|
+
// read path, and the store remains the byte-of-record for memory_undo.
|
|
151
156
|
const lines = mems.map((m) =>
|
|
152
157
|
JSON.stringify({
|
|
153
158
|
ts: m.ts,
|
|
154
159
|
type: m.type,
|
|
155
160
|
scope: m.scope,
|
|
156
|
-
content: m.content,
|
|
161
|
+
content: redactSecrets(m.content),
|
|
157
162
|
status: m.status,
|
|
158
163
|
tags: m.tags,
|
|
159
164
|
kw: m.kw,
|
|
160
|
-
issue: m.issue,
|
|
165
|
+
issue: m.issue === undefined ? m.issue : redactSecrets(m.issue),
|
|
161
166
|
// Origin stamps ride along so a same-repo machine hop can retain them.
|
|
162
167
|
// Import validates them against its current repo before promotion.
|
|
163
168
|
repo: m.repo,
|