visionclaw 0.1.206 → 0.1.207-beta.1

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.
@@ -144,7 +144,7 @@ When in doubt, share the minimum information necessary to complete the task, and
144
144
  - Every wake cycle must end explicitly: call \`finish\` when no work remains${ownerConfig.dualSessionEnabled ? ", or `switch_session` when handing work to the other session" : ""}. Never end a turn silently while a task is still active.
145
145
  - Create and maintain a Todo/Task list for multi-step work. If that list contains pending or in-progress items, \`finish\` is rejected until they are completed or the list is explicitly updated. If progress is blocked on user action, first successfully tell the user exactly what is needed via \`notify_user\`, then call \`finish(awaiting_user=true)\`. This only ends the current wake; Todo state is in-memory and is not guaranteed to survive or be reinjected into a later wake.
146
146
  - When tasks are completed, notify the user through the appropriate channel, then call \`finish\`${ownerConfig.dualSessionEnabled ? " (unless `switch_session` is the correct terminal action)" : ""}.
147
- - For recurring tasks, create Google Calendar events so you are reminded to execute them.
147
+ - For recurring tasks, create calendar events so you are reminded to execute them.
148
148
 
149
149
  ### Proactive Behavior
150
150
  During heartbeat wakes (no new messages), review your calendar, check for pending tasks, and take initiative:
@@ -167,7 +167,7 @@ The \`financial_*\` tools (financial-tool MCP) cover all markets behind one serv
167
167
  - **A-share** and **Hong Kong** equities: quotes and history (**delayed by ~15 minutes**).
168
168
  - **Crypto** pairs (e.g. BTC-USDT): real-time quotes and bars.
169
169
  - **Fundamentals** (\`financial_get_fundamentals\`): summary ratios and income/balance/cashflow statements (end-of-day).
170
- - **Ticker news** (\`financial_get_news\`): recent articles for **US-listed** tickers with publisher, summary, and per-ticker sentiment (updated hourly). For A-share/HK news use web search instead.
170
+ - **Ticker news** (\`financial_get_news\`): recent articles for A-share, HK, and US-listed equities. US results may include publisher, summary, and per-ticker sentiment; A/HK results include titles, timestamps, and links. Pass \`market\` to disambiguate symbols and check \`freshness\`.
171
171
 
172
172
  Each snapshot carries a \`freshness\` field ({provider, asOf, latency}); check \`latency\` ("realtime"/"delayed"/"eod") before relying on a price for time-sensitive decisions. For numeric symbols that are ambiguous across markets (e.g. 5-digit codes), pass the \`market\` hint (A/HK/US/crypto).
173
173
 
@@ -8,7 +8,7 @@ Institutional-quality equity research workflows adapted from [Anthropic's Financ
8
8
 
9
9
  ## Data Sources
10
10
 
11
- 1. **VisionClaw financial_* tools** (financial-tool MCP) — quotes/snapshots (US real-time; A-share/HK delayed; crypto), historical bars (`financial_get_bars`), fundamentals/financial statements (`financial_get_fundamentals`), and US ticker news with sentiment (`financial_get_news`)
11
+ 1. **VisionClaw financial_* tools** (financial-tool MCP) — quotes/snapshots (US real-time; A-share/HK delayed; crypto), historical bars (`financial_get_bars`), fundamentals/financial statements (`financial_get_fundamentals`), and A-share/HK/US ticker news (`financial_get_news`; US may include sentiment)
12
12
  2. **Web search** — SEC EDGAR, company IR pages, earnings transcripts, news
13
13
  3. **User-provided data** — uploaded documents, models, prior research
14
14
  4. **MCP data servers** (if configured) — Morningstar, FactSet, S&P Global, etc.
@@ -1,10 +1,10 @@
1
1
  ---
2
- description: Use this skill when handling messages from the fin-app channel (finapp threads like fin-home, fin-idea-*, fin-lab-*, fin-note-*, fin-holdings) or when working with the owner's financial objects (Labs, ideas, notes, portfolio, executable suggested actions, audit records, idea evidence, monitors) via the fin-app MCP tools. Covers the object model, idea lifecycle (researching/executing/closed) with the invalidated flag and derived confidence, Labs with independent VisionClaw run contexts, strong parent and weak references, executable actions (propose → owner accepts → server executes), Workspace notes, monitors (event-trigger backed, with reaction policies and monitor events), the scheduled daily briefing instruction ([每日简报指令] in fin-home) with BriefingContext / briefing profile / finapp_record_briefing_result continuity, [[type:id]] reference tokens, the audit-first rule, and the real-trading policy (real trades only on explicit owner request).
2
+ description: Use this skill for fin-app channel messages (fin-home, fin-idea-*, fin-lab-*, fin-note-*, fin-holdings) and fin-app MCP tools (finapp_*) Labs, ideas, notes, holdings, paper trading, monitors, audits, actions, and daily briefing. Real brokerage trades only on explicit owner request.
3
3
  ---
4
4
 
5
5
  # fin-app 金融助手
6
6
 
7
- fin-app 是 VisionClaw 的金融版 Web App。你的 owner 在浏览器里使用它;你通过两条链路与它交互:
7
+ fin-app 是 VisionClaw 的金融客户端(浏览器 Web 与移动端 App)。你的 owner 在任一端使用它;你通过两条链路与它交互:
8
8
 
9
9
  1. **finapp 消息通道**:owner 在 App 里的每个对话框都是一个 thread(见下方 threadId 约定),消息像 Telegram 一样到达你这里,你的回复会实时显示在 App 中。**通过 fin-app 到达的消息一定来自你的 owner 本人**(不是群聊、不是陌生用户、不是第三方客户);把它当作 owner 的直接指令/提问来处理。
10
10
  2. **fin-app MCP 工具**(`mcp__fin-app__finapp_*`):读写云端金融对象。对象的事实来源永远在 fin-app 云端 DB,不在你的本地记忆。
@@ -14,7 +14,7 @@ fin-app 是 VisionClaw 的金融版 Web App。你的 owner 在浏览器里使用
14
14
  - **默认不执行任何真实下单/券商操作**。fin-app 系统内没有真实下单工具,所以绝不能凭空表述为"已下单""将自动执行""订单已进入队列"(指真实账户)。
15
15
  - **唯一放行条件——owner 明确要求**:只有当 owner 在对话中**明确、具体地指示**执行某笔真实交易(标的、方向、数量清楚)时,你才可以通过桌面/浏览器操作 owner 的券商软件代为执行。执行前复述订单细节请 owner 确认,执行后如实汇报结果;你**绝不主动发起**真实交易,模糊表述(如"你看着办")不算明确要求。
16
16
  - **真实交易建议(加仓/减仓/建仓/清仓等券商操作)永远不落 Action**:Suggested Action 只承载 fin-app **系统内可执行的操作**(见下方 Action 章节),owner 采纳后由 fin-app 服务端真正执行——真实券商操作系统执行不了,不允许包装成 Action。主动建议只能留在对话正文里,以 `finapp_append_audit` 审计记录 + idea evidence 作支撑。
17
- - **模拟盘(paper trading)**:`finapp_place_paper_order` 是向 paper-trading 服务的**模拟账户**下单,不涉及任何真金白银,允许在 owner 明确指示下使用。措辞必须清晰区分,例如说"已在模拟盘买入",绝不能让 owner 误以为发生了真实交易(反之亦然)。
17
+ - **模拟盘(paper trading)**:用 `finapp_paper` 操作 paper-trading 服务的**模拟账户**(ensure / open_account / deposit / place_order / cancel_order / get_account),不涉及任何真金白银,允许在 owner 明确指示下使用。措辞必须清晰区分,例如说"已在模拟盘买入",绝不能让 owner 误以为发生了真实交易(反之亦然)。`public_url` 只是 Lab 的可选附属产物,**绝不是**模拟盘交易台——现金/持仓/订单以 fin-app Lab 面板与 `finapp_paper` 为准。
18
18
  - 持仓数据只在 owner 明确确认后才能写入(`finapp_update_positions`),绝不通过 Action 或建议自动修改持仓。
19
19
 
20
20
  ## threadId 约定
@@ -33,13 +33,13 @@ fin-app 是 VisionClaw 的金融版 Web App。你的 owner 在浏览器里使用
33
33
 
34
34
  ## 对象模型(经 MCP 读写)
35
35
 
36
- - **Lab 实验室**:Agent 编写和运行的研究产物,使用 `finapp_lab` 创建、读取、运行、查看 runs 和归档。mode 为 `analysis | backtest | paper | live_tracking`。每个 Lab 恰有一个 strong parent(Idea / Holdings / Unassigned),并可 weak-reference Idea/Portfolio/Position/Instrument/其他 artifact。阶段 1 由独立的 VisionClaw run context 执行:讨论 thread 不阻塞;每个新 run 使用新 session,LabEnvironment 跨 run 保留。
36
+ - **Lab 实验室**:Agent 编写和运行的研究产物,使用 `finapp_lab` 创建、读取、运行、查看 runs 和归档。`features` 为可叠加标签:`analysis | backtest | paper | live_tracking`(不是互斥 mode;一个 Lab 可同时有 `analysis` + `paper`)。含 `paper` 时 Lab 详情显示原生模拟盘面板。每个 Lab 恰有一个 strong parent(Idea / Holdings / Unassigned),并可 weak-reference Idea/Portfolio/Position/Instrument/其他 artifact。阶段 1 由独立的 VisionClaw run context 执行:讨论 thread 不阻塞;每个新 run 使用新 session,LabEnvironment 跨 run 保留。
37
37
  - **Idea 想法**:持续演化、被反复验证的投资论点;不会被 Lab 消耗。
38
38
  - **Monitor / Lab / Note 归属**:必须有一个 strong parent(Idea、Holdings 或显式 Unassigned);related references 只表达讨论/使用关系,不能模拟多归属。Position 只能被引用,不能作为 strong parent。
39
39
  - **Monitor 监控**:简单条件触发器;复杂分析、回测、模拟和持续跟踪属于 Lab。
40
40
  - **Note 笔记**:Markdown 研究资产,同样遵循单一 parent + 多 related references。
41
41
  - **Holdings / Portfolio / Position**:UI 只暴露 Holdings;内部 Portfolio 是聚合账户,Position 是其中一个标的/合约持仓。
42
- - **Paper broker**:只负责虚拟账户、现金、订单、成交、仓位和 NAV;规则/信号/回测属于 Paper-mode Lab
42
+ - **Paper broker**(经 `finapp_paper`):只负责虚拟账户、现金、订单、成交、仓位和 NAV;规则/信号/分析属于带 `paper` feature 的 Lab。一市场一账户(A/CNY、HK/HKD、US/USD);Asset ID 形如 `US:AAPL` / `HK:00700` / `A:600519`。
43
43
  - **audit 审计记录**:`kind`(fact/calc/opinion)+ `content` + `source` + `sourceTs`(计算类另有 `formula` + `inputs`)。不可变,是所有金融结论的事实来源,也是引用脚注、证据链与数据审计面板的数据源。
44
44
 
45
45
  ## Action:可执行建议(Suggested Action)
@@ -148,11 +148,16 @@ fin-app 服务端每天在 owner 当地时间早上 8 点向 `fin-home` 发送
148
148
 
149
149
  **收到"action 已执行成功/失败"系统消息**:成功 → 在对应 thread 简述结果与后续跟踪计划;失败 → 分析错误原因,告知 owner 可重试或给出替代方案。不触发任何下单动作。
150
150
 
151
- **从 Idea 创建 Lab**:与 owner 确认 mode、请求和归属后调用 `finapp_lab(action="create", parent={type:"idea", id}, ...)`。Idea 生命周期保持独立。
151
+ **从 Idea 创建 Lab**:与 owner 确认 features、请求和归属后调用 `finapp_lab(action="create", features=[...], parent={type:"idea", id}, ...)`。Idea 生命周期保持独立。
152
152
 
153
- **owner 说“帮我跑个回测”**:创建或更新 `mode="backtest"` Lab,调用 `finapp_lab(action="run", ...)`。服务端把 run 投递给独立 executor context;讨论 thread 保持可用。执行 context 必须 claim、heartbeat,并以 report_run 上报结果与 artifacts
153
+ **owner 说“帮我跑个回测”**:创建或更新 Lab 并确保 `features` `backtest`,调用 `finapp_lab(action="run", ...)`。服务端把 run 投递给独立 executor context;讨论 thread 保持可用。执行 context 必须 claim、heartbeat,并以 report_run 上报结果与 artifacts。注意:当前 paper-trading 服务不提供 backtest API(`backtests=false`);回测执行仍走 Lab run / Agent,不是 `finapp_paper`。
154
154
 
155
- **owner 要做模拟验证**:使用 `mode="paper"` Lab;所有规则、信号和分析属于 Lab,虚拟 broker 仅保存现金、订单、成交、仓位和 NAV。明确说明不涉及真实交易。
155
+ **owner 要做模拟验证**:创建或更新 Lab 并确保 `features` `paper`(`finapp_paper open_account` 也会自动加上)。流程:
156
+ 1. `finapp_paper(action="ensure")`(按需;开户也会触发 provision)
157
+ 2. `finapp_paper(action="open_account", labId, market="US"|"HK"|"A", initialCash?)` — 一市场一账户
158
+ 3. 下单:`finapp_paper(action="place_order", labId, market?, assetId, side, quantity, requestedExecutionDate, clientOrderId?)` — **首次调用前生成并记住 `clientOrderId`**,超时重试必须复用同一 id,不要换新 id
159
+ 4. 查询:`finapp_paper(action="get_account", labId, market?)`;可选用 `deposit` / `cancel_order`
160
+ 明确说明不涉及真实交易。不要用 `public_url` 网页当交易台。
156
161
 
157
162
  **owner 说"茅台跌破 1500 提醒我"(在某 idea/lab thread)**:一次 `finapp_create_monitor(objectType, objectId, title, condition={symbol:"600519", market:"CN", operator:"lte", threshold:1500})` 即完成(服务端自动注册 event-trigger)→ 回复已设置监控。
158
163
 
@@ -22,11 +22,26 @@ func captureScreen(to outputPath: String) async throws {
22
22
  let config = SCStreamConfiguration()
23
23
  config.showsCursor = true
24
24
  config.captureResolution = .best
25
- // Set output dimensions large enough to avoid downscaling on Retina displays.
26
- // With .best, ScreenCaptureKit captures at native resolution; if these exceed
27
- // the actual pixel count it won't upscale.
28
- config.width = display.width * 2
29
- config.height = display.height * 2
25
+ // Capture at the display's exact native pixel size: contentRect (points)
26
+ // × pointPixelScale (backing scale, 1x/2x). The canvas must not exceed
27
+ // the native frame SCScreenshotManager renders at native resolution
28
+ // without upscaling, so an over-sized canvas (the old fixed points-times-
29
+ // two heuristic on a 1x non-Retina display) leaves the desktop in the
30
+ // top-left quarter with the rest black. On 2x Retina panels that
31
+ // heuristic happened to equal the native size, which is why only
32
+ // 1x-display machines showed the quarter-frame bug.
33
+ let scale = CGFloat(filter.pointPixelScale)
34
+ let rect = filter.contentRect
35
+ var pixelWidth = Int((rect.width * scale).rounded())
36
+ var pixelHeight = Int((rect.height * scale).rounded())
37
+ if pixelWidth <= 0 || pixelHeight <= 0 {
38
+ // Defensive fallback: capture at point size. A downscaled-but-complete
39
+ // frame beats a letterboxed quarter-frame.
40
+ pixelWidth = display.width
41
+ pixelHeight = display.height
42
+ }
43
+ config.width = pixelWidth
44
+ config.height = pixelHeight
30
45
 
31
46
  let image = try await SCScreenshotManager.captureImage(
32
47
  contentFilter: filter, configuration: config
@@ -20829,7 +20829,7 @@ var require_prompts3 = __commonJS({
20829
20829
 
20830
20830
  // dist/utils/version-check.js
20831
20831
  function isBundled() {
20832
- const v16 = "0.1.206";
20832
+ const v16 = "0.1.207-beta.1";
20833
20833
  return typeof v16 === "string" && v16 !== "undefined";
20834
20834
  }
20835
20835
  function getPackageRoot() {
@@ -20846,7 +20846,7 @@ function getInstallationInfo() {
20846
20846
  };
20847
20847
  }
20848
20848
  function getCurrentVersion() {
20849
- const bundledVersion = "0.1.206";
20849
+ const bundledVersion = "0.1.207-beta.1";
20850
20850
  if (bundledVersion && bundledVersion !== "undefined") {
20851
20851
  return bundledVersion;
20852
20852
  }
@@ -922284,7 +922284,7 @@ When in doubt, share the minimum information necessary to complete the task, and
922284
922284
  - Every wake cycle must end explicitly: call \`finish\` when no work remains${ownerConfig.dualSessionEnabled ? ", or `switch_session` when handing work to the other session" : ""}. Never end a turn silently while a task is still active.
922285
922285
  - Create and maintain a Todo/Task list for multi-step work. If that list contains pending or in-progress items, \`finish\` is rejected until they are completed or the list is explicitly updated. If progress is blocked on user action, first successfully tell the user exactly what is needed via \`notify_user\`, then call \`finish(awaiting_user=true)\`. This only ends the current wake; Todo state is in-memory and is not guaranteed to survive or be reinjected into a later wake.
922286
922286
  - When tasks are completed, notify the user through the appropriate channel, then call \`finish\`${ownerConfig.dualSessionEnabled ? " (unless `switch_session` is the correct terminal action)" : ""}.
922287
- - For recurring tasks, create Google Calendar events so you are reminded to execute them.
922287
+ - For recurring tasks, create calendar events so you are reminded to execute them.
922288
922288
 
922289
922289
  ### Proactive Behavior
922290
922290
  During heartbeat wakes (no new messages), review your calendar, check for pending tasks, and take initiative:
@@ -922307,7 +922307,7 @@ The \`financial_*\` tools (financial-tool MCP) cover all markets behind one serv
922307
922307
  - **A-share** and **Hong Kong** equities: quotes and history (**delayed by ~15 minutes**).
922308
922308
  - **Crypto** pairs (e.g. BTC-USDT): real-time quotes and bars.
922309
922309
  - **Fundamentals** (\`financial_get_fundamentals\`): summary ratios and income/balance/cashflow statements (end-of-day).
922310
- - **Ticker news** (\`financial_get_news\`): recent articles for **US-listed** tickers with publisher, summary, and per-ticker sentiment (updated hourly). For A-share/HK news use web search instead.
922310
+ - **Ticker news** (\`financial_get_news\`): recent articles for A-share, HK, and US-listed equities. US results may include publisher, summary, and per-ticker sentiment; A/HK results include titles, timestamps, and links. Pass \`market\` to disambiguate symbols and check \`freshness\`.
922311
922311
 
922312
922312
  Each snapshot carries a \`freshness\` field ({provider, asOf, latency}); check \`latency\` ("realtime"/"delayed"/"eod") before relying on a price for time-sensitive decisions. For numeric symbols that are ambiguous across markets (e.g. 5-digit codes), pass the \`market\` hint (A/HK/US/crypto).
922313
922313
 
@@ -990462,7 +990462,7 @@ var init_browser_launcher = __esm({
990462
990462
 
990463
990463
  // dist/utils/playwriter-relay.js
990464
990464
  function isBundled2() {
990465
- const v16 = "0.1.206";
990465
+ const v16 = "0.1.207-beta.1";
990466
990466
  return typeof v16 === "string" && v16 !== "undefined";
990467
990467
  }
990468
990468
  function resolveRelayEntryPath() {
@@ -990588,7 +990588,7 @@ function selectAndPruneCanonicalRelay(matches, expectedEntry) {
990588
990588
  return canonical;
990589
990589
  }
990590
990590
  function pm2Start(entryPath, host, port) {
990591
- const versionStr = "0.1.206";
990591
+ const versionStr = "0.1.207-beta.1";
990592
990592
  (0, import_node_child_process19.execFileSync)("pm2", ["start", entryPath, "--name", PM2_PROCESS_NAME, "--update-env"], {
990593
990593
  encoding: "utf-8",
990594
990594
  stdio: "pipe",
@@ -990614,7 +990614,7 @@ function pm2Delete() {
990614
990614
  }
990615
990615
  }
990616
990616
  function pm2Restart(host, port) {
990617
- const versionStr = "0.1.206";
990617
+ const versionStr = "0.1.207-beta.1";
990618
990618
  (0, import_node_child_process19.execFileSync)("pm2", ["restart", PM2_PROCESS_NAME, "--update-env"], {
990619
990619
  encoding: "utf-8",
990620
990620
  stdio: "pipe",
@@ -991083,7 +991083,7 @@ async function reconcilePlaywriterRelay(host = "127.0.0.1", port = 19988) {
991083
991083
  pm2Restart(host, port);
991084
991084
  return;
991085
991085
  }
991086
- const currentVersion = "0.1.206";
991086
+ const currentVersion = "0.1.207-beta.1";
991087
991087
  if (currentEnv.VISIONCLAW_VERSION && currentEnv.VISIONCLAW_VERSION !== currentVersion) {
991088
991088
  if (!await ensureRelayPortAvailable(host, port, current, "recreate after a version change"))
991089
991089
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visionclaw",
3
- "version": "0.1.206",
3
+ "version": "0.1.207-beta.1",
4
4
  "description": "A personal assistant agent that runs on your desktop, receives commands from messaging channels, and executes tasks autonomously.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",