cowork-flow 2.5.0 → 2.5.2
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.md +26 -1
- package/CONTRIBUTING.en.md +115 -0
- package/CONTRIBUTING.md +14 -8
- package/README.en.md +12 -2
- package/README.md +8 -1
- package/docs/index.en.md +1 -1
- package/docs/release.en.md +1 -1
- package/package.json +3 -2
- package/presets/claude-code/.claude-plugin/plugin.json +1 -1
- package/presets/codex/.codex-plugin/plugin.json +1 -1
- package/presets/kimi-code/.kimi-plugin/plugin.json +1 -1
- package/presets/qoder/.qoder-plugin/plugin.json +1 -1
- package/presets/zcode/.zcode-plugin/plugin.json +1 -1
- package/src/commands/init.js +11 -2
- package/src/commands/install-dsh-preset.js +10 -5
- package/template/.cowork-flow/.version +1 -1
- package/template/.cowork-flow/scripts/adapters/cli/task_navigation.py +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
+
## [2.5.2] - 2026-11-03
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **发布工作流**:`publish.yml` 的 `verify-ubuntu` 与 `verify-windows` 在 `release:check` 前安装 pytest。2.5.1 起 `test:all` 纳入 `python -m pytest`,而干净 runner 默认没有 pytest,两个 verify job 会在发布前失败并跳过 publish。
|
|
14
|
+
|
|
15
|
+
## [2.5.1] - 2026-11-03
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **首次旅程引导**:`cwf project init` 完成后的 `Next:` 提示改为“打开宿主、新开会话、描述需求”,并在需要机器级组件时提示 `cwf host add <host>`;`task next` 无任务时保留 `create a planned task` 与携带 `--from-plan .cowork-flow/plans/YYYY-MM-DD-<task-name>.md` 的创建命令;文本 `Source:` 只显示会话类别,不再暴露进程级 session key;README 中英文补充第一个任务“说清目标 → 确认计划 → 再改代码 → 验收归档”的四步说明。
|
|
20
|
+
- **根级 CONTRIBUTING 与 SECURITY 英文对页**:新增 `CONTRIBUTING.en.md` 与 `SECURITY.en.md`,中文源同步环境要求、仓库位置、宿主测试模式与支持版本;`README.en.md`、`docs/index.en.md`、`docs/release.en.md` 改指英文对页,`test/docs.test.js` 覆盖两份新文档,npm 随包清单纳入 `CONTRIBUTING.en.md`(`SECURITY.en.md` 与中文版一样只在仓库分发)。
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **测试信号与 CI 矩阵**:`test:all` 纳入 `python -m pytest -q`;修正 4 处时间依赖测试(归档目录跨月、`completedAt`、任务目录日期前缀);新增 Node 24 与 Python 3.13 兼容 job,核心 job 增加 45 分钟超时。
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **发布通道**:发布前查询 npm 已存在版本,避免重复 `npm publish` 红叉;`pack:check` 在打包前拦截交付树中的 `__pycache__`/`.pyc`;修正归档 e2e 对 `archive/2026-10` 的硬编码。
|
|
29
|
+
- **DSH 桌面预设**:0.2.x bundle 的 persona 去掉未注册的 `{{cwd}}` 变量(0.2.1 的 persona section 只注册 `provider`/`model`,工作目录由 `dsh-working-directory` 注入),修复桌面版加载预设时报 `Unknown prompt variable`;0.1.x legacy 目录保持原文案。
|
|
30
|
+
- **测试隔离**:JS hook 测试共享 scrub 清除宿主 session 变量(`ZCODE_SESSION_ID` 等)并让 zcode 探针显式传 fixture `cwd`;Python 测试基类在 `setUp` 清除 `COWORK_FLOW_*` 与宿主 session 变量并在 cleanup 还原,避免在已绑定会话内读到开发者的真实活动任务。
|
|
31
|
+
|
|
9
32
|
## [2.5.0] - 2026-10-26
|
|
10
33
|
|
|
11
34
|
### Added
|
|
@@ -462,7 +485,9 @@
|
|
|
462
485
|
|
|
463
486
|
此版本未保留本地条目正文,详情见 [GitHub Release](https://github.com/fishlikewater/cowork-flow/releases/tag/v0.0.47)。
|
|
464
487
|
|
|
465
|
-
[Unreleased]: https://github.com/fishlikewater/cowork-flow/compare/v2.5.
|
|
488
|
+
[Unreleased]: https://github.com/fishlikewater/cowork-flow/compare/v2.5.2...HEAD
|
|
489
|
+
[2.5.2]: https://github.com/fishlikewater/cowork-flow/compare/v2.5.1...v2.5.2
|
|
490
|
+
[2.5.1]: https://github.com/fishlikewater/cowork-flow/compare/v2.5.0...v2.5.1
|
|
466
491
|
[2.5.0]: https://github.com/fishlikewater/cowork-flow/compare/v2.4.2...v2.5.0
|
|
467
492
|
[2.4.2]: https://github.com/fishlikewater/cowork-flow/compare/v2.4.1...v2.4.2
|
|
468
493
|
[2.4.1]: https://github.com/fishlikewater/cowork-flow/compare/v2.4.0...v2.4.1
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
[中文](CONTRIBUTING.md) | English
|
|
4
|
+
|
|
5
|
+
Thanks for contributing to cowork-flow. This document covers only what you need to start work, decide the scope of a change, and open a pull request. For repository structure, see [Architecture and extension](docs/architecture.en.md); for the release process, see [Release and maintenance](docs/release.en.md).
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
| Dependency | Version | Purpose |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Node.js | 20 or later | CLI and Node tests |
|
|
12
|
+
| Python | 3.10 or later | Template runtime and Python tests |
|
|
13
|
+
| Git | Current stable | Task baseline, sync, and host tests |
|
|
14
|
+
|
|
15
|
+
The repository has no runtime dependencies and no devDependencies. `npm ci` installs no third-party packages; explain the reason and discuss the approach before adding a dependency.
|
|
16
|
+
|
|
17
|
+
All source code and documentation use UTF-8. The line-ending contract for Windows and POSIX scripts is managed by `.gitattributes`; do not rewrite it by hand.
|
|
18
|
+
|
|
19
|
+
## Getting started locally
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
git clone https://github.com/fishlikewater/cowork-flow.git
|
|
23
|
+
cd cowork-flow
|
|
24
|
+
npm ci
|
|
25
|
+
npm run source:refresh
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`source:refresh` refreshes this repository's own `.cowork-flow/`, `.agents/skills/`, and `.claude/skills/` from `template/`. Rerun it after changing `template/`; otherwise local tests and `./.cowork-flow/run` keep using the old copies.
|
|
29
|
+
|
|
30
|
+
This repository also uses cowork-flow. Check the current state before you start changing things:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
./.cowork-flow/run task next --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`AGENTS.md` and `.cowork-flow/spec/` are implementation constraints; do not build a second process beside the current task.
|
|
37
|
+
|
|
38
|
+
## Decide what to change first
|
|
39
|
+
|
|
40
|
+
| Change | Main location |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Files written after project initialization | `template/` |
|
|
43
|
+
| Machine-level plugins, presets, and hooks | `presets/` |
|
|
44
|
+
| CLI commands and installers | `src/commands/`, `src/lib/` |
|
|
45
|
+
| Project runtime | `template/.cowork-flow/scripts/` |
|
|
46
|
+
| Host, sync, and skill declarations | `template/.cowork-flow/spec/runtime/host-assets.json` |
|
|
47
|
+
| Release, packaging, and test entry scripts | `scripts/` |
|
|
48
|
+
| Node tests | `test/` |
|
|
49
|
+
| Python tests | `tests/` |
|
|
50
|
+
| CI, issue/PR templates, and dependency updates | `.github/` |
|
|
51
|
+
| User and maintainer documentation | `README.md`, `README.en.md`, `docs/`, `CONTRIBUTING.md`, `CONTRIBUTING.en.md`, `SECURITY.md`, `SECURITY.en.md` |
|
|
52
|
+
|
|
53
|
+
When adding or changing behavior, write a test that fails first, then the smallest implementation. Before refactoring, pin the existing behavior so unrelated modules do not change by accident. The root `CONTRIBUTING` and `SECURITY` documents are kept as Chinese/English pairs: change the Chinese source first, then sync the English page.
|
|
54
|
+
|
|
55
|
+
## Host changes
|
|
56
|
+
|
|
57
|
+
When integrating or changing a host, usually check all of these:
|
|
58
|
+
|
|
59
|
+
| Location | Contents |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `template/.<host>/` | Hooks, agents, commands, and configuration that must be written into the project |
|
|
62
|
+
| `template/.cowork-flow/adapters/<host>/adapter.yaml` | Adapter and skill discovery declarations |
|
|
63
|
+
| `template/.cowork-flow/spec/runtime/host-assets.json` | Platforms, payloads, sync policy, and migration list |
|
|
64
|
+
| `presets/<host>/` | Plugins, presets, or machine-level hooks |
|
|
65
|
+
| `src/commands/install-<host>-*.js`, `src/commands/registry.js` | Installation, uninstallation, and command registration |
|
|
66
|
+
| `test/host-assets.test.js`, `test/host-command.test.js`, `test/host-inspect.test.js`, `test/<host>-*.test.js`, `tests/test_host_*.py` | Behavior and regression gates |
|
|
67
|
+
| `docs/hosts.md`, `docs/hosts.en.md` | Installation prerequisites, upgrades, uninstallation, and troubleshooting |
|
|
68
|
+
|
|
69
|
+
The table shows where to change things. Host-specific code must not enter the shared layer — see "Extension rules" in [Architecture and extension](docs/architecture.en.md) for the boundary.
|
|
70
|
+
|
|
71
|
+
## Commit messages
|
|
72
|
+
|
|
73
|
+
Use Conventional Commits:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
<type>(<scope>): <description>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Examples:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
feat(host): add cwf host inspect
|
|
83
|
+
fix(host): correct skill discovery path
|
|
84
|
+
refactor(zcode): move the plugin payload to presets/zcode
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Common types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `perf`. Descriptions may be Chinese or English, matching the repository's existing style; say what changed, not an unverifiable phrase such as "improve the experience".
|
|
88
|
+
|
|
89
|
+
## Tests and pre-PR checks
|
|
90
|
+
|
|
91
|
+
Minimum:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npm run test:fast
|
|
95
|
+
git diff --check
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
For which commands to add based on the change scope and what each covers, see "Pre-release checks" in [Release and maintenance](docs/release.en.md) — that is the only list of commands and their applicable scenarios; this document does not repeat it.
|
|
99
|
+
|
|
100
|
+
`test:fast` runs only the core suites listed in `package.json`. When adding a test file, decide based on the impact whether to add it to that list.
|
|
101
|
+
|
|
102
|
+
Run `test:fast` for documentation changes too: `test/docs.test.js` validates relative links, each language's index, and the Chinese/English page pairing under `docs/`.
|
|
103
|
+
|
|
104
|
+
When platform prerequisites are not met, tests may skip explicitly. CI runs its gates on Ubuntu and Windows; a local machine without the prerequisites may skip, but record it honestly — never report a skip as a pass.
|
|
105
|
+
|
|
106
|
+
A PR description should state:
|
|
107
|
+
|
|
108
|
+
- What changed and why.
|
|
109
|
+
- Which tests ran and their results.
|
|
110
|
+
- Which platform cases were skipped or remain unverified.
|
|
111
|
+
- Whether installation locations, commands, configuration formats, or upgrade steps changed.
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
By submitting code you agree to license it under [MIT](LICENSE).
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 参与开发
|
|
2
2
|
|
|
3
|
+
[English](CONTRIBUTING.en.md) | 中文
|
|
4
|
+
|
|
3
5
|
感谢你参与 cowork-flow。本文只保留开始工作、判断改动范围和提交 PR 需要知道的内容。仓库结构见 [架构与扩展](docs/architecture.md),发布流程见 [发布与维护](docs/release.md)。
|
|
4
6
|
|
|
5
7
|
## 环境要求
|
|
@@ -7,7 +9,7 @@
|
|
|
7
9
|
| 依赖 | 版本 | 用途 |
|
|
8
10
|
|---|---|---|
|
|
9
11
|
| Node.js | 20 或更高 | CLI 与 Node 测试 |
|
|
10
|
-
| Python | 3.10 | 模板运行时与 Python 测试 |
|
|
12
|
+
| Python | 3.10 或更高 | 模板运行时与 Python 测试 |
|
|
11
13
|
| Git | 当前稳定版 | 任务基线、同步和宿主测试 |
|
|
12
14
|
|
|
13
15
|
仓库没有运行时依赖,也没有 devDependency。`npm ci` 不会安装第三方包;新增依赖前先说明原因并讨论方案。
|
|
@@ -42,11 +44,13 @@ npm run source:refresh
|
|
|
42
44
|
| CLI 命令与安装器 | `src/commands/`、`src/lib/` |
|
|
43
45
|
| 项目运行时 | `template/.cowork-flow/scripts/` |
|
|
44
46
|
| 宿主、同步和技能声明 | `template/.cowork-flow/spec/runtime/host-assets.json` |
|
|
47
|
+
| 发布、打包与测试入口脚本 | `scripts/` |
|
|
45
48
|
| Node 测试 | `test/` |
|
|
46
49
|
| Python 测试 | `tests/` |
|
|
47
|
-
|
|
|
50
|
+
| CI、Issue/PR 模板与依赖更新 | `.github/` |
|
|
51
|
+
| 用户和维护文档 | `README.md`、`README.en.md`、`docs/`、`CONTRIBUTING.md`、`CONTRIBUTING.en.md`、`SECURITY.md`、`SECURITY.en.md` |
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
新增或修改行为时,先补一个能失败的测试,再写最小实现。重构前先固定现有行为,避免顺手改动无关模块。根级 `CONTRIBUTING` 与 `SECURITY` 保持中英对页:事实先改中文源,再同步英文。
|
|
50
54
|
|
|
51
55
|
## 宿主改动
|
|
52
56
|
|
|
@@ -59,8 +63,8 @@ npm run source:refresh
|
|
|
59
63
|
| `template/.cowork-flow/spec/runtime/host-assets.json` | 平台、载荷、同步策略和迁移清单 |
|
|
60
64
|
| `presets/<host>/` | 插件、预设或机器级 hook |
|
|
61
65
|
| `src/commands/install-<host>-*.js`、`src/commands/registry.js` | 安装、卸载和命令注册 |
|
|
62
|
-
| `test/host-assets.test.js`、`test/host-command.test.js`、`test
|
|
63
|
-
| `docs/hosts.md` | 安装前提、升级、卸载和排障 |
|
|
66
|
+
| `test/host-assets.test.js`、`test/host-command.test.js`、`test/host-inspect.test.js`、`test/<host>-*.test.js`、`tests/test_host_*.py` | 行为与回归门禁 |
|
|
67
|
+
| `docs/hosts.md`、`docs/hosts.en.md` | 安装前提、升级、卸载和排障 |
|
|
64
68
|
|
|
65
69
|
上表说明改哪里。宿主特化不能进入通用层——具体边界见 [架构与扩展](docs/architecture.md) 的“扩展规则”。
|
|
66
70
|
|
|
@@ -69,18 +73,18 @@ npm run source:refresh
|
|
|
69
73
|
使用 Conventional Commits:
|
|
70
74
|
|
|
71
75
|
```text
|
|
72
|
-
<type>(<scope>):
|
|
76
|
+
<type>(<scope>): <描述>
|
|
73
77
|
```
|
|
74
78
|
|
|
75
79
|
示例:
|
|
76
80
|
|
|
77
81
|
```text
|
|
78
|
-
feat(host):
|
|
82
|
+
feat(host): add cwf host inspect
|
|
79
83
|
fix(host): 修正技能发现路径
|
|
80
84
|
refactor(zcode): 将插件载荷迁到 presets/zcode
|
|
81
85
|
```
|
|
82
86
|
|
|
83
|
-
常用 `type`:`feat`、`fix`、`refactor`、`docs`、`test`、`chore`、`perf
|
|
87
|
+
常用 `type`:`feat`、`fix`、`refactor`、`docs`、`test`、`chore`、`perf`。描述可以用中文或英文,保持仓库现有风格;写清楚做了什么,不写“优化体验”一类无法核对的信息。
|
|
84
88
|
|
|
85
89
|
## 测试与 PR 前置检查
|
|
86
90
|
|
|
@@ -95,6 +99,8 @@ git diff --check
|
|
|
95
99
|
|
|
96
100
|
`test:fast` 只运行 `package.json` 中列出的核心套件。新增测试文件时,根据影响面决定是否加入该列表。
|
|
97
101
|
|
|
102
|
+
改动 `README.md`、`docs/`、`CONTRIBUTING.md` 或 `SECURITY.md` 时同样跑 `test:fast`:其中的 `test/docs.test.js` 会校验相对链接、中英文索引和 `docs/` 的中英对页结构。
|
|
103
|
+
|
|
98
104
|
平台前提不满足时,测试可能明确跳过。CI 在 Ubuntu 和 Windows 上运行各自的门禁,本地缺少平台前提可以跳过,但必须如实记录,不能把跳过写成通过。
|
|
99
105
|
|
|
100
106
|
PR 描述需要写明:
|
package/README.en.md
CHANGED
|
@@ -109,7 +109,17 @@ requirements, the plan, and the change scope first, and wait for confirmation be
|
|
|
109
109
|
editing code.
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
On your first task, walk through the whole sequence:
|
|
113
|
+
|
|
114
|
+
1. **State the goal**: describe the problem and what counts as done.
|
|
115
|
+
2. **Confirm the plan**: the assistant writes the goal into a plan, lists the files it
|
|
116
|
+
may change, and waits for your approval.
|
|
117
|
+
3. **Edit code only after that**: implementation starts after the plan is approved; the
|
|
118
|
+
assistant self-checks, then you review.
|
|
119
|
+
4. **Archive the task**: once accepted, the task is archived and its state stays in the
|
|
120
|
+
project.
|
|
121
|
+
|
|
122
|
+
At any step, run the command below to see the current stage and next action:
|
|
113
123
|
|
|
114
124
|
```bash
|
|
115
125
|
./.cowork-flow/run task next
|
|
@@ -197,7 +207,7 @@ counterpart at the top.
|
|
|
197
207
|
| [Host integration](docs/hosts.en.md) | Install, restart, troubleshoot, and uninstall for each host |
|
|
198
208
|
| [Release and maintenance](docs/release.en.md) | Tests, CI, and maintainer commands |
|
|
199
209
|
| [Direction](docs/direction.en.md) | Positioning, settled trade-offs, version line, and open items |
|
|
200
|
-
| [Contributing](CONTRIBUTING.md) | Local setup, commit conventions, and PR checks
|
|
210
|
+
| [Contributing](CONTRIBUTING.en.md) | Local setup, commit conventions, and PR checks |
|
|
201
211
|
| [Changelog](CHANGELOG.md) | What changed in each version (Chinese) |
|
|
202
212
|
|
|
203
213
|
## License
|
package/README.md
CHANGED
|
@@ -81,7 +81,14 @@ cwf host add <host>
|
|
|
81
81
|
请用 cowork-flow 完成“订单列表按状态筛选”。先把需求、计划和改动范围说清楚,确认后再改代码。
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
第一次使用时,建议完整走一遍这个顺序:
|
|
85
|
+
|
|
86
|
+
1. **说清目标**:描述要解决的问题,以及怎样算完成。
|
|
87
|
+
2. **确认计划**:助手先把目标写成计划,列出允许修改的文件,等你确认。
|
|
88
|
+
3. **再改代码**:计划确认后才开始实现;完成后先自查,再由你验收。
|
|
89
|
+
4. **归档任务**:验收通过后任务归档,状态保存在项目里。
|
|
90
|
+
|
|
91
|
+
每一步都可以运行下面的命令查看当前阶段和下一步:
|
|
85
92
|
|
|
86
93
|
```bash
|
|
87
94
|
./.cowork-flow/run task next
|
package/docs/index.en.md
CHANGED
|
@@ -11,7 +11,7 @@ If this is your first time installing and using cowork-flow, read [README](../RE
|
|
|
11
11
|
| Install, initialize a project, or start a task | [README](../README.en.md) | The shortest path to get started, day-to-day commands, and common questions |
|
|
12
12
|
| Connect cowork-flow to an AI coding host | [Host integration](hosts.en.md) | Installation components, restart requirements, upgrades, uninstallation, and troubleshooting for each host |
|
|
13
13
|
| Understand how project files are organized | [Architecture and extension](architecture.en.md) | The runtime, `template/`, `presets/`, sync policy, and extension boundaries |
|
|
14
|
-
| Contribute to project development | [Contributing](../CONTRIBUTING.md)
|
|
14
|
+
| Contribute to project development | [Contributing](../CONTRIBUTING.en.md) | Local setup, code conventions, tests, and PR checks |
|
|
15
15
|
| Understand the test and release process | [Release and maintenance](release.en.md) | Test layers, CI, version releases, and maintainer commands |
|
|
16
16
|
| Understand project direction and version planning | [Direction](direction.en.md) | The positioning statement, settled trade-offs, the version mainline, and open items |
|
|
17
17
|
| See what changed in a given version | [Changelog](../CHANGELOG.md) (Chinese) | Feature changes, fixes, and migration notes recorded by version |
|
package/docs/release.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](release.md) | English
|
|
4
4
|
|
|
5
|
-
This document is for maintainers of the cowork-flow repository. Regular users only need the [README](../README.en.md); before submitting code, read [Contributing](../CONTRIBUTING.md)
|
|
5
|
+
This document is for maintainers of the cowork-flow repository. Regular users only need the [README](../README.en.md); before submitting code, read [Contributing](../CONTRIBUTING.en.md) first.
|
|
6
6
|
|
|
7
7
|
## Pre-release checks
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cowork-flow",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "CLI for installing and maintaining cowork-flow collaboration templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agent",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"README.en.md",
|
|
44
44
|
"CHANGELOG.md",
|
|
45
45
|
"CONTRIBUTING.md",
|
|
46
|
+
"CONTRIBUTING.en.md",
|
|
46
47
|
"!template/**/__pycache__/**",
|
|
47
48
|
"!template/**/*.pyc"
|
|
48
49
|
],
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"icons:export": "node scripts/export-icons.mjs",
|
|
59
60
|
"source:refresh:dry-run": "node bin/cowork-flow.js dev refresh --dry-run",
|
|
60
61
|
"source:refresh": "node bin/cowork-flow.js dev refresh",
|
|
61
|
-
"test:all": "npm run test:node:full && npm run test:template:full && npm run pack:check",
|
|
62
|
+
"test:all": "npm run test:node:full && npm run test:template:full && python -m pytest -q && npm run pack:check",
|
|
62
63
|
"release:check": "npm run test:all && node scripts/release-gates.js",
|
|
63
64
|
"release": "sh scripts/release.sh",
|
|
64
65
|
"test:windows:core": "npm run test:fast && npm run test:integration && node --test --test-timeout=600000 test/dsh-home-patch.test.js test/dsh-hook.test.js test/dsh-preset.test.js test/dsh-preset-bundle.test.js test/mcp-client-matrix.test.js test/mcp-state-command.test.js test/tarball-install.test.js && node --test --test-timeout=600000 test/init.test.js test/sync.test.js && npm run pack:check && npm run test:template"
|
package/src/commands/init.js
CHANGED
|
@@ -423,6 +423,15 @@ export async function runInitWithOptions(
|
|
|
423
423
|
io.writeOut(`Hosts: ${formatPlatformList(platforms)}\n`);
|
|
424
424
|
emitPythonWarning(io, await (pythonProbe ?? probePython)());
|
|
425
425
|
|
|
426
|
+
const emitNextSteps = () => {
|
|
427
|
+
io.writeOut(
|
|
428
|
+
`Next: open ${formatPlatformList(platforms)} in this project, start a new session, and describe what you want to build.\n`
|
|
429
|
+
);
|
|
430
|
+
io.writeOut(
|
|
431
|
+
'If the host needs machine-level setup, run: cwf host add <host> (see docs/hosts.md)\n'
|
|
432
|
+
);
|
|
433
|
+
};
|
|
434
|
+
|
|
426
435
|
if (options.dryRun) {
|
|
427
436
|
if (developer.existing) {
|
|
428
437
|
io.writeOut(`dry-run preserve-existing=.cowork-flow/.developer for developer ${developer.name}\n`);
|
|
@@ -437,7 +446,7 @@ export async function runInitWithOptions(
|
|
|
437
446
|
} else {
|
|
438
447
|
io.writeOut(`dry-run would-create=.cowork-flow/config.yaml for language ${language.language}\n`);
|
|
439
448
|
}
|
|
440
|
-
|
|
449
|
+
emitNextSteps();
|
|
441
450
|
return 0;
|
|
442
451
|
}
|
|
443
452
|
|
|
@@ -454,6 +463,6 @@ export async function runInitWithOptions(
|
|
|
454
463
|
const source = language.source === 'default' ? ' (default)' : '';
|
|
455
464
|
io.writeOut(`Language initialized: ${language.language}${source}\n`);
|
|
456
465
|
}
|
|
457
|
-
|
|
466
|
+
emitNextSteps();
|
|
458
467
|
return 0;
|
|
459
468
|
}
|
|
@@ -25,9 +25,13 @@ const DESKTOP_ROW_SWAP = {
|
|
|
25
25
|
from: { id: 'workflow-worker-thread', name: '@deepseek-ai/dsh-workflow-worker-thread' },
|
|
26
26
|
to: { id: 'workflow-ptc', name: '@deepseek-ai/dsh-workflow-ptc' },
|
|
27
27
|
};
|
|
28
|
-
// 0.2.0's `dsh-persona` takes `prefix`/`suffix` where 0.1.x takes one `text
|
|
29
|
-
//
|
|
28
|
+
// 0.2.0's `dsh-persona` takes `prefix`/`suffix` where 0.1.x takes one `text`.
|
|
29
|
+
// Its persona section resolves only `provider`/`model` — the working directory
|
|
30
|
+
// arrives as user-role context from `dsh-working-directory` — so the 0.1.x
|
|
31
|
+
// `{{cwd}}` clause is dropped; 0.1.x resolves that variable from the agent's
|
|
32
|
+
// workspace.
|
|
30
33
|
const DESKTOP_PERSONA_KEY = /(- id: persona\n(?:.*\n)*? {4})text: /;
|
|
34
|
+
const DESKTOP_CWD_CLAUSE = ' Your working directory is {{cwd}}.';
|
|
31
35
|
|
|
32
36
|
// Rendered by `host add`/`host remove`; the installer's
|
|
33
37
|
// own vocabulary.
|
|
@@ -85,8 +89,8 @@ function quoteScalar(value) {
|
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
|
|
88
|
-
// Apply the desktop's
|
|
89
|
-
//
|
|
92
|
+
// Apply the desktop's rewrites to the 0.1.x composition. Only what the host
|
|
93
|
+
// APIs force to differ between the two lines belongs here.
|
|
90
94
|
function toDesktopComposition(text) {
|
|
91
95
|
return text
|
|
92
96
|
.replace(`- id: ${DESKTOP_ROW_SWAP.from.id}`, `- id: ${DESKTOP_ROW_SWAP.to.id}`)
|
|
@@ -94,7 +98,8 @@ function toDesktopComposition(text) {
|
|
|
94
98
|
`name: '${DESKTOP_ROW_SWAP.from.name}'`,
|
|
95
99
|
`name: '${DESKTOP_ROW_SWAP.to.name}'`
|
|
96
100
|
)
|
|
97
|
-
.replace(DESKTOP_PERSONA_KEY, '$1prefix: ')
|
|
101
|
+
.replace(DESKTOP_PERSONA_KEY, '$1prefix: ')
|
|
102
|
+
.replace(DESKTOP_CWD_CLAUSE, '');
|
|
98
103
|
}
|
|
99
104
|
|
|
100
105
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2.5.
|
|
1
|
+
2.5.2
|
|
@@ -342,6 +342,11 @@ def _print_json_route(
|
|
|
342
342
|
print(json.dumps(payload, ensure_ascii=False, sort_keys=False))
|
|
343
343
|
|
|
344
344
|
|
|
345
|
+
def _text_source(source: str) -> str:
|
|
346
|
+
"""Text output shows the source category, not the internal context key."""
|
|
347
|
+
return source.split(":", 1)[0]
|
|
348
|
+
|
|
349
|
+
|
|
345
350
|
def _print_text_payload(payload: dict[str, object]) -> None:
|
|
346
351
|
action = payload["action"]
|
|
347
352
|
if not isinstance(action, dict):
|
|
@@ -390,7 +395,7 @@ def _navigation_target(args, repo_root: Path, structured: bool):
|
|
|
390
395
|
print(json.dumps(payload, ensure_ascii=False, sort_keys=False))
|
|
391
396
|
else:
|
|
392
397
|
print("Status: no_task")
|
|
393
|
-
print(f"Source: {source}")
|
|
398
|
+
print(f"Source: {_text_source(source)}")
|
|
394
399
|
payload = build_navigation_payload(
|
|
395
400
|
args=args,
|
|
396
401
|
status="no_task",
|
|
@@ -418,7 +423,7 @@ def _print_stale_route(args, task_path: str, source: str, active_target: bool) -
|
|
|
418
423
|
)
|
|
419
424
|
return
|
|
420
425
|
print("Status: stale")
|
|
421
|
-
print(f"Source: {source}")
|
|
426
|
+
print(f"Source: {_text_source(source)}")
|
|
422
427
|
payload = build_navigation_payload(
|
|
423
428
|
args=args,
|
|
424
429
|
status="stale",
|
|
@@ -438,7 +443,7 @@ def _print_text_route(
|
|
|
438
443
|
active_target: bool,
|
|
439
444
|
) -> None:
|
|
440
445
|
print(f"Status: {status}")
|
|
441
|
-
print(f"Source: {source}")
|
|
446
|
+
print(f"Source: {_text_source(source)}")
|
|
442
447
|
payload = build_navigation_payload(
|
|
443
448
|
args=args,
|
|
444
449
|
status=status,
|