@archastro/sdk 0.21.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 (114) hide show
  1. package/dist/channels/api_chat_channel.d.ts +3 -1
  2. package/dist/channels/api_chat_channel.d.ts.map +1 -1
  3. package/dist/channels/api_chat_channel.js +6 -2
  4. package/dist/channels/api_chat_channel.js.map +1 -1
  5. package/dist/client.d.ts +4 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +5 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/types/artifacts.d.ts +97 -0
  10. package/dist/types/artifacts.d.ts.map +1 -1
  11. package/dist/types/automations.d.ts +4 -4
  12. package/dist/types/automations.d.ts.map +1 -1
  13. package/dist/types/automations.js +5 -5
  14. package/dist/types/automations.js.map +1 -1
  15. package/dist/types/chat.d.ts +3762 -0
  16. package/dist/types/chat.d.ts.map +1 -1
  17. package/dist/types/common.d.ts +2585 -152
  18. package/dist/types/common.d.ts.map +1 -1
  19. package/dist/types/common.js +48 -12
  20. package/dist/types/common.js.map +1 -1
  21. package/dist/types/computers.d.ts +20 -0
  22. package/dist/types/computers.d.ts.map +1 -1
  23. package/dist/types/computers.js +8 -1
  24. package/dist/types/computers.js.map +1 -1
  25. package/dist/types/tasks.d.ts +244 -3
  26. package/dist/types/tasks.d.ts.map +1 -1
  27. package/dist/types/tasks.js +46 -4
  28. package/dist/types/tasks.js.map +1 -1
  29. package/dist/types/teams.d.ts +381 -0
  30. package/dist/types/teams.d.ts.map +1 -1
  31. package/dist/types/threads.d.ts +357 -0
  32. package/dist/types/threads.d.ts.map +1 -1
  33. package/dist/types/threads.js +3 -1
  34. package/dist/types/threads.js.map +1 -1
  35. package/dist/v1/resources/activity_feed.d.ts +15 -0
  36. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  37. package/dist/v1/resources/activity_feed.js +1 -1
  38. package/dist/v1/resources/agent_computers.d.ts +15 -0
  39. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  40. package/dist/v1/resources/agent_computers.js +1 -1
  41. package/dist/v1/resources/agent_computers.js.map +1 -1
  42. package/dist/v1/resources/agent_requests.d.ts +8 -0
  43. package/dist/v1/resources/agent_requests.d.ts.map +1 -1
  44. package/dist/v1/resources/agent_requests.js +9 -1
  45. package/dist/v1/resources/agent_requests.js.map +1 -1
  46. package/dist/v1/resources/agent_routines.d.ts +15 -0
  47. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  48. package/dist/v1/resources/agent_routines.js +1 -1
  49. package/dist/v1/resources/agent_routines.js.map +1 -1
  50. package/dist/v1/resources/agents.d.ts +65 -0
  51. package/dist/v1/resources/agents.d.ts.map +1 -1
  52. package/dist/v1/resources/agents.js +2 -1
  53. package/dist/v1/resources/agents.js.map +1 -1
  54. package/dist/v1/resources/artifacts.d.ts +30 -0
  55. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  56. package/dist/v1/resources/artifacts.js +1 -1
  57. package/dist/v1/resources/artifacts.js.map +1 -1
  58. package/dist/v1/resources/automation_runs.d.ts +6 -2
  59. package/dist/v1/resources/automation_runs.d.ts.map +1 -1
  60. package/dist/v1/resources/automation_runs.js +10 -4
  61. package/dist/v1/resources/automation_runs.js.map +1 -1
  62. package/dist/v1/resources/computers.d.ts +113 -0
  63. package/dist/v1/resources/computers.d.ts.map +1 -0
  64. package/dist/v1/resources/computers.js +113 -0
  65. package/dist/v1/resources/computers.js.map +1 -0
  66. package/dist/v1/resources/custom_objects.d.ts +60 -0
  67. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  68. package/dist/v1/resources/custom_objects.js +1 -1
  69. package/dist/v1/resources/custom_objects.js.map +1 -1
  70. package/dist/v1/resources/files.d.ts +24 -0
  71. package/dist/v1/resources/files.d.ts.map +1 -1
  72. package/dist/v1/resources/files.js +8 -1
  73. package/dist/v1/resources/files.js.map +1 -1
  74. package/dist/v1/resources/index.d.ts +2 -0
  75. package/dist/v1/resources/index.d.ts.map +1 -1
  76. package/dist/v1/resources/index.js +3 -1
  77. package/dist/v1/resources/index.js.map +1 -1
  78. package/dist/v1/resources/orgs.d.ts +317 -40
  79. package/dist/v1/resources/orgs.d.ts.map +1 -1
  80. package/dist/v1/resources/orgs.js +151 -31
  81. package/dist/v1/resources/orgs.js.map +1 -1
  82. package/dist/v1/resources/solutions.d.ts +15 -0
  83. package/dist/v1/resources/solutions.d.ts.map +1 -1
  84. package/dist/v1/resources/solutions.js +1 -1
  85. package/dist/v1/resources/solutions.js.map +1 -1
  86. package/dist/v1/resources/task_epics.d.ts +85 -0
  87. package/dist/v1/resources/task_epics.d.ts.map +1 -0
  88. package/dist/v1/resources/task_epics.js +71 -0
  89. package/dist/v1/resources/task_epics.js.map +1 -0
  90. package/dist/v1/resources/tasks.d.ts +61 -1
  91. package/dist/v1/resources/tasks.d.ts.map +1 -1
  92. package/dist/v1/resources/tasks.js +40 -2
  93. package/dist/v1/resources/tasks.js.map +1 -1
  94. package/dist/v1/resources/teams.d.ts +337 -51
  95. package/dist/v1/resources/teams.d.ts.map +1 -1
  96. package/dist/v1/resources/teams.js +111 -45
  97. package/dist/v1/resources/teams.js.map +1 -1
  98. package/dist/v1/resources/thread_messages.d.ts +15 -0
  99. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  100. package/dist/v1/resources/thread_messages.js +1 -1
  101. package/dist/v1/resources/thread_messages.js.map +1 -1
  102. package/dist/v1/resources/threads.d.ts +53 -3
  103. package/dist/v1/resources/threads.d.ts.map +1 -1
  104. package/dist/v1/resources/threads.js +5 -4
  105. package/dist/v1/resources/threads.js.map +1 -1
  106. package/dist/v1/resources/users.d.ts +294 -51
  107. package/dist/v1/resources/users.d.ts.map +1 -1
  108. package/dist/v1/resources/users.js +139 -45
  109. package/dist/v1/resources/users.js.map +1 -1
  110. package/dist/v1.d.ts +4 -0
  111. package/dist/v1.d.ts.map +1 -1
  112. package/dist/v1.js +7 -1
  113. package/dist/v1.js.map +1 -1
  114. package/package.json +1 -1
