@descryy/mcp 0.5.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 +62 -178
  10. package/dist/browser/driver.d.ts.map +1 -1
  11. package/dist/browser/driver.js +14 -46
  12. package/dist/browser/driver.js.map +1 -1
  13. package/dist/browser/evidence.d.ts +11 -35
  14. package/dist/browser/evidence.d.ts.map +1 -1
  15. package/dist/browser/evidence.js +25 -51
  16. package/dist/browser/evidence.js.map +1 -1
  17. package/dist/browser/fake-driver.d.ts +12 -16
  18. package/dist/browser/fake-driver.d.ts.map +1 -1
  19. package/dist/browser/fake-driver.js +24 -17
  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 +17 -67
  26. package/dist/browser/playwright-driver.d.ts.map +1 -1
  27. package/dist/browser/playwright-driver.js +169 -166
  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 +33 -91
  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 +22 -66
  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 +17 -0
  62. package/dist/capped.d.ts.map +1 -0
  63. package/dist/capped.js +15 -0
  64. package/dist/capped.js.map +1 -0
  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 +79 -11
  90. package/dist/render.d.ts.map +1 -1
  91. package/dist/render.js +126 -14
  92. package/dist/render.js.map +1 -1
  93. package/dist/runtime-registry.d.ts +8 -49
  94. package/dist/runtime-registry.d.ts.map +1 -1
  95. package/dist/runtime-registry.js +72 -63
  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 +55 -13
  115. package/dist/server.js.map +1 -1
  116. package/dist/session.d.ts +69 -239
  117. package/dist/session.d.ts.map +1 -1
  118. package/dist/session.js +76 -231
  119. package/dist/session.js.map +1 -1
  120. package/dist/tools/analyze.d.ts +27 -101
  121. package/dist/tools/analyze.d.ts.map +1 -1
  122. package/dist/tools/analyze.js +58 -148
  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 +102 -55
  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 +38 -51
  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 +17 -63
  161. package/dist/tools/contracts.d.ts.map +1 -1
  162. package/dist/tools/contracts.js +91 -47
  163. package/dist/tools/contracts.js.map +1 -1
  164. package/dist/tools/cross-pr.d.ts +56 -15
  165. package/dist/tools/cross-pr.d.ts.map +1 -1
  166. package/dist/tools/cross-pr.js +141 -38
  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 +143 -23
  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 +258 -436
  207. package/dist/tools/observe-runtime.js.map +1 -1
  208. package/dist/tools/observe-tests.d.ts +9 -88
  209. package/dist/tools/observe-tests.d.ts.map +1 -1
  210. package/dist/tools/observe-tests.js +34 -108
  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 +94 -9
  217. package/dist/tools/pre-push.d.ts.map +1 -1
  218. package/dist/tools/pre-push.js +139 -34
  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 +17 -20
  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 +31 -47
  245. package/dist/tools/validate.d.ts.map +1 -1
  246. package/dist/tools/validate.js +133 -61
  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 +33 -16
