* fix(hopper): report unavailable procedure body coverage * refactor!: simplify runtime tools and remove replay engines Keep direct inspection, capture, and comparison tools. Bind handlers to named contracts and let agents compose experiments with commands and local fixture servers. BREAKING CHANGE: Remove controlled replay, Node characterization, finite replay-machine, managed runtime planning, and redundant string-tracing tools. Retire process replay, shims, reactive scenarios, custom checkpoints, and active browser replay and origin-scope inputs.
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import type { AvailabilityPolicy } from "../application/CapabilityInventory.js";
|
|
import { platform } from "node:process";
|
|
|
|
export type SessionAvailability = AvailabilityPolicy;
|
|
|
|
export interface SessionAvailabilityDefaults {
|
|
readonly optionalFeatures?: Pick<
|
|
SessionAvailability,
|
|
| "browserObservationEnabled"
|
|
| "browserScenarioEnabled"
|
|
| "electronObservationEnabled"
|
|
| "electronAutomationEnabled"
|
|
| "v8InspectorObservationEnabled"
|
|
>;
|
|
}
|
|
|
|
/** Select configured availability reporting or the target-free defaults. */
|
|
export const sessionAvailabilityPolicy = (
|
|
configured: (() => SessionAvailability) | undefined,
|
|
defaults: SessionAvailabilityDefaults,
|
|
): (() => SessionAvailability) =>
|
|
configured ??
|
|
(() => ({
|
|
processCaptureEnabled: platform !== "win32",
|
|
browserObservationEnabled:
|
|
defaults.optionalFeatures?.browserObservationEnabled ?? false,
|
|
browserScenarioEnabled:
|
|
defaults.optionalFeatures?.browserScenarioEnabled ?? false,
|
|
electronObservationEnabled:
|
|
defaults.optionalFeatures?.electronObservationEnabled ?? false,
|
|
electronAutomationEnabled:
|
|
defaults.optionalFeatures?.electronAutomationEnabled ?? false,
|
|
v8InspectorObservationEnabled:
|
|
defaults.optionalFeatures?.v8InspectorObservationEnabled ?? false,
|
|
}));
|