@v587d/capital-generation 2.20.0 → 2.21.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.
- package/CHANGELOG.md +34 -0
- package/README.md +7 -21
- package/automation/board.js +121 -9
- package/automation/brief.js +71 -15
- package/automation/builtins.js +17 -0
- package/automation/client.js +21 -12
- package/automation/client.src.cjs +462 -154
- package/automation/index.js +19 -5
- package/automation/package.json +1 -1
- package/automation/route.js +3 -0
- package/automation/runner.js +48 -4
- package/automation/scheduler.js +12 -0
- package/automation/schema.js +20 -2
- package/automation/service.js +15 -0
- package/automation/store.js +16 -3
- package/automation/task-icons.js +1 -0
- package/automation/watch.js +261 -159
- package/chart-ui/package.json +1 -1
- package/config/package.json +1 -1
- package/lib/chart/delivery.js +8 -6
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +1 -1
- package/plugin-page/README.en.md +1 -1
- package/plugin-page/README.zh.md +1 -1
- package/watchlist/package.json +1 -1
package/lib/chart/delivery.js
CHANGED
|
@@ -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.
|
|
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.
|
|
6
|
+
export declare const LOCAL_FETCH_CLIENT_VERSION = "2.21.0";
|
|
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.
|
|
7
|
+
export const LOCAL_FETCH_CLIENT_VERSION = '2.21.0';
|
|
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.
|
|
38
|
+
export declare const WIND_CLIENT_VERSION = "2.21.0";
|
|
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.
|
|
22
|
+
export const WIND_CLIENT_VERSION = '2.21.0';
|
|
23
23
|
function errorText(error) {
|
|
24
24
|
return error instanceof Error ? error.message : String(error);
|
|
25
25
|
}
|
package/package.json
CHANGED
package/plugin-page/README.en.md
CHANGED
|
@@ -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
|
|
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
|
|
package/plugin-page/README.zh.md
CHANGED
|
@@ -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
|
|
package/watchlist/package.json
CHANGED