@recursiv/sdk 0.7.13 → 0.7.15

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 (275) hide show
  1. package/README.md +23 -4
  2. package/dist/client.d.ts +0 -1
  3. package/dist/client.js +0 -1
  4. package/dist/errors.d.ts +0 -1
  5. package/dist/errors.js +0 -1
  6. package/dist/index.d.ts +1 -2
  7. package/dist/index.js +0 -1
  8. package/dist/lib/sse.d.ts +0 -1
  9. package/dist/lib/sse.js +0 -1
  10. package/dist/lib/webhooks.d.ts +0 -1
  11. package/dist/lib/webhooks.js +0 -1
  12. package/dist/next/index.d.ts +0 -1
  13. package/dist/next/index.js +0 -1
  14. package/dist/next/scopes.d.ts +0 -1
  15. package/dist/next/scopes.js +0 -1
  16. package/dist/next/server-auth.d.ts +0 -1
  17. package/dist/next/server-auth.js +0 -1
  18. package/dist/react/index.d.ts +0 -1
  19. package/dist/react/index.js +0 -1
  20. package/dist/react/useChat.d.ts +0 -1
  21. package/dist/react/useChat.js +0 -1
  22. package/dist/realtime.d.ts +1 -2
  23. package/dist/realtime.js +23 -11
  24. package/dist/resources/accounts.d.ts +0 -1
  25. package/dist/resources/accounts.js +0 -1
  26. package/dist/resources/admin.d.ts +4 -1
  27. package/dist/resources/admin.js +4 -1
  28. package/dist/resources/agents.d.ts +11 -2
  29. package/dist/resources/agents.js +12 -1
  30. package/dist/resources/app-subscriptions.d.ts +0 -1
  31. package/dist/resources/app-subscriptions.js +0 -1
  32. package/dist/resources/auth.d.ts +25 -1
  33. package/dist/resources/auth.js +75 -4
  34. package/dist/resources/billing.d.ts +0 -1
  35. package/dist/resources/billing.js +0 -1
  36. package/dist/resources/brain.d.ts +0 -1
  37. package/dist/resources/brain.js +0 -1
  38. package/dist/resources/brief.d.ts +0 -1
  39. package/dist/resources/brief.js +0 -1
  40. package/dist/resources/chat.d.ts +0 -1
  41. package/dist/resources/chat.js +0 -1
  42. package/dist/resources/commands.d.ts +0 -1
  43. package/dist/resources/commands.js +0 -1
  44. package/dist/resources/communities.d.ts +66 -4
  45. package/dist/resources/communities.js +62 -2
  46. package/dist/resources/curator.d.ts +0 -1
  47. package/dist/resources/curator.js +0 -1
  48. package/dist/resources/databases.d.ts +0 -1
  49. package/dist/resources/databases.js +0 -1
  50. package/dist/resources/deployments.d.ts +0 -1
  51. package/dist/resources/deployments.js +0 -1
  52. package/dist/resources/dispatcher.d.ts +18 -2
  53. package/dist/resources/dispatcher.js +6 -2
  54. package/dist/resources/email.d.ts +0 -1
  55. package/dist/resources/email.js +0 -1
  56. package/dist/resources/env-vars.d.ts +0 -1
  57. package/dist/resources/env-vars.js +0 -1
  58. package/dist/resources/evidence.d.ts +26 -4
  59. package/dist/resources/evidence.js +8 -1
  60. package/dist/resources/free-tier.d.ts +0 -1
  61. package/dist/resources/free-tier.js +0 -1
  62. package/dist/resources/github.d.ts +0 -1
  63. package/dist/resources/github.js +0 -1
  64. package/dist/resources/goals.d.ts +0 -1
  65. package/dist/resources/goals.js +0 -1
  66. package/dist/resources/human-asks.d.ts +0 -1
  67. package/dist/resources/human-asks.js +0 -1
  68. package/dist/resources/human-input.d.ts +0 -1
  69. package/dist/resources/human-input.js +0 -1
  70. package/dist/resources/inbox.d.ts +0 -1
  71. package/dist/resources/inbox.js +0 -1
  72. package/dist/resources/integrations.d.ts +0 -1
  73. package/dist/resources/integrations.js +0 -1
  74. package/dist/resources/invite-codes-admin.d.ts +0 -1
  75. package/dist/resources/invite-codes-admin.js +0 -1
  76. package/dist/resources/invite-codes.d.ts +0 -1
  77. package/dist/resources/invite-codes.js +0 -1
  78. package/dist/resources/jobs.d.ts +0 -1
  79. package/dist/resources/jobs.js +0 -1
  80. package/dist/resources/link-preview.d.ts +0 -1
  81. package/dist/resources/link-preview.js +0 -1
  82. package/dist/resources/media.d.ts +0 -1
  83. package/dist/resources/media.js +0 -1
  84. package/dist/resources/memory.d.ts +0 -1
  85. package/dist/resources/memory.js +0 -1
  86. package/dist/resources/moderation.d.ts +0 -1
  87. package/dist/resources/moderation.js +0 -1
  88. package/dist/resources/network.d.ts +0 -1
  89. package/dist/resources/network.js +0 -1
  90. package/dist/resources/notifications.d.ts +14 -2
  91. package/dist/resources/notifications.js +5 -3
  92. package/dist/resources/organization-security.d.ts +0 -1
  93. package/dist/resources/organization-security.js +0 -1
  94. package/dist/resources/organization-settings.d.ts +18 -1
  95. package/dist/resources/organization-settings.js +4 -1
  96. package/dist/resources/organizations.d.ts +0 -1
  97. package/dist/resources/organizations.js +0 -1
  98. package/dist/resources/posts.d.ts +0 -1
  99. package/dist/resources/posts.js +0 -1
  100. package/dist/resources/profiles.d.ts +8 -1
  101. package/dist/resources/profiles.js +8 -1
  102. package/dist/resources/project-brain.d.ts +18 -1
  103. package/dist/resources/project-brain.js +11 -1
  104. package/dist/resources/project-settings.d.ts +0 -1
  105. package/dist/resources/project-settings.js +0 -1
  106. package/dist/resources/projects.d.ts +0 -1
  107. package/dist/resources/projects.js +0 -1
  108. package/dist/resources/protocols.d.ts +54 -1
  109. package/dist/resources/protocols.js +29 -1
  110. package/dist/resources/reports.d.ts +0 -1
  111. package/dist/resources/reports.js +0 -1
  112. package/dist/resources/sandbox.d.ts +0 -1
  113. package/dist/resources/sandbox.js +0 -1
  114. package/dist/resources/settings.d.ts +0 -1
  115. package/dist/resources/settings.js +0 -1
  116. package/dist/resources/simulator.d.ts +0 -1
  117. package/dist/resources/simulator.js +0 -1
  118. package/dist/resources/storage.d.ts +0 -1
  119. package/dist/resources/storage.js +0 -1
  120. package/dist/resources/swarms.d.ts +0 -1
  121. package/dist/resources/swarms.js +0 -1
  122. package/dist/resources/tags.d.ts +0 -1
  123. package/dist/resources/tags.js +0 -1
  124. package/dist/resources/templates.d.ts +0 -1
  125. package/dist/resources/templates.js +0 -1
  126. package/dist/resources/uploads.d.ts +0 -1
  127. package/dist/resources/uploads.js +0 -1
  128. package/dist/resources/users.d.ts +0 -1
  129. package/dist/resources/users.js +0 -1
  130. package/dist/resources/video.d.ts +0 -1
  131. package/dist/resources/video.js +0 -1
  132. package/dist/resources/wallet.d.ts +16 -1
  133. package/dist/resources/wallet.js +12 -1
  134. package/dist/resources/webhooks.d.ts +0 -1
  135. package/dist/resources/webhooks.js +0 -1
  136. package/dist/types.d.ts +34 -1
  137. package/dist/types.js +0 -1
  138. package/llm.md +29 -2
  139. package/package.json +13 -7
  140. package/dist/client.d.ts.map +0 -1
  141. package/dist/client.js.map +0 -1
  142. package/dist/errors.d.ts.map +0 -1
  143. package/dist/errors.js.map +0 -1
  144. package/dist/index.d.ts.map +0 -1
  145. package/dist/index.js.map +0 -1
  146. package/dist/lib/sse.d.ts.map +0 -1
  147. package/dist/lib/sse.js.map +0 -1
  148. package/dist/lib/webhooks.d.ts.map +0 -1
  149. package/dist/lib/webhooks.js.map +0 -1
  150. package/dist/next/index.d.ts.map +0 -1
  151. package/dist/next/index.js.map +0 -1
  152. package/dist/next/scopes.d.ts.map +0 -1
  153. package/dist/next/scopes.js.map +0 -1
  154. package/dist/next/server-auth.d.ts.map +0 -1
  155. package/dist/next/server-auth.js.map +0 -1
  156. package/dist/react/index.d.ts.map +0 -1
  157. package/dist/react/index.js.map +0 -1
  158. package/dist/react/useChat.d.ts.map +0 -1
  159. package/dist/react/useChat.js.map +0 -1
  160. package/dist/realtime.d.ts.map +0 -1
  161. package/dist/realtime.js.map +0 -1
  162. package/dist/resources/accounts.d.ts.map +0 -1
  163. package/dist/resources/accounts.js.map +0 -1
  164. package/dist/resources/admin.d.ts.map +0 -1
  165. package/dist/resources/admin.js.map +0 -1
  166. package/dist/resources/agents.d.ts.map +0 -1
  167. package/dist/resources/agents.js.map +0 -1
  168. package/dist/resources/app-subscriptions.d.ts.map +0 -1
  169. package/dist/resources/app-subscriptions.js.map +0 -1
  170. package/dist/resources/auth.d.ts.map +0 -1
  171. package/dist/resources/auth.js.map +0 -1
  172. package/dist/resources/billing.d.ts.map +0 -1
  173. package/dist/resources/billing.js.map +0 -1
  174. package/dist/resources/brain.d.ts.map +0 -1
  175. package/dist/resources/brain.js.map +0 -1
  176. package/dist/resources/brief.d.ts.map +0 -1
  177. package/dist/resources/brief.js.map +0 -1
  178. package/dist/resources/chat.d.ts.map +0 -1
  179. package/dist/resources/chat.js.map +0 -1
  180. package/dist/resources/commands.d.ts.map +0 -1
  181. package/dist/resources/commands.js.map +0 -1
  182. package/dist/resources/communities.d.ts.map +0 -1
  183. package/dist/resources/communities.js.map +0 -1
  184. package/dist/resources/curator.d.ts.map +0 -1
  185. package/dist/resources/curator.js.map +0 -1
  186. package/dist/resources/databases.d.ts.map +0 -1
  187. package/dist/resources/databases.js.map +0 -1
  188. package/dist/resources/deployments.d.ts.map +0 -1
  189. package/dist/resources/deployments.js.map +0 -1
  190. package/dist/resources/dispatcher.d.ts.map +0 -1
  191. package/dist/resources/dispatcher.js.map +0 -1
  192. package/dist/resources/email.d.ts.map +0 -1
  193. package/dist/resources/email.js.map +0 -1
  194. package/dist/resources/env-vars.d.ts.map +0 -1
  195. package/dist/resources/env-vars.js.map +0 -1
  196. package/dist/resources/evidence.d.ts.map +0 -1
  197. package/dist/resources/evidence.js.map +0 -1
  198. package/dist/resources/free-tier.d.ts.map +0 -1
  199. package/dist/resources/free-tier.js.map +0 -1
  200. package/dist/resources/github.d.ts.map +0 -1
  201. package/dist/resources/github.js.map +0 -1
  202. package/dist/resources/goals.d.ts.map +0 -1
  203. package/dist/resources/goals.js.map +0 -1
  204. package/dist/resources/human-asks.d.ts.map +0 -1
  205. package/dist/resources/human-asks.js.map +0 -1
  206. package/dist/resources/human-input.d.ts.map +0 -1
  207. package/dist/resources/human-input.js.map +0 -1
  208. package/dist/resources/inbox.d.ts.map +0 -1
  209. package/dist/resources/inbox.js.map +0 -1
  210. package/dist/resources/integrations.d.ts.map +0 -1
  211. package/dist/resources/integrations.js.map +0 -1
  212. package/dist/resources/invite-codes-admin.d.ts.map +0 -1
  213. package/dist/resources/invite-codes-admin.js.map +0 -1
  214. package/dist/resources/invite-codes.d.ts.map +0 -1
  215. package/dist/resources/invite-codes.js.map +0 -1
  216. package/dist/resources/jobs.d.ts.map +0 -1
  217. package/dist/resources/jobs.js.map +0 -1
  218. package/dist/resources/link-preview.d.ts.map +0 -1
  219. package/dist/resources/link-preview.js.map +0 -1
  220. package/dist/resources/media.d.ts.map +0 -1
  221. package/dist/resources/media.js.map +0 -1
  222. package/dist/resources/memory.d.ts.map +0 -1
  223. package/dist/resources/memory.js.map +0 -1
  224. package/dist/resources/moderation.d.ts.map +0 -1
  225. package/dist/resources/moderation.js.map +0 -1
  226. package/dist/resources/network.d.ts.map +0 -1
  227. package/dist/resources/network.js.map +0 -1
  228. package/dist/resources/notifications.d.ts.map +0 -1
  229. package/dist/resources/notifications.js.map +0 -1
  230. package/dist/resources/organization-security.d.ts.map +0 -1
  231. package/dist/resources/organization-security.js.map +0 -1
  232. package/dist/resources/organization-settings.d.ts.map +0 -1
  233. package/dist/resources/organization-settings.js.map +0 -1
  234. package/dist/resources/organizations.d.ts.map +0 -1
  235. package/dist/resources/organizations.js.map +0 -1
  236. package/dist/resources/posts.d.ts.map +0 -1
  237. package/dist/resources/posts.js.map +0 -1
  238. package/dist/resources/profiles.d.ts.map +0 -1
  239. package/dist/resources/profiles.js.map +0 -1
  240. package/dist/resources/project-brain.d.ts.map +0 -1
  241. package/dist/resources/project-brain.js.map +0 -1
  242. package/dist/resources/project-settings.d.ts.map +0 -1
  243. package/dist/resources/project-settings.js.map +0 -1
  244. package/dist/resources/projects.d.ts.map +0 -1
  245. package/dist/resources/projects.js.map +0 -1
  246. package/dist/resources/protocols.d.ts.map +0 -1
  247. package/dist/resources/protocols.js.map +0 -1
  248. package/dist/resources/reports.d.ts.map +0 -1
  249. package/dist/resources/reports.js.map +0 -1
  250. package/dist/resources/sandbox.d.ts.map +0 -1
  251. package/dist/resources/sandbox.js.map +0 -1
  252. package/dist/resources/settings.d.ts.map +0 -1
  253. package/dist/resources/settings.js.map +0 -1
  254. package/dist/resources/simulator.d.ts.map +0 -1
  255. package/dist/resources/simulator.js.map +0 -1
  256. package/dist/resources/storage.d.ts.map +0 -1
  257. package/dist/resources/storage.js.map +0 -1
  258. package/dist/resources/swarms.d.ts.map +0 -1
  259. package/dist/resources/swarms.js.map +0 -1
  260. package/dist/resources/tags.d.ts.map +0 -1
  261. package/dist/resources/tags.js.map +0 -1
  262. package/dist/resources/templates.d.ts.map +0 -1
  263. package/dist/resources/templates.js.map +0 -1
  264. package/dist/resources/uploads.d.ts.map +0 -1
  265. package/dist/resources/uploads.js.map +0 -1
  266. package/dist/resources/users.d.ts.map +0 -1
  267. package/dist/resources/users.js.map +0 -1
  268. package/dist/resources/video.d.ts.map +0 -1
  269. package/dist/resources/video.js.map +0 -1
  270. package/dist/resources/wallet.d.ts.map +0 -1
  271. package/dist/resources/wallet.js.map +0 -1
  272. package/dist/resources/webhooks.d.ts.map +0 -1
  273. package/dist/resources/webhooks.js.map +0 -1
  274. package/dist/types.d.ts.map +0 -1
  275. package/dist/types.js.map +0 -1
