mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
61 lines
2.8 KiB
Swift
61 lines
2.8 KiB
Swift
//
|
|
// BuildTurn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct BuildTurn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Actor is who took the turn. A deploy turn's actor is the literal \"deploy\", because nobody took it. */
|
|
public var actor: String?
|
|
/** At is when the turn was recorded, RFC 3339 in UTC to the second. */
|
|
public var at: String?
|
|
/** Body is the readable text of the turn, taken from the stored event's `text`. Empty when the event carried a payload of some other shape — this route reads transcripts and does not invent prose for turns that are not one. */
|
|
public var body: String?
|
|
/** Commit is the full sha this turn produced, empty when the turn changed nothing. It is ECHOED from the transcript, and the authority is the commit itself: it carries the `Hanzo-Session:`/`Hanzo-Turn:` trailer, or a note under refs/notes/hanzo-provenance saying the same, so the claim is checkable at source with the command in `verify`. */
|
|
public var commit: String?
|
|
/** Kind is what the turn was, from the log's closed six: message, tool-call, spawn, log, status, control. A deploy arrives as a `status` turn. */
|
|
public var kind: String?
|
|
/** Subject is that commit's subject line, from the same transcript, so a reader sees what the commit says without fetching the repository. */
|
|
public var subject: String?
|
|
/** Seq is this turn's POSITION in the session's log — monotonic from 1, per session — and it is what a commit's `Hanzo-Turn:` trailer names. It is not a count of anything: the count is `turns` on the summary beside it. */
|
|
public var turn: Int64?
|
|
|
|
public init(actor: String? = nil, at: String? = nil, body: String? = nil, commit: String? = nil, kind: String? = nil, subject: String? = nil, turn: Int64? = nil) {
|
|
self.actor = actor
|
|
self.at = at
|
|
self.body = body
|
|
self.commit = commit
|
|
self.kind = kind
|
|
self.subject = subject
|
|
self.turn = turn
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case actor
|
|
case at
|
|
case body
|
|
case commit
|
|
case kind
|
|
case subject
|
|
case turn
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(actor, forKey: .actor)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(body, forKey: .body)
|
|
try container.encodeIfPresent(commit, forKey: .commit)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(subject, forKey: .subject)
|
|
try container.encodeIfPresent(turn, forKey: .turn)
|
|
}
|
|
}
|
|
|