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.
- package/hooks/hook-orchestrator.mjs +6 -2
- package/package.json +1 -1
- package/scripts/tfx-route.sh +13 -0
|
@@ -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
|
|
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
package/scripts/tfx-route.sh
CHANGED
|
@@ -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
|
|