archastro.platform.types.tasks
1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 093546997f8d 4 5from datetime import datetime 6from typing import Any 7 8from pydantic import BaseModel, Field 9 10from .common import Actor 11 12 13class TaskSessionLeaseSummary(BaseModel): 14 """ 15 Viewer-safe details about a task's current coding-session lease. 16 """ 17 18 expires_at: datetime = Field( 19 ..., description="Server-calculated lease expiry in ISO 8601 format." 20 ) 21 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 22 session_name: str = Field( 23 ..., description="Display name supplied by the coding session that holds the lease." 24 ) 25 26 27class Task(BaseModel): 28 """ 29 A task representing a unit of work, optionally assignable to a user or agent. 30 """ 31 32 agent: str | None = Field( 33 default=None, 34 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 35 ) 36 blocked_by_count: int | None = Field( 37 default=None, 38 description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 39 ) 40 closed_at: datetime | None = Field( 41 default=None, 42 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 43 ) 44 comments_count: int | None = Field( 45 default=None, description="Total number of comments posted on this task." 46 ) 47 created_at: datetime | None = Field( 48 default=None, description="When the task was created (ISO 8601)." 49 ) 50 created_by_actor: Actor | None = Field( 51 default=None, 52 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 53 ) 54 created_by_agent: str | None = Field( 55 default=None, 56 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 57 ) 58 created_by_user: str | None = Field( 59 default=None, 60 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 61 ) 62 current_lease: TaskSessionLeaseSummary | None = Field( 63 default=None, 64 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 65 ) 66 description: str | None = Field( 67 default=None, 68 description="Long-form description or notes for the task. `null` if no description has been provided.", 69 ) 70 due_date: datetime | None = Field( 71 default=None, 72 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 73 ) 74 epic: str | None = Field( 75 default=None, 76 description="Free-form grouping label. `null` when the task is not in an epic.", 77 ) 78 id: str = Field(..., description="Task ID (`tsk_...`).") 79 is_blocked: bool | None = Field( 80 default=None, 81 description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.", 82 ) 83 links: dict[str, Any] | None = Field( 84 default=None, 85 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 86 ) 87 metadata: dict[str, Any] | None = Field( 88 default=None, 89 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 90 ) 91 name: str = Field(..., description="Human-readable title of the task.") 92 org: str | None = Field( 93 default=None, 94 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 95 ) 96 owner_actor: Actor | None = Field( 97 default=None, 98 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 99 ) 100 owner_agent: str | None = Field( 101 default=None, 102 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 103 ) 104 owner_user: str | None = Field( 105 default=None, 106 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 107 ) 108 parent: str | None = Field( 109 default=None, 110 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.", 111 ) 112 priority: int | None = Field( 113 default=None, 114 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 115 ) 116 sandbox: str | None = Field( 117 default=None, 118 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 119 ) 120 source_id: str | None = Field( 121 default=None, 122 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 123 ) 124 source_scope: str | None = Field( 125 default=None, 126 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 127 ) 128 source_type: str | None = Field( 129 default=None, 130 description="Kind of source object (for example `repository`). `null` when the task has no source.", 131 ) 132 status: str = Field( 133 ..., 134 description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.', 135 ) 136 subtasks_count: int | None = Field( 137 default=None, 138 description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 139 ) 140 tags: list[str] | None = Field( 141 default=None, 142 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 143 ) 144 team: str | None = Field( 145 default=None, 146 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 147 ) 148 thread: str | None = Field( 149 default=None, 150 description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 151 ) 152 updated_at: datetime | None = Field( 153 default=None, description="When the task was last modified (ISO 8601)." 154 ) 155 user: str | None = Field( 156 default=None, 157 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 158 ) 159 160 161class TaskComment(BaseModel): 162 """ 163 A comment posted on a task by a user or an agent, including resolved author information. 164 """ 165 166 author_actor: Actor | None = Field( 167 default=None, 168 description="Resolved author details including `id`, `name`, `alias`, and `profile_picture`. `null` if no author is set or the author cannot be resolved (e.g. authoring agent was deleted).", 169 ) 170 author_agent: str | None = Field( 171 default=None, 172 description="ID of the agent that posted this comment (`agi_...`). `null` if the author is a human user, or if the authoring agent was later deleted.", 173 ) 174 author_user: str | None = Field( 175 default=None, 176 description="ID of the user who posted this comment (`usr_...`). `null` if the author is an agent, or if author provenance was cleared after the authoring agent was deleted.", 177 ) 178 body: str = Field(..., description="Plain-text body of the comment.") 179 created_at: datetime | None = Field( 180 default=None, description="When this comment was posted (ISO 8601)." 181 ) 182 id: str = Field(..., description="Comment ID (`tcmt_...`).") 183 org: str | None = Field( 184 default=None, description="ID of the organization that owns this comment (`org_...`)." 185 ) 186 sandbox: str | None = Field( 187 default=None, 188 description="Sandbox ID this comment is scoped to. `null` for comments outside a sandbox environment.", 189 ) 190 task: str | None = Field( 191 default=None, description="ID of the task this comment belongs to (`tsk_...`)." 192 ) 193 team: str | None = Field( 194 default=None, 195 description="ID of the team the task belongs to (`tem_...`). `null` if not scoped to a team.", 196 ) 197 updated_at: datetime | None = Field( 198 default=None, description="When this comment was last edited (ISO 8601)." 199 ) 200 201 202class TaskSessionLease(BaseModel): 203 """ 204 A task-session lease returned only to its matching holder. 205 """ 206 207 expires_at: datetime = Field( 208 ..., description="Server-calculated lease expiry in ISO 8601 format." 209 ) 210 harness: str = Field( 211 ..., description="Bounded harness identifier for the matching coding session." 212 ) 213 lease_id: str = Field( 214 ..., description="Caller-generated fencing token required for renewal and release." 215 ) 216 renewed_at: datetime = Field( 217 ..., description="Server timestamp for the most recent claim, reclaim, or renewal." 218 ) 219 session_id: str = Field(..., description="Opaque caller-generated coding-session identifier.") 220 session_name: str = Field( 221 ..., description="Display name supplied by the matching coding session." 222 )
14class TaskSessionLeaseSummary(BaseModel): 15 """ 16 Viewer-safe details about a task's current coding-session lease. 17 """ 18 19 expires_at: datetime = Field( 20 ..., description="Server-calculated lease expiry in ISO 8601 format." 21 ) 22 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 23 session_name: str = Field( 24 ..., description="Display name supplied by the coding session that holds the lease." 25 )
Viewer-safe details about a task's current coding-session lease.
28class Task(BaseModel): 29 """ 30 A task representing a unit of work, optionally assignable to a user or agent. 31 """ 32 33 agent: str | None = Field( 34 default=None, 35 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 36 ) 37 blocked_by_count: int | None = Field( 38 default=None, 39 description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 40 ) 41 closed_at: datetime | None = Field( 42 default=None, 43 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 44 ) 45 comments_count: int | None = Field( 46 default=None, description="Total number of comments posted on this task." 47 ) 48 created_at: datetime | None = Field( 49 default=None, description="When the task was created (ISO 8601)." 50 ) 51 created_by_actor: Actor | None = Field( 52 default=None, 53 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 54 ) 55 created_by_agent: str | None = Field( 56 default=None, 57 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 58 ) 59 created_by_user: str | None = Field( 60 default=None, 61 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 62 ) 63 current_lease: TaskSessionLeaseSummary | None = Field( 64 default=None, 65 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 66 ) 67 description: str | None = Field( 68 default=None, 69 description="Long-form description or notes for the task. `null` if no description has been provided.", 70 ) 71 due_date: datetime | None = Field( 72 default=None, 73 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 74 ) 75 epic: str | None = Field( 76 default=None, 77 description="Free-form grouping label. `null` when the task is not in an epic.", 78 ) 79 id: str = Field(..., description="Task ID (`tsk_...`).") 80 is_blocked: bool | None = Field( 81 default=None, 82 description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.", 83 ) 84 links: dict[str, Any] | None = Field( 85 default=None, 86 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 87 ) 88 metadata: dict[str, Any] | None = Field( 89 default=None, 90 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 91 ) 92 name: str = Field(..., description="Human-readable title of the task.") 93 org: str | None = Field( 94 default=None, 95 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 96 ) 97 owner_actor: Actor | None = Field( 98 default=None, 99 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 100 ) 101 owner_agent: str | None = Field( 102 default=None, 103 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 104 ) 105 owner_user: str | None = Field( 106 default=None, 107 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 108 ) 109 parent: str | None = Field( 110 default=None, 111 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.", 112 ) 113 priority: int | None = Field( 114 default=None, 115 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 116 ) 117 sandbox: str | None = Field( 118 default=None, 119 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 120 ) 121 source_id: str | None = Field( 122 default=None, 123 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 124 ) 125 source_scope: str | None = Field( 126 default=None, 127 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 128 ) 129 source_type: str | None = Field( 130 default=None, 131 description="Kind of source object (for example `repository`). `null` when the task has no source.", 132 ) 133 status: str = Field( 134 ..., 135 description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.', 136 ) 137 subtasks_count: int | None = Field( 138 default=None, 139 description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 140 ) 141 tags: list[str] | None = Field( 142 default=None, 143 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 144 ) 145 team: str | None = Field( 146 default=None, 147 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 148 ) 149 thread: str | None = Field( 150 default=None, 151 description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 152 ) 153 updated_at: datetime | None = Field( 154 default=None, description="When the task was last modified (ISO 8601)." 155 ) 156 user: str | None = Field( 157 default=None, 158 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 159 )
A task representing a unit of work, optionally assignable to a user or agent.
ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.
Number of tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.
When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.
ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.
ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.
Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.
Long-form description or notes for the task. null if no description has been provided.
Date and time by which the task should be completed (ISO 8601). null if no due date is set.
true while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report false until the next read.
Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.
Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.
ID of the organization this task belongs to (org_...). null for tasks outside an org context.
ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.
ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.
ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks. Subtasks nest exactly one level.
Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.
ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.
Source object identity (for example ArchAstro/firstlanding). null when the task has no source.
Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.
Kind of source object (for example repository). null when the task has no source.
Current status of the task. One of "open", "in_progress", or "done".
Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.
ID of the team that owns this task (tem_...). null if the task is not scoped to a team.
162class TaskComment(BaseModel): 163 """ 164 A comment posted on a task by a user or an agent, including resolved author information. 165 """ 166 167 author_actor: Actor | None = Field( 168 default=None, 169 description="Resolved author details including `id`, `name`, `alias`, and `profile_picture`. `null` if no author is set or the author cannot be resolved (e.g. authoring agent was deleted).", 170 ) 171 author_agent: str | None = Field( 172 default=None, 173 description="ID of the agent that posted this comment (`agi_...`). `null` if the author is a human user, or if the authoring agent was later deleted.", 174 ) 175 author_user: str | None = Field( 176 default=None, 177 description="ID of the user who posted this comment (`usr_...`). `null` if the author is an agent, or if author provenance was cleared after the authoring agent was deleted.", 178 ) 179 body: str = Field(..., description="Plain-text body of the comment.") 180 created_at: datetime | None = Field( 181 default=None, description="When this comment was posted (ISO 8601)." 182 ) 183 id: str = Field(..., description="Comment ID (`tcmt_...`).") 184 org: str | None = Field( 185 default=None, description="ID of the organization that owns this comment (`org_...`)." 186 ) 187 sandbox: str | None = Field( 188 default=None, 189 description="Sandbox ID this comment is scoped to. `null` for comments outside a sandbox environment.", 190 ) 191 task: str | None = Field( 192 default=None, description="ID of the task this comment belongs to (`tsk_...`)." 193 ) 194 team: str | None = Field( 195 default=None, 196 description="ID of the team the task belongs to (`tem_...`). `null` if not scoped to a team.", 197 ) 198 updated_at: datetime | None = Field( 199 default=None, description="When this comment was last edited (ISO 8601)." 200 )
A comment posted on a task by a user or an agent, including resolved author information.
203class TaskSessionLease(BaseModel): 204 """ 205 A task-session lease returned only to its matching holder. 206 """ 207 208 expires_at: datetime = Field( 209 ..., description="Server-calculated lease expiry in ISO 8601 format." 210 ) 211 harness: str = Field( 212 ..., description="Bounded harness identifier for the matching coding session." 213 ) 214 lease_id: str = Field( 215 ..., description="Caller-generated fencing token required for renewal and release." 216 ) 217 renewed_at: datetime = Field( 218 ..., description="Server timestamp for the most recent claim, reclaim, or renewal." 219 ) 220 session_id: str = Field(..., description="Opaque caller-generated coding-session identifier.") 221 session_name: str = Field( 222 ..., description="Display name supplied by the matching coding session." 223 )
A task-session lease returned only to its matching holder.
Server-calculated lease expiry in ISO 8601 format.