@archastro/sdk 0.7.0 → 0.8.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 (222) hide show
  1. package/dist/auth.d.ts +5 -3
  2. package/dist/auth.d.ts.map +1 -1
  3. package/dist/auth.js +7 -5
  4. package/dist/auth.js.map +1 -1
  5. package/dist/channels/api_activity_feed_channel.js +2 -2
  6. package/dist/channels/api_activity_feed_channel.js.map +1 -1
  7. package/dist/channels/api_chat_channel.js +2 -2
  8. package/dist/channels/api_chat_channel.js.map +1 -1
  9. package/dist/channels/api_object_channel.d.ts +13 -2
  10. package/dist/channels/api_object_channel.d.ts.map +1 -1
  11. package/dist/channels/api_object_channel.js +21 -6
  12. package/dist/channels/api_object_channel.js.map +1 -1
  13. package/dist/channels/api_tasks_channel.d.ts +30 -0
  14. package/dist/channels/api_tasks_channel.d.ts.map +1 -0
  15. package/dist/channels/api_tasks_channel.js +45 -0
  16. package/dist/channels/api_tasks_channel.js.map +1 -0
  17. package/dist/client.d.ts +10 -0
  18. package/dist/client.d.ts.map +1 -1
  19. package/dist/client.js +12 -2
  20. package/dist/client.js.map +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +3 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/types/ai.d.ts +66 -52
  26. package/dist/types/ai.d.ts.map +1 -1
  27. package/dist/types/ai.js +7 -2
  28. package/dist/types/ai.js.map +1 -1
  29. package/dist/types/artifacts.d.ts +8 -8
  30. package/dist/types/artifacts.js +2 -2
  31. package/dist/types/artifacts.js.map +1 -1
  32. package/dist/types/automations.d.ts +68 -10
  33. package/dist/types/automations.d.ts.map +1 -1
  34. package/dist/types/automations.js +22 -2
  35. package/dist/types/automations.js.map +1 -1
  36. package/dist/types/chat.d.ts +18446 -3559
  37. package/dist/types/chat.d.ts.map +1 -1
  38. package/dist/types/chat.js +2 -2
  39. package/dist/types/chat.js.map +1 -1
  40. package/dist/types/common.d.ts +12646 -2316
  41. package/dist/types/common.d.ts.map +1 -1
  42. package/dist/types/common.js +372 -80
  43. package/dist/types/common.js.map +1 -1
  44. package/dist/types/config.d.ts +22 -10
  45. package/dist/types/config.d.ts.map +1 -1
  46. package/dist/types/config.js +4 -2
  47. package/dist/types/config.js.map +1 -1
  48. package/dist/types/device.d.ts +60 -0
  49. package/dist/types/device.d.ts.map +1 -0
  50. package/dist/types/device.js +25 -0
  51. package/dist/types/device.js.map +1 -0
  52. package/dist/types/extractions.d.ts +452 -0
  53. package/dist/types/extractions.d.ts.map +1 -0
  54. package/dist/types/extractions.js +52 -0
  55. package/dist/types/extractions.js.map +1 -0
  56. package/dist/types/image.js +2 -2
  57. package/dist/types/image.js.map +1 -1
  58. package/dist/types/index.d.ts +3 -0
  59. package/dist/types/index.d.ts.map +1 -1
  60. package/dist/types/index.js +5 -2
  61. package/dist/types/index.js.map +1 -1
  62. package/dist/types/invites.js +2 -2
  63. package/dist/types/invites.js.map +1 -1
  64. package/dist/types/notifications.d.ts +2 -2
  65. package/dist/types/notifications.js +2 -2
  66. package/dist/types/notifications.js.map +1 -1
  67. package/dist/types/oauth.d.ts +117 -0
  68. package/dist/types/oauth.d.ts.map +1 -0
  69. package/dist/types/oauth.js +21 -0
  70. package/dist/types/oauth.js.map +1 -0
  71. package/dist/types/teams.d.ts +2402 -242
  72. package/dist/types/teams.d.ts.map +1 -1
  73. package/dist/types/teams.js +2 -2
  74. package/dist/types/teams.js.map +1 -1
  75. package/dist/types/threads.d.ts +1419 -328
  76. package/dist/types/threads.d.ts.map +1 -1
  77. package/dist/types/threads.js +18 -17
  78. package/dist/types/threads.js.map +1 -1
  79. package/dist/types/users.d.ts +2 -2
  80. package/dist/types/users.js +2 -2
  81. package/dist/types/users.js.map +1 -1
  82. package/dist/v1/resources/activity_feed.d.ts +84 -0
  83. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  84. package/dist/v1/resources/activity_feed.js +2 -2
  85. package/dist/v1/resources/activity_feed.js.map +1 -1
  86. package/dist/v1/resources/agent_computers.js +2 -2
  87. package/dist/v1/resources/agent_computers.js.map +1 -1
  88. package/dist/v1/resources/agent_env_vars.js +2 -2
  89. package/dist/v1/resources/agent_env_vars.js.map +1 -1
  90. package/dist/v1/resources/agent_health_actions.js +2 -2
  91. package/dist/v1/resources/agent_health_actions.js.map +1 -1
  92. package/dist/v1/resources/agent_installations.d.ts +2 -2
  93. package/dist/v1/resources/agent_installations.d.ts.map +1 -1
  94. package/dist/v1/resources/agent_installations.js +3 -3
  95. package/dist/v1/resources/agent_installations.js.map +1 -1
  96. package/dist/v1/resources/agent_routine_runs.d.ts +16 -1
  97. package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -1
  98. package/dist/v1/resources/agent_routine_runs.js +16 -2
  99. package/dist/v1/resources/agent_routine_runs.js.map +1 -1
  100. package/dist/v1/resources/agent_routines.d.ts +47 -3
  101. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  102. package/dist/v1/resources/agent_routines.js +42 -3
  103. package/dist/v1/resources/agent_routines.js.map +1 -1
  104. package/dist/v1/resources/agent_sessions.d.ts +14 -2
  105. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  106. package/dist/v1/resources/agent_sessions.js +14 -3
  107. package/dist/v1/resources/agent_sessions.js.map +1 -1
  108. package/dist/v1/resources/agent_skills.js +2 -2
  109. package/dist/v1/resources/agent_skills.js.map +1 -1
  110. package/dist/v1/resources/agent_tools.d.ts +2 -2
  111. package/dist/v1/resources/agent_tools.d.ts.map +1 -1
  112. package/dist/v1/resources/agent_tools.js +3 -3
  113. package/dist/v1/resources/agent_tools.js.map +1 -1
  114. package/dist/v1/resources/agents.d.ts +152 -35
  115. package/dist/v1/resources/agents.d.ts.map +1 -1
  116. package/dist/v1/resources/agents.js +148 -42
  117. package/dist/v1/resources/agents.js.map +1 -1
  118. package/dist/v1/resources/ai.d.ts +81 -40
  119. package/dist/v1/resources/ai.d.ts.map +1 -1
  120. package/dist/v1/resources/ai.js +52 -17
  121. package/dist/v1/resources/ai.js.map +1 -1
  122. package/dist/v1/resources/artifacts.js +2 -2
  123. package/dist/v1/resources/artifacts.js.map +1 -1
  124. package/dist/v1/resources/automation_runs.d.ts +41 -6
  125. package/dist/v1/resources/automation_runs.d.ts.map +1 -1
  126. package/dist/v1/resources/automation_runs.js +47 -8
  127. package/dist/v1/resources/automation_runs.js.map +1 -1
  128. package/dist/v1/resources/automations.d.ts +14 -1
  129. package/dist/v1/resources/automations.d.ts.map +1 -1
  130. package/dist/v1/resources/automations.js +15 -3
  131. package/dist/v1/resources/automations.js.map +1 -1
  132. package/dist/v1/resources/bug_reports.js +2 -2
  133. package/dist/v1/resources/bug_reports.js.map +1 -1
  134. package/dist/v1/resources/config.d.ts +3 -0
  135. package/dist/v1/resources/config.d.ts.map +1 -1
  136. package/dist/v1/resources/config.js +2 -2
  137. package/dist/v1/resources/config.js.map +1 -1
  138. package/dist/v1/resources/custom_objects.js +2 -2
  139. package/dist/v1/resources/custom_objects.js.map +1 -1
  140. package/dist/v1/resources/extractions.d.ts +50 -0
  141. package/dist/v1/resources/extractions.d.ts.map +1 -0
  142. package/dist/v1/resources/extractions.js +48 -0
  143. package/dist/v1/resources/extractions.js.map +1 -0
  144. package/dist/v1/resources/files.d.ts +88 -1
  145. package/dist/v1/resources/files.d.ts.map +1 -1
  146. package/dist/v1/resources/files.js +86 -3
  147. package/dist/v1/resources/files.js.map +1 -1
  148. package/dist/v1/resources/index.d.ts +5 -0
  149. package/dist/v1/resources/index.d.ts.map +1 -1
  150. package/dist/v1/resources/index.js +7 -2
  151. package/dist/v1/resources/index.js.map +1 -1
  152. package/dist/v1/resources/installation_sources.js +2 -2
  153. package/dist/v1/resources/installation_sources.js.map +1 -1
  154. package/dist/v1/resources/invites.js +2 -2
  155. package/dist/v1/resources/invites.js.map +1 -1
  156. package/dist/v1/resources/knowledge_documents.d.ts +33 -1
  157. package/dist/v1/resources/knowledge_documents.d.ts.map +1 -1
  158. package/dist/v1/resources/knowledge_documents.js +25 -2
  159. package/dist/v1/resources/knowledge_documents.js.map +1 -1
  160. package/dist/v1/resources/knowledge_ingestions.d.ts +16 -0
  161. package/dist/v1/resources/knowledge_ingestions.d.ts.map +1 -0
  162. package/dist/v1/resources/knowledge_ingestions.js +21 -0
  163. package/dist/v1/resources/knowledge_ingestions.js.map +1 -0
  164. package/dist/v1/resources/knowledge_sources.d.ts +2 -0
  165. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -1
  166. package/dist/v1/resources/knowledge_sources.js +3 -2
  167. package/dist/v1/resources/knowledge_sources.js.map +1 -1
  168. package/dist/v1/resources/kv.js +2 -2
  169. package/dist/v1/resources/kv.js.map +1 -1
  170. package/dist/v1/resources/notification_preferences.js +2 -2
  171. package/dist/v1/resources/notification_preferences.js.map +1 -1
  172. package/dist/v1/resources/notifications.js +2 -2
  173. package/dist/v1/resources/notifications.js.map +1 -1
  174. package/dist/v1/resources/oauth.d.ts +115 -0
  175. package/dist/v1/resources/oauth.d.ts.map +1 -0
  176. package/dist/v1/resources/oauth.js +112 -0
  177. package/dist/v1/resources/oauth.js.map +1 -0
  178. package/dist/v1/resources/orgs.js +2 -2
  179. package/dist/v1/resources/orgs.js.map +1 -1
  180. package/dist/v1/resources/slack_channel_bindings.d.ts +25 -0
  181. package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -1
  182. package/dist/v1/resources/slack_channel_bindings.js +24 -2
  183. package/dist/v1/resources/slack_channel_bindings.js.map +1 -1
  184. package/dist/v1/resources/solution_categories.js +2 -2
  185. package/dist/v1/resources/solution_categories.js.map +1 -1
  186. package/dist/v1/resources/solution_instances.d.ts +26 -0
  187. package/dist/v1/resources/solution_instances.d.ts.map +1 -0
  188. package/dist/v1/resources/solution_instances.js +35 -0
  189. package/dist/v1/resources/solution_instances.js.map +1 -0
  190. package/dist/v1/resources/solution_tags.js +2 -2
  191. package/dist/v1/resources/solution_tags.js.map +1 -1
  192. package/dist/v1/resources/solutions.d.ts +85 -1
  193. package/dist/v1/resources/solutions.d.ts.map +1 -1
  194. package/dist/v1/resources/solutions.js +67 -3
  195. package/dist/v1/resources/solutions.js.map +1 -1
  196. package/dist/v1/resources/team_memberships.js +2 -2
  197. package/dist/v1/resources/team_memberships.js.map +1 -1
  198. package/dist/v1/resources/teams.d.ts +210 -4
  199. package/dist/v1/resources/teams.d.ts.map +1 -1
  200. package/dist/v1/resources/teams.js +16 -6
  201. package/dist/v1/resources/teams.js.map +1 -1
  202. package/dist/v1/resources/thread_messages.d.ts +24 -4
  203. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  204. package/dist/v1/resources/thread_messages.js +9 -6
  205. package/dist/v1/resources/thread_messages.js.map +1 -1
  206. package/dist/v1/resources/threads.d.ts +158 -42
  207. package/dist/v1/resources/threads.d.ts.map +1 -1
  208. package/dist/v1/resources/threads.js +121 -32
  209. package/dist/v1/resources/threads.js.map +1 -1
  210. package/dist/v1/resources/users.d.ts +132 -1
  211. package/dist/v1/resources/users.d.ts.map +1 -1
  212. package/dist/v1/resources/users.js +4 -2
  213. package/dist/v1/resources/users.js.map +1 -1
  214. package/dist/v1/resources/work_items.d.ts +78 -0
  215. package/dist/v1/resources/work_items.d.ts.map +1 -0
  216. package/dist/v1/resources/work_items.js +86 -0
  217. package/dist/v1/resources/work_items.js.map +1 -0
  218. package/dist/v1.d.ts +10 -0
  219. package/dist/v1.d.ts.map +1 -1
  220. package/dist/v1.js +17 -2
  221. package/dist/v1.js.map +1 -1
  222. package/package.json +1 -1
