mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection was 113 commits behind the document it claims to describe, and `generate.py --all --check` reported every one of the thirteen clients DRIFTED — the same +19 models in each, because they all fell behind the same emission. Regenerated in place from hanzo-inc/cloud openapi.yaml at 939b09d4 (sha256 087024f6…), which is the only description of this API that cannot name a route the binary does not serve. `--check` is clean across all thirteen after. .spec-lock moved with the code. The generator READS that file and never writes it — hanzoai/ci`s lane does — so a hand run leaves every lock naming the previous document. A lock that disagrees with the tree beside it is worse than no lock: the next `--check` without `--spec` fetches what production serves, compares it to a digest that was already wrong, and reports drift that is really staleness.
36 lines
1.5 KiB
Swift
36 lines
1.5 KiB
Swift
//
|
|
// Listing.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Listing: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** LastModified is when the BYTES last changed, as RFC 3339 in UTC to the second — `2026-01-02T03:04:05Z`, the sandbox's own `date -u -r` on the file. It is an mtime and not a creation time, so a file a later run overwrote carries that run's clock. Never empty: a row exists only because `find` stat-ed the file. */
|
|
public var lastModified: String?
|
|
/** Name is the file's IDENTIFIER, `{session_id}/{fileId}` whole — never the bare filename, and never URL-escaped. It is exactly what GET /v1/exec/download takes after its prefix, and hanzo.chat matches it as a PREFIX (`name.startsWith(session + \"/\")`) to decide which rows belong to a session it is holding. `fileId` is the path RELATIVE to the session's artifact directory, so it carries `/` for anything the run wrote in a sub-directory. */
|
|
public var name: String?
|
|
|
|
public init(lastModified: String? = nil, name: String? = nil) {
|
|
self.lastModified = lastModified
|
|
self.name = name
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case lastModified
|
|
case name
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(lastModified, forKey: .lastModified)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
}
|
|
}
|
|
|