@descryy/mcp 0.6.0 → 0.7.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.
Files changed (260) hide show
  1. package/dist/action-handshake.d.ts +8 -75
  2. package/dist/action-handshake.d.ts.map +1 -1
  3. package/dist/action-handshake.js +9 -79
  4. package/dist/action-handshake.js.map +1 -1
  5. package/dist/bin/descry-mcp.d.ts +4 -15
  6. package/dist/bin/descry-mcp.d.ts.map +1 -1
  7. package/dist/bin/descry-mcp.js +12 -42
  8. package/dist/bin/descry-mcp.js.map +1 -1
  9. package/dist/browser/driver.d.ts +59 -224
  10. package/dist/browser/driver.d.ts.map +1 -1
  11. package/dist/browser/driver.js +9 -55
  12. package/dist/browser/driver.js.map +1 -1
  13. package/dist/browser/evidence.d.ts +10 -43
  14. package/dist/browser/evidence.d.ts.map +1 -1
  15. package/dist/browser/evidence.js +20 -54
  16. package/dist/browser/evidence.js.map +1 -1
  17. package/dist/browser/fake-driver.d.ts +4 -16
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +6 -20
  20. package/dist/browser/fake-driver.js.map +1 -1
  21. package/dist/browser/graph-write.d.ts +4 -45
  22. package/dist/browser/graph-write.d.ts.map +1 -1
  23. package/dist/browser/graph-write.js +8 -53
  24. package/dist/browser/graph-write.js.map +1 -1
  25. package/dist/browser/playwright-driver.d.ts +7 -91
  26. package/dist/browser/playwright-driver.d.ts.map +1 -1
  27. package/dist/browser/playwright-driver.js +40 -194
  28. package/dist/browser/playwright-driver.js.map +1 -1
  29. package/dist/browser/provider.d.ts +5 -34
  30. package/dist/browser/provider.d.ts.map +1 -1
  31. package/dist/browser/provider.js +4 -24
  32. package/dist/browser/provider.js.map +1 -1
  33. package/dist/browser/registry.d.ts +26 -106
  34. package/dist/browser/registry.d.ts.map +1 -1
  35. package/dist/browser/registry.js +20 -77
  36. package/dist/browser/registry.js.map +1 -1
  37. package/dist/browser/scenario-resolve.d.ts +10 -44
  38. package/dist/browser/scenario-resolve.d.ts.map +1 -1
  39. package/dist/browser/scenario-resolve.js +10 -41
  40. package/dist/browser/scenario-resolve.js.map +1 -1
  41. package/dist/browser/scenario-runner.d.ts +12 -70
  42. package/dist/browser/scenario-runner.d.ts.map +1 -1
  43. package/dist/browser/scenario-runner.js +30 -90
  44. package/dist/browser/scenario-runner.js.map +1 -1
  45. package/dist/browser/stack-parser.d.ts +4 -28
  46. package/dist/browser/stack-parser.d.ts.map +1 -1
  47. package/dist/browser/stack-parser.js +12 -39
  48. package/dist/browser/stack-parser.js.map +1 -1
  49. package/dist/browser/tool-support.d.ts +20 -67
  50. package/dist/browser/tool-support.d.ts.map +1 -1
  51. package/dist/browser/tool-support.js +21 -65
  52. package/dist/browser/tool-support.js.map +1 -1
  53. package/dist/browser/url-scheme.d.ts +14 -0
  54. package/dist/browser/url-scheme.d.ts.map +1 -0
  55. package/dist/browser/url-scheme.js +38 -0
  56. package/dist/browser/url-scheme.js.map +1 -0
  57. package/dist/cancellation.d.ts +11 -46
  58. package/dist/cancellation.d.ts.map +1 -1
  59. package/dist/cancellation.js +11 -46
  60. package/dist/cancellation.js.map +1 -1
  61. package/dist/capped.d.ts +9 -33
  62. package/dist/capped.d.ts.map +1 -1
  63. package/dist/capped.js +7 -27
  64. package/dist/capped.js.map +1 -1
  65. package/dist/disclosure-ledger.d.ts +6 -30
  66. package/dist/disclosure-ledger.d.ts.map +1 -1
  67. package/dist/disclosure-ledger.js +4 -26
  68. package/dist/disclosure-ledger.js.map +1 -1
  69. package/dist/index.d.ts +10 -26
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +7 -17
  72. package/dist/index.js.map +1 -1
  73. package/dist/module-trust.d.ts +24 -0
  74. package/dist/module-trust.d.ts.map +1 -0
  75. package/dist/module-trust.js +60 -0
  76. package/dist/module-trust.js.map +1 -0
  77. package/dist/path-confinement.d.ts +31 -0
  78. package/dist/path-confinement.d.ts.map +1 -0
  79. package/dist/path-confinement.js +44 -0
  80. package/dist/path-confinement.js.map +1 -0
  81. package/dist/protocol.d.ts +10 -53
  82. package/dist/protocol.d.ts.map +1 -1
  83. package/dist/protocol.js +14 -60
  84. package/dist/protocol.js.map +1 -1
  85. package/dist/registry.d.ts +10 -58
  86. package/dist/registry.d.ts.map +1 -1
  87. package/dist/registry.js +38 -90
  88. package/dist/registry.js.map +1 -1
  89. package/dist/render.d.ts +42 -11
  90. package/dist/render.d.ts.map +1 -1
  91. package/dist/render.js +74 -10
  92. package/dist/render.js.map +1 -1
  93. package/dist/runtime-registry.d.ts +7 -66
  94. package/dist/runtime-registry.d.ts.map +1 -1
  95. package/dist/runtime-registry.js +39 -114
  96. package/dist/runtime-registry.js.map +1 -1
  97. package/dist/scenarios/index.d.ts +1 -1
  98. package/dist/scenarios/index.d.ts.map +1 -1
  99. package/dist/scenarios/index.js +1 -1
  100. package/dist/scenarios/index.js.map +1 -1
  101. package/dist/scenarios/parse.d.ts +4 -18
  102. package/dist/scenarios/parse.d.ts.map +1 -1
  103. package/dist/scenarios/parse.js +14 -34
  104. package/dist/scenarios/parse.js.map +1 -1
  105. package/dist/scenarios/scenario.d.ts +18 -74
  106. package/dist/scenarios/scenario.d.ts.map +1 -1
  107. package/dist/scenarios/scenario.js +7 -34
  108. package/dist/scenarios/scenario.js.map +1 -1
  109. package/dist/scenarios/storage.d.ts +11 -41
  110. package/dist/scenarios/storage.d.ts.map +1 -1
  111. package/dist/scenarios/storage.js +57 -47
  112. package/dist/scenarios/storage.js.map +1 -1
  113. package/dist/server.d.ts.map +1 -1
  114. package/dist/server.js +37 -17
  115. package/dist/server.js.map +1 -1
  116. package/dist/session.d.ts +67 -259
  117. package/dist/session.d.ts.map +1 -1
  118. package/dist/session.js +69 -250
  119. package/dist/session.js.map +1 -1
  120. package/dist/tools/analyze.d.ts +24 -118
  121. package/dist/tools/analyze.d.ts.map +1 -1
  122. package/dist/tools/analyze.js +44 -166
  123. package/dist/tools/analyze.js.map +1 -1
  124. package/dist/tools/browser-click.d.ts +3 -21
  125. package/dist/tools/browser-click.d.ts.map +1 -1
  126. package/dist/tools/browser-click.js +10 -31
  127. package/dist/tools/browser-click.js.map +1 -1
  128. package/dist/tools/browser-close-session.d.ts +4 -13
  129. package/dist/tools/browser-close-session.d.ts.map +1 -1
  130. package/dist/tools/browser-close-session.js +4 -13
  131. package/dist/tools/browser-close-session.js.map +1 -1
  132. package/dist/tools/browser-fill.d.ts +5 -36
  133. package/dist/tools/browser-fill.d.ts.map +1 -1
  134. package/dist/tools/browser-fill.js +9 -44
  135. package/dist/tools/browser-fill.js.map +1 -1
  136. package/dist/tools/browser-navigate.d.ts +6 -27
  137. package/dist/tools/browser-navigate.d.ts.map +1 -1
  138. package/dist/tools/browser-navigate.js +6 -23
  139. package/dist/tools/browser-navigate.js.map +1 -1
  140. package/dist/tools/browser-run-scenario.d.ts +5 -31
  141. package/dist/tools/browser-run-scenario.d.ts.map +1 -1
  142. package/dist/tools/browser-run-scenario.js +10 -46
  143. package/dist/tools/browser-run-scenario.js.map +1 -1
  144. package/dist/tools/browser-save-scenario.d.ts +3 -28
  145. package/dist/tools/browser-save-scenario.d.ts.map +1 -1
  146. package/dist/tools/browser-save-scenario.js +15 -74
  147. package/dist/tools/browser-save-scenario.js.map +1 -1
  148. package/dist/tools/browser-snapshot.d.ts +6 -39
  149. package/dist/tools/browser-snapshot.d.ts.map +1 -1
  150. package/dist/tools/browser-snapshot.js +4 -31
  151. package/dist/tools/browser-snapshot.js.map +1 -1
  152. package/dist/tools/browser-start-session.d.ts +4 -23
  153. package/dist/tools/browser-start-session.d.ts.map +1 -1
  154. package/dist/tools/browser-start-session.js +33 -55
  155. package/dist/tools/browser-start-session.js.map +1 -1
  156. package/dist/tools/browser-type.d.ts +5 -35
  157. package/dist/tools/browser-type.d.ts.map +1 -1
  158. package/dist/tools/browser-type.js +10 -45
  159. package/dist/tools/browser-type.js.map +1 -1
  160. package/dist/tools/contracts.d.ts +9 -86
  161. package/dist/tools/contracts.d.ts.map +1 -1
  162. package/dist/tools/contracts.js +24 -80
  163. package/dist/tools/contracts.js.map +1 -1
  164. package/dist/tools/cross-pr.d.ts +42 -30
  165. package/dist/tools/cross-pr.d.ts.map +1 -1
  166. package/dist/tools/cross-pr.js +81 -62
  167. package/dist/tools/cross-pr.js.map +1 -1
  168. package/dist/tools/git-diff.d.ts +18 -2
  169. package/dist/tools/git-diff.d.ts.map +1 -1
  170. package/dist/tools/git-diff.js +118 -26
  171. package/dist/tools/git-diff.js.map +1 -1
  172. package/dist/tools/git-history.d.ts +5 -16
  173. package/dist/tools/git-history.d.ts.map +1 -1
  174. package/dist/tools/git-history.js +3 -10
  175. package/dist/tools/git-history.js.map +1 -1
  176. package/dist/tools/history.d.ts +4 -33
  177. package/dist/tools/history.d.ts.map +1 -1
  178. package/dist/tools/history.js +6 -31
  179. package/dist/tools/history.js.map +1 -1
  180. package/dist/tools/impact.d.ts +7 -51
  181. package/dist/tools/impact.d.ts.map +1 -1
  182. package/dist/tools/impact.js +15 -67
  183. package/dist/tools/impact.js.map +1 -1
  184. package/dist/tools/index.d.ts +3 -8
  185. package/dist/tools/index.d.ts.map +1 -1
  186. package/dist/tools/index.js +3 -8
  187. package/dist/tools/index.js.map +1 -1
  188. package/dist/tools/kit.d.ts +66 -113
  189. package/dist/tools/kit.d.ts.map +1 -1
  190. package/dist/tools/kit.js +60 -28
  191. package/dist/tools/kit.js.map +1 -1
  192. package/dist/tools/link-workspace.d.ts +7 -45
  193. package/dist/tools/link-workspace.d.ts.map +1 -1
  194. package/dist/tools/link-workspace.js +10 -48
  195. package/dist/tools/link-workspace.js.map +1 -1
  196. package/dist/tools/lookup.d.ts +4 -14
  197. package/dist/tools/lookup.d.ts.map +1 -1
  198. package/dist/tools/lookup.js +4 -14
  199. package/dist/tools/lookup.js.map +1 -1
  200. package/dist/tools/mark-incident.d.ts +7 -54
  201. package/dist/tools/mark-incident.d.ts.map +1 -1
  202. package/dist/tools/mark-incident.js +15 -68
  203. package/dist/tools/mark-incident.js.map +1 -1
  204. package/dist/tools/observe-runtime.d.ts +27 -210
  205. package/dist/tools/observe-runtime.d.ts.map +1 -1
  206. package/dist/tools/observe-runtime.js +257 -435
  207. package/dist/tools/observe-runtime.js.map +1 -1
  208. package/dist/tools/observe-tests.d.ts +9 -100
  209. package/dist/tools/observe-tests.d.ts.map +1 -1
  210. package/dist/tools/observe-tests.js +24 -152
  211. package/dist/tools/observe-tests.js.map +1 -1
  212. package/dist/tools/pr-analysis.d.ts +18 -2
  213. package/dist/tools/pr-analysis.d.ts.map +1 -1
  214. package/dist/tools/pr-analysis.js +73 -23
  215. package/dist/tools/pr-analysis.js.map +1 -1
  216. package/dist/tools/pre-push.d.ts +68 -16
  217. package/dist/tools/pre-push.d.ts.map +1 -1
  218. package/dist/tools/pre-push.js +98 -35
  219. package/dist/tools/pre-push.js.map +1 -1
  220. package/dist/tools/propagation.d.ts +11 -53
  221. package/dist/tools/propagation.d.ts.map +1 -1
  222. package/dist/tools/propagation.js +14 -57
  223. package/dist/tools/propagation.js.map +1 -1
  224. package/dist/tools/questions.d.ts +13 -63
  225. package/dist/tools/questions.d.ts.map +1 -1
  226. package/dist/tools/questions.js +33 -105
  227. package/dist/tools/questions.js.map +1 -1
  228. package/dist/tools/refusal-fetch.d.ts +4 -40
  229. package/dist/tools/refusal-fetch.d.ts.map +1 -1
  230. package/dist/tools/refusal-fetch.js +4 -40
  231. package/dist/tools/refusal-fetch.js.map +1 -1
  232. package/dist/tools/runtime-incident.d.ts +4 -63
  233. package/dist/tools/runtime-incident.d.ts.map +1 -1
  234. package/dist/tools/runtime-incident.js +10 -87
  235. package/dist/tools/runtime-incident.js.map +1 -1
  236. package/dist/tools/scope.d.ts +7 -25
  237. package/dist/tools/scope.d.ts.map +1 -1
  238. package/dist/tools/scope.js +10 -29
  239. package/dist/tools/scope.js.map +1 -1
  240. package/dist/tools/similar-incidents.d.ts +11 -86
  241. package/dist/tools/similar-incidents.d.ts.map +1 -1
  242. package/dist/tools/similar-incidents.js +7 -71
  243. package/dist/tools/similar-incidents.js.map +1 -1
  244. package/dist/tools/validate.d.ts +14 -69
  245. package/dist/tools/validate.d.ts.map +1 -1
  246. package/dist/tools/validate.js +23 -74
  247. package/dist/tools/validate.js.map +1 -1
  248. package/dist/tools/verification-status.d.ts +9 -64
  249. package/dist/tools/verification-status.d.ts.map +1 -1
  250. package/dist/tools/verification-status.js +9 -62
  251. package/dist/tools/verification-status.js.map +1 -1
  252. package/dist/tools/verify-claim.d.ts +5 -52
  253. package/dist/tools/verify-claim.d.ts.map +1 -1
  254. package/dist/tools/verify-claim.js +6 -56
  255. package/dist/tools/verify-claim.js.map +1 -1
  256. package/dist/transport.d.ts +15 -52
  257. package/dist/transport.d.ts.map +1 -1
  258. package/dist/transport.js +16 -60
  259. package/dist/transport.js.map +1 -1
  260. package/package.json +30 -21
