opencode-codex-memory 0.4.10 → 0.4.11
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 +3 -3
- package/dist/src/capture.js +7 -1
- package/dist/src/phase1.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ If you want the mental model before the details, jump to
|
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
|
-
"plugin": ["opencode-codex-memory@0.4.
|
|
55
|
+
"plugin": ["opencode-codex-memory@0.4.11"]
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -239,7 +239,7 @@ To set options, turn the plugin entry into a `[name, options]` pair:
|
|
|
239
239
|
```json
|
|
240
240
|
{
|
|
241
241
|
"plugin": [
|
|
242
|
-
["opencode-codex-memory@0.4.
|
|
242
|
+
["opencode-codex-memory@0.4.11", { "disable_on_external_context": true, "min_rollout_idle_hours": 2 }]
|
|
243
243
|
]
|
|
244
244
|
}
|
|
245
245
|
```
|
|
@@ -298,7 +298,7 @@ directions:
|
|
|
298
298
|
```json
|
|
299
299
|
{
|
|
300
300
|
"plugin": [
|
|
301
|
-
["opencode-codex-memory@0.4.
|
|
301
|
+
["opencode-codex-memory@0.4.11", { "codex_interop": { "import": true, "export": true } }]
|
|
302
302
|
]
|
|
303
303
|
}
|
|
304
304
|
```
|
package/dist/src/capture.js
CHANGED
|
@@ -47,9 +47,15 @@ export async function listRecentSessions(limit = SCAN_LIMIT) {
|
|
|
47
47
|
return [];
|
|
48
48
|
}
|
|
49
49
|
try {
|
|
50
|
+
// Opencode's SDK client injects `directory` from x-opencode-directory on
|
|
51
|
+
// every GET (sdk client rewrite). The experimental session handler treats
|
|
52
|
+
// any present directory query as "filter to this instance's project",
|
|
53
|
+
// which would hide every other project's idle sessions — memory is global.
|
|
54
|
+
// Pass an empty directory so rewrite does not re-inject, and the handler
|
|
55
|
+
// sees a falsy value → listGlobal without a directory filter.
|
|
50
56
|
const res = await withTimeout(get({
|
|
51
57
|
url: "/experimental/session",
|
|
52
|
-
query: { roots: true, limit },
|
|
58
|
+
query: { roots: true, limit, directory: "" },
|
|
53
59
|
}), API_TIMEOUT_MS, "experimental.session.list");
|
|
54
60
|
if (!res || res.error || !Array.isArray(res.data)) {
|
|
55
61
|
throw new Error(`experimental.session.list failed: ${JSON.stringify(res?.error ?? {})}`);
|
package/dist/src/phase1.js
CHANGED
|
@@ -38,7 +38,9 @@ export async function runPhase1(store, opts = DEFAULT_PHASE1_OPTIONS, rateLimitC
|
|
|
38
38
|
// Empty claim: do not stamp the process timer (codex only metrics
|
|
39
39
|
// skipped_no_candidates and leaves the next startup free to try again).
|
|
40
40
|
if (claimed.length === 0) {
|
|
41
|
-
|
|
41
|
+
// eligible ≠ claimable: already done at this watermark, exhausted retries,
|
|
42
|
+
// or lease held. Surface that so inspect is not "memory stuck".
|
|
43
|
+
recordDiagnostic("info", "phase1", `no claims (eligible=${eligible.length}; already extracted, in backoff, or at claim cap)`);
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
markRateLimitUsed("phase1");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-codex-memory",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"description": "Persistent memory plugin for opencode — ports codex's two-phase memory system (extraction → consolidation → injection → citation feedback)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/index.js",
|