Skip to content

dispatcher: remove TypeScript schema stitch mode - #2759

Merged
curtisman merged 1 commit into
microsoft:mainfrom
curtisman:cleangen
Jul 30, 2026
Merged

dispatcher: remove TypeScript schema stitch mode#2759
curtisman merged 1 commit into
microsoft:mainfrom
curtisman:cleangen

Conversation

@curtisman

@curtisman curtisman commented Jul 29, 2026

Copy link
Copy Markdown
Member

This PR removes the non-generated TypeScript schema composition path from dispatcher translation and makes generated action schema the only supported mode.

Why

  • The codebase was maintaining two schema paths:
    • Generated action schema
    • TypeScript stitch/compose path
  • The TypeScript stitch path added branching and maintenance overhead, while generated schema is the intended path and already supports the needed options.

What changed

  • Removed the CLI toggle for non-generated schema mode.
    • The schema command no longer accepts the generated flag.
    • Exact generation is now always used when printing schemas from CLI.
  • Removed translation config support for enabling/disabling schema generation.
    • Deleted schema.generation.enabled from dispatcher config type/defaults.
    • Removed related config command handler toggle.
  • Simplified translator creation to always use generated action schema.
    • Deleted TypeScript stitch-mode helper code and related imports.
    • createTypeAgentValidator now always builds from composeActionSchema + createActionSchemaJsonValidator.
    • loadAgentJsonTranslator/getFullSchemaText signatures now always take generation options (no nullable mode switch).
  • Updated translation request flow.
    • getTranslatorForSchema now always constructs generation options (no null branch).

The dispatcher translator had two code paths: a generated schema path
(using action-schema to build the schema at runtime) and a legacy stitch
path (reading and concatenating raw .ts source files via TypeChat's
TypeScript validator). The stitch path was the fallback when
schema.generation.enabled was false.

Remove the stitch path entirely:
- Drop getTranslatorSchemaDef, getTranslatorSchemaDefs,
  getChangeAssistantSchemaDef from agentTranslators.ts
- createTypeAgentValidator and getFullSchemaText now unconditionally
  use the generated path
- Remove schema.generation.enabled from the session config type and
  defaults
- Remove the @config schema generation on/off command handler
- Remove --generated/--no-generated from the CLI schema command
@curtisman
curtisman requested a review from robgruen July 29, 2026 22:41
@curtisman
curtisman enabled auto-merge July 29, 2026 22:41
@curtisman
curtisman added this pull request to the merge queue Jul 30, 2026
Merged via the queue into microsoft:main with commit 20bd34d Jul 30, 2026
27 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.

2 participants