@mysten-incubation/memwal-mcp 0.0.14-dev.3 → 0.0.14-dev.5

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
@@ -23,6 +23,86 @@ Add Walrus Memory MCP to your MCP client config:
23
23
  }
24
24
  ```
25
25
 
26
+ ## How the plugin launches the server
27
+
28
+ The [MemWal plugin](https://memory.walrus.xyz/mcp/claude-code) does **not** use the
29
+ `npx` form above. `npx` resolves a package *name* against the directory the MCP
30
+ client was started in — your project — so a project that contains an installed
31
+ `@mysten-incubation/memwal-mcp` claiming the pinned version would be run instead of
32
+ the published one. Pinning the version in the `npx` command does not prevent that:
33
+ the planted package simply claims the pinned version.
34
+
35
+ Instead, every plugin launch config runs the plugin's launcher:
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "memwal": {
41
+ "command": "node",
42
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/launch_mcp.mjs"]
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ The launcher installs the pinned version once into a directory it owns and then
49
+ runs that absolute entry point with the current `node` binary:
50
+
51
+ ```
52
+ ~/.memwal/runtime/memwal-mcp@<version>/node_modules/@mysten-incubation/memwal-mcp/dist/bin/memwal-mcp.js
53
+ ```
54
+
55
+ It never consults your project's `node_modules` or a `PATH`-relative bin shim, and
56
+ it fails rather than falling back to the package name if the pinned version cannot
57
+ be installed. Everything after the script path is forwarded to the server
58
+ unchanged, so flags such as `--namespace work` or `--relayer <url>` work exactly as
59
+ they do above.
60
+
61
+ The runtime directory is trusted because of what it is, not how it is spelled:
62
+
63
+ - It must be outside the project the client started in. An absolute path is not
64
+ enough on its own — a client expands `${workspaceFolder}` to an absolute path
65
+ inside the repository, and a repository can commit a whole fake install there.
66
+ - It must be a real directory (not a symlink), owned by you, and not group- or
67
+ world-writable. The launcher creates it with mode `0700` and refuses to run code
68
+ out of it otherwise. If you see a refusal, `chmod 700 ~/.memwal ~/.memwal/runtime`.
69
+ - `MEMWAL_MCP_RUNTIME_DIR` moves it, subject to exactly the same rules.
70
+
71
+ The one-off install is run with `--ignore-scripts` (so no `preinstall` or
72
+ `postinstall` from the package or its dependencies executes), against an explicitly
73
+ pinned public registry, with the `npm_config_*` and `NODE_OPTIONS` environment
74
+ scrubbed for that spawn — npm ranks environment variables above every `.npmrc`, so
75
+ a client `env` block would otherwise choose the registry. npm itself is run as
76
+ `node <npm-cli.js>` resolved from the running node binary where that layout exists.
77
+
78
+ What that does **not** give you is an integrity check of the package contents: it
79
+ establishes where the code came from and that nobody else can write it, not that
80
+ the registry served the bytes a reviewer read. If you install from a private
81
+ registry, pre-populate the directory yourself (below) — the launcher then finds the
82
+ install and never runs npm at all.
83
+
84
+ If you configure MemWal without the plugin and want the same property, install the
85
+ version you intend to run into a directory outside any project and point your
86
+ client at its absolute path:
87
+
88
+ ```sh
89
+ mkdir -p ~/.memwal/runtime/memwal-mcp@0.0.14
90
+ chmod 700 ~/.memwal ~/.memwal/runtime
91
+ npm install --ignore-scripts --prefix ~/.memwal/runtime/memwal-mcp@0.0.14 \
92
+ @mysten-incubation/memwal-mcp@0.0.14
93
+ ```
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "memwal": {
99
+ "command": "node",
100
+ "args": ["/absolute/path/to/home/.memwal/runtime/memwal-mcp@0.0.14/node_modules/@mysten-incubation/memwal-mcp/dist/bin/memwal-mcp.js"]
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
26
106
  ## Login
27
107
 
28
108
  Run the login flow manually:
@@ -38,6 +118,7 @@ The command opens your browser, asks you to connect your Sui wallet, and saves c
38
118
  ```sh
39
119
  memwal-mcp
40
120
  memwal-mcp login
121
+ memwal-mcp auto-save on|off
41
122
  memwal-mcp --logout
42
123
  memwal-mcp --help
