triflux 9.7.4 → 9.7.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "9.7.4",
3
+ "version": "9.7.5",
4
4
  "description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
5
5
  "type": "module",
6
6
  "bin": {
@@ -56,6 +56,22 @@ resolve_tmp_dir() {
56
56
 
57
57
  TFX_TMP="$(resolve_tmp_dir)"
58
58
 
59
+ # ── config.toml sandbox/approval_mode 감지 ──
60
+ # config.toml에 이미 설정되어 있으면 CLI 플래그 중복 시 Codex가 에러를 던짐
61
+ _CODEX_CONFIG="${HOME}/.codex/config.toml"
62
+ _CODEX_HAS_SANDBOX=""
63
+ if [[ -f "$_CODEX_CONFIG" ]] && grep -qE '^\s*(sandbox|approval_mode)\s*=' "$_CODEX_CONFIG" 2>/dev/null; then
64
+ _CODEX_HAS_SANDBOX="1"
65
+ fi
66
+
67
+ build_codex_base() {
68
+ if [[ -n "$_CODEX_HAS_SANDBOX" ]]; then
69
+ echo "--skip-git-repo-check"
70
+ else
71
+ echo "--dangerously-bypass-approvals-and-sandbox --skip-git-repo-check"
72
+ fi
73
+ }
74
+
59
75
  # ── Async Job 디렉토리 ──
60
76
  TFX_JOBS_DIR="${TFX_TMP}/tfx-jobs"
61
77
 
@@ -726,7 +742,8 @@ resolve_gemini_profile() {
726
742
  # 반환: CLI_TYPE, CLI_CMD, CLI_ARGS, CLI_EFFORT, DEFAULT_TIMEOUT, RUN_MODE, OPUS_OVERSIGHT
727
743
  route_agent() {
728
744
  local agent="$1"
729
- local codex_base="--dangerously-bypass-approvals-and-sandbox --skip-git-repo-check"
745
+ local codex_base
746
+ codex_base="$(build_codex_base)"
730
747
  echo "[tfx-route] Codex 버전: $(get_codex_version)" >&2
731
748
  local map_file
732
749
  map_file="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../hub/team/agent-map.json"
@@ -933,7 +950,8 @@ esac
933
950
  CODEX_MCP_TRANSPORT_EXIT_CODE=70
934
951
 
935
952
  apply_cli_mode() {
936
- local codex_base="--dangerously-bypass-approvals-and-sandbox --skip-git-repo-check"
953
+ local codex_base
954
+ codex_base="$(build_codex_base)"
937
955
  local gemini_tier=""
938
956
 
939
957
  case "$TFX_CLI_MODE" in
@@ -1010,7 +1028,8 @@ apply_plan_guard() {
1010
1028
  [[ "$TFX_CODEX_PLAN" == "pro" ]] && return
1011
1029
 
1012
1030
  if [[ "$CLI_EFFORT" == spark53_* ]]; then
1013
- local codex_base="--dangerously-bypass-approvals-and-sandbox --skip-git-repo-check"
1031
+ local codex_base
1032
+ codex_base="$(build_codex_base)"
1014
1033
  CLI_ARGS="exec --profile codex53_high ${codex_base}"
1015
1034
  CLI_EFFORT="codex53_high"
1016
1035
  echo "[tfx-route] TFX_CODEX_PLAN=$TFX_CODEX_PLAN: spark → codex53_high로 다운그레이드 (Pro 전용)" >&2
@@ -1019,7 +1038,8 @@ apply_plan_guard() {
1019
1038
 
1020
1039
  # ── Claude 네이티브 제거 (Codex 리드 환경에서 선택적 활성화) ──
1021
1040
  apply_no_claude_native_mode() {
1022
- local codex_base="--dangerously-bypass-approvals-and-sandbox --skip-git-repo-check"
1041
+ local codex_base
1042
+ codex_base="$(build_codex_base)"
1023
1043
 
1024
1044
  [[ "$TFX_NO_CLAUDE_NATIVE" != "1" ]] && return
1025
1045
  [[ "$TFX_CLI_MODE" == "gemini" ]] && return