@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,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The repository's own test invocation, declared once by the host.
|
|
3
|
+
*
|
|
4
|
+
* Every repository already knows how to run its tests, and the harness is told
|
|
5
|
+
* so at setup. What the measured program shows is what happens when that fact
|
|
6
|
+
* is not a *callable* thing: agents guess labels
|
|
7
|
+
* (`management_commands.test_flush`, `tests/related_lookup`, `test_axis.py` —
|
|
8
|
+
* none of which exist), and a guessed label costs a frame each time. Seven such
|
|
9
|
+
* invocations are documented across the 45 instances.
|
|
10
|
+
*
|
|
11
|
+
* So the invocation is a declaration, not a parameter: a caller of the `test`
|
|
12
|
+
* flow selects *which* tests, never *how* to run them.
|
|
13
|
+
*
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
import { Context, Effect, Layer } from "effect";
|
|
17
|
+
import * as StdError from "./StdError.ts";
|
|
18
|
+
/**
|
|
19
|
+
* The default ref naming a tree as it stood before the agent touched it.
|
|
20
|
+
*
|
|
21
|
+
* The engine records the pristine checkout under this ref, so a baseline run
|
|
22
|
+
* reuses what already exists instead of inventing a second notion of "base".
|
|
23
|
+
*
|
|
24
|
+
* @category constants
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
export declare const captureBase = "refs/flows/capture-base";
|
|
28
|
+
/**
|
|
29
|
+
* How this repository runs its tests.
|
|
30
|
+
*
|
|
31
|
+
* `cwd` is where the runner runs, and `root` is the host directory holding the
|
|
32
|
+
* git repository. They differ exactly when the runner runs in a container: the
|
|
33
|
+
* container sees the repository at `cwd`, the host sees it at `root`, and a
|
|
34
|
+
* baseline checkout created at `<root>/<name>` is visible to the runner at
|
|
35
|
+
* `<cwd>/<name>` because it is the same directory under two names.
|
|
36
|
+
*
|
|
37
|
+
* @category models
|
|
38
|
+
* @since 1.0.0
|
|
39
|
+
*/
|
|
40
|
+
export interface Runner {
|
|
41
|
+
/** The runner command line, without any test selection. */
|
|
42
|
+
readonly command: string;
|
|
43
|
+
/** Where the runner runs; the container's path when `container` is set. */
|
|
44
|
+
readonly cwd?: string | undefined;
|
|
45
|
+
/** The host path of the repository, when it differs from `cwd`. */
|
|
46
|
+
readonly root?: string | undefined;
|
|
47
|
+
/** A container to route the run through, via the `Container` transport. */
|
|
48
|
+
readonly container?: string | undefined;
|
|
49
|
+
/** Environment the runner needs. */
|
|
50
|
+
readonly env?: Record<string, string> | undefined;
|
|
51
|
+
/** The ref whose commit is the pristine base; defaults to {@link captureBase}, then HEAD. */
|
|
52
|
+
readonly baseRef?: string | undefined;
|
|
53
|
+
/** False refuses baseline requests before any process runs. */
|
|
54
|
+
readonly baseline?: false | undefined;
|
|
55
|
+
/** Default wall-clock budget for one run. */
|
|
56
|
+
readonly timeoutMs?: number | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The declaration service.
|
|
60
|
+
*
|
|
61
|
+
* @category services
|
|
62
|
+
* @since 1.0.0
|
|
63
|
+
*/
|
|
64
|
+
export interface TestRunner {
|
|
65
|
+
readonly declared: Effect.Effect<Runner, StdError.StdError>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The {@link TestRunner} service tag.
|
|
69
|
+
*
|
|
70
|
+
* @category services
|
|
71
|
+
* @since 1.0.0
|
|
72
|
+
*/
|
|
73
|
+
export declare const TestRunner: Context.Service<TestRunner, TestRunner>;
|
|
74
|
+
/**
|
|
75
|
+
* Declares one repository's runner.
|
|
76
|
+
*
|
|
77
|
+
* @category constructors
|
|
78
|
+
* @since 1.0.0
|
|
79
|
+
*/
|
|
80
|
+
export declare const make: (runner: Runner) => TestRunner;
|
|
81
|
+
/**
|
|
82
|
+
* Declares that this host knows of no runner.
|
|
83
|
+
*
|
|
84
|
+
* @category constructors
|
|
85
|
+
* @since 1.0.0
|
|
86
|
+
*/
|
|
87
|
+
export declare const makeNoop: () => TestRunner;
|
|
88
|
+
/**
|
|
89
|
+
* Provides {@link make}.
|
|
90
|
+
*
|
|
91
|
+
* @category layers
|
|
92
|
+
* @since 1.0.0
|
|
93
|
+
*/
|
|
94
|
+
export declare const layer: (runner: Runner) => Layer.Layer<TestRunner>;
|
|
95
|
+
/**
|
|
96
|
+
* Provides {@link makeNoop}.
|
|
97
|
+
*
|
|
98
|
+
* @category layers
|
|
99
|
+
* @since 1.0.0
|
|
100
|
+
*/
|
|
101
|
+
export declare const layerNoop: Layer.Layer<TestRunner>;
|
|
102
|
+
//# sourceMappingURL=TestRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestRunner.d.ts","sourceRoot":"","sources":["../../src/TestRunner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,4BAA4B,CAAA;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,MAAM;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,mEAAmE;IACnE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,oCAAoC;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;IACjD,6FAA6F;IAC7F,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,CAAA;IACrC,6CAA6C;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;CAC5D;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAA6C,CAAA;AAE5G;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,MAAM,KAAG,UAAiE,CAAA;AAEvG;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAO,UASxB,CAAA;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,QAAQ,MAAM,KAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAA4C,CAAA;AAEzG;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAyC,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], 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 TestRunner_exports = {};
|
|
30
|
+
__export(TestRunner_exports, {
|
|
31
|
+
TestRunner: () => TestRunner,
|
|
32
|
+
captureBase: () => captureBase,
|
|
33
|
+
layer: () => layer,
|
|
34
|
+
layerNoop: () => layerNoop,
|
|
35
|
+
make: () => make,
|
|
36
|
+
makeNoop: () => makeNoop
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(TestRunner_exports);
|
|
39
|
+
var import_effect = require("effect");
|
|
40
|
+
var StdError = __toESM(require("./StdError.js"), 1);
|
|
41
|
+
const captureBase = "refs/flows/capture-base";
|
|
42
|
+
const TestRunner = import_effect.Context.Service("@smthrs/std/TestRunner");
|
|
43
|
+
const make = (runner) => TestRunner.of({ declared: import_effect.Effect.succeed(runner) });
|
|
44
|
+
const makeNoop = () => TestRunner.of({
|
|
45
|
+
declared: import_effect.Effect.fail(
|
|
46
|
+
new StdError.StdError({
|
|
47
|
+
code: "provider_unavailable",
|
|
48
|
+
message: "No test runner is declared for this repository, so there is nothing for the test flow to run. Use bash with the command this project's own documentation gives."
|
|
49
|
+
})
|
|
50
|
+
)
|
|
51
|
+
});
|
|
52
|
+
const layer = (runner) => import_effect.Layer.succeed(TestRunner, make(runner));
|
|
53
|
+
const layerNoop = import_effect.Layer.succeed(TestRunner, makeNoop());
|
|
54
|
+
//# sourceMappingURL=TestRunner.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TestRunner.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The repository's own test invocation, declared once by the host.\n *\n * Every repository already knows how to run its tests, and the harness is told\n * so at setup. What the measured program shows is what happens when that fact\n * is not a *callable* thing: agents guess labels\n * (`management_commands.test_flush`, `tests/related_lookup`, `test_axis.py` \u2014\n * none of which exist), and a guessed label costs a frame each time. Seven such\n * invocations are documented across the 45 instances.\n *\n * So the invocation is a declaration, not a parameter: a caller of the `test`\n * flow selects *which* tests, never *how* to run them.\n *\n * @since 1.0.0\n */\n\nimport { Context, Effect, Layer } from \"effect\"\nimport * as StdError from \"./StdError.ts\"\n\n/**\n * The default ref naming a tree as it stood before the agent touched it.\n *\n * The engine records the pristine checkout under this ref, so a baseline run\n * reuses what already exists instead of inventing a second notion of \"base\".\n *\n * @category constants\n * @since 1.0.0\n */\nexport const captureBase = \"refs/flows/capture-base\"\n\n/**\n * How this repository runs its tests.\n *\n * `cwd` is where the runner runs, and `root` is the host directory holding the\n * git repository. They differ exactly when the runner runs in a container: the\n * container sees the repository at `cwd`, the host sees it at `root`, and a\n * baseline checkout created at `<root>/<name>` is visible to the runner at\n * `<cwd>/<name>` because it is the same directory under two names.\n *\n * @category models\n * @since 1.0.0\n */\nexport interface Runner {\n /** The runner command line, without any test selection. */\n readonly command: string\n /** Where the runner runs; the container's path when `container` is set. */\n readonly cwd?: string | undefined\n /** The host path of the repository, when it differs from `cwd`. */\n readonly root?: string | undefined\n /** A container to route the run through, via the `Container` transport. */\n readonly container?: string | undefined\n /** Environment the runner needs. */\n readonly env?: Record<string, string> | undefined\n /** The ref whose commit is the pristine base; defaults to {@link captureBase}, then HEAD. */\n readonly baseRef?: string | undefined\n /** False refuses baseline requests before any process runs. */\n readonly baseline?: false | undefined\n /** Default wall-clock budget for one run. */\n readonly timeoutMs?: number | undefined\n}\n\n/**\n * The declaration service.\n *\n * @category services\n * @since 1.0.0\n */\nexport interface TestRunner {\n readonly declared: Effect.Effect<Runner, StdError.StdError>\n}\n\n/**\n * The {@link TestRunner} service tag.\n *\n * @category services\n * @since 1.0.0\n */\nexport const TestRunner: Context.Service<TestRunner, TestRunner> = Context.Service(\"@smthrs/std/TestRunner\")\n\n/**\n * Declares one repository's runner.\n *\n * @category constructors\n * @since 1.0.0\n */\nexport const make = (runner: Runner): TestRunner => TestRunner.of({ declared: Effect.succeed(runner) })\n\n/**\n * Declares that this host knows of no runner.\n *\n * @category constructors\n * @since 1.0.0\n */\nexport const makeNoop = (): TestRunner =>\n TestRunner.of({\n declared: Effect.fail(\n new StdError.StdError({\n code: \"provider_unavailable\",\n message:\n \"No test runner is declared for this repository, so there is nothing for the test flow to run. Use bash with the command this project's own documentation gives.\"\n })\n )\n })\n\n/**\n * Provides {@link make}.\n *\n * @category layers\n * @since 1.0.0\n */\nexport const layer = (runner: Runner): Layer.Layer<TestRunner> => Layer.succeed(TestRunner, make(runner))\n\n/**\n * Provides {@link makeNoop}.\n *\n * @category layers\n * @since 1.0.0\n */\nexport const layerNoop: Layer.Layer<TestRunner> = Layer.succeed(TestRunner, makeNoop())\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,oBAAuC;AACvC,eAA0B;AAWnB,MAAM,cAAc;AAiDpB,MAAM,aAAsD,sBAAQ,QAAQ,wBAAwB;AAQpG,MAAM,OAAO,CAAC,WAA+B,WAAW,GAAG,EAAE,UAAU,qBAAO,QAAQ,MAAM,EAAE,CAAC;AAQ/F,MAAM,WAAW,MACtB,WAAW,GAAG;AAAA,EACZ,UAAU,qBAAO;AAAA,IACf,IAAI,SAAS,SAAS;AAAA,MACpB,MAAM;AAAA,MACN,SACE;AAAA,IACJ,CAAC;AAAA,EACH;AACF,CAAC;AAQI,MAAM,QAAQ,CAAC,WAA4C,oBAAM,QAAQ,YAAY,KAAK,MAAM,CAAC;AAQjG,MAAM,YAAqC,oBAAM,QAAQ,YAAY,SAAS,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The identity of one directory tree, measured where the tree is.
|
|
3
|
+
*
|
|
4
|
+
* `@smthrs/agent/WorkspaceObservation` measures the host workspace around
|
|
5
|
+
* every frame so the loop's mutation accounting is a fact rather than a
|
|
6
|
+
* claim. A command routed into a container writes to a filesystem that walk
|
|
7
|
+
* never sees: the SWE-bench rig bind-mounts the checkout into its container,
|
|
8
|
+
* so a container edit lands on the host too, but a container Harbor or Pier
|
|
9
|
+
* starts has no such mount, and every edit an agent made there read as an
|
|
10
|
+
* idle frame. Measured 2026-09-22 on Terminal-Bench 4.0: `read_only_cap`
|
|
11
|
+
* ended one run after twenty-four frames of container writes, and the claim
|
|
12
|
+
* judge refused another's completion as "work this run never recorded".
|
|
13
|
+
*
|
|
14
|
+
* This module is the same measurement taken inside the container: one POSIX
|
|
15
|
+
* shell script that lists every kept file under a directory with its size and
|
|
16
|
+
* modification time, in sorted order, and prints one checksum of the listing.
|
|
17
|
+
* `bash` runs it through the container transport before and after a
|
|
18
|
+
* containerised command and reports whether the two answers differ under the
|
|
19
|
+
* reserved {@link key}. The harness reads that key as a measured write, the
|
|
20
|
+
* way it reads `invalidProbe` as a measured refusal.
|
|
21
|
+
*
|
|
22
|
+
* The same properties as the host walk, and the same stated limits:
|
|
23
|
+
*
|
|
24
|
+
* - **Identity, not content.** Size and mtime per file; a rewrite that
|
|
25
|
+
* restores both is invisible.
|
|
26
|
+
* - **Pruning is the signal.** {@link defaultPrune} and
|
|
27
|
+
* {@link defaultIgnoreSuffixes} are the one list both measurements use, so
|
|
28
|
+
* a derived artifact the host walk skips is skipped here too.
|
|
29
|
+
* - **A partial listing says so.** The listing stops at {@link maxPaths}, and
|
|
30
|
+
* a measurement that stopped there reports `complete: false`; `bash` then
|
|
31
|
+
* reports nothing rather than a guess.
|
|
32
|
+
* - **Every tool it needs is POSIX or busybox.** `find -prune`, `stat -c`,
|
|
33
|
+
* `sort`, `head`, `cksum` and `grep -c` are in every Linux base image this
|
|
34
|
+
* has been run against, GNU and busybox alike. A container that lacks one
|
|
35
|
+
* answers with a non-zero exit, which is read as "unmeasured".
|
|
36
|
+
*
|
|
37
|
+
* @since 1.0.0
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The reserved output key a flow reports a measured write under.
|
|
41
|
+
*
|
|
42
|
+
* A wire contract with the harness rather than a shared type, exactly as
|
|
43
|
+
* `Probe.key` is: `@smthrs/harness` reads this key off a `Schema.Json` result
|
|
44
|
+
* and must not depend on the tool library to do it. `true` means the tree the
|
|
45
|
+
* call targeted differed after the call from before it; `false` means it was
|
|
46
|
+
* measured and held still; absent means it was not measured.
|
|
47
|
+
*
|
|
48
|
+
* @category identifiers
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
*/
|
|
51
|
+
export declare const key = "mutated";
|
|
52
|
+
/**
|
|
53
|
+
* Directory names never descended into.
|
|
54
|
+
*
|
|
55
|
+
* Every entry is a place a tool writes derived state while the run is working:
|
|
56
|
+
* version-control internals, dependency trees, and the caches Python, Node,
|
|
57
|
+
* Rust and their test runners keep beside the sources. A run that changes only
|
|
58
|
+
* these has changed nothing it will be judged on.
|
|
59
|
+
*
|
|
60
|
+
* @category constants
|
|
61
|
+
* @since 1.0.0
|
|
62
|
+
*/
|
|
63
|
+
export declare const defaultPrune: ReadonlyArray<string>;
|
|
64
|
+
/**
|
|
65
|
+
* File and directory name suffixes left out of a measurement.
|
|
66
|
+
*
|
|
67
|
+
* Compiled output is the case that matters: several SWE-bench projects build
|
|
68
|
+
* extensions in place, which drops `.so` files next to the `.py` files they
|
|
69
|
+
* came from. Those move whenever the run executes its test suite, and
|
|
70
|
+
* counting them would report every probe as an edit.
|
|
71
|
+
*
|
|
72
|
+
* @category constants
|
|
73
|
+
* @since 1.0.0
|
|
74
|
+
*/
|
|
75
|
+
export declare const defaultIgnoreSuffixes: ReadonlyArray<string>;
|
|
76
|
+
/**
|
|
77
|
+
* The largest number of files one measurement covers.
|
|
78
|
+
*
|
|
79
|
+
* The same bound the host walk uses, for the same reason: a listing that
|
|
80
|
+
* stopped here covers a prefix chosen by sort order, and a prefix holding
|
|
81
|
+
* still says nothing about the files being edited outside it.
|
|
82
|
+
*
|
|
83
|
+
* @category constants
|
|
84
|
+
* @since 1.0.0
|
|
85
|
+
*/
|
|
86
|
+
export declare const maxPaths = 50000;
|
|
87
|
+
/**
|
|
88
|
+
* One measurement, as {@link parse} reads it off the script's output.
|
|
89
|
+
*
|
|
90
|
+
* @category models
|
|
91
|
+
* @since 1.0.0
|
|
92
|
+
*/
|
|
93
|
+
export interface Measurement {
|
|
94
|
+
/** The checksum of the whole listing; equal for two measurements of an unchanged tree. */
|
|
95
|
+
readonly digest: string;
|
|
96
|
+
/** How many files the listing covered. */
|
|
97
|
+
readonly paths: number;
|
|
98
|
+
/** Whether the listing covered the whole tree rather than a bounded prefix. */
|
|
99
|
+
readonly complete: boolean;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The POSIX shell script that measures the current directory.
|
|
103
|
+
*
|
|
104
|
+
* Prints two lines: `cksum`'s `<crc> <bytes>` over the sorted listing, then
|
|
105
|
+
* the number of listing lines. The listing is capped one past
|
|
106
|
+
* {@link maxPaths} so the count alone says whether the bound was reached.
|
|
107
|
+
* Errors from `find` and `stat` are discarded: a path that vanished mid-walk
|
|
108
|
+
* is movement the next measurement reports, and a file the shell may not
|
|
109
|
+
* stat is one it could not have measured either way.
|
|
110
|
+
*
|
|
111
|
+
* @category constructors
|
|
112
|
+
* @since 1.0.0
|
|
113
|
+
*/
|
|
114
|
+
export declare const script: (options?: {
|
|
115
|
+
readonly prune?: ReadonlyArray<string> | undefined;
|
|
116
|
+
readonly ignoreSuffixes?: ReadonlyArray<string> | undefined;
|
|
117
|
+
}) => string;
|
|
118
|
+
/**
|
|
119
|
+
* Reads one measurement off the script's standard output.
|
|
120
|
+
*
|
|
121
|
+
* `undefined` for anything that is not two well-formed lines: the script did
|
|
122
|
+
* not run, a tool it needs is missing, or the output was cut. An unmeasured
|
|
123
|
+
* tree is reported as unmeasured, never as unchanged.
|
|
124
|
+
*
|
|
125
|
+
* @category conversions
|
|
126
|
+
* @since 1.0.0
|
|
127
|
+
*/
|
|
128
|
+
export declare const parse: (stdout: string) => Measurement | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Whether two measurements say the tree moved, or nothing at all.
|
|
131
|
+
*
|
|
132
|
+
* `true` and `false` are answers; `undefined` is the honest reading whenever
|
|
133
|
+
* either measurement is absent or bounded, because a prefix that held still
|
|
134
|
+
* is not a tree that held still.
|
|
135
|
+
*
|
|
136
|
+
* @category conversions
|
|
137
|
+
* @since 1.0.0
|
|
138
|
+
*/
|
|
139
|
+
export declare const moved: (before: Measurement | undefined, after: Measurement | undefined) => boolean | undefined;
|
|
140
|
+
//# sourceMappingURL=TreeFingerprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeFingerprint.d.ts","sourceRoot":"","sources":["../../src/TreeFingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAIH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,GAAG,YAAY,CAAA;AAE5B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAM9C,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAUvD,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,QAAS,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAC3B;AAKD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,GAAI,UAAS;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAClD,QAAQ,CAAC,cAAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;CACvD,KAAG,MAaR,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAAI,QAAQ,MAAM,KAAG,WAAW,GAAG,SAapD,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAChB,QAAQ,WAAW,GAAG,SAAS,EAC/B,OAAO,WAAW,GAAG,SAAS,KAC7B,OAAO,GAAG,SAGuB,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
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 name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key2 of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key2) && key2 !== except)
|
|
16
|
+
__defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || 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 TreeFingerprint_exports = {};
|
|
30
|
+
__export(TreeFingerprint_exports, {
|
|
31
|
+
defaultIgnoreSuffixes: () => defaultIgnoreSuffixes,
|
|
32
|
+
defaultPrune: () => defaultPrune,
|
|
33
|
+
key: () => key,
|
|
34
|
+
maxPaths: () => maxPaths,
|
|
35
|
+
moved: () => moved,
|
|
36
|
+
parse: () => parse,
|
|
37
|
+
script: () => script
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(TreeFingerprint_exports);
|
|
40
|
+
var Prune = __toESM(require("./internal/Prune.js"), 1);
|
|
41
|
+
const key = "mutated";
|
|
42
|
+
const defaultPrune = [
|
|
43
|
+
...Prune.repositoryDirectories,
|
|
44
|
+
// Build and environment directories a search still reads, since a project
|
|
45
|
+
// may keep sources under these names, but a measurement leaves out.
|
|
46
|
+
"venv",
|
|
47
|
+
"target"
|
|
48
|
+
];
|
|
49
|
+
const defaultIgnoreSuffixes = [
|
|
50
|
+
".pyc",
|
|
51
|
+
".pyo",
|
|
52
|
+
".pyd",
|
|
53
|
+
".so",
|
|
54
|
+
".o",
|
|
55
|
+
".a",
|
|
56
|
+
".dylib",
|
|
57
|
+
".class",
|
|
58
|
+
".egg-info"
|
|
59
|
+
];
|
|
60
|
+
const maxPaths = 5e4;
|
|
61
|
+
const quoted = (name) => `'${name.replaceAll("'", `'\\''`)}'`;
|
|
62
|
+
const script = (options = {}) => {
|
|
63
|
+
const prune = (options.prune ?? defaultPrune).map((name) => `-name ${quoted(name)}`).join(" -o ");
|
|
64
|
+
const skipped = (options.ignoreSuffixes ?? defaultIgnoreSuffixes).map((suffix) => `! -name ${quoted(`*${suffix}`)}`).join(" ");
|
|
65
|
+
return [
|
|
66
|
+
"set -f",
|
|
67
|
+
`L=$(find . -xdev \\( ${prune} \\) -prune -o -type f ${skipped} -exec stat -c '%s %Y %n' {} + 2>/dev/null | LC_ALL=C sort | head -n ${maxPaths + 1})`,
|
|
68
|
+
`printf '%s' "$L" | cksum`,
|
|
69
|
+
`printf '%s' "$L" | grep -c ''`
|
|
70
|
+
].join("\n");
|
|
71
|
+
};
|
|
72
|
+
const parse = (stdout) => {
|
|
73
|
+
const lines = stdout.trim().split("\n").map((line) => line.trim());
|
|
74
|
+
if (lines.length !== 2) return void 0;
|
|
75
|
+
const checksum = /^(\d+) (\d+)$/.exec(lines[0]);
|
|
76
|
+
const count = /^(\d+)$/.exec(lines[1]);
|
|
77
|
+
if (checksum === null || count === null) return void 0;
|
|
78
|
+
const paths = Number(count[1]);
|
|
79
|
+
const bounded = paths > maxPaths;
|
|
80
|
+
return {
|
|
81
|
+
digest: `${checksum[1]}:${checksum[2]}`,
|
|
82
|
+
paths: bounded ? maxPaths : paths,
|
|
83
|
+
complete: !bounded
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
const moved = (before, after) => before === void 0 || after === void 0 || !before.complete || !after.complete ? void 0 : before.digest !== after.digest;
|
|
87
|
+
//# sourceMappingURL=TreeFingerprint.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TreeFingerprint.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The identity of one directory tree, measured where the tree is.\n *\n * `@smthrs/agent/WorkspaceObservation` measures the host workspace around\n * every frame so the loop's mutation accounting is a fact rather than a\n * claim. A command routed into a container writes to a filesystem that walk\n * never sees: the SWE-bench rig bind-mounts the checkout into its container,\n * so a container edit lands on the host too, but a container Harbor or Pier\n * starts has no such mount, and every edit an agent made there read as an\n * idle frame. Measured 2026-09-22 on Terminal-Bench 4.0: `read_only_cap`\n * ended one run after twenty-four frames of container writes, and the claim\n * judge refused another's completion as \"work this run never recorded\".\n *\n * This module is the same measurement taken inside the container: one POSIX\n * shell script that lists every kept file under a directory with its size and\n * modification time, in sorted order, and prints one checksum of the listing.\n * `bash` runs it through the container transport before and after a\n * containerised command and reports whether the two answers differ under the\n * reserved {@link key}. The harness reads that key as a measured write, the\n * way it reads `invalidProbe` as a measured refusal.\n *\n * The same properties as the host walk, and the same stated limits:\n *\n * - **Identity, not content.** Size and mtime per file; a rewrite that\n * restores both is invisible.\n * - **Pruning is the signal.** {@link defaultPrune} and\n * {@link defaultIgnoreSuffixes} are the one list both measurements use, so\n * a derived artifact the host walk skips is skipped here too.\n * - **A partial listing says so.** The listing stops at {@link maxPaths}, and\n * a measurement that stopped there reports `complete: false`; `bash` then\n * reports nothing rather than a guess.\n * - **Every tool it needs is POSIX or busybox.** `find -prune`, `stat -c`,\n * `sort`, `head`, `cksum` and `grep -c` are in every Linux base image this\n * has been run against, GNU and busybox alike. A container that lacks one\n * answers with a non-zero exit, which is read as \"unmeasured\".\n *\n * @since 1.0.0\n */\n\nimport * as Prune from \"./internal/Prune.ts\"\n\n/**\n * The reserved output key a flow reports a measured write under.\n *\n * A wire contract with the harness rather than a shared type, exactly as\n * `Probe.key` is: `@smthrs/harness` reads this key off a `Schema.Json` result\n * and must not depend on the tool library to do it. `true` means the tree the\n * call targeted differed after the call from before it; `false` means it was\n * measured and held still; absent means it was not measured.\n *\n * @category identifiers\n * @since 1.0.0\n */\nexport const key = \"mutated\"\n\n/**\n * Directory names never descended into.\n *\n * Every entry is a place a tool writes derived state while the run is working:\n * version-control internals, dependency trees, and the caches Python, Node,\n * Rust and their test runners keep beside the sources. A run that changes only\n * these has changed nothing it will be judged on.\n *\n * @category constants\n * @since 1.0.0\n */\nexport const defaultPrune: ReadonlyArray<string> = [\n ...Prune.repositoryDirectories,\n // Build and environment directories a search still reads, since a project\n // may keep sources under these names, but a measurement leaves out.\n \"venv\",\n \"target\"\n]\n\n/**\n * File and directory name suffixes left out of a measurement.\n *\n * Compiled output is the case that matters: several SWE-bench projects build\n * extensions in place, which drops `.so` files next to the `.py` files they\n * came from. Those move whenever the run executes its test suite, and\n * counting them would report every probe as an edit.\n *\n * @category constants\n * @since 1.0.0\n */\nexport const defaultIgnoreSuffixes: ReadonlyArray<string> = [\n \".pyc\",\n \".pyo\",\n \".pyd\",\n \".so\",\n \".o\",\n \".a\",\n \".dylib\",\n \".class\",\n \".egg-info\"\n]\n\n/**\n * The largest number of files one measurement covers.\n *\n * The same bound the host walk uses, for the same reason: a listing that\n * stopped here covers a prefix chosen by sort order, and a prefix holding\n * still says nothing about the files being edited outside it.\n *\n * @category constants\n * @since 1.0.0\n */\nexport const maxPaths = 50_000\n\n/**\n * One measurement, as {@link parse} reads it off the script's output.\n *\n * @category models\n * @since 1.0.0\n */\nexport interface Measurement {\n /** The checksum of the whole listing; equal for two measurements of an unchanged tree. */\n readonly digest: string\n /** How many files the listing covered. */\n readonly paths: number\n /** Whether the listing covered the whole tree rather than a bounded prefix. */\n readonly complete: boolean\n}\n\n/** One name, single-quoted for a POSIX shell. Every name here is a constant without quotes in it. */\nconst quoted = (name: string): string => `'${name.replaceAll(\"'\", `'\\\\''`)}'`\n\n/**\n * The POSIX shell script that measures the current directory.\n *\n * Prints two lines: `cksum`'s `<crc> <bytes>` over the sorted listing, then\n * the number of listing lines. The listing is capped one past\n * {@link maxPaths} so the count alone says whether the bound was reached.\n * Errors from `find` and `stat` are discarded: a path that vanished mid-walk\n * is movement the next measurement reports, and a file the shell may not\n * stat is one it could not have measured either way.\n *\n * @category constructors\n * @since 1.0.0\n */\nexport const script = (options: {\n readonly prune?: ReadonlyArray<string> | undefined\n readonly ignoreSuffixes?: ReadonlyArray<string> | undefined\n} = {}): string => {\n const prune = (options.prune ?? defaultPrune).map((name) => `-name ${quoted(name)}`).join(\" -o \")\n const skipped = (options.ignoreSuffixes ?? defaultIgnoreSuffixes)\n .map((suffix) => `! -name ${quoted(`*${suffix}`)}`)\n .join(\" \")\n return [\n \"set -f\",\n `L=$(find . -xdev \\\\( ${prune} \\\\) -prune -o -type f ${skipped} -exec stat -c '%s %Y %n' {} + 2>/dev/null | LC_ALL=C sort | head -n ${\n maxPaths + 1\n })`,\n `printf '%s' \"$L\" | cksum`,\n `printf '%s' \"$L\" | grep -c ''`\n ].join(\"\\n\")\n}\n\n/**\n * Reads one measurement off the script's standard output.\n *\n * `undefined` for anything that is not two well-formed lines: the script did\n * not run, a tool it needs is missing, or the output was cut. An unmeasured\n * tree is reported as unmeasured, never as unchanged.\n *\n * @category conversions\n * @since 1.0.0\n */\nexport const parse = (stdout: string): Measurement | undefined => {\n const lines = stdout.trim().split(\"\\n\").map((line) => line.trim())\n if (lines.length !== 2) return undefined\n const checksum = /^(\\d+) (\\d+)$/.exec(lines[0]!)\n const count = /^(\\d+)$/.exec(lines[1]!)\n if (checksum === null || count === null) return undefined\n const paths = Number(count[1])\n const bounded = paths > maxPaths\n return {\n digest: `${checksum[1]}:${checksum[2]}`,\n paths: bounded ? maxPaths : paths,\n complete: !bounded\n }\n}\n\n/**\n * Whether two measurements say the tree moved, or nothing at all.\n *\n * `true` and `false` are answers; `undefined` is the honest reading whenever\n * either measurement is absent or bounded, because a prefix that held still\n * is not a tree that held still.\n *\n * @category conversions\n * @since 1.0.0\n */\nexport const moved = (\n before: Measurement | undefined,\n after: Measurement | undefined\n): boolean | undefined =>\n before === undefined || after === undefined || !before.complete || !after.complete\n ? undefined\n : before.digest !== after.digest\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCA,YAAuB;AAchB,MAAM,MAAM;AAaZ,MAAM,eAAsC;AAAA,EACjD,GAAG,MAAM;AAAA;AAAA;AAAA,EAGT;AAAA,EACA;AACF;AAaO,MAAM,wBAA+C;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAYO,MAAM,WAAW;AAkBxB,MAAM,SAAS,CAAC,SAAyB,IAAI,KAAK,WAAW,KAAK,OAAO,CAAC;AAenE,MAAM,SAAS,CAAC,UAGnB,CAAC,MAAc;AACjB,QAAM,SAAS,QAAQ,SAAS,cAAc,IAAI,CAAC,SAAS,SAAS,OAAO,IAAI,CAAC,EAAE,EAAE,KAAK,MAAM;AAChG,QAAM,WAAW,QAAQ,kBAAkB,uBACxC,IAAI,CAAC,WAAW,WAAW,OAAO,IAAI,MAAM,EAAE,CAAC,EAAE,EACjD,KAAK,GAAG;AACX,SAAO;AAAA,IACL;AAAA,IACA,wBAAwB,KAAK,0BAA0B,OAAO,wEAC5D,WAAW,CACb;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;AAYO,MAAM,QAAQ,CAAC,WAA4C;AAChE,QAAM,QAAQ,OAAO,KAAK,EAAE,MAAM,IAAI,EAAE,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC;AACjE,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAM,WAAW,gBAAgB,KAAK,MAAM,CAAC,CAAE;AAC/C,QAAM,QAAQ,UAAU,KAAK,MAAM,CAAC,CAAE;AACtC,MAAI,aAAa,QAAQ,UAAU,KAAM,QAAO;AAChD,QAAM,QAAQ,OAAO,MAAM,CAAC,CAAC;AAC7B,QAAM,UAAU,QAAQ;AACxB,SAAO;AAAA,IACL,QAAQ,GAAG,SAAS,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC;AAAA,IACrC,OAAO,UAAU,WAAW;AAAA,IAC5B,UAAU,CAAC;AAAA,EACb;AACF;AAYO,MAAM,QAAQ,CACnB,QACA,UAEA,WAAW,UAAa,UAAU,UAAa,CAAC,OAAO,YAAY,CAAC,MAAM,WACtE,SACA,OAAO,WAAW,MAAM;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* update_plan flow declaration and portable handler.
|
|
3
|
+
*
|
|
4
|
+
* A Codex CLI clone of the `update_plan` tool: an optional explanation and a
|
|
5
|
+
* list of plan items, acknowledged with "Plan updated". Pure — no host
|
|
6
|
+
* access; the harness observes plan updates through the journal.
|
|
7
|
+
*
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
*/
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import * as Schema from "effect/Schema";
|
|
12
|
+
import * as StdError from "./StdError.ts";
|
|
13
|
+
/**
|
|
14
|
+
* Registry name for the update_plan flow. Matches the Codex CLI tool name.
|
|
15
|
+
*
|
|
16
|
+
* @category identifiers
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
*/
|
|
19
|
+
export declare const name = "update_plan";
|
|
20
|
+
/**
|
|
21
|
+
* Model-facing description of the update_plan flow. Matches the Codex CLI
|
|
22
|
+
* description.
|
|
23
|
+
*
|
|
24
|
+
* @category descriptions
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
export declare const description: string;
|
|
28
|
+
/**
|
|
29
|
+
* Status of one plan step, matching Codex.
|
|
30
|
+
*
|
|
31
|
+
* @category schemas
|
|
32
|
+
* @since 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
export declare const StepStatus: Schema.Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
35
|
+
/**
|
|
36
|
+
* The plan itself: steps, at most one of them `in_progress`.
|
|
37
|
+
*
|
|
38
|
+
* The single-in-progress rule is the last line of the Codex description a
|
|
39
|
+
* model reads every frame, so it is enforced here rather than left as prose a
|
|
40
|
+
* decode ignores. A plan naming two running steps is a decode failure at the
|
|
41
|
+
* `plan` path, not a silent acknowledgement.
|
|
42
|
+
*
|
|
43
|
+
* @category schemas
|
|
44
|
+
* @since 1.0.0
|
|
45
|
+
*/
|
|
46
|
+
export declare const Plan: Schema.$Array<Schema.Struct<{
|
|
47
|
+
readonly step: Schema.String;
|
|
48
|
+
readonly status: Schema.Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
49
|
+
}>>;
|
|
50
|
+
/**
|
|
51
|
+
* Input schema for the update_plan flow.
|
|
52
|
+
*
|
|
53
|
+
* @category schemas
|
|
54
|
+
* @since 1.0.0
|
|
55
|
+
*/
|
|
56
|
+
export declare const Input: Schema.Struct<{
|
|
57
|
+
readonly explanation: Schema.optional<Schema.String>;
|
|
58
|
+
readonly plan: Schema.$Array<Schema.Struct<{
|
|
59
|
+
readonly step: Schema.String;
|
|
60
|
+
readonly status: Schema.Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
61
|
+
}>>;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Decoded input accepted by the `update_plan` flow.
|
|
65
|
+
*
|
|
66
|
+
* @category models
|
|
67
|
+
* @since 1.0.0
|
|
68
|
+
*/
|
|
69
|
+
export type Input = typeof Input.Type;
|
|
70
|
+
/**
|
|
71
|
+
* Output schema for the update_plan flow.
|
|
72
|
+
*
|
|
73
|
+
* @category schemas
|
|
74
|
+
* @since 1.0.0
|
|
75
|
+
*/
|
|
76
|
+
export declare const Output: Schema.Struct<{
|
|
77
|
+
readonly output: Schema.String;
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Decoded output returned by the `update_plan` flow.
|
|
81
|
+
*
|
|
82
|
+
* @category models
|
|
83
|
+
* @since 1.0.0
|
|
84
|
+
*/
|
|
85
|
+
export type Output = typeof Output.Type;
|
|
86
|
+
/**
|
|
87
|
+
* Static effect envelope for the update_plan flow: no reads, no writes.
|
|
88
|
+
*
|
|
89
|
+
* @category effects
|
|
90
|
+
* @since 1.0.0
|
|
91
|
+
*/
|
|
92
|
+
export declare const effects: import("@smthrs/plan/Effects").Declaration;
|
|
93
|
+
/**
|
|
94
|
+
* Narrows the effect envelope for a decoded invocation.
|
|
95
|
+
*
|
|
96
|
+
* The flow touches nothing, so every invocation declares what the static
|
|
97
|
+
* envelope declares.
|
|
98
|
+
*
|
|
99
|
+
* @category effects
|
|
100
|
+
* @since 1.0.0
|
|
101
|
+
*/
|
|
102
|
+
export declare const effectsFor: (_input: typeof Input.Type) => import("@smthrs/plan/Effects").Declaration;
|
|
103
|
+
/**
|
|
104
|
+
* Capabilities required by the update_plan flow: none.
|
|
105
|
+
*
|
|
106
|
+
* @category capabilities
|
|
107
|
+
* @since 1.0.0
|
|
108
|
+
*/
|
|
109
|
+
export declare const capabilities: ReadonlyArray<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Declaration-only update_plan flow.
|
|
112
|
+
*
|
|
113
|
+
* @category flows
|
|
114
|
+
* @since 1.0.0
|
|
115
|
+
*/
|
|
116
|
+
export declare const flow: {
|
|
117
|
+
readonly name: "update_plan";
|
|
118
|
+
readonly description: string;
|
|
119
|
+
readonly input: Schema.Struct<{
|
|
120
|
+
readonly explanation: Schema.optional<Schema.String>;
|
|
121
|
+
readonly plan: Schema.$Array<Schema.Struct<{
|
|
122
|
+
readonly step: Schema.String;
|
|
123
|
+
readonly status: Schema.Literals<readonly ["pending", "in_progress", "completed"]>;
|
|
124
|
+
}>>;
|
|
125
|
+
}>;
|
|
126
|
+
readonly output: Schema.Struct<{
|
|
127
|
+
readonly output: Schema.String;
|
|
128
|
+
}>;
|
|
129
|
+
readonly capabilities: readonly string[];
|
|
130
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Acknowledges a plan update with Codex's exact response text.
|
|
134
|
+
*
|
|
135
|
+
* The single-in-progress rule is checked again here. `Plan` refuses it at
|
|
136
|
+
* decode time, but a host that calls this handler directly never decodes, and
|
|
137
|
+
* an invariant enforced in only one of the two entrances is enforced in
|
|
138
|
+
* neither.
|
|
139
|
+
*
|
|
140
|
+
* @category handlers
|
|
141
|
+
* @since 1.0.0
|
|
142
|
+
*/
|
|
143
|
+
export declare const run: (input: {
|
|
144
|
+
readonly plan: readonly {
|
|
145
|
+
readonly step: string;
|
|
146
|
+
readonly status: "pending" | "completed" | "in_progress";
|
|
147
|
+
}[];
|
|
148
|
+
readonly explanation?: string | undefined;
|
|
149
|
+
}) => Effect.Effect<{
|
|
150
|
+
readonly output: string;
|
|
151
|
+
}, StdError.StdError, never>;
|
|
152
|
+
//# sourceMappingURL=UpdatePlan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdatePlan.d.ts","sourceRoot":"","sources":["../../src/UpdatePlan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,gBAAgB,CAAA;AAEjC;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,QAE4B,CAAA;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,mEAA2D,CAAA;AAWlF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI;;;GAU+B,CAAA;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;;;;EAGhB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;EAEjB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;GAKG;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,EAAE,aAAa,CAAC,MAAM,CAAM,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;CAAsF,CAAA;AAEvG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,GAAG;;;;;;;;4BAad,CAAA"}
|