@speedkit/cli 4.51.0-run-control.5 → 4.51.1

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 (486) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +14 -1426
  3. package/dist/commands/diff.d.ts +1 -7
  4. package/dist/commands/diff.js +3 -9
  5. package/dist/commands/login.d.ts +0 -3
  6. package/dist/commands/login.js +3 -14
  7. package/dist/commands/onboarding.d.ts +0 -26
  8. package/dist/commands/onboarding.js +4 -221
  9. package/dist/commands/origin-request.d.ts +0 -4
  10. package/dist/commands/origin-request.js +0 -4
  11. package/dist/services/browser-fetch/device-emulation.d.ts +0 -11
  12. package/dist/services/browser-fetch/device-emulation.js +0 -14
  13. package/dist/services/bundler/bundle-service-factory.d.ts +3 -0
  14. package/dist/services/bundler/bundle-service-factory.js +5 -1
  15. package/dist/services/bundler/bundle-service.d.ts +10 -1
  16. package/dist/services/bundler/bundle-service.js +16 -1
  17. package/dist/services/bundler/error/packjockel-error.d.ts +3 -0
  18. package/dist/services/bundler/error/packjockel-error.js +3 -0
  19. package/dist/services/bundler/index.d.ts +1 -0
  20. package/dist/services/bundler/index.js +1 -0
  21. package/dist/services/bundler/packjockel-service.d.ts +112 -0
  22. package/dist/services/bundler/packjockel-service.js +202 -0
  23. package/dist/services/bundler/spec/packjockel-service.spec.js +186 -0
  24. package/dist/services/cli/cli-environment-factory.d.ts +0 -3
  25. package/dist/services/cli/cli-environment-factory.js +0 -1
  26. package/dist/services/cli/cli-service-build-context.d.ts +0 -3
  27. package/dist/services/cli/cli-service-factory.js +1 -1
  28. package/dist/services/cli/cli-service-model.d.ts +10 -29
  29. package/dist/services/cli/cli-service.d.ts +11 -60
  30. package/dist/services/cli/cli-service.js +32 -196
  31. package/dist/services/cli/index.d.ts +0 -2
  32. package/dist/services/cli/index.js +0 -2
  33. package/dist/services/cli/spec/cli-service.spec.js +50 -113
  34. package/dist/services/deploy/checks/activation/customer-approval-check.js +1 -1
  35. package/dist/services/deploy/checks/pre-deploy/device-detection-changed-check.js +2 -3
  36. package/dist/services/deploy/checks/pre-deploy/split-change-check.js +2 -3
  37. package/dist/services/deploy/handler/customer-config-handler.d.ts +9 -0
  38. package/dist/services/deploy/handler/customer-config-handler.js +41 -6
  39. package/dist/services/deploy/interface/install.d.ts +7 -1
  40. package/dist/services/deploy/mr/live-state-check.js +21 -2
  41. package/dist/services/deploy/policy/auto-deploy-policy.js +2 -0
  42. package/dist/services/deploy/policy/deploy-policy-model.d.ts +4 -0
  43. package/dist/services/deploy/policy/deploy-policy-model.js +4 -0
  44. package/dist/services/deploy/policy/testing-deploy-policy.js +2 -0
  45. package/dist/services/deploy/spec/handler/customer-config-handler.spec.js +98 -0
  46. package/dist/services/deploy/spec/mr/live-state-check.spec.js +45 -4
  47. package/dist/services/deploy/spec/policy/auto-deploy-policy.spec.js +2 -0
  48. package/dist/services/deploy/spec/policy/testing-deploy-policy.spec.js +3 -1
  49. package/dist/services/diff/diff-service-build-context.d.ts +0 -12
  50. package/dist/services/diff/diff-service-build-context.js +1 -45
  51. package/dist/services/diff/diff-service-factory.d.ts +0 -2
  52. package/dist/services/diff/diff-service-factory.js +25 -65
  53. package/dist/services/diff/diff-service.d.ts +0 -11
  54. package/dist/services/diff/diff-service.js +11 -37
  55. package/dist/services/diff/page-source.d.ts +0 -12
  56. package/dist/services/diff/page-source.js +11 -16
  57. package/dist/services/diff/sinks/tool-diff-sink.d.ts +2 -3
  58. package/dist/services/diff/sinks/tool-diff-sink.js +2 -3
  59. package/dist/services/diff/spec/diff-service-build-context.spec.js +0 -19
  60. package/dist/services/diff/spec/diff-service.spec.js +0 -95
  61. package/dist/services/document-handler-runtime/document-handler-browser-mock.d.ts +13 -0
  62. package/dist/services/document-handler-runtime/document-handler-browser-mock.js +69 -0
  63. package/dist/services/document-handler-runtime/document-handler-server.d.ts +27 -0
  64. package/dist/services/document-handler-runtime/document-handler-server.js +112 -19
  65. package/dist/services/document-handler-runtime/spec/document-handler-browser-mock.spec.js +34 -0
  66. package/dist/services/git/git-repository.d.ts +0 -2
  67. package/dist/services/git/git-repository.js +0 -6
  68. package/dist/services/integration-api/customer-config-flags.js +0 -1
  69. package/dist/services/integration-api/integration-api-model.d.ts +4 -1
  70. package/dist/services/integration-api/spec/customer-config-file.spec.js +56 -0
  71. package/dist/services/integration-api/spec/speed-kit-config-file.spec.js +68 -8
  72. package/dist/services/integration-api/struct/customer-config-file.d.ts +15 -0
  73. package/dist/services/integration-api/struct/customer-config-file.js +42 -0
  74. package/dist/services/integration-api/struct/customer-config.d.ts +55 -1
  75. package/dist/services/integration-api/struct/customer-config.js +70 -3
  76. package/dist/services/integration-api/struct/speed-kit-config-file.d.ts +11 -4
  77. package/dist/services/integration-api/struct/speed-kit-config-file.js +31 -10
  78. package/dist/services/onboarding/browse/browse-service.d.ts +1 -13
  79. package/dist/services/onboarding/browse/browse-service.js +7 -43
  80. package/dist/services/onboarding/browser/baqend-response.d.ts +1 -17
  81. package/dist/services/onboarding/browser/baqend-response.js +0 -23
  82. package/dist/services/onboarding/browser/emulate-device.d.ts +1 -12
  83. package/dist/services/onboarding/browser/emulate-device.js +13 -68
  84. package/dist/services/onboarding/browser/executable/executable-validator.js +2 -4
  85. package/dist/services/onboarding/browser/extension/extension-bridge.js +3 -5
  86. package/dist/services/onboarding/browser/extension/extension-downloader.js +8 -17
  87. package/dist/services/onboarding/browser/extension/extension-validator.js +4 -9
  88. package/dist/services/onboarding/browser/launch-browser.d.ts +1 -2
  89. package/dist/services/onboarding/browser/launch-browser.js +1 -6
  90. package/dist/services/onboarding/config-renderer/speed-kit-install-context.d.ts +2 -0
  91. package/dist/services/onboarding/config-renderer/speed-kit-install-context.js +29 -8
  92. package/dist/services/onboarding/dashboard/diff-against-current-page.js +1 -3
  93. package/dist/services/onboarding/dashboard/index.js +2 -7
  94. package/dist/services/onboarding/fetch-event-handler.d.ts +5 -24
  95. package/dist/services/onboarding/fetch-event-handler.js +32 -103
  96. package/dist/services/onboarding/fetch-events/spec/speed-kit-install-js.spec.js +59 -0
  97. package/dist/services/onboarding/fetch-events/speed-kit-install-js.js +7 -14
  98. package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.d.ts +0 -14
  99. package/dist/services/onboarding/fetch-events/speed-kit-rum-pi-request.js +0 -30
  100. package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.d.ts +3 -14
  101. package/dist/services/onboarding/fetch-events/speed-kit-service-worker-js.js +10 -29
  102. package/dist/services/onboarding/file-events/file-watcher.d.ts +4 -43
  103. package/dist/services/onboarding/file-events/file-watcher.js +21 -119
  104. package/dist/services/onboarding/inject/inject-service.js +1 -1
  105. package/dist/services/onboarding/onboarding-model.d.ts +7 -40
  106. package/dist/services/onboarding/onboarding-model.js +9 -20
  107. package/dist/services/onboarding/onboarding-service-build-context.d.ts +0 -4
  108. package/dist/services/onboarding/onboarding-service-build-context.js +1 -7
  109. package/dist/services/onboarding/onboarding-service-factory.d.ts +1 -17
  110. package/dist/services/onboarding/onboarding-service-factory.js +35 -152
  111. package/dist/services/onboarding/onboarding-service.d.ts +1 -40
  112. package/dist/services/onboarding/onboarding-service.js +23 -139
  113. package/dist/services/onboarding/request-cache/cache.d.ts +5 -62
  114. package/dist/services/onboarding/request-cache/cache.js +17 -128
  115. package/dist/services/onboarding/spec/file-events/file-watcher.spec.js +67 -0
  116. package/dist/services/onboarding/spec/onboarding-model.spec.js +3 -39
  117. package/dist/services/onboarding/spec/onboarding-service-factory.spec.js +1 -25
  118. package/dist/services/onboarding/templates/install-speed-kit-js-template.js +5 -0
  119. package/dist/services/onboarding/todo-collector.d.ts +2 -7
  120. package/dist/services/onboarding/todo-collector.js +12 -49
  121. package/dist/services/onboarding/virtual-orestes-app/index.d.ts +0 -38
  122. package/dist/services/onboarding/virtual-orestes-app/index.js +27 -113
  123. package/dist/services/origin-request/asset-variations.d.ts +0 -14
  124. package/dist/services/origin-request/asset-variations.js +4 -11
  125. package/dist/services/origin-request/origin-fetcher.d.ts +0 -7
  126. package/dist/services/origin-request/origin-fetcher.js +5 -43
  127. package/dist/services/origin-request/origin-request-service-build-context.d.ts +0 -17
  128. package/dist/services/origin-request/origin-request-service-build-context.js +0 -8
  129. package/dist/services/origin-request/origin-request-service-factory.d.ts +5 -0
  130. package/dist/services/origin-request/origin-request-service-factory.js +30 -2
  131. package/dist/services/origin-request/origin-request-service.d.ts +6 -121
  132. package/dist/services/origin-request/origin-request-service.js +49 -273
  133. package/dist/services/origin-request/runtime-config-source.d.ts +0 -6
  134. package/dist/services/origin-request/runtime-config-source.js +4 -15
  135. package/dist/services/origin-request/spec/asset-variations.spec.js +0 -20
  136. package/dist/services/origin-request/spec/origin-request-service.spec.js +6 -329
  137. package/dist/services/pull/pull-service.js +23 -5
  138. package/dist/services/query-builder/query-builder-factory.js +3 -3
  139. package/dist/services/setup/os/tool-registry.js +2 -2
  140. package/oclif.manifest.json +269 -3390
  141. package/package.json +3 -20
  142. package/dist/base/run-control-command.d.ts +0 -15
  143. package/dist/base/run-control-command.js +0 -20
  144. package/dist/build-info.json +0 -6
  145. package/dist/commands/onboarding/browser/click.d.ts +0 -75
  146. package/dist/commands/onboarding/browser/click.js +0 -19
  147. package/dist/commands/onboarding/browser/emulate.d.ts +0 -105
  148. package/dist/commands/onboarding/browser/emulate.js +0 -26
  149. package/dist/commands/onboarding/browser/navigate.d.ts +0 -75
  150. package/dist/commands/onboarding/browser/navigate.js +0 -19
  151. package/dist/commands/onboarding/browser/panel.d.ts +0 -63
  152. package/dist/commands/onboarding/browser/panel.js +0 -12
  153. package/dist/commands/onboarding/browser/reinstall-sw.d.ts +0 -63
  154. package/dist/commands/onboarding/browser/reinstall-sw.js +0 -14
  155. package/dist/commands/onboarding/browser/reset.d.ts +0 -71
  156. package/dist/commands/onboarding/browser/reset.js +0 -18
  157. package/dist/commands/onboarding/browser/screenshot.d.ts +0 -77
  158. package/dist/commands/onboarding/browser/screenshot.js +0 -19
  159. package/dist/commands/onboarding/browser/state.d.ts +0 -63
  160. package/dist/commands/onboarding/browser/state.js +0 -12
  161. package/dist/commands/onboarding/browser/tabs.d.ts +0 -58
  162. package/dist/commands/onboarding/browser/tabs.js +0 -16
  163. package/dist/commands/onboarding/cache/clear.d.ts +0 -58
  164. package/dist/commands/onboarding/cache/clear.js +0 -12
  165. package/dist/commands/onboarding/cache/errors.d.ts +0 -58
  166. package/dist/commands/onboarding/cache/errors.js +0 -12
  167. package/dist/commands/onboarding/cache/evict.d.ts +0 -62
  168. package/dist/commands/onboarding/cache/evict.js +0 -15
  169. package/dist/commands/onboarding/cache/get.d.ts +0 -85
  170. package/dist/commands/onboarding/cache/get.js +0 -17
  171. package/dist/commands/onboarding/cache/list.d.ts +0 -58
  172. package/dist/commands/onboarding/cache/list.js +0 -15
  173. package/dist/commands/onboarding/cache/prewarm.d.ts +0 -73
  174. package/dist/commands/onboarding/cache/prewarm.js +0 -20
  175. package/dist/commands/onboarding/cache/refresh.d.ts +0 -62
  176. package/dist/commands/onboarding/cache/refresh.js +0 -18
  177. package/dist/commands/onboarding/cdp.d.ts +0 -81
  178. package/dist/commands/onboarding/cdp.js +0 -18
  179. package/dist/commands/onboarding/debug/arm.d.ts +0 -83
  180. package/dist/commands/onboarding/debug/arm.js +0 -19
  181. package/dist/commands/onboarding/debug/await.d.ts +0 -71
  182. package/dist/commands/onboarding/debug/await.js +0 -18
  183. package/dist/commands/onboarding/debug/disarm.d.ts +0 -63
  184. package/dist/commands/onboarding/debug/disarm.js +0 -12
  185. package/dist/commands/onboarding/debug/eval.d.ts +0 -75
  186. package/dist/commands/onboarding/debug/eval.js +0 -16
  187. package/dist/commands/onboarding/debug/release.d.ts +0 -63
  188. package/dist/commands/onboarding/debug/release.js +0 -12
  189. package/dist/commands/onboarding/debug/resume.d.ts +0 -63
  190. package/dist/commands/onboarding/debug/resume.js +0 -12
  191. package/dist/commands/onboarding/debug/status.d.ts +0 -63
  192. package/dist/commands/onboarding/debug/status.js +0 -12
  193. package/dist/commands/onboarding/debug/step.d.ts +0 -67
  194. package/dist/commands/onboarding/debug/step.js +0 -15
  195. package/dist/commands/onboarding/files/list.d.ts +0 -58
  196. package/dist/commands/onboarding/files/list.js +0 -12
  197. package/dist/commands/onboarding/files/read.d.ts +0 -73
  198. package/dist/commands/onboarding/files/read.js +0 -16
  199. package/dist/commands/onboarding/files/rebuild.d.ts +0 -63
  200. package/dist/commands/onboarding/files/rebuild.js +0 -18
  201. package/dist/commands/onboarding/files/validate.d.ts +0 -58
  202. package/dist/commands/onboarding/files/validate.js +0 -12
  203. package/dist/commands/onboarding/fouc.d.ts +0 -77
  204. package/dist/commands/onboarding/fouc.js +0 -16
  205. package/dist/commands/onboarding/inject/add.d.ts +0 -89
  206. package/dist/commands/onboarding/inject/add.js +0 -17
  207. package/dist/commands/onboarding/inject/clear.d.ts +0 -63
  208. package/dist/commands/onboarding/inject/clear.js +0 -12
  209. package/dist/commands/onboarding/inject/list.d.ts +0 -63
  210. package/dist/commands/onboarding/inject/list.js +0 -12
  211. package/dist/commands/onboarding/inject/read.d.ts +0 -75
  212. package/dist/commands/onboarding/inject/read.js +0 -18
  213. package/dist/commands/onboarding/inject/recipes.d.ts +0 -63
  214. package/dist/commands/onboarding/inject/recipes.js +0 -12
  215. package/dist/commands/onboarding/inject/remove.d.ts +0 -67
  216. package/dist/commands/onboarding/inject/remove.js +0 -15
  217. package/dist/commands/onboarding/list.d.ts +0 -13
  218. package/dist/commands/onboarding/list.js +0 -12
  219. package/dist/commands/onboarding/logs.d.ts +0 -41
  220. package/dist/commands/onboarding/logs.js +0 -257
  221. package/dist/commands/onboarding/navwalk.d.ts +0 -95
  222. package/dist/commands/onboarding/navwalk.js +0 -19
  223. package/dist/commands/onboarding/response.d.ts +0 -67
  224. package/dist/commands/onboarding/response.js +0 -18
  225. package/dist/commands/onboarding/rum/beacons.d.ts +0 -75
  226. package/dist/commands/onboarding/rum/beacons.js +0 -16
  227. package/dist/commands/onboarding/rum/get.d.ts +0 -77
  228. package/dist/commands/onboarding/rum/get.js +0 -18
  229. package/dist/commands/onboarding/rum/key.d.ts +0 -67
  230. package/dist/commands/onboarding/rum/key.js +0 -13
  231. package/dist/commands/onboarding/rum/previous.d.ts +0 -63
  232. package/dist/commands/onboarding/rum/previous.js +0 -12
  233. package/dist/commands/onboarding/status.d.ts +0 -13
  234. package/dist/commands/onboarding/status.js +0 -17
  235. package/dist/commands/onboarding/stop.d.ts +0 -13
  236. package/dist/commands/onboarding/stop.js +0 -17
  237. package/dist/commands/onboarding/todo.d.ts +0 -58
  238. package/dist/commands/onboarding/todo.js +0 -12
  239. package/dist/commands/onboarding/viewport.d.ts +0 -101
  240. package/dist/commands/onboarding/viewport.js +0 -18
  241. package/dist/commands/onboarding/watch.d.ts +0 -93
  242. package/dist/commands/onboarding/watch.js +0 -16
  243. package/dist/commands/spec/onboarding.spec.js +0 -127
  244. package/dist/services/cli/build-info.d.ts +0 -33
  245. package/dist/services/cli/build-info.js +0 -63
  246. package/dist/services/cli/sink.d.ts +0 -47
  247. package/dist/services/cli/sink.js +0 -31
  248. package/dist/services/cli/spec/build-identity.spec.js +0 -85
  249. package/dist/services/cli/spec/build-info.spec.js +0 -10
  250. package/dist/services/cli/spec/cli-service-log.spec.js +0 -133
  251. package/dist/services/cli/spec/memory-cli.d.ts +0 -9
  252. package/dist/services/cli/spec/memory-cli.js +0 -9
  253. package/dist/services/diff/config-at-ref.d.ts +0 -20
  254. package/dist/services/diff/config-at-ref.js +0 -33
  255. package/dist/services/diff/run-runtime-config.d.ts +0 -33
  256. package/dist/services/diff/run-runtime-config.js +0 -74
  257. package/dist/services/diff/spec/config-at-ref.spec.js +0 -46
  258. package/dist/services/diff/spec/run-runtime-config.spec.js +0 -87
  259. package/dist/services/onboarding/browser/answer-dialogs.d.ts +0 -12
  260. package/dist/services/onboarding/browser/answer-dialogs.js +0 -25
  261. package/dist/services/onboarding/browser/console-log.d.ts +0 -9
  262. package/dist/services/onboarding/browser/console-log.js +0 -27
  263. package/dist/services/onboarding/browser/resume-restarted-workers.d.ts +0 -14
  264. package/dist/services/onboarding/browser/resume-restarted-workers.js +0 -26
  265. package/dist/services/onboarding/control/body-inspect.d.ts +0 -24
  266. package/dist/services/onboarding/control/body-inspect.js +0 -106
  267. package/dist/services/onboarding/control/browser-session.d.ts +0 -547
  268. package/dist/services/onboarding/control/browser-session.js +0 -1337
  269. package/dist/services/onboarding/control/config-validation.d.ts +0 -17
  270. package/dist/services/onboarding/control/config-validation.js +0 -46
  271. package/dist/services/onboarding/control/control-protocol.d.ts +0 -1430
  272. package/dist/services/onboarding/control/control-protocol.js +0 -58
  273. package/dist/services/onboarding/control/control-server.d.ts +0 -292
  274. package/dist/services/onboarding/control/control-server.js +0 -1629
  275. package/dist/services/onboarding/control/debug-session.d.ts +0 -219
  276. package/dist/services/onboarding/control/debug-session.js +0 -897
  277. package/dist/services/onboarding/control/fouc.d.ts +0 -23
  278. package/dist/services/onboarding/control/fouc.js +0 -151
  279. package/dist/services/onboarding/control/index.d.ts +0 -4
  280. package/dist/services/onboarding/control/index.js +0 -4
  281. package/dist/services/onboarding/control/navigate-wait.d.ts +0 -33
  282. package/dist/services/onboarding/control/navigate-wait.js +0 -56
  283. package/dist/services/onboarding/control/navwalk.d.ts +0 -65
  284. package/dist/services/onboarding/control/navwalk.js +0 -248
  285. package/dist/services/onboarding/control/preload-registry.d.ts +0 -150
  286. package/dist/services/onboarding/control/preload-registry.js +0 -829
  287. package/dist/services/onboarding/control/response-explainer.d.ts +0 -24
  288. package/dist/services/onboarding/control/response-explainer.js +0 -257
  289. package/dist/services/onboarding/control/rum.d.ts +0 -8
  290. package/dist/services/onboarding/control/rum.js +0 -220
  291. package/dist/services/onboarding/control/service-worker-tracker.d.ts +0 -68
  292. package/dist/services/onboarding/control/service-worker-tracker.js +0 -120
  293. package/dist/services/onboarding/control/viewport.d.ts +0 -45
  294. package/dist/services/onboarding/control/viewport.js +0 -344
  295. package/dist/services/onboarding/control/watch.d.ts +0 -26
  296. package/dist/services/onboarding/control/watch.js +0 -157
  297. package/dist/services/onboarding/request-cache/asset-key.d.ts +0 -61
  298. package/dist/services/onboarding/request-cache/asset-key.js +0 -115
  299. package/dist/services/onboarding/spec/browser/answer-dialogs.spec.d.ts +0 -1
  300. package/dist/services/onboarding/spec/browser/answer-dialogs.spec.js +0 -66
  301. package/dist/services/onboarding/spec/browser/console-log.spec.d.ts +0 -1
  302. package/dist/services/onboarding/spec/browser/console-log.spec.js +0 -42
  303. package/dist/services/onboarding/spec/browser/resume-restarted-workers.spec.d.ts +0 -1
  304. package/dist/services/onboarding/spec/browser/resume-restarted-workers.spec.js +0 -45
  305. package/dist/services/onboarding/spec/control/browser-session.spec.d.ts +0 -1
  306. package/dist/services/onboarding/spec/control/browser-session.spec.js +0 -753
  307. package/dist/services/onboarding/spec/control/control-server.spec.d.ts +0 -1
  308. package/dist/services/onboarding/spec/control/control-server.spec.js +0 -371
  309. package/dist/services/onboarding/spec/control/debug-session.spec.d.ts +0 -1
  310. package/dist/services/onboarding/spec/control/debug-session.spec.js +0 -751
  311. package/dist/services/onboarding/spec/control/fakes.d.ts +0 -31
  312. package/dist/services/onboarding/spec/control/fakes.js +0 -67
  313. package/dist/services/onboarding/spec/control/fouc.spec.d.ts +0 -1
  314. package/dist/services/onboarding/spec/control/fouc.spec.js +0 -167
  315. package/dist/services/onboarding/spec/control/navigate-wait.spec.d.ts +0 -1
  316. package/dist/services/onboarding/spec/control/navigate-wait.spec.js +0 -47
  317. package/dist/services/onboarding/spec/control/navwalk.spec.d.ts +0 -1
  318. package/dist/services/onboarding/spec/control/navwalk.spec.js +0 -222
  319. package/dist/services/onboarding/spec/control/preload-registry.spec.d.ts +0 -1
  320. package/dist/services/onboarding/spec/control/preload-registry.spec.js +0 -432
  321. package/dist/services/onboarding/spec/control/response-explainer.spec.d.ts +0 -1
  322. package/dist/services/onboarding/spec/control/response-explainer.spec.js +0 -324
  323. package/dist/services/onboarding/spec/control/rum.spec.d.ts +0 -1
  324. package/dist/services/onboarding/spec/control/rum.spec.js +0 -222
  325. package/dist/services/onboarding/spec/control/service-worker-tracker.spec.d.ts +0 -1
  326. package/dist/services/onboarding/spec/control/service-worker-tracker.spec.js +0 -193
  327. package/dist/services/onboarding/spec/control/viewport.spec.d.ts +0 -1
  328. package/dist/services/onboarding/spec/control/viewport.spec.js +0 -200
  329. package/dist/services/onboarding/spec/control/watch.spec.d.ts +0 -1
  330. package/dist/services/onboarding/spec/control/watch.spec.js +0 -187
  331. package/dist/services/onboarding/spec/fetch-event-handler.spec.d.ts +0 -1
  332. package/dist/services/onboarding/spec/fetch-event-handler.spec.js +0 -219
  333. package/dist/services/onboarding/spec/fetch-events/speed-kit-service-worker-js.spec.d.ts +0 -1
  334. package/dist/services/onboarding/spec/fetch-events/speed-kit-service-worker-js.spec.js +0 -41
  335. package/dist/services/onboarding/spec/request-cache/cache.spec.d.ts +0 -1
  336. package/dist/services/onboarding/spec/request-cache/cache.spec.js +0 -107
  337. package/dist/services/onboarding/spec/todo-collector.spec.d.ts +0 -1
  338. package/dist/services/onboarding/spec/todo-collector.spec.js +0 -136
  339. package/dist/services/onboarding/spec/virtual-orestes-app/virtual-orestes-app.spec.d.ts +0 -1
  340. package/dist/services/onboarding/spec/virtual-orestes-app/virtual-orestes-app.spec.js +0 -65
  341. package/dist/services/query-builder/rules/rule-match.d.ts +0 -35
  342. package/dist/services/query-builder/rules/rule-match.js +0 -70
  343. package/dist/services/query-builder/spec/rules/rule-match.spec.d.ts +0 -1
  344. package/dist/services/query-builder/spec/rules/rule-match.spec.js +0 -121
  345. package/dist/services/run-control/browser/run-browser-contexts.d.ts +0 -557
  346. package/dist/services/run-control/browser/run-browser-contexts.js +0 -91
  347. package/dist/services/run-control/browser/run-browser-service-factory.d.ts +0 -5
  348. package/dist/services/run-control/browser/run-browser-service-factory.js +0 -7
  349. package/dist/services/run-control/browser/run-browser-service.d.ts +0 -68
  350. package/dist/services/run-control/browser/run-browser-service.js +0 -206
  351. package/dist/services/run-control/cache/run-cache-contexts.d.ts +0 -349
  352. package/dist/services/run-control/cache/run-cache-contexts.js +0 -51
  353. package/dist/services/run-control/cache/run-cache-service-factory.d.ts +0 -6
  354. package/dist/services/run-control/cache/run-cache-service-factory.js +0 -12
  355. package/dist/services/run-control/cache/run-cache-service.d.ts +0 -35
  356. package/dist/services/run-control/cache/run-cache-service.js +0 -151
  357. package/dist/services/run-control/control-client.d.ts +0 -36
  358. package/dist/services/run-control/control-client.js +0 -147
  359. package/dist/services/run-control/debug/run-debug-contexts.d.ts +0 -416
  360. package/dist/services/run-control/debug/run-debug-contexts.js +0 -47
  361. package/dist/services/run-control/debug/run-debug-service-factory.d.ts +0 -5
  362. package/dist/services/run-control/debug/run-debug-service-factory.js +0 -7
  363. package/dist/services/run-control/debug/run-debug-service.d.ts +0 -39
  364. package/dist/services/run-control/debug/run-debug-service.js +0 -164
  365. package/dist/services/run-control/files/run-files-contexts.d.ts +0 -238
  366. package/dist/services/run-control/files/run-files-contexts.js +0 -26
  367. package/dist/services/run-control/files/run-files-service-factory.d.ts +0 -5
  368. package/dist/services/run-control/files/run-files-service-factory.js +0 -7
  369. package/dist/services/run-control/files/run-files-service.d.ts +0 -29
  370. package/dist/services/run-control/files/run-files-service.js +0 -120
  371. package/dist/services/run-control/index.d.ts +0 -32
  372. package/dist/services/run-control/index.js +0 -31
  373. package/dist/services/run-control/inject/run-inject-contexts.d.ts +0 -319
  374. package/dist/services/run-control/inject/run-inject-contexts.js +0 -38
  375. package/dist/services/run-control/inject/run-inject-service-factory.d.ts +0 -5
  376. package/dist/services/run-control/inject/run-inject-service-factory.js +0 -7
  377. package/dist/services/run-control/inject/run-inject-service.d.ts +0 -31
  378. package/dist/services/run-control/inject/run-inject-service.js +0 -227
  379. package/dist/services/run-control/live-run.d.ts +0 -37
  380. package/dist/services/run-control/live-run.js +0 -56
  381. package/dist/services/run-control/probe/run-probe-contexts.d.ts +0 -333
  382. package/dist/services/run-control/probe/run-probe-contexts.js +0 -73
  383. package/dist/services/run-control/probe/run-probe-service-factory.d.ts +0 -5
  384. package/dist/services/run-control/probe/run-probe-service-factory.js +0 -7
  385. package/dist/services/run-control/probe/run-probe-service.d.ts +0 -54
  386. package/dist/services/run-control/probe/run-probe-service.js +0 -194
  387. package/dist/services/run-control/rum/run-rum-contexts.d.ts +0 -216
  388. package/dist/services/run-control/rum/run-rum-contexts.js +0 -34
  389. package/dist/services/run-control/rum/run-rum-service-factory.d.ts +0 -5
  390. package/dist/services/run-control/rum/run-rum-service-factory.js +0 -7
  391. package/dist/services/run-control/rum/run-rum-service.d.ts +0 -36
  392. package/dist/services/run-control/rum/run-rum-service.js +0 -122
  393. package/dist/services/run-control/run-answer.d.ts +0 -28
  394. package/dist/services/run-control/run-answer.js +0 -58
  395. package/dist/services/run-control/run-control-context.d.ts +0 -102
  396. package/dist/services/run-control/run-control-context.js +0 -36
  397. package/dist/services/run-control/run-control-flags.d.ts +0 -12
  398. package/dist/services/run-control/run-control-flags.js +0 -22
  399. package/dist/services/run-control/run-control-model.d.ts +0 -9
  400. package/dist/services/run-control/run-control-model.js +0 -1
  401. package/dist/services/run-control/run-control-service-factory.d.ts +0 -14
  402. package/dist/services/run-control/run-control-service-factory.js +0 -26
  403. package/dist/services/run-control/session/run-session-contexts.d.ts +0 -25
  404. package/dist/services/run-control/session/run-session-contexts.js +0 -20
  405. package/dist/services/run-control/session/run-session-service-factory.d.ts +0 -8
  406. package/dist/services/run-control/session/run-session-service-factory.js +0 -18
  407. package/dist/services/run-control/session/run-session-service.d.ts +0 -32
  408. package/dist/services/run-control/session/run-session-service.js +0 -151
  409. package/dist/services/run-control/spec/browser/run-browser-service.spec.d.ts +0 -1
  410. package/dist/services/run-control/spec/browser/run-browser-service.spec.js +0 -328
  411. package/dist/services/run-control/spec/cache/run-cache-service.spec.d.ts +0 -1
  412. package/dist/services/run-control/spec/cache/run-cache-service.spec.js +0 -454
  413. package/dist/services/run-control/spec/debug/run-debug-service.spec.d.ts +0 -1
  414. package/dist/services/run-control/spec/debug/run-debug-service.spec.js +0 -113
  415. package/dist/services/run-control/spec/files/run-files-service.spec.d.ts +0 -1
  416. package/dist/services/run-control/spec/files/run-files-service.spec.js +0 -234
  417. package/dist/services/run-control/spec/inject/run-inject-service.spec.d.ts +0 -1
  418. package/dist/services/run-control/spec/inject/run-inject-service.spec.js +0 -251
  419. package/dist/services/run-control/spec/live-run-fixture.d.ts +0 -32
  420. package/dist/services/run-control/spec/live-run-fixture.js +0 -109
  421. package/dist/services/run-control/spec/probe/run-probe-service.spec.d.ts +0 -1
  422. package/dist/services/run-control/spec/probe/run-probe-service.spec.js +0 -108
  423. package/dist/services/run-control/spec/rum/run-rum-service.spec.d.ts +0 -1
  424. package/dist/services/run-control/spec/rum/run-rum-service.spec.js +0 -47
  425. package/dist/services/run-control/spec/run-answer.spec.d.ts +0 -1
  426. package/dist/services/run-control/spec/run-answer.spec.js +0 -57
  427. package/dist/services/run-control/spec/session/run-session-service.spec.d.ts +0 -1
  428. package/dist/services/run-control/spec/session/run-session-service.spec.js +0 -150
  429. package/dist/services/run-log/crash-mirror.d.ts +0 -31
  430. package/dist/services/run-log/crash-mirror.js +0 -69
  431. package/dist/services/run-log/index.d.ts +0 -11
  432. package/dist/services/run-log/index.js +0 -11
  433. package/dist/services/run-log/jsonl-appender.d.ts +0 -46
  434. package/dist/services/run-log/jsonl-appender.js +0 -91
  435. package/dist/services/run-log/log-event-model.d.ts +0 -104
  436. package/dist/services/run-log/log-event-model.js +0 -56
  437. package/dist/services/run-log/log-query-service-factory.d.ts +0 -11
  438. package/dist/services/run-log/log-query-service-factory.js +0 -14
  439. package/dist/services/run-log/log-query-service.d.ts +0 -59
  440. package/dist/services/run-log/log-query-service.js +0 -111
  441. package/dist/services/run-log/log-reader.d.ts +0 -84
  442. package/dist/services/run-log/log-reader.js +0 -180
  443. package/dist/services/run-log/log-summary.d.ts +0 -72
  444. package/dist/services/run-log/log-summary.js +0 -208
  445. package/dist/services/run-log/redaction.d.ts +0 -34
  446. package/dist/services/run-log/redaction.js +0 -124
  447. package/dist/services/run-log/request-log.d.ts +0 -82
  448. package/dist/services/run-log/request-log.js +0 -69
  449. package/dist/services/run-log/request-summary.d.ts +0 -76
  450. package/dist/services/run-log/request-summary.js +0 -0
  451. package/dist/services/run-log/run-log.d.ts +0 -61
  452. package/dist/services/run-log/run-log.js +0 -102
  453. package/dist/services/run-log/spec/log-query-service.spec.d.ts +0 -1
  454. package/dist/services/run-log/spec/log-query-service.spec.js +0 -197
  455. package/dist/services/run-log/spec/log-reader.spec.d.ts +0 -1
  456. package/dist/services/run-log/spec/log-reader.spec.js +0 -109
  457. package/dist/services/run-log/spec/log-summary.spec.d.ts +0 -1
  458. package/dist/services/run-log/spec/log-summary.spec.js +0 -153
  459. package/dist/services/run-log/spec/redaction.spec.d.ts +0 -1
  460. package/dist/services/run-log/spec/redaction.spec.js +0 -61
  461. package/dist/services/run-log/spec/request-log.spec.d.ts +0 -1
  462. package/dist/services/run-log/spec/request-log.spec.js +0 -101
  463. package/dist/services/run-log/spec/request-summary.spec.d.ts +0 -1
  464. package/dist/services/run-log/spec/request-summary.spec.js +0 -171
  465. package/dist/services/run-log/spec/run-log.spec.d.ts +0 -1
  466. package/dist/services/run-log/spec/run-log.spec.js +0 -122
  467. package/dist/services/run-registry/exit-classification.d.ts +0 -39
  468. package/dist/services/run-registry/exit-classification.js +0 -42
  469. package/dist/services/run-registry/index.d.ts +0 -3
  470. package/dist/services/run-registry/index.js +0 -3
  471. package/dist/services/run-registry/process-identity.d.ts +0 -28
  472. package/dist/services/run-registry/process-identity.js +0 -80
  473. package/dist/services/run-registry/run-registry-model.d.ts +0 -128
  474. package/dist/services/run-registry/run-registry-model.js +0 -16
  475. package/dist/services/run-registry/run-registry.d.ts +0 -155
  476. package/dist/services/run-registry/run-registry.js +0 -430
  477. package/dist/services/run-registry/spec/exit-classification.spec.d.ts +0 -1
  478. package/dist/services/run-registry/spec/exit-classification.spec.js +0 -82
  479. package/dist/services/run-registry/spec/run-registry.spec.d.ts +0 -1
  480. package/dist/services/run-registry/spec/run-registry.spec.js +0 -526
  481. /package/dist/{commands/spec/onboarding.spec.d.ts → services/bundler/spec/packjockel-service.spec.d.ts} +0 -0
  482. /package/dist/services/{cli/spec/build-identity.spec.d.ts → deploy/spec/handler/customer-config-handler.spec.d.ts} +0 -0
  483. /package/dist/services/{cli/spec/build-info.spec.d.ts → document-handler-runtime/spec/document-handler-browser-mock.spec.d.ts} +0 -0
  484. /package/dist/services/{cli/spec/cli-service-log.spec.d.ts → integration-api/spec/customer-config-file.spec.d.ts} +0 -0
  485. /package/dist/services/{diff/spec/config-at-ref.spec.d.ts → onboarding/fetch-events/spec/speed-kit-install-js.spec.d.ts} +0 -0
  486. /package/dist/services/{diff/spec/run-runtime-config.spec.d.ts → onboarding/spec/file-events/file-watcher.spec.d.ts} +0 -0
