clawt 1.0.1 → 1.0.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/dist/index.js CHANGED
@@ -50,8 +50,7 @@ var MESSAGES = {
50
50
  \u63D0\u4EA4\u4FE1\u606F: ${message}
51
51
  \u5DF2\u63A8\u9001\u5230\u8FDC\u7A0B\u4ED3\u5E93`,
52
52
  /** merge 成功(无提交信息,目标 worktree 已提交过) */
53
- MERGE_SUCCESS_NO_MESSAGE: (branch) => `\u2713 \u5206\u652F ${branch} \u5DF2\u6210\u529F\u5408\u5E76\u5230\u5F53\u524D\u5206\u652F
54
- \u5DF2\u63A8\u9001\u5230\u8FDC\u7A0B\u4ED3\u5E93`,
53
+ MERGE_SUCCESS_NO_MESSAGE: (branch) => `\u2713 \u5206\u652F ${branch} \u5DF2\u6210\u529F\u5408\u5E76\u5230\u5F53\u524D\u5206\u652F`,
55
54
  /** merge 冲突 */
56
55
  MERGE_CONFLICT: "\u5408\u5E76\u5B58\u5728\u51B2\u7A81\uFF0C\u8BF7\u624B\u52A8\u5904\u7406",
57
56
  /** merge 后清理 worktree 和分支成功 */
@@ -89,6 +88,7 @@ var EXIT_CODES = {
89
88
  };
90
89
 
91
90
  // src/constants/config.ts
91
+ var APPEND_SYSTEM_PROMPT = "After the code execution is completed, it is prohibited to build the project for verification.";
92
92
  var DEFAULT_CONFIG = {
93
93
  autoDeleteBranch: false,
94
94
  /** 默认 Claude Code CLI 启动指令,用于不传 --tasks 时在 worktree 中打开交互式界面 */
@@ -571,7 +571,11 @@ function launchInteractiveClaude(worktree) {
571
571
  const commandStr = getConfigValue("claudeCodeCommand");
572
572
  const parts = commandStr.split(/\s+/).filter(Boolean);
573
573
  const cmd = parts[0];
574
- const args = parts.slice(1);
574
+ const args = [
575
+ ...parts.slice(1),
576
+ "--append-system-prompt",
577
+ APPEND_SYSTEM_PROMPT
578
+ ];
575
579
  printInfo(`\u6B63\u5728 worktree \u4E2D\u542F\u52A8 Claude Code \u4EA4\u4E92\u5F0F\u754C\u9762...`);
576
580
  printInfo(` \u5206\u652F: ${worktree.branch}`);
577
581
  printInfo(` \u8DEF\u5F84: ${worktree.path}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawt",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "本地并行执行多个Claude Code Agent任务,融合 Git Worktree 与 Claude Code CLI 的命令行工具",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3,7 +3,7 @@ import type { ChildProcess } from 'node:child_process';
3
3
  import { spawnSync } from 'node:child_process';
4
4
  import { logger } from '../logger/index.js';
5
5
  import { ClawtError } from '../errors/index.js';
6
- import { MESSAGES } from '../constants/index.js';
6
+ import { MESSAGES, APPEND_SYSTEM_PROMPT } from '../constants/index.js';
7
7
  import type { RunOptions, ClaudeCodeResult, TaskResult, TaskSummary } from '../types/index.js';
8
8
  import {
9
9
  validateMainWorktree,
@@ -47,7 +47,11 @@ function launchInteractiveClaude(worktree: WorktreeInfo): void {
47
47
  const commandStr = getConfigValue('claudeCodeCommand');
48
48
  const parts = commandStr.split(/\s+/).filter(Boolean);
49
49
  const cmd = parts[0];
50
- const args = parts.slice(1);
50
+ const args = [
51
+ ...parts.slice(1),
52
+ '--append-system-prompt',
53
+ APPEND_SYSTEM_PROMPT,
54
+ ];
51
55
 
52
56
  printInfo(`正在 worktree 中启动 Claude Code 交互式界面...`);
53
57
  printInfo(` 分支: ${worktree.branch}`);
@@ -1,5 +1,9 @@
1
1
  import type { ClawtConfig } from '../types/index.js';
2
2
 
3
+ /** Claude Code 系统约束提示,禁止代码执行完成后构建项目验证 */
4
+ export const APPEND_SYSTEM_PROMPT =
5
+ 'After the code execution is completed, it is prohibited to build the project for verification.';
6
+
3
7
  /** 默认配置 */
4
8
  export const DEFAULT_CONFIG: ClawtConfig = {
5
9
  autoDeleteBranch: false,
@@ -3,4 +3,4 @@ export { INVALID_BRANCH_CHARS } from './branch.js';
3
3
  export { MESSAGES } from './messages.js';
4
4
  export { EXIT_CODES } from './exitCodes.js';
5
5
  export { ENABLE_BRACKETED_PASTE, DISABLE_BRACKETED_PASTE, PASTE_THRESHOLD_MS } from './terminal.js';
6
- export { DEFAULT_CONFIG } from './config.js';
6
+ export { DEFAULT_CONFIG, APPEND_SYSTEM_PROMPT } from './config.js';
@@ -33,7 +33,7 @@ export const MESSAGES = {
33
33
  `✓ 分支 ${branch} 已成功合并到当前分支\n 提交信息: ${message}\n 已推送到远程仓库`,
34
34
  /** merge 成功(无提交信息,目标 worktree 已提交过) */
35
35
  MERGE_SUCCESS_NO_MESSAGE: (branch: string) =>
36
- `✓ 分支 ${branch} 已成功合并到当前分支\n 已推送到远程仓库`,
36
+ `✓ 分支 ${branch} 已成功合并到当前分支`,
37
37
  /** merge 冲突 */
38
38
  MERGE_CONFLICT: '合并存在冲突,请手动处理',
39
39
  /** merge 后清理 worktree 和分支成功 */