@@ -1,12 +1,15 @@
1
1
  import { HttpClient } from "../../runtime/http-client.js";
2
- import type { Thread, ThreadMember, ThreadReadStatus, ThreadSettings } from "../../types/threads.js";
2
+ import type { ChatMember } from "../../types/chat.js";
3
+ import type { Thread, ThreadReadStatus, ThreadSettings } from "../../types/threads.js";
3
4
  export declare class ThreadMemberResource {
4
5
  private http;
5
6
  constructor(http: HttpClient);
6
7
  /**
7
8
  * Remove a member from a thread
8
- * Removes a user or agent membership from the specified thread. The authenticated
9
- * user must have access to the thread. A successful removal returns HTTP 204 with
9
+ * Removes a user or agent from the explicit roster of a private or restricted
10
+ * thread. Team-visible threads use implicit membership and reject individual
11
+ * removals. A member may remove themself; removing someone else requires
12
+ * permission to modify the thread. A successful removal returns HTTP 204 with
10
13
  * no response body.
11
14
  * Supply either `user` or `agent` depending on the value of `type`. Returns 404
12
15
  * if the thread or the membership record does not exist.
@@ -16,9 +19,9 @@ export declare class ThreadMemberResource {
16
19
  remove(thread: string): Promise<void>;
17
20
  /**
18
21
  * List members of a thread
19
- * Returns all current members of the specified thread, including both user and
20
- * agent members. The authenticated user must have visibility into the thread;
21
- * requests from users without access return 403.
22
+ * Returns all current user and agent members. Private and restricted threads
23
+ * return their explicit roster; team-visible threads return the owning team's
24
+ * implicit roster. The authenticated viewer must be able to see the thread.
22
25
  * Results are returned as a flat array in the `data` field. The list is not
23
26
  * paginated — all members are returned in a single response.
24
27
  * @param thread - Thread ID (`thr_...`) identifying the thread to remove the member from.
@@ -26,46 +29,52 @@ export declare class ThreadMemberResource {
26
29
  */
27
30
  list(thread: string): Promise<{
28
31
  data: {
32
+ agent?: {
33
+ email?: string | undefined;
34
+ id: string;
35
+ name?: string | undefined;
36
+ org?: string | undefined;
37
+ team?: string | undefined;
38
+ user?: string | undefined;
39
+ } | undefined;
40
+ joined_at?: string | undefined;
41
+ member_type?: string | undefined;
29
42
  membership_type?: string | undefined;
30
- thread?: string | undefined;
43
+ role?: string | undefined;
44
+ type: string;
31
45
  user?: {
32
- alias?: string | undefined;
33
- app?: string | undefined;
34
- app_name?: string | undefined;
35
46
  email?: string | undefined;
47
+ full_name?: string | undefined;
36
48
  id: string;
37
- is_system_user?: boolean | undefined;
38
- metadata?: Record<string, unknown> | undefined;
39
49
  name?: string | undefined;
40
50
  org?: string | undefined;
41
- org_name?: string | undefined;
42
- org_role?: string | undefined;
43
- sandbox?: string | undefined;
44
- sandbox_name?: string | undefined;
45
51
  } | undefined;
46
52
  }[];
47
53
  }>;
48
54
  /**
49
55
  * Add a member to a thread
50
- * Adds a user or agent as a member of the specified thread. The authenticated
51
- * user must have access to the thread. On success the new membership record is
52
- * returned with HTTP 201.
53
- * Supply either `user` or `agent` depending on the value of `type`. Attempting
54
- * to add a principal that is already a member of the thread returns a 422 error.
56
+ * Adds a user or agent to the explicit roster of a private or restricted
57
+ * thread. Team-visible threads use the owning team's implicit roster and reject
58
+ * explicit additions. On restricted threads, a team member may add themself;
59
+ * adding anyone else requires permission to modify the thread.
60
+ * Supply either `user` or `agent` depending on the value of `type`. Targets
61
+ * must be visible to the caller and, for an ordinary team-owned thread, must
62
+ * belong to the owning team. On success the membership record is returned with
63
+ * HTTP 201; repeated agent additions are idempotent.
55
64
  * @param thread - Thread ID (`thr_...`) identifying the thread to remove the member from.
56
65
  * @param input - Request body.
57
66
  * @param input.agent - Agent ID of the principal to add. Required when `type` is `"agent"`.
58
67
  * @param input.membership_type - Role granted to the new member. One of `"owner"` or `"member"`. Defaults to `"member"`.
59
68
  * @param input.type - Kind of principal being added. Must be `"user"` or `"agent"`.
60
69
  * @param input.user - User ID of the principal to add. Required when `type` is `"user"`.
61
- * @returns The newly created thread membership record.
70
+ * @returns The user or agent membership that was added to the thread.
62
71
  */
63
72
  create(thread: string, input: {
64
73
  agent?: string | undefined;
65
74
  membership_type?: string | undefined;
66
75
  type: string;
67
76
  user?: string | undefined;
68
- }): Promise<ThreadMember>;
77
+ }): Promise<ChatMember>;
69
78
  }