@@ -1,165 +1,23 @@
1
1
  /**
2
- * `observe_runtime` — boot or attach to a real application, watch it, and write
3
- * what was witnessed into the graph as R4 facts.
4
- *
5
- * **The second tool that writes, and the first that writes something no
6
- * re-index can reproduce.** `analyze` re-derives the graph from source already
7
- * on disk, so nothing it writes is a new claim about the world. This one runs
8
- * a real process and records what it saw happen, which is the one accuracy
9
- * source architecture §11B.3 calls *"the core technical moat"* and the one a
10
- * purely static tool is structurally unable to reach: *"a purely static
11
- * code-graph tool is capped at R3 permanently. It has no runtime."*
12
- *
13
- * ## What this composes, and what it invents
14
- *
15
- * It invents no mechanism. Every stage already existed, gate-verified, in
16
- * `descry-runtime`, and every one of them was dormant — the whole point of
17
- * `DEC-NEXT-mcp-runtime-dependency-boundary-for-r4-evidence`, which measured
18
- * that `applyRuntimeObservations` had **zero production callers anywhere**,
19
- * not in `descry-desktop` and not in `descry-runtime`'s own pipeline. Four
20
- * shipped components in a row, and this tool is the wire between them:
21
- *
22
- * 1. `runInstrumentedExecution` (`@descryy/runtime-orchestrator`) spawns or
23
- * attaches the declared services, starts the adapter's collectors, drains
24
- * them for a stated window, and writes every item through `EvidenceStore`.
25
- * 2. `correlateExecution` (`@descryy/runtime-evidence-correlation`) resolves
26
- * each evidence item to the graph node it is *about* — the resolve-then-
27
- * attribute pass. This answers identity, not edges.
28
- * 3. `confirmObservedFrontendCaller` (`@descryy/runtime-graph-correlator`)
29
- * turns a captured call-site stack plus a resolved endpoint into a
30
- * `RuntimeEdgeObservation`, and
31
- * 4. calls `applyRuntimeObservations` (`@descryy/core`) with it, which
32
- * promotes, mints or contradicts the edge and writes the EARNED ledger.
33
- *
34
- * ## Why stage 3 exists rather than deriving edges from stage 2 directly
35
- *
36
- * `uat-phase-1-bug-fixes.md` Phase 2 describes step 2 as producing
37
- * `RuntimeEdgeObservation[]`. It does not, and the difference is load-bearing
38
- * rather than pedantic: `correlateExecution` returns
39
- * `CorrelationAttribution`s — *(evidenceId, graphNodeId)* pairs saying which
40
- * single node an observation is about. An edge needs **two** endpoints and a
41
- * witnessed relationship between them, and manufacturing one by pairing up
42
- * attributions that happen to co-occur in the same run would mint edges from
43
- * temporal coincidence. That is precisely the wrong-direction failure rule 2
44
- * exists to prevent, arriving through the one mechanism built to make the
45
- * graph *more* trustworthy.
46
- *
47
- * So the observation comes from the one shipped producer that can honestly
48
- * make one: a captured stack naming the caller, against an endpoint the same
49
- * observation named. Both endpoints come from the observation itself. Every
50
- * other correlated item is reported in the counts and produces no edge, which
51
- * is a disclosed gap rather than a silent one.
52
- *
53
- * ## What this closure can actually witness today — measured, not assumed
54
- *
55
- * The wire is complete, and what it can carry changed when the runtime packages
56
- * were published at 0.1.0 and pinned here — so this paragraph is the record of
57
- * a limit that was real and is now lifted, kept rather than deleted because the
58
- * shape of it recurs.
59
- *
60
- * **It used to be that no producer of the required pair — HTTP evidence
61
- * carrying a call-site stack — was in this server's closure.** The browser
62
- * network collector never has been. The outbound-fetch instrumentation in
63
- * `@descryy/runtime-external-service-observation` existed, was proven in
64
- * `descry-runtime`, and was not installed here at all. So a run resolved both
65
- * kinds of node and wrote no edge, and `STANDING_NOTES` said so on every call
66
- * because "no edge was written" and "nothing here could have written one" are
67
- * different statements.
68
- *
69
- * **That second producer is now in the closure**, transitively through
70
- * `@descryy/runtime-orchestrator`, which applies the adapter's
71
- * `outboundHttpLaunch()` between the interpreter and the script so the client
72
- * is patched before any application code can capture an unpatched one. Measured
73
- * end to end in `observe-runtime-outbound.conformance.test.ts`: two real
74
- * processes, 17 `EXTERNAL_REQUEST` items alongside 18 `BACKEND_LOG`, one
75
- * `USES_API` edge minted at R4, and the first `strongly supported` reply this
76
- * server has produced.
77
- *
78
- * **Two limits remain, and they are stated rather than inferred from a zero.**
79
- * An *attached* service is not launched by Descry, so the instrumentation
80
- * cannot be installed into it and its outbound calls carry no stack. And
81
- * browser-side traffic still needs `@descryy/runtime-browser`, which is not
82
- * here. Both are in `STANDING_NOTES`.
83
- *
84
- * The rule that outlives all of it: a disclosure about the closure is a fact
85
- * about *this build*, not about what `descry-runtime` can do. The two came
86
- * apart once already, when the cross-boundary lane landed and this file still
87
- * claimed the capability was absent. Re-check it against the installed tree
88
- * when the pins move, not against the source repository.
89
- * Descry.
90
- *
91
- * ## Why no denial is ever emitted
92
- *
93
- * `applyRuntimeObservations` accepts `held: false`. Nothing here ever sends
94
- * one, and `confirmObservedFrontendCaller`'s own header explains why: a run
95
- * establishes that a call *happened*; it cannot establish that one did not,
96
- * because a run exercises the paths it happens to take. Demoting a correct
97
- * edge on the strength of a route this run did not visit would be worse than
98
- * never running.
99
- *
100
- * ## Class and tier
101
- *
102
- * `action` — DEC-278's own test is *"can this call's effect change a later
103
- * finding without the developer having said so"*, and this one spawns
104
- * processes and writes R4 edges that cap every later reliability class
105
- * differently. It is gated by the same two-call `confirmToken` handshake
106
- * `questions` uses, and additionally by the environment profile's declared
107
- * `safetyLevel` (DEC-270): booting a service is a **write** against the
108
- * target, so a `readOnly` profile refuses. An all-attach run is genuinely
109
- * read-only — `ServiceConfiguration.attach`'s own contract is that Descry
110
- * never executes code in, or applies limits to, a process it did not spawn —
111
- * so it is allowed under `readOnly`, and that distinction is stated in the
112
- * disclosures rather than inferred silently.
113
- *
114
- * `evidence` — it reports what was witnessed and what was written. It draws no
115
- * conclusion about the user's code; nothing here reads or writes a finding, a
116
- * hypothesis or a category (RT-027).
117
- *
118
- * ## No new query tools
119
- *
120
- * None are needed and none are added. `impact`, `propagation` and the rest
121
- * already read the `resolution` field, so an edge this tool promotes to R4
122
- * becomes visible through every one of them on the next call, with no change
123
- * to any of them.
124
- */
2
+ * `observe_runtime` — boot or attach to a real application, write what was witnessed into the
3
+ * graph as R4 facts. Composes existing descry-runtime stages, no new mechanism (DEC-NEXT-mcp-
4
+ * runtime-dependency-boundary-for-r4-evidence). `action`/`evidence` (DEC-278), gated by
5
+ * confirmToken + profile safetyLevel (DEC-270). Never emits a denial. */
125
6
  import type { SignalTypeCount } from "@descryy/ir";
