Files
Michał Pierzchała fef0b12cc5 chore: hoist shared snapshot/selector test fixtures into a single canonical location (#2419)
* chore: hoist shared snapshot/selector test fixtures into @agent-device/selectors

PR #2397 left two copies of the snapshot-state builder and duplicated
geometry/touch-point arbitraries (root's src/__tests__/test-utils/ and the
package's internal/__tests__/), because packages cannot import root src/.
Move the canonical versions into a new @agent-device/selectors/test-fixtures
subpath and have both root and the selectors package import from it, leaving
buildNodes and the root-only replay/gesture arbitraries in place.

Fixes #2402

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USabYbQjD16A2UkkvMpf5x

* chore: exempt test-fixtures.ts's test-only arbitraries from dead-code check

PROPERTY_RUNS, scrollingContainerTypeArb, distinctRectPairArb, and
interactionTouchPointScenarioArb are consumed only by *.test.ts files, which
Fallow's --production analysis does not see, matching the existing pattern
for other workspace-package symbols reached only from the test tree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USabYbQjD16A2UkkvMpf5x

* chore: consolidate makeSnapshotState into capture-kit, rename fixtures file

An adversarial review of the #2402 fixture-hoisting change found a third
copy of makeSnapshotState in packages/capture-kit/src/snapshot-state.fixtures.ts,
predating PR #2397. Since @agent-device/selectors already depends on
capture-kit, make capture-kit's copy canonical (exported as
./snapshot-state-fixtures) and have the selectors package's fixtures module
re-export it instead of duplicating it a third time.

Also rename packages/selectors/src/test-fixtures.ts to
snapshot-geometry.fixtures.ts (subpath ./snapshot-geometry-fixtures) to match
every other test-fixture module's *.fixtures.ts convention in this repo,
which lets it fall under .fallowrc.json's existing blanket **/*.fixtures.ts
dead-code exemption instead of needing a bespoke per-symbol entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USabYbQjD16A2UkkvMpf5x

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-09 13:56:40 +02:00

88 lines
3.4 KiB
JSON

{
"name": "@agent-device/selectors",
"version": "0.0.0",
"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*`, …) 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:*",
"@agent-device/contracts": "workspace:*",
"@agent-device/kernel": "workspace:*"
},
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./ast": {
"types": "./src/ast.ts",
"default": "./src/ast.ts"
},
"./engine": {
"types": "./src/engine.ts",
"default": "./src/engine.ts"
},
"./parameterized-recorded-fill": {
"types": "./src/parameterized-recorded-fill.ts",
"default": "./src/parameterized-recorded-fill.ts"
},
"./absence-observation": {
"types": "./src/absence-observation.ts",
"default": "./src/absence-observation.ts"
},
"./absence-observation-errors": {
"types": "./src/absence-observation-errors.ts",
"default": "./src/absence-observation-errors.ts"
},
"./absence-observation-resolution": {
"types": "./src/absence-observation-resolution.ts",
"default": "./src/absence-observation-resolution.ts"
},
"./interaction-error": {
"types": "./src/interaction-error.ts",
"default": "./src/interaction-error.ts"
},
"./interaction-positionals": {
"types": "./src/interaction-positionals.ts",
"default": "./src/interaction-positionals.ts"
},
"./interaction-targeting": {
"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"
},
"./press-retarget": {
"types": "./src/press-retarget.ts",
"default": "./src/press-retarget.ts"
},
"./selector-pipeline": {
"types": "./src/selector-pipeline.ts",
"default": "./src/selector-pipeline.ts"
},
"./selector-pipeline-policy": {
"types": "./src/selector-pipeline-policy.ts",
"default": "./src/selector-pipeline-policy.ts"
},
"./snapshot-geometry-fixtures": {
"types": "./src/snapshot-geometry.fixtures.ts",
"default": "./src/snapshot-geometry.fixtures.ts"
},
"./touch-semantics": {
"types": "./src/touch-semantics.ts",
"default": "./src/touch-semantics.ts"
}
},
"devDependencies": {
"fast-check": "^4.9.0"
}
}