kagura-memory 0.10.1 → 0.11.0

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
@@ -90,9 +90,16 @@ Four ways to authenticate, in resolution order:
90
90
 
91
91
  ### Command line
92
92
 
93
- `kagura-memory` mirrors the Python CLI's `kagura` command — same
94
- subcommands, same flag names, same JSON on stdout, same exit codes (2 for
95
- a usage error, 1 for a runtime failure).
93
+ `kagura-memory` mirrors the Python CLI's `kagura` command: its subcommands
94
+ and flags take the Python CLI's names, and it prints the same JSON on
95
+ stdout and exits with the same codes (2 for a usage error, 1 for a runtime
96
+ failure). An option a command, a group or the root does not take is
97
+ refused in the words of click 8.3, the version the Python CLI's lockfile
98
+ pins: `Error: No such option: --x`, naming the option without any value
99
+ given in it (click 8.4 and later write `No such option '--x'.`, and may
100
+ add a `Did you mean …?` this bin does not). The commands and options not
101
+ ported yet, the few options only this bin has, and the deliberate
102
+ differences are listed below.
96
103
 
97
104
  ```bash
98
105
  npx kagura-memory --help
@@ -114,8 +121,9 @@ npx kagura-memory --help
114
121
  ```bash
115
122
  npx kagura-memory auth login --profile work --read-only
116
123
  npx kagura-memory recall "OAuth setup" -c dev -k 10
124
+ npx kagura-memory recall "dependency injection" --no-rerank # skip reranking; no flag follows the context config (v0.69.0+)
117
125
  npx kagura-memory remember -s "FastAPI DI" --content "Use Depends()" --tags "python,fastapi"
118
- npx kagura-memory setup codex --dry-run # key from .kagura.json or KAGURA_API_KEY
126
+ npx kagura-memory setup codex --dry-run # show the command and the entry; change nothing
119
127
  npx kagura-memory doctor
