triflux 9.7.5 → 9.7.7

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.
@@ -146,9 +146,13 @@ function mergeOutputs(accumulated, newOutput) {
146
146
  const parsed = JSON.parse(newOutput);
147
147
  if (!accumulated) return parsed;
148
148
 
149
- // hookSpecificOutput는 마지막 것이 이김
149
+ // hookSpecificOutput 머지 — additionalContext누적, 나머지는 덮어쓰기
150
150
  if (parsed.hookSpecificOutput) {
151
- accumulated.hookSpecificOutput = parsed.hookSpecificOutput;
151
+ if (accumulated.hookSpecificOutput?.additionalContext && parsed.hookSpecificOutput.additionalContext) {
152
+ parsed.hookSpecificOutput.additionalContext =
153
+ accumulated.hookSpecificOutput.additionalContext + "\n" + parsed.hookSpecificOutput.additionalContext;
154
+ }
155
+ accumulated.hookSpecificOutput = { ...accumulated.hookSpecificOutput, ...parsed.hookSpecificOutput };
152
156
  }
153
157
  // systemMessage는 누적
154
158
  if (parsed.systemMessage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "9.7.5",
3
+ "version": "9.7.7",
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": {
@@ -1893,6 +1893,19 @@ EOF
1893
1893
  fi
1894
1894
  fi
1895
1895
 
1896
+ # 결과를 파일에도 저장 — run_in_background에서 TaskOutput이 stdout을 놓칠 때 대비
1897
+ local result_file="${TFX_TMP}/tfx-route-${AGENT_TYPE}-${RUN_ID}-result.log"
1898
+ {
1899
+ echo "agent: $AGENT_TYPE"
1900
+ echo "cli: $CLI_TYPE"
1901
+ echo "exit_code: $exit_code"
1902
+ echo "elapsed: ${elapsed}s"
1903
+ echo "status: $([ $exit_code -eq 0 ] && echo success || echo failed)"
1904
+ echo "stdout_log: $STDOUT_LOG"
1905
+ echo "result_file: $result_file"
1906
+ } > "$result_file" 2>/dev/null
1907
+ echo "[tfx-route] result_file=$result_file" >&2
1908
+
1896
1909
  return "$exit_code"
1897
1910
  }
1898
1911