Skip to content

Commit a452e39

Browse files
committed
release(2.0.36): OTP login + UI hardening
Bumps version across package.json, rust/Cargo.toml, ink-tui/package.json, ink-tui banner test, docs/version.js, vscode-extension/package.json, and the Cargo.lock. CHANGELOG documents the new \`openanalyst account login\` flow, the web console Account tab, the manual-vs-OAuth chooser, the new /me/auth/* endpoints, the stop button fix, env-key filter, path cleaning, heartbeat + offline cache, and the lazy SSE work.
1 parent 7d10993 commit a452e39

8 files changed

Lines changed: 101 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,87 @@ All notable changes to OpenAnalyst CLI are documented here. The
44
format loosely follows [Keep a Changelog](https://keepachangelog.com)
55
and the project uses semver.
66

7+
## 2.0.36
8+
9+
OTP sign-in lands as a first-class credential mode. A fresh
10+
`npm install -g @openanalystinc/openanalyst-cli` user can now sign in
11+
to their openanalyst.com account using just an email and a 6-digit
12+
code — no browser, no API key juggling — and immediately call the full
13+
OpenAnalyst-routed model catalog (Beta, Max, GPT, Claude, Gemini)
14+
against their account's credits and plan.
15+
16+
The web console gains a Settings → Account tab that drives the same
17+
flow in the browser, plus a manual-vs-OAuth chooser when both
18+
credentials are present so users explicitly pick which one inference
19+
uses. The CLI's hard-stop, env-key filtering, path cleaning,
20+
heartbeat + offline cache, and lazy SSE work from the previous
21+
sprint also ship here.
22+
23+
### Added
24+
- `openanalyst account login [--email <addr>]` — interactive email/OTP
25+
flow. Stores the issued OpenAnalyst access token under the
26+
`OPENANALYST_AUTH_TOKEN` slot in `~/.openanalyst/credentials.json`
27+
with `auth_method="oauth"`. Picked up automatically by subsequent
28+
CLI invocations.
29+
- `openanalyst account logout` — wipes the stored OAuth credential.
30+
- `openanalyst account status` — prints plan name + credits remaining
31+
by calling `api.openanalyst.com/api/v1/credits/balance` with the
32+
stored bearer.
33+
- Web console **Settings → Account** tab (default tab on open) —
34+
email/OTP sign-in, signed-in summary (email/plan/credits), 60s
35+
auto-refresh of balance, refresh & logout buttons.
36+
- Web console **Settings → Account** radio chooser when both an
37+
OAuth login AND a manual `sk-oa-v1-*` key are configured. The
38+
selection persists server-side so inference always uses the chosen
39+
credential.
40+
- `POST /me/auth/otp/start`, `POST /me/auth/otp/verify`,
41+
`GET /me/auth/status`, `POST /me/auth/logout`,
42+
`PUT /me/providers/openanalyst/preferred-source` — server-side
43+
endpoints proxying onto `ai.10x.in/v2/auth/passwordless/*` and
44+
`api.openanalyst.com/api/v1/credits/balance`. The web UI never
45+
talks to either upstream host directly.
46+
- Web UI stop button now interrupts an in-flight LLM stream
47+
immediately via tokio `JoinHandle::abort()` (previously it only
48+
flipped a flag the next tool call would notice).
49+
- Web UI **TopBar connection pill** — polls `/health` every 3/5/10s
50+
with backoff, shows green/amber/red status, click-to-retry on
51+
disconnect, tooltip with latency + last-OK time.
52+
- Web UI **offline session cache** — 200 messages × 50 sessions in
53+
`localStorage` (LRU eviction). History stays visible when the CLI
54+
is offline; reconnect repaints from the server when it comes back.
55+
- New providers in Settings: **Stability AI**, **Google Imagen (via
56+
Gemini)**, **OpenAI Images** for image generation;
57+
**Brave Search**, **Tavily**, **Serper**, **Exa** for web search.
58+
59+
### Fixed
60+
- Env-discovered API keys no longer pollute the model picker. If
61+
`--serve` was launched from a shell where `ANTHROPIC_API_KEY` was
62+
set, those models used to surface in the web UI even though the
63+
user hadn't explicitly added the provider. They're now tagged
64+
`source="env"` and hidden from the picker.
65+
- Windows extended-length path prefix (`\\?\`) stripped from the
66+
workspace banner in the web UI for clean display.
67+
- Web UI permission-mode chip no longer inserts a slash-command
68+
message into the chat; mode change happens silently via a dedicated
69+
endpoint.
70+
- Turn status line ("thinking…") now stops as soon as the turn
71+
completes; 30s stall safety net auto-hides it if upstream goes
72+
quiet without a terminal event.
73+
- Single-active SSE: switching sessions in the sidebar now closes
74+
the previous stream instead of keeping 50+ subscriptions open.
75+
76+
### Internal
77+
- New `rust/crates/server/src/auth_otp.rs` module — full
78+
HTTP-upstream client + handlers for the OTP flow. Auto-refreshes
79+
the access token when it's within 60s of expiry by hitting
80+
`POST /v2/auth/refresh` with the stored `_10x_admin_refresh` cookie.
81+
- `provider_credentials` rows can now distinguish OAuth-issued
82+
tokens (`auth_method="oauth"`, stored in `auth_token` slot, sent
83+
as `Authorization: Bearer`) from manual API keys
84+
(`auth_method="api_key"`, stored in `api_key` slot, sent as
85+
`x-api-key`). Settings JSON carries `refresh_cookie`,
86+
`expires_at_ms`, `email`, and `preferred_source`.
87+
788
## 2.0.35
889

990
Windows ARM64 lands as a first-class target. `cargo` cross-compiles

docs/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
(function () {
1313
var REPO = 'OpenAnalystInc/cli';
14-
var DEFAULT_VERSION = 'v2.0.35';
14+
var DEFAULT_VERSION = 'v2.0.36';
1515
var CACHE_KEY = 'oa_cli_version';
1616
var CACHE_TTL = 300000;
1717
var ICON_URL = 'https://openanalyst.com/images/new-logo.png';

ink-tui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openanalyst/ink-tui",
3-
"version": "2.0.35",
3+
"version": "2.0.36",
44
"description": "OpenAnalyst CLI terminal UI - React + Ink",
55
"license": "Apache-2.0",
66
"type": "module",

ink-tui/src/components/banner.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function BannerScene(): React.ReactElement {
1616

1717
return (
1818
<Banner
19-
version="2.0.35"
19+
version="2.0.36"
2020
username="Anit"
2121
workingDir="D:\\Openanalyst CLI"
2222
provider="anthropic"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openanalystinc/openanalyst-cli",
3-
"version": "2.0.35",
3+
"version": "2.0.36",
44
"description": "OpenAnalyst CLI - The Universal AI Agent for Your Terminal. 8 providers (OpenAnalyst, Anthropic Claude, OpenAI GPT, Google Gemini, xAI Grok, OpenRouter, Amazon Bedrock, Stability AI), 65+ slash commands, 22 built-in tools, smart model routing, multi-agent orchestration, hosted session APIs, and a full interactive TUI.",
55
"bin": {
66
"openanalyst": "bin/cli.js",

rust/Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude = ["crates/tui-widgets"] # Archived - ratatui widget library replaced b
44
resolver = "2"
55

66
[workspace.package]
7-
version = "2.0.35"
7+
version = "2.0.36"
88
edition = "2021"
99
license = "Apache-2.0"
1010
publish = false

vscode-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "openanalyst-cli-vscode",
33
"displayName": "OpenAnalyst CLI",
44
"description": "Enable OpenAnalyst CLI with direct access to your IDE workspace.",
5-
"version": "2.0.35",
5+
"version": "2.0.36",
66
"publisher": "openanalystinc",
77
"icon": "assets/icon.png",
88
"repository": {

0 commit comments

Comments
 (0)