Public declaration syntax from forge-swift/Sources/ForgeComm/AgentMessage.swift Original source SHA-256: e088d2adeb494f8164b1bb6555ea85e7299548b6dd57c95967b7e85cec900d7b Function bodies and constant values are omitted. This is not the complete implementation. Source line 24 public struct AgentCommMessage: Codable, Sendable, Equatable Source line 26 public let id: String /// Correlation ID for linking related messages (request/response pairs). /// /// When a message is a reply, `correlationId` matches the original /// message's `id`. This enables reliable request/response pairing /// across async transports. public let correlationId: String? /// The message ID this message is a reply to. /// /// Used in conjunction with `correlationId` for explicit reply chains. public let replyTo: String? /// The sender agent's DID. public let sender: String /// The recipient agent's DID. public let recipient: String /// The communication protocol identifier. /// /// Examples: `"forge.delegation.v1"`, `"forge.heartbeat.v1"`, /// `"forge.task.v1"`. public let `protocol`: String Source line 33 public let correlationId: String? /// The message ID this message is a reply to. /// /// Used in conjunction with `correlationId` for explicit reply chains. public let replyTo: String? /// The sender agent's DID. public let sender: String /// The recipient agent's DID. public let recipient: String /// The communication protocol identifier. /// /// Examples: `"forge.delegation.v1"`, `"forge.heartbeat.v1"`, /// `"forge.task.v1"`. public let `protocol`: String /// The message type within the protocol. /// /// Examples: `"request"`, `"response"`, `"notification"`, /// `"task_assign"`, `"task_result"`. public let messageType: String /// The message payload. Source line 38 public let replyTo: String? /// The sender agent's DID. public let sender: String /// The recipient agent's DID. public let recipient: String /// The communication protocol identifier. /// /// Examples: `"forge.delegation.v1"`, `"forge.heartbeat.v1"`, /// `"forge.task.v1"`. public let `protocol`: String /// The message type within the protocol. /// /// Examples: `"request"`, `"response"`, `"notification"`, /// `"task_assign"`, `"task_result"`. public let messageType: String /// The message payload. public let payload: JSONValue /// Optional Ed25519 signature over the message content. /// /// When present, the signature covers the canonical JSON serialization Source line 41 public let sender: String /// The recipient agent's DID. public let recipient: String /// The communication protocol identifier. /// /// Examples: `"forge.delegation.v1"`, `"forge.heartbeat.v1"`, /// `"forge.task.v1"`. public let `protocol`: String /// The message type within the protocol. /// /// Examples: `"request"`, `"response"`, `"notification"`, /// `"task_assign"`, `"task_result"`. public let messageType: String /// The message payload. public let payload: JSONValue /// Optional Ed25519 signature over the message content. /// /// When present, the signature covers the canonical JSON serialization /// of (id, correlationId, sender, recipient, protocol, messageType, payload). /// Verification uses the sender's public key from their OAS DID document. public let signature: String? Source line 44 public let recipient: String /// The communication protocol identifier. /// /// Examples: `"forge.delegation.v1"`, `"forge.heartbeat.v1"`, /// `"forge.task.v1"`. public let `protocol`: String /// The message type within the protocol. /// /// Examples: `"request"`, `"response"`, `"notification"`, /// `"task_assign"`, `"task_result"`. public let messageType: String /// The message payload. public let payload: JSONValue /// Optional Ed25519 signature over the message content. /// /// When present, the signature covers the canonical JSON serialization /// of (id, correlationId, sender, recipient, protocol, messageType, payload). /// Verification uses the sender's public key from their OAS DID document. public let signature: String? /// When the message was created. public let timestamp: Timestamp Source line 50 public let `protocol`: String /// The message type within the protocol. /// /// Examples: `"request"`, `"response"`, `"notification"`, /// `"task_assign"`, `"task_result"`. public let messageType: String /// The message payload. public let payload: JSONValue /// Optional Ed25519 signature over the message content. /// /// When present, the signature covers the canonical JSON serialization /// of (id, correlationId, sender, recipient, protocol, messageType, payload). /// Verification uses the sender's public key from their OAS DID document. public let signature: String? /// When the message was created. public let timestamp: Timestamp /// Creates a new agent communication message. /// /// - Parameters: /// - id: Unique message identifier. Defaults to a new UUID. /// - correlationId: Optional correlation ID for request/response pairing. Source line 56 public let messageType: String /// The message payload. public let payload: JSONValue /// Optional Ed25519 signature over the message content. /// /// When present, the signature covers the canonical JSON serialization /// of (id, correlationId, sender, recipient, protocol, messageType, payload). /// Verification uses the sender's public key from their OAS DID document. public let signature: String? /// When the message was created. public let timestamp: Timestamp /// Creates a new agent communication message. /// /// - Parameters: /// - id: Unique message identifier. Defaults to a new UUID. /// - correlationId: Optional correlation ID for request/response pairing. /// - replyTo: Optional message ID this message replies to. /// - sender: The sender agent's DID. /// - recipient: The recipient agent's DID. /// - protocol: The communication protocol identifier. /// - messageType: The message type within the protocol. /// - payload: The message payload. Source line 59 public let payload: JSONValue /// Optional Ed25519 signature over the message content. /// /// When present, the signature covers the canonical JSON serialization /// of (id, correlationId, sender, recipient, protocol, messageType, payload). /// Verification uses the sender's public key from their OAS DID document. public let signature: String? /// When the message was created. public let timestamp: Timestamp /// Creates a new agent communication message. /// /// - Parameters: /// - id: Unique message identifier. Defaults to a new UUID. /// - correlationId: Optional correlation ID for request/response pairing. /// - replyTo: Optional message ID this message replies to. /// - sender: The sender agent's DID. /// - recipient: The recipient agent's DID. /// - protocol: The communication protocol identifier. /// - messageType: The message type within the protocol. /// - payload: The message payload. /// - signature: Optional Ed25519 signature. /// - timestamp: Message creation time. Defaults to now. public init( Source line 66 public let signature: String? /// When the message was created. public let timestamp: Timestamp /// Creates a new agent communication message. /// /// - Parameters: /// - id: Unique message identifier. Defaults to a new UUID. /// - correlationId: Optional correlation ID for request/response pairing. /// - replyTo: Optional message ID this message replies to. /// - sender: The sender agent's DID. /// - recipient: The recipient agent's DID. /// - protocol: The communication protocol identifier. /// - messageType: The message type within the protocol. /// - payload: The message payload. /// - signature: Optional Ed25519 signature. /// - timestamp: Message creation time. Defaults to now. public init( id: String; Source line 69 public let timestamp: Timestamp /// Creates a new agent communication message. /// /// - Parameters: /// - id: Unique message identifier. Defaults to a new UUID. /// - correlationId: Optional correlation ID for request/response pairing. /// - replyTo: Optional message ID this message replies to. /// - sender: The sender agent's DID. /// - recipient: The recipient agent's DID. /// - protocol: The communication protocol identifier. /// - messageType: The message type within the protocol. /// - payload: The message payload. /// - signature: Optional Ed25519 signature. /// - timestamp: Message creation time. Defaults to now. public init( id: String; Source line 84 public init( id: String; Source line 119 public func reply( messageType: String, payload: JSONValue, signature: String?;