Skip to content

Add local cn-ashare board (CSI/CNI + Stock Connect) - #1772

Closed
renjianfj163 wants to merge 44 commits into
TraderAlice:devfrom
renjianfj163:feat/cn-ashare-board
Closed

renjianfj163 wants to merge 44 commits into
TraderAlice:devfrom
renjianfj163:feat/cn-ashare-board

Conversation

@renjianfj163

Copy link
Copy Markdown

Summary

  • Add local-only cn-ashare reference board compiling CSI/CNI index strips and HKEX Historical Daily Stock Connect day-end (SSE/SZSE northbound + southbound).
  • Wire traderhub board get --board cn-ashare, /api/reference/cn-ashare, Market GUI sidebar/page, demo fixture, and brief/skill guidance.
  • Keep provenance honest: day-end turnover is not 北向净流入; CSI dates use compact YYYYMMDD.

Test plan

  • pnpm vitest run src/domain/market-data/reference/cn-ashare.spec.ts src/webui/routes/reference.spec.ts
  • pnpm vitest run ui/src/pages/MarketBoardPage.spec.tsx ui/src/components/MarketSidebar.spec.tsx
  • Live smoke fetchCnAshareBoard() returned csi+cni+hkex for 2026-10-09
  • GUI: Market → A股看板 shows indexes + Connect legs

renjianfj163 and others added 30 commits September 22, 2026 16:11
…skill.

Ship the local astock MCP bridge, fix Guardian spawn PATH so Studio can find uv on Windows, and teach Chat/AutoQuant how to emit HTML equity/drawdown reports from CSV.

Co-authored-by: Cursor <cursoragent@cursor.com>
Built-in mock-engine paper account with Tencent L1 marks and L1/L2 A-share guards (lot size, T+1, limit band, session), exposed in Trading under Local paper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Isolate composer drafts for typing perf, clear stuck session occupancy, shorten sidebar titles with spaced ellipsis, and offer inline archive-and-continue that docks to the header. Also add CN realtime quote plumbing via OpenTypeBB Tencent.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep Night Graphite application-menu chrome notes and the Settings tablet
navigator contract from latest dev.

Co-authored-by: Cursor <cursoragent@cursor.com>
Improve AutoQuant chat chrome and long-context continue.
Add CN Local Paper broker for A-share closed-loop dry runs.
Add A-share Tushare satellite, Windows uv PATH, and equity tearsheet skill.
Make A-share local paper usable for closed-loop dry runs: accept SH/SZ/BJ symbol forms (including ETFs), surface UNKNOWN_SYMBOL/NO_QUOTE, charge min-¥5 commission plus sell stamp tax, freeze buying power on resting BUY LMTs, and allow odd-lot sells.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ymbol-p0

fix(uta): cn-paper P0/P1 — symbols, fees, LMT cash freeze
Embed 2025-2026 weekday holiday closes for session checks, use board-aware 10/20/30% limit bands, and define the Zod EOD signal table contract for the sleeve bridge.

Co-authored-by: Cursor <cursoragent@cursor.com>
…2-calendar

feat(uta): cn-paper P2 calendar, limit bands, EOD signal schema
Add auditable cash/position/snapshot adjustments for cn-local-paper with file-backed book reload, trading-as-git journal ops, HTTP routes, and UTA detail dialog.

Co-authored-by: Cursor <cursoragent@cursor.com>
…bookkeeping

feat(uta): cn-paper bookkeeping adjust, persist, and UI
Apply verified and heuristic settlement so same-day ETF sells like 513100 are not locked by stock T+1 rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
…settlement

feat(uta): cn-paper settlement-aware T+0/T+1
Avoid remounting multi-MB AutoQuant Web sessions on every Trading hop, and
skip off-screen transcript paint so the composer can take keystrokes promptly.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ion-return-perf

