@xqyz/xq-cli 0.3.3 → 0.3.4

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 (3) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +1 -1
  3. package/src/cli.mjs +22 -20
package/CHANGELOG.md CHANGED
@@ -8,6 +8,23 @@
8
8
 
9
9
  发布日期以 npm 官方仓库记录为准。发布前必须先更新本文件,再执行版本发布。
10
10
 
11
+ ## [Unreleased]
12
+
13
+ ## [0.3.4 / WorkBuddy Plugin 0.10.10] - 2026-08-19
14
+
15
+ ### 快速模式新任务生成链路修复
16
+
17
+ - 对齐喜鹊 Web:新任务先调用 `/task/preSet` 保存用户配置,其中 `requirement`、`rating`、`plan` 允许为空;随后调用 `/proxy/multiBiddingChoice` 触发后台解析流程。
18
+ - 禁止新任务由 xq-cli 直接调用 `/task/generateByRequirement`,避免抢在 `autoGenerateDirectoryJobHandler` 补齐解析结果之前提交空字段,造成任务停留在大纲解析阶段。
19
+ - 保留历史任务兼容逻辑:仅 `task_status=0` 继续直接调用 `/task/generateByRequirement`。
20
+ - 新增新任务与历史任务两条回归测试。
21
+
22
+ ### WorkBuddy 响应依据完整预览
23
+
24
+ - “选择大纲依据”卡片改为三个页签:融合响应、仅格式要求、仅评分要求。
25
+ - 页签切换只读取后端返回的完整候选目录树,不会提交 `referenceType` 或改变任务状态。
26
+ - 用户只有点击“按当前思路生成大纲”才会调用既有单次提交链路;仍保留重复提交拦截。
27
+
11
28
  ## [0.3.3 / WorkBuddy Plugin 0.10.9] - 2026-08-19
12
29
 
13
30
  ### WorkBuddy 响应依据阶段化选择
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xqyz/xq-cli",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "CLI for xique bid-book task workflows",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/cli.mjs CHANGED
@@ -1928,28 +1928,30 @@ function buildOutlineParams(snapshot, args) {
1928
1928
  }
1929
1929
 
1930
1930
  async function triggerOutlineGeneration(client, snapshot, params) {
1931
- await postJson(client, '/task/preSet', params);
1932
-
1933
- // task_status=6 means "file parsing" in the Xique backend. It is not a
1934
- // signal that this is a multi-bid/EPC task. Only route through the
1935
- // special-selection endpoint when the caller actually supplied a
1936
- // multi-bid or EPC selection; ordinary tasks must use the normal
1937
- // generation endpoint even while the task is transitioning from parse.
1938
- const hasSpecialSelection = Boolean(
1939
- String(params.multiBidId ?? snapshot.multiBidId ?? '').trim()
1940
- || String(params.epcEngineerType ?? snapshot.epcEngineerType ?? '').trim()
1941
- );
1942
- if (hasSpecialSelection) {
1943
- await getJson(client, '/proxy/multiBiddingChoice', compactObject({
1944
- uuid: snapshot.uuid,
1945
- multiBidId: params.multiBidId ?? snapshot.multiBidId,
1946
- epcEngineerType: normalizeEpcEngineerTypeForProxy(params.epcEngineerType ?? snapshot.epcEngineerType),
1947
- }));
1948
- return 'multiBiddingChoice';
1931
+ // The web flow has two deliberately different paths:
1932
+ //
1933
+ // * legacy tasks (task_status === 0) already contain the parsed
1934
+ // requirement/rating/plan fields, so they go straight to
1935
+ // generateByRequirement;
1936
+ // * newly parsed tasks must only persist the user's configuration with
1937
+ // preSet, then call multiBiddingChoice. That endpoint wakes the async
1938
+ // parser, and autoGenerateDirectoryJobHandler later fills the three
1939
+ // parsed fields before it invokes generateByRequirement.
1940
+ //
1941
+ // Calling generateByRequirement here for a new task races that job and
1942
+ // sends empty parsed fields, which leaves the web task stuck in parsing.
1943
+ if (Number(snapshot.task_status) === 0) {
1944
+ await postJson(client, '/task/generateByRequirement', params);
1945
+ return 'generateByRequirement';
1949
1946
  }
1950
1947
 
1951
- await postJson(client, '/task/generateByRequirement', params);
1952
- return 'generateByRequirement';
1948
+ await postJson(client, '/task/preSet', params);
1949
+ await getJson(client, '/proxy/multiBiddingChoice', compactObject({
1950
+ uuid: snapshot.uuid,
1951
+ multiBidId: params.multiBidId ?? snapshot.multiBidId,
1952
+ epcEngineerType: normalizeEpcEngineerTypeForProxy(params.epcEngineerType ?? snapshot.epcEngineerType),
1953
+ }));
1954
+ return 'multiBiddingChoice';
1953
1955
  }
1954
1956
 
1955
1957
  async function preparePlanningAnalysis(client, params) {