Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

104 lines
7.3 KiB
Swift

//
// AgentView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct AgentView: Sendable, Codable, ParameterConvertible, Hashable {
/** Avatar is an image the agent is drawn as — a link to one, or the bytes inline as a data URL, up to 96 KiB. Emoji is the one glyph a caller picked when they had no image. At most one is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is. Both are iam/pkg/schema's Mark, so a face means the same thing on an agent as it does on a person or an org. Avatar is the agent's picture: an image URL, or the image itself inline as a data URL up to 96 KiB. Empty when the agent has no image. */
public var avatar: String?
/** ComputeRef is the visor machine this bot is bound to, opaque here: this package stores and echoes it, and the binding's lifecycle belongs elsewhere. Empty means unbound, which is what every one-shot agent is. */
public var computeRef: String?
/** CreatedAt is when the agent was defined, RFC 3339 in UTC to the second. */
public var createdAt: String?
/** Description is the one line another agent reads when deciding whether to call this one: the tool catalogue publishes it as the description of `agent_<name>`, falling back to \"agent <name>\" when it is empty. It is not part of the prompt — Instructions is — so writing the behaviour here reaches the caller and not the model. */
public var description: String?
/** Emoji is the single glyph a caller picked when they had no image. At most one of avatar and emoji is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is. */
public var emoji: String?
/** ExecutionMode is one-shot or long-running, and it decides who may start this agent. one-shot runs only when something POSTs to it; long-running is additionally invoked by the scheduler on Schedule, once a minute against the cron. An org's long-running agents are capped, so a switch INTO it can be refused with 409. */
public var executionMode: String?
/** ID is the agent's stable handle, minted here as \"agent_\" + 32 hex characters of crypto/rand. A caller cannot choose it, and it never changes — unlike Name, which is the other way to address the same agent. */
public var id: String?
/** Model is the Zen model this agent runs on, and it is always OUR name for it: writes normalize through cloud.ZenModel and the read normalizes again, so an upstream family name never leaves here even from a row written before that rule existed. A create that named none took the deployment's configured default, so this is where a caller learns which model it actually got. */
public var model: String?
/** Name is the agent's org-unique handle, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. It addresses the agent everywhere ID does, it is what a run row records, and it is the suffix of the `agent_<name>` tool other agents call this one by. Set once at create; no update route moves it, because moving it would orphan that history. */
public var name: String?
/** Runs is how many executions the org has recorded against this agent, counted at read time. The list and update reads count the WHOLE history; the detail read reports the size of the RecentRuns page it carries, which stops at 20 — so a detail row saying 20 means \"at least 20\", not \"exactly 20\". */
public var runs: Int64?
/** Schedule is the 5-field cron the scheduler fires a long-running agent on, evaluated once a minute. Required for long-running and DROPPED for one-shot — a one-shot agent's schedule is not stored, so absence here is the mode's answer rather than a value nobody set. */
public var schedule: String?
/** ServiceAccountID is the IAM agent service account (<org>-<agent>) a scheduled run is billed AS. It is what makes an autonomous run attributable to a principal rather than only to the org; empty means the org itself wears the spend. */
public var serviceAccountId: String?
/** Status is the agent's readiness, and today it is \"ready\" on every row: an agent is a definition rather than a provisioned thing, so nothing transitions it. Server-set at create; no route accepts it. */
public var status: String?
/** Tools are the tool names this agent may call, and the list IS the authority: an agent that declares none gets none. The single entry \"*\" means whatever the fleet's MCP server serves at the moment of the run, resolved per run rather than frozen here, which is how the default assistant reaches subsystems that shipped after it was defined. Empty array, never null. */
public var tools: [String]?
/** UpdatedAt is the last time any field above was written, same format. It moves on an update to the DEFINITION and never on a run, so a busy agent nobody has edited keeps an old one. */
public var updatedAt: String?
public init(avatar: String? = nil, computeRef: String? = nil, createdAt: String? = nil, description: String? = nil, emoji: String? = nil, executionMode: String? = nil, id: String? = nil, model: String? = nil, name: String? = nil, runs: Int64? = nil, schedule: String? = nil, serviceAccountId: String? = nil, status: String? = nil, tools: [String]? = nil, updatedAt: String? = nil) {
self.avatar = avatar
self.computeRef = computeRef
self.createdAt = createdAt
self.description = description
self.emoji = emoji
self.executionMode = executionMode
self.id = id
self.model = model
self.name = name
self.runs = runs
self.schedule = schedule
self.serviceAccountId = serviceAccountId
self.status = status
self.tools = tools
self.updatedAt = updatedAt
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case avatar
case computeRef
case createdAt
case description
case emoji
case executionMode
case id
case model
case name
case runs
case schedule
case serviceAccountId
case status
case tools
case updatedAt
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(avatar, forKey: .avatar)
try container.encodeIfPresent(computeRef, forKey: .computeRef)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(emoji, forKey: .emoji)
try container.encodeIfPresent(executionMode, forKey: .executionMode)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(model, forKey: .model)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(runs, forKey: .runs)
try container.encodeIfPresent(schedule, forKey: .schedule)
try container.encodeIfPresent(serviceAccountId, forKey: .serviceAccountId)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(tools, forKey: .tools)
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension AgentView: Identifiable {}