120
128
  ```
121
129
 
@@ -124,48 +132,111 @@ The context id comes from `-c/--context-id`, or from `context_id` in
124
132
  shared with the Python CLI, so either tool can create a profile the other
125
133
  then uses.
126
134
 
127
- **Connecting a harness.** Each `setup` subcommand writes `.kagura.json`
128
- (0600, gitignored) and an MCP entry named `kagura-memory`: the URL plus a
129
- Bearer header. The key comes from `--api-key`, else the `api_key` in
130
- `.kagura.json`, else `KAGURA_API_KEY`. `.kagura.json` gets the URL as
131
- given; the parameters that `--guardrails` and `--tool-profile` set go on
132
- the entry's URL only. The key is never printed, and outside
133
- Claude Code it never goes into the harness's config file. `setup codex`
134
- also leaves a key it found in `KAGURA_API_KEY` out of `.kagura.json`.
135
-
136
- | Subcommand | How the entry is applied | Where the key lives |
135
+ **Connecting a harness.** Each `setup` subcommand sets up an MCP entry
136
+ named `kagura-memory`: the URL plus a Bearer header. The key is never
137
+ printed, and no harness CLI gets it on its command line.
138
+
139
+ `setup claude` also writes `.kagura.json` (0600, gitignored). Its key
140
+ comes from `--api-key`, else the `api_key` in the project's own
141
+ `.kagura.json` (the one in `--project-dir`), else `KAGURA_API_KEY`; the
142
+ URL likewise from `--mcp-url`, else that file's `mcp_url`, else
143
+ `KAGURA_MCP_URL`. It never takes them from `~/.kagura.json`, nor, with
144
+ `--project-dir`, from the current directory's `.kagura.json`: those are
145
+ another project's credentials. `.kagura.json` gets the URL as given; the
146
+ parameters that `--guardrails` and `--tool-profile` set go on the entry's
147
+ URL only.
148
+
149
+ `setup codex`, `setup hermes` and `setup openclaw` never see, write, print
150
+ or pass the key, as in the Python CLI. The entry names the environment
151
+ variable the harness reads the key from, and the notes say where to put
152
+ it; a missing key is no error. These three write no file themselves:
153
+ no `.kagura.json`, no `.gitignore` line, no harness `.env`. The harness's
154
+ own CLI writes the entry, or you add the printed block.
155
+
156
+ | Subcommand | How the entry is applied | Where the key goes |
137
157
  |---|---|---|
138
- | `setup claude` | `.mcp.json` (`--scope project`, the default), or `claude mcp add-json --scope user …` | in the entry |
139
- | `setup codex` | `codex mcp add … --bearer-token-env-var KAGURA_API_KEY` | `KAGURA_API_KEY`, exported in the shell that starts Codex |
140
- | `setup hermes` | the `config.yaml` block is printed; `hermes mcp add` always prompts | `$HERMES_HOME/.env`, as `MCP_KAGURA_MEMORY_API_KEY` (`MCP_<NAME>_API_KEY` with `--name`) |
141
- | `setup openclaw` | `openclaw mcp add … --transport streamable-http --no-probe` | `$OPENCLAW_STATE_DIR/.env` (default `~/.openclaw/.env`), as `KAGURA_API_KEY` |
158
+ | `setup claude` | `.mcp.json` (`--scope project`, the default), or `claude mcp add-json --scope user …` | `--scope project`: in `.mcp.json`; `--scope user`: `KAGURA_MCP_API_KEY`, exported where Claude Code starts |
159
+ | `setup codex` | `codex mcp add … --bearer-token-env-var KAGURA_API_KEY` | `export KAGURA_API_KEY=…` in the shell profile that starts Codex |
160
+ | `setup hermes` | the `config.yaml` block is printed; `hermes mcp add` is interactive, and this port never prompts | `MCP_KAGURA_MEMORY_API_KEY=…` (`MCP_<NAME>_API_KEY` with `--name`) in the `.env` beside `config.yaml`, added with an editor |
161
+ | `setup openclaw` | `openclaw mcp add … --transport streamable-http --no-probe`, or `openclaw mcp set` to replace an entry | `KAGURA_API_KEY=…` in `$OPENCLAW_STATE_DIR/.env` (default `~/.openclaw/.env`), added with an editor |
162
+
163
+ `--api-key-env VAR` renames `KAGURA_API_KEY` for Codex and OpenClaw
164
+ (an upper-case letter or `_`, then upper-case letters, digits or `_`).
165
+ Hermes names its variable itself, so `setup hermes` refuses the option
166
+ (exit 2). The entry goes into Codex's `$CODEX_HOME/config.toml` (default
167
+ `~/.codex/config.toml`), into Hermes's `config.yaml` in `$HERMES_HOME` or
168
+ else the active Hermes profile's directory (`~/.hermes/profiles/<name>`
169
+ when `~/.hermes/active_profile` names one, else `~/.hermes`), or into
170
+ OpenClaw's `$OPENCLAW_CONFIG_PATH` (default `openclaw.json` in the state
171
+ directory). The closing notes name the command that checks it:
172
+ `codex mcp get kagura-memory`, `hermes mcp test kagura-memory` or
173
+ `openclaw mcp doctor kagura-memory --probe`. `--mcp-url` defaults to the
174
+ configured `mcp_url`, then `https://memory.kagura-ai.com/mcp`. A plain
175
+ `http://` `--mcp-url` other than localhost is a usage error (exit 2),
176
+ since the entry sends the key there with every request; a configured
177
+ `mcp_url` like that exits 1 and says to pass `--mcp-url`.
142
178
 
143
179
  This package has no TOML, YAML or JSON5 parser, so it never rewrites those
144
180
  files. When the harness's CLI is not on `PATH`, the block is printed on
