tianshu-mcp 0.1.9 → 0.2.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.en.md +58 -0
- package/CHANGELOG.md +52 -0
- package/README.en.md +159 -20
- package/README.md +157 -22
- package/dist/agents/adapter.d.ts +23 -0
- package/dist/agents/builtin.js +49 -4
- package/dist/agents/registry.js +136 -21
- package/dist/agents/traework/cdp/client.js +10 -1
- package/dist/agents/traework/run.js +19 -5
- package/dist/agents/zcode/adapter.d.ts +9 -0
- package/dist/agents/zcode/adapter.js +67 -0
- package/dist/agents/zcode/cdp.d.ts +55 -0
- package/dist/agents/zcode/cdp.js +191 -0
- package/dist/agents/zcode/dialog.d.ts +14 -0
- package/dist/agents/zcode/dialog.js +353 -0
- package/dist/agents/zcode/discovery.d.ts +16 -0
- package/dist/agents/zcode/discovery.js +163 -0
- package/dist/agents/zcode/instance.d.ts +24 -0
- package/dist/agents/zcode/instance.js +144 -0
- package/dist/agents/zcode/liveness.d.ts +22 -0
- package/dist/agents/zcode/liveness.js +34 -0
- package/dist/agents/zcode/model.d.ts +16 -0
- package/dist/agents/zcode/model.js +31 -0
- package/dist/agents/zcode/project.d.ts +10 -0
- package/dist/agents/zcode/project.js +25 -0
- package/dist/agents/zcode/references.d.ts +6 -0
- package/dist/agents/zcode/references.js +32 -0
- package/dist/agents/zcode/run.d.ts +20 -0
- package/dist/agents/zcode/run.js +557 -0
- package/dist/agents/zcode/selectors.d.ts +10 -0
- package/dist/agents/zcode/selectors.js +168 -0
- package/dist/config/schema.d.ts +111 -0
- package/dist/config/schema.js +36 -4
- package/dist/loop/fix-loop.js +63 -18
- package/dist/loop/repair-plan.d.ts +0 -2
- package/dist/loop/repair-plan.js +8 -15
- package/dist/mcp/context.js +13 -0
- package/dist/mcp/formatter.d.ts +8 -0
- package/dist/mcp/formatter.js +8 -0
- package/dist/mcp/handlers.d.ts +1 -0
- package/dist/mcp/handlers.js +60 -16
- package/dist/mcp/tools.d.ts +1 -1
- package/dist/mcp/tools.js +10 -3
- package/dist/server.js +9 -4
- package/dist/tasks/task-manager.d.ts +6 -0
- package/dist/tasks/task-manager.js +46 -0
- package/dist/tasks/task-store.d.ts +6 -0
- package/dist/tasks/task-store.js +40 -10
- package/dist/tasks/task.d.ts +14 -2
- package/dist/tasks/task.js +18 -2
- package/dist/util/log.js +8 -7
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/package.json +10 -3
- package/scripts/prepare-zcode-fixture.mjs +45 -0
- package/scripts/probe-zcode.mjs +302 -0
- package/scripts/smoke-zcode.mjs +126 -0
- package/skills/tianshu-mcp/SKILL.md +5 -4
- package/skills/tianshu-mcp/usage-examples.md +20 -3
package/CHANGELOG.en.md
CHANGED
|
@@ -18,6 +18,64 @@ Chinese version: [CHANGELOG.md](CHANGELOG.md)
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## [0.2.0] — 2026-09-11
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Dedicated `zcode-gui` Electron CDP adapter with data-driven Windows/macOS discovery, dynamic ports, product/process checks, and a global serial lock.
|
|
26
|
+
- Exact ZCode project binding, guarded native folder pickers, `provider/model`, Full Access read-back, and idempotent sending.
|
|
27
|
+
- Paused `needs_user` state and approval-gated `continue_task` for original-session answers and environment rechecks after instance, login, or permission handling.
|
|
28
|
+
- Multi-signal liveness, progress events, UI preservation, default auto-verification, and two same-session repair rounds. Repair plans stay in MCP task storage.
|
|
29
|
+
- `scripts/probe-zcode.mjs`, fake-CDP/state/path/model tests, and bilingual documentation.
|
|
30
|
+
|
|
31
|
+
### Safety and compatibility
|
|
32
|
+
|
|
33
|
+
- GUI profiles support an explicit `adapter`; legacy `driver="gui"` profiles retain TraeWork behavior.
|
|
34
|
+
- The built-in ZCode profile remains `research` until both real platform loops pass.
|
|
35
|
+
- No private `app-server`, credential access, automatic user-instance termination, or fixed screen coordinates.
|
|
36
|
+
|
|
37
|
+
### Fixed and verified
|
|
38
|
+
|
|
39
|
+
- Fixed ZCode read-back for dynamic model labels, transient renderer load/reload, delayed new-session registration, and stale session-ID contamination.
|
|
40
|
+
- `AskUserQuestion` continuation now selects and submits an exact accessible option in the original session; zero or ambiguous matches fail closed.
|
|
41
|
+
- Windows 10 x64 passed three hardware loops: real file development, same-session repair after a controlled failure, and `continue_task` after a model question. macOS hardware evidence remains pending.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [0.1.10] — 2026-09-10
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- **Fixed stdio log pollution (issue #1)**: the unified logger previously sent only ERROR to
|
|
50
|
+
`console.error` while INFO/WARN/DEBUG went to `console.log`, sharing stdout with MCP JSON-RPC
|
|
51
|
+
messages and breaking handshakes or tool calls in strict stdio clients. All levels passing the
|
|
52
|
+
threshold now go to stderr, leaving stdout for valid MCP messages only.
|
|
53
|
+
- Log file appending, timestamps, level tags and the `<data dir>/logs/server.log` path are unchanged;
|
|
54
|
+
a startup failure is still reported on stderr.
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- New `scripts/check-stdio.mjs` strict stdio smoke: a real child process validates the complete
|
|
59
|
+
stdout/stderr byte stream, allowing only newline-delimited, schema-valid MCP JSON-RPC messages on
|
|
60
|
+
stdout; empty lines, non-JSON lines, parser errors, or trailing fragments at exit fail the run.
|
|
61
|
+
It covers six scenarios: first start, second start with matching skills, `--no-skill-install`,
|
|
62
|
+
a corrupt `config.json`, logs during a stub task, and clean EOF shutdown.
|
|
63
|
+
- New `npm run check:stdio` and `npm run check:stdio:src` scripts.
|
|
64
|
+
|
|
65
|
+
### Tests
|
|
66
|
+
|
|
67
|
+
- New `test/unit/log.test.ts`: real-child-process checks for the four log levels' channels, default
|
|
68
|
+
INFO filtering, threshold-filtered file logging, and UTF-8 content (4/6 failed before the fix; see
|
|
69
|
+
`docs/m2-evidence/issue1-old-impl-log-test-failure.txt`).
|
|
70
|
+
- CI's three-platform matrix now includes Node 24; the build step runs the strict stdio check instead
|
|
71
|
+
of an EOF-exit-only smoke.
|
|
72
|
+
- CI `pack-check` and Release install the freshly built tarball into a clean consumer directory, read
|
|
73
|
+
the installed bin dynamically, and reuse the same strict stdio check; Release adds `lint` and the
|
|
74
|
+
installed-package protocol gate, failing before a draft is created.
|
|
75
|
+
- ESLint enables `no-console` (allowing `error` only) for `src/**/*.ts` to prevent new direct stdout writes.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
21
79
|
## [0.1.9] — 2026-09-09
|
|
22
80
|
|
|
23
81
|
### Fixed
|
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,58 @@
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## [0.2.0] — 2026-09-11
|
|
21
|
+
|
|
22
|
+
### 新增
|
|
23
|
+
|
|
24
|
+
- 独立 `zcode-gui` Electron CDP adapter:数据驱动 Windows/macOS 安装探测、动态端口、产品/进程归属核验和全局串行锁。
|
|
25
|
+
- ZCode 精确项目绑定、受守卫的原生文件夹面板、`供应商/模型`、完全访问回读和幂等发送。
|
|
26
|
+
- `needs_user` 暂停状态与需审批的 `continue_task`,支持原会话问题回答及旧实例、登录、系统权限处理后的环境复检。
|
|
27
|
+
- 多信号运行检测、进度事件、现场保留、默认自动验收和 2 轮同会话返修;返修计划只写 MCP 任务数据目录。
|
|
28
|
+
- `scripts/probe-zcode.mjs`、假 CDP/状态机/路径/模型测试和中英文文档。
|
|
29
|
+
|
|
30
|
+
### 安全与兼容
|
|
31
|
+
|
|
32
|
+
- GUI profile 新增显式 `adapter`;旧 `driver="gui"` 配置继续按 TraeWork 兼容。
|
|
33
|
+
- ZCode 双平台真实闭环证据完成前,内置 profile 保持 `research`。
|
|
34
|
+
- 不调用未公开 `app-server`,不读取凭证,不关闭用户实例,不使用固定屏幕坐标。
|
|
35
|
+
|
|
36
|
+
### 修复与验收
|
|
37
|
+
|
|
38
|
+
- 修复 ZCode 动态模型标签的回读解析、渲染器短暂繁忙/重载、新会话延迟登记和旧会话 ID 污染。
|
|
39
|
+
- 续答 `AskUserQuestion` 时改为在原会话可访问问题卡片中精确选项并提交;零匹配或多匹配时 fail-closed。
|
|
40
|
+
- Windows 10 x64 真机已通过文件开发、受控失败后同会话返修、模型提问后 `continue_task` 续跑三个闭环;macOS 真机仍待补齐。
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## [0.1.10] — 2026-09-10
|
|
45
|
+
|
|
46
|
+
### 修复
|
|
47
|
+
|
|
48
|
+
- **修复 stdio 日志污染(issue #1)**:统一日志模块此前只有 ERROR 走 `console.error`,
|
|
49
|
+
INFO/WARN/DEBUG 都走 `console.log`,与 MCP JSON-RPC 消息共用 stdout,导致严格 stdio 客户端
|
|
50
|
+
握手或工具调用失败。现在所有通过阈值的级别一律写 stderr,stdout 只承载合法 MCP 消息。
|
|
51
|
+
- 日志文件追加、时间戳、级别标签与 `<数据目录>/logs/server.log` 路径保持不变;启动失败仍以 stderr 报错。
|
|
52
|
+
|
|
53
|
+
### 新增
|
|
54
|
+
|
|
55
|
+
- 新增 `scripts/check-stdio.mjs` 严格 stdio 冒烟:真实子进程按字节校验完整 stdout/stderr,
|
|
56
|
+
stdout 只允许有换行分隔的合法 MCP JSON-RPC 消息(官方 schema 校验),空行 / 非 JSON / parser error /
|
|
57
|
+
退出残留片段任意一条即失败。覆盖首次启动、已有技能再次启动、`--no-skill-install`、
|
|
58
|
+
损坏 `config.json`、stub 任务运行期日志、正常 EOF 关闭六个场景。
|
|
59
|
+
- 新增 `npm run check:stdio` 与 `npm run check:stdio:src` 脚本。
|
|
60
|
+
|
|
61
|
+
### 测试
|
|
62
|
+
|
|
63
|
+
- 新增 `test/unit/log.test.ts`:以真实子进程验证四级日志的输出通道、默认 INFO 过滤、阈值过滤后的
|
|
64
|
+
文件日志与 UTF-8 内容(修复前 4/6 失败,见 `docs/m2-evidence/issue1-old-impl-log-test-failure.txt`)。
|
|
65
|
+
- CI 三平台矩阵增加 Node 24;构建后用严格 stdio 检查替换仅验证 EOF 退出的冒烟。
|
|
66
|
+
- CI `pack-check` 与 Release 把本次 tarball 安装到干净消费者目录,动态读取已安装 bin 并复用同一严格
|
|
67
|
+
stdio 检查;Release 增加 `lint` 与安装包协议门禁,失败即阻断草稿创建。
|
|
68
|
+
- ESLint 对 `src/**/*.ts` 启用 `no-console`(仅允许 `error`),防止再次向 stdout 直接输出。
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
20
72
|
## [0.1.9] — 2026-09-09
|
|
21
73
|
|
|
22
74
|
### 修复
|
package/README.en.md
CHANGED
|
@@ -34,21 +34,44 @@ Registered by Tianshu as a standard MCP server, it dispatches external AI-Agents
|
|
|
34
34
|
|
|
35
35
|
Tianshu plays the role of the overall commander; this MCP server is the **scheduler + execution surface + objective acceptance gate**; the external AI-Agent (Codex CLI, TraeWork GUI) is the "worker" that does the development.
|
|
36
36
|
|
|
37
|
-
- **
|
|
37
|
+
- **9 MCP tools**: `run_task / continue_task / query_task / list_tasks / get_task_report / cancel_task / verify_task / rework_task / get_profiles`.
|
|
38
38
|
- **Async contract**: `run_task` returns a `taskId` immediately; long-running work is polled via `query_task` (never blocks `tools/call`).
|
|
39
39
|
- **Objective acceptance**: automated command checks (typecheck/lint/test/build — skipped when absent, plus tech-stack derivation) + programmatic code analysis (changed-file list / diffstat / suspicious signals such as TODO, debugger, secret-like patterns), all relative to a **git baseline**; never auto-commits or stashes.
|
|
40
40
|
- **Rework loop**: automatic rework (`autoFixRounds`) + manual `rework_task`; on verification failure a repair-plan file is generated and fed back to the agent; when rounds run out → `needs_attention` awaiting Tianshu's verdict.
|
|
41
|
-
- **Two execution surfaces**: `driver: "spawn"` runs an external CLI child process (Codex); `driver: "gui"`
|
|
41
|
+
- **Two execution surfaces**: `driver: "spawn"` runs an external CLI child process (Codex); `driver: "gui"` selects an explicit, isolated TraeWork or ZCode CDP adapter.
|
|
42
42
|
- **Scheduling discipline**: per-project serial queue + global concurrency cap (default 2, configurable).
|
|
43
43
|
- **No key handling**: each agent uses its own login state; this server never stores or forwards any API key.
|
|
44
44
|
- **Extensible**: a new agent = one profile (data) + (if needed) one adapter file — no changes to the orchestration core.
|
|
45
45
|
|
|
46
46
|
## Quick start
|
|
47
47
|
|
|
48
|
+
### Prerequisites
|
|
49
|
+
|
|
50
|
+
| Item | Requirement |
|
|
51
|
+
|---|---|
|
|
52
|
+
| Node.js | ≥ 20 (CI covers 20 / 22 / 24) |
|
|
53
|
+
| Package manager | npm (the repo ships a `package-lock.json`) |
|
|
54
|
+
| OS | Windows / macOS / Linux (verified by the three-platform CI matrix) |
|
|
55
|
+
| Git | Optional; acceptance baseline analysis is more complete inside a git repository |
|
|
56
|
+
|
|
57
|
+
The data directory defaults to `~/.tianshu-mcp` and can be overridden with the `TIANSHU_MCP_HOME` environment variable; it is created automatically on first start.
|
|
58
|
+
|
|
59
|
+
### Build from source
|
|
60
|
+
|
|
48
61
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
npm
|
|
62
|
+
git clone https://github.com/lanlan0811/tianshu-mcp.git
|
|
63
|
+
cd tianshu-mcp
|
|
64
|
+
npm ci
|
|
65
|
+
npm run build # sync-version + tsc → dist/
|
|
66
|
+
npm test # 262 tests across 37 files, including ZCode unit/fake-CDP/restart/repair coverage
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Install the npm package
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx -y tianshu-mcp # run without installing
|
|
73
|
+
# or
|
|
74
|
+
npm install -g tianshu-mcp
|
|
52
75
|
```
|
|
53
76
|
|
|
54
77
|
### Add it in Tianshu (recommended)
|
|
@@ -63,10 +86,10 @@ In Tianshu go to **Settings → MCP Servers → Add** and fill in the fields bel
|
|
|
63
86
|
| Command | `npx` | `node` |
|
|
64
87
|
| Arguments (space-separated) | `-y tianshu-mcp` | `<absolute-repo-path>/dist/index.js` |
|
|
65
88
|
|
|
66
|
-
> - The server ID becomes the tool prefix: with `tianshu-mcp` the tools are `mcp__tianshu-mcp__run_task` and
|
|
89
|
+
> - The server ID becomes the tool prefix: with `tianshu-mcp` the tools are `mcp__tianshu-mcp__run_task` and 8 others.
|
|
67
90
|
> - Arguments are space-separated, **no quotes**; for local dev replace `<absolute-repo-path>` with a real path (e.g. `D:/TraeProject/tianshu-mcp/dist/index.js`).
|
|
68
91
|
> - The dialog has no env-var field; to customize the data directory, use the `config.json` method below and set `TIANSHU_MCP_HOME`.
|
|
69
|
-
> - Once the server connects, open a new session and the
|
|
92
|
+
> - Once the server connects, open a new session and the 9 tools appear.
|
|
70
93
|
|
|
71
94
|
### Or edit config.json (supports env vars)
|
|
72
95
|
|
|
@@ -86,7 +109,7 @@ Register as a Tianshu MCP server (local dev mode):
|
|
|
86
109
|
}
|
|
87
110
|
```
|
|
88
111
|
|
|
89
|
-
After opening a new session, the
|
|
112
|
+
After opening a new session, the 9 tools such as `mcp__tianshu-mcp__run_task` appear. Rehearse with the stub agent first (no real login state), then switch to the `codex` profile for real tasks:
|
|
90
113
|
|
|
91
114
|
```text
|
|
92
115
|
run_task(projectPath=D:/xxx/my-app, task=「…task brief…」, agentId=codex, autoVerify=true, autoFixRounds=2)
|
|
@@ -103,6 +126,43 @@ run_task(projectPath=D:/xxx/my-app, agentId=traework, task=「Switch to Code mod
|
|
|
103
126
|
> `mode` accepts `Work` / `Code` / `Design`; when omitted it is detected from the task text (e.g. "switch to Code mode"), otherwise `Work` is kept.
|
|
104
127
|
> TraeWork's three modes **each keep an independent project binding**, so the order is: new session → switch to target mode → bind the project inside that mode.
|
|
105
128
|
|
|
129
|
+
For ZCode, `model` must be an exact `provider/model` and `mode` is rejected:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
run_task(projectPath=D:/xxx/my-app, agentId=zcode, task="Implement `./plan.md`",
|
|
133
|
+
model=DeepSeek/deepseek-flash, autoVerify=true)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Questions, login, an existing non-CDP instance, or system permission pause as `needs_user`; call `continue_task(taskId, message)` to resume the recorded session. See [docs/zcode-cdp.en.md](docs/zcode-cdp.en.md).
|
|
137
|
+
|
|
138
|
+
## Tool surface (9 tools)
|
|
139
|
+
|
|
140
|
+
| Tool | Capability / approval | Purpose |
|
|
141
|
+
|---|---|---|
|
|
142
|
+
| `run_task` | write + approval | Dispatch work (optional auto-verify / auto-rework); returns `taskId` asynchronously |
|
|
143
|
+
| `continue_task` | write + approval | Resume the original ZCode session from `needs_user` |
|
|
144
|
+
| `query_task` | read | Poll status / progress / log tail |
|
|
145
|
+
| `list_tasks` | read | Filtered history of tasks |
|
|
146
|
+
| `get_task_report` | read | Full text of a verification round's report (`report.md`) |
|
|
147
|
+
| `cancel_task` | write + approval | Cancel a running task (kill process tree) |
|
|
148
|
+
| `verify_task` | read | Run one verification pass on a task/project path (no source changes) |
|
|
149
|
+
| `rework_task` | write + approval | Manual rework (feed the failure report back to the same agent) |
|
|
150
|
+
| `get_profiles` | read | Inspect agent adapters and executable discovery results |
|
|
151
|
+
|
|
152
|
+
> Every result is "human-readable text + a `---tianshu-mcp-meta---` JSON block" so the host can extract it with a regex.
|
|
153
|
+
|
|
154
|
+
## Logging & stdio contract
|
|
155
|
+
|
|
156
|
+
This server is a standard MCP **stdio server** and follows the transport contract strictly:
|
|
157
|
+
|
|
158
|
+
- **stdout carries MCP JSON-RPC messages only.** No diagnostic log is ever written to stdout — doing so corrupts the JSON-RPC stream and makes strict clients fail to handshake or call tools.
|
|
159
|
+
- **All log levels (DEBUG/INFO/WARN/ERROR) go to stderr** and are appended to `logs/server.log` under the data directory (UTF-8, ISO timestamp, with a level tag).
|
|
160
|
+
- Therefore **an `INFO`/`WARN` line on stderr does not mean the server failed**; it is normal diagnostics. Only a startup failure (`tianshu-mcp 启动失败:`) is fatal, and it exits with a non-zero code.
|
|
161
|
+
|
|
162
|
+
The data directory defaults to `~/.tianshu-mcp` (override with `TIANSHU_MCP_HOME`); the log file lives at `<data dir>/logs/server.log`.
|
|
163
|
+
|
|
164
|
+
Use `server.log` when troubleshooting connections; do not treat stderr output itself as a server fault.
|
|
165
|
+
|
|
106
166
|
## Documentation
|
|
107
167
|
|
|
108
168
|
| Doc | Content |
|
|
@@ -111,27 +171,38 @@ run_task(projectPath=D:/xxx/my-app, agentId=traework, task=「Switch to Code mod
|
|
|
111
171
|
| [docs/agent-profiles.en.md](docs/agent-profiles.en.md) | Agent profile field reference + real-machine samples |
|
|
112
172
|
| [docs/adapter-matrix.en.md](docs/adapter-matrix.en.md) | Agent capability research matrix (Codex/Zcode/TraeWork/extension slots) |
|
|
113
173
|
| [docs/traework-cdp.en.md](docs/traework-cdp.en.md) | TraeWork GUI driver (CDP): mechanism, config, mode switching, selectors, safety invariants, pitfalls, verification record |
|
|
174
|
+
| [docs/zcode-cdp.en.md](docs/zcode-cdp.en.md) | ZCode GUI driver: discovery, exact project/model, Full Access, pause/continue, verification and platform evidence |
|
|
175
|
+
| [docs/zcode-windows-smoke.en.md](docs/zcode-windows-smoke.en.md) | ZCode Windows hardware record for development, same-session repair, and question continuation |
|
|
176
|
+
| [docs/release-v0.2.0.en.md](docs/release-v0.2.0.en.md) | v0.2.0 release notes (unified ZCode GUI loop) |
|
|
114
177
|
| [docs/acceptance-config.en.md](docs/acceptance-config.en.md) | Project-level `.tianshu-mcp/acceptance.json` acceptance config spec |
|
|
115
178
|
| [docs/release-v0.1.9.en.md](docs/release-v0.1.9.en.md) | v0.1.9 release notes (TraeWork task liveness and instance retention) |
|
|
179
|
+
| [docs/release-v0.1.10.en.md](docs/release-v0.1.10.en.md) | v0.1.10 release notes (stdio log pollution fix: diagnostics on stderr) |
|
|
116
180
|
| [docs/release-v0.1.8.en.md](docs/release-v0.1.8.en.md) | v0.1.8 release notes (atomic-write concurrency fix) |
|
|
117
181
|
| [docs/release-v0.1.7.en.md](docs/release-v0.1.7.en.md) | v0.1.7 release notes (binding root cause: native path) |
|
|
118
182
|
| [docs/release-v0.1.6.en.md](docs/release-v0.1.6.en.md) | v0.1.6 release notes (project-folder binding fix) |
|
|
119
183
|
| [docs/release-v0.1.5.en.md](docs/release-v0.1.5.en.md) | v0.1.5 release notes (mode switching, README/icon, release artifacts) |
|
|
184
|
+
| [skills/tianshu-mcp/SKILL.md](skills/tianshu-mcp/SKILL.md) | Skill that teaches Tianshu how to orchestrate this MCP (with usage examples) |
|
|
120
185
|
|
|
121
186
|
> Chinese documentation: see [README.md](README.md).
|
|
187
|
+
> Some milestone/evidence records are **Chinese-only** (no English translation yet): [HANDOFF.md](HANDOFF.md),
|
|
188
|
+
> [docs/npm-publish-guide.md](docs/npm-publish-guide.md), [docs/m2-smoke-record.md](docs/m2-smoke-record.md),
|
|
189
|
+
> [docs/m2-rework-record.md](docs/m2-rework-record.md), [docs/host-integration-record.md](docs/host-integration-record.md),
|
|
190
|
+
> [docs/dod7-release-record.md](docs/dod7-release-record.md), [docs/dod8-session-record.md](docs/dod8-session-record.md),
|
|
191
|
+
> [docs/s7-session-recheck.md](docs/s7-session-recheck.md).
|
|
122
192
|
|
|
123
193
|
## Milestone status
|
|
124
194
|
|
|
125
195
|
- **M1 — Core engine + stub-agent end-to-end** ✅
|
|
126
196
|
- 8 tools, TaskManager state machine / queue / concurrency gate / cancel (kill tree) / event-stream persistence
|
|
127
197
|
- Acceptance engine (git baseline & diff, default-set derivation, command runner, code analysis, report.md/json)
|
|
128
|
-
- fix-loop auto rework + needs_attention; skill self-install
|
|
129
|
-
- Stub-agent 3 playbooks (good / fix-on-first / never) integration tests + protocol tests
|
|
198
|
+
- fix-loop auto rework + needs_attention; skill self-install (verified on this machine's real `~/.rivet/skills`)
|
|
199
|
+
- Stub-agent 3 playbooks (good / fix-on-first / never) integration tests + protocol tests
|
|
130
200
|
- **M2 — Real Codex CLI smoke + rework loop** ✅ (2026-09-07)
|
|
131
201
|
- Real `codex exec` completed `run_task → query_task → verify_task`
|
|
132
202
|
- Real **failure → rework_task → re-verify succeeded** loop, with artifacts
|
|
133
203
|
- Fixed 3 real bugs the smoke exposed (Windows npm shim / spawn log race crash / codex flag conflict) + regression tests
|
|
134
204
|
- Zcode headless entry (Z1) verified: ZCode desktop ships no headless CLI → unsupported
|
|
205
|
+
- **R1–R8 / S1–S6 — two acceptance hardening rounds** ✅ (cancel / timeout / baseline attribution / parameter semantics / hot reload / CI hardening) — **72 tests**
|
|
135
206
|
- **Engineering / CI** ✅
|
|
136
207
|
- GitHub Actions: `CI` (ubuntu/windows/macos × Node 20/22 + tarball check, **7/7 green**) and `Release` (tag-triggered) both green
|
|
137
208
|
- Skill self-install verified idempotent on this machine's real `~/.rivet/skills/tianshu-mcp`
|
|
@@ -142,19 +213,43 @@ run_task(projectPath=D:/xxx/my-app, agentId=traework, task=「Switch to Code mod
|
|
|
142
213
|
- **M3 — TraeWork research + full delivery** ✅ (2026-09-07, **npm published**)
|
|
143
214
|
- T1 settled: local TRAE SOLO CN v1.107.1 verified to have **no headless programmable agent interface** (VS Code-family CLI only)
|
|
144
215
|
- npm published from `tianshu-mcp@0.1.1` (`npx -y tianshu-mcp` raises and connects 8 tools)
|
|
145
|
-
- **M4 — TraeWork GUI driver (CDP)** ✅ (2026-09-08, see [traework-cdp.en.md](docs/traework-cdp.en.md))
|
|
216
|
+
- **M4 — TraeWork GUI driver (CDP)** ✅ (2026-09-08, see [traework-cdp.en.md](docs/traework-cdp.en.md)) — **153 tests**
|
|
146
217
|
- Correction: no headless CLI exists, but `--remote-debugging-port` can drive the chat UI; `traework` is now `driver=gui` / `status=ready`
|
|
147
218
|
- Capabilities: launch/reuse instance → new session → bind project folder (dropdown first, restricted computer-use native dialog as fallback) → optional model selection → read-back-verified send → poll to completion → auto-verify → repair-plan file + same-session rework on failure
|
|
148
219
|
- Safety: reuse the user's instance by default, never kill a process tree, verify the command line before terminating; computer-use is limited to TraeWork's folder picker
|
|
149
220
|
- Machine-verified: `run_task(agentId=traework, model=GLM-5.3, autoVerify=true)` drove TraeWork to create a file and passed acceptance
|
|
150
|
-
- **M5 — Mode switching + v0.1.5 release** ✅ (2026-09-08, see [release-v0.1.5.en.md](docs/release-v0.1.5.en.md))
|
|
221
|
+
- **M5 — Mode switching + v0.1.5 release** ✅ (2026-09-08, see [release-v0.1.5.en.md](docs/release-v0.1.5.en.md)) — **167 tests**
|
|
151
222
|
- `run_task` gained `mode` (Work/Code/Design), explicit parameter plus task-text fallback; all three modes **machine-verified end-to-end**
|
|
152
223
|
- Key finding: the three modes keep independent project bindings → order is new session → switch mode → bind project inside that mode
|
|
153
|
-
- README rewritten (bilingual + stack badges + dedicated SVG icon/banner)
|
|
154
|
-
|
|
155
|
-
- **M6 — Project-folder binding fix + v0.1.6** ✅ (2026-09-08, see [release-v0.1.6.en.md](docs/release-v0.1.6.en.md))
|
|
224
|
+
- README rewritten (bilingual + stack badges + dedicated SVG icon/banner)
|
|
225
|
+
- **M6 — Project-folder binding fix + v0.1.6** ✅ (2026-09-08, see [release-v0.1.6.en.md](docs/release-v0.1.6.en.md)) — **172 tests**
|
|
156
226
|
- Fixed three stacked defects: footer click never verified the popup, detection budget eaten by PowerShell cold start, CJK paths destroyed by the console code page
|
|
157
|
-
- Added a Work fallback for non-Work binding; machine-verified "new project absent from the dropdown + mode=Code" end-to-end
|
|
227
|
+
- Added a Work fallback for non-Work binding; machine-verified "new project absent from the dropdown + mode=Code" end-to-end
|
|
228
|
+
- **M7 — Binding root-cause fix + v0.1.7** ✅ (2026-09-08, see [release-v0.1.7.en.md](docs/release-v0.1.7.en.md)) — **178 tests**
|
|
229
|
+
- Root cause: MCP passed a normalized path (`d:/a/b`) that the Windows native picker rejects → switched to `toNativeWindowsPath()` (`D:\a\b`)
|
|
230
|
+
- Supporting fixes: `WM_GETTEXT` read-back verification after writing, hwnd threaded through the flow, stale-dialog cleanup
|
|
231
|
+
- **M8 — Atomic-write concurrency fix + v0.1.8** ✅ (2026-09-08, see [release-v0.1.8.en.md](docs/release-v0.1.8.en.md)) — **181 tests**
|
|
232
|
+
- `writeJsonAtomic` / `writeTextAtomic` shared a temp filename under concurrency → randomized suffix + rename back-off retry (the real root cause of flaky CI windows/Node20 failures)
|
|
233
|
+
- **M9 — TraeWork task liveness detection + v0.1.9** ✅ (2026-09-09, see [release-v0.1.9.en.md](docs/release-v0.1.9.en.md)) — **196 tests**
|
|
234
|
+
- The stop button / loading task tail became authoritative running signals that outrank the completion mark; stable rounds only start the idle timer (default 10 minutes) before returning `idle`
|
|
235
|
+
- CDP disconnects reject all pending requests + a 15s per-command timeout; abnormal endings (idle/timeout/aborted/cdp_lost) keep the instance and record `agentEndReason` / `keptInstance`
|
|
236
|
+
- **M10 — stdio log pollution fix + v0.1.10** ✅ (2026-09-10, see [release-v0.1.10.en.md](docs/release-v0.1.10.en.md)) — **issue #1**
|
|
237
|
+
- The unified logger now sends all levels to stderr, leaving stdout for MCP JSON-RPC messages only
|
|
238
|
+
- Added a strict stdio smoke (real-process byte-stream validation, 6 scenarios), Node 24 CI coverage, and an installed-package protocol gate
|
|
239
|
+
- **M11 — ZCode GUI unified loop + v0.2.0** (2026-09-11, see [release-v0.2.0.en.md](docs/release-v0.2.0.en.md)) — **262 tests**
|
|
240
|
+
- Windows hardware passed real development, same-session repair after a controlled failure, and `AskUserQuestion → continue_task`; see the [acceptance record](docs/zcode-windows-smoke.en.md)
|
|
241
|
+
- macOS hardware is pending, so the built-in profile remains `research` as required by the plan
|
|
242
|
+
|
|
243
|
+
## Agent support status
|
|
244
|
+
|
|
245
|
+
| agentId | driver | status | Notes |
|
|
246
|
+
|---|---|---|---|
|
|
247
|
+
| `codex` | `spawn` | **ready** | Reuses `~/.codex` login state; `codex exec` headless; passed real M2 smoke |
|
|
248
|
+
| `zcode` | `zcode-gui` | **research** | CDP GUI adapter and Windows hardware loop passed; remains non-ready until macOS hardware passes |
|
|
249
|
+
| `traework` | **`gui`** | **ready** | CDP-driven TRAE SOLO CN desktop UI; all three panel modes machine-verified |
|
|
250
|
+
| `stub` | `spawn` | tests only | `test/stub-agent/stub-agent.mjs` with 3 playbooks (good/fix-on-first/never) |
|
|
251
|
+
|
|
252
|
+
> Adding an agent usually needs only a profile — see [docs/agent-profiles.en.md](docs/agent-profiles.en.md) and [CONTRIBUTING.en.md](CONTRIBUTING.en.md).
|
|
158
253
|
|
|
159
254
|
## Recommended phrasing (for Tianshu)
|
|
160
255
|
|
|
@@ -166,14 +261,58 @@ run_task(projectPath=D:/xxx/my-app, agentId=traework, task=「Switch to Code mod
|
|
|
166
261
|
|
|
167
262
|
| Document | Content |
|
|
168
263
|
|---|---|
|
|
169
|
-
| [CHANGELOG.en.md](CHANGELOG.en.md) | Version history (v0.1.0 → v0.
|
|
264
|
+
| [CHANGELOG.en.md](CHANGELOG.en.md) | Version history (v0.1.0 → v0.2.0) |
|
|
170
265
|
| [CONTRIBUTING.en.md](CONTRIBUTING.en.md) | Dev setup, conventions, commit/release flow, adding an agent |
|
|
171
266
|
| [SECURITY.en.md](SECURITY.en.md) | Security model (zero credentials / command whitelist / process & desktop-automation boundaries) and private reporting |
|
|
172
267
|
| [CODE_OF_CONDUCT.en.md](CODE_OF_CONDUCT.en.md) | Contributor Code of Conduct |
|
|
173
|
-
| [LICENSE](LICENSE) | Apache License 2.0 |
|
|
268
|
+
| [LICENSE](LICENSE) | Apache License 2.0 (detailed explanation below) |
|
|
269
|
+
|
|
270
|
+
- **Primary repository**: <https://github.com/lanlan0811/tianshu-mcp> (GitHub)
|
|
271
|
+
- **Mirror repository**: <https://gitee.com/lan0811/tianshu-mcp> (Gitee)
|
|
272
|
+
- **Feedback**: bugs / feature requests via the repo Issue templates; report security vulnerabilities privately per [SECURITY.en.md](SECURITY.en.md) — **do not** open a public issue.
|
|
174
273
|
|
|
175
|
-
> Chinese counterparts: see [README.md](README.md).
|
|
274
|
+
> Chinese counterparts: see [README.md](README.md). The handoff document [HANDOFF.md](HANDOFF.md) is Chinese-only.
|
|
176
275
|
|
|
177
276
|
## License
|
|
178
277
|
|
|
179
|
-
|
|
278
|
+
This project is released under the **Apache License 2.0**; the full legal text is in [LICENSE](LICENSE). Copyright belongs to the tianshu-mcp contributors (Copyright 2026 tianshu-mcp contributors).
|
|
279
|
+
|
|
280
|
+
### Rights granted to you
|
|
281
|
+
|
|
282
|
+
- **Commercial use**: use it in commercial products and services;
|
|
283
|
+
- **Modification**: modify the source freely;
|
|
284
|
+
- **Distribution**: redistribute the original or modified versions;
|
|
285
|
+
- **Private use**: use it privately inside your organization;
|
|
286
|
+
- **Patent use**: contributors grant you a license to any patents covered by their contributions (subject to the termination clause below).
|
|
287
|
+
|
|
288
|
+
### Obligations you must meet
|
|
289
|
+
|
|
290
|
+
1. **Keep the notices**: when distributing, include the full LICENSE text and retain its copyright, license, and disclaimer notices;
|
|
291
|
+
2. **Mark modifications**: if you modify files, carry a prominent "modified" notice in the changed files;
|
|
292
|
+
3. **Preserve NOTICE**: if the original work includes a NOTICE file, retain its contents when distributing (this project currently has **no** NOTICE file);
|
|
293
|
+
4. **No additional restrictions**: you may not impose further restrictions on the rights granted by this license.
|
|
294
|
+
|
|
295
|
+
### Not granted / termination
|
|
296
|
+
|
|
297
|
+
- **Trademarks**: this license does **not** grant any right to use trademarks, trade names, or service marks;
|
|
298
|
+
- **Patent termination**: if you institute patent litigation against this project or its contributors (including cross-claims and counter-claims), your patent grant under this license **terminates automatically**.
|
|
299
|
+
|
|
300
|
+
### Disclaimer
|
|
301
|
+
|
|
302
|
+
The software is provided **"AS IS"**, without warranties or conditions of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability arising from, out of, or in connection with the software or the use or other dealings in the software, whether in an action of contract, tort, or otherwise.
|
|
303
|
+
|
|
304
|
+
### Third-party dependency licenses
|
|
305
|
+
|
|
306
|
+
Runtime dependencies are all **MIT**-licensed and compatible with Apache-2.0:
|
|
307
|
+
|
|
308
|
+
| Dependency | License | Purpose |
|
|
309
|
+
|---|---|---|
|
|
310
|
+
| [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/sdk) | MIT | MCP protocol implementation |
|
|
311
|
+
| [`zod`](https://github.com/colinhacks/zod) | MIT | External input validation |
|
|
312
|
+
| [`cross-spawn`](https://github.com/moxystudio/node-cross-spawn) | MIT | Cross-platform child processes |
|
|
313
|
+
|
|
314
|
+
Development dependencies (TypeScript, ESLint, Prettier, Vitest, Vite, tsx, etc.) follow their own open-source licenses and are not distributed with the npm package.
|
|
315
|
+
|
|
316
|
+
### Relationship to the security boundary
|
|
317
|
+
|
|
318
|
+
This MCP **never stores, reads, or forwards** any AI-Agent API key or login state (see [SECURITY.en.md](SECURITY.en.md)). The license terms do not change this design boundary.
|