dsh-subagent-kimi 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+ Copyright (c) 2026 Saviio
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,117 @@
1
- # Temporary Holding Version
1
+ # dsh-subagent-kimi
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ English | [中文](README.zh.md)
4
+
5
+ A one-shot [Kimi Code CLI](https://www.kimi.com/code/docs/en/) subagent provider for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), using the Agent Client Protocol (ACP).
6
+
7
+ Each delegation starts a fresh Kimi process and ACP session in the selected workspace. The parent supplies one self-contained text task and receives the assistant text or a safe terminal diagnostic. Reasoning, tool traffic, and raw protocol messages stay out of the parent conversation.
8
+
9
+ ## Requirements
10
+
11
+ - Node.js 24.9.0 or later.
12
+ - DeepSeek Harness packages on the verified `0.2.1-rc.3` release line.
13
+ - Kimi Code authentication and provider settings configured through Kimi Code CLI. Run `kimi login` or configure Kimi normally before delegating.
14
+
15
+ The package pins `@moonshot-ai/kimi-code@2.3.1` and invokes its package-local CLI. It does **not** execute `kimi` from the host `PATH`, and there is no host-CLI fallback. Native Kimi configuration and authentication remain authoritative under `KIMI_CODE_HOME` or `~/.kimi-code`.
16
+
17
+ ## Install
18
+
19
+ Install `dsh-subagent-kimi` through the DeepSeek Harness plugin/bundle manager, or add it to the Node project containing your Harness composition:
20
+
21
+ ```sh
22
+ npm install dsh-subagent-kimi
23
+ ```
24
+
25
+ The bundle metadata loads `cordis.patch.yml`, registers the `kimi` provider, and exposes `subagent_kimi` as a global Harness tool. Loading the bundle does not start Kimi; a process is created only for an actual delegation.
26
+
27
+ To mount the provider and tool manually, use:
28
+
29
+ ```yaml
30
+ - insert:
31
+ - id: subagent-kimi
32
+ name: 'dsh-subagent-kimi'
33
+ - id: tool-subagent-kimi
34
+ name: '@deepseek-ai/dsh-tool-subagent'
35
+ config:
36
+ provider: kimi
37
+ toolName: subagent_kimi
38
+ maxDepth: provider-managed
39
+ ```
40
+
41
+ ## Configuration
42
+
43
+ ```yaml
44
+ - id: subagent-kimi
45
+ name: 'dsh-subagent-kimi'
46
+ config:
47
+ providerName: kimi
48
+ model: kimi-code/kimi-for-coding # optional
49
+ permissionMode: reject
50
+ env: {}
51
+ disposeEofGraceMs: 6000
52
+ disposeGraceMs: 3000
53
+ ```
54
+
55
+ | Field | Default | Meaning |
56
+ | --- | --- | --- |
57
+ | `providerName` | `kimi` | Non-empty registry name on `ctx.subagents`; each mounted instance needs a unique name. |
58
+ | `model` | Kimi native settings | Optional model alias set through ACP `session/set_config_option` after session creation. No alias discovery or rewriting is performed. |
59
+ | `env` | `{}` | Explicit child environment layered over the subprocess service's credential-scrubbed parent environment. |
60
+ | `permissionMode` | `reject` | ACP session mode and unattended permission behavior; see below. |
61
+ | `disposeEofGraceMs` | `6000` | Time in milliseconds allowed for cooperative shutdown after stdin EOF before termination escalation. |
62
+ | `disposeGraceMs` | `3000` | Process-observation and managed termination grace in milliseconds. Both grace values must be positive, finite, and within Node's timer limit. |
63
+
64
+ Credential-shaped ambient variables are scrubbed by the Harness subprocess service. Values explicitly present in `env` are forwarded, including credential-shaped values, so do not commit API keys to profile files.
65
+
66
+ ### Permission modes
67
+
68
+ | Value | ACP session mode | ACP permission requests |
69
+ | --- | --- | --- |
70
+ | `reject` | `default`; manual approvals | Cancel every request |
71
+ | `yolo` | `yolo`; routine edits and commands run under Kimi's native yolo policy | Cancel remaining requests, including risky actions and questions |
72
+ | `auto` | `auto`; Kimi's native automatic policy | Select the first `allow_once` or `allow_always` option if a request still arrives |
73
+
74
+ No mode creates a human interaction channel in the parent Harness session. `auto` can modify files and execute commands without human approval; use it only in trusted, appropriately isolated workspaces.
75
+
76
+ **`reject` is not a sandbox or a read-only guarantee.** It denies requests that Kimi sends over ACP, but operations Kimi permits without making an ACP request can still proceed. Use operating-system or Harness workspace isolation when side effects must be constrained.
77
+
78
+ ## Behavior
79
+
80
+ - The provider accepts only a non-empty sequence of text blocks. Images and other content types are rejected before a process starts.
81
+ - Every run uses a new package-local `node <kimi-code> acp` process and a new ACP session. There is no process pooling, follow-up input, or resume.
82
+ - Startup completes ACP `initialize`, `session/new`, `session/set_mode`, and optional `session/set_config_option` before publishing the run. Configuration failures use the `configure-session` stage and clean up the private process before rejecting.
83
+ - `session/prompt` executes exactly one task. Streamed `agent_message_chunk` text is collected; thoughts, plans, tool calls, and other updates are consumed but not returned.
84
+ - ACP stop reasons map to Harness `completed`, `max-tokens`, `refusal`, `aborted`, or `error`. Unknown reasons and a successful stop with no assistant text are treated as errors.
85
+ - Cancellation sends best-effort `session/cancel`, settles locally without waiting for a cooperative child, and remains backed by process teardown.
86
+ - Disposal closes stdin, waits for cooperative EOF shutdown, then escalates through the shared managed subprocess owner and waits for process-range quiescence.
87
+ - Failures expose only fixed product/stage/category facts and optional stop reason, exit code, and signal. Raw stderr, exception text, task content, environment values, paths, and protocol payloads are not copied into model-visible diagnostics. Internal Host logging retains the original error where available.
88
+
89
+ The provider advertises no optional start capabilities and does not inherit the parent conversation. Requests requiring `agentPreset`, `agentOptions`, structured output, or Harness-enforced depth limits are rejected by the shared subagent service.
90
+
91
+ ## Limitations
92
+
93
+ - Kimi ACP sessions are native Kimi sessions and may remain in Kimi's local session history after the one-shot run. This provider does not mark them ephemeral or delete them.
94
+ - The package does not create an account, log in, select a provider, or repair Kimi configuration. Authentication failures remain Kimi startup/prompt failures with safe diagnostics.
95
+ - One run is one text-only task. There is no continuation, resume, progress stream, or parent-context inheritance.
96
+ - There is no built-in wall-clock timeout and no rollback of files or external systems changed before cancellation.
97
+ - Native Kimi settings, hooks, skills, and account state can affect the child. Use an explicit isolated `KIMI_CODE_HOME` in `env` when deployment policy requires a separate Kimi home, and configure authentication there separately.
98
+ - Compatibility is pinned by development evidence to Kimi Code CLI 2.3.1, ACP SDK 1.4.0, and DeepSeek Harness 0.2.1-rc.3. Upgrade these together only after rerunning protocol and real-product verification.
99
+
100
+ ## Development
101
+
102
+ ```sh
103
+ npm install
104
+ npm run clean
105
+ npm run typecheck
106
+ npm run build
107
+ npm pack --dry-run
108
+ ```
109
+
110
+ The implementation follows DeepSeek Harness's Codex product-provider structure and adapts its ACP subprocess lifecycle for Kimi Code CLI. Upstream references:
111
+
112
+ - [`subagent-codex`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-codex)
113
+ - [`subagent-acp`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-acp)
114
+ - [Kimi `acp` reference](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-acp.html)
115
+ - [Kimi command reference](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html)
116
+
117
+ Released under MIT; see [LICENSE](LICENSE).
package/README.zh.md ADDED
@@ -0,0 +1,117 @@
1
+ # dsh-subagent-kimi
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的一次性 [Kimi Code CLI](https://www.kimi.com/code/docs/en/) 子智能体插件,通过 Agent Client Protocol(ACP)驱动真实 Kimi 进程。
6
+
7
+ 每次委派都会在指定工作目录中启动独立的 Kimi 进程和 ACP 会话。父会话传入一个自包含的文本任务,并接收助手回答或安全的终止诊断;推理过程、工具流量和原始协议消息不会进入父会话。
8
+
9
+ ## 环境要求
10
+
11
+ - Node.js 24.9.0 或更高版本。
12
+ - 已验证的 DeepSeek Harness `0.2.1-rc.3` 依赖线。
13
+ - 已通过 Kimi Code CLI 配置认证和模型提供商。委派前请先运行 `kimi login` 或按正常方式完成 Kimi 配置。
14
+
15
+ 本包固定依赖 `@moonshot-ai/kimi-code@2.3.1`,并调用该 npm 包内的 CLI;**不会**执行宿主机 `PATH` 中的 `kimi`,也没有宿主机 CLI 回退机制。Kimi 原生配置和认证仍以 `KIMI_CODE_HOME` 或 `~/.kimi-code` 为准。
16
+
17
+ ## 安装
18
+
19
+ 通过 DeepSeek Harness 插件/Bundle 管理器安装 `dsh-subagent-kimi`,或在承载 Harness 组合的 Node 项目中安装:
20
+
21
+ ```sh
22
+ npm install dsh-subagent-kimi
23
+ ```
24
+
25
+ Bundle 元数据会加载 `cordis.patch.yml`、注册 `kimi` provider,并将 `subagent_kimi` 添加为 Harness 全局工具。仅加载 Bundle 不会启动 Kimi;只有实际发生委派时才创建进程。
26
+
27
+ 如需手工挂载 provider 和工具:
28
+
29
+ ```yaml
30
+ - insert:
31
+ - id: subagent-kimi
32
+ name: 'dsh-subagent-kimi'
33
+ - id: tool-subagent-kimi
34
+ name: '@deepseek-ai/dsh-tool-subagent'
35
+ config:
36
+ provider: kimi
37
+ toolName: subagent_kimi
38
+ maxDepth: provider-managed
39
+ ```
40
+
41
+ ## 配置
42
+
43
+ ```yaml
44
+ - id: subagent-kimi
45
+ name: 'dsh-subagent-kimi'
46
+ config:
47
+ providerName: kimi
48
+ model: kimi-code/kimi-for-coding # 可选
49
+ permissionMode: reject
50
+ env: {}
51
+ disposeEofGraceMs: 6000
52
+ disposeGraceMs: 3000
53
+ ```
54
+
55
+ | 字段 | 默认值 | 含义 |
56
+ | --- | --- | --- |
57
+ | `providerName` | `kimi` | 在 `ctx.subagents` 中注册的非空名称;每个挂载实例必须使用不同名称。 |
58
+ | `model` | Kimi 原生设置 | 可选模型别名,在会话创建后通过 ACP `session/set_config_option` 设置,不发现或改写别名。 |
59
+ | `env` | `{}` | 显式子进程环境,叠加在 subprocess 服务清除凭据后的父环境之上。 |
60
+ | `permissionMode` | `reject` | ACP 会话模式和无人值守权限处理方式,见下表。 |
61
+ | `disposeEofGraceMs` | `6000` | stdin EOF 后等待协作式退出的毫秒数,超时才升级终止。 |
62
+ | `disposeGraceMs` | `3000` | 进程状态观察和托管终止的毫秒宽限期。两个值都必须为有限正数,且不能超过 Node 计时器上限。 |
63
+
64
+ Harness subprocess 服务会清除父环境中形似凭据的变量;`env` 中显式配置的值仍会转发,包括凭据类值。因此不要将 API key 提交到 Profile 文件。
65
+
66
+ ### 权限模式
67
+
68
+ | 值 | ACP 会话模式 | ACP 权限请求 |
69
+ | --- | --- | --- |
70
+ | `reject` | `default`,人工批准模式 | 取消所有请求 |
71
+ | `yolo` | `yolo`,常规编辑和命令按 Kimi 原生 yolo 策略执行 | 取消剩余请求,包括高风险操作和提问 |
72
+ | `auto` | `auto`,Kimi 原生自动策略 | 如果仍收到请求,选择首个 `allow_once` 或 `allow_always` 选项 |
73
+
74
+ 所有模式都不会在父 Harness 会话中建立人工交互通道。`auto` 可以在无人批准的情况下修改文件和执行命令,只应在可信且适当隔离的工作目录中使用。
75
+
76
+ **`reject` 不是沙箱,也不是只读保证。** 它只拒绝 Kimi 通过 ACP 发出的请求;Kimi 不发起 ACP 请求就直接允许的操作仍可能执行。需要限制副作用时,请使用操作系统或 Harness 工作区隔离。
77
+
78
+ ## 行为与结果
79
+
80
+ - 仅接受非空文本块序列;图片等内容类型会在启动进程前被拒绝。
81
+ - 每次运行都创建新的包内 `node <kimi-code> acp` 进程和 ACP 会话,不复用进程,不支持追加输入或恢复会话。
82
+ - ACP `initialize`、`session/new`、`session/set_mode` 和可选的 `session/set_config_option` 成功后才发布 run;配置失败使用 `configure-session` 阶段,并先清理尚未发布的私有进程。
83
+ - `session/prompt` 只执行一次任务。收集流式 `agent_message_chunk` 文本;思考、计划、工具调用等更新会被消费但不作为结果返回。
84
+ - ACP 停止原因映射为 Harness 的 `completed`、`max-tokens`、`refusal`、`aborted` 或 `error`。未知原因,以及声称成功却没有任何助手文本的情况,均按错误处理。
85
+ - 取消会尽力发送 `session/cancel`,在本地及时结算,并最终由进程清理兜底。
86
+ - 清理时先关闭 stdin 并等待 EOF 协作退出,再通过共享 subprocess 所有者分级终止,并等待整个进程范围静止。
87
+ - 失败诊断只包含固定的产品、阶段、类别,以及可选的停止原因、退出码和信号。原始 stderr、异常文本、任务内容、环境值、路径和协议负载不会复制到模型可见诊断中;Host 内部日志会保留可用的原始错误。
88
+
89
+ Provider 不继承父对话,也不声明任何可选 start capabilities。需要 `agentPreset`、`agentOptions`、结构化输出或 Harness 深度限制的请求会由共享 subagent 服务拒绝。
90
+
91
+ ## 限制
92
+
93
+ - Kimi ACP 会话是原生 Kimi 会话,一次性任务结束后可能仍保留在本地历史中。本插件不会将其标记为临时会话,也不会自动删除。
94
+ - 插件不会创建账号、登录、选择模型提供商或修复 Kimi 配置。认证问题会以安全的启动或 prompt 失败诊断呈现。
95
+ - 每次运行仅处理一个文本任务,不支持续聊、恢复、进度流或父上下文继承。
96
+ - 没有内置墙钟超时,也不会回滚取消前已经发生的文件或外部系统副作用。
97
+ - Kimi 原生设置、hooks、skills 和账号状态会影响子进程。部署策略需要独立 Kimi home 时,可在 `env` 中显式设置 `KIMI_CODE_HOME`,并在该 home 中单独配置认证。
98
+ - 当前兼容基线为 Kimi Code CLI 2.3.1、ACP SDK 1.4.0 和 DeepSeek Harness 0.2.1-rc.3。升级这些依赖后,应重新完成协议和真实产品验证。
99
+
100
+ ## 开发
101
+
102
+ ```sh
103
+ npm install
104
+ npm run clean
105
+ npm run typecheck
106
+ npm run build
107
+ npm pack --dry-run
108
+ ```
109
+
110
+ 实现参考 DeepSeek Harness 的 Codex 产品 provider 结构,并针对 Kimi Code CLI 调整其 ACP 子进程生命周期。上游资料:
111
+
112
+ - [`subagent-codex`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-codex)
113
+ - [`subagent-acp`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-acp)
114
+ - [Kimi `acp` 文档](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-acp.html)
115
+ - [Kimi 命令文档](https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html)
116
+
117
+ 基于 MIT 发布,详见 [LICENSE](LICENSE)。
@@ -0,0 +1,9 @@
1
+ - insert:
2
+ - id: subagent-kimi
3
+ name: 'dsh-subagent-kimi'
4
+ - id: tool-subagent-kimi
5
+ name: '@deepseek-ai/dsh-tool-subagent'
6
+ config:
7
+ provider: kimi
8
+ toolName: subagent_kimi
9
+ maxDepth: provider-managed
package/icon.svg ADDED
@@ -0,0 +1 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="15" y="15" width="12" height="12" rx="3" fill="url(#kimi_a)" fill-opacity="0.85"/><rect x="9" y="9" width="12" height="12" rx="3" fill="url(#kimi_b)" fill-opacity="0.85"/><defs><linearGradient id="kimi_a" x1="21" y1="15" x2="21" y2="27" gradientUnits="userSpaceOnUse"><stop stop-color="#8B7CFF"/><stop offset="1" stop-color="#4D3FD1"/></linearGradient><linearGradient id="kimi_b" x1="15" y1="9" x2="15" y2="21" gradientUnits="userSpaceOnUse"><stop stop-color="#69E4FF"/><stop offset="1" stop-color="#1677FF"/></linearGradient></defs></svg>
package/lib/index.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import z from '@deepseek-ai/schemastery';
3
+ import { type KimiPermissionMode } from './run.ts';
4
+ export declare const name = "subagent-kimi";
5
+ export declare const inject: string[];
6
+ export interface Config {
7
+ /** Provider name on `ctx.subagents` (default `kimi`). */
8
+ providerName?: string;
9
+ /** Kimi model alias fixed for this provider; omitted to inherit Kimi settings. */
10
+ model?: string;
11
+ /** Explicit environment entries layered over the scrubbed parent environment. */
12
+ env?: Record<string, string>;
13
+ /** ACP session mode and unattended permission behavior. */
14
+ permissionMode?: KimiPermissionMode;
15
+ /** Grace in milliseconds for cooperative EOF shutdown before termination. */
16
+ disposeEofGraceMs?: number;
17
+ /** Grace in milliseconds between managed subprocess termination tiers. */
18
+ disposeGraceMs?: number;
19
+ }
20
+ export declare const Config: z<Config>;
21
+ export declare function apply(ctx: Context, config: Config): void;
22
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js ADDED
@@ -0,0 +1,76 @@
1
+ import z from '@deepseek-ai/schemastery';
2
+ import { MAX_TIMER_DELAY_MS } from '@deepseek-ai/dsh-timeout';
3
+ import { assertPositiveFinite, assertUsableCwd, NO_START_CAPABILITIES, } from '@deepseek-ai/dsh-subagent';
4
+ import { DEFAULT_DISPOSE_EOF_GRACE_MS, DEFAULT_DISPOSE_GRACE_MS, DEFAULT_KIMI_PERMISSION_MODE, KIMI_PERMISSION_MODES, kimiConfigurationFailure, startKimiRun, } from "./run.js";
5
+ export const name = 'subagent-kimi';
6
+ export const inject = ['subagents', 'subprocess'];
7
+ const DEFAULT_PROVIDER_NAME = 'kimi';
8
+ export const Config = z.object({
9
+ providerName: z.string().min(1).default(DEFAULT_PROVIDER_NAME),
10
+ model: z.string().min(1),
11
+ env: z.dict(z.string()).default({}),
12
+ permissionMode: z.union([...KIMI_PERMISSION_MODES])
13
+ .default(DEFAULT_KIMI_PERMISSION_MODE),
14
+ disposeEofGraceMs: z.number().default(DEFAULT_DISPOSE_EOF_GRACE_MS),
15
+ disposeGraceMs: z.number().default(DEFAULT_DISPOSE_GRACE_MS),
16
+ });
17
+ class KimiProvider {
18
+ name;
19
+ ctx;
20
+ config;
21
+ capabilities = NO_START_CAPABILITIES;
22
+ inheritsParentContext = false;
23
+ constructor(name, ctx, config) {
24
+ this.name = name;
25
+ this.ctx = ctx;
26
+ this.config = config;
27
+ }
28
+ start(request) {
29
+ let cwd;
30
+ try {
31
+ cwd = assertUsableCwd('subagent-kimi', 'child cwd', request.cwd);
32
+ }
33
+ catch (error) {
34
+ if (request.signal.aborted) {
35
+ throw new Error('subagent-kimi: request was aborted before ACP startup');
36
+ }
37
+ const failure = kimiConfigurationFailure(error);
38
+ this.ctx.logger.warn(`subagent-kimi "${this.name}": child start failed: %o`, failure);
39
+ throw failure;
40
+ }
41
+ const spec = {
42
+ cwd,
43
+ ...this.config.model === undefined ? {} : { model: this.config.model },
44
+ permissionMode: this.config.permissionMode,
45
+ env: this.config.env,
46
+ disposeEofGraceMs: this.config.disposeEofGraceMs,
47
+ disposeGraceMs: this.config.disposeGraceMs,
48
+ spawn: spawnSpec => this.ctx.subprocess.spawn(spawnSpec),
49
+ onError: (error, stopReason) => {
50
+ this.ctx.logger.warn(`subagent-kimi "${this.name}": child run failed (${stopReason}): %o`, error);
51
+ },
52
+ };
53
+ return startKimiRun(request, spec);
54
+ }
55
+ }
56
+ export function apply(ctx, config) {
57
+ const resolved = {
58
+ providerName: config.providerName ?? DEFAULT_PROVIDER_NAME,
59
+ ...config.model === undefined ? {} : { model: config.model },
60
+ env: config.env ?? {},
61
+ permissionMode: config.permissionMode ?? DEFAULT_KIMI_PERMISSION_MODE,
62
+ disposeEofGraceMs: config.disposeEofGraceMs ?? DEFAULT_DISPOSE_EOF_GRACE_MS,
63
+ disposeGraceMs: config.disposeGraceMs ?? DEFAULT_DISPOSE_GRACE_MS,
64
+ };
65
+ for (const [field, value] of [
66
+ ['disposeEofGraceMs', resolved.disposeEofGraceMs],
67
+ ['disposeGraceMs', resolved.disposeGraceMs],
68
+ ]) {
69
+ assertPositiveFinite('subagent-kimi', field, value);
70
+ if (value > MAX_TIMER_DELAY_MS) {
71
+ throw new Error(`subagent-kimi: ${field} must be no greater than ${MAX_TIMER_DELAY_MS}`);
72
+ }
73
+ }
74
+ ctx.subagents.registerProvider(new KimiProvider(resolved.providerName, ctx, resolved));
75
+ }
76
+ //# sourceMappingURL=index.js.map
package/lib/run.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import { type ContentBlock as AcpContentBlock, type StopReason } from '@agentclientprotocol/sdk';
2
+ import type { ContentBlock } from '@deepseek-ai/dsh-llm';
3
+ import { type SubagentRun, type SubagentStartRequest, type SubagentStopReason } from '@deepseek-ai/dsh-subagent';
4
+ import type { SubprocessHandle, SubprocessSpawnSpec } from '@deepseek-ai/dsh-subprocess';
5
+ export type KimiPermissionMode = 'reject' | 'yolo' | 'auto';
6
+ export declare const KIMI_PERMISSION_MODES: readonly ["reject", "yolo", "auto"];
7
+ export declare const DEFAULT_KIMI_PERMISSION_MODE: KimiPermissionMode;
8
+ export declare const DEFAULT_DISPOSE_EOF_GRACE_MS = 6000;
9
+ export declare const DEFAULT_DISPOSE_GRACE_MS = 3000;
10
+ export interface KimiRunSpec {
11
+ readonly cwd: string;
12
+ readonly model?: string;
13
+ readonly permissionMode: KimiPermissionMode;
14
+ readonly env: Record<string, string>;
15
+ readonly disposeEofGraceMs: number;
16
+ readonly disposeGraceMs: number;
17
+ readonly spawn: (spec: SubprocessSpawnSpec) => SubprocessHandle;
18
+ readonly onError?: (error: Error, stopReason: SubagentStopReason) => void;
19
+ }
20
+ export declare function kimiConfigurationFailure(cause: unknown): Error;
21
+ export declare function kimiAcpArgv(): string[];
22
+ export declare function kimiTextTask(prompt: readonly ContentBlock[]): string[];
23
+ export declare function disposeKimiChild(child: SubprocessHandle, eofGraceMs: number): Promise<void>;
24
+ export declare function kimiStopReason(reason: StopReason): SubagentStopReason;
25
+ export declare function kimiContentText(content: AcpContentBlock): string;
26
+ export declare function startKimiRun(request: SubagentStartRequest, spec: KimiRunSpec): Promise<SubagentRun>;
27
+ //# sourceMappingURL=run.d.ts.map
package/lib/run.js ADDED
@@ -0,0 +1,452 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { readFileSync } from 'node:fs';
3
+ import { createRequire } from 'node:module';
4
+ import { dirname, resolve } from 'node:path';
5
+ import { Readable as NodeReadable, Writable as NodeWritable } from 'node:stream';
6
+ import { client as createAcpClientApp, methods, ndJsonStream, PROTOCOL_VERSION, } from '@agentclientprotocol/sdk';
7
+ import { brandString } from '@deepseek-ai/dsh-brand';
8
+ import { AssistantOutputFold, settleRunResult, subprocessRunHandle, } from '@deepseek-ai/dsh-subagent';
9
+ export const KIMI_PERMISSION_MODES = [
10
+ 'reject',
11
+ 'yolo',
12
+ 'auto',
13
+ ];
14
+ export const DEFAULT_KIMI_PERMISSION_MODE = 'reject';
15
+ export const DEFAULT_DISPOSE_EOF_GRACE_MS = 6_000;
16
+ export const DEFAULT_DISPOSE_GRACE_MS = 3_000;
17
+ const kimiPackageJsonPath = createRequire(import.meta.url)
18
+ .resolve('@moonshot-ai/kimi-code/package.json');
19
+ const kimiPackageManifest = JSON.parse(readFileSync(kimiPackageJsonPath, 'utf8'));
20
+ const KIMI_PACKAGE_BIN = resolve(dirname(kimiPackageJsonPath), kimiPackageManifest.bin.kimi);
21
+ const ACP_TOOL_KINDS = new Set([
22
+ 'read', 'edit', 'delete', 'move', 'search',
23
+ 'execute', 'think', 'fetch', 'switch_mode', 'other',
24
+ ]);
25
+ function failureDiagnostic(facts) {
26
+ const fields = [
27
+ 'product: Kimi Code CLI',
28
+ `stage: ${facts.stage}`,
29
+ `category: ${facts.category}`,
30
+ ];
31
+ if (facts.stopReason !== undefined) {
32
+ fields.push(`stop reason: ${facts.stopReason}`);
33
+ }
34
+ if (facts.outcome?.exitCode !== null && facts.outcome?.exitCode !== undefined) {
35
+ fields.push(`exit code: ${facts.outcome.exitCode}`);
36
+ }
37
+ if (facts.outcome?.signal !== null && facts.outcome?.signal !== undefined) {
38
+ fields.push(`signal: ${facts.outcome.signal}`);
39
+ }
40
+ return `Product subagent failure (${fields.join('; ')})`;
41
+ }
42
+ function permissionDiagnostic(permission) {
43
+ return `Kimi unattended decision (mode: ${permission.mode}; request: ${permission.request}; decision: ${permission.decision})`;
44
+ }
45
+ function diagnosticText(facts, permission) {
46
+ const failure = failureDiagnostic(facts);
47
+ return permission === undefined
48
+ ? failure
49
+ : `${failure}\n${permissionDiagnostic(permission)}`;
50
+ }
51
+ class KimiRunFailure extends Error {
52
+ constructor(facts, cause) {
53
+ super(`subagent-kimi: ${failureDiagnostic(facts)}`, cause === undefined ? undefined : { cause });
54
+ this.name = 'KimiRunFailure';
55
+ }
56
+ }
57
+ export function kimiConfigurationFailure(cause) {
58
+ return new KimiRunFailure({
59
+ stage: 'initialize',
60
+ category: 'configuration',
61
+ }, cause);
62
+ }
63
+ export function kimiAcpArgv() {
64
+ return [process.execPath, KIMI_PACKAGE_BIN, 'acp'];
65
+ }
66
+ export function kimiTextTask(prompt) {
67
+ if (prompt.length === 0) {
68
+ throw new Error('subagent-kimi: the one-shot task must contain only text blocks');
69
+ }
70
+ const texts = [];
71
+ for (const block of prompt) {
72
+ if (block.type !== 'text') {
73
+ throw new Error('subagent-kimi: the one-shot task must contain only text blocks');
74
+ }
75
+ texts.push(block.text);
76
+ }
77
+ if (texts.every(text => text.trim().length === 0)) {
78
+ throw new Error('subagent-kimi: the one-shot task must not be empty');
79
+ }
80
+ return texts;
81
+ }
82
+ function toError(value) {
83
+ return value instanceof Error ? value : new Error(String(value));
84
+ }
85
+ function reportFailure(spec, error) {
86
+ try {
87
+ spec.onError?.(toError(error), 'error');
88
+ }
89
+ catch {
90
+ // Logging must not replace the child failure.
91
+ }
92
+ }
93
+ function permissionRequestKind(kind) {
94
+ const candidate = kind ?? 'unknown';
95
+ return ACP_TOOL_KINDS.has(candidate) ? candidate : 'unknown';
96
+ }
97
+ async function rangeExitsWithin(child, ms) {
98
+ const controller = new AbortController();
99
+ const timer = setTimeout(() => { controller.abort(); }, ms);
100
+ try {
101
+ return await child.waitForExit(controller.signal);
102
+ }
103
+ finally {
104
+ clearTimeout(timer);
105
+ }
106
+ }
107
+ export async function disposeKimiChild(child, eofGraceMs) {
108
+ const failures = [];
109
+ child.stdin?.end();
110
+ let exited = false;
111
+ try {
112
+ exited = await rangeExitsWithin(child, eofGraceMs);
113
+ }
114
+ catch (error) {
115
+ failures.push(toError(error));
116
+ }
117
+ if (exited)
118
+ return;
119
+ child.terminate();
120
+ try {
121
+ await child.waitForExit();
122
+ }
123
+ catch (error) {
124
+ failures.push(toError(error));
125
+ }
126
+ if (failures.length === 1)
127
+ throw failures[0];
128
+ if (failures.length > 1) {
129
+ throw new AggregateError(failures, 'Kimi subprocess teardown failed');
130
+ }
131
+ }
132
+ export function kimiStopReason(reason) {
133
+ switch (reason) {
134
+ case 'end_turn':
135
+ return 'completed';
136
+ case 'max_tokens':
137
+ return 'max-tokens';
138
+ case 'refusal':
139
+ return 'refusal';
140
+ case 'cancelled':
141
+ return 'aborted';
142
+ case 'max_turn_requests':
143
+ return 'error';
144
+ default:
145
+ return 'error';
146
+ }
147
+ }
148
+ export function kimiContentText(content) {
149
+ return content.type === 'text' ? content.text : '';
150
+ }
151
+ function startupFailure(error, stage, outcome) {
152
+ return new KimiRunFailure(outcome === undefined
153
+ ? { stage, category: 'transport' }
154
+ : { stage, category: 'process-exit', outcome }, error);
155
+ }
156
+ function terminalFailure(reason, permission) {
157
+ switch (reason) {
158
+ case 'end_turn':
159
+ return undefined;
160
+ case 'max_turn_requests':
161
+ return diagnosticText({
162
+ stage: 'prompt',
163
+ category: 'remote-limit',
164
+ stopReason: 'max_turn_requests',
165
+ }, permission);
166
+ case 'max_tokens':
167
+ case 'refusal':
168
+ case 'cancelled':
169
+ return permission === undefined
170
+ ? undefined
171
+ : permissionDiagnostic(permission);
172
+ default:
173
+ return diagnosticText({
174
+ stage: 'prompt',
175
+ category: 'unknown',
176
+ stopReason: 'unknown',
177
+ }, permission);
178
+ }
179
+ }
180
+ export async function startKimiRun(request, spec) {
181
+ const texts = kimiTextTask(request.prompt);
182
+ if (request.signal.aborted) {
183
+ throw new Error('subagent-kimi: request was aborted before ACP startup');
184
+ }
185
+ const id = brandString(randomUUID());
186
+ let child;
187
+ try {
188
+ child = spec.spawn({
189
+ argv: kimiAcpArgv(),
190
+ cwd: spec.cwd,
191
+ stdio: { stdin: 'pipe', stdout: 'pipe', stderr: 'inherit' },
192
+ graceMs: spec.disposeGraceMs,
193
+ env: spec.env,
194
+ });
195
+ }
196
+ catch (error) {
197
+ reportFailure(spec, error);
198
+ throw new KimiRunFailure({
199
+ stage: 'process',
200
+ category: 'process-start',
201
+ }, error);
202
+ }
203
+ if (child.stdin === undefined || child.stdout === undefined) {
204
+ child.terminate();
205
+ await child.waitForExit().catch(() => false);
206
+ throw new KimiRunFailure({
207
+ stage: 'process',
208
+ category: 'process-start',
209
+ });
210
+ }
211
+ let processOutcome;
212
+ let processFailure;
213
+ const processDone = child.done.then((outcome) => {
214
+ processOutcome = outcome;
215
+ return outcome;
216
+ }, (error) => {
217
+ processFailure = toError(error);
218
+ throw processFailure;
219
+ });
220
+ const processRejected = processDone.then(() => new Promise(() => { }), (error) => Promise.reject(toError(error)));
221
+ processRejected.catch(() => { });
222
+ const observeProcessOutcome = async (signal) => {
223
+ if (processOutcome !== undefined)
224
+ return processOutcome;
225
+ const timeout = AbortSignal.timeout(Math.ceil(spec.disposeGraceMs));
226
+ const bound = signal === undefined
227
+ ? timeout
228
+ : AbortSignal.any([signal, timeout]);
229
+ const aborted = Promise.withResolvers();
230
+ const onObservationAbort = () => { aborted.resolve(undefined); };
231
+ bound.addEventListener('abort', onObservationAbort, { once: true });
232
+ if (bound.aborted)
233
+ onObservationAbort();
234
+ try {
235
+ return await Promise.race([processDone, aborted.promise]);
236
+ }
237
+ catch {
238
+ return processOutcome;
239
+ }
240
+ finally {
241
+ bound.removeEventListener('abort', onObservationAbort);
242
+ }
243
+ };
244
+ let processDisposal;
245
+ const disposeProcess = () => (processDisposal ??= disposeKimiChild(child, spec.disposeEofGraceMs));
246
+ const fold = new AssistantOutputFold();
247
+ const flags = { cancelled: false };
248
+ let latestPermission;
249
+ const acpPermission = spec.permissionMode === 'auto' ? 'allow' : 'reject';
250
+ const clientApp = createAcpClientApp({ name: 'dsh-subagent-kimi' })
251
+ .onNotification(methods.client.session.update, ({ params }) => {
252
+ const update = params.update;
253
+ if (update.sessionUpdate === 'agent_message_chunk') {
254
+ fold.pushText(kimiContentText(update.content));
255
+ }
256
+ return Promise.resolve();
257
+ })
258
+ .onRequest(methods.client.session.requestPermission, ({ params }) => {
259
+ if (acpPermission === 'allow') {
260
+ const allow = params.options.find(option => option.kind === 'allow_once' || option.kind === 'allow_always');
261
+ if (allow !== undefined) {
262
+ latestPermission = {
263
+ mode: spec.permissionMode,
264
+ request: permissionRequestKind(params.toolCall.kind),
265
+ decision: 'allowed',
266
+ };
267
+ return Promise.resolve({
268
+ outcome: { outcome: 'selected', optionId: allow.optionId },
269
+ });
270
+ }
271
+ }
272
+ latestPermission = {
273
+ mode: spec.permissionMode,
274
+ request: permissionRequestKind(params.toolCall.kind),
275
+ decision: 'denied',
276
+ };
277
+ return Promise.resolve({ outcome: { outcome: 'cancelled' } });
278
+ });
279
+ const connection = clientApp.connect(ndJsonStream(NodeWritable.toWeb(child.stdin), NodeReadable.toWeb(child.stdout)));
280
+ const agent = connection.agent;
281
+ let sessionId;
282
+ let startupStage = 'initialize';
283
+ let signalCancelSettled;
284
+ const cancelSettled = new Promise((resolve) => {
285
+ signalCancelSettled = resolve;
286
+ });
287
+ const requestCancel = () => {
288
+ if (flags.cancelled)
289
+ return;
290
+ flags.cancelled = true;
291
+ signalCancelSettled();
292
+ if (sessionId !== undefined) {
293
+ void agent.notify(methods.agent.session.cancel, { sessionId })
294
+ .catch(() => { });
295
+ }
296
+ };
297
+ const onAbort = () => { requestCancel(); };
298
+ request.signal.addEventListener('abort', onAbort, { once: true });
299
+ const collectOutput = () => fold.collect() ?? [];
300
+ try {
301
+ await Promise.race([
302
+ (async () => {
303
+ await agent.request(methods.agent.initialize, {
304
+ protocolVersion: PROTOCOL_VERSION,
305
+ clientCapabilities: {},
306
+ });
307
+ startupStage = 'new-session';
308
+ const session = await agent.request(methods.agent.session.new, {
309
+ cwd: spec.cwd,
310
+ mcpServers: [],
311
+ });
312
+ const returnedSessionId = Reflect.get(session, 'sessionId');
313
+ if (typeof returnedSessionId !== 'string' || returnedSessionId.length === 0) {
314
+ throw new KimiRunFailure({
315
+ stage: 'new-session',
316
+ category: 'protocol',
317
+ }, new Error('Kimi ACP published without a session id'));
318
+ }
319
+ sessionId = returnedSessionId;
320
+ startupStage = 'configure-session';
321
+ await agent.request(methods.agent.session.setMode, {
322
+ sessionId: returnedSessionId,
323
+ modeId: spec.permissionMode === 'reject' ? 'default' : spec.permissionMode,
324
+ });
325
+ if (spec.model !== undefined) {
326
+ await agent.request(methods.agent.session.setConfigOption, {
327
+ sessionId: returnedSessionId,
328
+ configId: 'model',
329
+ value: spec.model,
330
+ });
331
+ }
332
+ if (flags.cancelled) {
333
+ throw new Error('subagent-kimi: cancelled before the ACP session started');
334
+ }
335
+ })(),
336
+ processRejected,
337
+ cancelSettled.then(() => {
338
+ throw new Error('subagent-kimi: cancelled before the ACP session started');
339
+ }),
340
+ ]);
341
+ }
342
+ catch (error) {
343
+ request.signal.removeEventListener('abort', onAbort);
344
+ const cancelledBeforeCleanup = flags.cancelled;
345
+ const observedOutcome = !cancelledBeforeCleanup && !(error instanceof KimiRunFailure)
346
+ ? await observeProcessOutcome()
347
+ : undefined;
348
+ const startup = cancelledBeforeCleanup
349
+ ? { kind: 'cancelled' }
350
+ : {
351
+ kind: 'failed',
352
+ failure: error instanceof KimiRunFailure
353
+ ? error
354
+ : startupFailure(error, startupStage, observedOutcome),
355
+ };
356
+ if (startup.kind === 'failed') {
357
+ reportFailure(spec, error instanceof KimiRunFailure ? error.cause : processFailure ?? error);
358
+ }
359
+ try {
360
+ await disposeProcess();
361
+ }
362
+ catch (cleanupError) {
363
+ reportFailure(spec, cleanupError);
364
+ const cleanupFailure = new KimiRunFailure({
365
+ stage: 'teardown',
366
+ category: processOutcome === undefined ? 'unknown' : 'process-exit',
367
+ ...processOutcome === undefined ? {} : { outcome: processOutcome },
368
+ }, cleanupError);
369
+ if (startup.kind === 'cancelled') {
370
+ throw new AggregateError([cleanupFailure], cleanupFailure.message);
371
+ }
372
+ throw new AggregateError([startup.failure, cleanupFailure], `${startup.failure.message}; ${cleanupFailure.message}`);
373
+ }
374
+ if (startup.kind === 'cancelled') {
375
+ throw new Error('subagent-kimi: request was aborted before ACP startup');
376
+ }
377
+ throw startup.failure;
378
+ }
379
+ if (sessionId === undefined) {
380
+ throw new Error('subagent-kimi: ACP startup fulfilled without a session id');
381
+ }
382
+ const remoteSessionId = sessionId;
383
+ let diagnostic;
384
+ const result = settleRunResult({
385
+ attempt: async () => {
386
+ try {
387
+ const promptResult = await Promise.race([
388
+ agent.request(methods.agent.session.prompt, {
389
+ sessionId: remoteSessionId,
390
+ prompt: texts.map(text => ({ type: 'text', text })),
391
+ }),
392
+ cancelSettled.then(() => {
393
+ throw new Error('subagent-kimi: cancelled while the ACP prompt was running');
394
+ }),
395
+ ]);
396
+ const stopReason = kimiStopReason(promptResult.stopReason);
397
+ const output = collectOutput();
398
+ const hasAnswer = output.some(block => block.type === 'text' && block.text.trim().length > 0);
399
+ diagnostic = terminalFailure(promptResult.stopReason, latestPermission);
400
+ if (stopReason === 'completed' && !hasAnswer) {
401
+ diagnostic = diagnosticText({
402
+ stage: 'prompt',
403
+ category: 'invalid-result',
404
+ }, latestPermission);
405
+ return { output, diagnostic, stopReason: 'error' };
406
+ }
407
+ return {
408
+ output,
409
+ ...diagnostic === undefined ? {} : { diagnostic },
410
+ stopReason,
411
+ };
412
+ }
413
+ catch (error) {
414
+ if (!flags.cancelled) {
415
+ const outcome = await observeProcessOutcome(request.signal);
416
+ const facts = outcome === undefined
417
+ ? { stage: 'prompt', category: 'transport' }
418
+ : { stage: 'process', category: 'process-exit', outcome };
419
+ diagnostic = diagnosticText(facts, latestPermission);
420
+ }
421
+ throw processFailure ?? error;
422
+ }
423
+ },
424
+ collectOutput,
425
+ collectDiagnostic: () => diagnostic,
426
+ cancelled: () => flags.cancelled,
427
+ onError: spec.onError,
428
+ signal: request.signal,
429
+ onAbort,
430
+ });
431
+ return subprocessRunHandle({
432
+ id,
433
+ result,
434
+ signal: request.signal,
435
+ onAbort,
436
+ requestCancel,
437
+ teardown: async () => {
438
+ try {
439
+ await disposeProcess();
440
+ }
441
+ catch (error) {
442
+ reportFailure(spec, error);
443
+ throw new KimiRunFailure({
444
+ stage: 'teardown',
445
+ category: processOutcome === undefined ? 'unknown' : 'process-exit',
446
+ ...processOutcome === undefined ? {} : { outcome: processOutcome },
447
+ }, error);
448
+ }
449
+ },
450
+ });
451
+ }
452
+ //# sourceMappingURL=run.js.map
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Kimi subagent",
4
+ "description": "Delegate one task to Kimi Code CLI using its native authentication and settings."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Kimi 子智能体",
4
+ "description": "使用 Kimi Code CLI 原生认证和设置委派单个任务。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,105 @@
1
1
  {
2
2
  "name": "dsh-subagent-kimi",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "One-shot Kimi Code CLI subagent provider for DeepSeek Harness over ACP",
5
+ "keywords": [
6
+ "deepseek-harness",
7
+ "dsh",
8
+ "kimi",
9
+ "kimi-code",
10
+ "subagent",
11
+ "acp",
12
+ "cordis"
13
+ ],
14
+ "license": "MIT",
15
+ "author": "Saviio",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/Saviio/dsh-subagent-kimi.git"
19
+ },
20
+ "homepage": "https://github.com/Saviio/dsh-subagent-kimi#readme",
21
+ "bugs": {
22
+ "url": "https://github.com/Saviio/dsh-subagent-kimi/issues"
23
+ },
24
+ "type": "module",
25
+ "main": "lib/index.js",
26
+ "types": "lib/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./lib/index.d.ts",
30
+ "default": "./lib/index.js"
31
+ },
32
+ "./package.json": "./package.json",
33
+ "./locale/*.json": "./locale/*.json",
34
+ "./cordis.patch.yml": "./cordis.patch.yml"
35
+ },
36
+ "files": [
37
+ "icon.svg",
38
+ "locale/*.json",
39
+ "lib/**/*.js",
40
+ "lib/**/*.d.ts",
41
+ "cordis.patch.yml"
42
+ ],
43
+ "engines": {
44
+ "node": ">=24.9.0"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "dsh": {
50
+ "bundle": {
51
+ "patch": "./cordis.patch.yml"
52
+ }
53
+ },
54
+ "icon": "./icon.svg",
55
+ "scripts": {
56
+ "clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
57
+ "build": "tsc -p tsconfig.json",
58
+ "typecheck": "tsc -p tsconfig.json --noEmit",
59
+ "prepack": "npm run clean && npm run build"
60
+ },
61
+ "peerDependencies": {
62
+ "@deepseek-ai/cordis": "~4.0.5",
63
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.3",
64
+ "@deepseek-ai/dsh-session": "0.2.1-rc.3",
65
+ "@deepseek-ai/dsh-subagent": "0.2.1-rc.3",
66
+ "@deepseek-ai/dsh-subprocess": "0.2.1-rc.3",
67
+ "@deepseek-ai/dsh-timeout": "0.2.1-rc.3"
68
+ },
69
+ "dependencies": {
70
+ "@agentclientprotocol/sdk": "1.4.0",
71
+ "@deepseek-ai/dsh-brand": "0.2.1-rc.3",
72
+ "@deepseek-ai/dsh-tool-subagent": "0.2.1-rc.3",
73
+ "@deepseek-ai/schemastery": "~3.18.5",
74
+ "@moonshot-ai/kimi-code": "2.3.1"
75
+ },
76
+ "devDependencies": {
77
+ "@deepseek-ai/cordis": "~4.0.5",
78
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6",
79
+ "@deepseek-ai/dsh-agent": "0.2.1-rc.3",
80
+ "@deepseek-ai/dsh-app-boot": "0.2.1-rc.3",
81
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.3",
82
+ "@deepseek-ai/dsh-loader-smoke": "0.2.1-rc.3",
83
+ "@deepseek-ai/dsh-session": "0.2.1-rc.3",
84
+ "@deepseek-ai/dsh-session-checkpoint-policy": "0.2.1-rc.3",
85
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-rc.3",
86
+ "@deepseek-ai/dsh-session-projection": "0.2.1-rc.3",
87
+ "@deepseek-ai/dsh-subagent": "0.2.1-rc.3",
88
+ "@deepseek-ai/dsh-subprocess": "0.2.1-rc.3",
89
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-rc.3",
90
+ "@deepseek-ai/dsh-timeout": "0.2.1-rc.3",
91
+ "@deepseek-ai/dsh-tool-jobs": "0.2.1-rc.3",
92
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.3",
93
+ "@types/node": "^24.10.1",
94
+ "tsx": "^4.23.13",
95
+ "typescript": "^6.0.3"
96
+ },
97
+ "allowScripts": {
98
+ "@deepseek-ai/dsh-subprocess-local@0.2.1-rc.3": true,
99
+ "node-pty@1.1.0": true,
100
+ "node-pty@1.2.0-beta.15": true,
101
+ "koffi@3.1.1": true,
102
+ "esbuild@0.28.2": true,
103
+ "@moonshot-ai/kimi-code": false
104
+ }
105
+ }