triflux 9.8.1 → 9.8.2

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.
@@ -195,6 +195,9 @@ function ensureCaptureHelper() {
195
195
  " New-Item -ItemType Directory -Force -Path $parent | Out-Null",
196
196
  "}",
197
197
  "",
198
+ "# Force UTF-8 encoding — CP949 등 non-UTF-8 codepage에서 Gemini stdout 캡처 실패 방지",
199
+ "[Console]::InputEncoding = [System.Text.Encoding]::UTF8",
200
+ "",
198
201
  "$reader = [Console]::In",
199
202
  "while (($line = $reader.ReadLine()) -ne $null) {",
200
203
  " Add-Content -LiteralPath $Path -Value $line -Encoding utf8",
@@ -877,7 +880,9 @@ export function dispatchCommand(sessionName, paneNameOrTarget, commandText) {
877
880
 
878
881
  const token = randomToken(paneName);
879
882
  const safeCommand = wrapCliForBash(commandText);
880
- const wrapped = `try { ${safeCommand} } finally { $trifluxExit = if ($null -ne $LASTEXITCODE) { [int]$LASTEXITCODE } else { 0 }; Write-Output "${COMPLETION_PREFIX}${token}:$trifluxExit" }`;
883
+ // CP949 non-UTF-8 codepage 환경에서 CLI stdout이 깨지는 문제 방지 (belt-and-suspenders)
884
+ const chcpPrefix = process.platform === "win32" ? "chcp 65001 > $null; " : "";
885
+ const wrapped = `${chcpPrefix}try { ${safeCommand} } finally { $trifluxExit = if ($null -ne $LASTEXITCODE) { [int]$LASTEXITCODE } else { 0 }; Write-Output "${COMPLETION_PREFIX}${token}:$trifluxExit" }`;
881
886
 
882
887
  sendLiteralToPane(pane.paneId, wrapped, true);
883
888
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "9.8.1",
3
+ "version": "9.8.2",
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": {
@@ -189,8 +189,11 @@ async function main() {
189
189
  process.exit(0);
190
190
  }
191
191
 
192
- // codex/gemini 직접 CLI 호출 → deny
192
+ // codex/gemini 직접 CLI 호출 → deny (인라인 TFX_ALLOW_DIRECT_CLI=1 우회 허용)
193
193
  if (/\bcodex\b.*\bexec\b/.test(cmd) || /\bgemini\s+(-p|--prompt)\b/.test(cmd)) {
194
+ if (/\bTFX_ALLOW_DIRECT_CLI=1\b/.test(cmd)) {
195
+ nudge("[headless-guard] direct CLI mode (inline TFX_ALLOW_DIRECT_CLI=1)");
196
+ }
194
197
  deny(
195
198
  "[headless-guard] codex/gemini 직접 호출은 spawn-session에서 차단됩니다. " +
196
199
  `승인된 경로: ${HEADLESS_FALLBACK_COMMAND}. ` +