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.
51 lines
2.6 KiB
Swift
51 lines
2.6 KiB
Swift
//
|
|
// SessionProgress.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SessionProgress: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Activity is the one line saying what the run is doing right now (\"running the reaper's tests\"), up to 120 characters, in the model's words. Empty when nothing has estimated it yet. */
|
|
public var activity: String?
|
|
/** At is when this was determined, RFC 3339 in UTC to the second. Read it as the estimate's AGE: an estimate is not refreshed while nothing has happened, and a stale one beside a run that is still moving is itself worth seeing. Empty when nothing has estimated it yet. */
|
|
public var at: String?
|
|
/** Estimated says a MODEL produced this, from the run's transcript, and it may be wrong. False means the session's own row said it: a finished run is 100% because it finished, not because anything guessed. Never treat a true here as a measurement — it is the reason to look, not the answer. */
|
|
public var estimated: Bool?
|
|
/** Pct is how much of the run is done, 0 to 100. THE KEY IS ABSENT when progress is indeterminate — a run nobody can estimate is not a run that has done nothing, and rendering the second for the first is the mistake this omission exists to make impossible. Read `phase` before reaching for it. */
|
|
public var pct: Int64?
|
|
/** Phase is what shape the run is in: running, blocked, done, error, or unknown when nothing has estimated it yet. blocked means the transcript shows the run waiting on something — an approval, a credential, an answer — which is the one state the running surface cannot report about itself. error only ever comes from the session's own terminal status. */
|
|
public var phase: String?
|
|
|
|
public init(activity: String? = nil, at: String? = nil, estimated: Bool? = nil, pct: Int64? = nil, phase: String? = nil) {
|
|
self.activity = activity
|
|
self.at = at
|
|
self.estimated = estimated
|
|
self.pct = pct
|
|
self.phase = phase
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case activity
|
|
case at
|
|
case estimated
|
|
case pct
|
|
case phase
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(activity, forKey: .activity)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(estimated, forKey: .estimated)
|
|
try container.encodeIfPresent(pct, forKey: .pct)
|
|
try container.encodeIfPresent(phase, forKey: .phase)
|
|
}
|
|
}
|
|
|