@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
@@ -1,5 +1,819 @@
1
1
  import { HttpClient } from "../../runtime/http-client.js";
2
+ import type { Task, TaskDeletion, TaskEnsureResult, TaskEpicEntity, TaskEpicEntityCollection } from "../../types/tasks.js";
2
3
  import type { Thread } from "../../types/threads.js";
4
+ export declare class OrgTaskEpicResource {
5
+ private http;
6
+ constructor(http: HttpClient);
7
+ /**
8
+ * List an organization's epic summaries
9
+ * Groups org-owned tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created.
10
+ * @param org - Organization ID (`org_...`) owning the tasks.
11
+ * @param params - Query parameters.
12
+ * @param params.representation - labels (default) or entities.
13
+ * @param params.name - Exact entity name; only used for entities.
14
+ * @param params.sourceScope - Exact source scope; supply all three source fields.
15
+ * @param params.sourceType - Exact source type.
16
+ * @param params.sourceId - Exact source ID.
17
+ * @param params.topPriority - Exact highest open priority, from 0 to 4.
18
+ * @param params.owner - Keep only epics with at least one non-closed task owned by this user: `me` or a user public ID (`usr_...`).
19
+ * @param params.includeClosed - Include epics with no non-closed tasks; defaults to false.
20
+ * @param params.limit - Maximum epics; defaults to 50, capped at 100.
21
+ * @param params.afterCursor - Opaque forward cursor from the preceding page.
22
+ * @returns Successful response
23
+ */
24
+ list(org: string, params?: {
25
+ representation?: string;
26
+ name?: string;
27
+ sourceScope?: string;
28
+ sourceType?: string;
29
+ sourceId?: string;
30
+ topPriority?: number;
31
+ owner?: string;
32
+ includeClosed?: boolean;
33
+ limit?: number;
34
+ afterCursor?: string;
35
+ }): Promise<{
36
+ after_cursor?: string | null | undefined;
37
+ before_cursor?: string | null | undefined;
38
+ data: {
39
+ blocked_count: number;
40
+ counts: Record<string, unknown>;
41
+ epic: string;
42
+ next_ready: {
43
+ id: string;
44
+ name: string;
45
+ priority: number;
46
+ status: string;
47
+ }[];
48
+ owner?: {
49
+ alias?: string | null | undefined;
50
+ id?: string | null | undefined;
51
+ name?: string | null | undefined;
52
+ profile_picture?: {
53
+ file?: string | null | undefined;
54
+ height?: number | null | undefined;
55
+ media?: string | null | undefined;
56
+ mime_type?: string | null | undefined;
57
+ refresh_url?: string | null | undefined;
58
+ url?: string | null | undefined;
59
+ width?: number | null | undefined;
60
+ } | null | undefined;
61
+ } | null | undefined;
62
+ primary_task?: {
63
+ id: string;
64
+ name: string;
65
+ priority: number;
66
+ status: string;
67
+ } | null | undefined;
68
+ root_blockers: {
69
+ downstream_count: number;
70
+ id: string;
71
+ name: string;
72
+ priority: number;
73
+ status: string;
74
+ }[];
75
+ root_blockers_partial: boolean;
76
+ top_open_priority?: number | null | undefined;
77
+ updated_at: string;
78
+ }[];
79
+ has_more: boolean;
80
+ no_epic_open_count: number;
81
+ } | TaskEpicEntityCollection>;
82
+ /**
83
+ * Create an organization task Epic
84
+ * @param org - Organization ID (`org_...`) owning the tasks.
85
+ * @param input - Request body.
86
+ * @returns Successful response
87
+ */
88
+ create(org: string, input: {
89
+ description?: string | undefined;
90
+ metadata?: Record<string, unknown> | undefined;
91
+ name: string;
92
+ state?: string | undefined;
93
+ }): Promise<TaskEpicEntity>;
94
+ }
95
+ export declare class OrgTaskResource {
96
+ private http;
97
+ constructor(http: HttpClient);
98
+ /**
99
+ * List an organization's tasks
100
+ * Returns org-owned tasks for the specified organization: rows with the org
101
+ * tenant and no narrower user/team/agent scope. Explicitly personal, team, or
102
+ * agent tasks are excluded here; list those via the user/team collections or
103
+ * fetch them directly when authorized.
104
+ * Every organization member may list. App-scoped developer and
105
+ * server-to-server callers supply the org in the route.
106
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
107
+ * @param params - Query parameters.
108
+ * @param params.status - Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses.
109
+ * @param params.ownerUser - Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
110
+ * @param params.ownerAgent - Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
111
+ * @param params.owner - Return only tasks owned by this user: `me` or a user public ID (`usr_...`).
112
+ * @param params.involving - Return only tasks owned or created by this user: `me` or a user public ID (`usr_...`). The "My work" predicate.
113
+ * @param params.summary - When true, omit `description` from every task. Use for list views.
114
+ * @param params.priority - Filter tasks by priority, from 0 (highest) to 4 (lowest).
115
+ * @param params.tag - Return only tasks carrying this tag (matched against the canonical lowercase form).
116
+ * @param params.parent - Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
117
+ * @param params.sourceScope - Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
118
+ * @param params.sourceType - Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
119
+ * @param params.sourceId - Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
120
+ * @param params.epic - Return only tasks with this exact epic label.
121
+ * @param params.search - Restrict results to tasks whose name or description contains this string.
122
+ * @param params.include - Set to `blockers` to include visible blocker task IDs.
123
+ * @param params.sort - Sort key. One of `"created"` (default — most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), `"priority"` (most urgent first), or `"updated"` (latest-state sync, ties by ID). Updated rows can coalesce or reappear: upsert by ID and aggregate version. Delayed/backdated or equal-time updates behind a cursor require periodic reconciliation. This is not a lossless mutation log.
124
+ * @param params.order - Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `updated`, `due_date` and `priority`.
125
+ * @param params.dueBefore - Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
126
+ * @param params.dueAfter - Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
127
+ * @param params.overdue - When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
128
+ * @param params.ready - When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
129
+ * @param params.attention - When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry.
130
+ * @param params.limit - Maximum number of tasks to return. Capped at 100.
131
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
132
+ * @returns Successful response
133
+ */
134
+ list(org: string, params?: {
135
+ status?: string;
136
+ ownerUser?: string;
137
+ ownerAgent?: string;
138
+ owner?: string;
139
+ involving?: string;
140
+ summary?: boolean;
141
+ priority?: number;
142
+ tag?: string;
143
+ parent?: string;
144
+ sourceScope?: string;
145
+ sourceType?: string;
146
+ sourceId?: string;
147
+ epic?: string;
148
+ search?: string;
149
+ include?: string;
150
+ sort?: string;
151
+ order?: string;
152
+ dueBefore?: string;
153
+ dueAfter?: string;
154
+ overdue?: boolean;
155
+ ready?: boolean;
156
+ attention?: boolean;
157
+ limit?: number;
158
+ afterCursor?: string;
159
+ }): Promise<{
160
+ after_cursor?: string | null | undefined;
161
+ before_cursor?: string | null | undefined;
162
+ data: {
163
+ agent?: string | null | undefined;
164
+ aggregate_version?: number | null | undefined;
165
+ blocked_by_count?: number | undefined;
166
+ blockers?: string[] | undefined;
167
+ closed_at?: string | null | undefined;
168
+ comments_count?: number | undefined;
169
+ created_at?: string | undefined;
170
+ created_by_actor?: {
171
+ alias?: string | null | undefined;
172
+ id?: string | null | undefined;
173
+ name?: string | null | undefined;
174
+ profile_picture?: {
175
+ file?: string | null | undefined;
176
+ height?: number | null | undefined;
177
+ media?: string | null | undefined;
178
+ mime_type?: string | null | undefined;
179
+ refresh_url?: string | null | undefined;
180
+ url?: string | null | undefined;
181
+ width?: number | null | undefined;
182
+ } | null | undefined;
183
+ } | null | undefined;
184
+ created_by_agent?: string | null | undefined;
185
+ created_by_user?: string | null | undefined;
186
+ current_lease?: {
187
+ expires_at: string;
188
+ harness: string;
189
+ session_name: string;
190
+ } | null | undefined;
191
+ description?: string | null | undefined;
192
+ due_date?: string | null | undefined;
193
+ epic?: string | null | undefined;
194
+ human_answer_receipts?: Record<string, unknown> | undefined;
195
+ id: string;
196
+ is_blocked?: boolean | undefined;
197
+ is_stalled?: boolean | undefined;
198
+ links?: Record<string, unknown> | undefined;
199
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
200
+ metadata?: Record<string, unknown> | undefined;
201
+ name: string;
202
+ org?: string | null | undefined;
203
+ owner_actor?: {
204
+ alias?: string | null | undefined;
205
+ id?: string | null | undefined;
206
+ name?: string | null | undefined;
207
+ profile_picture?: {
208
+ file?: string | null | undefined;
209
+ height?: number | null | undefined;
210
+ media?: string | null | undefined;
211
+ mime_type?: string | null | undefined;
212
+ refresh_url?: string | null | undefined;
213
+ url?: string | null | undefined;
214
+ width?: number | null | undefined;
215
+ } | null | undefined;
216
+ } | null | undefined;
217
+ owner_agent?: string | null | undefined;
218
+ owner_user?: string | null | undefined;
219
+ parent?: string | null | undefined;
220
+ priority?: number | undefined;
221
+ project_id?: string | null | undefined;
222
+ sandbox?: string | null | undefined;
223
+ source_id?: string | null | undefined;
224
+ source_scope?: string | null | undefined;
225
+ source_type?: string | null | undefined;
226
+ stalled_since?: string | null | undefined;
227
+ status: string;
228
+ subtasks_count?: number | undefined;
229
+ tags?: string[] | undefined;
230
+ target_binary?: string | null | undefined;
231
+ target_version?: string | null | undefined;
232
+ task_epic?: string | null | undefined;
233
+ team?: string | null | undefined;
234
+ thread?: string | null | undefined;
235
+ updated_at?: string | undefined;
236
+ user?: string | null | undefined;
237
+ }[];
238
+ has_more: boolean;
239
+ }>;
240
+ /**
241
+ * Create a task for an organization
242
+ * Creates a new org-owned task (org tenant, no narrower user/team/agent
243
+ * scope) and returns the full task object. User-authenticated calls are
244
+ * attributed to the authenticated user or agent. App-scoped developer and
245
+ * server-to-server callers must provide an explicit `user` or `agent` actor
246
+ * for the organization. Every referenced principal is validated against the
247
+ * app and organization before creation.
248
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
249
+ * @param input - Request body.
250
+ * @param input.agent - Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the organization.
251
+ * @param input.task - Attributes for the task to create. `name` is required; all other fields are optional.
252
+ * @param input.user - Explicit acting user (`usr_...`) for a developer or server-to-server call. Mutually exclusive with an acting `agent`.
253
+ * @returns The newly created task.
254
+ */
255
+ create(org: string, input: {
256
+ agent?: string | undefined;
257
+ task: {
258
+ blockers?: string[] | undefined;
259
+ description?: string | undefined;
260
+ due_date?: string | undefined;
261
+ epic?: string | undefined;
262
+ epic_id?: string | undefined;
263
+ id?: string | undefined;
264
+ links?: Record<string, unknown> | undefined;
265
+ metadata?: Record<string, unknown> | undefined;
266
+ name: string;
267
+ owner_agent?: string | undefined;
268
+ owner_user?: string | undefined;
269
+ parent?: string | undefined;
270
+ priority?: number | undefined;
271
+ project_id?: string | undefined;
272
+ source_id?: string | undefined;
273
+ source_scope?: string | undefined;
274
+ source_type?: string | undefined;
275
+ status?: string | undefined;
276
+ tags?: string[] | undefined;
277
+ target_binary?: string | undefined;
278
+ target_version?: string | undefined;
279
+ thread?: string | undefined;
280
+ };
281
+ user?: string | undefined;
282
+ }): Promise<Task>;
283
+ /**
284
+ * List task blocker cycles for an organization
285
+ * Runs an on-demand diagnostic over unfinished org-owned tasks for the
286
+ * specified organization and returns a forward cursor-paginated page of
287
+ * complete cyclic blocker components. Detection is bounded to owners with at
288
+ * most 100 unfinished tasks. This endpoint is read-only: cycles do not prevent
289
+ * task updates, lease acquisition, or completion.
290
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
291
+ * @param params - Query parameters.
292
+ * @param params.limit - Maximum cycle components to return. Defaults to 50; maximum is 100.
293
+ * @param params.afterCursor - Opaque cursor returned by the preceding page.
294
+ * @returns Successful response
295
+ */
296
+ blockerCycles(org: string, params?: {
297
+ limit?: number;
298
+ afterCursor?: string;
299
+ }): Promise<{
300
+ after_cursor?: string | undefined;
301
+ before_cursor?: string | undefined;
302
+ data: {
303
+ tasks: {
304
+ agent?: string | null | undefined;
305
+ aggregate_version?: number | null | undefined;
306
+ blocked_by_count?: number | undefined;
307
+ blockers?: string[] | undefined;
308
+ closed_at?: string | null | undefined;
309
+ comments_count?: number | undefined;
310
+ created_at?: string | undefined;
311
+ created_by_actor?: {
312
+ alias?: string | null | undefined;
313
+ id?: string | null | undefined;
314
+ name?: string | null | undefined;
315
+ profile_picture?: {
316
+ file?: string | null | undefined;
317
+ height?: number | null | undefined;
318
+ media?: string | null | undefined;
319
+ mime_type?: string | null | undefined;
320
+ refresh_url?: string | null | undefined;
321
+ url?: string | null | undefined;
322
+ width?: number | null | undefined;
323
+ } | null | undefined;
324
+ } | null | undefined;
325
+ created_by_agent?: string | null | undefined;
326
+ created_by_user?: string | null | undefined;
327
+ current_lease?: {
328
+ expires_at: string;
329
+ harness: string;
330
+ session_name: string;
331
+ } | null | undefined;
332
+ description?: string | null | undefined;
333
+ due_date?: string | null | undefined;
334
+ epic?: string | null | undefined;
335
+ human_answer_receipts?: Record<string, unknown> | undefined;
336
+ id: string;
337
+ is_blocked?: boolean | undefined;
338
+ is_stalled?: boolean | undefined;
339
+ links?: Record<string, unknown> | undefined;
340
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
341
+ metadata?: Record<string, unknown> | undefined;
342
+ name: string;
343
+ org?: string | null | undefined;
344
+ owner_actor?: {
345
+ alias?: string | null | undefined;
346
+ id?: string | null | undefined;
347
+ name?: string | null | undefined;
348
+ profile_picture?: {
349
+ file?: string | null | undefined;
350
+ height?: number | null | undefined;
351
+ media?: string | null | undefined;
352
+ mime_type?: string | null | undefined;
353
+ refresh_url?: string | null | undefined;
354
+ url?: string | null | undefined;
355
+ width?: number | null | undefined;
356
+ } | null | undefined;
357
+ } | null | undefined;
358
+ owner_agent?: string | null | undefined;
359
+ owner_user?: string | null | undefined;
360
+ parent?: string | null | undefined;
361
+ priority?: number | undefined;
362
+ project_id?: string | null | undefined;
363
+ sandbox?: string | null | undefined;
364
+ source_id?: string | null | undefined;
365
+ source_scope?: string | null | undefined;
366
+ source_type?: string | null | undefined;
367
+ stalled_since?: string | null | undefined;
368
+ status: string;
369
+ subtasks_count?: number | undefined;
370
+ tags?: string[] | undefined;
371
+ target_binary?: string | null | undefined;
372
+ target_version?: string | null | undefined;
373
+ task_epic?: string | null | undefined;
374
+ team?: string | null | undefined;
375
+ thread?: string | null | undefined;
376
+ updated_at?: string | undefined;
377
+ user?: string | null | undefined;
378
+ }[];
379
+ }[];
380
+ has_more: boolean;
381
+ }>;
382
+ /**
383
+ * Find an owner's tasks by external reference
384
+ * Returns all exact external-reference matches owned by the requested principal. Multiple matches remain explicit; callers must not choose an arbitrary task.
385
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
386
+ * @param params - Query parameters.
387
+ * @param params.user - User owner.
388
+ * @param params.team - Team owner.
389
+ * @param params.externalScope - External host.
390
+ * @param params.objectType - External object type.
391
+ * @param params.objectId - External object identity.
392
+ * @returns Successful response
393
+ */
394
+ byExternalReference(org: string, params?: {
395
+ user?: string;
396
+ team?: string;
397
+ externalScope?: string;
398
+ objectType?: string;
399
+ objectId?: string;
400
+ }): Promise<{
401
+ data: {
402
+ agent?: string | null | undefined;
403
+ aggregate_version?: number | null | undefined;
404
+ blocked_by_count?: number | undefined;
405
+ blockers?: string[] | undefined;
406
+ closed_at?: string | null | undefined;
407
+ comments_count?: number | undefined;
408
+ created_at?: string | undefined;
409
+ created_by_actor?: {
410
+ alias?: string | null | undefined;
411
+ id?: string | null | undefined;
412
+ name?: string | null | undefined;
413
+ profile_picture?: {
414
+ file?: string | null | undefined;
415
+ height?: number | null | undefined;
416
+ media?: string | null | undefined;
417
+ mime_type?: string | null | undefined;
418
+ refresh_url?: string | null | undefined;
419
+ url?: string | null | undefined;
420
+ width?: number | null | undefined;
421
+ } | null | undefined;
422
+ } | null | undefined;
423
+ created_by_agent?: string | null | undefined;
424
+ created_by_user?: string | null | undefined;
425
+ current_lease?: {
426
+ expires_at: string;
427
+ harness: string;
428
+ session_name: string;
429
+ } | null | undefined;
430
+ description?: string | null | undefined;
431
+ due_date?: string | null | undefined;
432
+ epic?: string | null | undefined;
433
+ human_answer_receipts?: Record<string, unknown> | undefined;
434
+ id: string;
435
+ is_blocked?: boolean | undefined;
436
+ is_stalled?: boolean | undefined;
437
+ links?: Record<string, unknown> | undefined;
438
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
439
+ metadata?: Record<string, unknown> | undefined;
440
+ name: string;
441
+ org?: string | null | undefined;
442
+ owner_actor?: {
443
+ alias?: string | null | undefined;
444
+ id?: string | null | undefined;
445
+ name?: string | null | undefined;
446
+ profile_picture?: {
447
+ file?: string | null | undefined;
448
+ height?: number | null | undefined;
449
+ media?: string | null | undefined;
450
+ mime_type?: string | null | undefined;
451
+ refresh_url?: string | null | undefined;
452
+ url?: string | null | undefined;
453
+ width?: number | null | undefined;
454
+ } | null | undefined;
455
+ } | null | undefined;
456
+ owner_agent?: string | null | undefined;
457
+ owner_user?: string | null | undefined;
458
+ parent?: string | null | undefined;
459
+ priority?: number | undefined;
460
+ project_id?: string | null | undefined;
461
+ sandbox?: string | null | undefined;
462
+ source_id?: string | null | undefined;
463
+ source_scope?: string | null | undefined;
464
+ source_type?: string | null | undefined;
465
+ stalled_since?: string | null | undefined;
466
+ status: string;
467
+ subtasks_count?: number | undefined;
468
+ tags?: string[] | undefined;
469
+ target_binary?: string | null | undefined;
470
+ target_version?: string | null | undefined;
471
+ task_epic?: string | null | undefined;
472
+ team?: string | null | undefined;
473
+ thread?: string | null | undefined;
474
+ updated_at?: string | undefined;
475
+ user?: string | null | undefined;
476
+ }[];
477
+ }>;
478
+ /**
479
+ * Find or create a task by source
480
+ * Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted.
481
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
482
+ * @param input - Request body.
483
+ * @param input.agent - Explicit acting agent for privileged callers.
484
+ * @param input.description - Initial task description.
485
+ * @param input.epic - Initial epic grouping.
486
+ * @param input.name - Initial task name.
487
+ * @param input.owner_user - Initial assigned user; immutable on retries.
488
+ * @param input.source_id - Source identity, for example owner/repo#123.
489
+ * @param input.source_scope - Source scope, for example github.
490
+ * @param input.source_type - Source type, for example pull_request.
491
+ * @param input.status - Initial task status.
492
+ * @param input.team - Team owner.
493
+ * @param input.user - User owner, or explicit acting user on a team route.
494
+ * @returns The task and whether this request created it.
495
+ */
496
+ bySource(org: string, input: {
497
+ agent?: string | undefined;
498
+ description?: string | undefined;
499
+ epic?: string | undefined;
500
+ name: string;
501
+ owner_user?: string | undefined;
502
+ source_id: string;
503
+ source_scope: string;
504
+ source_type: string;
505
+ status?: string | undefined;
506
+ team?: string | undefined;
507
+ user?: string | undefined;
508
+ }): Promise<TaskEnsureResult>;
509
+ /**
510
+ * Get task activity metrics for an organization
511
+ * Returns task activity metrics scoped to org-owned tasks (org tenant, no
512
+ * narrower user/team/agent scope). `open` counts currently open or
513
+ * in-progress org tasks, `created` counts tasks inserted in the UTC-day
514
+ * window, and `completed` counts tasks whose `closed_at` falls in that window
515
+ * while still in a closed status. Hard-deleted tasks are absent from the
516
+ * projection and therefore omitted. The daily series is zero-filled across
517
+ * the requested window and includes reconstructed end-of-day `open` stock.
518
+ * Any organization member may read this count-only summary. Requests from
519
+ * callers without org access return 404 so organization existence is not
520
+ * disclosed.
521
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
522
+ * @param params - Query parameters.
523
+ * @param params.days - UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
524
+ * @returns Successful response
525
+ */
526
+ metrics(org: string, params?: {
527
+ days?: number;
528
+ }): Promise<{
529
+ completed: number;
530
+ created: number;
531
+ days: number;
532
+ end_at: string;
533
+ open: number;
534
+ series: Record<string, unknown>[];
535
+ start_at: string;
536
+ }>;
537
+ /**
538
+ * List an organization's ready tasks
539
+ * Returns open org-owned tasks with no unfinished blockers and no active
540
+ * session lease. Readiness is calculated by the server from the current task
541
+ * projection. It is a snapshot, not a reservation; claim a task lease before
542
+ * starting work.
543
+ * Results are ordered by priority (0, the most urgent, first), then oldest
544
+ * first, so the first page is always the most urgent ready work.
545
+ * Pass `explain=true` to include every open task with a stable readiness reason.
546
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
547
+ * @param params - Query parameters.
548
+ * @param params.explain - Include blocked and actively leased open tasks with exclusion reasons.
549
+ * @param params.assignedToMe - Only include tasks assigned to the authenticated user. Equivalent to `owner[]=me`; sending it together with `owner` returns 422.
550
+ * @param params.owner - Owner kinds to include; the result is the union of the listed kinds. Accepted values: `me` (assigned to the authenticated user) and `unassigned` (no user or agent owner). Agent-assigned tasks match neither value. Omit to include every owner.
551
+ * @param params.sourceScope - Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
552
+ * @param params.sourceType - Only include tasks whose source matches this object kind.
553
+ * @param params.sourceId - Only include tasks whose source matches this object identity.
554
+ * @param params.epic - Only include tasks with this exact epic label.
555
+ * @param params.limit - Maximum number of readiness entries to return. Capped at 100.
556
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
557
+ * @returns Successful response
558
+ */
559
+ ready(org: string, params?: {
560
+ explain?: boolean;
561
+ assignedToMe?: boolean;
562
+ owner?: string[];
563
+ sourceScope?: string;
564
+ sourceType?: string;
565
+ sourceId?: string;
566
+ epic?: string;
567
+ limit?: number;
568
+ afterCursor?: string;
569
+ }): Promise<{
570
+ after_cursor?: string | undefined;
571
+ authoritative: boolean;
572
+ before_cursor?: string | undefined;
573
+ data: {
574
+ readiness: "ready" | "blocked" | "leased";
575
+ reason?: "open_blockers" | "active_lease" | null | undefined;
576
+ task: {
577
+ agent?: string | null | undefined;
578
+ aggregate_version?: number | null | undefined;
579
+ blocked_by_count?: number | undefined;
580
+ blockers?: string[] | undefined;
581
+ closed_at?: string | null | undefined;
582
+ comments_count?: number | undefined;
583
+ created_at?: string | undefined;
584
+ created_by_actor?: {
585
+ alias?: string | null | undefined;
586
+ id?: string | null | undefined;
587
+ name?: string | null | undefined;
588
+ profile_picture?: {
589
+ file?: string | null | undefined;
590
+ height?: number | null | undefined;
591
+ media?: string | null | undefined;
592
+ mime_type?: string | null | undefined;
593
+ refresh_url?: string | null | undefined;
594
+ url?: string | null | undefined;
595
+ width?: number | null | undefined;
596
+ } | null | undefined;
597
+ } | null | undefined;
598
+ created_by_agent?: string | null | undefined;
599
+ created_by_user?: string | null | undefined;
600
+ current_lease?: {
601
+ expires_at: string;
602
+ harness: string;
603
+ session_name: string;
604
+ } | null | undefined;
605
+ description?: string | null | undefined;
606
+ due_date?: string | null | undefined;
607
+ epic?: string | null | undefined;
608
+ human_answer_receipts?: Record<string, unknown> | undefined;
609
+ id: string;
610
+ is_blocked?: boolean | undefined;
611
+ is_stalled?: boolean | undefined;
612
+ links?: Record<string, unknown> | undefined;
613
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
614
+ metadata?: Record<string, unknown> | undefined;
615
+ name: string;
616
+ org?: string | null | undefined;
617
+ owner_actor?: {
618
+ alias?: string | null | undefined;
619
+ id?: string | null | undefined;
620
+ name?: string | null | undefined;
621
+ profile_picture?: {
622
+ file?: string | null | undefined;
623
+ height?: number | null | undefined;
624
+ media?: string | null | undefined;
625
+ mime_type?: string | null | undefined;
626
+ refresh_url?: string | null | undefined;
627
+ url?: string | null | undefined;
628
+ width?: number | null | undefined;
629
+ } | null | undefined;
630
+ } | null | undefined;
631
+ owner_agent?: string | null | undefined;
632
+ owner_user?: string | null | undefined;
633
+ parent?: string | null | undefined;
634
+ priority?: number | undefined;
635
+ project_id?: string | null | undefined;
636
+ sandbox?: string | null | undefined;
637
+ source_id?: string | null | undefined;
638
+ source_scope?: string | null | undefined;
639
+ source_type?: string | null | undefined;
640
+ stalled_since?: string | null | undefined;
641
+ status: string;
642
+ subtasks_count?: number | undefined;
643
+ tags?: string[] | undefined;
644
+ target_binary?: string | null | undefined;
645
+ target_version?: string | null | undefined;
646
+ task_epic?: string | null | undefined;
647
+ team?: string | null | undefined;
648
+ thread?: string | null | undefined;
649
+ updated_at?: string | undefined;
650
+ user?: string | null | undefined;
651
+ };
652
+ }[];
653
+ has_more: boolean;
654
+ }>;
655
+ /**
656
+ * Search an organization's tasks
657
+ * Performs a full-text search over org-owned tasks for the specified
658
+ * organization and returns matching results. Combine `q` with the optional
659
+ * filters to narrow the result set further. When no query is provided, the
660
+ * endpoint behaves like a filtered list.
661
+ * The `query` field in the response echoes the effective search query.
662
+ * Explicitly personal, team, or agent tasks are excluded here.
663
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
664
+ * @param params - Query parameters.
665
+ * @param params.q - Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
666
+ * @param params.query - Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
667
+ * @param params.status - Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses.
668
+ * @param params.ownerUser - Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
669
+ * @param params.ownerAgent - Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
670
+ * @param params.priority - Filter tasks by priority, from 0 (highest) to 4 (lowest).
671
+ * @param params.tag - Return only tasks carrying this tag (matched against the canonical lowercase form).
672
+ * @param params.parent - Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
673
+ * @param params.sourceScope - Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
674
+ * @param params.sourceType - Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
675
+ * @param params.sourceId - Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
676
+ * @param params.epic - Return only tasks with this exact epic label.
677
+ * @param params.limit - Maximum number of tasks to return. Capped at 100.
678
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
679
+ * @returns Successful response
680
+ */
681
+ search(org: string, params?: {
682
+ q?: string;
683
+ query?: string;
684
+ status?: string;
685
+ ownerUser?: string;
686
+ ownerAgent?: string;
687
+ priority?: number;
688
+ tag?: string;
689
+ parent?: string;
690
+ sourceScope?: string;
691
+ sourceType?: string;
692
+ sourceId?: string;
693
+ epic?: string;
694
+ limit?: number;
695
+ afterCursor?: string;
696
+ }): Promise<{
697
+ after_cursor?: string | undefined;
698
+ before_cursor?: string | undefined;
699
+ data: {
700
+ agent?: string | null | undefined;
701
+ aggregate_version?: number | null | undefined;
702
+ blocked_by_count?: number | undefined;
703
+ blockers?: string[] | undefined;
704
+ closed_at?: string | null | undefined;
705
+ comments_count?: number | undefined;
706
+ created_at?: string | undefined;
707
+ created_by_actor?: {
708
+ alias?: string | null | undefined;
709
+ id?: string | null | undefined;
710
+ name?: string | null | undefined;
711
+ profile_picture?: {
712
+ file?: string | null | undefined;
713
+ height?: number | null | undefined;
714
+ media?: string | null | undefined;
715
+ mime_type?: string | null | undefined;
716
+ refresh_url?: string | null | undefined;
717
+ url?: string | null | undefined;
718
+ width?: number | null | undefined;
719
+ } | null | undefined;
720
+ } | null | undefined;
721
+ created_by_agent?: string | null | undefined;
722
+ created_by_user?: string | null | undefined;
723
+ current_lease?: {
724
+ expires_at: string;
725
+ harness: string;
726
+ session_name: string;
727
+ } | null | undefined;
728
+ description?: string | null | undefined;
729
+ due_date?: string | null | undefined;
730
+ epic?: string | null | undefined;
731
+ human_answer_receipts?: Record<string, unknown> | undefined;
732
+ id: string;
733
+ is_blocked?: boolean | undefined;
734
+ is_stalled?: boolean | undefined;
735
+ links?: Record<string, unknown> | undefined;
736
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
737
+ metadata?: Record<string, unknown> | undefined;
738
+ name: string;
739
+ org?: string | null | undefined;
740
+ owner_actor?: {
741
+ alias?: string | null | undefined;
742
+ id?: string | null | undefined;
743
+ name?: string | null | undefined;
744
+ profile_picture?: {
745
+ file?: string | null | undefined;
746
+ height?: number | null | undefined;
747
+ media?: string | null | undefined;
748
+ mime_type?: string | null | undefined;
749
+ refresh_url?: string | null | undefined;
750
+ url?: string | null | undefined;
751
+ width?: number | null | undefined;
752
+ } | null | undefined;
753
+ } | null | undefined;
754
+ owner_agent?: string | null | undefined;
755
+ owner_user?: string | null | undefined;
756
+ parent?: string | null | undefined;
757
+ priority?: number | undefined;
758
+ project_id?: string | null | undefined;
759
+ sandbox?: string | null | undefined;
760
+ source_id?: string | null | undefined;
761
+ source_scope?: string | null | undefined;
762
+ source_type?: string | null | undefined;
763
+ stalled_since?: string | null | undefined;
764
+ status: string;
765
+ subtasks_count?: number | undefined;
766
+ tags?: string[] | undefined;
767
+ target_binary?: string | null | undefined;
768
+ target_version?: string | null | undefined;
769
+ task_epic?: string | null | undefined;
770
+ team?: string | null | undefined;
771
+ thread?: string | null | undefined;
772
+ updated_at?: string | undefined;
773
+ user?: string | null | undefined;
774
+ }[];
775
+ has_more: boolean;
776
+ query: string;
777
+ }>;
778
+ /**
779
+ * Stream organization task changes
780
+ * Organization task hints, not a lossless mutation log. Subscribe before reading
781
+ * ready cursors. Resume tasks with sort=updated&order=asc and deletions with their
782
+ * own cursor, retaining each page's after_cursor. Rows may coalesce or reappear;
783
+ * upsert by ID/version and periodically reconcile late/backdated/equal-time rows
784
+ * behind a cursor. Gaps beyond seven-day tombstone retention require full resync.
785
+ * Projector commit/ack failures can lose hints, so clients must reconcile too.
786
+ * Cross-batch deduplication retains at most 1024 task IDs in FIFO order; hints
787
+ * for evicted IDs can reappear, so clients must discard older/equal versions.
788
+ * Pending batches admit at most 512 distinct IDs, bounding visibility queries
789
+ * and emitted event lists. Overflow closes the stream; reconnect and reconcile.
790
+ * The independently released Rust Factory panel and assignment sweeps consume
791
+ * this contract in https://archdev.ai/tasks/tsk_6ttk2gUwttt6wwkiprwui7.
792
+ * That consumer must not roll out until this provider endpoint and the cursor /
793
+ * deletion contracts are deployed and verified on Platform. Its old-server 404
794
+ * polling fallback is compatibility protection, not a substitute for this gate.
795
+ * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
796
+ * @returns Server-Sent Events stream
797
+ */
798
+ stream(org: string): AsyncIterable<{
799
+ event: "ready";
800
+ data: {
801
+ deletions_after_cursor: string | null;
802
+ tasks_after_cursor: string | null;
803
+ };
804
+ } | {
805
+ event: "task_changed";
806
+ data: {
807
+ aggregate_version: number;
808
+ id: string;
809
+ status: string;
810
+ updated_at: string;
811
+ };
812
+ } | {
813
+ event: "task_deleted";
814
+ data: TaskDeletion;
815
+ }>;
816
+ }
3
817
  export declare class OrgThreadResource {
4
818
  private http;
5
819
  constructor(http: HttpClient);
@@ -10,7 +824,7 @@ export declare class OrgThreadResource {
10
824
  * App-scoped developer tokens for the organization's app can list them too.
11
825
  * @param org - Organization ID (`org_...`) whose org-visibility threads should be listed.
12
826
  * @param params - Query parameters.
13
- * @param params.key - Optional exact thread key, for example `archdev-room`.
827
+ * @param params.key - Optional exact thread key, for example `support-room`.
14
828
  * @returns Successful response
15
829
  */
16
830
  list(org: string, params?: {
@@ -61,15 +875,30 @@ export declare class OrgThreadResource {
61
875
  principal?: string | undefined;
62
876
  principal_type: string;
63
877
  }[] | undefined;
878
+ add_denies?: {
879
+ actions: string[];
880
+ principal?: string | undefined;
881
+ principal_type: string;
882
+ }[] | undefined;
883
+ denies?: {
884
+ actions: string[];
885
+ principal?: string | undefined;
886
+ principal_type: string;
887
+ }[] | undefined;
64
888
  grants?: {
65
889
  actions: string[];
66
890
  principal?: string | undefined;
67
891
  principal_type: string;
68
892
  }[] | undefined;
893
+ preserve_denies?: boolean | undefined;
69
894
  remove?: {
70
895
  principal?: string | undefined;
71
896
  principal_type: string;
72
897
  }[] | undefined;
898
+ remove_denies?: {
899
+ principal?: string | undefined;
900
+ principal_type: string;
901
+ }[] | undefined;
73
902
  } | null | undefined;
74
903
  actors?: {
75
904
  alias?: string | null | undefined;
@@ -113,8 +942,10 @@ export declare class OrgThreadResource {
113
942
  type: string;
114
943
  url?: string | null | undefined;
115
944
  variants?: {
945
+ byte_size?: number | null | undefined;
116
946
  content_type?: string | null | undefined;
117
947
  created_at?: string | undefined;
948
+ duration_ms?: number | null | undefined;
118
949
  file?: string | undefined;
119
950
  filename?: string | null | undefined;
120
951
  height?: number | null | undefined;
@@ -128,8 +959,10 @@ export declare class OrgThreadResource {
128
959
  url?: string | null | undefined;
129
960
  width?: number | null | undefined;
130
961
  } | null | undefined;
962
+ sha256?: string | null | undefined;
131
963
  updated_at?: string | undefined;
132
964
  url?: string | null | undefined;
965
+ url_expires_at?: string | null | undefined;
133
966
  variant_key?: string | undefined;
134
967
  width?: number | null | undefined;
135
968
  }[] | undefined;
@@ -221,15 +1054,30 @@ export declare class OrgThreadResource {
221
1054
  principal?: string | undefined;
222
1055
  principal_type: string;
223
1056
  }[] | undefined;
1057
+ add_denies?: {
1058
+ actions: string[];
1059
+ principal?: string | undefined;
1060
+ principal_type: string;
1061
+ }[] | undefined;
1062
+ denies?: {
1063
+ actions: string[];
1064
+ principal?: string | undefined;
1065
+ principal_type: string;
1066
+ }[] | undefined;
224
1067
  grants?: {
225
1068
  actions: string[];
226
1069
  principal?: string | undefined;
227
1070
  principal_type: string;
228
1071
  }[] | undefined;
1072
+ preserve_denies?: boolean | undefined;
229
1073
  remove?: {
230
1074
  principal?: string | undefined;
231
1075
  principal_type: string;
232
1076
  }[] | undefined;
1077
+ remove_denies?: {
1078
+ principal?: string | undefined;
1079
+ principal_type: string;
1080
+ }[] | undefined;
233
1081
  } | null | undefined;
234
1082
  app?: string | undefined;
235
1083
  created_at?: string | undefined;
@@ -402,6 +1250,7 @@ export declare class OrgThreadResource {
402
1250
  sub_threads?: Record<string, unknown>[] | null | undefined;
403
1251
  tags?: string[] | undefined;
404
1252
  team?: string | null | undefined;
1253
+ thread_template_key?: string | null | undefined;
405
1254
  title?: string | null | undefined;
406
1255
  ttl?: string | null | undefined;
407
1256
  unread_count?: number | null | undefined;
@@ -456,6 +1305,8 @@ export declare class OrgThreadResource {
456
1305
  }
457
1306
  export declare class OrgResource {
458
1307
  private http;
1308
+ readonly task_epics: OrgTaskEpicResource;
1309
+ readonly tasks: OrgTaskResource;
459
1310
  readonly threads: OrgThreadResource;
460
1311
  constructor(http: HttpClient);
461
1312
  /**
@@ -514,6 +1365,37 @@ export declare class OrgResource {
514
1365
  after_cursor?: string | null | undefined;
515
1366
  before_cursor?: string | null | undefined;
516
1367
  data: {
1368
+ acl?: {
1369
+ add?: {
1370
+ actions: string[];
1371
+ principal?: string | undefined;
1372
+ principal_type: string;
1373
+ }[] | undefined;
1374
+ add_denies?: {
1375
+ actions: string[];
1376
+ principal?: string | undefined;
1377
+ principal_type: string;
1378
+ }[] | undefined;
1379
+ denies?: {
1380
+ actions: string[];
1381
+ principal?: string | undefined;
1382
+ principal_type: string;
1383
+ }[] | undefined;
1384
+ grants?: {
1385
+ actions: string[];
1386
+ principal?: string | undefined;
1387
+ principal_type: string;
1388
+ }[] | undefined;
1389
+ preserve_denies?: boolean | undefined;
1390
+ remove?: {
1391
+ principal?: string | undefined;
1392
+ principal_type: string;
1393
+ }[] | undefined;
1394
+ remove_denies?: {
1395
+ principal?: string | undefined;
1396
+ principal_type: string;
1397
+ }[] | undefined;
1398
+ } | null | undefined;
517
1399
  agent?: string | undefined;
518
1400
  content_type?: string | undefined;
519
1401
  created_at?: string | undefined;
@@ -575,5 +1457,29 @@ export declare class OrgResource {
575
1457
  }[];
576
1458
  has_more: boolean;
577
1459
  }>;
1460
+ /**
1461
+ * List visible task deletions
1462
+ * Returns visible task tombstones in ascending (deleted_at, task) order.
1463
+ * Tombstones are retained for seven days. Clients must fully resynchronize after
1464
+ * retention gaps, and periodically reconcile delayed projections. This is not an
1465
+ * immutable mutation log. Upsert live tasks by ID and aggregate version.
1466
+ * @param org - Organization ID (`org_...`).
1467
+ * @param params - Query parameters.
1468
+ * @param params.limit - Page size, capped at 100.
1469
+ * @param params.afterCursor - Opaque cursor from the previous page.
1470
+ * @returns Successful response
1471
+ */
1472
+ taskDeletions(org: string, params?: {
1473
+ limit?: number;
1474
+ afterCursor?: string;
1475
+ }): Promise<{
1476
+ after_cursor?: string | null | undefined;
1477
+ before_cursor?: string | null | undefined;
1478
+ data: {
1479
+ deleted_at: string;
1480
+ task: string;
1481
+ }[];
1482
+ has_more: boolean;
1483
+ }>;
578
1484
  }
579
1485
  //# sourceMappingURL=orgs.d.ts.map