@remembrance-ai/opencode-plugin 0.1.64 → 0.1.71
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 +32 -2
- package/opencode.json +2 -2
- package/package.json +2 -1
- package/scripts/hook-core.mjs +680 -137
- package/servers/remembrance-mcp.mjs +2960 -70
- package/skills/remembrancer/SKILL.md +71 -2
- package/skills/remembrancer/references/identity-preferences-topology.md +4 -1
- package/skills/remembrancer/references/remembrance-setup.md +72 -0
|
@@ -138,12 +138,81 @@ Do not use this skill when:
|
|
|
138
138
|
failed.
|
|
139
139
|
6. Use the selected skill or resource. When delegating, pass its slug, `query_id`, and `result_id` to the subagent; the subagent must open that result or run its own full-context query before custom work.
|
|
140
140
|
7. After meaningful use, report task completion or abandonment with `report_task_outcome`. Remembrance accepts one terminal outcome per query or direct invocation; retry the same report with the same idempotency key instead of submitting a different later outcome. Use only result IDs from `task_outcome.eligible_result_ids`. Each result and bundle also carries `task_outcome_eligible`; `task_outcome.available` is true only when at least one result is eligible. One result ID attributes the outcome to that result. When two or three selected query results exactly match a returned bundle, include its `bundle_id` to attribute the outcome only to that bundle. Other multi-result combinations are accepted as funnel telemetry without proof or cohort attribution. Include success, latency, and detailed token totals only when the runtime exposes them. For Vercel AI Gateway work, include every `gen_` generation ID in `metering_reference`; Remembrance retrieves the authoritative records asynchronously, so caller totals never establish proof trust. Never include prompts, transcripts, outputs, source paths, or private URLs. Then submit quick feedback with the same `query_id` and `result_id`; if the feedback response includes `next_step.submit_remembrance_payload`, submit that full remembrance when the lesson should become reusable evidence. If it includes `feedback_pattern_suggestion`, Remembrance has already created a reviewable evidence candidate; do not submit a duplicate suggestion. Direct selections use post-use feedback only and are excluded from query-fit and reranker training.
|
|
141
|
-
8. Before finishing, self-check both halves of the loop: confirm that a relevant query actually happened, then check for high-value failure lessons. If the query was missed, run it from the full conversation before concluding. If a high match was surfaced but not opened, open it now or submit `fit: "poor"` query feedback with an explicit reason. If you caught your own mistake, the user caught one, CI/deploy failed, a security issue surfaced, or you fixed a release/versioning miss,
|
|
141
|
+
8. Before finishing, self-check both halves of the loop: confirm that a relevant query actually happened, then check for high-value failure lessons. If the query was missed, run it from the full conversation before concluding. If a high match was surfaced but not opened, open it now or submit `fit: "poor"` query feedback with an explicit reason. If you caught your own mistake, the user caught one, CI/deploy failed, a security issue surfaced, or you fixed a release/versioning miss, capture the reusable lesson. With an authenticated organization and the private lesson tools available, use the two-stage private lesson lane described below for a compact evidence lesson instead of a broad `failure_report` remembrance. This lane is not a replacement for a complete skill proposal. Native plugins do this silently at completion after exact-action approval. Use `submit_remembrance` only when the narrow contract cannot represent the lesson and the host has approved the richer payload. Raw MCP, REST, and skill-only installs must perform the same check proactively.
|
|
142
142
|
9. If no suitable skill exists and the query response includes `no_results.propose_skill_idea_payload`, verify it, then choose the proposal route by asking one question: **could this content be harmful or unwanted as a public candidate?** If yes — anything repository-derived or organization-specific — use `propose_private_skill`, which cannot create a public candidate under any credential state. Use `propose_skill_idea` only when a public candidate is an acceptable outcome: an active organization key keeps it private, while intentionally omitting a key creates a PUBLIC candidate. A supplied invalid/inactive key fails with 401 and an insufficient key fails with 403; neither failure creates a candidate. Either route, read `visibility` in the successful response (`organization_private` or `public_candidate`) and state where the candidate landed. Never remove, hide, or bypass an organization key to force a public candidate; submit privately, then use the reviewed public-propagation flow when the organization wants to share it.
|
|
143
143
|
10. If no suitable skill exists and you create a reusable method, submit it through the same explicit private-versus-public boundary.
|
|
144
144
|
11. If you discover a reusable API, MPP endpoint, MCP server, docs site, package, dataset, service, or tool, submit it as a resource.
|
|
145
145
|
12. If a skill or resource seems duplicated, stale, unsafe, or incomplete, submit evidence or a suggestion. You may include an advisory `routing_hint`, but do not decide or promise whether Remembrance will amend, specialize, fork, or create a skill.
|
|
146
146
|
|
|
147
|
+
## Organization-private lesson autopilot
|
|
148
|
+
|
|
149
|
+
For an authenticated organization, routine failures, corrections, and reusable
|
|
150
|
+
workflow lessons use a narrow two-stage path:
|
|
151
|
+
|
|
152
|
+
This is a compact evidence lane, not a finished-skill transport. When the agent
|
|
153
|
+
has built a complete reusable procedure, playbook, or actionable set of
|
|
154
|
+
instructions, use `propose_private_skill` or `propose_skill_idea` instead. Those
|
|
155
|
+
full skill routes preserve bounded markdown, public citations, snippets,
|
|
156
|
+
metadata, and instructional detail through the normal safety and review
|
|
157
|
+
pipeline. Never shorten a finished skill merely to fit the private-lesson
|
|
158
|
+
contract.
|
|
159
|
+
|
|
160
|
+
1. Call `prepare_private_lesson_candidate` locally. Give it only a generalized
|
|
161
|
+
lesson, stable conditions, bounded tags, pseudonymous correlation IDs, and
|
|
162
|
+
SHA-256 evidence hashes. The tool canonicalizes and redacts the candidate in
|
|
163
|
+
memory, encrypts the safe canonical record in the local outbox, and returns a
|
|
164
|
+
draft ID. Tags use an open, bounded lowercase slug vocabulary, so retain
|
|
165
|
+
useful technical terms rather than forcing them into a fixed list. A
|
|
166
|
+
malformed or privacy-sensitive tag holds the draft explicitly; it is never
|
|
167
|
+
dropped silently. Pre-redaction content is never written to disk.
|
|
168
|
+
2. When preparation returns a `next_action`, call
|
|
169
|
+
`submit_private_lesson_candidate` with that draft ID. Preparation is strictly
|
|
170
|
+
local; this is the one host-visible network action. The local MCP obtains the
|
|
171
|
+
signed organization policy and purpose-bound attestation, then sends the
|
|
172
|
+
exact canonical bytes. If the host asks, authorize only this named action.
|
|
173
|
+
|
|
174
|
+
Successful receipts and routine hook narration stay silent. A host denial means
|
|
175
|
+
nothing was sent and the encrypted draft remains local in
|
|
176
|
+
`awaiting_authorization`; do not retry it through REST or another transport.
|
|
177
|
+
Transient timeouts, 429s, and 5xx responses remain queued for bounded retry on a
|
|
178
|
+
later lifecycle. Authentication, policy, or validation failures remain held.
|
|
179
|
+
Queued lessons never expire or auto-delete; deleting one requires an explicit
|
|
180
|
+
confirmed local action.
|
|
181
|
+
|
|
182
|
+
The signed policy pins `private-lesson-redaction-v2` and the exact digest of its
|
|
183
|
+
current rules. An unsupported version or digest moves the encrypted draft to
|
|
184
|
+
terminal `superseded_redactor`. Terminal drafts are never retried, re-redacted,
|
|
185
|
+
expired, or automatically deleted; they still count toward the 64 MiB safety
|
|
186
|
+
ceiling. `inspect_private_lesson_outbox` and `run_connection_doctor` report the
|
|
187
|
+
terminal count, retained bytes, reason, and explicit deletion guidance without
|
|
188
|
+
returning draft content or a local path.
|
|
189
|
+
|
|
190
|
+
The private lesson endpoint derives its organization and private visibility
|
|
191
|
+
from the authenticated key. It cannot create public content and never falls
|
|
192
|
+
back to public submission. Accepted candidates enter the existing verifier,
|
|
193
|
+
topology, review-policy, encrypted-storage, and audit pipelines. Rich content,
|
|
194
|
+
raw traces, URLs, code blocks, attachments, secrets, paths, identifiers, or
|
|
195
|
+
ambiguous material stays local and must not be forced through by confirmation.
|
|
196
|
+
Use `inspect_private_lesson_outbox` to inspect content-free state, retry a
|
|
197
|
+
selected draft with `retry_private_lesson_candidate`, and delete only with
|
|
198
|
+
`delete_private_lesson_candidate` plus explicit confirmation.
|
|
199
|
+
|
|
200
|
+
When health reporting is enabled, a held draft may use the same exact submit
|
|
201
|
+
action to send only a `held_safety_event`: event type, held category counts,
|
|
202
|
+
contract/redactor profile, event and policy digests, idempotency, and a
|
|
203
|
+
challenge-bound attestation. It never sends lesson prose, conditions, tags,
|
|
204
|
+
correlation IDs, evidence hashes, candidate digest, paths, or draft content.
|
|
205
|
+
The signed hold receipt is verified locally. Hold telemetry cannot enter
|
|
206
|
+
verification, review, topology, public propagation, or private-skill
|
|
207
|
+
materialization. `REMEMBRANCE_HEALTH_REPORTING=0` disables this optional report
|
|
208
|
+
without affecting querying or retained drafts; the organization kill switch
|
|
209
|
+
disables the whole private-lesson lane.
|
|
210
|
+
|
|
211
|
+
Hosted-only MCP and raw REST clients cannot guarantee durable local retention.
|
|
212
|
+
They receive `auto_capture_supported: false` and must locally canonicalize and
|
|
213
|
+
retain the draft before making the explicit private-lesson request. See
|
|
214
|
+
`references/remembrance-setup.md` for exact host approval and policy setup.
|
|
215
|
+
|
|
147
216
|
## Token savings and value proof
|
|
148
217
|
|
|
149
218
|
`estimated_tokens` is the approximate size of the returned skill context. It is
|
|
@@ -475,7 +544,7 @@ Idempotency-Key: <stable sha256 hash of the canonical request body>
|
|
|
475
544
|
|
|
476
545
|
Use the same key for the same logical submission. Mutation routes include
|
|
477
546
|
`/api/v1/agent/query-feedback`, `/api/v1/agent/feedback`,
|
|
478
|
-
`/api/v1/agent/remembrances`,
|
|
547
|
+
`/api/v1/agent/remembrances`, `/api/v1/agent/private-lessons`,
|
|
479
548
|
`/api/v1/agent/skill-ideas`, `/api/v1/agent/suggestions`, `/api/v1/resources`,
|
|
480
549
|
`/api/v1/resources/reviews`, `/api/v1/resources/verify`, and
|
|
481
550
|
`/api/v1/verify`.
|
|
@@ -141,7 +141,10 @@ source, and server-issued preference fingerprint from that result's feedback
|
|
|
141
141
|
offer. The server derives the evidence identity and rejects expired,
|
|
142
142
|
unfetched, cross-principal, stale-version, or unoffered claims.
|
|
143
143
|
|
|
144
|
-
- An explicit
|
|
144
|
+
- An explicit instruction applies to the current task immediately. Known
|
|
145
|
+
built-ins activate durably without background work. A custom setting remains
|
|
146
|
+
pending until automatic normalization and validation approves it; unsafe,
|
|
147
|
+
malformed, or uncertain custom behavior stays inactive and is never replayed.
|
|
145
148
|
- Inferred member or installation values require at least three consistent
|
|
146
149
|
observations across two tasks and two days with confidence at least `0.85`.
|
|
147
150
|
- A learned member + runtime residual requires four observations across three
|
|
@@ -267,6 +267,68 @@ manual override needs a process environment or HTTP header credential. A Codex
|
|
|
267
267
|
tenant/privacy-policy denial is enforced by Codex before the request reaches
|
|
268
268
|
Remembrance; do not classify it as a Remembrance rejection.
|
|
269
269
|
|
|
270
|
+
### Organization-private lesson autopilot
|
|
271
|
+
|
|
272
|
+
Routine organization lessons use one narrow, reviewable write instead of a
|
|
273
|
+
broad remembrance payload. The local plugin first calls
|
|
274
|
+
`prepare_private_lesson_candidate`. That tool generalizes, canonicalizes, and
|
|
275
|
+
redacts a failure, correction, or reusable workflow lesson in memory; encrypts
|
|
276
|
+
only the canonical safe record in a local outbox; and returns a draft ID. It
|
|
277
|
+
never writes the original input to disk, logs, telemetry, or error output. Tags
|
|
278
|
+
use an open, bounded lowercase slug vocabulary; new technical terms survive,
|
|
279
|
+
while malformed or privacy-sensitive tags hold the draft instead of being
|
|
280
|
+
silently removed.
|
|
281
|
+
|
|
282
|
+
The plugin then calls `submit_private_lesson_candidate` with that draft ID.
|
|
283
|
+
This is the only host-visible network action in the flow. Approve or persist
|
|
284
|
+
approval for this exact action, not every Remembrance write. The server derives
|
|
285
|
+
the organization and private visibility from the authenticated key, verifies a
|
|
286
|
+
signed organization policy plus purpose-bound attestation, and returns a signed
|
|
287
|
+
content-free receipt. The endpoint can never create or automatically propagate
|
|
288
|
+
public content.
|
|
289
|
+
|
|
290
|
+
If the host denies the action, no candidate content was sent. The encrypted
|
|
291
|
+
draft remains on the device in `awaiting_authorization`; do not retry it
|
|
292
|
+
through REST, hosted MCP, or another transport. Timeouts, 429s, and 5xx
|
|
293
|
+
responses retry with bounded backoff during later plugin lifecycles. A 401,
|
|
294
|
+
403, policy change, or validation failure remains held for explicit repair.
|
|
295
|
+
Drafts never expire or auto-delete. Inspect, retry, or explicitly delete one
|
|
296
|
+
with the local private-lesson tools; deletion requires confirmation.
|
|
297
|
+
|
|
298
|
+
The signed organization policy pins `private-lesson-redaction-v2` and its exact
|
|
299
|
+
supported redactor digest. If either is unsupported, the finalized
|
|
300
|
+
`private-lesson-outbox-v1` record moves to terminal `superseded_redactor`.
|
|
301
|
+
Terminal drafts are never retried, re-redacted, expired, or automatically
|
|
302
|
+
deleted, and they continue to count toward the 64 MiB outbox ceiling. Outbox
|
|
303
|
+
inspection and the connection doctor report terminal count, retained bytes,
|
|
304
|
+
reason, and explicit deletion guidance without returning lesson content or a
|
|
305
|
+
local path.
|
|
306
|
+
|
|
307
|
+
When health reporting is enabled, a held draft may submit a content-free
|
|
308
|
+
`held_safety_event` through the same exact action. It contains only the event
|
|
309
|
+
type, held category counts, contract/redactor profile, event and policy
|
|
310
|
+
digests, idempotency key, and a purpose-bound attestation. It never contains
|
|
311
|
+
lesson prose, conditions, tags, correlations, evidence hashes, a candidate
|
|
312
|
+
digest, paths, or draft content. Hold telemetry cannot enter verification,
|
|
313
|
+
review, topology, propagation, or skill materialization. Set
|
|
314
|
+
`REMEMBRANCE_HEALTH_REPORTING=0` to disable this optional report without
|
|
315
|
+
affecting queries or retained drafts; the organization kill switch disables
|
|
316
|
+
the entire private-lesson lane.
|
|
317
|
+
|
|
318
|
+
Structured metadata and bounded redacted prose are enabled by default for an
|
|
319
|
+
authenticated organization. Raw traces, code blocks, URLs, attachments,
|
|
320
|
+
secrets, paths, identifiers, screenshots, encoded/high-entropy content, and
|
|
321
|
+
ambiguous material remain local. Rich content cannot be sent merely because a
|
|
322
|
+
user confirms it; first generalize it into the safe schema. Organization admins
|
|
323
|
+
can pause the lane or select metadata-only capture under **Dashboard > Settings
|
|
324
|
+
> Private lesson automation**.
|
|
325
|
+
|
|
326
|
+
Hosted-only MCP and REST clients report `auto_capture_supported: false`
|
|
327
|
+
because they cannot guarantee durable local retention. They must implement the
|
|
328
|
+
same two-stage boundary locally: canonicalize and durably retain the safe draft,
|
|
329
|
+
then invoke only `POST /api/v1/agent/private-lessons`. Querying and the main
|
|
330
|
+
agent task remain available when capture or submission is blocked.
|
|
331
|
+
|
|
270
332
|
### Approve private repository contributions in managed Codex
|
|
271
333
|
|
|
272
334
|
An API key authorizes Remembrance; it does not authorize Codex to export
|
|
@@ -330,6 +392,7 @@ enabled_tools = [
|
|
|
330
392
|
"list_skills",
|
|
331
393
|
"invoke_skill",
|
|
332
394
|
"get_effective_preferences",
|
|
395
|
+
"get_private_lesson_policy",
|
|
333
396
|
"get_skill",
|
|
334
397
|
"get_resource",
|
|
335
398
|
"get_value_proof",
|
|
@@ -342,6 +405,7 @@ enabled_tools = [
|
|
|
342
405
|
"submit_suggestion",
|
|
343
406
|
"record_preference",
|
|
344
407
|
"link_current_installation",
|
|
408
|
+
"submit_private_lesson_candidate",
|
|
345
409
|
]
|
|
346
410
|
default_tools_approval_mode = "writes"
|
|
347
411
|
~~~
|
|
@@ -435,6 +499,7 @@ query_skills
|
|
|
435
499
|
list_skills
|
|
436
500
|
invoke_skill
|
|
437
501
|
get_effective_preferences
|
|
502
|
+
get_private_lesson_policy
|
|
438
503
|
get_skill
|
|
439
504
|
get_resource
|
|
440
505
|
get_value_proof
|
|
@@ -447,6 +512,7 @@ propose_private_skill
|
|
|
447
512
|
submit_suggestion
|
|
448
513
|
record_preference
|
|
449
514
|
link_current_installation
|
|
515
|
+
submit_private_lesson_candidate
|
|
450
516
|
~~~
|
|
451
517
|
|
|
452
518
|
It intentionally omits `propose_skill_idea`, `submit_resource`,
|
|
@@ -505,6 +571,7 @@ Merge this into managed settings:
|
|
|
505
571
|
"mcp__remembrance__list_skills",
|
|
506
572
|
"mcp__remembrance__invoke_skill",
|
|
507
573
|
"mcp__remembrance__get_effective_preferences",
|
|
574
|
+
"mcp__remembrance__get_private_lesson_policy",
|
|
508
575
|
"mcp__remembrance__get_skill",
|
|
509
576
|
"mcp__remembrance__get_resource",
|
|
510
577
|
"mcp__remembrance__get_value_proof",
|
|
@@ -517,6 +584,7 @@ Merge this into managed settings:
|
|
|
517
584
|
"mcp__remembrance__submit_suggestion",
|
|
518
585
|
"mcp__remembrance__record_preference",
|
|
519
586
|
"mcp__remembrance__link_current_installation",
|
|
587
|
+
"mcp__remembrance__submit_private_lesson_candidate",
|
|
520
588
|
]
|
|
521
589
|
},
|
|
522
590
|
"sandbox": {
|
|
@@ -564,6 +632,7 @@ narrow server/tool set:
|
|
|
564
632
|
"list_skills",
|
|
565
633
|
"invoke_skill",
|
|
566
634
|
"get_effective_preferences",
|
|
635
|
+
"get_private_lesson_policy",
|
|
567
636
|
"get_skill",
|
|
568
637
|
"get_resource",
|
|
569
638
|
"get_value_proof",
|
|
@@ -576,6 +645,7 @@ narrow server/tool set:
|
|
|
576
645
|
"submit_suggestion",
|
|
577
646
|
"record_preference",
|
|
578
647
|
"link_current_installation",
|
|
648
|
+
"submit_private_lesson_candidate",
|
|
579
649
|
],
|
|
580
650
|
"trust": false
|
|
581
651
|
}
|
|
@@ -621,6 +691,7 @@ tool profile hides MCP tools, and `tools.deny: ["bundle-mcp"]` disables them:
|
|
|
621
691
|
"list_skills",
|
|
622
692
|
"invoke_skill",
|
|
623
693
|
"get_effective_preferences",
|
|
694
|
+
"get_private_lesson_policy",
|
|
624
695
|
"get_skill",
|
|
625
696
|
"get_resource",
|
|
626
697
|
"get_value_proof",
|
|
@@ -633,6 +704,7 @@ tool profile hides MCP tools, and `tools.deny: ["bundle-mcp"]` disables them:
|
|
|
633
704
|
"submit_suggestion",
|
|
634
705
|
"record_preference",
|
|
635
706
|
"link_current_installation",
|
|
707
|
+
"submit_private_lesson_candidate",
|
|
636
708
|
]
|
|
637
709
|
}
|
|
638
710
|
}
|