@reticlehq/server 2.13.0 → 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 (451) 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/dev-server-wait.d.ts +8 -0
  233. package/dist/setup/dev-server-wait.js +3 -1
  234. package/dist/setup/drive-agent.d.ts +2 -3
  235. package/dist/setup/drive-agent.js +1 -1
  236. package/dist/setup/drive-plan.d.ts +3 -2
  237. package/dist/setup/ensure-daemon.d.ts +2 -1
  238. package/dist/setup/existing-app.d.ts +12 -0
  239. package/dist/setup/existing-app.js +13 -0
  240. package/dist/setup/init-host.d.ts +11 -0
  241. package/dist/setup/init-host.js +26 -0
  242. package/dist/setup/init-runtime.d.ts +4 -10
  243. package/dist/setup/init-runtime.js +23 -16
  244. package/dist/setup/license-key.d.ts +2 -1
  245. package/dist/setup/listeners.d.ts +2 -1
  246. package/dist/setup/loopback-probe-urls.d.ts +18 -0
  247. package/dist/setup/loopback-probe-urls.js +52 -0
  248. package/dist/setup/node-effects.d.ts +3 -0
  249. package/dist/setup/node-effects.js +26 -11
  250. package/dist/setup/page-probe.d.ts +5 -0
  251. package/dist/setup/relaunch.d.ts +2 -1
  252. package/dist/setup/run-setup.d.ts +5 -1
  253. package/dist/setup/run-setup.js +155 -48
  254. package/dist/setup/setup-command.d.ts +3 -2
  255. package/dist/setup/setup-command.js +8 -0
  256. package/dist/setup/setup-options.d.ts +5 -3
  257. package/dist/setup/setup-options.js +3 -2
  258. package/dist/setup/wait-progress.d.ts +28 -0
  259. package/dist/setup/wait-progress.js +43 -0
  260. package/dist/telemetry/app-instrumented.d.ts +2 -1
  261. package/dist/telemetry/app-instrumented.js +1 -1
  262. package/dist/telemetry/automation-hint.d.ts +1 -1
  263. package/dist/telemetry/automation-hint.js +1 -1
  264. package/dist/telemetry/cli-telemetry.js +1 -1
  265. package/dist/telemetry/connect-failure.d.ts +1 -1
  266. package/dist/telemetry/connect-failure.js +1 -1
  267. package/dist/telemetry/crash-cause.d.ts +3 -2
  268. package/dist/telemetry/crash-cause.js +1 -1
  269. package/dist/telemetry/daemon-telemetry.d.ts +3 -2
  270. package/dist/telemetry/daemon-telemetry.js +1 -1
  271. package/dist/telemetry/error-class.d.ts +3 -2
  272. package/dist/telemetry/error-class.js +1 -1
  273. package/dist/telemetry/feedback-cli.js +1 -1
  274. package/dist/telemetry/feedback-context.d.ts +3 -2
  275. package/dist/telemetry/feedback-context.js +5 -4
  276. package/dist/telemetry/feedback-local.d.ts +3 -2
  277. package/dist/telemetry/feedback.d.ts +4 -3
  278. package/dist/telemetry/feedback.js +1 -1
  279. package/dist/telemetry/git-facts.d.ts +2 -2
  280. package/dist/telemetry/git-facts.js +1 -1
  281. package/dist/telemetry/identify.d.ts +1 -1
  282. package/dist/telemetry/identify.js +1 -1
  283. package/dist/telemetry/init-telemetry.d.ts +2 -14
  284. package/dist/telemetry/init-telemetry.js +4 -13
  285. package/dist/telemetry/install-source.d.ts +7 -13
  286. package/dist/telemetry/install-source.js +7 -29
  287. package/dist/telemetry/license-activation.d.ts +3 -2
  288. package/dist/telemetry/license-activation.js +1 -1
  289. package/dist/telemetry/machine-snapshot.d.ts +1 -1
  290. package/dist/telemetry/mcp-connection.js +1 -1
  291. package/dist/telemetry/project-profile.d.ts +0 -14
  292. package/dist/telemetry/project-profile.js +1 -1
  293. package/dist/telemetry/proxy-telemetry.js +1 -1
  294. package/dist/telemetry/session-metrics.d.ts +1 -1
  295. package/dist/telemetry/session-metrics.js +1 -1
  296. package/dist/telemetry/telemetry.d.ts +1 -17
  297. package/dist/telemetry/telemetry.js +4 -4
  298. package/dist/telemetry/tool-refused.d.ts +1 -1
  299. package/dist/telemetry/tool-refused.js +1 -1
  300. package/dist/tools/act-observation.d.ts +3 -2
  301. package/dist/tools/act-preflight.js +8 -3
  302. package/dist/tools/act-target.d.ts +4 -0
  303. package/dist/tools/act-target.js +14 -5
  304. package/dist/tools/act-tools.d.ts +0 -2
  305. package/dist/tools/act-tools.js +45 -15
  306. package/dist/tools/assert-source.d.ts +30 -0
  307. package/dist/tools/assert-source.js +21 -0
  308. package/dist/tools/assert-verdict.d.ts +1 -1
  309. package/dist/tools/assert-verdict.js +14 -4
  310. package/dist/tools/browser-tools.js +28 -8
  311. package/dist/tools/complete-snapshot.d.ts +3 -2
  312. package/dist/tools/dynamic-tools.js +8 -0
  313. package/dist/tools/error-recovery.d.ts +10 -0
  314. package/dist/tools/error-recovery.js +23 -0
  315. package/dist/tools/feedback-tools.js +1 -1
  316. package/dist/tools/invoke-tool.js +2 -0
  317. package/dist/tools/lease-tools.d.ts +48 -20
  318. package/dist/tools/lease-tools.js +311 -76
  319. package/dist/tools/lineage-tools.d.ts +14 -0
  320. package/dist/tools/lineage-tools.js +64 -0
  321. package/dist/tools/merge-tools.js +1 -3
  322. package/dist/tools/navigate-arrival.d.ts +45 -1
  323. package/dist/tools/navigate-arrival.js +39 -6
  324. package/dist/tools/navigate-result.d.ts +8 -1
  325. package/dist/tools/navigate-result.js +14 -4
  326. package/dist/tools/numeric-bounds.d.ts +0 -11
  327. package/dist/tools/numeric-bounds.js +4 -4
  328. package/dist/tools/observe-tools.js +22 -26
  329. package/dist/tools/observed-nothing.d.ts +9 -0
  330. package/dist/tools/observed-nothing.js +2 -1
  331. package/dist/tools/read-tools.js +12 -17
  332. package/dist/tools/real-input-attempt.d.ts +14 -6
  333. package/dist/tools/real-input-attempt.js +75 -18
  334. package/dist/tools/reconcile-tools.js +2 -1
  335. package/dist/tools/reload-result.d.ts +6 -1
  336. package/dist/tools/reload-result.js +7 -2
  337. package/dist/tools/resolve-target.d.ts +7 -1
  338. package/dist/tools/resolve-target.js +72 -9
  339. package/dist/tools/settle-in-flight.d.ts +1 -1
  340. package/dist/tools/settle-in-flight.js +9 -2
  341. package/dist/tools/snapshot-delta.d.ts +24 -1
  342. package/dist/tools/snapshot-delta.js +66 -7
  343. package/dist/tools/tool-names.d.ts +1 -0
  344. package/dist/tools/tool-names.js +1 -0
  345. package/dist/tools/tool-surface.js +20 -2
  346. package/dist/tools/tools.js +120 -11
  347. package/dist/tools/verify-next-baton.d.ts +2 -1
  348. package/dist/update/sdk-sync.d.ts +1 -1
  349. package/dist/update/sdk-sync.js +1 -1
  350. package/dist/update/updater.js +1 -1
  351. package/dist/version/sdk-fix.d.ts +2 -1
  352. package/dist/version/version-skew.d.ts +0 -8
  353. package/dist/version/version-skew.js +1 -1
  354. package/docs/README.md +8 -6
  355. package/docs/actions.mdx +1 -1
  356. package/docs/agent-cheatsheet.md +4 -2
  357. package/docs/architecture.md +1 -1
  358. package/docs/cli/mcp.mdx +3 -1
  359. package/docs/cli/watch.mdx +1 -1
  360. package/docs/cli.mdx +1 -1
  361. package/docs/desktop.mdx +1 -1
  362. package/docs/docs.json +8 -3
  363. package/docs/faq.mdx +9 -0
  364. package/docs/first-drive.md +136 -0
  365. package/docs/frameworks.mdx +29 -7
  366. package/docs/gate-plan.md +2 -2
  367. package/docs/gates.md +19 -11
  368. package/docs/getting-started.md +7 -1
  369. package/docs/http-transport.md +164 -0
  370. package/docs/index.mdx +5 -3
  371. package/docs/install-manual.mdx +1 -1
  372. package/docs/packages/tauri.mdx +1 -1
  373. package/docs/packages.mdx +15 -3
  374. package/docs/platform-integration.md +1 -1
  375. package/docs/predicates.mdx +2 -0
  376. package/docs/system-map.md +2 -2
  377. package/docs/telemetry-contract.md +4 -4
  378. package/docs/telemetry-events.mdx +1 -1
  379. package/docs/telemetry.md +3 -3
  380. package/docs/tools-navigate.mdx +14 -6
  381. package/docs/usage.md +4 -4
  382. package/package.json +7 -4
  383. package/dist/init/agent-rules.d.ts +0 -116
  384. package/dist/init/agent-rules.js +0 -279
  385. package/dist/init/app-choice.d.ts +0 -20
  386. package/dist/init/app-choice.js +0 -25
  387. package/dist/init/astro-host.d.ts +0 -21
  388. package/dist/init/astro-host.js +0 -27
  389. package/dist/init/astro-patch.d.ts +0 -33
  390. package/dist/init/astro-patch.js +0 -300
  391. package/dist/init/capabilities.d.ts +0 -40
  392. package/dist/init/capabilities.js +0 -150
  393. package/dist/init/closing-hint.d.ts +0 -36
  394. package/dist/init/closing-hint.js +0 -120
  395. package/dist/init/connect-steps.d.ts +0 -2
  396. package/dist/init/connect-steps.js +0 -50
  397. package/dist/init/cra.d.ts +0 -79
  398. package/dist/init/cra.js +0 -178
  399. package/dist/init/csp-check.d.ts +0 -38
  400. package/dist/init/csp-check.js +0 -107
  401. package/dist/init/csp-doctor.d.ts +0 -32
  402. package/dist/init/csp-doctor.js +0 -54
  403. package/dist/init/desktop-doctor.d.ts +0 -41
  404. package/dist/init/desktop-doctor.js +0 -198
  405. package/dist/init/detect.d.ts +0 -96
  406. package/dist/init/detect.js +0 -209
  407. package/dist/init/dev-script.d.ts +0 -50
  408. package/dist/init/dev-script.js +0 -66
  409. package/dist/init/format-generated.d.ts +0 -18
  410. package/dist/init/format-generated.js +0 -39
  411. package/dist/init/install-hint.d.ts +0 -9
  412. package/dist/init/install-hint.js +0 -29
  413. package/dist/init/mcp-clients.d.ts +0 -89
  414. package/dist/init/mcp-clients.js +0 -299
  415. package/dist/init/mcp-registered.d.ts +0 -12
  416. package/dist/init/mcp-registered.js +0 -14
  417. package/dist/init/mcp.d.ts +0 -89
  418. package/dist/init/mcp.js +0 -129
  419. package/dist/init/next-patch.d.ts +0 -39
  420. package/dist/init/next-patch.js +0 -196
  421. package/dist/init/node-io.d.ts +0 -7
  422. package/dist/init/node-io.js +0 -117
  423. package/dist/init/non-js-project.d.ts +0 -27
  424. package/dist/init/non-js-project.js +0 -84
  425. package/dist/init/patch-kind.d.ts +0 -20
  426. package/dist/init/patch-kind.js +0 -10
  427. package/dist/init/plan-framework.d.ts +0 -64
  428. package/dist/init/plan-framework.js +0 -565
  429. package/dist/init/plan.d.ts +0 -242
  430. package/dist/init/plan.js +0 -703
  431. package/dist/init/preflight.d.ts +0 -28
  432. package/dist/init/preflight.js +0 -38
  433. package/dist/init/project-id.d.ts +0 -12
  434. package/dist/init/project-id.js +0 -25
  435. package/dist/init/refresh-rules.d.ts +0 -39
  436. package/dist/init/refresh-rules.js +0 -51
  437. package/dist/init/run.d.ts +0 -117
  438. package/dist/init/run.js +0 -806
  439. package/dist/init/slash-command.d.ts +0 -27
  440. package/dist/init/slash-command.js +0 -132
  441. package/dist/init/snippets.d.ts +0 -134
  442. package/dist/init/snippets.js +0 -572
  443. package/dist/init/vite-config.d.ts +0 -18
  444. package/dist/init/vite-config.js +0 -114
  445. package/dist/init/windows-quote.d.ts +0 -38
  446. package/dist/init/windows-quote.js +0 -70
  447. package/dist/init/workspace-apps.d.ts +0 -30
  448. package/dist/init/workspace-apps.js +0 -178
  449. package/dist/project/remember-project.d.ts +0 -24
  450. package/dist/project/remember-project.js +0 -40
  451. /package/dist/{init → setup}/confirm.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { EventType, REDACTED_VALUE, defaultIsSensitiveKey, scrubKnownSecrets, } from '@reticlehq/core';
