@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 @@
1
+ {"version":3,"file":"ApplyPatch.js","sourceRoot":"","sources":["../../src/ApplyPatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,WAAW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ammar (`*** Begin Patch` /\n * `*** Add File:` / `*** Update File:` / `*** Delete File:` /\n * `*** End Patch`), the fuzzy context-matching applier, and Codex's error\n * and summary text, expressed as a flow over the kernel filesystem.\n *\n * @since 1.0.0\n */\n\nimport * as Path from \"@smthrs/kernel/Path\"\nimport * as Effect from \"effect/Effect\"\nimport * as FileSystem from \"effect/FileSystem\"\nimport type * as PlatformError from \"effect/PlatformError\"\nimport * as Schema from \"effect/Schema\"\nimport * as ApplyPatchText from \"./internal/ApplyPatch.ts\"\nimport { capability, envelope } from \"./internal/Declaration.ts\"\nimport * as Diagnostics from \"./internal/Diagnostics.ts\"\nimport * as FileMutation from \"./internal/FileMutation.ts\"\nimport * as FsFailure from \"./internal/FsFailure.ts\"\nimport * as Preserve from \"./internal/Preserve.ts\"\nimport * as StdError from \"./StdError.ts\"\n\n/**\n * Registry name for the apply_patch flow. Matches the Codex CLI tool name.\n *\n * @category identifiers\n * @since 1.0.0\n */\nexport const name = \"apply_patch\"\n\n/**\n * Model-facing description of the apply_patch flow. Matches the Codex CLI\n * freeform tool description.\n *\n * @category descriptions\n * @since 1.0.0\n */\nexport const description =\n \"The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the patch in JSON.\"\n\n/**\n * Input schema for the apply_patch flow.\n *\n * Codex delivers the patch as freeform text; the JSON function fallback uses\n * a single `input` field, which is the shape cloned here.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Input = Schema.Struct({\n input: Schema.String.annotate({ description: \"The entire contents of the apply_patch command\" })\n})\n\n/**\n * Decoded input accepted by the `apply_patch` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Input = typeof Input.Type\n\n/**\n * Output schema for the apply_patch flow.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Output = Schema.Struct({\n output: Schema.String.annotate({\n description: \"Codex-style summary: 'Success. Updated the following files:' with A/M/D lines\"\n }),\n added: Schema.Array(Schema.String).annotate({ description: \"Paths of files created by the patch\" }),\n modified: Schema.Array(Schema.String).annotate({ description: \"Paths of files updated by the patch\" }),\n deleted: Schema.Array(Schema.String).annotate({ description: \"Paths of files deleted by the patch\" })\n})\n\n/**\n * Decoded output returned by the `apply_patch` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Output = typeof Output.Type\n\n/**\n * Static conservative effect envelope for the apply_patch flow.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effects = envelope({ tier: \"compensable\", mode: \"hermetic\", reads: [\"/**\"], writes: [\"/**\"] })\n\n/**\n * Narrows the effect envelope for a decoded invocation.\n *\n * A patch names its files inside its own text rather than in a decoded field,\n * and the parse that finds them is the same parse that can fail, so there is\n * nothing here to narrow before the handler runs: the static envelope is the\n * honest answer.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effectsFor = (_input: typeof Input.Type) => effects\n\n/**\n * Capabilities required by the apply_patch flow.\n *\n * @category capabilities\n * @since 1.0.0\n */\nexport const capabilities = [capability(\"fs:read\", \"/**\"), capability(\"fs:write\", \"/**\")]\n\n/**\n * Declaration-only apply_patch flow.\n *\n * @category flows\n * @since 1.0.0\n */\nexport const flow = { name, description, input: Input, output: Output, capabilities, effects } as const\n\n/**\n * What a call to this flow does, for a reader of a run.\n *\n * Display metadata only. `@smthrs/registry` `Descriptor.FlowActivity` is the\n * governing vocabulary and `StandardFlows` binds this value onto the flow's\n * descriptor, where the binding site checks it. `declarationDigest` excludes\n * it, so declaring it cannot invalidate a call identity or a cached prompt.\n *\n * @category presentation\n * @since 1.0.0-rc.0\n */\nexport const activity = \"writes\" as const\n\n/**\n * How one recorded call to this flow reads: the verb for each settlement, the\n * input field that is its subject, and the measured output fields a one-line\n * summary may count.\n *\n * Display metadata only, governed by `@smthrs/registry`\n * `Descriptor.CallPresentation` and checked where `StandardFlows` binds it.\n *\n * @category presentation\n * @since 1.0.0-rc.0\n */\nexport const presentation = {\n verb: { pending: \"patching\", success: \"patched\", failure: \"failed to patch\" },\n subject: \"patch\",\n result: \"patch\"\n} as const\n\n/**\n * Every path a patch writes, in the order it names them, including a move's\n * destination. The patch is read by the parser {@link run} uses, so a header\n * `run` accepts is never missed.\n *\n * Returns `undefined` when `run` would refuse the patch. A caller asking\n * permission for the call then asks for everything the flow declares.\n *\n * @category parsing\n * @since 1.0.0-rc.1\n */\nexport const paths = (patch: string): ReadonlyArray<string> | undefined => {\n let parsed: ApplyPatchText.ParsedPatch\n try {\n parsed = ApplyPatchText.parsePatch(patch)\n } catch {\n return undefined\n }\n return [\n ...new Set(\n parsed.hunks.flatMap((hunk) =>\n hunk.kind === \"update\" && hunk.movePath !== undefined ? [hunk.path, hunk.movePath] : [hunk.path]\n )\n )\n ]\n}\n\n/**\n * The one sentence a model sees for a failure this handler did not design.\n * The raw failure goes to the log, never into the tool result.\n */\nconst unknownFailureSentence = \"Something went wrong on our side. Not your fault.\"\n\nconst unknownFailure = (error: unknown, path?: string): Effect.Effect<never, StdError.StdError> =>\n Effect.logError(\"apply_patch failed unexpectedly\", error).pipe(\n Effect.andThen(Effect.fail(\n new StdError.StdError(\n path === undefined\n ? { code: \"command_failed\", message: unknownFailureSentence }\n : { code: \"command_failed\", message: unknownFailureSentence, path }\n )\n ))\n )\n\nconst encoder = new TextEncoder()\nconst decoder = new TextDecoder(\"utf-8\", { fatal: true })\n\n/**\n * Parses and applies a V4A patch through the permission-aware kernel\n * filesystem, preserving Codex error text.\n *\n * @category handlers\n * @since 1.0.0\n */\nexport const run = Effect.fn(\"ApplyPatch.run\")(function*(\n input: typeof Input.Type\n): Effect.fn.Return<typeof Output.Type, StdError.StdError, FileSystem.FileSystem | Path.Path> {\n const fileSystem = yield* FileSystem.FileSystem\n const path = yield* Path.Path\n\n let parsed: ApplyPatchText.ParsedPatch\n try {\n parsed = ApplyPatchText.parsePatch(input.input)\n } catch (error) {\n if (error instanceof ApplyPatchText.ParseError) {\n return yield* Effect.fail(new StdError.StdError({ code: \"invalid_input\", message: error.message }))\n }\n return yield* unknownFailure(error)\n }\n\n // Every update hunk is derived from the file as it is on disk, so two\n // sections naming one path both start from the same original and the second\n // write erases the first — while the summary reports two modifications.\n // The preflight cannot honestly validate the second section against a file\n // the first has not written yet, so the patch is refused whole rather than\n // applied by halves. A file needing several edits carries several `@@`\n // chunks inside one section, which is the shape the parser already accepts.\n // Resolve against the injected workspace, then follow existing filesystem\n // aliases. For a new file, resolve its parent (which may be a symlink).\n const identity = (value: string) => {\n const resolved = path.resolve(value)\n return fileSystem.realPath(resolved).pipe(\n Effect.catch((error) =>\n error.reason._tag === \"NotFound\"\n ? fileSystem.realPath(path.dirname(resolved)).pipe(\n Effect.map((parent) => path.resolve(parent, path.basename(resolved))),\n Effect.catch((parentError) =>\n parentError.reason._tag === \"NotFound\"\n ? Effect.succeed(resolved)\n : Effect.fail(parentError)\n )\n )\n : Effect.fail(error)\n ),\n Effect.mapError(FsFailure.denied(value, () =>\n new StdError.StdError({\n code: \"command_failed\",\n message: `Failed to resolve patch path ${value}`,\n path: value\n })))\n )\n }\n const touched = new Set<string>()\n for (const hunk of parsed.hunks) {\n const source = yield* identity(hunk.path)\n const destination = hunk.kind === \"update\" && hunk.movePath !== undefined\n ? yield* identity(hunk.movePath)\n : undefined\n const claims: Array<[string, string]> = [[hunk.path, source]]\n if (hunk.kind === \"update\" && hunk.movePath !== undefined && destination !== source) {\n claims.push([hunk.movePath, destination!])\n }\n for (const [claimed, key] of claims) {\n if (touched.has(key)) {\n return yield* Effect.fail(\n new StdError.StdError({\n code: \"invalid_input\",\n message: `The patch names ${claimed} in more than one section; give one section per path`,\n path: claimed\n })\n )\n }\n touched.add(key)\n }\n }\n\n yield* FileMutation.validate(\n fileSystem,\n parsed.hunks.flatMap((hunk) =>\n hunk.kind === \"update\" && hunk.movePath !== undefined ? [hunk.path, hunk.movePath] : [hunk.path]\n )\n )\n\n // Create only parents the patch already intends to create, before taking\n // stable sibling locks for new destinations as well as existing sources.\n for (const hunk of parsed.hunks) {\n const destination = hunk.kind === \"add\" ? hunk.path : hunk.kind === \"update\" ? hunk.movePath : undefined\n if (destination !== undefined && !FileMutation.isVersioned(fileSystem)) {\n yield* fileSystem.makeDirectory(path.dirname(destination), { recursive: true }).pipe(\n Effect.mapError(\n FsFailure.denied(destination, () =>\n new StdError.StdError({\n code: \"command_failed\",\n message: `Failed to create parent directories for ${destination}`,\n path: destination\n }))\n )\n )\n }\n }\n return yield* Effect.scoped(Effect.gen(function*() {\n const mutation = yield* FileMutation.acquire(\n fileSystem,\n parsed.hunks.flatMap((hunk) =>\n hunk.kind === \"update\" && hunk.movePath !== undefined ? [hunk.path, hunk.movePath] : [hunk.path]\n ),\n path\n )\n const added: Array<string> = []\n const modified: Array<string> = []\n const deleted: Array<string> = []\n const prepared = new Map<ApplyPatchText.Hunk, string>()\n\n for (const hunk of parsed.hunks) {\n if (hunk.kind !== \"update\") continue\n const bytes = yield* mutation.read(\n hunk.path,\n fileSystem.readFile(hunk.path).pipe(\n Effect.mapError(FsFailure.reading(hunk.path, `Failed to read file to update ${hunk.path}`))\n )\n )\n if (bytes.includes(0)) {\n return yield* Effect.fail(\n new StdError.StdError({\n code: \"binary_file\",\n message: `Cannot read binary file: ${hunk.path}`,\n path: hunk.path\n })\n )\n }\n const original = yield* Effect.try({\n try: () => decoder.decode(bytes),\n catch: () =>\n new StdError.StdError({\n code: \"binary_file\",\n message: `File is not valid UTF-8: ${hunk.path}`,\n path: hunk.path\n })\n })\n let contents: string\n try {\n contents = ApplyPatchText.deriveNewContents(original, hunk.path, hunk.chunks)\n } catch (error) {\n if (error instanceof ApplyPatchText.ComputeReplacementsError) {\n return yield* Effect.fail(\n new StdError.StdError({ code: \"no_match\", message: error.message, path: hunk.path })\n )\n }\n return yield* unknownFailure(error, hunk.path)\n }\n prepared.set(hunk, contents)\n }\n\n // Prepare one complete provider request before touching any file. A move\n // carries both its destination write and source removal in the same commit.\n const changes: Array<FileMutation.Change> = []\n const moves = new Set<ApplyPatchText.Hunk>()\n for (const hunk of parsed.hunks) {\n if (hunk.kind === \"delete\") {\n changes.push({ path: hunk.path, content: null })\n } else if (hunk.kind === \"add\") {\n changes.push({ path: hunk.path, content: encoder.encode(hunk.contents) })\n } else {\n changes.push({\n path: hunk.movePath ?? hunk.path,\n content: encoder.encode(prepared.get(hunk))\n })\n if (hunk.movePath !== undefined && (yield* identity(hunk.movePath)) !== (yield* identity(hunk.path))) {\n moves.add(hunk)\n changes.push({ path: hunk.path, content: null })\n }\n }\n }\n\n // A denial names itself, so the model does not retry a write the host refuses.\n const mutationFailure =\n (code: StdError.Code, message: string, offendingPath: string) =>\n (error: PlatformError.PlatformError): StdError.StdError =>\n error.reason._tag === \"PermissionDenied\"\n ? mutationError(\"permission_denied\", `Permission denied: ${offendingPath}`, offendingPath)\n : mutationError(code, message, offendingPath)\n const mutationError = (code: StdError.Code, message: string, offendingPath: string): StdError.StdError =>\n new StdError.StdError({\n code,\n message: `${message}; applied before failure: added=${JSON.stringify(added)}, modified=${\n JSON.stringify(modified)\n }, deleted=${JSON.stringify(deleted)}`,\n path: offendingPath\n })\n\n yield* mutation.commit(\n changes,\n Effect.gen(function*() {\n for (const hunk of parsed.hunks) {\n switch (hunk.kind) {\n case \"add\": {\n yield* fileSystem.writeFile(hunk.path, encoder.encode(hunk.contents)).pipe(\n Effect.mapError(mutationFailure(\"command_failed\", `Failed to write file ${hunk.path}`, hunk.path))\n )\n added.push(hunk.path)\n break\n }\n case \"delete\": {\n yield* fileSystem.remove(hunk.path).pipe(\n Effect.mapError(mutationFailure(\"not_found\", `Failed to delete file ${hunk.path}`, hunk.path))\n )\n deleted.push(hunk.path)\n break\n }\n case \"update\": {\n const contents = prepared.get(hunk)!\n const destination = hunk.movePath ?? hunk.path\n yield* Preserve.writeFile(fileSystem, destination, encoder.encode(contents)).pipe(\n Effect.mapError((error) =>\n error.reason.method === \"chmod\"\n ? mutationError(\n \"command_failed\",\n `Could not preserve the mode of ${destination} before replacement by chmod`,\n destination\n )\n : mutationFailure(\"command_failed\", `Failed to write file ${destination}`, destination)(error)\n )\n )\n modified.push(destination)\n if (moves.has(hunk)) {\n yield* fileSystem.remove(hunk.path).pipe(\n Effect.mapError(\n mutationFailure(\"command_failed\", `Failed to remove original ${hunk.path}`, hunk.path)\n )\n )\n }\n break\n }\n }\n }\n })\n )\n\n // Publish diagnostics only after the whole provider operation succeeds.\n for (const change of changes) {\n if (change.content === null) yield* Diagnostics.close(path.resolve(change.path))\n else yield* Diagnostics.sync(path.resolve(change.path), decoder.decode(change.content))\n }\n const summary = {\n added: parsed.hunks.filter((hunk) => hunk.kind === \"add\").map((hunk) => hunk.path),\n deleted: parsed.hunks.filter((hunk) => hunk.kind === \"delete\").map((hunk) => hunk.path),\n modified: parsed.hunks.filter((hunk) => hunk.kind === \"update\").map((hunk) => hunk.movePath ?? hunk.path)\n }\n\n return {\n output: ApplyPatchText.printSummary(summary),\n ...summary\n }\n }))\n})\n"]}
@@ -0,0 +1,304 @@
1
+ /**
2
+ * Bash flow declaration and portable handler.
3
+ *
4
+ * Two ways in, and the difference is where the payload is parsed. `command` is
5
+ * a line for the platform shell, exactly as before. `script` is program text
6
+ * delivered to an interpreter on standard input, as data: nothing quotes it,
7
+ * escapes it, or terminates it with a heredoc marker, so the class of failure
8
+ * that produced `docker exec c bash -lc '…python - <<EOF…'` cannot occur. Its
9
+ * `args` reach the script as arguments rather than as interpolated text.
10
+ *
11
+ * `container` names a container the host knows how to reach, and the argv is
12
+ * built by the injected {@link Container} transport rather than typed by the
13
+ * caller. A host that binds no transport refuses such a call by saying so; the
14
+ * requirement is optional here precisely so a host without containers is not
15
+ * forced to declare one.
16
+ *
17
+ * @since 1.0.0
18
+ */
19
+ import type * as ChildProcessSpawner from "@smthrs/kernel/ChildProcessSpawner";
20
+ import * as Path from "@smthrs/kernel/Path";
21
+ import * as Effect from "effect/Effect";
22
+ import * as Schema from "effect/Schema";
23
+ import * as StdError from "./StdError.ts";
24
+ /**
25
+ * Registry name for the bash flow.
26
+ *
27
+ * @category identifiers
28
+ * @since 1.0.0
29
+ */
30
+ export declare const name = "bash";
31
+ /**
32
+ * Model-facing description of the bash flow.
33
+ *
34
+ * Capped at 200 characters and read every frame, which is why the
35
+ * invalid-probe contract is not restated here: the cell contract teaches it
36
+ * once, and a result that has one explains itself.
37
+ *
38
+ * @category descriptions
39
+ * @since 1.0.0
40
+ */
41
+ export declare const description = "Run a shell command, or an interpreter over a script passed as data instead of quoted into a line. container routes it through the host's container transport. mode:hermetic pre-checks path tokens.";
42
+ /**
43
+ * Default command timeout in milliseconds.
44
+ *
45
+ * Ten minutes lets full builds and test suites finish while ensuring a stalled
46
+ * process eventually releases the flow.
47
+ *
48
+ * @category constants
49
+ * @since 1.0.0
50
+ */
51
+ export declare const DEFAULT_TIMEOUT_MS = 600000;
52
+ /**
53
+ * Input schema for the bash flow.
54
+ *
55
+ * The mode named `hermetic` requires explicit read and write envelopes for a
56
+ * lexical pre-check; it does not by itself confine the process. Unhermetic mode
57
+ * deliberately omits those declarations so the distinction stays visible in
58
+ * the input shape.
59
+ *
60
+ * @category schemas
61
+ * @since 1.0.0
62
+ */
63
+ export declare const Input: Schema.Union<readonly [Schema.Struct<{
64
+ readonly mode: Schema.Literal<"hermetic">;
65
+ readonly command: Schema.optional<Schema.String>;
66
+ readonly script: Schema.optional<Schema.String>;
67
+ readonly interpreter: Schema.optional<Schema.String>;
68
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
69
+ readonly stdin: Schema.optional<Schema.String>;
70
+ readonly container: Schema.optional<Schema.String>;
71
+ readonly reads: Schema.$Array<Schema.NonEmptyString>;
72
+ readonly writes: Schema.$Array<Schema.NonEmptyString>;
73
+ readonly cwd: Schema.optional<Schema.String>;
74
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
75
+ readonly timeoutMs: Schema.optional<Schema.Number>;
76
+ }>, Schema.Struct<{
77
+ readonly mode: Schema.withDecodingDefaultKey<Schema.optionalKey<Schema.Literal<"unhermetic">>, never>;
78
+ readonly command: Schema.optional<Schema.String>;
79
+ readonly script: Schema.optional<Schema.String>;
80
+ readonly interpreter: Schema.optional<Schema.String>;
81
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
82
+ readonly stdin: Schema.optional<Schema.String>;
83
+ readonly container: Schema.optional<Schema.String>;
84
+ readonly cwd: Schema.optional<Schema.String>;
85
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
86
+ readonly timeoutMs: Schema.optional<Schema.Number>;
87
+ }>]>;
88
+ /**
89
+ * Decoded input accepted by the bash handler.
90
+ *
91
+ * @category models
92
+ * @since 1.0.0
93
+ */
94
+ export type Input = typeof Input.Type;
95
+ /**
96
+ * Output schema for the bash flow.
97
+ *
98
+ * `invalidProbe` is present when the shell itself refused to start the
99
+ * command, which its exit code says outright: 127 for a program it could not
100
+ * find, 126 for one it could not execute. Only that. Reading a runner's own
101
+ * wording is a judgment rather than a fact, and `Probe.classify` makes it with
102
+ * Jev for the `test` flow, whose caller is asking about a suite; a shell call
103
+ * is any command at all and stays free of the gateway. See `Probe`.
104
+ *
105
+ * The `<stream>Truncated` flags are a wire convention, not a display detail.
106
+ * A truncated capture is a fragment of what the process printed, and the
107
+ * harness reads these flags to refuse a later write of those exact bytes —
108
+ * `@smthrs/harness/TruncatedOutput` is the consuming half. Renaming a flag, or
109
+ * dropping it when the capture is cut, disarms that guard silently.
110
+ *
111
+ * @category schemas
112
+ * @since 1.0.0
113
+ */
114
+ export declare const Output: Schema.Struct<{
115
+ readonly exitCode: Schema.Number;
116
+ readonly stdout: Schema.String;
117
+ readonly stderr: Schema.String;
118
+ readonly stdoutTruncated: Schema.Boolean;
119
+ readonly stderrTruncated: Schema.Boolean;
120
+ readonly stdoutDroppedBytes: Schema.Number;
121
+ readonly stderrDroppedBytes: Schema.Number;
122
+ readonly invalidProbe: Schema.optional<Schema.Struct<{
123
+ readonly reason: Schema.Literals<readonly ["unknown-command", "unknown-test", "unknown-path", "unknown-module", "unknown-environment"]>;
124
+ readonly evidence: Schema.String;
125
+ readonly message: Schema.String;
126
+ }>>;
127
+ readonly mutated: Schema.optional<Schema.Boolean>;
128
+ }>;
129
+ /**
130
+ * Decoded output returned by the bash handler.
131
+ *
132
+ * @category models
133
+ * @since 1.0.0
134
+ */
135
+ export type Output = typeof Output.Type;
136
+ /**
137
+ * Static conservative effect envelope for the bash flow.
138
+ *
139
+ * The declaration is the registry-time worst case because the mode is not
140
+ * known until an invocation is decoded.
141
+ *
142
+ * @category effects
143
+ * @since 1.0.0
144
+ */
145
+ export declare const effects: import("@smthrs/plan/Effects").Declaration;
146
+ /**
147
+ * Narrows the effect envelope for a decoded invocation.
148
+ *
149
+ * @category effects
150
+ * @since 1.0.0
151
+ */
152
+ export declare const effectsFor: (input: Input) => import("@smthrs/plan/Effects").Declaration;
153
+ /**
154
+ * Capabilities required by the bash flow.
155
+ *
156
+ * @category capabilities
157
+ * @since 1.0.0
158
+ */
159
+ export declare const capabilities: string[];
160
+ /**
161
+ * Declaration-only bash flow.
162
+ *
163
+ * @category flows
164
+ * @since 1.0.0
165
+ */
166
+ export declare const flow: {
167
+ readonly name: "bash";
168
+ readonly description: "Run a shell command, or an interpreter over a script passed as data instead of quoted into a line. container routes it through the host's container transport. mode:hermetic pre-checks path tokens.";
169
+ readonly input: Schema.Union<readonly [Schema.Struct<{
170
+ readonly mode: Schema.Literal<"hermetic">;
171
+ readonly command: Schema.optional<Schema.String>;
172
+ readonly script: Schema.optional<Schema.String>;
173
+ readonly interpreter: Schema.optional<Schema.String>;
174
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
175
+ readonly stdin: Schema.optional<Schema.String>;
176
+ readonly container: Schema.optional<Schema.String>;
177
+ readonly reads: Schema.$Array<Schema.NonEmptyString>;
178
+ readonly writes: Schema.$Array<Schema.NonEmptyString>;
179
+ readonly cwd: Schema.optional<Schema.String>;
180
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
181
+ readonly timeoutMs: Schema.optional<Schema.Number>;
182
+ }>, Schema.Struct<{
183
+ readonly mode: Schema.withDecodingDefaultKey<Schema.optionalKey<Schema.Literal<"unhermetic">>, never>;
184
+ readonly command: Schema.optional<Schema.String>;
185
+ readonly script: Schema.optional<Schema.String>;
186
+ readonly interpreter: Schema.optional<Schema.String>;
187
+ readonly args: Schema.optional<Schema.$Array<Schema.String>>;
188
+ readonly stdin: Schema.optional<Schema.String>;
189
+ readonly container: Schema.optional<Schema.String>;
190
+ readonly cwd: Schema.optional<Schema.String>;
191
+ readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
192
+ readonly timeoutMs: Schema.optional<Schema.Number>;
193
+ }>]>;
194
+ readonly output: Schema.Struct<{
195
+ readonly exitCode: Schema.Number;
196
+ readonly stdout: Schema.String;
197
+ readonly stderr: Schema.String;
198
+ readonly stdoutTruncated: Schema.Boolean;
199
+ readonly stderrTruncated: Schema.Boolean;
200
+ readonly stdoutDroppedBytes: Schema.Number;
201
+ readonly stderrDroppedBytes: Schema.Number;
202
+ readonly invalidProbe: Schema.optional<Schema.Struct<{
203
+ readonly reason: Schema.Literals<readonly ["unknown-command", "unknown-test", "unknown-path", "unknown-module", "unknown-environment"]>;
204
+ readonly evidence: Schema.String;
205
+ readonly message: Schema.String;
206
+ }>>;
207
+ readonly mutated: Schema.optional<Schema.Boolean>;
208
+ }>;
209
+ readonly capabilities: string[];
210
+ readonly effects: import("@smthrs/plan/Effects").Declaration;
211
+ };
212
+ /**
213
+ * How one recorded call to this flow reads: the verb for each settlement, the
214
+ * input field that is its subject, and the measured output fields a one-line
215
+ * summary may count.
216
+ *
217
+ * Display metadata only, governed by `@smthrs/registry`
218
+ * `Descriptor.CallPresentation` and checked where `StandardFlows` binds it.
219
+ *
220
+ * @category presentation
221
+ * @since 1.0.0-rc.0
222
+ */
223
+ export declare const presentation: {
224
+ readonly verb: {
225
+ readonly pending: "running";
226
+ readonly success: "ran";
227
+ readonly failure: "failed to run";
228
+ };
229
+ readonly subject: "command";
230
+ readonly result: "command";
231
+ };
232
+ /**
233
+ * Executes a shell command through the permission-aware kernel service.
234
+ *
235
+ * Non-zero exit codes remain successful values. Only timeout, host, permission,
236
+ * and declared-envelope pre-check failures use the typed error channel.
237
+ *
238
+ * @category handlers
239
+ * @since 1.0.0
240
+ */
241
+ export declare const run: (input: {
242
+ readonly mode: "hermetic";
243
+ readonly writes: readonly string[];
244
+ readonly reads: readonly string[];
245
+ readonly cwd?: string | undefined;
246
+ readonly env?: {
247
+ readonly [x: string]: string;
248
+ } | undefined;
249
+ readonly stdin?: string | undefined;
250
+ readonly command?: string | undefined;
251
+ readonly args?: readonly string[] | undefined;
252
+ readonly timeoutMs?: number | undefined;
253
+ readonly script?: string | undefined;
254
+ readonly interpreter?: string | undefined;
255
+ readonly container?: string | undefined;
256
+ } | {
257
+ readonly mode?: "unhermetic";
258
+ readonly cwd?: string | undefined;
259
+ readonly env?: {
260
+ readonly [x: string]: string;
261
+ } | undefined;
262
+ readonly stdin?: string | undefined;
263
+ readonly command?: string | undefined;
264
+ readonly args?: readonly string[] | undefined;
265
+ readonly timeoutMs?: number | undefined;
266
+ readonly script?: string | undefined;
267
+ readonly interpreter?: string | undefined;
268
+ readonly container?: string | undefined;
269
+ }) => Effect.Effect<{
270
+ readonly stderr: string;
271
+ readonly exitCode: number;
272
+ readonly stdout: string;
273
+ readonly stdoutTruncated: boolean;
274
+ readonly stderrTruncated: boolean;
275
+ readonly stdoutDroppedBytes: number;
276
+ readonly stderrDroppedBytes: number;
277
+ readonly invalidProbe?: {
278
+ readonly reason: "unknown-command" | "unknown-test" | "unknown-path" | "unknown-module" | "unknown-environment";
279
+ readonly evidence: string;
280
+ readonly message: string;
281
+ } | undefined;
282
+ readonly mutated?: boolean | undefined;
283
+ }, StdError.StdError, ChildProcessSpawner.ChildProcessSpawner | import("effect/Path").Path>;
284
+ /**
285
+ * The refusal a sealed host answers a call outside its container with.
286
+ *
287
+ * @category errors
288
+ * @since 1.0.0-rc.1
289
+ */
290
+ export declare const outsideContainer: (sealedTo: string, requested: string | undefined) => StdError.StdError;
291
+ /**
292
+ * {@link run}, sealed to one container.
293
+ *
294
+ * A host that must not be reachable from the cell (a benchmark host holding
295
+ * other tasks' tests and reference solutions, say) binds this instead of
296
+ * {@link run}: a call naming `sealedTo` runs as usual, and every other call,
297
+ * including one with no container that would run on the host, fails with
298
+ * `outside_container` before anything is spawned.
299
+ *
300
+ * @category handlers
301
+ * @since 1.0.0-rc.1
302
+ */
303
+ export declare const sealed: (sealedTo: string) => (input: Input) => Effect.Effect<Output, StdError.StdError, ChildProcessSpawner.ChildProcessSpawner | Path.Path>;
304
+ //# sourceMappingURL=Bash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bash.d.ts","sourceRoot":"","sources":["../../src/Bash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAQvC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAGzC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,SAAS,CAAA;AAE1B;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,yMACgL,CAAA;AAExM;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,SAAU,CAAA;AAmCzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;IAiChB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAErC;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;EA6BjB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;;;;GAQG;AACH,eA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