@remembrance-ai/opencode-plugin 0.1.47 → 0.1.48

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.
@@ -11,17 +11,25 @@ You are the entry skill for Remembrance: shared operational memory for agent ski
11
11
 
12
12
  The presence of this filesystem skill does not, by itself, prove that the
13
13
  native plugin is fully active. The first time Remembrance is relevant in a host
14
- session, call `get_connection_status` before relying on plugin automation. A
14
+ session, call `run_connection_doctor` before relying on plugin automation. A
15
15
  healthy native install reports its MCP transport, authenticated scope, and the
16
- observed startup and prompt lifecycle. Tool-observer and completion timestamps
17
- appear after those events become eligible; their absence during the first
18
- prompt is not, by itself, a failure.
19
-
20
- If this skill is visible but `get_connection_status` is absent, explicitly tell
16
+ observed startup and prompt lifecycle after a safe catalog read. Local MCP also reports
17
+ `local_signing_identity` without exposing its subject or private key. A missing
18
+ identity initializes automatically on the first signed contribution; an
19
+ invalid identity requires explicit restore or rotation. Follow the returned
20
+ machine-readable `next_action` rather than asking the user to invent an
21
+ identity. Tool-observer and completion timestamps appear after those events
22
+ become eligible; their absence during the first prompt is not, by itself, a
23
+ failure.
24
+
25
+ If this skill is visible but `run_connection_doctor` is absent, explicitly tell
21
26
  the user that Remembrance is only partially active. Do not silently fall back
22
27
  and do not diagnose the registry as anonymous or unavailable. Update or
23
28
  reinstall the host-specific plugin, verify that its bundled MCP registration is
24
- enabled, fully quit and reopen the host, and check again. Codex, Claude Code,
29
+ enabled, fully quit and reopen the host, and check again. The independent
30
+ `npx @remembrance-ai/mcp-server doctor` command can verify registry/auth access,
31
+ but it cannot prove host MCP registration; rerun `run_connection_doctor` inside
32
+ the host after repair. Codex, Claude Code,
25
33
  Cursor, and OpenClaw local plugin MCP servers read the same shared credential
26
34
  as their hooks from `~/.config/remembrance/config.json`; an intentionally
27
35
  configured hosted HTTP MCP instead needs a credential forwarded on that HTTP
@@ -45,9 +53,12 @@ Use the MCP tool `query_skills` when available, or call the REST endpoint
45
53
  `POST /api/v1/agent/query`. These are equivalent discovery paths.
46
54
 
47
55
  Before diagnosing authentication, call the MCP tool
48
- `get_connection_status` for the transport you will actually use. It reports
56
+ `run_connection_doctor` for the transport you will actually use. It reports
49
57
  the local or hosted transport, the credential source, and the verified registry
50
- scope without returning the key. Never conclude that a plugin is anonymous
58
+ scope after a non-mutating catalog read, with exact bounded remediation and
59
+ without returning the key, absolute local paths, or private registry URLs. Use
60
+ `get_connection_status` only when the underlying fields are needed. Never
61
+ conclude that a plugin is anonymous
51
62
  because `REMEMBRANCE_API_KEY` is unset: native hooks and local/bundled MCP can
52
63
  read `~/.config/remembrance/config.json`. Hosted MCP cannot read a file on the
53
64
  caller's machine and uses only the credential forwarded on its HTTP request.
@@ -356,8 +367,9 @@ When `useful` is `false`, or a positive `lesson` is substantive, the response
356
367
  may include `next_step.submit_remembrance_payload`. Submit that payload with
357
368
  `submit_remembrance` or `POST /api/v1/agent/remembrances` when the lesson should
358
369
  become verified reusable evidence. MCP users can set
359
- `verified_attestation: true` after `bootstrap_agent_identity`; REST-only agents
360
- can sign the payload by following `references/attestation-rest.md`.
370
+ `verified_attestation: true`; local MCP initializes a missing opaque identity
371
+ automatically. REST-only agents can sign the payload by following
372
+ `references/attestation-rest.md`.
361
373
 
362
374
  Always attach evidence to public submissions: concrete reproduction detail in
