@octocodeai/octocode-tools-core 18.3.0 → 19.1.0
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/README.md +19 -19
- package/dist/chunks/direct/chunk-3AA4F3QO.js +10 -0
- package/dist/chunks/direct/chunk-43RVQWTG.js +8 -0
- package/dist/chunks/direct/chunk-7DYE654A.js +8 -0
- package/dist/chunks/direct/chunk-A4WMBDEC.js +8 -0
- package/dist/chunks/direct/chunk-AWZG43MA.js +8 -0
- package/dist/chunks/direct/chunk-BICVXQ5F.js +8 -0
- package/dist/chunks/direct/chunk-BMM5H6QF.js +11 -0
- package/dist/chunks/direct/chunk-C6HFNIDL.js +8 -0
- package/dist/chunks/direct/chunk-CBCZVCTZ.js +8 -0
- package/dist/chunks/direct/chunk-CBIKUVP6.js +11 -0
- package/dist/chunks/direct/chunk-CKB2ME2J.js +8 -0
- package/dist/chunks/direct/chunk-DBI23PBG.js +9 -0
- package/dist/chunks/direct/chunk-DBSQWRFS.js +9 -0
- package/dist/chunks/direct/chunk-DKGYPFGX.js +8 -0
- package/dist/chunks/direct/chunk-EOLHXX5I.js +8 -0
- package/dist/chunks/direct/chunk-IFPXDKUV.js +8 -0
- package/dist/chunks/direct/chunk-J3WYA3IJ.js +8 -0
- package/dist/chunks/direct/chunk-MCMOWPYL.js +8 -0
- package/dist/chunks/direct/chunk-MPTAIBY7.js +8 -0
- package/dist/chunks/direct/chunk-NQRDACK3.js +8 -0
- package/dist/chunks/direct/chunk-O5ETB2W5.js +8 -0
- package/dist/chunks/direct/chunk-OA6NU4KO.js +8 -0
- package/dist/chunks/direct/chunk-QKDE2HIF.js +10 -0
- package/dist/chunks/direct/chunk-RRSY2ZPX.js +13 -0
- package/dist/chunks/direct/chunk-UKQLRZEW.js +8 -0
- package/dist/chunks/direct/chunk-USZL65FN.js +8 -0
- package/dist/chunks/direct/chunk-WH6GL3J2.js +8 -0
- package/dist/chunks/direct/chunk-Y5OCKUQX.js +9 -0
- package/dist/chunks/direct/chunk-ZO44CZN5.js +8 -0
- package/dist/chunks/direct/chunk-ZSXRT7JL.js +12 -0
- package/dist/chunks/direct/chunk-ZUNPQVMO.js +8 -0
- package/dist/chunks/direct/execution-3T4B776P.js +9 -0
- package/dist/chunks/direct/execution-5BJNS7D7.js +8 -0
- package/dist/chunks/direct/execution-5O6QHKBR.js +8 -0
- package/dist/chunks/direct/execution-A4NK3BQO.js +8 -0
- package/dist/chunks/direct/execution-K4UOPXRQ.js +9 -0
- package/dist/chunks/direct/execution-SWWZOOA7.js +13 -0
- package/dist/chunks/direct/execution-X4MUJL4L.js +8 -0
- package/dist/chunks/direct/execution-XA6PXPRB.js +8 -0
- package/dist/chunks/direct/historyExecutions-6F3AA5PY.js +14 -0
- package/dist/direct.d.ts +6 -1
- package/dist/direct.js +2 -46
- package/dist/github/canonicalRepo.d.ts +2 -1
- package/dist/github/client.d.ts +3 -8
- package/dist/github/codeSearch/compactFragment.d.ts +7 -0
- package/dist/github/codeSearch.d.ts +2 -3
- package/dist/github/commit.d.ts +8 -0
- package/dist/github/commitDetail.d.ts +20 -0
- package/dist/github/commitSearch.d.ts +17 -0
- package/dist/github/compare.d.ts +15 -0
- package/dist/github/directoryFetch/cacheMetadata.d.ts +25 -0
- package/dist/github/directoryFetch/helpers.d.ts +1 -3
- package/dist/github/directoryFetch/snapshot.d.ts +10 -0
- package/dist/github/fileContentProcess.d.ts +0 -1
- package/dist/github/fileContentRaw/cache.d.ts +9 -0
- package/dist/github/fileContentRaw/fetch.d.ts +1 -1
- package/dist/github/githubAPI.d.ts +19 -2
- package/dist/github/history/commitFiles.d.ts +12 -0
- package/dist/github/issues/fetchers.d.ts +1 -1
- package/dist/github/issues/types.d.ts +3 -1
- package/dist/github/prContentFetcher/collectionPaging.d.ts +27 -0
- package/dist/github/prContentFetcher/comments.d.ts +7 -5
- package/dist/github/prContentFetcher/commits.d.ts +13 -14
- package/dist/github/prContentFetcher/flags.d.ts +0 -1
- package/dist/github/prContentFetcher/transform.d.ts +1 -1
- package/dist/github/prTransformation.d.ts +3 -1
- package/dist/github/queryBuilders/codeAndRepo.d.ts +2 -1
- package/dist/github/repoSearch.d.ts +2 -1
- package/dist/github/repoStructure/fetchOrchestration.d.ts +1 -1
- package/dist/github/repoStructurePagination.d.ts +1 -1
- package/dist/github/repoStructureTree.d.ts +4 -2
- package/dist/graph/advancedOperations.d.ts +2 -2
- package/dist/graph/buildFileGraph.d.ts +8 -13
- package/dist/graph/coverage.d.ts +6 -0
- package/dist/graph/diagnosticSnapshot.d.ts +10 -0
- package/dist/graph/fileImportLinker.d.ts +28 -0
- package/dist/graph/importResolver.d.ts +1 -1
- package/dist/graph/languageImportResolver.d.ts +5 -0
- package/dist/graph/metadataImports.d.ts +7 -0
- package/dist/graph/packageExportTargets.d.ts +11 -0
- package/dist/graph/rustCargoMetadata.d.ts +31 -0
- package/dist/graph/rustCargoProcess.d.ts +16 -0
- package/dist/graph/rustModules.d.ts +7 -0
- package/dist/graph/rustWorkspace.d.ts +5 -0
- package/dist/graph/types.d.ts +94 -3
- package/dist/graph/workspacePackageResolver.d.ts +7 -2
- package/dist/index.d.ts +46 -19
- package/dist/index.js +36 -45
- package/dist/providers/github/GitHubProvider.d.ts +3 -1
- package/dist/providers/github/githubContent.d.ts +3 -2
- package/dist/providers/github/githubPullRequests.d.ts +3 -2
- package/dist/providers/github/githubSearch.d.ts +6 -3
- package/dist/providers/github/githubStructure.d.ts +3 -2
- package/dist/providers/providerQueries.d.ts +4 -0
- package/dist/providers/providerResults.d.ts +29 -1
- package/dist/providers/types.d.ts +0 -2
- package/dist/schema.d.ts +9 -3
- package/dist/schema.js +4 -12
- package/dist/scheme/fields.d.ts +8 -8
- package/dist/scheme/pagination.d.ts +1 -0
- package/dist/serverConfig.d.ts +1 -1
- package/dist/shared/session/index.d.ts +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/shared/session/storage.d.ts +0 -1
- package/dist/toolContract/descriptions.d.ts +6 -6
- package/dist/toolContract/input/resources/tools/ghSearch.d.ts +21 -20
- package/dist/toolContract/input/resources/tools/githubHistorySchema.d.ts +14 -6
- package/dist/toolContract/input/resources/tools/githubRepositoriesOperation.d.ts +3 -3
- package/dist/toolContract/input/resources/tools/githubTreeOperation.d.ts +4 -2
- package/dist/toolContract/input/resources/tools/historyCommitInput.d.ts +9 -0
- package/dist/toolContract/input/resources/tools/historyIssueInput.d.ts +4 -4
- package/dist/toolContract/input/resources/tools/historyPullRequestInput.d.ts +13 -5
- package/dist/toolContract/input/resources/tools/localAnalyzeGraph.d.ts +74 -32
- package/dist/toolContract/input/resources/tools/localFilesOperation.d.ts +1 -1
- package/dist/toolContract/input/resources/tools/localSearch.d.ts +43 -43
- package/dist/toolContract/input/resources/tools/localTextOperation.d.ts +1 -1
- package/dist/toolContract/input/resources/tools/localTreeOperation.d.ts +2 -2
- package/dist/toolContract/input/resources/tools/lspGetSemantics.d.ts +11 -2
- package/dist/toolContract/input/resources/tools/npmSearch.d.ts +2 -1
- package/dist/toolContract/metadata.d.ts +1 -1
- package/dist/toolContract/runtime.d.ts +1 -1
- package/dist/toolContract/types.d.ts +0 -1
- package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +2 -4
- package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +2 -5
- package/dist/tools/directToolCatalog.exec.d.ts +10 -7
- package/dist/tools/github_clone_repo/cache.d.ts +0 -2
- package/dist/tools/github_clone_repo/cacheArtifacts.d.ts +3 -1
- package/dist/tools/github_clone_repo/cachePaths.d.ts +3 -2
- package/dist/tools/github_clone_repo/gitCheckout.d.ts +5 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +3 -3
- package/dist/tools/github_clone_repo/types.d.ts +6 -1
- package/dist/tools/github_fetch_content/finalizer/types.d.ts +10 -2
- package/dist/tools/github_fetch_content/scheme.d.ts +3 -4
- package/dist/tools/github_fetch_content/types.d.ts +4 -3
- package/dist/tools/github_search/scheme.d.ts +24 -23
- package/dist/tools/github_search_code/execution.d.ts +1 -1
- package/dist/tools/github_search_code/finalizer/groups.d.ts +1 -1
- package/dist/tools/github_search_code/finalizer/ranking.d.ts +1 -1
- package/dist/tools/github_search_code/scheme.d.ts +3 -3
- package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +4 -1
- package/dist/tools/github_search_pull_requests/contentResponse/contentView.d.ts +3 -0
- package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +30 -2
- package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +1 -7
- package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +14 -2
- package/dist/tools/github_search_pull_requests/historyContinuations.d.ts +1 -1
- package/dist/tools/github_search_pull_requests/historyDiffContinuations.d.ts +2 -0
- package/dist/tools/github_search_pull_requests/historySchemes.d.ts +23 -22
- package/dist/tools/github_search_pull_requests/scheme.d.ts +17 -9
- package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +35 -26
- package/dist/tools/github_search_pull_requests/types.d.ts +5 -0
- package/dist/tools/github_search_repos/execution/pagination.d.ts +0 -17
- package/dist/tools/github_search_repos/execution/queryVariants.d.ts +1 -23
- package/dist/tools/github_search_repos/execution.d.ts +0 -1
- package/dist/tools/github_search_repos/scheme.d.ts +6 -6
- package/dist/tools/github_view_repo_structure/execution.d.ts +1 -1
- package/dist/tools/github_view_repo_structure/scheme.d.ts +6 -5
- package/dist/tools/local_analyze_graph/analysisTypes.d.ts +16 -3
- package/dist/tools/local_analyze_graph/analyzeGraph.d.ts +1 -1
- package/dist/tools/local_analyze_graph/completeness.d.ts +3 -0
- package/dist/tools/local_analyze_graph/deadCodeScan.d.ts +9 -5
- package/dist/tools/local_analyze_graph/rootInference.d.ts +2 -0
- package/dist/tools/local_analyze_graph/scheme.d.ts +13 -25
- package/dist/tools/local_fetch_content/fetchContent/pagination.d.ts +7 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +3 -3
- package/dist/tools/local_find_files/findFiles.d.ts +1 -1
- package/dist/tools/local_find_files/scheme.d.ts +4 -4
- package/dist/tools/local_ripgrep/execution.d.ts +0 -1
- package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +1 -2
- package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +2 -2
- package/dist/tools/local_ripgrep/rankingProfile/rankingScoring.d.ts +1 -3
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/buildResult.d.ts +0 -4
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +1 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +13 -5
- package/dist/tools/local_ripgrep/structuralCompleteness.d.ts +9 -0
- package/dist/tools/local_search/execution.d.ts +0 -1
- package/dist/tools/local_search/scheme.d.ts +46 -46
- package/dist/tools/local_view_structure/scheme.d.ts +5 -5
- package/dist/tools/lsp/semantic_content/scheme.d.ts +29 -7
- package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +2 -9
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/callEnvelopes.d.ts +2 -2
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +2 -3
- package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +0 -1
- package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +1 -0
- package/dist/tools/lsp/semantic_content/semanticSnapshot.d.ts +16 -0
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +2 -1
- package/dist/tools/lsp/shared/semanticTypes.d.ts +19 -10
- package/dist/tools/package_search/execution.d.ts +3 -4
- package/dist/tools/package_search/pagination.d.ts +1 -0
- package/dist/tools/package_search/scheme.d.ts +5 -4
- package/dist/tools/providerMappers/codeSearch.d.ts +2 -9
- package/dist/tools/providerMappers/fileContent.d.ts +1 -1
- package/dist/tools/providerMappers/pullRequests.d.ts +24 -4
- package/dist/tools/providerMappers/repoSearch.d.ts +4 -4
- package/dist/tools/providerMappers/repoStructure.d.ts +4 -3
- package/dist/tools/toolAvailability.d.ts +19 -0
- package/dist/tools/toolConfig.d.ts +1 -3
- package/dist/types/toolResults.d.ts +1 -0
- package/dist/utils/contextUtils.d.ts +1 -1
- package/dist/utils/core/types.d.ts +0 -2
- package/dist/utils/exec/npm.d.ts +2 -0
- package/dist/utils/file/byteOffset.d.ts +1 -1
- package/dist/utils/package/common.d.ts +0 -3
- package/dist/utils/package/npm/npmDeprecation.d.ts +1 -2
- package/dist/utils/package/npm/npmDetailsFetchers.d.ts +3 -15
- package/dist/utils/package/npm/npmMappers.d.ts +0 -4
- package/dist/utils/package/npm/npmRegistry.d.ts +9 -1
- package/dist/utils/package/npm/npmSearchStrategies.d.ts +2 -5
- package/dist/utils/package/types.d.ts +3 -0
- package/dist/utils/pagination/types.d.ts +1 -0
- package/dist/utils/response/callToolResult.d.ts +3 -1
- package/package.json +19 -15
- package/dist/errors/pathUtils.d.ts +0 -1
- package/dist/github/directoryFetch.d.ts +0 -3
- package/dist/github/fileContentRaw.d.ts +0 -2
- package/dist/github/issues.d.ts +0 -3
- package/dist/github/prContentFetcher.d.ts +0 -2
- package/dist/github/queryBuilders.d.ts +0 -4
- package/dist/github/repoStructure.d.ts +0 -1
- package/dist/shared/index.d.ts +0 -6
- package/dist/shared/languageSelectors.d.ts +0 -3
- package/dist/toolContract/schemas.d.ts +0 -31
- package/dist/tools/directToolCatalog.d.ts +0 -15
- package/dist/tools/directToolCatalog.meta.d.ts +0 -28
- package/dist/tools/github_search_code/finalizer.d.ts +0 -2
- package/dist/tools/github_search_repos/execution/ranking.d.ts +0 -4
- package/dist/tools/local_ripgrep/rankingProfile.d.ts +0 -35
- package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +0 -2
- package/dist/tools/lsp/semantic_content/index.d.ts +0 -3
- package/dist/tools/lsp/semantic_content/semanticEnvelopes.d.ts +0 -3
- package/dist/tools/lsp/semantic_content/semanticFileOps.d.ts +0 -8
- package/dist/tools/providerMappers.d.ts +0 -11
- package/dist/tools/toolMetadata/baseSchema.d.ts +0 -1
- package/dist/tools/toolMetadata/descriptions.d.ts +0 -1
- package/dist/tools/toolMetadata/proxies.d.ts +0 -4
- package/dist/tools/toolSchemaImports.d.ts +0 -16
- package/dist/utils/exec/spawn.d.ts +0 -2
- package/dist/utils/file/filters.d.ts +0 -2
- package/dist/utils/http/cache.d.ts +0 -5
- package/dist/utils/package/npm.d.ts +0 -2
- package/dist/utils/response/bulk.d.ts +0 -2
|
@@ -5,4 +5,4 @@ import { dirname as __dirname_fn } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __dirname_fn(__filename);
|
|
8
|
-
import{randomUUID as ot}from"node:crypto";import{existsSync as M,readFileSync as Se,writeFileSync as Ze,unlinkSync as Qe,renameSync as Xe}from"node:fs";import{isPersistentStorageEnabled as ge,isStatsEnabled as Ce}from"@octocodeai/config";function p(e){return e.toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"")}function w(e){if(!e.token.expiresAt)return!1;let t=new Date(e.token.expiresAt);if(isNaN(t.getTime()))return!0;let r=new Date;return t.getTime()-r.getTime()<300*1e3}function B(e){if(!e.token.refreshTokenExpiresAt)return!1;let t=new Date(e.token.refreshTokenExpiresAt);return isNaN(t.getTime())?!0:new Date>=t}var P=new Map,Re=300*1e3;function be(e){let t=p(e),r=P.get(t);return!r||Date.now()-r.cachedAt>=Re?!1:r.credentials?!w(r.credentials):!0}function q(e){e?P.delete(p(e)):P.clear()}function V(e){let t=p(e);if(be(t))return P.get(t).credentials}function Y(e,t){let r=p(e);P.set(r,{credentials:t,cachedAt:Date.now()})}import{existsSync as X,readFileSync as ee,writeFileSync as te,unlinkSync as Gt,statSync as Oe,chmodSync as De}from"node:fs";import{createCipheriv as Ie,createDecipheriv as _e,randomBytes as re}from"node:crypto";import{existsSync as we,mkdirSync as Pe}from"node:fs";import{join as u}from"node:path";import{getOctocodeHome as Ee}from"@octocodeai/config";var Ae=448;function Le(){return Ee(process.env)}var c=Le(),d={home:c,config:u(c,".octocoderc"),credentials:u(c,"credentials.json"),key:u(c,".key"),session:u(c,"session.json"),stats:u(c,"stats.json"),tmp:u(c,"tmp"),clone:u(c,"tmp","clone"),tree:u(c,"tmp","tree"),response:u(c,"tmp","response"),repos:u(c,"tmp","clone"),cliConfig:u(c,"config.json"),lspConfig:u(c,"lsp-servers.json")};function Z(){we(d.home)||Pe(d.home,{recursive:!0,mode:Ae})}import{z as a}from"zod";var Fe=a.object({token:a.string(),tokenType:a.literal("oauth"),scopes:a.array(a.string()).optional(),refreshToken:a.string().optional(),expiresAt:a.string().optional(),refreshTokenExpiresAt:a.string().optional()}),He=a.object({hostname:a.string(),username:a.string(),token:Fe,gitProtocol:a.enum(["ssh","https"]),createdAt:a.string(),updatedAt:a.string()}),Q=a.object({version:a.number(),credentials:a.record(a.string(),He)});var Ge=d.home,D=d.credentials,T=d.key,se="aes-256-gcm",Ue=16;function y(){Z()}function ne(){if(y(),X(T))return Oe(T).mode&511&63&&De(T,384),Buffer.from(ee(T,"utf8"),"hex");let e=re(32);return te(T,e.toString("hex"),{mode:384}),e}function oe(e){let t=ne(),r=re(Ue),s=Ie(se,t,r),n=s.update(e,"utf8","hex");n+=s.final("hex");let i=s.getAuthTag();return`${r.toString("hex")}:${i.toString("hex")}:${n}`}function ie(e){let t=ne(),[r,s,n]=e.split(":");if(!r||!s||!n)throw new Error("Invalid encrypted data format");let i=Buffer.from(r,"hex"),k=Buffer.from(s,"hex"),h=_e(se,t,i);h.setAuthTag(k);let J=h.update(n,"hex","utf8");return J+=h.final("utf8"),J}function N(){if(y(),!X(D))return{version:1,credentials:{}};try{let e=ee(D,"utf8"),t=ie(e),r=JSON.parse(t),s=Q.safeParse(r);return s.success?s.data:{version:1,credentials:{}}}catch{return{version:1,credentials:{}}}}function ae(e){y();let t=oe(JSON.stringify(e,null,2));te(D,t,{mode:384})}import{refreshToken as je}from"@octokit/oauth-methods";import{request as Be}from"@octokit/request";var I="178c6fc778ccc68e1d6a",E="github.com";function Ne(e){return e.replace(/\b(ghp_|gho_|ghu_|ghs_|ghr_)[a-zA-Z0-9]{36,}\b/g,"***MASKED***").replace(/\b[a-zA-Z0-9]{40,}\b/g,"***MASKED***")}function Me(e){return e==="github.com"||e===E?"https://api.github.com":`https://${e}/api/v3`}async function ce(e,t=E,r=I){let s=await e.getCredentials(t);if(!s)return{success:!1,error:`Not logged in to ${t}`};if(!s.token.refreshToken)return{success:!1,error:"Token does not support refresh (OAuth App tokens do not expire)"};if(B(s))return{success:!1,error:"Refresh token has expired. Please login again."};try{let n=await je({clientType:"github-app",clientId:r,clientSecret:"",refreshToken:s.token.refreshToken,request:Be.defaults({baseUrl:Me(t)})}),i={token:n.authentication.token,tokenType:"oauth",refreshToken:n.authentication.refreshToken,expiresAt:n.authentication.expiresAt,refreshTokenExpiresAt:n.authentication.refreshTokenExpiresAt};return await e.updateToken(t,i),{success:!0,username:s.username,hostname:t}}catch(n){return{success:!1,error:n instanceof Error?Ne(n.message):"Token refresh failed"}}}async function ue(e,t=E,r=I){let s=await e.getCredentials(t);if(!s||!s.token)return{token:null,source:"none"};if(!w(s))return{token:s.token.token,source:"stored",username:s.username};if(s.token.refreshToken){let n=await ce(e,t,r);if(n.success){let i=await e.getCredentials(t);if(i?.token.token)return{token:i.token.token,source:"refreshed",username:i.username}}return{token:null,source:"none",refreshError:n.error}}return{token:null,source:"none",refreshError:"Token expired and no refresh token available"}}import{resolveEnvToken as Xt}from"@octocodeai/config";import{execFile as Vt}from"child_process";var ze=null;function le(e){ze=e}async function We(e){let t=p(e.hostname),r={...e,hostname:t,updatedAt:new Date().toISOString()};try{let s=N();return s.credentials[t]=r,ae(s),q(t),{success:!0}}catch{throw new Error("Failed to store credentials")}}async function de(e="github.com",t){let r=p(e);if(!t?.bypassCache){let i=V(r);if(i!==void 0)return i}let n=N().credentials[r]||null;return Y(r,n),n}async function $e(e,t){let r=await de(e);return r?(r.token=t,r.updatedAt=new Date().toISOString(),await We(r),!0):!1}async function Ke(e,t){return ue({getCredentials:de,updateToken:$e},e,t)}le({getTokenWithRefresh:Ke});import{z as o}from"zod";var Je=o.object({rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),calls:o.number()}),qe=o.object({hits:o.record(o.string(),o.number()).default({}),rateLimits:o.number().default(0)}),_=o.record(o.string(),o.number()).default({}),Ve=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:_,rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),charSavingsCalls:o.number(),githubCacheHits:o.number(),githubCacheRateLimits:o.number(),packageRegistryFailures:o.number().default(0),packageRegistryFailuresByRegistry:_}),G=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:_,charsSavedByTool:o.record(o.string(),Je).default({}),githubCacheHits:qe.default({hits:{},rateLimits:0}),packageRegistryFailures:_,totalUsage:Ve.optional()}),fe=o.object({version:o.literal(1),sessionId:o.string(),createdAt:o.string(),lastActiveAt:o.string(),stats:G.optional()}),he=o.object({version:o.literal(1),stats:G});function pe(e){return Object.values(e).reduce((t,r)=>t+r,0)}function Ye(e){let t=e.charsSavedByTool??{},r=e.githubCacheHits??{hits:{},rateLimits:0},s=e.rateLimitsByProvider??{},n=e.packageRegistryFailures??{},i=Object.values(t).reduce((k,h)=>({rawChars:k.rawChars+h.rawChars,responseChars:k.responseChars+h.responseChars,savedChars:k.savedChars+h.savedChars,charSavingsCalls:k.charSavingsCalls+h.calls}),{rawChars:0,responseChars:0,savedChars:0,charSavingsCalls:0});return{toolCalls:e.toolCalls,errors:e.errors,rateLimits:e.rateLimits,rateLimitsByProvider:s,...i,githubCacheHits:pe(r.hits),githubCacheRateLimits:r.rateLimits,packageRegistryFailures:pe(n),packageRegistryFailuresByRegistry:n}}function m(e){let t={...e,rateLimitsByProvider:e.rateLimitsByProvider??{},charsSavedByTool:e.charsSavedByTool??{},githubCacheHits:e.githubCacheHits??{hits:{},rateLimits:0},packageRegistryFailures:e.packageRegistryFailures??{}};return{...t,totalUsage:Ye(t)}}function S(){return m({toolCalls:0,errors:0,rateLimits:0,rateLimitsByProvider:{},charsSavedByTool:{},githubCacheHits:{hits:{},rateLimits:0},packageRegistryFailures:{}})}var x=d.session,v=d.stats;function me(e,t){let r=`${e}.tmp`;Ze(r,JSON.stringify(t,null,2),{mode:384}),Xe(r,e)}function et(e){let t=JSON.parse(e),r=he.safeParse(t);if(r.success)return m(r.data.stats);let s=G.safeParse(t);return s.success?m(s.data):null}function tt(){if(!M(v))return S();try{let e=Se(v,"utf8");return et(e)??S()}catch{return S()}}function U(e){if(!ge())return;y(),Ce()&&me(v,{version:e.version,stats:m(e.stats)});let{stats:t,...r}=e;me(x,r)}function ke(){if(!ge()||!M(x))return null;try{let e=Se(x,"utf8"),t=JSON.parse(e),r=fe.safeParse(t);return r.success?{...r.data,stats:Ce()?tt():S()}:null}catch{return null}}function Te(){let e=!1;for(let t of[x,v])if(M(t))try{Qe(t),e=!0}catch{return!1}return e}var rt=6e4,l=null,g=!1,R=null,z=!1,A=null,L=null,F=null,j=!1;function st(){z||(z=!0,A=()=>{H()},L=()=>{H()},F=()=>{H()},process.on("exit",A),process.on("SIGINT",L),process.on("SIGTERM",F))}function W(){A&&(process.removeListener("exit",A),A=null),L&&(process.removeListener("SIGINT",L),L=null),F&&(process.removeListener("SIGTERM",F),F=null),z=!1}function nt(){R||(R=setInterval(()=>{g&&l&&(U(l),g=!1)},rt),R.unref())}function $(){R&&(clearInterval(R),R=null)}function b(){if(l)return l;let e=ke();return e&&(l=e),e}function C(e){l=e,g=!0,st(),nt()}function O(){g&&l&&(U(l),g=!1)}function H(){if(!j&&g&&l){j=!0;try{U(l),g=!1}catch{}finally{j=!1}}}function K(){l=null,g=!1,j=!1}function ye(){K(),$(),W()}var it=1;function at(e){return m(e)}function ct(e,t){if(!t)return e;let r={...e};for(let[s,n]of Object.entries(t)){let i=r[s]??{rawChars:0,responseChars:0,savedChars:0,calls:0};r[s]={rawChars:i.rawChars+n.rawChars,responseChars:i.responseChars+n.responseChars,savedChars:i.savedChars+n.savedChars,calls:i.calls+n.calls}}return r}function xe(e,t){if(!t)return e;let r={...e};for(let[s,n]of Object.entries(t))r[s]=(r[s]??0)+n;return r}function ut(e,t){if(!t)return e;let r={...e.hits};for(let[s,n]of Object.entries(t.hits??{}))r[s]=(r[s]??0)+n;return{hits:r,rateLimits:e.rateLimits+(t.rateLimits??0)}}function ve(){let e=new Date().toISOString();return{version:it,sessionId:ot(),createdAt:e,lastActiveAt:e,stats:S()}}function lt(){return b()}function dt(e){C(e)}function ft(){O()}function ht(){H()}function pt(e){if(e?.forceNew){let s=ve();return C(s),O(),s}let t=b();if(t){let s={...t,lastActiveAt:new Date().toISOString()};return C(s),O(),s}let r=ve();return C(r),O(),r}function mt(){return b()?.sessionId??null}function f(e){let t=b();if(!t)return{success:!1,session:null};let r=at(t.stats),s=m({toolCalls:r.toolCalls+(e.toolCalls??0),errors:r.errors+(e.errors??0),rateLimits:r.rateLimits+(e.rateLimits??0),rateLimitsByProvider:xe(r.rateLimitsByProvider,e.rateLimitsByProvider),charsSavedByTool:ct(r.charsSavedByTool,e.charsSavedByTool),githubCacheHits:ut(r.githubCacheHits,e.githubCacheHits),packageRegistryFailures:xe(r.packageRegistryFailures,e.packageRegistryFailures)}),n={...t,lastActiveAt:new Date().toISOString(),stats:s};return C(n),{success:!0,session:n}}function St(e=1){return f({toolCalls:e})}function gt(e=1){return f({errors:e})}function Ct(e=1){return f({rateLimits:e})}function kt(e,t=1){return f({rateLimits:t,rateLimitsByProvider:{[e]:t}})}function Tt(e,t,r){let s=Number.isFinite(t)?Math.max(0,t):0,n=Number.isFinite(r)?Math.max(0,r):0;return f({charsSavedByTool:{[e]:{rawChars:s,responseChars:n,savedChars:Math.max(0,s-n),calls:1}}})}function yt(e,t=1){return f({githubCacheHits:{hits:{[e]:t},rateLimits:0}})}function xt(e=1){return f({githubCacheHits:{hits:{},rateLimits:e}})}function vt(e,t=1){return f({packageRegistryFailures:{[e]:t}})}function Rt(){let e=b();if(!e)return{success:!1,session:null};let t={...e,lastActiveAt:new Date().toISOString(),stats:S()};return C(t),{success:!0,session:t}}function bt(){return K(),$(),W(),Te()}function wt(){ye()}export{x as SESSION_FILE,v as STATS_FILE,wt as _resetSessionState,bt as deleteSession,ft as flushSession,ht as flushSessionSync,pt as getOrCreateSession,mt as getSessionId,gt as incrementErrors,yt as incrementGitHubCacheHits,xt as incrementGitHubCacheRateLimits,vt as incrementPackageRegistryFailures,kt as incrementRateLimitByProvider,Ct as incrementRateLimits,St as incrementToolCalls,Tt as incrementToolCharSavings,lt as readSession,Rt as resetSessionStats,f as updateSessionStats,dt as writeSession};
|
|
8
|
+
import{existsSync as M,readFileSync as Se,writeFileSync as Ze,unlinkSync as Qe,renameSync as Xe}from"node:fs";import{isPersistentStorageEnabled as ge,isStatsEnabled as Ce}from"@octocodeai/config";function p(e){return e.toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"")}function R(e){if(!e.token.expiresAt)return!1;let t=new Date(e.token.expiresAt);if(isNaN(t.getTime()))return!0;let r=new Date;return t.getTime()-r.getTime()<300*1e3}function B(e){if(!e.token.refreshTokenExpiresAt)return!1;let t=new Date(e.token.refreshTokenExpiresAt);return isNaN(t.getTime())?!0:new Date>=t}var b=new Map,Re=300*1e3;function be(e){let t=p(e),r=b.get(t);return!r||Date.now()-r.cachedAt>=Re?!1:r.credentials?!R(r.credentials):!0}function q(e){e?b.delete(p(e)):b.clear()}function V(e){let t=p(e);if(be(t))return b.get(t).credentials}function Y(e,t){let r=p(e);b.set(r,{credentials:t,cachedAt:Date.now()})}import{existsSync as X,readFileSync as ee,writeFileSync as te,unlinkSync as Gt,statSync as Oe,chmodSync as De}from"node:fs";import{createCipheriv as Ie,createDecipheriv as _e,randomBytes as re}from"node:crypto";import{existsSync as we,mkdirSync as Pe}from"node:fs";import{join as u}from"node:path";import{getOctocodeHome as Ae}from"@octocodeai/config";var Ee=448;function He(){return Ae(process.env)}var c=He(),d={home:c,config:u(c,".octocoderc"),credentials:u(c,"credentials.json"),key:u(c,".key"),session:u(c,"session.json"),stats:u(c,"stats.json"),tmp:u(c,"tmp"),clone:u(c,"tmp","clone"),tree:u(c,"tmp","tree"),response:u(c,"tmp","response"),repos:u(c,"tmp","clone"),cliConfig:u(c,"config.json"),lspConfig:u(c,"lsp-servers.json")};function Z(){we(d.home)||Pe(d.home,{recursive:!0,mode:Ee})}import{z as a}from"zod";var Le=a.object({token:a.string(),tokenType:a.literal("oauth"),scopes:a.array(a.string()).optional(),refreshToken:a.string().optional(),expiresAt:a.string().optional(),refreshTokenExpiresAt:a.string().optional()}),Fe=a.object({hostname:a.string(),username:a.string(),token:Le,gitProtocol:a.enum(["ssh","https"]),createdAt:a.string(),updatedAt:a.string()}),Q=a.object({version:a.number(),credentials:a.record(a.string(),Fe)});var Ge=d.home,D=d.credentials,T=d.key,se="aes-256-gcm",Ue=16;function y(){Z()}function ne(){if(y(),X(T))return Oe(T).mode&511&63&&De(T,384),Buffer.from(ee(T,"utf8"),"hex");let e=re(32);return te(T,e.toString("hex"),{mode:384}),e}function oe(e){let t=ne(),r=re(Ue),s=Ie(se,t,r),n=s.update(e,"utf8","hex");n+=s.final("hex");let i=s.getAuthTag();return`${r.toString("hex")}:${i.toString("hex")}:${n}`}function ie(e){let t=ne(),[r,s,n]=e.split(":");if(!r||!s||!n)throw new Error("Invalid encrypted data format");let i=Buffer.from(r,"hex"),k=Buffer.from(s,"hex"),h=_e(se,t,i);h.setAuthTag(k);let J=h.update(n,"hex","utf8");return J+=h.final("utf8"),J}function N(){if(y(),!X(D))return{version:1,credentials:{}};try{let e=ee(D,"utf8"),t=ie(e),r=JSON.parse(t),s=Q.safeParse(r);return s.success?s.data:{version:1,credentials:{}}}catch{return{version:1,credentials:{}}}}function ae(e){y();let t=oe(JSON.stringify(e,null,2));te(D,t,{mode:384})}import{refreshToken as je}from"@octokit/oauth-methods";import{request as Be}from"@octokit/request";var I="178c6fc778ccc68e1d6a",w="github.com";function Ne(e){return e.replace(/\b(ghp_|gho_|ghu_|ghs_|ghr_)[a-zA-Z0-9]{36,}\b/g,"***MASKED***").replace(/\b[a-zA-Z0-9]{40,}\b/g,"***MASKED***")}function Me(e){return e==="github.com"||e===w?"https://api.github.com":`https://${e}/api/v3`}async function ce(e,t=w,r=I){let s=await e.getCredentials(t);if(!s)return{success:!1,error:`Not logged in to ${t}`};if(!s.token.refreshToken)return{success:!1,error:"Token does not support refresh (OAuth App tokens do not expire)"};if(B(s))return{success:!1,error:"Refresh token has expired. Please login again."};try{let n=await je({clientType:"github-app",clientId:r,clientSecret:"",refreshToken:s.token.refreshToken,request:Be.defaults({baseUrl:Me(t)})}),i={token:n.authentication.token,tokenType:"oauth",refreshToken:n.authentication.refreshToken,expiresAt:n.authentication.expiresAt,refreshTokenExpiresAt:n.authentication.refreshTokenExpiresAt};return await e.updateToken(t,i),{success:!0,username:s.username,hostname:t}}catch(n){return{success:!1,error:n instanceof Error?Ne(n.message):"Token refresh failed"}}}async function ue(e,t=w,r=I){let s=await e.getCredentials(t);if(!s||!s.token)return{token:null,source:"none"};if(!R(s))return{token:s.token.token,source:"stored",username:s.username};if(s.token.refreshToken){let n=await ce(e,t,r);if(n.success){let i=await e.getCredentials(t);if(i?.token.token)return{token:i.token.token,source:"refreshed",username:i.username}}return{token:null,source:"none",refreshError:n.error}}return{token:null,source:"none",refreshError:"Token expired and no refresh token available"}}import{resolveEnvToken as Xt}from"@octocodeai/config";import{execFile as Vt}from"child_process";var ze=null;function le(e){ze=e}async function We(e){let t=p(e.hostname),r={...e,hostname:t,updatedAt:new Date().toISOString()};try{let s=N();return s.credentials[t]=r,ae(s),q(t),{success:!0}}catch{throw new Error("Failed to store credentials")}}async function de(e="github.com",t){let r=p(e);if(!t?.bypassCache){let i=V(r);if(i!==void 0)return i}let n=N().credentials[r]||null;return Y(r,n),n}async function $e(e,t){let r=await de(e);return r?(r.token=t,r.updatedAt=new Date().toISOString(),await We(r),!0):!1}async function Ke(e,t){return ue({getCredentials:de,updateToken:$e},e,t)}le({getTokenWithRefresh:Ke});import{z as o}from"zod";var Je=o.object({rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),calls:o.number()}),qe=o.object({hits:o.record(o.string(),o.number()).default({}),rateLimits:o.number().default(0)}),_=o.record(o.string(),o.number()).default({}),Ve=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:_,rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),charSavingsCalls:o.number(),githubCacheHits:o.number(),githubCacheRateLimits:o.number(),packageRegistryFailures:o.number().default(0),packageRegistryFailuresByRegistry:_}),G=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:_,charsSavedByTool:o.record(o.string(),Je).default({}),githubCacheHits:qe.default({hits:{},rateLimits:0}),packageRegistryFailures:_,totalUsage:Ve.optional()}),fe=o.object({version:o.literal(1),sessionId:o.string(),createdAt:o.string(),lastActiveAt:o.string(),stats:G.optional()}),he=o.object({version:o.literal(1),stats:G});function pe(e){return Object.values(e).reduce((t,r)=>t+r,0)}function Ye(e){let t=e.charsSavedByTool??{},r=e.githubCacheHits??{hits:{},rateLimits:0},s=e.rateLimitsByProvider??{},n=e.packageRegistryFailures??{},i=Object.values(t).reduce((k,h)=>({rawChars:k.rawChars+h.rawChars,responseChars:k.responseChars+h.responseChars,savedChars:k.savedChars+h.savedChars,charSavingsCalls:k.charSavingsCalls+h.calls}),{rawChars:0,responseChars:0,savedChars:0,charSavingsCalls:0});return{toolCalls:e.toolCalls,errors:e.errors,rateLimits:e.rateLimits,rateLimitsByProvider:s,...i,githubCacheHits:pe(r.hits),githubCacheRateLimits:r.rateLimits,packageRegistryFailures:pe(n),packageRegistryFailuresByRegistry:n}}function m(e){let t={...e,rateLimitsByProvider:e.rateLimitsByProvider??{},charsSavedByTool:e.charsSavedByTool??{},githubCacheHits:e.githubCacheHits??{hits:{},rateLimits:0},packageRegistryFailures:e.packageRegistryFailures??{}};return{...t,totalUsage:Ye(t)}}function S(){return m({toolCalls:0,errors:0,rateLimits:0,rateLimitsByProvider:{},charsSavedByTool:{},githubCacheHits:{hits:{},rateLimits:0},packageRegistryFailures:{}})}var P=d.session,A=d.stats;function me(e,t){let r=`${e}.tmp`;Ze(r,JSON.stringify(t,null,2),{mode:384}),Xe(r,e)}function et(e){let t=JSON.parse(e),r=he.safeParse(t);if(r.success)return m(r.data.stats);let s=G.safeParse(t);return s.success?m(s.data):null}function tt(){if(!M(A))return S();try{let e=Se(A,"utf8");return et(e)??S()}catch{return S()}}function U(e){if(!ge())return;y(),Ce()&&me(A,{version:e.version,stats:m(e.stats)});let{stats:t,...r}=e;me(P,r)}function ke(){if(!ge()||!M(P))return null;try{let e=Se(P,"utf8"),t=JSON.parse(e),r=fe.safeParse(t);return r.success?{...r.data,stats:Ce()?tt():S()}:null}catch{return null}}function Te(){let e=!1;for(let t of[P,A])if(M(t))try{Qe(t),e=!0}catch{return!1}return e}import{randomUUID as ot}from"node:crypto";var rt=6e4,l=null,g=!1,x=null,z=!1,E=null,H=null,L=null,j=!1;function st(){z||(z=!0,E=()=>{F()},H=()=>{F()},L=()=>{F()},process.on("exit",E),process.on("SIGINT",H),process.on("SIGTERM",L))}function W(){E&&(process.removeListener("exit",E),E=null),H&&(process.removeListener("SIGINT",H),H=null),L&&(process.removeListener("SIGTERM",L),L=null),z=!1}function nt(){x||(x=setInterval(()=>{g&&l&&(U(l),g=!1)},rt),x.unref())}function $(){x&&(clearInterval(x),x=null)}function v(){if(l)return l;let e=ke();return e&&(l=e),e}function C(e){l=e,g=!0,st(),nt()}function O(){g&&l&&(U(l),g=!1)}function F(){if(!j&&g&&l){j=!0;try{U(l),g=!1}catch{}finally{j=!1}}}function K(){l=null,g=!1,j=!1}function ye(){K(),$(),W()}var it=1;function at(e){return m(e)}function ct(e,t){if(!t)return e;let r={...e};for(let[s,n]of Object.entries(t)){let i=r[s]??{rawChars:0,responseChars:0,savedChars:0,calls:0};r[s]={rawChars:i.rawChars+n.rawChars,responseChars:i.responseChars+n.responseChars,savedChars:i.savedChars+n.savedChars,calls:i.calls+n.calls}}return r}function xe(e,t){if(!t)return e;let r={...e};for(let[s,n]of Object.entries(t))r[s]=(r[s]??0)+n;return r}function ut(e,t){if(!t)return e;let r={...e.hits};for(let[s,n]of Object.entries(t.hits??{}))r[s]=(r[s]??0)+n;return{hits:r,rateLimits:e.rateLimits+(t.rateLimits??0)}}function ve(){let e=new Date().toISOString();return{version:it,sessionId:ot(),createdAt:e,lastActiveAt:e,stats:S()}}function lt(){return v()}function dt(e){C(e)}function ft(){O()}function ht(){F()}function pt(e){if(e?.forceNew){let s=ve();return C(s),O(),s}let t=v();if(t){let s={...t,lastActiveAt:new Date().toISOString()};return C(s),O(),s}let r=ve();return C(r),O(),r}function mt(){return v()?.sessionId??null}function f(e){let t=v();if(!t)return{success:!1,session:null};let r=at(t.stats),s=m({toolCalls:r.toolCalls+(e.toolCalls??0),errors:r.errors+(e.errors??0),rateLimits:r.rateLimits+(e.rateLimits??0),rateLimitsByProvider:xe(r.rateLimitsByProvider,e.rateLimitsByProvider),charsSavedByTool:ct(r.charsSavedByTool,e.charsSavedByTool),githubCacheHits:ut(r.githubCacheHits,e.githubCacheHits),packageRegistryFailures:xe(r.packageRegistryFailures,e.packageRegistryFailures)}),n={...t,lastActiveAt:new Date().toISOString(),stats:s};return C(n),{success:!0,session:n}}function St(e=1){return f({toolCalls:e})}function gt(e=1){return f({errors:e})}function Ct(e=1){return f({rateLimits:e})}function kt(e,t=1){return f({rateLimits:t,rateLimitsByProvider:{[e]:t}})}function Tt(e,t,r){let s=Number.isFinite(t)?Math.max(0,t):0,n=Number.isFinite(r)?Math.max(0,r):0;return f({charsSavedByTool:{[e]:{rawChars:s,responseChars:n,savedChars:Math.max(0,s-n),calls:1}}})}function yt(e,t=1){return f({githubCacheHits:{hits:{[e]:t},rateLimits:0}})}function xt(e=1){return f({githubCacheHits:{hits:{},rateLimits:e}})}function vt(e,t=1){return f({packageRegistryFailures:{[e]:t}})}function Rt(){let e=v();if(!e)return{success:!1,session:null};let t={...e,lastActiveAt:new Date().toISOString(),stats:S()};return C(t),{success:!0,session:t}}function bt(){return K(),$(),W(),Te()}function wt(){ye()}export{P as SESSION_FILE,A as STATS_FILE,wt as _resetSessionState,bt as deleteSession,ft as flushSession,ht as flushSessionSync,pt as getOrCreateSession,mt as getSessionId,gt as incrementErrors,yt as incrementGitHubCacheHits,xt as incrementGitHubCacheRateLimits,vt as incrementPackageRegistryFailures,kt as incrementRateLimitByProvider,Ct as incrementRateLimits,St as incrementToolCalls,Tt as incrementToolCharSavings,lt as readSession,Rt as resetSessionStats,f as updateSessionStats,dt as writeSession};
|
|
@@ -17,4 +17,3 @@ export declare function incrementPackageRegistryFailures(registry: string, count
|
|
|
17
17
|
export declare function resetSessionStats(): SessionUpdateResult;
|
|
18
18
|
export declare function deleteSession(): boolean;
|
|
19
19
|
export declare function _resetSessionState(): void;
|
|
20
|
-
export { SESSION_FILE, STATS_FILE } from './sessionDiskIO.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Canonical agent-facing descriptions for the public direct tools. */
|
|
2
2
|
export declare const PUBLIC_TOOL_DESCRIPTIONS: {
|
|
3
|
-
readonly ghSearch: "
|
|
4
|
-
readonly ghGetFileContent: "Read a known GitHub path
|
|
5
|
-
readonly ghSearchHistory: "
|
|
6
|
-
readonly ghGetHistoryItem: "
|
|
7
|
-
readonly npmSearch: "
|
|
8
|
-
readonly ghCloneRepo: "
|
|
3
|
+
readonly ghSearch: "Discover GitHub code with operation:\"code\", repositories with \"repositories\", or a known repository tree with \"tree\". Code search covers the default branch; tree accepts branch. Read known paths with ghGetFileContent. Empty or incomplete search results do not prove absence.";
|
|
4
|
+
readonly ghGetFileContent: "Read a known GitHub path. branch is honored when supplied; omission uses the default branch. A path-only call returns bounded, standard-minified content; optionally select fullContent, matchString, or startLine+endLine. minify:\"none\" preserves text; \"symbols\" returns an outline. Run returned continuations for partial content. matchedLines are exact source-line anchors. type:\"directory\" materializes localPath with persistent local access; use ghSearch operation:\"tree\" to browse remotely.";
|
|
5
|
+
readonly ghSearchHistory: "Discover history metadata with operation:\"pullRequests\", \"issues\", or \"commits\". Pull requests may be searched globally; issues and commits require owner+repo. Commit keywords search messages on the default branch; omit keywords to walk history by path/ref/date. Retrieve a known number or commit ref with ghGetHistoryItem.";
|
|
6
|
+
readonly ghGetHistoryItem: "Read known history with owner+repo: operation:\"pullRequest\" or \"issue\" takes number, \"commit\" takes ref, and \"compare\" takes base+head. PR/issue content selectors request bodies, comments, or review/change details; commit/compare includeDiff requests patches. Follow returned continuations for each partial surface.";
|
|
7
|
+
readonly npmSearch: "Look up npm package metadata with packageName, or discover npm packages with keywords. Uses npm configuration and registry-scoped credentials; exact scoped names honor scope mappings. Optional registry overrides routing. Keyword search targets one registry and supports page; follow returned continuations. Use returned repository links for source-code research.";
|
|
8
|
+
readonly ghCloneRepo: "Create a cached, shallow checkout for repeated reads, local AST/regex, or LSP. Optional sparsePath scopes a file/subtree; complete refers to that scope. branch selects a branch, tag, or full commit SHA; omission uses the default branch. location.commitSha identifies HEAD; cached working-tree contents are not reverified. forceRefresh renews the checkout. Requires git and persistent local storage. Pass results[].data.location.localPath to local tools; ghGetFileContent also supports individual remote reads.";
|
|
9
9
|
readonly localSearch: "Choose operation:\"text\" for lexical anchors, \"structural\" for AST matches, \"files\" for path or metadata discovery, and \"tree\" for directory orientation. Each operation has a strict branch, so do not mix fields across operations. Files/tree prune common generated and vendor directories by default; pass excludeDir:[] to prune nothing. Read exact hits with localGetFileContent and prove symbol identity with lspGetSemantics.";
|
|
10
10
|
readonly localAnalyzeGraph: "Map file topology, not symbol identity. dependencies/dependents need file; path needs file+target; deadCode/reachability accept roots; cycles needs no selector. Import edges and dead-code results are candidates—verify changes and deletions with exact reads plus LSP.";
|
|
11
11
|
readonly localGetFileContent: "Read a known local path after search, find, or structure discovery. A path-only call returns a bounded standard-minified view. For large files, get a symbols outline, then an exact range or match. Read small config files whole with minify:\"none\".\nOptionally choose fullContent, matchString, or startLine+endLine. Partial content cannot prove absence; run the returned continuation. matchedLines are LSP anchors; match ranges and character offsets are not. Report fetched bytes only.";
|
|
@@ -2,16 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { ToolSpec } from '../../types/index.js';
|
|
3
3
|
export declare const ghSearch: ToolSpec;
|
|
4
4
|
export declare const GitHubSearchQuerySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
-
path: z.ZodOptional<z.ZodString>;
|
|
6
5
|
owner: z.ZodOptional<z.ZodString>;
|
|
7
6
|
repo: z.ZodOptional<z.ZodString>;
|
|
8
|
-
language: z.ZodOptional<z.ZodString>;
|
|
9
7
|
goal: z.ZodOptional<z.ZodString>;
|
|
10
8
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
9
|
+
path: z.ZodOptional<z.ZodString>;
|
|
10
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
11
11
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
-
extension: z.ZodOptional<z.ZodString>;
|
|
13
12
|
filename: z.ZodOptional<z.ZodString>;
|
|
14
|
-
|
|
13
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
14
|
+
language: z.ZodOptional<z.ZodString>;
|
|
15
15
|
concise: z.ZodOptional<z.ZodBoolean>;
|
|
16
16
|
match: z.ZodDefault<z.ZodEnum<{
|
|
17
17
|
file: "file";
|
|
@@ -20,55 +20,56 @@ export declare const GitHubSearchQuerySchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
20
20
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
21
21
|
operation: z.ZodLiteral<"code">;
|
|
22
22
|
}, z.core.$strict>, z.ZodObject<{
|
|
23
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
24
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
25
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
26
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
23
27
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
24
|
-
updated: "updated";
|
|
25
|
-
"best-match": "best-match";
|
|
26
28
|
stars: "stars";
|
|
29
|
+
updated: "updated";
|
|
27
30
|
forks: "forks";
|
|
28
31
|
"help-wanted-issues": "help-wanted-issues";
|
|
32
|
+
"best-match": "best-match";
|
|
29
33
|
}>>;
|
|
30
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
31
|
-
language: z.ZodOptional<z.ZodString>;
|
|
32
|
-
created: z.ZodOptional<z.ZodString>;
|
|
33
|
-
updated: z.ZodOptional<z.ZodString>;
|
|
34
|
-
goal: z.ZodOptional<z.ZodString>;
|
|
35
|
-
reasoning: z.ZodOptional<z.ZodString>;
|
|
36
34
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
-
|
|
38
|
-
concise: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
language: z.ZodOptional<z.ZodString>;
|
|
39
36
|
stars: z.ZodOptional<z.ZodString>;
|
|
40
|
-
forks: z.ZodOptional<z.ZodString>;
|
|
41
|
-
goodFirstIssues: z.ZodOptional<z.ZodString>;
|
|
42
37
|
size: z.ZodOptional<z.ZodString>;
|
|
38
|
+
created: z.ZodOptional<z.ZodString>;
|
|
39
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
43
40
|
archived: z.ZodOptional<z.ZodBoolean>;
|
|
44
41
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
45
42
|
public: "public";
|
|
46
43
|
private: "private";
|
|
47
44
|
}>>;
|
|
45
|
+
forks: z.ZodOptional<z.ZodString>;
|
|
48
46
|
license: z.ZodOptional<z.ZodString>;
|
|
47
|
+
goodFirstIssues: z.ZodOptional<z.ZodString>;
|
|
48
|
+
concise: z.ZodOptional<z.ZodBoolean>;
|
|
49
49
|
topics: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
50
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
51
51
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
52
|
-
name: "name";
|
|
53
52
|
description: "description";
|
|
53
|
+
name: "name";
|
|
54
54
|
readme: "readme";
|
|
55
55
|
}>>>;
|
|
56
56
|
operation: z.ZodLiteral<"repositories">;
|
|
57
57
|
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
-
path: z.ZodOptional<z.ZodString>;
|
|
59
58
|
owner: z.ZodString;
|
|
60
59
|
repo: z.ZodString;
|
|
61
60
|
branch: z.ZodOptional<z.ZodString>;
|
|
62
61
|
goal: z.ZodOptional<z.ZodString>;
|
|
63
62
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
63
|
+
path: z.ZodOptional<z.ZodString>;
|
|
64
64
|
page: z.ZodDefault<z.ZodNumber>;
|
|
65
|
+
metadataPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
65
66
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
66
67
|
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
67
|
-
sizes: "sizes";
|
|
68
|
-
languages: "languages";
|
|
69
68
|
contributors: "contributors";
|
|
70
69
|
branches: "branches";
|
|
71
70
|
tags: "tags";
|
|
71
|
+
languages: "languages";
|
|
72
|
+
sizes: "sizes";
|
|
72
73
|
}>>>;
|
|
73
74
|
operation: z.ZodLiteral<"tree">;
|
|
74
75
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
3
3
|
type: z.ZodDefault<z.ZodEnum<{
|
|
4
|
-
prs: "prs";
|
|
5
4
|
commits: "commits";
|
|
5
|
+
prs: "prs";
|
|
6
6
|
}>>;
|
|
7
7
|
since: z.ZodOptional<z.ZodString>;
|
|
8
8
|
until: z.ZodOptional<z.ZodString>;
|
|
@@ -17,8 +17,8 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
17
17
|
repo: z.ZodOptional<z.ZodString>;
|
|
18
18
|
concise: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
state: z.ZodOptional<z.ZodEnum<{
|
|
20
|
-
open: "open";
|
|
21
20
|
closed: "closed";
|
|
21
|
+
open: "open";
|
|
22
22
|
merged: "merged";
|
|
23
23
|
}>>;
|
|
24
24
|
assignee: z.ZodOptional<z.ZodString>;
|
|
@@ -50,16 +50,16 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
50
50
|
reactions: z.ZodOptional<z.ZodString>;
|
|
51
51
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
52
52
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
53
|
-
body: "body";
|
|
54
53
|
title: "title";
|
|
55
54
|
comments: "comments";
|
|
55
|
+
body: "body";
|
|
56
56
|
}>>>;
|
|
57
57
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
58
|
-
comments: "comments";
|
|
59
|
-
reactions: "reactions";
|
|
60
58
|
created: "created";
|
|
61
59
|
updated: "updated";
|
|
62
60
|
"best-match": "best-match";
|
|
61
|
+
comments: "comments";
|
|
62
|
+
reactions: "reactions";
|
|
63
63
|
}>>;
|
|
64
64
|
order: z.ZodOptional<z.ZodEnum<{
|
|
65
65
|
asc: "asc";
|
|
@@ -71,6 +71,14 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
71
71
|
filePage: z.ZodOptional<z.ZodNumber>;
|
|
72
72
|
commentPage: z.ZodOptional<z.ZodNumber>;
|
|
73
73
|
commitPage: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
reviewPage: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
collectionPages: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
changedFiles: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
discussion: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
inline: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
reviews: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
commits: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
}, z.core.$strict>>;
|
|
74
82
|
reviewMode: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
75
83
|
content: z.ZodOptional<z.ZodObject<{
|
|
76
84
|
metadata: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -79,8 +87,8 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
79
87
|
patches: z.ZodOptional<z.ZodObject<{
|
|
80
88
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
81
89
|
none: "none";
|
|
82
|
-
selected: "selected";
|
|
83
90
|
all: "all";
|
|
91
|
+
selected: "selected";
|
|
84
92
|
}>>;
|
|
85
93
|
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
94
|
ranges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -29,16 +29,16 @@ export declare const GitHubReposSearchSingleQuerySchema: z.ZodObject<{
|
|
|
29
29
|
created: z.ZodOptional<z.ZodString>;
|
|
30
30
|
size: z.ZodOptional<z.ZodString>;
|
|
31
31
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
32
|
-
name: "name";
|
|
33
32
|
description: "description";
|
|
33
|
+
name: "name";
|
|
34
34
|
readme: "readme";
|
|
35
35
|
}>>>;
|
|
36
36
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
37
|
-
updated: "updated";
|
|
38
|
-
"best-match": "best-match";
|
|
39
37
|
stars: "stars";
|
|
38
|
+
updated: "updated";
|
|
40
39
|
forks: "forks";
|
|
41
40
|
"help-wanted-issues": "help-wanted-issues";
|
|
41
|
+
"best-match": "best-match";
|
|
42
42
|
}>>;
|
|
43
43
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
44
44
|
page: z.ZodDefault<z.ZodNumber>;
|
|
@@ -4,6 +4,7 @@ export declare const githubTreeOperationDescriptions: {
|
|
|
4
4
|
branch: string;
|
|
5
5
|
maxDepth: string;
|
|
6
6
|
page: string;
|
|
7
|
+
metadataPage: string;
|
|
7
8
|
include: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
|
|
@@ -13,13 +14,14 @@ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
|
|
|
13
14
|
path: z.ZodOptional<z.ZodString>;
|
|
14
15
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
15
16
|
page: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
metadataPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
16
18
|
itemsPerPage: z.ZodDefault<z.ZodNumber>;
|
|
17
19
|
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
18
|
-
sizes: "sizes";
|
|
19
|
-
languages: "languages";
|
|
20
20
|
contributors: "contributors";
|
|
21
21
|
branches: "branches";
|
|
22
22
|
tags: "tags";
|
|
23
|
+
languages: "languages";
|
|
24
|
+
sizes: "sizes";
|
|
23
25
|
}>>>;
|
|
24
26
|
goal: z.ZodOptional<z.ZodString>;
|
|
25
27
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const SearchCommitsQuerySchema: z.ZodObject<{
|
|
3
3
|
owner: z.ZodString;
|
|
4
4
|
repo: z.ZodString;
|
|
5
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
6
|
path: z.ZodOptional<z.ZodString>;
|
|
6
7
|
since: z.ZodOptional<z.ZodString>;
|
|
7
8
|
until: z.ZodOptional<z.ZodString>;
|
|
@@ -19,3 +20,11 @@ export declare const SearchCommitsQuerySchema: z.ZodObject<{
|
|
|
19
20
|
goal: z.ZodOptional<z.ZodString>;
|
|
20
21
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
21
22
|
}, z.core.$strip>;
|
|
23
|
+
export declare function validateCommitKeywordScope(query: {
|
|
24
|
+
keywords?: string[];
|
|
25
|
+
path?: string;
|
|
26
|
+
branch?: string;
|
|
27
|
+
base?: string;
|
|
28
|
+
head?: string;
|
|
29
|
+
includeDiff?: boolean;
|
|
30
|
+
}, ctx: z.RefinementCtx): void;
|
|
@@ -6,8 +6,8 @@ export declare const SearchIssuesQuerySchema: z.ZodObject<{
|
|
|
6
6
|
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
concise: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
state: z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
open: "open";
|
|
10
9
|
closed: "closed";
|
|
10
|
+
open: "open";
|
|
11
11
|
}>>;
|
|
12
12
|
assignee: z.ZodOptional<z.ZodString>;
|
|
13
13
|
author: z.ZodOptional<z.ZodString>;
|
|
@@ -20,16 +20,16 @@ export declare const SearchIssuesQuerySchema: z.ZodObject<{
|
|
|
20
20
|
comments: z.ZodOptional<z.ZodString>;
|
|
21
21
|
reactions: z.ZodOptional<z.ZodString>;
|
|
22
22
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
23
|
-
body: "body";
|
|
24
23
|
title: "title";
|
|
25
24
|
comments: "comments";
|
|
25
|
+
body: "body";
|
|
26
26
|
}>>>;
|
|
27
27
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
28
|
-
comments: "comments";
|
|
29
|
-
reactions: "reactions";
|
|
30
28
|
created: "created";
|
|
31
29
|
updated: "updated";
|
|
32
30
|
"best-match": "best-match";
|
|
31
|
+
comments: "comments";
|
|
32
|
+
reactions: "reactions";
|
|
33
33
|
}>>;
|
|
34
34
|
order: z.ZodOptional<z.ZodEnum<{
|
|
35
35
|
asc: "asc";
|
|
@@ -6,8 +6,8 @@ export declare const SearchPullRequestsQuerySchema: z.ZodObject<{
|
|
|
6
6
|
repo: z.ZodOptional<z.ZodString>;
|
|
7
7
|
concise: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
state: z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
open: "open";
|
|
10
9
|
closed: "closed";
|
|
10
|
+
open: "open";
|
|
11
11
|
merged: "merged";
|
|
12
12
|
}>>;
|
|
13
13
|
assignee: z.ZodOptional<z.ZodString>;
|
|
@@ -38,16 +38,16 @@ export declare const SearchPullRequestsQuerySchema: z.ZodObject<{
|
|
|
38
38
|
reactions: z.ZodOptional<z.ZodString>;
|
|
39
39
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
40
40
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
41
|
-
body: "body";
|
|
42
41
|
title: "title";
|
|
43
42
|
comments: "comments";
|
|
43
|
+
body: "body";
|
|
44
44
|
}>>>;
|
|
45
45
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
46
|
-
comments: "comments";
|
|
47
|
-
reactions: "reactions";
|
|
48
46
|
created: "created";
|
|
49
47
|
updated: "updated";
|
|
50
48
|
"best-match": "best-match";
|
|
49
|
+
comments: "comments";
|
|
50
|
+
reactions: "reactions";
|
|
51
51
|
}>>;
|
|
52
52
|
order: z.ZodOptional<z.ZodEnum<{
|
|
53
53
|
asc: "asc";
|
|
@@ -59,13 +59,21 @@ export declare const SearchPullRequestsQuerySchema: z.ZodObject<{
|
|
|
59
59
|
filePage: z.ZodOptional<z.ZodNumber>;
|
|
60
60
|
commentPage: z.ZodOptional<z.ZodNumber>;
|
|
61
61
|
commitPage: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
reviewPage: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
collectionPages: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
changedFiles: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
discussion: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
inline: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
reviews: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
commits: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
}, z.core.$strict>>;
|
|
62
70
|
content: z.ZodOptional<z.ZodObject<{
|
|
63
71
|
body: z.ZodOptional<z.ZodLiteral<true>>;
|
|
64
72
|
changedFiles: z.ZodOptional<z.ZodLiteral<true>>;
|
|
65
73
|
patches: z.ZodOptional<z.ZodObject<{
|
|
66
74
|
mode: z.ZodEnum<{
|
|
67
|
-
selected: "selected";
|
|
68
75
|
all: "all";
|
|
76
|
+
selected: "selected";
|
|
69
77
|
}>;
|
|
70
78
|
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
79
|
ranges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -6,70 +6,112 @@ export declare const LocalAnalyzeGraphQuerySchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
6
6
|
operation: z.ZodLiteral<"deadCode">;
|
|
7
7
|
entrypoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
8
|
includeTests: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
|
-
path: z.ZodString
|
|
9
|
+
path: z.ZodOptional<z.ZodString>;
|
|
10
10
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
|
-
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
12
|
-
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
13
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
14
|
-
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
11
|
+
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
12
|
+
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
13
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
14
|
+
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
15
|
+
diagnosticPage: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
16
|
+
diagnosticPageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
17
|
+
diagnosticSnapshot: z.ZodOptional<z.ZodString>;
|
|
18
|
+
rustWorkspace: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
syntax: "syntax";
|
|
20
|
+
cargo: "cargo";
|
|
21
|
+
}>>;
|
|
15
22
|
goal: z.ZodOptional<z.ZodString>;
|
|
16
23
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
17
24
|
}, z.core.$strict>, z.ZodObject<{
|
|
18
25
|
operation: z.ZodLiteral<"cycles">;
|
|
19
|
-
path: z.ZodString
|
|
26
|
+
path: z.ZodOptional<z.ZodString>;
|
|
20
27
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
-
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
22
|
-
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
23
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
24
|
-
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
28
|
+
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
29
|
+
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
30
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
31
|
+
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
32
|
+
diagnosticPage: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
33
|
+
diagnosticPageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
34
|
+
diagnosticSnapshot: z.ZodOptional<z.ZodString>;
|
|
35
|
+
rustWorkspace: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
syntax: "syntax";
|
|
37
|
+
cargo: "cargo";
|
|
38
|
+
}>>;
|
|
25
39
|
goal: z.ZodOptional<z.ZodString>;
|
|
26
40
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
27
41
|
}, z.core.$strict>, z.ZodObject<{
|
|
28
42
|
operation: z.ZodLiteral<"dependencies">;
|
|
29
43
|
file: z.ZodString;
|
|
30
|
-
depth: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
31
|
-
path: z.ZodString
|
|
44
|
+
depth: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
45
|
+
path: z.ZodOptional<z.ZodString>;
|
|
32
46
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
-
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
34
|
-
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
35
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
36
|
-
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
47
|
+
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
48
|
+
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
49
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
50
|
+
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
51
|
+
diagnosticPage: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
52
|
+
diagnosticPageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
53
|
+
diagnosticSnapshot: z.ZodOptional<z.ZodString>;
|
|
54
|
+
rustWorkspace: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
syntax: "syntax";
|
|
56
|
+
cargo: "cargo";
|
|
57
|
+
}>>;
|
|
37
58
|
goal: z.ZodOptional<z.ZodString>;
|
|
38
59
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
39
60
|
}, z.core.$strict>, z.ZodObject<{
|
|
40
61
|
operation: z.ZodLiteral<"dependents">;
|
|
41
62
|
file: z.ZodString;
|
|
42
|
-
depth: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
43
|
-
path: z.ZodString
|
|
63
|
+
depth: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
64
|
+
path: z.ZodOptional<z.ZodString>;
|
|
44
65
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
-
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
46
|
-
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
47
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
48
|
-
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
66
|
+
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
67
|
+
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
68
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
69
|
+
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
70
|
+
diagnosticPage: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
71
|
+
diagnosticPageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
72
|
+
diagnosticSnapshot: z.ZodOptional<z.ZodString>;
|
|
73
|
+
rustWorkspace: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
syntax: "syntax";
|
|
75
|
+
cargo: "cargo";
|
|
76
|
+
}>>;
|
|
49
77
|
goal: z.ZodOptional<z.ZodString>;
|
|
50
78
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
51
79
|
}, z.core.$strict>, z.ZodObject<{
|
|
52
80
|
file: z.ZodString;
|
|
53
81
|
target: z.ZodString;
|
|
54
82
|
operation: z.ZodLiteral<"path">;
|
|
55
|
-
path: z.ZodString
|
|
83
|
+
path: z.ZodOptional<z.ZodString>;
|
|
56
84
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
|
-
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
58
|
-
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
59
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
60
|
-
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
85
|
+
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
86
|
+
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
87
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
88
|
+
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
89
|
+
diagnosticPage: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
90
|
+
diagnosticPageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
91
|
+
diagnosticSnapshot: z.ZodOptional<z.ZodString>;
|
|
92
|
+
rustWorkspace: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
syntax: "syntax";
|
|
94
|
+
cargo: "cargo";
|
|
95
|
+
}>>;
|
|
61
96
|
goal: z.ZodOptional<z.ZodString>;
|
|
62
97
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
63
98
|
}, z.core.$strict>, z.ZodObject<{
|
|
64
99
|
operation: z.ZodLiteral<"reachability">;
|
|
65
100
|
entrypoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
101
|
includeTests: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
67
|
-
path: z.ZodString
|
|
102
|
+
path: z.ZodOptional<z.ZodString>;
|
|
68
103
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
69
|
-
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
70
|
-
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
71
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>>;
|
|
72
|
-
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
104
|
+
maxFiles: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
105
|
+
limit: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
106
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>>;
|
|
107
|
+
pageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
108
|
+
diagnosticPage: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
109
|
+
diagnosticPageSize: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
110
|
+
diagnosticSnapshot: z.ZodOptional<z.ZodString>;
|
|
111
|
+
rustWorkspace: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
syntax: "syntax";
|
|
113
|
+
cargo: "cargo";
|
|
114
|
+
}>>;
|
|
73
115
|
goal: z.ZodOptional<z.ZodString>;
|
|
74
116
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
75
117
|
}, z.core.$strict>], "operation">;
|
|
@@ -49,9 +49,9 @@ export declare const FindFilesQuerySchema: z.ZodObject<{
|
|
|
49
49
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
50
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
51
51
|
detail: z.ZodDefault<z.ZodEnum<{
|
|
52
|
-
full: "full";
|
|
53
52
|
modified: "modified";
|
|
54
53
|
basic: "basic";
|
|
54
|
+
full: "full";
|
|
55
55
|
}>>;
|
|
56
56
|
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
57
57
|
path: "path";
|