refactor(mcp): make analysis states unrepresentable (#468)
* refactor(config): parse capability settings into exact states * refactor(runtime): encode replay and process outcomes exactly * refactor: make analysis states unrepresentable * refactor(mcp): register canonical schemas with SDK * fix: preserve capability and catalog invariants * fix(build): remove stale compiled modules * fix(replay): update real verifier policy dependency * fix(package): verify the complete MCP catalog * fix(test): supply complete replay reload policy * refactor(contracts): centralize output schema lookup * refactor(mcp): delegate protocol boundaries to SDK * fix(browser): approve real source capture * fix(mcp): preserve catalog guidance
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
/** Provider-neutral CPU families detected from supported executable headers. */
|
||||
export type BinaryArchitecture = "x86" | "x86_64" | "arm" | "arm64";
|
||||
|
||||
interface BinaryTargetIdentity {
|
||||
readonly path: string;
|
||||
readonly sourcePath?: string;
|
||||
readonly sha256: string;
|
||||
}
|
||||
|
||||
type NonExecutableMetadata = {
|
||||
readonly architecture?: never;
|
||||
readonly availableArchitectures?: never;
|
||||
readonly executableRole?: never;
|
||||
readonly managed?: never;
|
||||
};
|
||||
|
||||
type ExecutableTarget = BinaryTargetIdentity & {
|
||||
readonly kind: "executable";
|
||||
readonly architecture: BinaryArchitecture;
|
||||
readonly availableArchitectures: readonly BinaryArchitecture[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Canonical local target identity and provider-neutral file classification.
|
||||
* Each variant carries only metadata established for that exact file kind.
|
||||
*/
|
||||
export type BinaryTarget =
|
||||
| (ExecutableTarget & {
|
||||
readonly format: "mach-o" | "elf";
|
||||
readonly executableRole?: never;
|
||||
readonly managed?: never;
|
||||
})
|
||||
| (ExecutableTarget & {
|
||||
readonly format: "pe";
|
||||
/** Provider-neutral PE image role observed from COFF characteristics. */
|
||||
readonly executableRole:
|
||||
| "application"
|
||||
| "shared-library"
|
||||
| "non-executable";
|
||||
/** Whether the PE declares a non-empty CLI header data-directory entry. */
|
||||
readonly managed: boolean;
|
||||
})
|
||||
| (BinaryTargetIdentity &
|
||||
NonExecutableMetadata & {
|
||||
readonly kind: "database";
|
||||
readonly format: "analysis-database";
|
||||
})
|
||||
| (BinaryTargetIdentity &
|
||||
NonExecutableMetadata & {
|
||||
readonly kind: "archive";
|
||||
readonly format:
|
||||
| "zip"
|
||||
| "ipa"
|
||||
| "apk"
|
||||
| "msix"
|
||||
| "appx"
|
||||
| "asar"
|
||||
| "dmg"
|
||||
| "pkg";
|
||||
})
|
||||
| (BinaryTargetIdentity &
|
||||
NonExecutableMetadata & {
|
||||
readonly kind: "artifact";
|
||||
readonly format: "plist" | "javascript" | "source-map";
|
||||
});
|
||||
Reference in New Issue
Block a user