@reticlehq/server 3.1.0 → 3.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 (384) hide show
  1. package/SKILL.md +30 -28
  2. package/dist/command/cli/adhoc-suite.d.ts +19 -0
  3. package/dist/command/cli/adhoc-suite.js +88 -0
  4. package/dist/command/cli/adhoc-verdict.d.ts +23 -2
  5. package/dist/command/cli/adhoc-verdict.js +18 -10
  6. package/dist/command/cli/auth/device-flow.d.ts +2 -2
  7. package/dist/command/cli/cli-doctor.js +37 -5
  8. package/dist/command/cli/cli-flow-commands.d.ts +2 -1
  9. package/dist/command/cli/cli-kill.js +1 -1
  10. package/dist/command/cli/cli-parse-grammar.d.ts +7 -0
  11. package/dist/command/cli/cli-parse-grammar.js +7 -0
  12. package/dist/command/cli/cli-parse-verify.d.ts +2 -5
  13. package/dist/command/cli/cli-parse-verify.js +86 -13
  14. package/dist/command/cli/cli-parse.d.ts +8 -1
  15. package/dist/command/cli/cli-parse.js +38 -7
  16. package/dist/command/cli/cli-verify.d.ts +59 -0
  17. package/dist/command/cli/cli-verify.js +131 -19
  18. package/dist/command/cli/cloud-cli.js +7 -6
  19. package/dist/command/cli/cloud-kit.d.ts +0 -2
  20. package/dist/command/cli/cloud-kit.js +3 -7
  21. package/dist/command/cli/config/config-discovery.d.ts +12 -0
  22. package/dist/command/cli/config/config-discovery.js +19 -0
  23. package/dist/command/cli/doctor/doctor-rows.d.ts +12 -0
  24. package/dist/command/cli/doctor/doctor-rows.js +12 -0
  25. package/dist/command/cli/doctor/doctor-sessions-line.d.ts +2 -1
  26. package/dist/command/cli/drive/drive-command.js +1 -1
  27. package/dist/command/cli/launch/cli-launch.d.ts +3 -23
  28. package/dist/command/cli/launch/cli-launch.js +29 -70
  29. package/dist/command/cli/lifecycle/daemon-lifecycle.d.ts +33 -0
  30. package/dist/command/cli/lifecycle/daemon-lifecycle.js +198 -0
  31. package/dist/command/cli/mcp-command.js +5 -3
  32. package/dist/command/cli/ports/resolve/cli-port.d.ts +15 -1
  33. package/dist/command/cli/ports/resolve/cli-port.js +50 -2
  34. package/dist/command/cli/report-command.d.ts +16 -0
  35. package/dist/command/cli/report-command.js +97 -0
  36. package/dist/command/cli/status/status-lines.d.ts +28 -0
  37. package/dist/command/cli/status/status-lines.js +117 -0
  38. package/dist/command/cli.d.ts +1 -1
  39. package/dist/command/cli.js +29 -177
  40. package/dist/command/daemon/binding/daemon-status-probe.d.ts +32 -0
  41. package/dist/command/daemon/binding/daemon-status-probe.js +93 -0
  42. package/dist/command/daemon/binding/loopback-reach.d.ts +42 -0
  43. package/dist/command/daemon/binding/loopback-reach.js +63 -0
  44. package/dist/command/daemon/binding/port-presence.d.ts +1 -1
  45. package/dist/command/daemon/daemon-resilience.d.ts +13 -1
  46. package/dist/command/daemon/daemon-resilience.js +12 -1
  47. package/dist/command/daemon/daemon.d.ts +2 -11
  48. package/dist/command/daemon/daemon.js +8 -11
  49. package/dist/command/daemon/idle-shutdown.d.ts +2 -1
  50. package/dist/command/daemon/lifetime/heartbeat.d.ts +8 -0
  51. package/dist/command/daemon/lifetime/heartbeat.js +10 -0
  52. package/dist/command/daemon/lifetime/log-cap.d.ts +68 -0
  53. package/dist/command/daemon/lifetime/log-cap.js +115 -0
  54. package/dist/command/setup/agent-notice-memory.d.ts +16 -0
  55. package/dist/command/setup/agent-notice-memory.js +65 -0
  56. package/dist/command/setup/bringup/dev-server-wait.d.ts +1 -0
  57. package/dist/command/setup/bringup/dev-server-wait.js +16 -0
  58. package/dist/command/setup/bringup/ensure-daemon.js +1 -1
  59. package/dist/command/setup/init/init-host.js +8 -0
  60. package/dist/command/setup/init/init-runtime.js +13 -1
  61. package/dist/command/setup/node-effects.js +1 -1
  62. package/dist/command/setup/probe/page-probe.js +9 -2
  63. package/dist/command/setup/run-setup.d.ts +25 -7
  64. package/dist/command/setup/run-setup.js +51 -9
  65. package/dist/command/setup/setup-command.js +31 -3
  66. package/dist/command/setup/terminal/confirm.js +2 -1
  67. package/dist/command/update/updater.d.ts +27 -0
  68. package/dist/command/update/updater.js +35 -2
  69. package/dist/features/crawl/crawl-tools.js +3 -1
  70. package/dist/features/crawl/crawl.d.ts +2 -0
  71. package/dist/features/crawl/crawl.js +3 -1
  72. package/dist/features/harness/drive-report.d.ts +73 -0
  73. package/dist/features/harness/drive-report.js +196 -0
  74. package/dist/features/harness/driver.js +29 -8
  75. package/dist/features/harness/drivers.d.ts +19 -0
  76. package/dist/features/harness/drivers.js +19 -0
  77. package/dist/features/harness/fill-values.d.ts +67 -0
  78. package/dist/features/harness/fill-values.js +153 -0
  79. package/dist/features/harness/jev-driver.d.ts +188 -0
  80. package/dist/features/harness/jev-driver.js +661 -0
  81. package/dist/features/harness/openai-driver.d.ts +46 -0
  82. package/dist/features/harness/openai-driver.js +197 -0
  83. package/dist/features/harness/platform-config.d.ts +62 -0
  84. package/dist/features/harness/platform-config.js +97 -0
  85. package/dist/features/visual/visual-tools.js +26 -2
  86. package/dist/index.d.ts +1 -1
  87. package/dist/index.js +80 -130
  88. package/dist/judgement/capsule/capsule-store.d.ts +31 -2
  89. package/dist/judgement/capsule/capsule-store.js +58 -6
  90. package/dist/judgement/capsule/capsule.js +5 -0
  91. package/dist/judgement/capsule/causal-summary.d.ts +13 -1
  92. package/dist/judgement/capsule/causal-summary.js +7 -0
  93. package/dist/judgement/domain/domain-model.js +38 -9
  94. package/dist/judgement/domain/domain-tools.js +4 -2
  95. package/dist/judgement/outcome/assertion-integrity.d.ts +3 -3
  96. package/dist/judgement/phenomena/phenomena.d.ts +2 -1
  97. package/dist/judgement/runs/artifact/gap-report.d.ts +17 -0
  98. package/dist/judgement/runs/artifact/gap-report.js +46 -0
  99. package/dist/judgement/runs/artifact/gap-summary.d.ts +58 -0
  100. package/dist/judgement/runs/artifact/gap-summary.js +85 -0
  101. package/dist/judgement/runs/artifact/render-report.js +4 -1
  102. package/dist/judgement/runs/artifact/to-artifact.d.ts +7 -2
  103. package/dist/judgement/runs/artifact/to-artifact.js +1 -1
  104. package/dist/judgement/runs/context-tools.js +21 -3
  105. package/dist/judgement/runs/drive-run.js +7 -2
  106. package/dist/judgement/runs/verification-sync.d.ts +2 -2
  107. package/dist/judgement/runs/verification-sync.js +9 -2
  108. package/dist/language/flows/affected-tools.js +6 -3
  109. package/dist/language/flows/annotate-notes/annotate.d.ts +0 -15
  110. package/dist/language/flows/annotate-notes/annotate.js +66 -18
  111. package/dist/language/flows/flow-anchor.d.ts +12 -0
  112. package/dist/language/flows/flow-anchor.js +20 -0
  113. package/dist/language/flows/flow-expect-grammar.d.ts +2 -2
  114. package/dist/language/flows/flow-expect-grammar.js +92 -11
  115. package/dist/language/flows/flow-intent.js +1 -1
  116. package/dist/language/flows/flow-learning.d.ts +3 -0
  117. package/dist/language/flows/flow-learning.js +39 -8
  118. package/dist/language/flows/flow-replay-run.d.ts +55 -10
  119. package/dist/language/flows/flow-replay-run.js +217 -58
  120. package/dist/language/flows/flow-replay-types.d.ts +9 -0
  121. package/dist/language/flows/flow-replay.d.ts +29 -11
  122. package/dist/language/flows/flow-replay.js +221 -203
  123. package/dist/language/flows/flow-result.d.ts +18 -1
  124. package/dist/language/flows/flow-result.js +18 -2
  125. package/dist/language/flows/flow-step-runners.d.ts +26 -10
  126. package/dist/language/flows/flow-step-runners.js +20 -4
  127. package/dist/language/flows/flow-store-for-session.d.ts +2 -1
  128. package/dist/language/flows/flow-success.d.ts +21 -6
  129. package/dist/language/flows/flow-success.js +50 -138
  130. package/dist/language/flows/flow-tools.js +8 -4
  131. package/dist/language/flows/flows.d.ts +15 -10
  132. package/dist/language/flows/flows.js +17 -4
  133. package/dist/language/flows/heal.d.ts +9 -1
  134. package/dist/language/flows/heal.js +24 -2
  135. package/dist/language/flows/learned-sources.d.ts +21 -0
  136. package/dist/language/flows/learned-sources.js +84 -0
  137. package/dist/language/flows/narrow-write.d.ts +4 -4
  138. package/dist/language/flows/recording/recording-backtrack.d.ts +0 -7
  139. package/dist/language/flows/recording/recording-backtrack.js +1 -1
  140. package/dist/language/flows/recording/replay-halt.d.ts +2 -1
  141. package/dist/language/flows/recording/tape/recordings.d.ts +2 -2
  142. package/dist/language/flows/replay.js +13 -9
  143. package/dist/language/flows/stores/annotation-store.d.ts +5 -5
  144. package/dist/language/flows/stores/assertion-tiers-store.js +2 -3
  145. package/dist/language/flows/stores/flake-store.js +2 -3
  146. package/dist/language/flows/suite/coverage.d.ts +1 -1
  147. package/dist/language/flows/suite/parallel-suite.d.ts +2 -1
  148. package/dist/language/flows/suite-selection.d.ts +15 -1
  149. package/dist/language/flows/suite-selection.js +1 -1
  150. package/dist/language/flows/verify-change-tools.js +21 -4
  151. package/dist/memory/cloud/account-state.d.ts +1 -1
  152. package/dist/memory/cloud/account-state.js +5 -4
  153. package/dist/memory/cloud/cloud-config.d.ts +9 -0
  154. package/dist/memory/cloud/cloud-config.js +9 -0
  155. package/dist/memory/cloud/cloud-sync.d.ts +7 -4
  156. package/dist/memory/cloud/cloud-sync.js +11 -6
  157. package/dist/memory/cloud/harness-config.d.ts +12 -0
  158. package/dist/memory/cloud/harness-config.js +58 -0
  159. package/dist/memory/cloud/harness-offer.d.ts +44 -0
  160. package/dist/memory/cloud/harness-offer.js +146 -0
  161. package/dist/memory/cloud/harness-switch.d.ts +11 -0
  162. package/dist/memory/cloud/harness-switch.js +53 -0
  163. package/dist/memory/cloud/sync-cycle.d.ts +12 -0
  164. package/dist/memory/cloud/sync-cycle.js +29 -4
  165. package/dist/memory/cloud/sync-daemon.d.ts +35 -2
  166. package/dist/memory/cloud/sync-daemon.js +45 -0
  167. package/dist/memory/cloud/sync-disk.js +11 -6
  168. package/dist/memory/impact/impact-recorder.d.ts +8 -0
  169. package/dist/memory/impact/impact-recorder.js +2 -1
  170. package/dist/memory/impact/impact-store.d.ts +5 -0
  171. package/dist/memory/impact/impact-store.js +25 -0
  172. package/dist/memory/intent/inline-intent.js +8 -3
  173. package/dist/memory/intent/intent-shard-store.d.ts +33 -47
  174. package/dist/memory/intent/intent-shard-store.js +253 -141
  175. package/dist/memory/intent/intent-shard.d.ts +22 -23
  176. package/dist/memory/intent/intent-shard.js +1 -1
  177. package/dist/memory/intent/intent-store.d.ts +13 -8
  178. package/dist/memory/intent/intent-store.js +46 -90
  179. package/dist/memory/intent/intent-tools.js +34 -23
  180. package/dist/memory/journal/ambient-store.js +2 -3
  181. package/dist/memory/journal/attach-journal.d.ts +11 -0
  182. package/dist/memory/journal/attach-journal.js +1 -1
  183. package/dist/memory/journal/deviation-report.js +4 -1
  184. package/dist/memory/journal/deviation-service.js +10 -2
  185. package/dist/memory/journal/drive-flow.d.ts +2 -2
  186. package/dist/memory/journal/drive-flow.js +21 -12
  187. package/dist/memory/journal/envelope-store.js +2 -3
  188. package/dist/memory/journal/journal-query.d.ts +35 -1
  189. package/dist/memory/journal/journal-query.js +46 -0
  190. package/dist/memory/journal/journal-recorder.d.ts +71 -2
  191. package/dist/memory/journal/journal-recorder.js +45 -7
  192. package/dist/memory/journal/on-disk/retain-policy.d.ts +34 -0
  193. package/dist/memory/journal/on-disk/retain-policy.js +44 -0
  194. package/dist/memory/journal/on-disk/retention.d.ts +91 -2
  195. package/dist/memory/journal/on-disk/retention.js +181 -11
  196. package/dist/memory/journal/on-disk/startup-maintenance.d.ts +42 -0
  197. package/dist/memory/journal/on-disk/startup-maintenance.js +14 -0
  198. package/dist/memory/journal/on-disk/workspace-gitignore.d.ts +0 -2
  199. package/dist/memory/journal/on-disk/workspace-gitignore.js +6 -38
  200. package/dist/memory/journal/on-disk/workspace-tiers.d.ts +52 -0
  201. package/dist/memory/journal/on-disk/workspace-tiers.js +88 -0
  202. package/dist/memory/journal/route-template.d.ts +22 -0
  203. package/dist/memory/journal/route-template.js +44 -0
  204. package/dist/memory/journal/self-observation.d.ts +3 -0
  205. package/dist/memory/journal/self-observation.js +67 -0
  206. package/dist/memory/journal/session-end.d.ts +17 -4
  207. package/dist/memory/journal/session-end.js +85 -7
  208. package/dist/memory/journal/session-journal.d.ts +122 -5
  209. package/dist/memory/journal/session-journal.js +489 -32
  210. package/dist/memory/project/artifact-root-resolver.d.ts +3 -0
  211. package/dist/memory/project/artifact-root-resolver.js +89 -0
  212. package/dist/memory/project/artifact-root.d.ts +39 -2
  213. package/dist/memory/project/artifact-root.js +58 -1
  214. package/dist/memory/project/baselines.d.ts +1 -1
  215. package/dist/memory/project/dir/fill-value-store.d.ts +32 -0
  216. package/dist/memory/project/dir/fill-value-store.js +88 -0
  217. package/dist/memory/project/dir/reticle-dir.d.ts +15 -5
  218. package/dist/memory/project/dir/reticle-dir.js +11 -0
  219. package/dist/memory/project/fs/fs-port.d.ts +22 -1
  220. package/dist/memory/project/fs/fs-port.js +72 -5
  221. package/dist/memory/project/fs/write-atomic.d.ts +26 -0
  222. package/dist/memory/project/fs/write-atomic.js +48 -0
  223. package/dist/memory/project/learned-routes.d.ts +16 -2
  224. package/dist/memory/project/learned-routes.js +26 -10
  225. package/dist/memory/project/project-for-root.d.ts +30 -0
  226. package/dist/memory/project/project-for-root.js +43 -0
  227. package/dist/memory/project/project-tools.js +10 -5
  228. package/dist/memory/project/session-root.d.ts +35 -6
  229. package/dist/memory/project/session-root.js +70 -8
  230. package/dist/memory/recall/prior/connection-memory.d.ts +6 -0
  231. package/dist/memory/recall/prior/connection-memory.js +8 -0
  232. package/dist/memory/recall/registered-projects.d.ts +2 -1
  233. package/dist/portal/bridge/auth-failure-reason.d.ts +9 -0
  234. package/dist/portal/bridge/auth-failure-reason.js +20 -3
  235. package/dist/portal/bridge/bridge.d.ts +6 -1
  236. package/dist/portal/bridge/bridge.js +36 -2
  237. package/dist/portal/input/real-input.js +2 -1
  238. package/dist/portal/pool/browser-pool.d.ts +10 -0
  239. package/dist/portal/pool/browser-pool.js +10 -0
  240. package/dist/portal/pool/playwright-launcher.js +1 -0
  241. package/dist/portal/pool/pool-contract.d.ts +2 -0
  242. package/dist/portal/pool/storage-seed.d.ts +2 -1
  243. package/dist/portal/pool/zero-install.d.ts +27 -0
  244. package/dist/portal/pool/zero-install.js +54 -0
  245. package/dist/portal/realm/web-realm.js +6 -0
  246. package/dist/portal/session/dev-server/dev-server-probe.d.ts +2 -1
  247. package/dist/portal/session/dev-server/served-document.d.ts +21 -0
  248. package/dist/portal/session/dev-server/served-document.js +57 -0
  249. package/dist/portal/session/facts/background-traffic.d.ts +9 -0
  250. package/dist/portal/session/facts/background-traffic.js +25 -0
  251. package/dist/portal/session/facts/session-replaced.d.ts +19 -0
  252. package/dist/portal/session/facts/session-replaced.js +22 -0
  253. package/dist/portal/session/live-control-tools.js +48 -3
  254. package/dist/portal/session/no-session-diagnosis.d.ts +1 -0
  255. package/dist/portal/session/no-session-diagnosis.js +67 -60
  256. package/dist/portal/session/no-session-next-action.js +3 -2
  257. package/dist/portal/session/no-session-watch.js +14 -10
  258. package/dist/portal/session/presence/attachment-history.d.ts +13 -2
  259. package/dist/portal/session/rebind.d.ts +18 -0
  260. package/dist/portal/session/rebind.js +38 -0
  261. package/dist/portal/session/session-health.d.ts +61 -0
  262. package/dist/portal/session/session-health.js +40 -1
  263. package/dist/portal/session/session-info.d.ts +6 -0
  264. package/dist/portal/session/session-manager.d.ts +13 -0
  265. package/dist/portal/session/session-manager.js +42 -3
  266. package/dist/portal/session/session-successor.d.ts +11 -0
  267. package/dist/portal/session/session-successor.js +14 -1
  268. package/dist/portal/session/session-verdict-facts.d.ts +28 -0
  269. package/dist/portal/session/session-verdict-facts.js +15 -0
  270. package/dist/portal/session/session.d.ts +26 -10
  271. package/dist/portal/session/session.js +48 -49
  272. package/dist/status-payload.d.ts +12 -1
  273. package/dist/status-payload.js +4 -1
  274. package/dist/surface/http-server.js +3 -5
  275. package/dist/surface/mcp/faults/mcp-outage.d.ts +2 -1
  276. package/dist/surface/mcp/faults/mcp-outage.js +20 -4
  277. package/dist/surface/mcp/mcp-proxy.d.ts +10 -1
  278. package/dist/surface/mcp/mcp-proxy.js +23 -12
  279. package/dist/surface/mcp/mcp.d.ts +10 -1
  280. package/dist/surface/mcp/mcp.js +59 -29
  281. package/dist/surface/mcp/proxy/proxy-daemon-probe.d.ts +15 -2
  282. package/dist/surface/mcp/proxy/proxy-daemon-probe.js +22 -5
  283. package/dist/surface/mcp/proxy/proxy-log.d.ts +5 -11
  284. package/dist/surface/mcp/proxy/proxy-log.js +7 -22
  285. package/dist/surface/mcp/proxy-idle-exit.d.ts +2 -1
  286. package/dist/surface/mcp/server-instructions.js +12 -1
  287. package/dist/surface/tools/act/act-preflight.js +6 -1
  288. package/dist/surface/tools/act/already-true.d.ts +40 -0
  289. package/dist/surface/tools/act/already-true.js +36 -0
  290. package/dist/surface/tools/act/navigation/navigate-arrival.d.ts +6 -0
  291. package/dist/surface/tools/act/navigation/navigate-arrival.js +13 -0
  292. package/dist/surface/tools/act/sequence-grade.js +13 -0
  293. package/dist/surface/tools/act/settle-in-flight.d.ts +6 -2
  294. package/dist/surface/tools/act/settle-in-flight.js +29 -6
  295. package/dist/surface/tools/act-capsule.js +49 -8
  296. package/dist/surface/tools/act-tools.js +25 -24
  297. package/dist/surface/tools/args/numeric-bounds.d.ts +15 -2
  298. package/dist/surface/tools/args/numeric-bounds.js +30 -3
  299. package/dist/surface/tools/assert/assert-grade.js +14 -2
  300. package/dist/surface/tools/assert/assert-verdict.js +74 -21
  301. package/dist/surface/tools/browser-tools.js +4 -3
  302. package/dist/surface/tools/coverage-tools.js +5 -2
  303. package/dist/surface/tools/dynamic-tools.js +43 -46
  304. package/dist/surface/tools/error-recovery.d.ts +6 -0
  305. package/dist/surface/tools/error-recovery.js +15 -0
  306. package/dist/surface/tools/explore-tools.js +80 -7
  307. package/dist/surface/tools/feedback-tools.d.ts +2 -1
  308. package/dist/surface/tools/feedback-tools.js +50 -3
  309. package/dist/surface/tools/first-sentence.d.ts +24 -0
  310. package/dist/surface/tools/first-sentence.js +0 -0
  311. package/dist/surface/tools/harness-explore.d.ts +125 -1
  312. package/dist/surface/tools/harness-explore.js +401 -15
  313. package/dist/surface/tools/harness-plan.d.ts +76 -0
  314. package/dist/surface/tools/harness-plan.js +156 -0
  315. package/dist/surface/tools/harness-toolset.js +12 -1
  316. package/dist/surface/tools/invoke-tool.js +82 -9
  317. package/dist/surface/tools/lease-hint.d.ts +8 -0
  318. package/dist/surface/tools/lease-hint.js +10 -0
  319. package/dist/surface/tools/lease-tools.d.ts +16 -28
  320. package/dist/surface/tools/lease-tools.js +53 -5
  321. package/dist/surface/tools/lineage-tools.js +1 -1
  322. package/dist/surface/tools/live-call-text.d.ts +6 -0
  323. package/dist/surface/tools/live-call-text.js +36 -2
  324. package/dist/surface/tools/observe-tools.js +69 -15
  325. package/dist/surface/tools/read/query-windowed.d.ts +1 -1
  326. package/dist/surface/tools/read/query-windowed.js +1 -1
  327. package/dist/surface/tools/read-tools.js +1 -2
  328. package/dist/surface/tools/real-input-attempt.d.ts +0 -5
  329. package/dist/surface/tools/real-input-attempt.js +1 -1
  330. package/dist/surface/tools/tool-kit.d.ts +23 -3
  331. package/dist/surface/tools/tool-kit.js +6 -1
  332. package/dist/surface/tools/tool-surface.js +17 -5
  333. package/dist/surface/tools/tools-helpers.d.ts +8 -7
  334. package/dist/surface/tools/tools-helpers.js +11 -13
  335. package/dist/surface/tools/tools.js +70 -30
  336. package/dist/telemetry/bug-found.js +32 -2
  337. package/dist/telemetry/feedback-context.js +3 -3
  338. package/dist/telemetry/feedback-local.d.ts +1 -0
  339. package/dist/telemetry/feedback-local.js +1 -3
  340. package/dist/telemetry/feedback.d.ts +1 -1
  341. package/dist/telemetry/harness-drive.d.ts +6 -0
  342. package/dist/telemetry/harness-drive.js +39 -0
  343. package/dist/telemetry/hud-metrics.d.ts +32 -0
  344. package/dist/telemetry/hud-metrics.js +95 -0
  345. package/dist/telemetry/mcp-connection.d.ts +14 -1
  346. package/dist/telemetry/mcp-connection.js +17 -2
  347. package/dist/telemetry/onboarding-firsts.d.ts +30 -1
  348. package/dist/telemetry/onboarding-firsts.js +54 -12
  349. package/dist/telemetry/session-metrics.d.ts +5 -0
  350. package/dist/telemetry/session-metrics.js +15 -1
  351. package/dist/telemetry/verification-of.js +31 -3
  352. package/dist/wire-journal.d.ts +31 -0
  353. package/dist/wire-journal.js +100 -0
  354. package/docs/README.md +1 -0
  355. package/docs/agent-cheatsheet.md +7 -3
  356. package/docs/autodrive.md +42 -2
  357. package/docs/benchmarks.md +1 -1
  358. package/docs/capabilities.mdx +1 -1
  359. package/docs/cli/cloud.mdx +11 -9
  360. package/docs/cli/doctor.mdx +1 -0
  361. package/docs/cli/init.mdx +1 -0
  362. package/docs/cli/report.mdx +44 -0
  363. package/docs/cli/status.mdx +35 -20
  364. package/docs/cli.mdx +8 -18
  365. package/docs/desktop.mdx +1 -1
  366. package/docs/faq.mdx +1 -1
  367. package/docs/flows.md +11 -0
  368. package/docs/frameworks.mdx +113 -1
  369. package/docs/install-agentic.mdx +36 -0
  370. package/docs/install-manual.mdx +1 -1
  371. package/docs/packages/tauri.mdx +1 -1
  372. package/docs/packages.mdx +1 -1
  373. package/docs/predicates.mdx +144 -4
  374. package/docs/system-map.md +6 -4
  375. package/docs/telemetry.md +2 -1
  376. package/docs/token-efficiency.md +2 -2
  377. package/docs/tools/overview.mdx +1 -1
  378. package/docs/tools/query.mdx +10 -10
  379. package/docs/troubleshooting.mdx +8 -2
  380. package/docs/usage.md +2 -2
  381. package/docs/what-is-recorded.md +62 -0
  382. package/package.json +5 -5
  383. package/dist/judgement/outcome/predicate-to-expect.d.ts +0 -44
  384. package/dist/judgement/outcome/predicate-to-expect.js +0 -148
