@reticlehq/server 2.2.0 → 2.3.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 (768) hide show
  1. package/README.md +1 -1
  2. package/dist/bridge-security.d.ts +0 -1
  3. package/dist/bridge-security.js +0 -1
  4. package/dist/bridge.d.ts +0 -1
  5. package/dist/bridge.js +60 -10
  6. package/dist/bridge.test-harness.d.ts +0 -1
  7. package/dist/bridge.test-harness.js +0 -1
  8. package/dist/capsule/capsule-store.d.ts +2 -3
  9. package/dist/capsule/capsule-store.js +0 -1
  10. package/dist/capsule/capsule.d.ts +0 -1
  11. package/dist/capsule/capsule.js +0 -1
  12. package/dist/capsule/causal-summary.d.ts +21 -1
  13. package/dist/capsule/causal-summary.js +20 -2
  14. package/dist/capsule/divergence.d.ts +0 -1
  15. package/dist/capsule/divergence.js +0 -1
  16. package/dist/capsule/minimize.d.ts +0 -1
  17. package/dist/capsule/minimize.js +0 -1
  18. package/dist/capsule/predicate-to-links.d.ts +0 -1
  19. package/dist/capsule/predicate-to-links.js +0 -1
  20. package/dist/cli-doctor.d.ts +6 -0
  21. package/dist/cli-doctor.js +60 -0
  22. package/dist/cli-flow-commands.d.ts +0 -1
  23. package/dist/cli-flow-commands.js +0 -1
  24. package/dist/cli-launch.d.ts +0 -1
  25. package/dist/cli-launch.js +7 -3
  26. package/dist/cli-parse.d.ts +52 -2
  27. package/dist/cli-parse.js +147 -3
  28. package/dist/cli-port.d.ts +0 -1
  29. package/dist/cli-port.js +0 -1
  30. package/dist/cli-verify.d.ts +2 -1
  31. package/dist/cli-verify.js +24 -3
  32. package/dist/cli.d.ts +2 -4
  33. package/dist/cli.js +109 -10
  34. package/dist/cloud/cloud-config.d.ts +36 -0
  35. package/dist/cloud/cloud-config.js +86 -0
  36. package/dist/cloud/cloud-sync.d.ts +96 -4
  37. package/dist/cloud/cloud-sync.js +131 -3
  38. package/dist/cloud-cli.d.ts +3 -0
  39. package/dist/cloud-cli.js +514 -0
  40. package/dist/crawl/crawl-tools.d.ts +0 -1
  41. package/dist/crawl/crawl-tools.js +1 -2
  42. package/dist/crawl/crawl.d.ts +17 -3
  43. package/dist/crawl/crawl.js +43 -4
  44. package/dist/daemon-resilience.d.ts +6 -1
  45. package/dist/daemon-resilience.js +63 -1
  46. package/dist/daemon.d.ts +23 -3
  47. package/dist/daemon.js +78 -21
  48. package/dist/domain/domain-model.d.ts +0 -1
  49. package/dist/domain/domain-model.js +1 -2
  50. package/dist/domain/domain-tools.d.ts +0 -7
  51. package/dist/domain/domain-tools.js +21 -4
  52. package/dist/domain/flow-risk.d.ts +0 -1
  53. package/dist/domain/flow-risk.js +0 -1
  54. package/dist/ee/audit-log.d.ts +0 -1
  55. package/dist/ee/audit-log.js +0 -1
  56. package/dist/events/body-failures.d.ts +4 -0
  57. package/dist/events/body-failures.js +113 -0
  58. package/dist/events/contradictions.d.ts +53 -0
  59. package/dist/events/contradictions.js +282 -0
  60. package/dist/events/echo-mismatch.d.ts +4 -0
  61. package/dist/events/echo-mismatch.js +138 -0
  62. package/dist/events/event-filters.d.ts +17 -3
  63. package/dist/events/event-filters.js +13 -3
  64. package/dist/events/json-salvage.d.ts +32 -0
  65. package/dist/events/json-salvage.js +96 -0
  66. package/dist/events/predicate-eval.d.ts +2 -1
  67. package/dist/events/predicate-eval.js +56 -9
  68. package/dist/events/predicate.d.ts +0 -1
  69. package/dist/events/predicate.js +56 -2
  70. package/dist/events/reaction.d.ts +0 -1
  71. package/dist/events/reaction.js +0 -1
  72. package/dist/events/reconcile.d.ts +39 -0
  73. package/dist/events/reconcile.js +211 -0
  74. package/dist/events/ring-buffer.d.ts +0 -1
  75. package/dist/events/ring-buffer.js +0 -1
  76. package/dist/events/stale-response.d.ts +4 -0
  77. package/dist/events/stale-response.js +139 -0
  78. package/dist/events/unit-mismatch.d.ts +16 -0
  79. package/dist/events/unit-mismatch.js +167 -0
  80. package/dist/flows/affected-tools.d.ts +18 -0
  81. package/dist/flows/affected-tools.js +52 -0
  82. package/dist/flows/affected.d.ts +0 -1
  83. package/dist/flows/affected.js +0 -1
  84. package/dist/flows/annotate-tools.d.ts +0 -1
  85. package/dist/flows/annotate-tools.js +21 -3
  86. package/dist/flows/annotate.d.ts +0 -1
  87. package/dist/flows/annotate.js +0 -1
  88. package/dist/flows/annotation-store.d.ts +0 -1
  89. package/dist/flows/annotation-store.js +0 -1
  90. package/dist/flows/assertion-integrity.d.ts +0 -1
  91. package/dist/flows/assertion-integrity.js +0 -1
  92. package/dist/flows/assertion-tiers-store.d.ts +0 -1
  93. package/dist/flows/assertion-tiers-store.js +0 -1
  94. package/dist/flows/buddy-status.d.ts +0 -1
  95. package/dist/flows/buddy-status.js +0 -1
  96. package/dist/flows/coverage.d.ts +0 -1
  97. package/dist/flows/coverage.js +0 -1
  98. package/dist/flows/decision.d.ts +0 -1
  99. package/dist/flows/decision.js +0 -1
  100. package/dist/flows/flake-store.d.ts +0 -1
  101. package/dist/flows/flake-store.js +0 -1
  102. package/dist/flows/flake.d.ts +0 -1
  103. package/dist/flows/flake.js +0 -1
  104. package/dist/flows/flow-classify.d.ts +0 -1
  105. package/dist/flows/flow-classify.js +0 -1
  106. package/dist/flows/flow-replay-run.d.ts +0 -1
  107. package/dist/flows/flow-replay-run.js +24 -8
  108. package/dist/flows/flow-replay.d.ts +20 -4
  109. package/dist/flows/flow-replay.js +9 -43
  110. package/dist/flows/flow-report.d.ts +0 -1
  111. package/dist/flows/flow-report.js +0 -1
  112. package/dist/flows/flow-scope.d.ts +0 -1
  113. package/dist/flows/flow-scope.js +0 -1
  114. package/dist/flows/flow-sources.d.ts +0 -1
  115. package/dist/flows/flow-sources.js +0 -1
  116. package/dist/flows/flow-step-runners.d.ts +23 -0
  117. package/dist/flows/flow-step-runners.js +102 -0
  118. package/dist/flows/flow-success.d.ts +0 -1
  119. package/dist/flows/flow-success.js +0 -1
  120. package/dist/flows/flow-tools.d.ts +0 -1
  121. package/dist/flows/flow-tools.js +54 -16
  122. package/dist/flows/flows.d.ts +6 -2
  123. package/dist/flows/flows.js +15 -2
  124. package/dist/flows/gate.d.ts +0 -1
  125. package/dist/flows/gate.js +0 -1
  126. package/dist/flows/git-changed.d.ts +0 -1
  127. package/dist/flows/git-changed.js +0 -1
  128. package/dist/flows/heal-run.d.ts +0 -1
  129. package/dist/flows/heal-run.js +0 -1
  130. package/dist/flows/heal.d.ts +0 -1
  131. package/dist/flows/heal.js +0 -1
  132. package/dist/flows/parallel-suite.d.ts +0 -1
  133. package/dist/flows/parallel-suite.js +0 -1
  134. package/dist/flows/recordings.d.ts +0 -1
  135. package/dist/flows/recordings.js +0 -1
  136. package/dist/flows/replay.d.ts +0 -1
  137. package/dist/flows/replay.js +71 -4
  138. package/dist/flows/server-verify.d.ts +15 -0
  139. package/dist/flows/server-verify.js +42 -0
  140. package/dist/flows/verify-change-tools.d.ts +2 -0
  141. package/dist/flows/verify-change-tools.js +187 -0
  142. package/dist/flows/watch-batcher.d.ts +0 -1
  143. package/dist/flows/watch-batcher.js +0 -1
  144. package/dist/honesty/accepted-write.d.ts +14 -0
  145. package/dist/honesty/accepted-write.js +17 -0
  146. package/dist/honesty/blind-spots.d.ts +18 -1
  147. package/dist/honesty/blind-spots.js +47 -5
  148. package/dist/honesty/honesty.d.ts +0 -1
  149. package/dist/honesty/honesty.js +0 -1
  150. package/dist/honesty/uncaptured-bodies.d.ts +19 -0
  151. package/dist/honesty/uncaptured-bodies.js +30 -0
  152. package/dist/honesty/unread-outcome.d.ts +2 -0
  153. package/dist/honesty/unread-outcome.js +50 -0
  154. package/dist/honesty/verified.d.ts +40 -0
  155. package/dist/honesty/verified.js +86 -0
  156. package/dist/http-server.d.ts +0 -1
  157. package/dist/http-server.js +5 -1
  158. package/dist/hunt/hunt-report.d.ts +50 -0
  159. package/dist/hunt/hunt-report.js +84 -0
  160. package/dist/idle-shutdown.d.ts +0 -1
  161. package/dist/idle-shutdown.js +0 -1
  162. package/dist/index.d.ts +0 -1
  163. package/dist/index.js +0 -1
  164. package/dist/init/agent-rules.d.ts +0 -1
  165. package/dist/init/agent-rules.js +4 -2
  166. package/dist/init/cursor.d.ts +0 -1
  167. package/dist/init/cursor.js +0 -1
  168. package/dist/init/desktop-doctor.d.ts +40 -0
  169. package/dist/init/desktop-doctor.js +198 -0
  170. package/dist/init/detect.d.ts +0 -1
  171. package/dist/init/detect.js +0 -1
  172. package/dist/init/mcp.d.ts +0 -1
  173. package/dist/init/mcp.js +0 -1
  174. package/dist/init/node-io.d.ts +0 -1
  175. package/dist/init/node-io.js +0 -1
  176. package/dist/init/plan.d.ts +4 -1
  177. package/dist/init/plan.js +23 -5
  178. package/dist/init/project-id.d.ts +0 -1
  179. package/dist/init/project-id.js +0 -1
  180. package/dist/init/run.d.ts +0 -1
  181. package/dist/init/run.js +31 -3
  182. package/dist/init/snippets.d.ts +5 -1
  183. package/dist/init/snippets.js +5 -1
  184. package/dist/init/vite-config.d.ts +0 -1
  185. package/dist/init/vite-config.js +0 -1
  186. package/dist/input/network-detail.d.ts +0 -1
  187. package/dist/input/network-detail.js +0 -1
  188. package/dist/input/network-mock-tools.d.ts +0 -1
  189. package/dist/input/network-mock-tools.js +3 -4
  190. package/dist/input/network-mock.d.ts +0 -1
  191. package/dist/input/network-mock.js +0 -1
  192. package/dist/input/real-input.d.ts +14 -1
  193. package/dist/input/real-input.js +45 -3
  194. package/dist/input/scroll-find.d.ts +0 -1
  195. package/dist/input/scroll-find.js +0 -1
  196. package/dist/input/scroll-tools.d.ts +0 -1
  197. package/dist/input/scroll-tools.js +0 -1
  198. package/dist/input/viewport-tools.d.ts +0 -1
  199. package/dist/input/viewport-tools.js +3 -4
  200. package/dist/journal/ambient-store.d.ts +0 -1
  201. package/dist/journal/ambient-store.js +0 -1
  202. package/dist/journal/ambient.d.ts +0 -1
  203. package/dist/journal/ambient.js +0 -1
  204. package/dist/journal/attach-journal.d.ts +0 -1
  205. package/dist/journal/attach-journal.js +0 -1
  206. package/dist/journal/deviation-report.d.ts +0 -1
  207. package/dist/journal/deviation-report.js +0 -1
  208. package/dist/journal/deviation-service.d.ts +0 -1
  209. package/dist/journal/deviation-service.js +0 -1
  210. package/dist/journal/envelope-store.d.ts +0 -1
  211. package/dist/journal/envelope-store.js +0 -1
  212. package/dist/journal/envelope.d.ts +8 -9
  213. package/dist/journal/envelope.js +0 -1
  214. package/dist/journal/journal-query.d.ts +0 -1
  215. package/dist/journal/journal-query.js +0 -1
  216. package/dist/journal/journal-recorder.d.ts +0 -1
  217. package/dist/journal/journal-recorder.js +0 -1
  218. package/dist/journal/retention.d.ts +0 -1
  219. package/dist/journal/retention.js +0 -1
  220. package/dist/journal/rollups.d.ts +0 -1
  221. package/dist/journal/rollups.js +0 -1
  222. package/dist/journal/session-end.d.ts +0 -1
  223. package/dist/journal/session-end.js +0 -1
  224. package/dist/journal/session-journal.d.ts +0 -1
  225. package/dist/journal/session-journal.js +0 -1
  226. package/dist/license/license.d.ts +0 -1
  227. package/dist/license/license.js +0 -1
  228. package/dist/log.d.ts +0 -1
  229. package/dist/log.js +0 -1
  230. package/dist/mcp-proxy.d.ts +0 -1
  231. package/dist/mcp-proxy.js +0 -1
  232. package/dist/mcp.d.ts +15 -1
  233. package/dist/mcp.js +145 -17
  234. package/dist/oracles/flow-instrument-gaps.d.ts +0 -1
  235. package/dist/oracles/flow-instrument-gaps.js +0 -1
  236. package/dist/oracles/propose-consequences.d.ts +0 -1
  237. package/dist/oracles/propose-consequences.js +0 -1
  238. package/dist/oracles/self-instrument.d.ts +0 -1
  239. package/dist/oracles/self-instrument.js +0 -1
  240. package/dist/pairing-token.d.ts +0 -1
  241. package/dist/pairing-token.js +0 -1
  242. package/dist/phenomena/phenomena.d.ts +0 -1
  243. package/dist/phenomena/phenomena.js +0 -1
  244. package/dist/pool/browser-pool.d.ts +0 -1
  245. package/dist/pool/browser-pool.js +0 -1
  246. package/dist/pool/lease-reaper.d.ts +0 -1
  247. package/dist/pool/lease-reaper.js +0 -1
  248. package/dist/pool/playwright-launcher.d.ts +2 -1
  249. package/dist/pool/playwright-launcher.js +22 -2
  250. package/dist/project/baselines.d.ts +0 -1
  251. package/dist/project/baselines.js +5 -4
  252. package/dist/project/file-lock.d.ts +2 -1
  253. package/dist/project/file-lock.js +12 -2
  254. package/dist/project/fs-port.d.ts +0 -1
  255. package/dist/project/fs-port.js +0 -1
  256. package/dist/project/project-store.d.ts +0 -1
  257. package/dist/project/project-store.js +20 -9
  258. package/dist/project/project-tools.d.ts +0 -1
  259. package/dist/project/project-tools.js +57 -9
  260. package/dist/project/reticle-dir.d.ts +0 -1
  261. package/dist/project/reticle-dir.js +0 -1
  262. package/dist/runs/build-verification-run.d.ts +0 -1
  263. package/dist/runs/build-verification-run.js +0 -1
  264. package/dist/runs/profile-redact.d.ts +0 -1
  265. package/dist/runs/profile-redact.js +0 -1
  266. package/dist/runs/render-report.d.ts +0 -1
  267. package/dist/runs/render-report.js +0 -1
  268. package/dist/runs/repair-prompt.d.ts +0 -1
  269. package/dist/runs/repair-prompt.js +0 -1
  270. package/dist/runs/replay-mapping.d.ts +0 -1
  271. package/dist/runs/replay-mapping.js +0 -1
  272. package/dist/runs/reticle-runner.d.ts +0 -1
  273. package/dist/runs/reticle-runner.js +4 -2
  274. package/dist/runs/risk-classify.d.ts +0 -1
  275. package/dist/runs/risk-classify.js +0 -1
  276. package/dist/runs/run-diff.d.ts +0 -1
  277. package/dist/runs/run-diff.js +0 -1
  278. package/dist/runs/run-store.d.ts +0 -1
  279. package/dist/runs/run-store.js +0 -1
  280. package/dist/runs/run-tools.d.ts +0 -1
  281. package/dist/runs/run-tools.js +0 -1
  282. package/dist/runs/runner-port.d.ts +0 -1
  283. package/dist/runs/runner-port.js +0 -1
  284. package/dist/runs/verification-sync.d.ts +23 -0
  285. package/dist/runs/verification-sync.js +66 -0
  286. package/dist/runs/verify-http.d.ts +0 -1
  287. package/dist/runs/verify-http.js +0 -1
  288. package/dist/runs/verify-server.d.ts +0 -1
  289. package/dist/runs/verify-server.js +0 -1
  290. package/dist/server-version.d.ts +0 -1
  291. package/dist/server-version.js +0 -1
  292. package/dist/session/command-timeout.d.ts +35 -0
  293. package/dist/session/command-timeout.js +41 -0
  294. package/dist/session/control-envelope.d.ts +2 -3
  295. package/dist/session/control-envelope.js +2 -3
  296. package/dist/session/last-act.d.ts +31 -0
  297. package/dist/session/last-act.js +24 -0
  298. package/dist/session/live-control-tools.d.ts +0 -1
  299. package/dist/session/live-control-tools.js +3 -4
  300. package/dist/session/live-control.d.ts +0 -1
  301. package/dist/session/live-control.js +0 -1
  302. package/dist/session/observed-state.d.ts +12 -2
  303. package/dist/session/observed-state.js +29 -2
  304. package/dist/session/output-budget.d.ts +0 -1
  305. package/dist/session/output-budget.js +0 -1
  306. package/dist/session/pending-commands.d.ts +12 -0
  307. package/dist/session/pending-commands.js +36 -0
  308. package/dist/session/presenter-args.d.ts +0 -1
  309. package/dist/session/presenter-args.js +0 -1
  310. package/dist/session/review-store.d.ts +0 -1
  311. package/dist/session/review-store.js +0 -1
  312. package/dist/session/session-health.d.ts +26 -2
  313. package/dist/session/session-health.js +13 -1
  314. package/dist/session/session-info.d.ts +29 -0
  315. package/dist/session/session-info.js +1 -0
  316. package/dist/session/session-lease.d.ts +25 -0
  317. package/dist/session/session-lease.js +14 -0
  318. package/dist/session/session-manager.d.ts +7 -19
  319. package/dist/session/session-manager.js +29 -2
  320. package/dist/session/session-readiness.d.ts +0 -1
  321. package/dist/session/session-readiness.js +3 -4
  322. package/dist/session/session-reaper.d.ts +0 -1
  323. package/dist/session/session-reaper.js +0 -1
  324. package/dist/session/session-recommendation.d.ts +0 -1
  325. package/dist/session/session-recommendation.js +0 -1
  326. package/dist/session/session-tools.d.ts +0 -1
  327. package/dist/session/session-tools.js +2 -3
  328. package/dist/session/session.d.ts +27 -53
  329. package/dist/session/session.js +95 -66
  330. package/dist/session/state-select.d.ts +0 -1
  331. package/dist/session/state-select.js +0 -1
  332. package/dist/telemetry/argument-shape.d.ts +41 -0
  333. package/dist/telemetry/argument-shape.js +87 -0
  334. package/dist/telemetry/bug-found.d.ts +33 -0
  335. package/dist/telemetry/bug-found.js +95 -0
  336. package/dist/telemetry/cli-telemetry.d.ts +13 -0
  337. package/dist/telemetry/cli-telemetry.js +43 -0
  338. package/dist/telemetry/connect-failure.d.ts +16 -0
  339. package/dist/telemetry/connect-failure.js +44 -0
  340. package/dist/telemetry/daemon-telemetry.d.ts +19 -0
  341. package/dist/telemetry/daemon-telemetry.js +76 -0
  342. package/dist/telemetry/dev-repo.d.ts +10 -0
  343. package/dist/telemetry/dev-repo.js +80 -0
  344. package/dist/telemetry/error-fingerprint.d.ts +24 -0
  345. package/dist/telemetry/error-fingerprint.js +88 -0
  346. package/dist/telemetry/feedback-cli.d.ts +31 -0
  347. package/dist/telemetry/feedback-cli.js +102 -0
  348. package/dist/telemetry/feedback-context.d.ts +32 -0
  349. package/dist/telemetry/feedback-context.js +143 -0
  350. package/dist/telemetry/feedback.d.ts +66 -0
  351. package/dist/telemetry/feedback.js +175 -0
  352. package/dist/telemetry/git-facts.d.ts +21 -0
  353. package/dist/telemetry/git-facts.js +109 -0
  354. package/dist/telemetry/identify.d.ts +22 -0
  355. package/dist/telemetry/identify.js +73 -0
  356. package/dist/telemetry/init-telemetry.d.ts +26 -0
  357. package/dist/telemetry/init-telemetry.js +33 -0
  358. package/dist/telemetry/machine-snapshot.d.ts +6 -0
  359. package/dist/telemetry/machine-snapshot.js +39 -0
  360. package/dist/telemetry/mcp-connection.d.ts +5 -0
  361. package/dist/telemetry/mcp-connection.js +44 -0
  362. package/dist/telemetry/project-profile.d.ts +44 -0
  363. package/dist/telemetry/project-profile.js +205 -0
  364. package/dist/telemetry/run-telemetry.d.ts +21 -0
  365. package/dist/telemetry/run-telemetry.js +62 -0
  366. package/dist/telemetry/session-metrics.d.ts +103 -0
  367. package/dist/telemetry/session-metrics.js +329 -0
  368. package/dist/telemetry/telemetry.d.ts +68 -0
  369. package/dist/telemetry/telemetry.js +313 -0
  370. package/dist/token-auth.d.ts +0 -1
  371. package/dist/token-auth.js +0 -1
  372. package/dist/tools/act-capsule.d.ts +23 -0
  373. package/dist/tools/act-capsule.js +47 -0
  374. package/dist/tools/act-danger.d.ts +7 -0
  375. package/dist/tools/act-danger.js +44 -0
  376. package/dist/tools/act-helpers.d.ts +17 -0
  377. package/dist/tools/act-helpers.js +40 -0
  378. package/dist/tools/act-tools.d.ts +8 -1
  379. package/dist/tools/act-tools.js +96 -98
  380. package/dist/tools/act-view.d.ts +7 -1
  381. package/dist/tools/act-view.js +13 -1
  382. package/dist/tools/assert-grade.d.ts +22 -1
  383. package/dist/tools/assert-grade.js +46 -1
  384. package/dist/tools/assert-verdict.d.ts +21 -0
  385. package/dist/tools/assert-verdict.js +62 -0
  386. package/dist/tools/browser-tools.d.ts +0 -1
  387. package/dist/tools/browser-tools.js +2 -2
  388. package/dist/tools/contract-tools.d.ts +0 -1
  389. package/dist/tools/contract-tools.js +0 -1
  390. package/dist/tools/coverage-tools.d.ts +9 -0
  391. package/dist/tools/coverage-tools.js +92 -0
  392. package/dist/tools/dynamic-tools.d.ts +0 -1
  393. package/dist/tools/dynamic-tools.js +21 -2
  394. package/dist/tools/error-recovery.d.ts +18 -2
  395. package/dist/tools/error-recovery.js +42 -7
  396. package/dist/tools/feedback-tools.d.ts +24 -0
  397. package/dist/tools/feedback-tools.js +180 -0
  398. package/dist/tools/invoke-tool.d.ts +0 -1
  399. package/dist/tools/invoke-tool.js +116 -2
  400. package/dist/tools/lease-tools.d.ts +0 -1
  401. package/dist/tools/lease-tools.js +6 -5
  402. package/dist/tools/merge-tools.d.ts +0 -1
  403. package/dist/tools/merge-tools.js +0 -1
  404. package/dist/tools/observe-tools.d.ts +0 -1
  405. package/dist/tools/observe-tools.js +91 -39
  406. package/dist/tools/profiles.d.ts +1 -2
  407. package/dist/tools/profiles.js +43 -16
  408. package/dist/tools/query-paginate.d.ts +0 -1
  409. package/dist/tools/query-paginate.js +0 -1
  410. package/dist/tools/read-tools.d.ts +0 -1
  411. package/dist/tools/read-tools.js +10 -8
  412. package/dist/tools/reconcile-tools.d.ts +2 -0
  413. package/dist/tools/reconcile-tools.js +111 -0
  414. package/dist/tools/snapshot-delta.d.ts +0 -1
  415. package/dist/tools/snapshot-delta.js +0 -0
  416. package/dist/tools/tool-invoker.d.ts +0 -1
  417. package/dist/tools/tool-invoker.js +0 -1
  418. package/dist/tools/tool-kit.d.ts +16 -1
  419. package/dist/tools/tool-kit.js +8 -2
  420. package/dist/tools/tool-names.d.ts +6 -1
  421. package/dist/tools/tool-names.js +6 -1
  422. package/dist/tools/tools-helpers.d.ts +0 -1
  423. package/dist/tools/tools-helpers.js +0 -1
  424. package/dist/tools/tools.d.ts +0 -1
  425. package/dist/tools/tools.js +24 -4
  426. package/dist/update/update-checker.d.ts +0 -1
  427. package/dist/update/update-checker.js +26 -2
  428. package/dist/update/update-nudge.d.ts +20 -0
  429. package/dist/update/update-nudge.js +72 -0
  430. package/dist/update/updater.d.ts +14 -1
  431. package/dist/update/updater.js +33 -2
  432. package/dist/visual/visual-diff.d.ts +0 -1
  433. package/dist/visual/visual-diff.js +0 -1
  434. package/dist/visual/visual-store.d.ts +0 -1
  435. package/dist/visual/visual-store.js +0 -1
  436. package/dist/visual/visual-tools.d.ts +0 -1
  437. package/dist/visual/visual-tools.js +103 -16
  438. package/package.json +2 -2
  439. package/dist/bridge-security.d.ts.map +0 -1
  440. package/dist/bridge-security.js.map +0 -1
  441. package/dist/bridge.d.ts.map +0 -1
  442. package/dist/bridge.js.map +0 -1
  443. package/dist/bridge.test-harness.d.ts.map +0 -1
  444. package/dist/bridge.test-harness.js.map +0 -1
  445. package/dist/capsule/capsule-store.d.ts.map +0 -1
  446. package/dist/capsule/capsule-store.js.map +0 -1
  447. package/dist/capsule/capsule.d.ts.map +0 -1
  448. package/dist/capsule/capsule.js.map +0 -1
  449. package/dist/capsule/causal-summary.d.ts.map +0 -1
  450. package/dist/capsule/causal-summary.js.map +0 -1
  451. package/dist/capsule/divergence.d.ts.map +0 -1
  452. package/dist/capsule/divergence.js.map +0 -1
  453. package/dist/capsule/minimize.d.ts.map +0 -1
  454. package/dist/capsule/minimize.js.map +0 -1
  455. package/dist/capsule/predicate-to-links.d.ts.map +0 -1
  456. package/dist/capsule/predicate-to-links.js.map +0 -1
  457. package/dist/cli-flow-commands.d.ts.map +0 -1
  458. package/dist/cli-flow-commands.js.map +0 -1
  459. package/dist/cli-launch.d.ts.map +0 -1
  460. package/dist/cli-launch.js.map +0 -1
  461. package/dist/cli-parse.d.ts.map +0 -1
  462. package/dist/cli-parse.js.map +0 -1
  463. package/dist/cli-port.d.ts.map +0 -1
  464. package/dist/cli-port.js.map +0 -1
  465. package/dist/cli-verify.d.ts.map +0 -1
  466. package/dist/cli-verify.js.map +0 -1
  467. package/dist/cli.d.ts.map +0 -1
  468. package/dist/cli.js.map +0 -1
  469. package/dist/cloud/cloud-sync.d.ts.map +0 -1
  470. package/dist/cloud/cloud-sync.js.map +0 -1
  471. package/dist/crawl/crawl-tools.d.ts.map +0 -1
  472. package/dist/crawl/crawl-tools.js.map +0 -1
  473. package/dist/crawl/crawl.d.ts.map +0 -1
  474. package/dist/crawl/crawl.js.map +0 -1
  475. package/dist/daemon-resilience.d.ts.map +0 -1
  476. package/dist/daemon-resilience.js.map +0 -1
  477. package/dist/daemon.d.ts.map +0 -1
  478. package/dist/daemon.js.map +0 -1
  479. package/dist/domain/domain-model.d.ts.map +0 -1
  480. package/dist/domain/domain-model.js.map +0 -1
  481. package/dist/domain/domain-tools.d.ts.map +0 -1
  482. package/dist/domain/domain-tools.js.map +0 -1
  483. package/dist/domain/flow-risk.d.ts.map +0 -1
  484. package/dist/domain/flow-risk.js.map +0 -1
  485. package/dist/ee/audit-log.d.ts.map +0 -1
  486. package/dist/ee/audit-log.js.map +0 -1
  487. package/dist/events/event-filters.d.ts.map +0 -1
  488. package/dist/events/event-filters.js.map +0 -1
  489. package/dist/events/predicate-eval.d.ts.map +0 -1
  490. package/dist/events/predicate-eval.js.map +0 -1
  491. package/dist/events/predicate.d.ts.map +0 -1
  492. package/dist/events/predicate.js.map +0 -1
  493. package/dist/events/reaction.d.ts.map +0 -1
  494. package/dist/events/reaction.js.map +0 -1
  495. package/dist/events/ring-buffer.d.ts.map +0 -1
  496. package/dist/events/ring-buffer.js.map +0 -1
  497. package/dist/flows/affected.d.ts.map +0 -1
  498. package/dist/flows/affected.js.map +0 -1
  499. package/dist/flows/annotate-tools.d.ts.map +0 -1
  500. package/dist/flows/annotate-tools.js.map +0 -1
  501. package/dist/flows/annotate.d.ts.map +0 -1
  502. package/dist/flows/annotate.js.map +0 -1
  503. package/dist/flows/annotation-store.d.ts.map +0 -1
  504. package/dist/flows/annotation-store.js.map +0 -1
  505. package/dist/flows/assertion-integrity.d.ts.map +0 -1
  506. package/dist/flows/assertion-integrity.js.map +0 -1
  507. package/dist/flows/assertion-tiers-store.d.ts.map +0 -1
  508. package/dist/flows/assertion-tiers-store.js.map +0 -1
  509. package/dist/flows/buddy-status.d.ts.map +0 -1
  510. package/dist/flows/buddy-status.js.map +0 -1
  511. package/dist/flows/coverage.d.ts.map +0 -1
  512. package/dist/flows/coverage.js.map +0 -1
  513. package/dist/flows/decision.d.ts.map +0 -1
  514. package/dist/flows/decision.js.map +0 -1
  515. package/dist/flows/flake-store.d.ts.map +0 -1
  516. package/dist/flows/flake-store.js.map +0 -1
  517. package/dist/flows/flake.d.ts.map +0 -1
  518. package/dist/flows/flake.js.map +0 -1
  519. package/dist/flows/flow-classify.d.ts.map +0 -1
  520. package/dist/flows/flow-classify.js.map +0 -1
  521. package/dist/flows/flow-replay-run.d.ts.map +0 -1
  522. package/dist/flows/flow-replay-run.js.map +0 -1
  523. package/dist/flows/flow-replay.d.ts.map +0 -1
  524. package/dist/flows/flow-replay.js.map +0 -1
  525. package/dist/flows/flow-report.d.ts.map +0 -1
  526. package/dist/flows/flow-report.js.map +0 -1
  527. package/dist/flows/flow-scope.d.ts.map +0 -1
  528. package/dist/flows/flow-scope.js.map +0 -1
  529. package/dist/flows/flow-sources.d.ts.map +0 -1
  530. package/dist/flows/flow-sources.js.map +0 -1
  531. package/dist/flows/flow-success.d.ts.map +0 -1
  532. package/dist/flows/flow-success.js.map +0 -1
  533. package/dist/flows/flow-tools.d.ts.map +0 -1
  534. package/dist/flows/flow-tools.js.map +0 -1
  535. package/dist/flows/flows.d.ts.map +0 -1
  536. package/dist/flows/flows.js.map +0 -1
  537. package/dist/flows/gate.d.ts.map +0 -1
  538. package/dist/flows/gate.js.map +0 -1
  539. package/dist/flows/git-changed.d.ts.map +0 -1
  540. package/dist/flows/git-changed.js.map +0 -1
  541. package/dist/flows/heal-run.d.ts.map +0 -1
  542. package/dist/flows/heal-run.js.map +0 -1
  543. package/dist/flows/heal.d.ts.map +0 -1
  544. package/dist/flows/heal.js.map +0 -1
  545. package/dist/flows/parallel-suite.d.ts.map +0 -1
  546. package/dist/flows/parallel-suite.js.map +0 -1
  547. package/dist/flows/recordings.d.ts.map +0 -1
  548. package/dist/flows/recordings.js.map +0 -1
  549. package/dist/flows/replay.d.ts.map +0 -1
  550. package/dist/flows/replay.js.map +0 -1
  551. package/dist/flows/watch-batcher.d.ts.map +0 -1
  552. package/dist/flows/watch-batcher.js.map +0 -1
  553. package/dist/honesty/blind-spots.d.ts.map +0 -1
  554. package/dist/honesty/blind-spots.js.map +0 -1
  555. package/dist/honesty/honesty.d.ts.map +0 -1
  556. package/dist/honesty/honesty.js.map +0 -1
  557. package/dist/http-server.d.ts.map +0 -1
  558. package/dist/http-server.js.map +0 -1
  559. package/dist/idle-shutdown.d.ts.map +0 -1
  560. package/dist/idle-shutdown.js.map +0 -1
  561. package/dist/index.d.ts.map +0 -1
  562. package/dist/index.js.map +0 -1
  563. package/dist/init/agent-rules.d.ts.map +0 -1
  564. package/dist/init/agent-rules.js.map +0 -1
  565. package/dist/init/cursor.d.ts.map +0 -1
  566. package/dist/init/cursor.js.map +0 -1
  567. package/dist/init/detect.d.ts.map +0 -1
  568. package/dist/init/detect.js.map +0 -1
  569. package/dist/init/mcp.d.ts.map +0 -1
  570. package/dist/init/mcp.js.map +0 -1
  571. package/dist/init/node-io.d.ts.map +0 -1
  572. package/dist/init/node-io.js.map +0 -1
  573. package/dist/init/plan.d.ts.map +0 -1
  574. package/dist/init/plan.js.map +0 -1
  575. package/dist/init/project-id.d.ts.map +0 -1
  576. package/dist/init/project-id.js.map +0 -1
  577. package/dist/init/run.d.ts.map +0 -1
  578. package/dist/init/run.js.map +0 -1
  579. package/dist/init/snippets.d.ts.map +0 -1
  580. package/dist/init/snippets.js.map +0 -1
  581. package/dist/init/vite-config.d.ts.map +0 -1
  582. package/dist/init/vite-config.js.map +0 -1
  583. package/dist/input/network-detail.d.ts.map +0 -1
  584. package/dist/input/network-detail.js.map +0 -1
  585. package/dist/input/network-mock-tools.d.ts.map +0 -1
  586. package/dist/input/network-mock-tools.js.map +0 -1
  587. package/dist/input/network-mock.d.ts.map +0 -1
  588. package/dist/input/network-mock.js.map +0 -1
  589. package/dist/input/real-input.d.ts.map +0 -1
  590. package/dist/input/real-input.js.map +0 -1
  591. package/dist/input/scroll-find.d.ts.map +0 -1
  592. package/dist/input/scroll-find.js.map +0 -1
  593. package/dist/input/scroll-tools.d.ts.map +0 -1
  594. package/dist/input/scroll-tools.js.map +0 -1
  595. package/dist/input/viewport-tools.d.ts.map +0 -1
  596. package/dist/input/viewport-tools.js.map +0 -1
  597. package/dist/journal/ambient-store.d.ts.map +0 -1
  598. package/dist/journal/ambient-store.js.map +0 -1
  599. package/dist/journal/ambient.d.ts.map +0 -1
  600. package/dist/journal/ambient.js.map +0 -1
  601. package/dist/journal/attach-journal.d.ts.map +0 -1
  602. package/dist/journal/attach-journal.js.map +0 -1
  603. package/dist/journal/deviation-report.d.ts.map +0 -1
  604. package/dist/journal/deviation-report.js.map +0 -1
  605. package/dist/journal/deviation-service.d.ts.map +0 -1
  606. package/dist/journal/deviation-service.js.map +0 -1
  607. package/dist/journal/envelope-store.d.ts.map +0 -1
  608. package/dist/journal/envelope-store.js.map +0 -1
  609. package/dist/journal/envelope.d.ts.map +0 -1
  610. package/dist/journal/envelope.js.map +0 -1
  611. package/dist/journal/journal-query.d.ts.map +0 -1
  612. package/dist/journal/journal-query.js.map +0 -1
  613. package/dist/journal/journal-recorder.d.ts.map +0 -1
  614. package/dist/journal/journal-recorder.js.map +0 -1
  615. package/dist/journal/retention.d.ts.map +0 -1
  616. package/dist/journal/retention.js.map +0 -1
  617. package/dist/journal/rollups.d.ts.map +0 -1
  618. package/dist/journal/rollups.js.map +0 -1
  619. package/dist/journal/session-end.d.ts.map +0 -1
  620. package/dist/journal/session-end.js.map +0 -1
  621. package/dist/journal/session-journal.d.ts.map +0 -1
  622. package/dist/journal/session-journal.js.map +0 -1
  623. package/dist/license/license.d.ts.map +0 -1
  624. package/dist/license/license.js.map +0 -1
  625. package/dist/log.d.ts.map +0 -1
  626. package/dist/log.js.map +0 -1
  627. package/dist/mcp-proxy.d.ts.map +0 -1
  628. package/dist/mcp-proxy.js.map +0 -1
  629. package/dist/mcp.d.ts.map +0 -1
  630. package/dist/mcp.js.map +0 -1
  631. package/dist/oracles/flow-instrument-gaps.d.ts.map +0 -1
  632. package/dist/oracles/flow-instrument-gaps.js.map +0 -1
  633. package/dist/oracles/propose-consequences.d.ts.map +0 -1
  634. package/dist/oracles/propose-consequences.js.map +0 -1
  635. package/dist/oracles/self-instrument.d.ts.map +0 -1
  636. package/dist/oracles/self-instrument.js.map +0 -1
  637. package/dist/pairing-token.d.ts.map +0 -1
  638. package/dist/pairing-token.js.map +0 -1
  639. package/dist/phenomena/phenomena.d.ts.map +0 -1
  640. package/dist/phenomena/phenomena.js.map +0 -1
  641. package/dist/pool/browser-pool.d.ts.map +0 -1
  642. package/dist/pool/browser-pool.js.map +0 -1
  643. package/dist/pool/lease-reaper.d.ts.map +0 -1
  644. package/dist/pool/lease-reaper.js.map +0 -1
  645. package/dist/pool/playwright-launcher.d.ts.map +0 -1
  646. package/dist/pool/playwright-launcher.js.map +0 -1
  647. package/dist/project/baselines.d.ts.map +0 -1
  648. package/dist/project/baselines.js.map +0 -1
  649. package/dist/project/file-lock.d.ts.map +0 -1
  650. package/dist/project/file-lock.js.map +0 -1
  651. package/dist/project/fs-port.d.ts.map +0 -1
  652. package/dist/project/fs-port.js.map +0 -1
  653. package/dist/project/project-store.d.ts.map +0 -1
  654. package/dist/project/project-store.js.map +0 -1
  655. package/dist/project/project-tools.d.ts.map +0 -1
  656. package/dist/project/project-tools.js.map +0 -1
  657. package/dist/project/reticle-dir.d.ts.map +0 -1
  658. package/dist/project/reticle-dir.js.map +0 -1
  659. package/dist/runs/build-verification-run.d.ts.map +0 -1
  660. package/dist/runs/build-verification-run.js.map +0 -1
  661. package/dist/runs/profile-redact.d.ts.map +0 -1
  662. package/dist/runs/profile-redact.js.map +0 -1
  663. package/dist/runs/render-report.d.ts.map +0 -1
  664. package/dist/runs/render-report.js.map +0 -1
  665. package/dist/runs/repair-prompt.d.ts.map +0 -1
  666. package/dist/runs/repair-prompt.js.map +0 -1
  667. package/dist/runs/replay-mapping.d.ts.map +0 -1
  668. package/dist/runs/replay-mapping.js.map +0 -1
  669. package/dist/runs/reticle-runner.d.ts.map +0 -1
  670. package/dist/runs/reticle-runner.js.map +0 -1
  671. package/dist/runs/risk-classify.d.ts.map +0 -1
  672. package/dist/runs/risk-classify.js.map +0 -1
  673. package/dist/runs/run-diff.d.ts.map +0 -1
  674. package/dist/runs/run-diff.js.map +0 -1
  675. package/dist/runs/run-store.d.ts.map +0 -1
  676. package/dist/runs/run-store.js.map +0 -1
  677. package/dist/runs/run-tools.d.ts.map +0 -1
  678. package/dist/runs/run-tools.js.map +0 -1
  679. package/dist/runs/runner-port.d.ts.map +0 -1
  680. package/dist/runs/runner-port.js.map +0 -1
  681. package/dist/runs/verify-http.d.ts.map +0 -1
  682. package/dist/runs/verify-http.js.map +0 -1
  683. package/dist/runs/verify-server.d.ts.map +0 -1
  684. package/dist/runs/verify-server.js.map +0 -1
  685. package/dist/server-version.d.ts.map +0 -1
  686. package/dist/server-version.js.map +0 -1
  687. package/dist/session/control-envelope.d.ts.map +0 -1
  688. package/dist/session/control-envelope.js.map +0 -1
  689. package/dist/session/live-control-tools.d.ts.map +0 -1
  690. package/dist/session/live-control-tools.js.map +0 -1
  691. package/dist/session/live-control.d.ts.map +0 -1
  692. package/dist/session/live-control.js.map +0 -1
  693. package/dist/session/observed-state.d.ts.map +0 -1
  694. package/dist/session/observed-state.js.map +0 -1
  695. package/dist/session/output-budget.d.ts.map +0 -1
  696. package/dist/session/output-budget.js.map +0 -1
  697. package/dist/session/presenter-args.d.ts.map +0 -1
  698. package/dist/session/presenter-args.js.map +0 -1
  699. package/dist/session/review-store.d.ts.map +0 -1
  700. package/dist/session/review-store.js.map +0 -1
  701. package/dist/session/session-health.d.ts.map +0 -1
  702. package/dist/session/session-health.js.map +0 -1
  703. package/dist/session/session-manager.d.ts.map +0 -1
  704. package/dist/session/session-manager.js.map +0 -1
  705. package/dist/session/session-readiness.d.ts.map +0 -1
  706. package/dist/session/session-readiness.js.map +0 -1
  707. package/dist/session/session-reaper.d.ts.map +0 -1
  708. package/dist/session/session-reaper.js.map +0 -1
  709. package/dist/session/session-recommendation.d.ts.map +0 -1
  710. package/dist/session/session-recommendation.js.map +0 -1
  711. package/dist/session/session-tools.d.ts.map +0 -1
  712. package/dist/session/session-tools.js.map +0 -1
  713. package/dist/session/session.d.ts.map +0 -1
  714. package/dist/session/session.js.map +0 -1
  715. package/dist/session/state-select.d.ts.map +0 -1
  716. package/dist/session/state-select.js.map +0 -1
  717. package/dist/token-auth.d.ts.map +0 -1
  718. package/dist/token-auth.js.map +0 -1
  719. package/dist/tools/act-tools.d.ts.map +0 -1
  720. package/dist/tools/act-tools.js.map +0 -1
  721. package/dist/tools/act-view.d.ts.map +0 -1
  722. package/dist/tools/act-view.js.map +0 -1
  723. package/dist/tools/assert-grade.d.ts.map +0 -1
  724. package/dist/tools/assert-grade.js.map +0 -1
  725. package/dist/tools/browser-tools.d.ts.map +0 -1
  726. package/dist/tools/browser-tools.js.map +0 -1
  727. package/dist/tools/contract-tools.d.ts.map +0 -1
  728. package/dist/tools/contract-tools.js.map +0 -1
  729. package/dist/tools/dynamic-tools.d.ts.map +0 -1
  730. package/dist/tools/dynamic-tools.js.map +0 -1
  731. package/dist/tools/error-recovery.d.ts.map +0 -1
  732. package/dist/tools/error-recovery.js.map +0 -1
  733. package/dist/tools/invoke-tool.d.ts.map +0 -1
  734. package/dist/tools/invoke-tool.js.map +0 -1
  735. package/dist/tools/lease-tools.d.ts.map +0 -1
  736. package/dist/tools/lease-tools.js.map +0 -1
  737. package/dist/tools/merge-tools.d.ts.map +0 -1
  738. package/dist/tools/merge-tools.js.map +0 -1
  739. package/dist/tools/observe-tools.d.ts.map +0 -1
  740. package/dist/tools/observe-tools.js.map +0 -1
  741. package/dist/tools/profiles.d.ts.map +0 -1
  742. package/dist/tools/profiles.js.map +0 -1
  743. package/dist/tools/query-paginate.d.ts.map +0 -1
  744. package/dist/tools/query-paginate.js.map +0 -1
  745. package/dist/tools/read-tools.d.ts.map +0 -1
  746. package/dist/tools/read-tools.js.map +0 -1
  747. package/dist/tools/snapshot-delta.d.ts.map +0 -1
  748. package/dist/tools/snapshot-delta.js.map +0 -1
  749. package/dist/tools/tool-invoker.d.ts.map +0 -1
  750. package/dist/tools/tool-invoker.js.map +0 -1
  751. package/dist/tools/tool-kit.d.ts.map +0 -1
  752. package/dist/tools/tool-kit.js.map +0 -1
  753. package/dist/tools/tool-names.d.ts.map +0 -1
  754. package/dist/tools/tool-names.js.map +0 -1
  755. package/dist/tools/tools-helpers.d.ts.map +0 -1
  756. package/dist/tools/tools-helpers.js.map +0 -1
  757. package/dist/tools/tools.d.ts.map +0 -1
  758. package/dist/tools/tools.js.map +0 -1
  759. package/dist/update/update-checker.d.ts.map +0 -1
  760. package/dist/update/update-checker.js.map +0 -1
  761. package/dist/update/updater.d.ts.map +0 -1
  762. package/dist/update/updater.js.map +0 -1
  763. package/dist/visual/visual-diff.d.ts.map +0 -1
  764. package/dist/visual/visual-diff.js.map +0 -1
  765. package/dist/visual/visual-store.d.ts.map +0 -1
  766. package/dist/visual/visual-store.js.map +0 -1
  767. package/dist/visual/visual-tools.d.ts.map +0 -1
  768. package/dist/visual/visual-tools.js.map +0 -1
