Add CI check to ensure commits touching skills/<name>/** use
Conventional Commit subjects. Also validates SKILL.md version
alignment during publish/sync.
Add a text-correction policy to all raster-image skills: title/subtitle/labels/dialogue/etc. inside generated bitmaps must NOT be patched with ImageMagick, Pillow, Canvas, SVG, HTML/CSS, OCR overlays, or any other programmatic painter. On error, regenerate from a corrected prompt or switch to a lower-text variant.
Synced to: baoyu-cover-image, baoyu-article-illustrator, baoyu-comic, baoyu-image-cards, baoyu-xhs-images, baoyu-infographic, baoyu-slide-deck.
- Add 10s timeout to Telegram fetch so unreachable api.telegram.org
doesn't block waitForLogin indefinitely.
- Move 2s QR-render wait inside sendQrToTelegram, after the env-var
early return, so the no-op path doesn't pay the delay.
- Use viewport screenshot (captureBeyondViewport: false) as fallback
to reduce payload size and keep the QR scannable.
When `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` env vars are set,
the browser login flow automatically sends the WeChat QR code image
to the configured Telegram chat so headless / remote runs don't need
a screen to scan the code.
Strategy (in priority order):
1. Extract QR img.src from known DOM selectors
2. If URL-based src: re-fetch inside Chrome to carry session cookies
3. Fallback: full-page CDP screenshot
Feature is fully opt-in: skipped silently when env vars are absent.
Co-authored-by: Before SUN <beforesun@BeforedeMac-mini.local>
Strengthen the shared image-generation backend selection rule:
- Codex `imagegen` MUST be used when listed in the available-skills inventory;
invoke via the `Skill` tool with `skill: "imagegen"`.
- Never substitute SVG, HTML, canvas, or other code-based rendering when no
raster backend can be resolved — fall through and ask the user instead.
Applied to docs/image-generation-tools.md and inlined into baoyu-article-illustrator
(plus its references/workflow.md), baoyu-comic, baoyu-cover-image, baoyu-image-cards,
baoyu-infographic, baoyu-slide-deck, baoyu-xhs-images per the self-containment rule.
In Codex, prefer the bundled Chrome Computer Use path for all X UI
actions (compose, article, quote, video). CDP scripts become a fallback
when Computer Use is unavailable or explicitly not requested.
When posting articles via browser automation, the HTML preview tab
needs to be active before copying content, and the editor tab needs
to be active before pasting. Without explicit Target.activateTarget
calls, AppleScript Cmd+C/Cmd+V would act on the wrong tab, causing
the editor body to remain empty after paste.
This fix adds Target.activateTarget before both copy and paste
operations, ensuring the correct tab is in focus for system-level
clipboard operations.
The `wants_generated` detection checks `candidate[12][7][0]` and an old
`googleusercontent.com/image_generation_content/` URL pattern in the response
text. Both are no longer present in the current Gemini Web API response format,
causing the entire generated-image extraction block to be skipped even when
Gemini successfully generates images — resulting in "No image returned in
response" errors.
Generated image URLs now appear as `https://lh3.googleusercontent.com/gg-dl/`
somewhere in the response parts. This commit adds an unconditional fallback that
scans all response parts for those URLs when `generated_images` is still empty
after the existing `wants_generated` block, reusing the already-present
`collect_strings` helper and `GeneratedImage` constructor.
The existing code path is untouched — the fallback only runs when no images
were found through the original logic, so old response formats continue to work.
* feat(baoyu-imagine): add DashScope Wan 2.7 image model support
Closes#139.
Adds the new `wan2.7-image-pro` and `wan2.7-image` model family to the
DashScope provider so users can call Wan 2.7 directly through the
official Aliyun (Bailian) API instead of going through Replicate.
- Register `wan2.7-image-pro` and `wan2.7-image` as a new `wan27` family
in the DashScope provider with their own size resolution rules:
pixel range `[768*768, 4096*4096]` for `wan2.7-image-pro` text-to-image,
`[768*768, 2048*2048]` for `wan2.7-image-pro` with refs and for the
base `wan2.7-image` model in any mode, with aspect ratios validated
against the documented `[1:8, 8:1]` band.
- Allow up to 9 reference images per request (image editing /
multi-image fusion). Local files are inlined as base64 data URLs;
`http(s)://` paths are forwarded as-is. Other DashScope models still
reject `--ref` with a hint to switch to a wan2.7 model or another
provider.
- Drop `prompt_extend` from the request body for the Wan 2.7 family
(not part of the Wan 2.7 API surface) and skip the Qwen-only negative
prompt for this family.
- Allow `--provider dashscope --ref ...` in `detectProvider` so users
can opt into Wan 2.7 reference workflows, while keeping Wan 2.7 out
of the auto-detect ref priority list.
- Add provider, reference, and usage-example documentation, plus
unit tests covering family routing, size derivation across the
three pixel-budget modes, ratio rejection, explicit-size validation,
and the new `--provider dashscope` ref opt-in path.
Made-with: Cursor
* fix(baoyu-imagine): force n=1 for DashScope wan2.7 to avoid silent multi-image billing
Cross-checked the implementation against the official Wan 2.7 image
generation & editing API reference and found that the API defaults
`parameters.n` to 4 in non-collage mode (1-4 range, billed per image).
baoyu-imagine has single-image save semantics — only the first image
in the response is kept — so without an explicit `n: 1` users would
silently pay for 3 discarded images per request.
- Always send `parameters.n: 1` in the wan2.7 request body
- Reject `--n > 1` for wan2.7 with a clear error pointing at the
single-image save semantics
- Add tests asserting the request body shape (n=1, no prompt_extend,
no negative_prompt) and the --n>1 rejection
- Document the defaults-vs-skill mismatch in the dashscope reference
Made-with: Cursor
* Fix DashScope Wan 2.7 review feedback