docs: clarify generateSchemaOnly() writes typings too + the "Only" naming#9
Merged
Merged
Conversation
…aming Make explicit that generateSchemaOnly() takes no arguments and, when typingsPath is set in createAgent, writes the typings in the same pass as the schema. Clarify that "Only" means "generate the files only" (no agent start, no Forest call), not "the schema only", and point to updateTypesOnFileSystem() for the typings-only case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
generateSchemaOnly() also rewrites the typings when typingsPath is set. Tell CI authors to diff the typings too when committed (so a stale one fails the build), and to leave it out otherwise so a regenerated local copy doesn't break CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to the
generateSchemaOnly()docs (already merged). Clarifies two recurring points of confusion:typingsPathis set increateAgent, a singlegenerateSchemaOnly()call writes both the schema and the TypeScript typings, in one pass. Made explicit that the method takes no arguments and reads the paths from the agent options.Onlymeans it only generates the files (no agent start, no call to Forest) — not "the schema only". Points toagent.updateTypesOnFileSystem()for the typings-only case.Why
The name reads as "schema only", which led to confusion about whether typings are produced. This spells out the actual behavior in the API reference.
Single-file change to
reference/agent-api/nodejs.mdx, on top of the current main.🤖 Generated with Claude Code
Note
Clarify that
generateSchemaOnly()also writes typings whentypingsPathis setgenerateSchemaOnly()takes no arguments, readsschemaPath,typingsPath, andtypingsMaxDepthfromcreateAgentoptions, and writes typings in the same pass whentypingsPathis configured.agent.updateTypesOnFileSystem()for regenerating typings alone.Macroscope summarized 44d31ce.