@@ -8,7 +8,7 @@ export declare const FEEDBACK_TOOLS: ToolDef[];
8
8
  * Delivered ONCE per server process. A prompt on every verification would be nagging, and a nagged
9
9
  * user opts out of telemetry entirely, which costs us the counters too.
10
10
  */
11
- export declare const FEEDBACK_PROMPT: {
11
+ declare const FEEDBACK_PROMPT: {
12
12
  readonly ask: "Ask the human, in your own words and only once: how did this verification go, and what would have made Reticle more useful? If they answer, file it with `reticle feedback` (they run it) or relay it yourself.";
13
13
  readonly command: "reticle feedback";
14
14
  };
@@ -33,3 +33,4 @@ export declare const VERDICT_TOOLS: ReadonlySet<string>;
33
33
  */
34
34
  export declare function takeFeedbackPrompt(toolName: string): typeof FEEDBACK_PROMPT | undefined;
35
35
  export declare function resetFeedbackPrompt(): void;
36
+ export {};
@@ -55,6 +55,15 @@ function sessionFacts(deps, sessionId) {
55
55
  return { driven };
56
56
  }
57
57
  }
58
+ /** Said when a report arrives with no body at all. Names both accepted fields so the retry can work. */
59
+ const NO_BODY_REASON = 'the report has no body — send it as `text` (or `summary`, which is the same field). Nothing was filed.';
60
+ /** `text`, or the `summary` alias, whichever arrived. Empty when neither did — the handler refuses. */
61
+ function feedbackBody(args) {
62
+ const text = asString(args['text'])?.trim();
63
+ if (text !== undefined && '' !== text)
64
+ return text;
65
+ return asString(args['summary'])?.trim() ?? '';
66
+ }
58
67
  export const FEEDBACK_TOOLS = [
59
68
  {
60
69
  name: ReticleTool.FEEDBACK,
@@ -72,8 +81,22 @@ export const FEEDBACK_TOOLS = [
72
81
  .describe('bug = a Reticle tool returned a wrong or broken result; gap = Reticle could not observe something you needed at all; ambiguity = the verification ran but you could not tell pass from fail; feature_request = something that does not exist and would have helped; improvement = something that exists but is awkward or inefficient; experience = something worked notably well and is worth keeping (pair it with `rating`).'),
73
82
  text: z
74
83
  .string()
75
- .min(1)
84
+ .optional()
76
85
  .describe('For a failure: the root-cause analysis — the call you made, what you expected, what you got, and why Reticle is at fault. For a request: what you want, in your own words.'),
86
+ /**
87
+ * `text` under the name agents reach for unprompted.
88
+ *
89
+ * Incident: field reports of a call carrying a summary and a trace coming back
90
+ * "String must contain at least 1 character(s)" and being lost. The body had been put in
91
+ * `summary` — a field this tool never had. The MCP SDK validates input BEFORE the handler, so
92
+ * a required `text` made those calls unreachable and unanswerable: no handler ran, nothing
93
+ * could explain the rejection, and the report was dropped.
94
+ *
95
+ * So `text` is optional and this is its alias; the handler takes whichever arrived and refuses
96
+ * — with both names in the reason — only when neither did. Widening the schema is what buys
97
+ * the chance to say anything at all.
98
+ */
99
+ summary: z.string().optional().describe('Alias for `text`; send either.'),
77
100
  need: z
78
101
  .string()
79
102
  .optional()
@@ -124,10 +147,26 @@ export const FEEDBACK_TOOLS = [
124
147
  model: 'claude-opus-4',
125
148
  },
126
149
  handler: async (deps, args) => {
150
+ // Refuse here rather than in core's schema: core validates a REPORT, which has one body field
151
+ // and knows nothing about the `summary` alias, so its rejection reads "String must contain at
152
+ // least 1 character(s)" and names neither field. That sentence is what agents were given when
153
+ // their report was dropped, and it is unactionable — the agent cannot tell which of eight
154
+ // arguments was wrong.
155
+ const body = feedbackBody(args);
156
+ if ('' === body) {
157
+ return {
158
+ sent: false,
159
+ accepted: false,
160
+ reason: NO_BODY_REASON,
161
+ redacted: [],
162
+ context: undefined,
163
+ note: 'NOT accepted (see reason). Tell the human what you found so it is not lost.',
164
+ };
165
+ }
127
166
  const receipt = await submitFeedback({
128
167
  source: FeedbackSource.AGENT,
129
168
  kind: asString(args['kind']),
130
- text: asString(args['text']) ?? '',
169
+ text: body,
131
170
  ...optionalText(args, 'trace'),
132
171
  ...optionalText(args, 'need'),
133
172
  ...optionalText(args, 'impact'),
@@ -157,7 +196,7 @@ export const FEEDBACK_TOOLS = [
157
196
  * Delivered ONCE per server process. A prompt on every verification would be nagging, and a nagged
158
197
  * user opts out of telemetry entirely, which costs us the counters too.
159
198
  */
160
- export const FEEDBACK_PROMPT = {
199
+ const FEEDBACK_PROMPT = {
161
200
  ask: 'Ask the human, in your own words and only once: how did this verification go, and what would have made Reticle more useful? If they answer, file it with `reticle feedback` (they run it) or relay it yourself.',
162
201
  command: 'reticle feedback',
163
202
  };
@@ -187,6 +226,14 @@ export const VERDICT_TOOLS = new Set([
187
226
  // inflate the count.
188
227
  ReticleTool.VERIFY,
189
228
  ReticleTool.RECONCILE,
229
+ // Replaying ONE saved flow proves a journey still works, which is a verification by any reading a
230
+ // user would give the word — and it was in neither the numerator nor the denominator. It matched
231
+ // no name tripwire (`/assert|verify/`), it declares no `verified` field for the shape guard to
232
+ // catch, and its own status vocabulary spells itself `ok | drift | error`, so the three
233
+ // independent things that could have noticed all said nothing. `verificationOf` maps that
234
+ // vocabulary; `error` stays UNKNOWN, because a flow that could not load is not a verdict about
235
+ // anybody's app.
236
+ ReticleTool.FLOW_REPLAY,
190
237
  ]);
191
238
  /**
192
239
  * Verifications between re-offers of the prompt, and how many times we will ever offer it.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The opening sentence of a tool description, for the two surfaces that show a summary.
3
+ *
4
+ * There were two copies of this, and only one of them knew about abbreviations. The MCP surface's
5
+ * copy masks `e.g.` and friends before looking for a sentence end; the tool catalogue's private
6
+ * copy did not, so `reticle_session` reached every agent as
7
+ *
8
+ * Drive or inspect the SESSION itself, chosen by action: "tune" adjusts the presenter session (e.g.
9
+ *
10
+ * and stopped there. Everything after the abbreviation was cut, including `"yield" hands the tab
11
+ * back to the human and is MANDATORY before you stop driving`. The catalogue is the surface an
12
+ * agent reads to find out what exists, so the one instruction the product calls mandatory was
13
+ * missing from the only place it would have been discovered.
14
+ *
15
+ * This is the same defect the MCP copy already carried a long comment about, reappearing in a
16
+ * second copy written without the fix. So there is one implementation now, and the thing the two
17
+ * callers genuinely disagree about -- how much room a line gets -- is a parameter rather than a
18
+ * reason to fork the logic again.
19
+ */
20
+ /** What the MCP surface allows a one-line description. */
21
+ export declare const MCP_SUMMARY_LENGTH = 160;
22
+ /** What the catalogue allows, which is tighter: it prints one line per tool, for every tool. */
23
+ export declare const CATALOGUE_SUMMARY_LENGTH = 140;
24
+ export declare function firstSentence(description: string, maxLength?: number): string;
@@ -8,7 +8,9 @@
8
8
  * deterministically with no model in the loop at all.
9
9
  */
10
10
  import type { ToolDeps } from './tool-kit.js';
11
- import { type HarnessResult, type ModelDriver } from '../../features/harness/harness.js';
11
+ import { type HarnessPlan } from './harness-plan.js';
12
+ import { type ConfigFetch } from '../../features/harness/platform-config.js';
13
+ import { type HarnessResult, type ModelDriver, type ToolOutcome } from '../../features/harness/harness.js';
12
14
  export interface ExploreOptions {
13
15
  /** Who to be, or what to accomplish. Appended to the standing instruction. */
14
16
  focus?: string;
@@ -16,13 +18,61 @@ export interface ExploreOptions {
16
18
  sessionId?: string;
17
19
  /** Hard ceiling on model turns. Bounds cost, not value — the drive is usable however it ends. */
18
20
  maxSteps?: number;
21
+ /**
22
+ * Which driver to use for THIS drive, overriding the environment.
23
+ *
24
+ * Per-call rather than only per-daemon because the question people actually have is comparative —
25
+ * "is the cheap driver good enough for my app?" — and answering it with an environment variable
26
+ * means restarting the daemon between arms, which is exactly the setup that let a stale daemon
27
+ * answer three runs of our own benchmark with one configuration.
28
+ */
29
+ driverName?: string;
19
30
  /** Injected for tests, and for anyone driving with a model this repo does not ship a binding for. */
20
31
  driver?: ModelDriver;
32
+ /**
33
+ * Skip asking the platform which driver this project prefers.
34
+ *
35
+ * Set by tests and by callers that have already decided. Not a user-facing switch: naming a
36
+ * driver explicitly already skips the lookup, which is the only reason anybody would want to.
37
+ */
38
+ skipPlatformConfig?: boolean;
39
+ /**
40
+ * The GET that asks the platform what this project wants. Injected ONLY by tests.
41
+ *
42
+ * It exists because the two things this answer decides — a driver preference and whether the drive
43
+ * may happen at all — were both unreachable without a network, and the refusal test that was
44
+ * supposed to cover the OFF switch was asserting on a path where the platform is never asked.
45
+ */
46
+ configFetch?: ConfigFetch;
21
47
  }
22
48
  export interface ExploreResult {
23
49
  drive: HarnessResult;
50
+ /** What the drive set out to do, read from `.reticle` before it started. */
51
+ plan: HarnessPlan;
24
52
  /** Flows that exist now and did not before — the part of a drive that is worth paying for twice. */
25
53
  savedFlows: readonly string[];
54
+ /**
55
+ * Flows that already existed and were written again by this drive.
56
+ *
57
+ * Split from `savedFlows` because the before/after name diff cannot see a rewrite, and read on its
58
+ * own it reported a drive that saved a perfectly good ten-step flow as having saved nothing — over
59
+ * which the caller was told "nothing is proved and nothing will replay". That sentence was false,
60
+ * and a false "nothing was verified" is the same class of mistake as a false "everything passed":
61
+ * the product exists to stop a drive lying about its own outcome, including to us.
62
+ *
63
+ * It happens on any SECOND drive, because a drive that covers the same app records the same
64
+ * journeys under the same names — so this is the ordinary case, not the corner one.
65
+ */
66
+ rewroteFlows: readonly string[];
67
+ /**
68
+ * Which driver actually drove.
69
+ *
70
+ * Reported rather than re-derived by the caller. A second copy of "which driver would be chosen"
71
+ * is a copy that can disagree with the one that chose, and the whole point of naming a driver is
72
+ * to attribute a result to it — a comparison that mislabels its own arms is worse than no
73
+ * comparison. `custom` is an injected driver, which is neither of ours to name.
74
+ */
75
+ driverName: string;
26
76
  }
27
77
  /**
28
78
  * Why the harness is unavailable, phrased as the way to make it available.
@@ -32,6 +82,29 @@ export interface ExploreResult {
32
82
  * print it, and two copies of this sentence would drift.
33
83
  */
34
84
  export declare const MSG_NO_HARNESS_KEY: string;
85
+ /** Asked for Jev specifically and it is not configured. Distinct from having no model at all. */
86
+ export declare const MSG_NO_JEV_KEY: string;
87
+ /** Asked for OpenAI specifically and it is not configured. Never substituted, same as Jev. */
88
+ export declare const MSG_NO_OPENAI_KEY: string;
89
+ /**
90
+ * The environment, plus the credential this machine already has.
91
+ *
92
+ * `reticle link` mints a project-scoped key and files it in `~/.reticle/credentials.json`; the CLI
93
+ * has read it from there for as long as it has existed. The harness did not, and read only
94
+ * `process.env` — so somebody who had signed in, linked their project and been told they were
95
+ * connected still got "no model configured to drive the app", and the only way out was to find the
96
+ * key in the console and export it by hand. Five manual steps to reach a feature they had already
97
+ * finished setting up.
98
+ *
99
+ * Resolved into the env rather than threaded through four call sites: the drivers and the
100
+ * preference lookup all read an env record, and giving them a completed one leaves each of them
101
+ * exactly as simple as it was. An EXPLICIT variable still wins — someone who exported a key meant
102
+ * that key, and CI has no linked project to read.
103
+ *
104
+ * The credential arrives through `deps.linkedCloud`, a port, because resolving it here would make
105
+ * the tool surface reach into `memory/cloud` — a reach the directory guard refused, correctly.
106
+ */
107
+ export declare function withLinkedCredential(deps: ToolDeps, env: Record<string, string | undefined>): Promise<Record<string, string | undefined>>;
35
108
  /** Is there a model the harness can drive with? A read, because "not configured" is not a failure. */
36
109
  export declare function harnessAvailable(env: Record<string, string | undefined>): boolean;
37
110
  /**
@@ -51,3 +124,54 @@ export declare function maxStepsFromEnv(env: Record<string, string | undefined>)
51
124
  * record and did not — and this product does not get to make that mistake about its own work.
52
125
  */
53
126
  export declare function exploreApp(deps: ToolDeps, env: Record<string, string | undefined>, options?: ExploreOptions): Promise<ExploreResult>;
127
+ /**
128
+ * What a drive actually left behind, split into flows that are NEW and flows it wrote over.
129
+ *
130
+ * Pure, and exported, because it is the part that was wrong and the part worth pinning. The
131
+ * integration around it — a real toolset dispatching a real save — is covered by driving a real app;
132
+ * what a test can usefully hold still is the reconciliation itself.
133
+ *
134
+ * A rewrite is only counted when the drive claims the save AND the store lists the name afterwards.
135
+ * The claim on its own is not evidence, which is the rule this function existed to keep: a model
136
+ * that says it saved something it did not must not be believed. Requiring both is what lets a
137
+ * rewrite be seen at all, since a name that was already there cannot show up in a before/after diff.
138
+ */
139
+ export declare function reconcileFlows(before: ReadonlySet<string>, after: readonly string[], toolCalls: readonly {
140
+ name: string;
141
+ args: Record<string, unknown>;
142
+ result: unknown;
143
+ isError: boolean;
144
+ }[]): {
145
+ savedFlows: readonly string[];
146
+ rewroteFlows: readonly string[];
147
+ };
148
+ /**
149
+ * What a person said about autonomous driving on the platform, honoured here.
150
+ *
151
+ * The switch existed, persisted and round-tripped, and the daemon read it and threw it away — so
152
+ * turning the harness OFF changed a value in a database and nothing else. A control that does not
153
+ * control anything is worse than no control: somebody turns it off, watches Reticle drive their app
154
+ * anyway, and now correctly distrusts every other switch in the product.
155
+ *
156
+ * Absent means ON. The platform's own default is on, and a machine that cannot reach the platform —
157
+ * offline, CI, no link — must not silently lose a feature it was never told to stop using.
158
+ */
159
+ export declare const MSG_HARNESS_DISABLED: string;
160
+ /**
161
+ * The other reason a drive can be refused, and it is NOT the same reason.
162
+ *
163
+ * A drive through the platform spends Reticle's model budget. That is free for three months and
164
+ * included on a paid plan, and outside both it is somebody else's money being spent on nothing. The
165
+ * message says which of the two it is and what to do, because "the harness is off" told to a person
166
+ * who never turned anything off is a support ticket rather than an answer.
167
+ */
168
+ export declare const MSG_HARNESS_UNCLAIMED: string;
169
+ /**
170
+ * A stored preference, kept only if this build can actually honour it.
171
+ *
172
+ * Exported because it is the whole of the asymmetry with the per-call argument, and the asymmetry
173
+ * is the part somebody will later think is a bug.
174
+ */
175
+ export declare function knownDriver(provider: string | undefined): string | undefined;
176
+ /** The recording started and never stopped, if there is one. Exported because it is the decision. */
177
+ export declare function openRecordingName(toolCalls: readonly ToolOutcome[]): string | undefined;