@@ -61,4 +61,3 @@ export class LiveControl {
61
61
  }
62
62
  }
63
63
  }
64
- //# sourceMappingURL=live-control.js.map
@@ -40,7 +40,17 @@ export declare class ObservedState {
40
40
  * In-session counts win: they describe this page as it is now.
41
41
  */
42
42
  seedAmbient(counts: AmbientCounts): void;
43
- /** Latest reported count per blind-spot kind, for the whole session. */
43
+ /** Record a driven ref. Idempotent. */
44
+ recordActedRef(ref: string): void;
45
+ /** Every ref driven so far this session. */
46
+ actedRefs(): ReadonlySet<string>;
47
+ /**
48
+ * Record bridge-side sampling as a blind spot.
49
+ *
50
+ * Every other blind spot is reported BY the SDK, which cannot report this one: the events were
51
+ * dropped before they reached the observer. Recording it here keeps the honesty contract intact —
52
+ * a verdict over a sampled window says `coverage: partial` rather than implying it saw everything.
53
+ */
54
+ noteRateLimited(dropped: number): void;
44
55
  blindSpots(): Readonly<Record<string, number>>;
45
56
  }
46
- //# sourceMappingURL=observed-state.d.ts.map
@@ -1,4 +1,4 @@
1
- import { EventType } from '@reticlehq/core';
1
+ import { BlindSpotKind, EventType } from '@reticlehq/core';
2
2
  import { ambientKeyOf } from '../journal/ambient.js';