70
79
  export declare class SettingResource {
71
80
  private http;
@@ -99,10 +108,57 @@ export declare class SettingResource {
99
108
  settings: Record<string, unknown>;
100
109
  }): Promise<ThreadSettings>;
101
110
  }
111
+ export declare class TagResource {
112
+ private http;
113
+ constructor(http: HttpClient);
114
+ /**
115
+ * Remove tags from a thread
116
+ * Removes one or more status tags from the thread and returns the updated
117
+ * thread. Removing a tag the thread does not have is a no-op.
118
+ * Any participant of the thread — a human member or an agent member — may edit
119
+ * tags. Supply the tags to remove as repeated query parameters, e.g.
120
+ * `?tags[]=blocked&tags[]=needs-review`.
121
+ * @param thread - Thread ID (`thr_...`) to untag.
122
+ * @returns The thread object after the tags were removed.
123
+ */
124
+ remove(thread: string): Promise<Thread>;
125
+ /**
126
+ * Add tags to a thread
127
+ * Adds one or more status tags to the thread and returns the updated thread.
128
+ * Any participant of the thread — a human member or an agent member — may edit
129
+ * tags; this is broader than the owner/admin permission required to update other
130
+ * thread fields. Adding a tag the thread already has is a no-op. Tags are
131
+ * normalized (trimmed and lowercased) and may contain only lowercase letters,
132
+ * numbers, hyphens, and underscores.
133
+ * @param thread - Thread ID (`thr_...`) to untag.
134
+ * @param input - Request body.
135
+ * @param input.tags - Tags to add to the thread.
136
+ * @returns The thread object after the tags were added.
137
+ */
138
+ create(thread: string, input: {
139
+ tags: string[];
140
+ }): Promise<Thread>;
141
+ /**
142
+ * Replace a thread's tags
143
+ * Replaces the thread's entire set of status tags with the provided list and
144
+ * returns the updated thread. Passing an empty array clears all tags.
145
+ * Any participant of the thread — a human member or an agent member — may edit
146
+ * tags. Tags are normalized (trimmed and lowercased) and may contain only
147
+ * lowercase letters, numbers, hyphens, and underscores.
148
+ * @param thread - Thread ID (`thr_...`) to untag.
149
+ * @param input - Request body.
150
+ * @param input.tags - The complete set of tags for the thread. An empty array clears all tags.
151
+ * @returns The thread object after its tags were replaced.
152
+ */
153
+ replace(thread: string, input: {
154
+ tags: string[];
155
+ }): Promise<Thread>;
156
+ }
102
157
  export declare class ThreadResource {
103
158
  private http;
104
159
  readonly members: ThreadMemberResource;
105
160
  readonly settings: SettingResource;
161
+ readonly tags: TagResource;
106
162
  constructor(http: HttpClient);
107
163
  /**
108
164
  * Delete a thread
@@ -131,10 +187,15 @@ export declare class ThreadResource {
131
187
  * the full thread object with the applied changes. Only the fields you provide
132
188
  * are modified; omitted fields retain their current values.
133
189
  * If `profile_picture` is supplied, the image is uploaded before the other
134
- * fields are saved. Supplying invalid base64 picture data returns 422 and no
135
- * other fields are updated.
136
- * The authenticated user must own the thread or be a team owner of the workspace
137
- * the thread belongs to.
190
+ * fields are saved, after all ordinary thread fields have passed validation.
191
+ * Supplying invalid base64 picture data returns 422 and no other fields are
192
+ * updated.
193
+ * Visibility can only widen: `private` may become `restricted` or `team`, and
194
+ * `restricted` may become `team`. The authenticated viewer must have
195
+ * permission to modify the thread.
196
+ * Mirror-thread titles, descriptions, and notification state remain editable
197
+ * by privileged app viewers. Mirror metadata, visibility, and membership are
198
+ * provider-managed and cannot be changed through this endpoint.
138
199
  * @param thread - Thread ID (`thr_...`). The authenticated user must have permission to update this thread.
139
200
  * @param input - Request body.
140
201
  * @param input.description - Optional longer text describing the thread's purpose. Replaces the existing description when provided.
@@ -142,6 +203,7 @@ export declare class ThreadResource {
142
203
  * @param input.muted - When `true`, suppresses notifications for new messages in this thread for the authenticated user.
143
204
  * @param input.profile_picture - New profile picture for the thread. Provide all three inner fields to replace the existing image.
144
205
  * @param input.title - Human-readable display name for the thread. Replaces the existing title when provided.
206
+ * @param input.visibility - Widen a team-owned thread: `private` may become `restricted` or `team`, and `restricted` may become `team`. Visibility cannot be narrowed.
145
207
  * @returns The thread object after the update has been applied.
146
208
  */
147
209
  replace(thread: string, input: {
@@ -154,6 +216,7 @@ export declare class ThreadResource {
154
216
  mime_type?: string | undefined;
155
217
  } | undefined;
156
218
  title?: string | undefined;
219
+ visibility?: "private" | "restricted" | "team" | undefined;
157
220
  }): Promise<Thread>;
158
221
  /**
159
222
  * List agents in a thread
@@ -242,6 +305,8 @@ export declare class ThreadResource {
242
305
  * specific message. Use `anchor=last_matching&anchor_agent_mode=embedded` to
243
306
  * resolve the anchor from the latest embedded-agent message, and add
244
307
  * `anchor_agent` to scope that resolution to a single sender agent.
308
+ * Supply `metadata` as a JSON-encoded structured expression to filter message
309
+ * metadata before cursor pagination or anchored window limits are applied.
245
310
  * The authenticated user must have access to the thread's owner (workspace or user).
246
311
  * A 403 is returned if the thread exists but is not accessible to the caller; a 404
247
312
  * is returned if the thread does not exist or is not visible to the authenticated user.
@@ -252,11 +317,12 @@ export declare class ThreadResource {
252
317
  * @param params - Query parameters.
253
318
  * @param params.beforeCursor - Opaque cursor returned in a previous response's `before_cursor` field. When provided, returns messages immediately before that position. May be combined with `after_cursor` to bound a range.
254
319
  * @param params.afterCursor - Opaque cursor returned in a previous response's `after_cursor` field. When provided, returns messages immediately after that position. May be combined with `before_cursor` to bound a range.
255
- * @param params.limit - Maximum number of messages to return per page. Defaults to 20.
320
+ * @param params.metadata - Structured metadata filter expression. Only messages whose `metadata` object satisfies the expression are returned. The filter is applied before cursor pagination and anchored window limits.
321
+ * @param params.limit - Maximum number of messages to return per page. Defaults to 20; maximum is 100.
256
322
  * @param params.anchor - Message ID (`msg_...`) to use as a window anchor, or `last_matching` to resolve the anchor from the latest message matching the anchor filters. Cannot be combined with `before_cursor` or `after_cursor`.
257
323
  * @param params.direction - Window direction relative to `anchor`. `before` returns older messages, `after` returns newer messages, and `around` returns messages on both sides. Defaults to `after` when `anchor` is supplied. `direction=around` cannot be combined with an explicit `limit`; use `before_limit` and `after_limit`.
258
- * @param params.beforeLimit - For `direction=around`, maximum number of messages older than the anchor. Defaults to 20.
259
- * @param params.afterLimit - For `direction=around`, maximum number of messages newer than the anchor. Defaults to 20.
324
+ * @param params.beforeLimit - For `direction=around`, maximum number of messages older than the anchor. Defaults to 20; maximum is 100.
325
+ * @param params.afterLimit - For `direction=around`, maximum number of messages newer than the anchor. Defaults to 20; maximum is 100.
260
326
  * @param params.includeAnchor - Whether to include the anchor message in a window response. Defaults to `true` for `direction=around`; ignored for ordinary cursor pagination and one-sided windows.
261
327
  * @param params.anchorAgentMode - When `anchor=last_matching`, resolve the anchor from the latest message with this local agent execution mode.
262
328
  * @param params.anchorAgent - When `anchor=last_matching`, scope the anchor resolution to messages sent by this agent (`agi_...`). Combine with `anchor_agent_mode` to resolve the latest message from a specific agent in a given mode.
@@ -266,6 +332,15 @@ export declare class ThreadResource {
266
332
  messages(thread: string, params?: {
267
333
  beforeCursor?: string;
268
334
  afterCursor?: string;
335
+ metadata?: {
336
+ clause?: Record<string, unknown> | undefined;
337
+ clauses?: Record<string, unknown>[] | undefined;
338
+ key?: string | undefined;
339
+ operator?: "and" | "or" | "eq" | "contains" | "exists" | "not" | undefined;
340
+ path?: string[] | undefined;
341
+ type?: string | undefined;
342
+ value?: unknown | undefined;
343
+ };
269
344
  limit?: number;
270
345
  anchor?: string;
271
346
  direction?: "before" | "after" | "around";
@@ -281,6 +356,22 @@ export declare class ThreadResource {
281
356
  anchor?: string | undefined;
282
357
  before_cursor?: string | undefined;
283
358
  messages: {
359
+ acl?: {
360
+ add?: {
361
+ actions: string[];
362
+ principal?: string | undefined;
363
+ principal_type: string;
364
+ }[] | undefined;
365
+ grants?: {
366
+ actions: string[];
367
+ principal?: string | undefined;
368
+ principal_type: string;
369
+ }[] | undefined;
370
+ remove?: {
371
+ principal?: string | undefined;
372
+ principal_type: string;
373
+ }[] | undefined;
374
+ } | undefined;
284
375
  actors?: {
285
376
  alias?: string | undefined;
286
377
  id?: string | undefined;
@@ -351,6 +442,7 @@ export declare class ThreadResource {
351
442
  has_replies?: boolean | undefined;
352
443
  id: string;
353
444
  idempotency_key?: string | undefined;
445
+ is_deleted?: boolean | undefined;
354
446
  legacy_agent?: string | undefined;
355
447
  metadata?: Record<string, unknown> | undefined;
356
448
  org?: string | undefined;
@@ -368,7 +460,9 @@ export declare class ThreadResource {
368
460
  sandbox?: string | undefined;
369
461
  team?: string | undefined;
370
462
  thread?: string | undefined;
463
+ type?: string | undefined;
371
464
  user?: string | undefined;
465
+ visibility?: "default" | "private" | undefined;
372
466
  }[];
373
467
  };
374
468
  }>;
@@ -409,24 +503,46 @@ export declare class ThreadResource {
409
503
  user?: string;
410
504
  }): Promise<ThreadReadStatus>;
411
505
  /**
412
- * Search context items within a thread
413
- * Performs a full-text search over context items (messages, files, and other
414
- * indexed sources) attached to the specified thread. Returns tagged objects
415
- * whose content matches the query string.
416
- * Use the `type` param to restrict results to a particular context source. All
417
- * accessible context source types are searched when `type` is omitted. The
418
- * authenticated user must have access to the thread.
419
- * @param thread - Thread ID (`thr_...`). Must be accessible to the authenticated user.
506
+ * Search messages in a thread
507
+ * Searches canonical message content in the specified thread. `"text"` mode
508
+ * performs the existing case-insensitive substring search, `"embedding"` ranks
509
+ * stored message embeddings by cosine similarity, and `"hybrid"` combines the
510
+ * text and embedding rankings with Reciprocal Rank Fusion (RRF). Only messages
511
+ * visible to the authenticated caller are considered.
512
+ * Results are intentionally lean: each row contains only a bounded content
513
+ * snippet, sender identity, and timestamp. Attachments, reactions, ACLs, and
514
+ * metadata are neither hydrated nor serialized. At most 20 results are
515
+ * returned. Text results support chronological cursor pagination. Embedding and
516
+ * hybrid results are relevance-ranked single pages and return null cursors.
517
+ * @param thread - Thread ID (`thr_...`). Must be visible to the authenticated caller.
420
518
  * @param params - Query parameters.
421
- * @param params.q - Full-text search query. Results are ranked by relevance to this string.
422
- * @param params.type - Context source type to restrict the search to, e.g. `"thread/messages"`. Omit to search across all context sources for the thread.
519
+ * @param params.app - App ID (`app_...`). Required by the protected developer mount and omitted from the public mount.
520
+ * @param params.q - Text or semantic search query. Must contain 3 to 200 characters after trimming.
521
+ * @param params.limit - Maximum number of results. Defaults to 20 and is capped at 20.
522
+ * @param params.mode - Search algorithm: `text` for substring matching, `embedding` for cosine similarity, or `hybrid` for RRF over both rankings.
523
+ * @param params.beforeCursor - Text mode only. Opaque cursor returned by a previous page; fetches older matches.
524
+ * @param params.afterCursor - Text mode only. Opaque cursor returned by a previous page; fetches newer matches.
423
525
  * @returns Successful response
424
526
  */
425
527
  search(thread: string, params?: {
528
+ app?: string;
426
529
  q?: string;
427
- type?: string;
530
+ limit?: number;
531
+ mode?: "text" | "embedding" | "hybrid";
532
+ beforeCursor?: string;
533
+ afterCursor?: string;
428
534
  }): Promise<{
429
- data: Record<string, unknown>[];
535
+ after_cursor?: string | undefined;
536
+ before_cursor?: string | undefined;
537
+ data: {
538
+ agent?: string | undefined;
539
+ content: string;
540
+ created_at: string;
541
+ id: string;
542
+ similarity_score?: number | undefined;
543
+ user?: string | undefined;
544
+ }[];
545
+ has_more: boolean;
430
546
  }>;
431
547
  }
