Repository navigation
docs(sleep): name MinedBandCounts and export the referenced types so the API tier renders them - #201
laithalsaadoon wants to merge 1 commit into
Conversation
…the API tier renders them
Type-only and doc-comment changes under packages/sleep/src, found by running the typedoc CLI over
src/index.ts with the settled apps/docs options (15 warnings, 1 MDX brace hit before; 0 and 0 after).
- `mineAllBands` returned an inline `{ mined, deepMined }` literal inside `Effect<...>`, which
typedoc-plugin-markdown renders as escaped brace prose (the one brace hit). It now returns the
exported interface `MinedBandCounts`, re-exported through phases/index.ts. Same shape, same fields.
- `CandidateEntityLike` (consolidator.ts) and `EntityClaim` (sql.ts) were referenced by exported
signatures but not re-exported from index.ts; both are now `export type` members.
- Fourteen `{@link}` targets that resolve to private names, or to nothing (`manifestRowsFor` never
existed under that name; the grouper is the trace-consolidation phase; `STANCE_CONFIDENCE_FLOOR` is
`EDGE_CONFIDENCE_FLOOR`), are now code spans, matching the treatment in #170 and #199.
No runtime behavior changes; no test touched. Open-only: adds public type names under packages/*/src.
|
Local gate on |
|
Closed in favor of #264, which consolidates the four API-tier PRs (#185 html document shapes, #186 the |
… @memhtml/html to it (#264) Three type-only edits under `packages/*/src` plus the `@memhtml/html` API page. No runtime line changes: the emitted JavaScript is identical. What changes: - `packages/html/src/document.ts`: the six document shapes (`MemoryMetas`, `MemoryLink`, `Facet`, `Citation`, `ArticleExtractions`, `MemoryDoc`) become interfaces that extend `typeof X.Type`, so the const and the interface merge under one name and every import site compiles unchanged. - `@memhtml/html` API page: a `starlightTypeDoc` instance writes `/api/html/` from the package's single import path; a new `packages/html/README.md` opens the page; the tier index gains a row and the sidebar a group. - `packages/index/src`: `type` exports for five interfaces that exported signatures already reference (`ArchivedMatch`, `EmbedMissingOptions`, `StoreChangedPath`, `StoreStatusEntry`, `StoreTreeEntry`); `IndexStateRow` becomes an interface the same way as the html shapes; six `{@link}`s to private names become code spans. Why: typedoc expands a `typeof X.Type` alias inline wherever a signature uses it, and typedoc-plugin-markdown prints an inline object literal inside a type argument as escaped `\{` prose, which `apps/docs/tests/figures.test.ts` rejects. The interfaces and named types render as links instead. Measured with the typedoc CLI: html went from 7 brace hits and 6 warnings to 0 and 0; index from 12 warnings and 1 hit (plus 13 hits from html's aliases) to 0 and 0. With these on main, the index API page (`/api/index/`) can follow as a docs-only slice. One caveat: an interface does not get the implicit index signature an object-literal type alias gets, so an out-of-tree consumer that assigned a `MemoryDoc` or an `IndexStateRow` to `Record<string, unknown>` would stop compiling. The workspace typecheck finds no such site. Consolidates #185, #186, #199 and #201, closed in favor of this branch. The `packages/sleep` part of the original branch no longer applies: 0.16.0 removed that package.
What
Type-only and doc-comment changes under
packages/sleep/srcso@memhtml/sleepcan join the docs site's API tier brace-free. This is PR A for the sleep slice, the same shape as #170 (llm), #185 (html) and #199 (index). PR B (thestarlightTypeDocinstance, apackages/sleep/README.md, anapi/index.mdrow) follows once this is on main.Found by running the
typedocCLI overpackages/sleep/src/index.tswith the settledapps/docsoptions (outputFileStrategy: "modules",parametersFormat: "list",excludeExternals,disableSources), with@memhtml/htmland@memhtml/indexresolved from #185's and #199's source through apathsentry so only sleep's own debt shows. Before: 15 warnings, 1 MDX brace hit. After: 0 and 0.Changes
phases/relationship-mining.ts:mineAllBandsreturned an inline{ readonly mined: number; readonly deepMined: number }literal insideEffect<…>. typedoc-plugin-markdown renders a literal inside a type argument as escaped brace prose, whichapps/docs/tests/figures.test.tsrejects (the one brace hit). It now returns the exported interfaceMinedBandCounts, re-exported throughphases/index.tsand so through the package root. Same fields, same readonly-ness; the one call site (relationshipMining) is unchanged.index.ts:CandidateEntityLike(consolidator.ts, reached throughCandidateMemoryLike.entities) andEntityClaim(sql.ts, the row type ofentityClaims) were referenced by exported signatures but not re-exported. Both are nowexport typemembers, so the API page links them instead of printing bare names.{@link}targets became code spans: eight resolve to private names (indentBody,advanceOverlap,applyMarks,reindex,SLEEP_EXCLUDED_TYPES,contradictionFinding,aliasPairs,freePath), one to a sibling package's non-exported constant (NEAR_DUPLICATE_THRESHOLD, three sites), and three to nothing:manifestRowsFornever existed under that name (the grouper is the trace-consolidation phase, so the sentence now saystraceConsolidation),STANCE_CONFIDENCE_FLOORisEDGE_CONFIDENCE_FLOOR, andisStateWriteMarkis acontract.tsexport that the package root does not re-export.Why open-only
It adds public type names under
packages/*/src(MinedBandCounts, and the two re-exports), which is the boundary the maintenance authority stops at. No runtime behavior changes; no test is touched.Verification
typedocCLI on the branch: 0 warnings, 0 errors; brace probe (mdxExpressionsover the generated tree): 0 hits. Logs:typedoc-sleep-probe.log(before),typedoc-sleep-after.log(after) in the maintenance workspace.index.mdfor the whole package; PR B will decide whether to split it into per-module entry points the way@memhtml/contractsis split.mise run checkon2e9a838: see the gate comment below.