3
3
  /**
4
4
  * The two things a session learns by watching its own event stream, as opposed to storing.
@@ -69,8 +69,35 @@ export class ObservedState {
69
69
  this.#seededAmbient = { ...counts };
70
70
  }
71
71
  /** Latest reported count per blind-spot kind, for the whole session. */
72
+ /**
73
+ * Refs the agent has driven, for the exercised/untouched split `reticle_coverage` reports.
74
+ *
75
+ * Kept here beside the blind-spot counts because both are per-session observed facts that must
76
+ * SURVIVE buffer eviction. Deriving "what did I touch" from the event buffer instead would mean an
77
+ * action fifty steps ago silently stops counting, so "untouched" would quietly come to mean
78
+ * "recently untouched" — a number that reads as thorough while drifting toward the opposite.
79
+ */
80
+ #actedRefs = new Set();
81
+ /** Record a driven ref. Idempotent. */
82
+ recordActedRef(ref) {
83
+ if (ref.length > 0)
84
+ this.#actedRefs.add(ref);
85
+ }
86
+ /** Every ref driven so far this session. */
87
+ actedRefs() {
88
+ return this.#actedRefs;
89
+ }
90
+ /**
91
+ * Record bridge-side sampling as a blind spot.
92
+ *
93
+ * Every other blind spot is reported BY the SDK, which cannot report this one: the events were
94
+ * dropped before they reached the observer. Recording it here keeps the honesty contract intact —
95
+ * a verdict over a sampled window says `coverage: partial` rather than implying it saw everything.
96
+ */
97
+ noteRateLimited(dropped) {
98
+ this.#blindSpots[BlindSpotKind.RATE_LIMITED] = dropped;
99
+ }
72
100
  blindSpots() {
73
101
  return this.#blindSpots;
74
102
  }
