@v587d/capital-generation 2.20.0 → 2.21.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v587d/capital-charts",
3
- "version": "2.20.0",
3
+ "version": "2.21.1",
4
4
  "description": "自动模式的图表前端组件(浏览器半边 + 序列旁路路由):由 @v587d/capital-generation 随包携带并作为 host 平面行挂载。",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v587d/config",
3
- "version": "2.20.0",
3
+ "version": "2.21.1",
4
4
  "description": "自动模式的取数凭据与偏好配置行:卡片坐在 @v587d/capital-generation 插件主页的「配置」段,点这一行本身没有表单。",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -56,21 +56,23 @@ export function createChartDelivery(options) {
56
56
  return inboxMessages(inbox).every(isSettledNotice);
57
57
  };
58
58
  const flush = (session, turn, agent) => {
59
- // A later step in the same exchange may omit `turn`; it still must not write a second card.
60
- if (flushed)
61
- return;
62
59
  const inbox = options.inboxOf?.(session);
63
60
  reconcileSettled(inbox);
64
- if (!idle(inbox))
65
- return;
66
61
  // The wake guard drops notices that would otherwise make the loop open another step after
67
- // this answer. Run it even when no chart is selected, and never let it block delivery.
62
+ // this answer. It must run on every pure-text finish, including when a child is still marked
63
+ // running: a late settlement notice is exactly the race that adds a "nothing new" turn.
64
+ // Chart delivery stays gated on `idle` below; a guard failure must not strand a card.
68
65
  try {
69
66
  options.onClosing?.(session, agent, turn);
70
67
  }
71
68
  catch {
72
69
  // A guard failure must not strand an already-selected card.
73
70
  }
71
+ // A later step in the same exchange may omit `turn`; it still must not write a second card.
72
+ if (flushed)
73
+ return;
74
+ if (!idle(inbox))
75
+ return;
74
76
  const inputs = (explicit.length > 0 ? explicit : autoInputs(session)).slice(0, maxCharts);
75
77
  if (inputs.length === 0)
76
78
  return;
@@ -3,7 +3,7 @@
3
3
  * Known limit: DNS resolves per request but the IP is not pinned to the connection,
4
4
  * so a rebinding window remains (same trade-off as dsh-search-first).
5
5
  */
6
- export declare const LOCAL_FETCH_CLIENT_VERSION = "2.20.0";
6
+ export declare const LOCAL_FETCH_CLIENT_VERSION = "2.21.1";
7
7
  export declare const LOCAL_FETCH_MAX_URL_LENGTH = 2048;
8
8
  export type LocalFetchErrorCode = 'ABORTED' | 'TIMEOUT' | 'INVALID_URL' | 'BLOCKED_URL' | 'DNS' | 'REDIRECT' | 'HTTP' | 'TOO_LARGE' | 'UNSUPPORTED_CONTENT_TYPE';
9
9
  export declare class LocalFetchError extends Error {
@@ -4,7 +4,7 @@
4
4
  * so a rebinding window remains (same trade-off as dsh-search-first).
5
5
  */
6
6
  import { htmlToMarkdown, stripInvisibleText } from './html-markdown.js';
7
- export const LOCAL_FETCH_CLIENT_VERSION = '2.20.0';
7
+ export const LOCAL_FETCH_CLIENT_VERSION = '2.21.1';
8
8
  export const LOCAL_FETCH_MAX_URL_LENGTH = 2048;
9
9
  export class LocalFetchError extends Error {
10
10
  code;
@@ -35,7 +35,7 @@ export interface WindCallResult {
35
35
  code?: WindErrorCode;
36
36
  }
37
37
  /** Must match `package.json` version; a test pins the two together. */
38
- export declare const WIND_CLIENT_VERSION = "2.20.0";
38
+ export declare const WIND_CLIENT_VERSION = "2.21.1";
39
39
  export interface WindClient {
40
40
  callTool(toolName: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<WindCallResult>;
41
41
  }
@@ -19,7 +19,7 @@ export const WIND_SERVER_ENDPOINTS = {
19
19
  analytics_data: 'https://mcp.wind.com.cn/vserver_analytics_data/mcp/',
20
20
  };
21
21
  /** Must match `package.json` version; a test pins the two together. */
22
- export const WIND_CLIENT_VERSION = '2.20.0';
22
+ export const WIND_CLIENT_VERSION = '2.21.1';
23
23
  function errorText(error) {
24
24
  return error instanceof Error ? error.message : String(error);
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v587d/capital-generation",
3
- "version": "2.20.0",
3
+ "version": "2.21.1",
4
4
  "description": "Capital Generation:面向中国散户的 AI 投资助手插件(自动模式 Agent Preset)",
5
5
  "icon": "assets/cg-icon.png",
6
6
  "author": "v587d",
@@ -29,7 +29,7 @@ Auto never fetches data or draws charts directly; every number needs a source an
29
29
 
30
30
  ## CapGen research automation
31
31
 
32
- Built-in task templates cover news, quotes, reviews, research, portfolios and monitoring; they start a new session on schedule and can also be run manually. Tasks, the board, the run heatmap and notifications live on one page. Board TODOs are checked automatically alongside the Midday Snapshot and Daily Review runs; when a condition triggers or needs your confirmation, it lands in task notifications.
32
+ Built-in task templates cover news, quotes, reviews, research, portfolios and monitoring; they start a new session on schedule and can also be run manually. Tasks, the board, the run heatmap and notifications live on one page. Board TODOs are checked by the default-enabled TODO Verifier after the A/H close; when a condition triggers or needs your confirmation, it lands in task notifications.
33
33
 
34
34
  See [README CapGen automation](https://github.com/v587d/capital-generation#capgen-automation) for templates, budgets and notifications.
35
35
 
@@ -29,7 +29,7 @@ Capital Generation 是运行在 [DeepSeek Harness](https://github.com/deepseek-a
29
29
 
30
30
  ## CapGen 投研自动化
31
31
 
32
- 内置多套任务模板,覆盖资讯、行情、复盘、研究、组合与监控;到点自动新建会话执行,也能手动运行。任务、看板、运行热力图与通知在同一页。看板 TODO 会随「午间快照」「每日复盘」自动核验待验证条件,触发或需要你确认时写入任务通知。
32
+ 内置多套任务模板,覆盖资讯、行情、复盘、研究、组合与监控;到点自动新建会话执行,也能手动运行。任务、看板、运行热力图与通知在同一页。看板 TODO 由默认启用的「TODO 核验」在收盘后主动核验,触发或需要你确认时写入任务通知。
33
33
 
34
34
  模板清单、运行预算与通知设置见 [README 的 CapGen 投研自动化](https://github.com/v587d/capital-generation#capgen-automation)。
35
35
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v587d/watchlist",
3
- "version": "2.20.0",
3
+ "version": "2.21.1",
4
4
  "description": "自动模式的用户自选股(宿主级清单 + Fuyao 报价快照 + /capital-watchlist 路由 + 输入框菜单弹窗):由 @v587d/capital-generation 随包携带并作为 host 平面行挂载。",
5
5
  "license": "MIT",
6
6
  "type": "module",