@reticlehq/server 2.13.1 → 2.14.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 (449) hide show
  1. package/SKILL.md +8 -18
  2. package/bin/reticle.js +3 -0
  3. package/dist/bridge/auth-failure-reason.js +12 -1
  4. package/dist/bridge/bridge-security.d.ts +8 -0
  5. package/dist/bridge/bridge-security.js +6 -1
  6. package/dist/bridge/bridge.d.ts +3 -0
  7. package/dist/bridge/bridge.js +23 -1
  8. package/dist/bridge/bridge.test-harness.d.ts +10 -1
  9. package/dist/bridge/bridge.test-harness.js +7 -1
  10. package/dist/bridge/pairing-token.d.ts +17 -0
  11. package/dist/bridge/pairing-token.js +26 -0
  12. package/dist/bridge/token-auth.d.ts +7 -0
  13. package/dist/bridge/token-auth.js +7 -1
  14. package/dist/capsule/capsule-store.d.ts +4 -4
  15. package/dist/capsule/capsule.d.ts +1 -1
  16. package/dist/capsule/capsule.js +3 -3
  17. package/dist/capsule/causal-summary.d.ts +21 -1
  18. package/dist/capsule/causal-summary.js +8 -6
  19. package/dist/capsule/divergence.d.ts +1 -1
  20. package/dist/capsule/divergence.js +26 -10
  21. package/dist/chromium-launch-options.d.ts +2 -1
  22. package/dist/cli/adhoc-verdict.d.ts +58 -0
  23. package/dist/cli/adhoc-verdict.js +115 -0
  24. package/dist/cli/chromium-hint.d.ts +18 -4
  25. package/dist/cli/chromium-hint.js +54 -6
  26. package/dist/cli/cli-doctor.js +1 -2
  27. package/dist/cli/cli-flow-commands.d.ts +16 -2
  28. package/dist/cli/cli-flow-commands.js +28 -9
  29. package/dist/cli/cli-parse-feedback.js +1 -1
  30. package/dist/cli/cli-parse.d.ts +2 -1
  31. package/dist/cli/cli-parse.js +38 -0
  32. package/dist/cli/cli-port.d.ts +5 -13
  33. package/dist/cli/cli-port.js +5 -38
  34. package/dist/cli/cli-update-commands.js +4 -4
  35. package/dist/cli/cli-verify.d.ts +24 -7
  36. package/dist/cli/cli-verify.js +87 -13
  37. package/dist/cli/cloud-keystore.d.ts +2 -1
  38. package/dist/cli/cloud-login.d.ts +2 -1
  39. package/dist/cli/cloud-session.d.ts +2 -1
  40. package/dist/cli/cloud-session.js +1 -1
  41. package/dist/cli/daemon-start-options.d.ts +2 -1
  42. package/dist/cli/device-flow.d.ts +2 -2
  43. package/dist/cli/doctor-daemon-line.d.ts +2 -1
  44. package/dist/cli/doctor-project-line.d.ts +2 -1
  45. package/dist/cli/doctor-rows.d.ts +2 -1
  46. package/dist/cli/drive-attach.d.ts +4 -3
  47. package/dist/cli/gate-hook-message.d.ts +2 -1
  48. package/dist/cli/status-next-action.js +10 -11
  49. package/dist/cli.d.ts +1 -0
  50. package/dist/cli.js +21 -9
  51. package/dist/cloud/account-state.d.ts +20 -0
  52. package/dist/cloud/account-state.js +65 -0
  53. package/dist/cloud/cloud-sync.d.ts +46 -3
  54. package/dist/cloud/cloud-sync.js +116 -0
  55. package/dist/cloud/sync-cycle.d.ts +5 -4
  56. package/dist/cloud/sync-cycle.js +1 -1
  57. package/dist/cloud/sync-daemon.d.ts +3 -19
  58. package/dist/cloud/sync-daemon.js +2 -2
  59. package/dist/crawl/crawl-tools.js +1 -1
  60. package/dist/crawl/crawl.d.ts +5 -5
  61. package/dist/crawl/crawl.js +138 -4
  62. package/dist/daemon/daemon-resilience.d.ts +3 -2
  63. package/dist/daemon/daemon-resilience.js +43 -4
  64. package/dist/daemon/daemon-resolve.d.ts +0 -9
  65. package/dist/daemon/daemon-resolve.js +2 -2
  66. package/dist/daemon/dev-servers.d.ts +1 -1
  67. package/dist/daemon/dev-servers.js +1 -1
  68. package/dist/daemon/loopback-alias.d.ts +2 -1
  69. package/dist/daemon/startup-failure.d.ts +11 -0
  70. package/dist/daemon/startup-failure.js +46 -0
  71. package/dist/events/contradictions.d.ts +10 -16
  72. package/dist/events/contradictions.js +149 -17
  73. package/dist/events/declared.d.ts +13 -1
  74. package/dist/events/declared.js +59 -3
  75. package/dist/events/echo-mismatch.js +75 -6
  76. package/dist/events/lineage.d.ts +52 -0
  77. package/dist/events/lineage.js +122 -0
  78. package/dist/events/net-evidence.d.ts +21 -0
  79. package/dist/events/net-evidence.js +81 -0
  80. package/dist/events/predicate-console.d.ts +13 -0
  81. package/dist/events/predicate-console.js +138 -0
  82. package/dist/events/predicate-element.d.ts +13 -0
  83. package/dist/events/predicate-element.js +214 -0
  84. package/dist/events/predicate-eval.d.ts +15 -3
  85. package/dist/events/predicate-eval.js +128 -110
  86. package/dist/events/predicate-parse.js +34 -1
  87. package/dist/events/predicate-request-body.d.ts +50 -0
  88. package/dist/events/predicate-request-body.js +120 -0
  89. package/dist/events/predicate-route.d.ts +21 -1
  90. package/dist/events/predicate-route.js +149 -21
  91. package/dist/events/predicate-schema.d.ts +8 -1
  92. package/dist/events/predicate-schema.js +34 -0
  93. package/dist/events/predicate.d.ts +2 -0
  94. package/dist/events/predicate.js +52 -159
  95. package/dist/events/split-text-miss.d.ts +6 -4
  96. package/dist/events/split-text-miss.js +12 -5
  97. package/dist/flows/affected-tools.js +22 -9
  98. package/dist/flows/annotate.d.ts +2 -1
  99. package/dist/flows/annotate.js +19 -1
  100. package/dist/flows/coverage.d.ts +2 -2
  101. package/dist/flows/flake.d.ts +3 -3
  102. package/dist/flows/flow-expect-grammar.d.ts +33 -0
  103. package/dist/flows/flow-expect-grammar.js +155 -0
  104. package/dist/flows/flow-replay-run.d.ts +1 -1
  105. package/dist/flows/flow-replay-run.js +28 -15
  106. package/dist/flows/flow-replay.d.ts +10 -0
  107. package/dist/flows/flow-replay.js +57 -22
  108. package/dist/flows/flow-secret-field.d.ts +14 -0
  109. package/dist/flows/flow-secret-field.js +22 -0
  110. package/dist/flows/flow-step-runners.d.ts +1 -0
  111. package/dist/flows/flow-step-runners.js +91 -34
  112. package/dist/flows/flow-success.js +22 -0
  113. package/dist/flows/flow-tools.js +27 -8
  114. package/dist/flows/flow-upload-resolve.d.ts +23 -0
  115. package/dist/flows/flow-upload-resolve.js +46 -0
  116. package/dist/flows/flows.d.ts +15 -0
  117. package/dist/flows/flows.js +17 -14
  118. package/dist/flows/git-changed.d.ts +23 -4
  119. package/dist/flows/git-changed.js +32 -6
  120. package/dist/flows/heal-run.js +2 -2
  121. package/dist/flows/predicate-to-expect.d.ts +3 -2
  122. package/dist/flows/predicate-to-expect.js +11 -5
  123. package/dist/flows/recording-backtrack.d.ts +24 -0
  124. package/dist/flows/recording-backtrack.js +73 -0
  125. package/dist/flows/recordings.d.ts +6 -0
  126. package/dist/flows/replay-halt.d.ts +26 -0
  127. package/dist/flows/replay-halt.js +30 -0
  128. package/dist/flows/replay.d.ts +0 -8
  129. package/dist/flows/replay.js +15 -3
  130. package/dist/flows/suite-flakes.d.ts +2 -1
  131. package/dist/flows/verify-change-tools.js +16 -4
  132. package/dist/honesty/already-true.d.ts +14 -0
  133. package/dist/honesty/already-true.js +47 -4
  134. package/dist/honesty/blind-spots.d.ts +3 -1
  135. package/dist/honesty/blind-spots.js +24 -1
  136. package/dist/honesty/body-capture-remedy.d.ts +42 -0
  137. package/dist/honesty/body-capture-remedy.js +95 -0
  138. package/dist/honesty/feature-capture.d.ts +3 -2
  139. package/dist/honesty/feature-capture.js +1 -1
  140. package/dist/honesty/gap-ledger.d.ts +1 -1
  141. package/dist/honesty/gap-ledger.js +1 -1
  142. package/dist/honesty/instrumentation-gaps.d.ts +8 -1
  143. package/dist/honesty/instrumentation-gaps.js +12 -2
  144. package/dist/honesty/observability.d.ts +4 -3
  145. package/dist/honesty/tool-hit-rate.d.ts +3 -2
  146. package/dist/honesty/uncaptured-bodies.d.ts +3 -1
  147. package/dist/honesty/uncaptured-bodies.js +6 -2
  148. package/dist/honesty/unsettled.d.ts +9 -0
  149. package/dist/honesty/unsettled.js +45 -0
  150. package/dist/honesty/verified.d.ts +32 -1
  151. package/dist/honesty/verified.js +37 -10
  152. package/dist/impact/impact-store.d.ts +5 -14
  153. package/dist/impact/impact-store.js +49 -6
  154. package/dist/index.js +1 -1
  155. package/dist/input/network-detail.d.ts +26 -1
  156. package/dist/input/network-detail.js +44 -12
  157. package/dist/input/network-mock-tools.js +24 -17
  158. package/dist/input/real-input.js +1 -1
  159. package/dist/input/viewport-tools.js +25 -13
  160. package/dist/intent/inline-intent.d.ts +0 -10
  161. package/dist/intent/inline-intent.js +1 -1
  162. package/dist/intent/intent-shard-store.d.ts +3 -2
  163. package/dist/intent/intent-shard-store.js +1 -1
  164. package/dist/intent/intent-shard.d.ts +14 -14
  165. package/dist/intent/intent-shard.js +4 -4
  166. package/dist/intent/intent-store.d.ts +1 -1
  167. package/dist/intent/intent-store.js +1 -1
  168. package/dist/intent/intent-subject.d.ts +2 -1
  169. package/dist/intent/open-intents.d.ts +3 -2
  170. package/dist/license/license.d.ts +4 -4
  171. package/dist/license/license.js +1 -1
  172. package/dist/mcp/attach-memory.d.ts +2 -1
  173. package/dist/mcp/client-identity.d.ts +2 -1
  174. package/dist/mcp/mcp-outage.d.ts +1 -1
  175. package/dist/mcp/mcp-outage.js +1 -1
  176. package/dist/mcp/mcp-proxy.d.ts +3 -1
  177. package/dist/mcp/mcp-proxy.js +32 -7
  178. package/dist/mcp/mcp.js +3 -1
  179. package/dist/mcp/proxy-handshake.d.ts +2 -1
  180. package/dist/mcp/proxy-idle-exit.d.ts +45 -0
  181. package/dist/mcp/proxy-idle-exit.js +94 -0
  182. package/dist/mcp/server-instructions.d.ts +2 -1
  183. package/dist/memory/project-memory.d.ts +2 -3
  184. package/dist/memory/project-memory.js +1 -1
  185. package/dist/oracles/propose-consequences.js +5 -5
  186. package/dist/oracles/self-instrument.d.ts +2 -2
  187. package/dist/oracles/self-instrument.js +1 -1
  188. package/dist/platform.d.ts +3 -5
  189. package/dist/platform.js +3 -5
  190. package/dist/pool/browser-pool.d.ts +92 -0
  191. package/dist/pool/browser-pool.js +119 -5
  192. package/dist/pool/playwright-launcher.js +29 -2
  193. package/dist/pool/storage-seed.d.ts +23 -0
  194. package/dist/pool/storage-seed.js +198 -0
  195. package/dist/project/artifact-root.d.ts +2 -1
  196. package/dist/project/memory-fs.d.ts +2 -1
  197. package/dist/project/reticle-dir.js +1 -1
  198. package/dist/project/session-root.d.ts +8 -0
  199. package/dist/project/session-root.js +9 -2
  200. package/dist/runs/reticle-runner.d.ts +14 -1
  201. package/dist/runs/reticle-runner.js +39 -2
  202. package/dist/session/attachment-history.d.ts +2 -1
  203. package/dist/session/fake-session.d.ts +37 -0
  204. package/dist/session/fake-session.js +81 -0
  205. package/dist/session/lease-visibility.d.ts +2 -1
  206. package/dist/session/live-control-tools.js +6 -0
  207. package/dist/session/no-session-diagnosis.d.ts +17 -1
  208. package/dist/session/no-session-diagnosis.js +32 -6
  209. package/dist/session/no-session-next-action.d.ts +14 -0
  210. package/dist/session/no-session-next-action.js +18 -0
  211. package/dist/session/no-session-watch.js +46 -3
  212. package/dist/session/registered-projects.d.ts +54 -0
  213. package/dist/session/registered-projects.js +73 -0
  214. package/dist/session/review-store.d.ts +2 -1
  215. package/dist/session/session-health.d.ts +62 -1
  216. package/dist/session/session-health.js +82 -2
  217. package/dist/session/session-manager.d.ts +11 -1
  218. package/dist/session/session-manager.js +18 -3
  219. package/dist/session/session-replaced.d.ts +24 -0
  220. package/dist/session/session-replaced.js +29 -0
  221. package/dist/session/session-successor.js +20 -4
  222. package/dist/session/session.d.ts +13 -5
  223. package/dist/session/session.js +31 -23
  224. package/dist/setup/agent-configs.d.ts +3 -2
  225. package/dist/setup/agent-writer.d.ts +3 -2
  226. package/dist/setup/approval-migration.d.ts +2 -1
  227. package/dist/setup/approval-migration.js +1 -1
  228. package/dist/setup/auto-approve.d.ts +11 -19
  229. package/dist/setup/auto-approve.js +15 -12
  230. package/dist/{init → setup}/confirm.js +1 -1
  231. package/dist/setup/desktop-shape.d.ts +3 -2
  232. package/dist/setup/drive-agent.d.ts +2 -3
  233. package/dist/setup/drive-agent.js +1 -1
  234. package/dist/setup/drive-plan.d.ts +3 -2
  235. package/dist/setup/ensure-daemon.d.ts +2 -1
  236. package/dist/setup/existing-app.d.ts +12 -0
  237. package/dist/setup/existing-app.js +13 -0
  238. package/dist/setup/init-host.d.ts +11 -0
  239. package/dist/setup/init-host.js +26 -0
  240. package/dist/setup/init-runtime.d.ts +4 -10
  241. package/dist/setup/init-runtime.js +23 -16
  242. package/dist/setup/license-key.d.ts +2 -1
  243. package/dist/setup/listeners.d.ts +2 -1
  244. package/dist/setup/loopback-probe-urls.d.ts +18 -0
  245. package/dist/setup/loopback-probe-urls.js +52 -0
  246. package/dist/setup/node-effects.d.ts +3 -0
  247. package/dist/setup/node-effects.js +26 -11
  248. package/dist/setup/page-probe.d.ts +5 -0
  249. package/dist/setup/relaunch.d.ts +2 -1
  250. package/dist/setup/run-setup.d.ts +5 -1
  251. package/dist/setup/run-setup.js +141 -50
  252. package/dist/setup/setup-command.d.ts +3 -2
  253. package/dist/setup/setup-command.js +8 -0
  254. package/dist/setup/setup-options.d.ts +5 -3
  255. package/dist/setup/setup-options.js +3 -2
  256. package/dist/setup/wait-progress.d.ts +28 -0
  257. package/dist/setup/wait-progress.js +43 -0
  258. package/dist/telemetry/app-instrumented.d.ts +2 -1
  259. package/dist/telemetry/app-instrumented.js +1 -1
  260. package/dist/telemetry/automation-hint.d.ts +1 -1
  261. package/dist/telemetry/automation-hint.js +1 -1
  262. package/dist/telemetry/cli-telemetry.js +1 -1
  263. package/dist/telemetry/connect-failure.d.ts +1 -1
  264. package/dist/telemetry/connect-failure.js +1 -1
  265. package/dist/telemetry/crash-cause.d.ts +3 -2
  266. package/dist/telemetry/crash-cause.js +1 -1
  267. package/dist/telemetry/daemon-telemetry.d.ts +3 -2
  268. package/dist/telemetry/daemon-telemetry.js +1 -1
  269. package/dist/telemetry/error-class.d.ts +3 -2
  270. package/dist/telemetry/error-class.js +1 -1
  271. package/dist/telemetry/feedback-cli.js +1 -1
  272. package/dist/telemetry/feedback-context.d.ts +3 -2
  273. package/dist/telemetry/feedback-context.js +5 -4
  274. package/dist/telemetry/feedback-local.d.ts +3 -2
  275. package/dist/telemetry/feedback.d.ts +4 -3
  276. package/dist/telemetry/feedback.js +1 -1
  277. package/dist/telemetry/git-facts.d.ts +2 -2
  278. package/dist/telemetry/git-facts.js +1 -1
  279. package/dist/telemetry/identify.d.ts +1 -1
  280. package/dist/telemetry/identify.js +1 -1
  281. package/dist/telemetry/init-telemetry.d.ts +2 -14
  282. package/dist/telemetry/init-telemetry.js +4 -13
  283. package/dist/telemetry/install-source.d.ts +7 -13
  284. package/dist/telemetry/install-source.js +7 -29
  285. package/dist/telemetry/license-activation.d.ts +3 -2
  286. package/dist/telemetry/license-activation.js +1 -1
  287. package/dist/telemetry/machine-snapshot.d.ts +1 -1
  288. package/dist/telemetry/mcp-connection.js +1 -1
  289. package/dist/telemetry/project-profile.d.ts +0 -14
  290. package/dist/telemetry/project-profile.js +1 -1
  291. package/dist/telemetry/proxy-telemetry.js +1 -1
  292. package/dist/telemetry/session-metrics.d.ts +1 -1
  293. package/dist/telemetry/session-metrics.js +1 -1
  294. package/dist/telemetry/telemetry.d.ts +1 -17
  295. package/dist/telemetry/telemetry.js +4 -4
  296. package/dist/telemetry/tool-refused.d.ts +1 -1
  297. package/dist/telemetry/tool-refused.js +1 -1
  298. package/dist/tools/act-observation.d.ts +3 -2
  299. package/dist/tools/act-preflight.js +8 -3
  300. package/dist/tools/act-target.d.ts +4 -0
  301. package/dist/tools/act-target.js +14 -5
  302. package/dist/tools/act-tools.d.ts +0 -2
  303. package/dist/tools/act-tools.js +45 -15
  304. package/dist/tools/assert-source.d.ts +30 -0
  305. package/dist/tools/assert-source.js +21 -0
  306. package/dist/tools/assert-verdict.d.ts +1 -1
  307. package/dist/tools/assert-verdict.js +14 -4
  308. package/dist/tools/browser-tools.js +28 -8
  309. package/dist/tools/complete-snapshot.d.ts +3 -2
  310. package/dist/tools/dynamic-tools.js +8 -0
  311. package/dist/tools/error-recovery.d.ts +10 -0
  312. package/dist/tools/error-recovery.js +23 -0
  313. package/dist/tools/feedback-tools.js +1 -1
  314. package/dist/tools/invoke-tool.js +2 -0
  315. package/dist/tools/lease-tools.d.ts +48 -20
  316. package/dist/tools/lease-tools.js +311 -76
  317. package/dist/tools/lineage-tools.d.ts +14 -0
  318. package/dist/tools/lineage-tools.js +64 -0
  319. package/dist/tools/merge-tools.js +1 -3
  320. package/dist/tools/navigate-arrival.d.ts +45 -1
  321. package/dist/tools/navigate-arrival.js +39 -6
  322. package/dist/tools/navigate-result.d.ts +8 -1
  323. package/dist/tools/navigate-result.js +14 -4
  324. package/dist/tools/numeric-bounds.d.ts +0 -11
  325. package/dist/tools/numeric-bounds.js +4 -4
  326. package/dist/tools/observe-tools.js +22 -26
  327. package/dist/tools/observed-nothing.d.ts +9 -0
  328. package/dist/tools/observed-nothing.js +2 -1
  329. package/dist/tools/read-tools.js +12 -17
  330. package/dist/tools/real-input-attempt.d.ts +14 -6
  331. package/dist/tools/real-input-attempt.js +75 -18
  332. package/dist/tools/reconcile-tools.js +2 -1
  333. package/dist/tools/reload-result.d.ts +6 -1
  334. package/dist/tools/reload-result.js +7 -2
  335. package/dist/tools/resolve-target.d.ts +7 -1
  336. package/dist/tools/resolve-target.js +72 -9
  337. package/dist/tools/settle-in-flight.d.ts +1 -1
  338. package/dist/tools/settle-in-flight.js +9 -2
  339. package/dist/tools/snapshot-delta.d.ts +24 -1
  340. package/dist/tools/snapshot-delta.js +66 -7
  341. package/dist/tools/tool-names.d.ts +1 -0
  342. package/dist/tools/tool-names.js +1 -0
  343. package/dist/tools/tool-surface.js +20 -2
  344. package/dist/tools/tools.js +120 -11
  345. package/dist/tools/verify-next-baton.d.ts +2 -1
  346. package/dist/update/sdk-sync.d.ts +1 -1
  347. package/dist/update/sdk-sync.js +1 -1
  348. package/dist/update/updater.js +1 -1
  349. package/dist/version/sdk-fix.d.ts +2 -1
  350. package/dist/version/version-skew.d.ts +0 -8
  351. package/dist/version/version-skew.js +1 -1
  352. package/docs/README.md +8 -6
  353. package/docs/actions.mdx +1 -1
  354. package/docs/agent-cheatsheet.md +4 -2
  355. package/docs/architecture.md +1 -1
  356. package/docs/cli/mcp.mdx +3 -1
  357. package/docs/cli/watch.mdx +1 -1
  358. package/docs/cli.mdx +1 -1
  359. package/docs/desktop.mdx +1 -1
  360. package/docs/docs.json +8 -3
  361. package/docs/faq.mdx +9 -0
  362. package/docs/first-drive.md +136 -0
  363. package/docs/frameworks.mdx +29 -7
  364. package/docs/gate-plan.md +2 -2
  365. package/docs/gates.md +19 -11
  366. package/docs/getting-started.md +7 -1
  367. package/docs/http-transport.md +164 -0
  368. package/docs/index.mdx +5 -3
  369. package/docs/install-manual.mdx +1 -1
  370. package/docs/packages/tauri.mdx +1 -1
  371. package/docs/packages.mdx +15 -3
  372. package/docs/platform-integration.md +1 -1
  373. package/docs/predicates.mdx +2 -0
  374. package/docs/system-map.md +2 -2
  375. package/docs/telemetry-contract.md +4 -4
  376. package/docs/telemetry-events.mdx +1 -1
  377. package/docs/telemetry.md +3 -3
  378. package/docs/tools-navigate.mdx +14 -6
  379. package/docs/usage.md +4 -4
  380. package/package.json +7 -4
  381. package/dist/init/agent-rules.d.ts +0 -116
  382. package/dist/init/agent-rules.js +0 -279
  383. package/dist/init/app-choice.d.ts +0 -20
  384. package/dist/init/app-choice.js +0 -25
  385. package/dist/init/astro-host.d.ts +0 -21
  386. package/dist/init/astro-host.js +0 -27
  387. package/dist/init/astro-patch.d.ts +0 -33
  388. package/dist/init/astro-patch.js +0 -300
  389. package/dist/init/capabilities.d.ts +0 -40
  390. package/dist/init/capabilities.js +0 -150
  391. package/dist/init/closing-hint.d.ts +0 -36
  392. package/dist/init/closing-hint.js +0 -120
  393. package/dist/init/connect-steps.d.ts +0 -2
  394. package/dist/init/connect-steps.js +0 -50
  395. package/dist/init/cra.d.ts +0 -79
  396. package/dist/init/cra.js +0 -178
  397. package/dist/init/csp-check.d.ts +0 -38
  398. package/dist/init/csp-check.js +0 -107
  399. package/dist/init/csp-doctor.d.ts +0 -32
  400. package/dist/init/csp-doctor.js +0 -54
  401. package/dist/init/desktop-doctor.d.ts +0 -41
  402. package/dist/init/desktop-doctor.js +0 -198
  403. package/dist/init/detect.d.ts +0 -96
  404. package/dist/init/detect.js +0 -209
  405. package/dist/init/dev-script.d.ts +0 -50
  406. package/dist/init/dev-script.js +0 -66
  407. package/dist/init/format-generated.d.ts +0 -18
  408. package/dist/init/format-generated.js +0 -39
  409. package/dist/init/install-hint.d.ts +0 -9
  410. package/dist/init/install-hint.js +0 -29
  411. package/dist/init/mcp-clients.d.ts +0 -89
  412. package/dist/init/mcp-clients.js +0 -299
  413. package/dist/init/mcp-registered.d.ts +0 -12
  414. package/dist/init/mcp-registered.js +0 -14
  415. package/dist/init/mcp.d.ts +0 -89
  416. package/dist/init/mcp.js +0 -129
  417. package/dist/init/next-patch.d.ts +0 -39
  418. package/dist/init/next-patch.js +0 -196
  419. package/dist/init/node-io.d.ts +0 -7
  420. package/dist/init/node-io.js +0 -117
  421. package/dist/init/non-js-project.d.ts +0 -27
  422. package/dist/init/non-js-project.js +0 -84
  423. package/dist/init/patch-kind.d.ts +0 -20
  424. package/dist/init/patch-kind.js +0 -10
  425. package/dist/init/plan-framework.d.ts +0 -64
  426. package/dist/init/plan-framework.js +0 -565
  427. package/dist/init/plan.d.ts +0 -242
  428. package/dist/init/plan.js +0 -703
  429. package/dist/init/preflight.d.ts +0 -28
  430. package/dist/init/preflight.js +0 -38
  431. package/dist/init/project-id.d.ts +0 -12
  432. package/dist/init/project-id.js +0 -25
  433. package/dist/init/refresh-rules.d.ts +0 -39
  434. package/dist/init/refresh-rules.js +0 -51
  435. package/dist/init/run.d.ts +0 -117
  436. package/dist/init/run.js +0 -806
  437. package/dist/init/slash-command.d.ts +0 -27
  438. package/dist/init/slash-command.js +0 -132
  439. package/dist/init/snippets.d.ts +0 -134
  440. package/dist/init/snippets.js +0 -572
  441. package/dist/init/vite-config.d.ts +0 -18
  442. package/dist/init/vite-config.js +0 -114
  443. package/dist/init/windows-quote.d.ts +0 -38
  444. package/dist/init/windows-quote.js +0 -70
  445. package/dist/init/workspace-apps.d.ts +0 -30
  446. package/dist/init/workspace-apps.js +0 -178
  447. package/dist/project/remember-project.d.ts +0 -24
  448. package/dist/project/remember-project.js +0 -40
  449. /package/dist/{init → setup}/confirm.d.ts +0 -0
