@remembrance-ai/mcp-server 0.2.5 → 0.2.7
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 +90 -20
- package/dist/server.js +1317 -234
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -60,26 +60,51 @@ command is the equivalent inside a running `claude` session.
|
|
|
60
60
|
|
|
61
61
|
Codex plugin install:
|
|
62
62
|
|
|
63
|
+
**Codex CLI.** The Codex plugin needs a Codex CLI: `codex` on your PATH or, on
|
|
64
|
+
macOS, the CLI bundled in the ChatGPT desktop app. The setup, update and
|
|
65
|
+
hook-review commands run the newest one they find, so an older `codex` on PATH
|
|
66
|
+
cannot shadow the app's newer CLI; set `CODEX_CLI` to a CLI's full path to
|
|
67
|
+
choose one yourself. No other host needs the Codex CLI.
|
|
68
|
+
|
|
63
69
|
```bash
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
[ -
|
|
67
|
-
[ -x "$CODEX_CLI" ] || { printf '
|
|
70
|
+
(
|
|
71
|
+
set +eu; unalias codex 2>/dev/null || :; unset -f codex 2>/dev/null || :
|
|
72
|
+
if [ -n "$CODEX_CLI" ]; then
|
|
73
|
+
[ -x "$CODEX_CLI" ] || { printf 'CODEX_CLI is set but is not an executable file: %s\n' "$CODEX_CLI" >&2; exit 1; }
|
|
74
|
+
else
|
|
75
|
+
best=-1
|
|
76
|
+
for c in "$(command -v codex 2>/dev/null)" \
|
|
77
|
+
/Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex \
|
|
78
|
+
/Applications/ChatGPT.app/Contents/Resources/codex \
|
|
79
|
+
/Applications/Codex.app/Contents/Resources/codex; do
|
|
80
|
+
case "$c" in /*) [ -x "$c" ] || continue ;; *) continue ;; esac
|
|
81
|
+
out=$("$c" --version </dev/null 2>/dev/null) || continue
|
|
82
|
+
v=$(printf '%s\n' "$out" | awk 'match($0, /[0-9]+[.][0-9]+[.][0-9]+/) { split(substr($0, RSTART, RLENGTH), n, "."); v = n[1] * 1000000 + n[2] * 1000 + n[3]; exit } END { print v + 0 }')
|
|
83
|
+
[ "$v" -gt "$best" ] && best=$v && CODEX_CLI=$c
|
|
84
|
+
done
|
|
85
|
+
[ -n "$CODEX_CLI" ] || { printf '%s\n' "Codex CLI not found. Install the Codex CLI, or install or update the ChatGPT desktop app on macOS, or set CODEX_CLI to a Codex CLI path, then try again." >&2; exit 1; }
|
|
86
|
+
fi
|
|
87
|
+
printf 'Using Codex CLI: %s\n' "$CODEX_CLI" >&2
|
|
68
88
|
"$CODEX_CLI" plugin marketplace add dreamarkinc/remembrance-skills &&
|
|
69
89
|
"$CODEX_CLI" plugin marketplace upgrade remembrance &&
|
|
70
90
|
"$CODEX_CLI" plugin add remembrance@remembrance &&
|
|
71
91
|
"$CODEX_CLI"
|
|
92
|
+
)
|
|
72
93
|
```
|
|
73
94
|
|
|
74
|
-
The final command opens Codex for secure hook review when Codex
|
|
75
|
-
Codex shows a **Hooks need review** screen, choose **Review
|
|
76
|
-
only the Remembrance `SessionStart`, `UserPromptSubmit`,
|
|
77
|
-
and `SubagentStop` hooks. If no review screen appears,
|
|
78
|
-
reusing an existing valid trust decision. Changed hook
|
|
79
|
-
same review screen again. Fully restart Codex before
|
|
95
|
+
The final command opens the Codex CLI for secure hook review when Codex
|
|
96
|
+
requires it. If Codex shows a **Hooks need review** screen, choose **Review
|
|
97
|
+
hooks** and trust only the Remembrance `SessionStart`, `UserPromptSubmit`,
|
|
98
|
+
`PostToolUse`, `Stop`, and `SubagentStop` hooks. If no review screen appears,
|
|
99
|
+
continue: Codex may be reusing an existing valid trust decision. Changed hook
|
|
100
|
+
definitions show the same review screen again. Fully restart Codex before
|
|
101
|
+
verification.
|
|
80
102
|
|
|
81
|
-
|
|
82
|
-
|
|
103
|
+
The block runs in a subshell, so a failure prints a message and leaves your
|
|
104
|
+
terminal open. It uses `CODEX_CLI` when set; otherwise it runs the newest of
|
|
105
|
+
`codex` on PATH, the ChatGPT desktop app's bundled CLI
|
|
106
|
+
(`/Applications/ChatGPT.app/Contents/Resources/codex-cli/bin/codex`) and the
|
|
107
|
+
older bundle paths, and stops at the first failed step.
|
|
83
108
|
|
|
84
109
|
Cursor plugin install is managed from **Cursor > Customize > Plugins** or a team
|
|
85
110
|
marketplace that imports `packages/cursor-plugin` from the public mirror. The
|
|
@@ -146,6 +171,11 @@ Environment:
|
|
|
146
171
|
degraded-activation issue codes. Local diagnostics remain available.
|
|
147
172
|
- `REMEMBRANCE_CLIENT_UPDATE_CHECK=0`: disables the credential-free public
|
|
148
173
|
release-manifest check. Queries and other MCP tools are unaffected.
|
|
174
|
+
- `REMEMBRANCE_UNATTENDED=1`: read by the native plugin hooks, not by this
|
|
175
|
+
server. Set it, as the host's README describes, in the environment a run no
|
|
176
|
+
person attends starts with: its hooks then show none of the user decisions
|
|
177
|
+
about retained private drafts, so none is used up, and the run still
|
|
178
|
+
captures and delivers its own lessons.
|
|
149
179
|
- `REMEMBRANCE_ENABLE_LEGACY_BROAD_WRITES=1`: local compatibility mode for a
|
|
150
180
|
client that has not adopted `private-learning-capture-v1`. It restores the
|
|
151
181
|
legacy `submit_remembrance`/`propose_private_skill` tools and the optional
|
|
@@ -307,6 +337,11 @@ ask before these tools, every private lesson or skill submission stops for a
|
|
|
307
337
|
manual approval, and unattended or headless runs deny it. Public-only use,
|
|
308
338
|
without an organization key, does not need it.
|
|
309
339
|
|
|
340
|
+
An agent asks you (for managed settings, your administrator) before applying
|
|
341
|
+
this step: it never edits host permission or settings files without your
|
|
342
|
+
consent, and never answers the host's approval prompt for its own pending
|
|
343
|
+
action.
|
|
344
|
+
|
|
310
345
|
Persist host approval for exactly `submit_private_lesson_candidate`,
|
|
311
346
|
`retry_private_lesson_candidate`, `submit_private_skill_candidate`, and
|
|
312
347
|
`retry_private_skill_candidate`. Hosted MCP exposes only
|
|
@@ -349,7 +384,14 @@ decision: with it, Auto-review never sees the lesson content. Per host:
|
|
|
349
384
|
reject the key, and the Gateway then refuses to start until it is removed.
|
|
350
385
|
- Gemini CLI: one `[[rule]]` per tool, including `capture_learning`, in
|
|
351
386
|
`~/.gemini/policies/remembrance.toml` with `mcpName = "remembrance"`,
|
|
352
|
-
`
|
|
387
|
+
`toolName = "<tool>"`, `toolAnnotations = { destructiveHint = false }`,
|
|
388
|
+
`decision = "allow"`, and `priority = 200`, then one more rule for each of
|
|
389
|
+
those tools and both delete tools: `toolName = "mcp_remembrance_<tool>"`, the
|
|
390
|
+
full name, without `mcpName`, with `decision = "ask_user"` and
|
|
391
|
+
`priority = 150`. Those keep the tools running in plan mode over ACP and both
|
|
392
|
+
delete tools asking in every approval mode, YOLO included. Gemini CLI
|
|
393
|
+
(checked against 0.62.0) skips every rule in a file when one rule has no
|
|
394
|
+
`toolName`.
|
|
353
395
|
- Claude Desktop: its per-tool **Always allow** has no config key and users
|
|
354
396
|
report that it resets when the app updates, so do not rely on it for
|
|
355
397
|
unattended runs.
|
|
@@ -721,7 +763,8 @@ is sent only through its exact submit or retry action after the user agrees.
|
|
|
721
763
|
The hooks offer drafts no active session is handling as a user decision too,
|
|
722
764
|
until the user delivers, keeps or deletes them; a kept draft is parked. These
|
|
723
765
|
decisions go to the next main-thread prompt on the machine, at most once a day,
|
|
724
|
-
|
|
766
|
+
unless the run sets `REMEMBRANCE_UNATTENDED=1`; set it for unattended runs,
|
|
767
|
+
whose hooks then neither show nor use up a decision. The drafts stay listed by
|
|
725
768
|
`inspect_private_learning_outbox`, and none is sent or deleted without
|
|
726
769
|
the user. Neither outbox expires or evicts unresolved drafts; reaching its
|
|
727
770
|
64 MiB ceiling pauses capture rather than deleting data. Only the matching
|
|
@@ -799,7 +842,9 @@ receipt, without another queue dispatch. HTTP 202 creation or 200 replay is not
|
|
|
799
842
|
skill acceptance. The original remains undisposed. Keep it open until the
|
|
800
843
|
replacement is accepted and an active, tenant-readable version is independently
|
|
801
844
|
confirmed usable; closing the original still requires a separate explicit
|
|
802
|
-
normal decision.
|
|
845
|
+
normal decision. An accepted repair continues the verified source lesson's
|
|
846
|
+
separately reviewed public-proposal path only where organization policy allows
|
|
847
|
+
it. Preserve every existing safety, consent, protection, denied
|
|
803
848
|
inspection and uncertain-delivery hold. See the agent OpenAPI review-workflow
|
|
804
849
|
schemas for the request and receipt fields.
|
|
805
850
|
|
|
@@ -939,9 +984,10 @@ current instructions. Catalog browsing and handle reads do not count as use.
|
|
|
939
984
|
as feedback; the plugin's completion hook closes that action in the calling
|
|
940
985
|
agent's own pending list when it observes the call. A declined private draft
|
|
941
986
|
stays retained and returns later only as a user decision, at the next
|
|
942
|
-
main-thread prompt on the machine and at most once a day
|
|
943
|
-
|
|
944
|
-
|
|
987
|
+
main-thread prompt on the machine and at most once a day (a run that sets
|
|
988
|
+
`REMEMBRANCE_UNATTENDED=1` neither shows nor uses it up): 1, 7 and 30 days
|
|
989
|
+
later (each wait counted from the decline or the last showing); a client
|
|
990
|
+
update, and for a draft declined with
|
|
945
991
|
`host_policy_denied` the host letting that lane through again, makes the next
|
|
946
992
|
return come right away instead (or adds one more, if all three were shown).
|
|
947
993
|
- `get_pending_action_payload`: local-only retrieval of the exact payload a
|
|
@@ -1010,8 +1056,24 @@ current instructions. Catalog browsing and handle reads do not count as use.
|
|
|
1010
1056
|
retained for explicit compatibility flows. Current local clients call it
|
|
1011
1057
|
through `capture_learning`, not as a competing routine entry point. It
|
|
1012
1058
|
canonicalizes, redacts, validates, encrypts, and queues the post-redaction
|
|
1013
|
-
record without a network request.
|
|
1014
|
-
`
|
|
1059
|
+
record without a network request. Each unsafe match becomes its
|
|
1060
|
+
`[redacted:category]` marker and a malformed or privacy-sensitive tag is
|
|
1061
|
+
dropped and counted; only a stack trace or zero-width or bidirectional
|
|
1062
|
+
control characters keep the draft in `held_safety` instead of being sent.
|
|
1063
|
+
A held lesson also returns content-free `findings` (field, category, rule,
|
|
1064
|
+
occurrence count, approximate offset and length, never its text) and an
|
|
1065
|
+
`agent_recovery` action: `capture_learning` with
|
|
1066
|
+
`replacement_of: {draft_id}` stores a version written without what the
|
|
1067
|
+
findings name as its own draft, bound to the held draft's destination; a
|
|
1068
|
+
new version written under another API base or credential is refused, so
|
|
1069
|
+
capture it without `replacement_of`, and that session's results mark the
|
|
1070
|
+
held draft `replacement_requires_captured_destination: true` instead of
|
|
1071
|
+
offering `agent_recovery`. The held draft is never sent; it becomes a
|
|
1072
|
+
content-free replaced record only after that version's private receipt is
|
|
1073
|
+
verified, and a failed or denied submission keeps both. Each held draft
|
|
1074
|
+
accepts at most three versions, held
|
|
1075
|
+
ones included, and one retained replacement at a time; an exact replay
|
|
1076
|
+
returns the same replacement, and a refusal stores and sends nothing.
|
|
1015
1077
|
- `submit_private_lesson_candidate`: submit one exact canonical queued draft to
|
|
1016
1078
|
the authenticated organization's private verifier queue, or send one
|
|
1017
1079
|
content-free `held_safety_event` through the same approved action. It verifies
|
|
@@ -1024,6 +1086,14 @@ current instructions. Catalog browsing and handle reads do not count as use.
|
|
|
1024
1086
|
public pipeline. Hold telemetry contains only category counts and protocol
|
|
1025
1087
|
metadata, never lesson content, and cannot enter verification, review,
|
|
1026
1088
|
topology, or skill materialization.
|
|
1089
|
+
- `retry_private_lesson_candidate`: retry one retained lesson draft through the
|
|
1090
|
+
same approval lane when its state allows a retry. A draft an earlier client
|
|
1091
|
+
held for a reason the current safety check no longer holds is re-checked
|
|
1092
|
+
locally and marked `safety_recheck: passes_current_rule`; it is sent only
|
|
1093
|
+
when the user chooses delivery and the retry passes
|
|
1094
|
+
`deliver_rechecked_hold: true`, with its stored bytes, payload digest and
|
|
1095
|
+
idempotency key under the current profile. A draft the current check still
|
|
1096
|
+
holds is refused locally with `private_lesson_hold_not_released`.
|
|
1027
1097
|
- `submit_private_skill_candidate`: submit exactly one complete-skill draft ID
|
|
1028
1098
|
returned by `capture_learning.private_skill`. The local MCP sends the
|
|
1029
1099
|
encrypted draft to the existing authenticated private skill idea,
|