Skip to content

TS SDK reference: ParamField parameters, code-block signatures, required badges - #3103

Draft
dbrian57 wants to merge 3 commits into
drtangible/wip-test-inline-tagfrom
drtangible/wip-test-inline-tag-design-improvements
Draft

TS SDK reference: ParamField parameters, code-block signatures, required badges#3103
dbrian57 wants to merge 3 commits into
drtangible/wip-test-inline-tagfrom
drtangible/wip-test-inline-tag-design-improvements

Conversation

@dbrian57

@dbrian57 dbrian57 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Pull against #3099. Visual redesign of the generated TypeScript SDK reference pages. This adds a few stock Mintlify components (built specifically for reference docs) to the page-generation template. The result is a much cleaner look.

image-1787603425351

… blocks

Visual restructuring of the generated TypeScript SDK reference, applied
in the generation script's post-processing so it survives regeneration:

- Parameters sections become Mintlify <ParamField> rows (monospace name,
  type chip, description) instead of floating headings with orphaned
  type lines. Per-parameter anchors no longer pollute the on-page TOC.
- Inline-expanded and destructured object members nest inside a bordered
  <Expandable>, restoring the parent/child hierarchy the @inline tag
  flattened. TypeDoc's dotted flattening (a.b at sibling depth) is
  rebuilt into real nesting.
- Required parameters get ParamField's `required` badge; optionality is
  unbadged, per OpenAPI-reference convention, and still visible as `?`
  in the signature.
