tianshu-mcp 0.2.0 → 0.3.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 +414 -342
- package/CHANGELOG.md +369 -308
- package/README.en.md +333 -318
- package/README.md +334 -320
- package/dist/agents/adapter.d.ts +7 -0
- package/dist/agents/builtin.js +50 -14
- package/dist/agents/codex/adapter.d.ts +9 -0
- package/dist/agents/codex/adapter.js +74 -0
- package/dist/agents/codex/cdp.d.ts +127 -0
- package/dist/agents/codex/cdp.js +352 -0
- package/dist/agents/codex/dialog.d.ts +17 -0
- package/dist/agents/codex/dialog.js +297 -0
- package/dist/agents/codex/discovery.d.ts +56 -0
- package/dist/agents/codex/discovery.js +219 -0
- package/dist/agents/codex/fixplan.d.ts +27 -0
- package/dist/agents/codex/fixplan.js +88 -0
- package/dist/agents/codex/input.d.ts +39 -0
- package/dist/agents/codex/input.js +60 -0
- package/dist/agents/codex/instance.d.ts +48 -0
- package/dist/agents/codex/instance.js +199 -0
- package/dist/agents/codex/launcher.d.ts +32 -0
- package/dist/agents/codex/launcher.js +109 -0
- package/dist/agents/codex/liveness.d.ts +27 -0
- package/dist/agents/codex/liveness.js +45 -0
- package/dist/agents/codex/model.d.ts +33 -0
- package/dist/agents/codex/model.js +66 -0
- package/dist/agents/codex/project.d.ts +16 -0
- package/dist/agents/codex/project.js +21 -0
- package/dist/agents/codex/registry.d.ts +37 -0
- package/dist/agents/codex/registry.js +116 -0
- package/dist/agents/codex/run.d.ts +30 -0
- package/dist/agents/codex/run.js +559 -0
- package/dist/agents/codex/selectors.d.ts +46 -0
- package/dist/agents/codex/selectors.js +246 -0
- package/dist/agents/codex/verify.d.ts +17 -0
- package/dist/agents/codex/verify.js +42 -0
- package/dist/agents/registry.js +35 -0
- package/dist/agents/traework/cdp/client.d.ts +8 -0
- package/dist/agents/traework/cdp/client.js +10 -1
- package/dist/agents/traework/run.js +2 -0
- package/dist/agents/zcode/run.js +2 -0
- package/dist/config/schema.d.ts +220 -13
- package/dist/config/schema.js +46 -4
- package/dist/loop/fix-loop.js +37 -2
- package/dist/mcp/context.js +40 -13
- package/dist/mcp/handlers.js +15 -0
- package/dist/tasks/task-manager.d.ts +8 -2
- package/dist/tasks/task-manager.js +3 -0
- package/dist/tasks/task.d.ts +8 -2
- package/dist/util/path.js +1 -0
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/package.json +2 -1
- package/scripts/probe-codex.mjs +280 -0
package/CHANGELOG.en.md
CHANGED
|
@@ -1,342 +1,414 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `tianshu-mcp` are documented here. The format follows
|
|
4
|
-
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to
|
|
5
|
-
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
Chinese version: [CHANGELOG.md](CHANGELOG.md)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## [Unreleased]
|
|
12
|
-
|
|
13
|
-
### Planned
|
|
14
|
-
|
|
15
|
-
- More external AI-Agent adapters (a new agent = one profile + an optional adapter file).
|
|
16
|
-
- TraeWork executable discovery and native-dialog driving on macOS (currently fail-closed).
|
|
17
|
-
- Optional project-level skill seeding (by default nothing is written into target repos).
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
###
|
|
196
|
-
|
|
197
|
-
- **
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- `
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
-
|
|
263
|
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
- **
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `tianshu-mcp` are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
Chinese version: [CHANGELOG.md](CHANGELOG.md)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
### Planned
|
|
14
|
+
|
|
15
|
+
- More external AI-Agent adapters (a new agent = one profile + an optional adapter file).
|
|
16
|
+
- TraeWork executable discovery and native-dialog driving on macOS (currently fail-closed).
|
|
17
|
+
- Optional project-level skill seeding (by default nothing is written into target repos).
|
|
18
|
+
- macOS hardware verification for the Codex GUI adapter (built-in status remains `research`).
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## [0.3.0] — 2026-09-12
|
|
23
|
+
|
|
24
|
+
The Codex desktop app now runs through a **GUI driver**: a new `codex-gui` adapter uses MSIX COM activation
|
|
25
|
+
plus CDP to drive the ChatGPT desktop app through the full loop (locate install → launch GUI → bind/create
|
|
26
|
+
project → pick model and reasoning level → send instructions → run detection → verify → auto-repair).
|
|
27
|
+
|
|
28
|
+
### BREAKING CHANGES
|
|
29
|
+
|
|
30
|
+
- **`agentId=codex` now executes via the desktop GUI instead of the headless CLI**: a new `driver=gui` +
|
|
31
|
+
`adapter=codex-gui` + `activation=msix-com`, with the previous **`codex exec` headless path removed**.
|
|
32
|
+
After upgrading, `run_task(agentId="codex")` launches and drives the Codex desktop window rather than a
|
|
33
|
+
headless child process. To keep headless execution, add a separate `driver=spawn` profile
|
|
34
|
+
(`argsTemplate: ["exec", "<prompt:arg>", "--skip-git-repo-check", "--sandbox", "workspace-write"]`) as
|
|
35
|
+
documented in `docs/agent-profiles.en.md`.
|
|
36
|
+
- This path requires the Codex desktop app (MSIX store package) to be installed; CLI-only environments are
|
|
37
|
+
no longer directly supported.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- `codex-gui` adapter (`src/agents/codex/**`): Appx-first install discovery (scan fallback taking the newest
|
|
42
|
+
version), MSIX COM activation with a dedicated `user-data-dir` and dynamic debug port, plus CDP attach and
|
|
43
|
+
target convergence (excluding the overlay secondary window).
|
|
44
|
+
- Task parameters: `reasoningLevel` (low/medium/high, bilingual), `planDoc`, `designSystem`.
|
|
45
|
+
- Model and reasoning level: models are `menuitemradio` candidates while **reasoning strength is a slider**
|
|
46
|
+
(0–4: 轻度/中/高/极高/极高), set precisely with arrow keys and read back for verification; level
|
|
47
|
+
comparison is exact to avoid matching "高" against "极高".
|
|
48
|
+
- **Automatic project registration**: a target directory not yet registered on the Codex side is written
|
|
49
|
+
directly into Codex project state (idempotent, backup-before-write, atomic write, only while the
|
|
50
|
+
MCP-managed instance is stopped), so it takes the stable bound-project path instead of the brittle native
|
|
51
|
+
folder dialog; on failure it falls back to UI creation.
|
|
52
|
+
- Verification and repair: reuses the existing AcceptanceEngine (defaults derived from `package.json`, with
|
|
53
|
+
weak-verification labelling); on failure the MCP generates an in-project
|
|
54
|
+
`.zcode/plans/codex-fix-r<N>.md` (one per round, never overwritten) and cites it in the repair instruction,
|
|
55
|
+
up to 5 rounds by default (`defaultAutoFixRounds`).
|
|
56
|
+
- Run detection: the stop button is the authoritative running signal, and text stability counts as completion
|
|
57
|
+
evidence only after it; without a running signal it fails open to `idle_timeout` while keeping the instance
|
|
58
|
+
(never a false completion).
|
|
59
|
+
- `scripts/probe-codex.mjs` hardware diagnostic script; 67 Codex unit tests plus integration coverage of the
|
|
60
|
+
verify-fail → generated plan → repair-pass loop.
|
|
61
|
+
- Docs: `docs/codex-gui-cdp.en.md`, `docs/codex-windows-smoke.en.md` (including the round-2 real business task
|
|
62
|
+
acceptance) and their Chinese counterparts.
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- `GuiProfile` gains `activation` / `userDataDir` / `appxPackageName` / `permissionMode` / `fixPlanDir`;
|
|
67
|
+
existing `spawn` profiles are unaffected.
|
|
68
|
+
- `ExecutableDiscovery` gains `appxPackageName` / `installRelativeExe` / `scanRoots` / `scanPattern`.
|
|
69
|
+
|
|
70
|
+
### Fixed (exposed by hardware testing)
|
|
71
|
+
|
|
72
|
+
- The model trigger mis-matched the sibling permission chip (4 chips share `aria-haspopup`; only the model chip
|
|
73
|
+
lacks `aria-label`).
|
|
74
|
+
- Reasoning strength was clicked like a menu item and could never be set (it is actually a slider).
|
|
75
|
+
- Menus/popovers only open on **trusted** mouse events (DOM `.click()` is ignored).
|
|
76
|
+
- A transient empty model read during toolbar re-render after binding was treated as a "model mismatch".
|
|
77
|
+
- Model/reasoning trigger selectors now exclude the top menu bar and the mode switcher.
|
|
78
|
+
- Cold-start readiness budget widened to 150s (registration stops the instance first; cold start measured ~85s).
|
|
79
|
+
- CI: fixed a `normalizeDir` assertion that depended on the host platform, which failed on ubuntu/macos.
|
|
80
|
+
- Fixed integration tests polluting real Codex project state by not injecting `ensureRegistered`.
|
|
81
|
+
|
|
82
|
+
### Verification
|
|
83
|
+
|
|
84
|
+
- Windows 10 x64 hardware: full loop for a registered project, and the verify-fail → generated plan →
|
|
85
|
+
repair-pass loop; an unregistered project completed the full loop after automatic registration.
|
|
86
|
+
- Real business task: drove Codex to build a "Fruit Ninja" mini-game in HTML+CSS+JS (`GPT-5.6 Sol` with
|
|
87
|
+
reasoning strength "高"); the artifacts passed acceptance and were verified playable in a headless browser
|
|
88
|
+
(score rises, lives decrement, Game Over and restart work, no JS exceptions).
|
|
89
|
+
- macOS unverified: the built-in Codex GUI status is `research` and is excluded from readiness.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## [0.2.0] — 2026-09-11
|
|
94
|
+
|
|
95
|
+
### Added
|
|
96
|
+
|
|
97
|
+
- Dedicated `zcode-gui` Electron CDP adapter with data-driven Windows/macOS discovery, dynamic ports, product/process checks, and a global serial lock.
|
|
98
|
+
- Exact ZCode project binding, guarded native folder pickers, `provider/model`, Full Access read-back, and idempotent sending.
|
|
99
|
+
- Paused `needs_user` state and approval-gated `continue_task` for original-session answers and environment rechecks after instance, login, or permission handling.
|
|
100
|
+
- Multi-signal liveness, progress events, UI preservation, default auto-verification, and two same-session repair rounds. Repair plans stay in MCP task storage.
|
|
101
|
+
- `scripts/probe-zcode.mjs`, fake-CDP/state/path/model tests, and bilingual documentation.
|
|
102
|
+
|
|
103
|
+
### Safety and compatibility
|
|
104
|
+
|
|
105
|
+
- GUI profiles support an explicit `adapter`; legacy `driver="gui"` profiles retain TraeWork behavior.
|
|
106
|
+
- The built-in ZCode profile remains `research` until both real platform loops pass.
|
|
107
|
+
- No private `app-server`, credential access, automatic user-instance termination, or fixed screen coordinates.
|
|
108
|
+
|
|
109
|
+
### Fixed and verified
|
|
110
|
+
|
|
111
|
+
- Fixed ZCode read-back for dynamic model labels, transient renderer load/reload, delayed new-session registration, and stale session-ID contamination.
|
|
112
|
+
- `AskUserQuestion` continuation now selects and submits an exact accessible option in the original session; zero or ambiguous matches fail closed.
|
|
113
|
+
- 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.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## [0.1.10] — 2026-09-10
|
|
118
|
+
|
|
119
|
+
### Fixed
|
|
120
|
+
|
|
121
|
+
- **Fixed stdio log pollution (issue #1)**: the unified logger previously sent only ERROR to
|
|
122
|
+
`console.error` while INFO/WARN/DEBUG went to `console.log`, sharing stdout with MCP JSON-RPC
|
|
123
|
+
messages and breaking handshakes or tool calls in strict stdio clients. All levels passing the
|
|
124
|
+
threshold now go to stderr, leaving stdout for valid MCP messages only.
|
|
125
|
+
- Log file appending, timestamps, level tags and the `<data dir>/logs/server.log` path are unchanged;
|
|
126
|
+
a startup failure is still reported on stderr.
|
|
127
|
+
|
|
128
|
+
### Added
|
|
129
|
+
|
|
130
|
+
- New `scripts/check-stdio.mjs` strict stdio smoke: a real child process validates the complete
|
|
131
|
+
stdout/stderr byte stream, allowing only newline-delimited, schema-valid MCP JSON-RPC messages on
|
|
132
|
+
stdout; empty lines, non-JSON lines, parser errors, or trailing fragments at exit fail the run.
|
|
133
|
+
It covers six scenarios: first start, second start with matching skills, `--no-skill-install`,
|
|
134
|
+
a corrupt `config.json`, logs during a stub task, and clean EOF shutdown.
|
|
135
|
+
- New `npm run check:stdio` and `npm run check:stdio:src` scripts.
|
|
136
|
+
|
|
137
|
+
### Tests
|
|
138
|
+
|
|
139
|
+
- New `test/unit/log.test.ts`: real-child-process checks for the four log levels' channels, default
|
|
140
|
+
INFO filtering, threshold-filtered file logging, and UTF-8 content (4/6 failed before the fix; see
|
|
141
|
+
`docs/m2-evidence/issue1-old-impl-log-test-failure.txt`).
|
|
142
|
+
- CI's three-platform matrix now includes Node 24; the build step runs the strict stdio check instead
|
|
143
|
+
of an EOF-exit-only smoke.
|
|
144
|
+
- CI `pack-check` and Release install the freshly built tarball into a clean consumer directory, read
|
|
145
|
+
the installed bin dynamically, and reuse the same strict stdio check; Release adds `lint` and the
|
|
146
|
+
installed-package protocol gate, failing before a draft is created.
|
|
147
|
+
- ESLint enables `no-console` (allowing `error` only) for `src/**/*.ts` to prevent new direct stdout writes.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## [0.1.9] — 2026-09-09
|
|
152
|
+
|
|
153
|
+
### Fixed
|
|
154
|
+
|
|
155
|
+
- Fixed premature TraeWork completion while the model was still thinking but the DOM stayed unchanged for about 36 seconds.
|
|
156
|
+
The stop button and loading task tail are now authoritative running signals and override completion marks; stable rounds now
|
|
157
|
+
start an idle timer, which defaults to ten minutes before returning `idle`.
|
|
158
|
+
- Fixed permanently pending `Runtime.evaluate` calls after a CDP WebSocket disconnect. Close/error rejects all pending requests,
|
|
159
|
+
each CDP command has a 15-second default timeout, and task cancellation is observed within about one second.
|
|
160
|
+
- Only `completion_mark` / `ask_user` release an instance launched by this module. Idle, timeout, cancellation, and CDP loss retain
|
|
161
|
+
it, with `agentEndReason` / `keptInstance` exposed in task metadata.
|
|
162
|
+
- Fixed a shutdown race where an orchestrator still collecting its baseline could remain `queued` and be mislabeled as a user
|
|
163
|
+
cancellation. User cancellation is now determined only from structured cancellation intent.
|
|
164
|
+
|
|
165
|
+
### Added
|
|
166
|
+
|
|
167
|
+
- Polling emits a progress event visible through `query_task` every 30 seconds by default.
|
|
168
|
+
- Added `gui.idleTimeoutMs`, `gui.cdpSendTimeoutMs`, `gui.progressIntervalMs`, and five overrideable liveness selectors.
|
|
169
|
+
|
|
170
|
+
### Testing
|
|
171
|
+
|
|
172
|
+
- Added liveness truth-table, CDP timeout/disconnect convergence, selector-expression, and fake-CDP instance-retention regressions.
|
|
173
|
+
- Windows/macOS/Linux × Node 20/22 and tarball gates remain covered.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## [0.1.8] — 2026-09-08
|
|
178
|
+
|
|
179
|
+
### Fixed
|
|
180
|
+
|
|
181
|
+
- **Atomic-write concurrency defect** (the real cause of intermittent CI failures): the temp filename in
|
|
182
|
+
`writeJsonAtomic`/`writeTextAtomic` was `<target>.<pid>.tmp`, so concurrent writes to the same target in one
|
|
183
|
+
process shared one temp file - the first to finish renames it away and the next throws `ENOENT`; on Windows a
|
|
184
|
+
concurrent rename can also throw `EPERM`. Symptom: `rework_task` intermittently returned an `undefined` meta
|
|
185
|
+
(hit on CI windows/Node 20). Fixed by a random temp suffix plus backoff-retry on transient rename errors.
|
|
186
|
+
|
|
187
|
+
### Testing
|
|
188
|
+
|
|
189
|
+
- New `test/unit/atomic-write.test.ts` (3 cases: concurrent JSON/text writes all succeed, no leftover temp files).
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## [0.1.7] — 2026-09-08
|
|
194
|
+
|
|
195
|
+
### Fixed
|
|
196
|
+
|
|
197
|
+
- **Project-folder binding still failed** (v0.1.6 did not fully resolve it; field report: the native dialog
|
|
198
|
+
appeared but the edit box was empty and confirm was clicked anyway):
|
|
199
|
+
- **Root cause**: the MCP passes a `normPath()`-normalized path (lowercase drive + forward slashes, e.g.
|
|
200
|
+
`d:/Trae项目/AI游戏/象棋`), which the **native Windows picker rejects** — measured: read-back matched, yet the dialog
|
|
201
|
+
stayed open after confirm. Fix: convert via the new `toNativeWindowsPath()` to `D:\a\b`.
|
|
202
|
+
- `WM_GETTEXT` **read-back verification** after writing; on mismatch re-locate and retry (up to 3 times);
|
|
203
|
+
if it still mismatches, **never click confirm** and fail loudly.
|
|
204
|
+
- The hwnd detected after the footer click is **passed into the write script**; after clicking, success
|
|
205
|
+
requires that hwnd to be gone.
|
|
206
|
+
- **Auto-close stale dialogs** (left over from a previous failure) before binding.
|
|
207
|
+
- Confirm button now also requires its rect to be in the lower half of the dialog.
|
|
208
|
+
- The dialog script's full trace (HWND/READBACK) is written to the task log.
|
|
209
|
+
|
|
210
|
+
### Testing
|
|
211
|
+
|
|
212
|
+
- Total tests **172 → 181** (unit incl. path normalization and atomic-write concurrency; integration incl. stale-dialog cleanup).
|
|
213
|
+
- Machine-verified: a new Chinese project `D:\Trae项目\AI游戏\象棋` (absent from the dropdown)
|
|
214
|
+
passed end-to-end through the native dialog; `五子棋` and the ASCII project `ts-bind-test` regressed green.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## [0.1.6] — 2026-09-08
|
|
219
|
+
|
|
220
|
+
### Fixed
|
|
221
|
+
|
|
222
|
+
- **Project-folder binding got stuck / reported "waiting for native dialog timed out"** (field report; the adapter was not broken):
|
|
223
|
+
- `clickDropdownFooter` used to trust `element.click()`'s return value, but the native popup may never
|
|
224
|
+
appear → it now **confirms the dialog actually appeared**, otherwise it logs a dropdown DOM snapshot and fails loudly.
|
|
225
|
+
- Dialog detection polled from Node every 800 ms while PowerShell cold start is ~4.5–6 s, so a 15 s budget
|
|
226
|
+
allowed only ~2 probes → now it polls **inside a single PowerShell call** (400 ms interval) with a 30 s budget.
|
|
227
|
+
- **CJK paths were corrupted** (measured: `D:\Trae项目\ts-bind-test` became `D:Traes-bind-test`):
|
|
228
|
+
SendKeys/clipboard are mangled by the console code page → the path is now written via Win32
|
|
229
|
+
**`WM_SETTEXT`**, which is fully reliable for CJK.
|
|
230
|
+
- **The confirm click hit a file-list row**: `AutomationId="1"` is not unique (rows also use 0/1/2…) →
|
|
231
|
+
now located by **AutomationId=1 AND ControlType=Pane**, then clicked by bounding rect.
|
|
232
|
+
- PowerShell output was garbled for Chinese → the script now emits **ASCII-only** and Node maps it back
|
|
233
|
+
via `localizeDialogMessage()`.
|
|
234
|
+
|
|
235
|
+
### Added
|
|
236
|
+
|
|
237
|
+
- **Non-Work binding fallback**: when binding fails in Code/Design, the driver **falls back to Work once**,
|
|
238
|
+
switches back to the target mode, and re-verifies the project is still bound; only if both attempts fail
|
|
239
|
+
does it report an error including the reason from each mode.
|
|
240
|
+
- Machine-verified: for a project **absent from the dropdown** (`D:\Trae项目\ts-bind-test`),
|
|
241
|
+
`run_task(agentId=traework, mode=Code)` passed end-to-end — native dialog wrote the path → confirm clicked →
|
|
242
|
+
project entered TraeWork's list (`solo-lite.local-project-folders` 22→23) → task sent → auto-verification `succeeded`.
|
|
243
|
+
|
|
244
|
+
### Changed
|
|
245
|
+
|
|
246
|
+
- `docs/traework-cdp.md` / `.en.md`: 7 new pitfall entries; added the "dropdown entries ≠ project map" fact and the fallback note.
|
|
247
|
+
|
|
248
|
+
### Testing
|
|
249
|
+
|
|
250
|
+
- Total tests **167 → 172** (new dialog message-mapping/platform-branch unit tests + Code→Work fallback integration test).
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## [0.1.5] — 2026-09-08
|
|
255
|
+
|
|
256
|
+
### Added
|
|
257
|
+
|
|
258
|
+
- **TraeWork panel mode switching**: `run_task` gained a `mode` parameter supporting `Work` / `Code` / `Design`.
|
|
259
|
+
- Resolution order: explicit `mode` parameter > task-text detection > keep `Work`.
|
|
260
|
+
- Text detection handles mixed Chinese/English phrasing ("switch to Code mode", "use design mode", "工作模式", "代码模式", "设计模式", …).
|
|
261
|
+
- New `gui.modeSwitch` profile switch (default `true`).
|
|
262
|
+
- New pure functions `detectModeFromText` / `resolveMode` (unit-tested).
|
|
263
|
+
- **Dedicated SVG assets**: `assets/tianshu-mcp-icon.svg` (app icon), `assets/tianshu-mcp-banner.svg` (wide banner).
|
|
264
|
+
- New `scripts/probe-traework.mjs mode <Work|Code|Design>` subcommand (real-machine diagnostics/verification).
|
|
265
|
+
- New bilingual release notes `docs/release-v0.1.5.md` / `.en.md`.
|
|
266
|
+
|
|
267
|
+
### Changed
|
|
268
|
+
|
|
269
|
+
- **TraeWork execution order**: measurement showed the three modes **each keep an independent project binding** —
|
|
270
|
+
switching modes replaces the input bar's project with whatever that mode last used.
|
|
271
|
+
Order is now: ensure instance → wait for UI → new session → switch to target mode → bind project inside that mode → switch model → send.
|
|
272
|
+
- After binding, both mode and project are re-verified; any mismatch **fails loudly** (never silently develops in the wrong mode).
|
|
273
|
+
- meta block now exposes `model` / `mode` for Tianshu to read back.
|
|
274
|
+
- `package.json`: `license` changed from `MIT` to `Apache-2.0` (matching the repository `LICENSE` file);
|
|
275
|
+
added `repository` / `homepage` / `bugs`; `files` now includes `assets`.
|
|
276
|
+
- README.md / README.en.md fully rewritten: stack badges, SVG banner (above the icon), language isolation
|
|
277
|
+
(the Chinese README references Chinese docs only; the English README references English docs only).
|
|
278
|
+
|
|
279
|
+
### Fixed
|
|
280
|
+
|
|
281
|
+
- **Rework feedback race** (pre-existing; intermittent under load): the terminal snapshot is written first, so a caller's
|
|
282
|
+
immediate `rework_task(feedback)` could be erased by the previous run's `delete meta.reworkFeedback`, leaving the rework
|
|
283
|
+
round without feedback. Now the feedback is consumed and cleared atomically when `startTask` begins.
|
|
284
|
+
Added regression test `test/integration/rework-feedback-race.test.ts`.
|
|
285
|
+
- **`projectBasename` cross-platform**: it used `path.basename` (which does not split backslashes on POSIX), failing
|
|
286
|
+
Linux/macOS CI; now it splits explicitly on both `\` and `/`.
|
|
287
|
+
|
|
288
|
+
### Testing
|
|
289
|
+
|
|
290
|
+
- Total tests **153 → 167** (14 new mode-related cases).
|
|
291
|
+
- Real-machine end-to-end: `mode=Work` / `mode=Code` / `mode=Design` all completed
|
|
292
|
+
"switch mode → bind project → send → create file → auto-verification passed".
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## [0.1.4] — 2026-09-08
|
|
297
|
+
|
|
298
|
+
### Added
|
|
299
|
+
|
|
300
|
+
- TraeWork GUI driver over CDP: `traework` moved from `unsupported` to `driver=gui` / `status=ready`.
|
|
301
|
+
- Capabilities: launch/reuse instance → new session → bind project folder (dropdown first, restricted computer-use
|
|
302
|
+
native dialog as fallback) → optional model selection → read-back-verified send → poll to completion →
|
|
303
|
+
auto-verify → repair-plan file + same-session rework on failure.
|
|
304
|
+
- Safety: reuse the user's instance by default, never kill a process tree, verify the command line before terminating;
|
|
305
|
+
computer-use is limited to TraeWork's folder picker.
|
|
306
|
+
- `AgentAdapter` gained an optional `run()` execution surface; the orchestrator branches on `adapter.run`
|
|
307
|
+
(CLI agents still use spawn).
|
|
308
|
+
- Profile gained `driver` (`spawn` / `gui`) and a `gui` section; `run_task` gained a `model` parameter.
|
|
309
|
+
- New `src/agents/traework/**` (CDP client, selector table, launcher, session/input/model/reply modules, restricted computer-use).
|
|
310
|
+
- On verification failure a repair-plan file `rework-<taskId>-r<N>.md` is generated (task dir + project `.tianshu-mcp`)
|
|
311
|
+
and its filename is referenced in the rework message.
|
|
312
|
+
|
|
313
|
+
### Changed
|
|
314
|
+
|
|
315
|
+
- `docs/adapter-matrix.md` T1 conclusion corrected from `unsupported` to "integrated (driver=gui)".
|
|
316
|
+
- formatter now passes cancel-source fields (`abortSource`, …) through to `query_task`'s meta block.
|
|
317
|
+
|
|
318
|
+
### Fixed
|
|
319
|
+
|
|
320
|
+
- Unified timeout terminal state: normal timeouts now also land `failed(timeout)` plus exactly one `timeout_killed` event, in fixed order.
|
|
321
|
+
- Stabilized the `shutdown` test polling.
|
|
322
|
+
|
|
323
|
+
### Testing
|
|
324
|
+
|
|
325
|
+
- Total tests **72 → 153** (new TraeWork unit/integration cases).
|
|
326
|
+
- Real-machine end-to-end: `run_task(agentId=traework, model=GLM-5.3, autoVerify=true)` drove TraeWork to create a file and passed acceptance.
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## [0.1.3] — 2026-09-08
|
|
331
|
+
|
|
332
|
+
### Fixed
|
|
333
|
+
|
|
334
|
+
- **S1** No-reason cancel was mis-recorded as `interrupted`: added independent `cancelRequestedAt` / `abortSource` fields;
|
|
335
|
+
cancel intent no longer depends on the optional `reason` (5 regression tests).
|
|
336
|
+
- **S2** Unified timeout terminal state (shared with 0.1.4).
|
|
337
|
+
- **S3** Tracked pre-dirty net-diff attribution: pre-existing dirty files are excluded by content hash when unchanged;
|
|
338
|
+
unchanged staged/unstaged files are no longer reported as agent changes (4 regressions).
|
|
339
|
+
- **S4** `verify_task(taskId)` persists real-task metadata (`reportRound` / `verificationSource` /
|
|
340
|
+
`latestVerificationVerdict`, keeping `agentId`); single-source MCP version (`sync-version` injection).
|
|
341
|
+
- **S5** `projects.json` official Zod schema + last-known-good for `config`/`profiles`/`projects` + content-sha256
|
|
342
|
+
hot-reload invalidation (fixed corrupt JSON being treated as missing and reset).
|
|
343
|
+
|
|
344
|
+
### Changed
|
|
345
|
+
|
|
346
|
+
- **S6** CI/Release `npm ci` retry corrected (stop on success / 3 attempts / attempt counter);
|
|
347
|
+
Vitest v3 upgrade (0 audit vulnerabilities); plain-text status markers (emoji scan test).
|
|
348
|
+
|
|
349
|
+
### Testing
|
|
350
|
+
|
|
351
|
+
- Total tests **53 → 72**.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## [0.1.2] — 2026-09-08
|
|
356
|
+
|
|
357
|
+
### Changed
|
|
358
|
+
|
|
359
|
+
- Build no longer ships source maps (no `.map`, tarball ≈ 69.9 KB).
|
|
360
|
+
|
|
361
|
+
### Testing
|
|
362
|
+
|
|
363
|
+
- Total tests **53**.
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## [0.1.1] — 2026-09-07
|
|
368
|
+
|
|
369
|
+
### Added
|
|
370
|
+
|
|
371
|
+
- **Release after the R1–R5 fixes**:
|
|
372
|
+
- **R1** Cancel/interrupt state persistence (`cancel_requested → cancelled`, `cancelReason`/`finishedAt`/`errorType`
|
|
373
|
+
persisted, restart-recoverable, idempotent, bounded shutdown).
|
|
374
|
+
- **R2** Call-level `taskTimeoutMs` precedence fix + cross-platform process-tree termination
|
|
375
|
+
(POSIX process-group SIGTERM→SIGKILL, Windows `taskkill /T /F`).
|
|
376
|
+
- **R3** Git baseline participates in diff (boundary at `baseline.head`; agent commits do not lose changes;
|
|
377
|
+
dirty-worktree hash attribution).
|
|
378
|
+
- **R4** Verification tool parameters and report-round semantics (`round=0` valid, manual verify does not overwrite
|
|
379
|
+
reports, `extraChecks` append + `checksMode=replace`, `optional` does not affect verdict, `baselineRef` validated).
|
|
380
|
+
- **R5** Removed hardcoded agent paths (`{LOCALAPPDATA}` placeholders + platform-standard candidates);
|
|
381
|
+
mtime hot reload for `config`/`profile`/`projects`.
|
|
382
|
+
- **R6** Cross-platform CI matrix (Windows/macOS/Linux × Node 20/22) and Release version consistency
|
|
383
|
+
(tag/input = `package.json` = tarball), plus tarball content checks.
|
|
384
|
+
- **R7** npm published `tianshu-mcp@0.1.1` + `npx -y` raise with 8 tools connected.
|
|
385
|
+
- **R8** Bilingual docs synced (including 4 English topic docs).
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## [0.1.0] — 2026-09-07
|
|
390
|
+
|
|
391
|
+
### Added
|
|
392
|
+
|
|
393
|
+
- First usable release: **M1 core engine + stub-agent end-to-end**.
|
|
394
|
+
- 8 MCP tools: `run_task` / `query_task` / `list_tasks` / `get_task_report` / `cancel_task` / `verify_task` /
|
|
395
|
+
`rework_task` / `get_profiles`.
|
|
396
|
+
- `TaskManager` state machine / per-project serial queue / global concurrency gate / cancel (kill tree) / event-stream persistence.
|
|
397
|
+
- Acceptance engine: git baseline & diff, default check-set derivation, command runner, code analysis,
|
|
398
|
+
`report.md` / `report.json`.
|
|
399
|
+
- fix-loop auto rework + `needs_attention`; skill self-install.
|
|
400
|
+
- Stub-agent 3 playbooks (good / fix-on-first / never) integration tests + protocol tests — **53/53 green**.
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
[Unreleased]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.9...HEAD
|
|
405
|
+
[0.1.9]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.8...v0.1.9
|
|
406
|
+
[0.1.8]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.7...v0.1.8
|
|
407
|
+
[0.1.7]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.6...v0.1.7
|
|
408
|
+
[0.1.6]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.5...v0.1.6
|
|
409
|
+
[0.1.5]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.4...v0.1.5
|
|
410
|
+
[0.1.4]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.3...v0.1.4
|
|
411
|
+
[0.1.3]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.2...v0.1.3
|
|
412
|
+
[0.1.2]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.1...v0.1.2
|
|
413
|
+
[0.1.1]: https://github.com/lanlan0811/tianshu-mcp/compare/v0.1.0...v0.1.1
|
|
414
|
+
[0.1.0]: https://github.com/lanlan0811/tianshu-mcp/releases/tag/v0.1.0
|