363
375
  `outcome.failure_modes`, `evidence.artifact_hashes` (sha256 of redacted logs,
@@ -469,10 +481,12 @@ Independent adapters can register lower-trust TOFU keys with a private-key proof
469
481
 
470
482
  POST https://remembrance.dev/api/v1/agent/keys/register
471
483
 
472
- Agents with MCP should prefer `npx @remembrance-ai/mcp-server` and run
473
- `bootstrap_agent_identity` once. REST-only agents should follow the bootstrap
474
- recipe in `references/attestation-rest.md`. Both paths create or reuse a local
475
- key at
484
+ Agents with MCP should prefer `npx @remembrance-ai/mcp-server`. No identity
485
+ argument or separate setup step is required: the first signed contribution
486
+ creates an opaque subject derived from the public-key fingerprint. Call
487
+ `bootstrap_agent_identity` with no arguments only to preflight that capability
488
+ or recover it. REST-only agents should follow the bootstrap recipe in
489
+ `references/attestation-rest.md`. Both paths create or reuse a local key at
476
490
  `REMEMBRANCE_AGENT_KEY_PATH` or `~/.config/remembrance/agent-key.json`, register
477
491
  it as a lower-trust TOFU key, and allow later feedback or remembrances to carry
478
492
  verified TOFU attestations.
@@ -505,9 +519,10 @@ Worked trust decisions:
505
519
  attestation unless `REMEMBRANCE_AGENT_KEY_PATH` overrides it. Back it up like an
506
520
  agent identity secret, and do not commit or share it. If the file is deleted,
507
521
  rerun the REST bootstrap recipe in `references/attestation-rest.md`, or run
508
- `bootstrap_agent_identity` if MCP is available. This creates a new TOFU key and
509
- subject trust history. The old verified-tier history is not recoverable unless
510
- the original key file was backed up. Use an org API key or a future
522
+ `bootstrap_agent_identity` with no arguments if MCP is available. This creates
523
+ a new TOFU key and opaque subject trust history. The old verified-tier history
524
+ is not recoverable unless the original key file was backed up. Use an org API
525
+ key or a future
511
526
  registered-provider key when durable trust continuity matters.
512
527
 
513
528
  ## New skill idea endpoint
@@ -610,7 +625,7 @@ command, and never report it as submitted.
610
625
 
611
626
  For organization skills derived from private repository material:
612
627
 
613
- 1. Submit directly only when `get_connection_status` confirms organization
628
+ 1. Submit directly only when `run_connection_doctor` confirms organization
614
629
  scope and the host permits Remembrance as an approved destination.
615
630
  2. If host policy blocks export, call the local-only
616
631
  `queue_private_skill_import` tool when it is available. It writes a mode-0600
@@ -75,9 +75,9 @@ Populated v2 attestation shape:
75
75
  }
76
76
  ```
77
77
 
78
- For MCP users, `bootstrap_agent_identity` handles key generation, proof signing,
79
- registration, and persistence; `submit_feedback` can then add this object when
80
- `verified_attestation: true` is set.
78
+ For local MCP users, `verified_attestation: true` initializes a missing opaque
79
+ identity automatically, then signs the feedback. `bootstrap_agent_identity`
80
+ remains available as a zero-argument preflight and recovery tool.
81
81
 
82
82
  REST-only agents can follow `attestation-rest.md` for the canonical signing
83
83
  payloads, local key file shape, and dependency-free Node example.
@@ -173,7 +173,7 @@ not discard valid post-use feedback or alter ranking by itself.
173
173
  }
174
174
  },
175
175
  "payload": { "...": "same object, retained as a generic alias" },
176
- "mcp_hint": "MCP users can call submit_remembrance with this payload and verified_attestation: true after bootstrap_agent_identity. REST clients can POST submit_remembrance_payload to /api/v1/agent/remembrances."
176
+ "mcp_hint": "Local MCP users can call submit_remembrance with this payload and verified_attestation: true; a missing opaque signing identity initializes automatically. REST clients can POST submit_remembrance_payload to /api/v1/agent/remembrances."
177
177
  }
178
178
  }
179
179
  ```
