@@ -1005,7 +1005,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
10051005 )
10061006 . at ( - 1 ) ;
10071007 assert . deepEqual ( roster ?? [ ] , [
1008- { taskId : "sh_1" , kind : "command" , description : SHELL_COMMAND } ,
1008+ { taskId : "sh_1" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
10091009 ] ) ;
10101010 assert . isTrue ( yield * runtime . hasPendingBackgroundWork ! ) ;
10111011 } ) . pipe ( Effect . scoped ) ,
@@ -1028,7 +1028,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
10281028 yield * runtime . startTurn ( turnInput ( thread ) ) ;
10291029 yield * watch . until ( ( ) => watch . state . variant === "drained" ) ;
10301030 assert . deepEqual ( watch . state . roster , [
1031- { taskId : "sh_1" , kind : "command" , description : SHELL_COMMAND } ,
1031+ { taskId : "sh_1" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
10321032 ] ) ;
10331033 assert . isTrue ( watch . state . pending ) ;
10341034 } ) . pipe ( Effect . scoped ) ,
@@ -1046,7 +1046,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
10461046 yield * watch . until ( ( ) => watch . terminals . length > 0 ) ;
10471047 assert . deepEqual ( watch . terminals , [ "completed" ] ) ;
10481048 assert . deepEqual ( watch . state . roster , [
1049- { taskId : "sh_1" , kind : "command" , description : SHELL_COMMAND } ,
1049+ { taskId : "sh_1" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
10501050 ] ) ;
10511051 yield * TestClock . adjust ( "1 minute" ) ;
10521052 yield * watch . until ( ( ) => watch . state . roster ?. length === 0 ) ;
@@ -1216,6 +1216,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
12161216 assert . deepEqual ( shell , {
12171217 taskId : "sh_child" ,
12181218 kind : "command" ,
1219+ command : SHELL_COMMAND ,
12191220 description : SHELL_COMMAND ,
12201221 parentTaskId : "call-background" ,
12211222 } ) ;
@@ -1311,6 +1312,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
13111312 assert . deepEqual ( shell , {
13121313 taskId : "sh_grandchild" ,
13131314 kind : "command" ,
1315+ command : SHELL_COMMAND ,
13141316 description : SHELL_COMMAND ,
13151317 parentTaskId : `${ CHILD } :call-nested` ,
13161318 } ) ;
@@ -1339,7 +1341,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
13391341 // The held wake keeps work pending until the reconnect discards it and lists what it kept.
13401342 yield * watch . until ( ( ) => watch . state . pending === false || watch . state . roster ?. length === 1 ) ;
13411343 assert . deepEqual ( watch . state . roster , [
1342- { taskId : "sh_child" , kind : "command" , description : SHELL_COMMAND } ,
1344+ { taskId : "sh_child" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
13431345 ] ) ;
13441346 yield * watch . until ( ( ) => watch . state . variant === "drained" ) ;
13451347 assert . isTrue ( yield * runtime . hasPendingBackgroundWork ! ) ;
@@ -1446,7 +1448,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
14461448 assert . isTrue ( yield * runtime . hasPendingBackgroundWork ! ) ;
14471449 yield * watch . until ( ( ) => watch . state . roster ?. length === 1 ) ;
14481450 assert . deepEqual ( watch . state . roster , [
1449- { taskId : "sh_child" , kind : "command" , description : SHELL_COMMAND } ,
1451+ { taskId : "sh_child" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
14501452 ] ) ;
14511453 yield * stop ;
14521454 assert . isTrue ( gate . hasReached ( "second" ) ) ;
@@ -1820,8 +1822,8 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
18201822 ( watch . state . roster ?? [ ] ) . every ( ( task ) => ( task as { description ?: string } ) . description ) ,
18211823 ) ;
18221824 assert . deepEqual ( watch . state . roster , [
1823- { taskId : "sh_a" , kind : "command" , description : SHELL_COMMAND } ,
1824- { taskId : "sh_b" , kind : "command" , description : SHELL_COMMAND } ,
1825+ { taskId : "sh_a" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
1826+ { taskId : "sh_b" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
18251827 ] ) ;
18261828 gate . release ( "ended" ) ;
18271829 yield * Deferred . await ( continued ) ;
@@ -1850,7 +1852,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
18501852 assert . deepEqual ( watch . terminals , [ "completed" ] ) ;
18511853 yield * watch . until ( ( ) => watch . calls . get ( "Sleep" ) ?. status === "completed" ) ;
18521854 assert . deepEqual ( watch . state . roster , [
1853- { taskId : "sh_child" , kind : "command" , description : SHELL_COMMAND } ,
1855+ { taskId : "sh_child" , kind : "command" , command : SHELL_COMMAND , description : SHELL_COMMAND } ,
18541856 ] ) ;
18551857 const childTurns = watch . childTurns . size ;
18561858 yield * runtime . interruptTurn ( {
@@ -1894,6 +1896,7 @@ it.layer(McpProviderSessions.layer)("OpenCode2 adapter", (it) => {
18941896 assert . deepEqual ( shell , {
18951897 taskId : "sh_child" ,
18961898 kind : "command" ,
1899+ command : SHELL_COMMAND ,
18971900 description : SHELL_COMMAND ,
18981901 parentTaskId : subagent ?. taskId ,
18991902 } ) ;
0 commit comments