@cocorograph/hub-agent 0.7.26 → 0.7.27
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/package.json +1 -1
- package/src/main.mjs +12 -2
package/package.json
CHANGED
package/src/main.mjs
CHANGED
|
@@ -3263,7 +3263,7 @@ async function dispatch(msg, ctx) {
|
|
|
3263
3263
|
return
|
|
3264
3264
|
}
|
|
3265
3265
|
case "worktree.create": {
|
|
3266
|
-
// body: { request_id, dir, branch, claude_cmd? }
|
|
3266
|
+
// body: { request_id, dir, branch, cli_kind?, claude_cmd?, codex_cmd?, model?, sandbox?, approval_policy?, effort?, initial_prompt? }
|
|
3267
3267
|
const dir = (msg.dir || "").trim()
|
|
3268
3268
|
const branch = (msg.branch || "").trim()
|
|
3269
3269
|
if (!dir || !branch) {
|
|
@@ -3286,12 +3286,22 @@ async function dispatch(msg, ctx) {
|
|
|
3286
3286
|
}
|
|
3287
3287
|
try {
|
|
3288
3288
|
const { wtName, wtPath, createdBranch } = await createWorktreeDir(dir, branch)
|
|
3289
|
-
// worktree dir で tmux session
|
|
3289
|
+
// worktree dir で tmux session を作成。tmux.create_session と同じく cli_kind を
|
|
3290
|
+
// 解釈し、codex なら codex を pane 起動する(既定 claude)。worktree は別 cwd=
|
|
3291
|
+
// 別セッション名なので、メイン=claude / worktree=codex の並走が成立する。
|
|
3290
3292
|
await createTmuxSession(wtName, wtPath, {
|
|
3293
|
+
cliKind: msg.cli_kind === "codex" ? "codex" : "claude",
|
|
3291
3294
|
claudeCmd:
|
|
3292
3295
|
typeof msg.claude_cmd === "string"
|
|
3293
3296
|
? msg.claude_cmd
|
|
3294
3297
|
: claudeCmdFromAgentConfig(ctx.config),
|
|
3298
|
+
codexCmd: typeof msg.codex_cmd === "string" ? msg.codex_cmd : undefined,
|
|
3299
|
+
// codex 用設定 (claude 経路では無視される)。
|
|
3300
|
+
model: typeof msg.model === "string" ? msg.model : undefined,
|
|
3301
|
+
sandbox: typeof msg.sandbox === "string" ? msg.sandbox : undefined,
|
|
3302
|
+
approvalPolicy:
|
|
3303
|
+
typeof msg.approval_policy === "string" ? msg.approval_policy : undefined,
|
|
3304
|
+
effort: typeof msg.effort === "string" ? msg.effort : undefined,
|
|
3295
3305
|
initialPrompt:
|
|
3296
3306
|
typeof msg.initial_prompt === "string" ? msg.initial_prompt : undefined,
|
|
3297
3307
|
logger: ctx.logger,
|