@@ -45,6 +45,22 @@ export interface AllowPublicSignupResult {
45
45
  allow_public_signup: boolean;
46
46
  updated_at: string;
47
47
  }
48
+ /**
49
+ * "How do we know its work is done?" — the org's answer for every task:
50
+ * `off` takes the agent's word, `warn` runs the task's checks and records a
51
+ * warning on failure without blocking, `require` refuses a close until every
52
+ * thresholded check passes.
53
+ */
54
+ export type TaskClosePolicy = 'off' | 'warn' | 'require';
55
+ export interface SetTaskClosePolicyInput {
56
+ task_close_policy: TaskClosePolicy;
57
+ }
58
+ export interface TaskClosePolicyResult {
59
+ id: string;
60
+ organization_id: string;
61
+ task_close_policy: TaskClosePolicy;
62
+ updated_at: string;
63
+ }
48
64
  export interface SetPreferredContactEmailInput {
49
65
  preferred_contact_email: string | null;
50
66
  }
@@ -84,6 +100,8 @@ export declare class OrganizationSettingsResource {
84
100
  constructor(client: HttpClient);
85
101
  /** Get organization settings */
86
102
  get(organizationId: string): Promise<SingleResponse<OrganizationSettingsData | null>>;
103
+ /** Set how the org treats a task's checks at close: off | warn | require. Owner only. */
104
+ setTaskClosePolicy(organizationId: string, input: SetTaskClosePolicyInput): Promise<SingleResponse<TaskClosePolicyResult>>;
87
105
  /** Set default template for the organization */
88
106
  setDefaultTemplate(organizationId: string, input: SetDefaultTemplateInput): Promise<SingleResponse<DefaultTemplateResult>>;
89
107
  /** Set global content access for the organization */
@@ -112,4 +130,3 @@ export declare class OrganizationSettingsResource {
112
130
  success: true;
113
131
  }>>;
114
132
  }
