@descryy/mcp 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) 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 +121 -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 +12 -19
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +31 -26
  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 +59 -197
  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-provenance.d.ts +23 -0
  38. package/dist/browser/scenario-provenance.d.ts.map +1 -0
  39. package/dist/browser/scenario-provenance.js +59 -0
  40. package/dist/browser/scenario-provenance.js.map +1 -0
  41. package/dist/browser/scenario-resolve.d.ts +10 -44
  42. package/dist/browser/scenario-resolve.d.ts.map +1 -1
  43. package/dist/browser/scenario-resolve.js +10 -41
  44. package/dist/browser/scenario-resolve.js.map +1 -1
  45. package/dist/browser/scenario-runner.d.ts +12 -70
  46. package/dist/browser/scenario-runner.d.ts.map +1 -1
  47. package/dist/browser/scenario-runner.js +30 -90
  48. package/dist/browser/scenario-runner.js.map +1 -1
  49. package/dist/browser/stack-parser.d.ts +4 -28
  50. package/dist/browser/stack-parser.d.ts.map +1 -1
  51. package/dist/browser/stack-parser.js +12 -39
  52. package/dist/browser/stack-parser.js.map +1 -1
  53. package/dist/browser/tool-support.d.ts +20 -67
  54. package/dist/browser/tool-support.d.ts.map +1 -1
  55. package/dist/browser/tool-support.js +21 -65
  56. package/dist/browser/tool-support.js.map +1 -1
  57. package/dist/browser/url-scheme.d.ts +14 -0
  58. package/dist/browser/url-scheme.d.ts.map +1 -0
  59. package/dist/browser/url-scheme.js +38 -0
  60. package/dist/browser/url-scheme.js.map +1 -0
  61. package/dist/cancellation.d.ts +11 -46
  62. package/dist/cancellation.d.ts.map +1 -1
  63. package/dist/cancellation.js +11 -46
  64. package/dist/cancellation.js.map +1 -1
  65. package/dist/capped.d.ts +9 -33
  66. package/dist/capped.d.ts.map +1 -1
  67. package/dist/capped.js +7 -27
  68. package/dist/capped.js.map +1 -1
  69. package/dist/disclosure-ledger.d.ts +6 -30
  70. package/dist/disclosure-ledger.d.ts.map +1 -1
  71. package/dist/disclosure-ledger.js +4 -26
  72. package/dist/disclosure-ledger.js.map +1 -1
  73. package/dist/index.d.ts +10 -26
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +7 -17
  76. package/dist/index.js.map +1 -1
  77. package/dist/module-trust.d.ts +24 -0
  78. package/dist/module-trust.d.ts.map +1 -0
  79. package/dist/module-trust.js +60 -0
  80. package/dist/module-trust.js.map +1 -0
  81. package/dist/path-confinement.d.ts +31 -0
  82. package/dist/path-confinement.d.ts.map +1 -0
  83. package/dist/path-confinement.js +44 -0
  84. package/dist/path-confinement.js.map +1 -0
  85. package/dist/protocol.d.ts +10 -53
  86. package/dist/protocol.d.ts.map +1 -1
  87. package/dist/protocol.js +14 -60
  88. package/dist/protocol.js.map +1 -1
  89. package/dist/registry.d.ts +37 -58
  90. package/dist/registry.d.ts.map +1 -1
  91. package/dist/registry.js +88 -96
  92. package/dist/registry.js.map +1 -1
  93. package/dist/render.d.ts +89 -13
  94. package/dist/render.d.ts.map +1 -1
  95. package/dist/render.js +111 -16
  96. package/dist/render.js.map +1 -1
  97. package/dist/runtime-registry.d.ts +7 -66
  98. package/dist/runtime-registry.d.ts.map +1 -1
  99. package/dist/runtime-registry.js +39 -114
  100. package/dist/runtime-registry.js.map +1 -1
  101. package/dist/scenarios/index.d.ts +1 -1
  102. package/dist/scenarios/index.d.ts.map +1 -1
  103. package/dist/scenarios/index.js +1 -1
  104. package/dist/scenarios/index.js.map +1 -1
  105. package/dist/scenarios/parse.d.ts +4 -18
  106. package/dist/scenarios/parse.d.ts.map +1 -1
  107. package/dist/scenarios/parse.js +14 -34
  108. package/dist/scenarios/parse.js.map +1 -1
  109. package/dist/scenarios/scenario.d.ts +18 -74
  110. package/dist/scenarios/scenario.d.ts.map +1 -1
  111. package/dist/scenarios/scenario.js +7 -34
  112. package/dist/scenarios/scenario.js.map +1 -1
  113. package/dist/scenarios/storage.d.ts +11 -41
  114. package/dist/scenarios/storage.d.ts.map +1 -1
  115. package/dist/scenarios/storage.js +57 -47
  116. package/dist/scenarios/storage.js.map +1 -1
  117. package/dist/server.d.ts.map +1 -1
  118. package/dist/server.js +69 -19
  119. package/dist/server.js.map +1 -1
  120. package/dist/session.d.ts +90 -259
  121. package/dist/session.d.ts.map +1 -1
  122. package/dist/session.js +136 -250
  123. package/dist/session.js.map +1 -1
  124. package/dist/tools/analyze.d.ts +32 -118
  125. package/dist/tools/analyze.d.ts.map +1 -1
  126. package/dist/tools/analyze.js +65 -186
  127. package/dist/tools/analyze.js.map +1 -1
  128. package/dist/tools/browser-click.d.ts +3 -21
  129. package/dist/tools/browser-click.d.ts.map +1 -1
  130. package/dist/tools/browser-click.js +10 -31
  131. package/dist/tools/browser-click.js.map +1 -1
  132. package/dist/tools/browser-close-session.d.ts +4 -13
  133. package/dist/tools/browser-close-session.d.ts.map +1 -1
  134. package/dist/tools/browser-close-session.js +4 -13
  135. package/dist/tools/browser-close-session.js.map +1 -1
  136. package/dist/tools/browser-fill.d.ts +5 -36
  137. package/dist/tools/browser-fill.d.ts.map +1 -1
  138. package/dist/tools/browser-fill.js +9 -44
  139. package/dist/tools/browser-fill.js.map +1 -1
  140. package/dist/tools/browser-navigate.d.ts +6 -27
  141. package/dist/tools/browser-navigate.d.ts.map +1 -1
  142. package/dist/tools/browser-navigate.js +6 -23
  143. package/dist/tools/browser-navigate.js.map +1 -1
  144. package/dist/tools/browser-run-scenario.d.ts +5 -31
  145. package/dist/tools/browser-run-scenario.d.ts.map +1 -1
  146. package/dist/tools/browser-run-scenario.js +10 -46
  147. package/dist/tools/browser-run-scenario.js.map +1 -1
  148. package/dist/tools/browser-save-scenario.d.ts +3 -28
  149. package/dist/tools/browser-save-scenario.d.ts.map +1 -1
  150. package/dist/tools/browser-save-scenario.js +47 -84
  151. package/dist/tools/browser-save-scenario.js.map +1 -1
  152. package/dist/tools/browser-snapshot.d.ts +6 -39
  153. package/dist/tools/browser-snapshot.d.ts.map +1 -1
  154. package/dist/tools/browser-snapshot.js +4 -31
  155. package/dist/tools/browser-snapshot.js.map +1 -1
  156. package/dist/tools/browser-start-session.d.ts +4 -23
  157. package/dist/tools/browser-start-session.d.ts.map +1 -1
  158. package/dist/tools/browser-start-session.js +145 -56
  159. package/dist/tools/browser-start-session.js.map +1 -1
  160. package/dist/tools/browser-type.d.ts +5 -35
  161. package/dist/tools/browser-type.d.ts.map +1 -1
  162. package/dist/tools/browser-type.js +10 -45
  163. package/dist/tools/browser-type.js.map +1 -1
  164. package/dist/tools/contracts.d.ts +9 -86
  165. package/dist/tools/contracts.d.ts.map +1 -1
  166. package/dist/tools/contracts.js +24 -80
  167. package/dist/tools/contracts.js.map +1 -1
  168. package/dist/tools/cross-pr.d.ts +42 -30
  169. package/dist/tools/cross-pr.d.ts.map +1 -1
  170. package/dist/tools/cross-pr.js +81 -62
  171. package/dist/tools/cross-pr.js.map +1 -1
  172. package/dist/tools/git-diff.d.ts +18 -2
  173. package/dist/tools/git-diff.d.ts.map +1 -1
  174. package/dist/tools/git-diff.js +118 -26
  175. package/dist/tools/git-diff.js.map +1 -1
  176. package/dist/tools/git-history.d.ts +5 -16
  177. package/dist/tools/git-history.d.ts.map +1 -1
  178. package/dist/tools/git-history.js +3 -10
  179. package/dist/tools/git-history.js.map +1 -1
  180. package/dist/tools/history.d.ts +4 -33
  181. package/dist/tools/history.d.ts.map +1 -1
  182. package/dist/tools/history.js +6 -31
  183. package/dist/tools/history.js.map +1 -1
  184. package/dist/tools/impact.d.ts +7 -51
  185. package/dist/tools/impact.d.ts.map +1 -1
  186. package/dist/tools/impact.js +15 -67
  187. package/dist/tools/impact.js.map +1 -1
  188. package/dist/tools/index.d.ts +3 -8
  189. package/dist/tools/index.d.ts.map +1 -1
  190. package/dist/tools/index.js +3 -8
  191. package/dist/tools/index.js.map +1 -1
  192. package/dist/tools/kit.d.ts +66 -113
  193. package/dist/tools/kit.d.ts.map +1 -1
  194. package/dist/tools/kit.js +60 -28
  195. package/dist/tools/kit.js.map +1 -1
  196. package/dist/tools/link-workspace.d.ts +7 -45
  197. package/dist/tools/link-workspace.d.ts.map +1 -1
  198. package/dist/tools/link-workspace.js +10 -48
  199. package/dist/tools/link-workspace.js.map +1 -1
  200. package/dist/tools/lookup.d.ts +4 -14
  201. package/dist/tools/lookup.d.ts.map +1 -1
  202. package/dist/tools/lookup.js +4 -14
  203. package/dist/tools/lookup.js.map +1 -1
  204. package/dist/tools/mark-incident.d.ts +7 -54
  205. package/dist/tools/mark-incident.d.ts.map +1 -1
  206. package/dist/tools/mark-incident.js +15 -68
  207. package/dist/tools/mark-incident.js.map +1 -1
  208. package/dist/tools/observe-runtime.d.ts +27 -210
  209. package/dist/tools/observe-runtime.d.ts.map +1 -1
  210. package/dist/tools/observe-runtime.js +273 -434
  211. package/dist/tools/observe-runtime.js.map +1 -1
  212. package/dist/tools/observe-tests.d.ts +9 -100
  213. package/dist/tools/observe-tests.d.ts.map +1 -1
  214. package/dist/tools/observe-tests.js +74 -152
  215. package/dist/tools/observe-tests.js.map +1 -1
  216. package/dist/tools/pr-analysis.d.ts +18 -2
  217. package/dist/tools/pr-analysis.d.ts.map +1 -1
  218. package/dist/tools/pr-analysis.js +73 -23
  219. package/dist/tools/pr-analysis.js.map +1 -1
  220. package/dist/tools/pre-push.d.ts +74 -16
  221. package/dist/tools/pre-push.d.ts.map +1 -1
  222. package/dist/tools/pre-push.js +152 -51
  223. package/dist/tools/pre-push.js.map +1 -1
  224. package/dist/tools/propagation.d.ts +11 -53
  225. package/dist/tools/propagation.d.ts.map +1 -1
  226. package/dist/tools/propagation.js +17 -58
  227. package/dist/tools/propagation.js.map +1 -1
  228. package/dist/tools/questions.d.ts +13 -63
  229. package/dist/tools/questions.d.ts.map +1 -1
  230. package/dist/tools/questions.js +33 -105
  231. package/dist/tools/questions.js.map +1 -1
  232. package/dist/tools/refusal-fetch.d.ts +4 -40
  233. package/dist/tools/refusal-fetch.d.ts.map +1 -1
  234. package/dist/tools/refusal-fetch.js +4 -40
  235. package/dist/tools/refusal-fetch.js.map +1 -1
  236. package/dist/tools/runtime-incident.d.ts +4 -63
  237. package/dist/tools/runtime-incident.d.ts.map +1 -1
  238. package/dist/tools/runtime-incident.js +10 -87
  239. package/dist/tools/runtime-incident.js.map +1 -1
  240. package/dist/tools/scope.d.ts +7 -25
  241. package/dist/tools/scope.d.ts.map +1 -1
  242. package/dist/tools/scope.js +10 -29
  243. package/dist/tools/scope.js.map +1 -1
  244. package/dist/tools/similar-incidents.d.ts +11 -86
  245. package/dist/tools/similar-incidents.d.ts.map +1 -1
  246. package/dist/tools/similar-incidents.js +7 -71
  247. package/dist/tools/similar-incidents.js.map +1 -1
  248. package/dist/tools/validate.d.ts +29 -70
  249. package/dist/tools/validate.d.ts.map +1 -1
  250. package/dist/tools/validate.js +141 -85
  251. package/dist/tools/validate.js.map +1 -1
  252. package/dist/tools/verification-status.d.ts +9 -64
  253. package/dist/tools/verification-status.d.ts.map +1 -1
  254. package/dist/tools/verification-status.js +9 -62
  255. package/dist/tools/verification-status.js.map +1 -1
  256. package/dist/tools/verify-claim.d.ts +5 -52
  257. package/dist/tools/verify-claim.d.ts.map +1 -1
  258. package/dist/tools/verify-claim.js +6 -56
  259. package/dist/tools/verify-claim.js.map +1 -1
  260. package/dist/transport.d.ts +15 -52
  261. package/dist/transport.d.ts.map +1 -1
  262. package/dist/transport.js +16 -60
  263. package/dist/transport.js.map +1 -1
  264. package/package.json +40 -22
