v2.5.0 — tab-targeting-v2
What's new
tab-targeting-v2 — Resolver convergence + new human-emulation design principle + 6 issue #28 reliability gaps fixed.
Breaking changes
open <url>default changed from "navigate front tab" to "focus-existing → else new-tab" — matching tab is focused via the spatial interaction gradient (noop / tab-switch / window raise / cross-Space new-tab). Useopen --replace-tab <url>for legacy behavior..urlContainsmulti-match unified fail-closed across all subcommands —js --url plaudnow exits withambiguousWindowMatchwhen multiple tabs match, same asupload --native. Use--first-matchto opt back into first-match (with stderr warning listing all candidates).--tab Ndeprecated (removed in v3.0) — emits stderr warning. Migrate to--document N(same semantics) or--window M --tab-in-window N(window-scoped).documentsoutput format changed to tab-level — one line per tab (was one line per window). New columnsw{window}.t{tab}+ current-tab*marker.--jsonaddswindow/tab_in_window/is_currentfields.
New features
--window M --tab-in-window Ncomposite flag — structured addressing for duplicate-URL tabs (issue #28 escape hatch).--first-match— opt-in first-match with stderr warning enumerating all candidates.--replace-tab—openopt-out back to v2.4 navigate-front-tab semantics.- Spatial interaction gradient — 4-layer policy for
focusExistingTab: noop (same tab), tab-switch (same window), raise (same Space), new-tab-in-current-Space (cross-Space). Uses private CGS SPI (CGSGetActiveSpace/CGSGetWindowWorkspace); falls back to Layer 3 raise when SPI unavailable. - New
human-emulationdesign principle — co-equal withnon-interference. Four derived rules: tab bar is ground truth / ambiguity fails-closed / known URLs focus instead of reopen / spatial interaction is gradient-based. Seeopenspec/specs/human-emulation/spec.md.
Bug fixes
Issue #28 six reliability gaps:
documentsandupload --nativenow agree on tab enumeration (sharedflattenWindowsToDocuments/pickNativeTargetsource).- Same-URL duplicate tabs addressable via
--window M --tab-in-window N. close --urlmulti-match fails-closed instead of silently killing multiple tabs.- Repeated
open <url>no longer accumulates duplicate tabs (focus-existing default). js --url plaudandupload --native --url plaudapply identical ambiguous-match policy.- (Deferred) Gap 6 — upload --native modal orphan recovery — tracked as separate future change per proposal Non-Goals.
Tests
238/238 pass. 193 new unit tests added across 9 new test files (ResolverConvergenceTests, DocumentsCommandTests, TargetOptionsTests, FirstMatchTests, OpenCommandTests, TabDeprecationTests, SpatialGradientTests, Issue28RegressionTests, plus 1 updated fixture).
Migration
See README ## Migrating from v2.4 to v2.5 (tab-targeting-v2) for the full migration table.