@@ -205,9 +205,10 @@ Local identity recovery: the persisted key file
205
205
  `~/.config/remembrance/agent-key.json` is a private key. Back it up like an
206
206
  agent identity secret, and do not commit or share it. If it is deleted, rerun
207
207
  the REST bootstrap recipe in `attestation-rest.md`, or rerun
208
- `bootstrap_agent_identity` when MCP is available. Remembrance will register a
209
- new TOFU key and new subject trust history. The old verified-tier history cannot
210
- be recovered without the original key file. Use an org API key or future
208
+ `bootstrap_agent_identity` with no arguments when MCP is available. Remembrance
209
+ will register a new TOFU key and opaque subject trust history. The old
210
+ verified-tier history cannot be recovered without the original key file. Use
211
+ an org API key or future
211
212
  registered-provider key for durable trust continuity.
212
213
 
213
214
  ## Empty query response
@@ -11,7 +11,7 @@ REST/HTTPS, skill-only installs, enterprise org keys, local identity, and common
11
11
  Cursor, Gemini, or another agent.
12
12
  - The user has an enterprise/org API key and needs to make an agent use
13
13
  org-scoped skills or private overlays.
14
- - MCP tools such as get_connection_status, query_skills, list_skills,
14
+ - MCP tools such as run_connection_doctor, get_connection_status, query_skills, list_skills,
15
15
  invoke_skill, submit_query_feedback, submit_feedback, submit_remembrance,
16
16
  propose_private_skill, queue_private_skill_import, report_task_outcome,
17
17
  get_value_proof, get_skill, get_resource, or bootstrap_agent_identity are
@@ -129,7 +129,7 @@ openclaw remembrance setup
129
129
  If ClawHub search shows multiple Remembrance matches, use the official package
130
130
  that points to "dreamarkinc/remembrance-skills", mentions the Remembrance agent
131
131
  skill/resource service, and exposes the expected Remembrance MCP tools such as
132
- get_connection_status, query_skills, list_skills, invoke_skill,
132
+ run_connection_doctor, get_connection_status, query_skills, list_skills, invoke_skill,
133
133
  submit_query_feedback, submit_remembrance, get_skill, and get_resource, plus
134
134
  report_task_outcome and get_value_proof. Do not install
135
135
  unrelated roots, genealogy, ancestry, or memorial packages.
@@ -190,9 +190,11 @@ chmod 600 ~/.config/remembrance/config.json
190
190
  ~~~
191
191
 
192
192
  Do not infer connection scope by checking one environment variable. After
193
- setup, call MCP `get_connection_status`. It names the active transport,
194
- credential source, verified organization/public scope, and config permission
195
- status without exposing the key. An anonymous curl or browser probe describes
193
+ setup, run MCP `run_connection_doctor`. It performs a non-mutating catalog
194
+ read and names the active transport, credential source, verified
195
+ organization/public scope, and config permission status with one exact
196
+ remediation, without exposing the key, absolute paths, or custom registry URLs.
197
+ Use `get_connection_status` only for the underlying fields. An anonymous curl or browser probe describes
196
198
  only that request, not the plugin. Raw REST clients do not load this file
197
199
  automatically; they must deliberately read it or send a key header.
198
200
 
@@ -203,14 +205,30 @@ export REMEMBRANCE_API_KEY="YOUR_ORG_KEY"
203
205
  export REMEMBRANCE_API_URL="https://remembrance.dev"
204
206
  ~~~
205
207
 
208
+ For a custom registry, bind the key to that exact destination. Store `apiKey`
209
+ and `apiUrl` together in the shared config, or bind environment credentials
210
+ explicitly:
211
+
212
+ ~~~bash
213
+ export REMEMBRANCE_API_KEY="YOUR_ORG_KEY"
214
+ export REMEMBRANCE_API_URL="https://registry.example"
215
+ export REMEMBRANCE_API_KEY_ORIGIN="https://registry.example"
216
+ ~~~
217
+
218
+ Every remote registry requires HTTPS; only loopback development may use HTTP.
219
+ An intentionally trusted private or link-local HTTPS registry also requires
220
+ `REMEMBRANCE_ALLOW_PRIVATE_REGISTRY=true`. If the destination and credential
221
+ binding do not match exactly, Remembrance pauses remote calls instead of
222
+ forwarding the key.
223
+
206
224
  For Codex Desktop, the packaged plugin now runs a bundled local MCP server.
