@alwaysmeticulous/cli 2.326.0 → 2.327.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 (450) hide show
  1. package/dist/__tests__/commonjs-dependencies.spec.d.ts +2 -0
  2. package/dist/__tests__/commonjs-dependencies.spec.d.ts.map +1 -0
  3. package/dist/__tests__/commonjs-dependencies.spec.js +82 -0
  4. package/dist/__tests__/commonjs-dependencies.spec.js.map +1 -0
  5. package/dist/command-utils/__tests__/parse-rewrites.spec.js +2 -2
  6. package/dist/command-utils/__tests__/parse-rewrites.spec.js.map +1 -1
  7. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js +2 -2
  8. package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js.map +1 -1
  9. package/dist/command-utils/common-options.js +2 -2
  10. package/dist/command-utils/common-options.js.map +1 -1
  11. package/dist/command-utils/detect-upload-mode.js +2 -2
  12. package/dist/command-utils/detect-upload-mode.js.map +1 -1
  13. package/dist/command-utils/detect-upload-mode.spec.js +2 -2
  14. package/dist/command-utils/detect-upload-mode.spec.js.map +1 -1
  15. package/dist/command-utils/download-session.utils.js +2 -2
  16. package/dist/command-utils/download-session.utils.js.map +1 -1
  17. package/dist/command-utils/json-args.js +2 -2
  18. package/dist/command-utils/json-args.js.map +1 -1
  19. package/dist/command-utils/json-args.spec.js +2 -2
  20. package/dist/command-utils/json-args.spec.js.map +1 -1
  21. package/dist/command-utils/parse-container-env.js +2 -2
  22. package/dist/command-utils/parse-container-env.js.map +1 -1
  23. package/dist/command-utils/parse-rewrites.js +2 -2
  24. package/dist/command-utils/parse-rewrites.js.map +1 -1
  25. package/dist/command-utils/print-json.js +2 -2
  26. package/dist/command-utils/print-json.js.map +1 -1
  27. package/dist/command-utils/sentry.utils.js +2 -2
  28. package/dist/command-utils/sentry.utils.js.map +1 -1
  29. package/dist/command-utils/warn-regex-rewrites.js +2 -2
  30. package/dist/command-utils/warn-regex-rewrites.js.map +1 -1
  31. package/dist/commands/agent/agent-review-writes.command.spec.js +2 -2
  32. package/dist/commands/agent/agent-review-writes.command.spec.js.map +1 -1
  33. package/dist/commands/agent/build-git-options.js +2 -2
  34. package/dist/commands/agent/build-git-options.js.map +1 -1
  35. package/dist/commands/agent/build-git-options.spec.js +2 -2
  36. package/dist/commands/agent/build-git-options.spec.js.map +1 -1
  37. package/dist/commands/agent/coverage-columns.util.js +2 -2
  38. package/dist/commands/agent/coverage-columns.util.js.map +1 -1
  39. package/dist/commands/agent/create-diff-comment.command.js +2 -2
  40. package/dist/commands/agent/create-diff-comment.command.js.map +1 -1
  41. package/dist/commands/agent/diff-comment-write.utils.js +2 -2
  42. package/dist/commands/agent/diff-comment-write.utils.js.map +1 -1
  43. package/dist/commands/agent/diff-comments.command.js +2 -2
  44. package/dist/commands/agent/diff-comments.command.js.map +1 -1
  45. package/dist/commands/agent/diff-comments.command.spec.js +2 -2
  46. package/dist/commands/agent/diff-comments.command.spec.js.map +1 -1
  47. package/dist/commands/agent/ignore-diff.command.js +2 -2
  48. package/dist/commands/agent/ignore-diff.command.js.map +1 -1
  49. package/dist/commands/agent/index.js +2 -2
  50. package/dist/commands/agent/index.js.map +1 -1
  51. package/dist/commands/agent/js-coverage-diff.command.js +2 -2
  52. package/dist/commands/agent/js-coverage-diff.command.js.map +1 -1
  53. package/dist/commands/agent/js-coverage.command.handler.spec.js +2 -2
  54. package/dist/commands/agent/js-coverage.command.handler.spec.js.map +1 -1
  55. package/dist/commands/agent/js-coverage.command.js +2 -2
  56. package/dist/commands/agent/js-coverage.command.js.map +1 -1
  57. package/dist/commands/agent/js-coverage.command.spec.js +2 -2
  58. package/dist/commands/agent/js-coverage.command.spec.js.map +1 -1
  59. package/dist/commands/agent/reject-diff.command.js +2 -2
  60. package/dist/commands/agent/reject-diff.command.js.map +1 -1
  61. package/dist/commands/agent/reject-diff.command.spec.js +2 -2
  62. package/dist/commands/agent/reject-diff.command.spec.js.map +1 -1
  63. package/dist/commands/agent/reply-to-diff-comment.command.js +2 -2
  64. package/dist/commands/agent/reply-to-diff-comment.command.js.map +1 -1
  65. package/dist/commands/agent/screenshot-dom-diff.command.js +2 -2
  66. package/dist/commands/agent/screenshot-dom-diff.command.js.map +1 -1
  67. package/dist/commands/agent/screenshot-image-files.command.js +2 -2
  68. package/dist/commands/agent/screenshot-image-files.command.js.map +1 -1
  69. package/dist/commands/agent/screenshot-image.command.js +2 -2
  70. package/dist/commands/agent/screenshot-image.command.js.map +1 -1
  71. package/dist/commands/agent/sessions.command.js +2 -2
  72. package/dist/commands/agent/sessions.command.js.map +1 -1
  73. package/dist/commands/agent/sessions.command.spec.js +2 -2
  74. package/dist/commands/agent/sessions.command.spec.js.map +1 -1
  75. package/dist/commands/agent/submit-feedback.command.js +2 -2
  76. package/dist/commands/agent/submit-feedback.command.js.map +1 -1
  77. package/dist/commands/agent/test-run-check.command.js +2 -2
  78. package/dist/commands/agent/test-run-check.command.js.map +1 -1
  79. package/dist/commands/agent/test-run-check.command.spec.js +2 -2
  80. package/dist/commands/agent/test-run-check.command.spec.js.map +1 -1
  81. package/dist/commands/agent/test-run-diffs.command.js +2 -2
  82. package/dist/commands/agent/test-run-diffs.command.js.map +1 -1
  83. package/dist/commands/agent/test-run-diffs.command.spec.js +2 -2
  84. package/dist/commands/agent/test-run-diffs.command.spec.js.map +1 -1
  85. package/dist/commands/agent/test-run-diffs.utils.js +2 -2
  86. package/dist/commands/agent/test-run-diffs.utils.js.map +1 -1
  87. package/dist/commands/agent/test-run-diffs.utils.spec.js +2 -2
  88. package/dist/commands/agent/test-run-diffs.utils.spec.js.map +1 -1
  89. package/dist/commands/agent/test-run-for-commit.command.js +2 -2
  90. package/dist/commands/agent/test-run-for-commit.command.js.map +1 -1
  91. package/dist/commands/agent/timeline.command.js +2 -2
  92. package/dist/commands/agent/timeline.command.js.map +1 -1
  93. package/dist/commands/agent/timeline.command.spec.js +2 -2
  94. package/dist/commands/agent/timeline.command.spec.js.map +1 -1
  95. package/dist/commands/agent/trigger-test-run.command.js +2 -2
  96. package/dist/commands/agent/trigger-test-run.command.js.map +1 -1
  97. package/dist/commands/agent/trigger-test-run.command.spec.js +2 -2
  98. package/dist/commands/agent/trigger-test-run.command.spec.js.map +1 -1
  99. package/dist/commands/agent/upload-build.command.js +2 -2
  100. package/dist/commands/agent/upload-build.command.js.map +1 -1
  101. package/dist/commands/all-commands.d.ts.map +1 -1
  102. package/dist/commands/all-commands.js +8 -6
  103. package/dist/commands/all-commands.js.map +1 -1
  104. package/dist/commands/auth/__tests__/get-project.command.spec.js +2 -2
  105. package/dist/commands/auth/__tests__/get-project.command.spec.js.map +1 -1
  106. package/dist/commands/auth/__tests__/list-projects.command.spec.js +2 -2
  107. package/dist/commands/auth/__tests__/list-projects.command.spec.js.map +1 -1
  108. package/dist/commands/auth/__tests__/login.command.spec.js +2 -2
  109. package/dist/commands/auth/__tests__/login.command.spec.js.map +1 -1
  110. package/dist/commands/auth/__tests__/logout.command.spec.js +2 -2
  111. package/dist/commands/auth/__tests__/logout.command.spec.js.map +1 -1
  112. package/dist/commands/auth/__tests__/set-project.command.spec.js +2 -2
  113. package/dist/commands/auth/__tests__/set-project.command.spec.js.map +1 -1
  114. package/dist/commands/auth/__tests__/whoami.command.spec.js +2 -2
  115. package/dist/commands/auth/__tests__/whoami.command.spec.js.map +1 -1
  116. package/dist/commands/auth/get-project.command.js +2 -2
  117. package/dist/commands/auth/get-project.command.js.map +1 -1
  118. package/dist/commands/auth/index.js +2 -2
  119. package/dist/commands/auth/index.js.map +1 -1
  120. package/dist/commands/auth/list-projects.command.js +2 -2
  121. package/dist/commands/auth/list-projects.command.js.map +1 -1
  122. package/dist/commands/auth/login.command.js +2 -2
  123. package/dist/commands/auth/login.command.js.map +1 -1
  124. package/dist/commands/auth/logout.command.js +2 -2
  125. package/dist/commands/auth/logout.command.js.map +1 -1
  126. package/dist/commands/auth/set-project.command.js +2 -2
  127. package/dist/commands/auth/set-project.command.js.map +1 -1
  128. package/dist/commands/auth/whoami.command.js +2 -2
  129. package/dist/commands/auth/whoami.command.js.map +1 -1
  130. package/dist/commands/ci/__tests__/label-commit.utils.spec.js +2 -2
  131. package/dist/commands/ci/__tests__/label-commit.utils.spec.js.map +1 -1
  132. package/dist/commands/ci/__tests__/session-filter.utils.spec.js +2 -2
  133. package/dist/commands/ci/__tests__/session-filter.utils.spec.js.map +1 -1
  134. package/dist/commands/ci/agent-test.command.js +2 -2
  135. package/dist/commands/ci/agent-test.command.js.map +1 -1
  136. package/dist/commands/ci/deprecated-trigger-options.js +2 -2
  137. package/dist/commands/ci/deprecated-trigger-options.js.map +1 -1
  138. package/dist/commands/ci/index.js +2 -2
  139. package/dist/commands/ci/index.js.map +1 -1
  140. package/dist/commands/ci/label-commit.command.js +2 -2
  141. package/dist/commands/ci/label-commit.command.js.map +1 -1
  142. package/dist/commands/ci/label-commit.core.js +2 -2
  143. package/dist/commands/ci/label-commit.core.js.map +1 -1
  144. package/dist/commands/ci/label-commit.types.js +2 -2
  145. package/dist/commands/ci/label-commit.types.js.map +1 -1
  146. package/dist/commands/ci/label-commit.utils.js +2 -2
  147. package/dist/commands/ci/label-commit.utils.js.map +1 -1
  148. package/dist/commands/ci/prepare.command.js +2 -2
  149. package/dist/commands/ci/prepare.command.js.map +1 -1
  150. package/dist/commands/ci/resolve-git-options.js +2 -2
  151. package/dist/commands/ci/resolve-git-options.js.map +1 -1
  152. package/dist/commands/ci/run-local.command.js +2 -2
  153. package/dist/commands/ci/run-local.command.js.map +1 -1
  154. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js +2 -2
  155. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js.map +1 -1
  156. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js +2 -2
  157. package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js.map +1 -1
  158. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js +2 -2
  159. package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js.map +1 -1
  160. package/dist/commands/ci/run.command.js +2 -2
  161. package/dist/commands/ci/run.command.js.map +1 -1
  162. package/dist/commands/ci/session-filter.utils.js +2 -2
  163. package/dist/commands/ci/session-filter.utils.js.map +1 -1
  164. package/dist/commands/ci/start-tunnel.command.js +2 -2
  165. package/dist/commands/ci/start-tunnel.command.js.map +1 -1
  166. package/dist/commands/ci/trigger-test-run.core.js +2 -2
  167. package/dist/commands/ci/trigger-test-run.core.js.map +1 -1
  168. package/dist/commands/ci/trigger-test-run.types.js +2 -2
  169. package/dist/commands/ci/trigger-test-run.types.js.map +1 -1
  170. package/dist/commands/ci/upload-asset-chunk.command.js +2 -2
  171. package/dist/commands/ci/upload-asset-chunk.command.js.map +1 -1
  172. package/dist/commands/ci/upload-assets.command.js +2 -2
  173. package/dist/commands/ci/upload-assets.command.js.map +1 -1
  174. package/dist/commands/ci/upload-container.command.js +2 -2
  175. package/dist/commands/ci/upload-container.command.js.map +1 -1
  176. package/dist/commands/crawl.command.js +2 -2
  177. package/dist/commands/crawl.command.js.map +1 -1
  178. package/dist/commands/debug/clean-workspaces.js +2 -2
  179. package/dist/commands/debug/clean-workspaces.js.map +1 -1
  180. package/dist/commands/debug/index.js +2 -2
  181. package/dist/commands/debug/index.js.map +1 -1
  182. package/dist/commands/debug/present-workspace.js +2 -2
  183. package/dist/commands/debug/present-workspace.js.map +1 -1
  184. package/dist/commands/debug/project-worktree.js +2 -2
  185. package/dist/commands/debug/project-worktree.js.map +1 -1
  186. package/dist/commands/deprecated-aliases.js +2 -2
  187. package/dist/commands/deprecated-aliases.js.map +1 -1
  188. package/dist/commands/download/index.js +2 -2
  189. package/dist/commands/download/index.js.map +1 -1
  190. package/dist/commands/download/replay.command.js +2 -2
  191. package/dist/commands/download/replay.command.js.map +1 -1
  192. package/dist/commands/download/session.command.js +2 -2
  193. package/dist/commands/download/session.command.js.map +1 -1
  194. package/dist/commands/download/test-run.command.js +2 -2
  195. package/dist/commands/download/test-run.command.js.map +1 -1
  196. package/dist/commands/local/get-edited-files.utils.js +2 -2
  197. package/dist/commands/local/get-edited-files.utils.js.map +1 -1
  198. package/dist/commands/local/get-edited-files.utils.spec.js +2 -2
  199. package/dist/commands/local/get-edited-files.utils.spec.js.map +1 -1
  200. package/dist/commands/local/index.js +2 -2
  201. package/dist/commands/local/index.js.map +1 -1
  202. package/dist/commands/local/relevant-sessions.command.js +2 -2
  203. package/dist/commands/local/relevant-sessions.command.js.map +1 -1
  204. package/dist/commands/onboard/__tests__/build-context.spec.d.ts +2 -0
  205. package/dist/commands/onboard/__tests__/build-context.spec.d.ts.map +1 -0
  206. package/dist/commands/onboard/__tests__/build-context.spec.js +179 -0
  207. package/dist/commands/onboard/__tests__/build-context.spec.js.map +1 -0
  208. package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts +2 -0
  209. package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts.map +1 -0
  210. package/dist/commands/onboard/__tests__/check-vcs-link.spec.js +164 -0
  211. package/dist/commands/onboard/__tests__/check-vcs-link.spec.js.map +1 -0
  212. package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts +2 -0
  213. package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts.map +1 -0
  214. package/dist/commands/onboard/__tests__/codex-mcp.spec.js +73 -0
  215. package/dist/commands/onboard/__tests__/codex-mcp.spec.js.map +1 -0
  216. package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts +2 -0
  217. package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts.map +1 -0
  218. package/dist/commands/onboard/__tests__/detect-framework.spec.js +277 -0
  219. package/dist/commands/onboard/__tests__/detect-framework.spec.js.map +1 -0
  220. package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts +2 -0
  221. package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts.map +1 -0
  222. package/dist/commands/onboard/__tests__/git-repo-info.spec.js +109 -0
  223. package/dist/commands/onboard/__tests__/git-repo-info.spec.js.map +1 -0
  224. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts +2 -0
  225. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts.map +1 -0
  226. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js +157 -0
  227. package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js.map +1 -0
  228. package/dist/commands/onboard/__tests__/install-skills.spec.d.ts +2 -0
  229. package/dist/commands/onboard/__tests__/install-skills.spec.d.ts.map +1 -0
  230. package/dist/commands/onboard/__tests__/install-skills.spec.js +158 -0
  231. package/dist/commands/onboard/__tests__/install-skills.spec.js.map +1 -0
  232. package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts +2 -0
  233. package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts.map +1 -0
  234. package/dist/commands/onboard/__tests__/materialize-workspace.spec.js +116 -0
  235. package/dist/commands/onboard/__tests__/materialize-workspace.spec.js.map +1 -0
  236. package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts +2 -0
  237. package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts.map +1 -0
  238. package/dist/commands/onboard/__tests__/resolve-app.spec.js +166 -0
  239. package/dist/commands/onboard/__tests__/resolve-app.spec.js.map +1 -0
  240. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts +2 -0
  241. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts.map +1 -0
  242. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js +137 -0
  243. package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js.map +1 -0
  244. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts +2 -0
  245. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts.map +1 -0
  246. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js +286 -0
  247. package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js.map +1 -0
  248. package/dist/commands/onboard/build-context.d.ts +16 -0
  249. package/dist/commands/onboard/build-context.d.ts.map +1 -0
  250. package/dist/commands/onboard/build-context.js +104 -0
  251. package/dist/commands/onboard/build-context.js.map +1 -0
  252. package/dist/commands/onboard/check-vcs-link.d.ts +14 -0
  253. package/dist/commands/onboard/check-vcs-link.d.ts.map +1 -0
  254. package/dist/commands/onboard/check-vcs-link.js +111 -0
  255. package/dist/commands/onboard/check-vcs-link.js.map +1 -0
  256. package/dist/commands/onboard/codex-mcp.d.ts +24 -0
  257. package/dist/commands/onboard/codex-mcp.d.ts.map +1 -0
  258. package/dist/commands/onboard/codex-mcp.js +302 -0
  259. package/dist/commands/onboard/codex-mcp.js.map +1 -0
  260. package/dist/commands/onboard/customer-agents.d.ts +9 -0
  261. package/dist/commands/onboard/customer-agents.d.ts.map +1 -0
  262. package/dist/commands/onboard/customer-agents.js +19 -0
  263. package/dist/commands/onboard/customer-agents.js.map +1 -0
  264. package/dist/commands/onboard/customer-agents.json +17 -0
  265. package/dist/commands/onboard/customer-docs.d.ts +21 -0
  266. package/dist/commands/onboard/customer-docs.d.ts.map +1 -0
  267. package/dist/commands/onboard/customer-docs.js +31 -0
  268. package/dist/commands/onboard/customer-docs.js.map +1 -0
  269. package/dist/commands/onboard/customer-docs.json +35 -0
  270. package/dist/commands/onboard/detect-framework.d.ts +26 -0
  271. package/dist/commands/onboard/detect-framework.d.ts.map +1 -0
  272. package/dist/commands/onboard/detect-framework.js +305 -0
  273. package/dist/commands/onboard/detect-framework.js.map +1 -0
  274. package/dist/commands/onboard/discover-apps.d.ts +21 -0
  275. package/dist/commands/onboard/discover-apps.d.ts.map +1 -0
  276. package/dist/commands/onboard/discover-apps.js +318 -0
  277. package/dist/commands/onboard/discover-apps.js.map +1 -0
  278. package/dist/commands/onboard/docs-urls.d.ts +11 -0
  279. package/dist/commands/onboard/docs-urls.d.ts.map +1 -0
  280. package/dist/commands/onboard/docs-urls.js +17 -0
  281. package/dist/commands/onboard/docs-urls.js.map +1 -0
  282. package/dist/commands/onboard/git-repo-info.d.ts +15 -0
  283. package/dist/commands/onboard/git-repo-info.d.ts.map +1 -0
  284. package/dist/commands/onboard/git-repo-info.js +84 -0
  285. package/dist/commands/onboard/git-repo-info.js.map +1 -0
  286. package/dist/commands/onboard/index.d.ts +18 -0
  287. package/dist/commands/onboard/index.d.ts.map +1 -0
  288. package/dist/commands/onboard/index.js +164 -0
  289. package/dist/commands/onboard/index.js.map +1 -0
  290. package/dist/commands/onboard/inline-doc-constants.d.ts +21 -0
  291. package/dist/commands/onboard/inline-doc-constants.d.ts.map +1 -0
  292. package/dist/commands/onboard/inline-doc-constants.js +238 -0
  293. package/dist/commands/onboard/inline-doc-constants.js.map +1 -0
  294. package/dist/commands/onboard/launch-agent.d.ts +65 -0
  295. package/dist/commands/onboard/launch-agent.d.ts.map +1 -0
  296. package/dist/commands/onboard/launch-agent.js +311 -0
  297. package/dist/commands/onboard/launch-agent.js.map +1 -0
  298. package/dist/commands/onboard/materialize-workspace.d.ts +68 -0
  299. package/dist/commands/onboard/materialize-workspace.d.ts.map +1 -0
  300. package/dist/commands/onboard/materialize-workspace.js +177 -0
  301. package/dist/commands/onboard/materialize-workspace.js.map +1 -0
  302. package/dist/commands/onboard/print-summary.d.ts +10 -0
  303. package/dist/commands/onboard/print-summary.d.ts.map +1 -0
  304. package/dist/commands/onboard/print-summary.js +49 -0
  305. package/dist/commands/onboard/print-summary.js.map +1 -0
  306. package/dist/commands/onboard/resolve-app.d.ts +21 -0
  307. package/dist/commands/onboard/resolve-app.d.ts.map +1 -0
  308. package/dist/commands/onboard/resolve-app.js +78 -0
  309. package/dist/commands/onboard/resolve-app.js.map +1 -0
  310. package/dist/commands/onboard/resolve-project.d.ts +14 -0
  311. package/dist/commands/onboard/resolve-project.d.ts.map +1 -0
  312. package/dist/commands/onboard/resolve-project.js +92 -0
  313. package/dist/commands/onboard/resolve-project.js.map +1 -0
  314. package/dist/commands/onboard/safe-repo-fs.d.ts +59 -0
  315. package/dist/commands/onboard/safe-repo-fs.d.ts.map +1 -0
  316. package/dist/commands/onboard/safe-repo-fs.js +266 -0
  317. package/dist/commands/onboard/safe-repo-fs.js.map +1 -0
  318. package/dist/commands/onboard/setup-agent-integrations.d.ts +43 -0
  319. package/dist/commands/onboard/setup-agent-integrations.d.ts.map +1 -0
  320. package/dist/commands/onboard/setup-agent-integrations.js +324 -0
  321. package/dist/commands/onboard/setup-agent-integrations.js.map +1 -0
  322. package/dist/commands/onboard/templates/CLAUDE.md +213 -0
  323. package/dist/commands/onboard/templates/agents/auth-setup.md +117 -0
  324. package/dist/commands/onboard/templates/agents/ci-setup.md +742 -0
  325. package/dist/commands/onboard/templates/agents/csp-setup.md +78 -0
  326. package/dist/commands/onboard/templates/agents/false-positive-prevention.md +268 -0
  327. package/dist/commands/onboard/templates/agents/feature-flag-setup.md +133 -0
  328. package/dist/commands/onboard/templates/agents/local-simulation-verification.md +96 -0
  329. package/dist/commands/onboard/templates/agents/persisted-graphql-queries.md +150 -0
  330. package/dist/commands/onboard/templates/agents/recorder-installation.md +194 -0
  331. package/dist/commands/onboard/templates/agents/replay-fetch-retry-compatibility.md +252 -0
  332. package/dist/commands/onboard/templates/agents/reviewer.md +788 -0
  333. package/dist/commands/onboard/templates/agents/service-worker-compatibility.md +254 -0
  334. package/dist/commands/onboard/templates/agents/session-context.md +133 -0
  335. package/dist/commands/onboard/templates/agents/shared-worker-compatibility.md +187 -0
  336. package/dist/commands/onboard/templates/docs/additional-guides/backend-recorder.ts +340 -0
  337. package/dist/commands/onboard/templates/docs/ci/not-yet-run-checks.ts +58 -0
  338. package/dist/commands/onboard/templates/docs/ci.ts +19 -0
  339. package/dist/commands/onboard/templates/docs/cloud-replay.ts +145 -0
  340. package/dist/commands/onboard/templates/docs/constants.ts +37 -0
  341. package/dist/commands/onboard/templates/docs/github-actions-v2.ts +859 -0
  342. package/dist/commands/onboard/templates/docs/how-to/auth/bypassing-auth.ts +27 -0
  343. package/dist/commands/onboard/templates/docs/how-to/auth/enabling-full-auth.ts +91 -0
  344. package/dist/commands/onboard/templates/docs/how-to/configure-ignore-patterns.ts +77 -0
  345. package/dist/commands/onboard/templates/docs/how-to/enable-source-coverage.ts +84 -0
  346. package/dist/commands/onboard/templates/docs/how-to/fix-false-positive-diffs.ts +156 -0
  347. package/dist/commands/onboard/templates/docs/how-to/link-bitbucket.ts +15 -0
  348. package/dist/commands/onboard/templates/docs/how-to/link-gitlab.ts +22 -0
  349. package/dist/commands/onboard/templates/docs/how-to/record-session-context.ts +129 -0
  350. package/dist/commands/onboard/templates/docs/how-to/recorder-script.ts +139 -0
  351. package/dist/commands/onboard/templates/docs/how-to/testing-feature-flags.ts +97 -0
  352. package/dist/commands/onboard/templates/docs/how-to/testing-multiple-apps-or-app-variants.ts +40 -0
  353. package/dist/commands/onboard/templates/docs/how-to/troubleshoot-auth.ts +58 -0
  354. package/dist/commands/onboard/templates/docs/how-to/troubleshoot-failed-simulations.ts +97 -0
  355. package/dist/commands/onboard/templates/docs/how-to/typescript-types.ts +51 -0
  356. package/dist/commands/onboard/templates/docs/how-to/window-meticulous-object.ts +685 -0
  357. package/dist/commands/onboard/templates/docs/onboarding-guide.ts +415 -0
  358. package/dist/commands/onboard/templates/docs/recorder-getting-started.ts +24 -0
  359. package/dist/commands/onboard/templates/docs/recorder-snippets/constants.ts +1 -0
  360. package/dist/commands/onboard/templates/docs/recorder-snippets/explanation-of-methods-to-add-recorder.ts +21 -0
  361. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/angular-instructions.ts +34 -0
  362. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/any-other-framework-instructions.ts +118 -0
  363. package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/vue-instructions.ts +39 -0
  364. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/next-js-instructions.ts +49 -0
  365. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/nuxtjs-instructions.ts +68 -0
  366. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/rsbuild-instructions.ts +66 -0
  367. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/storybook-instructions.ts +59 -0
  368. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/sveltekit-instructions.ts +113 -0
  369. package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/vite-instructions.ts +58 -0
  370. package/dist/commands/onboard/templates/docs/recorder-snippets/script-requirements.ts +51 -0
  371. package/dist/commands/onboard/templates/docs/recorder-snippets/steps-after-installing-recorder.ts +25 -0
  372. package/dist/commands/onboard/templates/docs/reference/cli-commands.ts +1324 -0
  373. package/dist/commands/onboard/templates/docs/session-recording/csp-exceptions.ts +17 -0
  374. package/dist/commands/onboard/templates/docs/session-recording/recorder-npm-dependency.ts +62 -0
  375. package/dist/commands/onboard/templates/docs-imports/src/lib/next/next.constants.ts +46 -0
  376. package/dist/commands/onboard/templates/docs-imports/src/lib/utils/internal-urls/docs-urls.utils.ts +254 -0
  377. package/dist/commands/onboard/templates/settings.json +14 -0
  378. package/dist/commands/project/index.js +2 -2
  379. package/dist/commands/project/index.js.map +1 -1
  380. package/dist/commands/project/show.command.js +2 -2
  381. package/dist/commands/project/show.command.js.map +1 -1
  382. package/dist/commands/project/upload-source.command.js +2 -2
  383. package/dist/commands/project/upload-source.command.js.map +1 -1
  384. package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js +2 -2
  385. package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js.map +1 -1
  386. package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js +2 -2
  387. package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js.map +1 -1
  388. package/dist/commands/record/__tests__/backend.command.spec.js +2 -2
  389. package/dist/commands/record/__tests__/backend.command.spec.js.map +1 -1
  390. package/dist/commands/record/__tests__/login.command.spec.js +2 -2
  391. package/dist/commands/record/__tests__/login.command.spec.js.map +1 -1
  392. package/dist/commands/record/__tests__/session.command.spec.js +2 -2
  393. package/dist/commands/record/__tests__/session.command.spec.js.map +1 -1
  394. package/dist/commands/record/backend-dev-command.utils.js +2 -2
  395. package/dist/commands/record/backend-dev-command.utils.js.map +1 -1
  396. package/dist/commands/record/backend-sidecar.utils.js +2 -2
  397. package/dist/commands/record/backend-sidecar.utils.js.map +1 -1
  398. package/dist/commands/record/backend.command.js +2 -2
  399. package/dist/commands/record/backend.command.js.map +1 -1
  400. package/dist/commands/record/index.js +2 -2
  401. package/dist/commands/record/index.js.map +1 -1
  402. package/dist/commands/record/login.command.js +2 -2
  403. package/dist/commands/record/login.command.js.map +1 -1
  404. package/dist/commands/record/session.command.js +2 -2
  405. package/dist/commands/record/session.command.js.map +1 -1
  406. package/dist/commands/replay-debugger.ui.js +2 -2
  407. package/dist/commands/replay-debugger.ui.js.map +1 -1
  408. package/dist/commands/replay.command.js +2 -2
  409. package/dist/commands/replay.command.js.map +1 -1
  410. package/dist/commands/schema.command.js +2 -2
  411. package/dist/commands/schema.command.js.map +1 -1
  412. package/dist/commands/schema.command.spec.js +2 -2
  413. package/dist/commands/schema.command.spec.js.map +1 -1
  414. package/dist/index.js +2 -2
  415. package/dist/index.js.map +1 -1
  416. package/dist/main.js +2 -2
  417. package/dist/main.js.map +1 -1
  418. package/dist/utils/__tests__/handle-auth-failure.spec.js +2 -2
  419. package/dist/utils/__tests__/handle-auth-failure.spec.js.map +1 -1
  420. package/dist/utils/__tests__/project-selection-hint.spec.js +2 -2
  421. package/dist/utils/__tests__/project-selection-hint.spec.js.map +1 -1
  422. package/dist/utils/__tests__/resolve-project-identifier.spec.js +2 -2
  423. package/dist/utils/__tests__/resolve-project-identifier.spec.js.map +1 -1
  424. package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js +2 -2
  425. package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js.map +1 -1
  426. package/dist/utils/__tests__/select-project.spec.js +5 -4
  427. package/dist/utils/__tests__/select-project.spec.js.map +1 -1
  428. package/dist/utils/cli-user-error.js +2 -2
  429. package/dist/utils/cli-user-error.js.map +1 -1
  430. package/dist/utils/constants.js +2 -2
  431. package/dist/utils/constants.js.map +1 -1
  432. package/dist/utils/environment.utils.js +2 -2
  433. package/dist/utils/environment.utils.js.map +1 -1
  434. package/dist/utils/format-coverage-ranges.js +2 -2
  435. package/dist/utils/format-coverage-ranges.js.map +1 -1
  436. package/dist/utils/handle-auth-failure.js +2 -2
  437. package/dist/utils/handle-auth-failure.js.map +1 -1
  438. package/dist/utils/out-of-date-client-error.js +2 -2
  439. package/dist/utils/out-of-date-client-error.js.map +1 -1
  440. package/dist/utils/project-selection-hint.js +2 -2
  441. package/dist/utils/project-selection-hint.js.map +1 -1
  442. package/dist/utils/resolve-project-identifier.js +2 -2
  443. package/dist/utils/resolve-project-identifier.js.map +1 -1
  444. package/dist/utils/resolve-test-run-from-commit.js +2 -2
  445. package/dist/utils/resolve-test-run-from-commit.js.map +1 -1
  446. package/dist/utils/select-project.d.ts +9 -0
  447. package/dist/utils/select-project.d.ts.map +1 -1
  448. package/dist/utils/select-project.js +58 -15
  449. package/dist/utils/select-project.js.map +1 -1
  450. package/package.json +13 -11
