echopai 2.0.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 (45) hide show
  1. package/README.md +386 -0
  2. package/dist/_generated/commands.js +274 -0
  3. package/dist/_generated/help.js +190 -0
  4. package/dist/_generated/operations.js +1306 -0
  5. package/dist/bin.js +170 -0
  6. package/dist/runtime/auth.js +95 -0
  7. package/dist/runtime/envelope.js +52 -0
  8. package/dist/runtime/errors.js +186 -0
  9. package/dist/runtime/filters.js +153 -0
  10. package/dist/runtime/format.js +143 -0
  11. package/dist/runtime/http.js +65 -0
  12. package/dist/runtime/idempotency.js +18 -0
  13. package/dist/runtime/invoker.js +387 -0
  14. package/dist/runtime/io.js +16 -0
  15. package/dist/runtime/paginator.js +146 -0
  16. package/dist/runtime/trace.js +99 -0
  17. package/dist/runtime/tty.js +51 -0
  18. package/dist/runtime/verb_cmd.js +70 -0
  19. package/dist/runtime/verb_runner.js +152 -0
  20. package/dist/runtime/whoami_cache.js +109 -0
  21. package/dist/tools/api.js +81 -0
  22. package/dist/tools/completion.js +116 -0
  23. package/dist/tools/config.js +123 -0
  24. package/dist/tools/doctor.js +183 -0
  25. package/dist/tools/login.js +99 -0
  26. package/dist/tools/mcp.js +141 -0
  27. package/dist/tools/raw.js +96 -0
  28. package/dist/tools/schema.js +58 -0
  29. package/dist/tools/trace.js +54 -0
  30. package/dist/tools/whoami.js +132 -0
  31. package/dist/verbs/_spec.js +15 -0
  32. package/dist/verbs/bars_batch.js +66 -0
  33. package/dist/verbs/chart.js +110 -0
  34. package/dist/verbs/digest.js +342 -0
  35. package/dist/verbs/hot.js +29 -0
  36. package/dist/verbs/index.js +49 -0
  37. package/dist/verbs/lookup.js +72 -0
  38. package/dist/verbs/news.js +67 -0
  39. package/dist/verbs/quote.js +53 -0
  40. package/dist/verbs/research.js +44 -0
  41. package/dist/verbs/scan.js +42 -0
  42. package/dist/verbs/sentiment.js +46 -0
  43. package/dist/verbs/views.js +83 -0
  44. package/dist/version.js +5 -0
  45. package/package.json +58 -0
