@@ -110,10 +110,21 @@ test("OpenCode sidecar runtime extracts commands, paths, output, and hashes", ()
110110 assert . deepEqual ( pathsFromTool ( { path : "src/a.ts" , filePath : "src/b.ts" , files : [ "test/a.test.ts" , 1 ] } ) , [ "src/a.ts" , "src/b.ts" , "test/a.test.ts" ] ) ;
111111 assert . equal ( exitCodeFromOutput ( { properties : { status : "2" } } ) , 2 ) ;
112112 assert . equal ( exitCodeFromOutput ( { exitCode : 0 } ) , 0 ) ;
113+ assert . equal ( exitCodeFromOutput ( { properties : { stdout : "ok" } } ) , null ) ;
113114 assert . equal ( outputText ( { properties : { stdout : "ok" } } , [ "stdout" ] ) , "ok" ) ;
114115 assert . match ( hashText ( "ok" ) , / ^ [ a - f 0 - 9 ] { 64 } $ / ) ;
115116} ) ;
116117
118+ test ( "OpenCode sidecar runtime records after-tool evidence through input JSON" , ( ) => {
119+ const runtimeSource = readFileSync ( path . join ( import . meta. dirname , ".." , "src" , "integrations" , "opencode" , "plugin-runtime" , "index.ts" ) , "utf8" ) ;
120+
121+ assert . match ( runtimeSource , / " - - i n p u t - j s o n " , i n p u t J s o n / ) ;
122+ assert . doesNotMatch ( runtimeSource , / " - - s t d o u t " / ) ;
123+ assert . doesNotMatch ( runtimeSource , / " - - s t d e r r " / ) ;
124+ assert . doesNotMatch ( runtimeSource , / e x i t C o d e F r o m O u t p u t \( o u t p u t \) \s * \? \? \s * 0 / ) ;
125+ assert . doesNotMatch ( runtimeSource , / S t r i n g \( e x i t C o d e F r o m O u t p u t \( o u t p u t \) \s * \? \? \s * 0 \) / ) ;
126+ } ) ;
127+
117128test ( "OpenCode sidecar plugin uses the OpenCode++ path" , ( ) => {
118129 const root = mkdtempSync ( path . join ( tmpdir ( ) , "opencode-plusplus-sidecar-path-" ) ) ;
119130 try {
0 commit comments