v0.9: Unified trading, OpenTypeBB, Agent SDK, SSE streaming#41
Merged
luokerenx4 merged 23 commits intomasterfrom Mar 12, 2026
Merged
v0.9: Unified trading, OpenTypeBB, Agent SDK, SSE streaming#41luokerenx4 merged 23 commits intomasterfrom
luokerenx4 merged 23 commits intomasterfrom
Conversation
… interface - Rename _opts → opts in askWithSession; wire opts.systemPrompt to agent cache key so per-call system prompt overrides are respected - Replace ambiguous 'engine' source tag with 'vercel-ai' across provider, session type, default value, web-plugin, and engine.spec - Clean up AskOptions comments: document per-provider behavior instead of "Claude Code only" annotations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vendor OpenTypeBB (TypeScript port of OpenBB, 11 providers, 114 fetcher models, 109 routes) into packages/opentypebb/ and wire it as SDK clients, eliminating the Python sidecar dependency (localhost:6900). - Add packages/opentypebb/ as vendored dependency (link: protocol) - Add SDK infrastructure: executor singleton, route-map builder, base-client - Add 6 SDK clients (128 methods) mirroring the HTTP client interfaces - Add duck-typed interfaces (EquityClientLike etc.) for adapter compatibility - Add buildSDKCredentials() for credential mapping to executor format - Switch main.ts from HTTP clients to SDK clients (~10 lines) - Extension adapters unchanged (zero logic changes, only import types) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
open-alice runs via `tsx src/main.ts` which transpiles .ts on-the-fly. The previous exports pointed to dist/ (compiled JS), meaning a build step was required after clone. Now exports point directly to src/*.ts, letting tsx handle transpilation. dist/ is no longer needed at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ones Replace flat linear layout with two visually separated zones that reflect the fundamental difference between structured market data (OpenBB) and accumulative open intelligence (news feeds). - Remove SDKSelector "Active Sources" section; enable/disable moves into each zone's header toggle - Add Zone component: bordered card with title, subtitle, badge, and toggle - Market Data Engine zone: unified asset provider grid merges per-class provider select with inline API key input and test button; utility/macro providers (FRED, BLS, EIA, etc.) in separate collapsible section - Open Intelligence zone: feeds list promoted to primary position above settings; settings rendered in compact two-column layout - Add PROVIDER_KEY_MAP to drive which providers need keys and their key names - Fix handleKeyChange to merge full providerKeys before saving, preventing asset vs utility key sections from clobbering each other Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expose two independent config dimensions in the Market Data Engine:
1. Data backend selection (sdk | openbb):
- SDK: uses opentypebb in-process executor (default, no external deps)
- OpenBB: connects to an external OpenBB HTTP server via apiUrl
- main.ts conditionally instantiates SDK or HTTP clients based on config
- Connection URL field now only shown when external backend is selected
2. Embedded OpenBB API server:
- New src/openbb/api-server.ts starts an opentypebb Hono HTTP server
- Exposes OpenBB-compatible /api/v1/* endpoints for external tools
- Configurable port (default 6901), toggle in UI
- Runs independently of which backend Alice uses internally
Config schema additions (src/core/config.ts):
- openbb.dataBackend: 'sdk' | 'openbb' (default: 'sdk')
- openbb.apiServer: { enabled: boolean, port: number } (default: off/6901)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Market data feature now describes opentypebb as no-sidecar-required - openbb.json config row updated with dataBackend and apiServer fields - Project structure expanded with sdk/, api-server.ts, and credential-map.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…LS, EIA providers Implements Phase 12 of the OpenBB migration: populate all missing economy and commodity endpoints so the SDK's 42 economy methods and 6 commodity methods resolve to real fetchers instead of throwing "No SDK route". New providers: BLS (labor statistics), EIA (energy data), Stub (shipping placeholders). New sub-routers: survey (9 routes), GDP (3), shipping (4 stubs), commodity/price (1). FRED helpers extracted into shared utility for 18 Federal Reserve fetchers. OECD helpers extracted for 6 new international data fetchers. Total route count: 143 (up from ~103). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Web UI now supports multiple independent chat channels. Each channel has its own session (isolated context), and can optionally override the system prompt, AI provider/model, and tool permissions. Backend: - AskOptions: add disabledTools and provider fields - ProviderRouter: per-request provider override before falling back to config - VercelAIProvider: filter tools by disabledTools (skip agent cache when active) - ClaudeCodeProvider: merge disabledTools into disallowedTools - WebPlugin: multi-session + per-channel SSE routing - Chat routes: accept channelId in POST, channel query in history/events - New channels CRUD route (GET/POST/PUT/DELETE /api/channels) - Config: webSubchannelSchema + read/write helpers for web-subchannels.json Frontend: - Channel tab bar in ChatPage with create/delete support - API client for channels CRUD - chat.send/history/connectSSE accept channel parameter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace tab bar with minimal # icon popover for channel switching. Sub-channel view shows thin context bar with back navigation. Add ChannelConfigModal for editing label, system prompt, provider, and per-channel tool permissions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The world news tool was not useful for the trading agent. Remove it from the news adapter, clean up the piggyback wrapper, and drop the unused worldProvider parameter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l/apiKey) Channels can now specify exact LLM provider, model ID, base URL, and API key under a nested vercelAiSdk config. Model factory accepts ModelOverride for per-request model creation. UI shows conditional config section when backend is set to Vercel AI SDK. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce @anthropic-ai/claude-agent-sdk as a new provider alongside claude-code CLI and vercel-ai-sdk. The Agent SDK spawns Claude Code as a typed subprocess with in-process MCP tool injection, env-based API key injection (from ai-provider.json), and per-channel overrides. New files: - ai-providers/agent-sdk/tool-bridge.ts — ToolCenter → createSdkMcpServer - ai-providers/agent-sdk/query.ts — wraps query() with env/config - ai-providers/agent-sdk/session.ts — 7-step session management - ai-providers/agent-sdk/agent-sdk-provider.ts — AIProvider impl Config/routing extended across config.ts, ai-provider.ts, ai-config.ts, session.ts, main.ts, web routes, and Telegram plugin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Agent SDK as third option in backend toggle, channel config dropdown, and per-channel override (model/baseUrl/apiKey). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce StreamableResult (PromiseLike + AsyncIterable) so that askWithSession() exposes intermediate tool_use / tool_result / text events to upper layers while keeping full backward compatibility for existing `await` callers. - Add ProviderEvent union type and StreamableResult class (tee pattern) - Add AsyncChannel push-to-pull bridge for callback-based providers - Convert all three providers (Claude Code, Agent SDK, Vercel AI SDK) to return StreamableResult via async generators - Add onToolUse callback to Claude Code and Agent SDK configs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ChatInput: send button activates on text input (gray→blue), focus glow, Shift+Enter hint, arrow icon - ChatMessage: fix redundant ml-8 ternary, add JSON syntax highlighting to tool call display, speed up thinking dots (1.4s→0.9s) - Sidebar: add left accent bar on active nav item, ping animation on SSE disconnect status - Form system: new Card component, Section auto-wraps in Card for visual grouping, Field gets font-medium label + optional description prop, inputClass gets rounded-lg + focus glow - All Section-based pages (Settings, AI Provider, Connectors, Dev) get card containers and tighter spacing (space-y-8→space-y-5) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract PageHeader component (title/description/right slot), apply to all 9 pages - Add StateViews (Spinner, PageLoading, EmptyState), replace inline loading/empty states - Redesign notification style: left accent bar + bell icon instead of centered amber box - Normalize table row hover (bg-tertiary/30) across Portfolio, Events, Heartbeat, Dev - Add page transition fade animation (150ms) via useLocation key swap - Enhance scroll-to-bottom button: larger hit target, new message count badge - HeartbeatPage table: overflow-hidden → overflow-x-auto for mobile scroll Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- EventsPage: migrate to PageHeader, tab switcher in right slot - ChatInput: show spinner in send button while waiting for response - Add Toast component (context + provider + useToast hook), auto-dismiss 3s - DevPage SendSection: replace inline result/error with toast notifications - Sidebar: backdrop overlay fade in/out (200ms transition-opacity) - ChatPage: channel popover max-width for small screens Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…wn, Engine deleted Phase 1: AgentCenter absorbs session management (append, compact, persist) from all three providers. Providers become slim GenerateProvider adapters that only call their backend and yield ProviderEvents. Shared utilities (stripImageData, buildChatHistoryPrompt, tool permissions) extracted to provider-utils.ts. GenerateRouter replaces ProviderRouter. Phase 2: Connector interface gains optional sendStream() for real-time streaming. Web connector implements it (pushes ProviderEvents via SSE). Chat POST handler streams events to SSE clients as they arrive. ConnectorCenter gains notifyStream() with drain-and-fallback for connectors without streaming support. Phase 3: Delete Engine (thin facade), delete duplicated session.ts files from claude-code and agent-sdk providers, clean up old AIProvider interface and ProviderRouter, update all consumers (telegram, web, mcp-ask, cron, heartbeat) from ctx.engine to ctx.agentCenter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ress Show tool call indicators (spinner/checkmark) and accumulate text in real-time as the backend streams ProviderEvents, replacing the static ThinkingIndicator during generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…xt generation - Capture streaming tool calls via ref so they survive POST return, then persist them as a tool_calls DisplayItem in the message list - Show thinking dots below completed tool list when all tools are done but text hasn't arrived yet, preventing the UI from appearing frozen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…r rename Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
57 commits, 513 files changed (+34k/-9k). This is a major release covering four themes: unified trading architecture, TypeScript-native market data, third AI provider, and frontend streaming.
1. Unified Trading Architecture
Contract,ITradingAccount,AccountManagerabstractions across CCXT (crypto) and Alpaca (equities)platforms.jsondefines exchange types,accounts.jsonholds credentials and guards. Legacycrypto.json/securities.jsonstill supportedwallet*→trading*tools. Stage → commit → push with 8-char SHA hashessourceparameter across all trading tools for multi-account dispatchmodifyOrder, removedadjustLeverageequitySearch+cryptoSearch+currencySearchmerged intomarketSearchForResearchloadMarketswith per-type retries2. OpenTypeBB — TypeScript-Native Market Data
opentypebbSDK (packages/opentypebb/)3. Agent SDK — Third AI Provider
@anthropic-ai/claude-agent-sdkas a new provider backend alongside Claude Code CLI and Vercel AI SDKtool_use/tool_result/textevents viaAsyncChannelAgentCenteris now the top-level orchestration center.connector-registry→connector-center4. Frontend — SSE Streaming & UI Polish
5. Housekeeping
Breaking Changes
Engineclass removed — callers should useAgentCenterdirectlyconnector-registry.tsrenamed toconnector-center.tssrc/providers/moved tosrc/ai-providers/wallet*tool names renamed totrading*equitySearch/cryptoSearch/currencySearchmerged intomarketSearchForResearchmodel.jsonconfig file removedadjustLeverageremoved from OrderRequestTest plan
pnpm build— backend + UI compile cleanpnpm test— all tests passpnpm dev, open localhost:3002🤖 Generated with Claude Code