@archastro/sdk 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/channels/api_artifact_channel.d.ts +48 -0
  2. package/dist/channels/api_artifact_channel.d.ts.map +1 -0
  3. package/dist/channels/api_artifact_channel.js +85 -0
  4. package/dist/channels/api_artifact_channel.js.map +1 -0
  5. package/dist/channels/api_chat_channel.d.ts +3 -1
  6. package/dist/channels/api_chat_channel.d.ts.map +1 -1
  7. package/dist/channels/api_chat_channel.js +6 -2
  8. package/dist/channels/api_chat_channel.js.map +1 -1
  9. package/dist/client.d.ts +10 -0
  10. package/dist/client.d.ts.map +1 -1
  11. package/dist/client.js +11 -1
  12. package/dist/client.js.map +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/types/ai.d.ts +124 -10
  18. package/dist/types/ai.d.ts.map +1 -1
  19. package/dist/types/ai.js +27 -7
  20. package/dist/types/ai.js.map +1 -1
  21. package/dist/types/artifacts.d.ts +448 -0
  22. package/dist/types/artifacts.d.ts.map +1 -1
  23. package/dist/types/artifacts.js +65 -1
  24. package/dist/types/artifacts.js.map +1 -1
  25. package/dist/types/automations.d.ts +26 -26
  26. package/dist/types/automations.d.ts.map +1 -1
  27. package/dist/types/automations.js +10 -10
  28. package/dist/types/automations.js.map +1 -1
  29. package/dist/types/chat.d.ts +4150 -0
  30. package/dist/types/chat.d.ts.map +1 -1
  31. package/dist/types/common.d.ts +3635 -357
  32. package/dist/types/common.d.ts.map +1 -1
  33. package/dist/types/common.js +186 -32
  34. package/dist/types/common.js.map +1 -1
  35. package/dist/types/computers.d.ts +42 -0
  36. package/dist/types/computers.d.ts.map +1 -0
  37. package/dist/types/computers.js +19 -0
  38. package/dist/types/computers.js.map +1 -0
  39. package/dist/types/events.d.ts +34 -16
  40. package/dist/types/events.d.ts.map +1 -1
  41. package/dist/types/events.js +3 -1
  42. package/dist/types/events.js.map +1 -1
  43. package/dist/types/index.d.ts +2 -0
  44. package/dist/types/index.d.ts.map +1 -1
  45. package/dist/types/index.js +3 -1
  46. package/dist/types/index.js.map +1 -1
  47. package/dist/types/relays.d.ts +22 -0
  48. package/dist/types/relays.d.ts.map +1 -0
  49. package/dist/types/relays.js +12 -0
  50. package/dist/types/relays.js.map +1 -0
  51. package/dist/types/tasks.d.ts +839 -14
  52. package/dist/types/tasks.d.ts.map +1 -1
  53. package/dist/types/tasks.js +85 -11
  54. package/dist/types/tasks.js.map +1 -1
  55. package/dist/types/teams.d.ts +381 -0
  56. package/dist/types/teams.d.ts.map +1 -1
  57. package/dist/types/threads.d.ts +421 -0
  58. package/dist/types/threads.d.ts.map +1 -1
  59. package/dist/types/threads.js +3 -1
  60. package/dist/types/threads.js.map +1 -1
  61. package/dist/v1/resources/activity_feed.d.ts +15 -0
  62. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  63. package/dist/v1/resources/activity_feed.js +1 -1
  64. package/dist/v1/resources/agent_computers.d.ts +48 -1
  65. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  66. package/dist/v1/resources/agent_computers.js +17 -1
  67. package/dist/v1/resources/agent_computers.js.map +1 -1
  68. package/dist/v1/resources/agent_requests.d.ts +62 -0
  69. package/dist/v1/resources/agent_requests.d.ts.map +1 -0
  70. package/dist/v1/resources/agent_requests.js +79 -0
  71. package/dist/v1/resources/agent_requests.js.map +1 -0
  72. package/dist/v1/resources/agent_routines.d.ts +15 -0
  73. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  74. package/dist/v1/resources/agent_routines.js +1 -1
  75. package/dist/v1/resources/agent_routines.js.map +1 -1
  76. package/dist/v1/resources/agent_sessions.d.ts +23 -1
  77. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  78. package/dist/v1/resources/agent_sessions.js +26 -1
  79. package/dist/v1/resources/agent_sessions.js.map +1 -1
  80. package/dist/v1/resources/agents.d.ts +96 -1
  81. package/dist/v1/resources/agents.d.ts.map +1 -1
  82. package/dist/v1/resources/agents.js +13 -2
  83. package/dist/v1/resources/agents.js.map +1 -1
  84. package/dist/v1/resources/ai.d.ts +55 -4
  85. package/dist/v1/resources/ai.d.ts.map +1 -1
  86. package/dist/v1/resources/ai.js +44 -4
  87. package/dist/v1/resources/ai.js.map +1 -1
  88. package/dist/v1/resources/artifacts.d.ts +64 -2
  89. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  90. package/dist/v1/resources/artifacts.js +3 -2
  91. package/dist/v1/resources/artifacts.js.map +1 -1
  92. package/dist/v1/resources/automation_runs.d.ts +6 -2
  93. package/dist/v1/resources/automation_runs.d.ts.map +1 -1
  94. package/dist/v1/resources/automation_runs.js +10 -4
  95. package/dist/v1/resources/automation_runs.js.map +1 -1
  96. package/dist/v1/resources/computers.d.ts +113 -0
  97. package/dist/v1/resources/computers.d.ts.map +1 -0
  98. package/dist/v1/resources/computers.js +113 -0
  99. package/dist/v1/resources/computers.js.map +1 -0
  100. package/dist/v1/resources/custom_objects.d.ts +154 -0
  101. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  102. package/dist/v1/resources/custom_objects.js +60 -1
  103. package/dist/v1/resources/custom_objects.js.map +1 -1
  104. package/dist/v1/resources/event_subscriptions.d.ts +12 -0
  105. package/dist/v1/resources/event_subscriptions.d.ts.map +1 -1
  106. package/dist/v1/resources/event_subscriptions.js +7 -1
  107. package/dist/v1/resources/event_subscriptions.js.map +1 -1
  108. package/dist/v1/resources/files.d.ts +56 -10
  109. package/dist/v1/resources/files.d.ts.map +1 -1
  110. package/dist/v1/resources/files.js +39 -11
  111. package/dist/v1/resources/files.js.map +1 -1
  112. package/dist/v1/resources/index.d.ts +5 -0
  113. package/dist/v1/resources/index.d.ts.map +1 -1
  114. package/dist/v1/resources/index.js +6 -1
  115. package/dist/v1/resources/index.js.map +1 -1
  116. package/dist/v1/resources/knowledge_sources.d.ts +4 -0
  117. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
  118. package/dist/v1/resources/knowledge_sources.js +1 -1
  119. package/dist/v1/resources/kv.d.ts +75 -31
  120. package/dist/v1/resources/kv.d.ts.map +1 -1
  121. package/dist/v1/resources/kv.js +79 -32
  122. package/dist/v1/resources/kv.js.map +1 -1
  123. package/dist/v1/resources/notifications.d.ts +14 -0
  124. package/dist/v1/resources/notifications.d.ts.map +1 -1
  125. package/dist/v1/resources/notifications.js +13 -1
  126. package/dist/v1/resources/notifications.js.map +1 -1
  127. package/dist/v1/resources/oauth.d.ts +2 -0
  128. package/dist/v1/resources/oauth.d.ts.map +1 -1
  129. package/dist/v1/resources/oauth.js +2 -1
  130. package/dist/v1/resources/oauth.js.map +1 -1
  131. package/dist/v1/resources/orgs.d.ts +907 -1
  132. package/dist/v1/resources/orgs.d.ts.map +1 -1
  133. package/dist/v1/resources/orgs.js +471 -2
  134. package/dist/v1/resources/orgs.js.map +1 -1
  135. package/dist/v1/resources/private_service_enrollments.d.ts +7 -0
  136. package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -1
  137. package/dist/v1/resources/private_service_enrollments.js +10 -1
  138. package/dist/v1/resources/private_service_enrollments.js.map +1 -1
  139. package/dist/v1/resources/relays.d.ts +38 -0
  140. package/dist/v1/resources/relays.d.ts.map +1 -0
  141. package/dist/v1/resources/relays.js +44 -0
  142. package/dist/v1/resources/relays.js.map +1 -0
  143. package/dist/v1/resources/scripts.d.ts +20 -9
  144. package/dist/v1/resources/scripts.d.ts.map +1 -1
  145. package/dist/v1/resources/scripts.js +18 -10
  146. package/dist/v1/resources/scripts.js.map +1 -1
  147. package/dist/v1/resources/solutions.d.ts +15 -0
  148. package/dist/v1/resources/solutions.d.ts.map +1 -1
  149. package/dist/v1/resources/solutions.js +1 -1
  150. package/dist/v1/resources/solutions.js.map +1 -1
  151. package/dist/v1/resources/task_epics.d.ts +85 -0
  152. package/dist/v1/resources/task_epics.d.ts.map +1 -0
  153. package/dist/v1/resources/task_epics.js +71 -0
  154. package/dist/v1/resources/task_epics.js.map +1 -0
  155. package/dist/v1/resources/task_ownership_conversions.d.ts +14 -0
  156. package/dist/v1/resources/task_ownership_conversions.d.ts.map +1 -0
  157. package/dist/v1/resources/task_ownership_conversions.js +19 -0
  158. package/dist/v1/resources/task_ownership_conversions.js.map +1 -0
  159. package/dist/v1/resources/tasks.d.ts +122 -1
  160. package/dist/v1/resources/tasks.d.ts.map +1 -1
  161. package/dist/v1/resources/tasks.js +73 -1
  162. package/dist/v1/resources/tasks.js.map +1 -1
  163. package/dist/v1/resources/teams.d.ts +415 -1
  164. package/dist/v1/resources/teams.d.ts.map +1 -1
  165. package/dist/v1/resources/teams.js +137 -1
  166. package/dist/v1/resources/teams.js.map +1 -1
  167. package/dist/v1/resources/thread_messages.d.ts +15 -0
  168. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  169. package/dist/v1/resources/thread_messages.js +1 -1
  170. package/dist/v1/resources/thread_messages.js.map +1 -1
  171. package/dist/v1/resources/threads.d.ts +126 -0
  172. package/dist/v1/resources/threads.d.ts.map +1 -1
  173. package/dist/v1/resources/threads.js +43 -1
  174. package/dist/v1/resources/threads.js.map +1 -1
  175. package/dist/v1/resources/users.d.ts +372 -3
  176. package/dist/v1/resources/users.d.ts.map +1 -1
  177. package/dist/v1/resources/users.js +167 -3
  178. package/dist/v1/resources/users.js.map +1 -1
  179. package/dist/v1/resources/workflows.d.ts +5 -1
  180. package/dist/v1/resources/workflows.d.ts.map +1 -1
  181. package/dist/v1/resources/workflows.js +6 -2
  182. package/dist/v1/resources/workflows.js.map +1 -1
  183. package/dist/v1.d.ts +10 -0
  184. package/dist/v1.d.ts.map +1 -1
  185. package/dist/v1.js +16 -1
  186. package/dist/v1.js.map +1 -1
  187. package/package.json +1 -1
