@remembrance-ai/opencode-plugin 0.2.2 → 0.2.4
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 +64 -6
- package/opencode.json +2 -2
- package/package.json +1 -1
- package/scripts/hook-core.mjs +1405 -396
- package/servers/remembrance-mcp.mjs +798 -176
- package/skills/remembrancer/SKILL.md +13 -0
- package/skills/remembrancer/references/remembrance-setup.md +864 -150
- package/src/index.mjs +74 -29
package/README.md
CHANGED
|
@@ -19,7 +19,9 @@ settings and creates a new config with mode `0600` when none exists.
|
|
|
19
19
|
|
|
20
20
|
Restart opencode. Remembrance then appears in its tools list, adds bounded
|
|
21
21
|
matching guidance to eligible model turns, observes completed use, and silently
|
|
22
|
-
queues any missing feedback or capture action for the next real prompt.
|
|
22
|
+
queues any missing feedback or capture action for the next real prompt. With an
|
|
23
|
+
organization key, finish with
|
|
24
|
+
[Highly Recommended: approve private submissions](#highly-recommended-approve-private-submissions).
|
|
23
25
|
|
|
24
26
|
**Node.js runtime.** The MCP entry that setup writes runs `npx`, so Node.js
|
|
25
27
|
18.17.0 or newer and npm must be on the PATH opencode starts with. A host
|
|
@@ -138,6 +140,47 @@ are used instead, set `REMEMBRANCE_API_KEY_ORIGIN` equal to the exact custom
|
|
|
138
140
|
`REMEMBRANCE_API_URL`. Remote registries require HTTPS; a trusted private or
|
|
139
141
|
link-local self-host also requires `REMEMBRANCE_ALLOW_PRIVATE_REGISTRY=true`.
|
|
140
142
|
|
|
143
|
+
### Highly Recommended: approve private submissions
|
|
144
|
+
|
|
145
|
+
For organizations that use Remembrance with a private organization key, this
|
|
146
|
+
step is required for Remembrance to do its job fully: private lesson and skill
|
|
147
|
+
submissions must run without a manual approval. OpenCode runs MCP tools without
|
|
148
|
+
asking by default, so they already do. The entries below keep it that way
|
|
149
|
+
under a broader ask rule that comes before them, which would otherwise stop
|
|
150
|
+
every private lesson or skill submission for a manual approval. Public-only
|
|
151
|
+
use, without an organization key, does not need it.
|
|
152
|
+
|
|
153
|
+
Add the four private submit and retry tools and the local-only
|
|
154
|
+
`capture_learning` to the `permission` map in
|
|
155
|
+
`~/.config/opencode/opencode.json`. `capture_learning` stays on this machine
|
|
156
|
+
and sends nothing; every local private submission starts with it:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"permission": {
|
|
161
|
+
"remembrance_submit_private_lesson_candidate": "allow",
|
|
162
|
+
"remembrance_retry_private_lesson_candidate": "allow",
|
|
163
|
+
"remembrance_submit_private_skill_candidate": "allow",
|
|
164
|
+
"remembrance_retry_private_skill_candidate": "allow",
|
|
165
|
+
"remembrance_capture_learning": "allow"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Put them after any broader `"*"` or `"remembrance_*"` rule in the same
|
|
171
|
+
`permission` map, because OpenCode applies the last matching rule. A broader ask
|
|
172
|
+
rule set elsewhere, such as in an agent's own `permission` map or, depending on
|
|
173
|
+
the OpenCode version, in another configuration file, can still take precedence;
|
|
174
|
+
if the capture or its submission still prompts, find that rule and make sure the
|
|
175
|
+
same entries come after it. Never allow the `delete_private_*` tools this way.
|
|
176
|
+
In OpenCode 2.x, answering "always" at a prompt saves an allow rule for the
|
|
177
|
+
current project across sessions (1.x keeps it until OpenCode restarts), so never
|
|
178
|
+
answer "always" on a `delete_private_*` prompt; the
|
|
179
|
+
`~/.config/opencode/opencode.json` entries are the form that applies to every
|
|
180
|
+
project. Check the step by behavior: capture one disposable private lesson and
|
|
181
|
+
confirm that neither the capture nor its submission prompts.
|
|
182
|
+
`run_connection_doctor` cannot see a persisted approval.
|
|
183
|
+
|
|
141
184
|
## What the plugin does
|
|
142
185
|
|
|
143
186
|
| Event | Behavior |
|
|
@@ -240,16 +283,31 @@ the same approved action; that telemetry cannot enter verification, review,
|
|
|
240
283
|
topology, or skill materialization. Disable it with
|
|
241
284
|
`REMEMBRANCE_HEALTH_REPORTING=0`.
|
|
242
285
|
|
|
243
|
-
OpenCode permission keys
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
286
|
+
OpenCode permission keys are `remembrance_<tool>`, and OpenCode allows tools
|
|
287
|
+
that no rule covers. The setup command writes no `permission` entries, so every
|
|
288
|
+
visible Remembrance tool, including other writes, runs without asking until you
|
|
289
|
+
add rules. Allow the submit and retry tools for the `private_lesson` and
|
|
290
|
+
`private_skill` lanes as in the Highly Recommended step, and set broader
|
|
291
|
+
Remembrance write tools to `ask` or `deny` when they should stay reviewable.
|
|
292
|
+
Remembrance maps an existing submit approval to its lane. Local capture, inspection, and confirmed deletion remain
|
|
247
293
|
zero-network; a fresh-draft retry stops before network access. Broad `submit_remembrance` and
|
|
248
294
|
`propose_private_skill` are legacy/hosted/raw compatibility routes and are
|
|
249
295
|
unavailable by default locally. `submit_query_feedback` remains independently
|
|
250
296
|
available for one complete good/partial/poor query-fit verdict set;
|
|
251
297
|
`submit_feedback` is categorical post-use feedback. A host denial is held and
|
|
252
|
-
is never retried through another transport
|
|
298
|
+
is never retried through another transport: the denied call's own arguments
|
|
299
|
+
park only that draft, as a decline does. A parked draft returns as a user
|
|
300
|
+
decision 1, 7 and 30 days later (each wait counted from the park or the last
|
|
301
|
+
showing), whether or not the host allows its lane. A client update, and for a
|
|
302
|
+
host-denied draft the host letting that lane through again, makes the next
|
|
303
|
+
return come right away instead (or adds one more, if all three were shown). It
|
|
304
|
+
is sent only through its exact submit or retry action after the user agrees.
|
|
305
|
+
Drafts no active session is handling are offered as a user decision too, until
|
|
306
|
+
the user delivers, keeps or deletes them; a kept draft is parked. These
|
|
307
|
+
decisions go to the next main-session prompt on the machine, at most once a
|
|
308
|
+
day, including unattended runs such as `opencode run`; the drafts stay listed
|
|
309
|
+
by `inspect_private_learning_outbox`, and none is sent or deleted without the
|
|
310
|
+
user.
|
|
253
311
|
|
|
254
312
|
### Routing metadata on complete skill proposals
|
|
255
313
|
|
package/opencode.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"command": [
|
|
7
7
|
"npx",
|
|
8
8
|
"-y",
|
|
9
|
-
"@remembrance-ai/mcp-server@0.2.
|
|
9
|
+
"@remembrance-ai/mcp-server@0.2.4"
|
|
10
10
|
],
|
|
11
11
|
"enabled": true,
|
|
12
12
|
"environment": {
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"plugin": [
|
|
19
|
-
"@remembrance-ai/opencode-plugin@0.2.
|
|
19
|
+
"@remembrance-ai/opencode-plugin@0.2.4"
|
|
20
20
|
]
|
|
21
21
|
}
|
package/package.json
CHANGED