Files
openclaw/scripts/docs-link-audit.d.mts
ToToKr d57e228c3a docs(mistral): fix broken adjustable reasoning docs URL (#114867)
* docs(mistral): fix broken adjustable reasoning docs URL

The linked Mistral page 404s; the reasoning docs now live one path segment up. Verified: old URL returns HTTP 404, new URL returns HTTP 200 and documents reasoning_effort. oxfmt --check passed on the changed file.

* fix(ci): audit links inside docs components

* test(cli): isolate root help exit fixture

* test(ci): split embedded agent shard

* fix(ci): harden docs link projection

* test(ci): satisfy docs audit strict types

* test(ci): isolate incomplete-turn harness

* test(cli): document root help fixture boundary

* test(ci): isolate overflow compaction harness

* test(ci): isolate contaminated agent model tests

* test(ci): update isolated prefix routing

* test(ci): bound loaded streaming HTTP cases

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-28 06:55:02 -04:00

111 lines
2.5 KiB
TypeScript

export type BrokenDocLink = {
file: string;
line: number;
link: string;
reason: string;
};
export type ResolveRouteResult = {
ok: boolean;
terminal: string;
loop?: boolean;
};
export type MirroredDocsDir = {
cleanup: () => void;
dir: string;
mirroredClawHub: boolean;
};
export type ScriptSpawnOptions = {
cwd: string;
env?: NodeJS.ProcessEnv;
shell?: boolean;
stdio: string;
};
export type ScriptSpawnResult = {
status: number | null;
error?: { code?: string };
};
export type ScriptSpawn = (
command: string,
args: string[],
options: ScriptSpawnOptions,
) => ScriptSpawnResult;
export type ScriptInvocation = {
command: string;
args: string[];
options?: Partial<ScriptSpawnOptions> & {
detached?: boolean;
windowsVerbatimArguments?: boolean;
};
};
export function normalizeRoute(route: string): string;
export function resolveRoute(
route: string,
options?: { redirects?: Map<string, string>; routes?: Set<string> },
): ResolveRouteResult;
export function sanitizeDocsConfigForEnglishOnly(value: unknown): unknown;
export function prepareExternalLinkAuditTree(
repoRoot: string,
outputDir: string,
): {
files: number;
projectedLinks: number;
};
export function prepareMirroredDocsDir(
sourceDir?: string,
options?: {
resolveClawHubRepoPathImpl?: (
value?: string,
options?: { required?: boolean },
) => string | undefined;
syncClawHubDocsTreeImpl?: (
targetDocsDir: string,
options?: { repoPath?: string; required?: boolean },
) => unknown;
},
): MirroredDocsDir;
export function prepareAnchorAuditDocsDir(sourceDir?: string): string;
export function resolveMintlifyAnchorAuditInvocation(params: {
cwd: string;
nodeVersion?: string;
spawnSyncImpl: ScriptSpawn;
env?: NodeJS.ProcessEnv;
nodeExecPath?: string;
npmExecPath?: string;
platform?: NodeJS.Platform;
comSpec?: string;
}): ScriptInvocation;
export function auditDocsLinks(options?: {
docsDir?: string;
allowExternalClawHubRoutes?: boolean;
}): {
checked: number;
broken: BrokenDocLink[];
};
export function runDocsLinkAuditCli(options?: {
args?: string[];
comSpec?: string;
env?: NodeJS.ProcessEnv;
nodeExecPath?: string;
nodeVersion?: string;
npmExecPath?: string;
platform?: NodeJS.Platform;
spawnSyncImpl?: ScriptSpawn;
prepareAnchorAuditDocsDirImpl?: (sourceDir?: string) => string;
prepareMirroredDocsDirImpl?: (sourceDir?: string) => MirroredDocsDir;
cleanupAnchorAuditDocsDirImpl?: (dir: string) => void;
}): number;