kagura-memory 0.16.0 → 0.17.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 +30 -5
- package/dist/cli.js +390 -158
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +150 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -8
- package/dist/index.d.ts +71 -8
- package/dist/index.js +149 -22
- package/dist/index.js.map +1 -1
- package/dist-mcp/mcp.cjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,13 +29,13 @@ package also includes `kagura-memory-mcp`, a transparent stdio/HTTP proxy.
|
|
|
29
29
|
npm install kagura-memory
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Requires Node.js >=
|
|
32
|
+
Requires Node.js >= 22.12.0 (this runtime migration drops Node 20). Zero
|
|
33
33
|
runtime dependencies — the one optional peer dependency, for
|
|
34
34
|
[zero-knowledge secrets](#the-crypto-package-is-opt-in), is never installed
|
|
35
35
|
unless you ask for it.
|
|
36
36
|
|
|
37
37
|
Targets memory-cloud **v0.75.0** (`MIN_SERVER_VERSION`) and is checked
|
|
38
|
-
against memory-cloud up to **v0.
|
|
38
|
+
against memory-cloud up to **v0.144.0**; the Python SDK 0.44.0, its
|
|
39
39
|
parity target, is checked up to v0.142.0 (v0.143.0 changes nothing a
|
|
40
40
|
client sees), and its own `MIN_SERVER_VERSION` stays at an advisory
|
|
41
41
|
0.17.1. `checkServerVersion()` warns, and never throws, on an older
|
|
@@ -1309,7 +1309,7 @@ released, since it waits on the user. Python 0.44.0 and older TypeScript
|
|
|
1309
1309
|
clients use incompatible locks: do not run them concurrently against the same
|
|
1310
1310
|
credentials file. An existing legacy `.lock` is refused, never deleted by this
|
|
1311
1311
|
SDK. Lock-v1 is never broken by age. See the
|
|
1312
|
-
[migration and crash-recovery instructions](docs/compatibility.md#
|
|
1312
|
+
[migration and crash-recovery instructions](docs/compatibility.md#credential-concurrency-and-auth-token-112)
|
|
1313
1313
|
and [Python counterpart](https://github.com/kagura-ai/kagura-memory-python-sdk/issues/327).
|
|
1314
1314
|
Logout records revocation so a queued refresh cannot recreate credentials;
|
|
1315
1315
|
`deleteCredentialsFile()` must now be awaited. This is client-side and works
|
|
@@ -1898,6 +1898,31 @@ them, and `warn: () => {}` silences them.
|
|
|
1898
1898
|
Agent Registry and binding methods are covered in
|
|
1899
1899
|
[Agent control plane](#agent-control-plane-memory-cloud-v0490) below.
|
|
1900
1900
|
|
|
1901
|
+
### Workspace member context access (memory-cloud v0.144.0+)
|
|
1902
|
+
|
|
1903
|
+
Use a workspace owner's API key with `WorkspaceClient`. A workspace-bound key
|
|
1904
|
+
can manage only its own workspace. The server rejects OAuth on these routes.
|
|
1905
|
+
|
|
1906
|
+
```ts
|
|
1907
|
+
await client.addMember(workspaceId, userId, { role: "viewer", allowedContextIds: [] });
|
|
1908
|
+
const { contexts } = await client.getMemberContextAccess(workspaceId, userId);
|
|
1909
|
+
await client.setMemberContextAccess(workspaceId, userId, [contextId]);
|
|
1910
|
+
```
|
|
1911
|
+
|
|
1912
|
+
Omitting the list on add uses the server default. Passing `null` to the setter
|
|
1913
|
+
restores role defaults, and `[]` grants a member or viewer no shared contexts.
|
|
1914
|
+
Owners and admins retain access to shared contexts. Creators and their linked
|
|
1915
|
+
accounts retain access to their own private contexts regardless of this list. Each assignable context
|
|
1916
|
+
includes `is_own_private`. The existing positional role argument still works.
|
|
1917
|
+
|
|
1918
|
+
For context roles, create a session client with
|
|
1919
|
+
`new WorkspaceClient({ baseUrl, session: true, fetch: sessionFetch })`.
|
|
1920
|
+
On Node the supplied fetch must carry the signed-in user's session and CSRF
|
|
1921
|
+
credentials. Call `addContextMember(contextId, userId, "editor")` on that client. A context outside the member's list raises
|
|
1922
|
+
`KaguraContextNotInAccessListError` with `details.reason` equal to
|
|
1923
|
+
`context_not_in_access_list`. A workspace owner or admin may explicitly retry
|
|
1924
|
+
with `extendAccessList: true`. The response reports `access_list_extended`.
|
|
1925
|
+
|
|
1901
1926
|
### Permission model (memory-cloud v0.126.0+)
|
|
1902
1927
|
|
|
1903
1928
|
The server decides who reaches which context, the same way on every MCP
|
|
@@ -2198,7 +2223,7 @@ one of those without the package and you get a `KaguraCryptoError` naming
|
|
|
2198
2223
|
the install command, not a module-resolution stack trace.
|
|
2199
2224
|
|
|
2200
2225
|
> **Node version.** `age-encryption`'s `@noble/*` dependencies declare
|
|
2201
|
-
> `engines.node: ">= 20.19.0"`,
|
|
2226
|
+
> `engines.node: ">= 20.19.0"`, below this SDK's 22.12.0 floor, so the install
|
|
2202
2227
|
> is clean on every supported Node, `engine-strict=true` included.
|
|
2203
2228
|
> Encryption and keygen take their randomness from the `globalThis.crypto`
|
|
2204
2229
|
> WebCrypto global, which Node has provided since 19; the SDK no longer
|
|
@@ -2243,7 +2268,7 @@ CLI as `kagura-memory`: 23 of the 24 top-level commands of the Python CLI
|
|
|
2243
2268
|
differ.
|
|
2244
2269
|
|
|
2245
2270
|
The parity target is the Python SDK and CLI **0.44.0**, checked against
|
|
2246
|
-
memory-cloud up to **v0.
|
|
2271
|
+
memory-cloud up to **v0.144.0**.
|
|
2247
2272
|
|
|
2248
2273
|
**SDK ↔ memory-cloud compatibility.**
|
|
2249
2274
|
[`docs/compatibility.md`](docs/compatibility.md) records, for each release
|