agent/php/Console/Commands
Snider 638091f3b3 feat(brain): add brain:clean artisan command
New artisan command brain:clean {--chunk=100} {--dry-run} that dispatches
the DeleteFromIndex job for soft-deleted BrainMemory rows (those in
onlyTrashed scope). Cleans up orphaned Qdrant + Elasticsearch index
entries that remain after a memory is soft-deleted.

--dry-run counts without dispatching.

php/tests/Feature/Console/BrainCleanCommandTest.php covers Good
(dispatches on trashed), Bad (invalid chunk), Ugly (--dry-run prevents
dispatch).

Co-authored-by: Codex <noreply@openai.com>

Closes tasks.lthn.sh/view.php?id=61
2026-04-23 13:30:27 +01:00
..
AgenticGenerateCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
BrainCleanCommand.php feat(brain): add brain:clean artisan command 2026-04-23 13:30:27 +01:00
BrainIngestCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
BrainReindexCommand.php feat(brain): add brain:reindex artisan command 2026-04-23 13:29:18 +01:00
BrainSeedMemoryCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
DispatchCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
GenerateCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
PlanCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
PlanRetentionCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
PrepWorkspaceCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
PrManageCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
ScanCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
TaskCommand.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00