@cognexuslabs/artzain-mcp-gateway 0.1.0 → 0.1.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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/decide.js +2 -1
- package/dist/server.js +2 -1
- package/dist/upstream.js +2 -1
- package/dist/version.d.ts +6 -0
- package/dist/version.js +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- The first release that `publish-npm.yml` publishes from the cognexus-tools mirror, with npm provenance. 0.1.0 was published once by hand so that npm could bind the trusted publisher, and it has no provenance.
|
|
8
|
+
- The gateway reports the version in its `package.json`: as its MCP `serverInfo`, as the client it opens each upstream with, and in each decision's `product`. 0.1.0 had `0.1.0` written in each of those places.
|
|
9
|
+
- `bin` names `dist/cli.js` without `./`. `npm publish` rewrote `./dist/cli.js` and printed that it had removed the command, though it had kept it.
|
|
10
|
+
|
|
3
11
|
## 0.1.0
|
|
4
12
|
|
|
5
13
|
### Added
|
package/README.md
CHANGED
|
@@ -43,4 +43,4 @@ Point an MCP client at that process over stdio. Logs stay on stderr, and stderr
|
|
|
43
43
|
|
|
44
44
|
## Develop
|
|
45
45
|
|
|
46
|
-
From this directory: `npm ci`, `npm test`, `npm run build`.
|
|
46
|
+
From this directory: `npm ci`, `npm test`, `npm run build`. It publishes from the public mirror on an `mcp-gateway-v<version>` tag.
|
package/dist/decide.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* it never returns a synthetic allow.
|
|
5
5
|
*/
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
|
+
import { VERSION } from "./version.js";
|
|
7
8
|
const DEFAULT_BASE = "https://app.cognexuslabs.ai";
|
|
8
9
|
const TIMEOUT_MS = 10_000;
|
|
9
10
|
export class DecisionError extends Error {
|
|
@@ -55,7 +56,7 @@ export async function decide(request, env = process.env) {
|
|
|
55
56
|
payload_kind: "tool_call",
|
|
56
57
|
surface: "mcp",
|
|
57
58
|
request_id: request.requestId ?? randomUUID(),
|
|
58
|
-
product:
|
|
59
|
+
product: `artzain-mcp-gateway@${VERSION}`,
|
|
59
60
|
}),
|
|
60
61
|
});
|
|
61
62
|
}
|
package/dist/server.js
CHANGED
|
@@ -8,6 +8,7 @@ import { ConfigError, loadConfig } from "./config.js";
|
|
|
8
8
|
import { decide, DecisionError } from "./decide.js";
|
|
9
9
|
import { classifyTool } from "./taxonomy.js";
|
|
10
10
|
import { openUpstream, UpstreamError } from "./upstream.js";
|
|
11
|
+
import { VERSION } from "./version.js";
|
|
11
12
|
const PROTOCOL = "2024-11-05";
|
|
12
13
|
function textResult(text, isError) {
|
|
13
14
|
return { content: [{ type: "text", text }], isError };
|
|
@@ -147,7 +148,7 @@ export async function handleRequest(gateway, request) {
|
|
|
147
148
|
return reply(id, {
|
|
148
149
|
protocolVersion: PROTOCOL,
|
|
149
150
|
capabilities: { tools: {} },
|
|
150
|
-
serverInfo: { name: "artzain-mcp-gateway", version:
|
|
151
|
+
serverInfo: { name: "artzain-mcp-gateway", version: VERSION },
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
154
|
if (method === "ping")
|
package/dist/upstream.js
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import { createInterface } from "node:readline";
|
|
9
|
+
import { VERSION } from "./version.js";
|
|
9
10
|
const PROTOCOL = "2024-11-05";
|
|
10
|
-
const CLIENT = { name: "artzain-mcp-gateway", version:
|
|
11
|
+
const CLIENT = { name: "artzain-mcp-gateway", version: VERSION };
|
|
11
12
|
export class UpstreamError extends Error {
|
|
12
13
|
constructor(message) {
|
|
13
14
|
super(message);
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This package's version, read from the package.json npm ships beside dist/.
|
|
3
|
+
* The gateway reports it as its MCP serverInfo, as the client it opens
|
|
4
|
+
* upstreams with, and in each decision's product.
|
|
5
|
+
*/
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
export const VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognexuslabs/artzain-mcp-gateway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "An MCP server that decides each upstream tool call with the ArtzAIn Decision API before it forwards the call.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"node": ">=18"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
|
-
"artzain-mcp-gateway": "
|
|
11
|
+
"artzain-mcp-gateway": "dist/cli.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"dist/",
|