43
124
  ```
@@ -52,9 +133,111 @@ Use CLI flags or environment variables to override the default Walrus Memory end
52
133
  | `--web-url <url>` | `MEMWAL_WEB_URL` | Override the web app URL used during login. |
53
134
  | `--label <text>` | `MEMWAL_CLIENT_LABEL` | Friendly delegate-key label shown in Walrus Memory. |
54
135
  | `--namespace <name>` (alias `--ns`) | `MEMWAL_NAMESPACE` | Default memory namespace applied when the agent omits one. |
136
+ | `auto-save on\|off` | `MEMWAL_AUTO_SAVE` | Whether the agent saves durable facts unprompted. On once you agree at login; see [Automatic Memory](#automatic-memory). |
55
137
 
56
138
  Enable verbose stderr logging with `MEMWAL_MCP_DEBUG=1`.
57
139
 
140
+ Set `MEMWAL_MCP_TRANSPORT=http` to dial the relayer's Streamable HTTP endpoint instead of the default SSE pair. Opt-in: reconnect replay is not transport-aware yet, so a write interrupted mid-send may be retried and duplicated.
141
+
142
+ ## Automatic Memory
143
+
144
+ MemWal saves durable facts — preferences, decisions, constraints, recurring
145
+ workflows — as you state them, without asking each time. That is what it is for,
146
+ so it is on. It asks you once first.
147
+
148
+ The question comes up in your terminal the first time you run `login`:
149
+
150
+ ```
151
+ MemWal can save things about you automatically.
152
+
153
+ What that means: when you state a preference, a decision, or a setting in
154
+ chat — "I prefer pnpm", "we deploy from dev", "the relayer is at X" —
155
+ MemWal writes it to your memory without asking each time, so it is there
156
+ in your next session and in every other client you use.
157
+
158
+ Before you choose:
159
+
160
+ - Saved memories are permanent. They go to Walrus, which is immutable
161
+ storage. You can stop saving new ones at any time, but you cannot
162
+ delete one that is already saved.
163
+ - They are encrypted to your account. Only your delegate key reads them.
164
+ - MemWal strips obvious credentials — API keys, tokens, passwords,
165
+ private keys — before saving. Treat that as a safety net, not a
166
+ guarantee: do not paste secrets into a session with this on.
167
+
168
+ [1] Save automatically recommended, this is what MemWal is for
169
+ [2] Only save when I ask nothing is saved unless you say "remember this"
170
+
171
+ Your choice [1/2]:
172
+ ```
173
+
174
+ **Saved memories are permanent.** Walrus is immutable storage: you can stop
175
+ saving new ones at any time, but you cannot delete one already saved — which is
176
+ why you are asked before it starts rather than after.
177
+
178
+ Until you answer, nothing is saved unprompted on a new install; "remember this"
179
+ and recall work throughout. If you were using MemWal before this question
180
+ existed, it keeps saving as it always has and asks you at your next login.
181
+
182
+ The question is only ever asked in a terminal. It is never an MCP tool and never
183
+ something the assistant can answer for you. Change it any time:
184
+
185
+ ```sh
186
+ npx -y @mysten-incubation/memwal-mcp auto-save on
187
+ npx -y @mysten-incubation/memwal-mcp auto-save off
188
+ npx -y @mysten-incubation/memwal-mcp auto-save # report the current setting
189
+ ```
190
+
191
+ The answer is stored as `{"autoSave": true}` in `settings.json` next to your
192
+ credentials file, so it follows the same project-local-beats-global resolution.
193
+ To pin one MCP client instead, set the environment variable — it overrides the
194
+ file and skips the question:
195
+
196
+ ```json
197
+ {
198
+ "mcpServers": {
199
+ "memwal": {
200
+ "command": "npx",
201
+ "args": ["-y", "@mysten-incubation/memwal-mcp"],
202
+ "env": { "MEMWAL_AUTO_SAVE": "1" }
203
+ }
204
+ }
205
+ }
206
+ ```
207
+
208
+ Recall is never gated, and neither is an explicit "remember this" — the setting
209
+ only decides whether the agent saves things you did not ask it to save. Saying
210
+ no costs nothing and is not asked about again.
211
+
212
+ ### What is never saved
213
+
214
+ Walrus storage is append-only and encrypted: a memory that lands **cannot be
215
+ edited or deleted**. So credentials are excluded whichever way you answer, by the same
216
+ rules stated in the server instructions, the tool descriptions and the plugin
217
+ hooks — and enforced by a check that runs before any text is sent:
218
+
219
+ - passwords, API keys, access and refresh tokens, private keys, seed and
220
+ recovery phrases, authorization headers, session cookies, and connection
221
+ strings or URLs with an embedded `user:password`;
222
+ - anything you say not to save ("don't save this", "off the record");
223
+ - pasted third-party content — a fenced block, a quoted passage — which is not
224
+ a fact about you.
225
+
226
+ When a message mixes a preference with a credential, the **preference is kept**
227
+ and only the credential is removed: "I prefer dark mode, db is
228
+ `postgres://admin:hunter2@db.internal/app`" is stored with the password gone and
229
+ the host intact. The agent is told which kinds were removed; the secret itself
230
+ is never stored, logged, or echoed back.
231
+
232
+ Detection targets specific credential shapes rather than "looks random", so
233
+ identifiers you *do* want remembered — blob ids, Sui object ids, commit SHAs,
234
+ digests — pass through untouched. Where a secret is indistinguishable from an
235
+ identifier, the **label** decides: pasting your `credentials.json` has its
236
+ `delegatePrivateKey` removed, while the same 64 hex characters with nothing
237
+ calling them a key are stored as the digest they look like. The trade-off is
238
+ that a secret in no recognisable shape, and with no label near it, can still
239
+ slip past the check — which is why the model-facing rules exist alongside it.
240
+
58
241
  ## Default Namespace
