echopai 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +63 -348
  2. package/dist/bin.js +8388 -190
  3. package/package.json +11 -13
  4. package/dist/_generated/commands.js +0 -378
  5. package/dist/_generated/help.js +0 -295
  6. package/dist/_generated/operations.js +0 -2385
  7. package/dist/runtime/auth.js +0 -95
  8. package/dist/runtime/envelope.js +0 -52
  9. package/dist/runtime/errors.js +0 -186
  10. package/dist/runtime/filters.js +0 -153
  11. package/dist/runtime/format.js +0 -143
  12. package/dist/runtime/http.js +0 -65
  13. package/dist/runtime/idempotency.js +0 -18
  14. package/dist/runtime/invoker.js +0 -391
  15. package/dist/runtime/io.js +0 -16
  16. package/dist/runtime/paginator.js +0 -146
  17. package/dist/runtime/trace.js +0 -99
  18. package/dist/runtime/tty.js +0 -51
  19. package/dist/runtime/update_check.js +0 -120
  20. package/dist/runtime/update_worker.js +0 -63
  21. package/dist/runtime/verb_cmd.js +0 -72
  22. package/dist/runtime/verb_runner.js +0 -152
  23. package/dist/runtime/whoami_cache.js +0 -109
  24. package/dist/tools/api.js +0 -81
  25. package/dist/tools/completion.js +0 -116
  26. package/dist/tools/config.js +0 -123
  27. package/dist/tools/doctor.js +0 -183
  28. package/dist/tools/login.js +0 -99
  29. package/dist/tools/mcp.js +0 -141
  30. package/dist/tools/raw.js +0 -96
  31. package/dist/tools/schema.js +0 -58
  32. package/dist/tools/trace.js +0 -54
  33. package/dist/tools/upgrade.js +0 -103
  34. package/dist/tools/welcome.js +0 -225
  35. package/dist/tools/whoami.js +0 -132
  36. package/dist/verbs/_spec.js +0 -15
  37. package/dist/verbs/announcements.js +0 -195
  38. package/dist/verbs/bars_batch.js +0 -66
  39. package/dist/verbs/chart.js +0 -110
  40. package/dist/verbs/concepts.js +0 -393
  41. package/dist/verbs/digest.js +0 -351
  42. package/dist/verbs/financials.js +0 -212
  43. package/dist/verbs/hot.js +0 -29
  44. package/dist/verbs/index.js +0 -88
  45. package/dist/verbs/limit_up.js +0 -156
  46. package/dist/verbs/lookup.js +0 -72
  47. package/dist/verbs/market.js +0 -185
  48. package/dist/verbs/news.js +0 -81
  49. package/dist/verbs/quote.js +0 -53
  50. package/dist/verbs/scan.js +0 -42
  51. package/dist/verbs/search.js +0 -105
  52. package/dist/verbs/sentiment.js +0 -231
  53. package/dist/verbs/views.js +0 -85
  54. package/dist/version.js +0 -5