@@ -21,7 +21,7 @@
21
21
  * existing switch (`RETICLE_TELEMETRY=0`, `DO_NOT_TRACK`, `reticle telemetry disable`) still
22
22
  * disables it too, since it rides the same emitter.
23
23
  */
24
- import { type Feedback } from '@reticlehq/core';
24
+ import { type Feedback } from '@reticlehq/core/telemetry';
25
25
  import { type SessionFacts } from './feedback-context.js';
26
26
  /** Kills the feedback channel ONLY — adoption counters keep flowing. */
27
27
  export declare const FEEDBACK_ENV = "RETICLE_FEEDBACK";
@@ -37,8 +37,8 @@ export declare function redactFeedbackText(input: string, max: number): Redactio
37
37
  /** True when the feedback channel is switched off on its own (the emitter's switches apply as well). */
38
38
  export declare function feedbackDisabled(env?: NodeJS.ProcessEnv): boolean;
39
39
  /** What the author supplies; the environment context is detected, never asked for. */
40
- export type FeedbackInput = Pick<Feedback, 'source' | 'kind' | 'text' | 'trace' | 'rating' | 'need' | 'impact' | 'currentApproach' | 'model'>;
41
- export interface FeedbackReceipt {
40
+ type FeedbackInput = Pick<Feedback, 'source' | 'kind' | 'text' | 'trace' | 'rating' | 'need' | 'impact' | 'currentApproach' | 'model'>;
41
+ interface FeedbackReceipt {
42
42
  /**
43
43
  * DELIVERY confirmed. Only ever true when the send was awaited and the endpoint accepted it —
44
44
  * never as an optimistic stand-in for "we handed it to the emitter". That distinction is the whole
@@ -96,3 +96,4 @@ export declare function submitFeedback(input: FeedbackInput, opts?: {
96
96
  * CLI prints is then genuinely everything that goes.
97
97
  */
98
98
  export declare function describeFeedbackPayload(context: Partial<Feedback>): Record<string, unknown>;
99
+ export {};
@@ -21,7 +21,7 @@
21
21
  * existing switch (`RETICLE_TELEMETRY=0`, `DO_NOT_TRACK`, `reticle telemetry disable`) still
22
22
  * disables it too, since it rides the same emitter.
23
23
  */
24
- import { FeedbackSchema, FEEDBACK_TEXT_MAX, FEEDBACK_TRACE_MAX, FEEDBACK_FIELD_MAX, TelemetryEventKind, } from '@reticlehq/core';
24
+ import { FeedbackSchema, FEEDBACK_TEXT_MAX, FEEDBACK_TRACE_MAX, FEEDBACK_FIELD_MAX, TelemetryEventKind, } from '@reticlehq/core/telemetry';
25
25
  import { platform } from 'node:os';
26
26
  import { getTelemetry } from './telemetry.js';
27
27
  import { noteFeedbackUndelivered } from './feedback-delivery.js';
@@ -1,5 +1,5 @@
1
- import { GitState, RepoForge } from '@reticlehq/core';
2
- export interface GitFacts {
1
+ import { GitState, RepoForge } from '@reticlehq/core/telemetry';
2
+ interface GitFacts {
3
3
  /** none | local_only (init'd, never pushed) | remote (has an origin). */
4
4
  state: GitState;
5
5
  /** The NORMALIZED origin — hashed by the caller, never sent raw. Absent unless state is `remote`. */
@@ -22,7 +22,7 @@
22
22
  */
23
23
  import { readFileSync, statSync } from 'node:fs';
24
24
  import { dirname, join } from 'node:path';
25
- import { GitState, RepoForge } from '@reticlehq/core';
25
+ import { GitState, RepoForge } from '@reticlehq/core/telemetry';
26
26
  /** How far up the tree to look for a `.git` before giving up. Deep monorepos are still well inside. */
27
27
  const MAX_PARENT_WALK = 20;
28
28
  /**
@@ -1,4 +1,4 @@
1
- import { UsageContextKind, type Identity } from '@reticlehq/core';
1
+ import { UsageContextKind, type Identity } from '@reticlehq/core/telemetry';
2
2
  /** Re-exported so the CLI has one import for the whole feature; the shape itself lives in core. */
3
3
  export { UsageContextKind };
4
4
  export type { Identity };
@@ -21,7 +21,7 @@
21
21
  import { mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
22
22
  import { homedir } from 'node:os';
23
23
  import { join } from 'node:path';
24
- import { TelemetryEventKind, UsageContextKind } from '@reticlehq/core';
24
+ import { TelemetryEventKind, UsageContextKind } from '@reticlehq/core/telemetry';
25
25
  import { getTelemetry } from './telemetry.js';
26
26
  const RETICLE_DIR = join(homedir(), '.reticle');
27
27
  /** Persisted so the identity survives shells and is attached to later sessions — and so it can be shown back. */
@@ -10,19 +10,7 @@
10
10
  * same treatment `cli_command_run` gets, for the same reason: an in-process fetch would keep the
11
11
  * event loop alive and tax the command by most of a second.
12
12
  */
13
- import { type InitOutcome } from '@reticlehq/core';
14
- /** Classified init failures — our own vocabulary, never a raw error or a path. */
15
- export declare const InitFailure: {
16
- /** Run outside a project root. The single most common first-run mistake. */
17
- readonly NO_PACKAGE_JSON: "no_package_json";
18
- /** The manifest exists and is not valid JSON — a trailing comma, usually. Never a stack trace. */
19
- readonly MALFORMED_PACKAGE_JSON: "malformed_package_json";
20
- /** The package manager failed: offline, a locked registry, a broken install. */
21
- readonly DEPENDENCY_INSTALL: "dependency_install";
22
- /** The `claude mcp add` step failed — the CLI is missing or refused. Reticle installs but is unreachable. */
23
- readonly MCP_REGISTRATION: "mcp_registration";
24
- readonly OTHER: "other";
25
- };
26
- export type InitFailure = (typeof InitFailure)[keyof typeof InitFailure];
13
+ import { type InitOutcome } from '@reticlehq/core/telemetry';
14
+ export { InitFailure } from '@reticlehq/init';
27
15
  /** Report one init outcome. Best-effort; setup must never fail because a metric did. */
28
16
  export declare function reportInitOutcome(init: InitOutcome): void;
@@ -10,21 +10,12 @@
10
10
  * same treatment `cli_command_run` gets, for the same reason: an in-process fetch would keep the
11
11
  * event loop alive and tax the command by most of a second.
12
12
  */
13
- import { TelemetryEventKind } from '@reticlehq/core';
13
+ import { TelemetryEventKind } from '@reticlehq/core/telemetry';
14
14
  import { getTelemetry } from './telemetry.js';
15
15
  import { resolveInstallSource } from './install-source.js';
16
- /** Classified init failures — our own vocabulary, never a raw error or a path. */
17
- export const InitFailure = {
18
- /** Run outside a project root. The single most common first-run mistake. */
19
- NO_PACKAGE_JSON: 'no_package_json',
20
- /** The manifest exists and is not valid JSON — a trailing comma, usually. Never a stack trace. */
21
- MALFORMED_PACKAGE_JSON: 'malformed_package_json',
22
- /** The package manager failed: offline, a locked registry, a broken install. */
23
- DEPENDENCY_INSTALL: 'dependency_install',
24
- /** The `claude mcp add` step failed — the CLI is missing or refused. Reticle installs but is unreachable. */
25
- MCP_REGISTRATION: 'mcp_registration',
26
- OTHER: 'other',
27
- };
16
+ // The failure vocabulary lives in `@reticlehq/init`, which is what classifies a failed run.
17
+ // Re-exported so every consumer here is unchanged.
18
+ export { InitFailure } from '@reticlehq/init';
28
19
  /** Report one init outcome. Best-effort; setup must never fail because a metric did. */
29
20
  export function reportInitOutcome(init) {
30
21
  try {
@@ -22,7 +22,7 @@
22
22
  * than none: it is the number distribution decisions get steered on, and a guess and a measurement
23
23
  * are indistinguishable once they are in the same column.
24
24
  */
25
- import { InstallSource } from '@reticlehq/core';
25
+ import { InstallSource } from '@reticlehq/core/telemetry';
26
26
  /** The one marker. Set by a channel on the process that runs the install. */
27
27
  export declare const INSTALL_SOURCE_ENV = "RETICLE_INSTALL_SOURCE";
28
28
  /**
@@ -55,16 +55,10 @@ export declare function declaredInstallSource(env?: NodeJS.ProcessEnv): InstallS
55
55
  */
56
56
  export declare function projectInstallSource(cwd: string, env?: NodeJS.ProcessEnv): InstallSource;
57
57
  /**
58
- * The same config with `installSource` added, or `undefined` when there is nothing to add.
59
- *
60
- * `installSource` is written only when `.reticle.json` is CREATED, and `init` reports that file as
61
- * `already exists` on every re-run — so everyone who was already here when the marker shipped, and
62
- * everyone who ran `init` once without one, keeps `unknown` forever with no way to fix it. That is
63
- * most of the population the field exists to describe.
64
- *
65
- * An EXISTING value is never overwritten. The first channel is the one that brought the user in, and
66
- * a later `init` through a different route must not take credit for an acquisition it did not make.
67
- * Anything unparseable is left exactly as it is: a config is user data, and `init` rewriting a file
68
- * it could not read would be a far worse failure than a missing dimension.
58
+ * `configWithInstallSource` lives in `@reticlehq/init` — `init` is the only thing that writes
59
+ * `.reticle.json`, and the scaffolder may not import the daemon. Re-exported here so this module
60
+ * stays the one place to read about install attribution, and so its tests are unchanged. Which
61
+ * channel declared itself is still decided above; the plan receives the answer as
62
+ * `PlanInput.installSource`.
69
63
  */
70
- export declare function configWithInstallSource(source: string | null | undefined, declared: string | undefined): string | undefined;
64
+ export { configWithInstallSource } from '@reticlehq/init';
@@ -22,7 +22,7 @@
22
22
  * than none: it is the number distribution decisions get steered on, and a guess and a measurement
23
23
  * are indistinguishable once they are in the same column.
24
24
  */
25
- import { InstallSource } from '@reticlehq/core';
25
+ import { InstallSource } from '@reticlehq/core/telemetry';
26
26
  import { findProjectConfig } from '../cli/cli-port.js';
27
27
  /** The one marker. Set by a channel on the process that runs the install. */
28
28
  export const INSTALL_SOURCE_ENV = 'RETICLE_INSTALL_SOURCE';
@@ -73,32 +73,10 @@ export function projectInstallSource(cwd, env = process.env) {
73
73
  return resolveInstallSource(env);
74
74
  }
75
75
  /**
76
- * The same config with `installSource` added, or `undefined` when there is nothing to add.
77
- *
78
- * `installSource` is written only when `.reticle.json` is CREATED, and `init` reports that file as
79
- * `already exists` on every re-run — so everyone who was already here when the marker shipped, and
80
- * everyone who ran `init` once without one, keeps `unknown` forever with no way to fix it. That is
81
- * most of the population the field exists to describe.
82
- *
83
- * An EXISTING value is never overwritten. The first channel is the one that brought the user in, and
84
- * a later `init` through a different route must not take credit for an acquisition it did not make.
85
- * Anything unparseable is left exactly as it is: a config is user data, and `init` rewriting a file
86
- * it could not read would be a far worse failure than a missing dimension.
76
+ * `configWithInstallSource` lives in `@reticlehq/init` — `init` is the only thing that writes
77
+ * `.reticle.json`, and the scaffolder may not import the daemon. Re-exported here so this module
78
+ * stays the one place to read about install attribution, and so its tests are unchanged. Which
79
+ * channel declared itself is still decided above; the plan receives the answer as
80
+ * `PlanInput.installSource`.
87
81
  */
88
- export function configWithInstallSource(source, declared) {
89
- if (undefined === declared || null === source || undefined === source)
90
- return undefined;
91
- let parsed;
92
- try {
93
- parsed = JSON.parse(source);
94
- }
95
- catch {
96
- return undefined;
97
- }
98
- if (null === parsed || 'object' !== typeof parsed || Array.isArray(parsed))
99
- return undefined;
100
- const fields = parsed;
101
- if (undefined !== fields['installSource'])
102
- return undefined;
103
- return `${JSON.stringify({ ...fields, installSource: declared }, null, 2)}\n`;
104
- }
82
+ export { configWithInstallSource } from '@reticlehq/init';
@@ -25,9 +25,9 @@
25
25
  * resolves to a company only against the issuance ledger held locally, so the analytics backend never
26
26
  * holds a customer list.
27
27
  */
28
- import { LicenseActivation } from '@reticlehq/core';
28
+ import { LicenseActivation } from '@reticlehq/core/telemetry';
29
29
  /** The activation facts that ride the wire. All absent on a build with no issuer key baked. */
30
- export interface LicenseFacts {
30
+ interface LicenseFacts {
31
31
  licenseId?: string;
32
32
  licenseStatus?: LicenseActivation;
33
33
  /**
@@ -52,3 +52,4 @@ export interface LicenseFacts {
52
52
  * key parsing, which is the part most likely to be handed something malformed.
53
53
  */
54
54
  export declare function licenseFacts(now: number, env?: NodeJS.ProcessEnv, baked?: string): LicenseFacts;
55
+ export {};
@@ -25,7 +25,7 @@
25
25
  * resolves to a company only against the issuance ledger held locally, so the analytics backend never
26
26
  * holds a customer list.
27
27
  */
28
- import { LicenseActivation } from '@reticlehq/core';
28
+ import { LicenseActivation } from '@reticlehq/core/telemetry';
29
29
  import { describeLicense, LICENSE_KEY_ENV } from '../license/license.js';
30
30
  /**
31
31
  * Resolve activation for one event. The clock is passed in (rule 7) and is the EVENT's clock, not a
@@ -1,4 +1,4 @@
1
- import type { MachineSnapshot } from '@reticlehq/core';
1
+ import type { MachineSnapshot } from '@reticlehq/core/telemetry';
2
2
  /**
3
3
  * Sample the machine. Never throws — this is called from a crash handler, where the one unacceptable
4
4
  * outcome is making the crash worse.
@@ -9,7 +9,7 @@
9
9
  * minutes, and in every other metric that is indistinguishable from enthusiastic use: more sessions,
10
10
  * more connects, more activity. The `reconnect` flag is what tells those two stories apart.
11
11
  */
12
- import { TelemetryEventKind } from '@reticlehq/core';
12
+ import { TelemetryEventKind } from '@reticlehq/core/telemetry';
13
13
  import { getTelemetry } from './telemetry.js';
14
14
  import { appEverConnected } from './app-instrumented.js';
15
15
  let connectsSeen = 0;
@@ -1,18 +1,4 @@
1
1
  import { ProjectSize, type ProjectProfile } from '@reticlehq/core';
2
- /**
3
- * The feature FAMILIES, and the on-disk evidence that a project has adopted each. Named rather than
4
- * counted so the vocabulary stays stable as tools are added, renamed, or merged into action-dispatched
5
- * families — a count would silently change meaning the next time the tool surface is reorganized.
6
- */
7
- export declare const FeatureFamily: {
8
- readonly DETERMINISTIC_REPLAY: "deterministic_replay";
9
- readonly VISUAL_BASELINE: "visual_baseline";
10
- readonly TEXT_BASELINE: "text_baseline";
11
- readonly CAPABILITY_CONTRACT: "capability_contract";
12
- readonly RUN_ARTIFACTS: "run_artifacts";
13
- readonly BUG_CAPSULES: "bug_capsules";
14
- readonly CROSS_RUN_HISTORY: "cross_run_history";
15
- };
16
2
  export declare function sizeBucket(sourceFiles: number): ProjectSize;
17
3
  /**
18
4
  * Project age in whole WEEKS, from the repo's first commit.
@@ -21,7 +21,7 @@ import { readProjectId } from '../cli/cli-port.js';
21
21
  * counted so the vocabulary stays stable as tools are added, renamed, or merged into action-dispatched
22
22
  * families — a count would silently change meaning the next time the tool surface is reorganized.
23
23
  */
24
- export const FeatureFamily = {
24
+ const FeatureFamily = {
25
25
  DETERMINISTIC_REPLAY: 'deterministic_replay',
26
26
  VISUAL_BASELINE: 'visual_baseline',
27
27
  TEXT_BASELINE: 'text_baseline',
@@ -9,7 +9,7 @@
9
9
  * The send is awaited. Fire-and-forget microseconds before `process.exit` is how `daemon_stopped`
10
10
  * never arrived: the POST was killed every time and nothing threw.
11
11
  */
12
- import { TelemetryEventKind } from '@reticlehq/core';
12
+ import { TelemetryEventKind } from '@reticlehq/core/telemetry';
13
13
  import { getSessionMetrics } from './session-metrics.js';
14
14
  import { getTelemetry } from './telemetry.js';
15
15
  export async function flushProxySessionMetrics(telemetry = getTelemetry(), metrics = getSessionMetrics()) {
@@ -15,7 +15,7 @@
15
15
  * URLs, no error messages — the accumulator has no way to hold them, which is a stronger guarantee
16
16
  * than a rule saying it shouldn't.
17
17
  */
18
- import { BrowserLaunchKind, type ConnectFailure, type SessionSummary } from '@reticlehq/core';
18
+ import { BrowserLaunchKind, type ConnectFailure, type SessionSummary } from '@reticlehq/core/telemetry';
19
19
  /**
20
20
  * Mutable counters for one daemon lifetime. A plain class, not a store: it is process-local, it never
21
21
  * persists, and it dies with the daemon.
@@ -15,7 +15,7 @@
15
15
  * URLs, no error messages — the accumulator has no way to hold them, which is a stronger guarantee
16
16
  * than a rule saying it shouldn't.
17
17
  */
18
- import { BrowserLaunchKind, } from '@reticlehq/core';
18
+ import { BrowserLaunchKind, } from '@reticlehq/core/telemetry';
19
19
  import { errorSkeleton, fingerprintError } from './error-fingerprint.js';
20
20
  import { describeToolParams } from './argument-shape.js';
21
21
  import { machineSnapshot } from './machine-snapshot.js';
@@ -1,4 +1,4 @@
1
- import { TelemetryEventKind, ProjectIdSource, type Crash, type Feedback, type Identity, type BugFound, type InitOutcome, type InstallSource, type McpConnection, type McpOutage, type ToolRefusal, type AppInstrumentation, type ProjectProfile, type SessionSummary, type TelemetryActor, type Verification, type VersionChange } from '@reticlehq/core';
1
+ import { TelemetryEventKind, ProjectIdSource, type Crash, type Feedback, type Identity, type BugFound, type InitOutcome, type InstallSource, type McpConnection, type McpOutage, type ToolRefusal, type AppInstrumentation, type ProjectProfile, type SessionSummary, type TelemetryActor, type Verification, type VersionChange } from '@reticlehq/core/telemetry';
2
2
  /**
3
3
  * PostHog's group type for a licensed customer. Sent as `$groups` so PostHog can aggregate a whole
4
4
  * organisation natively: per-company retention, "which orgs went quiet", one row per customer rather
@@ -10,22 +10,6 @@ import { TelemetryEventKind, ProjectIdSource, type Crash, type Feedback, type Id
10
10
  * analytics side learns a customer list only when we deliberately upload one.
11
11
  */
12
12
  export declare const POSTHOG_GROUP_ORGANIZATION = "organization";
13
- /**
14
- * Feedback gets its own, much larger budget — and a retry.
15
- *
16
- * 2s + drop is right for a usage counter: the metric is worthless if it costs the user latency, and
17
- * losing one changes nothing. Feedback is the opposite on both counts. It is the only qualitative
18
- * channel the product has, it carries an agent's entire root-cause analysis, and losing one loses
19
- * work that cannot be reconstructed.
20
- *
21
- * Measured to the collector with a WARM DNS cache: dns 0.003s, connect 0.233s, tls 0.467s, total
22
- * 0.694s — a third of the old budget gone before any payload moves, on the good path. A fresh
23
- * short-lived CLI process pays cold DNS and a cold route on top, which is exactly the case that
24
- * failed in the field and then succeeded on retry from a warmer process.
25
- */
26
- export declare const FEEDBACK_TIMEOUT_MS = 15000;
27
- export declare const FEEDBACK_RETRIES = 1;
28
- export declare const FEEDBACK_RETRY_BACKOFF_MS = 750;
29
13
  /**
30
14
  * One-way project fingerprint: distinct-count of this = "projects Reticle is used in", reveals nothing.
31
15
  *
@@ -19,7 +19,7 @@ import { randomUUID, createHash } from 'node:crypto';
19
19
  import { appendFileSync, readFileSync, writeFileSync, mkdirSync, existsSync, rmSync, } from 'node:fs';
20
20
  import { homedir, platform } from 'node:os';
21
21
  import { dirname, join } from 'node:path';
22
- import { TelemetryEventKind, TELEMETRY_EVENT_VERSION, ProjectIdSource, isSessionScoped, } from '@reticlehq/core';
22
+ import { TelemetryEventKind, TELEMETRY_EVENT_VERSION, ProjectIdSource, isSessionScoped, } from '@reticlehq/core/telemetry';
23
23
  import { SERVER_VERSION } from '../version/server-version.js';
24
24
  const RETICLE_DIR = join(homedir(), '.reticle');
25
25
  const ID_FILE = join(RETICLE_DIR, 'telemetry-id');
@@ -67,9 +67,9 @@ const SEND_TIMEOUT_MS = 2000;
67
67
  * short-lived CLI process pays cold DNS and a cold route on top, which is exactly the case that
68
68
  * failed in the field and then succeeded on retry from a warmer process.
69
69
  */
70
- export const FEEDBACK_TIMEOUT_MS = 15_000;
71
- export const FEEDBACK_RETRIES = 1;
72
- export const FEEDBACK_RETRY_BACKOFF_MS = 750;
70
+ const FEEDBACK_TIMEOUT_MS = 15_000;
71
+ const FEEDBACK_RETRIES = 1;
72
+ const FEEDBACK_RETRY_BACKOFF_MS = 750;
73
73
  /**
74
74
  * The sender a `detach: true` emit runs in a disowned child (argv: [url, body]) — an in-process fetch
75
75
  * keeps Node's event loop alive until the POST finishes, which taxed every short-lived CLI command
@@ -10,7 +10,7 @@
10
10
  * Emitted from `runTool`, which is the one place both dispatch paths cross, so a tool added later is
11
11
  * covered without anybody remembering to cover it.
12
12
  */
13
- import { RefusalReason, type NoSessionReason } from '@reticlehq/core';
13
+ import { RefusalReason, type NoSessionReason } from '@reticlehq/core/telemetry';
14
14
  /** Record the branch code for the no-session error being thrown right now. */
15
15
  export declare function notePendingNoSessionReason(reason: NoSessionReason | undefined): void;
16
16
  /** A call that was served. Breaks the retry chain: what follows it is not a retry of anything. */
@@ -10,7 +10,7 @@
10
10
  * Emitted from `runTool`, which is the one place both dispatch paths cross, so a tool added later is
11
11
  * covered without anybody remembering to cover it.
12
12
  */
13
- import { RefusalReason, TelemetryActor, TelemetryEventKind, } from '@reticlehq/core';
13
+ import { RefusalReason, TelemetryActor, TelemetryEventKind, } from '@reticlehq/core/telemetry';
14
14
  import { getTelemetry } from './telemetry.js';
15
15
  /**
16
16
  * Refusal events one daemon run will send.
@@ -13,7 +13,7 @@
13
13
  import type { Session } from '../session/session.js';
14
14
  import { type SuccessorRegistry } from '../session/session-successor.js';
15
15
  import type { EvalResult } from '../events/predicate-eval.js';
16
- export interface FollowSuccessor {
16
+ interface FollowSuccessor {
17
17
  sessions: SuccessorRegistry;
18
18
  session: Session;
19
19
  verdict: EvalResult;
@@ -24,7 +24,7 @@ export interface FollowSuccessor {
24
24
  /** Re-ask the declared consequence on `next`, with whatever budget is left. */
25
25
  reevaluate: (next: Session, budgetMs: number) => Promise<EvalResult>;
26
26
  }
27
- export interface FollowedOutcome {
27
+ interface FollowedOutcome {
28
28
  session: Session;
29
29
  verdict: EvalResult;
30
30
  /** True when the wait moved to a new document, so the caller must reset its event cursor. */
@@ -39,3 +39,4 @@ export interface FollowedOutcome {
39
39
  * `awaitDocumentSuccessor` refuses to guess — a wrong follow drives somebody else's app.
40
40
  */
41
41
  export declare function followLostObservation(input: FollowSuccessor): Promise<FollowedOutcome>;
42
+ export {};
@@ -10,9 +10,10 @@
10
10
  * produce: it sends somebody to fix code that is not broken. "Nothing was acted on" is a far better
11
11
  * outcome than "unknown".
12
12
  */
13
+ import { isGlobalPressCall } from '@reticlehq/core';
14
+ import { unevaluablePredicateReason } from '../events/predicate-precheck.js';
13
15
  import { SessionReplacedError } from '../session/pending-commands.js';
14
16
  import { assertNativeInputSupported } from './act-danger.js';
15
- import { unevaluablePredicateReason } from '../events/predicate-precheck.js';
16
17
  /**
17
18
  * Refuse a sequence whose steps cannot be addressed.
18
19
  *
@@ -21,8 +22,9 @@ import { unevaluablePredicateReason } from '../events/predicate-precheck.js';
21
22
  * a stale-ref diagnosis for a missing locator — and the caller went looking for a re-render.
22
23
  *
23
24
  * `target` is the same locator `reticle_act` / `reticle_act_and_wait` take; the handler resolves it
24
- * with `resolveActTarget` before dispatch. This check only asks that every step names one of the
25
- * two, and it runs before the first step, so a typo in step three cannot leave one and two applied.
25
+ * with `resolveActTarget` before dispatch. This check asks that every step names one of the two,
26
+ * except a document-key press (Escape, Tab, a modifier shortcut), which is not aimed at an element.
27
+ * It runs before the first step, so a typo in step three cannot leave one and two applied.
26
28
  */
27
29
  /**
28
30
  * Keys an agent reaches for when it means "and prove this happened".
@@ -55,9 +57,12 @@ export function assertSequenceSteps(steps) {
55
57
  return;
56
58
  if (step['target'] !== undefined)
57
59
  return;
60
+ if (isGlobalPressCall(step))
61
+ return;
58
62
  throw new Error(`step ${String(i)} has no \`ref\` or \`target\`. ` +
59
63
  'Sequence steps take `ref` (from reticle_query/reticle_snapshot) or `target` ' +
60
64
  '(e.g. { testid } or { label }), the same locator reticle_act accepts. ' +
65
+ 'A press of Escape, Tab, or a modifier shortcut is a document key and needs neither. ' +
61
66
  'Nothing was acted on — the whole sequence is refused so a bad step cannot leave the earlier ones half-applied.');
62
67
  });
63
68
  }
@@ -10,5 +10,9 @@ import { type TargetResolution } from './resolve-target.js';
10
10
  *
11
11
  * `ref` wins when both are given, because it is the more specific instruction and silently
12
12
  * preferring the query would act on something the caller did not name.
13
+ *
14
+ * A document-key press (Escape, Tab, a modifier shortcut) is the one action that is not aimed at
15
+ * an element. It resolves to `{ kind: 'global' }` rather than refusing, so dismissing a dialog
16
+ * does not cost a snapshot.
13
17
  */
14
18
  export declare function resolveActTarget(session: Session, args: Record<string, unknown>): Promise<TargetResolution>;
@@ -7,10 +7,16 @@
7
7
  * dispatch out of the file that opens the window would have weakened a real invariant to satisfy a
8
8
  * line count. This resolves a TARGET and dispatches only QUERY, so that guard is untouched.
9
9
  */
10
- import { ReticleCommand } from '@reticlehq/core';
10
+ import { ReticleCommand, isGlobalPressCall } from '@reticlehq/core';
11
11
  import { normalizeQueryArgs } from './query-shape.js';
12
12
  import { resolveTargetRef } from './resolve-target.js';
13
13
  import { asRecord, asString } from './tools-helpers.js';
14
+ /**
15
+ * A press of Escape, Tab, or a modifier shortcut is a document key. Requiring a locator for it
16
+ * forced a snapshot just to name an element the keystroke is not about.
17
+ */
18
+ const MISSING_ACT_TARGET = 'pass `ref` (from reticle_query/reticle_snapshot) or `target` (e.g. { testid } or { role, name }). ' +
19
+ 'A press of Escape, Tab, or a modifier shortcut is a document key and needs neither.';
14
20
  /**
15
21
  * Resolve an action's element: an explicit `ref`, or a `target` query resolved in the SAME call.
16
22
  *
@@ -21,6 +27,10 @@ import { asRecord, asString } from './tools-helpers.js';
21
27
  *
22
28
  * `ref` wins when both are given, because it is the more specific instruction and silently
23
29
  * preferring the query would act on something the caller did not name.
30
+ *
31
+ * A document-key press (Escape, Tab, a modifier shortcut) is the one action that is not aimed at
32
+ * an element. It resolves to `{ kind: 'global' }` rather than refusing, so dismissing a dialog
33
+ * does not cost a snapshot.
24
34
  */
25
35
  export async function resolveActTarget(session, args) {
26
36
  const ref = asString(args['ref']);
@@ -28,10 +38,9 @@ export async function resolveActTarget(session, args) {
28
38
  return { kind: 'ref', ref };
29
39
  const target = args['target'];
30
40
  if (target === undefined) {
31
- return {
32
- kind: 'error',
33
- message: 'pass `ref` (from reticle_query/reticle_snapshot) or `target` (e.g. { testid } or { role, name }).',
34
- };
41
+ if (isGlobalPressCall(args))
42
+ return { kind: 'global', ref: '' };
43
+ return { kind: 'error', message: MISSING_ACT_TARGET };
35
44
  }
36
45
  const q = normalizeQueryArgs(asRecord(target));
37
46
  const out = await session.command(ReticleCommand.QUERY, {
@@ -4,7 +4,6 @@
4
4
  * native-input attempt itself lives in real-input-attempt.ts for the same reason.
5
5
  */
6
6
  import type { Session } from '../session/session.js';
7
- import { z } from 'zod';
8
7
  import { type ToolDef, type ToolDeps } from './tool-kit.js';
9
8
  /**
10
9
  * Single dispatch point for every ACT and ACT_SEQUENCE command.
@@ -18,5 +17,4 @@ import { type ToolDef, type ToolDeps } from './tool-kit.js';
18
17
  * base64 to the browser as if it were an inline content call.
19
18
  */
20
19
  export declare function actCommand(deps: ToolDeps, session: Session, actArgs: Record<string, unknown>, timeoutMs?: number): Promise<import('@reticlehq/core').CommandResult>;
21
- export declare const actionTypeEnum: z.ZodEnum<[string, ...string[]]>;
22
20
  export declare const ACT_TOOLS: ToolDef[];