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>
This commit is contained in:
glifocat
2026-03-06 17:52:59 +01:00
committed by GitHub
parent be1991108b
commit af937d6453
15 changed files with 4100 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# Intent: src/channels/whatsapp.test.ts
## What Changed
- Added `GROUPS_DIR` to config mock
- Added `../image.js` mock (isImageMessage defaults false, processImage returns stub)
- Added `updateMediaMessage` to fake socket (needed by downloadMediaMessage)
- Added `normalizeMessageContent` to Baileys mock (pass-through)
- Added `downloadMediaMessage` to Baileys mock (returns Buffer)
- Added imports for `downloadMediaMessage`, `isImageMessage`, `processImage`
- Added image test cases: downloads/processes, no caption, download failure, processImage null fallback
## Key Sections
- **Mock setup** (top of file): New image mock, extended Baileys mock, extended fakeSocket
- **Message handling tests**: Image test cases
## Invariants (must-keep)
- All existing test sections and describe blocks
- Existing mock structure (config, logger, db, fs, child_process, Baileys)
- Test helpers (createTestOpts, triggerConnection, triggerDisconnect, triggerMessages, connectChannel)
- Connection lifecycle, authentication, reconnection, LID translation tests
- Outgoing queue, group metadata sync, JID ownership, typing indicator tests