@@ -1,1430 +0,0 @@
1
- import type { NavigateWaitData, NavigateWaitPoint } from "./navigate-wait.js";
2
- /**
3
- * The seam between a live `sk onboarding` run and anything outside it.
4
- *
5
- * Both sides import this file. Same package, same build — so "keep these in
6
- * lockstep" is a compiler guarantee rather than a comment, which is the one
7
- * thing an IPC layer has to get right and the thing hand-kept copies never do.
8
- *
9
- * Deliberately small: newline-delimited JSON, one request and one answer per
10
- * line, an id to match them. The clients are short-lived `sk onboarding <tool>`
11
- * commands, and anything richer would be machinery they never use.
12
- */
13
- import type { OriginRequestConfig } from "../../origin-request/index.js";
14
- /** Bumped whenever a change would make an older peer misread a message. */
15
- export declare const CONTROL_PROTOCOL_VERSION = 1;
16
- /** Filename inside the run directory. Unix socket, mode 0600. */
17
- export declare const CONTROL_SOCKET = "control.sock";
18
- export type ControlRequest = ControlRequestBody & {
19
- /**
20
- * Which tab a page op acts on: its index in `browser.tabs`, or part of its
21
- * url. Absent means the run's own page. Ops about the run rather than a page
22
- * — the cache, the files — ignore it.
23
- */
24
- tab?: string;
25
- };
26
- type ControlRequestBody = {
27
- id: string;
28
- op: "hello";
29
- version: number;
30
- } | {
31
- id: string;
32
- op: "cache.list";
33
- } | {
34
- id: string;
35
- op: "cache.prewarm";
36
- /** Absolute, or relative to the origin the run is on. */
37
- url: string;
38
- /**
39
- * Which variations to build. Empty or absent means the default alone.
40
- *
41
- * A list rather than one per call because the question is almost always
42
- * comparative — mobile against desktop — and two round trips to build two
43
- * halves of one comparison is two chances for the origin to answer
44
- * differently in between.
45
- */
46
- variations?: string[];
47
- /**
48
- * Default, every variation the page has produced in this run, and every
49
- * one the runtime config names. Wins over `variations`.
50
- */
51
- all?: boolean;
52
- } | {
53
- id: string;
54
- op: "cache.get";
55
- /** A cache key, or an origin url that identifies exactly one entry. */
56
- key: string;
57
- /** Only this variation's entries; `default` for the one without. */
58
- variation?: string;
59
- /** CSS selector to count and sample in the body. */
60
- select?: string;
61
- /** Regular expression to match against the body, line by line. */
62
- grep?: string;
63
- maxMatches?: number;
64
- } | {
65
- id: string;
66
- op: "cache.clear";
67
- } | {
68
- id: string;
69
- op: "cache.evict";
70
- /**
71
- * A cache key, or any substring of one.
72
- *
73
- * Substring, not exact — that is what `Cache.removeEntry` does and it
74
- * surprises people, so the result names every key it actually removed
75
- * rather than leaving the caller to assume it was the one they meant.
76
- */
77
- key: string;
78
- } | {
79
- id: string;
80
- op: "cache.refresh";
81
- /**
82
- * Which entries to rebuild: a cache key, or an origin url. Absent
83
- * refreshes every cached entry.
84
- */
85
- key?: string;
86
- } | {
87
- id: string;
88
- op: "cache.errors";
89
- } | {
90
- id: string;
91
- op: "rum.get";
92
- /** Only these keys, when the whole object is more than you need. */
93
- keys?: string[];
94
- /** Force a send first. Completes the picture; ends the impression. */
95
- flush?: boolean;
96
- } | {
97
- id: string;
98
- op: "rum.key";
99
- key: string;
100
- } | {
101
- id: string;
102
- op: "rum.previous";
103
- } | {
104
- id: string;
105
- op: "rum.beacons";
106
- /** Only beacons after this sequence number: the cursor to follow by. */
107
- sinceSeq?: number;
108
- /** Only beacons carrying this field, anywhere in the payload. */
109
- key?: string;
110
- } | {
111
- id: string;
112
- op: "files.list";
113
- } | {
114
- id: string;
115
- op: "files.read";
116
- /** A logical name from INTEGRATION_FILES, e.g. `custom_documentHandler`. */
117
- name: string;
118
- grep?: string;
119
- maxMatches?: number;
120
- } | {
121
- id: string;
122
- op: "files.rebuild";
123
- /**
124
- * Which group to rebuild. Absent means `all`.
125
- *
126
- * Named after the watcher's own groups because those are the real units:
127
- * a file change triggers one of them whole, and they have different blast
128
- * radii. Asking for "the documentHandler" and getting the browser's
129
- * Speed Kit caches cleared as well is not a surprise to hide — it is what
130
- * the run does on every edit to those files, and a rebuild that did less
131
- * would not be reproducing the thing being tested.
132
- */
133
- target?: RebuildTarget;
134
- } | {
135
- id: string;
136
- op: "files.validate";
137
- } | {
138
- id: string;
139
- op: "config.runtime";
140
- } | {
141
- id: string;
142
- op: "browser.state";
143
- } | {
144
- id: string;
145
- op: "browser.reset";
146
- /**
147
- * How much to clear. `cache` is the one to reach for: a logged-in session
148
- * is expensive to re-establish and a custom variation often needs one, so
149
- * a full wipe to test a cache change costs more than it proves.
150
- */
151
- scope?: BrowserResetScope;
152
- } | {
153
- id: string;
154
- op: "browser.reinstall-sw";
155
- } | {
156
- id: string;
157
- op: "browser.navigate";
158
- url: string;
159
- /** Where to return: the load event (the default), or a lifecycle mark. */
160
- wait?: NavigateWaitPoint;
161
- /** The bound on the navigation and the wait together. */
162
- waitMs?: number;
163
- } | {
164
- id: string;
165
- op: "browser.panel";
166
- } | {
167
- id: string;
168
- op: "browser.emulate";
169
- /** A device preset, or `off` to put the browser back as it was. */
170
- device: EmulatedDevice | "off";
171
- /** Overrides the preset's metrics. */
172
- width?: number;
173
- height?: number;
174
- dpr?: number;
175
- /** Overrides the preset's user agent; sent without client hints. */
176
- userAgent?: string;
177
- /** Overrides the preset's touch. */
178
- touch?: boolean;
179
- /**
180
- * Load the page again under the emulation. Default true: a document
181
- * already loaded was laid out, detected and served as the old device.
182
- */
183
- reload?: boolean;
184
- } | {
185
- id: string;
186
- op: "browser.tabs";
187
- } | {
188
- id: string;
189
- op: "browser.click";
190
- /** A CSS selector. Exclusive with `text`. */
191
- selector?: string;
192
- /** The visible text, aria-label or value of a link or button. */
193
- text?: string;
194
- } | {
195
- id: string;
196
- op: "cdp";
197
- /** A CDP method, e.g. `DOM.getDocument`. */
198
- method: string;
199
- params?: Record<string, unknown>;
200
- } | {
201
- id: string;
202
- op: "browser.screenshot";
203
- /** The whole page rather than the viewport. */
204
- fullPage?: boolean;
205
- /** Only this element. */
206
- selector?: string;
207
- } | {
208
- id: string;
209
- op: "todo.list";
210
- } | {
211
- id: string;
212
- op: "response.explain";
213
- /** Absolute, or relative to the customer origin. Defaults to the page. */
214
- url?: string;
215
- } | {
216
- id: string;
217
- op: "inject.recipes";
218
- } | {
219
- id: string;
220
- op: "inject.add";
221
- /** A name from `inject.recipes`. Mutually exclusive with `source`. */
222
- recipe?: string;
223
- /** The recipe's arguments, validated against its declared params. */
224
- params?: Record<string, unknown>;
225
- /** Raw JavaScript, run inside the envelope. Exclusive with `recipe`. */
226
- source?: string;
227
- /**
228
- * Minutes until it removes itself. Absent means the default; `0` means
229
- * never.
230
- *
231
- * A preload outlives the turn that added it, survives navigations and is
232
- * invisible to the human watching the run — so the default is an expiry
233
- * rather than forever, and a script that is still wanted can be added
234
- * again. `0` is deliberately spellable: a sampler chasing an intermittent
235
- * fault is the case where a surprise expiry destroys the evidence.
236
- */
237
- ttlMinutes?: number;
238
- } | {
239
- id: string;
240
- op: "inject.list";
241
- } | {
242
- id: string;
243
- op: "inject.read";
244
- /** The preload id, as `inject.add` and `inject.list` report it. */
245
- preload: string;
246
- /** How many records to return, newest last. Default 100. */
247
- limit?: number;
248
- } | {
249
- id: string;
250
- op: "inject.remove";
251
- preload: string;
252
- } | {
253
- id: string;
254
- op: "inject.clear";
255
- } | {
256
- id: string;
257
- op: "debug.arm";
258
- /** Which of BP1–BP4. Absent or empty arms all four. */
259
- bps?: number[];
260
- /** What to do once armed, so one call is the whole setup. */
261
- then?: DebugThen;
262
- /** BP1 and BP3 pause where change detection compares, with `window.__skCD`. */
263
- compared?: boolean;
264
- } | {
265
- id: string;
266
- op: "debug.disarm";
267
- } | {
268
- id: string;
269
- op: "debug.release";
270
- } | {
271
- id: string;
272
- op: "debug.status";
273
- } | {
274
- id: string;
275
- op: "debug.await";
276
- /** How long to wait for a pause. The op answers either way. */
277
- timeoutMs?: number;
278
- } | {
279
- id: string;
280
- op: "debug.resume";
281
- } | {
282
- id: string;
283
- op: "debug.step";
284
- kind: DebugStepKind;
285
- } | {
286
- id: string;
287
- op: "debug.eval";
288
- /**
289
- * Evaluated on the paused call frame when the page is paused, and in the
290
- * page otherwise. The distinction is the whole reason this op exists:
291
- * a paused V8 never settles the promise `page.evaluate` waits on, and
292
- * only the call-frame path can see the locals worth pausing for.
293
- */
294
- expression: string;
295
- } | {
296
- id: string;
297
- op: "watch";
298
- /** JavaScript expression, sampled in the page. */
299
- expression: string;
300
- intervalMs?: number;
301
- durationMs?: number;
302
- /** Reload first, so the timeline starts at t=0 of a fresh load. */
303
- reload?: boolean;
304
- /** Every sample rather than only the values that changed. */
305
- full?: boolean;
306
- } | {
307
- id: string;
308
- op: "navwalk";
309
- /** A built-in trigger, or absent when `click` names one. */
310
- flow?: NavwalkFlow;
311
- /** CSS selector, or text to match against links and buttons. */
312
- click?: string;
313
- /** Navigate here first, so the walk starts from a known page. */
314
- url?: string;
315
- /** How long to collect after the trigger. */
316
- waitMs?: number;
317
- } | {
318
- id: string;
319
- op: "fouc";
320
- /**
321
- * An element whose styling decides whether the paint was styled.
322
- * Absent samples the body's own background and the sheet count alone.
323
- */
324
- selector?: string;
325
- durationMs?: number;
326
- } | {
327
- id: string;
328
- op: "viewport";
329
- min?: number;
330
- max?: number;
331
- /** Width increment for the coarse sweep, before pinning to the pixel. */
332
- step?: number;
333
- /** How long to let the page react to each resize. */
334
- settleMs?: number;
335
- height?: number;
336
- /** Navigate here first, so the sweep is of a known page. */
337
- url?: string;
338
- };
339
- export type NavwalkFlow = "login" | "checkout";
340
- export interface NavwalkHit {
341
- url: string;
342
- /** The path alone, which is what a `disabledScopes` entry is written from. */
343
- path: string;
344
- /** Null when only the request was seen and no response came back. */
345
- status: number | null;
346
- /** Whether it happened in the main tab or in a popup the flow opened. */
347
- target: "main" | "popup";
348
- sameOrigin: boolean;
349
- }
350
- export interface NavwalkData {
351
- host: string;
352
- /** What the trigger matched and clicked, so a miss is readable. */
353
- clicked: string;
354
- flow: NavwalkFlow | null;
355
- waitedMs: number;
356
- /** The scope candidates. */
357
- sameOrigin: NavwalkHit[];
358
- /** Context only — a scope cannot be written for another origin. */
359
- offOrigin: NavwalkHit[];
360
- /**
361
- * Prefixes worth considering, by path depth.
362
- *
363
- * The right one is the shortest that does not also catch a page that must
364
- * stay accelerated, which is a judgement about the config rather than about
365
- * this capture — so both depths are offered rather than one being chosen.
366
- */
367
- candidateScopes: {
368
- depth1: string[];
369
- depth2: string[];
370
- };
371
- /**
372
- * Prefixes taken out of `candidateScopes` because they would also disable a
373
- * page known to be accelerated, with that page — so a dropped one can still
374
- * be weighed rather than silently missing.
375
- */
376
- droppedScopes: {
377
- scope: string;
378
- covers: string;
379
- }[];
380
- /** The page the walk started from. */
381
- startedOn: string | null;
382
- /** Where the flow left the tab, before the walk put it back. */
383
- endedOn: string | null;
384
- /** Whether the tab was put back on `startedOn`. */
385
- returned: boolean;
386
- }
387
- export interface FoucSample {
388
- t: number;
389
- /** Stylesheets the document had applied at this instant. */
390
- sheets: number;
391
- /** Whether a contentful paint had happened. */
392
- painted: boolean;
393
- /** When it happened, on the same clock as `t`; null before it has. */
394
- fcp?: number | null;
395
- /**
396
- * Stylesheets already in the document that had not loaded yet — the ones a
397
- * paint at this instant went without. Those for another `media` are left
398
- * out, since nothing waits for them. The first five.
399
- */
400
- pending?: string[];
401
- pendingCount?: number;
402
- /** The sampled element's background, or the body's when none was named. */
403
- background: string | null;
404
- /** Whether the sampled element existed yet. */
405
- present: boolean;
406
- }
407
- export interface FoucData {
408
- selector: string | null;
409
- durationMs: number;
410
- /** True when a contentful paint happened before the last sheet applied. */
411
- unstyledPaint: boolean;
412
- /** When the first contentful paint was observed, in ms from navigation. */
413
- paintedAt: number | null;
414
- /** When the stylesheet count stopped growing. */
415
- settledAt: number | null;
416
- /** Sheets at the paint, against sheets at the end. */
417
- sheetsAtPaint: number | null;
418
- sheetsFinal: number | null;
419
- /**
420
- * The stylesheets in the document at the first paint that had not loaded:
421
- * what made it unstyled. Empty on a clean load.
422
- */
423
- pendingAtPaint: string[];
424
- /**
425
- * Sheets added after the first paint — a widget inserting its own, as
426
- * LiveStory does. A paint cannot have waited for them, so they are reported
427
- * rather than counted against it.
428
- */
429
- lateSheets: number | null;
430
- /** The backgrounds seen, in order, so a flash is visible as a value change. */
431
- backgrounds: {
432
- t: number;
433
- value: string | null;
434
- }[];
435
- samples: FoucSample[];
436
- verdict: string;
437
- }
438
- export interface ViewportBreakpoint {
439
- /** The exact width at which the page's JS changed the DOM. */
440
- width: number;
441
- /** Whether crossing back down reversed it. */
442
- confirmed: boolean;
443
- /** What changed, in the observer's own terms. The first eight. */
444
- changed: string[];
445
- /** How many keys changed, of which `changed` is the start. */
446
- changedTotal: number;
447
- /** A guess at what kind of change it is, when one is recognisable. */
448
- hint: string | null;
449
- }
450
- export interface ViewportData {
451
- min: number;
452
- max: number;
453
- step: number;
454
- breakpoints: ViewportBreakpoint[];
455
- /**
456
- * Intervals that changed but were not pinned, because the sweep pins at most
457
- * twelve. Empty on any page with real breakpoints rather than churn.
458
- */
459
- unpinned: {
460
- from: number;
461
- to: number;
462
- }[];
463
- /** Mutation keys that fire on their own, learned before the sweep. Capped. */
464
- noise: string[];
465
- /**
466
- * Layout keys that changed at most coarse steps — the page following the
467
- * width, like a slider's active class. Ignored as breakpoints. Capped.
468
- */
469
- fluid: string[];
470
- /** Coarse steps where only inline style changed: fluid layout, not counted. */
471
- styleOnlySteps: number;
472
- /** How many coarse steps the sweep took, so `styleOnlySteps` reads as a share. */
473
- steps: number;
474
- /**
475
- * Whether the page renders differently when *loaded* at each end.
476
- *
477
- * Frontend that reads the width once at mount and never re-renders shows no
478
- * resize mutation at all, so the sweep cannot see it. This is the separate
479
- * signal for that case, and it is a yes/no rather than a width.
480
- */
481
- bootOnlyBranching: boolean | null;
482
- verdict: string;
483
- }
484
- /** What `debug.arm` does once the hooks are installed. */
485
- export type DebugThen = "reload" | "next-nav" | "none";
486
- export type DebugStepKind = "over" | "into" | "out";
487
- /** One of the four anchors in Speed Kit's page lifecycle. */
488
- export interface DebugBreakpointInfo {
489
- bp: number;
490
- /** The `performance.mark` the pause hangs off. */
491
- mark: string;
492
- description: string;
493
- armed: boolean;
494
- /**
495
- * Whether this document emitted the mark at all.
496
- *
497
- * The field that tells "armed and legitimately skipped" from "never
498
- * reached", which are the two readings of a silent breakpoint that call for
499
- * opposite next moves.
500
- */
501
- seen: boolean;
502
- /**
503
- * Whether this breakpoint has already paused on the document loaded now.
504
- *
505
- * The difference between a hook that is missing and one that has done its
506
- * job: both leave the mark written and nothing paused *right now*, and only
507
- * this tells them apart.
508
- */
509
- fired: boolean;
510
- /** Anchors on the SSR pass, so a document that was not pre-rendered has none. */
511
- ssrOnly: boolean;
512
- }
513
- export interface DebugPausedState {
514
- htmlClass: string | null;
515
- skGroup: string | null;
516
- marks: {
517
- name: string;
518
- t: number;
519
- }[];
520
- lastBp: string | null;
521
- }
522
- export interface DebugPause {
523
- /** `BP1`–`BP4`, or `unknown` for a pause this run did not arm. */
524
- bp: string;
525
- reason: string;
526
- /** The page's url, read off the paused frame's `location.href`. */
527
- url: string | null;
528
- /**
529
- * The script {@link location} points into. `null` for the CLI's own wrapper,
530
- * which is injected without a url — the page is in {@link url}, not here.
531
- */
532
- scriptUrl: string | null;
533
- location?: {
534
- lineNumber: number;
535
- columnNumber?: number;
536
- };
537
- state: DebugPausedState;
538
- /** Under `arm --compared`: what `window.__skCD` holds, or why it is missing. */
539
- compared?: Record<string, unknown>;
540
- at: string;
541
- }
542
- /**
543
- * Where the page's JavaScript thread is.
544
- *
545
- * - `running` — it answers, and its microtasks run.
546
- * - `paused` — it answers a plain evaluation but never settles a promise: the
547
- * inspector serves CDP from a nested loop while V8 is stopped, and the
548
- * microtask queue is frozen.
549
- * - `unresponsive` — it answers nothing: busy, hung, or mid-navigation.
550
- */
551
- export type PageThreadState = "running" | "paused" | "unresponsive";
552
- export interface DebugStatusData {
553
- /** Whether `Debugger.enable` is held on the page right now. */
554
- attached: boolean;
555
- armed: number[];
556
- /** Null when not {@link attached}: a pause is only seen by a session that holds the debugger. */
557
- paused: boolean | null;
558
- /** The pause the page is stopped in now — null once it resumed. */
559
- pause: DebugPause | null;
560
- /**
561
- * Where the page's thread is, measured rather than remembered — it sees a
562
- * pause this run did not cause and cannot hear about. Null without a page.
563
- */
564
- thread: PageThreadState | null;
565
- /**
566
- * Who holds the pause when there is one. `elsewhere` is DevTools: a switch
567
- * lit in the devtools panel, or a breakpoint in the Sources panel.
568
- */
569
- pausedBy: "this-run" | "elsewhere" | null;
570
- /**
571
- * The devtools panel's breakpoint switches set in the page's sessionStorage,
572
- * by storage key. The extension arms from these whoever wrote them, so a
573
- * switch listed here pauses the next load with DevTools open even when
574
- * {@link armed} is empty. Null when the page could not be read.
575
- */
576
- pageArmed: string[] | null;
577
- breakpoints: DebugBreakpointInfo[];
578
- /**
579
- * Whether the document loaded now came from the SSR pass.
580
- *
581
- * Null when it could not be read. A heuristic, from the pre-rendered class
582
- * and the shadow root — but the one that decides whether BP3 and BP4 had any
583
- * chance of firing, which is otherwise indistinguishable from a broken arm.
584
- */
585
- prerendered: boolean | null;
586
- /**
587
- * How the document loaded: `navigate`, `reload`, `back_forward`, `prerender`.
588
- * A reload matters here — Speed Kit's worker does not serve one the way it
589
- * serves a navigation. Null when it could not be read.
590
- */
591
- navigationType: string | null;
592
- /**
593
- * Why the SSR comparison did not run, when the page said so.
594
- *
595
- * BP3 hangs off a mark Speed Kit writes only around a comparison that
596
- * happened, so a skipped comparison leaves BP3 armed and silent. Without
597
- * this, that silence reads as a broken hook.
598
- */
599
- changeDetectionSkipped: string | null;
600
- }
601
- export interface DebugAwaitData extends DebugStatusData {
602
- /** Never null here: an answer to "did it pause" says yes or no. */
603
- paused: boolean;
604
- fired: boolean;
605
- timedOut: boolean;
606
- waitedMs: number;
607
- /** What the silence most likely means, when nothing fired. */
608
- diagnosis?: string;
609
- }
610
- export interface DebugActionData {
611
- paused: boolean;
612
- did: string;
613
- }
614
- export interface DebugReleaseData {
615
- /** What this run had armed and disarmed on the way. */
616
- disarmed: number[];
617
- /** The panel switches cleared from the page's sessionStorage, by storage key. */
618
- cleared: string[];
619
- /** Whether a pause held elsewhere was resumed. */
620
- resumedForeignPause: boolean;
621
- /** Where the thread is after the release — `paused` means it stopped again. */
622
- thread: PageThreadState | null;
623
- did: string;
624
- }
625
- export interface DebugEvalData {
626
- /**
627
- * Whether it ran on the paused call frame.
628
- *
629
- * False means the page was not paused and it ran as an ordinary evaluation,
630
- * which sees globals but none of the locals a pause exists to inspect.
631
- */
632
- onCallFrame: boolean;
633
- value: unknown;
634
- /** The exception text, verbatim. Never swallowed, never reworded. */
635
- exception?: string;
636
- }
637
- export interface WatchSample {
638
- t: number;
639
- v?: unknown;
640
- /** The expression threw on this tick. */
641
- error?: string;
642
- }
643
- export interface WatchMessage {
644
- t: number;
645
- level: string;
646
- text: string;
647
- }
648
- export interface WatchData {
649
- expression: string;
650
- intervalMs: number;
651
- durationMs: number;
652
- reloaded: boolean;
653
- /** Collapsed to the ticks where the value changed, unless `full`. */
654
- mode: "transitions" | "full";
655
- samples: WatchSample[];
656
- /** Every tick taken, before collapsing. */
657
- totalSamples: number;
658
- /** Ticks the page buffer refused, so a gap in the timeline is visible. */
659
- dropped: number;
660
- console: WatchMessage[];
661
- exceptions: WatchMessage[];
662
- truncated: boolean;
663
- /** What changed the request, stated only when something did. */
664
- notes: string[];
665
- }
666
- /** One argument a recipe takes. */
667
- export interface InjectRecipeParam {
668
- name: string;
669
- required: boolean;
670
- description: string;
671
- /** Rendered as a literal, so the default is what the source will carry. */
672
- default?: string | number;
673
- /**
674
- * Whether the value is inlined as JavaScript rather than as a literal.
675
- *
676
- * True for exactly one param today — `sample`'s expression — and it is the
677
- * one place a recipe is as sharp as raw source. Named on the wire so a caller
678
- * knows which of its arguments it is about to have evaluated in the page.
679
- */
680
- code?: boolean;
681
- }
682
- export interface InjectRecipeInfo {
683
- name: string;
684
- summary: string;
685
- params: InjectRecipeParam[];
686
- /** What it puts in the buffer `inject.read` drains. */
687
- observes: string;
688
- /**
689
- * Whether it only bites from the next navigation.
690
- *
691
- * Every preload runs before the page's own scripts, which is the whole point
692
- * — so anything that wraps a seam the page has already passed needs a reload
693
- * to mean anything, and a caller that reads an empty buffer without knowing
694
- * that will conclude the seam is never reached.
695
- */
696
- needsReload: boolean;
697
- }
698
- export interface InjectRecipesData {
699
- recipes: InjectRecipeInfo[];
700
- }
701
- export interface InjectEntry {
702
- /** `p1`, `p2` …: what `read` and `remove` take. */
703
- id: string;
704
- /** The recipe's name, or `raw`. */
705
- origin: string;
706
- addedAt: string;
707
- /** Null when it was added with `ttlMinutes: 0`. */
708
- expiresAt: string | null;
709
- /** Content hash of the wrapped source, so two adds of one script match. */
710
- sourceSha: string;
711
- bytes: number;
712
- needsReload: boolean;
713
- /**
714
- * Whether it has actually run in the document that is loaded now.
715
- *
716
- * False on a preload added since the last navigation — it is registered and
717
- * will run next time. Read off the page rather than assumed, because
718
- * "registered" and "running" are different states and only one of them
719
- * produces records.
720
- */
721
- active: boolean;
722
- /** Records buffered in the current document; null when nothing has run it. */
723
- buffered: number | null;
724
- /** Set when the script threw while installing itself. */
725
- error?: string;
726
- /**
727
- * Whether another tool owns this one.
728
- *
729
- * `sk onboarding debug` installs its pause hooks the same way an injected script is
730
- * installed, so listing them here is what keeps "what is running in this
731
- * page" a complete answer. They do not count against the limit and `clear`
732
- * leaves them alone — disarming a debugger as a side effect of tidying up
733
- * preloads is not something anyone would ask for.
734
- */
735
- reserved?: boolean;
736
- }
737
- export interface InjectListData {
738
- preloads: InjectEntry[];
739
- /** Removed by their TTL since the last call, so an absence is explained. */
740
- expired: string[];
741
- /** How many may be registered at once. */
742
- limit: number;
743
- }
744
- export interface InjectAddData {
745
- preload: InjectEntry;
746
- /** The recipe that produced it, absent for raw source. */
747
- recipe?: string;
748
- expired: string[];
749
- }
750
- /** One RUM beacon as it left the page, before Speed Kit merged it. */
751
- export interface RumBeacon {
752
- seq: number;
753
- /** ISO, when the run intercepted it. */
754
- at: string;
755
- /** The beacon request's url. */
756
- url: string;
757
- bytes: number;
758
- /** The payload, parsed; null when it was not JSON. */
759
- data: Record<string, unknown> | null;
760
- }
761
- export interface RumBeaconsData {
762
- beacons: (RumBeacon & {
763
- /** With `key`: where in this beacon it was, and what it said. */
764
- matches?: {
765
- path: string;
766
- value: unknown;
767
- }[];
768
- })[];
769
- /** The newest beacon's sequence number: pass it back as `sinceSeq`. */
770
- lastSeq: number;
771
- /** How many the run keeps; older ones are gone. */
772
- kept: number;
773
- }
774
- /** One thing a preload recorded. */
775
- export interface InjectRecord {
776
- /** ms on the page's clock. */
777
- t: number;
778
- v: unknown;
779
- /**
780
- * The page load it came from: the document's time origin, with `.n` for the
781
- * n-th single-page-app navigation or back/forward restore within it.
782
- */
783
- load?: string;
784
- /** The page's url when it was recorded. */
785
- url?: string;
786
- }
787
- export interface InjectReadData {
788
- preload: string;
789
- origin: string;
790
- /** Null when this document has never run the script — see `active`. */
791
- records: InjectRecord[] | null;
792
- active: boolean;
793
- total: number;
794
- truncated: boolean;
795
- /**
796
- * Records the page buffer refused because it was full.
797
- *
798
- * The buffer is bounded in the page, so a sampler left running does not grow
799
- * a tab until it dies. A non-zero count means the timeline has a hole in it
800
- * rather than merely being long.
801
- */
802
- dropped: number;
803
- /** Set when the script threw while installing itself. */
804
- error?: string;
805
- }
806
- export interface InjectRemoveData {
807
- removed: string[];
808
- remaining: number;
809
- /**
810
- * Whether the document that is loaded now was also told to stop.
811
- *
812
- * Unregistering stops the *next* navigation; the copy already running in this
813
- * document is switched off through the page. With no page there is nothing
814
- * running, so false here is not a failure — but on a live page it would mean
815
- * a spy that keeps recording after it was removed.
816
- */
817
- stoppedInPage: boolean;
818
- }
819
- /** `cache` clears the caches; `all` also takes cookies and every other store. */
820
- export type BrowserResetScope = "cache" | "all";
821
- /**
822
- * Which of the run's rebuild groups to trigger.
823
- *
824
- * `install` is what a change to `config_SpeedKit`, `config_loadHandler`,
825
- * `custom_loader` or `custom_sw` does; `documentHandler` is what a change to
826
- * `config_dynamicBlocks`, `config_documentHandler`, `custom_dynamicFetcher` or
827
- * `custom_documentHandler` does. `all` does both, install last, which is the
828
- * order a run would reach them in.
829
- */
830
- export type RebuildTarget = "install" | "documentHandler" | "all";
831
- export type ControlOp = ControlRequest["op"];
832
- /**
833
- * A request without its correlation id, for a caller that lets the client
834
- * allocate one. Distributive on purpose: a plain `Omit<ControlRequest, "id">`
835
- * collapses the union to the fields every member shares, which drops `version`
836
- * off `hello`.
837
- */
838
- export type ControlCommand = ControlRequest extends infer R ? R extends {
839
- id: string;
840
- } ? Omit<R, "id"> : never : never;
841
- export interface ControlError {
842
- code: string;
843
- message: string;
844
- /** Whatever the caller needs to act — the versions that exist, the op to use. */
845
- [key: string]: unknown;
846
- }
847
- /**
848
- * `status` rather than an `ok` boolean, and not by taste: this repo compiles
849
- * with `strict: false`, and without `strictNullChecks` TypeScript does not use
850
- * boolean literals as discriminants — `if (response.ok)` leaves the union
851
- * un-narrowed and every field access after it fails to compile. A string
852
- * discriminant narrows regardless, and reads better on the wire besides.
853
- */
854
- export type ControlResponse<T = unknown> = {
855
- id: string;
856
- status: "ok";
857
- generation: number;
858
- data: T;
859
- } | {
860
- id: string;
861
- status: "error";
862
- generation: number;
863
- error: ControlError;
864
- };
865
- /**
866
- * A counter the run bumps on every mutating op.
867
- *
868
- * Carried on every response, including errors, so a reader can tell that a
869
- * measurement it took earlier predates its own `rebuild` — which is otherwise a
870
- * silent source of confident wrong conclusions.
871
- */
872
- export type Generation = number;
873
- /**
874
- * The runtime config the run loaded, for `sk diff` to follow the run.
875
- * It holds basic-auth passwords, so it travels over this socket only.
876
- */
877
- export interface RuntimeConfigData {
878
- /** Null when the run could not load one and uses the built-in defaults. */
879
- config: OriginRequestConfig | null;
880
- }
881
- export interface HelloData {
882
- /** Cross-checked against meta.json: a socket that answers is not proof. */
883
- pid: number;
884
- runId: string;
885
- version: number;
886
- }
887
- export interface CacheEntry {
888
- /** The raw cache key, for ops that take one. */
889
- key: string;
890
- originUrl: string;
891
- variation: string | null;
892
- status: number;
893
- contentType: string | null;
894
- bytes: number;
895
- }
896
- export interface CacheListData {
897
- entries: CacheEntry[];
898
- }
899
- export interface SelectResult {
900
- selector: string;
901
- count: number;
902
- /** Up to `maxMatches` of them, each clamped. */
903
- matches: string[];
904
- truncated: boolean;
905
- /** Set when the selector itself was not valid. */
906
- error?: string;
907
- }
908
- export interface GrepResult {
909
- pattern: string;
910
- count: number;
911
- matches: {
912
- line: number;
913
- text: string;
914
- }[];
915
- truncated: boolean;
916
- error?: string;
917
- }
918
- export interface CacheGetData extends CacheEntry {
919
- /**
920
- * Where the body was written, inside the run directory.
921
- *
922
- * The body is **never** sent back inline. Cached HTML runs to megabytes, and
923
- * one unguarded read would cost more context than every other answer in a
924
- * session put together. A path can be opened by whoever actually needs the
925
- * bytes; `select` and `grep` answer the question without anyone needing them.
926
- */
927
- bodyPath: string;
928
- /** Content hash, so two reads of the same body are recognisably the same. */
929
- bodySha: string;
930
- select?: SelectResult;
931
- grep?: GrepResult;
932
- }
933
- export interface CachePrewarmEntry extends CacheEntry {
934
- bodyPath: string;
935
- bodySha: string;
936
- /** True when this call fetched the origin and built it. */
937
- built: boolean;
938
- /**
939
- * True when it was cached before this call, by an earlier request, prewarm
940
- * or config-change rebuild, and this call left it alone. Not a failure.
941
- */
942
- alreadyCached: boolean;
943
- }
944
- /** A variation that could not be built, and why. Never fails the whole call. */
945
- export interface CachePrewarmFailure {
946
- variation: string;
947
- error: string;
948
- }
949
- export interface CachePrewarmData {
950
- /** The url as resolved, so a relative one says what it became. */
951
- url: string;
952
- entries: CachePrewarmEntry[];
953
- failed: CachePrewarmFailure[];
954
- }
955
- export interface CacheClearData {
956
- /** How many entries went. Zero is a real and common answer. */
957
- cleared: number;
958
- }
959
- export interface CacheEvictData {
960
- /** What was asked for, so the substring match is readable against it. */
961
- key: string;
962
- /** Every key that actually went — see the substring note on the request. */
963
- removed: string[];
964
- /** What is left, so "did that take more than I meant" is answerable. */
965
- remaining: number;
966
- }
967
- export interface CacheRefreshEntry {
968
- key: string;
969
- originUrl: string;
970
- variation: string | null;
971
- bodySha: string;
972
- bodyPath: string;
973
- /**
974
- * Whether the origin answered with something different this time.
975
- *
976
- * The question this op exists for. It is a comparison of the content hash
977
- * before and after, so it is an answer about the bytes rather than about
978
- * headers or timing.
979
- */
980
- changed: boolean;
981
- /** The hash it replaced, present only when it changed. */
982
- previousSha?: string;
983
- bytes: number;
984
- status: number;
985
- }
986
- export interface CacheRefreshData {
987
- entries: CacheRefreshEntry[];
988
- /** Entries whose rebuild threw, named rather than silently dropped. */
989
- failed: CachePrewarmFailure[];
990
- /** How many of `entries` came back with different bytes. */
991
- changed: number;
992
- }
993
- /**
994
- * A url and variation the local documentHandler could not build.
995
- *
996
- * Already collected by the run and already shipped to the devtools panel; this
997
- * is the same list, for a reader that has no panel. An entry disappears when
998
- * the same url and variation later builds, so the list is the state now, not a
999
- * history.
1000
- */
1001
- export interface LocalCacheErrorEntry {
1002
- url: string;
1003
- assetUrl: string;
1004
- variation: string;
1005
- error: string;
1006
- stack: string | null;
1007
- /** ISO, converted from the epoch milliseconds the run stores. */
1008
- occurredAt: string;
1009
- }
1010
- export interface CacheErrorsData {
1011
- errors: LocalCacheErrorEntry[];
1012
- }
1013
- export interface FileEntry {
1014
- /** The logical name, which is how every other op refers to it. */
1015
- name: string;
1016
- /** FILE_TYPE — config, install, module, server, virtual, readonly, customer. */
1017
- type: string;
1018
- /** Absent for a virtual file, which has none. */
1019
- path?: string;
1020
- /**
1021
- * A virtual file exists only in memory until something builds it — and the
1022
- * onboarding watcher skips it, so "I edited it and nothing happened" has a
1023
- * legitimate cause worth seeing here.
1024
- */
1025
- virtual: boolean;
1026
- bytes: number;
1027
- /** Whether the run has written changes to it since it was loaded. */
1028
- updated?: boolean;
1029
- }
1030
- export interface FileListData {
1031
- files: FileEntry[];
1032
- }
1033
- /** One rebuild group's effects, in the words the run itself uses for them. */
1034
- export interface RebuildStep {
1035
- target: Exclude<RebuildTarget, "all">;
1036
- /**
1037
- * What was rebuilt and what that invalidated.
1038
- *
1039
- * Spelled out because the blast radius is the part a caller cannot infer and
1040
- * the part that decides whether their previous measurements still stand. A
1041
- * rebuild that silently cleared the dh-cache turns the next comparison into
1042
- * one against a cold cache without anyone noticing.
1043
- */
1044
- did: string[];
1045
- /** Set when the group could not run — no page, nothing to build. */
1046
- skipped?: string;
1047
- }
1048
- export interface FileRebuildData {
1049
- target: RebuildTarget;
1050
- steps: RebuildStep[];
1051
- /**
1052
- * Whether the dh-cache was emptied as part of this.
1053
- *
1054
- * The single fact most likely to invalidate a measurement taken before the
1055
- * call, so it is lifted out of the prose rather than left to be read out of
1056
- * it.
1057
- */
1058
- cacheCleared: boolean;
1059
- /** Whether the service worker will be reinstalled on the next navigation. */
1060
- reinstallsServiceWorker: boolean;
1061
- }
1062
- export interface ValidationProblem {
1063
- validator: "customerConfig" | "mandatoryFiles";
1064
- message: string;
1065
- /** The error's own code, where it carries one. */
1066
- code?: string;
1067
- /** What the error itself proposes doing about it. */
1068
- suggestions?: string[];
1069
- }
1070
- export interface FileValidateData {
1071
- valid: boolean;
1072
- problems: ValidationProblem[];
1073
- /**
1074
- * Both validators stop at their first problem.
1075
- *
1076
- * So a clean pass is a genuine all-clear, while a failure is "at least this"
1077
- * — fixing the named problem and asking again may well produce another. Said
1078
- * on the wire because the asymmetry is invisible otherwise, and a caller that
1079
- * reads one problem as the whole list will report a config as one fix away
1080
- * when it is not.
1081
- */
1082
- firstProblemPerValidator: true;
1083
- }
1084
- export interface FileReadData extends FileEntry {
1085
- /** Written to the run directory, never returned inline. See CacheGetData. */
1086
- bodyPath: string;
1087
- bodySha: string;
1088
- grep?: GrepResult;
1089
- }
1090
- /**
1091
- * Which of Speed Kit's globals the page actually had, as the presence probe
1092
- * measured them.
1093
- *
1094
- * Reported rather than collapsed into a sentence. The probe reads five things
1095
- * and the reason string can only ever describe one of them, so a caller that
1096
- * wants to tell "not there at all" from "there but half-built" reads this.
1097
- */
1098
- export interface RumGlobals {
1099
- /** `window.SpeedKit` exists. */
1100
- present: boolean;
1101
- /** `SpeedKit.getTrackedData` is callable — what a whole-object read needs. */
1102
- trackedData: boolean;
1103
- rumController: boolean;
1104
- /** `rumController.currentRumImpression` exists. */
1105
- impression: boolean;
1106
- /** `currentRumImpression.getDataByKey` is callable. */
1107
- dataByKey: boolean;
1108
- }
1109
- export interface RumData {
1110
- /** False when Speed Kit's globals are not on the page — with a reason. */
1111
- available: boolean;
1112
- reason?: string;
1113
- /**
1114
- * What the presence probe saw, on an unavailable answer.
1115
- *
1116
- * The reason names the likeliest cause; this is the measurement it was
1117
- * derived from, so a caller never has to take the prose on trust.
1118
- */
1119
- globals?: RumGlobals;
1120
- /**
1121
- * Whether a send was forced before reading.
1122
- *
1123
- * Always reported, because `getTrackedData` returns sent data only. Without
1124
- * this a caller cannot tell "nothing was tracked" from "it has not been sent
1125
- * yet", and those look identical while meaning opposite things.
1126
- */
1127
- flushed: boolean;
1128
- url: string | null;
1129
- data?: Record<string, unknown> | null;
1130
- keys?: string[];
1131
- /**
1132
- * Requested keys that the tracked object does not carry.
1133
- *
1134
- * Present only when `keys` was given and something in it was missing. Those
1135
- * keys are still in `data`, set to null — this names them so a caller does
1136
- * not have to diff its own request against the answer to find out.
1137
- */
1138
- notTracked?: string[];
1139
- /** Set for a single-key read. */
1140
- key?: string;
1141
- value?: unknown;
1142
- /** Single-key reads see unsent data; whole-object reads do not. */
1143
- mergesUnsent?: boolean;
1144
- /**
1145
- * Set when the previous impression was asked for.
1146
- *
1147
- * Named for the question, not the answer: whether one *exists* is `data`
1148
- * being non-null. `previous: true` with `data: null` reads like a
1149
- * contradiction otherwise.
1150
- */
1151
- ofPreviousImpression?: boolean;
1152
- }
1153
- export interface ServiceWorkerRegistrationInfo {
1154
- registrationId: string;
1155
- scopeURL: string;
1156
- /** Kept after deletion: "there was one and it is gone" is a real answer. */
1157
- deleted: boolean;
1158
- }
1159
- export interface ServiceWorkerVersionInfo {
1160
- versionId: string;
1161
- registrationId: string;
1162
- scriptURL: string;
1163
- /** installing, installed, activating, activated, redundant. */
1164
- status: string;
1165
- runningStatus: string;
1166
- /** The CDP target of the running worker; absent while it is stopped. */
1167
- targetId?: string;
1168
- /** Set when the run decided this version was the deployed one taking over. */
1169
- foreign?: boolean;
1170
- }
1171
- export interface ServiceWorkerState {
1172
- registrations: ServiceWorkerRegistrationInfo[];
1173
- versions: ServiceWorkerVersionInfo[];
1174
- /** The activated one, when there is one. */
1175
- activeVersionId?: string;
1176
- /**
1177
- * Whether the active worker is the deployed build rather than the local one.
1178
- *
1179
- * The catastrophic-but-silent case. With static routing the routes are frozen
1180
- * at install time from the *deployed* config, so a page only enabled locally
1181
- * bypasses the worker entirely and every navigation reports `SwBooting`.
1182
- * False means no takeover was *seen* — a reader that attached late would not
1183
- * know about one before it.
1184
- */
1185
- foreign: boolean;
1186
- takeovers: number;
1187
- lastTakeoverAt?: string;
1188
- }
1189
- export interface BrowserStateData {
1190
- url: string | null;
1191
- serviceWorkers: ServiceWorkerState;
1192
- /** The device emulation in force, or null when the browser is itself. */
1193
- emulation?: EmulationState | null;
1194
- }
1195
- /** The devices `browser.emulate` presents — one per Speed Kit device variation. */
1196
- export type EmulatedDevice = "mobile" | "tablet" | "desktop";
1197
- /** A device emulation that lasts until it is switched off. */
1198
- export interface EmulationState {
1199
- device: EmulatedDevice;
1200
- width: number;
1201
- height: number;
1202
- dpr: number;
1203
- mobile: boolean;
1204
- touch: boolean;
1205
- /** Null when the running Chrome's version could not be read. */
1206
- userAgent: string | null;
1207
- since: string;
1208
- }
1209
- /**
1210
- * What a service worker sees as its user agent, read back after the override.
1211
- *
1212
- * Speed Kit decides the device in its worker, and a page-level override never
1213
- * reaches a worker. This is the evidence that the emulation reached the place
1214
- * the decision is made, rather than an assumption that it did.
1215
- */
1216
- export interface ServiceWorkerUserAgent {
1217
- url: string;
1218
- userAgent: string | null;
1219
- /** Whether it is the emulated one. */
1220
- emulated: boolean;
1221
- /** Whether it is the worker in charge of the page: the one that decides. */
1222
- active: boolean;
1223
- }
1224
- export interface BrowserEmulateData extends BrowserActionData {
1225
- emulation: EmulationState | null;
1226
- serviceWorkers: ServiceWorkerUserAgent[];
1227
- }
1228
- export interface BrowserClickData extends BrowserActionData {
1229
- /** What was clicked, e.g. `button#add-to-cart.primary`. */
1230
- element: string | null;
1231
- /** Where, in viewport pixels. */
1232
- at: {
1233
- x: number;
1234
- y: number;
1235
- };
1236
- /** A tap under touch emulation, else a mouse press and release. */
1237
- input: "touch" | "mouse";
1238
- /** The page before the click, so a navigation it caused reads as one. */
1239
- urlBefore: string | null;
1240
- }
1241
- /** One tab of the run's browser, as `--tab` addresses it. */
1242
- export interface TabInfo {
1243
- /** What `--tab` takes. Stable while no tab opens or closes before it. */
1244
- index: number;
1245
- url: string;
1246
- title: string | null;
1247
- /** The run's own page: what every op acts on without `--tab`. */
1248
- main: boolean;
1249
- }
1250
- export interface BrowserTabsData {
1251
- tabs: TabInfo[];
1252
- }
1253
- export interface CdpData {
1254
- method: string;
1255
- /** What the browser answered, as it answered it. */
1256
- result: unknown;
1257
- /** The tab it was sent to. */
1258
- url: string | null;
1259
- }
1260
- export interface BrowserScreenshotData {
1261
- /** The PNG, in the run's artifact directory. */
1262
- path: string;
1263
- url: string | null;
1264
- width: number;
1265
- height: number;
1266
- bytes: number;
1267
- fullPage: boolean;
1268
- selector: string | null;
1269
- /** The device it was taken as, so a screenshot says what it shows. */
1270
- emulation: EmulationState | null;
1271
- }
1272
- /** Which rule set decided, named so the answer points at a line in the config. */
1273
- export type RuleSetName = "disabledScopes" | "enabledSites" | "disabledSites" | "whitelist" | "blacklist";
1274
- export interface ResponseRuleVerdict {
1275
- decision: "included" | "excluded";
1276
- /** Null when nothing excluded it. */
1277
- decidedBy: RuleSetName | null;
1278
- disabledScopes: string[];
1279
- enabledSites: string[];
1280
- disabledSites: string[];
1281
- whitelist: string[];
1282
- blacklist: string[];
1283
- /**
1284
- * Whether the set exists in the config at all. An empty `enabledSites` means
1285
- * "every page", not "no page", and the same line of output reads the
1286
- * opposite way depending on which it is.
1287
- */
1288
- enabledSitesConfigured: boolean;
1289
- whitelistConfigured: boolean;
1290
- /** Matching rules that also carry a criterion outside the url. */
1291
- uncertain: string[];
1292
- /**
1293
- * The request kind this verdict is for.
1294
- *
1295
- * Always a navigation: the question the tool answers is "why was this page
1296
- * not accelerated", and a url alone does not say whether it is fetched as a
1297
- * document, a script or an image. The runtime decides partly on that, so the
1298
- * assumption has to be stated rather than left for the reader to supply.
1299
- */
1300
- appliesAs: "navigate";
1301
- /**
1302
- * Sets the runtime consults only for a navigation, listed so a reader asking
1303
- * about a sub-resource knows which lines above do not apply to it.
1304
- */
1305
- navigationOnlySets: RuleSetName[];
1306
- }
1307
- export interface ResponseCacheFacts {
1308
- key: string;
1309
- status: number;
1310
- variation: string | null;
1311
- contentType: string | null;
1312
- bytes: number;
1313
- /** Whether the body carries the documentHandler's baked-in asset list. */
1314
- assetList: boolean;
1315
- }
1316
- export interface ResponsePageFacts {
1317
- url: string;
1318
- responseSource?: string;
1319
- responseCause?: string;
1320
- swBooted?: boolean;
1321
- }
1322
- export interface ResponseExplainData {
1323
- url: string;
1324
- /**
1325
- * Who produced the bytes: Speed Kit, the customer's origin, or Speed Kit
1326
- * itself synthesising an error or a redirect.
1327
- *
1328
- * `unknown` unless the url is the page the run is actually on — and also when
1329
- * the page reported a `responseSource` this build does not recognise. Speed
1330
- * Kit ships fifteen of them and adds to the list; an unrecognised one is a
1331
- * gap to look up, not a reason to guess `cache`.
1332
- */
1333
- servedFrom: "cache" | "origin" | "generated" | "unknown";
1334
- /**
1335
- * Set when the browser replayed the page from its back/forward cache.
1336
- *
1337
- * `servedFrom` then describes where the bytes came from on the original
1338
- * load, since that is what `responseCause` records for a bfcache hit. Nothing
1339
- * was fetched now, so no conclusion about the current config follows from it.
1340
- */
1341
- replayedFromBfCache?: boolean;
1342
- rules: ResponseRuleVerdict;
1343
- cache?: ResponseCacheFacts;
1344
- page?: ResponsePageFacts;
1345
- explanation: string;
1346
- /** Traps that apply to this answer, stated only when they do. */
1347
- notes: string[];
1348
- }
1349
- export interface TodoEntry {
1350
- todo: string;
1351
- /** The three lines beneath it, decoded — the collector stores them encoded. */
1352
- context: string;
1353
- /** Absolute path, so an editor can be pointed at it. */
1354
- file: string;
1355
- line: number;
1356
- }
1357
- export interface TodoListData {
1358
- tasks: TodoEntry[];
1359
- }
1360
- export interface BrowserActionData {
1361
- url: string | null;
1362
- /** What was done, in the words the caller can repeat back. */
1363
- did: string;
1364
- /**
1365
- * The origin the op actually acted on.
1366
- *
1367
- * Reported because it is not always the one the caller has in mind. A
1368
- * multi-origin app has the page on one origin and the run started on
1369
- * another, and every storage op is scoped to exactly one — so an answer that
1370
- * did not name it could describe clearing a cache that is still there.
1371
- */
1372
- origin?: string;
1373
- /** `browser navigate --wait <bpN>`: the point, and when it was reached or why not. */
1374
- wait?: NavigateWaitData;
1375
- }
1376
- export declare const CONTROL_ERRORS: {
1377
- /** The peer speaks a version this run does not. */
1378
- readonly versionMismatch: "PROTOCOL_VERSION_MISMATCH";
1379
- /** Something was sent before `hello`. */
1380
- readonly helloRequired: "HELLO_REQUIRED";
1381
- /** No such op — the run is older or newer than the caller thinks. */
1382
- readonly unknownOp: "UNKNOWN_OP";
1383
- /** The frame did not parse. */
1384
- readonly malformed: "MALFORMED_REQUEST";
1385
- /** The handler threw. */
1386
- readonly handlerFailed: "HANDLER_FAILED";
1387
- /** No cache entry matched the key. */
1388
- readonly noSuchEntry: "NO_SUCH_CACHE_ENTRY";
1389
- /** The key matched more than one entry. */
1390
- readonly ambiguousEntry: "AMBIGUOUS_CACHE_KEY";
1391
- /** No file with that logical name in this run. */
1392
- readonly noSuchFile: "NO_SUCH_FILE";
1393
- /** The run has no page — not started yet, or the browser has gone. */
1394
- readonly noPage: "NO_PAGE";
1395
- /** The expression threw, or the page did not answer. */
1396
- readonly evaluationFailed: "PAGE_EVALUATION_FAILED";
1397
- /** A browser op this run cannot perform — no browser, or no install page. */
1398
- readonly browserUnavailable: "BROWSER_UNAVAILABLE";
1399
- /** A navigate target that is not a url, or points off the customer origin. */
1400
- readonly badUrl: "BAD_URL";
1401
- /** The SpeedKit config could not be evaluated, so no rule verdict is possible. */
1402
- readonly configUnreadable: "CONFIG_UNREADABLE";
1403
- /** This run cannot build cache entries — not `--local`, or older than the op. */
1404
- readonly noLocalCache: "NO_LOCAL_CACHE";
1405
- /** Every requested variation failed to build. */
1406
- readonly prewarmFailed: "PREWARM_FAILED";
1407
- /** This run cannot rebuild — it was started without the watcher wiring. */
1408
- readonly noRebuild: "NO_REBUILD";
1409
- /** No preload with that id is registered on this run. */
1410
- readonly noSuchPreload: "NO_SUCH_PRELOAD";
1411
- /** `inject.add` got neither a recipe nor source, or both. */
1412
- readonly injectSourceRequired: "INJECT_SOURCE_REQUIRED";
1413
- /** No recipe by that name — the answer names the ones that exist. */
1414
- readonly unknownRecipe: "UNKNOWN_RECIPE";
1415
- /** A recipe was called without a required param, or with an unknown one. */
1416
- readonly badRecipeParams: "BAD_RECIPE_PARAMS";
1417
- /** The registry is full. The answer names what to remove. */
1418
- readonly tooManyPreloads: "TOO_MANY_PRELOADS";
1419
- /** A step or resume was asked for while the page was not paused. */
1420
- readonly notPaused: "NOT_PAUSED";
1421
- /** A debug op that needs the hooks installed, on a run that has not armed. */
1422
- readonly notArmed: "NOT_ARMED";
1423
- /** No such breakpoint number. */
1424
- readonly noSuchBreakpoint: "NO_SUCH_BREAKPOINT";
1425
- /** The trigger matched no control on the page. */
1426
- readonly noTrigger: "NO_TRIGGER";
1427
- /** A width range that cannot be swept. */
1428
- readonly badRange: "BAD_RANGE";
1429
- };
1430
- export {};