@devo-bmad-custom/agent-orchestration 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/installer.js CHANGED
@@ -864,15 +864,7 @@ async function setupTmux(projectRoot, chalk) {
864
864
  const src = path.join(tmuxSrc, srcName);
865
865
  if (!await fs.pathExists(src)) continue;
866
866
 
867
- const exists = await fs.pathExists(dest);
868
- if (exists) {
869
- const overwrite = await ask(chalk.dim(` ${dest} already exists. Overwrite? (y/N): `));
870
- if (!overwrite.toLowerCase().startsWith('y')) {
871
- console.log(chalk.dim(` ○ Skipped ${path.basename(dest)}`));
872
- continue;
873
- }
874
- }
875
-
867
+ // Always overwrite tmux scripts — ensures fixes (e.g. PNG normalization) propagate on update
876
868
  await fs.copy(src, dest, { overwrite: true });
877
869
  if (dest.endsWith('.sh') || dest.endsWith('.py') || dest === xclipPath) {
878
870
  try { await fs.chmod(dest, 0o755); } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devo-bmad-custom/agent-orchestration",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "BMAD Method — AI-native agile workflow system for Claude Code and compatible AI assistants",
5
5
  "keywords": [
6
6
  "bmad",
@@ -54,15 +54,28 @@ if [ -n "$IMAGE_TYPE" ]; then
54
54
  # Fall back to PowerShell (Windows clipboard API) when wl-paste produces empty output.
55
55
  if [ ! -s "$PNGFILE" ]; then
56
56
  WINPATH=$(wslpath -w "$PNGFILE" 2>/dev/null)
57
+ # Normalize to 32bppArgb before saving — System.Drawing.Image.Save() can produce
58
+ # indexed/palette PNGs that the Anthropic API rejects with "image format not supported".
57
59
  powershell.exe -NoProfile -Command "
58
60
  Add-Type -AssemblyName System.Windows.Forms
61
+ Add-Type -AssemblyName System.Drawing
59
62
  \$img = [System.Windows.Forms.Clipboard]::GetImage()
60
- if (\$img -ne \$null) { \$img.Save('$WINPATH') }
63
+ if (\$img -ne \$null) {
64
+ \$bmp = New-Object System.Drawing.Bitmap(\$img.Width, \$img.Height, [System.Drawing.Imaging.PixelFormat]::Format32bppArgb)
65
+ \$g = [System.Drawing.Graphics]::FromImage(\$bmp)
66
+ \$g.DrawImage(\$img, 0, 0)
67
+ \$g.Dispose()
68
+ \$bmp.Save('$WINPATH', [System.Drawing.Imaging.ImageFormat]::Png)
69
+ \$bmp.Dispose()
70
+ \$img.Dispose()
71
+ }
61
72
  " 2>/dev/null
62
73
  fi
63
74
 
64
75
  [ -s "$PNGFILE" ] || exit 1
65
76
  send_path "@$PNGFILE"
77
+ # Writeback normalized PNG to Wayland clipboard so subsequent pastes are also clean
78
+ /usr/bin/wl-copy --type image/png < "$PNGFILE" 2>/dev/null || true
66
79
  exit 0
67
80
  fi
68
81
 
@@ -118,6 +118,7 @@ Tell Claude to "set up my tmux config" and it will:
118
118
  | `sudo apt-get install -y wl-clipboard` | Wayland clipboard access for `Alt+V` paste (`wl-paste`) |
119
119
  | `sudo apt-get install -y imagemagick` | BMP/JPEG/WEBP → PNG conversion for `Alt+V` paste |
120
120
  | `sudo apt-get install -y wslu` | Provides `wslview` — required for tmux-open URL opening in WSL2 |
121
+ | Install gsudo on Windows (see below) | Allows WSL to run elevated PowerShell commands |
121
122
  | Press `Ctrl+B I` inside tmux after first launch | TPM plugin install — requires interactive session |
122
123
 
123
124
  After installing `wslu`, create the `xdg-open` shim (no sudo):
@@ -126,6 +127,14 @@ ln -sf /usr/bin/wslview ~/.local/bin/xdg-open
126
127
  ```
127
128
  This is needed because `tmux-open` hard-codes a check for `xdg-open` and errors if not found.
128
129
 
130
+ **gsudo (Windows sudo):** Required for any WSL script that needs to run elevated PowerShell. Install on the Windows side:
131
+ ```powershell
132
+ winget install gerardog.gsudo
133
+ # or via Scoop:
134
+ scoop install gsudo
135
+ ```
136
+ The installer automatically creates a WSL shim at `~/.local/bin/gsudo` that delegates to the Windows binary. If gsudo is not installed when the installer runs, you'll see a warning — install it then re-run the installer to create the shim.
137
+
129
138
  ---
130
139
 
131
140
  ## Full `~/.tmux.conf`
@@ -681,7 +690,11 @@ tmux kill-pane -t <pane_id>
681
690
  | `text/html` | Saved to `/tmp/tmux_clipboard_content.html`, path typed |
682
691
  | `text/plain` | If it's a valid path: `@path`; otherwise saved to `/tmp/tmux_clipboard_text.txt` |
683
692
 
684
- **Implementation:** `paste_image_wrapper.sh` uses `/usr/bin/wl-paste` (Linux-native Wayland clipboard — no PowerShell/vsock). Files are saved as `/tmp/tmux_clip_YYYYMMDD_HHMMSS.<ext>`. On each run, files from previous days are automatically deleted. The PNG is also copied back to the Wayland clipboard so `Ctrl+V` may also work in Claude Code.
693
+ **Implementation:** `paste_image_wrapper.sh` uses `/usr/bin/wl-paste` (Linux-native Wayland clipboard — no PowerShell/vsock). Files are saved as `/tmp/tmux_clip_YYYYMMDD_HHMMSS.<ext>`. On each run, files from previous days are automatically deleted. The normalized PNG is also written back to the Wayland clipboard via `wl-copy` so subsequent pastes are also clean.
694
+
695
+ **PNG normalization (WSLg PowerShell fallback):** When `wl-paste` produces empty output (common on WSLg), the script falls back to PowerShell's `System.Windows.Forms.Clipboard::GetImage()`. The raw `Image.Save()` call can produce indexed/palette-mode PNGs that the Anthropic API rejects with `"image format image/png not supported"`. The fix redraws the clipboard image onto a fresh `Format32bppArgb` bitmap before saving, ensuring the output is always standard RGBA PNG.
696
+
697
+ > **Troubleshooting:** If Claude reports `"Image format image/png not supported"` after pasting a screenshot, your `paste_image_wrapper.sh` is outdated. Re-run the installer (it now always overwrites tmux scripts) or copy the latest version from `docs/dev/paste_image_wrapper.sh`.
685
698
 
686
699
  **`Ctrl+V` binding** uses `tmux paste-buffer -p` (no trailing newline). Without `-p`, `paste-buffer` appended a newline that auto-submitted the pasted content — fixed.
687
700