From 59157c7e766140e0b37f9aafd15c3e5a1bcc6e64 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Tue, 8 Sep 2026 12:32:53 +0200 Subject: [PATCH] Rename project from Nexa to Osias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames the npm package (nexa-extension -> osias-extension), the extension manifest name and Firefox gecko id (osias-extension@osias.trade), the internal runtime message-type namespace and storage keys ('nexa:...' -> 'osias:...'), the NexaMessage type, and all remaining Nexa branding in source comments, UI copy, and CLAUDE.md to match the new osias.trade domain and the osias-trade GitHub org. No wire-protocol changes — purely internal naming plus user-facing strings. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Tn7uDYjTuZEbLPwpEiSCUw --- CLAUDE.md | 18 ++++----- package-lock.json | 4 +- package.json | 4 +- src/background/backend-client.ts | 2 +- src/background/connection-status.ts | 4 +- src/background/lock-state.ts | 4 +- src/background/wallet-auth.ts | 22 +++++----- src/content-scripts/content-index.ts | 8 ++-- .../interventions/blur-disable.ts | 2 +- .../interventions/full-block.ts | 2 +- src/content-scripts/wallet-bridge/banner.ts | 4 +- src/content-scripts/wallet-bridge/inject.ts | 12 +++--- src/content-scripts/wallet-bridge/relay.ts | 4 +- src/content-scripts/wallet-connect.ts | 40 +++++++++---------- src/entrypoints/background.ts | 24 +++++------ src/entrypoints/popup/App.tsx | 22 +++++----- src/entrypoints/popup/index.html | 2 +- src/notifications/toast.ts | 34 ++++++++-------- src/shared/config.ts | 2 +- src/shared/messaging.ts | 38 +++++++++--------- wxt.config.ts | 6 +-- 21 files changed, 129 insertions(+), 129 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d2ac90c..2a088f5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,7 +22,7 @@ There is no lint/test setup yet — add one when the project needs it rather tha ## What this project is -Nexa is a blockchain-powered trading companion focused on the emotional/behavioral side of trading, not the trades themselves. Trades are already visible on-chain, so Nexa observes wallet activity rather than requiring manual logging. This repo is the **open-source frontend**: a browser extension. The backend (wallet/RPC listening via Solana/Helius, loss detection, auth, WebSocket push) is a separate private service and is out of scope here — treat it as an external API. +Osias is a blockchain-powered trading companion focused on the emotional/behavioral side of trading, not the trades themselves. Trades are already visible on-chain, so Osias observes wallet activity rather than requiring manual logging. This repo is the **open-source frontend**: a browser extension. The backend (wallet/RPC listening via Solana/Helius, loss detection, auth, WebSocket push) is a separate private service and is out of scope here — treat it as an external API. License: Apache 2.0. The backend stays closed-source; this frontend repo is the OSS component. @@ -93,7 +93,7 @@ Note the naming mismatch with the wire protocol below: the frontend's internal ` - `src/background/wallet-auth.ts` — `handleWalletConnected()` runs the REST auth flow (`POST /auth/nonce` → Phantom signature → `POST /auth/verify` → session token) once a content script reports a connected wallet. Also `requestWalletReconnect()` (silent reconnect after the backend invalidates a session), `requestWalletDisconnect()` (sign-out), `requestAccountSwitch()` (explicit account switch) — all three just message whichever tabs are on a supported site; `wallet-connect.ts` in the content script does the actual work. - `src/background/ws-client.ts` — the WS client described above: connects to `/ws?token=...`. `connectWsClient()` returns a controller with `reconnectNow()` so the background script can short-circuit the backoff wait right after a fresh token arrives. Auth failures (`4001` close, `auth_expired`/`session_revoked` errors) do **not** auto-retry with backoff — they call `onAuthExpired()` instead, since retrying with a known-bad token can't succeed; only real disconnects (network drop, backgrounded browser) use the protocol's suggested backoff schedule. - `src/background/connection-status.ts` — separate from lock state; the popup surfaces this (connecting/connected/disconnected/auth-error) alongside the lock state so a broken connection isn't silently indistinguishable from "unlocked". -- `src/background/settings-client.ts` — `GET`/`PATCH /me/settings` (per-user loss-detection thresholds; see backend/CLAUDE.md, "Account settings"), same direct-fetch-with-bearer-token shape as `wallet-auth.ts`. Popup -> background dispatch is `nexa:get-settings`/`nexa:update-settings` in `background.ts`, responses shaped `{ settings } | { error }` (`SettingsResult` in `shared/messaging.ts`). The popup's "Loss thresholds" panel (`entrypoints/popup/App.tsx`) is the only place percent fields (`near_full_exit_fraction` and both loss thresholds) get converted between the backend's fractional wire representation and the whole-number percentages shown in the form — same "convert only at the seam" rule as `LockScope`'s kebab/snake split below. +- `src/background/settings-client.ts` — `GET`/`PATCH /me/settings` (per-user loss-detection thresholds; see backend/CLAUDE.md, "Account settings"), same direct-fetch-with-bearer-token shape as `wallet-auth.ts`. Popup -> background dispatch is `osias:get-settings`/`osias:update-settings` in `background.ts`, responses shaped `{ settings } | { error }` (`SettingsResult` in `shared/messaging.ts`). The popup's "Loss thresholds" panel (`entrypoints/popup/App.tsx`) is the only place percent fields (`near_full_exit_fraction` and both loss thresholds) get converted between the backend's fractional wire representation and the whole-number percentages shown in the form — same "convert only at the seam" rule as `LockScope`'s kebab/snake split below. ### Wallet auth (Phantom) — implemented @@ -101,20 +101,20 @@ Real wallet signing, not a stub keypair. Phantom (and any wallet injecting a com - `src/entrypoints/wallet-bridge.content.ts` + `src/content-scripts/wallet-bridge/inject.ts` — a **second, `world: 'MAIN'`** content script on axiom.trade (Manifest V3 native main-world injection — no `web_accessible_resources`/dynamic `