Remove agent name pattern validation #231
Open
+24
−15
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.
Note
Description
This PR removes strict agent name validation and adds filesystem-safe filename generation. Previously, the CLI only accepted lowercase alphanumeric names with underscores (
^[a-z0-9_]+$), but agents created via the AI builder can have names with uppercase letters, spaces, dashes, and other characters. This change allows any valid name while ensuring filesystem compatibility by converting names to safe slugs for file storage.Related Issue
Companion to base44-dev/apper#3610 (server-side change)
Type of Change
Changes Made
/^[a-z0-9_]+$/regex validation fromAgentConfigSchema- now allows any non-empty name (1-100 chars)toFileSlug()function to convert agent names to filesystem-safe filenames (lowercase, alphanumeric + underscores)writeAgents()to use slugified filenames when writing/deleting agent config filesgenerateAgentConfigContent()to remove outdated naming constraint note.worktreesto.gitignoreTesting
npm test)Checklist
Additional Notes
Key change: Agent names can now include spaces, uppercase letters, and special characters (e.g., "My Custom Agent" or "GPT-4 Helper"), but will be stored as filesystem-safe filenames (e.g.,
my_custom_agent.jsonc,gpt_4_helper.jsonc). The validation now only prevents empty names and excessively long names (>100 chars).This ensures the CLI can work seamlessly with agents created through the AI builder while maintaining filesystem compatibility across all platforms.
🤖 Generated by Claude | 2026-02-11 23:17 UTC