432
548
  //# sourceMappingURL=threads.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/threads.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAErG,qBAAa,oBAAoB;IACnB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;OASG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C;;;;;;;;;OASG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE;YAAE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,IAAI,CAAC,EAAE;gBAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,EAAE,EAAE,MAAM,CAAC;gBAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;gBAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;gBAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,QAAQ,CA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OAqBG;IACG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,EAAE,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;CAqB3a"}
@@ -1,6 +1,6 @@
1
- // Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
1
+ // Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: 47cfb6f1fb97
3
+ // Content hash: c2f6e27afea7
4
4
  export class ThreadMemberResource {
5
5
  http;
6
6
  constructor(http) {
@@ -8,8 +8,10 @@ export class ThreadMemberResource {
8
8
  }
9
9
  /**
10
10
  * Remove a member from a thread
11
- * Removes a user or agent membership from the specified thread. The authenticated
12
- * user must have access to the thread. A successful removal returns HTTP 204 with
11
+ * Removes a user or agent from the explicit roster of a private or restricted
12
+ * thread. Team-visible threads use implicit membership and reject individual
13
+ * removals. A member may remove themself; removing someone else requires
14
+ * permission to modify the thread. A successful removal returns HTTP 204 with
13
15
  * no response body.
14
16
  * Supply either `user` or `agent` depending on the value of `type`. Returns 404
15
17
  * if the thread or the membership record does not exist.
@@ -21,9 +23,9 @@ export class ThreadMemberResource {
21
23
  }
22
24
  /**
23
25
  * List members of a thread
24
- * Returns all current members of the specified thread, including both user and
25
- * agent members. The authenticated user must have visibility into the thread;
26
- * requests from users without access return 403.
26
+ * Returns all current user and agent members. Private and restricted threads
27
+ * return their explicit roster; team-visible threads return the owning team's
28
+ * implicit roster. The authenticated viewer must be able to see the thread.
27
29
  * Results are returned as a flat array in the `data` field. The list is not
28
30
  * paginated — all members are returned in a single response.
29
31
  * @param thread - Thread ID (`thr_...`) identifying the thread to remove the member from.
@@ -34,18 +36,21 @@ export class ThreadMemberResource {
34
36
  }
35
37
  /**
36
38
  * Add a member to a thread
37
- * Adds a user or agent as a member of the specified thread. The authenticated
38
- * user must have access to the thread. On success the new membership record is
39
- * returned with HTTP 201.
40
- * Supply either `user` or `agent` depending on the value of `type`. Attempting
41
- * to add a principal that is already a member of the thread returns a 422 error.
39
+ * Adds a user or agent to the explicit roster of a private or restricted
40
+ * thread. Team-visible threads use the owning team's implicit roster and reject
41
+ * explicit additions. On restricted threads, a team member may add themself;
42
+ * adding anyone else requires permission to modify the thread.
43
+ * Supply either `user` or `agent` depending on the value of `type`. Targets
44
+ * must be visible to the caller and, for an ordinary team-owned thread, must
45
+ * belong to the owning team. On success the membership record is returned with
46
+ * HTTP 201; repeated agent additions are idempotent.
42
47
  * @param thread - Thread ID (`thr_...`) identifying the thread to remove the member from.
43
48
  * @param input - Request body.
44
49
  * @param input.agent - Agent ID of the principal to add. Required when `type` is `"agent"`.
45
50
  * @param input.membership_type - Role granted to the new member. One of `"owner"` or `"member"`. Defaults to `"member"`.
46
51
  * @param input.type - Kind of principal being added. Must be `"user"` or `"agent"`.
47
52
  * @param input.user - User ID of the principal to add. Required when `type` is `"user"`.
48
- * @returns The newly created thread membership record.
53
+ * @returns The user or agent membership that was added to the thread.
49
54
  */
50
55
  async create(thread, input) {
51
56
  return this.http.request(`/api/v1/threads/${thread}/members`, { method: "POST", body: input });
@@ -85,14 +90,66 @@ export class SettingResource {
85
90
  return this.http.request(`/api/v1/threads/${thread}/settings`, { method: "PUT", body: input });
86
91
  }
87
92
  }
93
+ export class TagResource {
94
+ http;
95
+ constructor(http) {
96
+ this.http = http;
97
+ }
98
+ /**
99
+ * Remove tags from a thread
100
+ * Removes one or more status tags from the thread and returns the updated
101
+ * thread. Removing a tag the thread does not have is a no-op.
102
+ * Any participant of the thread — a human member or an agent member — may edit
103
+ * tags. Supply the tags to remove as repeated query parameters, e.g.
104
+ * `?tags[]=blocked&tags[]=needs-review`.
105
+ * @param thread - Thread ID (`thr_...`) to untag.
106
+ * @returns The thread object after the tags were removed.
107
+ */
108
+ async remove(thread) {
109
+ return this.http.request(`/api/v1/threads/${thread}/tags`, { method: "DELETE" });
110
+ }
111
+ /**
112
+ * Add tags to a thread
113
+ * Adds one or more status tags to the thread and returns the updated thread.
114
+ * Any participant of the thread — a human member or an agent member — may edit
115
+ * tags; this is broader than the owner/admin permission required to update other
116
+ * thread fields. Adding a tag the thread already has is a no-op. Tags are
117
+ * normalized (trimmed and lowercased) and may contain only lowercase letters,
118
+ * numbers, hyphens, and underscores.
119
+ * @param thread - Thread ID (`thr_...`) to untag.
120
+ * @param input - Request body.
121
+ * @param input.tags - Tags to add to the thread.
122
+ * @returns The thread object after the tags were added.
123
+ */
124
+ async create(thread, input) {
125
+ return this.http.request(`/api/v1/threads/${thread}/tags`, { method: "POST", body: input });
126
+ }
127
+ /**
128
+ * Replace a thread's tags
129
+ * Replaces the thread's entire set of status tags with the provided list and
130
+ * returns the updated thread. Passing an empty array clears all tags.
131
+ * Any participant of the thread — a human member or an agent member — may edit
132
+ * tags. Tags are normalized (trimmed and lowercased) and may contain only
133
+ * lowercase letters, numbers, hyphens, and underscores.
134
+ * @param thread - Thread ID (`thr_...`) to untag.
135
+ * @param input - Request body.
136
+ * @param input.tags - The complete set of tags for the thread. An empty array clears all tags.
137
+ * @returns The thread object after its tags were replaced.
138
+ */
139
+ async replace(thread, input) {
140
+ return this.http.request(`/api/v1/threads/${thread}/tags`, { method: "PUT", body: input });
141
+ }
142
+ }
88
143
  export class ThreadResource {
89
144
  http;
90
145
  members;
91
146
  settings;
147
+ tags;
92
148
  constructor(http) {
93
149
  this.http = http;
94
150
  this.members = new ThreadMemberResource(http);
95
151
  this.settings = new SettingResource(http);
152
+ this.tags = new TagResource(http);
96
153
  }
97
154
  /**
98
155
  * Delete a thread
@@ -125,10 +182,15 @@ export class ThreadResource {
125
182
  * the full thread object with the applied changes. Only the fields you provide
126
183
  * are modified; omitted fields retain their current values.
127
184
  * If `profile_picture` is supplied, the image is uploaded before the other
128
- * fields are saved. Supplying invalid base64 picture data returns 422 and no
129
- * other fields are updated.
130
- * The authenticated user must own the thread or be a team owner of the workspace
131
- * the thread belongs to.
185
+ * fields are saved, after all ordinary thread fields have passed validation.
186
+ * Supplying invalid base64 picture data returns 422 and no other fields are
187
+ * updated.
188
+ * Visibility can only widen: `private` may become `restricted` or `team`, and
189
+ * `restricted` may become `team`. The authenticated viewer must have
190
+ * permission to modify the thread.
191
+ * Mirror-thread titles, descriptions, and notification state remain editable
192
+ * by privileged app viewers. Mirror metadata, visibility, and membership are
193
+ * provider-managed and cannot be changed through this endpoint.
132
194
  * @param thread - Thread ID (`thr_...`). The authenticated user must have permission to update this thread.
133
195
  * @param input - Request body.
134
196
  * @param input.description - Optional longer text describing the thread's purpose. Replaces the existing description when provided.
@@ -136,6 +198,7 @@ export class ThreadResource {
136
198
  * @param input.muted - When `true`, suppresses notifications for new messages in this thread for the authenticated user.
137
199
  * @param input.profile_picture - New profile picture for the thread. Provide all three inner fields to replace the existing image.
138
200
  * @param input.title - Human-readable display name for the thread. Replaces the existing title when provided.
201
+ * @param input.visibility - Widen a team-owned thread: `private` may become `restricted` or `team`, and `restricted` may become `team`. Visibility cannot be narrowed.
139
202
  * @returns The thread object after the update has been applied.
140
203
  */
141
204
  async replace(thread, input) {
@@ -199,6 +262,8 @@ export class ThreadResource {
199
262
  * specific message. Use `anchor=last_matching&anchor_agent_mode=embedded` to
200
263
  * resolve the anchor from the latest embedded-agent message, and add
201
264
  * `anchor_agent` to scope that resolution to a single sender agent.
265
+ * Supply `metadata` as a JSON-encoded structured expression to filter message
266
+ * metadata before cursor pagination or anchored window limits are applied.
202
267
  * The authenticated user must have access to the thread's owner (workspace or user).
203
268
  * A 403 is returned if the thread exists but is not accessible to the caller; a 404
204
269
  * is returned if the thread does not exist or is not visible to the authenticated user.
@@ -209,11 +274,12 @@ export class ThreadResource {
209
274
  * @param params - Query parameters.
210
275
  * @param params.beforeCursor - Opaque cursor returned in a previous response's `before_cursor` field. When provided, returns messages immediately before that position. May be combined with `after_cursor` to bound a range.
211
276
  * @param params.afterCursor - Opaque cursor returned in a previous response's `after_cursor` field. When provided, returns messages immediately after that position. May be combined with `before_cursor` to bound a range.
212
- * @param params.limit - Maximum number of messages to return per page. Defaults to 20.
277
+ * @param params.metadata - Structured metadata filter expression. Only messages whose `metadata` object satisfies the expression are returned. The filter is applied before cursor pagination and anchored window limits.
278
+ * @param params.limit - Maximum number of messages to return per page. Defaults to 20; maximum is 100.
213
279
  * @param params.anchor - Message ID (`msg_...`) to use as a window anchor, or `last_matching` to resolve the anchor from the latest message matching the anchor filters. Cannot be combined with `before_cursor` or `after_cursor`.
214
280
  * @param params.direction - Window direction relative to `anchor`. `before` returns older messages, `after` returns newer messages, and `around` returns messages on both sides. Defaults to `after` when `anchor` is supplied. `direction=around` cannot be combined with an explicit `limit`; use `before_limit` and `after_limit`.
215
- * @param params.beforeLimit - For `direction=around`, maximum number of messages older than the anchor. Defaults to 20.
216
- * @param params.afterLimit - For `direction=around`, maximum number of messages newer than the anchor. Defaults to 20.
281
+ * @param params.beforeLimit - For `direction=around`, maximum number of messages older than the anchor. Defaults to 20; maximum is 100.
282
+ * @param params.afterLimit - For `direction=around`, maximum number of messages newer than the anchor. Defaults to 20; maximum is 100.
217
283
  * @param params.includeAnchor - Whether to include the anchor message in a window response. Defaults to `true` for `direction=around`; ignored for ordinary cursor pagination and one-sided windows.
218
284
  * @param params.anchorAgentMode - When `anchor=last_matching`, resolve the anchor from the latest message with this local agent execution mode.
219
285
  * @param params.anchorAgent - When `anchor=last_matching`, scope the anchor resolution to messages sent by this agent (`agi_...`). Combine with `anchor_agent_mode` to resolve the latest message from a specific agent in a given mode.
@@ -228,6 +294,9 @@ export class ThreadResource {
228
294
  if (params?.afterCursor !== undefined) {
229
295
  query["after_cursor"] = params?.afterCursor;
230
296
  }
297
+ if (params?.metadata !== undefined) {
298
+ query["metadata"] = JSON.stringify(params?.metadata);
299
+ }
231
300
  if (params?.limit !== undefined) {
232
301
  query["limit"] = params?.limit;
233
302
  }
@@ -294,24 +363,44 @@ export class ThreadResource {
294
363
  return this.http.request(`/api/v1/threads/${thread}/read_status`, { query });
295
364
  }
296
365
  /**
297
- * Search context items within a thread
298
- * Performs a full-text search over context items (messages, files, and other
299
- * indexed sources) attached to the specified thread. Returns tagged objects
300
- * whose content matches the query string.
301
- * Use the `type` param to restrict results to a particular context source. All
302
- * accessible context source types are searched when `type` is omitted. The
303
- * authenticated user must have access to the thread.
304
- * @param thread - Thread ID (`thr_...`). Must be accessible to the authenticated user.
366
+ * Search messages in a thread
367
+ * Searches canonical message content in the specified thread. `"text"` mode
368
+ * performs the existing case-insensitive substring search, `"embedding"` ranks
369
+ * stored message embeddings by cosine similarity, and `"hybrid"` combines the
370
+ * text and embedding rankings with Reciprocal Rank Fusion (RRF). Only messages
371
+ * visible to the authenticated caller are considered.
372
+ * Results are intentionally lean: each row contains only a bounded content
373
+ * snippet, sender identity, and timestamp. Attachments, reactions, ACLs, and
374
+ * metadata are neither hydrated nor serialized. At most 20 results are
375
+ * returned. Text results support chronological cursor pagination. Embedding and
376
+ * hybrid results are relevance-ranked single pages and return null cursors.
377
+ * @param thread - Thread ID (`thr_...`). Must be visible to the authenticated caller.
305
378
  * @param params - Query parameters.
306
- * @param params.q - Full-text search query. Results are ranked by relevance to this string.
307
- * @param params.type - Context source type to restrict the search to, e.g. `"thread/messages"`. Omit to search across all context sources for the thread.
379
+ * @param params.app - App ID (`app_...`). Required by the protected developer mount and omitted from the public mount.
380
+ * @param params.q - Text or semantic search query. Must contain 3 to 200 characters after trimming.
381
+ * @param params.limit - Maximum number of results. Defaults to 20 and is capped at 20.
382
+ * @param params.mode - Search algorithm: `text` for substring matching, `embedding` for cosine similarity, or `hybrid` for RRF over both rankings.
383
+ * @param params.beforeCursor - Text mode only. Opaque cursor returned by a previous page; fetches older matches.
384
+ * @param params.afterCursor - Text mode only. Opaque cursor returned by a previous page; fetches newer matches.
308
385
  * @returns Successful response
309
386
  */
310
387
  async search(thread, params) {
311
388
  const query = {};
389
+ if (params?.app !== undefined) {
390
+ query["app"] = params?.app;
391
+ }
312
392
  query["q"] = params?.q;
313
- if (params?.type !== undefined) {
314
- query["type"] = params?.type;
393
+ if (params?.limit !== undefined) {
394
+ query["limit"] = params?.limit;
395
+ }
396
+ if (params?.mode !== undefined) {
397
+ query["mode"] = params?.mode;
398
+ }
399
+ if (params?.beforeCursor !== undefined) {
400
+ query["before_cursor"] = params?.beforeCursor;
401
+ }
402
+ if (params?.afterCursor !== undefined) {
403
+ query["after_cursor"] = params?.afterCursor;
315
404
  }
316
405
  return this.http.request(`/api/v1/threads/${thread}/search`, { query });
317
406
  }