EANCH-WP-0001 T05: umbrella cutover complete + pure subpath exports

Add ./selectors and ./types subpath exports so node-env consumers get a
pdfjs-free entry (the umbrella roundtrip test uses them). Update README status
to 'extracted; umbrella consumes this package'. Mark T05 done; record the
blocker as resolved. Umbrella verified green (typecheck, 95 tests, build) at
citation-evidence@d145148.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-08 21:09:02 +02:00
parent d5c5155df8
commit f32b500f44
3 changed files with 24 additions and 10 deletions

View file

@ -13,13 +13,17 @@ turns annotations from static marks into durable, reopenable source references.
See `SCOPE.md` for the boundary and `INTENT.md` for the long-range intent.
## Status: extracting from the umbrella
## Status: extracted; umbrella consumes this package
The concrete anchor slice currently lives upstream in
[`../citation-evidence/src/anchor/`](../citation-evidence/src/anchor/). Workplan
`EANCH-WP-0001` moves it here as a standalone TypeScript package, wires the
umbrella to consume this package, and verifies the round-trip. Shared-contract
changes still happen in the umbrella (`citation-evidence/wiki/`), not here.
The anchor slice has been extracted from the umbrella and now lives here.
`citation-evidence` consumes it as `@citation-evidence/evidence-anchor`
(`link:../evidence-anchor`); its former `src/anchor/` directory is gone and the
`@anchor` alias is retired. Shared-contract changes still happen in the umbrella
(`citation-evidence/wiki/`), not here.
Remaining anchor work beyond this MVP slice (stale/orphan semantics, fuzzy
re-anchoring, HTML/Markdown selectors, promoting the PDF spike to a production
adapter) is tracked as follow-on work — see `workplans/`.
## Install model
@ -34,7 +38,7 @@ aliases.
```text
src/
index.ts public entrypoint — pure surface only
index.ts public entrypoint — full barrel (core + pdf)
types.ts adapter-side types: SelectionCapture,
ResolvedAnchorTarget, AnchorResolution,
HighlightRenderOptions, DocumentViewerAdapter
@ -79,7 +83,7 @@ import {
resolveSelectors,
type DocumentViewerAdapter,
type AnchorResolution,
} from "evidence-anchor";
} from "@citation-evidence/evidence-anchor";
```
Resolution is explicit about uncertainty — `AnchorResolution.status` is one of

View file

@ -1,5 +1,5 @@
{
"name": "evidence-anchor",
"name": "@citation-evidence/evidence-anchor",
"version": "0.1.0",
"private": true,
"description": "Selector creation, resolution, re-anchoring, and highlight/scroll contracts for the citation-evidence ecosystem.",
@ -18,6 +18,8 @@
],
"exports": {
".": "./src/index.ts",
"./selectors": "./src/selectors/index.ts",
"./types": "./src/types.ts",
"./pdf": "./src/pdf/index.ts"
},
"scripts": {

View file

@ -276,7 +276,7 @@ implementation remains behind `DocumentViewerAdapter`.
```task
id: EANCH-WP-0001-T05
status: progress
status: done
priority: high
depends_on: [T03, T04]
state_hub_task_id: "2fd9bd62-5d79-49b5-aee7-45e0a37313ba"
@ -285,6 +285,14 @@ state_hub_task_id: "2fd9bd62-5d79-49b5-aee7-45e0a37313ba"
Replace the umbrella repo's internal anchor slice with a dependency on this
repo.
> **RESOLVED (2026-07-08).** The parallel `evidence-source` extraction landed
> (`citation-evidence@4ede979`), leaving `main` clean. The cutover was then
> executed and verified: umbrella typecheck + 95 tests + production build all
> green (`citation-evidence@d145148`). Package published as
> `@citation-evidence/evidence-anchor` with `.`, `./selectors`, `./types`, and
> `./pdf` exports; node-env consumers use the pure subpaths. Original blocker
> context retained below.
>
> **BLOCKED (2026-07-08, ralph loop iteration).** Extraction T01T04 are
> complete, committed, and verified green in `evidence-anchor` (30 tests,
> typecheck, lint). T05 was **not** attempted because the umbrella