@aikdna/kdna-mcp-server 0.8.0 → 0.8.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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# KDNA MCP 0.8.
|
|
1
|
+
# KDNA MCP 0.8.1 — 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.1`) delegates native container `0.6.0` admission and scoped Read operations to the exact CLI `0.45.0` / Core `0.37.11` / Read `0.13.5` 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 single-asset native `0.6.0` adapter.
|
|
4
4
|
|
|
5
5
|
## Operator-controlled startup
|
|
6
6
|
|
|
@@ -256,7 +256,7 @@ container format is not permission to convert it implicitly or read its raw payl
|
|
|
256
256
|
|
|
257
257
|
For an Agent-led task, begin with the [getting-started guide](https://github.com/aikdna/kdna-skills/blob/main/docs/GETTING_STARTED.md).
|
|
258
258
|
The installer requires Node.js 22 or later, npm, `bash` and `tar`. The current
|
|
259
|
-
CLI 0.
|
|
259
|
+
CLI 0.45.0 / Core 0.37.11 / Read 0.13.5 graph was exercised with Node.js 22.22.3
|
|
260
260
|
and npm 10.9.8. Earlier companion graphs' runtime checks do not verify this
|
|
261
261
|
one on additional Node versions. The CI matrix is a set of required checks,
|
|
262
262
|
not evidence that every run has already passed. From `mcp-server/`:
|
|
@@ -300,7 +300,7 @@ package-lock.json are excluded. The companion consumer lock is generated from
|
|
|
300
300
|
the checked source graph. The packed-consumer test installs with an empty npm
|
|
301
301
|
cache, then runs the same real stdio boundary suite against the installed bin.
|
|
302
302
|
|
|
303
|
-
Canonical npm publication of `@aikdna/kdna-mcp-server@0.8.
|
|
303
|
+
Canonical npm publication of `@aikdna/kdna-mcp-server@0.8.1` runs exclusively via the GitHub Release workflow (`kdna-mcp-server-0.8.1`) after companion packages (`@aikdna/kdna-core@0.37.11`, `@aikdna/kdna-read@0.13.5`, `@aikdna/kdna-cli@0.45.0`) are published on the official registry. Source and installed process tests do not
|
|
304
304
|
establish named Host adoption, human review, authorship or Creation acceptance.
|
|
305
305
|
|
|
306
306
|
## Native section contract boundary
|
package/bin/operator-binding.mjs
CHANGED
|
@@ -25,7 +25,7 @@ function readPasswordFile(passwordPath) {
|
|
|
25
25
|
try {
|
|
26
26
|
const before = fs.lstatSync(passwordPath);
|
|
27
27
|
if (!before.isFile() || before.isSymbolicLink() || before.size === 0 || before.size > 4096 || fs.realpathSync(passwordPath) !== passwordPath) throw invalidPassword();
|
|
28
|
-
fd = fs.openSync(passwordPath, fs.constants.O_RDONLY | fs.constants.O_NOFOLLOW);
|
|
28
|
+
fd = fs.openSync(passwordPath, fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0));
|
|
29
29
|
const opened = fs.fstatSync(fd);
|
|
30
30
|
if (!sameFile(before, opened)) throw invalidPassword();
|
|
31
31
|
const raw = Buffer.alloc(opened.size);
|
|
@@ -110,7 +110,7 @@ export function bindOperatorInput(argv) {
|
|
|
110
110
|
try {
|
|
111
111
|
const before = fs.lstatSync(selected);
|
|
112
112
|
if (!before.isFile() || before.isSymbolicLink() || before.size > 64 * 1024 * 1024 || fs.realpathSync(selected) !== selected) throw invalid();
|
|
113
|
-
descriptor = fs.openSync(selected, fs.constants.O_RDONLY | fs.constants.O_NOFOLLOW);
|
|
113
|
+
descriptor = fs.openSync(selected, fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0));
|
|
114
114
|
const opened = fs.fstatSync(descriptor);
|
|
115
115
|
if (!sameFile(before, opened)) throw invalid();
|
|
116
116
|
const bytes = Buffer.alloc(opened.size);
|
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.
|
|
11
|
+
const versions = { cli: "0.45.0", core: "0.37.11", read: "0.13.5" };
|
|
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,13 +26,43 @@ 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") !== "eb8068850c9059d5c8daf3e5ae52f4cb4d913ca78c4027fd1e18d06549f80698" || 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");
|
|
33
33
|
if (resolved !== path.join(dependency.directory, "package.json")) throw new AdapterError("MCP_RUNTIME_INVALID", "The fixed native runtime contains a shadow dependency.");
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const ALLOWED_CHILD_ENV_KEYS = new Set([
|
|
36
|
+
"HOME",
|
|
37
|
+
"TMPDIR",
|
|
38
|
+
"XDG_CACHE_HOME",
|
|
39
|
+
"PATH",
|
|
40
|
+
"LANG",
|
|
41
|
+
"LC_ALL",
|
|
42
|
+
"NODE_DISABLE_COMPILE_CACHE",
|
|
43
|
+
// Windows child-process essentials (matched case-insensitively because Windows exposes `Path`, `SystemRoot`, `ComSpec`, etc.)
|
|
44
|
+
"SYSTEMROOT",
|
|
45
|
+
"WINDIR",
|
|
46
|
+
"COMSPEC",
|
|
47
|
+
"USERPROFILE",
|
|
48
|
+
"HOMEDRIVE",
|
|
49
|
+
"HOMEPATH",
|
|
50
|
+
"TEMP",
|
|
51
|
+
"TMP",
|
|
52
|
+
"APPDATA",
|
|
53
|
+
"LOCALAPPDATA",
|
|
54
|
+
"PATHEXT",
|
|
55
|
+
]);
|
|
56
|
+
export function buildChildEnv(sourceEnv = process.env) {
|
|
57
|
+
const out = {};
|
|
58
|
+
for (const [key, value] of Object.entries(sourceEnv || {})) {
|
|
59
|
+
if (value !== undefined && ALLOWED_CHILD_ENV_KEYS.has(key.toUpperCase())) {
|
|
60
|
+
out[key] = value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
const childEnv = buildChildEnv(process.env);
|
|
36
66
|
const unavailable = () => new AdapterError("MCP_CLI_UNAVAILABLE", "The official local CLI session did not complete. Start a new operator-bound process.");
|
|
37
67
|
const cancelled = () => new AdapterError("MCP_READ_CANCELLED", "Local read presentation was cancelled; this process binding is closed.");
|
|
38
68
|
|
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.1",
|
|
4
4
|
"description": "Local stdio Read adapter for one operator-bound KDNA asset.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://aikdna.com",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vendor/noble-hashes-1.8.0.tgz",
|
|
38
38
|
"vendor/pako-2.1.0.tgz",
|
|
39
39
|
"vendor/require-from-string-2.0.2.tgz",
|
|
40
|
-
"vendor/aikdna-kdna-cli-0.
|
|
40
|
+
"vendor/aikdna-kdna-cli-0.45.0.tgz"
|
|
41
41
|
],
|
|
42
42
|
"scripts": {
|
|
43
43
|
"test": "node scripts/verify-runtime-candidates.mjs && node ../scripts/check-current-names.mjs && node --test test/*.test.mjs && npm run check:orphan-lockfile",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@noble/hashes": "1.8.0",
|
|
64
64
|
"pako": "2.1.0",
|
|
65
65
|
"require-from-string": "2.0.2",
|
|
66
|
-
"@aikdna/kdna-cli": "0.
|
|
66
|
+
"@aikdna/kdna-cli": "0.45.0"
|
|
67
67
|
},
|
|
68
68
|
"kdna_runtime": {
|
|
69
|
-
"cli": "0.
|
|
69
|
+
"cli": "0.45.0",
|
|
70
70
|
"core": "0.37.11",
|
|
71
71
|
"read": "0.13.5",
|
|
72
72
|
"read_contract": "kdna.read/0.7.0-candidate"
|
|
Binary file
|
|
Binary file
|