@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,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `glob` projection of Smithers Ripgrep Subset v1.
|
|
3
|
+
*
|
|
4
|
+
* It has the same two peer implementations as `grep` and supports the
|
|
5
|
+
* `rg --files -g` pattern subset: `*`, `**`, `?`, and brace alternatives;
|
|
6
|
+
* results are path sorted; hidden files are opt-in; root and nested .gitignore
|
|
7
|
+
* files apply by default (even outside git repositories). `noIgnore: true` opts
|
|
8
|
+
* out. Parent/global ignore files, .git/info/exclude, .ignore and .rgignore
|
|
9
|
+
* are not read. Caller globs filter the remaining files without overriding
|
|
10
|
+
* ignores. An explicitly named ignored or skipped directory is still searched.
|
|
11
|
+
*
|
|
12
|
+
* **Patterns are relative to `root`, never to the filesystem.** A candidate is
|
|
13
|
+
* matched by the path it has *relative to the search root*, so `tests/**\/*.py`
|
|
14
|
+
* — what every caller writing a project-relative pattern means — matches
|
|
15
|
+
* `<root>/tests/admin_views/admin.py`. Three rules follow, and both peers
|
|
16
|
+
* implement all three identically:
|
|
17
|
+
*
|
|
18
|
+
* - A pattern with no `/` matches the **basename** at any depth: `*.py` finds
|
|
19
|
+
* every Python file in the subtree.
|
|
20
|
+
* - A pattern containing `/` is matched against the root-relative path and is
|
|
21
|
+
* anchored at the root: `tests/*.py` matches `<root>/tests/a.py` and not
|
|
22
|
+
* `<root>/src/tests/a.py`.
|
|
23
|
+
* - A leading `/` is the same anchor spelled explicitly, not a filesystem
|
|
24
|
+
* absolute path: `/a.py` matches only `<root>/a.py`, where bare `a.py` would
|
|
25
|
+
* match any `a.py` in the subtree. A leading `./` means the same anchor.
|
|
26
|
+
*
|
|
27
|
+
* `**` crosses directory boundaries, `*` and `?` stay inside one segment, and
|
|
28
|
+
* `?` consumes one UTF-8 byte. Trailing spaces are not part of a pattern:
|
|
29
|
+
* `rg` reads `-g` by gitignore's rules and drops them, so `"a.ts "` finds
|
|
30
|
+
* `a.ts`, and a pattern left blank by that is rejected rather than read as no
|
|
31
|
+
* filter at all.
|
|
32
|
+
*
|
|
33
|
+
* A `root` that names one file is that file. It is reported whatever the
|
|
34
|
+
* pattern says, because `rg` searches a path given on its command line without
|
|
35
|
+
* consulting `-g`, and a walk that reaches one file has nothing to filter.
|
|
36
|
+
*
|
|
37
|
+
* A walk skips what it cannot read — a dangling symlink, a link cycle, a
|
|
38
|
+
* directory the process may not list — and reports everything it did reach.
|
|
39
|
+
* One unreadable entry never fails the call.
|
|
40
|
+
*
|
|
41
|
+
* The consequence worth stating is the one that cost a SWE-bench run 41 of its
|
|
42
|
+
* 43 frames: an *absolute* pattern such as `/home/repo/tests/**` is read as the
|
|
43
|
+
* root-relative path `home/repo/tests/**`, which nothing under a root of
|
|
44
|
+
* `/home/repo` can match. That answer is now never silent — a pattern no file
|
|
45
|
+
* under the root could match reports why through `notice`, so "unsatisfiable"
|
|
46
|
+
* and "searched and found none" stay distinguishable.
|
|
47
|
+
*
|
|
48
|
+
* @since 1.0.0
|
|
49
|
+
*/
|
|
50
|
+
import { Effect, Schema } from "effect";
|
|
51
|
+
import * as Search from "./Search.ts";
|
|
52
|
+
import type * as StdError from "./StdError.ts";
|
|
53
|
+
/**
|
|
54
|
+
* The registry name for glob.
|
|
55
|
+
*
|
|
56
|
+
* @category identifiers
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
*/
|
|
59
|
+
export declare const name = "glob";
|
|
60
|
+
/**
|
|
61
|
+
* The model-facing glob description.
|
|
62
|
+
*
|
|
63
|
+
* @category descriptions
|
|
64
|
+
* @since 1.0.0
|
|
65
|
+
*/
|
|
66
|
+
export declare const description = "Find files through the Smithers Ripgrep Subset v1 contract.";
|
|
67
|
+
/**
|
|
68
|
+
* Input accepted by {@link flow} and {@link run}.
|
|
69
|
+
*
|
|
70
|
+
* @category schemas
|
|
71
|
+
* @since 1.0.0
|
|
72
|
+
*/
|
|
73
|
+
export declare const Input: Schema.Struct<{
|
|
74
|
+
readonly pattern: Schema.NonEmptyString;
|
|
75
|
+
readonly root: Schema.optional<Schema.String>;
|
|
76
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
77
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
78
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Decoded input accepted by the `glob` flow.
|
|
82
|
+
*
|
|
83
|
+
* @category models
|
|
84
|
+
* @since 1.0.0
|
|
85
|
+
*/
|
|
86
|
+
export type Input = typeof Input.Type;
|
|
87
|
+
/**
|
|
88
|
+
* Output produced by {@link run}.
|
|
89
|
+
*
|
|
90
|
+
* @category schemas
|
|
91
|
+
* @since 1.0.0
|
|
92
|
+
*/
|
|
93
|
+
export declare const Output: Schema.Struct<{
|
|
94
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
95
|
+
readonly total: Schema.Int;
|
|
96
|
+
readonly truncated: Schema.Boolean;
|
|
97
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Decoded output returned by the `glob` flow.
|
|
101
|
+
*
|
|
102
|
+
* @category models
|
|
103
|
+
* @since 1.0.0
|
|
104
|
+
*/
|
|
105
|
+
export type Output = typeof Output.Type;
|
|
106
|
+
/**
|
|
107
|
+
* Conservative sealed declaration for all workspace files.
|
|
108
|
+
*
|
|
109
|
+
* @category effects
|
|
110
|
+
* @since 1.0.0
|
|
111
|
+
*/
|
|
112
|
+
export declare const effects: import("@smthrs/plan/Effects").Declaration;
|
|
113
|
+
/**
|
|
114
|
+
* Narrows the read declaration to the requested root subtree.
|
|
115
|
+
*
|
|
116
|
+
* @category effects
|
|
117
|
+
* @since 1.0.0
|
|
118
|
+
*/
|
|
119
|
+
export declare const effectsFor: (input: {
|
|
120
|
+
readonly root?: string | undefined;
|
|
121
|
+
}) => import("@smthrs/plan/Effects").Declaration;
|
|
122
|
+
/**
|
|
123
|
+
* Capability strings requested by glob.
|
|
124
|
+
*
|
|
125
|
+
* @category capabilities
|
|
126
|
+
* @since 1.0.0
|
|
127
|
+
*/
|
|
128
|
+
export declare const capabilities: string[];
|
|
129
|
+
/**
|
|
130
|
+
* Declaration-only glob flow.
|
|
131
|
+
*
|
|
132
|
+
* @category flows
|
|
133
|
+
* @since 1.0.0
|
|
134
|
+
*/
|
|
135
|
+
export declare const flow: {
|
|
136
|
+
readonly name: "glob";
|
|
137
|
+
readonly description: "Find files through the Smithers Ripgrep Subset v1 contract.";
|
|
138
|
+
readonly input: Schema.Struct<{
|
|
139
|
+
readonly pattern: Schema.NonEmptyString;
|
|
140
|
+
readonly root: Schema.optional<Schema.String>;
|
|
141
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
142
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
143
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
144
|
+
}>;
|
|
145
|
+
readonly output: Schema.Struct<{
|
|
146
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
147
|
+
readonly total: Schema.Int;
|
|
148
|
+
readonly truncated: Schema.Boolean;
|
|
149
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
150
|
+
}>;
|
|
151
|
+
readonly capabilities: string[];
|
|
152
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* What a call to this flow does, for a reader of a run.
|
|
156
|
+
*
|
|
157
|
+
* Display metadata only. `@smthrs/registry` `Descriptor.FlowActivity` is the
|
|
158
|
+
* governing vocabulary and `StandardFlows` binds this value onto the flow's
|
|
159
|
+
* descriptor, where the binding site checks it. `declarationDigest` excludes
|
|
160
|
+
* it, so declaring it cannot invalidate a call identity or a cached prompt.
|
|
161
|
+
*
|
|
162
|
+
* @category presentation
|
|
163
|
+
* @since 1.0.0-rc.0
|
|
164
|
+
*/
|
|
165
|
+
export declare const activity: "reads";
|
|
166
|
+
/**
|
|
167
|
+
* How one recorded call to this flow reads: the verb for each settlement, the
|
|
168
|
+
* input field that is its subject, and the measured output fields a one-line
|
|
169
|
+
* summary may count.
|
|
170
|
+
*
|
|
171
|
+
* Display metadata only, governed by `@smthrs/registry`
|
|
172
|
+
* `Descriptor.CallPresentation` and checked where `StandardFlows` binds it.
|
|
173
|
+
*
|
|
174
|
+
* @category presentation
|
|
175
|
+
* @since 1.0.0-rc.0
|
|
176
|
+
*/
|
|
177
|
+
export declare const presentation: {
|
|
178
|
+
readonly verb: {
|
|
179
|
+
readonly pending: "listing";
|
|
180
|
+
readonly success: "listed";
|
|
181
|
+
readonly failure: "failed to list";
|
|
182
|
+
};
|
|
183
|
+
readonly subject: "pattern";
|
|
184
|
+
readonly result: "paths";
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Runs one `rg --files -g` contract call through the selected peer implementation.
|
|
188
|
+
*
|
|
189
|
+
* @category handlers
|
|
190
|
+
* @since 1.0.0
|
|
191
|
+
*/
|
|
192
|
+
export declare const run: (input: {
|
|
193
|
+
readonly pattern: string;
|
|
194
|
+
readonly root?: string | undefined;
|
|
195
|
+
readonly limit?: number | undefined;
|
|
196
|
+
readonly hidden?: boolean | undefined;
|
|
197
|
+
readonly noIgnore?: boolean | undefined;
|
|
198
|
+
}) => Effect.Effect<{
|
|
199
|
+
readonly paths: readonly string[];
|
|
200
|
+
readonly truncated: boolean;
|
|
201
|
+
readonly total: number;
|
|
202
|
+
readonly notice?: string | undefined;
|
|
203
|
+
}, StdError.StdError, Search.Search>;
|
|
204
|
+
//# sourceMappingURL=Glob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Glob.d.ts","sourceRoot":"","sources":["../../src/Glob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAGvC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B;;;;;GAKG;AACH,eAAO,MAAM,WAAW,gEAAgE,CAAA;AACxF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;;;EAgBhB,CAAA;AACF;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AACrC;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;EAKjB,CAAA;AACF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AACvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,4CAA6E,CAAA;AACjG;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,+CAC6B,CAAA;AACrG;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAAiC,CAAA;AAC1D;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAAsF,CAAA;AAEvG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,EAAG,OAAgB,CAAA;AAExC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;;;;;;;;CAIf,CAAA;AAEV;;;;;GAKG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;oCAad,CAAA"}
|
package/dist/cjs/Glob.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name2 in all)
|
|
10
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Glob_exports = {};
|
|
30
|
+
__export(Glob_exports, {
|
|
31
|
+
Input: () => Input,
|
|
32
|
+
Output: () => Output,
|
|
33
|
+
activity: () => activity,
|
|
34
|
+
capabilities: () => capabilities,
|
|
35
|
+
description: () => description,
|
|
36
|
+
effects: () => effects,
|
|
37
|
+
effectsFor: () => effectsFor,
|
|
38
|
+
flow: () => flow,
|
|
39
|
+
name: () => name,
|
|
40
|
+
presentation: () => presentation,
|
|
41
|
+
run: () => run
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(Glob_exports);
|
|
44
|
+
var import_effect = require("effect");
|
|
45
|
+
var import_Declaration = require("./internal/Declaration.js");
|
|
46
|
+
var import_Text = require("./internal/Text.js");
|
|
47
|
+
var Search = __toESM(require("./Search.js"), 1);
|
|
48
|
+
var Contract = __toESM(require("./SearchContract.js"), 1);
|
|
49
|
+
const name = "glob";
|
|
50
|
+
const description = "Find files through the Smithers Ripgrep Subset v1 contract.";
|
|
51
|
+
const Input = import_effect.Schema.Struct({
|
|
52
|
+
pattern: import_effect.Schema.NonEmptyString.annotate({
|
|
53
|
+
description: "Ripgrep -g pattern, matched against paths relative to root, never absolute paths: *, ?, {a,b} stay inside one segment, ** crosses directories, a pattern without / matches any basename, and a leading / anchors at root."
|
|
54
|
+
}),
|
|
55
|
+
root: import_effect.Schema.optional(import_effect.Schema.String).annotate({
|
|
56
|
+
description: "Search root the pattern is relative to; defaults to . (the host workspace)."
|
|
57
|
+
}),
|
|
58
|
+
hidden: import_effect.Schema.optional(import_effect.Schema.Boolean).annotate({ description: "Ripgrep --hidden." }),
|
|
59
|
+
noIgnore: import_effect.Schema.optional(import_effect.Schema.Boolean).annotate({
|
|
60
|
+
description: "Honor root-scoped .gitignore files by default. Set true to include ignored paths; hidden and fixed directory skips still apply."
|
|
61
|
+
}),
|
|
62
|
+
limit: import_effect.Schema.optional(import_effect.Schema.Int.check(import_effect.Schema.isGreaterThanOrEqualTo(0))).annotate({
|
|
63
|
+
description: `Maximum paths, capped at ${import_Text.MAX_ENTRIES}.`
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
const Output = import_effect.Schema.Struct({
|
|
67
|
+
paths: import_effect.Schema.Array(import_effect.Schema.String),
|
|
68
|
+
total: import_effect.Schema.Int,
|
|
69
|
+
truncated: import_effect.Schema.Boolean,
|
|
70
|
+
notice: import_effect.Schema.optional(import_effect.Schema.String)
|
|
71
|
+
});
|
|
72
|
+
const effects = (0, import_Declaration.envelope)({ tier: "sealed", mode: "hermetic", reads: ["/**"], writes: [] });
|
|
73
|
+
const effectsFor = (input) => (0, import_Declaration.envelope)({ tier: "sealed", mode: "hermetic", reads: [(0, import_Declaration.rootSubtree)(input.root ?? ".")], writes: [] });
|
|
74
|
+
const capabilities = [(0, import_Declaration.capability)("fs:read", "/**")];
|
|
75
|
+
const flow = { name, description, input: Input, output: Output, capabilities, effects };
|
|
76
|
+
const activity = "reads";
|
|
77
|
+
const presentation = {
|
|
78
|
+
verb: { pending: "listing", success: "listed", failure: "failed to list" },
|
|
79
|
+
subject: "pattern",
|
|
80
|
+
result: "paths"
|
|
81
|
+
};
|
|
82
|
+
const run = import_effect.Effect.fn("Glob.run")(function* (input) {
|
|
83
|
+
const patternError = Contract.validateGlob(input.pattern);
|
|
84
|
+
if (patternError !== void 0) return yield* import_effect.Effect.fail(patternError);
|
|
85
|
+
const search = yield* Search.Search;
|
|
86
|
+
return yield* search.glob({
|
|
87
|
+
pattern: input.pattern,
|
|
88
|
+
root: input.root ?? ".",
|
|
89
|
+
hidden: input.hidden ?? false,
|
|
90
|
+
noIgnore: input.noIgnore ?? false,
|
|
91
|
+
limit: Math.min(input.limit ?? import_Text.MAX_ENTRIES, import_Text.MAX_ENTRIES)
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=Glob.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Glob.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The `glob` projection of Smithers Ripgrep Subset v1.\n *\n * It has the same two peer implementations as `grep` and supports the\n * `rg --files -g` pattern subset: `*`, `**`, `?`, and brace alternatives;\n * results are path sorted; hidden files are opt-in; root and nested .gitignore\n * files apply by default (even outside git repositories). `noIgnore: true` opts\n * out. Parent/global ignore files, .git/info/exclude, .ignore and .rgignore\n * are not read. Caller globs filter the remaining files without overriding\n * ignores. An explicitly named ignored or skipped directory is still searched.\n *\n * **Patterns are relative to `root`, never to the filesystem.** A candidate is\n * matched by the path it has *relative to the search root*, so `tests/**\\/*.py`\n * \u2014 what every caller writing a project-relative pattern means \u2014 matches\n * `<root>/tests/admin_views/admin.py`. Three rules follow, and both peers\n * implement all three identically:\n *\n * - A pattern with no `/` matches the **basename** at any depth: `*.py` finds\n * every Python file in the subtree.\n * - A pattern containing `/` is matched against the root-relative path and is\n * anchored at the root: `tests/*.py` matches `<root>/tests/a.py` and not\n * `<root>/src/tests/a.py`.\n * - A leading `/` is the same anchor spelled explicitly, not a filesystem\n * absolute path: `/a.py` matches only `<root>/a.py`, where bare `a.py` would\n * match any `a.py` in the subtree. A leading `./` means the same anchor.\n *\n * `**` crosses directory boundaries, `*` and `?` stay inside one segment, and\n * `?` consumes one UTF-8 byte. Trailing spaces are not part of a pattern:\n * `rg` reads `-g` by gitignore's rules and drops them, so `\"a.ts \"` finds\n * `a.ts`, and a pattern left blank by that is rejected rather than read as no\n * filter at all.\n *\n * A `root` that names one file is that file. It is reported whatever the\n * pattern says, because `rg` searches a path given on its command line without\n * consulting `-g`, and a walk that reaches one file has nothing to filter.\n *\n * A walk skips what it cannot read \u2014 a dangling symlink, a link cycle, a\n * directory the process may not list \u2014 and reports everything it did reach.\n * One unreadable entry never fails the call.\n *\n * The consequence worth stating is the one that cost a SWE-bench run 41 of its\n * 43 frames: an *absolute* pattern such as `/home/repo/tests/**` is read as the\n * root-relative path `home/repo/tests/**`, which nothing under a root of\n * `/home/repo` can match. That answer is now never silent \u2014 a pattern no file\n * under the root could match reports why through `notice`, so \"unsatisfiable\"\n * and \"searched and found none\" stay distinguishable.\n *\n * @since 1.0.0\n */\n\nimport { Effect, Schema } from \"effect\"\nimport { capability, envelope, rootSubtree } from \"./internal/Declaration.ts\"\nimport { MAX_ENTRIES } from \"./internal/Text.ts\"\nimport * as Search from \"./Search.ts\"\nimport * as Contract from \"./SearchContract.ts\"\nimport type * as StdError from \"./StdError.ts\"\n\n/**\n * The registry name for glob.\n *\n * @category identifiers\n * @since 1.0.0\n */\nexport const name = \"glob\"\n/**\n * The model-facing glob description.\n *\n * @category descriptions\n * @since 1.0.0\n */\nexport const description = \"Find files through the Smithers Ripgrep Subset v1 contract.\"\n/**\n * Input accepted by {@link flow} and {@link run}.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Input = Schema.Struct({\n pattern: Schema.NonEmptyString.annotate({\n description:\n \"Ripgrep -g pattern, matched against paths relative to root, never absolute paths: *, ?, {a,b} stay inside one segment, ** crosses directories, a pattern without / matches any basename, and a leading / anchors at root.\"\n }),\n root: Schema.optional(Schema.String).annotate({\n description: \"Search root the pattern is relative to; defaults to . (the host workspace).\"\n }),\n hidden: Schema.optional(Schema.Boolean).annotate({ description: \"Ripgrep --hidden.\" }),\n noIgnore: Schema.optional(Schema.Boolean).annotate({\n description:\n \"Honor root-scoped .gitignore files by default. Set true to include ignored paths; hidden and fixed directory skips still apply.\"\n }),\n limit: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))).annotate({\n description: `Maximum paths, capped at ${MAX_ENTRIES}.`\n })\n})\n/**\n * Decoded input accepted by the `glob` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Input = typeof Input.Type\n/**\n * Output produced by {@link run}.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Output = Schema.Struct({\n paths: Schema.Array(Schema.String),\n total: Schema.Int,\n truncated: Schema.Boolean,\n notice: Schema.optional(Schema.String)\n})\n/**\n * Decoded output returned by the `glob` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Output = typeof Output.Type\n/**\n * Conservative sealed declaration for all workspace files.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effects = envelope({ tier: \"sealed\", mode: \"hermetic\", reads: [\"/**\"], writes: [] })\n/**\n * Narrows the read declaration to the requested root subtree.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effectsFor = (input: { readonly root?: string | undefined }) =>\n envelope({ tier: \"sealed\", mode: \"hermetic\", reads: [rootSubtree(input.root ?? \".\")], writes: [] })\n/**\n * Capability strings requested by glob.\n *\n * @category capabilities\n * @since 1.0.0\n */\nexport const capabilities = [capability(\"fs:read\", \"/**\")]\n/**\n * Declaration-only glob flow.\n *\n * @category flows\n * @since 1.0.0\n */\nexport const flow = { name, description, input: Input, output: Output, capabilities, effects } as const\n\n/**\n * What a call to this flow does, for a reader of a run.\n *\n * Display metadata only. `@smthrs/registry` `Descriptor.FlowActivity` is the\n * governing vocabulary and `StandardFlows` binds this value onto the flow's\n * descriptor, where the binding site checks it. `declarationDigest` excludes\n * it, so declaring it cannot invalidate a call identity or a cached prompt.\n *\n * @category presentation\n * @since 1.0.0-rc.0\n */\nexport const activity = \"reads\" as const\n\n/**\n * How one recorded call to this flow reads: the verb for each settlement, the\n * input field that is its subject, and the measured output fields a one-line\n * summary may count.\n *\n * Display metadata only, governed by `@smthrs/registry`\n * `Descriptor.CallPresentation` and checked where `StandardFlows` binds it.\n *\n * @category presentation\n * @since 1.0.0-rc.0\n */\nexport const presentation = {\n verb: { pending: \"listing\", success: \"listed\", failure: \"failed to list\" },\n subject: \"pattern\",\n result: \"paths\"\n} as const\n\n/**\n * Runs one `rg --files -g` contract call through the selected peer implementation.\n *\n * @category handlers\n * @since 1.0.0\n */\nexport const run = Effect.fn(\"Glob.run\")(function*(\n input: typeof Input.Type\n): Effect.fn.Return<typeof Output.Type, StdError.StdError, Search.Search> {\n const patternError = Contract.validateGlob(input.pattern)\n if (patternError !== undefined) return yield* Effect.fail(patternError)\n const search = yield* Search.Search\n return yield* search.glob({\n pattern: input.pattern,\n root: input.root ?? \".\",\n hidden: input.hidden ?? false,\n noIgnore: input.noIgnore ?? false,\n limit: Math.min(input.limit ?? MAX_ENTRIES, MAX_ENTRIES)\n })\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDA,oBAA+B;AAC/B,yBAAkD;AAClD,kBAA4B;AAC5B,aAAwB;AACxB,eAA0B;AASnB,MAAM,OAAO;AAOb,MAAM,cAAc;AAOpB,MAAM,QAAQ,qBAAO,OAAO;AAAA,EACjC,SAAS,qBAAO,eAAe,SAAS;AAAA,IACtC,aACE;AAAA,EACJ,CAAC;AAAA,EACD,MAAM,qBAAO,SAAS,qBAAO,MAAM,EAAE,SAAS;AAAA,IAC5C,aAAa;AAAA,EACf,CAAC;AAAA,EACD,QAAQ,qBAAO,SAAS,qBAAO,OAAO,EAAE,SAAS,EAAE,aAAa,oBAAoB,CAAC;AAAA,EACrF,UAAU,qBAAO,SAAS,qBAAO,OAAO,EAAE,SAAS;AAAA,IACjD,aACE;AAAA,EACJ,CAAC;AAAA,EACD,OAAO,qBAAO,SAAS,qBAAO,IAAI,MAAM,qBAAO,uBAAuB,CAAC,CAAC,CAAC,EAAE,SAAS;AAAA,IAClF,aAAa,4BAA4B,uBAAW;AAAA,EACtD,CAAC;AACH,CAAC;AAcM,MAAM,SAAS,qBAAO,OAAO;AAAA,EAClC,OAAO,qBAAO,MAAM,qBAAO,MAAM;AAAA,EACjC,OAAO,qBAAO;AAAA,EACd,WAAW,qBAAO;AAAA,EAClB,QAAQ,qBAAO,SAAS,qBAAO,MAAM;AACvC,CAAC;AAcM,MAAM,cAAU,6BAAS,EAAE,MAAM,UAAU,MAAM,YAAY,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,EAAE,CAAC;AAOzF,MAAM,aAAa,CAAC,cACzB,6BAAS,EAAE,MAAM,UAAU,MAAM,YAAY,OAAO,KAAC,gCAAY,MAAM,QAAQ,GAAG,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;AAO7F,MAAM,eAAe,KAAC,+BAAW,WAAW,KAAK,CAAC;AAOlD,MAAM,OAAO,EAAE,MAAM,aAAa,OAAO,OAAO,QAAQ,QAAQ,cAAc,QAAQ;AAatF,MAAM,WAAW;AAajB,MAAM,eAAe;AAAA,EAC1B,MAAM,EAAE,SAAS,WAAW,SAAS,UAAU,SAAS,iBAAiB;AAAA,EACzE,SAAS;AAAA,EACT,QAAQ;AACV;AAQO,MAAM,MAAM,qBAAO,GAAG,UAAU,EAAE,WACvC,OACwE;AACxE,QAAM,eAAe,SAAS,aAAa,MAAM,OAAO;AACxD,MAAI,iBAAiB,OAAW,QAAO,OAAO,qBAAO,KAAK,YAAY;AACtE,QAAM,SAAS,OAAO,OAAO;AAC7B,SAAO,OAAO,OAAO,KAAK;AAAA,IACxB,SAAS,MAAM;AAAA,IACf,MAAM,MAAM,QAAQ;AAAA,IACpB,QAAQ,MAAM,UAAU;AAAA,IACxB,UAAU,MAAM,YAAY;AAAA,IAC5B,OAAO,KAAK,IAAI,MAAM,SAAS,yBAAa,uBAAW;AAAA,EACzD,CAAC;AACH,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `grep` flow and its Smithers Ripgrep Subset v1 contract.
|
|
3
|
+
*
|
|
4
|
+
* Supported ripgrep semantics: Rust-style regular expressions restricted to
|
|
5
|
+
* Smithers Ripgrep ASCII v1; `-F` (`fixedStrings`); `-i` (`ignoreCase`) and `-S`
|
|
6
|
+
* (`smartCase`); ordered `-g` include/exclude globs; `-A`, `-B`, and `-C`
|
|
7
|
+
* context; per-file `--max-count`; `--files-with-matches`; `--hidden`; and
|
|
8
|
+
* deterministic path/line ordering. Root and nested .gitignore files apply by
|
|
9
|
+
* default, including outside git repositories. `noIgnore: true` opts out.
|
|
10
|
+
* Parent/global ignore files, .git/info/exclude, .ignore and .rgignore are not
|
|
11
|
+
* read. File-type registries are outside v1, and there is no `types` field to
|
|
12
|
+
* pass. Patterns are capped at 4096 ASCII bytes and counted repetitions at 1000. Invalid UTF-8 is replacement-decoded; NUL-bearing
|
|
13
|
+
* files are skipped and counted, while an explicitly named binary file is a
|
|
14
|
+
* typed failure.
|
|
15
|
+
*
|
|
16
|
+
* Results are match-centric, which is `rg --json`'s own grouping: `limit`
|
|
17
|
+
* counts matches, each match carries the context lines that belong to it, and
|
|
18
|
+
* every context line belongs to exactly one match. A budget that counted rows
|
|
19
|
+
* could spend itself on context and drop the match — astropy-7166 paid three
|
|
20
|
+
* frames for exactly that — so a hit is never droppable to make room for its
|
|
21
|
+
* own surroundings. Truncation is disclosed through `notice`.
|
|
22
|
+
*
|
|
23
|
+
* Each returned hit also carries the definition enclosing it when the file's
|
|
24
|
+
* shape says so plainly, so a read window is computed rather than guessed, and
|
|
25
|
+
* a metacharacter pattern that finds nothing is retried as a literal with
|
|
26
|
+
* `retriedAsLiteral` set. Both are properties of the contract rather than of a
|
|
27
|
+
* peer: they are computed in `internal/Grouping.ts` for both implementations.
|
|
28
|
+
*
|
|
29
|
+
* `globs` accepts exactly the shapes `glob` accepts and reads them the same
|
|
30
|
+
* way: every pattern is matched against each candidate's path *relative to
|
|
31
|
+
* `root`*, a pattern without `/` matches the basename at any depth, and a
|
|
32
|
+
* leading `/` or `./` anchors at the root rather than naming a filesystem
|
|
33
|
+
* absolute path. A `root` that names one file is searched whatever the globs
|
|
34
|
+
* say. Caller globs filter after ignores; they never override them. See `Glob` for the full statement of the rules. A search that matched
|
|
35
|
+
* nothing because a positive glob was unsatisfiable says so through `notice`
|
|
36
|
+
* instead of returning a silent empty result.
|
|
37
|
+
*
|
|
38
|
+
* `filesSearched` counts every file the walk and globs admitted, including the binaries
|
|
39
|
+
* `skippedBinary` reports and any file the process could not open. A walk
|
|
40
|
+
* skips what it cannot read rather than failing the call.
|
|
41
|
+
*
|
|
42
|
+
* Native and in-process implementations are peers behind `Search.Search`.
|
|
43
|
+
* This module declares and validates the call; it performs no host access.
|
|
44
|
+
*
|
|
45
|
+
* @since 1.0.0
|
|
46
|
+
*/
|
|
47
|
+
import { Effect, Schema } from "effect";
|
|
48
|
+
import * as Search from "./Search.ts";
|
|
49
|
+
import * as StdError from "./StdError.ts";
|
|
50
|
+
/**
|
|
51
|
+
* The registry name for grep.
|
|
52
|
+
*
|
|
53
|
+
* @category identifiers
|
|
54
|
+
* @since 1.0.0
|
|
55
|
+
*/
|
|
56
|
+
export declare const name = "grep";
|
|
57
|
+
/**
|
|
58
|
+
* The model-facing grep description.
|
|
59
|
+
*
|
|
60
|
+
* @category descriptions
|
|
61
|
+
* @since 1.0.0
|
|
62
|
+
*/
|
|
63
|
+
export declare const description = "Search file contents through the Smithers Ripgrep Subset v1 contract. limit counts matches, each carrying its own context and enclosing definition; fixedStrings searches a literal, and one is retried.";
|
|
64
|
+
/**
|
|
65
|
+
* Input accepted by {@link flow} and {@link run}.
|
|
66
|
+
*
|
|
67
|
+
* @category schemas
|
|
68
|
+
* @since 1.0.0
|
|
69
|
+
*/
|
|
70
|
+
export declare const Input: Schema.Struct<{
|
|
71
|
+
readonly pattern: Schema.String;
|
|
72
|
+
readonly root: Schema.optional<Schema.String>;
|
|
73
|
+
readonly fixedStrings: Schema.optional<Schema.Boolean>;
|
|
74
|
+
readonly ignoreCase: Schema.optional<Schema.Boolean>;
|
|
75
|
+
readonly smartCase: Schema.optional<Schema.Boolean>;
|
|
76
|
+
readonly globs: Schema.optional<Schema.$Array<Schema.String>>;
|
|
77
|
+
readonly beforeContext: Schema.optional<Schema.Int>;
|
|
78
|
+
readonly afterContext: Schema.optional<Schema.Int>;
|
|
79
|
+
readonly context: Schema.optional<Schema.Int>;
|
|
80
|
+
readonly maxCount: Schema.optional<Schema.Int>;
|
|
81
|
+
readonly filesWithMatches: Schema.optional<Schema.Boolean>;
|
|
82
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
83
|
+
readonly symbols: Schema.optional<Schema.Boolean>;
|
|
84
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
85
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Decoded input accepted by the `grep` flow.
|
|
89
|
+
*
|
|
90
|
+
* @category models
|
|
91
|
+
* @since 1.0.0
|
|
92
|
+
*/
|
|
93
|
+
export type Input = typeof Input.Type;
|
|
94
|
+
/**
|
|
95
|
+
* One matching or context line.
|
|
96
|
+
*
|
|
97
|
+
* @category schemas
|
|
98
|
+
* @since 1.0.0
|
|
99
|
+
*/
|
|
100
|
+
export declare const ContextLine: Schema.Struct<{
|
|
101
|
+
readonly line: Schema.Int;
|
|
102
|
+
readonly text: Schema.String;
|
|
103
|
+
}>;
|
|
104
|
+
/**
|
|
105
|
+
* The definition a hit sits inside, when the file's shape says so plainly.
|
|
106
|
+
*
|
|
107
|
+
* @category schemas
|
|
108
|
+
* @since 1.0.0
|
|
109
|
+
*/
|
|
110
|
+
export declare const Symbol: Schema.Struct<{
|
|
111
|
+
readonly kind: Schema.String;
|
|
112
|
+
readonly name: Schema.String;
|
|
113
|
+
readonly startLine: Schema.Int;
|
|
114
|
+
readonly endLine: Schema.Int;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* One hit and the context that belongs to it.
|
|
118
|
+
*
|
|
119
|
+
* @category schemas
|
|
120
|
+
* @since 1.0.0
|
|
121
|
+
*/
|
|
122
|
+
export declare const Match: Schema.Struct<{
|
|
123
|
+
readonly file: Schema.String;
|
|
124
|
+
readonly line: Schema.Int;
|
|
125
|
+
readonly text: Schema.String;
|
|
126
|
+
readonly before: Schema.$Array<Schema.Struct<{
|
|
127
|
+
readonly line: Schema.Int;
|
|
128
|
+
readonly text: Schema.String;
|
|
129
|
+
}>>;
|
|
130
|
+
readonly after: Schema.$Array<Schema.Struct<{
|
|
131
|
+
readonly line: Schema.Int;
|
|
132
|
+
readonly text: Schema.String;
|
|
133
|
+
}>>;
|
|
134
|
+
readonly symbol: Schema.optional<Schema.Struct<{
|
|
135
|
+
readonly kind: Schema.String;
|
|
136
|
+
readonly name: Schema.String;
|
|
137
|
+
readonly startLine: Schema.Int;
|
|
138
|
+
readonly endLine: Schema.Int;
|
|
139
|
+
}>>;
|
|
140
|
+
}>;
|
|
141
|
+
/**
|
|
142
|
+
* Output produced by {@link run}.
|
|
143
|
+
*
|
|
144
|
+
* @category schemas
|
|
145
|
+
* @since 1.0.0
|
|
146
|
+
*/
|
|
147
|
+
export declare const Output: Schema.Struct<{
|
|
148
|
+
readonly matches: Schema.$Array<Schema.Struct<{
|
|
149
|
+
readonly file: Schema.String;
|
|
150
|
+
readonly line: Schema.Int;
|
|
151
|
+
readonly text: Schema.String;
|
|
152
|
+
readonly before: Schema.$Array<Schema.Struct<{
|
|
153
|
+
readonly line: Schema.Int;
|
|
154
|
+
readonly text: Schema.String;
|
|
155
|
+
}>>;
|
|
156
|
+
readonly after: Schema.$Array<Schema.Struct<{
|
|
157
|
+
readonly line: Schema.Int;
|
|
158
|
+
readonly text: Schema.String;
|
|
159
|
+
}>>;
|
|
160
|
+
readonly symbol: Schema.optional<Schema.Struct<{
|
|
161
|
+
readonly kind: Schema.String;
|
|
162
|
+
readonly name: Schema.String;
|
|
163
|
+
readonly startLine: Schema.Int;
|
|
164
|
+
readonly endLine: Schema.Int;
|
|
165
|
+
}>>;
|
|
166
|
+
}>>;
|
|
167
|
+
readonly files: Schema.$Array<Schema.String>;
|
|
168
|
+
readonly filesSearched: Schema.Int;
|
|
169
|
+
readonly skippedBinary: Schema.Int;
|
|
170
|
+
readonly truncated: Schema.Boolean;
|
|
171
|
+
readonly retriedAsLiteral: Schema.optional<Schema.Boolean>;
|
|
172
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
173
|
+
}>;
|
|
174
|
+
/**
|
|
175
|
+
* Decoded output returned by the `grep` flow.
|
|
176
|
+
*
|
|
177
|
+
* @category models
|
|
178
|
+
* @since 1.0.0
|
|
179
|
+
*/
|
|
180
|
+
export type Output = typeof Output.Type;
|
|
181
|
+
/**
|
|
182
|
+
* Conservative sealed declaration for all workspace files.
|
|
183
|
+
*
|
|
184
|
+
* @category effects
|
|
185
|
+
* @since 1.0.0
|
|
186
|
+
*/
|
|
187
|
+
export declare const effects: import("@smthrs/plan/Effects").Declaration;
|
|
188
|
+
/**
|
|
189
|
+
* Narrows the read declaration to the requested root subtree.
|
|
190
|
+
*
|
|
191
|
+
* @category effects
|
|
192
|
+
* @since 1.0.0
|
|
193
|
+
*/
|
|
194
|
+
export declare const effectsFor: (input: {
|
|
195
|
+
readonly root?: string | undefined;
|
|
196
|
+
}) => import("@smthrs/plan/Effects").Declaration;
|
|
197
|
+
/**
|
|
198
|
+
* Capability strings requested by grep.
|
|
199
|
+
*
|
|
200
|
+
* @category capabilities
|
|
201
|
+
* @since 1.0.0
|
|
202
|
+
*/
|
|
203
|
+
export declare const capabilities: string[];
|
|
204
|
+
/**
|
|
205
|
+
* Declaration-only grep flow.
|
|
206
|
+
*
|
|
207
|
+
* @category flows
|
|
208
|
+
* @since 1.0.0
|
|
209
|
+
*/
|
|
210
|
+
export declare const flow: {
|
|
211
|
+
readonly name: "grep";
|
|
212
|
+
readonly description: "Search file contents through the Smithers Ripgrep Subset v1 contract. limit counts matches, each carrying its own context and enclosing definition; fixedStrings searches a literal, and one is retried.";
|
|
213
|
+
readonly input: Schema.Struct<{
|
|
214
|
+
readonly pattern: Schema.String;
|
|
215
|
+
readonly root: Schema.optional<Schema.String>;
|
|
216
|
+
readonly fixedStrings: Schema.optional<Schema.Boolean>;
|
|
217
|
+
readonly ignoreCase: Schema.optional<Schema.Boolean>;
|
|
218
|
+
readonly smartCase: Schema.optional<Schema.Boolean>;
|
|
219
|
+
readonly globs: Schema.optional<Schema.$Array<Schema.String>>;
|
|
220
|
+
readonly beforeContext: Schema.optional<Schema.Int>;
|
|
221
|
+
readonly afterContext: Schema.optional<Schema.Int>;
|
|
222
|
+
readonly context: Schema.optional<Schema.Int>;
|
|
223
|
+
readonly maxCount: Schema.optional<Schema.Int>;
|
|
224
|
+
readonly filesWithMatches: Schema.optional<Schema.Boolean>;
|
|
225
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
226
|
+
readonly symbols: Schema.optional<Schema.Boolean>;
|
|
227
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
228
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
229
|
+
}>;
|
|
230
|
+
readonly output: Schema.Struct<{
|
|
231
|
+
readonly matches: Schema.$Array<Schema.Struct<{
|
|
232
|
+
readonly file: Schema.String;
|
|
233
|
+
readonly line: Schema.Int;
|
|
234
|
+
readonly text: Schema.String;
|
|
235
|
+
readonly before: Schema.$Array<Schema.Struct<{
|
|
236
|
+
readonly line: Schema.Int;
|
|
237
|
+
readonly text: Schema.String;
|
|
238
|
+
}>>;
|
|
239
|
+
readonly after: Schema.$Array<Schema.Struct<{
|
|
240
|
+
readonly line: Schema.Int;
|
|
241
|
+
readonly text: Schema.String;
|
|
242
|
+
}>>;
|
|
243
|
+
readonly symbol: Schema.optional<Schema.Struct<{
|
|
244
|
+
readonly kind: Schema.String;
|
|
245
|
+
readonly name: Schema.String;
|
|
246
|
+
readonly startLine: Schema.Int;
|
|
247
|
+
readonly endLine: Schema.Int;
|
|
248
|
+
}>>;
|
|
249
|
+
}>>;
|
|
250
|
+
readonly files: Schema.$Array<Schema.String>;
|
|
251
|
+
readonly filesSearched: Schema.Int;
|
|
252
|
+
readonly skippedBinary: Schema.Int;
|
|
253
|
+
readonly truncated: Schema.Boolean;
|
|
254
|
+
readonly retriedAsLiteral: Schema.optional<Schema.Boolean>;
|
|
255
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
256
|
+
}>;
|
|
257
|
+
readonly capabilities: string[];
|
|
258
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* What a call to this flow does, for a reader of a run.
|
|
262
|
+
*
|
|
263
|
+
* Display metadata only. `@smthrs/registry` `Descriptor.FlowActivity` is the
|
|
264
|
+
* governing vocabulary and `StandardFlows` binds this value onto the flow's
|
|
265
|
+
* descriptor, where the binding site checks it. `declarationDigest` excludes
|
|
266
|
+
* it, so declaring it cannot invalidate a call identity or a cached prompt.
|
|
267
|
+
*
|
|
268
|
+
* @category presentation
|
|
269
|
+
* @since 1.0.0-rc.0
|
|
270
|
+
*/
|
|
271
|
+
export declare const activity: "reads";
|
|
272
|
+
/**
|
|
273
|
+
* How one recorded call to this flow reads: the verb for each settlement, the
|
|
274
|
+
* input field that is its subject, and the measured output fields a one-line
|
|
275
|
+
* summary may count.
|
|
276
|
+
*
|
|
277
|
+
* Display metadata only, governed by `@smthrs/registry`
|
|
278
|
+
* `Descriptor.CallPresentation` and checked where `StandardFlows` binds it.
|
|
279
|
+
*
|
|
280
|
+
* @category presentation
|
|
281
|
+
* @since 1.0.0-rc.0
|
|
282
|
+
*/
|
|
283
|
+
export declare const presentation: {
|
|
284
|
+
readonly verb: {
|
|
285
|
+
readonly pending: "searching";
|
|
286
|
+
readonly success: "searched";
|
|
287
|
+
readonly failure: "failed to search";
|
|
288
|
+
};
|
|
289
|
+
readonly subject: "pattern";
|
|
290
|
+
readonly result: "matches";
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* Runs one validated ripgrep-contract call through the selected peer implementation.
|
|
294
|
+
*
|
|
295
|
+
* A pattern full of metacharacters that finds nothing is the most common way a
|
|
296
|
+
* search lies: `sphinx-16612` searched 867 files for a parenthesised name and
|
|
297
|
+
* read `0 of 867` as "this symbol is not used here". The retry costs one more
|
|
298
|
+
* pass over the same tree only in the case that already found nothing, and the
|
|
299
|
+
* result says plainly that the answer came from the literal reading.
|
|
300
|
+
*
|
|
301
|
+
* @category handlers
|
|
302
|
+
* @since 1.0.0
|
|
303
|
+
*/
|
|
304
|
+
export declare const run: (input: {
|
|
305
|
+
readonly pattern: string;
|
|
306
|
+
readonly root?: string | undefined;
|
|
307
|
+
readonly limit?: number | undefined;
|
|
308
|
+
readonly context?: number | undefined;
|
|
309
|
+
readonly hidden?: boolean | undefined;
|
|
310
|
+
readonly noIgnore?: boolean | undefined;
|
|
311
|
+
readonly fixedStrings?: boolean | undefined;
|
|
312
|
+
readonly ignoreCase?: boolean | undefined;
|
|
313
|
+
readonly smartCase?: boolean | undefined;
|
|
314
|
+
readonly globs?: readonly string[] | undefined;
|
|
315
|
+
readonly beforeContext?: number | undefined;
|
|
316
|
+
readonly afterContext?: number | undefined;
|
|
317
|
+
readonly maxCount?: number | undefined;
|
|
318
|
+
readonly filesWithMatches?: boolean | undefined;
|
|
319
|
+
readonly symbols?: boolean | undefined;
|
|
320
|
+
}) => Effect.Effect<{
|
|
321
|
+
readonly truncated: boolean;
|
|
322
|
+
readonly matches: readonly {
|
|
323
|
+
readonly line: number;
|
|
324
|
+
readonly text: string;
|
|
325
|
+
readonly file: string;
|
|
326
|
+
readonly after: readonly {
|
|
327
|
+
readonly line: number;
|
|
328
|
+
readonly text: string;
|
|
329
|
+
}[];
|
|
330
|
+
readonly before: readonly {
|
|
331
|
+
readonly line: number;
|
|
332
|
+
readonly text: string;
|
|
333
|
+
}[];
|
|
334
|
+
readonly symbol?: {
|
|
335
|
+
readonly kind: string;
|
|
336
|
+
readonly name: string;
|
|
337
|
+
readonly startLine: number;
|
|
338
|
+
readonly endLine: number;
|
|
339
|
+
} | undefined;
|
|
340
|
+
}[];
|
|
341
|
+
readonly files: readonly string[];
|
|
342
|
+
readonly filesSearched: number;
|
|
343
|
+
readonly skippedBinary: number;
|
|
344
|
+
readonly notice?: string | undefined;
|
|
345
|
+
readonly retriedAsLiteral?: boolean | undefined;
|
|
346
|
+
}, StdError.StdError, Search.Search>;
|
|
347
|
+
//# sourceMappingURL=Grep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grep.d.ts","sourceRoot":"","sources":["../../src/Grep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAIvC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,SAAS,CAAA;AAC1B;;;;;GAKG;AACH,eAAO,MAAM,WAAW,6MACoL,CAAA;AAE5M;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;EAkChB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;EAGtB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;EAOjB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;EAOhB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAUjB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,4CAA6E,CAAA;AACjG;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,+CAC6B,CAAA;AACrG;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAAiC,CAAA;AAC1D;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsF,CAAA;AAEvG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,EAAG,OAAgB,CAAA;AAExC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;;;;;;;;CAIf,CAAA;AA4CV;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAiBd,CAAA"}
|