Skip to content

Upgrade Weave TS SDK docs generation to TypeDoc 0.28 and regenerate#2949

Draft
dbrian57 wants to merge 1 commit into
mainfrom
typedoc-upgrade
Draft

Upgrade Weave TS SDK docs generation to TypeDoc 0.28 and regenerate#2949
dbrian57 wants to merge 1 commit into
mainfrom
typedoc-upgrade

Conversation

@dbrian57

Copy link
Copy Markdown
Contributor

Description

Upgrades the TypeScript SDK reference pipeline from typedoc@0.25.13 + typedoc-plugin-markdown@3.17.1 to typedoc@0.28.20 + typedoc-plugin-markdown@4.12.0, and regenerates the reference from weave v0.53.2-ts.

The upgrade was required, not just nice-to-have — the old pins no longer work: TypeDoc 0.25 rejects the TypeScript 5.9 the Weave SDK now uses, and aborts on an upstream type error in weave's googleAdk integration (duplicate @google/genai versions in its dependency tree). The config now sets skipErrorChecking, since docs generation doesn't need the project to type-check.

Script changes (scripts/reference-generation/weave/generate_typescript_sdk_docs.py)

The markdown plugin had a major rewrite in v4, so the post-processing needed updates:

  • hidePageHeader added alongside hideBreadcrumbs; v4's kind-prefixed page titles (Function: login(), ~~Variable: startSession~~) are cleaned when building frontmatter.
  • The new variables/ output directory is handled in link rewriting and added to the nav.
  • Deprecation hoisting handles v4's ## Deprecated heading sections (levels H2–H5 depending on nesting). Page-level deprecations hoist to the top of the page; member-level ones anchor under the member heading.
  • New fence-aware sanitizer escapes raw <, {, } in prose. TypeDoc 0.28 inherits doc comments through implements clauses, and @google/adk ships a corrupted doc comment in its published .d.ts that would otherwise break the MDX build. (The garbage text on WeaveAdkPlugin.onToolErrorCallback now renders as harmless literal text; the real fix belongs upstream in ADK.)
  • The old ~200-line regex extraction of functions/type-aliases from the consolidated README is now a natural no-op — plugin v4 emits one file per member natively.

Content changes worth knowing about

  • Type-only class exports are now documented as interfaces (Conversation, LLM, SubAgent, Tool, Turn, WeaveClient). Weave exports them via export type { ... } — consumers can name but never construct them — so 0.28's rendering is more accurate than 0.25's constructible-class pages. Six pages moved classes/interfaces/.
  • The deprecated startSession / endSession / getCurrentSession const re-exports moved from functions/ to a new variables/ group, and deprecated symbols get strikethrough index entries.
  • The two colliding Session type aliases are now disambiguated (session, session-1).
  • English nav in docs.json updated to match. Localized navs were deliberately left alone — the locadex automation owns fr/ja/ko and will catch up after merge; running sync_localized_navigation.py here produced a ~2,300-line unrelated diff.

Testing

  • Local build succeeds without errors (mint validate)
  • All 89 generated pages pass a relative-link resolution check (0 broken links)
  • Full pipeline runs end-to-end from a fresh clone and reproduces the committed output

Bumps typedoc 0.25.13 → 0.28.20 and typedoc-plugin-markdown 3.17.1 →
4.12.0, and regenerates the TypeScript SDK reference from weave
v0.53.2-ts. The old pins no longer worked: TypeDoc 0.25 rejects the
TypeScript 5.9 the Weave SDK now uses, and aborts on an upstream type
error in weave's googleAdk integration (skipErrorChecking now set,
since docs generation doesn't need the project to type-check).

Pipeline updates for the plugin's v3 → v4 output format:
- hidePageHeader added alongside hideBreadcrumbs; kind-prefixed titles
  ("Function: login()") cleaned when building frontmatter
- new variables/ directory handled in link rewriting and nav
- deprecation hoisting handles v4's "## Deprecated" heading sections,
  page-level warnings hoist to the top of the page, and inserts are
  MDX-safe after frontmatter
- prose sanitizer escapes raw <, {, } that TypeDoc copies verbatim from
  third-party .d.ts comments (@google/adk ships a corrupted doc comment
  that 0.28 inherits onto WeaveAdkPlugin via its implements clause)