- Function-page signature blockquotes become syntax-highlighted ```ts
  fences, enriched with parameter types from the Parameters section
  (display-compacted; over-long inline object types collapse to {…},
  with the full type preserved in the parameter body).
- Cross-reference links a type chip can't carry are kept as a "See ..."
  line; `Defined in:` metadata is de-emphasized to <sub>Source: ...</sub>.

All 94 regenerated pages verified rendering on mint dev.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dbrian57
dbrian57 requested a review from a team as a code owner August 24, 2026 21:47
@w-b-hivemind

w-b-hivemind Bot commented Aug 24, 2026

Copy link
Copy Markdown

HiveMind Sessions

2 sessions · 1h 39m · $43

Session Agent Duration Tokens Cost Lines
Documentation Website URL Schema Standards
48f69001-9889-4ca8-83ef-827dc66a6b50
claude 1m 4.3K $0.94 +0 -0
TypeScript SDK Docs Generation Script Improvements
a82c9c38-f2a4-43e5-9024-eedf5c08490d
claude 1h 37m 111.1K $42 +641 -68
Total 1h 39m 115.4K $43 +641 -68
Screenshots

View all sessions in HiveMind →

Run claude --resume 48f69001-9889-4ca8-83ef-827dc66a6b50 to pickup where you left off.

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Readability impact

Word-weighted Flesch-Kincaid grade change across 32 changed pages: -0.4 (easier).

Lower Flesch-Kincaid grade and higher reading ease both mean easier to read. This check is informational and never blocks a PR.

Human readability

Page FK grade before FK grade after FK Δ Reading ease Δ Direction
weave/reference/typescript-sdk/classes/dataset.mdx 8.5 6.4 -2.1 +16.0 easier
weave/reference/typescript-sdk/classes/evaluation.mdx 9.1 7.4 -1.7 +14.9 easier
weave/reference/typescript-sdk/classes/evaluationlogger.mdx 12.8 11.8 -1.0 +11.0 easier
weave/reference/typescript-sdk/classes/messagesprompt.mdx 7.5 11.3 +3.8 -11.4 harder
weave/reference/typescript-sdk/classes/objectref.mdx 8.7 11.2 +2.5 -2.9 harder
weave/reference/typescript-sdk/classes/scorelogger.mdx 13.1 9.8 -3.3 +24.7 easier
weave/reference/typescript-sdk/classes/stringprompt.mdx too little prose to score
weave/reference/typescript-sdk/classes/weaveadkplugin.mdx 10.5 10.0 -0.5 +6.0 easier
weave/reference/typescript-sdk/classes/weaveobject.mdx too little prose to score
weave/reference/typescript-sdk/functions/createopenaiagentstracingprocessor.mdx too little prose to score
weave/reference/typescript-sdk/functions/createotelextension.mdx 9.9 8.8 -1.1 +12.0 easier
weave/reference/typescript-sdk/functions/endconversation.mdx too little prose to score
weave/reference/typescript-sdk/functions/endllm.mdx too little prose to score
weave/reference/typescript-sdk/functions/endturn.mdx too little prose to score
weave/reference/typescript-sdk/functions/flush.mdx too little prose to score
weave/reference/typescript-sdk/functions/flushotel.mdx 9.0 9.3 +0.3 +2.3 harder
weave/reference/typescript-sdk/functions/getcurrentconversation.mdx too little prose to score
weave/reference/typescript-sdk/functions/getcurrentllm.mdx too little prose to score
weave/reference/typescript-sdk/functions/getcurrentturn.mdx too little prose to score
weave/reference/typescript-sdk/functions/init.mdx 7.6 7.5 -0.1 +3.5 easier
weave/reference/typescript-sdk/functions/instrumentopenaiagents.mdx 12.8 12.6 -0.2 +3.5 easier
weave/reference/typescript-sdk/functions/login.mdx 7.2 7.2 +0.0 +2.8 unchanged
weave/reference/typescript-sdk/functions/op.mdx 8.1 10.2 +2.1 -7.2 harder
weave/reference/typescript-sdk/functions/patchrealtimesession.mdx 8.5 7.7 -0.8 +7.1 easier
weave/reference/typescript-sdk/functions/requirecurrentcallstackentry.mdx too little prose to score
weave/reference/typescript-sdk/functions/requirecurrentchildsummary.mdx too little prose to score
weave/reference/typescript-sdk/functions/runisolated.mdx 9.7 10.7 +1.0 +0.5 harder
weave/reference/typescript-sdk/functions/startconversation.mdx too little prose to score
weave/reference/typescript-sdk/functions/startllm.mdx too little prose to score
weave/reference/typescript-sdk/functions/startsubagent.mdx too little prose to score
weave/reference/typescript-sdk/functions/starttool.mdx 6.2 5.6 -0.6 +8.0 easier
weave/reference/typescript-sdk/functions/startturn.mdx too little prose to score
weave/reference/typescript-sdk/functions/weaveaudio.mdx too little prose to score
weave/reference/typescript-sdk/functions/weaveimage.mdx too little prose to score
weave/reference/typescript-sdk/functions/withattributes.mdx 13.3 12.9 -0.4 +3.4 easier
weave/reference/typescript-sdk/functions/wrapclaudeagentsdk.mdx 11.6 10.0 -1.6 +10.1 easier
weave/reference/typescript-sdk/functions/wrapgooglegenai.mdx too little prose to score
weave/reference/typescript-sdk/functions/wrapopenai.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/callschema.mdx 20.6 16.3 -4.3 +75.2 easier
weave/reference/typescript-sdk/interfaces/callsfilter.mdx 21.7 18.0 -3.7 +81.8 easier
weave/reference/typescript-sdk/interfaces/conversation.mdx 13.6 10.0 -3.6 +34.2 easier
weave/reference/typescript-sdk/interfaces/conversationinit.mdx 12.8 11.6 -1.2 +15.5 easier
weave/reference/typescript-sdk/interfaces/customruntimeid.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/getagentsoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/getagentspansoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/getagentturnoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/getagentturnsoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/getagentversionsoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/getcallsoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/httpresponse.mdx 14.4 13.6 -0.8 +5.5 easier
weave/reference/typescript-sdk/interfaces/httpvalidationerror.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/llm.mdx 8.2 6.7 -1.5 +14.1 easier
weave/reference/typescript-sdk/interfaces/llminit.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/message.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/query.mdx 20.3 20.3 +0.0 +2.1 unchanged
weave/reference/typescript-sdk/interfaces/reasoning.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/registercustomruntimeoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/sortby.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/subagent.mdx 7.6 5.7 -1.9 +16.8 easier
weave/reference/typescript-sdk/interfaces/subagentinit.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/tool.mdx 7.9 6.4 -1.5 +12.7 easier
weave/reference/typescript-sdk/interfaces/toolendoptions.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/toolinit.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/turn.mdx 7.3 6.6 -0.7 +8.2 easier
weave/reference/typescript-sdk/interfaces/turninit.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/usage.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/weaveaudio.mdx too little prose to score
weave/reference/typescript-sdk/interfaces/weaveclient.mdx 9.0 10.2 +1.2 -0.6 harder
weave/reference/typescript-sdk/interfaces/weaveimage.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/agent.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/agentmessage.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/agentspan.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/agentturn.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/agentversion.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/getagentspansresult.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/getagentsresult.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/getagentturnresult.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/getagentturnsresult.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/getagentversionsresult.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/jsonobject.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/jsonvalue.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/messagepart.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/modality.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/op.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/opdecorator.mdx 20.7 20.0 -0.7 +2.7 easier
weave/reference/typescript-sdk/type-aliases/registercustomruntimeresult.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/response.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/role.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/session.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/sessioninit.mdx too little prose to score
weave/reference/typescript-sdk/type-aliases/settings.mdx 8.2 7.9 -0.3 +6.1 easier
weave/reference/typescript-sdk/variables/endsession.mdx too little prose to score
weave/reference/typescript-sdk/variables/getcurrentsession.mdx too little prose to score
weave/reference/typescript-sdk/variables/startsession.mdx 12.3 11.6 -0.7 +7.2 easier

AI agent comprehension

Rated 0-3 (higher is easier for an agent to parse and act on).

Page Before After Δ
weave/reference/typescript-sdk/classes/weaveadkplugin.mdx 2 3 +1
weave/reference/typescript-sdk/interfaces/weaveclient.mdx 3 3 +0
weave/reference/typescript-sdk/interfaces/query.mdx 3 3 +0
weave/reference/typescript-sdk/interfaces/llm.mdx 3 3 +0
weave/reference/typescript-sdk/interfaces/turn.mdx 3 3 +0
weave/reference/typescript-sdk/interfaces/httpresponse.mdx 3 3 +0
weave/reference/typescript-sdk/functions/instrumentopenaiagents.mdx 3 3 +0
weave/reference/typescript-sdk/classes/evaluationlogger.mdx 3 3 +0
weave/reference/typescript-sdk/interfaces/subagent.mdx 3 3 +0
weave/reference/typescript-sdk/interfaces/tool.mdx 3 3 +0

Curated-docs baseline median FK grade by type: conceptual 10.5, procedural 8.8, reference 9.4.

From workflow run 33003125753

@dbrian57
dbrian57 marked this pull request as draft August 25, 2026 14:35
dbrian57 and others added 2 commits August 26, 2026 14:47
Replace the <sub>Source: ...</sub> text line with the site's existing
SourceLink snippet (snippets/_includes/source-link.mdx), the compact
right-floated pill styled by `.source-link` and already used across the
Weave tutorials. The import is added once per page, only when a linked
source line exists.

Since the button floats without interrupting text flow, the
_move_source_links_after_description pass (which relocated the text
line below descriptions for reading order) is now obsolete and removed;
links stay where TypeDoc emits them and float to the top right of their
section. Source lines without a GitHub URL (members inherited from
TypeScript's lib .d.ts) keep the <sub> text treatment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… type params

Two more conversion passes extending the ParamField work:

- Members of an anonymous object return type (one heading + property
  signature blockquote each, which Mintlify rendered as misplaced quote
  bars) become <ResponseField> rows — ParamField's sibling component for
  return payloads — with the same badge policy: always-present members
  get `required`, optional ones are unbadged. Sections with any member
  that doesn't parse cleanly are left untouched rather than
  half-converted.

- Type Parameters sections get the same row treatment: name plus
  `extends ...` constraint as the type text, or a bare name row when
  unconstrained — fixing the degenerate "### T" heading followed by a
  lone `T` chip that duplicated the name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant