8000 Media sidecars: write one for every media file, from any source, in any indexed folder · Issue #13 · simon-inkie/inkie-the-brain · GitHub
[go: up one dir, main page]

Skip to content

Media sidecars: write one for every media file, from any source, in any indexed folder #13

Open

Description

@simon-inkie

Problem

A media file (image, PDF, audio, video) is embedded on its own, but it only gets a human-readable .md sidecar (origin channel, timestamp, caption, sender) through one path: core/media-filer. That filer watches a single runtime-specific drop folder (~/.openclaw/media/inbound), so in any other setup nothing writes a sidecar. Files saved by an agent straight into the assets folder, and files delivered by a chat UI into some other attachments directory, get no sidecar and no message context. Attachments outside the configured assets source are not indexed at all.

Proposal

  1. Sidecar schema, documented. Frontmatter: origin.channel, origin.timestamp, origin.message (caption or surrounding text), origin.sender, generated: true|false, source_path.
  2. A writer helper for agents and uploaders. One call (CLI plus a small library function) that saves a media file and writes its sidecar in the same step, taking the caption and sender as arguments. This is the high-quality path.
  3. A watcher safety net. Any media file that appears in an indexed folder without a sidecar gets one generated automatically, marked generated: true. Context comes from, in order: the nearest inbox or chat message that references the file name or path, then file metadata (name, type, size, modified time). A model-written caption is optional and off by default. A hand-written sidecar is never overwritten.
  4. A nudge for direct writers. A hook or doc rule that tells agents writing media straight into a folder to use the helper, so the safety net is the fallback and not the norm.
  5. Configurable extra media sources, so a chat UI's attachments directory can be indexed without moving files.
  6. Generalise core/media-filer so the watched drop folder is configuration, not a hard-coded OpenClaw path.

Why the safety net matters most

Relying on every agent to remember a sidecar fails silently, the file simply becomes less findable. A watcher cannot forget.

Open questions

  • Is context-from-nearest-message reliable enough without a model, or do we want an optional cheap captioning pass?
  • Sidecar naming: <file>.md (current) versus a sibling folder.
  • Video: confirm embedding support before promising sidecars for it.

Note: spec and ticket only for now; no code change until the freeze lifts.

Activity

  1. simon-inkie commented on Oct 7, 2026

    @simon-inkie
    OwnerAuthor

    Scope update: video is in scope for sidecars, but not for embedding. A video file gets a sidecar (same schema, generated or written by the helper), and the sidecar is indexed as text. The video file itself is not embedded. Images, PDFs and audio are embedded as today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0