@gfdelarue/testkit 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1548) hide show
  1. package/LICENSE +68 -0
  2. package/README.md +1125 -0
  3. package/bin/testkit-windows-owner-arm64.exe +0 -0
  4. package/bin/testkit-windows-owner-x64.exe +0 -0
  5. package/bin/testkit.mjs +60 -0
  6. package/dist/app/cleanup/index.d.ts +52 -0
  7. package/dist/app/cleanup/index.js +1 -0
  8. package/dist/app/cloud/campaigns.d.ts +6 -0
  9. package/dist/app/cloud/campaigns.js +1 -0
  10. package/dist/app/cloud/control-actions.d.ts +12 -0
  11. package/dist/app/cloud/control-actions.js +2 -0
  12. package/dist/app/cloud/control-links.d.ts +5 -0
  13. package/dist/app/cloud/control-links.js +1 -0
  14. package/dist/app/cloud/control-read.d.ts +24 -0
  15. package/dist/app/cloud/control-read.js +1 -0
  16. package/dist/app/cloud/control-resources.d.ts +3 -0
  17. package/dist/app/cloud/control-resources.js +1 -0
  18. package/dist/app/cloud/control.d.ts +34 -0
  19. package/dist/app/cloud/control.js +5 -0
  20. package/dist/app/cloud/credentials.d.ts +11 -0
  21. package/dist/app/cloud/credentials.js +2 -0
  22. package/dist/app/cloud/index.d.ts +22 -0
  23. package/dist/app/cloud/index.js +2 -0
  24. package/dist/app/cloud/login.d.ts +63 -0
  25. package/dist/app/cloud/login.js +2 -0
  26. package/dist/app/cloud/migration/archive.d.ts +13 -0
  27. package/dist/app/cloud/migration/archive.js +1 -0
  28. package/dist/app/cloud/migration/commands.d.ts +8 -0
  29. package/dist/app/cloud/migration/commands.js +1 -0
  30. package/dist/app/cloud/migration/evidence.d.ts +13 -0
  31. package/dist/app/cloud/migration/evidence.js +2 -0
  32. package/dist/app/cloud/migration/files.d.ts +16 -0
  33. package/dist/app/cloud/migration/files.js +2 -0
  34. package/dist/app/cloud/migration/index.d.ts +6 -0
  35. package/dist/app/cloud/migration/index.js +1 -0
  36. package/dist/app/cloud/migration/journal.d.ts +64 -0
  37. package/dist/app/cloud/migration/journal.js +1 -0
  38. package/dist/app/cloud/migration/mapping-dispositions.d.ts +3 -0
  39. package/dist/app/cloud/migration/mapping-dispositions.js +1 -0
  40. package/dist/app/cloud/migration/mapping.d.ts +11 -0
  41. package/dist/app/cloud/migration/mapping.js +2 -0
  42. package/dist/app/cloud/migration/model.d.ts +175 -0
  43. package/dist/app/cloud/migration/model.js +1 -0
  44. package/dist/app/cloud/migration/plan.d.ts +7 -0
  45. package/dist/app/cloud/migration/plan.js +1 -0
  46. package/dist/app/cloud/migration/progress.d.ts +19 -0
  47. package/dist/app/cloud/migration/progress.js +1 -0
  48. package/dist/app/cloud/migration/reconcile.d.ts +22 -0
  49. package/dist/app/cloud/migration/reconcile.js +1 -0
  50. package/dist/app/cloud/migration/reconciliation-spool.d.ts +4 -0
  51. package/dist/app/cloud/migration/reconciliation-spool.js +1 -0
  52. package/dist/app/cloud/migration/state.d.ts +15 -0
  53. package/dist/app/cloud/migration/state.js +1 -0
  54. package/dist/app/cloud/migration/transfer.d.ts +6 -0
  55. package/dist/app/cloud/migration/transfer.js +1 -0
  56. package/dist/app/db-schema/prepare.d.ts +11 -0
  57. package/dist/app/db-schema/prepare.js +1 -0
  58. package/dist/app/db-schema/refresh.d.ts +17 -0
  59. package/dist/app/db-schema/refresh.js +1 -0
  60. package/dist/app/db-schema/verify.d.ts +11 -0
  61. package/dist/app/db-schema/verify.js +1 -0
  62. package/dist/app/destroy/index.d.ts +16 -0
  63. package/dist/app/destroy/index.js +1 -0
  64. package/dist/app/discover/index.d.ts +8 -0
  65. package/dist/app/discover/index.js +2 -0
  66. package/dist/app/doctor/index.d.ts +17 -0
  67. package/dist/app/doctor/index.js +1 -0
  68. package/dist/app/file-selection.d.ts +1 -0
  69. package/dist/app/file-selection.js +1 -0
  70. package/dist/app/inspect/artifacts.d.ts +29 -0
  71. package/dist/app/inspect/artifacts.js +1 -0
  72. package/dist/app/inspect/index.d.ts +112 -0
  73. package/dist/app/inspect/index.js +1 -0
  74. package/dist/app/lint/index.d.ts +28 -0
  75. package/dist/app/lint/index.js +2 -0
  76. package/dist/app/lint/native.d.ts +10 -0
  77. package/dist/app/lint/native.js +1 -0
  78. package/dist/app/lint/options.d.ts +67 -0
  79. package/dist/app/lint/options.js +1 -0
  80. package/dist/app/lint/policy.d.ts +21 -0
  81. package/dist/app/lint/policy.js +1 -0
  82. package/dist/app/lint/rules/data.d.ts +3 -0
  83. package/dist/app/lint/rules/data.js +1 -0
  84. package/dist/app/lint/rules/engine-imports.d.ts +3 -0
  85. package/dist/app/lint/rules/engine-imports.js +1 -0
  86. package/dist/app/lint/rules/syntax.d.ts +4 -0
  87. package/dist/app/lint/rules/syntax.js +1 -0
  88. package/dist/app/lint/rules/unit.d.ts +3 -0
  89. package/dist/app/lint/rules/unit.js +1 -0
  90. package/dist/app/lint/shared.d.ts +36 -0
  91. package/dist/app/lint/shared.js +1 -0
  92. package/dist/app/package-inspection.d.ts +20 -0
  93. package/dist/app/package-inspection.js +1 -0
  94. package/dist/app/run/endpoint-readiness.d.ts +43 -0
  95. package/dist/app/run/endpoint-readiness.js +1 -0
  96. package/dist/app/run/engine-evidence-persistence.d.ts +39 -0
  97. package/dist/app/run/engine-evidence-persistence.js +1 -0
  98. package/dist/app/run/engine-execution-cleanup.d.ts +8 -0
  99. package/dist/app/run/engine-execution-cleanup.js +1 -0
  100. package/dist/app/run/engine-execution-failures.d.ts +41 -0
  101. package/dist/app/run/engine-execution-failures.js +1 -0
  102. package/dist/app/run/engine-execution-observer.d.ts +21 -0
  103. package/dist/app/run/engine-execution-observer.js +1 -0
  104. package/dist/app/run/engine-execution-reporting.d.ts +17 -0
  105. package/dist/app/run/engine-execution-reporting.js +1 -0
  106. package/dist/app/run/engine-execution.d.ts +60 -0
  107. package/dist/app/run/engine-execution.js +1 -0
  108. package/dist/app/run/engine-orchestration.d.ts +49 -0
  109. package/dist/app/run/engine-orchestration.js +1 -0
  110. package/dist/app/run/failure-details.d.ts +36 -0
  111. package/dist/app/run/failure-details.js +1 -0
  112. package/dist/app/run/live-run.d.ts +27 -0
  113. package/dist/app/run/live-run.js +1 -0
  114. package/dist/app/run/operation-progress.d.ts +13 -0
  115. package/dist/app/run/operation-progress.js +1 -0
  116. package/dist/app/run/orchestrator.d.ts +68 -0
  117. package/dist/app/run/orchestrator.js +1 -0
  118. package/dist/app/run/planning-types.d.ts +68 -0
  119. package/dist/app/run/planning-types.js +1 -0
  120. package/dist/app/run/planning.d.ts +15 -0
  121. package/dist/app/run/planning.js +1 -0
  122. package/dist/app/run/playwright-configuration.d.ts +2 -0
  123. package/dist/app/run/playwright-configuration.js +1 -0
  124. package/dist/app/run/request.d.ts +30 -0
  125. package/dist/app/run/request.js +1 -0
  126. package/dist/app/run/results.d.ts +161 -0
  127. package/dist/app/run/results.js +1 -0
  128. package/dist/app/run/run-events.d.ts +144 -0
  129. package/dist/app/run/run-events.js +1 -0
  130. package/dist/app/run/run-finalization.d.ts +52 -0
  131. package/dist/app/run/run-finalization.js +1 -0
  132. package/dist/app/run/run-guards.d.ts +3 -0
  133. package/dist/app/run/run-guards.js +3 -0
  134. package/dist/app/run/runtime-failures.d.ts +18 -0
  135. package/dist/app/run/runtime-failures.js +1 -0
  136. package/dist/app/run/runtime-fixtures.d.ts +2 -0
  137. package/dist/app/run/runtime-fixtures.js +1 -0
  138. package/dist/app/run/runtime-task-types.d.ts +20 -0
  139. package/dist/app/run/runtime-task-types.js +1 -0
  140. package/dist/app/run/scheduler/estimates.d.ts +32 -0
  141. package/dist/app/run/scheduler/estimates.js +1 -0
  142. package/dist/app/run/scheduler/identity.d.ts +9 -0
  143. package/dist/app/run/scheduler/identity.js +1 -0
  144. package/dist/app/run/scheduler/index.d.ts +124 -0
  145. package/dist/app/run/scheduler/index.js +1 -0
  146. package/dist/app/run/scheduler/observations.d.ts +20 -0
  147. package/dist/app/run/scheduler/observations.js +1 -0
  148. package/dist/app/run/selection.d.ts +10 -0
  149. package/dist/app/run/selection.js +1 -0
  150. package/dist/app/run/setup/runtime-node-setup-errors.d.ts +13 -0
  151. package/dist/app/run/setup/runtime-node-setup-errors.js +1 -0
  152. package/dist/app/run/setup/runtime-node-setup-protocol.d.ts +85 -0
  153. package/dist/app/run/setup/runtime-node-setup-protocol.js +1 -0
  154. package/dist/app/run/setup/runtime-node-setup-worker.d.ts +1 -0
  155. package/dist/app/run/setup/runtime-node-setup-worker.js +1 -0
  156. package/dist/app/run/setup/runtime-node-setup.d.ts +48 -0
  157. package/dist/app/run/setup/runtime-node-setup.js +3 -0
  158. package/dist/app/run/task-batches.d.ts +23 -0
  159. package/dist/app/run/task-batches.js +1 -0
  160. package/dist/app/run/worker-loop.d.ts +57 -0
  161. package/dist/app/run/worker-loop.js +1 -0
  162. package/dist/app/setup/playwright.d.ts +22 -0
  163. package/dist/app/setup/playwright.js +1 -0
  164. package/dist/app/status/index.d.ts +7 -0
  165. package/dist/app/status/index.js +1 -0
  166. package/dist/app/status/model.d.ts +29 -0
  167. package/dist/app/status/model.js +1 -0
  168. package/dist/app/status/runs.d.ts +99 -0
  169. package/dist/app/status/runs.js +1 -0
  170. package/dist/app/stop/index.d.ts +14 -0
  171. package/dist/app/stop/index.js +1 -0
  172. package/dist/app/typecheck/index.d.ts +61 -0
  173. package/dist/app/typecheck/index.js +4 -0
  174. package/dist/app/typecheck/unavailable.d.ts +1 -0
  175. package/dist/app/typecheck/unavailable.js +1 -0
  176. package/dist/cli/cloud-apply-help.d.ts +1 -0
  177. package/dist/cli/cloud-apply-help.js +56 -0
  178. package/dist/cli/cloud-selection.d.ts +2 -0
  179. package/dist/cli/cloud-selection.js +3 -0
  180. package/dist/cli/command-catalog.d.ts +238 -0
  181. package/dist/cli/command-catalog.js +1 -0
  182. package/dist/cli/command-flags.d.ts +19 -0
  183. package/dist/cli/command-flags.js +1 -0
  184. package/dist/cli/command-registry.d.ts +2 -0
  185. package/dist/cli/command-registry.js +1 -0
  186. package/dist/cli/commands/artifacts.d.ts +48 -0
  187. package/dist/cli/commands/artifacts.js +3 -0
  188. package/dist/cli/commands/cleanup.d.ts +13 -0
  189. package/dist/cli/commands/cleanup.js +1 -0
  190. package/dist/cli/commands/cloud/apply.d.ts +5 -0
  191. package/dist/cli/commands/cloud/apply.js +1 -0
  192. package/dist/cli/commands/cloud/campaign/create.d.ts +5 -0
  193. package/dist/cli/commands/cloud/campaign/create.js +1 -0
  194. package/dist/cli/commands/cloud/download.d.ts +5 -0
  195. package/dist/cli/commands/cloud/download.js +1 -0
  196. package/dist/cli/commands/cloud/list.d.ts +5 -0
  197. package/dist/cli/commands/cloud/list.js +1 -0
  198. package/dist/cli/commands/cloud/login.d.ts +13 -0
  199. package/dist/cli/commands/cloud/login.js +2 -0
  200. package/dist/cli/commands/cloud/logout.d.ts +7 -0
  201. package/dist/cli/commands/cloud/logout.js +1 -0
  202. package/dist/cli/commands/cloud/migrate/apply.d.ts +2 -0
  203. package/dist/cli/commands/cloud/migrate/apply.js +1 -0
  204. package/dist/cli/commands/cloud/migrate/plan.d.ts +7 -0
  205. package/dist/cli/commands/cloud/migrate/plan.js +1 -0
  206. package/dist/cli/commands/cloud/migrate/progress.d.ts +2 -0
  207. package/dist/cli/commands/cloud/migrate/progress.js +2 -0
  208. package/dist/cli/commands/cloud/migrate/reconcile.d.ts +2 -0
  209. package/dist/cli/commands/cloud/migrate/reconcile.js +1 -0
  210. package/dist/cli/commands/cloud/policy/preview.d.ts +5 -0
  211. package/dist/cli/commands/cloud/policy/preview.js +1 -0
  212. package/dist/cli/commands/cloud/project/create.d.ts +5 -0
  213. package/dist/cli/commands/cloud/project/create.js +1 -0
  214. package/dist/cli/commands/cloud/publish.d.ts +7 -0
  215. package/dist/cli/commands/cloud/publish.js +1 -0
  216. package/dist/cli/commands/cloud/session/revoke.d.ts +8 -0
  217. package/dist/cli/commands/cloud/session/revoke.js +1 -0
  218. package/dist/cli/commands/cloud/show.d.ts +5 -0
  219. package/dist/cli/commands/cloud/show.js +1 -0
  220. package/dist/cli/commands/cloud/snapshot.d.ts +5 -0
  221. package/dist/cli/commands/cloud/snapshot.js +1 -0
  222. package/dist/cli/commands/cloud/status.d.ts +33 -0
  223. package/dist/cli/commands/cloud/status.js +1 -0
  224. package/dist/cli/commands/db/schema/refresh.d.ts +2 -0
  225. package/dist/cli/commands/db/schema/refresh.js +1 -0
  226. package/dist/cli/commands/db/schema/verify.d.ts +2 -0
  227. package/dist/cli/commands/db/schema/verify.js +1 -0
  228. package/dist/cli/commands/destroy.d.ts +9 -0
  229. package/dist/cli/commands/destroy.js +1 -0
  230. package/dist/cli/commands/discover.d.ts +2 -0
  231. package/dist/cli/commands/discover.js +1 -0
  232. package/dist/cli/commands/doctor.d.ts +2 -0
  233. package/dist/cli/commands/doctor.js +1 -0
  234. package/dist/cli/commands/guard/unsafe-entrypoint.d.ts +2 -0
  235. package/dist/cli/commands/guard/unsafe-entrypoint.js +2 -0
  236. package/dist/cli/commands/lint.d.ts +2 -0
  237. package/dist/cli/commands/lint.js +1 -0
  238. package/dist/cli/commands/run/status.d.ts +5 -0
  239. package/dist/cli/commands/run/status.js +1 -0
  240. package/dist/cli/commands/run/stop.d.ts +7 -0
  241. package/dist/cli/commands/run/stop.js +1 -0
  242. package/dist/cli/commands/run.d.ts +9 -0
  243. package/dist/cli/commands/run.js +1 -0
  244. package/dist/cli/commands/setup/playwright.d.ts +2 -0
  245. package/dist/cli/commands/setup/playwright.js +1 -0
  246. package/dist/cli/commands/status.d.ts +5 -0
  247. package/dist/cli/commands/status.js +1 -0
  248. package/dist/cli/commands/stop.d.ts +12 -0
  249. package/dist/cli/commands/stop.js +1 -0
  250. package/dist/cli/commands/typecheck.d.ts +2 -0
  251. package/dist/cli/commands/typecheck.js +1 -0
  252. package/dist/cli/commands/workspace.d.ts +2 -0
  253. package/dist/cli/commands/workspace.js +1 -0
  254. package/dist/cli/entrypoint.d.ts +1 -0
  255. package/dist/cli/entrypoint.js +1 -0
  256. package/dist/cli/framework/command.d.ts +21 -0
  257. package/dist/cli/framework/command.js +1 -0
  258. package/dist/cli/framework/definitions.d.ts +100 -0
  259. package/dist/cli/framework/definitions.js +1 -0
  260. package/dist/cli/framework/errors.d.ts +6 -0
  261. package/dist/cli/framework/errors.js +1 -0
  262. package/dist/cli/framework/execute.d.ts +13 -0
  263. package/dist/cli/framework/execute.js +6 -0
  264. package/dist/cli/framework/help.d.ts +11 -0
  265. package/dist/cli/framework/help.js +8 -0
  266. package/dist/cli/framework/index.d.ts +3 -0
  267. package/dist/cli/framework/index.js +1 -0
  268. package/dist/cli/framework/parser.d.ts +6 -0
  269. package/dist/cli/framework/parser.js +1 -0
  270. package/dist/cli/index.d.ts +4 -0
  271. package/dist/cli/index.js +1 -0
  272. package/dist/cli/json-errors.d.ts +3 -0
  273. package/dist/cli/json-errors.js +1 -0
  274. package/dist/cli/operations/db/schema/refresh/operation.d.ts +6 -0
  275. package/dist/cli/operations/db/schema/refresh/operation.js +1 -0
  276. package/dist/cli/operations/db/schema/verify/operation.d.ts +6 -0
  277. package/dist/cli/operations/db/schema/verify/operation.js +1 -0
  278. package/dist/cli/operations/run/operation.d.ts +24 -0
  279. package/dist/cli/operations/run/operation.js +2 -0
  280. package/dist/cli/process-signal.d.ts +1 -0
  281. package/dist/cli/process-signal.js +1 -0
  282. package/dist/cli/renderers/artifact-preview.d.ts +4 -0
  283. package/dist/cli/renderers/artifact-preview.js +1 -0
  284. package/dist/cli/renderers/cleanup/format.d.ts +14 -0
  285. package/dist/cli/renderers/cleanup/format.js +1 -0
  286. package/dist/cli/renderers/db-schema/text.d.ts +4 -0
  287. package/dist/cli/renderers/db-schema/text.js +1 -0
  288. package/dist/cli/renderers/destroy/text.d.ts +4 -0
  289. package/dist/cli/renderers/destroy/text.js +1 -0
  290. package/dist/cli/renderers/discover/report.d.ts +7 -0
  291. package/dist/cli/renderers/discover/report.js +1 -0
  292. package/dist/cli/renderers/discover/text.d.ts +3 -0
  293. package/dist/cli/renderers/discover/text.js +1 -0
  294. package/dist/cli/renderers/doctor/text.d.ts +2 -0
  295. package/dist/cli/renderers/doctor/text.js +1 -0
  296. package/dist/cli/renderers/lint/text.d.ts +2 -0
  297. package/dist/cli/renderers/lint/text.js +1 -0
  298. package/dist/cli/renderers/run/events.d.ts +8 -0
  299. package/dist/cli/renderers/run/events.js +2 -0
  300. package/dist/cli/renderers/run/failure.d.ts +8 -0
  301. package/dist/cli/renderers/run/failure.js +1 -0
  302. package/dist/cli/renderers/run/formatting.d.ts +79 -0
  303. package/dist/cli/renderers/run/formatting.js +1 -0
  304. package/dist/cli/renderers/run/status.d.ts +6 -0
  305. package/dist/cli/renderers/run/status.js +1 -0
  306. package/dist/cli/renderers/run/text-reporter.d.ts +19 -0
  307. package/dist/cli/renderers/run/text-reporter.js +23 -0
  308. package/dist/cli/renderers/status/text.d.ts +2 -0
  309. package/dist/cli/renderers/status/text.js +1 -0
  310. package/dist/cli/renderers/stop/text.d.ts +7 -0
  311. package/dist/cli/renderers/stop/text.js +1 -0
  312. package/dist/cli/renderers/typecheck/text.d.ts +2 -0
  313. package/dist/cli/renderers/typecheck/text.js +1 -0
  314. package/dist/cli/terminal/colors.d.ts +10 -0
  315. package/dist/cli/terminal/colors.js +1 -0
  316. package/dist/cli/terminal/layout.d.ts +11 -0
  317. package/dist/cli/terminal/layout.js +2 -0
  318. package/dist/cli/version-drift.d.ts +25 -0
  319. package/dist/cli/version-drift.js +7 -0
  320. package/dist/cloud/account.d.ts +34 -0
  321. package/dist/cloud/account.js +1 -0
  322. package/dist/cloud/archive-contract.d.ts +1 -0
  323. package/dist/cloud/archive-contract.js +1 -0
  324. package/dist/cloud/archive.d.ts +12 -0
  325. package/dist/cloud/archive.js +1 -0
  326. package/dist/cloud/campaigns.d.ts +200 -0
  327. package/dist/cloud/campaigns.js +2 -0
  328. package/dist/cloud/client.d.ts +68 -0
  329. package/dist/cloud/client.js +4 -0
  330. package/dist/cloud/download.d.ts +5 -0
  331. package/dist/cloud/download.js +1 -0
  332. package/dist/cloud/historical-contract.d.ts +224 -0
  333. package/dist/cloud/historical-contract.js +1 -0
  334. package/dist/cloud/historical-json.d.ts +16 -0
  335. package/dist/cloud/historical-json.js +1 -0
  336. package/dist/cloud/historical.d.ts +69 -0
  337. package/dist/cloud/historical.js +1 -0
  338. package/dist/cloud/pagination.d.ts +5 -0
  339. package/dist/cloud/pagination.js +1 -0
  340. package/dist/cloud/transport.d.ts +18 -0
  341. package/dist/cloud/transport.js +1 -0
  342. package/dist/config/authoring/build-config-contract.d.ts +27 -0
  343. package/dist/config/authoring/build-config-contract.js +1 -0
  344. package/dist/config/authoring/configured-step-contract.d.ts +18 -0
  345. package/dist/config/authoring/configured-step-contract.js +1 -0
  346. package/dist/config/authoring/http-execution-contract.d.ts +70 -0
  347. package/dist/config/authoring/http-execution-contract.js +1 -0
  348. package/dist/config/authoring/http-methods.d.ts +18 -0
  349. package/dist/config/authoring/http-methods.js +1 -0
  350. package/dist/config/authoring/index.d.ts +376 -0
  351. package/dist/config/authoring/index.js +1 -0
  352. package/dist/config/authoring/preset-env.d.ts +19 -0
  353. package/dist/config/authoring/preset-env.js +1 -0
  354. package/dist/config/authoring/runtime.d.ts +64 -0
  355. package/dist/config/authoring/runtime.js +1 -0
  356. package/dist/config/loader/cloud.d.ts +2 -0
  357. package/dist/config/loader/cloud.js +1 -0
  358. package/dist/config/loader/config-loader.d.ts +9 -0
  359. package/dist/config/loader/config-loader.js +1 -0
  360. package/dist/config/loader/database-materialization.d.ts +19 -0
  361. package/dist/config/loader/database-materialization.js +1 -0
  362. package/dist/config/loader/database-roles.d.ts +2 -0
  363. package/dist/config/loader/database-roles.js +1 -0
  364. package/dist/config/loader/database.d.ts +55 -0
  365. package/dist/config/loader/database.js +1 -0
  366. package/dist/config/loader/decode-discovery.d.ts +5 -0
  367. package/dist/config/loader/decode-discovery.js +1 -0
  368. package/dist/config/loader/decode-execution.d.ts +9 -0
  369. package/dist/config/loader/decode-execution.js +1 -0
  370. package/dist/config/loader/dependencies.d.ts +7 -0
  371. package/dist/config/loader/dependencies.js +1 -0
  372. package/dist/config/loader/discover-tests.d.ts +101 -0
  373. package/dist/config/loader/discover-tests.js +1 -0
  374. package/dist/config/loader/discovery-summary.d.ts +29 -0
  375. package/dist/config/loader/discovery-summary.js +1 -0
  376. package/dist/config/loader/discovery.d.ts +54 -0
  377. package/dist/config/loader/discovery.js +2 -0
  378. package/dist/config/loader/env.d.ts +4 -0
  379. package/dist/config/loader/env.js +1 -0
  380. package/dist/config/loader/execution-model.d.ts +16 -0
  381. package/dist/config/loader/execution-model.js +1 -0
  382. package/dist/config/loader/file-metadata.d.ts +19 -0
  383. package/dist/config/loader/file-metadata.js +1 -0
  384. package/dist/config/loader/index.d.ts +10 -0
  385. package/dist/config/loader/index.js +1 -0
  386. package/dist/config/loader/load.d.ts +89 -0
  387. package/dist/config/loader/load.js +1 -0
  388. package/dist/config/loader/managed-configs.d.ts +21 -0
  389. package/dist/config/loader/managed-configs.js +1 -0
  390. package/dist/config/loader/path-policy.d.ts +9 -0
  391. package/dist/config/loader/path-policy.js +1 -0
  392. package/dist/config/loader/paths.d.ts +5 -0
  393. package/dist/config/loader/paths.js +1 -0
  394. package/dist/config/loader/runtime-isolation.d.ts +44 -0
  395. package/dist/config/loader/runtime-isolation.js +1 -0
  396. package/dist/config/loader/runtime.d.ts +25 -0
  397. package/dist/config/loader/runtime.js +1 -0
  398. package/dist/config/loader/skip-config.d.ts +44 -0
  399. package/dist/config/loader/skip-config.js +1 -0
  400. package/dist/config/loader/validation.d.ts +16 -0
  401. package/dist/config/loader/validation.js +1 -0
  402. package/dist/config/loader/values.d.ts +4 -0
  403. package/dist/config/loader/values.js +1 -0
  404. package/dist/config/runtime/build-assets.d.ts +6 -0
  405. package/dist/config/runtime/build-assets.js +1 -0
  406. package/dist/config/runtime/env/index.d.ts +35 -0
  407. package/dist/config/runtime/env/index.js +1 -0
  408. package/dist/config/runtime/next-runtime-tsconfig.d.ts +6 -0
  409. package/dist/config/runtime/next-runtime-tsconfig.js +2 -0
  410. package/dist/database/activity-gate.d.ts +22 -0
  411. package/dist/database/activity-gate.js +1 -0
  412. package/dist/database/admin.d.ts +31 -0
  413. package/dist/database/admin.js +2 -0
  414. package/dist/database/cleanup.d.ts +36 -0
  415. package/dist/database/cleanup.js +1 -0
  416. package/dist/database/configured-steps.d.ts +27 -0
  417. package/dist/database/configured-steps.js +1 -0
  418. package/dist/database/constants.d.ts +11 -0
  419. package/dist/database/constants.js +1 -0
  420. package/dist/database/docker.d.ts +65 -0
  421. package/dist/database/docker.js +5 -0
  422. package/dist/database/drizzle/index.d.ts +13 -0
  423. package/dist/database/drizzle/index.js +1 -0
  424. package/dist/database/fingerprint.d.ts +12 -0
  425. package/dist/database/fingerprint.js +1 -0
  426. package/dist/database/index.d.ts +41 -0
  427. package/dist/database/index.js +1 -0
  428. package/dist/database/local-postgres.d.ts +71 -0
  429. package/dist/database/local-postgres.js +2 -0
  430. package/dist/database/naming.d.ts +17 -0
  431. package/dist/database/naming.js +1 -0
  432. package/dist/database/postgres/index.d.ts +71 -0
  433. package/dist/database/postgres/index.js +2 -0
  434. package/dist/database/progress.d.ts +6 -0
  435. package/dist/database/progress.js +1 -0
  436. package/dist/database/roles.d.ts +19 -0
  437. package/dist/database/roles.js +41 -0
  438. package/dist/database/runtime-config.d.ts +16 -0
  439. package/dist/database/runtime-config.js +1 -0
  440. package/dist/database/runtime-reservations.d.ts +19 -0
  441. package/dist/database/runtime-reservations.js +1 -0
  442. package/dist/database/schema-operations.d.ts +18 -0
  443. package/dist/database/schema-operations.js +1 -0
  444. package/dist/database/schema-source.d.ts +93 -0
  445. package/dist/database/schema-source.js +3 -0
  446. package/dist/database/source-refresh-lock.d.ts +8 -0
  447. package/dist/database/source-refresh-lock.js +1 -0
  448. package/dist/database/source-url.d.ts +22 -0
  449. package/dist/database/source-url.js +2 -0
  450. package/dist/database/state-files.d.ts +13 -0
  451. package/dist/database/state-files.js +1 -0
  452. package/dist/database/state.d.ts +26 -0
  453. package/dist/database/state.js +1 -0
  454. package/dist/database/steps.d.ts +16 -0
  455. package/dist/database/steps.js +4 -0
  456. package/dist/database/template-steps.d.ts +35 -0
  457. package/dist/database/template-steps.js +4 -0
  458. package/dist/domain/file-timeout.d.ts +28 -0
  459. package/dist/domain/file-timeout.js +1 -0
  460. package/dist/domain/identifiers.d.ts +9 -0
  461. package/dist/domain/identifiers.js +1 -0
  462. package/dist/domain/operation-display.d.ts +10 -0
  463. package/dist/domain/operation-display.js +1 -0
  464. package/dist/domain/operation-reason.d.ts +5 -0
  465. package/dist/domain/operation-reason.js +1 -0
  466. package/dist/domain/postgres-route.d.ts +4 -0
  467. package/dist/domain/postgres-route.js +1 -0
  468. package/dist/domain/runtime-identity.d.ts +1 -0
  469. package/dist/domain/runtime-identity.js +1 -0
  470. package/dist/domain/runtime-isolation-contract.d.ts +5 -0
  471. package/dist/domain/runtime-isolation-contract.js +1 -0
  472. package/dist/domain/service-name.d.ts +2 -0
  473. package/dist/domain/service-name.js +1 -0
  474. package/dist/domain/suite-selection.d.ts +20 -0
  475. package/dist/domain/suite-selection.js +1 -0
  476. package/dist/domain/test-outcomes.d.ts +3 -0
  477. package/dist/domain/test-outcomes.js +1 -0
  478. package/dist/domain/test-types.d.ts +16 -0
  479. package/dist/domain/test-types.js +1 -0
  480. package/dist/engines/adapters/evidence-files.d.ts +32 -0
  481. package/dist/engines/adapters/evidence-files.js +1 -0
  482. package/dist/engines/adapters/evidence-identity.d.ts +12 -0
  483. package/dist/engines/adapters/evidence-identity.js +1 -0
  484. package/dist/engines/adapters/execution.d.ts +38 -0
  485. package/dist/engines/adapters/execution.js +1 -0
  486. package/dist/engines/adapters/native-report.d.ts +25 -0
  487. package/dist/engines/adapters/native-report.js +1 -0
  488. package/dist/engines/adapters/workspace.d.ts +4 -0
  489. package/dist/engines/adapters/workspace.js +1 -0
  490. package/dist/engines/api/capabilities.d.ts +31 -0
  491. package/dist/engines/api/capabilities.js +1 -0
  492. package/dist/engines/api/evidence.d.ts +38 -0
  493. package/dist/engines/api/evidence.js +1 -0
  494. package/dist/engines/api/execution-observer.d.ts +8 -0
  495. package/dist/engines/api/execution-observer.js +1 -0
  496. package/dist/engines/api/execution-scope.d.ts +17 -0
  497. package/dist/engines/api/execution-scope.js +1 -0
  498. package/dist/engines/api/execution.d.ts +99 -0
  499. package/dist/engines/api/execution.js +1 -0
  500. package/dist/engines/api/index.d.ts +5 -0
  501. package/dist/engines/api/index.js +1 -0
  502. package/dist/engines/api/k6-runtime-input.d.ts +26 -0
  503. package/dist/engines/api/k6-runtime-input.js +1 -0
  504. package/dist/engines/api/runtime-artifact.d.ts +19 -0
  505. package/dist/engines/api/runtime-artifact.js +1 -0
  506. package/dist/engines/bundle-cache.d.ts +32 -0
  507. package/dist/engines/bundle-cache.js +1 -0
  508. package/dist/engines/catalog.d.ts +32 -0
  509. package/dist/engines/catalog.js +1 -0
  510. package/dist/engines/contracts/fixture-manifest.d.ts +34 -0
  511. package/dist/engines/contracts/fixture-manifest.js +1 -0
  512. package/dist/engines/contracts/json-bounds.d.ts +36 -0
  513. package/dist/engines/contracts/json-bounds.js +2 -0
  514. package/dist/engines/contracts/k6-repository-configuration.d.ts +12 -0
  515. package/dist/engines/contracts/k6-repository-configuration.js +1 -0
  516. package/dist/engines/contracts/test-context.d.ts +15 -0
  517. package/dist/engines/contracts/test-context.js +1 -0
  518. package/dist/engines/definitions.d.ts +15 -0
  519. package/dist/engines/definitions.js +1 -0
  520. package/dist/engines/factory.d.ts +6 -0
  521. package/dist/engines/factory.js +1 -0
  522. package/dist/engines/installation-catalog.d.ts +27 -0
  523. package/dist/engines/installation-catalog.js +1 -0
  524. package/dist/engines/installations/k6.d.ts +98 -0
  525. package/dist/engines/installations/k6.js +1 -0
  526. package/dist/engines/installations/node-vitest.d.ts +47 -0
  527. package/dist/engines/installations/node-vitest.js +1 -0
  528. package/dist/engines/installations/package-resolution.d.ts +51 -0
  529. package/dist/engines/installations/package-resolution.js +1 -0
  530. package/dist/engines/installations/playwright-resolution-child.d.ts +1 -0
  531. package/dist/engines/installations/playwright-resolution-child.js +2 -0
  532. package/dist/engines/installations/playwright.d.ts +85 -0
  533. package/dist/engines/installations/playwright.js +1 -0
  534. package/dist/engines/installations/types.d.ts +10 -0
  535. package/dist/engines/installations/types.js +1 -0
  536. package/dist/engines/k6/adapter/bundle.d.ts +25 -0
  537. package/dist/engines/k6/adapter/bundle.js +112 -0
  538. package/dist/engines/k6/adapter/evidence.d.ts +15 -0
  539. package/dist/engines/k6/adapter/evidence.js +4 -0
  540. package/dist/engines/k6/adapter/executor.d.ts +13 -0
  541. package/dist/engines/k6/adapter/executor.js +1 -0
  542. package/dist/engines/k6/adapter/index.d.ts +1 -0
  543. package/dist/engines/k6/adapter/index.js +1 -0
  544. package/dist/engines/k6/adapter/input.d.ts +21 -0
  545. package/dist/engines/k6/adapter/input.js +1 -0
  546. package/dist/engines/k6/adapter/native-summary.d.ts +11 -0
  547. package/dist/engines/k6/adapter/native-summary.js +1 -0
  548. package/dist/engines/k6/adapter/repository-configuration.d.ts +2 -0
  549. package/dist/engines/k6/adapter/repository-configuration.js +1 -0
  550. package/dist/engines/k6/authoring-type-paths.d.ts +3 -0
  551. package/dist/engines/k6/authoring-type-paths.js +1 -0
  552. package/dist/engines/k6/runtime/ambient-types/bundle-manifest.json +146 -0
  553. package/dist/engines/k6/runtime/ambient-types/k6/LICENSE +21 -0
  554. package/dist/engines/k6/runtime/ambient-types/k6/browser/index.d.ts +6332 -0
  555. package/dist/engines/k6/runtime/ambient-types/k6/crypto/index.d.ts +218 -0
  556. package/dist/engines/k6/runtime/ambient-types/k6/data/index.d.ts +16 -0
  557. package/dist/engines/k6/runtime/ambient-types/k6/encoding/index.d.ts +46 -0
  558. package/dist/engines/k6/runtime/ambient-types/k6/execution/index.d.ts +127 -0
  559. package/dist/engines/k6/runtime/ambient-types/k6/experimental/csv/index.d.ts +96 -0
  560. package/dist/engines/k6/runtime/ambient-types/k6/experimental/fs/index.d.ts +104 -0
  561. package/dist/engines/k6/runtime/ambient-types/k6/experimental/redis/index.d.ts +821 -0
  562. package/dist/engines/k6/runtime/ambient-types/k6/experimental/streams/index.d.ts +198 -0
  563. package/dist/engines/k6/runtime/ambient-types/k6/global.d.ts +83 -0
  564. package/dist/engines/k6/runtime/ambient-types/k6/html/index.d.ts +1325 -0
  565. package/dist/engines/k6/runtime/ambient-types/k6/http/index.d.ts +806 -0
  566. package/dist/engines/k6/runtime/ambient-types/k6/index.d.ts +126 -0
  567. package/dist/engines/k6/runtime/ambient-types/k6/metrics/index.d.ts +66 -0
  568. package/dist/engines/k6/runtime/ambient-types/k6/net/grpc/index.d.ts +247 -0
  569. package/dist/engines/k6/runtime/ambient-types/k6/options/index.d.ts +459 -0
  570. package/dist/engines/k6/runtime/ambient-types/k6/package.json +79 -0
  571. package/dist/engines/k6/runtime/ambient-types/k6/secrets/index.d.ts +36 -0
  572. package/dist/engines/k6/runtime/ambient-types/k6/timers/index.d.ts +47 -0
  573. package/dist/engines/k6/runtime/ambient-types/k6/websockets/index.d.ts +324 -0
  574. package/dist/engines/k6/runtime/ambient-types/k6/ws/index.d.ts +283 -0
  575. package/dist/engines/k6/runtime/ambient-types/xk6-sql/LICENSE +201 -0
  576. package/dist/engines/k6/runtime/ambient-types/xk6-sql/index.d.ts +397 -0
  577. package/dist/engines/k6/runtime/ambient-types/xk6-sql/package.json +15 -0
  578. package/dist/engines/k6/runtime/artifacts.d.ts +2 -0
  579. package/dist/engines/k6/runtime/artifacts.js +1 -0
  580. package/dist/engines/k6/runtime/checks.d.ts +17 -0
  581. package/dist/engines/k6/runtime/checks.js +1 -0
  582. package/dist/engines/k6/runtime/dal-fixtures.d.ts +24 -0
  583. package/dist/engines/k6/runtime/dal-fixtures.js +1 -0
  584. package/dist/engines/k6/runtime/dal-suite.d.ts +24 -0
  585. package/dist/engines/k6/runtime/dal-suite.js +1 -0
  586. package/dist/engines/k6/runtime/dal.d.ts +10 -0
  587. package/dist/engines/k6/runtime/dal.js +1 -0
  588. package/dist/engines/k6/runtime/fixtures.d.ts +3 -0
  589. package/dist/engines/k6/runtime/fixtures.js +1 -0
  590. package/dist/engines/k6/runtime/http-assertions.d.ts +19 -0
  591. package/dist/engines/k6/runtime/http-assertions.js +1 -0
  592. package/dist/engines/k6/runtime/http-checks.d.ts +19 -0
  593. package/dist/engines/k6/runtime/http-checks.js +1 -0
  594. package/dist/engines/k6/runtime/http-suite-runtime.d.ts +103 -0
  595. package/dist/engines/k6/runtime/http-suite-runtime.js +1 -0
  596. package/dist/engines/k6/runtime/http.d.ts +15 -0
  597. package/dist/engines/k6/runtime/http.js +1 -0
  598. package/dist/engines/k6/runtime/index.d.ts +11 -0
  599. package/dist/engines/k6/runtime/index.js +1 -0
  600. package/dist/engines/k6/runtime/input.d.ts +3 -0
  601. package/dist/engines/k6/runtime/input.js +1 -0
  602. package/dist/engines/k6/runtime/k6-repository-configuration.d.ts +9 -0
  603. package/dist/engines/k6/runtime/k6-repository-configuration.js +1 -0
  604. package/dist/engines/k6/runtime/node-setup.d.ts +13 -0
  605. package/dist/engines/k6/runtime/node-setup.js +1 -0
  606. package/dist/engines/k6/runtime/runtime-globals.d.ts +10 -0
  607. package/dist/engines/k6/runtime/runtime-globals.js +1 -0
  608. package/dist/engines/k6/runtime/runtime.d.ts +54 -0
  609. package/dist/engines/k6/runtime/runtime.js +1 -0
  610. package/dist/engines/k6/runtime/shared/assertion-details.d.ts +19 -0
  611. package/dist/engines/k6/runtime/shared/assertion-details.js +2 -0
  612. package/dist/engines/k6/runtime/shared/db-normalization.d.ts +19 -0
  613. package/dist/engines/k6/runtime/shared/db-normalization.js +1 -0
  614. package/dist/engines/k6/runtime/shared/error-body.d.ts +3 -0
  615. package/dist/engines/k6/runtime/shared/error-body.js +1 -0
  616. package/dist/engines/k6/runtime/shared/file-data.d.ts +1 -0
  617. package/dist/engines/k6/runtime/shared/file-data.js +1 -0
  618. package/dist/engines/k6/runtime/shared/fixture-engine.d.ts +8 -0
  619. package/dist/engines/k6/runtime/shared/fixture-engine.js +2 -0
  620. package/dist/engines/k6/runtime/shared/http-check-plan.d.ts +29 -0
  621. package/dist/engines/k6/runtime/shared/http-check-plan.js +1 -0
  622. package/dist/engines/k6/runtime/shared/http-parsing.d.ts +10 -0
  623. package/dist/engines/k6/runtime/shared/http-parsing.js +3 -0
  624. package/dist/engines/k6/runtime/shared/ordering.d.ts +2 -0
  625. package/dist/engines/k6/runtime/shared/ordering.js +1 -0
  626. package/dist/engines/k6/runtime/shared/properties.d.ts +1 -0
  627. package/dist/engines/k6/runtime/shared/properties.js +1 -0
  628. package/dist/engines/k6/runtime/suite.d.ts +4 -0
  629. package/dist/engines/k6/runtime/suite.js +1 -0
  630. package/dist/engines/k6/runtime/types.d.ts +242 -0
  631. package/dist/engines/k6/runtime/types.js +1 -0
  632. package/dist/engines/k6/runtime/xk6-sql-driver-postgres.d.ts +7 -0
  633. package/dist/engines/k6/runtime/xk6-sql-driver-postgres.js +1 -0
  634. package/dist/engines/managed-module-resolution-policy-input.d.ts +9 -0
  635. package/dist/engines/managed-module-resolution-policy-input.js +1 -0
  636. package/dist/engines/managed-module-resolution-policy.d.ts +25 -0
  637. package/dist/engines/managed-module-resolution-policy.js +1 -0
  638. package/dist/engines/managed-module-resolution.d.ts +13 -0
  639. package/dist/engines/managed-module-resolution.js +697 -0
  640. package/dist/engines/manager.d.ts +24 -0
  641. package/dist/engines/manager.js +1 -0
  642. package/dist/engines/node-vitest/adapter/adapter.d.ts +16 -0
  643. package/dist/engines/node-vitest/adapter/adapter.js +1 -0
  644. package/dist/engines/node-vitest/adapter/consumer-typescript-paths.d.ts +17 -0
  645. package/dist/engines/node-vitest/adapter/consumer-typescript-paths.js +3 -0
  646. package/dist/engines/node-vitest/adapter/evidence.d.ts +33 -0
  647. package/dist/engines/node-vitest/adapter/evidence.js +2 -0
  648. package/dist/engines/node-vitest/adapter/failure-details.d.ts +2 -0
  649. package/dist/engines/node-vitest/adapter/failure-details.js +2 -0
  650. package/dist/engines/node-vitest/adapter/index.d.ts +1 -0
  651. package/dist/engines/node-vitest/adapter/index.js +1 -0
  652. package/dist/engines/node-vitest/adapter/reporter.d.ts +7 -0
  653. package/dist/engines/node-vitest/adapter/reporter.js +1 -0
  654. package/dist/engines/node-vitest/adapter/resolution.d.ts +12 -0
  655. package/dist/engines/node-vitest/adapter/resolution.js +1 -0
  656. package/dist/engines/node-vitest/adapter/workspace.d.ts +19 -0
  657. package/dist/engines/node-vitest/adapter/workspace.js +177 -0
  658. package/dist/engines/node-vitest/runtime/contract/index.d.ts +64 -0
  659. package/dist/engines/node-vitest/runtime/contract/index.js +1 -0
  660. package/dist/engines/node-vitest/runtime/data/http.d.ts +4 -0
  661. package/dist/engines/node-vitest/runtime/data/http.js +1 -0
  662. package/dist/engines/node-vitest/runtime/data/index.d.ts +8 -0
  663. package/dist/engines/node-vitest/runtime/data/index.js +1 -0
  664. package/dist/engines/node-vitest/runtime/data/primitives.d.ts +1 -0
  665. package/dist/engines/node-vitest/runtime/data/primitives.js +1 -0
  666. package/dist/engines/node-vitest/runtime/data/report.d.ts +3 -0
  667. package/dist/engines/node-vitest/runtime/data/report.js +6 -0
  668. package/dist/engines/node-vitest/runtime/data/runner.d.ts +4 -0
  669. package/dist/engines/node-vitest/runtime/data/runner.js +1 -0
  670. package/dist/engines/node-vitest/runtime/data/scenario.d.ts +12 -0
  671. package/dist/engines/node-vitest/runtime/data/scenario.js +2 -0
  672. package/dist/engines/node-vitest/runtime/data/types.d.ts +412 -0
  673. package/dist/engines/node-vitest/runtime/data/types.js +1 -0
  674. package/dist/engines/node-vitest/runtime/runtime-input.d.ts +63 -0
  675. package/dist/engines/node-vitest/runtime/runtime-input.js +1 -0
  676. package/dist/engines/playwright/adapter/adapter.d.ts +18 -0
  677. package/dist/engines/playwright/adapter/adapter.js +1 -0
  678. package/dist/engines/playwright/adapter/attachments.d.ts +25 -0
  679. package/dist/engines/playwright/adapter/attachments.js +1 -0
  680. package/dist/engines/playwright/adapter/config.d.ts +45 -0
  681. package/dist/engines/playwright/adapter/config.js +167 -0
  682. package/dist/engines/playwright/adapter/evidence-validation.d.ts +12 -0
  683. package/dist/engines/playwright/adapter/evidence-validation.js +1 -0
  684. package/dist/engines/playwright/adapter/evidence.d.ts +32 -0
  685. package/dist/engines/playwright/adapter/evidence.js +1 -0
  686. package/dist/engines/playwright/adapter/failure-details.d.ts +2 -0
  687. package/dist/engines/playwright/adapter/failure-details.js +2 -0
  688. package/dist/engines/playwright/adapter/index.d.ts +3 -0
  689. package/dist/engines/playwright/adapter/index.js +1 -0
  690. package/dist/engines/playwright/adapter/reporter.d.ts +12 -0
  691. package/dist/engines/playwright/adapter/reporter.js +1 -0
  692. package/dist/engines/playwright/runtime/config-file.d.ts +2 -0
  693. package/dist/engines/playwright/runtime/config-file.js +1 -0
  694. package/dist/engines/playwright/runtime/config.d.ts +24 -0
  695. package/dist/engines/playwright/runtime/config.js +1 -0
  696. package/dist/engines/playwright/runtime/index.d.ts +4 -0
  697. package/dist/engines/playwright/runtime/index.js +1 -0
  698. package/dist/engines/playwright/runtime/runtime-input.d.ts +36 -0
  699. package/dist/engines/playwright/runtime/runtime-input.js +151 -0
  700. package/dist/engines/playwright/runtime/sandbox.d.ts +84 -0
  701. package/dist/engines/playwright/runtime/sandbox.js +1 -0
  702. package/dist/engines/runtime-input-file.d.ts +25 -0
  703. package/dist/engines/runtime-input-file.js +1 -0
  704. package/dist/environment/lifecycle-artifacts.d.ts +7 -0
  705. package/dist/environment/lifecycle-artifacts.js +1 -0
  706. package/dist/environment/lifecycle-controller.d.ts +71 -0
  707. package/dist/environment/lifecycle-controller.js +1 -0
  708. package/dist/environment/lifecycle.d.ts +29 -0
  709. package/dist/environment/lifecycle.js +1 -0
  710. package/dist/environment/maintenance.d.ts +68 -0
  711. package/dist/environment/maintenance.js +1 -0
  712. package/dist/environment/planning-types.d.ts +35 -0
  713. package/dist/environment/planning-types.js +1 -0
  714. package/dist/environment/readiness.d.ts +12 -0
  715. package/dist/environment/readiness.js +1 -0
  716. package/dist/environment/ready-environment.d.ts +17 -0
  717. package/dist/environment/ready-environment.js +1 -0
  718. package/dist/environment/run-environment.d.ts +38 -0
  719. package/dist/environment/run-environment.js +1 -0
  720. package/dist/environment/run-stopping.d.ts +13 -0
  721. package/dist/environment/run-stopping.js +1 -0
  722. package/dist/environment/runtime-contexts.d.ts +32 -0
  723. package/dist/environment/runtime-contexts.js +1 -0
  724. package/dist/environment/runtime-manager.d.ts +95 -0
  725. package/dist/environment/runtime-manager.js +1 -0
  726. package/dist/environment/runtime-planning.d.ts +16 -0
  727. package/dist/environment/runtime-planning.js +1 -0
  728. package/dist/environment/runtime-preparation.d.ts +30 -0
  729. package/dist/environment/runtime-preparation.js +1 -0
  730. package/dist/environment/runtime-service.d.ts +18 -0
  731. package/dist/environment/runtime-service.js +1 -0
  732. package/dist/environment/services.d.ts +48 -0
  733. package/dist/environment/services.js +1 -0
  734. package/dist/environment/state.d.ts +18 -0
  735. package/dist/environment/state.js +1 -0
  736. package/dist/environment/status-runtime.d.ts +53 -0
  737. package/dist/environment/status-runtime.js +1 -0
  738. package/dist/environment/template.d.ts +180 -0
  739. package/dist/environment/template.js +1 -0
  740. package/dist/evidence/artifact-config.d.ts +14 -0
  741. package/dist/evidence/artifact-config.js +1 -0
  742. package/dist/evidence/artifact-validation.d.ts +5 -0
  743. package/dist/evidence/artifact-validation.js +1 -0
  744. package/dist/evidence/artifacts.d.ts +75 -0
  745. package/dist/evidence/artifacts.js +2 -0
  746. package/dist/evidence/bundles.d.ts +28 -0
  747. package/dist/evidence/bundles.js +1 -0
  748. package/dist/evidence/ci-provenance.d.ts +9 -0
  749. package/dist/evidence/ci-provenance.js +1 -0
  750. package/dist/evidence/contracts.d.ts +162 -0
  751. package/dist/evidence/contracts.js +1 -0
  752. package/dist/evidence/file-evidence.d.ts +23 -0
  753. package/dist/evidence/file-evidence.js +1 -0
  754. package/dist/evidence/finalization.d.ts +9 -0
  755. package/dist/evidence/finalization.js +1 -0
  756. package/dist/evidence/index.d.ts +8 -0
  757. package/dist/evidence/index.js +1 -0
  758. package/dist/evidence/logs.d.ts +31 -0
  759. package/dist/evidence/logs.js +2 -0
  760. package/dist/evidence/operation-timings.d.ts +60 -0
  761. package/dist/evidence/operation-timings.js +1 -0
  762. package/dist/evidence/read-bundle.d.ts +4 -0
  763. package/dist/evidence/read-bundle.js +1 -0
  764. package/dist/evidence/read-fields.d.ts +22 -0
  765. package/dist/evidence/read-fields.js +1 -0
  766. package/dist/evidence/read-provenance.d.ts +2 -0
  767. package/dist/evidence/read-provenance.js +1 -0
  768. package/dist/evidence/read-redaction.d.ts +2 -0
  769. package/dist/evidence/read-redaction.js +1 -0
  770. package/dist/evidence/read-retention.d.ts +2 -0
  771. package/dist/evidence/read-retention.js +1 -0
  772. package/dist/evidence/read-run.d.ts +2 -0
  773. package/dist/evidence/read-run.js +1 -0
  774. package/dist/evidence/reading.d.ts +28 -0
  775. package/dist/evidence/reading.js +1 -0
  776. package/dist/evidence/reporting-types.d.ts +330 -0
  777. package/dist/evidence/reporting-types.js +1 -0
  778. package/dist/evidence/reporting.d.ts +3 -0
  779. package/dist/evidence/reporting.js +1 -0
  780. package/dist/evidence/secure-file-copy.d.ts +24 -0
  781. package/dist/evidence/secure-file-copy.js +1 -0
  782. package/dist/evidence/setup-progress.d.ts +63 -0
  783. package/dist/evidence/setup-progress.js +1 -0
  784. package/dist/evidence/step-output.d.ts +16 -0
  785. package/dist/evidence/step-output.js +6 -0
  786. package/dist/evidence/storage-inventory.d.ts +27 -0
  787. package/dist/evidence/storage-inventory.js +1 -0
  788. package/dist/evidence/storage.d.ts +27 -0
  789. package/dist/evidence/storage.js +2 -0
  790. package/dist/evidence/timing.d.ts +23 -0
  791. package/dist/evidence/timing.js +1 -0
  792. package/dist/file.d.ts +11 -0
  793. package/dist/file.js +1 -0
  794. package/dist/index.d.ts +4 -0
  795. package/dist/index.js +1 -0
  796. package/dist/kernel/error-serialization.d.ts +38 -0
  797. package/dist/kernel/error-serialization.js +1 -0
  798. package/dist/kernel/redaction.d.ts +1 -0
  799. package/dist/kernel/redaction.js +1 -0
  800. package/dist/kernel/unknown-values.d.ts +6 -0
  801. package/dist/kernel/unknown-values.js +1 -0
  802. package/dist/process/capture-output.d.ts +7 -0
  803. package/dist/process/capture-output.js +1 -0
  804. package/dist/process/command-shell.d.ts +1 -0
  805. package/dist/process/command-shell.js +1 -0
  806. package/dist/process/environment-overlay.d.ts +17 -0
  807. package/dist/process/environment-overlay.js +1 -0
  808. package/dist/process/environment.d.ts +33 -0
  809. package/dist/process/environment.js +1 -0
  810. package/dist/process/files/contained-path.d.ts +8 -0
  811. package/dist/process/files/contained-path.js +1 -0
  812. package/dist/process/files/directory-status.d.ts +14 -0
  813. package/dist/process/files/directory-status.js +1 -0
  814. package/dist/process/files/dotenv.d.ts +2 -0
  815. package/dist/process/files/dotenv.js +1 -0
  816. package/dist/process/files/file-snapshot.d.ts +34 -0
  817. package/dist/process/files/file-snapshot.js +1 -0
  818. package/dist/process/files/json-file.d.ts +11 -0
  819. package/dist/process/files/json-file.js +1 -0
  820. package/dist/process/files/paths.d.ts +1 -0
  821. package/dist/process/files/paths.js +1 -0
  822. package/dist/process/files/temp-dir.d.ts +11 -0
  823. package/dist/process/files/temp-dir.js +1 -0
  824. package/dist/process/host/metadata.d.ts +6 -0
  825. package/dist/process/host/metadata.js +1 -0
  826. package/dist/process/host/platform.d.ts +57 -0
  827. package/dist/process/host/platform.js +1 -0
  828. package/dist/process/host-command.d.ts +4 -0
  829. package/dist/process/host-command.js +3 -0
  830. package/dist/process/host-inspection-command.d.ts +13 -0
  831. package/dist/process/host-inspection-command.js +1 -0
  832. package/dist/process/host-process.d.ts +14 -0
  833. package/dist/process/host-process.js +1 -0
  834. package/dist/process/index.d.ts +9 -0
  835. package/dist/process/index.js +1 -0
  836. package/dist/process/lifecycle-fence.d.ts +11 -0
  837. package/dist/process/lifecycle-fence.js +1 -0
  838. package/dist/process/locks.d.ts +28 -0
  839. package/dist/process/locks.js +4 -0
  840. package/dist/process/process-contracts.d.ts +70 -0
  841. package/dist/process/process-contracts.js +1 -0
  842. package/dist/process/process-group.d.ts +12 -0
  843. package/dist/process/process-group.js +1 -0
  844. package/dist/process/process-identity.d.ts +27 -0
  845. package/dist/process/process-identity.js +1 -0
  846. package/dist/process/process-limits.d.ts +6 -0
  847. package/dist/process/process-limits.js +1 -0
  848. package/dist/process/process.d.ts +11 -0
  849. package/dist/process/process.js +1 -0
  850. package/dist/process/readiness.d.ts +37 -0
  851. package/dist/process/readiness.js +1 -0
  852. package/dist/process/recovery.d.ts +3 -0
  853. package/dist/process/recovery.js +1 -0
  854. package/dist/process/runs/manifest.d.ts +85 -0
  855. package/dist/process/runs/manifest.js +1 -0
  856. package/dist/process/runs/ownership.d.ts +11 -0
  857. package/dist/process/runs/ownership.js +1 -0
  858. package/dist/process/runs/product-state.d.ts +2 -0
  859. package/dist/process/runs/product-state.js +1 -0
  860. package/dist/process/runs/schema.d.ts +3 -0
  861. package/dist/process/runs/schema.js +1 -0
  862. package/dist/process/runs/stop.d.ts +19 -0
  863. package/dist/process/runs/stop.js +1 -0
  864. package/dist/process/runtime-socket.d.ts +4 -0
  865. package/dist/process/runtime-socket.js +1 -0
  866. package/dist/process/service-processes.d.ts +13 -0
  867. package/dist/process/service-processes.js +1 -0
  868. package/dist/process/shutdown.d.ts +10 -0
  869. package/dist/process/shutdown.js +1 -0
  870. package/dist/process/windows-cli-owner.d.ts +2 -0
  871. package/dist/process/windows-cli-owner.js +3 -0
  872. package/dist/process/windows-native.d.ts +6 -0
  873. package/dist/process/windows-native.js +1 -0
  874. package/dist/process/windows-process-identity.d.ts +4 -0
  875. package/dist/process/windows-process-identity.js +1 -0
  876. package/dist/repo/ci-environment.d.ts +7 -0
  877. package/dist/repo/ci-environment.js +1 -0
  878. package/dist/repo/fingerprint-policy.d.ts +15 -0
  879. package/dist/repo/fingerprint-policy.js +1 -0
  880. package/dist/repo/git-path.d.ts +2 -0
  881. package/dist/repo/git-path.js +1 -0
  882. package/dist/repo/managed-git.d.ts +10 -0
  883. package/dist/repo/managed-git.js +1 -0
  884. package/dist/repo/metadata.d.ts +3 -0
  885. package/dist/repo/metadata.js +1 -0
  886. package/dist/repo/physical-tree.d.ts +37 -0
  887. package/dist/repo/physical-tree.js +1 -0
  888. package/dist/repo/remote.d.ts +6 -0
  889. package/dist/repo/remote.js +1 -0
  890. package/dist/repo/state.d.ts +25 -0
  891. package/dist/repo/state.js +5 -0
  892. package/dist/steps/build-config.d.ts +35 -0
  893. package/dist/steps/build-config.js +1 -0
  894. package/dist/steps/configured-step-testkit-modules.d.ts +19 -0
  895. package/dist/steps/configured-step-testkit-modules.js +1 -0
  896. package/dist/steps/configured-steps.d.ts +51 -0
  897. package/dist/steps/configured-steps.js +1 -0
  898. package/dist/steps/environment.d.ts +78 -0
  899. package/dist/steps/environment.js +1 -0
  900. package/dist/steps/index.d.ts +2 -0
  901. package/dist/steps/index.js +1 -0
  902. package/dist/steps/module-runner.d.ts +1 -0
  903. package/dist/steps/module-runner.js +1 -0
  904. package/dist/steps/run.d.ts +36 -0
  905. package/dist/steps/run.js +3 -0
  906. package/dist/toolchains/archive.d.ts +53 -0
  907. package/dist/toolchains/archive.js +1 -0
  908. package/dist/toolchains/esbuild.d.ts +9 -0
  909. package/dist/toolchains/esbuild.js +1 -0
  910. package/dist/toolchains/host-node-support.d.ts +3 -0
  911. package/dist/toolchains/host-node-support.js +1 -0
  912. package/dist/toolchains/index.d.ts +114 -0
  913. package/dist/toolchains/index.js +4 -0
  914. package/dist/toolchains/managed-node-releases.d.ts +28 -0
  915. package/dist/toolchains/managed-node-releases.js +1 -0
  916. package/dist/toolchains/node-cache.d.ts +20 -0
  917. package/dist/toolchains/node-cache.js +1 -0
  918. package/dist/toolchains/node-integrity.d.ts +16 -0
  919. package/dist/toolchains/node-integrity.js +1 -0
  920. package/dist/toolchains/node-provisioning.d.ts +29 -0
  921. package/dist/toolchains/node-provisioning.js +2 -0
  922. package/dist/toolchains/semver.d.ts +13 -0
  923. package/dist/toolchains/semver.js +1 -0
  924. package/dist/toolchains/shared-operation.d.ts +11 -0
  925. package/dist/toolchains/shared-operation.js +1 -0
  926. package/dist/toolchains/timeouts.d.ts +1 -0
  927. package/dist/toolchains/timeouts.js +1 -0
  928. package/dist/toolchains/vitest/index.d.ts +13 -0
  929. package/dist/toolchains/vitest/index.js +1 -0
  930. package/docs/cloud-control.md +105 -0
  931. package/docs/engine-architecture.md +631 -0
  932. package/docs/test-types.md +120 -0
  933. package/docs/testkit-cloud-boundary.md +640 -0
  934. package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
  935. package/node_modules/@isaacs/fs-minipass/README.md +71 -0
  936. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
  937. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
  938. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
  939. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
  940. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
  941. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
  942. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
  943. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
  944. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
  945. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
  946. package/node_modules/@isaacs/fs-minipass/package.json +72 -0
  947. package/node_modules/buffer-crc32/LICENSE +19 -0
  948. package/node_modules/buffer-crc32/README.md +55 -0
  949. package/node_modules/buffer-crc32/dist/index.cjs +306 -0
  950. package/node_modules/buffer-crc32/dist/index.d.cts +35 -0
  951. package/node_modules/buffer-crc32/dist/index.d.mts +35 -0
  952. package/node_modules/buffer-crc32/dist/index.mjs +304 -0
  953. package/node_modules/buffer-crc32/index.d.ts +35 -0
  954. package/node_modules/buffer-crc32/package.json +54 -0
  955. package/node_modules/chownr/LICENSE.md +63 -0
  956. package/node_modules/chownr/README.md +3 -0
  957. package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
  958. package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
  959. package/node_modules/chownr/dist/commonjs/index.js +93 -0
  960. package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
  961. package/node_modules/chownr/dist/commonjs/package.json +3 -0
  962. package/node_modules/chownr/dist/esm/index.d.ts +3 -0
  963. package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
  964. package/node_modules/chownr/dist/esm/index.js +85 -0
  965. package/node_modules/chownr/dist/esm/index.js.map +1 -0
  966. package/node_modules/chownr/dist/esm/package.json +3 -0
  967. package/node_modules/chownr/package.json +69 -0
  968. package/node_modules/diff/CONTRIBUTING.md +28 -0
  969. package/node_modules/diff/LICENSE +29 -0
  970. package/node_modules/diff/README.md +468 -0
  971. package/node_modules/diff/dist/diff.js +2313 -0
  972. package/node_modules/diff/dist/diff.min.js +1 -0
  973. package/node_modules/diff/eslint.config.mjs +182 -0
  974. package/node_modules/diff/libcjs/convert/dmp.d.ts +8 -0
  975. package/node_modules/diff/libcjs/convert/dmp.d.ts.map +1 -0
  976. package/node_modules/diff/libcjs/convert/dmp.js +24 -0
  977. package/node_modules/diff/libcjs/convert/xml.d.ts +6 -0
  978. package/node_modules/diff/libcjs/convert/xml.d.ts.map +1 -0
  979. package/node_modules/diff/libcjs/convert/xml.js +34 -0
  980. package/node_modules/diff/libcjs/diff/array.d.ts +19 -0
  981. package/node_modules/diff/libcjs/diff/array.d.ts.map +1 -0
  982. package/node_modules/diff/libcjs/diff/array.js +23 -0
  983. package/node_modules/diff/libcjs/diff/base.d.ts +20 -0
  984. package/node_modules/diff/libcjs/diff/base.d.ts.map +1 -0
  985. package/node_modules/diff/libcjs/diff/base.js +256 -0
  986. package/node_modules/diff/libcjs/diff/character.d.ts +19 -0
  987. package/node_modules/diff/libcjs/diff/character.d.ts.map +1 -0
  988. package/node_modules/diff/libcjs/diff/character.js +14 -0
  989. package/node_modules/diff/libcjs/diff/css.d.ts +18 -0
  990. package/node_modules/diff/libcjs/diff/css.d.ts.map +1 -0
  991. package/node_modules/diff/libcjs/diff/css.js +17 -0
  992. package/node_modules/diff/libcjs/diff/json.d.ts +24 -0
  993. package/node_modules/diff/libcjs/diff/json.d.ts.map +1 -0
  994. package/node_modules/diff/libcjs/diff/json.js +86 -0
  995. package/node_modules/diff/libcjs/diff/line.d.ts +24 -0
  996. package/node_modules/diff/libcjs/diff/line.d.ts.map +1 -0
  997. package/node_modules/diff/libcjs/diff/line.js +74 -0
  998. package/node_modules/diff/libcjs/diff/sentence.d.ts +21 -0
  999. package/node_modules/diff/libcjs/diff/sentence.d.ts.map +1 -0
  1000. package/node_modules/diff/libcjs/diff/sentence.js +50 -0
  1001. package/node_modules/diff/libcjs/diff/word.d.ts +35 -0
  1002. package/node_modules/diff/libcjs/diff/word.d.ts.map +1 -0
  1003. package/node_modules/diff/libcjs/diff/word.js +289 -0
  1004. package/node_modules/diff/libcjs/index.d.ts +20 -0
  1005. package/node_modules/diff/libcjs/index.d.ts.map +1 -0
  1006. package/node_modules/diff/libcjs/index.js +67 -0
  1007. package/node_modules/diff/libcjs/package.json +1 -0
  1008. package/node_modules/diff/libcjs/patch/apply.d.ts +62 -0
  1009. package/node_modules/diff/libcjs/patch/apply.d.ts.map +1 -0
  1010. package/node_modules/diff/libcjs/patch/apply.js +264 -0
  1011. package/node_modules/diff/libcjs/patch/create.d.ts +131 -0
  1012. package/node_modules/diff/libcjs/patch/create.d.ts.map +1 -0
  1013. package/node_modules/diff/libcjs/patch/create.js +364 -0
  1014. package/node_modules/diff/libcjs/patch/line-endings.d.ts +17 -0
  1015. package/node_modules/diff/libcjs/patch/line-endings.d.ts.map +1 -0
  1016. package/node_modules/diff/libcjs/patch/line-endings.js +50 -0
  1017. package/node_modules/diff/libcjs/patch/parse.d.ts +16 -0
  1018. package/node_modules/diff/libcjs/patch/parse.d.ts.map +1 -0
  1019. package/node_modules/diff/libcjs/patch/parse.js +515 -0
  1020. package/node_modules/diff/libcjs/patch/reverse.d.ts +22 -0
  1021. package/node_modules/diff/libcjs/patch/reverse.d.ts.map +1 -0
  1022. package/node_modules/diff/libcjs/patch/reverse.js +63 -0
  1023. package/node_modules/diff/libcjs/types.d.ts +260 -0
  1024. package/node_modules/diff/libcjs/types.d.ts.map +1 -0
  1025. package/node_modules/diff/libcjs/types.js +2 -0
  1026. package/node_modules/diff/libcjs/util/array.d.ts +3 -0
  1027. package/node_modules/diff/libcjs/util/array.d.ts.map +1 -0
  1028. package/node_modules/diff/libcjs/util/array.js +21 -0
  1029. package/node_modules/diff/libcjs/util/distance-iterator.d.ts +2 -0
  1030. package/node_modules/diff/libcjs/util/distance-iterator.d.ts.map +1 -0
  1031. package/node_modules/diff/libcjs/util/distance-iterator.js +40 -0
  1032. package/node_modules/diff/libcjs/util/params.d.ts +4 -0
  1033. package/node_modules/diff/libcjs/util/params.d.ts.map +1 -0
  1034. package/node_modules/diff/libcjs/util/params.js +17 -0
  1035. package/node_modules/diff/libcjs/util/string.d.ts +30 -0
  1036. package/node_modules/diff/libcjs/util/string.d.ts.map +1 -0
  1037. package/node_modules/diff/libcjs/util/string.js +199 -0
  1038. package/node_modules/diff/libesm/convert/dmp.d.ts +8 -0
  1039. package/node_modules/diff/libesm/convert/dmp.d.ts.map +1 -0
  1040. package/node_modules/diff/libesm/convert/dmp.js +21 -0
  1041. package/node_modules/diff/libesm/convert/xml.d.ts +6 -0
  1042. package/node_modules/diff/libesm/convert/xml.d.ts.map +1 -0
  1043. package/node_modules/diff/libesm/convert/xml.js +31 -0
  1044. package/node_modules/diff/libesm/diff/array.d.ts +19 -0
  1045. package/node_modules/diff/libesm/diff/array.d.ts.map +1 -0
  1046. package/node_modules/diff/libesm/diff/array.js +16 -0
  1047. package/node_modules/diff/libesm/diff/base.d.ts +20 -0
  1048. package/node_modules/diff/libesm/diff/base.d.ts.map +1 -0
  1049. package/node_modules/diff/libesm/diff/base.js +253 -0
  1050. package/node_modules/diff/libesm/diff/character.d.ts +19 -0
  1051. package/node_modules/diff/libesm/diff/character.d.ts.map +1 -0
  1052. package/node_modules/diff/libesm/diff/character.js +7 -0
  1053. package/node_modules/diff/libesm/diff/css.d.ts +18 -0
  1054. package/node_modules/diff/libesm/diff/css.d.ts.map +1 -0
  1055. package/node_modules/diff/libesm/diff/css.js +10 -0
  1056. package/node_modules/diff/libesm/diff/json.d.ts +24 -0
  1057. package/node_modules/diff/libesm/diff/json.d.ts.map +1 -0
  1058. package/node_modules/diff/libesm/diff/json.js +78 -0
  1059. package/node_modules/diff/libesm/diff/line.d.ts +24 -0
  1060. package/node_modules/diff/libesm/diff/line.d.ts.map +1 -0
  1061. package/node_modules/diff/libesm/diff/line.js +65 -0
  1062. package/node_modules/diff/libesm/diff/sentence.d.ts +21 -0
  1063. package/node_modules/diff/libesm/diff/sentence.d.ts.map +1 -0
  1064. package/node_modules/diff/libesm/diff/sentence.js +43 -0
  1065. package/node_modules/diff/libesm/diff/word.d.ts +35 -0
  1066. package/node_modules/diff/libesm/diff/word.d.ts.map +1 -0
  1067. package/node_modules/diff/libesm/diff/word.js +281 -0
  1068. package/node_modules/diff/libesm/index.d.ts +20 -0
  1069. package/node_modules/diff/libesm/index.d.ts.map +1 -0
  1070. package/node_modules/diff/libesm/index.js +30 -0
  1071. package/node_modules/diff/libesm/package.json +1 -0
  1072. package/node_modules/diff/libesm/patch/apply.d.ts +62 -0
  1073. package/node_modules/diff/libesm/patch/apply.d.ts.map +1 -0
  1074. package/node_modules/diff/libesm/patch/apply.js +257 -0
  1075. package/node_modules/diff/libesm/patch/create.d.ts +131 -0
  1076. package/node_modules/diff/libesm/patch/create.d.ts.map +1 -0
  1077. package/node_modules/diff/libesm/patch/create.js +357 -0
  1078. package/node_modules/diff/libesm/patch/line-endings.d.ts +17 -0
  1079. package/node_modules/diff/libesm/patch/line-endings.d.ts.map +1 -0
  1080. package/node_modules/diff/libesm/patch/line-endings.js +44 -0
  1081. package/node_modules/diff/libesm/patch/parse.d.ts +16 -0
  1082. package/node_modules/diff/libesm/patch/parse.d.ts.map +1 -0
  1083. package/node_modules/diff/libesm/patch/parse.js +512 -0
  1084. package/node_modules/diff/libesm/patch/reverse.d.ts +22 -0
  1085. package/node_modules/diff/libesm/patch/reverse.d.ts.map +1 -0
  1086. package/node_modules/diff/libesm/patch/reverse.js +60 -0
  1087. package/node_modules/diff/libesm/types.d.ts +260 -0
  1088. package/node_modules/diff/libesm/types.d.ts.map +1 -0
  1089. package/node_modules/diff/libesm/types.js +1 -0
  1090. package/node_modules/diff/libesm/util/array.d.ts +3 -0
  1091. package/node_modules/diff/libesm/util/array.d.ts.map +1 -0
  1092. package/node_modules/diff/libesm/util/array.js +17 -0
  1093. package/node_modules/diff/libesm/util/distance-iterator.d.ts +2 -0
  1094. package/node_modules/diff/libesm/util/distance-iterator.d.ts.map +1 -0
  1095. package/node_modules/diff/libesm/util/distance-iterator.js +37 -0
  1096. package/node_modules/diff/libesm/util/params.d.ts +4 -0
  1097. package/node_modules/diff/libesm/util/params.d.ts.map +1 -0
  1098. package/node_modules/diff/libesm/util/params.js +14 -0
  1099. package/node_modules/diff/libesm/util/string.d.ts +30 -0
  1100. package/node_modules/diff/libesm/util/string.d.ts.map +1 -0
  1101. package/node_modules/diff/libesm/util/string.js +184 -0
  1102. package/node_modules/diff/package.json +130 -0
  1103. package/node_modules/diff/release-notes.md +474 -0
  1104. package/node_modules/minipass/LICENSE.md +55 -0
  1105. package/node_modules/minipass/README.md +825 -0
  1106. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  1107. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  1108. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  1109. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  1110. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  1111. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  1112. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  1113. package/node_modules/minipass/dist/esm/index.js +1020 -0
  1114. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  1115. package/node_modules/minipass/dist/esm/package.json +3 -0
  1116. package/node_modules/minipass/package.json +77 -0
  1117. package/node_modules/minizlib/LICENSE +26 -0
  1118. package/node_modules/minizlib/README.md +64 -0
  1119. package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
  1120. package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
  1121. package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  1122. package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
  1123. package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
  1124. package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
  1125. package/node_modules/minizlib/dist/commonjs/index.js +416 -0
  1126. package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
  1127. package/node_modules/minizlib/dist/commonjs/package.json +3 -0
  1128. package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
  1129. package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
  1130. package/node_modules/minizlib/dist/esm/constants.js +117 -0
  1131. package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
  1132. package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
  1133. package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
  1134. package/node_modules/minizlib/dist/esm/index.js +363 -0
  1135. package/node_modules/minizlib/dist/esm/index.js.map +1 -0
  1136. package/node_modules/minizlib/dist/esm/package.json +3 -0
  1137. package/node_modules/minizlib/package.json +80 -0
  1138. package/node_modules/pend/LICENSE +23 -0
  1139. package/node_modules/pend/README.md +41 -0
  1140. package/node_modules/pend/index.js +55 -0
  1141. package/node_modules/pend/package.json +18 -0
  1142. package/node_modules/pend/test.js +137 -0
  1143. package/node_modules/tar/LICENSE.md +55 -0
  1144. package/node_modules/tar/README.md +1233 -0
  1145. package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
  1146. package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
  1147. package/node_modules/tar/dist/commonjs/create.js +82 -0
  1148. package/node_modules/tar/dist/commonjs/create.js.map +1 -0
  1149. package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
  1150. package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
  1151. package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
  1152. package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
  1153. package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
  1154. package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
  1155. package/node_modules/tar/dist/commonjs/extract.js +88 -0
  1156. package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
  1157. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
  1158. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
  1159. package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
  1160. package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
  1161. package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
  1162. package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
  1163. package/node_modules/tar/dist/commonjs/header.js +348 -0
  1164. package/node_modules/tar/dist/commonjs/header.js.map +1 -0
  1165. package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
  1166. package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
  1167. package/node_modules/tar/dist/commonjs/index.js +64 -0
  1168. package/node_modules/tar/dist/commonjs/index.js.map +1 -0
  1169. package/node_modules/tar/dist/commonjs/index.min.js +4 -0
  1170. package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
  1171. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
  1172. package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
  1173. package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
  1174. package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
  1175. package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
  1176. package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
  1177. package/node_modules/tar/dist/commonjs/list.js +153 -0
  1178. package/node_modules/tar/dist/commonjs/list.js.map +1 -0
  1179. package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
  1180. package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
  1181. package/node_modules/tar/dist/commonjs/make-command.js +52 -0
  1182. package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
  1183. package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
  1184. package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
  1185. package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
  1186. package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
  1187. package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
  1188. package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
  1189. package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
  1190. package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
  1191. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
  1192. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
  1193. package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
  1194. package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
  1195. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
  1196. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
  1197. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
  1198. package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
  1199. package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
  1200. package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
  1201. package/node_modules/tar/dist/commonjs/options.js +66 -0
  1202. package/node_modules/tar/dist/commonjs/options.js.map +1 -0
  1203. package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
  1204. package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
  1205. package/node_modules/tar/dist/commonjs/pack.js +544 -0
  1206. package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
  1207. package/node_modules/tar/dist/commonjs/package.json +3 -0
  1208. package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
  1209. package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
  1210. package/node_modules/tar/dist/commonjs/parse.js +655 -0
  1211. package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
  1212. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
  1213. package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
  1214. package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
  1215. package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
  1216. package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
  1217. package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
  1218. package/node_modules/tar/dist/commonjs/pax.js +182 -0
  1219. package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
  1220. package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
  1221. package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
  1222. package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
  1223. package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
  1224. package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
  1225. package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
  1226. package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
  1227. package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
  1228. package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
  1229. package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
  1230. package/node_modules/tar/dist/commonjs/replace.js +227 -0
  1231. package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
  1232. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
  1233. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
  1234. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
  1235. package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
  1236. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
  1237. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
  1238. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
  1239. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
  1240. package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
  1241. package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
  1242. package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
  1243. package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
  1244. package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
  1245. package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
  1246. package/node_modules/tar/dist/commonjs/types.js +70 -0
  1247. package/node_modules/tar/dist/commonjs/types.js.map +1 -0
  1248. package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
  1249. package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
  1250. package/node_modules/tar/dist/commonjs/unpack.js +932 -0
  1251. package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
  1252. package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
  1253. package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
  1254. package/node_modules/tar/dist/commonjs/update.js +33 -0
  1255. package/node_modules/tar/dist/commonjs/update.js.map +1 -0
  1256. package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
  1257. package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
  1258. package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
  1259. package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
  1260. package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
  1261. package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
  1262. package/node_modules/tar/dist/commonjs/winchars.js +14 -0
  1263. package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
  1264. package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
  1265. package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
  1266. package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
  1267. package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
  1268. package/node_modules/tar/dist/esm/create.d.ts +3 -0
  1269. package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
  1270. package/node_modules/tar/dist/esm/create.js +76 -0
  1271. package/node_modules/tar/dist/esm/create.js.map +1 -0
  1272. package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
  1273. package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
  1274. package/node_modules/tar/dist/esm/cwd-error.js +14 -0
  1275. package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
  1276. package/node_modules/tar/dist/esm/extract.d.ts +3 -0
  1277. package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
  1278. package/node_modules/tar/dist/esm/extract.js +49 -0
  1279. package/node_modules/tar/dist/esm/extract.js.map +1 -0
  1280. package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
  1281. package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
  1282. package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
  1283. package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
  1284. package/node_modules/tar/dist/esm/header.d.ts +53 -0
  1285. package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
  1286. package/node_modules/tar/dist/esm/header.js +311 -0
  1287. package/node_modules/tar/dist/esm/header.js.map +1 -0
  1288. package/node_modules/tar/dist/esm/index.d.ts +20 -0
  1289. package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
  1290. package/node_modules/tar/dist/esm/index.js +20 -0
  1291. package/node_modules/tar/dist/esm/index.js.map +1 -0
  1292. package/node_modules/tar/dist/esm/index.min.js +4 -0
  1293. package/node_modules/tar/dist/esm/index.min.js.map +7 -0
  1294. package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
  1295. package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
  1296. package/node_modules/tar/dist/esm/large-numbers.js +94 -0
  1297. package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
  1298. package/node_modules/tar/dist/esm/list.d.ts +7 -0
  1299. package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
  1300. package/node_modules/tar/dist/esm/list.js +113 -0
  1301. package/node_modules/tar/dist/esm/list.js.map +1 -0
  1302. package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
  1303. package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
  1304. package/node_modules/tar/dist/esm/make-command.js +48 -0
  1305. package/node_modules/tar/dist/esm/make-command.js.map +1 -0
  1306. package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
  1307. package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
  1308. package/node_modules/tar/dist/esm/mkdir.js +179 -0
  1309. package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
  1310. package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
  1311. package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
  1312. package/node_modules/tar/dist/esm/mode-fix.js +25 -0
  1313. package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
  1314. package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
  1315. package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
  1316. package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
  1317. package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
  1318. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
  1319. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
  1320. package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
  1321. package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
  1322. package/node_modules/tar/dist/esm/options.d.ts +604 -0
  1323. package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
  1324. package/node_modules/tar/dist/esm/options.js +54 -0
  1325. package/node_modules/tar/dist/esm/options.js.map +1 -0
  1326. package/node_modules/tar/dist/esm/pack.d.ts +105 -0
  1327. package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
  1328. package/node_modules/tar/dist/esm/pack.js +502 -0
  1329. package/node_modules/tar/dist/esm/pack.js.map +1 -0
  1330. package/node_modules/tar/dist/esm/package.json +3 -0
  1331. package/node_modules/tar/dist/esm/parse.d.ts +92 -0
  1332. package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
  1333. package/node_modules/tar/dist/esm/parse.js +651 -0
  1334. package/node_modules/tar/dist/esm/parse.js.map +1 -0
  1335. package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
  1336. package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
  1337. package/node_modules/tar/dist/esm/path-reservations.js +166 -0
  1338. package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
  1339. package/node_modules/tar/dist/esm/pax.d.ts +26 -0
  1340. package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
  1341. package/node_modules/tar/dist/esm/pax.js +178 -0
  1342. package/node_modules/tar/dist/esm/pax.js.map +1 -0
  1343. package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
  1344. package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
  1345. package/node_modules/tar/dist/esm/process-umask.js +3 -0
  1346. package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
  1347. package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
  1348. package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
  1349. package/node_modules/tar/dist/esm/read-entry.js +132 -0
  1350. package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
  1351. package/node_modules/tar/dist/esm/replace.d.ts +2 -0
  1352. package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
  1353. package/node_modules/tar/dist/esm/replace.js +221 -0
  1354. package/node_modules/tar/dist/esm/replace.js.map +1 -0
  1355. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
  1356. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
  1357. package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
  1358. package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
  1359. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
  1360. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
  1361. package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
  1362. package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
  1363. package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
  1364. package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
  1365. package/node_modules/tar/dist/esm/symlink-error.js +15 -0
  1366. package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
  1367. package/node_modules/tar/dist/esm/types.d.ts +16 -0
  1368. package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
  1369. package/node_modules/tar/dist/esm/types.js +65 -0
  1370. package/node_modules/tar/dist/esm/types.js.map +1 -0
  1371. package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
  1372. package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
  1373. package/node_modules/tar/dist/esm/unpack.js +891 -0
  1374. package/node_modules/tar/dist/esm/unpack.js.map +1 -0
  1375. package/node_modules/tar/dist/esm/update.d.ts +2 -0
  1376. package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
  1377. package/node_modules/tar/dist/esm/update.js +30 -0
  1378. package/node_modules/tar/dist/esm/update.js.map +1 -0
  1379. package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
  1380. package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
  1381. package/node_modules/tar/dist/esm/warn-method.js +27 -0
  1382. package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
  1383. package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
  1384. package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
  1385. package/node_modules/tar/dist/esm/winchars.js +9 -0
  1386. package/node_modules/tar/dist/esm/winchars.js.map +1 -0
  1387. package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
  1388. package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
  1389. package/node_modules/tar/dist/esm/write-entry.js +656 -0
  1390. package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
  1391. package/node_modules/tar/package.json +298 -0
  1392. package/node_modules/typescript/LICENSE.txt +55 -0
  1393. package/node_modules/typescript/README.md +50 -0
  1394. package/node_modules/typescript/SECURITY.md +41 -0
  1395. package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  1396. package/node_modules/typescript/bin/tsc +2 -0
  1397. package/node_modules/typescript/bin/tsserver +2 -0
  1398. package/node_modules/typescript/lib/_tsc.js +133818 -0
  1399. package/node_modules/typescript/lib/_tsserver.js +659 -0
  1400. package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  1401. package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  1402. package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  1403. package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  1404. package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  1405. package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  1406. package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  1407. package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  1408. package/node_modules/typescript/lib/lib.d.ts +22 -0
  1409. package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
  1410. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  1411. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
  1412. package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
  1413. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
  1414. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  1415. package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  1416. package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  1417. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  1418. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
  1419. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  1420. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  1421. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  1422. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  1423. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  1424. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  1425. package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  1426. package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  1427. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  1428. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  1429. package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
  1430. package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  1431. package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  1432. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  1433. package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  1434. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  1435. package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  1436. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  1437. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  1438. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
  1439. package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  1440. package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  1441. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  1442. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  1443. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  1444. package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  1445. package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  1446. package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  1447. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  1448. package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  1449. package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  1450. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  1451. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
  1452. package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  1453. package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  1454. package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  1455. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  1456. package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  1457. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  1458. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
  1459. package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
  1460. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  1461. package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  1462. package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  1463. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  1464. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  1465. package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  1466. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
  1467. package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  1468. package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
  1469. package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
  1470. package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  1471. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
  1472. package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  1473. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  1474. package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  1475. package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  1476. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  1477. package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  1478. package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  1479. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  1480. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  1481. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  1482. package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  1483. package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  1484. package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
  1485. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
  1486. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
  1487. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
  1488. package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
  1489. package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
  1490. package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  1491. package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  1492. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
  1493. package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
  1494. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  1495. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
  1496. package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
  1497. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
  1498. package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  1499. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  1500. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
  1501. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  1502. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
  1503. package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  1504. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
  1505. package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
  1506. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  1507. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
  1508. package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  1509. package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  1510. package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  1511. package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  1512. package/node_modules/typescript/lib/tsc.js +8 -0
  1513. package/node_modules/typescript/lib/tsserver.js +8 -0
  1514. package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  1515. package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  1516. package/node_modules/typescript/lib/typesMap.json +497 -0
  1517. package/node_modules/typescript/lib/typescript.d.ts +11437 -0
  1518. package/node_modules/typescript/lib/typescript.js +200276 -0
  1519. package/node_modules/typescript/lib/typingsInstaller.js +8 -0
  1520. package/node_modules/typescript/lib/watchGuard.js +53 -0
  1521. package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  1522. package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  1523. package/node_modules/typescript/package.json +120 -0
  1524. package/node_modules/yallist/LICENSE.md +63 -0
  1525. package/node_modules/yallist/README.md +205 -0
  1526. package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
  1527. package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
  1528. package/node_modules/yallist/dist/commonjs/index.js +384 -0
  1529. package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
  1530. package/node_modules/yallist/dist/commonjs/package.json +3 -0
  1531. package/node_modules/yallist/dist/esm/index.d.ts +39 -0
  1532. package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
  1533. package/node_modules/yallist/dist/esm/index.js +379 -0
  1534. package/node_modules/yallist/dist/esm/index.js.map +1 -0
  1535. package/node_modules/yallist/dist/esm/package.json +3 -0
  1536. package/node_modules/yallist/package.json +68 -0
  1537. package/node_modules/yauzl/LICENSE +21 -0
  1538. package/node_modules/yauzl/README.md +1015 -0
  1539. package/node_modules/yauzl/crc32.js +45 -0
  1540. package/node_modules/yauzl/fd-slicer.js +188 -0
  1541. package/node_modules/yauzl/index.js +1096 -0
  1542. package/node_modules/yauzl/package.json +40 -0
  1543. package/node_modules/yazl/LICENSE +21 -0
  1544. package/node_modules/yazl/README.md +457 -0
  1545. package/node_modules/yazl/index.js +826 -0
  1546. package/node_modules/yazl/package.json +34 -0
  1547. package/package.json +163 -0
  1548. package/testkit-config-schema.md +718 -0