59
242
 
60
243
  By default the MCP tool schemas expose an optional `namespace` argument and the
@@ -146,12 +329,25 @@ You can also pass explicit URLs:
146
329
 
147
330
  ## Credential Storage
148
331
 
149
- Credentials are stored locally in `~/.memwal/credentials.json`. To remove them:
332
+ Credentials are stored locally in `~/.memwal/credentials.json`, and the
333
+ automatic-memory setting in `settings.json` beside it. To remove the
334
+ credentials:
150
335
 
151
336
  ```sh
152
337
  npx -y @mysten-incubation/memwal-mcp --logout
153
338
  ```
154
339
 
340
+ A sign-in that is still in flight also writes a `login-pending.json`
341
+ write-ahead record, beside `credentials.json` in `~/.memwal`. It holds the
342
+ delegate keypair minted for that sign-in, written before the browser can
343
+ register the public half on-chain so an interrupted login can be reclaimed
344
+ instead of paid for a second time. Same owner-only mode `0600` as
345
+ `credentials.json`.
346
+
347
+ It is removed once the sign-in completes, on `--logout`, and on a successful
348
+ recovery at the next start. A record older than 24 hours is discarded rather
349
+ than reused.
350
+
155
351
  ### Per-project credentials
156
352
 
157
353
  A project can keep its own `.memwal/credentials.json` so memory written from it
@@ -175,19 +371,21 @@ outside the repository, so a repository cannot carry its own approval.
175
371
  Approving also picks the file that is **written**: a later sign-in from that
176
372
  project saves a delegate private key into `.memwal/credentials.json` in plain
177
373
  text, inside the repository. `approve-project` says so, and so does the sign-in
178
- warning. Add `.memwal/` to your `.gitignore`. (The short-lived login
179
- write-ahead record is kept outside the repository either way.)
180
-
181
- `MEMWAL_CREDS_DIR` points both the credentials and the approval record at a
182
- directory of your choosing and overrides project resolution entirely, with no
183
- approval. Because it skips the gate, it must be an **absolute path outside the
184
- current project**: a relative value would resolve against the working directory
185
- and put the approval record inside the repository, and an MCP client passes on
186
- the `env` block it reads from `.cursor/mcp.json` / `.vscode/mcp.json` /
187
- `.claude/settings.json` in the checkout where `${workspaceFolder}` is expanded,
188
- so an in-project absolute path is not proof you chose it. Anything else is
189
- refused with an error naming the value, rather than quietly ignored. An empty
190
- value means unset.
374
+ warning. Add `.memwal/` to your `.gitignore`. The write-ahead record is the one
375
+ thing that stays out: a project sign-in keeps it in `~/.memwal/login-pending/`,
376
+ one file per approved project, so no key material lands in the checkout and a
377
+ sign-in is still reclaimable only by the project that started it.
378
+
379
+ `MEMWAL_CREDS_DIR` points the credentials, the approval record and the
380
+ write-ahead record at a directory of your choosing and overrides project
381
+ resolution entirely, with no approval. Because it skips the gate, it must be an
382
+ **absolute path outside the current project**: a relative value would resolve
383
+ against the working directory and put the approval record inside the
384
+ repository, and an MCP client passes on the `env` block it reads from
385
+ `.cursor/mcp.json` / `.vscode/mcp.json` / `.claude/settings.json` in the
386
+ checkout where `${workspaceFolder}` is expanded, so an in-project absolute
387
+ path is not proof you chose it. Anything else is refused with an error naming
388
+ the value, rather than quietly ignored. An empty value means unset.
191
389
 