@@ -0,0 +1,340 @@
1
+ import { METICULOUS_BACKEND_SETUP_CALENDLY_LINK } from "src/lib/next/next.constants";
2
+ import {
3
+ ADDITIONAL_GUIDES,
4
+ NEXTJS_APP_ROUTER_ADDITIONAL_SETUP_URL,
5
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
6
+
7
+ const BACKEND_RECORDER_PACKAGE = "@alwaysmeticulous/backend-recorder-launcher";
8
+ const WORKERD_RECORDER_PACKAGE = "@alwaysmeticulous/backend-recorder-workerd";
9
+
10
+ const BOOK_A_CALL_TIP = `If you have any issues setting up the backend recorder then click [here](${METICULOUS_BACKEND_SETUP_CALENDLY_LINK}) to book a call with us.`;
11
+
12
+ export const document = `---
13
+ {
14
+ "title": "Install the backend recorder"
15
+ }
16
+ ---
17
+
18
+ # {% $frontmatter.title %}
19
+
20
+ The backend recorder captures the server side of your users' sessions. It intercepts HTTP requests and responses in your Node.js
21
+ app using OpenTelemetry approach and exports them to Meticulous, where they are used to stub out backend calls during replays. This means
22
+ Meticulous can replay sessions accurately even when they depend on data returned by your own API.
23
+
24
+ The backend recorder is installed via the [\`${BACKEND_RECORDER_PACKAGE}\`](https://www.npmjs.com/package/${BACKEND_RECORDER_PACKAGE})
25
+ package from the Meticulous SDK. It is complementary to the [frontend recorder](${ADDITIONAL_GUIDES.INSTALL_RECORDER_SCRIPT_FOR_BACKEND_TESTING_URL})
26
+ — install the frontend recorder to capture user activity in the browser, and the backend recorder to capture the matching server-side requests.
27
+
28
+ {% callout_card variant="info" title="When do I need the backend recorder?" %}
29
+ The backend recorder is only required when your app uses **server-side rendering (SSR)**. In SSR apps, data is fetched on the server
30
+ before the page reaches the browser, so the frontend recorder never sees those requests — the backend recorder captures them instead
31
+ so Meticulous can stub them during replay. If your app renders entirely on the client (e.g. a standard SPA), the frontend recorder
32
+ already captures every request and the backend recorder is not needed. ${BOOK_A_CALL_TIP}
33
+ {% /callout_card %}
34
+
35
+ ## 1. Install the package
36
+
37
+ \`\`\`bash
38
+ npm install ${BACKEND_RECORDER_PACKAGE}
39
+ \`\`\`
40
+
41
+ The recorder must be loaded **before** your application code so it can patch Node.js' HTTP modules before any requests are made.
42
+ Pick the option below that matches your setup.
43
+
44
+ ## 2. Initialize the recorder
45
+
46
+ {% tabs direction="grid" noTabSelectedByDefault=true %}
47
+ {% tab label="Next.js" %}
48
+ ## Next.js
49
+
50
+ Next.js loads the file named \`instrumentation.ts\` (or \`instrumentation.js\`) at the root of your project before the rest of your app
51
+ boots. Initialize the recorder from its \`register\` hook, guarding on the Node.js runtime so it never runs in the Edge runtime or the browser:
52
+
53
+ {% code_with_project_selector %}
54
+ \`\`\`ts
55
+ // instrumentation.ts
56
+ export async function register() {
57
+ if (process.env.NEXT_RUNTIME === "nodejs") {
58
+ const { initBackendRecorder } = await import(
59
+ "${BACKEND_RECORDER_PACKAGE}"
60
+ );
61
+ await initBackendRecorder({
62
+ meticulousProjectName: "{% project_name /%}",
63
+ recordingToken: "{% project_recording_token /%}",
64
+ });
65
+ }
66
+ }
67
+ \`\`\`
68
+ {% /code_with_project_selector %}
69
+
70
+ Mark the package as an external package so Next.js does not try to bundle it. In \`next.config.js\`:
71
+
72
+ \`\`\`js
73
+ // next.config.js
74
+ module.exports = {
75
+ serverExternalPackages: ["${BACKEND_RECORDER_PACKAGE}"],
76
+ };
77
+ \`\`\`
78
+
79
+ If you are using the App Router, also follow the [additional App Router setup](${NEXTJS_APP_ROUTER_ADDITIONAL_SETUP_URL}) to ensure
80
+ Meticulous can correctly test your app.
81
+
82
+ ${BOOK_A_CALL_TIP}
83
+ {% /tab %}
84
+
85
+ {% tab label="TanStack Start" %}
86
+ ## TanStack Start
87
+
88
+ TanStack Start's server entry point (\`src/server.ts\` by default) is the first server module that runs, so it's the right place
89
+ to load the recorder. Create a separate \`src/instrumentation.ts\` file that initializes it, then import that file as the very
90
+ first import in \`src/server.ts\` — ahead of the \`@tanstack/react-start/server-entry\` import — so the recorder patches Node's
91
+ HTTP modules before any request-handling code runs:
92
+
93
+ {% code_with_project_selector %}
94
+ \`\`\`ts
95
+ // src/instrumentation.ts
96
+ import { initBackendRecorder } from "${BACKEND_RECORDER_PACKAGE}";
97
+
98
+ await initBackendRecorder({
99
+ meticulousProjectName: "{% project_name /%}",
100
+ recordingToken: "{% project_recording_token /%}",
101
+ });
102
+ \`\`\`
103
+ {% /code_with_project_selector %}
104
+
105
+ \`\`\`ts
106
+ // src/server.ts
107
+ import "./instrumentation";
108
+
109
+ import handler, { createServerEntry } from "@tanstack/react-start/server-entry";
110
+
111
+ export default createServerEntry({
112
+ fetch(request) {
113
+ return handler.fetch(request);
114
+ },
115
+ });
116
+ \`\`\`
117
+
118
+ If your build ends up bundling \`${BACKEND_RECORDER_PACKAGE}\` into the server output, mark it as external in your Vite/Nitro
119
+ server config so it keeps patching the real Node.js \`http\`/\`https\` modules rather than a bundled copy. ${BOOK_A_CALL_TIP}
120
+ {% /tab %}
121
+
122
+ {% tab label="Node.js (instrumentation file)" %}
123
+ ## Node.js
124
+
125
+ Create an \`instrumentation.js\` file at the root of your project that initializes the recorder:
126
+
127
+ {% code_with_project_selector %}
128
+ \`\`\`js
129
+ // instrumentation.js
130
+ const { initBackendRecorder } = require("${BACKEND_RECORDER_PACKAGE}");
131
+
132
+ initBackendRecorder({
133
+ meticulousProjectName: "{% project_name /%}",
134
+ recordingToken: "{% project_recording_token /%}",
135
+ });
136
+ \`\`\`
137
+ {% /code_with_project_selector %}
138
+
139
+ Start your app with the \`--require\` flag so the recorder is loaded before your application code:
140
+
141
+ \`\`\`bash
142
+ node --require ./instrumentation.js app.js
143
+ \`\`\`
144
+
145
+ ${BOOK_A_CALL_TIP}
146
+ {% /tab %}
147
+
148
+ {% tab label="Cloudflare Workers" %}
149
+ ## Cloudflare Workers
150
+
151
+ Workers run on the workerd runtime rather than Node.js, so the Node backend recorder above cannot be loaded in-process
152
+ (skip step 1 — the \`${BACKEND_RECORDER_PACKAGE}\` package is not used here). Instead, Meticulous records during local
153
+ development (\`wrangler dev\`) with a two-part setup:
154
+
155
+ - A lightweight **shim** (\`${WORKERD_RECORDER_PACKAGE}\`) wraps your Worker's fetch handler and captures inbound requests
156
+ plus outgoing \`fetch\` calls. Outgoing requests still go directly to their destination — the recorder is never in the
157
+ request path — and when no sidecar is configured the shim is a complete no-op, so it is safe to keep in deployed code.
158
+ - The **Meticulous recorder sidecar**, a small Node process on your dev machine started by the Meticulous CLI, receives
159
+ those events and uploads them to Meticulous as backend recordings.
160
+
161
+ Install the shim and wrap your Worker's handler:
162
+
163
+ \`\`\`bash
164
+ npm install ${WORKERD_RECORDER_PACKAGE}
165
+ \`\`\`
166
+
167
+ \`\`\`ts
168
+ import { withMeticulous } from "${WORKERD_RECORDER_PACKAGE}";
169
+
170
+ export default withMeticulous({
171
+ async fetch(request, env, ctx) {
172
+ // your app
173
+ },
174
+ });
175
+ \`\`\`
176
+
177
+ Enable the \`nodejs_als\` compatibility flag in your \`wrangler.toml\` (if you already use \`nodejs_compat\` — e.g. for
178
+ TanStack Start — you're done, it includes it):
179
+
180
+ \`\`\`toml
181
+ compatibility_flags = ["nodejs_als"]
182
+ \`\`\`
183
+
184
+ Then run your dev command through the Meticulous CLI, which starts the sidecar and passes its URL to \`wrangler dev\`
185
+ automatically:
186
+
187
+ \`\`\`bash
188
+ npx @alwaysmeticulous/cli record backend -- npx wrangler dev
189
+ \`\`\`
190
+
191
+ Authenticate with \`npx @alwaysmeticulous/cli auth login\` first (or pass \`--apiToken\`). If you prefer to run
192
+ \`wrangler dev\` yourself, \`npx @alwaysmeticulous/cli record backend\` (without a wrapped command) starts just the
193
+ sidecar and prints the \`--var METICULOUS_SIDECAR_URL:...\` / \`.dev.vars\` line to point your Worker at it — the value
194
+ must be a worker var, since host environment variables are not visible inside workerd.
195
+
196
+ \`fetch\` egress is captured (including \`node:http\`/\`node:https\` clients under \`nodejs_compat\`, which are implemented
197
+ over fetch), as are calls through \`fetch\`-shaped bindings — service bindings and Durable Object stubs — with no code
198
+ change beyond the \`withMeticulous\` wrapper. Assets bindings are skipped by default, since asset traffic is high-volume
199
+ and adds nothing to a replay. KV, D1, R2, Queues, RPC method calls on a named entrypoint (\`env.SVC.someMethod()\`), and
200
+ WebSockets are not yet supported.
201
+ ${BOOK_A_CALL_TIP}
202
+ {% /tab %}
203
+
204
+ {% /tabs %}
205
+
206
+ ## 3. Configuration options
207
+
208
+ \`initBackendRecorder\` accepts an optional config object:
209
+
210
+ | Option | Type | Description |
211
+ |---|---|---|
212
+ | \`enabled\` | \`boolean\` | Enable or disable the recorder. Defaults to \`true\`. |
213
+ | \`meticulousProjectName\` | \`string\` | The name of your Meticulous project. |
214
+ | \`recordingToken\` | \`string\` | Token used to authenticate span uploads. This is the same recording token used by the frontend recorder snippet. |
215
+ | \`exportMode\` | \`"local" \\| "s3"\` | Where to export recorded spans. Defaults to \`"s3"\`, which uploads to Meticulous. Use \`"local"\` to write sessions to disk for debugging. |
216
+ | \`localOutputDir\` | \`string\` | Directory for local exports. Only used when \`exportMode\` is \`"local"\`. |
217
+ | \`flushIntervalMs\` | \`number\` | How often to flush spans, in milliseconds. |
218
+
219
+ A common pattern is to record only in the environments you care about:
220
+
221
+ {% code_with_project_selector %}
222
+ \`\`\`ts
223
+ await initBackendRecorder({
224
+ enabled: process.env.NODE_ENV !== "production",
225
+ meticulousProjectName: "{% project_name /%}",
226
+ recordingToken: "{% project_recording_token /%}",
227
+ });
228
+ \`\`\`
229
+ {% /code_with_project_selector %}
230
+
231
+ ## 4. Flush spans on shutdown
232
+
233
+ \`initBackendRecorder\` returns a handle with a \`stopRecording()\` method. Call it before your process exits so any pending spans are
234
+ flushed and uploaded:
235
+
236
+ \`\`\`ts
237
+ const handle = await initBackendRecorder({
238
+ /* ...config... */
239
+ });
240
+
241
+ process.on("SIGTERM", async () => {
242
+ await handle?.stopRecording();
243
+ process.exit(0);
244
+ });
245
+ \`\`\`
246
+
247
+ ## 5. Recording anything else
248
+
249
+ The recorder instruments the common clients automatically — \`fetch\`, \`http\`, Postgres, Prisma, Redis. For anything else, wrap the call
250
+ yourself:
251
+
252
+ \`\`\`ts
253
+ const user = await handle.withMeticulousOperation(
254
+ { name: "crm.getUser", key: { id } },
255
+ () => crm.getUser(id),
256
+ );
257
+ \`\`\`
258
+
259
+ While recording, Meticulous runs your function and captures what it returned. During a replay it does **not** run it — it returns the
260
+ recorded result (or throws the recorded error) in its place. That is why the wrapper has to make the call rather than be told about it
261
+ afterwards.
262
+
263
+ There are two good reasons to reach for this.
264
+
265
+ The first is a client we don't instrument — a gRPC stub, a vendor SDK with its own transport.
266
+
267
+ The second is more interesting, and applies even to calls we *do* instrument: **an operation that sits above the network**. Take a
268
+ function that checks an in-process cache and only calls an API on a miss. If the cache was warm while recording there was no request to
269
+ record, so nothing is captured and the replay has nothing to serve. Wrap the function instead and the recording holds the operation
270
+ itself — so it replays whether or not the cache happened to be warm, and cache hits stop making replays inconsistent.
271
+
272
+ \`\`\`ts
273
+ const getUser = (id: string) =>
274
+ handle.withMeticulousOperation({ name: "users.get", key: { id } }, async () => {
275
+ const cached = cache.get(id);
276
+ if (cached) return cached;
277
+ const user = await api.fetchUser(id);
278
+ cache.set(id, user);
279
+ return user;
280
+ });
281
+ \`\`\`
282
+
283
+ A few things to know:
284
+
285
+ - **\`name\` identifies the operation, so renaming it invalidates existing recordings.** A test run compares against a base recorded days
286
+ or weeks earlier, so after a rename every call to that operation has nothing to match and the request fails. Rename deliberately.
287
+ - **\`key\` is what distinguishes one call from another** — usually the arguments. Leave out values that change on every call but don't
288
+ affect the result, such as a request id or a nonce; including them means no call ever matches its recording. Timestamps and UUIDs are
289
+ handled for you, and if a key still doesn't match, Meticulous falls back to a recording of the same operation.
290
+ - **Arguments and results are stored as JSON**, so a \`Date\` comes back as a string and a \`Map\` as \`{}\`. Meticulous logs a warning naming
291
+ the exact field when it sees one while recording. Thrown errors are captured and re-thrown with their \`name\`, \`message\` and custom
292
+ properties intact, though \`instanceof\` checks against your own error class won't match.
293
+ - **Synchronous functions stay synchronous** on both paths.
294
+ - **A call with no recording fails the request** rather than quietly running for real — a replay that reaches live services isn't
295
+ reproducible.
296
+
297
+ To record app state that no call produces — resolved feature flags, a chosen experiment arm — use:
298
+
299
+ \`\`\`ts
300
+ handle.recordMeticulousObservation("featureFlags.resolved", flags);
301
+ \`\`\`
302
+
303
+ This only records: it never stubs anything, never throws, and is ignored during replay.
304
+
305
+ ### If you'd rather not hand us the call
306
+
307
+ Some teams don't want their own code running inside our callback. The same capture is available as two calls you make yourself, with the
308
+ branch in your code:
309
+
310
+ \`\`\`ts
311
+ function getUser(id: string) {
312
+ if (handle.isMeticulousReplaying()) {
313
+ return handle.stubWithMeticulous<User>(\`user_\${id}\`);
314
+ }
315
+
316
+ const user = crm.getUser(id);
317
+ handle.recordWithMeticulous(\`user_\${id}\`, user);
318
+
319
+ return user;
320
+ }
321
+ \`\`\`
322
+
323
+ \`recordWithMeticulous\` takes the value the operation produced. A promise is fine, and is the usual case: its resolved value is recorded, the
324
+ promise you return is untouched, and \`stubWithMeticulous\` then returns a promise to match. These are the same recordings
325
+ \`withMeticulousOperation\` produces, so you can move between the two forms without invalidating anything. Here the name is the whole
326
+ identity — there is no separate \`key\`, so put whatever distinguishes one call from another into the name.
327
+
328
+ Use \`isMeticulousReplaying()\` for the branch rather than checking an env var yourself. The mode a process was started in, and an image
329
+ built for Meticulous, are both the same in either mode, so neither tells you whether a recorded outcome can actually be served.
330
+
331
+ Two things you give up by splitting it, which is why wrapping is still the better default where it's acceptable:
332
+
333
+ - **A thrown error isn't captured.** \`recordWithMeticulous\` is handed a value, so a call that threw never reaches it and the replay has
334
+ nothing to serve. A rejected promise *is* captured. If failure is part of the flow, wrap instead.
335
+ - **The branch is yours to get right**, and only the replay side of it is exercised by a replay — so a mistake in the other side won't
336
+ show up until it reaches production.
337
+
338
+ That's it — once your app is running with the backend recorder enabled, server-side requests will be captured alongside the frontend
339
+ sessions and used to stub backend calls during replay.
340
+ `;
@@ -0,0 +1,58 @@
1
+ import {
2
+ GITHUB_ACTIONS_SETUP_URL,
3
+ MAKE_CHECK_BLOCKING_URL,
4
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
5
+ import { METICULOUS_GITHUB_CHECK_NAME } from "@alwaysmeticulous/webapp-frontend-backend-shared";
6
+ import { INITIALIZE_WITH_SUCCESSFUL_CHECK_CHECKBOX_LABEL } from "src/components/project/overview/settings/ci-settings/not-yet-run-pull-request-commit-check.component";
7
+
8
+ export const document = `---
9
+ {
10
+ "title": "Create Meticulous check in 'success' state until tests start running"
11
+ }
12
+ ---
13
+
14
+ # {% $frontmatter.title %}
15
+
16
+ In the default Meticulous setup you'll have a workflow that builds your app and invokes the
17
+ [Meticulous GitHub Action](${GITHUB_ACTIONS_SETUP_URL}) (\`upload-assets\` or \`upload-container\` depending on how your app is served). Say you name this workflow '*trigger-meticulous-tests.yml*'. You can
18
+ make Meticulous a blocking check by marking the '*${METICULOUS_GITHUB_CHECK_NAME}*' check as
19
+ a [required check](${MAKE_CHECK_BLOCKING_URL}). The build process would therefore look like this:
20
+
21
+ 1. Your '*trigger-meticulous-tests.yml*' GitHub workflow is triggered (e.g. when a PR is opened). The '*${METICULOUS_GITHUB_CHECK_NAME}*' check
22
+ has not been created yet, since the Meticulous tests have not started yet, and since you've marked '*${METICULOUS_GITHUB_CHECK_NAME}*' as
23
+ a required check the PR will not be able to be merged yet.
24
+ 2. Once the build and pre-steps complete, the Meticulous action is invoked. This creates a second check on the PR, normally
25
+ named '*${METICULOUS_GITHUB_CHECK_NAME}*'. This check will show as pending until the tests complete. If there are unapproved differences it
26
+ will show as a failure, and will be updated to success when the differences are approved. Since you've marked the '*${METICULOUS_GITHUB_CHECK_NAME}*'
27
+ check as a required check, the PR will not be able to be merged until the differences are approved.
28
+ 3. Finally the '*trigger-meticulous-tests.yml*' workflow will complete, and be marked as success.
29
+
30
+ {% callout type="warning" %}
31
+ **Multiple projects for the same repository:** If you have more than one Meticulous project connected to the same GitHub repository (e.g. for testing different app variants or environments), the check name will include the project name — for example, *'Meticulous Tests (my-project)'* instead of *'${METICULOUS_GITHUB_CHECK_NAME}'*. Make sure your required status checks use the correct name. If you later add a second project to a repo that previously only had one, the check name will change and you'll need to update your branch protection rules accordingly.
32
+ {% /callout %}
33
+
34
+ However having the '*${METICULOUS_GITHUB_CHECK_NAME}*' check as a required check can cause issues in a couple of scenarios:
35
+
36
+ 1. If you use merge queues. In this case you don't want Meticulous to post a failed check if diffs are detected at the merge queue stage,
37
+ since that would block the merge queue from merging. Any differences should have already been approved before the PR was added to the
38
+ merge queue. It is therefore standard to skip the Meticulous workflow for merge queue triggers. However, if Meticulous is a
39
+ [required checks](${MAKE_CHECK_BLOCKING_URL}) then the merge queue would be indefinitely blocked because it'd be waiting for a check
40
+ that is never created.
41
+ 2. If you don't trigger Meticulous for every pull request. In this case you don't want to block merging PRs where Meticulous doesn't run
42
+ (i.e. no Meticulous check was ever created).
43
+
44
+ There are two ways of solving these issues:
45
+
46
+ 1. Tick the '*${INITIALIZE_WITH_SUCCESSFUL_CHECK_CHECKBOX_LABEL}*' option in your Meticulous project settings.
47
+ This will cause Meticulous to register GitHub webhooks to monitor for new pull requests, new commit pushes, and for pull requests added
48
+ to merge queues. It will then create a successful '*${METICULOUS_GITHUB_CHECK_NAME}*' check in each of these cases straight away. This
49
+ check will start off as 'success' and turn to 'pending' when and if the Meticulous tests start running. If the Meticulous tests never run
50
+ then the check will be successful, and the PR can merge. This does however mean that developers will be able to merge pull requests in
51
+ the period between the PR being opened and the Meticulous tests being triggered after the build or deployment completes.
52
+ 2. Use a GitHub action such as [wait-for-checks](https://github.com/marketplace/actions/wait-for-checks) that only waits for checks that
53
+ are actually triggered, rather than waiting for a hard coded list of checks even if some of them are never triggered on some PRs. As long
54
+ as a GitHub workflow is running or a check pending while the application is being built prior to the Meticulous tests being triggered then
55
+ the PR will not be able to be merged until the tests complete. However if you trigger the Meticulous tests indirectly by creating a GitHub
56
+ deployment then there is a risk the PR will be mergeable in the handful of seconds between the workflow that creates the deployment completing
57
+ and Meticulous receiving the GitHub webhook for the new deployment and starting the tests.
58
+ `;
@@ -0,0 +1,19 @@
1
+ import {
2
+ CLOUD_REPLAY_URL,
3
+ GITHUB_ACTIONS_SETUP_URL,
4
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
5
+
6
+ export const document = `---
7
+ {
8
+ "title": "Setting up Meticulous to test your pull requests"
9
+ }
10
+ ---
11
+
12
+ # {% $frontmatter.title %}
13
+
14
+ There are several ways to run Meticulous tests on your pull requests. We recommend the following approaches, in order of preference:
15
+
16
+ 1. **Upload static assets** — If your app can be served as a folder of static files (HTML/JS/CSS), this is the simplest approach. Not suitable for apps that require server-side rendering (e.g. Next.js). [Get started here](${GITHUB_ACTIONS_SETUP_URL}).
17
+ 2. **Upload a container image** — If your app requires a server (e.g. Next.js, SSR), upload a Docker image and we'll run it for you. This is the recommended approach for most apps. [Get started here](${GITHUB_ACTIONS_SETUP_URL}).
18
+ 3. **Use preview URLs** — If you already use Vercel, Netlify, or a similar service to generate PR preview URLs, Meticulous can test against those directly. [Learn more here](${CLOUD_REPLAY_URL}).
19
+ `;
@@ -0,0 +1,145 @@
1
+ import {
2
+ CREATE_DEPLOYMENTS_ON_GITHUB_URL,
3
+ GITHUB_ACTIONS_SETUP_URL,
4
+ MAKE_CHECK_BLOCKING_URL,
5
+ } from "src/lib/utils/internal-urls/docs-urls.utils";
6
+ import {
7
+ METICULOUS_GITHUB_APP_INSTALL_URL,
8
+ METICULOUS_VERCEL_INTEGRATION_INSTALL_URL,
9
+ } from "./constants";
10
+ import { linkGitLabInstructions } from "./how-to/link-gitlab";
11
+ import { METICULOUS_SUPPORT_EMAIL } from "src/lib/next/next.constants";
12
+
13
+ export const document = `---
14
+ {
15
+ "title": "Running tests against existing deployment URLs"
16
+ }
17
+ ---
18
+
19
+ # {% $frontmatter.title %}
20
+
21
+ {% callout_card variant="info" title="Preferred: Upload static assets or a container image" %}
22
+ If possible, we recommend [running tests via your CI pipeline](${GITHUB_ACTIONS_SETUP_URL}) by uploading static assets or a container image. These approaches are simpler and more reliable. Use deployment URL testing only if those options are not possible for your app.
23
+ {% /callout_card %}
24
+
25
+ {% tabs %}
26
+ {% tab label="GitHub" %}
27
+
28
+ If you use Vercel, Netlify, Cloudflare Pages or a similar system to generate PR preview URLs you can use the Meticulous GitHub app to test your PRs for you:
29
+
30
+ #### **Step 1: Install the Meticulous GitHub app**
31
+
32
+ Begin by [installing the Meticulous GitHub app](${METICULOUS_GITHUB_APP_INSTALL_URL}).
33
+
34
+ #### **Step 2: Integrate with your preview URL provider**
35
+
36
+ Once the GitHub app is installed, select the system you use to generate PR preview links:
37
+
38
+ {% tabs tabNameSpace="preview-provider" %}
39
+ {% tab label="Vercel" %}
40
+
41
+ Install the [Meticulous Vercel integration](${METICULOUS_VERCEL_INTEGRATION_INSTALL_URL}) and link your Vercel project in Meticulous.
42
+
43
+ If you have multiple Vercel projects for your GitHub repo, or multiple environments that you deploy the same branches/commits to, then you'll
44
+ need to let Meticulous know which environments it should run the tests against. You can do so by navigating to your project page and clicking on the *'Settings'* tab.
45
+
46
+ {% /tab %}
47
+ {% tab label="Netlify" %}
48
+
49
+ If you use Netlify you can configure a Netlify webhook so tests are triggered when new preview deploys are ready. Contact
50
+ [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}) for help setting this up.
51
+
52
+ {% /tab %}
53
+ {% tab label="Cloudflare" %}
54
+
55
+ If you use Cloudflare pages you can configure a Cloudflare webhook so tests are triggered when new preview deploys are ready. Contact
56
+ [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}) for help setting this up.
57
+
58
+ {% /tab %}
59
+ {% tab label="Other/Home-Grown" %}
60
+
61
+ If you use another preview URL system, or a home grown system you can generate
62
+ a GitHub deployment (environment) whenever a commit is pushed to a branch. This can then in turn be used to trigger a Meticulous test run
63
+ against the new deployment.
64
+
65
+ You can view instructions for how to do this [here](${CREATE_DEPLOYMENTS_ON_GITHUB_URL}), however it can be
66
+ fragile to set up correctly, and requires your PR preview system to have immutable, long-lived preview URLs and use identical
67
+ build settings across PR branches and main branch commits (to avoid false screenshot diffs). For this reason we recommend
68
+ [triggering Meticulous from your CI pipeline instead](${GITHUB_ACTIONS_SETUP_URL}), if possible.
69
+
70
+ {% /tab %}
71
+ {% /tabs %}
72
+
73
+ #### **Step 3 (optional): Make the Meticulous check blocking**
74
+
75
+ Whenever you open a new pull request Meticulous will now simulate a set of sessions against the preview URL before and after the PR, and post
76
+ a comment to the PR notifying of any changes spotted.
77
+
78
+ If you wish, you can make this check blocking by following the instructions [here](${MAKE_CHECK_BLOCKING_URL}). Doing so will prevent developers
79
+ from merging a PR which has visual differences until they have clicked the button to acknowledge the differences.
80
+
81
+ {% /tab %}
82
+ {% tab label="GitLab" %}
83
+
84
+ ## Initial setup
85
+
86
+ If you use Vercel, Netlify or a similar system to generate PR preview URLs, you can use Meticulous to test your PRs.
87
+ To set this up:
88
+
89
+ ${linkGitLabInstructions}
90
+
91
+ ## Further steps
92
+
93
+ {% tabs %}
94
+ {% tab label="Vercel" %}
95
+
96
+ Please let us know that you are using Vercel preview URLs in the email you sent us when setting up GitLab.
97
+ After some setup on our side Meticulous will automatically run tests against Vercel preview URLs whenever a new deployment is ready.
98
+
99
+ {% /tab %}
100
+ {% tab label="Other preview URL providers" %}
101
+
102
+ Call the */test-runs/trigger* endpoint from your GitLab CI pipeline whenever a new commit is pushed to a branch with an open MR.
103
+ The endpoint will trigger a test run, and Meticulous will handle setting commit statuses and posting notes to the merge request as
104
+ the test run progresses.
105
+
106
+ {% code_with_project_selector %}
107
+ \`\`\`http
108
+ POST https://app.meticulous.ai/api/test-runs/trigger
109
+
110
+ Headers: {
111
+ authorization: "{% api_token /%}"
112
+ Content-Type: "application/json"
113
+ }
114
+
115
+ Body: {
116
+ headSha: string, // the SHA of the commit you want to test
117
+ headDeploymentUrl: string, // preview URL of headSha
118
+ baseSha: string, // the SHA of the commit which the new test run will be compared against
119
+ baseDeploymentUrl: string // preview URL of baseSha
120
+ }
121
+ \`\`\`
122
+ {% /code_with_project_selector %}
123
+
124
+ There are two different types of pipelines that GitLab can trigger when a new commit is pushed to a branch with an open MR: *merge request
125
+ pipelines* and *merged results pipelines* ([GitLab docs](https://docs.gitlab.com/ee/ci/pipelines/merged_results_pipelines.html)). Your
126
+ pipeline should call the */test-runs/trigger* endpoint with different values for \`headSha\` and \`baseSha\` depending on which type of
127
+ pipeline you use.
128
+
129
+ If you use merge request pipelines:
130
+ - \`headSha\` should be the SHA of the commit that was just pushed to the branch. This is exposed in the CI pipeline as
131
+ \`$CI_COMMIT_SHA\`.
132
+ - \`baseSha\` should be the SHA of the commit from which the branch was created. This is exposed in the CI pipeline as
133
+ \`$CI_MERGE_REQUEST_DIFF_BASE_SHA\`.
134
+
135
+ If you use merged results pipelines:
136
+ - \`headSha\` should be the SHA of the merge commit. This is exposed in the CI pipeline as \`$CI_COMMIT_SHA\`.
137
+ - \`baseSha\` should be the SHA of the HEAD commit on the target branch. This is exposed in the CI pipeline as
138
+ \`$CI_MERGE_REQUEST_TARGET_BRANCH_SHA\`.
139
+
140
+ {% /tab %}
141
+ {% /tabs %}
142
+
143
+ {% /tab %}
144
+ {% /tabs %}
145
+ `;
@@ -0,0 +1,37 @@
1
+ import { METICULOUS_SUPPORT_EMAIL } from "src/lib/next/next.constants";
2
+
3
+ export const METICULOUS_VERCEL_INTEGRATION_INSTALL_URL =
4
+ "https://vercel.com/integrations/meticulous";
5
+
6
+ export const METICULOUS_GITHUB_APP_INSTALL_URL =
7
+ "https://github.com/apps/alwaysmeticulous/installations/new";
8
+
9
+ export const WHERE_CAN_I_REACH_OUT_FOR_SUPPORT = `
10
+ ### Where can I reach out for support?
11
+
12
+ Reach out to [${METICULOUS_SUPPORT_EMAIL}](mailto:${METICULOUS_SUPPORT_EMAIL}) and we'll be happy to help.
13
+ `;
14
+
15
+ export const METICULOUS_DEBUG_PR_LABEL = "[meticulous debug]";
16
+
17
+ export const SIMULATION_TAB_NAMES = {
18
+ DEBUG_LOCALLY: "Debug Locally",
19
+ TIMELINE_AND_LOGS: "Timeline & Logs",
20
+ };
21
+
22
+ /**
23
+ * Keep in sync with [@alwaysmeticulous/browser-utils](https://github.com/alwaysmeticulous/meticulous/blob/9c89cf58ae240bea0f9201c5d704a0bcc53e61bd/packages/browser-utils/src/utils/public-api-classes.ts#L11).
24
+ */
25
+ export const METICULOUS_REDACT_RECORDING_CLASS = "meticulous-redact-recording";
26
+
27
+ /**
28
+ * Keep in sync with [@alwaysmeticulous/browser-utils](https://github.com/alwaysmeticulous/meticulous/blob/9c89cf58ae240bea0f9201c5d704a0bcc53e61bd/packages/browser-utils/src/utils/public-api-classes.ts#L11).
29
+ */
30
+ export const METICULOUS_MASK_RECORDING_PREVIEW_CLASS =
31
+ "meticulous-mask-recording-preview";
32
+
33
+ export const GITHUB_ACTION_UPLOAD_ASSETS_NAME =
34
+ "alwaysmeticulous/report-diffs-action/upload-assets";
35
+
36
+ export const GITHUB_ACTION_UPLOAD_CONTAINER_NAME =
37
+ "alwaysmeticulous/report-diffs-action/upload-container";