refactor!: enforce canonical evidence and provider boundaries
Deliver complete Evidence directly through MCP with required nullable analysis profiles and immutable per-server delivery settings. Bind selected environments at construction and require typed cleanup outcomes with retained retry ownership. Remove test-only routing, duplicate session and snapshot metadata, producer-field repairs, and ambiguous provider arguments. Separate artifact byte identity from occurrence classification and retain typed source-map and partial native facts across CLI, MCP, and verifier consumers. BREAKING CHANGE: obsolete Evidence envelopes, session aliases, incomplete snapshots, and missing normalized producer facts are no longer accepted.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { snapshotEnvironment } from "../process/snapshotEnvironment.js";
|
||||
import { parseConfig } from "../config.js";
|
||||
import {
|
||||
runDirectAnalysis as executeDirectAnalysis,
|
||||
runProviderAnalysis as executeProviderAnalysis,
|
||||
@@ -10,37 +12,32 @@ import {
|
||||
import type { DirectAnalysisDependencies } from "../application/DirectAnalysisDependencies.js";
|
||||
import { createBinarySession, createManagedBinarySession } from "./binary.js";
|
||||
|
||||
const dependencies: DirectAnalysisDependencies = {
|
||||
createBinarySession,
|
||||
createManagedBinarySession,
|
||||
/** Bind one-shot analysis and status commands to one caller-selected environment. */
|
||||
export const createDirectAnalysis = (
|
||||
selectedEnvironment: Readonly<Record<string, string | undefined>>,
|
||||
) => {
|
||||
const environment = snapshotEnvironment(selectedEnvironment);
|
||||
const dependencies: DirectAnalysisDependencies = {
|
||||
readConfiguration: () => parseConfig(environment),
|
||||
createBinarySession: (config, logger) =>
|
||||
createBinarySession(config, logger, environment),
|
||||
createManagedBinarySession,
|
||||
};
|
||||
return {
|
||||
runDirectAnalysis: executeDirectAnalysis.bind(undefined, dependencies),
|
||||
runProviderAnalysis: executeProviderAnalysis.bind(undefined, dependencies),
|
||||
runProviderStatus: executeProviderStatus.bind(undefined, dependencies),
|
||||
runCapabilityStatus: executeCapabilityStatus.bind(undefined, dependencies),
|
||||
};
|
||||
};
|
||||
|
||||
/** Run one isolated binary operation through the production session factory. */
|
||||
export const runDirectAnalysis = executeDirectAnalysis.bind(
|
||||
undefined,
|
||||
dependencies,
|
||||
);
|
||||
/** Bound operations used by CLI command registration. */
|
||||
export type DirectAnalysis = ReturnType<typeof createDirectAnalysis>;
|
||||
|
||||
/** Run one isolated native, artifact or managed operation. */
|
||||
export const runProviderAnalysis = executeProviderAnalysis.bind(
|
||||
undefined,
|
||||
dependencies,
|
||||
);
|
||||
|
||||
/** Execute managed metadata without constructing native provider candidates. */
|
||||
/** Execute managed metadata without configuration or native provider candidates. */
|
||||
export const runManagedProviderExecution = executeManagedProvider.bind(
|
||||
undefined,
|
||||
dependencies,
|
||||
);
|
||||
|
||||
/** Report production provider candidates without opening a target. */
|
||||
export const runProviderStatus = executeProviderStatus.bind(
|
||||
undefined,
|
||||
dependencies,
|
||||
);
|
||||
|
||||
/** Report production session operations without opening a target. */
|
||||
export const runCapabilityStatus = executeCapabilityStatus.bind(
|
||||
undefined,
|
||||
dependencies,
|
||||
{
|
||||
createManagedBinarySession,
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user