@deepseek-ai/dsh-headless 0.1.2-rc.1 → 0.1.5-alpha.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.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/bundle/headless/README.md
5
- README.md: 644a96ebb19c9ccecbfb3a08fdf4182dc668f0e5
6
- README.zh.md: e1b954f876b7f90167e4dab313b88f66b1d20512
5
+ README.md: 98a9cb2294d8b05a40287c990b3ff53f755747cf
6
+ README.zh.md: 0f4721d856357a85964a13433c3bbc701f8fb299
package/README.md CHANGED
@@ -65,7 +65,7 @@ The runner awaits the complete application (`ctx.get('loader')?.await()`) so the
65
65
 
66
66
  ### Patch surface over base
67
67
 
68
- The patch rides over `dsh-base`: it inherits the projection cache, sets the coding persona on the base `system-prompt` row, keeps the same temporary process-wide PTC mode opt-in (`DSH_TOOLS_MODE`) as the Web surface, disables the shared HMR row, inserts PTC mode's worker as a core execution capability, and mounts the startup provider and the runner. The cache checkpoints each persisted one-shot session for later consumers; its durability barrier flushes each covered log prefix before publishing the cache row and may split otherwise coalesced JSONL runs. The startup provider ([`src/startup.ts`](src/startup.ts)) injects `ctx.cmdlineArgs` ([`dsh-cmdline`](../../boot/cmdline/README.md)), reads the positional argument, prints the app's `--help`, and provides `headlessStartup`; the runner injects that service and reads its task from lazy config.
68
+ The patch rides over `dsh-base`: it inherits the projection cache, sets the coding persona prefix and separate cwd suffix on the base `system-prompt` row, keeps the same temporary process-wide PTC mode opt-in (`DSH_TOOLS_MODE`) as the Web surface, disables the shared HMR row, inserts PTC mode's worker as a core execution capability, and mounts the startup provider and the runner. The cache checkpoints each persisted one-shot session for later consumers; its durability barrier flushes each covered log prefix before publishing the cache row and may split otherwise coalesced JSONL runs. The startup provider ([`src/startup.ts`](src/startup.ts)) injects `ctx.cmdlineArgs` ([`dsh-cmdline`](../../boot/cmdline/README.md)), reads the positional argument, prints the app's `--help`, and provides `headlessStartup`; the runner injects that service and reads its task from lazy config.
69
69
 
70
70
  ### Exit mapping
71
71
 
package/README.zh.md CHANGED
@@ -65,7 +65,7 @@ runner 等待整个应用结算(`ctx.get('loader')?.await()`),确保已组
65
65
 
66
66
  ### 叠加在 base 之上的 patch 表层
67
67
 
68
- patch 叠加在 `dsh-base` 之上:继承投影缓存,在基础 `system-prompt` 行上设置编码 persona,保留与 Web 表层相同的临时进程级 PTC mode 开关(`DSH_TOOLS_MODE`),禁用共享的 HMR 行,把 PTC mode 的 worker 作为核心执行能力插入,并挂载启动提供方与 runner。缓存为每个已持久化的一次性会话写入检查点,供后续消费方使用;其持久性屏障会在发布缓存行前 flush 所覆盖的日志前缀,因此可能拆分原本会合并的 JSONL 行。启动提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.zh.md)),读取位置参数、打印应用自己的 `--help`,并提供 `headlessStartup`;runner 注入该服务,再从惰性配置中读取任务。
68
+ patch 叠加在 `dsh-base` 之上:继承投影缓存,在基础 `system-prompt` 行上设置编码 persona 前缀与独立的 cwd 后缀,保留与 Web 表层相同的临时进程级 PTC mode 开关(`DSH_TOOLS_MODE`),禁用共享的 HMR 行,把 PTC mode 的 worker 作为核心执行能力插入,并挂载启动提供方与 runner。缓存为每个已持久化的一次性会话写入检查点,供后续消费方使用;其持久性屏障会在发布缓存行前 flush 所覆盖的日志前缀,因此可能拆分原本会合并的 JSONL 行。启动提供方([`src/startup.ts`](src/startup.ts))注入 `ctx.cmdlineArgs`([`dsh-cmdline`](../../boot/cmdline/README.zh.md)),读取位置参数、打印应用自己的 `--help`,并提供 `headlessStartup`;runner 注入该服务,再从惰性配置中读取任务。
69
69
 
70
70
  ### 退出映射
71
71
 
package/cordis.patch.yml CHANGED
@@ -6,8 +6,9 @@
6
6
 
7
7
  - id: system-prompt
8
8
  config:
