@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { HttpClient } from '../client.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Community, CommunityBannedMember, CommunityDetail, CommunityMember, CreateCommunityInput, CreatedCommunity, JoinResult, LeaveResult, ListCommunitiesParams, PaginatedResponse, PaginationParams, SingleResponse } from '../types.js';
|
|
3
3
|
export declare class CommunitiesResource {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: HttpClient);
|
|
6
|
-
/** List public communities */
|
|
7
|
-
list(params?:
|
|
6
|
+
/** List public communities, or only the authenticated caller's memberships. */
|
|
7
|
+
list(params?: ListCommunitiesParams): Promise<PaginatedResponse<Community>>;
|
|
8
8
|
/** Get a community by ID */
|
|
9
9
|
get(id: string): Promise<SingleResponse<CommunityDetail>>;
|
|
10
10
|
/** List members of a community */
|
|
@@ -15,5 +15,67 @@ export declare class CommunitiesResource {
|
|
|
15
15
|
join(id: string): Promise<SingleResponse<JoinResult>>;
|
|
16
16
|
/** Leave a community */
|
|
17
17
|
leave(id: string): Promise<SingleResponse<LeaveResult>>;
|
|
18
|
+
/** Update name, description, image, banner or privacy. Owner or admin. */
|
|
19
|
+
update(id: string, input: Partial<Pick<CreateCommunityInput, 'name' | 'description' | 'privacy'>> & {
|
|
20
|
+
image?: string | null;
|
|
21
|
+
banner?: string | null;
|
|
22
|
+
}): Promise<SingleResponse<CommunityDetail>>;
|
|
23
|
+
/** Delete a community. Owner only. */
|
|
24
|
+
delete(id: string): Promise<SingleResponse<{
|
|
25
|
+
deleted: boolean;
|
|
26
|
+
}>>;
|
|
27
|
+
/** People waiting to join a private group. Moderator or higher. */
|
|
28
|
+
requests(id: string, params?: PaginationParams): Promise<PaginatedResponse<CommunityMember>>;
|
|
29
|
+
/** Active bans an admin can review and lift. Admin or higher. */
|
|
30
|
+
bans(id: string, params?: PaginationParams): Promise<PaginatedResponse<CommunityBannedMember>>;
|
|
31
|
+
/** Let a pending member in. Admin or higher. */
|
|
32
|
+
approveMember(id: string, userId: string): Promise<SingleResponse<{
|
|
33
|
+
status: string;
|
|
34
|
+
}>>;
|
|
35
|
+
/** Turn a pending member away. Admin or higher. */
|
|
36
|
+
declineMember(id: string, userId: string): Promise<SingleResponse<{
|
|
37
|
+
declined: boolean;
|
|
38
|
+
}>>;
|
|
39
|
+
/** Remove a member. Moderator or higher, and only members below your role. */
|
|
40
|
+
removeMember(id: string, userId: string): Promise<SingleResponse<{
|
|
41
|
+
removed: boolean;
|
|
42
|
+
}>>;
|
|
43
|
+
/** Ban a member, with an optional reason. Moderator or higher. */
|
|
44
|
+
banMember(id: string, userId: string, reason?: string): Promise<SingleResponse<{
|
|
45
|
+
banned: boolean;
|
|
46
|
+
}>>;
|
|
47
|
+
/** Lift a ban. Admin or higher. */
|
|
48
|
+
unbanMember(id: string, userId: string): Promise<SingleResponse<{
|
|
49
|
+
banned: boolean;
|
|
50
|
+
}>>;
|
|
51
|
+
/** Change a member's role. Admin or higher; only the owner makes admins. */
|
|
52
|
+
setMemberRole(id: string, userId: string, role: 'admin' | 'moderator' | 'member'): Promise<SingleResponse<{
|
|
53
|
+
role: string;
|
|
54
|
+
}>>;
|
|
55
|
+
/** Pin a post to the top of the group. Moderator or higher. */
|
|
56
|
+
pinPost(id: string, postId: string): Promise<SingleResponse<{
|
|
57
|
+
pinned: boolean;
|
|
58
|
+
}>>;
|
|
59
|
+
/** Unpin a post. Moderator or higher. */
|
|
60
|
+
unpinPost(id: string, postId: string): Promise<SingleResponse<{
|
|
61
|
+
pinned: boolean;
|
|
62
|
+
}>>;
|
|
63
|
+
/** Remove a post from the group. Moderator or higher. */
|
|
64
|
+
removePost(id: string, postId: string): Promise<SingleResponse<{
|
|
65
|
+
removed: boolean;
|
|
66
|
+
}>>;
|
|
67
|
+
/**
|
|
68
|
+
* Mint an invite code that joins the redeemer to this group. Any member of
|
|
69
|
+
* a public group; moderator or higher for a private one. Admins can mint a
|
|
70
|
+
* code that joins people as moderators.
|
|
71
|
+
*/
|
|
72
|
+
createInvite(id: string, input?: {
|
|
73
|
+
role?: 'member' | 'moderator';
|
|
74
|
+
expires_days?: number;
|
|
75
|
+
}): Promise<SingleResponse<{
|
|
76
|
+
code: string;
|
|
77
|
+
community_id: string;
|
|
78
|
+
role: string;
|
|
79
|
+
expires_at: string | null;
|
|
80
|
+
}>>;
|
|
18
81
|
}
|
|
19
|
-
//# sourceMappingURL=communities.d.ts.map
|
|
@@ -3,7 +3,7 @@ export class CommunitiesResource {
|
|
|
3
3
|
constructor(client) {
|
|
4
4
|
this.client = client;
|
|
5
5
|
}
|
|
6
|
-
/** List public communities */
|
|
6
|
+
/** List public communities, or only the authenticated caller's memberships. */
|
|
7
7
|
list(params) {
|
|
8
8
|
return this.client.get('/communities', params);
|
|
9
9
|
}
|
|
@@ -27,5 +27,65 @@ export class CommunitiesResource {
|
|
|
27
27
|
leave(id) {
|
|
28
28
|
return this.client.post(`/communities/${id}/leave`);
|
|
29
29
|
}
|
|
30
|
+
/** Update name, description, image, banner or privacy. Owner or admin. */
|
|
31
|
+
update(id, input) {
|
|
32
|
+
return this.client.put(`/communities/${id}`, input);
|
|
33
|
+
}
|
|
34
|
+
/** Delete a community. Owner only. */
|
|
35
|
+
delete(id) {
|
|
36
|
+
return this.client.delete(`/communities/${id}`);
|
|
37
|
+
}
|
|
38
|
+
// ── Running the group: the tools an owner, admin or moderator has ────────
|
|
39
|
+
/** People waiting to join a private group. Moderator or higher. */
|
|
40
|
+
requests(id, params) {
|
|
41
|
+
return this.client.get(`/communities/${id}/requests`, params);
|
|
42
|
+
}
|
|
43
|
+
/** Active bans an admin can review and lift. Admin or higher. */
|
|
44
|
+
bans(id, params) {
|
|
45
|
+
return this.client.get(`/communities/${id}/bans`, params);
|
|
46
|
+
}
|
|
47
|
+
/** Let a pending member in. Admin or higher. */
|
|
48
|
+
approveMember(id, userId) {
|
|
49
|
+
return this.client.post(`/communities/${id}/members/${userId}/approve`);
|
|
50
|
+
}
|
|
51
|
+
/** Turn a pending member away. Admin or higher. */
|
|
52
|
+
declineMember(id, userId) {
|
|
53
|
+
return this.client.post(`/communities/${id}/members/${userId}/decline`);
|
|
54
|
+
}
|
|
55
|
+
/** Remove a member. Moderator or higher, and only members below your role. */
|
|
56
|
+
removeMember(id, userId) {
|
|
57
|
+
return this.client.delete(`/communities/${id}/members/${userId}`);
|
|
58
|
+
}
|
|
59
|
+
/** Ban a member, with an optional reason. Moderator or higher. */
|
|
60
|
+
banMember(id, userId, reason) {
|
|
61
|
+
return this.client.post(`/communities/${id}/members/${userId}/ban`, reason ? { reason } : {});
|
|
62
|
+
}
|
|
63
|
+
/** Lift a ban. Admin or higher. */
|
|
64
|
+
unbanMember(id, userId) {
|
|
65
|
+
return this.client.post(`/communities/${id}/members/${userId}/unban`);
|
|
66
|
+
}
|
|
67
|
+
/** Change a member's role. Admin or higher; only the owner makes admins. */
|
|
68
|
+
setMemberRole(id, userId, role) {
|
|
69
|
+
return this.client.patch(`/communities/${id}/members/${userId}`, { role });
|
|
70
|
+
}
|
|
71
|
+
/** Pin a post to the top of the group. Moderator or higher. */
|
|
72
|
+
pinPost(id, postId) {
|
|
73
|
+
return this.client.post(`/communities/${id}/posts/${postId}/pin`);
|
|
74
|
+
}
|
|
75
|
+
/** Unpin a post. Moderator or higher. */
|
|
76
|
+
unpinPost(id, postId) {
|
|
77
|
+
return this.client.delete(`/communities/${id}/posts/${postId}/pin`);
|
|
78
|
+
}
|
|
79
|
+
/** Remove a post from the group. Moderator or higher. */
|
|
80
|
+
removePost(id, postId) {
|
|
81
|
+
return this.client.delete(`/communities/${id}/posts/${postId}`);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Mint an invite code that joins the redeemer to this group. Any member of
|
|
85
|
+
* a public group; moderator or higher for a private one. Admins can mint a
|
|
86
|
+
* code that joins people as moderators.
|
|
87
|
+
*/
|
|
88
|
+
createInvite(id, input) {
|
|
89
|
+
return this.client.post(`/communities/${id}/invites`, input ?? {});
|
|
90
|
+
}
|
|
30
91
|
}
|
|
31
|
-
//# sourceMappingURL=communities.js.map
|
|
@@ -15,6 +15,9 @@ export interface DispatcherTask {
|
|
|
15
15
|
description: string | null;
|
|
16
16
|
organization_id: string | null;
|
|
17
17
|
goal_id: string | null;
|
|
18
|
+
/** What proves this task is done; null = undeclared. */
|
|
19
|
+
proof_type?: string | null;
|
|
20
|
+
proof_note?: string | null;
|
|
18
21
|
created_at: string;
|
|
19
22
|
updated_at: string;
|
|
20
23
|
}
|
|
@@ -80,6 +83,10 @@ export interface CreateTaskInput {
|
|
|
80
83
|
severity?: number;
|
|
81
84
|
ui_impact?: number;
|
|
82
85
|
score_override?: number;
|
|
86
|
+
/** What proves this task is done: machine_checked | expert_graded | scenario_tested | field_tested | exempt. */
|
|
87
|
+
proof_type?: string;
|
|
88
|
+
/** The check in words, or the reason for an exemption. */
|
|
89
|
+
proof_note?: string;
|
|
83
90
|
created_by?: string;
|
|
84
91
|
created_via?: string;
|
|
85
92
|
}
|
|
@@ -104,6 +111,8 @@ export interface UpdateTaskInput {
|
|
|
104
111
|
severity?: number;
|
|
105
112
|
ui_impact?: number;
|
|
106
113
|
score_override?: number;
|
|
114
|
+
proof_type?: string | null;
|
|
115
|
+
proof_note?: string | null;
|
|
107
116
|
}
|
|
108
117
|
export interface ListTasksParams extends PaginationParams {
|
|
109
118
|
status?: string;
|
|
@@ -266,13 +275,21 @@ export declare class DispatcherResource {
|
|
|
266
275
|
}): Promise<SingleResponse<{
|
|
267
276
|
ok: true;
|
|
268
277
|
}>>;
|
|
269
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* Mark a task as done. A task with a thresholded check that has no passing
|
|
280
|
+
* run refuses with 409 and the failing check names — run
|
|
281
|
+
* `evidence.runTaskChecks(taskId)` first. `override_reason` closes anyway
|
|
282
|
+
* and writes the reason to the activity log, permanently.
|
|
283
|
+
*/
|
|
270
284
|
complete(taskId: string, input?: {
|
|
271
285
|
agent?: string;
|
|
272
286
|
notes?: string;
|
|
273
287
|
organization_id?: string;
|
|
288
|
+
override_reason?: string;
|
|
274
289
|
}): Promise<SingleResponse<{
|
|
275
290
|
ok: true;
|
|
291
|
+
/** Under the org's "Check and flag" policy: the checks that were failing when the task closed. */
|
|
292
|
+
check_warnings?: string[];
|
|
276
293
|
}>>;
|
|
277
294
|
/** Release a claim on a task */
|
|
278
295
|
release(taskId: string, input?: {
|
|
@@ -367,4 +384,3 @@ export declare class DispatcherResource {
|
|
|
367
384
|
retentionDays: number;
|
|
368
385
|
}>>;
|
|
369
386
|
}
|
|
370
|
-
//# sourceMappingURL=dispatcher.d.ts.map
|
|
@@ -28,7 +28,12 @@ export class DispatcherResource {
|
|
|
28
28
|
const { organization_id, ...body } = input;
|
|
29
29
|
return this.client.post(`/dispatcher/heartbeat/${encodeURIComponent(taskId)}${orgQuery(organization_id)}`, body);
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Mark a task as done. A task with a thresholded check that has no passing
|
|
33
|
+
* run refuses with 409 and the failing check names — run
|
|
34
|
+
* `evidence.runTaskChecks(taskId)` first. `override_reason` closes anyway
|
|
35
|
+
* and writes the reason to the activity log, permanently.
|
|
36
|
+
*/
|
|
32
37
|
complete(taskId, input) {
|
|
33
38
|
return this.client.post(`/dispatcher/done/${encodeURIComponent(taskId)}`, input ?? {});
|
|
34
39
|
}
|
|
@@ -168,4 +173,3 @@ export class DispatcherResource {
|
|
|
168
173
|
return this.client.post(`/dispatcher/webhooks/cleanup${query}`, {});
|
|
169
174
|
}
|
|
170
175
|
}
|
|
171
|
-
//# sourceMappingURL=dispatcher.js.map
|
package/dist/resources/email.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { HttpClient } from '../client.js';
|
|
2
2
|
import type { SingleResponse } from '../types.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* What is being measured. Agent and swarm ids are UUIDs; a task id is the
|
|
5
|
+
* dispatcher's text id (e.g. "proj-fix-the-thing-ab12cd34"). A task target's
|
|
6
|
+
* evals are its CHECKS: they grade the task's close evidence, and a thresholded
|
|
7
|
+
* check without a passing run blocks `dispatcher.complete()`.
|
|
8
|
+
*/
|
|
4
9
|
export interface EvidenceTarget {
|
|
5
|
-
type: 'agent' | 'swarm';
|
|
10
|
+
type: 'agent' | 'swarm' | 'task';
|
|
6
11
|
id: string;
|
|
7
12
|
}
|
|
8
|
-
export type EvalType = 'code' | 'judge' | 'match' | 'consensus';
|
|
13
|
+
export type EvalType = 'code' | 'judge' | 'match' | 'consensus' | 'check';
|
|
9
14
|
/** A first-class eval (scorer): code · judge · match · consensus. */
|
|
10
15
|
export interface CreateEvalInput {
|
|
11
16
|
target: EvidenceTarget;
|
|
@@ -33,6 +38,8 @@ export interface SimulateInput {
|
|
|
33
38
|
run_type?: 'test' | 'real';
|
|
34
39
|
scoring_mode?: 'exact' | 'judge';
|
|
35
40
|
label?: string;
|
|
41
|
+
/** Attach the run to a project so it appears there, not only on the agent. */
|
|
42
|
+
project_id?: string;
|
|
36
43
|
}
|
|
37
44
|
export interface EvalRunRow {
|
|
38
45
|
id: string;
|
|
@@ -144,6 +151,22 @@ export declare class EvidenceResource {
|
|
|
144
151
|
* one call. Optionally attach evals inline. Returns the run + graded results.
|
|
145
152
|
*/
|
|
146
153
|
simulate(input: SimulateInput): Promise<SingleResponse<SimulateResult>>;
|
|
154
|
+
/**
|
|
155
|
+
* Run a task's checks against its close evidence (title, latest claim notes,
|
|
156
|
+
* PR urls, commits) and record pass/fail where the dispatcher's close gate
|
|
157
|
+
* reads it. Run this before `dispatcher.complete()` on a checked task.
|
|
158
|
+
*/
|
|
159
|
+
runTaskChecks(taskId: string): Promise<SingleResponse<{
|
|
160
|
+
evalRunId: string;
|
|
161
|
+
passed: number;
|
|
162
|
+
failed: number;
|
|
163
|
+
results: Array<{
|
|
164
|
+
name: string;
|
|
165
|
+
passed: boolean | null;
|
|
166
|
+
score: number | null;
|
|
167
|
+
reason: string;
|
|
168
|
+
}>;
|
|
169
|
+
}>>;
|
|
147
170
|
/** Recent runs for a target. */
|
|
148
171
|
listRuns(target: EvidenceTarget, limit?: number): Promise<{
|
|
149
172
|
data: EvalRunRow[];
|
|
@@ -170,4 +193,3 @@ export declare class EvidenceResource {
|
|
|
170
193
|
*/
|
|
171
194
|
recordDetail(target: EvidenceTarget, recordId: string, kind?: 'model_call' | 'tool_call'): Promise<SingleResponse<EvidenceRecordDetail>>;
|
|
172
195
|
}
|
|
173
|
-
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -18,6 +18,14 @@ export class EvidenceResource {
|
|
|
18
18
|
simulate(input) {
|
|
19
19
|
return this.client.post('/evidence/simulate', input);
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Run a task's checks against its close evidence (title, latest claim notes,
|
|
23
|
+
* PR urls, commits) and record pass/fail where the dispatcher's close gate
|
|
24
|
+
* reads it. Run this before `dispatcher.complete()` on a checked task.
|
|
25
|
+
*/
|
|
26
|
+
runTaskChecks(taskId) {
|
|
27
|
+
return this.client.post('/evidence/task-checks/run', { task_id: taskId });
|
|
28
|
+
}
|
|
21
29
|
/** Recent runs for a target. */
|
|
22
30
|
listRuns(target, limit = 20) {
|
|
23
31
|
return this.client.get(`/evidence/runs?target_type=${target.type}&target_id=${encodeURIComponent(target.id)}&limit=${limit}`);
|
|
@@ -47,4 +55,3 @@ export class EvidenceResource {
|
|
|
47
55
|
return this.client.get(`/evidence/records/${recordId}?target_type=${target.type}&target_id=${encodeURIComponent(target.id)}&kind=${kind}`);
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
|
-
//# sourceMappingURL=evidence.js.map
|
package/dist/resources/github.js
CHANGED
package/dist/resources/goals.js
CHANGED
package/dist/resources/inbox.js
CHANGED
package/dist/resources/jobs.d.ts
CHANGED
package/dist/resources/jobs.js
CHANGED
package/dist/resources/media.js
CHANGED
package/dist/resources/memory.js
CHANGED
|
@@ -12,11 +12,24 @@ export interface Notification {
|
|
|
12
12
|
created_at: string;
|
|
13
13
|
read_at: string | null;
|
|
14
14
|
}
|
|
15
|
+
export type NotificationCategory = 'all' | 'social' | 'system';
|
|
15
16
|
export interface ListNotificationsParams extends PaginationParams {
|
|
16
17
|
status?: 'unread' | 'read' | 'all';
|
|
17
18
|
cursor?: string;
|
|
18
19
|
/** Scope to a specific organization. Recommended for app clients to avoid cross-org notification leaks. */
|
|
19
20
|
organization_id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Which kind of notification to return. Defaults to `all`.
|
|
23
|
+
*
|
|
24
|
+
* `social` is what a person did to you (follows, replies, reactions,
|
|
25
|
+
* reposts, mentions, chat, community invites/joins). `system` is everything
|
|
26
|
+
* operational (agent, task, deploy, billing, security).
|
|
27
|
+
*
|
|
28
|
+
* Ask for it here rather than filtering the page you get back: the server
|
|
29
|
+
* applies the limit AFTER the category, so a client that filters afterwards
|
|
30
|
+
* on an account which also runs agents can be left with almost no rows.
|
|
31
|
+
*/
|
|
32
|
+
category?: NotificationCategory;
|
|
20
33
|
}
|
|
21
34
|
export interface NotificationListResponse {
|
|
22
35
|
data: Notification[];
|
|
@@ -33,10 +46,9 @@ export declare class NotificationsResource {
|
|
|
33
46
|
/** Mark a single notification as read */
|
|
34
47
|
markAsRead(notificationId: string): Promise<SuccessResponse>;
|
|
35
48
|
/** Mark all notifications as read */
|
|
36
|
-
markAllAsRead(): Promise<SuccessResponse>;
|
|
49
|
+
markAllAsRead(category?: NotificationCategory): Promise<SuccessResponse>;
|
|
37
50
|
/** Register a push notification token for the current user */
|
|
38
51
|
registerToken(input: RegisterTokenInput): Promise<SuccessResponse>;
|
|
39
52
|
/** Unregister a push notification token (e.g., on logout) */
|
|
40
53
|
unregisterToken(token: string): Promise<SuccessResponse>;
|
|
41
54
|
}
|
|
42
|
-
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -12,8 +12,11 @@ export class NotificationsResource {
|
|
|
12
12
|
return this.client.post(`/notifications/${notificationId}/read`);
|
|
13
13
|
}
|
|
14
14
|
/** Mark all notifications as read */
|
|
15
|
-
markAllAsRead() {
|
|
16
|
-
|
|
15
|
+
markAllAsRead(category) {
|
|
16
|
+
const path = category && category !== 'all'
|
|
17
|
+
? `/notifications/read-all?category=${encodeURIComponent(category)}`
|
|
18
|
+
: '/notifications/read-all';
|
|
19
|
+
return this.client.post(path);
|
|
17
20
|
}
|
|
18
21
|
/** Register a push notification token for the current user */
|
|
19
22
|
registerToken(input) {
|
|
@@ -45,4 +48,3 @@ export class NotificationsResource {
|
|
|
45
48
|
return response.json();
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
|
-
//# sourceMappingURL=notifications.js.map
|