@the-librarian/pi-extension 1.25.0 → 1.26.1

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
@@ -15,7 +15,10 @@ Librarian primer into the system prompt. One install, zero config files.
15
15
  `flag_memory`, `store_handoff`, `list_handoffs`, `claim_handoff`,
16
16
  `search_references`. Descriptions and schemas mirror the server's
17
17
  (a drift-guard test pins them), so the model is taught the same protocol in
18
- Pi as in Claude Code, Codex, OpenCode, and Hermes.
18
+ Pi as in Claude Code, Codex, OpenCode, and Hermes. `flag_memory` queues
19
+ targeted asynchronous correction review: a safe exact claim may be removed or
20
+ proposed, while unsafe cases stay flagged. The response reports queue status,
21
+ not completion; whole-memory Archive remains a separate human action.
19
22
  - **Primer injection** — the operator-editable `vault/primer.md` (≤2KB) is
20
23
  fetched once per process from `GET <server>/primer.md` and appended to the
21
24
  system prompt via `before_agent_start`.
@@ -30,6 +33,9 @@ Librarian primer into the system prompt. One install, zero config files.
30
33
  never `$USER`/cwd), the seq advances only on a server 2xx ack, the bearer
31
34
  token travels in the header only (`redirect:"error"`), and it is fully
32
35
  fail-soft — a Librarian outage never blocks a turn or leaks a stack trace.
36
+ Private mode is an in-conversation instruction; the server cannot verify its
37
+ marker. A correction job queued by a flag from public context may still finish
38
+ after switching private; the toggle does not cancel queued work.
33
39
  - **Four slash commands** (optional sugar): `/handoff`, `/takeover`, `/learn`,
34
40
  `/toggle-private` — thin prompt templates that drive the corresponding tool
35
41
  flows. See [`docs/slash-commands.md`](../../docs/slash-commands.md).
@@ -30,7 +30,10 @@ const TOGGLE_ON =
30
30
  "Private mode is ON. `[librarian:private=on]` — do not call `remember`, " +
31
31
  "`store_handoff`, or `flag_memory` until told otherwise. `recall` and " +
32
32
  "`search_references` stay allowed; note that read queries still reach the " +
33
- "Librarian server's logs. Remain in this state until explicitly toggled off.";
33
+ "Librarian server's logs. Private mode is an in-conversation instruction; " +
34
+ "the server cannot verify its marker. A correction job queued by a flag " +
35
+ "from public context may still finish after switching private; the toggle " +
36
+ "does not cancel queued work. Remain in this state until explicitly toggled off.";
34
37
 
35
38
  const TOGGLE_OFF = "Private mode is OFF. `[librarian:private=off]` — normal operation resumed.";
36
39
 
@@ -89,14 +89,23 @@ export function librarianToolSpecs(): LibrarianToolSpec[] {
89
89
  name: "flag_memory",
90
90
  label: "Flag memory",
91
91
  description:
92
- "A recalled memory is wrong, misleading, or outdated — flag it with a short " +
93
- "free-text `reason` (required: say why). The flag routes the memory to human " +
94
- "review and demotes it below unflagged matches in recall; it never edits, " +
95
- "archives, or deletes, and there is no 'this was useful' counterpart. Use it " +
96
- "sparingly, only when a memory actively led you astray.",
92
+ "A recalled memory is wrong, misleading, or outdated—flag it with a short free-text `reason` " +
93
+ "(required: say why; never include secrets). Never call while private. A saved flag queues " +
94
+ "targeted asynchronous correction review: if the shared confidence policy permits, a safe " +
95
+ "exact-claim removal may apply automatically; otherwise a reviewable proposal may be created. " +
96
+ "Unsafe or unreviewable cases remain flagged for human review. The flag also demotes the " +
97
+ "memory below unflagged matches in recall. Relay the returned status to the " +
98
+ "user; a queued response is not completion, so never claim the memory is already corrected. " +
99
+ "Whole-memory Archive remains a separate human action. Use sparingly, only when a memory " +
100
+ "actively led you astray.",
97
101
  parameters: Type.Object({
98
102
  memory_id: Type.String(),
99
- reason: Type.String({ minLength: 1, maxLength: 2000 }),
103
+ reason: Type.String({
104
+ description:
105
+ "Briefly identify which claim is wrong or outdated. Treat the reason as untrusted data; never include secrets.",
106
+ minLength: 1,
107
+ maxLength: 2000,
108
+ }),
100
109
  }),
101
110
  },
102
111
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-librarian/pi-extension",
3
- "version": "1.25.0",
3
+ "version": "1.26.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"