Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
The forge tree held the package scaffolding and none of the generated sources —
2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply
absent, so anything depending on this copy had a package that compiled to
nothing usable.

Generated from the current API document rather than reconciled with the other
copy: a client is a function of the spec, so regenerating answers "which history
wins" without anyone having to choose. .spec-lock records which document, so the
next reader can tell.
2026-08-23 10:04:41 -07:00

86 lines
4.0 KiB
Swift

//
// BuildView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct BuildView: Sendable, Codable, ParameterConvertible, Hashable {
/** Agent is the label the surface that did the work calls itself by. */
public var agent: String?
/** EndedAt is when it finished, same format. Empty means it has not — the build is still going. */
public var endedAt: String?
/** Model is the model that did the work, taken from the FIRST turn whose body names one — a transcript states it, this route does not resolve it. Empty when no turn said. */
public var model: String?
/** Org is the org that published this build, echoed from the URL. It is part of the build's public ADDRESS and not a tenant key — this route is anonymous, and the only rows it can reach are ones an author explicitly published. */
public var org: String?
/** Project is the product's slug, the other half of that address. */
public var project: String?
/** Repo is the repository the work was done in, as the session reported it. */
public var repo: String?
/** Session is the id of the agent session this story IS — the same value a produced commit carries in its `Hanzo-Session:` trailer, which is what ties the repository's history to this page. */
public var session: String?
/** StartedAt is when the session opened, RFC 3339 in UTC. */
public var startedAt: String?
/** Status is the session's own: running, paused, done or error. A build can be read while it is still being written, so this is not always terminal — and an `error` build is still a readable story, not a missing page. */
public var status: String?
/** Title is the human line the session was opened or renamed with. Empty when nobody gave it one. */
public var title: String?
/** Turns is the whole transcript, oldest first, capped at 1000: a published build is a story to read down, not an archive to page. */
public var turns: [BuildTurn]?
/** Verify is the exact command that re-derives every commit binding below straight from git, so nothing here has to be taken on trust. */
public var verify: String?
public init(agent: String? = nil, endedAt: String? = nil, model: String? = nil, org: String? = nil, project: String? = nil, repo: String? = nil, session: String? = nil, startedAt: String? = nil, status: String? = nil, title: String? = nil, turns: [BuildTurn]? = nil, verify: String? = nil) {
self.agent = agent
self.endedAt = endedAt
self.model = model
self.org = org
self.project = project
self.repo = repo
self.session = session
self.startedAt = startedAt
self.status = status
self.title = title
self.turns = turns
self.verify = verify
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case agent
case endedAt
case model
case org
case project
case repo
case session
case startedAt
case status
case title
case turns
case verify
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(agent, forKey: .agent)
try container.encodeIfPresent(endedAt, forKey: .endedAt)
try container.encodeIfPresent(model, forKey: .model)
try container.encodeIfPresent(org, forKey: .org)
try container.encodeIfPresent(project, forKey: .project)
try container.encodeIfPresent(repo, forKey: .repo)
try container.encodeIfPresent(session, forKey: .session)
try container.encodeIfPresent(startedAt, forKey: .startedAt)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(title, forKey: .title)
try container.encodeIfPresent(turns, forKey: .turns)
try container.encodeIfPresent(verify, forKey: .verify)
}
}