@remembrance-ai/mcp-server 0.2.18 → 0.2.20

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 CHANGED
@@ -95,10 +95,10 @@ printf 'Using Codex CLI: %s\n' "$CODEX_CLI" >&2
95
95
  The final command opens the Codex CLI for secure hook review when Codex
96
96
  requires it. If Codex shows a **Hooks need review** screen, choose **Review
97
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.
98
+ `PostToolUse`, `Stop`, `SubagentStart`, and `SubagentStop` hooks. If no review
99
+ screen appears, continue: Codex may be reusing an existing valid trust
100
+ decision. Changed hook definitions show the same review screen again. Fully
101
+ restart Codex before verification.
102
102
 
103
103
  The block runs in a subshell, so a failure prints a message and leaves your
104
104
  terminal open. It uses `CODEX_CLI` when set; otherwise it runs the newest of
@@ -425,13 +425,15 @@ minutes. Linking lets preferences follow that member across installations and
425
425
  runtimes. Without a link, Remembrance still works and keeps preferences at the
426
426
  installation level.
427
427
 
428
- Query and invocation responses may include `effective_preferences`,
428
+ Query and invocation results carry the caller's preferences as a text snapshot
429
+ (below); the REST responses behind them also include `effective_preferences`,
429
430
  `preference_definition_version`, and a bounded
430
431
  `preference_application`. Comment density/focus, explanation depth, and output
431
432
  organization are built-ins, not a closed vocabulary. A custom setting carries
432
433
  a stable key/value, label, normalized behavior, presentation/workflow/strategy
433
434
  effect, prefer/avoid direction, and definition version. Required organization
434
- guidance and locked skill requirements always win. Safety, authorization,
435
+ guidance always wins, and a skill sets a preference aside only for a confirmed
436
+ locked conflict (below). Safety, authorization,
435
437
  privacy, applicability, required skill steps, validation, and review are never
436
438
  preferences. Explicit corrections apply immediately; inferred values
437
439
  activate only after the server's consistency/confidence gates and expire after
@@ -460,8 +462,46 @@ and is never replayed to an agent.
460
462
  An organization using customer-held encryption is currently deferred: every substantive preference write and every compatibility-feedback call is refused before persistence with HTTP 422 and code `customer_held_preference_processing_deferred`. Existing records are unchanged, reads and the content-free withdrawal lane keep working, and responses withhold the compatibility-feedback offer there. Read `activated` and `normalized_activation_state` in the
461
463
  response instead of assuming a setting is live.
462
464
 
463
- `get_effective_preferences` also returns a `personalization` block that says
464
- which stored-preference scopes were read. `available: true` with
465
+ MCP results carry preferences as a text snapshot, not JSON entries:
466
+ `query_skills` puts the snapshot of its context in `preferences`, directly
467
+ after `skill_access`, and `invoke_skill` puts the skill context's snapshot
468
+ after `scope`. Each result adds `skill_notes` (preferences set aside only while
469
+ that skill is followed, preferences scoped to that skill, notes that are not
470
+ blocks, and replaced skill defaults) and, when it has one, a
471
+ `preference_compatibility_feedback` offer. `get_effective_preferences` returns
472
+ `{preferences, keys}`, plus `fingerprints` with `include_fingerprints: true`.
473
+ The header reads `Remembrance preferences (profile <digest>, context <id>;
474
+ complete)` or names after `incomplete:` the reason, what is missing and the
475
+ exact recovery call. A large profile arrives in pages: page 1 opens with
476
+ "Before any other action, call get_effective_preferences with page_token <t>
477
+ until complete." (or "... for the remaining pages." when the header says no
478
+ recovery call exists; the last page then stays incomplete and needs no
479
+ further call), and the call takes that `page_token`, with the same `keys`
480
+ and `task_preferences` when the status asks for them, until the header says
481
+ complete. A host that does not inject the snapshot on every prompt holds a
482
+ fresh, complete snapshot before governed work in each new request: the
483
+ snapshot in that request's `query_skills` or `invoke_skill` response counts,
484
+ and so does one whose header says no recovery call exists; otherwise call
485
+ `get_effective_preferences` without a skill search. A change made while a
486
+ request runs applies from the next request. Send `known_digest` to
487
+ `query_skills` or `get_effective_preferences` (never `invoke_skill`) only when
488
+ the conversation holds the complete snapshot for that
489
+ exact context with that digest, every page included, with no summary or
490
+ context reset since, and never for an incomplete, stale or cached copy; an
491
+ unchanged profile then returns one short line. The local server adds its
492
+ project key to `get_effective_preferences` as it does to `query_skills`, except
493
+ on OpenClaw and Cursor, where it adds none unless `REMEMBRANCE_PROJECT_PATH` or
494
+ `REMEMBRANCE_PROJECT_KEY` is set; a value that still contains an unexpanded
495
+ `${...}` placeholder counts as unset. Cursor starts a plugin's server in the
496
+ home folder, so a read there without a project key says the project part was
497
+ not read and names no recovery call; the Cursor hooks deliver project
498
+ preferences. A continuation of a page token whose context names a project,
499
+ such as the Cursor hooks' own, reads that project and says nothing of the
500
+ kind.
501
+
502
+ The REST effective route also returns a `personalization` block that says
503
+ which stored-preference scopes were read, and a `completeness` block with the
504
+ counts behind the snapshot's status. `available: true` with
465
505
  `reason_code: "resolved"` means every scope applying to this caller was read, so
