opencode-codex-memory 0.9.10 → 0.9.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 +2 -2
- package/dist/src/codex-interop.js +1 -1
- package/dist/src/phase2.js +2 -2
- package/dist/src/pipeline.js +2 -1
- package/dist/src/workspace.d.ts +1 -0
- package/dist/src/workspace.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ to your existing global `~/.config/opencode/opencode.jsonc` or `opencode.json`
|
|
|
35
35
|
{
|
|
36
36
|
"$schema": "https://opencode.ai/config.json",
|
|
37
37
|
"plugins": [
|
|
38
|
-
{ "package": "opencode-codex-memory@0.9.
|
|
38
|
+
{ "package": "opencode-codex-memory@0.9.11" }
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
```
|
|
@@ -45,7 +45,7 @@ to your existing global `~/.config/opencode/opencode.jsonc` or `opencode.json`
|
|
|
45
45
|
```json
|
|
46
46
|
{
|
|
47
47
|
"$schema": "https://opencode.ai/config.json",
|
|
48
|
-
"plugin": ["opencode-codex-memory@0.9.
|
|
48
|
+
"plugin": ["opencode-codex-memory@0.9.11"]
|
|
49
49
|
}
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -36,7 +36,7 @@ import { readRegularFileNoFollow, safeResolveUnderRoot, writeRegularFileNoFollow
|
|
|
36
36
|
* artifacts-gone => resources removed (deletion is the forgetting signal in
|
|
37
37
|
* the workspace diff) while an unreachable source ROOT is a no-op, never a
|
|
38
38
|
* deletion signal. Resource files are nested under a subdirectory and carry
|
|
39
|
-
* no timestamp prefix, so extension-resource pruning (
|
|
39
|
+
* no timestamp prefix, so extension-resource pruning (14-day retention,
|
|
40
40
|
* top-level timestamped files only) never touches them — same retention
|
|
41
41
|
* exemption codex relies on for external_agent_import.
|
|
42
42
|
*/
|
package/dist/src/phase2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PHASE2_HEARTBEAT_SECONDS } from "./store.js";
|
|
2
2
|
import { checkRateLimit, isProviderCapacityError, noteProviderCapacityExhausted } from "./ratelimit.js";
|
|
3
|
-
import { ensureLayout, rebuildRawMemories, writeRolloutSummaries, pruneExtensionResources, writeWorkspaceDiff, validateConsolidationArtifactsForVersion, removeMemorySymlinks, } from "./workspace.js";
|
|
3
|
+
import { ensureLayout, rebuildRawMemories, writeRolloutSummaries, pruneExtensionResources, EXTENSION_RESOURCE_RETENTION_DAYS, writeWorkspaceDiff, validateConsolidationArtifactsForVersion, removeMemorySymlinks, } from "./workspace.js";
|
|
4
4
|
import { ensureBaseline, captureWorkspaceDiff, resetBaseline, DIFF_ARTIFACT } from "./git-baseline.js";
|
|
5
5
|
import { consolidateViaSubagent, getPluginInput, SubagentCancelledError, SubagentShutdownError, } from "./llm.js";
|
|
6
6
|
import { hostSessionLiveness, withHostTimeout } from "./host-client.js";
|
|
@@ -13,7 +13,7 @@ import { syncClaudeImport } from "./claude-import.js";
|
|
|
13
13
|
export const DEFAULT_PHASE2_OPTIONS = {
|
|
14
14
|
maxRaw: 256,
|
|
15
15
|
maxUnusedDays: 30,
|
|
16
|
-
extensionRetentionDays:
|
|
16
|
+
extensionRetentionDays: EXTENSION_RESOURCE_RETENTION_DAYS,
|
|
17
17
|
};
|
|
18
18
|
// Export runs only after a successful phase 2 (fresh, validated artifacts) and
|
|
19
19
|
// must never fail the run — Codex's workspace is best-effort foreign territory.
|
package/dist/src/pipeline.js
CHANGED
|
@@ -6,13 +6,14 @@ import { memoryDbPath } from "./paths.js";
|
|
|
6
6
|
import { withMemoryVersion, writeMemoryVersions } from "./memory-version.js";
|
|
7
7
|
import { isPluginShuttingDown } from "./lifecycle.js";
|
|
8
8
|
import { recordDiagnostic } from "./diagnostics.js";
|
|
9
|
+
import { EXTENSION_RESOURCE_RETENTION_DAYS } from "./workspace.js";
|
|
9
10
|
const extracting = new Set();
|
|
10
11
|
async function consolidate(store, bypassCooldown) {
|
|
11
12
|
try {
|
|
12
13
|
const result = await runPhase2(store, {
|
|
13
14
|
maxRaw: pluginOptions.max_raw_memories_for_consolidation,
|
|
14
15
|
maxUnusedDays: pluginOptions.max_unused_days,
|
|
15
|
-
extensionRetentionDays:
|
|
16
|
+
extensionRetentionDays: EXTENSION_RESOURCE_RETENTION_DAYS,
|
|
16
17
|
consolidationModel: pluginOptions.consolidation_model,
|
|
17
18
|
codexInterop: pluginOptions.codex_interop,
|
|
18
19
|
claudeImport: pluginOptions.claude_import,
|
package/dist/src/workspace.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MemoryVersion } from "./options.js";
|
|
2
2
|
import type { Stage1Output } from "./store.js";
|
|
3
3
|
import { type WorkspaceDiff } from "./git-baseline.js";
|
|
4
|
+
export declare const EXTENSION_RESOURCE_RETENTION_DAYS = 14;
|
|
4
5
|
/** Mirrors codex `remove_memory_symlinks` (workspace.rs): unlink every symlink in the tree, never follow. */
|
|
5
6
|
export declare function removeMemorySymlinks(root?: string): number;
|
|
6
7
|
export declare function ensureLayout(): void;
|
package/dist/src/workspace.js
CHANGED
|
@@ -10,6 +10,8 @@ const ROLLOUT_DIR = "rollout_summaries";
|
|
|
10
10
|
const EXTENSIONS_DIR = "extensions";
|
|
11
11
|
const SKILLS_DIR = "skills";
|
|
12
12
|
const ADHOC_NOTES_DIR = "extensions/ad_hoc/notes";
|
|
13
|
+
// codex memories/write/src/lib.rs extension_resources::RETENTION_DAYS.
|
|
14
|
+
export const EXTENSION_RESOURCE_RETENTION_DAYS = 14;
|
|
13
15
|
// Mirrors codex templates/extensions/ad_hoc/instructions.md: notes are
|
|
14
16
|
// permanent (never pruned, never deleted), authoritative as content but never
|
|
15
17
|
// instructions, and derived info carries an "[ad-hoc note]" provenance tag.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-codex-memory",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.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",
|