feat(core): publish an ./extraction subpath — html→markdown for the SD7 capture seam - #581
Merged
KnockOutEZ merged 1 commit intoSep 3, 2026
Conversation
…actMetadata The SD7 capture seam has to turn a settled page into the markdown body recordVisit stores, and the extraction graph shipped in dist/ with no legal specifier reaching any of it — no subpath, no wildcard, and no other published barrel re-exporting a markdown symbol. Two named functions rather than pipeline.ts: the seam runs on the navigation path in the DB-owning child, so pulling the provider/registry graph (and a native module with it) onto that path to convert an HTML string it already holds is the cost this shape avoids. The exports pin grows the subpath with an empty type set, which is what keeps the pipeline's types from arriving later without anyone measuring an import site for them.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #402.
What changed
wigolo/extractionis now a published subpath carrying exactly two names:htmlToMarkdown(src/extraction/markdown.ts)extractMetadata(src/extraction/metadata.ts)The full extraction graph already shipped in
dist/, but no legal specifier reachedany of it — 16 subpaths, no wildcard, and none of them re-exporting a markdown symbol.
SD7's capture-on-settle seam (
wigolo-studio-run#365,packages/studio-core) has thepage's HTML from
SessionDrive.readCurrentPage()and no way to turn it into themarkdownbodyrecordVisitstores.Two named functions rather than
pipeline.ts: the seam runs on the navigation path inthe DB-owning child, so the provider/registry graph — and a native module with it —
must not arrive there for a string conversion.
src/extraction/index.tsis the barrel;markdown.tspulls turndown +lang-hints,metadata.tspulls linkedom, and nothingelse.
Zero behaviour change: two export lines, one
exportsentry, one test entry.Verification (local; CI deferred — quota)
npm test— 934 files, 11,543 passed / 20 skipped / 7 todo, 0 failednpx tsc --noEmit— cleannpm run gate:studio— green (tests/ type-check debt holds at baseline 341)npm run build— clean;dist/extraction/index.{js,d.ts}emittedThe exports pin grows the subpath with both halves the A4 rule demands (declared target
import()in a child Node process), and with an EMPTYtypesset — a pin, notan omission, so the pipeline's types cannot arrive later without a measured import site.
Mutations run and restored byte-identical:
extractMetadatafrom the barrel → reds the runtime probe AND the.d.tspin(
expected [ 'htmlToMarkdown' ] to deeply equal [ 'extractMetadata', 'htmlToMarkdown' ])exportsentry at a path that is not on disk → reds the declared-target armand fails the real
import()(ERR_MODULE_NOT_FOUND), which is the exact lie aresolve-only probe would have told
Fresh install of built core (
npm pack→ clean dir):Territory
lane-extra:package.jsonandtests/unit/package-exports.test.ts— a subpath cannotbe published without the
exportsmap, and the pin for it is an exact list that travelswith that map. Both are named in the issue's own files hint; same pair as
wigolo-studio-run#363/#370.CI deferred — quota.