@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/tools/kit.js CHANGED
@@ -1,28 +1,18 @@
1
- /**
2
- * What every tool is handed and what every tool may return.
3
- *
4
- * The return type is `ToolAnswer`, never content. A tool produces an *answer*;
5
- * `render.ts` is the only thing that turns an answer into a reply, and it
6
- * attaches the staleness stamp, the reliability cap and the disclosures on the
7
- * way. A tool physically cannot ship a result with the caveats stripped off.
8
- */
9
- /**
10
- * An argument the caller can fix.
11
- *
12
- * Distinct from a thrown `Error`, which is a bug here. This becomes an `isError`
13
- * tool result the agent can read and retry from; a bug becomes a JSON-RPC
14
- * internal error, which it cannot.
15
- */
1
+ /** What every tool is handed and returns. A tool produces a `ToolAnswer`, never content —
2
+ * `render.ts` alone turns it into a reply, attaching the staleness stamp, reliability cap and
3
+ * disclosures. A tool cannot ship a result with the caveats stripped off. */
4
+ import { dirname } from "node:path";
5
+ import { CONFIG_RELATIVE_PATH } from "../session.js";
6
+ /** An argument the caller can fix — distinct from a thrown `Error` (a bug here). This becomes an
7
+ * `isError` result the agent can read and retry from; a bug becomes an unreadable JSON-RPC error. */
16
8
  export class ToolInputError extends Error {
17
9
  constructor(message) {
18
10
  super(message);
19
11
  this.name = "ToolInputError";
20
12
  }
21
13
  }