466
506
  an empty `effective_preferences` list is a real empty profile, and
467
507
  `resolved_scopes` names them. `available: false` names what was not read:
@@ -485,24 +525,32 @@ affected organizations, and blocked scopes resume automatically when eligible.
485
525
  After selection,
486
526
  the application object may surgically alter discretionary presentation,
487
527
  workflow, or strategy choices and explicitly reports replaced defaults or
488
- blocked conflicts. Organization admins choose Required or Recommended guidance
489
- under Dashboard > Agents > Preferences.
528
+ blocked conflicts. A skill sets an ordinary preference aside only for a locked
529
+ conflict confirmed by the organization, declared in the skill's reviewed
530
+ metadata, or corroborated by verified members of the organization, and only
531
+ while that skill is followed; the preference keeps applying to all other work.
532
+ A conflict that only a model check suggests is a note, not a block, so the
533
+ preference still applies. Required organization settings are never set aside:
534
+ a confirmed locked conflict with one makes the skill ineligible, so queries
535
+ exclude it and direct invocation answers HTTP 409. Organization admins choose
536
+ Required or Recommended guidance under Dashboard > Agents > Preferences.
490
537
 
491
538
  Use `submit_preference_compatibility_feedback` only after actually using an
492
539
  exact skill version returned with a `preference_compatibility_feedback` offer.
493
- Send the offer's exact `query_id`, `result_id`, `skill_version_id`, and
494
- server-issued `preference_fingerprint`; the server verifies the correlated
495
- fetch and resolves the active preference itself. Invocation responses state
496
- each full setting in top-level `effective_preferences`. Exact duplicates in
497
- `preference_application.applied_preferences` use `{key, authority}` references;
498
- compatibility offers use `preference_fingerprints` resolved to those full
499
- settings. The offer retains its `query_id`, `result_id`, and `skill_version_id`,
500
- and application safety rules, required guidance, blocked preferences and
501
- replaced defaults remain present. Differing or ambiguous settings stay full.
502
- Clients should accept either offer format. In an MCP `query_skills`
503
- result the offer lists `preference_fingerprints` only: use the response's
504
- `query_id` and the result's own `result_id`. The operation requires a
505
- verified principal session and never mutates the skill or another
540
+ Send the offer's exact `query_id`, `result_id`, and `skill_version_id`, with
541
+ either an offered `preference_fingerprint` or the `preference_key` of any
542
+ preference that was active for that skill use, offered or not. A key that
543
+ matches none, or more than one, of that use's preferences is refused with HTTP
544
+ 422, and a key sent with a fingerprint must name the same preference. The
545
+ server verifies the correlated fetch, resolves the active preference itself
546
+ and returns the bound fingerprint. In MCP results the offer lists only the
547
+ preferences this skill version supports or conflicts with, each as
548
+ `{preference_fingerprint, key, label, behavior, strength}`. REST responses
549
+ state each full setting once: an `applied_preferences` reference or an offered
550
+ fingerprint resolves to exactly one entry in the top-level
551
+ `effective_preferences` or in that candidate's own difference list, and an
552
+ application that would be ambiguous stays a full entry. The operation requires
553
+ a verified principal session and never mutates the skill or another
506
554
  organization's ranking.