75
103
  }
76
- //# sourceMappingURL=observed-state.js.map
@@ -47,4 +47,3 @@ export declare function sizeCost(payload: unknown): SizeCost;
47
47
  */
48
48
  export declare function withSizeCost<T>(result: T): T;
49
49
  export {};
50
- //# sourceMappingURL=output-budget.d.ts.map
@@ -62,4 +62,3 @@ export function withSizeCost(result) {
62
62
  return result;
63
63
  return { ...result, cost: sizeCost(result) };
64
64
  }
65
- //# sourceMappingURL=output-budget.js.map
@@ -0,0 +1,12 @@
1
+ import type { CommandResult } from '@reticlehq/core';
2
+ export declare class PendingCommands {
3
+ #private;
4
+ /** Next correlation id. Monotonic per session, so a reply can never match an earlier command. */
5
+ nextId(prefix: string): string;
6
+ /** Register a command and arm its timeout. `describeTimeout` runs only if the reply never lands. */
7
+ track(id: string, timeoutMs: number, describeTimeout: () => string): Promise<CommandResult>;
8
+ /** Resolve the command this reply belongs to. Unknown ids are ignored, never thrown on. */
9
+ settle(result: CommandResult): void;
10
+ /** Reject everything still in flight — used on disconnect, so no caller waits on a dead socket. */
11
+ rejectAll(reason: string): void;
12
+ }
@@ -0,0 +1,36 @@
1
+ export class PendingCommands {
2
+ #pending = new Map();
3
+ #seq = 0;
4
+ /** Next correlation id. Monotonic per session, so a reply can never match an earlier command. */
5
+ nextId(prefix) {
6
+ this.#seq += 1;
7
+ return `${prefix}${String(this.#seq)}`;
8
+ }
9
+ /** Register a command and arm its timeout. `describeTimeout` runs only if the reply never lands. */
10
+ track(id, timeoutMs, describeTimeout) {
11
+ return new Promise((resolve, reject) => {
12
+ const timer = setTimeout(() => {
13
+ this.#pending.delete(id);
14
+ reject(new Error(describeTimeout()));
15
+ }, timeoutMs);
16
+ this.#pending.set(id, { resolve, reject, timer });
17
+ });
18
+ }
19
+ /** Resolve the command this reply belongs to. Unknown ids are ignored, never thrown on. */
20
+ settle(result) {
21
+ const pending = this.#pending.get(result.id);
22
+ if (pending === undefined)
23
+ return;
24
+ clearTimeout(pending.timer);
25
+ this.#pending.delete(result.id);
26
+ pending.resolve(result);
27
+ }
28
+ /** Reject everything still in flight — used on disconnect, so no caller waits on a dead socket. */
29
+ rejectAll(reason) {
30
+ for (const [id, pending] of this.#pending) {
31
+ clearTimeout(pending.timer);
32
+ pending.reject(new Error(reason));
33
+ this.#pending.delete(id);
34
+ }
35
+ }
36
+ }
@@ -5,4 +5,3 @@ import { PresenterTone, SessionState } from '@reticlehq/core';
5
5
  * Tone only rides an ended push; live transitions (active/paused) never carry one. Pure.