1
+ import { EventType, REDACTED_VALUE, URL_RAW, defaultIsSensitiveKey, netUrlFields, scrubKnownSecrets, urlForMatch, } from '@reticlehq/core';
2
2
  import { drivenRedactionPolicy } from './driven-redaction.js';
3
3
  /** Bound on a captured wire body — matches the in-page capture so the two are comparable. */
4
4
  const MAX_WIRE_BODY_CHARS = 8192;
@@ -30,8 +30,17 @@ function redactByKey(value, policy) {
30
30
  }
31
31
  return value;
32
32
  }
33
+ /**
34
+ * Redact and bound a captured wire body, returning the value AND whether the bound was reached.
35
+ *
36
+ * The report is the point. This body is taken raw off the network stack, it is capped, and the cap is
37
+ * reached by ordinary payloads (a bulk save, a base64 attachment, a rich-text field). Returning the
38
+ * shortened string alone let a partial capture be read as a whole one, which is the shape the
39
+ * lossy-transform rule exists to forbid.
40
+ */
33
41
  function projectWireBody(raw, policy) {
34
- const bounded = raw.length > MAX_WIRE_BODY_CHARS ? raw.slice(0, MAX_WIRE_BODY_CHARS) : raw;
42
+ const truncated = raw.length > MAX_WIRE_BODY_CHARS;
43
+ const bounded = truncated ? raw.slice(0, MAX_WIRE_BODY_CHARS) : raw;
35
44
  const byShape = scrubKnownSecrets(bounded);
36
45
  // Prefer a STRUCTURAL pass. A sensitive key must be redacted regardless of its value type — a
37
46
  // numeric PIN (`"password": 1234`), a token array, a nested credential object — and the old
@@ -39,16 +48,17 @@ function projectWireBody(raw, policy) {
39
48
  // straight to the agent's context and the on-disk journal. Parsing and walking redacts them by key
40
49
  // whatever the shape.
41
50
  try {
42
- return JSON.stringify(redactByKey(JSON.parse(byShape), policy));
51
+ return { body: JSON.stringify(redactByKey(JSON.parse(byShape), policy)), truncated };
43
52
  }
44
53
  catch {
45
54
  // Not JSON (a truncated capture, or a form-encoded body — the shape a login form actually POSTs).
46
55
  // Two best-effort sweeps, because a password lives in both: the `"key":"string"` JSON fragment a
47
56
  // truncated body still contains, and the `key=value` pair of `application/x-www-form-urlencoded`,
48
57
  // which neither the JSON path nor the old regex ever touched — so `password=hunter2` leaked.
49
- return byShape
58
+ const body = byShape
50
59
  .replace(/"([^"]+)"\s*:\s*"([^"]*)"/g, (whole, key) => policy.isSensitiveKey(key) ? `"${key}":"${REDACTED_VALUE}"` : whole)
51
60
  .replace(/([^&?=\s]+)=([^&\s]*)/g, (whole, key) => policy.isSensitiveKey(key) ? `${key}=${REDACTED_VALUE}` : whole);
61
+ return { body, truncated };
52
62
  }
53
63
  }
54
64
  /**
@@ -76,22 +86,36 @@ function projectHeaders(headers, policy) {
76
86
  * about the function's inputs.
77
87
  */
78
88
  export function buildNetworkDetail(raw, policy = DEFAULT_POLICY) {
89
+ const wireBody = raw.requestBody === undefined || 0 === raw.requestBody.length
90
+ ? undefined
91
+ : projectWireBody(raw.requestBody, policy);
79
92
  return {
80
- url: raw.url,
93
+ ...netUrlFields(raw.url, policy.isSensitiveKey),
81
94
  ...(raw.method === undefined ? {} : { method: raw.method }),
82
95
  status: raw.status,
83
96
  headers: projectHeaders(raw.headers, policy),
84
97
  ...(raw.resourceType === undefined ? {} : { resourceType: raw.resourceType }),
85
- ...(raw.requestBody === undefined || 0 === raw.requestBody.length
98
+ ...(wireBody === undefined
86
99
  ? {}
87
- : { requestBody: projectWireBody(raw.requestBody, policy) }),
100
+ : {
101
+ requestBody: wireBody.body,
102
+ ...(wireBody.truncated ? { requestBodyTruncated: true } : {}),
103
+ }),
88
104
  ...(raw.pageUrl === undefined || 0 === raw.pageUrl.length ? {} : { pageUrl: raw.pageUrl }),
89
105
  };
90
106
  }
91
- function keyOf(url, method) {
107
+ /**
108
+ * The merge key: method plus the RAW url when the observation kept one, else the displayed url.
109
+ *
110
+ * Never the displayed url alone. The two sides redact independently, the SDK under the page's own
111
+ * policy and this module under the daemon's, so the one field they were being compared on is the one
112
+ * field redaction is allowed to rewrite. Keying on `urlForMatch` compares what was actually
113
+ * requested, which is identical on both sides by construction.
114
+ */
115
+ function keyOf(data) {
116
+ const method = data['method'];
92
117
  const m = 'string' === typeof method ? method.toUpperCase() : '';
93
- const u = 'string' === typeof url ? url : '';
94
- return `${m} ${u}`;
118
+ return `${m} ${urlForMatch(data)}`;
95
119
  }
96
120
  /**
97
121
  * Fold each NET_DETAIL onto the matching in-page NET_REQUEST (by method+url), enriching it with the
@@ -103,13 +127,13 @@ export function mergeNetworkDetail(events) {
103
127
  const requestByKey = new Map();
104
128
  for (const e of events) {
105
129
  if (e.type === EventType.NET_REQUEST)
106
- requestByKey.set(keyOf(e.data['url'], e.data['method']), e);
130
+ requestByKey.set(keyOf(e.data), e);
107
131
  }
108
132
  const out = [];
109
133
  const enriched = new Map();
110
134
  for (const e of events) {
111
135
  if (e.type === EventType.NET_DETAIL) {
112
- const match = requestByKey.get(keyOf(e.data['url'], e.data['method']));
136
+ const match = requestByKey.get(keyOf(e.data));
113
137
  if (match === undefined) {
114
138
  out.push(e); // unmatched detail survives on its own
115
139
  continue;
@@ -133,6 +157,14 @@ export function mergeNetworkDetail(events) {
133
157
  data['requestBodyDivergedFromPage'] = true;
134
158
  }
135
159
  data['requestBody'] = wireBody;
160
+ // The caveat belongs to the body it describes, and this is the one field that REPLACES
161
+ // rather than fills a gap. Carried over when the wire body was cut, deleted when it was not:
162
+ // a stale `true` from the page capture would caveat a body that is now whole, and a missing
163
+ // one would let a cut body read as complete.
164
+ if (true === e.data['requestBodyTruncated'])
165
+ data['requestBodyTruncated'] = true;
166
+ else
167
+ delete data['requestBodyTruncated'];
136
168
  }
137
169
  enriched.set(match, { ...base, data });
138
170
  continue; // the detail is absorbed into the request
@@ -73,10 +73,11 @@ export function toRules(value) {
73
73
  export const NETWORK_MOCK_TOOLS = [
74
74
  {
75
75
  name: ReticleTool.NETWORK_MOCK,
76
- description: 'Stub or intercept network requests on the DRIVEN page (needs `reticle drive`): return a 500, ' +
77
- 'force offline (abort), or delay a response — so you can deterministically test error and edge ' +
78
- 'states without touching the backend ("verify the app handles a failed payment"). Pass `mocks` ' +
79
- '(first matching rule wins); pass an empty array or `clear: true` to turn mocking off.',
76
+ description: 'Stub or intercept network requests on a driven page (`reticle drive` / RETICLE_CDP_URL) or a ' +
77
+ 'leased Playwright tab (`reticle_lease acquire`): return a 500, force offline (abort), or delay ' +
78
+ 'a response — so you can deterministically test error and edge states without touching the ' +
79
+ 'backend ("verify the app handles a failed payment"). Pass `mocks` (first matching rule wins); ' +
80
+ 'pass an empty array or `clear: true` to turn mocking off.',
80
81
  inputSchema: {
81
82
  // The rule fields each carry their own `.describe()` on `ruleShape`, but the params
82
83
  // view reads only the top-level description of each entry, so those are flattened
@@ -97,21 +98,27 @@ export const NETWORK_MOCK_TOOLS = [
97
98
  recommendation: z.string().optional(),
98
99
  },
99
100
  handler: async (deps, args) => {
100
- const provider = mockProvider(deps);
101
- if (provider === undefined) {
102
- // Mocking needs a browser Reticle drives; a synthetic in-page session can't intercept the network.
103
- return {
104
- applied: false,
105
- count: 0,
106
- ok: false,
107
- reason: CDP_NO_PROVIDER_REASON,
108
- recommendation: CDP_NO_PROVIDER_RECOMMENDATION,
109
- };
110
- }
111
101
  const session = deps.sessions.resolve(asString(args['sessionId']));
112
102
  const rules = true === args['clear'] ? [] : toRules(args['mocks']);
113
- const applied = await provider.setMocks(session.url, rules);
114
- return { applied, count: applied ? rules.length : 0 };
103
+ const provider = mockProvider(deps);
104
+ if (provider !== undefined) {
105
+ const applied = await provider.setMocks(session.url, rules);
106
+ if (applied)
107
+ return { applied: true, count: rules.length };
108
+ }
109
+ // A lease is a Playwright-owned page — CDP intercept was always there, this tool just had no
110
+ // route to it. Tried after the driven provider: when both exist, drive is the page the caller
111
+ // means, and a lease is the fallback rather than a competitor.
112
+ const leased = await deps.pool?.setMocksLease(session.id, rules);
113
+ if (true === leased)
114
+ return { applied: true, count: rules.length };
115
+ return {
116
+ applied: false,
117
+ count: 0,
118
+ ok: false,
119
+ reason: CDP_NO_PROVIDER_REASON,
120
+ recommendation: CDP_NO_PROVIDER_RECOMMENDATION,
121
+ };
115
122
  },
116
123
  },
117
124
  ];
@@ -1,6 +1,6 @@
1
1
  import { chromiumLaunchOptions } from '../chromium-launch-options.js';
2
2
  import { gotoOptions } from '../pool/playwright-launcher.js';
3
- import { BrowserLaunchKind } from '@reticlehq/core';
3
+ import { BrowserLaunchKind } from '@reticlehq/core/telemetry';
4
4
  import { getSessionMetrics } from '../telemetry/session-metrics.js';
5
5
  import { classifyConnectFailure } from '../telemetry/connect-failure.js';
6
6
  import { ActionType, DriveErrorCode, DRIVE_PLAYWRIGHT_MISSING_MSG } from '@reticlehq/core';
@@ -34,22 +34,34 @@ export const VIEWPORT_TOOLS = [
34
34
  recommendation: z.string().optional(),
35
35
  },
36
36
  handler: async (deps, args) => {
37
- const provider = viewportProvider(deps);
38
- if (provider === undefined) {
39
- return {
40
- applied: false,
41
- width: 0,
42
- height: 0,
43
- ok: false,
44
- reason: CDP_NO_PROVIDER_REASON,
45
- recommendation: CDP_NO_PROVIDER_RECOMMENDATION,
46
- };
47
- }
48
37
  const width = clampDim(args['width']);
49
38
  const height = clampDim(args['height']);
50
39
  const session = deps.sessions.resolve(asString(args['sessionId']));
51
- const applied = await provider.setViewport(session.url, { width, height });
52
- return { applied, width, height };
40
+ const provider = viewportProvider(deps);
41
+ if (provider !== undefined) {
42
+ const applied = await provider.setViewport(session.url, { width, height });
43
+ if (applied)
44
+ return { applied: true, width, height };
45
+ }
46
+ // A lease is a Playwright-owned page, so the resize was always possible — this tool just had
47
+ // no route to it. Tried after the driven provider, on the same rule reticle_network_mock
48
+ // follows: when both exist, drive is the page the caller means and a lease is the fallback.
49
+ //
50
+ // Without this, `reticle_viewport` refused on every SDK-only install, which is the DEFAULT
51
+ // install. Reported from the field: mobile-only UI — a `lg:hidden` hamburger, a drawer that
52
+ // only mounts under a breakpoint — could not be driven at a desktop viewport at all, and the
53
+ // recommendation printed alongside the refusal asked the reader to install a second browser.
54
+ const leased = await deps.pool?.setViewportLease(session.id, { width, height });
55
+ if (true === leased)
56
+ return { applied: true, width, height };
57
+ return {
58
+ applied: false,
59
+ width: 0,
60
+ height: 0,
61
+ ok: false,
62
+ reason: CDP_NO_PROVIDER_REASON,
63
+ recommendation: CDP_NO_PROVIDER_RECOMMENDATION,
64
+ };
53
65
  },
54
66
  },
55
67
  ];
@@ -1,14 +1,4 @@
1
1
  import type { ToolDeps } from '../tools/tool-kit.js';
2
- /**
3
- * The ledger id a piece of inline prose is declared under.
4
- *
5
- * Derived from the statement rather than minted, so the same sentence declared on five verdicts is
6
- * one row rather than five, and a DIFFERENT sentence is a different row rather than a false
7
- * amendment of the first. The slug is there because the id is what an agent later types to reference
8
- * the intent, and a bare digest is unreadable; the digest is there because the slug is truncated and
9
- * two long statements sharing a prefix must not share a row.
10
- */
11
- export declare function inlineIntentId(statement: string): string;
12
2
  /** What `provenBy` records: which tool drew the verdict, and when. */
13
3
  export declare function inlineVerdictId(tool: string, at: number): string;
14
4
  export declare function surfaceForInlineIntent(url: string | undefined, flow: string | undefined,
@@ -32,7 +32,7 @@ const SLUG_EDGES = /^-+|-+$/g;
32
32
  * the intent, and a bare digest is unreadable; the digest is there because the slug is truncated and
33
33
  * two long statements sharing a prefix must not share a row.
34
34
  */
35
- export function inlineIntentId(statement) {
35
+ function inlineIntentId(statement) {
36
36
  const slug = statement
37
37
  .toLowerCase()
38
38
  .replace(NON_SLUG, SLUG_SEPARATOR)
@@ -19,14 +19,14 @@
19
19
  * an older build still reading the flat file keeps working, because nothing removes it. Deleting it
20
20
  * is a separate decision somebody can take once they believe the migration.
21
21
  */
22
- import { type Intent } from '@reticlehq/core';
22
+ import { type Intent } from '@reticlehq/core/artifacts';
23
23
  import type { FileSystemPort } from '../project/fs-port.js';
24
24
  import { IntentStatus, type IntentIndex, type IntentRecord } from './intent-shard.js';
25
25
  export interface Clock {
26
26
  now: () => number;
27
27
  }
28
28
  /** What a caller supplies to write an intent. Everything optional is genuinely optional. */
29
- export interface IntentInput {
29
+ interface IntentInput {
30
30
  id: string;
31
31
  statement: string;
32
32
  subject?: string | undefined;
@@ -70,3 +70,4 @@ export declare class IntentShardStore {
70
70
  subjects: string[];
71
71
  }>;
72
72
  }
73
+ export {};
@@ -19,7 +19,7 @@
19
19
  * an older build still reading the flat file keeps working, because nothing removes it. Deleting it
20
20
  * is a separate decision somebody can take once they believe the migration.
21
21
  */
22
- import { parseIntentFile } from '@reticlehq/core';
22
+ import { parseIntentFile } from '@reticlehq/core/artifacts';
23
23
  import { reticleDirPaths } from '../project/reticle-dir.js';
24
24
  import { withFileLock } from '../project/file-lock.js';
25
25
  import { subjectFor } from './intent-subject.js';
@@ -42,9 +42,8 @@
42
42
  * invent them, and a store that rejected incomplete records would simply not be written to.
43
43
  */
44
44
  import { z } from 'zod';
45
- import { type Intent } from '@reticlehq/core';
45
+ import { type Intent } from '@reticlehq/core/artifacts';
46
46
  import type { FileSystemPort } from '../project/fs-port.js';
47
- export declare const INTENT_SHARD_VERSION = 1;
48
47
  /**
49
48
  * How settled a record is.
50
49
  *
@@ -64,7 +63,7 @@ export declare const IntentStatus: {
64
63
  readonly STALE: "stale";
65
64
  };
66
65
  export type IntentStatus = (typeof IntentStatus)[keyof typeof IntentStatus];
67
- export declare const IntentRecordSchema: z.ZodObject<{
66
+ declare const IntentRecordSchema: z.ZodObject<{
68
67
  id: z.ZodString;
69
68
  statement: z.ZodString;
70
69
  state: z.ZodEnum<["declared", "bound", "proved"]>;
@@ -75,12 +74,12 @@ export declare const IntentRecordSchema: z.ZodObject<{
75
74
  flow: z.ZodOptional<z.ZodString>;
76
75
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
77
76
  }, "strip", z.ZodTypeAny, {
78
- flow?: string | undefined;
79
77
  route?: string | undefined;
78
+ flow?: string | undefined;
80
79
  files?: string[] | undefined;
81
80
  }, {
82
- flow?: string | undefined;
83
81
  route?: string | undefined;
82
+ flow?: string | undefined;
84
83
  files?: string[] | undefined;
85
84
  }>>;
86
85
  provenBy: z.ZodOptional<z.ZodObject<{
@@ -124,8 +123,8 @@ export declare const IntentRecordSchema: z.ZodObject<{
124
123
  statement: string;
125
124
  declaredAt: number;
126
125
  surface?: {
127
- flow?: string | undefined;
128
126
  route?: string | undefined;
127
+ flow?: string | undefined;
129
128
  files?: string[] | undefined;
130
129
  } | undefined;
131
130
  source?: string | undefined;
@@ -149,8 +148,8 @@ export declare const IntentRecordSchema: z.ZodObject<{
149
148
  statement: string;
150
149
  declaredAt: number;
151
150
  surface?: {
152
- flow?: string | undefined;
153
151
  route?: string | undefined;
152
+ flow?: string | undefined;
154
153
  files?: string[] | undefined;
155
154
  } | undefined;
156
155
  source?: string | undefined;
@@ -182,12 +181,12 @@ export declare const IntentShardSchema: z.ZodObject<{
182
181
  flow: z.ZodOptional<z.ZodString>;
183
182
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
184
183
  }, "strip", z.ZodTypeAny, {
185
- flow?: string | undefined;
186
184
  route?: string | undefined;
185
+ flow?: string | undefined;
187
186
  files?: string[] | undefined;
188
187
  }, {
189
- flow?: string | undefined;
190
188
  route?: string | undefined;
189
+ flow?: string | undefined;
191
190
  files?: string[] | undefined;
192
191
  }>>;
193
192
  provenBy: z.ZodOptional<z.ZodObject<{
@@ -231,8 +230,8 @@ export declare const IntentShardSchema: z.ZodObject<{
231
230
  statement: string;
232
231
  declaredAt: number;
233
232
  surface?: {
234
- flow?: string | undefined;
235
233
  route?: string | undefined;
234
+ flow?: string | undefined;
236
235
  files?: string[] | undefined;
237
236
  } | undefined;
238
237
  source?: string | undefined;
@@ -256,8 +255,8 @@ export declare const IntentShardSchema: z.ZodObject<{
256
255
  statement: string;
257
256
  declaredAt: number;
258
257
  surface?: {
259
- flow?: string | undefined;
260
258
  route?: string | undefined;
259
+ flow?: string | undefined;
261
260
  files?: string[] | undefined;
262
261
  } | undefined;
263
262
  source?: string | undefined;
@@ -284,8 +283,8 @@ export declare const IntentShardSchema: z.ZodObject<{
284
283
  statement: string;
285
284
  declaredAt: number;
286
285
  surface?: {
287
- flow?: string | undefined;
288
286
  route?: string | undefined;
287
+ flow?: string | undefined;
289
288
  files?: string[] | undefined;
290
289
  } | undefined;
291
290
  source?: string | undefined;
@@ -313,8 +312,8 @@ export declare const IntentShardSchema: z.ZodObject<{
313
312
  statement: string;
314
313
  declaredAt: number;
315
314
  surface?: {
316
- flow?: string | undefined;
317
315
  route?: string | undefined;
316
+ flow?: string | undefined;
318
317
  files?: string[] | undefined;
319
318
  } | undefined;
320
319
  source?: string | undefined;
@@ -336,7 +335,7 @@ export declare const IntentShardSchema: z.ZodObject<{
336
335
  export type IntentShard = z.infer<typeof IntentShardSchema>;
337
336
  export declare const summarise: (statement: string) => string;
338
337
  /** One line per intent: enough to decide whether to open the shard, and no more. */
339
- export declare const IntentIndexEntrySchema: z.ZodObject<{
338
+ declare const IntentIndexEntrySchema: z.ZodObject<{
340
339
  id: z.ZodString;
341
340
  subject: z.ZodString;
342
341
  statement: z.ZodString;
@@ -409,3 +408,4 @@ export declare const shardsFrom: (records: readonly IntentRecord[]) => IntentSha
409
408
  export declare const serialise: (value: unknown) => string;
410
409
  /** Read + validate one JSON file, failing soft: a hand-merged file with a conflict marker is real. */
411
410
  export declare const readJsonFile: <T>(fs: FileSystemPort, path: string, parse: (raw: unknown) => T, fallback: T) => Promise<T>;
411
+ export {};
@@ -42,9 +42,9 @@
42
42
  * invent them, and a store that rejected incomplete records would simply not be written to.
43
43
  */
44
44
  import { z } from 'zod';
45
- import { IntentSchema } from '@reticlehq/core';
45
+ import { IntentSchema } from '@reticlehq/core/artifacts';
46
46
  import { subjectFor, UNSORTED_SUBJECT } from './intent-subject.js';
47
- export const INTENT_SHARD_VERSION = 1;
47
+ const INTENT_SHARD_VERSION = 1;
48
48
  /** Byte-stable writes: an unchanged shard produces no diff, so the ones that DID change stand out. */
49
49
  const JSON_INDENT = 2;
50
50
  /**
@@ -65,7 +65,7 @@ export const IntentStatus = {
65
65
  /** Believed out of date — kept, because deleting the record loses the fact it was ever true. */
66
66
  STALE: 'stale',
67
67
  };
68
- export const IntentRecordSchema = IntentSchema.extend({
68
+ const IntentRecordSchema = IntentSchema.extend({
69
69
  /** Which shard this lives in. Stored as well as implied, so a file read alone is self-describing. */
70
70
  subject: z.string().min(1),
71
71
  status: z.enum([
@@ -99,7 +99,7 @@ export const IntentShardSchema = z.object({
99
99
  const SUMMARY_MAX = 72;
100
100
  export const summarise = (statement) => statement.length <= SUMMARY_MAX ? statement : `${statement.slice(0, SUMMARY_MAX - 1).trimEnd()}…`;
101
101
  /** One line per intent: enough to decide whether to open the shard, and no more. */
102
- export const IntentIndexEntrySchema = z.object({
102
+ const IntentIndexEntrySchema = z.object({
103
103
  id: z.string().min(1),
104
104
  subject: z.string().min(1),
105
105
  statement: z.string().min(1),
@@ -1,4 +1,4 @@
1
- import { type Intent, type IntentSurface } from '@reticlehq/core';
1
+ import { type Intent, type IntentSurface } from '@reticlehq/core/artifacts';
2
2
  import type { FileSystemPort } from '../project/fs-port.js';
3
3
  export interface Clock {
4
4
  now: () => number;
@@ -1,4 +1,4 @@
1
- import { bindIntent, declareIntent, dischargeIntent, emptyIntentFile, openIntents, parseIntentFile, upsertIntent, } from '@reticlehq/core';
1
+ import { bindIntent, declareIntent, dischargeIntent, emptyIntentFile, openIntents, parseIntentFile, upsertIntent, } from '@reticlehq/core/artifacts';
2
2
  import { reticleDirPaths } from '../project/reticle-dir.js';
3
3
  import { withFileLock } from '../project/file-lock.js';
4
4
  /**
@@ -25,7 +25,7 @@
25
25
  /** Where an intent goes when nothing about it says where it belongs. Deliberately obvious. */
26
26
  export declare const UNSORTED_SUBJECT = "unsorted";
27
27
  /** Shape enough of an intent to derive a subject, without importing the whole record. */
28
- export interface SubjectEvidence {
28
+ interface SubjectEvidence {
29
29
  subject?: string | undefined;
30
30
  surface?: {
31
31
  route?: string | undefined;
@@ -43,3 +43,4 @@ export declare const slugifySubject: (raw: string) => string;
43
43
  * that loses records.
44
44
  */
45
45
  export declare const subjectFor: (evidence: SubjectEvidence) => string;
46
+ export {};
@@ -1,4 +1,4 @@
1
- import type { Intent } from '@reticlehq/core';
1
+ import type { Intent } from '@reticlehq/core/artifacts';
2
2
  import type { ToolDeps } from '../tools/tool-kit.js';
3
3
  /**
4
4
  * What this project still owes — the ledger's undischarged intents, for a tool that has `deps` and a
@@ -20,7 +20,7 @@ export declare function openSessionIntents(deps: ToolDeps, sessionId: string | u
20
20
  */
21
21
  export declare function allSessionIntents(deps: ToolDeps, sessionId: string | undefined): Promise<Intent[]>;
22
22
  /** What the ledger still owes once this verdict's own intent is discharged, and how old it is. */
23
- export interface IntentDebt {
23
+ interface IntentDebt {
24
24
  openIntentCount: number;
25
25
  /**
26
26
  * Age of the OLDEST open intent, in ms. Absent when nothing is open.
@@ -40,3 +40,4 @@ export interface IntentDebt {
40
40
  * by one verdict, and the result still said "1 declared intent(s) are still unproved".
41
41
  */
42
42
  export declare function intentDebt(open: readonly Intent[], dischargedId: string | undefined, now: number): IntentDebt;
43
+ export {};
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { type KeyObject } from 'node:crypto';
14
14
  import { z } from 'zod';
15
- import { LicenseActivation } from '@reticlehq/core';
15
+ import { LicenseActivation } from '@reticlehq/core/telemetry';
16
16
  /** Outcome of verifying a license key. */
17
17
  export declare const LicenseStatus: {
18
18
  readonly VALID: "valid";
@@ -40,14 +40,14 @@ declare const LicensePayloadSchema: z.ZodObject<{
40
40
  exp: z.ZodNumber;
41
41
  features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
42
  }, "strip", z.ZodTypeAny, {
43
- lid: string;
44
43
  org: string;
44
+ lid: string;
45
45
  plan: string;
46
46
  exp: number;
47
47
  features?: string[] | undefined;
48
48
  }, {
49
- lid: string;
50
49
  org: string;
50
+ lid: string;
51
51
  plan: string;
52
52
  exp: number;
53
53
  features?: string[] | undefined;
@@ -116,7 +116,7 @@ export declare function assertEnterprise(feature: string, ctx: GateContext, env?
116
116
  export declare const LICENSE_KEY_ENV = "RETICLE_LICENSE_KEY";
117
117
  export declare const LICENSE_PUBLIC_KEY_ENV = "RETICLE_LICENSE_PUBLIC_KEY";
118
118
  /** The human-facing state of enterprise activation on this machine (what `reticle license status` shows). */
119
- export interface LicenseReport {
119
+ interface LicenseReport {
120
120
  /**
121
121
  * Typed against core's closed list rather than re-listing the strings here: this status is reported
122
122
  * on every telemetry event, so a member added in one place and not the other is a silently
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import { createPublicKey, sign as edSign, verify as edVerify } from 'node:crypto';
14
14
  import { z } from 'zod';
15
- import { LicenseActivation } from '@reticlehq/core';
15
+ import { LicenseActivation } from '@reticlehq/core/telemetry';
16
16
  /** Outcome of verifying a license key. */
17
17
  export const LicenseStatus = {
18
18
  VALID: 'valid',
@@ -69,7 +69,7 @@ export declare function attachState(stateDir: string, port: number): AttachState
69
69
  */
70
70
  export declare function describeAttachState(state: AttachState): string | undefined;
71
71
  /** What `reticle status` reports about the client side of the install. */
72
- export interface AttachStatusFields {
72
+ interface AttachStatusFields {
73
73
  mcpClient: AttachState;
74
74
  mcpClientAction?: string;
75
75
  }
@@ -81,3 +81,4 @@ export interface AttachStatusFields {
81
81
  * healthy client from a version too old to look. The advice rides along only when there is any.
82
82
  */
83
83
  export declare function attachStatusFields(stateDir: string, port: number): AttachStatusFields;
84
+ export {};
@@ -17,7 +17,7 @@
17
17
  * version; MCP has no concept of a model, so the transport genuinely cannot tell us. Anything
18
18
  * claiming to know it would be inventing it.
19
19
  */
20
- export interface McpClientIdentity {
20
+ interface McpClientIdentity {
21
21
  name?: string;
22
22
  version?: string;
23
23
  }
@@ -29,3 +29,4 @@ export declare function clearMcpClientIdentityHook(): void;
29
29
  * introduced itself — a plain CLI run has no client, and reporting one would be a fabrication.
30
30
  */
31
31
  export declare function mcpClientIdentity(): McpClientIdentity;
32
+ export {};
@@ -12,7 +12,7 @@
12
12
  * it was removed. What a dashboard needs is the SHARE OF SESSIONS that lose MCP at all (the first
13
13
  * outage) and the share where it never came back on its own (the budget being spent).
14
14
  */
15
- import { OutageReason, OutageStage } from '@reticlehq/core';
15
+ import { OutageReason, OutageStage } from '@reticlehq/core/telemetry';
16
16
  /**
17
17
  * `OutageStage` and `OutageReason` are core's — this re-export only saves the proxy an import. They
18
18
  * cross the wire, so the vocabulary lives in the contract package and is never re-listed here.
@@ -12,7 +12,7 @@
12
12
  * it was removed. What a dashboard needs is the SHARE OF SESSIONS that lose MCP at all (the first
13
13
  * outage) and the share where it never came back on its own (the budget being spent).
14
14
  */
15
- import { OutageReason, OutageStage, TelemetryEventKind } from '@reticlehq/core';
15
+ import { OutageReason, OutageStage, TelemetryEventKind } from '@reticlehq/core/telemetry';
16
16
  import { getTelemetry } from '../telemetry/telemetry.js';
17
17
  /**
18
18
  * `OutageStage` and `OutageReason` are core's — this re-export only saves the proxy an import. They
@@ -105,4 +105,6 @@ export declare function startMcpProxy(port: number,
105
105
  * budget ran out and then killed itself, taking the agent's whole Reticle surface with it — the
106
106
  * failure mode for a daemon that crashed, was stopped, or shut itself down as idle.
107
107
  */
108
- ensureDaemon?: () => Promise<void>): Promise<never>;
108
+ ensureDaemon?: () => Promise<void>,
109
+ /** Observe the real shutdown boundary in transport tests without terminating their worker. */
110
+ exitProcess?: (code: number) => void): Promise<never>;