@smthrs/std 0.0.0-stage → 1.0.0-rc.3
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 +130 -0
- package/LICENSE +21 -0
- package/README.md +152 -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 +304 -0
- package/dist/cjs/Bash.d.ts.map +1 -0
- package/dist/cjs/Bash.js +321 -0
- package/dist/cjs/Bash.js.map +7 -0
- package/dist/cjs/Checkpoints.d.ts +279 -0
- package/dist/cjs/Checkpoints.d.ts.map +1 -0
- package/dist/cjs/Checkpoints.js +145 -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 +24 -0
- package/dist/cjs/PortableSearch.d.ts.map +1 -0
- package/dist/cjs/PortableSearch.js +233 -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/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 +127 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +99 -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 +67 -0
- package/dist/cjs/internal/EnvelopePrecheck.d.ts.map +1 -0
- package/dist/cjs/internal/EnvelopePrecheck.js +124 -0
- package/dist/cjs/internal/EnvelopePrecheck.js.map +7 -0
- package/dist/cjs/internal/Exec.d.ts +139 -0
- package/dist/cjs/internal/Exec.d.ts.map +1 -0
- package/dist/cjs/internal/Exec.js +158 -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 +98 -0
- package/dist/cjs/internal/GitWorktree.d.ts.map +1 -0
- package/dist/cjs/internal/GitWorktree.js +270 -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/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/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 +114 -0
- package/dist/cjs/internal/Text.d.ts.map +1 -0
- package/dist/cjs/internal/Text.js +82 -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 +304 -0
- package/dist/esm/Bash.d.ts.map +1 -0
- package/dist/esm/Bash.js +469 -0
- package/dist/esm/Bash.js.map +1 -0
- package/dist/esm/Checkpoints.d.ts +279 -0
- package/dist/esm/Checkpoints.d.ts.map +1 -0
- package/dist/esm/Checkpoints.js +298 -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 +24 -0
- package/dist/esm/PortableSearch.d.ts.map +1 -0
- package/dist/esm/PortableSearch.js +240 -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/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 +127 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +127 -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 +67 -0
- package/dist/esm/internal/EnvelopePrecheck.d.ts.map +1 -0
- package/dist/esm/internal/EnvelopePrecheck.js +167 -0
- package/dist/esm/internal/EnvelopePrecheck.js.map +1 -0
- package/dist/esm/internal/Exec.d.ts +139 -0
- package/dist/esm/internal/Exec.d.ts.map +1 -0
- package/dist/esm/internal/Exec.js +193 -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 +98 -0
- package/dist/esm/internal/GitWorktree.d.ts.map +1 -0
- package/dist/esm/internal/GitWorktree.js +345 -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/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/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 +114 -0
- package/dist/esm/internal/Text.d.ts.map +1 -0
- package/dist/esm/internal/Text.js +130 -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 +117 -0
- package/docs/api.md +472 -0
- package/docs/concepts/effects-and-capabilities.md +136 -0
- package/docs/concepts/flows-and-handlers.md +115 -0
- package/docs/concepts/limits-and-disclosure.md +102 -0
- package/docs/concepts/search-contract.md +182 -0
- package/docs/guides/bind-the-standard-flows.md +114 -0
- package/docs/guides/implement-a-search-peer.md +133 -0
- package/docs/guides/pin-a-checkpoint.md +141 -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 +215 -0
- package/docs/guides/run-the-test-suite.md +154 -0
- package/docs/guides/search-a-workspace.md +148 -0
- package/docs/installation.md +111 -0
- package/docs/quickstart.md +125 -0
- package/docs/reference/flows.md +556 -0
- package/docs/troubleshooting.md +322 -0
- package/package.json +439 -3
- package/src/ApplyPatch.ts +458 -0
- package/src/Bash.ts +549 -0
- package/src/Checkpoints.ts +422 -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 +264 -0
- package/src/Probe.ts +284 -0
- package/src/Read.ts +359 -0
- package/src/Relocate.ts +166 -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 +154 -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 +233 -0
- package/src/internal/Exec.ts +314 -0
- package/src/internal/FileMutation.ts +231 -0
- package/src/internal/FsFailure.ts +51 -0
- package/src/internal/GitWorktree.ts +473 -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/SearchContract.ts +77 -0
- package/src/internal/Symbols.ts +88 -0
- package/src/internal/TestReport.ts +194 -0
- package/src/internal/Text.ts +170 -0
- package/src/internal/Url.ts +23 -0
- package/src/internal/Walk.ts +176 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only workspace reconnaissance as a dynamic flow.
|
|
3
|
+
*
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
7
|
+
/**
|
|
8
|
+
* Registry name for the explore flow.
|
|
9
|
+
*
|
|
10
|
+
* @category metadata
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
*/
|
|
13
|
+
export declare const name: "explore";
|
|
14
|
+
/**
|
|
15
|
+
* Model-facing description of the explore flow.
|
|
16
|
+
*
|
|
17
|
+
* @category metadata
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
*/
|
|
20
|
+
export declare const description = "Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.";
|
|
21
|
+
/**
|
|
22
|
+
* Input accepted by the explore flow.
|
|
23
|
+
*
|
|
24
|
+
* @category schemas
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
*/
|
|
27
|
+
export declare const Input: Schema.Struct<{
|
|
28
|
+
readonly prompt: Schema.String;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Decoded input accepted by the `explore` flow.
|
|
32
|
+
*
|
|
33
|
+
* @category models
|
|
34
|
+
* @since 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
export type Input = typeof Input.Type;
|
|
37
|
+
/**
|
|
38
|
+
* Output returned by the explore flow.
|
|
39
|
+
*
|
|
40
|
+
* @category schemas
|
|
41
|
+
* @since 1.0.0
|
|
42
|
+
*/
|
|
43
|
+
export declare const Output: Schema.Struct<{
|
|
44
|
+
readonly findings: Schema.String;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Decoded output returned by the `explore` flow.
|
|
48
|
+
*
|
|
49
|
+
* @category models
|
|
50
|
+
* @since 1.0.0
|
|
51
|
+
*/
|
|
52
|
+
export type Output = typeof Output.Type;
|
|
53
|
+
/**
|
|
54
|
+
* Static effect envelope for read-only workspace reconnaissance.
|
|
55
|
+
*
|
|
56
|
+
* @category effects
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
*/
|
|
59
|
+
export declare const effects: import("@smthrs/plan/Effects").Declaration;
|
|
60
|
+
/**
|
|
61
|
+
* Narrows the explore effect declaration for one decoded input.
|
|
62
|
+
*
|
|
63
|
+
* @category effects
|
|
64
|
+
* @since 1.0.0
|
|
65
|
+
*/
|
|
66
|
+
export declare const effectsFor: (_input: typeof Input.Type) => import("@smthrs/plan/Effects").Declaration;
|
|
67
|
+
/**
|
|
68
|
+
* Transitive capabilities of the read-only flows available to explore.
|
|
69
|
+
*
|
|
70
|
+
* @category capabilities
|
|
71
|
+
* @since 1.0.0
|
|
72
|
+
*/
|
|
73
|
+
export declare const capabilities: ReadonlyArray<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Constructs an explore flow, optionally pinned to a model.
|
|
76
|
+
*
|
|
77
|
+
* Model selection remains optional so the invoking seat can inject its model.
|
|
78
|
+
*
|
|
79
|
+
* @category constructors
|
|
80
|
+
* @since 1.0.0
|
|
81
|
+
*/
|
|
82
|
+
export declare const make: (options: {
|
|
83
|
+
readonly model?: string | undefined;
|
|
84
|
+
}) => {
|
|
85
|
+
readonly name: "explore";
|
|
86
|
+
readonly description: "Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.";
|
|
87
|
+
readonly input: Schema.Struct<{
|
|
88
|
+
readonly prompt: Schema.String;
|
|
89
|
+
}>;
|
|
90
|
+
readonly output: Schema.Struct<{
|
|
91
|
+
readonly findings: Schema.String;
|
|
92
|
+
}>;
|
|
93
|
+
readonly model: string | undefined;
|
|
94
|
+
readonly flows: readonly [{
|
|
95
|
+
readonly name: "read";
|
|
96
|
+
readonly description: "Read a text file by 1-based offset and limit. content is RAW file text with no line-number prefixes, so any line of it is an edit anchor as it stands; the numbers are startLine/endLine.";
|
|
97
|
+
readonly input: Schema.Struct<{
|
|
98
|
+
readonly path: Schema.String;
|
|
99
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
100
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
101
|
+
}>;
|
|
102
|
+
readonly output: Schema.Struct<{
|
|
103
|
+
readonly content: Schema.String;
|
|
104
|
+
readonly startLine: Schema.Number;
|
|
105
|
+
readonly endLine: Schema.Number;
|
|
106
|
+
readonly totalLines: Schema.Number;
|
|
107
|
+
readonly truncated: Schema.Boolean;
|
|
108
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
109
|
+
}>;
|
|
110
|
+
readonly capabilities: string[];
|
|
111
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "ls";
|
|
114
|
+
readonly description: "List a directory with directories first, trailing /, and locale-independent UTF-16 code-unit ordering; use 1-based offset and limit to page large listings.";
|
|
115
|
+
readonly input: Schema.Struct<{
|
|
116
|
+
readonly path: Schema.String;
|
|
117
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
118
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
119
|
+
}>;
|
|
120
|
+
readonly output: Schema.Struct<{
|
|
121
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
122
|
+
readonly name: Schema.String;
|
|
123
|
+
readonly kind: Schema.Literals<readonly ["file", "directory"]>;
|
|
124
|
+
}>>;
|
|
125
|
+
readonly total: Schema.Number;
|
|
126
|
+
readonly truncated: Schema.Boolean;
|
|
127
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
128
|
+
}>;
|
|
129
|
+
readonly capabilities: string[];
|
|
130
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
131
|
+
}, {
|
|
132
|
+
readonly name: "glob";
|
|
133
|
+
readonly description: "Find files through the Smithers Ripgrep Subset v1 contract.";
|
|
134
|
+
readonly input: Schema.Struct<{
|
|
135
|
+
readonly pattern: Schema.NonEmptyString;
|
|
136
|
+
readonly root: Schema.optional<Schema.String>;
|
|
137
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
138
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
139
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
140
|
+
}>;
|
|
141
|
+
readonly output: Schema.Struct<{
|
|
142
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
143
|
+
readonly total: Schema.Int;
|
|
144
|
+
readonly truncated: Schema.Boolean;
|
|
145
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
146
|
+
}>;
|
|
147
|
+
readonly capabilities: string[];
|
|
148
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "grep";
|
|
151
|
+
readonly description: "Search file contents through the Smithers Ripgrep Subset v1 contract. limit counts matches, each carrying its own context and enclosing definition; fixedStrings searches a literal, and one is retried.";
|
|
152
|
+
readonly input: Schema.Struct<{
|
|
153
|
+
readonly pattern: Schema.String;
|
|
154
|
+
readonly root: Schema.optional<Schema.String>;
|
|
155
|
+
readonly fixedStrings: Schema.optional<Schema.Boolean>;
|
|
156
|
+
readonly ignoreCase: Schema.optional<Schema.Boolean>;
|
|
157
|
+
readonly smartCase: Schema.optional<Schema.Boolean>;
|
|
158
|
+
readonly globs: Schema.optional<Schema.$Array<Schema.String>>;
|
|
159
|
+
readonly beforeContext: Schema.optional<Schema.Int>;
|
|
160
|
+
readonly afterContext: Schema.optional<Schema.Int>;
|
|
161
|
+
readonly context: Schema.optional<Schema.Int>;
|
|
162
|
+
readonly maxCount: Schema.optional<Schema.Int>;
|
|
163
|
+
readonly filesWithMatches: Schema.optional<Schema.Boolean>;
|
|
164
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
165
|
+
readonly symbols: Schema.optional<Schema.Boolean>;
|
|
166
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
167
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
168
|
+
}>;
|
|
169
|
+
readonly output: Schema.Struct<{
|
|
170
|
+
readonly matches: Schema.$Array<Schema.Struct<{
|
|
171
|
+
readonly file: Schema.String;
|
|
172
|
+
readonly line: Schema.Int;
|
|
173
|
+
readonly text: Schema.String;
|
|
174
|
+
readonly before: Schema.$Array<Schema.Struct<{
|
|
175
|
+
readonly line: Schema.Int;
|
|
176
|
+
readonly text: Schema.String;
|
|
177
|
+
}>>;
|
|
178
|
+
readonly after: Schema.$Array<Schema.Struct<{
|
|
179
|
+
readonly line: Schema.Int;
|
|
180
|
+
readonly text: Schema.String;
|
|
181
|
+
}>>;
|
|
182
|
+
readonly symbol: Schema.optional<Schema.Struct<{
|
|
183
|
+
readonly kind: Schema.String;
|
|
184
|
+
readonly name: Schema.String;
|
|
185
|
+
readonly startLine: Schema.Int;
|
|
186
|
+
readonly endLine: Schema.Int;
|
|
187
|
+
}>>;
|
|
188
|
+
}>>;
|
|
189
|
+
readonly files: Schema.$Array<Schema.String>;
|
|
190
|
+
readonly filesSearched: Schema.Int;
|
|
191
|
+
readonly skippedBinary: Schema.Int;
|
|
192
|
+
readonly truncated: Schema.Boolean;
|
|
193
|
+
readonly retriedAsLiteral: Schema.optional<Schema.Boolean>;
|
|
194
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
195
|
+
}>;
|
|
196
|
+
readonly capabilities: string[];
|
|
197
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
198
|
+
}];
|
|
199
|
+
readonly prompt: "Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.";
|
|
200
|
+
readonly capabilities: readonly string[];
|
|
201
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Default explore declaration with seat-selected model injection.
|
|
205
|
+
*
|
|
206
|
+
* @category flows
|
|
207
|
+
* @since 1.0.0
|
|
208
|
+
*/
|
|
209
|
+
export declare const flow: {
|
|
210
|
+
readonly name: "explore";
|
|
211
|
+
readonly description: "Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.";
|
|
212
|
+
readonly input: Schema.Struct<{
|
|
213
|
+
readonly prompt: Schema.String;
|
|
214
|
+
}>;
|
|
215
|
+
readonly output: Schema.Struct<{
|
|
216
|
+
readonly findings: Schema.String;
|
|
217
|
+
}>;
|
|
218
|
+
readonly model: string | undefined;
|
|
219
|
+
readonly flows: readonly [{
|
|
220
|
+
readonly name: "read";
|
|
221
|
+
readonly description: "Read a text file by 1-based offset and limit. content is RAW file text with no line-number prefixes, so any line of it is an edit anchor as it stands; the numbers are startLine/endLine.";
|
|
222
|
+
readonly input: Schema.Struct<{
|
|
223
|
+
readonly path: Schema.String;
|
|
224
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
225
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
226
|
+
}>;
|
|
227
|
+
readonly output: Schema.Struct<{
|
|
228
|
+
readonly content: Schema.String;
|
|
229
|
+
readonly startLine: Schema.Number;
|
|
230
|
+
readonly endLine: Schema.Number;
|
|
231
|
+
readonly totalLines: Schema.Number;
|
|
232
|
+
readonly truncated: Schema.Boolean;
|
|
233
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
234
|
+
}>;
|
|
235
|
+
readonly capabilities: string[];
|
|
236
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "ls";
|
|
239
|
+
readonly description: "List a directory with directories first, trailing /, and locale-independent UTF-16 code-unit ordering; use 1-based offset and limit to page large listings.";
|
|
240
|
+
readonly input: Schema.Struct<{
|
|
241
|
+
readonly path: Schema.String;
|
|
242
|
+
readonly offset: Schema.optional<Schema.Int>;
|
|
243
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
244
|
+
}>;
|
|
245
|
+
readonly output: Schema.Struct<{
|
|
246
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
247
|
+
readonly name: Schema.String;
|
|
248
|
+
readonly kind: Schema.Literals<readonly ["file", "directory"]>;
|
|
249
|
+
}>>;
|
|
250
|
+
readonly total: Schema.Number;
|
|
251
|
+
readonly truncated: Schema.Boolean;
|
|
252
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
253
|
+
}>;
|
|
254
|
+
readonly capabilities: string[];
|
|
255
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
256
|
+
}, {
|
|
257
|
+
readonly name: "glob";
|
|
258
|
+
readonly description: "Find files through the Smithers Ripgrep Subset v1 contract.";
|
|
259
|
+
readonly input: Schema.Struct<{
|
|
260
|
+
readonly pattern: Schema.NonEmptyString;
|
|
261
|
+
readonly root: Schema.optional<Schema.String>;
|
|
262
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
263
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
264
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
265
|
+
}>;
|
|
266
|
+
readonly output: Schema.Struct<{
|
|
267
|
+
readonly paths: Schema.$Array<Schema.String>;
|
|
268
|
+
readonly total: Schema.Int;
|
|
269
|
+
readonly truncated: Schema.Boolean;
|
|
270
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
271
|
+
}>;
|
|
272
|
+
readonly capabilities: string[];
|
|
273
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
274
|
+
}, {
|
|
275
|
+
readonly name: "grep";
|
|
276
|
+
readonly description: "Search file contents through the Smithers Ripgrep Subset v1 contract. limit counts matches, each carrying its own context and enclosing definition; fixedStrings searches a literal, and one is retried.";
|
|
277
|
+
readonly input: Schema.Struct<{
|
|
278
|
+
readonly pattern: Schema.String;
|
|
279
|
+
readonly root: Schema.optional<Schema.String>;
|
|
280
|
+
readonly fixedStrings: Schema.optional<Schema.Boolean>;
|
|
281
|
+
readonly ignoreCase: Schema.optional<Schema.Boolean>;
|
|
282
|
+
readonly smartCase: Schema.optional<Schema.Boolean>;
|
|
283
|
+
readonly globs: Schema.optional<Schema.$Array<Schema.String>>;
|
|
284
|
+
readonly beforeContext: Schema.optional<Schema.Int>;
|
|
285
|
+
readonly afterContext: Schema.optional<Schema.Int>;
|
|
286
|
+
readonly context: Schema.optional<Schema.Int>;
|
|
287
|
+
readonly maxCount: Schema.optional<Schema.Int>;
|
|
288
|
+
readonly filesWithMatches: Schema.optional<Schema.Boolean>;
|
|
289
|
+
readonly hidden: Schema.optional<Schema.Boolean>;
|
|
290
|
+
readonly symbols: Schema.optional<Schema.Boolean>;
|
|
291
|
+
readonly noIgnore: Schema.optional<Schema.Boolean>;
|
|
292
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
293
|
+
}>;
|
|
294
|
+
readonly output: Schema.Struct<{
|
|
295
|
+
readonly matches: Schema.$Array<Schema.Struct<{
|
|
296
|
+
readonly file: Schema.String;
|
|
297
|
+
readonly line: Schema.Int;
|
|
298
|
+
readonly text: Schema.String;
|
|
299
|
+
readonly before: Schema.$Array<Schema.Struct<{
|
|
300
|
+
readonly line: Schema.Int;
|
|
301
|
+
readonly text: Schema.String;
|
|
302
|
+
}>>;
|
|
303
|
+
readonly after: Schema.$Array<Schema.Struct<{
|
|
304
|
+
readonly line: Schema.Int;
|
|
305
|
+
readonly text: Schema.String;
|
|
306
|
+
}>>;
|
|
307
|
+
readonly symbol: Schema.optional<Schema.Struct<{
|
|
308
|
+
readonly kind: Schema.String;
|
|
309
|
+
readonly name: Schema.String;
|
|
310
|
+
readonly startLine: Schema.Int;
|
|
311
|
+
readonly endLine: Schema.Int;
|
|
312
|
+
}>>;
|
|
313
|
+
}>>;
|
|
314
|
+
readonly files: Schema.$Array<Schema.String>;
|
|
315
|
+
readonly filesSearched: Schema.Int;
|
|
316
|
+
readonly skippedBinary: Schema.Int;
|
|
317
|
+
readonly truncated: Schema.Boolean;
|
|
318
|
+
readonly retriedAsLiteral: Schema.optional<Schema.Boolean>;
|
|
319
|
+
readonly notice: Schema.optional<Schema.String>;
|
|
320
|
+
}>;
|
|
321
|
+
readonly capabilities: string[];
|
|
322
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
323
|
+
}];
|
|
324
|
+
readonly prompt: "Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.";
|
|
325
|
+
readonly capabilities: readonly string[];
|
|
326
|
+
readonly effects: import("@smthrs/plan/Effects").Declaration;
|
|
327
|
+
};
|
|
328
|
+
//# sourceMappingURL=Explore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Explore.d.ts","sourceRoot":"","sources":["../../src/Explore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAOvC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,EAAG,SAAkB,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,WAAW,yHACgG,CAAA;AAExH;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;EAIhB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;EAIjB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,4CAKlB,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,OAAO,KAAK,CAAC,IAAI,+CAAY,CAAA;AAWhE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,MAAM,CAE9C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,GAAI,SAAS;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUU,CAAA;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAW,CAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only workspace reconnaissance as a dynamic flow.
|
|
3
|
+
*
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
7
|
+
import * as Glob from "./Glob.js";
|
|
8
|
+
import * as Grep from "./Grep.js";
|
|
9
|
+
import { envelope } from "./internal/Declaration.js";
|
|
10
|
+
import * as Ls from "./Ls.js";
|
|
11
|
+
import * as Read from "./Read.js";
|
|
12
|
+
/**
|
|
13
|
+
* Registry name for the explore flow.
|
|
14
|
+
*
|
|
15
|
+
* @category metadata
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
*/
|
|
18
|
+
export const name = "explore";
|
|
19
|
+
/**
|
|
20
|
+
* Model-facing description of the explore flow.
|
|
21
|
+
*
|
|
22
|
+
* @category metadata
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
*/
|
|
25
|
+
export const description = "Investigate the workspace read-only, cite every finding as file:line, report evidence only, and never propose edits.";
|
|
26
|
+
/**
|
|
27
|
+
* Input accepted by the explore flow.
|
|
28
|
+
*
|
|
29
|
+
* @category schemas
|
|
30
|
+
* @since 1.0.0
|
|
31
|
+
*/
|
|
32
|
+
export const Input = Schema.Struct({
|
|
33
|
+
prompt: Schema.String.annotate({
|
|
34
|
+
description: "The workspace question to investigate."
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Output returned by the explore flow.
|
|
39
|
+
*
|
|
40
|
+
* @category schemas
|
|
41
|
+
* @since 1.0.0
|
|
42
|
+
*/
|
|
43
|
+
export const Output = Schema.Struct({
|
|
44
|
+
findings: Schema.String.annotate({
|
|
45
|
+
description: "Evidence-backed findings with file:line citations."
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Static effect envelope for read-only workspace reconnaissance.
|
|
50
|
+
*
|
|
51
|
+
* @category effects
|
|
52
|
+
* @since 1.0.0
|
|
53
|
+
*/
|
|
54
|
+
export const effects = envelope({
|
|
55
|
+
tier: "sealed",
|
|
56
|
+
mode: "hermetic",
|
|
57
|
+
reads: ["/**"],
|
|
58
|
+
writes: []
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* Narrows the explore effect declaration for one decoded input.
|
|
62
|
+
*
|
|
63
|
+
* @category effects
|
|
64
|
+
* @since 1.0.0
|
|
65
|
+
*/
|
|
66
|
+
export const effectsFor = (_input) => effects;
|
|
67
|
+
const flows = Object.freeze([
|
|
68
|
+
Read.flow,
|
|
69
|
+
Ls.flow,
|
|
70
|
+
Glob.flow,
|
|
71
|
+
Grep.flow
|
|
72
|
+
]);
|
|
73
|
+
/**
|
|
74
|
+
* Transitive capabilities of the read-only flows available to explore.
|
|
75
|
+
*
|
|
76
|
+
* @category capabilities
|
|
77
|
+
* @since 1.0.0
|
|
78
|
+
*/
|
|
79
|
+
export const capabilities = Object.freeze([...new Set(flows.flatMap((flow) => flow.capabilities))].sort());
|
|
80
|
+
/**
|
|
81
|
+
* Constructs an explore flow, optionally pinned to a model.
|
|
82
|
+
*
|
|
83
|
+
* Model selection remains optional so the invoking seat can inject its model.
|
|
84
|
+
*
|
|
85
|
+
* @category constructors
|
|
86
|
+
* @since 1.0.0
|
|
87
|
+
*/
|
|
88
|
+
export const make = (options) => ({
|
|
89
|
+
name,
|
|
90
|
+
description,
|
|
91
|
+
input: Input,
|
|
92
|
+
output: Output,
|
|
93
|
+
model: options.model,
|
|
94
|
+
flows,
|
|
95
|
+
prompt: description,
|
|
96
|
+
capabilities,
|
|
97
|
+
effects
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* Default explore declaration with seat-selected model injection.
|
|
101
|
+
*
|
|
102
|
+
* @category flows
|
|
103
|
+
* @since 1.0.0
|
|
104
|
+
*/
|
|
105
|
+
export const flow = make({});
|
|
106
|
+
//# sourceMappingURL=Explore.js.map
|
|
@@ -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("@smthrs/kernel/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;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAKvC;;;;;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;;;;;;;;;;;qIAAkF,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 Schema from "effect/Schema";
|
|
8
|
+
import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
|
|
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,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,iBAAiB,MAAM,wCAAwC,CAAA;AAC3E,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 Schema from \"effect/Schema\"\nimport * as HttpClientRequest from \"effect/unstable/http/HttpClientRequest\"\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"]}
|