{"openapi":"3.1.0","info":{"title":"Talyn API","version":"1.0.0","description":"Start and drive Talyn sessions from code. Authenticate with a personal access token. See docs/PUBLIC_API.md for the guides."},"servers":[{"url":"https://api.talyn.dev/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A personal access token (`talyn_pat_...`) from Settings → Developer in the Talyn app."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","conflict_error","plan_limit_error","rate_limit_error","payload_too_large_error","unavailable_error","api_error"]},"code":{"type":"string","example":"session_not_found"},"message":{"type":"string"},"param":{"type":"string","description":"The request field the error is about, when there is one."},"request_id":{"type":["string","null"],"example":"req_01JBX8Z6Q4M8N3V5K7T2W9Y1C0"}},"required":["type","code","message","request_id"],"description":"Some errors carry more fields, e.g. `limit` and `in_use` on a plan limit."}},"required":["error"]},"Me":{"type":"object","properties":{"object":{"type":"string","enum":["token"]},"token":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["workspaces:read","repositories:read","repositories:write","sessions:read","sessions:write","memory:read","memory:write","pull_requests:read","pull_requests:write","code_reviews:read","code_reviews:write","webhooks:read","webhooks:write"]}},"workspace_ids":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":200},"description":"The workspaces this token can reach. Null: all of them."},"expires_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["id","name","scopes","workspace_ids","expires_at"]},"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string"}},"required":["id","email"]}},"required":["object","token","user"]},"Workspace":{"type":"object","properties":{"object":{"type":"string","enum":["workspace"]},"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","name","created_at","updated_at"]},"WorkspaceList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"Repository":{"type":"object","properties":{"object":{"type":"string","enum":["repository"]},"id":{"type":"string","minLength":1,"maxLength":200},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"full_name":{"type":"string","example":"acme/app"},"url":{"type":"string"},"default_branch":{"type":"string"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","workspace_id","full_name","url","default_branch","created_at"]},"RepositoryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Repository"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"Chat":{"type":"object","properties":{"object":{"type":"string","enum":["chat"]},"id":{"type":"string","minLength":1,"maxLength":200},"session_id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string"},"agent":{"type":"string","enum":["claude","codex"]},"model":{"type":["string","null"]},"effort":{"type":["string","null"],"enum":["low","medium","high","xhigh","max"]},"plan_mode":{"type":"boolean"},"status":{"type":"string","enum":["idle","running","awaiting_input","error"]},"status_message":{"type":["string","null"]},"turn_count":{"type":"integer"},"queued_message_count":{"type":"integer","description":"Messages waiting for the running turn to end."},"closed_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","session_id","title","agent","model","effort","plan_mode","status","status_message","turn_count","queued_message_count","closed_at","created_at","updated_at"]},"Session":{"type":"object","properties":{"object":{"type":"string","enum":["session"]},"id":{"type":"string","minLength":1,"maxLength":200},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["session","thread"]},"thread_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"The thread this session belongs to, if any."},"repository_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Null for a thread."},"repository_full_name":{"type":["string","null"]},"name":{"type":"string"},"title":{"type":["string","null"]},"branch":{"type":["string","null"],"description":"Null for a thread."},"base_branch":{"type":["string","null"]},"runtime":{"type":"string","enum":["sandbox","local"],"description":"A `local` session runs in the desktop app. The API lists it read-only; actions on it answer 409 `local_runtime`."},"agent":{"type":"string","enum":["claude","codex"]},"model":{"type":["string","null"]},"status":{"type":"string","enum":["provisioning","ready","moving","error","archived","archive_error"]},"status_message":{"type":["string","null"]},"pull_request_id":{"type":["string","null"],"minLength":1,"maxLength":200},"internet_access":{"type":["boolean","null"],"description":"Null: the workspace default."},"auto_create_pr":{"type":["boolean","null"],"description":"Null: the workspace default."},"diff_stat":{"type":["object","null"],"properties":{"added":{"type":"integer"},"removed":{"type":"integer"},"files":{"type":"integer"}},"required":["added","removed","files"],"description":"Null until a diff has been computed once."},"archived_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"chats":{"type":"array","items":{"$ref":"#/components/schemas/Chat"},"description":"The open chats, oldest first. On single-session responses only."}},"required":["object","id","workspace_id","kind","thread_id","repository_id","repository_full_name","name","title","branch","base_branch","runtime","agent","model","status","status_message","pull_request_id","internet_access","auto_create_pr","diff_stat","archived_at","created_at","updated_at"]},"SessionList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"CreateSessionRequest":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"kind":{"type":"string","enum":["session","thread"],"description":"Default `session`. A thread takes no repository or branch."},"repository_id":{"type":"string","minLength":1,"maxLength":200,"description":"Required for a session."},"agent":{"type":"string","enum":["claude","codex"]},"model":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":100000,"description":"The first message. The agent starts on it when the sandbox is ready."},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}$","description":"Lowercase letters, digits and hyphens. Default: made from the prompt."},"base_branch":{"type":"string","minLength":1,"maxLength":250},"branch":{"type":"string","minLength":1,"maxLength":250,"description":"An existing branch to work on. Default: a new branch."},"pull_request_id":{"type":"string","minLength":1,"maxLength":200,"description":"Start from this pull request's head branch and link the session to it."},"thread_id":{"type":"string","minLength":1,"maxLength":200,"description":"Put the new session in this thread."},"internet_access":{"type":"boolean"},"auto_create_pr":{"type":"boolean"}},"required":["agent"],"additionalProperties":false},"CreateChatRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"effort":{"type":"string","enum":["low","medium","high","xhigh","max"]},"plan_mode":{"type":"boolean"}},"additionalProperties":false},"MessageReceipt":{"type":"object","properties":{"object":{"type":"string","enum":["message_receipt"]},"chat_id":{"type":"string","minLength":1,"maxLength":200},"queued":{"type":"boolean","description":"True: the message waits behind a running turn or for the sandbox. False: the turn started now."}},"required":["object","chat_id","queued"]},"SendMessageRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000},"model":{"type":"string","minLength":1,"maxLength":200,"description":"For this turn only."},"effort":{"type":"string","enum":["low","medium","high","xhigh","max"],"description":"For this turn only."},"plan_mode":{"type":"boolean"}},"required":["text"],"additionalProperties":false},"Event":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"chat_id":{"type":"string","minLength":1,"maxLength":200},"seq":{"type":"integer","description":"Position in the chat. Gap-free and increasing."},"turn":{"type":"integer"},"type":{"type":"string","example":"assistant"},"data":{"type":"object","additionalProperties":{},"description":"The agent event, in Claude Code's stream-json format. Codex output is converted to the same format. New fields can appear."}},"required":["object","chat_id","seq","turn","type","data"]},"EventPage":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean","description":"More events exist in the direction you paged."},"first_seq":{"type":["integer","null"]},"last_seq":{"type":["integer","null"],"description":"Pass as `after` for the next page forward."}},"required":["object","data","has_more","first_seq","last_seq"]},"MergeQueueState":{"type":["object","null"],"properties":{"status":{"type":"string","description":"Where the entry is: `queued`, `awaiting_ci`, `awaiting_review`, `automerge_armed`, `awaiting_external`, `awaiting_stack`, `fixing`, `merging`, `blocked` or `blocked_manual`. New values can appear.","example":"awaiting_ci"},"position":{"type":"integer","description":"1-based place in the queue of its repository and base branch."},"method":{"type":"string","enum":["squash","merge","rebase"]},"base_branch":{"type":"string"},"head_sha":{"type":["string","null"],"description":"The head the queue last saw. Null before it has seen one."},"blocked_code":{"type":["string","null"],"description":"Why a `blocked` or `blocked_manual` entry is parked, e.g. `draft`, `no_progress`, `awaiting_human_check`. New values can appear."},"blocked_reason":{"type":["string","null"],"description":"The same reason, in words for a person."},"auto_merge_armed":{"type":"boolean","description":"GitHub's own auto-merge is armed on the pull request."},"external_state":{"type":["string","null"],"description":"The state an external merge queue (trunk.io) reports, when one owns the base branch."},"enqueued_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["status","position","method","base_branch","head_sha","blocked_code","blocked_reason","auto_merge_armed","external_state","enqueued_at"],"description":"The pull request's entry in Talyn's merge queue. Null when it is not queued."},"CodeReviewSummary":{"type":["object","null"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200},"phase":{"type":"string","example":"ready"},"preset":{"type":"string","example":"standard"},"open_count":{"type":"integer","description":"Open findings at or above the workspace reporting bar."},"stale_for_head":{"type":"boolean","description":"The pull request has new commits since the findings were made."},"finished_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["id","phase","preset","open_count","stale_for_head","finished_at"],"description":"The latest code review. Null: never reviewed. On single responses only."},"PullRequest":{"type":"object","properties":{"object":{"type":"string","enum":["pull_request"]},"id":{"type":"string","minLength":1,"maxLength":200},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"repository_id":{"type":"string","minLength":1,"maxLength":200},"repository_full_name":{"type":"string","example":"acme/app"},"number":{"type":"integer"},"title":{"type":["string","null"],"description":"Null until Talyn has read the pull request from GitHub once. So are the other GitHub fields."},"url":{"type":["string","null"]},"author":{"type":["string","null"]},"author_is_bot":{"type":["boolean","null"],"description":"Null: not known."},"state":{"type":"string","enum":["open","closed","merged"]},"draft":{"type":["boolean","null"]},"head_branch":{"type":["string","null"]},"base_branch":{"type":["string","null"]},"head_sha":{"type":["string","null"]},"additions":{"type":["integer","null"]},"deletions":{"type":["integer","null"]},"changed_files":{"type":["integer","null"]},"authored":{"type":"boolean","description":"You opened it. The \"Mine\" bucket in the app."},"review_requested":{"type":"boolean","description":"It waits for your review. The \"Review\" bucket in the app."},"watching":{"type":"boolean","description":"You track it by URL."},"review_hidden_at":{"type":["string","null"],"format":"date-time","description":"When you hid it from the Reviews tab.","example":"2026-11-02T09:30:00.000Z"},"ci_status":{"type":["string","null"],"enum":["none","passing","running","failing_optional","failing_required","needs_human"],"description":"The CI picture alone. `failing_required` includes a failing check whose required-ness is not known. `needs_human`: only gates a person must clear are failing. Null: not computed yet."},"checks":{"type":["object","null"],"properties":{"total":{"type":"integer"},"passed":{"type":"integer"},"failed":{"type":"integer"},"in_progress":{"type":"integer"},"skipped":{"type":"integer"}},"required":["total","passed","failed","in_progress","skipped"]},"human_gates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string","example":"Visual review"},"name":{"type":"string","description":"The failing check or status."},"url":{"type":["string","null"]}},"required":["id","label","name","url"]},"description":"Failing gates only a person can clear, e.g. a visual review."},"blocking_reason":{"type":["string","null"],"description":"The whole merge verdict: `mergeable`, `merge_conflicts`, `changes_requested`, `checks_failed`, `checks_failed_optional`, `blocked`, `behind`, `needs_human`, ... New values can appear."},"mergeable":{"type":["string","null"],"description":"GitHub's answer, lower-cased: `mergeable`, `conflicting` or `unknown`."},"merge_state_status":{"type":["string","null"],"description":"GitHub's merge state, lower-cased, e.g. `clean`, `blocked`, `behind`."},"review_decision":{"type":["string","null"],"description":"`approved`, `changes_requested` or `review_required`, as the app shows it. Where the base branch does not require reviews, Talyn works it out from the reviews."},"unresolved_review_threads":{"type":["integer","null"]},"auto_keep_mergeable":{"type":"boolean","description":"Talyn starts a fix when the pull request stops being mergeable."},"merge_queue":{"$ref":"#/components/schemas/MergeQueueState"},"merged_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"opened_at":{"type":["string","null"],"format":"date-time","description":"When the pull request was opened on GitHub.","example":"2026-11-02T09:30:00.000Z"},"last_synced_at":{"type":"string","format":"date-time","description":"When Talyn last read the pull request from GitHub.","example":"2026-11-02T09:30:00.000Z"},"created_at":{"type":"string","format":"date-time","description":"When Talyn started to track it. Lists are ordered by this.","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"session_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Sessions that work on this pull request and are not archived, most recent first. On single responses only."},"code_review":{"$ref":"#/components/schemas/CodeReviewSummary"}},"required":["object","id","workspace_id","repository_id","repository_full_name","number","title","url","author","author_is_bot","state","draft","head_branch","base_branch","head_sha","additions","deletions","changed_files","authored","review_requested","watching","review_hidden_at","ci_status","checks","human_gates","blocking_reason","mergeable","merge_state_status","review_decision","unresolved_review_threads","auto_keep_mergeable","merge_queue","merged_at","opened_at","last_synced_at","created_at","updated_at"]},"PullRequestList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PullRequest"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"UpdatePullRequestRequest":{"type":"object","properties":{"auto_keep_mergeable":{"type":"boolean"}},"additionalProperties":false},"PullRequestDescription":{"type":"object","properties":{"object":{"type":"string","enum":["pull_request_description"]},"pull_request_id":{"type":"string","minLength":1,"maxLength":200},"body":{"type":["string","null"],"description":"The description as Talyn last read it. Null: not read yet."}},"required":["object","pull_request_id","body"]},"StartPullRequestSessionRequest":{"type":"object","properties":{"agent":{"type":"string","enum":["claude","codex"]},"model":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":100000,"description":"The first message. The agent starts on it when the sandbox is ready."},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}$","description":"Lowercase letters, digits and hyphens. Default: made from the prompt."},"internet_access":{"type":"boolean"}},"required":["agent"],"additionalProperties":false},"MergeQueueEntry":{"allOf":[{"$ref":"#/components/schemas/MergeQueueState"},{"type":"object","properties":{"object":{"type":"string","enum":["merge_queue_entry"]},"pull_request_id":{"type":"string","minLength":1,"maxLength":200},"repository_id":{"type":"string","minLength":1,"maxLength":200},"repository_full_name":{"type":"string"},"number":{"type":"integer"},"title":{"type":["string","null"]}},"required":["object","pull_request_id","repository_id","repository_full_name","number","title"]}]},"MergeQueueList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/MergeQueueEntry"}},"has_more":{"type":"boolean","enum":[false],"description":"Always false: the queue is one page."},"next_cursor":{"type":"null"}},"required":["object","data","has_more","next_cursor"]},"AddToMergeQueueRequest":{"type":"object","properties":{"method":{"type":"string","enum":["squash","merge","rebase"],"description":"How to merge. Default: the last method used for this pull request, else `squash`."}},"additionalProperties":false},"MergeQueueEvent":{"type":"object","properties":{"object":{"type":"string","enum":["merge_queue_event"]},"at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"from_status":{"type":["string","null"]},"to_status":{"type":"string"},"trigger":{"type":"string","example":"user:enqueue"},"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["object","at","from_status","to_status","trigger","code","message"]},"MergeQueueEventList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/MergeQueueEvent"},"description":"Newest first. At most the newest 100."}},"required":["object","data"]},"CodeReviewFinding":{"type":"object","properties":{"object":{"type":"string","enum":["code_review_finding"]},"id":{"type":"string","minLength":1,"maxLength":200},"review_id":{"type":"string","minLength":1,"maxLength":200},"severity":{"type":"string","enum":["blocker","major","minor","nit"]},"category":{"type":"string"},"title":{"type":"string"},"file_path":{"type":"string"},"line_start":{"type":["integer","null"]},"line_end":{"type":["integer","null"]},"anchor_verified":{"type":"boolean","description":"The quoted code is at the place the finding names. False: the reviewer paraphrased or named the wrong place."},"lenses":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"security"},"name":{"type":"string","description":"The name the app shows.","example":"Security"}},"required":["key","name"]},"description":"The reviewers that reported it. Two or more is agreement."},"confidence":{"type":["integer","null"]},"verdict":{"type":"string","enum":["unvalidated","confirmed","rejected","uncertain"],"description":"What the judging pass decided."},"verdict_reason":{"type":["string","null"],"description":"The judge's reason, in one sentence."},"status":{"type":"string","enum":["open","selected","dismissed","fixed","stale"],"description":"`selected`: a fix run works on it now. `stale`: a later review did not find it again. New values can appear."},"dismissed_reason":{"type":["string","null"],"enum":["not_a_problem","already_handled","wont_fix_here","wrong_about_code"]},"seen_count":{"type":"integer","description":"How many review cycles reported it."},"carried_over":{"type":"boolean","description":"An earlier cycle reported it first."},"posted_at":{"type":["string","null"],"format":"date-time","description":"When it was posted to the pull request. A posted finding is never posted again.","example":"2026-11-02T09:30:00.000Z"},"fixed_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"fixed_head_sha":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"body":{"type":"string","description":"The full text. On `GET /code-reviews/{id}/findings/{finding_id}` only."},"suggestion":{"type":["string","null"],"description":"A suggested change, as plain text. Single finding only."},"anchor":{"type":["string","null"],"description":"The code the finding quotes. Single finding only."}},"required":["object","id","review_id","severity","category","title","file_path","line_start","line_end","anchor_verified","lenses","confidence","verdict","verdict_reason","status","dismissed_reason","seen_count","carried_over","posted_at","fixed_at","fixed_head_sha","created_at"]},"CodeReview":{"type":"object","properties":{"object":{"type":"string","enum":["code_review"]},"id":{"type":"string","minLength":1,"maxLength":200},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"pull_request_id":{"type":"string","minLength":1,"maxLength":200},"cycle":{"type":"integer","description":"How many times this pull request has been reviewed. Each new review is a new cycle of the same review."},"preset":{"type":"string","enum":["quick","standard","deep"]},"phase":{"type":"string","description":"`queued`, `preparing`, `reviewing`, `sweeping`, `validating`: in progress. `ready`, `failed`, `cancelled`, `fixing`, `fixed`, `idle`: at rest. New values can appear.","example":"ready"},"phase_plan":{"type":"array","items":{"type":"string"},"description":"The phases this cycle goes through, in order."},"runs_done":{"type":"integer"},"runs_total":{"type":"integer"},"lenses_run":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"security"},"name":{"type":"string","description":"The name the app shows.","example":"Security"}},"required":["key","name"]},"description":"The reviewers that ran in this cycle."},"head_sha":{"type":"string","description":"The commit the current cycle reads."},"reviewed_head_sha":{"type":["string","null"],"description":"The commit the findings belong to."},"stale_for_head":{"type":"boolean","description":"The pull request has new commits since the findings were made."},"counts":{"type":"object","properties":{"blocker":{"type":"integer"},"major":{"type":"integer"},"minor":{"type":"integer"},"nit":{"type":"integer"}},"required":["blocker","major","minor","nit"],"description":"Open findings by severity."},"open_count":{"type":"integer","description":"Open findings at or above the workspace reporting bar. The number the app shows."},"dismissed_count":{"type":"integer"},"funnel":{"type":"object","properties":{"raised":{"type":"integer"},"kept":{"type":"integer"},"rejected":{"type":"integer"}},"required":["raised","kept","rejected"],"description":"What the review did with its candidates: raised, kept by the judge, thrown out."},"failure_reason":{"type":["string","null"]},"deferred_since":{"type":["string","null"],"format":"date-time","description":"Set while a reviewer waits for a free runner.","example":"2026-11-02T09:30:00.000Z"},"started_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"finished_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/CodeReviewFinding"},"description":"Most severe first. Without `body`, `suggestion` and `anchor`. On `GET /code-reviews/{id}` only."}},"required":["object","id","workspace_id","pull_request_id","cycle","preset","phase","phase_plan","runs_done","runs_total","lenses_run","head_sha","reviewed_head_sha","stale_for_head","counts","open_count","dismissed_count","funnel","failure_reason","deferred_since","started_at","finished_at","created_at"]},"CodeReviewList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CodeReview"},"description":"A pull request has at most one review. It holds every cycle."},"has_more":{"type":"boolean","enum":[false]},"next_cursor":{"type":"null"}},"required":["object","data","has_more","next_cursor"]},"StartCodeReviewRequest":{"type":"object","properties":{"preset":{"type":"string","enum":["quick","standard","deep"],"description":"How deep to review. Default: the workspace setting."},"reset":{"type":"boolean","description":"Throw away the findings on record instead of carrying them forward."}},"additionalProperties":false},"CodeReviewEvent":{"type":"object","properties":{"object":{"type":"string","enum":["code_review_event"]},"at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"from_phase":{"type":["string","null"]},"to_phase":{"type":"string"},"trigger":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["object","at","from_phase","to_phase","trigger","code","message"]},"CodeReviewEventList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CodeReviewEvent"},"description":"Newest first. At most the newest 200."}},"required":["object","data"]},"DismissFindingRequest":{"type":"object","properties":{"reason":{"type":"string","enum":["not_a_problem","already_handled","wont_fix_here","wrong_about_code"]}},"additionalProperties":false},"CodeReviewPost":{"type":"object","properties":{"object":{"type":"string","enum":["code_review_post"]},"review_id":{"type":"string","minLength":1,"maxLength":200},"posted":{"type":"integer","description":"Findings written to the pull request."},"inline":{"type":"integer","description":"Of those, comments on a line of the diff."},"in_summary":{"type":"integer","description":"Of those, in the review body."},"review_url":{"type":["string","null"],"description":"The GitHub review."}},"required":["object","review_id","posted","inline","in_summary","review_url"]},"PostCodeReviewRequest":{"type":"object","properties":{"finding_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"The findings to post. Empty or absent: every open finding not posted yet."}},"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_endpoint"]},"id":{"type":"string","minLength":1,"maxLength":200},"workspace_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"The workspace whose events it receives. Null: every workspace of the owner."},"url":{"type":"string","example":"https://example.com/talyn/webhooks"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string","enum":["session.created","session.updated","session.archived","session.pull_request_opened","chat.turn_started","chat.turn_completed","pull_request.updated","pull_request.merged","pull_request.closed","merge_queue.blocked","code_review.completed"]},"description":"The events it receives. Empty: every event."},"enabled":{"type":"boolean"},"disabled_reason":{"type":["string","null"],"description":"Why Talyn or a caller disabled it."},"disabled_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"consecutive_failures":{"type":"integer","description":"Failed attempts since the last success."},"failing_since":{"type":["string","null"],"format":"date-time","description":"The first failed attempt of the current streak.","example":"2026-11-02T09:30:00.000Z"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","workspace_id","url","description","event_types","enabled","disabled_reason","disabled_at","consecutive_failures","failing_since","created_at","updated_at"]},"WebhookEndpointList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"WebhookEndpointWithSecret":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string","description":"The signing secret (`whsec_...`). Shown only in this answer. Store it now.","example":"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"}},"required":["secret"]}]},"CreateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"An https URL on the public internet. Private, loopback and link-local addresses are refused."},"description":{"type":"string","maxLength":500},"workspace_id":{"type":"string","minLength":1,"maxLength":200,"description":"Receive the events of this workspace only. Absent: every workspace of the owner. A token bound to workspaces must name one of them, unless it is bound to exactly one."},"event_types":{"type":"array","items":{"type":"string","enum":["session.created","session.updated","session.archived","session.pull_request_opened","chat.turn_started","chat.turn_completed","pull_request.updated","pull_request.merged","pull_request.closed","merge_queue.blocked","code_review.completed"]},"maxItems":11,"description":"The events to receive. Empty or absent: every event, including events added later."},"enabled":{"type":"boolean","description":"Default true."}},"required":["url"],"additionalProperties":false},"UpdateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"An https URL on the public internet. Private, loopback and link-local addresses are refused."},"description":{"type":["string","null"],"maxLength":500},"event_types":{"type":"array","items":{"type":"string","enum":["session.created","session.updated","session.archived","session.pull_request_opened","chat.turn_started","chat.turn_completed","pull_request.updated","pull_request.merged","pull_request.closed","merge_queue.blocked","code_review.completed"]},"maxItems":11,"description":"The events to receive. Empty or absent: every event, including events added later."},"enabled":{"type":"boolean","description":"False stops deliveries and abandons the pending ones. True clears `disabled_reason` and the failure streak."}},"additionalProperties":false},"RotateWebhookSecretRequest":{"type":"object","properties":{"expire_previous_in_seconds":{"type":"integer","minimum":0,"maximum":259200,"description":"How long the old secret also signs, so you can deploy the new one first. Default 86400 (24 hours). 0 stops it now."}},"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_delivery"]},"id":{"type":"string","minLength":1,"maxLength":200},"endpoint_id":{"type":"string","minLength":1,"maxLength":200},"event_id":{"type":"string","description":"The `webhook-id` header. The same for every attempt and every redelivery."},"event_type":{"type":"string","example":"session.updated"},"status":{"type":"string","enum":["pending","succeeded","failed","abandoned"],"description":"`pending`: waiting for an attempt. `succeeded`: a 2xx answer. `failed`: every attempt failed, or the endpoint answered 410. `abandoned`: the endpoint was disabled first."},"attempt_count":{"type":"integer"},"next_attempt_at":{"type":["string","null"],"format":"date-time","description":"When the next attempt is due. Null unless `pending`.","example":"2026-11-02T09:30:00.000Z"},"last_response_status":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"last_response_ms":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"delivered_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","endpoint_id","event_id","event_type","status","attempt_count","next_attempt_at","last_response_status","last_error","last_response_ms","created_at","delivered_at"]},"WebhookDeliveryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"WebhookDeliveryWithPayload":{"allOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"object","properties":{"payload":{"type":"object","additionalProperties":{},"description":"The event body, as sent."}},"required":["payload"]}]},"WebhookEventType":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_event_type"]},"type":{"type":"string","enum":["session.created","session.updated","session.archived","session.pull_request_opened","chat.turn_started","chat.turn_completed","pull_request.updated","pull_request.merged","pull_request.closed","merge_queue.blocked","code_review.completed"]},"description":{"type":"string"}},"required":["object","type","description"]},"WebhookEventTypeList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"}},"has_more":{"type":"boolean","enum":[false]},"next_cursor":{"type":"null"}},"required":["object","data","has_more","next_cursor"]},"ChangedFile":{"type":"object","properties":{"path":{"type":"string"},"old_path":{"type":["string","null"],"description":"The path on the base side of a rename. Null otherwise."},"status":{"type":"string","enum":["added","modified","deleted","renamed"]},"added":{"type":"integer"},"removed":{"type":"integer"},"binary":{"type":"boolean"}},"required":["path","old_path","status","added","removed","binary"]},"DiffStat":{"type":"object","properties":{"added":{"type":"integer"},"removed":{"type":"integer"},"files":{"type":"integer"}},"required":["added","removed","files"]},"SessionChanges":{"type":"object","properties":{"object":{"type":"string","enum":["session_changes"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"files":{"type":"array","items":{"$ref":"#/components/schemas/ChangedFile"},"description":"Every change against the merge base: committed, uncommitted and untracked."},"uncommitted":{"type":"array","items":{"$ref":"#/components/schemas/ChangedFile"},"description":"Changes not committed yet, untracked files included."},"committed":{"type":"array","items":{"$ref":"#/components/schemas/ChangedFile"},"description":"Commits on the branch since the merge base."},"uncommitted_stat":{"$ref":"#/components/schemas/DiffStat"},"committed_stat":{"$ref":"#/components/schemas/DiffStat"},"base_sha":{"type":["string","null"],"description":"The merge-base commit the diff is taken against."},"head_sha":{"type":["string","null"]},"snapshot_at":{"type":["string","null"],"format":"date-time","description":"Set when the list is the stored copy of a sleeping sandbox: when Talyn took it. Null on a live read.","example":"2026-11-02T09:30:00.000Z"}},"required":["object","session_id","files","uncommitted","committed","uncommitted_stat","committed_stat","base_sha","head_sha","snapshot_at"]},"SessionDiff":{"type":"object","properties":{"object":{"type":"string","enum":["diff"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"path":{"type":["string","null"],"description":"The file the diff is limited to. Null: the whole diff."},"scope":{"type":"string","enum":["combined","uncommitted","committed"]},"patch":{"type":"string","description":"A unified diff, as `git diff` writes it. Untracked files are diffs against /dev/null."},"source":{"type":"string","enum":["live","stored","github"],"description":"`live`: read from the sandbox now. `stored`: the copy Talyn stored while the sandbox ran. `github`: read from GitHub."},"snapshot_at":{"type":["string","null"],"format":"date-time","description":"When the stored copy was taken. Null on a live read.","example":"2026-11-02T09:30:00.000Z"}},"required":["object","session_id","path","scope","patch","source","snapshot_at"]},"FileList":{"type":"object","properties":{"object":{"type":"string","enum":["file_list"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"paths":{"type":"array","items":{"type":"string"},"description":"Tracked and untracked files. Files that git ignores are not listed."},"source":{"type":"string","enum":["live","stored","github"],"description":"`live`: read from the sandbox now. `stored`: the copy Talyn stored while the sandbox ran. `github`: read from GitHub."},"snapshot_at":{"type":["string","null"],"format":"date-time","description":"When the stored copy was taken. Null on a live read.","example":"2026-11-02T09:30:00.000Z"}},"required":["object","session_id","paths","source","snapshot_at"]},"FileContent":{"type":"object","properties":{"object":{"type":"string","enum":["file_content"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"path":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"],"description":"`base64` for a binary file."},"content":{"type":"string"},"source":{"type":"string","enum":["live","stored","github"],"description":"`live`: read from the sandbox now. `stored`: the copy Talyn stored while the sandbox ran. `github`: read from GitHub."},"snapshot_at":{"type":["string","null"],"format":"date-time","description":"When the stored copy was taken. Null on a live read.","example":"2026-11-02T09:30:00.000Z"}},"required":["object","session_id","path","encoding","content","source","snapshot_at"]},"Script":{"type":"object","properties":{"object":{"type":"string","enum":["script"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","description":"`setup`, `run`, `archive`, or the name of a named run script."},"kind":{"type":"string","enum":["setup","run","archive"]},"command":{"type":["string","null"],"description":"Null unless the list was read with `live=true`."},"default":{"type":["boolean","null"],"description":"For a run script read with `live=true`: whether `run` starts it. Null otherwise."},"status":{"type":"string","enum":["running","exited","not_started"]},"exit_code":{"type":["integer","null"],"description":"Null while it runs, before it ran, or when it was stopped."}},"required":["object","session_id","name","kind","command","default","status","exit_code"]},"ScriptList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Script"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"ScriptOutput":{"type":"object","properties":{"object":{"type":"string","enum":["script_output"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string"},"status":{"type":"string","enum":["running","exited","not_started"]},"exit_code":{"type":["integer","null"]},"output":{"type":"string","description":"The end of the output, stdout and stderr together, at most 64 KiB."}},"required":["object","session_id","name","status","exit_code","output"]},"Preview":{"type":"object","properties":{"object":{"type":"string","enum":["preview"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"port":{"type":"integer"},"label":{"type":["string","null"]},"primary":{"type":"boolean"},"origin":{"type":["string","null"],"description":"The hosted preview origin, once a link was made for this port. A browser needs a link from POST /sessions/{id}/previews to open it."}},"required":["object","session_id","port","label","primary","origin"]},"PreviewList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Preview"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"PreviewLink":{"type":"object","properties":{"object":{"type":"string","enum":["preview_link"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"port":{"type":"integer"},"url":{"type":"string","description":"A one-time sign-in link. Open it in a browser before `expires_at`."},"origin":{"type":"string"},"expires_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","session_id","port","url","origin","expires_at"]},"CreatePreviewLinkRequest":{"type":"object","properties":{"port":{"type":"integer","minimum":1024,"maximum":65535}},"required":["port"],"additionalProperties":false},"PullRequestReceipt":{"type":"object","properties":{"object":{"type":"string","enum":["pull_request_receipt"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"number":{"type":"integer"},"url":{"type":"string"},"existing":{"type":"boolean","description":"True: a pull request from this branch was already open, and the session is now linked to it."},"session":{"$ref":"#/components/schemas/Session"}},"required":["object","session_id","number","url","existing","session"]},"CreatePullRequestRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":256},"body":{"type":"string","maxLength":65536},"base":{"type":"string","minLength":1,"maxLength":250,"description":"Default: the session's base branch."},"draft":{"type":"boolean"},"commit_message":{"type":"string","maxLength":65536,"description":"For the commit of uncommitted changes. Default: the title."}},"required":["title"],"additionalProperties":false},"ActionReceipt":{"type":"object","properties":{"object":{"type":"string","enum":["action_receipt"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"action":{"type":"string","enum":["fix_checks","resolve_conflicts","address_review","merge"]},"chat_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"The chat that got the prompt. Null for `merge`."}},"required":["object","session_id","action","chat_id"]},"SessionActionRequest":{"type":"object","properties":{"chat_id":{"type":"string","minLength":1,"maxLength":200,"description":"The chat that gets the prompt. Default: the latest chat, or a new one."}},"additionalProperties":false},"ContinueAsThreadRequest":{"type":"object","properties":{"agent":{"type":"string","enum":["claude","codex"],"description":"Default: the session's agent."},"model":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":100000,"description":"Sent after the recap of the session's chat."}},"additionalProperties":false},"SessionTiming":{"type":"object","properties":{"object":{"type":"string","enum":["session_timing"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"turns":{"type":"integer"},"wall_ms":{"type":"integer"},"tool_ms":{"type":"integer","description":"Wall time covered by at least one tool call."},"model_ms":{"type":"integer","description":"Wall time that no tool call covers."},"calls":{"type":"integer"},"categories":{"type":"object","properties":{"model":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"tests":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"installs":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"builds":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"services":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"waiting":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"git":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"reading":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]},"other":{"type":"object","properties":{"ms":{"type":"integer"},"count":{"type":"integer"}},"required":["ms","count"]}},"description":"Sums per category. Parallel calls can add up to more than the wall time."},"slowest":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["model","tests","installs","builds","services","waiting","git","reading","other"]},"name":{"type":"string"},"command":{"type":["string","null"],"description":"Shortened, with secrets replaced by `***`."},"ms":{"type":"integer"},"is_error":{"type":"boolean"}},"required":["category","name","command","ms","is_error"]}},"recent_turns":{"type":"array","items":{"type":"object","properties":{"chat_id":{"type":"string","minLength":1,"maxLength":200},"turn":{"type":"integer"},"wall_ms":{"type":"integer"},"tool_ms":{"type":"integer"},"model_ms":{"type":"integer"},"calls":{"type":"integer"},"at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["chat_id","turn","wall_ms","tool_ms","model_ms","calls","at"]},"description":"Newest first."}},"required":["object","session_id","turns","wall_ms","tool_ms","model_ms","calls","categories","slowest","recent_turns"]},"ResizeReceipt":{"type":"object","properties":{"object":{"type":"string","enum":["resize_receipt"]},"session_id":{"type":"string","minLength":1,"maxLength":200},"outcome":{"type":"string","enum":["unchanged","after_turn","moving"],"description":"`moving`: the move started. `after_turn`: it starts when the running turn ends. `unchanged`: the sandbox has this size."},"size":{"type":"string","enum":["small","standard","medium","large","xlarge"]},"remembered_for_repository":{"type":"boolean"},"continued":{"type":"boolean","description":"The `continue_with` message went to a chat."}},"required":["object","session_id","outcome","size","remembered_for_repository","continued"]},"ResizeSessionRequest":{"type":"object","properties":{"size":{"type":"string","enum":["small","standard","medium","large","xlarge"]},"reason":{"type":"string","maxLength":500,"description":"Why, in one sentence. The transcript shows it."},"remember_for_repository":{"type":"boolean","description":"Also use this size for new sessions on the repository."},"continue_with":{"type":"string","minLength":1,"maxLength":100000,"description":"A message for the chat. The next turn starts on the new sandbox."}},"required":["size"],"additionalProperties":false},"SessionReadiness":{"type":"object","properties":{"object":{"type":"string","enum":["session_readiness"]},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"ok":{"type":"boolean","description":"True when this workspace can start a sandbox session now."},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"agents":{"type":"object","properties":{"claude":{"type":"object","properties":{"ok":{"type":"boolean"},"reason":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","reason"]},"codex":{"type":"object","properties":{"ok":{"type":"boolean"},"reason":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","reason"]}},"required":["claude","codex"]}},"required":["object","workspace_id","ok","reasons","agents"]},"UpdateChatRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"model":{"type":["string","null"],"maxLength":200,"description":"Null: the session's model."},"effort":{"type":["string","null"],"enum":["low","medium","high","xhigh","max"]},"plan_mode":{"type":"boolean"}},"additionalProperties":false},"QueuedMessage":{"type":"object","properties":{"object":{"type":"string","enum":["queued_message"]},"id":{"type":"string","minLength":1,"maxLength":200},"chat_id":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string"},"model":{"type":["string","null"]},"effort":{"type":["string","null"]},"plan_mode":{"type":["boolean","null"]},"attachment_count":{"type":"integer"},"origin":{"type":"string","enum":["user","talyn"],"description":"`talyn`: Talyn wrote it, e.g. to wake a thread."},"queued_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","chat_id","text","model","effort","plan_mode","attachment_count","origin","queued_at"]},"QueuedMessageList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/QueuedMessage"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"Checkpoint":{"type":"object","properties":{"object":{"type":"string","enum":["checkpoint"]},"chat_id":{"type":"string","minLength":1,"maxLength":200},"turn":{"type":"integer","description":"Restoring it puts the files back as they were before this turn."},"sha":{"type":"string"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","chat_id","turn","sha","created_at"]},"CheckpointList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Checkpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"Memory":{"type":"object","properties":{"object":{"type":"string","enum":["memory"]},"id":{"type":"string","minLength":1,"maxLength":200},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["workspace","repository","thread"],"description":"`workspace`: every session. `repository`: sessions on one repository. `thread`: one thread."},"repository_id":{"type":["string","null"],"minLength":1,"maxLength":200},"thread_id":{"type":["string","null"],"minLength":1,"maxLength":200},"type":{"type":"string","enum":["user","feedback","project","reference"]},"name":{"type":"string"},"description":{"type":"string","description":"One line. Sessions see the name and the description in their memory index."},"body":{"type":"string","description":"The note. On single-entry responses, and on lists with `include_body=true`."},"bytes":{"type":"integer"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["user","session","auto"]},"session_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"The session that wrote the entry, for `kind: \"session\"`."}},"required":["kind","session_id"]},"forgotten_at":{"type":["string","null"],"format":"date-time","description":"Set when the entry was forgotten. Restore it to use it again.","example":"2026-11-02T09:30:00.000Z"},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","id","workspace_id","scope","repository_id","thread_id","type","name","description","bytes","source","forgotten_at","created_at","updated_at"]},"MemoryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Memory"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["object","data","has_more","next_cursor"]},"CreateMemoryRequest":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"scope":{"type":"string","enum":["workspace","repository","thread"]},"repository_id":{"type":"string","minLength":1,"maxLength":200,"description":"Required for `scope: \"repository\"`."},"thread_id":{"type":"string","minLength":1,"maxLength":200,"description":"Required for `scope: \"thread\"`."},"type":{"type":"string","enum":["user","feedback","project","reference"]},"name":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"description":"At most 8192 bytes of UTF-8."}},"required":["scope","type","name","description","body"],"additionalProperties":false},"UpdateMemoryRequest":{"type":"object","properties":{"type":{"type":"string","enum":["user","feedback","project","reference"]},"name":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"description":"At most 8192 bytes of UTF-8."}},"additionalProperties":false},"RepositorySettings":{"type":"object","properties":{"object":{"type":"string","enum":["repository_settings"]},"repository_id":{"type":"string","minLength":1,"maxLength":200},"sandbox_size":{"type":"object","properties":{"setting":{"type":"string","enum":["auto","small","standard","medium","large","xlarge"],"description":"`auto`: the detected size, else `standard`."},"detected":{"type":["string","null"],"enum":["small","standard","medium","large","xlarge"],"description":"Read from the repository's compose files. Null until detected."},"detected_reason":{"type":["string","null"]},"effective":{"type":"string","enum":["small","standard","medium","large","xlarge"],"description":"What a new session gets."}},"required":["setting","detected","detected_reason","effective"]},"preview":{"type":"object","properties":{"target":{"type":"string","enum":["auto","sandbox","coder","off"],"description":"Your choice. `auto`: from `.talyn/settings.toml`, else detected."},"ports":{"type":["array","null"],"items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"label":{"type":["string","null"],"maxLength":500},"primary":{"type":"boolean"}},"required":["port","label","primary"]},"description":"Your choice. Null: from the file, else detected."},"coder":{"type":["object","null"],"properties":{"url":{"type":"string","maxLength":500},"workspace":{"type":"string","maxLength":500},"checkout":{"type":"string","maxLength":500},"run":{"type":"string","maxLength":500}}},"effective":{"type":"object","properties":{"target":{"type":["string","null"],"enum":["sandbox","coder","off"]},"ports":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"label":{"type":["string","null"],"maxLength":500},"primary":{"type":"boolean"}},"required":["port","label","primary"]}},"source":{"type":"string","enum":["user","file","detected","none"]}},"required":["target","ports","source"]}},"required":["target","ports","coder","effective"]},"setup_learning":{"type":"boolean","description":"Talyn learns setup steps from sessions and runs them on new sandboxes."}},"required":["object","repository_id","sandbox_size","preview","setup_learning"]},"UpdateRepositorySettingsRequest":{"type":"object","properties":{"sandbox_size":{"type":"string","enum":["auto","small","standard","medium","large","xlarge"]},"preview":{"type":"object","properties":{"target":{"type":"string","enum":["auto","sandbox","coder","off"]},"ports":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"label":{"type":"string","maxLength":500},"primary":{"type":"boolean"}},"required":["port"],"additionalProperties":false},"maxItems":16},"coder":{"type":"object","properties":{"url":{"type":"string","maxLength":500},"workspace":{"type":"string","maxLength":500},"checkout":{"type":"string","maxLength":500},"run":{"type":"string","maxLength":500}},"additionalProperties":false}},"additionalProperties":false},"setup_learning":{"type":"boolean"}},"additionalProperties":false},"RepositoryInstructions":{"type":"object","properties":{"object":{"type":"string","enum":["repository_instructions"]},"repository_id":{"type":"string","minLength":1,"maxLength":200},"agents":{"type":"string","enum":["claude","codex","both"],"description":"Which agents get the text: `claude`, `codex` or `both`."},"body":{"type":"string"},"bytes":{"type":"integer"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["object","repository_id","agents","body","bytes","updated_at"]},"PutRepositoryInstructionsRequest":{"type":"object","properties":{"body":{"type":"string","minLength":1,"description":"Markdown, at most 65536 bytes of UTF-8."},"agents":{"type":"string","enum":["claude","codex","both"]}},"required":["body","agents"],"additionalProperties":false},"SetupListStep":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"repository_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Null: a workspace step."},"position":{"type":"integer"},"name":{"type":"string"},"command":{"type":"string"},"kind":{"type":"string","description":"For example `apt`, `node`, `service` or `other`. New values can appear."},"run_on":{"type":"string","enum":["image","box","both"],"description":"`image`: the step goes into the image. `box`: the step runs on each new box. `both`: the step goes into the image and runs again on each box."},"origin":{"type":"string","enum":["user","learned","agent"],"description":"`user`: a person wrote the step. `learned`: Talyn learned it from a session. `agent`: an agent recorded it."},"status":{"type":"string","enum":["active","suggested","dismissed","disabled"],"description":"`active`: the step runs. `suggested`: Talyn learned the step and it does not run until it is accepted. `dismissed`: a person dismissed it, and Talyn does not suggest it again. `disabled`: it failed on too many boxes in a row and does not run until a person retries it."},"status_reason":{"type":["string","null"],"description":"Why the step has its status."},"status_changed_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"accepted_by":{"type":["string","null"],"enum":["person","talyn"],"description":"`person`: Talyn never removes the step. `talyn`: the frequency rule accepted it, and Talyn removes it when few sessions need it."},"timeout_sec":{"type":["integer","null"]},"box_only_reason":{"type":["string","null"],"description":"The step reads a secret, so it runs only on the box."},"why":{"type":["string","null"]},"source_session_id":{"type":["string","null"],"minLength":1,"maxLength":200},"seen_count":{"type":"integer"},"session_count":{"type":"integer","description":"The different sessions that needed the step."},"first_seen_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"last_seen_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"confirmed_at":{"type":["string","null"],"format":"date-time","description":"When the step was accepted.","example":"2026-11-02T09:30:00.000Z"},"image_applied_at":{"type":["string","null"],"format":"date-time","description":"When the step went into the image. Null: not yet.","example":"2026-11-02T09:30:00.000Z"},"image_failed_at":{"type":["string","null"],"format":"date-time","description":"The step failed in an image build. It runs on the box instead.","example":"2026-11-02T09:30:00.000Z"},"image_failure_reason":{"type":["string","null"]},"box_failure_count":{"type":"integer","description":"Box setups in a row where the step failed."},"box_last_failure":{"type":["string","null"]},"last_duration_ms":{"type":["integer","null"]},"typical_duration_ms":{"type":["integer","null"]},"measured_boxes":{"type":"integer"},"recent_needed_sessions":{"type":"integer","description":"Learned steps only: the recent sessions that needed the step."},"recent_sessions":{"type":"integer","description":"Learned steps only: the repository's sandbox sessions of the last `window_days` days."},"share":{"type":["number","null"],"description":"`recent_needed_sessions / recent_sessions`, 0 to 1."},"heavy":{"type":"boolean"},"verdict_reason":{"type":"string","description":"The frequency rule's reason, for a learned step."},"created_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"}},"required":["id","repository_id","position","name","command","kind","run_on","origin","status","status_reason","status_changed_at","accepted_by","timeout_sec","box_only_reason","why","source_session_id","seen_count","session_count","first_seen_at","last_seen_at","confirmed_at","image_applied_at","image_failed_at","image_failure_reason","box_failure_count","box_last_failure","last_duration_ms","typical_duration_ms","measured_boxes","created_at","updated_at"]},"BoxSetupTiming":{"type":["object","null"],"properties":{"total_ms":{"type":"integer","description":"The whole setup script."},"repository_ms":{"type":["integer","null"],"description":"The repository's own setup command. Null: the repository has none."},"learned_ms":{"type":"integer","description":"All setup steps together."},"measured_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"session_id":{"type":["string","null"],"minLength":1,"maxLength":200},"box_ready_ms":{"type":["integer","null"],"description":"From the create request until the sandbox was ready."},"checkout_ms":{"type":["integer","null"],"description":"The checkout of the repository."},"setup_repository_ms":{"type":["integer","null"],"description":"The repository's own setup on the box."},"setup_box_steps_ms":{"type":["integer","null"],"description":"The setup steps that ran on the box."},"layer":{"type":["string","null"],"description":"The image the box started from: `base`, `legacy`, `repo` or `user`."}},"required":["total_ms","repository_ms","learned_ms","measured_at","session_id"]},"RepositorySetup":{"type":"object","properties":{"object":{"type":"string","enum":["repository_setup"]},"repository_id":{"type":"string","minLength":1,"maxLength":200},"learning":{"type":"boolean","description":"Talyn learns setup steps from sessions and suggests them."},"window_days":{"type":"integer"},"max_learned_steps":{"type":"integer"},"limits":{"type":"object","properties":{"image_max_steps":{"type":"integer"},"image_total_sec":{"type":"integer"},"max_hosts":{"type":"integer"},"max_user_steps":{"type":"integer"},"step_max_sec":{"type":"integer"}},"required":["image_max_steps","image_total_sec","max_hosts","max_user_steps","step_max_sec"]},"repo_setup":{"type":"object","properties":{"command":{"type":["string","null"],"description":"The repository's own setup command, as the newest box read it."},"source":{"type":["string","null"]},"read_at":{"type":["string","null"],"format":"date-time","example":"2026-11-02T09:30:00.000Z"},"run_on_box":{"type":"string","enum":["always","moved","never"],"description":"`moved`: only when the checkout is not the commit of the image."}},"required":["command","source","read_at","run_on_box"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/SetupListStep"},"description":"The steps in order. Dismissed steps come last."},"hosts":{"type":"array","items":{"type":"string"},"description":"Extra hosts that the image build can reach."},"image":{"type":["object","null"],"properties":{"layer":{"type":["string","null"]},"repo_commit":{"type":["string","null"]},"repo_layer_pending":{"type":["boolean","null"]},"user_layer_pending":{"type":["boolean","null"]},"repo_setup_ok":{"type":["boolean","null"]},"applied_step_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"checked_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"session_id":{"type":["string","null"],"minLength":1,"maxLength":200}},"required":["layer","repo_commit","repo_layer_pending","user_layer_pending","repo_setup_ok","applied_step_ids","checked_at","session_id"],"description":"What the newest box of the repository was told about its images."},"last_setup_timing":{"$ref":"#/components/schemas/BoxSetupTiming"},"timing_history":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BoxSetupTiming"},{"type":"object"}]},"description":"The newest box setups, newest first."}},"required":["object","repository_id","learning","window_days","max_learned_steps","limits","repo_setup","steps","hosts","image","last_setup_timing","timing_history"]},"PutRepositorySetupRequest":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"An existing step. No id: a new step of your own."},"name":{"type":"string","minLength":1,"maxLength":128},"command":{"type":"string","description":"Required for a new step. The command of a learned step cannot change."},"run_on":{"type":"string","enum":["image","box","both"]},"timeout_sec":{"type":["integer","null"]}},"required":["name","run_on"],"additionalProperties":false},"description":"The whole list in its new order. Your own step that is not in the list is deleted. A learned step that is not in the list keeps its status and goes last: to remove it, dismiss it."},"run_on_box":{"type":"string","enum":["always","moved","never"]},"hosts":{"type":"array","items":{"type":"string"}},"learning":{"type":"boolean"}},"additionalProperties":false},"WorkspaceSandboxSetup":{"type":"object","properties":{"object":{"type":"string","enum":["workspace_sandbox_setup"]},"workspace_id":{"type":"string","minLength":1,"maxLength":200},"dotfiles":{"type":["object","null"],"properties":{"slug":{"type":"string","description":"`owner/name`."},"ref":{"type":"string","description":"A branch, tag or commit. Empty: the default branch."},"install":{"type":["string","null"],"description":"The install command. Null: Talyn looks for a known install script."}},"required":["slug","ref","install"]},"hosts":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"$ref":"#/components/schemas/SetupListStep"},"description":"The workspace's steps. They go before each repository's steps."},"limits":{"type":"object","properties":{"image_max_steps":{"type":"integer"},"image_total_sec":{"type":"integer"},"max_hosts":{"type":"integer"},"max_user_steps":{"type":"integer"},"step_max_sec":{"type":"integer"}},"required":["image_max_steps","image_total_sec","max_hosts","max_user_steps","step_max_sec"]}},"required":["object","workspace_id","dotfiles","hosts","steps","limits"]},"PutWorkspaceSandboxSetupRequest":{"type":"object","properties":{"dotfiles":{"type":["object","null"],"properties":{"slug":{"type":"string"},"ref":{"type":"string"},"install":{"type":["string","null"]}},"required":["slug"],"additionalProperties":false,"description":"Null: no dotfiles."},"hosts":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"An existing step. No id: a new step of your own."},"name":{"type":"string","minLength":1,"maxLength":128},"command":{"type":"string","description":"Required for a new step. The command of a learned step cannot change."},"run_on":{"type":"string","enum":["image","box","both"]},"timeout_sec":{"type":["integer","null"]}},"required":["name","run_on"],"additionalProperties":false},"description":"The whole list in its new order. A step that is not in the list is deleted."}},"additionalProperties":false},"SetupTiming":{"type":["object","null"],"properties":{"total_ms":{"type":"integer","description":"The whole setup script."},"repository_ms":{"type":["integer","null"],"description":"The repository's own setup command. Null: the repository has none."},"learned_ms":{"type":"integer","description":"All learned steps together."},"measured_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"session_id":{"type":["string","null"],"minLength":1,"maxLength":200}},"required":["total_ms","repository_ms","learned_ms","measured_at","session_id"],"description":"The times of the newest box setup that ran learned steps."},"SetupStep":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"command":{"type":"string"},"kind":{"type":"string","description":"For example `package_install`, `service` or `database`. New values can appear."},"phase":{"type":"string","enum":["install","start"],"description":"`install` steps also go into the baked image."},"why":{"type":["string","null"]},"source":{"type":"string","enum":["learned","agent"]},"state":{"type":"string","enum":["waiting","live","failing","reverted"],"description":"`waiting`: too few of the repository's recent sessions need it, so it does not run (see `state_reason`). `live`: runs on every new box. `failing`: failed on 2 boxes in a row and does not run. `reverted`: a person reverted it."},"source_session_id":{"type":["string","null"],"minLength":1,"maxLength":200},"seen_count":{"type":"integer"},"session_count":{"type":"integer","description":"The different sessions that needed the step."},"first_seen_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"last_seen_at":{"type":"string","format":"date-time","example":"2026-11-02T09:30:00.000Z"},"applied_at":{"type":["string","null"],"format":"date-time","description":"When the step went into the baked image.","example":"2026-11-02T09:30:00.000Z"},"reverted_at":{"type":["string","null"],"format":"date-time","description":"A person reverted the step. Talyn does not learn it again.","example":"2026-11-02T09:30:00.000Z"},"reverted_reason":{"type":["string","null"]},"box_failure_count":{"type":"integer","description":"Box setups in a row where the step failed."},"box_last_failure":{"type":["string","null"],"description":"The exit code or time limit, and the last line the step printed."},"box_disabled_at":{"type":["string","null"],"format":"date-time","description":"The step failed on too many boxes and no longer runs.","example":"2026-11-02T09:30:00.000Z"},"box_disabled_reason":{"type":["string","null"]},"recent_needed_sessions":{"type":"integer","description":"The repository's sandbox sessions of the last `window_days` days that needed the step: they ran it, or used what a live step installs."},"recent_sessions":{"type":"integer","description":"The repository's sandbox sessions of the last `window_days` days."},"share":{"type":["number","null"],"description":"`recent_needed_sessions / recent_sessions`, 0 to 1. Null: no recent sessions."},"heavy":{"type":"boolean","description":"The step installs a browser or a large package set, so it needs a higher share to run."},"state_reason":{"type":"string","description":"Why the step is in its state, for example \"Waiting: needed by 2 of 31 sessions in the last 14 days. ...\""},"last_duration_ms":{"type":["integer","null"],"description":"How long the step took in the newest box setup that measured it."},"typical_duration_ms":{"type":["integer","null"],"description":"A rolling mean of the step's time in the box setup."},"measured_boxes":{"type":"integer","description":"The box setups that measured the step."}},"required":["id","command","kind","phase","why","source","state","source_session_id","seen_count","session_count","first_seen_at","last_seen_at","applied_at","reverted_at","reverted_reason","box_failure_count","box_last_failure","box_disabled_at","box_disabled_reason"]},"SetupRecipe":{"type":"object","properties":{"object":{"type":"string","enum":["setup_recipe"]},"repository_id":{"type":"string","minLength":1,"maxLength":200},"learning":{"type":"boolean"},"max_steps":{"type":"integer"},"window_days":{"type":"integer","description":"The window that `recent_sessions` counts sessions in."},"last_setup_timing":{"$ref":"#/components/schemas/SetupTiming"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/SetupStep"}}},"required":["object","repository_id","learning","max_steps","steps"]}},"parameters":{}},"paths":{"/me":{"get":{"operationId":"getMe","summary":"Get the token and its owner","description":"Returns the token that made the request: its scopes, its workspace binding and its expiry, and the account it acts for.\n\nAny valid token.","tags":["Meta"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The token and its owner.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List workspaces","description":"The workspaces the token can reach, newest first.\n\nScope: `workspaces:read`.","tags":["Workspaces"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"workspaces:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of workspaces.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{id}":{"get":{"operationId":"getWorkspace","summary":"Get a workspace","description":"Scope: `workspaces:read`.","tags":["Workspaces"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"workspaces:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The workspace.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories":{"get":{"operationId":"listRepositories","summary":"List repositories","description":"The repositories a workspace watches, newest first.\n\nScope: `repositories:read`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of repositories.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions":{"get":{"operationId":"listSessions","summary":"List sessions","description":"Sessions in a workspace, newest first. Archived sessions only when asked for.\n\nScope: `sessions:read`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Comma-separated statuses: provisioning, ready, moving, error, archived, archive_error."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Comma-separated kinds. Default `session`."},"required":false,"name":"kind","in":"query"},{"schema":{"type":"boolean","description":"Include archived sessions. Default false; asking for status `archived` turns it on."},"required":false,"name":"include_archived","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of sessions. Chats are not embedded in lists.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSession","summary":"Start a session","description":"Creates a sandbox session on a repository (or a thread, with `kind: \"thread\"`) and starts provisioning. With a `prompt`, the agent starts on it when the sandbox is ready. Counts against the plan like a session started in the app.\n\nScope: `sessions:write`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"201":{"description":"The new session. `status` is `provisioning`.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}":{"get":{"operationId":"getSession","summary":"Get a session","description":"Scope: `sessions:read`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The session, with its open chats.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/archive":{"post":{"operationId":"archiveSession","summary":"Archive a session","description":"Stops a running turn, saves the work and stops the sandbox. The answer comes before the sandbox has stopped.\n\nScope: `sessions:write`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The session.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/restore":{"post":{"operationId":"restoreSession","summary":"Restore an archived session","description":"Starts a new sandbox from the saved work. Waits up to a minute for an archive that is still running to finish.\n\nScope: `sessions:write`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The session.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/retry":{"post":{"operationId":"retrySession","summary":"Retry a session that failed or is stuck while it starts","description":"Provisions again on a new sandbox after `status: \"error\"`, or while `status` is `provisioning` and the start is stuck. Refused while the account still cannot run a sandbox.\n\nScope: `sessions:write`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The session.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/chats":{"post":{"operationId":"createChat","summary":"Open a new chat in a session","description":"A new agent conversation on the same sandbox and branch. Send it a message to start a turn.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatRequest"}}}},"responses":{"201":{"description":"The new chat.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/stream":{"get":{"operationId":"streamSession","summary":"Stream session changes","description":"Server-sent events: `session.updated` when the session changes, `chat.updated` when one of its chats changes, and `end` when the session is deleted. Frames have no ids: on reconnect, read the session again. A comment line (`: ping`) every 15 seconds keeps the connection open.\n\nScope: `sessions:read`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"A `text/event-stream`.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}":{"get":{"operationId":"getChat","summary":"Get a chat","description":"Scope: `sessions:read`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The chat.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateChat","summary":"Update a chat","description":"Rename the chat, or change the model, effort or plan mode its next turns use. Send only the fields to change.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatRequest"}}}},"responses":{"200":{"description":"The chat.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/messages":{"post":{"operationId":"sendMessage","summary":"Send a message","description":"Starts a turn, or queues the message behind the running turn. While the session is still provisioning, the message waits for the sandbox. Follow the reply on the events endpoints.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"202":{"description":"The message is accepted.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/cancel":{"post":{"operationId":"cancelChat","summary":"Stop the running turn","description":"Stops the agent. The transcript so far stays. Messages queued behind the turn start after it.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The chat.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/events":{"get":{"operationId":"listChatEvents","summary":"Read a transcript page","description":"Forward with `after` (oldest first; poll with the returned `last_seq`), or backward with `before` (`latest`, or a `seq`), which returns whole turns. Poll no more than once a second; to follow a running turn, use the stream.\n\nScope: `sessions:read`.","tags":["Events"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Events with a greater `seq`, oldest first. Default 0."},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","description":"`latest` for the newest page, or a `seq` for the page before it. Returned oldest first, whole turns only."},"required":false,"name":"before","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":2000,"default":500,"description":"Events per page, 1 to 2000. Default 500."},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of events.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/events/stream":{"get":{"operationId":"streamChatEvents","summary":"Stream a transcript","description":"Server-sent events. Each `transcript` frame is one event, with `id:` set to its `seq`. On connect the stream sends the stored events after `after` (or after the `Last-Event-ID` header), then new events as they arrive. `chat` frames carry the chat when its status changes. An `end` frame closes the stream when the chat is closed or the session is archived or deleted. A comment line (`: ping`) every 15 seconds keeps the connection open.\n\nScope: `sessions:read`.","tags":["Events"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Start after this `seq`. The `Last-Event-ID` header wins when both are sent."},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"A `text/event-stream`.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests":{"get":{"operationId":"listPullRequests","summary":"List pull requests","description":"The pull requests Talyn tracks in a workspace, newest tracked first. Default: open ones. The data is what Talyn last read from GitHub; `last_synced_at` says when.\n\nScope: `pull_requests:read`.","tags":["Pull requests"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"string","enum":["open","closed","merged","all"],"default":"open","description":"Default `open`."},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","enum":["authored","review_requested","watching"],"description":"`authored` is the \"Mine\" bucket, `review_requested` the \"Review\" bucket. Default: all."},"required":false,"name":"relationship","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"repository_id","in":"query"},{"schema":{"type":"boolean","description":"Only pull requests in (true) or not in (false) the merge queue."},"required":false,"name":"merge_queued","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of pull requests.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequestList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}":{"get":{"operationId":"getPullRequest","summary":"Get a pull request","description":"With its live sessions and its latest code review. Reads no data from GitHub: use `POST /pull-requests/{id}/refresh` for that.\n\nScope: `pull_requests:read`.","tags":["Pull requests"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The pull request.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePullRequest","summary":"Update a pull request","description":"`auto_keep_mergeable: true` makes Talyn start a fix when the pull request stops being mergeable (conflicts, failing checks), for as long as it stays open. Each fix counts against the plan like any other run.\n\nScope: `pull_requests:write`.","tags":["Pull requests"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePullRequestRequest"}}}},"responses":{"200":{"description":"The pull request.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/description":{"get":{"operationId":"getPullRequestDescription","summary":"Get the description of a pull request","description":"The description as Talyn last read it from GitHub.\n\nScope: `pull_requests:read`.","tags":["Pull requests"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The description.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequestDescription"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/refresh":{"post":{"operationId":"refreshPullRequest","summary":"Read a pull request from GitHub again","description":"Fetches the pull request from GitHub now and stores it. A pull request that is no longer open gets its closed or merged state. Uses your GitHub rate limit, so it has its own, lower limit (see rate limits). Answers 409 `cannot_refresh` when GitHub does not have it.\n\nScope: `pull_requests:write`.","tags":["Pull requests"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The pull request, as GitHub has it now.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"GitHub refused or failed the request. `error.message` has its answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/sessions":{"post":{"operationId":"startPullRequestSession","summary":"Start a session on a pull request","description":"Starts a sandbox session on the pull request's head branch and links it to the pull request. The same as `POST /sessions` with `pull_request_id`. Send a `prompt` to tell the agent what to do, for example to fix the failing checks.\n\nScope: `sessions:write`.","tags":["Pull requests"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartPullRequestSessionRequest"}}}},"responses":{"201":{"description":"The new session. `status` is `provisioning`.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/merge-queue":{"get":{"operationId":"listMergeQueue","summary":"List the merge queue","description":"Every pull request in the merge queue of a workspace, in the order they joined. One page.\n\nScope: `pull_requests:read`.","tags":["Merge queue"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"The queue.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeQueueList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/merge-queue":{"post":{"operationId":"addToMergeQueue","summary":"Add a pull request to the merge queue","description":"Talyn merges it when it is clean, and starts a fix run when it has conflicts or failing checks. Adding a pull request that is already queued changes only its `method`.\n\nScope: `pull_requests:write`.","tags":["Merge queue"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddToMergeQueueRequest"}}}},"responses":{"200":{"description":"The pull request, with `merge_queue` set.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeFromMergeQueue","summary":"Remove a pull request from the merge queue","description":"Also turns off the GitHub auto-merge that Talyn armed, if any. A pull request that is not queued answers the same.\n\nScope: `pull_requests:write`.","tags":["Merge queue"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The pull request, with `merge_queue: null`.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/merge-queue/resubmit":{"post":{"operationId":"resubmitToMergeQueue","summary":"Re-submit a parked pull request","description":"For a pull request an external merge queue (trunk.io) gave back, after a person dealt with the cause. Resets the budgets and submits it again. 409 `not_queued`, `not_parked` or `no_external_queue` otherwise.\n\nScope: `pull_requests:write`.","tags":["Merge queue"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The pull request.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequest"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/merge-queue/events":{"get":{"operationId":"listMergeQueueEvents","summary":"List the merge-queue history of a pull request","description":"What the queue did with the pull request and why: the current entry, or the last one when it is not queued.\n\nScope: `pull_requests:read`.","tags":["Merge queue"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"pull_requests:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The events, newest first.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeQueueEventList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pull-requests/{id}/code-reviews":{"get":{"operationId":"listPullRequestCodeReviews","summary":"List the code reviews of a pull request","description":"A pull request has at most one review. Each new review is a new `cycle` of it, and findings carry over between cycles.\n\nScope: `code_reviews:read`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The review, if there is one. Without findings.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReviewList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"startCodeReview","summary":"Start a code review","description":"Starts a new review cycle on the pull request. If a cycle is already running, the answer is that cycle with status 200. Starting a review runs on a box, so the usage gates on box starts apply. 409 `no_reviewers` when the workspace turned Talyn's reviewers off and has none of its own for this repository; 409 `pr_closed` for a pull request that is not open.\n\nScope: `code_reviews:write`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCodeReviewRequest"}}}},"responses":{"200":{"description":"A cycle was already running. This is it.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReview"}}}},"201":{"description":"The new cycle.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReview"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/code-reviews/{id}":{"get":{"operationId":"getCodeReview","summary":"Get a code review with its findings","description":"Scope: `code_reviews:read`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The review and its findings.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReview"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/code-reviews/{id}/cancel":{"post":{"operationId":"cancelCodeReview","summary":"Stop a running code review","description":"Stops the reviewers of the running cycle. A review at rest answers as it is.\n\nScope: `code_reviews:write`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The review.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReview"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/code-reviews/{id}/events":{"get":{"operationId":"listCodeReviewEvents","summary":"List the history of a code review","description":"Each phase change and action, with the reason.\n\nScope: `code_reviews:read`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The events, newest first.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReviewEventList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/code-reviews/{id}/findings/{finding_id}":{"get":{"operationId":"getCodeReviewFinding","summary":"Get a finding","description":"With its full `body`, the `suggestion` and the quoted `anchor`.\n\nScope: `code_reviews:read`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"finding_id","in":"path"}],"responses":{"200":{"description":"The finding.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReviewFinding"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/code-reviews/{id}/findings/{finding_id}/dismiss":{"post":{"operationId":"dismissCodeReviewFinding","summary":"Dismiss a finding","description":"A dismissal stays across cycles: a later review that finds the same thing does not ask again. Dismissing a blocker can let a parked merge-queue entry go on.\n\nScope: `code_reviews:write`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"finding_id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissFindingRequest"}}}},"responses":{"200":{"description":"The finding.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReviewFinding"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"undismissCodeReviewFinding","summary":"Undo a dismissal","description":"Scope: `code_reviews:write`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"finding_id","in":"path"}],"responses":{"200":{"description":"The finding, open again.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReviewFinding"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/code-reviews/{id}/post":{"post":{"operationId":"postCodeReview","summary":"Post findings to the pull request","description":"Writes the findings to the pull request as one GitHub review from your account, always as a comment (never approve or request changes). A finding goes on a line of the diff only when its quoted code was found there; the others go in the review body. A finding is never posted twice. 409 `code_review_post_not_ready` or `code_review_post_nothing_to_post`; 502 `code_review_post_github_failed` when GitHub refuses.\n\nScope: `code_reviews:write`.","tags":["Code reviews"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"code_reviews:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCodeReviewRequest"}}}},"responses":{"200":{"description":"What was posted.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeReviewPost"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"GitHub refused or failed the request. `error.message` has its answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","description":"Your webhook endpoints, newest first.\n\nScope: `webhooks:read`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:read","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of endpoints. Secrets are never listed.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhookEndpoint","summary":"Create a webhook endpoint","description":"Talyn signs each delivery with the secret in the answer (Standard Webhooks). The secret is shown only here and after a rotation. An account can have 20 endpoints.\n\nScope: `webhooks:write`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:write","parameters":[{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}}},"responses":{"201":{"description":"The new endpoint, with its secret.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"get":{"operationId":"getWebhookEndpoint","summary":"Get a webhook endpoint","description":"Scope: `webhooks:read`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The endpoint, without its secret.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateWebhookEndpoint","summary":"Change a webhook endpoint","description":"Change the URL, the description or the event types, or switch the endpoint off and on.\n\nScope: `webhooks:write`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"}}}},"responses":{"200":{"description":"The endpoint.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhookEndpoint","summary":"Delete a webhook endpoint","description":"Deletes the endpoint and its delivery history. Pending deliveries are not sent.\n\nScope: `webhooks:write`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","summary":"Rotate an endpoint's signing secret","description":"Makes a new secret and returns it once. The old secret also signs each delivery for `expire_previous_in_seconds` (default 24 hours), so the receiver can accept either while you deploy the new one.\n\nScope: `webhooks:write`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateWebhookSecretRequest"}}}},"responses":{"200":{"description":"The endpoint, with its new secret.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"operationId":"testWebhookEndpoint","summary":"Send a test event","description":"Queues a `ping` event to the endpoint. It is signed and retried like any other event. Read the delivery to see the answer.\n\nScope: `webhooks:write`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"202":{"description":"The queued delivery.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"List an endpoint's deliveries","description":"Deliveries to one endpoint, newest first, without their payloads. Kept for 30 days.\n\nScope: `webhooks:read`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["pending","succeeded","failed","abandoned"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of deliveries.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-deliveries/{id}":{"get":{"operationId":"getWebhookDelivery","summary":"Get a webhook delivery","description":"Scope: `webhooks:read`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The delivery, with the payload it sends.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryWithPayload"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-deliveries/{id}/redeliver":{"post":{"operationId":"redeliverWebhookDelivery","summary":"Send a delivery again","description":"Sends the same event again, from the first attempt, with the same `webhook-id`. Refused while the delivery is still pending.\n\nScope: `webhooks:write`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"202":{"description":"The delivery, pending again.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-event-types":{"get":{"operationId":"listWebhookEventTypes","summary":"List the webhook event types","description":"Scope: `webhooks:read`.","tags":["Webhooks"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"webhooks:read","responses":{"200":{"description":"Every event type an endpoint can receive.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventTypeList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/changes":{"get":{"operationId":"getSessionChanges","summary":"List changed files","description":"The files the session changed, with line counts. A sleeping sandbox answers from the copy Talyn stored when it last read the sandbox, and `snapshot_at` says when that was. Send `live=true` to read the sandbox now; that wakes it. A sleeping sandbox with no stored copy answers 409 `snapshot_unavailable`.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"boolean","description":"Read the sandbox now, and wake it if it sleeps. Default false: a sleeping sandbox answers from its stored copy."},"required":false,"name":"live","in":"query"}],"responses":{"200":{"description":"The changed files.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionChanges"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/diff":{"get":{"operationId":"getSessionDiff","summary":"Read the diff","description":"A unified diff of the whole session, or of one file with `path`. A sleeping sandbox answers from the copy Talyn stored, or from GitHub when all the work is pushed; `source` says which. With neither, it answers 409 `snapshot_unavailable`. Send `live=true` to read the sandbox now; that wakes it.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"One file only. Default: every changed file."},"required":false,"name":"path","in":"query"},{"schema":{"type":"string","enum":["combined","uncommitted","committed"],"description":"`combined` (default): everything against the merge base. `uncommitted`: against HEAD. `committed`: merge base to HEAD."},"required":false,"name":"scope","in":"query"},{"schema":{"type":"boolean","description":"Read the sandbox now, and wake it if it sleeps. Default false: a sleeping sandbox answers from the copy Talyn stored, or answers 409 `snapshot_unavailable` when there is none."},"required":false,"name":"live","in":"query"}],"responses":{"200":{"description":"The diff.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDiff"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/files":{"get":{"operationId":"listSessionFiles","summary":"List files","description":"Every file in the repository checkout, tracked and untracked. Files that git ignores are left out. A sleeping sandbox answers from the copy Talyn stored, or 409 `snapshot_unavailable`. Send `live=true` to wake it.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"boolean","description":"Read the sandbox now, and wake it if it sleeps. Default false: a sleeping sandbox answers from the copy Talyn stored, or answers 409 `snapshot_unavailable` when there is none."},"required":false,"name":"live","in":"query"}],"responses":{"200":{"description":"The paths.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/files/content":{"get":{"operationId":"getSessionFile","summary":"Read a file","description":"One file as it is in the sandbox now. Text comes back as UTF-8, a binary file as base64. A file over 4 MiB answers 413 `file_too_large`. A sleeping sandbox answers a changed file from the copy Talyn stored, and a file the session did not change from GitHub at the merge base; `source` says which. With neither, it answers 409 `snapshot_unavailable`. Send `live=true` to read the sandbox now; that wakes it.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Relative to the repository root."},"required":true,"name":"path","in":"query"},{"schema":{"type":"boolean","description":"Read the sandbox now, and wake it if it sleeps. Default false: a sleeping sandbox answers from the copy Talyn stored, or answers 409 `snapshot_unavailable` when there is none."},"required":false,"name":"live","in":"query"}],"responses":{"200":{"description":"The file.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileContent"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/scripts":{"get":{"operationId":"listSessionScripts","summary":"List scripts","description":"The setup, run and archive scripts of the session and their state. By default only the scripts that have run, with no wake. With `live=true`, also every script the config defines (`.talyn/settings.toml` or Conductor), with its command; that wakes the sandbox.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"boolean","description":"Also read the session's config from the sandbox, and wake it if it sleeps, to list every script it defines with its command. Default false: only the scripts that have run."},"required":false,"name":"live","in":"query"}],"responses":{"200":{"description":"The scripts. Never paged.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/scripts/{name}/start":{"post":{"operationId":"startSessionScript","summary":"Start a script","description":"Starts `setup`, `run` (the default run script), `archive`, or a named run script. Answers when the script has started. A script that is already running answers 409 `script_running`. Wakes the sandbox.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"The script name. `run` starts the default run script."},"required":true,"name":"name","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The script.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/scripts/{name}/stop":{"post":{"operationId":"stopSessionScript","summary":"Stop a script","description":"Stops the script in the sandbox. Stopping a script that does not run changes nothing.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"The script name. `run` starts the default run script."},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"The script.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/scripts/{name}/output":{"get":{"operationId":"getSessionScriptOutput","summary":"Read a script's output","description":"The end of what the script wrote, at most 64 KiB, from what Talyn stored. Does not wake the sandbox. Poll it while `status` is `running`. A script that has not run answers `not_started` with no output.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"The script name. `run` starts the default run script."},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"The output.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptOutput"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/previews":{"get":{"operationId":"listSessionPreviews","summary":"List preview ports","description":"The ports the repository's preview settings name, and every port that has a hosted preview link. Does not wake the sandbox. To open one, make a link with POST /sessions/{id}/previews.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The preview ports. Never paged.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSessionPreviewLink","summary":"Make a preview link","description":"A one-time sign-in link to a port of the sandbox on its own host. Open `url` in a browser within 10 minutes. The browser then gets a cookie for that host that lasts 12 hours. The link works once. Answers 404 `preview_links_unavailable` when this deployment has no preview domain.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePreviewLinkRequest"}}}},"responses":{"201":{"description":"The link.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewLink"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/pull_request":{"post":{"operationId":"createSessionPullRequest","summary":"Open a pull request","description":"Commits what is not committed, pushes the branch and opens a pull request on GitHub from the token owner's account. When a pull request from the branch is already open, the session is linked to it and `existing` is true. Uses your GitHub rate limit.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePullRequestRequest"}}}},"responses":{"200":{"description":"A pull request was already open; the session is linked to it.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequestReceipt"}}}},"201":{"description":"The pull request is open.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequestReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"GitHub refused or failed the request. `error.message` has its answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/fix_checks":{"post":{"operationId":"fixSessionChecks","summary":"Ask the agent to fix failing checks","description":"Sends the agent the app's fix-checks prompt with the failing checks of the linked pull request. The message queues behind a running turn. A cloud task that works on the same pull request answers 409 `task_active`.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionActionRequest"}}}},"responses":{"202":{"description":"The prompt is sent.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/resolve_conflicts":{"post":{"operationId":"resolveSessionConflicts","summary":"Ask the agent to resolve conflicts","description":"Sends the agent the app's prompt to merge the base branch and resolve the conflicts. The message queues behind a running turn. A cloud task that works on the same pull request answers 409 `task_active`.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionActionRequest"}}}},"responses":{"202":{"description":"The prompt is sent.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/address_review":{"post":{"operationId":"addressSessionReviews","summary":"Ask the agent to address review comments","description":"Sends the agent the app's prompt to read and address the unresolved review comments of the linked pull request. The message queues behind a running turn. A cloud task that works on the same pull request answers 409 `task_active`.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionActionRequest"}}}},"responses":{"202":{"description":"The prompt is sent.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/merge":{"post":{"operationId":"mergeSessionPullRequest","summary":"Merge the session's pull request","description":"Merges the linked pull request on GitHub with its merge method (squash by default). No linked pull request answers 409 `no_pull_request`; a refusal from GitHub answers 409 `merge_failed`. Uses your GitHub rate limit.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The pull request is merged.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"GitHub refused or failed the request. `error.message` has its answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/sessions":{"get":{"operationId":"listThreadSessions","summary":"List a thread's sessions","description":"The sessions a thread started, newest first, archived ones included. A session that is not a thread answers 409 `not_thread`.\n\nScope: `sessions:read`.","tags":["Threads"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of sessions.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/thread":{"post":{"operationId":"continueSessionAsThread","summary":"Continue a session as a thread","description":"Starts a thread whose first message recaps the session's chat. The session joins the thread. Counts against the plan like a session started in the app.\n\nScope: `sessions:write`.","tags":["Threads"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContinueAsThreadRequest"}}}},"responses":{"201":{"description":"The new thread. `kind` is `thread`.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/timing":{"get":{"operationId":"getSessionTiming","summary":"Get where the time went","description":"Where the session's turns spent their time: model, tests, installs, builds and the rest. Read from stored turn reports.\n\nScope: `sessions:read`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The timing summary.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTiming"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/resize":{"post":{"operationId":"resizeSession","summary":"Move the session to another sandbox size","description":"Moves the work to a sandbox of the new size when no turn runs, else after the running turn. With `continue_with`, the message goes to the chat and its turn starts on the new sandbox.\n\nScope: `sessions:write`.","tags":["Session work"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResizeSessionRequest"}}}},"responses":{"200":{"description":"What happens next.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResizeReceipt"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{id}/readiness":{"get":{"operationId":"getSessionReadiness","summary":"Check whether sessions can start","description":"Whether this workspace can start a sandbox session now, and with which agents. Each reason has a `code` and a message to show. Answers even when sessions are not available for the account: that is the reason `flag_off`.\n\nScope: `sessions:read`.","tags":["Sessions"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The readiness.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReadiness"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/close":{"post":{"operationId":"closeChat","summary":"Close a chat","description":"Stops a running turn, empties the queue and closes the chat. The transcript stays readable. Closing a closed chat changes nothing.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The chat, with `closed_at` set.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/queue":{"get":{"operationId":"listQueuedMessages","summary":"List queued messages","description":"Messages that wait for the running turn to end, oldest first. They start one by one after it.\n\nScope: `sessions:read`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The queue. Never paged.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedMessageList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"clearQueuedMessages","summary":"Clear the queue","description":"Removes every queued message. A running turn goes on.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The chat. `queued_message_count` is 0.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/queue/{message_id}":{"delete":{"operationId":"deleteQueuedMessage","summary":"Remove a queued message","description":"A message that already started, or that is not in the queue, answers 404 `queued_message_not_found`.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"message_id","in":"path"}],"responses":{"200":{"description":"The chat.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/checkpoints":{"get":{"operationId":"listChatCheckpoints","summary":"List checkpoints","description":"One per turn: the files as they were before that turn. Oldest first.\n\nScope: `sessions:read`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The checkpoints. Never paged.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chats/{id}/checkpoints/{turn}/restore":{"post":{"operationId":"restoreChatCheckpoint","summary":"Restore a checkpoint","description":"Puts the files back as they were before the turn. Talyn saves the current files first, so the restore can be undone by hand. The branch and its commits do not move. A running turn answers 409 `chat_running`.\n\nScope: `sessions:write`.","tags":["Chats"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"sessions:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"turn","in":"path"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The chat.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memories":{"get":{"operationId":"listMemories","summary":"List memory entries","description":"Newest first. Bodies only with `include_body=true`. Forgotten entries only with `include_forgotten=true`.\n\nScope: `memory:read`.","tags":["Memory"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"memory:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required unless the token is bound to exactly one workspace."},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"string","enum":["workspace","repository","thread"]},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"With `scope`, that repository only. Without it, the entries a session on this repository sees."},"required":false,"name":"repository_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"thread_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Matches the name, the description or the body."},"required":false,"name":"q","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"include_forgotten","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"include_body","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Items per page, 1 to 200. Default 50."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"The `next_cursor` of the previous page. Absent for the first page."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of entries.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryList"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createMemory","summary":"Save a memory entry","description":"Creates an entry. When a live entry with the same scope, target and name exists (the name is not case-sensitive), that entry is updated instead and the answer is 200. A workspace holds at most 500 live entries.\n\nScope: `memory:write`.","tags":["Memory"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"memory:write","parameters":[{"schema":{"type":"string","maxLength":255,"description":"Send the same key when you retry, and the request runs once. Kept for 24 hours."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMemoryRequest"}}}},"responses":{"200":{"description":"An entry with this name existed and is updated.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"201":{"description":"The new entry.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan limit is reached. `error.code` says which limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memories/{id}":{"get":{"operationId":"getMemory","summary":"Get a memory entry","description":"With its body. A forgotten entry too.\n\nScope: `memory:read`.","tags":["Memory"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"memory:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The entry.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateMemory","summary":"Update a memory entry","description":"Change the type, name, description or body. The scope stays. A forgotten entry answers 409 `memory_forgotten`.\n\nScope: `memory:write`.","tags":["Memory"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"memory:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemoryRequest"}}}},"responses":{"200":{"description":"The entry.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"forgetMemory","summary":"Forget a memory entry","description":"Sessions stop seeing the entry. It stays, with `forgotten_at` set, so it can be restored. Forgetting it twice changes nothing.\n\nScope: `memory:write`.","tags":["Memory"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"memory:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The forgotten entry.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memories/{id}/restore":{"post":{"operationId":"restoreMemory","summary":"Restore a forgotten entry","description":"Refused with 409 `memory_name_taken` when a live entry took its name, and with 409 `memory_limit_reached` at the limit.\n\nScope: `memory:write`.","tags":["Memory"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"memory:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The entry.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}":{"get":{"operationId":"getRepository","summary":"Get a repository","description":"Scope: `repositories:read`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The repository.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/settings":{"get":{"operationId":"getRepositorySettings","summary":"Get repository settings","description":"The sandbox size, the preview and setup learning for new sessions on the repository. The detected values are what Talyn last read from the repository; this request does not read GitHub.\n\nScope: `repositories:read`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The settings.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySettings"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateRepositorySettings","summary":"Update repository settings","description":"Send only the fields to change. `sandbox_size: \"auto\"` goes back to the detected size. Inside `preview`, each field you send replaces your choice for that field.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRepositorySettingsRequest"}}}},"responses":{"200":{"description":"The settings.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySettings"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/instructions":{"get":{"operationId":"getRepositoryInstructions","summary":"Get repository instructions","description":"The instructions written in Talyn for the repository. Every turn of every session on the repository gets them. No instructions answers 404 `repository_instructions_not_found`.\n\nScope: `repositories:read`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The instructions.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryInstructions"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putRepositoryInstructions","summary":"Write repository instructions","description":"Replaces the instructions. The next turn of each session gets the new text. At most 64 KiB.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutRepositoryInstructionsRequest"}}}},"responses":{"200":{"description":"The instructions.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryInstructions"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteRepositoryInstructions","summary":"Delete repository instructions","description":"The next turn of each session takes the instructions out of its sandbox. Deleting twice changes nothing.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/setup":{"get":{"operationId":"getRepositorySetup","summary":"Get the Setup list","description":"The repository's own setup, then one ordered list of setup steps. Image steps go into the repository's image. Box steps run on each new sandbox. Learned steps are suggested until a person or the frequency rule accepts them.\n\nScope: `repositories:read`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The Setup list.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putRepositorySetup","summary":"Write the Setup list","description":"Send only the fields to change. `steps` is the whole list in its new order. A step that reads a secret runs only on the box. A command that holds a literal token is refused (`setup_step_refused`). The command of a learned step cannot change (`learned_command`). A refusal changes nothing.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutRepositorySetupRequest"}}}},"responses":{"200":{"description":"The Setup list.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/setup/steps/{step_id}/accept":{"post":{"operationId":"acceptSetupListStep","summary":"Accept a setup step","description":"Accept a suggested or dismissed learned step. It runs on new sandboxes, and an image step goes into the image. Talyn never removes a step that a person accepted.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"step_id","in":"path"}],"responses":{"200":{"description":"The Setup list.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/setup/steps/{step_id}/dismiss":{"post":{"operationId":"dismissSetupListStep","summary":"Dismiss a setup step","description":"Dismiss a learned step. It stops running and stays in the list as dismissed, so Talyn does not suggest it again. Your own step cannot be dismissed (409 `not_learned`): remove it from the list instead.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"step_id","in":"path"}],"responses":{"200":{"description":"The Setup list.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/setup/steps/{step_id}/retry":{"post":{"operationId":"retrySetupListStep","summary":"Retry a setup step","description":"Run a disabled step again, or put a step that failed in the image build back into the image. The failure count goes back to 0.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"step_id","in":"path"}],"responses":{"200":{"description":"The Setup list.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositorySetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{id}/sandbox_setup":{"get":{"operationId":"getWorkspaceSandboxSetup","summary":"Get the sandbox setup","description":"The workspace's dotfiles and setup steps. They go into the image of every repository of the workspace, before the repository's own steps.\n\nScope: `repositories:read`.","tags":["Workspaces"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The sandbox setup.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSandboxSetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"putWorkspaceSandboxSetup","summary":"Write the sandbox setup","description":"Each field you send replaces it. It changes the sandboxes of every repository of the workspace, so it needs `repositories:write`. The dotfiles install command cannot read a secret: the image build has no secrets.\n\nScope: `repositories:write`.","tags":["Workspaces"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutWorkspaceSandboxSetupRequest"}}}},"responses":{"200":{"description":"The sandbox setup.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSandboxSetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{id}/sandbox_setup/steps/{step_id}/retry":{"post":{"operationId":"retryWorkspaceSetupStep","summary":"Retry a sandbox setup step","description":"Run a disabled workspace step again, or put a step that failed in the image build back into the image.\n\nScope: `repositories:write`.","tags":["Workspaces"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"step_id","in":"path"}],"responses":{"200":{"description":"The sandbox setup.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSandboxSetup"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/setup_recipe":{"get":{"operationId":"getSetupRecipe","summary":"Get the setup recipe","description":"Deprecated: use `GET /repositories/{id}/setup`. This route goes after one release. The setup steps Talyn learned from sessions on the repository, in the old shape.\n\nScope: `repositories:read`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The recipe.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupRecipe"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/repositories/{id}/setup_recipe/steps/{step_id}/revert":{"post":{"operationId":"revertSetupStep","summary":"Revert a setup step","description":"Deprecated: use `POST /repositories/{id}/setup/steps/{step_id}/dismiss`. This route goes after one release. It dismisses the step. The step stays in the list as reverted, so Talyn does not learn it again.\n\nScope: `repositories:write`.","tags":["Repositories"],"security":[{"bearerAuth":[]}],"x-talyn-scope":"repositories:write","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"step_id","in":"path"}],"responses":{"200":{"description":"The recipe.","headers":{"X-Request-Id":{"description":"The id of this request. Also in every error body.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window ends.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupRecipe"}}}},"400":{"description":"The request is not valid. `error.param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The token is missing, not valid, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The token lacks the scope, or the API or sessions are not available for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such resource, or the token cannot reach it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The resource is not in a state that allows this, e.g. `not_ready`, `local_runtime`, an idempotency conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Talyn Fleet or GitHub cannot take the request now. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApiSpec","summary":"Get this OpenAPI document","description":"No token needed.","tags":["Meta"],"security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document of `/v1`."},"429":{"description":"Too many requests. Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"A fault on our side. Quote `error.request_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}