* refactor(mcp): register service-backed tools through one contract binding loop registerContractTools registers every bound contract from the registry through the shared Evidence or retained-summary handler its binding selects, and refuses a binding that names no registered contract. createServer declares the bindings by exact contract name; 41 per-tool register files are deleted. * refactor(mcp): bind service-backed tools from one shared table and make each binding select one handler serviceToolBindings owns the binding of every service-backed contract, keyed by its service; createServer and the MCP tests bind from it, so tests exercise the production handler kind, admission and dependencies. A binding can no longer carry both run and summary. The Go real-binary workflow follows the new registration owners. * test(mcp): assert binding exclusivity with type-level checks that hold under every checker
2.1 KiB
Implementation plan
Boundary and contract
src/domain/releaseExposure.ts owns the report schema, check ids, statuses,
severities and read allowances. src/domain/releaseExposureCredentialMarkers.ts
owns the provider-prefixed marker rules. src/artifacts/ReleaseExposureReader.ts
owns the bounded scan of the selected artifact and its members.
src/application/releaseExposure/ReleaseExposureService.ts composes the existing
owners through ReleaseExposurePort and decides each check from their results.
src/contracts/releaseExposureToolContracts.ts, src/cli/releaseExposureCommands.ts
and its audit_release_exposure binding in src/server/createServer.ts are thin adapters over the same
service.
Changes to existing owners
inventoryArtifactgains optionalacquisitionLimits. Only this audit sets them. Exhausting one keeps a partial inventory with unknown coverage. Other callers are unchanged.src/domain/binaryTarget.tsaddsinspectPeCodeViewFromBuffer, which separates absent CodeView records from incomplete parsing.parsePeCodeViewFromBufferkeeps its behavior on top of it.src/artifacts/inventory/classify.tsexportsclassifyEmbeddedExecutablePackage, so the audit recognizes a packaged executable with the same probes as inventory.- Declared integrity uses
record-and-continuefor this audit only.
Change detection
Every file read is bound to its inventoried digest. A file or container whose
bytes differ from inventory at read time adds a change diagnostic and leaves the
affected checks unknown. An unpacked ASAR member is read from its companion
on disk rather than the captured archive, so its bytes are compared with the
member digest that inventory recorded, and findings cannot mix an inventoried
release with bytes written later. Native images carry their
inventory digest into the Go, Rust and fuse reads.
Effects and compatibility
The tool is read-only, local and additive to the CLI and MCP catalogs. It adds no
provider and no runtime dependency. verify:release-exposure installs
@electron/fuses into a temporary prefix when it runs.