192
390
  `memwal_health` reports the destination in use as `account=… relayer=…`.
193
391
 
@@ -1 +1 @@
1
- {"version":3,"file":"auth-required.d.ts","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAiLzE;;;;;;;;;;;;;;0EAc0E;AAC1E,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAOrD,CAAC;AAMH;;0EAE0E;AAC1E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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wD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAmID;;yCAEyC;AACzC,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,iBAAiB,CAAC;IACzB;;sCAEkC;IAClC,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B;AAwID;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,kBAAkB,GAC3B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAgE7B"}
@@ -27,9 +27,22 @@ import { loginFailureNotice, loginPrompt, loginSuccessNotification } from "./mes
27
27
  import { log } from "./logger.js";
28
28
  import { startOrReuseLoginFlow, resolveLoginTimeoutMs } from "./login.js";
29
29
  import { AUTH_REQUIRED_INSTRUCTIONS } from "./instructions.js";
30
+ import { SECRET_EXCLUSION_RULES, SECRET_EXCLUSION_SUMMARY, AUTO_SAVE_OPT_IN_RULE, } from "./memory-policy.js";
30
31
  import { MEMWAL_MCP_VERSION } from "./version.js";
31
- const SIGNED_OUT_REMEMBER = "Save a fact to the user's Walrus Memory personal memory. Call ONLY when the user explicitly asks to remember/save something. Pass the full, detailed text — never summarize.";
32
- const SIGNED_IN_REMEMBER = "Save a durable fact about the user or project to their Walrus Memory. Call this PROACTIVELY whenever the user states a preference, decision, constraint, correction, identity detail, or recurring workflow — even if they did not say 'remember this'. Skip one-off tasks, the current file or bug, and small talk. Pass the full statement; do not summarize. To save several facts at once, use memwal_remember_bulk instead. By default this returns in ~1s once the relayer has accepted the job (job_id) — the Walrus write is still in flight and the fact is NOT stored yet. Do not claim it is saved. Settle it with the job-status tool this server advertises (re-list tools if you do not see one). A blob_id in the same reply means it already stored (optional wait budget).";
32
+ /**
33
+ * WALM-642: every write-tool description below ends with the shared policy
34
+ * block, the same text the `instructions` field and the plugin hooks carry, so
35
+ * an agent that only ever sees one of the three still gets the same rules.
36
+ * The signed-out variants get the one-line summary — they exist to keep a
37
+ * credential-less model from spamming writes, and the full block would be the
38
+ * longest thing in a list of tools that cannot run yet.
39
+ */
40
+ const SIGNED_OUT_REMEMBER = "Save a fact to the user's Walrus Memory personal memory. Call ONLY when the user explicitly asks to remember/save something. Pass the full, detailed text — never summarize. " +
41
+ SECRET_EXCLUSION_SUMMARY;
42
+ const SIGNED_IN_REMEMBER = "Save a durable fact about the user or project to their Walrus Memory. Call this PROACTIVELY whenever the user states a preference, decision, constraint, correction, identity detail, or recurring workflow — even if they did not say 'remember this' — provided they have turned automatic memory on. Skip one-off tasks, the current file or bug, and small talk. Pass the full statement; do not summarize. To save several facts at once, use memwal_remember_bulk instead. By default this returns in ~1s once the relayer has accepted the job (job_id) — the Walrus write is still in flight and the fact is NOT stored yet. Do not claim it is saved. Settle it with the job-status tool this server advertises (re-list tools if you do not see one). A blob_id in the same reply means it already stored (optional wait budget). " +
43
+ AUTO_SAVE_OPT_IN_RULE +
44
+ " " +
45
+ SECRET_EXCLUSION_RULES;
33
46
  const SIGNED_OUT_RECALL = "Search the user's Walrus Memory for facts relevant to a query. Returns matching memories ranked by relevance.";
