Files
reverse-engineering-anything/src/contracts/toolAvailability.ts
T
morluto d1675822f6 refactor(capabilities): declare standalone and host-gated availability on the contract (#11270)
Contracts declare availability: "standalone" or { host: <feature> }, and CapabilityInventory interprets the declaration once through one feature table, replacing 39 per-name branches. HOST_RESTRICTED_FEATURES moves to the contracts layer.
2026-11-15 23:52:56 +08:00

33 lines
1.1 KiB
TypeScript

/** Optional integrations whose verified hosts exclude some platforms. */
export const HOST_RESTRICTED_FEATURES = [
"packetCapture",
"pcapCapture",
"signalRecording",
"evmInterface",
"binaryLayout",
"recordedCrash",
"firmwareInspection",
"firmwareExtraction",
"javascriptRecovery",
"persistentDebugger",
] as const;
export type HostRestrictedFeature = (typeof HOST_RESTRICTED_FEATURES)[number];
/**
* What a tool needs before it can run, declared with its contract and
* interpreted once by the capability inventory.
*
* - `"standalone"`: a built-in workflow over caller-selected input. It needs
* no optional provider, deep-analysis provider or host integration, so it
* is always available.
* - `{ host }`: an optional integration that the host must support and the
* operator must configure; the inventory owns each feature's configuration
* flag and remediation.
*
* A contract without a declaration takes its availability from its provider
* family, its active target, or a named rule in the inventory.
*/
export type ToolAvailabilityDeclaration =
| "standalone"
| { readonly host: HostRestrictedFeature };