Notable content changes: type-only class exports (Conversation, LLM,
SubAgent, Tool, Turn, WeaveClient) are now correctly documented as
interfaces since consumers can't construct them; the deprecated
Session-era exports move from functions/ to variables/; deprecated
symbols get strikethrough index entries. English nav in docs.json
updated to match; localized navs are left to the locadex sync.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@w-b-hivemind

w-b-hivemind Bot commented Jul 21, 2026

Copy link
Copy Markdown

HiveMind Sessions

2 sessions · 38m · $14

Session Agent Duration Tokens Cost Lines
Sticky Code Language Tabs Script Issue
12f5fc89-18cd-4063-876e-35289cf276de
claude 13s 184 $0.24 +0 -0
The W&B Weave TypeScript SDK reference docs are ge
2ec9ec25-d8af-4141-a125-22c703a6756f
claude 38m 61.6K $14 +125 -26
Total 38m 61.7K $14 +125 -26

View all sessions in HiveMind →

Run claude --resume 12f5fc89-18cd-4063-876e-35289cf276de to pickup where you left off.

@mintlify

mintlify Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wandb 🟢 Ready View Preview Jul 21, 2026, 10:00 PM

@github-actions

Copy link
Copy Markdown
Contributor

📚 Mintlify Preview Links

🔗 View Full Preview

✨ Added (10 total)

📄 Pages (10)

File Preview
weave/reference/typescript-sdk/interfaces/conversation.mdx Conversation
weave/reference/typescript-sdk/interfaces/llm.mdx Llm
weave/reference/typescript-sdk/interfaces/subagent.mdx Subagent
weave/reference/typescript-sdk/interfaces/tool.mdx Tool
weave/reference/typescript-sdk/interfaces/turn.mdx Turn
weave/reference/typescript-sdk/interfaces/weaveclient.mdx Weaveclient
weave/reference/typescript-sdk/type-aliases/session-1.mdx Session 1
weave/reference/typescript-sdk/variables/endsession.mdx Endsession
weave/reference/typescript-sdk/variables/getcurrentsession.mdx Getcurrentsession
weave/reference/typescript-sdk/variables/startsession.mdx Startsession

📝 Changed (80 total)

📄 Pages (79)

File Preview
weave/reference/typescript-sdk.mdx Typescript Sdk
weave/reference/typescript-sdk/classes/dataset.mdx Dataset
weave/reference/typescript-sdk/classes/evaluation.mdx Evaluation
weave/reference/typescript-sdk/classes/evaluationlogger.mdx Evaluationlogger
weave/reference/typescript-sdk/classes/messagesprompt.mdx Messagesprompt
weave/reference/typescript-sdk/classes/objectref.mdx Objectref
weave/reference/typescript-sdk/classes/scorelogger.mdx Scorelogger
weave/reference/typescript-sdk/classes/stringprompt.mdx Stringprompt
weave/reference/typescript-sdk/classes/weaveadkplugin.mdx Weaveadkplugin
weave/reference/typescript-sdk/classes/weaveobject.mdx Weaveobject
... and 69 more files
⚙️ Other (1)
File
docs.json

🗑️ Deleted (9 total)

View deleted files

📄 Pages (9)

File
weave/reference/typescript-sdk/classes/conversation.mdx
weave/reference/typescript-sdk/classes/llm.mdx
weave/reference/typescript-sdk/classes/subagent.mdx
weave/reference/typescript-sdk/classes/tool.mdx
weave/reference/typescript-sdk/classes/turn.mdx
weave/reference/typescript-sdk/classes/weaveclient.mdx
weave/reference/typescript-sdk/functions/endsession.mdx
weave/reference/typescript-sdk/functions/getcurrentsession.mdx
weave/reference/typescript-sdk/functions/startsession.mdx

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: 02decd1 at 2026-07-21 22:01:19 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🔗 Link Checker Results

⚠️ Some issues were detected

Preview: https://wb-21fd5541-typedoc-upgrade.mintlify.site

Full Github Actions output

@mintlify

mintlify Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wandb 🟡 Building Jul 21, 2026, 9:56 PM

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