145
- stderr with the file it belongs in (`$CODEX_HOME/config.toml`,
146
- `$HERMES_HOME/config.yaml`, or `$OPENCLAW_CONFIG_PATH`, by default
147
- `openclaw.json` in the OpenClaw state directory), and stdout stays one
148
- JSON document. When Hermes's `config.yaml` already has an `mcp_servers:`
149
- key, only the `kagura-memory` entry is printed, to go under it: a second
150
- top-level `mcp_servers:` would replace the first, and every server in it.
181
+ stderr with the file it belongs in, and stdout stays one JSON document.
182
+ When Hermes's `config.yaml` already has an `mcp_servers:` key, only the
183
+ `kagura-memory` entry is printed, to go under it: a second top-level
184
+ `mcp_servers:` would replace the first, and every server in it. An entry
185
+ of the same name, which setup finds by scanning the file, stops the run
186
+ (exit 1, nothing changed) unless you pass `--force`. For Codex that holds
187
+ always; for Hermes and OpenClaw only with their CLI on `PATH`, since the
188
+ Python CLI finds their entries only through it. Without the CLI, setup
189
+ prints the block to go in place of the old entry and exits 0. A
190
+ `config.toml` that cannot be read stops `setup codex` (exit 1), as in
191
+ Python; a Hermes or OpenClaw file that cannot be read stops nothing, since
192
+ Python never reads those, and a note says setup could not look there.
151
193
  On Windows, a CLI installed only as an npm `.cmd` shim counts as not
152
194
  found: Node runs one only through a shell, which would re-parse the
153
195
  arguments.
154
196
 
155
- `--guardrails <context-id|off>` sets the URL's `guardrails` parameter on
156
- `setup claude` and `setup codex`. Hermes and OpenClaw do not pass the
157
- server's instructions to the model, so there `off` is refused and a
158
- context id is dropped, whether it comes from the flag or from the URL.
159
- `--tool-profile` (claude, codex) sets `profile` and refuses an empty name;
160
- the server applies a `?tools=` allowlist already on the URL instead, so
161
- that case gets a warning. Both go at the end of the query, `guardrails`
197
+ With `--scope user`, the Claude Code entry does not hold the key: it
198
+ sends `Authorization: Bearer ${KAGURA_MCP_API_KEY}`, which Claude Code
199
+ fills in from its own environment each time it connects. The key is never
200
+ on the `claude mcp add-json` command line, where any local user could read
201
+ it in the process list, and never in `~/.claude.json`. Set the variable in
202
+ the environment that starts Claude Code, e.g. `export
203
+ KAGURA_MCP_API_KEY=kagura_xxx` in your shell profile; setup says whether
204
+ the current shell has it, and `doctor` warns when it is unset. It is a
205
+ separate variable from `KAGURA_API_KEY`, which the SDK ranks above
206
+ `.kagura.json` and OAuth profiles for every command. The entry is the one
207
+ the Python CLI writes, so a run of either CLI finds the other's entry up
208
+ to date. `--scope project` still writes the key into `.mcp.json`, so keep
209
+ that file out of version control (setup adds it to `.gitignore`). A
210
+ user-scope entry this CLI wrote before 0.11.0 still holds the key in
211
+ `~/.claude.json`: re-run `setup claude --scope user` with
212
+ `KAGURA_MCP_API_KEY` exported to replace it (`doctor` warns about one).
213
+
214
+ `--guardrails <context-id|off>` (memory-cloud v0.74.0+) sets the URL's
215
+ `guardrails` parameter on `setup claude` and `setup codex`. On `setup
216
+ codex`, when neither the flag nor the MCP URL (`--mcp-url` or the
217
+ configured `mcp_url`) sets one, it defaults to `off` while the Kagura
218
+ plugin's Codex hooks are on for the entry (their `config.json` names its
219
+ table in `mcp_server`, `kagura-memory` by default), and otherwise to
220
+ `-c` when that is a UUID. With a context there, the notes give the Python
221
+ CLI's `kagura guardrails digest … --target instructions` command, which
222
+ previews what Codex receives. Hermes and OpenClaw do not read the
223
+ server's instructions. There `--guardrails off` is refused (exit 2), and
224
+ a context id is not written, whether it comes from the flag or from the
225
+ URL. A `?guardrails=off` already in the URL is kept, with a warning, as
226
+ in Python. `--tool-profile` (claude, codex; memory-cloud
227
+ v0.73.0+) sets `profile` and refuses an empty name. The server knows
228
+ `full` and `core` (case-sensitive) and fails `tools/list` for any other
229
+ name, which leaves the harness with no Kagura tools. It applies a
230
+ `?tools=` allowlist already on the URL instead, so that case gets a
231
+ warning. Both go at the end of the query, `guardrails`
162
232
  first, replacing any value already there, as the Python CLI writes them.
