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

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 (582) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/LICENSE +21 -0
  3. package/README.md +156 -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 +390 -0
  9. package/dist/cjs/Bash.d.ts.map +1 -0
  10. package/dist/cjs/Bash.js +333 -0
  11. package/dist/cjs/Bash.js.map +7 -0
  12. package/dist/cjs/Checkpoints.d.ts +322 -0
  13. package/dist/cjs/Checkpoints.d.ts.map +1 -0
  14. package/dist/cjs/Checkpoints.js +233 -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 +36 -0
  73. package/dist/cjs/PortableSearch.d.ts.map +1 -0
  74. package/dist/cjs/PortableSearch.js +240 -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/RemoteSearch.d.ts +54 -0
  89. package/dist/cjs/RemoteSearch.d.ts.map +1 -0
  90. package/dist/cjs/RemoteSearch.js +134 -0
  91. package/dist/cjs/RemoteSearch.js.map +7 -0
  92. package/dist/cjs/Search.d.ts +163 -0
  93. package/dist/cjs/Search.d.ts.map +1 -0
  94. package/dist/cjs/Search.js +51 -0
  95. package/dist/cjs/Search.js.map +7 -0
  96. package/dist/cjs/SearchConformance.d.ts +115 -0
  97. package/dist/cjs/SearchConformance.d.ts.map +1 -0
  98. package/dist/cjs/SearchConformance.js +172 -0
  99. package/dist/cjs/SearchConformance.js.map +7 -0
  100. package/dist/cjs/SearchContract.d.ts +114 -0
  101. package/dist/cjs/SearchContract.d.ts.map +1 -0
  102. package/dist/cjs/SearchContract.js +339 -0
  103. package/dist/cjs/SearchContract.js.map +7 -0
  104. package/dist/cjs/ShellCommand.d.ts +164 -0
  105. package/dist/cjs/ShellCommand.d.ts.map +1 -0
  106. package/dist/cjs/ShellCommand.js +102 -0
  107. package/dist/cjs/ShellCommand.js.map +7 -0
  108. package/dist/cjs/StdError.d.ts +55 -0
  109. package/dist/cjs/StdError.d.ts.map +1 -0
  110. package/dist/cjs/StdError.js +74 -0
  111. package/dist/cjs/StdError.js.map +7 -0
  112. package/dist/cjs/TestRun.d.ts +311 -0
  113. package/dist/cjs/TestRun.d.ts.map +1 -0
  114. package/dist/cjs/TestRun.js +228 -0
  115. package/dist/cjs/TestRun.js.map +7 -0
  116. package/dist/cjs/TestRunner.d.ts +102 -0
  117. package/dist/cjs/TestRunner.d.ts.map +1 -0
  118. package/dist/cjs/TestRunner.js +54 -0
  119. package/dist/cjs/TestRunner.js.map +7 -0
  120. package/dist/cjs/TreeFingerprint.d.ts +140 -0
  121. package/dist/cjs/TreeFingerprint.d.ts.map +1 -0
  122. package/dist/cjs/TreeFingerprint.js +87 -0
  123. package/dist/cjs/TreeFingerprint.js.map +7 -0
  124. package/dist/cjs/UpdatePlan.d.ts +152 -0
  125. package/dist/cjs/UpdatePlan.d.ts.map +1 -0
  126. package/dist/cjs/UpdatePlan.js +87 -0
  127. package/dist/cjs/UpdatePlan.js.map +7 -0
  128. package/dist/cjs/WebFetch.d.ts +134 -0
  129. package/dist/cjs/WebFetch.d.ts.map +1 -0
  130. package/dist/cjs/WebFetch.js +140 -0
  131. package/dist/cjs/WebFetch.js.map +7 -0
  132. package/dist/cjs/WebSearch.d.ts +181 -0
  133. package/dist/cjs/WebSearch.d.ts.map +1 -0
  134. package/dist/cjs/WebSearch.js +86 -0
  135. package/dist/cjs/WebSearch.js.map +7 -0
  136. package/dist/cjs/Write.d.ts +147 -0
  137. package/dist/cjs/Write.d.ts.map +1 -0
  138. package/dist/cjs/Write.js +122 -0
  139. package/dist/cjs/Write.js.map +7 -0
  140. package/dist/cjs/index.d.ts +129 -0
  141. package/dist/cjs/index.d.ts.map +1 -0
  142. package/dist/cjs/index.js +101 -0
  143. package/dist/cjs/index.js.map +7 -0
  144. package/dist/cjs/internal/ApplyPatch.d.ts +145 -0
  145. package/dist/cjs/internal/ApplyPatch.d.ts.map +1 -0
  146. package/dist/cjs/internal/ApplyPatch.js +462 -0
  147. package/dist/cjs/internal/ApplyPatch.js.map +7 -0
  148. package/dist/cjs/internal/CodexText.d.ts +73 -0
  149. package/dist/cjs/internal/CodexText.d.ts.map +1 -0
  150. package/dist/cjs/internal/CodexText.js +108 -0
  151. package/dist/cjs/internal/CodexText.js.map +7 -0
  152. package/dist/cjs/internal/Declaration.d.ts +49 -0
  153. package/dist/cjs/internal/Declaration.d.ts.map +1 -0
  154. package/dist/cjs/internal/Declaration.js +46 -0
  155. package/dist/cjs/internal/Declaration.js.map +7 -0
  156. package/dist/cjs/internal/Diagnostics.d.ts +77 -0
  157. package/dist/cjs/internal/Diagnostics.d.ts.map +1 -0
  158. package/dist/cjs/internal/Diagnostics.js +89 -0
  159. package/dist/cjs/internal/Diagnostics.js.map +7 -0
  160. package/dist/cjs/internal/EnvelopePrecheck.d.ts +69 -0
  161. package/dist/cjs/internal/EnvelopePrecheck.d.ts.map +1 -0
  162. package/dist/cjs/internal/EnvelopePrecheck.js +323 -0
  163. package/dist/cjs/internal/EnvelopePrecheck.js.map +7 -0
  164. package/dist/cjs/internal/Exec.d.ts +151 -0
  165. package/dist/cjs/internal/Exec.d.ts.map +1 -0
  166. package/dist/cjs/internal/Exec.js +207 -0
  167. package/dist/cjs/internal/Exec.js.map +7 -0
  168. package/dist/cjs/internal/FileMutation.d.ts +109 -0
  169. package/dist/cjs/internal/FileMutation.d.ts.map +1 -0
  170. package/dist/cjs/internal/FileMutation.js +116 -0
  171. package/dist/cjs/internal/FileMutation.js.map +7 -0
  172. package/dist/cjs/internal/FsFailure.d.ts +38 -0
  173. package/dist/cjs/internal/FsFailure.d.ts.map +1 -0
  174. package/dist/cjs/internal/FsFailure.js +40 -0
  175. package/dist/cjs/internal/FsFailure.js.map +7 -0
  176. package/dist/cjs/internal/GitWorktree.d.ts +108 -0
  177. package/dist/cjs/internal/GitWorktree.d.ts.map +1 -0
  178. package/dist/cjs/internal/GitWorktree.js +276 -0
  179. package/dist/cjs/internal/GitWorktree.js.map +7 -0
  180. package/dist/cjs/internal/Grouping.d.ts +51 -0
  181. package/dist/cjs/internal/Grouping.d.ts.map +1 -0
  182. package/dist/cjs/internal/Grouping.js +83 -0
  183. package/dist/cjs/internal/Grouping.js.map +7 -0
  184. package/dist/cjs/internal/Html.d.ts +20 -0
  185. package/dist/cjs/internal/Html.d.ts.map +1 -0
  186. package/dist/cjs/internal/Html.js +81 -0
  187. package/dist/cjs/internal/Html.js.map +7 -0
  188. package/dist/cjs/internal/Http.d.ts +95 -0
  189. package/dist/cjs/internal/Http.d.ts.map +1 -0
  190. package/dist/cjs/internal/Http.js +153 -0
  191. package/dist/cjs/internal/Http.js.map +7 -0
  192. package/dist/cjs/internal/HttpNetwork.d.ts +27 -0
  193. package/dist/cjs/internal/HttpNetwork.d.ts.map +1 -0
  194. package/dist/cjs/internal/HttpNetwork.js +146 -0
  195. package/dist/cjs/internal/HttpNetwork.js.map +7 -0
  196. package/dist/cjs/internal/Ignore.d.ts +37 -0
  197. package/dist/cjs/internal/Ignore.d.ts.map +1 -0
  198. package/dist/cjs/internal/Ignore.js +100 -0
  199. package/dist/cjs/internal/Ignore.js.map +7 -0
  200. package/dist/cjs/internal/LinearRegex.d.ts +19 -0
  201. package/dist/cjs/internal/LinearRegex.d.ts.map +1 -0
  202. package/dist/cjs/internal/LinearRegex.js +166 -0
  203. package/dist/cjs/internal/LinearRegex.js.map +7 -0
  204. package/dist/cjs/internal/Match.d.ts +85 -0
  205. package/dist/cjs/internal/Match.d.ts.map +1 -0
  206. package/dist/cjs/internal/Match.js +99 -0
  207. package/dist/cjs/internal/Match.js.map +7 -0
  208. package/dist/cjs/internal/Paths.d.ts +23 -0
  209. package/dist/cjs/internal/Paths.d.ts.map +1 -0
  210. package/dist/cjs/internal/Paths.js +52 -0
  211. package/dist/cjs/internal/Paths.js.map +7 -0
  212. package/dist/cjs/internal/Preserve.d.ts +25 -0
  213. package/dist/cjs/internal/Preserve.d.ts.map +1 -0
  214. package/dist/cjs/internal/Preserve.js +88 -0
  215. package/dist/cjs/internal/Preserve.js.map +7 -0
  216. package/dist/cjs/internal/Prune.d.ts +35 -0
  217. package/dist/cjs/internal/Prune.d.ts.map +1 -0
  218. package/dist/cjs/internal/Prune.js +54 -0
  219. package/dist/cjs/internal/Prune.js.map +7 -0
  220. package/dist/cjs/internal/RemoteTree.d.ts +60 -0
  221. package/dist/cjs/internal/RemoteTree.d.ts.map +1 -0
  222. package/dist/cjs/internal/RemoteTree.js +123 -0
  223. package/dist/cjs/internal/RemoteTree.js.map +7 -0
  224. package/dist/cjs/internal/SearchContract.d.ts +63 -0
  225. package/dist/cjs/internal/SearchContract.d.ts.map +1 -0
  226. package/dist/cjs/internal/SearchContract.js +46 -0
  227. package/dist/cjs/internal/SearchContract.js.map +7 -0
  228. package/dist/cjs/internal/Symbols.d.ts +39 -0
  229. package/dist/cjs/internal/Symbols.d.ts.map +1 -0
  230. package/dist/cjs/internal/Symbols.js +59 -0
  231. package/dist/cjs/internal/Symbols.js.map +7 -0
  232. package/dist/cjs/internal/Tar.d.ts +23 -0
  233. package/dist/cjs/internal/Tar.d.ts.map +1 -0
  234. package/dist/cjs/internal/Tar.js +86 -0
  235. package/dist/cjs/internal/Tar.js.map +7 -0
  236. package/dist/cjs/internal/TestReport.d.ts +52 -0
  237. package/dist/cjs/internal/TestReport.d.ts.map +1 -0
  238. package/dist/cjs/internal/TestReport.js +131 -0
  239. package/dist/cjs/internal/TestReport.js.map +7 -0
  240. package/dist/cjs/internal/Text.d.ts +125 -0
  241. package/dist/cjs/internal/Text.d.ts.map +1 -0
  242. package/dist/cjs/internal/Text.js +85 -0
  243. package/dist/cjs/internal/Text.js.map +7 -0
  244. package/dist/cjs/internal/Url.d.ts +13 -0
  245. package/dist/cjs/internal/Url.d.ts.map +1 -0
  246. package/dist/cjs/internal/Url.js +35 -0
  247. package/dist/cjs/internal/Url.js.map +7 -0
  248. package/dist/cjs/internal/Walk.d.ts +72 -0
  249. package/dist/cjs/internal/Walk.d.ts.map +1 -0
  250. package/dist/cjs/internal/Walk.js +108 -0
  251. package/dist/cjs/internal/Walk.js.map +7 -0
  252. package/dist/cjs/package.json +1 -0
  253. package/dist/esm/ApplyPatch.d.ts +174 -0
  254. package/dist/esm/ApplyPatch.d.ts.map +1 -0
  255. package/dist/esm/ApplyPatch.js +346 -0
  256. package/dist/esm/ApplyPatch.js.map +1 -0
  257. package/dist/esm/Bash.d.ts +390 -0
  258. package/dist/esm/Bash.d.ts.map +1 -0
  259. package/dist/esm/Bash.js +514 -0
  260. package/dist/esm/Bash.js.map +1 -0
  261. package/dist/esm/Checkpoints.d.ts +322 -0
  262. package/dist/esm/Checkpoints.d.ts.map +1 -0
  263. package/dist/esm/Checkpoints.js +396 -0
  264. package/dist/esm/Checkpoints.js.map +1 -0
  265. package/dist/esm/Container.d.ts +132 -0
  266. package/dist/esm/Container.d.ts.map +1 -0
  267. package/dist/esm/Container.js +151 -0
  268. package/dist/esm/Container.js.map +1 -0
  269. package/dist/esm/Edit.d.ts +203 -0
  270. package/dist/esm/Edit.d.ts.map +1 -0
  271. package/dist/esm/Edit.js +296 -0
  272. package/dist/esm/Edit.js.map +1 -0
  273. package/dist/esm/ExaWebSearch.d.ts +22 -0
  274. package/dist/esm/ExaWebSearch.d.ts.map +1 -0
  275. package/dist/esm/ExaWebSearch.js +107 -0
  276. package/dist/esm/ExaWebSearch.js.map +1 -0
  277. package/dist/esm/Explore.d.ts +328 -0
  278. package/dist/esm/Explore.d.ts.map +1 -0
  279. package/dist/esm/Explore.js +106 -0
  280. package/dist/esm/Explore.js.map +1 -0
  281. package/dist/esm/Fetch.d.ts +130 -0
  282. package/dist/esm/Fetch.d.ts.map +1 -0
  283. package/dist/esm/Fetch.js +91 -0
  284. package/dist/esm/Fetch.js.map +1 -0
  285. package/dist/esm/Glob.d.ts +204 -0
  286. package/dist/esm/Glob.d.ts.map +1 -0
  287. package/dist/esm/Glob.js +177 -0
  288. package/dist/esm/Glob.js.map +1 -0
  289. package/dist/esm/Grep.d.ts +347 -0
  290. package/dist/esm/Grep.d.ts.map +1 -0
  291. package/dist/esm/Grep.js +289 -0
  292. package/dist/esm/Grep.js.map +1 -0
  293. package/dist/esm/HttpPost.d.ts +130 -0
  294. package/dist/esm/HttpPost.d.ts.map +1 -0
  295. package/dist/esm/HttpPost.js +89 -0
  296. package/dist/esm/HttpPost.js.map +1 -0
  297. package/dist/esm/LanguageServer.d.ts +90 -0
  298. package/dist/esm/LanguageServer.d.ts.map +1 -0
  299. package/dist/esm/LanguageServer.js +57 -0
  300. package/dist/esm/LanguageServer.js.map +1 -0
  301. package/dist/esm/Ls.d.ts +164 -0
  302. package/dist/esm/Ls.d.ts.map +1 -0
  303. package/dist/esm/Ls.js +178 -0
  304. package/dist/esm/Ls.js.map +1 -0
  305. package/dist/esm/Lsp.d.ts +125 -0
  306. package/dist/esm/Lsp.d.ts.map +1 -0
  307. package/dist/esm/Lsp.js +165 -0
  308. package/dist/esm/Lsp.js.map +1 -0
  309. package/dist/esm/Manifest.d.ts +918 -0
  310. package/dist/esm/Manifest.d.ts.map +1 -0
  311. package/dist/esm/Manifest.js +153 -0
  312. package/dist/esm/Manifest.js.map +1 -0
  313. package/dist/esm/NativeSearch.d.ts +38 -0
  314. package/dist/esm/NativeSearch.d.ts.map +1 -0
  315. package/dist/esm/NativeSearch.js +378 -0
  316. package/dist/esm/NativeSearch.js.map +1 -0
  317. package/dist/esm/NodeLanguageServer.d.ts +128 -0
  318. package/dist/esm/NodeLanguageServer.d.ts.map +1 -0
  319. package/dist/esm/NodeLanguageServer.js +843 -0
  320. package/dist/esm/NodeLanguageServer.js.map +1 -0
  321. package/dist/esm/PortableSearch.d.ts +36 -0
  322. package/dist/esm/PortableSearch.d.ts.map +1 -0
  323. package/dist/esm/PortableSearch.js +256 -0
  324. package/dist/esm/PortableSearch.js.map +1 -0
  325. package/dist/esm/Probe.d.ts +193 -0
  326. package/dist/esm/Probe.d.ts.map +1 -0
  327. package/dist/esm/Probe.js +225 -0
  328. package/dist/esm/Probe.js.map +1 -0
  329. package/dist/esm/Read.d.ts +189 -0
  330. package/dist/esm/Read.d.ts.map +1 -0
  331. package/dist/esm/Read.js +300 -0
  332. package/dist/esm/Read.js.map +1 -0
  333. package/dist/esm/Relocate.d.ts +73 -0
  334. package/dist/esm/Relocate.d.ts.map +1 -0
  335. package/dist/esm/Relocate.js +153 -0
  336. package/dist/esm/Relocate.js.map +1 -0
  337. package/dist/esm/RemoteSearch.d.ts +54 -0
  338. package/dist/esm/RemoteSearch.d.ts.map +1 -0
  339. package/dist/esm/RemoteSearch.js +162 -0
  340. package/dist/esm/RemoteSearch.js.map +1 -0
  341. package/dist/esm/Search.d.ts +163 -0
  342. package/dist/esm/Search.d.ts.map +1 -0
  343. package/dist/esm/Search.js +47 -0
  344. package/dist/esm/Search.js.map +1 -0
  345. package/dist/esm/SearchConformance.d.ts +115 -0
  346. package/dist/esm/SearchConformance.d.ts.map +1 -0
  347. package/dist/esm/SearchConformance.js +193 -0
  348. package/dist/esm/SearchConformance.js.map +1 -0
  349. package/dist/esm/SearchContract.d.ts +114 -0
  350. package/dist/esm/SearchContract.d.ts.map +1 -0
  351. package/dist/esm/SearchContract.js +461 -0
  352. package/dist/esm/SearchContract.js.map +1 -0
  353. package/dist/esm/ShellCommand.d.ts +164 -0
  354. package/dist/esm/ShellCommand.d.ts.map +1 -0
  355. package/dist/esm/ShellCommand.js +159 -0
  356. package/dist/esm/ShellCommand.js.map +1 -0
  357. package/dist/esm/StdError.d.ts +55 -0
  358. package/dist/esm/StdError.d.ts.map +1 -0
  359. package/dist/esm/StdError.js +71 -0
  360. package/dist/esm/StdError.js.map +1 -0
  361. package/dist/esm/TestRun.d.ts +311 -0
  362. package/dist/esm/TestRun.d.ts.map +1 -0
  363. package/dist/esm/TestRun.js +316 -0
  364. package/dist/esm/TestRun.js.map +1 -0
  365. package/dist/esm/TestRunner.d.ts +102 -0
  366. package/dist/esm/TestRunner.d.ts.map +1 -0
  367. package/dist/esm/TestRunner.js +68 -0
  368. package/dist/esm/TestRunner.js.map +1 -0
  369. package/dist/esm/TreeFingerprint.d.ts +140 -0
  370. package/dist/esm/TreeFingerprint.d.ts.map +1 -0
  371. package/dist/esm/TreeFingerprint.js +170 -0
  372. package/dist/esm/TreeFingerprint.js.map +1 -0
  373. package/dist/esm/UpdatePlan.d.ts +152 -0
  374. package/dist/esm/UpdatePlan.d.ts.map +1 -0
  375. package/dist/esm/UpdatePlan.js +129 -0
  376. package/dist/esm/UpdatePlan.js.map +1 -0
  377. package/dist/esm/WebFetch.d.ts +134 -0
  378. package/dist/esm/WebFetch.d.ts.map +1 -0
  379. package/dist/esm/WebFetch.js +151 -0
  380. package/dist/esm/WebFetch.js.map +1 -0
  381. package/dist/esm/WebSearch.d.ts +181 -0
  382. package/dist/esm/WebSearch.d.ts.map +1 -0
  383. package/dist/esm/WebSearch.js +134 -0
  384. package/dist/esm/WebSearch.js.map +1 -0
  385. package/dist/esm/Write.d.ts +147 -0
  386. package/dist/esm/Write.d.ts.map +1 -0
  387. package/dist/esm/Write.js +144 -0
  388. package/dist/esm/Write.js.map +1 -0
  389. package/dist/esm/index.d.ts +129 -0
  390. package/dist/esm/index.d.ts.map +1 -0
  391. package/dist/esm/index.js +129 -0
  392. package/dist/esm/index.js.map +1 -0
  393. package/dist/esm/internal/ApplyPatch.d.ts +145 -0
  394. package/dist/esm/internal/ApplyPatch.d.ts.map +1 -0
  395. package/dist/esm/internal/ApplyPatch.js +489 -0
  396. package/dist/esm/internal/ApplyPatch.js.map +1 -0
  397. package/dist/esm/internal/CodexText.d.ts +73 -0
  398. package/dist/esm/internal/CodexText.d.ts.map +1 -0
  399. package/dist/esm/internal/CodexText.js +156 -0
  400. package/dist/esm/internal/CodexText.js.map +1 -0
  401. package/dist/esm/internal/Declaration.d.ts +49 -0
  402. package/dist/esm/internal/Declaration.d.ts.map +1 -0
  403. package/dist/esm/internal/Declaration.js +42 -0
  404. package/dist/esm/internal/Declaration.js.map +1 -0
  405. package/dist/esm/internal/Diagnostics.d.ts +77 -0
  406. package/dist/esm/internal/Diagnostics.d.ts.map +1 -0
  407. package/dist/esm/internal/Diagnostics.js +99 -0
  408. package/dist/esm/internal/Diagnostics.js.map +1 -0
  409. package/dist/esm/internal/EnvelopePrecheck.d.ts +69 -0
  410. package/dist/esm/internal/EnvelopePrecheck.d.ts.map +1 -0
  411. package/dist/esm/internal/EnvelopePrecheck.js +426 -0
  412. package/dist/esm/internal/EnvelopePrecheck.js.map +1 -0
  413. package/dist/esm/internal/Exec.d.ts +151 -0
  414. package/dist/esm/internal/Exec.d.ts.map +1 -0
  415. package/dist/esm/internal/Exec.js +285 -0
  416. package/dist/esm/internal/Exec.js.map +1 -0
  417. package/dist/esm/internal/FileMutation.d.ts +109 -0
  418. package/dist/esm/internal/FileMutation.d.ts.map +1 -0
  419. package/dist/esm/internal/FileMutation.js +123 -0
  420. package/dist/esm/internal/FileMutation.js.map +1 -0
  421. package/dist/esm/internal/FsFailure.d.ts +38 -0
  422. package/dist/esm/internal/FsFailure.d.ts.map +1 -0
  423. package/dist/esm/internal/FsFailure.js +39 -0
  424. package/dist/esm/internal/FsFailure.js.map +1 -0
  425. package/dist/esm/internal/GitWorktree.d.ts +108 -0
  426. package/dist/esm/internal/GitWorktree.d.ts.map +1 -0
  427. package/dist/esm/internal/GitWorktree.js +352 -0
  428. package/dist/esm/internal/GitWorktree.js.map +1 -0
  429. package/dist/esm/internal/Grouping.d.ts +51 -0
  430. package/dist/esm/internal/Grouping.d.ts.map +1 -0
  431. package/dist/esm/internal/Grouping.js +99 -0
  432. package/dist/esm/internal/Grouping.js.map +1 -0
  433. package/dist/esm/internal/Html.d.ts +20 -0
  434. package/dist/esm/internal/Html.d.ts.map +1 -0
  435. package/dist/esm/internal/Html.js +70 -0
  436. package/dist/esm/internal/Html.js.map +1 -0
  437. package/dist/esm/internal/Http.d.ts +95 -0
  438. package/dist/esm/internal/Http.d.ts.map +1 -0
  439. package/dist/esm/internal/Http.js +154 -0
  440. package/dist/esm/internal/Http.js.map +1 -0
  441. package/dist/esm/internal/HttpNetwork.d.ts +27 -0
  442. package/dist/esm/internal/HttpNetwork.d.ts.map +1 -0
  443. package/dist/esm/internal/HttpNetwork.js +114 -0
  444. package/dist/esm/internal/HttpNetwork.js.map +1 -0
  445. package/dist/esm/internal/Ignore.d.ts +37 -0
  446. package/dist/esm/internal/Ignore.d.ts.map +1 -0
  447. package/dist/esm/internal/Ignore.js +128 -0
  448. package/dist/esm/internal/Ignore.js.map +1 -0
  449. package/dist/esm/internal/LinearRegex.d.ts +19 -0
  450. package/dist/esm/internal/LinearRegex.d.ts.map +1 -0
  451. package/dist/esm/internal/LinearRegex.js +176 -0
  452. package/dist/esm/internal/LinearRegex.js.map +1 -0
  453. package/dist/esm/internal/Match.d.ts +85 -0
  454. package/dist/esm/internal/Match.d.ts.map +1 -0
  455. package/dist/esm/internal/Match.js +142 -0
  456. package/dist/esm/internal/Match.js.map +1 -0
  457. package/dist/esm/internal/Paths.d.ts +23 -0
  458. package/dist/esm/internal/Paths.d.ts.map +1 -0
  459. package/dist/esm/internal/Paths.js +40 -0
  460. package/dist/esm/internal/Paths.js.map +1 -0
  461. package/dist/esm/internal/Preserve.d.ts +25 -0
  462. package/dist/esm/internal/Preserve.d.ts.map +1 -0
  463. package/dist/esm/internal/Preserve.js +70 -0
  464. package/dist/esm/internal/Preserve.js.map +1 -0
  465. package/dist/esm/internal/Prune.d.ts +35 -0
  466. package/dist/esm/internal/Prune.d.ts.map +1 -0
  467. package/dist/esm/internal/Prune.js +60 -0
  468. package/dist/esm/internal/Prune.js.map +1 -0
  469. package/dist/esm/internal/RemoteTree.d.ts +60 -0
  470. package/dist/esm/internal/RemoteTree.d.ts.map +1 -0
  471. package/dist/esm/internal/RemoteTree.js +132 -0
  472. package/dist/esm/internal/RemoteTree.js.map +1 -0
  473. package/dist/esm/internal/SearchContract.d.ts +63 -0
  474. package/dist/esm/internal/SearchContract.d.ts.map +1 -0
  475. package/dist/esm/internal/SearchContract.js +66 -0
  476. package/dist/esm/internal/SearchContract.js.map +1 -0
  477. package/dist/esm/internal/Symbols.d.ts +39 -0
  478. package/dist/esm/internal/Symbols.d.ts.map +1 -0
  479. package/dist/esm/internal/Symbols.js +79 -0
  480. package/dist/esm/internal/Symbols.js.map +1 -0
  481. package/dist/esm/internal/Tar.d.ts +23 -0
  482. package/dist/esm/internal/Tar.d.ts.map +1 -0
  483. package/dist/esm/internal/Tar.js +97 -0
  484. package/dist/esm/internal/Tar.js.map +1 -0
  485. package/dist/esm/internal/TestReport.d.ts +52 -0
  486. package/dist/esm/internal/TestReport.d.ts.map +1 -0
  487. package/dist/esm/internal/TestReport.js +172 -0
  488. package/dist/esm/internal/TestReport.js.map +1 -0
  489. package/dist/esm/internal/Text.d.ts +125 -0
  490. package/dist/esm/internal/Text.d.ts.map +1 -0
  491. package/dist/esm/internal/Text.js +141 -0
  492. package/dist/esm/internal/Text.js.map +1 -0
  493. package/dist/esm/internal/Url.d.ts +13 -0
  494. package/dist/esm/internal/Url.d.ts.map +1 -0
  495. package/dist/esm/internal/Url.js +27 -0
  496. package/dist/esm/internal/Url.js.map +1 -0
  497. package/dist/esm/internal/Walk.d.ts +72 -0
  498. package/dist/esm/internal/Walk.d.ts.map +1 -0
  499. package/dist/esm/internal/Walk.js +126 -0
  500. package/dist/esm/internal/Walk.js.map +1 -0
  501. package/docs/README.md +119 -0
  502. package/docs/api.md +499 -0
  503. package/docs/concepts/effects-and-capabilities.md +138 -0
  504. package/docs/concepts/flows-and-handlers.md +115 -0
  505. package/docs/concepts/limits-and-disclosure.md +105 -0
  506. package/docs/concepts/search-contract.md +182 -0
  507. package/docs/guides/bind-the-standard-flows.md +116 -0
  508. package/docs/guides/implement-a-search-peer.md +133 -0
  509. package/docs/guides/pin-a-checkpoint.md +161 -0
  510. package/docs/guides/query-a-language-server.md +257 -0
  511. package/docs/guides/reach-the-network.md +141 -0
  512. package/docs/guides/read-and-edit-a-file.md +240 -0
  513. package/docs/guides/run-a-shell-command.md +236 -0
  514. package/docs/guides/run-the-test-suite.md +154 -0
  515. package/docs/guides/search-a-workspace.md +148 -0
  516. package/docs/installation.md +115 -0
  517. package/docs/quickstart.md +125 -0
  518. package/docs/reference/flows.md +556 -0
  519. package/docs/troubleshooting.md +347 -0
  520. package/package.json +449 -3
  521. package/src/ApplyPatch.ts +458 -0
  522. package/src/Bash.ts +619 -0
  523. package/src/Checkpoints.ts +589 -0
  524. package/src/Container.ts +212 -0
  525. package/src/Edit.ts +366 -0
  526. package/src/ExaWebSearch.ts +145 -0
  527. package/src/Explore.ts +139 -0
  528. package/src/Fetch.ts +117 -0
  529. package/src/Glob.ts +200 -0
  530. package/src/Grep.ts +320 -0
  531. package/src/HttpPost.ts +120 -0
  532. package/src/LanguageServer.ts +110 -0
  533. package/src/Ls.ts +228 -0
  534. package/src/Lsp.ts +184 -0
  535. package/src/Manifest.ts +162 -0
  536. package/src/NativeSearch.ts +457 -0
  537. package/src/NodeLanguageServer.ts +1148 -0
  538. package/src/PortableSearch.ts +284 -0
  539. package/src/Probe.ts +284 -0
  540. package/src/Read.ts +359 -0
  541. package/src/Relocate.ts +166 -0
  542. package/src/RemoteSearch.ts +199 -0
  543. package/src/Search.ts +185 -0
  544. package/src/SearchConformance.ts +288 -0
  545. package/src/SearchContract.ts +489 -0
  546. package/src/ShellCommand.ts +201 -0
  547. package/src/StdError.ts +80 -0
  548. package/src/TestRun.ts +401 -0
  549. package/src/TestRunner.ts +119 -0
  550. package/src/TreeFingerprint.ts +200 -0
  551. package/src/UpdatePlan.ts +171 -0
  552. package/src/WebFetch.ts +194 -0
  553. package/src/WebSearch.ts +165 -0
  554. package/src/Write.ts +195 -0
  555. package/src/index.ts +157 -0
  556. package/src/internal/ApplyPatch.ts +601 -0
  557. package/src/internal/CodexText.ts +182 -0
  558. package/src/internal/Declaration.ts +60 -0
  559. package/src/internal/Diagnostics.ts +134 -0
  560. package/src/internal/EnvelopePrecheck.ts +489 -0
  561. package/src/internal/Exec.ts +427 -0
  562. package/src/internal/FileMutation.ts +231 -0
  563. package/src/internal/FsFailure.ts +51 -0
  564. package/src/internal/GitWorktree.ts +491 -0
  565. package/src/internal/Grouping.ts +106 -0
  566. package/src/internal/Html.ts +87 -0
  567. package/src/internal/Http.ts +209 -0
  568. package/src/internal/HttpNetwork.ts +153 -0
  569. package/src/internal/Ignore.ts +135 -0
  570. package/src/internal/LinearRegex.ts +173 -0
  571. package/src/internal/Match.ts +172 -0
  572. package/src/internal/Paths.ts +42 -0
  573. package/src/internal/Preserve.ts +108 -0
  574. package/src/internal/Prune.ts +62 -0
  575. package/src/internal/RemoteTree.ts +159 -0
  576. package/src/internal/SearchContract.ts +77 -0
  577. package/src/internal/Symbols.ts +88 -0
  578. package/src/internal/Tar.ts +95 -0
  579. package/src/internal/TestReport.ts +194 -0
  580. package/src/internal/Text.ts +185 -0
  581. package/src/internal/Url.ts +23 -0
  582. package/src/internal/Walk.ts +176 -0
