agent/php/Console/Commands
Snider 34525038a8 feat(brain): add brain:prune artisan command
New artisan command brain:prune {--older-than=90} {--chunk=100} {--dry-run}
that completes the soft-delete → hard-delete lifecycle by:
1. selecting BrainMemory::onlyTrashed() where deleted_at < now - N days
2. dispatching DeleteFromIndex for each (Qdrant + ES cleanup)
3. forceDelete()'ing the rows

--dry-run counts without dispatching.

Complements brain:clean (which cleans recent soft-deletes) with a
retention-bounded terminal cleanup.

Pest coverage: Good (dispatch + forceDelete on aged trashed rows), Bad
(invalid chunk), Ugly (--dry-run skips both dispatch and delete).

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

Closes tasks.lthn.sh/view.php?id=62
2026-04-23 13:36:41 +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
BrainPruneCommand.php feat(brain): add brain:prune artisan command 2026-04-23 13:36:41 +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