opencode-claude-memory 2.2.0 → 2.2.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 +4 -3
- package/dist/host/v1/host.js +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,8 @@ All behaviour is configured through OpenCode's own configuration. There are no `
|
|
|
102
102
|
- When the same plugin is listed in both the global and the project `opencode.json`, OpenCode keeps the **last** declaration (project wins); options are not merged across files.
|
|
103
103
|
- The three agents are registered hidden with a memory-only tool sandbox. On 1.x, override any field (`model`, `steps`, `temperature`, …) under `agent.<name>`; the plugin fills in the rest.
|
|
104
104
|
- `CLAUDE_CONFIG_DIR` is honoured exactly like Claude Code does, and is the only environment variable the plugin reads.
|
|
105
|
-
- `readOnly: true`
|
|
105
|
+
- `readOnly: true` prevents this plugin from writing to the Claude config directory: no `memory_save` / `memory_delete`, no extraction or auto-dream (whatever `extract` / `autodream` say), no plugin state or log writes, and the memory folder is not created. The index, recall and `memory_list` / `memory_search` / `memory_read` keep working, and the prompt tells the model the memory is read-only.
|
|
106
|
+
- This option does not restrict the host's shell or file-editing tools, or other plugins. To enforce read-only access for the entire host, also configure host permissions or filesystem access controls; the memory prompt alone does not enforce it.
|
|
106
107
|
|
|
107
108
|
```jsonc
|
|
108
109
|
// opencode.json — OpenCode 2.x
|
|
@@ -207,9 +208,9 @@ Everything the environment variables used to control now lives under `extract`,
|
|
|
207
208
|
|
|
208
209
|
**Can I disable extraction, auto-dream or recall?** Yes — `extract.enabled`, `autodream.enabled`, `recall.enabled` in the plugin options.
|
|
209
210
|
|
|
210
|
-
**Can
|
|
211
|
+
**Can I make this plugin read Claude Code's memory without changing it?** Yes — `readOnly: true`. The plugin does not write under `CLAUDE_CONFIG_DIR`. Enforcing read-only access for the entire host also requires host permissions or filesystem access controls; see [Configuration](#-configuration).
|
|
211
212
|
|
|
212
|
-
**My recall model has no structured output.** On 1.x
|
|
213
|
+
**My recall model has no structured output.** On 1.x each selector request asks for structured output first. If the server answers with a `StructuredOutputError`, the plugin retries that request once with the schema described in the prompt and parses the text. Later requests still try structured output: a single failure does not establish that the model lacks support. A model that consistently fails structured output therefore needs two attempts per recall request. Other errors are not retried.
|
|
213
214
|
|
|
214
215
|
**Why did my first answer take a moment longer?** The system prompt waits up to `recall.waitMs` for the selector. Set it to `0` to never wait (recalled memories then appear from the second LLM call of a turn onwards).
|
|
215
216
|
|
package/dist/host/v1/host.js
CHANGED
|
@@ -32,9 +32,6 @@ function isStructuredOutputError(error) {
|
|
|
32
32
|
return error instanceof ForkSessionError && error.message.includes("StructuredOutputError");
|
|
33
33
|
}
|
|
34
34
|
export function createV1Host({ client, directory, toolsFor }) {
|
|
35
|
-
// Cleared by the first StructuredOutputError: from then on this host describes the schema in the
|
|
36
|
-
// prompt and the caller parses the text, as the V2 host always does.
|
|
37
|
-
let structuredOutput = true;
|
|
38
35
|
return {
|
|
39
36
|
async readTranscript(sessionID) {
|
|
40
37
|
const response = await withDeadline("session.messages", SDK_READ_TIMEOUT_MS, (signal) => client.session.messages({ path: { id: sessionID }, query: { directory }, signal }));
|
|
@@ -87,14 +84,15 @@ export function createV1Host({ client, directory, toolsFor }) {
|
|
|
87
84
|
onFinished: input.onFinished,
|
|
88
85
|
onCleanupFailed: input.onCleanupFailed,
|
|
89
86
|
});
|
|
90
|
-
if (
|
|
87
|
+
if (input.schema) {
|
|
91
88
|
try {
|
|
92
89
|
return forkAnswerText(await run(true));
|
|
93
90
|
}
|
|
94
91
|
catch (error) {
|
|
95
92
|
if (!isStructuredOutputError(error))
|
|
96
93
|
throw error;
|
|
97
|
-
|
|
94
|
+
// One failed answer does not establish a model capability. Retry only this request as
|
|
95
|
+
// text, leaving later requests (in this session or another) free to use structured output.
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
98
|
return forkAnswerText(await run(false));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-claude-memory",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Claude Code memory: persistent, local-first shared memory with Claude Code-compatible Markdown files, LLM recall, in-process auto extraction, and auto-dream consolidation",
|
|
6
6
|
"main": "dist/index.js",
|