@v587d/capital-generation 2.17.0 → 2.19.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.
@@ -2,10 +2,11 @@
2
2
  * present_charts: the root Agent's final-turn delivery step.
3
3
  *
4
4
  * render_chart only mints a chart_ref (the specialist row no longer auto-delivers). DSH's
5
- * deliverable card replays only declarations recorded before the closing assistant message, so
6
- * the card has to be written by the turn that carries the final answer: the root Agent presents
7
- * its collected refs/deliverables here immediately before writing that answer. Never a custom
8
- * event type — the session-event vocabulary is closed (see events.ts).
5
+ * deliverable card replays declarations from the whole closing turn (0.2.2 dropped the
6
+ * `file.seq < owner.seq` filter), but the card still has to be attributed to the turn that
7
+ * carries the final answer: the root Agent presents its collected refs/deliverables here
8
+ * immediately before writing that answer. Never a custom event type — the session-event
9
+ * vocabulary is closed (see events.ts).
9
10
  */
10
11
  import type { Context } from '@deepseek-ai/cordis';
11
12
  import type { ChartArtifactRegistry } from './artifact-ref.js';
@@ -3,9 +3,11 @@
3
3
  *
4
4
  * The model only records which charts belong to the answer. The actual first-party
5
5
  * `deliverables/presented` append happens in the terminal assistant-stream chunk, before the closing
6
- * message commits, gated on an idle root (no actionable inbox input, no running direct children). That is the only
7
- * point where "the final answer" is knowable, so early/no `present_charts` calls cannot strand the
8
- * card in a folded process turn (rationale: docs/dev/chart-delivery-events.md §6.3).
6
+ * message commits, gated on an idle root (no actionable inbox input, no running direct children).
7
+ * That is the first point where "the final answer" is knowable, so early/no `present_charts` calls
8
+ * cannot strand the card in a folded process turn (rationale: docs/dev/chart-delivery-events.md §6.3).
9
+ * 0.2.2 made the client replay the whole turn, so this write point is about turn attribution and
10
+ * ordering, not about dodging a seq cutoff.
9
11
  */
10
12
  import type { Context } from '@deepseek-ai/cordis';
11
13
  import type { SessionLike } from './data-collector/store.js';
@@ -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.17.0";
6
+ export declare const LOCAL_FETCH_CLIENT_VERSION = "2.19.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.17.0';
7
+ export const LOCAL_FETCH_CLIENT_VERSION = '2.19.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.17.0";
38
+ export declare const WIND_CLIENT_VERSION = "2.19.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.17.0';
22
+ export const WIND_CLIENT_VERSION = '2.19.0';
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.17.0",
3
+ "version": "2.19.0",
4
4
  "description": "Capital Generation:面向中国散户的 AI 投资助手插件(自动模式 Agent Preset)",
5
5
  "icon": "assets/cg-icon.png",
6
6
  "author": "v587d",
@@ -161,23 +161,23 @@
161
161
  "report:skill-usage": "node scripts/skill-usage-report.mjs"
162
162
  },
163
163
  "peerDependencies": {
164
- "@deepseek-ai/cordis": "^4.0.2",
165
- "@deepseek-ai/dsh-skill": "0.2.1-rc.5",
166
- "@deepseek-ai/dsh-skill-filesystem": "0.2.1-rc.5"
164
+ "@deepseek-ai/cordis": "~4.1.0",
165
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.1",
166
+ "@deepseek-ai/dsh-skill-filesystem": "0.2.2-rc.1"
167
167
  },
168
168
  "devDependencies": {
169
- "@deepseek-ai/cordis": "^4.0.2",
170
- "@deepseek-ai/dsh-skill": "^0.2.1-rc.5",
171
- "@deepseek-ai/dsh-skill-filesystem": "^0.2.1-rc.5",
172
- "@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.5",
173
- "@deepseek-ai/schemastery": "^3.18.4",
169
+ "@deepseek-ai/cordis": "~4.1.0",
170
+ "@deepseek-ai/dsh-skill": "^0.2.2-rc.1",
171
+ "@deepseek-ai/dsh-skill-filesystem": "^0.2.2-rc.1",
172
+ "@deepseek-ai/dsh-system-prompt": "^0.2.2-rc.1",
173
+ "@deepseek-ai/schemastery": "^3.19.0",
174
174
  "esbuild": "^0.28.2",
175
175
  "js-yaml": "^5.4.1",
176
176
  "lightweight-charts": "5.2.1",
177
177
  "typescript": "^5.0.0"
178
178
  },