207
225
  The native hooks and MCP process both read the shared file above, so the GUI
208
226
  does not need `launchctl setenv` for the normal plugin path. Fully quit and
209
- reopen Codex after installing or updating the plugin, then call
210
- `get_connection_status`. A healthy install reports `local_stdio_mcp`, the
227
+ reopen Codex after installing or updating the plugin, then run
228
+ `run_connection_doctor`. A healthy install reports `local_stdio_mcp`, the
211
229
  expected organization scope, and an active `plugin_health` lifecycle.
212
230
 
213
- If filesystem skills are visible but `get_connection_status` is absent, or if
231
+ If filesystem skills are visible but `run_connection_doctor` is absent, or if
214
232
  that tool reports missing native hooks, treat the install as partially active.
215
233
  Update or reinstall from the Remembrance marketplace, fully restart Codex, and
216
234
  run the check again. The plugin records only local component timestamps and
@@ -219,6 +237,12 @@ codes for deduplicated global-admin triage. It never submits prompts, keys,
219
237
  paths, or raw logs. Set `REMEMBRANCE_HEALTH_REPORTING=0` to disable that
220
238
  best-effort report.
221
239
 
240
+ If no Remembrance MCP tool is visible, run
241
+ `npx @remembrance-ai/mcp-server doctor`. This safely verifies registry,
242
+ credential, and catalog-read access outside the host, but it deliberately
243
+ reports host registration as unobservable. Update or reinstall the native
244
+ plugin, fully restart the host, then rerun `run_connection_doctor` inside it.
245
+
222
246
  A manually configured hosted MCP URL is still supported, but hosted MCP cannot
223
247
  read the shared file and must receive its own request credential. Only that
224
248
  manual override needs a process environment or HTTP header credential. A Codex
@@ -283,6 +307,7 @@ Add this separately to `managed_config.toml`:
283
307
  enabled = true
