Feature/multi agent taskid collab 20251114#58
Conversation
…(taskagent, task); yarn publish runs npm publish
- Added a new README for the Multi-Agent Communication demo, detailing the design targets, use cases, and code review processes. - Refactored import paths across multiple files to streamline access to shared modules and improve code organization. - Updated the TypeScript configuration to support composite projects and adjusted paths for better module resolution. - Enhanced the CLI components by updating logger imports and ensuring consistent usage of shared utilities. - Improved the architecture of the agents by implementing a Programming Agent structure for better validation and error handling.
…ew architecture and validation pipeline
…ser dialogue and interaction paths
Summary of ChangesHello @crazygo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces foundational changes for a sophisticated multi-agent system, detailing a new demo for streamlined communication and task-ID centric collaboration. A major refactoring effort was undertaken to simplify module import paths across the entire project, enhancing code readability and maintainability. Additionally, TypeScript configurations were upgraded to leverage composite projects for better build efficiency, and package publishing scripts were modernized. These changes collectively aim to improve the developer experience, clarify system architecture, and prepare the groundwork for advanced agent interactions. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and valuable refactoring of the project's import path aliases, moving from @taskagent/... to shorter, more modular aliases like @core, @shared, etc. This greatly improves code maintainability and readability. The updates to package.json scripts and tsconfig.json files are also positive changes that align with modern TypeScript monorepo best practices. Overall, this is a solid architectural improvement. I've included one minor suggestion to remove a couple of unused imports.
| import fs from 'fs'; | ||
| import path from 'path'; |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "compilerOptions": { | ||
| "outDir": "./dist", | ||
| "rootDir": ".", | ||
| "rootDir": "..", | ||
| "jsx": "react" |
There was a problem hiding this comment.
Keep CLI rootDir at package level
Changing compilerOptions.rootDir to ".." makes tsc emit files under dist/cli/... instead of dist/... (TypeScript mirrors the directory structure relative to rootDir). The CLI package still declares its bin as ./dist/main.js in packages/cli/package.json, so after yarn workspace @taskagent/cli build the expected entry point is missing and npx taskagent/node dist/main.js fails with ENOENT. Please keep rootDir at "." (or adjust the bin/output paths) so the compiled artifact stays at dist/main.js.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase to use shorter, simpler TypeScript path aliases, migrating from @taskagent/* prefixes to cleaner aliases like @agents, @shared, @core, @execution, @presets, and @tabs. It also includes minor improvements to package scripts and adds project reference configurations for better build performance.
- Replaced verbose
@taskagent/path aliases with concise alternatives (@agents,@shared,@core, etc.) - Updated package.json scripts:
prepublishOnly→prepackand streamlined publish command - Added TypeScript composite project configurations to improve incremental builds
- Updated UI text from "Switch Driver" to "Switch Agent" for better terminology
Reviewed Changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Refactored path aliases from @taskagent/* to shorter forms like @agents, @shared, @core, with specific mappings for commonly-used subpaths |
| packages/presets/index.ts | Updated example import in documentation comment to use new @presets alias |
| packages/execution/types.ts | Updated comment and imports to use new @agents alias |
| packages/execution/TabExecutor.ts | Updated imports to use @core/event-bus and @agents aliases |
| packages/execution/MessageAdapter.ts | Updated imports to use new path aliases |
| packages/core/tsconfig.json | Added composite: true for TypeScript project references |
| packages/cli/workspace/settings.ts | Changed from node:fs/node:path to fs/path, updated to @shared/logger |
| packages/cli/types.ts | Updated comment and export to use @core alias |
| packages/cli/tsconfig.json | Changed rootDir to parent directory, added execution package reference |
| packages/cli/store/MessageStore.ts | Updated import to @shared/logger (but still has relative import to core/event-bus) |
| packages/cli/src/contexts/KeypressProvider.tsx | Updated import to @shared/logger |
| packages/cli/main.tsx | Updated all imports to new aliases, changed "Switch Driver" to "Switch Agent" |
| packages/cli/hooks/useStreamSession.ts | Updated import to @shared/logger |
| packages/cli/hooks/useMessageQueue.ts | Updated import to @shared/logger |
| packages/cli/hooks/useAgentEventBridge.ts | Updated imports to new aliases |
| packages/cli/drivers/types.ts | Updated import to @shared/task-manager |
| packages/cli/drivers/registry.ts | Updated import to @agents alias |
| packages/cli/drivers/plan-review-do/index.ts | Updated import to @shared/logger |
| packages/cli/drivers/plan-review-do/flow.ts | Updated import to @shared/logger |
| packages/cli/domain/taskStore.ts | Updated imports to new aliases, added blank line for readability |
| packages/cli/config/ai-provider.ts | Updated import to @shared/logger, added blank line |
| packages/cli/components/TaskSpecificView.tsx | Updated import to @shared/task-manager |
| packages/cli/components/StatusControls.tsx | Updated imports to new aliases |
| packages/cli/components/InputBar.tsx | Updated import to @shared/logger |
| packages/cli/components/ChatPanel.tsx | Updated import to @shared/logger |
| packages/cli/cli/config.ts | Updated imports to @shared aliases |
| packages/cli/cli/args.ts | Updated import to @shared/logger, added unused fs/path imports |
| packages/agents/workflow-agents/LoopAgent.ts | Updated import to @shared/logger |
| packages/agents/tsconfig.json | Added composite: true for TypeScript project references |
| packages/agents/runtime/workflowTools.ts | Updated import to @core/event-bus (but has relative import to execution) |
| packages/agents/runtime/types.ts | Updated imports to new aliases |
| packages/agents/runtime/runPromptAgentStart.ts | Updated import to @shared/logger |
| packages/agents/runtime/runClaudeStream.ts | Updated import to @shared/logger |
| packages/agents/runtime/flows/baseClaudeFlow.ts | Updated imports to @core aliases |
| packages/agents/runtime/async-task/types.ts | Updated import to @core/event-bus |
| packages/agents/runtime/async-task/helpers.ts | Updated comment and imports, reordered imports |
| packages/agents/review/index.ts | Updated import to @core/event-bus (but has relative import to execution) |
| packages/agents/review/ReviewAgent.ts | Updated import to @shared/logger |
| packages/agents/registry/AgentRegistry.ts | Updated imports to new aliases |
| packages/agents/feature-writer/index.ts | Updated import to @core/event-bus (but has relative import to execution) |
| packages/agents/feature-writer/FeatureWriterAgent.ts | Updated import, removed unused imports |
| packages/agents/devhub/summarizer/SummarizerAgent.ts | Updated import to @shared/logger |
| packages/agents/devhub/judge/JudgeAgent.ts | Updated import to @shared/logger |
| packages/agents/devhub/coding-loop/index.ts | Updated import to @shared/logger |
| packages/agents/devhub/coding-loop/event-collector.ts | Updated import to @shared/logger |
| packages/agents/devhub/coding-loop/SummarizationCallback.ts | Updated import to @shared/logger |
| packages/agents/devhub/DevHub.ts | Updated imports to new aliases |
| packages/agents/desktop/index.ts | Updated imports to new aliases |
| packages/agents/coder/index.ts | Updated import to @core/event-bus (but has relative import to execution) |
| packages/agents/coder/CoderAgent.ts | Updated import to @core/event-bus |
| packages/agents/blueprint/index.ts | Updated import to @core/event-bus, added blank line |
| packages/agents/blueprint/BlueprintLoop.ts | Updated imports to new aliases |
| package.json | Changed prepublishOnly to prepack, updated publish script to run actual command |
| .askman/tasks/20251114-2255-rebuild-multi-agent-comm-demo/README.md | New task documentation file |
Comments suppressed due to low confidence (2)
packages/cli/cli/args.ts:3
- Unused import fs.
import fs from 'fs';
packages/cli/cli/args.ts:4
- Unused import path.
import path from 'path';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -12,7 +12,7 @@ | |||
| import { EventEmitter } from 'node:events'; | |||
| import type { Message } from '../types.js'; | |||
| import type { EventBus } from '../../core/event-bus/EventBus.js'; | |||
There was a problem hiding this comment.
This relative import should be updated to use the new path alias @core/event-bus instead of ../../core/event-bus/EventBus.js to be consistent with the rest of the PR's refactoring from @taskagent/* aliases to shorter aliases like @core, @shared, etc.
| @@ -3,7 +3,7 @@ import { fileURLToPath } from 'url'; | |||
| import { loadAgentPipelineConfig } from '../runtime/agentLoader.js'; | |||
| import type { RunnableAgent } from '../runtime/types.js'; | |||
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |||
There was a problem hiding this comment.
This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |
| import type { TabExecutor } from '@execution/TabExecutor.js'; |
| @@ -3,7 +3,7 @@ import { fileURLToPath } from 'url'; | |||
| import { loadAgentPipelineConfig } from '../runtime/agentLoader.js'; | |||
| import type { RunnableAgent } from '../runtime/types.js'; | |||
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |||
There was a problem hiding this comment.
This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |
| import type { TabExecutor } from '@execution/TabExecutor.js'; |
| @@ -3,7 +3,7 @@ import { fileURLToPath } from 'url'; | |||
| import { loadAgentPipelineConfig } from '../runtime/agentLoader.js'; | |||
| import type { RunnableAgent } from '../runtime/types.js'; | |||
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |||
There was a problem hiding this comment.
This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |
| import type { TabExecutor } from '@execution/TabExecutor.js'; |
| @@ -1,7 +1,7 @@ | |||
| import { tool } from '@anthropic-ai/claude-agent-sdk'; | |||
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |||
There was a problem hiding this comment.
This relative import should be updated to use the new path alias @execution/TabExecutor.js instead of ../../execution/TabExecutor.js to be consistent with the rest of the PR's refactoring.
| import type { TabExecutor } from '../../execution/TabExecutor.js'; | |
| import type { TabExecutor } from '@execution/TabExecutor.js'; |
| import fs from 'fs'; | ||
| import path from 'path'; |
There was a problem hiding this comment.
Unused imports: fs and path are imported but not used anywhere in this file. These imports should be removed.
| import fs from 'fs'; | |
| import path from 'path'; |
| @@ -1,4 +1,4 @@ | |||
| import { addLog } from '@taskagent/shared/logger'; | |||
| import { addLog } from '@shared/logger'; | |||
There was a problem hiding this comment.
Unused import addLog.
| import { addLog } from '@shared/logger'; |
…ypeScript path resolution
Fixes Yarn PnP resolution error where vite-tsconfig-paths couldn't find its peer dependency 'vite'. Added vite v6.0.1 to devDependencies and updated .gitignore to exclude .vite-cache directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
No description provided.