Skip to content

[AIDE-123] Update Command Targets - #96

Merged
chandlerhuff merged 1 commit into
mainfrom
feature/AIDE-123-update-command-targets
Aug 28, 2026
Merged

[AIDE-123] Update Command Targets#96
chandlerhuff merged 1 commit into
mainfrom
feature/AIDE-123-update-command-targets

Conversation

@chandlerhuff

Copy link
Copy Markdown
Member

Summary

Commands previously targeted a single repository (one targetRepositoryId). This change allows a command scoped to REPOSITORY_WORKTREE to target multiple repositories at once via a new many-to-many join table, so a single command definition can run in worktrees of several repositories. Existing singular targets are migrated into the new structure, and deprecated singular fields remain for compatibility while new plural fields (targetRepositoryIds / targetRepositories) are introduced.

Changes

  • Data model: Added CommandDefinitionRepository join table and removed the singular targetRepositoryId column from CommandDefinition; SQLite migration backfills join rows from existing targets with cascading deletes and a covering index.
  • Service layer: Normalizes and de-duplicates repository IDs, validates every selected repository exists before create/update, and persists assignments via nested repositories.create. Worktree eligibility and run-target authorization now check membership across all assigned repositories.
  • Import/export: Export format bumped to schema version 2 and now carries multiple targetRepositories (canonical origin + name); import matches each by origin/name and keeps partial matches (widening, quick action disabled) instead of failing the whole import. Legacy schema-v1 exports by repository name still import.
  • GraphQL: Added targetRepositoryIds/-targetRepositories fields and input; marked singular targetRepositoryId/-targetRepository as deprecated. Singular fields are still returned when exactly one repository is assigned.
  • Editor UI: Replaced the single-repository dropdown with a scrollable checkbox list showing the selected count, an inline "select at least one repository" error, and a disabled Save button until a valid target (agent or repositories) is chosen.
  • Commands page: Shows a badge with the number of selected repositories for repository-scoped commands; run dialog now offers worktrees from all selected repositories.
  • Built-in tool schema: Accepts targetRepositoryIds arrays (deprecating targetRepositoryId) and adds the previously missing concurrency and blocksGitOperations inputs.
  • i18n & tests: New localized strings (en/de/es/fr), migration test, service tests for validation/import behavior, editor and target-dialog tests, and updated mock seed data.

Ticket: AIDE-123

Replace the single targetRepositoryId with a many-to-many CommandDefinitionRepository relation so repository-worktree commands can target multiple repositories. Keep targetRepositoryId as a deprecated single-value alias and add tests for the migration, service, and dialogs.
@chandlerhuff chandlerhuff self-assigned this Aug 28, 2026
@chandlerhuff
chandlerhuff merged commit 2634ba1 into main Aug 28, 2026
3 checks passed
@chandlerhuff
chandlerhuff deleted the feature/AIDE-123-update-command-targets branch August 28, 2026 17:18
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.

1 participant