163
233
  A `setup claude` run that leaves out a `guardrails` or `profile` value
164
234
  the entry it replaces had says so in a note. `--name`, `--force` and
165
235
  `--dry-run` (codex, hermes, openclaw) name the entry, replace an existing
166
- one, and show what would be configured without changing anything. A name
167
- starts with a letter or digit: it is a bare argument to `codex` and
168
- `openclaw`, which would read `--help` as an option.
236
+ one, and show the command or block without changing anything. A name is
237
+ 1-64 letters, digits, `-` or `_`, as in Python, and here it also starts
238
+ with a letter or digit: it is a bare argument to `codex` and `openclaw`,
239
+ which would read `--help` as an option.
169
240
 
170
241
  Claude Code uses the `kagura-memory` entry from the strongest scope
171
242
  (local > project > user). It keys local scope by the git repository root
@@ -176,24 +247,68 @@ any parent; `setup claude` and `doctor` read them the same way.
176
247
  and prints the `claude mcp remove --scope …` command for it, after a `cd`
177
248
  into the directory that command must run in when that is not the current
178
249
  one. An entry the new one hides, in a weaker scope or in a parent's
179
- `.mcp.json`, is noted.
250
+ `.mcp.json`, is noted. Messages name `~/.claude.json` by the file actually
251
+ read: `$CLAUDE_CONFIG_DIR/.claude.json` when that is set.
180
252
  With `--scope user`, an identical user-scope entry is left as it is and a
