Commit Graph
12 Commits
Author SHA1 Message Date
ciregenz 1fc58af88a [eric] fix subscription OAuth — direct exchange from callback page
Modified 9Router's callback page to call the exchange endpoint directly
instead of relying on postMessage/BroadcastChannel relay (which fails
in Electron where window.opener is null).

Flow: click Connect → sign in → callback page fetches pending state
from our backend → calls 9Router exchange → connection saved → done.

Backend:
- Added GET /api/subscriptions/pending/{state} with CORS for callback
- Added GET /api/subscriptions/callback as fallback
- Store pending OAuth state (codeVerifier, redirectUri) keyed by state
- redirect_uri stays on localhost:20128 (required by Anthropic)

Frontend:
- Popup window for auth URL + postMessage listener + status polling
- Works in both Electron and regular browser
2026-03-23 17:23:22 -07:00
ciregenzandClaude Opus 4.6 36d79fd1d3 [eric] lazy MCP connections + browser agent 9Router support
Performance fix:
- MCP servers no longer spawned upfront for every message
- Tool schemas loaded from cached metadata (instant, no subprocess)
- MCP servers only connected when their tools are first called (lazy)
- Browser agent MCP server still connects upfront (lightweight)
- Reduces startup from 30+ seconds to <1 second for simple messages

Browser agent 9Router support:
- Browser agent now works through 9Router when no API key set
- Uses OpenAI client format when base_url provided
- Model ID mapping for 9Router (cc/ prefix)
- Passes auth_token and base_url through run_browser_agents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:57:26 -07:00
ciregenzandClaude Opus 4.6 b6f45e8412 [eric] multi-provider agent loop, PostHog analytics, settings overhaul
Multi-provider support (WIP - not fully tested):
- Owned agent loop replacing claude_agent_sdk (agent_loop.py, mcp_client.py)
- Provider adapters: Anthropic (native), OpenAI-compat (any endpoint), Gemini (native + schema cleaning)
- 19 models across 9 providers (Anthropic, OpenAI, Google, xAI, Meta, DeepSeek, Mistral, Qwen, Cohere)
- OpenRouter integration for 300+ models via single API key
- Builtin tool reimplementations (Read, Write, Edit, Glob, Grep, Bash, WebSearch, WebFetch, AskUserQuestion)
- Standalone MCP client manager (stdio/sse/http)
- Frontend: grouped model dropdown, provider selection, dynamic context windows

Analytics (tested):
- PostHog integration as single analytics source
- Tracks: app.opened, session.started/completed, tool.called, tool.approval_resolved, error.occurred
- Rich session data: user messages, assistant messages, session titles, tools used, MCP servers, task categories
- PostHog dashboard with 14 insights created via API
- Usage stats in Settings (Usage tab) with pixel-art bars

Settings (tested):
- 4 tabs: General, Models, Usage, Commands
- Model Providers tab with OpenRouter (recommended), Anthropic, OpenAI, Google key fields
- "Get key" links for each provider
- Usage tab with session/cost/tool stats + analytics opt-in toggle
- analytics_opt_in defaults to true, installation_id auto-generated

Merged haik/updates-v1 (tested):
- Sub-agent spawning, chat branching, browser control improvements
- Settings: auto_select_mode, expand_new_chats, auto_reveal_sub_agents, dev_mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:50:21 -07:00
ciregenzandClaude Opus 4.6 f6274d225f Merge haik/updates-v1 — resolve settings model conflict
Keep both telephony credentials and dashboard UI preferences.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 16:44:40 -07:00
ciregenz da6c2c305e [eric] cute is law, communication is law 2026-03-19 17:15:18 -07:00
haikdc a1138a1782 [Haik]: (ability to resume chats if force end early) (agent selection actually works as advertised) (browser control/creation tool isolation) (in dev mode can see the action input schema) 2026-03-18 14:19:42 -07:00
haikdc 6f02daff2d [Haik]: (Browser actions shown in agent card output) (User can have item selection turned on by default in settings) (most browser related functionality works - altho spotify is tricky) (mcp discovery in prod shld worke now?) 2026-03-17 01:48:50 -07:00
haikdc b90e5c6353 [Haik]: (Practically all forms of dashboard interaction glitches) (made dashboard selection process much more intuitive and seamless - and high level) (added BrowserAgent so the outer agent can delegate more complex tasks) (added tool to parallelize across multiple browser agents since the abstraction keeps the tool calls so high level) (Added a temporary agent insight ui over each browser as it does stuff - human in the loop is still needed) 2026-03-16 05:01:56 -07:00
haikdc e6f1e18054 [Haik]: ckpt, this is a big one babayyy (dashboards now show screenshot previews of their contents like Apps) (Views are now called Apps) (Tools are called Actions) (Auto layout now preserves sizing and just works much better) (Browsers and Apps have larger spawn in size) (Tutorial info for how to get an anthropic key to help users - in the settings) (Added Descriptions to all 3 Main Pages in Navbar) (Also reorganized navbar and made it resizable) (Browsers now support multiple tabs) (Move the Commands page to settings - also beefed up settings a bit to encapsulate more) (Added inner glow on browser) (Added inputs in header of browser to act like normal google search) 2026-03-16 03:08:58 -07:00
haikdc 87ef21919f [Haik]: Browser control 2026-03-15 19:54:23 -07:00
haikdc 1632b5c9e5 [Haik]: ckpt, (Fixed view create duplication bug) (Views auto save) (MCP is star sorted by default) (reload issues in dash fixed) (electron app made) 2026-03-15 00:09:04 -07:00
haikdc 23621306a1 [Haik]: and so it begins 2026-03-13 12:09:25 -07:00