@@ -0,0 +1,27 @@
1
+ interface BoundedProcessIdentityQuery {
2
+ readonly args: readonly string[];
3
+ readonly environment: Readonly<Record<string, string>>;
4
+ readonly executable: string;
5
+ readonly timeoutMs: number;
6
+ readonly windowsHide: boolean;
7
+ }
8
+ export type ProcessCreationIdentityObservation = "different" | "matches" | "unknown";
9
+ export interface ProcessCreationIdentityObservationOptions {
10
+ captureIdentity?(pid: number): string | null;
11
+ inspectLiveness?(pid: number): "absent" | "alive" | "unknown";
12
+ }
13
+ export declare function captureProcessCreationIdentity(pid: unknown): string | null;
14
+ export declare function processCreationIdentityMatches(pid: unknown, expectedIdentity: unknown): boolean;
15
+ export declare function observeProcessCreationIdentity(pid: unknown, expectedIdentity: unknown, options?: Readonly<ProcessCreationIdentityObservationOptions>): ProcessCreationIdentityObservation;
16
+ export declare function parseWindowsProcessCreationIdentity(identity: string): string | null;
17
+ export declare function parseLinuxProcessCreationIdentity(pid: number, stat: string): string;
18
+ /**
19
+ * Parses the C-locale `ps -o pid=,lstart=` representation used by both the
20
+ * single-process identity boundary and the bounded Darwin process-table
21
+ * snapshot. Whitespace is canonicalized so the two producers cannot drift.
22
+ */
23
+ export declare function parseDarwinProcessCreationIdentity(pid: number, output: string): string;
24
+ export declare function windowsProcessCreationIdentityScript(pid: number): string;
25
+ export declare function runBoundedProcessIdentityQuery(query: Readonly<BoundedProcessIdentityQuery>): string;
26
+ export declare function inspectProcessLiveness(pid: number): "absent" | "alive" | "unknown";
27
+ export {};
@@ -0,0 +1 @@
1
+ import{execFileSync as c}from"node:child_process";import a from"node:fs";import{DARWIN_PS_EXECUTABLE as d,HOST_POSIX_INSPECTION_ENVIRONMENT as l,requireWindowsHostPowerShellCommand as f}from"./host-inspection-command.js";import{formatWindowsKernelProcessIdentity as m,parseWindowsKernelProcessIdentity as p}from"./windows-process-identity.js";const w=3e3,I=16*1024,S=8e3;export function captureProcessCreationIdentity(e){const t=Number(e);if(!Number.isSafeInteger(t)||t<=0)return null;try{if(process.platform==="linux")return E(t);if(process.platform==="darwin")return T(t);if(process.platform==="win32")return P(t)}catch{return null}return null}export function processCreationIdentityMatches(e,t){return observeProcessCreationIdentity(e,t)==="matches"}export function observeProcessCreationIdentity(e,t,n={}){const r=Number(e);if(!Number.isSafeInteger(r)||r<=0||typeof t!="string"||t.length===0)return"unknown";const i=(n.captureIdentity??captureProcessCreationIdentity)(r);return i!==null?i===t?"matches":"different":(n.inspectLiveness??inspectProcessLiveness)(r)==="absent"?"different":"unknown"}export function parseWindowsProcessCreationIdentity(e){return p(e)}function E(e){return parseLinuxProcessCreationIdentity(e,a.readFileSync(`/proc/${e.toString()}/stat`,"utf8"))}export function parseLinuxProcessCreationIdentity(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error("Linux process stat identity requires a positive pid");const n=t.trim(),r=n.lastIndexOf(")"),i=n.indexOf(" ");if(r<0||i<1||Number(n.slice(0,i))!==e)throw new Error("Linux process stat identity is malformed");const o=n.slice(r+1).trim().split(/\s+/u)[19];if(!/^\d+$/u.test(o))throw new Error("Linux process stat start time is malformed");return`linux-proc-start:${o}`}function T(e){const t=runBoundedProcessIdentityQuery({args:["-p",e.toString(),"-o","pid=,lstart="],environment:l,executable:d,timeoutMs:w,windowsHide:!1});return parseDarwinProcessCreationIdentity(e,t)}export function parseDarwinProcessCreationIdentity(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new Error("Darwin process start identity requires a positive pid");const n=t.trim().replace(/\s+/gu," "),r=/^(\d+) ((?:Sun|Mon|Tue|Wed|Thu|Fri|Sat) (?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (?:[1-9]|[12]\d|3[01]) (?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d \d{4})$/u.exec(n);if(r===null||Number(r[1])!==e)throw new Error("Darwin process start identity is malformed");return`darwin-ps-start:${r[2]}`}function P(e){const t=f(),n=windowsProcessCreationIdentityScript(e),r=runBoundedProcessIdentityQuery({args:["-NoLogo","-NoProfile","-NonInteractive","-Command",n],environment:t.environment,executable:t.executable,timeoutMs:S,windowsHide:!0});if(!/^\d+$/u.test(r))throw new Error("Windows process creation identity is malformed");return m(r)}export function windowsProcessCreationIdentityScript(e){if(!Number.isSafeInteger(e)||e<=0)throw new Error("Windows process creation identity script requires a positive pid");return`$ErrorActionPreference = "Stop"; $p = [Diagnostics.Process]::GetProcessById(${e.toString()}); try { $fileTime = [Int64]$p.StartTime.ToUniversalTime().ToFileTimeUtc(); if ($fileTime -le 0) { exit 3 }; [Console]::Write($fileTime.ToString([Globalization.CultureInfo]::InvariantCulture)) } finally { $p.Dispose() }`}export function runBoundedProcessIdentityQuery(e){if(!Number.isSafeInteger(e.timeoutMs)||e.timeoutMs<=0)throw new Error("Process identity query timeout must be a positive safe integer in milliseconds");return c(e.executable,[...e.args],{encoding:"utf8",env:e.environment,killSignal:"SIGKILL",maxBuffer:I,stdio:["ignore","pipe","ignore"],timeout:e.timeoutMs,windowsHide:e.windowsHide}).trim()}export function inspectProcessLiveness(e){try{return process.kill(e,0),"alive"}catch(t){return s(t,"ESRCH")?"absent":s(t,"EPERM")?"alive":"unknown"}}function s(e,t){return typeof e=="object"&&e!==null&&Reflect.get(e,"code")===t}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Maximum combined stdout and stderr bytes retained by supervised process
3
+ * capture. Process supervision owns this resource limit independently of any
4
+ * engine request or result protocol.
5
+ */
6
+ export declare const MAX_SUPERVISED_PROCESS_CAPTURE_BYTES: number;
@@ -0,0 +1 @@
1
+ export const MAX_SUPERVISED_PROCESS_CAPTURE_BYTES=8388608;
@@ -0,0 +1,11 @@
1
+ import { type ManagedProcessRequest, type ManagedProcessResult, type SupervisedProcessHandle, type SupervisedProcessRequest } from "./process-contracts.js";
2
+ export { type AttributedProcessLineageTerminationRequest, type ManagedProcessCancellationSignal, type ManagedProcessRequest, type ManagedProcessResult, type OwnedPosixProcessGroupTerminationRequest, type SupervisedProcessHandle, type SupervisedProcessOutputMode, type SupervisedProcessRecoveryIdentity, type SupervisedProcessReady, type SupervisedProcessRequest, } from "./process-contracts.js";
3
+ export { terminateAttributedProcessLineage, terminateOwnedPosixProcessGroup } from "./recovery.js";
4
+ export { cleanupExitedProcessGroup } from "./process-group.js";
5
+ export declare function runManagedProcess(request: Readonly<ManagedProcessRequest>): Promise<ManagedProcessResult>;
6
+ export declare class ProcessExitedBeforeReadyError extends Error {
7
+ readonly exitCode: number | null;
8
+ readonly exitSignal: NodeJS.Signals | null;
9
+ constructor(exitCode: number | null, exitSignal: NodeJS.Signals | null);
10
+ }
11
+ export declare function startSupervisedProcess(request: Readonly<SupervisedProcessRequest>): SupervisedProcessHandle;
@@ -0,0 +1 @@
1
+ import{execa as v}from"execa";import{accessSync as O}from"node:fs";import{isAbsolute as D}from"node:path";import"./process-contracts.js";import{captureProcessCreationIdentity as G,inspectProcessLiveness as _}from"./process-identity.js";import{MAX_SUPERVISED_PROCESS_CAPTURE_BYTES as B}from"./process-limits.js";export{}from"./process-contracts.js";export{terminateAttributedProcessLineage,terminateOwnedPosixProcessGroup}from"./recovery.js";import{cleanupExitedProcessGroup as E,processGroupExists as S}from"./process-group.js";import{createShutdownDeadline as R,DEFAULT_SHUTDOWN_TIMEOUT_MS as c}from"./shutdown.js";export{cleanupExitedProcessGroup}from"./process-group.js";export function runManagedProcess(e){if(C(e,!1),e.signal.aborted)return Promise.resolve(A());try{const t=y(e,"bounded-capture",{cancelSignal:e.signal,forceKillAfterDelay:c});return k(t)}catch(t){return Promise.resolve(U(t))}}export class ProcessExitedBeforeReadyError extends Error{exitCode;exitSignal;constructor(t,n){super("Process exited before becoming ready"),this.exitCode=t,this.exitSignal=n}}export function startSupervisedProcess(e){if(C(e,!0),e.signal.aborted)throw new Error(`${e.displayLabel} was cancelled before its process could start`);const t=y(e,e.outputMode,{forceKillAfterDelay:e.shutdownTimeoutMs===void 0?c:!1}),n=t.pid;if(n===void 0)throw t.kill("SIGKILL"),new Error(`${e.displayLabel} could not start ${JSON.stringify(e.executable)}`);let i=!1,m=!1,f=!1;const l=R(e.shutdownTimeoutMs??c);let a=null;const o={failure:null,cleanup:null},w=()=>{if(o.failure=null,l.deadlineAt!==null)try{a?.(l.deadlineAt)}catch(r){o.failure=p(r)}},d=r=>{f||(l.begin(r)&&w(),!i&&(i=!0,t.kill("SIGTERM"),o.cleanup=E(n,{remainingMs:l.remainingMs,initialSignalSent:!0,sendSignal:(s,u)=>{t.kill(u)}})))},g=()=>{!i&&!f&&t.nodeChildProcess.exitCode===null&&t.nodeChildProcess.signalCode===null&&(m=!0),d()};for(const r of[t.stdout,t.stderr])r.once("close",()=>{!r.readableEnded&&t.nodeChildProcess.exitCode===null&&t.nodeChildProcess.signalCode===null&&d()});e.signal.addEventListener("abort",g,{once:!0});const b=e.timeoutMs!==null?setTimeout(d,e.timeoutMs):null;t.nodeChildProcess.once("exit",()=>{process.platform!=="win32"&&S(n)&&d()});const x=new Promise((r,s)=>{t.nodeChildProcess.once("error",s),t.nodeChildProcess.once("spawn",()=>{const u=G(n);if(u===null){const L=new Error(`${e.displayLabel} process creation identity could not be captured`);_(n)==="absent"?t.nodeChildProcess.once("exit",(T,I)=>{s(new ProcessExitedBeforeReadyError(T,I))}):(t.kill("SIGKILL"),s(L));return}r({pid:n,recovery:{creationIdentity:u,processGroupId:process.platform==="win32"?null:n}})})});x.catch(()=>{});const h=(async()=>{const r=await t;process.platform!=="win32"&&S(n)&&d();const s=o.cleanup===null?null:await o.cleanup;return{...M(r,e.outputMode==="bounded-capture",s??o.failure),cancelled:m}})().finally(()=>{f=!0,e.signal.removeEventListener("abort",g),b!==null&&clearTimeout(b),o.failure===null&&(a=null)});return{completion:h,ready:x,stderr:t.stderr,stdin:t.stdin,stdout:t.stdout,pid:n,shutdownTimeoutMs:e.shutdownTimeoutMs??c,get shutdownDeadlineAt(){return l.deadlineAt},onShutdownStarted(r){return a=r,l.deadlineAt!==null&&r(l.deadlineAt),()=>{a===r&&(a=null)}},async stop(r){return o.failure!==null&&w(),d(r),{...await h,terminationError:await o.cleanup??o.failure}}}}async function k(e){const t=e.pid,n=await e,i=t===void 0?null:await E(t);return M(n,!0,i)}function y(e,t,n){return process.platform==="win32"&&D(e.executable)&&O(e.executable),v(e.executable,[...e.args],{buffer:t==="bounded-capture",maxBuffer:B/2,...n,cleanup:!0,cwd:e.cwd,encoding:"utf8",env:e.env,extendEnv:!1,killDescendants:!0,reject:!1,stderr:"pipe",stdin:"pipe",stdout:"pipe",stripFinalNewline:!1,...e.timeoutMs===null?{}:{timeout:e.timeoutMs},windowsHide:!0,windowsVerbatimArguments:e.windowsVerbatimArguments})}function M(e,t,n){const i=e.failed&&e.exitCode===void 0&&e.signal===void 0&&!e.timedOut&&!e.isCanceled&&!e.isMaxBuffer?p(e):null;return{cancelled:e.isCanceled,error:i,exitCode:e.exitCode??null,exitSignal:e.signal??null,outputLimitExceeded:e.isMaxBuffer,stderr:t?P(e.stderr):"",stdout:t?P(e.stdout):"",terminationError:n,timedOut:e.timedOut}}function P(e){return typeof e=="string"?e:e instanceof Uint8Array?Buffer.from(e).toString("utf8"):""}function C(e,t){if(e.executable.length===0)throw new Error("Managed process executable must be non-empty");if(e.cwd.length===0)throw new Error("Managed process working directory must be non-empty");if(e.displayLabel.trim().length===0)throw new Error("Managed process display label must be non-empty");if(e.timeoutMs!==null&&(!Number.isSafeInteger(e.timeoutMs)||e.timeoutMs<=0))throw new Error("Managed process timeout must be a positive safe integer");if(t&&"outputMode"in e&&!["bounded-capture","caller-drained"].includes(e.outputMode))throw new Error("Supervised process output mode must be bounded-capture or caller-drained")}function A(){return{cancelled:!0,error:null,exitCode:null,exitSignal:null,outputLimitExceeded:!1,stderr:"",stdout:"",terminationError:null,timedOut:!1}}function U(e){return{...A(),cancelled:!1,error:p(e)}}function p(e){return e instanceof Error?e:new Error(String(e))}
@@ -0,0 +1,37 @@
1
+ import type { RuntimeSocket } from "./runtime-socket.js";
2
+ export interface ReadyProcess {
3
+ completion: PromiseLike<ReadyProcessCompletion>;
4
+ }
5
+ export interface ReadyProcessCompletion {
6
+ error?: Error | null;
7
+ exitCode: null | number;
8
+ exitSignal?: NodeJS.Signals | null;
9
+ terminationError?: Error | null;
10
+ }
11
+ export interface WaitForReadyOptions {
12
+ name: string;
13
+ process: ReadyProcess;
14
+ signal?: AbortSignal | null;
15
+ timeoutMs: number;
16
+ url: string;
17
+ }
18
+ export declare const DEFAULT_READY_TIMEOUT_MS = 120000;
19
+ export declare function waitForReady({ name, url, timeoutMs, process, signal, }: Readonly<WaitForReadyOptions>): Promise<void>;
20
+ export declare function serviceCompletionError(name: string, result: Readonly<ReadyProcessCompletion>, phase?: "before becoming ready" | "unexpectedly"): Error;
21
+ export declare function isPortInUse({ host, port }: Readonly<RuntimeSocket>): Promise<boolean>;
22
+ export interface EndpointReadinessSuccessfulAttempt {
23
+ durationMs: number;
24
+ error?: undefined;
25
+ host: string;
26
+ ok: true;
27
+ port: number;
28
+ }
29
+ export interface EndpointReadinessFailedAttempt {
30
+ durationMs: number;
31
+ error: string;
32
+ host: string;
33
+ ok: false;
34
+ port: number;
35
+ }
36
+ export type EndpointReadinessAttempt = EndpointReadinessFailedAttempt | EndpointReadinessSuccessfulAttempt;
37
+ export declare function connectEndpoint(endpoint: Readonly<RuntimeSocket>, timeoutMs: number, signal?: AbortSignal): Promise<EndpointReadinessAttempt>;
@@ -0,0 +1 @@
1
+ import u from"net";import{setTimeout as w}from"node:timers/promises";export const DEFAULT_READY_TIMEOUT_MS=12e4;export async function waitForReady({name:e,url:t,timeoutMs:r,process:s,signal:o}){const c=Date.now(),a=Promise.resolve(s.completion).then(i=>({kind:"completion",result:i})),n=b(o);try{for(;Date.now()-c<r;){const i=Math.max(1,r-(Date.now()-c)),f=Promise.resolve(w(Math.min(1e3,i))).then(()=>({kind:"interval"})),l=new AbortController,m=fetch(t,{signal:l.signal}).then(p=>({kind:"endpoint",ready:p.ok}),()=>({kind:"endpoint",ready:!1}));let d=await Promise.race([a,...n?[n.promise]:[],m,f]).finally(()=>{l.abort()});if(d.kind==="endpoint"){if(d.ready)return;d=await Promise.race([a,...n?[n.promise]:[],f])}if(d.kind==="completion")throw serviceCompletionError(e,d.result);if(d.kind==="abort")throw d.reason}}finally{n?.dispose()}throw new Error(`Timed out waiting for "${e}" to become ready at ${t}`)}export function serviceCompletionError(e,t,r="before becoming ready"){const s=r==="unexpectedly"?"Local service":"Service",o=t.error||t.terminationError||null,c=t.exitCode!==null?`exit code ${t.exitCode.toString()}`:t.exitSignal?`signal ${t.exitSignal}`:"no exit status";return new Error(`${s} "${e}" exited ${r} with ${c}${o?`: ${o.message}`:""}`,o?{cause:o}:void 0)}function b(e){if(!e)return null;let t=()=>{};const r=new Promise(s=>{t=()=>{s({kind:"abort",reason:e.reason||new Error("Service startup aborted")})},e.aborted?t():e.addEventListener("abort",t,{once:!0})});return{dispose(){e.removeEventListener("abort",t)},promise:r}}export async function isPortInUse({host:e,port:t}){return new Promise((r,s)=>{const o=new u.Socket;let c=!1;const a=(n,i=null)=>{if(!c){if(c=!0,o.destroy(),i){s(i);return}r(n)}};o.setTimeout(1e3),o.once("connect",()=>{a(!0)}),o.once("timeout",()=>{a(!1)}),o.once("error",n=>{const i=y(n,"code");if(typeof i=="string"&&["ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].includes(i)){a(!1);return}a(!1,n)}),o.connect(t,e)})}function y(e,t){if(!((typeof e!="object"||e===null)&&typeof e!="function"))return Reflect.get(e,t)}export function connectEndpoint(e,t,r){return new Promise(s=>{const o=u.createConnection({host:e.host,port:e.port});let c=!1;const a=Date.now(),n=f=>{c||(c=!0,r?.removeEventListener("abort",i),o.destroy(),s({host:e.host,port:e.port,durationMs:Math.max(0,Date.now()-a),...f}))};function i(){n({ok:!1,error:"connection cancelled"})}o.setTimeout(t),o.once("connect",()=>{n({ok:!0})}),o.once("timeout",()=>{n({ok:!1,error:`connect timed out after ${t.toString()}ms`})}),o.once("error",f=>{n({ok:!1,error:f.message})}),r?.addEventListener("abort",i,{once:!0}),r?.aborted&&i()})}
@@ -0,0 +1,3 @@
1
+ import type { AttributedProcessLineageTerminationRequest, OwnedPosixProcessGroupTerminationRequest } from "./process-contracts.js";
2
+ export declare function terminateAttributedProcessLineage(request: Readonly<AttributedProcessLineageTerminationRequest>): Promise<void>;
3
+ export declare function terminateOwnedPosixProcessGroup(request: Readonly<OwnedPosixProcessGroupTerminationRequest>): Promise<void>;
@@ -0,0 +1 @@
1
+ import{execFile as c}from"node:child_process";import p from"node:path";import{promisify as d}from"node:util";import{processCreationIdentityMatches as l}from"./process-identity.js";import{cleanupExitedProcessGroup as f,processGroupExists as m}from"./process-group.js";const u=d(c);export async function terminateAttributedProcessLineage(e){if(i(e.pid),t(e.displayLabel),s(e.pid,e.expectedCreationIdentity),process.platform==="win32"){await g(e.pid,e.displayLabel);return}w(e.pid,e.signal)}export async function terminateOwnedPosixProcessGroup(e){if(process.platform==="win32")throw new Error("POSIX process-group recovery is unavailable on Windows");if(i(e.leaderPid),i(e.processGroupId),t(e.displayLabel),e.leaderPid!==e.processGroupId)throw new Error("Owned POSIX process-group leader pid must equal its process-group id");if(!Number.isFinite(e.graceMs)||!Number.isInteger(e.graceMs)||e.graceMs<0)throw new Error("Owned POSIX process-group grace must be non-negative");if(!m(e.processGroupId))return;s(e.leaderPid,e.leaderCreationIdentity);const r=await f(e.processGroupId,{graceMs:e.graceMs});if(r!==null)throw new Error(`${e.displayLabel}: ${r.message}`,{cause:r})}function i(e){if(!Number.isSafeInteger(e)||e<=0)throw new Error("Process pid must be a positive safe integer")}function t(e){if(e.trim().length===0)throw new Error("Process display label must be non-empty")}function s(e,r){if(r!==void 0&&!l(e,r))throw new Error(`Process creation identity no longer matches pid ${e.toString()}; refusing unsafe cleanup`)}function w(e,r){try{process.kill(e,r)}catch(o){if(!a(o,"ESRCH"))throw o}}async function g(e,r){const o=p.join(process.env.SystemRoot||"C:\\Windows","System32","taskkill.exe");try{await u(o,["/pid",e.toString(),"/t","/f"],{timeout:1e4,windowsHide:!0})}catch(n){if(a(n,"ESRCH"))return;throw new Error(`Could not terminate ${r} process tree`,{cause:n})}}function a(e,r){return typeof e=="object"&&e!==null&&Reflect.get(e,"code")===r}
@@ -0,0 +1,85 @@
1
+ import type { RuntimeSocket } from "../runtime-socket.js";
2
+ import { RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION, RUN_MANIFEST_SCHEMA_VERSION } from "./schema.js";
3
+ export { RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION, RUN_MANIFEST_SCHEMA_VERSION };
4
+ export interface RunManifestController {
5
+ [key: string]: null | string;
6
+ }
7
+ export interface RunManifestPort extends RuntimeSocket {
8
+ [key: string]: unknown;
9
+ }
10
+ export interface RunManifestService {
11
+ shutdownTimeoutMs?: number;
12
+ shutdownDeadlineAt?: number | null;
13
+ [key: string]: unknown;
14
+ command?: null | string;
15
+ cwd?: string;
16
+ pid: number;
17
+ processIdentity: string;
18
+ ports: RunManifestPort[];
19
+ processGroupId: null | number;
20
+ runtimeLabel?: string;
21
+ serviceName?: string;
22
+ startedAt?: string;
23
+ }
24
+ export interface RunManifest {
25
+ [key: string]: unknown;
26
+ controller?: null | RunManifestController;
27
+ finishedAt?: string;
28
+ heartbeatAt?: null | string;
29
+ incarnationId: string;
30
+ interruptReason?: null | string;
31
+ pid: number;
32
+ processIdentity: null | string;
33
+ runId: string;
34
+ runtimeDirs: string[];
35
+ schemaVersion: typeof RUN_MANIFEST_SCHEMA_VERSION;
36
+ services: RunManifestService[];
37
+ session?: null | Record<string, unknown>;
38
+ startedAt?: string;
39
+ status?: string;
40
+ }
41
+ export interface WritableRunManifest extends RunManifest {
42
+ controller: null | RunManifestController;
43
+ heartbeatAt: null | string;
44
+ interruptReason: null | string;
45
+ pid: number;
46
+ processIdentity: null | string;
47
+ runId: string;
48
+ schemaVersion: typeof RUN_MANIFEST_SCHEMA_VERSION;
49
+ startedAt: string;
50
+ status: string;
51
+ }
52
+ export interface RunMaintenanceStopRequest {
53
+ coordinatorPid: number;
54
+ coordinatorProcessIdentity: string;
55
+ reason: string;
56
+ requestedAt: string;
57
+ runId: string;
58
+ schemaVersion: typeof RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION;
59
+ targetIncarnationId: string;
60
+ targetPid: number;
61
+ targetProcessIdentity: string;
62
+ }
63
+ export declare class RunManifestCollisionError extends Error {
64
+ readonly code = "TESTKIT_RUN_MANIFEST_COLLISION";
65
+ readonly manifestPath: string;
66
+ constructor(manifestPath: string, options?: ErrorOptions);
67
+ }
68
+ export declare class RunManifestInventoryError extends Error {
69
+ readonly code = "TESTKIT_RUN_MANIFEST_INVENTORY_FAILED";
70
+ readonly manifestPath: string;
71
+ constructor(manifestPath: string, reason: string, options?: ErrorOptions);
72
+ }
73
+ export declare function runManifestPath(productDir: string, runId: unknown): string;
74
+ export declare function writeRunManifest(productDir: string, manifest: Readonly<WritableRunManifest>): void;
75
+ export declare function prepareRunShutdownDeadlines(manifest: Readonly<RunManifest>, requestedAt: string): RunManifest;
76
+ export declare function persistRunShutdownDeadlines(productDir: string, manifest: Readonly<RunManifest>): void;
77
+ export declare function createRunManifest(productDir: string, manifest: Readonly<WritableRunManifest>): void;
78
+ export declare function writeRunMaintenanceStopRequest(productDir: string, request: Readonly<RunMaintenanceStopRequest>): void;
79
+ export declare function readRunMaintenanceStopRequest(productDir: string, runId: unknown): RunMaintenanceStopRequest | null;
80
+ export declare function removeRunMaintenanceStopRequest(productDir: string, runId: unknown): void;
81
+ export declare function removeRunManifestFile(productDir: string, runId: unknown): void;
82
+ export declare function listRunManifests(productDir: string): RunManifest[];
83
+ export declare function requireSafeRunId(value: unknown, label: string): string;
84
+ export declare function normalizeRunManifest(value: unknown): RunManifest | null;
85
+ export declare function formatRunSummary(manifest: unknown): string;
@@ -0,0 +1 @@
1
+ import i from"node:fs";import l from"node:path";import{randomUUID as _}from"node:crypto";import{publishWindowsFile as P}from"../windows-native.js";import{serializeJson as x,writeJsonFileAtomicWithRetry as h}from"../files/json-file.js";import{RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION as S,RUN_MANIFEST_SCHEMA_VERSION as I}from"./schema.js";export{S as RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION,I as RUN_MANIFEST_SCHEMA_VERSION};const $=l.join(".testkit","_runs"),D=".maintenance-stop",E=128,U=/^[A-Za-z0-9][A-Za-z0-9._-]*$/u,F=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,O=/^(?:CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.|$)/iu;export class RunManifestCollisionError extends Error{code="TESTKIT_RUN_MANIFEST_COLLISION";manifestPath;constructor(t,e){super(`Testkit run manifest already exists at ${t}`,e),this.name="RunManifestCollisionError",this.manifestPath=t}}export class RunManifestInventoryError extends Error{code="TESTKIT_RUN_MANIFEST_INVENTORY_FAILED";manifestPath;constructor(t,e,r){super(`Cannot inventory Testkit run manifest ${t}: ${e}`,r),this.name="RunManifestInventoryError",this.manifestPath=t}}export function runManifestPath(n,t){const e=requireSafeRunId(t,"Testkit run id");return l.join(p(n),`${e}.json`)}export function writeRunManifest(n,t){const e=runManifestPath(n,t.runId);i.mkdirSync(p(n),{recursive:!0}),h(e,t)}export function prepareRunShutdownDeadlines(n,t){return{...n,services:n.services.map(e=>e.shutdownTimeoutMs===void 0?e:{...e,shutdownDeadlineAt:Math.min(e.shutdownDeadlineAt??Number.MAX_VALUE,Date.parse(t)+e.shutdownTimeoutMs)})}}export function persistRunShutdownDeadlines(n,t){h(runManifestPath(n,t.runId),t)}export function createRunManifest(n,t){const e=runManifestPath(n,t.runId),r=p(n);i.mkdirSync(r,{recursive:!0});const o=l.join(r,`.${l.basename(e)}.${process.pid.toString()}.${_()}.tmp`);i.writeFileSync(o,x(t,`run manifest ${t.runId}`),{flag:"wx"});try{process.platform==="win32"?P(o,e):i.linkSync(o,e)}catch(s){throw J(s,"EEXIST")?new RunManifestCollisionError(e,{cause:s}):s}finally{i.rmSync(o,{force:!0})}}export function writeRunMaintenanceStopRequest(n,t){const e=g(n,t.runId);i.mkdirSync(p(n),{recursive:!0}),h(e,t)}export function readRunMaintenanceStopRequest(n,t){const e=requireSafeRunId(t,"Testkit run id"),r=g(n,e);let o;try{o=JSON.parse(i.readFileSync(r,"utf8"))}catch{return null}const s=j(o);return s?.runId===e?s:null}export function removeRunMaintenanceStopRequest(n,t){i.rmSync(g(n,t),{force:!0})}export function removeRunManifestFile(n,t){const e=runManifestPath(n,t),r=p(n);i.rmSync(e,{force:!0}),removeRunMaintenanceStopRequest(n,t),i.existsSync(r)&&i.readdirSync(r).length===0&&i.rmSync(r,{recursive:!0,force:!0})}export function listRunManifests(n){const t=p(n);return i.existsSync(t)?i.readdirSync(t,{withFileTypes:!0}).filter(e=>e.name.endsWith(".json")).map(e=>{const r=l.join(t,e.name);if(!e.isFile())throw new RunManifestInventoryError(r,"manifest path is not a regular file");return C(r)}).sort((e,r)=>(e.startedAt||"").localeCompare(r.startedAt||"")):[]}export function requireSafeRunId(n,t){const e=R(n);if(e!==null)return e;throw new Error(`${t} must be 1-${E.toString()} characters using only ASCII letters, digits, dot, underscore, or hyphen, must start with a letter or digit, and must not use a reserved Windows device name`)}export function normalizeRunManifest(n){if(!m(n)||n.schemaVersion!==I)return null;const t=R(n.runId);if(t===null)return null;const e=n.controller,r=n.finishedAt,o=n.heartbeatAt,s=T(n.incarnationId),u=n.interruptReason,a=n.pid,d=n.processIdentity,c=n.session,f=n.startedAt,y=n.status,b=z(n.services),w=V(n.runtimeDirs);return typeof a!="number"||!Number.isSafeInteger(a)||a<0||s===null||b===null||w===null||a===0&&d!==null||a>0&&(typeof d!="string"||d.length===0)?null:{incarnationId:s,runId:t,runtimeDirs:w,schemaVersion:I,services:b,pid:a,processIdentity:typeof d=="string"?d:null,...W(e)?{controller:e}:{},...typeof r=="string"?{finishedAt:r}:{},...N(o)?{heartbeatAt:o}:{},...N(u)?{interruptReason:u}:{},...q(c)?{session:c}:{},...typeof f=="string"?{startedAt:f}:{},...typeof y=="string"?{status:y}:{}}}function g(n,t){const e=requireSafeRunId(t,"Testkit run id");return l.join(p(n),`${e}${D}`)}function j(n){if(!m(n)||n.schemaVersion!==S)return null;const t=R(n.runId),e=T(n.targetIncarnationId);return t===null||e===null||!M(n.coordinatorPid)||typeof n.coordinatorProcessIdentity!="string"||n.coordinatorProcessIdentity.length===0||typeof n.reason!="string"||n.reason.length===0||typeof n.requestedAt!="string"||!Number.isFinite(Date.parse(n.requestedAt))||!M(n.targetPid)||typeof n.targetProcessIdentity!="string"||n.targetProcessIdentity.length===0?null:{coordinatorPid:n.coordinatorPid,coordinatorProcessIdentity:n.coordinatorProcessIdentity,reason:n.reason,requestedAt:n.requestedAt,runId:t,schemaVersion:S,targetIncarnationId:e,targetPid:n.targetPid,targetProcessIdentity:n.targetProcessIdentity}}function C(n){let t;try{t=i.readFileSync(n,"utf8")}catch(u){throw new RunManifestInventoryError(n,"file could not be read",{cause:u})}let e;try{e=JSON.parse(t)}catch(u){throw new RunManifestInventoryError(n,"file is not valid JSON",{cause:u})}const r=normalizeRunManifest(e);if(r!==null){const u=l.basename(n,".json");if(r.runId!==u)throw new RunManifestInventoryError(n,"embedded runId does not match the manifest filename");return r}const o=m(e)?e.schemaVersion:void 0,s=o===I?`schema-v${I.toString()} record is invalid`:`unsupported schema version ${typeof o=="number"?o.toString():"missing"}`;throw new RunManifestInventoryError(n,s)}function R(n){return typeof n=="string"&&n.length<=E&&U.test(n)&&!O.test(n)?n:null}function T(n){return typeof n=="string"&&F.test(n)?n:null}function z(n){if(!Array.isArray(n))return null;const t=[];for(const e of n){const r=k(e);if(r===null)return null;t.push(r)}return t}function k(n){if(!m(n))return null;const t=n.command,e=n.cwd,r=n.pid,o=n.processIdentity,s=n.processGroupId,u=n.runtimeLabel,a=n.serviceName,d=n.startedAt,c=n.shutdownTimeoutMs,f=n.shutdownDeadlineAt;if(c!==void 0&&(typeof c!="number"||!Number.isFinite(c)||!Number.isInteger(c)||c<=0)||f!=null&&(c===void 0||typeof f!="number"||!Number.isFinite(f)||f<0))return null;const y=L(n.ports);return typeof r!="number"||!Number.isSafeInteger(r)||r<=0||s!==null&&(typeof s!="number"||!Number.isSafeInteger(s)||s!==r)||typeof o!="string"||o.length===0||y===null?null:{...c===void 0?{}:{shutdownTimeoutMs:c},...f===void 0?{}:{shutdownDeadlineAt:f},ports:y,pid:r,processGroupId:s,processIdentity:o,...N(t)?{command:t}:{},...typeof e=="string"?{cwd:e}:{},...typeof u=="string"?{runtimeLabel:u}:{},...typeof a=="string"?{serviceName:a}:{},...typeof d=="string"?{startedAt:d}:{}}}function L(n){if(!Array.isArray(n))return null;const t=[];for(const e of n){if(!m(e))return null;const r=e.host,o=e.port;if(typeof r!="string"||typeof o!="number"||!Number.isSafeInteger(o)||o<=0||o>65535)return null;t.push({...e,host:r,port:o})}return t}function V(n){return!Array.isArray(n)||!n.every(t=>typeof t=="string")?null:n}function M(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>0}function p(n){return l.join(n,$)}function m(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function q(n){return n===null||m(n)}function W(n){return n===null?!0:m(n)?Object.values(n).every(t=>t===null||typeof t=="string"):!1}function N(n){return n===null||typeof n=="string"}function J(n,t){return(typeof n=="object"||typeof n=="function")&&n!==null&&Reflect.get(n,"code")===t}const A=String;export function formatRunSummary(n){const t=normalizeRunManifest(n);if(!t)return A(n);const e=[...new Set(t.services.map(r=>r.runtimeLabel).filter(r=>!!r))];return`${A(t.runId)} pid=${A(t.pid)}${e.length>0?` runtimes=${e.join(",")}`:""}`}
@@ -0,0 +1,11 @@
1
+ import { observeProcessCreationIdentity } from "../index.js";
2
+ export interface TerminalRunDatabaseCleanupAuthority {
3
+ finishedAt: string;
4
+ incarnationId: string;
5
+ pid: number;
6
+ processIdentity: null | string;
7
+ runId: string;
8
+ status: "failed" | "finished" | "interrupted";
9
+ }
10
+ export declare function hasActiveRunManifest(productDir: string, observeIdentity?: typeof observeProcessCreationIdentity): boolean;
11
+ export declare function hasActiveRunManifestWithTerminalAuthority(productDir: string, observeIdentity: typeof observeProcessCreationIdentity, terminalRunAuthority?: Readonly<TerminalRunDatabaseCleanupAuthority>): boolean;
@@ -0,0 +1 @@
1
+ import c from"node:fs";import l from"node:path";import{observeProcessCreationIdentity as p}from"../index.js";import{isTerminalRunStatus as m,RUN_MANIFEST_SCHEMA_VERSION as d}from"./schema.js";export function hasActiveRunManifest(e,n=p){return hasActiveRunManifestWithTerminalAuthority(e,n)}export function hasActiveRunManifestWithTerminalAuthority(e,n,i){const u=l.join(e,".testkit","_runs"),a=I(u);let f=null;if(i!==void 0){const o=`${i.runId}.json`,r=a.filter(s=>s.fileName===o&&y(s.value,i));if(r.length!==1)return!0;f=r[0]}for(const o of a){if(o===f)continue;if(t(o.value,"schemaVersion")!==d)return!0;const r=t(o.value,"pid"),s=t(o.value,"processIdentity");if(!(r===0&&s===null)&&(typeof r!="number"||!Number.isSafeInteger(r)||r<=0||typeof s!="string"||s.length===0||n(r,s)!=="different"))return!0}return!1}function y(e,n){const i=t(e,"status"),u=t(e,"services");return t(e,"schemaVersion")===d&&t(e,"runId")===n.runId&&t(e,"incarnationId")===n.incarnationId&&t(e,"pid")===n.pid&&t(e,"processIdentity")===n.processIdentity&&t(e,"finishedAt")===n.finishedAt&&i===n.status&&m(i)&&Array.isArray(u)&&u.length===0}function I(e){return c.existsSync(e)?c.readdirSync(e,{withFileTypes:!0}).filter(n=>n.name.endsWith(".json")).map(n=>({fileName:n.name,value:n.isFile()?h(l.join(e,n.name)):null})):[]}function h(e){try{return JSON.parse(c.readFileSync(e,"utf8"))}catch{return null}}function t(e,n){return typeof e!="object"&&typeof e!="function"||e===null?void 0:Reflect.get(e,n)}
@@ -0,0 +1,2 @@
1
+ export declare function resolveContainedTestkitStateDirectory(productDir: string, ...segments: readonly string[]): string;
2
+ export declare function requireContainedTestkitStateDirectory(productDir: string, candidateDirectory: string, label?: string): string;
@@ -0,0 +1 @@
1
+ import l from"node:fs";import e from"node:path";export function resolveContainedTestkitStateDirectory(t,...r){for(const n of r)h(n);const o=l.realpathSync.native(e.resolve(t)),s=l.lstatSync(o);if(!s.isDirectory()||s.isSymbolicLink())throw new Error(`Testkit product path is not a directory: ${t}`);let i=o;for(const n of[".testkit",...r]){i=e.join(i,n);let a;try{a=l.lstatSync(i)}catch(c){if(d(c,"ENOENT"))break;throw c}if(a.isSymbolicLink())throw u(i,"symlink");if(!a.isDirectory())throw u(i,"non-directory node")}return e.join(o,".testkit",...r)}export function requireContainedTestkitStateDirectory(t,r,o="Testkit state directory"){const s=e.resolve(t),i=l.realpathSync.native(s),n=e.resolve(r),a=f(s,n)??f(i,n);if(a===null)throw new Error(`${o} must resolve within the Testkit product`);const c=a.split(e.sep);if(c.shift()!==".testkit")throw new Error(`${o} must resolve below the .testkit state root`);return resolveContainedTestkitStateDirectory(t,...c)}function f(t,r){const o=e.relative(t,r);return o===".."||o.startsWith(`..${e.sep}`)||e.isAbsolute(o)?null:o}function h(t){if(!t||t==="."||t===".."||e.basename(t)!==t||e.posix.basename(t)!==t||e.win32.basename(t)!==t)throw new Error(`Unsafe Testkit state path segment: ${t}`)}function u(t,r){return new Error(`Refusing unsafe Testkit state ${r} at ${t}`)}function d(t,r){return typeof t=="object"&&t!==null&&"code"in t&&Reflect.get(t,"code")===r}
@@ -0,0 +1,3 @@
1
+ export declare const RUN_MANIFEST_SCHEMA_VERSION: 3;
2
+ export declare const RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION: 2;
3
+ export declare function isTerminalRunStatus(status: unknown): status is "failed" | "finished" | "interrupted";
@@ -0,0 +1 @@
1
+ export const RUN_MANIFEST_SCHEMA_VERSION=3,RUN_MAINTENANCE_STOP_REQUEST_SCHEMA_VERSION=2;export function isTerminalRunStatus(e){return e==="failed"||e==="finished"||e==="interrupted"}
@@ -0,0 +1,19 @@
1
+ import { type RunManifest, type RunManifestService } from "./manifest.js";
2
+ export interface PreparedRunStop {
3
+ requestedAt: string;
4
+ controllerActive: boolean;
5
+ coordinatorProcessIdentity: null | string;
6
+ graceMs: number;
7
+ manifest: RunManifest;
8
+ pid: number;
9
+ productDir: string;
10
+ reason: string;
11
+ runId: string;
12
+ targetProcessIdentity: null | string;
13
+ }
14
+ export declare function isPidRunning(pid: unknown): boolean;
15
+ export declare function waitForPreparedRunStop(prepared: Readonly<PreparedRunStop>): Promise<Set<string>>;
16
+ export declare function drainRunServices(services: readonly RunManifestService[], drainedServices: Set<string>): Promise<void>;
17
+ export declare function requestProcessStop(pid: number, expectedIdentity: null | string, signal: NodeJS.Signals | number): void;
18
+ export declare function runManifestServiceKey(service: Readonly<RunManifestService>): string;
19
+ export declare function sameRunManifestIncarnation(left: Readonly<RunManifest>, right: Readonly<RunManifest>): boolean;
@@ -0,0 +1 @@
1
+ import{isTerminalRunStatus as h}from"./schema.js";import{observeProcessCreationIdentity as c}from"../index.js";import{withProductLifecycleFence as a}from"../lifecycle-fence.js";import{terminateAttributedProcessLineage as f,terminateOwnedPosixProcessGroup as T}from"../service-processes.js";import{listRunManifests as d}from"./manifest.js";import{createShutdownDeadline as I,remainingShutdownMs as A,FORCE_TERMINATION_WAIT_MS as S}from"../shutdown.js";const l=5e3,E=5e3;export function isPidRunning(t){if(!Number.isInteger(Number(t))||Number(t)<=0)return!1;try{return process.kill(Number(t),0),!0}catch(n){return M(n,"EPERM")}}export async function waitForPreparedRunStop(t){if(t.controllerActive&&t.targetProcessIdentity!==null){const i=await D(t,t.targetProcessIdentity);let r=i,s=i;if(!r&&!s&&(await f(t.pid,"SIGKILL",t.targetProcessIdentity),r=await p(t.pid,l,t.targetProcessIdentity),s=!r&&await b(t)),!r&&!s)throw new Error(`Timed out stopping Testkit run process ${t.pid.toString()}`)}const n=new Set,e=await a(t.productDir,()=>d(t.productDir).find(i=>i.runId===t.runId)),o=new Map(t.manifest.services.map(i=>[runManifestServiceKey(i),i]));if(e&&sameRunManifestIncarnation(e,t.manifest))for(const i of e.services){const r=runManifestServiceKey(i),s=o.get(r);o.set(r,s?.shutdownDeadlineAt==null?i:{...i,shutdownTimeoutMs:s.shutdownTimeoutMs,shutdownDeadlineAt:Math.min(s.shutdownDeadlineAt,i.shutdownDeadlineAt??Number.MAX_VALUE)})}return await drainRunServices([...o.values()],n),n}async function D(t,n){const e=new Map,o=s=>{for(const u of s){const w=runManifestServiceKey(u),m=u.shutdownTimeoutMs??t.graceMs,g=e.get(w)??I(m+S);g.begin((u.shutdownDeadlineAt??Date.parse(t.requestedAt)+m)+S),e.set(w,g)}return Math.max(0,...s.map(u=>e.get(runManifestServiceKey(u))?.remainingMs()??0))};o(t.manifest.services);const i=I(t.graceMs);i.begin(Date.parse(t.requestedAt)+t.graceMs);let r=null;for(;;){if(c(t.pid,n)==="different")return!0;const s=await a(t.productDir,()=>d(t.productDir).find(u=>u.runId===t.runId));if(!s||!sameRunManifestIncarnation(s,t.manifest)||h(s.status))return!0;if(Math.max(i.remainingMs(),o(s.services))<=0){if(r===null){try{await f(t.pid,"SIGTERM",n)}catch{}r=performance.now()}if(performance.now()-r>=E)return!1}await y(100)}}async function b(t){return a(t.productDir,()=>{const n=d(t.productDir).find(e=>e.runId===t.runId);return n===void 0||!sameRunManifestIncarnation(n,t.manifest)||h(n.status)})}export async function drainRunServices(t,n){for(const e of[...t].reverse())await P(e),n.add(runManifestServiceKey(e))}async function P(t){const n=t.pid;if(!Number.isSafeInteger(n)||n<=0)return;const e=t.processIdentity;if(typeof e!="string"||e.length===0)throw new Error(`Application service process ${n.toString()} has no creation identity; refusing unsafe cleanup`);const o=Number(t.processGroupId);if(process.platform!=="win32"&&Number.isSafeInteger(o)&&o>0&&o===n){await T(o,e,t.shutdownTimeoutMs===void 0?l:t.shutdownDeadlineAt==null?t.shutdownTimeoutMs:A(t.shutdownTimeoutMs,t.shutdownDeadlineAt));return}if(process.platform!=="win32")throw new Error(`Application service process ${n.toString()} does not have an owned POSIX process group; refusing unsafe cleanup`);const i=c(n,e);if(i!=="matches"){if(i==="different"&&!isPidRunning(n))return;throw new Error(i==="different"?`Application service process creation identity no longer matches pid ${n.toString()}; refusing unsafe cleanup`:`Cannot establish the creation identity of application service process ${n.toString()}; refusing unsafe cleanup`)}if(await f(n,"SIGKILL",e),!await p(n,l,e))throw new Error(`Timed out stopping application service process ${n.toString()}`)}export function requestProcessStop(t,n,e){const o=c(t,n);if(o!=="matches"){if(o==="different"&&!isPidRunning(t))return;throw new Error(o==="different"?`Testkit run process creation identity no longer matches pid ${t.toString()}; refusing unsafe stop request`:`Cannot establish the creation identity of Testkit run process ${t.toString()}; refusing unsafe stop request`)}try{process.kill(t,e)}catch(i){if(!M(i,"ESRCH"))throw i}}async function p(t,n,e){const o=()=>e===void 0?isPidRunning(t):c(t,e)!=="different",i=Date.now();for(;Date.now()-i<n;){if(!o())return!0;await y(100)}return!o()}export function runManifestServiceKey(t){return`${t.pid.toString()}:${String(t.processGroupId)}:${t.processIdentity}`}export function sameRunManifestIncarnation(t,n){return t.runId===n.runId&&t.incarnationId===n.incarnationId&&t.pid===n.pid&&t.processIdentity===n.processIdentity}function y(t){return new Promise(n=>setTimeout(n,t))}function M(t,n){return(typeof t=="object"||typeof t=="function")&&t!==null&&Reflect.get(t,"code")===n}
@@ -0,0 +1,4 @@
1
+ export interface RuntimeSocket {
2
+ host: string;
3
+ port: number;
4
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,13 @@
1
+ import { captureProcessCreationIdentity, processCreationIdentityMatches } from "./index.js";
2
+ export type ProcessSignal = NodeJS.Signals;
3
+ export interface ServiceStartInvocation {
4
+ args: readonly string[];
5
+ executable: string;
6
+ windowsVerbatimArguments?: boolean;
7
+ }
8
+ export { captureProcessCreationIdentity, processCreationIdentityMatches };
9
+ export declare function normalizeServiceStartCommand(command: string): string;
10
+ export declare function prepareServiceStartInvocation(command: string, env: Readonly<NodeJS.ProcessEnv>, platform?: NodeJS.Platform): ServiceStartInvocation;
11
+ export declare function terminateAttributedProcessLineage(pid: unknown, signal: ProcessSignal, expectedCreationIdentity?: string): Promise<void>;
12
+ export declare function terminateOwnedPosixProcessGroup(processGroupId: unknown, leaderCreationIdentity: string, graceMs: number): Promise<void>;
13
+ export declare function sleep(ms: number): Promise<void>;
@@ -0,0 +1 @@
1
+ import{captureProcessCreationIdentity as a,processCreationIdentityMatches as c,resolvePosixCommandShell as m,terminateAttributedProcessLineage as d,terminateOwnedPosixProcessGroup as u}from"./index.js";export{a as captureProcessCreationIdentity,c as processCreationIdentityMatches};export function normalizeServiceStartCommand(t){const r=t.trim();if(r.length===0)throw new Error("Service start command must not be empty");return r}export function prepareServiceStartInvocation(t,r,o=process.platform){const e=normalizeServiceStartCommand(t);if(o==="win32"){const n=e.replace(/^exec(?:\s+|$)/u,"").trim();if(n.length===0)throw new Error("Service start command must not contain only exec");return{executable:r.ComSpec||process.env.ComSpec||"cmd.exe",args:["/d","/s","/c",`"${n}"`],windowsVerbatimArguments:!0}}const s=m(r),i=/^exec(?:\s|$)/u.test(e)?e:`exec ${e}`;return{executable:s,args:["-lc",i]}}export async function terminateAttributedProcessLineage(t,r,o){const e=Number(t);!Number.isInteger(e)||e<=0||await d({displayLabel:"Testkit application service",...o===void 0?{}:{expectedCreationIdentity:o},pid:e,signal:r})}export async function terminateOwnedPosixProcessGroup(t,r,o){const e=Number(t);if(!Number.isSafeInteger(e)||e<=0)throw new Error("Owned POSIX process-group id must be a positive safe integer");await u({displayLabel:"Testkit application service",graceMs:o,leaderCreationIdentity:r,leaderPid:e,processGroupId:e})}export function sleep(t){return new Promise(r=>setTimeout(r,t))}
@@ -0,0 +1,10 @@
1
+ export declare const DEFAULT_SHUTDOWN_TIMEOUT_MS = 1000;
2
+ export declare const FORCE_TERMINATION_WAIT_MS = 3000;
3
+ /** Import a persisted deadline without granting more than its original allowance. */
4
+ export declare function remainingShutdownMs(timeoutMs: number, deadlineAt: number, now?: number): number;
5
+ /** One monotonic allowance, with a wall-clock deadline for ownership handoff. */
6
+ export declare function createShutdownDeadline(timeoutMs: number): {
7
+ readonly deadlineAt: number | null;
8
+ remainingMs: () => number;
9
+ begin(importedDeadlineAt?: number): boolean;
10
+ };
@@ -0,0 +1 @@
1
+ export const DEFAULT_SHUTDOWN_TIMEOUT_MS=1e3,FORCE_TERMINATION_WAIT_MS=3e3;export function remainingShutdownMs(e,n,t=Date.now()){return Math.max(0,Math.min(e,n-t))}export function createShutdownDeadline(e){let n=null,t=0,a=e;const u=()=>n===null?e:Math.max(0,a-(performance.now()-t));return{get deadlineAt(){return n},remainingMs:u,begin(r){if(n!==null&&(r===void 0||r>=n))return!1;const o=Date.now();return a=Math.min(u(),r===void 0?e:remainingShutdownMs(e,r,o)),t=performance.now(),n=Math.min(n??Number.MAX_VALUE,r??Number.MAX_VALUE,o+a),!0}}}
@@ -0,0 +1,2 @@
1
+ /** CLI-only ownership: help and parser errors never start the native owner. */
2
+ export declare function ensureWindowsCliOwnership(): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import{spawn as p}from"node:child_process";import{windowsOwnerExecutable as c}from"./windows-native.js";let f;export function ensureWindowsCliOwnership(){return process.platform!=="win32"?Promise.resolve():f??=h()}async function h(){const e=p(c(),[String(process.pid)],{stdio:["pipe","pipe","inherit"],detached:!0,windowsHide:!0});await new Promise((l,a)=>{let n="",d=0,i=!1,o=!1;const u=setTimeout(()=>{r(new Error("Windows CLI process ownership handshake timed out"))},1e4);function r(t){o||(o=!0,clearTimeout(u),e.stdin.destroy(),e.stdout.destroy(),e.kill(),e.unref(),a(t))}e.once("error",r),e.stdin.on("error",r),e.stdout.on("error",r),e.once("exit",(t,s)=>{r(new Error(`Windows CLI process owner exited before readiness (${String(t)}, ${String(s)})`))}),e.stdout.once("end",()=>{r(new Error("Windows CLI process owner closed its handshake before readiness"))}),e.stdout.setEncoding("utf8"),e.stdout.on("data",t=>{if(o)return;if(d+=Buffer.byteLength(t),d>32){r(new Error("Windows CLI process ownership handshake exceeded its output limit"));return}n+=t;let s;for(;(s=n.indexOf(`
2
+ `))>=0;){const w=n.slice(0,s);if(n=n.slice(s+1),w==="PREPARED"&&!i)i=!0,e.stdin.end(`ATTACH
3
+ `);else if(w==="READY"&&i&&n.length===0){o=!0,clearTimeout(u),e.stdout.destroy(),e.unref(),l();return}else{r(new Error("Invalid Windows CLI process ownership handshake"));return}}})})}
@@ -0,0 +1,6 @@
1
+ import fs from "node:fs";
2
+ export declare function windowsOwnerExecutable(): string;
3
+ /** Atomically publish a complete file without replacing an existing name. */
4
+ export declare function publishWindowsFile(source: string, destination: string): void;
5
+ /** A rename can change ctime; require stable file identity, size, and mtime. */
6
+ export declare function sameFileAfterRename(before: Readonly<Pick<fs.BigIntStats, "dev" | "ino" | "size" | "mtimeNs">>, after: Readonly<Pick<fs.BigIntStats, "dev" | "ino" | "size" | "mtimeNs">>): boolean;
@@ -0,0 +1 @@
1
+ import{execFileSync as l}from"node:child_process";import o from"node:fs";import i from"node:path";import{fileURLToPath as p}from"node:url";export function windowsOwnerExecutable(){if(!["x64","arm64"].includes(process.arch))throw new Error(`Unsupported Testkit Windows architecture: ${process.arch}`);return i.resolve(i.dirname(p(import.meta.url)),"../../bin",`testkit-windows-owner-${process.arch}.exe`)}export function publishWindowsFile(e,t){const s=o.lstatSync(e,{bigint:!0});try{l(windowsOwnerExecutable(),["publish-file",i.toNamespacedPath(i.resolve(e)),i.toNamespacedPath(i.resolve(t))],{encoding:"utf8",maxBuffer:16*1024,stdio:["ignore","pipe","pipe"],timeout:5e3,windowsHide:!0})}catch(r){if(typeof r=="object"&&r!==null&&Reflect.get(r,"status")===17)throw Object.assign(new Error("File already exists",{cause:r}),{code:"EEXIST"});try{const n={bigint:!0,throwIfNoEntry:!1},a=o.lstatSync(e,n),c=o.lstatSync(t,n);if(!a&&s.isFile()&&c?.isFile()&&sameFileAfterRename(s,c))return}catch{}throw r}}export function sameFileAfterRename(e,t){return e.ino!==0n&&e.dev===t.dev&&e.ino===t.ino&&e.size===t.size&&e.mtimeNs===t.mtimeNs}
@@ -0,0 +1,4 @@
1
+ export declare const WINDOWS_KERNEL_PROCESS_IDENTITY_PREFIX: "windows-kernel-filetime:";
2
+ export declare function formatWindowsKernelProcessIdentity(fileTime: string): string;
3
+ export declare function parseWindowsKernelProcessIdentity(identity: string): string | null;
4
+ export declare function isWindowsKernelFileTime(value: string): boolean;
@@ -0,0 +1 @@
1
+ export const WINDOWS_KERNEL_PROCESS_IDENTITY_PREFIX="windows-kernel-filetime:";const t=9223372036854775807n;export function formatWindowsKernelProcessIdentity(e){if(!isWindowsKernelFileTime(e))throw new Error("Windows kernel process FILETIME must be a positive signed 64-bit decimal value");return`${WINDOWS_KERNEL_PROCESS_IDENTITY_PREFIX}${e}`}export function parseWindowsKernelProcessIdentity(e){if(!e.startsWith(WINDOWS_KERNEL_PROCESS_IDENTITY_PREFIX))return null;const n=e.slice(WINDOWS_KERNEL_PROCESS_IDENTITY_PREFIX.length);return isWindowsKernelFileTime(n)?n:null}export function isWindowsKernelFileTime(e){return e.length<=19&&/^[1-9]\d*$/u.test(e)&&BigInt(e)<=t}
@@ -0,0 +1,7 @@
1
+ export interface CiGitReference {
2
+ readonly branch: string | null;
3
+ readonly pullRequest: number | null;
4
+ }
5
+ export declare function readCiPullRequestHeadSha(env: Readonly<NodeJS.ProcessEnv>): string | null;
6
+ export declare function normalizePullRequestHeadSha(value: unknown): string | null;
7
+ export declare function resolveCiGitReference(env: Readonly<NodeJS.ProcessEnv>): CiGitReference;
@@ -0,0 +1 @@
1
+ import f from"fs";export function readCiPullRequestHeadSha(n){if(o(u(n,"GITHUB_REF"))===null)return null;const e=u(n,"GITHUB_EVENT_PATH");if(e===null)return null;try{const t=JSON.parse(f.readFileSync(e,"utf8"));if(!l(t))return null;const r=t.pull_request;if(!l(r))return null;const i=r.head;return l(i)?normalizePullRequestHeadSha(i.sha):null}catch{return null}}export function normalizePullRequestHeadSha(n){return typeof n!="string"||!/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/iu.test(n)?null:n.toLowerCase()}export function resolveCiGitReference(n){const e=u(n,"GITHUB_REF"),t=c(n,["GITHUB_HEAD_REF","GITHUB_REF_NAME","GITHUB_REF","CI_COMMIT_REF_NAME"]);return{branch:s(t),pullRequest:o(e)}}function s(n){if(n===null)return null;for(const e of["refs/heads/","refs/tags/"])if(n.startsWith(e))return n.slice(e.length)||null;return n}function o(n){const e=n?.match(/^refs\/pull\/(\d+)(?:\/|$)/u);if(e==null)return null;const t=Number(e[1]);return Number.isSafeInteger(t)&&t>0?t:null}function c(n,e){for(const t of e){const r=u(n,t);if(r!==null)return r}return null}function u(n,e){const t=n[e]?.trim();return t||null}function l(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}
@@ -0,0 +1,15 @@
1
+ import type { Hash } from "crypto";
2
+ export interface FingerprintPolicy {
3
+ readonly exclude: readonly string[];
4
+ readonly include: readonly string[];
5
+ }
6
+ export declare function normalizeFingerprintPolicy(value?: unknown): FingerprintPolicy;
7
+ export declare function shouldIgnoreFingerprintPath(productDir: string, absOrRelPath: string, policy?: FingerprintPolicy): boolean;
8
+ export declare function shouldIgnoreCanonicalFingerprintPath(relativePath: string, policy?: FingerprintPolicy): boolean;
9
+ export declare function shouldIgnoreCanonicalFingerprintPathAtPrefix(relativePath: string, addressPrefix: string, policy?: FingerprintPolicy): boolean;
10
+ export declare function hasIncludedFingerprintDescendantAtPrefix(relativePath: string, addressPrefix: string, policy: FingerprintPolicy): boolean;
11
+ export declare function appendFingerprintPathToHash(hash: Hash, productDir: string, absPath: string, policy?: FingerprintPolicy): void;
12
+ export declare function normalizeRelativePath(productDir: string, absOrRelPath: string): string;
13
+ export declare function normalizePath(value: string): string;
14
+ export declare function appendInputToHash(hash: Hash, productDir: string, input: string, fingerprints?: unknown): void;
15
+ export declare function appendFileToHash(hash: Hash, productDir: string, absPath: string, fingerprints?: unknown): void;
@@ -0,0 +1 @@
1
+ import y from"fs";import f from"path";import{physicalNodeMode as d,readPhysicalDirectoryEntries as b,readPhysicalNode as $}from"./physical-tree.js";const w=[".testkit",".next-testkit"],l={exclude:[],include:[]};export function normalizeFingerprintPolicy(t={}){if(t==null)return{exclude:[],include:[]};if(!S(t))throw new Error("testkit.config.ts fingerprints must be an object");return{exclude:h(t.exclude,"fingerprints.exclude"),include:h(t.include,"fingerprints.include")}}export function shouldIgnoreFingerprintPath(t,n,e=l){const r=normalizeRelativePath(t,n);return shouldIgnoreCanonicalFingerprintPath(r,e)}export function shouldIgnoreCanonicalFingerprintPath(t,n=l){return shouldIgnoreCanonicalFingerprintPathAtPrefix(t,"",n)}export function shouldIgnoreCanonicalFingerprintPathAtPrefix(t,n,e=l){const r=c(t),i=m(n,r);return!i||p(i,e.include)?!1:E(r)?!0:p(i,e.exclude)}export function hasIncludedFingerprintDescendantAtPrefix(t,n,e){const r=m(n,t);if(!r)return e.include.length>0;const i=`${r}/`;return e.include.some(s=>{const o=c(s);if(o.includes("*")){const u=A(o);return u.length===0||r.startsWith(u)||u.startsWith(i)}return P(o).startsWith(i)})}export function appendFingerprintPathToHash(t,n,e,r=l){const i=normalizeRelativePath(n,e),s=y.realpathSync.native(f.resolve(n));x(t,s,i,r)}export function normalizeRelativePath(t,n){const e=f.isAbsolute(n)?f.relative(t,n):n;return f.isAbsolute(n)?c(e.split(f.sep).join("/")):normalizePath(e)}export function normalizePath(t){return t.split(f.sep).join("/").replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"")}function h(t,n){if(t==null)return[];if(!F(t))throw new Error(`testkit.config.ts ${n} must be an array of paths`);return t.map((e,r)=>{if(typeof e!="string")throw new Error(`testkit.config.ts ${n}[${String(r)}] must be a string path`);const i=c(e.trim());if(!i)throw new Error(`testkit.config.ts ${n}[${String(r)}] must be a non-empty path`);if(T(i))throw new Error(`testkit.config.ts ${n}[${String(r)}] must use "/" as the path separator; a literal backslash is written doubled`);if(i.startsWith("/")||/^[a-z]:\//iu.test(i)||i.startsWith("../")||i==="..")throw new Error(`testkit.config.ts ${n}[${String(r)}] must be relative to the product directory`);return i})}function p(t,n){return n.some(e=>z(t,e))}function E(t){return p(t,w)}function z(t,n){const e=c(t),r=c(n);if(!r)return!1;const i=P(r);if(e===i||e.startsWith(`${i}/`))return!0;if(!r.includes("*"))return!1;const s=L(r);let o=e;for(;o;){if(s.test(o))return!0;const u=o.lastIndexOf("/");if(u<0)break;o=o.slice(0,u)}return!1}function c(t){return t.replace(/^\.\/+/,"").replace(/\/+$/,"")}function T(t){for(let n=0;n<t.length;n+=1)if(t[n]==="\\"){if(t[n+1]!=="\\")return!0;n+=1}return!1}function P(t){return t.replace(/\\\\/g,"\\")}function A(t){let n="";for(let e=0;e<t.length;e+=1){const r=t[e];if(r==="*")break;r==="\\"&&t[e+1]==="\\"?(n+="\\",e+=1):n+=r}return n}function x(t,n,e,r){const i=$(n,e),s=shouldIgnoreCanonicalFingerprintPath(e,r);if(!(s&&(i.kind!=="directory"||!hasIncludedFingerprintDescendantAtPrefix(e,"",r)))&&(s||I(t,e,i),i.kind==="directory"))for(const o of b(n,e))x(t,n,m(e,o),r)}function I(t,n,e){switch(t.update("node\0"),a(t,"path",n),a(t,"kind",e.kind),e.kind){case"file":a(t,"mode",d(e.mode)),g(t,"contents",e.contents);break;case"directory":a(t,"mode",d(e.mode));break;case"symlink":case"ancestor-symlink":"obstaclePath"in e&&a(t,"obstacle",e.obstaclePath),g(t,"target",e.target);break;case"ancestor-missing":a(t,"obstacle",e.obstaclePath);break;case"ancestor-non-directory":a(t,"obstacle",e.obstaclePath),a(t,"mode",d(e.mode));break;case"missing":break}}function a(t,n,e){g(t,n,Buffer.from(e))}function g(t,n,e){t.update(`${n}\0${e.byteLength.toString()}\0`),t.update(e),t.update("\0")}function m(t,n){const e=c(t),r=c(n);return e?r?`${e}/${r}`:e:r}function L(t){let n="^";for(let e=0;e<t.length;e+=1){const r=t[e],i=t[e+1];r==="\\"&&i==="\\"?(n+=k("\\"),e+=1):r==="*"&&i==="*"?(n+=".*",e+=1):r==="*"?n+="[^/]*":n+=k(r)}return n+="$",new RegExp(n)}function k(t){return t.replace(/[\\^$+?.()|[\]{}]/g,"\\$&")}function S(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function F(t){return Array.isArray(t)}export function appendInputToHash(t,n,e,r={}){const i=f.resolve(n,e||".");appendFingerprintPathToHash(t,n,i,normalizeFingerprintPolicy(r))}export function appendFileToHash(t,n,e,r={}){appendFingerprintPathToHash(t,n,e,normalizeFingerprintPolicy(r))}
@@ -0,0 +1,2 @@
1
+ /** Decode one path emitted by Git with `core.quotePath=true` and no `-z`. */
2
+ export declare function decodeGitPathRecord(value: string): string;
@@ -0,0 +1 @@
1
+ import{TextDecoder as u}from"node:util";const h=new u("utf-8",{fatal:!0});export function decodeGitPathRecord(e){if(!e.startsWith('"')){let t=e.length>0;for(let n=0;n<e.length&&t;n+=1){const r=e.charCodeAt(n);t=r>=32&&r<=126&&r!==34&&r!==92}if(!t)throw new Error("Git returned an invalid unquoted path record");return e}if(e.length<2||!e.endsWith('"'))throw new Error("Git returned an unterminated quoted path record");const o=[];for(let t=1;t<e.length-1;t+=1){const n=e[t];if(n!=="\\"){const c=n.codePointAt(0);if(c===void 0||c<32||c>126)throw new Error("Git returned a non-ASCII quoted path record");o.push(c);continue}if(t+1>=e.length-1)throw new Error("Git returned a truncated path escape");const r=e[t+1],i=f(r);if(i!==null){o.push(i),t+=1;continue}const a=e.slice(t+1,t+4);if(!/^[0-7]{3}$/u.test(a))throw new Error(`Git returned an unsupported path escape: \\${r}`);o.push(Number.parseInt(a,8)),t+=3}const s=Buffer.from(o);let d;try{d=h.decode(s)}catch(t){throw new Error(`Git path is not valid UTF-8: escaped filename bytes 0x${s.toString("hex")}`,{cause:t})}if(d.includes("\0"))throw new Error("Git path records must not contain NUL bytes");return d}function f(e){switch(e){case'"':return 34;case"\\":return 92;case"a":return 7;case"b":return 8;case"t":return 9;case"n":return 10;case"v":return 11;case"f":return 12;case"r":return 13;default:return null}}
@@ -0,0 +1,10 @@
1
+ import { type ManagedProcessResult } from "../process/index.js";
2
+ export declare const DEFAULT_GIT_COMMAND_TIMEOUT_MS = 30000;
3
+ export interface ManagedGitCommandOptions {
4
+ env?: Readonly<NodeJS.ProcessEnv>;
5
+ repositoryConfigOnly?: boolean;
6
+ signal?: AbortSignal;
7
+ timeoutMs?: number;
8
+ }
9
+ export declare function runManagedGitCommand(cwd: string, args: readonly string[], options?: Readonly<ManagedGitCommandOptions>): Promise<ManagedProcessResult>;
10
+ export declare function createManagedGitEnvironment(environment: Readonly<NodeJS.ProcessEnv>, platform?: NodeJS.Platform, repositoryConfigOnly?: boolean): NodeJS.ProcessEnv;
@@ -0,0 +1 @@
1
+ import{runManagedHostCommand as t}from"../process/index.js";export const DEFAULT_GIT_COMMAND_TIMEOUT_MS=3e4;const n=new Set(["GIT_ALTERNATE_OBJECT_DIRECTORIES","GIT_ATTR_SOURCE","GIT_COMMON_DIR","GIT_CONFIG","GIT_CONFIG_COUNT","GIT_CONFIG_GLOBAL","GIT_CONFIG_NOSYSTEM","GIT_CONFIG_PARAMETERS","GIT_CONFIG_SYSTEM","GIT_DIFF_OPTS","GIT_DIR","GIT_EXTERNAL_DIFF","GIT_GLOB_PATHSPECS","GIT_ICASE_PATHSPECS","GIT_IMPLICIT_WORK_TREE","GIT_INDEX_FILE","GIT_LITERAL_PATHSPECS","GIT_NAMESPACE","GIT_NOGLOB_PATHSPECS","GIT_NO_REPLACE_OBJECTS","GIT_OBJECT_DIRECTORY","GIT_PREFIX","GIT_QUARANTINE_PATH","GIT_REPLACE_REF_BASE","GIT_SHALLOW_FILE","GIT_WORK_TREE"]),C=new Set(["GIT_OPTIONAL_LOCKS"]);export function runManagedGitCommand(G,T,I={}){return t({args:T,cwd:G,displayLabel:L(T),env:createManagedGitEnvironment(I.env??process.env,process.platform,I.repositoryConfigOnly??!1),executable:"git",signal:I.signal,timeoutMs:I.timeoutMs??DEFAULT_GIT_COMMAND_TIMEOUT_MS})}export function createManagedGitEnvironment(G,T=process.platform,I=!1){const _={};for(const[E,O]of Object.entries(G)){const e=T==="win32"?E.toUpperCase():E;n.has(e)||/^GIT_CONFIG_(?:KEY|VALUE)_\d+$/u.test(e)||C.has(e)||e==="LANG"||e==="LC_ALL"||(_[E]=O)}if(_.LANG="C",_.LC_ALL="C",_.GIT_NO_REPLACE_OBJECTS="1",_.GIT_OPTIONAL_LOCKS="0",I){const E=T==="win32"?"NUL":"/dev/null";_.GIT_CONFIG_GLOBAL=E,_.GIT_CONFIG_NOSYSTEM="1",_.GIT_CONFIG_SYSTEM=E}return _}function L(G){const T=G.find(I=>!I.startsWith("-"));return T?`Git ${T}`:"Git command"}
@@ -0,0 +1,3 @@
1
+ import { type RepoState } from "./state.js";
2
+ export type GitMetadata = Pick<RepoState, "branch" | "commitSha" | "detached" | "dirty" | "dirtyFingerprint" | "pullRequest" | "pullRequestHeadSha" | "remoteUrl" | "repository" | "repoRoot" | "worktreePath">;
3
+ export declare function collectGitMetadata(productDir: string): Promise<GitMetadata>;
@@ -0,0 +1 @@
1
+ import{collectRepoState as r}from"./state.js";export async function collectGitMetadata(e){const t=await r(e);return{branch:t.branch,commitSha:t.commitSha,pullRequest:t.pullRequest,pullRequestHeadSha:t.pullRequestHeadSha,repoRoot:t.repoRoot,remoteUrl:t.remoteUrl,repository:t.repository,detached:t.detached,dirty:t.dirty,dirtyFingerprint:t.dirtyFingerprint,worktreePath:t.worktreePath}}
@@ -0,0 +1,37 @@
1
+ export type PhysicalNode = {
2
+ readonly kind: "ancestor-missing";
3
+ readonly obstaclePath: string;
4
+ } | {
5
+ readonly kind: "ancestor-non-directory";
6
+ readonly mode: bigint;
7
+ readonly obstaclePath: string;
8
+ } | {
9
+ readonly kind: "ancestor-symlink";
10
+ readonly obstaclePath: string;
11
+ readonly target: Buffer;
12
+ } | {
13
+ readonly identity: PhysicalNodeIdentity;
14
+ readonly kind: "directory";
15
+ readonly mode: bigint;
16
+ } | {
17
+ readonly contents: Buffer;
18
+ readonly kind: "file";
19
+ readonly mode: bigint;
20
+ } | {
21
+ readonly kind: "missing";
22
+ } | {
23
+ readonly kind: "symlink";
24
+ readonly target: Buffer;
25
+ };
26
+ export interface PhysicalNodeIdentity {
27
+ readonly dev: bigint;
28
+ readonly ino: bigint;
29
+ readonly type: bigint;
30
+ }
31
+ export declare function physicalPathAndHandleIdentitiesEqual(pathIdentity: Readonly<PhysicalNodeIdentity>, handleIdentity: Readonly<PhysicalNodeIdentity>, platform: NodeJS.Platform): boolean;
32
+ export type PhysicalNodeType = "block-device" | "character-device" | "directory" | "fifo" | "file" | "socket" | "symlink" | "unknown";
33
+ export declare function readPhysicalNode(rootDir: string, canonicalRelativePath: string): PhysicalNode;
34
+ export declare function readPhysicalDirectoryEntries(rootDir: string, canonicalRelativePath: string): readonly string[];
35
+ export declare function physicalNodeMode(mode: bigint): string;
36
+ export declare function physicalNodeType(mode: bigint): PhysicalNodeType;
37
+ export declare function decodePhysicalPathSegment(encoded: Uint8Array, parentPath?: string): string;
@@ -0,0 +1 @@
1
+ import i from"node:fs";import h from"node:path";export function physicalPathAndHandleIdentitiesEqual(t,n,e){return(t.dev===n.dev||e==="win32"&&t.dev===0n&&n.dev!==0n)&&t.ino===n.ino&&t.type===n.type}const w=61440n;export function readPhysicalNode(t,n){const e=D(t,n);try{if(e.obstacle)return e.obstacle;const r=e.finalStat;if(!r)return{kind:"missing"};if(r.isSymbolicLink())return{kind:"symlink",target:$(e,r)};if(r.isFile())return R(e,r);if(r.isDirectory())return u(e,r),{identity:a(r),kind:"directory",mode:r.mode};throw u(e,r),E(n,r.mode)}finally{g(e.ancestors)}}export function readPhysicalDirectoryEntries(t,n){const e=D(t,n);try{if(e.obstacle||!e.finalStat?.isDirectory())throw new Error(`Fingerprint directory is not a stable physical directory: ${n||"."}`);u(e,e.finalStat);const r=i.readdirSync(e.finalPath,{encoding:"buffer"});return u(e,e.finalStat),r.map(o=>decodePhysicalPathSegment(o,n)).sort(T)}finally{g(e.ancestors)}}export function physicalNodeMode(t){return(t&4095n).toString(8).padStart(4,"0")}export function physicalNodeType(t){switch(t&w){case 4096n:return"fifo";case 8192n:return"character-device";case 16384n:return"directory";case 24576n:return"block-device";case 32768n:return"file";case 40960n:return"symlink";case 49152n:return"socket";default:return"unknown"}}export function decodePhysicalPathSegment(t,n=""){const e=Buffer.from(t),r=e.toString("utf8");if(!Buffer.from(r,"utf8").equals(e))throw new Error(`Fingerprint paths must be valid UTF-8: ${n||"."} contains filename bytes 0x${e.toString("hex")}`);return r}function D(t,n){const e=i.realpathSync.native(h.resolve(t)),r=_(n),o=[];let c=e;try{const l=i.lstatSync(e,{bigint:!0});if(!l.isDirectory()||l.isSymbolicLink())throw new Error(`Fingerprint root is not a physical directory: ${t}`);o.push(F(e,l));const f=r.length===0?[]:r.slice(0,-1);for(const[v,N]of f.entries()){c=h.join(c,N);const p=r.slice(0,v+1).join("/"),s=k(c);if(!s)return{ancestors:o,finalPath:c,finalStat:null,obstacle:{kind:"ancestor-missing",obstaclePath:p}};if(s.isSymbolicLink())return{ancestors:o,finalPath:c,finalStat:s,obstacle:{kind:"ancestor-symlink",obstaclePath:p,target:C(c,s,o)}};if(!s.isDirectory()){if(!s.isFile())throw E(p,s.mode);return{ancestors:o,finalPath:c,finalStat:s,obstacle:{kind:"ancestor-non-directory",mode:s.mode,obstaclePath:p}}}const L=F(c,s);o.push(L),y(o)}const b=r.length?h.join(e,...r):e,O=k(b);return y(o),{ancestors:o,finalPath:b,finalStat:O,obstacle:null}}catch(l){throw g(o),l}}function F(t,n){let e=null;if(process.platform!=="win32"){const r=Reflect.get(i.constants,"O_DIRECTORY"),o=Reflect.get(i.constants,"O_NOFOLLOW"),c=typeof r=="number"?r:0,l=typeof o=="number"?o:0;e=i.openSync(t,i.constants.O_RDONLY|c|l);const f=i.fstatSync(e,{bigint:!0});if(!f.isDirectory()||!m(f,n))throw i.closeSync(e),d(t)}return{fileDescriptor:e,identity:a(n),path:t}}function R(t,n){const e=Reflect.get(i.constants,"O_NOFOLLOW"),r=typeof e=="number"?e:0,o=i.openSync(t.finalPath,i.constants.O_RDONLY|r);try{const c=i.fstatSync(o,{bigint:!0});if(!c.isFile()||!physicalPathAndHandleIdentitiesEqual(a(n),a(c),process.platform))throw d(t.finalPath);u(t,c,"handle");const l=i.readFileSync(o),f=i.fstatSync(o,{bigint:!0});if(!x(c,f))throw d(t.finalPath);return u(t,f,"handle"),{contents:l,kind:"file",mode:f.mode}}finally{i.closeSync(o)}}function $(t,n){u(t,n);const e=i.readlinkSync(t.finalPath,{encoding:"buffer"});return u(t,n),e}function C(t,n,e){y(e);const r=i.readlinkSync(t,{encoding:"buffer"}),o=i.lstatSync(t,{bigint:!0});if(!o.isSymbolicLink()||!m(o,n))throw d(t);return y(e),r}function u(t,n,e="path"){y(t.ancestors);const r=i.lstatSync(t.finalPath,{bigint:!0});if(!(e==="handle"?physicalPathAndHandleIdentitiesEqual(a(r),a(n),process.platform):m(r,n)))throw d(t.finalPath)}function y(t){for(const n of t){const e=i.lstatSync(n.path,{bigint:!0});if(!e.isDirectory()||!S(a(e),n.identity))throw d(n.path);if(n.fileDescriptor!==null){const r=i.fstatSync(n.fileDescriptor,{bigint:!0});if(!r.isDirectory()||!S(a(r),n.identity))throw d(n.path)}}}function k(t){try{return i.lstatSync(t,{bigint:!0})}catch(n){if(P(n,"ENOENT")||P(n,"ENOTDIR"))return null;throw n}}function _(t){const n=t.replace(/^\.\/+/,"").replace(/\/+$/,"");if(!n)return[];const e=n.split("/");if(e.some(r=>r.length===0||r==="."||r===".."))throw new Error(`Invalid canonical fingerprint path: ${t}`);return e}function a(t){return{dev:t.dev,ino:t.ino,type:t.mode&w}}function m(t,n){return S(a(t),a(n))}function S(t,n){return t.dev===n.dev&&t.ino===n.ino&&t.type===n.type}function x(t,n){return m(t,n)&&t.mode===n.mode&&t.size===n.size&&t.mtimeNs===n.mtimeNs&&t.ctimeNs===n.ctimeNs}function g(t){for(const n of[...t].reverse())n.fileDescriptor!==null&&i.closeSync(n.fileDescriptor)}function d(t){return new Error(`Fingerprint path changed while reading: ${t}`)}function E(t,n){return new Error(`Fingerprinting does not support special filesystem nodes: ${t||"."} (${physicalNodeType(n)})`)}function P(t,n){return t!==null&&typeof t=="object"&&"code"in t&&Reflect.get(t,"code")===n}function T(t,n){return t<n?-1:t>n?1:0}
@@ -0,0 +1,6 @@
1
+ export interface GitRepository {
2
+ readonly host: string;
3
+ readonly name: string;
4
+ readonly owner: string;
5
+ }
6
+ export declare function parseGitRepository(remoteUrl: unknown): GitRepository | null;
@@ -0,0 +1 @@
1
+ export function parseGitRepository(e){if(typeof e!="string")return null;const n=e.trim();if(n.length===0)return null;const r=n.match(/^[^@/:\s]+@([^/:\s]+):([^/\s]+)\/([^/\s]+)$/u);if(r!==null)return s(r[1],r[2],r[3]);let t;try{t=new URL(n)}catch{return null}if(t.protocol!=="https:"&&t.protocol!=="ssh:"||t.search.length>0||t.hash.length>0)return null;const l=t.pathname.split("/").filter(Boolean);return l.length!==2?null:s(t.host,l[0],l[1])}function s(e,n,r){const t=r.replace(/\.git$/iu,"");return!e||!n||!t?null:{host:e,name:t,owner:n}}
@@ -0,0 +1,25 @@
1
+ import { type GitRepository } from "./remote.js";
2
+ export type RepoStateKind = "commit" | "dirty" | "nogit";
3
+ export interface RepoState {
4
+ branch: string | null;
5
+ cacheKey: string;
6
+ commitSha: string | null;
7
+ contentFingerprint: string | null;
8
+ detached: boolean;
9
+ dirty: boolean;
10
+ dirtyFingerprint: string | null;
11
+ kind: RepoStateKind;
12
+ pullRequest: number | null;
13
+ pullRequestHeadSha: string | null;
14
+ remoteUrl: string | null;
15
+ repository: GitRepository | null;
16
+ repoRoot: string | null;
17
+ worktreePath: string;
18
+ }
19
+ export type RepoStateMetadata = RepoState;
20
+ export interface CollectRepoStateOptions {
21
+ env?: Readonly<NodeJS.ProcessEnv>;
22
+ fingerprints?: unknown;
23
+ }
24
+ export declare function collectRepoState(productDir: string, options?: Readonly<CollectRepoStateOptions>): Promise<RepoState>;
25
+ export declare function summarizeRepoStateForMetadata(repoState: Readonly<RepoState> | null | undefined): RepoStateMetadata | null;