@@ -32,8 +32,10 @@ export interface Task {
32
32
  agent?: string | null | undefined;
33
33
  /** Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes. */
34
34
  aggregate_version?: number | null | undefined;
35
- /** 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. */
35
+ /** Number of readable 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. */
36
36
  blocked_by_count?: number | undefined;
37
+ /** Visible blocker IDs when requested with include=blockers. */
38
+ blockers?: string[] | undefined;
37
39
  /** When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open. */
38
40
  closed_at?: string | null | undefined;
39
41
  /** Total number of comments posted on this task. */
@@ -54,12 +56,18 @@ export interface Task {
54
56
  due_date?: string | null | undefined;
55
57
  /** Free-form grouping label. `null` when the task is not in an epic. */
56
58
  epic?: string | null | undefined;
59
+ /** Server-owned authenticated human answer intent, keyed by question version. Not infrastructure permission. */
60
+ human_answer_receipts?: Record<string, unknown> | undefined;
57
61
  /** Task ID (`tsk_...`). */
58
62
  id: string;
59
- /** `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. */
63
+ /** `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 reads, including mutation responses. */
60
64
  is_blocked?: boolean | undefined;
65
+ /** True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads. */
66
+ is_stalled?: boolean | undefined;
61
67
  /** Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set. */
62
68
  links?: Record<string, unknown> | undefined;
69
+ /** Server-owned records of machine-applied local rescopes, keyed by question version. Never evidence that a human answered. */
70
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
63
71
  /** Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set. */
64
72
  metadata?: Record<string, unknown> | undefined;
65
73
  /** Human-readable title of the task. */
@@ -72,10 +80,12 @@ export interface Task {
72
80
  owner_agent?: string | null | undefined;
73
81
  /** 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. */
74
82
  owner_user?: string | null | undefined;
75
- /** ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level. */
83
+ /** ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level. */
76
84
  parent?: string | null | undefined;
77
85
  /** Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set. */
78
86
  priority?: number | undefined;
87
+ /** Optional project ID (`prj_...`). Membership does not change task visibility. */
88
+ project_id?: string | null | undefined;
79
89
  /** ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment. */
80
90
  sandbox?: string | null | undefined;
81
91
  /** Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source. */
@@ -84,15 +94,23 @@ export interface Task {
84
94
  source_scope?: string | null | undefined;
85
95
  /** Kind of source object (for example `repository`). `null` when the task has no source. */
86
96
  source_type?: string | null | undefined;
97
+ /** Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled. */
98
+ stalled_since?: string | null | undefined;
87
99
  /** Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`. */
88
100
  status: string;
89
- /** 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. */
101
+ /** Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks. */
90
102
  subtasks_count?: number | undefined;
91
103
  /** Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged. */
92
104
  tags?: string[] | undefined;
105
+ /** Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`. */
106
+ target_binary?: string | null | undefined;
107
+ /** Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target. */
108
+ target_version?: string | null | undefined;
109
+ /** First-class Epic membership; does not grant access to the task. */
110
+ task_epic?: string | null | undefined;
93
111
  /** ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team. */
94
112
  team?: string | null | undefined;
95
- /** 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. */
113
+ /** 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. */
96
114
  thread?: string | null | undefined;
97
115
  /** When the task was last modified (ISO 8601). */
98
116
  updated_at?: string | undefined;
@@ -105,8 +123,10 @@ export declare const taskSchema: z.ZodObject<{
105
123
  agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
124
  /** Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes. */
107
125
  aggregate_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
108
- /** 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. */
126
+ /** Number of readable 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. */
109
127
  blocked_by_count: z.ZodOptional<z.ZodNumber>;
128
+ /** Visible blocker IDs when requested with include=blockers. */
129
+ blockers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
110
130
  /** When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open. */
111
131
  closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
132
  /** Total number of comments posted on this task. */
@@ -197,12 +217,18 @@ export declare const taskSchema: z.ZodObject<{
197
217
  due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
218
  /** Free-form grouping label. `null` when the task is not in an epic. */
199
219
  epic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ /** Server-owned authenticated human answer intent, keyed by question version. Not infrastructure permission. */
221
+ human_answer_receipts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
200
222
  /** Task ID (`tsk_...`). */
201
223
  id: z.ZodString;
202
- /** `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. */
224
+ /** `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 reads, including mutation responses. */
203
225
  is_blocked: z.ZodOptional<z.ZodBoolean>;
226
+ /** True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads. */
227
+ is_stalled: z.ZodOptional<z.ZodBoolean>;
204
228
  /** Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set. */
205
229
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
230
+ /** Server-owned records of machine-applied local rescopes, keyed by question version. Never evidence that a human answered. */
231
+ machine_rescope_receipts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
206
232
  /** Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set. */
207
233
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
208
234
  /** Human-readable title of the task. */
@@ -270,10 +296,12 @@ export declare const taskSchema: z.ZodObject<{
270
296
  owner_agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
297
  /** 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. */
272
298
  owner_user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
- /** ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level. */
299
+ /** ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level. */
274
300
  parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
301
  /** Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set. */
276
302
  priority: z.ZodOptional<z.ZodNumber>;
303
+ /** Optional project ID (`prj_...`). Membership does not change task visibility. */
304
+ project_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
277
305
  /** ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment. */
278
306
  sandbox: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
307
  /** Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source. */
@@ -282,15 +310,23 @@ export declare const taskSchema: z.ZodObject<{
282
310
  source_scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
311
  /** Kind of source object (for example `repository`). `null` when the task has no source. */
284
312
  source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
+ /** Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled. */
314
+ stalled_since: z.ZodOptional<z.ZodNullable<z.ZodString>>;
285
315
  /** Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`. */
286
316
  status: z.ZodString;
287
- /** 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. */
317
+ /** Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks. */
288
318
  subtasks_count: z.ZodOptional<z.ZodNumber>;
289
319
  /** Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged. */
290
320
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
321
+ /** Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`. */
322
+ target_binary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
+ /** Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target. */
324
+ target_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
+ /** First-class Epic membership; does not grant access to the task. */
326
+ task_epic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
327
  /** ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team. */
292
328
  team: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
- /** 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. */
329
+ /** 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. */
294
330
  thread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
331
  /** When the task was last modified (ISO 8601). */
296
332
  updated_at: z.ZodOptional<z.ZodString>;
@@ -315,6 +351,7 @@ export declare const taskSchema: z.ZodObject<{
315
351
  tags?: string[] | undefined;
316
352
  aggregate_version?: number | null | undefined;
317
353
  blocked_by_count?: number | undefined;
354
+ blockers?: string[] | undefined;
318
355
  closed_at?: string | null | undefined;
319
356
  comments_count?: number | undefined;
320
357
  created_by_actor?: {
@@ -339,8 +376,11 @@ export declare const taskSchema: z.ZodObject<{
339
376
  } | null | undefined;
340
377
  due_date?: string | null | undefined;
341
378
  epic?: string | null | undefined;
379
+ human_answer_receipts?: Record<string, {} | null> | undefined;
342
380
  is_blocked?: boolean | undefined;
381
+ is_stalled?: boolean | undefined;
343
382
  links?: Record<string, {} | null> | undefined;
383
+ machine_rescope_receipts?: Record<string, {} | null> | undefined;
344
384
  owner_actor?: {
345
385
  name?: string | null | undefined;
346
386
  alias?: string | null | undefined;
@@ -358,10 +398,15 @@ export declare const taskSchema: z.ZodObject<{
358
398
  owner_agent?: string | null | undefined;
359
399
  owner_user?: string | null | undefined;
360
400
  priority?: number | undefined;
401
+ project_id?: string | null | undefined;
361
402
  source_id?: string | null | undefined;
362
403
  source_scope?: string | null | undefined;
363
404
  source_type?: string | null | undefined;
405
+ stalled_since?: string | null | undefined;
364
406
  subtasks_count?: number | undefined;
407
+ target_binary?: string | null | undefined;
408
+ target_version?: string | null | undefined;
409
+ task_epic?: string | null | undefined;
365
410
  }, {
366
411
  name: string;
367
412
  status: string;
@@ -381,6 +426,7 @@ export declare const taskSchema: z.ZodObject<{
381
426
  tags?: string[] | undefined;
382
427
  aggregate_version?: number | null | undefined;
383
428
  blocked_by_count?: number | undefined;
429
+ blockers?: string[] | undefined;
384
430
  closed_at?: string | null | undefined;
385
431
  comments_count?: number | undefined;
386
432
  created_by_actor?: {
@@ -405,8 +451,11 @@ export declare const taskSchema: z.ZodObject<{
405
451
  } | null | undefined;
406
452
  due_date?: string | null | undefined;
407
453
  epic?: string | null | undefined;
454
+ human_answer_receipts?: Record<string, {} | null> | undefined;
408
455
  is_blocked?: boolean | undefined;
456
+ is_stalled?: boolean | undefined;
409
457
  links?: Record<string, {} | null> | undefined;
458
+ machine_rescope_receipts?: Record<string, {} | null> | undefined;
410
459
  owner_actor?: {
411
460
  name?: string | null | undefined;
412
461
  alias?: string | null | undefined;
@@ -424,10 +473,15 @@ export declare const taskSchema: z.ZodObject<{
424
473
  owner_agent?: string | null | undefined;
425
474
  owner_user?: string | null | undefined;
426
475
  priority?: number | undefined;
476
+ project_id?: string | null | undefined;
427
477
  source_id?: string | null | undefined;
428
478
  source_scope?: string | null | undefined;
429
479
  source_type?: string | null | undefined;
480
+ stalled_since?: string | null | undefined;
430
481
  subtasks_count?: number | undefined;
482
+ target_binary?: string | null | undefined;
483
+ target_version?: string | null | undefined;
484
+ task_epic?: string | null | undefined;
431
485
  }>;
432
486
  /** A comment posted on a task by a user or an agent, including resolved author information. */
433
487
  export interface TaskComment {
@@ -541,6 +595,7 @@ export declare const taskCommentSchema: z.ZodObject<{
541
595
  created_at?: string | undefined;
542
596
  updated_at?: string | undefined;
543
597
  sandbox?: string | undefined;
598
+ task?: string | undefined;
544
599
  author_actor?: {
545
600
  name?: string | null | undefined;
546
601
  alias?: string | null | undefined;
@@ -557,7 +612,6 @@ export declare const taskCommentSchema: z.ZodObject<{
557
612
  } | undefined;
558
613
  author_agent?: string | undefined;
559
614
  author_user?: string | undefined;
560
- task?: string | undefined;
561
615
  }, {
562
616
  body: string;
563
617
  id: string;
@@ -566,6 +620,7 @@ export declare const taskCommentSchema: z.ZodObject<{
566
620
  created_at?: string | undefined;
567
621
  updated_at?: string | undefined;
568
622
  sandbox?: string | undefined;
623
+ task?: string | undefined;
569
624
  author_actor?: {
570
625
  name?: string | null | undefined;
571
626
  alias?: string | null | undefined;
@@ -582,7 +637,729 @@ export declare const taskCommentSchema: z.ZodObject<{
582
637
  } | undefined;
583
638
  author_agent?: string | undefined;
584
639
  author_user?: string | undefined;
585
- task?: string | undefined;
640
+ }>;
641
+ /** A retained visible task deletion. */
642
+ export interface TaskDeletion {
643
+ deleted_at: string;
644
+ task: string;
645
+ }
646
+ /** Runtime validator for {@link TaskDeletion}. */
647
+ export declare const taskDeletionSchema: z.ZodObject<{
648
+ deleted_at: z.ZodString;
649
+ task: z.ZodString;
650
+ }, "strip", z.ZodTypeAny, {
651
+ task: string;
652
+ deleted_at: string;
653
+ }, {
654
+ task: string;
655
+ deleted_at: string;
656
+ }>;
657
+ /** The current source task and whether this request created it. */
658
+ export interface TaskEnsureResult {
659
+ /** Whether this request created the task. */
660
+ created: boolean;
661
+ /** The current task. */
662
+ task: Task;
663
+ }
664
+ /** Runtime validator for {@link TaskEnsureResult}. */
665
+ export declare const taskEnsureResultSchema: z.ZodObject<{
666
+ /** Whether this request created the task. */
667
+ created: z.ZodBoolean;
668
+ /** The current task. */
669
+ task: z.ZodObject<{
670
+ /** ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user. */
671
+ agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
672
+ /** Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes. */
673
+ aggregate_version: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
674
+ /** Number of readable 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. */
675
+ blocked_by_count: z.ZodOptional<z.ZodNumber>;
676
+ /** Visible blocker IDs when requested with include=blockers. */
677
+ blockers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
678
+ /** When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open. */
679
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
680
+ /** Total number of comments posted on this task. */
681
+ comments_count: z.ZodOptional<z.ZodNumber>;
682
+ /** When the task was created (ISO 8601). */
683
+ created_at: z.ZodOptional<z.ZodString>;
684
+ /** 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). */
685
+ created_by_actor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
686
+ alias: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
688
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
689
+ profile_picture: z.ZodOptional<z.ZodNullable<z.ZodObject<{
690
+ file: z.ZodOptional<z.ZodNullable<z.ZodString>>;
691
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
692
+ media: z.ZodOptional<z.ZodNullable<z.ZodString>>;
693
+ mime_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
694
+ refresh_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
695
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ mime_type?: string | null | undefined;
699
+ file?: string | null | undefined;
700
+ height?: number | null | undefined;
701
+ media?: string | null | undefined;
702
+ refresh_url?: string | null | undefined;
703
+ url?: string | null | undefined;
704
+ width?: number | null | undefined;
705
+ }, {
706
+ mime_type?: string | null | undefined;
707
+ file?: string | null | undefined;
708
+ height?: number | null | undefined;
709
+ media?: string | null | undefined;
710
+ refresh_url?: string | null | undefined;
711
+ url?: string | null | undefined;
712
+ width?: number | null | undefined;
713
+ }>>>;
714
+ }, "strip", z.ZodTypeAny, {
715
+ name?: string | null | undefined;
716
+ alias?: string | null | undefined;
717
+ id?: string | null | undefined;
718
+ profile_picture?: {
719
+ mime_type?: string | null | undefined;
720
+ file?: string | null | undefined;
721
+ height?: number | null | undefined;
722
+ media?: string | null | undefined;
723
+ refresh_url?: string | null | undefined;
724
+ url?: string | null | undefined;
725
+ width?: number | null | undefined;
726
+ } | null | undefined;
727
+ }, {
728
+ name?: string | null | undefined;
729
+ alias?: string | null | undefined;
730
+ id?: string | null | undefined;
731
+ profile_picture?: {
732
+ mime_type?: string | null | undefined;
733
+ file?: string | null | undefined;
734
+ height?: number | null | undefined;
735
+ media?: string | null | undefined;
736
+ refresh_url?: string | null | undefined;
737
+ url?: string | null | undefined;
738
+ width?: number | null | undefined;
739
+ } | null | undefined;
740
+ }>>>;
741
+ /** 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. */
742
+ created_by_agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
743
+ /** 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. */
744
+ created_by_user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
745
+ /** Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included. */
746
+ current_lease: z.ZodOptional<z.ZodNullable<z.ZodObject<{
747
+ /** Server-calculated lease expiry in ISO 8601 format. */
748
+ expires_at: z.ZodString;
749
+ /** Bounded harness identifier for the coding session. */
750
+ harness: z.ZodString;
751
+ /** Display name supplied by the coding session that holds the lease. */
752
+ session_name: z.ZodString;
753
+ }, "strip", z.ZodTypeAny, {
754
+ expires_at: string;
755
+ harness: string;
756
+ session_name: string;
757
+ }, {
758
+ expires_at: string;
759
+ harness: string;
760
+ session_name: string;
761
+ }>>>;
762
+ /** Long-form description or notes for the task. `null` if no description has been provided. */
763
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
764
+ /** Date and time by which the task should be completed (ISO 8601). `null` if no due date is set. */
765
+ due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
766
+ /** Free-form grouping label. `null` when the task is not in an epic. */
767
+ epic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
768
+ /** Server-owned authenticated human answer intent, keyed by question version. Not infrastructure permission. */
769
+ human_answer_receipts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
770
+ /** Task ID (`tsk_...`). */
771
+ id: z.ZodString;
772
+ /** `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 reads, including mutation responses. */
773
+ is_blocked: z.ZodOptional<z.ZodBoolean>;
774
+ /** True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads. */
775
+ is_stalled: z.ZodOptional<z.ZodBoolean>;
776
+ /** Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set. */
777
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
778
+ /** Server-owned records of machine-applied local rescopes, keyed by question version. Never evidence that a human answered. */
779
+ machine_rescope_receipts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
780
+ /** Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set. */
781
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
782
+ /** Human-readable title of the task. */
783
+ name: z.ZodString;
784
+ /** ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context. */
785
+ org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
786
+ /** 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). */
787
+ owner_actor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
788
+ alias: z.ZodOptional<z.ZodNullable<z.ZodString>>;
789
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
790
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
+ profile_picture: z.ZodOptional<z.ZodNullable<z.ZodObject<{
792
+ file: z.ZodOptional<z.ZodNullable<z.ZodString>>;
793
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
794
+ media: z.ZodOptional<z.ZodNullable<z.ZodString>>;
795
+ mime_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
796
+ refresh_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
797
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
798
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
799
+ }, "strip", z.ZodTypeAny, {
800
+ mime_type?: string | null | undefined;
801
+ file?: string | null | undefined;
802
+ height?: number | null | undefined;
803
+ media?: string | null | undefined;
804
+ refresh_url?: string | null | undefined;
805
+ url?: string | null | undefined;
806
+ width?: number | null | undefined;
807
+ }, {
808
+ mime_type?: string | null | undefined;
809
+ file?: string | null | undefined;
810
+ height?: number | null | undefined;
811
+ media?: string | null | undefined;
812
+ refresh_url?: string | null | undefined;
813
+ url?: string | null | undefined;
814
+ width?: number | null | undefined;
815
+ }>>>;
816
+ }, "strip", z.ZodTypeAny, {
817
+ name?: string | null | undefined;
818
+ alias?: string | null | undefined;
819
+ id?: string | null | undefined;
820
+ profile_picture?: {
821
+ mime_type?: string | null | undefined;
822
+ file?: string | null | undefined;
823
+ height?: number | null | undefined;
824
+ media?: string | null | undefined;
825
+ refresh_url?: string | null | undefined;
826
+ url?: string | null | undefined;
827
+ width?: number | null | undefined;
828
+ } | null | undefined;
829
+ }, {
830
+ name?: string | null | undefined;
831
+ alias?: string | null | undefined;
832
+ id?: string | null | undefined;
833
+ profile_picture?: {
834
+ mime_type?: string | null | undefined;
835
+ file?: string | null | undefined;
836
+ height?: number | null | undefined;
837
+ media?: string | null | undefined;
838
+ refresh_url?: string | null | undefined;
839
+ url?: string | null | undefined;
840
+ width?: number | null | undefined;
841
+ } | null | undefined;
842
+ }>>>;
843
+ /** 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. */
844
+ owner_agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
845
+ /** 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. */
846
+ owner_user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
847
+ /** ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level. */
848
+ parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
849
+ /** Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set. */
850
+ priority: z.ZodOptional<z.ZodNumber>;
851
+ /** Optional project ID (`prj_...`). Membership does not change task visibility. */
852
+ project_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
853
+ /** ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment. */
854
+ sandbox: z.ZodOptional<z.ZodNullable<z.ZodString>>;
855
+ /** Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source. */
856
+ source_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
857
+ /** 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`. */
858
+ source_scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
859
+ /** Kind of source object (for example `repository`). `null` when the task has no source. */
860
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
861
+ /** Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled. */
862
+ stalled_since: z.ZodOptional<z.ZodNullable<z.ZodString>>;
863
+ /** Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`. */
864
+ status: z.ZodString;
865
+ /** Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks. */
866
+ subtasks_count: z.ZodOptional<z.ZodNumber>;
867
+ /** Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged. */
868
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
869
+ /** Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`. */
870
+ target_binary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
871
+ /** Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target. */
872
+ target_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
873
+ /** First-class Epic membership; does not grant access to the task. */
874
+ task_epic: z.ZodOptional<z.ZodNullable<z.ZodString>>;
875
+ /** ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team. */
876
+ team: z.ZodOptional<z.ZodNullable<z.ZodString>>;
877
+ /** 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. */
878
+ thread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
879
+ /** When the task was last modified (ISO 8601). */
880
+ updated_at: z.ZodOptional<z.ZodString>;
881
+ /** ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team. */
882
+ user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
883
+ }, "strip", z.ZodTypeAny, {
884
+ name: string;
885
+ status: string;
886
+ id: string;
887
+ user?: string | null | undefined;
888
+ org?: string | null | undefined;
889
+ agent?: string | null | undefined;
890
+ thread?: string | null | undefined;
891
+ team?: string | null | undefined;
892
+ description?: string | null | undefined;
893
+ created_at?: string | undefined;
894
+ updated_at?: string | undefined;
895
+ sandbox?: string | null | undefined;
896
+ parent?: string | null | undefined;
897
+ created_by_user?: string | null | undefined;
898
+ metadata?: Record<string, {} | null> | undefined;
899
+ tags?: string[] | undefined;
900
+ aggregate_version?: number | null | undefined;
901
+ blocked_by_count?: number | undefined;
902
+ blockers?: string[] | undefined;
903
+ closed_at?: string | null | undefined;
904
+ comments_count?: number | undefined;
905
+ created_by_actor?: {
906
+ name?: string | null | undefined;
907
+ alias?: string | null | undefined;
908
+ id?: string | null | undefined;
909
+ profile_picture?: {
910
+ mime_type?: string | null | undefined;
911
+ file?: string | null | undefined;
912
+ height?: number | null | undefined;
913
+ media?: string | null | undefined;
914
+ refresh_url?: string | null | undefined;
915
+ url?: string | null | undefined;
916
+ width?: number | null | undefined;
917
+ } | null | undefined;
918
+ } | null | undefined;
919
+ created_by_agent?: string | null | undefined;
920
+ current_lease?: {
921
+ expires_at: string;
922
+ harness: string;
923
+ session_name: string;
924
+ } | null | undefined;
925
+ due_date?: string | null | undefined;
926
+ epic?: string | null | undefined;
927
+ human_answer_receipts?: Record<string, {} | null> | undefined;
928
+ is_blocked?: boolean | undefined;
929
+ is_stalled?: boolean | undefined;
930
+ links?: Record<string, {} | null> | undefined;
931
+ machine_rescope_receipts?: Record<string, {} | null> | undefined;
932
+ owner_actor?: {
933
+ name?: string | null | undefined;
934
+ alias?: string | null | undefined;
935
+ id?: string | null | undefined;
936
+ profile_picture?: {
937
+ mime_type?: string | null | undefined;
938
+ file?: string | null | undefined;
939
+ height?: number | null | undefined;
940
+ media?: string | null | undefined;
941
+ refresh_url?: string | null | undefined;
942
+ url?: string | null | undefined;
943
+ width?: number | null | undefined;
944
+ } | null | undefined;
945
+ } | null | undefined;
946
+ owner_agent?: string | null | undefined;
947
+ owner_user?: string | null | undefined;
948
+ priority?: number | undefined;
949
+ project_id?: string | null | undefined;
950
+ source_id?: string | null | undefined;
951
+ source_scope?: string | null | undefined;
952
+ source_type?: string | null | undefined;
953
+ stalled_since?: string | null | undefined;
954
+ subtasks_count?: number | undefined;
955
+ target_binary?: string | null | undefined;
956
+ target_version?: string | null | undefined;
957
+ task_epic?: string | null | undefined;
958
+ }, {
959
+ name: string;
960
+ status: string;
961
+ id: string;
962
+ user?: string | null | undefined;
963
+ org?: string | null | undefined;
964
+ agent?: string | null | undefined;
965
+ thread?: string | null | undefined;
966
+ team?: string | null | undefined;
967
+ description?: string | null | undefined;
968
+ created_at?: string | undefined;
969
+ updated_at?: string | undefined;
970
+ sandbox?: string | null | undefined;
971
+ parent?: string | null | undefined;
972
+ created_by_user?: string | null | undefined;
973
+ metadata?: Record<string, {} | null> | undefined;
974
+ tags?: string[] | undefined;
975
+ aggregate_version?: number | null | undefined;
976
+ blocked_by_count?: number | undefined;
977
+ blockers?: string[] | undefined;
978
+ closed_at?: string | null | undefined;
979
+ comments_count?: number | undefined;
980
+ created_by_actor?: {
981
+ name?: string | null | undefined;
982
+ alias?: string | null | undefined;
983
+ id?: string | null | undefined;
984
+ profile_picture?: {
985
+ mime_type?: string | null | undefined;
986
+ file?: string | null | undefined;
987
+ height?: number | null | undefined;
988
+ media?: string | null | undefined;
989
+ refresh_url?: string | null | undefined;
990
+ url?: string | null | undefined;
991
+ width?: number | null | undefined;
992
+ } | null | undefined;
993
+ } | null | undefined;
994
+ created_by_agent?: string | null | undefined;
995
+ current_lease?: {
996
+ expires_at: string;
997
+ harness: string;
998
+ session_name: string;
999
+ } | null | undefined;
1000
+ due_date?: string | null | undefined;
1001
+ epic?: string | null | undefined;
1002
+ human_answer_receipts?: Record<string, {} | null> | undefined;
1003
+ is_blocked?: boolean | undefined;
1004
+ is_stalled?: boolean | undefined;
1005
+ links?: Record<string, {} | null> | undefined;
1006
+ machine_rescope_receipts?: Record<string, {} | null> | undefined;
1007
+ owner_actor?: {
1008
+ name?: string | null | undefined;
1009
+ alias?: string | null | undefined;
1010
+ id?: string | null | undefined;
1011
+ profile_picture?: {
1012
+ mime_type?: string | null | undefined;
1013
+ file?: string | null | undefined;
1014
+ height?: number | null | undefined;
1015
+ media?: string | null | undefined;
1016
+ refresh_url?: string | null | undefined;
1017
+ url?: string | null | undefined;
1018
+ width?: number | null | undefined;
1019
+ } | null | undefined;
1020
+ } | null | undefined;
1021
+ owner_agent?: string | null | undefined;
1022
+ owner_user?: string | null | undefined;
1023
+ priority?: number | undefined;
1024
+ project_id?: string | null | undefined;
1025
+ source_id?: string | null | undefined;
1026
+ source_scope?: string | null | undefined;
1027
+ source_type?: string | null | undefined;
1028
+ stalled_since?: string | null | undefined;
1029
+ subtasks_count?: number | undefined;
1030
+ target_binary?: string | null | undefined;
1031
+ target_version?: string | null | undefined;
1032
+ task_epic?: string | null | undefined;
1033
+ }>;
1034
+ }, "strip", z.ZodTypeAny, {
1035
+ task: {
1036
+ name: string;
1037
+ status: string;
1038
+ id: string;
1039
+ user?: string | null | undefined;
1040
+ org?: string | null | undefined;
1041
+ agent?: string | null | undefined;
1042
+ thread?: string | null | undefined;
1043
+ team?: string | null | undefined;
1044
+ description?: string | null | undefined;
1045
+ created_at?: string | undefined;
1046
+ updated_at?: string | undefined;
1047
+ sandbox?: string | null | undefined;
1048
+ parent?: string | null | undefined;
1049
+ created_by_user?: string | null | undefined;
1050
+ metadata?: Record<string, {} | null> | undefined;
1051
+ tags?: string[] | undefined;
1052
+ aggregate_version?: number | null | undefined;
1053
+ blocked_by_count?: number | undefined;
1054
+ blockers?: string[] | undefined;
1055
+ closed_at?: string | null | undefined;
1056
+ comments_count?: number | undefined;
1057
+ created_by_actor?: {
1058
+ name?: string | null | undefined;
1059
+ alias?: string | null | undefined;
1060
+ id?: string | null | undefined;
1061
+ profile_picture?: {
1062
+ mime_type?: string | null | undefined;
1063
+ file?: string | null | undefined;
1064
+ height?: number | null | undefined;
1065
+ media?: string | null | undefined;
1066
+ refresh_url?: string | null | undefined;
1067
+ url?: string | null | undefined;
1068
+ width?: number | null | undefined;
1069
+ } | null | undefined;
1070
+ } | null | undefined;
1071
+ created_by_agent?: string | null | undefined;
1072
+ current_lease?: {
1073
+ expires_at: string;
1074
+ harness: string;
1075
+ session_name: string;
1076
+ } | null | undefined;
1077
+ due_date?: string | null | undefined;
1078
+ epic?: string | null | undefined;
1079
+ human_answer_receipts?: Record<string, {} | null> | undefined;
1080
+ is_blocked?: boolean | undefined;
1081
+ is_stalled?: boolean | undefined;
1082
+ links?: Record<string, {} | null> | undefined;
1083
+ machine_rescope_receipts?: Record<string, {} | null> | undefined;
1084
+ owner_actor?: {
1085
+ name?: string | null | undefined;
1086
+ alias?: string | null | undefined;
1087
+ id?: string | null | undefined;
1088
+ profile_picture?: {
1089
+ mime_type?: string | null | undefined;
1090
+ file?: string | null | undefined;
1091
+ height?: number | null | undefined;
1092
+ media?: string | null | undefined;
1093
+ refresh_url?: string | null | undefined;
1094
+ url?: string | null | undefined;
1095
+ width?: number | null | undefined;
1096
+ } | null | undefined;
1097
+ } | null | undefined;
1098
+ owner_agent?: string | null | undefined;
1099
+ owner_user?: string | null | undefined;
1100
+ priority?: number | undefined;
1101
+ project_id?: string | null | undefined;
1102
+ source_id?: string | null | undefined;
1103
+ source_scope?: string | null | undefined;
1104
+ source_type?: string | null | undefined;
1105
+ stalled_since?: string | null | undefined;
1106
+ subtasks_count?: number | undefined;
1107
+ target_binary?: string | null | undefined;
1108
+ target_version?: string | null | undefined;
1109
+ task_epic?: string | null | undefined;
1110
+ };
1111
+ created: boolean;
1112
+ }, {
1113
+ task: {
1114
+ name: string;
1115
+ status: string;
1116
+ id: string;
1117
+ user?: string | null | undefined;
1118
+ org?: string | null | undefined;
1119
+ agent?: string | null | undefined;
1120
+ thread?: string | null | undefined;
1121
+ team?: string | null | undefined;
1122
+ description?: string | null | undefined;
1123
+ created_at?: string | undefined;
1124
+ updated_at?: string | undefined;
1125
+ sandbox?: string | null | undefined;
1126
+ parent?: string | null | undefined;
1127
+ created_by_user?: string | null | undefined;
1128
+ metadata?: Record<string, {} | null> | undefined;
1129
+ tags?: string[] | undefined;
1130
+ aggregate_version?: number | null | undefined;
1131
+ blocked_by_count?: number | undefined;
1132
+ blockers?: string[] | undefined;
1133
+ closed_at?: string | null | undefined;
1134
+ comments_count?: number | undefined;
1135
+ created_by_actor?: {
1136
+ name?: string | null | undefined;
1137
+ alias?: string | null | undefined;
1138
+ id?: string | null | undefined;
1139
+ profile_picture?: {
1140
+ mime_type?: string | null | undefined;
1141
+ file?: string | null | undefined;
1142
+ height?: number | null | undefined;
1143
+ media?: string | null | undefined;
1144
+ refresh_url?: string | null | undefined;
1145
+ url?: string | null | undefined;
1146
+ width?: number | null | undefined;
1147
+ } | null | undefined;
1148
+ } | null | undefined;
1149
+ created_by_agent?: string | null | undefined;
1150
+ current_lease?: {
1151
+ expires_at: string;
1152
+ harness: string;
1153
+ session_name: string;
1154
+ } | null | undefined;
1155
+ due_date?: string | null | undefined;
1156
+ epic?: string | null | undefined;
1157
+ human_answer_receipts?: Record<string, {} | null> | undefined;
1158
+ is_blocked?: boolean | undefined;
1159
+ is_stalled?: boolean | undefined;
1160
+ links?: Record<string, {} | null> | undefined;
1161
+ machine_rescope_receipts?: Record<string, {} | null> | undefined;
1162
+ owner_actor?: {
1163
+ name?: string | null | undefined;
1164
+ alias?: string | null | undefined;
1165
+ id?: string | null | undefined;
1166
+ profile_picture?: {
1167
+ mime_type?: string | null | undefined;
1168
+ file?: string | null | undefined;
1169
+ height?: number | null | undefined;
1170
+ media?: string | null | undefined;
1171
+ refresh_url?: string | null | undefined;
1172
+ url?: string | null | undefined;
1173
+ width?: number | null | undefined;
1174
+ } | null | undefined;
1175
+ } | null | undefined;
1176
+ owner_agent?: string | null | undefined;
1177
+ owner_user?: string | null | undefined;
1178
+ priority?: number | undefined;
1179
+ project_id?: string | null | undefined;
1180
+ source_id?: string | null | undefined;
1181
+ source_scope?: string | null | undefined;
1182
+ source_type?: string | null | undefined;
1183
+ stalled_since?: string | null | undefined;
1184
+ subtasks_count?: number | undefined;
1185
+ target_binary?: string | null | undefined;
1186
+ target_version?: string | null | undefined;
1187
+ task_epic?: string | null | undefined;
1188
+ };
1189
+ created: boolean;
1190
+ }>;
1191
+ export interface TaskEpicDrafts {
1192
+ drafts_version: number;
1193
+ frozen: boolean;
1194
+ tasks: Record<string, unknown>[];
1195
+ }
1196
+ /** Runtime validator for {@link TaskEpicDrafts}. */
1197
+ export declare const taskEpicDraftsSchema: z.ZodObject<{
1198
+ drafts_version: z.ZodNumber;
1199
+ frozen: z.ZodBoolean;
1200
+ tasks: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>, "many">;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ drafts_version: number;
1203
+ frozen: boolean;
1204
+ tasks: Record<string, {} | null>[];
1205
+ }, {
1206
+ drafts_version: number;
1207
+ frozen: boolean;
1208
+ tasks: Record<string, {} | null>[];
1209
+ }>;
1210
+ /** A first-class Epic, with counts restricted to tasks visible to the caller. */
1211
+ export interface TaskEpicEntity {
1212
+ app_id: string;
1213
+ description?: string | null | undefined;
1214
+ drafts_version: number;
1215
+ id: string;
1216
+ links: Record<string, unknown>[];
1217
+ metadata: Record<string, unknown>;
1218
+ name: string;
1219
+ owner: Record<string, unknown>;
1220
+ publish_state: string;
1221
+ rollup: Record<string, unknown>;
1222
+ sandbox_id?: string | null | undefined;
1223
+ state: string;
1224
+ version: number;
1225
+ }
1226
+ /** Runtime validator for {@link TaskEpicEntity}. */
1227
+ export declare const taskEpicEntitySchema: z.ZodObject<{
1228
+ app_id: z.ZodString;
1229
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1230
+ drafts_version: z.ZodNumber;
1231
+ id: z.ZodString;
1232
+ links: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>, "many">;
1233
+ metadata: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
1234
+ name: z.ZodString;
1235
+ owner: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
1236
+ publish_state: z.ZodString;
1237
+ rollup: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
1238
+ sandbox_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1239
+ state: z.ZodString;
1240
+ version: z.ZodNumber;
1241
+ }, "strip", z.ZodTypeAny, {
1242
+ name: string;
1243
+ id: string;
1244
+ metadata: Record<string, {} | null>;
1245
+ version: number;
1246
+ state: string;
1247
+ app_id: string;
1248
+ links: Record<string, {} | null>[];
1249
+ drafts_version: number;
1250
+ owner: Record<string, {} | null>;
1251
+ publish_state: string;
1252
+ rollup: Record<string, {} | null>;
1253
+ description?: string | null | undefined;
1254
+ sandbox_id?: string | null | undefined;
1255
+ }, {
1256
+ name: string;
1257
+ id: string;
1258
+ metadata: Record<string, {} | null>;
1259
+ version: number;
1260
+ state: string;
1261
+ app_id: string;
1262
+ links: Record<string, {} | null>[];
1263
+ drafts_version: number;
1264
+ owner: Record<string, {} | null>;
1265
+ publish_state: string;
1266
+ rollup: Record<string, {} | null>;
1267
+ description?: string | null | undefined;
1268
+ sandbox_id?: string | null | undefined;
1269
+ }>;
1270
+ /** Entity representation of an owner's Epic collection; not a label-summary page. */
1271
+ export interface TaskEpicEntityCollection {
1272
+ after_cursor?: string | null | undefined;
1273
+ before_cursor?: string | null | undefined;
1274
+ data: TaskEpicEntity[];
1275
+ has_more: boolean;
1276
+ }
1277
+ /** Runtime validator for {@link TaskEpicEntityCollection}. */
1278
+ export declare const taskEpicEntityCollectionSchema: z.ZodObject<{
1279
+ after_cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1280
+ before_cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1281
+ data: z.ZodArray<z.ZodObject<{
1282
+ app_id: z.ZodString;
1283
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1284
+ drafts_version: z.ZodNumber;
1285
+ id: z.ZodString;
1286
+ links: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>, "many">;
1287
+ metadata: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
1288
+ name: z.ZodString;
1289
+ owner: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
1290
+ publish_state: z.ZodString;
1291
+ rollup: z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>;
1292
+ sandbox_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1293
+ state: z.ZodString;
1294
+ version: z.ZodNumber;
1295
+ }, "strip", z.ZodTypeAny, {
1296
+ name: string;
1297
+ id: string;
1298
+ metadata: Record<string, {} | null>;
1299
+ version: number;
1300
+ state: string;
1301
+ app_id: string;
1302
+ links: Record<string, {} | null>[];
1303
+ drafts_version: number;
1304
+ owner: Record<string, {} | null>;
1305
+ publish_state: string;
1306
+ rollup: Record<string, {} | null>;
1307
+ description?: string | null | undefined;
1308
+ sandbox_id?: string | null | undefined;
1309
+ }, {
1310
+ name: string;
1311
+ id: string;
1312
+ metadata: Record<string, {} | null>;
1313
+ version: number;
1314
+ state: string;
1315
+ app_id: string;
1316
+ links: Record<string, {} | null>[];
1317
+ drafts_version: number;
1318
+ owner: Record<string, {} | null>;
1319
+ publish_state: string;
1320
+ rollup: Record<string, {} | null>;
1321
+ description?: string | null | undefined;
1322
+ sandbox_id?: string | null | undefined;
1323
+ }>, "many">;
1324
+ has_more: z.ZodBoolean;
1325
+ }, "strip", z.ZodTypeAny, {
1326
+ data: {
1327
+ name: string;
1328
+ id: string;
1329
+ metadata: Record<string, {} | null>;
1330
+ version: number;
1331
+ state: string;
1332
+ app_id: string;
1333
+ links: Record<string, {} | null>[];
1334
+ drafts_version: number;
1335
+ owner: Record<string, {} | null>;
1336
+ publish_state: string;
1337
+ rollup: Record<string, {} | null>;
1338
+ description?: string | null | undefined;
1339
+ sandbox_id?: string | null | undefined;
1340
+ }[];
1341
+ has_more: boolean;
1342
+ before_cursor?: string | null | undefined;
1343
+ after_cursor?: string | null | undefined;
1344
+ }, {
1345
+ data: {
1346
+ name: string;
1347
+ id: string;
1348
+ metadata: Record<string, {} | null>;
1349
+ version: number;
1350
+ state: string;
1351
+ app_id: string;
1352
+ links: Record<string, {} | null>[];
1353
+ drafts_version: number;
1354
+ owner: Record<string, {} | null>;
1355
+ publish_state: string;
1356
+ rollup: Record<string, {} | null>;
1357
+ description?: string | null | undefined;
1358
+ sandbox_id?: string | null | undefined;
1359
+ }[];
1360
+ has_more: boolean;
1361
+ before_cursor?: string | null | undefined;
1362
+ after_cursor?: string | null | undefined;
586
1363
  }>;
587
1364
  /** An indexed external object linked to a task. */
588
1365
  export interface TaskExternalLink {
@@ -610,6 +1387,36 @@ export declare const taskExternalLinkSchema: z.ZodObject<{
610
1387
  object_id: string;
611
1388
  object_type: string;
612
1389
  }>;
1390
+ /**
1391
+ * The background job accepted for a task ownership conversion.
1392
+ * Acceptance authorizes the root only. The worker validates and checkpoints the
1393
+ * connected graph before transferring ownership; validation can fail after 202.
1394
+ */
1395
+ export interface TaskOwnershipJob {
1396
+ /** Background job ID. */
1397
+ job_id: number;
1398
+ /** Completed transfers are still reaching task read models. False when preparation failed or the job was cancelled before selecting tasks. */
1399
+ projection_pending?: boolean | undefined;
1400
+ /** Current background job state. */
1401
+ status: string;
1402
+ }
1403
+ /** Runtime validator for {@link TaskOwnershipJob}. */
1404
+ export declare const taskOwnershipJobSchema: z.ZodObject<{
1405
+ /** Background job ID. */
1406
+ job_id: z.ZodNumber;
1407
+ /** Completed transfers are still reaching task read models. False when preparation failed or the job was cancelled before selecting tasks. */
1408
+ projection_pending: z.ZodOptional<z.ZodBoolean>;
1409
+ /** Current background job state. */
1410
+ status: z.ZodString;
1411
+ }, "strip", z.ZodTypeAny, {
1412
+ status: string;
1413
+ job_id: number;
1414
+ projection_pending?: boolean | undefined;
1415
+ }, {
1416
+ status: string;
1417
+ job_id: number;
1418
+ projection_pending?: boolean | undefined;
1419
+ }>;
613
1420
  /** A task-session lease returned only to its matching holder. */
614
1421
  export interface TaskSessionLease {
615
1422
  /** Server-calculated lease expiry in ISO 8601 format. */
@@ -618,12 +1425,18 @@ export interface TaskSessionLease {
618
1425
  harness: string;
619
1426
  /** Caller-generated fencing token required for renewal and release. */
620
1427
  lease_id: string;
1428
+ /** Milliseconds of lease left when the response was built, clamped at zero. A renewal made while more than half the lease remains appends no event and leaves the expiry unchanged, so clients derive their deadline from this value. */
1429
+ lease_remaining_ms: number;
621
1430
  /** Server timestamp for the most recent claim, reclaim, or renewal. */
622
1431
  renewed_at: string;
623
1432
  /** Opaque caller-generated coding-session identifier. */
624
1433
  session_id: string;
625
1434
  /** Display name supplied by the matching coding session. */
626
1435
  session_name: string;
1436
+ /** Task aggregate version including the claim, reclaim, or renewal event. */
1437
+ task_aggregate_version: number;
1438
+ /** Native task status after the lease event. */
1439
+ task_status: string;
627
1440
  }
628
1441
  /** Runtime validator for {@link TaskSessionLease}. */
629
1442
  export declare const taskSessionLeaseSchema: z.ZodObject<{
@@ -633,25 +1446,37 @@ export declare const taskSessionLeaseSchema: z.ZodObject<{
633
1446
  harness: z.ZodString;
634
1447
  /** Caller-generated fencing token required for renewal and release. */
635
1448
  lease_id: z.ZodString;
1449
+ /** Milliseconds of lease left when the response was built, clamped at zero. A renewal made while more than half the lease remains appends no event and leaves the expiry unchanged, so clients derive their deadline from this value. */
1450
+ lease_remaining_ms: z.ZodNumber;
636
1451
  /** Server timestamp for the most recent claim, reclaim, or renewal. */
637
1452
  renewed_at: z.ZodString;
638
1453
  /** Opaque caller-generated coding-session identifier. */
639
1454
  session_id: z.ZodString;
640
1455
  /** Display name supplied by the matching coding session. */
641
1456
  session_name: z.ZodString;
1457
+ /** Task aggregate version including the claim, reclaim, or renewal event. */
1458
+ task_aggregate_version: z.ZodNumber;
1459
+ /** Native task status after the lease event. */
1460
+ task_status: z.ZodString;
642
1461
  }, "strip", z.ZodTypeAny, {
643
- expires_at: string;
644
1462
  session_id: string;
1463
+ expires_at: string;
645
1464
  harness: string;
646
1465
  session_name: string;
647
1466
  lease_id: string;
1467
+ lease_remaining_ms: number;
648
1468
  renewed_at: string;
1469
+ task_aggregate_version: number;
1470
+ task_status: string;
649
1471
  }, {
650
- expires_at: string;
651
1472
  session_id: string;
1473
+ expires_at: string;
652
1474
  harness: string;
653
1475
  session_name: string;
654
1476
  lease_id: string;
1477
+ lease_remaining_ms: number;
655
1478
  renewed_at: string;
1479
+ task_aggregate_version: number;
1480
+ task_status: string;
656
1481
  }>;
657
1482
  //# sourceMappingURL=tasks.d.ts.map