agent/php
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
..
Actions revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Configs revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Console/Commands feat(brain): add brain:clean artisan command 2026-04-23 13:30:27 +01:00
Controllers revert fcb9c189e5 2026-04-23 12:32:57 +01:00
docs revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Facades revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Jobs feat(brain): add DeleteFromIndex job 2026-04-23 12:55:45 +01:00
Lang/en_GB revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Mcp revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Middleware revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Migrations feat(brain): add EmbedMemory job + indexed_at tracking 2026-04-23 12:47:10 +01:00
Models feat(brain): add EmbedMemory job + indexed_at tracking 2026-04-23 12:47:10 +01:00
Routes revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Service revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Services feat(brain): make BrainService::remember() async via EmbedMemory job 2026-04-23 13:29:30 +01:00
Support revert fcb9c189e5 2026-04-23 12:32:57 +01:00
tests feat(brain): add brain:clean artisan command 2026-04-23 13:30:27 +01:00
View revert fcb9c189e5 2026-04-23 12:32:57 +01:00
.DS_Store revert fcb9c189e5 2026-04-23 12:32:57 +01:00
agentic.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
AGENTS.md revert fcb9c189e5 2026-04-23 12:32:57 +01:00
Boot.php revert fcb9c189e5 2026-04-23 12:32:57 +01:00
config.php fix(brain): Postgres portability for brain connection + migrations 2026-04-23 12:32:58 +01:00
FINDINGS.md revert fcb9c189e5 2026-04-23 12:32:57 +01:00
GEMINI.md revert fcb9c189e5 2026-04-23 12:32:57 +01:00
TODO.md revert fcb9c189e5 2026-04-23 12:32:57 +01:00