@cognium/mcp-server 0.2.1 → 0.4.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/CHANGELOG.md +101 -0
- package/README.md +32 -1
- package/dist/bin.js +11 -5
- package/dist/bin.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/licence.js +1 -1
- package/dist/licence.js.map +1 -1
- package/dist/modules.d.ts +1 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/params-guard.d.ts +31 -0
- package/dist/params-guard.d.ts.map +1 -0
- package/dist/params-guard.js +75 -0
- package/dist/params-guard.js.map +1 -0
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/server.d.ts +17 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +28 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/attack-surface-summary.d.ts +6 -0
- package/dist/tools/attack-surface-summary.d.ts.map +1 -1
- package/dist/tools/attack-surface-summary.js +2 -1
- package/dist/tools/attack-surface-summary.js.map +1 -1
- package/dist/tools/check-sanitizer.d.ts +6 -0
- package/dist/tools/check-sanitizer.d.ts.map +1 -1
- package/dist/tools/check-sanitizer.js +2 -1
- package/dist/tools/check-sanitizer.js.map +1 -1
- package/dist/tools/describe-sink.d.ts +6 -0
- package/dist/tools/describe-sink.d.ts.map +1 -1
- package/dist/tools/describe-sink.js +2 -1
- package/dist/tools/describe-sink.js.map +1 -1
- package/dist/tools/describe-source.d.ts +6 -0
- package/dist/tools/describe-source.d.ts.map +1 -1
- package/dist/tools/describe-source.js +2 -1
- package/dist/tools/describe-source.js.map +1 -1
- package/dist/tools/explain-finding.d.ts +6 -0
- package/dist/tools/explain-finding.d.ts.map +1 -1
- package/dist/tools/explain-finding.js +2 -1
- package/dist/tools/explain-finding.js.map +1 -1
- package/dist/tools/find-similar.d.ts +6 -0
- package/dist/tools/find-similar.d.ts.map +1 -1
- package/dist/tools/find-similar.js +2 -1
- package/dist/tools/find-similar.js.map +1 -1
- package/dist/tools/list-entry-points.d.ts +6 -0
- package/dist/tools/list-entry-points.d.ts.map +1 -1
- package/dist/tools/list-entry-points.js +2 -1
- package/dist/tools/list-entry-points.js.map +1 -1
- package/dist/tools/list-reachable-sinks.d.ts +6 -0
- package/dist/tools/list-reachable-sinks.d.ts.map +1 -1
- package/dist/tools/list-reachable-sinks.js +2 -1
- package/dist/tools/list-reachable-sinks.js.map +1 -1
- package/dist/tools/refresh.d.ts +6 -0
- package/dist/tools/refresh.d.ts.map +1 -1
- package/dist/tools/refresh.js +2 -1
- package/dist/tools/refresh.js.map +1 -1
- package/dist/tools/scan.d.ts +6 -0
- package/dist/tools/scan.d.ts.map +1 -1
- package/dist/tools/scan.js +2 -1
- package/dist/tools/scan.js.map +1 -1
- package/dist/tools/taint-paths.d.ts +6 -0
- package/dist/tools/taint-paths.d.ts.map +1 -1
- package/dist/tools/taint-paths.js +2 -1
- package/dist/tools/taint-paths.js.map +1 -1
- package/dist/tools/types.d.ts +31 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +32 -1
- package/dist/tools/types.js.map +1 -1
- package/package.json +15 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,107 @@ All notable changes to `@cognium/mcp-server` are documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.4.0] - 2026-10-02
|
|
8
|
+
|
|
9
|
+
Tested against `circle-ir` **4.9.29** (range `4.9`) and MCP SDK v2
|
|
10
|
+
(`@modelcontextprotocol/server` **^2.2.0**). No tool was added, removed or
|
|
11
|
+
renamed, and what each tool accepts and returns is unchanged.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **The server speaks MCP revision 2026-07-28**, next to the revisions it
|
|
15
|
+
already spoke. A client of the newer revision opens with `server/discover`
|
|
16
|
+
and puts its protocol version, identity and capabilities on every request;
|
|
17
|
+
results carry `resultType`, and the server's identity is in the result's
|
|
18
|
+
`_meta`. A client that opens with `initialize` is served exactly as before.
|
|
19
|
+
The era is chosen per connection over stdio and per request over HTTP, from
|
|
20
|
+
the same server.
|
|
21
|
+
- **`createHandler()`** — the server as a web-standard HTTP handler:
|
|
22
|
+
`handler.fetch(request)` returns the response. It builds a fresh server per
|
|
23
|
+
request, serves both eras from one endpoint, and resolves the optional
|
|
24
|
+
modules and the licence state once per process. This is what an HTTP host
|
|
25
|
+
should mount.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **The MCP SDK moves from `@modelcontextprotocol/sdk` 1.x to the v2 packages**
|
|
29
|
+
(`@modelcontextprotocol/server`, `@modelcontextprotocol/core`). The 1.x line
|
|
30
|
+
has no release that speaks 2026-07-28.
|
|
31
|
+
- **The stdio binary serves through the SDK's era-aware entry**, so one process
|
|
32
|
+
answers either kind of client. The bin name and its arguments are unchanged.
|
|
33
|
+
|
|
34
|
+
#### Consumer Impact
|
|
35
|
+
Each of these changes what a client sees without an error at the point of
|
|
36
|
+
change, on the 2025-era protocol as well as the new one.
|
|
37
|
+
|
|
38
|
+
- **Tool input schemas declare JSON Schema 2020-12, not draft-07.** The
|
|
39
|
+
`$schema` of every `inputSchema` in `tools/list` changes from
|
|
40
|
+
`http://json-schema.org/draft-07/schema#` to
|
|
41
|
+
`https://json-schema.org/draft/2020-12/schema`. The schemas are otherwise
|
|
42
|
+
identical, key for key: what a tool accepts has not changed. A client that
|
|
43
|
+
compiles `inputSchema` with a validator that only knows draft-07 will refuse
|
|
44
|
+
the new `$schema` and has to move to a 2020-12 validator or drop the keyword.
|
|
45
|
+
- **A call to a tool that does not exist is a JSON-RPC error**, `-32602` with
|
|
46
|
+
`Tool <name> not found`. It was a normal result with `isError: true`. A client
|
|
47
|
+
that looked at `result.isError` to detect an unknown tool gets an error
|
|
48
|
+
response instead and has to handle it there.
|
|
49
|
+
- **Error text loses its `MCP error -32602: ` prefix.** A tool called with
|
|
50
|
+
arguments that do not match its schema still returns a result with
|
|
51
|
+
`isError: true`; the message now starts `Input validation error: …`. Match on
|
|
52
|
+
the structure, not on the old prefix.
|
|
53
|
+
- **`createServer()` connected to a transport of your own serves the 2025-era
|
|
54
|
+
protocol only.** That is what it did before, so nothing breaks; but a host
|
|
55
|
+
that wants to serve 2026-07-28 has to mount `createHandler()` instead.
|
|
56
|
+
- **A tool module is registered on the v2 SDK's `McpServer`.** A module built
|
|
57
|
+
against the 1.x SDK still loads and its tools still work — `registerTool` is
|
|
58
|
+
called the same way — but its types no longer line up with this package's
|
|
59
|
+
`ToolModule`. `circle-ir-ai/mcp` needs a release built on the v2 SDK for a
|
|
60
|
+
host that type-checks the two together.
|
|
61
|
+
|
|
62
|
+
## [0.3.0] - 2026-10-02
|
|
63
|
+
|
|
64
|
+
Tested against `circle-ir` **4.9.29** (range `4.9`), MCP SDK **^1.30.1** and the
|
|
65
|
+
`circle-ir-ai/mcp` module **4.17.0**. No tool was removed or renamed and no
|
|
66
|
+
input schema changed.
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
- **Every tool declares annotations.** Ten of the eleven tools declare
|
|
70
|
+
`readOnlyHint: true`; all declare `destructiveHint: false`,
|
|
71
|
+
`idempotentHint: true` and `openWorldHint: false`. They read the project they
|
|
72
|
+
are pointed at and nothing else: no file is written or deleted and nothing
|
|
73
|
+
leaves the machine. `refresh` declares `readOnlyHint: false` — it touches no
|
|
74
|
+
file, but it drops entries from the server's in-memory cache, which is a
|
|
75
|
+
change of state. A test holds the read-only claim to what a call does: after
|
|
76
|
+
every tool has run, the analysed project is byte-for-byte as it was.
|
|
77
|
+
- **Every successful response carries `provenance`.** It is `"deterministic"`
|
|
78
|
+
for all eleven tools, and it is the last field of the JSON body. A response
|
|
79
|
+
from an optional module that used a model says `llm: <model>` instead, so a
|
|
80
|
+
client can read how an answer was produced rather than infer it from the
|
|
81
|
+
tool's name. Error results carry none.
|
|
82
|
+
- **`circle-ir-ai` is declared as an optional peer dependency** (`>=4.17.0`).
|
|
83
|
+
Nothing changes at runtime: the server still looks for `circle-ir-ai/mcp` at
|
|
84
|
+
startup and runs without it. The declaration lets npm warn when a
|
|
85
|
+
`circle-ir-ai` too old to carry the module is installed next to the server.
|
|
86
|
+
- A `default` condition on the package's `exports`, so
|
|
87
|
+
`require.resolve('@cognium/mcp-server')` finds the entry. The package is still
|
|
88
|
+
ESM only.
|
|
89
|
+
|
|
90
|
+
### Changed
|
|
91
|
+
- **A request with malformed parameters is answered `-32602`, not `-32603`.**
|
|
92
|
+
`tools/call` with a non-string `name`, with `arguments` that are not an
|
|
93
|
+
object, or with no `params`, and `resources/read` with no `uri`, used to
|
|
94
|
+
come back as an internal error carrying the validator's raw issue list. They
|
|
95
|
+
now get the code JSON-RPC reserves for invalid parameters and one line that
|
|
96
|
+
names the field: `Invalid params for tools/call: params.name: …`. A client
|
|
97
|
+
that matched on `-32603` for these should match on `-32602`.
|
|
98
|
+
|
|
99
|
+
Unchanged: an unknown method is `-32601`; a well-formed call to a tool with
|
|
100
|
+
wrong arguments is a tool result with `isError: true`, not a protocol error.
|
|
101
|
+
|
|
102
|
+
#### Consumer Impact
|
|
103
|
+
- **A consumer that compares a whole response body with a stored one** — a
|
|
104
|
+
snapshot test, a cache keyed on the response text — sees every successful
|
|
105
|
+
response change, because of the added `provenance` field. Nothing is removed
|
|
106
|
+
or renamed, so a consumer that reads fields by name is unaffected.
|
|
107
|
+
|
|
7
108
|
## [0.2.1] - 2026-10-02
|
|
8
109
|
|
|
9
110
|
Tested against `circle-ir` **4.9.29** (range `4.9`), MCP SDK **^1.30.1** and the
|
package/README.md
CHANGED
|
@@ -102,13 +102,26 @@ The package is side-effect free to import: nothing is built, read or connected
|
|
|
102
102
|
until you ask for it. The stdio binary is a separate file, so mounting the
|
|
103
103
|
server over your own transport does not spawn a subprocess.
|
|
104
104
|
|
|
105
|
+
Over HTTP, mount the handler. It is web-standard — a `Request` in, a `Response`
|
|
106
|
+
out — builds a fresh server per request, and serves both protocol eras:
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import { createHandler } from '@cognium/mcp-server';
|
|
110
|
+
|
|
111
|
+
const handler = createHandler();
|
|
112
|
+
// Hono, Workers, Deno, Bun: hand it the request.
|
|
113
|
+
app.all('/mcp', (c) => handler.fetch(c.req.raw));
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
To inspect what the install loaded, or to connect a transport of your own:
|
|
117
|
+
|
|
105
118
|
```ts
|
|
106
119
|
import { createServer } from '@cognium/mcp-server';
|
|
107
120
|
|
|
108
121
|
// Floor plus whatever optional modules this install has.
|
|
109
122
|
const { server, discovery } = await createServer();
|
|
110
123
|
console.error(discovery.enablement.state); // 'floor' | 'extended' | 'commercial'
|
|
111
|
-
await server.connect(myTransport);
|
|
124
|
+
await server.connect(myTransport); // serves the 2025-era protocol only
|
|
112
125
|
```
|
|
113
126
|
|
|
114
127
|
`buildServer(options)` is the synchronous form: it registers exactly what you
|
|
@@ -162,6 +175,24 @@ written. No key is baked in yet, so tokens currently report `no-key`.
|
|
|
162
175
|
No telemetry, no phone-home, and no feature is locked behind a token: the state
|
|
163
176
|
decides what is *listed*, and the terms carry the grant.
|
|
164
177
|
|
|
178
|
+
## What a response and a tool tell you
|
|
179
|
+
|
|
180
|
+
- **`provenance`** is the last field of every successful response:
|
|
181
|
+
`"deterministic"` for all eleven built-in tools. A tool from an optional module
|
|
182
|
+
that used a model says `llm: <model>`.
|
|
183
|
+
- **Annotations** are declared on every tool in `tools/list`. Ten are
|
|
184
|
+
`readOnlyHint: true`; none reaches the network (`openWorldHint: false`) or
|
|
185
|
+
deletes anything (`destructiveHint: false`). `refresh` is not read-only: it
|
|
186
|
+
writes no file, but it clears the server's in-memory cache.
|
|
187
|
+
- **Errors.** A malformed request gets a JSON-RPC error: `-32602` for bad
|
|
188
|
+
parameters or a tool that does not exist, `-32601` for an unknown method. A
|
|
189
|
+
well-formed call a tool cannot serve — an unknown sink type, a missing path —
|
|
190
|
+
is a normal result with `isError: true` and a message that says what to do.
|
|
191
|
+
- **Protocol revisions.** The server speaks MCP 2026-07-28 and the 2025-era
|
|
192
|
+
revisions before it, from the same binary and the same HTTP handler. A client
|
|
193
|
+
that opens with `initialize` and one that opens with `server/discover` are
|
|
194
|
+
both served; nothing has to be configured.
|
|
195
|
+
|
|
165
196
|
## Development
|
|
166
197
|
|
|
167
198
|
```bash
|
package/dist/bin.js
CHANGED
|
@@ -14,16 +14,22 @@
|
|
|
14
14
|
* `--version` and the initial handshake do not pay the ~200 ms tree-sitter
|
|
15
15
|
* cost.
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { serveStdio } from '@modelcontextprotocol/server/stdio';
|
|
18
|
+
import { buildServer, discoverModules } from './server.js';
|
|
19
19
|
import { startupLines } from './startup.js';
|
|
20
20
|
async function main() {
|
|
21
|
-
|
|
21
|
+
// Modules and the licence state are resolved once, before anything is
|
|
22
|
+
// served; every server the entry below builds reuses them.
|
|
23
|
+
const discovery = await discoverModules();
|
|
22
24
|
for (const line of startupLines(discovery)) {
|
|
23
25
|
process.stderr.write(`${line}\n`);
|
|
24
26
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
// `serveStdio` owns the transport and decides, from the client's opening
|
|
28
|
+
// message, which protocol era the connection speaks. A client that opens
|
|
29
|
+
// with `initialize` is served exactly as before; one that speaks the
|
|
30
|
+
// 2026-07-28 revision is served that. Either way it gets one server,
|
|
31
|
+
// built here, for the life of the connection.
|
|
32
|
+
serveStdio(() => buildServer({ modules: discovery.modules, enablement: discovery.enablement }));
|
|
27
33
|
}
|
|
28
34
|
main().catch((err) => {
|
|
29
35
|
// stderr is safe for stdio-transport servers (stdout is reserved for MCP
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,KAAK,UAAU,IAAI;IACjB,sEAAsE;IACtE,2DAA2D;IAC3D,MAAM,SAAS,GAAG,MAAM,eAAe,EAAE,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,yEAAyE;IACzE,yEAAyE;IACzE,qEAAqE;IACrE,qEAAqE;IACrE,8CAA8C;IAC9C,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,yEAAyE;IACzE,aAAa;IACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAiC,GAAa,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC;IACtF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* `createServer()` (floor plus whatever optional modules are installed) or
|
|
7
7
|
* `buildServer()` (exactly what it passes in). The stdio binary is `bin.ts`.
|
|
8
8
|
*/
|
|
9
|
-
export { buildServer, createServer, discoverModules, resetDiscoveryForTests, SERVER_NAME, SERVER_VERSION, type BuildServerOptions, type Discovery, } from './server.js';
|
|
9
|
+
export { buildServer, createServer, createHandler, discoverModules, resetDiscoveryForTests, SERVER_NAME, SERVER_VERSION, type BuildServerOptions, type Discovery, } from './server.js';
|
|
10
10
|
export { startupLines } from './startup.js';
|
|
11
11
|
export { loadModules, moduleSpecifiers, circleIrVersion, checkCircleIrRange, majorMinor, isToolModule, DEFAULT_MODULE_SPECIFIERS, ENV_MODULES, type ToolModule, type ModuleRefusal, type LoadModulesOptions, type LoadModulesResult, } from './modules.js';
|
|
12
12
|
export { computeEnablement, enablementForProcess, resetEnablementForTests, floorEnablement, configDir, ENV_ENDPOINT, ENV_LICENSE, ENV_LICENSE_PUBKEY, ENV_CONFIG_DIR, type Enablement, type LicenceState, } from './enablement.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACX,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACX,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* `createServer()` (floor plus whatever optional modules are installed) or
|
|
7
7
|
* `buildServer()` (exactly what it passes in). The stdio binary is `bin.ts`.
|
|
8
8
|
*/
|
|
9
|
-
export { buildServer, createServer, discoverModules, resetDiscoveryForTests, SERVER_NAME, SERVER_VERSION, } from './server.js';
|
|
9
|
+
export { buildServer, createServer, createHandler, discoverModules, resetDiscoveryForTests, SERVER_NAME, SERVER_VERSION, } from './server.js';
|
|
10
10
|
export { startupLines } from './startup.js';
|
|
11
11
|
export { loadModules, moduleSpecifiers, circleIrVersion, checkCircleIrRange, majorMinor, isToolModule, DEFAULT_MODULE_SPECIFIERS, ENV_MODULES, } from './modules.js';
|
|
12
12
|
export { computeEnablement, enablementForProcess, resetEnablementForTests, floorEnablement, configDir, ENV_ENDPOINT, ENV_LICENSE, ENV_LICENSE_PUBKEY, ENV_CONFIG_DIR, } from './enablement.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,cAAc,GAGf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C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AAM,UAAU,CAAC;AAElE,OAAO,EAAE,YAAY,EAA2B,MAAM,YAAY,CAAC"}
|
package/dist/licence.js
CHANGED
|
@@ -192,7 +192,7 @@ export function verifyLicence(token, opts = {}) {
|
|
|
192
192
|
detail: `the verification key for key id "${payload.kid}" is unusable`,
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
let signatureOk
|
|
195
|
+
let signatureOk;
|
|
196
196
|
try {
|
|
197
197
|
// Over the canonical form of everything that arrived, not the segment's
|
|
198
198
|
// own bytes and not just the fields this version reads.
|
package/dist/licence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"licence.js","sourceRoot":"","sources":["../src/licence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,eAAe,EAAkB,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AA6C7C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEvF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAE3B,MAAM,4BAA4B,GAAG,EAAE,CAAC;AACxC,iFAAiF;AACjF,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAuB;IACvD,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,CAA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GAAG,eAAe,CAAC,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,WAAW,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO;YACL,MAAM,EAAE,mBAAmB;YAC3B,MAAM,EAAE,wEAAwE;SACjF,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;IACnC,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;QACnD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO;YACP,MAAM,EAAE,eAAe,OAAO,CAAC,GAAG,eAAe,OAAO,CAAC,MAAM,EAAE;SAClE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,EAAE,OAAO;QACf,OAAO;QACP,MAAM,EAAE,eAAe,OAAO,CAAC,GAAG,KAAK,OAAO,CAAC,IAAI,cAAc,OAAO,CAAC,MAAM,EAAE;KAClF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAuB,EAAE,IAA+B;IACpF,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAChD,OAAO,GAAG,YAAY,IAAI,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;AAC/E,CAAC"}
|
package/dist/modules.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* is refused with one line on stderr, and the deterministic floor serves as
|
|
13
13
|
* normal. There is no state in which a bad module takes the server down.
|
|
14
14
|
*/
|
|
15
|
-
import type { McpServer } from
|
|
15
|
+
import type { McpServer } from "@modelcontextprotocol/server";
|
|
16
16
|
import type { ToolContext } from './tools/types.js';
|
|
17
17
|
export interface ToolModule {
|
|
18
18
|
/** Stable identifier, used in the startup line and refusal messages. */
|
package/dist/modules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,UAAU;IACzB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAAyB,CAAC;AAEjF,2EAA2E;AAC3E,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAEjD,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,SAAS,MAAM,EAAE,CAMxF;AAID,8DAA8D;AAC9D,wBAAgB,eAAe,IAAI,MAAM,CASxC;AAED,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGzD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAUhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAY9C;AAaD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7D;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAqC3F"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answer a request with bad parameters with the code reserved for it.
|
|
3
|
+
*
|
|
4
|
+
* JSON-RPC reserves `-32602` (Invalid params) for a request the server can
|
|
5
|
+
* read and whose parameters are wrong. The SDK validates a request's shape
|
|
6
|
+
* inside its handler and reports a failure there as `-32603` (Internal
|
|
7
|
+
* error), with the validator's raw issue list as the message — the wrong
|
|
8
|
+
* code, and a message written for the SDK's authors rather than the caller.
|
|
9
|
+
*
|
|
10
|
+
* This checks the shape first, against the SDK's own request schemas, and
|
|
11
|
+
* replies `-32602` with one line that names the offending field. It only
|
|
12
|
+
* ever acts on a request it is certain is malformed; everything else goes
|
|
13
|
+
* to the SDK untouched, so a request the SDK accepts is never refused here.
|
|
14
|
+
*
|
|
15
|
+
* It covers the methods this server serves. A method it has no schema for
|
|
16
|
+
* is passed through, and the SDK answers it — `-32601` if it is unknown.
|
|
17
|
+
*/
|
|
18
|
+
import type { Transport, JSONRPCMessage } from "@modelcontextprotocol/server";
|
|
19
|
+
/**
|
|
20
|
+
* The `-32602` reply for a message, or `null` if the message should go to
|
|
21
|
+
* the SDK as it is. Exported for the tests; `guardParams` is what a server
|
|
22
|
+
* uses.
|
|
23
|
+
*/
|
|
24
|
+
export declare function invalidParamsReply(message: unknown): JSONRPCMessage | null;
|
|
25
|
+
/**
|
|
26
|
+
* Put the check in front of a connected transport. Call it after
|
|
27
|
+
* `server.connect(transport)`, which is when the SDK installs the handler
|
|
28
|
+
* this wraps.
|
|
29
|
+
*/
|
|
30
|
+
export declare function guardParams(transport: Transport): void;
|
|
31
|
+
//# sourceMappingURL=params-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params-guard.d.ts","sourceRoot":"","sources":["../src/params-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AA2B9E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAgB1E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAWtD"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answer a request with bad parameters with the code reserved for it.
|
|
3
|
+
*
|
|
4
|
+
* JSON-RPC reserves `-32602` (Invalid params) for a request the server can
|
|
5
|
+
* read and whose parameters are wrong. The SDK validates a request's shape
|
|
6
|
+
* inside its handler and reports a failure there as `-32603` (Internal
|
|
7
|
+
* error), with the validator's raw issue list as the message — the wrong
|
|
8
|
+
* code, and a message written for the SDK's authors rather than the caller.
|
|
9
|
+
*
|
|
10
|
+
* This checks the shape first, against the SDK's own request schemas, and
|
|
11
|
+
* replies `-32602` with one line that names the offending field. It only
|
|
12
|
+
* ever acts on a request it is certain is malformed; everything else goes
|
|
13
|
+
* to the SDK untouched, so a request the SDK accepts is never refused here.
|
|
14
|
+
*
|
|
15
|
+
* It covers the methods this server serves. A method it has no schema for
|
|
16
|
+
* is passed through, and the SDK answers it — `-32601` if it is unknown.
|
|
17
|
+
*/
|
|
18
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema } from "@modelcontextprotocol/core";
|
|
19
|
+
import { ProtocolErrorCode } from "@modelcontextprotocol/server";
|
|
20
|
+
const SCHEMAS = {
|
|
21
|
+
'tools/call': CallToolRequestSchema,
|
|
22
|
+
'tools/list': ListToolsRequestSchema,
|
|
23
|
+
'resources/list': ListResourcesRequestSchema,
|
|
24
|
+
'resources/templates/list': ListResourceTemplatesRequestSchema,
|
|
25
|
+
'resources/read': ReadResourceRequestSchema,
|
|
26
|
+
};
|
|
27
|
+
/** One line naming the first field that is wrong. */
|
|
28
|
+
function describe(method, issues) {
|
|
29
|
+
const first = issues[0];
|
|
30
|
+
const where = first.path.map(String).join('.') || 'params';
|
|
31
|
+
return `Invalid params for ${method}: ${where}: ${first.message}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The `-32602` reply for a message, or `null` if the message should go to
|
|
35
|
+
* the SDK as it is. Exported for the tests; `guardParams` is what a server
|
|
36
|
+
* uses.
|
|
37
|
+
*/
|
|
38
|
+
export function invalidParamsReply(message) {
|
|
39
|
+
if (typeof message !== 'object' || message === null)
|
|
40
|
+
return null;
|
|
41
|
+
const { id, method } = message;
|
|
42
|
+
// Only requests are answered: a notification has no id and gets no reply.
|
|
43
|
+
if ((typeof id !== 'string' && typeof id !== 'number') || typeof method !== 'string')
|
|
44
|
+
return null;
|
|
45
|
+
const schema = SCHEMAS[method];
|
|
46
|
+
if (!schema)
|
|
47
|
+
return null;
|
|
48
|
+
const parsed = schema.safeParse(message);
|
|
49
|
+
if (parsed.success)
|
|
50
|
+
return null;
|
|
51
|
+
return {
|
|
52
|
+
jsonrpc: '2.0',
|
|
53
|
+
id,
|
|
54
|
+
error: { code: ProtocolErrorCode.InvalidParams, message: describe(method, parsed.error.issues) },
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Put the check in front of a connected transport. Call it after
|
|
59
|
+
* `server.connect(transport)`, which is when the SDK installs the handler
|
|
60
|
+
* this wraps.
|
|
61
|
+
*/
|
|
62
|
+
export function guardParams(transport) {
|
|
63
|
+
const inner = transport.onmessage;
|
|
64
|
+
if (!inner)
|
|
65
|
+
return;
|
|
66
|
+
transport.onmessage = (message, extra) => {
|
|
67
|
+
const reply = invalidParamsReply(message);
|
|
68
|
+
if (reply) {
|
|
69
|
+
void transport.send(reply);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
inner(message, extra);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=params-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params-guard.js","sourceRoot":"","sources":["../src/params-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEtL,OAAO,EAAE,iBAAiB,EAAE,MAAM,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M,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;KACjG,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,SAAoB;IAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC;IAClC,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,SAAS,CAAC,SAAS,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,OAAO;QACT,CAAC;QACD,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* cognium://sanitizer-catalog → every sanitizer entry
|
|
9
9
|
* cognium://passes → contents of circle-ir docs/PASSES.md
|
|
10
10
|
*/
|
|
11
|
-
import type { McpServer } from
|
|
11
|
+
import type { McpServer } from "@modelcontextprotocol/server";
|
|
12
12
|
export declare function registerResources(server: McpServer): void;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAsB9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA+FzD"}
|
package/dist/server.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and testable, and `index.ts` exports it so a host can mount it over HTTP
|
|
6
6
|
* without spawning a subprocess.
|
|
7
7
|
*/
|
|
8
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
8
|
+
import { McpServer, type CreateMcpHandlerOptions, type McpHttpHandler } from '@modelcontextprotocol/server';
|
|
9
9
|
import { type Enablement } from './enablement.js';
|
|
10
10
|
import { type ToolModule, type ModuleRefusal } from './modules.js';
|
|
11
11
|
export declare const SERVER_NAME: string;
|
|
@@ -50,4 +50,20 @@ export declare function createServer(opts?: Omit<BuildServerOptions, 'modules' |
|
|
|
50
50
|
server: McpServer;
|
|
51
51
|
discovery: Discovery;
|
|
52
52
|
}>;
|
|
53
|
+
/**
|
|
54
|
+
* The server as a web-standard HTTP handler: `handler.fetch(request)`
|
|
55
|
+
* returns the response. This is what an HTTP host mounts.
|
|
56
|
+
*
|
|
57
|
+
* It serves every request with a fresh server — floor plus whatever optional
|
|
58
|
+
* modules this install has — and it serves both protocol eras from the one
|
|
59
|
+
* endpoint: clients that open with `initialize`, statelessly, and clients
|
|
60
|
+
* that speak the 2026-07-28 revision. Module discovery and the licence state
|
|
61
|
+
* are resolved once per process, on the first request.
|
|
62
|
+
*
|
|
63
|
+
* A host that connects `createServer()`'s server to a transport of its own
|
|
64
|
+
* still works, and serves the 2025-era protocol only.
|
|
65
|
+
*/
|
|
66
|
+
export declare function createHandler(opts?: Omit<BuildServerOptions, 'modules' | 'enablement'> & {
|
|
67
|
+
handler?: CreateMcpHandlerOptions;
|
|
68
|
+
}): McpHttpHandler;
|
|
53
69
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mapp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AAS,GAAG,YAAY,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAAO,GACpG,cAAc,CAGhB"}
|
package/dist/server.js
CHANGED
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* without spawning a subprocess.
|
|
7
7
|
*/
|
|
8
8
|
import { createRequire } from 'node:module';
|
|
9
|
-
import { McpServer } from '@modelcontextprotocol/
|
|
9
|
+
import { McpServer, createMcpHandler } from '@modelcontextprotocol/server';
|
|
10
10
|
import { ProjectCache } from './cache.js';
|
|
11
11
|
import { registerResources } from './resources/index.js';
|
|
12
|
+
import { guardParams } from './params-guard.js';
|
|
12
13
|
import { floorEnablement, enablementForProcess } from './enablement.js';
|
|
13
14
|
import { loadModules, circleIrVersion, } from './modules.js';
|
|
14
15
|
import { scanConfig, makeScanHandler } from './tools/scan.js';
|
|
@@ -74,6 +75,15 @@ export function buildServer(opts = {}) {
|
|
|
74
75
|
process.stderr.write(`[${SERVER_NAME}] module ${mod.id}@${mod.version} failed to register: ${err.message}\n`);
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
// Whatever transport a host connects — stdio here, streamable HTTP in a
|
|
79
|
+
// host of its own — a request with malformed parameters gets the reserved
|
|
80
|
+
// error code. The check has to sit in front of the SDK's handler, and the
|
|
81
|
+
// SDK only installs that at connect time, so it is added there.
|
|
82
|
+
const connect = server.connect.bind(server);
|
|
83
|
+
server.connect = async (transport) => {
|
|
84
|
+
await connect(transport);
|
|
85
|
+
guardParams(transport);
|
|
86
|
+
};
|
|
77
87
|
return server;
|
|
78
88
|
}
|
|
79
89
|
let discovery;
|
|
@@ -112,4 +122,21 @@ export async function createServer(opts = {}) {
|
|
|
112
122
|
});
|
|
113
123
|
return { server, discovery: found };
|
|
114
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* The server as a web-standard HTTP handler: `handler.fetch(request)`
|
|
127
|
+
* returns the response. This is what an HTTP host mounts.
|
|
128
|
+
*
|
|
129
|
+
* It serves every request with a fresh server — floor plus whatever optional
|
|
130
|
+
* modules this install has — and it serves both protocol eras from the one
|
|
131
|
+
* endpoint: clients that open with `initialize`, statelessly, and clients
|
|
132
|
+
* that speak the 2026-07-28 revision. Module discovery and the licence state
|
|
133
|
+
* are resolved once per process, on the first request.
|
|
134
|
+
*
|
|
135
|
+
* A host that connects `createServer()`'s server to a transport of its own
|
|
136
|
+
* still works, and serves the 2025-era protocol only.
|
|
137
|
+
*/
|
|
138
|
+
export function createHandler(opts = {}) {
|
|
139
|
+
const { handler, ...build } = opts;
|
|
140
|
+
return createMcpHandler(async () => (await createServer(build)).server, handler);
|
|
141
|
+
}
|
|
115
142
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAqD,MAAM,8BAA8B,CAAC;AAC9H,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAmB,MAAM,iBAAiB,CAAC;AACzF,OAAO,EACL,WAAW,EACX,eAAe,GAGhB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,E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AC,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACrD,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,sBAAsB;IACpC,SAAS,GAAG,SAAS,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAAI,GAAuD,EAAE;IAE7D,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,GAAG,IAAI;QACP,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAI,GAA+F,EAAE;IAErG,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;IACnC,OAAO,gBAAgB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -17,6 +17,12 @@ export declare const attackSurfaceSummaryConfig: {
|
|
|
17
17
|
readonly inputSchema: {
|
|
18
18
|
readonly project_root: z.ZodString;
|
|
19
19
|
};
|
|
20
|
+
readonly annotations: {
|
|
21
|
+
readonly readOnlyHint: true;
|
|
22
|
+
readonly destructiveHint: false;
|
|
23
|
+
readonly idempotentHint: true;
|
|
24
|
+
readonly openWorldHint: false;
|
|
25
|
+
};
|
|
20
26
|
};
|
|
21
27
|
export declare function makeAttackSurfaceSummaryHandler(ctx: ToolContext): (args: {
|
|
22
28
|
project_root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attack-surface-summary.d.ts","sourceRoot":"","sources":["../../src/tools/attack-surface-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG1D,eAAO,MAAM,8BAA8B;aACzC,YAAY;CACJ,CAAC;AAEX,eAAO,MAAM,0BAA0B;aACrC,KAAK,EAAE,wBAAwB;aAC/B,WAAW;aAIX,WAAW;;;CACH,CAAC;AAEX,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,WAAW,UAC1C;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,CAAC,UAAU,CAAC,CAkGnE"}
|
|
1
|
+
{"version":3,"file":"attack-surface-summary.d.ts","sourceRoot":"","sources":["../../src/tools/attack-surface-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG1D,eAAO,MAAM,8BAA8B;aACzC,YAAY;CACJ,CAAC;AAEX,eAAO,MAAM,0BAA0B;aACrC,KAAK,EAAE,wBAAwB;aAC/B,WAAW;aAIX,WAAW;;;aACX,WAAW;;;;;;CACH,CAAC;AAEX,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,WAAW,UAC1C;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,KAAG,OAAO,CAAC,UAAU,CAAC,CAkGnE"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { resolve } from 'path';
|
|
11
11
|
import { RULE_DEFINITIONS } from 'circle-ir';
|
|
12
|
-
import { textResult } from './types.js';
|
|
12
|
+
import { textResult, READ_ONLY_ANNOTATIONS } from './types.js';
|
|
13
13
|
export const attackSurfaceSummaryInputShape = {
|
|
14
14
|
project_root: z.string().describe('Absolute path to the project root.'),
|
|
15
15
|
};
|
|
@@ -19,6 +19,7 @@ export const attackSurfaceSummaryConfig = {
|
|
|
19
19
|
'total sinks by category, cross-file taint-path totals per sink type, and the top 10 files by finding ' +
|
|
20
20
|
'count. Use as the entry-level tool for "what does this codebase look like from a security angle?"',
|
|
21
21
|
inputSchema: attackSurfaceSummaryInputShape,
|
|
22
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
22
23
|
};
|
|
23
24
|
export function makeAttackSurfaceSummaryHandler(ctx) {
|
|
24
25
|
return async (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attack-surface-summary.js","sourceRoot":"","sources":["../../src/tools/attack-surface-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"attack-surface-summary.js","sourceRoot":"","sources":["../../src/tools/attack-surface-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;C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@ export declare const checkSanitizerConfig: {
|
|
|
38
38
|
typescript: "typescript";
|
|
39
39
|
}>>;
|
|
40
40
|
};
|
|
41
|
+
readonly annotations: {
|
|
42
|
+
readonly readOnlyHint: true;
|
|
43
|
+
readonly destructiveHint: false;
|
|
44
|
+
readonly idempotentHint: true;
|
|
45
|
+
readonly openWorldHint: false;
|
|
46
|
+
};
|
|
41
47
|
};
|
|
42
48
|
export declare function makeCheckSanitizerHandler(_ctx: ToolContext): (args: {
|
|
43
49
|
function_qualified_name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-sanitizer.d.ts","sourceRoot":"","sources":["../../src/tools/check-sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI1D,eAAO,MAAM,wBAAwB;aACnC,uBAAuB;aAEvB,SAAS;aAET,QAAQ;;;;;;;;;;CAGA,CAAC;AAEX,eAAO,MAAM,oBAAoB;aAC/B,KAAK,EAAE,0BAA0B;aACjC,WAAW;aAIX,WAAW;;;;;;;;;;;;;;CACH,CAAC;AAEX,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,WAAW,UACrC;IAClB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAAG,OAAO,CAAC,UAAU,CAAC,CA0DxB"}
|
|
1
|
+
{"version":3,"file":"check-sanitizer.d.ts","sourceRoot":"","sources":["../../src/tools/check-sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI1D,eAAO,MAAM,wBAAwB;aACnC,uBAAuB;aAEvB,SAAS;aAET,QAAQ;;;;;;;;;;CAGA,CAAC;AAEX,eAAO,MAAM,oBAAoB;aAC/B,KAAK,EAAE,0BAA0B;aACjC,WAAW;aAIX,WAAW;;;;;;;;;;;;;;aACX,WAAW;;;;;;CACH,CAAC;AAEX,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,WAAW,UACrC;IAClB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAAG,OAAO,CAAC,UAAU,CAAC,CA0DxB"}
|