126
- import type { Evidence, ServiceConfiguration } from "@descryy/runtime-contracts";
7
+ import type { Evidence, FilesystemPolicy, NetworkPolicy, ResourceLimits, ServiceConfiguration } from "@descryy/runtime-contracts";
127
8
  import type { RunOptions } from "@descryy/runtime-controller";
128
9
  import type { EnvironmentProfile } from "@descryy/runtime-environment-profile";
129
10
  import { type ToolDefinition } from "./kit.ts";
130
11
  import { type RuntimeAdapterSpec } from "../runtime-registry.ts";
131
- /**
132
- * One service's readiness declaration, derived from `RunOptions` rather than
133
- * imported by name.
134
- *
135
- * `@descryy/runtime-controller` declares `ServiceReadinessSpec` and does not
136
- * export it from its index — a real gap in that package, but fixing it there
137
- * would mean a republish and a version bump across everything that pins the
138
- * controller, to obtain a type this file can derive exactly. Deriving is also
139
- * the more durable of the two: this cannot drift from what `run()` actually
140
- * accepts, because it *is* what `run()` accepts.
141
- */
12
+ /** One service's readiness declaration, derived from RunOptions rather than imported by
13
+ * name — @descryy/runtime-controller doesn't export ServiceReadinessSpec, and deriving
14
+ * can't drift from what run() actually accepts, because it *is* what run() accepts. */
142
15
  type ServiceReadinessSpec = RunOptions["readiness"][string];