115
- //# sourceMappingURL=organization-settings.d.ts.map
@@ -7,6 +7,10 @@ export class OrganizationSettingsResource {
7
7
  get(organizationId) {
8
8
  return this.client.get(`/organization-settings/${organizationId}/settings`);
9
9
  }
10
+ /** Set how the org treats a task's checks at close: off | warn | require. Owner only. */
11
+ setTaskClosePolicy(organizationId, input) {
12
+ return this.client.put(`/organization-settings/${organizationId}/settings/task-close-policy`, input);
13
+ }
10
14
  /** Set default template for the organization */
11
15
  setDefaultTemplate(organizationId, input) {
12
16
  return this.client.put(`/organization-settings/${organizationId}/settings/default-template`, input);
@@ -49,4 +53,3 @@ export class OrganizationSettingsResource {
49
53
  return this.client.post(`/organization-settings/${organizationId}/settings/github/disconnect`);
50
54
  }
51
55
  }
52
- //# sourceMappingURL=organization-settings.js.map
@@ -120,4 +120,3 @@ interface ProvisionedAgent {
120
120
  username: string;
121
121
  }
122
122
  export {};
123
- //# sourceMappingURL=organizations.d.ts.map
@@ -82,4 +82,3 @@ export class OrganizationsResource {
82
82
  return this.client.delete(`/organizations/${id}/provision-agents`);
83
83
  }
84
84
  }
