Skip to content

chore: regenerate api docs for 4 libs + drop dead AgentRef interface#153

Merged
blove merged 3 commits into
mainfrom
chore/post-unification-cleanup
May 1, 2026
Merged

chore: regenerate api docs for 4 libs + drop dead AgentRef interface#153
blove merged 3 commits into
mainfrom
chore/post-unification-cleanup

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 1, 2026

Two follow-ups from PR #152.

  1. generate-api-docs.ts rewrite. The old script looked for libs/angular/src/public-api.ts (a path that hasn't existed since the rename). Updated to iterate over all four publishable libraries — langgraph, chat, render, ag-ui — writing to their respective /docs/<slug>/api/api-docs.json files. Verified: zero AgentRef references in regenerated agent docs; LangGraphAgent is documented as the public type.

  2. Drop unused AgentRef interface from libs/langgraph/src/lib/agent.types.ts. Defined but never imported after PR refactor(langgraph): unify agent() return type as LangGraphAgent #152.

Generated artifact regeneration

Running npm run generate-api-docs now produces:

  • /docs/agent/api/api-docs.json — 19 entries (LangGraphAgent, MockLangGraphAgent, AgentConfig, etc.)
  • /docs/chat/api/api-docs.json — 109 entries
  • /docs/render/api/api-docs.json — 21 entries
  • /docs/ag-ui/api/api-docs.json — 7 entries (new)

Test Plan

  • All libs lint/test/build
  • Website builds clean with regenerated docs

🤖 Generated with Claude Code

1. generate-api-docs.ts: rewrite to iterate over all four publishable
   libraries (langgraph, chat, render, ag-ui). The old script only
   knew about a single 'libs/angular' entry point that hasn't existed
   since the rename. Output now goes to:
   - apps/website/content/docs/agent/api/  (from libs/langgraph)
   - apps/website/content/docs/chat/api/   (from libs/chat)
   - apps/website/content/docs/render/api/ (from libs/render)
   - apps/website/content/docs/ag-ui/api/  (from libs/ag-ui)
2. Regenerated api-docs.json files reflect the unified LangGraphAgent
   API. Verified: zero residual AgentRef references in agent docs.
3. Drop the unused AgentRef interface from libs/langgraph/src/lib/
   agent.types.ts. Following the unification PR (#152), the type was
   defined but never imported. Comments in agent.fn.ts and
   mock-langgraph-agent.ts that referenced "AgentRef fields preserved"
   stay as historical notes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 1, 2026 4:37pm
cacheplane-minting-service Error Error May 1, 2026 4:37pm

Request Review

Manual validation pass to prove @ngaf/*@0.0.1 packages install + build
+ run from npm. Two thin Angular apps share one workspace:
- ag-ui-fake: end-to-end runtime test using FakeAgent (no backend)
- langgraph-build: build-only smoke against published @ngaf/langgraph

Catches packaging bugs, missing peerDeps, broken exports that
internal tsconfig-paths resolution hides.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Smoke-tested @ngaf/*@0.0.1 by tarballing dist/ and installing into
a fresh Angular 21 app at ~/tmp/ngaf/smoke-workspace. Three packaging
bugs surfaced; all fixed in this commit.

1. @ngaf/a2ui, @ngaf/partial-json, @ngaf/licensing publish-target
   missing. Their project.json files lacked an explicit
   nx-release-publish target, so Nx Release defaulted to publishing
   the project root (raw source) instead of dist/. Added explicit
   target with packageRoot: "dist/{projectRoot}".

2. @ngaf/a2ui, @ngaf/partial-json built with emitDeclarationOnly:
   true (inherited from tsconfig.base.json). Their dists contained
   only .d.ts files, no .js. Added emitDeclarationOnly: false
   override to libs/a2ui/tsconfig.lib.json and
   libs/partial-json/tsconfig.lib.json.
   (libs/licensing already had this override.)

3. @ngaf/chat bundled vitest into the runtime FESM file.
   runAgentConformance and runAgentWithHistoryConformance import
   { describe, it, expect } from 'vitest' at module level and were
   exported from the main public-api. Moved to a secondary entry
   point @ngaf/chat/testing:
   - Created libs/chat/testing/ng-package.json + public-api.ts
   - git mv'd agent-conformance.ts and agent-with-history-conformance
     .ts (and the conformance spec) into libs/chat/testing/
   - Updated their import of Agent/AgentWithHistory from '../agent'
     to '@ngaf/chat' (cross-entry-point convention)
   - Removed conformance exports from libs/chat/src/public-api.ts
   - Added @ngaf/chat/testing path to tsconfig.base.json
   - Updated internal consumers (libs/ag-ui and libs/langgraph
     conformance specs) to import from @ngaf/chat/testing.

Verified: smoke-app/ag-ui-fake builds (755kB initial), serves at
localhost:4300, no minting-service leakage in dist, all @ngaf/*
packages credited as MIT in 3rdpartylicenses.txt.
smoke-app/langgraph-build builds (606kB initial).

This commit fixes the artifacts; next step is to bump to 0.0.2 and
republish.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blove blove merged commit 0f005f2 into main May 1, 2026
14 of 15 checks passed
@blove blove deleted the chore/post-unification-cleanup branch May 7, 2026 16:30
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