Skip to content

docs: clarify generateSchemaOnly() writes typings too + the "Only" naming#9

Merged
Scra3 merged 4 commits into
mainfrom
docs/clarify-generateschemaonly-typings
Jul 2, 2026
Merged

docs: clarify generateSchemaOnly() writes typings too + the "Only" naming#9
Scra3 merged 4 commits into
mainfrom
docs/clarify-generateschemaonly-typings

Conversation

@Scra3

@Scra3 Scra3 commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

Follow-up to the generateSchemaOnly() docs (already merged). Clarifies two recurring points of confusion:

  1. It writes the typings too. When typingsPath is set in createAgent, a single generateSchemaOnly() 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.
  2. The "Only" naming. Only means it only generates the files (no agent start, no call to Forest) — not "the schema only". Points to agent.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 when typingsPath is set

  • Updates nodejs.mdx to clarify that generateSchemaOnly() takes no arguments, reads schemaPath, typingsPath, and typingsMaxDepth from createAgent options, and writes typings in the same pass when typingsPath is configured.
  • Adds a note explaining that "Only" means the method generates files without starting the agent or sending the schema, and points to agent.updateTypesOnFileSystem() for regenerating typings alone.
  • Updates deploy.mdx to advise that the typings file should be included in CI diff checks when committed, or excluded when not committed, to avoid stale-typings or broken-build issues.

Macroscope summarized 44d31ce.

…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>
@mintlify

mintlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

Project Status Preview Updated (UTC)
forest 🟢 Ready View Preview Jul 1, 2026, 6:06 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

alban bertolini and others added 2 commits July 1, 2026 19:55
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>
@Scra3 Scra3 merged commit fa379d7 into main Jul 2, 2026
2 checks passed
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