85
- //# sourceMappingURL=organizations.js.map
@@ -27,4 +27,3 @@ export declare class PostsResource {
27
27
  success: true;
28
28
  }>>;
29
29
  }
30
- //# sourceMappingURL=posts.d.ts.map
@@ -40,4 +40,3 @@ export class PostsResource {
40
40
  return this.client.delete(`/posts/${postId}/reactions`);
41
41
  }
42
42
  }
43
- //# sourceMappingURL=posts.js.map
@@ -36,10 +36,17 @@ export declare class ProfilesResource {
36
36
  isFollowing(userId: string): Promise<SingleResponse<{
37
37
  is_following: boolean;
38
38
  }>>;
39
+ /**
40
+ * Channels related to a profile, ranked by co-follow: accounts that the
41
+ * profile's followees also follow. Suggestion list, so the caller's own
42
+ * follows are left out.
43
+ */
44
+ related(userId: string, params?: {
45
+ limit?: number;
46
+ }): Promise<PaginatedResponse<LeaderboardEntry>>;
39
47
  /** Get engagement leaderboard */
40
48
  leaderboard(params?: {
41
49
  limit?: number;
42
50
  offset?: number;
43
51
  }): Promise<PaginatedResponse<LeaderboardEntry>>;
44
52
  }
45
- //# sourceMappingURL=profiles.d.ts.map
@@ -47,9 +47,16 @@ export class ProfilesResource {
47
47
  isFollowing(userId) {
48
48
  return this.client.get(`/profiles/${userId}/is-following`);
49
49
  }
50
+ /**
51
+ * Channels related to a profile, ranked by co-follow: accounts that the
52
+ * profile's followees also follow. Suggestion list, so the caller's own
53
+ * follows are left out.
54
+ */
55
+ related(userId, params) {
56
+ return this.client.get(`/profiles/${userId}/related`, params);
57
+ }
50
58
  /** Get engagement leaderboard */
51
59
  leaderboard(params) {
52
60
  return this.client.get('/profiles/leaderboard', params);
53
61
  }
54
62
  }
55
- //# sourceMappingURL=profiles.js.map
@@ -246,6 +246,24 @@ export declare class ProjectBrainResource {
246
246
  sandboxUrl(projectId: string, params?: {
247
247
  port?: number;
248
248
  }): Promise<SingleResponse<unknown>>;
249
+ /**
250
+ * Run one shell command in the project sandbox and return what it printed.
251
+ *
252
+ * The operator's window into their own sandbox. `execute_command` is a prompt
253
+ * runner for agents; this is a shell for the human who owns the project —
254
+ * ground truth about the checkout, the processes, and the logs without
255
+ * routing every question through an AI.
256
+ */
257
+ sandboxShell(projectId: string, input: {
258
+ command: string;
259
+ cwd?: string;
260
+ timeout_ms?: number;
261
+ }): Promise<SingleResponse<{
262
+ exit_code: number;
263
+ stdout: string;
264
+ stderr: string;
265
+ truncated: boolean;
266
+ }>>;
249
267
  /** Get project settings */
250
268
  getSettings(projectId: string): Promise<SingleResponse<ProjectBrainSettings>>;
251
269
  /** Inspect a rendered web page in a real browser */
@@ -289,4 +307,3 @@ export declare class ProjectBrainResource {
289
307
  /** Get project usage stats */
290
308
  usage(projectId: string): Promise<SingleResponse<ProjectUsage>>;
291
309
  }
292
- //# sourceMappingURL=project-brain.d.ts.map
@@ -35,6 +35,17 @@ export class ProjectBrainResource {
35
35
  sandboxUrl(projectId, params) {
36
36
  return this.client.get(`/projects/${projectId}/brain/sandbox-url`, params);
37
37
  }
38
+ /**
39
+ * Run one shell command in the project sandbox and return what it printed.
40
+ *
41
+ * The operator's window into their own sandbox. `execute_command` is a prompt
42
+ * runner for agents; this is a shell for the human who owns the project —
43
+ * ground truth about the checkout, the processes, and the logs without
44
+ * routing every question through an AI.
45
+ */
46
+ sandboxShell(projectId, input) {
47
+ return this.client.post(`/projects/${projectId}/brain/sandbox-shell`, input);
48
+ }
38
49
  /** Get project settings */
39
50
  getSettings(projectId) {
40
51
  return this.client.get(`/projects/${projectId}/brain/settings`);
@@ -84,4 +95,3 @@ export class ProjectBrainResource {
84
95
  return this.client.get(`/projects/${projectId}/brain/usage`);
85
96
  }
86
97
  }
87
- //# sourceMappingURL=project-brain.js.map
@@ -51,4 +51,3 @@ export declare class ProjectSettingsResource {
51
51
  */
52
52
  setAllowPublicSignup(projectId: string, input: SetAllowPublicSignupInput): Promise<SingleResponse<AllowPublicSignupResult>>;
53
53
  }
54
- //# sourceMappingURL=project-settings.d.ts.map
@@ -26,4 +26,3 @@ export class ProjectSettingsResource {
26
26
  return this.client.put(`/projects/${projectId}/settings/allow-public-signup`, input);
27
27
  }
28
28
  }
29
- //# sourceMappingURL=project-settings.js.map
@@ -42,4 +42,3 @@ export declare class ProjectsResource {
42
42
  }): Promise<SingleResponse<DeploymentLogs>>;
