Skip to content

Fix TypeScript build errors in agent-dispatcher package#2051

Merged
robgruen merged 2 commits intodev/robgruen/mcp_non_blocking_loadingfrom
copilot/fix-github-actions-workflow-build-ts
Mar 23, 2026
Merged

Fix TypeScript build errors in agent-dispatcher package#2051
robgruen merged 2 commits intodev/robgruen/mcp_non_blocking_loadingfrom
copilot/fix-github-actions-workflow-build-ts

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

The agent-dispatcher package failed to build due to several TypeScript type errors introduced by recent API changes that weren't propagated to all call sites.

CompletionGroups return type mismatch (configCommandHandlers.ts)

CommandHandler.getCompletion was updated to return Promise<CompletionGroups> (wrapped object with groups property), but 7 implementations still returned Promise<CompletionGroup[]>:

// Before
return completions; // CompletionGroup[]

// After
return { groups: completions }; // CompletionGroups

Missing properties on CommandHandlerContext (commandHandlerContext.ts)

Three properties used in command.ts and dispatcher.ts were missing from the type definition:

  • currentAbortSignal: AbortSignal | undefined
  • activeRequests: Map<string, AbortController>
  • displayLog: DisplayLog

Added to the type and initialized in the context factory (undefined, new Map(), and await DisplayLog.load(persistDir) respectively).

Wrong callback return type in configureGrammarGeneration (commandHandlerContext.ts)

The callback passed to configureGrammarGeneration returned a string (file path) but the signature requires (schemaName: string) => ParsedActionSchema. Also referenced the non-existent actionConfig.compiledSchemaFilePath field. Fixed to load and parse the .pas.json file:

const content = fs.readFileSync(schemaPath, "utf-8");
return fromJSONParsedActionSchema(JSON.parse(content) as ParsedActionSchemaJSON);

Non-existent compiledSchemaFilePath on ActionConfig (appAgentManager.ts)

Same dead field access; replaced with config.schemaFilePath?.endsWith(".pas.json") check.

Original prompt

Fix the failing GitHub Actions workflow build_ts (windows-latest, 20)
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 68255852060
Job URL: https://github.com/microsoft/TypeAgent/actions/runs/23459055003/job/68255852060


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow build_ts Fix TypeScript build errors in agent-dispatcher package Mar 23, 2026
Copilot AI requested a review from robgruen March 23, 2026 21:05
@robgruen robgruen marked this pull request as ready for review March 23, 2026 21:07
@robgruen robgruen merged commit fc2e97e into dev/robgruen/mcp_non_blocking_loading Mar 23, 2026
1 check 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