Files
rea/src/contracts/providerSelection.ts
T
N0zoM1z0andN0zoM1z0 6b1fd166b0 feat(ghidra): define the Windows P0 admission boundary
Admit only native x86-64 PE applications when the Ghidra candidate runs on Windows while preserving the existing Linux format matrix. Add precise rejection codes for executable roles and managed targets, publish a machine-readable Windows capability report, and keep missing no-follow, ACL, Unix-socket, and PTY controls as independent observations rather than inferred support.
2026-07-17 03:05:19 +09:00

41 lines
1.2 KiB
TypeScript

import { z } from "zod";
/** Stable provider identifier accepted at CLI, MCP, and environment boundaries. */
export const analysisProviderIdSchema = z
.string()
.min(1)
.max(64)
.regex(/^[a-z][a-z0-9-]*$/u)
.refine((value) => value !== "auto", {
message: "auto is reserved for provider selection",
});
/** Explicit provider ID or the deterministic automatic-selection policy. */
export const analysisProviderSelectorSchema = z.union([
z.literal("auto"),
analysisProviderIdSchema,
]);
/** Stable reasons a deep provider cannot participate in target selection. */
export const PROVIDER_REJECTION_CODES = [
"not_configured",
"executable_missing",
"runtime_missing",
"unsupported_host",
"unsupported_version",
"target_kind_unsupported",
"target_format_unsupported",
"architecture_unsupported",
"target_role_unsupported",
"managed_target_unsupported",
"open_options_invalid",
"version_unresolved",
] as const;
export type AnalysisProviderSelector = z.infer<
typeof analysisProviderSelectorSchema
>;
/** Stable reason a deep provider cannot participate in target selection. */
export type ProviderRejectionCode = (typeof PROVIDER_REJECTION_CODES)[number];