@@ -1,6 +1,97 @@
1
1
  import { HttpClient } from "../../runtime/http-client.js";
2
- import type { Task, TaskEnsureResult } from "../../types/tasks.js";
2
+ import type { Task, TaskDeletion, TaskEnsureResult, TaskEpicEntity, TaskEpicEntityCollection } from "../../types/tasks.js";
3
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
+ }
4
95
  export declare class OrgTaskResource {
5
96
  private http;
6
97
  constructor(http: HttpClient);
@@ -17,6 +108,9 @@ export declare class OrgTaskResource {
17
108
  * @param params.status - Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses.
18
109
  * @param params.ownerUser - Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
19
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.
20
114
  * @param params.priority - Filter tasks by priority, from 0 (highest) to 4 (lowest).
21
115
  * @param params.tag - Return only tasks carrying this tag (matched against the canonical lowercase form).
22
116
  * @param params.parent - Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
@@ -25,8 +119,9 @@ export declare class OrgTaskResource {
25
119
  * @param params.sourceId - Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
26
120
  * @param params.epic - Return only tasks with this exact epic label.
27
121
  * @param params.search - Restrict results to tasks whose name or description contains this string.
28
- * @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), or `"priority"` (most urgent first). Ties break by most recently created.
29
- * @param params.order - Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
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`.
30
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.
31
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.
32
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.
@@ -40,6 +135,9 @@ export declare class OrgTaskResource {
40
135
  status?: string;
41
136
  ownerUser?: string;
42
137
  ownerAgent?: string;
138
+ owner?: string;
139
+ involving?: string;
140
+ summary?: boolean;
43
141
  priority?: number;
44
142
  tag?: string;
45
143
  parent?: string;
@@ -48,6 +146,7 @@ export declare class OrgTaskResource {
48
146
  sourceId?: string;
49
147
  epic?: string;
50
148
  search?: string;
149
+ include?: string;
51
150
  sort?: string;
52
151
  order?: string;
53
152
  dueBefore?: string;
@@ -64,6 +163,7 @@ export declare class OrgTaskResource {
64
163
  agent?: string | null | undefined;
65
164
  aggregate_version?: number | null | undefined;
66
165
  blocked_by_count?: number | undefined;
166
+ blockers?: string[] | undefined;
67
167
  closed_at?: string | null | undefined;
68
168
  comments_count?: number | undefined;
69
169
  created_at?: string | undefined;
@@ -91,10 +191,12 @@ export declare class OrgTaskResource {
91
191
  description?: string | null | undefined;
92
192
  due_date?: string | null | undefined;
93
193
  epic?: string | null | undefined;
194
+ human_answer_receipts?: Record<string, unknown> | undefined;
94
195
  id: string;
95
196
  is_blocked?: boolean | undefined;
96
197
  is_stalled?: boolean | undefined;
97
198
  links?: Record<string, unknown> | undefined;
199
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
98
200
  metadata?: Record<string, unknown> | undefined;
99
201
  name: string;
100
202
  org?: string | null | undefined;
@@ -127,6 +229,7 @@ export declare class OrgTaskResource {
127
229
  tags?: string[] | undefined;
128
230
  target_binary?: string | null | undefined;
129
231
  target_version?: string | null | undefined;
232
+ task_epic?: string | null | undefined;
130
233
  team?: string | null | undefined;
131
234
  thread?: string | null | undefined;
132
235
  updated_at?: string | undefined;
@@ -152,9 +255,11 @@ export declare class OrgTaskResource {
152
255
  create(org: string, input: {
153
256
  agent?: string | undefined;
154
257
  task: {
258
+ blockers?: string[] | undefined;
155
259
  description?: string | undefined;
156
260
  due_date?: string | undefined;
157
261
  epic?: string | undefined;
262
+ epic_id?: string | undefined;
158
263
  id?: string | undefined;
159
264
  links?: Record<string, unknown> | undefined;
160
265
  metadata?: Record<string, unknown> | undefined;
@@ -199,6 +304,7 @@ export declare class OrgTaskResource {
199
304
  agent?: string | null | undefined;
200
305
  aggregate_version?: number | null | undefined;
201
306
  blocked_by_count?: number | undefined;
307
+ blockers?: string[] | undefined;
202
308
  closed_at?: string | null | undefined;
203
309
  comments_count?: number | undefined;
204
310
  created_at?: string | undefined;
@@ -226,10 +332,12 @@ export declare class OrgTaskResource {
226
332
  description?: string | null | undefined;
227
333
  due_date?: string | null | undefined;
228
334
  epic?: string | null | undefined;
335
+ human_answer_receipts?: Record<string, unknown> | undefined;
229
336
  id: string;
230
337
  is_blocked?: boolean | undefined;
231
338
  is_stalled?: boolean | undefined;
232
339
  links?: Record<string, unknown> | undefined;
340
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
233
341
  metadata?: Record<string, unknown> | undefined;
234
342
  name: string;
235
343
  org?: string | null | undefined;
@@ -262,6 +370,7 @@ export declare class OrgTaskResource {
262
370
  tags?: string[] | undefined;
263
371
  target_binary?: string | null | undefined;
264
372
  target_version?: string | null | undefined;
373
+ task_epic?: string | null | undefined;
265
374
  team?: string | null | undefined;
266
375
  thread?: string | null | undefined;
267
376
  updated_at?: string | undefined;
@@ -270,6 +379,102 @@ export declare class OrgTaskResource {
270
379
  }[];
271
380
  has_more: boolean;
272
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
+ }>;
273
478
  /**
274
479
  * Find or create a task by source
275
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.
@@ -279,6 +484,7 @@ export declare class OrgTaskResource {
279
484
  * @param input.description - Initial task description.
280
485
  * @param input.epic - Initial epic grouping.
281
486
  * @param input.name - Initial task name.
487
+ * @param input.owner_user - Initial assigned user; immutable on retries.
282
488
  * @param input.source_id - Source identity, for example owner/repo#123.
283
489
  * @param input.source_scope - Source scope, for example github.
284
490
  * @param input.source_type - Source type, for example pull_request.
@@ -292,6 +498,7 @@ export declare class OrgTaskResource {
292
498
  description?: string | undefined;
293
499
  epic?: string | undefined;
294
500
  name: string;
501
+ owner_user?: string | undefined;
295
502
  source_id: string;
296
503
  source_scope: string;
297
504
  source_type: string;
@@ -339,7 +546,8 @@ export declare class OrgTaskResource {
339
546
  * @param org - Organization ID (`org_...`) whose org-owned tasks should be returned.
340
547
  * @param params - Query parameters.
341
548
  * @param params.explain - Include blocked and actively leased open tasks with exclusion reasons.
342
- * @param params.assignedToMe - Only include tasks assigned to the authenticated user.
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.
343
551
  * @param params.sourceScope - Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
344
552
  * @param params.sourceType - Only include tasks whose source matches this object kind.
345
553
  * @param params.sourceId - Only include tasks whose source matches this object identity.
@@ -351,6 +559,7 @@ export declare class OrgTaskResource {
351
559
  ready(org: string, params?: {
352
560
  explain?: boolean;
353
561
  assignedToMe?: boolean;
562
+ owner?: string[];
354
563
  sourceScope?: string;
355
564
  sourceType?: string;
356
565
  sourceId?: string;
@@ -368,6 +577,7 @@ export declare class OrgTaskResource {
368
577
  agent?: string | null | undefined;
369
578
  aggregate_version?: number | null | undefined;
370
579
  blocked_by_count?: number | undefined;
580
+ blockers?: string[] | undefined;
371
581
  closed_at?: string | null | undefined;
372
582
  comments_count?: number | undefined;
373
583
  created_at?: string | undefined;
@@ -395,10 +605,12 @@ export declare class OrgTaskResource {
395
605
  description?: string | null | undefined;
396
606
  due_date?: string | null | undefined;
397
607
  epic?: string | null | undefined;
608
+ human_answer_receipts?: Record<string, unknown> | undefined;
398
609
  id: string;
399
610
  is_blocked?: boolean | undefined;
400
611
  is_stalled?: boolean | undefined;
401
612
  links?: Record<string, unknown> | undefined;
613
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
402
614
  metadata?: Record<string, unknown> | undefined;
403
615
  name: string;
404
616
  org?: string | null | undefined;
@@ -431,6 +643,7 @@ export declare class OrgTaskResource {
431
643
  tags?: string[] | undefined;
432
644
  target_binary?: string | null | undefined;
433
645
  target_version?: string | null | undefined;
646
+ task_epic?: string | null | undefined;
434
647
  team?: string | null | undefined;
435
648
  thread?: string | null | undefined;
436
649
  updated_at?: string | undefined;
@@ -487,6 +700,7 @@ export declare class OrgTaskResource {
487
700
  agent?: string | null | undefined;
488
701
  aggregate_version?: number | null | undefined;
489
702
  blocked_by_count?: number | undefined;
703
+ blockers?: string[] | undefined;
490
704
  closed_at?: string | null | undefined;
491
705
  comments_count?: number | undefined;
492
706
  created_at?: string | undefined;
@@ -514,10 +728,12 @@ export declare class OrgTaskResource {
514
728
  description?: string | null | undefined;
515
729
  due_date?: string | null | undefined;
516
730
  epic?: string | null | undefined;
731
+ human_answer_receipts?: Record<string, unknown> | undefined;
517
732
  id: string;
518
733
  is_blocked?: boolean | undefined;
519
734
  is_stalled?: boolean | undefined;
520
735
  links?: Record<string, unknown> | undefined;
736
+ machine_rescope_receipts?: Record<string, unknown> | undefined;
521
737
  metadata?: Record<string, unknown> | undefined;
522
738
  name: string;
523
739
  org?: string | null | undefined;
@@ -550,6 +766,7 @@ export declare class OrgTaskResource {
550
766
  tags?: string[] | undefined;
551
767
  target_binary?: string | null | undefined;
552
768
  target_version?: string | null | undefined;
769
+ task_epic?: string | null | undefined;
553
770
  team?: string | null | undefined;
554
771
  thread?: string | null | undefined;
555
772
  updated_at?: string | undefined;
@@ -558,6 +775,44 @@ export declare class OrgTaskResource {
558
775
  has_more: boolean;
559
776
  query: string;
560
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
+ }>;
561
816
  }
562
817
  export declare class OrgThreadResource {
563
818
  private http;
@@ -620,15 +875,30 @@ export declare class OrgThreadResource {
620
875
  principal?: string | undefined;
621
876
  principal_type: string;
622
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;
623
888
  grants?: {
624
889
  actions: string[];
625
890
  principal?: string | undefined;
626
891
  principal_type: string;
627
892
  }[] | undefined;
893
+ preserve_denies?: boolean | undefined;
628
894
  remove?: {
629
895
  principal?: string | undefined;
630
896
  principal_type: string;
631
897
  }[] | undefined;
898
+ remove_denies?: {
899
+ principal?: string | undefined;
900
+ principal_type: string;
901
+ }[] | undefined;
632
902
  } | null | undefined;
633
903
  actors?: {
634
904
  alias?: string | null | undefined;
@@ -784,15 +1054,30 @@ export declare class OrgThreadResource {
784
1054
  principal?: string | undefined;
785
1055
  principal_type: string;
786
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;
787
1067
  grants?: {
788
1068
  actions: string[];
789
1069
  principal?: string | undefined;
790
1070
  principal_type: string;
791
1071
  }[] | undefined;
1072
+ preserve_denies?: boolean | undefined;
792
1073
  remove?: {
793
1074
  principal?: string | undefined;
794
1075
  principal_type: string;
795
1076
  }[] | undefined;
1077
+ remove_denies?: {
1078
+ principal?: string | undefined;
1079
+ principal_type: string;
1080
+ }[] | undefined;
796
1081
  } | null | undefined;
797
1082
  app?: string | undefined;
798
1083
  created_at?: string | undefined;
@@ -965,6 +1250,7 @@ export declare class OrgThreadResource {
965
1250
  sub_threads?: Record<string, unknown>[] | null | undefined;
966
1251
  tags?: string[] | undefined;
967
1252
  team?: string | null | undefined;
1253
+ thread_template_key?: string | null | undefined;
968
1254
  title?: string | null | undefined;
969
1255
  ttl?: string | null | undefined;
970
1256
  unread_count?: number | null | undefined;
@@ -1019,6 +1305,7 @@ export declare class OrgThreadResource {
1019
1305
  }
1020
1306
  export declare class OrgResource {
1021
1307
  private http;
1308
+ readonly task_epics: OrgTaskEpicResource;
1022
1309
  readonly tasks: OrgTaskResource;
1023
1310
  readonly threads: OrgThreadResource;
1024
1311
  constructor(http: HttpClient);
@@ -1084,15 +1371,30 @@ export declare class OrgResource {
1084
1371
  principal?: string | undefined;
1085
1372
  principal_type: string;
1086
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;
1087
1384
  grants?: {
1088
1385
  actions: string[];
1089
1386
  principal?: string | undefined;
1090
1387
  principal_type: string;
1091
1388
  }[] | undefined;
1389
+ preserve_denies?: boolean | undefined;
1092
1390
  remove?: {
1093
1391
  principal?: string | undefined;
1094
1392
  principal_type: string;
1095
1393
  }[] | undefined;
1394
+ remove_denies?: {
1395
+ principal?: string | undefined;
1396
+ principal_type: string;
1397
+ }[] | undefined;
1096
1398
  } | null | undefined;
1097
1399
  agent?: string | undefined;
1098
1400
  content_type?: string | undefined;
@@ -1156,53 +1458,28 @@ export declare class OrgResource {
1156
1458
  has_more: boolean;
1157
1459
  }>;
1158
1460
  /**
1159
- * List an organization's epic summaries
1160
- * 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.
1161
- * @param org - Organization ID (`org_...`) owning the tasks.
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_...`).
1162
1467
  * @param params - Query parameters.
1163
- * @param params.sourceScope - Exact source scope; supply all three source fields.
1164
- * @param params.sourceType - Exact source type.
1165
- * @param params.sourceId - Exact source ID.
1166
- * @param params.topPriority - Exact highest open priority, from 0 to 4.
1167
- * @param params.includeClosed - Include epics with no non-closed tasks; defaults to false.
1168
- * @param params.limit - Maximum epics; defaults to 50, capped at 100.
1169
- * @param params.afterCursor - Opaque forward cursor from the preceding page.
1468
+ * @param params.limit - Page size, capped at 100.
1469
+ * @param params.afterCursor - Opaque cursor from the previous page.
1170
1470
  * @returns Successful response
1171
1471
  */
1172
- taskEpics(org: string, params?: {
1173
- sourceScope?: string;
1174
- sourceType?: string;
1175
- sourceId?: string;
1176
- topPriority?: number;
1177
- includeClosed?: boolean;
1472
+ taskDeletions(org: string, params?: {
1178
1473
  limit?: number;
1179
1474
  afterCursor?: string;
1180
1475
  }): Promise<{
1181
1476
  after_cursor?: string | null | undefined;
1182
1477
  before_cursor?: string | null | undefined;
1183
1478
  data: {
1184
- blocked_count: number;
1185
- counts: Record<string, unknown>;
1186
- epic: string;
1187
- next_ready: {
1188
- id: string;
1189
- name: string;
1190
- priority: number;
1191
- status: string;
1192
- }[];
1193
- root_blockers: {
1194
- downstream_count: number;
1195
- id: string;
1196
- name: string;
1197
- priority: number;
1198
- status: string;
1199
- }[];
1200
- root_blockers_partial: boolean;
1201
- top_open_priority?: number | null | undefined;
1202
- updated_at: string;
1479
+ deleted_at: string;
1480
+ task: string;
1203
1481
  }[];
1204
1482
  has_more: boolean;
1205
- no_epic_open_count: number;
1206
1483
  }>;
1207
1484
  }
1208
1485
  //# sourceMappingURL=orgs.d.ts.map