@@ -126,10 +126,7 @@ const scope: McpInvocationContext.McpInvocationScope = {
126126 issuedAt : 1 ,
127127} ;
128128
129- /**
130- * The laptop: a real orchestrator, its orchestrator toolkit, and its links.
131- * `wrapLinks` lets a test hold a real link while it is made.
132- */
129+ /** A real orchestrator and links; the wrapper can hold a link in progress. */
133130const makeLaptopWith = (
134131 wrapLinks ?: ( links : PeerLinks . PeerLinks [ "Service" ] ) => PeerLinks . PeerLinks [ "Service" ] ,
135132) =>
@@ -994,7 +991,6 @@ it.live(
994991 ) ,
995992) ;
996993
997- /** Every link card in the thread, oldest first. */
998994const linkCards = ( a : Laptop ) =>
999995 a . orchestrator
1000996 . getThreadProjection ( threadId )
@@ -1004,15 +1000,13 @@ const linkCards = (a: Laptop) =>
10041000 ) ,
10051001 ) ;
10061002
1007- /** Asks through the tool and returns the card that ask left. */
10081003const ask = ( a : Laptop , args : Record < string , unknown > ) =>
10091004 Effect . gen ( function * ( ) {
10101005 const asked = yield * a . call ( args ) ;
10111006 const { turnItemId } = asked . structuredContent as { readonly turnItemId : TurnItemId } ;
10121007 return ( yield * linkCards ( a ) ) . find ( ( card ) => card . id === turnItemId ) ! ;
10131008 } ) ;
10141009
1015- /** The user links the box from `cardId` with a fresh code; returns the code. */
10161010const linkBox = ( a : Laptop , b : ServedPeer , cardId : TurnItemId ) =>
10171011 Effect . gen ( function * ( ) {
10181012 const pairing = yield * b . auth . issuePairingCredential ( ) ;
@@ -1072,16 +1066,10 @@ it.live("linking the machine an older card asked for by hint ends that card too"
10721066 // The agent hears of the one link it made, and nothing about the card that link ended.
10731067 expect ( ( yield * outcomeMessages ( a ) ) . messages ) . toHaveLength ( 1 ) ;
10741068 expect ( yield * storedText ( a ) ) . not . toContain ( credential ) ;
1075-
1076- const late = yield * a . requests
1077- . answer ( { threadId, turnItemId : older . id , answer : { type : "decline" } } )
1078- . pipe ( Effect . flip ) ;
1079- expect ( late . reason ) . toBe ( "already_answered" ) ;
10801069 } ) ,
10811070 ) ,
10821071) ;
10831072
1084- /** Records an open card with exactly the ask in `fields`, as `request` would. */
10851073const recordCard = (
10861074 a : Laptop ,
10871075 key : string ,
@@ -1212,10 +1200,6 @@ it.live("a later card's failed link leaves the older card open", () =>
12121200 ) ,
12131201) ;
12141202
1215- /**
1216- * A laptop whose link to the box waits on `hold` for each access it returns
1217- * a gate for, so a test can stall one answer inside its real link.
1218- */
12191203const withHeldLinks = < A , E , R > (
12201204 hold : ( access : PeerLinkCreateInput [ "access" ] ) => Effect . Effect < void > | undefined ,
12211205 body : ( a : Laptop , b : ServedPeer ) => Effect . Effect < A , E , R > ,
0 commit comments