hamster-wheel-cli 0.3.1 → 0.3.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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  本项目遵循语义化版本,变更日志以时间倒序记录。
4
4
 
5
+ ## [0.3.2] - 2025-12-24
6
+ ### Fixed
7
+ - webhook 的 `project` 字段固定为首次识别的仓库目录名,切换 worktree 后保持不变。
8
+
5
9
  ## [0.3.1] - 2025-12-24
6
10
  ### Added
7
11
  - webhook 在“计划生成”阶段新增 `plan` 字段,携带计划原文便于下游对接。
package/README.md CHANGED
@@ -148,7 +148,7 @@ Payload 示例:
148
148
  字段说明:
149
149
  - `event`:`task_start` / `iteration_start` / `task_end`
150
150
  - `task`:任务描述(仅 `task_start` 会携带)
151
- - `project`:当前工作目录名称(仅文件夹名,不含路径)
151
+ - `project`:首次识别的仓库根目录名称(仅文件夹名,不含路径),切换 worktree 后保持不变
152
152
  - `branch`:分支名(可能为空)
153
153
  - `iteration`:当前轮次(任务开始为 0)
154
154
  - `stage`:当前节点描述
package/dist/cli.js CHANGED
@@ -3045,6 +3045,7 @@ async function runLoop(config) {
3045
3045
  const logger = new Logger({ verbose: config.verbose, logFile: config.logFile });
3046
3046
  const repoRoot = await getRepoRoot(config.cwd, logger);
3047
3047
  logger.debug(`\u4ED3\u5E93\u6839\u76EE\u5F55: ${repoRoot}`);
3048
+ const initialProjectName = import_node_path9.default.basename(repoRoot);
3048
3049
  let branchName = config.git.branchName;
3049
3050
  let workDir = repoRoot;
3050
3051
  let worktreeCreated = false;
@@ -3063,7 +3064,7 @@ async function runLoop(config) {
3063
3064
  let commitCreated = false;
3064
3065
  let pushSucceeded = false;
3065
3066
  const preWorktreeRecords = [];
3066
- const resolveProjectName = () => import_node_path9.default.basename(workDir);
3067
+ const resolveProjectName = () => initialProjectName;
3067
3068
  const notifyWebhook = async (event, iteration, stage, plan) => {
3068
3069
  const project = resolveProjectName();
3069
3070
  const payload = event === "task_start" ? buildWebhookPayload({