@octocodeai/octocode-tools-core 16.6.0 → 16.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +179 -249
- package/dist/direct.js +37 -35
- package/dist/errors/localToolErrors.d.ts +1 -0
- package/dist/github/pullRequestSearch.d.ts +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +39 -44
- package/dist/oql/adapters/graphProof.d.ts +6 -0
- package/dist/oql/adapters/graphView.d.ts +28 -0
- package/dist/oql/adapters/local.d.ts +1 -0
- package/dist/oql/adapters/resultMap.d.ts +7 -0
- package/dist/oql/adapters/runner.d.ts +7 -0
- package/dist/oql/envelope.d.ts +2 -0
- package/dist/oql/index.d.ts +2 -1
- package/dist/oql/index.js +37 -34
- package/dist/oql/schema.d.ts +24 -8
- package/dist/oql/schemeText.d.ts +27 -10
- package/dist/oql/transformers/github/common.d.ts +7 -1
- package/dist/oql/types.d.ts +19 -2
- package/dist/responses.d.ts +4 -35
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +2 -1
- package/dist/scheme/pagination.d.ts +51 -0
- package/dist/scheme/responseEnvelope.d.ts +67 -1
- package/dist/shared/config/index.d.ts +1 -8
- package/dist/shared/config/index.js +1 -2
- package/dist/shared/credentials/index.d.ts +1 -1
- package/dist/shared/credentials/index.js +2 -1
- package/dist/shared/credentials/storage.d.ts +0 -2
- package/dist/shared/credentials/testing.js +1 -1
- package/dist/shared/credentials/types.d.ts +1 -1
- package/dist/shared/paths.d.ts +6 -1
- package/dist/shared/paths.js +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/tools/directToolCatalog.exec.d.ts +5 -0
- package/dist/tools/directToolCatalog.meta.d.ts +1 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +0 -1
- package/dist/tools/github_fetch_content/scheme.d.ts +6 -89
- package/dist/tools/github_search_code/scheme.d.ts +4 -6
- package/dist/tools/github_search_pull_requests/scheme.d.ts +0 -1
- package/dist/tools/github_search_repos/execution.d.ts +58 -0
- package/dist/tools/github_search_repos/scheme.d.ts +3 -6
- package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -1
- package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -4
- package/dist/tools/local_binary_inspect/scheme.d.ts +97 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +66 -0
- package/dist/tools/local_find_files/scheme.d.ts +49 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +75 -0
- package/dist/tools/local_view_structure/scheme.d.ts +52 -0
- package/dist/tools/lsp/semantic_content/scheme.d.ts +8 -22
- package/dist/tools/lsp/shared/readiness.d.ts +17 -0
- package/dist/tools/lsp/shared/semanticTypes.d.ts +2 -2
- package/dist/tools/package_search/execution.d.ts +23 -0
- package/dist/tools/package_search/scheme.d.ts +10 -4
- package/dist/tools/toolNames.d.ts +2 -1
- package/dist/types/server.d.ts +1 -1
- package/dist/utils/response/bulk.d.ts +1 -0
- package/dist/utils/response/groupedFinalizer.d.ts +7 -2
- package/package.json +7 -3
- package/dist/oql/adapters/v2.d.ts +0 -32
- package/dist/oql/v2params.d.ts +0 -22
- package/dist/shared/config/defaults.d.ts +0 -14
- package/dist/shared/config/loader.d.ts +0 -7
- package/dist/shared/config/resolver.d.ts +0 -2
- package/dist/shared/config/resolverCache.d.ts +0 -12
- package/dist/shared/config/resolverSections.d.ts +0 -10
- package/dist/shared/config/runtimeSurface.d.ts +0 -21
- package/dist/shared/config/types.d.ts +0 -92
- package/dist/shared/config/validator.d.ts +0 -2
- package/dist/shared/credentials/envTokens.d.ts +0 -9
|
@@ -3,9 +3,7 @@ import { invalidateCredentialsCache, _getCacheStats, _resetCredentialsCache } fr
|
|
|
3
3
|
import { OCTOCODE_DIR, CREDENTIALS_FILE, KEY_FILE, encrypt, decrypt, ensureOctocodeDir, readCredentialsStore, writeCredentialsStore } from './credentialEncryption.js';
|
|
4
4
|
import { type RefreshResult, type TokenWithRefreshResult } from './tokenRefresh.js';
|
|
5
5
|
import { resolveToken, type ResolvedToken, resolveTokenWithRefresh, type ResolvedTokenWithRefresh, resolveTokenFull, type FullTokenResolution, type GhCliTokenGetter, resetTokenResolution } from './tokenResolution.js';
|
|
6
|
-
import { getTokenFromEnv, getEnvTokenSource, hasEnvToken, ENV_TOKEN_VARS } from './envTokens.js';
|
|
7
6
|
import { isTokenExpired, isRefreshTokenExpired } from './credentialUtils.js';
|
|
8
|
-
export { getTokenFromEnv, getEnvTokenSource, hasEnvToken, ENV_TOKEN_VARS };
|
|
9
7
|
export declare function storeCredentials(credentials: StoredCredentials): Promise<StoreResult>;
|
|
10
8
|
export interface GetCredentialsOptions {
|
|
11
9
|
bypassCache?: boolean;
|
|
@@ -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
|
-
function
|
|
8
|
+
function r(e){return e.toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"")}function s(e){if(!e.token.expiresAt)return!1;let n=new Date(e.token.expiresAt);if(isNaN(n.getTime()))return!0;let t=new Date;return n.getTime()-t.getTime()<300*1e3}var o=new Map,i=300*1e3;function a(e){let n=r(e),t=o.get(n);return!t||Date.now()-t.cachedAt>=i?!1:t.credentials?!s(t.credentials):!0}function l(){let e=Date.now();return{size:o.size,entries:Array.from(o.entries()).map(([n,t])=>({hostname:n,age:e-t.cachedAt,valid:a(n)}))}}function c(){o.clear()}import m from"node:fs";import E from"node:path";import C from"node:os";import _ from"node:path";import{existsSync as k,readFileSync as R}from"node:fs";import y from"node:path";import{execFile as P}from"child_process";var u=null;function f(){u=null}export{l as _getCacheStats,c as _resetCredentialsCache,f as resetTokenResolution};
|
|
@@ -25,4 +25,4 @@ export interface CredentialsStore {
|
|
|
25
25
|
version: number;
|
|
26
26
|
credentials: Record<string, StoredCredentials>;
|
|
27
27
|
}
|
|
28
|
-
export type TokenSource = 'env:OCTOCODE_TOKEN' | 'env:GH_TOKEN' | 'env:GITHUB_TOKEN' | 'octocode-storage' | 'gh-cli' | null;
|
|
28
|
+
export type TokenSource = 'env:OCTOCODE_TOKEN' | 'env:GH_TOKEN' | 'env:GITHUB_TOKEN' | 'env:GITHUB_PERSONAL_ACCESS_TOKEN' | 'octocode-storage' | 'gh-cli' | null;
|
package/dist/shared/paths.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Octocode's home directory.
|
|
2
|
+
* Octocode's home directory. Set OCTOCODE_HOME to isolate caches in tests/CI.
|
|
3
|
+
* Default per platform:
|
|
3
4
|
* - macOS: `~/.octocode`
|
|
4
5
|
* - Linux: `${XDG_CONFIG_HOME:-~/.config}/.octocode`
|
|
5
6
|
* - Windows: `%APPDATA%\.octocode`
|
|
7
|
+
*
|
|
8
|
+
* Implementation delegated to @octocodeai/config — single source of truth.
|
|
6
9
|
*/
|
|
7
10
|
export declare function getDefaultOctocodeHome(): string;
|
|
11
|
+
/** Octocode home directory — same as OCTOCODE_HOME, exposed for tool/cache use. */
|
|
12
|
+
export declare function getOctocodeDir(): string;
|
|
8
13
|
export declare const OCTOCODE_HOME: string;
|
|
9
14
|
export declare const paths: {
|
|
10
15
|
readonly home: string;
|
package/dist/shared/paths.js
CHANGED
|
@@ -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{existsSync as
|
|
8
|
+
import{existsSync as r,mkdirSync as i}from"node:fs";import{join as t}from"node:path";import T from"node:fs";import _ from"node:path";import p from"node:os";import n from"node:path";import{existsSync as L,readFileSync as R}from"node:fs";import S from"node:path";function d(c=process.env){let u=c.OCTOCODE_HOME;if(u&&u.trim())return n.resolve(u.trim());let l=p.homedir(),f=p.platform();if(f==="win32"){let h=c.APPDATA??n.join(l,"AppData","Roaming");return n.join(h,".octocode")}if(f==="darwin")return n.join(l,".octocode");let v=c.XDG_CONFIG_HOME??n.join(l,".config");return n.join(v,".octocode")}var s=448;function m(){return d(process.env)}function M(){return e}var e=m(),o={home:e,config:t(e,".octocoderc"),credentials:t(e,"credentials.json"),key:t(e,".key"),session:t(e,"session.json"),stats:t(e,"stats.json"),tmp:t(e,"tmp"),clone:t(e,"tmp","clone"),tree:t(e,"tmp","tree"),binary:t(e,"tmp","binary"),repos:t(e,"tmp","clone"),unzip:t(e,"tmp","unzip"),cliConfig:t(e,"config.json"),lspConfig:t(e,"lsp-servers.json")};function O(){r(o.home)||i(o.home,{recursive:!0,mode:s})}function I(){E()}function a(){O(),r(o.tmp)||i(o.tmp,{recursive:!0,mode:s})}function E(){a(),r(o.clone)||i(o.clone,{recursive:!0,mode:s})}function D(){a(),r(o.tree)||i(o.tree,{recursive:!0,mode:s})}function j(){a(),r(o.binary)||i(o.binary,{recursive:!0,mode:s})}function F(){a(),r(o.unzip)||i(o.unzip,{recursive:!0,mode:s})}export{e as OCTOCODE_HOME,j as ensureBinary,E as ensureClone,O as ensureHome,I as ensureRepos,a as ensureTmp,D as ensureTree,F as ensureUnzip,m as getDefaultOctocodeHome,M as getOctocodeDir,o as paths};
|
|
@@ -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 pt}from"node:crypto";import{existsSync as J,readFileSync as ye,writeFileSync as st,unlinkSync as nt,renameSync as ot}from"node:fs";function h(e){return e.toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"")}function P(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 z(e){if(!e.token.refreshTokenExpiresAt)return!1;let t=new Date(e.token.refreshTokenExpiresAt);return isNaN(t.getTime())?!0:new Date>=t}var E=new Map,Ae=300*1e3;function we(e){let t=h(e),r=E.get(t);return!r||Date.now()-r.cachedAt>=Ae?!1:r.credentials?!P(r.credentials):!0}function ee(e){e?E.delete(h(e)):E.clear()}function te(e){let t=h(e);if(we(t))return E.get(t).credentials}function re(e,t){let r=h(e);E.set(r,{credentials:t,cachedAt:Date.now()})}import{existsSync as oe,readFileSync as ie,writeFileSync as ae,unlinkSync as Xt,statSync as je,chmodSync as Ue}from"node:fs";import{createCipheriv as Me,createDecipheriv as Be,randomBytes as ce}from"node:crypto";import{existsSync as He,mkdirSync as De}from"node:fs";import{join as c}from"node:path";import _ from"node:os";import Oe from"node:path";var I=_.platform()==="win32",W=_.platform()==="darwin",Le=_.platform()==="linux",T=_.homedir();function K(){return I?process.env.APPDATA||Oe.join(T,"AppData","Roaming"):T}var V=".octocode",Fe=448;function _e(e){let t=process.env[e];return t&&t.trim().length>0?t:void 0}function Ie(){return I?c(K(),V):W?c(T,V):c(_e("XDG_CONFIG_HOME")??c(T,".config"),V)}var u=Ie(),f={home:u,config:c(u,".octocoderc"),credentials:c(u,"credentials.json"),key:c(u,".key"),session:c(u,"session.json"),stats:c(u,"stats.json"),tmp:c(u,"tmp"),clone:c(u,"tmp","clone"),tree:c(u,"tmp","tree"),binary:c(u,"tmp","binary"),repos:c(u,"tmp","clone"),unzip:c(u,"tmp","unzip"),cliConfig:c(u,"config.json"),lspConfig:c(u,"lsp-servers.json")};function se(){He(f.home)||De(f.home,{recursive:!0,mode:Fe})}import{z as a}from"zod";var Ne=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()}),Ge=a.object({hostname:a.string(),username:a.string(),token:Ne,gitProtocol:a.enum(["ssh","https"]),createdAt:a.string(),updatedAt:a.string()}),ne=a.object({version:a.number(),credentials:a.record(a.string(),Ge)});var ze=f.home,N=f.credentials,k=f.key,ue="aes-256-gcm",We=16;function x(){se()}function le(){if(x(),oe(k))return je(k).mode&511&63&&Ue(k,384),Buffer.from(ie(k,"utf8"),"hex");let e=ce(32);return ae(k,e.toString("hex"),{mode:384}),e}function fe(e){let t=le(),r=ce(We),s=Me(ue,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 pe(e){let t=le(),[r,s,n]=e.split(":");if(!r||!s||!n)throw new Error("Invalid encrypted data format");let i=Buffer.from(r,"hex"),C=Buffer.from(s,"hex"),m=Be(ue,t,i);m.setAuthTag(C);let Q=m.update(n,"hex","utf8");return Q+=m.final("utf8"),Q}function $(){if(x(),!oe(N))return{version:1,credentials:{}};try{let e=ie(N,"utf8"),t=pe(e),r=JSON.parse(t),s=ne.safeParse(r);return s.success?s.data:{version:1,credentials:{}}}catch{return{version:1,credentials:{}}}}function de(e){x();let t=fe(JSON.stringify(e,null,2));ae(N,t,{mode:384})}import{refreshToken as Ke}from"@octokit/oauth-methods";import{request as Ve}from"@octokit/request";var G="178c6fc778ccc68e1d6a",A="github.com";function $e(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 Je(e){return e==="github.com"||e===A?"https://api.github.com":`https://${e}/api/v3`}async function me(e,t=A,r=G){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(z(s))return{success:!1,error:"Refresh token has expired. Please login again."};try{let n=await Ke({clientType:"github-app",clientId:r,clientSecret:"",refreshToken:s.token.refreshToken,request:Ve.defaults({baseUrl:Je(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?$e(n.message):"Token refresh failed"}}}async function he(e,t=A,r=G){let s=await e.getCredentials(t);if(!s||!s.token)return{token:null,source:"none"};if(!P(s))return{token:s.token.token,source:"stored",username:s.username};if(s.token.refreshToken){let n=await me(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{execFile as fr}from"child_process";var qe=null;function Se(e){qe=e}async function Ye(e){let t=h(e.hostname),r={...e,hostname:t,updatedAt:new Date().toISOString()};try{let s=$();return s.credentials[t]=r,de(s),ee(t),{success:!0}}catch{throw new Error("Failed to store credentials")}}async function ge(e="github.com",t){let r=h(e);if(!t?.bypassCache){let i=te(r);if(i!==void 0)return i}let n=$().credentials[r]||null;return re(r,n),n}async function Ze(e,t){let r=await ge(e);return r?(r.token=t,r.updatedAt=new Date().toISOString(),await Ye(r),!0):!1}async function Xe(e,t){return he({getCredentials:ge,updateToken:Ze},e,t)}Se({getTokenWithRefresh:Xe});import{z as o}from"zod";var Qe=o.object({rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),calls:o.number()}),et=o.object({hits:o.record(o.string(),o.number()).default({}),rateLimits:o.number().default(0)}),j=o.record(o.string(),o.number()).default({}),tt=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:j,rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),charSavingsCalls:o.number(),githubCacheHits:o.number(),githubCacheRateLimits:o.number(),packageRegistryFailures:o.number().default(0),packageRegistryFailuresByRegistry:j}),U=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:j,charsSavedByTool:o.record(o.string(),Qe).default({}),githubCacheHits:et.default({hits:{},rateLimits:0}),packageRegistryFailures:j,totalUsage:tt.optional()}),Ce=o.object({version:o.literal(1),sessionId:o.string(),createdAt:o.string(),lastActiveAt:o.string(),stats:U.optional()}),Te=o.object({version:o.literal(1),stats:U});function ke(e){return Object.values(e).reduce((t,r)=>t+r,0)}function rt(e){let t=e.charsSavedByTool??{},r=e.githubCacheHits??{hits:{},rateLimits:0},s=e.rateLimitsByProvider??{},n=e.packageRegistryFailures??{},i=Object.values(t).reduce((C,m)=>({rawChars:C.rawChars+m.rawChars,responseChars:C.responseChars+m.responseChars,savedChars:C.savedChars+m.savedChars,charSavingsCalls:C.charSavingsCalls+m.calls}),{rawChars:0,responseChars:0,savedChars:0,charSavingsCalls:0});return{toolCalls:e.toolCalls,errors:e.errors,rateLimits:e.rateLimits,rateLimitsByProvider:s,...i,githubCacheHits:ke(r.hits),githubCacheRateLimits:r.rateLimits,packageRegistryFailures:ke(n),packageRegistryFailuresByRegistry:n}}function p(e){let t={...e,rateLimitsByProvider:e.rateLimitsByProvider??{},charsSavedByTool:e.charsSavedByTool??{},githubCacheHits:e.githubCacheHits??{hits:{},rateLimits:0},packageRegistryFailures:e.packageRegistryFailures??{}};return{...t,totalUsage:rt(t)}}function w(){return p({toolCalls:0,errors:0,rateLimits:0,rateLimitsByProvider:{},charsSavedByTool:{},githubCacheHits:{hits:{},rateLimits:0},packageRegistryFailures:{}})}var y=f.session,v=f.stats;function xe(e,t){let r=`${e}.tmp`;st(r,JSON.stringify(t,null,2),{mode:384}),ot(r,e)}function it(e){let{stats:t,...r}=e;return r}function at(e){let t=JSON.parse(e),r=Te.safeParse(t);if(r.success)return p(r.data.stats);let s=U.safeParse(t);return s.success?p(s.data):null}function ct(e){let t=e?p(e):w();if(!J(v))return t;try{let r=ye(v,"utf8"),s=at(r);return s||t}catch{return t}}function M(e){x(),xe(v,{version:e.version,stats:p(e.stats)}),xe(y,it(e))}function ve(){if(!J(y))return null;try{let e=ye(y,"utf8"),t=JSON.parse(e),r=Ce.safeParse(t);return r.success?{...r.data,stats:ct(r.data.stats)}:null}catch{return null}}function Re(){let e=!1;for(let t of[y,v])if(J(t))try{nt(t),e=!0}catch{return!1}return e}var ut=6e4,l=null,S=!1,R=null,q=!1,O=null,L=null,H=null,B=!1;function lt(){q||(q=!0,O=()=>{D()},L=()=>{D()},H=()=>{D()},process.on("exit",O),process.on("SIGINT",L),process.on("SIGTERM",H))}function Y(){O&&(process.removeListener("exit",O),O=null),L&&(process.removeListener("SIGINT",L),L=null),H&&(process.removeListener("SIGTERM",H),H=null),q=!1}function ft(){R||(R=setInterval(()=>{S&&l&&(M(l),S=!1)},ut),R.unref())}function Z(){R&&(clearInterval(R),R=null)}function b(){if(l)return l;let e=ve();return e&&(l=e),e}function g(e){l=e,S=!0,lt(),ft()}function F(){S&&l&&(M(l),S=!1)}function D(){if(!B&&S&&l){B=!0;try{M(l),S=!1}catch{}finally{B=!1}}}function X(){l=null,S=!1,B=!1}function be(){X(),Z(),Y()}var dt=1;function mt(e){return p(e)}function ht(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 Pe(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 St(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 Ee(){let e=new Date().toISOString();return{version:dt,sessionId:pt(),createdAt:e,lastActiveAt:e,stats:w()}}function gt(){return b()}function Ct(e){g(e)}function Tt(){F()}function kt(){D()}function xt(e){if(e?.forceNew){let s=Ee();return g(s),F(),s}let t=b();if(t){let s={...t,lastActiveAt:new Date().toISOString()};return g(s),F(),s}let r=Ee();return g(r),F(),r}function yt(){return b()?.sessionId??null}function d(e){let t=b();if(!t)return{success:!1,session:null};let r=mt(t.stats),s=p({toolCalls:r.toolCalls+(e.toolCalls??0),errors:r.errors+(e.errors??0),rateLimits:r.rateLimits+(e.rateLimits??0),rateLimitsByProvider:Pe(r.rateLimitsByProvider,e.rateLimitsByProvider),charsSavedByTool:ht(r.charsSavedByTool,e.charsSavedByTool),githubCacheHits:St(r.githubCacheHits,e.githubCacheHits),packageRegistryFailures:Pe(r.packageRegistryFailures,e.packageRegistryFailures)}),n={...t,lastActiveAt:new Date().toISOString(),stats:s};return g(n),{success:!0,session:n}}function vt(e=1){return d({toolCalls:e})}function Rt(e=1){return d({errors:e})}function bt(e=1){return d({rateLimits:e})}function Pt(e,t=1){return d({rateLimits:t,rateLimitsByProvider:{[e]:t}})}function Et(e,t,r){let s=Number.isFinite(t)?Math.max(0,t):0,n=Number.isFinite(r)?Math.max(0,r):0;return d({charsSavedByTool:{[e]:{rawChars:s,responseChars:n,savedChars:Math.max(0,s-n),calls:1}}})}function At(e,t=1){return d({githubCacheHits:{hits:{[e]:t},rateLimits:0}})}function wt(e=1){return d({githubCacheHits:{hits:{},rateLimits:e}})}function Ot(e,t=1){return d({packageRegistryFailures:{[e]:t}})}function Lt(){let e=b();if(!e)return{success:!1,session:null};let t={...e,lastActiveAt:new Date().toISOString(),stats:w()};return g(t),{success:!0,session:t}}function Ht(){return X(),Z(),Y(),Re()}function Dt(){be()}export{y as SESSION_FILE,v as STATS_FILE,Dt as _resetSessionState,Ht as deleteSession,Tt as flushSession,kt as flushSessionSync,xt as getOrCreateSession,yt as getSessionId,Rt as incrementErrors,At as incrementGitHubCacheHits,wt as incrementGitHubCacheRateLimits,Ot as incrementPackageRegistryFailures,Pt as incrementRateLimitByProvider,bt as incrementRateLimits,vt as incrementToolCalls,Et as incrementToolCharSavings,gt as readSession,Lt as resetSessionStats,d as updateSessionStats,Ct as writeSession};
|
|
8
|
+
import{randomUUID as it}from"node:crypto";import{existsSync as $,readFileSync as Te,writeFileSync as Ye,unlinkSync as Qe,renameSync as Ze}from"node:fs";function m(e){return e.toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"")}function O(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 G(e){if(!e.token.refreshTokenExpiresAt)return!1;let t=new Date(e.token.refreshTokenExpiresAt);return isNaN(t.getTime())?!0:new Date>=t}var x=new Map,Ee=300*1e3;function Oe(e){let t=m(e),r=x.get(t);return!r||Date.now()-r.cachedAt>=Ee?!1:r.credentials?!O(r.credentials):!0}function X(e){e?x.delete(m(e)):x.clear()}function q(e){let t=m(e);if(Oe(t))return x.get(t).credentials}function Y(e,t){let r=m(e);x.set(r,{credentials:t,cachedAt:Date.now()})}import{existsSync as re,readFileSync as ne,writeFileSync as se,unlinkSync as qt,statSync as Fe,chmodSync as Ie}from"node:fs";import{createCipheriv as De,createDecipheriv as He,randomBytes as oe}from"node:crypto";import{existsSync as xe,mkdirSync as Ae}from"node:fs";import{join as u}from"node:path";import Pt from"node:fs";import It from"node:path";import Q from"node:os";import T from"node:path";import{existsSync as Nt,readFileSync as Mt}from"node:fs";import Gt from"node:path";function Z(e=process.env){let t=e.OCTOCODE_HOME;if(t&&t.trim())return T.resolve(t.trim());let r=Q.homedir(),n=Q.platform();if(n==="win32"){let i=e.APPDATA??T.join(r,"AppData","Roaming");return T.join(i,".octocode")}if(n==="darwin")return T.join(r,".octocode");let s=e.XDG_CONFIG_HOME??T.join(r,".config");return T.join(s,".octocode")}var _e=448;function we(){return Z(process.env)}var c=we(),f={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"),binary:u(c,"tmp","binary"),repos:u(c,"tmp","clone"),unzip:u(c,"tmp","unzip"),cliConfig:u(c,"config.json"),lspConfig:u(c,"lsp-servers.json")};function ee(){xe(f.home)||Ae(f.home,{recursive:!0,mode:_e})}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()}),Pe=a.object({hostname:a.string(),username:a.string(),token:Le,gitProtocol:a.enum(["ssh","https"]),createdAt:a.string(),updatedAt:a.string()}),te=a.object({version:a.number(),credentials:a.record(a.string(),Pe)});var Ue=f.home,D=f.credentials,C=f.key,ie="aes-256-gcm",Ne=16;function y(){ee()}function ae(){if(y(),re(C))return Fe(C).mode&511&63&&Ie(C,384),Buffer.from(ne(C,"utf8"),"hex");let e=oe(32);return se(C,e.toString("hex"),{mode:384}),e}function ce(e){let t=ae(),r=oe(Ne),n=De(ie,t,r),s=n.update(e,"utf8","hex");s+=n.final("hex");let i=n.getAuthTag();return`${r.toString("hex")}:${i.toString("hex")}:${s}`}function ue(e){let t=ae(),[r,n,s]=e.split(":");if(!r||!n||!s)throw new Error("Invalid encrypted data format");let i=Buffer.from(r,"hex"),v=Buffer.from(n,"hex"),h=He(ie,t,i);h.setAuthTag(v);let J=h.update(s,"hex","utf8");return J+=h.final("utf8"),J}function B(){if(y(),!re(D))return{version:1,credentials:{}};try{let e=ne(D,"utf8"),t=ue(e),r=JSON.parse(t),n=te.safeParse(r);return n.success?n.data:{version:1,credentials:{}}}catch{return{version:1,credentials:{}}}}function le(e){y();let t=ce(JSON.stringify(e,null,2));se(D,t,{mode:384})}import{refreshToken as Me}from"@octokit/oauth-methods";import{request as je}from"@octokit/request";var H="178c6fc778ccc68e1d6a",A="github.com";function Ge(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 Be(e){return e==="github.com"||e===A?"https://api.github.com":`https://${e}/api/v3`}async function fe(e,t=A,r=H){let n=await e.getCredentials(t);if(!n)return{success:!1,error:`Not logged in to ${t}`};if(!n.token.refreshToken)return{success:!1,error:"Token does not support refresh (OAuth App tokens do not expire)"};if(G(n))return{success:!1,error:"Refresh token has expired. Please login again."};try{let s=await Me({clientType:"github-app",clientId:r,clientSecret:"",refreshToken:n.token.refreshToken,request:je.defaults({baseUrl:Be(t)})}),i={token:s.authentication.token,tokenType:"oauth",refreshToken:s.authentication.refreshToken,expiresAt:s.authentication.expiresAt,refreshTokenExpiresAt:s.authentication.refreshTokenExpiresAt};return await e.updateToken(t,i),{success:!0,username:n.username,hostname:t}}catch(s){return{success:!1,error:s instanceof Error?Ge(s.message):"Token refresh failed"}}}async function de(e,t=A,r=H){let n=await e.getCredentials(t);if(!n||!n.token)return{token:null,source:"none"};if(!O(n))return{token:n.token.token,source:"stored",username:n.username};if(n.token.refreshToken){let s=await fe(e,t,r);if(s.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:s.error}}return{token:null,source:"none",refreshError:"Token expired and no refresh token available"}}import{execFile as cr}from"child_process";var $e=null;function pe(e){$e=e}async function We(e){let t=m(e.hostname),r={...e,hostname:t,updatedAt:new Date().toISOString()};try{let n=B();return n.credentials[t]=r,le(n),X(t),{success:!0}}catch{throw new Error("Failed to store credentials")}}async function he(e="github.com",t){let r=m(e);if(!t?.bypassCache){let i=q(r);if(i!==void 0)return i}let s=B().credentials[r]||null;return Y(r,s),s}async function ze(e,t){let r=await he(e);return r?(r.token=t,r.updatedAt=new Date().toISOString(),await We(r),!0):!1}async function Ke(e,t){return de({getCredentials:he,updateToken:ze},e,t)}pe({getTokenWithRefresh:Ke});import{z as o}from"zod";var Ve=o.object({rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),calls:o.number()}),Je=o.object({hits:o.record(o.string(),o.number()).default({}),rateLimits:o.number().default(0)}),U=o.record(o.string(),o.number()).default({}),Xe=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:U,rawChars:o.number(),responseChars:o.number(),savedChars:o.number(),charSavingsCalls:o.number(),githubCacheHits:o.number(),githubCacheRateLimits:o.number(),packageRegistryFailures:o.number().default(0),packageRegistryFailuresByRegistry:U}),N=o.object({toolCalls:o.number(),errors:o.number(),rateLimits:o.number(),rateLimitsByProvider:U,charsSavedByTool:o.record(o.string(),Ve).default({}),githubCacheHits:Je.default({hits:{},rateLimits:0}),packageRegistryFailures:U,totalUsage:Xe.optional()}),me=o.object({version:o.literal(1),sessionId:o.string(),createdAt:o.string(),lastActiveAt:o.string(),stats:N.optional()}),ge=o.object({version:o.literal(1),stats:N});function Se(e){return Object.values(e).reduce((t,r)=>t+r,0)}function qe(e){let t=e.charsSavedByTool??{},r=e.githubCacheHits??{hits:{},rateLimits:0},n=e.rateLimitsByProvider??{},s=e.packageRegistryFailures??{},i=Object.values(t).reduce((v,h)=>({rawChars:v.rawChars+h.rawChars,responseChars:v.responseChars+h.responseChars,savedChars:v.savedChars+h.savedChars,charSavingsCalls:v.charSavingsCalls+h.calls}),{rawChars:0,responseChars:0,savedChars:0,charSavingsCalls:0});return{toolCalls:e.toolCalls,errors:e.errors,rateLimits:e.rateLimits,rateLimitsByProvider:n,...i,githubCacheHits:Se(r.hits),githubCacheRateLimits:r.rateLimits,packageRegistryFailures:Se(s),packageRegistryFailuresByRegistry:s}}function d(e){let t={...e,rateLimitsByProvider:e.rateLimitsByProvider??{},charsSavedByTool:e.charsSavedByTool??{},githubCacheHits:e.githubCacheHits??{hits:{},rateLimits:0},packageRegistryFailures:e.packageRegistryFailures??{}};return{...t,totalUsage:qe(t)}}function _(){return d({toolCalls:0,errors:0,rateLimits:0,rateLimitsByProvider:{},charsSavedByTool:{},githubCacheHits:{hits:{},rateLimits:0},packageRegistryFailures:{}})}var k=f.session,b=f.stats;function ve(e,t){let r=`${e}.tmp`;Ye(r,JSON.stringify(t,null,2),{mode:384}),Ze(r,e)}function et(e){let{stats:t,...r}=e;return r}function tt(e){let t=JSON.parse(e),r=ge.safeParse(t);if(r.success)return d(r.data.stats);let n=N.safeParse(t);return n.success?d(n.data):null}function rt(e){let t=e?d(e):_();if(!$(b))return t;try{let r=Te(b,"utf8"),n=tt(r);return n||t}catch{return t}}function M(e){y(),ve(b,{version:e.version,stats:d(e.stats)}),ve(k,et(e))}function Ce(){if(!$(k))return null;try{let e=Te(k,"utf8"),t=JSON.parse(e),r=me.safeParse(t);return r.success?{...r.data,stats:rt(r.data.stats)}:null}catch{return null}}function ye(){let e=!1;for(let t of[k,b])if($(t))try{Qe(t),e=!0}catch{return!1}return e}var nt=6e4,l=null,g=!1,R=null,W=!1,w=null,L=null,P=null,j=!1;function st(){W||(W=!0,w=()=>{F()},L=()=>{F()},P=()=>{F()},process.on("exit",w),process.on("SIGINT",L),process.on("SIGTERM",P))}function z(){w&&(process.removeListener("exit",w),w=null),L&&(process.removeListener("SIGINT",L),L=null),P&&(process.removeListener("SIGTERM",P),P=null),W=!1}function ot(){R||(R=setInterval(()=>{g&&l&&(M(l),g=!1)},nt),R.unref())}function K(){R&&(clearInterval(R),R=null)}function E(){if(l)return l;let e=Ce();return e&&(l=e),e}function S(e){l=e,g=!0,st(),ot()}function I(){g&&l&&(M(l),g=!1)}function F(){if(!j&&g&&l){j=!0;try{M(l),g=!1}catch{}finally{j=!1}}}function V(){l=null,g=!1,j=!1}function ke(){V(),K(),z()}var at=1;function ct(e){return d(e)}function ut(e,t){if(!t)return e;let r={...e};for(let[n,s]of Object.entries(t)){let i=r[n]??{rawChars:0,responseChars:0,savedChars:0,calls:0};r[n]={rawChars:i.rawChars+s.rawChars,responseChars:i.responseChars+s.responseChars,savedChars:i.savedChars+s.savedChars,calls:i.calls+s.calls}}return r}function be(e,t){if(!t)return e;let r={...e};for(let[n,s]of Object.entries(t))r[n]=(r[n]??0)+s;return r}function lt(e,t){if(!t)return e;let r={...e.hits};for(let[n,s]of Object.entries(t.hits??{}))r[n]=(r[n]??0)+s;return{hits:r,rateLimits:e.rateLimits+(t.rateLimits??0)}}function Re(){let e=new Date().toISOString();return{version:at,sessionId:it(),createdAt:e,lastActiveAt:e,stats:_()}}function ft(){return E()}function dt(e){S(e)}function pt(){I()}function ht(){F()}function mt(e){if(e?.forceNew){let n=Re();return S(n),I(),n}let t=E();if(t){let n={...t,lastActiveAt:new Date().toISOString()};return S(n),I(),n}let r=Re();return S(r),I(),r}function gt(){return E()?.sessionId??null}function p(e){let t=E();if(!t)return{success:!1,session:null};let r=ct(t.stats),n=d({toolCalls:r.toolCalls+(e.toolCalls??0),errors:r.errors+(e.errors??0),rateLimits:r.rateLimits+(e.rateLimits??0),rateLimitsByProvider:be(r.rateLimitsByProvider,e.rateLimitsByProvider),charsSavedByTool:ut(r.charsSavedByTool,e.charsSavedByTool),githubCacheHits:lt(r.githubCacheHits,e.githubCacheHits),packageRegistryFailures:be(r.packageRegistryFailures,e.packageRegistryFailures)}),s={...t,lastActiveAt:new Date().toISOString(),stats:n};return S(s),{success:!0,session:s}}function St(e=1){return p({toolCalls:e})}function vt(e=1){return p({errors:e})}function Tt(e=1){return p({rateLimits:e})}function Ct(e,t=1){return p({rateLimits:t,rateLimitsByProvider:{[e]:t}})}function yt(e,t,r){let n=Number.isFinite(t)?Math.max(0,t):0,s=Number.isFinite(r)?Math.max(0,r):0;return p({charsSavedByTool:{[e]:{rawChars:n,responseChars:s,savedChars:Math.max(0,n-s),calls:1}}})}function kt(e,t=1){return p({githubCacheHits:{hits:{[e]:t},rateLimits:0}})}function bt(e=1){return p({githubCacheHits:{hits:{},rateLimits:e}})}function Rt(e,t=1){return p({packageRegistryFailures:{[e]:t}})}function Et(){let e=E();if(!e)return{success:!1,session:null};let t={...e,lastActiveAt:new Date().toISOString(),stats:_()};return S(t),{success:!0,session:t}}function Ot(){return V(),K(),z(),ye()}function xt(){ke()}export{k as SESSION_FILE,b as STATS_FILE,xt as _resetSessionState,Ot as deleteSession,pt as flushSession,ht as flushSessionSync,mt as getOrCreateSession,gt as getSessionId,vt as incrementErrors,kt as incrementGitHubCacheHits,bt as incrementGitHubCacheRateLimits,Rt as incrementPackageRegistryFailures,Ct as incrementRateLimitByProvider,Tt as incrementRateLimits,St as incrementToolCalls,yt as incrementToolCharSavings,ft as readSession,Et as resetSessionStats,p as updateSessionStats,dt as writeSession};
|
|
@@ -7,5 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
9
9
|
import { DirectToolInputError } from './directToolCatalog.meta.js';
|
|
10
|
+
type InitializeFn = () => Promise<void>;
|
|
11
|
+
/** @internal — test use only; not part of the public API. */
|
|
12
|
+
export declare function _overrideInitialize(fn: InitializeFn): void;
|
|
13
|
+
/** @internal — test use only; not part of the public API. */
|
|
14
|
+
export declare function _resetInitialize(): void;
|
|
10
15
|
export declare function executeDirectTool(name: string, input: unknown): Promise<CallToolResult>;
|
|
11
16
|
export { DirectToolInputError };
|
|
@@ -52,6 +52,7 @@ export interface DirectToolMetadata {
|
|
|
52
52
|
}
|
|
53
53
|
export interface PrepareDirectToolInputOptions {
|
|
54
54
|
sourceLabel?: string;
|
|
55
|
+
rejectUnknownFields?: boolean;
|
|
55
56
|
onUnknownFields?: (unknownFields: string[], queryIndex: number) => void;
|
|
56
57
|
}
|
|
57
58
|
export declare class DirectToolInputError extends Error {
|
|
@@ -82,7 +82,6 @@ export declare const GitHubCloneRepoOutputLocalSchema: import("zod").ZodObject<{
|
|
|
82
82
|
kind: import("zod").ZodString;
|
|
83
83
|
}, import("zod/v4/core").$loose>]>>>;
|
|
84
84
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
85
|
-
hints: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
86
85
|
base: import("zod").ZodOptional<import("zod").ZodString>;
|
|
87
86
|
shared: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>>;
|
|
88
87
|
responsePagination: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -50,88 +50,6 @@ export declare const GitHubFetchContentOutputLocalSchema: z.ZodObject<{
|
|
|
50
50
|
}, z.core.$strip>>;
|
|
51
51
|
results: z.ZodArray<z.ZodObject<{
|
|
52
52
|
id: z.ZodString;
|
|
53
|
-
owner: z.ZodString;
|
|
54
|
-
repo: z.ZodString;
|
|
55
|
-
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
-
path: z.ZodString;
|
|
57
|
-
content: z.ZodString;
|
|
58
|
-
localPath: z.ZodOptional<z.ZodString>;
|
|
59
|
-
repoRoot: z.ZodOptional<z.ZodString>;
|
|
60
|
-
contentView: z.ZodOptional<z.ZodEnum<{
|
|
61
|
-
none: "none";
|
|
62
|
-
standard: "standard";
|
|
63
|
-
symbols: "symbols";
|
|
64
|
-
}>>;
|
|
65
|
-
isSkeleton: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
-
totalLines: z.ZodOptional<z.ZodNumber>;
|
|
67
|
-
sourceChars: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
sourceBytes: z.ZodOptional<z.ZodNumber>;
|
|
69
|
-
resolvedBranch: z.ZodOptional<z.ZodString>;
|
|
70
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
currentPage: z.ZodNumber;
|
|
72
|
-
totalPages: z.ZodNumber;
|
|
73
|
-
hasMore: z.ZodBoolean;
|
|
74
|
-
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
75
|
-
nextMatchPage: z.ZodOptional<z.ZodNumber>;
|
|
76
|
-
charOffset: z.ZodOptional<z.ZodNumber>;
|
|
77
|
-
charLength: z.ZodOptional<z.ZodNumber>;
|
|
78
|
-
totalChars: z.ZodOptional<z.ZodNumber>;
|
|
79
|
-
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
80
|
-
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
81
|
-
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
83
|
-
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
84
|
-
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
85
|
-
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
86
|
-
}, z.core.$strip>>;
|
|
87
|
-
isPartial: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
-
startLine: z.ZodOptional<z.ZodNumber>;
|
|
89
|
-
endLine: z.ZodOptional<z.ZodNumber>;
|
|
90
|
-
matchRanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
-
start: z.ZodNumber;
|
|
92
|
-
end: z.ZodNumber;
|
|
93
|
-
}, z.core.$strip>>>;
|
|
94
|
-
lastModified: z.ZodOptional<z.ZodString>;
|
|
95
|
-
lastModifiedBy: z.ZodOptional<z.ZodString>;
|
|
96
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
|
-
matchNotFound: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
-
searchedFor: z.ZodOptional<z.ZodString>;
|
|
99
|
-
cached: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
-
}, z.core.$strip>>>;
|
|
101
|
-
directories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
-
path: z.ZodString;
|
|
103
|
-
localPath: z.ZodString;
|
|
104
|
-
repoRoot: z.ZodOptional<z.ZodString>;
|
|
105
|
-
fileCount: z.ZodNumber;
|
|
106
|
-
totalSize: z.ZodNumber;
|
|
107
|
-
complete: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
-
directoryEntryCount: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
eligibleFileCount: z.ZodOptional<z.ZodNumber>;
|
|
110
|
-
savedFileCount: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
skipped: z.ZodOptional<z.ZodObject<{
|
|
112
|
-
nonFile: z.ZodNumber;
|
|
113
|
-
missingDownloadUrl: z.ZodNumber;
|
|
114
|
-
oversized: z.ZodNumber;
|
|
115
|
-
binary: z.ZodNumber;
|
|
116
|
-
fileLimit: z.ZodNumber;
|
|
117
|
-
fetchFailed: z.ZodNumber;
|
|
118
|
-
totalSizeLimit: z.ZodNumber;
|
|
119
|
-
pathTraversal: z.ZodNumber;
|
|
120
|
-
}, z.core.$strip>>;
|
|
121
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
122
|
-
maxDirectoryFiles: z.ZodNumber;
|
|
123
|
-
maxTotalSize: z.ZodNumber;
|
|
124
|
-
maxFileSize: z.ZodNumber;
|
|
125
|
-
}, z.core.$strip>>;
|
|
126
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
127
|
-
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
|
-
path: z.ZodString;
|
|
129
|
-
size: z.ZodNumber;
|
|
130
|
-
type: z.ZodString;
|
|
131
|
-
}, z.core.$strip>>>;
|
|
132
|
-
cached: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
-
resolvedBranch: z.ZodOptional<z.ZodString>;
|
|
134
|
-
}, z.core.$strip>>>;
|
|
135
53
|
data: z.ZodOptional<z.ZodObject<{
|
|
136
54
|
owner: z.ZodString;
|
|
137
55
|
repo: z.ZodString;
|
|
@@ -155,17 +73,16 @@ export declare const GitHubFetchContentOutputLocalSchema: z.ZodObject<{
|
|
|
155
73
|
totalPages: z.ZodNumber;
|
|
156
74
|
hasMore: z.ZodBoolean;
|
|
157
75
|
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
158
|
-
nextMatchPage: z.ZodOptional<z.ZodNumber>;
|
|
159
76
|
charOffset: z.ZodOptional<z.ZodNumber>;
|
|
160
77
|
charLength: z.ZodOptional<z.ZodNumber>;
|
|
161
78
|
totalChars: z.ZodOptional<z.ZodNumber>;
|
|
162
79
|
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
continueChars: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
tool: z.ZodLiteral<"ghGetFileContent">;
|
|
84
|
+
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
169
86
|
}, z.core.$strip>>;
|
|
170
87
|
isPartial: z.ZodOptional<z.ZodBoolean>;
|
|
171
88
|
startLine: z.ZodOptional<z.ZodNumber>;
|
|
@@ -58,18 +58,16 @@ export declare const GitHubCodeSearchOutputLocalSchema: z.ZodObject<{
|
|
|
58
58
|
pagination: z.ZodOptional<z.ZodObject<{
|
|
59
59
|
currentPage: z.ZodNumber;
|
|
60
60
|
totalPages: z.ZodNumber;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
hasMore: z.ZodBoolean;
|
|
62
|
+
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
65
65
|
totalMatchesKind: z.ZodOptional<z.ZodEnum<{
|
|
66
66
|
exact: "exact";
|
|
67
67
|
reported: "reported";
|
|
68
68
|
lowerBound: "lowerBound";
|
|
69
69
|
}>>;
|
|
70
70
|
totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
-
hasMore: z.ZodBoolean;
|
|
72
|
-
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
73
71
|
uniqueFileCount: z.ZodOptional<z.ZodNumber>;
|
|
74
72
|
}, z.core.$strip>>;
|
|
75
73
|
}, z.core.$strip>;
|
|
@@ -206,7 +206,6 @@ export declare const GitHubSearchPullRequestsOutputLocalSchema: z.ZodObject<{
|
|
|
206
206
|
kind: z.ZodString;
|
|
207
207
|
}, z.core.$loose>]>>>;
|
|
208
208
|
error: z.ZodOptional<z.ZodString>;
|
|
209
|
-
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
210
209
|
base: z.ZodOptional<z.ZodString>;
|
|
211
210
|
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
212
211
|
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
@@ -13,5 +13,63 @@ type RepositorySearchExtraFields = {
|
|
|
13
13
|
};
|
|
14
14
|
type PartialReposSearchQuery = WithOptionalMeta<GitHubReposSearchSingleQuery> & RepositorySearchExtraFields;
|
|
15
15
|
export declare function formatRepoLine(repo: GitHubRepositoryOutput): string;
|
|
16
|
+
import type { RepoSearchResult as ProviderRepoSearchResult } from '../../providers/types.js';
|
|
17
|
+
import { type ProviderOperationResult } from '../providerExecution.js';
|
|
18
|
+
type RepoSearchVariantLabel = 'combined' | 'topics' | 'keywords';
|
|
19
|
+
interface RepoSearchVariant {
|
|
20
|
+
label: RepoSearchVariantLabel;
|
|
21
|
+
query: PartialReposSearchQuery;
|
|
22
|
+
}
|
|
23
|
+
interface RepoSearchVariantExecution {
|
|
24
|
+
label: RepoSearchVariantLabel;
|
|
25
|
+
query: PartialReposSearchQuery;
|
|
26
|
+
response: ProviderOperationResult<RepoSearchVariant, ProviderRepoSearchResult>['response'];
|
|
27
|
+
}
|
|
28
|
+
type SuccessfulRepoSearchVariant = RepoSearchVariantExecution & {
|
|
29
|
+
response: Extract<ProviderOperationResult<RepoSearchVariant, ProviderRepoSearchResult>, {
|
|
30
|
+
response: {
|
|
31
|
+
data: ProviderRepoSearchResult;
|
|
32
|
+
};
|
|
33
|
+
}>['response'] & {
|
|
34
|
+
data: ProviderRepoSearchResult;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare function buildResultPagination(pagination: {
|
|
38
|
+
currentPage: number;
|
|
39
|
+
totalPages: number;
|
|
40
|
+
hasMore: boolean;
|
|
41
|
+
entriesPerPage?: number;
|
|
42
|
+
totalMatches?: number;
|
|
43
|
+
reportedTotalMatches?: number;
|
|
44
|
+
reachableTotalMatches?: number;
|
|
45
|
+
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
46
|
+
totalMatchesCapped?: boolean;
|
|
47
|
+
}): {
|
|
48
|
+
nextPage?: number;
|
|
49
|
+
hasMore: boolean;
|
|
50
|
+
totalMatchesCapped?: boolean;
|
|
51
|
+
totalMatchesKind?: "exact" | "reported" | "lowerBound";
|
|
52
|
+
reachableTotalMatches?: number;
|
|
53
|
+
reportedTotalMatches?: number;
|
|
54
|
+
totalMatches?: number;
|
|
55
|
+
currentPage: number;
|
|
56
|
+
totalPages: number;
|
|
57
|
+
perPage: number;
|
|
58
|
+
};
|
|
59
|
+
type EffectivePagination = {
|
|
60
|
+
currentPage: number;
|
|
61
|
+
totalPages: number;
|
|
62
|
+
hasMore: boolean;
|
|
63
|
+
entriesPerPage?: number;
|
|
64
|
+
totalMatches?: number;
|
|
65
|
+
reportedTotalMatches?: number;
|
|
66
|
+
reachableTotalMatches?: number;
|
|
67
|
+
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
68
|
+
totalMatchesCapped?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export declare function buildPartialFailureWarnings(failedVariants: readonly {
|
|
71
|
+
label: RepoSearchVariantLabel;
|
|
72
|
+
}[]): string[] | undefined;
|
|
73
|
+
export declare function buildMergedPagination(variants: SuccessfulRepoSearchVariant[], dedupedCount: number): EffectivePagination | undefined;
|
|
16
74
|
export declare function searchMultipleGitHubRepos(args: ToolExecutionArgs<PartialReposSearchQuery>): Promise<CallToolResult>;
|
|
17
75
|
export {};
|
|
@@ -68,21 +68,18 @@ export declare const GitHubSearchRepositoriesOutputLocalSchema: z.ZodObject<{
|
|
|
68
68
|
currentPage: z.ZodNumber;
|
|
69
69
|
totalPages: z.ZodNumber;
|
|
70
70
|
hasMore: z.ZodBoolean;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
75
74
|
totalMatchesKind: z.ZodOptional<z.ZodEnum<{
|
|
76
75
|
exact: "exact";
|
|
77
76
|
reported: "reported";
|
|
78
77
|
lowerBound: "lowerBound";
|
|
79
78
|
}>>;
|
|
80
79
|
totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
-
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
82
80
|
}, z.core.$strip>>;
|
|
83
81
|
}, z.core.$loose>>;
|
|
84
82
|
}, z.core.$loose>>>;
|
|
85
|
-
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
83
|
base: z.ZodOptional<z.ZodString>;
|
|
87
84
|
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
88
85
|
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
@@ -70,7 +70,6 @@ export declare const GitHubViewRepoStructureOutputLocalSchema: import("zod").Zod
|
|
|
70
70
|
kind: import("zod").ZodString;
|
|
71
71
|
}, import("zod/v4/core").$loose>]>>>;
|
|
72
72
|
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
73
|
-
hints: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
74
73
|
base: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
74
|
shared: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>>;
|
|
76
75
|
responsePagination: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -37,7 +37,6 @@ export declare function inspectBinary(query: BinaryInspectQuery): Promise<import
|
|
|
37
37
|
totalPages: number;
|
|
38
38
|
hasMore: boolean;
|
|
39
39
|
entriesPerPage: number;
|
|
40
|
-
totalEntries: number;
|
|
41
40
|
};
|
|
42
41
|
status: "success";
|
|
43
42
|
mode: "list";
|
|
@@ -54,7 +53,6 @@ export declare function inspectBinary(query: BinaryInspectQuery): Promise<import
|
|
|
54
53
|
backend: string;
|
|
55
54
|
localPath: string;
|
|
56
55
|
content: string;
|
|
57
|
-
contentLength: number;
|
|
58
56
|
isPartial: boolean;
|
|
59
57
|
} | {
|
|
60
58
|
pagination?: ContentCharPagination;
|
|
@@ -65,13 +63,11 @@ export declare function inspectBinary(query: BinaryInspectQuery): Promise<import
|
|
|
65
63
|
backend: string;
|
|
66
64
|
localPath: string;
|
|
67
65
|
content: string;
|
|
68
|
-
contentLength: number;
|
|
69
66
|
isPartial: boolean;
|
|
70
67
|
} | {
|
|
71
68
|
nextScanOffset?: number;
|
|
72
69
|
scanOffset: number;
|
|
73
70
|
pagination?: ContentCharPagination;
|
|
74
|
-
contentLength: number;
|
|
75
71
|
totalFound: number;
|
|
76
72
|
isPartial: boolean;
|
|
77
73
|
localPath?: string;
|
|
@@ -45,3 +45,100 @@ export declare const LocalBinaryInspectBulkQuerySchema: z.ZodObject<{
|
|
|
45
45
|
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
46
46
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
47
47
|
}, z.core.$strip>;
|
|
48
|
+
export declare const LocalBinaryInspectOutputSchema: z.ZodObject<{
|
|
49
|
+
results: z.ZodArray<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
empty: "empty";
|
|
53
|
+
error: "error";
|
|
54
|
+
success: "success";
|
|
55
|
+
}>>;
|
|
56
|
+
data: z.ZodUnion<readonly [z.ZodObject<{
|
|
57
|
+
path: z.ZodString;
|
|
58
|
+
mode: z.ZodLiteral<"inspect">;
|
|
59
|
+
format: z.ZodOptional<z.ZodString>;
|
|
60
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
isText: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
encoding: z.ZodOptional<z.ZodString>;
|
|
63
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
|
+
exports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
+
sections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
path: z.ZodString;
|
|
70
|
+
mode: z.ZodLiteral<"list">;
|
|
71
|
+
entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
compressedSize: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
isDir: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
modified: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>>;
|
|
78
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
currentPage: z.ZodNumber;
|
|
80
|
+
totalPages: z.ZodNumber;
|
|
81
|
+
hasMore: z.ZodBoolean;
|
|
82
|
+
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
path: z.ZodString;
|
|
89
|
+
mode: z.ZodEnum<{
|
|
90
|
+
extract: "extract";
|
|
91
|
+
decompress: "decompress";
|
|
92
|
+
}>;
|
|
93
|
+
archiveFile: z.ZodOptional<z.ZodString>;
|
|
94
|
+
content: z.ZodOptional<z.ZodString>;
|
|
95
|
+
isPartial: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
charOffset: z.ZodNumber;
|
|
98
|
+
charLength: z.ZodNumber;
|
|
99
|
+
totalChars: z.ZodNumber;
|
|
100
|
+
hasMore: z.ZodBoolean;
|
|
101
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
currentPage: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
totalPages: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
chunkMode: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
semantic: "semantic";
|
|
106
|
+
"char-limit": "char-limit";
|
|
107
|
+
}>>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
path: z.ZodString;
|
|
112
|
+
mode: z.ZodLiteral<"strings">;
|
|
113
|
+
strings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
|
+
value: z.ZodString;
|
|
115
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
}, z.core.$strip>>>;
|
|
117
|
+
content: z.ZodOptional<z.ZodString>;
|
|
118
|
+
totalStrings: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
scanOffset: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
nextScanOffset: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
hasMore: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
path: z.ZodString;
|
|
125
|
+
mode: z.ZodLiteral<"unpack">;
|
|
126
|
+
localPath: z.ZodOptional<z.ZodString>;
|
|
127
|
+
fileCount: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
totalSize: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
+
}, z.core.$strip>]>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
base: z.ZodOptional<z.ZodString>;
|
|
133
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
134
|
+
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
currentPage: z.ZodNumber;
|
|
136
|
+
totalPages: z.ZodNumber;
|
|
137
|
+
hasMore: z.ZodBoolean;
|
|
138
|
+
charOffset: z.ZodNumber;
|
|
139
|
+
charLength: z.ZodNumber;
|
|
140
|
+
totalChars: z.ZodNumber;
|
|
141
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type LocalBinaryInspectOutput = z.infer<typeof LocalBinaryInspectOutputSchema>;
|
|
@@ -29,3 +29,69 @@ export declare const LocalFetchContentBulkQuerySchema: z.ZodObject<{
|
|
|
29
29
|
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
30
30
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
|
+
export declare const LocalGetFileContentOutputSchema: z.ZodObject<{
|
|
33
|
+
results: z.ZodArray<z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
empty: "empty";
|
|
37
|
+
error: "error";
|
|
38
|
+
}>>;
|
|
39
|
+
data: z.ZodObject<{
|
|
40
|
+
path: z.ZodOptional<z.ZodString>;
|
|
41
|
+
content: z.ZodOptional<z.ZodString>;
|
|
42
|
+
contentView: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
none: "none";
|
|
44
|
+
standard: "standard";
|
|
45
|
+
symbols: "symbols";
|
|
46
|
+
}>>;
|
|
47
|
+
isSkeleton: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
totalLines: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
sourceChars: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
isPartial: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
matchRanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
start: z.ZodNumber;
|
|
55
|
+
end: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>>>;
|
|
57
|
+
pagination: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
+
charOffset: z.ZodNumber;
|
|
59
|
+
charLength: z.ZodNumber;
|
|
60
|
+
totalChars: z.ZodNumber;
|
|
61
|
+
hasMore: z.ZodBoolean;
|
|
62
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
currentPage: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
totalPages: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
chunkMode: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
semantic: "semantic";
|
|
67
|
+
"char-limit": "char-limit";
|
|
68
|
+
}>>;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
currentPage: z.ZodNumber;
|
|
71
|
+
totalPages: z.ZodNumber;
|
|
72
|
+
hasMore: z.ZodBoolean;
|
|
73
|
+
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>]>>;
|
|
77
|
+
modified: z.ZodOptional<z.ZodString>;
|
|
78
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
79
|
+
lastModifiedBy: z.ZodOptional<z.ZodString>;
|
|
80
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
+
matchNotFound: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
searchedFor: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
base: z.ZodOptional<z.ZodString>;
|
|
86
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
87
|
+
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
currentPage: z.ZodNumber;
|
|
89
|
+
totalPages: z.ZodNumber;
|
|
90
|
+
hasMore: z.ZodBoolean;
|
|
91
|
+
charOffset: z.ZodNumber;
|
|
92
|
+
charLength: z.ZodNumber;
|
|
93
|
+
totalChars: z.ZodNumber;
|
|
94
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export type LocalGetFileContentOutput = z.infer<typeof LocalGetFileContentOutputSchema>;
|