claude-task-worker 0.105.0 → 0.106.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.
package/README.md CHANGED
@@ -105,7 +105,8 @@ claude-task-worker init --force # 強制上書き
105
105
 
106
106
  | ラベル | 用途 |
107
107
  |---|---|
108
- | `cc-triage-scope` | トリアージ対象マーク(Issue/PR |
108
+ | `cc-triage-scope` | トリアージ対象マーク(Issue/PR)=ワーカーのキュー合流口 |
109
+ | `cc-issue-request` | 人が Issue テンプレートから作成を依頼した印。起票者を assignee に自動設定するワークフローの発火条件(`cc-triage-scope` と役割を分けてあり、ワーカーの自動起票では付かない) |
109
110
  | `cc-issue-created` | `create-issue` 由来の Issue マーク |
110
111
  | `cc-update-issue` / `cc-answer-issue-questions` / `cc-exec-issue` | Issue の更新 / 確認事項回答 / 実行トリガー |
111
112
  | `cc-fix-onetime` / `cc-resolve-conflict` | PR の修正 / コンフリクト解消トリガー |
package/dist/index.js CHANGED
@@ -4861,7 +4861,7 @@ var updateDesignMdWorker = createScheduledWorker({
4861
4861
  init_table();
4862
4862
 
4863
4863
  // src/commands/init.ts
4864
- import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, access } from "node:fs/promises";
4864
+ import { mkdir as mkdir2, readFile as readFile2, rm as rm2, writeFile as writeFile2, access } from "node:fs/promises";
4865
4865
  import { basename as basename3 } from "node:path";
4866
4866
 
4867
4867
  // src/commands/codegraph.ts
@@ -4984,14 +4984,20 @@ var LABELS = [
4984
4984
  // vivid bronze (H46 S100 L29 / L*50 C*56)
4985
4985
  { name: "cc-ui-design-ready", color: "0c73e9" },
4986
4986
  // vivid azure (H212 S90 L48 / L*50 C*69)
4987
- { name: CLOUD_DONE_LABEL, color: "33cfff" }
4987
+ { name: CLOUD_DONE_LABEL, color: "33cfff" },
4988
4988
  // vivid sky blue (H194 S100 L60 / L*78 C*42)
4989
+ // 追加時点で有彩色ラベルが色相環をほぼ埋めており、上記6点を全て満たす色は残っていない。
4990
+ // 最寄り色相との差は27°が上限(H185 が最大)で、その相手は cc-cloud-done(クラウド実行中だけ
4991
+ // 現れる短命なマーカー・L*78 と明度が倍近く違う)=見分けたい相手ではない側に倒してある。
4992
+ { name: "cc-issue-request", color: "03656d" }
4993
+ // vivid deep teal (H185 S95 L22 / L*39 C*24)
4989
4994
  ];
4990
4995
  var ISSUE_TEMPLATE = `name: "[claude-task-worker] Issue\u4F5C\u6210\u4F9D\u983C"
4991
4996
  description: claude-task-worker\u3067GitHub Issue\u3092\u4F5C\u6210\u3059\u308B
4992
4997
  title: "[claude-task-worker] Issue\u4F5C\u6210\u4F9D\u983C"
4993
4998
  labels:
4994
4999
  - cc-triage-scope
5000
+ - cc-issue-request
4995
5001
  body:
4996
5002
  - type: textarea
4997
5003
  id: request
@@ -5001,7 +5007,7 @@ body:
5001
5007
  validations:
5002
5008
  required: true
5003
5009
  `;
5004
- var ASSIGN_CREATOR_WORKFLOW = `name: Assign creator on cc-triage-scope
5010
+ var ASSIGN_CREATOR_WORKFLOW = `name: Assign creator on issue request
5005
5011
 
5006
5012
  on:
5007
5013
  issues:
@@ -5009,7 +5015,7 @@ on:
5009
5015
 
5010
5016
  jobs:
5011
5017
  assign:
5012
- if: contains(github.event.issue.labels.*.name, 'cc-triage-scope')
5018
+ if: contains(github.event.issue.labels.*.name, 'cc-issue-request')
5013
5019
  runs-on: ubuntu-latest
5014
5020
  permissions:
5015
5021
  issues: write
@@ -5067,6 +5073,25 @@ async function ensureLocalConfigGitIgnore() {
5067
5073
  await writeFile2(path2, next, "utf-8");
5068
5074
  console.log(`[init] Added ${entry} to ${path2}`);
5069
5075
  }
5076
+ var LEGACY_PATHS = [
5077
+ ".github/ISSUE_TEMPLATE/cc-triage-scope.yml",
5078
+ ".github/workflows/assign-creator-on-cc-triage-scope.yml"
5079
+ ];
5080
+ function isContentMismatch(result, expected, actual) {
5081
+ return result === "skipped" && actual !== expected;
5082
+ }
5083
+ async function removeLegacyIssueRequestFiles() {
5084
+ for (const path2 of LEGACY_PATHS) {
5085
+ try {
5086
+ await rm2(path2);
5087
+ console.log(`[init] Removed legacy file: ${path2}`);
5088
+ } catch (err) {
5089
+ if (err.code !== "ENOENT") {
5090
+ throw err;
5091
+ }
5092
+ }
5093
+ }
5094
+ }
5070
5095
  async function init(options = {}) {
5071
5096
  const force = options.force ?? false;
5072
5097
  console.log(`[init] Creating labels...${force ? " (force mode)" : ""}`);
@@ -5080,12 +5105,25 @@ async function init(options = {}) {
5080
5105
  }
5081
5106
  console.log("[init] Creating issue template...");
5082
5107
  await mkdir2(".github/ISSUE_TEMPLATE", { recursive: true });
5083
- const templatePath = ".github/ISSUE_TEMPLATE/cc-triage-scope.yml";
5084
- logWriteResult(await writeFileWithMode(templatePath, ISSUE_TEMPLATE, force), templatePath);
5108
+ const templatePath = ".github/ISSUE_TEMPLATE/cc-issue-request.yml";
5109
+ const templateResult = await writeFileWithMode(templatePath, ISSUE_TEMPLATE, force);
5110
+ logWriteResult(templateResult, templatePath);
5085
5111
  console.log("[init] Creating GitHub Actions workflow...");
5086
5112
  await mkdir2(".github/workflows", { recursive: true });
5087
- const workflowPath = ".github/workflows/assign-creator-on-cc-triage-scope.yml";
5088
- logWriteResult(await writeFileWithMode(workflowPath, ASSIGN_CREATOR_WORKFLOW, force), workflowPath);
5113
+ const workflowPath = ".github/workflows/assign-creator-on-issue-request.yml";
5114
+ const workflowResult = await writeFileWithMode(workflowPath, ASSIGN_CREATOR_WORKFLOW, force);
5115
+ logWriteResult(workflowResult, workflowPath);
5116
+ if (isContentMismatch(templateResult, ISSUE_TEMPLATE, await readFile2(templatePath, "utf-8"))) {
5117
+ throw new Error(
5118
+ `[init] ${templatePath} \u306F\u65E2\u5B58\u306E\u5185\u5BB9\u304C\u6700\u65B0\u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002--force \u3067\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u65E7\u30D5\u30A1\u30A4\u30EB\u306F\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002`
5119
+ );
5120
+ }
5121
+ if (isContentMismatch(workflowResult, ASSIGN_CREATOR_WORKFLOW, await readFile2(workflowPath, "utf-8"))) {
5122
+ throw new Error(
5123
+ `[init] ${workflowPath} \u306F\u65E2\u5B58\u306E\u5185\u5BB9\u304C\u6700\u65B0\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002--force \u3067\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u65E7\u30D5\u30A1\u30A4\u30EB\u306F\u524A\u9664\u3057\u3066\u3044\u307E\u305B\u3093\u3002`
5124
+ );
5125
+ }
5126
+ await removeLegacyIssueRequestFiles();
5089
5127
  console.log("[init] Creating config file...");
5090
5128
  await createConfig(force);
5091
5129
  await ensureLocalConfigGitIgnore();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-task-worker",
3
- "version": "0.105.0",
3
+ "version": "0.106.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",