@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.
- package/CHANGELOG.md +148 -0
- package/LICENSE +21 -0
- package/README.md +156 -2
- package/dist/cjs/ApplyPatch.d.ts +174 -0
- package/dist/cjs/ApplyPatch.d.ts.map +1 -0
- package/dist/cjs/ApplyPatch.js +309 -0
- package/dist/cjs/ApplyPatch.js.map +7 -0
- package/dist/cjs/Bash.d.ts +390 -0
- package/dist/cjs/Bash.d.ts.map +1 -0
- package/dist/cjs/Bash.js +333 -0
- package/dist/cjs/Bash.js.map +7 -0
- package/dist/cjs/Checkpoints.d.ts +322 -0
- package/dist/cjs/Checkpoints.d.ts.map +1 -0
- package/dist/cjs/Checkpoints.js +233 -0
- package/dist/cjs/Checkpoints.js.map +7 -0
- package/dist/cjs/Container.d.ts +132 -0
- package/dist/cjs/Container.d.ts.map +1 -0
- package/dist/cjs/Container.js +113 -0
- package/dist/cjs/Container.js.map +7 -0
- package/dist/cjs/Edit.d.ts +203 -0
- package/dist/cjs/Edit.d.ts.map +1 -0
- package/dist/cjs/Edit.js +258 -0
- package/dist/cjs/Edit.js.map +7 -0
- package/dist/cjs/ExaWebSearch.d.ts +22 -0
- package/dist/cjs/ExaWebSearch.d.ts.map +1 -0
- package/dist/cjs/ExaWebSearch.js +138 -0
- package/dist/cjs/ExaWebSearch.js.map +7 -0
- package/dist/cjs/Explore.d.ts +328 -0
- package/dist/cjs/Explore.d.ts.map +1 -0
- package/dist/cjs/Explore.js +90 -0
- package/dist/cjs/Explore.js.map +7 -0
- package/dist/cjs/Fetch.d.ts +130 -0
- package/dist/cjs/Fetch.d.ts.map +1 -0
- package/dist/cjs/Fetch.js +64 -0
- package/dist/cjs/Fetch.js.map +7 -0
- package/dist/cjs/Glob.d.ts +204 -0
- package/dist/cjs/Glob.d.ts.map +1 -0
- package/dist/cjs/Glob.js +94 -0
- package/dist/cjs/Glob.js.map +7 -0
- package/dist/cjs/Grep.d.ts +347 -0
- package/dist/cjs/Grep.d.ts.map +1 -0
- package/dist/cjs/Grep.js +181 -0
- package/dist/cjs/Grep.js.map +7 -0
- package/dist/cjs/HttpPost.d.ts +130 -0
- package/dist/cjs/HttpPost.d.ts.map +1 -0
- package/dist/cjs/HttpPost.js +72 -0
- package/dist/cjs/HttpPost.js.map +7 -0
- package/dist/cjs/LanguageServer.d.ts +90 -0
- package/dist/cjs/LanguageServer.d.ts.map +1 -0
- package/dist/cjs/LanguageServer.js +60 -0
- package/dist/cjs/LanguageServer.js.map +7 -0
- package/dist/cjs/Ls.d.ts +164 -0
- package/dist/cjs/Ls.d.ts.map +1 -0
- package/dist/cjs/Ls.js +136 -0
- package/dist/cjs/Ls.js.map +7 -0
- package/dist/cjs/Lsp.d.ts +125 -0
- package/dist/cjs/Lsp.d.ts.map +1 -0
- package/dist/cjs/Lsp.js +137 -0
- package/dist/cjs/Lsp.js.map +7 -0
- package/dist/cjs/Manifest.d.ts +918 -0
- package/dist/cjs/Manifest.d.ts.map +1 -0
- package/dist/cjs/Manifest.js +144 -0
- package/dist/cjs/Manifest.js.map +7 -0
- package/dist/cjs/NativeSearch.d.ts +38 -0
- package/dist/cjs/NativeSearch.d.ts.map +1 -0
- package/dist/cjs/NativeSearch.js +326 -0
- package/dist/cjs/NativeSearch.js.map +7 -0
- package/dist/cjs/NodeLanguageServer.d.ts +128 -0
- package/dist/cjs/NodeLanguageServer.d.ts.map +1 -0
- package/dist/cjs/NodeLanguageServer.js +796 -0
- package/dist/cjs/NodeLanguageServer.js.map +7 -0
- package/dist/cjs/PortableSearch.d.ts +36 -0
- package/dist/cjs/PortableSearch.d.ts.map +1 -0
- package/dist/cjs/PortableSearch.js +240 -0
- package/dist/cjs/PortableSearch.js.map +7 -0
- package/dist/cjs/Probe.d.ts +193 -0
- package/dist/cjs/Probe.d.ts.map +1 -0
- package/dist/cjs/Probe.js +134 -0
- package/dist/cjs/Probe.js.map +7 -0
- package/dist/cjs/Read.d.ts +189 -0
- package/dist/cjs/Read.d.ts.map +1 -0
- package/dist/cjs/Read.js +223 -0
- package/dist/cjs/Read.js.map +7 -0
- package/dist/cjs/Relocate.d.ts +73 -0
- package/dist/cjs/Relocate.d.ts.map +1 -0
- package/dist/cjs/Relocate.js +72 -0
- package/dist/cjs/Relocate.js.map +7 -0
- package/dist/cjs/RemoteSearch.d.ts +54 -0
- package/dist/cjs/RemoteSearch.d.ts.map +1 -0
- package/dist/cjs/RemoteSearch.js +134 -0
- package/dist/cjs/RemoteSearch.js.map +7 -0
- package/dist/cjs/Search.d.ts +163 -0
- package/dist/cjs/Search.d.ts.map +1 -0
- package/dist/cjs/Search.js +51 -0
- package/dist/cjs/Search.js.map +7 -0
- package/dist/cjs/SearchConformance.d.ts +115 -0
- package/dist/cjs/SearchConformance.d.ts.map +1 -0
- package/dist/cjs/SearchConformance.js +172 -0
- package/dist/cjs/SearchConformance.js.map +7 -0
- package/dist/cjs/SearchContract.d.ts +114 -0
- package/dist/cjs/SearchContract.d.ts.map +1 -0
- package/dist/cjs/SearchContract.js +339 -0
- package/dist/cjs/SearchContract.js.map +7 -0
- package/dist/cjs/ShellCommand.d.ts +164 -0
- package/dist/cjs/ShellCommand.d.ts.map +1 -0
- package/dist/cjs/ShellCommand.js +102 -0
- package/dist/cjs/ShellCommand.js.map +7 -0
- package/dist/cjs/StdError.d.ts +55 -0
- package/dist/cjs/StdError.d.ts.map +1 -0
- package/dist/cjs/StdError.js +74 -0
- package/dist/cjs/StdError.js.map +7 -0
- package/dist/cjs/TestRun.d.ts +311 -0
- package/dist/cjs/TestRun.d.ts.map +1 -0
- package/dist/cjs/TestRun.js +228 -0
- package/dist/cjs/TestRun.js.map +7 -0
- package/dist/cjs/TestRunner.d.ts +102 -0
- package/dist/cjs/TestRunner.d.ts.map +1 -0
- package/dist/cjs/TestRunner.js +54 -0
- package/dist/cjs/TestRunner.js.map +7 -0
- package/dist/cjs/TreeFingerprint.d.ts +140 -0
- package/dist/cjs/TreeFingerprint.d.ts.map +1 -0
- package/dist/cjs/TreeFingerprint.js +87 -0
- package/dist/cjs/TreeFingerprint.js.map +7 -0
- package/dist/cjs/UpdatePlan.d.ts +152 -0
- package/dist/cjs/UpdatePlan.d.ts.map +1 -0
- package/dist/cjs/UpdatePlan.js +87 -0
- package/dist/cjs/UpdatePlan.js.map +7 -0
- package/dist/cjs/WebFetch.d.ts +134 -0
- package/dist/cjs/WebFetch.d.ts.map +1 -0
- package/dist/cjs/WebFetch.js +140 -0
- package/dist/cjs/WebFetch.js.map +7 -0
- package/dist/cjs/WebSearch.d.ts +181 -0
- package/dist/cjs/WebSearch.d.ts.map +1 -0
- package/dist/cjs/WebSearch.js +86 -0
- package/dist/cjs/WebSearch.js.map +7 -0
- package/dist/cjs/Write.d.ts +147 -0
- package/dist/cjs/Write.d.ts.map +1 -0
- package/dist/cjs/Write.js +122 -0
- package/dist/cjs/Write.js.map +7 -0
- package/dist/cjs/index.d.ts +129 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +101 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/ApplyPatch.d.ts +145 -0
- package/dist/cjs/internal/ApplyPatch.d.ts.map +1 -0
- package/dist/cjs/internal/ApplyPatch.js +462 -0
- package/dist/cjs/internal/ApplyPatch.js.map +7 -0
- package/dist/cjs/internal/CodexText.d.ts +73 -0
- package/dist/cjs/internal/CodexText.d.ts.map +1 -0
- package/dist/cjs/internal/CodexText.js +108 -0
- package/dist/cjs/internal/CodexText.js.map +7 -0
- package/dist/cjs/internal/Declaration.d.ts +49 -0
- package/dist/cjs/internal/Declaration.d.ts.map +1 -0
- package/dist/cjs/internal/Declaration.js +46 -0
- package/dist/cjs/internal/Declaration.js.map +7 -0
- package/dist/cjs/internal/Diagnostics.d.ts +77 -0
- package/dist/cjs/internal/Diagnostics.d.ts.map +1 -0
- package/dist/cjs/internal/Diagnostics.js +89 -0
- package/dist/cjs/internal/Diagnostics.js.map +7 -0
- package/dist/cjs/internal/EnvelopePrecheck.d.ts +69 -0
- package/dist/cjs/internal/EnvelopePrecheck.d.ts.map +1 -0
- package/dist/cjs/internal/EnvelopePrecheck.js +323 -0
- package/dist/cjs/internal/EnvelopePrecheck.js.map +7 -0
- package/dist/cjs/internal/Exec.d.ts +151 -0
- package/dist/cjs/internal/Exec.d.ts.map +1 -0
- package/dist/cjs/internal/Exec.js +207 -0
- package/dist/cjs/internal/Exec.js.map +7 -0
- package/dist/cjs/internal/FileMutation.d.ts +109 -0
- package/dist/cjs/internal/FileMutation.d.ts.map +1 -0
- package/dist/cjs/internal/FileMutation.js +116 -0
- package/dist/cjs/internal/FileMutation.js.map +7 -0
- package/dist/cjs/internal/FsFailure.d.ts +38 -0
- package/dist/cjs/internal/FsFailure.d.ts.map +1 -0
- package/dist/cjs/internal/FsFailure.js +40 -0
- package/dist/cjs/internal/FsFailure.js.map +7 -0
- package/dist/cjs/internal/GitWorktree.d.ts +108 -0
- package/dist/cjs/internal/GitWorktree.d.ts.map +1 -0
- package/dist/cjs/internal/GitWorktree.js +276 -0
- package/dist/cjs/internal/GitWorktree.js.map +7 -0
- package/dist/cjs/internal/Grouping.d.ts +51 -0
- package/dist/cjs/internal/Grouping.d.ts.map +1 -0
- package/dist/cjs/internal/Grouping.js +83 -0
- package/dist/cjs/internal/Grouping.js.map +7 -0
- package/dist/cjs/internal/Html.d.ts +20 -0
- package/dist/cjs/internal/Html.d.ts.map +1 -0
- package/dist/cjs/internal/Html.js +81 -0
- package/dist/cjs/internal/Html.js.map +7 -0
- package/dist/cjs/internal/Http.d.ts +95 -0
- package/dist/cjs/internal/Http.d.ts.map +1 -0
- package/dist/cjs/internal/Http.js +153 -0
- package/dist/cjs/internal/Http.js.map +7 -0
- package/dist/cjs/internal/HttpNetwork.d.ts +27 -0
- package/dist/cjs/internal/HttpNetwork.d.ts.map +1 -0
- package/dist/cjs/internal/HttpNetwork.js +146 -0
- package/dist/cjs/internal/HttpNetwork.js.map +7 -0
- package/dist/cjs/internal/Ignore.d.ts +37 -0
- package/dist/cjs/internal/Ignore.d.ts.map +1 -0
- package/dist/cjs/internal/Ignore.js +100 -0
- package/dist/cjs/internal/Ignore.js.map +7 -0
- package/dist/cjs/internal/LinearRegex.d.ts +19 -0
- package/dist/cjs/internal/LinearRegex.d.ts.map +1 -0
- package/dist/cjs/internal/LinearRegex.js +166 -0
- package/dist/cjs/internal/LinearRegex.js.map +7 -0
- package/dist/cjs/internal/Match.d.ts +85 -0
- package/dist/cjs/internal/Match.d.ts.map +1 -0
- package/dist/cjs/internal/Match.js +99 -0
- package/dist/cjs/internal/Match.js.map +7 -0
- package/dist/cjs/internal/Paths.d.ts +23 -0
- package/dist/cjs/internal/Paths.d.ts.map +1 -0
- package/dist/cjs/internal/Paths.js +52 -0
- package/dist/cjs/internal/Paths.js.map +7 -0
- package/dist/cjs/internal/Preserve.d.ts +25 -0
- package/dist/cjs/internal/Preserve.d.ts.map +1 -0
- package/dist/cjs/internal/Preserve.js +88 -0
- package/dist/cjs/internal/Preserve.js.map +7 -0
- package/dist/cjs/internal/Prune.d.ts +35 -0
- package/dist/cjs/internal/Prune.d.ts.map +1 -0
- package/dist/cjs/internal/Prune.js +54 -0
- package/dist/cjs/internal/Prune.js.map +7 -0
- package/dist/cjs/internal/RemoteTree.d.ts +60 -0
- package/dist/cjs/internal/RemoteTree.d.ts.map +1 -0
- package/dist/cjs/internal/RemoteTree.js +123 -0
- package/dist/cjs/internal/RemoteTree.js.map +7 -0
- package/dist/cjs/internal/SearchContract.d.ts +63 -0
- package/dist/cjs/internal/SearchContract.d.ts.map +1 -0
- package/dist/cjs/internal/SearchContract.js +46 -0
- package/dist/cjs/internal/SearchContract.js.map +7 -0
- package/dist/cjs/internal/Symbols.d.ts +39 -0
- package/dist/cjs/internal/Symbols.d.ts.map +1 -0
- package/dist/cjs/internal/Symbols.js +59 -0
- package/dist/cjs/internal/Symbols.js.map +7 -0
- package/dist/cjs/internal/Tar.d.ts +23 -0
- package/dist/cjs/internal/Tar.d.ts.map +1 -0
- package/dist/cjs/internal/Tar.js +86 -0
- package/dist/cjs/internal/Tar.js.map +7 -0
- package/dist/cjs/internal/TestReport.d.ts +52 -0
- package/dist/cjs/internal/TestReport.d.ts.map +1 -0
- package/dist/cjs/internal/TestReport.js +131 -0
- package/dist/cjs/internal/TestReport.js.map +7 -0
- package/dist/cjs/internal/Text.d.ts +125 -0
- package/dist/cjs/internal/Text.d.ts.map +1 -0
- package/dist/cjs/internal/Text.js +85 -0
- package/dist/cjs/internal/Text.js.map +7 -0
- package/dist/cjs/internal/Url.d.ts +13 -0
- package/dist/cjs/internal/Url.d.ts.map +1 -0
- package/dist/cjs/internal/Url.js +35 -0
- package/dist/cjs/internal/Url.js.map +7 -0
- package/dist/cjs/internal/Walk.d.ts +72 -0
- package/dist/cjs/internal/Walk.d.ts.map +1 -0
- package/dist/cjs/internal/Walk.js +108 -0
- package/dist/cjs/internal/Walk.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/ApplyPatch.d.ts +174 -0
- package/dist/esm/ApplyPatch.d.ts.map +1 -0
- package/dist/esm/ApplyPatch.js +346 -0
- package/dist/esm/ApplyPatch.js.map +1 -0
- package/dist/esm/Bash.d.ts +390 -0
- package/dist/esm/Bash.d.ts.map +1 -0
- package/dist/esm/Bash.js +514 -0
- package/dist/esm/Bash.js.map +1 -0
- package/dist/esm/Checkpoints.d.ts +322 -0
- package/dist/esm/Checkpoints.d.ts.map +1 -0
- package/dist/esm/Checkpoints.js +396 -0
- package/dist/esm/Checkpoints.js.map +1 -0
- package/dist/esm/Container.d.ts +132 -0
- package/dist/esm/Container.d.ts.map +1 -0
- package/dist/esm/Container.js +151 -0
- package/dist/esm/Container.js.map +1 -0
- package/dist/esm/Edit.d.ts +203 -0
- package/dist/esm/Edit.d.ts.map +1 -0
- package/dist/esm/Edit.js +296 -0
- package/dist/esm/Edit.js.map +1 -0
- package/dist/esm/ExaWebSearch.d.ts +22 -0
- package/dist/esm/ExaWebSearch.d.ts.map +1 -0
- package/dist/esm/ExaWebSearch.js +107 -0
- package/dist/esm/ExaWebSearch.js.map +1 -0
- package/dist/esm/Explore.d.ts +328 -0
- package/dist/esm/Explore.d.ts.map +1 -0
- package/dist/esm/Explore.js +106 -0
- package/dist/esm/Explore.js.map +1 -0
- package/dist/esm/Fetch.d.ts +130 -0
- package/dist/esm/Fetch.d.ts.map +1 -0
- package/dist/esm/Fetch.js +91 -0
- package/dist/esm/Fetch.js.map +1 -0
- package/dist/esm/Glob.d.ts +204 -0
- package/dist/esm/Glob.d.ts.map +1 -0
- package/dist/esm/Glob.js +177 -0
- package/dist/esm/Glob.js.map +1 -0
- package/dist/esm/Grep.d.ts +347 -0
- package/dist/esm/Grep.d.ts.map +1 -0
- package/dist/esm/Grep.js +289 -0
- package/dist/esm/Grep.js.map +1 -0
- package/dist/esm/HttpPost.d.ts +130 -0
- package/dist/esm/HttpPost.d.ts.map +1 -0
- package/dist/esm/HttpPost.js +89 -0
- package/dist/esm/HttpPost.js.map +1 -0
- package/dist/esm/LanguageServer.d.ts +90 -0
- package/dist/esm/LanguageServer.d.ts.map +1 -0
- package/dist/esm/LanguageServer.js +57 -0
- package/dist/esm/LanguageServer.js.map +1 -0
- package/dist/esm/Ls.d.ts +164 -0
- package/dist/esm/Ls.d.ts.map +1 -0
- package/dist/esm/Ls.js +178 -0
- package/dist/esm/Ls.js.map +1 -0
- package/dist/esm/Lsp.d.ts +125 -0
- package/dist/esm/Lsp.d.ts.map +1 -0
- package/dist/esm/Lsp.js +165 -0
- package/dist/esm/Lsp.js.map +1 -0
- package/dist/esm/Manifest.d.ts +918 -0
- package/dist/esm/Manifest.d.ts.map +1 -0
- package/dist/esm/Manifest.js +153 -0
- package/dist/esm/Manifest.js.map +1 -0
- package/dist/esm/NativeSearch.d.ts +38 -0
- package/dist/esm/NativeSearch.d.ts.map +1 -0
- package/dist/esm/NativeSearch.js +378 -0
- package/dist/esm/NativeSearch.js.map +1 -0
- package/dist/esm/NodeLanguageServer.d.ts +128 -0
- package/dist/esm/NodeLanguageServer.d.ts.map +1 -0
- package/dist/esm/NodeLanguageServer.js +843 -0
- package/dist/esm/NodeLanguageServer.js.map +1 -0
- package/dist/esm/PortableSearch.d.ts +36 -0
- package/dist/esm/PortableSearch.d.ts.map +1 -0
- package/dist/esm/PortableSearch.js +256 -0
- package/dist/esm/PortableSearch.js.map +1 -0
- package/dist/esm/Probe.d.ts +193 -0
- package/dist/esm/Probe.d.ts.map +1 -0
- package/dist/esm/Probe.js +225 -0
- package/dist/esm/Probe.js.map +1 -0
- package/dist/esm/Read.d.ts +189 -0
- package/dist/esm/Read.d.ts.map +1 -0
- package/dist/esm/Read.js +300 -0
- package/dist/esm/Read.js.map +1 -0
- package/dist/esm/Relocate.d.ts +73 -0
- package/dist/esm/Relocate.d.ts.map +1 -0
- package/dist/esm/Relocate.js +153 -0
- package/dist/esm/Relocate.js.map +1 -0
- package/dist/esm/RemoteSearch.d.ts +54 -0
- package/dist/esm/RemoteSearch.d.ts.map +1 -0
- package/dist/esm/RemoteSearch.js +162 -0
- package/dist/esm/RemoteSearch.js.map +1 -0
- package/dist/esm/Search.d.ts +163 -0
- package/dist/esm/Search.d.ts.map +1 -0
- package/dist/esm/Search.js +47 -0
- package/dist/esm/Search.js.map +1 -0
- package/dist/esm/SearchConformance.d.ts +115 -0
- package/dist/esm/SearchConformance.d.ts.map +1 -0
- package/dist/esm/SearchConformance.js +193 -0
- package/dist/esm/SearchConformance.js.map +1 -0
- package/dist/esm/SearchContract.d.ts +114 -0
- package/dist/esm/SearchContract.d.ts.map +1 -0
- package/dist/esm/SearchContract.js +461 -0
- package/dist/esm/SearchContract.js.map +1 -0
- package/dist/esm/ShellCommand.d.ts +164 -0
- package/dist/esm/ShellCommand.d.ts.map +1 -0
- package/dist/esm/ShellCommand.js +159 -0
- package/dist/esm/ShellCommand.js.map +1 -0
- package/dist/esm/StdError.d.ts +55 -0
- package/dist/esm/StdError.d.ts.map +1 -0
- package/dist/esm/StdError.js +71 -0
- package/dist/esm/StdError.js.map +1 -0
- package/dist/esm/TestRun.d.ts +311 -0
- package/dist/esm/TestRun.d.ts.map +1 -0
- package/dist/esm/TestRun.js +316 -0
- package/dist/esm/TestRun.js.map +1 -0
- package/dist/esm/TestRunner.d.ts +102 -0
- package/dist/esm/TestRunner.d.ts.map +1 -0
- package/dist/esm/TestRunner.js +68 -0
- package/dist/esm/TestRunner.js.map +1 -0
- package/dist/esm/TreeFingerprint.d.ts +140 -0
- package/dist/esm/TreeFingerprint.d.ts.map +1 -0
- package/dist/esm/TreeFingerprint.js +170 -0
- package/dist/esm/TreeFingerprint.js.map +1 -0
- package/dist/esm/UpdatePlan.d.ts +152 -0
- package/dist/esm/UpdatePlan.d.ts.map +1 -0
- package/dist/esm/UpdatePlan.js +129 -0
- package/dist/esm/UpdatePlan.js.map +1 -0
- package/dist/esm/WebFetch.d.ts +134 -0
- package/dist/esm/WebFetch.d.ts.map +1 -0
- package/dist/esm/WebFetch.js +151 -0
- package/dist/esm/WebFetch.js.map +1 -0
- package/dist/esm/WebSearch.d.ts +181 -0
- package/dist/esm/WebSearch.d.ts.map +1 -0
- package/dist/esm/WebSearch.js +134 -0
- package/dist/esm/WebSearch.js.map +1 -0
- package/dist/esm/Write.d.ts +147 -0
- package/dist/esm/Write.d.ts.map +1 -0
- package/dist/esm/Write.js +144 -0
- package/dist/esm/Write.js.map +1 -0
- package/dist/esm/index.d.ts +129 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +129 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/ApplyPatch.d.ts +145 -0
- package/dist/esm/internal/ApplyPatch.d.ts.map +1 -0
- package/dist/esm/internal/ApplyPatch.js +489 -0
- package/dist/esm/internal/ApplyPatch.js.map +1 -0
- package/dist/esm/internal/CodexText.d.ts +73 -0
- package/dist/esm/internal/CodexText.d.ts.map +1 -0
- package/dist/esm/internal/CodexText.js +156 -0
- package/dist/esm/internal/CodexText.js.map +1 -0
- package/dist/esm/internal/Declaration.d.ts +49 -0
- package/dist/esm/internal/Declaration.d.ts.map +1 -0
- package/dist/esm/internal/Declaration.js +42 -0
- package/dist/esm/internal/Declaration.js.map +1 -0
- package/dist/esm/internal/Diagnostics.d.ts +77 -0
- package/dist/esm/internal/Diagnostics.d.ts.map +1 -0
- package/dist/esm/internal/Diagnostics.js +99 -0
- package/dist/esm/internal/Diagnostics.js.map +1 -0
- package/dist/esm/internal/EnvelopePrecheck.d.ts +69 -0
- package/dist/esm/internal/EnvelopePrecheck.d.ts.map +1 -0
- package/dist/esm/internal/EnvelopePrecheck.js +426 -0
- package/dist/esm/internal/EnvelopePrecheck.js.map +1 -0
- package/dist/esm/internal/Exec.d.ts +151 -0
- package/dist/esm/internal/Exec.d.ts.map +1 -0
- package/dist/esm/internal/Exec.js +285 -0
- package/dist/esm/internal/Exec.js.map +1 -0
- package/dist/esm/internal/FileMutation.d.ts +109 -0
- package/dist/esm/internal/FileMutation.d.ts.map +1 -0
- package/dist/esm/internal/FileMutation.js +123 -0
- package/dist/esm/internal/FileMutation.js.map +1 -0
- package/dist/esm/internal/FsFailure.d.ts +38 -0
- package/dist/esm/internal/FsFailure.d.ts.map +1 -0
- package/dist/esm/internal/FsFailure.js +39 -0
- package/dist/esm/internal/FsFailure.js.map +1 -0
- package/dist/esm/internal/GitWorktree.d.ts +108 -0
- package/dist/esm/internal/GitWorktree.d.ts.map +1 -0
- package/dist/esm/internal/GitWorktree.js +352 -0
- package/dist/esm/internal/GitWorktree.js.map +1 -0
- package/dist/esm/internal/Grouping.d.ts +51 -0
- package/dist/esm/internal/Grouping.d.ts.map +1 -0
- package/dist/esm/internal/Grouping.js +99 -0
- package/dist/esm/internal/Grouping.js.map +1 -0
- package/dist/esm/internal/Html.d.ts +20 -0
- package/dist/esm/internal/Html.d.ts.map +1 -0
- package/dist/esm/internal/Html.js +70 -0
- package/dist/esm/internal/Html.js.map +1 -0
- package/dist/esm/internal/Http.d.ts +95 -0
- package/dist/esm/internal/Http.d.ts.map +1 -0
- package/dist/esm/internal/Http.js +154 -0
- package/dist/esm/internal/Http.js.map +1 -0
- package/dist/esm/internal/HttpNetwork.d.ts +27 -0
- package/dist/esm/internal/HttpNetwork.d.ts.map +1 -0
- package/dist/esm/internal/HttpNetwork.js +114 -0
- package/dist/esm/internal/HttpNetwork.js.map +1 -0
- package/dist/esm/internal/Ignore.d.ts +37 -0
- package/dist/esm/internal/Ignore.d.ts.map +1 -0
- package/dist/esm/internal/Ignore.js +128 -0
- package/dist/esm/internal/Ignore.js.map +1 -0
- package/dist/esm/internal/LinearRegex.d.ts +19 -0
- package/dist/esm/internal/LinearRegex.d.ts.map +1 -0
- package/dist/esm/internal/LinearRegex.js +176 -0
- package/dist/esm/internal/LinearRegex.js.map +1 -0
- package/dist/esm/internal/Match.d.ts +85 -0
- package/dist/esm/internal/Match.d.ts.map +1 -0
- package/dist/esm/internal/Match.js +142 -0
- package/dist/esm/internal/Match.js.map +1 -0
- package/dist/esm/internal/Paths.d.ts +23 -0
- package/dist/esm/internal/Paths.d.ts.map +1 -0
- package/dist/esm/internal/Paths.js +40 -0
- package/dist/esm/internal/Paths.js.map +1 -0
- package/dist/esm/internal/Preserve.d.ts +25 -0
- package/dist/esm/internal/Preserve.d.ts.map +1 -0
- package/dist/esm/internal/Preserve.js +70 -0
- package/dist/esm/internal/Preserve.js.map +1 -0
- package/dist/esm/internal/Prune.d.ts +35 -0
- package/dist/esm/internal/Prune.d.ts.map +1 -0
- package/dist/esm/internal/Prune.js +60 -0
- package/dist/esm/internal/Prune.js.map +1 -0
- package/dist/esm/internal/RemoteTree.d.ts +60 -0
- package/dist/esm/internal/RemoteTree.d.ts.map +1 -0
- package/dist/esm/internal/RemoteTree.js +132 -0
- package/dist/esm/internal/RemoteTree.js.map +1 -0
- package/dist/esm/internal/SearchContract.d.ts +63 -0
- package/dist/esm/internal/SearchContract.d.ts.map +1 -0
- package/dist/esm/internal/SearchContract.js +66 -0
- package/dist/esm/internal/SearchContract.js.map +1 -0
- package/dist/esm/internal/Symbols.d.ts +39 -0
- package/dist/esm/internal/Symbols.d.ts.map +1 -0
- package/dist/esm/internal/Symbols.js +79 -0
- package/dist/esm/internal/Symbols.js.map +1 -0
- package/dist/esm/internal/Tar.d.ts +23 -0
- package/dist/esm/internal/Tar.d.ts.map +1 -0
- package/dist/esm/internal/Tar.js +97 -0
- package/dist/esm/internal/Tar.js.map +1 -0
- package/dist/esm/internal/TestReport.d.ts +52 -0
- package/dist/esm/internal/TestReport.d.ts.map +1 -0
- package/dist/esm/internal/TestReport.js +172 -0
- package/dist/esm/internal/TestReport.js.map +1 -0
- package/dist/esm/internal/Text.d.ts +125 -0
- package/dist/esm/internal/Text.d.ts.map +1 -0
- package/dist/esm/internal/Text.js +141 -0
- package/dist/esm/internal/Text.js.map +1 -0
- package/dist/esm/internal/Url.d.ts +13 -0
- package/dist/esm/internal/Url.d.ts.map +1 -0
- package/dist/esm/internal/Url.js +27 -0
- package/dist/esm/internal/Url.js.map +1 -0
- package/dist/esm/internal/Walk.d.ts +72 -0
- package/dist/esm/internal/Walk.d.ts.map +1 -0
- package/dist/esm/internal/Walk.js +126 -0
- package/dist/esm/internal/Walk.js.map +1 -0
- package/docs/README.md +119 -0
- package/docs/api.md +499 -0
- package/docs/concepts/effects-and-capabilities.md +138 -0
- package/docs/concepts/flows-and-handlers.md +115 -0
- package/docs/concepts/limits-and-disclosure.md +105 -0
- package/docs/concepts/search-contract.md +182 -0
- package/docs/guides/bind-the-standard-flows.md +116 -0
- package/docs/guides/implement-a-search-peer.md +133 -0
- package/docs/guides/pin-a-checkpoint.md +161 -0
- package/docs/guides/query-a-language-server.md +257 -0
- package/docs/guides/reach-the-network.md +141 -0
- package/docs/guides/read-and-edit-a-file.md +240 -0
- package/docs/guides/run-a-shell-command.md +236 -0
- package/docs/guides/run-the-test-suite.md +154 -0
- package/docs/guides/search-a-workspace.md +148 -0
- package/docs/installation.md +115 -0
- package/docs/quickstart.md +125 -0
- package/docs/reference/flows.md +556 -0
- package/docs/troubleshooting.md +347 -0
- package/package.json +449 -3
- package/src/ApplyPatch.ts +458 -0
- package/src/Bash.ts +619 -0
- package/src/Checkpoints.ts +589 -0
- package/src/Container.ts +212 -0
- package/src/Edit.ts +366 -0
- package/src/ExaWebSearch.ts +145 -0
- package/src/Explore.ts +139 -0
- package/src/Fetch.ts +117 -0
- package/src/Glob.ts +200 -0
- package/src/Grep.ts +320 -0
- package/src/HttpPost.ts +120 -0
- package/src/LanguageServer.ts +110 -0
- package/src/Ls.ts +228 -0
- package/src/Lsp.ts +184 -0
- package/src/Manifest.ts +162 -0
- package/src/NativeSearch.ts +457 -0
- package/src/NodeLanguageServer.ts +1148 -0
- package/src/PortableSearch.ts +284 -0
- package/src/Probe.ts +284 -0
- package/src/Read.ts +359 -0
- package/src/Relocate.ts +166 -0
- package/src/RemoteSearch.ts +199 -0
- package/src/Search.ts +185 -0
- package/src/SearchConformance.ts +288 -0
- package/src/SearchContract.ts +489 -0
- package/src/ShellCommand.ts +201 -0
- package/src/StdError.ts +80 -0
- package/src/TestRun.ts +401 -0
- package/src/TestRunner.ts +119 -0
- package/src/TreeFingerprint.ts +200 -0
- package/src/UpdatePlan.ts +171 -0
- package/src/WebFetch.ts +194 -0
- package/src/WebSearch.ts +165 -0
- package/src/Write.ts +195 -0
- package/src/index.ts +157 -0
- package/src/internal/ApplyPatch.ts +601 -0
- package/src/internal/CodexText.ts +182 -0
- package/src/internal/Declaration.ts +60 -0
- package/src/internal/Diagnostics.ts +134 -0
- package/src/internal/EnvelopePrecheck.ts +489 -0
- package/src/internal/Exec.ts +427 -0
- package/src/internal/FileMutation.ts +231 -0
- package/src/internal/FsFailure.ts +51 -0
- package/src/internal/GitWorktree.ts +491 -0
- package/src/internal/Grouping.ts +106 -0
- package/src/internal/Html.ts +87 -0
- package/src/internal/Http.ts +209 -0
- package/src/internal/HttpNetwork.ts +153 -0
- package/src/internal/Ignore.ts +135 -0
- package/src/internal/LinearRegex.ts +173 -0
- package/src/internal/Match.ts +172 -0
- package/src/internal/Paths.ts +42 -0
- package/src/internal/Preserve.ts +108 -0
- package/src/internal/Prune.ts +62 -0
- package/src/internal/RemoteTree.ts +159 -0
- package/src/internal/SearchContract.ts +77 -0
- package/src/internal/Symbols.ts +88 -0
- package/src/internal/Tar.ts +95 -0
- package/src/internal/TestReport.ts +194 -0
- package/src/internal/Text.ts +185 -0
- package/src/internal/Url.ts +23 -0
- package/src/internal/Walk.ts +176 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Run the test suite and attribute a failure"
|
|
3
|
+
description: "Declare how the project under test runs its suite, select what to run, and use against:'base' to separate the failures your edit introduced from the ones that were already there."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 5
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `test` flow answers three questions a shell command cannot: what the suite
|
|
9
|
+
reported, which of the failures are yours, and whether the run failed about the
|
|
10
|
+
code at all.
|
|
11
|
+
|
|
12
|
+
## Declare the runner once
|
|
13
|
+
|
|
14
|
+
A caller of `test` selects **which** tests, never **how** to run them. The
|
|
15
|
+
invocation is a host declaration, bound through the `TestRunner` service:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import * as TestRunner from "@smthrs/std/TestRunner"
|
|
19
|
+
|
|
20
|
+
const runner = TestRunner.layer({
|
|
21
|
+
command: "python -m pytest -q",
|
|
22
|
+
cwd: "/testbed",
|
|
23
|
+
root: "/workspace/repo",
|
|
24
|
+
container: "testbed",
|
|
25
|
+
env: { PYTHONDONTWRITEBYTECODE: "1" },
|
|
26
|
+
timeoutMs: 900_000
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Field | Meaning |
|
|
31
|
+
| ----------- | -------------------------------------------------------------------- |
|
|
32
|
+
| `command` | The runner command line, with no test selection in it. |
|
|
33
|
+
| `cwd` | Where the runner runs. The container's path when `container` is set. |
|
|
34
|
+
| `root` | The host path of the git repository, when it differs from `cwd`. |
|
|
35
|
+
| `container` | A container to route the run through, via the `Container` transport. |
|
|
36
|
+
| `env` | Environment the runner needs. |
|
|
37
|
+
| `baseRef` | The ref whose commit is the pristine base. |
|
|
38
|
+
| `timeoutMs` | Default wall-clock budget for one run. |
|
|
39
|
+
|
|
40
|
+
`cwd` and `root` differ exactly when the runner runs in a container: the
|
|
41
|
+
container sees the repository at `cwd`, the host sees it at `root`, and a
|
|
42
|
+
baseline checkout created at `<root>/.flows-test-base/run-<lease>` is visible to the runner
|
|
43
|
+
at `<cwd>/.flows-test-base/run-<lease>`, because it is one directory under two names.
|
|
44
|
+
|
|
45
|
+
A host with no runner binds `TestRunner.layerNoop`. The flow then fails with
|
|
46
|
+
`provider_unavailable` and tells the caller to use `bash` with the command the
|
|
47
|
+
project's own documentation gives.
|
|
48
|
+
|
|
49
|
+
## Run a selection
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import * as TestRun from "@smthrs/std/TestRun"
|
|
53
|
+
|
|
54
|
+
const result = TestRun.run({
|
|
55
|
+
selection: ["tests/test_admin.py::AdminViewBasicTest::test_change_list"]
|
|
56
|
+
})
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Selection entries reach the runner as arguments, never as text spliced into the
|
|
60
|
+
command line. The invocation is `bash -lc '<command> "$@"' <command> id...`, so a
|
|
61
|
+
test id holding `::`, `[`, `]`, spaces, or shell metacharacters stays data.
|
|
62
|
+
Omitting `selection` runs everything.
|
|
63
|
+
|
|
64
|
+
The result is a reading, not a log:
|
|
65
|
+
|
|
66
|
+
| Field | Meaning |
|
|
67
|
+
| ----------------------------------- | -------------------------------------------------------------------------- |
|
|
68
|
+
| `command` | The logical invocation, without container transport arguments. |
|
|
69
|
+
| `exitCode` | The runner's exit code. |
|
|
70
|
+
| `passed` | Tests reported passing. Zero when `parsed` is false. |
|
|
71
|
+
| `failed` | Ids of the tests reported failing or erroring. |
|
|
72
|
+
| `parsed` | Whether the runner's complete report could be read. |
|
|
73
|
+
| `tail` | The end of the runner's combined output. |
|
|
74
|
+
| `tailTruncated`, `tailDroppedBytes` | Whether `tail` is a fragment, and by how much. |
|
|
75
|
+
| `invalidProbe` | Present when the exit code describes the command, not the code under test. |
|
|
76
|
+
|
|
77
|
+
When `parsed` is false, `tail` is all there is, and base attribution is omitted
|
|
78
|
+
rather than guessed at.
|
|
79
|
+
|
|
80
|
+
Unittest skips and expected failures, and TAP skips and TODO failures, do not
|
|
81
|
+
count as passing or failing tests. A successful TAP TODO counts as passing.
|
|
82
|
+
Unittest unexpected successes count as failures; attribution requires their
|
|
83
|
+
reported ids. Python 3.10 class-only headers and Python 3.11+ full test ids are
|
|
84
|
+
both supported. Missing failure ids or unknown unittest summary fields leave
|
|
85
|
+
`parsed` false.
|
|
86
|
+
|
|
87
|
+
## Who the failure belongs to
|
|
88
|
+
|
|
89
|
+
A non-zero exit is a runner's verdict about the code it ran, not about the
|
|
90
|
+
command it was handed. A run that names a test, a file, a module, an
|
|
91
|
+
environment, or a program that does not exist never reaches any code and still
|
|
92
|
+
exits non-zero, so it reads the same before and after a correct fix.
|
|
93
|
+
`invalidProbe` is present when this run was one of those, with a `reason` from
|
|
94
|
+
that closed list and a `message` saying what the result does and does not
|
|
95
|
+
prove.
|
|
96
|
+
|
|
97
|
+
Jev makes that attribution. The flow asks the `probe/attribution` classifier
|
|
98
|
+
through the `Evaluator` service of [`@smthrs/model`](/api/model), so a host
|
|
99
|
+
binds an evaluator on a subscription seat. Only a zero exit is attributed without a judge. Exit codes 126 and 127
|
|
100
|
+
also go through attribution: a runner can return them after executing tests.
|
|
101
|
+
A judge that cannot
|
|
102
|
+
be reached, refuses, times out, or answers something unusable fails the call
|
|
103
|
+
with `provider_unavailable`, `timeout`, or `request_failed`, because a guess at
|
|
104
|
+
whether a reproduction reproduced is worth less than no answer at all.
|
|
105
|
+
|
|
106
|
+
## Attribute a failure to your own edit
|
|
107
|
+
|
|
108
|
+
The native CLI supports workspace tests. Baseline comparison refuses before any
|
|
109
|
+
command starts; isolated staging is tracked in
|
|
110
|
+
[#3234](https://github.com/smithersai/smithers/issues/3234). A host declares this
|
|
111
|
+
with `baseline: false`.
|
|
112
|
+
|
|
113
|
+
`against: "base"` runs the same selection a second time against the pristine
|
|
114
|
+
base commit, in a scratch checkout, and differences the two failure sets:
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
const result = TestRun.run({
|
|
118
|
+
selection: ["tests/test_admin.py"],
|
|
119
|
+
against: "base"
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
result.introduced // failing here and not on the base tree: yours
|
|
123
|
+
result.preexisting // failing on both: not yours, and not worth investigating
|
|
124
|
+
result.fixed // failing on the base tree and passing here
|
|
125
|
+
result.base // the base run's own outcome, plus its ref and commit
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
That is the whole of attribution, in one call. Without it, the same question
|
|
129
|
+
costs a revert of the very work it was meant to prove.
|
|
130
|
+
|
|
131
|
+
The baseline commit is resolved from the runner's `baseRef`, then from
|
|
132
|
+
`TestRunner.captureBase` (`refs/flows/capture-base`), then from `HEAD`. A
|
|
133
|
+
`baseRef` that does not resolve is an error rather than a fallback, because a
|
|
134
|
+
baseline against the wrong tree answers the attribution question wrong.
|
|
135
|
+
|
|
136
|
+
The baseline is a detached checkout at `<root>/.flows-test-base/run-<lease>`, under
|
|
137
|
+
`TestRun.scratchDirectory`. Each call gets a unique lease. Existing checkouts
|
|
138
|
+
are left alone; a `SIGKILL` can leave one behind. Inside the repository is the only place that works:
|
|
139
|
+
a runner reaching the repository through a container mount sees a scratch
|
|
140
|
+
checkout anywhere else on the host as a path that does not exist. It is removed
|
|
141
|
+
when the call ends, however it ends. It is written from a temporary shadow
|
|
142
|
+
`GIT_DIR`, like a checkpoint, so no hook or filter driver in the workspace's
|
|
143
|
+
`.git` runs on the host and the repository's format is never changed.
|
|
144
|
+
|
|
145
|
+
`against: "base"` needs a repository directory. A runner declaring neither `root`
|
|
146
|
+
nor `cwd` fails with `invalid_input`.
|
|
147
|
+
|
|
148
|
+
## Bound the run
|
|
149
|
+
|
|
150
|
+
`timeoutMs` on the call overrides the runner's own, which overrides
|
|
151
|
+
`TestRun.DEFAULT_TIMEOUT_MS` (ten minutes). The run holds at most
|
|
152
|
+
`TestRun.MAX_CAPTURE_BYTES` of output in memory, and `tail` carries the last
|
|
153
|
+
30,000 bytes of it, so `tail` holds the part of a long run that says what
|
|
154
|
+
failed. A timeout is a `timeout` failure, not a result.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Search a workspace"
|
|
3
|
+
description: "Find files with glob and search their contents with grep: roots, ordered include and exclude patterns, context lines, per-file caps, and the notices that keep an empty answer from lying."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Both flows go through the `Search` service, so bind either
|
|
9
|
+
[`PortableSearch.layer` or `NativeSearch.layer`](./bind-the-standard-flows.md)
|
|
10
|
+
first. The semantics are identical; see
|
|
11
|
+
[The search contract](../concepts/search-contract.md) for why.
|
|
12
|
+
|
|
13
|
+
## Choose the search root
|
|
14
|
+
|
|
15
|
+
`root` defaults to `.`, resolved by the host filesystem. A guarded agent host
|
|
16
|
+
resolves it inside its workspace. Pass a root to search another directory:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import * as Glob from "@smthrs/std/Glob"
|
|
20
|
+
|
|
21
|
+
const files = Glob.run({ pattern: "**/*.ts", root: "/workspace" })
|
|
22
|
+
// files.paths, files.total, files.truncated, files.notice
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Every pattern is matched against a candidate's path **relative to that root**.
|
|
26
|
+
An absolute pattern such as `/workspace/tests/**` is read as the root-relative
|
|
27
|
+
path `workspace/tests/**`, which nothing under `/workspace` can match. When that
|
|
28
|
+
happens, `notice` says so rather than returning a silent empty result.
|
|
29
|
+
|
|
30
|
+
Three rules follow from root-relative matching:
|
|
31
|
+
|
|
32
|
+
- No `/` in the pattern matches the basename at any depth: `*.ts` finds every
|
|
33
|
+
TypeScript file in the subtree.
|
|
34
|
+
- A `/` in the pattern anchors it at the root: `src/*.ts` matches
|
|
35
|
+
`<root>/src/a.ts` and not `<root>/lib/src/a.ts`.
|
|
36
|
+
- A leading `/` or `./` is the same anchor spelled out.
|
|
37
|
+
|
|
38
|
+
`glob` returns at most 1,000 paths per call, and `limit` lowers that. Pass
|
|
39
|
+
`hidden: true` to include dot files.
|
|
40
|
+
|
|
41
|
+
Both flows apply `.gitignore` rules from the search root and nested directories,
|
|
42
|
+
even outside Git repositories. `noIgnore` is an optional boolean defaulting to
|
|
43
|
+
`false`; set `noIgnore: true` to include ignored paths. Rules above the root and
|
|
44
|
+
global ignore files do not apply. Hidden-file and fixed directory skips still
|
|
45
|
+
apply when `noIgnore` is true.
|
|
46
|
+
|
|
47
|
+
## Search contents
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import * as Grep from "@smthrs/std/Grep"
|
|
51
|
+
|
|
52
|
+
const found = Grep.run({
|
|
53
|
+
pattern: "def widen",
|
|
54
|
+
root: "/workspace",
|
|
55
|
+
globs: ["**/*.py", "!**/test_*.py"],
|
|
56
|
+
context: 2,
|
|
57
|
+
maxCount: 3,
|
|
58
|
+
limit: 50
|
|
59
|
+
})
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
| Input | What it does |
|
|
63
|
+
| ------------------------------------------ | ------------------------------------------------------------------------- |
|
|
64
|
+
| `pattern` | A Smithers Ripgrep ASCII v1 expression, or a literal with `fixedStrings`. |
|
|
65
|
+
| `globs` | Ordered include and exclude patterns, `!` for exclusion. |
|
|
66
|
+
| `ignoreCase`, `smartCase` | Case handling. The two are mutually exclusive. |
|
|
67
|
+
| `beforeContext`, `afterContext`, `context` | Context lines. `context` cannot be combined with the other two. |
|
|
68
|
+
| `maxCount` | At most this many matches per file. At least 1. |
|
|
69
|
+
| `filesWithMatches` | Report file names only. |
|
|
70
|
+
| `hidden` | Include dot files. |
|
|
71
|
+
| `noIgnore` | Include paths excluded by `.gitignore` when true. Defaults to false. |
|
|
72
|
+
| `symbols` | Report the definition enclosing each hit. True by default. |
|
|
73
|
+
| `limit` | Global match budget, capped at 200. |
|
|
74
|
+
|
|
75
|
+
The output is match-centric:
|
|
76
|
+
|
|
77
|
+
| Output | Meaning |
|
|
78
|
+
| --------------------- | ------------------------------------------------------------------------- |
|
|
79
|
+
| `matches` | Each hit with its own `before` and `after` context and optional `symbol`. |
|
|
80
|
+
| `files` | The file list, which is what `filesWithMatches` fills. |
|
|
81
|
+
| `filesSearched` | Every file the globs admitted, including binaries and unopenable files. |
|
|
82
|
+
| `skippedBinary` | How many of those held a NUL byte. |
|
|
83
|
+
| `truncated`, `notice` | Whether the budget bit, and what was shown out of what there was. |
|
|
84
|
+
| `retriedAsLiteral` | Present when these results came from re-running the pattern literally. |
|
|
85
|
+
|
|
86
|
+
`limit` counts matches, not rows, so context can never crowd out the hit it
|
|
87
|
+
belongs to.
|
|
88
|
+
|
|
89
|
+
## Read the definition a hit sits in
|
|
90
|
+
|
|
91
|
+
Each hit carries the definition enclosing it, when the file's shape says so
|
|
92
|
+
plainly. That is a read window, so the follow-up read is exact rather than a
|
|
93
|
+
guess at `line - 10`:
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import * as Read from "@smthrs/std/Read"
|
|
97
|
+
|
|
98
|
+
const hit = found.matches[0]
|
|
99
|
+
if (hit?.symbol !== undefined) {
|
|
100
|
+
const page = Read.run({
|
|
101
|
+
path: hit.file,
|
|
102
|
+
offset: hit.symbol.startLine,
|
|
103
|
+
limit: hit.symbol.endLine - hit.symbol.startLine + 1
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Set `symbols: false` to skip the annotation. When the shape is not plain, the
|
|
109
|
+
heuristic answers nothing rather than guessing a window.
|
|
110
|
+
|
|
111
|
+
## When a regular expression finds nothing
|
|
112
|
+
|
|
113
|
+
A pattern full of metacharacters that finds nothing is the most common way a
|
|
114
|
+
search lies. If a pattern containing metacharacters produces no matches and no
|
|
115
|
+
files, the search runs again with `fixedStrings: true`, and if the literal
|
|
116
|
+
reading finds something the result carries `retriedAsLiteral: true` and says so
|
|
117
|
+
in `notice`. The retry costs one more pass only in the case that already found
|
|
118
|
+
nothing.
|
|
119
|
+
|
|
120
|
+
To search a literal on purpose, pass `fixedStrings: true` yourself and skip the
|
|
121
|
+
regular expression grammar entirely.
|
|
122
|
+
|
|
123
|
+
## What is refused
|
|
124
|
+
|
|
125
|
+
These are `invalid_input` rather than a best guess, because two peer
|
|
126
|
+
implementations must not each pick their own reading:
|
|
127
|
+
|
|
128
|
+
- `ignoreCase` and `smartCase` both true.
|
|
129
|
+
- `context` together with `beforeContext` or `afterContext`.
|
|
130
|
+
- `maxCount` below 1.
|
|
131
|
+
|
|
132
|
+
File-type registries are unsupported; there is no `types` input field.
|
|
133
|
+
|
|
134
|
+
An unsupported pattern is `invalid_pattern`, with a message naming the
|
|
135
|
+
construct. A `root` that does not exist is `not_found`.
|
|
136
|
+
|
|
137
|
+
## What a walk never enters
|
|
138
|
+
|
|
139
|
+
Twelve directory names are skipped during descent, including `.git`,
|
|
140
|
+
`node_modules`, `__pycache__`, and `.venv`. Skipping applies to descent only, so
|
|
141
|
+
naming one of them as the `root` searches it. An entry the process cannot read
|
|
142
|
+
is skipped and the walk continues.
|
|
143
|
+
|
|
144
|
+
The portable peer streams file contents when the host supports it. A guarded
|
|
145
|
+
host may provide atomic file reads but refuse streaming handles. If a stream
|
|
146
|
+
fails before delivering any bytes, search tries that same filesystem's atomic
|
|
147
|
+
read. A stream that fails after delivering bytes is discarded without a second
|
|
148
|
+
read, so two versions of a changing file cannot be combined into one result.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Installation"
|
|
3
|
+
description: "Install @smthrs/std, its runtime requirements and import forms, the browser-safe subpaths, and the packages a host adds to make the handlers runnable."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Install the package
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @smthrs/std@next effect
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The `next` tag carries the 1.0 release candidates.
|
|
15
|
+
|
|
16
|
+
It requires
|
|
17
|
+
Node.js 26.4.0 or later and ships as both ESM and CommonJS with TypeScript
|
|
18
|
+
declarations. Its runtime dependencies install with it:
|
|
19
|
+
[`effect`](https://effect.website), plus [`@smthrs/core`](/api/core) for the
|
|
20
|
+
flow declaration type, [`@smthrs/kernel`](/api/kernel) for the permission-aware
|
|
21
|
+
host services, [`@smthrs/capability`](/api/capability) for the capability
|
|
22
|
+
vocabulary, and [`@smthrs/control`](/api/control) for the credential seam
|
|
23
|
+
`ExaWebSearch` reads its API key through.
|
|
24
|
+
|
|
25
|
+
## Import forms
|
|
26
|
+
|
|
27
|
+
The root entry point re-exports every module as a namespace:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { Grep, Manifest, Read, StdError } from "@smthrs/std"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Each module is also importable from its own subpath, which is the form this
|
|
34
|
+
documentation uses and the form that keeps a bundle to what it needs:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import * as Read from "@smthrs/std/Read"
|
|
38
|
+
import * as StdError from "@smthrs/std/StdError"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Two subpath forms are not public: `@smthrs/std/internal/*` and
|
|
42
|
+
`@smthrs/std/<Module>/index`. Both are blocked in the export map and carry no
|
|
43
|
+
promise. `@smthrs/std/package.json` is exported.
|
|
44
|
+
|
|
45
|
+
## The browser-safe subset
|
|
46
|
+
|
|
47
|
+
The root entry point is Node-only. It re-exports `NodeLanguageServer`, which
|
|
48
|
+
imports `node:url`, so importing `@smthrs/std` in a browser bundle pulls a Node
|
|
49
|
+
built-in in with it.
|
|
50
|
+
|
|
51
|
+
Four subpaths are browser-safe, because nothing they import reaches a Node
|
|
52
|
+
built-in:
|
|
53
|
+
|
|
54
|
+
- `@smthrs/std/Grep`
|
|
55
|
+
- `@smthrs/std/Glob`
|
|
56
|
+
- `@smthrs/std/Search`
|
|
57
|
+
- `@smthrs/std/PortableSearch`
|
|
58
|
+
|
|
59
|
+
`PortableSearch` performs its walk through the injected `FileSystem` service, so
|
|
60
|
+
a browser host that provides one gets working `grep` and `glob` with no external
|
|
61
|
+
binary.
|
|
62
|
+
|
|
63
|
+
## What a runnable host adds
|
|
64
|
+
|
|
65
|
+
The declarations run nowhere on their own. Handlers ask for host services
|
|
66
|
+
through Effect's context, so a composition adds a platform package that provides
|
|
67
|
+
them:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm add @effect/platform-node @effect/platform-node-shared
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`NodeServices.layer` from `@effect/platform-node` provides `FileSystem`, `Path`,
|
|
74
|
+
and `ChildProcessSpawner`, which is everything the filesystem, search, and shell
|
|
75
|
+
handlers require. A host that wants the permission kernel's capability checks in
|
|
76
|
+
front of those services builds them through
|
|
77
|
+
[`@smthrs/kernel`](/api/kernel)'s `HostServices` instead, which is what the
|
|
78
|
+
Smithers CLI does.
|
|
79
|
+
|
|
80
|
+
| Handler | Services it requires |
|
|
81
|
+
| ------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
82
|
+
| `Read.run`, `Edit.run` | `FileSystem` |
|
|
83
|
+
| `Write.run`, `Ls.run`, `ApplyPatch.run` | `FileSystem`, `Path` |
|
|
84
|
+
| `Grep.run`, `Glob.run` | `Search` |
|
|
85
|
+
| `Bash.run` | `ChildProcessSpawner`, `Path`, and `Container` when a call names one |
|
|
86
|
+
| `TestRun.run` | `ChildProcessSpawner`, `TestRunner`, and `Container` when the runner names one |
|
|
87
|
+
| `ShellCommand.run` | `ChildProcessSpawner` |
|
|
88
|
+
| `Fetch.run`, `HttpPost.run`, `WebFetch.run` | `HttpClient`, `GrantStore` |
|
|
89
|
+
| `WebSearch.run` | `WebSearch` |
|
|
90
|
+
| `Lsp.run` | `LanguageServer` |
|
|
91
|
+
| `UpdatePlan.run` | none |
|
|
92
|
+
|
|
93
|
+
## The six injected services
|
|
94
|
+
|
|
95
|
+
Six flows reach the host through a service rather than through a platform layer.
|
|
96
|
+
Each one has a refusal layer for a host that cannot serve it, so a flow whose
|
|
97
|
+
service is missing says so instead of succeeding quietly.
|
|
98
|
+
|
|
99
|
+
| Service | Refusal layer | Working layer |
|
|
100
|
+
| ---------------- | -------------------------- | ------------------------------------------------------------------------------- |
|
|
101
|
+
| `Search` | `Search.layerNoop` | `PortableSearch.layer` or `NativeSearch.layer` |
|
|
102
|
+
| `Container` | `Container.layerNoop` | `Container.layerCommand({ program: "docker" })` |
|
|
103
|
+
| `TestRunner` | `TestRunner.layerNoop` | `TestRunner.layer(runner)` |
|
|
104
|
+
| `Checkpoints` | `Checkpoints.layerNoop` | `Checkpoints.layerGit({ root })` or `Checkpoints.layerContainer({ container })` |
|
|
105
|
+
| `WebSearch` | `WebSearch.layerNoop` | `ExaWebSearch.layer(credentialId)` |
|
|
106
|
+
| `LanguageServer` | `LanguageServer.layerNoop` | `NodeLanguageServer.layer(config)` |
|
|
107
|
+
|
|
108
|
+
`NativeSearch.layer` drives the `rg` executable, so a host that binds it needs
|
|
109
|
+
ripgrep on the path. `PortableSearch.layer` needs nothing beyond `FileSystem`
|
|
110
|
+
and `Path`. `ExaWebSearch.layer` additionally requires
|
|
111
|
+
[`@smthrs/control`](/api/control)'s `Credential` service and
|
|
112
|
+
[`@smthrs/kernel`](/api/kernel)'s `HttpClient`.
|
|
113
|
+
|
|
114
|
+
Composing these is one job, covered in
|
|
115
|
+
[Bind the standard flows into a host](./guides/bind-the-standard-flows.md).
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Quickstart"
|
|
3
|
+
description: "Search a real directory with grep, then read the exact definition the hit sits in, using the in-process search peer and no external binary."
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
This quickstart runs two standard flows end to end against a real directory.
|
|
9
|
+
`grep` finds a line and reports the definition that encloses it; `read` turns
|
|
10
|
+
that definition's line range into a page. By the end you will have taken the two
|
|
11
|
+
steps an agent takes hundreds of times a run, and you will have taken them
|
|
12
|
+
without an external binary and without an API key.
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
- Node.js 26.4.0 or later.
|
|
17
|
+
- A project with the packages installed: `npm install @smthrs/std@next @effect/platform-node effect`.
|
|
18
|
+
|
|
19
|
+
## Make a tree to search
|
|
20
|
+
|
|
21
|
+
Two files, so the glob filter has something to exclude:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mkdir -p /tmp/std-quickstart/src
|
|
25
|
+
printf 'export function widen(value: number): number {\n return value * 2\n}\n' > /tmp/std-quickstart/src/widen.ts
|
|
26
|
+
printf 'widen is defined in src/widen.ts\n' > /tmp/std-quickstart/README.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Compose the host
|
|
30
|
+
|
|
31
|
+
`Grep.run` asks for the `Search` service; `Read.run` asks for `FileSystem`.
|
|
32
|
+
`PortableSearch` is the in-process implementation of `Search`, so the whole
|
|
33
|
+
composition is two layers:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { NodeServices } from "@effect/platform-node"
|
|
37
|
+
import * as PortableSearch from "@smthrs/std/PortableSearch"
|
|
38
|
+
import * as Layer from "effect/Layer"
|
|
39
|
+
|
|
40
|
+
/** FileSystem, Path, and ChildProcessSpawner, from the Node platform. */
|
|
41
|
+
const platform = NodeServices.layer
|
|
42
|
+
|
|
43
|
+
/** The in-process Search peer, built over that platform. */
|
|
44
|
+
const search = PortableSearch.layer.pipe(Layer.provide(platform))
|
|
45
|
+
|
|
46
|
+
const host = Layer.merge(platform, search)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Swapping `PortableSearch.layer` for `NativeSearch.layer` runs the same calls
|
|
50
|
+
through the `rg` executable instead. Nothing else in this file changes, which is
|
|
51
|
+
the point of the seam. See [The search contract](./concepts/search-contract.md).
|
|
52
|
+
|
|
53
|
+
## Search, then read what you found
|
|
54
|
+
|
|
55
|
+
Each returned hit carries the definition it sits inside, when the file's shape
|
|
56
|
+
says so plainly. That is a line range, so it is a read window rather than a
|
|
57
|
+
guess:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import * as Grep from "@smthrs/std/Grep"
|
|
61
|
+
import * as Read from "@smthrs/std/Read"
|
|
62
|
+
import * as Effect from "effect/Effect"
|
|
63
|
+
|
|
64
|
+
const program = Effect.gen(function*() {
|
|
65
|
+
const found = yield* Grep.run({
|
|
66
|
+
pattern: "widen",
|
|
67
|
+
root: "/tmp/std-quickstart",
|
|
68
|
+
globs: ["*.ts"]
|
|
69
|
+
})
|
|
70
|
+
const hit = found.matches[0]
|
|
71
|
+
if (hit === undefined) return "no match"
|
|
72
|
+
console.log(`${hit.file}:${hit.line} ${hit.text}`)
|
|
73
|
+
console.log(`searched ${found.filesSearched} file(s)`)
|
|
74
|
+
|
|
75
|
+
const symbol = hit.symbol
|
|
76
|
+
if (symbol === undefined) return "no enclosing definition"
|
|
77
|
+
const page = yield* Read.run({
|
|
78
|
+
path: hit.file,
|
|
79
|
+
offset: symbol.startLine,
|
|
80
|
+
limit: symbol.endLine - symbol.startLine + 1
|
|
81
|
+
})
|
|
82
|
+
return `${symbol.kind} ${symbol.name}\n${page.content}`
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
console.log(await Effect.runPromise(Effect.provide(program, host)))
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Run the file with your TypeScript runner. The output is the hit, the file count,
|
|
89
|
+
and the whole definition:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
/tmp/std-quickstart/src/widen.ts:1 export function widen(value: number): number {
|
|
93
|
+
searched 1 file(s)
|
|
94
|
+
function widen
|
|
95
|
+
export function widen(value: number): number {
|
|
96
|
+
return value * 2
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`filesSearched` is 1 because `globs: ["*.ts"]` excluded `README.md`. A glob
|
|
101
|
+
without a `/` matches a basename at any depth, so `*.ts` reaches
|
|
102
|
+
`src/widen.ts` without naming the directory.
|
|
103
|
+
|
|
104
|
+
## What just happened
|
|
105
|
+
|
|
106
|
+
- `page.content` is raw file text. The line numbers came back as the sibling
|
|
107
|
+
fields `startLine`, `endLine`, and `totalLines`, never as a gutter inside the
|
|
108
|
+
text, so any line of `content` can be pasted straight into `edit` as an
|
|
109
|
+
anchor.
|
|
110
|
+
- `hit.symbol` is a heuristic that reports only what a file's shape says
|
|
111
|
+
plainly. When it cannot read a definition, it answers `undefined` rather than
|
|
112
|
+
guessing a window.
|
|
113
|
+
- Neither call took a limit from you, and both applied one: `grep` returns at
|
|
114
|
+
most 200 matches and `read` at most 2,000 lines. Whenever a limit bites, the
|
|
115
|
+
result says so in `truncated` and `notice`. See
|
|
116
|
+
[Limits are disclosed, never silent](./concepts/limits-and-disclosure.md).
|
|
117
|
+
|
|
118
|
+
## Next steps
|
|
119
|
+
|
|
120
|
+
- [Search a workspace](./guides/search-a-workspace.md) for globs, context lines,
|
|
121
|
+
case rules, and the literal retry.
|
|
122
|
+
- [Read and edit a file](./guides/read-and-edit-a-file.md) for the two anchor
|
|
123
|
+
forms `edit` accepts and what a miss reports.
|
|
124
|
+
- [Bind the standard flows into a host](./guides/bind-the-standard-flows.md) to
|
|
125
|
+
offer all 17 flows to an agent instead of calling two by hand.
|