@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 @@
|
|
|
1
|
+
{"version":3,"file":"Explore.js","sourceRoot":"","sources":["../../src/Explore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,SAAkB,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,sHAAsH,CAAA;AAExH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC7B,WAAW,EAAE,wCAAwC;KACtD,CAAC;CACH,CAAC,CAAA;AAUF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC/B,WAAW,EAAE,oDAAoD;KAClE,CAAC;CACH,CAAC,CAAA;AAUF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;IAC9B,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,CAAC,KAAK,CAAC;IACd,MAAM,EAAE,EAAE;CACX,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,OAAO,CAAA;AAEhE,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CACzB;IACE,IAAI,CAAC,IAAI;IACT,EAAE,CAAC,IAAI;IACP,IAAI,CAAC,IAAI;IACT,IAAI,CAAC,IAAI;CACD,CACX,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAA0B,MAAM,CAAC,MAAM,CAC9D,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAChE,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,OAEpB,EAAE,EAAE,CAAC,CAAC;IACL,IAAI;IACJ,WAAW;IACX,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,KAAK;IACL,MAAM,EAAE,WAAW;IACnB,YAAY;IACZ,OAAO;CACE,CAAA,CAAA;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA","sourcesContent":["/**\n * Read-only workspace reconnaissance as a dynamic flow.\n *\n * @since 1.0.0\n */\n\nimport * as Schema from \"effect/Schema\"\nimport * as Glob from \"./Glob.ts\"\nimport * as Grep from \"./Grep.ts\"\nimport { envelope } from \"./internal/Declaration.ts\"\nimport * as Ls from \"./Ls.ts\"\nimport * as Read from \"./Read.ts\"\n\n/**\n * Registry name for the explore flow.\n *\n * @category metadata\n * @since 1.0.0\n */\nexport const name = \"explore\" as const\n\n/**\n * Model-facing description of the explore flow.\n *\n * @category metadata\n * @since 1.0.0\n */\nexport const description =\n \"Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.\"\n\n/**\n * Input accepted by the explore flow.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Input = Schema.Struct({\n prompt: Schema.String.annotate({\n description: \"The workspace question to investigate.\"\n })\n})\n\n/**\n * Decoded input accepted by the `explore` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Input = typeof Input.Type\n\n/**\n * Output returned by the explore flow.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Output = Schema.Struct({\n findings: Schema.String.annotate({\n description: \"Evidence-backed findings with file:line citations.\"\n })\n})\n\n/**\n * Decoded output returned by the `explore` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Output = typeof Output.Type\n\n/**\n * Static effect envelope for read-only workspace reconnaissance.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effects = envelope({\n tier: \"sealed\",\n mode: \"hermetic\",\n reads: [\"/**\"],\n writes: []\n})\n\n/**\n * Narrows the explore effect declaration for one decoded input.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effectsFor = (_input: typeof Input.Type) => effects\n\nconst flows = Object.freeze(\n [\n Read.flow,\n Ls.flow,\n Glob.flow,\n Grep.flow\n ] as const\n)\n\n/**\n * Transitive capabilities of the read-only flows available to explore.\n *\n * @category capabilities\n * @since 1.0.0\n */\nexport const capabilities: ReadonlyArray<string> = Object.freeze(\n [...new Set(flows.flatMap((flow) => flow.capabilities))].sort()\n)\n\n/**\n * Constructs an explore flow, optionally pinned to a model.\n *\n * Model selection remains optional so the invoking seat can inject its model.\n *\n * @category constructors\n * @since 1.0.0\n */\nexport const make = (options: {\n readonly model?: string | undefined\n}) => ({\n name,\n description,\n input: Input,\n output: Output,\n model: options.model,\n flows,\n prompt: description,\n capabilities,\n effects\n} as const)\n\n/**\n * Default explore declaration with seat-selected model injection.\n *\n * @category flows\n * @since 1.0.0\n */\nexport const flow = make({})\n"]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP GET flow declaration and portable handler.
|
|
3
|
+
*
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
/**
|
|
9
|
+
* Registry name for the fetch flow.
|
|
10
|
+
*
|
|
11
|
+
* @category identifiers
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
export declare const name = "fetch";
|
|
15
|
+
/**
|
|
16
|
+
* Model-facing description of the fetch flow.
|
|
17
|
+
*
|
|
18
|
+
* @category descriptions
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
*/
|
|
21
|
+
export declare const description = "Get an absolute URL and return its status and text body; long bodies are truncated with a notice. Use http-post to send data.";
|
|
22
|
+
/**
|
|
23
|
+
* Input schema for the fetch flow.
|
|
24
|
+
*
|
|
25
|
+
* @category schemas
|
|
26
|
+
* @since 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
export declare const Input: Schema.Struct<{
|
|
29
|
+
readonly url: Schema.String;
|
|
30
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
31
|
+
readonly timeout: Schema.optional<Schema.Number>;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Decoded input accepted by the `fetch` flow.
|
|
35
|
+
*
|
|
36
|
+
* @category models
|
|
37
|
+
* @since 1.0.0
|
|
38
|
+
*/
|
|
39
|
+
export type Input = typeof Input.Type;
|
|
40
|
+
/**
|
|
41
|
+
* Output schema for the fetch flow.
|
|
42
|
+
*
|
|
43
|
+
* @category schemas
|
|
44
|
+
* @since 1.0.0
|
|
45
|
+
*/
|
|
46
|
+
export declare const Output: Schema.Struct<{
|
|
47
|
+
readonly status: Schema.Number;
|
|
48
|
+
readonly body: Schema.String;
|
|
49
|
+
readonly truncated: Schema.Boolean;
|
|
50
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Decoded output returned by the `fetch` flow.
|
|
54
|
+
*
|
|
55
|
+
* @category models
|
|
56
|
+
* @since 1.0.0
|
|
57
|
+
*/
|
|
58
|
+
export type Output = typeof Output.Type;
|
|
59
|
+
/**
|
|
60
|
+
* Static effect envelope for the fetch flow.
|
|
61
|
+
*
|
|
62
|
+
* A retrieval leaves no durable state behind, so it is sealed even though it
|
|
63
|
+
* leaves the machine.
|
|
64
|
+
*
|
|
65
|
+
* @category effects
|
|
66
|
+
* @since 1.0.0
|
|
67
|
+
*/
|
|
68
|
+
export declare const effects: import("@smthrs/plan/Effects").Declaration;
|
|
69
|
+
/**
|
|
70
|
+
* Narrows the fetch effect envelope for one decoded input.
|
|
71
|
+
*
|
|
72
|
+
* Network reach is expressed as a capability rather than a path envelope, so
|
|
73
|
+
* a retrieval has nothing left to narrow.
|
|
74
|
+
*
|
|
75
|
+
* @category effects
|
|
76
|
+
* @since 1.0.0
|
|
77
|
+
*/
|
|
78
|
+
export declare const effectsFor: (_input: typeof Input.Type) => import("@smthrs/plan/Effects").Declaration;
|
|
79
|
+
/**
|
|
80
|
+
* Capabilities required by the fetch flow.
|
|
81
|
+
*
|
|
82
|
+
* @category capabilities
|
|
83
|
+
* @since 1.0.0
|
|
84
|
+
*/
|
|
85
|
+
export declare const capabilities: string[];
|
|
86
|
+
/**
|
|
87
|
+
* Declaration-only fetch flow.
|
|
88
|
+
*
|
|
89
|
+
* @category flows
|
|
90
|
+
* @since 1.0.0
|
|
91
|
+
*/
|
|
92
|
+
export declare const flow: {
|
|
93
|
+
readonly name: "fetch";
|
|
94
|
+
readonly description: "Get an absolute URL and return its status and text body; long bodies are truncated with a notice. Use http-post to send data.";
|
|
95
|
+
readonly input: Schema.Struct<{
|
|
96
|
+
readonly url: Schema.String;
|
|
97
|
+
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
98
|
+
readonly timeout: Schema.optional<Schema.Number>;
|
|
99
|
+
}>;
|
|
100
|
+
readonly output: Schema.Struct<{
|
|
101
|
+
readonly status: Schema.Number;
|
|
102
|
+
readonly body: Schema.String;
|
|
103
|
+
readonly truncated: Schema.Boolean;
|
|
104
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
105
|
+
}>;
|
|
106
|
+
readonly capabilities: string[];
|
|
107
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Retrieves a URL through the permission-aware kernel HTTP client.
|
|
111
|
+
*
|
|
112
|
+
* Error statuses are ordinary results; only transport, permission, and body
|
|
113
|
+
* decoding failures use the typed error channel.
|
|
114
|
+
*
|
|
115
|
+
* @category handlers
|
|
116
|
+
* @since 1.0.0
|
|
117
|
+
*/
|
|
118
|
+
export declare const run: (input: {
|
|
119
|
+
readonly url: string;
|
|
120
|
+
readonly timeout?: number | undefined;
|
|
121
|
+
readonly headers?: {
|
|
122
|
+
readonly [x: string]: string;
|
|
123
|
+
} | undefined;
|
|
124
|
+
}) => Effect.Effect<{
|
|
125
|
+
readonly status: number;
|
|
126
|
+
readonly body: string;
|
|
127
|
+
readonly truncated: boolean;
|
|
128
|
+
readonly notice?: string | undefined;
|
|
129
|
+
}, import("./StdError.ts").StdError, import("@smthrs/kernel/GrantStore").GrantStore | import("effect/http/HttpClient").HttpClient>;
|
|
130
|
+
//# sourceMappingURL=Fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fetch.d.ts","sourceRoot":"","sources":["../../src/Fetch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,UAAU,CAAA;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,WAAW,kIACyG,CAAA;AAEjI;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;EAQhB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;;;EAAW,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,4CAAwE,CAAA;AAE5F;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,OAAO,KAAK,CAAC,IAAI,+CAAY,CAAA;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAA+B,CAAA;AAExD;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;CAAsF,CAAA;AAEvG;;;;;;;;GAQG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;kIAAkF,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP GET flow declaration and portable handler.
|
|
3
|
+
*
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as HttpClientRequest from "effect/http/HttpClientRequest";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import { capability, envelope } from "./internal/Declaration.js";
|
|
10
|
+
import { execute, Response, Timeout } from "./internal/Http.js";
|
|
11
|
+
/**
|
|
12
|
+
* Registry name for the fetch flow.
|
|
13
|
+
*
|
|
14
|
+
* @category identifiers
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
*/
|
|
17
|
+
export const name = "fetch";
|
|
18
|
+
/**
|
|
19
|
+
* Model-facing description of the fetch flow.
|
|
20
|
+
*
|
|
21
|
+
* @category descriptions
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export const description = "Get an absolute URL and return its status and text body; long bodies are truncated with a notice. Use http-post to send data.";
|
|
25
|
+
/**
|
|
26
|
+
* Input schema for the fetch flow.
|
|
27
|
+
*
|
|
28
|
+
* @category schemas
|
|
29
|
+
* @since 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
export const Input = Schema.Struct({
|
|
32
|
+
url: Schema.String.annotate({ description: "Absolute http or https URL to retrieve" }),
|
|
33
|
+
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)).annotate({
|
|
34
|
+
description: "Additional request headers"
|
|
35
|
+
}),
|
|
36
|
+
timeout: Schema.optional(Timeout).annotate({
|
|
37
|
+
description: "Total request and response body timeout in seconds; defaults to 30, capped at 120"
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Output schema for the fetch flow.
|
|
42
|
+
*
|
|
43
|
+
* @category schemas
|
|
44
|
+
* @since 1.0.0
|
|
45
|
+
*/
|
|
46
|
+
export const Output = Response;
|
|
47
|
+
/**
|
|
48
|
+
* Static effect envelope for the fetch flow.
|
|
49
|
+
*
|
|
50
|
+
* A retrieval leaves no durable state behind, so it is sealed even though it
|
|
51
|
+
* leaves the machine.
|
|
52
|
+
*
|
|
53
|
+
* @category effects
|
|
54
|
+
* @since 1.0.0
|
|
55
|
+
*/
|
|
56
|
+
export const effects = envelope({ tier: "sealed", mode: "expected", reads: [], writes: [] });
|
|
57
|
+
/**
|
|
58
|
+
* Narrows the fetch effect envelope for one decoded input.
|
|
59
|
+
*
|
|
60
|
+
* Network reach is expressed as a capability rather than a path envelope, so
|
|
61
|
+
* a retrieval has nothing left to narrow.
|
|
62
|
+
*
|
|
63
|
+
* @category effects
|
|
64
|
+
* @since 1.0.0
|
|
65
|
+
*/
|
|
66
|
+
export const effectsFor = (_input) => effects;
|
|
67
|
+
/**
|
|
68
|
+
* Capabilities required by the fetch flow.
|
|
69
|
+
*
|
|
70
|
+
* @category capabilities
|
|
71
|
+
* @since 1.0.0
|
|
72
|
+
*/
|
|
73
|
+
export const capabilities = [capability("net:get", "*")];
|
|
74
|
+
/**
|
|
75
|
+
* Declaration-only fetch flow.
|
|
76
|
+
*
|
|
77
|
+
* @category flows
|
|
78
|
+
* @since 1.0.0
|
|
79
|
+
*/
|
|
80
|
+
export const flow = { name, description, input: Input, output: Output, capabilities, effects };
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves a URL through the permission-aware kernel HTTP client.
|
|
83
|
+
*
|
|
84
|
+
* Error statuses are ordinary results; only transport, permission, and body
|
|
85
|
+
* decoding failures use the typed error channel.
|
|
86
|
+
*
|
|
87
|
+
* @category handlers
|
|
88
|
+
* @since 1.0.0
|
|
89
|
+
*/
|
|
90
|
+
export const run = Effect.fn("Fetch.run")((input) => execute(input, HttpClientRequest.get));
|
|
91
|
+
//# sourceMappingURL=Fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fetch.js","sourceRoot":"","sources":["../../src/Fetch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAA;AAClE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAA;AAE3B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GACtB,+HAA+H,CAAA;AAEjI;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;IACtF,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC7E,WAAW,EAAE,4BAA4B;KAC1C,CAAC;IACF,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;QACzC,WAAW,EAAE,mFAAmF;KACjG,CAAC;CACH,CAAC,CAAA;AAUF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAA;AAU9B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;AAE5F;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,OAAO,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAA;AAExD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAW,CAAA;AAEvG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAA","sourcesContent":["/**\n * HTTP GET flow declaration and portable handler.\n *\n * @since 1.0.0\n */\n\nimport * as Effect from \"effect/Effect\"\nimport * as HttpClientRequest from \"effect/http/HttpClientRequest\"\nimport * as Schema from \"effect/Schema\"\nimport { capability, envelope } from \"./internal/Declaration.ts\"\nimport { execute, Response, Timeout } from \"./internal/Http.ts\"\n\n/**\n * Registry name for the fetch flow.\n *\n * @category identifiers\n * @since 1.0.0\n */\nexport const name = \"fetch\"\n\n/**\n * Model-facing description of the fetch flow.\n *\n * @category descriptions\n * @since 1.0.0\n */\nexport const description =\n \"Get an absolute URL and return its status and text body; long bodies are truncated with a notice. Use http-post to send data.\"\n\n/**\n * Input schema for the fetch flow.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Input = Schema.Struct({\n url: Schema.String.annotate({ description: \"Absolute http or https URL to retrieve\" }),\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)).annotate({\n description: \"Additional request headers\"\n }),\n timeout: Schema.optional(Timeout).annotate({\n description: \"Total request and response body timeout in seconds; defaults to 30, capped at 120\"\n })\n})\n\n/**\n * Decoded input accepted by the `fetch` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Input = typeof Input.Type\n\n/**\n * Output schema for the fetch flow.\n *\n * @category schemas\n * @since 1.0.0\n */\nexport const Output = Response\n\n/**\n * Decoded output returned by the `fetch` flow.\n *\n * @category models\n * @since 1.0.0\n */\nexport type Output = typeof Output.Type\n\n/**\n * Static effect envelope for the fetch flow.\n *\n * A retrieval leaves no durable state behind, so it is sealed even though it\n * leaves the machine.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effects = envelope({ tier: \"sealed\", mode: \"expected\", reads: [], writes: [] })\n\n/**\n * Narrows the fetch effect envelope for one decoded input.\n *\n * Network reach is expressed as a capability rather than a path envelope, so\n * a retrieval has nothing left to narrow.\n *\n * @category effects\n * @since 1.0.0\n */\nexport const effectsFor = (_input: typeof Input.Type) => effects\n\n/**\n * Capabilities required by the fetch flow.\n *\n * @category capabilities\n * @since 1.0.0\n */\nexport const capabilities = [capability(\"net:get\", \"*\")]\n\n/**\n * Declaration-only fetch 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 * Retrieves a URL through the permission-aware kernel HTTP client.\n *\n * Error statuses are ordinary results; only transport, permission, and body\n * decoding failures use the typed error channel.\n *\n * @category handlers\n * @since 1.0.0\n */\nexport const run = Effect.fn(\"Fetch.run\")((input: Input) => execute(input, HttpClientRequest.get))\n"]}
|
|
@@ -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/esm/Glob.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
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 { capability, envelope, rootSubtree } from "./internal/Declaration.js";
|
|
52
|
+
import { MAX_ENTRIES } from "./internal/Text.js";
|
|
53
|
+
import * as Search from "./Search.js";
|
|
54
|
+
import * as Contract from "./SearchContract.js";
|
|
55
|
+
/**
|
|
56
|
+
* The registry name for glob.
|
|
57
|
+
*
|
|
58
|
+
* @category identifiers
|
|
59
|
+
* @since 1.0.0
|
|
60
|
+
*/
|
|
61
|
+
export const name = "glob";
|
|
62
|
+
/**
|
|
63
|
+
* The model-facing glob description.
|
|
64
|
+
*
|
|
65
|
+
* @category descriptions
|
|
66
|
+
* @since 1.0.0
|
|
67
|
+
*/
|
|
68
|
+
export const description = "Find files through the Smithers Ripgrep Subset v1 contract.";
|
|
69
|
+
/**
|
|
70
|
+
* Input accepted by {@link flow} and {@link run}.
|
|
71
|
+
*
|
|
72
|
+
* @category schemas
|
|
73
|
+
* @since 1.0.0
|
|
74
|
+
*/
|
|
75
|
+
export const Input = Schema.Struct({
|
|
76
|
+
pattern: Schema.NonEmptyString.annotate({
|
|
77
|
+
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."
|
|
78
|
+
}),
|
|
79
|
+
root: Schema.optional(Schema.String).annotate({
|
|
80
|
+
description: "Search root the pattern is relative to; defaults to . (the host workspace)."
|
|
81
|
+
}),
|
|
82
|
+
hidden: Schema.optional(Schema.Boolean).annotate({ description: "Ripgrep --hidden." }),
|
|
83
|
+
noIgnore: Schema.optional(Schema.Boolean).annotate({
|
|
84
|
+
description: "Honor root-scoped .gitignore files by default. Set true to include ignored paths; hidden and fixed directory skips still apply."
|
|
85
|
+
}),
|
|
86
|
+
limit: Schema.optional(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))).annotate({
|
|
87
|
+
description: `Maximum paths, capped at ${MAX_ENTRIES}.`
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Output produced by {@link run}.
|
|
92
|
+
*
|
|
93
|
+
* @category schemas
|
|
94
|
+
* @since 1.0.0
|
|
95
|
+
*/
|
|
96
|
+
export const Output = Schema.Struct({
|
|
97
|
+
paths: Schema.Array(Schema.String),
|
|
98
|
+
total: Schema.Int,
|
|
99
|
+
truncated: Schema.Boolean,
|
|
100
|
+
notice: Schema.optional(Schema.String)
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* Conservative sealed declaration for all workspace files.
|
|
104
|
+
*
|
|
105
|
+
* @category effects
|
|
106
|
+
* @since 1.0.0
|
|
107
|
+
*/
|
|
108
|
+
export const effects = envelope({ tier: "sealed", mode: "hermetic", reads: ["/**"], writes: [] });
|
|
109
|
+
/**
|
|
110
|
+
* Narrows the read declaration to the requested root subtree.
|
|
111
|
+
*
|
|
112
|
+
* @category effects
|
|
113
|
+
* @since 1.0.0
|
|
114
|
+
*/
|
|
115
|
+
export const effectsFor = (input) => envelope({ tier: "sealed", mode: "hermetic", reads: [rootSubtree(input.root ?? ".")], writes: [] });
|
|
116
|
+
/**
|
|
117
|
+
* Capability strings requested by glob.
|
|
118
|
+
*
|
|
119
|
+
* @category capabilities
|
|
120
|
+
* @since 1.0.0
|
|
121
|
+
*/
|
|
122
|
+
export const capabilities = [capability("fs:read", "/**")];
|
|
123
|
+
/**
|
|
124
|
+
* Declaration-only glob flow.
|
|
125
|
+
*
|
|
126
|
+
* @category flows
|
|
127
|
+
* @since 1.0.0
|
|
128
|
+
*/
|
|
129
|
+
export const flow = { name, description, input: Input, output: Output, capabilities, effects };
|
|
130
|
+
/**
|
|
131
|
+
* What a call to this flow does, for a reader of a run.
|
|
132
|
+
*
|
|
133
|
+
* Display metadata only. `@smthrs/registry` `Descriptor.FlowActivity` is the
|
|
134
|
+
* governing vocabulary and `StandardFlows` binds this value onto the flow's
|
|
135
|
+
* descriptor, where the binding site checks it. `declarationDigest` excludes
|
|
136
|
+
* it, so declaring it cannot invalidate a call identity or a cached prompt.
|
|
137
|
+
*
|
|
138
|
+
* @category presentation
|
|
139
|
+
* @since 1.0.0-rc.0
|
|
140
|
+
*/
|
|
141
|
+
export const activity = "reads";
|
|
142
|
+
/**
|
|
143
|
+
* How one recorded call to this flow reads: the verb for each settlement, the
|
|
144
|
+
* input field that is its subject, and the measured output fields a one-line
|
|
145
|
+
* summary may count.
|
|
146
|
+
*
|
|
147
|
+
* Display metadata only, governed by `@smthrs/registry`
|
|
148
|
+
* `Descriptor.CallPresentation` and checked where `StandardFlows` binds it.
|
|
149
|
+
*
|
|
150
|
+
* @category presentation
|
|
151
|
+
* @since 1.0.0-rc.0
|
|
152
|
+
*/
|
|
153
|
+
export const presentation = {
|
|
154
|
+
verb: { pending: "listing", success: "listed", failure: "failed to list" },
|
|
155
|
+
subject: "pattern",
|
|
156
|
+
result: "paths"
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Runs one `rg --files -g` contract call through the selected peer implementation.
|
|
160
|
+
*
|
|
161
|
+
* @category handlers
|
|
162
|
+
* @since 1.0.0
|
|
163
|
+
*/
|
|
164
|
+
export const run = Effect.fn("Glob.run")(function* (input) {
|
|
165
|
+
const patternError = Contract.validateGlob(input.pattern);
|
|
166
|
+
if (patternError !== undefined)
|
|
167
|
+
return yield* Effect.fail(patternError);
|
|
168
|
+
const search = yield* Search.Search;
|
|
169
|
+
return yield* search.glob({
|
|
170
|
+
pattern: input.pattern,
|
|
171
|
+
root: input.root ?? ".",
|
|
172
|
+
hidden: input.hidden ?? false,
|
|
173
|
+
noIgnore: input.noIgnore ?? false,
|
|
174
|
+
limit: Math.min(input.limit ?? MAX_ENTRIES, MAX_ENTRIES)
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
//# sourceMappingURL=Glob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Glob.js","sourceRoot":"","sources":["../../src/Glob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAG/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAA;AAC1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,6DAA6D,CAAA;AACxF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC;QACtC,WAAW,EACT,2NAA2N;KAC9N,CAAC;IACF,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC;QAC5C,WAAW,EAAE,6EAA6E;KAC3F,CAAC;IACF,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACtF,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;QACjD,WAAW,EACT,iIAAiI;KACpI,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAClF,WAAW,EAAE,4BAA4B,WAAW,GAAG;KACxD,CAAC;CACH,CAAC,CAAA;AAQF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC,OAAO;IACzB,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACvC,CAAC,CAAA;AAQF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;AACjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA6C,EAAE,EAAE,CAC1E,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;AACrG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;AAC1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAW,CAAA;AAEvG;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAgB,CAAA;AAExC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE;IAC1E,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,OAAO;CACP,CAAA;AAEV;;;;;GAKG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,EAChD,KAAwB;IAExB,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACzD,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACvE,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAA;IACnC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QACxB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,GAAG;QACvB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK;QAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;QACjC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,WAAW,EAAE,WAAW,CAAC;KACzD,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","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 * — what every caller writing a project-relative pattern means — 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 — a dangling symlink, a link cycle, a\n * directory the process may not list — 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 — 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"]}
|