Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,52 @@
"comment": "Published type surface: re-exported by src/sdk/limrun.ts to agent-device/limrun, where test/integration/limrun-public-types.test.ts pins that consumers can import it. Its only importer compiles in a temp checkout, so no static in-repo edge reaches it — the same reason src/sdk/*.ts is exempt above.",
"file": "packages/provider-limrun/src/index.ts",
"exports": ["LimrunIosCommandExecution"]
},
{
"comment": "Converting the contracts façades from `export *` to explicit named re-exports (the pin-table retirement) made these individually visible to --production analysis for the first time; a bare star previously hid them from this exact check. GESTURE_INITIAL_ANGLE_DEGREES/GESTURE_SAMPLE_INTERVAL_MS/INTERACTION_GUARANTEES/INTERACTION_PATH_IDS/parseAndroidInputMethodPackage/isRecordingExportQuality have same-package test-tree consumers (invisible to --production, mirroring the packages/{ad-script,maestro} entry above); the rest currently have none. Kept rather than narrowed here so the façade's re-export surface stays byte-identical to the symbol set the retired pin table asserted — narrowing the surface is a follow-up with its own review, not a side effect of this mechanical conversion. The last five (COORDINATE_GESTURE_KINDS, normalizePublicGesture, DEFAULT_DRAG_*) are #1567's drag vocabulary, surfaced the same way by the same conversion and kept for the same reason.",
"file": "packages/contracts/src/facades/{client,command,divergence,interaction,platform,recording}.ts",
"exports": [
"isRecord",
"IOS_SAFARI_BUNDLE_ID",
"REPLAY_DIVERGENCE_DEFAULT_REF_LIMIT",
"REPLAY_DIVERGENCE_DIGEST_REF_LIMIT",
"REPLAY_DIVERGENCE_LEVEL_BYTE_LIMITS",
"applyReplayDivergenceLevelCaps",
"measureReplayDivergenceBytes",
"sanitizeReplayDivergenceField",
"truncateUtf8Field",
"GESTURE_DURATION_MAX_MS",
"GESTURE_INITIAL_ANGLE_DEGREES",
"GESTURE_SAMPLE_INTERVAL_MS",
"INTERACTION_GUARANTEES",
"INTERACTION_PATH_IDS",
"buildSwipePresetGesturePlan",
"clampGestureCoordinate",
"gestureDirectionDelta",
"parseAndroidInputMethodPackage",
"isRecordingExportQuality",
"COORDINATE_GESTURE_KINDS",
"normalizePublicGesture",
"DEFAULT_DRAG_DESTINATION_HOLD_MS",
"DEFAULT_DRAG_MOVE_MS",
"DEFAULT_DRAG_SOURCE_HOLD_MS"
]
}
],
"usedClassMembers": ["name", "listActiveLeases", "delete", "values", "elapsedMs", "isExpired"],
"rules": {
"unused-types": "error",
"duplicate-exports": "off"
},
"overrides": [
{
"comment": "unused-types counts importers, not signature reachability. A façade names every type its re-exported functions/values put in a public signature, and callers use those types structurally without ever importing the name — the same false-positive shape already fixed for other workspace-package façades. unused-exports (a VALUE check) stays on for this glob; that is what would catch a real leak.",
"files": ["packages/contracts/src/facades/*.ts"],
"rules": {
"unused-types": "off"
}
}
],
"production": {
"dupes": true
},
Expand Down
55 changes: 49 additions & 6 deletions packages/contracts/src/facades/capture.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
export * from '../diff.ts';
export * from '../screenshot.ts';
export * from '../snapshot-capture-annotations.ts';
export * from '../snapshot-diagnostics.ts';
export * from '../snapshot-types.ts';
export * from '../viewport.ts';
export type { DiffSnapshotCommandResult, SnapshotDiffLine, SnapshotDiffSummary } from '../diff.ts';
export {
SCREENSHOT_ACTION_FLAG_KEYS,
SCREENSHOT_COMMAND_FLAG_KEYS,
SCREENSHOT_SPECIFIC_FLAG_DEFINITIONS,
appendScreenshotScriptFlags,
readScreenshotScriptFlag,
screenshotFlagsFromOptions,
screenshotOptionsFromFlags,
} from '../screenshot.ts';
export type {
ScreenshotDispatchFlags,
ScreenshotPublicOptions,
ScreenshotRequestFlags,
ScreenshotRuntimeFlags,
ScreenshotRuntimeOptions,
} from '../screenshot.ts';
export {
publicSnapshotCaptureAnnotations,
readSerializedSnapshotCaptureAnnotations,
snapshotCaptureAnnotationsFrom,
} from '../snapshot-capture-annotations.ts';
export type {
PublicSnapshotCaptureAnnotations,
SnapshotCaptureAnalysis,
SnapshotCaptureAnnotations,
SnapshotCaptureFreshness,
} from '../snapshot-capture-annotations.ts';
export {
mergeSnapshotDiagnostics,
readSnapshotDiagnosticsSummary,
recordSnapshotTiming,
summarizeSnapshotDiagnostics,
summarizeSnapshotTimingSamples,
} from '../snapshot-diagnostics.ts';
export type {
SnapshotDiagnosticsState,
SnapshotDiagnosticsSummary,
SnapshotTimingSample,
SnapshotTimingStats,
} from '../snapshot-diagnostics.ts';
export type {
AndroidSnapshotBackendMetadata,
BackendSnapshotOptions,
BackendSnapshotResult,
FindLocator,
ScreenshotResultData,
} from '../snapshot-types.ts';
export type { ViewportCommandResult } from '../viewport.ts';
140 changes: 125 additions & 15 deletions packages/contracts/src/facades/client.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,125 @@
export * from '../client-app.ts';
export * from '../client-capture.ts';
export * from '../client-connection.ts';
export * from '../client-device-view.ts';
export * from '../client-gesture.ts';
export * from '../client-lease.ts';
export * from '../client-observability.ts';
export * from '../client-replay.ts';
export * from '../client-request.ts';
export * from '../client-selector-read.ts';
export * from '../client-session.ts';
export * from '../client-settings.ts';
export * from '../client-system.ts';
export * from '../client-target.ts';
export * from '../json.ts';
export type {
AppCloseOptions,
AppCloseResult,
AppDeployOptions,
AppDeployResult,
AppInstallFromSourceOptions,
AppInstallFromSourceResult,
AppInstallOptions,
AppListOptions,
AppOpenOptions,
AppOpenResult,
AppPushOptions,
AppTriggerEventOptions,
MaterializationReleaseOptions,
MaterializationReleaseResult,
} from '../client-app.ts';
export type {
CaptureDiffOptions,
CaptureScreenshotOptions,
CaptureScreenshotResult,
CaptureSnapshotOptions,
CaptureSnapshotResult,
FindSnapshotCommandOptions,
SelectorSnapshotCommandOptions,
} from '../client-capture.ts';
export type {
AgentDeviceClientConfig,
AgentDeviceDaemonTransport,
AgentDeviceDaemonTransportContext,
AgentDeviceIdentifiers,
AgentDeviceRequestOverrides,
AgentDeviceSelectionOptions,
DeviceCommandBaseOptions,
} from '../client-connection.ts';
export type {
AgentDeviceCapabilitiesResult,
AgentDeviceDevice,
AgentDeviceSession,
AgentDeviceSessionDevice,
DeviceBootOptions,
DeviceShutdownOptions,
StartupPerfSample,
} from '../client-device-view.ts';
export type {
ClickOptions,
DragOptions,
FillOptions,
FlingOptions,
FocusOptions,
LongPressOptions,
PanOptions,
PinchOptions,
PressOptions,
RepeatedPressOptions,
RotateGestureOptions,
ScrollOptions,
SettleCommandOptions,
SwipeGestureOptions,
SwipeOptions,
TransformGestureOptions,
TypeTextOptions,
} from '../client-gesture.ts';
export type {
CloudArtifactsOptions,
Lease,
LeaseAllocateOptions,
LeaseOptions,
LeaseScopedOptions,
} from '../client-lease.ts';
export type {
AudioOptions,
EventsOptions,
LogsOptions,
NetworkOptions,
PerfOptions,
RecordOptions,
TraceOptions,
} from '../client-observability.ts';
export type {
BatchRunOptions,
BatchStep,
ReplayRunOptions,
ReplayTestOptions,
} from '../client-replay.ts';
export type {
CommandExecutionOptions,
CommandRequestResult,
InternalRequestOptions,
} from '../client-request.ts';
export type {
FindBaseOptions,
FindOptions,
GetOptions,
IsOptions,
IsStatePredicateOptions,
IsTextPredicateOptions,
RecordControlOptions,
} from '../client-selector-read.ts';
export type {
SessionCloseResult,
SessionSaveScriptOptions,
SessionSaveScriptResult,
} from '../client-session.ts';
export type { PermissionTarget, SettingsUpdateOptions } from '../client-settings.ts';
export type {
AlertCommandOptions,
AppStateCommandOptions,
ClipboardCommandOptions,
DoctorCommandOptions,
KeyboardCommandOptions,
PrepareCommandOptions,
ReactNativeCommandOptions,
ViewportCommandOptions,
WaitCommandOptions,
WaitCommandTarget,
} from '../client-system.ts';
export type {
ElementTarget,
InteractionTarget,
PointTarget,
RefTarget,
SelectorTarget,
} from '../client-target.ts';
export { isRecord } from '../json.ts';
export type { JsonObject, JsonPrimitive, JsonValue } from '../json.ts';
35 changes: 26 additions & 9 deletions packages/contracts/src/facades/command.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
export * from '../batch-contract.ts';
export * from '../batch-step.ts';
export * from '../cli-flags.ts';
export * from '../command-flags.ts';
export * from '../dispatched-command.ts';
export * from '../input-validation.ts';
export * from '../open-target.ts';
export * from '../prepare.ts';
export * from '../push.ts';
export {
DEFAULT_BATCH_MAX_STEPS,
assertBatchStepCount,
isValidBatchMaxSteps,
parseBatchStepRuntime,
readBatchStepInputObject,
readBatchStepRecord,
} from '../batch-contract.ts';
export type { DaemonBatchStep } from '../batch-step.ts';
export type { CliFlags, DaemonExcludedCliFlag } from '../cli-flags.ts';
export type { CommandFlags, MaestroRuntimeFlags } from '../command-flags.ts';
export type { DispatchedCommand } from '../dispatched-command.ts';
export { readOptionalInteger } from '../input-validation.ts';
export {
IOS_SAFARI_BUNDLE_ID,
isDeepLinkTarget,
isWebUrl,
resolveIosDeviceDeepLinkBundleId,
} from '../open-target.ts';
export type {
PrepareCommandResult,
PrepareIosRunnerArtifactState,
PrepareIosRunnerCacheKind,
PrepareIosRunnerTiming,
} from '../prepare.ts';
export type { PushCommandResult } from '../push.ts';
51 changes: 42 additions & 9 deletions packages/contracts/src/facades/device.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
export * from '../app-events.ts';
export * from '../app-inventory.ts';
export * from '../app-state.ts';
export * from '../device-inventory.ts';
export * from '../device-provider.ts';
export * from '../device-rotation.ts';
export * from '../device.ts';
export * from '../provider-device-runtime.ts';
export * from '../target-shutdown-contract.ts';
export type { TriggerAppEventCommandResult } from '../app-events.ts';
export {
DEFAULT_APPS_FILTER,
assertResolvedAppsFilter,
resolveAppsFilter,
} from '../app-inventory.ts';
export type { AppsFilter } from '../app-inventory.ts';
export type { AppStateCommandResult } from '../app-state.ts';
export {
LOCAL_DEVICE_INVENTORY_PLATFORM_SELECTORS,
WEB_DESKTOP_DEVICE,
countDeviceInventoryByGroup,
shouldUseHostMacFastPath,
} from '../device-inventory.ts';
export type {
DeviceInventoryGroup,
DeviceInventoryGroupCounts,
DeviceInventoryRequest,
} from '../device-inventory.ts';
export type {
DeviceInventoryProvider,
DeviceLease,
LeaseLifecycleContext,
LeaseLifecycleProvider,
} from '../device-provider.ts';
export {
DEVICE_ROTATIONS,
DEVICE_ROTATION_SURFACE_INDEX,
deviceRotationOrientation,
deviceRotationSurfaceDegrees,
parseDeviceRotation,
} from '../device-rotation.ts';
export type { DeviceRotation } from '../device-rotation.ts';
export type { BootCommandResult, ShutdownCommandResult } from '../device.ts';
export type {
ProviderDeviceInstallOptions,
ProviderDeviceInstallResult,
ProviderDeviceRuntime,
ProviderExpiredLeaseRecovery,
ProviderPortReverseOptions,
} from '../provider-device-runtime.ts';
export type { TargetShutdownResult } from '../target-shutdown-contract.ts';
34 changes: 33 additions & 1 deletion packages/contracts/src/facades/divergence.ts
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
export * from '../replay-divergence.ts';
export {
REPLAY_DIVERGENCE_DEFAULT_REF_LIMIT,
REPLAY_DIVERGENCE_DIGEST_REF_LIMIT,
REPLAY_DIVERGENCE_LEVEL_BYTE_LIMITS,
REPLAY_DIVERGENCE_SUGGESTION_LIMIT,
applyReplayDivergenceLevelCaps,
boundReplayDivergence,
createReplayDivergenceSanitizer,
formatReplayDivergenceReport,
measureReplayDivergenceBytes,
sanitizeReplayDivergenceField,
scrubReplayVarValues,
truncateUtf8Field,
} from '../replay-divergence.ts';
export type {
ReplayDivergence,
ReplayDivergenceCause,
ReplayDivergenceKind,
ReplayDivergenceOverflow,
ReplayDivergenceResume,
ReplayDivergenceScreen,
ReplayDivergenceScreenRef,
ReplayDivergenceStep,
ReplayDivergenceStepSource,
ReplayDivergenceSuggestion,
ReplayDivergenceSuggestionBasis,
ReplayDivergenceTargetBinding,
ReplayDivergenceTargetBindingKind,
ReplayDivergenceTargetCandidate,
ReplayDivergenceTargetIdentity,
ReplayRepairHint,
ReplayVarScrubEntry,
} from '../replay-divergence.ts';
Loading
Loading