143
16
  /** Where evidence lands when the call does not say. Beside the graph, not inside it. */
144
17
  export declare const DEFAULT_EVIDENCE_RELATIVE_PATH: string;
145
- /**
146
- * What one declared service did, reported from the one source that survives the
147
- * call: `Execution.processes`.
148
- *
149
- * **Deliberately not the controller's `ServiceStartResult`**, which carries a
150
- * per-service `stage`/`readiness.reason` and would be the better answer.
151
- * `runInstrumentedExecution` does not return it — `serviceStartResults` is a
152
- * property of `ExecutionController`, which that function creates, uses and
153
- * drops, so it is genuinely unavailable to a caller rather than merely
154
- * unplumbed here. What is knowable is reported and nothing is invented to fill
155
- * the gap: a service with no `ProcessHandle` did not start, and the
156
- * execution-level `executionState` (`FAILED_START` in particular) is what says
157
- * a readiness check is why.
158
- *
159
- * A `null` `exitCode` with a `null` `signal` on a process that has not exited
160
- * is the healthy case, not a missing value — POSIX only sets an exit code on a
161
- * normal `exit()`, so `signal` is what distinguishes a crash from a clean exit.
162
- */
18
+ /** What one declared service did, from Execution.processes — not ServiceStartResult, which
19
+ * runInstrumentedExecution doesn't return. No ProcessHandle means never-started;
20
+ * `executionState` (FAILED_START) says why when known. */
163
21
  export interface ObservedService {
164
22
  readonly service: string;
165
23
  /** False when no process handle exists for it at all — it never started. */
@@ -174,12 +32,8 @@ export interface ObservedService {
174
32
  /** Non-null means killed by this signal, whatever `exitCode` says. */
175
33
  readonly signal: string | null;
176
34
  }
177
- /**
178
- * What the correlation pass resolved, by family. Counts rather than rows: a
179
- * long run produces thousands of evidence items and this reply is read by an
180
- * agent, not archived. The rows themselves are in the evidence store, keyed by
181
- * `executionId`, which is returned so they can be found.
182
- */
35
+ /** What the correlation pass resolved, by family — counts, not rows (a long run produces
36
+ * thousands of items). Rows themselves live in the evidence store, keyed by executionId. */
183
37
  export interface CorrelationSummary {
184
38
  readonly considered: number;
185
39
  readonly skipped: number;
@@ -190,11 +44,8 @@ export interface CorrelationSummary {
190
44
  /** Non-empty means the correlation machinery itself broke, not that it looked and found nothing. */
191
45
  readonly harnessErrors: readonly string[];
192
46
  }
193
- /**
194
- * The R4 write, reported in `applyRuntimeObservations`'s own six-way
195
- * vocabulary so a reader can account for every observation without inspecting
196
- * the store.
197
- */
47
+ /** The R4 write, in applyRuntimeObservations's own six-way vocabulary so a reader can
48
+ * account for every observation without inspecting the store. */
198
49
  export interface RuntimeWriteSummary {
199
50
  /** Edges the graph already held below R4, now witnessed and raised to R4. */
200
51
  readonly promoted: readonly string[];
@@ -204,10 +55,8 @@ export interface RuntimeWriteSummary {
204
55
  readonly confirmed: readonly string[];
205
56
  /** Observations the graph declined to act on, with the resolver's own reason. */
206
57
  readonly refused: readonly string[];
207
- /**
208
- * Always empty today, and present so that stays visible rather than
209
- * unstated. This tool emits no denial — see the header.
210
- */
58
+ /** Always empty today — this tool emits no denial (see header) — kept visible rather
59
+ * than unstated. */
211
60
  readonly contradictions: readonly string[];
212
61
  /** A denial aimed at an edge already at R4. Out of scope by construction; reported, not laundered. */
213
62
  readonly staleR4: readonly string[];
@@ -233,26 +82,6 @@ interface DeclaredService {
233
82
  readonly readiness: ServiceReadinessSpec;
234
83
  readonly attached: boolean;
235
84
  }
236
- /**
237
- * Every argument this tool takes, read and validated in one place.
238
- *
239
- * Extracted from `run` so that `describeAction` can call it too. That is the
240
- * whole point of the extraction: an `action` tool's first call is the one a
241
- * caller makes *before* it has a token, and therefore the only cheap place to
242
- * learn its arguments are wrong. Minting a token, and a paragraph describing
243
- * an action, for a declaration that cannot possibly run asks a developer to
244
- * confirm something that was never going to happen — and delivers the real
245
- * refusal on the second call, after the confirmation.
246
- *
247
- * Nothing here touches the filesystem, spawns anything or reads the graph: it
248
- * is argument reading and nothing else, which is what makes it safe to run at
249
- * mint time, outside the call budget.
250
- *
251
- * Ruled in `documents/decisions-inbox/DEC-387.md`.
252
- *
253
- * Exported for its own test: several of the argument rules are conditional and
254
- * cheaper to assert directly than through a full run.
255
- */
256
85
  export declare function readArguments(args: Record<string, unknown>, repoPath: string): {
257
86
  readonly profile: EnvironmentProfile;
258
87
  readonly adapterSpec: RuntimeAdapterSpec;
@@ -262,30 +91,18 @@ export declare function readArguments(args: Record<string, unknown>, repoPath: s
262
91
  readonly fidelityRaw: number;
263
92
  readonly environmentTier: string;
264
93
  readonly evidencePath: string;
94
+ readonly resourceLimits: ResourceLimits | undefined;
95
+ readonly filesystemPolicy: FilesystemPolicy | undefined;
96
+ readonly networkPolicy: NetworkPolicy | undefined;
97
+ readonly sandboxBackend: "bwrap" | "container" | undefined;
265
98
  };
266
- /**
267
- * The two fields the channel mapping actually reads.
268
- *
269
- * Narrower than `Evidence` on purpose: `observe_tests` counts its channels
270
- * before its evidence has been through `EvidenceStore.write()`, so its items
271
- * have no `evidenceId` or `executionId` yet. Widening the parameter is how
272
- * both tools share one implementation of the count; the alternative was a cast
273
- * at one call site, which buys nothing and hides that the extra fields were
274
- * never used.
275
- */
99
+ /** The two fields the channel mapping reads. Narrower than Evidence on purpose: observe_tests
100
+ * counts channels before its evidence has an evidenceId/executionId — this lets both tools
101
+ * share one implementation rather than a cast that hides the unused fields. */
276
102
  type WitnessableEvidence = Pick<Evidence, "eventType" | "source">;
277
- /**
278
- * `E` for this run — how many of the six channels it actually saw.
279
- *
280
- * The count itself is `@descryy/ir`'s `independentSignalTypes`, deliberately:
281
- * the clamp to six and the drop of `null` signals are that function's rules,
282
- * and a second implementation of them here is a second place for the
283
- * vocabulary to drift. This function's only job is the translation above.
284
- *
285
- * Exported for its own test — the mapping decides whether a witnessed answer
286
- * reads `strongly supported` or `unconfirmed`, which is too load-bearing to be
287
- * asserted only through a category two layers downstream.
288
- */
103
+ /** `E` for this run — channels actually seen, via @descryy/ir's independentSignalTypes
104
+ * (clamp-to-six and null-drop are that function's rules, not duplicated here). Exported for
105
+ * its own test — this mapping decides `strongly supported` vs `unconfirmed`. */
289
106
  export declare function witnessedSignalTypes(evidence: readonly WitnessableEvidence[]): SignalTypeCount;
290
107
  export declare const observeRuntimeTool: ToolDefinition;
291
108
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"observe-runtime.d.ts","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