/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CodingStartIn {
/// After names a previous run's session, and starts this one from where that one stopped instead of from the repository's default. It is how a follow-up instruction — \"now add tests for it\" — builds on work already done rather than beginning again on a fresh clone. It sets the base and nothing else, so this run still writes its OWN branch. One run, one branch: a run that wrote back onto an earlier run's branch would break the rule the forge's ref policy is built on, and would leave two turns of work with one name to review. A caller who already knows the branch may pass Base directly; this exists because the branch is derived from a session id and nobody should have to know how. Base wins if both are given.
#[serde(rename = "after", skip_serializing_if = "Option::is_none")]
pub after: Option<String>,
/// AgentRef names a configured agent to run as, which is how an org pins a harness, a model and a prompt to a name. Empty runs the default agent.
#[serde(rename = "agentRef", skip_serializing_if = "Option::is_none")]
pub agent_ref: Option<String>,
/// Base is the branch to start from. Empty takes the repository's default. The run never writes here — it writes the agent branch it answers with.
#[serde(rename = "base", skip_serializing_if = "Option::is_none")]
pub base: Option<String>,
/// Desktop asks for a run with a SCREEN — an image carrying an X server — for a task that has to drive a browser or another windowed program. False, the default, is a headless checkout, which is what writing code needs.
#[serde(rename = "desktop", skip_serializing_if = "Option::is_none")]
pub desktop: Option<bool>,
/// Project scopes the run to one board's work when the org keeps more than one. Empty is the org's default.
#[serde(rename = "project", skip_serializing_if = "Option::is_none")]
pub project: Option<String>,
/// Prompt is the task, in the words you would use with a colleague who has the checkout open. It is the whole instruction: there is no second field for context, and a prompt that names files and the outcome it wants gets a run that does not have to guess either.
#[serde(rename = "prompt", skip_serializing_if = "Option::is_none")]
pub prompt: Option<String>,
/// ReplyChannel / ReplyThread are WHERE THE RUN NARRATES ITSELF, when the surface that started it has somewhere for it to talk. Empty means nobody is listening and the run simply does not narrate — which is the app surface's case, because /v1/agents/coding hands back a session id and the session stream is a better progress feed than any message could be. It is an ADDRESS and not a token: the engine says \"put this text there\", and the process that owns the workspace's bot credential is the one that actually posts. So a run reports into a Slack thread without the engine ever holding the token that could post anywhere else in that workspace.
#[serde(rename = "replyChannel", skip_serializing_if = "Option::is_none")]
pub reply_channel: Option<String>,
/// ReplyThread narrows that address to one THREAD inside the channel: on Slack it is the parent message's ts, the same value a reply carries as thread_ts. Empty puts the run's status line at the top level of the channel instead. The channel is what decides whether a run narrates at all, so this on its own addresses nothing — a thread with no ReplyChannel is a run nobody hears.
#[serde(rename = "replyThread", skip_serializing_if = "Option::is_none")]
pub reply_thread: Option<String>,
/// Repo is what to work on, as `owner/name` in the caller's own org. The engine resolves the clone URL and the push credential from the org itself, so this says WHICH repository and never how to reach it.
#[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
pub repo: Option<String>,
/// TargetID routes the run to a registered machine the org has claimed instead of to a sandbox in our cluster. Empty runs it here, which is the usual case.
#[serde(rename = "targetId", skip_serializing_if = "Option::is_none")]
pub target_id: Option<String>,
/// TimeoutSeconds bounds the whole run. Unset takes the default budget; a run that hits the bound is stopped and reports what it had done by then.
#[serde(rename = "timeoutSeconds", skip_serializing_if = "Option::is_none")]
pub timeout_seconds: Option<i32>,
/// Tool is which harness runs the prompt — dev | claude | codex | python | node — and Desktop is whether the run needs a screen. Both are empty by default, which is `dev` with no screen, and that default is what every caller gets until it says otherwise. They are two fields because they are two questions. The harness decides what argv starts; the screen decides which image carries an X server. A caller may want claude WITH a browser it can see, and a single enum would have made that combination unsayable.
#[serde(rename = "tool", skip_serializing_if = "Option::is_none")]
pub tool: Option<String>,
}
impl CodingStartIn {
pub fn new() -> CodingStartIn {
CodingStartIn {
after: None,
agent_ref: None,
base: None,
desktop: None,
project: None,
prompt: None,
reply_channel: None,
reply_thread: None,
repo: None,
target_id: None,
timeout_seconds: None,
tool: None,
}
}
}