package/docs/api.md ADDED
@@ -0,0 +1,499 @@
1
+ ---
2
+ title: "API reference"
3
+ description: "Every module and every public export of @smthrs/std: the flow modules, the six injectable services, their implementations, the search contract, the registries, and the error type."
4
+ sidebar:
5
+ order: 1
6
+ ---
7
+
8
+ The package exports 32 modules. Each is reachable from the root entry point as a
9
+ namespace and from its own subpath:
10
+
11
+ ```ts
12
+ import { Read } from "@smthrs/std"
13
+ import * as Read from "@smthrs/std/Read"
14
+ ```
15
+
16
+ `@smthrs/std/internal/*` and `@smthrs/std/<Module>/index` are not public.
17
+
18
+ Host child processes receive only `PATH`, `HOME`, `USER`, `LANG`, `LC_*`,
19
+ `TERM`, `TMPDIR`, and `SHELL` from the Smithers process, plus names explicitly
20
+ declared by the caller. Credential-shaped ambient names are withheld; an
21
+ explicit declaration is applied last and therefore opts that name in.
22
+
23
+ For the input and output fields of each flow, see the
24
+ [Flow reference](./reference/flows.md). This page is the module and export
25
+ surface.
26
+
27
+ ## Example
28
+
29
+ ```ts
30
+ import { NodeServices } from "@effect/platform-node"
31
+ import * as Read from "@smthrs/std/Read"
32
+
33
+ const page = await Effect.runPromise(
34
+ Effect.provide(Read.run({ path: "./README.md", limit: 20 }), NodeServices.layer)
35
+ )
36
+ console.log(page.content, page.totalLines, page.truncated)
37
+ ```
38
+
39
+ ## The flow modules
40
+
41
+ Seventeen modules declare a flow. Every one of them exports the same names:
42
+
43
+ | Export | Type | Meaning |
44
+ | -------------- | ---------------------------------------- | ---------------------------------------- |
45
+ | `name` | string literal | The registry name. |
46
+ | `description` | string | The one line the model sees. |
47
+ | `Input` | `Schema` and the decoded type | The input schema. |
48
+ | `Output` | `Schema` and the decoded type | The output schema. |
49
+ | `effects` | `Effects.Declaration` | The declared envelope, before any input. |
50
+ | `effectsFor` | `(input) => Effects.Declaration` | The envelope narrowed to one input. |
51
+ | `capabilities` | `ReadonlyArray<string>` | `action:resource` strings. |
52
+ | `flow` | `Flow` | The declaration, built by `Flow.make`. |
53
+ | `run` | `(input) => Effect<Output, StdError, R>` | The handler. |
54
+
55
+ The modules are `ApplyPatch`, `Bash`, `Edit`, `Explore`, `Fetch`, `Glob`,
56
+ `Grep`, `HttpPost`, `Ls`, `Lsp`, `Read`, `ShellCommand`, `TestRun`,
57
+ `UpdatePlan`, `WebFetch`, `WebSearch`, and `Write`.
58
+
59
+ Some of them export more than the common nine:
60
+
61
+ | Module | Additional exports |
62
+ | -------------- | ------------------------------------------------------------------------------------------- |
63
+ | `Bash` | `DEFAULT_TIMEOUT_MS`, `elideMiddle(start, droppedBytes, end)` |
64
+ | `Explore` | `make(options: { model?: string })`, and no `run` |
65
+ | `Grep` | `ContextLine`, `Symbol`, `Match` schemas |
66
+ | `Read` | `MAX_READ_FILE_BYTES`, the 64 MiB bound past which `read` refuses a file |
67
+ | `ShellCommand` | `DEFAULT_TIMEOUT_MS`, `MAX_CAPTURE_BYTES`, `DEFAULT_MAX_OUTPUT_TOKENS`, `TIMEOUT_EXIT_CODE` |
68
+ | `TestRun` | `scratchDirectory`, `DEFAULT_TIMEOUT_MS`, `MAX_CAPTURE_BYTES`, `Outcome` |
69
+ | `UpdatePlan` | `StepStatus`, `Plan` |
70
+ | `WebSearch` | the `WebSearch` service, `make`, `makeNoop`, `layerNoop` |
71
+
72
+ A runner declared with `baseline: false` refuses `against: "base"` before
73
+ running any process. The native CLI sets this flag until an isolated staging
74
+ provider is available ([#3234](https://github.com/smithersai/smithers/issues/3234)). Workspace tests still use the confined runner. Library
75
+ hosts that omit the flag keep baseline Git on their caller-provided spawner.
76
+ The runner wrapper uses `bash -c` and does not execute host login profiles.
77
+
78
+ ## Manifest
79
+
80
+ The whole library keyed by registry name. Every registry is frozen.
81
+
82
+ | Export | Type | Meaning |
83
+ | ------------ | ------------------------------------ | ------------------------------------------ |
84
+ | `flows` | record of name to declaration | All 17 declarations. |
85
+ | `handlers` | record of name to handler | The 16 that have one; `explore` is absent. |
86
+ | `effectsFor` | record of name to narrowing function | All 17, including `explore`. |
87
+ | `names` | readonly tuple of 17 names | Registry order. |
88
+ | `readOnly` | readonly tuple of 8 names | The read-only projection. |
89
+
90
+ ```ts
91
+ import * as Manifest from "@smthrs/std/Manifest"
92
+
93
+ Manifest.names // ["read", "write", "edit", "ls", "glob", "grep", "bash", ...]
94
+ Manifest.readOnly // ["read", "ls", "glob", "grep", "fetch", "explore", "webfetch", "lsp"]
95
+ ```
96
+
97
+ ## StdError
98
+
99
+ The single typed failure every handler uses.
100
+
101
+ | Export | Type | Meaning |
102
+ | ---------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
103
+ | `Code` | `Schema.Literals` and the matching type | The closed list of failure codes. |
104
+ | `StdError` | `Schema.TaggedError` class | `{ code, message, path?, base_digest?, current_digest?, method?, rpcError?, stderr?, limitMillis? }`, tagged `@smthrs/std/StdError`. |
105
+
106
+ ```ts
107
+ import * as StdError from "@smthrs/std/StdError"
108
+
109
+ const failure = new StdError.StdError({
110
+ code: "not_found",
111
+ message: "File not found: /workspace/missing.ts",
112
+ path: "/workspace/missing.ts"
113
+ })
114
+ ```
115
+
116
+ The codes are listed in the [Flow reference](./reference/flows.md#failures).
117
+
118
+ Every service key, error tag, and class identifier in this package is
119
+ `@smthrs/std/<Name>`, so `Effect.catchTag("@smthrs/std/StdError", ...)` catches
120
+ every handler failure.
121
+
122
+ ## Probe
123
+
124
+ Telling an invalid probe from a failing check. A non-zero exit is a runner's
125
+ verdict about the code it ran, not about the command it was handed.
126
+
127
+ | Export | Type | Meaning |
128
+ | ------------------ | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
129
+ | `key` | `"invalidProbe"` | The reserved output key a flow reports one under. |
130
+ | `Reason` | `Schema.Literals` and the matching type | `unknown-command`, `unknown-test`, `unknown-path`, `unknown-module`, `unknown-environment`. |
131
+ | `InvalidProbe` | `Schema.Struct` and the matching type | `{ reason, evidence, message }`. |
132
+ | `Attribution` | `{ to, executed?, invalidProbe? }` | What one result was attributed to: the tree, or one of the five. |
133
+ | `CONFIDENCE_FLOOR` | `0.7` | The confidence an attribution needs before it outranks the tree. |
134
+ | `MAX_OUTPUT_BYTES` | `32768` | The most output bytes one judgment carries, newest kept. |
135
+ | `probeAttribution` | `Classifier` `probe/attribution` | The classifier `classify` asks: `attribution` choice, `executed` boolean. |
136
+ | `classify` | `(result: { command, exitCode, output }) => Effect<Attribution, ClassifierError, Evaluator>` | Attributes one command result, with Jev. |
137
+ | `unjudged` | `(error: ClassifierError) => StdError` | The standard-flow failure a judge that did not answer is. |
138
+
139
+ ```ts
140
+ import * as Probe from "@smthrs/std/Probe"
141
+
142
+ const attribution = yield * Probe.classify({ command: "pytest tests/x.py::nope", exitCode: 4, output })
143
+ // { to: "unknown-test", executed: false, invalidProbe: { reason: "unknown-test", ... } }
144
+ ```
145
+
146
+ The attribution is Jev's: `classify` asks `probeAttribution`, the exported
147
+ `probe/attribution` declaration, through the `Evaluator` service of
148
+ [`@smthrs/model`](/api/model), so a host needs a bound evaluator on a
149
+ subscription seat. A zero exit is attributed to the tree without the judge. All non-zero exits,
150
+ including 126 and 127, need attribution: a runner can choose those codes after
151
+ executing a check. An answer below
152
+ `CONFIDENCE_FLOOR` is the tree's failure, which leaves a genuine reproduction
153
+ intact. There is no third path: when the judge does not answer, `unjudged`
154
+ turns its failure into the caller's typed failure rather than a guess.
155
+
156
+ ## Search
157
+
158
+ The implementation seam behind `grep` and `glob`.
159
+
160
+ | Export | Type | Meaning |
161
+ | ------------- | ----------------------------------- | ---------------------------------------------------------------------------- |
162
+ | `Search` | interface and `Context.Service` tag | `{ grep, glob }`. |
163
+ | `make` | `(service: Search) => Search` | Builds a peer from its two operations. |
164
+ | `makeNoop` | `() => Search` | Fails both calls with `provider_unavailable`. |
165
+ | `layerNoop` | `Layer<Search>` | Provides `makeNoop`. |
166
+ | `GrepInput` | interface | Normalized grep input, with every option resolved. |
167
+ | `GrepOutput` | interface | `matches`, `files`, `filesSearched`, `skippedBinary`, `truncated`, `notice`. |
168
+ | `GrepLine` | interface | One row a peer produces before grouping: `file`, `line`, `text`, `kind`. |
169
+ | `GrepMatch` | interface | One hit with its `before`, `after`, and `symbol`. |
170
+ | `ContextLine` | interface | `line`, `text`. |
171
+ | `Symbol` | interface | `kind`, `name`, `startLine`, `endLine`. |
172
+ | `GlobInput` | interface | `pattern`, `root`, `hidden`, `limit`. |
173
+ | `GlobOutput` | interface | `paths`, `total`, `truncated`, `notice`. |
174
+
175
+ Both operations return `Effect<_, StdError>` with no requirement, so a peer
176
+ resolves its own services when it is built.
177
+
178
+ ## PortableSearch
179
+
180
+ The in-process peer. Walks the injected `FileSystem`, so it needs no external
181
+ binary and is browser-safe.
182
+
183
+ | Export | Type |
184
+ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
185
+ | `make` | `(services: Context<FileSystem \| Path>) => Search.Search` |
186
+ | `layer` | `Layer<Search.Search, never, FileSystem \| Path>` |
187
+ | `searched` | `(input: Pick<GrepInput, "root" \| "hidden" \| "noIgnore" \| "globs">) => Effect<ReadonlyArray<string>, StdError, FileSystem \| Path>` |
188
+
189
+ `searched` names the files `grep` reads for an input, in the order it reads
190
+ them; `RemoteSearch` fetches exactly those.
191
+
192
+ ## NativeSearch
193
+
194
+ The peer that drives the `rg` executable through the permission-aware spawner.
195
+
196
+ | Export | Type | Meaning |
197
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
198
+ | `MAX_CAPTURE_BYTES` | `67_108_864` | Bytes captured from either `rg` stream before the call is refused. |
199
+ | `make` | `(services: Context<FileSystem \| Path \| ChildProcessSpawner>, environment?: Readonly<Record<string, string>>) => Search.Search` | |
200
+ | `layer` | `Layer<Search.Search, never, FileSystem \| Path \| ChildProcessSpawner>` | |
201
+
202
+ An overflow is `command_failed` rather than a truncation, because a partial
203
+ ripgrep stream could make this peer disagree with the portable one. A failure to
204
+ start `rg` is `provider_unavailable`. The default layer uses the host environment
205
+ allowlist. `make` accepts explicit environment declarations as its second
206
+ argument; those names override the allowlist.
207
+
208
+ ## RemoteSearch
209
+
210
+ The peer for a tree on another machine, such as a container or a sandbox
211
+ machine. It lists the root with the machine's `find`, brings back its
212
+ `.gitignore` files and then the files the search reads with `tar`, and lets
213
+ `PortableSearch` answer over that copy, so every result, notice, and refusal is
214
+ the in-process peer's. Each search is two round trips through the machine's
215
+ spawner, whatever the tree's size.
216
+
217
+ | Export | Type | Meaning |
218
+ | ---------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
219
+ | `maxBytes` | `268_435_456` | The most file content one search brings back; past it, `response_too_large`. |
220
+ | `make` | `(services: Context<ChildProcessSpawner \| Path>, options?: { maxBytes?: number }) => Search.Search` | The spawner runs on the machine; `Path` resolves a relative root there. |
221
+
222
+ The machine needs `sh`, `find`, `xargs`, `tar`, `head`, and `base64`; GNU,
223
+ BusyBox, and BSD userlands all have them, and a machine without one refuses
224
+ with `command_failed` naming it. The program goes in on standard input and
225
+ the answer comes back as base64, so a transport whose argv is bounded or whose
226
+ output channel carries only text answers intact.
227
+
228
+ ## SearchContract
229
+
230
+ The validation and matching rules both peers build on, exported so a third peer
231
+ cannot drift on what a pattern means.
232
+
233
+ | Export | Type | Meaning |
234
+ | --------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------ |
235
+ | `validatePattern` | `(pattern: string, fixedStrings: boolean) => StdError \| undefined` | Checks Smithers Ripgrep ASCII v1. |
236
+ | `validateGlob` | `(glob: string) => StdError \| undefined` | Checks the glob grammar. |
237
+ | `canonicalGlob` | `(glob: string) => string` | The one spelling both peers match against. |
238
+ | `matchesGlob` | `(pattern: string, relative: string, basename: string) => boolean` | One glob against one candidate. |
239
+ | `includedByGlobs` | `(globs: ReadonlyArray<string>, relative: string, basename: string) => boolean` | Ordered include and exclude. |
240
+ | `expression` | `(pattern: string, fixedStrings: boolean, insensitive: boolean) => RegExp` | Compiles a validated pattern. |
241
+ | `unsatisfiableNotice` | `(options: { fileSystem, path, root, globs, hidden }) => Effect<string \| undefined>` | Explains globs no file under the root can match. |
242
+ | `isContractRejection` | `(error: StdError) => boolean` | Whether this contract wrote the rejection. |
243
+
244
+ ## SearchConformance
245
+
246
+ A differential kit that reports where two `Search` peers disagree.
247
+
248
+ | Export | Type | Meaning |
249
+ | --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
250
+ | `GeneratedFile` | interface | `path` relative to the tree root, and `content`. |
251
+ | `Plan` | interface | `seed`, `root`, `files`, `grep`, `glob`. |
252
+ | `Divergence` | interface | `call`, `input`, `subject`, `reference`. |
253
+ | `plan` | `(options: { seed, root, files?, calls? }) => Plan` | Builds a reproducible tree and call batch. Defaults are 12 files and 12 calls. |
254
+ | `materialize` | `(plan: Plan) => Effect<void, never, FileSystem \| Path>` | Writes the tree. |
255
+ | `compare` | `(options: { plan, subject, reference }) => Effect<ReadonlyArray<Divergence>>` | Runs every call through both peers. |
256
+ | `report` | `(divergences: ReadonlyArray<Divergence>) => string` | Renders them as a failing run's output. |
257
+
258
+ ## Container
259
+
260
+ The host's route into a named container, as an injected transport. Nothing here
261
+ spawns: it only decides an argv, which `bash` then spawns through the same
262
+ permission-aware spawner as everything else.
263
+
264
+ | Export | Type | Meaning |
265
+ | -------------- | ------------------------------------------------------ | -------------------------------------------------------------------------- |
266
+ | `Container` | interface and `Context.Service` tag | `{ exec: (request: Request) => Effect<Plan, StdError> }`. |
267
+ | `Request` | interface | `container`, `file`, `args`, `cwd?`, `env?`, `stdin`. |
268
+ | `Plan` | interface | `file`, `args`, `env?`: argv and environment overrides for the host spawn. |
269
+ | `make` | `(service: Container) => Container` | |
270
+ | `unavailable` | `(container: string) => StdError` | The refusal a host with no route answers with. |
271
+ | `makeNoop` | `() => Container` | Fails every request with `unavailable`. |
272
+ | `layerNoop` | `Layer<Container>` | |
273
+ | `makeCommand` | `(options?: { program?: string }) => Container` | A `docker exec` compatible CLI. Defaults to `docker`. |
274
+ | `layerCommand` | `(options?: { program?: string }) => Layer<Container>` | |
275
+
276
+ `makeCommand` attaches `-i` only when the payload arrives on standard input,
277
+ because a container CLI holding stdin open for a command that never reads it
278
+ makes that command hang. A container name that is empty or starts with `-` is
279
+ `invalid_input`, and so is an environment name that is not a POSIX shell name.
280
+ A requested variable never reaches the host transport process under its own
281
+ name, so `PATH`, `LD_PRELOAD`, or `DOCKER_HOST` cannot choose what runs on the
282
+ host: `Plan.env` carries each value as `SMITHERS_CONTAINER_ENV_KEY`, argv
283
+ carries only `-e SMITHERS_CONTAINER_ENV_KEY`, and an `sh -c` inside the
284
+ container renames it to `KEY` before `exec`ing the program. A request that
285
+ carries `env` therefore requires `sh` on the container's `PATH`; an image
286
+ without one (distroless, `scratch`) fails every such request, and a request
287
+ without `env` runs the program directly. Supply a custom transport for such an
288
+ image. Custom transports return any host process environment overrides in
289
+ `Plan.env`.
290
+
291
+ ## TreeFingerprint
292
+
293
+ The identity of one directory tree, measured where the tree is. The host's
294
+ workspace walk cannot see a container's filesystem, so `bash` runs this
295
+ script through the container transport before and after a containerised
296
+ command and reports whether the two answers differ under the reserved
297
+ `mutated` key. The harness reads `true` as a measured write, the way it reads
298
+ `invalidProbe` as a measured refusal.
299
+
300
+ | Export | Type | Meaning |
301
+ | ----------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
302
+ | `key` | `"mutated"` | The reserved output key a flow reports a measured write under. |
303
+ | `defaultPrune` | `ReadonlyArray<string>` | Directory names never descended into: every name the search walk skips, including both scratch checkout directories, plus `venv` and `target`. |
304
+ | `defaultIgnoreSuffixes` | `ReadonlyArray<string>` | Name suffixes left out, compiled output above all. |
305
+ | `maxPaths` | `50000` | The bound past which a listing is a prefix and reports `complete: false`. |
306
+ | `Measurement` | interface | `{ digest, paths, complete }`. |
307
+ | `script` | `(options?: { prune?, ignoreSuffixes? }) => string` | The POSIX shell script: sorted `find` + `stat -c` listing, `cksum`, count. |
308
+ | `parse` | `(stdout: string) => Measurement \| undefined` | Reads one measurement; anything malformed is unmeasured, never unchanged. |
309
+ | `moved` | `(before?, after?) => boolean \| undefined` | `true`/`false` from two complete measurements; `undefined` from anything less. |
310
+
311
+ Identity, not content: size and mtime per file, so a rewrite that restores
312
+ both is invisible, exactly as it is to the host walk. Every tool the script
313
+ needs is POSIX or busybox; a container without one exits non-zero and `bash`
314
+ reports no `mutated` at all.
315
+
316
+ ## TestRunner
317
+
318
+ How the project under test runs its suite, declared once by the host.
319
+
320
+ | Export | Type | Meaning |
321
+ | ------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------- |
322
+ | `captureBase` | `"refs/flows/capture-base"` | The default ref naming the pristine tree. |
323
+ | `Runner` | interface | `command`, `cwd?`, `root?`, `container?`, `env?`, `baseRef?`, `baseline?: false`, `timeoutMs?`. |
324
+ | `TestRunner` | interface and `Context.Service` tag | `{ declared: Effect<Runner, StdError> }`. |
325
+ | `make` | `(runner: Runner) => TestRunner` | |
326
+ | `makeNoop` | `() => TestRunner` | Declares that this host knows of no runner. |
327
+ | `layer` | `(runner: Runner) => Layer<TestRunner>` | |
328
+ | `layerNoop` | `Layer<TestRunner>` | |
329
+
330
+ ## Checkpoints
331
+
332
+ Pinned trees, and the scratch checkouts a call runs against.
333
+
334
+ | Export | Type | Meaning |
335
+ | ------------------ | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
336
+ | `Checkpoints` | interface and `Context.Service` tag | `{ capture, materialize }`. |
337
+ | `Snapshot` | `Schema.Class` | `{ id, ref }`, identified as `@smthrs/std/Checkpoints/Snapshot`. |
338
+ | `Materialized` | interface | `id`, `host`, `guest`, `root`, `guestRoot`. |
339
+ | `baseId` | `"base"` | The id naming the tree the run opened on. |
340
+ | `scratchDirectory` | `".flows-checkpoints"` | Where a checkpoint is materialized, relative to the root. |
341
+ | `configSection` | `"flows-checkpoint"` | The git-config section minted checkpoints are recorded under. |
342
+ | `make` | `(service: Checkpoints) => Checkpoints` | |
343
+ | `unavailable` | `(id: string) => StdError` | The refusal a host that pins nothing answers with. |
344
+ | `makeNoop` | `() => Checkpoints` | Fails both calls with `unavailable`. |
345
+ | `layerNoop` | `Layer<Checkpoints>` | |
346
+ | `GitOptions` | interface | `root`, `cwd?`, `baseRef?`. |
347
+ | `makeGit` | `(options: GitOptions) => Effect<Checkpoints, never, ChildProcessSpawner>` | |
348
+ | `layerGit` | `(options: GitOptions) => Layer<Checkpoints, never, ChildProcessSpawner>` | |
349
+ | `ContainerOptions` | interface | `container`, `cwd?`. |
350
+ | `makeContainer` | `(options: ContainerOptions) => Effect<Checkpoints, never, ChildProcessSpawner \| Container>` | Runs git inside the container `bash` runs in. |
351
+ | `layerContainer` | `(options: ContainerOptions) => Layer<Checkpoints, never, ChildProcessSpawner \| Container>` | |
352
+ | `Relocation` | tagged union | `Relocated`, `UnsupportedFlow`, `AbsolutePath`, `OutsideTree`. |
353
+ | `relocate` | `(flow: string, input: Json, materialized: Materialized) => Relocation` | Rewrites one call's input onto a checkpoint. |
354
+
355
+ `capture(id)` returns a `Snapshot`. `materialize(id, use)` is scoped: it hands
356
+ the tree to `use` and removes the checkout however that effect ends. Host git
357
+ never runs with the workspace's `.git` as its `GIT_DIR`: it records and checks
358
+ out through a temporary shadow repository that shares only the workspace's
359
+ objects, with host config files switched off. A hook, `core.fsmonitor` command,
360
+ filter driver or `info/attributes` entry written into the workspace's `.git`
361
+ therefore does not run on the host. The workspace is still read for refs, its
362
+ index, its config file (as a file) and a few `core.*` hashing settings. A
363
+ checkout gets its own standalone `.git`, so a container can run git in it.
364
+
365
+ A materialize never has host git write into an agent-writable directory. It
366
+ writes the checkout and its `.git` into a staging directory the agent cannot
367
+ reach, inside the temporary shadow or, when the host's temporary directory is
368
+ another filesystem, a `.smithers-checkout-<uuid>` directory beside the
369
+ workspace root, or `checkout-<uuid>` under `$XDG_CACHE_HOME/smithers` (default
370
+ `~/.cache/smithers`) when the root's parent is not writable. One `rename` then
371
+ gives the finished directory its name under the workspace. A checkout name the
372
+ agent swaps for a symlink fails the call before anything is written through
373
+ it. The rename runs from inside the checkout's parent, entered by its physical
374
+ path, and a parent that resolves outside the workspace root's real path fails
375
+ the call before the rename. When no staging directory shares the checkout's
376
+ filesystem, the materialize is refused rather than copied, and the refusal
377
+ names each candidate, including a root parent that is not writable.
378
+
379
+ Two data-write residuals remain, neither of which runs a program. First, host
380
+ writes into agent-writable `.git` paths (new objects, the checkpoint's config
381
+ entry) follow a symlink the agent races into place. Second, the repository is
382
+ whatever `git rev-parse --git-common-dir` names: a `.git` gitfile
383
+ (`gitdir: <path>`) or an `objects/info/alternates` entry can point it at
384
+ another git directory on the host. Captures then write objects and the config
385
+ entry into that directory, a checkpoint id edited in `.git/config` can name a
386
+ commit from it, and read-tree resolves object ids across the alternate store,
387
+ so a materialize can write another host repository's files into the checkout.
388
+ Both residuals apply whenever the agent can write the workspace, including its
389
+ `.git` through a container bind mount; creating `.git` in the harness does not
390
+ help, because the agent can rewrite it afterwards. The only mitigation is a
391
+ `.git` and checkout path the agent cannot write, such as a read-only mount of
392
+ `.git`, or running captures and checkouts against a git directory the harness
393
+ keeps outside the mount.
394
+
395
+ ## Relocate
396
+
397
+ What can be pointed at a checkpoint, and what cannot.
398
+
399
+ | Export | Type | Meaning |
400
+ | ------------ | ----------------------------------------------------------------------- | -------------------------------------------------------------- |
401
+ | `Relocation` | tagged union | `Relocated`, `UnsupportedFlow`, `AbsolutePath`, `OutsideTree`. |
402
+ | `relocate` | `(flow: string, input: Json, materialized: Materialized) => Relocation` | Rewrites one call's input onto a checkpoint. |
403
+
404
+ `relocate` knows the field each supported flow names a location in: `cwd` for
405
+ `bash`, `path` for `read` and `ls`, `root` for `grep` and `glob`. Every other
406
+ flow answers `UnsupportedFlow`. Both names are re-exported from `Checkpoints`,
407
+ which is how the harness reaches them.
408
+
409
+ ## LanguageServer
410
+
411
+ The code-intelligence seam.
412
+
413
+ | Export | Type | Meaning |
414
+ | ---------------- | --------------------------------------------- | ------------------------------------------------------------------- |
415
+ | `Position` | interface | `path`, `line`, `character`, in the protocol's 0-based coordinates. |
416
+ | `LanguageServer` | interface and `Context.Service` tag | Ten queries, `sync`, `close`, and `refresh`. |
417
+ | `make` | `(service: LanguageServer) => LanguageServer` | |
418
+ | `makeNoop` | `() => LanguageServer` | Answers `unsupported` for every request. |
419
+ | `layerNoop` | `Layer<LanguageServer>` | |
420
+
421
+ The queries are `hover`, `definition`, `references`, `implementation`,
422
+ `documentSymbols`, `workspaceSymbols`, `prepareCallHierarchy`,
423
+ `callHierarchyIncoming`, `callHierarchyOutgoing`, and `diagnostics`, each
424
+ returning `Effect<unknown, StdError>`. `sync(path, text)` sends a file's new
425
+ text, `close(path)` says it is gone, and `refresh` re-reads every synced file
426
+ from disk, resending changed ones and closing deleted ones.
427
+
428
+ ## NodeLanguageServer
429
+
430
+ A host LSP client over the permission-checked process spawner, speaking framed
431
+ JSON-RPC on ordinary stdio pipes.
432
+
433
+ | Export | Type | Meaning |
434
+ | ---------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
435
+ | `Config` | interface | `command`, `args?`, `cwd`, `extensions?`, `environment?`, `initializationOptions?`, `timeoutMs?`, `settleMs?`, `quietMs?`. |
436
+ | `MAX_QUEUED_FRAMES` | `256` | Frames buffered for the server's standard input. |
437
+ | `MAX_PENDING_REQUESTS` | `512` | Concurrent in-flight requests. |
438
+ | `make` | `(config: Config) => Effect<LanguageServer, StdError, ChildProcessSpawner \| Scope>` | |
439
+ | `makeLazy` | `(config: Config) => Effect<LanguageServer, StdError, ChildProcessSpawner \| Scope>` | Starts each server on the first request for one of its files. |
440
+ | `layer` | `(config: Config) => Layer<LanguageServer, StdError, ChildProcessSpawner>` | |
441
+ | `layerLazy` | `(config: Config) => Layer<LanguageServer, StdError, ChildProcessSpawner>` | Provides `makeLazy`. |
442
+
443
+ `make` sends `initialize` with `cwd` as the root URI and then `initialized`, so
444
+ the service is ready when it resolves. `timeoutMs` defaults to 30,000 and bounds
445
+ every request and every write. A frame body may be 8 MiB and its headers 8 KiB.
446
+ The child receives the host environment allowlist plus `Config.environment`.
447
+ `initializationOptions` is sent on `initialize` unchanged.
448
+
449
+ The server runs on the host as the host user. `make` fails with
450
+ `permission_denied`, before spawning, when the program it would execute lies
451
+ under `cwd`: a relative or absolute command there, a bare name found through a
452
+ `PATH` entry there, or a workspace symlink to a host binary. An argument, or
453
+ the value after `=` in one, that names an existing file or directory under
454
+ `cwd` is refused the same way; `node <dir>` runs that directory's `index.js` or
455
+ package `main`. A launcher is refused outright, because its arguments are code or
456
+ package names the file check cannot see: a shell (`sh -c`, `bash`, `zsh`),
457
+ `env`, a package runner (`npx`, `pnpm`, `npm`, `yarn`, `bunx`, `bun x`,
458
+ `deno`), or `node` and `bun` given inline code or a preload (`-e`, `--eval`,
459
+ `-p`, `-r`, `--require`, `--import`, `--loader`). Name the server's own host
460
+ binary, or an interpreter and a host script file. What the server loads after it starts is not checked: by default
461
+ typescript-language-server runs the workspace's `node_modules/typescript`,
462
+ tsserver with `--allowLocalPluginLoads` loads `tsconfig` plugins from the
463
+ project, and rust-analyzer runs build scripts and proc macros. Pin those to
464
+ host copies through `initializationOptions` or the server's own flags (for
465
+ typescript-language-server, `{ tsserver: { path: "<host>/tsserver.js" } }`),
466
+ or run the server in a sandbox.
467
+ Request failures include `method`. JSON-RPC refusals retain `rpcError` with the
468
+ server's numeric `code`, `message`, and optional `data`, bounded by the 8 MiB
469
+ frame limit. Failures attach the latest stderr tail when present, capturing at
470
+ most 64 KiB. On stdout closure or process exit, draining stderr gets a bounded
471
+ 100 ms grace before pending requests fail.
472
+
473
+ ## ExaWebSearch
474
+
475
+ A `WebSearch` provider backed by the Exa API.
476
+
477
+ | Export | Type |
478
+ | ------- | --------------------------------------------------------------------------------------- |
479
+ | `layer` | `(credentialId: string) => Layer<WebSearch.WebSearch, never, Credential \| HttpClient>` |
480
+
481
+ The key is read from the named credential through
482
+ [`@smthrs/control`](/api/control) rather than from the environment. See
483
+ [Reach the network](./guides/reach-the-network.md#search-the-web) for the status
484
+ mapping.
485
+
486
+ ## Runtime notes
487
+
488
+ The root entry point is Node-only: it re-exports `NodeLanguageServer`, which
489
+ imports `node:url`. The four browser-safe subpaths are `@smthrs/std/Grep`,
490
+ `@smthrs/std/Glob`, `@smthrs/std/Search`, and `@smthrs/std/PortableSearch`.
491
+ Nothing any of the four imports reaches a Node built-in.
492
+
493
+ The model behind this surface has its own pages:
494
+
495
+ - [Limits are disclosed, never silent](./concepts/limits-and-disclosure.md) for
496
+ every cap and how it is reported.
497
+ - [Effects and capabilities](./concepts/effects-and-capabilities.md) for the
498
+ declared envelopes, the narrowing, and why hermetic mode is a pre-check rather
499
+ than a sandbox.