claude-task-worker 0.17.0 → 0.18.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 (2) hide show
  1. package/dist/index.js +35 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -706,6 +706,28 @@ async function createLabel(name, color, force) {
706
706
  }
707
707
  }
708
708
 
709
+ // src/claude-args.ts
710
+ var DISALLOWED_TOOLS = [
711
+ // 遅延 / yield: 後続ウェイクアップ前提。print モードには再起動ループが無いため、
712
+ // 呼ぶと処理未完のままプロセスが終了する。
713
+ "Monitor",
714
+ "ScheduleWakeup",
715
+ // 対話 / 承認: 自律実行セッションには回答・承認するユーザーが存在しない。
716
+ "AskUserQuestion",
717
+ "EnterPlanMode",
718
+ // スコープ外の副作用を伴う自動化: コード修正タスクに用途がなく、ユーザーの
719
+ // クラウド routine / リモート環境へ副作用を及ぼしうる。
720
+ "CronCreate",
721
+ "CronDelete",
722
+ "CronList",
723
+ "RemoteTrigger",
724
+ // 環境管理の競合: ワーカーは locked worktree の残骸問題のため claude 管理の worktree を
725
+ // 意図的に避け、自前で worktree を生成して cwd として渡している。モデルが worktree を
726
+ // 作成/切り替えると、この前提とクリーンアップが壊れる。
727
+ "EnterWorktree"
728
+ ];
729
+ var DISALLOWED_TOOLS_ARG = DISALLOWED_TOOLS.join(",");
730
+
709
731
  // src/config.ts
710
732
  import { readFileSync } from "node:fs";
711
733
  import { join } from "node:path";
@@ -1754,6 +1776,8 @@ function createIssuePollingWorker(config) {
1754
1776
  "-p",
1755
1777
  `${command} ${issue.number}`,
1756
1778
  "--dangerously-skip-permissions",
1779
+ "--disallowedTools",
1780
+ DISALLOWED_TOOLS_ARG,
1757
1781
  "--model",
1758
1782
  model,
1759
1783
  "--effort",
@@ -1880,7 +1904,17 @@ function createPrPollingWorker(config) {
1880
1904
  const command = skill || config.command;
1881
1905
  run(
1882
1906
  "claude",
1883
- ["-p", `${command} ${pr.number}`, "--dangerously-skip-permissions", "--model", model, "--effort", effort],
1907
+ [
1908
+ "-p",
1909
+ `${command} ${pr.number}`,
1910
+ "--dangerously-skip-permissions",
1911
+ "--disallowedTools",
1912
+ DISALLOWED_TOOLS_ARG,
1913
+ "--model",
1914
+ model,
1915
+ "--effort",
1916
+ effort
1917
+ ],
1884
1918
  pr.number,
1885
1919
  `PR #${pr.number} (${pr.headRefName})`,
1886
1920
  config.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-task-worker",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "CLI tool that polls GitHub Issues/PRs and delegates work to Claude CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,7 +12,7 @@
12
12
  "dev": "tsc --noEmit --watch",
13
13
  "lint": "eslint .",
14
14
  "lint:fix": "eslint . --fix",
15
- "test": "node --experimental-strip-types --test src/**/*.test.ts",
15
+ "test": "node --experimental-strip-types --test \"src/**/*.test.ts\" \"plugin/scripts/**/*.test.mjs\"",
16
16
  "format": "prettier --write .",
17
17
  "format:check": "prettier --check .",
18
18
  "prepublishOnly": "npm run build"