feat(release): v2.0.16 — NanoBanana async polling + Electron CI fix + CI hardening

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
This commit is contained in:
diegosouzapw
2026-03-08 18:07:11 -03:00
parent c4efad3ea7
commit db0bda2810
4 changed files with 38 additions and 3 deletions

View File

@@ -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

View File

@@ -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

4
package-lock.json generated
View File

@@ -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": [

View File

@@ -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": {