Add the media MCP tools and live-verified slopbot path

This commit is contained in:
Fisto
2026-09-16 09:54:22 +02:00
parent c81ae0d0fe
commit d483a2fa47
9 changed files with 179 additions and 17 deletions
+8
View File
@@ -78,6 +78,14 @@ The daemon exposes MCP over Streamable HTTP. The default address is `http://127.
| `list_dms` | List cached DM and group DM channels with recipients. |
| `get_message_log` | Read the trigger log. |
| `get_action_log` | Read the persistent action log. |
| `scrape_media` | Start a media scrape of a channel (`channelId`, `guildId?`, `mode?`, `confirm?`). |
| `list_media_scrapes` | Media scrapes with state, pages, messages, and counts. |
| `get_media_scrape` | One scrape by ID. |
| `stop_media_scrape` | Stop a scrape; it pauses after the current page. |
| `get_media_storage` | Usage against the limit, per-kind sizes, and the scrape list. |
| `query_media` | Media items across scrapes (`kind?`, `scrapeId?`, `limit?`, `offset?`). |
| `get_media_item` | One media item by `scrapeId` and `itemId`. |
| `delete_media_scrape` | Delete a scrape and its files. Irreversible. |
| `run_commands` | Run several read-only tools in one call, in order. |
| `get_context` | Assemble conversation context for a channel. Fetches new messages by default. |
| `get_puppet_config` | Read the response policy and context settings. |
+5 -3
View File
@@ -4,7 +4,9 @@ The media archive is designed for agent access. The daemon exposes one service,
are thin wrappers around it. The same service backs the Web UI routes, so the two clients cannot
drift.
Status: hooks designed, implementation at checkpoint C8 in [CURRENT.md](../CURRENT.md).
Status: implemented (C8). The tools are registered in `poc/src/control-bridge.ts`; read tools are
also in `run_commands`. Advanced `query_media` filters (author, date, text) are planned; the index
has the columns.
## Service interface
@@ -21,8 +23,8 @@ interface MediaService {
}
```
`MediaQuery`: `kind`, `scrapeId`, `channelId`, `guildId`, `authorId`, `after`, `before`, `text`,
`limit`, `cursor`.
`MediaQuery` (implemented): `kind`, `scrapeId`, `limit`, `offset`. Planned: `channelId`,
`guildId`, `authorId`, `after`, `before`, `text`.
`StorageStatus`: `usedBytes`, `limitBytes`, `warnPercent`, `overrunPercent`, `byKind`,
`scrapes: [{ id, bytes, state, createdAt }]`.
+4 -2
View File
@@ -1,8 +1,10 @@
# Media archive
Status: design approved 2026-09-16. The engine, the slopbot backend, the `scrape media` command,
the `/api/media/*` routes, storage limits with retention, and the Settings group are implemented
(C3-C7b). The Media and Bot tabs are C6. Checkpoints live in [CURRENT.md](../CURRENT.md).
the `/api/media/*` routes, storage limits with retention, the Settings group, and the MCP tools are
implemented (C3-C8). The Media and Bot tabs are C6. The slopbot path is live-verified: the test
channel produced 17 messages and 4 images + 13 videos with no errors. The puppet path and a
`download` run are still owed (C9). Checkpoints live in [CURRENT.md](../CURRENT.md).
The media archive saves the media history of a channel. A trusted user runs `scrape media` in the
channel. The daemon walks the history through a scrape backend and indexes every image, GIF,