@weaxs/openclaw-stock-analysis 0.2.5 → 0.2.7

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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +322 -21
  3. package/index.ts +257 -16
  4. package/openclaw.plugin.json +11 -1
  5. package/package.json +1 -1
  6. package/schemas/market_review_schema.json +12 -5
  7. package/schemas/report_schema.json +68 -4
  8. package/scripts/cli-timeout.mjs +27 -0
  9. package/scripts/json-input.mjs +26 -0
  10. package/scripts/setup-python.mjs +6 -6
  11. package/skills/bull-trend/SKILL.md +34 -10
  12. package/skills/bull-trend/references/fat-tails.md +91 -0
  13. package/skills/bull-trend/scripts/tail_analysis.py +132 -0
  14. package/skills/event-driven/SKILL.md +6 -0
  15. package/skills/growth-quality/SKILL.md +6 -0
  16. package/skills/market-review/SKILL.md +2 -0
  17. package/skills/stock-analysis/SKILL.md +25 -5
  18. package/skills/stock-analysis/references/stateless-analysis.md +66 -0
  19. package/skills/stock-screener/SKILL.md +7 -1
  20. package/skills/strategy-backtest/SKILL.md +13 -0
  21. package/skills/wisburg-research/SKILL.md +2 -0
  22. package/templates/market_review/full.md.j2 +7 -0
  23. package/templates/stock_analysis/_evidence.md.j2 +11 -0
  24. package/templates/stock_analysis/brief.md.j2 +6 -1
  25. package/templates/stock_analysis/full.md.j2 +8 -3
  26. package/tools/_subproc.py +66 -11
  27. package/tools/alert_rules.py +32 -4
  28. package/tools/backtest.py +95 -18
  29. package/tools/capabilities.py +11 -0
  30. package/tools/cli_budgets.json +26 -0
  31. package/tools/gather.py +24 -16
  32. package/tools/lixinger.py +100 -0
  33. package/tools/market_regime.py +7 -3
  34. package/tools/market_review.py +37 -15
  35. package/tools/position_context.py +20 -2
  36. package/tools/report_renderer.py +2 -0
  37. package/tools/risk_screening.py +45 -17
  38. package/tools/screener.py +74 -24
  39. package/tools/sec_edgar.py +346 -0
  40. package/tools/sec_holders.py +263 -0
  41. package/tools/signal_tracker.py +218 -24
  42. package/tools/stateless_analysis.py +630 -0
  43. package/tools/stock_data.py +170 -32
  44. package/tools/technical.py +16 -2
  45. package/tools/value_data.py +159 -0
  46. package/tools/watchlist.py +24 -1
  47. package/tools/watchlist_context.py +25 -10
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Stock Analysis — OpenClaw Plugin
2
2
 
3
- A股 / 港股 / 美股 / 日股 / 韩股 / 台股 行情、技术分析、筛选与回测。OpenClaw Gateway 加载后即可在对话中调用 51 个工具。
3
+ A股 / 港股 / 美股 / 日股 / 韩股 / 台股 行情、技术分析、筛选与回测。OpenClaw Gateway 加载后即可在对话中调用 67 个工具。
4
4
 
5
5
  ## 安装
6
6
 
package/dist/index.js CHANGED
@@ -4,11 +4,91 @@ var __export = (target, all) => {
4
4
  __defProp(target, name, { get: all[name], enumerable: true });
5
5
  };
6
6
 
7
+ // scripts/json-input.mjs
8
+ import { mkdtemp, writeFile, rm } from "node:fs/promises";
9
+ import { tmpdir } from "node:os";
10
+ import { join } from "node:path";
11
+ async function withJsonInput(input, execute) {
12
+ let directory;
13
+ let result;
14
+ try {
15
+ directory = await mkdtemp(join(tmpdir(), "stock-analysis-"));
16
+ const path = join(directory, "input.json");
17
+ await writeFile(path, JSON.stringify(input), { encoding: "utf8", mode: 384 });
18
+ result = await execute(path);
19
+ } catch {
20
+ result = JSON.stringify({ error: "Analysis command failed; check input and interpreter/dependencies" });
21
+ } finally {
22
+ if (directory) {
23
+ try {
24
+ await rm(directory, { recursive: true, force: true });
25
+ } catch {
26
+ result = JSON.stringify({ error: "Could not remove temporary analysis input" });
27
+ }
28
+ }
29
+ }
30
+ return result;
31
+ }
32
+
33
+ // tools/cli_budgets.json
34
+ var cli_budgets_default = {
35
+ default: 120,
36
+ "stock_data.py:market_snapshot": 240,
37
+ "screener.py:screen": 390,
38
+ "sec_edgar.py:holdings": 300,
39
+ "technical.py:analyze": 150,
40
+ "market_regime.py:detect": 270,
41
+ "backtest.py:run": 270,
42
+ "risk_screening.py:screen": 450,
43
+ "signal_tracker.py:evaluate": 300,
44
+ "stock_data.py:market_stats": 240,
45
+ "market_review.py:review": 300,
46
+ "anomaly_detect.py:detect": 390,
47
+ "position_context.py:analyze": 300,
48
+ "alert_rules.py:check": 480,
49
+ "technical.py:calculate_ma": 150,
50
+ "value_data.py:dividends": 300,
51
+ "value_data.py:etf_details": 450,
52
+ "watchlist.py:analyze": 30,
53
+ "watchlist_context.py:build": 30,
54
+ l2_batch: 360,
55
+ l2_workers: 6,
56
+ watchlist_item: 480,
57
+ "stateless_analysis.py:event_study": 300,
58
+ "stateless_analysis.py:robustness": 660
59
+ };
60
+
61
+ // scripts/cli-timeout.mjs
62
+ import { basename } from "node:path";
63
+ function commandTimeout(script, args) {
64
+ const key = `${basename(script)}:${args[0] ?? ""}`;
65
+ let budget = cli_budgets_default[key] ?? cli_budgets_default.default;
66
+ const option = (name, fallback) => args.includes(name) ? args[args.indexOf(name) + 1] ?? fallback : fallback;
67
+ const positiveInt = (value, fallback) => /^\d+$/.test(String(value)) && Number(value) > 0 ? Number(value) : fallback;
68
+ if (key === "screener.py:screen") {
69
+ budget += Math.ceil(positiveInt(option("--top", 20), 20) / cli_budgets_default.l2_workers) * cli_budgets_default.l2_batch;
70
+ } else if (key === "watchlist.py:analyze" || key === "watchlist_context.py:build") {
71
+ const count = String(args[1] ?? "").split(",").filter((s) => s.trim()).length;
72
+ const workers = positiveInt(option("--workers", 3), 3);
73
+ budget += Math.ceil(count / workers) * cli_budgets_default.watchlist_item;
74
+ if (key === "watchlist_context.py:build") {
75
+ budget += Math.ceil(count / Math.min(workers * 2, 6)) * cli_budgets_default["anomaly_detect.py:detect"];
76
+ if (args.includes("--include-market-review")) budget += 3 * cli_budgets_default["market_review.py:review"] + 30;
77
+ }
78
+ } else if (key === "market_review.py:review" && option("--market", "A") === "all") {
79
+ budget = 3 * budget + 30;
80
+ } else if (key === "technical.py:analyze" && args.includes("--periods")) {
81
+ const periods = String(option("--periods", "daily")).split(",").map((p) => p.trim()).filter(Boolean);
82
+ budget *= (/* @__PURE__ */ new Set([option("--period", "daily"), ...periods])).size;
83
+ }
84
+ return budget * 1e3 + 3e4;
85
+ }
86
+
7
87
  // openclaw/index.ts
8
88
  import { existsSync } from "node:fs";
9
89
  import * as cp from "node:child_process";
10
90
  import { promisify } from "node:util";
11
- import { dirname, join } from "node:path";
91
+ import { dirname, join as join2 } from "node:path";
12
92
  import { fileURLToPath } from "node:url";
13
93
 
14
94
  // node_modules/typebox/build/system/memory/memory.mjs
