@feeble/blay-openclaw-plugin 0.1.17
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 +24 -0
- package/dist/channel/abort.d.ts +11 -0
- package/dist/channel/abort.js +20 -0
- package/dist/channel/abort.js.map +1 -0
- package/dist/channel/inbound.d.ts +53 -0
- package/dist/channel/inbound.js +384 -0
- package/dist/channel/inbound.js.map +1 -0
- package/dist/channel/plugin.d.ts +25 -0
- package/dist/channel/plugin.js +291 -0
- package/dist/channel/plugin.js.map +1 -0
- package/dist/channel/run-tracker.d.ts +54 -0
- package/dist/channel/run-tracker.js +137 -0
- package/dist/channel/run-tracker.js.map +1 -0
- package/dist/channel/runtime.d.ts +8 -0
- package/dist/channel/runtime.js +16 -0
- package/dist/channel/runtime.js.map +1 -0
- package/dist/channel/sse-client.d.ts +54 -0
- package/dist/channel/sse-client.js +154 -0
- package/dist/channel/sse-client.js.map +1 -0
- package/dist/channel/state.d.ts +6 -0
- package/dist/channel/state.js +11 -0
- package/dist/channel/state.js.map +1 -0
- package/dist/client.d.ts +23 -0
- package/dist/client.js +98 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +228 -0
- package/dist/index.js.map +1 -0
- package/dist/telemetry/pusher.d.ts +71 -0
- package/dist/telemetry/pusher.js +461 -0
- package/dist/telemetry/pusher.js.map +1 -0
- package/dist/telemetry/usage-collector.d.ts +39 -0
- package/dist/telemetry/usage-collector.js +60 -0
- package/dist/telemetry/usage-collector.js.map +1 -0
- package/dist/tools/action-items.d.ts +60 -0
- package/dist/tools/action-items.js +101 -0
- package/dist/tools/action-items.js.map +1 -0
- package/dist/tools/briefing.d.ts +15 -0
- package/dist/tools/briefing.js +138 -0
- package/dist/tools/briefing.js.map +1 -0
- package/dist/tools/comments.d.ts +43 -0
- package/dist/tools/comments.js +79 -0
- package/dist/tools/comments.js.map +1 -0
- package/dist/tools/context.d.ts +20 -0
- package/dist/tools/context.js +31 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/instrumentation.d.ts +19 -0
- package/dist/tools/instrumentation.js +84 -0
- package/dist/tools/instrumentation.js.map +1 -0
- package/dist/tools/notifications.d.ts +29 -0
- package/dist/tools/notifications.js +57 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/org.d.ts +12 -0
- package/dist/tools/org.js +31 -0
- package/dist/tools/org.js.map +1 -0
- package/dist/tools/projects.d.ts +73 -0
- package/dist/tools/projects.js +121 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/search.d.ts +20 -0
- package/dist/tools/search.js +50 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/tasks.d.ts +110 -0
- package/dist/tools/tasks.js +168 -0
- package/dist/tools/tasks.js.map +1 -0
- package/dist/tools/users.d.ts +12 -0
- package/dist/tools/users.js +31 -0
- package/dist/tools/users.js.map +1 -0
- package/dist/types.d.ts +20 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/formatting.d.ts +16 -0
- package/dist/utils/formatting.js +196 -0
- package/dist/utils/formatting.js.map +1 -0
- package/dist/webhook/handler.d.ts +10 -0
- package/dist/webhook/handler.js +70 -0
- package/dist/webhook/handler.js.map +1 -0
- package/openclaw.plugin.json +21 -0
- package/package.json +36 -0
- package/skills/blay/SKILL.md +25 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Tools — blay_list_notifications, blay_mark_notification_read
|
|
3
|
+
*/
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
import { formatError } from "../client.js";
|
|
6
|
+
import { formatNotification } from "../utils/formatting.js";
|
|
7
|
+
export function createListNotificationsTool(client) {
|
|
8
|
+
return {
|
|
9
|
+
name: "blay_list_notifications",
|
|
10
|
+
label: "Blay List Notifications",
|
|
11
|
+
description: "List your notifications. Unread notifications are also included in blay_briefing — use this tool when you need to see all notifications or manage read state.",
|
|
12
|
+
parameters: Type.Object({
|
|
13
|
+
unreadOnly: Type.Optional(Type.Boolean({ description: "If true, only return unread notifications" })),
|
|
14
|
+
limit: Type.Optional(Type.Number({ description: "Max notifications to return" })),
|
|
15
|
+
}),
|
|
16
|
+
async execute(_toolCallId, params) {
|
|
17
|
+
const res = await client.get("/api/v1/notifications", {
|
|
18
|
+
unreadOnly: params.unreadOnly ? "true" : undefined,
|
|
19
|
+
limit: params.limit?.toString(),
|
|
20
|
+
});
|
|
21
|
+
if (!res.ok) {
|
|
22
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
23
|
+
}
|
|
24
|
+
const notifications = res.data.data ?? [];
|
|
25
|
+
if (notifications.length === 0) {
|
|
26
|
+
return { content: [{ type: "text", text: "No notifications." }], details: {} };
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{ type: "text", text: `# Notifications (${notifications.length})\n\n${notifications.map(formatNotification).join("\n")}` },
|
|
31
|
+
],
|
|
32
|
+
details: {},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function createMarkNotificationReadTool(client) {
|
|
38
|
+
return {
|
|
39
|
+
name: "blay_mark_notification_read",
|
|
40
|
+
label: "Blay Mark Notification Read",
|
|
41
|
+
description: "Mark a notification as read. Use blay_list_notifications to find notification IDs.",
|
|
42
|
+
parameters: Type.Object({
|
|
43
|
+
notificationId: Type.String({ description: "The notification ID to mark as read" }),
|
|
44
|
+
}),
|
|
45
|
+
async execute(_toolCallId, params) {
|
|
46
|
+
const res = await client.post(`/api/v1/notifications/${params.notificationId}/read`);
|
|
47
|
+
if (!res.ok) {
|
|
48
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
content: [{ type: "text", text: "Notification marked as read." }],
|
|
52
|
+
details: {},
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/tools/notifications.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,+JAA+J;QACjK,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC,CAAC;YACrG,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC,CAAC;SAClF,CAAC;QACF,KAAK,CAAC,OAAO,CACX,WAAmB,EACnB,MAAgD;YAEhD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAsC,uBAAuB,EAAE;gBACzF,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;gBAClD,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE;aAChC,CAAC,CAAC;YAEH,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,MAAM,aAAa,GAAG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A8B,EAAE,CAAC;gBACjE,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organization Tool — blay_org_overview
|
|
3
|
+
*/
|
|
4
|
+
import type { BlayClient } from "../client.js";
|
|
5
|
+
import type { ToolResult } from "../types.js";
|
|
6
|
+
export declare function createOrgOverviewTool(client: BlayClient): {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
parameters: import("@sinclair/typebox").TObject<{}>;
|
|
11
|
+
execute(): Promise<ToolResult>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organization Tool — blay_org_overview
|
|
3
|
+
*/
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
import { formatError } from "../client.js";
|
|
6
|
+
import { formatUser } from "../utils/formatting.js";
|
|
7
|
+
export function createOrgOverviewTool(client) {
|
|
8
|
+
return {
|
|
9
|
+
name: "blay_org_overview",
|
|
10
|
+
label: "Blay Org Overview",
|
|
11
|
+
description: "Get organization overview including name, members, and project areas. Use this to find area IDs for creating projects, or to understand the team structure.",
|
|
12
|
+
parameters: Type.Object({}),
|
|
13
|
+
async execute() {
|
|
14
|
+
const res = await client.get("/api/v1/org");
|
|
15
|
+
if (!res.ok) {
|
|
16
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
17
|
+
}
|
|
18
|
+
const org = res.data;
|
|
19
|
+
const sections = [];
|
|
20
|
+
sections.push(`# Organization: ${org.name}`);
|
|
21
|
+
if (org.members?.length > 0) {
|
|
22
|
+
sections.push(`## Members (${org.members.length})\n${org.members.map(formatUser).join("\n")}`);
|
|
23
|
+
}
|
|
24
|
+
if (org.areas?.length > 0) {
|
|
25
|
+
sections.push(`## Project Areas\n${org.areas.map((a) => `- ${a.name} (id: ${a.id})`).join("\n")}`);
|
|
26
|
+
}
|
|
27
|
+
return { content: [{ type: "text", text: sections.join("\n\n") }], details: {} };
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=org.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/tools/org.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,MAAM,UAAU,qBAAqB,CAAC,MAAkB;IACtD,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,6JAA6J;QAC/J,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,KAAK,CAAC,OAAO;YACX,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAA0B,aAAa,CAAC,CAAC;YACrE,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,MAAM,GAAG,GAAG,GAAG,CAAC,IAIf,CAAC;YAEF,MAAM,QAAQ,GAAa,EAAE,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC,mBAAmB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YAE7C,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,QAAQ,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,OAAO,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjG,CAAC;YAED,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1B,QAAQ,CAAC,IAAI,CACX,qBAAqB,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACpF,CAAC;YACJ,CAAC;YAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACnF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Tools — blay_list_projects, blay_get_project, blay_create_project, blay_update_project
|
|
3
|
+
*/
|
|
4
|
+
import type { BlayClient } from "../client.js";
|
|
5
|
+
import type { ToolResult } from "../types.js";
|
|
6
|
+
export declare function createListProjectsTool(client: BlayClient): {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
11
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
+
areaId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
+
}>;
|
|
14
|
+
execute(_toolCallId: string, params: {
|
|
15
|
+
status?: string;
|
|
16
|
+
areaId?: string;
|
|
17
|
+
}): Promise<ToolResult>;
|
|
18
|
+
};
|
|
19
|
+
export declare function createGetProjectTool(client: BlayClient): {
|
|
20
|
+
name: string;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
24
|
+
projectId: import("@sinclair/typebox").TString;
|
|
25
|
+
}>;
|
|
26
|
+
execute(_toolCallId: string, params: {
|
|
27
|
+
projectId: string;
|
|
28
|
+
}): Promise<ToolResult>;
|
|
29
|
+
};
|
|
30
|
+
export declare function createCreateProjectTool(client: BlayClient): {
|
|
31
|
+
name: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description: string;
|
|
34
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
35
|
+
name: import("@sinclair/typebox").TString;
|
|
36
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
37
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
|
+
ownerId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
39
|
+
areaId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
40
|
+
dueDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
41
|
+
}>;
|
|
42
|
+
execute(_toolCallId: string, params: {
|
|
43
|
+
name: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
status?: string;
|
|
46
|
+
ownerId?: string;
|
|
47
|
+
areaId?: string;
|
|
48
|
+
dueDate?: number;
|
|
49
|
+
}): Promise<ToolResult>;
|
|
50
|
+
};
|
|
51
|
+
export declare function createUpdateProjectTool(client: BlayClient): {
|
|
52
|
+
name: string;
|
|
53
|
+
label: string;
|
|
54
|
+
description: string;
|
|
55
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
56
|
+
projectId: import("@sinclair/typebox").TString;
|
|
57
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
58
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
59
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
60
|
+
ownerId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
61
|
+
areaId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
62
|
+
dueDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
63
|
+
}>;
|
|
64
|
+
execute(_toolCallId: string, params: {
|
|
65
|
+
projectId: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
status?: string;
|
|
69
|
+
ownerId?: string;
|
|
70
|
+
areaId?: string;
|
|
71
|
+
dueDate?: number;
|
|
72
|
+
}): Promise<ToolResult>;
|
|
73
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Tools — blay_list_projects, blay_get_project, blay_create_project, blay_update_project
|
|
3
|
+
*/
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
import { formatError } from "../client.js";
|
|
6
|
+
import { formatProject, formatProjectDetail, formatConfirmation } from "../utils/formatting.js";
|
|
7
|
+
export function createListProjectsTool(client) {
|
|
8
|
+
return {
|
|
9
|
+
name: "blay_list_projects",
|
|
10
|
+
label: "Blay List Projects",
|
|
11
|
+
description: "List all projects you have access to. Use this to find a project ID before creating tasks or to see the full project landscape. Optionally filter by status or area.",
|
|
12
|
+
parameters: Type.Object({
|
|
13
|
+
status: Type.Optional(Type.String({ description: "Filter by project status (e.g. 'active', 'completed', 'on_hold')" })),
|
|
14
|
+
areaId: Type.Optional(Type.String({ description: "Filter by project area ID" })),
|
|
15
|
+
}),
|
|
16
|
+
async execute(_toolCallId, params) {
|
|
17
|
+
const res = await client.get("/api/v1/projects", {
|
|
18
|
+
status: params.status,
|
|
19
|
+
areaId: params.areaId,
|
|
20
|
+
});
|
|
21
|
+
if (!res.ok) {
|
|
22
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
23
|
+
}
|
|
24
|
+
const projects = res.data.data ?? [];
|
|
25
|
+
if (projects.length === 0) {
|
|
26
|
+
return { content: [{ type: "text", text: "No projects found." }], details: {} };
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{ type: "text", text: `# Projects (${projects.length})\n\n${projects.map(formatProject).join("\n")}` },
|
|
31
|
+
],
|
|
32
|
+
details: {},
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function createGetProjectTool(client) {
|
|
38
|
+
return {
|
|
39
|
+
name: "blay_get_project",
|
|
40
|
+
label: "Blay Get Project",
|
|
41
|
+
description: "Get detailed information about a specific project including description, task stats, and collaborators. Use this after finding a project via blay_list_projects or blay_search.",
|
|
42
|
+
parameters: Type.Object({
|
|
43
|
+
projectId: Type.String({ description: "The project ID" }),
|
|
44
|
+
}),
|
|
45
|
+
async execute(_toolCallId, params) {
|
|
46
|
+
const res = await client.get(`/api/v1/projects/${params.projectId}`);
|
|
47
|
+
if (!res.ok) {
|
|
48
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
content: [{ type: "text", text: formatProjectDetail(res.data) }],
|
|
52
|
+
details: {},
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export function createCreateProjectTool(client) {
|
|
58
|
+
return {
|
|
59
|
+
name: "blay_create_project",
|
|
60
|
+
label: "Blay Create Project",
|
|
61
|
+
description: "Create a new project. Use blay_org_overview to find available area IDs if you want to assign the project to an area.",
|
|
62
|
+
parameters: Type.Object({
|
|
63
|
+
name: Type.String({ description: "Project name" }),
|
|
64
|
+
description: Type.Optional(Type.String({ description: "Project description" })),
|
|
65
|
+
status: Type.Optional(Type.String({ description: "Project status (active, on_hold, completed). Defaults to active." })),
|
|
66
|
+
ownerId: Type.Optional(Type.String({ description: "Owner user ID" })),
|
|
67
|
+
areaId: Type.Optional(Type.String({ description: "Project area ID" })),
|
|
68
|
+
dueDate: Type.Optional(Type.Number({ description: "Due date as Unix timestamp in milliseconds" })),
|
|
69
|
+
}),
|
|
70
|
+
async execute(_toolCallId, params) {
|
|
71
|
+
const res = await client.post("/api/v1/projects", {
|
|
72
|
+
name: params.name,
|
|
73
|
+
description: params.description,
|
|
74
|
+
status: params.status,
|
|
75
|
+
ownerId: params.ownerId,
|
|
76
|
+
areaId: params.areaId,
|
|
77
|
+
dueDate: params.dueDate,
|
|
78
|
+
});
|
|
79
|
+
if (!res.ok) {
|
|
80
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
content: [{ type: "text", text: formatConfirmation("Project created", res.data) }],
|
|
84
|
+
details: {},
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export function createUpdateProjectTool(client) {
|
|
90
|
+
return {
|
|
91
|
+
name: "blay_update_project",
|
|
92
|
+
label: "Blay Update Project",
|
|
93
|
+
description: "Update an existing project's fields. Use blay_get_project first to confirm the current state before making changes.",
|
|
94
|
+
parameters: Type.Object({
|
|
95
|
+
projectId: Type.String({ description: "The project ID to update" }),
|
|
96
|
+
name: Type.Optional(Type.String({ description: "New project name" })),
|
|
97
|
+
description: Type.Optional(Type.String({ description: "New description" })),
|
|
98
|
+
status: Type.Optional(Type.String({ description: "New status (active, on_hold, completed)" })),
|
|
99
|
+
ownerId: Type.Optional(Type.String({ description: "New owner user ID" })),
|
|
100
|
+
areaId: Type.Optional(Type.String({ description: "New project area ID" })),
|
|
101
|
+
dueDate: Type.Optional(Type.Number({ description: "New due date as Unix timestamp in milliseconds" })),
|
|
102
|
+
}),
|
|
103
|
+
async execute(_toolCallId, params) {
|
|
104
|
+
const { projectId, ...updates } = params;
|
|
105
|
+
const body = {};
|
|
106
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
107
|
+
if (value !== undefined)
|
|
108
|
+
body[key] = value;
|
|
109
|
+
}
|
|
110
|
+
const res = await client.patch(`/api/v1/projects/${projectId}`, body);
|
|
111
|
+
if (!res.ok) {
|
|
112
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
content: [{ type: "text", text: formatConfirmation("Project updated", res.data) }],
|
|
116
|
+
details: {},
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGhG,MAAM,UAAU,sBAAsB,CAAC,MAAkB;IACvD,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,sKAAsK;QACxK,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kEAAkE,EAAE,CAAC,CAAC;YACvH,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC,CAAC;SACjF,CAAC;QACF,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,MAA4C;YAC7E,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAsC,kBAAkB,EAAE;gBACpF,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC,CAAC;YAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBAC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CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search Tool — blay_search
|
|
3
|
+
*/
|
|
4
|
+
import type { BlayClient } from "../client.js";
|
|
5
|
+
import type { ToolResult } from "../types.js";
|
|
6
|
+
export declare function createSearchTool(client: BlayClient): {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
11
|
+
query: import("@sinclair/typebox").TString;
|
|
12
|
+
entityTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
14
|
+
}>;
|
|
15
|
+
execute(_toolCallId: string, params: {
|
|
16
|
+
query: string;
|
|
17
|
+
entityTypes?: string;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}): Promise<ToolResult>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search Tool — blay_search
|
|
3
|
+
*/
|
|
4
|
+
import { Type } from "@sinclair/typebox";
|
|
5
|
+
import { formatError } from "../client.js";
|
|
6
|
+
export function createSearchTool(client) {
|
|
7
|
+
return {
|
|
8
|
+
name: "blay_search",
|
|
9
|
+
label: "Blay Search",
|
|
10
|
+
description: "Full-text search across tasks, projects, and comments. Use this when you know part of a name or keyword but not the ID. Returns matching entities with their types and IDs. For browsing by filters, use blay_list_tasks or blay_list_projects instead.",
|
|
11
|
+
parameters: Type.Object({
|
|
12
|
+
query: Type.String({ description: "Search query text" }),
|
|
13
|
+
entityTypes: Type.Optional(Type.String({ description: "Comma-separated entity types to search (e.g. 'task,project'). Defaults to all." })),
|
|
14
|
+
limit: Type.Optional(Type.Number({ description: "Max results to return" })),
|
|
15
|
+
}),
|
|
16
|
+
async execute(_toolCallId, params) {
|
|
17
|
+
const res = await client.get("/api/v1/search", {
|
|
18
|
+
q: params.query,
|
|
19
|
+
entityTypes: params.entityTypes,
|
|
20
|
+
limit: params.limit?.toString(),
|
|
21
|
+
});
|
|
22
|
+
if (!res.ok) {
|
|
23
|
+
return { content: [{ type: "text", text: formatError(res) }], details: {} };
|
|
24
|
+
}
|
|
25
|
+
const results = res.data.data ?? [];
|
|
26
|
+
if (results.length === 0) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: `No results found for "${params.query}".` }],
|
|
29
|
+
details: {},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const formatted = results
|
|
33
|
+
.map((r) => {
|
|
34
|
+
const parts = [`- [${r.type}] **${r.name}**`];
|
|
35
|
+
if (r.projectName)
|
|
36
|
+
parts.push(`in "${r.projectName}"`);
|
|
37
|
+
parts.push(`(id: ${r.id})`);
|
|
38
|
+
return parts.join(" ");
|
|
39
|
+
})
|
|
40
|
+
.join("\n");
|
|
41
|
+
return {
|
|
42
|
+
content: [
|
|
43
|
+
{ type: "text", text: `# Search Results for "${params.query}" (${results.length})\n\n${formatted}` },
|
|
44
|
+
],
|
|
45
|
+
details: {},
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,MAAM,UAAU,gBAAgB,CAAC,MAAkB;IACjD,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,aAAa;QACpB,WAAW,EACT,yPAAyP;QAC3P,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;YACtB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,m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,WAAW;oBAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC;gBACvD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;gBAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC,CAAC;YAEd,OAAO;gBACL,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,MAAM,CAAC,KAAK,MAAM,OAAO,CAAC,MAAM,QAAQ,SAAS,EAAE,EAAE;iBACrG;gBACD,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Tools — blay_list_tasks, blay_get_task, blay_create_task, blay_update_task, blay_delete_task
|
|
3
|
+
*/
|
|
4
|
+
import type { BlayClient } from "../client.js";
|
|
5
|
+
import type { ToolResult } from "../types.js";
|
|
6
|
+
export declare function createListTasksTool(client: BlayClient): {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
11
|
+
projectId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
+
assigneeId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14
|
+
priority: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15
|
+
overdue: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
16
|
+
blocked: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
17
|
+
stale: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
18
|
+
staleDays: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
19
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
20
|
+
}>;
|
|
21
|
+
execute(_toolCallId: string, params: {
|
|
22
|
+
projectId?: string;
|
|
23
|
+
assigneeId?: string;
|
|
24
|
+
status?: string;
|
|
25
|
+
priority?: string;
|
|
26
|
+
overdue?: boolean;
|
|
27
|
+
blocked?: boolean;
|
|
28
|
+
stale?: boolean;
|
|
29
|
+
staleDays?: number;
|
|
30
|
+
limit?: number;
|
|
31
|
+
}): Promise<ToolResult>;
|
|
32
|
+
};
|
|
33
|
+
export declare function createGetTaskTool(client: BlayClient): {
|
|
34
|
+
name: string;
|
|
35
|
+
label: string;
|
|
36
|
+
description: string;
|
|
37
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
38
|
+
taskId: import("@sinclair/typebox").TString;
|
|
39
|
+
includeSubtasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
40
|
+
includeComments: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
41
|
+
includeResources: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
42
|
+
includeLinks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
43
|
+
}>;
|
|
44
|
+
execute(_toolCallId: string, params: {
|
|
45
|
+
taskId: string;
|
|
46
|
+
includeSubtasks?: boolean;
|
|
47
|
+
includeComments?: boolean;
|
|
48
|
+
includeResources?: boolean;
|
|
49
|
+
includeLinks?: boolean;
|
|
50
|
+
}): Promise<ToolResult>;
|
|
51
|
+
};
|
|
52
|
+
export declare function createCreateTaskTool(client: BlayClient): {
|
|
53
|
+
name: string;
|
|
54
|
+
label: string;
|
|
55
|
+
description: string;
|
|
56
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
57
|
+
name: import("@sinclair/typebox").TString;
|
|
58
|
+
projectId: import("@sinclair/typebox").TString;
|
|
59
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
60
|
+
priority: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
61
|
+
ownerId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
62
|
+
dueDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
63
|
+
parentTaskId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
64
|
+
}>;
|
|
65
|
+
execute(_toolCallId: string, params: {
|
|
66
|
+
name: string;
|
|
67
|
+
projectId: string;
|
|
68
|
+
status?: string;
|
|
69
|
+
priority?: string;
|
|
70
|
+
ownerId?: string;
|
|
71
|
+
dueDate?: number;
|
|
72
|
+
parentTaskId?: string;
|
|
73
|
+
}): Promise<ToolResult>;
|
|
74
|
+
};
|
|
75
|
+
export declare function createUpdateTaskTool(client: BlayClient): {
|
|
76
|
+
name: string;
|
|
77
|
+
label: string;
|
|
78
|
+
description: string;
|
|
79
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
80
|
+
taskId: import("@sinclair/typebox").TString;
|
|
81
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
82
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
83
|
+
priority: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
84
|
+
ownerId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
85
|
+
dueDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
86
|
+
isBlocked: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
87
|
+
blockedReason: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
88
|
+
}>;
|
|
89
|
+
execute(_toolCallId: string, params: {
|
|
90
|
+
taskId: string;
|
|
91
|
+
name?: string;
|
|
92
|
+
status?: string;
|
|
93
|
+
priority?: string;
|
|
94
|
+
ownerId?: string;
|
|
95
|
+
dueDate?: number;
|
|
96
|
+
isBlocked?: boolean;
|
|
97
|
+
blockedReason?: string;
|
|
98
|
+
}): Promise<ToolResult>;
|
|
99
|
+
};
|
|
100
|
+
export declare function createDeleteTaskTool(client: BlayClient): {
|
|
101
|
+
name: string;
|
|
102
|
+
label: string;
|
|
103
|
+
description: string;
|
|
104
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
105
|
+
taskId: import("@sinclair/typebox").TString;
|
|
106
|
+
}>;
|
|
107
|
+
execute(_toolCallId: string, params: {
|
|
108
|
+
taskId: string;
|
|
109
|
+
}): Promise<ToolResult>;
|
|
110
|
+
};
|