npm / @langchain/typesafe
@langchain/typesafe
What changed in @langchain/typesafe 0.0 to 0.1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
14 breaking1 security2 deprecations14 new APIs and options
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@langchain/typesafe 0.129 changes
Breaking changes 14
ClassificationResponse is removed; question and answer types are re-exported from core.
TypeSafeClassifier responses now use core's ClassifierResponse, with token usage provided through usage_metadata.
Every question now requires instructions.
An invalid question now throws a plain Error from invoke instead of a TypeSafeError from the constructor.
JsonValue is removed.
TypeSafeClassifier now requires @langchain/core >= 1.4.0.
QuestionContent is removed; the replacement name is Content.
State now uses core's type, which no longer lists Date; dates are still sent as ISO strings.
TypeSafeClassifier now extends BaseDecisionModel; questions are supplied in each invoke request instead of the constructor, and invoke receives { state, questions }.
TypeSafeClassifierCallOptions is removed.
Usage is removed.
Token usage uses input_tokens, output_tokens, and total_tokens instead of usage with inputTokens and outputTokens.
ValidatedQuestions is removed.
Installed dependencies now require Zod 4.6.6 or newer to exclude versions affected by GHSA-mrhx-c7xc-m3w5; Zod v3 schemas remain supported through zod/v3.
Deprecations 2
autoModeMiddleware from @langchain/typesafe/middleware is deprecated, warns once when called, and will be removed in 0.2.0; use the version from langchain with classifier: new TypeSafeClassifier().
modelRouterMiddleware from @langchain/typesafe/middleware is deprecated, warns once when called, and will be removed in 0.2.0; use the version from langchain with classifier: new TypeSafeClassifier().
New APIs and options 13
Resumes pagination using the cursor returned by the previous page.
Filters results to teams the specified organization identity is a direct member of.
Controls the number of teams per page; accepts values from 1 to 100 and defaults to 20.
Filters results to workspace teams under the specified organization-wide team.
Adds an endpoint to retrieve a team by ID. Organization-scoped teams require organization:teams:read; workspace-scoped teams require workspaces:teams:read in their workspace.
Adds an endpoint to list a team's access policies, with cursor-based pagination and organization- or workspace-scoped read permissions.
Adds a paginated endpoint to list workspace identities for a workspace-scoped team's members. It accepts page_size and cursor and requires workspaces:teams:read in the team's workspace.
Adds an endpoint to grant an organization-wide team a role in a workspace. It requires organization:teams:manage-grants and allows at most one grant per team per workspace.
Adds a GET endpoint to retrieve an organization-wide team's grant in a workspace. It requires organization:teams:read or workspace-scoped workspaces:teams:read permission.
Filters teams to those belonging to or granted into the specified workspace; results can include role_id and role_name.
Box questions are now supported.
Adds an endpoint to attach an existing organization access policy to a team, optionally limiting an organization-wide team's policy to one workspace.
Image content blocks in state or question content can now be sent as TypeSafe image assets.
@langchain/typesafe 0.02 changes
Security 1
Adds middleware for blocking risky tool calls using a calibrated TypeSafe Noul probability.
New APIs and options 1
Adds TypeSafe Choice-based model routing middleware.