feat: AgentEvent types, Decimal monetary fields, brand unification#124
Merged
luokerenx4 merged 4 commits intomasterfrom Apr 15, 2026
Merged
feat: AgentEvent types, Decimal monetary fields, brand unification#124luokerenx4 merged 4 commits intomasterfrom
luokerenx4 merged 4 commits intomasterfrom
Conversation
Define AgentEventMap — a typed registry mapping event type strings to their payload interfaces. Each type has a TypeBox schema compiled to an Ajv validator. EventLog.append() now validates payloads at runtime and provides typed overloads for compile-time safety. Migrated all consumers to use typed subscriptions, removing manual `as` casts. Added `trigger` event type for future webhook/API ingest. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… fields All monetary fields (avgCost, marketPrice, marketValue, unrealizedPnL, realizedPnL, netLiquidation, totalCashValue, etc.) changed from number to string across Position, AccountInfo, GitState, and AggregatedEquity interfaces. Broker computations now use Decimal arithmetic internally and output .toString(). This prevents IEEE 754 artifacts like 0.30000000000000004 from reaching the frontend. The IBKR SDK decoder also updated — updatePortfolio callback now passes string values via decodeDecimal() instead of decodeFloat(parseFloat). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace all instances of "Open Alice" with "OpenAlice" across docs, config, and UI for consistent branding and better SEO matching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Decimal migration changed AggregatedEquity fields to string but missed the inline return type in api/trading.ts, causing CI build failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
timFinn
pushed a commit
to timFinn/OpenAlice
that referenced
this pull request
Apr 16, 2026
Upstream changes:
- AgentEvent type system with runtime validation
- Decimal precision for monetary fields (all brokers)
- Profile-based AI config with preset catalog
- Codex AI provider (OpenAI via ChatGPT OAuth)
- UI reorganization (Automation, Logs, News pages)
- News feed view with filtering + /api/news endpoint
- Currency-aware portfolio + FX rates
- CCXT Hyperliquid support + dynamic credentials
- Commodity canonical naming + catalog
- Telegram auth + trading panel
- Session awareness tools + Dev workbench
Fork features preserved:
- Signal router (8 signals, 2m poll)
- Market Pulse dashboard (/pulse)
- Paper bot scorecard + attribution
- Economy tools (FRED, CPI, rates)
- Quote streaming (Alpaca WS + CCXT Pro)
- Safety guards (6 autonomous guards)
- Dual account architecture
- Heartbeat active-hours + compaction
- Fear & Greed, GDELT, prediction markets
Merge fixes:
- Guards/portfolio-analytics adapted to Decimal string fields
- Calculator spec updated for CalculateOutput { value, dataRange }
- Technical indicators (STOCHRSI, ADX, OBV, VWAP, PIVOT) accept TrackedValues
- Persona hot-reload merged with date injection
- Commodity provider uses correct providers.commodity config
9 tasks
timFinn
added a commit
to timFinn/OpenAlice
that referenced
this pull request
Apr 16, 2026
Merge upstream PRs TraderAlice#102-TraderAlice#124 (v0.9.0-beta.12)
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
Three significant changes that touch core infrastructure:
1. AgentEvent type system (
5fde2d1) — 8 files, +378/-12Introduces
AgentEventMap, a typed registry that maps event type strings (e.g.cron.fire,heartbeat.done,message.received) to their payload interfaces. Each event type gets:EventLog.append()now has typed overloads, so payloads are checked at the call sitesubscribeType('cron.fire', cb)gives the callback a properly typed payload, removing all manualascastsAll existing consumers (CronListener, Heartbeat, SnapshotScheduler, ConnectorCenter) migrated to typed API. Also adds a
triggerevent type for future webhook/API ingest.2. Decimal monetary fields (
dbe3535) — 31 files, +405/-389Eliminates IEEE 754 floating-point artifacts (e.g.
0.30000000000000004) from all monetary fields across the entire trading stack. This is a breaking interface change:Position.avgCost,marketPrice,marketValue,unrealizedPnL,realizedPnL→numbertostringAccountInfo.netLiquidation,totalCashValue,buyingPower, etc. →numbertostringGitState,AggregatedEquity,UTASnapshot— all monetary fields followDecimalarithmetic internally and output.toString()updatePortfoliocallback passes string values viadecodeDecimal()instead ofdecodeFloat(parseFloat)PortfolioPage,api/types.ts) updated to consume string values3. Brand unification (
7a7f586) — 11 files, +19/-19Replace all instances of "Open Alice" (with space) with "OpenAlice" (no space) for consistent branding and SEO. Covers README, CLAUDE.md, CONTRIBUTING, CHANGELOG, package.json, UI title/sidebar, cliff.toml, and ibkr DESIGN.md.
Test plan
pnpm test— unit tests pass (especially agent-event, event-log, TradingGit, guards, broker, fx-service specs)npx tsc --noEmit— no type errors from the number→string migration🤖 Generated with Claude Code