@akiojin/gwt 4.9.0 → 4.9.1

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 (153) hide show
  1. package/README.ja.md +58 -34
  2. package/README.md +18 -34
  3. package/dist/cli/ui/components/App.d.ts +2 -2
  4. package/dist/cli/ui/components/App.d.ts.map +1 -1
  5. package/dist/cli/ui/components/App.js +8 -8
  6. package/dist/cli/ui/components/App.js.map +1 -1
  7. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts +27 -0
  8. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts.map +1 -0
  9. package/dist/cli/ui/components/screens/{AIToolSelectorScreen.js → CodingAgentSelectorScreen.js} +35 -35
  10. package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js.map +1 -0
  11. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +2 -2
  12. package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +1 -1
  13. package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +1 -1
  14. package/dist/cli/ui/types.d.ts +2 -2
  15. package/dist/cli/ui/types.d.ts.map +1 -1
  16. package/dist/cli/ui/utils/modelOptions.d.ts +4 -4
  17. package/dist/cli/ui/utils/modelOptions.d.ts.map +1 -1
  18. package/dist/cli/ui/utils/modelOptions.js.map +1 -1
  19. package/dist/client/assets/{index-PqK9jkug.js → index-LNPtOrn3.js} +17 -17
  20. package/dist/client/index.html +1 -1
  21. package/dist/config/builtin-coding-agents.d.ts +23 -0
  22. package/dist/config/builtin-coding-agents.d.ts.map +1 -0
  23. package/dist/config/{builtin-tools.js → builtin-coding-agents.js} +6 -6
  24. package/dist/config/builtin-coding-agents.js.map +1 -0
  25. package/dist/config/tools.d.ts +16 -16
  26. package/dist/config/tools.d.ts.map +1 -1
  27. package/dist/config/tools.js +81 -78
  28. package/dist/config/tools.js.map +1 -1
  29. package/dist/index.js +19 -19
  30. package/dist/index.js.map +1 -1
  31. package/dist/launcher.d.ts +8 -8
  32. package/dist/launcher.d.ts.map +1 -1
  33. package/dist/launcher.js +32 -28
  34. package/dist/launcher.js.map +1 -1
  35. package/dist/services/codingAgentCommandResolver.d.ts +10 -0
  36. package/dist/services/codingAgentCommandResolver.d.ts.map +1 -0
  37. package/dist/services/{customToolResolver.js → codingAgentCommandResolver.js} +25 -20
  38. package/dist/services/codingAgentCommandResolver.js.map +1 -0
  39. package/dist/services/{aiToolResolver.d.ts → codingAgentResolver.d.ts} +6 -6
  40. package/dist/services/codingAgentResolver.d.ts.map +1 -0
  41. package/dist/services/{aiToolResolver.js → codingAgentResolver.js} +23 -23
  42. package/dist/services/codingAgentResolver.js.map +1 -0
  43. package/dist/shared/{aiToolConstants.d.ts → codingAgentConstants.d.ts} +2 -2
  44. package/dist/shared/codingAgentConstants.d.ts.map +1 -0
  45. package/dist/shared/{aiToolConstants.js → codingAgentConstants.js} +2 -2
  46. package/dist/shared/codingAgentConstants.js.map +1 -0
  47. package/dist/types/api.d.ts +12 -12
  48. package/dist/types/api.d.ts.map +1 -1
  49. package/dist/types/tools.d.ts +30 -30
  50. package/dist/types/tools.d.ts.map +1 -1
  51. package/dist/types/tools.js +1 -1
  52. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts +9 -0
  53. package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +1 -0
  54. package/dist/web/client/src/components/{AIToolLaunchModal.js → CodingAgentLaunchModal.js} +58 -58
  55. package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +1 -0
  56. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts +23 -0
  57. package/dist/web/client/src/components/CustomCodingAgentForm.d.ts.map +1 -0
  58. package/dist/web/client/src/components/{CustomToolForm.js → CustomCodingAgentForm.js} +5 -5
  59. package/dist/web/client/src/components/CustomCodingAgentForm.js.map +1 -0
  60. package/dist/web/client/src/components/CustomCodingAgentList.d.ts +10 -0
  61. package/dist/web/client/src/components/CustomCodingAgentList.d.ts.map +1 -0
  62. package/dist/web/client/src/components/{CustomToolList.js → CustomCodingAgentList.js} +17 -17
  63. package/dist/web/client/src/components/CustomCodingAgentList.js.map +1 -0
  64. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts +2 -2
  65. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +1 -1
  66. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +6 -6
  67. package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +1 -1
  68. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +2 -2
  69. package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +1 -1
  70. package/dist/web/client/src/components/branch-detail/ToolLauncher.js +5 -5
  71. package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +1 -1
  72. package/dist/web/client/src/hooks/useSessions.d.ts +4 -4
  73. package/dist/web/client/src/hooks/useSessions.d.ts.map +1 -1
  74. package/dist/web/client/src/hooks/useSessions.js.map +1 -1
  75. package/dist/web/client/src/lib/api.d.ts +5 -5
  76. package/dist/web/client/src/lib/api.d.ts.map +1 -1
  77. package/dist/web/client/src/lib/api.js +1 -1
  78. package/dist/web/client/src/lib/api.js.map +1 -1
  79. package/dist/web/client/src/pages/BranchDetailPage.js +24 -24
  80. package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
  81. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +1 -1
  82. package/dist/web/client/src/pages/ConfigManagementPage.js +15 -15
  83. package/dist/web/client/src/pages/ConfigManagementPage.js.map +1 -1
  84. package/dist/web/client/src/pages/ConfigPage.d.ts.map +1 -1
  85. package/dist/web/client/src/pages/ConfigPage.js +43 -39
  86. package/dist/web/client/src/pages/ConfigPage.js.map +1 -1
  87. package/dist/web/server/env/importer.d.ts.map +1 -1
  88. package/dist/web/server/env/importer.js +3 -3
  89. package/dist/web/server/env/importer.js.map +1 -1
  90. package/dist/web/server/pty/manager.d.ts +6 -6
  91. package/dist/web/server/pty/manager.d.ts.map +1 -1
  92. package/dist/web/server/pty/manager.js +11 -11
  93. package/dist/web/server/pty/manager.js.map +1 -1
  94. package/dist/web/server/routes/config.d.ts.map +1 -1
  95. package/dist/web/server/routes/config.js +34 -34
  96. package/dist/web/server/routes/config.js.map +1 -1
  97. package/dist/web/server/routes/sessions.d.ts +1 -1
  98. package/dist/web/server/routes/sessions.d.ts.map +1 -1
  99. package/dist/web/server/routes/sessions.js +20 -20
  100. package/dist/web/server/routes/sessions.js.map +1 -1
  101. package/package.json +2 -2
  102. package/src/cli/ui/__tests__/components/screens/{AIToolSelectorScreen.test.tsx → CodingAgentSelectorScreen.test.tsx} +38 -38
  103. package/src/cli/ui/components/App.tsx +22 -20
  104. package/src/cli/ui/components/screens/CodingAgentSelectorScreen.tsx +159 -0
  105. package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +6 -2
  106. package/src/cli/ui/types.ts +2 -2
  107. package/src/cli/ui/utils/modelOptions.ts +6 -4
  108. package/src/config/{builtin-tools.ts → builtin-coding-agents.ts} +9 -9
  109. package/src/config/tools.ts +104 -92
  110. package/src/index.ts +19 -19
  111. package/src/launcher.ts +38 -31
  112. package/src/services/{customToolResolver.ts → codingAgentCommandResolver.ts} +33 -28
  113. package/src/services/{aiToolResolver.ts → codingAgentResolver.ts} +28 -28
  114. package/src/shared/{aiToolConstants.ts → codingAgentConstants.ts} +1 -1
  115. package/src/types/api.ts +12 -12
  116. package/src/types/tools.ts +30 -30
  117. package/src/web/client/src/components/{AIToolLaunchModal.tsx → CodingAgentLaunchModal.tsx} +74 -70
  118. package/src/web/client/src/components/{CustomToolForm.tsx → CustomCodingAgentForm.tsx} +14 -14
  119. package/src/web/client/src/components/{CustomToolList.tsx → CustomCodingAgentList.tsx} +26 -26
  120. package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +7 -7
  121. package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +9 -9
  122. package/src/web/client/src/hooks/useSessions.ts +5 -5
  123. package/src/web/client/src/lib/api.ts +8 -8
  124. package/src/web/client/src/pages/BranchDetailPage.tsx +26 -26
  125. package/src/web/client/src/pages/ConfigManagementPage.tsx +32 -24
  126. package/src/web/client/src/pages/ConfigPage.tsx +55 -49
  127. package/src/web/server/env/importer.ts +6 -3
  128. package/src/web/server/pty/manager.ts +20 -20
  129. package/src/web/server/routes/config.ts +45 -39
  130. package/src/web/server/routes/sessions.ts +29 -26
  131. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +0 -27
  132. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +0 -1
  133. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +0 -1
  134. package/dist/config/builtin-tools.d.ts +0 -23
  135. package/dist/config/builtin-tools.d.ts.map +0 -1
  136. package/dist/config/builtin-tools.js.map +0 -1
  137. package/dist/services/aiToolResolver.d.ts.map +0 -1
  138. package/dist/services/aiToolResolver.js.map +0 -1
  139. package/dist/services/customToolResolver.d.ts +0 -10
  140. package/dist/services/customToolResolver.d.ts.map +0 -1
  141. package/dist/services/customToolResolver.js.map +0 -1
  142. package/dist/shared/aiToolConstants.d.ts.map +0 -1
  143. package/dist/shared/aiToolConstants.js.map +0 -1
  144. package/dist/web/client/src/components/AIToolLaunchModal.d.ts +0 -9
  145. package/dist/web/client/src/components/AIToolLaunchModal.d.ts.map +0 -1
  146. package/dist/web/client/src/components/AIToolLaunchModal.js.map +0 -1
  147. package/dist/web/client/src/components/CustomToolForm.d.ts +0 -23
  148. package/dist/web/client/src/components/CustomToolForm.d.ts.map +0 -1
  149. package/dist/web/client/src/components/CustomToolForm.js.map +0 -1
  150. package/dist/web/client/src/components/CustomToolList.d.ts +0 -10
  151. package/dist/web/client/src/components/CustomToolList.d.ts.map +0 -1
  152. package/dist/web/client/src/components/CustomToolList.js.map +0 -1
  153. package/src/cli/ui/components/screens/AIToolSelectorScreen.tsx +0 -153
