duaer-spec 0.10.0 → 0.11.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.
Files changed (32) hide show
  1. package/.duaer/active-job.json +3 -3
  2. package/.duaer/specs/004-live-deepseek-preset/delivery.json +12 -0
  3. package/.duaer/specs/004-live-deepseek-preset/spec.md +30 -0
  4. package/.duaer/specs/004-live-deepseek-preset/tasks.md +5 -0
  5. package/.duaer/specs/005-live-ui-probe/delivery.json +9 -0
  6. package/.duaer/specs/005-live-ui-probe/spec.md +17 -0
  7. package/.duaer/specs/005-live-ui-probe/tasks.md +5 -0
  8. package/.duaer/specs/006-live-auto-accept/delivery.json +9 -0
  9. package/.duaer/specs/006-live-auto-accept/spec.md +17 -0
  10. package/.duaer/specs/006-live-auto-accept/tasks.md +5 -0
  11. package/.duaer/specs/007-live-stream/delivery.json +9 -0
  12. package/.duaer/specs/007-live-stream/spec.md +17 -0
  13. package/.duaer/specs/007-live-stream/tasks.md +5 -0
  14. package/.duaer/specs/008-live-dispatch/delivery.json +12 -0
  15. package/.duaer/specs/008-live-dispatch/spec.md +19 -0
  16. package/.duaer/specs/008-live-dispatch/tasks.md +5 -0
  17. package/.duaer/specs/009-live-repo-pick/delivery.json +9 -0
  18. package/.duaer/specs/009-live-repo-pick/spec.md +17 -0
  19. package/.duaer/specs/009-live-repo-pick/tasks.md +5 -0
  20. package/.duaer/specs/010-fix-browse-remember/delivery.json +1 -0
  21. package/.duaer/specs/010-fix-browse-remember/spec.md +7 -0
  22. package/.duaer/specs/010-fix-browse-remember/tasks.md +2 -0
  23. package/CHANGELOG.md +35 -0
  24. package/README.md +7 -2
  25. package/README.zh-CN.md +9 -3
  26. package/bin/duaer-live.mjs +969 -36
  27. package/bin/duaer.mjs +27 -5
  28. package/docs/agent/e2e-test-plan.md +1 -1
  29. package/package.json +1 -1
  30. package/web/live-dev/app.js +440 -42
  31. package/web/live-dev/index.html +40 -11
  32. package/web/live-dev/styles.css +342 -110