package/dist/session.d.ts CHANGED
@@ -1,27 +1,8 @@
1
1
  /**
2
- * One repository, one graph, one process.
3
- *
4
- * The session owns everything with a lifetime: the SQLite handle, the resolved
5
- * configuration, the loaded sources. Tools receive it and own nothing, which is
6
- * what lets the whole tool layer be tested against an in-memory graph.
7
- *
8
- * ## Configuration is read once and reported, not read repeatedly and assumed
9
- *
10
- * `.descry/config.json` is optional. Everything in it has a default that makes
11
- * local mode work unconfigured, per the architecture's local-first guarantee —
12
- * except the source list, which cannot have one: this repository must not name
13
- * an adapter (see `registry.ts`). So an unconfigured session can query a graph
14
- * and cannot build one, and `analyze` says exactly that rather than reporting a
15
- * successful run over zero sources.
16
- *
17
- * ## The graph is opened lazily
18
- *
19
- * A server that opened the database at startup would fail to start on a repo
20
- * that has never been analysed — the worst possible first experience for the
21
- * primary UX. Opening on first use means `tools/list` works everywhere, and a
22
- * query against a missing graph fails as a *tool* result the agent can read and
23
- * act on ("run analyze first"), not as a crash before the handshake.
24
- */
2
+ * One repo, one graph, one process — owns the SQLite handle, config, sources; tools
3
+ * own nothing. `.descry/config.json` is optional, defaults to local-first, except the
4
+ * source list (this repo names no adapter, `registry.ts`): unconfigured sessions can
5
+ * query, not build. Graph opens lazily so a missing one fails as a tool result, not a crash. */
25
6
  import type { ConfirmedFact, ConfirmedIncident, RepoRoot } from "@descryy/ir";
