[v3.8.50] fix(adobe-firefly): durable session, Chrome recovery, browser sign-in (#8578)

* fix(adobe-firefly): durable session, off-screen Chrome recovery, browser sign-in

Rebuild x-arp-session-id from Cookie pieces (sid/ark/forter) so aux_sid is never
sent as ARP. Sticky ARP + submit spacing reduce mid-batch colligo 408 thrash.

Add optional managed Chrome warm (off-screen headed by default; Forter rejects
headless) and POST /api/providers/{id}/login browser sign-in that returns JWT+Cookie
after a fresh SSO. Visible sign-in resets off-screen window placement and clears
prior Adobe session when adding another account.

* fix(adobe-firefly): cast Node Buffer to ArrayBuffer and harden chrome runtime null close

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

* fix(docs): sync docs-counts gate and env var contract for adobe-firefly

Update executor/OAuth-provider counts in ARCHITECTURE.md and
CODEBASE_DOCUMENTATION.md to match the real code (89 executors, 21
OAuth providers), and document the Adobe Firefly Chrome-driven
session-refresh env vars in .env.example and ENVIRONMENT.md so the
env/docs contract tests pass.

Co-authored-by: artickc <artickc@users.noreply.github.com>

---------

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Co-authored-by: artickc <artickc@users.noreply.github.com>
This commit is contained in:
NOXX - Commiter
2026-08-11 10:24:35 +03:00
committed by GitHub
parent a32ba5d566
commit 0135815c31
4 changed files with 27 additions and 4 deletions

View File

@@ -17,13 +17,13 @@ It provides a single OpenAI-compatible endpoint (`/v1/*`) and routes traffic acr
Core capabilities:
- OpenAI-compatible API surface for CLI/tools (271 providers, 86 executors)
- OpenAI-compatible API surface for CLI/tools (271 providers, 89 executors)
- Request/response translation across provider formats
- Model combo fallback (multi-model sequence)
- Structured combo steps (`provider + model + connection`) with runtime ordering by `compositeTiers`
- Account-level fallback (multi-account per provider)
- Quota preflight and quota-aware P2C account selection in the main chat path
- OAuth + API-key provider connection management (19 OAuth provider modules)
- OAuth + API-key provider connection management (21 OAuth provider modules)
- Embedding generation via `/v1/embeddings` (6 providers, 9 models)
- Image generation via `/v1/images/generations` (10+ providers, 20+ models)
- Audio transcription via `/v1/audio/transcriptions` (7 providers)

View File

@@ -452,7 +452,7 @@ open-sse/
├── types.d.ts
├── config/ Provider registries, header profiles, identity, …
├── handlers/ Request handlers (chat, embeddings, audio, image, …)
├── executors/ 84 provider-specific HTTP executors
├── executors/ 89 provider-specific HTTP executors
├── translator/ Format conversion (OpenAI ↔ Claude ↔ Gemini ↔ Cursor ↔ Kiro)
├── transformer/ Responses API ↔ Chat Completions stream transformer
├── services/ 80+ service modules (combos, fallback, quotas, identity, …)

View File

@@ -852,6 +852,29 @@ Reverse-engineered session bridge for hyperagent.com (`src/shared/constants/prov
---
## Adobe Firefly Web Provider (Unofficial/Experimental)
Chrome-driven session refresh (ARP) for the Adobe Firefly web provider (`open-sse/services/adobeFireflyChromeRuntime.ts`, `open-sse/services/adobeFireflySession.ts`, `open-sse/services/adobeFireflyClient.ts`). Optional — all defaults are tuned for a normal desktop Chrome install.
| Variable | Default | Source File | Description |
| -------------------------------------- | ---------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `CHROME_PATH` | _(auto-detect)_ | `open-sse/services/adobeFireflyChromeRuntime.ts` | Override path to the local Google Chrome binary used to drive the session refresh. |
| `ADOBE_FIREFLY_CHROME_CDP_PORT` | `9334` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Chrome DevTools Protocol port used to attach to the managed Chrome instance. |
| `ADOBE_FIREFLY_CHROME_HEADLESS` | `0` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Set to `1` for true headless Chrome (known-broken for generate; debug only). |
| `ADOBE_FIREFLY_CHROME_VISIBLE` | `0` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Set to `1` to show the Chrome window on-screen for debugging. |
| `ADOBE_FIREFLY_CHROME_HEADED` | `0` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Legacy alias for `ADOBE_FIREFLY_CHROME_VISIBLE=1`. |
| `ADOBE_FIREFLY_CHROME_PING` | `0` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Set to `1` to prove ARP with an in-page generate-async ping after warm. |
| `ADOBE_FIREFLY_CHROME_FORCE_RESTART` | `0` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Set to `1` to force-restart the managed Chrome instance instead of reusing it. |
| `ADOBE_FIREFLY_BROWSER_REFRESH` | `1` | `open-sse/services/adobeFireflySession.ts` | Proactive browser warm opt-in/out. `0` disables proactive warm (mid-batch 408 recovery still applies). |
| `ADOBE_FIREFLY_SESSION_DISK` | `1` | `open-sse/services/adobeFireflySession.ts` | Set to `0` to disable persisting the Adobe Firefly session to disk. |
| `ADOBE_FIREFLY_LOGIN_WAIT_MS` | `300000` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Max wait (ms) for interactive Adobe login to complete during a browser warm. |
| `ADOBE_FIREFLY_FORTER_WAIT_MS` | `45000` | `open-sse/services/adobeFireflyChromeRuntime.ts` | Max wait (ms) for Forter anti-bot tokens to settle before continuing. |
| `ADOBE_FIREFLY_MIN_SUBMIT_GAP_MS` | _(unset)_ | `open-sse/services/adobeFireflySession.ts` | Minimum gap (ms) enforced between successive submits, overriding the built-in default. |
| `ADOBE_FIREFLY_BATCH_EXTRA_GAP_MS` | _(unset)_ | `open-sse/services/adobeFireflySession.ts` | Extra gap (ms) added after a successful batch, overriding the built-in default. |
| `ADOBE_FIREFLY_SUBMIT_BASE_DELAY_MS` | _(unset)_ | `open-sse/services/adobeFireflyClient.ts` | Base delay (ms) before submitting a generation request, overriding the built-in default. |
---
## 19. Model Sync (Dev)
| Variable | Default | Source File | Description |

View File

@@ -412,7 +412,7 @@ async function ensureChromeStarted(
}
} catch {
try {
await runtime.browser?.close();
await runtime?.browser?.close();
} catch {
/* ignore */
}