@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.
- package/README.md +23 -4
- package/dist/client.d.ts +0 -1
- package/dist/client.js +0 -1
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js +0 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -1
- package/dist/lib/sse.d.ts +0 -1
- package/dist/lib/sse.js +0 -1
- package/dist/lib/webhooks.d.ts +0 -1
- package/dist/lib/webhooks.js +0 -1
- package/dist/next/index.d.ts +0 -1
- package/dist/next/index.js +0 -1
- package/dist/next/scopes.d.ts +0 -1
- package/dist/next/scopes.js +0 -1
- package/dist/next/server-auth.d.ts +0 -1
- package/dist/next/server-auth.js +0 -1
- package/dist/react/index.d.ts +0 -1
- package/dist/react/index.js +0 -1
- package/dist/react/useChat.d.ts +0 -1
- package/dist/react/useChat.js +0 -1
- package/dist/realtime.d.ts +1 -2
- package/dist/realtime.js +23 -11
- package/dist/resources/accounts.d.ts +0 -1
- package/dist/resources/accounts.js +0 -1
- package/dist/resources/admin.d.ts +4 -1
- package/dist/resources/admin.js +4 -1
- package/dist/resources/agents.d.ts +11 -2
- package/dist/resources/agents.js +12 -1
- package/dist/resources/app-subscriptions.d.ts +0 -1
- package/dist/resources/app-subscriptions.js +0 -1
- package/dist/resources/auth.d.ts +25 -1
- package/dist/resources/auth.js +75 -4
- package/dist/resources/billing.d.ts +0 -1
- package/dist/resources/billing.js +0 -1
- package/dist/resources/brain.d.ts +0 -1
- package/dist/resources/brain.js +0 -1
- package/dist/resources/brief.d.ts +0 -1
- package/dist/resources/brief.js +0 -1
- package/dist/resources/chat.d.ts +0 -1
- package/dist/resources/chat.js +0 -1
- package/dist/resources/commands.d.ts +0 -1
- package/dist/resources/commands.js +0 -1
- package/dist/resources/communities.d.ts +66 -4
- package/dist/resources/communities.js +62 -2
- package/dist/resources/curator.d.ts +0 -1
- package/dist/resources/curator.js +0 -1
- package/dist/resources/databases.d.ts +0 -1
- package/dist/resources/databases.js +0 -1
- package/dist/resources/deployments.d.ts +0 -1
- package/dist/resources/deployments.js +0 -1
- package/dist/resources/dispatcher.d.ts +18 -2
- package/dist/resources/dispatcher.js +6 -2
- package/dist/resources/email.d.ts +0 -1
- package/dist/resources/email.js +0 -1
- package/dist/resources/env-vars.d.ts +0 -1
- package/dist/resources/env-vars.js +0 -1
- package/dist/resources/evidence.d.ts +26 -4
- package/dist/resources/evidence.js +8 -1
- package/dist/resources/free-tier.d.ts +0 -1
- package/dist/resources/free-tier.js +0 -1
- package/dist/resources/github.d.ts +0 -1
- package/dist/resources/github.js +0 -1
- package/dist/resources/goals.d.ts +0 -1
- package/dist/resources/goals.js +0 -1
- package/dist/resources/human-asks.d.ts +0 -1
- package/dist/resources/human-asks.js +0 -1
- package/dist/resources/human-input.d.ts +0 -1
- package/dist/resources/human-input.js +0 -1
- package/dist/resources/inbox.d.ts +0 -1
- package/dist/resources/inbox.js +0 -1
- package/dist/resources/integrations.d.ts +0 -1
- package/dist/resources/integrations.js +0 -1
- package/dist/resources/invite-codes-admin.d.ts +0 -1
- package/dist/resources/invite-codes-admin.js +0 -1
- package/dist/resources/invite-codes.d.ts +0 -1
- package/dist/resources/invite-codes.js +0 -1
- package/dist/resources/jobs.d.ts +0 -1
- package/dist/resources/jobs.js +0 -1
- package/dist/resources/link-preview.d.ts +0 -1
- package/dist/resources/link-preview.js +0 -1
- package/dist/resources/media.d.ts +0 -1
- package/dist/resources/media.js +0 -1
- package/dist/resources/memory.d.ts +0 -1
- package/dist/resources/memory.js +0 -1
- package/dist/resources/moderation.d.ts +0 -1
- package/dist/resources/moderation.js +0 -1
- package/dist/resources/network.d.ts +0 -1
- package/dist/resources/network.js +0 -1
- package/dist/resources/notifications.d.ts +14 -2
- package/dist/resources/notifications.js +5 -3
- package/dist/resources/organization-security.d.ts +0 -1
- package/dist/resources/organization-security.js +0 -1
- package/dist/resources/organization-settings.d.ts +18 -1
- package/dist/resources/organization-settings.js +4 -1
- package/dist/resources/organizations.d.ts +0 -1
- package/dist/resources/organizations.js +0 -1
- package/dist/resources/posts.d.ts +0 -1
- package/dist/resources/posts.js +0 -1
- package/dist/resources/profiles.d.ts +8 -1
- package/dist/resources/profiles.js +8 -1
- package/dist/resources/project-brain.d.ts +18 -1
- package/dist/resources/project-brain.js +11 -1
- package/dist/resources/project-settings.d.ts +0 -1
- package/dist/resources/project-settings.js +0 -1
- package/dist/resources/projects.d.ts +0 -1
- package/dist/resources/projects.js +0 -1
- package/dist/resources/protocols.d.ts +54 -1
- package/dist/resources/protocols.js +29 -1
- package/dist/resources/reports.d.ts +0 -1
- package/dist/resources/reports.js +0 -1
- package/dist/resources/sandbox.d.ts +0 -1
- package/dist/resources/sandbox.js +0 -1
- package/dist/resources/settings.d.ts +0 -1
- package/dist/resources/settings.js +0 -1
- package/dist/resources/simulator.d.ts +0 -1
- package/dist/resources/simulator.js +0 -1
- package/dist/resources/storage.d.ts +0 -1
- package/dist/resources/storage.js +0 -1
- package/dist/resources/swarms.d.ts +0 -1
- package/dist/resources/swarms.js +0 -1
- package/dist/resources/tags.d.ts +0 -1
- package/dist/resources/tags.js +0 -1
- package/dist/resources/templates.d.ts +0 -1
- package/dist/resources/templates.js +0 -1
- package/dist/resources/uploads.d.ts +0 -1
- package/dist/resources/uploads.js +0 -1
- package/dist/resources/users.d.ts +0 -1
- package/dist/resources/users.js +0 -1
- package/dist/resources/video.d.ts +0 -1
- package/dist/resources/video.js +0 -1
- package/dist/resources/wallet.d.ts +16 -1
- package/dist/resources/wallet.js +12 -1
- package/dist/resources/webhooks.d.ts +0 -1
- package/dist/resources/webhooks.js +0 -1
- package/dist/types.d.ts +34 -1
- package/dist/types.js +0 -1
- package/llm.md +29 -2
- package/package.json +13 -7
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/sse.d.ts.map +0 -1
- package/dist/lib/sse.js.map +0 -1
- package/dist/lib/webhooks.d.ts.map +0 -1
- package/dist/lib/webhooks.js.map +0 -1
- package/dist/next/index.d.ts.map +0 -1
- package/dist/next/index.js.map +0 -1
- package/dist/next/scopes.d.ts.map +0 -1
- package/dist/next/scopes.js.map +0 -1
- package/dist/next/server-auth.d.ts.map +0 -1
- package/dist/next/server-auth.js.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js.map +0 -1
- package/dist/react/useChat.d.ts.map +0 -1
- package/dist/react/useChat.js.map +0 -1
- package/dist/realtime.d.ts.map +0 -1
- package/dist/realtime.js.map +0 -1
- package/dist/resources/accounts.d.ts.map +0 -1
- package/dist/resources/accounts.js.map +0 -1
- package/dist/resources/admin.d.ts.map +0 -1
- package/dist/resources/admin.js.map +0 -1
- package/dist/resources/agents.d.ts.map +0 -1
- package/dist/resources/agents.js.map +0 -1
- package/dist/resources/app-subscriptions.d.ts.map +0 -1
- package/dist/resources/app-subscriptions.js.map +0 -1
- package/dist/resources/auth.d.ts.map +0 -1
- package/dist/resources/auth.js.map +0 -1
- package/dist/resources/billing.d.ts.map +0 -1
- package/dist/resources/billing.js.map +0 -1
- package/dist/resources/brain.d.ts.map +0 -1
- package/dist/resources/brain.js.map +0 -1
- package/dist/resources/brief.d.ts.map +0 -1
- package/dist/resources/brief.js.map +0 -1
- package/dist/resources/chat.d.ts.map +0 -1
- package/dist/resources/chat.js.map +0 -1
- package/dist/resources/commands.d.ts.map +0 -1
- package/dist/resources/commands.js.map +0 -1
- package/dist/resources/communities.d.ts.map +0 -1
- package/dist/resources/communities.js.map +0 -1
- package/dist/resources/curator.d.ts.map +0 -1
- package/dist/resources/curator.js.map +0 -1
- package/dist/resources/databases.d.ts.map +0 -1
- package/dist/resources/databases.js.map +0 -1
- package/dist/resources/deployments.d.ts.map +0 -1
- package/dist/resources/deployments.js.map +0 -1
- package/dist/resources/dispatcher.d.ts.map +0 -1
- package/dist/resources/dispatcher.js.map +0 -1
- package/dist/resources/email.d.ts.map +0 -1
- package/dist/resources/email.js.map +0 -1
- package/dist/resources/env-vars.d.ts.map +0 -1
- package/dist/resources/env-vars.js.map +0 -1
- package/dist/resources/evidence.d.ts.map +0 -1
- package/dist/resources/evidence.js.map +0 -1
- package/dist/resources/free-tier.d.ts.map +0 -1
- package/dist/resources/free-tier.js.map +0 -1
- package/dist/resources/github.d.ts.map +0 -1
- package/dist/resources/github.js.map +0 -1
- package/dist/resources/goals.d.ts.map +0 -1
- package/dist/resources/goals.js.map +0 -1
- package/dist/resources/human-asks.d.ts.map +0 -1
- package/dist/resources/human-asks.js.map +0 -1
- package/dist/resources/human-input.d.ts.map +0 -1
- package/dist/resources/human-input.js.map +0 -1
- package/dist/resources/inbox.d.ts.map +0 -1
- package/dist/resources/inbox.js.map +0 -1
- package/dist/resources/integrations.d.ts.map +0 -1
- package/dist/resources/integrations.js.map +0 -1
- package/dist/resources/invite-codes-admin.d.ts.map +0 -1
- package/dist/resources/invite-codes-admin.js.map +0 -1
- package/dist/resources/invite-codes.d.ts.map +0 -1
- package/dist/resources/invite-codes.js.map +0 -1
- package/dist/resources/jobs.d.ts.map +0 -1
- package/dist/resources/jobs.js.map +0 -1
- package/dist/resources/link-preview.d.ts.map +0 -1
- package/dist/resources/link-preview.js.map +0 -1
- package/dist/resources/media.d.ts.map +0 -1
- package/dist/resources/media.js.map +0 -1
- package/dist/resources/memory.d.ts.map +0 -1
- package/dist/resources/memory.js.map +0 -1
- package/dist/resources/moderation.d.ts.map +0 -1
- package/dist/resources/moderation.js.map +0 -1
- package/dist/resources/network.d.ts.map +0 -1
- package/dist/resources/network.js.map +0 -1
- package/dist/resources/notifications.d.ts.map +0 -1
- package/dist/resources/notifications.js.map +0 -1
- package/dist/resources/organization-security.d.ts.map +0 -1
- package/dist/resources/organization-security.js.map +0 -1
- package/dist/resources/organization-settings.d.ts.map +0 -1
- package/dist/resources/organization-settings.js.map +0 -1
- package/dist/resources/organizations.d.ts.map +0 -1
- package/dist/resources/organizations.js.map +0 -1
- package/dist/resources/posts.d.ts.map +0 -1
- package/dist/resources/posts.js.map +0 -1
- package/dist/resources/profiles.d.ts.map +0 -1
- package/dist/resources/profiles.js.map +0 -1
- package/dist/resources/project-brain.d.ts.map +0 -1
- package/dist/resources/project-brain.js.map +0 -1
- package/dist/resources/project-settings.d.ts.map +0 -1
- package/dist/resources/project-settings.js.map +0 -1
- package/dist/resources/projects.d.ts.map +0 -1
- package/dist/resources/projects.js.map +0 -1
- package/dist/resources/protocols.d.ts.map +0 -1
- package/dist/resources/protocols.js.map +0 -1
- package/dist/resources/reports.d.ts.map +0 -1
- package/dist/resources/reports.js.map +0 -1
- package/dist/resources/sandbox.d.ts.map +0 -1
- package/dist/resources/sandbox.js.map +0 -1
- package/dist/resources/settings.d.ts.map +0 -1
- package/dist/resources/settings.js.map +0 -1
- package/dist/resources/simulator.d.ts.map +0 -1
- package/dist/resources/simulator.js.map +0 -1
- package/dist/resources/storage.d.ts.map +0 -1
- package/dist/resources/storage.js.map +0 -1
- package/dist/resources/swarms.d.ts.map +0 -1
- package/dist/resources/swarms.js.map +0 -1
- package/dist/resources/tags.d.ts.map +0 -1
- package/dist/resources/tags.js.map +0 -1
- package/dist/resources/templates.d.ts.map +0 -1
- package/dist/resources/templates.js.map +0 -1
- package/dist/resources/uploads.d.ts.map +0 -1
- package/dist/resources/uploads.js.map +0 -1
- package/dist/resources/users.d.ts.map +0 -1
- package/dist/resources/users.js.map +0 -1
- package/dist/resources/video.d.ts.map +0 -1
- package/dist/resources/video.js.map +0 -1
- package/dist/resources/wallet.d.ts.map +0 -1
- package/dist/resources/wallet.js.map +0 -1
- package/dist/resources/webhooks.d.ts.map +0 -1
- package/dist/resources/webhooks.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- 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
|
package/dist/resources/posts.js
CHANGED
|
@@ -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
|
|
@@ -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
|
package/dist/resources/swarms.js
CHANGED
package/dist/resources/tags.d.ts
CHANGED
package/dist/resources/tags.js
CHANGED
package/dist/resources/users.js
CHANGED
package/dist/resources/video.js
CHANGED
|
@@ -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
|
package/dist/resources/wallet.js
CHANGED
|
@@ -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
|
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
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
|
-
|
|
231
|
+
### Task checks — how 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
|