26
7
  import { type AdjacencyProvider, type Store } from "@descryy/core";
27
8
  import type { BrowserDriver } from "./browser/driver.ts";
@@ -31,55 +12,26 @@ import { type SourceSpec } from "./registry.ts";
31
12
  export interface DescryConfig {
32
13
  /** Identity scope for repo-scoped nodes. Never a path — see DEC-004. */
33
14
  readonly repo: string;
34
- /**
35
- * The contract boundary (DEC-054). Must be byte-identical in every repository
36
- * of the workspace; a mismatch produces a graph that joins nothing silently.
37
- */
15
+ /** The contract boundary (DEC-054). Must be byte-identical across the workspace;
16
+ * a mismatch joins nothing, silently. */
38
17
  readonly workspace?: string | undefined;
39
18
  /** Graph file, relative to the repository root unless absolute. */
40
19
  readonly graph: string;
41
20
  readonly sources: readonly SourceSpec[];
42
- /**
43
- * DEC-223 §4's storage decision: human-confirmed answers to refusal-ledger
44
- * rows, in the same small, field-additive, human-inspectable file as
45
- * `repo`/`workspace` rather than a new store table — recommended there on
46
- * measured population (a handful of facts per repository, not thousands;
47
- * see DEC-223 for the number this rests on). Revisit if that stops holding.
48
- */
21
+ /** DEC-223 §4: human-confirmed refusal answers, stored in this small field-additive
22
+ * file (not a store table) — measured population is a handful per repo, not thousands. */
49
23
  readonly confirmedFacts: readonly ConfirmedFact[];
50
- /**
51
- * The other repositories `link_workspace` declared into this workspace,
52
- * exactly as the caller supplied them — never discovered, never inferred
53
- * from a directory listing (`link_workspace`'s own header, one level up).
54
- *
55
- * Recorded because a workspace *name* alone tells a session nothing about
56
- * where its siblings are on disk, and a workspace-scoped confirmed fact
57
- * lives in the config of whichever repository it was recorded in.
58
- *
59
- * Optional rather than required: `loadConfig` always sets it, and a
60
- * hand-built config (a test, an embedder) that predates this field means
61
- * "no siblings declared", which is the same thing an empty list means.
62
- */
24
+ /** Other repos `link_workspace` declared — exactly as supplied, never discovered or
25
+ * inferred. Optional: `loadConfig` always sets it; absent means "no siblings", same
26
+ * as empty. */
63
27
  readonly workspaceRepos?: readonly WorkspaceRepo[];
64
- /**
65
- * Defects a developer recorded through `mark_incident`.
66
- *
67
- * Beside `confirmedFacts` and for the same reason (DEC-223's storage
68
- * decision): a handful of small, human-inspectable records per repository,
69
- * versioned with the code, in a file a person can read and correct. The graph
70
- * holds a *projection* of these — see `createConfirmedIncidentSource` — so a
71
- * schema bump dropping every derived table costs nothing.
72
- */
28
+ /** Defects recorded via `mark_incident`. Same DEC-223 storage choice as
29
+ * `confirmedFacts` — human-inspectable, versioned with code. The graph holds
30
+ * only a projection (`createConfirmedIncidentSource`); a schema bump costs nothing. */
73
31
  readonly confirmedIncidents?: readonly ConfirmedIncident[];
74
- /**
75
- * Workspace-scoped confirmed facts read from those siblings' own configs.
76
- *
77
- * Kept separate from `confirmedFacts` rather than merged: "recorded here"
78
- * and "recorded next door and declared to reach here" are different facts,
79
- * and a consumer that cannot tell them apart cannot disclose the difference.
80
- * Only facts with `scope: "workspace"` and this workspace's id appear —
81
- * see DEC-NEXT-workspace-scoped-confirmed-facts.
82
- */
32
+ /** Workspace-scoped facts read from sibling configs. Kept separate from
33
+ * `confirmedFacts` — "recorded here" vs "recorded next door, declared to reach
34
+ * here" are different facts a consumer must be able to disclose apart. */
83
35
  readonly linkedFacts?: readonly ConfirmedFact[];
84
36
  /** Where the settings came from, so a surprising run can be explained. */
85
37
  readonly configPath: string | null;
@@ -96,96 +48,63 @@ export declare class ConfigError extends Error {
96
48
  constructor(message: string);
97
49
  }
98
50
  export declare function loadConfig(repoPath: string): Promise<DescryConfig>;
51
+ /**
52
+ * 13.3.16 (N2): a count match on `sources` is not a content match — two sessions
53
+ * swapping one adapter for another, or changing an adapter's options, leave
54
+ * `sources.length` unchanged, which is exactly the gap that let a concurrent edit
55
+ * go undetected and left a graph stuck at R0 with no disclosure of why. Every
56
+ * field is compared by value, and the note names which ones actually changed —
57
+ * `graph`, `confirmedFacts`/`confirmedIncidents` and `workspaceRepos` were
58
+ * previously not compared at all.
59
+ */
60
+ export declare function configDriftNote(onDisk: DescryConfig | null, loaded: DescryConfig): string | undefined;
61
+ export interface ConfigDriftStatus {
62
+ readonly stale: boolean;
63
+ readonly note: string | undefined;
64
+ }
65
+ /**
66
+ * 13.3.16 (N2) steps 2-3: called once per tool call from `server.ts`, not only from
67
+ * `analyze`, so every reply discloses a stale session rather than the one tool that
68
+ * happened to re-read the config. A config that cannot even be read right now
69
+ * (deleted mid-session, or edited into something `loadConfig` refuses) is itself
70
+ * drift and must not read as "no drift" merely because there is nothing to diff
71
+ * against — the previous `.catch(() => null)` collapsed that case into silence.
72
+ */
73
+ export declare function checkConfigDrift(session: Session): Promise<ConfigDriftStatus>;
99
74
  export interface ConfigPatch {
100
75
  readonly repo: string;
101
76
  /** Omit to leave a previously-set workspace untouched; there is no way to clear one here. */
102
77
  readonly workspace?: string | undefined;
103
78
  }
104
- /**
105
- * `.descry/config.json`'s writer, the counterpart to `loadConfig`.
106
- *
107
- * One writer for one file, used by both front doors that set the workspace
108
- * id — `descry init` (`@descryy/cli`) and the `link_workspace` MCP tool — so
109
- * the two can never drift into writing two different shapes of the same
110
- * file. Fields this function does not know about (`graph`, `sources`, or
111
- * anything a future version adds) survive a re-run untouched: this patches
112
- * `repo` and `workspace`, it does not own the whole file.
113
- */
79
+ /** `.descry/config.json`'s writer, paired with `loadConfig`. One writer used by both
80
+ * `descry init` and `link_workspace` so they can't drift into writing different
81
+ * shapes. Patches `repo`/`workspace` only — other fields survive untouched. */
114
82
  export declare function writeConfig(repoPath: string, patch: ConfigPatch): Promise<{
115
83
  readonly path: string;
116
84
  readonly previousWorkspace: string | undefined;
117
85
  }>;
118
- /**
119
- * `workspaceRepos`' writer — the fourth narrow field-writer beside
120
- * `writeConfig` (`repo`/`workspace`), `writeConfirmedFact` (`confirmedFacts`)
121
- * and `writeSources` (`sources`), for the reason those three stayed separate:
122
- * a shared file gets one writer per field it owns, not one function that
123
- * grows a branch per field.
124
- *
125
- * Replaces the whole list rather than merging into it. A workspace's
126
- * membership is one declaration made at one moment — merging would mean a
127
- * repository silently retaining a sibling a later, corrected `link_workspace`
128
- * call deliberately left out.
129
- */
86
+ /** `workspaceRepos`' writer — one writer per field a shared file owns (see
87
+ * `writeConfig`, `writeConfirmedFact`, `writeSources`). Replaces the whole list
88
+ * rather than merging: membership is one declaration made at one moment. */
130
89
  export declare function writeWorkspaceRepos(repoPath: string, repos: readonly WorkspaceRepo[]): Promise<{
131
90
  readonly path: string;
132
91
  }>;
133
- /**
134
- * `confirmedFacts`'s writer — separate from `writeConfig` on purpose.
135
- *
136
- * `writeConfig`'s own doc is explicit that it "patches `repo` and
137
- * `workspace`, it does not own the whole file" — a second, narrow writer for
138
- * a second, narrow field keeps that boundary rather than growing one
139
- * function into "the file's owner." Both read-modify-write the same JSON
140
- * file the same way, so a future field gets a third writer, not a branch in
141
- * this one.
142
- *
143
- * Keyed on exact `(repo, blockedBy, environment)` — DEC-223 §3 and
144
- * `ConfirmedFact`'s own doc; `environment` is `undefined` for an unscoped
145
- * answer, which is its own distinct key value, not a wildcard that a later
146
- * environment-scoped answer would collide with. A second call with the same
147
- * key **replaces** the first rather than appending a duplicate: a
148
- * re-confirmation (the value changed, or the same value is being
149
- * re-asserted after §7's staleness note) updates in place, and a caller can
150
- * always find out what was overwritten from the return value rather than
151
- * having to read the file first. A second call with a *different*
152
- * environment for the same `blockedBy` adds a second fact rather than
153
- * replacing the first — a repository can genuinely need one value per
154
- * environment.
155
- */
92
+ /** `confirmedFacts`' writer, separate from `writeConfig` (one writer per field). Keyed
93
+ * on exact `(repo, blockedBy, environment)` (DEC-223 §3) — undefined environment is its
94
+ * own key, not a wildcard. Same key replaces; a different environment adds a new fact. */
156
95
  export declare function writeConfirmedFact(repoPath: string, fact: ConfirmedFact): Promise<{
157
96
  readonly path: string;
158
97
  readonly replaced: ConfirmedFact | null;
159
98
  }>;
160
- /**
161
- * `confirmedIncidents`' writer — the fifth narrow field-writer, for the same
162
- * reason the previous four stayed separate: a shared file gets one writer per
163
- * field it owns, not one function that grows a branch per field.
164
- *
165
- * **Appends, never replaces.** Unlike `writeConfirmedFact`, which keys on
166
- * `(repo, blockedBy, environment)` because re-confirming a value updates one
167
- * answer, two incidents are two incidents even when they name the same files
168
- * and read alike. Collapsing them would lose the fact that something broke
169
- * twice, which is precisely the signal an incident corpus exists to carry.
170
- * `confirmedAt` is the record's identity, so a second call at the same instant
171
- * with the same summary is the only case that de-duplicates.
172
- */
99
+ /** `confirmedIncidents`' writer — appends, never replaces (unlike `writeConfirmedFact`,
100
+ * which keys on one answer). Two incidents naming the same files are still two
101
+ * incidents; `confirmedAt`+`summary` is the only dedup key. */
173
102
  export declare function writeConfirmedIncident(repoPath: string, incident: ConfirmedIncident): Promise<{
174
103
  readonly path: string;
175
104
  readonly total: number;
176
105
  }>;
177
- /**
178
- * `sources`' writer — MK-3, the third narrow field-writer beside `writeConfig`
179
- * (`repo`/`workspace`) and `writeConfirmedFact` (`confirmedFacts`), for the
180
- * same reason those two stayed separate: a shared file gets one writer per
181
- * field it owns, not one function that grows a branch per field.
182
- *
183
- * Unconditional: the caller (`descry init`) decides whether writing is
184
- * appropriate — reading `loadConfig(repoPath).sources` first and skipping
185
- * this call when it is already non-empty — because "should this overwrite
186
- * what's there" is a policy question `writeConfig`'s own precedent leaves to
187
- * the caller, not to the file-writing primitive.
188
- */
106
+ /** `sources`' writer, one writer per field like the others. Unconditional — the caller
107
+ * (`descry init`) decides whether overwriting is appropriate, not this primitive. */
189
108
  export declare function writeSources(repoPath: string, sources: readonly string[]): Promise<{
190
109
  readonly path: string;
191
110
  }>;
@@ -195,12 +114,9 @@ export interface SessionOptions {
195
114
  readonly openGraph?: (path: string) => Store;
196
115
  readonly config?: DescryConfig;
197
116
  }
198
- /**
199
- * One completed tool call, kept for `verify_claim` (MK-12) to check a
200
- * citation against. `result` is the exact `structuredContent` the host
201
- * received — not the pre-render `ToolAnswer` — so a citation checks against
202
- * what was actually read, not an internal shape the host never saw.
203
- */
117
+ /** One completed tool call, kept for `verify_claim` to check a citation against.
118
+ * `result` is the exact `structuredContent` the host received, not the pre-render
119
+ * `ToolAnswer` — a citation checks what was actually seen. */
204
120
  export interface RecordedToolCall {
205
121
  /** Stable within this session only — see `Session#recordCall`'s doc. */
206
122
  readonly id: string;
@@ -218,137 +134,52 @@ export declare class Session {
218
134
  get graphPath(): string;
219
135
  /** Open on first use; reuse thereafter. */
220
136
  store(): Store;
221
- /**
222
- * MK-4 — `analyze`'s own repair path, and the only caller entitled to one.
223
- *
224
- * Every other tool goes through `store()`/`provider()` and keeps refusing a
225
- * version mismatch per DEC-017 (`SchemaVersionError`'s own message names
226
- * this method's caller as the fix). `analyze` is different: it is about to
227
- * rebuild the graph from source regardless, so there is nothing lost by
228
- * repairing the derived tables first instead of stopping.
229
- *
230
- * Opens a short-lived `NodeSqliteDriver` directly rather than going through
231
- * `this.#openGraph` — the injected-store path a test fixture uses bypasses
232
- * a real file on disk entirely, and a `SchemaVersionError` from `migrate()`
233
- * only exists for a real one. A no-op here on that path (nothing found to
234
- * repair, `rebuilt: false`) is correct: an injected in-memory fixture store
235
- * is never stale by construction, and `store()` right after this still
236
- * goes through the real, checked path either way — this only ever removes
237
- * a refusal that check would otherwise have hit first.
238
- */
137
+ /** `analyze`'s own repair path — the only caller entitled to one (others refuse a
138
+ * version mismatch per DEC-017). Opens a short-lived driver directly, bypassing an
139
+ * injected test store; no-op there since an in-memory fixture is never stale. */
239
140
  repairStaleGraph(): {
240
141
  readonly rebuilt: boolean;
241
142
  };
242
143
  provider(): AdjacencyProvider;
243
- /**
244
- * The repo root for an analysis run.
245
- *
246
- * The commit sha is read from git and **is not defaulted** when git is absent:
247
- * every node and edge is stamped with it, and a placeholder would make the
248
- * staleness stamp a lie that nothing downstream could detect.
249
- */
144
+ /** Repo root for an analysis run. Commit sha comes from git and is never defaulted
145
+ * when git is absent — every node/edge is stamped with it, and a placeholder would
146
+ * make the staleness stamp a lie nothing downstream could detect. */
250
147
  root(): Promise<RepoRoot>;
251
- /**
252
- * Live browser sessions belonging to this connection — `mcp-browser-tools.md`
253
- * §4.
254
- *
255
- * Created lazily and only on the connection that asks for one, the same
256
- * reason the graph is opened lazily: a server that started a sweeper for
257
- * every session would pay for browser bookkeeping on the overwhelming
258
- * majority of connections that never call a browser tool.
259
- *
260
- * It hangs here rather than in a module-level map because "per connection,
261
- * never global" is the property that has to hold, and this object already
262
- * *is* the connection's lifetime. A global registry keyed by session would
263
- * be the same thing with one more way to get it wrong.
264
- */
148
+ /** Live browser sessions for this connection (`mcp-browser-tools.md` §4). Created
149
+ * lazily, same reason as the graph — most connections never touch a browser tool.
150
+ * Lives here, not a module-level map, so "per connection, never global" actually holds. */
265
151
  browserSessions(): BrowserSessionRegistry;
266
- /**
267
- * The browser this connection drives, or a named reason there is none.
268
- *
269
- * Unavailable by default, and that is the honest state of this build:
270
- * `@descryy/runtime-browser` is not in the installed closure yet, so there
271
- * is no page to drive. Reported as a refusal with a remedy rather than as a
272
- * tool that silently returns an empty page — an empty snapshot and "this
273
- * build cannot open a browser" are different claims, and only one of them
274
- * is true here (rule 7).
275
- */
152
+ /** The browser this connection drives, or a named reason there is none. Unavailable
153
+ * by default — `@descryy/runtime-browser` isn't installed yet — reported as a refusal
154
+ * with a remedy, never a silently-empty page (rule 7). */
276
155
  browserBackend(): BrowserBackend;
277
- /**
278
- * Install the driver this connection's browser tools use.
279
- *
280
- * The seam the final swap goes through, and the seam every browser test
281
- * goes through today. It is a method rather than a constructor argument
282
- * because the overwhelming majority of sessions never touch a browser and
283
- * should not have to name one to be constructed.
284
- */
156
+ /** Installs the driver this connection's browser tools use. A method, not a
157
+ * constructor arg — most sessions never touch a browser and shouldn't have to
158
+ * name one to be constructed. */
285
159
  useBrowserDriver(driver: BrowserDriver): void;
286
- /**
287
- * Install a factory that builds a driver per session.
288
- *
289
- * A factory rather than a driver because the stack-trace parser is named
290
- * per call (`browser_start_session`'s `stackParser`), and a parser is
291
- * language-specific — one process can legitimately drive a browser against
292
- * two applications written in different languages.
293
- */
160
+ /** Installs a factory that builds a driver per session. A factory, not a driver,
161
+ * because the stack-trace parser (`browser_start_session`'s `stackParser`) is
162
+ * language-specific and named per call. */
294
163
  useBrowserDriverFactory(factory: BrowserDriverFactory): void;
295
- /**
296
- * Synchronous teardown of everything with no I/O to wait on.
297
- *
298
- * Deliberately left synchronous and left as the thing every existing caller
299
- * calls. A browser session cannot be closed synchronously, so the reap
300
- * lives in `dispose()` — and this method stays the one that a caller with
301
- * no browser sessions can keep using unchanged.
302
- */
164
+ /** Synchronous teardown, no I/O to wait on. A browser session can't close
165
+ * synchronously, so that reap lives in `dispose()` — this stays the method
166
+ * every existing no-browser caller keeps using unchanged. */
303
167
  close(): void;
304
- /**
305
- * Full teardown, including any live browser.
306
- *
307
- * This is what a client disconnect must reach. §4 requires the transport
308
- * closing to reap every session that connection owns, and a browser is the
309
- * one thing this session holds that keeps running after the process stops
310
- * caring about it — a leaked SQLite handle costs a file descriptor, a
311
- * leaked Chromium costs the developer's machine.
312
- *
313
- * Awaits the reap before closing the rest, so the evidence flush has a
314
- * live registry to record itself against.
315
- */
168
+ /** Full teardown, including any live browser — what a client disconnect must
169
+ * reach (§4). A leaked Chromium costs the developer's machine, not just a file
170
+ * descriptor. Awaits the reap first so the evidence flush has a live registry. */
316
171
  dispose(): Promise<void>;
317
- /**
318
- * B10 — mint the next call id without recording anything yet.
319
- *
320
- * `server.ts` calls this before `renderAnswer` so the envelope can carry
321
- * the id as `callId` (`render.ts`'s own doc on that field), and records
322
- * under the same value afterwards with `recordCallWithId` — one id, used
323
- * for both, rather than one minted for the reply and a different one
324
- * minted later for the record. Exposed as its own method (rather than
325
- * folded into `recordCall`) because the id has to exist *before* the
326
- * result it will be recorded with does; there is no result yet at the
327
- * point this is called.
328
- */
172
+ /** Mints the next call id without recording anything yet. `server.ts` calls this
173
+ * before render so the reply can carry `callId`, then records under the same id
174
+ * with `recordCallWithId` — one id used for both. */
329
175
  allocateCallId(): string;
330
- /**
331
- * MK-12 — `verify_claim`'s fact boundary. Called once per completed tool
332
- * call from `server.ts`, right after rendering, with the exact
333
- * `structuredContent` the host received.
334
- *
335
- * IDs are sequential and scoped to this process's lifetime only —
336
- * `"one repository, one graph, one process"` above is what makes "this
337
- * session's recorded tool calls" a coherent, checkable population at all.
338
- * A citation naming an id from a *different* process's session cannot
339
- * resolve here, which is exactly `ai-governance-spec.md` §2's G1 negative
340
- * control ("a citation pointing at a tool call from a different run") —
341
- * not a defect to guard against, the mechanism doing its job.
342
- */
176
+ /** `verify_claim`'s fact boundary — called once per call with the exact
177
+ * `structuredContent` the host received. IDs are scoped to this process only, so a
178
+ * citation from a different run can't resolve (§2's G1 negative control). */
343
179
  recordCall(tool: string, args: Record<string, unknown>, result: Record<string, unknown>): RecordedToolCall;
344
- /**
345
- * `recordCall`, under an id minted earlier by `allocateCallId` rather than
346
- * one minted here — B10's fix. The id a caller reads off a real reply's
347
- * `callId` is this exact value, so `recordedCall(id)` finds it: the
348
- * positive path that was previously unreachable because the id the
349
- * envelope would need did not exist until one step after the envelope was
350
- * already built.
351
- */
180
+ /** `recordCall` under an id minted earlier by `allocateCallId`, not one minted here
181
+ * — so `recordedCall(id)` can find the exact id a caller read off the reply's
182
+ * `callId`, which didn't exist until after the envelope was built. */
352
183
  recordCallWithId(id: string, tool: string, args: Record<string, unknown>, result: Record<string, unknown>): RecordedToolCall;
353
184
  /** All calls recorded this session, oldest first. */
354
185
  recordedCalls(): readonly RecordedToolCall[];
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO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