package/dist/index.d.ts CHANGED
@@ -1,10 +1,6 @@
1
- /**
2
- * `@descryy/mcp` — the agent-facing front door.
3
- *
4
- * A thin wrapper over the query layer, as DEC-002 requires: every consumer goes
5
- * through here and **nothing touches storage directly**. That is why the tools
6
- * hold a `Session` and not a driver.
7
- */
1
+ /** `@descryy/mcp` — the agent-facing front door. A thin wrapper over the query layer
2
+ * (DEC-002): every consumer goes through here and nothing touches storage directly —
3
+ * which is why tools hold a `Session`, not a driver. */
8
4
  export { createMcpServer } from "./server.ts";
9
5
  export type { McpServer, McpServerOptions } from "./server.ts";
10
6
  export { Session, loadConfig, writeConfig, writeSources, ConfigError, CONFIG_RELATIVE_PATH, DEFAULT_GRAPH_RELATIVE_PATH, } from "./session.ts";
@@ -15,29 +11,17 @@ export { renderAnswer, renderFailed, renderHandshake, renderTimedOut, renderTool
15
11
  export type { AnswerEnvelope, CallToolResult, Provenance, ResultState, ToolAnswer, ToolTier, TruncationDetail, } from "./render.ts";
16
12
  export { TOOLS, TOOLS_BY_NAME, ToolInputError, resolveOneNode } from "./tools/index.ts";
17
13
  export type { BriefNode, NodeCandidates, Progress, ToolContext, ToolDefinition, } from "./tools/index.ts";
18
- /**
19
- * The shape each tool puts in `AnswerEnvelope.data`.
20
- *
21
- * `data` is `unknown` in the envelope by design — it differs per tool — but
22
- * "read the handler" is not a contract, and an AI caller cannot rely on a
23
- * shape nobody wrote down. Each of these describes what its tool returns
24
- * **today**; where a tool's payload is genuinely conditional the type is a
25
- * union that says so rather than a widening to `unknown`.
26
- */
14
+ /** The shape each tool puts in `AnswerEnvelope.data`. `data` is `unknown` in the envelope
15
+ * by design, but an AI caller can't rely on an unwritten shape — each type here describes
16
+ * what its tool returns today; genuinely conditional payloads are unions, not `unknown`. */
27
17
  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
18
  export { serveStdio, guardStdout, createLineReader } from "./transport.ts";
29
19
  export type { Transport, StdioOptions } from "./transport.ts";
30
20
  export { PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, negotiateVersion, parseMessage, ProtocolError, } from "./protocol.ts";
31
21
  export type { RpcRequest, RpcNotification, RpcResponse, RpcMessage, RpcId } from "./protocol.ts";
32
- /**
33
- * The scenario format — storage, schema and the refusals.
34
- *
35
- * Re-exported here because `descry check` reads saved scenarios through this
36
- * module and must not reach past the package boundary to do it. A CLI that
37
- * imported `./scenarios/storage.ts` by relative path would be a second reader
38
- * of the format, free to drift from this one the day the schema changes; the
39
- * whole argument for a format module is that there is exactly one.
40
- */
41
- export { SCENARIO_SCHEMA_VERSION, isUnverifying, parseScenario, serializeScenario, scenariosDirectory, scenarioPath, listScenarios, readScenario, writeScenario, } from "./scenarios/index.ts";
22
+ /** The scenario format — storage, schema, refusals. Re-exported here so `descry check`
23
+ * doesn't reach past the package boundary — a second reader importing the relative path
24
+ * could drift from this one the day the schema changes. */
25
+ export { SCENARIO_SCHEMA_VERSION, isUnverifying, parseScenario, serializeScenario, scenariosDirectory, scenarioPath, listScenarios, ScenarioListError, readScenario, writeScenario, } from "./scenarios/index.ts";
42
26
  export type { Scenario, ScenarioStep, ScenarioAssertion, ScenarioAssertionKind, ScenarioActionKind, ScenarioParseResult, TargetDescriptor, } from "./scenarios/index.ts";
43
27
  //# sourceMappingURL=index.d.ts.map
@@ -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,O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B,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEjG;;4DAE4D;AAC5D,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,10 +1,6 @@
1
- /**
2
- * `@descryy/mcp` — the agent-facing front door.
3
- *
4
- * A thin wrapper over the query layer, as DEC-002 requires: every consumer goes
5
- * through here and **nothing touches storage directly**. That is why the tools
6
- * hold a `Session` and not a driver.
7
- */
1
+ /** `@descryy/mcp` — the agent-facing front door. A thin wrapper over the query layer
2
+ * (DEC-002): every consumer goes through here and nothing touches storage directly —
3
+ * which is why tools hold a `Session`, not a driver. */
8
4
  export { createMcpServer } from "./server.js";
9
5
  export { Session, loadConfig, writeConfig, writeSources, ConfigError, CONFIG_RELATIVE_PATH, DEFAULT_GRAPH_RELATIVE_PATH, } from "./session.js";
10
6
  export { loadSources, detectSources, normaliseSpec } from "./registry.js";
@@ -12,14 +8,8 @@ export { renderAnswer, renderFailed, renderHandshake, renderTimedOut, renderTool
12
8
  export { TOOLS, TOOLS_BY_NAME, ToolInputError, resolveOneNode } from "./tools/index.js";
13
9
  export { serveStdio, guardStdout, createLineReader } from "./transport.js";
14
10
  export { PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, negotiateVersion, parseMessage, ProtocolError, } from "./protocol.js";
15
- /**
16
- * The scenario format — storage, schema and the refusals.
17
- *
18
- * Re-exported here because `descry check` reads saved scenarios through this
19
- * module and must not reach past the package boundary to do it. A CLI that
20
- * imported `./scenarios/storage.ts` by relative path would be a second reader
21
- * of the format, free to drift from this one the day the schema changes; the
22
- * whole argument for a format module is that there is exactly one.
23
- */
24
- export { SCENARIO_SCHEMA_VERSION, isUnverifying, parseScenario, serializeScenario, scenariosDirectory, scenarioPath, listScenarios, readScenario, writeScenario, } from "./scenarios/index.js";
11
+ /** The scenario format — storage, schema, refusals. Re-exported here so `descry check`
12
+ * doesn't reach past the package boundary — a second reader importing the relative path
13
+ * could drift from this one the day the schema changes. */
14
+ export { SCENARIO_SCHEMA_VERSION, isUnverifying, parseScenario, serializeScenario, scenariosDirectory, scenarioPath, listScenarios, ScenarioListError, readScenario, writeScenario, } from "./scenarios/index.js";
25
15
  //# sourceMappingURL=index.js.map
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;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;AAGvB;;;;;;;;GAQG;AACH,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;yDAEyD;AAEzD,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;AAoExF,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;AAGvB;;4DAE4D;AAC5D,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Gates `import()` of caller-named specifiers (A-F1/A-F2, three ungated call sites). Refuses path-like specifiers (exact bytes, no install step) by default.
3
+ * Also refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — a repo can otherwise ship a payload merely by being cloned.
4
+ * Escape hatches: `DESCRY_ALLOW_PATH_ADAPTER_MODULES=1`, `DESCRY_ALLOW_TRACKED_NODE_MODULES=1` (server env only, never repo-set).
5
+ */
6
+ export declare const ALLOW_PATH_MODULES_ENV_VAR = "DESCRY_ALLOW_PATH_ADAPTER_MODULES";
7
+ export declare const ALLOW_TRACKED_NODE_MODULES_ENV_VAR = "DESCRY_ALLOW_TRACKED_NODE_MODULES";
8
+ export type ModuleTrustDecision = {
9
+ readonly allowed: true;
10
+ } | {
11
+ readonly allowed: false;
12
+ readonly reason: string;
13
+ };
14
+ /** Path-like: relative/absolute/drive-absolute/home-relative path, or any URL-scheme specifier (`file:`, `http:`, `data:`, …) — names exact bytes, not an installed package. Everything else resolves normally. */
15
+ export declare function isPathLikeSpecifier(specifier: string): boolean;
16
+ /** Decides if `specifier` may be `import()`-ed; never throws — each call site turns a refusal into its own existing failure channel (`SourceLoadFailure`, etc.). */
17
+ export declare function checkModuleTrust(specifier: string): ModuleTrustDecision;
18
+ /** Follow-up to `checkModuleTrust`: refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — closes a payload-via-commit gap. A `null` git-tracked check (no `.git`) is allowed, not refused: the exploit needs a clone, and a non-git directory is a real workflow this check has no history to verify either way. */
19
+ export declare function checkRepoResolvedModuleTrust(options: {
20
+ readonly specifier: string;
21
+ readonly repoPath: string;
22
+ readonly resolvedAbsolutePath: string;
23
+ }): Promise<ModuleTrustDecision>;
24
+ //# sourceMappingURL=module-trust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-trust.d.ts","sourceRoot":"","sources":["../src/module-trust.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAC9E,eAAO,MAAM,kCAAkC,sCAAsC,CAAC;AAEtF,MAAM,MAAM,mBAAmB,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpH,mNAAmN;AACnN,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAK9D;AAOD,oKAAoK;AACpK,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,CAYvE;AAOD,kYAAkY;AAClY,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiB/B"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Gates `import()` of caller-named specifiers (A-F1/A-F2, three ungated call sites). Refuses path-like specifiers (exact bytes, no install step) by default.
3
+ * Also refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — a repo can otherwise ship a payload merely by being cloned.
4
+ * Escape hatches: `DESCRY_ALLOW_PATH_ADAPTER_MODULES=1`, `DESCRY_ALLOW_TRACKED_NODE_MODULES=1` (server env only, never repo-set).
5
+ */
6
+ import { isPathTrackedByGit } from "@descryy/core";
7
+ export const ALLOW_PATH_MODULES_ENV_VAR = "DESCRY_ALLOW_PATH_ADAPTER_MODULES";
8
+ export const ALLOW_TRACKED_NODE_MODULES_ENV_VAR = "DESCRY_ALLOW_TRACKED_NODE_MODULES";
9
+ /** Path-like: relative/absolute/drive-absolute/home-relative path, or any URL-scheme specifier (`file:`, `http:`, `data:`, …) — names exact bytes, not an installed package. Everything else resolves normally. */
10
+ export function isPathLikeSpecifier(specifier) {
11
+ if (specifier.startsWith(".") || specifier.startsWith("/") || specifier.startsWith("~"))
12
+ return true;
13
+ if (/^[a-zA-Z]:[\\/]/.test(specifier))
14
+ return true;
15
+ if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(specifier))
16
+ return true;
17
+ return false;
18
+ }
19
+ function pathModulesAllowed() {
20
+ const value = process.env[ALLOW_PATH_MODULES_ENV_VAR];
21
+ return value === "1" || value === "true";
22
+ }
23
+ /** Decides if `specifier` may be `import()`-ed; never throws — each call site turns a refusal into its own existing failure channel (`SourceLoadFailure`, etc.). */
24
+ export function checkModuleTrust(specifier) {
25
+ if (!isPathLikeSpecifier(specifier))
26
+ return { allowed: true };
27
+ if (pathModulesAllowed())
28
+ return { allowed: true };
29
+ return {
30
+ allowed: false,
31
+ reason: `"${specifier}" names a file path or URL rather than an installed package. Loading one executes ` +
32
+ "arbitrary code with no further confirmation, and this specifier can come from a scanned repository's " +
33
+ "own configuration or from a tool call — neither is necessarily something the operator running this " +
34
+ `server chose. Refused by default; set ${ALLOW_PATH_MODULES_ENV_VAR}=1 in this server's own environment ` +
35
+ "to allow it, and only do that for adapters and configuration you, the operator, trust.",
36
+ };
37
+ }
38
+ function trackedNodeModulesAllowed() {
39
+ const value = process.env[ALLOW_TRACKED_NODE_MODULES_ENV_VAR];
40
+ return value === "1" || value === "true";
41
+ }
42
+ /** Follow-up to `checkModuleTrust`: refuses a bare specifier resolved into the scanned repo's own git-tracked `node_modules` (real `npm install` leaves it untracked) — closes a payload-via-commit gap. A `null` git-tracked check (no `.git`) is allowed, not refused: the exploit needs a clone, and a non-git directory is a real workflow this check has no history to verify either way. */
43
+ export async function checkRepoResolvedModuleTrust(options) {
44
+ if (trackedNodeModulesAllowed())
45
+ return { allowed: true };
46
+ const tracked = await isPathTrackedByGit(options.repoPath, options.resolvedAbsolutePath);
47
+ if (tracked !== true)
48
+ return { allowed: true };
49
+ return {
50
+ allowed: false,
51
+ reason: `"${options.specifier}" resolved to ${options.resolvedAbsolutePath}, inside ${options.repoPath}'s own ` +
52
+ "node_modules — but that file is committed to this repository's own git history, not installed by a " +
53
+ "package manager (a real `npm install` leaves node_modules untracked, almost universally). A " +
54
+ "repository that commits its own node_modules can deliver arbitrary code to anyone who merely clones " +
55
+ `it, with no npm install step at all. Refused by default; set ${ALLOW_TRACKED_NODE_MODULES_ENV_VAR}=1 ` +
56
+ "in this server's own environment to allow it, and only do that for a repository whose committed " +
57
+ "node_modules you, the operator, trust.",
58
+ };
59
+ }
60
+ //# sourceMappingURL=module-trust.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-trust.js","sourceRoot":"","sources":["../src/module-trust.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC;AAC9E,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAAmC,CAAC;AAItF,mNAAmN;AACnN,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACrG,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,2BAA2B,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7D,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACtD,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,MAAM,CAAC;AAC3C,CAAC;AAED,oKAAoK;AACpK,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC9D,IAAI,kBAAkB,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACnD,OAAO;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EACJ,IAAI,SAAS,oFAAoF;YACjG,uGAAuG;YACvG,qGAAqG;YACrG,yCAAyC,0BAA0B,sCAAsC;YACzG,wFAAwF;KAC3F,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB;IAChC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IAC9D,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,MAAM,CAAC;AAC3C,CAAC;AAED,kYAAkY;AAClY,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,OAIlD;IACC,IAAI,yBAAyB,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE1D,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzF,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE/C,OAAO;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EACJ,IAAI,OAAO,CAAC,SAAS,iBAAiB,OAAO,CAAC,oBAAoB,YAAY,OAAO,CAAC,QAAQ,SAAS;YACvG,qGAAqG;YACrG,8FAA8F;YAC9F,sGAAsG;YACtG,gEAAgE,kCAAkC,KAAK;YACvG,kGAAkG;YAClG,wCAAwC;KAC3C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Confines a caller-named path to a set of roots, with a disclosed, operator-set
3
+ * escape hatch (A-F6). Generalizes two `observe-runtime.ts` call sites with no such
4
+ * check: `evidencePath` (relative joined onto repo root with no re-check — `..`
5
+ * escaped it) and `attach.logFilePath` (read in full every poll, unchecked). */
6
+ export type PathConfinementDecision = {
7
+ readonly allowed: true;
8
+ readonly resolved: string;
9
+ } | {
10
+ readonly allowed: false;
11
+ readonly reason: string;
12
+ };
13
+ export interface PathConfinementOptions {
14
+ /** The path as configured, absolute or relative. Relative is resolved against `process.cwd()` — callers that mean "relative to the repo" must join it themselves before calling this. */
15
+ readonly candidate: string;
16
+ /** Confined when the resolved candidate is under any of these. */
17
+ readonly allowedRoots: readonly string[];
18
+ /** Set to `"1"` or `"true"` in this server's own environment to bypass confinement. */
19
+ readonly envVar: string;
20
+ /** What the value is, for the refusal message — e.g. `"evidencePath"`. */
21
+ readonly what: string;
22
+ }
23
+ export declare function checkPathConfinement(options: PathConfinementOptions): PathConfinementDecision;
24
+ export type SensitivePathDecision = {
25
+ readonly sensitive: false;
26
+ } | {
27
+ readonly sensitive: true;
28
+ readonly reason: string;
29
+ };
30
+ export declare function checkNotSensitivePath(candidate: string, envVar: string): SensitivePathDecision;
31
+ //# sourceMappingURL=path-confinement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-confinement.d.ts","sourceRoot":"","sources":["../src/path-confinement.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAIhF,MAAM,MAAM,uBAAuB,GAC/B;IAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAOzD,MAAM,WAAW,sBAAsB;IACrC,yLAAyL;IACzL,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,uBAAuB,CAe7F;AAQD,MAAM,MAAM,qBAAqB,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1H,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,qBAAqB,CAY9F"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Confines a caller-named path to a set of roots, with a disclosed, operator-set
3
+ * escape hatch (A-F6). Generalizes two `observe-runtime.ts` call sites with no such
4
+ * check: `evidencePath` (relative joined onto repo root with no re-check — `..`
5
+ * escaped it) and `attach.logFilePath` (read in full every poll, unchecked). */
6
+ import { resolve, sep } from "node:path";
7
+ function isWithin(resolvedCandidate, root) {
8
+ const resolvedRoot = resolve(root);
9
+ return resolvedCandidate === resolvedRoot || resolvedCandidate.startsWith(resolvedRoot + sep);
10
+ }
11
+ export function checkPathConfinement(options) {
12
+ const resolved = resolve(options.candidate);
13
+ if (options.allowedRoots.some((root) => isWithin(resolved, root))) {
14
+ return { allowed: true, resolved };
15
+ }
16
+ if (process.env[options.envVar] === "1" || process.env[options.envVar] === "true") {
17
+ return { allowed: true, resolved };
18
+ }
19
+ return {
20
+ allowed: false,
21
+ reason: `"${options.candidate}" (${options.what}) resolves to ${resolved}, outside ` +
22
+ `${options.allowedRoots.length === 1 ? "" : "every one of "}${options.allowedRoots.join(", ")}. ` +
23
+ `Refused by default; set ${options.envVar}=1 in this server's own environment to allow it.`,
24
+ };
25
+ }
26
+ /** Name-based blocklist for logFilePath (can't root-confine — logs live anywhere),
27
+ * narrowed to the exploit's shape (`~/.ssh/id_rsa`). NOT primary defence: `redact()`
28
+ * unconditionally scans every byte first — this only stops the read itself. */
29
+ const SENSITIVE_PATH_SEGMENT = /(^|[/\\])(\.ssh|\.aws|\.gnupg|\.kube|\.netrc|\.npmrc|\.git-credentials|\.pgpass|shadow|id_rsa|id_dsa|id_ecdsa|id_ed25519|\.env(\..+)?|[^/\\]+\.pem|[^/\\]+\.key)($|[/\\])/i;
30
+ export function checkNotSensitivePath(candidate, envVar) {
31
+ const resolved = resolve(candidate);
32
+ if (!SENSITIVE_PATH_SEGMENT.test(resolved))
33
+ return { sensitive: false };
34
+ if (process.env[envVar] === "1" || process.env[envVar] === "true")
35
+ return { sensitive: false };
36
+ return {
37
+ sensitive: true,
38
+ reason: `"${candidate}" names a file shape that is never an application log (an SSH/cloud/credential ` +
39
+ `location) — refusing to read it as one. This is a narrow, name-based check, not a guarantee that ` +
40
+ `every sensitive path is caught; set ${envVar}=1 in this server's own environment if this path ` +
41
+ "genuinely is your application's log.",
42
+ };
43
+ }
44
+ //# sourceMappingURL=path-confinement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-confinement.js","sourceRoot":"","sources":["../src/path-confinement.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAMzC,SAAS,QAAQ,CAAC,iBAAyB,EAAE,IAAY;IACvD,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,iBAAiB,KAAK,YAAY,IAAI,iBAAiB,CAAC,UAAU,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC;AAChG,CAAC;AAaD,MAAM,UAAU,oBAAoB,CAAC,OAA+B;IAClE,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5C,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;QAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACrC,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,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is the obvious answer and the blueprint's
7
- * dependency table names it. It was measured rather than assumed: version 1.30.0
8
- * declares **seventeen direct dependencies** — `express`, `hono`,
9
- * `@hono/node-server`, `cors`, `express-rate-limit`, `jose`, `pkce-challenge`,
10
- * `eventsource`, `ajv`, `zod` — essentially all of which exist to serve the HTTP
11
- * and OAuth transports. This server speaks stdio to a coding agent on the same
12
- * machine. It will never open a socket.
13
- *
14
- * The rest of this project has made the same call four times — `node:sqlite`
15
- * over `better-sqlite3`, `node --test` over a test runner, `tsc` over a bundler,
16
- * `git` invoked directly over a git library — every time on the same grounds:
17
- * this is a **locally installed developer tool**, and a dependency tree is a
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.
30
- *
31
- * **The cost is named, not waved away.** Hand-rolling means spec drift is
32
- * silent: the wire format changes, the client stops working, and nothing in this
33
- * repository fails. Two things pay it down. `PROTOCOL_VERSION` is pinned and
34
- * `SUPPORTED_PROTOCOL_VERSIONS` is explicit, so an unknown version is negotiated
35
- * rather than assumed compatible; and the handshake is covered by tests that
36
- * assert the exact frames, so a change to the shape is a red test rather than a
37
- * user-visible mystery. If the protocol moves past what is here, the fix is to
38
- * add a version to the list — not to discover it from a bug report.
39
- */
2
+ * JSON-RPC 2.0 + the MCP slice this server speaks — hand-written, not the SDK:
3
+ * v1.30.0 pulls 17 deps, nearly all for HTTP/OAuth transports this stdio-only
4
+ * server never opens (same call as `node:sqlite`, `node --test`, `tsc` elsewhere).
5
+ * Spec-drift risk is mitigated by a pinned `PROTOCOL_VERSION` and exact-frame tests. */
40
6
  /** JSON-RPC 2.0 ids: string or number, never null in a request. */
41
7
  export type RpcId = string | number;
42
8
  export interface RpcRequest {
@@ -68,24 +34,15 @@ export declare const RPC_INVALID_REQUEST = -32600;
68
34
  export declare const RPC_METHOD_NOT_FOUND = -32601;
69
35
  export declare const RPC_INVALID_PARAMS = -32602;
70
36
  export declare const RPC_INTERNAL_ERROR = -32603;
71
- /**
72
- * The version this server implements.
73
- *
74
- * Newest first. Negotiation echoes the client's version when it is on this list
75
- * and otherwise answers with `PROTOCOL_VERSION`, which is what the spec asks for
76
- * — the client then decides whether it can proceed. Answering with the client's
77
- * unknown version instead would be a claim of compatibility nobody has checked.
78
- */
37
+ /** The version this server implements. Negotiation echoes the client's version if
38
+ * it's on `SUPPORTED_PROTOCOL_VERSIONS`, else answers with this — never claims
39
+ * compatibility with an unchecked client version. */
79
40
  export declare const PROTOCOL_VERSION = "2025-06-18";
80
41
  export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
81
42
  export declare function negotiateVersion(requested: unknown): string;
82
- /**
83
- * A frame that could not be understood well enough to answer.
84
- *
85
- * Distinguished from a request that is merely wrong, because JSON-RPC says a
86
- * message with no usable id gets no response at all — replying to it with a
87
- * fabricated id would put a frame on the wire the client cannot correlate.
88
- */
43
+ /** A frame that couldn't be understood well enough to answer. Distinct from a
44
+ * merely-wrong request — JSON-RPC says a message with no usable id gets no
45
+ * response; replying with a fabricated id would be uncorrelatable. */
89
46
  export declare class ProtocolError extends Error {
90
47
  readonly code: number;
91
48
  /** Null when the frame carried no usable id and must therefore go unanswered. */
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,mEAAmE;AACnE,MAAM,MAAM,KAAK,GAAG,MAAM,GA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S,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,IAAI,UAAU,CAEpE;AAED,wBAAgB,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,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
@@ -1,56 +1,17 @@
1
1
  /**
2
- * JSON-RPC 2.0 and the slice of MCP this server speaks.
3
- *
4
- * ## Why this is hand-written
5
- *
6
- * `@modelcontextprotocol/sdk` is the obvious answer and the blueprint's
7
- * dependency table names it. It was measured rather than assumed: version 1.30.0
8
- * declares **seventeen direct dependencies** — `express`, `hono`,
9
- * `@hono/node-server`, `cors`, `express-rate-limit`, `jose`, `pkce-challenge`,
10
- * `eventsource`, `ajv`, `zod` — essentially all of which exist to serve the HTTP
11
- * and OAuth transports. This server speaks stdio to a coding agent on the same
12
- * machine. It will never open a socket.
13
- *
14
- * The rest of this project has made the same call four times — `node:sqlite`
15
- * over `better-sqlite3`, `node --test` over a test runner, `tsc` over a bundler,
16
- * `git` invoked directly over a git library — every time on the same grounds:
17
- * this is a **locally installed developer tool**, and a dependency tree is a
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.
30
- *
31
- * **The cost is named, not waved away.** Hand-rolling means spec drift is
32
- * silent: the wire format changes, the client stops working, and nothing in this
33
- * repository fails. Two things pay it down. `PROTOCOL_VERSION` is pinned and
34
- * `SUPPORTED_PROTOCOL_VERSIONS` is explicit, so an unknown version is negotiated
35
- * rather than assumed compatible; and the handshake is covered by tests that
36
- * assert the exact frames, so a change to the shape is a red test rather than a
37
- * user-visible mystery. If the protocol moves past what is here, the fix is to
38
- * add a version to the list — not to discover it from a bug report.
39
- */
2
+ * JSON-RPC 2.0 + the MCP slice this server speaks — hand-written, not the SDK:
3
+ * v1.30.0 pulls 17 deps, nearly all for HTTP/OAuth transports this stdio-only
4
+ * server never opens (same call as `node:sqlite`, `node --test`, `tsc` elsewhere).
5
+ * Spec-drift risk is mitigated by a pinned `PROTOCOL_VERSION` and exact-frame tests. */
40
6
  /** Standard JSON-RPC codes. MCP adds none of its own at this layer. */
41
7
  export const RPC_PARSE_ERROR = -32700;
42
8
  export const RPC_INVALID_REQUEST = -32600;
43
9
  export const RPC_METHOD_NOT_FOUND = -32601;
44
10
  export const RPC_INVALID_PARAMS = -32602;
45
11
  export const RPC_INTERNAL_ERROR = -32603;
46
- /**
47
- * The version this server implements.
48
- *
49
- * Newest first. Negotiation echoes the client's version when it is on this list
50
- * and otherwise answers with `PROTOCOL_VERSION`, which is what the spec asks for
51
- * — the client then decides whether it can proceed. Answering with the client's
52
- * unknown version instead would be a claim of compatibility nobody has checked.
53
- */
12
+ /** The version this server implements. Negotiation echoes the client's version if
13
+ * it's on `SUPPORTED_PROTOCOL_VERSIONS`, else answers with this — never claims
14
+ * compatibility with an unchecked client version. */
54
15
  export const PROTOCOL_VERSION = "2025-06-18";
55
16
  export const SUPPORTED_PROTOCOL_VERSIONS = [
56
17
  "2025-06-18",
@@ -62,16 +23,9 @@ export function negotiateVersion(requested) {
62
23
  ? requested
63
24
  : PROTOCOL_VERSION;
64
25
  }
65
- // ---------------------------------------------------------------------------
66
- // Parsing
67
- // ---------------------------------------------------------------------------
68
- /**
69
- * A frame that could not be understood well enough to answer.
70
- *
71
- * Distinguished from a request that is merely wrong, because JSON-RPC says a
72
- * message with no usable id gets no response at all — replying to it with a
73
- * fabricated id would put a frame on the wire the client cannot correlate.
74
- */
26
+ /** A frame that couldn't be understood well enough to answer. Distinct from a
27
+ * merely-wrong request — JSON-RPC says a message with no usable id gets no
28
+ * response; replying with a fabricated id would be uncorrelatable. */
75
29
  export class ProtocolError extends Error {
76
30
  code;
77
31
  /** Null when the frame carried no usable id and must therefore go unanswered. */
@@ -98,8 +52,8 @@ export function parseMessage(line) {
98
52
  if (!isRecord(raw)) {
99
53
  throw new ProtocolError(RPC_INVALID_REQUEST, "message must be a JSON object", null);
100
54
  }
101
- // Batch requests were removed from MCP in 2025-06-18 and this server never
102
- // supported them; an array reaches the same branch as any other non-object.
55
+ // Batch requests were removed from MCP in 2025-06-18; never supported here anyway —
56
+ // an array reaches the same branch as any other non-object.
103
57
  const id = raw["id"];
104
58
  const usableId = typeof id === "string" || typeof id === "number" ? id : null;
105
59
  if (raw["jsonrpc"] !== "2.0") {
@@ -110,8 +64,8 @@ export function parseMessage(line) {
110
64
  }
111
65
  const params = raw["params"];
112
66
  if (params !== undefined && !isRecord(params)) {
113
- // Positional params are legal JSON-RPC and illegal MCP. Rejected rather than
114
- // coerced: an array silently read as an object is a wrong answer, not an error.
67
+ // Positional params are legal JSON-RPC, illegal MCP. Rejected, not coerced —
68
+ // an array silently read as an object would be a wrong answer, not an error.
115
69
  throw new ProtocolError(RPC_INVALID_PARAMS, "params must be an object", usableId);
116
70
  }
117
71
  const method = raw["method"];
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAiCH,uEAAuE;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,CA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AAE,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"}
@@ -1,47 +1,8 @@
1
- /**
2
- * How the server reaches adapters without this repository depending on them.
3
- *
4
- * `descry-core` must not import `descry-adapters`: the IR boundary is a
5
- * dependency-direction fact, and an import here would invert it in the one place
6
- * where it matters most — the process that runs everything. So sources are named
7
- * in configuration as module specifiers and loaded at runtime. The engine knows
8
- * `IRSource`; it never knows the word "python".
9
- *
10
- * ## The factory convention, and why it is a convention rather than an interface
11
- *
12
- * Every adapter in `descry-adapters` exports `ADAPTER_ID`, `ADAPTER_VERSION` and
13
- * a factory named `create<Something>Adapter` — `createGoAdapter`,
14
- * `createTypeScriptAdapter`, `createOpenApiAdapter`. There is no uniform name,
15
- * and inventing one now would be a breaking change across twelve packages to
16
- * save a regular expression. So: an explicit `export` in config wins; failing
17
- * that, the single export matching `create*Adapter` is used; **two matches is an
18
- * error, not a coin toss.**
19
- *
20
- * ## Failing to load a source is a disclosure, never a shrug
21
- *
22
- * An adapter that will not import is the difference between "we found no problem
23
- * in your Python service" and "we could not read your Python service" — §20.2
24
- * keeps those in different categories, and a registry that quietly skipped a
25
- * broken specifier would collapse them at the very bottom of the stack, where no
26
- * layer above could ever recover the distinction. Every failure comes back as a
27
- * `SourceLoadFailure` carrying the specifier and the reason, and the caller is
28
- * structurally unable to take the loaded sources without also taking the list of
29
- * ones that are missing.
30
- *
31
- * ## Two places to look, because the server and the repository are not the same tree
32
- *
33
- * `import(spec.module)` resolves relative to *this package's* location. That is
34
- * right for a side-by-side install — `npm i @descryy/mcp @descryy/adapter-x` puts
35
- * both under the repository's own `node_modules` — and useless under `npx -y
36
- * @descryy/mcp <repo>`, where the server runs out of an isolated npx cache
37
- * directory that contains no adapter the user ever installed. So a specifier is
38
- * resolved from the **repository root first** when one is known: that is where the
39
- * user installed the adapter and where their lockfile pins its version. The
40
- * server's own closure stays as the fallback, so the side-by-side install and the
41
- * absolute-path and `file:` specifiers that never needed a repository keep working
42
- * unchanged. When both fail, both are disclosed — a resolution nobody attempted is
43
- * the worst thing to make somebody debug.
44
- */
1
+ /** How the server reaches adapters without depending on them: `descry-core` must never
2
+ * import `descry-adapters` (rule 1, IR boundary) — sources are named as module specifiers
3
+ * in config and loaded at runtime via a `create*Adapter` convention (an ambiguous match
4
+ * errors, never guesses). A failed load is disclosed as `SourceLoadFailure`, never silently
5
+ * skipped (§20.2). Specifiers resolve from the repo root first (npx isolates adapters there), then this package's own closure. */
45
6
  import type { IRSource, LanguageAdapter, RepoRoot } from "@descryy/ir";
46
7
  /** One entry in the configured source list. A bare string is `{ module }`. */
47
8
  export interface SourceSpec {
@@ -66,21 +27,12 @@ export interface RegistryResult {
66
27
  readonly failed: readonly SourceLoadFailure[];
67
28
  }
68
29
  export declare function normaliseSpec(entry: string | SourceSpec): SourceSpec;
69
- /**
70
- * @param repoPath Repository being analysed, when one is known. Specifiers are
71
- * resolved from here first; without it only the server's own closure is searched,
72
- * which is correct for callers that name modules by absolute path or `file:` URL.
73
- */
30
+ /** @param repoPath Repo being analysed, when known — specifiers resolve from here first;
31
+ * without it only this package's closure is searched (correct for absolute-path/`file:` callers). */
74
32
  export declare function loadSources(entries: readonly (string | SourceSpec)[], repoPath?: string): Promise<RegistryResult>;
75
- /**
76
- * Ask each loaded adapter whether it claims this repository.
77
- *
78
- * A source that is not a `LanguageAdapter` — the git history reader is the
79
- * standing example — has nothing to detect and always runs. A `detect` that
80
- * throws is treated as "did not detect", **with the reason recorded**: a broken
81
- * detector must not be able to fail the whole run, and must not be able to hide
82
- * either.
83
- */
33
+ /** Asks each loaded adapter whether it claims this repository. A non-`LanguageAdapter`
34
+ * source (the git reader) always runs. A throwing `detect` counts as "did not detect",
35
+ * with the reason recorded — it can't fail the whole run, and can't hide either. */
84
36
  export declare function detectSources(sources: readonly LoadedSource[], root: RepoRoot): Promise<{
85
37
  readonly applicable: readonly LoadedSource[];
86
38
  readonly skipped: readonly {
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvE,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,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,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC/C;AAID,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAEpE;AAyB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