9
- persona: >-
10
- You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
9
+ personaSuffix: Your working directory is {{cwd}}.
10
+ personaPrefix: >-
11
+ You are a coding agent powered by the {{model}} model.
11
12
 
12
13
  - id: tools
13
14
  config:
package/lib/index.js CHANGED
@@ -56,14 +56,13 @@ function summarize(session, firstSeq) {
56
56
  }
57
57
  /**
58
58
  * Project provider-reported reasoning from one owned run to stderr as it is
59
- * appended, while keeping final outcome derivation on the durable log.
60
- * @param ctx - plugin context carrying the Session event feed.
59
+ * streamed, while keeping final outcome derivation on the durable log.
60
+ * @param ctx - plugin context carrying the live Assistant frame feed.
61
61
  * @param agent - the exact Agent whose reasoning belongs to this invocation.
62
62
  * @param stderr - progress output sink.
63
63
  * @returns a disposer that also terminates an unterminated reasoning line.
64
64
  */
65
65
  function streamReasoning(ctx, agent, stderr) {
66
- let started = false;
67
66
  let open = false;
68
67
  let endsWithNewline = true;
69
68
  const close = () => {
@@ -72,15 +71,17 @@ function streamReasoning(ctx, agent, stderr) {
72
71
  open = false;
73
72
  endsWithNewline = true;
74
73
  };
75
- const dispose = ctx.on("session/event", (session, event) => {
76
- if (session !== agent.session) return;
77
- if (event.type === "turn/start") {
74
+ const dispose = ctx.on("agent/assistant-stream", ({ agent: subject, frame }) => {
75
+ if (subject !== agent) return;
76
+ if (frame.type === "start") {
77
+ close();
78
+ return;
79
+ }
80
+ if (frame.type === "end") {
78
81
  close();
79
- started = true;
80
82
  return;
81
83
  }
82
- if (!started || event.type !== "assistant/chunk") return;
83
- const chunk = event.data.chunk;
84
+ const chunk = frame.chunk;
84
85
  switch (chunk.type) {
85
86
  case "reasoning-delta":
86
87
  if (chunk.text === "") return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-headless",
3
3
  "description": "The dsh one-shot bundle: a direct core Agent/Session runner over dsh-base with no Host, HTTP, or browser layer",
4
- "version": "0.1.2-rc.1",
4
+ "version": "0.1.5-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -40,26 +40,28 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "commander": "^15.0.0",
43
- "@deepseek-ai/dsh-brand": "^0.1.2-rc.1",
44
- "@deepseek-ai/dsh-cmdline": "^0.1.2-rc.1",
45
- "@deepseek-ai/dsh-code-runtime-worker-thread": "^0.1.2-rc.1",
46
- "@deepseek-ai/dsh-util-values": "^0.1.2-rc.1",
43
+ "@deepseek-ai/dsh-brand": "^0.1.5-alpha.1",
44
+ "@deepseek-ai/dsh-cmdline": "^0.1.5-alpha.1",
45
+ "@deepseek-ai/dsh-code-runtime-worker-thread": "^0.1.5-alpha.1",
46
+ "@deepseek-ai/dsh-util-values": "^0.1.5-alpha.1",
47
47
  "@deepseek-ai/schemastery": "^3.18.2"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@deepseek-ai/cordis": "^4.0.2",
51
51
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
52
- "@deepseek-ai/dsh-agent": "^0.1.2-rc.1",
53
- "@deepseek-ai/dsh-agent-default-model": "^0.1.2-rc.1",
54
- "@deepseek-ai/dsh-llm": "^0.1.2-rc.1",
55
- "@deepseek-ai/dsh-session": "^0.1.2-rc.1"
52
+ "@deepseek-ai/dsh-agent": "^0.1.5-alpha.1",
53
+ "@deepseek-ai/dsh-agent-default-model": "^0.1.5-alpha.1",
54
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
55
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@deepseek-ai/cordis": "^4.0.2",
59
+ "@deepseek-ai/dsh-agent": "^0.1.5-alpha.1",
60
+ "@deepseek-ai/dsh-agent-loop": "^0.1.5-alpha.1",
61
+ "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.5-alpha.1",
62
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
63
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
59
64
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
60
- "@deepseek-ai/dsh-agent": "^0.1.2-rc.1",
61
- "@deepseek-ai/dsh-agent-default-model": "^0.1.2-rc.1",
62
- "@deepseek-ai/dsh-llm": "^0.1.2-rc.1",
63
- "@deepseek-ai/dsh-session": "^0.1.2-rc.1"
65
+ "@deepseek-ai/dsh-agent-default-model": "^0.1.5-alpha.1"
64
66
  }
65
67
  }