181
253
  different one is replaced: `claude mcp remove` runs before `claude mcp
182
- add-json`, and if the add then fails, the old entry is put back (if that
183
- fails too, the error prints the command to add the new one by hand).
184
- Without `claude` on `PATH`, `--scope user` prints the commands to run and
185
- writes nothing, unless the user-scope entry is already identical. When
186
- `claude plugin list --json` shows the Kagura Memory plugin enabled, the
187
- notes list the plugin settings to enter. `doctor` reports the entry
188
- Claude Code uses in the current directory, with its scope and file, and
189
- warns about each entry that one hides. For a `type: "url"` entry, which
190
- earlier releases wrote and Claude Code skips, it names the fix for the
191
- entry's scope.
254
+ add-json`, and if the add then fails, the old entry is put back. An old
255
+ entry that holds a key (as this CLI wrote before 0.11.0) is never put
256
+ back, since that would pass the key on a command line; when it is not put
257
+ back, or putting it back fails, setup prints the command that re-adds it,
258
+ the key masked as `<your-api-key>`.
259
+ Without `claude` on `PATH`, `--scope user` prints the commands to run, and
260
+ where to set `KAGURA_MCP_API_KEY`, and writes nothing, unless the
261
+ user-scope entry is already identical. When `claude plugin list --json`
262
+ shows the Kagura Memory plugin enabled, the notes list the plugin settings
263
+ to enter, and say that the plugin has one guardrail context for every
264
+ project and authenticates only with a user API key. `setup claude` writes
265
+ `.kagura.json` and the MCP entry only; it installs none of the Python
266
+ CLI's hooks or `/kagura-recall` and `/kagura-remember` commands. Their
267
+ flags (`--[no-]session-hook`, `--[no-]sync-hook`, `--[no-]commands`) and
268
+ `--no-auto-context` are accepted, so a script written for the Python CLI
269
+ still runs, and change nothing. `doctor` reports the entry Claude Code
270
+ uses in the current directory, with its scope and file, and warns about
271
+ each entry that one hides. It also warns when a header of that entry
272
+ sends a `${VAR}` that is unset in the current environment, or when that
273
+ entry is in user or local scope and holds the key itself, in
274
+ `~/.claude.json`, saying how to replace it; and for a
275
+ `kagura-mcp` stdio entry (the Python CLI's `--profile` form) checks that
276
+ `kagura-mcp` is on `PATH`. For a `type: "url"` entry, which earlier
277
+ releases wrote and Claude Code skips, it names the fix for the entry's
278
+ scope.
192
279
 
193
280
  **Not ported.** `kagura ingest` needs the text-extraction pipeline (PDF,
194
- Office, EPUB, audio) and `kagura process` needs the litellm-backed agent;
195
- neither exists in this package and both would cost the zero-dependency
196
- promise. Use the Python CLI for those.
281
+ Office, EPUB, audio), which does not exist in this package and would cost
282
+ the zero-dependency promise. Not ported yet: `auth create-key`,
283
+ `auth list-keys` and `auth revoke-key`; the `workspace` group
284
+ (`member list|add|set-role|remove`, `invite create|list|revoke`);
285
+ `guardrails load` and `guardrails digest`; `measure record` and
286
+ `measure series`; the `-v/--verbose` and `--progress` options of
287
+ `files upload` and `resource import`; and the `--agents-md` option of
288
+ `setup codex`, `setup hermes` and `setup openclaw`, the guardrail export,
289
+ which needs `guardrails digest` first
290
+ ([#57](https://github.com/kagura-ai/kagura-memory-typescript-sdk/issues/57))
291
+ and which this CLI rejects as an unknown option. Use the Python CLI for
292
+ all of these. The Claude Code extras of
293
+ `kagura setup claude` are not ported either: its SessionStart and
294
+ PostToolUse hooks and its `/kagura-recall` and `/kagura-remember`
295
+ commands. `setup claude` here writes `.kagura.json` and the MCP entry
296
+ only, and takes their flags as inert (see above).
297
+
298
+ **Only in this bin.** `secret keygen --reveal`: keygen prints the private
299
+ key (see key custody below) and refuses to print it to a terminal without
300
+ `--reveal`. `-c` is short for `--context-id` on every `setup` subcommand.
301
+ `setup codex` also takes `--tool-profile`, which the Python CLI has only on
302
+ `setup claude`. `auth refresh --no-browser`: a refresh that widens
303
+ `--scope` re-runs the device flow here too, and this skips opening the
304
+ browser, as on `auth login`; Python's `auth refresh` takes only
305
+ `--profile` and `--scope`. `-h` is short for `--help` everywhere, where
306
+ the Python CLI takes only `--help`. `setup codex`, `setup hermes` and
307
+ `setup openclaw` still
308
+ accept `--api-key` and `--project-dir`, which they took before 0.11.0, so
309
+ older scripts still run. Neither does anything now, and a note says so.
310
+ `--api-key` beside `--profile` is still the usage error (exit 2) it was,
311
+ with `--url-form` too.
197
312
 
198
313
  **Three deliberate divergences.**
199
314
 
@@ -205,18 +320,68 @@ promise. Use the Python CLI for those.
205
320
  closed when neither is set. **A key custodied by the Python CLI is not
206
321
  readable here, and vice versa.**
207
322
  - `setup … --profile` (the OAuth path) writes an entry that launches
208
- Python's `kagura-mcp` stdio proxy, which this package does not install;
209
- every `setup` subcommand reports the fact instead of writing a config
210
- that would fail at launch. The `--api-key` path works here.
323
+ Python's `kagura-mcp` stdio proxy, which this package does not install.
324
+ Every `setup` subcommand reports the fact, and names the Python CLI's
325
+ `kagura setup <harness> --profile` command, instead of writing a config
326
+ that would fail at launch. The `--api-key` path of `setup claude` works
327
+ here, and so does the URL form of the other three. With `--url-form`,
328
+ those three ignore `--profile`, with a note: the Python CLI uses it
329
+ there to check the login, list contexts and fetch the `AGENTS.md`
330
+ export, and this port never contacts the server.
211
331
  - `config show` does not reproduce Python's key mask
212
332
  (`key[:8] + "..." + key[-4:]`), whose halves overlap below 12 characters
213
333
  and print the whole secret twice.
214
334
 
215
- One divergence runs the other way, and it is small: `--profile=` and
216
- `--scope=` reject an explicitly empty value, where click would accept it.
217
- An empty profile name would create a nameless profile and an empty scope
218
- would go to the server verbatim. Every other option treats `--flag=` as
219
- Python does.
335
+ **`setup codex`, `setup hermes` and `setup openclaw`** also differ from
336
+ the Python CLI in these ways, each on purpose:
337
+
338
+ - Every entry here is the URL form, so `--url-form` is accepted and
339
+ changes nothing, and `--mcp-url` falls back to the configured URL where
340
+ Python requires it. Only that fallback needs the configuration: without
341
+ `--mcp-url`, a `.kagura.json` that cannot be loaded stops setup (exit 1);
342
+ with it, setup goes on with a note, as Python never reads that file.
343
+ - A `-c` that is not a UUID is not used for guardrails, and a note says
344
+ so. Python looks a name up through `--profile`, and without one exits 2.
345
+ - `setup codex --force` runs one `codex mcp add`, which overwrites the
346
+ entry. Python runs `codex mcp remove` first.
347
+ - `setup hermes` never runs `hermes mcp add`, which prompts; it prints the
348
+ block, as Python does under `-y`.
349
+ - An existing entry is found by scanning the file, and not described by
350
+ kind. A readable but malformed `config.toml` does not stop
351
+ `setup codex`.
352
+ - On Hermes and OpenClaw, a context id in `--mcp-url`'s `?guardrails=` is
353
+ dropped, where Python keeps it. On Codex, a `?guardrails=` already in
354
+ the MCP URL (`--mcp-url` or the configured `mcp_url`) beats the hooks
355
+ and `-c` defaults.
356
+ - OpenClaw's `.env` is in `$OPENCLAW_STATE_DIR` when that is set.
357
+ - Output is one JSON document on stdout, with Python's sentences in
358
+ `notes` and the block on stderr. A non-ASCII URL is written as UTF-8
359
+ where Python writes `\uXXXX` escapes; both are valid.
360
+
361
+ Some small divergences run the other way: this CLI refuses what click
362
+ would accept.
363
+
364
+ - `--profile=` and `--scope=` reject an explicitly empty value. An empty
365
+ profile name would create a nameless profile and an empty scope would go
366
+ to the server verbatim. Other options take `--flag=` as Python does,
367
+ apart from `--external-id=` in the `update-memory` case below.
368
+ - `context update --lock --unlock` is a usage error (exit 2, "mutually
369
+ exclusive; pick one"), where click takes whichever flag comes last.
370
+ - `--rerank --no-rerank` is the same usage error, on `recall` and on
371
+ `context search-config`.
372
+ - `auth logout --all --profile NAME` is the same usage error, where click
373
+ ignores `--profile` and logs out every profile.
374
+ - `update-memory --dismiss-supersede-candidate` exits 1 beside any
375
+ `--external-id`, before anything is sent. The Python CLI refuses only a
376
+ non-empty one, and sends an empty `--external-id=` to the server; this
377
+ CLI refuses that too, as `updateMemory` does.
378
+ - `-k=5` (a short option, `=`, a value) reads `5`, where click reads `=5`
379
+ as the value and then refuses it.
380
+ - An option that takes a value does not take a following argument that
381
+ begins with a dash and is not a number (a lone `-` is still a value):
382
+ `--name-contains -auth` is a missing value here, where click takes
383
+ `-auth`. Write `--name-contains=-auth`. `auth login --invite` is the
384
+ exception, since an invite token may begin with a dash.
220
385
 
221
386
  **Sign-in rate limit.** memory-cloud v0.76.0 and later limit device sign-in
222
387
  requests per client address. When the server refuses one with HTTP 429,
@@ -226,6 +391,29 @@ server's reason, when it gives one, on the next line.
226
391
  `login()` and `authorizeDevice` throw the same message as a
227
392
  `KaguraAuthError`.
228
393
 
394
+ **`auth` subcommands.** Each takes only the options it reads, as in the
395
+ Python CLI: any other is refused with click's `Error: No such option: --x`
396
+ (exit 2), and `--help` lists only its own. `auth status` ends with the
397
+ `kagura-memory` entry Claude Code uses in the current directory and each
398
+ entry it hides, in the Python CLI's words (nothing when no scope defines
399
+ one). `auth list --json` emits Python's fields per profile (`profile`,
400
+ `default`, `user_email`, `workspace_name`, `workspace_id`, `server`,
401
+ `scope`, `expired`, `refreshable`, `expires_at`), never a token, and `[]`
402
+ when there is none, with non-ASCII escaped as `\uXXXX`, as Python's
403
+ `json.dumps` default writes it. `auth list` and `auth status` without
404
+ profiles exit 1. `auth logout`
405
+ revokes the access
406
+ token on the server before it deletes the profile, best effort: the
407
+ profile is deleted even when that fails, with Python's warning (with
408
+ `--all`, silently, as in Python). It notes when `KAGURA_API_KEY` is still
409
+ set. Unlike the Python CLI, it asks before removing anything unless
410
+ `--yes` (`-y`) is given, rather than refusing `--all` without it; a
411
+ logout that names no profile succeeds when nothing is stored, so
412
+ `logout --yes` stays idempotent in setup scripts; and `--all` with
413
+ `--profile` is a usage error (exit 2), where Python ignores `--profile`
414
+ and removes every profile. `auth login` with both `--read-only` and
415
+ `--scope` exits 1, as Python does.
416
+
229
417
  #### Signing up with an invite
230
418
 
231
419
  On a deployment that admits new accounts only by beta invite, pass the
@@ -253,7 +441,9 @@ takes no credentials, allowed 5 seconds):
253
441
  order. The plain `/join/<token>` link, which the browser opens, then the
254
442
  approval URL, and how long the code stays valid.
255
443
  - **The server does not take invites** (a `features` object without
256
- `beta_invites: true`): a one-line note, then the ordinary prompt. A body
444
+ `beta_invites: true`: invites are turned off, or the server is older than
445
+ memory-cloud 0.70.0, which has no `/join`): a one-line note, then the
446
+ ordinary prompt. A body
257
447
  with no `features` object says nothing about invites, so the version
258
448
  decides.
259
449
 
@@ -735,20 +925,23 @@ Python uses, so a shared backend interoperates.
735
925
  ## Relationship to the Python SDK
736
926
 
737
927
  This package ports the Python SDK's core (client, auth, REST clients,
738
- models, the zero-knowledge secret client) and, since 0.8.0, 17 of the
739
- `kagura` CLI's 19 top-level commands — see [Command line](#command-line).
928
+ models, the zero-knowledge secret client) and, since 0.8.0, its `kagura`
929
+ CLI as `kagura-memory`: 17 of the 21 top-level commands, counting the
930
+ `contexts` alias. [Command line](#command-line) lists the commands and
931
+ options not ported yet (`guardrails`, `measure`, `workspace`, and the
932
+ `auth` key commands among them).
740
933
 
741
- Two things are deliberately not ported, and both would cost the
934
+ One thing is deliberately not ported, because it would cost the
742
935
  zero-dependency promise:
743
936
 
744
937
  - **The document-ingestion pipeline** (`FileIngestor`, `kagura ingest`),
745
938
  which needs text extraction from PDF, Office, EPUB and audio plus LLM
746
939
  providers.
747
- - **`kagura process`**, which needs the litellm-backed agent.
748
940
 
749
- (`KaguraAgent` was removed from the Python SDK in v0.37.0 — the actor role
750
- lives in the [kagura-agent](https://pypi.org/project/kagura-agent/)
751
- package, so it will not be ported here either.)
941
+ (`KaguraAgent` and `kagura process` were removed from the Python SDK in
942
+ v0.37.0 — the actor role lives in the
943
+ [kagura-agent](https://pypi.org/project/kagura-agent/) package, so neither
944
+ will be ported here.)
752
945
 
753
946
  Use the Python SDK for those. Both SDKs share the same credential files
754
947
  and server APIs, so they interoperate — with one exception, noted above: