Skip to content

Commit 08bb0ac

Browse files
committed
feat(runtime): expose CLI output truncation metadata
1 parent 38d5ebf commit 08bb0ac

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/main/java/io/github/easy4j/opencode/cli/OpenCodeCliResult.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ public class OpenCodeCliResult {
2525
*/
2626
private final String stderr;
2727

28+
/** Whether retained stdout was truncated by the configured capture bound. */
29+
private final boolean stdoutTruncated;
30+
31+
/** Whether retained stderr was truncated by the configured capture bound. */
32+
private final boolean stderrTruncated;
33+
34+
public OpenCodeCliResult(int exitCode, String stdout, String stderr) {
35+
this(exitCode, stdout, stderr, false, false);
36+
}
37+
38+
public OpenCodeCliResult(int exitCode, String stdout, String stderr,
39+
boolean stdoutTruncated, boolean stderrTruncated) {
40+
this.exitCode = exitCode;
41+
this.stdout = stdout;
42+
this.stderr = stderr;
43+
this.stdoutTruncated = stdoutTruncated;
44+
this.stderrTruncated = stderrTruncated;
45+
}
46+
2847
/**
2948
* 判断 CLI 进程是否以零状态码正常结束。
3049
*

0 commit comments

Comments
 (0)