@@ -196,12 +196,13 @@ struct SmokeRun {
196196 let harness = WooAssistantHeadless (credentials : creds)
197197 for (index, turn) in arg.scenario.turns.enumerated () {
198198 let turnNum = index + 1
199- // `resolveConfirmation` returns Bool meaning "approved" — false
200- // DECLINES the write. If `autoDeclineWrites` is true we must
201- // return false. Getting this inverted means the demo store
202- // actually mutates (destructive writes get approved).
203- let resolver: @Sendable (String , AIToolClassification, String ) -> Bool = { _ , _ , _ in
204- ! turn.autoDeclineWrites
199+ // `resolveConfirmation` returns a `ConfirmationDecision` for each
200+ // pending confirmation. `.decline` blocks the write. If
201+ // `autoDeclineWrites` is true we must return `.decline`. Getting
202+ // this inverted means the demo store actually mutates
203+ // (destructive writes get approved).
204+ let resolver: WooAssistantHeadless.ConfirmationResolver = { _ in
205+ turn.autoDeclineWrites ? .decline : .approve
205206 }
206207 let result: WooAssistantHeadless.ConversationTurnResult
207208 do {
@@ -218,7 +219,7 @@ struct SmokeRun {
218219 static func dump (scenario : Scenario, sample : Int , turn : Int , prompt : String , result : WooAssistantHeadless.ConversationTurnResult) {
219220 let tools = result.toolCalls .map (\.name )
220221 let toolArgs = result.toolCalls .map { " \( $0 .name ) (\( $0 .argumentsJSON .prefix (120 )) )" }
221- let cards = Array (Set (result.cards .map (\.kind . rawValue ))).sorted ().joined (separator : " ," )
222+ let cards = Array (Set (result.cards .map (\.kind ))).sorted ().joined (separator : " ," )
222223 let confirmations = result.confirmations .map { " \( $0 .toolName ) [\( $0 .classification ) ]=\( $0 .decision ) " }
223224 let fail = result.failureMessage ?? " "
224225 let textEscaped = result.assistantText
0 commit comments