diff --git a/docs/.vitepress/documentation.ts b/docs/.vitepress/documentation.ts index 97659870f3d..551e6142ae1 100644 --- a/docs/.vitepress/documentation.ts +++ b/docs/.vitepress/documentation.ts @@ -1,4 +1,11 @@ // Authored guide ownership: physical sources and stable public routes. +const markdownPathForRoute = (route: string) => `${route.slice(1)}.md`; +const guideAtRoute = (text: string, route: string) => ({ + text, + source: markdownPathForRoute(route), + route, +}); + export const documentationSections = [ { text: "Getting started", @@ -33,56 +40,29 @@ export const documentationSections = [ { text: "Desktop applications", items: [ - { - text: "Desktop installation directories", - source: "desktop-applications.md", - route: "/desktop-applications", - }, - { - text: "Desktop application capture", - source: "desktop-application-capture.md", - route: "/desktop-application-capture", - }, - { - text: "Desktop application state", - source: "desktop-application-state.md", - route: "/desktop-application-state", - }, - { - text: "Desktop application tasks", - source: "desktop-application-tasks.md", - route: "/desktop-application-tasks", - }, - { - text: "Desktop application export", - source: "desktop-application-export.md", - route: "/desktop-application-export", - }, - { - text: "Desktop build computer", - source: "desktop-build-computer.md", - route: "/desktop-build-computer", - }, - { - text: "Desktop build witness", - source: "desktop-build-witness.md", - route: "/desktop-build-witness", - }, + guideAtRoute("Desktop installation directories", "/desktop-applications"), + guideAtRoute( + "Desktop application capture", + "/desktop-application-capture", + ), + guideAtRoute("Desktop application state", "/desktop-application-state"), + guideAtRoute("Desktop application tasks", "/desktop-application-tasks"), + guideAtRoute("Desktop application export", "/desktop-application-export"), + guideAtRoute("Desktop build computer", "/desktop-build-computer"), + guideAtRoute("Desktop build witness", "/desktop-build-witness"), ], }, { text: "Agent environments", items: [ - { - text: "Build RL environments with REA", - source: "agent-environments-quickstart.md", - route: "/agent-environments-quickstart", - }, - { - text: "Agent environments from recorded captures", - source: "agent-environments.md", - route: "/agent-environments", - }, + guideAtRoute( + "Build RL environments with REA", + "/agent-environments-quickstart", + ), + guideAtRoute( + "Agent environments from recorded captures", + "/agent-environments", + ), ], }, { @@ -153,41 +133,16 @@ export const documentationSections = [ source: "guides/native/ntfs-metadata.md", route: "/ntfs-metadata", }, - { - text: "Binary hardening", - source: "binary-hardening.md", - route: "/binary-hardening", - }, - { - text: "ELF note tables", - source: "elf-notes.md", - route: "/elf-notes", - }, - { - text: "ELF dependency tables", - source: "elf-dependencies.md", - route: "/elf-dependencies", - }, - { - text: "Linux kernel modules", - source: "kernel-modules.md", - route: "/kernel-modules", - }, - { - text: "PE Authenticode certificate tables", - source: "pe-certificates.md", - route: "/pe-certificates", - }, - { - text: "PE import and delay-load tables", - source: "pe-imports.md", - route: "/pe-imports", - }, - { - text: "PE TLS callbacks and load configuration", - source: "pe-load-config.md", - route: "/pe-load-config", - }, + guideAtRoute("Binary hardening", "/binary-hardening"), + guideAtRoute("ELF note tables", "/elf-notes"), + guideAtRoute("ELF dependency tables", "/elf-dependencies"), + guideAtRoute("Linux kernel modules", "/kernel-modules"), + guideAtRoute("PE Authenticode certificate tables", "/pe-certificates"), + guideAtRoute("PE import and delay-load tables", "/pe-imports"), + guideAtRoute( + "PE TLS callbacks and load configuration", + "/pe-load-config", + ), { text: "PE x64 exception-directory function ranges", source: "guides/native/pe-unwind-ranges.md", @@ -198,26 +153,17 @@ export const documentationSections = [ source: "guides/native/pe-overlay.md", route: "/pe-overlay", }, - { - text: "Match native functions across builds", - source: "native-function-matching.md", - route: "/native-function-matching", - }, - { - text: "Rust binary dependency metadata", - source: "rust-binaries.md", - route: "/rust-binaries", - }, + guideAtRoute( + "Match native functions across builds", + "/native-function-matching", + ), + guideAtRoute("Rust binary dependency metadata", "/rust-binaries"), { text: "LabVIEW RSRC containers", source: "guides/native/labview-analysis.md", route: "/labview-analysis", }, - { - text: "Static CUDA and HIP code objects", - source: "gpu-code-objects.md", - route: "/gpu-code-objects", - }, + guideAtRoute("Static CUDA and HIP code objects", "/gpu-code-objects"), ], }, { @@ -263,31 +209,14 @@ export const documentationSections = [ source: "guides/javascript/v8-code-cache.md", route: "/v8-code-cache", }, - { - text: "Electron fuse state", - source: "electron-fuses.md", - route: "/electron-fuses", - }, - { - text: "Static JavaScript route inventory", - source: "javascript-route-inventory.md", - route: "/javascript-route-inventory", - }, - { - text: "Bun standalone executables", - source: "bun-standalone.md", - route: "/bun-standalone", - }, - { - text: "Deno compile executables", - source: "deno-standalone.md", - route: "/deno-standalone", - }, - { - text: "Node.js single executable applications", - source: "node-sea.md", - route: "/node-sea", - }, + guideAtRoute("Electron fuse state", "/electron-fuses"), + guideAtRoute( + "Static JavaScript route inventory", + "/javascript-route-inventory", + ), + guideAtRoute("Bun standalone executables", "/bun-standalone"), + guideAtRoute("Deno compile executables", "/deno-standalone"), + guideAtRoute("Node.js single executable applications", "/node-sea"), ], }, { @@ -313,11 +242,7 @@ export const documentationSections = [ source: "guides/web/web-network-captures.md", route: "/web-network-captures", }, - { - text: "HTTP/3 capture lab", - source: "http3-capture-lab.md", - route: "/http3-capture-lab", - }, + guideAtRoute("HTTP/3 capture lab", "/http3-capture-lab"), { text: "Captured website source locations", source: "guides/web/web-source-location.md", @@ -333,11 +258,7 @@ export const documentationSections = [ source: "guides/web/website-script-export.md", route: "/website-script-export", }, - { - text: "Offline Playwright traces", - source: "playwright-traces.md", - route: "/playwright-traces", - }, + guideAtRoute("Offline Playwright traces", "/playwright-traces"), ], }, { @@ -363,21 +284,12 @@ export const documentationSections = [ source: "guides/android/flutter-analysis.md", route: "/flutter-analysis", }, - { - text: "Android boot and vendor_boot images", - source: "android-boot-image.md", - route: "/android-boot-image", - }, - { - text: "Android DTBO partition images", - source: "android-dtbo.md", - route: "/android-dtbo", - }, - { - text: "APK signature schemes", - source: "apk-signature.md", - route: "/apk-signature", - }, + guideAtRoute( + "Android boot and vendor_boot images", + "/android-boot-image", + ), + guideAtRoute("Android DTBO partition images", "/android-dtbo"), + guideAtRoute("APK signature schemes", "/apk-signature"), ], }, { @@ -388,11 +300,7 @@ export const documentationSections = [ source: "guides/apple/apple-application-analysis.md", route: "/apple-application-analysis", }, - { - text: "Apple IPS crash reports", - source: "apple-ips.md", - route: "/apple-ips", - }, + guideAtRoute("Apple IPS crash reports", "/apple-ips"), ], }, { @@ -413,16 +321,8 @@ export const documentationSections = [ source: "guides/managed/vsix-package.md", route: "/vsix-package", }, - { - text: ".NET single-file bundles", - source: "dotnet-bundles.md", - route: "/dotnet-bundles", - }, - { - text: "IL2CPP metadata", - source: "il2cpp-metadata.md", - route: "/il2cpp-metadata", - }, + guideAtRoute(".NET single-file bundles", "/dotnet-bundles"), + guideAtRoute("IL2CPP metadata", "/il2cpp-metadata"), ], }, { @@ -458,31 +358,15 @@ export const documentationSections = [ source: "guides/firmware/ubi-images.md", route: "/ubi-images", }, - { - text: "Flattened devicetree inspection", - source: "devicetree.md", - route: "/devicetree", - }, - { - text: "ESP flash images", - source: "esp-flash-image.md", - route: "/esp-flash-image", - }, + guideAtRoute("Flattened devicetree inspection", "/devicetree"), + guideAtRoute("ESP flash images", "/esp-flash-image"), { text: "ESP-IDF NVS partitions", source: "guides/firmware/esp-nvs.md", route: "/esp-nvs", }, - { - text: "ESP images", - source: "esp-image.md", - route: "/esp-image", - }, - { - text: "U-Boot FIT images", - source: "fit-images.md", - route: "/fit-images", - }, + guideAtRoute("ESP images", "/esp-image"), + guideAtRoute("U-Boot FIT images", "/fit-images"), { text: "Qualcomm MBN images", source: "guides/firmware/qualcomm-mbn-images.md", @@ -493,26 +377,10 @@ export const documentationSections = [ source: "guides/apple/image4-containers.md", route: "/image4-containers", }, - { - text: "Intel HEX and S-record images", - source: "hex-records.md", - route: "/hex-records", - }, - { - text: "UF2 and DfuSe images", - source: "uf2-dfuse.md", - route: "/uf2-dfuse", - }, - { - text: "U-Boot legacy uImage containers", - source: "uimage.md", - route: "/uimage", - }, - { - text: "uClinux bFLT flat executables", - source: "bflt-executables.md", - route: "/bflt-executables", - }, + guideAtRoute("Intel HEX and S-record images", "/hex-records"), + guideAtRoute("UF2 and DfuSe images", "/uf2-dfuse"), + guideAtRoute("U-Boot legacy uImage containers", "/uimage"), + guideAtRoute("uClinux bFLT flat executables", "/bflt-executables"), ], }, { @@ -548,66 +416,28 @@ export const documentationSections = [ { text: "Packages and metadata", items: [ - { - text: "Offline API contract inventory", - source: "api-contracts.md", - route: "/api-contracts", - }, + guideAtRoute("Offline API contract inventory", "/api-contracts"), { text: "CycloneDX dependencies", source: "guides/native/cyclonedx-view.md", route: "/cyclonedx-view", }, - { - text: "Maven POM and Gradle module metadata", - source: "maven-gradle-metadata.md", - route: "/maven-gradle-metadata", - }, - { - text: "Release exposure", - source: "release-exposure.md", - route: "/release-exposure", - }, - { - text: "Model file declarations", - source: "model-artifacts.md", - route: "/model-artifacts", - }, - { - text: "Python packaged applications", - source: "python-packaged-applications.md", - route: "/python-packaged-applications", - }, - { - text: "Debian package inspection", - source: "deb-package.md", - route: "/deb-package", - }, - { - text: "CPython pyc inspection", - source: "python-pyc.md", - route: "/python-pyc", - }, - { - text: "Erlang BEAM files", - source: "erlang-beam.md", - route: "/erlang-beam", - }, - { - text: "Godot PCK archives", - source: "godot-pck.md", - route: "/godot-pck", - }, - { - text: "UnityFS AssetBundle archives", - source: "unityfs.md", - route: "/unityfs", - }, - { - text: "iNES containers", - source: "ines-containers.md", - route: "/ines-containers", - }, + guideAtRoute( + "Maven POM and Gradle module metadata", + "/maven-gradle-metadata", + ), + guideAtRoute("Release exposure", "/release-exposure"), + guideAtRoute("Model file declarations", "/model-artifacts"), + guideAtRoute( + "Python packaged applications", + "/python-packaged-applications", + ), + guideAtRoute("Debian package inspection", "/deb-package"), + guideAtRoute("CPython pyc inspection", "/python-pyc"), + guideAtRoute("Erlang BEAM files", "/erlang-beam"), + guideAtRoute("Godot PCK archives", "/godot-pck"), + guideAtRoute("UnityFS AssetBundle archives", "/unityfs"), + guideAtRoute("iNES containers", "/ines-containers"), { text: "Nintendo DS ROMs", source: "guides/firmware/nds-roms.md", @@ -633,41 +463,27 @@ export const documentationSections = [ source: "guides/artifacts/ar-archives.md", route: "/ar-archives", }, - { - text: "WeChat mini-program wxapkg archives", - source: "wxapkg.md", - route: "/wxapkg", - }, - { - text: "macOS flat installer packages", - source: "macos-pkg.md", - route: "/macos-pkg", - }, + guideAtRoute("WeChat mini-program wxapkg archives", "/wxapkg"), + guideAtRoute("macOS flat installer packages", "/macos-pkg"), { text: "ISO 9660 disc images", source: "guides/firmware/iso9660-images.md", route: "/iso9660-images", }, - { - text: "tar and gzip-compressed tar archives", - source: "tar-archives.md", - route: "/tar-archives", - }, + guideAtRoute("tar and gzip-compressed tar archives", "/tar-archives"), { text: "Nintendo Switch NSO and NRO executables", source: "guides/firmware/switch-executables.md", route: "/switch-executables", }, - { - text: "GPU asset headers: DDS, GLB, KTX and KTX2", - source: "gpu-asset-headers.md", - route: "/gpu-asset-headers", - }, - { - text: "Media and cache asset headers: Ogg Opus, RIFF/XMA2, Bink 2 and Vulkan pipeline caches", - source: "media-asset-headers.md", - route: "/media-asset-headers", - }, + guideAtRoute( + "GPU asset headers: DDS, GLB, KTX and KTX2", + "/gpu-asset-headers", + ), + guideAtRoute( + "Media and cache asset headers: Ogg Opus, RIFF/XMA2, Bink 2 and Vulkan pipeline caches", + "/media-asset-headers", + ), ], }, { @@ -783,26 +599,13 @@ export const documentationSections = [ source: "providers/jeb-analysis.md", route: "/jeb-analysis", }, - { - text: "GameCube DOL analysis through Ghidra", - source: "ghidra-dol.md", - route: "/ghidra-dol", - }, - { - text: "PowerPC ELF analysis through Ghidra", - source: "ghidra-ppc.md", - route: "/ghidra-ppc", - }, - { - text: "Kuna provider", - source: "kuna-provider.md", - route: "/kuna-provider", - }, - { - text: "Reverse-engineering tool integrations", - source: "reverse-engineering-tools.md", - route: "/reverse-engineering-tools", - }, + guideAtRoute("GameCube DOL analysis through Ghidra", "/ghidra-dol"), + guideAtRoute("PowerPC ELF analysis through Ghidra", "/ghidra-ppc"), + guideAtRoute("Kuna provider", "/kuna-provider"), + guideAtRoute( + "Reverse-engineering tool integrations", + "/reverse-engineering-tools", + ), ], }, { @@ -828,21 +631,16 @@ export const documentationSections = [ source: "reference/reconstruction-obligation-ledgers.md", route: "/reconstruction-obligation-ledgers", }, - { - text: "Reconstruction coverage", - source: "reconstruction-coverage.md", - route: "/reconstruction-coverage", - }, + guideAtRoute("Reconstruction coverage", "/reconstruction-coverage"), ], }, { text: "Development and verification", items: [ - { - text: "Documentation ownership and authoring", - source: "development/documentation.md", - route: "/development/documentation", - }, + guideAtRoute( + "Documentation ownership and authoring", + "/development/documentation", + ), { text: "Settings and recovery", source: "reference/limits-and-recovery.md", @@ -878,21 +676,12 @@ export const documentationSections = [ source: "development/releasing.md", route: "/releasing", }, - { - text: "Testing lanes and provider verification", - source: "testing-lanes.md", - route: "/testing-lanes", - }, - { - text: "Measure MCP catalog costs in Codex", - source: "mcp-catalog-evaluation.md", - route: "/mcp-catalog-evaluation", - }, - { - text: "Static analysis in GitHub Actions", - source: "ci-analysis.md", - route: "/ci-analysis", - }, + guideAtRoute("Testing lanes and provider verification", "/testing-lanes"), + guideAtRoute( + "Measure MCP catalog costs in Codex", + "/mcp-catalog-evaluation", + ), + guideAtRoute("Static analysis in GitHub Actions", "/ci-analysis"), ], }, { @@ -920,7 +709,7 @@ export const documentationSections = [ export const documentationRewrites = Object.fromEntries( documentationSections.flatMap((section) => section.items.flatMap((item) => { - const target = `${item.route.slice(1)}.md`; + const target = markdownPathForRoute(item.route); return item.source === target ? [] : [[item.source, target]]; }), ),