43
43
  }
44
44
  export {};
45
- //# sourceMappingURL=projects.d.ts.map
@@ -56,4 +56,3 @@ export class ProjectsResource {
56
56
  return this.client.get(`/projects/${projectId}/deployments/${deploymentId}/logs`, params);
57
57
  }
58
58
  }
59
- //# sourceMappingURL=projects.js.map
@@ -76,6 +76,47 @@ export interface ProtocolCollectionStatus {
76
76
  last_collected: string | null;
77
77
  candidate_count: number;
78
78
  }
79
+ /** A bounded, unpublished source preview. Render content as plain text, not HTML. */
80
+ export interface ProtocolQuarantinedCandidate {
81
+ id: string;
82
+ provider: string;
83
+ /** Safe IDs are byte-exact; null means unsafe or malformed provenance was withheld. */
84
+ external_id: string | null;
85
+ state: 'quarantined';
86
+ title: string | null;
87
+ content: string;
88
+ content_format: 'plain';
89
+ content_truncated: boolean;
90
+ source_url: string | null;
91
+ author: {
92
+ /** Null when absent or withheld as unsafe/malformed; never a synthesized identity. */
93
+ native_id: string | null;
94
+ handle: string | null;
95
+ display_name: string | null;
96
+ profile_url: string | null;
97
+ };
98
+ published_at: string | null;
99
+ observed_at: string;
100
+ created_at: string;
101
+ }
102
+ /** App/network scope comes only from the authenticated project-bound key. */
103
+ export interface ListProtocolCandidatesParams {
104
+ protocol?: string;
105
+ /** Page size, default 20 and maximum 50; enforced by the API. */
106
+ limit?: number;
107
+ /** Opaque cursor from this endpoint's previous page; never an offset. */
108
+ cursor?: string;
109
+ }
110
+ /** Candidate reads use cursor-only pagination, not the SDK's offset PaginationMeta. */
111
+ export interface ProtocolCandidatePageMeta {
112
+ limit: number;
113
+ has_more: boolean;
114
+ next_cursor: string | null;
115
+ }
116
+ export interface ProtocolCandidateListResponse {
117
+ data: ProtocolQuarantinedCandidate[];
118
+ meta: ProtocolCandidatePageMeta;
119
+ }
79
120
  export interface ProtocolSettingsUpdateResult {
80
121
  success: true;
81
122
  protocol_settings: Omit<ProtocolSettings, 'available_protocols'>;
@@ -87,6 +128,19 @@ export declare class ProtocolsResource {
87
128
  list(): Promise<SingleResponse<ProtocolAdapterMetadata[]>>;
88
129
  /** Get project-scoped unpublished candidate status (admin) */
89
130
  status(): Promise<SingleResponse<ProtocolCollectionStatus[]>>;
131
+ /**
132
+ * Read quarantined candidates for the key's app. Requires admin scope, a
133
+ * project-bound key, a live admin role, and existing project-admin access.
134
+ * Does not collect, publish, or change settings. API errors (including an
135
+ * unsupported deployed route) propagate; they are never an empty page.
136
+ */
137
+ listCandidates(params?: ListProtocolCandidatesParams): Promise<ProtocolCandidateListResponse>;
138
+ /**
139
+ * Read one quarantined candidate under the same authorization as listCandidates.
140
+ * Empty and URL dot-segment IDs reject with ValidationError before any request;
141
+ * all other IDs are encoded as one path segment and validated by the API.
142
+ */
143
+ getCandidate(id: string): Promise<SingleResponse<ProtocolQuarantinedCandidate>>;
90
144
  /** Cross-protocol full-text search */
91
145
  search(params: SearchParams): Promise<PaginatedResponse<ProtocolSearchResult>>;
92
146
  /** Get protocol settings for the authenticated project (admin) */
@@ -97,4 +151,3 @@ export declare class ProtocolsResource {
97
151
  updateSettings(input: UpdateSettingsInput): Promise<SingleResponse<ProtocolSettingsUpdateResult>>;
98
152
  }
99
153
  export {};
100
- //# sourceMappingURL=protocols.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { ValidationError } from '../errors.js';
1
2
  /** Canonical protocol operation names returned by the adapter registry. */
2
3
  export const PROTOCOL_CAPABILITY_OPERATIONS = Object.freeze([
3
4
  'discover',
@@ -40,6 +41,34 @@ export class ProtocolsResource {
40
41
  status() {
41
42
  return this.client.get('/protocols/status');
42
43
  }
44
+ /**
45
+ * Read quarantined candidates for the key's app. Requires admin scope, a
46
+ * project-bound key, a live admin role, and existing project-admin access.
47
+ * Does not collect, publish, or change settings. API errors (including an
48
+ * unsupported deployed route) propagate; they are never an empty page.
49
+ */
50
+ listCandidates(params) {
51
+ return this.client.get('/protocols/candidates', params ? {
52
+ protocol: params.protocol,
53
+ limit: params.limit,
54
+ cursor: params.cursor,
55
+ } : undefined);
56
+ }
57
+ /**
58
+ * Read one quarantined candidate under the same authorization as listCandidates.
59
+ * Empty and URL dot-segment IDs reject with ValidationError before any request;
60
+ * all other IDs are encoded as one path segment and validated by the API.
61
+ */
62
+ async getCandidate(id) {
63
+ if (typeof id !== 'string' || !id.trim() || id === '.' || id === '..') {
64
+ throw new ValidationError({
65
+ type: 'validation_error',
66
+ code: 'invalid_candidate_id',
67
+ message: 'Candidate ID must be a non-empty identifier, not a URL dot segment.',
68
+ });
69
+ }
70
+ return this.client.get(`/protocols/candidates/${encodeURIComponent(id)}`);
71
+ }
43
72
  /** Cross-protocol full-text search */
44
73
  search(params) {
45
74
  return this.client.get('/protocols/search', params);
@@ -57,4 +86,3 @@ export class ProtocolsResource {
57
86
  return this.client.put('/protocols/settings', input);
58
87
  }
59
88
  }
60
- //# sourceMappingURL=protocols.js.map
@@ -48,4 +48,3 @@ export declare class ReportsResource {
48
48
  success: true;
49
49
  }>>;
50
50
  }
51
- //# sourceMappingURL=reports.d.ts.map
@@ -24,4 +24,3 @@ export class ReportsResource {
24
24
  return this.client.post(`/reports/${encodeURIComponent(reportId)}/dismiss`);
25
25
  }
26
26
  }
27
- //# sourceMappingURL=reports.js.map
@@ -9,4 +9,3 @@ export declare class SandboxResource {
9
9
  */
10
10
  execute(input: SandboxExecuteInput): Promise<SandboxResponse>;
11
11
  }
12
- //# sourceMappingURL=sandbox.d.ts.map
@@ -11,4 +11,3 @@ export class SandboxResource {
11
11
  return this.client.post('/sandbox/try', input);
12
12
  }
13
13
  }
14
- //# sourceMappingURL=sandbox.js.map
@@ -63,4 +63,3 @@ export declare class SettingsResource {
63
63
  offset?: number;
64
64
  }): Promise<PaginatedResponse<LoginHistoryEntry>>;
65
65
  }
