Skip to content

Fix TS2339 build error: tokens does not exist on ParsedCommandParams#2055

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

Fix TS2339 build error: tokens does not exist on ParsedCommandParams#2055
robgruen merged 2 commits intodev/robgruen/mcp_non_blocking_loadingfrom
copilot/68268369843-fix-github-actions-workflow

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

The build_package_shell CI job was failing because getMcpCommandHandlerTable in mcpAgentProvider.ts accessed params.tokens, which only exists on the internal ParseParamsResult<T> type (dispatcher package), not on the public ParsedCommandParams<T> from @typeagent/agent-sdk.

Changes

  • mcpAgentProvider.ts: Replace params.tokens with an explicit collection of arg values from params.args, keyed by the ArgDefinitions passed to the outer function (preserving definition order):
    const serverScriptArgs = Object.keys(args).map((k) =>
        String((params.args as Record<string, unknown>)[k]),
    );
  • Update the run callback parameter type from ParsedCommandParams<{}> to ParsedCommandParams<ParameterDefinitions> to match the CommandHandler interface.
  • Add ParameterDefinitions to the import from @typeagent/agent-sdk.
Original prompt

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


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

…dCommandParams

Co-authored-by: robgruen <25374553+robgruen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/TypeAgent/sessions/aa430ef3-42f5-43eb-8b7c-641bc3b7e232
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow build_package_shell Fix TS2339 build error: tokens does not exist on ParsedCommandParams Mar 23, 2026
Copilot AI requested a review from robgruen March 23, 2026 22:28
@robgruen robgruen marked this pull request as ready for review March 23, 2026 22:28
@robgruen robgruen merged commit 237a56f 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