Add offline ELF dependency, search-path, symbol-version and import inspection with retained Evidence summaries and pages. Bound GNU-hash work and preserve cancellation, stable identity and caller-selected parameters across CLI/MCP. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning) Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
1.8 KiB
Implementation plan
Boundary and contract
src/domain/native/elfDependencies.ts owns the input and result schemas,
limits and the shared limitation strings, and
src/domain/analysisView/elfDependenciesView.ts owns the retained-Evidence
view. src/native/elf/ElfDependencyParser.ts decodes the dynamic table,
GNU version tables and dynamic symbols over the existing ELF image reader, and
src/native/elf/ElfDependenciesProvider.ts admits the selected file and
applies the budgets.
src/application/binaryDiagnostics/ElfDependenciesService.ts depends on the
domain and src/ports/binaryDiagnostics/ElfDependenciesPort.ts and validates
the report shape. It is composed beside the sibling binary diagnostics tools in
src/composition/binaryDiagnostics.ts and bound in
src/server/serviceToolBindings.ts.
Incremental work and validation
- Define the schemas, limits and limitations, with domain tests.
- Decode
PT_DYNAMIC, theDT_*strings and flags, andPT_INTERPover synthetic fixtures for both widths and endiannesses. - Walk
.gnu.version_rand.gnu.version_d, derive the per-namespace maxima, and join undefined.dynsymimports tolibrary@version. - Locate tables from section headers only when they agree with
DT_*, and fromPT_LOADwhen section headers are stripped, with partial coverage for anything unreadable. - Add the summary view and its
inspect_analysis_viewcollections. - Register the CLI command and MCP tool, then add acceptance, filesystem and MCP boundary tests.
- Write the guide and the CLI reference entry, update the skill reference, and run focused tests, lint, typecheck and docs checks.
Effects and compatibility
Additive: one new read-only tool, one CLI command and one analysis view kind. Existing tools and Evidence shapes do not change.