Migrate CLI types to use dispatcher-types instead of full dispatcher package#2200
Merged
GeorgeNgMsft merged 6 commits intomainfrom Apr 15, 2026
Merged
Migrate CLI types to use dispatcher-types instead of full dispatcher package#2200GeorgeNgMsft merged 6 commits intomainfrom
GeorgeNgMsft merged 6 commits intomainfrom
Conversation
…ency on full agent-dispatcher package
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR migrates the CLI’s type-only imports (and the getStatusSummary helper) off the heavyweight agent-dispatcher package onto the lightweight @typeagent/dispatcher-types, reducing transitive dependency load while preserving existing APIs via re-exports.
Changes:
- Added
DispatcherName/DispatcherEmojiconstants to@typeagent/dispatcher-typesand introduced a newhelpers/statussubpath export forgetStatusSummary. - Updated
agent-dispatcherhelpers/constants to re-export from@typeagent/dispatcher-typesto avoid breaking internal consumers. - Switched CLI and selected tests to import dispatcher types and
getStatusSummarydirectly from@typeagent/dispatcher-types.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ts/packages/dispatcher/types/src/helpers/status.ts | Adds getStatusSummary implementation into the types package. |
| ts/packages/dispatcher/types/src/dispatcher.ts | Introduces shared dispatcher name/emoji constants as single source of truth. |
| ts/packages/dispatcher/types/package.json | Exposes ./helpers/status via package exports. |
| ts/packages/dispatcher/nodeProviders/test/provider.spec.ts | Updates type imports to come from @typeagent/dispatcher-types. |
| ts/packages/dispatcher/dispatcher/src/helpers/status.ts | Re-exports getStatusSummary from the new types-package helper subpath. |
| ts/packages/dispatcher/dispatcher/src/context/dispatcher/dispatcherUtils.ts | Re-exports dispatcher constants from @typeagent/dispatcher-types. |
| ts/packages/cli/test/multiClientInteraction.spec.ts | Updates CLI test type imports to the new types package. |
| ts/packages/cli/src/enhancedConsole.ts | Updates CLI enhanced console type imports to the new types package. |
| ts/packages/cli/src/commands/connect.ts | Switches connect command to import Dispatcher and getStatusSummary from @typeagent/dispatcher-types. |
| ts/packages/cli/package.json | Adds @typeagent/dispatcher-types dependency. |
Files not reviewed (1)
- ts/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…oft/TypeAgent into dev/georgeng/shared_types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate CLI types to @typeagent/dispatcher-types
The CLI previously depended on agent-dispatcher — a heavyweight package with 30+ transitive dependencies — solely to import a handful of types and a small helper function. This PR eliminates that unnecessary coupling and reduces it's dependencies.
What changed
@typeagent/dispatcher-types (the lightweight types-only package):
Added DispatcherName and DispatcherEmoji constants to dispatcher.ts — these are now the single source of truth
Added getStatusSummary in a new helpers/status subpath export; it depends only on DispatcherStatus and the two constants above
agent-dispatcher:
dispatcherUtils.ts now imports and re-exports DispatcherName/DispatcherEmoji from @typeagent/dispatcher-types — all 17 internal consumers are unaffected
helpers/status.ts is now a one-line re-export from @typeagent/dispatcher-types/helpers/status — api and shell consumers are unaffected
packages/cli:
enhancedConsole.ts and connect.ts now import all 8 types (Dispatcher, ClientIO, RequestId, IAgentMessage, TemplateEditConfig, PendingInteractionRequest, PendingInteractionResponse, PendingInteractionEntry) and getStatusSummary directly from @typeagent/dispatcher-types
agent-dispatcher remains in cli/package.json for createDispatcher and other non-type imports used by other commands (constructions, data/, replay, run/, test/*)