@aikdna/kdna-mcp-server 0.8.5 → 0.8.6
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 +36 -29
- package/bin/read-session.mjs +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# KDNA MCP 0.8.
|
|
1
|
+
# KDNA MCP 0.8.6 — local stdio Read adapter
|
|
2
2
|
|
|
3
|
-
This local stdio MCP server (`@aikdna/kdna-mcp-server@0.8.
|
|
3
|
+
This local stdio MCP server (`@aikdna/kdna-mcp-server@0.8.6`) delegates native container `0.6.0` admission and scoped Read operations to the exact CLI `0.47.1` / Core `0.37.12` / Read `0.13.6` graph (`kdna.read/0.7.0-candidate`). Historical MCP `0.5.0`–`0.5.1` and CLI `0.36.x` workspace flows are superseded by this operator-bound native `0.6.0` adapter.
|
|
4
4
|
|
|
5
5
|
## Operator-controlled startup
|
|
6
6
|
|
|
@@ -21,33 +21,38 @@ initialize fields, instructions in an asset or edits to startup configuration
|
|
|
21
21
|
establish or widen this binding. A Host that lets a model launch arbitrary
|
|
22
22
|
commands has not established that trust boundary merely by running this server.
|
|
23
23
|
|
|
24
|
-
The operator must have selected
|
|
24
|
+
The operator must have selected each file for the intended task and recipient.
|
|
25
25
|
Existing complete authorization needs no repeated internal approval. Missing
|
|
26
26
|
substantive choices are resolved by the Host before startup. The server cannot
|
|
27
27
|
attest human identity, local-only model processing or another Host's entitlement.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
Each operator-supplied `--asset` path (1 to 16 explicit absolute canonical
|
|
30
|
+
non-symlink regular `.kdna` files, up to 64 MiB each; zero directory scanning)
|
|
31
|
+
is opened read-only, checked against its file identity, and copied byte-for-byte
|
|
32
|
+
into a mode-0700 private temporary directory with a mode-0600 file. No ZIP or
|
|
33
|
+
payload is parsed by this adapter. Official CLI/Core/Read admit each private
|
|
34
|
+
copy in its own isolated session. Later replacement of an original file cannot
|
|
35
|
+
substitute another input in this process. Temporary copies are removed on normal
|
|
36
|
+
EOF/cancel/signal shutdown; uncatchable termination can leave private local
|
|
37
|
+
copies and needs operator cleanup. TMPDIR chooses storage, not authority. Use a
|
|
38
|
+
private directory controlled by the operator.
|
|
37
39
|
|
|
38
40
|
No startup arguments, or --asset without --allow-read, leaves the server
|
|
39
|
-
unbound;
|
|
41
|
+
unbound; no selected path is opened. --allow-read without --asset is an
|
|
40
42
|
argument error. Model tools cannot bind, reopen or choose a path. Legacy
|
|
41
43
|
workspace/consent/password environment values do not grant permission.
|
|
42
44
|
|
|
43
45
|
## Runtime model and expectations
|
|
44
46
|
|
|
45
|
-
One server process serves one
|
|
47
|
+
One server process serves one fixed, operator-bound asset allowlist for its whole lifetime.
|
|
46
48
|
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
- **Fixed launch-time allowlist (1 to 16 `--asset` files).** A launch binds the
|
|
50
|
+
explicit operator allowlist (one `--asset` file or up to 16 repeated `--asset`
|
|
51
|
+
flags, with zero directory scanning) together with the `--allow-read`
|
|
52
|
+
permission; `kdna.cancel` or process exit closes every bound session and
|
|
53
|
+
revokes the entire process binding, and only a new operator-controlled launch
|
|
54
|
+
can select again. No tool call can bind, widen, reopen or switch paths
|
|
55
|
+
mid-process.
|
|
51
56
|
- **`--allow-read` is the only read permission.** Without the operator-supplied
|
|
52
57
|
flag the server stays unbound; no tool parameter, asset instruction or
|
|
53
58
|
configuration edit establishes or widens it (see "Operator-controlled
|
|
@@ -229,11 +234,12 @@ not successful continuation. These cases do not certify other Hosts or routes.
|
|
|
229
234
|
See the [Codex observations](https://github.com/aikdna/kdna-skills/blob/main/integrations/codex/README.md#observed-task-presentation-case)
|
|
230
235
|
and [support matrix](https://github.com/aikdna/kdna-skills/blob/main/docs/agent-support-matrix.json).
|
|
231
236
|
|
|
232
|
-
Read uses one real locally resolved CLI child process in
|
|
233
|
-
mode
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
Read uses one real locally resolved CLI child process in `--session --allow-read`
|
|
238
|
+
mode per bound asset (isolated by `asset_id` in multi-asset allowlist mode). The
|
|
239
|
+
adapter builds the public request tuple from the CLI's fixed binding; it does
|
|
240
|
+
not create a public snapshot, IR, identity or permission provider. Catalog,
|
|
241
|
+
successive selections and handles for a bound asset therefore share that
|
|
242
|
+
official process's snapshot. Keep the first complete catalog for later selections.
|
|
237
243
|
Inspection uses a separate real CLI inspect child and does not assert read,
|
|
238
244
|
writer, confirmation or action states from technical validity.
|
|
239
245
|
|
|
@@ -254,10 +260,11 @@ legacy load/plan-load/Runtime Capsule adaptation are absent.
|
|
|
254
260
|
## Match the asset's reader
|
|
255
261
|
|
|
256
262
|
This adapter reads native container `0.6.0` `.kdna` assets with `kdna.read/0.7.0-candidate`.
|
|
257
|
-
Public `0.6.0` assets require `--asset /absolute/selected.kdna
|
|
258
|
-
password-protected `0.6.0` assets
|
|
259
|
-
|
|
260
|
-
`--password-fd <n>`
|
|
263
|
+
Public `0.6.0` assets require one or more explicit `--asset /absolute/selected.kdna`
|
|
264
|
+
flags (up to 16) with `--allow-read`; password-protected `0.6.0` assets
|
|
265
|
+
(`kdna.envelope.aead`, `password` entitlement) additionally require
|
|
266
|
+
operator-supplied `--password-file /absolute/passphrase` or `--password-fd <n>`
|
|
267
|
+
(`n >= 3`) in process `argv` at startup (supported with one bound `--asset`). Source disclosure
|
|
261
268
|
and revision use the direct CLI (`source-open` / `source-pack`) on the
|
|
262
269
|
unencrypted plaintext source rather than MCP read tools. An unsupported
|
|
263
270
|
container format is not permission to convert it implicitly or read its raw payload.
|
|
@@ -266,7 +273,7 @@ container format is not permission to convert it implicitly or read its raw payl
|
|
|
266
273
|
|
|
267
274
|
For an Agent-led task, begin with the [getting-started guide](https://github.com/aikdna/kdna-skills/blob/main/docs/GETTING_STARTED.md).
|
|
268
275
|
The installer requires Node.js 22 or later, npm, `bash` and `tar`. The current
|
|
269
|
-
CLI 0.47.
|
|
276
|
+
CLI 0.47.1 / Core 0.37.12 / Read 0.13.6 graph was exercised with Node.js 22.22.3
|
|
270
277
|
and npm 10.9.8. Earlier companion graphs' runtime checks do not verify this
|
|
271
278
|
one on additional Node versions. The CI matrix is a set of required checks,
|
|
272
279
|
not evidence that every run has already passed. From `mcp-server/`:
|
|
@@ -311,11 +318,11 @@ package-lock.json are excluded. The companion consumer lock is generated from
|
|
|
311
318
|
the checked source graph. The packed-consumer test installs with an empty npm
|
|
312
319
|
cache, then runs the same real stdio boundary suite against the installed bin.
|
|
313
320
|
|
|
314
|
-
Canonical npm publication of `@aikdna/kdna-mcp-server@0.8.
|
|
321
|
+
Canonical npm publication of `@aikdna/kdna-mcp-server@0.8.6` runs exclusively via the GitHub Release workflow (`kdna-mcp-server-0.8.6`) after companion packages (`@aikdna/kdna-core@0.37.12`, `@aikdna/kdna-read@0.13.6`, `@aikdna/kdna-cli@0.47.1`) are published on the official registry. Source and installed process tests do not
|
|
315
322
|
establish named Host adoption, human review, authorship or Creation acceptance.
|
|
316
323
|
|
|
317
324
|
## Native section contract boundary
|
|
318
325
|
|
|
319
|
-
The complete CLI public contract binding is pinned by SHA-256 `
|
|
326
|
+
The complete CLI public contract binding is pinned by SHA-256 `24fda4a8a3373aa0a301c0bb06b9989e3db6a30299ba6f5a93acf46f0d609d68`. It identifies the native container `0.6.0` and Read `0.7.0-candidate` tuple, exact Core/Read artifacts and route contracts. CLI and Read must resolve the same fixed Core instance; a nested shadow dependency is refused. The adapter delegates native admission and retained section reads to that runtime. Preserve catalog-only status, mandatory closure, native handle origin, diagnostics, absent declarations and explicit empty states. Technical validity, Read and static declarations do not establish live Creation authority, human confirmation or action permission.
|
|
320
327
|
|
|
321
328
|
The public regression corpus is generated from synthetic authored JSON with the fixed CLI. It tests real native containers and one deliberately truncated container; no legacy component-format asset is treated as current native input.
|
package/bin/read-session.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { AdapterError } from "./operator-binding.mjs";
|
|
|
8
8
|
|
|
9
9
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
10
10
|
export const packageInfo = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
|
11
|
-
const versions = { cli: "0.47.
|
|
11
|
+
const versions = { cli: "0.47.1", core: "0.37.12", read: "0.13.6" };
|
|
12
12
|
function localPackage(name) {
|
|
13
13
|
const roots = [path.join(root, "node_modules")];
|
|
14
14
|
if (path.basename(path.dirname(root)) === "@aikdna" && path.basename(path.dirname(path.dirname(root))) === "node_modules") roots.push(path.dirname(path.dirname(root)));
|
|
@@ -26,7 +26,7 @@ const cli = localPackage("cli"), core = localPackage("core"), read = localPackag
|
|
|
26
26
|
const cliEntry = path.resolve(cli.directory, cli.value.bin?.kdna || "");
|
|
27
27
|
const bindingBytes = fs.readFileSync(path.join(cli.directory, "public-contract-binding.json"));
|
|
28
28
|
export const publicBinding = JSON.parse(bindingBytes);
|
|
29
|
-
if (packageInfo.kdna_runtime?.cli !== versions.cli || packageInfo.kdna_runtime?.core !== versions.core || packageInfo.kdna_runtime?.read !== versions.read || createHash("sha256").update(bindingBytes).digest("hex") !== "
|
|
29
|
+
if (packageInfo.kdna_runtime?.cli !== versions.cli || packageInfo.kdna_runtime?.core !== versions.core || packageInfo.kdna_runtime?.read !== versions.read || createHash("sha256").update(bindingBytes).digest("hex") !== "24fda4a8a3373aa0a301c0bb06b9989e3db6a30299ba6f5a93acf46f0d609d68" || publicBinding.implementation?.version !== versions.cli || publicBinding.tuple?.container !== "0.6.0" || publicBinding.tuple?.read !== "kdna.read/0.7.0-candidate" || publicBinding.accepted_core?.version !== versions.core || publicBinding.accepted_read?.version !== versions.read || packageInfo.kdna_runtime?.read_contract !== "kdna.read/0.7.0-candidate" || !cliEntry.startsWith(cli.directory + path.sep) || !fs.statSync(cliEntry).isFile()) throw new AdapterError("MCP_RUNTIME_INVALID", "The fixed native runtime contract binding is invalid.");
|
|
30
30
|
// Every consumer resolves the same fixed Core/Read instance; nested shadow copies are refused.
|
|
31
31
|
for (const [consumer, dependency] of [[cli, core], [cli, read], [read, core]]) {
|
|
32
32
|
const resolved = createRequire(path.join(consumer.directory, "package.json")).resolve(dependency.value.name + "/package.json");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikdna/kdna-mcp-server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Local stdio Read adapter for operator-bound KDNA assets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://aikdna.com",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@noble/hashes": "1.8.0",
|
|
52
52
|
"pako": "2.1.0",
|
|
53
53
|
"require-from-string": "2.0.2",
|
|
54
|
-
"@aikdna/kdna-cli": "0.47.
|
|
54
|
+
"@aikdna/kdna-cli": "0.47.1"
|
|
55
55
|
},
|
|
56
56
|
"kdna_runtime": {
|
|
57
|
-
"cli": "0.47.
|
|
57
|
+
"cli": "0.47.1",
|
|
58
58
|
"core": "0.37.12",
|
|
59
59
|
"read": "0.13.6",
|
|
60
60
|
"read_contract": "kdna.read/0.7.0-candidate"
|