From db0bda28109f350cfc2f691834086c62305209e1 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Sun, 8 Mar 2026 18:07:11 -0300 Subject: [PATCH] =?UTF-8?q?feat(release):=20v2.0.16=20=E2=80=94=20NanoBana?= =?UTF-8?q?na=20async=20polling=20+=20Electron=20CI=20fix=20+=20CI=20harde?= =?UTF-8?q?ning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(electron-ci): add GH_TOKEN to Build Electron step - electron-builder requires GH_TOKEN env when publish.provider is 'github'. Without it every build failed with 'GitHub Personal Access Token is not set'. This was blocking Electron binary generation since v2.0.11. Fixed by passing secrets.GITHUB_TOKEN to the build step. fix(images): NanoBanana async task polling (PR #247 by @hijak) - NanoBanana returns taskId requiring /record-info polling until successFlag=1 instead of image payload on first response. - Backward compatible: sync payload path preserved. - Includes aspect ratio/resolution inference from size field. fix(ci): security test import + route validation + deploy-vps - inputSanitizer.js → .ts fix - validateBody added to acp/agents POST (139 routes pass t06) - deploy-vps continue-on-error + command_timeout Version: 2.0.15 → 2.0.16 --- .github/workflows/electron-release.yml | 2 ++ CHANGELOG.md | 33 ++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.yml index 22e06fd9bf..1d1729d19a 100644 --- a/.github/workflows/electron-release.yml +++ b/.github/workflows/electron-release.yml @@ -99,6 +99,8 @@ jobs: - name: Build Electron for ${{ matrix.platform }} working-directory: electron + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npm run build:${{ matrix.target }} - name: Collect installers diff --git a/CHANGELOG.md b/CHANGELOG.md index 87fa4295e2..ba7a9b898e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [2.0.16] — 2026-03-08 + +> ### 🐛 Bug Fixes + 🔧 CI Hardening + +### 🐛 Bug Fixes + +- **NanoBanana async image polling** — Fixed `data: []` results from `/v1/images/generations` for NanoBanana. The previous implementation treated the submit response as a final image payload. NanoBanana APIs return a `taskId` requiring status polling — the handler now submits, extracts `taskId`, polls `/record-info` until `successFlag=1`, and normalizes to OpenAI format. Added `aspectRatio`/`resolution` inference from `size`. Backward compatible. PR #247 by @hijak + +### 🔧 CI Fixes + +- **Electron build token missing** — `electron-builder`'s GitHub publish provider requires `GH_TOKEN` to be set, but the build step didn't have it in its `env`. The workflow was failing with `GitHub Personal Access Token is not set` on all 4 platforms. **Fixed**: added `GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}` to the `Build Electron for...` step (`.github/workflows/electron-release.yml`) + +- **Security test `inputSanitizer.js` import** — `tests/unit/security-fase01.test.mjs` imported `inputSanitizer.js` (non-existent) instead of `inputSanitizer.ts`, causing `ERR_MODULE_NOT_FOUND` in CI. Fixed extension. + +- **Route validation lint (t06)** — `POST /api/acp/agents` used `request.json()` without `validateBody()`, failing `check:route-validation:t06`. Added `validateBody(jsonObjectSchema)` — all 139 routes now pass. + +- **Deploy to VPS SSH failure** — Added `continue-on-error: true` and `command_timeout: 5m` to the SSH step so that connection failures (when VPS is unreachable) don't mark the workflow as failed. + +### 📁 Files Changed + +| File | Change | +| ------------------------------------------------- | -------------------------------------------------------- | +| `open-sse/config/imageRegistry.ts` | Added NanoBanana `statusUrl`, extended `supportedSizes` | +| `open-sse/handlers/imageGeneration.ts` | NanoBanana async submit/poll flow + sync backward compat | +| `tests/unit/nanobanana-image-handler.test.mjs` | **NEW** — unit tests | +| `tests/unit/nanobanana-image-generation.test.mjs` | **NEW** — unit tests | +| `.github/workflows/electron-release.yml` | Add `GH_TOKEN` to build step (critical fix) | +| `tests/unit/security-fase01.test.mjs` | Fix `inputSanitizer.js` → `.ts` | +| `src/app/api/acp/agents/route.ts` | Add `validateBody(jsonObjectSchema)` to POST | +| `.github/workflows/deploy-vps.yml` | `continue-on-error: true` + `command_timeout: 5m` | + +--- + ## [2.0.15] — 2026-03-08 > ### ✨ New Features + 🐛 Bug Fix diff --git a/package-lock.json b/package-lock.json index 21c5e6840d..54aa319014 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "omniroute", - "version": "2.0.15", + "version": "2.0.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "omniroute", - "version": "2.0.15", + "version": "2.0.16", "hasInstallScript": true, "license": "MIT", "workspaces": [ diff --git a/package.json b/package.json index d31c8a0c30..990ec3508f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "omniroute", - "version": "2.0.15", + "version": "2.0.16", "description": "Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.", "type": "module", "bin": {