@@ -0,0 +1,190 @@
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
+ "auth.whoami": {
21
+ "summary": "Token introspection (CLI/MCP capability discovery)",
22
+ "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",
23
+ "example": "echopai auth whoami"
24
+ },
25
+ "backtest.excess-distribution": {
26
+ "summary": "Excess-return distribution over a benchmark",
27
+ "description": "信号相对基准(沪深 300 / 中证 1000 等)持有期超额收益的直方分布。",
28
+ "example": "echopai backtest excess-distribution"
29
+ },
30
+ "backtest.rolling-win-rate": {
31
+ "summary": "Rolling win rate of a signal series",
32
+ "description": "信号在滚动窗口(默认 60 个交易日)内的胜率时间序列。",
33
+ "example": "echopai backtest rolling-win-rate"
34
+ },
35
+ "backtest.summary": {
36
+ "summary": "Backtest summary metrics for a signal series",
37
+ "description": "信号回测汇总:胜率、平均超额收益、Sharpe-like 评分、最大回撤等。",
38
+ "example": "echopai backtest summary"
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
+ "digest.get": {
61
+ "summary": "One-shot research digest for a single security (composite)",
62
+ "description": "Composite endpoint: in one HTTP call returns views (PRIMARY research),\nresearch-entity performance (quality layer), real-time quote, market\nsentiment context, and supplementary news. Partial-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",
63
+ "example": "echopai digest get VALUE"
64
+ },
65
+ "market.status": {
66
+ "summary": "Current A-share market session state",
67
+ "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.",
68
+ "example": "echopai market status"
69
+ },
70
+ "news.feed": {
71
+ "summary": "List recent news (alias of /v1/news/list)",
72
+ "description": "与 `/v1/news/list` 行为一致,旧客户端兼容用。",
73
+ "example": "echopai news feed"
74
+ },
75
+ "news.get": {
76
+ "summary": "Fetch a single news item by id",
77
+ "description": "返回新闻完整内容:title、content snippet、source URL、tagged securities。",
78
+ "example": "echopai news get VALUE"
79
+ },
80
+ "news.list": {
81
+ "summary": "List news mentioning a specific security",
82
+ "description": "List news mentioning a specific A-share security, ordered by published_at desc. Requires `news:read` scope.",
83
+ "example": "echopai news list --security SSE:600519"
84
+ },
85
+ "news.search": {
86
+ "summary": "Full-text search recent news",
87
+ "description": "Full-text search recent news / market briefs. Returns title, source, published_at, snippet, tagged securities. Requires `news:read` scope. Note: news fields are user-generated; meta.untrusted_text_fields lists fields that need sanitization before passing to an LLM.",
88
+ "example": "echopai news search --query 光伏龙头"
89
+ },
90
+ "news.sources": {
91
+ "summary": "List canonical news source identifiers",
92
+ "description": "返回新闻 source 标识列表(如 `cls`、`jin10`、`twitter`、`wallstreetcn`),可用于 list/search 的 source 过滤。",
93
+ "example": "echopai news sources"
94
+ },
95
+ "payment.plans": {
96
+ "summary": "List subscription plans",
97
+ "description": "返回订阅计划清单(plan_id + 价格 + 时长 + 描述)。",
98
+ "example": "echopai payment plans"
99
+ },
100
+ "quote": {
101
+ "summary": "Real-time quote for one or more A-share securities",
102
+ "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.",
103
+ "example": "echopai quote --codes ['SSE:600519', 'SZSE:000001']"
104
+ },
105
+ "quote.scan": {
106
+ "summary": "Full-market real-time quote scan (~5800 A-share securities)",
107
+ "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",
108
+ "example": "echopai quote scan"
109
+ },
110
+ "research.entity-performance": {
111
+ "summary": "Performance of one research entity",
112
+ "description": "单个研究实体的细化绩效指标,对照 `/v1/research-entities/performance`。",
113
+ "example": "echopai research entity-performance VALUE"
114
+ },
115
+ "research.entity-performance-list": {
116
+ "summary": "Aggregate performance of research entities",
117
+ "description": "全体研究实体(analyst / team / institution)的命中率、平均目标价达成率、覆盖股票数等汇总。需要 `research:read` scope。",
118
+ "example": "echopai research entity-performance-list"
119
+ },
120
+ "semantic.find": {
121
+ "summary": "Find A-share securities by name / code / pinyin",
122
+ "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.",
123
+ "example": "echopai semantic find --query 贵州茅台"
124
+ },
125
+ "sentiment.breadth": {
126
+ "summary": "Intraday breadth time series",
127
+ "description": "Intraday breadth time series. Requires `sentiment:read` scope.",
128
+ "example": "echopai sentiment breadth"
129
+ },
130
+ "sentiment.overview": {
131
+ "summary": "Aggregate market sentiment indicators",
132
+ "description": "Aggregate sentiment: limit-up/down counts, breadth, divergence index, top movers. Requires `sentiment:read` scope.",
133
+ "example": "echopai sentiment overview --scope main_board"
134
+ },
135
+ "sentiment.pct-distribution": {
136
+ "summary": "Distribution of intraday percent change across the universe",
137
+ "description": "返回 A 股全市场涨跌幅分桶(≤-10% / -9% / ... / +10% / 涨停)的家数分布,用于市场宽度可视化。",
138
+ "example": "echopai sentiment pct-distribution"
139
+ },
140
+ "sentiment.turnover": {
141
+ "summary": "Intraday turnover time series",
142
+ "description": "Intraday turnover time series. Requires `sentiment:read` scope.",
143
+ "example": "echopai sentiment turnover"
144
+ },
145
+ "signals.outcome": {
146
+ "summary": "Outcome trace for a single signal",
147
+ "description": "单条 signal 的细化结果追踪。",
148
+ "example": "echopai signals outcome VALUE"
149
+ },
150
+ "signals.outcomes": {
151
+ "summary": "Outcomes of analyst-view-derived signals",
152
+ "description": "返回分析师 views 派生信号的实际结果(目标价命中 / 止损 / 到期),含命中时长、最大回撤等。",
153
+ "example": "echopai signals outcomes"
154
+ },
155
+ "squawk.audio": {
156
+ "summary": "Stream squawk TTS audio",
157
+ "description": "返回 squawk 项的 TTS 音频(MP3)。直接 stream,可作为 `<audio>` src 用。",
158
+ "example": "echopai squawk audio VALUE"
159
+ },
160
+ "squawk.waveform": {
161
+ "summary": "Waveform peaks for squawk audio",
162
+ "description": "返回 squawk 音频的预计算波形 peak 数据,用于客户端波形可视化。",
163
+ "example": "echopai squawk waveform VALUE"
164
+ },
165
+ "stocks.hot": {
166
+ "summary": "Today's hot-stock leaderboard",
167
+ "description": "今日最热股票榜(来源 East-Money),按搜索 / 关注 / 评论综合分排序。",
168
+ "example": "echopai stocks hot"
169
+ },
170
+ "stocks.social-hot": {
171
+ "summary": "Cross-platform social-hot stocks",
172
+ "description": "跨平台(微博 / 雪球 / Twitter)社交媒体提及聚合榜,按提及量 / 情感打分。",
173
+ "example": "echopai stocks social-hot"
174
+ },
175
+ "views.feed": {
176
+ "summary": "List analyst views",
177
+ "description": "分析师观点 / 卖方研报 / 长文本观点流。可按机构 / 分析师 / 证券 / hours 过滤。需要 `views:read` scope。",
178
+ "example": "echopai views feed"
179
+ },
180
+ "views.get": {
181
+ "summary": "Fetch a single analyst view",
182
+ "description": "返回单条 view 完整内容、附件图片、tagged securities、AI 摘要。",
183
+ "example": "echopai views get VALUE"
184
+ },
185
+ "views.recent": {
186
+ "summary": "Recent broker / analyst views",
187
+ "description": "List recent broker / analyst views (research notes, price targets, ratings). Filter by analyst, institution, or a specific security. Requires `views:read` scope.",
188
+ "example": "echopai views recent"
189
+ }
190
+ };