22
- // --- argument reading -------------------------------------------------------
23
- // Hand-written rather than schema-validated. The surface is five tools with
24
- // about a dozen arguments between them; a validator would be a dependency and a
25
- // second source of truth for the schemas already declared to the client.
14
+ // Hand-written, not schema-validated: a validator would be a second source of truth for the
15
+ // schemas already declared to the client.
26
16
  export function optionalString(args, key) {
27
17
  const value = args[key];
28
18
  if (value === undefined || value === null)
@@ -72,15 +62,8 @@ export function optionalBoolean(args, key) {
72
62
  throw new ToolInputError(`"${key}" must be a boolean`);
73
63
  return value;
74
64
  }
75
- // --- building answers -------------------------------------------------------
76
- /**
77
- * Wrap data that did not come from the query layer in the same envelope.
78
- *
79
- * `analyze` is the case: it writes rather than reads, so it has no
80
- * `QueryResult`, and it would be the natural place for the disclosure discipline
81
- * to leak. It uses this instead, so its reply carries the same stamp and the
82
- * same rules as every query's.
83
- */
65
+ /** Wraps data that did not come from the query layer in the same envelope — e.g. `analyze`, which
66
+ * writes rather than reads and has no `QueryResult`, so its reply still carries the same stamp. */
84
67
  export function answer(options) {
85
68
  const result = {
86
69
  data: options.data,
@@ -117,4 +100,53 @@ export function briefNode(node) {
117
100
  resolution: node.resolution,
118
101
  };
119
102
  }
103
+ /**
104
+ * Descry's own state inside this repository, which is not the developer's
105
+ * uncommitted change.
106
+ *
107
+ * ## Two paths, not one, and the second is the one that bit
108
+ *
109
+ * The first version derived this from the configured graph path alone. That is
110
+ * right for a single repository, where the graph sits in this repo's own
111
+ * `.descry/` — and wrong the moment two repositories share one graph, which is
112
+ * exactly what `link_workspace` produces:
113
+ *
114
+ * ```json
115
+ * // sherpa-backend/.descry/config.json
116
+ * "graph": "/home/…/sherpa-frontend/.descry/graph.db"
117
+ * ```
118
+ *
119
+ * The derived exclusion then pointed into the *other* repository, and this
120
+ * repository's own `.descry/config.json` was excluded by nothing. Measured on a
121
+ * real workspace: it was reported as the developer's uncommitted work. Not an
122
+ * edge case — every shared-graph workspace has it.
123
+ *
124
+ * `.descry/evidence.db` escaped only because that repository's `.gitignore`
125
+ * happened to carry `*.db`. **The exclusion must not depend on the user having
126
+ * gitignored anything**, which is what that near-miss shows: a tool's own state
127
+ * is excluded because it is the tool's, not because someone tidied up.
128
+ *
129
+ * ## Why the graph path is still consulted
130
+ *
131
+ * It is configurable, so it can be moved out of `.descry/` and stay inside the
132
+ * repository. A path outside the repository costs nothing to list — it is not
133
+ * in this working tree — and is kept rather than special-cased, because the
134
+ * test for "is this path inside this repo" is the kind that is subtly wrong on
135
+ * symlinks and relative paths.
136
+ *
137
+ * Returned as directory prefixes matched at a segment boundary by the git
138
+ * helpers, so `.descry` excludes `.descry/config.json` and leaves
139
+ * `src/.descryfile.py` alone.
140
+ */
141
+ export function descryOwnState(graphPath) {
142
+ // This repository's own state directory, always — whatever the graph does.
143
+ const out = new Set([dirname(CONFIG_RELATIVE_PATH)]);
144
+ if (graphPath !== ":memory:" && graphPath !== "") {
145
+ const normalised = graphPath.replace(/\\/g, "/").replace(/^\.\//, "");
146
+ const slash = normalised.lastIndexOf("/");
147
+ // The directory, not the file: SQLite writes `-wal` and `-shm` beside it.
148
+ out.add(slash === -1 ? normalised : normalised.slice(0, slash));
149
+ }
150
+ return [...out];
151
+ }
120
152
  //# sourceMappingURL=kit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/tools/kit.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyFH;;;;;;GAMG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,+EAA+E;AAC/E,4EAA4E;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;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,2EAA2E;IAC3E,MAAM,GAAG,GAAG,IAAI,GAAG,CAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAE7D,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;QACjD,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACtE,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC1C,0EAA0E;QAC1E,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC"}
@@ -1,41 +1,8 @@
1
- /**
2
- * `link_workspace` — the agent-mediated door onto the same declaration
3
- * `descry init` writes from the command line (§ session.ts's `writeConfig`,
4
- * shared by both so there is one writer for one file).
5
- *
6
- * ## Why this exists as a tool and not a smarter `analyze`
7
- *
8
- * `analyze` already discloses "no workspace is configured" (DEC-054) and,
9
- * until now, that disclosure was a dead end — true, and nowhere to go. This
10
- * tool is where it goes: an agent that reads the disclosure can act on it in
11
- * the same conversation, in plain English, rather than sending the developer
12
- * to a terminal.
13
- *
14
- * ## The constraint that makes this legal
15
- *
16
- * `workspace.ts`'s header is explicit that a pairing between two directories
17
- * is a name inference and this project does not make that inference. An
18
- * agent that can see `sherpa-frontend` sitting next to `sherpa-backend` may
19
- * **propose** it — that is a suggestion grounded in something real, a
20
- * directory listing — but it must never **decide** the two belong together
21
- * and call this tool unprompted. `repos` is not filled in by this tool from
22
- * anything it can see; it is supplied by the caller, and the caller's own
23
- * description is instructed to obtain that list from the user's explicit
24
- * confirmation, not from its own inference. The tool has no way to verify
25
- * that happened — the same trust boundary every write tool in this server
26
- * already crosses when a client approves the call — so the discipline is
27
- * enforced by what this tool refuses to do (guess) rather than by what it
28
- * can check.
29
- *
30
- * ## The one tool in this server that writes outside its own session root
31
- *
32
- * Every other tool operates on `session.repoPath` alone. `repos` here names
33
- * arbitrary paths on disk, because the whole point is writing into siblings
34
- * the current session does not own. Each path is required to exist and be a
35
- * directory before anything is written, and a path that fails that check is
36
- * reported rather than silently skipped — a typo'd path here is exactly the
37
- * kind of silent failure DEC-054 exists to prevent, one level up.
38
- */
1
+ /** `link_workspace` — the agent-mediated door onto what `descry init` writes from the CLI
2
+ * (shared `writeConfig`). Closes `analyze`'s "no workspace configured" disclosure (DEC-054),
3
+ * previously a dead end. Never infers pairing — `repos` must come from the user's explicit
4
+ * confirmation, not the caller's guess (workspace.ts's rule: never infer, always declare).
5
+ * The only tool writing outside its session root; a path that fails to exist is disclosed, never silently skipped. */
39
6
  import { type ToolDefinition } from "./kit.ts";
40
7
  /** A repository the workspace id was actually written into. */
41
8
  export interface LinkedRepo {
@@ -47,13 +14,8 @@ export interface LinkedRepo {
47
14
  }
48
15
  export interface LinkWorkspaceData {
49
16
  readonly workspace: string;
50
- /**
51
- * Only the repositories actually written.
52
- *
53
- * A path that did not exist is **absent from this list and disclosed** — the
54
- * workspace id is byte-identical only where it was written, and a partial
55
- * link that looks complete is the failure this list exists to make visible.
56
- */
17
+ /** Only the repositories actually written. A path that didn't exist is absent from this
18
+ * list and disclosed — a partial link that looks complete is the failure this exists to catch. */
57
19
  readonly written: readonly LinkedRepo[];
58
20
  /** How many were asked for. Compare against `written.length`. */
59
21
  readonly requested: number;
@@ -1 +1 @@
1
- {"version":3,"file":"link-workspace.d.ts","sourceRoot":"","sources":["../../src/tools/link-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAMH,OAAO,EAA4D,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGzG,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AA0ID,eAAO,MAAM,iBAAiB,EAAE,cAe/B,CAAC"}
1
+ {"version":3,"file":"link-workspace.d.ts","sourceRoot":"","sources":["../../src/tools/link-workspace.ts"],"names":[],"mappings":"AAAA;;;;uHAIuH;AAMvH,OAAO,EAA4D,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGzG,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;uGACmG;IACnG,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAqID,eAAO,MAAM,iBAAiB,EAAE,cAe/B,CAAC"}
@@ -1,41 +1,8 @@
1
- /**
2
- * `link_workspace` — the agent-mediated door onto the same declaration
3
- * `descry init` writes from the command line (§ session.ts's `writeConfig`,
4
- * shared by both so there is one writer for one file).
5
- *
6
- * ## Why this exists as a tool and not a smarter `analyze`
7
- *
8
- * `analyze` already discloses "no workspace is configured" (DEC-054) and,
9
- * until now, that disclosure was a dead end — true, and nowhere to go. This
10
- * tool is where it goes: an agent that reads the disclosure can act on it in
11
- * the same conversation, in plain English, rather than sending the developer
12
- * to a terminal.
13
- *
14
- * ## The constraint that makes this legal
15
- *
16
- * `workspace.ts`'s header is explicit that a pairing between two directories
17
- * is a name inference and this project does not make that inference. An
18
- * agent that can see `sherpa-frontend` sitting next to `sherpa-backend` may
19
- * **propose** it — that is a suggestion grounded in something real, a
20
- * directory listing — but it must never **decide** the two belong together
21
- * and call this tool unprompted. `repos` is not filled in by this tool from
22
- * anything it can see; it is supplied by the caller, and the caller's own
23
- * description is instructed to obtain that list from the user's explicit
24
- * confirmation, not from its own inference. The tool has no way to verify
25
- * that happened — the same trust boundary every write tool in this server
26
- * already crosses when a client approves the call — so the discipline is
27
- * enforced by what this tool refuses to do (guess) rather than by what it
28
- * can check.
29
- *
30
- * ## The one tool in this server that writes outside its own session root
31
- *
32
- * Every other tool operates on `session.repoPath` alone. `repos` here names
33
- * arbitrary paths on disk, because the whole point is writing into siblings
34
- * the current session does not own. Each path is required to exist and be a
35
- * directory before anything is written, and a path that fails that check is
36
- * reported rather than silently skipped — a typo'd path here is exactly the
37
- * kind of silent failure DEC-054 exists to prevent, one level up.
38
- */
1
+ /** `link_workspace` — the agent-mediated door onto what `descry init` writes from the CLI
2
+ * (shared `writeConfig`). Closes `analyze`'s "no workspace configured" disclosure (DEC-054),
3
+ * previously a dead end. Never infers pairing — `repos` must come from the user's explicit
4
+ * confirmation, not the caller's guess (workspace.ts's rule: never infer, always declare).
5
+ * The only tool writing outside its session root; a path that fails to exist is disclosed, never silently skipped. */
39
6
  import { existsSync, statSync } from "node:fs";
40
7
  import { resolve } from "node:path";
41
8
  import { writeConfig, writeWorkspaceRepos } from "../session.js";
@@ -113,13 +80,9 @@ async function run(args, ctx) {
113
80
  notes.push(`${entry.repo}: replaced previous workspace "${result.previousWorkspace}" with "${workspace}".`);
114
81
  }
115
82
  }
116
- // The membership list, written into every repository that took the workspace
117
- // id — and only after the loop, so it names the repositories the link
118
- // actually reached rather than the ones it was asked about. A workspace name
119
- // alone tells a session nothing about where its siblings live on disk, and a
120
- // workspace-scoped confirmed fact lives in whichever repository recorded it
121
- // (DEC-NEXT-workspace-scoped-confirmed-facts). Still nothing inferred: this
122
- // is the caller's own list, resolved to absolute paths and written back.
83
+ // Membership list, written after the loop so it names repos the link actually reached, not
84
+ // what it was asked about. A workspace name alone doesn't say where siblings live on disk
85
+ // (DEC-NEXT-workspace-scoped-confirmed-facts). Still the caller's own list — nothing inferred.
123
86
  const members = written.map((w) => ({ path: w.path, repo: w.repo }));
124
87
  for (const member of members) {
125
88
  await writeWorkspaceRepos(member.path, members);
@@ -138,9 +101,8 @@ async function run(args, ctx) {
138
101
  `to workspace "${workspace}".`,
139
102
  state: written.length === 0 ? "refused" : "ok",
140
103
  nameLevel: true,
141
- // Writing a config file is not evidence about code, so there is no
142
- // resolution to report — R0 rather than a cheerful default, the same
143
- // choice `analyze` makes when no code-reading source ran.
104
+ // Writing a config file is not evidence about code — R0, the same choice `analyze`
105
+ // makes when no code-reading source ran.
144
106
  resolutionFloor: 0,
145
107
  commitSha: null,
146
108
  graphBuiltAt: null,
@@ -1 +1 @@
1
- {"version":3,"file":"link-workspace.js","sourceRoot":"","sources":["../../src/tools/link-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,E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AW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
@@ -1,17 +1,7 @@
1
- /**
2
- * Turning what a developer typed into exactly one node — or refusing to.
3
- *
4
- * A developer says "the `charge` function"; the graph wants a node id. Two
5
- * functions in one repository can legitimately be called `charge`, and the
6
- * tempting move — take the first row, or the one with the most edges — is how a
7
- * tool ends up answering confidently about the wrong symbol. There is no signal
8
- * available here that distinguishes them; picking would be inventing one.
9
- *
10
- * So ambiguity is returned, with the candidates, and the caller is told how to
11
- * narrow it. That is the same discipline the graph builder applies to an
12
- * unresolvable edge (never stub a node) and the adapters apply to an unreadable
13
- * receiver (ledger row, never a guess), arriving at the interaction layer.
14
- */
1
+ /** Turns what a developer typed into exactly one node, or refuses to. With no signal to pick
2
+ * between two nodes plausibly named `charge`, picking would be inventing evidence — so ambiguity
3
+ * returns with candidates and how to narrow, the same discipline the graph builder applies to an
4
+ * unresolvable edge (never stub a node) and adapters apply to an unreadable receiver. */
15
5
  import type { IRNode } from "@descryy/ir";
16
6
  import type { Session } from "../session.ts";
17
7
  export interface Lookup {
@@ -1 +1 @@
1
- {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GACA,MAAM,CA+DR"}
1
+ {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;0FAG0F;AAG1F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GACA,MAAM,CA+DR"}
@@ -1,17 +1,7 @@
1
- /**
2
- * Turning what a developer typed into exactly one node — or refusing to.
3
- *
4
- * A developer says "the `charge` function"; the graph wants a node id. Two
5
- * functions in one repository can legitimately be called `charge`, and the
6
- * tempting move — take the first row, or the one with the most edges — is how a
7
- * tool ends up answering confidently about the wrong symbol. There is no signal
8
- * available here that distinguishes them; picking would be inventing one.
9
- *
10
- * So ambiguity is returned, with the candidates, and the caller is told how to
11
- * narrow it. That is the same discipline the graph builder applies to an
12
- * unresolvable edge (never stub a node) and the adapters apply to an unreadable
13
- * receiver (ledger row, never a guess), arriving at the interaction layer.
14
- */
1
+ /** Turns what a developer typed into exactly one node, or refuses to. With no signal to pick
2
+ * between two nodes plausibly named `charge`, picking would be inventing evidence — so ambiguity
3
+ * returns with candidates and how to narrow, the same discipline the graph builder applies to an
4
+ * unresolvable edge (never stub a node) and adapters apply to an unreadable receiver. */
15
5
  import { findNodes, getNode } from "@descryy/core";
16
6
  export function resolveOneNode(session, criteria) {
17
7
  const driver = session.store().driver;
@@ -1 +1 @@
1
- {"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../src/tools/lookup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAanD,MAAM,UAAU,cAAc,CAC5B,OAAgB,EAChB,QAIC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC;IAEtC,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC9C,OAAO,IAAI,KAAK,SAAS;YACvB,CAAC,CAAC;gBACE,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,mBAAmB,QAAQ,CAAC,MAAM,mBAAmB;gBAC/D,KAAK,EAAE;oBACL,oFAAoF;wBAClF,qFAAqF;wBACrF,wEAAwE;iBAC3E;aACF;YACH,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACnE,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,EAAE;QAChC,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,CAAC,CA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,IAAI,KAAK,oBAAoB,OAAO,CAAC,MAAM,eAAe;QACpE,KAAK,EAAE;YACL,eAAe,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI;gBACxD,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;oBAC1B,CAAC,CAAC,mDAAmD;oBACrD,CAAC,CAAC,yDAAyD,CAAC;YAChE,yFAAyF;gBACvF,8CAA8C;SACjD;KACF,CAAC;AACJ,CAAC"}
@@ -1,51 +1,8 @@
1
- /**
2
- * `mark_incident` — "that was a bug, and I just fixed it."
3
- *
4
- * The mechanism that lets an incident corpus grow during ordinary work, and the
5
- * only one with precision 1.0 by construction: a person is asserting it.
6
- *
7
- * ## Why this exists
8
- *
9
- * `similar_incidents` is built, tested and correct, and starved. Until now one
10
- * thing in the whole system minted an `INCIDENT` — a commit body carrying
11
- * `This reverts commit <sha>` — which produced **zero** incidents across three
12
- * measured repositories and two in a real product repository. Widening the
13
- * automatic detection helps (`incidents.ts` now reads manual reverts and
14
- * `Fixes #123` too), but every automatic mechanism can only read what somebody
15
- * already wrote down. Most bugs are fixed forward with a commit message that
16
- * says what the code now does, not what it used to do wrong.
17
- *
18
- * The heuristic that would close that gap was built and measured and refused:
19
- * `bench/incident-fix-forward.mjs` scored **25%** against a 90% threshold
20
- * declared before it ran. So the remaining route is to ask, once, cheaply, at
21
- * the moment the developer already knows the answer.
22
- *
23
- * ## Where the record lives, and why not in the graph
24
- *
25
- * `.descry/config.json`, beside `confirmedFacts` — DEC-223's storage decision
26
- * for exactly this class of data. A store is derived data (DEC-017) and every
27
- * derived table is dropped on a schema bump; a fact a person asserted, which
28
- * exists nowhere else, must not be. The graph holds a *projection*
29
- * (`createConfirmedIncidentSource`), re-derived by every `analyze`, and this
30
- * tool writes both so the incident is visible in the same conversation that
31
- * recorded it rather than after the next rebuild.
32
- *
33
- * ## Reliability
34
- *
35
- * DEC-223's rule, unchanged: an edge resting on testimony is capped at class B
36
- * however much structure surrounds it. One unaudited assertion is one unaudited
37
- * assertion. This tool asserts a defect existed; it asserts nothing about why,
38
- * and nothing here may promote it.
39
- *
40
- * ## Class
41
- *
42
- * `action` — DEC-278's test is *"can this call's effect change a later finding
43
- * without the developer having said so"*, and an `INCIDENT_CORRELATED` edge
44
- * biases diff-scoping traversal toward the files it names on every later run.
45
- * Gated by the same two-call `confirmToken` handshake `questions` uses.
46
- *
47
- * See `DEC-NEXT-incident-minting-beyond-explicit-reverts`.
48
- */
1
+ /** `mark_incident` — "that was a bug, I fixed it": the only incident-minting path with
2
+ * precision 1.0 (a person asserts it). Needed because automatic detection (reverts,
3
+ * `Fixes #123`) found zero incidents in 3 repos, and a fix-forward heuristic scored 25%
4
+ * against a 90% threshold and was refused. Stored in `.descry/config.json` (DEC-223,
5
+ * DEC-017 — derived tables don't survive rebuilds) and capped at class B; `action` class per DEC-278, gated by the `confirmToken` handshake. */
49
6
  import type { ConfirmedIncident } from "@descryy/ir";
50
7
  import { type ToolDefinition } from "./kit.ts";
51
8
  export interface MarkIncidentData {
@@ -57,12 +14,8 @@ export interface MarkIncidentData {
57
14
  readonly configPath: string;
58
15
  /** How many confirmed incidents this repository now has on record. */
59
16
  readonly totalConfirmed: number;
60
- /**
61
- * Paths named that the graph has no node for.
62
- *
63
- * The incident is still recorded and still correlated — a developer naming a
64
- * file Descry cannot read is a gap in Descry, not a mistake by the developer.
65
- */
17
+ /** Paths named that the graph has no node for. Still recorded and correlated — a
18
+ * developer naming a file Descry can't read is a gap in Descry, not a mistake. */
66
19
  readonly filesNotInGraph: readonly string[];
67
20
  }
68
21
  export declare const markIncidentTool: ToolDefinition;
@@ -1 +1 @@
1
- {"version":3,"file":"mark-incident.d.ts","sourceRoot":"","sources":["../../src/tools/mark-incident.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AASH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,oEAAoE;IACpE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AA0KD,eAAO,MAAM,gBAAgB,EAAE,cAkB9B,CAAC"}
1
+ {"version":3,"file":"mark-incident.d.ts","sourceRoot":"","sources":["../../src/tools/mark-incident.ts"],"names":[],"mappings":"AAAA;;;;iJAIiJ;AASjJ,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAGlB,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,oEAAoE;IACpE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;uFACmF;IACnF,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C;AAgKD,eAAO,MAAM,gBAAgB,EAAE,cAkB9B,CAAC"}
@@ -1,51 +1,8 @@
1
- /**
2
- * `mark_incident` — "that was a bug, and I just fixed it."
3
- *
4
- * The mechanism that lets an incident corpus grow during ordinary work, and the
5
- * only one with precision 1.0 by construction: a person is asserting it.
6
- *
7
- * ## Why this exists
8
- *
9
- * `similar_incidents` is built, tested and correct, and starved. Until now one
10
- * thing in the whole system minted an `INCIDENT` — a commit body carrying
11
- * `This reverts commit <sha>` — which produced **zero** incidents across three
12
- * measured repositories and two in a real product repository. Widening the
13
- * automatic detection helps (`incidents.ts` now reads manual reverts and
14
- * `Fixes #123` too), but every automatic mechanism can only read what somebody
15
- * already wrote down. Most bugs are fixed forward with a commit message that
16
- * says what the code now does, not what it used to do wrong.
17
- *
18
- * The heuristic that would close that gap was built and measured and refused:
19
- * `bench/incident-fix-forward.mjs` scored **25%** against a 90% threshold
20
- * declared before it ran. So the remaining route is to ask, once, cheaply, at
21
- * the moment the developer already knows the answer.
22
- *
23
- * ## Where the record lives, and why not in the graph
24
- *
25
- * `.descry/config.json`, beside `confirmedFacts` — DEC-223's storage decision
26
- * for exactly this class of data. A store is derived data (DEC-017) and every
27
- * derived table is dropped on a schema bump; a fact a person asserted, which
28
- * exists nowhere else, must not be. The graph holds a *projection*
29
- * (`createConfirmedIncidentSource`), re-derived by every `analyze`, and this
30
- * tool writes both so the incident is visible in the same conversation that
31
- * recorded it rather than after the next rebuild.
32
- *
33
- * ## Reliability
34
- *
35
- * DEC-223's rule, unchanged: an edge resting on testimony is capped at class B
36
- * however much structure surrounds it. One unaudited assertion is one unaudited
37
- * assertion. This tool asserts a defect existed; it asserts nothing about why,
38
- * and nothing here may promote it.
39
- *
40
- * ## Class
41
- *
42
- * `action` — DEC-278's test is *"can this call's effect change a later finding
43
- * without the developer having said so"*, and an `INCIDENT_CORRELATED` edge
44
- * biases diff-scoping traversal toward the files it names on every later run.
45
- * Gated by the same two-call `confirmToken` handshake `questions` uses.
46
- *
47
- * See `DEC-NEXT-incident-minting-beyond-explicit-reverts`.
48
- */
1
+ /** `mark_incident` — "that was a bug, I fixed it": the only incident-minting path with
2
+ * precision 1.0 (a person asserts it). Needed because automatic detection (reverts,
3
+ * `Fixes #123`) found zero incidents in 3 repos, and a fix-forward heuristic scored 25%
4
+ * against a 90% threshold and was refused. Stored in `.descry/config.json` (DEC-223,
5
+ * DEC-017 — derived tables don't survive rebuilds) and capped at class B; `action` class per DEC-278, gated by the `confirmToken` handshake. */
49
6
  import { buildGraph, confirmedIncidentId, createConfirmedIncidentSource, nodesInFiles, persistGraph, } from "@descryy/core";
50
7
  import { writeConfirmedIncident } from "../session.js";
51
8
  import { answer, optionalString, optionalStringArray, requiredString, ToolInputError, } from "./kit.js";
@@ -113,21 +70,17 @@ async function run(args, ctx) {
113
70
  confirmedAt: new Date().toISOString(),
114
71
  };
115
72
  const driver = session.store().driver;
116
- // Measured **before** the projection runs. The projection mints a `FILE` node
117
- // for every path the record names — the same thing the git source does for a
118
- // reverted commit's files — so asking afterwards would always answer "all of
119
- // them are in the graph" and the disclosure would be a tautology.
73
+ // Measured before the projection runs — it mints a FILE node for every named path, so
74
+ // asking after would always say "all in the graph", a tautology.
120
75
  const { missing: filesNotInGraph } = nodesInFiles(driver, recorded.files);
121
76
  ctx.progress(`Recording an incident in ${session.config.repo}`);
122
77
  const written = await writeConfirmedIncident(session.repoPath, recorded);
123
- // Projected into the store now, not at the next `analyze`, so the incident is
124
- // visible in the conversation that recorded it — the same reason `questions`
125
- // merges its just-written fact into the response it is about to return.
78
+ // Projected now, not at next `analyze`, so the incident is visible in the conversation
79
+ // that recorded it (same reason `questions` merges its just-written fact into its own response).
126
80
  ctx.progress("Projecting it into the graph");
127
81
  const batch = await createConfirmedIncidentSource({
128
82
  repo: session.config.repo,
129
- // Every record, not just this one: the projection is of the whole file, and
130
- // a batch carrying only the newest would invalidate the rest of them.
83
+ // Every record, not just this one — projecting only the newest would invalidate the rest.
131
84
  incidents: [...(session.config.confirmedIncidents ?? []), recorded],
132
85
  }).emit({ root });
133
86
  const built = buildGraph([batch], { nodeExists: (id) => session.provider().node(id) !== undefined });
@@ -154,13 +107,10 @@ async function run(args, ctx) {
154
107
  return answer({
155
108
  headline: `Recorded an incident in ${session.config.repo}, correlated to ${recorded.files.length} file(s). ` +
156
109
  `${written.total} confirmed incident(s) now on record.`,
157
- // A name-level fact: this defect existed and touched these paths. It makes
158
- // no claim about program shape.
110
+ // Name-level fact: this defect existed and touched these paths — no claim about program shape.
159
111
  nameLevel: true,
160
- // R0, and honestly so. Testimony is not a point on the R0-R4 ladder at all —
161
- // that ladder measures how much tooling ran — so the honest floor is the
162
- // bottom of it, with the real ceiling expressed by `humanAsserted` where a
163
- // finding is actually classified.
112
+ // R0, honestly — testimony isn't a point on the R0-R4 ladder (which measures tooling
113
+ // run); the real ceiling is `humanAsserted`, expressed where a finding is classified.
164
114
  resolutionFloor: 0,
165
115
  commitSha: stamp.commitSha,
166
116
  graphBuiltAt: stamp.graphBuiltAt,
@@ -176,11 +126,8 @@ async function run(args, ctx) {
176
126
  },
177
127
  });
178
128
  }
179
- /**
180
- * Always returns a sentence: unlike `questions`, whose unconfirmed shape is a
181
- * genuine read of the open-question queue, there is no argument to this tool
182
- * that makes it not write.
183
- */
129
+ /** Always returns a sentence — unlike `questions`'s unconfirmed shape, no argument to this
130
+ * tool makes it not write. */
184
131
  function describeAction(args) {
185
132
  const summary = args["summary"];
186
133
  const files = args["files"];
@@ -1 +1 @@
1
- {"version":3,"file":"mark-incident.js","sourceRoot":"","sources":["../../src/tools/mark-incident.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACL,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,GAGf,MAAM,UAAU,CAAC;AAqBlB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAA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J,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAmB;IAC9C,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,uEAAuE;IAC9E,WAAW,EACT,kFAAkF;QAClF,+FAA+F;QAC/F,yFAAyF;QACzF,8FAA8F;QAC9F,6FAA6F;QAC7F,2FAA2F;QAC3F,0FAA0F;QAC1F,gEAAgE;IAClE,WAAW,EAAE,MAA4C;IACzD,GAAG;IACH,cAAc;CACf,CAAC"}
1
+ {"version":3,"file":"mark-incident.js","sourceRoot":"","sources":["../../src/tools/mark-incident.ts"],"names":[],"mappings":"AAAA;;;;iJAIiJ;AAEjJ,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACL,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,GAGf,MAAM,UAAU,CAAC;AAiBlB,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,wFAAwF;gBACxF,+EAA+E;gBAC/E,4FAA4F;SAC/F;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,QAAQ,EAAE,CAAC;YACX,WAAW,EACT,0FAA0F;gBAC1F,wFAAwF;gBACxF,oDAAoD;SACvD;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2FAA2F;gBAC3F,sFAAsF;gBACtF,2CAA2C;SAC9C;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uFAAuF;gBACvF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