@nandoblanco/opencode-local-memory 1.3.1 → 1.3.2
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/CHANGELOG.md +4 -0
- package/README.md +20 -20
- package/index.js +2 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.2 (2026-11-26)
|
|
4
|
+
|
|
5
|
+
- Updated `installPlugin` (`index.js`) to write only to `opencode.jsonc` using OpenCode V2 object syntax (`{ "package", "options" }`) instead of duplicating entries into `cli.json` or emitting V1 tuple syntax, and standardized `README.md` to lead with `opencode plugin add`.
|
|
6
|
+
|
|
3
7
|
## 1.3.1 (2026-11-26)
|
|
4
8
|
|
|
5
9
|
- Replaced hardcoded workspace/client folder names in `index.js` with generic umbrella directory defaults plus configurable `umbrellaDirs` / `OPENCODE_MEMORY_UMBRELLA_DIRS`.
|
package/README.md
CHANGED
|
@@ -38,31 +38,21 @@ This plugin started as a folder of markdown files and CLI scripts wired together
|
|
|
38
38
|
|
|
39
39
|
## Installation
|
|
40
40
|
|
|
41
|
-
### Option 1:
|
|
41
|
+
### Option 1: OpenCode Plugin CLI (Recommended)
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```sh
|
|
46
|
-
npx @nandoblanco/opencode-local-memory install
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Or specify a custom memory folder:
|
|
50
|
-
|
|
51
|
-
```sh
|
|
52
|
-
npx @nandoblanco/opencode-local-memory install --dir ~/my-memory
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
You can also install directly with OpenCode's native plugin CLI (because `package.json` exports both `.` and `./tui`, OpenCode loads both the server plugin and TUI popup automatically):
|
|
43
|
+
Install with OpenCode's native plugin CLI. OpenCode downloads the package from npm (or GitHub) into its own cache automatically and adds one entry to `~/.config/opencode/opencode.jsonc` that loads the server hooks, agent tools, `/memory` TUI popup, and Desktop panel together (and scaffolds `~/.config/opencode/memory` automatically on first run):
|
|
56
44
|
|
|
57
45
|
```sh
|
|
58
46
|
opencode plugin add @nandoblanco/opencode-local-memory
|
|
59
|
-
#
|
|
47
|
+
# Auto-update on startup and every 24 hours:
|
|
48
|
+
opencode plugin add @nandoblanco/opencode-local-memory@latest
|
|
49
|
+
# Or install directly from GitHub:
|
|
60
50
|
opencode plugin add github:nandoblanco/opencode-local-memory
|
|
61
51
|
```
|
|
62
52
|
|
|
63
53
|
### Option 2: Manual Configuration
|
|
64
54
|
|
|
65
|
-
Add `@nandoblanco/opencode-local-memory` to the global `~/.config/opencode/opencode.jsonc
|
|
55
|
+
Add `@nandoblanco/opencode-local-memory` to `"plugins"` in the global `~/.config/opencode/opencode.jsonc` (or project `./opencode.jsonc` / `./.opencode/opencode.jsonc`). OpenCode fetches the npm package automatically and loads its server, TUI, and Desktop parts from this single entry (no manual `npm install` or separate `cli.json` entry is required):
|
|
66
56
|
|
|
67
57
|
```jsonc
|
|
68
58
|
{
|
|
@@ -80,9 +70,19 @@ Add `@nandoblanco/opencode-local-memory` to the global `~/.config/opencode/openc
|
|
|
80
70
|
}
|
|
81
71
|
```
|
|
82
72
|
|
|
83
|
-
###
|
|
73
|
+
### Option 3: Built-in CLI Helper (`npx`)
|
|
74
|
+
|
|
75
|
+
Run the package CLI once via `npx` to register the plugin in `~/.config/opencode/opencode.jsonc`, scaffold a custom memory folder, optionally import existing `AGENTS.md` / `opencode.db` data, and pre-warm `vectors.json`:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npx @nandoblanco/opencode-local-memory install
|
|
79
|
+
# Or specify a custom memory folder:
|
|
80
|
+
npx @nandoblanco/opencode-local-memory install --dir ~/my-memory
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Option 4: From a Local Directory
|
|
84
84
|
|
|
85
|
-
For development, use Node.js 26.4 or newer to meet the OpenTUI dependency's declared minimum. Clone this repository, run `npm ci` and `npm run build:gui`, then
|
|
85
|
+
For development, use Node.js 26.4 or newer to meet the OpenTUI dependency's declared minimum. Clone this repository, run `npm ci` and `npm run build:gui`, then reference the package directory in `opencode.jsonc` (or place the directory inside `~/.config/opencode/plugins/` or `.opencode/plugins/`). The root `overrides` pin patched `glob` and `minimatch` versions for this repository's development dependencies; they do not alter the OpenCode host application's dependencies:
|
|
86
86
|
|
|
87
87
|
```json
|
|
88
88
|
{
|
|
@@ -295,7 +295,7 @@ Each entry in `topics/<topic>.md` uses a clean, human-editable block format:
|
|
|
295
295
|
## CLI Commands
|
|
296
296
|
|
|
297
297
|
```sh
|
|
298
|
-
#
|
|
298
|
+
# Optional CLI setup: updates opencode.jsonc, scaffolds memory/, and warms vectors.json
|
|
299
299
|
npx @nandoblanco/opencode-local-memory install [--dir /path/to/memory] [--import]
|
|
300
300
|
|
|
301
301
|
# Import existing AGENTS.md/CLAUDE.md rules and compacted session summaries from opencode.db
|
|
@@ -322,7 +322,7 @@ npx @nandoblanco/opencode-local-memory maintain [--dir /path/to/memory] [--prune
|
|
|
322
322
|
|
|
323
323
|
## Configuration Options
|
|
324
324
|
|
|
325
|
-
Options can be passed in `~/.config/opencode/opencode.jsonc`
|
|
325
|
+
Options can be passed in `~/.config/opencode/opencode.jsonc` or via environment variables:
|
|
326
326
|
|
|
327
327
|
```jsonc
|
|
328
328
|
{
|
package/index.js
CHANGED
|
@@ -417,17 +417,12 @@ async function installPlugin(options) {
|
|
|
417
417
|
const serverConfigFile = fs.existsSync(path.join(configDir, cliName + ".json")) && !fs.existsSync(path.join(configDir, cliName + ".jsonc"))
|
|
418
418
|
? path.join(configDir, cliName + ".json")
|
|
419
419
|
: path.join(configDir, cliName + ".jsonc");
|
|
420
|
-
const cliConfigFile = path.join(configDir, "cli.json");
|
|
421
420
|
|
|
422
421
|
const serverEntryStr = opts.directory
|
|
423
|
-
? JSON.stringify(
|
|
424
|
-
: JSON.stringify(pkgName);
|
|
425
|
-
const cliEntryStr = opts.directory
|
|
426
|
-
? JSON.stringify([pkgName, { directory: opts.directory }])
|
|
422
|
+
? JSON.stringify({ package: pkgName, options: { directory: opts.directory } })
|
|
427
423
|
: JSON.stringify(pkgName);
|
|
428
424
|
|
|
429
425
|
const serverStatus = addPluginToJsoncFile(serverConfigFile, "https://" + cliName + ".ai/config.json", serverEntryStr, matchKey);
|
|
430
|
-
const cliStatus = addPluginToJsoncFile(cliConfigFile, "https://" + cliName + ".ai/v2/cli.json", cliEntryStr, matchKey);
|
|
431
426
|
|
|
432
427
|
ensureMemoryLayout(rootDir);
|
|
433
428
|
const importResult = opts.importExisting
|
|
@@ -445,8 +440,6 @@ async function installPlugin(options) {
|
|
|
445
440
|
configDir: configDir,
|
|
446
441
|
serverConfigFile: serverConfigFile,
|
|
447
442
|
serverStatus: serverStatus,
|
|
448
|
-
cliConfigFile: cliConfigFile,
|
|
449
|
-
cliStatus: cliStatus,
|
|
450
443
|
memoryDir: rootDir,
|
|
451
444
|
importResult: importResult,
|
|
452
445
|
syncResult: syncResult
|
|
@@ -2800,8 +2793,7 @@ if (isDirectRun) {
|
|
|
2800
2793
|
limit: customLimit
|
|
2801
2794
|
}).then(function (res) {
|
|
2802
2795
|
console.log("opencode-local-memory installed:");
|
|
2803
|
-
console.log("
|
|
2804
|
-
console.log(" TUI config: " + res.cliConfigFile + " (" + res.cliStatus + ")");
|
|
2796
|
+
console.log(" Config file: " + res.serverConfigFile + " (" + res.serverStatus + ")");
|
|
2805
2797
|
console.log(" Memory folder: " + res.memoryDir);
|
|
2806
2798
|
if (res.importResult) {
|
|
2807
2799
|
console.log(
|