507
555
 
508
556
  `X-Remembrance-Principal-Session` is the preferred header. The legacy
@@ -979,16 +1027,12 @@ schemas for the request and receipt fields.
979
1027
  promotes a result, and only an exclusion its author stated or a person
980
1028
  reviewed makes it `unlikely`; `applicability.provenance` says who stated
981
1029
  them.
982
- The MCP result states each working preference once, in the top-level
983
- `effective_preferences`, and each result refers to it by key or, in its
984
- `preference_compatibility_feedback` offer, by `preference_fingerprints` used
985
- with the response's `query_id` and the result's own `result_id`. A
1030
+ The MCP result states the working preferences once, as the top-level
1031
+ `preferences` snapshot, and each result adds its `skill_notes` and a
1032
+ `preference_compatibility_feedback` offer used with the response's
1033
+ `query_id` and the result's own `result_id`. A
986
1034
  description longer than 800 characters is summarized and marked
987
- `description_truncated: true`; `get_skill` returns the full text. Each
988
- result's `preference_application` omits `blocked_preferences` and
989
- `overridden_skill_defaults` when they are empty, so an absent list means
990
- none, and the `preserves` and `instruction` every result repeats appear once
991
- in the top-level `preference_application_rules`.
1035
+ `description_truncated: true`; `get_skill` returns the full text.
992
1036
  When a native host plugin supplies `client_context.directive_id`, preserve it
993
1037
  so the query correlates and fulfills that plugin instruction. MCP-only clients do not create
994
1038
  shown-directive events because no host instruction was injected; this
@@ -1000,9 +1044,10 @@ schemas for the request and receipt fields.
1000
1044
  organization skills and do not substitute bundled or live public references;
1001
1045
  an unavailable query with an organization key fails closed for public-skill
1002
1046
  fallback because the current policy cannot be confirmed. The MCP result
1003
- states `skill_access` right after `query_id`, ahead of the `skills`,
1004
- `resources`, and `skill_bundles` arrays, so a host preview of a large result
1005
- shows the policy before any candidate. A result that does not show it leaves
1047
+ states `skill_access` right after `query_id`, followed by the `preferences`
1048
+ snapshot and then the `skills`, `resources`, and `skill_bundles` arrays, so
1049
+ a host preview of a large result shows the policy and the working
1050
+ preferences before any candidate. A result that does not show it leaves
1006
1051
  the policy unconfirmed, and the same fail-closed rule applies.
1007
1052
  - `get_skill`, `get_resource`: fetch details by slug. `get_skill` also returns
1008
1053
  the exact reviewed `skill_md`, `version_id`, and public/org source selected
@@ -1021,9 +1066,12 @@ current instructions. Catalog browsing and handle reads do not count as use.
1021
1066
  - `bootstrap_agent_identity`: with no required arguments, generate/register a
1022
1067
  local TOFU Ed25519 key, repair its permissions, or explicitly re-bootstrap a
1023
1068
  new identity if the local key file was lost.
1024
- - `get_effective_preferences`: resolve only the typed preference values relevant
1025
- to the current project context, skill, and domains. A missing principal session
1026
- returns organization/default behavior rather than failing retrieval.
1069
+ - `get_effective_preferences`: return the caller's preferences for one project
1070
+ context, skill, and domains as a snapshot with their `keys`. It takes
1071
+ `page_token` to continue a paged profile, `known_digest` under the rule
1072
+ above, and `include_fingerprints` for compatibility feedback. A missing
1073
+ principal session returns organization/default behavior rather than failing
1074
+ retrieval.
1027
1075
  - `record_preference`: record a privacy-safe explicit or inferred preference
1028
1076
  observation for the verified installation/member/runtime. A live principal
1029
1077
  session is required.