mirror of
https://github.com/morluto/rea.git
synced 2026-11-12 01:41:21 +00:00
Bind typed service creation, observed availability and retryable cleanup in one composition owner. Reuse selected CLI/MCP factories and canonical contract groups without copying provider operation inventories. Closes #8429. Refs #740. Validated paired real application workflows, actual local Codex CLI Terra/high use, complete Evidence and Unknown checkpoint parity, compiler-backed import boundaries, SDK schemas and final real mixed routing. Automated review findings were fixed at their producing owners. Existing exact-base CodeQL alerts are documented on the PR under the owner-authorized unrelated-check exception; no global alerts or security rules were changed. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
54 lines
2.1 KiB
TypeScript
54 lines
2.1 KiB
TypeScript
import type { AnalysisSettingsReader } from "../domain/analysisSettings.js";
|
|
import { snapshotEnvironment } from "../process/snapshotEnvironment.js";
|
|
import type { LazyAnalysisProvider } from "../application/binary/LazyAnalysisProvider.js";
|
|
import { artifactCapabilities } from "../artifacts/ArtifactProviderMetadata.js";
|
|
import {
|
|
ARTIFACT_GRAPH_PROVIDER,
|
|
MANAGED_STATIC_PROVIDER,
|
|
} from "../domain/investigationProviders.js";
|
|
import { managedStaticCapabilities } from "../dotnet/ManagedStaticProviderMetadata.js";
|
|
import { nativeMacOSCapabilities } from "../native/NativeMacOSProviderMetadata.js";
|
|
import { NATIVE_MACOS_PROVIDER_IDENTITY } from "../native/NativeMacosProviderIdentity.js";
|
|
|
|
type AuxiliaryProviderDeclaration = ConstructorParameters<
|
|
typeof LazyAnalysisProvider
|
|
>[0];
|
|
|
|
/** Wire the three existing auxiliary AnalysisProvider implementations lazily. */
|
|
export const auxiliaryAnalysisProviderDeclarations = (
|
|
selectedEnvironment: Readonly<NodeJS.ProcessEnv>,
|
|
platform: NodeJS.Platform = process.platform,
|
|
settings?: AnalysisSettingsReader,
|
|
): readonly AuxiliaryProviderDeclaration[] => {
|
|
const environment = snapshotEnvironment(selectedEnvironment, platform);
|
|
return [
|
|
{
|
|
identity: ARTIFACT_GRAPH_PROVIDER,
|
|
capabilities: artifactCapabilities(platform),
|
|
load: async () => {
|
|
const { ArtifactProvider } =
|
|
await import("../artifacts/ArtifactProvider.js");
|
|
return new ArtifactProvider(environment, platform, settings);
|
|
},
|
|
},
|
|
{
|
|
identity: NATIVE_MACOS_PROVIDER_IDENTITY,
|
|
capabilities: nativeMacOSCapabilities(platform),
|
|
load: async () => {
|
|
const { NativeMacOSProvider } =
|
|
await import("../native/NativeMacOSProvider.js");
|
|
return new NativeMacOSProvider(environment, undefined, platform);
|
|
},
|
|
},
|
|
{
|
|
identity: MANAGED_STATIC_PROVIDER,
|
|
capabilities: managedStaticCapabilities(),
|
|
load: async () => {
|
|
const { ManagedStaticProvider } =
|
|
await import("../dotnet/ManagedStaticProvider.js");
|
|
return new ManagedStaticProvider();
|
|
},
|
|
},
|
|
];
|
|
};
|