@@ -1,5 +1,5 @@
1
1
  /**
2
- * カスタムAIツール対応機能の型定義
2
+ * コーディングエージェント対応機能の型定義
3
3
  *
4
4
  * この型定義ファイルは、設定ファイル(tools.json)のスキーマと
5
5
  * 内部で使用するデータ構造を定義します。
@@ -42,30 +42,30 @@ export interface ModeArgs {
42
42
  }
43
43
 
44
44
  /**
45
- * カスタムAIツール定義
45
+ * コーディングエージェント定義
46
46
  *
47
- * tools.jsonファイルで定義される個別のツール設定。
47
+ * tools.jsonファイルで定義される個別のエージェント設定。
48
48
  */
49
- export interface CustomAITool {
49
+ export interface CodingAgent {
50
50
  /**
51
- * ツールの一意識別子
51
+ * エージェントの一意識別子
52
52
  *
53
53
  * 小文字英数字とハイフンのみ使用可能(パターン: ^[a-z0-9-]+$)
54
- * ビルトインツール(claude-code, codex-cli)との重複は不可。
54
+ * ビルトインエージェント(claude-code, codex-cli)との重複は不可。
55
55
  */
56
56
  id: string;
57
57
 
58
58
  /**
59
59
  * UI表示名
60
60
  *
61
- * ツール選択画面で表示される名前。日本語も使用可能。
61
+ * エージェント選択画面で表示される名前。日本語も使用可能。
62
62
  */
63
63
  displayName: string;
64
64
 
65
65
  /**
66
66
  * アイコン文字(オプション)
67
67
  *
68
- * ツール選択画面で表示されるUnicode文字。
68
+ * エージェント選択画面で表示されるUnicode文字。
69
69
  */
70
70
  icon?: string;
71
71
 
@@ -96,7 +96,7 @@ export interface CustomAITool {
96
96
  /**
97
97
  * デフォルト引数(オプション)
98
98
  *
99
- * ツール実行時に常に付与される引数。
99
+ * エージェント実行時に常に付与される引数。
100
100
  * 最終的な引数は: defaultArgs + modeArgs[mode] + permissionSkipArgs + extraArgs
101
101
  */
102
102
  defaultArgs?: string[];
@@ -119,7 +119,7 @@ export interface CustomAITool {
119
119
  /**
120
120
  * 環境変数(オプション)
121
121
  *
122
- * ツール起動時に設定される環境変数。
122
+ * エージェント起動時に設定される環境変数。
123
123
  * APIキーや設定ファイルパスなどを指定。
124
124
  */
125
125
  env?: Record<string, string>;
@@ -136,11 +136,11 @@ export interface CustomAITool {
136
136
  }
137
137
 
138
138
  /**
139
- * ツール設定ファイル全体
139
+ * コーディングエージェント設定ファイル全体
140
140
  *
141
141
  * ~/.gwt/tools.json のスキーマ。
142
142
  */
143
- export interface ToolsConfig {
143
+ export interface CodingAgentsConfig {
144
144
  /**
145
145
  * 設定フォーマットのバージョン
146
146
  *
@@ -154,16 +154,16 @@ export interface ToolsConfig {
154
154
  updatedAt?: string;
155
155
 
156
156
  /**
157
- * すべてのツールで共有する環境変数
157
+ * すべてのエージェントで共有する環境変数
158
158
  */
159
159
  env?: Record<string, string>;
160
160
 
161
161
  /**
162
- * カスタムツール定義の配列
162
+ * カスタムコーディングエージェント定義の配列
163
163
  *
164
- * 空配列も許可(ビルトインツールのみ使用)。
164
+ * 空配列も許可(ビルトインエージェントのみ使用)。
165
165
  */
166
- customTools: CustomAITool[];
166
+ customCodingAgents: CodingAgent[];
167
167
  }
168
168
 
169
169
  // ============================================================================
@@ -171,17 +171,17 @@ export interface ToolsConfig {
171
171
  // ============================================================================
172
172
 
173
173
  /**
174
- * 統合ツール設定
174
+ * 統合コーディングエージェント設定
175
175
  *
176
- * ビルトインツールとカスタムツールを統合して扱うための内部型。
177
- * getAllTools() 関数がこの型の配列を返します。
176
+ * ビルトインエージェントとカスタムエージェントを統合して扱うための内部型。
177
+ * getAllCodingAgents() 関数がこの型の配列を返します。
178
178
  */
179
- export interface AIToolConfig {
179
+ export interface CodingAgentConfig {
180
180
  /**
181
- * ツールID
181
+ * エージェントID
182
182
  *
183
183
  * ビルトイン: "claude-code" | "codex-cli"
184
- * カスタム: CustomAITool.id
184
+ * カスタム: CodingAgent.id
185
185
  */
186
186
  id: string;
187
187
 
@@ -196,27 +196,27 @@ export interface AIToolConfig {
196
196
  icon?: string;
197
197
 
198
198
  /**
199
- * ビルトインツールかどうか
199
+ * ビルトインエージェントかどうか
200
200
  *
201
201
  * true: Claude Code または Codex CLI
202
- * false: カスタムツール
202
+ * false: カスタムエージェント
203
203
  */
204
204
  isBuiltin: boolean;
205
205
 
206
206
  /**
207
- * カスタムツールの場合、元の設定
207
+ * カスタムエージェントの場合、元の設定
208
208
  *
209
209
  * isBuiltin=false の場合のみ存在。
210
210
  */
211
- customConfig?: CustomAITool;
211
+ customConfig?: CodingAgent;
212
212
  }
213
213
 
214
214
  /**
215
- * ツール起動オプション
215
+ * コーディングエージェント起動オプション
216
216
  *
217
- * launchCustomAITool() 関数の引数として使用。
217
+ * launchCodingAgent() 関数の引数として使用。
218
218
  */
219
- export interface LaunchOptions {
219
+ export interface CodingAgentLaunchOptions {
220
220
  /**
221
221
  * 実行モード
222
222
  */
@@ -239,7 +239,7 @@ export interface LaunchOptions {
239
239
  /**
240
240
  * 作業ディレクトリ(ワークツリーパス)
241
241
  *
242
- * ツール起動時のcwdとして使用されます。
242
+ * エージェント起動時のcwdとして使用されます。
243
243
  */
244
244
  cwd?: string;
245
245
 
@@ -11,18 +11,18 @@ import {
11
11
  SelectTrigger,
12
12
  SelectValue,
13
13
  } from "@/components/ui/select";
14
- import type { Branch, CustomAITool } from "../../../../types/api.js";
14
+ import type { Branch, ApiCodingAgent } from "../../../../types/api.js";
15
15
  import {
16
16
  CLAUDE_PERMISSION_SKIP_ARGS,
17
17
  CODEX_DEFAULT_ARGS,
18
- } from "../../../../shared/aiToolConstants.js";
18
+ } from "../../../../shared/codingAgentConstants.js";
19
19
  import { useConfig } from "../hooks/useConfig";
20
20
  import { useStartSession } from "../hooks/useSessions";
21
21
  import { useCreateWorktree } from "../hooks/useWorktrees";
22
22
  import { useSyncBranch } from "../hooks/useBranches";
23
23
  import { ApiError } from "../lib/api";
24
24
 
25
- const BUILTIN_TOOL_SUMMARIES: Record<string, ToolSummary> = {
25
+ const BUILTIN_AGENT_SUMMARIES: Record<string, AgentSummary> = {
26
26
  "claude-code": {
27
27
  command: "claude",
28
28
  defaultArgs: [],
@@ -44,7 +44,7 @@ const BUILTIN_TOOL_SUMMARIES: Record<string, ToolSummary> = {
44
44
  },
45
45
  };
46
46
 
47
- interface ToolSummary {
47
+ interface AgentSummary {
48
48
  command: string;
49
49
  defaultArgs?: string[] | null;
50
50
  modeArgs?: {
@@ -55,19 +55,22 @@ interface ToolSummary {
55
55
  permissionSkipArgs?: string[] | null;
56
56
  }
57
57
 
58
- interface AIToolLaunchModalProps {
58
+ interface CodingAgentLaunchModalProps {
59
59
  branch: Branch;
60
60
  onClose: () => void;
61
61
  }
62
62
 
63
- type ToolMode = "normal" | "continue" | "resume";
63
+ type AgentMode = "normal" | "continue" | "resume";
64
64
 
65
- type SelectableTool =
65
+ type SelectableAgent =
66
66
  | { id: "claude-code"; label: string; target: "claude" }
67
67
  | { id: "codex-cli"; label: string; target: "codex" }
68
- | { id: string; label: string; target: "custom"; definition: CustomAITool };
68
+ | { id: string; label: string; target: "custom"; definition: ApiCodingAgent };
69
69
 
70
- export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
70
+ export function CodingAgentLaunchModal({
71
+ branch,
72
+ onClose,
73
+ }: CodingAgentLaunchModalProps) {
71
74
  const {
72
75
  data: config,
73
76
  isLoading: isConfigLoading,
@@ -78,8 +81,8 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
78
81
  const syncBranch = useSyncBranch(branch.name);
79
82
  const navigate = useNavigate();
80
83
 
81
- const [selectedToolId, setSelectedToolId] = useState<string>("claude-code");
82
- const [selectedMode, setSelectedMode] = useState<ToolMode>("normal");
84
+ const [selectedAgentId, setSelectedAgentId] = useState<string>("claude-code");
85
+ const [selectedMode, setSelectedMode] = useState<AgentMode>("normal");
83
86
  const [skipPermissions, setSkipPermissions] = useState(false);
84
87
  const [extraArgsText, setExtraArgsText] = useState("");
85
88
  const [banner, setBanner] = useState<{
@@ -89,74 +92,74 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
89
92
  const [isStartingSession, setIsStartingSession] = useState(false);
90
93
  const [isCreatingWorktree, setIsCreatingWorktree] = useState(false);
91
94
 
92
- const customTools = config?.tools ?? [];
93
- const availableTools: SelectableTool[] = useMemo(
95
+ const customAgents = config?.codingAgents ?? [];
96
+ const availableAgents: SelectableAgent[] = useMemo(
94
97
  () => [
95
98
  { id: "claude-code", label: "Claude Code", target: "claude" },
96
99
  { id: "codex-cli", label: "Codex CLI", target: "codex" },
97
- ...customTools.map((tool) => ({
98
- id: tool.id,
99
- label: tool.displayName,
100
+ ...customAgents.map((agent) => ({
101
+ id: agent.id,
102
+ label: agent.displayName,
100
103
  target: "custom" as const,
101
- definition: tool,
104
+ definition: agent,
102
105
  })),
103
106
  ],
104
- [customTools],
107
+ [customAgents],
105
108
  );
106
109
 
107
110
  useEffect(() => {
108
- if (!availableTools.length) {
109
- setSelectedToolId("claude-code");
111
+ if (!availableAgents.length) {
112
+ setSelectedAgentId("claude-code");
110
113
  return;
111
114
  }
112
- if (!availableTools.find((tool) => tool.id === selectedToolId)) {
113
- const first = availableTools[0];
115
+ if (!availableAgents.find((agent) => agent.id === selectedAgentId)) {
116
+ const first = availableAgents[0];
114
117
  if (first) {
115
- setSelectedToolId(first.id);
118
+ setSelectedAgentId(first.id);
116
119
  }
117
120
  }
118
- }, [availableTools, selectedToolId]);
121
+ }, [availableAgents, selectedAgentId]);
119
122
 
120
- const selectedTool = availableTools.find(
121
- (tool) => tool.id === selectedToolId,
123
+ const selectedAgent = availableAgents.find(
124
+ (agent) => agent.id === selectedAgentId,
122
125
  );
123
126
 
124
- const selectedToolSummary: ToolSummary | null = useMemo(() => {
125
- if (!selectedTool) {
127
+ const selectedAgentSummary: AgentSummary | null = useMemo(() => {
128
+ if (!selectedAgent) {
126
129
  return null;
127
130
  }
128
- if (selectedTool.target === "custom") {
131
+ if (selectedAgent.target === "custom") {
129
132
  return {
130
- command: selectedTool.definition.command,
131
- defaultArgs: selectedTool.definition.defaultArgs ?? null,
132
- modeArgs: selectedTool.definition.modeArgs,
133
- permissionSkipArgs: selectedTool.definition.permissionSkipArgs ?? null,
133
+ command: selectedAgent.definition.command,
134
+ defaultArgs: selectedAgent.definition.defaultArgs ?? null,
135
+ modeArgs: selectedAgent.definition.modeArgs,
136
+ permissionSkipArgs: selectedAgent.definition.permissionSkipArgs ?? null,
134
137
  };
135
138
  }
136
- return BUILTIN_TOOL_SUMMARIES[selectedTool.id] ?? null;
137
- }, [selectedTool]);
139
+ return BUILTIN_AGENT_SUMMARIES[selectedAgent.id] ?? null;
140
+ }, [selectedAgent]);
138
141
 
139
142
  const argsPreview = useMemo(() => {
140
- if (!selectedToolSummary) {
143
+ if (!selectedAgentSummary) {
141
144
  return null;
142
145
  }
143
146
  const args: string[] = [];
144
- if (selectedToolSummary.defaultArgs?.length) {
145
- args.push(...selectedToolSummary.defaultArgs);
147
+ if (selectedAgentSummary.defaultArgs?.length) {
148
+ args.push(...selectedAgentSummary.defaultArgs);
146
149
  }
147
- const mode = selectedToolSummary.modeArgs?.[selectedMode];
150
+ const mode = selectedAgentSummary.modeArgs?.[selectedMode];
148
151
  if (mode?.length) {
149
152
  args.push(...mode);
150
153
  }
151
- if (skipPermissions && selectedToolSummary.permissionSkipArgs?.length) {
152
- args.push(...selectedToolSummary.permissionSkipArgs);
154
+ if (skipPermissions && selectedAgentSummary.permissionSkipArgs?.length) {
155
+ args.push(...selectedAgentSummary.permissionSkipArgs);
153
156
  }
154
157
  const extraArgs = parseExtraArgs(extraArgsText);
155
158
  if (extraArgs.length) {
156
159
  args.push(...extraArgs);
157
160
  }
158
- return { command: selectedToolSummary.command, args };
159
- }, [selectedToolSummary, selectedMode, skipPermissions, extraArgsText]);
161
+ return { command: selectedAgentSummary.command, args };
162
+ }, [selectedAgentSummary, selectedMode, skipPermissions, extraArgsText]);
160
163
 
161
164
  const PROTECTED_BRANCHES = ["main", "master", "develop"];
162
165
  const isProtectedBranch = PROTECTED_BRANCHES.includes(
@@ -256,8 +259,8 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
256
259
  });
257
260
  return;
258
261
  }
259
- if (!selectedTool) {
260
- setBanner({ type: "error", message: "Select an AI tool to launch." });
262
+ if (!selectedAgent) {
263
+ setBanner({ type: "error", message: "Select a coding agent to launch." });
261
264
  return;
262
265
  }
263
266
  if (needsRemoteSync) {
@@ -285,23 +288,23 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
285
288
 
286
289
  setIsStartingSession(true);
287
290
  try {
288
- const toolType =
289
- selectedTool.target === "codex"
291
+ const agentType =
292
+ selectedAgent.target === "codex"
290
293
  ? "codex-cli"
291
- : selectedTool.target === "custom"
294
+ : selectedAgent.target === "custom"
292
295
  ? "custom"
293
296
  : "claude-code";
294
297
  const extraArgs = parseExtraArgs(extraArgsText);
295
298
  const sessionRequest = {
296
- toolType,
297
- toolName: selectedTool.target === "custom" ? selectedTool.id : null,
298
- ...(selectedTool.target === "custom"
299
- ? { customToolId: selectedTool.id }
299
+ agentType,
300
+ agentName: selectedAgent.target === "custom" ? selectedAgent.id : null,
301
+ ...(selectedAgent.target === "custom"
302
+ ? { customAgentId: selectedAgent.id }
300
303
  : {}),
301
304
  mode: selectedMode,
302
305
  worktreePath: branch.worktreePath,
303
306
  skipPermissions,
304
- ...(selectedTool.target === "codex"
307
+ ...(selectedAgent.target === "codex"
305
308
  ? { bypassApprovals: skipPermissions }
306
309
  : {}),
307
310
  ...(extraArgs.length ? { extraArgs } : {}),
@@ -333,7 +336,7 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
333
336
  <div className="flex items-start justify-between gap-4">
334
337
  <div>
335
338
  <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
336
- Launch AI Tool
339
+ Launch Coding Agent
337
340
  </p>
338
341
  <h2 className="mt-1 text-lg font-semibold">{branch.name}</h2>
339
342
  </div>
@@ -379,7 +382,8 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
379
382
  ) : (
380
383
  <>
381
384
  <p>
382
- Worktree is missing. Create it before launching AI tools.
385
+ Worktree is missing. Create it before launching coding
386
+ agents.
383
387
  </p>
384
388
  <Button
385
389
  variant="secondary"
@@ -415,19 +419,19 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
415
419
 
416
420
  <div className="grid gap-4 sm:grid-cols-3">
417
421
  <div className="space-y-2">
418
- <label className="text-sm font-medium">AI tool</label>
422
+ <label className="text-sm font-medium">Coding agent</label>
419
423
  <Select
420
- value={selectedToolId}
421
- onValueChange={setSelectedToolId}
424
+ value={selectedAgentId}
425
+ onValueChange={setSelectedAgentId}
422
426
  disabled={isConfigLoading ?? false}
423
427
  >
424
428
  <SelectTrigger>
425
429
  <SelectValue />
426
430
  </SelectTrigger>
427
431
  <SelectContent>
428
- {availableTools.map((tool) => (
429
- <SelectItem key={tool.id} value={tool.id}>
430
- {tool.label}
432
+ {availableAgents.map((agent) => (
433
+ <SelectItem key={agent.id} value={agent.id}>
434
+ {agent.label}
431
435
  </SelectItem>
432
436
  ))}
433
437
  </SelectContent>
@@ -438,7 +442,7 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
438
442
  <label className="text-sm font-medium">Launch mode</label>
439
443
  <Select
440
444
  value={selectedMode}
441
- onValueChange={(value) => setSelectedMode(value as ToolMode)}
445
+ onValueChange={(value) => setSelectedMode(value as AgentMode)}
442
446
  >
443
447
  <SelectTrigger>
444
448
  <SelectValue />
@@ -477,12 +481,12 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
477
481
  onClick={handleStartSession}
478
482
  disabled={
479
483
  isStartingSession ||
480
- !selectedTool ||
484
+ !selectedAgent ||
481
485
  hasBlockingDivergence ||
482
486
  needsRemoteSync
483
487
  }
484
488
  >
485
- {isStartingSession ? "Launching..." : "Launch AI tool"}
489
+ {isStartingSession ? "Launching..." : "Launch coding agent"}
486
490
  </Button>
487
491
  <Button
488
492
  variant="secondary"
@@ -496,25 +500,25 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
496
500
  </Button>
497
501
  </div>
498
502
 
499
- {selectedToolSummary && (
503
+ {selectedAgentSummary && (
500
504
  <div className="space-y-2 rounded-lg border bg-muted/30 p-4 text-sm">
501
505
  <div className="grid gap-2 sm:grid-cols-3">
502
506
  <div>
503
507
  <span className="text-muted-foreground">Command:</span>{" "}
504
508
  <code className="rounded bg-muted px-1.5 py-0.5 font-mono">
505
- {selectedToolSummary.command}
509
+ {selectedAgentSummary.command}
506
510
  </code>
507
511
  </div>
508
512
  <div>
509
513
  <span className="text-muted-foreground">defaultArgs:</span>{" "}
510
514
  <span
511
515
  className={
512
- !selectedToolSummary.defaultArgs?.length
516
+ !selectedAgentSummary.defaultArgs?.length
513
517
  ? "text-muted-foreground/50"
514
518
  : ""
515
519
  }
516
520
  >
517
- {renderArgs(selectedToolSummary.defaultArgs)}
521
+ {renderArgs(selectedAgentSummary.defaultArgs)}
518
522
  </span>
519
523
  </div>
520
524
  <div>
@@ -523,12 +527,12 @@ export function AIToolLaunchModal({ branch, onClose }: AIToolLaunchModalProps) {
523
527
  </span>{" "}
524
528
  <span
525
529
  className={
526
- !selectedToolSummary.permissionSkipArgs?.length
530
+ !selectedAgentSummary.permissionSkipArgs?.length
527
531
  ? "text-muted-foreground/50"
528
532
  : ""
529
533
  }
530
534
  >
531
- {renderArgs(selectedToolSummary.permissionSkipArgs)}
535
+ {renderArgs(selectedAgentSummary.permissionSkipArgs)}
532
536
  </span>
533
537
  </div>
534
538
  </div>
@@ -9,26 +9,26 @@ import {
9
9
  SelectValue,
10
10
  } from "@/components/ui/select";
11
11
  import type {
12
- CustomAITool,
12
+ ApiCodingAgent,
13
13
  EnvironmentVariable,
14
14
  } from "../../../../types/api.js";
15
15
 
16
- export interface CustomToolFormValue {
16
+ export interface CustomCodingAgentFormValue {
17
17
  id: string;
18
18
  displayName: string;
19
19
  icon?: string | null;
20
20
  description?: string | null;
21
- executionType: CustomAITool["executionType"];
21
+ executionType: ApiCodingAgent["executionType"];
22
22
  command: string;
23
23
  defaultArgs?: string[] | null;
24
- modeArgs: CustomAITool["modeArgs"];
24
+ modeArgs: ApiCodingAgent["modeArgs"];
25
25
  permissionSkipArgs?: string[] | null;
26
26
  env?: EnvironmentVariable[] | null;
27
27
  }
28
28
 
29
- interface CustomToolFormProps {
30
- initialValue?: CustomAITool;
31
- onSubmit: (value: CustomToolFormValue) => void;
29
+ interface CustomCodingAgentFormProps {
30
+ initialValue?: ApiCodingAgent;
31
+ onSubmit: (value: CustomCodingAgentFormValue) => void;
32
32
  onCancel: () => void;
33
33
  isSaving?: boolean;
34
34
  }
@@ -40,18 +40,18 @@ interface FormErrors {
40
40
  env?: string;
41
41
  }
42
42
 
43
- export function CustomToolForm({
43
+ export function CustomCodingAgentForm({
44
44
  initialValue,
45
45
  onSubmit,
46
46
  onCancel,
47
47
  isSaving,
48
- }: CustomToolFormProps) {
48
+ }: CustomCodingAgentFormProps) {
49
49
  const [formState, setFormState] = useState(() =>
50
50
  createInitialState(initialValue),
51
51
  );
52
52
  const [errors, setErrors] = useState<FormErrors>({});
53
53
 
54
- const title = initialValue ? "ツールを編集" : "新規カスタムツール";
54
+ const title = initialValue ? "Coding Agent を編集" : "新規 Coding Agent";
55
55
 
56
56
  const handleChange =
57
57
  (field: keyof typeof formState) =>
@@ -120,7 +120,7 @@ export function CustomToolForm({
120
120
  {title}
121
121
  </p>
122
122
  <h3 className="mt-1 text-lg font-semibold">
123
- {formState.displayName || "カスタムAIツール"}
123
+ {formState.displayName || "Custom Coding Agent"}
124
124
  </h3>
125
125
  </div>
126
126
  <div className="flex gap-2">
@@ -140,7 +140,7 @@ export function CustomToolForm({
140
140
 
141
141
  <div className="grid gap-4 sm:grid-cols-2">
142
142
  <div className="space-y-2">
143
- <label className="text-sm font-medium">ツールID *</label>
143
+ <label className="text-sm font-medium">Agent ID *</label>
144
144
  <Input
145
145
  type="text"
146
146
  value={formState.id}
@@ -286,14 +286,14 @@ export function CustomToolForm({
286
286
  );
287
287
  }
288
288
 
289
- function createInitialState(initialValue?: CustomAITool) {
289
+ function createInitialState(initialValue?: ApiCodingAgent) {
290
290
  if (!initialValue) {
291
291
  return {
292
292
  id: "",
293
293
  displayName: "",
294
294
  icon: "",
295
295
  description: "",
296
- executionType: "bunx" as CustomAITool["executionType"],
296
+ executionType: "bunx" as ApiCodingAgent["executionType"],
297
297
  command: "",
298
298
  defaultArgs: "",
299
299
  modeNormal: "",