@@ -1057,14 +1057,6 @@ function createChatContext(): Pick<
10571057 } ;
10581058}
10591059
1060- function beginChatReplyOperation (
1061- params : Parameters < typeof replyRunRegistry . begin > [ 0 ] ,
1062- ) : ReturnType < typeof replyRunRegistry . begin > {
1063- const operation = replyRunRegistry . begin ( params ) ;
1064- operation . bindToolAuthorityFingerprint ( "chat-test-authority" ) ;
1065- return operation ;
1066- }
1067-
10681060type ChatContext = ReturnType < typeof createChatContext > ;
10691061
10701062function useChatTestModel ( model : "vision-model" | "text-only" ) {
@@ -1482,7 +1474,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
14821474 await createGatewayUserTurnSqliteFixture ( "openclaw-chat-send-targetless-no-leaf-" ) ;
14831475 const { context, respond, send } = createChatRequestFixture ( ) ;
14841476 const queueMessage = vi . fn ( async ( ) => { } ) ;
1485- const operation = beginChatReplyOperation ( {
1477+ const operation = replyRunRegistry . begin ( {
14861478 sessionKey : "agent:main:main" ,
14871479 sessionId : mockState . sessionId ,
14881480 resetTriggered : false ,
@@ -1524,7 +1516,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
15241516 } ) ;
15251517 const { context, respond, send } = createChatRequestFixture ( ) ;
15261518 const queueMessage = vi . fn ( async ( ) => { } ) ;
1527- const operation = beginChatReplyOperation ( {
1519+ const operation = replyRunRegistry . begin ( {
15281520 sessionKey : "agent:main:main" ,
15291521 sessionId : mockState . sessionId ,
15301522 resetTriggered : false ,
@@ -1568,7 +1560,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
15681560 } ) ;
15691561 const { context, respond, send } = createChatRequestFixture ( ) ;
15701562 const queueMessage = vi . fn ( async ( ) => { } ) ;
1571- const operation = beginChatReplyOperation ( {
1563+ const operation = replyRunRegistry . begin ( {
15721564 sessionKey : "agent:main:main" ,
15731565 sessionId : mockState . sessionId ,
15741566 resetTriggered : false ,
@@ -1634,7 +1626,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
16341626 } ) ;
16351627 const { context, respond, send } = createChatRequestFixture ( ) ;
16361628 const queueMessage = vi . fn ( async ( ) => { } ) ;
1637- const operation = beginChatReplyOperation ( {
1629+ const operation = replyRunRegistry . begin ( {
16381630 sessionKey : "agent:main:main" ,
16391631 sessionId : mockState . sessionId ,
16401632 resetTriggered : false ,
@@ -1678,7 +1670,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
16781670 const { context, respond } = createChatRequestFixture ( ) ;
16791671 const originalQueue = vi . fn ( async ( ) => { } ) ;
16801672 const successorQueue = vi . fn ( async ( ) => { } ) ;
1681- const original = beginChatReplyOperation ( {
1673+ const original = replyRunRegistry . begin ( {
16821674 sessionKey : "agent:main:main" ,
16831675 sessionId : mockState . sessionId ,
16841676 resetTriggered : false ,
@@ -1720,7 +1712,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
17201712 } ,
17211713 async ( ) => {
17221714 original . complete ( ) ;
1723- successor = beginChatReplyOperation ( {
1715+ successor = replyRunRegistry . begin ( {
17241716 sessionKey : "agent:main:main" ,
17251717 sessionId : mockState . sessionId ,
17261718 resetTriggered : false ,
@@ -1760,7 +1752,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
17601752 parentId : null ,
17611753 } ) ;
17621754 const { context, respond, send } = createChatRequestFixture ( ) ;
1763- const operation = beginChatReplyOperation ( {
1755+ const operation = replyRunRegistry . begin ( {
17641756 sessionKey : "agent:main:main" ,
17651757 sessionId : mockState . sessionId ,
17661758 resetTriggered : false ,
@@ -1811,7 +1803,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
18111803 await createGatewayUserTurnSqliteFixture ( "openclaw-chat-send-steer-before-ack-" ) ;
18121804 const { context, respond, send } = createChatRequestFixture ( ) ;
18131805 const delivery = createDeferred ( ) ;
1814- const operation = beginChatReplyOperation ( {
1806+ const operation = replyRunRegistry . begin ( {
18151807 sessionKey : "agent:main:main" ,
18161808 sessionId : mockState . sessionId ,
18171809 resetTriggered : false ,
@@ -1867,7 +1859,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
18671859 const disposeAudit = onTrustedMessageAuditEvent ( ( event ) => auditEvents . push ( event ) ) ;
18681860 const { context, send } = createChatRequestFixture ( ) ;
18691861 const dispatchCallsBefore = dispatchInboundMessageMock . mock . calls . length ;
1870- const operation = beginChatReplyOperation ( {
1862+ const operation = replyRunRegistry . begin ( {
18711863 sessionKey : "agent:main:main" ,
18721864 sessionId : mockState . sessionId ,
18731865 resetTriggered : false ,
@@ -1954,7 +1946,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
19541946 reportAcceptance = options ?. onQueueAccepted ;
19551947 return delivery . promise ;
19561948 } ) ;
1957- const operation = beginChatReplyOperation ( {
1949+ const operation = replyRunRegistry . begin ( {
19581950 sessionKey : "agent:main:main" ,
19591951 sessionId : mockState . sessionId ,
19601952 resetTriggered : false ,
@@ -2041,7 +2033,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
20412033 const originalQueue = vi . fn ( async ( ) => { } ) ;
20422034 const successorQueue = vi . fn ( async ( ) => { } ) ;
20432035 const successorCancel = vi . fn ( ) ;
2044- const original = beginChatReplyOperation ( {
2036+ const original = replyRunRegistry . begin ( {
20452037 sessionKey : "agent:main:main" ,
20462038 sessionId : mockState . sessionId ,
20472039 resetTriggered : false ,
@@ -2070,7 +2062,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
20702062 expect ( respond ) . not . toHaveBeenCalled ( ) ;
20712063 expect ( originalQueue ) . not . toHaveBeenCalled ( ) ;
20722064 original . complete ( ) ;
2073- successor = beginChatReplyOperation ( {
2065+ successor = replyRunRegistry . begin ( {
20742066 sessionKey : "agent:main:main" ,
20752067 sessionId : mockState . sessionId ,
20762068 resetTriggered : false ,
@@ -2166,7 +2158,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
21662158 const { context, respond, send } = createChatRequestFixture ( ) ;
21672159 const dispatchCallsBefore = dispatchInboundMessageMock . mock . calls . length ;
21682160 const delivery = createDeferred ( ) ;
2169- const operation = beginChatReplyOperation ( {
2161+ const operation = replyRunRegistry . begin ( {
21702162 sessionKey : "agent:main:main" ,
21712163 sessionId : mockState . sessionId ,
21722164 resetTriggered : false ,
@@ -2216,7 +2208,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
22162208 transcriptCommit : "unconfirmed" ;
22172209 errorMessage : string ;
22182210 } > ( ) ;
2219- const first = beginChatReplyOperation ( {
2211+ const first = replyRunRegistry . begin ( {
22202212 sessionKey : "agent:main:main" ,
22212213 sessionId : mockState . sessionId ,
22222214 resetTriggered : false ,
@@ -2241,7 +2233,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
22412233 } ) ;
22422234 first . complete ( ) ;
22432235 const successorCancel = vi . fn ( ) ;
2244- const successor = beginChatReplyOperation ( {
2236+ const successor = replyRunRegistry . begin ( {
22452237 sessionKey : "agent:main:main" ,
22462238 sessionId : mockState . sessionId ,
22472239 resetTriggered : false ,
@@ -2275,7 +2267,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
22752267 await createGatewayUserTurnSqliteFixture ( "openclaw-chat-send-steer-sync-reject-" ) ;
22762268 const { respond, send } = createChatRequestFixture ( ) ;
22772269 const dispatchCallsBefore = dispatchInboundMessageMock . mock . calls . length ;
2278- const operation = beginChatReplyOperation ( {
2270+ const operation = replyRunRegistry . begin ( {
22792271 sessionKey : "agent:main:main" ,
22802272 sessionId : mockState . sessionId ,
22812273 resetTriggered : false ,
@@ -2316,7 +2308,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
23162308 await createGatewayUserTurnSqliteFixture ( "openclaw-chat-send-steer-run-changed-" ) ;
23172309 const { context, respond, send } = createChatRequestFixture ( ) ;
23182310 const dispatchCallsBefore = dispatchInboundMessageMock . mock . calls . length ;
2319- const operation = beginChatReplyOperation ( {
2311+ const operation = replyRunRegistry . begin ( {
23202312 sessionKey : "agent:main:main" ,
23212313 sessionId : mockState . sessionId ,
23222314 resetTriggered : false ,
@@ -2380,7 +2372,7 @@ describe("chat directive tag stripping for non-streaming final payloads", () =>
23802372 const { context, respond, send } = createChatRequestFixture ( ) ;
23812373 const dispatchCallsBefore = dispatchInboundMessageMock . mock . calls . length ;
23822374 vi . useFakeTimers ( { toFake : [ "Date" ] } ) ;
2383- const operation = beginChatReplyOperation ( {
2375+ const operation = replyRunRegistry . begin ( {
23842376 sessionKey : "agent:main:main" ,
23852377 sessionId : mockState . sessionId ,
23862378 resetTriggered : false ,
0 commit comments