@feeble/blay-openclaw-plugin 0.1.17 → 0.1.19
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/dist/client.d.ts +2 -1
- package/dist/client.js +22 -4
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +66 -9
- package/dist/index.js.map +1 -1
- package/dist/tools/action-items.d.ts +12 -1
- package/dist/tools/action-items.js +21 -1
- package/dist/tools/action-items.js.map +1 -1
- package/dist/tools/areas.d.ts +69 -0
- package/dist/tools/areas.js +109 -0
- package/dist/tools/areas.js.map +1 -0
- package/dist/tools/collaborators.d.ts +63 -0
- package/dist/tools/collaborators.js +106 -0
- package/dist/tools/collaborators.js.map +1 -0
- package/dist/tools/comments.d.ts +38 -1
- package/dist/tools/comments.js +64 -1
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/portal.d.ts +80 -0
- package/dist/tools/portal.js +141 -0
- package/dist/tools/portal.js.map +1 -0
- package/dist/tools/recurrence.d.ts +94 -0
- package/dist/tools/recurrence.js +130 -0
- package/dist/tools/recurrence.js.map +1 -0
- package/dist/tools/reminders.d.ts +82 -0
- package/dist/tools/reminders.js +131 -0
- package/dist/tools/reminders.js.map +1 -0
- package/dist/tools/resources.d.ts +168 -0
- package/dist/tools/resources.js +257 -0
- package/dist/tools/resources.js.map +1 -0
- package/dist/tools/subscriptions.d.ts +59 -0
- package/dist/tools/subscriptions.js +104 -0
- package/dist/tools/subscriptions.js.map +1 -0
- package/dist/tools/tasks.d.ts +33 -1
- package/dist/tools/tasks.js +60 -1
- package/dist/tools/tasks.js.map +1 -1
- package/dist/utils/formatting.d.ts +9 -0
- package/dist/utils/formatting.js +182 -0
- package/dist/utils/formatting.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collaborator Tools — blay_list_collaborators, blay_add_collaborator, blay_remove_collaborator, blay_update_collaborator_role
|
|
3
|
+
*/
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
import { formatError } from "../client.js";
|
|
6
|
+
import { formatCollaborator } from "../utils/formatting.js";
|
|
7
|
+
export function createListCollaboratorsTool(client) {
|
|
8
|
+
return {
|
|
9
|
+
name: "blay_list_collaborators",
|
|
10
|
+
label: "Blay List Collaborators",
|
|
11
|
+
description: "List collaborators for a project, including their roles and contact info.",
|
|
12
|
+
parameters: Type.Object({
|
|
13
|
+
projectId: Type.String({ description: "The project ID" }),
|
|
14
|
+
}),
|
|
15
|
+
async execute(_toolCallId, params) {
|
|
16
|
+
const res = await client.get(`/api/v1/projects/${params.projectId}/collaborators`);
|
|
17
|
+
if (!res.ok) {
|
|
18
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
19
|
+
}
|
|
20
|
+
const collabs = res.data.data ?? [];
|
|
21
|
+
if (collabs.length === 0) {
|
|
22
|
+
return { content: [{ type: "text", text: "No collaborators found for this project." }], details: {} };
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
content: [
|
|
26
|
+
{ type: "text", text: `# Collaborators (${collabs.length})\n\n${collabs.map(formatCollaborator).join("\n")}` },
|
|
27
|
+
],
|
|
28
|
+
details: {},
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function createAddCollaboratorTool(client) {
|
|
34
|
+
return {
|
|
35
|
+
name: "blay_add_collaborator",
|
|
36
|
+
label: "Blay Add Collaborator",
|
|
37
|
+
description: "Add a user as a collaborator on a project. Use blay_list_users to find user IDs.",
|
|
38
|
+
parameters: Type.Object({
|
|
39
|
+
projectId: Type.String({ description: "The project ID" }),
|
|
40
|
+
targetUserId: Type.String({ description: "The user ID to add" }),
|
|
41
|
+
role: Type.Optional(Type.String({ description: "Role: 'owner', 'member', or 'viewer' (default 'member')" })),
|
|
42
|
+
specialties: Type.Optional(Type.Array(Type.String(), { description: "Area specialties" })),
|
|
43
|
+
responsibilities: Type.Optional(Type.String({ description: "Role responsibilities description" })),
|
|
44
|
+
}),
|
|
45
|
+
async execute(_toolCallId, params) {
|
|
46
|
+
const res = await client.post(`/api/v1/projects/${params.projectId}/collaborators`, {
|
|
47
|
+
targetUserId: params.targetUserId,
|
|
48
|
+
role: params.role,
|
|
49
|
+
specialties: params.specialties,
|
|
50
|
+
responsibilities: params.responsibilities,
|
|
51
|
+
});
|
|
52
|
+
if (!res.ok) {
|
|
53
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
54
|
+
}
|
|
55
|
+
const data = res.data;
|
|
56
|
+
const text = data.alreadyExists
|
|
57
|
+
? `User is already a collaborator (id: ${data.id}).`
|
|
58
|
+
: `Collaborator added to project (id: ${data.id}).`;
|
|
59
|
+
return { content: [{ type: "text", text }], details: {} };
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function createRemoveCollaboratorTool(client) {
|
|
64
|
+
return {
|
|
65
|
+
name: "blay_remove_collaborator",
|
|
66
|
+
label: "Blay Remove Collaborator",
|
|
67
|
+
description: "Remove a collaborator from a project.",
|
|
68
|
+
parameters: Type.Object({
|
|
69
|
+
projectId: Type.String({ description: "The project ID" }),
|
|
70
|
+
targetUserId: Type.String({ description: "The user ID to remove" }),
|
|
71
|
+
}),
|
|
72
|
+
async execute(_toolCallId, params) {
|
|
73
|
+
const res = await client.del(`/api/v1/projects/${params.projectId}/collaborators/${params.targetUserId}`);
|
|
74
|
+
if (!res.ok) {
|
|
75
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
content: [{ type: "text", text: `Collaborator removed from project.` }],
|
|
79
|
+
details: {},
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export function createUpdateCollaboratorRoleTool(client) {
|
|
85
|
+
return {
|
|
86
|
+
name: "blay_update_collaborator_role",
|
|
87
|
+
label: "Blay Update Collaborator Role",
|
|
88
|
+
description: "Update a collaborator's role on a project.",
|
|
89
|
+
parameters: Type.Object({
|
|
90
|
+
projectId: Type.String({ description: "The project ID" }),
|
|
91
|
+
targetUserId: Type.String({ description: "The user ID to update" }),
|
|
92
|
+
role: Type.String({ description: "New role: 'owner', 'member', or 'viewer'" }),
|
|
93
|
+
}),
|
|
94
|
+
async execute(_toolCallId, params) {
|
|
95
|
+
const res = await client.patch(`/api/v1/projects/${params.projectId}/collaborators/${params.targetUserId}`, { role: params.role });
|
|
96
|
+
if (!res.ok) {
|
|
97
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
content: [{ type: "text", text: `Collaborator role updated to ${params.role}.` }],
|
|
101
|
+
details: {},
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=collaborators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaborators.js","sourceRoot":"","sources":["../../src/tools/collaborators.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,MAAM,UAAU,2BAA2B,CAAC,MAAkB;IAC5D,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,2EAA2E;QAC7E,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;SAC1D,CAAC;QACF,KAAK,CAAC,OAAO,CACX,WAAmB,EACnB,MAA6B;YAE7B,MAAM,GAAG,GAAG,M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AI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;SAC/E,CAAC;QACF,KAAK,CAAC,OAAO,CACX,WAAmB,EACnB,MAAiE;YAEjE,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,KAAK,CAC5B,oBAAoB,MAAM,CAAC,SAAS,kBAAkB,MAAM,CAAC,YAAY,EAAE,EAC3E,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CACtB,CAAC;YAEF,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;YAC9E,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gCAAgC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;gBACjF,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/comments.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Comment Tools — blay_list_comments, blay_post_comment
|
|
2
|
+
* Comment Tools — blay_list_comments, blay_post_comment, blay_edit_comment, blay_delete_comment, blay_react_to_comment
|
|
3
3
|
*/
|
|
4
4
|
import type { BlayClient } from "../client.js";
|
|
5
5
|
import type { ToolResult } from "../types.js";
|
|
@@ -41,3 +41,40 @@ export declare function createPostCommentTool(client: BlayClient): {
|
|
|
41
41
|
mentions?: string[];
|
|
42
42
|
}): Promise<ToolResult>;
|
|
43
43
|
};
|
|
44
|
+
export declare function createEditCommentTool(client: BlayClient): {
|
|
45
|
+
name: string;
|
|
46
|
+
label: string;
|
|
47
|
+
description: string;
|
|
48
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
49
|
+
commentId: import("@sinclair/typebox").TString;
|
|
50
|
+
content: import("@sinclair/typebox").TString;
|
|
51
|
+
}>;
|
|
52
|
+
execute(_toolCallId: string, params: {
|
|
53
|
+
commentId: string;
|
|
54
|
+
content: string;
|
|
55
|
+
}): Promise<ToolResult>;
|
|
56
|
+
};
|
|
57
|
+
export declare function createDeleteCommentTool(client: BlayClient): {
|
|
58
|
+
name: string;
|
|
59
|
+
label: string;
|
|
60
|
+
description: string;
|
|
61
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
62
|
+
commentId: import("@sinclair/typebox").TString;
|
|
63
|
+
}>;
|
|
64
|
+
execute(_toolCallId: string, params: {
|
|
65
|
+
commentId: string;
|
|
66
|
+
}): Promise<ToolResult>;
|
|
67
|
+
};
|
|
68
|
+
export declare function createReactToCommentTool(client: BlayClient): {
|
|
69
|
+
name: string;
|
|
70
|
+
label: string;
|
|
71
|
+
description: string;
|
|
72
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
73
|
+
commentId: import("@sinclair/typebox").TString;
|
|
74
|
+
emoji: import("@sinclair/typebox").TString;
|
|
75
|
+
}>;
|
|
76
|
+
execute(_toolCallId: string, params: {
|
|
77
|
+
commentId: string;
|
|
78
|
+
emoji: string;
|
|
79
|
+
}): Promise<ToolResult>;
|
|
80
|
+
};
|
package/dist/tools/comments.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Comment Tools — blay_list_comments, blay_post_comment
|
|
2
|
+
* Comment Tools — blay_list_comments, blay_post_comment, blay_edit_comment, blay_delete_comment, blay_react_to_comment
|
|
3
3
|
*/
|
|
4
4
|
import { Type } from "@sinclair/typebox";
|
|
5
5
|
import { formatError } from "../client.js";
|
|
@@ -76,4 +76,67 @@ export function createPostCommentTool(client) {
|
|
|
76
76
|
},
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
+
export function createEditCommentTool(client) {
|
|
80
|
+
return {
|
|
81
|
+
name: "blay_edit_comment",
|
|
82
|
+
label: "Blay Edit Comment",
|
|
83
|
+
description: "Edit a comment's content. Only the original author can edit. System event comments cannot be edited.",
|
|
84
|
+
parameters: Type.Object({
|
|
85
|
+
commentId: Type.String({ description: "The comment ID to edit" }),
|
|
86
|
+
content: Type.String({ description: "New comment content" }),
|
|
87
|
+
}),
|
|
88
|
+
async execute(_toolCallId, params) {
|
|
89
|
+
const res = await client.patch(`/api/v1/comments/${params.commentId}`, { content: params.content });
|
|
90
|
+
if (!res.ok) {
|
|
91
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
content: [{ type: "text", text: `Comment edited (id: ${params.commentId}).` }],
|
|
95
|
+
details: {},
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export function createDeleteCommentTool(client) {
|
|
101
|
+
return {
|
|
102
|
+
name: "blay_delete_comment",
|
|
103
|
+
label: "Blay Delete Comment",
|
|
104
|
+
description: "Delete a comment. Only the original author or an admin can delete. System event comments cannot be deleted.",
|
|
105
|
+
parameters: Type.Object({
|
|
106
|
+
commentId: Type.String({ description: "The comment ID to delete" }),
|
|
107
|
+
}),
|
|
108
|
+
async execute(_toolCallId, params) {
|
|
109
|
+
const res = await client.del(`/api/v1/comments/${params.commentId}`);
|
|
110
|
+
if (!res.ok) {
|
|
111
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
content: [{ type: "text", text: `Comment deleted (id: ${params.commentId}).` }],
|
|
115
|
+
details: {},
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export function createReactToCommentTool(client) {
|
|
121
|
+
return {
|
|
122
|
+
name: "blay_react_to_comment",
|
|
123
|
+
label: "Blay React To Comment",
|
|
124
|
+
description: "Toggle a reaction on a comment. If the reaction already exists it will be removed. Allowed emojis: heart, thumbsup, thumbsdown, laugh, exclamation, question.",
|
|
125
|
+
parameters: Type.Object({
|
|
126
|
+
commentId: Type.String({ description: "The comment ID to react to" }),
|
|
127
|
+
emoji: Type.String({ description: "Emoji name: 'heart', 'thumbsup', 'thumbsdown', 'laugh', 'exclamation', or 'question'" }),
|
|
128
|
+
}),
|
|
129
|
+
async execute(_toolCallId, params) {
|
|
130
|
+
const res = await client.post(`/api/v1/comments/${params.commentId}/reactions`, { emoji: params.emoji });
|
|
131
|
+
if (!res.ok) {
|
|
132
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
133
|
+
}
|
|
134
|
+
const action = res.data.action;
|
|
135
|
+
return {
|
|
136
|
+
content: [{ type: "text", text: `Reaction ${action} (${params.emoji} on comment ${params.commentId}).` }],
|
|
137
|
+
details: {},
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
79
142
|
//# sourceMappingURL=comments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/tools/comments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,MAAM,UAAU,sBAAsB,CAAC,MAAkB;IACvD,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,gKAAgK;QAClK,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,6DAA6D,EAAE,CAAC;YACvG,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;YACvD,KAAK,EAAE,IAAI,CAAC,QAAQ,CA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,OAAO,EAAE,EAAE,EAAE,CAAC;YAC9E,CAAC;YAED,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,MAAgB,CAAC;YACzC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,MAAM,KAAK,MAAM,CAAC,KAAK,eAAe,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;gBACzG,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal Tools — blay_list_portal_contacts, blay_create_portal_contact, blay_grant_project_access,
|
|
3
|
+
* blay_revoke_project_access, blay_share_resource, blay_unshare_resource
|
|
4
|
+
*/
|
|
5
|
+
import type { BlayClient } from "../client.js";
|
|
6
|
+
import type { ToolResult } from "../types.js";
|
|
7
|
+
export declare function createListPortalContactsTool(client: BlayClient): {
|
|
8
|
+
name: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
12
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
13
|
+
}>;
|
|
14
|
+
execute(_toolCallId: string, params: {
|
|
15
|
+
limit?: number;
|
|
16
|
+
}): Promise<ToolResult>;
|
|
17
|
+
};
|
|
18
|
+
export declare function createCreatePortalContactTool(client: BlayClient): {
|
|
19
|
+
name: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
23
|
+
email: import("@sinclair/typebox").TString;
|
|
24
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
25
|
+
company: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
}>;
|
|
27
|
+
execute(_toolCallId: string, params: {
|
|
28
|
+
email: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
company?: string;
|
|
31
|
+
}): Promise<ToolResult>;
|
|
32
|
+
};
|
|
33
|
+
export declare function createGrantProjectAccessTool(client: BlayClient): {
|
|
34
|
+
name: string;
|
|
35
|
+
label: string;
|
|
36
|
+
description: string;
|
|
37
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
38
|
+
contactId: import("@sinclair/typebox").TString;
|
|
39
|
+
projectId: import("@sinclair/typebox").TString;
|
|
40
|
+
}>;
|
|
41
|
+
execute(_toolCallId: string, params: {
|
|
42
|
+
contactId: string;
|
|
43
|
+
projectId: string;
|
|
44
|
+
}): Promise<ToolResult>;
|
|
45
|
+
};
|
|
46
|
+
export declare function createRevokeProjectAccessTool(client: BlayClient): {
|
|
47
|
+
name: string;
|
|
48
|
+
label: string;
|
|
49
|
+
description: string;
|
|
50
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
51
|
+
grantId: import("@sinclair/typebox").TString;
|
|
52
|
+
}>;
|
|
53
|
+
execute(_toolCallId: string, params: {
|
|
54
|
+
grantId: string;
|
|
55
|
+
}): Promise<ToolResult>;
|
|
56
|
+
};
|
|
57
|
+
export declare function createShareResourceTool(client: BlayClient): {
|
|
58
|
+
name: string;
|
|
59
|
+
label: string;
|
|
60
|
+
description: string;
|
|
61
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
62
|
+
resourceId: import("@sinclair/typebox").TString;
|
|
63
|
+
projectId: import("@sinclair/typebox").TString;
|
|
64
|
+
}>;
|
|
65
|
+
execute(_toolCallId: string, params: {
|
|
66
|
+
resourceId: string;
|
|
67
|
+
projectId: string;
|
|
68
|
+
}): Promise<ToolResult>;
|
|
69
|
+
};
|
|
70
|
+
export declare function createUnshareResourceTool(client: BlayClient): {
|
|
71
|
+
name: string;
|
|
72
|
+
label: string;
|
|
73
|
+
description: string;
|
|
74
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
75
|
+
shareId: import("@sinclair/typebox").TString;
|
|
76
|
+
}>;
|
|
77
|
+
execute(_toolCallId: string, params: {
|
|
78
|
+
shareId: string;
|
|
79
|
+
}): Promise<ToolResult>;
|
|
80
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portal Tools — blay_list_portal_contacts, blay_create_portal_contact, blay_grant_project_access,
|
|
3
|
+
* blay_revoke_project_access, blay_share_resource, blay_unshare_resource
|
|
4
|
+
*/
|
|
5
|
+
import { Type } from "@sinclair/typebox";
|
|
6
|
+
import { formatError } from "../client.js";
|
|
7
|
+
import { formatPortalContact } from "../utils/formatting.js";
|
|
8
|
+
export function createListPortalContactsTool(client) {
|
|
9
|
+
return {
|
|
10
|
+
name: "blay_list_portal_contacts",
|
|
11
|
+
label: "Blay List Portal Contacts",
|
|
12
|
+
description: "List external contacts who can access the client portal.",
|
|
13
|
+
parameters: Type.Object({
|
|
14
|
+
limit: Type.Optional(Type.Number({ description: "Max results (default 100)" })),
|
|
15
|
+
}),
|
|
16
|
+
async execute(_toolCallId, params) {
|
|
17
|
+
const res = await client.get("/api/v1/portal/contacts", { limit: params.limit?.toString() });
|
|
18
|
+
if (!res.ok) {
|
|
19
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
20
|
+
}
|
|
21
|
+
const contacts = res.data.data ?? [];
|
|
22
|
+
if (contacts.length === 0) {
|
|
23
|
+
return { content: [{ type: "text", text: "No portal contacts found." }], details: {} };
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
content: [
|
|
27
|
+
{ type: "text", text: `# Portal Contacts (${contacts.length})\n\n${contacts.map(formatPortalContact).join("\n")}` },
|
|
28
|
+
],
|
|
29
|
+
details: {},
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function createCreatePortalContactTool(client) {
|
|
35
|
+
return {
|
|
36
|
+
name: "blay_create_portal_contact",
|
|
37
|
+
label: "Blay Create Portal Contact",
|
|
38
|
+
description: "Create a new external contact for the client portal. Idempotent on email.",
|
|
39
|
+
parameters: Type.Object({
|
|
40
|
+
email: Type.String({ description: "Contact email address" }),
|
|
41
|
+
name: Type.Optional(Type.String({ description: "Contact name" })),
|
|
42
|
+
company: Type.Optional(Type.String({ description: "Contact's company" })),
|
|
43
|
+
}),
|
|
44
|
+
async execute(_toolCallId, params) {
|
|
45
|
+
const res = await client.post("/api/v1/portal/contacts", params);
|
|
46
|
+
if (!res.ok) {
|
|
47
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
48
|
+
}
|
|
49
|
+
const data = res.data;
|
|
50
|
+
const text = data.alreadyExists
|
|
51
|
+
? `Contact already exists (id: ${data.id}).`
|
|
52
|
+
: `Portal contact created: ${params.email} (id: ${data.id}).`;
|
|
53
|
+
return { content: [{ type: "text", text }], details: {} };
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export function createGrantProjectAccessTool(client) {
|
|
58
|
+
return {
|
|
59
|
+
name: "blay_grant_project_access",
|
|
60
|
+
label: "Blay Grant Project Access",
|
|
61
|
+
description: "Grant a portal contact access to a project via the client portal.",
|
|
62
|
+
parameters: Type.Object({
|
|
63
|
+
contactId: Type.String({ description: "The portal contact ID" }),
|
|
64
|
+
projectId: Type.String({ description: "The project ID to grant access to" }),
|
|
65
|
+
}),
|
|
66
|
+
async execute(_toolCallId, params) {
|
|
67
|
+
const res = await client.post("/api/v1/portal/access-grants", params);
|
|
68
|
+
if (!res.ok) {
|
|
69
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
70
|
+
}
|
|
71
|
+
const data = res.data;
|
|
72
|
+
const text = data.alreadyExists
|
|
73
|
+
? `Access already granted (id: ${data.id}).`
|
|
74
|
+
: `Project access granted (id: ${data.id}).`;
|
|
75
|
+
return { content: [{ type: "text", text }], details: {} };
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export function createRevokeProjectAccessTool(client) {
|
|
80
|
+
return {
|
|
81
|
+
name: "blay_revoke_project_access",
|
|
82
|
+
label: "Blay Revoke Project Access",
|
|
83
|
+
description: "Revoke a portal contact's access to a project.",
|
|
84
|
+
parameters: Type.Object({
|
|
85
|
+
grantId: Type.String({ description: "The access grant ID to revoke" }),
|
|
86
|
+
}),
|
|
87
|
+
async execute(_toolCallId, params) {
|
|
88
|
+
const res = await client.del(`/api/v1/portal/access-grants/${params.grantId}`);
|
|
89
|
+
if (!res.ok) {
|
|
90
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
content: [{ type: "text", text: `Project access revoked (id: ${params.grantId}).` }],
|
|
94
|
+
details: {},
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export function createShareResourceTool(client) {
|
|
100
|
+
return {
|
|
101
|
+
name: "blay_share_resource",
|
|
102
|
+
label: "Blay Share Resource",
|
|
103
|
+
description: "Share a resource with portal contacts via a project. The resource becomes visible to contacts with access to the project.",
|
|
104
|
+
parameters: Type.Object({
|
|
105
|
+
resourceId: Type.String({ description: "The resource ID to share" }),
|
|
106
|
+
projectId: Type.String({ description: "The project context for sharing" }),
|
|
107
|
+
}),
|
|
108
|
+
async execute(_toolCallId, params) {
|
|
109
|
+
const res = await client.post("/api/v1/portal/shared-resources", params);
|
|
110
|
+
if (!res.ok) {
|
|
111
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
112
|
+
}
|
|
113
|
+
const data = res.data;
|
|
114
|
+
const text = data.alreadyExists
|
|
115
|
+
? `Resource already shared (id: ${data.id}).`
|
|
116
|
+
: `Resource shared via portal (id: ${data.id}).`;
|
|
117
|
+
return { content: [{ type: "text", text }], details: {} };
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export function createUnshareResourceTool(client) {
|
|
122
|
+
return {
|
|
123
|
+
name: "blay_unshare_resource",
|
|
124
|
+
label: "Blay Unshare Resource",
|
|
125
|
+
description: "Remove a resource from portal sharing.",
|
|
126
|
+
parameters: Type.Object({
|
|
127
|
+
shareId: Type.String({ description: "The share ID to revoke" }),
|
|
128
|
+
}),
|
|
129
|
+
async execute(_toolCallId, params) {
|
|
130
|
+
const res = await client.del(`/api/v1/portal/shared-resources/${params.shareId}`);
|
|
131
|
+
if (!res.ok) {
|
|
132
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
content: [{ type: "text", text: `Resource unshared (id: ${params.shareId}).` }],
|
|
136
|
+
details: {},
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../../src/tools/portal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAA2C,MAAM,wBAAwB,CAAC;AAGtG,MAAM,UAAU,4BAA4B,CAAC,MAAkB;IAC7D,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,2BAA2B;QAClC,WAAW,EACT,0DAA0D;QAC5D,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC,CAAC;SAChF,CAAC;QACF,KAAK,CAAC,OAAO,CACX,WAAmB,EACnB,MAA0B;YAE1B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAC1B,yBAAyB,EACzB,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CACpC,CAAC;YAEF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yBAAyB,CAAC,MAAkB;IAC1D,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,wCAAwC;QAC1C,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;SAChE,CAAC;QACF,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,MAA2B;YAC5D,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,mCAAmC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAElF,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;YAC9E,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;gBAC/E,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recurrence Tools — blay_get_recurrence, blay_set_recurrence, blay_update_recurrence, blay_delete_recurrence, blay_skip_recurrence
|
|
3
|
+
*/
|
|
4
|
+
import type { BlayClient } from "../client.js";
|
|
5
|
+
import type { ToolResult } from "../types.js";
|
|
6
|
+
export declare function createGetRecurrenceTool(client: BlayClient): {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
11
|
+
entityType: import("@sinclair/typebox").TString;
|
|
12
|
+
entityId: import("@sinclair/typebox").TString;
|
|
13
|
+
}>;
|
|
14
|
+
execute(_toolCallId: string, params: {
|
|
15
|
+
entityType: string;
|
|
16
|
+
entityId: string;
|
|
17
|
+
}): Promise<ToolResult>;
|
|
18
|
+
};
|
|
19
|
+
export declare function createSetRecurrenceTool(client: BlayClient): {
|
|
20
|
+
name: string;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
24
|
+
entityType: import("@sinclair/typebox").TString;
|
|
25
|
+
entityId: import("@sinclair/typebox").TString;
|
|
26
|
+
frequencyType: import("@sinclair/typebox").TString;
|
|
27
|
+
daysOfWeek: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
|
|
28
|
+
dayOfMonth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
29
|
+
customIntervalDays: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
30
|
+
startDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
31
|
+
endDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
32
|
+
}>;
|
|
33
|
+
execute(_toolCallId: string, params: {
|
|
34
|
+
entityType: string;
|
|
35
|
+
entityId: string;
|
|
36
|
+
frequencyType: string;
|
|
37
|
+
daysOfWeek?: number[];
|
|
38
|
+
dayOfMonth?: number;
|
|
39
|
+
customIntervalDays?: number;
|
|
40
|
+
startDate?: number;
|
|
41
|
+
endDate?: number;
|
|
42
|
+
}): Promise<ToolResult>;
|
|
43
|
+
};
|
|
44
|
+
export declare function createUpdateRecurrenceTool(client: BlayClient): {
|
|
45
|
+
name: string;
|
|
46
|
+
label: string;
|
|
47
|
+
description: string;
|
|
48
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
49
|
+
configId: import("@sinclair/typebox").TString;
|
|
50
|
+
frequencyType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
51
|
+
daysOfWeek: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
|
|
52
|
+
dayOfMonth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
53
|
+
customIntervalDays: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
54
|
+
endDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
55
|
+
isActive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
56
|
+
}>;
|
|
57
|
+
execute(_toolCallId: string, params: {
|
|
58
|
+
configId: string;
|
|
59
|
+
frequencyType?: string;
|
|
60
|
+
daysOfWeek?: number[];
|
|
61
|
+
dayOfMonth?: number;
|
|
62
|
+
customIntervalDays?: number;
|
|
63
|
+
endDate?: number;
|
|
64
|
+
isActive?: boolean;
|
|
65
|
+
}): Promise<ToolResult>;
|
|
66
|
+
};
|
|
67
|
+
export declare function createDeleteRecurrenceTool(client: BlayClient): {
|
|
68
|
+
name: string;
|
|
69
|
+
label: string;
|
|
70
|
+
description: string;
|
|
71
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
72
|
+
entityType: import("@sinclair/typebox").TString;
|
|
73
|
+
entityId: import("@sinclair/typebox").TString;
|
|
74
|
+
}>;
|
|
75
|
+
execute(_toolCallId: string, params: {
|
|
76
|
+
entityType: string;
|
|
77
|
+
entityId: string;
|
|
78
|
+
}): Promise<ToolResult>;
|
|
79
|
+
};
|
|
80
|
+
export declare function createSkipRecurrenceTool(client: BlayClient): {
|
|
81
|
+
name: string;
|
|
82
|
+
label: string;
|
|
83
|
+
description: string;
|
|
84
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
85
|
+
entityType: import("@sinclair/typebox").TString;
|
|
86
|
+
entityId: import("@sinclair/typebox").TString;
|
|
87
|
+
reason: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
88
|
+
}>;
|
|
89
|
+
execute(_toolCallId: string, params: {
|
|
90
|
+
entityType: string;
|
|
91
|
+
entityId: string;
|
|
92
|
+
reason?: string;
|
|
93
|
+
}): Promise<ToolResult>;
|
|
94
|
+
};
|