remote-claude 0.2.6 → 0.2.8

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/remote_claude.py CHANGED
@@ -79,6 +79,8 @@ def cmd_start(args):
79
79
  claude_args_str = " ".join(f"'{arg}'" for arg in claude_args)
80
80
  debug_flag = " --debug-screen" if getattr(args, "debug_screen", False) else ""
81
81
  debug_verbose_flag = " --debug-verbose" if getattr(args, "debug_verbose", False) else ""
82
+ cli_type = getattr(args, "cli", "claude")
83
+ cli_type_flag = f" --cli-type {cli_type}" if cli_type != "claude" else ""
82
84
 
83
85
  # 捕获用户终端环境变量(tmux 会覆盖这些值,导致 Claude CLI 无法启用 kitty keyboard protocol)
84
86
  env_prefix = ""
@@ -87,7 +89,7 @@ def cmd_start(args):
87
89
  if val:
88
90
  env_prefix += f"{key}='{val}' "
89
91
 
90
- server_cmd = f"{env_prefix}uv run --project '{SCRIPT_DIR}' python3 '{server_script}'{debug_flag}{debug_verbose_flag} -- '{session_name}' {claude_args_str}"
92
+ server_cmd = f"{env_prefix}uv run --project '{SCRIPT_DIR}' python3 '{server_script}'{debug_flag}{debug_verbose_flag}{cli_type_flag} -- '{session_name}' {claude_args_str}"
91
93
 
92
94
  print(f"启动会话: {session_name}")
93
95
 
@@ -500,6 +502,12 @@ def main():
500
502
  action="store_true",
501
503
  help="debug 日志输出完整诊断信息(indicator、repr 等),默认只输出 ansi_render"
502
504
  )
505
+ start_parser.add_argument(
506
+ "--cli",
507
+ default="claude",
508
+ choices=["claude", "codex"],
509
+ help="后端 CLI 类型(默认 claude)"
510
+ )
503
511
  start_parser.set_defaults(func=cmd_start)
504
512
 
505
513
  # attach 命令
@@ -21,6 +21,8 @@ if [[ -n "$ZSH_VERSION" ]]; then
21
21
  'status:显示会话状态'
22
22
  'lark:飞书客户端管理'
23
23
  'stats:查看使用统计'
24
+ 'log:查看会话日志'
25
+ 'update:更新到最新版本'
24
26
  )
25
27
  lark_cmds=(
26
28
  'start:启动飞书客户端'
@@ -30,7 +32,7 @@ if [[ -n "$ZSH_VERSION" ]]; then
30
32
  )
31
33
 
32
34
  case $words[2] in
33
- attach|kill|status)
35
+ attach|kill|status|log)
34
36
  sessions=( ${(f)"$(_remote_claude_get_sessions)"} )
35
37
  _describe '会话名称' sessions
36
38
  ;;
@@ -51,7 +53,7 @@ else
51
53
  local cur
52
54
  cur="${COMP_WORDS[COMP_CWORD]}"
53
55
 
54
- local commands="start attach list kill status lark stats"
56
+ local commands="start attach list kill status lark stats log update"
55
57
  local lark_cmds="start stop restart status"
56
58
 
57
59
  if [[ $COMP_CWORD -eq 1 ]]; then
@@ -60,7 +62,7 @@ else
60
62
  fi
61
63
 
62
64
  case "${COMP_WORDS[1]}" in
63
- attach|kill|status)
65
+ attach|kill|status|log)
64
66
  local sessions
65
67
  sessions=$(_remote_claude_get_sessions)
66
68
  COMPREPLY=( $(compgen -W "$sessions" -- "$cur") )