@@ -4427,18 +4507,28 @@ __export(typebox_exports, {
4427
4507
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4428
4508
  var defaultExecutor = async (bin, argv) => {
4429
4509
  const exec = promisify(cp.execFile);
4430
- const { stdout } = await exec(bin, argv, { maxBuffer: 32 * 1024 * 1024 });
4431
- return stdout;
4510
+ try {
4511
+ const { stdout } = await exec(bin, argv, { maxBuffer: 32 * 1024 * 1024, timeout: commandTimeout(argv[0], argv.slice(1)) });
4512
+ return stdout;
4513
+ } catch (error) {
4514
+ const stdout = error.stdout;
4515
+ try {
4516
+ const data = JSON.parse(stdout ?? "");
4517
+ if (data && typeof data.error === "string") return stdout;
4518
+ } catch {
4519
+ }
4520
+ return JSON.stringify({ error: error.killed ? "Python command timed out" : "Python command failed; check interpreter/dependencies" });
4521
+ }
4432
4522
  };
4433
4523
  var executor = defaultExecutor;
4434
4524
  function __setExecutor(fn) {
4435
4525
  executor = fn;
4436
4526
  }
4437
4527
  var here = dirname(fileURLToPath(import.meta.url));
4438
- var toolsDir = existsSync(join(here, "tools")) ? join(here, "tools") : join(here, "..", "tools");
4528
+ var toolsDir = existsSync(join2(here, "tools")) ? join2(here, "tools") : join2(here, "..", "tools");
4439
4529
  var fallbackRoot = dirname(toolsDir);
4440
4530
  var isWin = process.platform === "win32";
4441
- var venvBin = join(".venv", isWin ? "Scripts" : "bin", isWin ? "python.exe" : "python3");
4531
+ var venvBin = join2(".venv", isWin ? "Scripts" : "bin", isWin ? "python.exe" : "python3");
4442
4532
  function asText(text) {
4443
4533
  return { content: [{ type: "text", text }] };
4444
4534
  }
@@ -4448,17 +4538,228 @@ var index_default = definePluginEntry({
4448
4538
  description: "Stock analysis, screening, and strategy backtesting across A/HK/US/JP/KR/TW markets",
4449
4539
  register(api) {
4450
4540
  const repoRoot = api.rootDir || fallbackRoot;
4541
+ const runtimeToolsDir = existsSync(join2(repoRoot, "tools")) ? join2(repoRoot, "tools") : toolsDir;
4451
4542
  const pythonBin = () => {
4452
- const venvPython = join(repoRoot, venvBin);
4543
+ const venvPython = join2(repoRoot, venvBin);
4453
4544
  if (existsSync(venvPython)) return venvPython;
4454
- const parentVenvPython = join(repoRoot, "..", venvBin);
4545
+ const parentVenvPython = join2(repoRoot, "..", venvBin);
4455
4546
  if (existsSync(parentVenvPython)) return parentVenvPython;
4456
4547
  return isWin ? "python" : "python3";
4457
4548
  };
4458
- const runPy = (script, args) => executor(pythonBin(), [join(toolsDir, script), ...args]);
4549
+ const runPy = (script, args) => executor(pythonBin(), [join2(runtimeToolsDir, script), ...args]);
4550
+ api.registerTool({
4551
+ name: "compare_stocks",
4552
+ description: "\u65E0\u72B6\u6001\u540C\u884C\u6307\u6807\u6BD4\u8F83\uFF1A\u5148\u7528\u73B0\u6709\u8D22\u52A1/\u884C\u60C5\u5DE5\u5177\u53D6\u6570\uFF0C\u518D\u4F20companies\uFF1B\u4EC5\u76F8\u540Cunit/basis/period\u53EF\u6392\u5E8F\uFF0C\u7F3A\u5931\u4E0D\u586B\u96F6\uFF0C\u4E0D\u751F\u6210\u4E70\u5356\u7EFC\u5408\u5206\u3002",
4553
+ parameters: typebox_exports.Object({
4554
+ companies: typebox_exports.Array(typebox_exports.Object({
4555
+ symbol: typebox_exports.String({ "description": "\u552F\u4E00\u80A1\u7968\u4EE3\u7801" }),
4556
+ period: typebox_exports.String({ "description": "\u7EDF\u4E00\u53EF\u6BD4\u671F\u95F4\uFF1B\u8D22\u52A1\u7528\u62A5\u544A\u671F\uFF0C\u4F30\u503C\u7528\u4F30\u503C\u65E5" }),
4557
+ metrics: typebox_exports.Array(typebox_exports.Object({
4558
+ name: typebox_exports.String({ "description": "\u6307\u6807\u540D\uFF0C\u5982pe/roe/net_income" }),
4559
+ value: typebox_exports.Union([typebox_exports.Number(), typebox_exports.Null()], { "description": "\u6709\u9650\u6570\u503C\uFF1B\u7F3A\u5931\u4E3Anull" }),
4560
+ unit: typebox_exports.String({ "description": "\u7CBE\u786E\u5355\u4F4D\uFF0C\u5982multiple/percent/fraction/CNY/USD" }),
4561
+ basis: typebox_exports.String({ "description": "\u53E3\u5F84\uFF0C\u5982TTM/annual/consolidated\uFF1B\u533A\u5206\u7D2F\u8BA1\u4E0E\u5355\u5B63" }),
4562
+ source: typebox_exports.Optional(typebox_exports.String({ "description": "\u539F\u59CB\u8BC1\u636EURL\u6216\u5B57\u6BB5\u8DEF\u5F84" }))
4563
+ }, { "additionalProperties": false }), { "description": "\u7ED3\u6784\u5316\u6307\u6807\uFF0C\u5355\u4F4D\u3001\u53E3\u5F84\u660E\u786E\uFF0C\u7F3A\u5931\u4E0D\u586B\u96F6" })
4564
+ }, { "additionalProperties": false }), { "description": "2..30\u5BB6\u516C\u53F8\uFF0C\u8C03\u7528\u65B9\u786E\u8BA4\u53EF\u6BD4\u6027" })
4565
+ }, { "additionalProperties": false }),
4566
+ async execute(_id, params) {
4567
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["peers", "--input", path])));
4568
+ }
4569
+ });
4570
+ api.registerTool({
4571
+ name: "analyze_disclosure_changes",
4572
+ description: "\u65E0\u72B6\u6001\u516C\u544A\u8D22\u62A5\u6BD4\u8F83\uFF1A\u4F20\u65B0\u65E7\u6B63\u6587\u53CA\u6307\u6807\uFF0C\u8FD4\u56DE\u53D8\u66F4\u884C\u53F7\u3001\u6765\u6E90\u4E0E\u8D22\u52A1\u53D8\u5316\uFF1B\u8D1F/\u96F6\u57FA\u6570\u589E\u957F\u7387\u4E3Anull\u3002\u4E0D\u4E0B\u8F7DPDF\u3001\u4E0D\u4EE3\u66FF\u7ECF\u6D4E\u89E3\u8BFB\u3002",
4573
+ parameters: typebox_exports.Object({
4574
+ previous: typebox_exports.Object({
4575
+ text: typebox_exports.String({ "description": "\u5DF2\u6838\u5B9E\u6B63\u6587\uFF0C\u6700\u591A200000\u5B57\u7B26\uFF1B\u4FDD\u7559\u6362\u884C\uFF0CPDF\u9700\u5BBF\u4E3B\u63D0\u53D6" }),
4576
+ source: typebox_exports.String({ "description": "\u539F\u6587URL\u6216\u6587\u6863\u6807\u8BC6" }),
4577
+ period: typebox_exports.String({ "description": "\u62A5\u544A\u671F\uFF0C\u59822025\u5E74\u5EA6" }),
4578
+ metrics: typebox_exports.Array(typebox_exports.Object({
4579
+ name: typebox_exports.String({ "description": "\u6307\u6807\u540D\uFF0C\u5982pe/roe/net_income" }),
4580
+ value: typebox_exports.Union([typebox_exports.Number(), typebox_exports.Null()], { "description": "\u6709\u9650\u6570\u503C\uFF1B\u7F3A\u5931\u4E3Anull" }),
4581
+ unit: typebox_exports.String({ "description": "\u7CBE\u786E\u5355\u4F4D\uFF0C\u5982multiple/percent/fraction/CNY/USD" }),
4582
+ basis: typebox_exports.String({ "description": "\u53E3\u5F84\uFF0C\u5982TTM/annual/consolidated\uFF1B\u533A\u5206\u7D2F\u8BA1\u4E0E\u5355\u5B63" }),
4583
+ source: typebox_exports.Optional(typebox_exports.String({ "description": "\u539F\u59CB\u8BC1\u636EURL\u6216\u5B57\u6BB5\u8DEF\u5F84" }))
4584
+ }, { "additionalProperties": false }), { "description": "\u7ED3\u6784\u5316\u6307\u6807\uFF0C\u5355\u4F4D\u3001\u53E3\u5F84\u660E\u786E\uFF0C\u7F3A\u5931\u4E0D\u586B\u96F6" })
4585
+ }, { "additionalProperties": false }),
4586
+ current: typebox_exports.Object({
4587
+ text: typebox_exports.String({ "description": "\u5DF2\u6838\u5B9E\u6B63\u6587\uFF0C\u6700\u591A200000\u5B57\u7B26\uFF1B\u4FDD\u7559\u6362\u884C\uFF0CPDF\u9700\u5BBF\u4E3B\u63D0\u53D6" }),
4588
+ source: typebox_exports.String({ "description": "\u539F\u6587URL\u6216\u6587\u6863\u6807\u8BC6" }),
4589
+ period: typebox_exports.String({ "description": "\u62A5\u544A\u671F\uFF0C\u59822025\u5E74\u5EA6" }),
4590
+ metrics: typebox_exports.Array(typebox_exports.Object({
4591
+ name: typebox_exports.String({ "description": "\u6307\u6807\u540D\uFF0C\u5982pe/roe/net_income" }),
4592
+ value: typebox_exports.Union([typebox_exports.Number(), typebox_exports.Null()], { "description": "\u6709\u9650\u6570\u503C\uFF1B\u7F3A\u5931\u4E3Anull" }),
4593
+ unit: typebox_exports.String({ "description": "\u7CBE\u786E\u5355\u4F4D\uFF0C\u5982multiple/percent/fraction/CNY/USD" }),
4594
+ basis: typebox_exports.String({ "description": "\u53E3\u5F84\uFF0C\u5982TTM/annual/consolidated\uFF1B\u533A\u5206\u7D2F\u8BA1\u4E0E\u5355\u5B63" }),
4595
+ source: typebox_exports.Optional(typebox_exports.String({ "description": "\u539F\u59CB\u8BC1\u636EURL\u6216\u5B57\u6BB5\u8DEF\u5F84" }))
4596
+ }, { "additionalProperties": false }), { "description": "\u7ED3\u6784\u5316\u6307\u6807\uFF0C\u5355\u4F4D\u3001\u53E3\u5F84\u660E\u786E\uFF0C\u7F3A\u5931\u4E0D\u586B\u96F6" })
4597
+ }, { "additionalProperties": false }),
4598
+ max_changes: typebox_exports.Optional(typebox_exports.Number({ "description": "\u53D8\u5316\u4E0A\u96501..100\uFF0C\u9ED8\u8BA430" }))
4599
+ }, { "additionalProperties": false }),
4600
+ async execute(_id, params) {
4601
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["disclosure", "--input", path])));
4602
+ }
4603
+ });
4604
+ api.registerTool({
4605
+ name: "analyze_portfolio_risk",
4606
+ description: "\u65E0\u72B6\u6001\u73B0\u8D27\u591A\u5934\u7EC4\u5408\u98CE\u9669\uFF1A\u8F93\u5165\u6301\u4ED3\u3001\u57FA\u51C6\u5E01\u79CD\u73B0\u91D1\u4E0E\u6C47\u7387\uFF0C\u8FD4\u56DE\u96C6\u4E2D\u5EA6\u3001\u5E01\u79CD/\u884C\u4E1A\u655E\u53E3\u3001\u4EF7\u683C\u76C8\u4E8F\u548C\u6B62\u635F\u60C5\u666F\u3002\u7F3A\u6C47\u7387\u62A5\u9519\uFF1B\u4E0D\u4FDD\u5B58\u8D26\u6237\u3002",
4607
+ parameters: typebox_exports.Object({
4608
+ positions: typebox_exports.Array(typebox_exports.Object({
4609
+ symbol: typebox_exports.String({ "description": "\u552F\u4E00\u4EE3\u7801\uFF0C\u91CD\u590D\u6301\u4ED3\u5148\u6C47\u603B" }),
4610
+ quantity: typebox_exports.Number({ "description": "\u6B63\u6301\u4ED3\u6570\u91CF" }),
4611
+ price: typebox_exports.Number({ "description": "\u6B63\u73B0\u4EF7" }),
4612
+ currency: typebox_exports.String({ "description": "\u6301\u4ED3\u5E01\u79CD\uFF0C\u5982CNY/USD/HKD" }),
4613
+ cost: typebox_exports.Optional(typebox_exports.Number({ "description": "\u540C\u5E01\u79CD\u6B63\u6210\u672C\u4EF7\uFF0C\u53EF\u9009" })),
4614
+ stop_price: typebox_exports.Optional(typebox_exports.Number({ "description": "\u540C\u5E01\u79CD\u6B63\u6B62\u635F\u4EF7\uFF0C\u53EF\u9009" })),
4615
+ sector: typebox_exports.Optional(typebox_exports.String({ "description": "\u7EDF\u4E00\u884C\u4E1A\u5206\u7C7B\uFF0C\u53EF\u9009" })),
4616
+ as_of: typebox_exports.Optional(typebox_exports.String({ "description": "\u5B9E\u9645\u4F30\u503C\u65F6\u70B9\uFF0C\u5EFA\u8BAEISO8601" }))
4617
+ }, { "additionalProperties": false }), { "description": "1..100\u4E2A\u73B0\u8D27\u591A\u5934\u6301\u4ED3" }),
4618
+ base_currency: typebox_exports.String({ "description": "\u57FA\u51C6\u5E01\u79CD" }),
4619
+ cash: typebox_exports.Number({ "description": "\u57FA\u51C6\u5E01\u79CD\u73B0\u91D1\uFF0C\u975E\u8D1F" }),
4620
+ fx_rates: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4621
+ currency: typebox_exports.String({ "description": "\u552F\u4E00\u975E\u57FA\u51C6\u5E01\u79CD" }),
4622
+ rate: typebox_exports.Number({ "description": "\u4E00\u5355\u4F4D\u8BE5\u5E01\u79CD\u5BF9\u5E94\u591A\u5C11\u57FA\u51C6\u5E01\u79CD\uFF0C\u6B63\u6570" })
4623
+ }, { "additionalProperties": false }), { "description": "\u663E\u5F0F\u73B0\u4EF7\u6C47\u7387\uFF1B\u57FA\u51C6\u5E01\u79CD\u9690\u542B1\uFF0C\u4E0D\u5F97\u91CD\u590D" })),
4624
+ histories: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4625
+ symbol: typebox_exports.String({ "description": "\u5BF9\u5E94\u552F\u4E00\u6301\u4ED3\u80A1\u7968" }),
4626
+ prices: typebox_exports.Array(typebox_exports.Object({
4627
+ date: typebox_exports.String({ "description": "YYYY-MM-DD\uFF0C\u552F\u4E00\u65E5\u671F" }),
4628
+ close: typebox_exports.Number({ "description": "\u6B63\u6709\u9650\u6536\u76D8\u4EF7" })
4629
+ }, { "additionalProperties": false }), { "description": "\u5B8C\u6574\u65E5K\u6536\u76D8\u5E8F\u5217\uFF0C2..20000\u6761\uFF0C\u4E0D\u5F97\u8DE8\u80A1\u7968\u6216\u6DF7\u7528\u590D\u6743\u53E3\u5F84" })
4630
+ }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u5386\u53F2\uFF0C\u5171\u540C\u65E5\u671F\u672C\u5E01\u4EF7\u683C\u6536\u76CA\u76F8\u5173\u6027\uFF0C\u4E0D\u8BA1\u6C47\u7387" }))
4631
+ }, { "additionalProperties": false }),
4632
+ async execute(_id, params) {
4633
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["portfolio", "--input", path])));
4634
+ }
4635
+ });
4636
+ api.registerTool({
4637
+ name: "calculate_position_size",
4638
+ description: "\u65E0\u72B6\u6001\u591A\u5934\u4ED3\u4F4D\u9884\u7B97\uFF1A\u540C\u5E01\u79CD\u91D1\u989D\uFF0C\u6309\u73B0\u91D1/\u98CE\u9669\u9884\u7B97/\u6700\u5927\u4ED3\u4F4D/\u4EA4\u6613\u5355\u4F4D\u53D6\u6700\u5C0F\u6570\u91CF\uFF0C\u53CC\u8FB9\u8D39\u7528\u548C\u6ED1\u70B9\u53C2\u4E0E\u6B62\u635F\u60C5\u666F\uFF1B\u4E0D\u6267\u884C\u4EA4\u6613\u3002",
4639
+ parameters: typebox_exports.Object({
4640
+ equity: typebox_exports.Number({ "description": "\u603B\u6743\u76CA\uFF0C\u6B63\u6570" }),
4641
+ cash: typebox_exports.Number({ "description": "\u53EF\u7528\u73B0\u91D1\uFF0C0..equity" }),
4642
+ entry_price: typebox_exports.Number({ "description": "\u8BA1\u5212\u5165\u573A\u4EF7\uFF0C\u6B63\u6570" }),
4643
+ stop_price: typebox_exports.Number({ "description": "\u6B63\u6B62\u635F\u4EF7\uFF0C\u4F4E\u4E8E\u5165\u573A\u4EF7" }),
4644
+ risk_fraction: typebox_exports.Number({ "description": "\u5355\u7B14\u98CE\u9669\u5360\u6743\u76CA\u6BD4\u4F8B0..1\uFF0C\u59820.01" }),
4645
+ lot_size: typebox_exports.Number({ "description": "\u6B63\u6574\u6570\u4EA4\u6613\u5355\u4F4D\uFF0C\u7528\u6237\u786E\u8BA4\uFF0C\u4E0D\u731C\u6E2F\u80A1\u6BCF\u624B\u6570\u91CF" }),
4646
+ max_position_fraction: typebox_exports.Optional(typebox_exports.Number({ "description": "\u672C\u6B21\u4E70\u5165\u6700\u5927\u8D44\u91D1\u5360\u6BD40..1\uFF0C\u9ED8\u8BA41\uFF1B\u5DF2\u6709\u540C\u80A1\u6301\u4ED3\u5148\u6263\u51CF\u989D\u5EA6" })),
4647
+ fee_rate: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6BCF\u8FB9\u6BD4\u4F8B\u8D39\u75280..0.1\uFF0C\u9ED8\u8BA40\uFF1B\u4E0D\u542B\u672A\u63D0\u4F9B\u7A0E\u8D39/\u6700\u4F4E\u6536\u8D39" })),
4648
+ slippage_rate: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6BCF\u8FB9\u6ED1\u70B90..0.1\uFF0C\u9ED8\u8BA40" }))
4649
+ }, { "additionalProperties": false }),
4650
+ async execute(_id, params) {
4651
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["position_size", "--input", path])));
4652
+ }
4653
+ });
4654
+ api.registerTool({
4655
+ name: "analyze_event_study",
4656
+ description: "\u65E0\u72B6\u6001\u4E8B\u4EF6\u7814\u7A76\uFF1A\u63D0\u4F9B\u540C\u5E02\u573A\u80A1\u7968\u53CA\u57FA\u51C6\u5B8C\u6574\u4EF7\u683C\u3001\u4E8B\u4EF6\u65E5\u671F\uFF1B\u4E8B\u4EF6\u524D\u4E00\u4EA4\u6613\u65E5\u6536\u76D8\u4E3A\u57FA\u70B9\uFF0C\u8BA1\u7B97\u4EA4\u6613\u65E5\u7A97\u53E3\u6536\u76CA\u5DEE\u3002\u7F3A\u7A97\u53E3/\u57FA\u51C6\u4E3Anull\uFF0C\u6807\u6CE8\u91CD\u53E0\uFF0C\u4E0D\u63A8\u65AD\u56E0\u679C\u3002",
4657
+ parameters: typebox_exports.Object({
4658
+ prices: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4659
+ date: typebox_exports.String({ "description": "YYYY-MM-DD\uFF0C\u552F\u4E00\u65E5\u671F" }),
4660
+ close: typebox_exports.Number({ "description": "\u6B63\u6709\u9650\u6536\u76D8\u4EF7" })
4661
+ }, { "additionalProperties": false }), { "description": "\u5B8C\u6574\u65E5K\u6536\u76D8\u5E8F\u5217\uFF0C2..20000\u6761\uFF0C\u4E0D\u5F97\u8DE8\u80A1\u7968\u6216\u6DF7\u7528\u590D\u6743\u53E3\u5F84" })),
4662
+ benchmark_prices: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4663
+ date: typebox_exports.String({ "description": "YYYY-MM-DD\uFF0C\u552F\u4E00\u65E5\u671F" }),
4664
+ close: typebox_exports.Number({ "description": "\u6B63\u6709\u9650\u6536\u76D8\u4EF7" })
4665
+ }, { "additionalProperties": false }), { "description": "\u5B8C\u6574\u65E5K\u6536\u76D8\u5E8F\u5217\uFF0C2..20000\u6761\uFF0C\u4E0D\u5F97\u8DE8\u80A1\u7968\u6216\u6DF7\u7528\u590D\u6743\u53E3\u5F84" })),
4666
+ event_dates: typebox_exports.Array(typebox_exports.String({ "description": "YYYY-MM-DD\uFF0C\u76D8\u540E\u516C\u544A\u4F20\u4E0B\u4E00\u4EA4\u6613\u65E5" }), { "description": "1..100\u4E2A\u552F\u4E00\u4E8B\u4EF6\u65E5" }),
4667
+ price_basis: typebox_exports.Optional(typebox_exports.String({ "description": "\u4EC5\u663E\u5F0Fprices\u6A21\u5F0F\u5FC5\u9700\uFF1B\u4EE3\u7801\u6A21\u5F0F\u62A5\u544A\u5B9E\u9645\u63D0\u4F9B\u65B9\u6807\u8BB0\uFF0C\u7F3A\u5931\u4E3Aunknown\uFF0C\u987B\u6838\u5B9E" })),
4668
+ horizons: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Number({ "description": "0=\u4E8B\u4EF6\u65E5\uFF0C1=\u4E0B\u4E00\u4EA4\u6613\u65E5\uFF1B\u6574\u65700..250" }), { "description": "1..20\u4E2A\u7A97\u53E3\uFF0C\u9ED8\u8BA40/1/5/10/20" })),
4669
+ start_date: typebox_exports.Optional(typebox_exports.String({ "description": "\u4EE3\u7801\u6A21\u5F0F\u5FC5\u9700\uFF0CYYYY-MM-DD\uFF0C\u5305\u542B\u4E8B\u4EF6\u524D\u57FA\u51C6\u65E5\u6216\u8BAD\u7EC3\u7A97\u53E3" })),
4670
+ end_date: typebox_exports.Optional(typebox_exports.String({ "description": "\u4EE3\u7801\u6A21\u5F0F\u5FC5\u9700\uFF0CYYYY-MM-DD\uFF0C\u665A\u4E8Estart_date" })),
4671
+ symbol: typebox_exports.Optional(typebox_exports.String({ "description": "\u80A1\u7968\u4EE3\u7801\uFF1B\u4E0Ebenchmark/start_date/end_date\u4E00\u8D77\u76F4\u63A5\u53D6\u6570\uFF0C\u548Cprices\u6A21\u5F0F\u4E92\u65A5" })),
4672
+ benchmark: typebox_exports.Optional(typebox_exports.String({ "description": "\u540C\u5E02\u573A\u57FA\u51C6\u4EE3\u7801\uFF1B\u4E0Esymbol\u4E00\u8D77\u4F7F\u7528" }))
4673
+ }, { "additionalProperties": false }),
4674
+ async execute(_id, params) {
4675
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["event_study", "--input", path])));
4676
+ }
4677
+ });
4678
+ api.registerTool({
4679
+ name: "validate_backtest",
4680
+ description: "\u65E0\u72B6\u6001\u56DE\u6D4B\u7A33\u5065\u6027\uFF1A\u8F93\u5165\u5386\u53F2OHLCV\u548C\u5B8C\u6574\u5019\u9009DSL\uFF1B\u6EDA\u52A8\u8BAD\u7EC3\u9009\u53C2\u6570\u3001\u540E\u7EED\u4E0D\u91CD\u53E0\u7A97\u53E3\u9A8C\u8BC1\uFF0C\u5217\u51FA\u5168\u90E8\u6837\u672C\u5185\u654F\u611F\u6027\u53CA\u8DE8\u6807\u7684\u7ED3\u679C\u3002\u4EC5next_open\uFF0C\u4E0D\u81EA\u52A8\u4F18\u5316\u6216\u4FDD\u5B58\u3002",
4681
+ parameters: typebox_exports.Object({
4682
+ datasets: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4683
+ symbol: typebox_exports.String({ "description": "\u552F\u4E00\u80A1\u7968\u4EE3\u7801" }),
4684
+ price_basis: typebox_exports.String({ "description": "\u5DF2\u6838\u5B9E\u590D\u6743/\u539F\u59CB\u4EF7\u683C\u53E3\u5F84" }),
4685
+ bars: typebox_exports.Array(typebox_exports.Object({
4686
+ date: typebox_exports.String({ "description": "YYYY-MM-DD" }),
4687
+ open: typebox_exports.Number({ "description": "\u6709\u9650OHLCV\uFF1B\u4EF7\u683C\u4E3A\u6B63\u3001volume\u975E\u8D1F" }),
4688
+ high: typebox_exports.Number({ "description": "\u6709\u9650OHLCV\uFF1B\u4EF7\u683C\u4E3A\u6B63\u3001volume\u975E\u8D1F" }),
4689
+ low: typebox_exports.Number({ "description": "\u6709\u9650OHLCV\uFF1B\u4EF7\u683C\u4E3A\u6B63\u3001volume\u975E\u8D1F" }),
4690
+ close: typebox_exports.Number({ "description": "\u6709\u9650OHLCV\uFF1B\u4EF7\u683C\u4E3A\u6B63\u3001volume\u975E\u8D1F" }),
4691
+ volume: typebox_exports.Number({ "description": "\u6709\u9650OHLCV\uFF1B\u4EF7\u683C\u4E3A\u6B63\u3001volume\u975E\u8D1F" })
4692
+ }, { "additionalProperties": false }), { "description": "\u65E5\u671F\u9012\u589E\u5B8C\u6574OHLCV\uFF0C\u6BCF\u7EC4\u6700\u591A2000\u6761\uFF0C\u81F3\u5C11train_bars+test_bars" })
4693
+ }, { "additionalProperties": false }), { "description": "1..5\u4E2A\u6807\u7684\uFF0C\u590D\u7528get_kline\u53D6\u6570" })),
4694
+ strategies: typebox_exports.Array(typebox_exports.Object({
4695
+ name: typebox_exports.String({ "description": "\u552F\u4E00\u5019\u9009\u540D" }),
4696
+ strategy: typebox_exports.Object({}, { "additionalProperties": true, "description": "\u5B8C\u6574\u65E2\u6709YAML DSL\u5BF9\u5E94JSON\uFF0C\u5141\u8BB8parameters\u5F15\u7528\uFF1B\u4EC5next_open" })
4697
+ }, { "additionalProperties": false }), { "description": "1..5\u4E2A\u9884\u5148\u786E\u5B9A\u7684\u5019\u9009\uFF0C\u7981\u6B62\u6D4B\u8BD5\u7ED3\u679C\u56DE\u8C03\u53C2\u6570" }),
4698
+ train_bars: typebox_exports.Optional(typebox_exports.Number({ "description": "\u8BAD\u7EC3\u4EA4\u6613\u65E5\u657030..1000\uFF0C\u9ED8\u8BA4126" })),
4699
+ test_bars: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6D4B\u8BD5\u4EA4\u6613\u65E5\u657030..1000\uFF0C\u9ED8\u8BA463" })),
4700
+ capital: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6BCF\u7A97\u53E3\u521D\u59CB\u8D44\u91D1\uFF0C\u9ED8\u8BA41000000" })),
4701
+ start_date: typebox_exports.Optional(typebox_exports.String({ "description": "\u4EE3\u7801\u6A21\u5F0F\u5FC5\u9700\uFF0CYYYY-MM-DD\uFF0C\u5305\u542B\u4E8B\u4EF6\u524D\u57FA\u51C6\u65E5\u6216\u8BAD\u7EC3\u7A97\u53E3" })),
4702
+ end_date: typebox_exports.Optional(typebox_exports.String({ "description": "\u4EE3\u7801\u6A21\u5F0F\u5FC5\u9700\uFF0CYYYY-MM-DD\uFF0C\u665A\u4E8Estart_date" })),
4703
+ symbols: typebox_exports.Optional(typebox_exports.Array(typebox_exports.String(), { "description": "1..5\u4E2A\u552F\u4E00\u80A1\u7968\u4EE3\u7801\uFF0C\u914D\u5408start_date/end_date\u76F4\u63A5\u53D6\u6570\uFF1B\u548Cdatasets\u4E92\u65A5" }))
4704
+ }, { "additionalProperties": false }),
4705
+ async execute(_id, params) {
4706
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["robustness", "--input", path])));
4707
+ }
4708
+ });
4709
+ api.registerTool({
4710
+ name: "compare_analysis_snapshots",
4711
+ description: "\u65E0\u72B6\u6001\u5FEB\u7167\u6BD4\u8F83\uFF1A\u4F20\u65B0\u65E7JSON\uFF0C\u8FD4\u56DEJSON Pointer\u53CA\u65B0\u589E/\u5220\u9664/\u53D8\u5316/\u5931\u6548/\u6062\u590D\uFF1B\u4E0D\u4FDD\u5B58\u5FEB\u7167\u3002\u6570\u7EC4\u6574\u4F53\u6BD4\u8F83\uFF0C\u8C03\u7528\u524D\u6309symbol\u5BF9\u9F50\u3002",
4712
+ parameters: typebox_exports.Object({
4713
+ previous: typebox_exports.Object({}, { "additionalProperties": true, "description": "JSON\u5BF9\u8C61\uFF0C\u8BE6\u89C1\u5171\u4EABSkill\u4E0EREADME" }),
4714
+ current: typebox_exports.Object({}, { "additionalProperties": true, "description": "JSON\u5BF9\u8C61\uFF0C\u8BE6\u89C1\u5171\u4EABSkill\u4E0EREADME" })
4715
+ }, { "additionalProperties": false }),
4716
+ async execute(_id, params) {
4717
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["snapshot", "--input", path])));
4718
+ }
4719
+ });
4720
+ api.registerTool({
4721
+ name: "get_announcements",
4722
+ description: "\u67E5\u8BE2A\u80A1\u5DE8\u6F6E\u516C\u544A\u6807\u9898\u3001\u65E5\u671F\u3001\u7C7B\u578B\u548C\u539F\u6587PDF\u94FE\u63A5\uFF1B\u6309\u65E5\u671F\u8303\u56F4/\u7C7B\u522B\u7B5B\u9009\uFF0C\u9ED8\u8BA4\u8FD190\u5929\uFF0Ctop=1..500\u3002\u7B2C\u4E00\u7248\u4E0D\u63D0\u53D6\u6B63\u6587\uFF0Ctruncated\u63D0\u793A\u622A\u65AD\u3002",
4723
+ parameters: typebox_exports.Object({
4724
+ symbol: typebox_exports.String({ description: "A\u80A1\u4EE3\u7801" }),
4725
+ category: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("all"), typebox_exports.Literal("forecast"), typebox_exports.Literal("express"), typebox_exports.Literal("annual"), typebox_exports.Literal("interim"), typebox_exports.Literal("quarterly"), typebox_exports.Literal("reduction"), typebox_exports.Literal("issuance"), typebox_exports.Literal("inquiry"), typebox_exports.Literal("dividend")], { description: "\u516C\u544A\u7C7B\u522B\uFF0C\u9ED8\u8BA4all" })),
4726
+ start_date: typebox_exports.Optional(typebox_exports.String({ description: "\u5F00\u59CB\u65E5\u671FYYYY-MM-DD\uFF0C\u9ED8\u8BA4\u7ED3\u675F\u65E5\u671F\u524D90\u5929" })),
4727
+ end_date: typebox_exports.Optional(typebox_exports.String({ description: "\u7ED3\u675F\u65E5\u671FYYYY-MM-DD\uFF0C\u9ED8\u8BA4\u4ECA\u5929" })),
4728
+ top: typebox_exports.Optional(typebox_exports.Number({ description: "\u6700\u591A\u6761\u65701..500\uFF0C\u9ED8\u8BA450" }))
4729
+ }),
4730
+ async execute(_id, p) {
4731
+ const out = await runPy("value_data.py", ["announcements", p.symbol, "--category", p.category ?? "all", "--start-date", p.start_date ?? "", "--end-date", p.end_date ?? "", "--top", String(p.top ?? 50)]);
4732
+ return asText(out);
4733
+ }
4734
+ });
4735
+ api.registerTool({
4736
+ name: "get_us_holdings",
4737
+ description: "\u67E5\u8BE2SEC 13F\uFF1Amode=auto\u9ED8\u8BA4\u670913F\u7533\u62A5\u65F6\u67E5\u673A\u6784\uFF0C\u5426\u5219\u6309\u53D1\u884C\u4EBACIK\u53CD\u67E5\u6301\u4ED3\u673A\u6784\uFF1Bmanager/issuer\u53EF\u663E\u5F0F\u6307\u5B9A\u3002\u53D1\u884C\u4EBA\u901A\u8FC7\u5B98\u65B913D/G\u7CBE\u786E\u6620\u5C04CUSIP\uFF0C\u626B\u63CF\u6700\u65B0\u5DF2\u53D1\u5E0313F\u7A97\u53E3\uFF0C\u5904\u7406\u91CD\u8FF0/\u8865\u5145\u4FEE\u8BA2\uFF0C\u8FD4\u56DE\u5B9E\u9645\u62A5\u544A\u671F\u3001\u622A\u6B62\u65E5\u53CA\u6620\u5C04\u8986\u76D6\u3002\u9996\u6B21\u7EA6100MB\u4E0B\u8F7D\uFF0C\u540E\u7EED\u7F13\u5B58\uFF1B\u65E0\u6620\u5C04\u660E\u786E\u62A5\u9519\uFF0C\u4E0D\u505A\u540D\u79F0\u731C\u6D4B\u3002\u9700SEC_USER_AGENT\u542B\u771F\u5B9E\u8054\u7CFB\u90AE\u7BB1\uFF0C\u4E0D\u662F\u5B9E\u65F6\u6216\u5168\u90E8\u8BC1\u5238\u6301\u4ED3\u3002",
4738
+ parameters: typebox_exports.Object({
4739
+ cik: typebox_exports.String({ description: "\u673A\u6784\u6216\u53D1\u884C\u4EBACIK\uFF0C1..10\u4F4D\u6570\u5B57\uFF0C\u59820001067983/0000320193" }),
4740
+ mode: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("auto"), typebox_exports.Literal("manager"), typebox_exports.Literal("issuer")], { description: "\u9ED8\u8BA4auto\uFF1Bmanager\u67E5\u673A\u6784\u7EC4\u5408\uFF0Cissuer\u53CD\u67E5\u53D1\u884C\u4EBA\u6301\u4ED3\u673A\u6784" }))
4741
+ }),
4742
+ async execute(_id, p) {
4743
+ const out = await runPy("sec_edgar.py", ["holdings", p.cik, ...p.mode ? ["--mode", p.mode] : []]);
4744
+ return asText(out);
4745
+ }
4746
+ });
4747
+ api.registerTool({
4748
+ name: "get_insider_trades",
4749
+ description: "\u67E5\u8BE2\u7F8E\u80A1\u53D1\u884C\u4EBA\u8FD1\u671FForm 4/4-A\u5185\u90E8\u4EBA\u4EA4\u6613\uFF08SEC\u5B98\u65B9XML\uFF09\uFF0C\u4FDD\u7559\u4EBA\u5458\u804C\u52A1\u3001\u4EA4\u6613\u4EE3\u7801\u3001\u4E70\u5356\u65B9\u5411\u3001\u6570\u91CF\u3001\u4EF7\u683C\u3001\u811A\u6CE8\u548C\u884D\u751F\u54C1\u6807\u5FD7\u3002\u9700SEC_USER_AGENT\u542B\u771F\u5B9E\u8054\u7CFB\u90AE\u7BB1\uFF1Bdays\u6309\u7533\u62A5\u65E5\u671F\u7B5B\u9009\uFF0Ctop\u9650\u5236\u6587\u4EF6\u6570\uFF0C\u4FEE\u8BA2\u52FF\u91CD\u590D\u8BA1\u6570\u3002",
4750
+ parameters: typebox_exports.Object({
4751
+ symbol: typebox_exports.String({ description: "\u7F8E\u80A1ticker\u6216\u53D1\u884C\u4EBACIK" }),
4752
+ days: typebox_exports.Optional(typebox_exports.Number({ description: "\u7533\u62A5\u65E5\u671F\u7A97\u53E31..365\u5929\uFF0C\u9ED8\u8BA490" })),
4753
+ top: typebox_exports.Optional(typebox_exports.Number({ description: "\u6700\u591A\u89E3\u6790Form 4\u6587\u4EF6\u65701..20\uFF0C\u9ED8\u8BA410" }))
4754
+ }),
4755
+ async execute(_id, p) {
4756
+ const out = await runPy("sec_edgar.py", ["insider_trades", p.symbol, "--days", String(p.days ?? 90), "--top", String(p.top ?? 10)]);
4757
+ return asText(out);
4758
+ }
4759
+ });
4459
4760
  api.registerTool({
4460
4761
  name: "get_valuation_history",
4461
- description: "\u67E5\u8BE2A/HK\u80A1\u7968\u5386\u53F2 PE-TTM/PB\u3001\u5F53\u524D\u6B63\u503C\u5206\u4F4D\u548C10/25/50/75/90\u5206\u4F4D Band\uFF0C\u8FD4\u56DE\u5B9E\u9645\u91C7\u6837\u533A\u95F4\uFF1B\u4E8F\u635F\u4F30\u503C\u5206\u4F4D\u4E3Anull\u3002years=1..10\uFF0C\u6570\u636E\u6309\u5929\u7F13\u5B58\u3002",
4762
+ description: "\u67E5\u8BE2A/HK\u80A1\u7968\u5386\u53F2PE-TTM/PB\u3001\u5F53\u524D\u6B63\u503C\u5206\u4F4D\u548C10/25/50/75/90\u5206\u4F4DBand\uFF0C\u8FD4\u56DE\u5B9E\u9645\u91C7\u6837\u533A\u95F4\uFF1B\u4E8F\u635F\u4F30\u503C\u5206\u4F4D\u4E3Anull\u3002years=1..10\uFF0C\u6309\u5929\u7F13\u5B58\u3002HK\u914D\u7F6ELIXINGER_TOKEN\u65F6\u4F18\u5148\u7406\u674F\u4EC1\u975E\u91D1\u878D\u516C\u53F8\u65E5\u5386\u53F2\uFF0C\u5931\u8D25\u964D\u7EA7\u767E\u5EA6\uFF0C\u4E0D\u6DF7\u63A5\u6765\u6E90\u3002",
4462
4763
  parameters: typebox_exports.Object({
4463
4764
  symbol: typebox_exports.String({ description: "A\u80A1\u4EE3\u7801\u6216\u6E2F\u80A1.HK\u4EE3\u7801" }),
4464
4765
  years: typebox_exports.Optional(typebox_exports.Number({ description: "\u5386\u53F2\u7A97\u53E3\u5E74\u65701..10\uFF0C\u9ED8\u8BA45" }))
@@ -4537,7 +4838,7 @@ var index_default = definePluginEntry({
4537
4838
  });
4538
4839
  api.registerTool({
4539
4840
  name: "get_kline",
4540
- description: "\u83B7\u53D6\u80A1\u7968K\u7EBF\u6570\u636E\uFF08OHLCV\uFF09\u3002\u652F\u6301A\u80A1\uFF08\u5982600519\uFF09\u3001\u6E2F\u80A1\uFF08\u598200700.HK\uFF09\u3001\u7F8E\u80A1\uFF08\u5982AAPL\uFF09\u3001\u65E5\u80A1\uFF08\u59827203.T\uFF09\u3001\u97E9\u80A1\uFF08\u5982005930.KS\uFF09\u3001\u53F0\u80A1\uFF08\u59822330.TW\uFF09\u53CAA\u80A1ETF\u3002A\u80A1\u80A1\u7968/ETF\u8FD4\u56DE\u524D\u590D\u6743\u4EF7\u683C\uFF0C\u6BCF\u6761\u8BB0\u5F55 adjusted=qfq\uFF1Bsh000xxx/sz399xxx \u6307\u6570\u8FD4\u56DE\u539F\u59CB\u70B9\u4F4D\uFF0Cadjusted=none\u3002\u9700\u8981\u5386\u53F2\u4EF7\u683C\u81EA\u884C\u8BA1\u7B97\u6216\u753B\u56FE\u65F6\u7528\uFF1B\u53EA\u95EE\u6307\u6807\u7528 get_technical_analysis\uFF0C\u53EA\u95EE\u73B0\u4EF7\u7528 get_quote",
4841
+ description: "\u83B7\u53D6\u80A1\u7968K\u7EBF\u6570\u636E\uFF08OHLCV\uFF09\u3002\u652F\u6301A\u80A1\uFF08\u5982600519\uFF09\u3001\u6E2F\u80A1\uFF08\u598200700.HK\uFF09\u3001\u7F8E\u80A1\uFF08\u5982AAPL\uFF09\u3001\u65E5\u80A1\uFF08\u59827203.T\uFF09\u3001\u97E9\u80A1\uFF08\u5982005930.KS\uFF09\u3001\u53F0\u80A1\uFF08\u59822330.TW\uFF09\u53CAA\u80A1ETF\u3002A\u80A1\u80A1\u7968/ETF\u8FD4\u56DE\u524D\u590D\u6743\u4EF7\u683C\uFF0C\u6BCF\u6761\u8BB0\u5F55 adjusted=qfq\uFF1Bsh000xxx/sz399xxx \u6307\u6570\u8FD4\u56DE\u539F\u59CB\u70B9\u4F4D\uFF0Cadjusted=none\u3002\u9700\u8981\u5386\u53F2\u4EF7\u683C\u81EA\u884C\u8BA1\u7B97\u6216\u753B\u56FE\u65F6\u7528\uFF1B\u53EA\u95EE\u6307\u6807\u7528 get_technical_analysis\uFF0C\u53EA\u95EE\u73B0\u4EF7\u7528 get_quote\u3002\u6BCF\u6761\u8BB0\u5F55\u9644 source\u3001UTC fetched_at\u3001data_as_of \u548C adjusted\uFF1B\u975EA\u80A1\u590D\u6743\u53E3\u5F84\u53EF\u80FD\u4E3Atotal_return/qfq/unknown\uFF0C\u672A\u77E5\u4E0D\u80FD\u5047\u5B9A\u5DF2\u590D\u6743\u3002\u90E8\u5206\u6765\u6E90\u9644 adjustment_factor\uFF08\u590D\u6743\u4EF7\u683C/\u539F\u59CB\u4EF7\u683C\uFF09\uFF1B\u7F3A\u5931\u4E0D\u80FD\u731C\u6D4B\u6362\u7B97\u7CFB\u6570\u3002",
4541
4842
  parameters: typebox_exports.Object({
4542
4843
  symbol: typebox_exports.String({
4543
4844
  description: "\u80A1\u7968\u4EE3\u7801\uFF0C\u5982 600519\uFF08A\u80A1\uFF09\u300100700.HK\uFF08\u6E2F\u80A1\uFF09\u3001AAPL\uFF08\u7F8E\u80A1\uFF09\u30017203.T\uFF08\u65E5\u80A1\uFF09\u3001005930.KS\uFF08\u97E9\u80A1\uFF09\u30012330.TW\uFF08\u53F0\u80A1\uFF09"
@@ -4564,7 +4865,7 @@ var index_default = definePluginEntry({
4564
4865
  });
4565
4866
  api.registerTool({
4566
4867
  name: "get_quote",
4567
- description: "\u83B7\u53D6\u80A1\u7968\u5B9E\u65F6\u884C\u60C5\u62A5\u4EF7\uFF08\u73B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u91CF\u6BD4\u7B49\uFF09\u3002\u652F\u6301A\u80A1\u3001\u6E2F\u80A1\u3001\u7F8E\u80A1\u3001\u65E5\u80A1\u3001\u97E9\u80A1\u3001\u53F0\u80A1\uFF1B\u975E\u4EA4\u6613\u65F6\u6BB5\u8FD4\u56DE\u6700\u8FD1\u4EA4\u6613\u65E5\u6536\u76D8\u4EF7\u5E76\u4EE5 as_of/stale \u6807\u6CE8\uFF1BETF \u7684 premium_discount_rate \u4E3A\u6B63=\u6EA2\u4EF7\u3001\u8D1F=\u6298\u4EF7",
4868
+ description: "\u83B7\u53D6\u80A1\u7968\u5B9E\u65F6\u884C\u60C5\u62A5\u4EF7\uFF08\u73B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u91CF\u6BD4\u7B49\uFF09\u3002\u652F\u6301A\u80A1\u3001\u6E2F\u80A1\u3001\u7F8E\u80A1\u3001\u65E5\u80A1\u3001\u97E9\u80A1\u3001\u53F0\u80A1\uFF1B\u975E\u4EA4\u6613\u65F6\u6BB5\u8FD4\u56DE\u6700\u8FD1\u4EA4\u6613\u65E5\u6536\u76D8\u4EF7\u5E76\u4EE5 as_of/stale \u6807\u6CE8\uFF1BETF \u7684 premium_discount_rate \u4E3A\u6B63=\u6EA2\u4EF7\u3001\u8D1F=\u6298\u4EF7\u3002\u8FD4\u56DE source\u3001UTC fetched_at \u548C\u63D0\u4F9B\u65B9 data_as_of\uFF08\u672A\u77E5\u4E3Anull\uFF09\uFF1Bas_of_basis\u533A\u5206\u63D0\u4F9B\u65B9\u65F6\u95F4\u4E0E\u4EA4\u6613\u65E5\u5386\u63A8\u65AD\uFF0C\u91C7\u96C6\u65F6\u95F4\u4E0D\u7B49\u4E8E\u884C\u60C5\u65F6\u95F4\u3002",
4568
4869
  parameters: typebox_exports.Object({
4569
4870
  symbol: typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08A\u80A1\u5982600519\uFF0C\u7F8E\u80A1\u5982AAPL\uFF0C\u6E2F\u80A1\u598200700.HK\uFF09" })
4570
4871
  }),
@@ -4620,7 +4921,7 @@ var index_default = definePluginEntry({
4620
4921
  });
4621
4922
  api.registerTool({
4622
4923
  name: "get_financials",
4623
- description: "\u83B7\u53D6\u80A1\u7968\u8D22\u52A1\u6458\u8981\u53CA\u5386\u53F2\u8D8B\u52BF\uFF0C\u6309\u5929\u7F13\u5B58\u3002A\u80A1\u8FD4\u56DEROE/\u6BDB\u5229\u7387/\u51C0\u5229\u7387\u7B49\uFF1Bannual=true\u4E0Eperiods=10\u53D6\u5341\u5E74\u5E74\u62A5\uFF0C\u6E2F\u80A1\u5E74\u5EA6\u5386\u53F2\u6309\u6570\u636E\u6E90\u5B9E\u9645\u53EF\u5F97\u671F\u6570\u8FD4\u56DE\u3002\u4F30\u503C\u5386\u53F2\u7528get_valuation_history\uFF0C\u62AB\u9732\u6392\u671F\u7528get_earnings_calendar",
4924
+ description: "\u83B7\u53D6\u80A1\u7968\u8D22\u52A1\u6458\u8981\u53CA\u5386\u53F2\u8D8B\u52BF\uFF0C\u6309\u5929\u7F13\u5B58\u3002A\u80A1annual=true\u4E0Eperiods=10\u53D6\u5341\u5E74\u5E74\u62A5\uFF1B\u6E2F\u80A1\u53EF\u914D\u7F6ELIXINGER_TOKEN\u53D6\u975E\u91D1\u878D\u516C\u53F8\u8D22\u52A1\u5E8F\u5217\uFF0C\u4FDD\u7559\u5E01\u79CD/\u62AB\u9732\u65E5/\u5B9E\u9645\u8D22\u5E74\uFF0C\u5386\u53F2\u6BD4\u7387\u5355\u4F4Dpercent\u3002\u6709\u6548Yahoo\u9876\u5C42\u5FEB\u7167\u6309\u6574\u7EC4\u4FDD\u7559\uFF0Ccurrency\u4E3A\u8D22\u62A5\u5E01\u79CD\u3001market_cap_currency\u4E3A\u5E02\u503C\u5E01\u79CD\u3001snapshot_source\u6807\u660E\u6765\u6E90\uFF1B\u7F3A\u5931\u503C\u53CAreport_date\u4E0D\u6DF7\u5165\u5386\u53F2\u6570\u503C/\u65E5\u671F\u3002\u7F3Atoken\u6216\u65E0\u6743\u9650\u964D\u7EA7\u539F\u6709\u6765\u6E90\u5E76\u6807\u6CE8\u4E0D\u8DB3\uFF0C\u4E0D\u8865\u9020\u7F3A\u5931\u3002\u4F30\u503C\u5386\u53F2\u7528get_valuation_history\uFF0C\u62AB\u9732\u6392\u671F\u7528get_earnings_calendar",
4624
4925
  parameters: typebox_exports.Object({
4625
4926
  symbol: typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08A\u80A1\u5982600519\uFF0C\u7F8E\u80A1\u5982AAPL\uFF0C\u6E2F\u80A1\u598200700.HK\uFF09" }),
4626
4927
  annual: typebox_exports.Optional(typebox_exports.Boolean({ description: "\u53EA\u53D6\u5E74\u5EA6\u62A5\u544A\uFF0C\u9ED8\u8BA4false" })),
@@ -4929,7 +5230,7 @@ var index_default = definePluginEntry({
4929
5230
  });
4930
5231
  api.registerTool({
4931
5232
  name: "screen_stocks",
4932
- description: "\u5168\u5E02\u573A\u80A1\u7968\u7B5B\u9009\uFF08AlphaSift L1 \u591A\u56E0\u5B50\u786C\u7B5B + \u5E02\u573A\u60C5\u7EEA\u8C03\u8282\uFF09\u3002\u6309PE/PB/\u5E02\u503C/\u6362\u624B\u7387/\u6DA8\u8DCC\u5E45/\u91CF\u6BD4\u7B49\u56E0\u5B50\u8FC7\u6EE4\u548C\u8BC4\u5206\uFF0C\u53EF\u7528 l2 \u5F00\u542F\u8D28\u91CF/\u6210\u957F/\u52A8\u91CF/\u6CE2\u52A8\u7387/\u8D44\u91D1\u6D41\u589E\u5F3A",
5233
+ description: "\u5168\u5E02\u573A\u80A1\u7968\u7B5B\u9009\uFF08AlphaSift L1 \u591A\u56E0\u5B50\u786C\u7B5B + \u5E02\u573A\u60C5\u7EEA\u8C03\u8282\uFF09\u3002\u6309PE/PB/\u5E02\u503C/\u6362\u624B\u7387/\u6DA8\u8DCC\u5E45/\u91CF\u6BD4\u7B49\u56E0\u5B50\u8FC7\u6EE4\u548C\u8BC4\u5206\uFF0C\u53EF\u7528 l2 \u5F00\u542F\u8D28\u91CF/\u6210\u957F/\u52A8\u91CF/\u6CE2\u52A8\u7387/\u8D44\u91D1\u6D41\u589E\u5F3A\u3002\u663E\u5F0F\u7B5B\u9009\u6761\u4EF6\u7F3A\u5C11\u6570\u636E\u65F6\u62A5error\uFF0Cfilters_applied\u53EA\u5217\u5B9E\u9645\u6267\u884C\u7684\u6761\u4EF6\u3002\u5019\u9009factor_coverage\u5217\u51FA\u53EF\u7528/\u7F3A\u5931\u56E0\u5B50\u3001\u52A0\u6743\u8986\u76D6\u7387\u548Ceffective_weights\uFF1BL1\u4E0EL2\u5747\u6309\u53EF\u7528\u56E0\u5B50\u5F52\u4E00\u5316\u540E\u6392\u5E8F\uFF0C\u7F3A\u5931/\u975E\u6709\u9650\u503C\u4E0D\u6309\u96F6\u5206\u8BA1\uFF1BL2\u53E6\u8FD4\u56DEeffective_scores\u4F9B\u7ED3\u5408\u5E02\u573A\u7CFB\u6570\u590D\u7B97final\uFF0C\u6309\u53EF\u7528\u56E0\u5B50\u91CD\u5F52\u4E00\u5316\uFF0C\u9AD8\u5206\u4E0D\u4EE3\u8868\u6570\u636E\u5B8C\u6574\u3002\u9009\u80A1\u9884\u7B97\u6309\u5019\u9009\u6570\u91CF\u53CA\u91C7\u96C6\u6279\u6B21\u8BA1\u7B97\uFF0Ctop\u987B\u4E3A\u6B63\u6574\u6570\u3002",
4933
5234
  parameters: typebox_exports.Object({
4934
5235
  market: typebox_exports.Optional(
4935
5236
  typebox_exports.Union(
@@ -4963,7 +5264,7 @@ var index_default = definePluginEntry({
4963
5264
  });
4964
5265
  api.registerTool({
4965
5266
  name: "run_backtest",
4966
- description: "\u7B56\u7565\u56DE\u6D4B\uFF08AlphaEvo\uFF09\u3002\u8BFB\u53D6YAML\u7B56\u7565\u5B9A\u4E49\uFF0C\u5728\u5386\u53F2\u6570\u636E\u4E0A\u6A21\u62DF\u4EA4\u6613\uFF0C\u8F93\u51FA\u6536\u76CA\u7387/\u56DE\u64A4/\u80DC\u7387\u7B49\u6307\u6807\u3002\u53EA\u60F3\u77E5\u9053\u5355\u4E2A\u6280\u672F\u4FE1\u53F7\u7684\u5386\u53F2\u80DC\u7387\u7528\u66F4\u8F7B\u91CF\u7684 evaluate_signal",
5267
+ description: "\u7B56\u7565\u56DE\u6D4B\uFF08AlphaEvo\uFF09\u3002\u8BFB\u53D6YAML\u7B56\u7565\u5B9A\u4E49\uFF0C\u5728\u5386\u53F2\u6570\u636E\u4E0A\u6A21\u62DF\u4EA4\u6613\uFF0C\u8F93\u51FA\u6536\u76CA\u7387/\u56DE\u64A4/\u80DC\u7387\u7B49\u6307\u6807\u3002\u53EA\u60F3\u77E5\u9053\u5355\u4E2A\u6280\u672F\u4FE1\u53F7\u7684\u5386\u53F2\u80DC\u7387\u7528\u66F4\u8F7B\u91CF\u7684 evaluate_signal\u3002period\u4E3A\u5B9E\u9645\u6570\u636E\u671F\u95F4\uFF0Crequested_period\u4FDD\u7559\u8BF7\u6C42\u671F\u95F4\uFF0Cwarnings\u63D0\u793A\u8986\u76D6\u5DEE\u5F02\uFF1B\u5E74\u5316\u6309\u5B9E\u9645\u671F\u95F4\u8BA1\u7B97\u3002\u9ED8\u8BA4\u524D\u65E5\u6536\u76D8\u4FE1\u53F7\u3001\u6B21\u65E5\u5F00\u76D8\u6210\u4EA4\uFF1BYAML simulation.execution=same_close\u53EF\u590D\u73B0\u65E7\u5047\u8BBE\u3002execution\u8FD4\u56DE\u6A21\u578B\u3001\u963B\u6B62\u6210\u4EA4\u6B21\u6570\u548C\u672A\u6A21\u62DF\u7EA6\u675F\uFF1B\u96F6\u6210\u4EA4\u91CF\u53CA\u5E26\u5386\u53F2\u9650\u4EF7\u7684\u4E00\u5B57\u677F\u4E0D\u6210\u4EA4\u3002",
4967
5268
  parameters: typebox_exports.Object({
4968
5269
  strategy: typebox_exports.String({ description: "\u7B56\u7565YAML\u6587\u4EF6\u8DEF\u5F84" }),
4969
5270
  symbol: typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08A\u80A1\u5982600519\uFF0C\u7F8E\u80A1\u5982AAPL\uFF0C\u6E2F\u80A1\u598200700.HK\uFF09" }),
@@ -5237,7 +5538,7 @@ var index_default = definePluginEntry({
5237
5538
  });
5238
5539
  api.registerTool({
5239
5540
  name: "screen_risk",
5240
- description: "A\u80A1\u98CE\u9669\u4E13\u9879\u7B5B\u67E5 \u2014 \u68C0\u67E5\u4F30\u503C\u3001\u6280\u672F\u9884\u8B66\u3001\u89E3\u7981\u3001\u51CF\u6301\u3001\u4E1A\u7EE9\u9884\u8B66\u3001\u76D1\u7BA1\u548C\u884C\u4E1A\u653F\u7B56\uFF0C\u8FD4\u56DE\u98CE\u9669\u8BC4\u7EA7\u548C veto_buy\u3002\u65B0\u95FB\u641C\u7D22\u547D\u4E2D\u662F\u5F85\u6838\u5B9E\u7EBF\u7D22\uFF0C\u4E0D\u662F\u5DF2\u8BC1\u5B9E\u98CE\u9669",
5541
+ description: "A\u80A1\u98CE\u9669\u4E13\u9879\u7B5B\u67E5 \u2014 \u68C0\u67E5\u4F30\u503C\u3001\u6280\u672F\u9884\u8B66\u3001\u89E3\u7981\u3001\u51CF\u6301\u3001\u4E1A\u7EE9\u9884\u8B66\u3001\u76D1\u7BA1\u548C\u884C\u4E1A\u653F\u7B56\uFF0C\u8FD4\u56DE\u98CE\u9669\u8BC4\u7EA7\u548C veto_buy\u3002\u65B0\u95FB\u641C\u7D22\u547D\u4E2D\u662F\u5F85\u6838\u5B9E\u7EBF\u7D22\uFF0C\u4E0D\u662F\u5DF2\u8BC1\u5B9E\u98CE\u9669\u3002data_complete\u548Cwarnings\u6807\u660E\u8986\u76D6\uFF1B\u6570\u636E\u4E0D\u8DB3\u65F6risk_level=unknown\uFF0Crisk_score\u6216veto_buy\u53EF\u4E3Anull\uFF0C\u4E0D\u80FD\u89C6\u4E3A\u4F4E\u98CE\u9669",
5241
5542
  parameters: typebox_exports.Object({
5242
5543
  symbol: typebox_exports.String({ description: "A\u80A1\u80A1\u7968\u4EE3\u7801\uFF0C\u5982 600519" }),
5243
5544
  name: typebox_exports.Optional(
@@ -5272,7 +5573,7 @@ var index_default = definePluginEntry({
5272
5573
  });
5273
5574
  api.registerTool({
5274
5575
  name: "get_market_review",
5275
- description: "\u5927\u76D8\u590D\u76D8 \u2014 \u83B7\u53D6\u5E02\u573A\u65E5\u5EA6\u590D\u76D8\u6570\u636E\uFF0C\u5305\u542B\u6307\u6570\u3001\u6DA8\u8DCC\u7EDF\u8BA1\u3001\u677F\u5757\u6392\u540D\u3001\u65B0\u95FB\u3001\u5E02\u573A\u6E29\u5EA6\u4E0E\u7B56\u7565\u5EFA\u8BAE\u3002\u590D\u76D8\u7C7B\u9700\u6C42\u7684\u9996\u9009\uFF0C\u65E0\u9700\u518D\u5206\u522B\u8C03\u6307\u6570/\u7EDF\u8BA1/\u677F\u5757\u5DE5\u5177",
5576
+ description: "\u5927\u76D8\u590D\u76D8 \u2014 \u83B7\u53D6\u5E02\u573A\u65E5\u5EA6\u590D\u76D8\u6570\u636E\uFF0C\u5305\u542B\u6307\u6570\u3001\u6DA8\u8DCC\u7EDF\u8BA1\u3001\u677F\u5757\u6392\u540D\u3001\u65B0\u95FB\u3001\u5E02\u573A\u6E29\u5EA6\u4E0E\u7B56\u7565\u5EFA\u8BAE\u3002\u590D\u76D8\u7C7B\u9700\u6C42\u7684\u9996\u9009\uFF0C\u65E0\u9700\u518D\u5206\u522B\u8C03\u6307\u6570/\u7EDF\u8BA1/\u677F\u5757\u5DE5\u5177\u3002\u6570\u636E\u4E0D\u8DB3\u65F6\u6E29\u5EA6score\u53CAstrategy_stance\u4E3Anull\uFF0C\u4FE1\u53F7unknown\uFF1Bwarnings/data_quality\u8BF4\u660E\u9650\u5236",
5276
5577
  parameters: typebox_exports.Object({
5277
5578
  market: typebox_exports.Optional(
5278
5579
  typebox_exports.Union(
@@ -5381,7 +5682,7 @@ var index_default = definePluginEntry({
5381
5682
  });
5382
5683
  api.registerTool({
5383
5684
  name: "render_stock_report",
5384
- description: "\u80A1\u7968\u5206\u6790\u62A5\u544A\u6E32\u67D3 \u2014 \u5C06\u7ED3\u6784\u5316\u62A5\u544A JSON \u901A\u8FC7 j2 \u6A21\u677F\u6E32\u67D3\u4E3A Markdown\u3002report \u5B57\u6BB5\u4EE5 skill \u63D0\u4F9B\u7684 report_schema \u4E3A\u51C6\uFF0C\u4E0D\u8981\u81EA\u9020\u5B57\u6BB5\u3002template: brief|full\u3002\u5168\u90E8\u5206\u6790\u5B8C\u6210\u540E\u7684\u6700\u540E\u4E00\u6B65\u8C03\u7528\u3002\u4EC5\u6E32\u67D3\uFF0C\u4E0D\u4FDD\u5B58\u4E0D\u63A8\u9001",
5685
+ description: "\u80A1\u7968\u5206\u6790\u62A5\u544A\u6E32\u67D3 \u2014 \u5C06\u7ED3\u6784\u5316\u62A5\u544A JSON \u901A\u8FC7 j2 \u6A21\u677F\u6E32\u67D3\u4E3A Markdown\u3002report \u5B57\u6BB5\u4EE5 skill \u63D0\u4F9B\u7684 report_schema \u4E3A\u51C6\uFF0C\u4E0D\u8981\u81EA\u9020\u5B57\u6BB5\u3002template: brief|full\u3002\u5168\u90E8\u5206\u6790\u5B8C\u6210\u540E\u7684\u6700\u540E\u4E00\u6B65\u8C03\u7528\u3002\u4EC5\u6E32\u67D3\uFF0C\u4E0D\u4FDD\u5B58\u4E0D\u63A8\u9001\u3002report\u53EF\u5305\u542Bevidence\uFF08path/label/value/source/as_of\uFF09\u4E0Edata_quality\uFF08flags/limitations\uFF09\uFF0Cbrief/full\u5747\u5C55\u793A\u8BC1\u636E\u548C\u9650\u5236\u3002",
5385
5686
  parameters: typebox_exports.Object({
5386
5687
  report: typebox_exports.Object({}, { additionalProperties: true, description: "\u7ED3\u6784\u5316\u80A1\u7968\u62A5\u544A JSON" }),
5387
5688
  template: typebox_exports.Optional(
@@ -5433,7 +5734,7 @@ var index_default = definePluginEntry({
5433
5734
  });
5434
5735
  api.registerTool({
5435
5736
  name: "build_watchlist_context",
5436
- description: "\u81EA\u9009\u80A1\u4E0A\u4E0B\u6587\u5305 \u2014 \u5BF9\u591A\u53EA\u80A1\u7968\u8F93\u51FA\u8BC4\u5206/\u8D8B\u52BF/\u5F02\u5E38/\u98CE\u9669/\u5EFA\u8BAE next_tools \u7684 agent \u53CB\u597D\u6458\u8981\u3002\u5BBF\u4E3B agent \u51B3\u5B9A\u5982\u4F55\u5199\u65E5\u62A5\u6216\u6DF1\u5165\u5206\u6790",
5737
+ description: "\u81EA\u9009\u80A1\u4E0A\u4E0B\u6587\u5305 \u2014 \u5BF9\u591A\u53EA\u80A1\u7968\u8F93\u51FA\u8BC4\u5206/\u8D8B\u52BF/\u5F02\u5E38/\u98CE\u9669/\u5EFA\u8BAE next_tools \u7684 agent \u53CB\u597D\u6458\u8981\u3002\u5BBF\u4E3B agent \u51B3\u5B9A\u5982\u4F55\u5199\u65E5\u62A5\u6216\u6DF1\u5165\u5206\u6790\u3002\u5F02\u52A8\u68C0\u67E5\u5931\u8D25\u65F6anomaly_status=unavailable\u3001anomaly_count=null\uFF0C\u4FDD\u7559anomaly_error/warnings\uFF1B\u6C47\u603B\u8BA1\u5165partial",
5437
5738
  parameters: typebox_exports.Object({
5438
5739
  symbols: typebox_exports.String({ description: "\u9017\u53F7\u5206\u9694\u7684\u80A1\u7968\u4EE3\u7801\u5217\u8868" }),
5439
5740
  include_market_review: typebox_exports.Optional(
@@ -5484,7 +5785,7 @@ var index_default = definePluginEntry({
5484
5785
  });
5485
5786
  api.registerTool({
5486
5787
  name: "check_alert_rules",
5487
- description: "\u65E0\u72B6\u6001\u544A\u8B66\u89C4\u5219\u68C0\u67E5 \u2014 \u4F20\u5165\u89C4\u5219\u6570\u7EC4\uFF0C\u8FD4\u56DE\u5F53\u524D\u662F\u5426\u89E6\u53D1\u3002\u89C4\u5219\u7C7B\u578B\uFF1Aprice_below/price_above/change_pct_above/change_pct_below/volume_ratio_above/anomaly/risk_veto/risk_level_at_least\u3002\u4E0D\u505A\u8C03\u5EA6\u4E0D\u5B58\u5386\u53F2",
5788
+ description: "\u65E0\u72B6\u6001\u544A\u8B66\u89C4\u5219\u68C0\u67E5 \u2014 \u4F20\u5165\u89C4\u5219\u6570\u7EC4\uFF0C\u8FD4\u56DE\u5F53\u524D\u662F\u5426\u89E6\u53D1\u3002\u89C4\u5219\u7C7B\u578B\uFF1Aprice_below/price_above/change_pct_above/change_pct_below/volume_ratio_above/anomaly/risk_veto/risk_level_at_least\u3002\u4E0D\u505A\u8C03\u5EA6\u4E0D\u5B58\u5386\u53F2\u3002\u4F9D\u8D56\u6570\u636E\u4E0D\u53EF\u7528\u65F6evaluated\u6761\u76EE\u542Berror\uFF0Cmeta.warnings\u63D0\u793A\u7F3A\u5931\uFF0Ctriggered=false\u4E0D\u4EE3\u8868\u68C0\u67E5\u6210\u529F",
5488
5789
  parameters: typebox_exports.Object({
5489
5790
  symbol: typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08A\u80A1\u5982600519\uFF0C\u7F8E\u80A1\u5982AAPL\uFF0C\u6E2F\u80A1\u598200700.HK\uFF09" }),
5490
5791
  rules: typebox_exports.Array(
@@ -5542,7 +5843,7 @@ var index_default = definePluginEntry({
5542
5843
  });
5543
5844
  api.registerTool({
5544
5845
  name: "evaluate_signals",
5545
- description: "\u8BC4\u4F30\u5230\u671F\u4FE1\u53F7\uFF1A\u62C9\u53D6\u8BB0\u5F55\u65E5\u4E4B\u540E\u7684\u65E5K\uFF0C\u5224\u5B9A target_hit/stop_hit/timeout \u5E76\u8BA1\u7B97\u6536\u76CA\uFF0C\u56DE\u5199\u5B58\u50A8\u3002\u8BB0\u5F55\u5EFA\u8BAE\u7528 record_signal\uFF0C\u80DC\u7387\u590D\u76D8\u7528 get_signal_summary",
5846
+ description: "\u8BC4\u4F30\u5230\u671F\u4FE1\u53F7\uFF1A\u62C9\u53D6\u8BB0\u5F55\u65E5\u4E4B\u540E\u7684\u65E5K\uFF0C\u5224\u5B9A target_hit/stop_hit/timeout \u5E76\u8BA1\u7B97\u6536\u76CA\uFF0C\u56DE\u5199\u5B58\u50A8\u3002\u8BB0\u5F55\u5EFA\u8BAE\u7528 record_signal\uFF0C\u80DC\u7387\u590D\u76D8\u7528 get_signal_summary\u3002\u5386\u53F2K\u7EBF\u672A\u8986\u76D6\u8BB0\u5F55\u65E5\u65F6skipped_no_data\u5E76\u4FDD\u6301\u672A\u7ED3\u7B97\uFF0C\u4E0D\u80FD\u7528\u8F83\u65B0\u884C\u60C5\u4EE3\u66FF\u3002\u539F\u59CB\u4FE1\u53F7\u4EF7\u4E0E\u590D\u6743K\u7EBF\u987B\u6709\u53EF\u6838\u5B9E\u7684adjustment_factor\uFF0C\u7F3A\u5931\u5219skipped_price_basis\u4FDD\u6301\u672A\u7ED3\u7B97\u3002CLI\u9884\u7B97300\u79D2\uFF0C\u622A\u6B62\u524D\u8FD4\u56DE\u5E76\u4FDD\u5B58\u5DF2\u5B8C\u6210\u7ED3\u679C\uFF1Bcomplete/deferred/warnings\u8BF4\u660E\u672A\u5904\u7406\u8BB0\u5F55\uFF0C\u4E0B\u6B21\u53EF\u91CD\u8BD5",
5546
5847
  parameters: typebox_exports.Object({
5547
5848
  symbol: typebox_exports.Optional(
5548
5849
  typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08\u53EF\u9009\uFF0C\u53EA\u8BC4\u4F30\u8BE5\u80A1\u7684\u4FE1\u53F7\uFF09" })
@@ -5557,7 +5858,7 @@ var index_default = definePluginEntry({
5557
5858
  });
5558
5859
  api.registerTool({
5559
5860
  name: "get_signal_summary",
5560
- description: "\u4FE1\u53F7\u80DC\u7387\u6C47\u603B\uFF08\u53EF\u6309 source/symbol/status \u8FC7\u6EE4\uFF09\uFF1A\u80DC\u7387\u3001\u5E73\u5747\u6536\u76CA\u3001\u7ED3\u679C\u5206\u5E03\u4E0E\u660E\u7EC6",
5861
+ description: "\u4FE1\u53F7\u80DC\u7387\u6C47\u603B\uFF08\u53EF\u6309 source/symbol/status \u8FC7\u6EE4\uFF09\uFF1A\u80DC\u7387\u3001\u5E73\u5747\u6536\u76CA\u3001\u7ED3\u679C\u5206\u5E03\u4E0E\u660E\u7EC6\u3002by_source\u9644avg_return_pct\u3001return_samples\u548Csample_warning\uFF1B\u4EC5\u89C2\u5BDF\u6027\u590D\u76D8\uFF0C\u6837\u672C\u5C11\u4E0D\u80FD\u8BA4\u5B9A\u7B56\u7565\u6709\u6548\u3002",
5561
5862
  parameters: typebox_exports.Object({
5562
5863
  source: typebox_exports.Optional(typebox_exports.String({ description: "\u6309\u4FE1\u53F7\u6765\u6E90\u8FC7\u6EE4\uFF08\u53EF\u9009\uFF09" })),
5563
5864
  symbol: typebox_exports.Optional(typebox_exports.String({ description: "\u6309\u80A1\u7968\u4EE3\u7801\u8FC7\u6EE4\uFF08\u53EF\u9009\uFF09" })),