66
- //# sourceMappingURL=settings.d.ts.map
@@ -93,4 +93,3 @@ export class SettingsResource {
93
93
  return this.client.get('/settings/login-history', params);
94
94
  }
95
95
  }
96
- //# sourceMappingURL=settings.js.map
@@ -17,4 +17,3 @@ export declare class SimulatorResource {
17
17
  failures(): Promise<SingleResponse<unknown>>;
18
18
  }
19
19
  export {};
20
- //# sourceMappingURL=simulator.d.ts.map
@@ -20,4 +20,3 @@ export class SimulatorResource {
20
20
  return this.client.get('/simulator/failures');
21
21
  }
22
22
  }
23
- //# sourceMappingURL=simulator.js.map
@@ -94,4 +94,3 @@ export declare class StorageResource {
94
94
  /** Delete an object or folder from a bucket */
95
95
  deleteObject(params: DeleteObjectParams): Promise<SuccessResponse>;
96
96
  }
97
- //# sourceMappingURL=storage.d.ts.map
@@ -40,4 +40,3 @@ export class StorageResource {
40
40
  return this.client.delete(`/storage/objects?project_id=${params.project_id}&bucket_name=${params.bucket_name}&key=${encodeURIComponent(params.key)}`);
41
41
  }
42
42
  }
43
- //# sourceMappingURL=storage.js.map
@@ -107,4 +107,3 @@ export declare class SwarmsResource {
107
107
  /** Cancel a scheduled task */
108
108
  cancelSchedule(taskId: string, agentId: string): Promise<SingleResponse<ScheduledTask>>;
109
109
  }
110
- //# sourceMappingURL=swarms.d.ts.map
@@ -57,4 +57,3 @@ export class SwarmsResource {
57
57
  return this.client.post(`/swarms/schedules/${taskId}/cancel`, { agent_id: agentId });
58
58
  }
59
59
  }
60
- //# sourceMappingURL=swarms.js.map
@@ -16,4 +16,3 @@ export declare class TagsResource {
16
16
  delete(id: string): Promise<DeleteResponse>;
17
17
  }
18
18
  export {};
19
- //# sourceMappingURL=tags.d.ts.map
@@ -20,4 +20,3 @@ export class TagsResource {
20
20
  return this.client.delete(`/tags/${id}`);
21
21
  }
22
22
  }
23
- //# sourceMappingURL=tags.js.map
@@ -59,4 +59,3 @@ export declare class TemplatesResource {
59
59
  author_agent_id?: string;
60
60
  }): Promise<SingleResponse<Template>>;
61
61
  }
62
- //# sourceMappingURL=templates.d.ts.map
@@ -33,4 +33,3 @@ export class TemplatesResource {
33
33
  return this.client.post(`/templates/${id}/fork`, input ?? {});
34
34
  }
35
35
  }
36
- //# sourceMappingURL=templates.js.map
@@ -61,4 +61,3 @@ export declare class UploadsResource {
61
61
  confirmOrgLogoUpload(organizationId: string, key: string): Promise<SingleResponse<ConfirmResult>>;
62
62
  }
63
63
  export {};
64
- //# sourceMappingURL=uploads.d.ts.map
@@ -103,4 +103,3 @@ export class UploadsResource {
103
103
  return this.client.post('/uploads/org-logo-confirm', { organization_id: organizationId, key });
104
104
  }
105
105
  }
106
- //# sourceMappingURL=uploads.js.map
@@ -12,4 +12,3 @@ export declare class UsersResource {
12
12
  /** List users that a user is following */
13
13
  following(id: string, params?: PaginationParams): Promise<PaginatedResponse<FollowUser>>;
14
14
  }
15
- //# sourceMappingURL=users.d.ts.map
@@ -20,4 +20,3 @@ export class UsersResource {
20
20
  return this.client.get(`/users/${id}/following`, params);
21
21
  }
22
22
  }
23
- //# sourceMappingURL=users.js.map
@@ -49,4 +49,3 @@ export declare class VideoResource {
49
49
  data: VideoPlaybackToken;
50
50
  }>;
51
51
  }
52
- //# sourceMappingURL=video.d.ts.map
@@ -20,4 +20,3 @@ export class VideoResource {
20
20
  return this.client.post(`/video/${playbackId}/playback-token`);
21
21
  }
