Files
nanoclaw/.claude/skills/add-image-vision/modify/container/agent-runner/src/index.ts.intent.md
glifocat af937d6453 feat(skills): add image vision skill for WhatsApp (#770)
* chore: prepare image-vision skill for template regeneration

- Delete stale modify/*.ts templates (built against 1.1.2)
- Update core_version to 1.2.6
- Strip fork-specific details from intent docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(skills): regenerate image-vision modify/ templates against upstream

Templates regenerated against upstream 1.2.6:
- src/container-runner.ts: imageAttachments field in ContainerInput
- src/index.ts: parseImageReferences + threading to runAgent
- src/channels/whatsapp.ts: downloadMediaMessage + image handling block
- src/channels/whatsapp.test.ts: image mocks + 4 test cases
- container/agent-runner/src/index.ts: ContentBlock types, pushMultimodal, image loading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: update image-vision tests for upstream templates

- Relax downloadMediaMessage import pattern check (multi-line import)
- Remove check for [Image - processing failed] (not in upstream template)
- Add vitest.skills.config.ts for skill package test runs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update image-vision core_version to 1.2.8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:52:59 +02:00

1.1 KiB

Intent: container/agent-runner/src/index.ts

What Changed

  • Added imageAttachments? field to ContainerInput interface
  • Added ImageContentBlock, TextContentBlock, ContentBlock type definitions
  • Changed SDKUserMessage.message.content type from string to string | ContentBlock[]
  • Added pushMultimodal(content: ContentBlock[]) method to MessageStream class
  • In runQuery: image loading logic reads attachments from disk, base64-encodes, sends as multimodal content blocks

Key Sections

  • Types (top of file): New content block interfaces, updated SDKUserMessage
  • MessageStream class: New pushMultimodal method
  • runQuery function: Image loading block

Invariants (must-keep)

  • All IPC protocol logic (input polling, close sentinel, message stream)
  • MessageStream push/end/asyncIterator (text messages still work)
  • readStdin, writeOutput, log functions
  • Session management (getSessionSummary, sessions index)
  • PreCompact hook (transcript archiving)
  • Bash sanitization hook
  • SDK query options structure (mcpServers, hooks, permissions)
  • Query loop in main() (query -> wait for IPC -> repeat)