6
6
  */
7
7
  export declare function buildPresenterArgs(state: SessionState, text: string | undefined, tone: PresenterTone | undefined): Record<string, unknown>;
8
- //# sourceMappingURL=presenter-args.d.ts.map
@@ -12,4 +12,3 @@ export function buildPresenterArgs(state, text, tone) {
12
12
  ...(carriesTone ? { tone } : {}),
13
13
  };
14
14
  }
15
- //# sourceMappingURL=presenter-args.js.map
@@ -37,4 +37,3 @@ export declare class ReviewStore {
37
37
  */
38
38
  resolve(id: string): boolean;
39
39
  }
40
- //# sourceMappingURL=review-store.d.ts.map
@@ -58,4 +58,3 @@ export class ReviewStore {
58
58
  return true;
59
59
  }
60
60
  }
61
- //# sourceMappingURL=review-store.js.map
@@ -1,4 +1,15 @@
1
- import type { Session, SessionHealth } from './session.js';
1
+ import type { Session } from './session.js';
2
+ /**
3
+ * The health block spliced onto act/assert results. Defined here rather than in session.ts: this is
4
+ * the module that builds it, and session.ts was over the file-size cap.
5
+ */
6
+ export interface SessionHealth {
7
+ lastSeenMs: number;
8
+ throttled: boolean;
9
+ focused: boolean;
10
+ /** present only when hidden/throttled — points at the `reticle drive` escape hatch. */
11
+ recommendation?: string;
12
+ }
2
13
  /** The evidence-completeness block spliced onto observe/network/console results. */
