@descryy/mcp 0.1.1 → 0.2.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/dist/bin/descry-mcp.js +24 -1
- package/dist/bin/descry-mcp.js.map +1 -1
- package/dist/disclosure-ledger.d.ts +38 -0
- package/dist/disclosure-ledger.d.ts.map +1 -0
- package/dist/disclosure-ledger.js +40 -0
- package/dist/disclosure-ledger.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +12 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +12 -3
- package/dist/protocol.js.map +1 -1
- package/dist/render.d.ts +9 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +17 -2
- package/dist/render.js.map +1 -1
- package/dist/runtime-registry.d.ts +63 -0
- package/dist/runtime-registry.d.ts.map +1 -0
- package/dist/runtime-registry.js +131 -0
- package/dist/runtime-registry.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +5 -0
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +74 -2
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +177 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/analyze.d.ts +11 -0
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +61 -1
- package/dist/tools/analyze.js.map +1 -1
- package/dist/tools/cross-pr.d.ts.map +1 -1
- package/dist/tools/cross-pr.js +1 -0
- package/dist/tools/cross-pr.js.map +1 -1
- package/dist/tools/git-diff.d.ts.map +1 -1
- package/dist/tools/git-diff.js +24 -3
- package/dist/tools/git-diff.js.map +1 -1
- package/dist/tools/git-history.d.ts.map +1 -1
- package/dist/tools/git-history.js +1 -0
- package/dist/tools/git-history.js.map +1 -1
- package/dist/tools/history.js +1 -1
- package/dist/tools/history.js.map +1 -1
- package/dist/tools/impact.js +1 -1
- package/dist/tools/impact.js.map +1 -1
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kit.d.ts +1 -0
- package/dist/tools/kit.d.ts.map +1 -1
- package/dist/tools/kit.js +1 -0
- package/dist/tools/kit.js.map +1 -1
- package/dist/tools/link-workspace.d.ts.map +1 -1
- package/dist/tools/link-workspace.js +13 -1
- package/dist/tools/link-workspace.js.map +1 -1
- package/dist/tools/mark-incident.d.ts +69 -0
- package/dist/tools/mark-incident.d.ts.map +1 -0
- package/dist/tools/mark-incident.js +212 -0
- package/dist/tools/mark-incident.js.map +1 -0
- package/dist/tools/observe-runtime.d.ts +198 -0
- package/dist/tools/observe-runtime.d.ts.map +1 -0
- package/dist/tools/observe-runtime.js +951 -0
- package/dist/tools/observe-runtime.js.map +1 -0
- package/dist/tools/pr-analysis.d.ts +60 -13
- package/dist/tools/pr-analysis.d.ts.map +1 -1
- package/dist/tools/pr-analysis.js +54 -11
- package/dist/tools/pr-analysis.js.map +1 -1
- package/dist/tools/propagation.d.ts.map +1 -1
- package/dist/tools/propagation.js +1 -0
- package/dist/tools/propagation.js.map +1 -1
- package/dist/tools/questions.d.ts.map +1 -1
- package/dist/tools/questions.js +66 -4
- package/dist/tools/questions.js.map +1 -1
- package/dist/tools/refusal-fetch.d.ts.map +1 -1
- package/dist/tools/refusal-fetch.js +1 -0
- package/dist/tools/refusal-fetch.js.map +1 -1
- package/dist/tools/runtime-incident.d.ts +92 -0
- package/dist/tools/runtime-incident.d.ts.map +1 -0
- package/dist/tools/runtime-incident.js +144 -0
- package/dist/tools/runtime-incident.js.map +1 -0
- package/dist/tools/scope.d.ts.map +1 -1
- package/dist/tools/scope.js +1 -0
- package/dist/tools/scope.js.map +1 -1
- package/dist/tools/similar-incidents.d.ts +13 -0
- package/dist/tools/similar-incidents.d.ts.map +1 -1
- package/dist/tools/similar-incidents.js +22 -8
- package/dist/tools/similar-incidents.js.map +1 -1
- package/dist/tools/verification-status.d.ts.map +1 -1
- package/dist/tools/verification-status.js +1 -0
- package/dist/tools/verification-status.js.map +1 -1
- package/dist/tools/verify-claim.d.ts.map +1 -1
- package/dist/tools/verify-claim.js +5 -0
- package/dist/tools/verify-claim.js.map +1 -1
- package/package.json +15 -4
package/dist/bin/descry-mcp.js
CHANGED
|
@@ -15,10 +15,33 @@
|
|
|
15
15
|
* writes nothing itself and does its argument handling before opening anything.
|
|
16
16
|
*/
|
|
17
17
|
import process from "node:process";
|
|
18
|
+
import { createRequire } from "node:module";
|
|
18
19
|
import { resolve } from "node:path";
|
|
19
20
|
import { createMcpServer } from "../server.js";
|
|
20
21
|
import { Session } from "../session.js";
|
|
21
22
|
import { serveStdio } from "../transport.js";
|
|
23
|
+
/**
|
|
24
|
+
* The version this build actually is, read from the installed package rather
|
|
25
|
+
* than written here.
|
|
26
|
+
*
|
|
27
|
+
* It was the literal `"0.0.0"` for every release, so every host reported the
|
|
28
|
+
* same version no matter which package it was running — and that is not a
|
|
29
|
+
* cosmetic gap. `@descryy/mcp` 0.1.2 went to npm from a branch that never
|
|
30
|
+
* reached `main`, carrying a tool `main` did not have, and nothing any host
|
|
31
|
+
* could see said so: `tools/list` showed seventeen tools and `serverInfo` said
|
|
32
|
+
* 0.0.0. A server that cannot say what it is cannot be caught drifting.
|
|
33
|
+
*/
|
|
34
|
+
const VERSION = (() => {
|
|
35
|
+
try {
|
|
36
|
+
const pkg = createRequire(import.meta.url)("../../package.json");
|
|
37
|
+
return typeof pkg.version === "string" ? pkg.version : "0.0.0";
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// Never fatal. A host that cannot read a version still gets a server, and
|
|
41
|
+
// failing the handshake over a label would be the worse trade.
|
|
42
|
+
return "0.0.0";
|
|
43
|
+
}
|
|
44
|
+
})();
|
|
22
45
|
const USAGE = `descry-mcp — Descry's MCP server (stdio)
|
|
23
46
|
|
|
24
47
|
descry-mcp [repository-path]
|
|
@@ -34,7 +57,7 @@ async function main() {
|
|
|
34
57
|
}
|
|
35
58
|
const repoPath = resolve(args[0] ?? process.cwd());
|
|
36
59
|
const session = await Session.open({ repoPath });
|
|
37
|
-
const server = createMcpServer({ session, name: "descry", version:
|
|
60
|
+
const server = createMcpServer({ session, name: "descry", version: VERSION });
|
|
38
61
|
try {
|
|
39
62
|
await serveStdio({ stdin: process.stdin, stdout: process.stdout, stderr: process.stderr }, (line, transport) => server.dispatch(line, transport));
|
|
40
63
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descry-mcp.js","sourceRoot":"","sources":["../../src/bin/descry-mcp.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,KAAK,GAAG;;;;;;CAMb,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5B,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,e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,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EACxE,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CACtD,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;YAAS,CAAC;QACT,0EAA0E;QAC1E,kEAAkE;QAClE,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,IAAI,CACT,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,EACD,CAAC,KAAc,EAAE,EAAE;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,eAAe,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CACzF,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which standing disclosures this connection has already been given in full.
|
|
3
|
+
*
|
|
4
|
+
* The tax it removes was measured, not supposed: the R0/class-C reliability
|
|
5
|
+
* sentence is 354 characters — ~88 tokens — and appeared byte-for-byte
|
|
6
|
+
* identical on the large majority of one session's thirty-odd tool calls.
|
|
7
|
+
* Nothing about it was wrong; it was simply the same paragraph, re-billed to
|
|
8
|
+
* the caller's context window every call, and the loop this server is built
|
|
9
|
+
* for (edit, re-check, edit again) is the one that pays it most.
|
|
10
|
+
*
|
|
11
|
+
* ## What the ledger is allowed to shorten, and what it is not
|
|
12
|
+
*
|
|
13
|
+
* Only the *argument* for a cap. The floor and the class it caps to stay on
|
|
14
|
+
* every reply, first or fiftieth, in `graph.resolutionFloor` /
|
|
15
|
+
* `graph.reliabilityCap` and in the short disclosure itself. Rule 7 is about
|
|
16
|
+
* what reaches the user, and a reply that stopped naming its own cap after
|
|
17
|
+
* the first call would be a reply that silently does less.
|
|
18
|
+
*
|
|
19
|
+
* ## Per connection, deliberately not per process
|
|
20
|
+
*
|
|
21
|
+
* "Already disclosed" is a fact about one conversation. A ledger shared across
|
|
22
|
+
* connections would let the *second* client's first call inherit the first
|
|
23
|
+
* client's history — that client would receive the short form of a sentence it
|
|
24
|
+
* has never seen, which is the exact failure this is supposed to avoid, only
|
|
25
|
+
* harder to notice. So one ledger is created per `createMcpServer`, and it
|
|
26
|
+
* lives as long as that server does.
|
|
27
|
+
*/
|
|
28
|
+
export interface DisclosureLedger {
|
|
29
|
+
/**
|
|
30
|
+
* `true` the first time this key is seen on this connection, `false` after.
|
|
31
|
+
* Records the sighting — calling it is what marks the key as disclosed.
|
|
32
|
+
*/
|
|
33
|
+
firstSighting(key: string): boolean;
|
|
34
|
+
/** Keys disclosed in full so far. For tests and diagnostics. */
|
|
35
|
+
disclosed(): readonly string[];
|
|
36
|
+
}
|
|
37
|
+
export declare function createDisclosureLedger(): DisclosureLedger;
|
|
38
|
+
//# sourceMappingURL=disclosure-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure-ledger.d.ts","sourceRoot":"","sources":["../src/disclosure-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,gEAAgE;IAChE,SAAS,IAAI,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CAUzD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which standing disclosures this connection has already been given in full.
|
|
3
|
+
*
|
|
4
|
+
* The tax it removes was measured, not supposed: the R0/class-C reliability
|
|
5
|
+
* sentence is 354 characters — ~88 tokens — and appeared byte-for-byte
|
|
6
|
+
* identical on the large majority of one session's thirty-odd tool calls.
|
|
7
|
+
* Nothing about it was wrong; it was simply the same paragraph, re-billed to
|
|
8
|
+
* the caller's context window every call, and the loop this server is built
|
|
9
|
+
* for (edit, re-check, edit again) is the one that pays it most.
|
|
10
|
+
*
|
|
11
|
+
* ## What the ledger is allowed to shorten, and what it is not
|
|
12
|
+
*
|
|
13
|
+
* Only the *argument* for a cap. The floor and the class it caps to stay on
|
|
14
|
+
* every reply, first or fiftieth, in `graph.resolutionFloor` /
|
|
15
|
+
* `graph.reliabilityCap` and in the short disclosure itself. Rule 7 is about
|
|
16
|
+
* what reaches the user, and a reply that stopped naming its own cap after
|
|
17
|
+
* the first call would be a reply that silently does less.
|
|
18
|
+
*
|
|
19
|
+
* ## Per connection, deliberately not per process
|
|
20
|
+
*
|
|
21
|
+
* "Already disclosed" is a fact about one conversation. A ledger shared across
|
|
22
|
+
* connections would let the *second* client's first call inherit the first
|
|
23
|
+
* client's history — that client would receive the short form of a sentence it
|
|
24
|
+
* has never seen, which is the exact failure this is supposed to avoid, only
|
|
25
|
+
* harder to notice. So one ledger is created per `createMcpServer`, and it
|
|
26
|
+
* lives as long as that server does.
|
|
27
|
+
*/
|
|
28
|
+
export function createDisclosureLedger() {
|
|
29
|
+
const seen = new Set();
|
|
30
|
+
return {
|
|
31
|
+
firstSighting(key) {
|
|
32
|
+
if (seen.has(key))
|
|
33
|
+
return false;
|
|
34
|
+
seen.add(key);
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
disclosed: () => [...seen],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=disclosure-ledger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclosure-ledger.js","sourceRoot":"","sources":["../src/disclosure-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAYH,MAAM,UAAU,sBAAsB;IACpC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,OAAO;QACL,aAAa,CAAC,GAAG;YACf,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,OAAO,IAAI,CAAC;QACd,CAAC;QACD,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type { BriefNode, NodeCandidates, Progress, ToolContext, ToolDefinition,
|
|
|
24
24
|
* **today**; where a tool's payload is genuinely conditional the type is a
|
|
25
25
|
* union that says so rather than a widening to `unknown`.
|
|
26
26
|
*/
|
|
27
|
-
export type {
|
|
27
|
+
export type { AffectedRef, AnalyzeData, BlockedCheck, CoChangedFile, ConfigDependencyReport, ContractPathFinding, ContractShapeMismatchReport, ContractShapeStatus, ContractsData, CrossPrData, CrossPrEmptyDiff, CrossPrGitFailure, CrossPrReport, EnvFindingReport, HiddenDependencyCheck, HiddenDependencyFinding, HistoryData, HistoryFile, HistoryFileResolved, HistoryFileUnresolved, HistoryReport, ImpactData, ImpactReport, ImpactedNode, LinkWorkspaceData, MarkIncidentData, LinkedRepo, OverlapCheck, OverlapReportChecked, PrAnalysisData, PrAnalysisEmptyDiff, PrAnalysisGitFailure, PrAnalysisLists, PrAnalysisRange, PrAnalysisReport, PrAnalysisUnresolved, PropagationData, PropagationReport, QuestionsData, ReachedNode, RelatedNode, ScopeData, ScopeNotSeeded, ScopeReport, ScopeTierCount, ScopedNodeReport, SimilarIncidentReport, SimilarIncidentSignalReport, SimilarIncidentsData, SourceRun, SupersededCheck, TracedPath, ValidateData, } from "./tools/index.ts";
|
|
28
28
|
export { serveStdio, guardStdout, createLineReader } from "./transport.ts";
|
|
29
29
|
export type { Transport, StdioOptions } from "./transport.ts";
|
|
30
30
|
export { PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, negotiateVersion, parseMessage, ProtocolError, } from "./protocol.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1E,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEjG,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,WAAW,EACX,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;GAQG;AACH,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":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ACZ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,cAAc,EACd,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG1E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AAWrB,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG1E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,GACX,MAAM,aAAa,CAAC;AAWrB,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA0ExF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG3E,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC"}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -15,9 +15,18 @@
|
|
|
15
15
|
* over `better-sqlite3`, `node --test` over a test runner, `tsc` over a bundler,
|
|
16
16
|
* `git` invoked directly over a git library — every time on the same grounds:
|
|
17
17
|
* this is a **locally installed developer tool**, and a dependency tree is a
|
|
18
|
-
* distribution problem before it is anything else.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* distribution problem before it is anything else. Seventeen
|
|
19
|
+
* transitively-hundreds is a large price for newline-delimited JSON.
|
|
20
|
+
*
|
|
21
|
+
* This package no longer has zero runtime dependencies — `observe_runtime`
|
|
22
|
+
* composes `descry-runtime`'s execution and correlation packages, ruled in
|
|
23
|
+
* `DEC-NEXT-mcp-runtime-dependency-boundary-for-r4-evidence` — and the
|
|
24
|
+
* argument above is unaffected, because it was never a vow of zero. It is a
|
|
25
|
+
* cost/benefit about *this* dependency: every package `@descryy/mcp` depends
|
|
26
|
+
* on is one of Descry's own, versioned and published alongside it, and each
|
|
27
|
+
* one is there because a stage of a real run happens inside it. That is a
|
|
28
|
+
* different trade from adding a stack of HTTP and OAuth packages to serve a
|
|
29
|
+
* transport this server will never open a socket for.
|
|
21
30
|
*
|
|
22
31
|
* **The cost is named, not waved away.** Hand-rolling means spec drift is
|
|
23
32
|
* silent: the wire format changes, the client stops working, and nothing in this
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,mEAAmE;AACnE,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB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O,GAAG,WAAW,CAE1D;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAM1F"}
|
package/dist/protocol.js
CHANGED
|
@@ -15,9 +15,18 @@
|
|
|
15
15
|
* over `better-sqlite3`, `node --test` over a test runner, `tsc` over a bundler,
|
|
16
16
|
* `git` invoked directly over a git library — every time on the same grounds:
|
|
17
17
|
* this is a **locally installed developer tool**, and a dependency tree is a
|
|
18
|
-
* distribution problem before it is anything else.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* distribution problem before it is anything else. Seventeen
|
|
19
|
+
* transitively-hundreds is a large price for newline-delimited JSON.
|
|
20
|
+
*
|
|
21
|
+
* This package no longer has zero runtime dependencies — `observe_runtime`
|
|
22
|
+
* composes `descry-runtime`'s execution and correlation packages, ruled in
|
|
23
|
+
* `DEC-NEXT-mcp-runtime-dependency-boundary-for-r4-evidence` — and the
|
|
24
|
+
* argument above is unaffected, because it was never a vow of zero. It is a
|
|
25
|
+
* cost/benefit about *this* dependency: every package `@descryy/mcp` depends
|
|
26
|
+
* on is one of Descry's own, versioned and published alongside it, and each
|
|
27
|
+
* one is there because a stage of a real run happens inside it. That is a
|
|
28
|
+
* different trade from adding a stack of HTTP and OAuth packages to serve a
|
|
29
|
+
* transport this server will never open a socket for.
|
|
21
30
|
*
|
|
22
31
|
* **The cost is named, not waved away.** Hand-rolling means spec drift is
|
|
23
32
|
* silent: the wire format changes, the client stops working, and nothing in this
|
package/dist/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpD,OAAO,QAAQ,KAAK,IAAI;QACtB,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE;QACrC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAmB;IAC3C,OAAO,IAAI,IAAI,OAAO,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,EAAE,CAAC,EAAS,EAAE,MAAe;IAC3C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,EAAS,EAAE,IAAY,EAAE,OAAe,EAAE,IAAc;IAC3E,OAAO;QACL,OAAO,EAAE,KAAK;QACd,EAAE;QACF,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;KAClE,CAAC;AACJ,CAAC"}
|
package/dist/render.d.ts
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
import { type ReliabilityClass, type ReportCategory } from "@descryy/ir";
|
|
40
40
|
import type { ResultState, ToolClass } from "@descryy/ir";
|
|
41
41
|
import type { QueryResult } from "@descryy/core";
|
|
42
|
+
import type { DisclosureLedger } from "./disclosure-ledger.ts";
|
|
42
43
|
export type { ResultState } from "@descryy/ir";
|
|
43
44
|
/**
|
|
44
45
|
* MK-5 — which of the sixteen tools states a conclusion about the user's code
|
|
@@ -209,6 +210,14 @@ export interface RenderOptions {
|
|
|
209
210
|
readonly toolTier: ToolTier;
|
|
210
211
|
readonly elapsedMs: number;
|
|
211
212
|
readonly limitMs: number;
|
|
213
|
+
/**
|
|
214
|
+
* This connection's record of which standing disclosures it has already been
|
|
215
|
+
* given in full. Optional: a caller with no session to dedupe within (every
|
|
216
|
+
* direct `renderAnswer` in a test, every non-server consumer) gets the full
|
|
217
|
+
* sentence every time, which is the safe default — a short reference to a
|
|
218
|
+
* paragraph nobody was shown is worse than the repetition.
|
|
219
|
+
*/
|
|
220
|
+
readonly disclosureLedger?: DisclosureLedger;
|
|
212
221
|
}
|
|
213
222
|
/**
|
|
214
223
|
* A refusal's reason must be the specific, verbatim thing that blocked it —
|
package/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAmB,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,UAAU,qCAAsC,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC,yEAAyE;IACzE,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC;CACpC;AASD,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D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,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAC9C;AAuBD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,OAAO,EAAE,aAAa,GACrB,cAAc,CAqEhB;AA2CD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAM7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,aAAa,GACrB,cAAc,CA4BhB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,aAAa,GACrB,cAAc,CA8BhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,cAAc,CA+BnF"}
|
package/dist/render.js
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* the first call → throw (§7) — enforced in `action-handshake.ts` and
|
|
37
37
|
* `server.ts`, not here: this module never sees a mint, only a redeemed run.
|
|
38
38
|
*/
|
|
39
|
-
import { reliabilityCap,
|
|
39
|
+
import { reliabilityCap, reliabilityDisclosure, reportCategory as deriveReportCategory, } from "@descryy/ir";
|
|
40
40
|
/**
|
|
41
41
|
* MK-5 — which of the sixteen tools states a conclusion about the user's code
|
|
42
42
|
* versus which reports a fact about the graph.
|
|
@@ -120,7 +120,22 @@ export function renderAnswer(tool, answer, options) {
|
|
|
120
120
|
}
|
|
121
121
|
const resolutionFloor = result.stamp.resolutionFloor;
|
|
122
122
|
const cap = reliabilityCap(resolutionFloor, nameLevel);
|
|
123
|
-
|
|
123
|
+
// Full the first time this connection meets this category, a short reference
|
|
124
|
+
// to it after — see `disclosure-ledger.ts`. The floor and the class are on
|
|
125
|
+
// every reply either way; only the argument for them collapses.
|
|
126
|
+
const reliability = reliabilityDisclosure(resolutionFloor, nameLevel);
|
|
127
|
+
const disclosures = [
|
|
128
|
+
...result.notes,
|
|
129
|
+
options.disclosureLedger?.firstSighting(reliability.key) === false
|
|
130
|
+
? reliability.brief
|
|
131
|
+
: reliability.full,
|
|
132
|
+
...(result.stamp.commitSpread > 1
|
|
133
|
+
? [
|
|
134
|
+
`the stored graph spans ${result.stamp.commitSpread} distinct commits; part of it may ` +
|
|
135
|
+
"describe code that is no longer current",
|
|
136
|
+
]
|
|
137
|
+
: []),
|
|
138
|
+
];
|
|
124
139
|
const envelope = {
|
|
125
140
|
tool,
|
|
126
141
|
toolVersion: options.toolVersion,
|
package/dist/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,IAAI,oBAAoB,GAGvC,MAAM,aAAa,CAAC;AAQrB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAAY,EAAE,UAAU,CAAU,CAAC;AAkB9D,MAAM,UAAU,GAAe;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AE,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;QAClE,WAAW,EAAE;YACX,GAAG,IAAI,8BAA8B,OAAO,CAAC,OAAO,2CAA2C;gBAC7F,oEAAoE;SACvE;QACD,8DAA8D;QAC9D,cAAc,EAAE,IAAI;QACpB,UAAU,EAAE,UAAU;KACvB,CAAC;IACF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,iBAAiB,EAAE,QAA8C;QACjE,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How `observe_runtime` reaches a **runtime** adapter without naming a language.
|
|
3
|
+
*
|
|
4
|
+
* This is `registry.ts`'s argument applied one layer over: that module exists
|
|
5
|
+
* because "descry-core must not import descry-adapters — the IR boundary is a
|
|
6
|
+
* dependency-direction fact", and the identical fact holds for
|
|
7
|
+
* `descry-runtime`'s per-language adapters. `@descryy/mcp` now depends on the
|
|
8
|
+
* runtime's *language-neutral* packages (orchestrator, evidence store,
|
|
9
|
+
* correlation, graph correlator) and on none of its nine language adapters,
|
|
10
|
+
* because an `import { createTypeScriptRuntimeAdapter } from
|
|
11
|
+
* "@descryy/runtime-adapter-typescript"` in a tool file would put the word
|
|
12
|
+
* "typescript" above the IR boundary in the one process that runs everything
|
|
13
|
+
* — rule 1, which the repository's own CLAUDE.md calls a design bug rather
|
|
14
|
+
* than a style preference.
|
|
15
|
+
*
|
|
16
|
+
* `uat-phase-1-bug-fixes.md`'s Phase 1 listed `runtime-adapter-typescript`
|
|
17
|
+
* among the packages to add as a real dependency. It is deliberately **not**
|
|
18
|
+
* one, and that is the only narrowing this integration makes to that list: the
|
|
19
|
+
* adapter is named in the call as a module specifier and imported at run time,
|
|
20
|
+
* exactly as every static source already is. The engine knows `RuntimeAdapter`;
|
|
21
|
+
* it never knows the word "typescript". Nothing about the plan's direction
|
|
22
|
+
* changes — one language ships first either way, it just ships as a
|
|
23
|
+
* configured specifier rather than as a compiled-in import.
|
|
24
|
+
*
|
|
25
|
+
* ## The factory convention
|
|
26
|
+
*
|
|
27
|
+
* `descry-runtime`'s nine language adapters each export a factory named
|
|
28
|
+
* `create<Something>RuntimeAdapter` — `createTypeScriptRuntimeAdapter`,
|
|
29
|
+
* `createPythonRuntimeAdapter`, `createJavaRuntimeAdapter`. Same shape as
|
|
30
|
+
* `registry.ts`'s `create*Adapter` convention and resolved the same way: an
|
|
31
|
+
* explicit `export` in the call wins; failing that, the single export matching
|
|
32
|
+
* the pattern is used; **two matches is an error, not a coin toss.**
|
|
33
|
+
*
|
|
34
|
+
* ## Failing to load is a disclosure, never a shrug
|
|
35
|
+
*
|
|
36
|
+
* A runtime adapter that will not import is the difference between "we
|
|
37
|
+
* observed your service and saw nothing" and "we could not observe your
|
|
38
|
+
* service at all" — §20.2's distinction, and the one `observe_runtime` turns
|
|
39
|
+
* into a `refused` state rather than an `ok` with an empty evidence list.
|
|
40
|
+
* Every failure leaves here as a thrown `RuntimeAdapterLoadError` carrying the
|
|
41
|
+
* specifier and the reason, so the caller cannot take an adapter without also
|
|
42
|
+
* having to handle not getting one.
|
|
43
|
+
*/
|
|
44
|
+
import type { RuntimeAdapter } from "@descryy/runtime-backend-observation";
|
|
45
|
+
/** A runtime adapter named the way `SourceSpec` names a static one. */
|
|
46
|
+
export interface RuntimeAdapterSpec {
|
|
47
|
+
readonly module: string;
|
|
48
|
+
/** Named export to call. Defaults to the `create*RuntimeAdapter` convention. */
|
|
49
|
+
readonly export?: string;
|
|
50
|
+
/** Passed to the factory. Adapter-specific and opaque here. */
|
|
51
|
+
readonly options?: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Distinct from a generic `Error` so the tool can tell "the adapter would not
|
|
55
|
+
* load" (a refusal it must disclose) apart from "the run itself broke" (a
|
|
56
|
+
* failure). Both are honest; they are not the same statement.
|
|
57
|
+
*/
|
|
58
|
+
export declare class RuntimeAdapterLoadError extends Error {
|
|
59
|
+
readonly spec: RuntimeAdapterSpec;
|
|
60
|
+
constructor(spec: RuntimeAdapterSpec, reason: string);
|
|
61
|
+
}
|
|
62
|
+
export declare function loadRuntimeAdapter(spec: RuntimeAdapterSpec): Promise<RuntimeAdapter>;
|
|
63
|
+
//# sourceMappingURL=runtime-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-registry.d.ts","sourceRoot":"","sources":["../src/runtime-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAE3E,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAED;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;gBAEtB,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM;CAKrD;AAmCD,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAmD1F"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How `observe_runtime` reaches a **runtime** adapter without naming a language.
|
|
3
|
+
*
|
|
4
|
+
* This is `registry.ts`'s argument applied one layer over: that module exists
|
|
5
|
+
* because "descry-core must not import descry-adapters — the IR boundary is a
|
|
6
|
+
* dependency-direction fact", and the identical fact holds for
|
|
7
|
+
* `descry-runtime`'s per-language adapters. `@descryy/mcp` now depends on the
|
|
8
|
+
* runtime's *language-neutral* packages (orchestrator, evidence store,
|
|
9
|
+
* correlation, graph correlator) and on none of its nine language adapters,
|
|
10
|
+
* because an `import { createTypeScriptRuntimeAdapter } from
|
|
11
|
+
* "@descryy/runtime-adapter-typescript"` in a tool file would put the word
|
|
12
|
+
* "typescript" above the IR boundary in the one process that runs everything
|
|
13
|
+
* — rule 1, which the repository's own CLAUDE.md calls a design bug rather
|
|
14
|
+
* than a style preference.
|
|
15
|
+
*
|
|
16
|
+
* `uat-phase-1-bug-fixes.md`'s Phase 1 listed `runtime-adapter-typescript`
|
|
17
|
+
* among the packages to add as a real dependency. It is deliberately **not**
|
|
18
|
+
* one, and that is the only narrowing this integration makes to that list: the
|
|
19
|
+
* adapter is named in the call as a module specifier and imported at run time,
|
|
20
|
+
* exactly as every static source already is. The engine knows `RuntimeAdapter`;
|
|
21
|
+
* it never knows the word "typescript". Nothing about the plan's direction
|
|
22
|
+
* changes — one language ships first either way, it just ships as a
|
|
23
|
+
* configured specifier rather than as a compiled-in import.
|
|
24
|
+
*
|
|
25
|
+
* ## The factory convention
|
|
26
|
+
*
|
|
27
|
+
* `descry-runtime`'s nine language adapters each export a factory named
|
|
28
|
+
* `create<Something>RuntimeAdapter` — `createTypeScriptRuntimeAdapter`,
|
|
29
|
+
* `createPythonRuntimeAdapter`, `createJavaRuntimeAdapter`. Same shape as
|
|
30
|
+
* `registry.ts`'s `create*Adapter` convention and resolved the same way: an
|
|
31
|
+
* explicit `export` in the call wins; failing that, the single export matching
|
|
32
|
+
* the pattern is used; **two matches is an error, not a coin toss.**
|
|
33
|
+
*
|
|
34
|
+
* ## Failing to load is a disclosure, never a shrug
|
|
35
|
+
*
|
|
36
|
+
* A runtime adapter that will not import is the difference between "we
|
|
37
|
+
* observed your service and saw nothing" and "we could not observe your
|
|
38
|
+
* service at all" — §20.2's distinction, and the one `observe_runtime` turns
|
|
39
|
+
* into a `refused` state rather than an `ok` with an empty evidence list.
|
|
40
|
+
* Every failure leaves here as a thrown `RuntimeAdapterLoadError` carrying the
|
|
41
|
+
* specifier and the reason, so the caller cannot take an adapter without also
|
|
42
|
+
* having to handle not getting one.
|
|
43
|
+
*/
|
|
44
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
45
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
46
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
47
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return path;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Distinct from a generic `Error` so the tool can tell "the adapter would not
|
|
54
|
+
* load" (a refusal it must disclose) apart from "the run itself broke" (a
|
|
55
|
+
* failure). Both are honest; they are not the same statement.
|
|
56
|
+
*/
|
|
57
|
+
export class RuntimeAdapterLoadError extends Error {
|
|
58
|
+
spec;
|
|
59
|
+
constructor(spec, reason) {
|
|
60
|
+
super(`runtime adapter "${spec.module}" could not be loaded — ${reason}`);
|
|
61
|
+
this.name = "RuntimeAdapterLoadError";
|
|
62
|
+
this.spec = spec;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const FACTORY_PATTERN = /^create[A-Za-z0-9]*RuntimeAdapter$/;
|
|
66
|
+
function describe(error) {
|
|
67
|
+
if (error instanceof Error) {
|
|
68
|
+
const code = error.code;
|
|
69
|
+
return code === undefined ? error.message : `${code}: ${error.message}`;
|
|
70
|
+
}
|
|
71
|
+
return String(error);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Duck-typed on the four members `runInstrumentedExecution` actually reaches
|
|
75
|
+
* for, rather than on a marker or `instanceof`.
|
|
76
|
+
*
|
|
77
|
+
* The adapters are compiled separately and published as their own packages, so
|
|
78
|
+
* an `instanceof` across that boundary is a well-known way to be wrong —
|
|
79
|
+
* `registry.ts`'s `asAdapter` says the same thing about `LanguageAdapter`, for
|
|
80
|
+
* the same reason. A module that exports a matching factory returning
|
|
81
|
+
* something without these is a broken adapter, and saying so here beats a
|
|
82
|
+
* `TypeError` thrown from inside a collector three layers down.
|
|
83
|
+
*/
|
|
84
|
+
function isRuntimeAdapter(value) {
|
|
85
|
+
const candidate = value;
|
|
86
|
+
return (typeof candidate === "object" &&
|
|
87
|
+
candidate !== null &&
|
|
88
|
+
typeof candidate.language === "string" &&
|
|
89
|
+
typeof candidate.createBackendCollectors === "function" &&
|
|
90
|
+
typeof candidate.stackTraceParser === "object" &&
|
|
91
|
+
typeof candidate.sourceLocationResolver === "object");
|
|
92
|
+
}
|
|
93
|
+
export async function loadRuntimeAdapter(spec) {
|
|
94
|
+
let module;
|
|
95
|
+
try {
|
|
96
|
+
module = (await import(__rewriteRelativeImportExtension(spec.module)));
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
throw new RuntimeAdapterLoadError(spec, describe(error));
|
|
100
|
+
}
|
|
101
|
+
let factoryName = spec.export;
|
|
102
|
+
if (factoryName === undefined) {
|
|
103
|
+
const candidates = Object.keys(module).filter((key) => FACTORY_PATTERN.test(key) && typeof module[key] === "function");
|
|
104
|
+
if (candidates.length === 0) {
|
|
105
|
+
throw new RuntimeAdapterLoadError(spec, "no export matching create*RuntimeAdapter. Name one explicitly with " +
|
|
106
|
+
`{ "module": "${spec.module}", "export": "..." }.`);
|
|
107
|
+
}
|
|
108
|
+
if (candidates.length > 1) {
|
|
109
|
+
throw new RuntimeAdapterLoadError(spec, `${candidates.length} exports match create*RuntimeAdapter (${candidates.sort().join(", ")}). ` +
|
|
110
|
+
"Name the one to use explicitly rather than letting the choice depend on export order.");
|
|
111
|
+
}
|
|
112
|
+
factoryName = candidates[0];
|
|
113
|
+
}
|
|
114
|
+
const factory = module[factoryName];
|
|
115
|
+
if (typeof factory !== "function") {
|
|
116
|
+
throw new RuntimeAdapterLoadError(spec, `export "${factoryName}" is not a function`);
|
|
117
|
+
}
|
|
118
|
+
let adapter;
|
|
119
|
+
try {
|
|
120
|
+
adapter = factory(spec.options);
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
throw new RuntimeAdapterLoadError(spec, `"${factoryName}" threw — ${describe(error)}`);
|
|
124
|
+
}
|
|
125
|
+
if (!isRuntimeAdapter(adapter)) {
|
|
126
|
+
throw new RuntimeAdapterLoadError(spec, `"${factoryName}" did not return a RuntimeAdapter (needs \`language\`, \`stackTraceParser\`, ` +
|
|
127
|
+
"`sourceLocationResolver` and `createBackendCollectors`)");
|
|
128
|
+
}
|
|
129
|
+
return adapter;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=runtime-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-registry.js","sourceRoot":"","sources":["../src/runtime-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;;;;;;;AAaH;;;;GAIG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,IAAI,CAAqB;IAElC,YAAY,IAAwB,EAAE,MAAc;QAClD,KAAK,CAAC,oBAAoB,IAAI,CAAC,MAAM,2BAA2B,MAAM,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,MAAM,eAAe,GAAG,oCAAoC,CAAC;AAE7D,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAI,KAA+B,CAAC,IAAI,CAAC;QACnD,OAAO,IAAI,KAAK,SA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IAAI,EACJ,qEAAqE;gBACnE,gBAAgB,IAAI,CAAC,MAAM,uBAAuB,CACrD,CAAC;QACJ,CAAC;QACD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,uBAAuB,CAC/B,IAAI,EACJ,GAAG,UAAU,CAAC,MAAM,yCAAyC,UAAU,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;gBAC5F,uFAAuF,CAC1F,CAAC;QACJ,CAAC;QACD,WAAW,GAAG,UAAU,CAAC,CAAC,CAAE,CAAC;IAC/B,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,IAAI,uBAAuB,CAAC,IAAI,EAAE,WAAW,WAAW,qBAAqB,CAAC,CAAC;IACvF,CAAC;IAED,IAAI,OAAgB,CAAC;IACrB,IAAI,CAAC;QACH,OAAO,GAAI,OAA0C,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,uBAAuB,CAAC,IAAI,EAAE,IAAI,WAAW,aAAa,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,uBAAuB,CAC/B,IAAI,EACJ,IAAI,WAAW,+EAA+E;YAC5F,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAyBH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAYhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,wDAAwD;IACxD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAyDD,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAqNpE"}
|
package/dist/server.js
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
import { resolveActionDispatch } from "./action-handshake.js";
|
|
29
29
|
import { fail, isRequest, negotiateVersion, ok, parseMessage, ProtocolError, RPC_INTERNAL_ERROR, RPC_INVALID_PARAMS, RPC_METHOD_NOT_FOUND, } from "./protocol.js";
|
|
30
30
|
import { renderAnswer, renderFailed, renderHandshake, renderTimedOut, renderToolError, } from "./render.js";
|
|
31
|
+
import { createDisclosureLedger } from "./disclosure-ledger.js";
|
|
31
32
|
import { TOOLS, TOOLS_BY_NAME, ToolInputError } from "./tools/index.js";
|
|
32
33
|
/** Every call's declared budget (§6). Fixed today; per-trigger budgets are P26/P28 work. */
|
|
33
34
|
const CALL_BUDGET_MS = 15 * 60 * 1000;
|
|
@@ -92,6 +93,9 @@ export function createMcpServer(options) {
|
|
|
92
93
|
const session = options.session;
|
|
93
94
|
const serverName = options.name ?? "descry";
|
|
94
95
|
const serverVersion = options.version ?? "0.0.0";
|
|
96
|
+
// One per connection, living exactly as long as this server — see
|
|
97
|
+
// `disclosure-ledger.ts` for why it is not shared across connections.
|
|
98
|
+
const disclosureLedger = createDisclosureLedger();
|
|
95
99
|
let initialized = false;
|
|
96
100
|
async function handleRequest(request, transport) {
|
|
97
101
|
const { id, method } = request;
|
|
@@ -190,6 +194,7 @@ export function createMcpServer(options) {
|
|
|
190
194
|
toolTier: tool.tier,
|
|
191
195
|
elapsedMs: Date.now() - started,
|
|
192
196
|
limitMs: CALL_BUDGET_MS,
|
|
197
|
+
disclosureLedger,
|
|
193
198
|
});
|
|
194
199
|
try {
|
|
195
200
|
// §7's two-call handshake. Decided before any real work starts — a mint
|