179
179
  "dependencies": {
180
- "@deepseek-ai/schemastery": "^3.18.4",
180
+ "@deepseek-ai/schemastery": "^3.19.0",
181
181
  "@joplin/turndown-plugin-gfm": "^1.0.68",
182
182
  "turndown": "^7.2.4",
183
183
  "zod": "^4.5.4"
@@ -23,7 +23,7 @@
23
23
 
24
24
  ## 2. 人设(persona)承载与官方语义
25
25
 
26
- 实测 `dsh 0.2.1-rc.5`(`test/persona.test.mjs` 对着本机 dsh 核对字段名),两层载体注册的是
26
+ 实测 `dsh 0.2.2-rc.1`(`test/persona.test.mjs` 对着本机 dsh 核对字段名),两层载体注册的是
27
27
  **同一个 system-prompt 节名**:
28
28
 
29
29
  | 载体 | 位置 | 字段 | 生效范围 |
@@ -160,13 +160,15 @@
160
160
 
161
161
  ### 5.1.1 PTC:只给 data_junior,主 Agent 仍是 native
162
162
 
163
- - **一行怎么落**:junior preset 挂 `@deepseek-ai/dsh-agent-tool-presentation`(`mode: ptc`),
164
- 同时删掉 `tool-bash` / `tool-pwsh`。宿主 `ptc-runtime` 由 `dsh-base` 提供,preset 写不进去;
165
- `smoke:boot` 同时断言 presentation 行 `fiberState=2` 与 `ctx.get('ptcRuntime')` 在场。
163
+ - **一行怎么落**:junior preset 挂 `tool-presentation` 行,0.2.2 起行里直接是
164
+ `@deepseek-ai/dsh-tool-executor-ptc`(`maxParallelSubCalls: 10`;旧的
165
+ `dsh-agent-tool-presentation` + `mode: ptc` 只剩兼容壳),同时删掉 `tool-bash` / `tool-pwsh`。
166
+ 宿主 `ptc-runtime` 由 `dsh-base` 提供,preset 写不进去;`smoke:boot` 同时断言 executor 行
167
+ `fiberState=2` 与 `ctx.get('ptcRuntime')` 在场。
166
168
  - **为什么删 shell 而不是并存**:PTC SDK 在可见 `bash` 时会主动塞一条 `tools.bash({command:'pwd'})`
167
169
  示例,并存等于官方提示词把模型往 shell 引;junior 只需要一个执行面。主 Agent 仍是 native,
168
- 拿到的是原生 shell,根侧 `restrict()` 不能点名保留名 `run_code`(只在部署级 `tools.mode`
169
- 被改成 `ptc` 时才会出现,本仓只允许 preset 行)。
170
+ 继承部署级宿主 `dsh-tool-executor-native`,拿到的是原生 shell;根侧 `restrict()` 不能点名保留名
171
+ `run_code`(只有 PTC executor 才会把它放进模型面,本仓只挂在 junior 的 preset 行)。
170
172
  - **省的是回合与抄写,不是安全升级**:`run_code` 里的 Node 仍能 `import('node:fs/promises')` /
171
173
  `fetch` / `child_process`;宿主沙箱只拦写。`# PROGRAM DISCIPLINE` 与
172
174
  `capital-data-query` §3.3 是纪律,不是边界;要硬隔离只能换容器 / VM / 远端 runtime。
@@ -189,11 +189,13 @@
189
189
  config:
190
190
  role: data_junior
191
191
 
192
- # PTC: presentation is preset-scoped; the host runtime (dsh-base) stays per-call.
192
+ # PTC executor is preset-scoped; the host runtime (dsh-base) stays per-call. 0.2.2 replaced
193
+ # the presentation selector with the executor row itself; `maxParallelSubCalls` is pinned
194
+ # to the documented 10 instead of inheriting the executor default.
193
195
  - id: tool-presentation
194
- name: '@deepseek-ai/dsh-agent-tool-presentation'
196
+ name: '@deepseek-ai/dsh-tool-executor-ptc'
195
197
  config:
196
- mode: ptc
198
+ maxParallelSubCalls: 10
197
199
 
198
200
  # ── compaction: both rows must live in one realm; thresholdChars 8192 is the instance-wide single value ──
199
201
  - id: compaction
@@ -664,12 +666,11 @@
664
666
  toolName: subagent_data_analyst
665
667
  agentPreset: capital-data-analyst
666
668
  # If this row is ever enabled, `query_dataset` stays aggregate-only: it must not reopen raw rows.
669
+ # 0.2.2 registers send_message / interrupt_agent / list_agents from the main entry; the
670
+ # old `list-agents` subpath is gone and a row naming it keeps the whole preset broken.
667
671
  - id: tool-subagent-control
668
672
  name: '@deepseek-ai/dsh-tool-subagent-control'
669
673
 
670
- - id: tool-subagent-list-agents
671
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
672
-
673
674
  - id: tool-ask-user
674
675
  name: '@deepseek-ai/dsh-tool-ask-user'
675
676
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v587d/watchlist",
3
- "version": "2.17.0",
3
+ "version": "2.19.0",
4
4
  "description": "自动模式的用户自选股(宿主级清单 + Fuyao 报价快照 + /capital-watchlist 路由 + 输入框菜单弹窗):由 @v587d/capital-generation 随包携带并作为 host 平面行挂载。",
5
5
  "license": "MIT",
6
6
  "type": "module",