34
47
  const SIGNED_IN_RECALL = "Search the user's Walrus Memory for relevant facts before responding. Call this PROACTIVELY at the start of a task, or whenever the user references past work, prior decisions, their preferences, or anything you may have stored earlier — don't wait to be asked. A single focused query is usually enough — recall is a real retrieval over encrypted storage, so do NOT fire multiple redundant searches for the same question. Returns matching memories ranked by relevance.";
35
48
  /** Build the static memory-tool list. `proactive` is true for the signed-in
@@ -56,7 +69,8 @@ function buildToolDefinitions(proactive) {
56
69
  name: "memwal_remember_bulk",
57
70
  title: "Remember Multiple Facts",
58
71
  annotations: { readOnlyHint: false, destructiveHint: false },
59
- description: "Save multiple durable facts in one call. Use when you learned several distinct facts at once (onboarding details, a list of preferences, decisions from a discussion). Pass an array of complete fact statements (max 20) — do not summarize. Prefer this over repeated memwal_remember calls. By default this returns in ~1s once the relayer has accepted the batch (job_ids) — the Walrus writes are still in flight and the facts are NOT stored yet. Do not claim they are saved. Settle them with the job-status tool this server advertises (re-list tools if you do not see one). A blob_id in the same reply means that fact already stored (optional wait budget).",
72
+ description: "Save multiple durable facts in one call. Use when you learned several distinct facts at once (onboarding details, a list of preferences, decisions from a discussion). Pass an array of complete fact statements (max 20) — do not summarize. Prefer this over repeated memwal_remember calls. By default this returns in ~1s once the relayer has accepted the batch (job_ids) — the Walrus writes are still in flight and the facts are NOT stored yet. Do not claim they are saved. Settle them with the job-status tool this server advertises (re-list tools if you do not see one). A blob_id in the same reply means that fact already stored (optional wait budget). " +
73
+ (proactive ? AUTO_SAVE_OPT_IN_RULE + " " + SECRET_EXCLUSION_RULES : SECRET_EXCLUSION_SUMMARY),
60
74
  inputSchema: {
61
75
  type: "object",
62
76
  properties: {
@@ -125,7 +139,8 @@ function buildToolDefinitions(proactive) {
125
139
  name: "memwal_analyze",
126
140
  title: "Analyze and Remember",
127
141
  annotations: { readOnlyHint: false, destructiveHint: true },
128
- description: "Extract memorable facts from a longer passage of text (preferences, habits, biographical info, constraints) and save each as a separate Walrus Memory memory. Use this when you want MemWal's LLM to split the facts out of a transcript or notes for you; if you already know the exact facts, use memwal_remember or memwal_remember_bulk instead.",
142
+ description: "Extract memorable facts from a longer passage of text (preferences, habits, biographical info, constraints) and save each as a separate Walrus Memory memory. Use this when you want MemWal's LLM to split the facts out of a transcript or notes for you; if you already know the exact facts, use memwal_remember or memwal_remember_bulk instead. " +
143
+ (proactive ? AUTO_SAVE_OPT_IN_RULE + " " + SECRET_EXCLUSION_RULES : SECRET_EXCLUSION_SUMMARY),
129
144
  inputSchema: {
130
145
  type: "object",
131
146
  properties: {
@@ -1 +1 @@
1
- {"version":3,"file":"auth-required.js","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0B,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,kBAAkB,E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GAAG,CAAC,CAAC,CAAC;oBACxB,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;wBAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC3C,CAAC;gBAED,GAAG,CAAC,IAAI,CAAC,wCAAwC,EAAE;oBAC/C,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS;oBAClC,YAAY,EAAE,YAAY,CAAC,MAAM;iBACpC,CAAC,CAAC;gBACH,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;gBAChD,OAAO;YACX,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,KAAK,GAAG,GAAS,EAAE;YACrB,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,MAAM,EAAE,CAAC;YACT,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;YAC5C,OAAO,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,100 @@
1
+ /** Env var that pins automatic saving on or off for one MCP server process. */
2
+ export declare const AUTO_SAVE_ENV = "MEMWAL_AUTO_SAVE";
3
+ /** Where the answer is stored. Outside every repository, on purpose. */
4
+ export declare function settingsPath(): string;
5
+ /** Where the resolved state is published for the plugin hooks to read. */
6
+ export declare function hookStatePath(): string;
7
+ /**
8
+ * Parse a human-written boolean. Returns null for "not set" and for anything
9
+ * unparseable — an unreadable value must not be read as an answer.
10
+ */
11
+ export declare function parseBooleanSetting(raw: string | undefined | null): boolean | null;
12
+ /** `on`/`off` are answers; `unset` means nobody has been asked yet. */
13
+ export type AutoSaveState = "on" | "off" | "unset";
14
+ export type AutoSaveSource =
15
+ /** `MEMWAL_AUTO_SAVE` in this process's environment. */
16
+ "env"
17
+ /** An answer written to settings.json. */
18
+ | "settings"
19
+ /** Unset, on an install that predates the consent prompt — keeps saving. */
20
+ | "legacy"
21
+ /** Unset, on an install created after it — saves nothing until answered. */
22
+ | "unanswered";
23
+ export interface AutoSaveStatus {
24
+ /** Whether this process may save without being asked. */
25
+ enabled: boolean;
26
+ /** The stored answer, or `unset`. */
27
+ state: AutoSaveState;
28
+ source: AutoSaveSource;
29
+ /** True while the question is still owed a human answer. */
30
+ pendingConsent: boolean;
31
+ /** Where an answer lives (or would be written). */
32
+ path: string;
33
+ }
34
+ /**
35
+ * Resolve the current state: environment, then the stored answer, then the
36
+ * unset rules above.
37
+ */
38
+ export declare function autoSaveStatus(): AutoSaveStatus;
39
+ /**
40
+ * True when this process may save without being asked.
41
+ *
42
+ * Read at call time, never cached: the answer can be written between calls in
43
+ * the same process.
44
+ */
45
+ export declare function isAutoSaveEnabled(): boolean;
46
+ /** True while a human still owes the consent question an answer. */
47
+ export declare function isConsentPending(): boolean;
48
+ /** The file the plugin hooks read. Contains no secret — only the answer. */
49
+ export interface HookAutoSaveState {
50
+ version: number;
51
+ enabled: boolean;
52
+ state: AutoSaveState;
53
+ source: AutoSaveSource;
54
+ pendingConsent: boolean;
55
+ /** The settings file this was resolved from, for diagnosis only. */
56
+ settingsPath: string;
57
+ updatedAt: string;
58
+ }
59
+ /**
60
+ * Publish the resolved state where the plugin hooks can read it.
61
+ *
62
+ * This is the whole hook contract: the hooks do no resolution, consult no
63
+ * project directory and parse no credentials file — they read this one file out
64
+ * of the trusted state dir, or they fail safe. Called at every point the answer
65
+ * can change (`setAutoSave`, `markConsentPending`) and once at start-up, so a
66
+ * hook spawned in the same session as an MCP server sees the current answer.
67
+ *
68
+ * Best effort: a read-only or missing home directory must not stop the server
69
+ * from running, and a hook that finds no file already behaves as "off".
70
+ */
71
+ export declare function publishHookState(): HookAutoSaveState | null;
72
+ /**
73
+ * Record the answer, preserving any other keys already in the file. Clears the
74
+ * pending stamp — the question has been answered and must not be asked again.
75
+ */
76
+ export declare function setAutoSave(enabled: boolean): {
77
+ path: string;
78
+ enabled: boolean;
79
+ };
80
+ /**
81
+ * Mark this install as created after the consent prompt existed, so an unset
82
+ * state here is read as "never asked" rather than "long-standing user".
83
+ *
84
+ * Called once when a brand-new install first appears — before the signed-out
85
+ * server boots, and immediately after a first interactive login — so that an
86
+ * abandoned or headless sign-in cannot mature into automatic saving nobody
87
+ * agreed to. A no-op once any answer exists.
88
+ */
89
+ export declare function markConsentPending(): void;
90
+ /** One line for a TTY, naming the state, where it came from, and how to flip it. */
91
+ export declare function autoSaveSummary(): string;
92
+ /**
93
+ * The single line a non-interactive run prints while consent is outstanding.
94
+ *
95
+ * Non-TTY is every MCP client spawn, so this is stderr-only and says what is
96
+ * happening rather than asking anything — there is no human on the other end of
97
+ * this stdin, and a prompt here would hang the server forever.
98
+ */
99
+ export declare function pendingConsentNotice(): string | null;
100
+ //# sourceMappingURL=auto-save.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-save.d.ts","sourceRoot":"","sources":["../src/auto-save.ts"],"names":[],"mappings":"AA+EA,+EAA+E;AAC/E,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAqBhD,wEAAwE;AACxE,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAWD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAOlF;AA4BD,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,KA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