-
Notifications
You must be signed in to change notification settings - Fork 7
Add agent installation and management system (#391) #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Implement comprehensive agent installation feature with support for: - Agent source resolution (catalog, git, URL, local) - Secure package downloading with caching - Agent validation and security checks - Dependency management for npm/pip/go packages - Complete CLI commands: add, list, remove agents - Example vector store agent template Features: • `agentuity add <source>` - Install agents from various sources • `agentuity add list` - List installed agents • `agentuity add remove <name>` - Remove installed agents • Comprehensive error handling with user-friendly messages • Security validation against malicious code patterns • Support for TypeScript, JavaScript, Python, and Go agents 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Move agent installation commands from root-level `add` to agent subcommands: • `agentuity add` → `agentuity agent add` • `agentuity add list` → `agentuity agent list-local` • `agentuity add remove` → `agentuity agent remove` This provides a more logical command structure where all agent-related operations are grouped under the `agent` command namespace, consistent with existing agent commands like `create`, `delete`, and `list`. Changes: - Remove cmd/add.go (standalone command) - Add agent installation subcommands to cmd/agent.go - Update command examples and help text - Maintain all existing functionality and flags 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
jhaynie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some WIP comments but this is cool
| return fmt.Errorf("invalid agent name: %s (only alphanumeric, dots, underscores, and hyphens allowed)", agentName) | ||
| } | ||
|
|
||
| agentPath := filepath.Join(projectRoot, "agents", agentName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to use the project.Project object here and then
use theproject.Bundler.AgentConfig.Dir to get the dynamic source directory for agents
we also have a util.SafeProjectFilename for the agentname filename transformer that might be useful or at least you could add a method in that file to create a regex if you just need validation
|
|
||
| installer := agent.NewAgentInstaller(projectRoot) | ||
|
|
||
| agents, err := installer.ListInstalled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use reconcileAgentList and filter by the Local property too
|
|
||
| switch strings.ToLower(e.Language) { | ||
| case "typescript", "javascript": | ||
| msg += "\n\nTry:\n - Ensure npm is installed and accessible\n - Check your package.json exists\n - Run 'npm install' manually" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also probably need to check if runtime is bun and switch between bun vs npm
| } | ||
|
|
||
| // Create agent directory | ||
| agentDir := filepath.Join(i.projectRoot, "agents", agentName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use our project directory since that is defined by template
Implement comprehensive agent installation feature with support for:
Features:
•
agentuity add <source>- Install agents from various sources •agentuity add list- List installed agents•
agentuity add remove <name>- Remove installed agents • Comprehensive error handling with user-friendly messages • Security validation against malicious code patterns • Support for TypeScript, JavaScript, Python, and Go agents🤖 Generated with Claude Code