picoclaw/pkg/agent
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
..
context.go fix: remove redundant tools definitions from system prompt (#771) 2026-02-25 20:44:07 +08:00
context_cache_test.go fix: cache system prompt with mtime-based auto-invalidation (#607) 2026-02-25 15:27:45 +08:00
context_test.go fix: handle multi-tool-call orphan detection in sanitizeHistoryForProvider 2026-02-24 21:35:15 +08:00
instance.go fix: remove redundant tools definitions from system prompt (#771) 2026-02-25 20:44:07 +08:00
instance_test.go fix: Templates update (#485) 2026-02-19 19:16:37 +01:00
loop.go refactor(media): add MediaStore for unified media file lifecycle management 2026-02-22 23:27:55 +08:00
loop_test.go feat(fmt): Fix formatting 2026-02-19 22:05:15 +02:00
memory.go Merge branch 'main' into fix-formatting 2026-02-20 20:02:53 +02:00
mock_provider_test.go feat(fmt): Fix formatting 2026-02-19 22:05:15 +02:00
registry.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
registry_test.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00