@cognium/mcp-server 0.7.0 → 0.8.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 +34 -0
- package/README.md +22 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/dependency-calls.d.ts +233 -0
- package/dist/tools/dependency-calls.d.ts.map +1 -0
- package/dist/tools/dependency-calls.js +312 -0
- package/dist/tools/dependency-calls.js.map +1 -0
- package/dist/tools/types.d.ts +7 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ 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
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.8.0] - 2026-10-31
|
|
10
|
+
|
|
11
|
+
Tested against `circle-ir` **4.16.1** (unchanged). The optional module to pair
|
|
12
|
+
it with is still `circle-ir-ai` **4.29.0**, built on `4.16.1`. A minor because
|
|
13
|
+
one tool is added; no tool was removed or renamed and no input schema changed.
|
|
14
|
+
|
|
15
|
+
`@cognium/code-facts` stays an **optional peer** in this release. Its 0.1.0
|
|
16
|
+
depends on `circle-ir` `>=4.18.0`, so as an exact dependency it would install a
|
|
17
|
+
second `circle-ir` beside the pinned 4.16.1. It becomes an exact dependency in
|
|
18
|
+
the release that moves the pin to 4.18, once a `circle-ir-ai` built on 4.18 is
|
|
19
|
+
published (the release train requires it).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **`dependency_calls`** (C4 0.5.0 §11, §11c; E02): for a Maven dependency
|
|
24
|
+
bump, every call site that lands on the artifact, the tests that reach each
|
|
25
|
+
one, and the sites that cannot be ruled in or out, in the shape of
|
|
26
|
+
`cognium-dev depcalls -f json`. Inputs `project_root`, `artifact`
|
|
27
|
+
(`groupId:artifactId[:version]`), `language` (`java`), `jar_path`,
|
|
28
|
+
`maven_repo_dir`, `limit`; declares an `outputSchema` and returns
|
|
29
|
+
`structuredContent`. Read-only and local. Computed by
|
|
30
|
+
`@cognium/code-facts` `runDependencyCalls` (0.1.0 or later), an **optional
|
|
31
|
+
peer**: install it beside this package to use the tool, which answers one
|
|
32
|
+
line while it is missing.
|
|
33
|
+
- `buildServer({ allowedRoots })`: directories a path argument must lie in,
|
|
34
|
+
read by `dependency_calls` (absent: unconfined, as before).
|
|
35
|
+
|
|
36
|
+
### Security
|
|
37
|
+
|
|
38
|
+
- Production dependency audit (#40): `@modelcontextprotocol/server` 2.4.0 and
|
|
39
|
+
`zod` 4.6.7.
|
|
40
|
+
|
|
7
41
|
## [0.7.0] - 2026-10-17
|
|
8
42
|
|
|
9
43
|
Tested against `circle-ir` **4.16.1**. The optional module to pair it with is
|
package/README.md
CHANGED
|
@@ -78,6 +78,7 @@ The same stdio config is bundled in the [Cognium SAST plugin](../../plugins/cogn
|
|
|
78
78
|
| `find_similar` | Given a finding id, return other findings sharing the same `rule_id` and/or `sink_type`. |
|
|
79
79
|
| `find_callers` | Who calls a method, with a resolution tier on every answer and a reason on every site it could not resolve. Java. |
|
|
80
80
|
| `find_callees` | What a method calls, with the same tiers and reasons. Java. |
|
|
81
|
+
| `dependency_calls` | For a Maven dependency bump: every call into the artifact, the tests that reach each one, and the sites that cannot be ruled in or out. Java. Needs `@cognium/code-facts` (not published yet). |
|
|
81
82
|
| `refresh` | Manually invalidate the cache for one project or every project. |
|
|
82
83
|
|
|
83
84
|
## Resources
|
|
@@ -113,6 +114,27 @@ the plugin's **Suggest find_callers after reading Java** option in `/config`, or
|
|
|
113
114
|
changes nothing about the server: the tools, their schemas and their answers are
|
|
114
115
|
the same with it and without it.
|
|
115
116
|
|
|
117
|
+
## Calls into a dependency
|
|
118
|
+
|
|
119
|
+
`dependency_calls` takes `project_root` (the tree after the bump) and
|
|
120
|
+
`artifact` (`groupId:artifactId[:version]`). The artifact's packages come from
|
|
121
|
+
`jar_path`, else the jar in the local Maven repository (`maven_repo_dir`,
|
|
122
|
+
`$MAVEN_REPO_LOCAL` or `~/.m2/repository`) for a versioned coordinate, else a
|
|
123
|
+
built-in table of common artifacts; `packageSource` says which, and an
|
|
124
|
+
artifact none resolves is refused rather than answered as "0 calls". The
|
|
125
|
+
answer is the object `cognium-dev depcalls -f json` prints: `calls[]` with the
|
|
126
|
+
tests reaching each (covered when `tests[0].class` is `strong`), `covered`,
|
|
127
|
+
`uncovered`, `unattributedSites[]` and `partial[]`, plus `engine`, `facts`,
|
|
128
|
+
`counts` and truncation. The contract is C4 0.5.0 §11c.
|
|
129
|
+
|
|
130
|
+
It is computed by `@cognium/code-facts`, which is not on npm yet (it needs a
|
|
131
|
+
`circle-ir` release carrying `dependencyCalls`). Until then it is an optional
|
|
132
|
+
peer: install it beside the server from a cognium-dev build, or the tool
|
|
133
|
+
answers with one line saying it is missing. For development, extract the
|
|
134
|
+
packed `@cognium/code-facts` into `node_modules/@cognium/code-facts` and the
|
|
135
|
+
packed `circle-ir` it was built on into its own `node_modules/circle-ir`, so
|
|
136
|
+
the server's `circle-ir` stays the pinned one.
|
|
137
|
+
|
|
116
138
|
## Reading a navigation answer
|
|
117
139
|
|
|
118
140
|
`find_callers` and `find_callees` report a **tier** on every answer and a
|
package/dist/server.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface BuildServerOptions {
|
|
|
24
24
|
* a server built with no modules.
|
|
25
25
|
*/
|
|
26
26
|
enablement?: Enablement;
|
|
27
|
+
/** Directories a path argument must lie inside (`ToolContext.allowedRoots`). Absent: unconfined. */
|
|
28
|
+
allowedRoots?: readonly string[];
|
|
27
29
|
}
|
|
28
30
|
export declare function buildServer(opts?: BuildServerOptions): McpServer;
|
|
29
31
|
export interface Discovery {
|
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,EAAoB,KAAK,uBAAuB,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9H,OAAO,EAAyC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAoB,KAAK,uBAAuB,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9H,OAAO,EAAyC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AA0CtB,eAAO,MAAM,WAAW,QAAgB,CAAC;AACzC,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oGAAoG;IACpG,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,wBAAgB,WAAW,CAAC,IAAI,GAAE,kBAAuB,GAAG,SAAS,CAoDpE;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,SAAS,CAAC,CAUpD;AAED,4EAA4E;AAC5E,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAChC,IAAI,GAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,YAAY,CAAM,GAC5D,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC,CAQtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,IAAI,GAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,YAAY,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAAO,GACpG,cAAc,CAGhB"}
|
package/dist/server.js
CHANGED
|
@@ -23,6 +23,7 @@ import { attackSurfaceSummaryConfig, makeAttackSurfaceSummaryHandler } from './t
|
|
|
23
23
|
import { listReachableSinksConfig, makeListReachableSinksHandler } from './tools/list-reachable-sinks.js';
|
|
24
24
|
import { findSimilarConfig, makeFindSimilarHandler } from './tools/find-similar.js';
|
|
25
25
|
import { refreshConfig, makeRefreshHandler } from './tools/refresh.js';
|
|
26
|
+
import { dependencyCallsConfig, makeDependencyCallsHandler } from './tools/dependency-calls.js';
|
|
26
27
|
import { findCallersConfig, makeFindCallersHandler, findCalleesConfig, makeFindCalleesHandler, } from './tools/navigation.js';
|
|
27
28
|
const require_ = createRequire(import.meta.url);
|
|
28
29
|
/**
|
|
@@ -50,6 +51,7 @@ export function buildServer(opts = {}) {
|
|
|
50
51
|
const ctx = {
|
|
51
52
|
cache,
|
|
52
53
|
enablement: opts.enablement ?? floorEnablement(),
|
|
54
|
+
...(opts.allowedRoots ? { allowedRoots: opts.allowedRoots } : {}),
|
|
53
55
|
};
|
|
54
56
|
const server = new McpServer(IDENTITY);
|
|
55
57
|
server.registerTool('scan', scanConfig, makeScanHandler(ctx));
|
|
@@ -64,6 +66,7 @@ export function buildServer(opts = {}) {
|
|
|
64
66
|
server.registerTool('find_similar', findSimilarConfig, makeFindSimilarHandler(ctx));
|
|
65
67
|
server.registerTool('find_callers', findCallersConfig, makeFindCallersHandler(ctx));
|
|
66
68
|
server.registerTool('find_callees', findCalleesConfig, makeFindCalleesHandler(ctx));
|
|
69
|
+
server.registerTool('dependency_calls', dependencyCallsConfig, makeDependencyCallsHandler(ctx));
|
|
67
70
|
server.registerTool('refresh', refreshConfig, makeRefreshHandler(ctx));
|
|
68
71
|
registerResources(server);
|
|
69
72
|
// A module that throws while registering is refused like any other bad
|
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,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,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,E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,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"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dependency_calls` — for a dependency bump (E02), every call site in the
|
|
3
|
+
* subject that lands on one Maven artifact, the tests that reach each one,
|
|
4
|
+
* and the external sites that cannot be ruled in or out.
|
|
5
|
+
*
|
|
6
|
+
* Contract: C4 0.5.0 §11 and §11c (techspec
|
|
7
|
+
* `services/cognium-engine/reference/engine-tool-contract.md`). The answer is
|
|
8
|
+
* the object `cognium-dev depcalls -f json` prints — circle-ir's
|
|
9
|
+
* `dependency-calls@0.1` result, unchanged — inside this server's envelope.
|
|
10
|
+
* It is computed by `@cognium/code-facts`' `runDependencyCalls`, so the CLI,
|
|
11
|
+
* the static capability a Conformis adapter calls and this tool give one
|
|
12
|
+
* answer; this file only finds the jar, turns the capability's anchors back
|
|
13
|
+
* into that object, and cuts the two lists at `limit`.
|
|
14
|
+
*
|
|
15
|
+
* `@cognium/code-facts` is not published yet, and neither is a `circle-ir`
|
|
16
|
+
* that carries `dependencyCalls`. Until both are, the package is an optional
|
|
17
|
+
* peer: it is imported when the tool is called, and the tool answers with one
|
|
18
|
+
* line when it is missing, while every other tool keeps serving.
|
|
19
|
+
*/
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
import type { ToolContext, ToolResult } from './types.js';
|
|
22
|
+
/** Default and maximum for `limit`, per list. */
|
|
23
|
+
export declare const DEFAULT_DEPENDENCY_CALLS_LIMIT = 500;
|
|
24
|
+
export declare const MAX_DEPENDENCY_CALLS_LIMIT = 5000;
|
|
25
|
+
/** The observation shape this tool reads; another is refused, as a consumer must. */
|
|
26
|
+
export declare const CODE_FACTS_SCHEMA = "0.1";
|
|
27
|
+
export declare const CODE_FACTS_PACKAGE = "@cognium/code-facts";
|
|
28
|
+
interface RunResult {
|
|
29
|
+
driver: {
|
|
30
|
+
id: string;
|
|
31
|
+
family: string;
|
|
32
|
+
version: string;
|
|
33
|
+
};
|
|
34
|
+
schemaVersion: string;
|
|
35
|
+
capability: string;
|
|
36
|
+
anchors: Array<{
|
|
37
|
+
anchor: string;
|
|
38
|
+
observation: unknown;
|
|
39
|
+
inputDigest: string;
|
|
40
|
+
}>;
|
|
41
|
+
environmentDigest: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CodeFacts {
|
|
44
|
+
/** `DRIVER.version` of the package. */
|
|
45
|
+
version: string;
|
|
46
|
+
schemaVersion: string;
|
|
47
|
+
/** The `circle-ir` the package runs on, read from its own resolution. */
|
|
48
|
+
engineVersion: string;
|
|
49
|
+
mavenJarPath(coordinate: string, repo: string): string | null;
|
|
50
|
+
runDependencyCalls(root: string, views: {
|
|
51
|
+
jar?: Uint8Array;
|
|
52
|
+
}, params: {
|
|
53
|
+
artifact: string;
|
|
54
|
+
language: 'java';
|
|
55
|
+
jarPath?: string;
|
|
56
|
+
}): Promise<RunResult>;
|
|
57
|
+
}
|
|
58
|
+
/** A loader returns the package, or a one-line reason it cannot be used. */
|
|
59
|
+
export type CodeFactsLoader = () => Promise<CodeFacts | {
|
|
60
|
+
refused: string;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* Import `@cognium/code-facts` beside the server. Refused, with a reason, when
|
|
64
|
+
* it is not installed, does not serve `dependency-calls`, or serves another
|
|
65
|
+
* observation schema. `importer` is a seam for tests.
|
|
66
|
+
*/
|
|
67
|
+
export declare function makeCodeFactsLoader(importer?: (specifier: string) => Promise<unknown>): CodeFactsLoader;
|
|
68
|
+
export declare const loadCodeFacts: CodeFactsLoader;
|
|
69
|
+
export declare const dependencyCallsInputShape: {
|
|
70
|
+
readonly project_root: z.ZodString;
|
|
71
|
+
readonly artifact: z.ZodString;
|
|
72
|
+
readonly language: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
java: "java";
|
|
74
|
+
}>>;
|
|
75
|
+
readonly jar_path: z.ZodOptional<z.ZodString>;
|
|
76
|
+
readonly maven_repo_dir: z.ZodOptional<z.ZodString>;
|
|
77
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
};
|
|
79
|
+
export declare const dependencyCallsOutputShape: {
|
|
80
|
+
readonly projectRoot: z.ZodString;
|
|
81
|
+
readonly language: z.ZodLiteral<"java">;
|
|
82
|
+
readonly engine: z.ZodObject<{
|
|
83
|
+
package: z.ZodLiteral<"circle-ir">;
|
|
84
|
+
version: z.ZodString;
|
|
85
|
+
}, z.core.$loose>;
|
|
86
|
+
readonly facts: z.ZodObject<{
|
|
87
|
+
package: z.ZodLiteral<"@cognium/code-facts">;
|
|
88
|
+
version: z.ZodString;
|
|
89
|
+
schemaVersion: z.ZodString;
|
|
90
|
+
}, z.core.$loose>;
|
|
91
|
+
readonly jar: z.ZodOptional<z.ZodString>;
|
|
92
|
+
readonly scheme: z.ZodString;
|
|
93
|
+
readonly ids: z.ZodString;
|
|
94
|
+
readonly artifact: z.ZodString;
|
|
95
|
+
readonly packages: z.ZodArray<z.ZodString>;
|
|
96
|
+
readonly packageSource: z.ZodString;
|
|
97
|
+
readonly jarDigest: z.ZodOptional<z.ZodString>;
|
|
98
|
+
readonly calls: z.ZodArray<z.ZodObject<{
|
|
99
|
+
from: z.ZodString;
|
|
100
|
+
site: z.ZodObject<{
|
|
101
|
+
file: z.ZodString;
|
|
102
|
+
line: z.ZodNumber;
|
|
103
|
+
col: z.ZodNumber;
|
|
104
|
+
}, z.core.$loose>;
|
|
105
|
+
methodName: z.ZodString;
|
|
106
|
+
receiver: z.ZodString;
|
|
107
|
+
tests: z.ZodArray<z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
file: z.ZodString;
|
|
110
|
+
line: z.ZodNumber;
|
|
111
|
+
class: z.ZodString;
|
|
112
|
+
}, z.core.$loose>>;
|
|
113
|
+
}, z.core.$loose>>;
|
|
114
|
+
readonly uncovered: z.ZodNumber;
|
|
115
|
+
readonly covered: z.ZodBoolean;
|
|
116
|
+
readonly unattributed: z.ZodNumber;
|
|
117
|
+
readonly unattributedSites: z.ZodArray<z.ZodObject<{
|
|
118
|
+
from: z.ZodString;
|
|
119
|
+
site: z.ZodObject<{
|
|
120
|
+
file: z.ZodString;
|
|
121
|
+
line: z.ZodNumber;
|
|
122
|
+
col: z.ZodNumber;
|
|
123
|
+
}, z.core.$loose>;
|
|
124
|
+
methodName: z.ZodString;
|
|
125
|
+
}, z.core.$loose>>;
|
|
126
|
+
readonly partial: z.ZodArray<z.ZodString>;
|
|
127
|
+
readonly partialFiles: z.ZodArray<z.ZodObject<{
|
|
128
|
+
file: z.ZodString;
|
|
129
|
+
}, z.core.$loose>>;
|
|
130
|
+
readonly counts: z.ZodObject<{
|
|
131
|
+
calls: z.ZodNumber;
|
|
132
|
+
covered: z.ZodNumber;
|
|
133
|
+
uncovered: z.ZodNumber;
|
|
134
|
+
unattributed: z.ZodNumber;
|
|
135
|
+
}, z.core.$loose>;
|
|
136
|
+
readonly totalCalls: z.ZodNumber;
|
|
137
|
+
readonly truncated: z.ZodBoolean;
|
|
138
|
+
readonly note: z.ZodOptional<z.ZodString>;
|
|
139
|
+
readonly provenance: z.ZodString;
|
|
140
|
+
};
|
|
141
|
+
export declare const dependencyCallsConfig: {
|
|
142
|
+
readonly title: 'List the calls into one dependency, and the tests that reach them';
|
|
143
|
+
readonly description: string;
|
|
144
|
+
readonly inputSchema: {
|
|
145
|
+
readonly project_root: z.ZodString;
|
|
146
|
+
readonly artifact: z.ZodString;
|
|
147
|
+
readonly language: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
java: "java";
|
|
149
|
+
}>>;
|
|
150
|
+
readonly jar_path: z.ZodOptional<z.ZodString>;
|
|
151
|
+
readonly maven_repo_dir: z.ZodOptional<z.ZodString>;
|
|
152
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
};
|
|
154
|
+
readonly outputSchema: {
|
|
155
|
+
readonly projectRoot: z.ZodString;
|
|
156
|
+
readonly language: z.ZodLiteral<"java">;
|
|
157
|
+
readonly engine: z.ZodObject<{
|
|
158
|
+
package: z.ZodLiteral<"circle-ir">;
|
|
159
|
+
version: z.ZodString;
|
|
160
|
+
}, z.core.$loose>;
|
|
161
|
+
readonly facts: z.ZodObject<{
|
|
162
|
+
package: z.ZodLiteral<"@cognium/code-facts">;
|
|
163
|
+
version: z.ZodString;
|
|
164
|
+
schemaVersion: z.ZodString;
|
|
165
|
+
}, z.core.$loose>;
|
|
166
|
+
readonly jar: z.ZodOptional<z.ZodString>;
|
|
167
|
+
readonly scheme: z.ZodString;
|
|
168
|
+
readonly ids: z.ZodString;
|
|
169
|
+
readonly artifact: z.ZodString;
|
|
170
|
+
readonly packages: z.ZodArray<z.ZodString>;
|
|
171
|
+
readonly packageSource: z.ZodString;
|
|
172
|
+
readonly jarDigest: z.ZodOptional<z.ZodString>;
|
|
173
|
+
readonly calls: z.ZodArray<z.ZodObject<{
|
|
174
|
+
from: z.ZodString;
|
|
175
|
+
site: z.ZodObject<{
|
|
176
|
+
file: z.ZodString;
|
|
177
|
+
line: z.ZodNumber;
|
|
178
|
+
col: z.ZodNumber;
|
|
179
|
+
}, z.core.$loose>;
|
|
180
|
+
methodName: z.ZodString;
|
|
181
|
+
receiver: z.ZodString;
|
|
182
|
+
tests: z.ZodArray<z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
file: z.ZodString;
|
|
185
|
+
line: z.ZodNumber;
|
|
186
|
+
class: z.ZodString;
|
|
187
|
+
}, z.core.$loose>>;
|
|
188
|
+
}, z.core.$loose>>;
|
|
189
|
+
readonly uncovered: z.ZodNumber;
|
|
190
|
+
readonly covered: z.ZodBoolean;
|
|
191
|
+
readonly unattributed: z.ZodNumber;
|
|
192
|
+
readonly unattributedSites: z.ZodArray<z.ZodObject<{
|
|
193
|
+
from: z.ZodString;
|
|
194
|
+
site: z.ZodObject<{
|
|
195
|
+
file: z.ZodString;
|
|
196
|
+
line: z.ZodNumber;
|
|
197
|
+
col: z.ZodNumber;
|
|
198
|
+
}, z.core.$loose>;
|
|
199
|
+
methodName: z.ZodString;
|
|
200
|
+
}, z.core.$loose>>;
|
|
201
|
+
readonly partial: z.ZodArray<z.ZodString>;
|
|
202
|
+
readonly partialFiles: z.ZodArray<z.ZodObject<{
|
|
203
|
+
file: z.ZodString;
|
|
204
|
+
}, z.core.$loose>>;
|
|
205
|
+
readonly counts: z.ZodObject<{
|
|
206
|
+
calls: z.ZodNumber;
|
|
207
|
+
covered: z.ZodNumber;
|
|
208
|
+
uncovered: z.ZodNumber;
|
|
209
|
+
unattributed: z.ZodNumber;
|
|
210
|
+
}, z.core.$loose>;
|
|
211
|
+
readonly totalCalls: z.ZodNumber;
|
|
212
|
+
readonly truncated: z.ZodBoolean;
|
|
213
|
+
readonly note: z.ZodOptional<z.ZodString>;
|
|
214
|
+
readonly provenance: z.ZodString;
|
|
215
|
+
};
|
|
216
|
+
readonly annotations: {
|
|
217
|
+
readonly readOnlyHint: true;
|
|
218
|
+
readonly destructiveHint: false;
|
|
219
|
+
readonly idempotentHint: true;
|
|
220
|
+
readonly openWorldHint: false;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
export interface DependencyCallsArgs {
|
|
224
|
+
project_root: string;
|
|
225
|
+
artifact: string;
|
|
226
|
+
language?: 'java';
|
|
227
|
+
jar_path?: string;
|
|
228
|
+
maven_repo_dir?: string;
|
|
229
|
+
limit?: number;
|
|
230
|
+
}
|
|
231
|
+
export declare function makeDependencyCallsHandler(ctx: ToolContext, load?: CodeFactsLoader): (args: DependencyCallsArgs) => Promise<ToolResult>;
|
|
232
|
+
export {};
|
|
233
|
+
//# sourceMappingURL=dependency-calls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-calls.d.ts","sourceRoot":"","sources":["../../src/tools/dependency-calls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG1D,iDAAiD;AACjD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AACvC,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAmCxD,UAAU,SAAS;IACjB,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK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T,KAAK;;;;;;;;;;;;;;;;aASL,SAAS;aACT,OAAO;aACP,YAAY;aACZ,iBAAiB;;;;;;;;;aACjB,OAAO;aACP,YAAY;;;aACZ,MAAM;;;;;;aACN,UAAU;aACV,SAAS;aACT,IAAI;aACJ,UAAU;CACF,CAAC;AAEX,eAAO,MAAM,qBAAqB;aAChC,KAAK,EAAE,mEAAmE;aAC1E,WAAW;aAYX,WAAW;;;;;;;;;;aACX,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aACZ,WAAW;;;;;;CACH,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkDD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,GAAE,eAA+B,UAC5E,mBAAmB,KAAG,OAAO,CAAC,UAAU,CAAC,CAwG9D"}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dependency_calls` — for a dependency bump (E02), every call site in the
|
|
3
|
+
* subject that lands on one Maven artifact, the tests that reach each one,
|
|
4
|
+
* and the external sites that cannot be ruled in or out.
|
|
5
|
+
*
|
|
6
|
+
* Contract: C4 0.5.0 §11 and §11c (techspec
|
|
7
|
+
* `services/cognium-engine/reference/engine-tool-contract.md`). The answer is
|
|
8
|
+
* the object `cognium-dev depcalls -f json` prints — circle-ir's
|
|
9
|
+
* `dependency-calls@0.1` result, unchanged — inside this server's envelope.
|
|
10
|
+
* It is computed by `@cognium/code-facts`' `runDependencyCalls`, so the CLI,
|
|
11
|
+
* the static capability a Conformis adapter calls and this tool give one
|
|
12
|
+
* answer; this file only finds the jar, turns the capability's anchors back
|
|
13
|
+
* into that object, and cuts the two lists at `limit`.
|
|
14
|
+
*
|
|
15
|
+
* `@cognium/code-facts` is not published yet, and neither is a `circle-ir`
|
|
16
|
+
* that carries `dependencyCalls`. Until both are, the package is an optional
|
|
17
|
+
* peer: it is imported when the tool is called, and the tool answers with one
|
|
18
|
+
* line when it is missing, while every other tool keeps serving.
|
|
19
|
+
*/
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
import { existsSync, realpathSync, statSync } from 'fs';
|
|
22
|
+
import { createRequire } from 'module';
|
|
23
|
+
import { homedir } from 'os';
|
|
24
|
+
import { isAbsolute, join, relative, resolve, sep } from 'path';
|
|
25
|
+
import { errorResult, textResult, DETERMINISTIC, READ_ONLY_ANNOTATIONS } from './types.js';
|
|
26
|
+
/** Default and maximum for `limit`, per list. */
|
|
27
|
+
export const DEFAULT_DEPENDENCY_CALLS_LIMIT = 500;
|
|
28
|
+
export const MAX_DEPENDENCY_CALLS_LIMIT = 5000;
|
|
29
|
+
/** The observation shape this tool reads; another is refused, as a consumer must. */
|
|
30
|
+
export const CODE_FACTS_SCHEMA = '0.1';
|
|
31
|
+
export const CODE_FACTS_PACKAGE = '@cognium/code-facts';
|
|
32
|
+
/** `groupId:artifactId[:version]`. */
|
|
33
|
+
const COORDINATE = /^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+(?::[A-Za-z0-9_.+-]+)?$/;
|
|
34
|
+
const require_ = createRequire(import.meta.url);
|
|
35
|
+
/**
|
|
36
|
+
* Import `@cognium/code-facts` beside the server. Refused, with a reason, when
|
|
37
|
+
* it is not installed, does not serve `dependency-calls`, or serves another
|
|
38
|
+
* observation schema. `importer` is a seam for tests.
|
|
39
|
+
*/
|
|
40
|
+
export function makeCodeFactsLoader(importer = (s) => import(/* @vite-ignore */ s)) {
|
|
41
|
+
return async () => {
|
|
42
|
+
let mod;
|
|
43
|
+
try {
|
|
44
|
+
mod = (await importer(CODE_FACTS_PACKAGE));
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return {
|
|
48
|
+
refused: `dependency_calls needs ${CODE_FACTS_PACKAGE} (capability dependency-calls) installed beside the server; ` +
|
|
49
|
+
'it is not published yet.',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (typeof mod.runDependencyCalls !== 'function' ||
|
|
53
|
+
typeof mod.mavenJarPath !== 'function' ||
|
|
54
|
+
!mod.capabilities?.().includes('dependency-calls')) {
|
|
55
|
+
return { refused: `the installed ${CODE_FACTS_PACKAGE} does not serve the dependency-calls capability.` };
|
|
56
|
+
}
|
|
57
|
+
if (mod.SCHEMA_VERSION !== CODE_FACTS_SCHEMA) {
|
|
58
|
+
return {
|
|
59
|
+
refused: `the installed ${CODE_FACTS_PACKAGE} serves schema ${String(mod.SCHEMA_VERSION)}; this server reads ${CODE_FACTS_SCHEMA} only.`,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
version: mod.DRIVER?.version ?? 'unknown',
|
|
64
|
+
schemaVersion: mod.SCHEMA_VERSION,
|
|
65
|
+
engineVersion: engineVersionBeside(),
|
|
66
|
+
mavenJarPath: mod.mavenJarPath,
|
|
67
|
+
runDependencyCalls: mod.runDependencyCalls,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export const loadCodeFacts = makeCodeFactsLoader();
|
|
72
|
+
/** The `circle-ir` version code-facts resolves, which may not be the server's own. */
|
|
73
|
+
function engineVersionBeside() {
|
|
74
|
+
try {
|
|
75
|
+
const manifest = require_.resolve(`${CODE_FACTS_PACKAGE}/package.json`);
|
|
76
|
+
return createRequire(manifest)('circle-ir/package.json').version;
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return 'unknown';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// ─── The tool ──────────────────────────────────────────────────────────────
|
|
83
|
+
export const dependencyCallsInputShape = {
|
|
84
|
+
project_root: z
|
|
85
|
+
.string()
|
|
86
|
+
.describe('Absolute path to the tree under test: the version after the dependency bump.'),
|
|
87
|
+
artifact: z
|
|
88
|
+
.string()
|
|
89
|
+
.describe('The Maven artifact, `groupId:artifactId[:version]`, e.g. `com.fasterxml.jackson.core:jackson-databind:2.15.2`. ' +
|
|
90
|
+
'With a version, its jar is looked up in the local Maven repository.'),
|
|
91
|
+
language: z.enum(['java']).optional().describe('`java` (the only language today; the default).'),
|
|
92
|
+
jar_path: z
|
|
93
|
+
.string()
|
|
94
|
+
.optional()
|
|
95
|
+
.describe('Absolute path to the resolved jar. Wins over the Maven repository.'),
|
|
96
|
+
maven_repo_dir: z
|
|
97
|
+
.string()
|
|
98
|
+
.optional()
|
|
99
|
+
.describe('The local Maven repository. Default `$MAVEN_REPO_LOCAL`, else `~/.m2/repository`.'),
|
|
100
|
+
limit: z
|
|
101
|
+
.number()
|
|
102
|
+
.int()
|
|
103
|
+
.positive()
|
|
104
|
+
.max(MAX_DEPENDENCY_CALLS_LIMIT)
|
|
105
|
+
.optional()
|
|
106
|
+
.describe(`Cap on \`calls\` and on \`unattributedSites\`, each (default ${DEFAULT_DEPENDENCY_CALLS_LIMIT}). ` +
|
|
107
|
+
'Counts and `covered` are over the whole answer; truncation is reported.'),
|
|
108
|
+
};
|
|
109
|
+
const siteShape = z.looseObject({ file: z.string(), line: z.number(), col: z.number() });
|
|
110
|
+
export const dependencyCallsOutputShape = {
|
|
111
|
+
projectRoot: z.string(),
|
|
112
|
+
language: z.literal('java'),
|
|
113
|
+
engine: z.looseObject({ package: z.literal('circle-ir'), version: z.string() }),
|
|
114
|
+
facts: z.looseObject({ package: z.literal(CODE_FACTS_PACKAGE), version: z.string(), schemaVersion: z.string() }),
|
|
115
|
+
jar: z.string().optional(),
|
|
116
|
+
scheme: z.string(),
|
|
117
|
+
ids: z.string(),
|
|
118
|
+
artifact: z.string(),
|
|
119
|
+
packages: z.array(z.string()),
|
|
120
|
+
packageSource: z.string(),
|
|
121
|
+
jarDigest: z.string().optional(),
|
|
122
|
+
calls: z.array(z.looseObject({
|
|
123
|
+
from: z.string(),
|
|
124
|
+
site: siteShape,
|
|
125
|
+
methodName: z.string(),
|
|
126
|
+
receiver: z.string(),
|
|
127
|
+
tests: z.array(z.looseObject({ id: z.string(), file: z.string(), line: z.number(), class: z.string() })),
|
|
128
|
+
})),
|
|
129
|
+
uncovered: z.number(),
|
|
130
|
+
covered: z.boolean(),
|
|
131
|
+
unattributed: z.number(),
|
|
132
|
+
unattributedSites: z.array(z.looseObject({ from: z.string(), site: siteShape, methodName: z.string() })),
|
|
133
|
+
partial: z.array(z.string()),
|
|
134
|
+
partialFiles: z.array(z.looseObject({ file: z.string() })),
|
|
135
|
+
counts: z.looseObject({ calls: z.number(), covered: z.number(), uncovered: z.number(), unattributed: z.number() }),
|
|
136
|
+
totalCalls: z.number(),
|
|
137
|
+
truncated: z.boolean(),
|
|
138
|
+
note: z.string().optional(),
|
|
139
|
+
provenance: z.string(),
|
|
140
|
+
};
|
|
141
|
+
export const dependencyCallsConfig = {
|
|
142
|
+
title: 'List the calls into one dependency, and the tests that reach them',
|
|
143
|
+
description: 'THE QUESTION THIS ANSWERS: "if I bump this Maven dependency, which of our calls into it are tested?" ' +
|
|
144
|
+
'Every call site in the project that lands on the artifact, each with the tests that reach the method ' +
|
|
145
|
+
'making it; a call is covered when a test reaches it strongly (`tests[0].class` is `strong`). `covered` ' +
|
|
146
|
+
'is true only when every call is covered and no file failed to parse.\n\n' +
|
|
147
|
+
'Read `unattributedSites` too: calls into code outside the project whose receiver type is unknown or ' +
|
|
148
|
+
'unqualified. They could be calls into this library, so "every call is covered" holds only for the calls ' +
|
|
149
|
+
'listed, and a merge rule should read `unattributed` as well as `covered`.\n\n' +
|
|
150
|
+
'The artifact\'s packages come from its jar (`jar_path`, or the local Maven repository for ' +
|
|
151
|
+
'`groupId:artifactId:version`), else from a built-in table of common artifacts; `packageSource` says ' +
|
|
152
|
+
'which. An artifact neither resolves is refused, never answered as "0 calls". Java only. Reads one tree, ' +
|
|
153
|
+
'the version under test. Deterministic: no model, no network, no build.',
|
|
154
|
+
inputSchema: dependencyCallsInputShape,
|
|
155
|
+
outputSchema: dependencyCallsOutputShape,
|
|
156
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
157
|
+
};
|
|
158
|
+
/** `path` is one of `roots`, or inside one. Both are real paths. */
|
|
159
|
+
function inside(path, roots) {
|
|
160
|
+
return roots.some((root) => {
|
|
161
|
+
const rel = relative(root, path);
|
|
162
|
+
return rel === '' || (!rel.startsWith(`..${sep}`) && rel !== '..' && !isAbsolute(rel));
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function realRoots(roots) {
|
|
166
|
+
return roots.flatMap((r) => {
|
|
167
|
+
try {
|
|
168
|
+
return [realpathSync(resolve(r))];
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
return [];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/** A path argument, checked: real path, or a one-line refusal. */
|
|
176
|
+
function checkPath(name, value, roots, kind) {
|
|
177
|
+
if (value.includes('\u0000') || value.length > 4096)
|
|
178
|
+
return { refused: `\`${name}\` is not a usable path.` };
|
|
179
|
+
let real;
|
|
180
|
+
try {
|
|
181
|
+
real = realpathSync(resolve(value));
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return { refused: `\`${name}\` does not exist: ${value}` };
|
|
185
|
+
}
|
|
186
|
+
const isDir = statSync(real).isDirectory();
|
|
187
|
+
if (kind === 'dir' && !isDir)
|
|
188
|
+
return { refused: `\`${name}\` is not a directory: ${value}` };
|
|
189
|
+
if (kind === 'file' && isDir)
|
|
190
|
+
return { refused: `\`${name}\` is not a file: ${value}` };
|
|
191
|
+
if (roots && !inside(real, roots))
|
|
192
|
+
return { refused: `\`${name}\` is outside the allowed roots: ${value}` };
|
|
193
|
+
return { path: real };
|
|
194
|
+
}
|
|
195
|
+
function defaultMavenRepo() {
|
|
196
|
+
return process.env.MAVEN_REPO_LOCAL || join(homedir(), '.m2', 'repository');
|
|
197
|
+
}
|
|
198
|
+
/** `g:a:v` → `g:a`, so code-facts looks for no jar of its own. */
|
|
199
|
+
function withoutVersion(coordinate) {
|
|
200
|
+
return coordinate.split(':').slice(0, 2).join(':');
|
|
201
|
+
}
|
|
202
|
+
export function makeDependencyCallsHandler(ctx, load = loadCodeFacts) {
|
|
203
|
+
return async (args) => {
|
|
204
|
+
const artifact = args.artifact.trim();
|
|
205
|
+
if (!COORDINATE.test(artifact)) {
|
|
206
|
+
return errorResult(`\`artifact\` '${args.artifact}' is not groupId:artifactId[:version].`);
|
|
207
|
+
}
|
|
208
|
+
const facts = await load();
|
|
209
|
+
if ('refused' in facts)
|
|
210
|
+
return errorResult(facts.refused);
|
|
211
|
+
const roots = ctx.allowedRoots ? realRoots(ctx.allowedRoots) : undefined;
|
|
212
|
+
const root = checkPath('project_root', args.project_root, roots, 'dir');
|
|
213
|
+
if ('refused' in root)
|
|
214
|
+
return errorResult(root.refused);
|
|
215
|
+
// The jar: given, else the repository's for a versioned coordinate. The
|
|
216
|
+
// lookup happens here rather than in code-facts so that a repository
|
|
217
|
+
// outside the allowed roots is never read.
|
|
218
|
+
let jarPath;
|
|
219
|
+
let note;
|
|
220
|
+
if (args.jar_path !== undefined) {
|
|
221
|
+
const jar = checkPath('jar_path', args.jar_path, roots, 'file');
|
|
222
|
+
if ('refused' in jar)
|
|
223
|
+
return errorResult(jar.refused);
|
|
224
|
+
jarPath = jar.path;
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
let repo;
|
|
228
|
+
if (args.maven_repo_dir !== undefined) {
|
|
229
|
+
const given = checkPath('maven_repo_dir', args.maven_repo_dir, roots, 'dir');
|
|
230
|
+
if ('refused' in given)
|
|
231
|
+
return errorResult(given.refused);
|
|
232
|
+
repo = given.path;
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
const fallback = defaultMavenRepo();
|
|
236
|
+
let real;
|
|
237
|
+
try {
|
|
238
|
+
real = realpathSync(fallback);
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
real = undefined; // no repository on this machine: the table decides
|
|
242
|
+
}
|
|
243
|
+
if (real && roots && !inside(real, roots)) {
|
|
244
|
+
note = `The Maven repository ${fallback} is outside the allowed roots and was not read; the packages come from the table.`;
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
repo = real;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (repo) {
|
|
251
|
+
const candidate = facts.mavenJarPath(artifact, repo);
|
|
252
|
+
if (candidate && existsSync(candidate))
|
|
253
|
+
jarPath = candidate;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
let result;
|
|
257
|
+
try {
|
|
258
|
+
result = await facts.runDependencyCalls(root.path, {}, {
|
|
259
|
+
artifact: jarPath ? artifact : withoutVersion(artifact),
|
|
260
|
+
language: 'java',
|
|
261
|
+
...(jarPath ? { jarPath } : {}),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
const e = err;
|
|
266
|
+
if (e?.name === 'UnknownArtifact') {
|
|
267
|
+
return errorResult(`${e.message}; pass \`jar_path\`, or a version so the Maven repository can be read.${note ? ` ${note}` : ''}`);
|
|
268
|
+
}
|
|
269
|
+
throw err;
|
|
270
|
+
}
|
|
271
|
+
if (result.capability !== 'dependency-calls' || result.schemaVersion !== CODE_FACTS_SCHEMA) {
|
|
272
|
+
return errorResult(`${CODE_FACTS_PACKAGE} answered ${result.capability}@${result.schemaVersion}, not dependency-calls@${CODE_FACTS_SCHEMA}.`);
|
|
273
|
+
}
|
|
274
|
+
const siteAnchor = result.anchors.find((a) => a.anchor === 'site');
|
|
275
|
+
if (!siteAnchor)
|
|
276
|
+
return errorResult(`${CODE_FACTS_PACKAGE} answered without a site anchor.`);
|
|
277
|
+
const site = siteAnchor.observation;
|
|
278
|
+
const calls = result.anchors
|
|
279
|
+
.filter((a) => a.anchor !== 'site')
|
|
280
|
+
.map((a) => a.observation.call);
|
|
281
|
+
const limit = args.limit ?? DEFAULT_DEPENDENCY_CALLS_LIMIT;
|
|
282
|
+
const truncated = calls.length > limit || site.unattributed.length > limit;
|
|
283
|
+
// Field order is `depcalls -f json`'s: the envelope, then the engine's
|
|
284
|
+
// result, then what this tool adds.
|
|
285
|
+
const payload = {
|
|
286
|
+
projectRoot: root.path,
|
|
287
|
+
language: 'java',
|
|
288
|
+
engine: { package: 'circle-ir', version: facts.engineVersion },
|
|
289
|
+
facts: { package: CODE_FACTS_PACKAGE, version: facts.version, schemaVersion: facts.schemaVersion },
|
|
290
|
+
...(jarPath ? { jar: jarPath } : {}),
|
|
291
|
+
scheme: site.scheme,
|
|
292
|
+
ids: 'ids@0.1',
|
|
293
|
+
artifact: site.artifact,
|
|
294
|
+
packages: site.packages,
|
|
295
|
+
packageSource: site.packageSource,
|
|
296
|
+
...(site.jarDigest ? { jarDigest: site.jarDigest } : {}),
|
|
297
|
+
calls: calls.slice(0, limit),
|
|
298
|
+
uncovered: site.counts.uncovered,
|
|
299
|
+
covered: site.covered,
|
|
300
|
+
unattributed: site.counts.unattributed,
|
|
301
|
+
unattributedSites: site.unattributed.slice(0, limit),
|
|
302
|
+
partial: site.partial,
|
|
303
|
+
partialFiles: site.partialFiles,
|
|
304
|
+
counts: site.counts,
|
|
305
|
+
totalCalls: calls.length,
|
|
306
|
+
truncated,
|
|
307
|
+
...(note ? { note } : {}),
|
|
308
|
+
};
|
|
309
|
+
return textResult(payload, { ...payload, provenance: DETERMINISTIC });
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=dependency-calls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-calls.js","sourceRoot":"","sources":["../../src/tools/dependency-calls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB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AY,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY;YACtC,iBAAiB,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;YACpD,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,KAAK,CAAC,MAAM;YACxB,SAAS;YACT,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1B,CAAC;QACF,OAAO,UAAU,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC;IACxE,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -13,6 +13,13 @@ export interface ToolContext {
|
|
|
13
13
|
* needed for. The floor tools never consult it.
|
|
14
14
|
*/
|
|
15
15
|
enablement: Enablement;
|
|
16
|
+
/**
|
|
17
|
+
* Directories a path argument must lie inside, when the host names them.
|
|
18
|
+
* Absent means unconfined: the caller owns its paths, as an in-process
|
|
19
|
+
* caller of `buildServer()` does. Read by `dependency_calls` (C4 0.5.0),
|
|
20
|
+
* which also reads a Maven repository outside the project.
|
|
21
|
+
*/
|
|
22
|
+
allowedRoots?: readonly string[];
|
|
16
23
|
}
|
|
17
24
|
/**
|
|
18
25
|
* How a response was produced. Every tool in this package computes its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,qEAAqE;IACrE,KAAK,EAAE,YAAY,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,qEAAqE;IACrE,KAAK,EAAE,YAAY,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;aAChC,YAAY;aACZ,eAAe;aACf,cAAc;aACd,aAAa;CACL,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;aAClC,YAAY;aACZ,eAAe;aACf,cAAc;aACd,aAAa;CACL,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CAOrG;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAKvD"}
|
package/dist/tools/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwBH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAYX,MAAM,UAAU,UAAU,CAAC,OAAwB,EAAE,UAAoC;IACvF,sEAAsE;IACtE,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7G,MAAM,MAAM,GAAe,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACjE,IAAI,UAAU;QAAE,MAAM,CAAC,iBAAiB,GAAG,UAAU,CAAC;IACtD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC;QACtD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognium/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Model Context Protocol server exposing the circle-ir SAST engine as structured tools for LLM agents (Claude Desktop, Claude Code, Cursor, cognium-ai).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -64,22 +64,26 @@
|
|
|
64
64
|
"registry": "https://registry.npmjs.org/"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@modelcontextprotocol/core": "^2.
|
|
68
|
-
"@modelcontextprotocol/server": "^2.
|
|
67
|
+
"@modelcontextprotocol/core": "^2.3.1",
|
|
68
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
69
69
|
"circle-ir": "4.16.1",
|
|
70
70
|
"yaml": "^2.9.1",
|
|
71
|
-
"zod": "^4.6.
|
|
71
|
+
"zod": "^4.6.7"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
+
"@cognium/code-facts": ">=0.1.0",
|
|
74
75
|
"circle-ir-ai": ">=4.17.0"
|
|
75
76
|
},
|
|
76
77
|
"peerDependenciesMeta": {
|
|
78
|
+
"@cognium/code-facts": {
|
|
79
|
+
"optional": true
|
|
80
|
+
},
|
|
77
81
|
"circle-ir-ai": {
|
|
78
82
|
"optional": true
|
|
79
83
|
}
|
|
80
84
|
},
|
|
81
85
|
"devDependencies": {
|
|
82
|
-
"@modelcontextprotocol/client": "^2.
|
|
86
|
+
"@modelcontextprotocol/client": "^2.3.1",
|
|
83
87
|
"@types/node": "^26.6.2",
|
|
84
88
|
"@vitest/coverage-v8": "^5.0.2",
|
|
85
89
|
"typescript": "^7.0.2",
|