Skip to content

feat: ToolCallLog + fix equity nullable OHLC#69

Merged
luokerenx4 merged 6 commits intomasterfrom
dev
Mar 17, 2026
Merged

feat: ToolCallLog + fix equity nullable OHLC#69
luokerenx4 merged 6 commits intomasterfrom
dev

Conversation

@luokerenx4
Copy link
Contributor

Summary

  • ToolCallLog — structured, persistent log of every AI tool invocation. Records name, input, output, duration, and heuristic error status. JSONL on disk + in-memory ring buffer + real-time SSE subscriber fan-out.
    • Backend: ToolCallLog class, /api/agent-status routes (paginated, recent, SSE stream)
    • Frontend: Agent Status page with table, tool name filter, expandable rows, live SSE updates
    • 31 unit tests covering all public behavior
  • Fix equity nullable OHLC (Bug: CryptoHistoricalDataSchema validation fails when yfinance returns null close price #66 follow-up) — EquityHistoricalDataSchema now allows nullable OHLC fields (same fix as crypto). Null bar filtering moved to the analysis adapter layer where it belongs.

Test plan

  • pnpm build passes
  • pnpm test — 831 tests pass
  • ToolCallLog: 31 unit tests (start/complete, error detection, recovery, parallel calls, duration, pagination, subscribe, ring buffer eviction)
  • Manual: start dev, trigger tool call, verify /api/agent-status/recent returns data and Agent Status page shows real-time entries

🤖 Generated with Claude Code

luokerenx4 and others added 6 commits March 17, 2026 03:33
Every AI tool invocation is now recorded with full input, output,
duration, and heuristic error status. Data flows through AgentCenter
pipeline (tool_use → start, tool_result → complete) into an append-only
JSONL file with in-memory ring buffer and real-time subscriber fan-out.

Backend: ToolCallLog class, /api/agent-status routes (paginated, recent, SSE)
Frontend: Agent Status page with table, tool name filter, expandable rows, SSE

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers: start/complete round-trip, seq increment, orphan handling,
error detection heuristics, flushPending, recent/query filtering,
ring buffer eviction, subscribe/unsubscribe, crash recovery,
parallel tool calls, duration tracking, and reset.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove OpenBB news infrastructure (newsGetCompany, piggyback, SDK/HTTP
news clients) which had no real utility. Rename config section `openbb`
→ `marketData` and `newsCollector` → `news` to reflect domain semantics
rather than implementation details. Restructure extension/news-collector
into extension/news with clearer collector/ and query/ subdirectories.

- Delete: adapter.ts, piggyback.ts, openbb/news/*, sdk/news-client.ts
- Rename: openbbSchema → marketDataSchema, backend values updated
- Move: news-collector/* → news/{collector,query,store,types,config}
- UI: update zone names, remove stale provider options & piggyback toggle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…market-data/

Separate domain logic from AI tool definitions:
- domain/ holds business logic (trading, analysis, news, brain, market-data)
- tool/ holds thin AI tool adapters that bridge domain to ToolCenter
- openbb/ renamed to domain/market-data/ with typebb/ and openbb-api/ sub-layers
- Delete dead economy + commodity code (zero usage)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Not yet wired to tools, but needed as data infrastructure for future use.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EquityHistoricalDataSchema now allows nullable OHLC fields (yfinance
returns null for incomplete/missing bars). Null filtering happens in
the analysis adapter layer before data reaches the calculator —
opentypebb reflects API reality, consumers decide what to keep.

Closes #66 (equity side — crypto was already fixed).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@luokerenx4 luokerenx4 merged commit 0860546 into master Mar 17, 2026
2 checks passed
@luokerenx4 luokerenx4 deleted the dev branch March 17, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant