@@ -244,6 +244,7 @@ public struct BoardWidget: Codable, Sendable {
244244 public let position : Int
245245 public let grantstate : AnyCodable
246246 public let revision : Int
247+ public let instanceid : String ?
247248 public let declaredsummary : [ String ] ?
248249 public let frameurl : String ?
249250
@@ -257,6 +258,7 @@ public struct BoardWidget: Codable, Sendable {
257258 position: Int ,
258259 grantstate: AnyCodable ,
259260 revision: Int ,
261+ instanceid: String ? = nil ,
260262 declaredsummary: [ String ] ? = nil ,
261263 frameurl: String ? = nil )
262264 {
@@ -269,6 +271,7 @@ public struct BoardWidget: Codable, Sendable {
269271 self . position = position
270272 self . grantstate = grantstate
271273 self . revision = revision
274+ self . instanceid = instanceid
272275 self . declaredsummary = declaredsummary
273276 self . frameurl = frameurl
274277 }
@@ -283,6 +286,7 @@ public struct BoardWidget: Codable, Sendable {
283286 case position
284287 case grantstate = " grantState "
285288 case revision
289+ case instanceid = " instanceId "
286290 case declaredsummary = " declaredSummary "
287291 case frameurl = " frameUrl "
288292 }
@@ -510,6 +514,40 @@ public struct BoardMcpAppDescriptor: Codable, Sendable {
510514 }
511515}
512516
517+ public struct BoardMcpAppPinDescriptor : Codable , Sendable {
518+ public let viewid : String
519+ public let servername : String
520+ public let toolname : String
521+ public let uiresourceuri : String
522+ public let originsessionkey : String
523+ public let toolcallid : String
524+
525+ public init (
526+ viewid: String ,
527+ servername: String ,
528+ toolname: String ,
529+ uiresourceuri: String ,
530+ originsessionkey: String ,
531+ toolcallid: String )
532+ {
533+ self . viewid = viewid
534+ self . servername = servername
535+ self . toolname = toolname
536+ self . uiresourceuri = uiresourceuri
537+ self . originsessionkey = originsessionkey
538+ self . toolcallid = toolcallid
539+ }
540+
541+ private enum CodingKeys : String , CodingKey {
542+ case viewid = " viewId "
543+ case servername = " serverName "
544+ case toolname = " toolName "
545+ case uiresourceuri = " uiResourceUri "
546+ case originsessionkey = " originSessionKey "
547+ case toolcallid = " toolCallId "
548+ }
549+ }
550+
513551public struct BoardWidgetHtmlContent : Codable , Sendable {
514552 public let kind : String
515553 public let html : String
@@ -546,6 +584,24 @@ public struct BoardWidgetMcpAppContent: Codable, Sendable {
546584 }
547585}
548586
587+ public struct BoardWidgetMcpAppPutContent : Codable , Sendable {
588+ public let kind : String
589+ public let descriptor : BoardMcpAppPinDescriptor
590+
591+ public init (
592+ kind: String ,
593+ descriptor: BoardMcpAppPinDescriptor )
594+ {
595+ self . kind = kind
596+ self . descriptor = descriptor
597+ }
598+
599+ private enum CodingKeys : String , CodingKey {
600+ case kind
601+ case descriptor
602+ }
603+ }
604+
549605public struct BoardCanvasDocumentSource : Codable , Sendable {
550606 public let kind : String
551607 public let docid : String
@@ -635,24 +691,72 @@ public struct BoardWidgetGrantParams: Codable, Sendable {
635691 public let name : String
636692 public let decision : AnyCodable
637693 public let revision : Int
694+ public let instanceid : String ?
638695
639696 public init (
640697 sessionkey: String ,
641698 name: String ,
642699 decision: AnyCodable ,
643- revision: Int )
700+ revision: Int ,
701+ instanceid: String ? = nil )
644702 {
645703 self . sessionkey = sessionkey
646704 self . name = name
647705 self . decision = decision
648706 self . revision = revision
707+ self . instanceid = instanceid
649708 }
650709
651710 private enum CodingKeys : String , CodingKey {
652711 case sessionkey = " sessionKey "
653712 case name
654713 case decision
655714 case revision
715+ case instanceid = " instanceId "
716+ }
717+ }
718+
719+ public struct BoardWidgetAppViewParams : Codable , Sendable {
720+ public let sessionkey : String
721+ public let name : String
722+ public let revision : Int
723+ public let instanceid : String ?
724+
725+ public init (
726+ sessionkey: String ,
727+ name: String ,
728+ revision: Int ,
729+ instanceid: String ? = nil )
730+ {
731+ self . sessionkey = sessionkey
732+ self . name = name
733+ self . revision = revision
734+ self . instanceid = instanceid
735+ }
736+
737+ private enum CodingKeys : String , CodingKey {
738+ case sessionkey = " sessionKey "
739+ case name
740+ case revision
741+ case instanceid = " instanceId "
742+ }
743+ }
744+
745+ public struct BoardWidgetAppViewResult : Codable , Sendable {
746+ public let viewid : String
747+ public let expiresatms : Int
748+
749+ public init (
750+ viewid: String ,
751+ expiresatms: Int )
752+ {
753+ self . viewid = viewid
754+ self . expiresatms = expiresatms
755+ }
756+
757+ private enum CodingKeys : String , CodingKey {
758+ case viewid = " viewId "
759+ case expiresatms = " expiresAtMs "
656760 }
657761}
658762
@@ -1150,7 +1254,7 @@ public struct ErrorShape: Codable, Sendable {
11501254 }
11511255}
11521256
1153- public struct GatewayErrorDetails : Codable , Sendable {
1257+ public struct MissingScopeErrorDetails : Codable , Sendable {
11541258 public let code : String
11551259 public let missingscope : String
11561260 public let requiredscopes : [ String ]
@@ -1172,6 +1276,20 @@ public struct GatewayErrorDetails: Codable, Sendable {
11721276 }
11731277}
11741278
1279+ public struct McpAppViewExpiredErrorDetails : Codable , Sendable {
1280+ public let code : String
1281+
1282+ public init (
1283+ code: String )
1284+ {
1285+ self . code = code
1286+ }
1287+
1288+ private enum CodingKeys : String , CodingKey {
1289+ case code
1290+ }
1291+ }
1292+
11751293public struct GatewaySuspendTaskBlocker : Codable , Sendable {
11761294 public let taskid : String
11771295 public let status : String
@@ -15578,7 +15696,7 @@ public enum BoardWidgetContent: Codable, Sendable {
1557815696
1557915697public enum BoardWidgetPutContent : Codable , Sendable {
1558015698 case html( BoardWidgetHtmlContent )
15581- case mcpApp( BoardWidgetMcpAppContent )
15699+ case mcpApp( BoardWidgetMcpAppPutContent )
1558215700 case canvasDoc( BoardCanvasDocumentSource )
1558315701
1558415702 private enum CodingKeys : String , CodingKey {
@@ -15590,7 +15708,7 @@ public enum BoardWidgetPutContent: Codable, Sendable {
1559015708 let discriminator = try container. decode ( String . self, forKey: . discriminator)
1559115709 switch discriminator {
1559215710 case " html " : self = try . html( BoardWidgetHtmlContent ( from: decoder) )
15593- case " mcp-app " : self = try . mcpApp( BoardWidgetMcpAppContent ( from: decoder) )
15711+ case " mcp-app " : self = try . mcpApp( BoardWidgetMcpAppPutContent ( from: decoder) )
1559415712 case " canvas-doc " : self = try . canvasDoc( BoardCanvasDocumentSource ( from: decoder) )
1559515713 default :
1559615714 throw DecodingError . dataCorruptedError (
@@ -15641,6 +15759,64 @@ public enum BoardCommand: Codable, Sendable {
1564115759 }
1564215760}
1564315761
15762+ public enum GatewayErrorDetails : Codable , Sendable {
15763+ case missingScope( MissingScopeErrorDetails )
15764+ case mcpAppViewExpired( McpAppViewExpiredErrorDetails )
15765+
15766+ public init ( code: String , missingscope: String , requiredscopes: [ String ] ) {
15767+ self = . missingScope(
15768+ MissingScopeErrorDetails (
15769+ code: code,
15770+ missingscope: missingscope,
15771+ requiredscopes: requiredscopes
15772+ )
15773+ )
15774+ }
15775+
15776+ public var code : String {
15777+ switch self {
15778+ case . missingScope( let value) : value. code
15779+ case . mcpAppViewExpired( let value) : value. code
15780+ }
15781+ }
15782+
15783+ public var missingscope : String {
15784+ if case . missingScope( let value) = self { return value. missingscope }
15785+ return " "
15786+ }
15787+
15788+ public var requiredscopes : [ String ] {
15789+ if case . missingScope( let value) = self { return value. requiredscopes }
15790+ return [ ]
15791+ }
15792+
15793+ private enum CodingKeys : String , CodingKey {
15794+ case discriminator = " code "
15795+ }
15796+
15797+ public init ( from decoder: Decoder ) throws {
15798+ let container = try decoder. container ( keyedBy: CodingKeys . self)
15799+ let discriminator = try container. decode ( String . self, forKey: . discriminator)
15800+ switch discriminator {
15801+ case " MISSING_SCOPE " : self = try . missingScope( MissingScopeErrorDetails ( from: decoder) )
15802+ case " MCP_APP_VIEW_EXPIRED " : self = try . mcpAppViewExpired( McpAppViewExpiredErrorDetails ( from: decoder) )
15803+ default :
15804+ throw DecodingError . dataCorruptedError (
15805+ forKey: . discriminator,
15806+ in: container,
15807+ debugDescription: " Unknown GatewayErrorDetails discriminator value "
15808+ )
15809+ }
15810+ }
15811+
15812+ public func encode( to encoder: Encoder ) throws {
15813+ switch self {
15814+ case . missingScope( let value) : try value. encode ( to: encoder)
15815+ case . mcpAppViewExpired( let value) : try value. encode ( to: encoder)
15816+ }
15817+ }
15818+ }
15819+
1564415820public enum GatewaySuspendPrepareResult : Codable , Sendable {
1564515821 case busy( GatewaySuspendPrepareBusyResult )
1564615822 case ready( GatewaySuspendPrepareReadyResult )
0 commit comments