@smthrs/std 0.0.0-stage → 1.0.0-rc.3

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 (555) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/LICENSE +21 -0
  3. package/README.md +152 -2
  4. package/dist/cjs/ApplyPatch.d.ts +174 -0
  5. package/dist/cjs/ApplyPatch.d.ts.map +1 -0
  6. package/dist/cjs/ApplyPatch.js +309 -0
  7. package/dist/cjs/ApplyPatch.js.map +7 -0
  8. package/dist/cjs/Bash.d.ts +304 -0
  9. package/dist/cjs/Bash.d.ts.map +1 -0
  10. package/dist/cjs/Bash.js +321 -0
  11. package/dist/cjs/Bash.js.map +7 -0
  12. package/dist/cjs/Checkpoints.d.ts +279 -0
  13. package/dist/cjs/Checkpoints.d.ts.map +1 -0
  14. package/dist/cjs/Checkpoints.js +145 -0
  15. package/dist/cjs/Checkpoints.js.map +7 -0
  16. package/dist/cjs/Container.d.ts +132 -0
  17. package/dist/cjs/Container.d.ts.map +1 -0
  18. package/dist/cjs/Container.js +113 -0
  19. package/dist/cjs/Container.js.map +7 -0
  20. package/dist/cjs/Edit.d.ts +203 -0
  21. package/dist/cjs/Edit.d.ts.map +1 -0
  22. package/dist/cjs/Edit.js +258 -0
  23. package/dist/cjs/Edit.js.map +7 -0
  24. package/dist/cjs/ExaWebSearch.d.ts +22 -0
  25. package/dist/cjs/ExaWebSearch.d.ts.map +1 -0
  26. package/dist/cjs/ExaWebSearch.js +138 -0
  27. package/dist/cjs/ExaWebSearch.js.map +7 -0
  28. package/dist/cjs/Explore.d.ts +328 -0
  29. package/dist/cjs/Explore.d.ts.map +1 -0
  30. package/dist/cjs/Explore.js +90 -0
  31. package/dist/cjs/Explore.js.map +7 -0
  32. package/dist/cjs/Fetch.d.ts +130 -0
  33. package/dist/cjs/Fetch.d.ts.map +1 -0
  34. package/dist/cjs/Fetch.js +64 -0
  35. package/dist/cjs/Fetch.js.map +7 -0
  36. package/dist/cjs/Glob.d.ts +204 -0
  37. package/dist/cjs/Glob.d.ts.map +1 -0
  38. package/dist/cjs/Glob.js +94 -0
  39. package/dist/cjs/Glob.js.map +7 -0
  40. package/dist/cjs/Grep.d.ts +347 -0
  41. package/dist/cjs/Grep.d.ts.map +1 -0
  42. package/dist/cjs/Grep.js +181 -0
  43. package/dist/cjs/Grep.js.map +7 -0
  44. package/dist/cjs/HttpPost.d.ts +130 -0
  45. package/dist/cjs/HttpPost.d.ts.map +1 -0
  46. package/dist/cjs/HttpPost.js +72 -0
  47. package/dist/cjs/HttpPost.js.map +7 -0
  48. package/dist/cjs/LanguageServer.d.ts +90 -0
  49. package/dist/cjs/LanguageServer.d.ts.map +1 -0
  50. package/dist/cjs/LanguageServer.js +60 -0
  51. package/dist/cjs/LanguageServer.js.map +7 -0
  52. package/dist/cjs/Ls.d.ts +164 -0
  53. package/dist/cjs/Ls.d.ts.map +1 -0
  54. package/dist/cjs/Ls.js +136 -0
  55. package/dist/cjs/Ls.js.map +7 -0
  56. package/dist/cjs/Lsp.d.ts +125 -0
  57. package/dist/cjs/Lsp.d.ts.map +1 -0
  58. package/dist/cjs/Lsp.js +137 -0
  59. package/dist/cjs/Lsp.js.map +7 -0
  60. package/dist/cjs/Manifest.d.ts +918 -0
  61. package/dist/cjs/Manifest.d.ts.map +1 -0
  62. package/dist/cjs/Manifest.js +144 -0
  63. package/dist/cjs/Manifest.js.map +7 -0
  64. package/dist/cjs/NativeSearch.d.ts +38 -0
  65. package/dist/cjs/NativeSearch.d.ts.map +1 -0
  66. package/dist/cjs/NativeSearch.js +326 -0
  67. package/dist/cjs/NativeSearch.js.map +7 -0
  68. package/dist/cjs/NodeLanguageServer.d.ts +128 -0
  69. package/dist/cjs/NodeLanguageServer.d.ts.map +1 -0
  70. package/dist/cjs/NodeLanguageServer.js +796 -0
  71. package/dist/cjs/NodeLanguageServer.js.map +7 -0
  72. package/dist/cjs/PortableSearch.d.ts +24 -0
  73. package/dist/cjs/PortableSearch.d.ts.map +1 -0
  74. package/dist/cjs/PortableSearch.js +233 -0
  75. package/dist/cjs/PortableSearch.js.map +7 -0
  76. package/dist/cjs/Probe.d.ts +193 -0
  77. package/dist/cjs/Probe.d.ts.map +1 -0
  78. package/dist/cjs/Probe.js +134 -0
  79. package/dist/cjs/Probe.js.map +7 -0
  80. package/dist/cjs/Read.d.ts +189 -0
  81. package/dist/cjs/Read.d.ts.map +1 -0
  82. package/dist/cjs/Read.js +223 -0
  83. package/dist/cjs/Read.js.map +7 -0
  84. package/dist/cjs/Relocate.d.ts +73 -0
  85. package/dist/cjs/Relocate.d.ts.map +1 -0
  86. package/dist/cjs/Relocate.js +72 -0
  87. package/dist/cjs/Relocate.js.map +7 -0
  88. package/dist/cjs/Search.d.ts +163 -0
  89. package/dist/cjs/Search.d.ts.map +1 -0
  90. package/dist/cjs/Search.js +51 -0
  91. package/dist/cjs/Search.js.map +7 -0
  92. package/dist/cjs/SearchConformance.d.ts +115 -0
  93. package/dist/cjs/SearchConformance.d.ts.map +1 -0
  94. package/dist/cjs/SearchConformance.js +172 -0
  95. package/dist/cjs/SearchConformance.js.map +7 -0
  96. package/dist/cjs/SearchContract.d.ts +114 -0
  97. package/dist/cjs/SearchContract.d.ts.map +1 -0
  98. package/dist/cjs/SearchContract.js +339 -0
  99. package/dist/cjs/SearchContract.js.map +7 -0
  100. package/dist/cjs/ShellCommand.d.ts +164 -0
  101. package/dist/cjs/ShellCommand.d.ts.map +1 -0
  102. package/dist/cjs/ShellCommand.js +102 -0
  103. package/dist/cjs/ShellCommand.js.map +7 -0
  104. package/dist/cjs/StdError.d.ts +55 -0
  105. package/dist/cjs/StdError.d.ts.map +1 -0
  106. package/dist/cjs/StdError.js +74 -0
  107. package/dist/cjs/StdError.js.map +7 -0
  108. package/dist/cjs/TestRun.d.ts +311 -0
  109. package/dist/cjs/TestRun.d.ts.map +1 -0
  110. package/dist/cjs/TestRun.js +228 -0
  111. package/dist/cjs/TestRun.js.map +7 -0
  112. package/dist/cjs/TestRunner.d.ts +102 -0
  113. package/dist/cjs/TestRunner.d.ts.map +1 -0
  114. package/dist/cjs/TestRunner.js +54 -0
  115. package/dist/cjs/TestRunner.js.map +7 -0
  116. package/dist/cjs/TreeFingerprint.d.ts +140 -0
  117. package/dist/cjs/TreeFingerprint.d.ts.map +1 -0
  118. package/dist/cjs/TreeFingerprint.js +87 -0
  119. package/dist/cjs/TreeFingerprint.js.map +7 -0
  120. package/dist/cjs/UpdatePlan.d.ts +152 -0
  121. package/dist/cjs/UpdatePlan.d.ts.map +1 -0
  122. package/dist/cjs/UpdatePlan.js +87 -0
  123. package/dist/cjs/UpdatePlan.js.map +7 -0
  124. package/dist/cjs/WebFetch.d.ts +134 -0
  125. package/dist/cjs/WebFetch.d.ts.map +1 -0
  126. package/dist/cjs/WebFetch.js +140 -0
  127. package/dist/cjs/WebFetch.js.map +7 -0
  128. package/dist/cjs/WebSearch.d.ts +181 -0
  129. package/dist/cjs/WebSearch.d.ts.map +1 -0
  130. package/dist/cjs/WebSearch.js +86 -0
  131. package/dist/cjs/WebSearch.js.map +7 -0
  132. package/dist/cjs/Write.d.ts +147 -0
  133. package/dist/cjs/Write.d.ts.map +1 -0
  134. package/dist/cjs/Write.js +122 -0
  135. package/dist/cjs/Write.js.map +7 -0
  136. package/dist/cjs/index.d.ts +127 -0
  137. package/dist/cjs/index.d.ts.map +1 -0
  138. package/dist/cjs/index.js +99 -0
  139. package/dist/cjs/index.js.map +7 -0
  140. package/dist/cjs/internal/ApplyPatch.d.ts +145 -0
  141. package/dist/cjs/internal/ApplyPatch.d.ts.map +1 -0
  142. package/dist/cjs/internal/ApplyPatch.js +462 -0
  143. package/dist/cjs/internal/ApplyPatch.js.map +7 -0
  144. package/dist/cjs/internal/CodexText.d.ts +73 -0
  145. package/dist/cjs/internal/CodexText.d.ts.map +1 -0
  146. package/dist/cjs/internal/CodexText.js +108 -0
  147. package/dist/cjs/internal/CodexText.js.map +7 -0
  148. package/dist/cjs/internal/Declaration.d.ts +49 -0
  149. package/dist/cjs/internal/Declaration.d.ts.map +1 -0
  150. package/dist/cjs/internal/Declaration.js +46 -0
  151. package/dist/cjs/internal/Declaration.js.map +7 -0
  152. package/dist/cjs/internal/Diagnostics.d.ts +77 -0
  153. package/dist/cjs/internal/Diagnostics.d.ts.map +1 -0
  154. package/dist/cjs/internal/Diagnostics.js +89 -0
  155. package/dist/cjs/internal/Diagnostics.js.map +7 -0
  156. package/dist/cjs/internal/EnvelopePrecheck.d.ts +67 -0
  157. package/dist/cjs/internal/EnvelopePrecheck.d.ts.map +1 -0
  158. package/dist/cjs/internal/EnvelopePrecheck.js +124 -0
  159. package/dist/cjs/internal/EnvelopePrecheck.js.map +7 -0
  160. package/dist/cjs/internal/Exec.d.ts +139 -0
  161. package/dist/cjs/internal/Exec.d.ts.map +1 -0
  162. package/dist/cjs/internal/Exec.js +158 -0
  163. package/dist/cjs/internal/Exec.js.map +7 -0
  164. package/dist/cjs/internal/FileMutation.d.ts +109 -0
  165. package/dist/cjs/internal/FileMutation.d.ts.map +1 -0
  166. package/dist/cjs/internal/FileMutation.js +116 -0
  167. package/dist/cjs/internal/FileMutation.js.map +7 -0
  168. package/dist/cjs/internal/FsFailure.d.ts +38 -0
  169. package/dist/cjs/internal/FsFailure.d.ts.map +1 -0
  170. package/dist/cjs/internal/FsFailure.js +40 -0
  171. package/dist/cjs/internal/FsFailure.js.map +7 -0
  172. package/dist/cjs/internal/GitWorktree.d.ts +98 -0
  173. package/dist/cjs/internal/GitWorktree.d.ts.map +1 -0
  174. package/dist/cjs/internal/GitWorktree.js +270 -0
  175. package/dist/cjs/internal/GitWorktree.js.map +7 -0
  176. package/dist/cjs/internal/Grouping.d.ts +51 -0
  177. package/dist/cjs/internal/Grouping.d.ts.map +1 -0
  178. package/dist/cjs/internal/Grouping.js +83 -0
  179. package/dist/cjs/internal/Grouping.js.map +7 -0
  180. package/dist/cjs/internal/Html.d.ts +20 -0
  181. package/dist/cjs/internal/Html.d.ts.map +1 -0
  182. package/dist/cjs/internal/Html.js +81 -0
  183. package/dist/cjs/internal/Html.js.map +7 -0
  184. package/dist/cjs/internal/Http.d.ts +95 -0
  185. package/dist/cjs/internal/Http.d.ts.map +1 -0
  186. package/dist/cjs/internal/Http.js +153 -0
  187. package/dist/cjs/internal/Http.js.map +7 -0
  188. package/dist/cjs/internal/HttpNetwork.d.ts +27 -0
  189. package/dist/cjs/internal/HttpNetwork.d.ts.map +1 -0
  190. package/dist/cjs/internal/HttpNetwork.js +146 -0
  191. package/dist/cjs/internal/HttpNetwork.js.map +7 -0
  192. package/dist/cjs/internal/Ignore.d.ts +37 -0
  193. package/dist/cjs/internal/Ignore.d.ts.map +1 -0
  194. package/dist/cjs/internal/Ignore.js +100 -0
  195. package/dist/cjs/internal/Ignore.js.map +7 -0
  196. package/dist/cjs/internal/LinearRegex.d.ts +19 -0
  197. package/dist/cjs/internal/LinearRegex.d.ts.map +1 -0
  198. package/dist/cjs/internal/LinearRegex.js +166 -0
  199. package/dist/cjs/internal/LinearRegex.js.map +7 -0
  200. package/dist/cjs/internal/Match.d.ts +85 -0
  201. package/dist/cjs/internal/Match.d.ts.map +1 -0
  202. package/dist/cjs/internal/Match.js +99 -0
  203. package/dist/cjs/internal/Match.js.map +7 -0
  204. package/dist/cjs/internal/Paths.d.ts +23 -0
  205. package/dist/cjs/internal/Paths.d.ts.map +1 -0
  206. package/dist/cjs/internal/Paths.js +52 -0
  207. package/dist/cjs/internal/Paths.js.map +7 -0
  208. package/dist/cjs/internal/Preserve.d.ts +25 -0
  209. package/dist/cjs/internal/Preserve.d.ts.map +1 -0
  210. package/dist/cjs/internal/Preserve.js +88 -0
  211. package/dist/cjs/internal/Preserve.js.map +7 -0
  212. package/dist/cjs/internal/Prune.d.ts +35 -0
  213. package/dist/cjs/internal/Prune.d.ts.map +1 -0
  214. package/dist/cjs/internal/Prune.js +54 -0
  215. package/dist/cjs/internal/Prune.js.map +7 -0
  216. package/dist/cjs/internal/SearchContract.d.ts +63 -0
  217. package/dist/cjs/internal/SearchContract.d.ts.map +1 -0
  218. package/dist/cjs/internal/SearchContract.js +46 -0
  219. package/dist/cjs/internal/SearchContract.js.map +7 -0
  220. package/dist/cjs/internal/Symbols.d.ts +39 -0
  221. package/dist/cjs/internal/Symbols.d.ts.map +1 -0
  222. package/dist/cjs/internal/Symbols.js +59 -0
  223. package/dist/cjs/internal/Symbols.js.map +7 -0
  224. package/dist/cjs/internal/TestReport.d.ts +52 -0
  225. package/dist/cjs/internal/TestReport.d.ts.map +1 -0
  226. package/dist/cjs/internal/TestReport.js +131 -0
  227. package/dist/cjs/internal/TestReport.js.map +7 -0
  228. package/dist/cjs/internal/Text.d.ts +114 -0
  229. package/dist/cjs/internal/Text.d.ts.map +1 -0
  230. package/dist/cjs/internal/Text.js +82 -0
  231. package/dist/cjs/internal/Text.js.map +7 -0
  232. package/dist/cjs/internal/Url.d.ts +13 -0
  233. package/dist/cjs/internal/Url.d.ts.map +1 -0
  234. package/dist/cjs/internal/Url.js +35 -0
  235. package/dist/cjs/internal/Url.js.map +7 -0
  236. package/dist/cjs/internal/Walk.d.ts +72 -0
  237. package/dist/cjs/internal/Walk.d.ts.map +1 -0
  238. package/dist/cjs/internal/Walk.js +108 -0
  239. package/dist/cjs/internal/Walk.js.map +7 -0
  240. package/dist/cjs/package.json +1 -0
  241. package/dist/esm/ApplyPatch.d.ts +174 -0
  242. package/dist/esm/ApplyPatch.d.ts.map +1 -0
  243. package/dist/esm/ApplyPatch.js +346 -0
  244. package/dist/esm/ApplyPatch.js.map +1 -0
  245. package/dist/esm/Bash.d.ts +304 -0
  246. package/dist/esm/Bash.d.ts.map +1 -0
  247. package/dist/esm/Bash.js +469 -0
  248. package/dist/esm/Bash.js.map +1 -0
  249. package/dist/esm/Checkpoints.d.ts +279 -0
  250. package/dist/esm/Checkpoints.d.ts.map +1 -0
  251. package/dist/esm/Checkpoints.js +298 -0
  252. package/dist/esm/Checkpoints.js.map +1 -0
  253. package/dist/esm/Container.d.ts +132 -0
  254. package/dist/esm/Container.d.ts.map +1 -0
  255. package/dist/esm/Container.js +151 -0
  256. package/dist/esm/Container.js.map +1 -0
  257. package/dist/esm/Edit.d.ts +203 -0
  258. package/dist/esm/Edit.d.ts.map +1 -0
  259. package/dist/esm/Edit.js +296 -0
  260. package/dist/esm/Edit.js.map +1 -0
  261. package/dist/esm/ExaWebSearch.d.ts +22 -0
  262. package/dist/esm/ExaWebSearch.d.ts.map +1 -0
  263. package/dist/esm/ExaWebSearch.js +107 -0
  264. package/dist/esm/ExaWebSearch.js.map +1 -0
  265. package/dist/esm/Explore.d.ts +328 -0
  266. package/dist/esm/Explore.d.ts.map +1 -0
  267. package/dist/esm/Explore.js +106 -0
  268. package/dist/esm/Explore.js.map +1 -0
  269. package/dist/esm/Fetch.d.ts +130 -0
  270. package/dist/esm/Fetch.d.ts.map +1 -0
  271. package/dist/esm/Fetch.js +91 -0
  272. package/dist/esm/Fetch.js.map +1 -0
  273. package/dist/esm/Glob.d.ts +204 -0
  274. package/dist/esm/Glob.d.ts.map +1 -0
  275. package/dist/esm/Glob.js +177 -0
  276. package/dist/esm/Glob.js.map +1 -0
  277. package/dist/esm/Grep.d.ts +347 -0
  278. package/dist/esm/Grep.d.ts.map +1 -0
  279. package/dist/esm/Grep.js +289 -0
  280. package/dist/esm/Grep.js.map +1 -0
  281. package/dist/esm/HttpPost.d.ts +130 -0
  282. package/dist/esm/HttpPost.d.ts.map +1 -0
  283. package/dist/esm/HttpPost.js +89 -0
  284. package/dist/esm/HttpPost.js.map +1 -0
  285. package/dist/esm/LanguageServer.d.ts +90 -0
  286. package/dist/esm/LanguageServer.d.ts.map +1 -0
  287. package/dist/esm/LanguageServer.js +57 -0
  288. package/dist/esm/LanguageServer.js.map +1 -0
  289. package/dist/esm/Ls.d.ts +164 -0
  290. package/dist/esm/Ls.d.ts.map +1 -0
  291. package/dist/esm/Ls.js +178 -0
  292. package/dist/esm/Ls.js.map +1 -0
  293. package/dist/esm/Lsp.d.ts +125 -0
  294. package/dist/esm/Lsp.d.ts.map +1 -0
  295. package/dist/esm/Lsp.js +165 -0
  296. package/dist/esm/Lsp.js.map +1 -0
  297. package/dist/esm/Manifest.d.ts +918 -0
  298. package/dist/esm/Manifest.d.ts.map +1 -0
  299. package/dist/esm/Manifest.js +153 -0
  300. package/dist/esm/Manifest.js.map +1 -0
  301. package/dist/esm/NativeSearch.d.ts +38 -0
  302. package/dist/esm/NativeSearch.d.ts.map +1 -0
  303. package/dist/esm/NativeSearch.js +378 -0
  304. package/dist/esm/NativeSearch.js.map +1 -0
  305. package/dist/esm/NodeLanguageServer.d.ts +128 -0
  306. package/dist/esm/NodeLanguageServer.d.ts.map +1 -0
  307. package/dist/esm/NodeLanguageServer.js +843 -0
  308. package/dist/esm/NodeLanguageServer.js.map +1 -0
  309. package/dist/esm/PortableSearch.d.ts +24 -0
  310. package/dist/esm/PortableSearch.d.ts.map +1 -0
  311. package/dist/esm/PortableSearch.js +240 -0
  312. package/dist/esm/PortableSearch.js.map +1 -0
  313. package/dist/esm/Probe.d.ts +193 -0
  314. package/dist/esm/Probe.d.ts.map +1 -0
  315. package/dist/esm/Probe.js +225 -0
  316. package/dist/esm/Probe.js.map +1 -0
  317. package/dist/esm/Read.d.ts +189 -0
  318. package/dist/esm/Read.d.ts.map +1 -0
  319. package/dist/esm/Read.js +300 -0
  320. package/dist/esm/Read.js.map +1 -0
  321. package/dist/esm/Relocate.d.ts +73 -0
  322. package/dist/esm/Relocate.d.ts.map +1 -0
  323. package/dist/esm/Relocate.js +153 -0
  324. package/dist/esm/Relocate.js.map +1 -0
  325. package/dist/esm/Search.d.ts +163 -0
  326. package/dist/esm/Search.d.ts.map +1 -0
  327. package/dist/esm/Search.js +47 -0
  328. package/dist/esm/Search.js.map +1 -0
  329. package/dist/esm/SearchConformance.d.ts +115 -0
  330. package/dist/esm/SearchConformance.d.ts.map +1 -0
  331. package/dist/esm/SearchConformance.js +193 -0
  332. package/dist/esm/SearchConformance.js.map +1 -0
  333. package/dist/esm/SearchContract.d.ts +114 -0
  334. package/dist/esm/SearchContract.d.ts.map +1 -0
  335. package/dist/esm/SearchContract.js +461 -0
  336. package/dist/esm/SearchContract.js.map +1 -0
  337. package/dist/esm/ShellCommand.d.ts +164 -0
  338. package/dist/esm/ShellCommand.d.ts.map +1 -0
  339. package/dist/esm/ShellCommand.js +159 -0
  340. package/dist/esm/ShellCommand.js.map +1 -0
  341. package/dist/esm/StdError.d.ts +55 -0
  342. package/dist/esm/StdError.d.ts.map +1 -0
  343. package/dist/esm/StdError.js +71 -0
  344. package/dist/esm/StdError.js.map +1 -0
  345. package/dist/esm/TestRun.d.ts +311 -0
  346. package/dist/esm/TestRun.d.ts.map +1 -0
  347. package/dist/esm/TestRun.js +316 -0
  348. package/dist/esm/TestRun.js.map +1 -0
  349. package/dist/esm/TestRunner.d.ts +102 -0
  350. package/dist/esm/TestRunner.d.ts.map +1 -0
  351. package/dist/esm/TestRunner.js +68 -0
  352. package/dist/esm/TestRunner.js.map +1 -0
  353. package/dist/esm/TreeFingerprint.d.ts +140 -0
  354. package/dist/esm/TreeFingerprint.d.ts.map +1 -0
  355. package/dist/esm/TreeFingerprint.js +170 -0
  356. package/dist/esm/TreeFingerprint.js.map +1 -0
  357. package/dist/esm/UpdatePlan.d.ts +152 -0
  358. package/dist/esm/UpdatePlan.d.ts.map +1 -0
  359. package/dist/esm/UpdatePlan.js +129 -0
  360. package/dist/esm/UpdatePlan.js.map +1 -0
  361. package/dist/esm/WebFetch.d.ts +134 -0
  362. package/dist/esm/WebFetch.d.ts.map +1 -0
  363. package/dist/esm/WebFetch.js +151 -0
  364. package/dist/esm/WebFetch.js.map +1 -0
  365. package/dist/esm/WebSearch.d.ts +181 -0
  366. package/dist/esm/WebSearch.d.ts.map +1 -0
  367. package/dist/esm/WebSearch.js +134 -0
  368. package/dist/esm/WebSearch.js.map +1 -0
  369. package/dist/esm/Write.d.ts +147 -0
  370. package/dist/esm/Write.d.ts.map +1 -0
  371. package/dist/esm/Write.js +144 -0
  372. package/dist/esm/Write.js.map +1 -0
  373. package/dist/esm/index.d.ts +127 -0
  374. package/dist/esm/index.d.ts.map +1 -0
  375. package/dist/esm/index.js +127 -0
  376. package/dist/esm/index.js.map +1 -0
  377. package/dist/esm/internal/ApplyPatch.d.ts +145 -0
  378. package/dist/esm/internal/ApplyPatch.d.ts.map +1 -0
  379. package/dist/esm/internal/ApplyPatch.js +489 -0
  380. package/dist/esm/internal/ApplyPatch.js.map +1 -0
  381. package/dist/esm/internal/CodexText.d.ts +73 -0
  382. package/dist/esm/internal/CodexText.d.ts.map +1 -0
  383. package/dist/esm/internal/CodexText.js +156 -0
  384. package/dist/esm/internal/CodexText.js.map +1 -0
  385. package/dist/esm/internal/Declaration.d.ts +49 -0
  386. package/dist/esm/internal/Declaration.d.ts.map +1 -0
  387. package/dist/esm/internal/Declaration.js +42 -0
  388. package/dist/esm/internal/Declaration.js.map +1 -0
  389. package/dist/esm/internal/Diagnostics.d.ts +77 -0
  390. package/dist/esm/internal/Diagnostics.d.ts.map +1 -0
  391. package/dist/esm/internal/Diagnostics.js +99 -0
  392. package/dist/esm/internal/Diagnostics.js.map +1 -0
  393. package/dist/esm/internal/EnvelopePrecheck.d.ts +67 -0
  394. package/dist/esm/internal/EnvelopePrecheck.d.ts.map +1 -0
  395. package/dist/esm/internal/EnvelopePrecheck.js +167 -0
  396. package/dist/esm/internal/EnvelopePrecheck.js.map +1 -0
  397. package/dist/esm/internal/Exec.d.ts +139 -0
  398. package/dist/esm/internal/Exec.d.ts.map +1 -0
  399. package/dist/esm/internal/Exec.js +193 -0
  400. package/dist/esm/internal/Exec.js.map +1 -0
  401. package/dist/esm/internal/FileMutation.d.ts +109 -0
  402. package/dist/esm/internal/FileMutation.d.ts.map +1 -0
  403. package/dist/esm/internal/FileMutation.js +123 -0
  404. package/dist/esm/internal/FileMutation.js.map +1 -0
  405. package/dist/esm/internal/FsFailure.d.ts +38 -0
  406. package/dist/esm/internal/FsFailure.d.ts.map +1 -0
  407. package/dist/esm/internal/FsFailure.js +39 -0
  408. package/dist/esm/internal/FsFailure.js.map +1 -0
  409. package/dist/esm/internal/GitWorktree.d.ts +98 -0
  410. package/dist/esm/internal/GitWorktree.d.ts.map +1 -0
  411. package/dist/esm/internal/GitWorktree.js +345 -0
  412. package/dist/esm/internal/GitWorktree.js.map +1 -0
  413. package/dist/esm/internal/Grouping.d.ts +51 -0
  414. package/dist/esm/internal/Grouping.d.ts.map +1 -0
  415. package/dist/esm/internal/Grouping.js +99 -0
  416. package/dist/esm/internal/Grouping.js.map +1 -0
  417. package/dist/esm/internal/Html.d.ts +20 -0
  418. package/dist/esm/internal/Html.d.ts.map +1 -0
  419. package/dist/esm/internal/Html.js +70 -0
  420. package/dist/esm/internal/Html.js.map +1 -0
  421. package/dist/esm/internal/Http.d.ts +95 -0
  422. package/dist/esm/internal/Http.d.ts.map +1 -0
  423. package/dist/esm/internal/Http.js +154 -0
  424. package/dist/esm/internal/Http.js.map +1 -0
  425. package/dist/esm/internal/HttpNetwork.d.ts +27 -0
  426. package/dist/esm/internal/HttpNetwork.d.ts.map +1 -0
  427. package/dist/esm/internal/HttpNetwork.js +114 -0
  428. package/dist/esm/internal/HttpNetwork.js.map +1 -0
  429. package/dist/esm/internal/Ignore.d.ts +37 -0
  430. package/dist/esm/internal/Ignore.d.ts.map +1 -0
  431. package/dist/esm/internal/Ignore.js +128 -0
  432. package/dist/esm/internal/Ignore.js.map +1 -0
  433. package/dist/esm/internal/LinearRegex.d.ts +19 -0
  434. package/dist/esm/internal/LinearRegex.d.ts.map +1 -0
  435. package/dist/esm/internal/LinearRegex.js +176 -0
  436. package/dist/esm/internal/LinearRegex.js.map +1 -0
  437. package/dist/esm/internal/Match.d.ts +85 -0
  438. package/dist/esm/internal/Match.d.ts.map +1 -0
  439. package/dist/esm/internal/Match.js +142 -0
  440. package/dist/esm/internal/Match.js.map +1 -0
  441. package/dist/esm/internal/Paths.d.ts +23 -0
  442. package/dist/esm/internal/Paths.d.ts.map +1 -0
  443. package/dist/esm/internal/Paths.js +40 -0
  444. package/dist/esm/internal/Paths.js.map +1 -0
  445. package/dist/esm/internal/Preserve.d.ts +25 -0
  446. package/dist/esm/internal/Preserve.d.ts.map +1 -0
  447. package/dist/esm/internal/Preserve.js +70 -0
  448. package/dist/esm/internal/Preserve.js.map +1 -0
  449. package/dist/esm/internal/Prune.d.ts +35 -0
  450. package/dist/esm/internal/Prune.d.ts.map +1 -0
  451. package/dist/esm/internal/Prune.js +60 -0
  452. package/dist/esm/internal/Prune.js.map +1 -0
  453. package/dist/esm/internal/SearchContract.d.ts +63 -0
  454. package/dist/esm/internal/SearchContract.d.ts.map +1 -0
  455. package/dist/esm/internal/SearchContract.js +66 -0
  456. package/dist/esm/internal/SearchContract.js.map +1 -0
  457. package/dist/esm/internal/Symbols.d.ts +39 -0
  458. package/dist/esm/internal/Symbols.d.ts.map +1 -0
  459. package/dist/esm/internal/Symbols.js +79 -0
  460. package/dist/esm/internal/Symbols.js.map +1 -0
  461. package/dist/esm/internal/TestReport.d.ts +52 -0
  462. package/dist/esm/internal/TestReport.d.ts.map +1 -0
  463. package/dist/esm/internal/TestReport.js +172 -0
  464. package/dist/esm/internal/TestReport.js.map +1 -0
  465. package/dist/esm/internal/Text.d.ts +114 -0
  466. package/dist/esm/internal/Text.d.ts.map +1 -0
  467. package/dist/esm/internal/Text.js +130 -0
  468. package/dist/esm/internal/Text.js.map +1 -0
  469. package/dist/esm/internal/Url.d.ts +13 -0
  470. package/dist/esm/internal/Url.d.ts.map +1 -0
  471. package/dist/esm/internal/Url.js +27 -0
  472. package/dist/esm/internal/Url.js.map +1 -0
  473. package/dist/esm/internal/Walk.d.ts +72 -0
  474. package/dist/esm/internal/Walk.d.ts.map +1 -0
  475. package/dist/esm/internal/Walk.js +126 -0
  476. package/dist/esm/internal/Walk.js.map +1 -0
  477. package/docs/README.md +117 -0
  478. package/docs/api.md +472 -0
  479. package/docs/concepts/effects-and-capabilities.md +136 -0
  480. package/docs/concepts/flows-and-handlers.md +115 -0
  481. package/docs/concepts/limits-and-disclosure.md +102 -0
  482. package/docs/concepts/search-contract.md +182 -0
  483. package/docs/guides/bind-the-standard-flows.md +114 -0
  484. package/docs/guides/implement-a-search-peer.md +133 -0
  485. package/docs/guides/pin-a-checkpoint.md +141 -0
  486. package/docs/guides/query-a-language-server.md +257 -0
  487. package/docs/guides/reach-the-network.md +141 -0
  488. package/docs/guides/read-and-edit-a-file.md +240 -0
  489. package/docs/guides/run-a-shell-command.md +215 -0
  490. package/docs/guides/run-the-test-suite.md +154 -0
  491. package/docs/guides/search-a-workspace.md +148 -0
  492. package/docs/installation.md +111 -0
  493. package/docs/quickstart.md +125 -0
  494. package/docs/reference/flows.md +556 -0
  495. package/docs/troubleshooting.md +322 -0
  496. package/package.json +439 -3
  497. package/src/ApplyPatch.ts +458 -0
  498. package/src/Bash.ts +549 -0
  499. package/src/Checkpoints.ts +422 -0
  500. package/src/Container.ts +212 -0
  501. package/src/Edit.ts +366 -0
  502. package/src/ExaWebSearch.ts +145 -0
  503. package/src/Explore.ts +139 -0
  504. package/src/Fetch.ts +117 -0
  505. package/src/Glob.ts +200 -0
  506. package/src/Grep.ts +320 -0
  507. package/src/HttpPost.ts +120 -0
  508. package/src/LanguageServer.ts +110 -0
  509. package/src/Ls.ts +228 -0
  510. package/src/Lsp.ts +184 -0
  511. package/src/Manifest.ts +162 -0
  512. package/src/NativeSearch.ts +457 -0
  513. package/src/NodeLanguageServer.ts +1148 -0
  514. package/src/PortableSearch.ts +264 -0
  515. package/src/Probe.ts +284 -0
  516. package/src/Read.ts +359 -0
  517. package/src/Relocate.ts +166 -0
  518. package/src/Search.ts +185 -0
  519. package/src/SearchConformance.ts +288 -0
  520. package/src/SearchContract.ts +489 -0
  521. package/src/ShellCommand.ts +201 -0
  522. package/src/StdError.ts +80 -0
  523. package/src/TestRun.ts +401 -0
  524. package/src/TestRunner.ts +119 -0
  525. package/src/TreeFingerprint.ts +200 -0
  526. package/src/UpdatePlan.ts +171 -0
  527. package/src/WebFetch.ts +194 -0
  528. package/src/WebSearch.ts +165 -0
  529. package/src/Write.ts +195 -0
  530. package/src/index.ts +154 -0
  531. package/src/internal/ApplyPatch.ts +601 -0
  532. package/src/internal/CodexText.ts +182 -0
  533. package/src/internal/Declaration.ts +60 -0
  534. package/src/internal/Diagnostics.ts +134 -0
  535. package/src/internal/EnvelopePrecheck.ts +233 -0
  536. package/src/internal/Exec.ts +314 -0
  537. package/src/internal/FileMutation.ts +231 -0
  538. package/src/internal/FsFailure.ts +51 -0
  539. package/src/internal/GitWorktree.ts +473 -0
  540. package/src/internal/Grouping.ts +106 -0
  541. package/src/internal/Html.ts +87 -0
  542. package/src/internal/Http.ts +209 -0
  543. package/src/internal/HttpNetwork.ts +153 -0
  544. package/src/internal/Ignore.ts +135 -0
  545. package/src/internal/LinearRegex.ts +173 -0
  546. package/src/internal/Match.ts +172 -0
  547. package/src/internal/Paths.ts +42 -0
  548. package/src/internal/Preserve.ts +108 -0
  549. package/src/internal/Prune.ts +62 -0
  550. package/src/internal/SearchContract.ts +77 -0
  551. package/src/internal/Symbols.ts +88 -0
  552. package/src/internal/TestReport.ts +194 -0
  553. package/src/internal/Text.ts +170 -0
  554. package/src/internal/Url.ts +23 -0
  555. package/src/internal/Walk.ts +176 -0
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Path containment checks against a declared effect envelope.
3
+ *
4
+ * @since 1.0.0
5
+ */
6
+ /**
7
+ * Whether a path is covered by any entry of a declared read or write set.
8
+ *
9
+ * An entry covers itself, everything beneath it when it names a directory,
10
+ * and everything matched by the prefix-glob subset `/core` supports.
11
+ *
12
+ * @category predicates
13
+ * @since 1.0.0
14
+ */
15
+ export declare const withinEnvelope: (declared: ReadonlyArray<string>, path: string) => boolean;
16
+ /**
17
+ * A path without its trailing slashes, so a root compares and joins as one name.
18
+ *
19
+ * @category conversions
20
+ * @since 1.0.0
21
+ */
22
+ export declare const withoutTrailingSlash: (path: string) => string;
23
+ //# sourceMappingURL=Paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paths.d.ts","sourceRoot":"","sources":["../../../src/internal/Paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,MAAM,KAAG,OAS9E,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,MAAkC,CAAA"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Path containment checks against a declared effect envelope.
3
+ *
4
+ * @since 1.0.0
5
+ */
6
+ import * as Effects from "@smthrs/core/Effects";
7
+ const normalize = (path) => {
8
+ const collapsed = path.replace(/\/+/g, "/");
9
+ return collapsed.length > 1 ? collapsed.replace(/\/+$/, "") : collapsed;
10
+ };
11
+ const hasDotSegment = (path) => path.split("/").some((segment) => segment === "." || segment === "..");
12
+ /**
13
+ * Whether a path is covered by any entry of a declared read or write set.
14
+ *
15
+ * An entry covers itself, everything beneath it when it names a directory,
16
+ * and everything matched by the prefix-glob subset `/core` supports.
17
+ *
18
+ * @category predicates
19
+ * @since 1.0.0
20
+ */
21
+ export const withinEnvelope = (declared, path) => {
22
+ const candidate = normalize(path);
23
+ if (candidate === "" || hasDotSegment(candidate))
24
+ return false;
25
+ return declared.some((entry) => {
26
+ const normalized = normalize(entry);
27
+ if (normalized === "")
28
+ return false;
29
+ const envelope = normalized === "/" ? "/**" : normalized;
30
+ return Effects.covers(envelope, candidate) || candidate.startsWith(`${normalized}/`);
31
+ });
32
+ };
33
+ /**
34
+ * A path without its trailing slashes, so a root compares and joins as one name.
35
+ *
36
+ * @category conversions
37
+ * @since 1.0.0
38
+ */
39
+ export const withoutTrailingSlash = (path) => path.replace(/\/+$/, "");
40
+ //# sourceMappingURL=Paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paths.js","sourceRoot":"","sources":["../../../src/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;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA","sourcesContent":["/**\n * Path containment checks against a declared effect envelope.\n *\n * @since 1.0.0\n */\n\nimport * as Effects from \"@smthrs/core/Effects\"\n\nconst normalize = (path: string): string => {\n const collapsed = path.replace(/\\/+/g, \"/\")\n return collapsed.length > 1 ? collapsed.replace(/\\/+$/, \"\") : collapsed\n}\n\nconst hasDotSegment = (path: string): boolean => path.split(\"/\").some((segment) => segment === \".\" || segment === \"..\")\n\n/**\n * Whether a path is covered by any entry of a declared read or write set.\n *\n * An entry covers itself, everything beneath it when it names a directory,\n * and everything matched by the prefix-glob subset `/core` supports.\n *\n * @category predicates\n * @since 1.0.0\n */\nexport const withinEnvelope = (declared: ReadonlyArray<string>, path: string): boolean => {\n const candidate = normalize(path)\n if (candidate === \"\" || hasDotSegment(candidate)) return false\n return declared.some((entry) => {\n const normalized = normalize(entry)\n if (normalized === \"\") return false\n const envelope = normalized === \"/\" ? \"/**\" : normalized\n return Effects.covers(envelope, candidate) || candidate.startsWith(`${normalized}/`)\n })\n}\n\n/**\n * A path without its trailing slashes, so a root compares and joins as one name.\n *\n * @category conversions\n * @since 1.0.0\n */\nexport const withoutTrailingSlash = (path: string): string => path.replace(/\\/+$/, \"\")\n"]}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Per-file atomic replacement that preserves permission bits and ownership.
3
+ * The sibling is complete before rename; no crash-durability guarantee is made.
4
+ * A file whose owner this process cannot assign is rewritten in place instead.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ import * as Effect from "effect/Effect";
9
+ import type * as FileSystem from "effect/FileSystem";
10
+ import type * as PlatformError from "effect/PlatformError";
11
+ /**
12
+ * Replaces a file's text atomically, preserving its permission bits and owner.
13
+ *
14
+ * @category filesystem
15
+ * @since 1.0.0
16
+ */
17
+ export declare const writeFileString: (fileSystem: FileSystem.FileSystem, path: string, content: string) => Effect.Effect<void, PlatformError.PlatformError>;
18
+ /**
19
+ * Replaces a file's bytes with the same atomic boundary used for text writes.
20
+ *
21
+ * @category filesystem
22
+ * @since 1.0.0
23
+ */
24
+ export declare const writeFile: (fileSystem: FileSystem.FileSystem, path: string, content: Uint8Array) => Effect.Effect<void, PlatformError.PlatformError>;
25
+ //# sourceMappingURL=Preserve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preserve.d.ts","sourceRoot":"","sources":["../../../src/internal/Preserve.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,KAAK,aAAa,MAAM,sBAAsB,CAAA;AAI1D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,UAAU,CAAC,UAAU,EACjC,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,aAAa,CAC8D,CAAA;AAEhH;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GACpB,YAAY,UAAU,CAAC,UAAU,EACjC,MAAM,MAAM,EACZ,SAAS,UAAU,KAClB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,aAAa,CACwD,CAAA"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Per-file atomic replacement that preserves permission bits and ownership.
3
+ * The sibling is complete before rename; no crash-durability guarantee is made.
4
+ * A file whose owner this process cannot assign is rewritten in place instead.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ import * as Effect from "effect/Effect";
9
+ import * as Option from "effect/Option";
10
+ const permissions = 0o7777;
11
+ /**
12
+ * Replaces a file's text atomically, preserving its permission bits and owner.
13
+ *
14
+ * @category filesystem
15
+ * @since 1.0.0
16
+ */
17
+ export const writeFileString = (fileSystem, path, content) => replace(fileSystem, path, (target, flag, mode) => fileSystem.writeFileString(target, content, { flag, mode }));
18
+ /**
19
+ * Replaces a file's bytes with the same atomic boundary used for text writes.
20
+ *
21
+ * @category filesystem
22
+ * @since 1.0.0
23
+ */
24
+ export const writeFile = (fileSystem, path, content) => replace(fileSystem, path, (target, flag, mode) => fileSystem.writeFile(target, content, { flag, mode }));
25
+ const replace = (fileSystem, path, write) => Effect.gen(function* () {
26
+ const before = yield* fileSystem.stat(path).pipe(Effect.catch((error) => error.reason._tag === "NotFound" ? Effect.succeed(undefined) : Effect.fail(error)));
27
+ // Keep following an existing symlink, as an in-place write did.
28
+ const destination = before === undefined ? path : yield* fileSystem.realPath(path);
29
+ const temporary = destination.replace(/[^/\\]+$/, `.smithers-${globalThis.crypto.randomUUID()}.tmp`);
30
+ let owned = true;
31
+ // Set when the sibling cannot take the file's owner; see the chown below.
32
+ let inPlace = false;
33
+ yield* Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
34
+ // Let the host finish its write before cancellation can unlink the name.
35
+ yield* write(temporary, "wx", before === undefined ? undefined : before.mode & permissions).pipe(Effect.tapError((error) => Effect.sync(() => {
36
+ if (error.reason._tag === "AlreadyExists")
37
+ owned = false;
38
+ })));
39
+ yield* restore(Effect.gen(function* () {
40
+ if (before === undefined)
41
+ return;
42
+ const after = yield* fileSystem.stat(temporary);
43
+ const uid = Option.getOrUndefined(before.uid);
44
+ const gid = Option.getOrUndefined(before.gid);
45
+ const ownerChanged = (uid !== undefined && uid !== Option.getOrUndefined(after.uid)) ||
46
+ (gid !== undefined && gid !== Option.getOrUndefined(after.gid));
47
+ if (ownerChanged) {
48
+ // Only root may give a file away. A writable file owned by another
49
+ // user (a shared checkout, a bind mount) cannot be replaced by a
50
+ // sibling this process owns without changing its owner, so it is
51
+ // rewritten in place instead: same inode, owner, and mode, at the
52
+ // cost of atomicity.
53
+ const chowned = yield* fileSystem.chown(temporary, uid ?? -1, gid ?? -1).pipe(Effect.as(true), Effect.catch((error) => error.reason._tag === "PermissionDenied" ? Effect.succeed(false) : Effect.fail(error)));
54
+ if (!chowned) {
55
+ inPlace = true;
56
+ return;
57
+ }
58
+ }
59
+ // chown may clear set-id bits, so permissions are restored last.
60
+ if (ownerChanged || (after.mode & permissions) !== (before.mode & permissions)) {
61
+ yield* fileSystem.chmod(temporary, before.mode & permissions);
62
+ }
63
+ }));
64
+ if (!inPlace)
65
+ yield* fileSystem.rename(temporary, destination);
66
+ }).pipe(Effect.ensuring(Effect.suspend(() => owned ? fileSystem.remove(temporary, { force: true }).pipe(Effect.orDie) : Effect.void))));
67
+ if (inPlace)
68
+ yield* write(destination, "w", undefined);
69
+ });
70
+ //# sourceMappingURL=Preserve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preserve.js","sourceRoot":"","sources":["../../../src/internal/Preserve.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,MAAM,WAAW,GAAG,MAAM,CAAA;AAE1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,UAAiC,EACjC,IAAY,EACZ,OAAe,EACmC,EAAE,CACpD,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAEhH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,UAAiC,EACjC,IAAY,EACZ,OAAmB,EAC+B,EAAE,CACpD,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,E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CACtF,CACF,CAAA;gBACD,IAAI,CAAC,OAAO,EAAE,CAAC;oBACb,OAAO,GAAG,IAAI,CAAA;oBACd,OAAM;gBACR,CAAC;YACH,CAAC;YACD,iEAAiE;YACjE,IAAI,YAAY,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC,EAAE,CAAC;gBAC/E,KAAK,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC,CAAA;YAC/D,CAAC;QACH,CAAC,CAAC,CAAC,CAAA;QACH,IAAI,CAAC,OAAO;YAAE,KAAK,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IAChE,CAAC,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CACb,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAC7G,CACF,CACF,CAAA;IACD,IAAI,OAAO;QAAE,KAAK,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,CAAA;AACxD,CAAC,CAAC,CAAA","sourcesContent":["/**\n * Per-file atomic replacement that preserves permission bits and ownership.\n * The sibling is complete before rename; no crash-durability guarantee is made.\n * A file whose owner this process cannot assign is rewritten in place instead.\n *\n * @since 1.0.0\n */\n\nimport * as Effect from \"effect/Effect\"\nimport type * as FileSystem from \"effect/FileSystem\"\nimport * as Option from \"effect/Option\"\nimport type * as PlatformError from \"effect/PlatformError\"\n\nconst permissions = 0o7777\n\n/**\n * Replaces a file's text atomically, preserving its permission bits and owner.\n *\n * @category filesystem\n * @since 1.0.0\n */\nexport const writeFileString = (\n fileSystem: FileSystem.FileSystem,\n path: string,\n content: string\n): Effect.Effect<void, PlatformError.PlatformError> =>\n replace(fileSystem, path, (target, flag, mode) => fileSystem.writeFileString(target, content, { flag, mode }))\n\n/**\n * Replaces a file's bytes with the same atomic boundary used for text writes.\n *\n * @category filesystem\n * @since 1.0.0\n */\nexport const writeFile = (\n fileSystem: FileSystem.FileSystem,\n path: string,\n content: Uint8Array\n): Effect.Effect<void, PlatformError.PlatformError> =>\n replace(fileSystem, path, (target, flag, mode) => fileSystem.writeFile(target, content, { flag, mode }))\n\nconst replace = (\n fileSystem: FileSystem.FileSystem,\n path: string,\n write: (\n target: string,\n flag: \"wx\" | \"w\",\n mode: number | undefined\n ) => Effect.Effect<void, PlatformError.PlatformError>\n): Effect.Effect<void, PlatformError.PlatformError> =>\n Effect.gen(function*() {\n const before = yield* fileSystem.stat(path).pipe(\n Effect.catch((error) => error.reason._tag === \"NotFound\" ? Effect.succeed(undefined) : Effect.fail(error))\n )\n // Keep following an existing symlink, as an in-place write did.\n const destination = before === undefined ? path : yield* fileSystem.realPath(path)\n const temporary = destination.replace(/[^/\\\\]+$/, `.smithers-${globalThis.crypto.randomUUID()}.tmp`)\n let owned = true\n // Set when the sibling cannot take the file's owner; see the chown below.\n let inPlace = false\n yield* Effect.uninterruptibleMask((restore) =>\n Effect.gen(function*() {\n // Let the host finish its write before cancellation can unlink the name.\n yield* write(temporary, \"wx\", before === undefined ? undefined : before.mode & permissions).pipe(\n Effect.tapError((error) =>\n Effect.sync(() => {\n if (error.reason._tag === \"AlreadyExists\") owned = false\n })\n )\n )\n yield* restore(Effect.gen(function*() {\n if (before === undefined) return\n const after = yield* fileSystem.stat(temporary)\n const uid = Option.getOrUndefined(before.uid)\n const gid = Option.getOrUndefined(before.gid)\n const ownerChanged = (uid !== undefined && uid !== Option.getOrUndefined(after.uid)) ||\n (gid !== undefined && gid !== Option.getOrUndefined(after.gid))\n if (ownerChanged) {\n // Only root may give a file away. A writable file owned by another\n // user (a shared checkout, a bind mount) cannot be replaced by a\n // sibling this process owns without changing its owner, so it is\n // rewritten in place instead: same inode, owner, and mode, at the\n // cost of atomicity.\n const chowned = yield* fileSystem.chown(temporary, uid ?? -1, gid ?? -1).pipe(\n Effect.as(true),\n Effect.catch((error) =>\n error.reason._tag === \"PermissionDenied\" ? Effect.succeed(false) : Effect.fail(error)\n )\n )\n if (!chowned) {\n inPlace = true\n return\n }\n }\n // chown may clear set-id bits, so permissions are restored last.\n if (ownerChanged || (after.mode & permissions) !== (before.mode & permissions)) {\n yield* fileSystem.chmod(temporary, before.mode & permissions)\n }\n }))\n if (!inPlace) yield* fileSystem.rename(temporary, destination)\n }).pipe(\n Effect.ensuring(\n Effect.suspend(() => owned ? fileSystem.remove(temporary, { force: true }).pipe(Effect.orDie) : Effect.void)\n )\n )\n )\n if (inPlace) yield* write(destination, \"w\", undefined)\n })\n"]}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The one list of directory names a repository walk leaves out.
3
+ *
4
+ * `grep`, `glob` and `ls` walks, the tree fingerprint, and workspace
5
+ * observation all read this list, so a directory one of them skips is never
6
+ * counted, matched, or fingerprinted by another. Every entry is derived state:
7
+ * version-control internals, dependency trees, caches, and the scratch
8
+ * checkouts the checkpoint and test-baseline flows create inside the
9
+ * workspace. A scratch checkout is a full copy of the repository at an older
10
+ * commit, so walking it duplicates every match from a stale tree.
11
+ *
12
+ * @since 1.0.0
13
+ */
14
+ /**
15
+ * Workspace-relative directory holding checkpoint checkouts.
16
+ *
17
+ * @private
18
+ * @since 1.0.0
19
+ */
20
+ export declare const checkpointScratch = ".flows-checkpoints";
21
+ /**
22
+ * Workspace-relative directory holding test-baseline checkouts.
23
+ *
24
+ * @private
25
+ * @since 1.0.0
26
+ */
27
+ export declare const testBaseScratch = ".flows-test-base";
28
+ /**
29
+ * Directory basenames no repository walk descends into.
30
+ *
31
+ * @private
32
+ * @since 1.0.0
33
+ */
34
+ export declare const repositoryDirectories: ReadonlyArray<string>;
35
+ //# sourceMappingURL=Prune.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Prune.d.ts","sourceRoot":"","sources":["../../../src/internal/Prune.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,uBAAuB,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAyBvD,CAAA"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The one list of directory names a repository walk leaves out.
3
+ *
4
+ * `grep`, `glob` and `ls` walks, the tree fingerprint, and workspace
5
+ * observation all read this list, so a directory one of them skips is never
6
+ * counted, matched, or fingerprinted by another. Every entry is derived state:
7
+ * version-control internals, dependency trees, caches, and the scratch
8
+ * checkouts the checkpoint and test-baseline flows create inside the
9
+ * workspace. A scratch checkout is a full copy of the repository at an older
10
+ * commit, so walking it duplicates every match from a stale tree.
11
+ *
12
+ * @since 1.0.0
13
+ */
14
+ /**
15
+ * Workspace-relative directory holding checkpoint checkouts.
16
+ *
17
+ * @private
18
+ * @since 1.0.0
19
+ */
20
+ export const checkpointScratch = ".flows-checkpoints";
21
+ /**
22
+ * Workspace-relative directory holding test-baseline checkouts.
23
+ *
24
+ * @private
25
+ * @since 1.0.0
26
+ */
27
+ export const testBaseScratch = ".flows-test-base";
28
+ /**
29
+ * Directory basenames no repository walk descends into.
30
+ *
31
+ * @private
32
+ * @since 1.0.0
33
+ */
34
+ export const repositoryDirectories = [
35
+ ".git",
36
+ ".hg",
37
+ ".jj",
38
+ ".svn",
39
+ ".flows",
40
+ ".artifacts",
41
+ ".backend-go-modcache",
42
+ ".pnpm-store",
43
+ ".worktrees",
44
+ "worktrees",
45
+ checkpointScratch,
46
+ testBaseScratch,
47
+ "node_modules",
48
+ "__pycache__",
49
+ ".venv",
50
+ ".tox",
51
+ ".nox",
52
+ ".eggs",
53
+ ".mypy_cache",
54
+ ".pytest_cache",
55
+ ".ruff_cache",
56
+ ".gradle",
57
+ ".turbo",
58
+ ".next"
59
+ ];
60
+ //# sourceMappingURL=Prune.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Prune.js","sourceRoot":"","sources":["../../../src/internal/Prune.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAA;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,sBAAsB;IACtB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,aAAa;IACb,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,aAAa;IACb,eAAe;IACf,aAAa;IACb,SAAS;IACT,QAAQ;IACR,OAAO;CACR,CAAA","sourcesContent":["/**\n * The one list of directory names a repository walk leaves out.\n *\n * `grep`, `glob` and `ls` walks, the tree fingerprint, and workspace\n * observation all read this list, so a directory one of them skips is never\n * counted, matched, or fingerprinted by another. Every entry is derived state:\n * version-control internals, dependency trees, caches, and the scratch\n * checkouts the checkpoint and test-baseline flows create inside the\n * workspace. A scratch checkout is a full copy of the repository at an older\n * commit, so walking it duplicates every match from a stale tree.\n *\n * @since 1.0.0\n */\n\n/**\n * Workspace-relative directory holding checkpoint checkouts.\n *\n * @private\n * @since 1.0.0\n */\nexport const checkpointScratch = \".flows-checkpoints\"\n\n/**\n * Workspace-relative directory holding test-baseline checkouts.\n *\n * @private\n * @since 1.0.0\n */\nexport const testBaseScratch = \".flows-test-base\"\n\n/**\n * Directory basenames no repository walk descends into.\n *\n * @private\n * @since 1.0.0\n */\nexport const repositoryDirectories: ReadonlyArray<string> = [\n \".git\",\n \".hg\",\n \".jj\",\n \".svn\",\n \".flows\",\n \".artifacts\",\n \".backend-go-modcache\",\n \".pnpm-store\",\n \".worktrees\",\n \"worktrees\",\n checkpointScratch,\n testBaseScratch,\n \"node_modules\",\n \"__pycache__\",\n \".venv\",\n \".tox\",\n \".nox\",\n \".eggs\",\n \".mypy_cache\",\n \".pytest_cache\",\n \".ruff_cache\",\n \".gradle\",\n \".turbo\",\n \".next\"\n]\n"]}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The failure constructors and the literal escape both Search peers share.
3
+ *
4
+ * The validation and matching rules themselves are public, in
5
+ * `../SearchContract.ts`, because an external peer has to build on them. What
6
+ * is left here is what an external peer never calls: the three `StdError`
7
+ * shapes the contract fails with, the root-failure mapping, and the regex escape a fixed-string search
8
+ * applies before compiling.
9
+ *
10
+ * @since 1.0.0
11
+ */
12
+ import type * as PlatformError from "effect/PlatformError";
13
+ import * as StdError from "../StdError.ts";
14
+ /**
15
+ * Constructs the common unsupported-pattern failure.
16
+ *
17
+ * @private
18
+ * @since 1.0.0
19
+ */
20
+ export declare const invalidPattern: (pattern: string, detail: string) => StdError.StdError;
21
+ /**
22
+ * How every rejection {@link invalidPattern} writes begins.
23
+ *
24
+ * @private
25
+ * @since 1.0.0
26
+ */
27
+ export declare const rejectionPrefix = "Unsupported ripgrep pattern ";
28
+ /**
29
+ * Constructs the common invalid-options failure.
30
+ *
31
+ * @private
32
+ * @since 1.0.0
33
+ */
34
+ export declare const invalidInput: (detail: string) => StdError.StdError;
35
+ /**
36
+ * Constructs the common missing-root failure.
37
+ *
38
+ * @private
39
+ * @since 1.0.0
40
+ */
41
+ export declare const notFound: (path: string) => StdError.StdError;
42
+ /**
43
+ * Maps a failure to inspect the search root onto the contract's failures.
44
+ *
45
+ * Only a root that does not exist is `not_found`. Every other reason a stat
46
+ * or listing can fail (a guarded host that fails closed, a permission the
47
+ * process lacks, an I/O error) is a host operation failing, and it is
48
+ * reported as `command_failed` with the platform's own message, so the
49
+ * caller reads the real cause instead of a missing-path claim about a path
50
+ * that exists.
51
+ *
52
+ * @private
53
+ * @since 1.0.0
54
+ */
55
+ export declare const rootFailure: (path: string, error: PlatformError.PlatformError) => StdError.StdError;
56
+ /**
57
+ * Escapes literal text for JavaScript regular expressions.
58
+ *
59
+ * @private
60
+ * @since 1.0.0
61
+ */
62
+ export declare const escapeRegex: (value: string) => string;
63
+ //# sourceMappingURL=SearchContract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchContract.d.ts","sourceRoot":"","sources":["../../../src/internal/SearchContract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,KAAK,aAAa,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,KAAG,QAAQ,CAAC,QACgC,CAAA;AAE1G;;;;;GAKG;AACH,eAAO,MAAM,eAAe,iCAAiC,CAAA;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,KAAG,QAAQ,CAAC,QAC0C,CAAA;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,QAAQ,CAAC,QACuC,CAAA;AAExF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,OAAO,aAAa,CAAC,aAAa,KAAG,QAAQ,CAAC,QAKyB,CAAA;AAEjH;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,MAAsD,CAAA"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The failure constructors and the literal escape both Search peers share.
3
+ *
4
+ * The validation and matching rules themselves are public, in
5
+ * `../SearchContract.ts`, because an external peer has to build on them. What
6
+ * is left here is what an external peer never calls: the three `StdError`
7
+ * shapes the contract fails with, the root-failure mapping, and the regex escape a fixed-string search
8
+ * applies before compiling.
9
+ *
10
+ * @since 1.0.0
11
+ */
12
+ import * as StdError from "../StdError.js";
13
+ /**
14
+ * Constructs the common unsupported-pattern failure.
15
+ *
16
+ * @private
17
+ * @since 1.0.0
18
+ */
19
+ export const invalidPattern = (pattern, detail) => new StdError.StdError({ code: "invalid_pattern", message: `${rejectionPrefix}"${pattern}": ${detail}` });
20
+ /**
21
+ * How every rejection {@link invalidPattern} writes begins.
22
+ *
23
+ * @private
24
+ * @since 1.0.0
25
+ */
26
+ export const rejectionPrefix = "Unsupported ripgrep pattern ";
27
+ /**
28
+ * Constructs the common invalid-options failure.
29
+ *
30
+ * @private
31
+ * @since 1.0.0
32
+ */
33
+ export const invalidInput = (detail) => new StdError.StdError({ code: "invalid_input", message: `Invalid ripgrep options: ${detail}` });
34
+ /**
35
+ * Constructs the common missing-root failure.
36
+ *
37
+ * @private
38
+ * @since 1.0.0
39
+ */
40
+ export const notFound = (path) => new StdError.StdError({ code: "not_found", message: `Path not found: ${path}`, path });
41
+ /**
42
+ * Maps a failure to inspect the search root onto the contract's failures.
43
+ *
44
+ * Only a root that does not exist is `not_found`. Every other reason a stat
45
+ * or listing can fail (a guarded host that fails closed, a permission the
46
+ * process lacks, an I/O error) is a host operation failing, and it is
47
+ * reported as `command_failed` with the platform's own message, so the
48
+ * caller reads the real cause instead of a missing-path claim about a path
49
+ * that exists.
50
+ *
51
+ * @private
52
+ * @since 1.0.0
53
+ */
54
+ export const rootFailure = (path, error) => error.reason._tag === "NotFound"
55
+ ? notFound(path)
56
+ : error.reason._tag === "PermissionDenied"
57
+ ? new StdError.StdError({ code: "permission_denied", message: `Cannot search ${path}: ${error.message}`, path })
58
+ : new StdError.StdError({ code: "command_failed", message: `Cannot search ${path}: ${error.message}`, path });
59
+ /**
60
+ * Escapes literal text for JavaScript regular expressions.
61
+ *
62
+ * @private
63
+ * @since 1.0.0
64
+ */
65
+ export const escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
66
+ //# sourceMappingURL=SearchContract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchContract.js","sourceRoot":"","sources":["../../../src/internal/SearchContract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,MAAc,EAAqB,EAAE,CACnF,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,eAAe,IAAI,OAAO,MAAM,MAAM,EAAE,EAAE,CAAC,CAAA;AAE1G;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,8BAA8B,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAqB,EAAE,CAChE,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,4BAA4B,MAAM,EAAE,EAAE,CAAC,CAAA;AAEjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAqB,EAAE,CAC1D,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;AAExF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,KAAkC,EAAqB,EAAE,CACjG,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU;IAC9B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IAChB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB;QAC1C,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,iBAAiB,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC;QAChH,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,iBAAiB,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;AAEjH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA","sourcesContent":["/**\n * The failure constructors and the literal escape both Search peers share.\n *\n * The validation and matching rules themselves are public, in\n * `../SearchContract.ts`, because an external peer has to build on them. What\n * is left here is what an external peer never calls: the three `StdError`\n * shapes the contract fails with, the root-failure mapping, and the regex escape a fixed-string search\n * applies before compiling.\n *\n * @since 1.0.0\n */\n\nimport type * as PlatformError from \"effect/PlatformError\"\nimport * as StdError from \"../StdError.ts\"\n\n/**\n * Constructs the common unsupported-pattern failure.\n *\n * @private\n * @since 1.0.0\n */\nexport const invalidPattern = (pattern: string, detail: string): StdError.StdError =>\n new StdError.StdError({ code: \"invalid_pattern\", message: `${rejectionPrefix}\"${pattern}\": ${detail}` })\n\n/**\n * How every rejection {@link invalidPattern} writes begins.\n *\n * @private\n * @since 1.0.0\n */\nexport const rejectionPrefix = \"Unsupported ripgrep pattern \"\n\n/**\n * Constructs the common invalid-options failure.\n *\n * @private\n * @since 1.0.0\n */\nexport const invalidInput = (detail: string): StdError.StdError =>\n new StdError.StdError({ code: \"invalid_input\", message: `Invalid ripgrep options: ${detail}` })\n\n/**\n * Constructs the common missing-root failure.\n *\n * @private\n * @since 1.0.0\n */\nexport const notFound = (path: string): StdError.StdError =>\n new StdError.StdError({ code: \"not_found\", message: `Path not found: ${path}`, path })\n\n/**\n * Maps a failure to inspect the search root onto the contract's failures.\n *\n * Only a root that does not exist is `not_found`. Every other reason a stat\n * or listing can fail (a guarded host that fails closed, a permission the\n * process lacks, an I/O error) is a host operation failing, and it is\n * reported as `command_failed` with the platform's own message, so the\n * caller reads the real cause instead of a missing-path claim about a path\n * that exists.\n *\n * @private\n * @since 1.0.0\n */\nexport const rootFailure = (path: string, error: PlatformError.PlatformError): StdError.StdError =>\n error.reason._tag === \"NotFound\"\n ? notFound(path)\n : error.reason._tag === \"PermissionDenied\"\n ? new StdError.StdError({ code: \"permission_denied\", message: `Cannot search ${path}: ${error.message}`, path })\n : new StdError.StdError({ code: \"command_failed\", message: `Cannot search ${path}: ${error.message}`, path })\n\n/**\n * Escapes literal text for JavaScript regular expressions.\n *\n * @private\n * @since 1.0.0\n */\nexport const escapeRegex = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n"]}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The definition a line sits inside, read off the file's own shape.
3
+ *
4
+ * A search hit is a line number, and a line number is not a read window. Agents
5
+ * guess one: `offset: line - 10, limit: 40`, which lands short (astropy-15569
6
+ * missed `get_lookup` by one line and probed the wrong binding) or long (six
7
+ * blind-offset reads on sympy-13878). The enclosing definition is the window the
8
+ * hit actually belongs to, and for indentation- and brace-structured source it
9
+ * is derivable from the text already in hand.
10
+ *
11
+ * This is a heuristic and reports only what it can see plainly: a declaration
12
+ * keyword, a name, and the block that keyword opens. When the shape is not
13
+ * plain — a match at top level, a language this table does not name, a
14
+ * declaration split across lines — it answers `undefined` rather than guessing,
15
+ * because a wrong window is worse than none.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ /**
20
+ * The definition enclosing a line.
21
+ *
22
+ * @category models
23
+ * @since 1.0.0
24
+ */
25
+ export interface Symbol {
26
+ readonly kind: string;
27
+ readonly name: string;
28
+ readonly startLine: number;
29
+ readonly endLine: number;
30
+ }
31
+ /**
32
+ * The definition enclosing a 1-based line, or `undefined` when there is none to
33
+ * read plainly.
34
+ *
35
+ * @category navigation
36
+ * @since 1.0.0
37
+ */
38
+ export declare const enclosing: (lines: ReadonlyArray<string>, line: number) => Symbol | undefined;
39
+ //# sourceMappingURL=Symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Symbols.d.ts","sourceRoot":"","sources":["../../../src/internal/Symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAgBD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,MAAM,KAAG,MAAM,GAAG,SAkC/E,CAAA"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * The definition a line sits inside, read off the file's own shape.
3
+ *
4
+ * A search hit is a line number, and a line number is not a read window. Agents
5
+ * guess one: `offset: line - 10, limit: 40`, which lands short (astropy-15569
6
+ * missed `get_lookup` by one line and probed the wrong binding) or long (six
7
+ * blind-offset reads on sympy-13878). The enclosing definition is the window the
8
+ * hit actually belongs to, and for indentation- and brace-structured source it
9
+ * is derivable from the text already in hand.
10
+ *
11
+ * This is a heuristic and reports only what it can see plainly: a declaration
12
+ * keyword, a name, and the block that keyword opens. When the shape is not
13
+ * plain — a match at top level, a language this table does not name, a
14
+ * declaration split across lines — it answers `undefined` rather than guessing,
15
+ * because a wrong window is worse than none.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ /**
20
+ * Declaration keywords this heuristic recognises across the languages the
21
+ * standard flows meet. Modifiers before the keyword are skipped, the name after
22
+ * it is captured, and everything else is left alone.
23
+ */
24
+ const declaration = /^([ \t]*)(?:(?:async|export|default|public|private|protected|internal|static|final|abstract|open|pub(?:\([^)]*\))?|unsafe|const|declare)[ \t]+)*(def|class|function|fn|func|struct|impl|interface|trait|enum|module|namespace|type|sub|method)[ \t]+([A-Za-z_$][A-Za-z0-9_$]*)/;
25
+ const closer = /^[ \t]*[)}\]]/;
26
+ const indentOf = (line) => /^[ \t]*/.exec(line)[0].length;
27
+ const blank = (line) => line.trim() === "";
28
+ /**
29
+ * The definition enclosing a 1-based line, or `undefined` when there is none to
30
+ * read plainly.
31
+ *
32
+ * @category navigation
33
+ * @since 1.0.0
34
+ */
35
+ export const enclosing = (lines, line) => {
36
+ const index = line - 1;
37
+ if (index < 0 || index >= lines.length)
38
+ return undefined;
39
+ // A blank match line has no indentation of its own; the nearest text above it
40
+ // does, and that is the block the blank line belongs to.
41
+ let reference = index;
42
+ while (reference > 0 && blank(lines[reference]))
43
+ reference--;
44
+ const indent = indentOf(lines[reference]);
45
+ let start = -1;
46
+ let parsed = null;
47
+ for (let candidate = index; candidate >= 0; candidate--) {
48
+ const text = lines[candidate];
49
+ if (blank(text))
50
+ continue;
51
+ const found = declaration.exec(text);
52
+ if (found === null)
53
+ continue;
54
+ if (candidate !== index && indentOf(text) >= indent)
55
+ continue;
56
+ start = candidate;
57
+ parsed = found;
58
+ break;
59
+ }
60
+ if (parsed === null)
61
+ return undefined;
62
+ const opening = indentOf(lines[start]);
63
+ let end = lines.length - 1;
64
+ for (let candidate = start + 1; candidate < lines.length; candidate++) {
65
+ const text = lines[candidate];
66
+ if (blank(text))
67
+ continue;
68
+ if (indentOf(text) > opening)
69
+ continue;
70
+ // A brace language closes the block at the declaration's own indentation,
71
+ // and that closing line is part of the definition rather than what follows.
72
+ end = closer.test(text) ? candidate : candidate - 1;
73
+ break;
74
+ }
75
+ while (end > start && blank(lines[end]))
76
+ end--;
77
+ return { kind: parsed[2], name: parsed[3], startLine: start + 1, endLine: end + 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**\n * The definition a line sits inside, read off the file's own shape.\n *\n * A search hit is a line number, and a line number is not a read window. Agents\n * guess one: `offset: line - 10, limit: 40`, which lands short (astropy-15569\n * missed `get_lookup` by one line and probed the wrong binding) or long (six\n * blind-offset reads on sympy-13878). The enclosing definition is the window the\n * hit actually belongs to, and for indentation- and brace-structured source it\n * is derivable from the text already in hand.\n *\n * This is a heuristic and reports only what it can see plainly: a declaration\n * keyword, a name, and the block that keyword opens. When the shape is not\n * plain — a match at top level, a language this table does not name, a\n * declaration split across lines — it answers `undefined` rather than guessing,\n * because a wrong window is worse than none.\n *\n * @since 1.0.0\n */\n\n/**\n * The definition enclosing a line.\n *\n * @category models\n * @since 1.0.0\n */\nexport interface Symbol {\n readonly kind: string\n readonly name: string\n readonly startLine: number\n readonly endLine: number\n}\n\n/**\n * Declaration keywords this heuristic recognises across the languages the\n * standard flows meet. Modifiers before the keyword are skipped, the name after\n * it is captured, and everything else is left alone.\n */\nconst declaration =\n /^([ \\t]*)(?:(?:async|export|default|public|private|protected|internal|static|final|abstract|open|pub(?:\\([^)]*\\))?|unsafe|const|declare)[ \\t]+)*(def|class|function|fn|func|struct|impl|interface|trait|enum|module|namespace|type|sub|method)[ \\t]+([A-Za-z_$][A-Za-z0-9_$]*)/\n\nconst closer = /^[ \\t]*[)}\\]]/\n\nconst indentOf = (line: string): number => /^[ \\t]*/.exec(line)![0].length\n\nconst blank = (line: string): boolean => line.trim() === \"\"\n\n/**\n * The definition enclosing a 1-based line, or `undefined` when there is none to\n * read plainly.\n *\n * @category navigation\n * @since 1.0.0\n */\nexport const enclosing = (lines: ReadonlyArray<string>, line: number): Symbol | undefined => {\n const index = line - 1\n if (index < 0 || index >= lines.length) return undefined\n // A blank match line has no indentation of its own; the nearest text above it\n // does, and that is the block the blank line belongs to.\n let reference = index\n while (reference > 0 && blank(lines[reference]!)) reference--\n const indent = indentOf(lines[reference]!)\n let start = -1\n let parsed: RegExpExecArray | null = null\n for (let candidate = index; candidate >= 0; candidate--) {\n const text = lines[candidate]!\n if (blank(text)) continue\n const found = declaration.exec(text)\n if (found === null) continue\n if (candidate !== index && indentOf(text) >= indent) continue\n start = candidate\n parsed = found\n break\n }\n if (parsed === null) return undefined\n const opening = indentOf(lines[start]!)\n let end = lines.length - 1\n for (let candidate = start + 1; candidate < lines.length; candidate++) {\n const text = lines[candidate]!\n if (blank(text)) continue\n if (indentOf(text) > opening) continue\n // A brace language closes the block at the declaration's own indentation,\n // and that closing line is part of the definition rather than what follows.\n end = closer.test(text) ? candidate : candidate - 1\n break\n }\n while (end > start && blank(lines[end]!)) end--\n return { kind: parsed[2]!, name: parsed[3]!, startLine: start + 1, endLine: end + 1 }\n}\n"]}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * What a test runner said, read out of what it printed.
3
+ *
4
+ * A suite's answer is two facts — how many passed, and which ones failed — and
5
+ * a runner spends twenty to thirty kilobytes of stdout saying them. Paying a
6
+ * model to read that is the expensive way to learn a number, and the measured
7
+ * program shows what it costs: sixteen frames on sphinx-8721 existed because a
8
+ * pre-existing failure was never isolated, and the failure *names* were in the
9
+ * output all along.
10
+ *
11
+ * The parsers below recognise the report shapes the standard runners print.
12
+ * Precision is the design constraint, exactly as in `Probe`: a reader claims a
13
+ * complete report only when the runner printed an authoritative completion
14
+ * statement and the observed outcomes agree with it. Pytest requires a tally,
15
+ * TAP requires a plan with every planned outcome, and unittest requires its
16
+ * `Ran` line plus an `OK` or `FAILED` summary. Incomplete captures still return
17
+ * the outcomes they contain with `parsed: false`. A wrong failure set is worse
18
+ * than no failure set, because attribution is built on it.
19
+ *
20
+ * @since 1.0.0
21
+ */
22
+ /**
23
+ * One run's outcome as this module could read it.
24
+ *
25
+ * @category models
26
+ * @since 1.0.0
27
+ */
28
+ export interface Report {
29
+ readonly passed: number;
30
+ readonly failed: ReadonlyArray<string>;
31
+ readonly reportedFailed: number | undefined;
32
+ readonly parsed: boolean;
33
+ }
34
+ /**
35
+ * Reads one run's report, or says plainly that it could not.
36
+ *
37
+ * @category parsing
38
+ * @since 1.0.0
39
+ */
40
+ export declare const parse: (text: string) => Report;
41
+ /**
42
+ * How two runs of the same command differ, which is the whole of attribution.
43
+ *
44
+ * @category parsing
45
+ * @since 1.0.0
46
+ */
47
+ export declare const attribute: (current: Report, base: Report) => {
48
+ readonly introduced: ReadonlyArray<string>;
49
+ readonly preexisting: ReadonlyArray<string>;
50
+ readonly fixed: ReadonlyArray<string>;
51
+ } | undefined;
52
+ //# sourceMappingURL=TestReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestReport.d.ts","sourceRoot":"","sources":["../../../src/internal/TestReport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAiHD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,KAAG,MAiBpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GACpB,SAAS,MAAM,EACf,MAAM,MAAM,KACX;IACD,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC1C,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC3C,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACtC,GAAG,SASH,CAAA"}