@xiaoso/dsh-tool-plus 0.1.6 → 0.1.7-beta.1
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/THIRD_PARTY_NOTICES.md +9 -3
- package/lib/{abort-Cwwm4Err.mjs → abort-Caqff3M6.mjs} +2 -2
- package/lib/alibaba-coding-plan-DTupMiAi.mjs +73 -0
- package/lib/alibaba-token-plan-CHGyWOfX.mjs +46 -0
- package/lib/alibaba-token-plan-Dj3OZhEE.mjs +82 -0
- package/lib/{amazon-bedrock-TVMpUTRG.mjs → amazon-bedrock-DbFSYXfJ.mjs} +117 -38
- package/lib/{anthropic-BL6LFDQS.mjs → anthropic-CTJ3IQVa.mjs} +675 -166
- package/lib/anthropic-CXfWlp-x.mjs +105 -0
- package/lib/{aws-credentials-B20dliS7.mjs → anthropic-wire-CKuhDwZ1.mjs} +74 -14
- package/lib/{api-key-login-CIDnXeYd.mjs → api-key-validation-CGCJFbFr.mjs} +27 -68
- package/lib/{azure-openai-responses-BkhsLmN3.mjs → azure-openai-responses-ChFbWaGj.mjs} +27 -16
- package/lib/{browser-render-CmgvSNte.mjs → browser-render-9o0Rknop.mjs} +4 -4
- package/lib/bun-shim.mjs +71 -2
- package/lib/{bundled-references-ChZSPDFw.mjs → bundled-references-DY3EJxZV.mjs} +6 -5
- package/lib/cline-pass-Bwg3esu9.mjs +44 -0
- package/lib/cloudflare-ai-gateway-BupNXyKK.mjs +35 -0
- package/lib/cloudflare-ai-gateway-EWo0VkP5.mjs +44 -0
- package/lib/collapse-DOR8sOGf.mjs +2304 -0
- package/lib/coreweave-C82HrLpb.mjs +31 -0
- package/lib/coreweave-Ct8cF-da.mjs +14 -0
- package/lib/{cursor-B6HcmplF.mjs → cursor-B95LzVWV.mjs} +11 -3
- package/lib/{cursor-CRpLpaZ3.mjs → cursor-DJV_dcgB.mjs} +887 -1784
- package/lib/{cursor-B8m6SqAH.mjs → cursor-LKGjucn2.mjs} +48 -38
- package/lib/cursor-proto-B8Wj8bv9.mjs +10513 -0
- package/lib/{deterministic-id-D-yIV_eI.mjs → deterministic-id-CUEIMSqR.mjs} +1 -1
- package/lib/devin-BMTdx_hx.mjs +316 -0
- package/lib/{devin-DUAfvBsW.mjs → devin-DSp0Rw_E.mjs} +172 -86
- package/lib/devin-ExGIghmx.mjs +69 -0
- package/lib/devin-proto-Br8fdyNl.mjs +2888 -0
- package/lib/{dom-CawWi8fa.mjs → dom-DG3sPESc.mjs} +8 -8
- package/lib/effort-BdtQMN-_.mjs +23 -0
- package/lib/{error-C-f_Wnw4.mjs → error-CORgGg5a.mjs} +275 -154
- package/lib/{event-stream-Dh2guZxS.mjs → event-stream-ulcDenZD.mjs} +20 -4
- package/lib/{gemini-headers-DKUShltF.mjs → gemini-headers-Co9cVvex.mjs} +2 -2
- package/lib/{github-copilot-suDymKrx.mjs → github-copilot-Dstq1D3s.mjs} +69 -29
- package/lib/github-copilot-headers-DOh1gt_w.mjs +312 -0
- package/lib/gitlab-duo-DSCMrU0m.mjs +11 -0
- package/lib/google-CtsKkOQK.mjs +38 -0
- package/lib/google-antigravity-z-5KsEci.mjs +252 -0
- package/lib/{google-auth-DYJLM792.mjs → google-auth-ieLBaneO.mjs} +4 -4
- package/lib/{google-gemini-cli-8BT513Ul.mjs → google-gemini-cli-C6NE5mWz.mjs} +28 -54
- package/lib/{google-gemini-cli-D6cSmfvB.mjs → google-gemini-cli-CAIPSl7e.mjs} +23 -29
- package/lib/google-oauth-shared-DhMllAkt.mjs +53 -0
- package/lib/{google-shared-CVbHK5vZ.mjs → google-shared-B0aNCYEH.mjs} +140 -44
- package/lib/{google-validation-Cgbn3tWJ.mjs → google-validation-BEkNs-Bx.mjs} +1 -1
- package/lib/{google-vertex-Bui-ypAe.mjs → google-vertex-Bbd1tYNc.mjs} +8 -8
- package/lib/hosts-00rjRzUD.mjs +203 -0
- package/lib/id-AL5obQzR.mjs +71 -0
- package/lib/{idle-iterator-CYAxUkSD.mjs → idle-iterator-DlUkEfzW.mjs} +3 -3
- package/lib/index.mjs +598 -5275
- package/lib/kilo-ChJL54wq.mjs +81 -0
- package/lib/kimi-C2c_Zq8A.mjs +67 -0
- package/lib/{launch-BmgEUycu.mjs → launch-DKDH71En.mjs} +1 -1
- package/lib/markit-CmRfm4E2.mjs +9885 -0
- package/lib/models-DnXMYGcJ.mjs +381604 -0
- package/lib/muse-code-Di1VZmB1.mjs +143 -0
- package/lib/{ollama-Df9ce-Cp.mjs → ollama-B8ic3sEp.mjs} +15 -30
- package/lib/{openai-codex-CAVI3Me-.mjs → openai-codex-DuJNC99x.mjs} +29 -99
- package/lib/{openai-codex-responses-BcnOotRB.mjs → openai-codex-responses-BL29nh9K.mjs} +204 -116
- package/lib/{openai-completions-Bq4WT47M.mjs → openai-completions-BK2f2dBv.mjs} +152 -82
- package/lib/openai-configuration-update-xMYUjaK_.mjs +150 -0
- package/lib/{openai-reasoning-fallback-DXsfiSXO.mjs → openai-reasoning-fallback-BdB3RCbj.mjs} +106 -12
- package/lib/{openai-responses-Mq_-PjvE.mjs → openai-responses-CGQPlIIy.mjs} +76 -82
- package/lib/{perplexity-XgLF73E7.mjs → perplexity-TBjz3VMB.mjs} +52 -9
- package/lib/{pkce-BlQikGPu.mjs → pkce-BYjmugmw.mjs} +1 -1
- package/lib/protobuf-aab1UGVn.mjs +717 -0
- package/lib/{provider-response-C6vcbQyO.mjs → provider-response-SqKSkkUc.mjs} +1 -1
- package/lib/{proxy-D9lm7ONA.mjs → proxy-5nWqRL1f.mjs} +45 -5
- package/lib/{readability-Cpm-ocau.mjs → readability-uGhqb4GC.mjs} +2 -2
- package/lib/reference-CtvM4zLU.mjs +114 -0
- package/lib/{request-debug-HJMoJncL.mjs → request-debug-NQN0BjHH.mjs} +1 -1
- package/lib/{sanitize-text-CfcXzw5X.mjs → sanitize-text-BCf5KmCf.mjs} +1 -1
- package/lib/{scrapers-Cg5w77td.mjs → scrapers-BpqEnqNM.mjs} +12 -12
- package/lib/{src-BcD0_rQR.mjs → src-BwW51vA5.mjs} +979 -388
- package/lib/{sse-debug-CYdjOC96.mjs → sse-debug-B-tkLCPW.mjs} +1 -1
- package/lib/{stream-Bjq8wjfr.mjs → stream-B_7qN-bA.mjs} +3802 -2623
- package/lib/stream-markup-healing-DKT1lnkW.mjs +267 -0
- package/lib/{strict-tool-validation-imVLUcbI.mjs → strict-tool-validation-CBTz1dAA.mjs} +2 -2
- package/lib/taxonomy-DSIM99rS.mjs +15392 -0
- package/lib/{stream-markup-healing-DZ6bVDxH.mjs → thinking-CiLa2LFB.mjs} +31 -186
- package/lib/{turndown-DN7ByzEI.mjs → turndown-DrX1M4WG.mjs} +4 -4
- package/lib/{type-guards-B9VVjRDK.mjs → type-guards-CttAANEx.mjs} +1 -1
- package/lib/types/client/BashPlusCard.d.ts +53 -0
- package/lib/types/client/ToolPlusSection.d.ts +36 -0
- package/lib/types/client/forms.d.ts +42 -0
- package/lib/types/client/index.d.ts +29 -0
- package/lib/types/client/locales.d.ts +19 -0
- package/lib/types/client/rm-safe-status-text.d.ts +15 -0
- package/lib/types/client/rows.d.ts +107 -0
- package/lib/types/client/web-connection-rpc.d.ts +22 -0
- package/lib/types/config/fields.d.ts +85 -0
- package/lib/types/config/omp-settings.d.ts +21 -0
- package/lib/types/config/settings.d.ts +212 -0
- package/lib/types/config/truncate.d.ts +27 -0
- package/lib/types/host/browser-probe-rpc.d.ts +29 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/tools/ast-edit/adapter/index.d.ts +26 -0
- package/lib/types/tools/ast-edit/adapter/sdk.d.ts +49 -0
- package/lib/types/tools/ast-grep/adapter/index.d.ts +31 -0
- package/lib/types/tools/ast-grep/adapter/sdk.d.ts +44 -0
- package/lib/types/tools/bash/adapter/spill.d.ts +34 -0
- package/lib/types/tools/bash/background.d.ts +40 -0
- package/lib/types/tools/bash/bash-executor.d.ts +102 -0
- package/lib/types/tools/bash/bash-interceptor.d.ts +33 -0
- package/lib/types/tools/bash/cd-workdir.d.ts +35 -0
- package/lib/types/tools/bash/logger.d.ts +18 -0
- package/lib/types/tools/bash/non-interactive-env.d.ts +5 -0
- package/lib/types/tools/bash/render.d.ts +46 -0
- package/lib/types/tools/bash/rm-safe-status.d.ts +62 -0
- package/lib/types/tools/bash/rm-safe.d.ts +18 -0
- package/lib/types/tools/bash/sanitize-text.d.ts +34 -0
- package/lib/types/tools/bash/shell-snapshot.d.ts +31 -0
- package/lib/types/tools/bash/shell-tokenize.d.ts +60 -0
- package/lib/types/tools/bash/streaming-output.d.ts +32 -0
- package/lib/types/tools/bash/trash-cli-main.d.ts +1 -0
- package/lib/types/tools/bash/trash-cli.d.ts +77 -0
- package/lib/types/tools/bash/types.d.ts +107 -0
- package/lib/types/tools/bash/which.d.ts +20 -0
- package/lib/types/tools/bash/windows-shell.d.ts +31 -0
- package/lib/types/tools/bash/yield.d.ts +71 -0
- package/lib/types/tools/edit/adapter/index.d.ts +57 -0
- package/lib/types/tools/edit/adapter/tools/auto-generated-guard.d.ts +10 -0
- package/lib/types/tools/edit/adapter/tools/output-meta.d.ts +34 -0
- package/lib/types/tools/edit/adapter/tools/plan-mode-guard.d.ts +21 -0
- package/lib/types/tools/glob/adapter/index.d.ts +52 -0
- package/lib/types/tools/grep/adapter/index.d.ts +53 -0
- package/lib/types/tools/grep/adapter/match-path.d.ts +1 -0
- package/lib/types/tools/hashline/native/diff-preview.d.ts +37 -0
- package/lib/types/tools/hashline/native/index.d.ts +109 -0
- package/lib/types/tools/hashline/native/normalize.d.ts +29 -0
- package/lib/types/tools/hashline/native/policy.d.ts +98 -0
- package/lib/types/tools/hashline/native/writer.d.ts +42 -0
- package/lib/types/tools/omp/browser/launch.d.ts +28 -0
- package/lib/types/tools/omp/browser/readable.d.ts +17 -0
- package/lib/types/tools/omp/config/settings-schema.d.ts +12 -0
- package/lib/types/tools/omp/config/settings.d.ts +59 -0
- package/lib/types/tools/omp/edit/apply-patch/parser.d.ts +34 -0
- package/lib/types/tools/omp/edit/details.d.ts +54 -0
- package/lib/types/tools/omp/edit/diff.d.ts +60 -0
- package/lib/types/tools/omp/edit/dispatch.d.ts +43 -0
- package/lib/types/tools/omp/edit/file-snapshot-store.d.ts +81 -0
- package/lib/types/tools/omp/edit/hashline/execute.d.ts +40 -0
- package/lib/types/tools/omp/edit/hashline/params.d.ts +6 -0
- package/lib/types/tools/omp/edit/modes/apply-patch.d.ts +25 -0
- package/lib/types/tools/omp/edit/modes/patch.d.ts +109 -0
- package/lib/types/tools/omp/edit/modes/replace.d.ts +151 -0
- package/lib/types/tools/omp/edit/normalize.d.ts +31 -0
- package/lib/types/tools/omp/edit/notebook.d.ts +50 -0
- package/lib/types/tools/omp/edit/read-file.d.ts +2 -0
- package/lib/types/tools/omp/edit/snapshot-details.d.ts +33 -0
- package/lib/types/tools/omp/extensibility/skills.d.ts +22 -0
- package/lib/types/tools/omp/internal-urls/index.d.ts +100 -0
- package/lib/types/tools/omp/internal-urls/local-protocol.d.ts +12 -0
- package/lib/types/tools/omp/internal-urls/parse.d.ts +31 -0
- package/lib/types/tools/omp/internal-urls/types.d.ts +189 -0
- package/lib/types/tools/omp/internal-urls/xd-protocol.d.ts +19 -0
- package/lib/types/tools/omp/markit/converters/docx.d.ts +6 -0
- package/lib/types/tools/omp/markit/converters/epub.d.ts +15 -0
- package/lib/types/tools/omp/markit/converters/pdf/index.d.ts +7 -0
- package/lib/types/tools/omp/markit/converters/pptx.d.ts +57 -0
- package/lib/types/tools/omp/markit/converters/xlsx.d.ts +25 -0
- package/lib/types/tools/omp/markit/index.d.ts +2 -0
- package/lib/types/tools/omp/markit/registry.d.ts +16 -0
- package/lib/types/tools/omp/markit/types.d.ts +30 -0
- package/lib/types/tools/omp/sdk.d.ts +103 -0
- package/lib/types/tools/omp/session/agent-storage.d.ts +154 -0
- package/lib/types/tools/omp/session/streaming-output.d.ts +244 -0
- package/lib/types/tools/omp/task/spawn-policy.d.ts +22 -0
- package/lib/types/tools/omp/tools/approval.d.ts +62 -0
- package/lib/types/tools/omp/tools/ast-edit.d.ts +73 -0
- package/lib/types/tools/omp/tools/ast-grep.d.ts +61 -0
- package/lib/types/tools/omp/tools/auto-generated-guard.d.ts +20 -0
- package/lib/types/tools/omp/tools/conflict-detect.d.ts +237 -0
- package/lib/types/tools/omp/tools/fetch.d.ts +103 -0
- package/lib/types/tools/omp/tools/file-recorder.d.ts +13 -0
- package/lib/types/tools/omp/tools/fs-cache-invalidation.d.ts +15 -0
- package/lib/types/tools/omp/tools/glob.d.ts +86 -0
- package/lib/types/tools/omp/tools/grep.d.ts +102 -0
- package/lib/types/tools/omp/tools/grouped-file-output.d.ts +70 -0
- package/lib/types/tools/omp/tools/index.d.ts +23 -0
- package/lib/types/tools/omp/tools/list-limit.d.ts +12 -0
- package/lib/types/tools/omp/tools/match-line-format.d.ts +11 -0
- package/lib/types/tools/omp/tools/output-meta.d.ts +160 -0
- package/lib/types/tools/omp/tools/path-utils.d.ts +326 -0
- package/lib/types/tools/omp/tools/plan-mode-guard.d.ts +33 -0
- package/lib/types/tools/omp/tools/read-archive.d.ts +16 -0
- package/lib/types/tools/omp/tools/read-format.d.ts +104 -0
- package/lib/types/tools/omp/tools/read-path-resolution.d.ts +19 -0
- package/lib/types/tools/omp/tools/read-selector.d.ts +27 -0
- package/lib/types/tools/omp/tools/read-sqlite.d.ts +16 -0
- package/lib/types/tools/omp/tools/read-summary.d.ts +15 -0
- package/lib/types/tools/omp/tools/read.d.ts +70 -0
- package/lib/types/tools/omp/tools/render-utils.d.ts +28 -0
- package/lib/types/tools/omp/tools/report-tool-issue.d.ts +149 -0
- package/lib/types/tools/omp/tools/resolve.d.ts +127 -0
- package/lib/types/tools/omp/tools/sqlite-reader.d.ts +114 -0
- package/lib/types/tools/omp/tools/tool-errors.d.ts +33 -0
- package/lib/types/tools/omp/tools/tool-result.d.ts +33 -0
- package/lib/types/tools/omp/tools/tool-timeouts.d.ts +57 -0
- package/lib/types/tools/omp/tools/write.d.ts +53 -0
- package/lib/types/tools/omp/tools/writethrough.d.ts +24 -0
- package/lib/types/tools/omp/utils/block-context.d.ts +35 -0
- package/lib/types/tools/omp/utils/cpuprofile.d.ts +51 -0
- package/lib/types/tools/omp/utils/edit-mode.d.ts +13 -0
- package/lib/types/tools/omp/utils/file-display-mode.d.ts +27 -0
- package/lib/types/tools/omp/utils/image-loading.d.ts +51 -0
- package/lib/types/tools/omp/utils/image-resize.d.ts +42 -0
- package/lib/types/tools/omp/utils/lang-from-path.d.ts +9 -0
- package/lib/types/tools/omp/utils/markit-cache.d.ts +23 -0
- package/lib/types/tools/omp/utils/markit.d.ts +30 -0
- package/lib/types/tools/omp/utils/profile-tree.d.ts +47 -0
- package/lib/types/tools/omp/utils/sample-profile.d.ts +67 -0
- package/lib/types/tools/omp/utils/sixel.d.ts +21 -0
- package/lib/types/tools/omp/utils/tools-manager.d.ts +11 -0
- package/lib/types/tools/omp/utils/turndown.d.ts +15 -0
- package/lib/types/tools/omp/utils/zip.d.ts +129 -0
- package/lib/types/tools/omp/web/browser-render.d.ts +50 -0
- package/lib/types/tools/omp/web/parallel.d.ts +68 -0
- package/lib/types/tools/omp/web/scrapers/artifacthub.d.ts +6 -0
- package/lib/types/tools/omp/web/scrapers/arxiv.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/aur.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/biorxiv.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/bluesky.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/brew.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/cheatsh.d.ts +8 -0
- package/lib/types/tools/omp/web/scrapers/chocolatey.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/choosealicense.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/cisa-kev.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/clojars.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/coingecko.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/crates-io.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/crossref.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/devto.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/discogs.d.ts +8 -0
- package/lib/types/tools/omp/web/scrapers/discourse.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/dockerhub.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/docs-rs.d.ts +9 -0
- package/lib/types/tools/omp/web/scrapers/fdroid.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/firefox-addons.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/flathub.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/github-gist.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/github.d.ts +34 -0
- package/lib/types/tools/omp/web/scrapers/gitlab.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/go-pkg.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/hackage.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/hackernews.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/hex.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/huggingface.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/iacr.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/index.d.ts +84 -0
- package/lib/types/tools/omp/web/scrapers/jetbrains-marketplace.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/lemmy.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/lobsters.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/mastodon.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/maven.d.ts +6 -0
- package/lib/types/tools/omp/web/scrapers/mdn.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/metacpan.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/musicbrainz.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/npm.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/nuget.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/nvd.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/ollama.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/open-vsx.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/opencorporates.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/openlibrary.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/orcid.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/osv.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/packagist.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/pub-dev.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/pubmed.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/pypi.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/rawg.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/readthedocs.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/reddit.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/repology.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/rfc.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/rubygems.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/searchcode.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/sec-edgar.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/semantic-scholar.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/snapcraft.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/sourcegraph.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/spdx.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/spotify.d.ts +8 -0
- package/lib/types/tools/omp/web/scrapers/stackoverflow.d.ts +6 -0
- package/lib/types/tools/omp/web/scrapers/terraform.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/tldr.d.ts +7 -0
- package/lib/types/tools/omp/web/scrapers/twitter.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/types.d.ts +90 -0
- package/lib/types/tools/omp/web/scrapers/utils.d.ts +26 -0
- package/lib/types/tools/omp/web/scrapers/vimeo.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/vscode-marketplace.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/w3c.d.ts +2 -0
- package/lib/types/tools/omp/web/scrapers/wikidata.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/wikipedia.d.ts +5 -0
- package/lib/types/tools/omp/web/scrapers/youtube.d.ts +5 -0
- package/lib/types/tools/omp/web/search/providers/utils.d.ts +49 -0
- package/lib/types/tools/omp/web/search/types.d.ts +501 -0
- package/lib/types/tools/omp/web/search/utils.d.ts +4 -0
- package/lib/types/tools/omp/workspace-tree.d.ts +42 -0
- package/lib/types/tools/read/adapter/index.d.ts +49 -0
- package/lib/types/tools/read/adapter/internal-urls/artifact-protocol.d.ts +15 -0
- package/lib/types/tools/read/adapter/internal-urls/registry-helpers.d.ts +44 -0
- package/lib/types/tools/read/adapter/registry/agent-registry.d.ts +29 -0
- package/lib/types/tools/shared/auto-generated-guard.dsh.d.ts +16 -0
- package/lib/types/tools/shared/browser-detect.d.ts +54 -0
- package/lib/types/tools/shared/browser-rpc-channel.d.ts +40 -0
- package/lib/types/tools/shared/bun-ffi-shim.d.ts +13 -0
- package/lib/types/tools/shared/bun-named-shim.d.ts +42 -0
- package/lib/types/tools/shared/bun-shim.d.ts +138 -0
- package/lib/types/tools/shared/bun-sqlite-shim.d.ts +49 -0
- package/lib/types/tools/shared/fs-promises-shim.d.ts +15 -0
- package/lib/types/tools/shared/image-bridge.d.ts +98 -0
- package/lib/types/tools/shared/omp-prompt.d.ts +47 -0
- package/lib/types/tools/shared/sandbox-policy.d.ts +38 -0
- package/lib/types/tools/shared/session-state.d.ts +51 -0
- package/lib/types/tools/shared/tool-errors.d.ts +33 -0
- package/lib/types/tools/shared/win-path-fixes.d.ts +16 -0
- package/lib/types/tools/write/adapter/index.d.ts +31 -0
- package/lib/{types-DX_bvuus.mjs → types-PVueGi9S.mjs} +2 -2
- package/lib/{utils-C-dSORPa.mjs → utils-B7A3Eu4L.mjs} +2364 -2676
- package/lib/{utils-Cp2Mxf_U.mjs → utils-CUPhpw9A.mjs} +413 -134
- package/lib/{utils-CQHPEQ3W.mjs → utils-DeWqNWV8.mjs} +2 -2
- package/lib/{vision-guard-mBmtAHx0.mjs → vision-guard-_XwsL1DF.mjs} +14 -29
- package/lib/xai-oauth-CXhnz0gO.mjs +210 -0
- package/lib/{xiaomi-7mE345KX.mjs → xiaomi-psoUItal.mjs} +8 -37
- package/lib/{zai-CeNpMV3W.mjs → zai-ApJ8HBgT.mjs} +8 -71
- package/lib/{zip-BK7UHCwX.mjs → zip-Kd602XNe.mjs} +1 -1
- package/package.json +12 -12
- package/presets/package.json +1 -1
- package/presets/tool-plus-ptc/agent.cordis.yml +1 -1
- package/presets/tool-plus-standard/agent.cordis.yml +1 -1
- package/scripts/patch-pi-natives.mjs +108 -108
- package/lib/agent_pb-Rizyt9Zg.mjs +0 -805
- package/lib/anthropic-CDmj476p.mjs +0 -262
- package/lib/api_server_pb-CDZgLMta.mjs +0 -252
- package/lib/callback-server-CFJK-jvK.mjs +0 -398
- package/lib/codex-P1dGpX7G.mjs +0 -54
- package/lib/device-code-CuXTWYwY.mjs +0 -51
- package/lib/devin-BcQwht1W.mjs +0 -114
- package/lib/devin-BvMfGevz.mjs +0 -95
- package/lib/github-copilot-B3kQl0g0.mjs +0 -104
- package/lib/gitlab-duo-BriUTP8k.mjs +0 -155
- package/lib/gitlab-duo-workflow-wK5Ljzmc.mjs +0 -91
- package/lib/google-CE5tFDod.mjs +0 -30
- package/lib/google-antigravity-C1jgNljz.mjs +0 -198
- package/lib/google-oauth-shared-BLVTvokk.mjs +0 -147
- package/lib/grammar-D-NqNUxQ.mjs +0 -49
- package/lib/identity-HNO1Oe9B.mjs +0 -219
- package/lib/kimi-DgcUpPtK.mjs +0 -236
- package/lib/markit-DtGoRE6M.mjs +0 -1417
- package/lib/minimax-code-Y3h5li9N.mjs +0 -53
- package/lib/models-DRA2c_8U.mjs +0 -104660
- package/lib/opencode-BsVw9rCD.mjs +0 -38
- package/lib/to-binary-B1BEBIPC.mjs +0 -6002
- package/lib/wafer-BlhWLweO.mjs +0 -17
- package/lib/xai-oauth-5pORHUrg.mjs +0 -446
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format a single line of match output for grep/ast-grep style results.
|
|
3
|
+
*
|
|
4
|
+
* Matched lines are prefixed with `*`; context lines are prefixed with a single
|
|
5
|
+
* space so line numbers align in column. In hashline mode the line uses the
|
|
6
|
+
* editable `LINE:content` shape under a snapshot-tag header; in plain mode it
|
|
7
|
+
* keeps the legacy `LINE|content` display-only shape. Line numbers are never padded.
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatMatchLine(lineNumber: number, line: string, isMatch: boolean, options: {
|
|
10
|
+
useHashLines: boolean;
|
|
11
|
+
}): string;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured metadata for tool outputs.
|
|
3
|
+
*
|
|
4
|
+
* Tools populate details.meta using the fluent OutputMetaBuilder.
|
|
5
|
+
* DSH adapters format notices themselves via formatOutputNotice; the OMP-side
|
|
6
|
+
* auto-wrap/spill machinery was cut with the TUI layer (plan.md 拍板#17).
|
|
7
|
+
*/
|
|
8
|
+
import { type Settings } from "../config/settings";
|
|
9
|
+
import type { OutputSummary, TruncationResult } from "../session/streaming-output";
|
|
10
|
+
/**
|
|
11
|
+
* Truncation metadata for the output notice.
|
|
12
|
+
*/
|
|
13
|
+
export interface TruncationMeta {
|
|
14
|
+
direction: "head" | "tail" | "middle";
|
|
15
|
+
truncatedBy: "lines" | "bytes" | "middle";
|
|
16
|
+
totalLines: number;
|
|
17
|
+
totalBytes: number;
|
|
18
|
+
outputLines: number;
|
|
19
|
+
outputBytes: number;
|
|
20
|
+
maxBytes?: number;
|
|
21
|
+
/** Line range shown (1-indexed, inclusive). Omitted for middle elision. */
|
|
22
|
+
shownRange?: {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
};
|
|
26
|
+
/** Head/tail line ranges shown when direction === "middle". */
|
|
27
|
+
headRange?: {
|
|
28
|
+
start: number;
|
|
29
|
+
end: number;
|
|
30
|
+
};
|
|
31
|
+
tailRange?: {
|
|
32
|
+
start: number;
|
|
33
|
+
end: number;
|
|
34
|
+
};
|
|
35
|
+
/** Bytes elided from the middle. */
|
|
36
|
+
elidedBytes?: number;
|
|
37
|
+
/** Lines elided from the middle. */
|
|
38
|
+
elidedLines?: number;
|
|
39
|
+
/** Artifact ID if full output was saved */
|
|
40
|
+
artifactId?: string;
|
|
41
|
+
/** Next offset for pagination (head truncation only) */
|
|
42
|
+
nextOffset?: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Source resolution info for the output.
|
|
46
|
+
*/
|
|
47
|
+
export type SourceMeta = {
|
|
48
|
+
type: "path";
|
|
49
|
+
value: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: "url";
|
|
52
|
+
value: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: "internal";
|
|
55
|
+
value: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Limit-specific notices.
|
|
59
|
+
*/
|
|
60
|
+
export interface LimitsMeta {
|
|
61
|
+
matchLimit?: {
|
|
62
|
+
reached: number;
|
|
63
|
+
suggestion: number;
|
|
64
|
+
};
|
|
65
|
+
resultLimit?: {
|
|
66
|
+
reached: number;
|
|
67
|
+
suggestion: number;
|
|
68
|
+
};
|
|
69
|
+
headLimit?: {
|
|
70
|
+
reached: number;
|
|
71
|
+
suggestion: number;
|
|
72
|
+
};
|
|
73
|
+
columnTruncated?: {
|
|
74
|
+
maxColumn: number;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Structured metadata for tool outputs.
|
|
79
|
+
*/
|
|
80
|
+
export interface OutputMeta {
|
|
81
|
+
truncation?: TruncationMeta;
|
|
82
|
+
source?: SourceMeta;
|
|
83
|
+
limits?: LimitsMeta;
|
|
84
|
+
}
|
|
85
|
+
export interface TruncationOptions {
|
|
86
|
+
direction: "head" | "tail" | "middle";
|
|
87
|
+
startLine?: number;
|
|
88
|
+
totalFileLines?: number;
|
|
89
|
+
artifactId?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface TruncationSummaryOptions {
|
|
92
|
+
direction: "head" | "tail" | "middle";
|
|
93
|
+
startLine?: number;
|
|
94
|
+
totalFileLines?: number;
|
|
95
|
+
}
|
|
96
|
+
export interface TruncationTextOptions {
|
|
97
|
+
direction: "head" | "tail" | "middle";
|
|
98
|
+
totalLines?: number;
|
|
99
|
+
totalBytes?: number;
|
|
100
|
+
maxBytes?: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Fluent builder for OutputMeta.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* details.meta = outputMeta()
|
|
108
|
+
* .truncation(truncation, { direction: "head" })
|
|
109
|
+
* .matchLimit(limitReached ? effectiveLimit : 0)
|
|
110
|
+
* .columnTruncated(linesTruncated ? DEFAULT_MAX_COLUMN : 0)
|
|
111
|
+
* .get();
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare class OutputMetaBuilder {
|
|
115
|
+
#private;
|
|
116
|
+
/** Add truncation info from TruncationResult. No-op if not truncated. */
|
|
117
|
+
truncation(result: TruncationResult, options: TruncationOptions): this;
|
|
118
|
+
/** Add truncation info from OutputSummary. No-op if not truncated. */
|
|
119
|
+
truncationFromSummary(summary: OutputSummary, options: TruncationSummaryOptions): this;
|
|
120
|
+
/** Add truncation info from truncated output text. No-op if truncation not detected. */
|
|
121
|
+
truncationFromText(text: string, options: TruncationTextOptions): this;
|
|
122
|
+
/** Add match limit notice. No-op if reached <= 0. */
|
|
123
|
+
matchLimit(reached: number, suggestion?: number): this;
|
|
124
|
+
/** Add limit notices in one call. */
|
|
125
|
+
limits(limits: {
|
|
126
|
+
matchLimit?: number;
|
|
127
|
+
resultLimit?: number;
|
|
128
|
+
headLimit?: number;
|
|
129
|
+
columnMax?: number;
|
|
130
|
+
}): this;
|
|
131
|
+
/** Add result limit notice. No-op if reached <= 0. */
|
|
132
|
+
resultLimit(reached: number, suggestion?: number): this;
|
|
133
|
+
/** Add limit notice for head truncation. No-op if reached <= 0. */
|
|
134
|
+
headLimit(reached: number, suggestion?: number): this;
|
|
135
|
+
/** Add column truncation notice. No-op if maxColumn <= 0. */
|
|
136
|
+
columnTruncated(maxColumn: number): this;
|
|
137
|
+
/** Add source path info. */
|
|
138
|
+
sourcePath(value: string): this;
|
|
139
|
+
/** Add source URL info. */
|
|
140
|
+
sourceUrl(value: string): this;
|
|
141
|
+
/** Add internal URL source info (skill://, agent://, artifact://). */
|
|
142
|
+
sourceInternal(value: string): this;
|
|
143
|
+
/** Get the built OutputMeta, or undefined if empty. */
|
|
144
|
+
get(): OutputMeta | undefined;
|
|
145
|
+
}
|
|
146
|
+
/** Create a new OutputMetaBuilder. */
|
|
147
|
+
export declare function outputMeta(): OutputMetaBuilder;
|
|
148
|
+
export declare function formatFullOutputReference(artifactId: string): string;
|
|
149
|
+
export declare function formatTruncationMetaNotice(truncation: TruncationMeta): string;
|
|
150
|
+
/**
|
|
151
|
+
* Format notices from OutputMeta for LLM consumption.
|
|
152
|
+
* Returns empty string if no notices needed.
|
|
153
|
+
*/
|
|
154
|
+
export declare function formatOutputNotice(meta: OutputMeta | undefined): string;
|
|
155
|
+
/**
|
|
156
|
+
* Resolve the per-line column cap from session settings. Shared by streaming
|
|
157
|
+
* executors (bash/python/ssh/eval via OutputSink) and the `read` tool's
|
|
158
|
+
* line-buffer post-processing, so one setting controls both surfaces.
|
|
159
|
+
*/
|
|
160
|
+
export declare function resolveOutputMaxColumns(s: Settings | undefined): number;
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import type { Skill } from "../extensibility/skills";
|
|
2
|
+
import { type LocalProtocolOptions } from "../internal-urls";
|
|
3
|
+
export declare function expandTilde(filePath: string, home?: string): string;
|
|
4
|
+
export declare function expandPath(filePath: string): string;
|
|
5
|
+
export declare function normalizeWindowsDriveAliasPath(filePath: string, platform?: NodeJS.Platform): string;
|
|
6
|
+
/**
|
|
7
|
+
* Inclusive line range describing one selector segment (e.g. `50-100`,
|
|
8
|
+
* `301-`, or `50+10`). `endLine` is `undefined` for open-ended ranges.
|
|
9
|
+
*/
|
|
10
|
+
export interface LineRange {
|
|
11
|
+
startLine: number;
|
|
12
|
+
endLine: number | undefined;
|
|
13
|
+
}
|
|
14
|
+
/** Parse a single `N`, `N-M`, `N-`, `N+K`, or `..`-aliased (`N..M`, `N..`) chunk. Throws via {@link ToolError} on invalid bounds. */
|
|
15
|
+
export declare function parseLineRangeChunk(sel: string): LineRange | null;
|
|
16
|
+
/**
|
|
17
|
+
* Parse a comma-separated list of line ranges (e.g. `5-16,960-973`). Returns
|
|
18
|
+
* the ranges in ascending order with overlapping/adjacent ranges merged so
|
|
19
|
+
* downstream consumers can stream the file in a single forward pass per range.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseLineRanges(sel: string): [LineRange, ...LineRange[]] | null;
|
|
22
|
+
/**
|
|
23
|
+
* Extract the line-range component from a read-tool selector that may also
|
|
24
|
+
* carry a verbatim/index display mode (`raw`, `conflicts`) — alone or compounded
|
|
25
|
+
* with a range (`raw:50-100`, `50-100:raw`). Returns the parsed ranges when the
|
|
26
|
+
* selector names any, otherwise `undefined` (pure `raw`/`conflicts`/none).
|
|
27
|
+
*
|
|
28
|
+
* Used by content search, which honors line ranges as a match filter but has no
|
|
29
|
+
* use for verbatim/conflict display modes — so those selectors are accepted and
|
|
30
|
+
* treated as an unfiltered, whole-resource search rather than rejected.
|
|
31
|
+
*/
|
|
32
|
+
export declare function selectorLineRanges(sel: string | undefined): [LineRange, ...LineRange[]] | undefined;
|
|
33
|
+
/** Return `true` when `lineNumber` (1-indexed) falls in any of the supplied ranges. */
|
|
34
|
+
export declare function isLineInRanges(lineNumber: number, ranges: readonly LineRange[]): boolean;
|
|
35
|
+
export declare function splitPathAndSel(rawPath: string): {
|
|
36
|
+
path: string;
|
|
37
|
+
sel?: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Three-way probe for whether the exact filesystem entry named by `filePath`
|
|
41
|
+
* exists. `stat` (used earlier) failed for reasons other than "no such file"
|
|
42
|
+
* (dangling symlink, `EACCES` on a parent, transient I/O), and each of those
|
|
43
|
+
* silently reinterpreted a real literal path such as `test:1-2` as `test`
|
|
44
|
+
* plus selector `1-2` (issue #4618). `lstat` inspects the entry itself, so a
|
|
45
|
+
* dangling symlink is still detected as present; ambiguous errors resolve to
|
|
46
|
+
* `"unknown"` so callers keep the raw path instead of guessing.
|
|
47
|
+
*
|
|
48
|
+
* `ENAMETOOLONG` resolves to `"missing"` rather than `"unknown"`: a path whose
|
|
49
|
+
* component or whole length exceeds the OS limit can never name a real single
|
|
50
|
+
* entry, so it is strictly stronger evidence of non-existence than `ENOENT`.
|
|
51
|
+
* Without this, a semicolon-joined `path` list long enough to trip the limit
|
|
52
|
+
* (bare filenames past `NAME_MAX`, or a total past `PATH_MAX`) was read as one
|
|
53
|
+
* literal path and the delimited split was suppressed (issue #7597).
|
|
54
|
+
*/
|
|
55
|
+
export declare function probeLiteralPathExists(filePath: string, cwd: string): Promise<"exists" | "missing" | "unknown">;
|
|
56
|
+
/**
|
|
57
|
+
* Async sibling of {@link splitPathAndSel} that prefers a literal filesystem
|
|
58
|
+
* path over selector interpretation. Filenames whose tail matches the selector
|
|
59
|
+
* grammar (e.g. `test:1-2`, `log:raw`) are legal on POSIX; without this the
|
|
60
|
+
* strict splitter peels the tail and both `read` and `grep` refuse to open the
|
|
61
|
+
* real file (issue #4618). The literal wins on a confirmed `lstat`, and also
|
|
62
|
+
* on `"unknown"` (`EACCES` on a parent, transient I/O), so an unreachable
|
|
63
|
+
* literal is never silently reinterpreted as `path + selector`. Only a
|
|
64
|
+
* definitive `ENOENT`/`ENOTDIR` falls back to the strict split.
|
|
65
|
+
*/
|
|
66
|
+
export declare function splitPathAndSelPreferringLiteral(rawPath: string, cwd: string): Promise<{
|
|
67
|
+
path: string;
|
|
68
|
+
sel?: string;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Variant of {@link splitPathAndSel} for internal URLs (`scheme://...`).
|
|
72
|
+
*
|
|
73
|
+
* The filesystem-path splitter is intentionally conservative: it refuses to
|
|
74
|
+
* peel a trailing `:<chunk>` unless that chunk matches the strict selector
|
|
75
|
+
* grammar. That rule is right for filesystem paths (a file named `a:1-50` is
|
|
76
|
+
* legal) but wrong for internal URLs, where any trailing `:<chunk>` after the
|
|
77
|
+
* scheme is unambiguously a read-tool selector — even if malformed (e.g.
|
|
78
|
+
* `artifact://3:raw:-100`).
|
|
79
|
+
*
|
|
80
|
+
* This function iteratively peels selector-shaped chunks (well-formed plus
|
|
81
|
+
* common malformed shapes like `:-N`) so the rest of the read tool can pass a
|
|
82
|
+
* clean URL to the protocol handler and surface selector errors via parseSel
|
|
83
|
+
* instead of as misleading "host invalid" errors from the handler. Schemes
|
|
84
|
+
* whose resource URIs may legitimately contain colons (`mcp://`) are skipped.
|
|
85
|
+
*
|
|
86
|
+
* Falls back to the input unchanged when nothing matches.
|
|
87
|
+
*/
|
|
88
|
+
export declare function splitInternalUrlSel(rawPath: string): {
|
|
89
|
+
path: string;
|
|
90
|
+
sel?: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Peel a read-tool selector off an internal-URL write target so `write` resolves
|
|
94
|
+
* the same file `read` does (e.g. `ssh://h/f:raw` -> `ssh://h/f`). Only the
|
|
95
|
+
* whole-file display modes `raw`/`conflicts` are accepted (they do not change
|
|
96
|
+
* which bytes are written); any other selector-shaped tail `splitInternalUrlSel`
|
|
97
|
+
* peels — a line range, a compound like `raw:1-20`, or a malformed `:-N` — throws,
|
|
98
|
+
* because `write` addresses a whole file, not a partial range, and silently
|
|
99
|
+
* stripping it would write to a path the caller never named. Non-URL paths and
|
|
100
|
+
* URLs without a selector pass through unchanged.
|
|
101
|
+
*/
|
|
102
|
+
export declare function peelWriteUrlSelector(rawPath: string): string;
|
|
103
|
+
export declare function normalizeLocalScheme(filePath: string): string;
|
|
104
|
+
export declare function isInternalUrlPath(filePath: string): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* True when a tool path argument references the `ssh://` scheme anywhere.
|
|
107
|
+
*
|
|
108
|
+
* Substring (not anchored) on purpose: it feeds the read/search/write approval
|
|
109
|
+
* tier, which runs synchronously on the raw args. `search` only flattens a
|
|
110
|
+
* delimited `paths: "a,ssh://h/x"` into separate entries *after* approval, so an
|
|
111
|
+
* anchored check would let an embedded `ssh://` slip through at the read tier.
|
|
112
|
+
* Matching the literal `ssh://` substring also tracks exactly what routes to the
|
|
113
|
+
* SSH handler; over-matching only over-prompts (fail-closed).
|
|
114
|
+
*/
|
|
115
|
+
export declare function pathTargetsSsh(path: string): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* True when a path is specifically an `ssh://` URL (anchored scheme match).
|
|
118
|
+
* Unlike {@link pathTargetsSsh} (substring, for the pre-expansion approval
|
|
119
|
+
* scan), this is the exact per-entry check used to reject `ssh://` *before* a
|
|
120
|
+
* side-effecting `InternalUrlRouter.resolve` in tools that need a local file.
|
|
121
|
+
*/
|
|
122
|
+
export declare function isSshUrl(path: string): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* True when the read tool's URL parser (`parseReadUrlTarget` in fetch.ts) would
|
|
125
|
+
* recognize this path as a readable external URL: a strict `http(s)://`, a
|
|
126
|
+
* collapsed `http(s):/host` (Node path normalization folds `//` → `/`), or a
|
|
127
|
+
* scheme-less `www.` spelling. Keep in sync with `parseReadUrlTarget`.
|
|
128
|
+
*/
|
|
129
|
+
export declare function isReadableUrlPath(value: string): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Resolve a path relative to the given cwd.
|
|
132
|
+
* Handles ~ expansion and absolute paths.
|
|
133
|
+
*
|
|
134
|
+
* A bare root slash is treated as a workspace-root alias for tool inputs. Users
|
|
135
|
+
* often pass `/` to mean “search from here”, and letting tools escape to the
|
|
136
|
+
* filesystem root is almost never what they intended.
|
|
137
|
+
*/
|
|
138
|
+
export declare function resolveToCwd(filePath: string, cwd: string): string;
|
|
139
|
+
/**
|
|
140
|
+
* Resolve a path that MUST stay inside `cwd`, or `null` when it would escape.
|
|
141
|
+
*
|
|
142
|
+
* {@link resolveToCwd} deliberately honors absolute paths, `~`, and `..` —
|
|
143
|
+
* correct for a path a user typed, wrong for one a remote peer supplied.
|
|
144
|
+
* Callers handling untrusted input (Cursor's `download_path`) use this instead:
|
|
145
|
+
* only a non-empty relative path landing under the live cwd is accepted, so
|
|
146
|
+
* neither `/etc/passwd` nor `../../escape` can be written through.
|
|
147
|
+
*
|
|
148
|
+
* The lexical check alone is not containment: a symlink inside the workspace
|
|
149
|
+
* can point anywhere, so `out/config` under a `ws/out -> /elsewhere` link is
|
|
150
|
+
* relative, `..`-free, and still writes outside. Both the target and its
|
|
151
|
+
* deepest existing ancestor are therefore realpath-resolved — the ancestor
|
|
152
|
+
* because a download names a file that does not exist yet, so the link in its
|
|
153
|
+
* path is the only thing that can be resolved before the write.
|
|
154
|
+
*
|
|
155
|
+
* The cwd itself is rejected: a download names a file, never the directory.
|
|
156
|
+
*/
|
|
157
|
+
export declare function confineToWorkspace(filePath: string, cwd: string): string | null;
|
|
158
|
+
export declare function formatPathRelativeToCwd(filePath: string, cwd: string, options?: {
|
|
159
|
+
trailingSlash?: boolean;
|
|
160
|
+
}): string;
|
|
161
|
+
/**
|
|
162
|
+
* Strip matching surrounding double quotes from a path string.
|
|
163
|
+
* Common when users paste quoted paths from Windows Explorer or shell copy-paste.
|
|
164
|
+
* Only double quotes — single quotes are valid POSIX filename characters.
|
|
165
|
+
* Tradeoff: a POSIX path literally starting AND ending with " would also be unquoted.
|
|
166
|
+
* Accepted because such names are virtually nonexistent in practice.
|
|
167
|
+
*/
|
|
168
|
+
export declare function stripOuterDoubleQuotes(input: string): string;
|
|
169
|
+
export declare function normalizePathLikeInput(input: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* Normalize a path argument that may arrive as a single string, a JSON-encoded
|
|
172
|
+
* string array (`'["a.ts"]'`), or an actual array into a flat `string[]`.
|
|
173
|
+
* Delimited single strings (`"a.ts b.ts"`) are left for
|
|
174
|
+
* {@link expandDelimitedPathEntries} to split.
|
|
175
|
+
*/
|
|
176
|
+
export declare function toPathList(input: string | string[] | undefined): string[];
|
|
177
|
+
export declare function hasGlobPathChars(filePath: string): boolean;
|
|
178
|
+
type PathEntrySplitter = (item: string) => {
|
|
179
|
+
basePath: string;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Split one path-like entry whose multiple targets were flattened into one
|
|
183
|
+
* string. Existing paths are kept intact, so real filenames containing spaces,
|
|
184
|
+
* commas, or semicolons win over delimiter recovery.
|
|
185
|
+
*/
|
|
186
|
+
export declare function splitDelimitedPathEntry(entry: string, cwd: string, options?: {
|
|
187
|
+
splitter?: PathEntrySplitter;
|
|
188
|
+
routedUrlPredicate?: (entry: string) => boolean;
|
|
189
|
+
}): Promise<string[] | null>;
|
|
190
|
+
/** Expand delimited entries in-place while preserving unsplit entries. */
|
|
191
|
+
export declare function expandDelimitedPathEntries(entries: readonly string[], cwd: string, options?: {
|
|
192
|
+
splitter?: PathEntrySplitter;
|
|
193
|
+
}): Promise<string[]>;
|
|
194
|
+
export interface ParsedSearchPath {
|
|
195
|
+
basePath: string;
|
|
196
|
+
glob?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface ParsedFindPattern {
|
|
199
|
+
basePath: string;
|
|
200
|
+
globPattern: string;
|
|
201
|
+
hasGlob: boolean;
|
|
202
|
+
}
|
|
203
|
+
export interface ResolvedSearchTarget {
|
|
204
|
+
basePath: string;
|
|
205
|
+
glob?: string;
|
|
206
|
+
}
|
|
207
|
+
export interface ResolvedMultiSearchPath {
|
|
208
|
+
basePath: string;
|
|
209
|
+
glob?: string;
|
|
210
|
+
scopePath: string;
|
|
211
|
+
exactFilePaths?: string[];
|
|
212
|
+
targets?: ResolvedSearchTarget[];
|
|
213
|
+
}
|
|
214
|
+
export interface ResolvedFindTarget {
|
|
215
|
+
basePath: string;
|
|
216
|
+
globPattern: string;
|
|
217
|
+
hasGlob: boolean;
|
|
218
|
+
}
|
|
219
|
+
export interface ResolvedMultiFindPattern {
|
|
220
|
+
targets: ResolvedFindTarget[];
|
|
221
|
+
scopePath: string;
|
|
222
|
+
}
|
|
223
|
+
export declare function parseSearchPath(filePath: string): ParsedSearchPath;
|
|
224
|
+
/**
|
|
225
|
+
* Async sibling of {@link parseSearchPath} that prefers literal interpretation
|
|
226
|
+
* when a path containing glob metacharacters resolves to an existing entry on
|
|
227
|
+
* disk. Disambiguates Next.js/SvelteKit routes like `apps/[id]/page.tsx` —
|
|
228
|
+
* without this, `[id]` is parsed as a glob character class and silently
|
|
229
|
+
* matches nothing.
|
|
230
|
+
*/
|
|
231
|
+
export declare function parseSearchPathPreferringLiteral(filePath: string, cwd: string): Promise<ParsedSearchPath>;
|
|
232
|
+
export declare function parseFindPattern(pattern: string): ParsedFindPattern;
|
|
233
|
+
export declare function combineSearchGlobs(prefixGlob?: string, suffixGlob?: string): string | undefined;
|
|
234
|
+
export declare function resolveExplicitSearchPaths(pathItems: string[], cwd: string, suffixGlob?: string, fanOutFileItems?: boolean): Promise<ResolvedMultiSearchPath | undefined>;
|
|
235
|
+
export declare function resolveExplicitFindPatterns(patternItems: string[], cwd: string): Promise<ResolvedMultiFindPattern | undefined>;
|
|
236
|
+
/**
|
|
237
|
+
* Result of partitioning a list of user-supplied paths/globs into entries whose
|
|
238
|
+
* base directory currently exists on disk versus those that do not.
|
|
239
|
+
*
|
|
240
|
+
* Used by multi-path tools (search, find, ast_grep, ast_edit) to tolerate one
|
|
241
|
+
* or more missing entries in a multi-path call: the surviving entries should
|
|
242
|
+
* still be searched, with the missing entries surfaced as a non-fatal warning.
|
|
243
|
+
*/
|
|
244
|
+
export interface PartitionedPaths {
|
|
245
|
+
/** Raw input strings whose resolved base path exists. */
|
|
246
|
+
valid: string[];
|
|
247
|
+
/** Raw input strings whose resolved base path is missing (ENOENT). */
|
|
248
|
+
missing: string[];
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Stat each input's base path concurrently; return entries split by existence.
|
|
252
|
+
*
|
|
253
|
+
* `splitter` is expected to be {@link parseFindPattern} or
|
|
254
|
+
* {@link parseSearchPath}: both return a `basePath` field that this helper
|
|
255
|
+
* resolves against `cwd` and stats. ENOENT is the only swallowed error — every
|
|
256
|
+
* other stat failure (permission, IO, etc.) propagates so callers do not silently
|
|
257
|
+
* skip paths that exist but are unreadable.
|
|
258
|
+
*
|
|
259
|
+
* Order of `valid` and `missing` follows the input order, so callers can rely
|
|
260
|
+
* on `valid[0]` matching the first surviving user-supplied entry.
|
|
261
|
+
*/
|
|
262
|
+
export declare function partitionExistingPaths(items: string[], cwd: string, splitter: (item: string) => {
|
|
263
|
+
basePath: string;
|
|
264
|
+
}): Promise<PartitionedPaths>;
|
|
265
|
+
export declare function resolveReadPath(filePath: string, cwd: string): string;
|
|
266
|
+
/**
|
|
267
|
+
* Find a unique workspace entry whose trailing path matches a missing authored path.
|
|
268
|
+
* Returns `null` for no match, ambiguity, timeout, or scan failure.
|
|
269
|
+
*/
|
|
270
|
+
export declare function findUniqueWorkspaceSuffix(rawPath: string, cwd: string, signal?: AbortSignal): Promise<{
|
|
271
|
+
absolutePath: string;
|
|
272
|
+
displayPath: string;
|
|
273
|
+
} | null>;
|
|
274
|
+
/** Local file materialized from a readable external URL for shared tool-scope resolution. */
|
|
275
|
+
export interface ResolvedExternalSearchUrl {
|
|
276
|
+
/** Absolute or cwd-relative file path to search. */
|
|
277
|
+
sourcePath: string;
|
|
278
|
+
/** True when the materialized file must not mint editable anchors. */
|
|
279
|
+
immutable?: boolean;
|
|
280
|
+
}
|
|
281
|
+
export interface ToolScopeOptions {
|
|
282
|
+
rawPaths: string[];
|
|
283
|
+
cwd: string;
|
|
284
|
+
/** Verb used in the "Cannot {action} internal URL without a backing file: …" message. */
|
|
285
|
+
internalUrlAction: string;
|
|
286
|
+
/** Collect absolute paths flagged immutable by their internal-URL handler. */
|
|
287
|
+
trackImmutableSources?: boolean;
|
|
288
|
+
/** Honor `exactFilePaths` from {@link resolveExplicitSearchPaths} (search-only). */
|
|
289
|
+
surfaceExactFilePaths?: boolean;
|
|
290
|
+
/** Fan plain-file entries out into per-target scans instead of folding them
|
|
291
|
+
* into a directory walk's glob union (search-only: the caller must dedupe
|
|
292
|
+
* matches from overlapping targets). */
|
|
293
|
+
fanOutFileTargets?: boolean;
|
|
294
|
+
/** Extra hint appended to "Path not found" when stat fails and the user supplied multiple paths. */
|
|
295
|
+
multipathStatHint?: string;
|
|
296
|
+
/** Calling session's settings — forwarded to the internal-URL router so caller-aware handlers (issue://, pr://) honor it. */
|
|
297
|
+
settings?: unknown;
|
|
298
|
+
/** Caller's abort signal — forwarded to the internal-URL router. */
|
|
299
|
+
signal?: AbortSignal;
|
|
300
|
+
/** Calling session's `local://` root mapping — pins resolutions to the calling session. */
|
|
301
|
+
localProtocolOptions?: LocalProtocolOptions;
|
|
302
|
+
/** Calling session's loaded skills — lets skill:// resolve without process-global state. */
|
|
303
|
+
skills?: readonly Skill[];
|
|
304
|
+
/** Materialize readable external URLs to local text files before scope derivation. */
|
|
305
|
+
resolveExternalUrl?: (rawPath: string) => Promise<ResolvedExternalSearchUrl | undefined>;
|
|
306
|
+
}
|
|
307
|
+
export interface ToolScopeResolution {
|
|
308
|
+
searchPath: string;
|
|
309
|
+
scopePath: string;
|
|
310
|
+
globFilter: string | undefined;
|
|
311
|
+
isDirectory: boolean;
|
|
312
|
+
multiTargets?: ResolvedSearchTarget[];
|
|
313
|
+
exactFilePaths?: string[];
|
|
314
|
+
missingPaths: string[];
|
|
315
|
+
immutableSourcePaths: Set<string>;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Shared path-input pipeline for `search`, `ast_grep`, and `ast_edit`:
|
|
319
|
+
* 1. normalize + reject empty paths,
|
|
320
|
+
* 2. resolve internal URLs through {@link InternalUrlRouter} to backing files,
|
|
321
|
+
* 3. partition existing vs missing when multiple paths are supplied,
|
|
322
|
+
* 4. derive a single search base path / glob, or a multi-target list,
|
|
323
|
+
* 5. stat the resolved base path so callers can branch on directory vs file scope.
|
|
324
|
+
*/
|
|
325
|
+
export declare function resolveToolSearchScope(opts: ToolScopeOptions): Promise<ToolScopeResolution>;
|
|
326
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ToolSession } from "../../omp/tools/index.ts";
|
|
2
|
+
/** Strip the hashline `[path#TAG]` wrapper from a write/edit target so the inner
|
|
3
|
+
* filesystem path drives both authorization and resolution. Only unwraps inputs
|
|
4
|
+
* that match the strict hashline header shape (`[path]` or `[path#XXXX]` with a
|
|
5
|
+
* 4-hex tag); anything else returns the original string so the downstream
|
|
6
|
+
* resolver surfaces the real error. Exported for callers (e.g. `write`) that
|
|
7
|
+
* make scheme/bridge-routing decisions before {@link resolvePlanPath} runs. */
|
|
8
|
+
export declare function unwrapHashlineHeaderPath(targetPath: string): string;
|
|
9
|
+
/** True when `targetPath` resolves into the session-local artifact sandbox.
|
|
10
|
+
* Routes through {@link resolvePlanPath} so the guard and the eventual write
|
|
11
|
+
* always agree on the absolute target (including bracketed hashline headers,
|
|
12
|
+
* `local://` URLs, and bare absolute paths). Files inside the sandbox are not
|
|
13
|
+
* part of the working tree, so plan mode treats them as freely writable
|
|
14
|
+
* scratch/plan space — and tag-based path recovery may rebind onto them. */
|
|
15
|
+
export declare function targetsLocalSandbox(session: ToolSession, targetPath: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a write/edit target to its absolute filesystem path, honoring the
|
|
18
|
+
* `local://` and `vault://` schemes. Plain paths resolve against the session cwd.
|
|
19
|
+
* Bracketed hashline headers (`[path#TAG]`) are unwrapped first so the inner
|
|
20
|
+
* filesystem path drives resolution — keeping the plan-mode guard and the
|
|
21
|
+
* eventual write in lockstep.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolvePlanPath(session: ToolSession, targetPath: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Plan mode keeps the working tree read-only while letting the agent draft its
|
|
26
|
+
* plan. Writes and edits to the `local://` artifact sandbox are allowed (that is
|
|
27
|
+
* where the plan and any scratch notes live); anything that would touch the
|
|
28
|
+
* working tree — or rename/delete a file — is rejected.
|
|
29
|
+
*/
|
|
30
|
+
export declare function enforcePlanModeWrite(session: ToolSession, targetPath: string, options?: {
|
|
31
|
+
move?: string;
|
|
32
|
+
op?: "create" | "update" | "delete";
|
|
33
|
+
}): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import type { ToolSession } from "../../omp/sdk.ts";
|
|
3
|
+
import type { ReadToolDetails } from "./read";
|
|
4
|
+
import { type SuffixMatchCache } from "./read-path-resolution";
|
|
5
|
+
import { type ParsedSelector } from "./read-selector";
|
|
6
|
+
interface ResolvedArchiveReadPath {
|
|
7
|
+
absolutePath: string;
|
|
8
|
+
archiveSubPath: string;
|
|
9
|
+
suffixResolution?: {
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function resolveArchiveReadPath(session: ToolSession, readPath: string, suffixCache: SuffixMatchCache, signal?: AbortSignal): Promise<ResolvedArchiveReadPath | null>;
|
|
15
|
+
export declare function readArchive(session: ToolSession, readPath: string, parsedSel: ParsedSelector, resolvedArchivePath: ResolvedArchiveReadPath, signal?: AbortSignal): Promise<AgentToolResult<ReadToolDetails>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import type { ToolSession } from "../../omp/sdk.ts";
|
|
3
|
+
import { type LineEntry } from "../../omp/utils/block-context.ts";
|
|
4
|
+
import { type LineRange } from "../../omp/tools/path-utils.ts";
|
|
5
|
+
import type { ReadToolDetails } from "./read";
|
|
6
|
+
export interface HashlineHeaderContext {
|
|
7
|
+
header: string;
|
|
8
|
+
tag: string;
|
|
9
|
+
fullText?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function formatReadHashlineHeader(displayPath: string, tag: string): string;
|
|
12
|
+
export declare function readHashlineHeaderContext(session: ToolSession, absolutePath: string, cwd: string): Promise<HashlineHeaderContext>;
|
|
13
|
+
export declare function hashlineHeaderContext(displayPath: string, tag: string): HashlineHeaderContext;
|
|
14
|
+
export declare function prependHashlineHeader(text: string, context: HashlineHeaderContext | undefined): string;
|
|
15
|
+
export declare function formatTextWithMode(text: string, startNum: number, shouldAddHashLines: boolean, shouldAddLineNumbers: boolean): string;
|
|
16
|
+
export declare const BRACKET_CONTEXT_ELLIPSIS = "\u2026";
|
|
17
|
+
export declare function formatLineEntriesWithMode(entries: readonly LineEntry[], shouldAddHashLines: boolean, shouldAddLineNumbers: boolean): string;
|
|
18
|
+
/**
|
|
19
|
+
* Decide whether the kept lines surrounding an elided range collapse to a
|
|
20
|
+
* single brace-pair line in the rendered summary. Returns true when the head
|
|
21
|
+
* line ends with `{` / `(` / `[` and the tail line is the matching closer
|
|
22
|
+
* (optionally followed by terminating punctuation like `;`, `,`, or further
|
|
23
|
+
* closers — e.g. `};`, `})`, `]);`).
|
|
24
|
+
*/
|
|
25
|
+
export declare function canMergeBracePair(headLine: string, tailLine: string): boolean;
|
|
26
|
+
export declare function formatSingleLine(line: number, text: string, shouldAddHashLines: boolean, shouldAddLineNumbers: boolean): string;
|
|
27
|
+
export declare function formatMergedBraceLine(startLine: number, endLine: number, headText: string, tailText: string, shouldAddHashLines: boolean, shouldAddLineNumbers: boolean): {
|
|
28
|
+
model: string;
|
|
29
|
+
display: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function countTextLines(text: string): number;
|
|
32
|
+
export declare function contiguousLineNumbers(startLine: number, count: number): number[];
|
|
33
|
+
export declare function lineNumbersFromSpans(spans: readonly {
|
|
34
|
+
startLine: number;
|
|
35
|
+
endLine: number;
|
|
36
|
+
}[]): number[];
|
|
37
|
+
/** Inclusive line range describing one elided span in a structural summary. */
|
|
38
|
+
export interface ElidedRange {
|
|
39
|
+
start: number;
|
|
40
|
+
end: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Footer appended to summarized reads telling the model how to recover the
|
|
44
|
+
* elided body. Without this hint, agents either ignore the `…`/`{ … }`
|
|
45
|
+
* markers or burn a turn guessing the right selector (see issue #1046). The
|
|
46
|
+
* footer demonstrates the multi-range selector syntax with concrete sample
|
|
47
|
+
* ranges drawn from the actual elision so the model re-reads only what it
|
|
48
|
+
* needs instead of falling back to `:raw` or whole-file reads.
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatSummaryElisionFooter(readPath: string, elidedRanges: ReadonlyArray<ElidedRange>, elidedLines: number): string;
|
|
51
|
+
export declare const READ_CHUNK_SIZE: number;
|
|
52
|
+
/**
|
|
53
|
+
* Context lines added around an explicit range read. Anchor-stale failures
|
|
54
|
+
* cluster on edits whose anchors land just outside the most recent read
|
|
55
|
+
* window, but the data (`scripts/session-stats/analyze_selector_reads.py`)
|
|
56
|
+
* shows most follow-up reads are disjoint hops, not adjacent extensions —
|
|
57
|
+
* so symmetric padding rarely pays for itself.
|
|
58
|
+
*
|
|
59
|
+
* Leading=1 catches accidental single-line reads where the anchor is the
|
|
60
|
+
* line immediately above the requested start. Trailing=3 buffers the
|
|
61
|
+
* common case where the agent asks for a narrow range and then needs the
|
|
62
|
+
* next few lines to disambiguate an anchor.
|
|
63
|
+
*/
|
|
64
|
+
export declare const RANGE_LEADING_CONTEXT_LINES = 1;
|
|
65
|
+
export declare const RANGE_TRAILING_CONTEXT_LINES = 3;
|
|
66
|
+
export declare function buildInMemoryTextResult(session: ToolSession, text: string, offset: number | undefined, limit: number | undefined, options: {
|
|
67
|
+
details?: ReadToolDetails;
|
|
68
|
+
sourcePath?: string;
|
|
69
|
+
sourceUrl?: string;
|
|
70
|
+
sourceInternal?: string;
|
|
71
|
+
entityLabel: string;
|
|
72
|
+
ignoreResultLimits?: boolean;
|
|
73
|
+
raw?: boolean;
|
|
74
|
+
immutable?: boolean;
|
|
75
|
+
}): AgentToolResult<ReadToolDetails>;
|
|
76
|
+
/**
|
|
77
|
+
* Render a multi-range read against in-memory text. Each range emits a
|
|
78
|
+
* formatted block with its own anchors / line numbers, blocks are joined
|
|
79
|
+
* with an elision separator, and ranges past EOF surface as `[…]` notices
|
|
80
|
+
* so the model can correct the next call. No leading/trailing context is
|
|
81
|
+
* added — multi-range callers always specify exact bounds.
|
|
82
|
+
*/
|
|
83
|
+
export declare function buildInMemoryMultiRangeResult(session: ToolSession, text: string, ranges: readonly LineRange[], options: {
|
|
84
|
+
details?: ReadToolDetails;
|
|
85
|
+
sourcePath?: string;
|
|
86
|
+
sourceUrl?: string;
|
|
87
|
+
sourceInternal?: string;
|
|
88
|
+
entityLabel: string;
|
|
89
|
+
raw?: boolean;
|
|
90
|
+
immutable?: boolean;
|
|
91
|
+
}): AgentToolResult<ReadToolDetails>;
|
|
92
|
+
export declare function decodeUtf8Text(bytes: Uint8Array): string | null;
|
|
93
|
+
export declare function prependSuffixResolutionNotice(text: string, suffixResolution?: {
|
|
94
|
+
from: string;
|
|
95
|
+
to: string;
|
|
96
|
+
}): string;
|
|
97
|
+
/**
|
|
98
|
+
* Tag Markdown reads for the TUI's formatted preview, gated on the opt-in
|
|
99
|
+
* `read.renderMarkdown` setting. Off by default; when disabled, no local
|
|
100
|
+
* read is tagged `text/markdown`, so the renderer output is identical to
|
|
101
|
+
* the pre-setting behavior. Internal-URL reads keep their protocol-supplied
|
|
102
|
+
* `contentType` and render as Markdown regardless of the setting.
|
|
103
|
+
*/
|
|
104
|
+
export declare function markMarkdownContentType(session: ToolSession, details: ReadToolDetails, filePath: string): ReadToolDetails;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ToolSession } from "../../omp/sdk.ts";
|
|
2
|
+
export declare function isRemoteMountPath(absolutePath: string): boolean;
|
|
3
|
+
export declare function isNotFoundError(error: unknown): boolean;
|
|
4
|
+
/** Per-execute memo of suffix-glob lookups; `null` records a confirmed miss. */
|
|
5
|
+
export type SuffixMatchCache = Map<string, {
|
|
6
|
+
absolutePath: string;
|
|
7
|
+
displayPath: string;
|
|
8
|
+
} | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Memoized {@link findUniqueWorkspaceSuffix} for a single read call. A missing
|
|
11
|
+
* path with archive/sqlite extensions probes the workspace once per stage
|
|
12
|
+
* (archive candidates, sqlite candidates, plain path) — each glob carries a
|
|
13
|
+
* 5s timeout, so repeated lookups of the same string stack into a long
|
|
14
|
+
* stall before erroring. The cache collapses repeats within one execute().
|
|
15
|
+
*/
|
|
16
|
+
export declare function findSuffixMatchCached(session: ToolSession, cache: SuffixMatchCache, rawPath: string, signal?: AbortSignal): Promise<{
|
|
17
|
+
absolutePath: string;
|
|
18
|
+
displayPath: string;
|
|
19
|
+
} | null>;
|