Skip to content

docs(site): add @memhtml/llm to the API tier - #171

Merged
laithalsaadoon merged 3 commits into
mainfrom
docs/api-llm
Sep 15, 2026
Merged

laithalsaadoon merged 3 commits into
mainfrom
docs/api-llm

Conversation

@laithalsaadoon

@laithalsaadoon laithalsaadoon commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

What

Fourth package in the generated API tier: @memhtml/llm at /api/llm/.

  • apps/docs/astro.config.ts: one more starlightTypeDoc instance (output: "api/llm", the same options as the three before it, reasons in the comment block above the first instance) and a sidebar group under API.
  • apps/docs/src/content/docs/api/index.md: one row in the coverage table.
  • packages/llm/README.md: new. The package had no README, and the generator merges it in as the page's opening. It describes the two lanes (Cohere embeddings, Anthropic and OpenAI generation), the direct Bedrock client and the HTTP proxy lane with the four MEMHTML_LLM_* variables, the model table, the wire helpers, how ModelUnavailable and LlmContractViolation divide the failures, then lists the nine modules and the symbols each holds. Every constant and default it quotes was checked against the source.

Stacked on

This branch is based on docs/llm-response-types (the type-only PR that names the two Promise<...> response shapes). GitHub will retarget this PR to main when that one merges. On its own, without that base, the generated page carries two escaped-brace renderings that tests/figures.test.ts rejects.

Proof

All on this head (4437698), clone reset to origin/main at 9ad7240 plus the base commit:

  • typedoc CLI over packages/llm/src/index.ts with the site's options: exit 0, 0 warnings, one page (1915 lines before the README merge); MDX brace probe over it: 0 hits.
  • astro build with the fourth instance: exit 0; brace probe over the whole generated api/ tree: 0 hits.
  • /api/llm/ temporarily added to AUDITED_PAGES and lighthouserc.json, then restored (git status clean afterwards): test:a11y 33/33; test:budget 5 URLs x 3 runs, no failed assertions. Lighthouse on /api/llm/: accessibility 100, best practices 100, SEO 100 on all three runs; performance 100, 81, 100.
  • mise run check: exit 0, 64/64 tasks, 2m56s.

Boundary

Documentation and docs-site generation wiring only (authority items 2 and 3); no test, runtime, script or workflow file is touched by this commit. Mergeable by the maintenance run once its base is main and CI is green.

…I tier renders them

Type-only and comment-only. No runtime statement changes; tsc emits the same JavaScript.

- `InvokeClient.send` now resolves to a named `InvokeResult` interface and `ProxyFetch` to a
  named `ProxyFetchResponse` interface, both exported. typedoc-plugin-markdown renders an
  inline object literal inside `Promise<...>` as escaped `\{ ... \}` prose, which the docs
  site's MDX brace probe (`apps/docs/tests/figures.test.ts`) rejects; a named interface
  renders as a linked declaration. The structural shapes are unchanged, so every existing
  fake and the platform `Response` still satisfy them.
- `thinkingFor`'s inline return literal gains a member doc comment, which makes the plugin
  emit a fenced type-literal block instead of escaped prose.
- `Provider` is re-exported from `index.ts`: `ModelInfo.provider` references it and TypeDoc
  warned that it was referenced but not included.
- Three `{@link}` tags pointing at module-private symbols (`closingTagsFor`, `PROXY_BACKOFF`,
  `unwrapDoubleEncoded`) become code spans; TypeDoc cannot link a symbol the package does
  not export and warned on each.

Measured with the typedoc CLI over `packages/llm/src/index.ts`: 4 warnings and 3 brace hits
before, 0 and 0 after. Prepares the `@memhtml/llm` slice of the generated API tier, which
follows in a separate docs-only PR stacked on this one.
Fourth package in the generated reference: one `starlightTypeDoc` instance writing `api/llm/`, the
same options as the three before it, a sidebar group, a row in the authored `api/index.md`, and a
new `packages/llm/README.md` that the generator merges in as the page's opening (the package had
none). The README describes the two lanes (Cohere embeddings, Anthropic and OpenAI generation), the
direct Bedrock client and the HTTP proxy lane with the four `MEMHTML_LLM_*` variables, the model
table, the wire helpers, and how `ModelUnavailable` and `LlmContractViolation` divide the failures,
then lists the nine modules and the symbols each holds.

Stacked on the `docs/llm-response-types` commit, which names the two `Promise<...>` response shapes
the plugin could only render as escaped-brace prose; with it the typedoc CLI over the package
reports 0 warnings and the MDX brace probe 0 hits.
Copilot AI lite review requested due to automatic review settings September 15, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@laithalsaadoon
laithalsaadoon merged commit 5a2e7b0 into main Sep 15, 2026
11 checks passed
@laithalsaadoon
laithalsaadoon deleted the docs/api-llm branch September 15, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants