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
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import { readNodeLocalIdentity } from '@agent-device/ad-script';
import { makeSnapshotState } from '@agent-device/selectors/snapshot-geometry-fixtures';
import { classifyReplayTarget } from '../target-classification.ts';
import { resolveElementReportedTwice } from '@agent-device/selectors/interaction-targeting';
import {
ELEMENT14_DISTINCT_SUBTREE_NODES,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from '@agent-device/selectors/interaction-targeting-fixtures';
import {
bottomTabsRealCaptureFixture,
recordArticleEvidence,
buildNodes,
ELEMENT14_DISTINCT_SUBTREE_NODES,
recordArticleEvidence,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from '@agent-device/test-kit';

/** Verified outcomes carry the verified member + matchCount (for the post-resolution guard). */
Expand Down
7 changes: 2 additions & 5 deletions packages/selectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"sideEffects": false,
"type": "module",
"description": "Shared selector matching, argument, and replay semantics for agent-device. `.` is string-only; `./ast` is the published parser surface behind `agent-device/selectors`; `./engine` is the resolve/list surface reserved for the selector-pipeline owner (R19); `./parameterized-recorded-fill` parameterizes recorded fill payloads against their selectors; the interaction-resolution subpaths (`./selector-pipeline`, `./interaction-targeting`, `./interaction-touch-point`, `./press-retarget`, `./absence-observation*`, \u2026) host the engine execution surface owned by the pipeline; `./snapshot-geometry-fixtures` is the canonical home for the geometry/touch-point test fixtures this package and root tests both build on (it re-exports `makeSnapshotState` from `@agent-device/capture-kit/snapshot-state-fixtures`, its own canonical home).",
"description": "Shared selector matching, argument, and replay semantics for agent-device. `.` is string-only; `./ast` is the published parser surface behind `agent-device/selectors`; `./engine` is the resolve/list surface reserved for the selector-pipeline owner (R19); `./parameterized-recorded-fill` parameterizes recorded fill payloads against their selectors; the interaction-resolution subpaths (`./selector-pipeline`, `./interaction-targeting`, `./interaction-touch-point`, `./press-retarget`, `./absence-observation*`, …) host the engine execution surface owned by the pipeline; `./snapshot-geometry-fixtures` is the canonical home for the geometry/touch-point test fixtures this package and root tests both build on (it re-exports `makeSnapshotState` from `@agent-device/capture-kit/snapshot-state-fixtures`, its own canonical home).",
"dependencies": {
"@agent-device/ad-script": "workspace:*",
"@agent-device/capture-kit": "workspace:*",
Expand Down Expand Up @@ -52,10 +52,6 @@
"types": "./src/interaction-targeting.ts",
"default": "./src/interaction-targeting.ts"
},
"./interaction-targeting-fixtures": {
"types": "./src/interaction-targeting.fixtures.ts",
"default": "./src/interaction-targeting.fixtures.ts"
},
"./interaction-touch-point": {
"types": "./src/interaction-touch-point.ts",
"default": "./src/interaction-touch-point.ts"
Expand Down Expand Up @@ -86,6 +82,7 @@
}
},
"devDependencies": {
"@agent-device/test-kit": "workspace:*",
"fast-check": "^4.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/selectors/src/interaction-targeting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
INDEXED_PARITY_POLICY_NODES,
TWO_ACTIONABLE_WRAPPER_CHAIN_NODES,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from './interaction-targeting.fixtures.ts';
} from '@agent-device/test-kit';

test('collapses one same-label wrapper chain to its shared actionable node', () => {
const snapshot = makeSnapshotState(EQUIVALENT_WRAPPER_CHAIN_NODES);
Expand Down
2 changes: 1 addition & 1 deletion packages/selectors/src/selector-pipeline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
RN_TEXT_ECHO_OFFSET_RECT_NODES,
TWO_ACTIONABLE_WRAPPER_CHAIN_NODES,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from './interaction-targeting.fixtures.ts';
} from '@agent-device/test-kit';
import {
listSelectorPipelineMatches,
resolveActionSelectorPipeline,
Expand Down
3 changes: 2 additions & 1 deletion packages/selectors/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{ "path": "../ad-script" },
{ "path": "../capture-kit" },
{ "path": "../contracts" },
{ "path": "../kernel" }
{ "path": "../kernel" },
{ "path": "../test-kit" }
]
}
11 changes: 11 additions & 0 deletions packages/test-kit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ export {
withMockedPlatform,
} from './host-execution.ts';
export { pinOwnProcessStartTime } from './host-process-mock.ts';
export {
ELEMENT14_DISTINCT_SUBTREE_NODES,
EQUIVALENT_WRAPPER_CHAIN_NODES,
INDEXED_PARITY_POLICY_NODES,
RN_TEXT_ECHO_AUTHORED_CHILD_NODES,
RN_TEXT_ECHO_DISTINCT_SUBTREE_NODES,
RN_TEXT_ECHO_NODES,
RN_TEXT_ECHO_OFFSET_RECT_NODES,
TWO_ACTIONABLE_WRAPPER_CHAIN_NODES,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from './interaction-targeting.fixtures.ts';
export {
closeLoopbackServer,
listenOnLoopback,
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion scripts/layering/package-boundaries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,6 @@ test('the real tree parses, declares, and passes R11', () => {
'@agent-device/selectors/interaction-error',
'@agent-device/selectors/interaction-positionals',
'@agent-device/selectors/interaction-targeting',
'@agent-device/selectors/interaction-targeting-fixtures',
'@agent-device/selectors/interaction-touch-point',
'@agent-device/selectors/parameterized-recorded-fill',
'@agent-device/selectors/press-retarget',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
RN_TEXT_ECHO_NODES,
RN_TEXT_ECHO_OFFSET_RECT_NODES,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from '@agent-device/selectors/interaction-targeting-fixtures';
} from '@agent-device/test-kit';
import { createMemorySessionStore } from '../../../../../command-runtime/runtime-factory.ts';

export function selectorSnapshot(): SnapshotState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ELEMENT14_DISTINCT_SUBTREE_NODES,
EQUIVALENT_WRAPPER_CHAIN_NODES,
UNVERIFIED_HITTABILITY_WRAPPER_CHAIN_NODES,
} from '@agent-device/selectors/interaction-targeting-fixtures';
} from '@agent-device/test-kit';
import { SELECTOR_PIPELINE_POLICIES } from '@agent-device/selectors/selector-pipeline-policy';
import { resolveActionSelector } from './selector-action-resolution.ts';

Expand Down
Loading