284
308
  enabled_tools = [
285
309
  "get_connection_status",
310
+ "run_connection_doctor",
286
311
  "query_skills",
287
312
  "list_skills",
288
313
  "invoke_skill",
@@ -358,9 +383,8 @@ overrides `launchctl` and the config file.
358
383
  For the Claude Code desktop app, prefer the shared mode-0600 config file above.
359
384
  The plugin hooks and bundled local MCP server both read it, so the GUI process
360
385
  does not need to inherit shell exports or duplicate the key in Claude settings.
361
- Fully quit and relaunch Claude Code after changing the file, then call
362
- `get_connection_status` and confirm `shared_config`, `local_stdio_mcp`,
363
- active plugin health, and the expected organization scope.
386
+ Fully quit and relaunch Claude Code after changing the file, then run
387
+ `run_connection_doctor` and require `safe_to_query: true`.
364
388
 
365
389
  For Cursor, prefer the shared config file above. The Cursor plugin-managed MCP
366
390
  server and local hooks read it. If using a non-prod Remembrance endpoint, include
@@ -381,6 +405,7 @@ bounded feedback/outcomes, and organization-private contribution:
381
405
 
382
406
  ~~~text
383
407
  get_connection_status
408
+ run_connection_doctor
384
409
  query_skills
385
410
  list_skills
386
411
  invoke_skill
@@ -446,6 +471,7 @@ Merge this into managed settings:
446
471
  "permissions": {
447
472
  "allow": [
448
473
  "mcp__remembrance__get_connection_status",
474
+ "mcp__remembrance__run_connection_doctor",
449
475
  "mcp__remembrance__query_skills",
450
476
  "mcp__remembrance__list_skills",
451
477
  "mcp__remembrance__invoke_skill",
@@ -473,8 +499,8 @@ The exclusive managed MCP file lives at
473
499
  `/etc/claude-code/managed-mcp.json` on Linux/WSL, and
474
500
  `C:\Program Files\ClaudeCode\managed-mcp.json` on Windows. The sandbox
475
501
  domain applies to command/REST fallbacks; managed HTTP MCP authorization remains
476
- the exact server URL plus named tools. Verify with `claude mcp list`, then call
477
- `get_connection_status` and confirm organization scope before contribution
502
+ the exact server URL plus named tools. Verify with `claude mcp list`, then run
503
+ `run_connection_doctor` and require organization scope before contribution
478
504
  work. See the official
479
505
  [managed MCP](https://code.claude.com/docs/en/managed-mcp),
480
506
  [permissions](https://code.claude.com/docs/en/permissions), and
@@ -500,6 +526,7 @@ narrow server/tool set:
500
526
  },
501
527
  "includeTools": [
502
528
  "get_connection_status",
529
+ "run_connection_doctor",
503
530
  "query_skills",
504
531
  "list_skills",
505
532
  "invoke_skill",
@@ -523,7 +550,7 @@ System settings live at `/Library/Application Support/GeminiCli/settings.json`
523
550
  on macOS, `/etc/gemini-cli/settings.json` on Linux, and
524
551
  `C:\ProgramData\gemini-cli\settings.json` on Windows. Also allow
525
552
  `remembrance.dev` in the organization's egress policy. Restart Gemini CLI,
526
- inspect the registered server, then call `get_connection_status` and confirm
553
+ inspect the registered server, then run `run_connection_doctor` and require
527
554
  organization scope before contribution work. See the official
528
555
  [enterprise configuration](https://google-gemini.github.io/gemini-cli/docs/cli/enterprise.html)
529
556
  and [MCP settings](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html).
@@ -552,6 +579,7 @@ tool profile hides MCP tools, and `tools.deny: ["bundle-mcp"]` disables them:
552
579
  "toolFilter": {
553
580
  "include": [
554
581
  "get_connection_status",
582
+ "run_connection_doctor",
555
583
  "query_skills",
556
584
  "list_skills",
557
585
  "invoke_skill",
@@ -597,8 +625,8 @@ the server's `toolFilter`. Merge this separately into `policy.jsonc`:
597
625
  ~~~
598
626
 
599
627
  Keep the organization key in the plugin's mode-0600 shared config or another
600
- approved secret source, not in `policy.jsonc`. After the probes, call
601
- `get_connection_status` and confirm organization scope. See the official
628
+ approved secret source, not in `policy.jsonc`. After the probes, run
629
+ `run_connection_doctor` and require organization scope. See the official
602
630
  [plugin policy](https://docs.openclaw.ai/tools/plugin),
603
631
  [conversation hook policy](https://docs.openclaw.ai/plugins/hooks),
604
632
  [MCP tool filters](https://docs.openclaw.ai/cli/mcp), and
@@ -616,7 +644,7 @@ based fallback paths.
616
644
  Cursor's current public enterprise documentation does not define a managed
617
645
  per-MCP-tool allowlist equivalent to Codex, Claude Code, Gemini CLI, or
618
646
  OpenClaw. Keep Cursor's normal tool approvals enabled and do not claim an
619
- undocumented control exists. Call `get_connection_status` and confirm
647
+ undocumented control exists. Run `run_connection_doctor` and require
620
648
  organization scope on every enabled surface, then verify query, invocation,
621
649
  feedback, and private-contribution receipts; local plugin hooks and cloud-agent
622
650
  hooks can differ. See the official
@@ -633,8 +661,8 @@ tool list above when the client supports tool filtering. Keep normal approval
633
661
  behavior for non-read-only calls unless unattended organization-private
634
662
  contribution is explicitly approved. A client with no server/tool policy must
635
663
  use its existing destination control or the zero-network handoff. Supply the
636
- organization key through the client's secret/header mechanism, then call
637
- `get_connection_status` and confirm organization scope before private writes.
664
+ organization key through the client's secret/header mechanism, then run
665
+ `run_connection_doctor` and require organization scope before private writes.
638
666
 
639
667
  If any host still denies the export, that denial remains authoritative. The
640
668
  portable local handoff and dashboard import work identically for Codex, Claude
@@ -665,6 +693,16 @@ Local stdio MCP server:
665
693
  npx @remembrance-ai/mcp-server
666
694
  ~~~
667
695
 
696
+ Independent setup check when the host does not expose Remembrance tools:
697
+
698
+ ~~~bash
699
+ npx @remembrance-ai/mcp-server doctor
700
+ ~~~
701
+
702
+ This verifies registry, credential, and catalog-read access without submitting
703
+ content. It cannot prove host MCP registration; after repair, rerun
704
+ `run_connection_doctor` inside the host.
705
+
668
706
  Cursor MCP fallback config (use this only when plugin install is unavailable):
669
707
 
670
708
  ~~~json
@@ -728,16 +766,17 @@ be copied to ".agents/skills/remembrancer/SKILL.md" for compatible providers.
728
766
 
729
767
  1. Start a fresh agent session.
730
768
  2. Check whether Remembrance MCP tools are visible. Expected tools include
731
- get_connection_status, query_skills, list_skills, invoke_skill, get_skill,
769
+ run_connection_doctor, get_connection_status, query_skills, list_skills, invoke_skill, get_skill,
732
770
  get_resource, submit_query_feedback, submit_feedback, submit_remembrance,
733
771
  propose_private_skill, report_task_outcome, get_value_proof, and
734
772
  bootstrap_agent_identity. Local MCP also exposes
735
773
  queue_private_skill_import. Clients
736
774
  with MCP resource discovery should also expose paginated
737
775
  `remembrance://skills/{slug}` handles.
738
- 3. Call get_connection_status and confirm the active transport, credential
739
- source, and expected public/organization scope before inspecting environment
740
- variables or making a raw probe.
776
+ 3. Call run_connection_doctor and require `safe_to_query: true`. Confirm the
777
+ active transport and expected public/organization scope before inspecting
778
+ environment variables or making a raw probe. Follow its exact remediation
779
+ for any warning or failure.
741
780
  4. Ask the agent to query Remembrance for a known task, for example:
742
781
  "Query Remembrance for web UI QA before reviewing a responsive dashboard."
743
782
  5. Follow with a context-only prompt such as "fix these issues". Confirm the
@@ -781,8 +820,10 @@ be copied to ".agents/skills/remembrancer/SKILL.md" for compatible providers.
781
820
  queue_private_skill_import instead, upload its JSON in the dashboard, and
782
821
  verify the agent reports a local queue receipt separately from the server
783
822
  import receipt.
784
- 14. If using local MCP, run bootstrap_agent_identity once when verified TOFU
785
- contributions are needed.
823
+ 14. If using local MCP, verify local_signing_identity in get_connection_status.
824
+ A missing opaque identity initializes automatically on the first signed
825
+ contribution; bootstrap_agent_identity with no arguments is an optional
826
+ preflight or recovery action.
786
827
 
787
828
  ## Troubleshooting matrix
788
829
 
package/src/index.mjs CHANGED
@@ -13,7 +13,7 @@
13
13
  //
14
14
  // SESSION START (event -> session.created): records lifecycle health under the
15
15
  // "opencode" surface and logs the activation notice, so a user can see the
16
- // plugin loaded and knows to call get_connection_status.
16
+ // plugin loaded and knows to call run_connection_doctor.
17
17
  //
18
18
  // PROMPT (chat.message -> experimental.chat.system.transform): queries from
19
19
  // the current user turn, then injects the bounded result into the model's
@@ -268,7 +268,7 @@ export const Remembrance = async (context = {}) => {
268
268
  await notify(
269
269
  client,
270
270
  `Remembrance ${version} is active. Relevant memory is added before eligible turns; ` +
271
- "get_connection_status verifies tools and organization access without exposing the key.",
271
+ "run_connection_doctor verifies the active connection and gives one exact next step without exposing the key.",
272
272
  );
273
273
  } catch (error) {
274
274
  debugLog(env, "opencode_session_created_failed", {