@@ -1,295 +0,0 @@
1
- /**
2
- * AUTO-GENERATED — DO NOT EDIT BY HAND.
3
- */
4
- export const HELP = {
5
- "agent.session-end": {
6
- "summary": "End a billable agent session",
7
- "description": "关闭 `/v1/agent/session/start` 开启的会话,最终用量提交入库。",
8
- "example": "echopai agent session-end VALUE"
9
- },
10
- "agent.session-start": {
11
- "summary": "Start a billable agent session",
12
- "description": "开启 agent kind 凭据的计费会话。返回 session_id,用于将多次调用归并到一次 billable 单位。需要 `Idempotency-Key` 头。",
13
- "example": "echopai agent session-start --agent-id agent-prod-1 --budget-usd 1.0"
14
- },
15
- "agent.session-usage": {
16
- "summary": "Get cumulative usage of an agent session",
17
- "description": "返回 session 内累计 billable 调用次数、各 scope 配额消耗。",
18
- "example": "echopai agent session-usage VALUE"
19
- },
20
- "announcements.detail": {
21
- "summary": "Fetch a single announcement by id",
22
- "description": "返回公告完整内容:content_md、content_text、cninfo 元数据、解析状态。",
23
- "example": "echopai announcements detail VALUE"
24
- },
25
- "announcements.feed": {
26
- "summary": "List recent A-share announcements",
27
- "description": "A 股公告 feed,按 published_at 降序、同日按 cninfo source_id 降序。可按 type / since 过滤。需要 `announcements:read` scope。",
28
- "example": "echopai announcements feed"
29
- },
30
- "announcements.stock": {
31
- "summary": "List announcements for a specific A-share security",
32
- "description": "指定股票代码的公告列表(含历史窗口)。代码接受 6 位纯数字或 SSE:600519 / SZSE:000001 / BSE:430000 形式。需要 `announcements:read` scope。",
33
- "example": "echopai announcements stock --code SSE:600519"
34
- },
35
- "auth.whoami": {
36
- "summary": "Token introspection (CLI/MCP capability discovery)",
37
- "description": "Returns the calling token's kind, scopes, audience, app metadata,\nrate_limit, allowed_clients, agent_budget (if kind=agent), api_version,\nfeature_flags. Any valid JWT can call — no specific scope required.\n\nCLI/MCP call this once at startup, cache 5 minutes in-process, and use\nthe response to derive `verbs.available` (intersection of curated verb\nscopes with token scopes) and to populate `echopai doctor` checks.\n\nSee `docs/PLAN_CLI_V2_AGENT_SURFACE.md` §5.1.\n",
38
- "example": "echopai auth whoami"
39
- },
40
- "bars.daily": {
41
- "summary": "Daily OHLC bars for one A-share security",
42
- "description": "Daily OHLC bars for one A-share security over a date range. Returns open / high / low / close / volume / turnover per trading day. Requires `bars:30d` (last 30 trading days) or `bars:full` (full history) scope.",
43
- "example": "echopai bars daily --code SSE:600519 --from 2026-01-01 --to 2026-05-01"
44
- },
45
- "bars.daily-batch": {
46
- "summary": "Batch daily OHLC bars for up to 100 A-share securities",
47
- "description": "Batch daily OHLC bars for multiple A-share securities. Up to 100 codes\nper call, up to 1-year date range. Single round-trip; ClickHouse `IN(...)`\nunder the hood.\n\nReturns partial success envelope: codes denied by `allowed_securities`\nappear in `errors[]`, others in `items[]` (with empty `bars[]` if no\ndata found). Order in `items[]` matches input order.\n\nRequires `bars:30d` or `bars:full` scope.\n",
48
- "example": "echopai bars daily-batch --codes ['SSE:600519', 'SZSE:000001']"
49
- },
50
- "bars.minute": {
51
- "summary": "Minute-level OHLC bars for one A-share security",
52
- "description": "Minute-level OHLC bars for one A-share security on a single trade date. Requires `bars:30d` or `bars:full` scope.",
53
- "example": "echopai bars minute --code SSE:600519 --date 2026-05-09"
54
- },
55
- "bars.minute-batch": {
56
- "summary": "Batch minute OHLC bars for up to 20 A-share securities",
57
- "description": "Batch minute OHLC bars for multiple A-share securities. Up to 20 codes\nper call, up to 7 calendar days (≈5 trading days) date range. Single\nClickHouse round-trip; app groups rows by canonical_code.\n\nPartial success envelope same as daily-batch: codes denied by\n`allowed_securities` go to `errors[]`; others to `items[]` with flat\n`bars[]` (each bar carries its own `trade_date` for client grouping).\n\nRequires `bars:30d` or `bars:full` scope.\n",
58
- "example": "echopai bars minute-batch --codes ['SSE:600519', 'SZSE:000001']"
59
- },
60
- "concepts.alerts": {
61
- "summary": "Currently active concept alerts (big_move / limit_up_cluster)",
62
- "description": "Returns the live `concept_alerts:active` hash. Two rules:\n - big_move: abs(pct_change) > 3%\n - limit_up_cluster: limit_up_count >= 3 AND stock_count >= 5\nSee PLAN_CONCEPT_INDUSTRY_QUOTE §5.5 \"异动检测与推送\".\n",
63
- "example": "echopai concepts alerts"
64
- },
65
- "concepts.alerts-history": {
66
- "summary": "Concept alerts history (last 24h)",
67
- "description": "Concept异动 historical events (default last 24h). Filter by rule (big_move / limit_up_cluster) and time window. Used by AI agent / admin review.",
68
- "example": "echopai concepts alerts-history"
69
- },
70
- "concepts.daily-bars": {
71
- "summary": "Concept index daily bars (chain-linked equal-weight, base 1000)",
72
- "description": "Returns daily OHLC (concept index points, not stock prices average),\nbreadth fields, and is_backfilled flag. See PLAN §5.4 algorithm.\n",
73
- "example": "echopai concepts daily-bars VALUE"
74
- },
75
- "concepts.list": {
76
- "summary": "List concepts with live snapshot (6 fields)",
77
- "description": "Concept list joining CH `v_concept_meta` with Redis snapshot hash\n`stockpulse:concept_snapshots:latest`. Each item includes 6 live\nfields (pct_change / index_value / up/down_count / limit_up_count /\namount) refreshed every ~15s by stockpulse-rs collector.\n\nSource / status / index are computed per PLAN_CONCEPT_INDUSTRY_QUOTE\n§5.4 algorithm (chain-linked equal-weight returns, base = 1000).\n",
78
- "example": "echopai concepts list"
79
- },
80
- "concepts.minute-bars": {
81
- "summary": "Concept index minute bars (max 7 days)",
82
- "description": "Concept index minute-level OHLC (chain-linked equal-weight, base = 1000), max 7 days per request. See PLAN_CONCEPT_INDUSTRY_QUOTE §5.4.",
83
- "example": "echopai concepts minute-bars VALUE"
84
- },
85
- "concepts.news": {
86
- "summary": "Related news matching concept name (ILIKE)",
87
- "description": "Short-term implementation: ILIKE on news.title + content with the\nconcept name and full_name. Long-term: news AI tagging.\n",
88
- "example": "echopai concepts news VALUE"
89
- },
90
- "concepts.show": {
91
- "summary": "Concept detail (meta + member securities)",
92
- "description": "Detail view for one concept: meta (full_name / source / status / approved_at / first_listed_at) plus current member securities with their latest snapshots.",
93
- "example": "echopai concepts show VALUE"
94
- },
95
- "concepts.snapshot": {
96
- "summary": "Bulk Redis snapshot of all concepts",
97
- "description": "Returns the full concept_snapshots:latest hash. Use ?codes= to filter.",
98
- "example": "echopai concepts snapshot"
99
- },
100
- "concepts.views": {
101
- "summary": "Broker views associated with this concept",
102
- "description": "JOIN concept_views × broker_views (ai_status=done) sorted by published_at desc.",
103
- "example": "echopai concepts views VALUE"
104
- },
105
- "digest.get": {
106
- "summary": "One-shot research digest for a single security (composite)",
107
- "description": "Composite endpoint: in one HTTP call returns views (PRIMARY research),\nreal-time quote, valuation snapshot (PE/PB/PS/换手率/股息率/量比 等 14 字段),\nmarket sentiment context, and supplementary news.\nPartial-failure tolerant:\neach bucket is independently fetched and per-bucket failures surface\nin `meta.partial_failures[]` rather than poisoning the response. If\nevery sub-bucket fails the endpoint returns 502.\n\nBucket scopes are checked *per bucket* (not at gateway level): a\ntoken with only `views:read` gets the views bucket populated and the\nrest reported as `scope_insufficient` partial failures. This mirrors\nthe CLI fan-out contract exactly so `echopai digest` can either call\nthis endpoint (preferred, single round-trip) or fall back to local\nfan-out without behavior drift.\n\nSee `docs/PLAN_CLI_V2_AGENT_SURFACE.md` §3.3 (digest spec) and §11\nPhase 5.2 (server endpoint).\n",
108
- "example": "echopai digest get SSE:600519"
109
- },
110
- "financials.pit": {
111
- "summary": "Point-in-time financial indicators for one A-share at a given date",
112
- "description": "基于 TDX 财务数据的 Point-in-time 查询。给定 `code` 和 `date`,返回该\n`trade_date` 当时市场上可见的最新一期财务报告(`announce_date <= date`,\n无公告日时保守延迟 90 天)。专为回测、AI agent、量化策略防未来函数泄漏。\n\n返回字段包括:EPS(基本/扣非/稀释)、BPS、ROE、毛利率、营收/净利润/总资产/\n归母权益等核心 ~25 字段。\n",
113
- "example": "echopai financials pit --code SSE:600519 --date 2024-11-01"
114
- },
115
- "financials.quote-snapshot": {
116
- "summary": "Real-time valuation / share / turnover snapshot for one A-share",
117
- "description": "一站式估值快照 —— 一次返回 14 个字段,**全部基于 TDX 原始数据 + Sina 实时\n价自算,不依赖 Tushare**:\n\n- 估值: `pe` / `pe_ttm` / `pb` / `ps` / `ps_ttm`\n- 股本(万股): `total_share` / `float_share` / `free_share`\n- 市值(万元): `total_mv` / `circ_mv`\n- 流动性: `turnover_rate` / `turnover_rate_f`(%)/ `volume_ratio`(倍)\n- 分红: `dv_ratio` / `dv_ttm`(%)\n\n计算口径:\n- PE-TTM = 当前总市值 / 近 4 季度滚动净利润(PIT 表 `ni_parent_ttm`)\n- PE = 当前总市值 / 上年报净利润(`ni_parent_last1y`)\n- PB = 当前总市值 / 归母净资产(`equity_parent`,PIT 防穿越)\n- 换手率 = 当日累计成交量 / 流通股本 × 100\n- 量比 = 当日累计 / 近 5 日同时段累计平均(实时模式)\n / 近 5 日全日成交量平均(指定历史日期模式)\n- 股息率 = Σ(去年 / 近12月内派息事件 派现/10) / 现价 × 100\n\n默认 `date` 留空 → 实时(Sina 5s 快照价 + 当日累计成交量);\n给 `date=YYYY-MM-DD` 则按当日 close 取值(用于历史回测 / 校验)。\n\n财报数据走 `security_financial_indicators_pit` PIT 视图:保证 `visible_date`\n≤ trade_date,避免未来函数。\n\n准确性已对照 Tushare `daily_basic` 校验(见 `scripts/validation/validate_quote_snapshot_vs_tushare.py`)。\n",
118
- "example": "echopai financials quote-snapshot --code SSE:600519 --date 2026-05-13"
119
- },
120
- "financials.reports": {
121
- "summary": "Recent financial reports for one A-share security",
122
- "description": "返回该股票最近 N 期财务报告的核心指标(EPS/BPS/ROE/毛利率/营收/净利润/总\n资产/归母权益/经营现金流/总股本 等 ~25 字段)。可按 `kind` 过滤季报/半年报/\n年报。每期 `announce_date` 字段告知何时市场可见,建议结合回测时使用。\n\n**`kind` 口径说明**:\n\n- `Q1` / `H1` / `Q3` / `annual` —— 四个标准季度末快照(3-31 / 6-30 /\n 9-30 / 12-31),TDX 财务源数据全部落在这四个 report_date。\n- `preliminary` —— **当前数据源结构上不存在**。业绩预告 / 快报 是 indicators\n 行内的字段(`forecast_ni_lower` / `forecast_ni_upper` /\n `express_ni_parent` / `express_revenue` 等),通过 `financials.series`\n metric 参数访问,不是单独的 report_kind 行。`kind=preliminary` 会返\n 空列表 + meta.note。\n",
123
- "example": "echopai financials reports --code SSE:600519"
124
- },
125
- "financials.series": {
126
- "summary": "Time series of a single financial metric for one security",
127
- "description": "返回某只股票某个财务指标的历史时间序列(按报告期排列)。`metric` 是\nindicators 表中的字段名(如 `roe_simple` / `revenue` / `ni_parent` /\n`debt_asset_ratio` / `gross_margin` / `eps_basic` 等共 150 个)。\n\n典型用法:画茅台 10 年 ROE 走势、对比 5 只白酒股 net_margin。\n",
128
- "example": "echopai financials series --code SSE:600519 --metric roe_simple"
129
- },
130
- "index.daily-bars": {
131
- "summary": "Daily OHLC bars for one A-share index",
132
- "description": "指数日线 OHLC。覆盖 v2 表中的指数(上证综指 `SSE:000001` / 深证成指\n`SZSE:399001` / 沪深300 `SSE:000300` / 北证50 `BSE:899050` / 中证系列 `CSI:000922` 等)。\n与 `/v1/bars/daily` 同语义,但 index 没有 `turnover_rate` / `paused` 等股票特有字段。\n",
133
- "example": "echopai index daily-bars --code SSE:000001 --from 2024-01-01 --to 2024-12-31"
134
- },
135
- "index.minute-bars": {
136
- "summary": "Minute OHLC bars for one A-share index",
137
- "description": "指数 1min OHLC。日期范围 ≤ 7 天(与 `/v1/bars/minute-batch` 对齐)。\n返回 `bar_time` / `trade_date` / OHLC / volume / amount / pct_change。\n",
138
- "example": "echopai index minute-bars --code SSE:000001"
139
- },
140
- "index.snapshot": {
141
- "summary": "Real-time snapshot of all Sina-OK A-share indices (172 indices)",
142
- "description": "Returns the latest real-time snapshot for the 172 indices that Sina\nexposes a quote for (SSE / SZSE / BSE — includes 北证50 `BSE:899050`\nand 专精特新 `899601.BJ`). Source is the Redis hash\n`stockpulse:index_snapshots:latest` which the Rust collector refreshes\nevery ~15 seconds during market hours; outside trading hours the last\nintraday snapshot is returned.\n\nUse `codes` to narrow to a subset (canonical format `SSE:000001` (exchange-prefix; legacy `000001.SH` is also accepted but discouraged)).\nOmit to receive all 172.\n\nNote: CSI-series indices (e.g. `CSI:000922`) are not available here —\nSina has no quote feed for them. Daily/minute history for those still\nlives behind `/api/internal/index/{daily-bars,minute-bars-range}`.\n\nRequires `quote:l1`, `quote:l2`, or `quote:delayed` scope.\n",
143
- "example": "echopai index snapshot --codes SSE:000001,SZSE:399001,BSE:899050"
144
- },
145
- "industries.alerts": {
146
- "summary": "Currently active industry alerts",
147
- "description": "Currently active industry alerts (big_move / limit_up_cluster). Same rule set as concepts.",
148
- "example": "echopai industries alerts"
149
- },
150
- "industries.daily-bars": {
151
- "summary": "Industry index daily bars",
152
- "description": "Industry index daily OHLC (chain-linked equal-weight, base = 1000). Path key format `<sw_industry_code>:<sw_level>` (e.g. `401001:1`).",
153
- "example": "echopai industries daily-bars 401001:1"
154
- },
155
- "industries.list": {
156
- "summary": "List industries (申万 L1/L2) with live snapshot",
157
- "description": "Industry index list joining CH `v_industry_meta` with Redis snapshot.\n申万一级 (level=1) ≈ 127 industries, 申万二级 (level=2) ≈ 348.\nChain-linked equal-weight algorithm identical to concepts (PLAN §5.4).\n",
158
- "example": "echopai industries list"
159
- },
160
- "industries.show": {
161
- "summary": "Industry detail (meta + today members)",
162
- "description": "Path key format: `<sw_industry_code>:<sw_level>` (e.g. `401001:1`).",
163
- "example": "echopai industries show 401001:1"
164
- },
165
- "industries.snapshot": {
166
- "summary": "Bulk Redis snapshot of all industries",
167
- "description": "Bulk Redis snapshot for 申万 industries (level 1 ≈ 127, level 2 ≈ 348). Use `codes` to narrow. Mirrors `/v1/concepts/snapshot` shape.",
168
- "example": "echopai industries snapshot"
169
- },
170
- "limit-up.history": {
171
- "summary": "A-share limit-up daily trend (last N days)",
172
- "description": "近 N 个交易日每日涨停数 + 最高连板 + 炸板数。涨停数 / 最高连板来源\n`market_limit_up_pool` (仅 status=limit_up);炸板数来源\n`market_breadth_intraday`(all_a_ex_st 当日最新分钟行)。\n\n响应按 trade_date asc 排序(旧日期在前)。需要 `quote:*` scope。\n",
173
- "example": "echopai limit-up history"
174
- },
175
- "limit-up.pool": {
176
- "summary": "A-share limit-up pool (per-stock detail) for a given trade date",
177
- "description": "当日(或指定 `trade_date`)涨停股池逐股明细:首/末次封板时间、最终涨幅、\n封单金额/封单量、炸板次数、连板数、N 日板内统计、一字板标记、当前 status\n(limit_up / broken)、板块分类。\n\n盘前回退规则(与所有行情类页面一致):\n - `< 9:00`:返回 max(trade_date) 的最新一日数据(昨日)\n - `9:00-9:14`:集合竞价前空窗期,items=[] / trade_date=null\n - `>= 9:15`:collector 已写入今日数据\n\n排序:连板数 desc → 板内板数 desc → 封单金额 desc。需要 `quote:*` scope。\n",
178
- "example": "echopai limit-up pool"
179
- },
180
- "limit-up.summary": {
181
- "summary": "A-share limit-up summary (counts + height ladder) for a given trade date",
182
- "description": "涨停股池聚合统计:涨停数、炸板数、跌停数、最高连板高度、连板梯队\n`ladder: [{ height, count }, ...]`。\n\n炸板数 / 跌停数 与情绪页同源(`market_breadth_intraday` 当日最新分钟行);\n连板梯队仅统计当前封板 status=limit_up 的个股。\n\n盘前回退规则与 `limit-up/pool` 一致。需要 `quote:*` scope。\n",
183
- "example": "echopai limit-up summary"
184
- },
185
- "market.status": {
186
- "summary": "Current A-share market session state",
187
- "description": "Current A-share market session: pre-open / open / lunch / closed; current and next trading day; holiday flag. Requires `market:read` or any `quote:*` scope.",
188
- "example": "echopai market status"
189
- },
190
- "news.feed": {
191
- "summary": "List recent news (alias of /v1/news/list)",
192
- "description": "与 `/v1/news/list` 行为一致,旧客户端兼容用。",
193
- "example": "echopai news feed"
194
- },
195
- "news.get": {
196
- "summary": "Fetch a single news item by id",
197
- "description": "返回新闻完整内容:title、content snippet、tagged securities。(采集端字段 source / source_id / source_url 对外不暴露,admin 路径 /v1/admin/news/{id} 可见。)",
198
- "example": "echopai news get VALUE"
199
- },
200
- "news.list": {
201
- "summary": "List news mentioning a specific security",
202
- "description": "List news mentioning a specific A-share security, ordered by published_at desc. Requires `news:read` scope.",
203
- "example": "echopai news list --security HK:00700"
204
- },
205
- "news.search": {
206
- "summary": "Full-text search recent news",
207
- "description": "Full-text search recent news / market briefs. Returns title, published_at, snippet, tagged securities. (Internal collector identifiers — `source`/`source_id`/`source_url` — are NOT exposed publicly; admin tools see them via /v1/admin/*.) Requires `news:read` scope. Note: news fields are user-generated; meta.untrusted_text_fields lists fields that need sanitization before passing to an LLM.",
208
- "example": "echopai news search --query 光伏龙头"
209
- },
210
- "payment.plans": {
211
- "summary": "List subscription plans",
212
- "description": "返回订阅计划清单(plan_id + 价格 + 时长 + 描述)。",
213
- "example": "echopai payment plans"
214
- },
215
- "quote": {
216
- "summary": "Real-time quote for one or more A-share securities",
217
- "description": "Real-time quote for one or more A-share securities. Returns last price, volume, change %, bid/ask. Up to 200 codes per call. Requires `quote:l1`, `quote:l2`, or `quote:delayed` scope.",
218
- "example": "echopai quote --codes ['SSE:600519', 'SZSE:000001']"
219
- },
220
- "quote.scan": {
221
- "summary": "Full-market real-time quote scan (~5800 A-share securities)",
222
- "description": "Dumps the entire Redis snapshot of A-share real-time quotes in a single\nround-trip. Use for \"全市场扫描\" / agent universe-of-interest discovery\nwhen you don't yet know which codes to query.\n\nFiltering:\n- `exchange=SSE|SZSE|BSE` narrows to one exchange (canonical_code prefix)\n- `app.allowed_securities` is ALWAYS applied; codes outside drop silently\n\nResponse size: ~3 MB unfiltered (~5800 items). CLI users should pair\nwith `--max-bytes` / `--fields` / `--query` from Phase 1.4.\n\n9:00–9:14 集合竞价时段返回空 items + `note` 字段说明。\n\nRequires `quote:l1`, `quote:l2`, or `quote:delayed` scope.\n",
223
- "example": "echopai quote scan"
224
- },
225
- "search.semantic": {
226
- "summary": "Hybrid semantic search across news + analyst views",
227
- "description": "语义 + 模糊泛化搜索。结合 entity 精确匹配(公司代码/分析师)、向量召回(pgvector\n+ DashScope embedding)、trigram 模糊、ILIKE 精确四路召回,RRF 融合后用 reranker\n精排,叠时间衰减 + views 加权(views 主源优先)。\n\n- 搜\"锂电池\"会带出新能源产业链(正极/负极/碳酸锂/宁德时代…)\n- 搜\"芯片\"会带出存储芯片/洁净室/晶圆代工…\n- mode=exact 兼容老 ILIKE 行为,仅在精确关键词命中时返回。\n",
228
- "example": "echopai search semantic --q 锂电池"
229
- },
230
- "securities.industry": {
231
- "summary": "TDX + 申万 industry classification for one A-share security",
232
- "description": "返回该股票的 TDX 自定义行业代码(T1001 食品饮料等)与申万行业三级代码\nL1/L2/L3(X5001 食品饮料 / X500102 白酒 等)。\n\n用法:\n- 股票详情页\"申万行业:白酒 / 食品饮料\"标签\n- 筛选器交叉过滤:行业 + ROE/营收增长率\n- AI agent `find_peers(code)` 用申万二级行业找同业\n",
233
- "example": "echopai securities industry --code SSE:600519"
234
- },
235
- "semantic.find": {
236
- "summary": "Find A-share securities by name / code / pinyin",
237
- "description": "Find A-share securities matching a name (Chinese), code (e.g. 600519), or pinyin initials (e.g. gzmt). Use this when an agent has a description and needs canonical codes.",
238
- "example": "echopai semantic find --query 贵州茅台"
239
- },
240
- "sentiment.breadth": {
241
- "summary": "Intraday breadth time series",
242
- "description": "Intraday breadth time series for one trading day.\n`trade_date` 缺省 → 今日(盘前 9:00 前返回空 items);显式传 YYYY-MM-DD 可\n拉历史任意交易日(来源 ClickHouse `market_breadth_intraday`,剔除 13:00\n稀疏分钟,单日最多 241 行)。Requires `sentiment:read` scope.\n",
243
- "example": "echopai sentiment breadth"
244
- },
245
- "sentiment.overview": {
246
- "summary": "Aggregate market sentiment indicators",
247
- "description": "Aggregate sentiment snapshot for one trading day's latest minute:\nlimit-up/down counts, breadth, divergence index, MA / 52w breadth.\n`trade_date` 缺省 → 今日(Redis 实时,盘前 9:00 前返空结构);显式传\nYYYY-MM-DD 拉历史任意日(最后一分钟聚合行,来源 ClickHouse\n`market_breadth_intraday`)。Requires `sentiment:read` scope.\n",
248
- "example": "echopai sentiment overview --scope main_board"
249
- },
250
- "sentiment.pct-distribution": {
251
- "summary": "Distribution of intraday percent change across the universe",
252
- "description": "返回 A 股全市场涨跌幅分桶(≤-10% / -9% / ... / +10% / 涨停)的家数分布,用于市场宽度可视化。",
253
- "example": "echopai sentiment pct-distribution"
254
- },
255
- "sentiment.turnover": {
256
- "summary": "Intraday turnover time series",
257
- "description": "Intraday turnover time series across one or more trading days.\n`trade_date` 缺省 → 今日(盘前 9:00 前返空 items);显式 YYYY-MM-DD 拉\n历史任意交易日的当日 + 之前 `days-1` 天。Response 含 `current_turnover`\n/ `predicted_total` / `delta_vs_yesterday` headline 字段。Requires\n`sentiment:read` scope.\n",
258
- "example": "echopai sentiment turnover"
259
- },
260
- "squawk.audio": {
261
- "summary": "Stream squawk TTS audio",
262
- "description": "返回 squawk 项的 TTS 音频(MP3)。直接 stream,可作为 `<audio>` src 用。",
263
- "example": "echopai squawk audio VALUE"
264
- },
265
- "squawk.waveform": {
266
- "summary": "Waveform peaks for squawk audio",
267
- "description": "返回 squawk 音频的预计算波形 peak 数据,用于客户端波形可视化。",
268
- "example": "echopai squawk waveform VALUE"
269
- },
270
- "stocks.hot": {
271
- "summary": "Today's hot-stock leaderboard",
272
- "description": "今日最热股票榜(来源 East-Money),按搜索 / 关注 / 评论综合分排序。",
273
- "example": "echopai stocks hot"
274
- },
275
- "stocks.social-hot": {
276
- "summary": "Cross-platform social-hot stocks",
277
- "description": "跨平台(微博 / 雪球 / Twitter)社交媒体提及聚合榜,按提及量 / 情感打分。",
278
- "example": "echopai stocks social-hot"
279
- },
280
- "views.feed": {
281
- "summary": "List analyst views",
282
- "description": "分析师观点 / 卖方研报 / 长文本观点流。可按机构 / 分析师 / 证券 / hours 过滤。需要 `views:read` scope。",
283
- "example": "echopai views feed"
284
- },
285
- "views.get": {
286
- "summary": "Fetch a single analyst view",
287
- "description": "返回单条 view 完整内容、附件图片、tagged securities、AI 摘要。",
288
- "example": "echopai views get VALUE"
289
- },
290
- "views.recent": {
291
- "summary": "Recent broker / analyst views",
292
- "description": "List recent broker / analyst views (research notes, price targets, ratings). Filter by analyst, institution, or a specific security. Requires `views:read` scope.",
293
- "example": "echopai views recent --security HK:00700"
294
- }
295
- };