[PR #853] [MERGED] refactor: declare auxiliary capabilities from source #2291

Closed
opened 2026-10-16 21:16:50 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/853
Author: @N0zoM1z0
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @N0zoM1z0

Base: main ← Head: refactor/auxiliary-capability-declarations


📝 Commits (1)

  • 30a71e7 refactor: declare auxiliary capabilities from source

📊 Changes

22 files changed (+499 additions, -240 deletions)

View changed files

📝 docs/capability-migration.md (+23 -0)
📝 scripts/generate-mcp-tool-catalog.mjs (+4 -11)
📝 scripts/lib/catalog-core.mjs (+1 -1)
📝 src/application/BinarySession.ts (+4 -7)
📝 src/application/CapabilityInventory.ts (+2 -2)
📝 src/application/LazyAnalysisProvider.ts (+2 -2)
📝 src/application/runtime.ts (+4 -38)
📝 src/artifacts/ArtifactProvider.ts (+5 -39)
➕ src/artifacts/ArtifactProviderMetadata.ts (+53 -0)
➕ src/composition/auxiliaryAnalysisProviders.ts (+50 -0)
📝 src/dotnet/ManagedStaticProvider.ts (+6 -41)
➕ src/dotnet/ManagedStaticProviderMetadata.ts (+56 -0)
➖ src/native/NativeHostCapabilities.ts (+0 -29)
📝 src/native/NativeMacOSProvider.ts (+6 -43)
➕ src/native/NativeMacOSProviderMetadata.ts (+53 -0)
📝 src/server/registerBrowserScenarioTool.ts (+2 -2)
📝 src/server/registerBrowserTools.ts (+9 -12)
📝 src/server/registerElectronTools.ts (+6 -9)
📝 src/server/registerJavaScriptRuntimeObservationTools.ts (+3 -4)
➕ tests/acceptance/contractPresentation.test.ts (+63 -0)

...and 2 more files

📄 Description

REA's auxiliary discovery metadata came from a generated catalog, whose generator constructed provider implementations to recover the same facts. Some observation handlers also selected schemas by array position, so presentation reordering could dispatch a different operation.

Move artifact, macOS native and managed static identity/capability builders into their owning adapters. A concrete composition declaration reuses their existing typed AnalysisProvider loaders; runtime and catalog generation consume the same source facts. Deep candidate selection and the five distinct observation ports remain separate. Remove the redundant native metadata transformation; preserve exact host codes/reasons, effects, limitations and the native dispatch operation. Capability inventory and binary operation-kind routing consume canonical source contracts. The generated catalog is unchanged.

Bind all four positional observation registrars with existing toolContract(name). An isolated compiled-process regression reverses presentation arrays before loading registration and checks actual SDK schemas and handler meaning. Before the fix, compare_web_screenshots incorrectly dispatched list_browser_targets; both normal and reversed presentation pass afterward.

Verification:

  • Focused pilot: 35 cases across auxiliary source/implementation/generated metadata for macOS/Linux/Windows, fresh lazy ownership, actual SDK schemas/examples, registry selection and availability.
  • Existing boundaries: 77 cases across native/artifact/managed providers, observation handlers, optional loading and session lifecycle.
  • npm run check -- --output-logs=errors-only
  • npm run docs:check (all generated metadata unchanged)
  • npm run verify:test-discovery (494 files discovered exactly once)
  • npm run verify:inspector (eight real Linux Node Inspector CLI/MCP fixtures)
  • npm run verify:package (full installed CLI/MCP, 126 tools, lifecycle/update/setup recovery; startup to tools/list 2486 ms, sampled peak RSS 453033984 bytes / approximately 432 MiB)

No public schema change, engine installation, universal provider manifest, permission flag or retention-policy change. Real Hopper/Ghidra were not run locally for this metadata extraction; the matching Apple/runtime/package lanes run in CI. Recording-port tests establish composition coverage only.

Refs #740. This is a T5 pilot; capability directory migrations and final extension guidance remain open.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/853 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `refactor/auxiliary-capability-declarations` --- ### 📝 Commits (1) - [`30a71e7`](https://github.com/morluto/rea/commit/30a71e70fe5064c17980437555de302238f36214) refactor: declare auxiliary capabilities from source ### 📊 Changes **22 files changed** (+499 additions, -240 deletions) <details> <summary>View changed files</summary> 📝 `docs/capability-migration.md` (+23 -0) 📝 `scripts/generate-mcp-tool-catalog.mjs` (+4 -11) 📝 `scripts/lib/catalog-core.mjs` (+1 -1) 📝 `src/application/BinarySession.ts` (+4 -7) 📝 `src/application/CapabilityInventory.ts` (+2 -2) 📝 `src/application/LazyAnalysisProvider.ts` (+2 -2) 📝 `src/application/runtime.ts` (+4 -38) 📝 `src/artifacts/ArtifactProvider.ts` (+5 -39) ➕ `src/artifacts/ArtifactProviderMetadata.ts` (+53 -0) ➕ `src/composition/auxiliaryAnalysisProviders.ts` (+50 -0) 📝 `src/dotnet/ManagedStaticProvider.ts` (+6 -41) ➕ `src/dotnet/ManagedStaticProviderMetadata.ts` (+56 -0) ➖ `src/native/NativeHostCapabilities.ts` (+0 -29) 📝 `src/native/NativeMacOSProvider.ts` (+6 -43) ➕ `src/native/NativeMacOSProviderMetadata.ts` (+53 -0) 📝 `src/server/registerBrowserScenarioTool.ts` (+2 -2) 📝 `src/server/registerBrowserTools.ts` (+9 -12) 📝 `src/server/registerElectronTools.ts` (+6 -9) 📝 `src/server/registerJavaScriptRuntimeObservationTools.ts` (+3 -4) ➕ `tests/acceptance/contractPresentation.test.ts` (+63 -0) _...and 2 more files_ </details> ### 📄 Description REA's auxiliary discovery metadata came from a generated catalog, whose generator constructed provider implementations to recover the same facts. Some observation handlers also selected schemas by array position, so presentation reordering could dispatch a different operation. Move artifact, macOS native and managed static identity/capability builders into their owning adapters. A concrete composition declaration reuses their existing typed AnalysisProvider loaders; runtime and catalog generation consume the same source facts. Deep candidate selection and the five distinct observation ports remain separate. Remove the redundant native metadata transformation; preserve exact host codes/reasons, effects, limitations and the native dispatch operation. Capability inventory and binary operation-kind routing consume canonical source contracts. The generated catalog is unchanged. Bind all four positional observation registrars with existing toolContract(name). An isolated compiled-process regression reverses presentation arrays before loading registration and checks actual SDK schemas and handler meaning. Before the fix, compare_web_screenshots incorrectly dispatched list_browser_targets; both normal and reversed presentation pass afterward. Verification: - Focused pilot: 35 cases across auxiliary source/implementation/generated metadata for macOS/Linux/Windows, fresh lazy ownership, actual SDK schemas/examples, registry selection and availability. - Existing boundaries: 77 cases across native/artifact/managed providers, observation handlers, optional loading and session lifecycle. - npm run check -- --output-logs=errors-only - npm run docs:check (all generated metadata unchanged) - npm run verify:test-discovery (494 files discovered exactly once) - npm run verify:inspector (eight real Linux Node Inspector CLI/MCP fixtures) - npm run verify:package (full installed CLI/MCP, 126 tools, lifecycle/update/setup recovery; startup to tools/list 2486 ms, sampled peak RSS 453033984 bytes / approximately 432 MiB) No public schema change, engine installation, universal provider manifest, permission flag or retention-policy change. Real Hopper/Ghidra were not run locally for this metadata extraction; the matching Apple/runtime/package lanes run in CI. Recording-port tests establish composition coverage only. Refs #740. This is a T5 pilot; capability directory migrations and final extension guidance remain open. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2291
No description provided.