@@ -1,5 +1,5 @@
1
1
  {
2
- "specDir": ".duaer/specs/003-live-dev-web",
3
- "branch": "feat/live-dev",
4
- "startedAt": "2026-09-15T10:15:00.000Z"
2
+ "specDir": ".duaer/specs/009-live-repo-pick",
3
+ "branch": "feat/live-repo-pick",
4
+ "startedAt": "2026-09-16T00:40:00.000Z"
5
5
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-15T11:15:00.000Z",
4
+ "verification": {
5
+ "levels": ["L0"],
6
+ "commands": [
7
+ "duaer live config --provider deepseek --api-key sk-test (DUAER_HOME temp)",
8
+ "GET /api/config returns providers including deepseek"
9
+ ],
10
+ "result": "pass"
11
+ }
12
+ }
@@ -0,0 +1,30 @@
1
+ # Feature Specification: Live model presets (DeepSeek)
2
+
3
+ **Feature Branch**: `feat/live-deepseek`
4
+
5
+ **Created**: 2026-09-15
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 现场开发模型配置要能一键/明确选用 DeepSeek(OpenAI 兼容),不必用户自己猜 Base URL 和模型名。
12
+
13
+ ## In scope
14
+
15
+ - UI: DeepSeek preset(填入官方兼容 Base URL + 默认模型)
16
+ - CLI help / docs 示例含 DeepSeek
17
+ - 仍走现有 OpenAI-compatible `/chat/completions`
18
+
19
+ ## Out of scope
20
+
21
+ - DeepSeek 专有 SDK
22
+ - 自动拉取 API Key
23
+ - 其它厂商完整目录(可保留「自定义」)
24
+
25
+ ## Acceptance
26
+
27
+ - 配置页可选 DeepSeek,一键填好 `https://api.deepseek.com/v1` 与默认模型(如 `deepseek-chat`)
28
+ - 用户仍只需填 API Key(或覆盖模型名)
29
+ - `duaer live config` 帮助/文档示例含 DeepSeek
30
+ - 不写入业务仓库;配置仍在 `~/.duaer/live/config.json`
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Add provider presets (DeepSeek + custom) to live-dev UI
4
+ - [x] T002 Surface DeepSeek in CLI config help / README examples
5
+ - [x] T003 Update E2E-021 note / CHANGELOG; smoke config path
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-15T11:25:00.000Z",
4
+ "verification": {
5
+ "levels": ["L0"],
6
+ "commands": ["curl styles + index from live server"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ # Feature Specification: Live desk UI — Probe visual language
2
+
3
+ **Feature Branch**: `feat/live-ui`
4
+
5
+ **Created**: 2026-09-15
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 现场开发页视觉对齐本地 Probe(`localhost:61662/probe/`):钢蓝工业台面,不再用暖奶油 + 衬线默认风。
12
+
13
+ ## Acceptance
14
+
15
+ - Palette / type / chrome match Probe tokens (steel, plate, ink, mute, register, lock; Outfit + Chivo Mono)
16
+ - Setup + desk remain usable; no behavior change
17
+ - Concise UI copy; brand “现场开发” remains the hero signal
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Restyle live-dev CSS to Probe tokens
4
+ - [x] T002 Update fonts / markup labels to match
5
+ - [x] T003 Smoke-load page; accept
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-15T11:30:00.000Z",
4
+ "verification": {
5
+ "levels": ["L0"],
6
+ "commands": ["POST /api/confirm with short card -> 422, no Brief"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ # Feature Specification: Auto-accept review on confirm
2
+
3
+ **Feature Branch**: `feat/live-auto-accept`
4
+
5
+ **Created**: 2026-09-15
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 点「需求无误,开始干活」时,先用已配置模型自动验收确认卡;通过才写入 Brief。
12
+
13
+ ## Acceptance
14
+
15
+ - Confirm 调用自动验收;未通过返回 issues,不写 Brief
16
+ - 通过后写入 Brief,并记录验收摘要
17
+ - UI 显示「自动验收中…」及失败原因
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Server: review gate on /api/confirm
4
+ - [x] T002 UI: review state + fail/success messaging
5
+ - [x] T003 Spec docs + smoke without live LLM (mock path / structure)
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-15T11:35:00.000Z",
4
+ "verification": {
5
+ "levels": ["L0"],
6
+ "commands": ["node --check bin/duaer-live.mjs", "parseChatResult marker smoke"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ # Feature Specification: Streaming chat replies
2
+
3
+ **Feature Branch**: `feat/live-stream`
4
+
5
+ **Created**: 2026-09-15
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 现场开发对话框支持流式输出:助手回复边生成边显示。
12
+
13
+ ## Acceptance
14
+
15
+ - `/api/chat` 默认 SSE 流式:先推 reply 文本,结束时推完整确认卡字段
16
+ - UI 气泡随 delta 更新;结束后应用卡片与 options
17
+ - 自动验收 confirm 仍可非流式
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Stream upstream + SSE /api/chat
4
+ - [x] T002 UI consume stream into bubble
5
+ - [x] T003 Changelog + smoke structure
@@ -0,0 +1,12 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T00:30:00.000Z",
4
+ "verification": {
5
+ "levels": ["L0"],
6
+ "commands": [
7
+ "probe + dispatch against temp git repo with develop",
8
+ "worktree + active-job.json created"
9
+ ],
10
+ "result": "pass"
11
+ }
12
+ }
@@ -0,0 +1,19 @@
1
+ # Feature Specification: Live desk → product repo dispatch
2
+
3
+ **Feature Branch**: `feat/live-dispatch`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 确认并自动验收通过后,用户选择产品仓库;系统写入 Brief、从 develop/main 建 worktree,并给出数字员工开工说明(尽量打开编辑器)。
12
+
13
+ ## Acceptance
14
+
15
+ 1. Confirm 后出现「派工」:可选最近仓库或粘贴绝对路径
16
+ 2. Dispatch 在目标仓 `.worktree/feat-<name>/` 建隔离区,Brief 在该 worktree 的 `.duaer/specs/`
17
+ 3. 返回 agentPrompt;若本机有 `cursor`/`code` 则尝试打开 worktree
18
+ 4. 可查询 delivery 状态(accepted / pending)
19
+ 5. 未派工前仍只写 `~/.duaer/live/jobs`
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Server: repos + probe + dispatch + status APIs
4
+ - [x] T002 UI dispatch panel after confirm
5
+ - [x] T003 Smoke with temp git repo; docs/changelog
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T00:45:00.000Z",
4
+ "verification": {
5
+ "levels": ["L0"],
6
+ "commands": ["duaer live repo add", "GET /api/repos?discover=1"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ # Feature Specification: Easier product repo selection
2
+
3
+ **Feature Branch**: `feat/live-repo-pick`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 派工时不必手搓绝对路径:本机选文件夹、扫描发现、CLI 登记、列表点选。
12
+
13
+ ## Acceptance
14
+
15
+ - UI: 「浏览…」调系统选文件夹;「扫描」列出常见目录下的 git 仓;可筛选点选
16
+ - `duaer live repo add [path]` 登记仓库(默认 cwd)
17
+ - 路径输入框降为备选
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 discover + native folder pick APIs
4
+ - [x] T002 CLI repo add; wire duaer.mjs
5
+ - [x] T003 UI browse/scan/filter; smoke
@@ -0,0 +1 @@
1
+ {"status":"accepted","acceptedAt":"2026-09-16T01:00:00.000Z","verification":{"levels":["L0"],"result":"pass"}}
@@ -0,0 +1,7 @@
1
+ # Fix: Browse selection not remembered
2
+
3
+ **Branch**: `fix/live-browse-remember`
4
+
5
+ ## Acceptance
6
+ - After system folder pick, repo appears in recent list and stays selected
7
+ - Paths normalized; master allowed as base branch
@@ -0,0 +1,2 @@
1
+ # Tasks
2
+ - [x] T001 Fix pick remember + UI selectRepo
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.11.0 — 2026-09-16
6
+
7
+ ### Live browse remember
8
+
9
+ - Fix「浏览…」: persist selection into recent list immediately; normalize paths; accept `master`
10
+
11
+ ### Live repo pick
12
+
13
+ - Dispatch: system folder picker, scan common dirs, filterable list
14
+ - `duaer live repo add [path]` remembers a product repo (default cwd)
15
+
16
+ ### Live dispatch
17
+
18
+ - After confirm + auto-accept: pick a product repo, create `.worktree/feat-*`, write Brief under that worktree’s `.duaer/specs/`
19
+ - Remembers recent repos; polls `delivery.json` status; opens `cursor`/`code` when available
20
+
21
+ ### Live streaming chat
22
+
23
+ - Dialogue replies stream over SSE (`/api/chat`); text appears token-by-token before the confirm card updates
24
+
25
+ ### Live auto-accept
26
+
27
+ - Confirm runs model auto-accept of the four-block card; fail returns issues without writing Brief
28
+ - Passed reviews are stamped into the job Brief / `job.json`
29
+
30
+ ### Live desk UI
31
+
32
+ - Restyle 现场开发 to Probe visual language (steel plate, Outfit + Chivo Mono, register/lock accents)
33
+
34
+ ### Live model presets
35
+
36
+ - Setup UI / CLI presets: **DeepSeek** (`https://api.deepseek.com` + `deepseek-flash`), OpenAI, custom
37
+ - `duaer live config --provider deepseek --api-key …`
38
+ - DeepSeek chat calls disable thinking mode for reliable JSON replies
39
+
5
40
  ## 0.10.0 — 2026-09-15
6
41
 
7
42
  ### 现场开发 Web
package/README.md CHANGED
@@ -40,11 +40,16 @@ everyday human UI.
40
40
  Isolated from product repos. Config and Briefs live under `~/.duaer/live/`.
41
41
 
42
42
  ```bash
43
- duaer live config --base-url https://api.openai.com/v1 --api-key sk-... --model gpt-4o-mini
43
+ # DeepSeek(推荐)
44
+ duaer live config --provider deepseek --api-key sk-...
45
+
46
+ # 在产品仓登记,派工时点选(可选)
47
+ duaer live repo add
48
+
44
49
  duaer live
45
50
  ```
46
51
 
47
- Dialogue → four-block confirm Brief in `~/.duaer/live/jobs/` (copy into a product repo when the digital employee starts coding).
52
+ Dialogue → confirm + auto-accept**dispatch** (browse / scan / remembered repos) into a product worktree hand the prompt to the digital employee.
48
53
 
49
54
  ## Branches (mandatory)
50
55
 
package/README.zh-CN.md CHANGED
@@ -38,14 +38,20 @@ npx duaer-spec update
38
38
  与业务仓库隔离。配置与 Brief 写在本机 `~/.duaer/live/`。
39
39
 
40
40
  ```bash
41
- # 1) 配置模型(OpenAI 兼容)
41
+ # DeepSeek(推荐)
42
+ duaer live config --provider deepseek --api-key sk-...
43
+
44
+ # 在产品仓登记,派工时点选(可选)
45
+ duaer live repo add
46
+
47
+ # 或任意 OpenAI 兼容接口
42
48
  duaer live config --base-url https://api.openai.com/v1 --api-key sk-... --model gpt-4o-mini
43
49
 
44
- # 2) 启动(任意目录都行,不会写入当前项目)
50
+ # 启动(任意目录都行,不会写入当前项目)
45
51
  duaer live
46
52
  ```
47
53
 
48
- 浏览器打开提示地址。多轮对话 → 确认卡 → 点确认后 Brief 落在 `~/.duaer/live/jobs/`,再复制开工说明给数字员工到**真正的产品仓库**干活。
54
+ 浏览器打开提示地址。多轮对话 → 确认卡 → 自动验收 **浏览/扫描/点选产品仓派工** → 把开工说明给数字员工。
49
55
 
50
56
  ### 目录不要同名套娃
51
57