@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,501 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web Search Types
|
|
3
|
+
*
|
|
4
|
+
* Unified types for web search responses across supported providers.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SEARCH_PROVIDER_OPTIONS: readonly [{
|
|
7
|
+
readonly value: "auto";
|
|
8
|
+
readonly label: "Auto";
|
|
9
|
+
readonly description: "Automatically uses the first configured web-search provider";
|
|
10
|
+
}, {
|
|
11
|
+
readonly value: "perplexity";
|
|
12
|
+
readonly label: "Perplexity";
|
|
13
|
+
readonly description: "Uses auth when configured; explicit selection falls back to anonymous search";
|
|
14
|
+
}, {
|
|
15
|
+
readonly value: "gemini";
|
|
16
|
+
readonly label: "Gemini";
|
|
17
|
+
readonly description: "Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)";
|
|
18
|
+
}, {
|
|
19
|
+
readonly value: "anthropic";
|
|
20
|
+
readonly label: "Anthropic";
|
|
21
|
+
readonly description: "Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)";
|
|
22
|
+
}, {
|
|
23
|
+
readonly value: "codex";
|
|
24
|
+
readonly label: "OpenAI";
|
|
25
|
+
readonly description: "OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: "xai";
|
|
28
|
+
readonly label: "xAI";
|
|
29
|
+
readonly description: "Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)";
|
|
30
|
+
}, {
|
|
31
|
+
readonly value: "zai";
|
|
32
|
+
readonly label: "Z.AI";
|
|
33
|
+
readonly description: "Calls Z.AI webSearchPrime MCP";
|
|
34
|
+
}, {
|
|
35
|
+
readonly value: "exa";
|
|
36
|
+
readonly label: "Exa";
|
|
37
|
+
readonly description: "API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP";
|
|
38
|
+
}, {
|
|
39
|
+
readonly value: "tinyfish";
|
|
40
|
+
readonly label: "TinyFish";
|
|
41
|
+
readonly description: "Requires TINYFISH_API_KEY";
|
|
42
|
+
}, {
|
|
43
|
+
readonly value: "jina";
|
|
44
|
+
readonly label: "Jina";
|
|
45
|
+
readonly description: "Requires JINA_API_KEY";
|
|
46
|
+
}, {
|
|
47
|
+
readonly value: "kagi";
|
|
48
|
+
readonly label: "Kagi";
|
|
49
|
+
readonly description: "Requires KAGI_API_KEY and Kagi Search API beta access";
|
|
50
|
+
}, {
|
|
51
|
+
readonly value: "tavily";
|
|
52
|
+
readonly label: "Tavily";
|
|
53
|
+
readonly description: "Requires TAVILY_API_KEY";
|
|
54
|
+
}, {
|
|
55
|
+
readonly value: "firecrawl";
|
|
56
|
+
readonly label: "Firecrawl";
|
|
57
|
+
readonly description: "Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode";
|
|
58
|
+
}, {
|
|
59
|
+
readonly value: "brave";
|
|
60
|
+
readonly label: "Brave";
|
|
61
|
+
readonly description: "Requires BRAVE_API_KEY";
|
|
62
|
+
}, {
|
|
63
|
+
readonly value: "kimi";
|
|
64
|
+
readonly label: "Kimi";
|
|
65
|
+
readonly description: "Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)";
|
|
66
|
+
}, {
|
|
67
|
+
readonly value: "parallel";
|
|
68
|
+
readonly label: "Parallel";
|
|
69
|
+
readonly description: "Requires PARALLEL_API_KEY";
|
|
70
|
+
}, {
|
|
71
|
+
readonly value: "synthetic";
|
|
72
|
+
readonly label: "Synthetic";
|
|
73
|
+
readonly description: "Requires SYNTHETIC_API_KEY";
|
|
74
|
+
}, {
|
|
75
|
+
readonly value: "searxng";
|
|
76
|
+
readonly label: "SearXNG";
|
|
77
|
+
readonly description: "Requires SEARXNG_ENDPOINT or searxng.endpoint";
|
|
78
|
+
}];
|
|
79
|
+
/** Default hard timeout for each web-search provider transport. */
|
|
80
|
+
export declare const DEFAULT_WEB_SEARCH_TIMEOUT_SECONDS = 60;
|
|
81
|
+
/** Maximum configurable hard timeout for each web-search provider transport. */
|
|
82
|
+
export declare const MAX_WEB_SEARCH_TIMEOUT_SECONDS = 300;
|
|
83
|
+
/** Supported web search providers (every option except `auto`). */
|
|
84
|
+
export type SearchProviderId = Exclude<(typeof SEARCH_PROVIDER_OPTIONS)[number]["value"], "auto">;
|
|
85
|
+
/**
|
|
86
|
+
* Auto-resolution priority order. Derived from {@link SEARCH_PROVIDER_OPTIONS}
|
|
87
|
+
* (minus `auto`) so the settings/setup dropdown and `resolveProviderChain()`
|
|
88
|
+
* share one source of truth and never drift apart.
|
|
89
|
+
*/
|
|
90
|
+
export declare const SEARCH_PROVIDER_ORDER: readonly SearchProviderId[];
|
|
91
|
+
/** Concrete provider choices (no `auto` sentinel) — for list-valued settings like order/exclude. */
|
|
92
|
+
export declare const SEARCH_PROVIDER_CHOICES: ({
|
|
93
|
+
readonly value: "perplexity";
|
|
94
|
+
readonly label: "Perplexity";
|
|
95
|
+
readonly description: "Uses auth when configured; explicit selection falls back to anonymous search";
|
|
96
|
+
} | {
|
|
97
|
+
readonly value: "gemini";
|
|
98
|
+
readonly label: "Gemini";
|
|
99
|
+
readonly description: "Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)";
|
|
100
|
+
} | {
|
|
101
|
+
readonly value: "anthropic";
|
|
102
|
+
readonly label: "Anthropic";
|
|
103
|
+
readonly description: "Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)";
|
|
104
|
+
} | {
|
|
105
|
+
readonly value: "codex";
|
|
106
|
+
readonly label: "OpenAI";
|
|
107
|
+
readonly description: "OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)";
|
|
108
|
+
} | {
|
|
109
|
+
readonly value: "xai";
|
|
110
|
+
readonly label: "xAI";
|
|
111
|
+
readonly description: "Grok web search via xAI Responses API (uses SuperGrok/X Premium+ OAuth via /login xai-oauth, or XAI_API_KEY)";
|
|
112
|
+
} | {
|
|
113
|
+
readonly value: "zai";
|
|
114
|
+
readonly label: "Z.AI";
|
|
115
|
+
readonly description: "Calls Z.AI webSearchPrime MCP";
|
|
116
|
+
} | {
|
|
117
|
+
readonly value: "exa";
|
|
118
|
+
readonly label: "Exa";
|
|
119
|
+
readonly description: "API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP";
|
|
120
|
+
} | {
|
|
121
|
+
readonly value: "tinyfish";
|
|
122
|
+
readonly label: "TinyFish";
|
|
123
|
+
readonly description: "Requires TINYFISH_API_KEY";
|
|
124
|
+
} | {
|
|
125
|
+
readonly value: "jina";
|
|
126
|
+
readonly label: "Jina";
|
|
127
|
+
readonly description: "Requires JINA_API_KEY";
|
|
128
|
+
} | {
|
|
129
|
+
readonly value: "kagi";
|
|
130
|
+
readonly label: "Kagi";
|
|
131
|
+
readonly description: "Requires KAGI_API_KEY and Kagi Search API beta access";
|
|
132
|
+
} | {
|
|
133
|
+
readonly value: "tavily";
|
|
134
|
+
readonly label: "Tavily";
|
|
135
|
+
readonly description: "Requires TAVILY_API_KEY";
|
|
136
|
+
} | {
|
|
137
|
+
readonly value: "firecrawl";
|
|
138
|
+
readonly label: "Firecrawl";
|
|
139
|
+
readonly description: "Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode";
|
|
140
|
+
} | {
|
|
141
|
+
readonly value: "brave";
|
|
142
|
+
readonly label: "Brave";
|
|
143
|
+
readonly description: "Requires BRAVE_API_KEY";
|
|
144
|
+
} | {
|
|
145
|
+
readonly value: "kimi";
|
|
146
|
+
readonly label: "Kimi";
|
|
147
|
+
readonly description: "Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)";
|
|
148
|
+
} | {
|
|
149
|
+
readonly value: "parallel";
|
|
150
|
+
readonly label: "Parallel";
|
|
151
|
+
readonly description: "Requires PARALLEL_API_KEY";
|
|
152
|
+
} | {
|
|
153
|
+
readonly value: "synthetic";
|
|
154
|
+
readonly label: "Synthetic";
|
|
155
|
+
readonly description: "Requires SYNTHETIC_API_KEY";
|
|
156
|
+
} | {
|
|
157
|
+
readonly value: "searxng";
|
|
158
|
+
readonly label: "SearXNG";
|
|
159
|
+
readonly description: "Requires SEARXNG_ENDPOINT or searxng.endpoint";
|
|
160
|
+
})[];
|
|
161
|
+
export declare const SEARCH_PROVIDER_PREFERENCES: readonly ["auto", ...SearchProviderId[]];
|
|
162
|
+
/** Display labels, derived from {@link SEARCH_PROVIDER_OPTIONS}. */
|
|
163
|
+
export declare const SEARCH_PROVIDER_LABELS: Record<SearchProviderId, string>;
|
|
164
|
+
export declare function isSearchProviderId(value: string): value is SearchProviderId;
|
|
165
|
+
export declare function isSearchProviderPreference(value: string): value is SearchProviderId | "auto";
|
|
166
|
+
/** Source returned by search (all providers) */
|
|
167
|
+
export interface SearchSource {
|
|
168
|
+
title: string;
|
|
169
|
+
url: string;
|
|
170
|
+
snippet?: string;
|
|
171
|
+
/** ISO date string or relative ("2d ago") */
|
|
172
|
+
publishedDate?: string;
|
|
173
|
+
/** Age in seconds for consistent formatting */
|
|
174
|
+
ageSeconds?: number;
|
|
175
|
+
author?: string;
|
|
176
|
+
}
|
|
177
|
+
/** Citation with text reference (LLM-mediated providers) */
|
|
178
|
+
export interface SearchCitation {
|
|
179
|
+
url: string;
|
|
180
|
+
title: string;
|
|
181
|
+
citedText?: string;
|
|
182
|
+
}
|
|
183
|
+
/** Usage metrics */
|
|
184
|
+
export interface SearchUsage {
|
|
185
|
+
inputTokens?: number;
|
|
186
|
+
outputTokens?: number;
|
|
187
|
+
/** Anthropic: number of web search requests made */
|
|
188
|
+
searchRequests?: number;
|
|
189
|
+
/** Perplexity: combined token count */
|
|
190
|
+
totalTokens?: number;
|
|
191
|
+
}
|
|
192
|
+
/** Unified response across providers */
|
|
193
|
+
export interface SearchResponse {
|
|
194
|
+
provider: SearchProviderId | "none";
|
|
195
|
+
/** Synthesized answer text (LLM-mediated providers) */
|
|
196
|
+
answer?: string;
|
|
197
|
+
/** Search result sources */
|
|
198
|
+
sources: SearchSource[];
|
|
199
|
+
/** Text citations with context */
|
|
200
|
+
citations?: SearchCitation[];
|
|
201
|
+
/** Intermediate search queries (anthropic) */
|
|
202
|
+
searchQueries?: string[];
|
|
203
|
+
/** Follow-up question suggestions (provider-dependent) */
|
|
204
|
+
relatedQuestions?: string[];
|
|
205
|
+
/** Token usage metrics */
|
|
206
|
+
usage?: SearchUsage;
|
|
207
|
+
/** Model used */
|
|
208
|
+
model?: string;
|
|
209
|
+
/** Request ID for debugging */
|
|
210
|
+
requestId?: string;
|
|
211
|
+
/** Authentication mode used by the provider (e.g. oauth, api-key) */
|
|
212
|
+
authMode?: string;
|
|
213
|
+
}
|
|
214
|
+
/** Provider-specific error with optional HTTP status */
|
|
215
|
+
export declare class SearchProviderError extends Error {
|
|
216
|
+
readonly provider: SearchProviderId;
|
|
217
|
+
readonly status?: number | undefined;
|
|
218
|
+
constructor(provider: SearchProviderId, message: string, status?: number | undefined);
|
|
219
|
+
}
|
|
220
|
+
/** Anthropic API response types */
|
|
221
|
+
export interface AnthropicSearchResult {
|
|
222
|
+
type: "web_search_result";
|
|
223
|
+
title: string;
|
|
224
|
+
url: string;
|
|
225
|
+
encrypted_content: string;
|
|
226
|
+
page_age: string | null;
|
|
227
|
+
}
|
|
228
|
+
export interface AnthropicCitation {
|
|
229
|
+
type: "web_search_result_location";
|
|
230
|
+
url: string;
|
|
231
|
+
title: string;
|
|
232
|
+
cited_text: string;
|
|
233
|
+
encrypted_index: string;
|
|
234
|
+
}
|
|
235
|
+
export interface AnthropicContentBlock {
|
|
236
|
+
type: string;
|
|
237
|
+
/** Text content (for type="text") */
|
|
238
|
+
text?: string;
|
|
239
|
+
/** Citations in text block */
|
|
240
|
+
citations?: AnthropicCitation[];
|
|
241
|
+
/** Tool name (for type="server_tool_use") */
|
|
242
|
+
name?: string;
|
|
243
|
+
/** Tool input (for type="server_tool_use") */
|
|
244
|
+
input?: {
|
|
245
|
+
query: string;
|
|
246
|
+
};
|
|
247
|
+
/** Search results (for type="web_search_tool_result") */
|
|
248
|
+
content?: AnthropicSearchResult[];
|
|
249
|
+
}
|
|
250
|
+
export interface AnthropicApiResponse {
|
|
251
|
+
id: string;
|
|
252
|
+
model: string;
|
|
253
|
+
content: AnthropicContentBlock[];
|
|
254
|
+
usage: {
|
|
255
|
+
input_tokens: number;
|
|
256
|
+
output_tokens: number;
|
|
257
|
+
cache_read_input_tokens?: number;
|
|
258
|
+
cache_creation_input_tokens?: number;
|
|
259
|
+
server_tool_use?: {
|
|
260
|
+
web_search_requests: number;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
/** Perplexity API types */
|
|
265
|
+
export type PerplexityChatMessageRole = "system" | "user" | "assistant" | "tool";
|
|
266
|
+
export interface PerplexityUrl {
|
|
267
|
+
url: string;
|
|
268
|
+
}
|
|
269
|
+
export interface PerplexityVideoUrl {
|
|
270
|
+
url: string;
|
|
271
|
+
frame_interval?: string | number;
|
|
272
|
+
}
|
|
273
|
+
export interface PerplexityContentTextChunk {
|
|
274
|
+
type: "text";
|
|
275
|
+
text: string;
|
|
276
|
+
}
|
|
277
|
+
export interface PerplexityContentImageChunk {
|
|
278
|
+
type: "image_url";
|
|
279
|
+
image_url: PerplexityUrl | string;
|
|
280
|
+
}
|
|
281
|
+
export interface PerplexityContentFileChunk {
|
|
282
|
+
type: "file_url";
|
|
283
|
+
file_url: PerplexityUrl | string;
|
|
284
|
+
file_name?: string | null;
|
|
285
|
+
}
|
|
286
|
+
export interface PerplexityContentPdfChunk {
|
|
287
|
+
type: "pdf_url";
|
|
288
|
+
pdf_url: PerplexityUrl | string;
|
|
289
|
+
}
|
|
290
|
+
export interface PerplexityContentVideoChunk {
|
|
291
|
+
type: "video_url";
|
|
292
|
+
video_url: PerplexityVideoUrl | string;
|
|
293
|
+
}
|
|
294
|
+
export type PerplexityContentChunk = PerplexityContentTextChunk | PerplexityContentImageChunk | PerplexityContentFileChunk | PerplexityContentPdfChunk | PerplexityContentVideoChunk;
|
|
295
|
+
export interface PerplexitySearchStepDetails {
|
|
296
|
+
search_results: PerplexitySearchResult[];
|
|
297
|
+
search_keywords: string[];
|
|
298
|
+
}
|
|
299
|
+
export interface PerplexityFetchUrlContentStepDetails {
|
|
300
|
+
contents: PerplexitySearchResult[];
|
|
301
|
+
}
|
|
302
|
+
export interface PerplexityExecutePythonStepDetails {
|
|
303
|
+
code: string;
|
|
304
|
+
result: string;
|
|
305
|
+
}
|
|
306
|
+
export interface PerplexityReasoningStepInput {
|
|
307
|
+
thought: string;
|
|
308
|
+
type?: string | null;
|
|
309
|
+
web_search?: PerplexitySearchStepDetails | null;
|
|
310
|
+
fetch_url_content?: PerplexityFetchUrlContentStepDetails | null;
|
|
311
|
+
execute_python?: PerplexityExecutePythonStepDetails | null;
|
|
312
|
+
}
|
|
313
|
+
export interface PerplexityReasoningStepOutput {
|
|
314
|
+
thought: string;
|
|
315
|
+
type?: string | null;
|
|
316
|
+
web_search?: PerplexitySearchStepDetails | null;
|
|
317
|
+
fetch_url_content?: PerplexityFetchUrlContentStepDetails | null;
|
|
318
|
+
execute_python?: PerplexityExecutePythonStepDetails | null;
|
|
319
|
+
}
|
|
320
|
+
export interface PerplexityToolCallFunction {
|
|
321
|
+
name?: string | null;
|
|
322
|
+
arguments?: string | null;
|
|
323
|
+
}
|
|
324
|
+
export interface PerplexityToolCall {
|
|
325
|
+
id?: string | null;
|
|
326
|
+
type?: "function" | null;
|
|
327
|
+
function?: PerplexityToolCallFunction | null;
|
|
328
|
+
}
|
|
329
|
+
export interface PerplexityMessageInput {
|
|
330
|
+
role: PerplexityChatMessageRole;
|
|
331
|
+
content: string | PerplexityContentChunk[] | null;
|
|
332
|
+
reasoning_steps?: PerplexityReasoningStepInput[] | null;
|
|
333
|
+
tool_calls?: PerplexityToolCall[] | null;
|
|
334
|
+
tool_call_id?: string | null;
|
|
335
|
+
}
|
|
336
|
+
export interface PerplexityMessageOutput {
|
|
337
|
+
role: PerplexityChatMessageRole;
|
|
338
|
+
content: string | PerplexityContentChunk[] | null;
|
|
339
|
+
reasoning_steps?: PerplexityReasoningStepOutput[] | null;
|
|
340
|
+
tool_calls?: PerplexityToolCall[] | null;
|
|
341
|
+
tool_call_id?: string | null;
|
|
342
|
+
}
|
|
343
|
+
export type PerplexityMessage = PerplexityMessageInput;
|
|
344
|
+
export interface PerplexityResponseFormatText {
|
|
345
|
+
type: "text";
|
|
346
|
+
}
|
|
347
|
+
export interface PerplexityJSONSchema {
|
|
348
|
+
schema: Record<string, unknown>;
|
|
349
|
+
name?: string | null;
|
|
350
|
+
description?: string | null;
|
|
351
|
+
strict?: boolean | null;
|
|
352
|
+
}
|
|
353
|
+
export interface PerplexityResponseFormatJSONSchema {
|
|
354
|
+
type: "json_schema";
|
|
355
|
+
json_schema: PerplexityJSONSchema;
|
|
356
|
+
}
|
|
357
|
+
export interface PerplexityRegexSchema {
|
|
358
|
+
regex: string;
|
|
359
|
+
name?: string | null;
|
|
360
|
+
description?: string | null;
|
|
361
|
+
strict?: boolean | null;
|
|
362
|
+
}
|
|
363
|
+
export interface PerplexityResponseFormatRegex {
|
|
364
|
+
type: "regex";
|
|
365
|
+
regex: PerplexityRegexSchema;
|
|
366
|
+
}
|
|
367
|
+
export type PerplexityResponseFormat = PerplexityResponseFormatText | PerplexityResponseFormatJSONSchema | PerplexityResponseFormatRegex;
|
|
368
|
+
export interface PerplexityParameterSpec {
|
|
369
|
+
type: string;
|
|
370
|
+
properties: Record<string, unknown>;
|
|
371
|
+
required?: string[] | null;
|
|
372
|
+
additional_properties?: boolean | null;
|
|
373
|
+
}
|
|
374
|
+
export interface PerplexityFunctionSpec {
|
|
375
|
+
name: string;
|
|
376
|
+
description: string;
|
|
377
|
+
parameters: PerplexityParameterSpec;
|
|
378
|
+
strict?: boolean | null;
|
|
379
|
+
}
|
|
380
|
+
export interface PerplexityToolSpec {
|
|
381
|
+
type: "function";
|
|
382
|
+
function: PerplexityFunctionSpec;
|
|
383
|
+
}
|
|
384
|
+
export interface PerplexityUserLocation {
|
|
385
|
+
latitude?: number | null;
|
|
386
|
+
longitude?: number | null;
|
|
387
|
+
country?: string | null;
|
|
388
|
+
city?: string | null;
|
|
389
|
+
region?: string | null;
|
|
390
|
+
}
|
|
391
|
+
export interface PerplexitySearchOptions {
|
|
392
|
+
search_context_size?: "low" | "medium" | "high";
|
|
393
|
+
search_type?: "fast" | "pro" | "auto" | null;
|
|
394
|
+
user_location?: PerplexityUserLocation | null;
|
|
395
|
+
image_results_enhanced_relevance?: boolean;
|
|
396
|
+
}
|
|
397
|
+
export interface PerplexityRequest {
|
|
398
|
+
max_tokens?: number | null;
|
|
399
|
+
temperature?: number | null;
|
|
400
|
+
n?: number | null;
|
|
401
|
+
model: string;
|
|
402
|
+
stream?: boolean | null;
|
|
403
|
+
stop?: string | string[] | null;
|
|
404
|
+
cum_logprobs?: boolean | null;
|
|
405
|
+
logprobs?: boolean | null;
|
|
406
|
+
top_logprobs?: number | null;
|
|
407
|
+
best_of?: number | null;
|
|
408
|
+
response_metadata?: Record<string, unknown> | null;
|
|
409
|
+
response_format?: PerplexityResponseFormat | null;
|
|
410
|
+
diverse_first_token?: boolean | null;
|
|
411
|
+
_inputs?: number[] | null;
|
|
412
|
+
_prompt_token_length?: number | null;
|
|
413
|
+
messages: PerplexityMessageInput[];
|
|
414
|
+
tools?: PerplexityToolSpec[] | null;
|
|
415
|
+
tool_choice?: "none" | "auto" | "required" | null;
|
|
416
|
+
parallel_tool_calls?: boolean | null;
|
|
417
|
+
web_search_options?: PerplexitySearchOptions;
|
|
418
|
+
search_mode?: "web" | "academic" | "sec" | null;
|
|
419
|
+
return_images?: boolean | null;
|
|
420
|
+
return_related_questions?: boolean | null;
|
|
421
|
+
num_search_results?: number;
|
|
422
|
+
num_images?: number;
|
|
423
|
+
enable_search_classifier?: boolean | null;
|
|
424
|
+
disable_search?: boolean | null;
|
|
425
|
+
search_domain_filter?: string[] | null;
|
|
426
|
+
search_language_filter?: string[] | null;
|
|
427
|
+
search_tenant?: string | null;
|
|
428
|
+
ranking_model?: string | null;
|
|
429
|
+
latitude?: number | null;
|
|
430
|
+
longitude?: number | null;
|
|
431
|
+
country?: string | null;
|
|
432
|
+
search_recency_filter?: "hour" | "day" | "week" | "month" | "year" | null;
|
|
433
|
+
search_after_date_filter?: string | null;
|
|
434
|
+
search_before_date_filter?: string | null;
|
|
435
|
+
last_updated_before_filter?: string | null;
|
|
436
|
+
last_updated_after_filter?: string | null;
|
|
437
|
+
image_format_filter?: string[] | null;
|
|
438
|
+
image_domain_filter?: string[] | null;
|
|
439
|
+
safe_search?: boolean | null;
|
|
440
|
+
file_workspace_id?: string | null;
|
|
441
|
+
updated_before_timestamp?: number | null;
|
|
442
|
+
updated_after_timestamp?: number | null;
|
|
443
|
+
search_internal_properties?: Record<string, unknown> | null;
|
|
444
|
+
use_threads?: boolean | null;
|
|
445
|
+
thread_id?: string | null;
|
|
446
|
+
stream_mode?: "full" | "concise";
|
|
447
|
+
_debug_pro_search?: boolean;
|
|
448
|
+
has_image_url?: boolean;
|
|
449
|
+
reasoning_effort?: "minimal" | "low" | "medium" | "high" | null;
|
|
450
|
+
language_preference?: string | null;
|
|
451
|
+
user_original_query?: string | null;
|
|
452
|
+
_force_new_agent?: boolean | null;
|
|
453
|
+
}
|
|
454
|
+
export interface PerplexitySearchResult {
|
|
455
|
+
title: string;
|
|
456
|
+
url: string;
|
|
457
|
+
date?: string | null;
|
|
458
|
+
last_updated?: string | null;
|
|
459
|
+
snippet?: string;
|
|
460
|
+
source?: "web" | "attachment";
|
|
461
|
+
}
|
|
462
|
+
export interface PerplexityCost {
|
|
463
|
+
input_tokens_cost: number;
|
|
464
|
+
output_tokens_cost: number;
|
|
465
|
+
reasoning_tokens_cost?: number | null;
|
|
466
|
+
request_cost?: number | null;
|
|
467
|
+
citation_tokens_cost?: number | null;
|
|
468
|
+
search_queries_cost?: number | null;
|
|
469
|
+
total_cost: number;
|
|
470
|
+
}
|
|
471
|
+
export interface PerplexityUsageInfo {
|
|
472
|
+
prompt_tokens: number;
|
|
473
|
+
completion_tokens: number;
|
|
474
|
+
total_tokens: number;
|
|
475
|
+
search_context_size?: string | null;
|
|
476
|
+
citation_tokens?: number | null;
|
|
477
|
+
num_search_queries?: number | null;
|
|
478
|
+
reasoning_tokens?: number | null;
|
|
479
|
+
cost: PerplexityCost;
|
|
480
|
+
}
|
|
481
|
+
export type PerplexityCompletionResponseType = "message" | "info" | "end_of_stream";
|
|
482
|
+
export type PerplexityCompletionResponseStatus = "PENDING" | "COMPLETED";
|
|
483
|
+
export interface PerplexityChoice {
|
|
484
|
+
index: number;
|
|
485
|
+
finish_reason?: "stop" | "length" | null;
|
|
486
|
+
message: PerplexityMessageOutput;
|
|
487
|
+
delta: PerplexityMessageOutput;
|
|
488
|
+
}
|
|
489
|
+
export interface PerplexityResponse {
|
|
490
|
+
id: string;
|
|
491
|
+
model: string;
|
|
492
|
+
created: number;
|
|
493
|
+
usage?: PerplexityUsageInfo | null;
|
|
494
|
+
object?: string;
|
|
495
|
+
choices: PerplexityChoice[];
|
|
496
|
+
citations?: string[] | null;
|
|
497
|
+
search_results?: PerplexitySearchResult[] | null;
|
|
498
|
+
related_questions?: string[] | null;
|
|
499
|
+
type?: PerplexityCompletionResponseType | null;
|
|
500
|
+
status?: PerplexityCompletionResponseStatus | null;
|
|
501
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Calculate age in seconds from an ISO date string. Returns undefined on invalid input. */
|
|
2
|
+
export declare function dateToAgeSeconds(dateStr: string | null | undefined): number | undefined;
|
|
3
|
+
/** Clamp a result count to [1, maxVal], returning defaultVal when value is absent or NaN. */
|
|
4
|
+
export declare function clampNumResults(value: number | undefined, defaultVal: number, maxVal: number): number;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hard cap on AGENTS.md files surfaced by `buildWorkspaceTree`. Mirrors the
|
|
3
|
+
* native cap so the system-prompt builder does not need a second pass.
|
|
4
|
+
*/
|
|
5
|
+
export declare const AGENTS_MD_LIMIT = 200;
|
|
6
|
+
export interface DirectoryTree {
|
|
7
|
+
rootPath: string;
|
|
8
|
+
rendered: string;
|
|
9
|
+
truncated: boolean;
|
|
10
|
+
totalLines: number;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkspaceTree extends DirectoryTree {
|
|
13
|
+
/** AGENTS.md files beneath the root whose rules may apply to subdirectories. */
|
|
14
|
+
agentsMdFiles: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface BuildDirectoryTreeOptions {
|
|
17
|
+
/** Directory depth below the root to include. Root itself is depth 0. Default: 1. */
|
|
18
|
+
maxDepth?: number;
|
|
19
|
+
/** Per-directory child cap. `null` disables the cap. Default: `null`. */
|
|
20
|
+
perDirLimit?: number | null;
|
|
21
|
+
/** Optional override for the root level. Defaults to `perDirLimit`. */
|
|
22
|
+
rootLimit?: number | null;
|
|
23
|
+
/** Hard rendered line cap. `null` disables. Default: `null`. */
|
|
24
|
+
lineCap?: number | null;
|
|
25
|
+
}
|
|
26
|
+
export interface BuildWorkspaceTreeOptions {
|
|
27
|
+
/** Abort the native workspace scan after this many milliseconds. */
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build a generic directory tree using a single native scan. Hidden files are
|
|
32
|
+
* shown, .gitignore is not consulted, and the standard non-source directories
|
|
33
|
+
* (`node_modules`, `.git`, build outputs, caches…) are pruned by the native
|
|
34
|
+
* walker. Used by the read tool's directory-listing path.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildDirectoryTree(cwd: string, options?: BuildDirectoryTreeOptions): Promise<DirectoryTree>;
|
|
37
|
+
/**
|
|
38
|
+
* Build the workspace tree shown in the system prompt. Returns the rendered
|
|
39
|
+
* tree plus the AGENTS.md files surfaced by the same native walk so callers
|
|
40
|
+
* never need to do a second filesystem scan.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildWorkspaceTree(cwd: string, options?: BuildWorkspaceTreeOptions): Promise<WorkspaceTree>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSH read tool — adapter that wires the verbatim OMP read engine
|
|
3
|
+
* (`src/tools/read/adapter/omp/`) into DSH's `defineTool` contract.
|
|
4
|
+
*
|
|
5
|
+
* This file is pure glue. All read logic lives in `omp/` (copied verbatim);
|
|
6
|
+
* this adapter only:
|
|
7
|
+
* - builds an OMP `ToolSession` from the DSH exec context + tool-plus config,
|
|
8
|
+
* - constructs the verbatim `ReadTool` and calls its `execute`,
|
|
9
|
+
* - converts the `AgentToolResult` back to a DSH tool result.
|
|
10
|
+
*
|
|
11
|
+
* plan.md 拍板#2: read keeps OMP's native single-param style (`path` with
|
|
12
|
+
* inline `:N-M` selectors); DSH `offset/limit` are not exposed.
|
|
13
|
+
*/
|
|
14
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
15
|
+
import type { AgentToolResult } from '@oh-my-pi/pi-agent-core';
|
|
16
|
+
import type { RuntimeConfig } from '../../../config/settings.ts';
|
|
17
|
+
import type { SavedImageRef } from '../../shared/image-bridge.ts';
|
|
18
|
+
export type { Settings } from '../../omp/config/settings.ts';
|
|
19
|
+
export type { ToolSession } from '../../omp/sdk.ts';
|
|
20
|
+
/** DSH read 工具输出形状(output.schema 镜像)。 */
|
|
21
|
+
export interface ReadToolOutput {
|
|
22
|
+
path: string;
|
|
23
|
+
text: string;
|
|
24
|
+
/** OMP session 层追加的截断/限量提示(formatOutputNotice 结果,可为空)。 */
|
|
25
|
+
notice?: string;
|
|
26
|
+
totalLines?: number;
|
|
27
|
+
truncated?: boolean;
|
|
28
|
+
/** 拍板#22:图片读取的附件提交结果(信封文本已并入 text,此字段供 UI/审计)。 */
|
|
29
|
+
image?: SavedImageRef;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 把 OMP AgentToolResult 转成 DSH read 工具输出。
|
|
33
|
+
*
|
|
34
|
+
* OMP 的截断/限量提示不在工具文本里,由 session 层 `formatOutputNotice(meta)`
|
|
35
|
+
* 追加(messages.ts 语义);DSH 无 session 层,适配层在此补上(T02)。
|
|
36
|
+
*/
|
|
37
|
+
export declare function toReadToolResult(result: AgentToolResult<any>, args: any): ReadToolOutput;
|
|
38
|
+
/** render:模型可见文本 = 工具文本 + session 层提示(OMP messages.ts 语义)。 */
|
|
39
|
+
export declare function renderReadOutput(value: ReadToolOutput): string;
|
|
40
|
+
/** 完整执行链路(defineTool.execute 与单测共用)。 */
|
|
41
|
+
export declare function executeReadTool(exec: any, cfg: RuntimeConfig, args: any, ctx: Context): Promise<ReadToolOutput>;
|
|
42
|
+
/**
|
|
43
|
+
* Register the read tool (OMP native `path` + inline selector parameter,
|
|
44
|
+
* plan.md 拍板#2).
|
|
45
|
+
*/
|
|
46
|
+
export declare function registerRead(ctx: Context, getConfig: () => RuntimeConfig): () => void;
|
|
47
|
+
export declare const applyRead: typeof registerRead;
|
|
48
|
+
export declare const registerReadTool: typeof registerRead;
|
|
49
|
+
export default registerRead;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { InternalResource, InternalUrl, ProtocolHandler, ResolveContext, UrlCompletion } from "../../../omp/internal-urls/types.ts";
|
|
2
|
+
/** Filesystem location for a session artifact, resolved without materializing its content. */
|
|
3
|
+
export interface ResolvedArtifactFile {
|
|
4
|
+
id: string;
|
|
5
|
+
path: string;
|
|
6
|
+
size: number;
|
|
7
|
+
}
|
|
8
|
+
/** Resolve an `artifact://` URL to its backing file without reading artifact bytes. */
|
|
9
|
+
export declare function resolveArtifactFile(url: InternalUrl, context?: ResolveContext): Promise<ResolvedArtifactFile>;
|
|
10
|
+
export declare class ArtifactProtocolHandler implements ProtocolHandler {
|
|
11
|
+
readonly scheme = "artifact";
|
|
12
|
+
readonly immutable = true;
|
|
13
|
+
resolve(url: InternalUrl, context?: ResolveContext): Promise<InternalResource>;
|
|
14
|
+
complete(): Promise<UrlCompletion[]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for internal-url protocol handlers that resolve IDs against
|
|
3
|
+
* registered agent sessions.
|
|
4
|
+
*/
|
|
5
|
+
export declare function registerArtifactsDir(dir: string): () => void;
|
|
6
|
+
export declare function resetRegisteredArtifactDirsForTests(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Snapshot of artifacts dirs for every registered session, deduped.
|
|
9
|
+
*
|
|
10
|
+
* Collects TWO candidate dirs per ref, because a subagent reads from its
|
|
11
|
+
* adopted (root-wide) `ArtifactManager.dir` but its own children are written
|
|
12
|
+
* one level deeper, under `sessionFile.slice(0, -6)` (`task/index.ts`). A
|
|
13
|
+
* depth-2+ subagent's output therefore lives in the write-time dir, not the
|
|
14
|
+
* adopted one, so `agent://` must scan both or it 404s a live nested peer.
|
|
15
|
+
* `addDir` dedup collapses the depth-0 case (both formulas agree) back to a
|
|
16
|
+
* single entry.
|
|
17
|
+
*/
|
|
18
|
+
export declare function artifactsDirsFromRegistry(): string[];
|
|
19
|
+
/**
|
|
20
|
+
* Recursively scan artifacts dirs for agent session transcripts, keyed by
|
|
21
|
+
* agent id (the `.jsonl` basename). Used by `history://` so transcripts of
|
|
22
|
+
* agents no longer in the registry (unregistered one-shot helpers, released
|
|
23
|
+
* agents, or any agent after session resume) remain reachable — mirroring how
|
|
24
|
+
* `agent://` reads `.md` outputs straight off disk.
|
|
25
|
+
*
|
|
26
|
+
* Layout follows `task/index.ts`: a subagent's transcript is
|
|
27
|
+
* `<artifactsDir>/<AgentId>.jsonl`, and its own children nest one level deeper
|
|
28
|
+
* under `<artifactsDir>/<AgentId>/<AgentId>.<ChildId>.jsonl`. Advisor
|
|
29
|
+
* transcripts (`__advisor*.jsonl`) are observability-only and excluded;
|
|
30
|
+
* EPERM-rewrite backups (`.bak`) are skipped. When the same id appears in
|
|
31
|
+
* multiple dirs, the first hit wins (registry dirs are scanned first).
|
|
32
|
+
*/
|
|
33
|
+
export declare function sessionFilesFromDisk(): Promise<Map<string, string>>;
|
|
34
|
+
/**
|
|
35
|
+
* Availability half of the `history://` resolution semantics: true when a
|
|
36
|
+
* transcript for `agentId` can be served from a registered ref's live session
|
|
37
|
+
* or retained session file, or from an on-disk `.jsonl` under a known
|
|
38
|
+
* artifacts dir. Hint surfaces use this so they only advertise
|
|
39
|
+
* `history://<agentId>` links that `HistoryProtocolHandler` can actually
|
|
40
|
+
* resolve. A retained sessionFile path is verified on disk before it counts,
|
|
41
|
+
* and probing never throws: a stale path or unreadable artifacts subtree
|
|
42
|
+
* reads as unavailable instead of disturbing the caller's delivery path.
|
|
43
|
+
*/
|
|
44
|
+
export declare function hasResolvableTranscript(agentId: string): Promise<boolean>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSH adapter interface shim for OMP `registry/agent-registry.ts`.
|
|
3
|
+
*
|
|
4
|
+
* The original (312 lines) is the process-global agent registry (main session +
|
|
5
|
+
* subagents) backing `agent://` / `history://` internal protocols, IRC routing,
|
|
6
|
+
* and the agent hub. DSH has no OMP internal agent protocol routing (plan.md:
|
|
7
|
+
* internal URLs canHandle=false), so the registry is a clearly-removed
|
|
8
|
+
* capability and only a minimal surface is kept: `global()` returns an empty
|
|
9
|
+
* registry whose `list()`/`get()` resolve to nothing, so the verbatim OMP
|
|
10
|
+
* `internal-urls/local-protocol.ts` and `registry-helpers.ts` copies compile
|
|
11
|
+
* and their registry lookups short-circuit to "no sessions".
|
|
12
|
+
*/
|
|
13
|
+
export interface AgentRegistryRef {
|
|
14
|
+
id: string;
|
|
15
|
+
kind: 'main' | 'sub' | 'advisor';
|
|
16
|
+
session?: {
|
|
17
|
+
sessionManager?: {
|
|
18
|
+
getArtifactsDir(): string | null;
|
|
19
|
+
getSessionId(): string | null;
|
|
20
|
+
};
|
|
21
|
+
} | null;
|
|
22
|
+
sessionFile?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export declare class AgentRegistry {
|
|
25
|
+
#private;
|
|
26
|
+
static global(): AgentRegistry;
|
|
27
|
+
get(_id: string): AgentRegistryRef | undefined;
|
|
28
|
+
list(): AgentRegistryRef[];
|
|
29
|
+
}
|