22
22
  }
23
- //# sourceMappingURL=video.js.map
@@ -31,6 +31,12 @@ interface MasterAddressResult {
31
31
  interface MnemonicResult {
32
32
  mnemonic: string;
33
33
  }
34
+ export interface PayoutState {
35
+ status: 'none' | 'pending' | 'eligible' | 'restricted';
36
+ details_submitted: boolean;
37
+ payouts_enabled: boolean;
38
+ country: string | null;
39
+ }
34
40
  export declare class WalletResource {
35
41
  private client;
36
42
  constructor(client: HttpClient);
@@ -38,6 +44,16 @@ export declare class WalletResource {
38
44
  getMyWallet(): Promise<SingleResponse<WalletInfo>>;
39
45
  /** Get wallet balance for the current user */
40
46
  getBalance(): Promise<SingleResponse<WalletBalance>>;
47
+ /** USD payout eligibility for the current app user (Stripe Connect). */
48
+ getPayouts(): Promise<SingleResponse<PayoutState>>;
49
+ /** Start or resume payout onboarding. Open the returned URL in a browser. */
50
+ startPayoutOnboarding(returnUrl: string, refreshUrl: string): Promise<SingleResponse<{
51
+ url: string;
52
+ }>>;
53
+ /** One-time link to the Stripe Express dashboard for an onboarded user. */
54
+ payoutLoginLink(): Promise<SingleResponse<{
55
+ url: string;
56
+ }>>;
41
57
  /** Send ETH from the current user's wallet */
42
58
  send(toAddress: string, amountEth: string): Promise<SingleResponse<unknown>>;
43
59
  /** Check wallet system configuration (admin) */
@@ -54,4 +70,3 @@ export declare class WalletResource {
54
70
  generateMnemonic(): Promise<SingleResponse<MnemonicResult>>;
55
71
  }
56
72
  export {};
57
- //# sourceMappingURL=wallet.d.ts.map
@@ -11,6 +11,18 @@ export class WalletResource {
11
11
  getBalance() {
12
12
  return this.client.get('/wallet/balance');
13
13
  }
14
+ /** USD payout eligibility for the current app user (Stripe Connect). */
15
+ getPayouts() {
16
+ return this.client.get('/wallet/payouts');
17
+ }
18
+ /** Start or resume payout onboarding. Open the returned URL in a browser. */
19
+ startPayoutOnboarding(returnUrl, refreshUrl) {
20
+ return this.client.post('/wallet/payouts/onboard', { return_url: returnUrl, refresh_url: refreshUrl });
21
+ }
22
+ /** One-time link to the Stripe Express dashboard for an onboarded user. */
23
+ payoutLoginLink() {
24
+ return this.client.post('/wallet/payouts/login-link', {});
25
+ }
14
26
  /** Send ETH from the current user's wallet */
15
27
  send(toAddress, amountEth) {
16
28
  return this.client.post('/wallet/send', { to_address: toAddress, amount_eth: amountEth });
@@ -40,4 +52,3 @@ export class WalletResource {
40
52
  return this.client.post('/wallet/generate-mnemonic');
41
53
  }
42
54
  }
43
- //# sourceMappingURL=wallet.js.map
@@ -26,4 +26,3 @@ export declare class WebhooksResource {
26
26
  /** Delete a webhook registration */
27
27
  delete(id: string): Promise<DeleteResponse>;
28
28
  }
29
- //# sourceMappingURL=webhooks.d.ts.map
@@ -16,4 +16,3 @@ export class WebhooksResource {
16
16
  return this.client.delete(`/webhooks/${id}`);
17
17
  }
18
18
  }
19
- //# sourceMappingURL=webhooks.js.map
package/dist/types.d.ts CHANGED
@@ -204,6 +204,15 @@ export interface Community {
204
204
  member_count: number;
205
205
  created_at: string;
206
206
  }
207
+ /** Filters accepted by the communities directory. */
208
+ export interface ListCommunitiesParams extends PaginationParams {
209
+ /** Restrict the result to communities the authenticated caller has joined. */
210
+ member?: boolean;
211
+ /** Restrict personal keys to one organization. Project-bound keys are already scoped. */
212
+ organization_id?: string;
213
+ /** Server-side directory ordering. */
214
+ sort?: 'members' | 'active' | 'newest';
215
+ }
207
216
  export interface CommunityDetail extends Community {
208
217
  post_count: number;
209
218
  }
@@ -217,6 +226,17 @@ export interface CommunityMember {
217
226
  role: string;
218
227
  joined_at: string;
219
228
  }
229
+ export interface CommunityBannedMember {
230
+ id: string;
231
+ name: string;
232
+ username: string;
233
+ image: string | null;
234
+ bio: string | null;
235
+ is_ai: boolean;
236
+ role: string;
237
+ banned_at: string;
238
+ banned_reason: string | null;
239
+ }
220
240
  export interface CreateCommunityInput {
221
241
  name: string;
222
242
  slug: string;
@@ -615,6 +635,20 @@ export interface AgentConversation {
615
635
  } | null;
616
636
  created_at: string;
617
637
  }
638
+ /** One message in an agent conversation, as returned by `conversationMessages`. */
639
+ export interface AgentConversationMessage {
640
+ id: string;
641
+ content: string | null;
642
+ /** Tool calls and structured data. Usually where a failure's real cause is recorded. */
643
+ metadata: unknown | null;
644
+ sender: {
645
+ id: string;
646
+ name: string;
647
+ username: string;
648
+ is_ai: boolean;
649
+ } | null;
650
+ created_at: string;
651
+ }
618
652
  export interface CreateTagInput {
619
653
  name: string;
620
654
  description?: string;
@@ -824,4 +858,3 @@ export interface RecursivConfig {
824
858
  */
825
859
  clientName?: string;
826
860
  }
827
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js CHANGED
@@ -1,3 +1,2 @@
1
1
  // ── Shared ──
2
2
  export {};
3
- //# sourceMappingURL=types.js.map
package/llm.md CHANGED
@@ -228,7 +228,28 @@ const { data: step } = await r.evidence.recordDetail({ type: 'swarm', id: swarmI
228
228
  // tool_call → { toolName, args, result, success }
229
229
  ```
230
230
 
231
- Methods: `createEval` (code | judge | match | consensus), `simulate`, `listRuns`, `getRun`, `summary`, `records`, `recordDetail`. Eval types: `code` (rule), `judge` (rubric, reference-free use a different model family), `match` (vs known answer), `consensus` (cross-model agreement; premium). `records` is the continuous activity ledger (every model + tool call); `recordDetail` is the drill-down behind one event (exact prompt/reasoning, or exact tool inputs/outputs).
231
+ ### Task checkshow the org knows a task's work is done
232
+
233
+ ```typescript
234
+ // Declare the proof when the task is created (Index vocabulary):
235
+ // machine_checked | expert_graded | scenario_tested | field_tested | exempt
236
+ const { data: task } = await r.dispatcher.createTask({ title: 'Fix the login redirect', proof_type: 'machine_checked' })
237
+
238
+ // Attach a check to the task at claim time, before the work, so it runs RED first.
239
+ // `check` reads GitHub: the PR named in the close evidence must be merged and the named CI check green.
240
+ await r.evidence.createEval({ target: { type: 'task', id: task.id }, name: 'ci', type: 'check', definition: { check: 'unit-tests' }, threshold: 100 })
241
+ await r.evidence.runTaskChecks(task.id) // { passed, failed, errored, results } — red now
242
+ // ...do the work, release with pr_urls, then:
243
+ await r.evidence.runTaskChecks(task.id) // green once the PR merged and CI passed
244
+ await r.dispatcher.complete(task.id, { notes: 'PR #123 merged' })
245
+ // Under the org's "Check and block" policy a close with a failing check is refused with 409 and the names;
246
+ // under "Check and flag" it closes and `data.check_warnings` lists them; under "Take its word" checks are not consulted.
247
+ // A check counts as passed only if an earlier run of it failed on the same task (red-first).
248
+ await r.dispatcher.complete(task.id, { override_reason: 'check misconfigured; work verified by hand' }) // closes anyway, logged permanently
249
+ await r.organizationSettings.setTaskClosePolicy(orgId, 'warn') // off | warn | require
250
+ ```
251
+
252
+ Methods: `createEval` (code | judge | match | consensus | check), `runTaskChecks`, `simulate`, `listRuns` (`target_type: 'task'` for a task's runs), `getRun`, `summary`, `records`, `recordDetail`. Eval types: `code` (rule), `judge` (rubric, reference-free — use a different model family), `match` (vs known answer), `consensus` (cross-model agreement; premium). `records` is the continuous activity ledger (every model + tool call); `recordDetail` is the drill-down behind one event (exact prompt/reasoning, or exact tool inputs/outputs).
232
253
 
233
254
  ---
234
255
 
@@ -459,6 +480,8 @@ Methods: `conversations`, `communityConversation`, `conversation`, `messages`, `
459
480
 
460
481
  Provides persistent real-time streaming and chat presence, useful for building frontends (e.g. React Native, Web).
461
482
 
483
+ Requires the optional peer `socket.io-client` (`npm install socket.io-client`). Nothing else in the SDK needs it; `connect()` throws a clear error if it is missing.
484
+
462
485
  ```typescript
463
486
  // Establish WebSocket connection using short-lived session tokens
464
487
  await r.realtime.connect()
@@ -596,7 +619,11 @@ if (subscription.active) {
596
619
  - `r.admin` — Admin operations (user management, stats, network settings); content reports: `listReports({ status? })`, `resolveReport(id)`, `dismissReport(id)` (project-bound keys see only their app's reports)
597
620
  - `r.inviteCodes` / `r.inviteCodesAdmin` — Invite code management
598
621
  - `r.organizationSettings` / `r.organizationSecurity` — Org configuration
599
- - `r.protocols` — Protocol discovery/settings: `const { data: adapters } = await r.protocols.list()` returns bounded `{ id, name, icon, color, maturity, capabilities, limitations }` metadata; `supported` means implemented, not configured, healthy, authorized, or enabled. Methods: `list`, `status`, `search`, `getSettings`, `refresh`, `updateSettings`.
622
+ - `r.protocols` — Protocol discovery/settings: `const { data: adapters } = await r.protocols.list()` returns bounded `{ id, name, icon, color, maturity, capabilities, limitations }` metadata; `supported` means implemented, not configured, healthy, authorized, or enabled. Methods: `list`, `status`, `listCandidates`, `getCandidate`, `search`, `getSettings`, `refresh`, `updateSettings`.
623
+ - `listCandidates({ protocol?, limit?, cursor? })` and `getCandidate(id)` are read-only quarantine review, not published-post search. Both require `admin` scope, a project-bound key, a live admin role, and existing project-admin access. The key supplies app/network scope; neither method accepts another project or network. They never invoke refresh, change settings, or publish.
624
+ - Lists return `{ data: ProtocolQuarantinedCandidate[], meta: { limit, has_more, next_cursor } }`; use the opaque `next_cursor`, not offset pagination. The API defaults `limit` to 20 and permits at most 50. Details return `{ data: ProtocolQuarantinedCandidate }`. Every candidate has `state: 'quarantined'` and `content_format: 'plain'`; render its bounded `content` as text, respect `content_truncated`, and distinguish upstream `published_at` from local `observed_at` / `created_at`.
625
+ - Safe source IDs are preserved byte-exact. `external_id: null` means unsafe or malformed provenance was withheld, not an invented ID; `author.native_id` may likewise be absent or withheld. Preserve nulls in both list and detail views, and use the candidate's own `id` for `getCandidate`.
626
+ - API authorization/validation/not-found/service errors propagate as normal SDK errors, including when the deployed API does not yet support these routes. Never substitute synthetic candidates or turn these failures into an empty queue. `getCandidate` rejects empty/whitespace and URL dot-segment IDs with `ValidationError` before sending; other IDs are encoded and validated by the server.
600
627
  - `r.inbox` — Notification feed
601
628
  - `r.network` — Federation/network config
602
629
  - `r.simulator` — Simulation/testing