fix(ui): warm Workspace return from Trading
Declare clientCapabilities.session.compaction and map compaction_update /
legacy Compact conversation tool calls onto the shared compacting phase so
Cursor Agent Web sessions can surface context compression like Pi and Codex.

Co-authored-by: Cursor <cursoragent@cursor.com>
…mpaction

feat(web): ACP session compaction for Cursor Agent
Warm TabHost frames collapse transcript layout while hidden, so returning
without a revision change left readers at the top; re-scroll when still following.

Co-authored-by: Cursor <cursoragent@cursor.com>
…arm-return-scroll

fix(ui): restore conversation follow-tail after Trading return
Avoid wiping unlisted positions when users edit one row and confirm replace; show a live change preview and clearer replace warning.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-snapshot-prefill

fix(ui): seed CN paper whole-book adjust from current book
Expand shortenSessionChromeTitle so research/chat prompts collapse to
scannable nametags, and ship a one-shot script to persist them as displayName.

Co-authored-by: Cursor <cursoragent@cursor.com>
…me-titles

feat(ui): shorten Session chrome titles into subject · method labels
Capable runtimes already expose web.freshSession; prefer GUI on Chat/AutoQuant landings so Cursor and peers open the structured surface instead of TUI.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-default-gui

feat(ui): default Quick Start surface to GUI when supported
Keep long Web sessions snappy by projecting only a recent message window into the browser snapshot, while older process-local history stays available on demand without touching the native Agent transcript.

Co-authored-by: Cursor <cursoragent@cursor.com>
…history-window

feat(web): bound live conversation snapshot with load-earlier
Drop the archive/continue draft panel and header affordance so long AutoQuant threads only show an informational tip.

Co-authored-by: Cursor <cursoragent@cursor.com>
renjianfj163 and others added 14 commits September 29, 2026 15:42
…ntext-tip

feat(ui): simplify AutoQuant long-context offer into a tip
Axios 0.21 env auto-proxy returns 400 on common local mixed-port proxies
(v2rayN/xray). Mirror the CCXT outbound-proxy bridge with HttpsProxyAgent
so paper/live accounts connect when Guardian injects system proxy, and
stay direct when no proxy env is set.

Co-authored-by: Cursor <cursoragent@cursor.com>
…env-proxy

fix(uta): bridge Alpaca axios through HTTP(S)_PROXY correctly
Structured facts/signals plus editorial checks keep cross-asset briefs faithful, and prompt mutations no longer lose the user bubble when polls or reconfigure race.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-editorial-and-web-send

feat: market-brief editorial pipeline and web send fix
Lock data_type/quality/domain/proxy fields into assemble, validate, render, and traderhub skill so vendor scrapes cannot silently pass as exchange or Stock Connect disclosure.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-fact-provenance

Add market-brief fact provenance (proxy / connect-flow bans)
Expose tradingDays via UTA/CLI and ship a headless hk_calendar.py so morning briefs can cite exchange open/prev/next instead of guessing from market clock or HSI bars.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…longbridge

Add Longbridge HK trading calendar for briefs and alice-uta
Collect and normalize Yahoo RSS on a JP/US host, expose token-guarded JSON/RSS for China-side Alice without a raw Yahoo proxy.

Co-authored-by: Cursor <cursoragent@cursor.com>
…gateway-news

Add offshore market-data-gateway for Yahoo news
Combine TraderAlice upstream/dev with fork features (cn-paper, satellites, market-brief, web-session fixes) so local origin/dev is the fullest integration branch.
Compile A-share tape into traderhub/GUI so briefs can pull one structured board instead of ad-hoc CSI/CNI/HKEX curls.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Oct 9, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the luokerenx4's Team Team on Vercel.

A member of the Team first needs to authorize it.

@renjianfj163

Copy link
Copy Markdown
Author

Closing: this change should stay on the personal/contrib side; do not open further PRs from contrib to TraderAlice/OpenAlice for this workflow.

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