3
14
  interface BufferEnvelope {
4
15
  buffer?: {
@@ -33,5 +44,18 @@ export declare function healthEnvelope(session: Session): HealthEnvelope;
33
44
  * warn-only so background testing never breaks.
34
45
  */
35
46
  export declare function refuseIfThrottled(session: Session, refuse: unknown): void;
47
+ /** The page's own visibility/runtime report, narrowed out of an untrusted PAGE_HEALTH payload. */
48
+ export interface HealthReport {
49
+ hidden: boolean | undefined;
50
+ focused: boolean | undefined;
51
+ runtime: string | undefined;
52
+ /** Coarse rendering engine (blink/gecko/webkit) — context for a feedback report, not a health input. */
53
+ engine: string | undefined;
54
+ }
55
+ /**
56
+ * Narrow a PAGE_HEALTH payload. Every field is optional on the wire — an older SDK does not report
57
+ * `runtime` at all — so each is returned as undefined rather than defaulted here, letting the caller
58
+ * keep its previous value instead of silently flipping a session to "visible" on a partial report.
59
+ */
60
+ export declare function readHealthEvent(data: Record<string, unknown>): HealthReport;
36
61
  export {};
37
- //# sourceMappingURL=session-health.d.ts.map
@@ -35,4 +35,16 @@ export function refuseIfThrottled(session, refuse) {
35
35
  throw new Error(`refusing to act: ${THROTTLED_WARNING}`);
36
36
  }
37
37
  }
38
- //# sourceMappingURL=session-health.js.map
38
+ /**
39
+ * Narrow a PAGE_HEALTH payload. Every field is optional on the wire — an older SDK does not report
40
+ * `runtime` at all — so each is returned as undefined rather than defaulted here, letting the caller
41
+ * keep its previous value instead of silently flipping a session to "visible" on a partial report.
42
+ */
43
+ export function readHealthEvent(data) {
44
+ return {
45
+ hidden: typeof data['hidden'] === 'boolean' ? data['hidden'] : undefined,
46
+ focused: typeof data['focused'] === 'boolean' ? data['focused'] : undefined,
47
+ runtime: typeof data['runtime'] === 'string' ? data['runtime'] : undefined,
48
+ engine: typeof data['engine'] === 'string' ? data['engine'] : undefined,
49
+ };
50
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The shape `reticle_sessions` returns for one connected tab.
3
+ *
4
+ * Split from session.ts when that file crossed the 600-line cap. A pure description of what a
5
+ * session looks like from the outside has no reason to live inside the class that happens to build
6
+ * it, and separating them keeps the wire-facing shape reviewable on its own.
7
+ */
8
+ export interface SessionInfo {
9
+ sessionId: string;
10
+ url: string;
11
+ /** Stable build-stamped project identity; absent for v1.0 SDKs that don't send it. */
12
+ projectId?: string;
13
+ title: string;
14
+ adapters: string[];
15
+ hasCapabilities: boolean;
16
+ /** ms since the SDK last reported anything (silence ⇒ likely throttled). */
17
+ lastSeenMs: number;
18
+ hidden: boolean;
19
+ focused: boolean;
20
+ throttled: boolean;
21
+ /** present only when hidden/throttled — points at the `reticle drive` escape hatch. */
22
+ recommendation?: string;
23
+ stale?: boolean;
24
+ cleanup_suggestion?: string;
25
+ /** present only when the human has flagged bugs on this tab — count of pending review marks. */
26
+ pendingMarks?: number;
27
+ /** present with pendingMarks — nudges the agent to drain them with reticle_review. */
28
+ review_suggestion?: string;
29
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The one-time session lease block, returned on the very first agent command of a session.
3
+ *
4
+ * It has to be carried in a RESULT rather than in `reticle_session`'s tool description: that tool is
5
+ * not advertised under the default `hybrid` profile, so its description is never in the agent's
6
+ * context, and the lease is the only place these two calls are ever named. Coding agents read tool
7
+ * results, so this is where the reminder actually lands.
8
+ */
9
+ export interface SessionLease {
10
+ sessionId: string;
11
+ opened_at: number;
12
+ IMPORTANT: string;
13
+ }
14
+ /**
15
+ * Kept SHORT on purpose, and this is the reason to read before editing it.
16
+ *
17
+ * This block is a fixed, identical cost paid by EVERY session. The long-form version was 433 bytes
18
+ * on a `reticle_query` whose actual answer was 259 — 57% of the first call of every session spent
19
+ * re-explaining something that never varies. Measured at 815 → 1058 average observation tokens, and
20
+ * the benchmark's fresh-session-per-scenario shape pays it ten times over.
21
+ *
22
+ * Any edit here is a per-session tax on every user: say it in as few words as still work.
23
+ */
24
+ export declare const SESSION_LEASE_NOTICE = "When you stop driving, call reticle_session {action:\"yield\", mode:\"waiting\"|\"ask\"} \u2014 the panel reads \"live\" until you do. {action:\"end\"} when the task is done; it revives on your next action.";
25
+ export declare function buildSessionLease(sessionId: string, openedAt: number): SessionLease;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Kept SHORT on purpose, and this is the reason to read before editing it.
3
+ *
4
+ * This block is a fixed, identical cost paid by EVERY session. The long-form version was 433 bytes
5
+ * on a `reticle_query` whose actual answer was 259 — 57% of the first call of every session spent
6
+ * re-explaining something that never varies. Measured at 815 → 1058 average observation tokens, and
7
+ * the benchmark's fresh-session-per-scenario shape pays it ten times over.
8
+ *
9
+ * Any edit here is a per-session tax on every user: say it in as few words as still work.
10
+ */
11
+ export const SESSION_LEASE_NOTICE = 'When you stop driving, call reticle_session {action:"yield", mode:"waiting"|"ask"} — the panel reads "live" until you do. {action:"end"} when the task is done; it revives on your next action.';
12
+ export function buildSessionLease(sessionId, openedAt) {
13
+ return { sessionId, opened_at: openedAt, IMPORTANT: SESSION_LEASE_NOTICE };
14
+ }
@@ -10,11 +10,6 @@ interface ResolveScope {
10
10
  }
11
11
  /** The scheme://host:port of a URL, or undefined if it can't be parsed. Used to compare origins. */
12
12
  export declare function originOf(url: string | undefined): string | undefined;
13
- /**
14
- * Owns the set of connected browser sessions and the smart auto-selection that resolves which one a
15
- * tool targets when the agent omits an explicit sessionId. Extracted from session.ts so each file
16
- * stays one cohesive unit (Session = one tab; SessionManager = the registry over all tabs).
17
- */
18
13
  export declare class SessionManager {
19
14
  #private;
20
15
  /** Set the active project's default resolve scope (called once at daemon wiring). */
@@ -26,20 +21,13 @@ export declare class SessionManager {
26
21
  /** Every connected session — used by the liveness reaper to sweep for idle/disconnected ones. */
27
22
  all(): Session[];
28
23
  count(): number;
29
- /**
30
- * Resolve the target session. With an explicit id, returns it. With none and exactly
31
- * one connected, returns that.
32
- *
33
- * With none and multiple connected, applies smart auto-selection:
34
- * 1. Prefer non-throttled sessions (not hidden + recently heard from).
35
- * 2. Within each tier, prefer lowest lastSeenMs (most recently active SDK heartbeat).
36
- * 3. If two or more non-throttled sessions are within 1 s of each other, throw —
37
- * genuinely ambiguous, agent must specify sessionId.
38
- * 4. If ALL sessions are throttled (e.g. user is working in their editor on another
39
- * desktop), skip the gap check and pick the freshest heartbeat. This lets the agent
40
- * keep working in the background without requiring sessionId every time.
41
- */
24
+ /** Record a bridge-initiated close so `resolve` can explain a session that vanished. */
25
+ noteClosure(reason: string, at: number): void;
26
+ /** The most recent bridge-initiated close, if any. */
27
+ lastClosure(): {
28
+ at: number;
29
+ reason: string;
30
+ } | undefined;
42
31
  resolve(sessionId?: string, scope?: ResolveScope): Session;
43
32
  }
44
33
  export {};
45
- //# sourceMappingURL=session-manager.d.ts.map
@@ -42,6 +42,8 @@ function scopeMissError(scope) {
42
42
  * tool targets when the agent omits an explicit sessionId. Extracted from session.ts so each file
43
43
  * stays one cohesive unit (Session = one tab; SessionManager = the registry over all tabs).
44
44
  */
45
+ /** How many bridge-initiated closes to remember for diagnosis. */
46
+ const MAX_REMEMBERED_CLOSURES = 5;
45
47
  export class SessionManager {
46
48
  #sessions = new Map();
47
49
  /**
@@ -91,6 +93,29 @@ export class SessionManager {
91
93
  * desktop), skip the gap check and pick the freshest heartbeat. This lets the agent
92
94
  * keep working in the background without requiring sessionId every time.
93
95
  */
96
+ /**
97
+ * Why a session recently went away, when the bridge closed it rather than the tab.
98
+ *
99
+ * The bridge enforces a message-rate cap and closes the socket on breach with `1008 message rate
100
+ * exceeded` — a policy violation, so the SDK does not retry. The app keeps running and Reticle is
101
+ * blind from that moment. Measured on the bench app: 2600 requests fired in one tick disconnected
102
+ * the session permanently, and the only trace was a line in the PAGE console, which no agent reads.
103
+ *
104
+ * Without this the agent is told "no browser session connected — check your app is running with
105
+ * @reticlehq/browser enabled", which is precisely wrong: the app IS running and instrumented. It
106
+ * was hung up on. Keeping the last few reasons turns an unexplained disappearance into a fact.
107
+ */
108
+ #recentClosures = [];
109
+ /** Record a bridge-initiated close so `resolve` can explain a session that vanished. */
110
+ noteClosure(reason, at) {
111
+ this.#recentClosures.push({ at, reason });
112
+ if (this.#recentClosures.length > MAX_REMEMBERED_CLOSURES)
113
+ this.#recentClosures.shift();
114
+ }
115
+ /** The most recent bridge-initiated close, if any. */
116
+ lastClosure() {
117
+ return this.#recentClosures[this.#recentClosures.length - 1];
118
+ }
94
119
  resolve(sessionId, scope) {
95
120
  if (sessionId !== undefined) {
96
121
  const found = this.#sessions.get(sessionId);
@@ -101,7 +126,10 @@ export class SessionManager {
101
126
  return found;
102
127
  }
103
128
  if (this.#sessions.size === 0) {
104
- throw new Error(NO_SESSION_CONNECTED_ERROR);
129
+ const closure = this.lastClosure();
130
+ throw new Error(closure === undefined
131
+ ? NO_SESSION_CONNECTED_ERROR
132
+ : `${NO_SESSION_CONNECTED_ERROR} NOTE: the bridge closed a session recently — "${closure.reason}". The app is probably still running; it was disconnected, and the SDK does not retry after a policy close. Reload the page to reconnect.`);
105
133
  }
106
134
  // Scope to the agent's active project FIRST, so a stray tab from another app/origin (e.g. a
107
135
  // leftover dashboard on a different port) is structurally unselectable — it never enters the
@@ -153,4 +181,3 @@ export class SessionManager {
153
181
  return best.s;
154
182
  }
155
183
  }
156
- //# sourceMappingURL=session-manager.js.map
@@ -32,4 +32,3 @@ export declare const RETICLE_LOOP_GUIDE: string;
32
32
  */
33
33
  export declare function waitForReady(opts: WaitForReadyOptions): Promise<boolean>;
34
34
  export {};
35
- //# sourceMappingURL=session-readiness.d.ts.map
@@ -6,10 +6,10 @@ const DEFAULT_POLL_MS = 100;
6
6
  */
7
7
  export const RETICLE_LOOP_GUIDE = 'Reticle loop — LOOK: reticle_snapshot / reticle_query / reticle_inspect · ACT: reticle_act (or reticle_act_and_wait) · ' +
8
8
  'OBSERVE: reticle_observe / reticle_wait_for / reticle_network / reticle_console · ASSERT: reticle_assert over program ' +
9
- 'truth, not just the DOM · REGRESS: reticle_record_start → reticle_replay, or reticle_flow_verify for the whole ' +
10
- 'suite. The human can flag bugs from the panel — drain them with reticle_review and resolve each once fixed. ' +
9
+ 'truth, not just the DOM · REGRESS: reticle_record{action:"start"} → reticle_replay, or reticle_flow_verify for the whole ' +
10
+ 'suite. The human can flag bugs from the panel — drain them with reticle_session{action:"review"} and resolve each once fixed. ' +
11
11
  'MANDATORY: the moment you stop driving — finishing your reply or waiting on the human — call reticle_session {action:"yield"} ' +
12
- '(mode:"waiting", or mode:"ask" with the question) so the panel shows your real state; reticle_end_session ' +
12
+ '(mode:"waiting", or mode:"ask" with the question) so the panel shows your real state; reticle_session{action:"end"} ' +
13
13
  'only when the whole task is done. Never leave the panel reading "live" when you have actually stopped.';
14
14
  /**
15
15
  * Resolve `true` as soon as at least one session is connected, or `false` if the timeout elapses
@@ -29,4 +29,3 @@ export async function waitForReady(opts) {
29
29
  return true;
30
30
  }
31
31
  }
32
- //# sourceMappingURL=session-readiness.js.map
@@ -34,4 +34,3 @@ export declare class SessionReaper {
34
34
  start(): void;
35
35
  stop(): void;
36
36
  }
37
- //# sourceMappingURL=session-reaper.d.ts.map
@@ -91,4 +91,3 @@ export class SessionReaper {
91
91
  this.#timer = undefined;
92
92
  }
93
93
  }
94
- //# sourceMappingURL=session-reaper.js.map
@@ -15,4 +15,3 @@ export interface RecommendationInputs {
15
15
  * live tab is still scriptable, so blur alone does not trigger it. Pure.
16
16
  */
17
17
  export declare function buildSessionRecommendation(inputs: RecommendationInputs): string | undefined;
18
- //# sourceMappingURL=session-recommendation.d.ts.map
@@ -11,4 +11,3 @@ export function buildSessionRecommendation(inputs) {
11
11
  return UNSCRIPTABLE_TAB_RECOMMENDATION;
12
12
  return undefined;
13
13
  }
14
- //# sourceMappingURL=session-recommendation.js.map
@@ -6,4 +6,3 @@ import type { ToolDef } from '../tools/tools.js';
6
6
  * for the app: raise it for a slow app, lower it for a quick check.
7
7
  */
8
8
  export declare const SESSION_TOOLS: ToolDef[];
9
- //# sourceMappingURL=session-tools.d.ts.map
@@ -11,12 +11,12 @@ import { asNumber, asString } from '../tools/tools-helpers.js';
11
11
  export const SESSION_TOOLS = [
12
12
  {
13
13
  name: ReticleTool.SESSION_TUNE,
14
- description: 'Tune the presenter session for this app. { idleEndMs } sets how long the session stays open after you go quiet before the panel shows the human you are WAITING (your turn). Default 5min — the SLOW backstop; signal handback IMMEDIATELY with reticle_yield instead of waiting for this. Lower it for snappier auto-handback, raise it for a slow app where long gaps between your tool calls are normal. Enforced SERVER-SIDE (immune to background-tab throttling); it also fires if you (the MCP client) disconnect — so a forgotten or crashed session never leaves the HUD reading "live". Going quiet then acting again revives the session automatically. Returns { applied, idleEndMs }.',
14
+ description: 'Tune the presenter session for this app. { idleEndMs } sets how long the session stays open after you go quiet before the panel shows the human you are WAITING (your turn). Default 5min — the SLOW backstop; signal handback IMMEDIATELY with reticle_session{action:"yield"} instead of waiting for this. Lower it for snappier auto-handback, raise it for a slow app where long gaps between your tool calls are normal. Enforced SERVER-SIDE (immune to background-tab throttling); it also fires if you (the MCP client) disconnect — so a forgotten or crashed session never leaves the HUD reading "live". Going quiet then acting again revives the session automatically. Returns { applied, idleEndMs }.',
15
15
  inputSchema: {
16
16
  idleEndMs: z
17
17
  .number()
18
18
  .optional()
19
- .describe('Idle window in milliseconds after which the panel shows WAITING (your turn). Default: 300000 (5 min) — the slow backstop; prefer reticle_yield. Raise for slow apps.'),
19
+ .describe('Idle window in milliseconds after which the panel shows WAITING (your turn). Default: 300000 (5 min) — the slow backstop; prefer reticle_session{action:"yield"}. Raise for slow apps.'),
20
20
  sessionId: z
21
21
  .string()
22
22
  .optional()
@@ -40,4 +40,3 @@ export const SESSION_TOOLS = [
40
40
  },
41
41
  },
42
42
  ];
43
- //# sourceMappingURL=session-tools.js.map
@@ -1,4 +1,8 @@
1
1
  import type { WebSocket } from 'ws';
2
+ import { LastAct } from './last-act.js';
3
+ import { type PageRuntime } from './command-timeout.js';
4
+ import { type SessionHealth } from './session-health.js';
5
+ export type { SessionHealth };
2
6
  import { PresenterTone, SessionState, type CommandResult, type HelloMessage, type HumanControlData, type ReticleEvent } from '@reticlehq/core';
3
7
  import type { JournalReader, JournalRecorder } from '../journal/journal-recorder.js';
4
8
  import { type EventQueryOptions } from '../journal/journal-query.js';
@@ -6,36 +10,9 @@ import { type AmbientCounts } from '../journal/ambient.js';
6
10
  import { type InboxMessage } from './live-control.js';
7
11
  export type { InboxMessage } from './live-control.js';
8
12
  import { type ReviewMark } from './review-store.js';
9
- export interface SessionInfo {
10
- sessionId: string;
11
- url: string;
12
- /** Stable build-stamped project identity; absent for v1.0 SDKs that don't send it. */
13
- projectId?: string;
14
- title: string;
15
- adapters: string[];
16
- hasCapabilities: boolean;
17
- /** ms since the SDK last reported anything (silence ⇒ likely throttled). */
18
- lastSeenMs: number;
19
- hidden: boolean;
20
- focused: boolean;
21
- throttled: boolean;
22
- /** present only when hidden/throttled — points at the `reticle drive` escape hatch. */
23
- recommendation?: string;
24
- stale?: boolean;
25
- cleanup_suggestion?: string;
26
- /** present only when the human has flagged bugs on this tab — count of pending review marks. */
27
- pendingMarks?: number;
28
- /** present with pendingMarks — nudges the agent to drain them with reticle_review. */
29
- review_suggestion?: string;
30
- }
31
- /** The health block spliced onto act/assert results. */
32
- export interface SessionHealth {
33
- lastSeenMs: number;
34
- throttled: boolean;
35
- focused: boolean;
36
- /** present only when hidden/throttled — points at the `reticle drive` escape hatch. */
37
- recommendation?: string;
38
- }
13
+ import { type SessionLease } from './session-lease.js';
14
+ import type { SessionInfo } from './session-info.js';
15
+ export type { SessionInfo } from './session-info.js';
39
16
  type Clock = () => number;
40
17
  /**
41
18
  * One connected browser tab. Owns its socket, a ring buffer of observations, and the
@@ -57,8 +34,16 @@ export declare class Session {
57
34
  touch(): void;
58
35
  /** ms since the SDK last reported anything (distinct from elapsed-since-connect). */
59
36
  lastSeenMs(): number;
60
- /** Record the latest page visibility/focus state from a PAGE_HEALTH event. */
61
- applyHealth(hidden: boolean, focused: boolean): void;
37
+ /**
38
+ * Record the latest page visibility/focus state from a PAGE_HEALTH event.
39
+ *
40
+ * `runtime` is optional so an older SDK (which does not report it) still works — it simply loses
41
+ * the desktop-specific timeout diagnosis rather than breaking.
42
+ */
43
+ applyHealth(hidden: boolean, focused: boolean, runtime?: string, engine?: string): void;
44
+ /** The shell (web/electron/tauri) and rendering engine the SDK reported. Undefined on an older SDK. */
45
+ get runtime(): PageRuntime | undefined;
46
+ get engine(): string | undefined;
62
47
  /** Throttled if the tab is hidden OR we have not heard from it recently. */
63
48
  throttled(): boolean;
64
49
  /** The attachable health block — single source of truth for the tools. */
@@ -68,7 +53,9 @@ export declare class Session {
68
53
  staleMs(): number;
69
54
  /** Re-stamp an incoming event with server-relative time, buffer it, and fan out. */
70
55
  pushEvent(event: ReticleEvent, byteSize?: number): void;
71
- /** Latest count per blind-spot kind; survives buffer eviction. See ObservedState for why. */
56
+ recordActedRef(ref: string): void;
57
+ actedRefs(): ReadonlySet<string>;
58
+ noteRateLimited(dropped: number): void;
72
59
  blindSpots(): Readonly<Record<string, number>>;
73
60
  /** Learned ambient-churn counts (PredicateSession hook the settle oracle reads). */
74
61
  ambientCounts(): AmbientCounts;
@@ -99,16 +86,12 @@ export declare class Session {
99
86
  flushJournal(): Promise<void>;
100
87
  eventsSince(cursor: number): ReticleEvent[];
101
88
  /**
102
- * Honesty: remember the event cursor of the most recent act so wait_for/assert can default their
103
- * evaluation floor to it — a signal buffered before this act can never fake a later pass.
89
+ * What the most recent act was: its cursor, its source, and what it changed inside its target.
90
+ *
91
+ * Exposed as the object rather than six pass-through methods — act writes to it and observe reads
92
+ * from it, and the split between those two tool calls is the whole reason it exists.
104
93
  */
105
- markActCursor(cursor: number): void;
106
- /** The cursor of the last act, or undefined if nothing has acted yet. */
107
- lastActCursor(): number | undefined;
108
- /** Remember where the last acted control is written (`file:line`), for failures with no element. */
109
- markActSource(source: string | undefined): void;
110
- /** Where the last acted control is written, or undefined if nothing has acted yet. */
111
- lastActSource(): string | undefined;
94
+ readonly lastAct: LastAct;
112
95
  /**
113
96
  * Stamp the wall-clock of the latest AGENT command (called whenever a tool resolves this session).
114
97
  * If the reaper had auto-ended the session, a fresh command means the agent is alive again, so the
@@ -177,16 +160,8 @@ export declare class Session {
177
160
  pushPresenter(state: SessionState, text?: string, tone?: PresenterTone): void;
178
161
  /** Fire-and-forget a narration row to the live panel (so a resolved mark shows "✓ fixed"). */
179
162
  pushNarration(text: string): void;
180
- /**
181
- * Returns the one-time session lease block on the very first agent command, then undefined
182
- * forever after. The lease carries an IMPORTANT reminder to call reticle_end_session. Coding agents
183
- * (Claude Code, Codex) read tool results — they will see this and remember to clean up.
184
- */
185
- takeSessionLease(): {
186
- sessionId: string;
187
- opened_at: number;
188
- IMPORTANT: string;
189
- } | undefined;
163
+ /** The one-time lease block on the first agent command, then undefined forever after. */
164
+ takeSessionLease(): SessionLease | undefined;
190
165
  /**
191
166
  * Returns a human-readable age warning after SESSION_LEASE.WARN_AFTER_MS (10 min), else undefined.
192
167
  * Spliced onto every session-bound tool result so the agent is passively reminded to clean up
@@ -200,4 +175,3 @@ export declare class Session {
200
175
  * units under the file-size cap.
201
176
  */
202
177
  export { SessionManager } from './session-manager.js';
203
- //# sourceMappingURL=session.d.ts.map