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
4 changes: 0 additions & 4 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,6 @@
"types": "./src/managed-web-backend.ts",
"default": "./src/managed-web-backend.ts"
},
"./moving-target-gate": {
"types": "./src/moving-target-gate.ts",
"default": "./src/moving-target-gate.ts"
},
"./navigation": {
"types": "./src/navigation.ts",
"default": "./src/navigation.ts"
Expand Down
120 changes: 0 additions & 120 deletions packages/contracts/src/moving-target-gate.test.ts

This file was deleted.

88 changes: 0 additions & 88 deletions packages/contracts/src/moving-target-gate.ts

This file was deleted.

25 changes: 24 additions & 1 deletion packages/contracts/src/runtime-contract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AgentDeviceBackend } from './backend.ts';
import type { ArtifactAdapter } from './artifact-adapter.ts';
import type { MovingTargetBaseline } from './moving-target-gate.ts';
import type { SurfaceScopedNodes } from './interaction.ts';
import type { SnapshotState } from '@agent-device/kernel/snapshot';

export type CommandPolicy = {
Expand All @@ -9,6 +9,29 @@ export type CommandPolicy = {
maxImagePixels: number;
};

/**
* The tree a mutation resolved against, kept on the session with the instant that mutation
* finished, so the next action can ask whether its own coordinates are still in play.
*
* A {@link SurfaceScopedNodes} rather than a whole capture: the gate compares node positions on one
* surface, and the surface scoping is what keeps an iOS system-sheet tree from ever being compared
* against app content (#2438).
*/
export type MovingTargetBaseline = Readonly<{
/**
* When the action finished, not when it began: the gate waits out what is LEFT of the window. The
* daemon stamps it with `Date.now()`; the gate compares it against `now(runtime)`, so a runtime
* that installs a clock of its own (a scenario pinning the window) states this value in that
* clock's time too. Production installs none, so both sides read the wall clock.
*/
finishedAt: number;
/**
* The tree the action acted through: its resolution's own observation, or the settled one its
* `--settle` published as rest.
*/
tree: SurfaceScopedNodes;
}>;

export type CommandSessionRecord = {
name: string;
appId?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/daemon/src/core/deferred-interaction-outcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { PostOpenObservation } from '@agent-device/contracts/application-li
import type { SnapshotCaptureAnnotations } from '@agent-device/contracts/capture';
import { isApplePlatform, isMobilePlatform } from '@agent-device/kernel/device';
import type { SnapshotState } from '@agent-device/kernel/snapshot';
import type { MovingTargetBaseline } from '@agent-device/contracts/moving-target-gate';
import type { MovingTargetBaseline } from '@agent-device/contracts/runtime-contract';
import {
captureAndroidFreshnessRecoveredAttempt,
getActiveAndroidSnapshotFreshness,
Expand Down
6 changes: 3 additions & 3 deletions packages/daemon/src/core/session-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '@agent-device/contracts/perf-runtime';
import type { ScreenRecordingLiveHandle } from '@agent-device/contracts/screen-recording-runtime';
import type { SessionAction, SessionScope, SessionSurface } from '@agent-device/contracts/session';
import type { MovingTargetBaseline as ContractsMovingTargetBaseline } from '@agent-device/contracts/moving-target-gate';
import type { MovingTargetBaseline } from '@agent-device/contracts/runtime-contract';
import type {
LeaseBackend,
SessionRuntimeHints as PublicSessionRuntimeHints,
Expand Down Expand Up @@ -122,9 +122,9 @@ export type DeferredSurface =
* The tree the mutation resolved its target against, beside the instant the mutation
* finished, so the next action can ask whether its own coordinates are still in play
* (#3471). The shape is `MovingTargetBaseline` in
* `@agent-device/contracts/moving-target-gate`, declared beside the gate that reads it.
* `@agent-device/contracts/runtime-contract`, declared beside the session record that carries it.
*/
baseline: ContractsMovingTargetBaseline;
baseline: MovingTargetBaseline;
};

/**
Expand Down
9 changes: 1 addition & 8 deletions scripts/__tests__/eager-closure-budgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,7 @@ export const NEW_ENTRY_CEILINGS: Readonly<Record<EntryCategory, number>> = Objec
*/
export const APPROVED_OVER_CEILING: Readonly<
Record<string, { issue: string; reason: string; owner: string }>
> = Object.freeze({
'packages/maestro/src/replay-backend/replay-maestro-backend.ts': {
issue: '#3377',
reason:
'The Maestro replay backend plugin IS the engine behind `replay --maestro`; the registry reaches it only through a function-scoped import(), and no startup hub evaluates it (cli-startup-import-closure pins that).',
owner: 'thymikee',
},
});
> = Object.freeze({});

/** The category is a function of the path, never a hand-written column. */
export function entryCategoryOf(entryFile: string): EntryCategory {
Expand Down
1 change: 0 additions & 1 deletion scripts/layering/contracts-exports.snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"@agent-device/contracts/local-interactor-operation-set",
"@agent-device/contracts/logs-runtime-plan",
"@agent-device/contracts/managed-web-backend",
"@agent-device/contracts/moving-target-gate",
"@agent-device/contracts/navigation",
"@agent-device/contracts/network-runtime",
"@agent-device/contracts/network-runtime-plan",
Expand Down
Loading
Loading