picoclaw/pkg/channels
Hoshina 038fdf5000 refactor(media): add MediaStore for unified media file lifecycle management
Channels previously deleted downloaded media files via defer os.Remove,
racing with the async Agent consumer. Introduce MediaStore to decouple
file ownership: channels register files on download, Agent releases them
after processing via ReleaseAll(scope).

- New pkg/media with MediaStore interface + FileMediaStore implementation
- InboundMessage gains MediaScope field for lifecycle tracking
- BaseChannel gains SetMediaStore/GetMediaStore + BuildMediaScope helper
- Manager injects MediaStore into channels; AgentLoop releases on completion
- Telegram, Discord, Slack, OneBot, LINE channels migrated from defer
  os.Remove to store.Store() with media:// refs
2026-02-22 23:27:55 +08:00
..
dingtalk refactor(channels): unify message splitting and add per-channel worker queues 2026-02-22 22:46:29 +08:00
discord refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
feishu refactor(bus,channels): promote peer and messageID from metadata to structured fields 2026-02-22 21:57:12 +08:00
line refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
maixcam refactor(channels): unify Start/Stop lifecycle and fix goroutine/context leaks 2026-02-22 22:25:07 +08:00
onebot refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
qq refactor(bus,channels): promote peer and messageID from metadata to structured fields 2026-02-22 21:57:12 +08:00
slack refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
telegram refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
wecom refactor(channels): unify message splitting and add per-channel worker queues 2026-02-22 22:46:29 +08:00
whatsapp refactor(channels): unify message splitting and add per-channel worker queues 2026-02-22 22:46:29 +08:00
base.go refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
base_test.go style: fix gofmt formatting (CRLF -> LF) 2026-02-14 11:21:47 +09:00
manager.go refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
registry.go refactor(channels): add factory registry and export SetRunning on BaseChannel 2026-02-20 23:18:46 +08:00